text:
---
toc: false
layout: post
description: First Post.
categories: [about, motivation, markdown]
title: I am in!
image: images/gsoc_accept.jpg
search_exclude: true
comments: true
---
# Journey to Selection Day

Hi everyone, I am glad to inform that I have been selected as a student developer in Google Summer of Code 2020 at CERN-HSF. I am really excited about contributing and working on the project ["TMVA Interfaces PyTorch"](https://hepsoftwarefoundation.org/gsoc/2020/proposal_TMVAPyTorch.html).

> **tl;dr** : My project involves creating a PyTorch interface on top of the TMVA PyMVA framework for making PyTorch like model definitions possible. In essence the idea is: PyTorch provides model definition, training and prediction but TMVA does the preprocessing, dataloading, testing etc.

I applied to GSoC for the first time . It was such a delight seeing this in my mail, and I hope I can do justice to the project, achieving the desired goals.

![]({{site.baseurl}}/images/gsoc_accept_mail.jpg)

My project is co-mentored by [Lorenzo Moneta](https://www.linkedin.com/in/lorenzo-moneta-982b902/), [Akshay Vashishtha](https://www.linkedin.com/in/akshay-vashistha-9a558778/) and [Omar Andres Zapata Mesa](https://www.linkedin.com/in/omar-andres-zapata-mesa-4ab16a5b/) from the following organizations:
* [HEP Software Foundation](https://hepsoftwarefoundation.org/)
* [OProject](http://oproject.org/)
* [Karlsruhe Institute of Technology (KIT)](https://www.kit.edu/english/).

## Motivation

Google Summer of Code (GSoC) is a program that matches mentoring organizations with college and university student developers, who work on developing open source code throughout the summers. Each year, Google works with many open source, free software and technology-related groups to identify and fund proposals for student open source projects.
GSoC pairs, accepted student applicants with mentors from participating projects.

I :heart: open source. For the past one year, I have been actively involved in various open-source projects [(See GitHub)](https://github.com/anirudhdagar). As a GSoC applicant my aim was to contribute to OSS orgs and gain exposure to real-world software development.

Making an impact and contributing to the software used and developed by one of the world's **largest** and most **respected** scientefic research centres, **CERN**, was the key driving force along with my inclination and skills in **Machine Learning, Research and Open Source.**

## About Organization

CERN-HSF (High-Energy Physics Software Foundation) is the umbrella organization for high-energy physics-related projects in GSoC. The HEP Software Foundation facilitates the coordination of common international efforts in high-energy physics software and computing.

TMVA is a submodule of ROOT Project ( One of the famous projects by CERN ). ROOT is a modular scientific software framework. It provides all the functionalities needed to deal with big data processing, statistical analysis, visualisation and storage. It is mainly written in C++ but integrated with other languages such as Python and R. The Toolkit for Multivariate Data Analysis with ROOT (TMVA) is a standalone project that provides a ROOT-integrated machine learning environment for the processing and parallel evaluation of sophisticated multivariate classification techniques.

## Experience Applying to GSoC

If I had to summarize in a few words, **it was pretty fun!!**

So, I stumbled upon this project on **["TMVA Graph Neural Networks"](https://hepsoftwarefoundation.org/gsoc/2020/proposal_TMVAGraph.html)**, and I was immediately interested due to my recent work and background in **graph representation learning**. I was very upto date with the literature in this field and had done a thorough literature survey in the past couple of years. I already knew a bit about ROOT and CERN-HSF and I had skimmed over the codebase on github long time back.

So I decided to apply and I did. I started with completing the tasks and later focused on my **[proposal](https://drive.google.com/open?id=1Df22pHUzj1rSh06I3CH2EFEsJcBshLCO5mg1aTHR8pQ)** for this idea. I would also like to thank and mention my friend [Aaradhya Saxena](https://github.com/AaradhyaSaxena) who really helped me, guided me and reviewed my proposal along the way. It wouldn't have been possible without him.

After reviewing my submission, the mentors were very impressed with my work and mentioned their interest in working with me and realizing this project. **But** (there's always a 'but' :stuck_out_tongue_winking_eye:), they also encouraged me to apply to some other projects as well based on my interests in the other ideas. One of the mentors **emphasized**, that the idea on **["TMVA Interfaces PyTorch"](https://hepsoftwarefoundation.org/gsoc/2020/proposal_TMVAPyTorch.html)** was a high impact project and I could eventually better **serve particle physicists working on Machine Learning at CERN**, by leading this new direction for the development of TMVA.

I took my time to think and decided to read about this other idea in detail to be ascertain about my interests. I was again driven by the impact I could make at CERN through this project and ultimately started working on my **[second proposal](https://drive.google.com/open?id=1b54yrngOjth9wUiS7iAg_rEm7J2J749d)**. After a few sleepless nights, understanding the codebase for this part of the project, I finally pulled off the proposal just a few hours before the deadline. I then completed the tasks for this project as well in the next couple of days.

I felt confident about both the proposals and was slightly inclined to the GNNs project but I was happy in the end when the projects were announced and **"I Got In"** with my second proposal. I still plan on contributing to the GNNs project and will definitely love to collaborate with the other GSoC student, [Stanislav Lukyanenko](https://github.com/stlukyanenko) on this project during the later stages.

## Start of Community Bonding Period

The first phase of the [program timeline](https://summerofcode.withgoogle.com/how-it-works/#timeline) for selected students is the community bonding period which started on May 4th. In this period students familiarise with organisation’s community, understand codebase, contact their mentors and decide their communication modes, meeting time etc. I'll also try to refine the proposal with the help of the mentors as mentioned in my proposed timeline.

We decided to schedule an introductory meet on 8th May. This, first of many Zoom/Skype meetings will set the stage for the project and the agenda is to meet other TMVA developers and GSoC students while also presenting and explaining their proposals.

Also, given the special situation of COVID-19 this year, I'll be very alert and will try to stay a few steps ahead on my proposed timeline, just to combat and adjust for any kind of changes I may have to make in the timeline due to my semester exams. These End-Term Exams were originally scheduled to be conducted in April but have been indefinitely postponed for now.

---

I'll try to keep the space spiced up and explanable by sharing code snippets along my journey in the coming months like below

Python code and output:

```python
# Say hi to open-source
print("Hello Open-Source World!")
```

Formatting text as shell commands:

```shell
echo "TMVA Developers are awesome!"
./gsoc_script.sh --option "start"
wget https://home.cern/community_bonding_period.txt
```

---

I hope that this summer will be interesting, challenging and productive.

> To me GSoC is all about communicating, learning and making an impact for the love of open-source. :heart:

Stay tuned for my next post! I'll try to make the blogs very interpretable and interactive while documenting and explaining all my experiences and learnings in these coming days.

---

See you on the other side!

Signing Off.

repository: blipblipgo/gsoc

repo_name: blipblipgo/gsoc


text:
# RTS-Camera
## Features
* Screen edge and keyboard input
* Target following
* Automatic height depending on map relief
* Limit movement
## Usage
Simply add RtsCamera.cs script to the game camera.

If you want the camera to follow something, add the TargetSelector.cs script to camera
and set Tag "target" (can be configured) to any object you want to track.
## Forked from
[RTS_Camera package](https://github.com/densylkin/RTS_Camera)
[Asset Store](https://assetstore.unity.com/packages/tools/camera/rts-camera-43321)
Original RTS_Camera package will no longer be developed: https://github.com/densylkin/RTS_Camera/issues/4

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Constraints

Constraints do influence the trained image without using CLIP.
E.g., the image [mean](reference.md#targetsconstraintsmean) can be trained
to be above or below a specific threshold.

Constraints only affect the pixels that are processed by
the [transforms](reference.md#targetstransforms) of the [target](reference.md#targets).

Here's a list of all available constraints:

{{constraints}}


text:
Cognyte is a global leader in security analytics software that empowers governments and enterprises with Actionable
Intelligence for a safer world. Our open software fuses, analyzes and visualizes disparate data sets at scale to help
security organizations find the needles in the haystacks. Over 1,000 government and enterprise customers in more than
100 countries rely on Cognyte’s solutions to accelerate security investigations and connect the dots to successfully
identify, neutralize, and prevent threats to national security, business continuity and cyber security.

Luminar is an asset-based cybersecurity intelligence platform that empowers enterprise organizations to build and
maintain a proactive threat intelligence operation that enables to anticipate and mitigate cyber threats, reduce risk
and enhance security resilience. Luminar enables security teams to define a customized, dynamic monitoring plan to
uncover malicious activity in its earliest stages on all layers of the Web.

This connector allows integration of intelligence-based IOC data and customer-related leaked records identified by Luminar.

## Configure Luminar IOCs & leaked credentials on Cortex XSOAR

1. Navigate to **Settings** > **Integrations** > **Servers & Services**.
2. Search for Luminar IOCs & leaked credentials.
3. Click **Add instance** to create and configure a new integration instance.

    | **Parameter** | **Description** | **Required** |
    | --- | --- | --- |
    | Luminar Base URL | Luminar Base URL | True |
    | Luminar API Account ID | Luminar API Account ID | True |
    | Luminar API Client ID | Luminar API Client ID | True |
    | Luminar API Client Secret | Luminar API Secret | True |
    | Trust any certificate (not secure) | Trust any certificate \(not secure\) | False |
    | Use system proxy settings | Use system proxy settings | False |
    | Fetch indicators | Fetch indicators | False |
    | Indicator Reputation | Indicators from this integration instance will be marked with this reputation. | False |
    | Source Reliability | Reliability of the source providing the intelligence data. | True |
    | Feed Expiration Policy | Feed Expiration Policy | False |
    | Feed Fetch Interval | Feed Fetch Interval | False |
    | Tags | Supports CSV values. | False |
    | Traffic Light Protocol Color | The Traffic Light Protocol \(TLP\) designation to apply to indicators fetched from the feed | False |
    | Bypass exclusion list | When selected, the exclusion list is ignored for indicators from this feed. This means that if an indicator from this feed is on the exclusion list, the indicator might still be added to the system. | False |

4. Click **Test** to validate the URLs, token, and connection.
## Commands
You can execute these commands from the Cortex XSOAR CLI, as part of an automation, or in a playbook.
After you successfully execute a command, a DBot message appears in the War Room with the command details.
### luminar-get-indicators
***
Gets Luminar Indicators

#### Base Command

`luminar-get-indicators`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| limit | The maximum number of indicators to return. Default is 50. | Optional |

#### Context Output

There is no context output for this command.
#### Command example
```!luminar-get-indicators limit="3"```
#### Context Example
```json
{
    "Luminar": {
        "Indicators": [
            {
                "Indicator Type": "File",
                "Indicator Value": "a35866ff36a7ec0a226b8f814f3642185742020e",
                "Malware Family": "SlayerRAT v0.4",
                "rawJSON": {
                    "created": "2016-02-15T00:00:00.000Z",
                    "created_by_ref": "identity--cd3843c0-8119-4ac0-9409-cec757123a6a",
                    "id": "indicator--88369314-3515-4c5c-a3e3-dba75e4ae964",
                    "indicator_types": [
                        "malicious-activity"
                    ],
                    "modified": "2016-02-15T00:00:00.000Z",
                    "name": "SlayerRAT v0.4",
                    "pattern": "[file:hashes.'SHA-1' = 'a35866ff36a7ec0a226b8f814f3642185742020e']",
                    "pattern_type": "stix",
                    "spec_version": "2.1",
                    "type": "indicator",
                    "valid_from": "2016-02-15T00:00:00.000Z"
                }
            },
            {
                "Indicator Type": "Domain",
                "Indicator Value": "xbodyyellow.top",
                "Malware Family": "Locky",
                "rawJSON": {
                    "created": "2016-02-22T00:00:00.000Z",
                    "created_by_ref": "identity--cd3843c0-8119-4ac0-9409-cec757123a6a",
                    "id": "indicator--0240fda0-1b77-4bde-86d8-eeb27203e4d7",
                    "indicator_types": [
                        "malicious-activity"
                    ],
                    "modified": "2016-02-22T00:00:00.000Z",
                    "name": "Locky",
                    "pattern": "[domain-name:value = 'xbodyyellow.top']",
                    "pattern_type": "stix",
                    "spec_version": "2.1",
                    "type": "indicator",
                    "valid_from": "2016-02-22T00:00:00.000Z"
                }
            },
            {
                "Indicator Type": "Email",
                "Indicator Value"<EMAIL_ADDRESS>                "Malware Family": "OilRig",
                "rawJSON": {
                    "created": "2016-10-10T00:00:00.000Z",
                    "created_by_ref": "identity--cd3843c0-8119-4ac0-9409-cec757123a6a",
                    "id": "indicator--a1ee47e7-fe49-4fae-8c20-7a14452c5da7",
                    "indicator_types": [
                        "malicious-activity"
                    ],
                    "modified": "2016-10-10T00:00:00.000Z",
                    "name": "OilRig",
                    "pattern": "[email-addr:value =<EMAIL_ADDRESS>                    "pattern_type": "stix",
                    "spec_version": "2.1",
                    "type": "indicator",
                    "valid_from": "2016-10-10T00:00:00.000Z"
                }
            }
        ]
    }
}
```

#### Human Readable Output

>### Indicators from Luminar
>|Indicator Type|Indicator Value|Malware Family|
>|---|---|---|
>| File | a35866ff36a7ec0a226b8f814f3642185742020e | SlayerRAT v0.4 |
>| Domain | xbodyyellow.top | Locky |
>| Email |<EMAIL_ADDRESS>| OilRig |

### luminar-get-leaked-records
***
Gets Luminar Leaked Records

#### Base Command

`luminar-get-leaked-records`
#### Input

| **Argument Name** | **Description** | **Required** |
| --- | --- | --- |
| limit | The maximum number of leaked records to return. Default is 50. | Optional |

#### Context Output

There is no context output for this command.
#### Command example
```!luminar-get-leaked-records limit="3"```
#### Context Example
```json
{
    "Luminar": {
        "Leaked_Credentials": [
            {
                "Credentials": "######",
                "Indicator Type": "Account",
                "Indicator Value"<EMAIL_ADDRESS>                "rawJSON": {
                    "account_login"<EMAIL_ADDRESS>                    "credential": "######",
                    "display_name"<EMAIL_ADDRESS>                    "id": "user-account--e4af982e-4673-4795-94d6-17b5ef96f8ae",
                    "spec_version": "2.1",
                    "type": "user-account"
                }
            },
            {
                "Credentials": "######",
                "Indicator Type": "Account",
                "Indicator Value"<EMAIL_ADDRESS>                "rawJSON": {
                    "account_login"<EMAIL_ADDRESS>                    "credential": "######",
                    "display_name"<EMAIL_ADDRESS>                    "id": "user-account--b8fc71bf-3542-4fcb-a0c7-70dc5e7366e8",
                    "spec_version": "2.1",
                    "type": "user-account"
                }
            },
            {
                "Credentials": "######",
                "Indicator Type": "Account",
                "Indicator Value"<EMAIL_ADDRESS>                "rawJSON": {
                    "account_login"<EMAIL_ADDRESS>                    "credential": "######",
                    "display_name"<EMAIL_ADDRESS>                    "id": "user-account--885ee892-320c-4e62-8161-a999d2df086a",
                    "spec_version": "2.1",
                    "type": "user-account"
                }
            }
        ]
    }
}
```

#### Human Readable Output

>### Leaked Credentials from Luminar
>|Indicator Type| Indicator Value |Credentials|
>|-----------------|---|---|
>| Account |<EMAIL_ADDRESS>       | ###### |
>| Account |<EMAIL_ADDRESS>       | ###### |
>| Account |<EMAIL_ADDRESS>       | ###### |

### luminar-reset-fetch-indicators
***
WARNING: This command will reset your fetch history.

#### Base Command

`luminar-reset-fetch-indicators`
#### Input

There are no input arguments for this command.

#### Context Output

There is no context output for this command.
#### Command example
```!luminar-reset-fetch-indicators```
#### Human Readable Output

>Fetch history deleted successfully

repository: demisto/content

gha_language: Python

gha_license_id: MIT

repo_name: demisto/content


text:
# derby-notebook
A proof of concept of providing a multi-user Jupyter notebook.

The approach is to run a proxy over the notebook server and intercept the
`notebooks` requests, replacing them with a [Derby](http://derbyjs.com/)
app on top of the running state IPython notebook.

In the background, a listener waits for changes on the model, and transforms
them into [messages][ipep-13], and similarly updates the model when it receives
messages.

## Roadmap
- [X] proxy notebook
- [X] Load content into multiuser view (after single-user bootstrap)
- [X] open websocket connection to kernel
- [X] multiuser codemirror in cells
- [X] add cell above/below current
- [X] move cell up/down
- [X] remove cell
- [ ] run cell, see output
- [ ] multiuser presence, (chat, meh)
- [ ] overload `/notebooks` (and all calls to start up kernel)
- [ ] post contents back to content manager API
- [ ] wrap widgets in derby model

## Model
A Derby model is a set of collections of JSON-compatible documents. The main
collection is `notebooks`, which includes, of course, the notebook
contents, but several other pieces to enable a multi-user experience:

```js
{
  // The filename, as would be used in /notebooks/Untitled.ipynb
  "name": "Untitled.ipynb",
  // the results of the contents manager
  "contents": {},
  // stuff for connecting to kernel
  "session": {}
}
```

When one of these documents are created, a `derby-hook` goes off an grabs the
contents, and populates the `cells` collection. Each cell is its own standalone
document to keep updates more atomic. `_` keys will be stripped out when being
posted back to the
```js
{
  "cell_type": "markdown" // or code
  "source": "the code or text",
  "outputs": [],
  // ... more cell stuff
  "id": "generated-by-derby"
  "_state": "run" // probably a better way to do this
  "_editors": {
    "userid": 1
  },
  "_notebook": "the notebook id",
  "_weight": 1000 // heavier weights sink to the bottom of the page
}
```

## Running
This is all lashed together with [docker-compose](http://github.com), and
presently also runs inside a vagrant box.

```sh
vagrant up
```

Then, log into that box.

Build (this can take a while!) and run everything with:
```sh
docker-compose up
```
Then visit http://localhost:9999/

Or, if you just want to restart the proxy:

```sh
docker-compose build && docker-compose start && docker-compose logs
^C
docker-compose build && docker-compose restart proxy && docker-compose logs
```

## Debugging node stuff

### start an interactive coffeescript shell

```shell
docker run -i vagrant_proxy
```

[ipep-13]: https://github.com/ipython/ipython/wiki/IPEP-13%3A-Updating-the-Message-Spec

repository: nrbgt/derby-notebook

repo_name: nrbgt/derby-notebook


text:
# coding
mycodingrepo

 ## Merging upstream changes directly in github into a already forked repo.
Here’s how to update your fork directly from GitHub (as shown in the video above):

- Open your fork on GitHub.
- Click on Pull Requests.
- Click on New Pull Request. By default, GitHub will compare the original with your fork, and there shouldn’t be anything to compare if you didn’t make any changes.
- Click on switching the base. Now GitHub will compare your fork with the original, and you should see all the latest changes.
- Click on Click to create a pull request for this comparison and assign a predictable name to your pull request (e.g., Update from original).
- Click on Send pull request.
- Scroll down and click Merge pull request and finally Confirm merge. If your fork didn’t have any changes, you will be able to merge it automatically.

repository: anhsirksai/coding

repo_name: anhsirksai/coding


text:
---
title: 'Cloudknot: run your existing python code on AWS batch'
tags:
  - AWS
  - python
  - batch
authors:
 - name: Adam C Richie-Halford
   orcid: 0000-0001-9276-9084
   affiliation: 1
 - name: Ariel Rokem
   orcid: 0000-0003-0679-1985
   affiliation: 2
affiliations:
 - name: University of Washington, Department of Physics
   index: 1
 - name: University of Washington, eScience Institute
   index: 2
date: 14 November 2017
bibliography: paper.bib
---

# Summary

In the quest to minimize time-to-first-result, many computational scientists are
turning to cloud-based distributed computing with commercial vendors like
Amazon to run their computational workloads. Yet cloud computing remains
inaccessible to many researchers. A number of python scientific libraries have
sought to close this gap by allowing users to interact seamlessly with AWS
resources from within their python environment. For example, see
cottoncandy [@cottoncandy] for interacting with numpy array data on Amazon
S3 [@S3]. Or see pywren [@pywren], which enables users to run their existing
python code on AWS Lambda [@AWSLambda], providing convenient distributed
execution for jobs that fall within the AWS Lambda limits (maximum 300 seconds
of execution time, 1.5 GB of RAM, 512 MB of local storage, and no root access).
For jobs that require more, we introduce cloudknot [@cloudknot] to execute
existing python code on AWS Batch [@AWSBatch].

Cloudknot takes as input a python function, Dockerizes it for use in an Amazon
ECS instance, and creates all the necessary AWS Batch constituent resources to
submit jobs. Users can then use cloudknot to submit and view jobs for a range
of inputs. For more details and usage examples, please see the cloudknot
documentation [@cloudknotdocs] and examples [@cloudknotexamples].

# Acknowledgements

Cloudknot development is supported through a grant from the
[Gordon and Betty Moore Foundation](https://www.moore.org/) and from the
[Alfred P. Sloan Foundation](https://sloan.org) to the
[University of Washington eScience Institute](http://escience.washington.edu/)

# References

repository: tokozedg/cloudknot

repo_name: tokozedg/cloudknot


text:
# [NPCme v0.1](https://npcme.herokuapp.com/)

![](https://img.shields.io/badge/Rails-5.2.4-informational?style=flat&logo=<LOGO_NAME>&logoColor=white&color=2bbc8a) ![](https://img.shields.io/badge/Ruby-2.5.3-orange) ![](https://img.shields.io/badge/Code-HTML-informational?style=flat&logo=<LOGO_NAME>&logoColor=white&color=2bbc8a) ![](https://api.travis-ci.com/NPCme/NPCme.svg?branch=main)

NPCme is a collaboration between a UX/UI Designer, a Backend Engineer, and a Frontend Engineer who were inspired by all the great other NPC generators out there, but felt they had a few ideas of their own that they wanted to explore.  It utilizes the [Open5e API](https://open5e.com/) and [D&D 5e API](https://www.dnd5eapi.co/api), for which we are eternally grateful.

### Live app
[https://npcme.herokuapp.com/](https://npcme.herokuapp.com/)

## Installation

- Run the following commands to get the generator up and running on your local machine:
```
git clone https://github.com/LHJE/npc_generator.git
bundle install
bundle update
bundle exec figaro install
```

- This has created a file called `application.yml` in your `config` folder.
* At the bottom of that file, paste this:

```
DND_URL: "https://api.open5e.com"
SECOND_DND_URL: "https://www.dnd5eapi.co/api"
```
* Luckily both of the API's used here are open, so there are no API Keys.

- Now you have to obtain Google OAuth credentials
    * Visit https://console.developers.google.com/ and create a new project
    * Select the project and on the left click OAuth consent screen, choose external, click create, and proceed with the required fields (if a field is not required you can skip it)
    * Click on Credentials on the left then click '+Create Credentials' at the top. Choose OAuth client ID, choose Web application, and under Authorized redirect URIs if you plan on testing Google OAuth with localhost you will want to include:
    * `http://localhost:3000/auth/google_oauth2/callback`
    * Click Create and you should receive a Client ID and Client secret. These will go in your application.yml file as:
```
GOOGLE_CLIENT_ID: 'your ID'
GOOGLE_CLIENT_SECRET: 'your ID'
```

- Because this app also has a "Contact Us" feature, you'll also need to add this to the application.yml file as well:
```
GMAIL_EMAIL: 'your_gmail_address'
GMAIL_PASSWORD: 'your_password'
```
 * Note: This application.yml file will ONLY EXIST ON YOUR COMPUTER.  Because the `.gitignore` file is told not to upload it, this information will remain on your computer. Don't delete this `.gitignore` file, otherwise you're going to want to change your password...

- Lastly run this in your terminal:
```
rails db:{create,migrate,seed}
rails db:{migrate,seed} RAILS_ENV=test
```
Seeding may take up to 2 minutes (mainly because there are so many spells!), but you'll only have to do that once.  Make some tea or surf the web!  You've earned it.

## Usage

After you've run those commands, simply go run `rails s` in your terminal, and go to `localhost:3000` in your web browser, and you should be good to go!

## Testing

If you would like to test the repo, we're using `Rspec`.  In your terminal, while in the repo's directory, simply type `bundle exec rspec` and the tests should run!  Because of the random nature of the tests/NPC builds, there's no way to get a consisten 100% testing, but there should be no failing tests, and more than 98% of the lines should be being tested each time..

## Schema
Below is our schema.

![our schema](/app/assets/images/npc_generator_schema.png)

## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

## Contributors

Backend:
* Luke Hunter James-Erickson
    * [GitHub](https://github.com/LHJE)
    * [LinkedIn](https://www.linkedin.com/in/lhje/)

UX/UI:
* Cecile Elliott
    * [Website](https://www.onecreativebird.com)
    * [LinkedIn](https://www.linkedin.com/in/cecileelliott/)

Frontend:
* Caleb Cyphers
    * [GitHub](https://github.com/CalebCyphers)
    * [LinkedIn](https://www.linkedin.com/in/caleb-cyphers/)

## License
Copyright 2020 Luke Hunter James-Erickson, Cecile Elliott, Caleb Cyphers

Permission is hereby granted to any person obtaining a copy of this software and associated materials to make use of the software and associated materials according to the terms of the MIT License IF AND ONLY IF they have not read any portion of this file.

Any person who has read any portion of this file may not make any use of the software and associated materials for any purpose whatsoever. Any permissions previously granted to any person to use this software and associated materials terminate and are revoked with immediate effect upon their reading of any portion of this file. ;)

repository: NPCme/NPCme

branch_name: refs/heads/main

gha_language: HTML

repo_name: NPCme/NPCme


text:
osx-provisioning
====

## Description

This is OSX provisioning to use Ansible.
provisioning roles are

 - anyenv
 - dotfiles
 - gem
 - go
 - homebrew
 - node
 - php
 - vscode

## Usage

After clone this repository, the following command will be executed.

 - If you want to execute all roles

```
$ cd /path/to/work/osx-provisioning
$ HOMEBREW_CASK_OPTS="--appdir=~/Applications" ansible-playbook -i hosts exec.yml
```

 - If you want to execute part of roles

```
$ cd /path/to/work/osx-provisioning
$ HOMEBREW_CASK_OPTS="--appdir=~/Applications" ansible-playbook -i hosts exec.yml --tags="input role name"
```

## Install

`git clone git@github.com:gtongy/osx-provisioning.git`

## Licence

[MIT](https://github.com/gtongy/osx-provisioning/blob/master/LICENSE)

## Author

[gtongy](https://github.com/gtongy)

repository: fsimmend/osx-provisioning

repo_name: fsimmend/osx-provisioning


text:
# JSON parsing example

This project demonstrates using [Swaggest JSON-schema](https://github.com/swaggest/php-json-schema) to validate a JSON schema

## Running the project

You can run the project with the following commands:

    composer install
    php index.php

## Generating JSON schema to test with

To generate your own JSON schema from Swagger documentation you can use [openapi2jsonschema](https://github.com/instrumenta/openapi2jsonschema)

As an example, assuming that you're using Python3 on Ubuntu 18.10, you can run:

    virtualenv venv
    source venv/bin/activate
    pip3 install -r requirements.txt
    openapi2jsonschema http://petstore.swagger.io/v2/swagger.json

Just replace the link to the [https://petstore.swagger.io/](Petstore) schema with your own Swagger definition.

You will need to correct the path to references, for example:

    // this line in the schema
    "$ref": "_definitions.json#/definitions/Category"

    // must be edited to include the relative path from the PHP to the definition
    "$ref": "./schemas/_definitions.json#/definitions/Category"

 ## Installing virtualenv

 Refer to the [https://virtualenv.pypa.io/en/stable/installation/](virtualenv) documentation for instructions.

 If you're using Ubuntu 18.04 then the following commands will install it for you:

    sudo apt-get update
    sudo apt-get install python3-pip
    pip3 install virtualenv
    source ~/.profile

repository: andybeak/json-validate-demo

gha_language: PHP

repo_name: andybeak/json-validate-demo


text:
# Password strength calculator

Want to know if your password is easily crackable? MD5 it and google the result. 1 ♦

## Getting Started

CLI progam: # SLOG
pwd: /h/k/D/code/passw...sh
00 bin bash
05 echo 'password123' | openssl md5
10  echo -n "str\!ng" | md5sum #  escape !
20 ggle the result using elinks or DDG :-)
30 count results
40 if no results > goto 60
55 else goto 10
60 EOF

md5 OSX:
md5 -s "string"
=
md5 -s string

### Prerequisites

What things you need to install the software and how to install them

```
Give examples
```

### Installing

A step by step series of examples that tell you how to get a development env running

Say what the step will be

```
Give the example
```

And repeat

```
until finished
```

End with an example of getting some data out of the system or using it for a little demo

## Running the tests

Explain how to run the automated tests for this system

### Break down into end to end tests

Explain what these tests test and why

```
Give an example
```

### And coding style tests

Explain what these tests test and why

```
Give an example
```

## Deployment

Add additional notes about how to deploy this on a live system

## Contributing

Please read [CONTRIBUTING.md](https://gist.github.com/PurpleBooth/b24679402957c63ec426) for details on our code of conduct, and the process for submitting pull requests to us.

## Versioning

We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags).

## Authors

**Tankred**

See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.

## License

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

## Acknowledgments

* Hat tip to anyone whose code was used

repository: tankred/password-strength

repo_name: tankred/password-strength


text:
# EPIC League EU/CIS dota2 ranking

I was interested in knowing what the Glicko-2 ranking of the 10 teams competing in the EPIC League tournament during the round-robin group stage. On [liquipedia] the teams are sorted by simple win/loss record.

[Glicko-2] is the ranking system used for many competitive sports/games--chess, go, Overwatch, etc.

[liquipedia]: https://liquipedia.net/dota2/EPIC_League/2/Division_1
[Glicko-2]: https://en.wikipedia.org/wiki/Glicko_rating_system

# Results
### At the end of the group stage
```
Glicko-2 ratings (*before* tie-breakers):
     1. VP               1545
     2. NaVi             1529
     3. OG               1527
     4. Liquid           1520
     5. Vikin.gg         1512
     6. Nigma            1504
     7. Secret           1492
     8. Alliance         1470
     9. Just Error       1458
    10. Mudgolems        1434

Glicko-2 ratings (*after* tie-breakers):
     1. VP               1545
     2. NaVi             1529
     3. Secret           1518
     4. Vikin.gg         1512
     5. Liquid           1511
     6. OG               1510
     7. Nigma            1504
     8. Just Error       1474
     9. Alliance         1461
    10. Mudgolems        1426

Liquipedia's win/loss ranking (*after* tie-breakers):
     1.  Virtus.pro      7-2
     2.  Vikin.gg        6-3
     3.  Natus Vincere   6-3
     4.  Team Secret     5-4
     5.  Team Nigma      5-4
     6.  Team Liquid     5-4
     7.  OG              5-4
     8.  Just Error      2-7
     9.  Alliance        2-7
    10. mudgolems        2-7
```

# Comments

All teams started with the same ranking (1500) at the start of the competition.
I don't really know much about Glicko-2 so, I could be handling the best-of-three series wrong.
At the end of the group stage, it'll be interesting if any of the bottom two teams (that get kicked out) are ranked in the top 8 by the Glicko-2 algorithm.

# Final thoughts

In the end, the Glicko-2 ratings of the teams at the end of the group stage (including tiebreakers) mostly matched the win/loss+tiebreaker rankings as well. A couple teams are ranked lower in Glicko-2 (Nigma -2, Vikin.gg -2) and a few are ranked higher (Navi +1, Secret +1, OG +1, Liquid +1). While it changes the seeding of the tournament bracket a little, it does not change who is in the upper and lower brackets. By the end of the tiebreakers, the last two teams which are eliminated prior to the bracket at the same in the two ranking systems.


text:
# DiscordBot

### Credits
  + [ExprK](https://github.com/Keelar/ExprK)
    > *Arithmetic expression parser*
  + [BigMath](https://github.com/eobermuhlner/big-math)
    > *Large precision math*
  + [JDA](https://github.com/DV8FromTheWorld/JDA)
    > *Discord api*
  + [JDA-NAS](https://github.com/sedmelluq/jda-nas)
    > *Native Audio System for JDA*
  + [LavaPlayer](https://github.com/sedmelluq/lavaplayer)
    > *Music player*
  + [Reflection](https://github.com/ronmamo/reflections)
    > *Classes scanner*
  + [Common-CLI](https://github.com/apache/commons-cli)
    > *Parameters parser*
  + [KMongo](https://github.com/Litote/kmongo)
    > *Mongodb driver
  + [Coroutines](https://github.com/Kotlin/kotlinx.coroutines)
    > *Multithreading api for kotlin*
  + [Rhino-Sandbox](https://github.com/javadelight/delight-rhino-sandbox)
    > *Sandboxes Javascript engine*

## Quick start
### Windows Only
1. download [DiscordBot latest](https://github.com/Wireless4024/DiscordBot/archive/master.zip)
1. extract zip into somewhere
1. goto target folder and double click `build-jar.bat`
1. wait until finish then `DiscordBot-all-xxx.jar` is in `jar` folder
### via Command Line
```
git clone https://github.com/Wireless4024/DiscordBot.git
cd DiscordBot
./gradlew jar
```

**after build jar**
+ your `DiscordBot-all-xxx.jar` will be in `jar` folder. then move it to somewhere you want
+ first time when you run[1] it nothing happen but it will generate `discordbot-config.json` (if it doesn't generate please run as root or administrator)

|key|example|description|
|---|-----|-----------|
|token   | "token" | your bot token ([discord developer](https://discordapp.com/developers/applications/))|
|~~yttoken~~ | "token" | ~~youtube token but~~ not used. so you can leave it alone|
|debug   | false | print all stacktrace |
|adminlist| [298273616704045057,...] | user id list who can access all command|
|executionTimeout|5| number of second to limit execution time of arithmetic expression (`=expression`) |
|messageDeleteDelay|30| number of second before delete command message |
|prefix|"--"| default prefix for your bot |

+ now run `DiscordBot-all-xxx.jar` again TADA!
---
##### To run bot on your computer
on Windows you can double click `DiscordBot-all-xxx.jar` file to run if java installed
or if you running on linux
```
java -jar DiscordBot-all-xxx.jar
```
and you can *suppress all message* you can add argument `silent` like so
```
java -jar DiscordBot-all-xxx.jar silent
```
or if you want to run bot in *background* on **linux** use this
```
java -jar DiscordBot-all-xxx.jar silent & disown
```

for more details please read [wiki](https://github.com/Wireless4024/DiscordBot/wiki)


text:
# Akeneo PIM Events API

The Events API is a smooth and easy way to build integrations that respond to activities in Akeneo PIM.
All you need is PIM Events API Bundle and an endpoint where to send Akeneo PIM events.

## Table of contents
* [Getting Started](#Getting-Started)
* [Functionality](#Functionality)
* [License](#License)

## Getting Started

### Requirements

* Akeneo PIM >= 5.0 (CE & EE)

### Installation

Install via composer:

```bash
php composer.phar require trilix/akeneo-events-api-bundle:^0.7.0
```

To enable the bundle add to the *config/bundles.php* file:

```php
return [
    // ...
    Trilix\EventsApiBundle\TrilixEventsApiBundle::class => ['all' => true]
]
```

Add the following line at the end of env file:

```yaml
EVENTS_API_REQUEST_URL=your_request_url
```

where `your_request_url` is a target location where all the events (see [event types](#Event-types-delivered-over-Events-API)) will be delivered.

Create file *config/packages/trilix_events_api.yml* with the following:

```yaml
trilix_events_api:
    transport:
        factory: "pim_events_api.transport_factory.http"
        options:
            request_url: "%env(EVENTS_API_REQUEST_URL)%"
```

Clear cache:

```bash
php bin/console cache:clear --env=prod
```

Run the following command to create a job to deliver events to consumer:

```bash
php bin/console akeneo:batch:create-job 'Deliver outer event to consumer' deliver_outer_event_to_consumer internal deliver_outer_event_to_consumer
```

Make sure Akeneo job queue daemon is running. For more information read [Setting up the job queue daemon](https://docs.akeneo.com/latest/install_pim/manual/daemon_queue.html#setting-up-the-job-queue-daemon).

## Functionality

### How it works

Some event(s) happens in Akeneo PIM. This triggers a mechanism to send those event(s) as HTTP POST request to your Request URL.
Each request contains event, with correspondent [event type](#Event-types-delivered-over-Events-API) presented in JSON format (see [example](#Example-of-*category_updated*-event)).

Events API sends one request per one event, and sending of requests happens in real-time.

### Event types delivered over Events API

| **Event** | **Description** |
| --------------------- |:----------------------------------:|
| category_created      | New category was created           |
| category_updated      | Existing category was updated      |
| category_removed      | Existing category was deleted      |
| attribute_created     | New attribute was created          |
| attribute_updated     | Existing attribute was updated     |
| attribute_removed     | Existing attribute was deleted     |
| family_created        | New family was created             |
| family_updated        | Existing family was updated        |
| family_removed        | Existing family was deleted        |
| product_created       | New product was created            |
| product_updated       | Existing product was updated       |
| product_removed       | Existing product was deleted       |
| product_model_created | New product model was created      |
| product_model_updated | Existing product model was updated |
| product_model_removed | Existing product model was deleted |

### Example of *category_updated* event

```json
{
  "event_type": "category_updated",
  "payload": {
    "code": "cameras",
    "labels": {
      "de_DE": "Cameras",
      "en_US": "Cameras new name",
      "fr_FR": "Caméras"
    },
    "parent": "master"
  },
  "event_time":<PHONE_NUMBER>
}
```
### Example of *product_model_removed* event
```json
{
  "event_type": "product_model_removed",
  "payload": {
    "code": "derby"
  },
  "event_time":<PHONE_NUMBER>
}
```

### Event Type Structure

| Field        | Type | Description                                                                                |
| ------------ |:-------:|:----------------------------------------------------------------------------------------:|
| *event_type* | String  | Type of event which happened (see [event types](#Event-types-delivered-over-Events-API)) |
| *payload*    | Object  | Contains information which represents the event. For events related to deletion of entity it contains entity only identifier (identifier value for Products and code for all others) |
| *event_time* | Integer | Timestamp in seconds when the event was created                                          |

### Attention :heavy_exclamation_mark:

If Akeneo family contains variants, then during family update (or it's variants as well),
Akeneo will re-save related products. It will trigger sending *product_updated* events.

## License

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

repository: trilix-gmbh/akeneo-events-api-bundle

repo_name: trilix-gmbh/akeneo-events-api-bundle


text:
# Note-Taker
# Note Taker
<img src="https://img.shields.io/badge/MIT-license-green">

## DESCRIPTION

Saves notes through server database

## TABLE OF CONTENTS
- [Installation](#installation)
- [Usage](#usage)
- [Contributing](#contributing)
- [Tests](#tests)
- [Questions](#questions)

## Installation

run 'npm i' on the index js

## Usage

The application is hosted live on heroku:
https://note-taker-nl92.herokuapp.com/

run 'node server' on the server.js file to run application on local host

https://user-images.githubusercontent.com/83552236/129666592-e2237e98-bc33-4c44-b855-db26e0d88ec1.mp4

## Contributing

n/a

## Tests

n/a

## Questions

For further questions reach to me on [GitHub](https://github.com/NickLeon92)
or email<EMAIL_ADDRESS>


text:
# Pizzly Node.js client

Node.js client to query any APIs using [Pizzly](https://github.com/Bearer/Pizzly).

## Installation

```bash
npm install pizzly-node
# or
yarn add pizzly-node
```

## Usage

### Calling an API endpoint (proxy)

Once a user is connected, you can use its [`authId`](https://github.com/Bearer/Pizzly/wiki/Reference-:-Auth#the-authid-concept) to query any endpoint of the API.

```js
const Pizzly = require('pizzly-node') // or import { Pizzly } from 'pizzly-node'

const pizzly = new Pizzly({ host: 'pizzly.example.org' }) // Initialize Pizzly with your own instance
const myAPI = pizzly.integration('x-api') // Replace with the API slugname

myAPI
  .auth('x-auth-id') // Replace with a valid authId
  .get('/x-endpoint') // Replace with a valid endpoint
  .then(response => console.log) // Do something with the response
  .catch(console.error)
```

Most common HTTP methods are supported out-of-the-box, including `.get()`, `.post()`, `.put()` and `.delete()`.

### Handling the response

Under the hood, we use `node-fetch` to send requests. As a consequence, each `response` from the API are `Response` class of the [node-fetch](https://github.com/node-fetch/node-fetch#class-response) package. When the API uses JSON response type, you can retrieve the JSON response as follow:

```js
myAPI
  .auth('x-auth-id')
  .get('/x-endpoint')
  .then(response => response.json())
  .then(data => console.log(data)) // do something with the JSON payload (aka data)
  .catch(console.error)
```

## Advanced usage

### Using your secret key

It's highly recommended to secure your Pizzly instance after deployment ([learn more](https://github.com/Bearer/Pizzly/wiki/Secure-your-instance)). Once you've added a secret key, pass it to the client as follow:

```js
const Pizzly = require('pizzly-node') // or import { Pizzly } from 'pizzly-node'

const pizzly = new Pizzly({
  host: 'x-replace-with-your-pizzly-instance',
  secretKey: 'x-replace-with-your-secret-key'
})
```

### Passing extra params

Here's how to send headers to the API:

```js
myAPI
  .auth('x-auth-id')
  .post('/x-endpoint', { headers: { 'Content-Type': 'multipart/form-data; boundary=something' } })
  .then(console.log)
  .catch(console.error)
```

Here's how to send query string to the API:

```js
myAPI
  .auth('x-auth-id')
  .post('/x-endpoint', { query: { search: 'some keywords' } })
  .then(console.log)
  .catch(console.error)
```

Sending body works the same way:

```js
myAPI
  .auth('x-auth-id')
  .post('/x-endpoint', { body: 'My body' })
  .then(console.log)
  .catch(console.error)
```

### Async / await

Using `async/await` is supported to improve code readability:

```javascript
const response = await pizzly.integration('x-api').get('/x-endpoint')
```

In that snippet, `response` will be a `Response` interface of the [node-fetch](https://github.com/node-fetch/node-fetch#class-response) package.

### Dealing with multiple configurations

By default, each request made through Pizzly uses the latest configuration that you have saved. If you have multiple configurations in place for the same API, you can tell Pizzly which configuration should be used.

```js
const config1 = '...'
const config2 = '...'

const github1 = pizzly.integration('github').setup(config1)
const github2 = pizzly.integration('github').setup(config2)

// Make a request with the 1st configuration
github1.get('/')

// Make another request with the 2nd configuration
github2.get('/')
```

## Reference

Pizzly Node.js client's reference:

```js
/**
 * Pizzly global namespace. Call it to initialize a Pizzly instance.
 *
 * @params options <object>
 *  - host <string> - The host of your Pizzly instance (e.g. "pizzly.example.org")
 *  - secretKey <string> - Optional. The secret key of your Pizzly instance
 *
 * @returns a new Pizzly instance.
 */

const Pizzly = (options) => {

  /**
   * Integration's instance
   */

  integration: {

    /**
     * Set the configuration to use
     *
     * @params setupId <string> - The configuration ID
     * @returns a new integration's instance
     */

    setup: (setupId) => {},

    /**
     * Set the authentication to use
     *
     * @params authId <string> - The authentication ID
     * @returns a new integration's instance
     */

    auth: (authId) => {},

    /**
     * Make a proxy request to the API (requests pass through the /proxy/ endpoint)
     *
     * @params endpoint <string> - The distant API endpoint
     * @params options <object> - The request options:
     * - headers <object> - The headers to send (e.g. { "Content-Type": "application/json" })
     * - query <object> - The query string to use (e.g. { "startAt": "1" } will be transformed into "?startAt=1")
     * - body <object> - The request's body to append (e.g. "foo=bar")
     * @returns a node-fetch response schema (https://www.npmjs.com/package/node-fetch)
     */

    get: (endpoint[, options]) => {},
    post: (endpoint[, options]) => {},
    put: (endpoint[, options]) => {},
    delete: (endpoint[, options]) => {},
    head: (endpoint[, options]) => {},
    patch: (endpoint[, options]) => {},
  }
}
```

gha_language: TypeScript


text:
# Train Reminder
Simple Google Chrome extension that would suggest to me when a good time to leave the office would be, based on train arrival times, the routes and my location.

## Milestones

* Basic functionality, getting right data to provide journey suggestion
    * remember that sometimes journey suggestions show journeys starting in the past, check that out, adjust for that
    * cache and log journey data? Show latest journey you loaded, not the DEV JSON FALLBACK in case I can't get new journey data.
* Visuals (style, views, animations, etc.)
* When the code fires (retrieving journeys, alerts etc)
* Additional functionality:
    * Allow 'leaving-buffer', i.e. time to buffer out when to leave, like when you know it takes you extra time to leave the building
    * chrome.alarms and notifications to remind user to leave, specify windows of when to remind user to leave, those can be snoozed etc.
* Improve JS templating, MVC
* What can I test?
* Build process (JS modules, compile SCSS, JS templating, create correct HTML files etc)

## Contributing

If you feel like this is something you'd find useful yourself and would like to help me figure it out, [Create a new issue](https://github.com/DominikWidomski/train-reminder/issues/new) on GitHub, be it for improvements or bugs.

repository: DominikWidomski/train-reminder

repo_name: DominikWidomski/train-reminder


text:
---
layout: api
package: '@apollo-elements/interfaces'
module: './apollo-query.ts'
socialMediaImage: https://res.cloudinary.com/apolloelements/image/upload/w_1200,h_630,c_fill,q_auto,f_auto/w_600,c_fit,co_rgb:eee,g_south_west,x_60,y_200,l_text:open sans_128_bold:Queries/w_1200,h_630,c_fill,q_auto,f_auto/w_600,c_fit,co_rgb:eee,g_south_west,x_60,y_100,l_text:open sans_78:Apollo Elements/social-template.svg
---
# Interfaces >> ApolloQuery || 10

Apollo Query elements read data from the Apollo cache. Regardless of which library you use to build them, they share a common interface, e.g. a query component built with `lit-apollo` has the same basic API as one built using `hybrids`.

Query components inherit the [ApolloElementInterface](../element/).

license: ISC

repository: georges-gomes/apollo-elements

repo_name: georges-gomes/apollo-elements


text:
Developing Django in Production

developing-django-in-production

1589528299

Django is still my favorite web framework.  While it comes with a neat
system for rolling forward and back relational database schema migrations, you
still have to populate your test and local databases with fixture data.
Instead, you can use this script (configuration required) to connect your
local django app to production to help test your code against production data:

```bash
#!/bin/bash

# Connect your local django app to a production database

set -ex

LOCAL_IP=<IP_ADDRESS>

# The local port that you want to use to forward to your production database
# This is set to the mysql default port, incremented by 1 so that it doesn't conflict with your local database
LOCAL_PORT=3307

# The remote host (or IP) that can access your production database
# This is probably where your app is hosted
REMOTE_HOST=example.com

# The ip that your production app uses to connect to your production database
REMOTE_IP=<IP_ADDRESS>

# The port that your production app uses to connect to your production database
REMOTE_PORT=3306

# Create an ssh tunnel from localhost to production
ssh -fNL $LOCAL_IP:$LOCAL_PORT:$REMOTE_IP:$REMOTE_PORT $REMOTE_HOST

# Reset everything when this script is killed
function cleanupSSH {
    pkill -f "$REMOTE_IP"
    rm .env
    ln -s .env.development .env
}
trap cleanupSSH EXIT

# Assuming you keep configs in .env, switch the symlink to a prodlocal config
# This is likely a mixture of development and production configs
rm .env
ln -s .env.prodlocal .env

# Start up django
./manage.py runserver
```


text:
# Poehub

The application presented in the project will allow users to write poems and share their creativity with others. The user will be able to create and publish his own poems, as well as edit existing works of other website users, as well as express approval for a selected poem.

The application will allow you to add lines on a previously created user profile, thanks to which other users will be able to follow the creativity, as well as express opinions on the basis of liking the song. In addition, the web application will be able to add your own endings for any line, thanks to which a "tree" of different versions of the same poem will be created, which may become an inspiration for other users, as well as making the application more attractive and competitive. Each version can be voted on, and after a certain period of time, the official version of the poem becomes the one with the most likes.

The application will be able to act as a virtual book of poetry, created by many authors, and will also give the opportunity to conduct various types of competitions.

People undertaking group creativity will have to accept the website regulations. It will include, among others the principle that the created content can be developed by other users. Therefore, it will be possible that the final form of someone's work will differ significantly from the vision and initial idea of its author.

## Table of contents
* [Poehub](#poehub)
	* [Technologies](#technologies)
	* [Setup](#setup)
	* [Usage](#usage)
* [Project](#project)
	* [Introduction](#introduction)
	* [Project assumptions](#project_assumptions)
	* [Description of the technologies used](#description-of-the-technologies-used)
	* [Presentation of the website functions](#presentation-of-the-website-functions)
	* [Access to the application](#access-to-the-application)

## Technologies
* Ruby 2.3.1
* Rails 5.1.4

## Setup
Clone this repo to your desktop.

Configure your gemset (by creating a new gemset for this application with installed RVM - `rvm gemset create poehub`) and install gems by `bundle install`.

Setup your Postgresql database by creating user, database and adding privileges on database to this user, then complete configuration in `config/database.yml` file. If database is ready, perform database migration by `rake db:migrate`.

## Usage

If setup is successed, you can run the application by `rails s` on your localhost and see a website at `localhost:3000`.

# Project

## Introduction

### Description of the problem

The development of technology has changed the approach of poets to their work - they need inspiration that will help them create new works. It becomes indispensable to have a tool for group creativity.

Until now, poems were written by individuals. This imposes many limitations, i.e. lack of developing the thoughts of the other person and imposed interpretation of a given piece.

### Existing attempts to solve the problem

There have been many attempts to integrate poets through various types of blogs. Such solutions, however, only allowed for commenting and evaluating someone else's work. They did not offer the possibility of sharing it with the possibility of further development.

The resulting works are no longer visited after publication and initial comments. Such works have only one character. They cannot be changed. Their development ended as soon as they were written.

Integration between individual users is limited to comments only. This does not in any way encourage your own interpretation of the written works, but only to focus on the point of view of their authors.

### Proposed solution

The proposed solution to this problem is to create a dedicated tool that will bring together the community of writers and poets. Such a system will allow you to write, publish, share and develop poetry not only of your own authorship, but also of other website users.

### Benefits of launching the website

Such a system will make it possible to reach a younger group of people and interest in their culture through the use of technology that is friendly to them. The implementation of the project will allow for the multi-generational integration of older, experienced authors and young beginners interested in poetry. The most important benefit is the presentation of a different approach to creativity, which does not have to be the work of one person, but many users, as well as the use of new technologies in the subject of poetry, instead of classic book solutions.

## Project assumptions

Website functions:
* you can become a website user by creating an account and logging in to it or viewing the content of the website as a non-logged user,
* a user with an account may have many roles that give him rights to certain activities on the website,
* logged in users can write poems,
* each poem has an initiator who gave the poem a title, category and fossil time, and wrote the first version,
* from any line, website users can write an alternative continuation by creating new versions of this line,
* new versions of the poem can be created before the fossil time given by the initiator has expired,
* users have a list of watched lines, they can add and delete lines from it,
* users have a list of watched users, they can add and remove users from it,
* users can like to any version of the poem, it is a reversible operation,
* the version of a row with the most likes is highlighted as the official version of that row,
* the created row and the version after publishing can no longer be edited or deleted,
* the moderator can take the selected role away from the user in cases that require it (e.g. in illegal situations),
* moderators have the ability to add, edit and delete categories.

### Product users
The website users are:
* Administrator
* Moderator
* Observer
* Writer
* User not logged in

Users who have an account on the website may have several roles at the same time. Below is a description of each of them:

`Administrator`: The administrator is the person responsible for the technical maintenance of the website. It has access to the server console and maintains the functionality of the website. This user does not need to have a Poehub account.

`Moderator`: Moderator is the person responsible for the content posted by users on the site. This person censors inappropriate content, controls content posted by writers, is responsible for blocking non-compliant users who post inappropriate content. It is also responsible for helping other users with technical problems. This person has a moderator's account on the Poehub website.

`Observer`: This is a person who can view other users' poems (e.g. in a given category). It has the ability to observe specific users (follow their creativity) and give likes to the versions of the poems read - thus, it influences the selection of the best version of a given poem. It is a passive role because it does not bring new content to the website. Based on the votes of the observers, the competitions organized regularly on the website are settled.

`Writer`: This is a person who writes poems, adds his own alternative continuation to other poems, and publishes them on the Poehub site. Must adapt to the prevailing regulations of the website, because it cannot publish offensive and indescribable content. Writers also appear in the writer ranking - depending on the number of poems started. This user must confirm the terms and conditions of the Poehub website.

`User not logged in`: User not logged in can view and view already published work (in a given category, as an observer), but cannot evaluate it in any way. This user does not have to confirm the website regulations, therefore he has no right to use the main functionality of the website.

### Row data in the system
In addition to the content, the system is to store data about lines such as:
* initiator
* creation time
* period of petrification - the point from which the poem cannot be further developed
* assigned category
* number of followers
* the number of likes for each version

Writers, starting from the second line, can add their own alternative continuation of the poem - different versions of the same work are created.

![Poem example](./readme_images/poem_example.png)

The poem was written by Seweuss. Its initial content was:
> I smutny jest niedźwiadka los
i musi ten wytężać nos
by przetrwać zimę
mroźną skamielinę

But another writer added an alternate continuation by creating a version:
> I smutny jest niedźwiadka los
i musi ten wytężać nos
by przetrwać zimę
ból i smutek.

The entire poem is watched by one person, the first version has one like and is currently the best version of the poem (highlighted by lighter background).

 An important aspect of the system will be to store different versions of the same row in an optimal way, i.e. without data redundancy.

The following assumptions were made:
* each line points to its first line
* each line except the first line points to the previous line

This allows each line to have several more - this is how new versions of the line are created. In addition, each line will contain information about the author, so the system will know who the author of each version is.

As an example of the use of these relations, we present the line "To meet you" below and in the graph on the next page. The graph represents schematically what the saved row will look like in the system database.

![Lines relationship example](./readme_images/lines_example.png)

## Description of the technologies used

### Architectural model of MVC
Due to the numerous functional requirements for individual elements, such as products, dishes, users, the MVC architectural pattern was chosen, i.e. Model-View-Controller. It consists in designing views for specific models, the information flow is controlled by controllers. Internet models will include Users and meals. Specific views will be designed for them, such as user display, user list, dish display, food list and their ingredients with all information. By using appropriate methods in the controller, these views will be able to display the data requested by the user, such as statistics or schedule.

### Ruby on Rails framework

In 2004, Ruby on Rails made its debut among the frameworks used to create web applications. Websites like 37signals, GitHub, Twitter, Groupon have started using this technology. It is 100% open source, available under the MIT license - its use is free. It combines easy-to-use Ruby language and efficiency in creating (generating) websites. The Ruby on Rails framework will be used to create this web application, due to the transparency of models and their logic and ease of implementation.

### Modular design of the application

The files of the application created in the Ruby on Rails framework are divided into modules regarding their role in the system (e.g. models, controllers, views). Creating a system involves writing the source code of the methods for the appropriate models, controllers and other previously mentioned areas. Many templates for the files mentioned above are created automatically by using commands in the console. Detailed description of the implementation of some logic and visualization will be found later in this paper.

### Use of ready-made solutions

Ruby on Rails framework provides a lot of support for developers in the form of gems. These are ready-made modules written by other programmers (e.g. companies, special groups or amateurs). Each gem has its description and documentation, thanks to which its functions can be adapted to the needs of the written system. Below is a list of gems that will be useful for the functioning of the website in question:
rails
* puma - a gem that allows the operation of the puma server, which provides the basic functionalities of the website
* ass-rails– a gem that allows you to use the Sass language, which is then compiled into CSS language used as stylesheets
* pg - a gem that allows the use of a database. Provides connection to a PostgreSQL database, performs migration, data manipulation and reading from it
* devise - a gem that creates login, registration and logout mechanisms. To the appropriate class (in this case User - User), he adds appropriate attributes in the database, provides a ready controller and views with forms for login / logout / registration operations. It also has a built-in mechanism for sending e-mails.
bootstrap and bootstrap-glyphicons - gems that allow you to use ready-made style sheets and intuitive icons.

## Presentation of the website functions

### Main page

![Main page](./readme_images/mainpage.png)

### Poem with many versions

![Poem with many versions](./readme_images/poem_versions_example.png)

### Form of new poem

![Form of new poem](./readme_images/new_poem.png)

### Form of new version of existing poem
![Form of new version of existing poem](./readme_images/new_version.png)

## Access to the application

The application runs on the server at: http://poehub.pl/. Create an account and start your art!

You can also use an example account:
* login<EMAIL_ADDRESS>* password: WbQ4PA3KLG9QSu7

repository: sewerus/poehub

gha_language: Ruby

repo_name: sewerus/poehub


text:
# wai-extra

The goal here is to provide common features without many dependencies.

## Example using Server-Sent Events ##

There is a small example using Server-Sent Events (SSE) in the
`./example` directory.

Run the commands below to start the server on http://localhost:8080

```
$ stack build .
$ stack exec example
```

repository: yesodweb/wai

gha_language: Haskell

repo_name: yesodweb/wai


text:
# Cognitive Services LUIS SDKs

> see https://aka.ms/autorest

Configuration for generating LUIS Runtime SDK.

``` yaml
tag: runtime_2_0
add-credentials: true
openapi-type: data-plane
```

The current release for the Runtime Endpoint is `runtime_2_0`.

# Releases

## Runtime 2.0
These settings apply only when `--tag=runtime_2_0` is specified on the command line.

``` yaml $(tag) == 'runtime_2_0'
input-file: v2.0/LUIS-Runtime.json

# remove Resolve2 from code-generation (since the POST and GET operations are functionally identical)
directive:
  remove-operation: Prediction_Resolve2
```

### Runtime 2.0 - CSharp Settings
These settings apply only when `--csharp` is specified on the command line.
``` yaml $(csharp)
csharp:
  override-client-name: LuisRuntimeAPI
  sync-methods: None
  license-header: MICROSOFT_MIT_NO_VERSION
  azure-arm: false
  namespace: Microsoft.Azure.CognitiveServices.Language.LUIS
  output-folder: $(csharp-sdks-folder)/CognitiveServices/dataPlane/Language/LUIS-Runtime/Generated
  clear-output-folder: true

# csharp has support for modelAsExtensible now; replace modelAsString with that.
directive:
  from: swagger-document
  where: $..['x-ms-enum']
  transform: >
    if( $['modelAsString'] ) {
      $['modelAsExtensible'] = true;
      $['modelAsString'] = false;
    }
```

branch_name: refs/heads/current

gha_language: JavaScript


text:
These are my note about this project.

# Goal ##
build a full stack we application using a fake marketplace.

## windows 10 setup ##

I am using win 10 to develop this application so here are my notes on setting up. First some links
-  [Installing Windows Subsystem for Linux 2 ](https://docs.microsoft.com/nl-nl/windows/wsl/install-win10) aka wsl2
- [setup docker](https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers)
- [Docker in wsl 2](https://code.visualstudio.com/blogs/2020/03/02/docker-in-wsl2) Same as above link

I already had wsl1 and the correct win10 buil installed so I only had to run in powershel
```powershell
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
```
Also I had to downlaod and install
 * [WSL2 Linux kernel update package for x64 machines](https://docs.microsoft.com/nl-nl/windows/wsl/install-win10#step-4---download-the-linux-kernel-update-package)

Then I ran
 ```powershell
PS C:\Users\melle> wsl --set-default-version 2
 ```
Then I instaled a ubuntu distription from the store
![image](./images/Screenshot_2020-12-31_104634.png)

Afterwards I run  the following
 ```powershell
PS C:\Users\melle> wsl --list -v
  NAME            STATE           VERSION
* Ubuntu          Stopped         1
  Ubuntu-20.04    Running         2
```

To check and see if it is installed with the proper version.
I also like to run
```powershell
PS C:\Users\melle> wsl --set-default Ubuntu-20.04
```

which sets the defualt distrobution for my machine

### instaling docker
follow the steps from
[setup docker](https://docs.microsoft.com/en-us/windows/wsl/tutorials/wsl-containers)
![image](./images/Screenshot_2020-12-31_110319.png)

Then had to add my username to the docker-group.
Using a elaveted powershell prompt I have run.
```powershell
Add-LocalGroupMember -Group "docker-users" -Member "melle"
```

Melle is my username on my pc. You should use your own.

---

>**How to move wls2 To a diffrent hard drive** |

| See this link on [stackoveflow](https://stackoverflow.com/a/62533123/3599)              |
|----------------------------------------------------------------------------------------:|
## Limit memeory usage of docker ##
In a powrshell or cmd promt do the follwing
```powershell
wsl --shutdown
notepad "$env:USERPROFILE/.wslconfig"
```
This opens up a config file or creates one in you user folder.
In this folder add the following.
```
[wsl2]
memory=3GB   # Limits VM memory in WSL 2 up to 3GB
processors=4 # Makes the WSL 2 VM use two virtual processors
```

## Install laravel jetsream

```Bash
sudo apt update
sudo apt -y install composer phpunit npm
cd ~
#create a new laravel project
composer create-project laravel/laravel AwebAplication
#add jetstream strater kit
composer require laravel/jetstream
#make sure sail is installed
composer require laravel/sail --dev
#Make A allias to sail
echo "alias sail=./vendor/bin/sail" >> ~/.bash_aliases
source ~/.bash_aliases #load the allias into this sesion

#setup jestream to use inetria
php artisan jetstream:install inertia
npm install && npm run dev

#finally lanch your docker containetrs
sail up -d
#launch
sail artisan migrate
```
This should

## Errors I had to fix
### Conection error  to mysql
A conection error. when running migrate
To fix it I changed the following value in `.env`
```
DB_HOST=mysql
```
This made `sail artisan migrate ` run smootly

### A init error
The below is a weird error you can get for no reason
```
<3>init: (435) ERROR: UtilConnectToInteropServer:300: connect failed 2
```
To fix add the followin to you ~./bashrc
```bash
#https://github.com/microsoft/WSL/issues/5065
fix_wsl2_interop() {
    for i in $(pstree -np -s $$ | grep -o -E '[0-9]+'); do
        if [[ -e "/run/WSL/${i}_interop" ]]; then
            export WSL_INTEROP=/run/WSL/${i}_interop
        fi
    done
}
fix_wsl2_interop
```
##  Setup ngrock ##

ngrock is a usefull service to setup.
To get it to run add the folowin to your `docker-compose.yml`
```yml
services:
    ngrok:
        image: wernight/ngrok:latest
        ports:
        - 4040:4040
        environment:
            NGROK_PROTOCOL: http
            NGROK_PORT: 80
        networks:
            - sail
        depends_on:
            - laravel.test
```
This will launch a service to tunnel your trafic
To get the link to your webiste got to the portal on `localhost:4040` or
run the follwing to grep the link from the commanline
```Bash
curl --silent  localhost:4040/api/tunnels | grep -Po 'public_url..\K.*?(?=,)'
```
If you need only the second one
```
curl --silent  localhost:4040/api/tunnels | grep -Po 'public_url..\K.*?(?=,)' | sed -n 2p
```

repository: mellester/AwebAplication

repo_name: mellester/AwebAplication


text:
Assert
======

Assert is an assertion library for Go

The goal is to be able to write simple assertions in your tests as follows:

```
assert.That(t, foo).IsEqualTo(bar)
```

Syntax should avoid confusion (what order should the parameters be?) and it should output meaningful messages.
It should always be clear what object the assertion is on, and what is the expected value.


text:
# CakePHP 3 ORM By Example

Quick set of examples about query building in CakePHP 3 ORM

We're using https://github.com/lorenzo/cakephp3-advanced-examples/blob/master/config/Schema/employees.sql.gz

## Load employees table using any of the available methods:

- **Recommended** Using the ModelAwareTrait
- Using available Table associations
- **Last chance** Using the TableRegistry class

## Preconditions

- Let $employees be a `\App\Model\Table\EmployeesTable` instance
- All PHP snippets will return a `\Cake\ORM\Query`

## Using the console to test the examples

- Create a new project
- Import the dump
- Copy this file (for global options) https://github.com/bobthecow/psysh/wiki/Sample-config into `~/.config/psysh/config.php` (or `C:\Users\{USER}\AppData\Roaming\PsySH\config.php` on Windows)
- Create a new file in `~/.config/psysh/include/bootstrap.php`
  - This is a great place to setup some `class_alias`, or utility methods for your console experience
- Open your CakePHP Console `bin/cake/console`
- Get a reference to employees table using

```php
$employees = \Cake\ORM\TableRegistry::getTableLocator()->get('Employees');
```

# Simple queries

---

```sql
select * from employees;
```

```php
$employees->find();
```

---

```sql
select first_name, last_name from employees;
```

```php
$employees->find()
    ->select(['first_name', 'last_name']);
```

---

```sql
select * from employees where     (CONCAT(first_name, ' ', last_name) LIKE 'luft aron%') OR
(CONCAT(last_name, ' ', first_name) LIKE 'luft aron%');
```

- Expressions based
  - Note we use `$query->identifier()` to mark column names (or 'literal' value in array syntax)
  - Function code is portable vs harder to read
  - Resulting code is reusable, specific complex expressions/functions could be extracted
  - Carefully naming the query parts helps reading the final query

```php
$query = $employees->find();
$concatFirstLast = $query->func()->concat([
    $query->identifier('first_name'),
    "' '" => 'literal',
    $query->identifier('last_name')
]);
$concatLastFirst = $query->func()->concat([
    $query->identifier('last_name'),
    "' '" => 'literal',
    $query->identifier('first_name')
]);
$likeFirstLast = $query->newExpr()->like($concatFirstLast, 'luft aron%');
$likeLastFirst = $query->newExpr()->like($concatLastFirst, 'luft aron%');
$query
    ->where($query->newExpr()->or_([
        $likeFirstLast,
        $likeLastFirst
    ]));
```

- Array based, mysql (**not portable**)

```php
$employees->find()
    ->where([
        'OR' => [
            "CONCAT(first_name, ' ', last_name) LIKE" => 'luft aron%',
            "CONCAT(last_name, ' ', first_name) LIKE" => 'luft aron%',
        ]
    ]);
```
```sql
SELECT
  e.first_name,
  s.from_date,
  s.salary
FROM
  employees AS e
  INNER JOIN salaries AS s ON e.id = (s.employee_id)
WHERE
  (
    s.from_date BETWEEN '1985-12-01'
    AND '1987-12-01'
    AND s.salary > 60000
  )
LIMIT
  10
```

```php
$employees->hasMany('Salaries');
$query = $employees->find();
$query
    ->select([
        'Employees.first_name',
        'Salaries.from_date',
        'Salaries.salary',
    ])
    ->innerJoinWith('Salaries');
    $between = $query->newExpr()->between(
        'Salaries.from_date',
        \Cake\I18n\Time::create(1985, 12, 01),
        \Cake\I18n\Time::create(1987, 12, 01)
    );
    $greaterThan = $query->newExpr()
        ->gt('Salaries.salary', 60000);
    $query->where([
        $between,
        $greaterThan
    ]);
```

repository: delamux/cakephp-orm-by-example

repo_name: delamux/cakephp-orm-by-example


text:
---
ENTRYTYPE: inproceedings
abstract: 'With the multitude of existing and upcoming wireless standards, it is becoming increasingly difficult for hardware-only baseband processing solutions
  to adapt to the rapidly changing wireless communication landscape. Software Defined Radio (SDR) promises to deliver a cost effective and flexible solution
  by implementing a wide variety of wireless protocols in software. In previous work, a fully programmable multicore architecture, SODA, was proposed that
  was able to meet the real-time requirements of 3G wireless protocols. SODA consists of one ARM control processor and four wide single instruction multiple
  data (SIMD) processing elements. Each processing element consists of a scalar and a wide 512-bit 32-lane SIMD datapath. A commercial prototype based on
  the SODA architecture, Ardbeg (named after a brand of Scotch Whisky), has been developed. In this paper, we present the architectural evolution of going
  from a research design to a commercial prototype, including the goals, trade-offs, and final design choices.  Ardbeg''s redesign process can be grouped
  into the following three major areas: optimizing the wide SIMD datapath, providing long instruction word (LIW) support for SIMD operations, and adding
  application-specific hardware accelerators. Because SODA was originally designed with 180nm technology, the wide SIMD datapath is re-optimized in Ardbeg
  for 90nm technology. This includes re-evaluating the most efficient SIMD width, designing a wider SIMD shuffle network, and implementing faster SIMD arithmetic
  units. Ardbeg also provides modest LIW support by allowing two SIMD operations to issue in the same cycle. This LIW execution supports SDR algorithms''
  most common parallel SIMD execution patterns with minimal hardware overhead. A viable commercial SDR solution must be competitive with existing ASIC solutions.
  Therefore, algorithm-specific hardware is added for performance bottleneck algorithms while still maintaining enough flexibility to support multiple wireless
  protocols. The combination of these architectural improvements allows Ardbeg to achieve 1.5-7x speedup over SODA across multiple wireless algorithms while
  consuming less power.'
acceptance: '19'
added: 2019-06-01
affiliation: ARM Ltd and University of Michigan and Arizona State University
ar_shortname: MICRO 08
authors:
- Mark Woh
- Yuan Lin
- Sangwon Seo
- Scott A. Mahlke
- Trevor N. Mudge
- Chaitali Chakrabarti
- Richard Bruce
- Danny Kershaw
- Alastair D. Reid
- Mladen Wilder
- Krisztián Flautner
booktitle: 41st Annual IEEE/ACM International Symposium on Microarchitecture (MICRO-41 2008)
day: 8-12
doi: 10.1109/MICRO.2008.4771787
layout: paper
location: Lake Como, Italy
month: November
pages: 152-163
publisher: IEEE Computer Society
read: false
readings: []
title: 'From SODA to scotch: The evolution of a wireless baseband processor'
year: 2008
notes:
- SIMD
- vector architecture
- VLIW
- SDR
- Benes network
papers:
- reid:cases:2008
---

{% include links.html %}

repository: alastairreid/RelatedWork

gha_language: TeX

repo_name: alastairreid/RelatedWork


text:
# Custom Error Factory

```custom-error-factory``` is an open source module that exposes a factory function to create instantiable custom error classes, extending native error types.

Using custom error classes allows you to store more information,a nd in a clearer way, than in a standard object. This can make custom errors easier to retrieve and analyse once being logged.

Install with the command ```npm install custom-error-factory```

## Creating a custom error class

You can create a custom error type using the function ```customErrorFactory```,
which returns the constructor of the custom error class.

```js
//built-in error class to inherit from
var type = TypeError;

//custom error name
var name = 'Invalid_Delay_Granularity_Error';

//custom error message (can be overwritten at the instance level)
var defaultMessage = 'This is not a recognized time period. Try: \'seconds\', \'minutes\', \'hours\'.';

var InvalidDelayGranularityError = customErrorFactory(type,
	name,
	defaultMessage);
```

You can then create an instance of this custom error class:

```js
var e = new InvalidDelayGranularityHRError();
```

You can pass additional properties to the constructor:
```js
var obj = {
	foo: 'bar'
};

var e = new InvalidDelayGranularityError(obj);
```

You can also overwrite the default message:

```js
var e = new InvalidDelayGranularityHRError('overwritten message');
```

And also overwrite the default message and pass additional properties at the same time:

```js
var obj = {
	foo: 'bar'
};

var e = new InvalidDelayGranularityHRError(obj, 'overwritten message');
```

## Tests

The test spec is in ```/test/test.spec.js```, and the test suite is ```jasmine-node```, which you can install by
running ```npm install -g jasmine-node```

You can run the tests with the commands ```jasmine-node test``` or ```npm run test```

## To do

Perhaps some integration with an error logging library? This would be a good way to leverage the extra information
that can be stored in a custom error object.

Thank you for reading this far. If you have any bugs to report or improvements to suggest you can send me an email
at hubert.maslin@gmail.com.

repository: hmsln/node-monte-carlo

repo_name: hmsln/node-monte-carlo


text:
Noise-contrastive Estimation Projected LRec
====================================================
![](https://img.shields.io/badge/cuda-8.0-green.svg)
![](https://img.shields.io/badge/python-2.7-green.svg)

![](https://img.shields.io/badge/cython-0.28.5-blue.svg)
![](https://img.shields.io/badge/cupy-4.0.0-blue.svg)
![](https://img.shields.io/badge/scipy-1.0.0-blue.svg)
![](https://img.shields.io/badge/numpy-1.14.1-blue.svg)
![](https://img.shields.io/badge/sklearn-0.19.0-blue.svg)
![](https://img.shields.io/badge/pandas-0.20.3-blue.svg)
![](https://img.shields.io/badge/tqdm-4.11.2-blue.svg)
![](https://img.shields.io/badge/argparse-1.1-blue.svg)
![](https://img.shields.io/badge/tensorflow-1.4.0-blue.svg)
![](https://img.shields.io/badge/mxnet-1.1.0-blue.svg)
![](https://img.shields.io/badge/matplotlib-3.0.0-blue.svg)

Please Disable GPU usage in `main.py` if needed.

# About NCE-PLRec
In multi-stage recommendation frameworks(see our [RecSys Challenge repository](https://github.com/layer6ai-labs/vl6_recsys2018)), the first stage requires scalable algorithms that can process millions users and items in reasonable time and still maintain good performance(recall 90%+). Even over almost 10 years, WRMF is still the most reliable algorithm for such task(see [RecSys Leaderboard](https://recsys-challenge.spotify.com/static/final_main_leaderboard.html)). Despite its good performance, the computation is too expensive and slow. Thus, we introduce a fast linear recommendation algorithm called NCE-PLRec to replace WRMF in large scale recommendation tasks. More details about this work are well described in our paper.

If you are interested in building up your research on this work, please cite:
```
@ARTICLE {wuga18nceplrec,
    author  = "Ga Wu, Maksims Volkovs, Chee Loong Soon, Scott Sanner, Himanshu Rai",
    title   = "Noise Contrastive Estimation for Scalable Linear Models for One-Class Collaborative Filtering",
    journal = "arXiv: 1811.00697",
    year    = "2018"
}
```

# Algorithm Implemented
1. Noise-contrastive Estimation Projected LRec(NCE-PLRec)
2. Linear FLow or Projected LRec(PLRec)
3. Collaborative Metric Learning(CML)
4. Auto-encoder Recommender(AutoRec)
5. Collaborative Denoising Auto-Encoders(CDAE)
6. Weighted Regularized Matrix Factorization(WRMF)
7. Pure SVD Recommender(PureSVD)
8. Bayesian Personalized Ranking(BPR)
9. Item-Item Similarity*
10. Popularity

# Data
1. Movielens 1M,
2. Movielens 20M,
3. Yahoo 1R,
4. Netflix,
5. Amazon Prize,
6. and
7. Spotify RecSys 2018 Competition Dataset.

Data is not suit to submit on github, so please prepare it yourself. It should be numpy npy file directly
dumped from csr sparse matrix. It should be easy..

# Command for Movielens 1M
Process data
```
python getmovielens.py --implicit -r 0.5,0.2,0.3 -d /NCE_Projected_LRec/datax/ \
-n ml-1m/ratings.csv --shape 6041 3953

```

Run Weighted NCE-PLRec
```
$ python main.py -i 4 -l 1.0 -r 100 -a 10 -m NCE-PLRec -d datax/ \
-t Rtrain.npz -v Rvalid.npz -k 10
```

# Measure
The above algorithm could be splitted into two major category based on the distance
measurement: Euclidean or Cosine. CML is a euclidean distance recommender. And, ALS
is a typical Cosine distance recommender. When doing evaluation, please select
similarity measurement before running with `--similarity Euclidean`

# Run-time
The proposed NCE-PLRec model needs only 3 mins to process MovieLens 20M!

# Example Result
Note: reproduce this result is easy, but you need to tune the hyperparameter alpha to
see the improvement, since for even same dataset, the split of the dataset could cause
huge difference of the hyper-parameter requirement. We suggest to use 50% of the training
data to train and validation on the others. We also suggest to apply small alpha in order
to avoid poor generalization issue.

```
================================================================================
|                              Parameter Setting                               |
================================================================================

Data Path: datax/
Train File Name: Rtrain.npz
Valid File Name: Rvalid.npz
Algorithm: PLRec
Mode: Item-based
Alpha: 10
Rank: 100
Lambda: 1.0
SVD Iteration: 4
Evaluation Ranking Topk: 10
================================================================================
|                                 Loading Data                                 |
================================================================================

Elapsed: 00:00:00
Train U-I Dimensions: (6041, 3953)
================================================================================
|                                Randomized SVD                                |
================================================================================

Elapsed: 00:00:01
================================================================================
|                          Create Cacheable Matrices                           |
================================================================================

Elapsed: 00:00:00
================================================================================
|                           Item-wised Optimization                            |
================================================================================

100%|██████████████████████████████████████| 3953/3953 [00:17<00:00, 223.06it/s]
Elapsed: 00:00:17
================================================================================
|                               Save U-V Matrix                                |
================================================================================

Elapsed: 00:00:00
================================================================================
|                                Create Metrics                                |
================================================================================

100%|██████████████████████████████████████| 6041/6041 [00:08<00:00, 694.76it/s]
-
NDCG :0.182108679494
R-Precision :0.078431372549
Clicks :0.0
Elapsed: 00:00:08

```

# Popularity Analysis
![NDCG](figures/Density_hist_pop.png) <!-- .element height="50%" width="50%" -->


text:
# Crypsense

A platform to automate trading strategies on the cryptographic currency market.

## Mind Service

Service responsible for providing all metrics and operating decisions.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

### Prerequisites

* Node.js (and NPM)
* Zookeeper
* Kafka

### Installing

### Deployment

## Author

* **João Fernandes** - [GitHub](https://github.com/ojoaofernandes) | [LinkedIn](https://linkedin.com/in/ojoaofernandes)

## License

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

repository: jchristov/mind

repo_name: jchristov/mind


text:
# Walking through everything that happens when the first scene is loaded in RPD

##  inside main()
1. main() is called, and the JSON parser fetches the file passed in argv[1]
2. The singleton containing the core game loop (EngineCore) is instantiated, and passed the "engine\_core" chunk of the JSON blob.
3. The EngineCore singleton kicks off the game loop by calling the Run() function.

## Inside EngineCore.Run()

4. Once inside the Run() function, more singletons are spawned: Clock, RenderManager, InputManager, and PhysicsCore
5. The Clock singleton is started with its Start() function.
6. The first Scene--called `current_scene` is instantiated in the EngineCore. This Scene instanced is wrapped in a `std::unique_ptr`.
7. `current_scene` is configured by calling the configure() function, which is passed EngineCore's `initial_scene` member.
8. A `std::queue` is created for the input data from a controller/keyboard/etc.
9. The main game loop inside the EngineCore is entered. The loop exit logic is based on a bolean called `running`.
10. **The input queue is assigned to be the output of the InputManager singleton's HandleInput() function**
11. The game loop performs a check to see if there's an exit signal at the back of the input queue. If so, the clock is stopped, and the loop is exited.
12. Assuming no exit signal, we collect the number of elapsed ticks from the Clock singleton.
13. `current_scene` is handed the input queue through the HandleInput function.
14. If there this isn't the very first game tick(), we enter anothe control block where we delegate work to change game state.
15. The `current_scene` instance calls its UpdateAll function, and recieves the number of ticks.
16. The PhysicsCore singleton calls its CheckCollisions function, which receives the Actors, Props, and Stage from `current_scene`.
17. We exit the control block checking for the first game tick, and tell the RenderManager singleton to clear the previous frame SDL Renderer.
18. `current_scene` calls the RenderAll() function, generating the next frame's worth of content for the RenderManager singleton.
19. RengerManager's SceneToScreen() function is called, pushing that frame into the window.
20. The core game loop ends.

## Exiting Engine.Run(), back inside main()

21. main() calls EngineCore's Cleanup() function.
22. The program exits.


text:
# extractLog

@@@ div { .group-scala }

## Signature

@@signature [BasicDirectives.scala]($akka-http$/akka-http/src/main/scala/akka/http/scaladsl/server/directives/BasicDirectives.scala) { #extractLog }

@@@

## Description

Extracts a @apidoc[LoggingAdapter] from the request context which can be used for logging inside the route.

The `extractLog` directive is used for providing logging to routes, such that they don't have to depend on
closing over a logger provided in the class body.

See @ref[extract](extract.md) and @ref[Providing Values to Inner Routes](index.md#providedirectives) for an overview of similar directives.

## Example

Scala
:  @@snip [BasicDirectivesExamplesSpec.scala]($test$/scala/docs/http/scaladsl/server/directives/BasicDirectivesExamplesSpec.scala) { #extract0Log }

Java
:  @@snip [BasicDirectivesExamplesTest.java]($test$/java/docs/http/javadsl/server/directives/BasicDirectivesExamplesTest.java) { #extractLog }

repository: yangbajing/akka-http

gha_license_id: NOASSERTION

repo_name: yangbajing/akka-http


text:
---
layout: leftnav-page-content
title: Understanding China
permalink: /china/know/overview-of-china/understanding-china/
breadcrumb: Understanding China
collection_name: china-know-overview
---

This is a selection of resources on China’s contemporary developments available from the [NLB catalogue](http://catalogue.nlb.gov.sg/){:target="_blank"} or the Internet and is not meant to be an exhaustive list. If you know of or come across more useful resources, please drop us a [note](mailto:ref@nlb.gov.sg){:target="_blank"} so that we can share them with our readers.

### **NLB print and digital resources**

[**The governance of China**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=201198565){:target="_blank"}

Xi Jinping was elected general secretary of the Communist Party of China and chairman of the Central Military Commission at the 18th Party Congress held in 2012. He succeeded Hu Jintao as leader of the Communist Party and was elected president of the People’s Republic of China in March 2013. Gain a better understanding of China through this compilation of Xi Jinping’s speeches, talks, interviews and correspondences from 15 November 2012 to 13 June 2014 as you delve into his thoughts and views on a broad range of issues.

All rights reserved, Beijing: Foreign Languages Press, 2014.

[**Singapore-China relations: 50 years**](http://eresources.nlb.gov.sg/Main/Browse?startsWith=N){:target="_blank"}

The multi-faceted Singapore-China relationship is showcased in this publication that examines the political, economic, socio-cultural, people-to-people and military exchanges between the two countries, including highlights of bilateral cooperation projects.

All rights reserved, Singapore: World Scientific Publishing co. Pte. Ltd., 2016.

Retrieved from NetLibrary. *(myLibrary ID is required to access this database.)*

[**Research outline for China’s cultural soft power**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=202850331){:target="_blank"}

Learn more about the theoretical roots of soft power and the current state of China’s soft power. This book focuses on the inner logical relations between Chinese cultural soft power and the realisation of the China Dream from which the author subsequently draws a cautious overall conclusion on the development of China’s soft power.

All rights reserved, Singapore: Springer, 2017.

[**Contemporary China: Society and social change**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=200152278){:target="_blank"}

China’s phenomenal economic growth and the path to modernisation continues to attract interests from far and wide. This publication offers a portrayal of societal and social change in contemporary China through topics such as family life, citizenship, gender, ethnicity, labour, religion, education, and class and rural/urban inequalities.

All rights reserved, Victoria: Cambridge University Press, 2013.

[**China’s innovation challenge: Overcoming the middle-income trap**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=202666781){:target="_blank"}

Can China escape the middle-income trap? This is the central question posed in the book as it gathers perspectives from leading Chinese and international scholars to consider the daunting challenges and complexities of building an innovation-driven Chinese growth model. It analyses key areas such as China’s institutional system, technology, sociocultural forces and national policy.

All rights reserved, Cambridge: Cambridge University Press, 2016.

[**On China: 41 embassy officials speak about the CPC**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=201327327){:target="_blank"}

Interviews with 41 foreign officials who have worked in China reveal their thoughts and ponderings about the Communist Party of China. Topics include the international financial crisis, livelihood issues, environment, China’s developments and spread of the Chinese culture.

All rights reserved, London: New Classic Press, 2013.

[**This brave new world: India, China and the United States**](http://eservice.nlb.gov.sg/item_holding.aspx?bid=202537186){:target="_blank"}

China and India – both rising superpowers in Asia – will soon surpass the combined strength of North America and Europe in economic might, population size, and military spending. The author offers a tour of the corridors of power in Delhi and Beijing from her front row view of this colossal power shift, first at the State Department and now as an advisor to American business leaders.

All rights reserved, New York: Simon & Schuster, 2016.

---

### **You may also like**

[**Top 10 best cities for startups in China**](http://www.chinadaily.com.cn/business/2017top10/2017-08/24/content_31035498.htm){:target="_blank"}

According to big data provided by Tencent Research Institute, Beijing is the most startup friendly city in China. Check out the other nine cities that make up the list.

repository: GohLeeKim/nlb-eoa

repo_name: GohLeeKim/nlb-eoa


text:
# react-toaster-js

`npm i -S react-toaster-js`

## Component

```js
const { Toaster } = require('react-toaster-js')

// place where you'd like in your app
module.exports = () => <Toaster />;
```

## Usage

```js
const toaster = require('react-toaster-js');

// display an info toast with no title
toastr.info('Are you the 6 fingered man?')

// display a warning toast, with no title
toastr.warning('My name is Inigo Montoya. You killed my father, prepare to die!')

// display a success toast, with a title
toastr.success('Have fun storming the castle!', 'Miracle Max Says')

// display an error toast, with a title
toastr.error('I do not think that word means what you think it means.', 'Inconceivable!')

// remove all toasts without using animation
toastr.remove()

// override global options
toastr.success('We do have the Kapua suite available.', 'Turtle Bay Resort', { timeOut: 5000 })
```

## Options

`position: String`
The position to mount the toaster. Possible values: `top-right`, `top-left`, `bottom-right`, `bottom-left`. Defaults to `top-right`.

`type: String`
The type of toast to throw. Possible values: `success`, `danger`, `info`, `warning`. Defaults to `''` (standard).

`className: String`
Adds the class to the toast.

`title: String`
The title of the toast.

`message: String`
The message of the toast

`fade: Number`
The duration to wait until fade, in milliseconds. Defaults to `5000`.

`duration: Number`
The toast display duration, in milliseconds. Defaults to `15000`.

`nofade: Boolean`
Prevents the toast from fading. Defaults to `false`.

`persist: Boolean`
Prevents the toast from expiring. Defaults to `false`.

`dismissible: Boolean`
Whether the toast can be dismissed with a click. Defaults to `true`.

## Styles

### CSS

An `index.css` file is located in the root of the project.

### #SASS

An `index.scss` file is located in the root of the project.

repository: JosephClay/react-toaster-js

repo_name: JosephClay/react-toaster-js