text:
---
title: ControlBar.transition
description: Configuration attribute for Smart Crop Video Viewer.
solution: Experience Manager
feature: Dynamic Media Classic,Viewers,SDK/API,Smart Crop,Video
role: Developer,User
exl-id: 7b4db11b-e9ac-4a52-9206-083989128bc6
---
# ControlBar.transition{#controlbar-transition}

Configuration attribute for Smart Crop Video Viewer.

 ` [ControlBar.|<containerId>_controls.]transition=none|fade[, *`delaytohide`*[, *`duration`*]`

  none|fade

 Specifies the effect type that is used to show or hide the control bar and its content.

Use  none for instant show and hide. Use  fade to provide a gradual fade in and fade out effect.

Fade is not supported on Internet Explorer 8.

   delaytohide

Specifies the time in seconds between the last mouse/touch event that the control bar registers and the time control bar hides.

 If set to  -1, the component never triggers its auto-hide effect and always stays visible on the screen.

   duration

Sets the duration of the fade in and fade out animation, in seconds.

## Properties {#section-f42369774e2740dcb399626a0e4e930e}

Optional.

## Default {#section-d016470e92a74f98a18c4ab3489410a5}

`fade,2,0.5`

## Example {#section-7621c8ebd4144bc08a537d01bd9c3f2f}

```
transition=none
```


text:
# measure-wasted-renders

**to install**

```bash
npm install --save-dev measure-wasted-renders
```

**to use**

```js
// in your app's entry-point
import React from "react";
import measureWastedRenders from "measure-wasted-renders";

if (process.env.NODE_ENV !== "production") {
  measureWastedRenders(React);
}
```

Then later inside the devtools console you can run `window.prettyPrintWasted()` which outputs a table describing all of the components that have rerendered based on shallow changes to its props that were actually deeply equal to previous props.

![](https://user-images.githubusercontent.com/4656974/35294060-a1affd1a-0043-11e8-88a8-3c6e291fff67.png)

## TO DO
 - remove lodash dependency
 - publish to npm

license: MIT

repository: samouri/measure-wasted-renders

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive

repo_name: samouri/measure-wasted-renders


text:
---
layout: post
title: Ubiquity command for JIRA & Crucible
tags: ubiquity jira crucible
---

So…

I don’t post a lot unfortunately, the reason is that I don't really have time
to play with some interesting stuff to post about it later :( But fortunately
I found some time for creating ubiquity command.

I have to work a lot with [JIRA] & [Crucible] at my [day job]. So I've decided
to simplify my life somehow :)

I was thinking about this already for a long time... I also wanted to check
out Ubiquity, but from the internal side. I have decided to give it a try. I
followed very nice [tutorial], to be honest I was amazed to see it being so
complete. Usually it’s completely different when dealing with mozilla.

Result seems to be quite nice at least it is what I was targeting to you can
give it a try if you are also dealing with jira or crucible. Actually there
are some other Ubiquity command related to the [JIRA] but they seem to be site
specific and settings are hardcoded. In with this command you can set your
jira / crucible URL and enjoy it.

[day job]:http://www.tomtom.com/services/service.php?id=16&tab=87 "TomTom car navigation"
[JIRA]:http://www.atlassian.com/software/jira/ "Issue and project tracking software for development teams"
[Crucible]:http://www.atlassian.com/software/crucible/ "Code review system"
[tutorial]:https://wiki.mozilla.org/Labs/Ubiquity/Ubiquity_0.1_Author_Tutorial#The_Ubiquity_0.1_Command_Tutorial "Ubiquity Command Tutorial "


text:
## Getting Started
To get this blog project up and running:

1. Navigate to project root folder

2. Start local server
```
python manage.py runserver
```

### Prerequisites
This project was developed with:
1. Django 3.0.3
2. Python 3.7.6

### Features
1. Login
2. List posts
3. Publish and remove post
4. Publish and remove comment
5. Save drafts

## Screenshots

![home](/images/login.png)

![home](/images/home.png)

![about](/images/about.png)

![home](/images/post.png)

![home](/images/draft.png)

![home](/images/comment.png)

## License

This project is licensed under the MIT License - see the [LICENSE.md](LICENSE) file for details

## Acknowledgments
* Jose Portilla, author of Python and Django Full Stack Web Developer Bootcamp


text:
# Lara - SASS Starter Kit

Kick off your next recipes website with this SASS boilerplate.
This starter ships with a simple Gatsby configuration. Everything you might need to get up and running.

![Lara](resources/screenshot-01.jpg?raw=true "Lara")

## Installation

Click [here](http://github.andrewisen.se/lara) to check out the demo.

## Installation

1. Install Node + NPM, see [https://nodejs.org/](nodejs.org/)
2. Install dependencies
   `npm install`
3. Check if Gatsby is working
   `gatsby --help`
4. Go to the _lara_ dir
   `cd lara`
5. Run dev server
   `npm run develop`

## Note

All images are pulled from [Unsplash](https://unsplash.com/). They are randomly chosen and will update on each page refresh.
Also, all recipe names in the gallery are in Swedish.

repository: andrewisen/lara

branch_name: refs/heads/main

repo_name: andrewisen/lara


text:
# R style guide HD

Legacy version July 2023 · 🗄

- migrated R template to <https://github.com/hdigital/starter-r>
- only RMarkdown document and style guide kept
- removed Rocker and Quarto examples

---

[The tidyverse style guide](https://style.tidyverse.org/)

pipes — `|>` · 🌬

+ one line for each step in a pipe
+ first line pipe with name of new object and assignment operator (only)
+ use Base-R pipe `|>` over Tidyverse-R pipe `%>%` for R >= 4.2
  + placeholder `_` (`|>`) instead of `.` (`%>%`)
  + check _Use native pipe operator_ in [RStudio](https://www.rstudio.com/blog/rstudio-v1-4-update-whats-new/)

data · 🔢

+ use coherent prefixes for groups of data // `dt dt_ctry dt_ctz`
+ prefix `raw_` for raw data read into object with

plots · 📊

+ prefix `pl` for plot objects // `pl pl1 pl2`
+ data for plot only into `pl_dt` object

models · 🔬

+ prefix `mo` for model objects // `mo mo_lm mo1`

workflow · ⚙

+ .gitignore sources with `source__` prefix
  + [ single option to ignore copyright protected, personal or sensible sources ]
+ final checks
  + restart R session and run all
  + check all object names
  + check console messages and warnings
+ reproducible environments with [Rocker](https://rocker-project.org/use/reproducibility.html)
  + see [`Dockerfile`](Dockerfile) and [`docker-compose.yml`](docker-compose.yml) examples

packages · 📦 // see snippet below

+ use [conflicted](https://conflicted.r-lib.org/) to avoid function name conflicts
  + load first with `library(conflicted)`
  + specify preferred functions (e.g. `conflicts_prefer(dplyr::filter())`)
+ load `library(tidyverse)` after `conflicted`
+ add brief description why package is loaded
  + `library(broom)  # models // tidy results`
+ order packages loaded by thematic groups
  + _plot_ — patchwork ggrepel
  + _models_ — broom · ggeffects
+ specify single usage of package with `::`
  + comment below loading packages block // `# janitor::`
  + no comment for usage tidyverse of packages that are not loaded with _library(tidyverse)_ (e.g. glue readxl)
  + [ reduce potential name conflicts and code completion options ]

---

## Snippets

Loading packages

```r
library(conflicted) # create errors for function name conflicts
conflicts_prefer(dplyr::filter, .quiet = TRUE)

library(tidyverse)

# order alphabetically in section and provide category with brief description
library(broom)      # models // tidy results
library(ggeffects)  # models // visualize model effects
library(patchwork)  # plots  // arrange plots
library(reactable)  # layout // interactive data tables
library(sf)         # maps   // spatial data tools

# DT:: skimr:: viridis::
```

---

_Note_ — These are my personal best practices for code formatting in Tidyverse R. They have evolved over time and not all my previous code may follow these guidelines.

repository: hdigital/teaching

gha_language: HTML

repo_name: hdigital/teaching


text:
## Check out a remote branch
Git checkout remote branch lets us switch to (and work on) a remote branch, just like we’d switch to a local one.
```
git fetch origin
git checkout -b branchxyz origin/branchxyz

or
git branch branchxyz origin/branchxyz

reference: https://dzone.com/articles/what-is-git-checkout-remote-branch-how-it-works-wh
```

## Case-sensive filenames
```
git config core.ignorecase false
```
- https://stackoverflow.com/questions/17683458/how-do-i-commit-case-sensitive-only-filename-changes-in-git

## Why does pulling sometimes make me create a commit?
Simple answer: git pull is just a combination of git fetch and then a plain git merge.

As any merge, if Git finds out fast-forwarding is not possible, a traditional merge is necessary (one more commit with two parents), therefore this process asks for a commit message.

Reference: [Git docs for branching and merging](https://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging)

- Answer from https://stackoverflow.com/questions/37796805/why-does-pulling-sometimes-make-me-create-a-commit

## What is git fast-forwarding?
When you try to merge one commit with a commit that can be reached by following the first commit’s history, Git simplifies things by moving the pointer forward because there is no divergent work to merge together – this is called a “fast-forward.”

For more : http://git-scm.com/book/en/v2/Git-Branching-Basic-Branching-and-Merging

In another way,

If master has not diverged, instead of creating a new commit, git will just point master to the latest commit of the feature branch. This is a “fast forward.” There won't be any "merge commit" in fast-forwarding merge.

- Reference: [Stackoverflow: What is git fast-forwarding? [duplicate]](https://stackoverflow.com/questions/29673869/what-is-git-fast-forwarding)


text:
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

# [0.2.0] - 03-09-2020

### Changed
- Renamed property returned in `getProcessInfo` from `window_text` to `windowText`

# [0.1.0] - 01-09-2020

### Added
- Created library


text:
---
title: create markdown files and skeleton
published: true
lang: en
position: 100
---

# Create markdown files and skeleton

Scully provides a schematic for adding the plugin needed to read markdown files and create a url for each of them.

```bash
ng g @scullyio/init:markdown
```

This will ask you to complete the config and create/update the files needed to support Markdown skeleton
in your angular app.
Example:

```bash
ng g @scullyio/init:markdown
? What name do you want to use for the module? myMarkdown
? What slug do you want for the markdown file? idFile
? Where do you want to store your markdown files? myMarkdownFolder
? Under which route do you want your files to be requested? md
    ✅ Update scully.t1.config.ts
CREATE src/app/my-markdown/my-markdown-routing.module.ts (439 bytes)
CREATE src/app/my-markdown/my-markdown.component.html (153 bytes)
CREATE src/app/my-markdown/my-markdown.component.spec.ts (657 bytes)
CREATE src/app/my-markdown/my-markdown.component.ts (516 bytes)
CREATE src/app/my-markdown/my-markdown.component.css (131 bytes)
CREATE src/app/my-markdown/my-markdown.module.ts (424 bytes)
UPDATE scully.t1.config.ts (631 bytes)
UPDATE src/app/app-routing.module.ts (634 bytes)
    ✅ Blog ./my-markdown-folder/2020-09-17-my-markdown.md file created
CREATE my-markdown-folder/2020-09-17-my-markdown.md (111 bytes)
```

###### What name do you want to use for the module?

This is the name used to create your angular module.

###### What slug do you want for the markdown file?

This is the slug Scully uses in the Angular router.

###### Where do you want to store your markdown files?

Scully needs to store the markdown files in a folder, so the schematics create the folder
and adds the path to the scully config.

###### Under which route do you want your files to be requested?

This is the route Scully adds in the Angular router.

repository: gammastream/scully

repo_name: gammastream/scully


text:
# @marigold/prettier-config

## 0.3.1

### Patch Changes

- [#2896](https://github.com/marigold-ui/marigold/pull/2896) [`1edd2dff9`](https://github.com/marigold-ui/marigold/commit/1edd2dff93ab8424b422cb1d198292c13fa1affb) Thanks [@sebald](https://github.com/sebald)! - feat: explicitly set tabWidth so it is not overriden by editorconfigs

## 0.3.0

### Minor Changes

- [`f9526234`](https://github.com/marigold-ui/marigold/commit/f9526234257a149b12c14191a524691470da3942) Thanks [@sebald](https://github.com/sebald)! - Improved size in node_modules

repository: marigold-ui/marigold

gha_language: TypeScript

repo_name: marigold-ui/marigold


text:
Invoke the `signOut` api to sign out a user from the Auth category. You can only have one user signed in at a given time.

<inline-fragment platform="android" src="~/lib/auth/fragments/android/signout/10_local_signout.md"></inline-fragment>
<inline-fragment platform="ios" src="~/lib/auth/fragments/ios/signout/10_local_signout.md"></inline-fragment>
<inline-fragment platform="flutter" src="~/lib/auth/fragments/flutter/signout/10_local_signout.md"></inline-fragment>

Calling signOut without any options will just delete the local cache and keychain of the user. If you would like to sign out of all devices, invoke the signOut api with advanced options.

<inline-fragment platform="android" src="~/lib/auth/fragments/android/signout/20_global_signout.md"></inline-fragment>
<inline-fragment platform="ios" src="~/lib/auth/fragments/ios/signout/20_global_signout.md"></inline-fragment>
<inline-fragment platform="flutter" src="~/lib/auth/fragments/flutter/signout/20_global_signout.md"></inline-fragment>

Calling signout with `globalSignOut = true` will invalidate all the Cognito User Pool tokens of the signed in user. If the user is signed into a device, they won't be authorized to perform a task that requires a valid token when a global signout is called from some other device. They need to sign in again to get valid tokens.

<amplify-callout warning>
Global signout functionality does not work if you use one of the web UI sign in methods.
</amplify-callout>

repository: SebastianKurp/docs

repo_name: SebastianKurp/docs


text:
914\. X of a Kind in a Deck of Cards

Easy

You are given an integer array `deck` where `deck[i]` represents the number written on the ith card.

Partition the cards into **one or more groups** such that:

*   Each group has **exactly** `x` cards where `x > 1`, and
*   All the cards in one group have the same integer written on them.

Return `true` _if such partition is possible, or_ `false` _otherwise_.

**Example 1:**

**Input:** deck = [1,2,3,4,4,3,2,1]

**Output:** true

**Explanation:**: Possible partition [1,1],[2,2],[3,3],[4,4].

**Example 2:**

**Input:** deck = [1,1,1,2,2,2,3,3]

**Output:** false

**Explanation:**: No possible partition.

**Constraints:**

*   1 <= deck.length <= 104
*   0 <= deck[i] < 104

repository: javadev/LeetCode-in-Kotlin

gha_language: Kotlin

repo_name: javadev/LeetCode-in-Kotlin


text:
---
title: Stacked Spline Area Charts
page_title: Stacked Spline Area Charts - UI for WinForms Documentation
description: Stacked Spline Area Charts
slug: winforms/chart/understanding-radchart-types/stacked-spline-area-charts
tags: stacked,spline,area,charts
published: True
position: 11
previous_url: chart-undestanding-radchart-types-stacked-spline-area-charts
---

# Stacked Spline Area Charts

##

The Stacked Spline Area chart is a variation of the Spline Area chart. The areas are stacked so that each series adjoins but does not overlap the preceding series.  This contrasts with the Stacked Area chart where each series overlays the preceding series.

To create a simple vertical Stacked Spline Area Chart set the __SeriesOrientation__ property to __Vertical__. Set the RadChart __DefaultType__ property or __ChartSeries.Type__ to __StackedSplineArea__. Create multiple chart series and add chart items with Y or X and Y values.

To create a simple vertical Stacked Spline Area Chart set the __SeriesOrientation__ property to __Horizontal__. Set the RadChart __DefaultType__ property or __ChartSeries.Type__ to __StackedSplineArea__. Create multiple chart series and add chart items with Y or X and Y values.
>caption

![WinForms RadChart Stacked Spline Area Horizontal](images/chart-undestanding-radchart-types-stacked-spline-area-charts001.png)

repository: telerik/winforms-docs

repo_name: telerik/winforms-docs


text:
# chswift

The missing Swift version manager.

## Installation

```bash
$ brew tap neonichu/formulae
$ brew install chswift
```

Amend configuration as advised by the installation procedure.

## Usage

Running without any arguments will show installed Swift versions and the currently selected one:

```bash
$ chswift
 * 1.1 (swift-6<IP_ADDRESS>)
   1.2 (swiftlang-6<IP_ADDRESS> clang-602.0.48)
```

Specify a version number to change the current Swift:

```bash
$ chswift 1.2
$ swift --version
Apple Swift version 1.2 (swiftlang-6<IP_ADDRESS> clang-602.0.48)
Target: x86_64-apple-darwin14.3.0
```

Fall back to the Swift defined by your `xcode-select` configuration:

```bash
$ chswift system
```

You can also configure a local environment in *.swift-version* files:

```bash
$ swift --version
Swift version 1.1 (swift-6<IP_ADDRESS>)
Target: x86_64-apple-darwin14.3.0
$ echo 1.2 >.swift-version
$ swift --version
Apple Swift version 1.2 (swiftlang-6<IP_ADDRESS> clang-602.0.48)
Target: x86_64-apple-darwin14.3.0
```

## Testing

```bash
$ brew install shunit2
$ make test
```

## Thanks

This project is based on ideas and code of the amazing [chruby][1]. If
you are also in the market for a Ruby chooser, you have found it.

[1]: https://github.com/postmodern/chruby

repository: ashfurrow/chswift

repo_name: ashfurrow/chswift


text:
# Change Detection with Multitemporal Polarimetric SAR Imagery

This repo contains the source files for the Docker image mort/sardocker, which wraps
command line versions of several polarimetric SAR Python scripts, most of which are described  the textbook
Canty (2014).
Image Analysis, Classification and Change Detection in Remote Sensing, 3rd Ed., CRC Press 2014. In addition new sequential change
detection scripts implement the algorthms described in
 Conradsen et al. (2016). Determining the points of
change in time series of polarimetric SAR data. IEEE TGRS 54 (5) 3007-3024.

### Installation
 1. Install Docker
 2. In a terminal, run the command
      __sudo docker run -d -p 433:8888 --name=sar -v your_image_directory:/sar/imagery mort/sardocker__
 where *your_image_directory* is the path to your SAR data.
 3. Point your browser to
    __localhost:433__
 4. If asked for a password, enter 'mort'
 5. Click on the  tutorial, or open a new notebook with __New/Python 2__.

repository: Bob-Asian/SARDocker

repo_name: Bob-Asian/SARDocker


text:
original idea:
from the observation you can just add data onto the end of a binary
no elf section necessary and with suitable delimiters
this can also be applied to scripts (prefix with comment chars).
this way file signatures are always available (no separate file)
and will survive most (all?) transport methods (download over http)
unlike file attributes
so it would be something like digsig/bsign

research question:

- is the above (hash/signature as suffix) a feasible solution to storing / validating signed code
  - does this work for compiled executables
  - does this work for scripts / interpreted runtimes (see link in linux ima)
  - how does this compare to existing solutions / work as an extension to existing framework

(incomplete) list of application whitelisting solutions
by platform / developer appname / date active

signed / integrity

- linux / kernel integrity measurement architecture / 2005 - present
  - hash based measurement
  - integration with TPM, measurement + attestation
  - uses filesystem extended attributes
  - possiblity of modifying interpreters to enforce ima for scripts
  - https://marc.info/?l=linux-kernel&m=111682497821375&w=2
- linux / microsoft integrity policy enforcement / 2020 - present
  - linux security module
  - hash based integrity
  - more geared for bootup process? entire filesystem based? no docs
- linux / digsig - bsign / 2002 - 2009
  - kernel module
  - enforcing signed binaries
  - hash / signature in extra ELF section
- macos / apple gatekeeper / 10.7.3 - present
  - enforce signed application
- windows / microsoft applocker / windows 7 - present
  - path, execution context, signed binary
- container / docker content trust / 2015 - present
  - signed docker container, build / execute enforcement
- cloud / google cloud binary authorization / 2018 - present
  - signed docker container, attestation, execute enforcement

path / other

- linux / redhat selinux / 2000 - present
  - linux security module
  - filesystem attribute based mandatory access control
- linux / redhat fapolicyd / 2016 - present
  - linux security module
  - path based application whitelisting
  - integration with selinux
- linux / canonical apparmor / 1998 - present
  - linux security module
  - path based mandatory access control
- windows third party application whitelisting
  - Ivanti Application Control
  - McAfee Application Control
  - Trend Micro Application Control
  - Faronics Anti-Executable
  - Kaspersky Whitelisting
  - Airlock Application Whitelisting
  - Thycotic Application Control
  - ...

repository: erred/uva-ot

repo_name: erred/uva-ot


text:
---
title: Telerik.Web.UI.ContextMenuSettings
page_title: Telerik.Web.UI.ContextMenuSettings
description: Telerik.Web.UI.ContextMenuSettings
---

# Telerik.Web.UI.ContextMenuSettings

This Class defines the ContextMenuSettings object that inherits ObjectWithState.

## Inheritance Hierarchy

* System.Object
* Telerik.Web.UI.ObjectWithState
* Telerik.Web.UI.ContextMenuSettings

## Properties

###  EnableDefault `Boolean`

Gets or sets a value indicating whether to use the integrated context menu.

###  EnableEmbeddedBaseStylesheet `Boolean`

Gets or sets the value, indicating whether to render the link to the embedded base stylesheet of the control or not.

#### Remarks
If EnableEmbeddedBaseStylesheet is set to false you will have to register the needed control base CSS file by hand.

###  EnableEmbeddedScripts `Boolean`

Gets or sets the value, indicating whether to render script references to the embedded scripts or not.

#### Remarks
If EnableEmbeddedScripts is set to false you will have to register the needed Scripts files by hand.

###  EnableEmbeddedSkins `String`

Gets or sets the value, indicating whether to render links to the embedded skins or not.

#### Remarks
If EnableEmbeddedSkins is set to false you will have to register the needed CSS files by hand.

###  Skin `String`

Gets or sets the skin name for the context menu.

#### Remarks
If this property is not set, the control will render using the skin named "Default".
            If EnableEmbeddedSkins is set to false, the control will not render skin.

repository: telerik/ajax-docs

gha_language: C#

repo_name: telerik/ajax-docs


text:
## Hacker Home Mountain View Presents...

![alt text](https://raw.githubusercontent.com/Monkeyanator/MMM-SlackAnnouncements/master/images/sample.png)

# MMM-SlackAnnouncements
MagicMirror2 made.

## Dependencies
  * Must have the core installation of [MagicMirror2](https://github.com/MichMich/MagicMirror)

## Usage

Point the module at the desired Slack `channel` (not the channel name, but the ID) and give it a `slackToken` with valid permissions (authorized to read channel histories), and it will display the latest message on the channel on your mirror as an announcement.

## Installation
 1. Clone this repo into `~/MagicMirror/modules` directory.
 2. Configure your `~/MagicMirror/config/config.js`:

     ```
     {
         module: 'MMM-SlackAnnouncements',
         position: 'top_right',
         config: {
                // See 'Configuration options' for more information.
            }
     }
     ```

## Configuration Options
| **Option** | **Default** | **Description** |
| --- | --- | --- |
| `title` | `Announcements` | Title for the module |
| `updateMs` | `3000` | Milliseconds in between announcement message refresh |
| `channel` | `[MUST SET]` | Slack channel to listen for announcements on |
| `slackToken` | `[MUST SET]` | Slack API token (must be authorized for channel.history) |

repository: Monkeyanator/MMM-SlackAnnouncements

repo_name: Monkeyanator/MMM-SlackAnnouncements


text:
# monocle

Logs => rabbitmq (for use with elasticsearch-rabbitmq-river).

## Usage

Coming!

## License

Copyright © 2012 Andrew A. Raines

Distributed under the MIT license.  Thanks to
[Sonian](http://www.sonian.com) for supporting free software.

repository: drewr/monocle

repo_name: drewr/monocle


text:
bigReals
========

node.js native c/c++ addon using [gmp](http://gmplib.org/) and [mpfr](http://www.mpfr.org/) to perform fast, infinite precision,
loop-optimized calculations and bit manipulations over big integers and big irrationals numbers.

In a nutshell, bigReals offers the following features:

   * Easy and fast modular arithmetics.
   * Comprehensive trigonometric, exponentiation and logarithm functions.
   * Special numbers support(NaN, Infinity, log2, Pi, Euler's and Catalan's constants).
   * Loop optimized functions to speed up calculation from Javascript.
   * Precision of irrationals calculations is chosen based on the highest between the operand's precision if none is provided as argument.

bigReals is the addon used by [cryptatoo](https://github.com/dfmadrid/cryptatoo) to perform cryptographic analysis and attacks over
large numbers like RSA keys of 1024 bits. bigReals is a work in progress, currently integer and irrationals support is fully operational but
new functions and improvements will be added in future versions.

Installation
------------
An *npm* package will be created when bigReals arrives to version 1.0. Meanwhile, you can install bigReals cloning from github:

    $ cd node_modules
    $ git clone git://github.com/dfmadrid/bigreals.git
    $ cd bigreals
    $ npm install

Check the [documentation](doc/manual.md) for more info about compatibility and installation in the different platforms.

Testing
-------
A complete battery of tests is included under directory test. To run all tests, execute npm test:

    $ npm test

To run a specific test, execute it with node:

    $ node test/modular

Documentation
-------------
Under folder *doc* you could find the [bigReals manual](doc/manual.md) with a complete description of bigReals interface and many basic examples.
bigReals source code is verboselly commented as well to favour collaboration in development.

Examples
--------
Under folder *examples* you could find more ellaborated examples of bigReal number usage like hash table creation and lookup.

Contributions
-------------
If you have any idea, performance improvement or function missing particularly related to cryptography or number theory that
would be interesting to have included in bigReals, open a pull request in Github. If you find a bug, please open an issue on
Github with the steps to reproduce it.

License
-------
(The MIT License)

Copyright (c) 2013 David Fernández Madrid<EMAIL_ADDRESS>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

repository: dfmadrid/bigreals

repo_name: dfmadrid/bigreals


text:
# Disc-Hax
A powerful multi-purpose discord bot!
[![CodeFactor](https://www.codefactor.io/repository/github/jfronny/disc-hax/badge)](https://www.codefactor.io/repository/github/jfronny/disc-hax)
[![Discord](https://img.shields.io/discord/466965965658128384?label=Discord)](https://discord.gg/UjhHBqt)

### Features
Read [this](https://jfronny.github.io/Disc-Hax) for a somewhat complete list of features (that page is updated automatically by MDExtractor, see https://github.com/JFronny/Disc-Hax/tree/master/MDExtractor)

### Projects in this Repository
The main projects are "Shared" (somewhat reusable snippets, independent from the actual bot code for better structure) and "Bot" (the main bot project)

There is also MDExtractor. This is used to generate the documentation with reflection. MDExtractor is executed with [this](https://github.com/JFronny/Disc-Hax/blob/master/.github/workflows/docs.yml) script after any pushed commit

All other projects are experiments for some features. They are stand-alone projects that can be ran independently from other projects
# IMPORTANT
Now hosted on [GitLab](https://gitlab.com/JFronny/Disc-Hax)

repository: JFronny/Disc-Hax

repo_name: JFronny/Disc-Hax


text:
# islam-in-daily-life
Type: Android App. (To be listed in Google play store)

Content Language: Bangla.

Topic: A practical and most common situational Islamic rules and aqidah for daily life.

repository: tradecoder/islam-in-daily-life

repo_name: tradecoder/islam-in-daily-life


text:
Contributing
===

Thank you for your interest in participating in the React Credit Cards project. We're happy to have you here.

**NOTE:** Please note that this project is released with a [Contributor Code of Conduct](code-of-conduct.md). By participating in this project you agree to abide by its terms.

### Reporting Bugs
Before creating bug reports, please check the [issues](https://github.com/amarofashion/react-credit-cards/issues) as you might find out that you don't need to create one. When you are creating a bug report, please include as many details as possible.

### How to contribute?

1. Fork this repo to your account then clone it to your environment.
1. Run `npm install` to get things going.
1. Replicate the issue you're trying to fix or spec out the feature you're trying to add. Understanding the scope of what you're fixing or adding is important and upfront thought helps.
1. Change the code to fix the bug or add the feature. All changes should happen in the relevant `*.jsx` and `*.scss` files in the `/src` directory.
1. Verify that your fix or feature works locally.
1. Run `npm run precommit` to lint all the files and run the tests
1. Run `npm run build` to bundle the production files.
1. Commit your changes with an informative description. Do not make a single commit for big updates.
1. Open a pull request to the primary repo with your new commits and a descriptive message about what the PR does.

### Running the code locally
- Download the demo source from [codesandbox](https://codesandbox.io/s/ovvwzkzry9) and install the dependencies
- Link your local repo into the demo source code. Check [npm-link](https://docs.npmjs.com/cli/link.html) for instructions.

### What can I contribute?

Check out the [issues](https://github.com/amarofashion/react-credit-cards/issues) for a comprehensive list of unfixed bugs and desired features.

repository: github-clonner/react-credit-cards

gha_language: CSS

repo_name: github-clonner/react-credit-cards


text:
# 1pm-t3-course-recommender

## Project name: **UCSB Course Recommender Application**

### Description:
A web application that helps CS students choose their course by listing a list of major courses and GE courses that they can take to count towards their graduation.
The web app will prompt the user to select their previously completed courses. Then, using the list of courses from UCSB Developer API, the app will return a list
of courses offered next quarter that they fulfill the prequisites for and are able to take the following quarter.

User role: As a student, I can use this web application to get a list of both major courses and GE courses offered at this quarter to count towards my graduation.

### Team info:

Jiarui (Jack) Zhu: gitzhujiarui

Zhiyun Zhang: JessicaZng

Ruxin Zhang: ruxin827

Justin Surmani: justinsurmani

Chandler Ott: chandlerott

Tech Stack: React + Springboot, deployed on Heroku

## Deployment

https://ucsb-course-recommender.herokuapp.com/

## Installation
see in ./docs/DEPLOY.md

https://github.com/ucsb-cs148-s21/1pm-t3-course-recommender/blob/main/docs/DEPLOY.md

## MVP Version
### MVP Functionality
- The first page holds a list of courses offered by computer science department regularly
- The second page is a quiz for the user to check off the courses they have already taken to give out an personal schedule planning suggestion
- The personal schedule planning suggestion will be showed up on the third page

### MVP Known Problems
* Ensure Java version on local machine is compatible. If you get a build failure when running springboot-backend, check the `pom.xml` file and look for java properties tag. There, you can check if your installed version of java is compatible, or else you can change it down to 11 or 14 if required.
* Current Algorithm still need some improvement to achieve a better performance on giving out plans based on the personal information
* A more established database will be updated soon!

## Final Version

### Final Functionality
- The initial landing page contains a description of the application and a link to view courses offered next quarter or take the course survey
- The course list page shows a list of all computer science courses offered next quarter taken directly from the UCSB Developer API
- The course survey page has a check list of all important prerequisite courses for the CS major, upon completion you will be redirected to the recommended courses page
- The recommended courses page offers a list of courses you are eligible to take based on the information you provided in the course survey
- The profile page is available after logging in to the application with your @ucsb.edu email
### Final Known Problems
* Current survey algorithm could be improved to fix the problem of equivalent prerequisites not shown in the course survey

## Contributing!
We are happy to embrace any contributions~
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3.  Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D

## Materials for Final version 2.0 release

### Design Document
https://docs.google.com/document/d/1zcPZ-XNMXE1buxg1-PtYqenhxwRqQR91ucPJp0PrHEs/edit?usp=sharing

### User Manual
https://docs.google.com/document/d/1DYoyfdU3NEk_y0oyIznjWPXkmXzYKl6xjlp__9z-V4k/edit?usp=sharing

### Final Presentation link
https://youtu.be/kpc7oCals_k

## License
We integrated the MIT license, which can be checked out in a file called: `License.txt`


text:
Yii2 Kendo UI Extension
=========================

This is the Kendo UI extension for Yii 2. It encapsulates Kendo UI components in terms of Yii widgets,
and thus makes using this components in Yii applications extremely easy

[![Build Status](https://travis-ci.org/solutosoft/yii2-kendoui.svg?branch=master)](https://travis-ci.org/solutosoft/yii2-kendoui)

Installation
------------

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist solutosoft/yii2-kendoui "*"
```

or add

```
"solutosoft/yii2-kendoui": "*"
```

to the require section of your `composer.json` file.


text:
# PostgreSQL
[✏](https://github.com/meleu/my-notes/edit/master/postgresql.md)

## install via docker

PostgreSQL container: [https://hub.docker.com/_/postgres](https://hub.docker.com/_/postgres)

Installing:
```
docker run --name database -e POSTGRES_PASSWORD=docker -p 5432:5432 -d postgres
```

**Note**: in the option `-p`, the first number is the port of the host machine, and the number after `:` is the container's port.

### Postbird

https://www.electronjs.org/apps/postbird

It's a nice GUI client for PostgreSQL.

Once connected to a PostgreSQL DB through Postbird, create a database (leave `template` blank and for `encoding` use UTF8).

repository: baselrabia/my-notes

repo_name: baselrabia/my-notes


text:
# Learn Python Programming Masterclass

<img height="24" width="24" src="https://upload.wikimedia.org/wikipedia/commons/c/c3/Python-logo-notext.svg" /> Language: Python 3.7/3.8.2
🔗 Course: [Learn Python Programming Masterclass](https://www.udemy.com/course/python-the-complete-python-developer-course/) by Tim Buchalka's Learn Programming Academy

## General Description

This repository contains a collection of exercises and projects completed while going through the [Learn Python Programming Masterclass](https://www.udemy.com/course/python-the-complete-python-developer-course/) by Tim Buchalka's Learn Programming Academy. The course covers Python fundamentals, data structures, I/O, modules, functions, and more.

## Topics Covered

- Stepping into the world of Python
- Program Flow Control in Python
- Lists, Ranges & Tuples in Python
- The binary number system explained
- Python Dictionaries and Sets
- Input and Output (I/O) in Python
- Modules and Functions in Python
- Object Oriented Python (in progress)
- Using Databases in Python (in progress)
- Generators, Comprehensions and Lambda Expressions (in progress)
- Packages (in progress)

## Usage

1. Clone the repository
2. Navigate to the desired project folder
3. Run the Python files using Python 3.7 or 3.8.2

## License

This project is licensed under the MIT License - see the LICENSE file for details.


text:
# 3D surface normal estimation from a single color image

This is a [torch](https://github.com/torch) implementation of FCN with short-cut link and a forced same sampling mask for up/down sampling. It has been demonstrated to work well for tasks that require estimating per-pixel values. Please go to http://pbrs.cs.princeton.edu and the following paper for more information. If you use this code, please cite:

	@article{zhang2016physically,
	  title={Physically-Based Rendering for Indoor Scene Understanding Using Convolutional Neural Networks},
	  author={Zhang, Yinda and Song, Shuran and Yumer, Ersin and Savva, Manolis and Lee, Joon-Young and Jin, Hailin and Funkhouser, Thomas},
	  journal={The IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
	  year={2017}
	}

Please contact me (yindaz AT cs DOT princeton DOT edu) if you have any problem in using the code/data/model.

## Testing
You need to specify the `-test_file` in [`config.lua`](./config.lua) with a list of file names pointing to the images you are testing. [`./image/`](./image/) provides an example.

We provide several pretrained models for testing. You can download them in [`./model/`](./model/).

Run
```
th main_test.lua -test_model ./model/sync_physic_nyufinetune.t7
```
and the result will be in [`./result/`](./result/). The estimated normal will be saved in 8-bit PNG format (the ground truth for training is in 16-bit), where [0,255] in R,G,B channel corresponds to [-1,1] for the X,Y,Z component of the unit normal vector. We use the camera coordinates defined as - X points to the camera right, Y points to the camera forward, and Z points to the camera upward. For example, right facing wall are very red, floor are very blue, and you rarely see green as it's parallel to the camera viewing direction.

## Training
You need to specify the `-train_file` in [`config.lua`](./config.lua) first.

Run
```
th main_train_single.lua -ps ./model/train_example
```
The training process will start, and snapshots will be saved as `./model/train_example_iter_xxx.t7`. To finetune a model, run
```
th main_train_single.lua -finetune -finetune_model ./model/train_example.t7 -ps ./model/train_finetune_example
```

## Data
To train on synthetic image, you can find the training data from http://pbrs.cs.princeton.edu. Specifically,
- `Color image`: http://pbrs.cs.princeton.edu/pbrs_release/data/mlt_v2.zip (278GB)
- `Surface normal ground truth`: http://pbrs.cs.princeton.edu/pbrs_release/data/normal_v2.zip (27GB)
- `Data list`: http://pbrs.cs.princeton.edu/pbrs_release/data/data_goodlist_v2.txt

To experiment on NYUv2 data,
- `Color image and ground truth`: http://pbrs.cs.princeton.edu/pbrs_release/nyu/nyu_data.zip. This file is converted using data from http://www.cs.nyu.edu/~deigen/dnl/ and http://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html
- `Training data list`: http://pbrs.cs.princeton.edu/pbrs_release/nyu/trainNdxs.txt
- `Testing data list`: http://pbrs.cs.princeton.edu/pbrs_release/nyu/testNdxs.txt


text:
# API Documentation

*(generated from source files using `make doc-api)`*

### Philosophy

The `store` API is mostly events based. As a user of this plugin,
you will have to register listeners to changes happening to the products
you register.

The core of the listening mechanism is the [`when()`](#when) method. It allows you to
be notified of changes to one or a set of products using a [`query`](#queries) mechanism:
```js
    store.when("product").updated(refreshScreen);
    store.when("full version").owned(unlockApp);
    store.when("subscription").approved(serverCheck);
    store.when("downloadable content").downloaded(showContent);
    etc.
```

The `updated` event is fired whenever one of the fields of a product is
changed (its `owned` status for instance).

This event provides a generic way to track the statuses of your purchases,
to unlock features when needed and to refresh your views accordingly.

### Registering products

The store needs to know the type and identifiers of your products before you
can use them in your code.

Use [`store.register()`](#register) before your first call to
[`store.refresh()`](#refresh).

Once registered, you can use [`store.get()`](#get) to retrieve
the [`product object`](#product) from the store.

```js
    store.register({
      id: "cc.fovea.purchase.consumable1",
      alias: "100 coins",
      type: store.CONSUMABLE
    });
    ...
    var p = store.get("100 coins");
    // or
    var p = store.get("cc.fovea.purchase.consumable1");
```

The product `id` and `type` have to match products defined in your
Apple and Google developer consoles.

Learn how to do that in [HOWTO: Create New Products](https://github.com/j3k0/cordova-plugin-purchase/wiki/HOWTO#create-new-products).

### Displaying products

Right after you registered your products, nothing much is known about them
except their `id`, `type` and an optional `alias`.

When you perform the initial [`refresh()`](#refresh) call, the store's server will
be contacted to load informations about the registered products: human
readable `title` and `description`, `price`, etc.

This isn't an optional step as some despotic store owners (like Apple) require you
to display information about a product as retrieved from their server: no
hard-coding of price and title allowed! This is also convenient for you
as you can change the price of your items knowing that it'll be reflected instantly
on your clients' devices.

However, the information may not be available when the first view that needs
them appears on screen. For you, the best option is to have your view monitor
changes made to the product.

#### monitor changes

Let's demonstrate this with an example:

```js
    // method called when the screen showing your purchase is made visible
    function show() {
        render();
        store.when("cc.fovea.test1").updated(render);
    }

    function render() {

        // Get the product from the pool.
        var product = store.get("cc.fovea.test1");

        if (!product) {
            $el.html("");
        }
        else if (product.state === store.REGISTERED) {
            $el.html("<div class=\"loading\" />");
        }
        else if (product.state === store.INVALID) {
            $el.html("");
        }
        else {
            // Good! Product loaded and valid.
            $el.html(
                  "<div class=\"title\">"       + product.title       + "</div>"
                + "<div class=\"description\">" + product.description + "</div>"
                + "<div class=\"price\">"       + product.price       + "</div>"
            );

            // Is this product owned? Give him a special class.
            if (product.owned)
                $el.addClass("owned");
            else
                $el.removeClass("owned");

            // Is an order for this product in progress? Can't be ordered right now?
            if (product.canPurchase)
                $el.addClass("can-purchase");
            else
                $el.removeClass("can-purchase");
        }
    }

    // method called when the view is hidden
    function hide() {
        // stop monitoring the product
        store.off(render);
    }
```

In this example, `render` redraw the purchase element whatever
happens to the product. When the view is hidden, we stop listening to changes
(`store.off(render)`).

###  Purchasing

#### initiate a purchase

Purchases are initiated using the [`store.order()`](#order) method.

The store will manage the internal purchase flow that'll end:

 - with an `approved` [event](#events). The product enters the `APPROVED` state.
 - with a `cancelled` [event](#events). The product gets back to the `VALID` state.
 - with an `error` [event](#events). The product gets back to the `VALID` state.

See [product life-cycle](#life-cycle) for details about product states.

#### finish a purchase

Once the transaction is approved, the product still isn't owned: the store needs
confirmation that the purchase was delivered before closing the transaction.

To confirm delivery, you'll use the [`product.finish()`](#finish) method.

#### example usage

During initialization:
```js
store.when("extra chapter").approved(function(product) {
    // download the feature
    app.downloadExtraChapter().then(function() {
        product.finish();
    });
});
```

When the purchase button is clicked:
```js
store.order("full version");
```

#### un-finished purchases

If your app wasn't able to deliver the content, `product.finish()` won't be called.

Don't worry: the `approved` event will be re-triggered the next time you
call [`store.refresh()`](#refresh), which can very well be the next time
the application starts. Pending transactions are persistant.

#### simple case

In the most simple case, where:

 - delivery of purchases is only local ;
 - you don't want to implement receipt validation ;

you may just want to finish all purchases automatically. You can do it this way:
```js
store.when("product").approved(function(p) {
    p.finish();
});
```

NOTE: the "product" query will match any purchases (see [here](#queries) to learn more details about queries).

### Receipt validation

Some unthoughtful users will try to use fake "purchases" to access features
they should normally pay for. If that's a concern, you should implement
receipt validation, ideally server side validation.

When a purchase has been approved by the store, it's enriched with
[transaction](#transactions) information (`product.transaction` attribute).

To verfify a purchase you'll have to do three things:

 - configure the [validator](#validator).
 - call [`product.verify()`](#verify) from the `approved` event,
   before finishing the transaction.
 - finish the transaction when transaction is `verified`.

#### example using a validation URL

```js
store.validator = "http://<IP_ADDRESS>:1980/check-purchase";

store.when("my stuff").approved(function(product) {
    product.verify();
});

store.when("my stuff").verified(function(product) {
    product.finish();
});
```

For an example using a validation callback instead, see the documentation of [the validator method](#validator).

### Subscriptions

For subscription, you MUST implement remote [receipt validation](#receipt-validation).

If the validator returns a `store.PURCHASE_EXPIRED` error code, the subscription will
automatically loose its `owned` status.

Typically, you'll enable and disable access to your content this way.
```js
store.when("cc.fovea.subcription").updated(function(product) {
    if (product.owned)
        app.subscriberMode();
    else
        app.guestMode();
});
```

# *store* object ##

`store` is the global object exported by the purchase plugin.

As with any other plugin, this object shouldn't be used before
the "deviceready" event is fired. Check cordova's documentation
for more details if needed.

Find below all public attributes and methods you can use.

## *store.verbosity*

The `verbosity` property defines how much you want `store.js` to write on the console. Set to:

 - `store.QUIET` or `0` to disable all logging (default)
 - `store.ERROR` or `1` to show only error messages
 - `store.WARNING` or `2` to show warnings and errors
 - `store.INFO` or `3` to also show information messages
 - `store.DEBUG` or `4` to enable internal debugging messages.

See the [logging levels](#logging-levels) constants.
## *store.sandbox*

The `sandbox` property defines if you want to invoke the platform purchase sandbox

- Windows will use the IAP simulator if true (see Windows docs)
- Android: NOT IN USE
- iOS: NOT IN USE

## Constants

### product types

    store.FREE_SUBSCRIPTION         = "free subscription";
    store.PAID_SUBSCRIPTION         = "paid subscription";
    store.NON_RENEWING_SUBSCRIPTION = "non renewing subscription";
    store.CONSUMABLE                = "consumable";
    store.NON_CONSUMABLE            = "non consumable";

### error codes

    store.ERR_SETUP               = ERROR_CODES_BASE + 1; //
    store.ERR_LOAD                = ERROR_CODES_BASE + 2; //
    store.ERR_PURCHASE            = ERROR_CODES_BASE + 3; //
    store.ERR_LOAD_RECEIPTS       = ERROR_CODES_BASE + 4;
    store.ERR_CLIENT_INVALID      = ERROR_CODES_BASE + 5;
    store.ERR_PAYMENT_CANCELLED   = ERROR_CODES_BASE + 6; // Purchase has been cancelled by user.
    store.ERR_PAYMENT_INVALID     = ERROR_CODES_BASE + 7; // Something suspicious about a purchase.
    store.ERR_PAYMENT_NOT_ALLOWED = ERROR_CODES_BASE + 8;
    store.ERR_UNKNOWN             = ERROR_CODES_BASE + 10; //
    store.ERR_REFRESH_RECEIPTS    = ERROR_CODES_BASE + 11;
    store.ERR_INVALID_PRODUCT_ID  = ERROR_CODES_BASE + 12; //
    store.ERR_FINISH              = ERROR_CODES_BASE + 13;
    store.ERR_COMMUNICATION       = ERROR_CODES_BASE + 14; // Error while communicating with the server.
    store.ERR_SUBSCRIPTIONS_NOT_AVAILABLE = ERROR_CODES_BASE + 15; // Subscriptions are not available.
    store.ERR_MISSING_TOKEN       = ERROR_CODES_BASE + 16; // Purchase information is missing token.
    store.ERR_VERIFICATION_FAILED = ERROR_CODES_BASE + 17; // Verification of store data failed.
    store.ERR_BAD_RESPONSE        = ERROR_CODES_BASE + 18; // Verification of store data failed.
    store.ERR_REFRESH             = ERROR_CODES_BASE + 19; // Failed to refresh the store.
    store.ERR_PAYMENT_EXPIRED     = ERROR_CODES_BASE + 20;
    store.ERR_DOWNLOAD            = ERROR_CODES_BASE + 21;
    store.ERR_SUBSCRIPTION_UPDATE_NOT_AVAILABLE = ERROR_CODES_BASE + 22;

### product states

    store.REGISTERED = 'registered';
    store.INVALID    = 'invalid';
    store.VALID      = 'valid';
    store.REQUESTED  = 'requested';
    store.INITIATED  = 'initiated';
    store.APPROVED   = 'approved';
    store.FINISHED   = 'finished';
    store.OWNED      = 'owned';
    store.DOWNLOADING = 'downloading';
    store.DOWNLOADED = 'downloaded';

### logging levels

    store.QUIET   = 0;
    store.ERROR   = 1;
    store.WARNING = 2;
    store.INFO    = 3;
    store.DEBUG   = 4;

### validation error codes

    store.INVALID_PAYLOAD   = 6778001;
    store.CONNECTION_FAILED = 6778002;
    store.PURCHASE_EXPIRED  = 6778003;
## *store.Product* object ##

Most events methods give you access to a `product` object.

Products object have the following fields and methods.

### *store.Product* public attributes

 - `product.id` - Identifier of the product on the store
 - `product.alias` - Alias that can be used for more explicit [queries](#queries)
 - `product.type` - Family of product, should be one of the defined [product types](#product-types).
 - `product.state` - Current state the product is in (see [life-cycle](#life-cycle) below). Should be one of the defined [product states](#product-states)
 - `product.title` - Localized name or short description
 - `product.description` - Localized longer description
 - `product.priceMicros` - Localized price, in micro-units. Available only on Android
 - `product.price` - Localized price, with currency symbol
 - `product.currency` - Currency code (optionaly)
 - `product.loaded` - Product has been loaded from server, however it can still be either `valid` or not
 - `product.valid` - Product has been loaded and is a valid product
 - `product.canPurchase` - Product is in a state where it can be purchased
 - `product.owned` - Product is owned
 - `product.downloading` - Product is downloading non-consumable content
 - `product.downloaded` - Non-consumable content has been successfully downloaded for this product
 - `product.additionalData` - additional data possibly required for product purchase
 - `product.transaction` - Latest transaction data for this product (see [transactions](#transactions)).

### *store.Product* public methods

#### `product.finish()` ##

Call `product.finish()` to confirm to the store that an approved order has been delivered.
This will change the product state from `APPROVED` to `FINISHED` (see [life-cycle](#life-cycle)).

As long as you keep the product in state `APPROVED`:

 - the money may not be in your account (i.e. user isn't charged)
 - you will receive the `approved` event each time the application starts,
   where you should try again to finish the pending transaction.

##### example use
```js
store.when("product.id").approved(function(product){
    // synchronous
    app.unlockFeature();
    product.finish();
});
```

```js
store.when("product.id").approved(function(product){
    // asynchronous
    app.downloadFeature(function() {
        product.finish();
    });
});
```
#### `product.verify()` ##

Initiate purchase validation as defined by the [`store.validator`](#validator).

##### return value
A Promise with the following methods:

 - `done(function(product){})`
   - called whether verification failed or succeeded.
 - `expired(function(product){})`
   - called if the purchase expired.
 - `success(function(product, purchaseData){})`
   - called if the purchase is valid and verified.
   - `purchaseData` is the device dependent transaction details
     returned by the validator, which you can most probably ignore.
 - `error(function(err){})`
   - validation failed, either because of expiry or communication
     failure.
   - `err` is a [store.Error object](#errors), with a code expected to be
     `store.ERR_PAYMENT_EXPIRED` or `store.ERR_VERIFICATION_FAILED`.

### life-cycle

A product will change state during the application execution.

Find below a diagram of the different states a product can pass by.

    REGISTERED +--> INVALID
               |
               +--> VALID +--> REQUESTED +--> INITIATED +-+
                                                          |
                    ^      +------------------------------+
                    |      |
                    |      |             +--> DOWNLOADING +--> DOWNLOADED +
                    |      |             |                                |
                    |      +--> APPROVED +--------------------------------+--> FINISHED +--> OWNED
                    |                                                             |
                    +-------------------------------------------------------------+

#### states definitions

 - `REGISTERED`: right after being declared to the store using [`store.register()`](#register)
 - `INVALID`: the server didn't recognize this product, it cannot be used.
 - `VALID`: the server sent extra information about the product (`title`, `price` and such).
 - `REQUESTED`: order (purchase) requested by the user
 - `INITIATED`: order transmitted to the server
 - `APPROVED`: purchase approved by server
 - `FINISHED`: purchase delivered by the app (see [Finish a Purchase](#finish-a-purchase))
 - `OWNED`: purchase is owned (only for non-consumable and subscriptions)
 - `DOWNLOADING` purchased content is downloading (only for non-consumable)
 - `DOWNLOADED` purchased content is downloaded (only for non-consumable)

#### Notes

 - When finished, a consumable product will get back to the `VALID` state, while other will enter the `OWNED` state.
 - Any error in the purchase process will bring a product back to the `VALID` state.
 - During application startup, products may go instantly from `REGISTERED` to `APPROVED` or `OWNED`, for example if they are purchased non-consumables or non-expired subscriptions.
 - Non-Renewing Subscriptions are iOS products only. Please see the [iOS Non Renewing Subscriptions documentation](https://github.com/j3k0/cordova-plugin-purchase/blob/master/doc/ios.md#non-renewing) for a detailed explanation.

#### state changes

Each time the product changes state, appropriate events is triggered.

Learn more about events [here](#events) and about listening to events [here](#when).

## *store.Error* object

All error callbacks takes an `error` object as parameter.

Errors have the following fields:

 - `error.code` - An integer [error code](#error-codes). See the [error codes](#error-codes) section for more details.
 - `error.message` - Human readable message string, useful for debugging.

## *store.error(callback)*

Register an error handler.

`callback` is a function taking an [error](#errors) as argument.

### example use:

    store.error(function(e){
        console.log("ERROR " + e.code + ": " + e.message);
    });

### alternative usage

 - `store.error(code, callback)`
   - only call the callback for errors with the given error code.
   - **example**: `store.error(store.ERR_SETUP, function() { ... });`

### unregister the error callback
To unregister the callback, you will use [`store.off()`](#off):
```js
var handler = store.error(function() { ... } );
...
store.off(handler);
```

## *store.register(product)*
Add (or register) a product into the store.

A product can't be used unless registered first!

Product is an object with fields :

 - `id`
 - `type`
 - `alias` (optional)

See documentation for the [product](#product) object for more information.

##### example usage

```js
store.register({
    id: "cc.fovea.inapp1",
    alias: "full version",
    type: store.NON_CONSUMABLE
});
```

### Reserved keywords
Some reserved keywords can't be used in the product `id` and `alias`:

 - `product`
 - `order`
 - `registered`
 - `valid`
 - `invalid`
 - `requested`
 - `initiated`
 - `approved`
 - `owned`
 - `finished`
 - `downloading`
 - `downloaded`
 - `refreshed`

## *store.get(id)*
Retrieve a [product](#product) from its `id` or `alias`.

##### example usage
```js
    var product = store.get("cc.fovea.product1");
```

## *store.when(query)*

Register a callback for a product-related event.

### return value

Return a Promise with methods to register callbacks for
product events defined below.

#### events

 - `loaded(product)`
   - Called when [product](#product) data is loaded from the store.
 - `updated(product)`
   - Called when any change occured to a product.
 - `error(err)`
   - Called when an [order](#order) failed.
   - The `err` parameter is an [error object](#errors)
 - `approved(product)`
   - Called when a product [order](#order) is approved.
 - `owned(product)`
   - Called when a non-consumable product or subscription is owned.
 - `cancelled(product)`
   - Called when a product [order](#order) is cancelled by the user.
 - `refunded(product)`
   - Called when an order is refunded by the user.
 - Actually, all other product states have their promise
   - `registered`, `valid`, `invalid`, `requested`,
     `initiated` and `finished`
 - `verified(product)`
   - Called when receipt validation successful
 - `unverified(product)`
   - Called when receipt verification failed
 - `expired(product)`
   - Called when validation find a subscription to be expired
 - `downloading(product, progress, time_remaining)`
   - Called when content download is started
 - `downloaded(product)`
   - Called when content download has successfully completed

### alternative usage

 - `store.when(query, action, callback)`
   - Register a callback using its action name. Beware that this is more
     error prone, as there are not gonna be any error in case of typos.

```js
store.when("cc.fovea.inapp1", "approved", function(product) { ... });
```

### unregister a callback

To unregister a callback, use [`store.off()`](#off).

## queries

The [`when`](#when) and [`once`](#once) methods take a `query` parameter.
Those queries allow to select part of the products (or orders) registered
into the store and get notified of events related to those products.

No filters:

 - `"product"` or `"order"` - for all products.

Filter by product types:

 - `"consumable"` - all consumable products.
 - `"non consumable"` - all non consumable products.
 - `"subscription"` - all subscriptions.
 - `"free subscription"` - all free subscriptions.
 - `"paid subscription"` - all paid subscriptions.

Filter by product state:

 - `"valid"` - all products in the VALID state.
 - `"invalid"` - all products in the INVALID state.
 - `"owned"` - all products in the OWNED state.
 - etc. (see [here](#product-states) for all product states).

Filter individual products:

 - `"PRODUCT_ID"` - product with the given product id (replace by your own product id)
 - `"ALIAS"` - product with the given alias

Notice that you can add the "product" and "order" keywords anywhere in your query,
it won't change anything but may seem nicer to read.

#### example

 - `"consumable order"` - all consumable products
 - `"full version"` - the `alias` of a registered [`product`](#product)
 - `"order cc.fovea.inapp1"` - the `id` of a registered [`product`](#product)
   - equivalent to just `"cc.fovea.inapp1"`
 - `"invalid product"` - an invalid product
   - equivalent to just `"invalid"`

## *store.once(query)*

Identical to [`store.when`](#when), but the callback will be called only once.
After being called, the callback will be unregistered.

### alternative usage

 - `store.once(query, action, callback)`
   - Same remarks as `store.when(query, action, callback)`

## *store.order(product, additionalData)*

Initiate the purchase of a product.

The `product` argument can be either:

 - the `store.Product` object
 - the product `id`
 - the product `alias`

The `additionalData` argument can be either:
 - null
 - object with attribute `oldPurchasedSkus`, a string array with the old subscription to upgrade/downgrade on Android. See: [android developer](https://developer.android.com/google/play/billing/billing_reference.html#upgrade-getBuyIntentToReplaceSkus) for more info
 - object with attribute `developerPayload`, string representing the developer payload as described in [billing best practices](https://developer.android.com/google/play/billing/billing_best_practices.html)

See the ["Purchasing section"](#purchasing) to learn more about
the purchase process.

### return value

`store.order()` returns a Promise with the following methods:

 - `then` - called when the order was successfully initiated
 - `error` - called if the order couldn't be initiated

As usual, you can unregister the callbacks by using [`store.off()`](#off).

## *store.ready(callback)*
Register the `callback` to be called when the store is ready to be used.

If the store is already ready, `callback` is executed immediately.

`store.ready()` without arguments will return the `ready` status.

### alternate usage (internal)

`store.ready(true)` will set the `ready` status to true,
and call the registered callbacks.
## *store.off(callback)*
Unregister a callback. Works for callbacks registered with `ready`, `when`, `once` and `error`.

Example use:

```js
    var fun = function(product) {
        // Product loaded while the store screen is visible.
        // Refresh some stuff.
    };

    store.when("product").loaded(fun);
    ...
    [later]
    ...
    store.off(fun);
```

##  *store.validator*
Set this attribute to either:

 - the URL of your purchase validation service
    - Fovea's [reeceipt](http://reeceipt.fovea.cc) or your own service.
 - a custom validation callback method

#### example usage

```js
store.validator = "http://store.fovea.cc:1980/check-purchase";
```

```js
store.validator = function(product, callback) {

    callback(true, { ... transaction details ... }); // success!

    // OR
    callback(false, {
        code: store.PURCHASE_EXPIRED,
        error: {
            message: "XYZ"
        }
    });

    // OR
    callback(false, "Impossible to proceed with validation");

    // Here, you will typically want to contact your own webservice
    // where you check transaction receipts with either Apple or
    // Google servers.
});
```
Validation error codes are [documented here](#validation-error-codes).

## transactions

A purchased product will contain transaction information that can be
sent to a remote server for validation. This information is stored
in the `product.transaction` field. It has the following format:

- `type`: "ios-appstore" or "android-playstore"
- store specific data

Refer to [this documentation for iOS](https://developer.apple.com/library/ios/releasenotes/General/ValidateAppStoreReceipt/Chapters/ReceiptFields.html#//apple_ref/doc/uid/TP40010573-CH106-SW1).

Start [here for Android](https://developer.android.com/google/play/billing/billing_integrate.html#billing-security).

Another option is to use [Fovea's reeceipt validation service](http://reeceipt.fovea.cc/) that implements all the best practices to secure your transactions.

## *store.refresh()*

After you're done registering your store's product and events handlers,
time to call `store.refresh()`.

This will initiate all the complex behind-the-scene work, to load product
data from the servers and restore whatever already have been
purchased by the user.

Note that you can call this method again later during the application
execution to re-trigger all that hard-work. It's kind of expensive in term of
processing, so you'd better consider it twice.

One good way of doing it is to add a "Refresh Purchases" button in your
applications settings. This way, if delivery of a purchase failed or
if a user wants to restore purchases he made from another device, he'll
have a way to do just that.

##### example usage

```js
   // ...
   // register products and events handlers here
   // ...
   //
   // then and only then, call refresh.
   store.refresh();
```

##### restore purchases example usage

Add a "Refresh Purchases" button to call the `store.refresh()` method, like:

`<button onclick="store.refresh()">Restore Purchases</button>`

To make the restore purchases work as expected, please make sure that
the "approved" event listener had be registered properly,
and in the callback `product.finish()` should be called.

## *store.log* object
### `store.log.error(message)`
Logs an error message, only if `store.verbosity` >= store.ERROR
### `store.log.warn(message)`
Logs a warning message, only if `store.verbosity` >= store.WARNING
### `store.log.info(message)`
Logs an info message, only if `store.verbosity` >= store.INFO
### `store.log.debug(message)`
Logs a debug message, only if `store.verbosity` >= store.DEBUG
# Random Tips

- Sometimes during development, the queue of pending transactions fills up on your devices. Before doing anything else you can set `store.autoFinishTransactions` to `true` to clean up the queue. Beware: **this is not meant for production**.

# internal APIs
USE AT YOUR OWN RISKS
## *store.products* array ##
Array of all registered products

#### example

    store.products[0]
### *store.products.push(product)*
Acts like the Array `push` method, but also adds
the product to the [byId](#byId) and [byAlias](#byAlias) objects.
### *store.products.byId* dictionary
Registered products indexed by their ID

#### example

    store.products.byId["cc.fovea.inapp1"]
### *store.products.byAlias* dictionary
Registered products indexed by their alias

#### example

    store.products.byAlias["full version"]```
### aliases to `store` methods, added for convenience.

## *store._queries* object
The `queries` object handles the callbacks registered for any given couple
of [query](#queries) and action.

Internally, the magic is found within the [`triggerWhenProduct`](#triggerWhenProduct)
method, which generates for a given product the list of all possible
queries that describe the product.

Queries are generated using the id, alias, type or validity of the product.

### *store._queries.uniqueQuery(string)*
Transform a human readable query string
into a unique string by filtering out reserved keywords:

 - `order`
 - `product`

### *store._queries.callbacks* object
Callbacks registered organized by query strings
#### *store._queries.callbacks.byQuery* dictionary
Dictionary of:

 - *key*: a string equals to `query + " " + action`
 - *value*: array of callbacks

Each callback have the following attributes:

 - `cb`: callback *function*
 - `once`: *true* iff the callback should be called only once, then removed from the dictionary.

#### *store._queries.callbacks.add(query, action, callback, once)*
Simplify the query with `uniqueQuery()`, then add it to the dictionary.

`action` is concatenated to the `query` string to create the key.
### *store._queries.triggerAction(action, args)*
Trigger the callbacks registered when a given `action` (string)
happens, unrelated to a product.

`args` are passed as arguments to the registered callbacks.

 - Call the callbacks
 - Remove callbacks that needed to be called only once

### *store._queries.triggerWhenProduct(product, action, args)*
Trigger the callbacks registered when a given `action` (string)
happens to a given [`product`](#product).

`args` are passed as arguments to the registered callbacks.

The method generates all possible queries for the given `product` and `action`.

 - product.id + " " + action
 - product.alias + " " + action
 - product.type + " " + action
 - "subscription " + action (if type is a subscription)
 - "valid " + action (if product is valid)
 - "invalid " + action (if product is invalid)
 - action

Then, for each query:

 - Call the callbacks
 - Remove callbacks that needed to be called only once

**Note**: All events also trigger the `updated` event

## <a name="trigger"></a>*store.trigger(product, action, args)*

For internal use, trigger an event so listeners are notified.

It's a conveniance method, that adds flexibility to [`_queries.triggerWhenProduct`](#triggerWhenProduct) by:

 - allowing to trigger events unrelated to products
   - by doing `store.trigger("refreshed")` for example.
 - allowing the `product` argument to be either:
   - a [product](#product)
   - a product `id`
   - a product `alias`
 - converting the `args` argument to an array if it's not one
 - adding the product itself as an argument to the event if none were passed

## *store.error.callbacks* array

Array of user registered error callbacks.

### *store.error.callbacks.trigger(error)*

Execute all error callbacks with the given `error` argument.

### *store.error.callbacks.reset()*

Remove all error callbacks.
## store.utils

### store.utils.logError(context, error)
Add warning logs on a console describing an exceptions.

This method is mostly used when execting user registered callbacks.

* `context` is a string describing why the method was called
* `error` is a javascript Error object thrown by a exception

### store.utils.callExternal(context, callback, ...)
Calls an user-registered callback.
Won't throw exceptions, only logs errors.

* `name` is a short string describing the callback
* `callback` is the callback to call (won't fail if undefined)

#### example usage
```js
store.utils.callExternal("ajax.error", options.error, 404, "Not found");
```

### store.utils.ajax(options)
Simplified version of jQuery's ajax method based on XMLHttpRequest.
Only supports JSON requests.

Options:

* `url`:
* `method`: HTTP method to use (GET, POST, ...)
* `success`: callback(data)
* `error`: callback(statusCode, statusText)
* `data`: body of your request

repository: xxliud/zholy

repo_name: xxliud/zholy


text:
# tk-wallet
Legacy Bismuth Wallet

Code of the wallet is not very well organized.
Most of it is sequential and very plain, although some classes and functions were added later. Testing and bug reports have made it quite stable and reliable.
If you are looking for a better experience, I strongly suggest you give the [Tornado wallet](https://github.com/bismuthfoundation/TornadoWallet) a try.

- The original wallet for Bismuth
- Supports:
    - Transactions
    - Light connectivity (no node installation required)
    - On-chain messaging
    - Themes
    - Bismuth payment URLs
    - Token issuance and transfers
    - Transaction history
    - Wallet Encryption / Decryption
    - Operations and on-chain data saving
    - Alias registration and usage
    - Custom connectivity
    - Mempool overview
    - Basic statistics
    - Document fingerprinting
    - Wallet backup, recovery, import
    - CSV export

![Thumbnail](graphics/thumb.PNG "Thumbnail")

See "releases" page for installers
https://github.com/bismuthfoundation/tk-wallet/releases

# About Bismuth

- https://bismuth.cz
- https://github.com/bismuthfoundation/Bismuth

repository: bismuthfoundation/tk-wallet

repo_name: bismuthfoundation/tk-wallet


text:
# IITea

Early in the morning, or late in the night, it’s undeniable that IIT Bombay runs on one fuel: tea. Our aim is to gather a comprehensive list of all the tea spots in the institute and present information about these visually, including location, timings, distance from various spots, and possibly even include price information and quality ratings. The guiding aim is to be able to provide most information to a person at a given location and time, in search for tea. In the process, we also aim to unearth parts of the institute with relatively lower availability, and hence potential hotspots for future stalls.

# Running
Create a basic server that can handle http requests and access the `index.html` in the root directory. If you have a Python console, this can be done by:

    python -m SimpleHTTPServer 8000

on Python 2 or

    python3 -m http.server

on Python 3.


text:
While there is absolutely nothing wrong with this, it is for sure tremendously slow and expensive if you just want to quickly
bring your next-fancy-webapp to the masses, and you don't have resources, people, knowledge.

![Deploy of a "Fancy Web App" the usual way](https://cdn.rawgit.com/danidemi/jlubricant/b3683ca1fd0327222f561cfd126eb9dea38fe33a/assets/deploy-the-usual-way.svg)

Wait for a minute how it would be nice if it would be possible to assemble a web application that embeds databases, messaging systems,
application server, and any other service you need, in just one executable `.jar`, that you can maybe deploy on a couple of free openshift
gears, without messing around with complex systems, yet using standard protocols that will allow you to quickly migrate to standard
architectures just when your application will need it!

![Deploy of a "Fancy Web App" the JLubricant way](https://cdn.rawgit.com/danidemi/jlubricant/b3683ca1fd0327222f561cfd126eb9dea38fe33a/assets/deploy-the-jlubricant-way.svg)

JLubricant allows you to do that.

[![Build Status](https://travis-ci.org/danidemi/jlubricant.svg)](https://travis-ci.org/danidemi/jlubricant)

JLubricant allows you to quickly prototype applications providing you
* Java based services
	* as...
		* Database engines
		* Queue systems
		* Web Servers
	* that you can quickly integrate through their common interface (`JBDC`, `JMS`, `javax.servlet`)
* Utilities that avoid you to cope with annoying and repetitive tasks.

# Use JLubricant

JLubricant modules are available as a Maven dependecies

	<dependency>
	    <groupId>com.danidemi.jlubricant</groupId>
	    <artifactId>jlubricant-utils</artifactId>
	    <version>0.0.14</version>
	</dependency>

	<dependency>
	    <groupId>com.danidemi.jlubricant</groupId>
	    <artifactId>jlubricant-embeddable-hsql</artifactId>
	    <version>0.0.14</version>
	</dependency>

	<dependency>
	    <groupId>com.danidemi.jlubricant</groupId>
	    <artifactId>jlubricant-slf4j</artifactId>
	    <version>0.0.14</version>
	</dependency>

# Build

## Library

Build JLubricant from sources in three simple steps.

	$ git clone https://github.com/danidemi/jlubricant.git
	$ cd jlubricant
	$ mvn clean install

## Documentation

To generate and check the documentation

	$ mvn site:site site:stage
	$ firefox target/staging/index.html &

# Contribution

Please, feel free to contribute with ideas, code, questions, submitting issues, samples.

repository: danidemi/jlubricant

repo_name: danidemi/jlubricant


text:
# IntersightClient::ThermalPolicy

## Properties

| Name | Type | Description | Notes |
| ---- | ---- | ----------- | ----- |
| **class_id** | **String** | The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when marshaling and unmarshaling data. | [default to 'thermal.Policy'] |
| **object_type** | **String** | The fully-qualified name of the instantiated, concrete type. The value should be the same as the 'ClassId' property. | [default to 'thermal.Policy'] |
| **fan_control_mode** | **String** | Sets the Fan Control Mode of the System. High Power, Maximum Power and Acoustic modes are only supported for Cisco UCS X series Chassis. * `Balanced` - The fans run faster when needed based on the heat generated by the server. When possible, the fans returns to the minimum required speed. * `LowPower` - The Fans run at the minimum speed required to keep the server cool. * `HighPower` - The fans are kept at higher speed to emphasizes performance over power consumption. This Mode is only supported for UCS X series Chassis. * `MaximumPower` - The fans are always kept at maximum speed. This option provides the most cooling and consumes the most power. This Mode is only supported for UCS X series Chassis. * `Acoustic` - The fan speed is reduced to reduce noise levels in acoustic-sensitive environments. This Mode is only supported for UCS X series Chassis. | [optional][default to 'Balanced'] |
| **organization** | [**OrganizationOrganizationRelationship**](OrganizationOrganizationRelationship.md) |  | [optional] |
| **profiles** | [**Array<PolicyAbstractConfigProfileRelationship>**](PolicyAbstractConfigProfileRelationship.md) | An array of relationships to policyAbstractConfigProfile resources. | [optional] |

## Example

```ruby
require 'intersight_client'

instance = IntersightClient::ThermalPolicy.new(
  class_id: null,
  object_type: null,
  fan_control_mode: null,
  organization: null,
  profiles: null
)
```

repository: xlab-si/intersight-sdk-ruby

gha_language: Ruby

repo_name: xlab-si/intersight-sdk-ruby


text:
---
title: Delete an Asset Folder
---

Delete an asset folder by using its numeric id.

;examplearea

Example Request

<RequestExample url="https://mapi.storyblok.com/v1/spaces/606/asset_folders/41" httpMethod="DELETE"></RequestExample>

repository: storyblok/storyblok-docs

gha_language: Vue

repo_name: storyblok/storyblok-docs


text:
# Mark Muchiri Macharia
#### Independent Portforlio
10.07.2021

## Author name : MARK MUCHIRI MACHARIA
## Project  Description
This Moringa school project About Me, Project portfolio, intales a little about my background, my current intrests/hobbies/skills. Besides that it really brings out the developer in me giving you an idea of what i can do with the coding knowledge i have learnt in the period of one week.
## Link to live site on GitHub Pages
https://machariamark.github.io/Portfolio/
## Known Bugs
No known bugs.
## Support and contact details
Want to contribute? Amazing!

To fix a bug or enhance an existing module, follow these steps:

* Fork the repo
* Create a new branch (git checkout -b improve-feature)
* Make the appropriate changes in the files
* Add changes to reflect the changes made
* Commit your changes (git commit -am 'Improve feature')
* Push to the branch (git push origin improve-feature)
* Create a Pull Request
### License
[MIT](LICENSE) 2021

repository: MachariaMark/Portfolio

repo_name: MachariaMark/Portfolio


text:
# Plex Go Slack

[![Go Report Card](https://goreportcard.com/badge/github.com/rimaulana/plexgoslack)](https://goreportcard.com/report/github.com/rimaulana/plexgoslack) [![CircleCI](https://img.shields.io/circleci/project/github/rimaulana/plexgoslack.svg)](https://circleci.com/gh/rimaulana/plexgoslack/tree/master) [![codecov](https://codecov.io/gh/rimaulana/plexgoslack/branch/master/graph/badge.svg)](https://codecov.io/gh/rimaulana/plexgoslack) [![codebeat badge](https://codebeat.co/badges/c217e8a8-b808-4b35-aee0-a0705874289d)](https://codebeat.co/projects/github-com-rimaulana-plexgoslack-master) [![Maintainability](https://api.codeclimate.com/v1/badges/4a663411cfea93342333/maintainability)](https://codeclimate.com/github/rimaulana/plexgoslack/maintainability) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

Here in my office, we really love to gather our resources by putting together our movies collection into our private Plex server. However, sometimes people didn't know when someone added new movie into our collection and could mistakenly
download the same movie. So we got an Idea to create Slack bot that will inform us if there is a new movie available in our collection by sending a post about it on our Slack general channel and here is how we accomplished it.

![alt text](screenshots/slack-message.png "Slack Message Format")

## Table of Contents
- [Requirements](#requirements)
- [Prerequisites](#prerequisites)
  - [Creating New Slack Webhook](#creating-new-slack-webhook)
  - [Getting TMDb API Key](#getting-tmdb-api-key)
  - [Getting Section Number of Plex Movie Library](#getting-section-number-of-plex-movie-library)
    - [Getting Plex CLI Location](#getting-plex-cli-location)
    - [Setting Plex Environment Variable](#setting-plex-environment-variable)
    - [Getting Section Number](#getting-section-number)
- [Installation](#installation)
  - [Manual Compilation](#manual-compilation)
    - [Getting the Codes](#getting-the-codes)
    - [Compiling the Codes](#compiling-the-codes)
- [Config File](#config-file)
- [Running the Program](#running-the-program)
- [Limitations](#limitations)

## Requirements

* Plex Media Server running on Linux
* Slack Workspace
* Golang version ^1.6 (for manual compilation)
* The Movie Database account
[back to table of contents](#table-of-contents)

## Prerequisites
### Creating new Slack Webhook

Slack webhook is required in order for this program to be able to send an update to Slack workspace. In order to do that you can add Incoming WebHooks in Slack Custom Integrations. for further information you can read [this reading](https://api.slack.com/incoming-webhooks) provided by Slack. Once done, make sure to get the webhook url
[back to table of contents](#table-of-contents)

### Getting TMDb API Key

One of the magic of this program is being able to pull the information regarding the movie that has just been added into Plex collection. The iformation that it will get are Movie poster and synopsis. In order to do that, we don't have to reinvent the wheel, all we need to do is using TMDb API to get this information. You can easily follow [this guide](https://developers.themoviedb.org/3/getting-started/introduction) to get it
[back to table of contents](#table-of-contents)

### Getting Section Number of Plex Movie Library

This one is going to be a little bit challenging since we need to get access to Linux shell that host Plex Media Server.
[back to table of contents](#table-of-contents)

#### Getting Plex CLI Location

you need to find your Plex CLI location, by default it is located in /usr/lib/plexmediaserver. However, if you couldn't find it in default location, try finding it using the following command.

```bash
sudo find / -name "Plex Media Scanner"
```

then the root path is the path not include the "Plex Media Scanner"
[back to table of contents](#table-of-contents)

#### Setting Plex Environment Variable

In order for plex cli application to be able to run it will need a specific environment variable named LD_LIBRARY_PATH that I found out by the default it is not set. you can do it by edit /etc/environment file and add the location of your root Plex CLI from the previous step. for example if you found it in the default location

```text
LD_LIBRARY_PATH="/usr/lib/plexmediaserver"
```
[back to table of contents](#table-of-contents)

#### Getting Section Number

Now that you set up all the required steps, you can run the following command to get section number of your Movie Library

```bash
sudo -u plex -E -H "$LD_LIBRARY_PATH/Plex Media Scanner" --list
```

it will give you output that will look like the following

```text
  1: Movies
  3: Tutorial AWS
  4: Tutorial Data Warehouse
  2: TV Shows
```

from the example above I can say that the section number for my Movie library is 1
[back to table of contents](#table-of-contents)

## Installation
There are two way to get the binary of the program, first you can get it from our [release page](https://github.com/rimaulana/plexgoslack/releases), or you can build and compile it manually.
[back to table of contents](#table-of-contents)

### Manual Compilation
#### Getting the Codes

In order to get the code, you can simply run go get command from console

```bash
go get github.com/rimaulana/plexgoslack
```
[back to table of contents](#table-of-contents)

#### Compiling the Codes

you can change directory into you go workspace and into /src/github.com/rimaulana/plexgoslack

```bash
make release
```

That will yield a file named plexgoslack-vlatest-linux-amd64 under release folder
[back to table of contents](#table-of-contents)

## Config File

Config file for this program has the following structure

```toml
# Is the url of your plex media server page for example https://app.plex.tv
plex_url = "link to your plex server page"

# The API Key you get on step Getting TMDb API Key
[tmdb]
api_key = "The movie databse API Key"

# Is an array contains the webhook URL to your slack incoming webhook integration. it can be multiple webhooks
[slack]
webhooks = ["slack_webhook_1","slack_webhook_2"]

# This is where you put information on each library you want to watch if there are changes. It can be multiple libraris but you need to see the limitations
[plex]
[plex.movies] # the naming after plex. is up to you
root = "/path/to/movie" #path where you keep you movie2 collection
section = 1 #int respresent plex section number

[plex.movies2] # the naming after plex. is up to you
root = "/path/to/movie2" #path where you keep you movie2 collection
section = 2 #int respresent plex section number
```
[back to table of contents](#table-of-contents)

## Running the Program

In order to run the program, you need to run the binary file plexgoslack you downloaded from our [release page](https://github.com/rimaulana/plexgoslack/releases) or generated on step [Compiling the Codes](#compiling-the-codes). config.toml file needs to be on the same folder as plexgoslack binary or you can specify it when running the code using *-config* flag. Before running the program you need to add execute permission on it by running

```bash
sudo chmod +x plexgoslack-version-linux-amd64
```

once done, run the code with sudo permission

```bash
sudo ./plexgoslack-version-linux-amd64
```
or with specified config file
```bash
sudo ./plexgoslack-version-linux-amd64 -config="/path/to/config.toml"
```
[back to table of contents](#table-of-contents)

## Limitations

So far this program can only monitor Plex Movie Library type. It only read the name of the parent folder of each movie item in the folder. The pattern that the file watcher looking for [Slack movie Folder Nesting naming standard](https://support.plex.tv/hc/en-us/articles/200381023-Naming-Movie-files), if it doesn't match the regex, it will not be considered as a new movie item and will not be updated on Plex and on Slack
[back to table of contents](#table-of-contents)

repository: rimaulana/plexgoslack

repo_name: rimaulana/plexgoslack


text:
# ExServerTimings
[![Build Status](https://travis-ci.org/ThomasBracher/ex_server_timings.svg?branch=master)](https://travis-ci.org/ThomasBracher/ex_server_timings)

This package is a plug to put the http header [Server Timings](https://w3c.github.io/server-timing/)
which allow to visualise the server performances in your browser. For more information, refer to
[this blog](https://ma.ttias.be/server-timings-chrome-devtools/) and this
[tweet](https://twitter.com/paul_irish/status/829090506084749312) from Google Chrome devtools.

## Installation

The package is [available in Hex](https://hex.pm/packages/ex_server_timings), the package can be installed
by adding `ex_server_timings` to your list of dependencies in `mix.exs`:

```elixir
def deps do
  [{:ex_server_timings, "~> 0.1.0"}]
end
```

## Usage

In your `lib/endpoint.ex` or in your `web/router.ex`, add the following line:

```elixir
plug ExServerTimings.Plug
```

## Todo

[Specifications](https://w3c.github.io/server-timing/#cross-origin-resources) indicate that in case
of CORS requests timings should pass `Timing-Allow-Origin` to allow the user to see timings.

Right now, this are not yet implemented because of the early stage of the standard and low support by
browsers.

Also, nothing specifies the unit of metrics passed. Right now we stick to Chrome implementation, but
we should be careful of any changes.

## License
The MIT License (MIT)

Copyright (c) 2017 Thomas Bracher

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


text:
Byte The Correct Apple
======================

This code was actually written for competition held by hackerrank.com.
Link to problem statement: https://www.hackerrank.com/contests/october-data-science/challenges/byte-the-correct-apple

**Problem Statement:**

*You are provided a text file, with a number of lines. Each line contains either a sentence or a paragraph or a text snippet which could either be related to Apple, the computer company, or the apple, the fruit. Your task is to perform disambiguation between these two groups and identify which one is being referred to. It is possible that the plural or the possessive form of Apple might exist in some of the tests (apples, Apple’s).*

**Training Data:** Text from wiki pages for both apple, the fruit and Apple, the company.

**Input Format:** An Integer N, followed by N text snippets

**Output Format:** N lines of output

**Sample Input**

2

Apple already plans to buy back $100 billion in shares, including $16 billion worth last quarter. Icahn probably pounded the dinner table he and Cook shared recently for their much-reported bread-breaking at Icahn's New York apartment. Apple's cash stash currently sits at a whopping $145 billion but only $43 billion is in the U.S., which is why Icahn wants to float bonds to cover a buy back.

Fortunately, there are “low-chill” apple varieties for temperate climates. (Chilling hours are defined as nonconsecutive hours of winter temperatures below 45 degrees.) As a general guide, if you live on or near the coast, your garden gets only 100 to 200 chilling hours. Inland San Diego gardens get about 400 to 500 chilling hours — still considered “low chill.”

**Sample Output**

computer-company

fruit

**My Approach:**

I used simple text processing utilities provided by scikit learn to get >90% accuracy on hidden data set.
Model used was Bernoulli’s Naïve Bayes.

Intelligent data preprocessing can actually pull accuracy towards 100%. Probably the model is failing in case of multiple occurrences of word apple (like eating apple at Apple headquarters).

**Possible Developments:**

Accuracy can be increased by further preprocessing which require nlp libraries like  NLTK.

repository: abhijitanand/byteTheCorrectApple

repo_name: abhijitanand/byteTheCorrectApple