text:
# MIDI2.0 C++
A MIDI 2.0 Library for Embedded/Arduino Devices

## IMPORTANT! Please read first
THIS LIBRARY IS UNDER DEVELOPMENT - Code here today, is likely gone tomorrow!

I AM NOT A PROFESIONAL C++ DEVELOPER. If you see code here that :
* could be styled/structured better
* could be written better
* could use less resources
* has memory leaks, bugs,
* is fundamentally flawed
* has spelling mistakes and gramtical errors

Then please submit PR's and/or issues - but PR's preferred.

Given this - please use this library at your own risk! Long term I hope that this library will be improved enough so it can be useful to others.

## What does this do?
Please read the MIDI 2.0 specification on https://midi.org/specifications to understand the following.

This library can:
* Convert MIDI 1.0 Byte stream to UMP
* Process and send UMP Streams
* Process and Send MIDI-CI Messages
* Build UMP 32 bit Words to send

This library is designed to use a small footprint. This means it is upto the appliction to:
 * Store Remote MIDI-CI Device details
 * Upon receiving MIDI-CI Message to interpret the Messages data structure (e.g. Profile Id bytes, Note On Articulation etc.)
 * Handle logic and NAK sending and receiving.
 * Large data is handled in small chunks to keep memory small.

This means the overheads for a simple MIDI 2.0 device is down to a compiled size of around 10k (possibly less?), with a memory footprint of around 1k.

### TODO
* Protocol Negotiation
* PE Get Reply handling
* PE Set Methods
* PE Handling of Mcoded7
* Profile Specific Data Message
* Send Invalid MUID
* Sending JR Timestamp/Clock
* Handling of Per Note Controllers
* Universal SysEx handling (Other than Device ID and MIDI-CI)

### Example Convert MIDI 1.0 Byte stream to UMP

Here is a quick Arduino example

```C++
#include "midi2.h"

midiBsToUMP BS2UMP;

void setup()
{
  Serial.begin(31250);

  //Produce MIDI 2.0 Channel Voice Message (Message Type 0x4)
  //Default (false) will return MIDI 1.0 Channel Voice Messages (Message Type 0x2)
  BS2UMP.outputMIDI2 = true;

  //Set the UMP group of the output UMP message. By default this is set to Group 1
  //defaultGroup value is 0 based
  BS2UMP.defaultGroup = 0; //Group 1
}

void loop()
{
  uint8_t inByte = 0;
  // if there is a serial MIDI byte:
  if (Serial.available() > 0) {
    // get incoming byte:
    inByte = Serial.read();
    if(inByte == 0xFE) return; //Skip ActiveSense

    BS2UMP.midi1BytestreamParse(inByte);
    while(BS2UMP.availableUMP()){
      uint32_t ump = BS2UMP.readUMP();
      //ump contains a ump 32 bit value. UMP messages that have 64bit will produce 2 UMP words
    }
  }
}
```

### Example Process UMP Streams
UMP Streams accepts a series of 32 bit values. UMP messages that have 64bit will provide 2 UMP words.

```C++

#include "midi2.h"
midi2Processor MIDI2 (0,2);

void noteOff(uint8_t group, uint8_t channel, uint8_t noteNumber, unsigned int velocity, int attributeType, unsigned int attributeData){
//Process incoming MIDI note Off event.
}

void noteOn(uint8_t group, uint8_t channel, uint8_t noteNumber, unsigned int velocity, int attributeType, unsigned int attributeData){
}

void cc(uint8_t group, uint8_t channel, uint8_t index, uint32_t value){
}

void rpn(uint8_t group, uint8_t channel, uint8_t bank,  uint8_t index, uint32_t value){
}

void setup()
{
  MIDI2.setNoteOff(noteOff);
  MIDI2.setNoteOn(noteOn);
  MIDI2.setControlChange(cc);
  MIDI2.setRPN(rpn);
}

void loop()
{
...
  while(BS2UMP.availableUMP()){
      uint32_t ump = BS2UMP.readUMP();
      MIDI2.processUMP(ump);
  }
...
}

```

### Example Process MIDI-CI Messages
UMP Streams accepts a series of 32 bit values. UMP messages that have 64bit will provide 2 UMP words.

```C++
#define M2_ENABLE_PROFILE

#include "midi2.h"
midi2Processor MIDI2 (0,2);

void rawSysex(uint8_t group, uint8_t *sysex ,int length, uint8_t state){
  //Generated SysEX Message from MIDI-CI or other Messages are sent to this function.
  //Write SysEx Message to Serial output

  //Start SysEx out
  if (state < 2)Serial.write((char)SYSEX_START);

  for(int i=0; i < length; i++){
    Serial.write((char)(sysex[i] & 0x7F));
  }

  //End SysEx
  if (state == 0 || state==3) Serial.write((char)SYSEX_STOP);
}

void discovery(uint8_t group, uint32_t remoteMuid, uint8_t ciVer, uint8_t* manuId, uint8_t* famId, uint8_t* modelId, uint8_t *verId, uint8_t ciSupport, int maxSysex){
}

void nak(uint8_t group, uint32_t remoteMuid){
}

void invalidMUID(uint8_t group, uint32_t remoteMuid, uint32_t terminateMuid){
  MIDI2.groupBlockMUID = random(0xFFFFEFF);
  MIDI2.sendDiscoveryRequest(0,1);
}

void profileInquiry(uint8_t group, uint32_t remoteMUID, uint8_t destination){
  uint8_t profileNone[0] = {};

  //return a Profile on Channel 1
  if(destination == 0 || destination == 0x7F){
    uint8_t profileDrawBar[5] = {0x7E, 0x40, 0x01, 0x01};
    MIDI2.sendProfileListResponse(group, remoteMUID, 1, 0, 1, profileDrawBar, 0, profileNone);
  }

  if(destination == 0x7F){
    MIDI2.sendProfileListResponse(group, remoteMUID, 1, 0x7F, 0, profileNone, 0, profileNone);
  }
}

void setup()
{
  randomSeed(analogRead(8));
  Serial.begin(31250);
  MIDI2.groupBlockMUID = random(0xFFFFEFF);
  MIDI2.devId[0]=0x7E; // Research SysEx ID

  MIDI2.modelId[0]=0x7F;
  MIDI2.modelId[1]=0x20;

  MIDI2.setRecvDiscovery(discovery);
  MIDI2.setRecvNAK(nak);
  MIDI2.setRecvInvalidateMUID(invalidMUID);

  MIDI2.setRecvProfileInquiry(profileInquiry);

  MIDI2.sendDiscoveryRequest(0,1);
}

void loop()
{
...
  while(BS2UMP.availableUMP()){
      uint32_t ump = BS2UMP.readUMP();
      MIDI2.processUMP(ump);
  }
...
}

```

---
## midiBsToUMP
Class used for translating between a raw MIDI 1.0 Byte stream and UMP

### Common methods
#### void midi1BytestreamParse(uint8_t midi1Byte)
Process incoming MIDI 1.0 Byte stream

#### bool availableUMP()
Check if there are available UMP packets after processing the Byte Stream

#### uint32_t readUMP()
Return a 32Bit word for a UMP Packet. A Bystream conversion may create several UMP packets.

---
## midi2Processor
Processing of MIDI 1.0 and 2.0 Channel voice messages use the same processing function.
#### midi2Processor(uint8_t groupStart, uint8_t totalGroups)
#### midi2Processor(uint8_t groupStart, uint8_t totalGroups, uint8_t numPERequests) - When M2_ENABLE_PROFILE is defined
Initialize the with the Group number to start with and the amount of UMP groups to work with. numPERequests represents the amount simultaneous PE streams that can be handled

### public variables
#### uint32_t groupBlockMUID = 0;
#### uint8_t devId[3];
#### uint8_t famId[2];
#### uint8_t modelId[2];
#### uint8_t ver[4];
#### uint16_t sysExMax = 512;

### Common Methods
#### void processUMP(uint32_t UMP)
Process incoming UMP messages broken up into 32bit words

### Common Handlers
#### inline void setNoteOff(void (\*fptr)(uint8_t group, uint8_t channel, uint8_t noteNumber, uint16_t velocity, uint8_t attributeType, uint16_t attributeData))
Set the callable funtion when a Note Off is processed by processUMP

#### inline void setMidiNoteOn(void (\*fptr)(uint8_t group, uint8_t channel, uint8_t noteNumber, uint16_t velocity, uint8_t attributeType, uint16_t attributeData))
#### inline void setControlChange(void (\*fptr)(uint8_t group, uint8_t channel, uint8_t index, uint32_t value))
#### inline void setRPN(void (\*fptr)(uint8_t group, uint8_t channel,uint8_t bank,  uint8_t index, uint32_t value))
#### inline void setPolyPressure(void (\*fptr)(uint8_t group, uint8_t channel, uint8_t noteNumber, uint32_t pressure))
#### inline void setChannelPressure(void (\*fptr)(uint8_t group, uint8_t channel, uint32_t pressure))
#### inline void setPitchBend(void (\*fptr)(uint8_t group, uint8_t channel, uint32_t value))
#### inline void setProgramChange(void (\*fptr)(uint8_t group, uint8_t channel, uint8_t program, bool bankValid, uint8_t bank, uint8_t index))
#### inline void setTimingCode(void (\*fptr)(uint8_t group,uint8_t timeCode)){
#### inline void setSongSelect(void (\*fptr)(uint8_t group,uint8_t song))
#### inline void setSongPositionPointer(void (*\fptr)(uint8_t group,uint16_t positio))
#### inline void setTuneRequest(void (\*fptr)(uint8_t group))
#### inline void setTimingClock(void (\*fptr)(uint8_t group))
#### inline void setSeqStart(void (\*fptr)(uint8_t group))
#### inline void setSeqCont(void (\*fptr)(uint8_t group))
#### inline void setSeqStop(void (\*fptr)(uint8_t group))
#### inline void setActiveSense(void (\*fptr)(uint8_t group))
#### inline void setSystemReset(void (\*fptr)(uint8_t group))

### Common SysEx Handlers
#### inline void setRawSysEx(void (\*fptr)(uint8_t group, uint8_t\* sysex ,uint16_t length, uint8_t state))
Any SysEx generated from either MIDI-CI resposes or from direct Method calls are sent here
Message are often chunked. as such the ```state``` argument contains information if this is a whole SysEx message or partial.
Leading 0xF0 and 0xF7 are never sent.

 * **0** - Complete SysEx message
 * **1** - Start of a SysEx message
 * **2** - Continue a SysEx message
 * **3** - Last part of a SysEx message

#### inline void setRecvDiscoveryRequest(void (\*fptr)(uint8_t group, uint32_t remoteMuid, uint8_t ciVer, uint8_t\* manuId, uint8_t\* famId, uint8_t\* modelId, uint8_t\* verId, uint8_t ciSupport, uint16_t maxSysex))
Process Incoming Discovery Request Device details or Reply to Discovery Device details. When the class recieves a Discovery Message it will automatically reply with a Reply to Discovery Message. This is sent to the function set by ```setRawSysEx```.

After triggering off a ```sendDiscoveryRequest``` replies will be sent here.

#### inline void setRecvNAK(void (\*fptr)(uint8_t group, uint32_t remoteMuid))
#### inline void setRecvInvalidateMUID(void (\*fptr)(uint8_t group, uint32_t remoteMuid, uint32_t terminateMuid))

## Common SysEx Methods
### void sendDiscoveryRequest(uint8_t group, uint8_t ciVer)
### void sendNAK(uint8_t group, uint32_t remoteMuid, uint8_t ciVer)

---
## midi2Processor M2_ENABLE_IDREQ Methods
These are available if ```#define M2_ENABLE_IDREQ``` is set.
If a Device ID Request is received the class will automatically send a reply based on the DeviceId, Model, Famil and Version information provided.

### void sendIdentityRequest (uint8_t group)
Send out a Universal SysEx Device ID Request

### inline void setHandleIdResponse(void (\*fptr)(uint8_t\* devId, uint8_t\* famId, uint8_t\* modelId, uint8_t\* ver))
Set handler for recieving Universal SysEx Device ID Reply.

---
## midi2Processor M2_ENABLE_PROFILE Methods
This enable processing of MIDI-CI Profiles. These methods are available if ```#define M2_ENABLE_PROFILE``` is set.

### void sendProfileListRequest(uint8_t group, uint32_t remoteMuid, uint8_t ciVer, uint8_t destination)
Send a Request to get list of Profiles. use a destination of 0x7F to get all Profiles across all channels.
Enabled and Disabled Profiles are sent to the ```setRecvProfileEnabled``` and ```setRecvProfileDisabled``` respectively.

### void sendProfileListResponse(uint8_t group, uint32_t remoteMuid, uint8_t ciVer, uint8_t destination, uint8_t profilesEnabledLen, uint8_t\* profilesEnabled, uint8_t profilesDisabledLen , uint8_t\* profilesDisabled)
Send a Profile List Response Message.

```profilesEnabledLen``` and ```profilesDisabledLen``` represent how many Profiles. ```profilesEnabled``` and ```profilesDisabled``` arguments should be 5 times the length of ```profilesEnabledLen``` and ```profilesDisabledLen``` respectively.

### void sendProfileOn(uint8_t group, uint32_t remoteMuid, uint8_t ciVer, uint8_t destination, uint8_t\* profile)
```profile``` is alway 5 bytes.

### void sendProfileOff(uint8_t group, uint32_t remoteMuid, uint8_t ciVer, uint8_t destination, uint8_t\* profile)
### void sendProfileEnabled(uint8_t group, uint32_t remoteMuid, uint8_t ciVer, uint8_t destination, uint8_t\* profile)
### void sendProfileDisabled(uint8_t group, uint32_t remoteMuid, uint8_t ciVer, uint8_t destination, uint8_t\* profile)

### inline void setRecvProfileInquiry(void (\*fptr)(uint8_t group, uint32_t remoteMuid, uint8_t destination))
```sendProfileListResponse``` should be used in Response to this Message.

### inline void setRecvProfileEnabled(void (\*fptr)(uint8_t group, uint32_t remoteMuid, uint8_t destination, uint8_t\* profile))
### inline void setRecvProfileDisabled(void (\*fptr)(uint8_t group, uint32_t remoteMuid, uint8_t destination, uint8_t\* profile))
### inline void setRecvProfileOn(void (\*fptr)(uint8_t group, uint32_t remoteMuid, uint8_t destination, uint8_t\* profile))
### inline void setRecvProfileOff(void (\*fptr)(uint8_t group, uint32_t remoteMuid, uint8_t destination, uint8_t\* profile))

---
## midi2Processor M2_ENABLE_PE Methods
This enable processing of MIDI-CI Property Exchange. These methods are available if ```#define M2_ENABLE_PE``` is set.

Property Exchange requires a bit more memory than other parts of MIDI-CI. Enabling this will increase memory requirements.

### void sendPECapabilityRequest(uint8_t group, uint32_t remoteMuid, uint8_t ciVer, uint8_t numRequests)
### void sendPEGet(uint8_t group, uint32_t remoteMuid, uint8_t ciVer, uint8_t requestId, uint16_t headerLen, uint8_t* header)
### void sendPEGetReply(uint8_t group, uint32_t remoteMuid, uint8_t ciVer, uint8_t requestId, uint16_t headerLen, uint8_t\* header, int numberOfChunks, int numberOfThisChunk, uint16_t bodyLength , uint8_t\* body)

### inline void setPECapabilities(void (\*fptr)(uint8_t group, uint32_t remoteMuid, uint8_t numRequests))
### inline void setRecvPEGetInquiry(void (\*fptr)(uint8_t group, uint32_t remoteMuid,  peHeader requestDetails))
### inline void setRecvPESetInquiry(void (\*fptr)(uint8_t group, uint32_t remoteMuid,  peHeader requestDetails, uint8_t bodyLen, uint8_t\*  body))

---
## midi2Processor M2_ENABLE_JR
Enable Processing of JR Timestamps. These methods are available if ```#M2_ENABLE_JR M2_ENABLE_PE``` is set.

### inline void setJrClock(void (\*fptr)(uint8_t group,uint16_t timing))


text:
# Raster Data
## Image Data
An image is a digital picture or representation of an object. Image data consist only of numbers. Each number in an image file is a data file value. Data file values are sometimes referred to as pixels. The data file value is the measured brightness value of the pixel at a specific wavelength.

Raster image data are laid out in a grid similar to the squarges on a checkerboard. Each cell of the grid is represented by a pixel, also known as a grid cell.

In remotely sensed image data, each pixel represents an area of the Earth at a specific location. The data file value assigned to that pixel is the record of reflected radiation or emitted heat from the Earth’s surface at that location.

### Bands
Each band is a set of data file values for a specific portion of the electromagnetic spectrum of reflected light or emitted heat (red, green, blue, near-infrared, infrared, thermal, and so forth) or some other user-defined information created by combining or enhancing the original bands, or creating new bands from other sources.

#### Numeral Types
The range and the type of numbers used in a raster layer determine how the layer is displayed and processed. For example, a layer of elevation data with values ranging from -51.257 to 553.401 would be treated differently from a layer using only two values to show land and water.

### Coordinate Systems
The location of a pixel in a file or on a displayed or printed image is expressed using a coordinate system. There are two basic coordinate systems:

#### File Coordinates
File coordinates refer to the location of the pixels within the image (data) file. File coordinates for the pixel in the upper left corner of the image always begin at 0, 0.

#### Map Coordinates
Map coordinates may be expressed in one of a number of map coordinate or projection systems. The type of map coordinates used by a data file depends on the method used to create the file (remote sensing, scanning an existing map, and so forth).

## Remote Sensing

license: MIT

repository: aimanyongki/remotesensing

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: aimanyongki/remotesensing


text:
# CSC305

_Intro to Computer Graphics_ | Spring 2019 | [Course outline](https://drive.google.com/file/d/1pttB_XiK4yHNMvswD0w7B3aPpovR2UpF/view?usp=sharing) | University of Victoria

### Course summary:

Principles of raster image generation. Example of a graphics API. Graphics primitives, data structures. Coordinate systems, affine transformations and viewing of graphical objects. Introduction to rendering including shading models and ray tracing. Introduction to modelling including polygon meshes, subdivision, and parametric curves and surfaces, colour.

### Grade:

A+ 94%


text:
# Alliance of Genome Resources Pre-processing
Take source DQM/ferret files from FMS to generate and upload new files to FMS for the agr_loader to run on.

## Running Pre-processing
- command line run with :
  - python3 src/aggregate_preprocessor.py

- docker run with :
  - docker build -t preprocess . && docker run -e ALLIANCE_RELEASE=3.1.0 -e FMS_API_URL=https://fmsdev.alliancegenome.org -e API_KEY=<key> --entrypoint /usr/bin/python3 preprocess src/aggregate_preprocessor.py

## Editing variables
- Set alliance release version and api url by passing environment variables to docker, or edit src/default_env_vars.yml if running from command line for src/data_manager/data_file_manager.py  to get latest files for each datatype + dataSubType in the config src/config/default.yml
  - FMS_API_URL: "https://fmsdev.alliancegenome.org"
  - ALLIANCE_RELEASE: "3.1.0"

## Caveats
- Cannot use the release snapshot, because this generates files and uploads to FMS, which need to be in the release snapshot. (Could change this later if snapshots get taken after agr_ferret runs and before agr_preprocess runs, and then another release snapshot gets taken for agr_loader to run)
- Processing of interaction-source files must be done sequentially because (publication-taxon1-taxon2) entries from earlier sources take precedence over those from later sources.


text:
# Python (3.7) backend server

This directory contains example python code to run a Flask server that authenticates your magic link with the stytch-python client library. It also serves the frontend React app

## Requirements

* Python 3.7+
* Configured .env file in the repo root

## How to run

1. Create and activate a new virtual environment
   ```
   python3 -m venv venv
   source venv/bin/activate
   ```
2. Install dependencies
   ```
   pip install -r requirements.txt
   ```
3. Run the server
   ```
   python3 server.py
   ```

Go to http://localhost:9000 in your browser to see the demo

## Session management

This app sets a variable in React state for authenticating a user to illustrate the user experience for authenticating with Stytch - we don't recommend doing this! You should use a more secure session management solution, like flask-login.

repository: dylanbrookes/stytchjs-react-magic-links

branch_name: refs/heads/main

repo_name: dylanbrookes/stytchjs-react-magic-links


text:
common-substrings
================

####a method for finding all common strings for Javascript and node.js, which is particularly quick for large string samples.
================

###Usage

####Quickstart
Give the array as input parameter.

    var SuffixTrie= require('common-substrings');
    var tree =  new SuffixTrie();
    tree.build(array);
    var fragmentResult1 = tree.weightByAverage();
    var fragmentResult2 = tree.weightByMax();

####Methods
There are two method to get the fragments:
- one is `weightByAverage()` : which rank the fragment by the product of the fragment length and fragment occurrence.
- one is `weightByMax()` : the process is trival, but main idea is rank the longest fragment in the longest string to the first.

Both method return an Object array, each element in the array include :
- `source` : the index of the labels which contais this fragment,
- `name` : the name of the fragment,
- `weight` : the product of the fragment length and the fragment occurrence

####Conifguration
You may set the options of the algorithm when initialization.

    var tree = new SuffixTrie({
        minLength : 5, //the minimum length of fragment
        minOccurrence : 3 , //the minimin occurrence of fragment
        debug : false  //whether to show the console messages
    });

the default values are:
- `minLength` : 3
- `minOccurrence` : 2
- `debug` : true

####Example Result
if we have the array `['java', 'javascript','pythonscript']`, by the default setting, we will get result array:

        [
          {name : 'java', source : [0,1], weight : 8},
          {name : 'script', source : [1,2], weight : 10}
        ]

####Demo
A practical demo is placed in demo folder, and I already download mongoose for windows here.
You may use mongoose server to have a quick look on how to make the algorithm into practical. Don't forget to use console to see all the informations.

================

If you have any questions, please contact my email<EMAIL_ADDRESS>I will response as soon as possible :)

###Extenal Librarys

use Louis Chatriot's [binary search tree](https://github.com/louischatriot/node-binary-search-tree) as dependecies

###License

The algorithm code is under The MIT License

repository: qqqqqqian/CommonSubstrings

repo_name: qqqqqqian/CommonSubstrings


text:
#Knit - developer zone#

[Demo](http://<IP_ADDRESS>:8001/)

Knit is the concept-proof project, which allows create and display links between people.
This document contains details about technical details of the project.
General description of the current release see [here (russian)](https://docs.google.com/document/d/12-mhfKlvgkkfCaIhhGz8tTlWsNBwYSY_P9wXU4YROcs).

##Project consists of 3 main parts:##

+ `Links` - python web service on the base of web.py platform, basically it provides CRUD opertaions between client and mongodb storage.

CRUD operations - mongodb
Index user suggestions for variety of request (for example names) - elastic-search

[github](https://github.com/baio/links)

+ `Knit` - nodejs project which use connect framework, serve as a gateway between user and Links project, facilitate authentication and caching of the data. Serve static files to user.

    + Authentication (connectjs)
    + Cache user data (redis)
    + Web server  - serve static html, js, css (should be separated project in the future)
    + Dspatcher to `Links` service

[github](https://github.com/baio/knit)

+ `Ural` - Orthodox Single Web Page Application Framework. All you need is server which serves static files and service which usher user data by REST protocol. No views are generated by the server.
At the moment project is placed under ural folder in Knit project - must be separated in future.

    + [Jira](http://<IP_ADDRESS>:8080/issues/?jql=project%20%3D%20KT)
    + [Current version, general description (Russian)](https://docs.google.com/document/d/12-mhfKlvgkkfCaIhhGz8tTlWsNBwYSY_P9wXU4YROcs)
    + [Futures](https://docs.google.com/document/d/1FfAZtyuMrJ9_k3GnGzYze5JL1y3uv5L085F2nW-fx_U)
    + [Knit-On](https://docs.google.com/document/d/1upBlkeNT7lkhUiMlxS7DdhbOv4JiEd0pJ-MMuCaWuOY)

MIT License

Max Putilov 2013

repository: baio/knit-service

repo_name: baio/knit-service


text:
# How To Make Plugins !heading

Plugins are now supported as of 0.4.0 of markdown-include.  Adding plugins to markdown-include to facilitate the transformation of custom tags is quite trivial.

Plugins are best used when markdown-include is being required as a module.  If you wish to make this available via the command line, you must require markdown-include in a node module and call it from the command line.

## Tutorial !heading

Let's pretend we want to add a custom tag called `!myTag` that follows the pattern of `#phrase !myTag`.  All we need to do is register the plugin with markdown-include

First, require markdown-include:

```javascript
var markdownInclude = require('markdown-include');
```

Second, register your plugin with with your desired pattern to match and desired replacement.  You can replace your tag with another string to do your desired work:

```javascript
var markdownInclude = require('markdown-include');
markdownInclude.registerPlugin({
	pattern: /^#.+ !myTag/gm,
	replace: 'myString!'
});
```

In the example above, we're just replacing our tag with a string.  If you would rather use a function, you can do this like so (you must return a value to replace with):

```javascript
var markdownInclude = require('markdown-include');
markdownInclude.registerPlugin({
	pattern: /^#.+ !myTag/gm,
	replace: function (tag) {
		// do something with tag...
		return 'myString!'
	}
});
```

`pattern` is the regular expression that should be looked for.  `replace` is your desired replacement for the tag once it's found.

This gives you free range to do whatever you want with the tag you want to replace.  Once the tag is encountered markdown-include will run the function.

After the tag and it's replacement is registered, it's business as usual:

```javascript
markdownInclude.compileFiles('../path/to/markdown.json').then(function () {
	// do something after compiling
});
```

You can also use another form of registering a plugins if it fits your coding style better:

```javascript
markdownInclude.registerPlugin(/^#.+ !myTag/gm, function (tag) {
	return 'my replacement!';
});
```

license: ISC

repository: sethen/markdown-include

branch_name: refs/heads/develop

gha_language: JavaScript

repo_name: sethen/markdown-include


text:
---
published: true
layout: post
title: Forcing HTTP to HTTPS redirect on IIS via Amazon Elastic Load Balancers
author: John Smith
tags:
  - '#iis'
  - '#aws'
  - '#elb'
  - '#urlredirect'
  - '#webconfig'
---

Today I replaced an ageing asp.net web forms web application with a new static site which for now is just a landing page with a contact form and in doing so needed to force any insecure HTTP requests to HTTPS.

A bit of a gotcha was an error on the redirect and the issue was the `HTTP_X_FORWARDED_PROTO` header also needed to be forwarded along with the redirect.

For example :

```xml
<conditions logicalGrouping="MatchAny">
   <add input="{HTTP_X_FORWARDED_PROTO}" pattern="^http$" />
   <add input="{HTTPS}" pattern="on" />
</conditions>
```

Next up, I needed to redirect any users who were going to `.aspx` pages that no longer existed to a custom 404 HTML page not found page.

This just needed adding to `web.config` like so :

```xml
  <system.web>
      <compilation targetFramework="4.0" />
      <customErrors mode="On" redirectMode="ResponseRewrite">
         <error statusCode="404" redirect="404.html" />
      </customErrors>
   </system.web>

   <system.webServer>
      <httpErrors errorMode="Custom">
         <remove statusCode="404"/>
         <error statusCode="404" path="/404.html" responseMode="ExecuteURL"/>
      </httpErrors>
   </system.webServer>

```

So here it is for the next time I have to do something similar, This is the full `web.config` that needs to in the root folder of the site.

```xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.web>
        <compilation targetFramework="4.0" />
        <customErrors mode="On" redirectMode="ResponseRewrite">
            <error statusCode="404" redirect="404.html" />
        </customErrors>
    </system.web>
    <system.webServer>
        <httpErrors errorMode="Custom">
            <remove statusCode="404"/>
            <error statusCode="404" path="/404.html" responseMode="ExecuteURL"/>
        </httpErrors>
        <rewrite>
            <rules>
                <rule name="HTTPS Rule behind AWS Elastic Load Balancer" stopProcessing="true">
                    <match url="(.*)" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAny">
                        <add input="{HTTP_X_FORWARDED_PROTO}" pattern="^http$" />
                        <add input="{HTTPS}" pattern="on" />
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirectType="Found" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>
```

And to test that the site works I entered it onto [https://www.whynopadlock.com/](https://www.whynopadlock.com/) which gave me the confidence that all was well.

Success 🎉


text:
---
title: "AddHardwareForUsers.php"
description: "AddHardwareForUsers.php"
date: "2017-11-23"
classes:
    - "SoftLayer_User_Customer"
    - "SoftLayer_Account"
    - "SoftLayer_SoapClient"
tags:
    - "users"
---

```php
<?php
/**
 * Add Bulk Hardware Access
 *
 * This script adds multiple hardware to a portal user's hardware access list. This script works for multiple
 * users and the users need to be able the permission: "View Hardware Details", you can set this in the following
 * link: https://control.softlayer.com/account/users or using SoftLayer_User_Customer::addPortalPermission by API.
 * This script works specifying just usernames from users and hostnames from hardware objects.
 *
 * Important manual pages:
 * @see http://sldn.softlayer.com/reference/services/SoftLayer_User_Customer/addBulkHardwareAccess
 * @see http://sldn.softlayer.com/reference/services/SoftLayer_Account/getUsers
 * @see http://sldn.softlayer.com/reference/services/SoftLayer_Account/getVirtualGuests
 * @see http://sldn.softlayer.com/article/Object-Filters
 *
 * @license <http://sldn.softlayer.com/article/License>
 * @author SoftLayer Technologies, Inc<EMAIL_ADDRESS> */

require_once ("C:/PhpSoftLayer/SoftLayer/SoftLayer/SoapClient.class.php");

/**
 * SoftLayer API username
 * @var string
 */
$username = "set me";

/**
 * SoftLayer API key
 * @var string
 */
$apiKey = "set me";

// Declare users to allow access for Hardware objects
$users = array("user1", "user2", "user3");

// Declare hostnames from Hardware objects, to allow access from users
$hostnames = array("bms1", "bms2");

/*
 * Create SoftLayer API client object for SoftLayer_User_Customer and SoftLayer_Account services
 */
$client = SoftLayer_SoapClient::getClient("SoftLayer_User_Customer", null, $username, $apiKey);
$account = SoftLayer_SoapClient::getClient("SoftLayer_Account", null, $username, $apiKey);

// Declare an object filter, to retrieve users with the specific username specified in "$users" array.
$filter = new stdClass();
$filter -> users = new stdClass();
$filter -> users -> username = new stdClass();
$filter -> users -> username -> operation = "in";
$filter -> users -> username -> options = array();
$filter -> users -> username -> options[0] = new stdClass();
$filter -> users -> username -> options[0] -> name = "data";
$filter -> users -> username -> options[0] -> value = $users;
$account -> setObjectFilter($filter);

// Get Users
$receiptUsers = $account -> getUsers();

// Declare an object filter, to retrieve users with the specific hostnames specified in "$hostnames" array.
$filter = new stdClass();
$filter -> hardware = new stdClass();
$filter -> hardware -> hostname = new stdClass();
$filter -> hardware -> hostname -> operation = "in";
$filter -> hardware -> hostname -> options = array();
$filter -> hardware -> hostname -> options[0] = new stdClass();
$filter -> hardware -> hostname -> options[0] -> name = "data";
$filter -> hardware -> hostname -> options[0] -> value = $hostnames;
$account -> setObjectFilter($filter);

// Get Hardware objects
$receiptHardware = $account -> getHardware();

// Declare array to store the ids from Hardware objects
$hardware = array();
for ($i = 0; $i < sizeof($receiptHardware); $i++) {
    array_push($hardware, $receiptHardware[$i] -> id);
}

// Allow for each user the access to Hardware objects
for ($i = 0; $i < sizeof($receiptUsers); $i++) {
    // Set init parameter
    $client -> setInitParameter($receiptUsers[$i] -> id);
    try {
        /*
         * If you want to remove the access just change the below line by this:
         * $result = $client -> removeHardwareAccess($hardware);
         */
        $result = $client -> addBulkHardwareAccess($hardware);
        // Print the result
        print_r("The user " . $receiptUsers[$i] -> username . " has access to Hardware objects?: " . $result . "\n");
    } catch(Exception $e) {
        print_r("Unable to allow access to Hardware for" . $receiptUsers[$i] -> username . ": " . $e -> getMessage() . "\n");
    }
}

```

gha_language: HTML

gha_license_id: NOASSERTION


text:
---
title: "Ruby Build Failure with OpenSSL3"
layout: post
date: 2022-06-10 09:42:44 +0900
image: 'assets/img/posts/2022-06-10-ruby-build-failure-with-openssl3/catch.jpg'
description:
tag: ['Rails', 'Ruby', 'OpenSSL']
blog: true
author: "Kai Sasaki"
---

There may be no developer who has not encountered installation errors when using Ruby and [rbenv](https://github.com/rbenv/rbenv). As a piece of evidence that Ruby and OpenSSL have bad chemistry with each other, you may be able to find a lot of questions line about the error like [this](https://github.com/rbenv/ruby-build/issues/1353).

This time, I tried to upgrade my Ruby environment to Ruby3 and encountered the following [issue](https://github.com/puma/puma/issues/2790).

```
OpenSSL 3 - symbol not found in flat namespace '_SSL_get1_peer_certificate'
```

This is because OpenSSL 3 has `SSL_get1_peer_certificate` but Open SSL 1.1 does not, which has `SSL_get_peer_certificate` instead. When you build Ruby with OpenSSL 1.1 but puma running for Rails using Open SSL 3, the problem shows up.

This solution targets the developer using macOS and Homebrew to manage their system packages.

# Short Answer

The quick answer to this problem is deleting OpenSSL 3 from your environment. If you use macOS and Homebrew, you will find which version is installed.

```bash
$ brew --prefix openssl
/usr/local/opt/openssl@3
```

It indicates that the system, including puma, can refer to OpenSSL 3. It might be better to uninstall this version completely. You may imagine changing the build option to compile puma with OpenSSL 1 can work.

```
$ bundle config build.puma \
<EMAIL_ADDRESS>```

But it did not work in my case. Eradicating the package from the system was the sole solution.

extension: markdown

gha_license_id: MIT


text:
# Gentlestudent
Gentlestudent is an application that allows learners to engage in learning opportunities. Companies can issue a learning opportunities and learners can choose to participate. After completing a learning opportunity, the learner is rewarded with an open badge, which is a verifiable record of their learning. This way, Gentlestudent stimulates informal learning and teaches valuable lessons about community life and social engagement.

Click [here](https://osoc19.github.io/gentlestudent-web) to navigate to the GitHub page.

## Contents
- [Installation Guide](#installation-guide)
- [Deployment](#deployment)
- [About Gentlestudent](#about-gentlestudent)
- [The Future](#possible-future)
- [Used Tools and Frameworks](#used-tools-and-frameworks)
- [The Team](#the-team)
- [License](#license)
- [References](#references)

## Installation Guide
Clone or download the code and add a .env file to the project root. The .env file looks like this
```
REACT_APP_FIREBASE_API_KEY=FIREBASEAPIKEY
REACT_APP_FIREBASE_AUTH_DOMAIN=gentle-student.firebaseapp.com
REACT_APP_DATABASE_URL=https://gentle-student.firebaseio.com
REACT_APP_PROJECT_ID=gentle-student
REACT_APP_STORAGE_BUCKET=gentle-student.appspot.com
REACT_APP_MESSAGING_SENDER_ID=FIREBASEMESSAGINGSENDERID
```
Install the required dependencies
```
npm install
```
Run the project on local machine with this command
```
npm start
```

## Deployment
Deploying this app is as easy as running this command from the project root
```
firebase deploy
```
For this command, you need to have the firebase tools installed.
```
npm install -g firebase-tools
```
This will install firebase tools globally. <br>
The running version of the Gentlestudent website can be found [here](https://gentlestudent.gent/) after deployment.

## About Gentlestudent
Gentlestudent is an application which allows learners, mainly students, to participate in learning opportunities outside school. There are two categories of opportunities.

1. Learning opportunities: learning opportunities are offered by verified organisations and companies. Learners can sign up for those experiences, and the organisation validates their participation. When a learner finishes a learning opportunity, he/she is rewarded with an [Open Badge](https://openbadges.org/). Those Open Badges prove that you have acquired a certain skill or knowledge. They can be used in, for example, a job interview when they ask you how you can differentiate yourself from other people with the same degree. Badges can be compared with endorsements on LinkedIn.

2. Quests: quests are smaller opportunities with less weight than the previously discussed ones. Everyone can create quests for everyone. This encourages informal learning. A quest can for example be 'I need help with design in CSS, can someone help?'. People with knowledge of design and css then have the option to sign up for this quest. The creator of the quest can pick a subscribed user to come and help him/her. If someone successfully finishes a quest, he/she is rewarded with a token. Tokens have less value than badges. It is a sign of apprecation given by the creator of the quest.

Quests are in an early stage of development and may contain bugs. The version of quests is a prototype of the concept and does not have all functionality we planned. This feature is complementary with the mobile application: together they show the full possible functionality.

## Possible Future
Gentlestudent is not finished yet. Open Summer of code 2019 comes to an end and we still have some ideas which might be interesting for the future of this application. In this section we will focus on the Quest part of Gentlestudent.

- Right now, users can get tokens for finishing quests. Those tokens don't really have any value at the moment. A possible improvement for the future might be a progress system. After reaching a certain amount of tokens, users can trade them for an Open Badge which contains a reference to all quests that user did.

- In this stage of the project, quests only have one icon. In the future it can be interesting if users can create their own quest icon, or at least be able to pick an icon from some presets. This can add a personal touch to the whole questing part.

## Used Tools and Frameworks
- [React](https://reactjs.org/) for the core of the web application.
- [Leaflet API](https://leafletjs.com/) for the [OpenStreetMap](https://www.openstreetmap.org/) displays.
- [Google Firebase](https://firebase.google.com/) as a backend service.
- [Badgr API](https://badgr.io/) for creation and management of Open Badges

## The Team
| Member        | Function          |
| ------------- |:-------------:|
| Bert Jehoul     | Coach |
| Bram De Coninck    | Lead Developer & Mobile Developer |
| Maxim De Geyter | Designer & Front-end Developer |
| Hamza Mahmoudi | Tester & Front-end Developer |
| Olivia Fontes de Mello | Communication Manager |
| Freek De Sagher | Front-end Developer |

## License
This project is MIT licensed. View [LICENSE](./LICENSE) for details.

## References
- [Mobile application repository](https://github.com/oSoc19/gentlestudent-mobile)
- [oSoc19 website](https://2019.summerofcode.be/2019/gentlestudent)
- [Artevelde University of Applied Sciences documentation](https://drive.google.com/drive/folders/1vkDLn_qmJT_vRxGx8hoCRRXEcHTxpjwi)
- [oSoc18 code repository](https://github.com/oSoc18/gentlestudent)
- [Badgr API documentation](https://api.badgr.io/)

repository: Gentlestudent/web-app

repo_name: Gentlestudent/web-app


text:
---
title: Roxbot Trivia
description: About Roxbot's trivia game, Roxbot Trivia.
authors:
    - Roxanne Gibson
---

# Roxbot Trivia

![roxbottrivialogo](assets/images/roxbottriviabanner.png)

## About

Roxbot Trivia is a trivia game in *your* discord server. It's heavily inspired by Tower Unite's Trivia mini-game. Uses the [Open Trivia Database](https://opentdb.com) made by PixelTail Games. To start, just type `;trivia start`.

## How to Play

Once the game has started, questions will be asked and you will be given 20 seconds to answer them. To answer, react with the corrosponding emoji. Roxbot will only accept your first answer. Score is calculated by how quickly you can answer correctly, so make sure to be as quick as possible to win! Person with the most score at the end wins. Glhf!

## How does the game end?

The game ends once all questions have been answered or if everyone has left the game using the `;trivia leave` command.

## Can I have shorter or longer games?

Yes! You can change the length of the game by using the argument `-l or --length` adding short (5 questions), medium (10), or long (15) at the end. `;trivia start --length short`. The default is medium.

## Can I play with friends?

Yes! Trivia is best with friends. How else would friendships come to their untimely demise? You can only join a game during the 20 second waiting period after a game is started. Just type `;trivia join` and you're in! You can leave a game at anytime (even if its just you) by doing `;trivia leave`. If no players are in a game, the game will end and no one will win ;-;

## What if I don't want anyone to join my solo game? Waiting is boring!

No problem! Just put `-s or --solo` anywhere after `;trivia start`

## Can I have a short solo game?

Yes, you can use both arguments at once. The Trivia command takes commands just like a cli. Example: `;tr start -sl short` or `;tr start --solo --length long`

## Disclaimer

Roxbot Trivia uses the Open Trivia Database, made and maintained by Pixeltail Games LLC. The OpenTDB is licensed under the [CC BY-SA 4.0](https://creativecommons.org/licenses/by-sa/4.0/). Find out more at [https://opentdb.com/](https://opentdb.com/).

repository: rdnetto/roxbot

repo_name: rdnetto/roxbot


text:
Reporting Issues
================

ARCS is currently in its infantile stages, so you may encounter some bugs and
issues in the application. However, these are different from flagging a
resource since you would be defining a problem which you may face with the
functionality of the application and not with any data specific to a resource.

We believe that it is very important that you provide us a helpful bug report
so that our developers can fix it accordingly and make ARCS a better experience
for you.

You can provide the details of the bug report through the feedback link present
at the bottom right corner of the page. You can access this link through any of
the pages like search, upload or viewer.

![feedback-search](../img/docs/feedback-search.png)

![feedback-viewer](../img/docs/feedback-viewer.png)

You can provide your feedback by clicking on the feedback link > `Contact
Support` and then include a descriptive message subject, the summary of the
problem in the message body and your email address. You can make your feedback
more helpful by providing us with the URL where you encountered the bug, the
steps you took to reproduce the problem and the screenshots.

![contact-support](../img/docs/contact-support.png)

We appreciate any helpful ideas to improve our application. If you have any
innovative ideas to enhance the application you can click on `Give Feedback`and
enter your idea with a brief description. We will get back to you through your
email.

![give-feedback](../img/docs/give-feedback.png)

repository: CassidyTaylor/arcs

repo_name: CassidyTaylor/arcs


text:
# REQUIREMENTS

 - Ansible
 - AWS CloudFormation

# SETUP

Create the AWS CloudFormation Stack using `stack.cf.yaml`.
Once got the Public IP, change the `inventory` file.

Then, provision the instance with:

```bash
ansible-galaxy install -r requirements.yml
ansible-playbook -i inventory playbooks/setup.yml
```

# DEPLOY

```bash
ansible-playbook -i inventory playbooks/deploy.yml
```


text:
# BitStream

BitStream allows for easy manipulation of long strings of bits, for both reading and writing.

It's easy to get started:

```typescript
let bitstream = new BitStream();
```

You can also start it with a `number[]`:

```typescript
var bitstream = BitStream(myBytes);
```

To write to the stream:

```typescript
bitstream.write(5,{bits: 3}); //writes 101 (binary) to the stream
bitstream.writeBool(true); //writes 1 (binary) to the stream
bitstream.writeBytes([0,255,127],{bytes:3}); //writes 0x00FF7F to the stream
bitstream.toString(); //will return<PHONE_NUMBER>001111111101111111 to the console
```

Reading is also easy:

```typescript
let out = bitstream.read({bits:5}); //reads 22 (decimal) from the stream
out = bitstream.read({bits:11}); //reads 15 (decimal) from the stream
let book = bitstream.readBool(); //reads true from the stream
```

## Supported Data Types

| Data Type        | Read Method                      | Write Method                             |
| ---------------- | -------------------------------- | ---------------------------------------- |
| `int`            | `read({bytes, bits})`            | `write(input, {bytes, bits})`            |
| `bool`           | `readBool()`                     | `writeBool(input)`                       |
| `string` (ASCII) | `readAsciiString({bytes, bits})` | `writeAsciiString(input, {bytes, bits})` |
| `string` (HEX)   | `readHexString({bytes, bits})`   | `writeHexString(input, {bytes, bits})`   |
| `number[]`      | `readBytes({bytes, bits})`       | `writeBytes(input, {bytes, bits})`       |
| `BitStream`      | `readBitStream({bytes, bits})`   |                                          |

## Additional Methods

| Method Name         | Description                                                  |
| ------------------- | ------------------------------------------------------------ |
| `checkBit(bit: int)` | Returns a `bool` if a bit is set or not (does not progress the cursor) |
| `toString()`        | Returns a binary representation of the current stream        |
| `getStream()`       | Gets the current stream data as a `number[]`                |
| `getLength()`       | Gets the current length of the stream                        |
| `getCursor()`       | Gets the current cursor position                             |

repository: beepltd/bitstream

repo_name: beepltd/bitstream


text:
# Martingale_Max
Finds the maximum martingale, limits and run size

## Installation
```
sudo apt-get update
sudo apt-get install unzip
ssh-keygen
```

## Getting Data
```
cd Martingale_Max
cd data
wget http://www.football-data.co.uk/mmz4281/1718/data.zip
wget http://www.football-data.co.uk/mmz4281/1617/data.zip
wget http://www.football-data.co.uk/mmz4281/1516/data.zip
wget http://www.football-data.co.uk/mmz4281/1415/data.zip
wget http://www.football-data.co.uk/mmz4281/1314/data.zip
```


text:
# go-bitcoin
> A library for working with Bitcoin (BSV) transactions, addresses, keys, encryption, and more.

[![Release](https://img.shields.io/github/release-pre/BitcoinSchema/go-bitcoin.svg?logo=github&style=flat&v=4)](https://github.com/BitcoinSchema/go-bitcoin/releases)
[![Build Status](https://img.shields.io/github/workflow/status/BitcoinSchema/go-bitcoin/run-go-tests?logo=github&v=3)](https://github.com/BitcoinSchema/go-bitcoin/actions)
[![Report](https://goreportcard.com/badge/github.com/BitcoinSchema/go-bitcoin?style=flat&v=4)](https://goreportcard.com/report/github.com/BitcoinSchema/go-bitcoin)
[![codecov](https://codecov.io/gh/BitcoinSchema/go-bitcoin/branch/master/graph/badge.svg?v=4)](https://codecov.io/gh/BitcoinSchema/go-bitcoin)
[![Go](https://img.shields.io/github/go-mod/go-version/BitcoinSchema/go-bitcoin?v=4)](https://golang.org/)

[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/BitcoinSchema/go-bitcoin)
[![Mergify Status](https://img.shields.io/endpoint.svg?url=https://gh.mergify.io/badges/BitcoinSchema/go-bitcoin&style=flat&v=4)](https://mergify.io)
[![Sponsor](https://img.shields.io/badge/sponsor-BitcoinSchema-181717.svg?logo=github&style=flat&v=4)](https://github.com/sponsors/BitcoinSchema)
[![Donate](https://img.shields.io/badge/donate-bitcoin-ff9900.svg?logo=bitcoin&style=flat&v=4)](https://gobitcoinsv.com/#sponsor?utm_source=github&utm_medium=sponsor-link&utm_campaign=go-bitcoin&utm_term=go-bitcoin&utm_content=go-bitcoin)

## Table of Contents

- [Installation](#installation)
- [Documentation](#documentation)
- [Examples & Tests](#examples--tests)
- [Benchmarks](#benchmarks)
- [Code Standards](#code-standards)
- [Usage](#usage)
- [Maintainers](#maintainers)
- [Contributing](#contributing)
- [License](#license)

## Installation

**go-bitcoin** requires a [supported release of Go](https://golang.org/doc/devel/release.html#policy).

```shell script
go get -u github.com/bitcoinschema/go-bitcoin
```

## Documentation

View the generated [documentation](https://pkg.go.dev/github.com/bitcoinschema/go-bitcoin)

[![GoDoc](https://godoc.org/github.com/bitcoinschema/go-bitcoin?status.svg&style=flat)](https://pkg.go.dev/github.com/bitcoinschema/go-bitcoin)

### Features

- **Addresses**
  - [Address from PrivateKey (bsvec.PrivateKey)](address.go)
  - [Address from Script](address.go)
- **Encryption**
  - [Encrypt With Private Key](encryption.go)
  - [Decrypt With Private Key](encryption.go)
  - [Encrypt Shared](encryption.go)
- **HD Keys** _(Master / xPub)_
  - [Generate HD Keys](hd_key.go)
  - [Generate HD Key from string](hd_key.go)
  - [Get HD Key by Path](hd_key.go)
  - [Get PrivateKey by Path](hd_key.go)
  - [Get HD Child Key](hd_key.go)
  - [Get Addresses from HD Key](hd_key.go)
  - [Get XPub from HD Key](hd_key.go)
  - [Get HD Key from XPub](hd_key.go)
  - [Get PublicKeys for Path](hd_key.go)
  - [Get Addresses for Path](hd_key.go)
- **PubKeys**
  - [Create PubKey from PrivateKey](pubkey.go)
  - [PubKey from String](pubkey.go)
- **Private Keys**
  - [Create PrivateKey](private_key.go)
  - [PrivateKey (string) to Address (string)](address.go)
  - [PrivateKey from string](private_key.go)
  - [Generate Shared Keypair](private_key.go)
  - [Get Private and Public keys](private_key.go)
  - [WIF to PrivateKey](private_key.go)
  - [PrivateKey to WIF](private_key.go)
- **Scripts**
  - [Script from Address](script.go)
- **Signatures**
  - [Sign](sign.go) & [Verify a Bitcoin Message](verify.go)
  - [Verify a DER Signature](verify.go)
- **Transactions**
  - [Calculate Fee](transaction.go)
  - [Create Tx](transaction.go)
  - [Create Tx using WIF](transaction.go)
  - [Create Tx with Change](transaction.go)
  - [Tx from Hex](transaction.go)

Package Dependencies

- [bitcoinsv/bsvd](https://github.com/bitcoinsv/bsvd)
- [bitcoinsv/bsvutil](https://github.com/bitcoinsv/bsvutil)
- [libsv/go-bt](https://github.com/libsv/go-bt)

Library Deployment

[goreleaser](https://github.com/goreleaser/goreleaser) for easy binary or library deployment to Github and can be installed via: `brew install goreleaser`.

The [.goreleaser.yml](.goreleaser.yml) file is used to configure [goreleaser](https://github.com/goreleaser/goreleaser).

Use `make release-snap` to create a snapshot version of the release, and finally `make release` to ship to production.

Makefile Commands

View all `makefile` commands

```shell script
make help
```

List of all current commands:

```text
all                  Runs multiple commands
clean                Remove previous builds and any test cache data
clean-mods           Remove all the Go mod cache
coverage             Shows the test coverage
generate             Runs the go generate command in the base of the repo
godocs               Sync the latest tag with GoDocs
help                 Show this help message
install              Install the application
install-go           Install the application (Using Native Go)
lint                 Run the golangci-lint application (install if not found)
release              Full production release (creates release in Github)
release              Runs common.release then runs godocs
release-snap         Test the full release (build binaries)
release-test         Full production test release (everything except deploy)
replace-version      Replaces the version in HTML/JS (pre-deploy)
tag                  Generate a new tag and push (tag version=0.0.0)
tag-remove           Remove a tag if found (tag-remove version=0.0.0)
tag-update           Update an existing tag to current commit (tag-update version=0.0.0)
test                 Runs vet, lint and ALL tests
test-ci              Runs all tests via CI (exports coverage)
test-ci-no-race      Runs all tests via CI (no race) (exports coverage)
test-ci-short        Runs unit tests via CI (exports coverage)
test-short           Runs vet, lint and tests (excludes integration tests)
test-unit            Runs tests and outputs coverage
uninstall            Uninstall the application (and remove files)
update-linter        Update the golangci-lint package (macOS only)
vet                  Run the Go vet application
```

## Examples & Tests
All unit tests and [examples](examples) run via [Github Actions](https://github.com/BitcoinSchema/go-bitcoin/actions) and
uses [Go version 1.15.x](https://golang.org/doc/go1.15). View the [configuration file](.github/workflows/run-tests.yml).

Run all tests (including integration tests)

```shell script
make test
```

Run tests (excluding integration tests)

```shell script
make test-short
```

## Benchmarks

Run the Go benchmarks:

```shell script
make bench
```

## Code Standards

Read more about this Go project's [code standards](.github/CODE_STANDARDS.md).

## Usage

Checkout all the [examples](examples)!

## Maintainers

| [](https://github.com/rohenaz) | [](https://github.com/mrz1836) |
| :----------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------: |
|                              [Satchmo](https://github.com/rohenaz)                               |                                [MrZ](https://github.com/mrz1836)                                 |

## Contributing

View the [contributing guidelines](.github/CONTRIBUTING.md) and follow the [code of conduct](.github/CODE_OF_CONDUCT.md).

### How can I help?

All kinds of contributions are welcome :raised_hands:!
The most basic way to show your support is to star :star2: the project, or to raise issues :speech_balloon:.
You can also support this project by [becoming a sponsor on GitHub](https://github.com/sponsors/BitcoinSchema) :clap:
or by making a [**bitcoin donation**](https://gobitcoinsv.com/#sponsor?utm_source=github&utm_medium=sponsor-link&utm_campaign=go-bitcoin&utm_term=go-bitcoin&utm_content=go-bitcoin) to ensure this journey continues indefinitely! :rocket:

[![Stars](https://img.shields.io/github/stars/BitcoinSchema/go-bitcoin?label=Please%20like%20us&style=social)](https://github.com/BitcoinSchema/go-bitcoin/stargazers)

## License

[![License](https://img.shields.io/github/license/BitcoinSchema/go-bitcoin.svg?style=flat&v=4)](LICENSE)

repository: wireturn/bsv

gha_language: Go

repo_name: wireturn/bsv


text:
# hackernews-client

[![CircleCI](https://circleci.com/gh/samisnotinsane/hackernews-client/tree/master.svg?style=svg)](https://circleci.com/gh/samisnotinsane/hackernews-client/tree/master)
[![codebeat badge](https://codebeat.co/badges/651aecbd-aba5-4631-9246-fce7bca9a382)](https://codebeat.co/projects/github-com-samisnotinsane-hackernews-client-master)
[![Open Source Love](https://badges.frapsoft.com/os/mit/mit.svg?v=102)](https://opensource.org/licenses/mit-license.php)

Use this wrapper library to download Hacker News headlines into your Python program.

## Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

### Prerequisites

You will need the python-requests library so we can make HTTP calls. Install with pip:

```
pip install requests
```

### Installing

Using pip

```
pip install hackernews-client==0.1.2b1
```

From sources

```
git clone https://github.com/samisnotinsane/hackernews-client.git
cd hackernews-client
```

Run the example script: `news.py`

```
python news.py
```

this fetches:
  - Best stories
  - Search
    - story
    - comment
    - poll
    - job
  - Most recent items (last `n` items)

You may make another copy of this script

```
cp news.py ./my_copy_news.py
python my_copy_news.py
```

modifying it to suit your use case.

Make sure your setup is working by opening IDLE and importing the library (see Usage section below) if you have installed via pip.

## Running the tests

This package contains tests which verifies the integrity of the internal logic.

### Unit tests

To run all unit tests, make sure you're in the root directory (`hackernews-client`). Use Python's built in `unittest` library

```
python -m unittest -v
```

If you have clone from `master` branch, these should always pass. At the time of testing, sometimes these tests failed with `SSLErrors` due to too many requests being made to the Hacker News API too quickly. Wait ~20 secs before running the unit tests again.

Alternatively, it could be that a breaking change was made to the Web API which would require updating this library. Feel free to raise an [Issue](https://github.com/samisnotinsane/hackernews-client/issues) or a [Pull Request](https://github.com/samisnotinsane/hackernews-client/pulls) to remediate the problem.

## Usage

Begin by importing the library. This example assumes you're working within `news.py` in the root directory of the repo.

```
from hackernews import hn
```

The client is then initialised in the following way

```
news_client = hn.NewsClient()
```

In this case, `news_client` object gives access to all available methods. The data contained in the methods and the instances returned all closely follow the [HackerNews API](https://github.com/HackerNews/API).

Try to print the headline of the best story today. First open IDLE, then

```
print(str(news_client.get_best_story(fetchMax=10)[0].title))
```

If you can read the headline, you're good to go!

Full documentation with examples are provided below.

## Documentation

### Class: `NewsClient`

- `get_item`

**Parameters:**

| Name       | Type | Required | Description                                   | Default
| ---------- | ---- | -------- | --------------------------------------------- | -------
| `item_id`  | int  | Yes      | unique item id of Hacker News story, comment etc | None

Returns:
a list of `Item` (each of type `dict`). See class documentation for `Item` which contains a full description of each property.

- `get_top_story`

**Parameters:**

| Name        | Type    | Required    | Description                             | Default
| ----------- | ------- | ----------- | --------------------------------------- | -------
| `fetchMax`  | int     | Yes         | Number of stories to fetch, max value = 500 | 500

Returns:
a list of top stories as `Item` from the url `https://hacker-news.firebaseio.com/v0/topstories.json`

- `get_ask_story`

**Parameters:**

| Name        | Type    | Required    | Description                             | Default
| ----------- | ------- | ----------- | --------------------------------------- | -------
| `fetchMax`  | int     | Yes         | Number of stories to fetch, max value = 200 | 200

Returns:
a list of Ask HN stories as `Item` from the url `https://hacker-news.firebaseio.com/v0/askstories.json`

- `get_new_story`

**Parameters:**

| Name        | Type    | Required    | Description                             | Default
| ----------- | ------- | ----------- | --------------------------------------- | -------
| `fetchMax`  | int     | Yes         | Number of stories to fetch, max value = 500 | 500

Returns:
a list of new stories as `Item` from the url `https://hacker-news.firebaseio.com/v0/newstories.json`

- `get_show_story`

**Parameters:**

| Name        | Type    | Required    | Description                             | Default
| ----------- | ------- | ----------- | --------------------------------------- | -------
| `fetchMax`  | int     | Yes         | Number of stories to fetch, max value = 200 | 200

Returns:
a list of Show HN stories as `Item` from the url `https://hacker-news.firebaseio.com/v0/showstories.json`

- `get_best_story`

**Parameters:**

| Name        | Type    | Required    | Description                             | Default
| ----------- | ------- | ----------- | --------------------------------------- | -------
| `fetchMax`  | int     | Yes         | Number of stories to fetch, max value = 200 | 200

Returns:
a list of best stories as `Item` from the url `https://hacker-news.firebaseio.com/v0/beststories.json`

- `get_job_story`

**Parameters:**

| Name        | Type    | Required    | Description                             | Default
| ----------- | ------- | ----------- | --------------------------------------- | -------
| `fetchMax`  | int     | Yes         | Number of stories to fetch, max value = 200 | 200

Returns:
a list of job stories as `Item` from the url `https://hacker-news.firebaseio.com/v0/jobstories.json`

- `get_max_item_id`

**Parameters:** None

Returns:
`int` of the largest item id from the url: `https://hacker-news.firebaseio.com/v0/maxitem.json`

- `get_item_by_id`

**Parameters:**

| Name  | Type | Required | Description                           | Default
| ----- | ---- | -------- | ------------------------------------- | -------
| `id`  | int  | Yes      | unique `Item` id of Hacker News story | None

Returns:
`Item` representing the Hacker News story with given `id` fetched
from url: `https://hacker-news.firebaseio.com/v0/item/<item_id>.json`

- `get_user_by_id`

**Parameters:**

| Name  | Type | Required | Description                           | Default
| ----- | ---- | -------- | ------------------------------------- | -------
| `id`  | int  | Yes      | unique `Item` id of Hacker News story | None

Returns:
`User` representing the Hacker News user with given `id` fetched
from url: `https://hacker-news.firebaseio.com/v0/user/<user_id>.json`

### Class: `Item`

Stories, comments, jobs, Ask HNs and even polls are just items. They're identified by their ids, which are unique integers.

Field | Description
------|------------
id | The item's unique id.
deleted | `true` if the item is deleted.
type | The type of item. One of "job", "story", "comment", "poll", or "pollopt".
by | The username of the item's author.
time | Creation date of the item, in [Unix Time](http://en.wikipedia.org/wiki/Unix_time).
text | The comment, story or poll text. HTML.
dead | `true` if the item is dead.
parent | The comment's parent: either another comment or the relevant story.
poll | The pollopt's associated poll.
kids | list of `Item` of this item's comments, in ranked display order.
url | The URL of the story.
score | The story's score, or the votes for a pollopt.
title | The title of the story, poll or job.
parts | A list of related pollopts, in display order.
descendants | In the case of stories or polls, the total comment count.

### Class: `User`

Users are identified by case-sensitive ids. Only users that have public activity (comments or story submissions) on the site are available through the API.

Field | Description
------|------------
**id** | The user's unique username. Case-sensitive. Required.
delay | Delay in minutes between a comment's creation and its visibility to other users.
**created** | Creation date of the user, in [Unix Time](http://en.wikipedia.org/wiki/Unix_time).
**karma** | The user's karma.
about | The user's optional self-description. HTML.
submitted | List of the user's stories, polls and comments.

## Screenshot

![Hacker News Client](/screenshots/hackernews-client-screenshot.png?raw=true "Bash shell running example.py script")

## Authors

* **Sameen Islam** - [samisnotinsane](https://github.com/samisnotinsane)

## License

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

## Acknowledgments

* Author of [haxor](https://github.com/avinassh/haxor) whose library inspired me to make my first Python library
* Author of [python-packaging](http://veekaybee.github.io/2017/09/26/python-packaging/) whose tutorial helped me get my head around the Python import system

repository: samisnotinsane/hackernews-client

gha_language: Python

repo_name: samisnotinsane/hackernews-client


text:
# RPS-Multiplayer
![GitHub followers](https://img.shields.io/github/followers/cl33per?style=social)
[![GitHub issues](https://img.shields.io/github/issues/cl33per/RPS-Multiplayer)](https://github.com/cl33per/RPS-Multiplayer/issues)
![GitHub](https://img.shields.io/github/license/cl33per/RPS-Multiplayer)
![GitHub top language](https://img.shields.io/github/languages/top/cl33per/RPS-Multiplayer)
![GitHub last commit](https://img.shields.io/github/last-commit/cl33per/RPS-Multiplayer)
### Summary
RPS-Multiplayer is a Multiplayer game of rocker paper scissors connecting to firebase. It logs the connections of each players session.

See the working game here:

https://cl33per.github.io/RPS-Multiplayer/

## Tech
ProjectI uses a couple different applications and libaries:

- [Firebase Database](https://firebase.google.com/products/firestore/)

- [Bootstrap 4](https://getbootstrap.com/docs/4.3/getting-started/introduction/)

- [Jquery](https://api.jquery.com/) / Javascript

## Bugs and feature requests

Have a bug or a feature request? [please open a new issue](https://github.com/cl33per/RPS-Multiplayer/issues/new)

## Copyright & license
The MIT License (MIT)
Copyright (c) 2011-2019 Twitter, Inc.
Copyright (c) 2011-2019 The Bootstrap Authors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

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

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


text:
# Drizzlepac

[![Build Status](https://dev.azure.com/spacetelescope/drizzlepac/_apis/build/status/spacetelescope.drizzlepac?branchName=master)](https://dev.azure.com/spacetelescope/drizzlepac/_build/latest?definitionId=2&branchName=master)
[![Build Status](https://ssbjenkins.stsci.edu/job/STScI/job/drizzlepac/job/master/badge/icon)](https://ssbjenkins.stsci.edu/job/STScI/job/drizzlepac/job/master/)
[![Documentation Status](https://readthedocs.org/projects/drizzlepac/badge/?version=latest)](http://drizzlepac.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/spacetelescope/drizzlepac/branch/master/graph/badge.svg)](https://codecov.io/gh/spacetelescope/drizzlepac)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3743274.svg)](https://doi.org/10.5281/zenodo.3743274)

Nightly regression test results are available only from within the STScI network at this time.
https://plwishmaster.stsci.edu:8081/job/RT/job/drizzlepac/

The use of this software on HST data is described at:

    http://drizzlepac.stsci.edu/

A complete description of the documented interfaces in the code itself
can be found at:

    http://drizzlepac.readthedocs.io

# Installation

## Conda (Recommended)

```bash
$ conda config --add channels http://ssb.stsci.edu/astroconda
$ conda create -n astroconda stsci
```

## From Source

### Clone this repository
```bash
$ git clone https://github.com/spacetelescope/drizzlepac
$ cd drizzlepac
```

### Build the documentation

*Note:* If you intend to use `drizzlepac`'s embedded help feature from within
an interactive `python` or `ipython` session, we recommend you do not skip
this step.

```bash
$ python setup.py build_sphinx
```

### Install drizzlepac

```bash
$ python setup.py install
```

##### SUPPORT for PIP Installation:
Installation tools are evolving to rely on commands such as `pip`
to build and install software.  This package can now be installed
using the following command:

```bash
$ pip install .
```
The option `--no-use-pep517` MAY be required in order to correctly build
the C extensions with `pip` versions up to 22.2, after commenting out
the `build-backend` from the `pyproject.toml` config file.

**Support for installing using `pip` is still evolving, so use of this
command is provided on an experimental basis for now.**

repository: spacetelescope/drizzlepac

repo_name: spacetelescope/drizzlepac


text:
# spring-data-rest-example
It's example for spring data rest with jpa, include CRUD and association.

I reference [oreilly rest example] [oreilly rest example] and modify entity to show all function for spring data rest.

Spring data maybe has bug or no instinct function for assiciation, I try fixed it and you can use Postman(chrome plugin) to
do all example. The Postman collection is dump on file 'postman-collection', you can import easy.

![postman image] (https://cloud.githubusercontent.com/assets/7590449/17837654/fd59a438-67ea-11e6-8b64-c814893b1984.png)

[oreilly rest example]: https://github.com/spring-projects/spring-data-book


text:
# Ripcord UI

A UI for the ripcord adventure game.

## Development Setup

* Install dependencies with `yarn`
* Start the express server with `node server.js`
* Start the react app with `yarn start`

repository: kryptx/ripcord-ui

repo_name: kryptx/ripcord-ui


text:
### Report Of Immediate Action Title
Pocket Website Wordpress stack update.
### Engineer (One Per Engineer)
Nelson Colón: Infra Engineer.
### Date(s)
04/27/2021
### Category
- [X] Infrastructure
- [ ] Protocol/Blockchain Dev
- [ ] App Solutions
- [ ] Quality Assurance
- [ ] N/A
### Contract
- [X] This process follows the Immediate Action Framework as discussed in the Pocket Network Corporation's `Organization Handbook`
- [ ] This process `DOES NOT` follow the Immediate Action Framework as discussed in the Pocket Network Corporation's `Organization Handbook`

If `DOES NOT` follow the Handbook's Immediate Action Framework, please describe in detail why below:
[Detailed Explanation]

## Report of Immediate Action
### Detailed Summary of executed Immediate Action
As per requeted by Valeria Benitez, from the Pocket Ecosystem team, I updated and upgraded the https://pokt.network website, who's currently running using the stack provided by Bitnami. In this RIA, I updated the stack of:
- Wordpress to version 5.7.1.
- PHP to version 8.0.3

### Evidence and Justification of the need for the Immediate Action:**
Per security measures, we should upgrade constantly and periodically every system that it's currently being used by us, always taking in mind that it's from a stable version and it doesn't conflict with other systems version that are in use in our environment.

### Timeline of the Immediate Action
04/27/2021 to 04/28/2021

### Survey
- [X] Steps `CAN/WILL` be taken to avoid this Immediate Action in the future. Explain in detail below:

This work was necessary as per security best practices.

- [ ] Steps `CANNOT/WILL NOT` be taken to avoid this Immediate Action in the future. Explain in detail below:

repository: jacklaing/organization

repo_name: jacklaing/organization


text:
# FAQ

## General

### I'm getting an error that `router` is not found?

This is a particular issue of using `vue-resource` that requires `Vue.router` to be set before the plugin is initialized.

### I've logged in successfully but it's not working after

Likely related to token issues with a valid token not being sent back. First steps are to fully verify that the token is indeed being sent back.

### Why is the token not being set?

By default the plugin will look for a token in `Authorization` header. This is controlled by one of the [auth](https://github.com/websanova/vue-auth/tree/master/drivers/auth) drivers. These are simple drivers that simple set and get a token. It's best to start debugging here if there are issues with tokens.

### How can I authenticate without using the `Authorization` header?

The token can be supplied anywhere in your app response. The provided [auth](https://github.com/websanova/vue-auth/tree/master/drivers/auth) drivers are common methods for authenticating users in single page apps. Simply view any of the [auth]https://github.com/websanova/vue-auth/tree/master/drivers/auth) drivers as a guide to write your own custom driver.

### My app has 2 or more fields required for authentication?

In this case write a custom [auth](https://github.com/websanova/vue-auth/tree/master/drivers/auth) and simply append the fields together using some kind of separator such as a pipe (`|`), semicolon (`;`), etc.

## Axios

### I only see `Error: Request failed with status code 400...` text when I print out the error?

The response from Axios is contained within the response object. You should try to `console(res.response)`.

### Why is the body param not sending my data?

Note that `vue-auth` simply forwards all the arguments into whatever http plugin/module you are using. So for `vue-axios` it will be a `data` parameter and for `vue-resource` it's a `body` parameter.

repository: Cediddi/vue-auth

repo_name: Cediddi/vue-auth


text:
---
jupyter:
  jupytext:
    formats: ipynb,md
    text_representation:
      extension: .md
      format_name: markdown
      format_version: '1.2'
      jupytext_version: 1.3.4
  kernelspec:
    display_name: Python 3
    language: python
    name: python3
---

```python
import numpy as np
import pandas as pd
pd.set_option('display.max_rows', 35)
import ZemaxGlass as zg
%load_ext autoreload
%autoreload 1
%aimport ZemaxGlass
```

```python
efl = 400.0  # mm, focal length of the optical design being considered
focal_ratio = 4.8
wv = np.array([460.0, 650.0, 825.0, 1100.0, 1650.0])  # nm, the wavelengths of interest, including e and C lines
wv_lo = wv.min()
wv_hi = wv.max()
temp_lo = -10.0  # deg C
temp_hi = +30.0  # deg C
delta_temp = temp_hi - temp_lo
i_wv_0 = 2  # The third wavelength is the reference/primary wavelength
n_wv = wv.size
wv_0 = wv[i_wv_0]
```

```python
# Read in the Ohara catalog and filter for preferred and standard glasses starting with S-
ohara_catalog = 'ohara_20200623'  # filter with S-
schott_catalog = 'schott_20180601'  # filter with N-
hikari_catalog = 'nikon-hikari_201911'  # no filter
# Pick one of the catalogs and read the data with relevant selection filters
pick_catalog = ohara_catalog
gls_lib = zg.ZemaxGlassLibrary(zg.agfdir,
                                     catalog=pick_catalog, glass_match='S-',
                                     wavemin=wv_lo, wavemax=wv_hi, degree=10, select_status=[0, 1])
gls_lib.abbreviate_cat_names()
# Calculate opto-thermal coefficients and add to the glass library
gls_lib.add_opto_thermal_coeff(temp_lo, temp_hi, wv_ref=wv_0)
# Filter out materials with extreme opto-thermal coefficients
```

```python
# Establish the glass combination problem
gc = zg.GlassCombo(wv, i_wv_0, [gls_lib], [3], [1.0], efl, temp_lo=-10.0, temp_hi=40.0)
```

```python
# Calculate a suitable Buchdahl alpha for this problem
gc.buchdahl_find_alpha(show_progress=True)
```

```python
print(f'Best fit mean Buchdahl alpha for this problem is {gc.buchdahl_alpha:7.5f}')
```

```python
# Calculate the Buchdahl dispersive power function coefficents eta
gc.buchdahl_fit_eta()
print(gc.eta_per_grp)
```

```python
# Set up the dask.distributed computing client
daclient = gc.dask_client_setup()
```

```python
display(daclient)
```

```python
%time result = gc.dask_run_de_albuquerque(daclient)
```

```python
# Eliminate combinations with large amounts of (absolute) optical power
result = result[result['f_1'] < 9.0]
# Select for small color aberration
result = result[result['f_2'] < 0.01]
# Select for small opto-thermal sensitivity
#result = result[np.abs(result['f_4']) < 0.2]
```

```python
# Sorting by f_2 is by color correction potential
result.sort_values(by='f_1').head(35)
```

```python
gc.dask_client_shutdown(daclient)
```

```python
gc.sum_abs_pow_limit = 8.0
```

```python

```

url: https://raw.githubusercontent.com/derekjgriffith/zemaxglass/e13d362ccb38288a9f31296bd5dbc0da9a6fc9b3/Notebooks/Selection of Glasses for a Triplet in Parallel using dask.distributed.md

repository: derekjgriffith/zemaxglass

repo_name: derekjgriffith/zemaxglass


text:
Guacamole "delegated" authentication plugin
===========================================

This plugin enables all the required connection parameters to be passed through the request to the authentication endpoint `/api/tokens` instead of retrieving them from some persistent data store.

Example:
```
$ curl --data protocol=rdp --data hostname=localhost --data port=3389 --data username=user --data password=password --data domain=active-directory-domain --data security=nla --data ignore-cert=true --data color-depth=24 --data width=1024 --data height=768 --data server-layout=en-us-qwerty  http://localhost:8000/guacamole-client/api/tokens
```

Once the authentication token is issued,  you can later use it in the Guacamole client without requiring for any additional interaction to the user.  This is useful when you want to authenticate the user on the server side and then pass the control to the user.

License
-------

```
Copyright (c) 2015 Open Collector, Inc.
Copyright (c) 2015 Moriyoshi Koizumi

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: moriyoshi/guacamole-auth-delegated

repo_name: moriyoshi/guacamole-auth-delegated


text:
![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)

## React-Portfolio
My challenge this week was to build a professional portfolio using **React.js**. I've built a portfolio once before using primarily HTML & CSS. The goal
of this challenge was to showcase my new skills while utilizing the tech industry's latest technology such as **React.js and Node.js**. My **React Portfolio**
is a **Single-Page Application** which consists of 4 main pages: **About, Contact, Resume, and Portfolio**. Users may change the displayed content as they
navigate through the **component tabs** that each render unique content without refreshing the entire application. There is also live **links** to my
social media platforms such as **Github, StackOverflow** as well as a **link to my downloadable resume**. Users may also contact me throught the **Contact**
page by entering their **name, email and message** into input boxes. In the **Portfolio** page, there are **content tiles** which each display **unique
projects** that i've worked on as well as links to the **Deployed Applications & Repositories**.

**Deployed: http://BriagasD98.github.io/react-portfolio**

## Table of Contents
  * [Deployment](#Deployment)
  * [Preview](#Preview)
  * [License](#License)
  * [Contributing](#Contributing)
  * [Questions](#Questions)

## Deployment
  To view the deployed **React Portfolio**, please click the following link:

  **Deployed: http://BriagasD98.github.io/react-portfolio**

## Preview
**Preview of my React Portfolio**
![Screenshot (74)](https://user-images.githubusercontent.com/83102464/135012346-e70bd074-0f77-4b8d-b39e-b4404a457f4d.png)

![Screenshot (75)](https://user-images.githubusercontent.com/83102464/135012363-ba546544-0fa7-4145-b333-0cacccbca1e9.png)
![Screenshot (80)](https://user-images.githubusercontent.com/83102464/135012391-fd9c30de-50bc-46b5-b917-e94df5d00dc8.png)

![Screenshot (78)](https://user-images.githubusercontent.com/83102464/135012414-6558d709-7b3c-4124-8299-3c2a28dabb8e.png)

![Screenshot (79)](https://user-images.githubusercontent.com/83102464/135012460-6cca48b1-17ab-4d22-9210-2b6126828da9.png)

## License
![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)
  For License information, visit:
  [MIT](https://opensource.org/licenses/MIT)

## Contributing
Contact me Via Email or Github for more information on how to contribute!

## Questions
If you have questions about the project, feel free to reach out to me via Github or Email:

  **My GitHub profile** is [BriagasD98](https://github.com/BriagasD98)

  My Email: [briagasdavid@yahoo.com](mailto:briagasdavid@yahoo.com).


text:
```
BOYCOTT on russia! Don't buy, sell, support - HELP TO STOP WAR!
«Русский военный корабль, иди на хуй!» (c) Ukrainian Frontier Guard

ATTENTION: This is a demo - use it as you wish. Reference is appriciated.
If you want to thank - buy me coffee: https://secure.wayforpay.com/donate/asperi
```

Q: In SwiftUI, is there a simple way to size the children with non-fixed size as a factor of remaining space available? (Flex Factor) (by Tiago Peres França)

A: In layout it is important to place needed containers. In the considered case there is two fixed UI elements so we can use that
to simplify layout and place `GeometryReader` only for three of them calculating only first flexible, because all others will
be known (because 2nd is defined, and 4th just should get *everything else*)

Tested with XCode 13.3 / iOS 15.4

![Screenshot 2022-04-16 at 10 44 50](https://user-images.githubusercontent.com/62171579/163666687-0d017094-2960-4175-b3ae-aea65fdb497c.png)

```
  // Color elements below is used for simplicity of demo, because they by-design automatically fill
  // available space, so we can exclude not important modifiers

  let fixed1: CGFloat = 100
  let fixed2: CGFloat = 140

  var body: some View {
    HStack(spacing: 0) {
      Color.red
        .frame(width: fixed1)  // << known fixed

      GeometryReader { gp in
        HStack (spacing: 0) {
          Color.green
              .frame(width: (gp.size.width - fixed2) * 2/3)  // << calculable !!
          Color.blue
            .frame(width: fixed2) // << known fixed
          Color.purple   // << fills remaining
        }
      }

    }
    .background(Color.gray)
    .frame(maxWidth: .infinity, maxHeight: 50)
  }
```

[Full test module is here](https://github.com/Asperi-Demo/4SwiftUI/blob/master/PlayOn_iOS/PlayOn_iOS/Findings/TestMixedHorizontalLayout.swift)

gha_language: Swift


text:
# Contibutions

Thanks for your interest. Before opening an issue or pull request please review these quick points:

- If you'd like to report a bug please reproduce it in [Tonic](https://tonicdev.com/npm/juice) and include the link in the issue
- Pull requests must have test coverage and pass on Travis
- Feature changes should have accompanying documentation updates

That's the main stuff, thanks!

repository: larrylzhao/igfood

repo_name: larrylzhao/igfood


text:
# Codellano Framework

Simple typescript framework based on [Laravel](https://laravel.com) Structure.

## Databases supported

- [mongodb](https://mongodb.com/)
- [redis](https://redis.io/)

## Instalation steps

```
 1. Clone this repository
 2. npm install
 3. build image: docker-compose build
 4. run it: docker-compose up -d
```

## License

This docker files is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

repository: paulocastellano/codellano-framework

repo_name: paulocastellano/codellano-framework


text:
# Yahoo
A golang based yahoo finance query driver to be used with the quote go lang package

The quote golang package can be found here: https://github.com/sckor/quote

# Usage
Use go get to download the source

```
go get github.com/sckor/yahoo
```

You can then run the example command:
```
go run src/github.com/sckor/yahoo/yahoo-quote/yahoo-quote.go
```

Output:
```
[{MSFT 42.86} {AAPL 128.0851}]
```

By default it will fetch quotes for MSFT and AAPL. If you run the command and provide a list of tickers after the command, it will
fetch the prices for those tickers. eg:

```
go run src/github.com/sckor/yahoo/yahoo-quote/yahoo-quote.go TSLA GOOG
```

Output:
```
[{TSLA 198.34} {GOOG 560.01}]
```

repository: sckor/yahoo

repo_name: sckor/yahoo


text:
---
layout: post
title: Ideation
date: 2014-11-18
---

During the ideation phase, the team created one use case from the three provided by the client. From this use case, we developed a set of features that would be required to perform all the use case's actions or tasks.

The team divided the feature set into two components: hardware and software. This enabled us to brainstorm potential implementations of the feature set separately. With hardware, we were able to come up with 3 to 10 potential implementations of each feature (e.g. a video camera could be a GoPro, webcam, camera on the Surface Pro or laptop). On the other hand, we found that the potential software implementations were highly constrained and there were few alternatives. Ultimately, there would only be one software implementation we could use.

After ideating for the software and hardware feature sets, we will be assessing and selecting the best design alternative.

repository: gordontang/mTRAC-site

repo_name: gordontang/mTRAC-site


text:
# DC / Baltimore Perl Workshop 2019

## A Look at FaaS for Perl

Featuring:

- [AWS Lambda](./lambda/README.md)
- [OpenFaaS](./openfaas/README.md)

Check out the README in each directory to get started with each.

### Support for Perl runtimes

| FaaS Solutions         | Can support Perl |
|------------------------|------------------|
| Apache OpenWhisk       | Maybe?           |
| AWS Lambda             | Yes              |
| Azure Functions        | No               |
| Fn Project             | Maybe?           |
| Google Cloud Functions | No               |
| OpenFaaS               | Yes              |

## Slides

https://docs.google.com/presentation/d/1rhOYthvPFhCzHoro5444FSoDPV0DqwHahBcQBXAfJR4/?usp=sharing

repository: dheffx/dcbpw-faas-for-perl

repo_name: dheffx/dcbpw-faas-for-perl


text:
## CPSR annotation resources

### Basic variant consequence annotation
  * [VEP v101](http://www.ensembl.org/info/docs/tools/vep/index.html) - Variant Effect Predictor ([GENCODE v35](https://www.gencodegenes.org/human/) as gene reference database (v19 for grch37))

###  *Insilico* predictions of effect of coding variants
  * [dBNSFP](https://sites.google.com/site/jpopgen/dbNSFP) - database of non-synonymous functional predictions (v4.1, June 2020)

###  Variant frequency databases
  * [gnomAD](http://exac.broadinstitute.org/) - germline variant frequencies exome-wide (r2.1, October 2018)
  * [dbSNP](http://www.ncbi.nlm.nih.gov/SNP/) - database of short genetic variants (build 153)
  * [Cancer Hotspots](http://cancerhotspots.org) - a resource for statistically significant mutations in cancer (2017)

### Variant databases of clinical utility
  * [ClinVar](http://www.ncbi.nlm.nih.gov/clinvar/) - database of clinically related variants (August 2020)
  * [CIViC](https://civicdb.org) - clinical interpretations of variants in cancer (September 20th 2020)

### Protein domains/functional features
  * [UniProt/SwissProt KnowledgeBase](http://www.uniprot.org) - resource on protein sequence and functional information (2020_04, August 2020)
  * [Pfam](http://pfam.xfam.org) - database of protein families and domains (v33, May 2020)

### Cancer gene knowledge bases
  * [CancerMine](http://bionlp.bcgsc.ca/cancermine/) - Literature-mined database of tumor suppressor genes/proto-oncogenes (v28, September 2020)
  * [Genomics England PanelApp](https://panelapp.genomicsengland.co.uk) - cancer phenotype panels as of September 20th 2020

### Phenotype ontologies
  * [UMLS/MedGen](https://www.ncbi.nlm.nih.gov/medgen/)
  * [Disease Ontology](https://disease-ontology.org/)
  * [Experimental Factor Ontology](https://github.com/EBISPOT/efo)

repository: vladsavelyev/cpsr

repo_name: vladsavelyev/cpsr


text:
# Contribution Guidelines

Please ensure that your pull request adheres to the following guidelines:

- Search previous suggestions before making a new one, as yours may be a duplicate.
- Make sure your contribution is useful and relevant before submitting. That implies it has enough content and every item has a good succinct description.
- Make an individual pull request for each suggestion.
- Use the following format: `- [Repository Name](link-to-repository-label) _(label: beginner-friendly-label-in-the-repository)_ <br> Description`
- Example link formatting: `- [awesome-for-beginners](https://github.com/MunGell/awesome-for-beginners/labels/good-first-contribution) _(label: good-first-contribution)_ <br> A list of awesome beginners-friendly projects.`
- Link additions should be added to the bottom of the relevant category.
- New categories or improvements to the existing categorization are welcome.
- Check your spelling and grammar.
- Make sure your text editor is set to remove trailing whitespace.
- The pull request and commit should be given a meaningful title.
- Ensure that you describe your pull request.
- If the label does not clearly state it's "beginner friendly" purpose, please make sure to confirm with the maintainer that it is used for such issues. Please include the link to where the maintainer approves it in the PR. See examples below:
  - Repository called "HornsAndHoovesJs" has label `good-first-contribution`. This PR does not need to be confirmed with the maintainer and can be merged straight away.
  - Repository called "bicycle-wheels-php" has label `easy`. This PR must be confirmed with the maintainer of "bicycle-wheels-php". The issue link where the maintainer confirms that label `easy` is used in the repository for beginner-friendly tasks has to be provided in the PR description.
- Maintainer confirmation is also required in case repository has more than one beginner-friendly-like label (e.g. `low-hanging-fruit` and `up-for-grabs`).
- The contributed repository must be maintained, have an active community to be able to help newcomers and have issues with an appropriate label.
- Links must be pointing directly to the repository, no tracking links allowed. This list is not for advertising purposes.

Thank you for your suggestions!

(This file was partially copied from [awesome-speaking](https://github.com/matteofigus/awesome-speaking))


text:
# grunt-fixmyjs

> Automatically fix silly lint errors.

## Getting Started
_If you haven't used [grunt][] before, be sure to check out the [Getting Started][] guide._

From the same directory as your project's [Gruntfile][Getting Started] and [package.json][], install this plugin with the following command:

```bash
npm install grunt-fixmyjs --save-dev
```

Once that's done, add this line to your project's Gruntfile:

```js
grunt.loadNpmTasks('grunt-fixmyjs');
```

If the plugin has been installed correctly, running `grunt --help` at the command line should list the newly-installed plugin's task or tasks. In addition, the plugin should be listed in package.json as a `devDependency`, which ensures that it will be installed whenever the `npm install` command is run.

[grunt]: http://gruntjs.com/
[Getting Started]: https://github.com/gruntjs/grunt/blob/devel/docs/getting_started.md
[package.json]: https://npmjs.org/doc/json.html

## The "fixmyjs" task

### Overview
In your project's Gruntfile, add a section named `fixmyjs` to the data object passed into `grunt.initConfig()`.

```js
grunt.initConfig({
  fixmyjs: {
    options: {
      // Task-specific options go here.
    },
    your_target: {
      // Target-specific file lists and/or options go here.
    }
  };
});
```

### Options

#### config
Type: `Object`
Default value: `.jshintrc`

Load your own config file.

#### diff
Type: `Boolean`
Default value: `False`

Similar to dry-run

#### legacy
Type: `Boolean`
Default value: `False`

Use legacy fixmyjs

#### indent
Type: `String`
Default value: `spaces`
Options: `tabs|spaces`

Your indentation preference

#### patch
Type: `Boolean`
Default value: `False`

Output a patch file to stdout

#### dry
Type: `Boolean`
Default value: `False`

Performs a dry-run and shows you a diff

#### silent
Type: `Boolean`
Default value: `False`

A useless option.

## Currently supports

* `asi` Missing semicolons.
* `camelcase|snakecase` Enforces camelCase and snake_case convention.
* `curly` Adds curly braces to statements.
* `debugger` Removes debugger statements
* `plusplus` Converts plusplus and minusminus.
* `quotmark` Enforces single and double quote style.
* Adds parenthesis when invoking a constructor
* Adds the radix parameter to parseInt
* Convert to use array literal and object literal
* Dot notation conversion
* Extra trailing commas
* Leading and trailing zeroes on decimals.
* Missing whitespaces.
* Mixed spaces/tabs
* Proper indentation
* Removes deletion of variables
* Removes `undefined` when assigning to variables
* Removes unnecessary semicolons
* Uses isNaN function rather than comparing to NaN

### Usage Examples

```js
grunt.initConfig({
  fixmyjs: {
    options: {
      jshintrc: '.jshintrc',
      indent: 'spaces'
    },
    test: {
      files: [
        {expand: true, cwd: 'test/fixtures', src: ['**/*.js'], dest: 'test/actual/', ext: '.js'}
      ]
    }
  }
});
```

## Related projects

* [grunt-prettify](https://github.com/jonschlinkert/grunt-prettify)
* [grunt-refactor](https://github.com/jonschlinkert/grunt-refactor)
* [grunt-js2coffee](https://github.com/jonschlinkert/grunt-js2coffee)

## Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code using [grunt][].

## Author

* [Jon Schlinkert](https://github.com/jonschlinkert)

## Release History

 * 2013-08-17   v0.1.0   First commit.


text:
# broadcastCrypt
Experimentally finds key assignments for broadcast encryption schemes.

If you want to run this yourself, there are a few changes in code you need to make. You have to specify how many cores your computer has, so that it can properly multithread.

All data is in the \data folder in the format data[n,s,w].txt. Each line contains a 2D array of key assignments, followed by a comma, followed by the maximum bandwidth required for the scheme. Example:
[[0, 1][0, 2][1, 2]], 2

There is also a summary.txt file which has quadruplets of n, s, w, and b. Example:
n=3 s=2 w=4 b=2

I might want to change the formatting on these to make it a csv or something. The first one seems harder because of nesting arrays.

repository: jordan-schneider/broadcastCrypt

repo_name: jordan-schneider/broadcastCrypt


text:
Yet another Platform as a Service
=================================

Image running a [yapaas][] daemon. This container will listen on a port
(default 13987) and participate in a yaPaaS cloud.

To update, grab the latest binary and copy it into this directory, before
`docker build`ing. This'll happen automatically anyway whenever a new version
of yapaas is released.

[yapaas]: https://bjjb.github.io/yapaas

repository: bjjb/dockerfiles

repo_name: bjjb/dockerfiles


text:
<div itemscope itemtype="http://developers.google.com/ReferenceObject">
<meta itemprop="name" content="tff.framework.transform_type_postorder" />
<meta itemprop="path" content="Stable" />
</div>

# tff.framework.transform_type_postorder

Walks type tree of `type_signature` postorder, calling `transform_fn`.

```python
tff.framework.transform_type_postorder(
    type_signature,
    transform_fn
)
```

Defined in
[`python/core/impl/type_utils.py`](http://github.com/tensorflow/federated/tree/master/tensorflow_federated/python/core/impl/type_utils.py).

<!-- Placeholder for "Used in" -->

#### Args:

*   <b>`type_signature`</b>: Instance of `computation_types.Type` to transform
    recursively.
*   <b>`transform_fn`</b>: Transformation function to apply to each node in the
    type tree of `type_signature`. Must be instance of Python function type.

#### Returns:

A possibly transformed version of `type_signature`, with each node in its tree
the result of applying `transform_fn` to the corresponding node in
`type_signature`.

#### Raises:

*   <b>`TypeError`</b>: If the types don't match the specification above.