text:
# vue-ratchet

vuejs with ratchet
Ratchet is frontend ui for mobile, just like bootstrap,
and vue-ratchet is build base Ratchet CSS by vuejs, export lots of useful components for mobile.

```
git clone https://github.com/ccjoe/vue-ratchet.git  // download project
cd vue-ratchet                                      // enter dir
npm install                                         // isntall depency
npm start                                           // preview the demo and docs
npm run build                                       // build the demo
```

### Usage by importing UMD modules or import independent vue file

repository: ccjoe/vue-ratchet

repo_name: ccjoe/vue-ratchet


text:
#### Scripts
##### RemoveEmptyEvidence
- Moved from *Remove Empty Evidence*.
- Updated the Docker image to: *demisto/python3:<IP_ADDRESS>928*.
##### redactindicator
- Moved from *Redact/Defang Indicators (URLs, IPs, Email)*.
- Updated the Docker image to: *demisto/python3:<IP_ADDRESS>76*.
##### SSLVerifier
- Moved from *SSL Certificate Verifier*.
- Updated the Docker image to: *demisto/python3:<IP_ADDRESS>76*.
##### StripAccentMarksFromString
- Moved from *Strip Accent Marks From String*.
- Updated the Docker image to: *demisto/python3:<IP_ADDRESS>76*.
##### RetrievePlaybooksAndIntegrations
- Moved from *RetrievePlaybooksAndIntegrations*.
- Updated the Docker image to: *demisto/python3:<IP_ADDRESS>323*.

license: MIT

repository: demisto/content

branch_name: refs/heads/master

extension: md

gha_language: Python

gha_license_id: MIT

license_type: permissive

repo_name: demisto/content


text:
---
layout: media
title: "Uploading"
excerpt: "How to get your DICOMs to us."
categories: database
ads: false
share: false
toc: true
image:
  feature: banner.database.jpg
  teaser: teaser.database.jpg
---

Upload Overview
---------------

+ Use the [upload tool supplied by XNAT](#upload-using-tool), OR upload in your [web browser](#upload-using-web-browser) using the **alternative method**.
+ Go to prearchive, and review.
+ Ensure subject name and session name are correct (and the same).
+ Submit to the archive.
+ If required, create an appropriate resources folder to contain non-DICOM data, and upload that data seperately

Upload Using Tool
-----------------

**Install upload assisstant 1.6.5 for your operating system:**

+ [windows 64 bit](ftp://ftp.nrg.wustl.edu/pub/xnat/UploadAssistant_windows-x64_1_6_5.exe)
+ [windows 32 bit](ftp://ftp.nrg.wustl.edu/pub/xnat/UploadAssistant_windows-x86_1_6_5.exe)
+ [mac osx](ftp://ftp.nrg.wustl.edu/pub/xnat/UploadAssistant_macos_1_6_5.dmg)
+ [debian](ftp://ftp.nrg.wustl.edu/pub/xnat/UploadAssistant_linux_1_6_5.deb)
+ [red hat](ftp://ftp.nrg.wustl.edu/pub/xnat/UploadAssistant_linux_1_6_5.rpm)

The XNAT upload tool will walk you through uploading your dicoms to our XNAT server step-by-step. It does not work with `.zip` archives, and can only work on the folders themselves. So you might need to unzip your archive on your computer before attempting to upload.

The tool will ask for your XNAT login and password, and then for the location of the folder you wish to upload. If you are trying to upload a bunch of difference scans, you can just select the top folder containing all of the data. The tool will figure out the exact structure of your DICOMs.

To ensure you are uploading the correct data, you will need to input the scan date, so make sure you have that on hand. If you annonymized the data by overwriting the scan date, you will need to input the new value you used (e.g., Jan 1st 1900).

This tool will allow you to select scans to include / exclude from your upload. Feel free to uncheck 'extra' files not required by the scanning protocol. For example, FA maps generated by the MRI, 'screen_saves', and other misc files not explicitly defined in the scanning protocol.

Finally, upload the data. It is a good idea to visit the prearchive / the archive to make sure all of your data arrived in the database safely (see below).

Uploading Using Web Browser
---------------------------

To upload your DICOM data to our XNAT server, you first want to put all of the relevant DICOM folders for a single subject's session in a `.zip` file.  Then, from the home page's top bar, select `upload`, then `images`.

From the **upload image sessions** page, we want to select the alternative upload method. We find this works better with a wide variety of systems. The link to the alternative upload system is hidden at the bottom;

On this page, we want to select what project we are uploading the data to, set the destination to prearchive, and select the zip file containing the DICOMs. Please be patient at this stage, as the upload can take some time.

Now, we need to make sure the metadata for the upload is set correctly (particularly the subject and session names). These should be automatically generated correctly from the DICOM headers, but if a mistake is made at the scanner, you can correct it in XNAT. This is done from the prearchive. From the top bar, select `upload`, then `go to prearchive`.

This screen contains all pending scans. The metadata for this upload is visible in the top right hand corner. Any data here is NOT accessible from the main database and will not be analyzed by us. You must make sure this data is reviewed and archived so that it can be properly analyzed, by simply selecting a series and clicking `review and archive`:

Recall that, in our database, the subject and session name must match exactly and should follow our naming convention. You can do that here by either adding a new subject (if need be), adding / editing the session.

You can also edit other metadata such as date of birth, gender, or handedness (if required).

Finally, at the bottom, select `submit`. Your data should now be available in the archive and appear on the main page under 'recent data activity'.

Uploading Non-DICOM Data
------------------------

If collected, extra datatypes (e.g., physiological or behavioural) data collected during the MRI scans need to be uploaded separately. Non-image uploads could also be technologist notes or QC .pdf files. These must be added to a subject's session, which should be done after the DICOM files have been uploaded.

XNAT keeps the data organized under each subject's session in `resources/` and `scans/`. The `scans/` folder holds all of the uploaded DICOM data, and the `resources/` folder contains everything else. Therefore, under resources, you can create folders as nessicary:

+ `resources/logs` -- participant log sheets (.xls, .csv, .pdf, etc.)
+ `resources/behav` -- behavioural data for fMRI experiments.
+ `resources/physio` -- physiological recordings collected during the MRI protocol.

To upload data to one of these folders:

+ From the subject page, click on the session.
+ Click 'Manage Files' on the right hand bar. You should see a list of the DICOM scans under scans/ and a resources/ folder (potentially with some contents).
+ To create a folder: Click `Add Folder`. Set `Level` to `resources` and set a name for `folder`. Click `Create`.
+ To upload data to this folder: Click `Upload Files`, `Level` should be `resources`, and `Folder` should be the desired folder. Click 'Browse' and attach the `.zip` file. Click `Upload`.
+ Click 'extract files to server'.

Uploading using direct DICOM transfer
-------------------------------------

If your MR unit is set up to send data directly from the scanner over the Internet, you may try sending us your data via this method using the following:

+ XNAT Address: da55.pet.utoronto.ca
+ DICOM Port: 8104.
+ Calling & Called Title: XNAT

**If you opt to use this method, please do a test push of your data so we can ensure there are no issues receiving your participant data!**

Upload Rules
------------

+ Ensure your raw DICOM scans for a given participant are in each in their own folder.
+ **Do not** include NIFTI or otherwise converted files in this package.
+ **Do not** include any pre-processed data from the scanner (e.g., motion corrected data, FA maps, etc.) These pollute the database and we can generate better images in post-processing.

gha_language: SCSS


text:
# precipes
Parallel Recipes : massively parallel and distributed workflows made easy

**This precipes version, provided as-is, is a demonstrator version and not production-ready. CWL support is currently in a semi-working state, pending changes to the Rabix CWL implementation.**

Key features:
  - Write down a workflow or pipeline in a simple declarative json script. For each stage you only specify a bash command string, input names and output names.
  - Support for Common Workflow Language (CWL) input, a multi-vendor data analysis workflow specification format.
  - Automatic parallel execution across multiple runs and independent work inside each run.
  - Exploits local parallelism (node-level) as well as distributed parallelism (across nodes).
  - Can be deployed on a variety of setups. Tested so far: workstations, private clusters and Amazon EC2.

Technical:
  - A parallel recipe file is a JSON script describing a simple dependency graph. Internally, this graph is translated to an Intel Concurrent Collections (https://github.com/icnc/icnc) graph. We use CnC to coordinate, parallelize and distribute the computations.
  - Made for and tested on Linux distributions (ubuntu, redhat)
  - Will not work on OSX (Darwin) due to the Intel CnC prerequisite.

Notice:
  - This version is a first demonstrator, showing how CnC can be used as a coordination language. This version includes both a CWL and 'Parallel Recipe' front-end. The Parallel Recipes scripting has preliminary dynamic split/join work subdivision. CWL support is preliminary, but will become the preferred input language in the longer term.
  - Everything not considered essential to the workflow description is kept out of the parallel recipes JSON file. Deployment on clusters and cloud environments is currently manual, viz. the user handles MPI startup or manual command line startup. Several pre-made scripts are provided in the `samples/exome/` directory.

### Prerequisites
  - Intel CnC (https://github.com/icnc/icnc) v0.9+
  - Intel TBB (https://www.threadingbuildingblocks.org/) v4.3+
  - a C++11 compliant compiler: clang 3.4+, gcc-4.7+, icc-14+
  - Boost (http://www.boost.org/) v1.57+
  - GNU Make
For CWL support:
  - Flask (http://flask.pocoo.org/) Python web framework
  - libcurl (http://curl.haxx.se/libcurl/)
  - Rabix (https://github.com/rabix/rabix) CWL implementation, python framework

### Building
  - run 'make'

### Running
#### Parallel Recipes
  - `./precipes samples/hello_world.json world`
  - `./precipes samples/test_pipeline.json foo bar baz`

  See `samples/exome/` for a much more involved example running the best-practices exome pipeline.

#### CWL
  Preflight check:
  - Keep the `python rabix_http.py` Rabix HTTP interface process running on the same machine. This interface requires the flask and Rabix
  - `precipes` currently only accepts preprocessed CWL input workflows, viz. a single flat json file. Use the `cwl_linker.py` script to process the `.cwl` files into the expected `.json` format.
    `python cwl_linker.py revsort.cwl > revsort.json`

  Example:
  - To run in CWL input mode, use the `-c` switch and pass the workflow input arguments to the command line.
    `./precipes -c samples/cwl/revsort.json foo.txt true`
  - Multiples of the expected inputs are considered different parallel batches.
    `./precipes -c samples/cwl/revsort.json text_1.txt true text_2.txt true.`

### Parallel Recipe
*TODO: explain the simple json recipe format*

repository: faical-yannick-congo/precipes

repo_name: faical-yannick-congo/precipes


text:
# Mike O'Malley's COIT20256 Data Structures and Algorithms (2021-T1)

All of my class work will be uploaded here.

This repo will include:
* all additional notes and examples presented during my classes,
* any partial or fully worked tutorial, textbook, etc questions during my classes,
* hints, tips, information ... given in my classes,
* etc.

### Contact info:
* CC: Dr. Jacqueline Jarvis, Brisbane Campus, Contact: +61-07-3023-4238, Email<EMAIL_ADDRESS>* Rocky Tutor: Mike O, email<EMAIL_ADDRESS>
### Golden Rules:
* This is a programming course, the emphasis is on you doing lots of programming, exploring a wide range of problems, writing lots of code to ensure you understand all of the course topics, and keeping up with the work each week.
* The student study requirement for this course is **12 hours per week minimum**: most of this time should be spent writing code to solve problems and explore the course topics.
* If you are struggling or fall behind, you may need to do a more than 12 hours per week.

### Need help:
* Course forums for all tutorial question and course / topic related questions.
* Contact the CC directly if you need help on your assignment:
* NOTE: Mike O is employed by CQUni for 2 hours per week ONLY - for the tutorial class.
* I will answer quick questions via email, but long / involved questions will be answered in class.

### Other useful links:

* Mike O'Malley's Java Videos (many dozes of useful videos for Java programmers of all levels !):

http://tinyurl.com/MikesJavaVideos

* Backups - How To:
How to keep backups and SECURE backups on Windows PCs.

https://www.youtube.com/watch?v=Du7dk3hdG-M

* Github Basics:
Github Basics / How to use GitHub.
A FREE backup of your work in the cloud.
I show you 2 ways to use Github (web browser and command line)
and briefly discuss other ways (Desktop App, Netbeans, Eclipse, develop your own Github Client, etc)

https://www.youtube.com/watch?v=A30iwpDbkwc

* Mike O's Programming Practice Questions - v0.008 (PDF):
Dozens of interesting programming questions for you to practice, explore, solve.

https://www.mediafire.com/file/dpk59wchfu715to/Mike_O%27s_Programming_Practice_Questions_-_v0.008.pdf/file

Mike O'Malley

Email<EMAIL_ADDRESS>

branch_name: refs/heads/main


text:
## Sprint for individual members

### Nik:
* Further research into spring in order to help team with further developments
* Help other group members integrate GUI into existing client
* Polish up on the server work done by other group members

### Rahul:
* Get basic server running for the new Demo
* Switch JPA to a much better Spring JPA
* Work on mockito to make tests for server

### Jan:
* Connect groundwork GUI into client-side
* Work with other group members to finish GUI development
* Improve client-side code to be more compatible with the GUI

### Alin:
* Achieve full branch coverage for previous code
* Begin testing newer Spring developments from the team
* Manage with other group members to make code more concise and hence easier to tdst

### Atanas:
* Fix inconsistencies with GUI
* Implement more screens into the GUI
* Add functionality between and in the UI screens

### Zhao:
* Integrate Spring application into Java fx
* Implement logic behind client
* Complete communication with server-side for the application

### Giovanni:
* Complete database schema and framework for the application
* Integrate the database communication with the server
* Input raw data values for foods/transport/etc. with CO2 and price values

repository: prundeanualin/GoGreen

gha_language: Java

repo_name: prundeanualin/GoGreen


text:
# pkts.io

pkts.io is a pure java library for reading and writing pcaps. It's primary purpose is to manipulate/analyze existing pcaps, allowing you to build various tools around pcaps.

Example, load a pcap from file and print the content of each UDP packet to standard out.

```java
final Pcap pcap = Pcap.openStream("my_traffic.pcap");

pcap.loop(new PacketHandler() {
    @Override
    public void nextPacket(final Packet packet) throws IOException {
        if (packet.hasProtocol(Protocol.UDP)) {
            System.out.println(packet.getPacket(Protocol.UDP).getPayload());
        }
    }
});
```
[View gist](https://gist.github.com/aboutsip/5896046), which also contains comments.

Pkts.io also contains a higher level of abstraction – streams. Quite often you may want to manipulate a stream of related messages and by using the stream support offered by pkts.io, you can do so. What a stream represents depends on the underlying protocol. E.g., for UDP, a stream is all the messages that is sent/received from the same local and remote port-pair. If you deal with SIP, all SIP messages that belongs to the same SIP Dialog are considered to belong to the same stream.

Example, load a pcap from file and consume all SIP Streams.

```java
final Pcap pcap = Pcap.openStream("my_traffic.pcap");

final StreamHandler streamHandler = new DefaultStreamHandler();

streamHandler.addStreamListener(new StreamListener<SipPacket>() {
    @Override
    public void startStream(final Stream<SipPacket> stream, final SipPacket packet) {
        System.out.println("New SIP stream detected. Stream id: " + stream.getStreamIdentifier());
        System.out.println("SipMessage was: " + packet.getInitialLine());
    }

    @Override
    public void packetReceived(final Stream<SipPacket> stream, final SipPacket packet) {
        System.out.println("Received a new SIP message for stream: " + stream.getStreamIdentifier());
        System.out.println("SipMessage was: " + packet.getInitialLine());
    }

    @Override
    public void endStream(final Stream<SipPacket> stream) {
        System.out.println("The stream ended. Stream id: " + stream.getStreamIdentifier());
    }
});

pcap.loop(streamHandler);

```
[View gist](https://gist.github.com/aboutsip/5896237), which also contains comments.

## Consume it

pkts.io is available through Maven Central so just include the following Maven artifact and you are good to go:

      <dependency>
          <groupId>io.pkts</groupId>
          <artifactId>pkts-core</artifactId>
          <version>0.9.8</version>
          <type>jar</type>
      </dependency>

Or if you want to use the stream support, then just include the following:

      <dependency>
          <groupId>io.pkts</groupId>
          <artifactId>pkts-streams</artifactId>
          <version>0.9.8</version>
          <type>jar</type>
      </dependency>

## Documentation

The pkts-examples contains a bunch of different examples showing the various features of the raw frame handling as well as the higher abstraction of streams.

# Contributing
Contributions are more than welcome and highly encouraged. Everything in pkts.io are following the general guidelines of Maven so if you are familiar with Maven you should have no problem getting started.

## Build it

1. Clone it
1. mvn install
1. done

## Import the code into your favorite IDE

Most Java IDE:s are capable of importing Maven based projects, allowing for a smooth integration with the IDE and Maven. Remember, Maven is the source of truth so please do not check in any IDE specific files (such as .project and .classpath for Eclipse).

## Start coding!

So, you have succerssfully loaded all the code so what is the next steps. Well, check out the readme files under each sub-project to get a description of what that module is supposed to do and how to get started with the project. If you want to contribute to any project, please read the section about contribution, specifially, please checkout the section about coding principles and the style guide.

If you have ideas of your own, please file a ticket so when you do submit a pull request, we know what the intent of this feature is, this also gives us a way of communicating about features.

If you just want to get your hands dirty then feel free to check out the open issues. If there is anything you would like to start tackling, just assign the task to yourself and get cranking.

## Code Principles

At aboutsip, we try to follow these general principles and by adhering to these simple guidelines, we feel that our code is readable, easy to follow and is testable (even though we can always do better so please give us constructive feedback):
* Write code so others can read and understand it.
* Write testable code.
* Unit tests everything, but no need to strive for 100%. Try to hit the 85% mark.
* A method should not be longer than a page (if it is, you probably can split it up).
* Javadoc everything! Please describe what each class/interface is supposed to do. If you cannot explain it, then no one else will be able to understand it either. Each method should be documented. Describe what the method is supposed to do. If you end up writing an essay about the method, perhaps it is too complicated?

## Style Guide

Please follow the style already in place. If you are an Eclipse user, follow the guidelines for Eclipse below and please load the formatting template and then you won't even have to think about it, Eclipse will do it for you.

If you are using another IDE then please adhere to these basic rules:

In general, the aboutsip code base is following regular java style convention but here are the more important points (and some differences)
* No tabs – ever
* Indent is 4 spaces
* The line width is 120 characters so please do not cut it off at 80 (we all have screens with high enough resolution these days).
* Use final everywhere! (once again, you can have Eclipse fix this for you).
* Use this everywhere! (Eclipse will fix it for you)

## License

pkts.io and all projects under aboutsip.com are released under the terms of the [MIT license](http://en.wikipedia.org/wiki/MIT_License)

repository: AlBaker/pkts

repo_name: AlBaker/pkts


text:
---
layout: post
title: "Functional programming with JavaScript and Redux"
author: "Robin Ridderholt"
categories: posts
tags: [JavaScript,Functional Programming,Redux]
---

A couple of months ago I joined the team at the company that I work who is build a new product. They are using React, Redux and ASP.NET Core as their technologies.

After I had spent a couple of days writing code in this new project I started to realize that many of the techniques I was using was really functional techniques which I recognized from developing with F# or Haskell. I wondered why I hadn't realized this right away and I guess that I had never thought of JavasScript as being a functional language and sure it's not a pure functional language like Haskell but there is a lot of functions being thrown around when working with JavaScript.

So I thought I would share some of my experiences with React and Redux which in fact is a form of functional programming.

## Redux
If you haven't checked out [Redux](http://redux.js.org/) you should. Basically it's a library that helps you contain the entire state of your SPA app in a single object. The idea is (and I will come back this later on) that you treat the state as an immutable object and each time you want to change some value you create a new copy of the state with that value changed and use that copy as the new state of you application.

This is handle in a specific way in Redux by using [Actions](http://redux.js.org/docs/basics/Actions.html) and [Reducers](http://redux.js.org/docs/basics/Reducers.html). Actions is objects with information about how the state should change, these actions are dispatched and then handled by the reducers. The reducers receives the action and decide how the change the state depending of what type of action it is. Each action has a type property telling the reducer what type of action it should take.

I won't go any deeper into how Redux works but please check it out it will change the way you write JS apps!

## Functional thinking in JS apps
To be able to show some code in this post I wrote a simple Todo app (cliché I know) and it's available on [Github](https://github.com/robinridderholt/ReactTodo).

#### Immutability
The first thing I noticed when working with Redux is that, as I mentioned earlier, the state of the application is treated as an immutable object. So why is this important then? Well, first of all the state isn't truly immutable when working with Redux out of the box, the state is still a regular JavaScript object and you can change values in the state if you want to but it's not recommended. If you keep to the guidelines and only return a new copy of the state in your reducers then at least we can say that we treat the state as immutable.

The advantages is that the behavior of your application becomes much more predictable and it's easier to follow the flow of data trough your application. This is a huge advantage if you consider the fact that there is probably more developers than you who are going to be working on the project.

The Immutability also brings one quite amazing feature, the ability to undo. When the reducer returns a new copy of the state every time some value changes and if you then save the state as it was before the change in a separate place you can very easily implement a undo (and even a redo) feature.

As I mentioned the state isn't really immutable and you have to trust that every developer sticks to the guidelines and doesn't modify state directly. There is a way around this and that is to use [ImmutableJS](https://facebook.github.io/immutable-js/docs/#/) and implement the whole store using this library.

#### Everything is a function
The one thing that defines a functional language is the fact that (almost) everything is a function.

As in F# what looks like a variable declaration is actually a function declaration which simply takes no arguments and always returns the value 1.
```fsharp
let one = 1
```
This is true also in when using Redux. Every action is a function and every reducer is a function.

This is an example from the Todo app which shows the todo reducer:
```javascript
const todo = (state, action) => {
	switch(action.type){
		case 'ADD_TODO':
			return {
				name: action.name,
				id: action.id
			};
		case 'TOGGLE_TODO':
			if(state.id !== action.id){
				return state;
			}

			return Object.assign({}, state, {
				complete: !state.complete
			});
		default:
			return state;
	}
};
```

In Redux there is also a concept called middleware which lets you add cross cutting concern logic such as logging or general error handling and guess what, yes middleware is also functions. You simply register your functions with Redux and stuff just works.

#### Higher Order Functions (HOF)
A HOF is a function that takes a functions as an argument, returns a function or both of the above. This is also used in Redux when you want to fetch data from the server, and because the fetching is asynchronous you can't just dispatch your action function and let the reducer modify your state. You have to make the request and when it's done then you dispatch your action with your data from the server to the reducer which then can modify the state.

To make this easy there is a package you can use called [redux-thunk](https://www.npmjs.com/package/redux-thunk). This package makes it possible to dispatch a function which takes the dispatch function itself as an argument and makes the request and when the request is done it will dispatch the action.

```javascript
export const fetchTodos = () => {
	return (dispatch) => {
		return fetch('/api/todos')
				.then(response => response.json())
				.then(json => dispatch(todosFetched(json)))
	};
};
```
Here I'm declaring the fetchTodos function which returns a new function (making it a HOF) and the execution of this function will be taken care of using react-thunk. I'm also using the [isomorphic-fetch](https://www.npmjs.com/package/isomorphic-fetch) package to make the ajax request.

## Summary
I have shown some examples of how functional thinking has made it's way into JavaScript. What inspired me to write this post was the fact that I was surprised that it took some time for myself to realize that what I was actually doing in JavaScript was actually functional programming.

Because of the popularity of both React and Redux in the JavaScript community perhaps we will also se a increase of functional thinking in the backend as well.

As you can see in some of the examples I have used some es2015 features like the spread operator and the arrow function, this is transpiled using [Babel](https://babeljs.io/). With this syntax being more and more widley used I think that it will help functional thinking on it's way due to the terse syntax.


text:
---
title: "Locus Zoom"
date: 2020-09-18T00:36:39+09:00
draft: false
weight: 2
collapsible: true
enableToc: true
tocLevels:
  - h2
  - h3
  - h4
---

## Description

This is the documentation for the _in-house_ Locus Zoom software, developed by Tanya, Matt, and Riku.

If you only need to generate a few plots, you may want to take a look at [locuszoom.org](http://locuszoom.org/) instead.

## Requirements and prerequisites

### Software

You will need the following software to run this tool:
- Latest version of R
- Locus Zoom code from [GitHub](https://github.com/Geeketics/LocusZooms)
- `bcftools`
- `plink` version 1.90 or later

### Data

You will need the following data to run this tool:
- Summary level data with the following information:
  - Chromosome
  - Position
  - rsID
  - Measure of significance (P or BF)
- 1000 Genomes Project Phase 3 reference data
- UCSC gene region information

Optionally, you may provide the following:
- Output from MAGMA (for colouring the genes based on MAGMA significance)

## Table of Content


text:
# Practical PyTorch: Generating Shakespeare with a Character-Level RNN

## Dataset

Download [this Shakespeare dataset](https://raw.githubusercontent.com/karpathy/char-rnn/master/data/tinyshakespeare/input.txt) (from [Andrej Karpathy's char-rnn](https://github.com/karpathy/char-rnn)) and save as `shakespeare.txt`

## Jupyter Notebook

The [Jupyter Notebook version of the tutorial](https://github.com/spro/practical-pytorch/blob/master/char-rnn-generation/char-rnn-generation.ipynb) describes the model and steps in detail.

## Python scripts

Run `train.py` with a filename to train and save the network:

```
> python train.py shakespeare.txt

Training for 2000 epochs...
(10 minutes later)
Saved as shakespeare.pt
```

After training the model will be saved as `[filename].pt` — now run `generate.py` with that filename to generate some new text:

```
> python generate.py shakespeare.pt --prime_str "Where"

Where, you, and if to our with his drid's
Weasteria nobrand this by then.

AUTENES:
It his zersit at he
```

### Training options

```
Usage: train.py [filename] [options]

Options:
--n_epochs         Number of epochs to train
--print_every      Log learning rate at this interval
--hidden_size      Hidden size of GRU
--n_layers         Number of GRU layers
--learning_rate    Learning rate
--chunk_len        Length of chunks to train on at a time
```

### Generation options
```
Usage: generate.py [filename] [options]

Options:
-p, --prime_str      String to prime generation with
-l, --predict_len    Length of prediction
-t, --temperature    Temperature (higher is more chaotic)
```

gha_language: Jupyter Notebook


text:
# CRT / Vector Display Simulation

Here's a simulation of a CRT / vector display written in ANSI C!

It simulates an electron beam interacting with phosphor to create an image!

_TODO: screenshots and gifs_

## Build instructions

### Dependencies

You just need `SDL2`

### Steps

_TODO_


text:
---
title: "D28-50 Large Open Meat Tray"
date: 2014-03-18T00:00:00Z
draft: false
imagealt: "0-426 TENDERCUTS T-10-50 TRAY"
imageurl: "/img/products/0-426-TENDERCUTS-T-10-50-TRAY.jpg"
3d: "/3d/products/0-426-TENDERCUTS-T-10-50-TRAY.stl"
categories: ["Meat & BBQ","Standards"]
types: ["Tray"]
productinfo:
  internetno: "D601"
  productno: "0-426"
  length: 280
  width: 210
  depth: 50
  shape: "Rectangle"
  polymer: "A-PET"
---
D28-50 Large Open Meat Tray. This tray is suitable for all meat and BBQ cuts and is available to order in both Black and Clear plastic material. The D28-50 Large Open Meat or BBQ Tray has been designed for a heat seal closure but is also suitable for stretch or over wrap closures.

Please note all products are made to order.

repository: horizondm/delyn

gha_language: HTML

repo_name: horizondm/delyn


text:
---
title: Prefetching
extends: _layouts.documentation
section: content
---

Livewire offers the ability to "prefetch" the result of an action on mouseover. Toggling display content is a common use case.

@warning
This is useful for cases when an action DOES NOT (like writing to session or database) perform side effects. If the action you are "pre-fetching" has side-effects, the side-effects will be unpredictably executed.
@endwarning

Add the `prefetch` modifier to an action to enable this behavior:

@code
@verbatim
<button wire:click.prefetch="toggleContent">Show Content</button>

@if ($contentIsVisible)
    Some Content...
@endif
@endverbatim
@endcode

Now, when the mouse enters the "Show Content" button, Livewire will fetch the result of the "toggleContent" action in the background. If the button is actually clicked, it will display the content on the page without sending another network request. If the button is NOT clicked, the prefetched response will be thrown away.

repository: georgeboot/docs

repo_name: georgeboot/docs


text:
---
date: 2019-05-16
year: 2019
title: Elefant på flyvende tæppe
category: Identity
thumbnail: "/uploads/image8.png"
categories:
- Collografi
- " chine collé"
project_bg_color: "#FFFFFF"
project_fg_color: "#4A90E2"

---
**Elephants** are mammals of the [family](https://en.wikipedia.org/wiki/Family_(biology) "Family (biology)") [Elephantidae](https://en.wikipedia.org/wiki/Elephantidae "Elephantidae") and the largest existing land animals

![](/uploads/image8.png)

repository: mvalvik/svendborg

gha_language: Vue

repo_name: mvalvik/svendborg


text:
# Secret Santa

[![Build Status](https://travis-ci.org/SamuraiSigma/secret-santa.svg?branch=master)](https://travis-ci.org/SamuraiSigma/secret-santa)

This project is a Secret Santa organizer. Given a list of participants and their
email addresses, the program randomly chooses everyone's santa. It then sends an
email to each participant, informing who is their secret santa.

## Usage

Coming soon!

repository: SamuraiSigma/secret-santa

repo_name: SamuraiSigma/secret-santa


text:
# Wiesneriomyces laurinus (Tassi) P.M. Kirk, 1984 SPECIES

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Trans. Br. mycol. Soc. 82(4): 748 (1984)

#### Original name
Volutellaria laurina Tassi, 1897

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# ts-react-hooks-redux

PoC of Typescript + React Hooks + redux + react-router

## redux

- [redux-react-hook](https://github.com/facebookincubator/redux-react-hook)
- [redux-aggregate](https://github.com/takefumi-yoshii/redux-aggregate)
- [redux-thunk](https://github.com/reduxjs/redux-thunk)

## Thanks

A lot of code based on [@dkimura](https://github.com/dkimura)'s code.

## License

New BSD License

repository: heavenshell/ts-react-hooks-redux

gha_language: TypeScript

gha_license_id: NOASSERTION

repo_name: heavenshell/ts-react-hooks-redux


text:
# SP-TAPEOUT

**Created At:** 9/18/2018 8:15:28 AM
**Updated At:** 1/24/2019 8:21:32 AM
**Original Doc:** [sp-tapeout](https://docs.jbase.com/44205-spooler/sp-tapeout)
**Original ID:** 339612
**Internal:** No

**Tags:**
<badge text='spooler tape ' vertical='middle' />

## Description

Reads spooled print jobs from a tape device and requeues them to the current formqueue assignment. The command takes the general form:

```
SP-TAPEOUT (n
```

where **n** is the number of print jobs to read and requeue.

### EXAMPLE

Attach the tape device using the [T-ATT](https://https://static.zumasys.com/jbase/r99/knowledgebase/manuals/3.0/30manpages/man/tap2_T_ATT.htm) command and use [T-FWD](./../../../jbase/tape/t-fwd), if required, to position the tape media to the required print job record.

Assign the required formqueue by using the SP-ASSIGN command.

Execute the SP-TAPEOUT command.

```
SP-TAPEOUT (4
```

This command will read the next four print job files and spool them to the currently assigned formqueue.

Back to [Spooler](./../jbase-spooler).

repository: CBarouch/docs

repo_name: CBarouch/docs


text:
# Introduction

In order to work with [Johnny-Five](https://github.com/rwaldron/johnny-five) we need to load [Firmata](http://firmata.org/wiki/Main_Page) on the Arduinos, all the kits should have Firmata preloaded to save some time :)

## Installing Firmata

1. Download [Arduino IDE](http://arduino.cc/en/Main/Software#toc2)
2. Open `Files > Examples > Firmata > StandardFirmata`
3. Click on `Upload` button:

![Firmata](http://i.imgur.com/Sdyfore.png)

4.All good! - Firmata is loaded on the Arduino :)

![Uploaded](http://i.imgur.com/uA3QPl5.png)

## Install Dependencies

You'll need to install all the required dependencies for this workshop, you can do it in a easy way running the following command from the application root directory:

```
$ npm install
```

Thats it!, you are ready to start with some basic Hardware Hacking with Node.js and Arduino!

### [Go to Next Lesson >>](../led/)


text:
All user properties are optional, so the object you pass into `init` could also look as simple as:

```javascript
{appToken: "your_app_token", givenName: "Trogdor"}
```

repository: heatheratsmooch/smooch-docs

branch_name: refs/heads/integration

repo_name: heatheratsmooch/smooch-docs


text:
## 1.0.5

- **fixed** removed accidentally checked in node_modules directory
- **fixed** all the styling issues in the code using the new rules in `.eslintrc`
- **added** linting using eslint. Linting is now part of the contributing process. Can be run using: `grunt eslint`
- **added** new developer docs website. This website is still in beta. You can view it here: http://developers.optimizely.com/nuclear-js/docs/

## 1.0.2

- **deprecated** `reactor.registerStore` will be deprecated in 1.1.x - use `reactor.registerStores` instead.  Add deprecation warning.
- **fixed** properly observe getters when passing `silent=true` for `registerStores` - this option no longer makes sense as it makes future observations unreliable.
- **fixed** support `Utils.isFunction` in all browsers (#57)
- **improvement** in Evaluator dont evaluate getter args twice when there is a stale value

## 1.0.1

- **added** Expose createReactMixin functionality on Nuclear singleton
- **fixed** Fix new Store() from throwing error when not passed a config object

## 1.0.0
- **Huge optimizations for `Reactor.evaluate` and `Reactor.observe`** - These values are now very efficiently memoized by leveraging that fact that getters are pure functions and are transforming immutable data.  This means that complex transformations wont be reevaluated unless its direct dependencies or underlying state change.
- **Built in support for React** - No need for the NuclearReactMixin, simply use `reactor.ReactMixin`
- **breaking** `Reactor.get( ...getters, transformFn )` -> `Reactor.evaluate( getter )`
- **breaking** `Reactor.getJS( ...getters, transformFn )` -> `Reactor.evaluateToJS( getter )`
- **breaking** keypaths must always be arrays, no more support for 'foo.bar' style keypaths
- **breaking** Getters are no longer a constructor, instead they are plain arrays of the form:

repository: jordangarcia/nuclear-js

repo_name: jordangarcia/nuclear-js


text:
# VP Engineering team

This page documents the team that reports to the VP of Engineering.

## Members

- [Nick Snyder](../../company/team/index.md#nick-snyder-he-him), [VP Engineering](../roles.md#vp-engineering)
  - [Bill Creager](../../company/team/index.md#bill-creager), [Director of Engineering](../roles.md#director-of-engineering), Cloud
  - [Jean du Plessis](../../company/team/index.md#jean-du-plessis-he-him), [Director of Engineering](../roles.md#engineering-manager), Enablement
  - [Yink Teo](../../company/team/index.md#bill-creager), [Director of Engineering](../roles.md#director-of-engineering), [Code Graph](../code-graph/index.md)

[Full engineering org chart](../eng_org.md) and [FY2022 detailed hiring plan](https://docs.google.com/spreadsheets/d/1Dpf6aDw1ESJRYroJz6-ZtaACJxwjEu4my_xeYuB3a7E/edit?ts=606e2859#gid=668829118).

repository: zag/about

repo_name: zag/about


text:
### NAME

`NCM::Component::OpenNebula::Commands` Configuration module for ONE

### DESCRIPTION

Configuration module for OpenNebula. Executes the required ssh commands
to enable the hosts to be used by the cloud server.

This component needs a 'oneadmin' user.
The user should be able to run these commands with sudo without password:

- `virsh secret-define --file `/var/lib/one/templates/secret/secret_ceph.xml``
- `virsh secret-set-value --secret $uuid --base64 $secret`

#### Public methods

- set\_ssh\_command

    Sets `$sshcmd`.

- run\_command

    Executes a command and return the output.
    Returns sdout and stderr array.

- run\_virsh\_as\_oneadmin\_with\_ssh

    Executes a command prefixed with `virsh` and returns the output.

- run\_oneuser\_as\_oneadmin\_with\_ssh

    Executes `oneuser` command and returns the output.

- run\_onehost\_as\_oneadmin\_with\_ssh

    Executes `onehost` command to sync hosts VMMs scripts.

- has\_shell\_escapes

    Checks for shell escapes.

- run\_command\_as\_oneadmin

    Executes a command as `oneadmin` user.

- run\_command\_as\_oneadmin\_with\_ssh

    Executes a command as `oneadmin` over ssh, optionally with options.

- ssh\_known\_keys

    Accepts and adds unknown keys if wanted.

- can\_connect\_to\_host

    Checks if the host is reachable or not.

repository: wdpypere/documentation

repo_name: wdpypere/documentation


text:
# Keyboard Maestro Macros I use
One of my favourite applications that I use to significantly ease my time using my mac is [Keyboard Maestro](https://www.keyboardmaestro.com/main/) and I describe how I use it in more detail in [my wiki](https://nikitavoloboev.gitbooks.io/knowledge/content/macOS/apps/km/km.html).

It's a wonderful tool that allows you to create very powerful macros that can range from simply pasting some text, to moving the mouse pointer to some location, to doing various calculations with the input you provide and lot lot more.

All the macros / palettes are attached to this GitHub repository sorted into appropriate folders and I describe some of these macros / palettes below. For others, you can simply clone this repo and see what you like. I will be uploading essentially all the macros I use here.

A lot of these macros were made with great help from the [Keboard Maestro forum community](https://forum.keyboardmaestro.com/latest).

## Global Macros
- Get current url from safari
	- will get the URL of your current tab and put it into your clipboard
	- I reuse this macro quite often in other macros too where I need to do things with the URL (either modify it or pass it somewhere)
- Clone repo to ~/play
	- I wrote about how I use this macro [here](https://medium.com/@NikitaVoloboev/insta-cloning-ff5f38eb1d32)
	- essentially if you are looking at some repo on GitHub, running the macro will clone it to a folder you specify (I use ~/play)
- Open and filter websites in safari (credit to [Christopher Stone](https://github.com/ccstone)).
	- one of my most used macros that when activated will open a website that is specified inside `urlToFetch` field
	- and it will match all current tabs with name specified in `urlFilterText` field
	- this specific macro will open [hckr news](https://hckrnews.com/) and will jump between [news ycombinator open tabs](https://news.ycombinator.com/)
	- I use it heavily throughout the day
	- the example macro I provide is for hacker news
		- you can change it to the website you like

<img src="https://i.imgur.com/fAVRcl8.png" width="500" alt="img">

- open and filter websites in chrome (credit to [Christopher Stone](https://github.com/ccstone)).
	- same principle as above but for chrome
	- example macro opens localhost:3000 but you can change it to what you like

## Safari Macros
- Open current url in chrome
	- will open your current Safari URL in chrome
	- I often use it if I need to use dev tools on the site or if the site has flash content
- Safari main actions
	- one of my most used macros in Safari
	- essentially the trick is that I can set my own site specific hotkeys by using a switch statement on current safari URL content
	- this macro for example, when I have a google page with results open, if run, will select the first result instantly
	- if I am on duckduckgo page, this same macro will select the first duckduckgo result
	- these are just few examples of what you can do
		- essentially you can create your own little actions for any of the websites you visit if you wish (I use ⌃ + e,r,v,b,n,m for site specific hotkeys)

## KM Palettes
I also really love [KM Palettes](https://wiki.keyboardmaestro.com/manual/Palettes) feature and use that a lot. Here are some of the Palettes I have made that you can download and use.

## App Specific Palettes
App Specific palettes can be found and downloaded from [here](/palettes/app). They include :

- Alfred Preferences
- Safari

## Macro Sets for apps
Aside from these specific useful macros I link above as well as the palettes. You can also find entire macro sets for apps that I use [here](/macros/macro-sets). Currently it has sets for :
- Alfred Preferences

repository: Changlin-Liu/my-mac-os

repo_name: Changlin-Liu/my-mac-os


text:
# Apache Griffin Measure Configuration Guide
Apache Griffin measure module needs two configuration files to define the parameters of execution, one is for environment, the other is for dq job.

## Environment Parameters
```
{
  "spark": {
    "log.level": "WARN",
    "checkpoint.dir": "hdfs:///griffin/streaming/cp",
    "batch.interval": "1m",
    "process.interval": "5m",
    "config": {
      "spark.default.parallelism": 5,
      "spark.task.maxFailures": 5,
      "spark.streaming.kafkaMaxRatePerPartition": 1000,
      "spark.streaming.concurrentJobs": 4,
      "spark.yarn.maxAppAttempts": 5,
      "spark.yarn.am.attemptFailuresValidityInterval": "1h",
      "spark.yarn.max.executor.failures": 120,
      "spark.yarn.executor.failuresValidityInterval": "1h",
      "spark.hadoop.fs.hdfs.impl.disable.cache": true
    }
  },

  "sinks": [
    {
      "type": "console",
      "config": {
        "max.log.lines": 100
      }
    }, {
      "type": "hdfs",
      "config": {
        "path": "hdfs:///griffin/streaming/persist",
        "max.lines.per.file": 10000
      }
    }
  ],

  "griffin.checkpoint": [
    {
      "type": "zk",
      "config": {
        "hosts": "<zookeeper host ip>:2181",
        "namespace": "griffin/infocache",
        "lock.path": "lock",
        "mode": "persist",
        "init.clear": true,
        "close.clear": false
      }
    }
  ]
}
```
Above lists environment parameters.

- **spark**: This field configures spark and spark streaming parameters.
	+ log.level: Level of spark log.
	+ checkpoint.dir: Check point directory of spark streaming, for streaming mode.
	+ batch.interval: Interval of dumping streaming data, for streaming mode.
	+ process.interval: Interval of processing dumped streaming data, for streaming mode.
	+ config: Configuration of spark parameters.
- **sinks**: This field configures list of metrics sink parameters, multiple sink ways are supported. Details of sink configuration [here](#sinks).
- **griffin.checkpoint**: This field configures list of griffin checkpoint parameters, multiple cache ways are supported. It is only for streaming dq case. Details of info cache configuration [here](#griffin-checkpoint).

### Sinks
- **type**: Metrics and records sink type, "console", "hdfs", "http", "mongo".
- **config**: Configure parameters of each sink type.
	+ console sink (aliases: "log")
		* max.log.lines: the max lines of log.
	+ hdfs sink
		* path: hdfs path to sink metrics
		* max.persist.lines: the max lines of total sink data.
		* max.lines.per.file: the max lines of each sink file.
	+ http sink (aliases: "es", "elasticsearch")
		* api: api to submit sink metrics.
		* method: http method, "post" default.
    + mongo sink
        * url: url of mongo db.
        * database: database name.
        * collection: collection name.

### Griffin Checkpoint
- **type**: Griffin checkpoint type, "zk" for zookeeper checkpoint.
- **config**: Configure parameters of griffin checkpoint type.
	+ zookeeper checkpoint
		* hosts: zookeeper hosts list as a string, separated by comma.
		* namespace: namespace of cache info, "" as default.
		* lock.path: path of lock info, "lock" as default.
		* mode: create mode of zookeeper node, "persist" as default.
		* init.clear: clear cache info when initialize, true default.
		* close.clear: clear cache info when close connection, false default.

## DQ Job Parameters
```
{
  "name": "accu_batch",

  "process.type": "BATCH",

  "data.sources": [
    {
      "name": "src",
      "connectors": [
        {
          "type": "AVRO",
          "version": "1.7",
          "config": {
          	"file.path": "<path>/<to>",
            "file.name": "<source-file>.avro"
          }
        }
      ]
    }, {
      "name": "tgt",
      "connectors": [
        {
          "type": "AVRO",
          "version": "1.7",
          "config": {
          	"file.path": "<path>/<to>",
            "file.name": "<target-file>.avro"
          }
        }
      ]
    }
  ],

  "evaluate.rule": {
    "rules": [
      {
        "dsl.type": "griffin-dsl",
        "dq.type": "ACCURACY",
        "out.dataframe.name": "accu",
        "rule": "source.user_id = target.user_id AND upper(source.first_name) = upper(target.first_name) AND source.last_name = target.last_name AND source.address = target.address AND source.email = target.email AND source.phone = target.phone AND source.post_code = target.post_code",
        "details": {
          "source": "source",
          "target": "target",
          "miss": "miss_count",
          "total": "total_count",
          "matched": "matched_count"
        },
        "out": [
          {
            "type": "metric",
            "name": "accu"
          },
          {
            "type": "record"
          }
        ]
      }
    ]
  },

  "sinks": ["CONSOLE", "HTTP", "HDFS"]
}
```
Above lists DQ job configure parameters.

- **name**: Name of DQ job.
- **process.type**: Process type of DQ job, "BATCH" or "STREAMING".
- **data.sources**: List of data sources in this DQ job.
	+ name: Name of this data source, it should be different from other data sources.
	+ connectors: List of data connectors combined as the same data source. Details of data connector configuration [here](#data-connector).
- **evaluate.rule**: Evaluate rule parameters of this DQ job.
	+ dsl.type: Default dsl type of all the rules.
	+ rules: List of rules, to define every rule step. Details of rule configuration [here](#rule).
- **sinks**: Whitelisted sink types for this job. Note: no sinks will be used, if empty or omitted.

### Data Connector
- **type**: Data connector type: "AVRO", "HIVE", "TEXT-DIR", "CUSTOM" for batch mode; "KAFKA", "CUSTOM" for streaming mode.
- **version**: Version string of data connector type.
- **config**: Configure parameters of each data connector type.
	+ avro data connector
		* file.path: avro file path, optional, "" as default.
		* file.name: avro file name.
	+ hive data connector
		* database: data base name, optional, "default" as default.
		* table.name: table name.
		* where: where conditions string, split by ",", optional.
			e.g. `dt=20170410 AND hour=15, dt=20170411 AND hour=15, dt=20170412 AND hour=15`
	+ text dir data connector
		* dir.path: parent directory path.
		* data.dir.depth: integer, depth of data directories, 0 as default.
		* success.file: success file name,
		* done.file:
	+ custom connector
	    * class: class name for user-provided data connector implementation. For Batch
	    it should be implementing BatchDataConnector trait and have static method with signature
	    ```def apply(ctx: BatchDataConnectorContext): BatchDataConnector```.
	    For Streaming, it should be implementing StreamingDataConnector and have static method
	    ```def apply(ctx: StreamingDataConnectorContext): StreamingDataConnector```. User-provided
	    data connector should be present in Spark job's class path, by providing custom jar as -jar parameter
	    to spark-submit or by adding to "jars" list in sparkProperties.json.

### Rule
- **dsl.type**: Rule dsl type, "spark-sql", "df-ops" and "griffin-dsl".
- **dq.type**: DQ type of this rule, only for "griffin-dsl" type. Supported types: "ACCURACY", "PROFILING", "TIMELINESS", "UNIQUENESS", "COMPLETENESS".
- **out.dataframe.name** (step information): Output table name of this rule, could be used in the following rules.
- **in.dataframe.name** (step information): Input table name of this rule, only used for "df-ops" type.
- **rule**: The rule string.
- **details**: Details of this rule, optional.
  + accuracy dq type detail configuration
    * source: the data source name which as source in accuracy, default is the name of first data source in "data.sources" if not configured.
    * target: the data source name which as target in accuracy, default is the name of second data source in "data.sources" if not configured.
    * miss: the miss count name in metric, optional.
    * total: the total count name in metric, optional.
    * matched: the matched count name in metric, optional.
  + profiling dq type detail configuration
    * source: the data source name which as source in profiling, default is the name of first data source in "data.sources" if not configured. If the griffin-dsl rule contains from clause, this parameter is ignored.
  + distinctness dq type detail configuration
    * source: name of data source to measure uniqueness.
    * target: name of data source to compare with. It is always the same as source, or more than source.
    * distinct: the unique count name in metric, optional.
    * total: the total count name in metric, optional.
    * dup: the duplicate count name in metric, optional.
    * accu_dup: the accumulate duplicate count name in metric, optional, only in streaming mode and "with.accumulate" enabled.
    * num: the duplicate number name in metric, optional.
    * duplication.array: optional, if set as a non-empty string, the duplication metric will be computed, and the group metric name is this string.
    * with.accumulate: optional, default is true, if set as false, in streaming mode, the data set will not compare with old data to check distinctness.
  + timeliness dq type detail configuration
    * source: name of data source to measure timeliness.
    * latency: the latency column name in metric, optional.
    * threshold: optional, if set as a time string like "1h", the items with latency more than 1 hour will be record.
- **cache**: Cache output dataframe. Optional, valid only for "spark-sql" and "df-ops" mode. Defaults to `false` if not specified.
- **out**: List of output sinks for the job.
  + Metric output.
    * type: "metric"
    * name: Metric name, semantics depends on "flatten" field value.
    * flatten: Aggregation method used before sending data frame result into the sink:
      - default: use "array" if data frame returned multiple records, otherwise use "entries"
      - entries: sends first row of data frame as metric results, like like `{"agg_col": "value"}`
      - array: wraps all metrics into a map, like `{"my_out_name": [{"agg_col": "value"}]}`
      - map: wraps first row of data frame into a map, like `{"my_out_name": {"agg_col": "value"}}`
  + Record output. Currently handled only by HDFS sink.
    * type: "record"
    * name: File name within sink output folder to dump files to.
  + Data source cache update for streaming jobs.
    * type: "dsc-update"
    * name: Data source name to update cache.


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

title: Python as number crunching code glue
event: Boston Python User Group
event_url: https://www.meetup.com/bostonpython/events/29071011/
location: Research Laboratory for Electronics
address:
  street: 50 Vassar Street, Room 34-101
  city: Cambridge
  region: Massachusetts
  postcode: 02139
  country: USA
summary:
abstract: "Python is rapidly gaining traction as a programming language for scientific computation. This evening, we examine how to use NumPy (http://numpy.scipy.org/) and SciPy (http://www.scipy.org/), two of the most widely used Python modules for numerical calculations, and explore their joint capabilities. We will also examine several use cases showing how numpy and scipy can greatly simplify the handling of data in arrays as well as facilitate code reuse by generating wrappers to external Fortran or C code."

# Talk start and end times.
#   End time can optionally be hidden by prefixing the line with `#`.
date: 2011-09-21T19:00:00-04:00
date_end: 2011-09-21T20:00:00-04:00
all_day: false

# Schedule page publish date (NOT talk date).
publishDate: 2019-11-20T21:03:33+08:00

authors: ["Jiahao Chen"]
tags: []

# Is this a featured talk? (true/false)
featured: false

# 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

# Optional filename of your slides within your talk's folder or a URL.
url_slides: https://www.slideshare.net/acidflask/python-as-number-crunching-code-glue

url_code:
url_pdf:
url_video:

# Markdown Slides (optional).
#   Associate this talk 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: ""

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: ["scicomp"]
---

repository: jiahao/academic-kickstart

repo_name: jiahao/academic-kickstart


text:
# Discord Bot for re-streaming Twitch.tv users' streams to YouTube (links generator)

## ⚠ Information ⚠
Probably there will be no maintenance in the future, due to the YouTube's copyright policy.

## Stack
- Node.js without `node-fetch`
  - express framework
- [Mongodb's Atlas Cloud](https://cloud.mongodb.com/) Solution (as universal storage for scheduled events' ids for `SchedulerAPI`)
  - Mongoose (as ORM MongoDB)
- **deprecated** [Scheduler API](https://schedulerapi.com/) (as HTTP webhook service for scheduled tasks like resubscribe or reauthorize)
- [Discord API](https://discord.com/developers) (as UI)
- [Twitch API](https://dev.twitch.tv/) (as service for twitch user's streams' events, authentication & subscriptions)
- [Heroku](https://dashboard.heroku.com/) (to deploy and store env variables (or you can use your deployment, but you need to set env vars on your own as listed below))

## Deploy
- if using `Heroku` then you should install `node.js` and `ffmpeg` buildbpack (for example https://github.com/jonathanong/heroku-buildpack-ffmpeg-latest.git)

## Environment variables (and `globals.js`)
- MODE=dev/production
- HOST_URL=https://path.to.your.deployment.without.closing.slash
- TWITCH_CLIENT_ID=<https://dev.twitch.tv/console>
- TWITCH_CLIENT_SECRET=<https://dev.twitch.tv/console>
- TWITCH_SIGNING_SECRET=<string between 10 and 100 characters that is used for Twitch EventSub API's requests verification>
- DISCORD_WEBHOOK_PATH=/api/webhooks/**webhook or application id**/<webhook_token>
- DISCORD_BOT_TOKEN=<navigate to https://discord.com/developers/applications and choose your application -> Bot>
- DISCORD_APPLICATION_PUBLIC_KEY=<also retrieves on the https://discord.com/developers/applications page>
- DISCORD_BOT_AVATAR_URL=https://link.to.your.custom.bot.avatar/photo.jpeg
- DISCORD_BOT_CHANNEL_ID=<channel_id where bot will write messages by .createMessage>
- SCHEDULER_API_KEY=<https://app.schedulerapi.com/admin>
- MONGODB_URI=**uri to make connect with your mongodb**

*process.env & globals.js store all of the needed variables*

## Available commands:
- **/auth** - to *generate* Twitch `access_token` using `ClientId` & `ClientSecret` and *create scheduled task to reauthorize in `TWITCH_TOKEN_LEASE_SECONDS`* (max available days until token lease ~ 60) https://dev.twitch.tv/docs/authentication#types-of-tokens
- **/auth_youtube** - ... // TODO:
- **/logout** - COMING NOT SO SOON
- **/subscribe <twitch_username>** - to *create* Twitch subscription on user's streams' events and *create scheduled task to resubscribe in `SUBSCRIPTION_LEASE_SECONDS`* (max available 10 days) https://dev.twitch.tv/docs/api/webhooks-reference#subscribe-tounsubscribe-from-events `hub.lease_seconds`
- **/unsubscribe <twitch_username>** - to *unsubscribe* from Twitch user's streams' events and *remove scheduled task to resubscribe*
- **/subscriptions** - to *get* current subscriptions of the user

## To create `DISCORD_WEBHOOK_URL` env param
1.
2. Press `gear` icon -> *Integration* -> *Webhooks* -> *Create new webhook*.
3. Configurate it as you wish.
4.  Create an Application on [Developer Portal](https://discord.com/developers/applications/)
2. Create Bot on Developer Portal
3. Paste this URL into `https://discord.com/oauth2/authorize?client_id=<YOUR_APPLICATION_CLIENT_ID>&scope=applications.commands+bot` web browser's address and add this bot to your channel
4. Create new **slash command** by `POST` request to `https://discord.com/api/v8/applications/<YOUR_APPLICATION_CLIENT_ID>/commands`
with body:
```json
{
    "name": "permissions",
    "description": "Get or edit permissions for a user or a role",
    "options": [
        {
            "name": "user",
            "description": "Get or edit permissions for a user",
            "type": 2
        },
        {
            "name": "role",
            "description": "Get or edit permissions for a role",
            "type": 2
        }
    ]
}
```
and **Authorization header** via `Client credentials` or `Bot credentials`

*For authorization, you can use either your bot token*
```
"Authorization": "Bot 123456"
```
*or a client credentials token for your app with the applications.commmands.update scope*
```
"Authorization": "Bearer abcdefg"
```
5. Handle [receiving interaction](https://discord.com/developers/docs/interactions/slash-commands#receiving-an-interaction) for **Slash commands**:
* 5.1. `In your application in the Developer Portal, there is a field on the main page called "Interactions Endpoint URL". If you want to receive Interactions via outgoing webhook, you can set your URL in this field. In order for the URL to be valid, you must be prepared for two things ahead of time:`

* 5.2. When you attempt to save a URL, `Discord` will send a `POST` request to that URL with a `PING` payload. The `PING` payload has a `type: 1`. So, to properly ACK the payload, return a `200` reponse with a payload of type: 1:`
```js
res.status(200).end({ type: 1 });
```

* 5.3. Full example of `Node.js` code with `express`
```js
app.post('/<YOUR_ENDPOINT_CONFIGURED_ON_DEV_CENTER>', (req, res) => {
  const isValidRequest = utils.isValidRequest(
    req.get('X-Signature-Ed25519'),
    req.get('X-Signature-Timestamp'),
    req.rawBody,
  );
  if (isValidRequest) {
    if (req.body.type === 1) {
      res.status(200).end({ type: 1 });
    } else {
      // TODO
    }
  } else {
    // otherwise need to send 401 status code w/out response text
    res.status(401).end('invalid request signature');
  }
});
```
`isValidRequest` is function which implements logic written [here](https://discord.com/developers/docs/interactions/slash-commands#security-and-authorization)

* 5.4. Handle your own commands in // TODO section
```js
    } else {
      // TODO
    }
```

repository: Kamikozz/discord-bot-twitch-vods-links

gha_language: JavaScript

repo_name: Kamikozz/discord-bot-twitch-vods-links


text:
---
layout: post
title: Mediator.js v0.2
permalink: /2011/09/mediator-js-v0-2/index.html
post_id: 383
categories:
- design patterns
- Development
- Javascript
- Mediator.js
- Source code
---
Source: [Mediator.js](https://github.com/ajacksified/Mediator.js)

Original post: [Mediators for Modularized Asynchronous Programming in
Javascript](/2011/06/mediators-for-modularized-asynchron
ous-programming-in-javascript/index.html)

As I was reading Addy Osmani's excellent post
[Patterns For Large-Scale JavaScript Application
Architecture](http://addyosmani.com/largescalejavascript/),
I came to the realization that I had made some past changes to my own
Mediator.js library, but had failed to both upload the changes to Github _and_
use some of the tricks I've picked up since originally writing the library. So,
version 0.2 is out, with the following changes:

* API changes
* "Subscribe" in place of "Add"
* "Publish" in place of "Call"
* Subscribe now takes a context object, to allow you to pass in what @this@
should be when the callback is called
* Mediator no longer forces you to use it as a singleton
* No longer looks for "type" as part of a data object; rather, uses channels to
sub/pub
* Code a whole lot cleaner; objects to pass around subscriber info rather than
numerically-indexed arrays
* Passes arguments you pass into publish onto subscriber callbacks, rather than
a data object
* Example:

    var m = new Mediator();
    m.Subscribe("test", function(arg1, arg2){ console.log([arg1, arg2]); }
    m.Publish("test", "arg1", "arg2");
    // output > ["arg1", "arg2"]

* Meta changes
* Tests are now "real" tests, using Jasmine
* Updated Readme file to reflect new information
* Added minified js (and under 500 bytes, too)

I think the main difference between this and most available and/or
roll-your-own Mediators is the predicate matching, although that may also be
what makes this more / different than a traditional Mediator. Mediator+? A
meatier mediator? Meatiator.

Anyway,[here's an example on
jsfiddle](http://jsfiddle.net/ajacksified/dCwaK/3/). Try chatting, and using
the same name for the from/to fields.  Shows predicates, subscriptions, and
removing subscriptions.

extension: markdown


text:
# nw.js-examples

[NW.js][nwjs] features demonstrated in a simple project.

![application screenshot][screen]

This project is part of the article [Building a Cross-Platform Desktop App with NW.js][article] on Sitepoint.

## Requirements

- [Node.js][nodejs]

## Installation

1. Clone or [download][download] this repository
2. Navigate to the project folder with a CLI
3. Run the following:

   ```bash
   $ npm install
   $ cd src/
   $ npm install
   $ cd ..
   ```

## Development

To run the application directly in your development environment run:

```bash
$ npm run dev
```

## Production

To build the application for Windows 32/64 bit, Mac OS X 64 bit and Linux 32/64 bit run the following:

```bash
$ npm run prod
```

The output files can be found under `dist/`.

[nwjs]: http://nwjs.io/
[screen]: https://github.com/julmot/nw.js-examples/blob/master/.github/screen.png
[article]: https://www.sitepoint.com/cross-platform-desktop-app-nw-js
[sitepoint]: https://www.sitepoint.com/
[nodejs]: https://nodejs.org/en/
[download]: https://github.com/julmot/nw.js-examples/archive/master.zip


text:
# Discourse: an Open Source Q&A Discussion Board

Discourse is a final project for the class [CSCI 1320: Modern Web & Mobile Applications](http://cs.brown.edu/courses/csci1320/) taught at [Brown University](https://www.brown.edu).

The goal of Discourse is to create an open source Q&A Discussion Board web application comparable to [Piazza](https://piazza.com/), [CampusWire](https://campuswire.com), and [Ed Discussion](https://edstem.org/).

A link to a live instance of Discourse (running on AWS) is available in [our final project presentation](https://docs.google.com/presentation/d/1vJCJEn0jl3eh1qKi5y8XlSV0LUbEeheG6mihqp0f37U/edit#slide=id.gd0a994cd20_4_0).

Technologies used:
- [React](https://reactjs.org) for the frontend via [Create React App](https://create-react-app.dev)
- [Django](https://www.djangoproject.com) for the backend/API
- [PostgreSQL](https://www.postgresql.org) for the database
- [Nginx](https://nginx.org/) for the reverse proxy and as a static web server
- [Docker](https://www.docker.com) for deployment and tying everything else together

## Architecture

There are 4 Docker containers powering this appliction:
- `db`: the PostgreSQL database
- `backend`: the Django API server; depends on `db`
- `frontend`: the static server serving frontend assets
- `nginx`: the reverse proxy to serve frontend and backend requests from the same domain; depends on `frontend` and `backend`

This project is designed to be a one-page application powered by React on the frontend and Django for the backend API server. Thus, frontend and backend are distinct code bases that only communicate with each other through a RESTful API (and possibly websockets in the future).

To prevent [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) related issues, both the frontend and backend are served behind an Nginx reverse proxy from the same domain. URLs with the `/api/` prefix will be routed to the backend container while everything else will be routed to the frontend container.

The frontend container is an Nginx static web server that serves the frontend assets compiled from React. URLs to actual static assets (e.g. images, css, js files) will be routed appropriately. Everything else will be served `index.html` (located in `frontend/build`) so that the React app can handle routing in the frontend.

## Setup/Getting Started

### Dependencies

To run this project, the following dependencies must be installed:
- [Yarn](https://yarnpkg.com/getting-started/install): package manager for frontend
- [Docker](https://docs.docker.com/get-docker/): for running the project's containers
- [Docker Compose](https://docs.docker.com/compose/install/): for setting up the container network
- [Python 3.9+](https://www.python.org/downloads/): for local development

If you are using an AWS instance running Amazon Linux 2, you can follow [this handy guide to install Docker and Docker Compose](https://gist.github.com/npearce/6f3c7826c7499587f00957fee62f8ee9).

### Python Virtual Environment

Setting up a Python virtual environment using `requirements.txt` may be helpful for local development (especially for IDEs), but it is not required to run the application since Docker takes care of that. If you choose to set up a virtual environment, tools like [pyenv](https://github.com/pyenv/pyenv) and [venv](https://docs.python.org/3/library/venv.html) may be helpful.

For local dev purposes, the following packages should be installed:
- django
- pylint
- mypy
- black

### Setting up Environment Variables

**Important**: before anything is run, a `.env` file must be set up in the project root directory. You may make a copy of `.env.example` to make your `.env`; just make sure that you generate a new key and password (`SECRET_KEY` and `DB_PASSWORD`) using some kind of password generator like the following:

```bash
openssl rand -base64 32
```

Keep in mind that these passwords/keys must not have whitespace or any kind of quotes in them.

Additionally, you may want to set `DEBUG` to `True` for local development.

### Building and Running the Project

After the previous steps are completed, use the following command in the root project directory to build and run the project containers:

```bash
make run
```

Once the scripts stop running, the project should be accessible at `http://localhost`.

### Database Setup/Migrations

At this point, the database is not yet set up to work with the Django app. To run the necessary database migrations, run `make backend-shell` and use the following command to run migrations:

```bash
python manage.py migrate
```

If you want some example users, courses, posts, and tags to be created for demo purposes, run the following commands in the `backend-shell`:

```
python manage.py shell     # this enters the django shell, don't include >>> in following commands
>>> from api.demo import setup
>>> setup()                # this will print out demo user passwords in order; save them somewhere!
>>> exit()                 # exit django shell
```

The process above creates three users:
- an instructor with the email<EMAIL_ADDRESS>and the first password returned by `setup()`
- a student with the email<EMAIL_ADDRESS>and the second password returned by `setup()`
- a student with the email<EMAIL_ADDRESS>and the third password returned by `setup()`

Once migrations are done, you can exit the backend shell with the `exit` command.

You will need to run migrations once during setup and every time when models in the Django app are changed. For more information, read the [Django documentation on migrations](https://docs.djangoproject.com/en/3.1/topics/migrations/).

### Closing Notes

That's it! Everything should be all set up.

To stop the project, run the following command in the root project directory:

```bash
make down
```

For more handy `make` commands, take a look at the `Makefile`!

Every time you want to run the project again, just run `make run`.

## Frontend Development

All frontend code and assets are located in the `frontend` directory. The `frontend` directory is essentially a [Create React App](https://create-react-app.dev) project.

You can run the dev server through `yarn start`, but that wouldn't work if you also wanted to call the backend API from the frontend.

To test everything end to end, you can run `make run` in the root project directory to run the backend and frontend containers. To recompile the frontend, run the following command in the root project directory:

```bash
make frontend
```

This will also automatically update the frontend container, so you can refresh the webapp to see new changes.

## Backend Development

All backend code and assets are located in the `backend` directory (in the root directory). The `backend` directory is a Django project.
- `backend/backend`: contains backend project config and files
- `backend/api`: contains all of the logic for the API; all routes to `api/v0/` go here

To run the backend, you can run `make run` in the root project directory. To restart/rebuild the backend after changes, run the following command in the root project directory:

```bash
make backend
```

Note that the command above will restart the backend Docker container, so make sure no sensitive operations are happening when it is run.

If you want to have access to the shell of the backend container to run Django commands (e.g. running `manage.py` commands and migrations), run the following in the root project directory:

```bash
make backend-shell
```

To exit the shell, run `exit`.

## Database Access

To access the PostgreSQL command line client, run `make db-shell` in the root project directory and then run `psql -d app` within the shell. Then you can run standard PostgreSQL commands.

If the value of `DB_NAME` in `.env` is not "app", then the `psql` command from before should use that name instead of "app".

## Resetting Everything

In the event something goes terribly wrong and you want to start from a clean slate again:
- shut down all of the containers through the command `docker-compose down -v` to wipe PostgreSQL data
    - alternatively, you could manually delete the database data stored by Docker by running `docker volume rm <name of project directory>_db_data`
- find the image id for this project's backend container image through `docker images` and then run `docker rmi <backend-image-id>` to delete it

## Individual Contributions

- Raymond
    - wrote README and documentation
    - configured Docker to run project
    - connected frontend and backend of project
    - implemented all Django models
    - implemented all Django views for API except for search
    - implemented most frontend React components and connected them to API
    - implemented all frontend and backend service classes
    - converted styling for frontend to SCSS
- Ambika
    - worked on styling for home page
    - worked on styling for course list page
    - worked on styling for post feed and post view page
    - made home page and post view page mobile friendly
    *Note: I was only able to work on frontend styling as my laptop was unable to handle docker, and I was not anticipating having to use docker for this class. Our mentor TA (Kalli) was made aware of this too.*
- Charles
    - implemented Django search View
    - setup routes for API calls
    - implemented search functionality
    - tested django authentication methods
    - created tests data for demo and testing functionality


text:
# liker-bot
![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54)

Bot to like youtube videos.

>NOTE : this code needs a specific file type called "webdriver". The version of the webdriver you'll use depends of the browser version you want to use.

Libraries used:
- Selenium
- Time

repository: mayrinkdotcom/liker-bot

repo_name: mayrinkdotcom/liker-bot


text:
# Vaadin Flow and Spring Boot with URL mapping

This projects shows how to configure the URL mapping in a Spring boot application.

You have to care about `frontend` resources by yourself at least via the dedicated servlet.

For this purpose, a dedicated servlet is registered.

# Running the application
Run application using `mvn spring-boot:run` or directly running Application class from your IDE.

Open http://localhost:8080/ in browser

For documentation on using Vaadin Flow and Spring, visit [vaadin.com/docs](https://vaadin.com/docs/v10/flow/spring/tutorial-spring-basic.html)

For more information on Vaadin Flow, visit https://vaadin.com/flow.

license: Unlicense

repository: DiegoSanzVi/urlMappingVaadinSpringBoot

repo_name: DiegoSanzVi/urlMappingVaadinSpringBoot


text:
# Simple multi-architecture Docker example C program
A simple C program which prints the host architecture of the running container.

It shows how to use docker buildx to create images for multiple architectures and run them.

## Requirements
To run the example make sure Docker is installed. The example is made for [Docker Desktop](https://www.docker.com/products/docker-desktop) on Windows and Mac, but also works on Linux.

A [Docker Hub](https://hub.docker.com/) accout is also required to save images. Have your Docker ID available.

## Usage instructions
Here are the steps to run the demo:

  1. After cloning, change directory
     - ```cd c-hello-world```
  2. Login to your Docker Hub account
     - ```docker login```
  3. Edit the build.ps1 script to use your Docker ID and run it
     - ```build.ps1```
  4. Edit the inspect.ps1 script to use your Docker ID and run it to see the multi-architecture image
     - ```inspect.ps1```
  5. Edit run.ps1 and uncommend the platform you want to run, the default is arm64
     - ```run.ps1```
     - This will run a container for the uncommented architecture and print it
     - Remove the image when done because docker run will not change architectures already if an image already exists
     - ```docker images```
     - ``` docker rmi <IMAGE ID>```
  6. Edit run.ps1 and select a different architecture and run again
     - ```run.ps1```
     - This will run a container for the uncommented architecture and print it
     - Repeat as needed to change architectures

For more info about Docker on Arm refer to the articles below.

[Getting started with Docker on Arm](https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/getting-started-with-docker-on-arm)

[Getting started with Docker for Arm using buildx on Linux](https://community.arm.com/developer/tools-software/tools/b/tools-software-ides-blog/posts/getting-started-with-docker-for-arm-on-linux)

repository: ARM-software/Tool-Solutions

gha_language: C

repo_name: ARM-software/Tool-Solutions


text:
# My-Rooms
 This plugin adds rooms as devices with custom states

My Rooms Custom Device States....

address   For Indigo Main Page GUI only

<!-- Identifier States -->
roomName
roomState
floor
building

<!-- Occupancy States -->
isOccupied
lastOccupied
lastVacant
occupiedBy1
occupiedBy2
occupiedBy3

<!-- Lighting Device States -->
mainLight
accentLight
luminescence
windowShades

<!-- Climate Device States -->
temperature
humidity
ceilingFan

<!-- Outlets and Plug Device States -->
outlet1
outlet2
outlet3

<!-- Audio Video Device States -->
television
roku
appleTV
domoPad
videoOther1
videoOther2
airplay
alexa
sonos
audioOther1
audioOther2

<!-- Security Device States -->
alertsOn
door1
door2
door3
door4
window1
window2
motionDetected
motionDetectedLast
cctvImage
cctvState
otherSecurity1
otherSecurity2
otherSecurity3

<!-- Auxiliary Device States -->
aux01Name
aux01State
aux02Name
aux02State
aux03Name
aux03State
aux04Name
aux04State
aux05Name
aux05State

repository: whmoorejr/My-Rooms

repo_name: whmoorejr/My-Rooms


text:
# How to decrypt ssl packet using wireshark

## DTLS
1. Right click dtls packet choose Protocol Preference. Then choose RSA Keylist.
![alt text](menu.jpg "Right Click Menu")

2. Press '+' button to add two row for server and client.
    Format is IP Address, Port, Protocol, Key File
    You need add server and client IP for two direction decryption.
    The Key file is server private key.
![alt text](form.jpg "RSA Keylist Form")

3. For capwap-control dtls packet you need /etc/cert/local/Fortinet_Local.key

4. Result.
![alt text](dtls-result.jpg "DTLS Result")

## TLS
1. Change protocol to ssl when config rsa keylist
![alt text](ssl-keylist.jpg "EAP Tls Keylist Form")
2. Private key file is /etc/cert/local/FortiCloud.key
3. Result.
![alt text](ssl-result.jpg "SSL Result")

repository: Doghole/node-capwap

repo_name: Doghole/node-capwap


text:
Worldcoin Daemon Windows
========================
This guide is for compiling Worldcoin daemon and dependencies with Visual Studio (2013 was used) 64 bits

Dependencies
------------

 Library     Purpose           Description
 -------     -------           -----------
 libssl      SSL Support       Secure communications
 libdb4.8    Berkeley DB       Blockchain & wallet storage
 libboost    Boost             C++ Library
 miniupnpc   UPnP Support      Optional firewall-jumping support

Is advised to build all libraries statically

Licenses of statically linked libraries:
 Berkeley DB   New BSD license with additional requirement that linked
               software must be free open source
 Boost         MIT-like license
 miniupnpc     New (3-clause) BSD license

- Versions used in this release:
-  OpenSSL       1.0.1j (DON'T USE 1.0.1k and above until some issues are resolved and tested)
-  Berkeley DB   6.0.30.NC
-  Boost         1.57
-  miniupnpc     1.9

Dependency Build Instructions
-----------------------------

It is strongly recommended to download the exact same versions detailed above.

<Library Dir> Will represent the directory where dependencies will be deployed
<Project Dir> Will represent the main source code directory of the relevant project

 - MiniUPNPC  -- [TAGS] (http://miniupnp.tuxfamily.org/files)
   ---------

	Uncompress miniupnpc-1.9.tar.gz
        Create a file called <Project Dir>/miniupnpcstrings.h  with the contents below. Actual strings don't matter

               #ifndef __MINIUPNPCSTRINGS_H__
               #define __MINIUPNPCSTRINGS_H__

               #define OS_STRING "Windows/7.0.0000"
               #define MINIUPNPC_VERSION_STRING "1.9"
               #endif

	Run VS and open project file : <Project Dir>\msvc\miniupnpc.sln  (if asked say yes to upgrade)
	Configure VS to compile 64 bit  [TAGS]  (https://msdn.microsoft.com/en-us/library/9yb4317s.aspx)
        Change code generation setting to MT
        Build miniupnpc
        Copy  <Project Dir>\msvc\x64\Release\miniupnpc.lib   <Library Dir>\MiniUPNPC\lib
	Copy  <Project Dir>\*.h	  <Library Dir>\MiniUPNPC\include

 - BerkeleyDB  -- [TAGS] (http://www.oracle.com/technetwork/database/database-technologies/berkeleydb/downloads/index-082944.html)
   ----------

	Uncompress db-6.0.30.NC.zip
        Run VS and open project file : <Project Dir>\build_windows\Berkeley_DB.sln  (if asked say yes to upgrade)
	Configure VS to compile 64 bit  [TAGS]  (https://msdn.microsoft.com/en-us/library/9yb4317s.aspx)
	Change code generation setting to MT
	Build solution
        Copy  <Project Dir>\build_windows\x64\Release\libdb60.lib   <Library Dir>\BerkeleyDB\lib64\
        Copy  <Project Dir>\build_windows\db.h   <Library Dir>\BerkeleyDB\include\
        Copy  <Project Dir>\build_windows\db_cxx.h   <Library Dir>\BerkeleyDB\include\

 - Openssl  --  [TAGS] (http://www.npcglib.org/~stathis/blog/precompiled-openssl/)
   -------
	Download from here precompiled version 1.0.1j
	Inside directory <Project Dir>\lib64, copy files  libeay32MT.lib and ssleay32MT.lib  to <Library Dir>\OpenSSL\lib
	Rename these files without the MT suffix
	Copy  <Project Dir>\include\openssl\*.h	  <Library Dir>\OpenSSL\include\openssl

 - Boost  -- [TAGS] (http://sourceforge.net/projects/boost/files/boost/)
   -----
	Unzip boost_1_57_0.zip
        Open the Visual Studio Command Prompt (64 bits )
	Run: bootstrap.bat
        Run: b2 release install toolset=msvc-12.0 --build-type=complete address-model=64 --prefix=<Library Dir>\Boost link=static
        Move folder: <Library Dir>\Boost\include\Boost_1_57\boost  to  <Library Dir>\Boost\include\boost

Build Worldcoin Daemon
----------------------

 - Notes
   -----

   UPnP support is compiled in and
   turned off by default.  Set USE_UPNP to a different value to control this:

	USE_UPNP=     No UPnP support miniupnp not required
	USE_UPNP=0    (the default) UPnP support turned off by default at runtime
	USE_UPNP=1    UPnP support turned on by default at runtime

   IPv6 support may be disabled by setting:

	USE_IPV6=0    Disable IPv6 support

  - Build
    -----

	Set enviroment variable (In conontrol panel) LIBRARIES=<Library Dir>
	Run VS and open project file : <Project Dir>\leveldb\vs2010.sln  (if asked say yes to upgrade)
        Change code generation setting to MT
	Build solution
        Open project file : <Project Dir>\worldcoin.sln  (if asked say yes to upgrade)
        Change code generation setting to MT
        Build solution

    DONE !

Security
--------
To help make your worldcoin installation more secure by making certain attacks impossible to
exploit even if a vulnerability is found, you can take the following measures:

* Position Independent Executable
    Build position independent code to take advantage of Address Space Layout Randomization
    offered by some kernels. An attacker who is able to cause execution of code at an arbitrary
    memory location is thwarted if he doesn't know where anything useful is located.
    The stack and heap are randomly located by default but this allows the code section to be
    randomly located as well.

    On an Amd64 processor where a library was not compiled with -fPIC, this will cause an error
    such as: "relocation R_X86_64_32 against `......' can not be used when making a shared object;"

    To build with PIE, use:
    make -f makefile.unix ... -e PIE=1

    To test that you have built PIE executable, install scanelf, part of paxutils, and use:

    	scanelf -e ./worldcoin

    The output should contain:
     TYPE
    ET_DYN

* Non-executable Stack
    If the stack is executable then trivial stack based buffer overflow exploits are possible if
    vulnerable buffers are found. By default, bitcoin should be built with a non-executable stack
    but if one of the libraries it uses asks for an executable stack or someone makes a mistake
    and uses a compiler extension which requires an executable stack, it will silently build an
    executable without the non-executable stack protection.

    To verify that the stack is non-executable after compiling use:
    `scanelf -e ./worldcoin`

    the output should contain:
	STK/REL/PTL
	RW- R-- RW-

    The STK RW- means that the stack is readable and writeable but not executable.

repository: wuhuaping/WorldcoinDaemon

repo_name: wuhuaping/WorldcoinDaemon


text:
[![Travis CI](https://travis-ci.org/gmethvin/directory-watcher.svg?branch=master)](https://travis-ci.org/gmethvin/directory-watcher) [![Maven](https://img.shields.io/maven-central/v/io.methvin/directory-watcher.svg)](http://mvnrepository.com/artifact/io.methvin/directory-watcher)

# Directory Watcher

A recursive directory watcher utility for JDK 8+, along with a native OS X implementation of the WatchService.

## Getting started

First add the dependency for your preferred build system.

### SBT

```scala
libraryDependencies += "io.methvin" % "directory-watcher" % "0.2.2"
```

### Maven

```xml
<dependency>
    <groupId>io.methvin</groupId>
    <artifactId>directory-watcher</artifactId>
    <version>0.2.2</version>
</dependency>
```

### API

Use `DirectoryWatcher.create` to create a new watcher, then use either `watch()` to block the current thread while watching or `watchAsync()` to watch in another thread. This will automatically detect Mac OS X and provide a native implementation based on the Carbon File System Events API.

### Example

```java
package com.example;

import java.io.IOException;
import java.nio.file.Path;

import io.methvin.watcher.DirectoryChangeListener;
import io.methvin.watcher.DirectoryWatcher;

import static io.methvin.watcher.DirectoryChangeEvent.EventType.*;

public class DirectoryWatchingUtility {

  private final Path pathToWatch;
  private final DirectoryWatcher watcher;

  public DirectoryWatchingUtility(Path directoryToWatch) {
    this.directoryToWatch = directoryToWatch;
    this.watcher = DirectoryWatcher.create(directoryToWatch, event -> {
      switch (event.eventType()) {
        case CREATE: /* file created */; break;
        case MODIFY: /* file modified */; break;
        case DELETE: /* file deleted */; break;
      }
    });
  }

  public void stopWatching() {
    watcher.close();
  }

  public CompletableFuture<Void> watch() {
    // you can also use watcher.watch() to block the current thread
    return watcher.watchAsync();
  }
}
```

## Implementation differences

The Mac OS X implementation returns the full absolute path of the file in its change notifications, so the returned path does not need to be resolved against the `WatchKey`. The `DirectoryWatcher` abstracts away the details of that though.

## Credits

Large parts of this code are taken from https://github.com/takari/directory-watcher/, which is also licensed under the Apache 2 license. The library has been updated to make it more idiomatic Java 8 style and to remove some of the special cases.

repository: setusoft/directory-watcher

repo_name: setusoft/directory-watcher


text:
**No longer being worked on. Please see [nAnts](https://github.com/jladan/nAnts/) for the newer typescript-based version**

# Introduction

nAnjs was meant to be a library providing the tools for numerical analysis in the browser 100% clientside. I decided to convert the library to typescript, and provide separately compiled javascript libraries. Please see [nAnts](https://github.com/jladan/nAnts/) for the newer typescript-based version.

The primary goal is to perform accurate and efficient mathematical simulations in the browser, without requiring any additional libraries. This is not a large-scale numerical analysis library, so don't expect to use it for large, high-dimensional problems.

# Features

Performance is attained by using flat arrays for all multidimensional matrix manipulation. Algorithms are chosen by accuracy/stability first, then speed. Often, multiple algorithms will be offered for the same task.

The various tools are split into modules based on problem type

## nAn\_ODE\_module
Numerical solvers for ODE's of the form *x*'(t)=*F*(*x*,t). Methods available include

* Improved Forward Euler (aka. Heun's Method or 2-step Runge-Kutta).
* Adams-Bashford (2-step).
* Leap-frog (central difference time-stepping).

## nAn\_stochastics\_module
Numerical solvers for Stochastic differential equations of the form d*x*(t)=*A*(*X*,t)dt + B(*X*,t) n(t)dt. Where n(t) is some kind of noise. Methods available include

* Euler-Maruyama (Gaussian white noise)
* Milstein (Gaussian white noise)
* Heun's method with coloured noise (generated via an Ornstein-Uhlenbeck process)

This module also includes a Gaussian random number generator.

## nAn\_algebra\_module
A module for real-valued matrix algebra.

repository: jladan/nAnjs

repo_name: jladan/nAnjs


text:
---
title: Capture/Test Describtion
created: '2020-09-14T14:14:56.931Z'
modified: '2020-09-14T14:21:46.215Z'
---

# Capture/Test Describtion
### 14/9-2020

The publisher has a 500 ms delay after each of its writes

#### pubFirst1min
The publisher is turned on first and then the subscriber is. They both run for about a minute and then the publisher is turned off and then the subscriber is.

#### pubOnly1min
The publisher is turned on for about a minute and then turned off.

#### subOnly1min
The subscriber is turned on for about a minute and the turned off.

#### Pub_StopSub1min
The publisher is turned on first and then the subscriber is. The subscriber is turned off a few seconds after being turned on and then the publisher runs for about a minute without the subscriber.

repository: krinii/dds-on-hardware

path: /Notable/notes/Test Describtion.md

filename: Test Describtion.md

repo_name: krinii/dds-on-hardware


text:
# Differential-Evolution
Simple console implementation of the Differential Evolution (DE) algorithm as described in: *Storn, R.,  Price, K.: "Differential Evolution – A Simple and Efficient Heuristic for global Optimization over Continuous Spaces", Journal of Global Optimization (1997)*

More info: https://en.wikipedia.org/wiki/Differential_evolution

It is written in **C# (build with .NET Core 2.0)**

# Running

By default it tries to solve `RASTRIGIN FUNCTION` for only 2 dimensions but of course you can increase dimensions or add more functions in `TestFunction.cs`

# Parameters
Default parameters (file `Parameters.cs`):
* Amplification Factor (F) - 0.5
* Crossover Probability (CR) - 0.9
* Agents Count - 20
* Iterations - 100 (highly depends on problem and number of dimensions)

# License

MIT License

Copyright (c) 2018 mbalchanowski

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

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

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

repository: rafalfigura/Differential-Evolution

repo_name: rafalfigura/Differential-Evolution


text:
NOTE: This bundle is not maintained anymore.
============================================

AliDatatableBundle
==================

[![Build Status](https://secure.travis-ci.org/AliHichem/AliDatatableBundle.png?branch=master)](http://travis-ci.org/AliHichem/AliDatatableBundle)

[![GitHub issues](https://img.shields.io/github/issues/AliHichem/AliDatatableBundle.svg)](https://github.com/AliHichem/AliDatatableBundle/issues)
[![GitHub forks](https://img.shields.io/github/forks/AliHichem/AliDatatableBundle.svg)](https://github.com/AliHichem/AliDatatableBundle/network)
[![GitHub stars](https://img.shields.io/github/stars/AliHichem/AliDatatableBundle.svg)](https://github.com/AliHichem/AliDatatableBundle/stargazers)
[![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/AliHichem/AliDatatableBundle/master/LICENSE)

The Datatable bundle for symfony2 allow for easily integration of the [jQuery Datatable plugin](http://datatables.net/) with the doctrine2 entities having twitter bootstrap theme.
This bundle provides a way to make a projection of a doctrine2 entity to a powerful jquery datagrid. It mainly includes:

 * datatable service container: to manage the datatable as a service.
 * twig extension: for view integration.
 * dynamic pager handler : no need to set your pager.
 * default action link builder: if activated, the bundle generates default edit/delete links.
 * support doctrine2 association.
 * support of doctrine query builder.
 * support of column search.
 * support of custom twig/phpClosure renderers.
 * support of custom grouped actions.
 * datatable configuration javascript code (even for multiple datatables) is grouped, minimized and moved to the bottom of the html body element automatically.
 * twitter bootstrap integration.

[Read the Documentation](https://github.com/AliHichem/AliDatatableBundle/blob/master/Resources/doc/index.md)

repository: AliHichem/AliDatatableBundle

gha_language: PHP

repo_name: AliHichem/AliDatatableBundle


text:
[dsl](../index.md) / [studio.forface.easygradle.internal](index.md) / [lateinit](./lateinit.md)

# lateinit

`fun lateinit(): `[`ReadWriteProperty`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.properties/-read-write-property/index.html)`<`[`Any`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-any/index.html)`?, `[`String`](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html)`>`

This works as a lateinit but show a more detailed exception if the property has not been set.
It's type is [String](https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-string/index.html) and will be used for versions for accessors

**Author**
Davide Farella

repository: ClintonKildepstein/EasyGradle

repo_name: ClintonKildepstein/EasyGradle


text:
# ember-tree-utils

This README outlines the details of collaborating on this Ember addon.

## Installation

* `git clone <repository-url>` this repository
* `cd ember-tree-utils`
* `npm install`

## Running

* `ember serve`
* Visit your app at [http://localhost:4200](http://localhost:4200).

## Running Tests

* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)
* `ember test`
* `ember test --server`

## Building

* `ember build`

[Longer description of how to use the addon in apps.]

Contributing
------------------------------------------------------------------------------

See the [Contributing](CONTRIBUTING.md) guide for details.

License
------------------------------------------------------------------------------

This project is licensed under the [MIT License](LICENSE.md).

repository: systembugtj/picasa-electron

repo_name: systembugtj/picasa-electron