text:
# JavaScript Patterns Slideshow
## Derek Brown

Derek Brown's Presentation - Javascript design patterns
http://dbrown-mn1/~dbrown/patterns

(Note: as a point of posterity, we ran this presentation by pointing the teleconference webcam at Derek's computer screen, because the A/V connector wasn't working. It was rad.)

Great design patterns are reusable, modular expressions of what's going on.

Patterns looked at:
module
singleton
facade
command
factory
observer
delegate

We use Module pattern most at LinkedIn
Pros: Modular (duh), allows private/public encapsulation, clean, readable, less global clutter
Cons: Messy return statement (can be remedied a bit by your approach), unit testing can be difficult, can't easily extend private methods

Singleton Pattern
Extension of module + method that ensures a singular instance of the module exists.
Pros: Reduces memory footprint, single point of access, delayed initialization
Cons: Difficult to reset, harder to unit test

Facade
Paired with other patterns to provide an extra layer of security/homogenization. Protects properties.
Pros: Easy to implement, works well with other patterns, easy to patch internals, provides simple public interface.
Cons: Cost of implementation vs. value of extra layer of abstraction.
Used: Most of jQuery uses a facade pattern (addClass, sizzle, etc)

Command
Completely separates implementation and execution of methods.
Pros: Decouples implementation from execution, can stack command objects (undo/redo)
Cons: Counter-intuitive to most other patterns, limited use to 'verb-centric' applications, requires protocol

Factory
Used to create objects, usually belongs to a set or category. Think config pattern, but also returns instance.
Pros: Allows sharing of properties across multiple objects, useful for complex object or components
Cons: Fairly complex, high overhead for garbage collection, unit testing problems

Observer
"Pub/sub" stuff, events, callbacks
Pros: Facilitates app-level thinking, removes direct relationships
Cons: No way to know if the other end of the phone is still on the phone (one-way blind), subs unaware of each other

Delegate
Delegator offloads task to an associated helper object.
Pros: Loose coupling w/o global eventing, easy to maintain structure
Cons: No well-structured way to enforce delegation attachment, assignment occurs prior to initialization

Jimmy: Talk briefly about design patterns of Javascript specifically.
Derek: Not a huge difference between functional and class programming. Biggest difference is overhead of additional functions for encapsulation. (Aside) Bugs can be hard to dissect because of how functional programming works in Javascript, it can be difficult to access.

Jimmy: If I search design patterns exemplified in other languages, are they translatable to JS?
Derek: Yep, absolutely.
Me: I think the issue I ususally run into is in how other languages handle scoping (like, say for callbacks).
(Everyone agrees and compliments David Drew's hair)


text:
# Development Setup
## __Docker__

* install docker and docker-compose

### Configuration

```bash
cp .env.example .env
```

Edit values in `.env` to point to existing postgresql databases.

### OAuth setup

See `nmdc_server/config` for configuration.  Env variable names begin with `NMDC_`.

1. Create an OrcID account at orcid.org
1. Create an OrcID API Token in the [developer tools](https://orcid.org/developer-tools)
1. Set the redirect URIs to `http://localhost:8080` (Ignore the error about https, it's just a warning).
1. Set the following configuration in `.env`, and then restart the stack.

```bash
NMDC_CLIENT_ID=changeme
NMDC_CLIENT_SECRET=changeme
NMDC_HOST=http://localhost:8080
```

### Running the server

```bash
docker-compose up -d
```

View main application at `http://localhost:8080/` and the swagger page at `http://localhost:8080/api/docs`.

## __Outside Docker__

```bash
# Start only the service dependencies.
docker-compose up -d db data redis
```

With python virtualenv. Requires Python 3.7+

```bash
pip install -e .
pip install uvicorn tox

uvicorn nmdc_server.asgi:app --reload
```

View swagger page at `http://localhost:8000/api/docs`.

# Running ingest

You need an active SSH tunnel connection to nersc attached to the compose network.  After running docker-compose up, run this container.

If you haven't already, [set up MFA on your NERSC account](https://docs.nersc.gov/connect/mfa/) (it's required for SSHing in).

```bash
export NERSC_USER=changeme
docker run --rm -it -p 27017:27017 --network nmdc-server_default --name tunnel kroniak/ssh-client ssh -o StrictHostKeyChecking=no -L <IP_ADDRESS>:27017:mongo-loadbalancer.nmdc.production.svc.spin.nersc.org:27017<EMAIL_ADDRESS>'/bin/bash -c "while [[ 1 ]]; do echo heartbeat; sleep 300; done"'
```

You can connect to the instance manually

```bash
docker run -d -p 3000:3000 --network nmdc-server_default mongoclient/mongoclient
```

In order to populate the database, you must create a `.env` file in the top
level directory containing mongo credentials.

```bash
# .env
NMDC_MONGO_USER=changeme
NMDC_MONGO_PASSWORD=changeme
```

With that file in place, populate the docker volume by running,

```bash
docker-compose run backend nmdc-server truncate # if necessary
docker-compose run backend nmdc-server migrate
docker-compose run backend nmdc-server ingest -vv --function-limit 100
```

# Running the client

Run the client in development mode.

``` bash
cd web/
yarn
yarn serve
```

**Note**: To authenticate, log into the portal at `http://localhost:8080` first.  Then, the dev environment portal at `http://localhost:8081` will also be authenticated.  This is because oauth with webpack dev server is not possible.

# Testing

```bash
tox
```

## Generating new migrations

```bash
# Autogenerate a migration diff from the current HEAD
docker-compose run backend alembic -c nmdc_server/alembic.ini revision --autogenerate
```

In order to generate a migration, your database state should match HEAD.  If you started the server from a totally empty database, then the default behavior is to ignore migration scripts and set up the database to match `models.py`.  Before you can generate a migration, you need to reset your database to match HEAD.

```bash
# Destroy everything.  You'll lose your data!
docker-compose down -v
docker-compose up -d db
# Create the database
docker-compose run backend psql -c "create database nmdc_a;" -d postgres
# Run migrations to HEAD
docker-compose run backend alembic -c nmdc_server/alembic.ini upgrade head
# Autogenerate a migration diff from the current HEAD
docker-compose run backend alembic -c nmdc_server/alembic.ini revision --autogenerate
```

# Postgres import and export

You can find existing database exports in Notion.

```bash
# export, and
docker-compose run backend bash -c 'pg_dump nmdc_a > /app/nmdc_server/nmdc_a.sql'

# import -- starting from an EMPTY database with DB running
docker-compose down -v
docker-compose up -d db
docker-compose run backend psql -c "create database nmdc_a;" -d postgres
cp downloads/nmdc_a.sql nmdc_server/nmdc_a.sql
docker-compose run backend bash -c 'psql nmdc_a < /app/nmdc_server/nmdc_a.sql'
docker-compose run backend nmdc-server migrate # stamp the migration db
```

# Developing with the shell

A handy IPython shell is provided with some commonly used symbols automatically
imported, and `autoreload 2` enabled. To run it:

```bash
docker-compose run --rm backend nmdc-server shell
```

You can also pass `--print-sql` to output all SQL queries.

repository: microbiomedata/nmdc-server

branch_name: refs/heads/main

extension: md

gha_language: Python

gha_license_id: NOASSERTION

license_type: permissive

repo_name: microbiomedata/nmdc-server


text:
# scitos_2d_mbf
Move Base Flex configuration files for  2D navigation stack on a Metralab SCITOS G5/A5 robot base.

To test this, you can do the following:

 1. Install the STRANDS codebase via "Using the L-CAS repository" - https://github.com/LCAS/rosdistro/wiki
 2. Install the simulator `sudo apt-get install ros-kinetic-strands-morse`
 3. Add https://github.com/ori-goals/scitos_2d_mbf amd https://github.com/strands-project/scitos_2d_navigation to your catkin workspace, then rebuild
 4. Run the MORSE simulator for the environment of your choosing, e.g. `roslaunch strands_morse tsc_morse.launch`
 5. Run scitos_2d_mbf with the corresponding map:
 ```
 roslaunch scitos_2d_mbf scitos_2d_mbf.launch map:=`rospack find strands_morse`/tsc/maps/tsc.yaml  no_go_map:=`rospack find strands_morse`/tsc/maps/tsc_nogo.yaml with_no_go_map:=true
 ```
 6. Provide a navigation goal via RViz.

license: MIT

branch_name: refs/heads/master


text:
# Jetson Configuration Utility

## Prerequisites

Install the device with JetPack 3.2 and log-in as **nvidia**. Make sure to uncheck OpenCV from the configuration.

![Jetson configuration][screenshot]

[screenshot]: ./static/images/jetson_config.png "Jetson configuration"

## Installation

The agent stays running all the time and waits for the Vol+ button to be double-pressed.

When the button is pressed it starts a web-ui with options to configure the Greengrass certificates and WiFi.

    git clone https://github.com/zukoo/GG-Config-Tool.git
    cd GG-Config-Tool
    sudo ./install.sh

### Optionally

You can choose to install the agent without the dependencies for ML @Edge like OpenCV and MXNet.

    sudo ./install.sh --no-dependencies

## Post-Install

You can now configure the device from the webUI, just double click on the button Vol+ and connect to it's IP via a web browser. You can then upload your AWS Greengrass certificates, don't forget to hit **Finished** to apply the changes when you're done.

![Jetson Buttons][buttons]

[buttons]: ./static/images/jetson_buttons.png "Jetson Buttons"

*In future versions of the tool this should create a WiFi Network to let you configure the device network configuration without knowing the device's IP address.*

![Jetson configuration][ui]

[ui]: ./static/images/ui.png "Jetson configuration UI"

repository: fxgsell/GG-Config-Tool

repo_name: fxgsell/GG-Config-Tool


text:
# KartAI
Q-Learning self-driving game car project made in Python with Processing for Machine Learning and Neural Networks (MLNN) course.

## Authors
```
Iker García Ferrero - ikergarcia1996
Eritz Yerga Gutierrez - eritzyg
```

## How to run
To run this project you need [Processing Python](http://py.processing.org/) and [Java](https://www.java.com/en/download/) (at least version 7), once in Processing Python Mode open the project and click "Run".

Prepackaged versions are also available in the [releases section](https://github.com/eritzyg/KartAI/releases). For these versions you only need [Java](https://www.java.com/en/download/) (at least version 7).

## Documentation
Documentation is available in the [releases section](https://github.com/eritzyg/KartAI/releases) with the corresponding release.

## Demonstration

![Demo](https://github.com/eritzyg/KartAI/raw/master/demo.gif)

repository: rsantana-isg/KartAI

repo_name: rsantana-isg/KartAI


text:
---
title: Cookie Usage
layout: policy.swig
---

Cookies are the confusingly adorably named tiny text files that can be placed on your computer or mobile device that uniquely (but anonymously) identify your browser or device. They are unable to search your computer in any way, cannot introduce viruses to your computer and contain no personal identifying information about you.

What are cookies used for?

Cookies are used by sites or services when they want to know if your computer or device has visited that site or service before. These cookies on your computer or device can then be used to help remember your preferences (such as language), help you navigate between pages efficiently, and generally improve your browsing experience.

Similarly cookies are used by web publishers to help understand how their site or service is being used. Services such as Google Analytics use cookies to provide anonymous aggregated data such as how long users in general spent on the site, how many pages they visited and in which order etc.

Cookies can also be used for online advertising – by aggregating the very basic information cookies gather, informed guesses can be made about your demographic and ads targeted to you thusly. Or more simply – if you go to a site about watches, it may drop a cookie on your computer, so the next sites you go to will then contain ads about watches.

What types of cookies does the {{CompanyName}} website use?

We do not currently use any type of cookie on our website.

Updates

The {{CompanyName}} website might use performance cookies in the future to assist with delivering a better user experience. Please check this page regularly to ensure you are familiar with the current version.


text:
---
title: Scrolling
page_title: Scrolling
description: Check our "Scrolling" documentation article for the RadTreeListView {{ site.framework_name }} control.
slug: radtreelistview-features-scrolling
tags: scrolling
published: True
position: 10
---

# Scrolling

__RadTreeListView__ provides several scrolling options that can be used to adjust the scrolling experience of the control.

As RadTreeListView inherits the __RadGridView__ control, it shares most of its features, including the scrolling mechanism. You can see the available features in the RadGridView's [Scrolling]({%slug gridview-scrolling%}) article.

repository: telerik/xaml-docs

gha_language: JavaScript

repo_name: telerik/xaml-docs


text:
# compound-oracle-util

Usage:

1) Create a .env file with "INFURA_ENDPOINT=yourkeyhere"

2) npm install

3) node update_prices.js

## prices.js

Contains the oracle interface for the new Compound Chainlink ORACLE_ABI

It will be updated as tokens are added to Compound.

The current symbol list is "ETH", "BTC", "COMP", "LINK", "BAT", "ZRX", "DAI", "UNI", "SAI", "REP". USDC, USDT, and TUSD are fixed to equal 1 US Dollar.

## update_prices.js

A sample program for accessing the prices and printing them to console. Using the same pattern one could save it to a file or to a database.

repository: SentryApe/compound-oracle-util

repo_name: SentryApe/compound-oracle-util


text:
BuzzBands

Prerequisites

  You will need to install Bower, and Node.js for this project.

Getting Started

Clone the repository

 Start the server

Navigate to the buzzbands_client folder that you cloned in a previous step and run the following command, which will install all required dependencies and start the server.

npm install


text:
# 📖 Spellbook

- [Acid Bolt](#acid-bolt)
- [Conjure Crystal Lance](#conjure-crystal-lance)
- [Conjure Crystal Pick](#conjure-crystal-pick)
- [Conjure Crystal Sword](#conjure-crystal-sword)
- [Conjure Teleportation Potion](#conjure-teleportation-potion)
- [Conjure Water](#conjure-water)
- [Craft Flask](#craft-flask)
- [Flask of Endless Teleportation](#flask-of-endless-teleportation)
- [Flask of Endless Water](#flask-of-endless-water)
- [Frost Bolt](#frost-bolt)
- [Repair Copper Weapon](#repair-copper-weapon)
- [Repair Electrum Weapon](#repair-electrum-weapon)
- [Repair Gold Weapon](#repair-gold-weapon)
- [Repair Iron Weapon](#repair-iron-weapon)
- [Repair Mythril Weapon](#repair-mythril-weapon)
- [Repair Palladium Weapon](#repair-palladium-weapon)
- [Repair Red Iron Weapon](#repair-red-iron-weapon)
- [Repair Silver Weapon](#repair-silver-weapon)
- [Repair Valyan Weapon](#repair-valyan-weapon)
- [Repair Viridium Weapon](#repair-viridium-weapon)

---

# Acid Bolt

Launches a large ball of acid from the palm of your hand.

| School    | Type     | Casts from |
| :-------- | :------- | :--------- |
| Evocation | Prepared | Right hand |

⚠ **Incantations unknown!**

# Conjure Crystal Lance

Conjures a blue crystal lance that can be wielded like a weapon.

| School      | Type     | Casts from |
| :---------- | :------- | :--------- |
| Conjuration | Prepared | Right hand |

⚠ **Incantations unknown!**

# Conjure Crystal Pick

Conjures a blue crystal pickaxe that can be wielded like a weapon.

| School      | Type     | Casts from |
| :---------- | :------- | :--------- |
| Conjuration | Prepared | Right hand |

⚠ **Incantations unknown!**

# Conjure Crystal Sword

Conjures a blue crystal sword that can be wielded like a weapon.

| School      | Type     | Casts from |
| :---------- | :------- | :--------- |
| Conjuration | Prepared | Right hand |

⚠ **Incantations unknown!**

# Conjure Teleportation Potion

Conjures a single serving of teleportation potion inside of an empty flask.

| School      | Type    | Casts from |
| :---------- | :------ | :--------- |
| Conjuration | Instant | Right hand |

⚠ **Incantations unknown!**

# Conjure Water

Conjures a single serving of water inside of an empty flask.

| School      | Type    | Casts from |
| :---------- | :------ | :--------- |
| Conjuration | Instant | Right hand |

Incantations ✔

Discovered by **Ethyn Wyrmbane**.

|     Dock | ζ                 | δ                  | λ      |
| -------: | ----------------- | ------------------ | ------ |
| Material | Empty flask       | Ripe blueberry     |        |
|    Speak | `bonds of silica` | `fluid of produce` | `seal` |

# Craft Flask

Conjures a small glass container used to hold various liquids.

| School      | Type    | Casts from |
| :---------- | :------ | :--------- |
| Conjuration | Instant | Right hand |

Incantations ✔

Discovered by **Ethyn Wyrmbane**.

|     Dock | ζ                   | δ                 | λ      |
| -------: | ------------------- | ----------------- | ------ |
| Material | Sandstone           | Coal              |        |
|    Speak | `essence of silica` | `heart of embers` | `seal` |

# Flask of Endless Teleportation

Conjures additional servings of teleportation potion inside of a flask already containing teleportation potion.

| ⚠  | KNOWN ISSUE: Flask contents are invisible when there are an even number of servings held within. |
| --- | :----------------------------------------------------------------------------------------------- |

| School      | Type    | Casts from |
| :---------- | :------ | :--------- |
| Conjuration | Instant | Right hand |

⚠ **Incantations unknown!**

# Flask of Endless Water

Conjures additional servings of water inside of a flask already containing water.

| ⚠  | KNOWN ISSUE: Flask contents are invisible when there are an even number of servings held within. |
| --- | :----------------------------------------------------------------------------------------------- |

| School      | Type    | Casts from |
| :---------- | :------ | :--------- |
| Conjuration | Instant | Right hand |

⚠ **Incantations unknown!**

# Frost Bolt

Launches a large ball of icy crystals from the palm of your hand.

| School      | Type     | Casts from |
| :---------- | :------- | :--------- |
| Conjuration | Prepared | Right hand |

⚠ **Incantations unknown!**

# Repair Copper Weapon

Restores some of the integrity of all copper parts in a weapon.

| School        | Type    | Casts from |
| :------------ | :------ | :--------- |
| Transmutation | Instant | Right hand |

⚠ **Incantations unknown!**

# Repair Electrum Weapon

Restores some of the integrity of all electrum parts in a weapon.

| School        | Type    | Casts from |
| :------------ | :------ | :--------- |
| Transmutation | Instant | Right hand |

⚠ **Incantations unknown!**

# Repair Gold Weapon

Restores some of the integrity of all gold parts in a weapon.

| School        | Type    | Casts from |
| :------------ | :------ | :--------- |
| Transmutation | Instant | Right hand |

⚠ **Incantations unknown!**

# Repair Iron Weapon

Restores some of the integrity of all iron parts in a weapon.

| School        | Type    | Casts from |
| :------------ | :------ | :--------- |
| Transmutation | Instant | Right hand |

⚠ **Incantations unknown!**

# Repair Mythril Weapon

Restores some of the integrity of all mythril parts in a weapon.

| School        | Type    | Casts from |
| :------------ | :------ | :--------- |
| Transmutation | Instant | Right hand |

⚠ **Incantations unknown!**

# Repair Palladium Weapon

Restores some of the integrity of all palladium parts in a weapon.

| School        | Type    | Casts from |
| :------------ | :------ | :--------- |
| Transmutation | Instant | Right hand |

⚠ **Incantations unknown!**

# Repair Red Iron Weapon

Restores some of the integrity of all red iron parts in a weapon.

| School        | Type    | Casts from |
| :------------ | :------ | :--------- |
| Transmutation | Instant | Right hand |

⚠ **Incantations unknown!**

# Repair Silver Weapon

Restores some of the integrity of all silver parts in a weapon.

| School        | Type    | Casts from |
| :------------ | :------ | :--------- |
| Transmutation | Instant | Right hand |

⚠ **Incantations unknown!**

# Repair Valyan Weapon

Restores some of the integrity of all valyan parts in a weapon.

| School        | Type    | Casts from |
| :------------ | :------ | :--------- |
| Transmutation | Instant | Right hand |

⚠ **Incantations unknown!**

# Repair Viridium Weapon

Restores some of the integrity of all viridium parts in a weapon.

| School        | Type    | Casts from |
| :------------ | :------ | :--------- |
| Transmutation | Instant | Right hand |

⚠ **Incantations unknown!**

repository: Kadroz/att-voodoo

repo_name: Kadroz/att-voodoo


text:
# fivem-vehicleshop

### About FiveM Vehicle Shop

FiveM Vehicle Shop adds an vehicle shop to the game, any player can buy vehicles with a interface based interaction.

### Requirement
- **esx-legacy** | [GitHub](https://github.com/esx-framework/esx-legacy)
- **mysql-async** | [GitHub](https://github.com/brouznouf/fivem-mysql-async)

### Get Started
1) [Download](https://github.com/Slypher/fivem-vehicleshop/releases) files made available in releases
2) Copy **fivem-vehicleshop** to your FXServer resource folder
3) Run the **vehicle_shop.sql** file in your FXServer database
4) Add **ensure fivem-vehicleshop** to your **sever.cfg** file
5) Start your server or resource

### Example (Video)
[![esx_vehicleshop](https://cdn.discordapp.com/attachments/547153346734325771/882677355468947496/unknown.png)](https://streamable.com/8fhlq7)

## Issues

Report any problem you have and try to provide all information about it.

## Contributing

Feel free to contribute and improve the code and the repository.

repository: Slypher/fivem-vehicleshop

repo_name: Slypher/fivem-vehicleshop


text:
The `dist-raw` directory contains JS sources that are distributed verbatim, not compiled nor typechecked via TS.

To implement ESM support, we unfortunately must duplicate some of node's built-in functionality that is not
exposed via an API.  We have copy-pasted the necessary code from https://github.com/nodejs/node/tree/master/lib
then modified it to suite our needs.

Formatting may be intentionally bad to keep the diff as small as possible, to make it easier to merge
upstream changes and understand our modifications.  For example, when we need to wrap node's source code
in a factory function, we will not indent the function body, to avoid whitespace changes in the diff.

One obvious problem with this approach: the code has been pulled from one version of node, whereas users of ts-node
run multiple versions of node.
Users running node 12 may see that ts-node behaves like node 14, for example.

gha_license_id: MIT


text:
# Experimental.System.Messaging
Experimental port of System.Messaging (for .NET Core)

[![Image](https://img.shields.io/nuget/v/Experimental.System.Messaging.svg)](https://www.nuget.org/packages/Experimental.System.Messaging)

## Introduction

This package is a counterfeit of the .NET Framework version System.Messaging assembly for .NET Core applications running on Windows Client and Windows Server. It is provided for development convenience. Do not use this package if Microsoft officially releases this package again. Also, once it is released, you should migrate the code to the new package.

The source code for this package is excerpted from the .NET Framework reference source code.

## Release Note

### v1.1.0 (2019-11-06)
Trustee class namespace was moved from System.Messaging to Experimental.System.Messaging. It could break your existing build process.

### v1.0.0 (2018-01-06)
This version of the System.Messaging package excludes all advanced features such as code access security, execute permissions, and Active Directory integration. I released the package keeping in mind the minimal use of Message Queuing communication facilities. Please confirm whether it is suitable for actual use through unit test and integration test.


text:
---
# Documentation: https://sourcethemes.com/academic/docs/managing-content/

title: "Open Neuroscience"
summary: "A curated repository for open source projects related to neurosciences"
authors: [andre]
tags: [repository,education]
categories: []
date: 2020-10-06T15:00:56Z

# Optional external URL for project (replaces project detail page).
external_link: "https://open-neuroscience.com/"

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ""
  focal_point: ""
  preview_only: false

# Custom links (optional).
#   Uncomment and edit lines below to show custom links.
# links:
# - name: Follow
#   url: https://twitter.com
#   icon_pack: fab
#   icon: twitter

url_code: ""
url_pdf: ""
url_slides: ""
url_video: ""

# Slides (optional).
#   Associate this project with Markdown slides.
#   Simply enter your slide deck's filename without extension.
#   E.g. `slides = "example-slides"` references `content/slides/example-slides.md`.
#   Otherwise, set `slides = ""`.
slides: ""
---
Open Neuroscience is a user-driven database of Open Source/Science projects related to Neurosciences:

- It serves as a curated space, where users can register their projects with short descriptions and topic classifications.
- Registered content can be filtered, searched, and all projects in a certain topic quickly compared, so that users can find what is most fitting for their needs.
- Having all projects listed under one place, also gives them visibility and hopefully helps in terms of bringing users/collaborators to them, making sure developing efforts are not wasted.

repository: amchagas/cv-website

repo_name: amchagas/cv-website


text:
# Welcome to the ProbMind project

The goal of this project is to develop a series of generally applicable and reusable code fragments of probabilistic programs, what we refer to as probabilistic idioms, for use in cognitive robotics. For an extensive introduction to the background behind this project please consult
```
@misc{damgaard2021idiomatic,
      title={Toward an Idiomatic Framework for Cognitive Robotics},
      author={Malte R. Damgaard and Rasmus Pedersen and Thomas Bak},
      year={2021},
      eprint={2111.13027},
      archivePrefix={arXiv},
      primaryClass={cs.RO},
      url={https://arxiv.org/abs/2111.13027}
}
```
If you like this work or use it in your scientific projects, please use the reference above.

To try out the code remember to clone submodules e.g. by running:
```
git clone --recurse-submodules https://github.com/damgaardmr/probMind.git
```
and install the project dependencies. Then you can run any of the example scripts via the code in their respective READMEs. The current dependencies of the project can be installed as a conda environment via the command:
```
$ conda env create -f probmind/conda_environment_cross_platform.yml
```
This will install a conda environment called "probMind_env_cross_platform" with the necessary dependencies.

## Collaboration/Contributions
If you would like to collaborate on this project or anything related, or make contributions to the project, feel free to reach out to [Malte R. Damgaard](https://vbn.aau.dk/da/persons/134312) preferable via [email](mailto:mrd@es.aau.dk?subject=[GitHub]%20The%20ProbMind%20Project)

## Background
For a long time, it has been recognized that a hybrid symbolic-subsymbolic approach is probably the best for developing systems with general intelligent autonomous behavior. Until now, the incorporation of sub-symbolic probabilistic processing has been limited due to the available inference algorithms and the computational cost associated with these. Therefore, often problem-specific code optimizations have been necessary to obtain computationally tractable systems. However, with the latest advancements in probabilistic programming, such probabilistic processing have become way more tractable and flexible. As a result, this project seeks to implement generally applicable and reusable code fragments of probabilistic programs for use in cognitive robotics. To do this, this project is built around the probabilistic programming language [Pyro](https://pyro.ai/).

## Cognition
This module is supposed to contain the implementations of reusable probabilistic idioms. Currently, it only contains the "Planning" idiom, which can be used to reason about future optimal actions.

## Examples
This module contains a series of projects incorporating general probabilistic idioms into problem-specific use cases.

### robotPlanning

This set of simulations illustrates different use cases of the planning idiom. The simulations utilizes the [HouseExpo](https://github.com/TeaganLi/HouseExpo) dataset and a modified version of their simulator, to generate realistic SLAM output in the form of a map and estimated position. Currently, 3 different simulation scenarios have been implemented:

- [Exploration](https://github.com/damgaardmr/probMind/blob/main/examples/robotPlanning/docs/README.md#exploration)
- [Goal Search](https://github.com/damgaardmr/probMind/blob/main/examples/robotPlanning/docs/README.md#goal-search)
- [Planning with Multimodal Action Posterior](https://github.com/damgaardmr/probMind/blob/main/examples/robotPlanning/docs/README.md#planning-with-multimodal-action-posterior)

For more information consult the simulation [README](../examples/robotPlanning/docs/README.md)

### multiRobotPlanning (HAVE NOT BEEN UPDATED - check one of the older versions)

This simulation illustrates the use of the "Planning" idiom for multi-robot navigation. The goal of each robot is to navigate between two alternating goal zones without colliding with the other robots. The motivation behind this simulation is two folds:
- It illustrates how SVI and message-passing can be combined to de-centralize the computational burden of complex problems
- It illustrates a simplistic implementation of the Theory of Mind

The readme for this simulation can be found at
- [Multi-Robot Planning](https://github.com/damgaardmr/probMind/tree/main/examples/multiRobotPlanning/docs#multirobotplanning)

## TODO/NEW IDEAS/Future Work
- [X] how to detect when an impasse occurs?
- [ ] General optimization of code
- [ ] implement constraint between states, i.e. between z_s_tau and z_s_tauMinus1
- [ ] Introduce memorable states - i.e. states where we had multiple choices - this would also require the implementation of sub-goals
- [ ] Implement hierarchical or parallel decisions/planning with intertwined subgoals and shared states, constraints, PB, etc. - via msg-passing algorithms?
- [ ] Attention mechanism to direct sampling - i.e. we should consider more samples in the direction of the action
- [ ] Add uncertainty to LTM variables that have not been updated for a long time? corresponding to loss of memory
- [ ] consider a Geometric distribution as prior (i.e. in the model) over the number of options (K) - many times there only exists 1 option, but sometimes we have an unknown number of options (at least at compile time)
- [ ] consider a Geometric distribution as prior (i.e. in the model) over the number of planning timesteps (T) - often it is sufficient to only plan a few time steps into the future (fast inference), e.g. when exploring, however, sometimes it would be advantageous to plan further into the future (high "T" mean slower inference), e.g. when planning to reach a specific state.
- [ ] consider implementing rejection sampling for Hard constraints?
- [ ] introduce a baseline when using goals
- [ ] Validate performance on physical robots

repository: damgaardmr/probMind

repo_name: damgaardmr/probMind


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

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

## [1.1.0] - 2019-09-01
### Changed
- Replaced bash script with python
- Moved sources in `src` installation folder
- Corrected IGInterface numpy dependency
- Added Pipenv integration
- Exported logic from Custom Strategy to simplify workflow
- Added dev-requirements.txt for retro compatibility
- Updated Sphinx documentation

## [1.0.1] - 2019-05-09
### Changed
- Updated renovate configuration

## [1.0.0] - 2019-04-21
### Added
- Initial release

repository: andrebask/TradingBot

repo_name: andrebask/TradingBot


text:
## yconfig ##
A simple YAML configuration wrapper for C++.

yconfig is a configuration wrapper built around the [yaml-cpp](http://code.google.com/p/yaml-cpp/) library and is distributed under the MIT license.

It is a companion project to the chapter "_YAML for C++: Applied Data-Driven Design_" of the book [Game Development Tools](http://gamedevelopmenttools.com/).

### Building yconfig ###

yconfig requires [CMake](http://cmake.org) and the [yaml-cpp](http://code.google.com/p/yaml-cpp/) library (auto-detected by CMake) to be built.

    $ cd yconfig
    $ mkdir build
    $ cd build
    $ cmake ..
    $ make

You should now have the yconfig headers and library files, directly integrable into your C++ project.

To run the test examples described in the book chapter, you can type the following:

    $ cd ..
    $ build/configtest

### Using yconfig ###

    #include "Config.h"

    std::ifstream file("configfile.yaml");
    Config cfg(file); // throws an exception if the stream is unreadable

    unsigned int width = cfg["screen/width"];
    unsigned int width = cfg["screen/height"];
    // use width and height to initialize the screen...

    std::vector<Player> players = cfg["players"];
    // iterate over the players list here...

repository: snoury/yconfig

repo_name: snoury/yconfig


text:
## Prepare System

Please install 32bit system (official raspbian)

## Prepare Camera

Now you need to enable camera support using the raspi-config program you will have used when you first set up your Raspberry Pi. Use the cursor keys to select and open Interfacing Options, and then select Camera and follow the prompt to enable the camera.
https://www.raspberrypi.org/documentation/configuration/camera.md

## Prepare Docker
```
sudo curl -sSL https://get.docker.com | sh
```

## on PC/Server/Cloud
```
git clone https://github.com/SharpAI/DeepCamera
cd DeepCamera
./start-cloud.sh start
```
You need ip address of private cloud server on next step (replace ip address to <Server_IP> on next step).
If you don't want to setup your own server for now, a test server can be used for evaluation, the ip address of test server is <IP_ADDRESS>

## on Raspberry Pi 3/4

### Get source code
```
git clone https://github.com/SharpAI/DeepCamera
```

### Configure

edit configuration on Pi, change following environment variables to PC/Server/Cloud ip address:

#### [aws.env](../docker/aws.env)
AWS_END_POINT='<Server_IP>'
AWS_READABLE_PREFIX='http://<Server_IP>:9000/storage/'

#### [servers.env](../docker/servers.env)
MQTT_BROKER_ADDRESS=<Server_IP>
API_SERVER_ADDRESS=<Server_IP>
### Start DeepCamera
```
git clone https://github.com/SharpAI/DeepCamera
cd DeepCamera
./run-on-rpi.sh start
```

repository: SharpAI/DeepCamera

repo_name: SharpAI/DeepCamera


text:
Contributing Guidelines are as follows -

1. Fork this Repository.
2. Clone the Repository on your system using the command - `git clone [url of the forked repository]`
3. Create a new branch using the command - `git branch [branch-name]`
4. Move to the new branch by using this command - `git checkout [new branch-name]`
5. Add a card with the image of your Pokémon, A small description and mention your Github Profile name in the Button.
6. Once you've made your changes make sure you pull changes in master just in case - `git checkout master` -> `git pull`
7. Then again checkout to your new branch and pull from master branch - `git checkout [new branch name]` -> `git pull`
8. Add your content using the command - `git add -A`
9. Commit the changes using the command - `git commit -m "your-message"`
10. Push the changes using the command - `git push origin [branch-name]`
11. Creat a Pull request.
12. Star this Repository.

For reference check out : www.youtube.com/watch?v=c6b6B9oN4Vg


text:
# Numerical Computing on Apple M1 : Study and Implementations

Study and Implementations of Numerical Algorithms on Apple M1 and A* Devices

# Table of Contents (Sections)

* [Memcpy](./01_memcpy)
* [Saxpy](./02_saxpy)
* [Dot Product](./03_dot)
* [Prefix-Sum/Prefix-Scan](./04_prefix_sum)
* [Sort (GPU radix Sort on int and float)](./05_radix_sort)
* [N-Body (particle simulation)](./06_nbody)
* [2D convolution with 5x5 kernel](./07_2d_filter)
* [Sparse Matrix-Vector Multiplication](./08_sparse_matrix_vector_mul)
* [Dense Matrix-Vector Multiplication](./09_dense_matrix_vector_mul)
* [Cholesky Decomposition](./10_cholesky_decomp)
* [Jacobi Iterative Solver](./11_jacobi_solver)
* [Gauss-Seidel Iterative Solver](./12_gauss_seidel_solver)
* [512-point FFT](./13_fft)

# Background Context

- Apple M1 is an awesome chip for interactive apps with heavy numerical computation

- Lacking study material and examples. They are not as rich as the ones for CUDA.

This is a collection of technical reports about my study, implementation and experiments for numerical computation on Apple M1.
When the first Mac Mini M1 was released in 2020, I was super excited about the ARM-based architecture with the unified memory access to both CPUs and GPUs.
It seemed to be the best consumer computing device for the modern interactive applications with graphics rendering, audio processing, physics simulation, and neural networks, etc.
As we are apparently approaching the end of Moore's law, it is important to take advantage of parallelism more than ever, either in better pipelining, SIMD, fine grain multithreading, or GPU, and
the Apple M1 provides probably the best solution with the clean ARM architecture, rich libraries like vDSP and BLAS in Accelerate framework, and Metal GPGPU.

However, I have quickly realized that there are relatively few references, tutorials, and articles about the GPGPU computing on Apple devices,
after I started studying the numerical computing as a preparation work for my interactive applications on iOS and Macos that involve heavy numerical calculation.
For CUDA there are rich resources, such as GPU Gems by NVIDIA, and CUDA Handbook etc.

Since then, I have started applying to Metal what I had learned from my experience in CUDA GPGPU programming.
Especially I have started applying the idioms such as reduction and prefix-sum presented in the later chapters of CUDA Handbook, and wanted to see how it shakes out on Metal.
At the same time, I have also started working on some basic numerical operations for both GPU and CPUs as a basis for more elaborated work planned for some real applications.
The solutions on CPU,  either with the existing libraries/frameworks or in my own implementations,  are as important as the solutions on GPU.
There are already excellent collection of libraries, notably vDSP & BLAS, and the running time on CPU is usually faster when the problem size is small,
and the overhead of launching the GPU kernels can not be amortized.

After a while I have accumulated a pretty good collection of implementations and experimental results enough to be shared in public.
I have reorganized them into 13 sections above, and made it more presentable, and this repository has come out in the end.

# Purpose

* To target realtime interactive applications

* To provide various implementations for 13 representative types of computation

* To provide a Metal equivalent to Chap. 11-15 of CUDA Handbook

* To present real running time information on MacOS (Apple Mac Mini 2020 8GB, for iOS devices planned later).

* To give an indication as to what type of technology/implementation works best for a particular type of problem in a given data size

* To give a guideline on how to implement own solution if there is no existing framework or library available

The target application is the realtime interactive applications on iOS and Macos that execute heavy numerical computation.
For now, it provides implementations and results for MacOS BigSur on Mac Mini. An edition for the iOS devices is planned to be released later.

The collection is split into 13 sections. About half of them are idioms in GPGPU computing, and the others are representative types of numerical computing.
On CPU, each section first implements the algorithm in a plain C++ code, tests the running times for the problems in various sizes, and establish the baseline.
If there are any existing solutions provided by some libraries, such as BLAS, then it makes an implementation with those routines, and tests the running times.
Then it tries to improve the baseline C++ implementation by reviewing the algorithm design, the data organization, and a few techniques, notably multithreading, NEON intrinsics, and loop unrolling. It then tests the running time and analyze the results.
On GPU, if there is an idiom of GPGPU described in CUDA Handbook, it tries to implement the algorithms presented in the book to Metal. Some changes have to be made to absorb the differences between CUDA and Metal. Otherwise, it tries to make implementations according to the publicly available literature in GPGPU computing.
In some cases I had to design the algorithms based on common knowledge in GPGPU computing.

With those implementations and test results on the running time, it provides insight into what type of technology/implementation works best for particular type of problem in a given data size on the particular device (at the time of writing Mac Mini M1 8G BigSur 11.6).
It can also be used as a guideline on how to implement custom numerical solution if there is no existing framework or library, either by combining low-level routines in the libraries, or by writing in C++ with NEON intrinsics.
For example, if you have to implement a variant of the projected Gauss-Seidel iterative solver, for which there is no direct routine is provided by either LAPACK, BLAS, or GNU Scientific Library, you can use this as a guideline for your own implementation in C++.

# Status

* **Oct 2021** : The version (this repo) for Apple M1 using Mac mini (M1, 2020), 8GB Memory has been converged.

* **Jan 2022** : Another version for Apple A15 Bionic using an iPhone 13 planned.

# Technical Summary

## Main Technologies and Aspects Considered

* CPU
  * Apple Accelerate Framework (vDSP,BLAS,LAPACK)
  * Other Apple Frameworks (CIImage)
  * 3rd-party libraries (BOOST, GNU Scientific library, & Eigen3)
  * NEON SIMD intrinsics
  * Explicit loop unrolling
  * Cache prefetch
  * Multithreading

* GPU
  * Metal Perfomance Shaders ( MPSImageConvolution, MPSMatrixVectorMultiplication, MPSMatrixDecompositionCholesky, & MPSMatrixSolveTriangular)
  * Own Implementations in Metal Compute Kernels

    * Coalesced load & store to the device memory
    * Managed device memory vs shared device memory
    * Use of threadgroup memory vs device memory
    * Bank conflict in the threadgroup memory
    * The simd (warp-level) instructions
    * Atomic operations on int and float
    * Multiple thread-groups vs loops in one thread-group
    * Explicit loop unrolling

**NOTE1: Assembler not considered**

Coding directly in assembly language is not considered, as I'm not capable of writing optimized assembly code.

**NOTE2: Multithreading with CondVar**

For multithreaded implementations, I used [ThreadSynchronizer](https://github.com/ShoYamanishi/ThreadSynchronizer)
to minimize the overhead of synchronizing threads.
This repo utilizes mainly condition variables, and provides OpenMP-like functionalities as well as CUDA's __synchthreads() equivalent.

## How to Run the Experiments

To run all the experiments, type `make all` on the top directory.
To run the experiments for one section, `make all` in the directory.
The target *all* of Make does the following:
1. Build the test executable, and also metal libraries if necessary.
2. Run the executable and perform experiments according to the top-level C++-code 'test_*.cpp'.
3. The executable generates a log in `doc/make_log.txt`
4. A python script [common/process_log.py](./common/process_log.py) scan the make_log.txt and plots charts according to the specification given in 'doc/plot_spec.json'.

## General Findings on CPU

* BLAS & vDSP routines are highly optimized per architecture, and they should be used in general wherever applicable.

* Explicit use of NEON intrinsics with explicit loop unrolling of factor 4 or 8 usually works well.

* Multithreading are usually beneficial, and usually 4-8 threads are the sweet spots.

## General Findings on GPU

* The more thread-groups, the faster it executes. Please see [DOT](./03_dot) for details.

* The last block detection technique can not be used for Metal. Please see [DOT](./03_dot) for details.

* There is no severe penalty in uncoalesced loads from the device memory. Please see 'METAL TWO_PASS_DEVICE_MEMORY 0 0' and 'METAL TWO_PASS_SHARED_MEMORY 0 0' in [DOT](./03_dot) for details.

* There is no severe penalty in uncoalesced writes to the device memory. Please see 'METAL UNCOALESCED_WRITE' and 'METAL COALESCED_WRITE' in [RadixSort](./05_radix_sort) for details.

* Multiple *threadgroup* function parameters can not be used for Metal kernels. Please see [Prefix-Scan](./04_prefix_sum) for details.

* Explicit loop unrolling in the kernels does not seem to improve the running time. CUDA has a pragma *unroll <factor>*, and some improvements with it are reported in Chapter 14 of CUDA Handbook. However, Metal does not have such a compiler directive, and according to my study in [NBody](./06_nbody),
explicit unrolling of the loop body does not only improve performance, but also causes runtime error if the factor is greater than 4.

* Apparently there is a limit in the number of *thread (local)* variables defined in one kernel even for *consts*. This is observed in [2DConvolution](./07_2d_filter). Please see the kernels used in 'METAL TWO_STAGE'. It uses many 'const float' in the kernel `convolution_5x5_stage2()`.
To make it work, the number of threads per thread-group has to be reduced from 1024 to 768. Otherwise, the output from this kernel is wrong, and there is no compiler or runtime error for it.

# File Organization
This repo consists of 13 independent sections at the top directory, numbered from '01_*' to '13_*'.
Each section is dedicated to a particular type of numerical computation, and has an accompanying README as listed above, and the main source file named `test_*.cpp`

Each README consists of the following format:
* Key Points
* Background, Context, and Purpose
* Results on Running Time and Analyses
* Implementations

The commonly used functionalities are placed under [./common](./common).
They are mainly for the test framework, sample data generation, output inspection, and time measurements.

# Give Me Your Feedback!

* Any corrections, advice, and suggestions are appreciated.

* Indy developers, small businesses, and students, please use the materials provided here under MIT license.
I also try to answer questions and give support as much as possible, but without any warranty.

* Further study on particular device, for particular type of problem and applications in a commercial setting can be arranged upon request for fee.

* Donation of the latest Apple devices are very welcome.

# License

MIT License

# References
The references are listed in the README.md in each section (subdirectory).


text:
# Anime-Day
A Simple time converter for use for my friend and I to set up times to watch anime together.

This Web app only supports PST to EST or EST to PST. But with spacetime it's not to hard to switch this to whatever you and you're friend are. But you would need to modify the code a little bit to be able to do that.

```js
 function toPST(){
	EST = EST.time(document.getElementById('userTime').value); //take the user input
	document.getElementById('txtEST').value = EST.time(); //Since this input is already EST time put it into the EST label
	EST = EST.goto('America/Los_Angeles'); //Convert to PST
	document.getElementById('txtPST').value = EST.time(); //Put the PST time into the label
	EST = EST.goto('America/New_York'); //Convert the varible name back to it's orginal state
}
```
To change this to another time you would need to just change the `EST = EST.goto('America/Los_Angeles');`to the timezone you want to convert to. Than the `EST = EST.goto('America/New_York');` back to the timezone you are converting from. Make sure you change the variables on top as well. (Though if you are keeping an istence for yourself it would be recomended to change the varible names to not get confused)

For example this funciton is to go to PST so it assumes the input time is EST. It than takes that time and populates the EST time. As no conversion is needed. Than using goto converts it to PST. Fills the text field with the time and than puts EST back into it's orginal state.

Screenshot:
![Screenshot of Anime-Day](screenshot.jpeg)

This app uses [SpaceTime](https://github.com/spencermountain/spacetime) time libary. This is licenced under the Apache 2.0 license.


text:
[![Gem Version](https://badge.fury.io/rb/share-counter.png)](http://badge.fury.io/rb/share-counter)
[![Code Climate](https://codeclimate.com/github/ollieglass/share-counter/badges/gpa.svg)](https://codeclimate.com/github/ollieglass/share-counter)
[![Test Coverage](https://codeclimate.com/github/ollieglass/share-counter/badges/coverage.svg)](https://codeclimate.com/github/ollieglass/share-counter)
[![Build Status](https://travis-ci.org/ollieglass/share-counter.svg?branch=master)](https://travis-ci.org/ollieglass/share-counter)
[![Dependency Status](https://gemnasium.com/ollieglass/share-counter.svg)](https://gemnasium.com/ollieglass/share-counter)

# ShareCounter

Returns the number of shares for a link from

* Twitter
* Facebook
* LinkedIn
* Google+
* Reddit
* Delicious
* StumbleUpon
* Pinterest

Listed on [RubyGems](http://rubygems.org/gems/share-counter)

Issue reports, feature requests and pull requests welcome.

Spiritual successor to the [Share Counts](https://github.com/vitobotta/share_counts) gem.

## Installation

```
gem install share-counter
```

## Usage

```ruby
2.1.1 :001 > require 'share-counter'
2.1.1 :002 > url = 'http://rinse.fm'

# get all
# note that facebook returns a hash
2.1.1 :003 > counts = ShareCounter.all url
 => {:reddit=>9, :twitter=>26329, :facebook=>{:commentsbox_count=>0, :click_count=>3870, :total_count=>73322, :comment_count=>13597, :like_count=>39899, :share_count=>19826}, :linkedin=>154, :googleplus=>2, :delicious=>5, :stumbleupon=>2087, :pinterest=>0}

# get specific networks
2.1.1 :004 > counts = ShareCounter.selected url, [:twitter, :linkedin]
 => {:twitter=>26329, :linkedin=>154}

# get one network
2.1.1 :005 > ShareCounter.twitter url
 => 25042
```

repository: ollieglass/share-counter

gha_language: Ruby

repo_name: ollieglass/share-counter


text:
# analytics.js-integration-rockerbox [![Build Status][ci-badge]][ci-link]

Rockerbox integration for [Analytics.js][].

## License

Released under the [MIT license](LICENSE).

[Analytics.js]: https://segment.com/docs/libraries/analytics.js/
[ci-link]: https://circleci.com/gh/segment-integrations/analytics.js-integration-rockerbox
[ci-badge]: https://circleci.com/gh/segment-integrations/analytics.js-integration-rockerbox.svg?style=svg&circle-token=7dd5b1fa1cd8ddc8b88007a2da9f0a6803de5733


text:
# IntelliJ Platform SDK Documentation

[![official JetBrains project](https://jb.gg/badges/official-flat-square.svg)][jb:github]
[![Twitter Follow](https://img.shields.io/badge/follow-%40JBPlatform-1DA1F2?logo=twitter)][jb:twitter]
[![Build](https://img.shields.io/github/actions/workflow/status/JetBrains/intellij-sdk-docs/code-samples.yml?branch=main&style=flat-square)][gh:workflow-code-samples]
[![Slack](https://img.shields.io/badge/Slack-%23intellij--platform-blue?style=flat-square&logo=Slack)][jb:slack]

Welcome to the repository for [IntelliJ Platform SDK Documentation](https://plugins.jetbrains.com/docs/intellij/?from=GH-README) site.

> **Note**
> The code samples can also be found in the [IntelliJ SDK Code Samples](https://github.com/JetBrains/intellij-sdk-code-samples) mirror repository.

## Feedback

Please report any content inconsistencies, outdated materials, cosmetic issues, and other defects using the channels listed in [Getting Help](https://plugins.jetbrains.com/docs/intellij/getting-help.html).

## Contributing

Please follow the steps outlined in [Contributing](https://plugins.jetbrains.com/docs/intellij/intellij-sdk-docs-original-contributing.html).

[gh:workflow-code-samples]: https://github.com/JetBrains/intellij-sdk-docs/actions/workflows/code-samples.yml

[jb:github]: https://github.com/JetBrains/.github/blob/main/profile/README.md

[jb:slack]: https://plugins.jetbrains.com/slack

[jb:twitter]: https://twitter.com/JBPlatform

repository: JetBrains/intellij-sdk-docs

gha_language: Markdown

repo_name: JetBrains/intellij-sdk-docs


text:
# Sending email by connecting NodeJs & PostgreSQL

This project helps you to write backend using ExpressJs,NodeJs and PostgresSQL.It also makes use of express-validator to validate the emailId.It enables you to easily send emails to the required email by customising your own content for you email.

## What's needed

- Make sure you have [postgresql](https://www.postgresql.org/download/) installed on machine and [pgAdmin](https://www.pgadmin.org/download/) - postgresql management tool
- Make sure you have [node.js](https://nodejs.org/en/download/) installed

## Folder Structure

Within the download you'll find the following directories and files:
```
Connecting NodeJs & PostgreSQL
.
├──── app.js
├──── package.json
├── package-lock.json
├── .gitattributes
├── .gitignore
├── LICENSE
└── README.md
```
## Database Connections - PostgreSQL

Create Database and use the credentials at `connectionStrings`.

```
const { Client } = require('pg');
var connectionString = "postgres://postgres:postgres@localhost:5432/database";

const client = new Client({
    connectionString: connectionString
});
```

## Getting started

- Download the project’s zip
- Create table & insert some default value in PostgreSQL

```
CREATE TABLE Employee(
	id int not null,
	name text not null,
	rollnumber int not null
);

INSERT INTO Employee values(1,'John',1001);

```

- Type `npm install` in terminal/console in the source folder where `package.json` is located
- Type `node app.js` in terminal/console in the source folder where `app.js` is located
- server started on port 4000. (http://localhost:4000/) in default browser


text:
# imSofi's NUR packages

**My personal [NUR](https://github.com/nix-community/NUR) repository**

![Build and populate cache](https://github.com/imsofi/nur-pkgs/workflows/Build%20and%20populate%20cache/badge.svg)

[![Cachix Cache](https://img.shields.io/badge/cachix-imsofi-blue.svg)](https://imsofi.cachix.org)

license: ISC

repository: nix-community/nur-combined

gha_language: Nix

repo_name: nix-community/nur-combined


text:
# PGJSON: start saving data to Postgres without thinking about schema

Welcome to PGJSON!

[![Build Status](https://travis-ci.org/fiatjaf/pgjson.svg?branch=master)](https://travis-ci.org/fiatjaf/pgjson)
[![NPM Link](https://nodei.co/npm/pgjson.png)](https://npmjs.com/pgjson)

```javascript
var db = new (require('pgjson'))('postgres:///db')

Promise.resolve().then(function () {
  return db.post({
    name: 'tomato',
    uses: ['tomato juice']
  })
})
.then(function (res) {
  console.log(res) /* {ok: true, id: 'xwkfi23syw'} */
  return db.get('xwkfi23syw')
})
.then(function (doc) {
  console.log(doc) /* {_id: 'xwkfi23syw', name: 'tomato', uses: ['tomato juice']} */
  doc.uses.push('ketchup')
  doc.colour = 'red'
  return db.put(doc)
})
.then(function (res) {
  console.log(res) /* {ok: true, id: 'xwkfi23syw'} */
  db.del(doc._id)
})
.catch(console.log.bind(console))
```

In the meantime:

```sql
postgres=> SELECT * FROM pgjson.main;
     id     |                                doc
------------+-------------------------------------------------------------------
 xwkfi23syw | {"_id": "xwkfi23syw", "name": "tomato", "uses": ["tomato juice"]}
(1 row)
postgres=>
postgres=> SELECT * FROM pgjson.main;
     id     |                                doc
------------+-------------------------------------------------------------------
 xwkfi23syw | {"_id": "xwkfi23syw", "name": "tomato", "uses": ["tomato juice", "ketchup"], "colour": "red"}
(1 row)
postgres=>
```

Basically this.

Which means you can use this same data later, create indexes on specific JSON fields, easily migrate the data to other table structure, create views or materialized views.

---

## API

### new PGJSON(options): DB

`options` is anything [pg](https://github.com/brianc/node-postgres/wiki/Client#constructors) can take: a connection string, a domain socket folder or a config object. See the link for more details.

### DB.get(string _or_ array): Promise -> doc

accepts the id, as string, of some document as a parameter, or an array of ids, and returns a promise for the raw stored JSON document. If passed an array of ids, the promise resolves to an array filled with the documents it could find, or null when it could not, in the correct order. If passed a single id and the target document is not found the promise resolves to `null`.

### DB.post(object _or_ array): Promise -> response

accepts an object or an array of objects corresponding to all the documents you intend to create. Saves them with a random `.\_id` each and returns a promise for a response which will contain `{ok: true, id: <the random id>}`. If an array of objects was passed, instead returns `{ok: true, ids: [<id>, <id>...]}` with the ids in the correct order. If any passed object has an `\_id` property this property will be discarded.

### DB.put(document): Promise -> response

same as .post, but instead of creating a new document with a random id, this expects a complete _document_, which is to say an object with an `\_id` property. Updates (or creates, if none is found) the document with the specified id.

### DB.del(string _or_ array): Promise -> response

accepts an id, as string, or an array of strings corresponding to all the keys you want to delete. The response is an object of format `{ok: true}`.

### DB.allIds(): Promise -> array

returns a promise to an array of ids (strings) of all documents stored in the database.

### DB.count(): Promise -> integer

returns a promise to an integer with the count of all documents stored in the database.

### DB.purgeAll(): Promise -> null

deletes everything: table, rows, schema. This isn't supposed to be used.

### DB.init(): Promise -> null

creates a schema called _pgjson_, a table called _main_ and a function called _upsert_. This is idempotent and is called automatically when the DB is instantiated.

repository: knownasilya/pgjson

repo_name: knownasilya/pgjson


text:
# Reactive Hooks
[![npm version](https://badge.fury.io/js/reactivehooks.svg)](https://badge.fury.io/js/reactivehooks)
[![Build Status](https://travis-ci.org/lucasteles/reactivehooks.svg?branch=master)](https://travis-ci.org/lucasteles/reactivehooks)
[![Coverage Status](https://img.shields.io/coveralls/github/lucasteles/reactivehooks/master.svg)](https://coveralls.io/github/lucasteles/reactivehooks?branch=master)

Reactive Hooks provides a set of tools for work with Reactive Extensions in React using hooks

** This project is in a very early stage, feel free to contribute 😉

[**Click here to check an online working SAMPLE**](https://stackblitz.com/edit/rectivehooks-sample)

## Installation

Nothing new here, just npm install
```sh
npm i reactivehooks
```

## Get Started

The code below is a sample that shows how to write a type ahead search using Reactive Hooks and [RxJs](https://github.com/ReactiveX/rxjs):

* for a more complete example check the [**sample project**](https://github.com/lucasteles/reactivehookssample)  or check this working [online sample](https://stackblitz.com/edit/rectivehooks-sample)

```tsx
// api fetch that returns an observable
const searchStarWarsPeople = (name: string) =>
      fetchJson<StarWarApiPeopleResult>(`https://swapi.co/api/people/?format=json&search=${name}`)

// create an input text that has obsevable properties
const SearchText = rxInput("text")
const loader = createLoaderControl() // loader control

// Rx operator pipeline for type ahead search
const typeAheadSearch$ =
  SearchText.onValueChanges$.pipe(
    filter(x => x.length >= 2),
    debounceTime(300),
    distinctUntilChanged(),
    loader.start(),
    switchMap(searchStarWarsPeople),
    retry(3),
    map(x => x.results),
    loader.stop(),
  )

const App = () => {
  // use observables
  const starWarsPeople = useObservable(typeAheadSearch$, [])
  const isLoading = useObservable(loader.status$, false)

  return (
    <div>
      <header>
        <SearchText  />
        {isLoading && <span>loading...</span>}
        <ul>
          {starWarsPeople.map((x, i) =>
            <li key={i}>
              <div>{x.name}</div>
            </li>
          )}
        </ul>
      </header>
    </div>
  )
}
```

# Documentation

## useSubscribe

A hook that provides a way to just subscribe to an observable

Signature:
```ts
 function useSubscribe<T>(
   observable: Observable<T>,
   next?: ((value: T) => void),
   error?: ((error: any) => void),
   complete?: ((done: boolean) => void)
 ): void
```

---
## useObservable

A hook that subscribes to an observable and returns the emited value as a state for your component

Signature:
```ts
function useObservable<T>(
    observable: Observable<T>,
    initialValue: T
): T
```
---
## useObservableWithError

A hook that subscribes to an observable and returns the emited value, error or complete as a state for your component

Signature:
```ts
function useObservableWithError<T>(
    observable: Observable<T>,
    initialValue: T
): [T, any, boolean]
```
---
## useRxInputValue

A hook that subscribes to an observable of changes of a `RxInput`, returning the value and a function to change the input value

Signature:
```ts
function useRxInputValue(
  rxInput: RxInput,
  initialValue: string
) => [string, (value: string) => void]
```
---

## rxInput

Creates a html input of given type, the control have observable properties for control changes

Signature:
```ts
function rxInput(type: string): RxInput
```

### Properties

| Property        | Event    | Notes                                                                |
|-----------------|----------|----------------------------------------------------------------------|
| onChange$       | onChange |                                                                      |
| onFocus$        | onFocus  |                                                                      |
| onBlur$         | onBlur   |                                                                      |
| onValueChanges$ | onChange | Emit just the value of the control without the complete event object |
---

## rxButton

Creates a html button, the control have observable properties for control changes

Signature:
```ts
function rxButton(): RxButton
```

### Properties

| Property        | Event    | Notes                                                                |
|-----------------|----------|----------------------------------------------------------------------|
| onClick$       | onClick |                                                                      |

---
## createLoaderControl

Creates a helper object with RxJs operators for start and stop a loader observable

Signature:
```ts
function createLoaderControl(): {
    start(): function<T>(x: Observable<T>): Observable<T>;
    stop(): function<T>(x: Observable<T>): Observable<T>;
    status$: Observable<boolean>
}
```

---
## fetchJson

Is just the `fromFetch`  from `rxjs/fetch`, but auto map to `json()`

Signature:
```ts
function fetchJson<T>(
  url: string | Request,
  init?: RequestInit
): Observable<T>
```
---

repository: lucasteles/reactivehooks

gha_language: TypeScript

repo_name: lucasteles/reactivehooks


text:
---
title: recursive.ts
nav_order: 6
parent: Modules
---

---

Table of contents

- [ModelAlgebraRecursive (interface)](#modelalgebrarecursive-interface)
- [ModelAlgebraRecursive1 (interface)](#modelalgebrarecursive1-interface)
- [ModelAlgebraRecursive2 (interface)](#modelalgebrarecursive2-interface)
- [RecursiveURI (type alias)](#recursiveuri-type-alias)
- [RecursiveURI (constant)](#recursiveuri-constant)

---

# ModelAlgebraRecursive (interface)

**Signature**

```ts
export interface ModelAlgebraRecursive<F, Env> {
  _F: F
  recursive: <L, A>(a: (x: HKT2<F, Env, L, A>) => HKT2<F, Env, L, A>, name: string) => HKT2<F, Env, L, A>
}
```

Added in v0.0.1

# ModelAlgebraRecursive1 (interface)

**Signature**

```ts
export interface ModelAlgebraRecursive1<F extends URIS, Env extends AnyEnv> {
  _F: F
  recursive: <A>(a: (x: Kind<F, Env, A>) => Kind<F, Env, A>, name: string) => Kind<F, Env, A>
}
```

Added in v0.0.1

# ModelAlgebraRecursive2 (interface)

**Signature**

```ts
export interface ModelAlgebraRecursive2<F extends URIS2, Env extends AnyEnv> {
  _F: F
  recursive: <L, A>(a: (x: Kind2<F, Env, L, A>) => Kind2<F, Env, L, A>, name: string) => Kind2<F, Env, L, A>
}
```

Added in v0.0.1

# RecursiveURI (type alias)

**Signature**

```ts
export type RecursiveURI = typeof RecursiveURI
```

Added in v0.0.1

# RecursiveURI (constant)

**Signature**

```ts
export const RecursiveURI: "RecursiveURI" = ...
```

Added in v0.0.1


text:
# image_folder
Computational-Social-Science-Twitter-Topic/projects/Lab2B-Twitter-Word-Frequency/images

# steps

## 2-2 Step 1
### name
```
Pass in Parameters to Cursor
```

### md_content
```
Use Tweepy's `Cursor` object to handle pagination and pass in parameters like the `API search`, `query`, `language` and `time duration`. You can set the number of results you extract to 1000 and store the entire result in a variable `tweets`.
```

repository: ShayanRiyaz/curriculum

repo_name: ShayanRiyaz/curriculum


text:
# Popular Movies Stage 1

## General Overview

This repo contains all the work done for the **Popular Movies Stage 1** project of the Udacity's Android Developer Nanodegree.

## Application description

This applicaction contains the following functionalities:

* Presents a grid view with different movie posters. All the movie information has been obtain from themoviedb.org API. Please see [this link](https://www.themoviedb.org/documentation/api)   for more infomation about the API used

* Allow your user to change sort order:
	* Most popular movies
	* Top rated movies

* Once the user clicks on a movie poster a new Activity is created presenting more details about the movie:
	* Original title
	* Movie poster image thumbnail
	* Synopsis
	* User rating
	* Release date

## Application class structure

    |-- activities package
    |   |-- DetailActivity.java
    |   |-- MainActivity.java
    |-- movie package
    |   |-- Movie.java
    |   |-- MovieAdapter.java
    |-- utilities package
    |   |-- JsonMovieUtils.java
    |   |-- NetworkUtils.java

**Activities package**

* DetailActivity: Activity where the details of a movie are shown
* MainActivity: Main Activity of the app. All the network request are done here

**Movie package**

* Movie: Represents a movie with all its info
* MovieAdapter: RecyclerView in charge of present the movies to the user

**Utilities package**

* JsonMovieUtils: Parses the movie info obtained from JSON as results of network requets
* NetWorkUtils: Request movie info to themoviedb.org

## Screenshots

![mainActivityPortrait](doc/images/main_activity.jpg) ![recipeDetailPortrait](doc/images/detail_activity.jpg)

## Add your themoviedb.org API key

As mentioned before, you need to register in themoviedb.org to obtain a key for their API in order to use this app.

The key goes in the NetworkUtils.java class of the utilties package line 26. [shortcut](https://github.com/acasadoquijada/popularmovies-stage1/blob/master/app/src/main/java/com/example/popularmoviesstage1/utilities/NetworkUtils.java#L26)


text:
# Jackson JSON Library
This project uses the Jackson JSON library because Jackson has many features that makes developing
a lot quicker. The biggest reason why we use this is annotations. Jackson has many annotations to provide
all the possible options for configuration that this project needs.

### Explicit
The code uses a custom annotation: `JsonExplicit`. This annotation stops Jackson from auto detecting all
public methods, fields, etc. Instead of configuring this using an `ObjectMapper`, this project heavily relies
on annotations. The reason behind this is that we want classes to work with an `ObjectMapper` with little to no configuration.

repository: CapnJackOff/solarthing

repo_name: CapnJackOff/solarthing


text:
# Using CSS Classes for Styling

If you prefer to use CSS to handle styling the modal you can.

One thing to note is that by using the className property you will override all default styles.

[CSS classes example](https://codepen.io/claydiffrient/pen/KNjVrG)

repository: urantialife/react-modal

repo_name: urantialife/react-modal


text:
# Pywick

[![docs](https://img.shields.io/badge/dynamic/json.svg?label=docs&url=https%3A%2F%2Fpypi.org%2Fpypi%2Fpywick%2Fjson&query=%24.info.version&colorB=brightgreen&prefix=v)](https://pywick.readthedocs.io/en/latest/)
[![Downloads](https://pepy.tech/badge/pywick)](https://pywick.readthedocs.io/en/latest/)
[![pypi](https://img.shields.io/pypi/v/pywick.svg)](https://pypi.org/project/pywick/)
[![python compatibility](https://img.shields.io/pypi/pyversions/pywick.svg)](https://pywick.readthedocs.io/en/latest/)
[![license](https://img.shields.io/pypi/l/pywick.svg)](https://github.com/achaiah/pywick/blob/master/LICENSE.txt)

#### High-Level Training framework for Pytorch

Pywick is a high-level Pytorch training framework that aims to get you
up and running quickly with state of the art neural networks. *Does the
world need another Pytorch framework?* Probably not. But we started this
project when no good frameworks were available and it just kept growing.
So here we are.

Pywick tries to stay on the bleeding edge of research into neural networks. If you just wish to run a vanilla CNN, this is probably
going to be overkill. However, if you want to get lost in the world of neural networks, fine-tuning and hyperparameter optimization
for months on end then this is probably the right place for you :)

Among other things Pywick includes:
- State of the art normalization, activation, loss functions and optimizers not included in the standard Pytorch library (AdaBelief, Addsign, Apollo, Eve, Lookahead, Radam, Ralamb, RangerLARS etc).
- A high-level module for training with callbacks, constraints, metrics, conditions and regularizers.
- Hundreds of popular object classification and semantic segmentation models!
- Comprehensive data loading, augmentation, transforms, and sampling capability.
- Utility tensor functions.
- Useful meters.
- Basic GridSearch (exhaustive and random).

## Docs
Hey, [check this out](https://pywick.readthedocs.io/en/latest/), we now have [docs](https://pywick.readthedocs.io/en/latest/)! They're still a work in progress though so apologies for anything that's broken.

## What's New (highlights)

### v0.6.5 - Docker all the things!
Another great improvement to the framework - docker! You can now run the 17flowers demo right out of the box!
  - Grab our docker image at [docker hub](https://hub.docker.com/repository/docker/achaiah/pywick): `docker pull achaiah/pywick:latest`. Pytorch 1.8 and cuda dependencies are pre-installed.
  - Run 17flowers demo with: `docker run --rm -it --ipc=host -v your_local_out_dir:/jobs/17flowers --init -e demo=true achaiah/pywick:latest`
  - Or run the container in standalone mode so you can use your own data (don't forget to map your local dir to container):
    ```bash
      docker run --rm -it \
      --ipc=host \
      -v <your_local_data_dir>:<container_data_dir> \
      -v <your_local_out_dir>:<container_out_dir> \
      --init \
      achaiah/pywick:latest
    ```

### Older Notes
- **Oct. 11, 2021 - We thought ya might like YAML!**
  - So you're saying you like **configuration files**? You're saying you like **examples** too? Well, we've got you covered! Huge release today with a configuration-based training example! All you have to do is:
    - Get your favorite dataset (or download [17 flowers](https://www.robots.ox.ac.uk/~vgg/data/flowers/17/) to get started and `pywick/examples/17flowers_split.py` to convert)
    - Adjust the `configs/train_classifier.yaml` file to fit your workspace
    - Then simply run: `python3 train_classifier.py configs/train_classifier.yaml` and watch it train!
- **May 6, 2021**
  - Many SoTA classification and segmentation models added: Swin-Transformer variants, NFNet variants (L0, L1), Halo nets, Lambda nets, ECA variants, Rexnet + others
  - Many new loss functions added: RecallLoss, SoftInvDiceLoss, OhemBCEDicePenalizeBorderLoss, RMIBCEDicePenalizeBorderLoss + others
  - Bug fixes
- **Jun. 15, 2020**
  - 700+ models added from [rwightman's](https://github.com/rwightman/pytorch-image-models) repo via `torch.hub`! See docs for all the variants!
  - Some minor bug fixes
- **Jan. 20, 2020**
  - New release: 0.5.6 (minor fix from 0.5.5 for pypi)
  - Mish activation function (SoTA)
  - [rwightman's](https://github.com/rwightman/gen-efficientnet-pytorch) models of pretrained/ported variants for classification (44 total)
    - efficientnet Tensorflow port b0-b8, with and without AP, el/em/es, cc
    - mixnet L/M/S
    - mobilenetv3
    - mnasnet
    - spnasnet
  - Additional loss functions
- **Aug. 1, 2019**
  - New segmentation NNs: BiSeNet, DANet, DenseASPP, DUNet, OCNet, PSANet
  - New Loss Functions: Focal Tversky Loss, OHEM CrossEntropy Loss, various combination losses
  - Major restructuring and standardization of NN models and loading functionality
  - General bug fixes and code improvements

## Install
Pywick requires **pytorch >= 1.4**

`pip install pywick`

or specific version from git:

`pip install<EMAIL_ADDRESS>
## ModuleTrainer
The `ModuleTrainer` class provides a high-level training interface which abstracts away the training loop while providing callbacks, constraints, initializers, regularizers,
and more.

See the `train_classifier.py` example for a pretty complete configuration example. To get up and running with your own data quickly simply edit the `configs/train_classifier.yaml` file with your desired parameters and dataset location(s).

Note: Dataset needs to be organized for classification where each directory name is the name of a class and contains all images pertaining to that class

PyWick provides a wide range of callbacks, generally mimicking the interface found in `Keras`:

- `CSVLogger` - Logs epoch-level metrics to a CSV file
- [`CyclicLRScheduler`](https://github.com/bckenstler/CLR) - Cycles through min-max learning rate
- `EarlyStopping` - Provides ability to stop training early based on supplied criteria
- `History` - Keeps history of metrics etc. during the learning process
- `LambdaCallback` - Allows you to implement your own callbacks on the fly
- `LRScheduler` - Simple learning rate scheduler based on function or supplied schedule
- `ModelCheckpoint` - Comprehensive model saver
- `ReduceLROnPlateau` - Reduces learning rate (LR) when a plateau has been reached
- `SimpleModelCheckpoint` - Simple model saver
- Additionally, a `TensorboardLogger` is incredibly easy to implement via tensorboardX (now part of pytorch 1.1 release!)

```python
from pywick.callbacks import EarlyStopping

callbacks = [EarlyStopping(monitor='val_loss', patience=5)]
trainer.set_callbacks(callbacks)
```

PyWick also provides regularizers:

- `L1Regularizer`
- `L2Regularizer`
- `L1L2Regularizer`

and constraints:
- `UnitNorm`
- `MaxNorm`
- `NonNeg`

Both regularizers and constraints can be selectively applied on layers using regular expressions and the `module_filter`
argument. Constraints can be explicit (hard) constraints applied at an arbitrary batch or
epoch frequency, or they can be implicit (soft) constraints similar to regularizers
where the constraint deviation is added as a penalty to the total model loss.

```python
from pywick.constraints import MaxNorm, NonNeg
from pywick.regularizers import L1Regularizer

# hard constraint applied every 5 batches
hard_constraint = MaxNorm(value=2., frequency=5, unit='batch', module_filter='*fc*')
# implicit constraint added as a penalty term to model loss
soft_constraint = NonNeg(lagrangian=True, scale=1e-3, module_filter='*fc*')
constraints = [hard_constraint, soft_constraint]
trainer.set_constraints(constraints)

regularizers = [L1Regularizer(scale=1e-4, module_filter='*conv*')]
trainer.set_regularizers(regularizers)
```

You can also fit directly on a `torch.utils.data.DataLoader` and can have
a validation set as well :

```python
from pywick import TensorDataset
from torch.utils.data import DataLoader

train_dataset = TensorDataset(x_train, y_train)
train_loader = DataLoader(train_dataset, batch_size=32)

val_dataset = TensorDataset(x_val, y_val)
val_loader = DataLoader(val_dataset, batch_size=32)

trainer.fit_loader(loader, val_loader=val_loader, num_epoch=100)
```

## Extensive Library of Image Classification Models (most are pretrained!)
- All standard models from Pytorch:
  - [**Densenet**](https://arxiv.org/abs/1608.06993)
  - [**Inception v3**](https://www.cv-foundation.org/openaccess/content_cvpr_2016/papers/Szegedy_Rethinking_the_Inception_CVPR_2016_paper.pdf)
  - [**MobileNet v2**](https://arxiv.org/abs/1801.04381)
  - [**ResNet**](https://arxiv.org/abs/1512.03385)
  - [**ShuffleNet v2**](https://arxiv.org/abs/1807.11164)
  - [**SqueezeNet**](https://arxiv.org/abs/1602.07360)
  - [**VGG**](https://arxiv.org/abs/1409.1556)
- [**BatchNorm Inception**](https://arxiv.org/abs/1502.03167)
- [**Deep High-Resolution Representation Learning for Human Pose Estimation**](https://arxiv.org/abs/1902.09212v1)
- [**Deep Layer Aggregation**](https://arxiv.org/abs/1707.06484)
- [**Dual Path Networks**](https://arxiv.org/abs/1707.01629)
- [**EfficientNet variants (b0-b8, el, em, es, lite1-lite4, pruned, AP/NS)**](https://arxiv.org/abs/1905.11946)
- [**ECA-Net: Efficient Channel Attention for Deep Convolutional Neural Networks**](https://arxiv.org/abs/1910.03151v4)
- [**FBResnet**](https://github.com/facebook/fb.resnet.torch)
- [**FBNet-C**](https://arxiv.org/abs/1812.03443)
- [**Inception v4**](http://arxiv.org/abs/1602.07261)
- [**InceptionResnet v2**](https://arxiv.org/abs/1602.07261)
- [**Mixnet variants (l, m, s, xl, xxl)**](https://arxiv.org/abs/1907.09595)
- [**MnasNet**](https://arxiv.org/abs/1807.11626)
- [**MobileNet V3**](https://arxiv.org/abs/1905.02244)
- [**NasNet variants (mnas, pnas, mobile)**](https://arxiv.org/abs/1707.07012)
- [**PNASNet**](https://arxiv.org/abs/1712.00559)
- [**Polynet**](https://arxiv.org/abs/1611.05725)
- [**Pyramid Resnet**](https://arxiv.org/abs/1610.02915)
- [**RegNet - Designing Network Design Spaces**](https://arxiv.org/abs/2003.13678)
- **[Resnet variants (gluon, res2net, se, ssl, tv, wide)](https://arxiv.org/abs/1512.03385)**
- [**ResNeSt: Split-Attention Networks**](https://arxiv.org/abs/2004.08955)
- [**ResNext variants (ig, se, ssl, swsl, tv)**](https://arxiv.org/abs/1611.05431)
- [**SE Net variants (gluon, resnet, resnext, inception)**](https://arxiv.org/pdf/1709.01507.pdf)
- [**SelecSLS Convolutional Net**](https://github.com/mehtadushy/SelecSLS-Pytorch)
- [**Selective Kernel Networks**](https://arxiv.org/abs/1903.06586)
- [**Semi-Supervised and Semi-Weakly Supervised ImageNet Models**](https://github.com/facebookresearch/semi-supervised-ImageNet1K-models)
- [**Single-Pass NAS Net**](https://arxiv.org/abs/1904.02877)
- [**TResNet: High Performance GPU-Dedicated Architecture**](https://arxiv.org/abs/2003.13630)
- [**Wide Resnet**](https://arxiv.org/abs/1605.07146)
- [**XCeption**](https://arxiv.org/pdf/1610.02357.pdf)
- All the newest classification models (200+) from [rwightman's repo](https://github.com/rwightman/pytorch-image-models) ECA-NFNet, GERNet, RegNet, SKResnext, SWIN-Transformer, VIT etc.)

## Image Segmentation Models
- **BiSeNet** ([Bilateral Segmentation Network for Real-time Semantic Segmentation](https://arxiv.org/abs/1808.00897))
- **DANet** ([Dual Attention Network for Scene Segmentation](https://arxiv.org/abs/1809.02983))
- **Deeplab v2** ([DeepLab: Semantic Image Segmentation with Deep Convolutional Nets, Atrous Convolution, and Fully Connected CRFs](https://arxiv.org/abs/1606.00915))
- **Deeplab v3** ([Rethinking Atrous Convolution for Semantic Image Segmentation](https://arxiv.org/abs/1706.05587))
- **DenseASPP** ([DenseASPP for Semantic Segmentation in Street Scenes](http://openaccess.thecvf.com/content_cvpr_2018/papers/Yang_DenseASPP_for_Semantic_CVPR_2018_paper.pdf))
- **DRNNet** ([Dilated Residual Networks](http://openaccess.thecvf.com/content_cvpr_2017/papers/Yu_Dilated_Residual_Networks_CVPR_2017_paper.pdf))
- **DUC, HDC** ([understanding convolution for semantic segmentation](https://arxiv.org/abs/1702.08502))
- **DUNet** ([Decoders Matter for Semantic Segmentation](https://arxiv.org/abs/1903.02120))
- **ENet** ([ENet: A Deep Neural Network Architecture for Real-Time Semantic Segmentation](https://arxiv.org/abs/1606.02147))
- **Vanilla FCN:** FCN32, FCN16, FCN8, in the versions of VGG, ResNet
    and OptDenseNet respectively ([Fully convolutional networks for semantic segmentation](http://www.cv-foundation.org/openaccess/content_cvpr_2015/papers/Long_Fully_Convolutional_Networks_2015_CVPR_paper.pdf))
- **FRRN** ([Full Resolution Residual Networks for Semantic Segmentation in Street Scenes](https://arxiv.org/abs/1611.08323))
- **FusionNet** ([FusionNet in Tensorflow by Hyungjoo Andrew Cho](https://github.com/NySunShine/fusion-net))
- **GALDNet**
- **GCN** ([Large Kernel Matters](https://arxiv.org/pdf/1703.02719))
- **LinkNet** ([Link-Net](https://codeac29.github.io/projects/linknet/))
- **OCNet** ([Object Context Network for Scene Parsing](https://arxiv.org/abs/1809.00916))
- **PSPNet** ([Pyramid scene parsing network](https://arxiv.org/abs/1612.01105))
- **RefineNet** ([RefineNet](https://arxiv.org/abs/1611.06612))
- **SegNet** ([Segnet: A deep convolutional encoder-decoder architecture for image segmentation](https://arxiv.org/pdf/1511.00561))
- **Tiramisu** ([The One Hundred Layers Tiramisu: Fully Convolutional DenseNets for Semantic Segmentation](https://arxiv.org/abs/1611.09326))
- **U-Net** ([U-net: Convolutional networks for biomedical image segmentation](https://arxiv.org/abs/1505.04597))
- Additional variations of many of the above

###### To load one of these models:
[Read the docs](https://pywick.readthedocs.io/en/latest/api/pywick.models.html)
for useful details! Then dive in:
```python
# use the `get_model` utility
from pywick.models.model_utils import get_model, ModelType

model = get_model(model_type=ModelType.CLASSIFICATION, model_name='resnet18', num_classes=1000, pretrained=True)
```
For a complete list of models (including many experimental ones) you can call the `get_supported_models` method e.g.
`pywick.models.model_utils.get_supported_models(ModelType.SEGMENTATION)`

## Data Augmentation and Datasets
The PyWick package provides wide variety of good data augmentation and transformation
tools which can be applied during data loading. The package also provides the flexible
`TensorDataset`, `FolderDataset` and `MultiFolderDataset` classes to handle most dataset needs.

### Torch Transforms
##### These transforms work directly on torch tensors

- `AddChannel`
- `ChannelsFirst`
- `ChannelsLast`
- `Compose`
- `ExpandAxis`
- `Pad`
- `PadNumpy`
- `RandomChoiceCompose`
- `RandomCrop`
- `RandomFlip`
- `RandomOrder`
- `RangeNormalize`
- `Slice2D`
- `SpecialCrop`
- `StdNormalize`
- `ToFile`
- `ToNumpyType`
- `ToTensor`
- `Transpose`
- `TypeCast`

##### Additionally, we provide image-specific manipulations directly on tensors:

- `Brightness`
- `Contrast`
- `Gamma`
- `Grayscale`
- `RandomBrightness`
- `RandomChoiceBrightness`
- `RandomChoiceContrast`
- `RandomChoiceGamma`
- `RandomChoiceSaturation`
- `RandomContrast`
- `RandomGamma`
- `RandomGrayscale`
- `RandomSaturation`
- `Saturation`

#####  Affine Transforms (perform affine or affine-like transforms on torch tensors)

- `RandomAffine`
- `RandomChoiceRotate`
- `RandomChoiceShear`
- `RandomChoiceTranslate`
- `RandomChoiceZoom`
- `RandomRotate`
- `RandomShear`
- `RandomSquareZoom`
- `RandomTranslate`
- `RandomZoom`
- `Rotate`
- `Shear`
- `Translate`
- `Zoom`

We also provide a class for stringing multiple affine transformations together so that only one interpolation takes place:

- `Affine`
- `AffineCompose`

##### Blur and Scramble transforms (for tensors)
- `Blur`
- `RandomChoiceBlur`
- `RandomChoiceScramble`
- `Scramble`

### Datasets and Sampling
We provide the following datasets which provide general structure and iterators for sampling from and using transforms on in-memory or out-of-memory data. In particular,
the [FolderDataset](pywick/datasets/FolderDataset.py) has been designed to fit most of your dataset needs. It has extensive options for data filtering and manipulation.
It supports loading images for classification, segmentation and even arbitrary source/target mapping. Take a good look at its documentation for more info.

- `ClonedDataset`
- `CSVDataset`
- `FolderDataset`
- `MultiFolderDataset`
- `TensorDataset`
- `tnt.BatchDataset`
- `tnt.ConcatDataset`
- `tnt.ListDataset`
- `tnt.MultiPartitionDataset`
- `tnt.ResampleDataset`
- `tnt.ShuffleDataset`
- `tnt.TensorDataset`
- `tnt.TransformDataset`

### Imbalanced Datasets
In many scenarios it is important to ensure that your traing set is properly balanced,
however, it may not be practical in real life to obtain such a perfect dataset. In these cases
you can use the `ImbalancedDatasetSampler` as a drop-in replacement for the basic sampler provided
by the DataLoader. More information can be found [here](https://github.com/ufoym/imbalanced-dataset-sampler)

```python
from pywick.samplers import ImbalancedDatasetSampler

train_loader = torch.utils.data.DataLoader(train_dataset,
    sampler=ImbalancedDatasetSampler(train_dataset),
    batch_size=args.batch_size, **kwargs)
```

## Utility Functions
PyWick provides a few utility functions not commonly found:

### Tensor Functions
- `th_iterproduct` (mimics itertools.product)
- `th_gather_nd` (N-dimensional version of torch.gather)
- `th_random_choice` (mimics np.random.choice)
- `th_pearsonr` (mimics scipy.stats.pearsonr)
- `th_corrcoef` (mimics np.corrcoef)
- `th_affine2d` and `th_affine3d` (affine transforms on torch.Tensors)

## Acknowledgements and References
We stand on the shoulders of (github?) giants and couldn't have done
this without the rich github ecosystem and community. This framework is
based in part on the excellent
[Torchsample](https://github.com/ncullen93/torchsample) framework
originally published by @ncullen93. Additionally, many models have been
gently borrowed/modified from @Cadene pretrained models
[repo](https://github.com/Cadene/pretrained-models.pytorch) as well as @Tramac segmentation [repo](https://github.com/Tramac/awesome-semantic-segmentation-pytorch).

##### Thank you to the following people and the projects they maintain:
- @ncullen93
- @cadene
- @deallynomore
- @recastrodiaz
- @zijundeng
- @Tramac
- And many others! (attributions listed in the codebase as they occur)

##### Thank you to the following projects from which we gently borrowed code and models
- [PyTorchNet](https://github.com/pytorch/tnt)
- [pretrained-models.pytorch](https://github.com/Cadene/pretrained-models.pytorch)
- [DeepLab_pytorch](https://github.com/doiken23/DeepLab_pytorch)
- [Pytorch for Semantic Segmentation](https://github.com/zijundeng/pytorch-semantic-segmentation)
- [Binseg Pytorch](https://github.com/saeedizadi/binseg_pytoch)
- [awesome-semantic-segmentation-pytorch](https://github.com/Tramac/awesome-semantic-segmentation-pytorch)
- And many others! (attributions listed in the codebase as they occur)

| *Thangs are broken matey! Arrr!!!* |
|-----------------------|
| We're working on this project as time permits so you might discover bugs here and there. Feel free to report them, or better yet, to submit a pull request! |

repository: csetraynor/pywick

repo_name: csetraynor/pywick


text:
rwvfs
=====

Package rwvfs augments vfs to support write operations.

* [rwvfs documentation](https://sourcegraph.com/sourcegraph/rwvfs)
* [golang.org/x/tools/godoc/vfs documentation](http://godoc.org/golang.org/x/tools/godoc/vfs)

[![Build Status](https://travis-ci.org/sourcegraph/rwvfs.png)](https://travis-ci.org/sourcegraph/rwvfs)

## HTTP VFS

This repository includes HTTP server and client implementations of a
read-write virtual filesystem. The HTTP server is a Go http.Handler
that exposes any underlying RWVFS via HTTP. The HTTP client is a Go
implementation of rwvfs.FileSystem that communicates with an external
HTTP server. They both speak the same API on top of HTTP; see the code
for details.

To spin up a test client and server, follow these instructions.

repository: sourcegraph/rwvfs

gha_language: Go

repo_name: sourcegraph/rwvfs


text:
### Introduction

Real-world data rarely comes clean. Using Python and its libraries, you will gather data from a variety of sources and in a variety of formats, assess its quality and tidiness, then clean it. This is called data wrangling. You will document your wrangling efforts in a Jupyter Notebook, plus showcase them through analyses and visualizations using Python (and its libraries) and/or SQL.

The dataset that you will be wrangling (and analyzing and visualizing) is the tweet archive of Twitter user [@dog_rates](https://twitter.com/dog_rates), also known as [WeRateDogs](https://en.wikipedia.org/wiki/WeRateDogs). WeRateDogs is a Twitter account that rates people's dogs with a humorous comment about the dog. These ratings almost always have a denominator of 10. The numerators, though? Almost always greater than 10. 11/10, 12/10, 13/10, etc. Why? Because ["they're good dogs Brent."](http://knowyourmeme.com/memes/theyre-good-dogs-brent) WeRateDogs has over 4 million followers and has received international media coverage.

WeRateDogs downloaded their Twitter archive and shared it exclusively for use in this project. This archive contains basic tweet data (tweet ID, timestamp, text, etc.) for all 5000+ of their tweets as they stood on August 1, 2017.

![alt text](https://d17h27t6h515a5.cloudfront.net/topher/2017/October/59dd378f_dog-rates-social/dog-rates-social.jpg)

### Project Details

Your tasks in this project are as follows:

  * Data wrangling, which consists of:
    * Gathering data
    * Assessing data
    * Cleaning data

* Storing, analyzing, and visualizing your wrangled data
* Reporting on 1) your data wrangling efforts and 2) your data analyses and visualizations

### Gathering Data for this Project

Gather each of the three pieces of data as described below in a Jupyter Notebook titled wrangle_act.ipynb:

1. The WeRateDogs Twitter archive twitter_archive_enhanced.csv. It's instructed that this file be downloaded manually from an URL provided by Udacity.
2. The tweet image predictions, i.e., what breed of dog (or other object, animal, etc.) is present in each tweet according to a neural network. This file (image_predictions.tsv) hosted on Udacity's servers and should be downloaded programmatically using the [Requests](http://docs.python-requests.org/en/master/) library and the following URL: https://d17h27t6h515a5.cloudfront.net/topher/2017/August/599fd2ad_image-predictions/image-predictions.tsv
3. Each tweet's retweet count and favorite (i.e. "like") count at minimum, and any additional data you find interesting. Using the tweet IDs in the WeRateDogs Twitter archive, query the Twitter API for each tweet's JSON data using Python's [Tweepy](http://www.tweepy.org/) library and store each tweet's entire set of JSON data in a file called tweet_json.txt file. Each tweet's JSON data should be written to its own line. Then read this .txt file line by line into a pandas DataFrame with (at minimum) tweet ID, retweet count, and favorite count.

### Assessing Data for this Project

After gathering each of the above pieces of data, assess them visually and programmatically for quality and tidiness issues. Detect and document at least **eight (8) quality issues** and **two (2) tidiness issues** in your wrangle_act.ipynb Jupyter Notebook. To meet specifications, the issues that satisfy the below mentioned **Key Points** must be assessed.

### Key Points

Key points to keep in mind when data wrangling for this project:

* You only want original ratings (no retweets) that have images. Though there are 5000+ tweets in the dataset, not all are dog ratings and some are retweets.
* Fully assessing and cleaning the entire dataset requires exceptional effort so only a subset of its issues (eight (8) quality issues and two (2) tidiness issues at minimum) need to be assessed and cleaned.
* Cleaning includes merging individual pieces of data according to the rules of [tidy data](https://cran.r-project.org/web/packages/tidyr/vignettes/tidy-data.html).
* The fact that the rating numerators are greater than the denominators does not need to be cleaned. This [unique rating system](http://knowyourmeme.com/memes/theyre-good-dogs-brent) is a big part of the popularity of WeRateDogs.
* You do *not* need to gather the tweets beyond August 1st, 2017. You can, but note that you won't be able to gather the image predictions for these tweets since you don't have access to the algorithm used.

### Cleaning Data for this Project

Clean each of the issues you documented while assessing. Perform this cleaning in wrangle_act.ipynb as well. The result should be a high quality and tidy master pandas DataFrame (or DataFrames, if appropriate).

### Storing, Analyzing, and Visualizing Data for this Project

Store the clean DataFrame(s) in a CSV file with the main one named twitter_archive_master.csv. If additional files exist because multiple tables are required for tidiness, name these files appropriately. Additionally, you may store the cleaned data in a SQLite database (which is to be submitted as well if you do).

Analyze and visualize your wrangled data in your wrangle_act.ipynb Jupyter Notebook. At least **three (3) insights and one (1) visualization** must be produced.

### Reporting for this Project

Create a **300-600 word written report** called wrangle_report.pdf that briefly describes your wrangling efforts. This is to be framed as an internal document.

Create a **>250 word written report** called act_report.pdf that communicates the insights and displays the visualization(s) produced from your wrangled data. This is to be framed as an external document, like a blog post or magazine article, for example.

url: https://raw.githubusercontent.com/AmrGNegm/Data-Analyst-Nanodegree-Udacity/7a3bc885e0ae54ca6f89772d754b71a8d9b81281/Fourth Project - (Wrangle and Analyze Data)/README.md


text:
# Get database user
Gets the user of the connected Database

__URL:__ `/api/settings/user`
__Method:__ `GET`

## Response

__Content__
```
{
    "user": "dbuser"
}
```

gha_language: Scala


text:
s2t Reloaded
===

![alt tag](https://raw.githubusercontent.com/zitscher/s2t/master/img/inapp_logo.png)

A really qick 'n dirty Javascript Subsonic Client based on local storage.

Current functionality:

- Artist List (display by song, album)
- Manage Playlists (Create/Delete, Add/Delete a song)
- Queue (Add/Remove)
- Search (Artist Name)

![alt tag](https://raw.githubusercontent.com/zitscher/s2t/master/img/screenshots/s2t_screenshot.jpg)