text:
## Intro to Git and Github for Beginners

This tutorial guides you through the first steps to find your way on GitHub.
Follow the steps below to get comfortable making changes to the code base, opening up a pull request (PR), and merging code into the primary branch. Any important git and GitHub terms are in bold with links to the official git reference materials.

 Install git and create a GitHub account

 Create a local git repository

 Add a new file to the repo

 Add a file to the staging environment

 Create a commit

 Create a new branch

 Create a new repository on GitHub

 Push a branch to GitHub

 Create a Pull Request (PR)

 Merge a PR

 Get changes on GitHub back to your computer

Bask in your git glory

1. Install git and create a GitHub account

To start, (a) install git, and (b) create a free Github account.

(a) Installing git

For this tutorial, we recommend to use the command line:

 For Windows users, ...

 For Mac users, use Finder to search for Terminal in the Applications.

 For Linux users,  ...

The instructions to install git are documented here.

(b) Free GitHub account

Once you have installed git on your computer, create a GitHub account here.
(GitHub has special accounts for academic researchers.)

2. Create a local git repository

When you want to create a new project -- ideally when you are at the start of a research project -- on your local machine (that is, your personal computer), you first have to create a new repository (or often, 'repo', for short).
The instructions how to create a new repo can be found here.

To begin, open up a terminal and go to the place on your local machine where you want to place your project.
To change directories, you use the cd command.
For example, if you have a 'projects' folder on your desktop, you do something like:

```shell
joetheplumber:Desktop joetheplumber$ cd ~/Desktop
joetheplumber:Desktop joetheplumber$ mkdir myproject
joetheplumber:Desktop joetheplumber$ cd myproject/
```

To connect (initialize) a git repository in the root of the folder, run the git init command:

```shell
joetheplumber:myproject joetheplumber$ git init
Initialized empty Git repository in /Users/joetheplumber/Desktop/myproject/.git/
```

3. Add a new file to the repo

When your project on your local machine is connected to the online git repository, you can start adding files to your project.
This can be done using any text editor you like, or by running a touch command:

```shell
joetheplumber:myproject mnelson$ touch mytext.txt
joetheplumber:myproject joetheplumber$ ls
mytext.txt
```

When you add or modify files in a folder containing a git repo, git will notice that changes have been made inside the repo.
But, git will not  officially keep track of the file.
That is,  git will not save it,, or more precisely put it in a commit -- more about commits next -- unless you explicitly tell git to keep track of your changes.

After creating the new file, you can use the git status command to see which files git know exist.

```shell
joetheplumber:myproject joetheplumber$ git status
On branch master

Initial commit

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	mytext.txt

nothing added to commit but untracked files present (use "git add" to track)
```
What this basically says is, "Hey, we noticed you created a new file called "mytext.txt", but unless you use the git add command we aren't going to do anything with it."

If you want git to save the changes you made to your repo, you need the  git add [filename] command (see Step 3 below).
This process is called the staging environment.
This is also called 'staging', the new preferred term for this, but you can also see it referred to as the 'index'.
Once you've used the git add command to add all the files you want to the staging environment, you can then tell git to package them into a commit using the git commit command.
A commit is a record of what files you have changed since the last time you made a commit.
Essentially, you make changes to your repo (for example, adding a file or modifying one) and then tell git to put those files into a commit.
Commits make up the essence of your project and allow you to go back to the state of a project at any point.

4. Add a file to the staging environment

Add a file to the staging environment using the git add command.

If you rerun the git status command, you will see that git has added the file to the staging environment (notice the "Changes to be committed" line).

```shell
joetheplumber:myproject joetheplumber$ git status
On branch master

Initial commit

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

	new file:   mytext.txt
```

To reiterate, the file has not yet been added to a commit, but it's about to be.

5. Create a commit

It's time to create your first commit!

[master (root-commit) b345d9a] This is my first commit!
 1 file changed, 1 insertion(+)
 create mode 100644 mytext.txt
```

The message at the end of the commit should be something related to what the commit contains - maybe it's a new feature, maybe it's a bug fix, maybe it's just fixing a typo.
Don't put a message like "<em>asdfadsf</em>" or "<em>foobar</em>".
That makes the other people who see your commit sad.
Very, very, sad.

<h3 id="step6">6. Create a new branch</h3>

What if you want to try out some code, and you do not want to make changes to the main project, until you know the new code is running?
This is where <a href="https://git-scm.com/docs/git-branch" target="_blank"><code>git branch</code></a> come in.

Branches allow you to move back and forth between 'states' of a project. For instance, if you want to add a new page to your website you can create a new branch just for that page without affecting the main part of the project.
Once you're done with the page, you can <a href="https://git-scm.com/docs/git-merge" target="_blank">merge</a> your changes from your branch into the primary branch.
When you create a new branch, Git keeps track of which commit your branch 'branched' off of, so it knows the history behind all the files.

Let's say you are on the primary branch and want to create a new branch to develop your web page.
Here's what you'll do: <a href="https://git-scm.com/docs/git-checkout" target="_blank"><code>Run git checkout -b [my branch name]</code></a>. This command will automatically create a new branch and then 'check you out' on it, meaning git will move you to that branch, off of the primary (master) branch.

After running the above command, you can use the <a href="https://git-scm.com/docs/git-branch" target="_blank"><code>git branch</code></a> command to confirm that your branch was created:

```shell
joetheplumber:myproject joetheplumber$ git branch
  master
* my-new-branch
```

The branch name with the asterisk next to it indicates which branch you're pointed to at that given time.

Now, if you switch back to the primary branch and make some more commits, your new branch won't see any of those changes until you <a href="https://git-scm.com/docs/git-merge" target="_blank">merge</a> those changes onto your new branch.

<h3 id="step7">7. Create a new repository on GitHub</h3>

If you only want to keep track of your code locally, you don't need to use GitHub. But if you want to work with a team, you can use GitHub to collaboratively modify the project's code.

To create a new repo on GitHub, log in and go to the GitHub home page. You should see a green '+ New repository' button:

[add screenshot via ccs github]

After clicking the button, GitHub will ask you to name your repo and provide a brief description:

[add screenshot via ccs github]

When you're done filling out the information, press the 'Create repository' button to make your new repo.

GitHub will ask if you want to create a new repo from scratch or if you want to add a repo you have created locally.
In this case, since we've already created a new repo locally, we want to push that onto GitHub so follow the <strong>'....or push an existing repository from the command line'</strong> section:

```shell
joetheplumber:myproject joetheplumber$ git remote add origin https://github.com/ccs-amsterdam/mynewrepository.git
joetheplumber:joetheplumber joetheplumber$ git push -u origin master
Counting objects: 3, done.
Writing objects: 100% (3/3), 263 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/ccs-amsterdam/mynewrepository.git
 * [new branch]      master -> master
Branch master set up to track remote branch master from origin.
```

(You'll want to change the URL in the first command line to what GitHub lists in this section since your GitHub username and repo name are different.)

<h3 id="step8">8. Push a branch to GitHub</h3>
Now we will <a href="https://git-scm.com/docs/git-push" target="_blank">push</a> the commit in your branch to your new GitHub repo.
This allows other people to see the changes you've made. If they're approved by the repository's owner, the changes can then be merged into the primary branch.

To push changes onto a new branch on GitHub, you'll want to run <code>git push origin yourbranchname</code>. GitHub will automatically create the branch for you on the remote repository:

```shell
joetheplumber:myproject joetheplumber$ git push origin my-new-branch
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 313 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
To https://github.com/ccs-amsterdam/mynewrepository.git
 * [new branch]      my-new-branch -> my-new-branch
```

You might be wondering what that "origin" word means in the command above.
What happens is that when you clone a remote repository to your local machine, git creates an <strong>alias</strong> for you.
In nearly all cases this alias is called "<a href="https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes" target="_blank">origin</a>."
It's essentially shorthand for the remote repository's URL.
So, to push your changes to the remote repository, you could've used either the command: <code>git push git@github.com:git/git.git yourbranchname or git push origin yourbranchname</code>

(If this is your first time using GitHub locally, it might prompt you to log in with your GitHub username and password.)

If you refresh the GitHub page, you will see note saying a branch with your name has just been pushed into the repository.
You can also click the 'branches' link to see your branch listed there.

[add screenshot via ccs github]

Now click the green button in the screenshot above. We are going to make a <strong>pull request</strong>!

<h3 id="step9">9. Create a Pull Request (PR)</h3>

A pull request (or PR) is a way to alert a repo's owners that you want to make some changes to their code. It allows them to review the code and make sure it looks good before putting your changes on the primary branch.

This is what the PR page looks like before you've submitted it:

[add screenshot via ccs github]

And this is what it looks like once you've submitted the PR request:

[add screenshot via ccs github]

You might see a big green button at the bottom that says 'Merge pull request'. Clicking this means you'll merge your changes into the primary branch.

Note that this button won't always be green.
In some cases it'll be grey, which means you're faced with a <strong>merge conflict</strong>.
This is when there is a change in one file that conflicts with a change in another file and git can't figure out which version to use.
You'll have to manually go in and tell git which version to use.

Sometimes you'll be a co-owner or the sole owner of a repo, in which case you may not need to create a PR to merge your changes. However, it's still a good idea to make one so you can keep a more complete history of your updates and to make sure you always create a new branch when making changes.

<h3 id="step10">10. Merge a PR</h3>
Go ahead and click the green 'Merge pull request' button. This will merge your changes into the primary branch.

[add screenshot via ccs github]

When you're done, I recommend deleting your branch (too many branches can become messy), so hit that grey 'Delete branch' button as well.

You can double check that your commits were merged by clicking on the 'Commits' link on the first page of your new repo.

[add screenshot via ccs github]

This will show you a list of all the commits in that branch. You can see the one I just merged right up top (Merge pull request \#2).

[add screenshot via ccs github]

You can also see the <a href="https://git-scm.com/docs/git-hash-object" target="_blank">hash code</a> of the commit on the right hand side. A hash code is a unique identifier for that specific commit. It's useful for referring to specific commits and when undoing changes (use the <a href="https://git-scm.com/docs/git-revert" target="_blank"><code>git revert</a> [hash code number]</code> command to backtrack).

<h3 id="step11">11. Get changes on GitHub back to your computer</h3>
Right now, the repo on GitHub looks a little different than what you have on your local machine.
For example, the commit you made in your branch and merged into the primary branch doesn't exist in the primary branch on your local machine.

In order to get the most recent changes that you or others have merged on GitHub, use the <code>git pull origin master</code> command (when working on the primary branch).

```shell
joetheplumber:myproject joetheplumber$ git pull origin master
remote: Counting objects: 1, done.
remote: Total 1 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (1/1), done.
From https://github.com/ccs-amsterdam/mynewrepository
 * branch            master     -> FETCH_HEAD
   b345d9a..5381b7c  master     -> origin/master
Merge made by the 'recursive' strategy.
 mytext.txt | 1 +
 1 file changed, 1 insertion(+)
```

This shows you all the files that have changed and how they've changed.

Now we can use the <a href="https://git-scm.com/docs/git-log" target="_blank"><code>git log</code></a> command again to see all new commits.

(You may need to switch branches back to the primary branch. You can do that using the <code>git checkout master</code> command.)

```shell
joetheplumber:myproject joetheplumber$ git log
commit 3e270876db0e5ffd3e9bfc5edede89b64b83812c
Merge: 4f1cb17 5381b7c
Author: Joe the Plumber<EMAIL_ADDRESS>Date:   Fri Sep 11 17:48:11 2015 -0400

    Merge branch 'master' of https://github.com/ccs-amsterdam/mynewrepository

commit 4f1cb1798b6e6890da797f98383e6337df577c2a
Author: Joe the Plumber<EMAIL_ADDRESS>Date:   Fri Sep 11 17:48:00 2015 -0400

    added a new file

commit 5381b7c53212ca92151c743b4ed7dde07d9be3ce
Merge: b345d9a 1e8dc08
Author: Joe the Plumber<EMAIL_ADDRESS>Date:   Fri Sep 11 17:43:22 2015 -0400

    Merge pull request \#2 from ccs-amsterdam/my-newbranch

    Added some more text to my file

commit 1e8dc0830b4db8c93efd80479ea886264768520c
Author: Joe the Plumber<EMAIL_ADDRESS>Date:   Fri Sep 11 17:06:05 2015 -0400

    Added some more text to my file

commit b345d9a25353037afdeaa9fcaf9f330effd157f1
Author: Joe the Plumber<EMAIL_ADDRESS>Date:   Thu Sep 10 17:42:15 2015 -0400

    This is my first commit!
```

12. Bask in your git glory

You've successfully made a PR and merged your code to the primary branch. Congratulations! If you'd like to dive a little deeper, check out the files in this Git101 folder for even more tips and tricks on using git and GitHub.

### Reference
This tutorial is adapted from the tutorial developed by <Meghan Nelson

repository: ccs-amsterdam/compendium-checklist

repo_name: ccs-amsterdam/compendium-checklist


text:
# Hn-Writer
n-Directional H4-Writer

## General Usage
Hn-Writer speeds up text input for controllers by replacing the common (but inefficient) "visual keyboard" with a highly-efficient n-directional keyboard.

This is accomplished by reducing button-presses (or joystick movements) to a theoretical minimum with an n-ary Huffman coding. Your job is to map controller input to an enum `E` with `n` values and pass that to `HnWriter::walk`. `HnWriter` then uses this value to navigate an n-ary tree. If a leaf is navigated to, the tree rewinds and adds the node's content (e.g. the letter `a`) to a running buffer. You can get the current content of the buffer with `HnWriter::getContent`. For display purposes, you can get a `Map<E, String>` of directions and associated content lists with `HnWriter::getContentList`.

### Building the HnWriter

```Java
// Build key indexer -> enum map.
Map<String, TestEnum> contentEnumMap = new HashMap<String, TestEnum>();
contentEnumMap.put("U", TestEnum.UP);
contentEnumMap.put("D", TestEnum.DOWN);
contentEnumMap.put("L", TestEnum.LEFT);
contentEnumMap.put("R", TestEnum.RIGHT);

// Get flat JSON adjacency list source file.
File sourceFile = new File("path/to/file");

// Construct builder that will turn the JSON file to an EnumTree.
EnumTreeBuilder<TestEnum> builder = new FlatJSONTreeBuilder<TestEnum>(
    sourceFile,
    contentEnumMap,
    TestEnum.class
);

// Construct writer.
writer = new HnWriter<TestEnum>(builder);
```

```Java
enum TestEnum {
    UP,
    DOWN,
    LEFT,
    RIGHT
}
```

### Trying some sequences.

```Java
// Input sequence "hi"
writer.walk(TestEnum.UP);
writer.walk(TestEnum.LEFT); // h
writer.walk(TestEnum.UP);
writer.walk(TestEnum.DOWN); // i
// out: "hi"
System.out.println(writer.getString());

// Input newline "\n"
// This will "confirm" the text, adding it to the history and
// clearing current string so you can input a new sequence.
writer.walk(TestEnum.LEFT);
writer.walk(TestEnum.UP);   // \n
// out: ""
System.out.println(writer.getString());
// out: "hi"
System.out.println(writer.getHistory(0));
```

## Current task list
- Create a builder that will automagically make a k-ary Huffman-coded tree.
- Return more detailed result from `HnWriter::getContentList`
- More error checking: missing backspace/enter key, missing alphanumerics, leaves that don't contain text, etc.
- Should be able to provide callback func that is async invoked after newline is entered.
- Other callbacks (backspace for error-logging?).

## DIY
If you want to make your own coding (e.g. H4 + diagonals, modified H4, etc.), here's what to do:

1. Create a file containing the coding to be used. Currently this is done with a flat JSON adjacency list, where each entry is structured as `"key": "valueString"`, where `key` is the key to write, and `valueString` is a sequence of single-character "key indexers". There should be a maximum of `n` unique key indexers in the entire file.
2. Create an enum `E` with `n` values.
3. Create a `Map<String, E>` that maps every value in `E` to one of the `n` key indexers.
4. Pass all of this to a class extending `EnumTreeBuilder<E>`. For a flat JSON adjacency list, `ca.zach_bright.FlatJSONTreeBuilder<E>` will work perfectly.
5. Instantiate an `HnWriter<E>` with the `EnumTreeBuilder<E>`.
6. Proceed as normal.

## Theory
The H4-Writer is an input method that lets users type with just four buttons. Essentially, each key on the keyboard is given a minimized
input sequence based on its usage frequency, producing a 4-ary Huffman coding. Each value (0, 1, 2, 3) in the coding is then assigned a button on the input device. Inputting a sequence of button presses then results in writing the chosen key to the screen. To allow for error correction and capitalization a shift, capslock, and easily-accessable backspace key are provided as well. See MacKenzie et al. (2011) (http://www.yorku.ca/mack/uist2011.html) for more information.

I and two other students (https://github.com/nnguyen259 and https://github.com/LucasJPond) created an implementation of the original H4-Writer concept for the purposes of comparing it to a generic controller input method, which we called "soft keyboard". We used a 4-ary tree to represent the key space, where each node contained either a key string or up to four children nodes, indexed with an EnumMap. Buttons from the controller were converted to an enum (UP, DOWN, LEFT, RIGHT) and passed to the tree. See https://github.com/zach-bright/CS4065-Project for details.

This project basically takes the tree system from https://github.com/zach-bright/CS4065-Project and abstracts it to work with any n-ary coding. Thus given an enum `E`, each node contains either a key string or up to `n` children nodes indexed by an `EnumMap<E, Node>`.

license: MIT

repository: zach-bright/hn-writer

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: zach-bright/hn-writer


text:
thank you for listening to my talk today
because I know that you'd all rather be
having sex the average healthy person
thinks about sex every day did you know
that one reason that men and women
involved and exist is to have sex and
we're not the only ones thinking about
it but while you're lying in bed next to
your partner sweaty and exhausted
wrapped in red satin sheets listening to
Kenny G have you ever pondered why
fundamentally sex is how mums and dads
contribute their genes to their
offspring so for most of the 19,000
genes embedded in our chromosomes we
have two copies one that we inherit from
our mom and one that we inherit from our
dad this is the recipe for life but why
does the recipe call for two helpings of
most genes one reason is that it's
always good to have a backup if one gene
copy has a mutation the other healthy
copy can compensate and we all have some
intuition for this because it's common
knowledge that you shouldn't marry and
have children with your sister or
brother no matter how wonderful they may
be people who are closely related to
share many of the same mutations in
their genes and so if they have kids
together the kids have a higher risk for
having the same mutation in both copies
no healthy
copy and so they have a higher risk for
developing a genetic disorder so one
reason that we have sex is to mix the
genes from different and ideally
unrelated individuals but that's not the
whole story
in the 1980s scientists learned how to
take all the fun out of making babies at
least for mice when the sperm meets the
egg it forms a zygote that contains the
set of genes you get from mom and the
set of genes you get from dad and the
scientists were working in the lab and
they developed these tiny needles and
they went into the zygote and they
sucked out the genes that came from the
dad and they injected in a second copy
of genes from mum so the embryos
effectively had two mothers no father
involved and they also engineered the
opposite situation where they had
embryos that had two sets of genes from
dad and no mother involved what do you
think happened
they died even though they had the
normal set of gene copies only embryos
that were engineered with a set of gene
copies from mom and a set of gene copies
from dad generated mice that survived
and the experiment revealed that the
genes we get from mom and dad are
somehow different they're not just
backup copies for each other the
difference turned out to involve a
special kind of gene in our genome
called imprinted genes now imprinted
genes are distinguished by the fact that
moms and dads stick chemical marks to
them in the egg and the sperm and those
chemical marks are inherited by the kids
and they silence the genes in the kid
but mums and dads put those marks on
different genes and so as a consequence
some genes silenced the copy from dad
and Express the copy from mom and the
kids and other genes silenced the copy
from mom but expressed the copy from dad
you may be deeply disturbed by the idea
that your parents sent you secret
messages that are stuck to your genes
but I'm just getting started
the scientists again engineered cells
with genes from two moms and cells with
genes from two dads and they mix them
together with normal cells so that the
embryos would live longer and what they
discovered was amazing the embryos with
cells with two sets of genes from mom
developed small bodies but very large
brains
and the embryos that were engineered
with cells that end that had a set of
genes from only dads had the exact
opposite phenotype they had large bodies
and relatively small brains so you may
not be surprised by this but what it
revealed is that the imprinted genes we
get from mom and dad have very different
effects on offspring brain and body
development so mom and dad moms and dads
send us different messages through these
imprinted genes but while imported genes
are fascinating they're also rare only
about 1% of the 19,000 genes in our
genome are imprinted and the researchers
in my lab were left with the question
what's the story with the other 99% of
our genes do they have two copies just
to have a backup is that the whole story
is it time to roll over turn out the
light and go to sleep not yet and this
part of the talk is complicated but you
know it's not the kamasutra
when the genes in our DNA are expressed
they make a molecule called RNA RNA
makes protein and proteins build our
cells we can measure RNA sometimes when
our genes are activated they make a lot
of RNA and sometimes they make just a
little now imagine that we clone a whole
bunch of nerds
and we dissect out a piece of brain
tissue from each nerd and measure the
activity of the genes in that brain
tissue for given gene and some
individuals each activity level will be
high in others it will be low there will
be just this natural variation across
different individuals because of natural
variation in their physiology and
variation and how we dissected out that
piece of tissue but now we drill down to
the level of the mum and dad's gene
copies and we expect that the two copies
will go up and down together in their
activity because they're just backup
copies of one another expressed and
regulated in the exact same way but what
if we discover genes where that's not
the case and they express the two copies
differently well that would exceed are
not just backup copies of each other
that maybe they're doing different
things so we did this experiment for
each of the 19,000 genes in the genome
in mice and we found genes that express
mum and dad's copy the same way they
were highly correlated like this gene as
though they're acting as backup copies
for each other but we also discovered
hundreds of genes where that was not the
case like this gene a door to B when
mom's copy increases its activity dad's
copy decreases its activity they're
negatively correlated acting
antagonistically to each other clearly
doing different things and the story got
even more interesting when we started to
measure these things at different ages
in the adult brain ten percent of genes
expressed mom and dad's gene copies
differently but in the developing
newborn brain over eighty five percent
of genes expressed the two copies
differently
it was as though each gene copy had its
own unique role to play in building the
developing brain holy crap
there was no time left for sex we had to
like get into the lab and do some
serious experiments because this could
really change how we think about how our
genes make us who we are over the past
several decades we have developed new
technologies that can routinely sequence
our genomes and analyze our genes and
we've learned a whole bunch of
surprising things we've learned that all
of us have bonafide disease-causing
mutations in our genome about 400
damaging mutations on average to lethal
mutations but I feel fine and you guys
all look great
so for reasons that we don't fully
understand some of us get sick and some
of us don't the other thing that we've
learned is that the mutations in our
genes that influence our risk for
disease are typically present in just
one gene copy not both
for example paternal age has emerged as
an important risk factor for a lot of
different disorders like autism and one
reason is that fathers are constantly
generating new sperm and they accumulate
more and more mutations in the genes in
the sperm as they get older and older
about two new mutations per year and
those mutations are inherited by the
kids in their dads gene copies the mom's
copies should act as a backup but we've
just learned that in many cases the mom
and dad copies are expressed differently
so how does this actually play out we
wanted to know and so we engineered mice
with a mutated gene copy and a healthy
gene copy and we looked at how they're
expressed in the brain cells of the lab
ones we discovered cells that Express
both the healthy copy and the mutated
copy
kind of like we expected so there's a
backup healthy copy there but we also
discovered cells that were only
expressing the healthy copy which was
very surprising but more alarmingly we
found cells that only expressed the
mutated gene copy the cells that
preferentially expressed mutated gene
copies contribute to our risk for
disease if they do this paints a very
different picture of disease but we
don't know right now it's just an idea
and there are a whole bunch of questions
that remain most of what I've talked
about we did in lab mice but you may be
wondering what's happening in you you
may be wondering about how your parents
genes are expressed in you and if you
are a parent then maybe you're thinking
about how your genes are expressed in
your kids maybe they have really
annoying habits like their father and
now you're thinking they must express a
lot of his gene copies we also wanted to
know the answer to this and so we
developed a staining method that we
could use in postmortem human brain
tissue to look at the activity of the
two copies we get from mom and dad the
staining method reveals the individual
brain cells in blue and it reveals the
activity of the two copies of a gene in
red we can't tell which copy is mutated
or healthy yet and we can't top kill we
can't tell which one comes from mom and
which one comes from dad but we can see
for each cell whether it's expressing
both copies equally or differently we
found genes like this one that expresses
both the mom and the dads copy equally
in human brain cells so there's a back
up copy there but we also discovered
genes like these ones
Huntington which is linked to
Huntington's disease and a gene called
death one that's linked to autism they
are clearly expressing there are two
copies differently and we found brain
cells that have only one active gene
copy so like mice we also frequently
express our mom and dad's gene copies
differently and this means we may not
fully understand why we have sex and
contribute to copies of most genes to
our kids research over the past several
decades has taught us an incredible
amount about how our genes make us who
we are and by gaining a deeper a deeper
understanding of our genes or gaining a
deeper understanding of disease we're
learning how to make better therapies
better medicines but there are lots of
mysteries that remain we think that
we've discovered something fundamentally
new by studying the activity of our
genes at the level of the two copies we
get from mom and dad and we were
surprised to find that there are genes
that we know caused disease and people
that express their two copies
differently we found cells that
frequently Express mom and dad's copies
differently mutated and healthy gene
copies differently why do these effects
play some special role in shaping the
function of our brain do they shape our
risks for disease we feel like explorers
on the edge of a new frontier and we're
really excited to find out what we're
going to learn we may discover that your
parents always have the last word
thank you
[Applause]

repository: prewittdavon/TEDVis

gha_language: Python

gha_license_id: MIT

repo_name: prewittdavon/TEDVis


text:
# Take the Scenic Route
Implemention of [Take the Scenic Route: Improving Generalization in Vision-and-Language Navigation](https://arxiv.org/abs/2003.14269)

## Initialize the repo
```
git clone --recursive VLNActionPriors.git
```

## get pybind as submodule
```
git submodule add -b master git@github.com:pybind/pybind11.git
```

## Create environment for installation
```
conda env create -f environment.yml

source activate AcP
```
## Install pytorch:
```
conda install pytorch=1.0.0 cuda100 -c pytorch
```
## Compile the Matterport3D environment
```
mkdir build && cd build
cmake ..
make
```
## Dataset Download

### R2R data:
```
bash download_r2r.sh
```
### Pre-computed image features:
```
mkdir -p img_features/
cd img_features/
wget https://www.dropbox.com/s/o57kxh2mn5rkx4o/ResNet-152-imagenet.zip?dl=1 -O ResNet-152-imagenet.zip
unzip ResNet-152-imagenet.zip
cd ..
```
### Download pre-trained speaker model (following Speaker Follower repo)
```
bash download_speaker_release.sh
```
### Train the model/agent using Random Walk Data Augmentation
```
bash run_w_params.sh
```

repository: PeterZhouSZ/VLNActionPriors

repo_name: PeterZhouSZ/VLNActionPriors


text:
# Docsearch

The search is provided by [Algolia Docsearch v3](https://docsearch.algolia.com/docs/DocSearch-v3/).

The docsearch app login is stored in OnePassword, where you can [login here](https://www.algolia.com/).

The dashboard will give you analytics and some configurations and insights into the index that is created.

## Crawler

Docsearch crawls the website automatically via the crawler. It is recrawled every day. To configure the website crawler you must log into the [crawler application](https://crawler.algolia.com/).

The crawler is configured via the editor, and a configuration object. It controls where the sitemap live, how often to crawl, and how to extract data from the website pages into the search index.

Use the Crawler app to visualize what Algolia can extract from our web pages as it crawls, and test any configuration changes you make.

Crawler documentation can be found [here](https://www.algolia.com/doc/tools/crawler/apis/configuration/).

repository: twilio-labs/paste

branch_name: refs/heads/main

gha_language: TypeScript

repo_name: twilio-labs/paste


text:
---
id: frameworks
title: Frameworks
sidebar_label: Frameworks
slug: /frameworks
description: AgileTs can be used in various frameworks like React, React-Native, Vue, ..
image: img/meta.png
---

A quick overview of all frameworks that AgileTs supports
or has planned to support in the near future.

### 👾 UI-Frameworks

| Framework                                | Supported | Planned |
|------------------------------------------|-----------|---------|
| [React](https://reactjs.org)             | ✅        | -       |
| [React-Native](https://reactnative.dev/) | ✅        | -       |
| [Angular](https://angular.io/)           | ❌        | 🟨      |
| [Vue](https://vuejs.org/)                | 🟨       | ✅       |
| [Svelte](https://svelte.dev/)            | ❌        | ✅       |

### 🤖 SSR-Frameworks

| Framework                           | Supported | Planned |
|-------------------------------------|-----------|---------|
| [NextJs](https://nextjs.org/)       | 🟨        | ✅      |
| [Gatsby](https://www.gatsbyjs.com/) | 🟨        | ✅      |
| [Razzle](https://razzlejs.org/)     | 🟨        | -       |

### 📕 Glossary

#### Supported
- ✅ - AgileTs supports this Framework
- 🟨 - AgileTs supports this Framework partly (-> hasn't been extensively tested, and the workflow needs to be improved)
- ❌ - AgileTs doesn't support this Framework

#### Planned
- ✅ - AgileTs will support this Framework in the future
- 🟨 - AgileTs might (if there is interest) support this Framework in the future
- ❌ - AgileTs won't support this Framework


text:
# hyper-foobar2000

[![License](https://img.shields.io/github/license/OrionNebula/hyper-foobar2000.svg)](LICENSE.md)
[![hyper](https://img.shields.io/badge/Hyper-v1.3.3-brightgreen.svg)](https://github.com/zeit/hyper/releases/tag/1.3.3)
[![GitHub issues](https://img.shields.io/github/issues/OrionNebula/hyper-foobar2000.svg)](https://github.com/OrionNebula/hyper-foobar2000/issues)

> foobar2000 plugin for [Hyper](https://hyper.is).
Displays the song currently playing in [foobar2000](https://www.foobar2000.org/) at the bottom of the terminal and allows you to control your favorite music.

Requires the [foo-httpcontrol](https://hydrogenaud.io/index.php/topic,62218.0.html) component to be installed, along with the [ajquery](https://bitbucket.org/oblikoamorale/foo_httpcontrol/downloads/) template.

## Installation

Simply add this plugin inside `~/.hyper.js` and enjoy your music :musical_note:

```js
module.exports = {
  ...
  plugins: ['hyper-foobar2000']
  ...
}
```

If you have trouble with the initial install, use yarn to install the package instead.

## Configuration

Because this plugin borrows so heavily from [hyper-spotify](https://github.com/panz3r/hyper-spotify), all of the same customization and configuration options will work here, plus some extras:

```js
hyperFoobar: {
  position: 'bottom',
  margin: 'default',
  controlsPosition: 'default',
  showArt: true, // If true, album art will appear in the bottom right corner.
  port: 8888 // The port foo-httpcontrol is hosting the interface on.
}
```


text:
---
layout: default
title: Test a single page application - SPA
description: Instructions on how to use scripting to test your Single Page Application.
keywords: selenium, web performance, sitespeed.io
nav: documentation
category: sitespeed.io
image: https://www.sitespeed.io/img/sitespeed-2.0-twitter.png
twitterdescription: Test a single page application - SPA
---
[Documentation]({{site.baseurl}}/documentation/sitespeed.io/) / Single page application

# Test a single page application
{:.no_toc}

* Lets place the TOC here
{:toc}

# Test by scripting
To test a single page application you probably want to measure more than just the first page (that loads the framework). You do that by using the Browsertime [command/scripting](/documentation/sitespeed.io/scripting/). You can use either our commands or Selenium scripts.

When you test a single page application make sure you add the ```--spa``` parameter to your test run command, so that Browsertime/sitespeed.io know it's an SPA. That will enable:
* Automatically handle URLs with #.
* End testing your page load after X seconds of no activity in the Resource Timing API. This makes sure that when you navigate to different pages, the navigation ends when everything finished loading.

## Metrics
Using a single page application makes it harder to measure how fast a page loads since the navigation timing API will not work. Instead you can use the User Timing API, pick up visual metrics, and metrics from the CPU.

### Navigation timing metrics
The navigation timing metrics are only useful for the first page that you test. Remember the pages in your SPA will not populate new navigation timing metrics.

### Visual Metrics
Visual Metrics will work fine, but depending on how you navigate *First Visual Change* can be when you click your link, so focus on *Last Visual Change* or one of the *VisualComplete* metrics instead.

### User Timing
You need to instrument the code yourself or use a framework to do that automatically. [Read how LinkedIn](https://engineering.linkedin.com/blog/2017/02/measuring-and-optimizing-performance-of-single-page-applications) use User Timings to measure their SPA.

### CPU metrics
If you run your tests with Chrome and enables  ```--chrome.timeline``` you will also get metrics where Chrome spends it times rendering and executing JavaScript.

## Example: Performance test Grafana
In this example we navigate and measure the start page of our Grafana installation, and then measure clicking the link to see the data for the last thirty days.

Lets create a script file and call it *thirtydays.js*.

~~~javascript
module.exports = async function(context, commands) {
 await commands.measure.start('https://dashboard.sitespeed.io/d/000000044/page-timing-metrics?orgId=1');
 try {
 await commands.click.byClassName('gf-timepicker-nav-btn');
 await commands.wait.byTime(1000);
 // We give the page an alias that will be used if the metrics is sent to Graphite/InfluxDB
 await commands.measure.start('pageTimingMetricsLast30Days');
 await commands.click.byLinkTextAndWait('Last 30 days');
 await commands.measure.stop();
 } catch (e) {
     // If the GUI change and a link is not there,
     // the click commands will throw an error.
     // sitespeed.io will catch, log and rethrow
     // and you can choose if you want to have a different
     // user flow
 }
};
~~~

Then you run it by passing on the script file, using  ```--spa``` to notify that you are testing a single page application and ```--multi``` that you plan to test multiple pages within one run.

~~~bash
docker run --rm -v "$(pwd):/sitespeed.io" sitespeedio/sitespeed.io:{% include version/sitespeed.io.txt %} thirtydays.js --spa --multi
~~~

gha_language: JavaScript


text:
# Extension method defintion

-   C# extension method is a static method of a static class, where the "this" modifier is applied to the first parameter. The type of the first parameter will be the type that is extended.


text:
#Documentation

With **M2H**, you can generate a static website easily.

1. Write your content with  Markdown Language.
2. Organize website tree using the directory structure.
3. Adapt the design by changing the configuration files.
4. let Md2html do the job
5. Upload the result on your web server


text:
# DogApp

Dog search by breed name. Uses [Dog API](https://dog.ceo/).

## [Live Demo](http://test13378.futurehost.pl/dogapp/)

## Install dependencies

```
yarn install
```

## Develop

```
yarn start
```

## Test
```
yarn test
```

## Build

```
yarn build
```

Made with 💖 by Alex Ilchenko [ilczenko<EMAIL_ADDRESS>

repository: wialy/dogapp

repo_name: wialy/dogapp


text:
# OceanOS

OceanOS is a personal Operating System.

You can see it as a mix of productivity app, note taking, expense tracker and much more...

It is a great tool for habit formation, tracking objectives, and stay organized.

It uses the concept of [lifestreaming](https://en.wikipedia.org/wiki/Lifestreaming) to organize your life events.

You can also use it to build microblogs with public life streams that you can share with your friends.

To build it, you need @angular/cli and @nestjs/cli installed globally.

    npm install -g @angular/cli @nestjs/cli

Then build the docker image just run the script

    ./build-docker-image.sh

And to run it, you just have to expose the port 3000 and choose a directory for the db

    docker run -p 3000:3000 -v <your db directory>:/oos/db oos

That's it !

repository: ruigil/oos

repo_name: ruigil/oos


text:
# EpaJava

EpaJava a coupling structure that allows calls from Java to the EPANET Programmer's Toolkit (EPAToolkit) dynamic link library of EPANET. It was implemented through the Java Native Access library (JNA), allowing dynamic and native invocations of the EPAToolkit. A set of classes were developed in the library to represent the hydraulic components involved in the modeling of WDN (e.g., pipes, pumps, reservoirs).

A convenient feature of using the JNA is the native calling to each of the available methods in EPANET for any of the implemented classes without any modifications concerning the original EPAToolkit library. Therefore, users already familiar with EPAToolkit should be able to accurately represent a network in the coupling library. In practical terms, the library loads the water network characteristics through an EPANET input file (.inp), in which the operational variables are dynamically modified according to the optimization procedure.

## Getting Started 🚀

The following instructions will allow you to obtain a copy of the EpaJava in an operational way for development and testing purposes.

### Requirements 📋

- Windows 10.
- JDK Java 8: [Installation Guide](tutorial/JDK-Java-8.md).
- Eclipse IDE: [Installation Guide](tutorial/Eclipse.md).

### Project Download ⬇

1. To download, you can go to the link as shown in Figure 1 or going directly clicking [here](https://github.com/jhawanet/epajava/archive/master.zip).

| ![Figure 1](tutorial/download.png) |
|:--:|
| *Figure 1* |

2. Unzip the file to access its content, following the steps indicated in figures 2 and 3.

| ![Figure 2](tutorial/extract-all.png) |
|:--:|
| *Figure 2* |

| ![Figure 3](tutorial/extract.png) |
|:--:|
| *Figure 3* |

### Integration to a Java Project in Eclipse 🔧

3. Create a new Java Project, as seen in figures 4 and 5:

| ![Figure 4](tutorial/new-project-1.png) |
|:--:|
| *Figure 4* |

| ![Figure 5](tutorial/new-project-2.png) |
|:--:|
| *Figure 5* |

4. Add the dependency to the created project, for this, it is necessary to configure the **Configure Build Path** option, figure 6.

| ![Figure 6](tutorial/configure-build-path-1.png) |
|:--:|
| *Figure 6* |

5. Open the window and select the **Libraries** tab, figure 7.

| ![Figure 7](tutorial/configure-build-path-2.png) |
|:--:|
| *Figure 7* |

6. Select the **Add External JARs** button, figure 8.

| ![Figure 8](tutorial/configure-build-path-3.png) |
|:--:|
| *Figure 8* |

7. Select the folder where the EpaJava project was stored and select the **epajava.jar** file, figure 9.

| ![Figure 9](tutorial/configure-build-path-4.png) |
|:--:|
| *Figure 9* |

8. Finally, select the **Apply and Close** button, figure 10.

| ![Figure 10](tutorial/configure-build-path-5.png) |
|:--:|
| *Figure 10* |

## Testing ⚙

To perform a test, create a new package to store the networks' information (.inp files).

9. Right-click on the **src** folder and select the option **New** > **Package**, figure 11.

| ![Figure 11](tutorial/test-3.png) |
|:--:|
| *Figure 11* |

10. Name the package as **resources** or another name of your choice. Save the .inp file that we will use, then create a class for the test code, figure 12.

| ![Figure 12](tutorial/test-4.png) |
|:--:|
| *Figure 12* |

11. Right-click on the **src** folder and select the option **New** > **Class**, figure 13.

| ![Figure 13](tutorial/test-1.png) |
|:--:|
| *Figure 13* |

12. Indicate a name to the class, in this case, we call it **HydraulicSimulation**, figure 14.

| ![Figure 14](tutorial/test-2.png) |
|:--:|
| *Figure 14* |

13.	Within the created class, copy and paste the following code.

```java
import java.net.URISyntaxException;

import epanet.core.EpanetAPI;
import epanet.core.EpanetException;

public class HydraulicSimulation {

	public static void main(String[] args) throws URISyntaxException, EpanetException {

		EpanetAPI epanet = new EpanetAPI();
		epanet.ENopen("src/resources/vanzyl.inp", "src/resources/vanzyl.rpt", "");

		//long t, tstep;
		long[] tstep = {1};
		long[] t = {0};

		epanet.ENopenH();
		epanet.ENinitH(0);
		do {
			epanet.ENrunH(t);
			/* Retrieve hydraulic results for time t */
			epanet.ENnextH(tstep);
		} while (tstep[0] > 0);

		epanet.ENcloseH();

	}

}
```

14. Finally, to run the experiment select the Run tab in the Eclipse menu, and click the first **Run** option, figure 15.

| ![Figure 15](tutorial/test-6.png) |
|:--:|
| *Figure 15* |

## License 📄

This project is under the MIT License. See the [LICENSE](LICENSE.md) file for the full license text.

repository: jhawanet/epajava

repo_name: jhawanet/epajava


text:
# ojcmp

[![crates.io](https://img.shields.io/crates/v/ojcmp.svg)](https://crates.io/crates/ojcmp) ![Test](https://github.com/Nugine/ojcmp/workflows/Test/badge.svg)

> online judge comparer

## Status

Maintaining `0.2.2`

## Install

```bash
cargo install ojcmp
```

## Build

```bash
cargo build --release
```

Install by cargo

```bash
cargo install --path .
```

Install manually

```bash
cp target/release/ojcmp /usr/bin
```

## Usage

```
ojcmp 0.2.2

USAGE:
    ojcmp [FLAGS] [OPTIONS] --std <path>

FLAGS:
    -a, --all          Reads all bytes of user file even if it's already WA
    -b, --backtrace    Prints stack backtrace when fatal error occurs
    -h, --help         Prints help information
    -V, --version      Prints version information

OPTIONS:
        --eps <eps>      Eps for float comparing
    -m, --mode <mode>    CompareMode ("normal"|"strict"|"spj_float") [default: normal]
    -s, --std <path>     Std file path
    -u, --user <path>    User file path. Reads from stdin if it's not given
```

## Return Value

| type   | value                                      |
| ------ | ------------------------------------------ |
| code   | errno                                      |
| stdout | "AC" / "WA" / "PE"                         |
| stderr | error message and optional stack backtrace |

## Current Implementation

### Mode: Normal

trim_end(file)

```rust
judge!(AC, b"1\r\n\r\n\r\n", b"1  ");
```

for each line, trim_end(line)

```rust
judge!(AC, b"1 \n", b"1");
```

for each line, check spaces between non-space chars

```rust
judge!(PE, b"1 3\n", b"1         3\n");
```

### Mode: Strict

User file must have the same bytes with std file.

The two byte streams must be exactly the same.

There is no "PE" in this mode.

### Mode: SpjFloat

Compare two streams of float numbers which are splitted by [ascii whitespaces](https://infra.spec.whatwg.org/#ascii-whitespace).

Parse any float number as f64 (aka `double` in C language).

Ascii whitespaces between two float numbers are considered as a single separator symbol.

Use CLI option `--eps` to specify eps value, for example `--eps 1e-3`.

There is no "PE" in this mode.

## Change Log

- v0.2.2 Fix bug in nan handling. (yank v0.2.1)
- v0.2.1 Add spj_float mode. (yanked)
- v0.2.0 Add strict mode. No break changes.

+ v0.1.3 No functional changes
+ v0.1.2 Fix algorithm bug
+ v0.1.1 Use unsafe static buffer

repository: Nugine/ojcmp

repo_name: Nugine/ojcmp


text:
Web Console
===

Your RhoConnect application exposes a web interface which runs on http://localhost:9292/console/ (port 80 on Windows) by default.  You can open the console by running the following in your application directory:

	:::term
	$ rhoconnect web

To login to the console:

1. Click on the "Console" link
2. Make sure the server field matches the host and port your rhoconnect app is running
3. Default username is 'rhoadmin' and the password is empty
4. Now you will be presented with a page showing your current license, for example:

		Licensed to Rhomobile on Fri Apr 23 17:20:13 -0700 2010,
			available 9 of 10 devices

It will also show a link to "Application Users" where you can view users of the system as well as devices they have registered.

To reset the server, you can click on the "Reset" button at the bottom.

**NOTE: Resetting the server will remove all data from redis including registered devices, this cannot be undone.**

If you want to disable this web interface, you can do so by editing the rackup file, config.ru:

	:::ruby
	# Setup the url map
	run Rack::URLMap.new \
		"/"         => Rhoconnect::Server.new,
		"/resque"   => Resque::Server.new, # If you don't want resque frontend, disable it here
		#"/console"  => RhoconnectConsole::Server.new # If you don't want rhoconnect frontend, disable it here

**NOTE: This web console is intended to be used for basic tests and views into the running RhoConnect application.  It uses the [RhoConnect REST API](rest-api) for everything it does, so it is very easy to extend this console or programmatically control your RhoConnect application directly using the [RhoConnect API](rest-api). **

Here is a screenshot of the web console:

<img src="https://s3.amazonaws.com/docs.tau-technologies.com/images/rhoconnect/web-console.png"/>

repository: tauplatform/rhomobile-docs

gha_language: Ruby

repo_name: tauplatform/rhomobile-docs


text:
---
title: Front-end web developer
description: byteco.org is hiring a full-time web developer
lang: en
sidebar: true
template: job
position: Front-end developer
compensation: "$75,000 - $95,000 USD"
location: Remote
type: "Full-time"
link: https://Byteco.bamboohr.com/jobs/view.php?id=32
image: ../../../assets/hackathon_transparent.png
---

## Your role {#your-role}

**Make byteco.org (and the suite of Byteco Foundation web applications) as performant, feature-rich and accessible as possible**. As a front-end developer, you'll create slick, fun and functional web applications visited by tens of millions of diverse Byteco users each year. You'll collaborate with product, design and research teammates to shape the design and features of our products. You'll empower the next generation of Byteco users and builders to change our world for the better.

## About you {#about-you}

- **You're an ambitious software developer**. You live and breath open source software, UI components, design systems and web APIs.
- **You have an opinionated sense of design**. You're experienced collaborating with designers and user researchers but are comfortable building product interfaces yourself if needed.
- **You have an ownership mentality**. When you take on a task, you get it done. You proactively troubleshoot problems blocking your path, and the problems blocking the paths of others.
- **You enjoy teaching as much as you enjoy learning**. You’re comfortable writing technical content for developers including documentation, project templates and tutorials.
- **You're comfortable pitching in to get the job done**. We're a small team, sometimes you may have to do work outside of your "core responsibilities".
- **You're fascinated by Byteco**... the community as much as the technology.

## Core responsibilities {#core-responsibilities}

- Create performant, slick, accessible web applications visited by tens of millions of diverse Byteco users each year.
- Actively shape the design and feature of products you build in collaboration with design, product, and research teammates as well as open source community members.
- Work beyond just shipping your product; evaluate, evolve, and optimize your work to deliver the best, most valuable user experiences.
- Constantly push to make front-end development on your team and within the ecosystem better by identifying efficiencies, reusable abstractions, and communicating best practices.

## Required skills and experience {#required-skills}

- You have 2+ years of professional software development experience.
- You know how to build products using a modern web development framework (React, Vue, Angular, Ember, etc). Our current stacks are primarily React (and Byteco!) based.
- You are comfortable with all of the fundamental web development technologies (ES6+, HTML, CSS, etc).
- You understand browsers, DOM, web accessibility and can solve cross-browser compatibility issues, optimize client-side performance, and build responsive designs.
- You’ve used modern web development tooling across the stack: CSS preprocessors, bundlers, testing frameworks, CI tools, web analytics.
- You’re a great teammate, participating in design and code reviews, pairing, and mentoring as needed to make our team better.
- You're passionate about the the crypto/blockchain/Byteco space and have dabbled with the developer tools available.

## Contract details {#current-details}

- This is a full-time, remote position
- Compensation will ultimately depend on your experience, skillset and the contract structure but you can expect the equivalent of $75,000-$95,000 USD annual salary.

repository: byteco-org/byteco-org-website

repo_name: byteco-org/byteco-org-website


text:
# Fancy Form:

> Form UI with progress bar. Uses HTML-5, CSS-3 Transitions with Sass & JavaScript.

## Quick Start:

``` bash
# Install dependencies (node-sass)
npm install

# Watch & Compile Sass
npm run sass
```

## App Info

### Author

Md Mehedi Hasan

### Version

1.0.0

### License

This project is licensed under the MIT License

repository: developer-mehedi-dev/fancy-form

repo_name: developer-mehedi-dev/fancy-form


text:
# s3_relay-demo

## Overview

This is a demo Rails application for the [s3_relay](https://github.com/kjohnston/s3_relay) gem.

## Contributing

1. [Fork it](https://github.com/kjohnston/s3_relay-demo/fork_select)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Added some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. [Create a Pull Request](https://github.com/kjohnston/s3_relay-demo/pull/new)

## License

* Freely distributable and licensed under the [MIT license](http://kjohnston.mit-license.org/license.html).
* Copyright (c) 2014 Kenny Johnston


text:
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [0.1.6](https://github.com/lindsaykwardell/nuxt-github-api/compare/v0.1.5...v0.1.6) (2020-11-12)

### [0.1.5](https://github.com/lindsaykwardell/nuxt-github-api/compare/v0.1.4...v0.1.5) (2020-09-06)

### Features

* enabled passing variables to graphql query ([29048c4](https://github.com/lindsaykwardell/nuxt-github-api/commit/29048c490cd9fc5cc953194203f96e4e1aa10fb2))

### [0.1.4](https://github.com/lindsaykwardell/nuxt-github-api/compare/v0.1.3...v0.1.4) (2020-09-06)

### Bug Fixes

* removed isomorphic-fetch ([4b09599](https://github.com/lindsaykwardell/nuxt-github-api/commit/4b09599635cfb5a71c59dd7abc904769fa6f5077))

### 0.1.3 (2020-09-06)

### Bug Fixes

* adjusted readme to include github token ([aa3fd27](https://github.com/lindsaykwardell/nuxt-github-api/commit/aa3fd27cbe4bac099cc53a2b3085dedb6547ac12))
* attempting to correct ci ([7156fe2](https://github.com/lindsaykwardell/nuxt-github-api/commit/7156fe24de623713af4fcd4497ffa09a8276f74b))
* follow-up to fix ci ([9440ce7](https://github.com/lindsaykwardell/nuxt-github-api/commit/9440ce7155f34cef1f1281acfa5e1c63eafa6556))
* moving to env option ([fd11a02](https://github.com/lindsaykwardell/nuxt-github-api/commit/fd11a02c66898b39071cf0cef51139d30205fc43))
* run test using github token ([83599c3](https://github.com/lindsaykwardell/nuxt-github-api/commit/83599c3d4c71e265e8b50616f0d2df543bc34fa8))
* update links for badges ([73fcc19](https://github.com/lindsaykwardell/nuxt-github-api/commit/73fcc192653c797b8003400c0d84ba4d73d51bed))

repository: lindsaykwardell/nuxt-github-api

repo_name: lindsaykwardell/nuxt-github-api


text:
# Lab 4: Deploy kubevirt

## Intro

## Lab

In a separate terminal, setup a watch of the pods we will create.
```
watch 'oc get pods --all-namespaces |grep  kubevirt'
```

First we create the security context constraint and then deploy the kubevirt operator.
```
oc adm policy add-scc-to-user privileged -n kubevirt -z kubevirt-operator
oc apply -f chimera-kubevirt/kubevirt-operator.yaml
```

We need a configmap in place before deploying kubevirt in order to use CDI later.
```
oc apply -f chimera-kubevirt/dv-configmap.yaml
```

Once the operator is running, we can pass the custom resource file and start the kubevirt system.
```
oc apply -f chimera-kubevirt/kubevirt-cr.yaml
```

With kubevirt up and running, we need to get the UI operator deployed as well. We'll start a new project and lay down the custom resource definition, then apply the RBAC and start the operator from the deploy directory.
```
oc new-project kubevirt-web-ui
WEBUIPATH=/root/demo/kubevirt/web-ui-operator/deploy
ls $WEBUIPATH
oc apply -f ${WEBUIPATH}/crds/kubevirt_v1alpha1_kwebui_crd.yaml
oc apply -f $WEBUIPATH
```

Once the operator is up, we'll apply the custom resource.
```
oc apply -f ${WEBUIPATH}/crds/kubevirt_v1alpha1_kwebui_cr.yaml
```

## Spin up a fedora VM

To run a fedora VM we need a PVC for it so we can provide ceph-based storage to it:
```
oc project default
oc apply -f chimera-kubevirt/fedora-pvc.yaml
oc apply -f chimera-kubevirt/fedora-vm.yaml
```

Watch the VM being spun up:
```
watch oc get vms
```

In order to create a VM from a local image, we need to deploy CDI (containerized data importer) so that we can use PVCs as disks for VMs.
CDI supports .img, .iso and .qcow2 images.

Let's watch the cdi namespace.
```
watch oc get pods -n cdi
```

Once again, we apply the operator...
```
CDIPATH=/root/demo/chimera-cdi
oc apply -f ${CDIPATH}/cdi-operator.yaml
```

And then once it is running we use the operator.
```
oc apply -f ${CDIPATH}/cdi-operator-cr.yaml
```

For our next lab, we will need a CDI data volume in place for our virtual machine instance.

Create the DataVolume for our Windows VM and import the qcow2 disk image.
```
oc apply -f ${CDIPATH}/win2012-dv.yaml
```

This will start a new pod to import the source into a PV. Take a look.
```
oc get pods
oc describe pod -l app=containerized-data-importer
```

This will also create a new PVC and bound PV to hold the VM disk image.
```
oc get pvc
oc get pv
```

The disk image import will take a while. When it completes, the importer pod will terminate.
```
watch oc get pods
oc get dv
oc describe dv
```

It is also interesting to watch the `ceph -s` activity during the image import.
```
watch 'oc exec -n rook-ceph $TOOLBOX -- ceph -s'
```

And if all goes well, we should have [blinkenlights](https://en.wikipedia.org/wiki/Blinkenlights).


text:
Sebastian Raschka, 2015

Python Machine Learning - Code Examples

##  Chapter 2 - Training Machine Learning Algorithms for Classification

- Artificial neurons - a brief glimpse into the early history
- of machine learning
- Implementing a perceptron learning algorithm in Python
  - Training a perceptron model on the Iris dataset
- Adaptive linear neurons and the convergence of learning
  - Minimizing cost functions with gradient descent
  - Implementing an Adaptive Linear Neuron in Python
  - Large scale machine learning and stochastic gradient descent
- Summary

repository: peterjpxie/python-machine-learning-book

repo_name: peterjpxie/python-machine-learning-book


text:
# Most Common Word Sense
The most common word sense algorithm's goal is to extract the most common sense of a target word. The input to the algorithm is the target word and the output are the senses of the target word where each sense is scored according to the most commonly used sense in the language.

## Prepare training and validation test sets
The training module inputs a gold standard csv file which is list of target_words where each word is associated with a CLASS_LABEL - a correct (true example) or an incorrect (false example) sense. the sense consists of the definition and the inherited hypernyms of the target word in a specific sense.
The user needs to prepare this gold standard csv file in advance. The file should include the following 4 columns:

| TARGET_WORD | DEFINITION | SEMANTIC_BRANCH | CLASS_LABEL

where:
1. TARGET_WORD(string):the word that you want to get the most common sense of. e.g. chair
2. DEFINITION (string): the definition of the word (usually a single sentence) extracted from external resource such as Wordnet or Wikidata. e.g. an artifact that is design for sitting
3. SEMANTIC_BRANCH(string):  [comma separated] the inherited hypernyms extracted from external resource such as Wordnet or Wikidata e.g. [furniture, artifact]
4. CLASS_LABEL(string): a binary value 0/1 that represents whether the sense (Definition and semantic branch) is the most common sense of the target word.

`python prepare_data [--gold_standard_file GOLD_STANDARD_FILE]
       [--word_embedding_model_file WORD_EMBEDDING_MODEL_FILE]
       [--training_to_validation_size_ratio RATIO_BETWEEN_TRAINNIG_AND_VALIDATIO]
       [--data_set_file DATA_SET_FILE]`

## Training
Train the MLP classifier and evaluate it.

`python train.py [--data_set_file DATA_SET_FILE] [--model MODEL_h5]`

Quick example:

`python train.py --data_set_file data/data_set.pkl
                 --model data/wsd_classification_model.h5`

## Inference
When running inference note that the results are printed to the terminal using different colors therefore using a white terminal background is best to view the results.

`python inference.py [--max_num_of_senses_to_search N]
        [--input_inference_examples_file INPUT_INFERENCE_EXAMPLE_FILE]
        [--model MODEL_H5] [--word_embedding_model_file WORD_EMBEDDING_MODEL_FILE]`

Quick example:

`python inference.py --max_num_of_senses_to_search 3
       --input_inference_examples_file data/input_inference_examples.csv
       --word_embedding_model_file pretrained_models/GoogleNews-vectors-negative300.bin
       --model data/wsd_classification_model.h5`

repository: IntelLabs/nlp-architect

repo_name: IntelLabs/nlp-architect


text:
# Klarna Checkout: Sample Native Extension

[![REUSE status](https://api.reuse.software/badge/github.com/SAP-samples/upscale-commerce-open-payment-integration)](https://api.reuse.software/info/github.com/SAP-samples/upscale-commerce-open-payment-integration)

## What is it?
The Klarna checkout custom component is a sample of what will be possible with our brand new overhaul of the existing custom component implementation. The existing solution is only capable of injecting iframes into an Upscale PWA. The new version of custom components, which we are calling native extensions, will be capable of injecting native angular components and services directly into an application. In addition to being visible to web-crawlers, these components will be able to interact directly with the PWA’s front end state and services, enabling the merchant to build essentially anything that an Upscale developer could.

To make it easier for a merchant to create a native extension, we have created a new public-facing upscale-web-storefront-sdk containing abstract classes which the component can access. The implementations of these classes exist as part of the PWA, and when the component is loaded, any references to them resolve to the implementations in the PWA. Those services interact with the PWA state, and are what enable much of the complex functionality that a merchant would want. The component can also access our caas-service-client-angular which provides services that interface directly with the back end services, for more fine-grained control.

## Setting up the Custom Component
Follow the steps below to create your own version of the klarna-checkout native component:

**1\. Download**

Download this repository as a zip file and extract it.

**2\. Configure mapping**

Navigate to native-extensions/klarna/checkout/projects/klarna-checkout/src/lib/klarna-checkout. Open the klarna-checkout.component.ts file in your desired IDE/text editor.

Take note of the following code starting on line 110:

    const klarnaConfig = configs.find((config) => {
        return config.gatewayProviderName === 'klarna-checkout';
    });

This code is checking for a payment configuration with a gatewayProviderName matching "klarna-checkout". Feel free to change this string to something else, so long as it is consistent with that of a compatible payment configuration (more on this later).

**3\. Component mapping**

Open klarna-checkout.module.ts located in the same directory.

Take note of the following code starting on line 10:

    this.registrationService.register(
        'klarna-checkout',
        KlarnaCheckoutComponent
    );

This code is mapping the KlarnaCheckoutComponent component class to the string "klarna-checkout". The registrationService is a service which is shared between the PWA and the custom component, and essentially by providing this mapping, we are telling the PWA that this component exists. Like the gatewayProviderName property above, feel free to set this string to anything you like as well.

**4\. Publish Component Library**

Open the klarna-checkout folder in terminal and execute commands to install all dependencies, build, and package the application. For the current release, neither upscale-web-storefront-sdk nor caas-service-client-angular will be available publicly. For now, they will be bundled together with the PWA app. Download a new PWA app from Workbench, and there will be a "libs" folder containing the .tgz files you'll need to install. The exact commands are as follows:

    npm install
    npm install --save-dev <path to Upscale PWA>/libs/caas-service-client-angular-<version>.tgz
    npm install --save-dev <path to Upscale PWA>/libs/upscale-web-storefront-sdk-<version>.tgz
    npm run package

Host the generated tarball (.tgz) for the component library in a public environment such as NPM, GitHub, or S3.

**5\. Create Native Extension**

Add the library as a Native Extension within the workbench, similarly to how you would a style extension.

![create native extension](./documentation/images/Create_Native_Extension.png)

**6\. Assign Native Extension**

In order to add the library to an app where you wish to show the klarna checkout, select the extension name in the selectize field for extensions within the app configuration.

![assign native extension](./documentation/images/Assign_native_extension.png)

Note: You'll need to download the app to actually see the changes.

**7\. Configure Experience**

Navigate to the experience editor for the experience associated with the app. You will need to remove the existing checkout component within the checkout template and replace it with a custom component.

In the custom component configuration, enter the extension ID and a component identifier corresponding to the mapping done in klarna-checkout.module.ts. Hit save.

![configure experience](./documentation/images/configure_experience.png)

**8\. Payment Configuration**

Before the component can be used, you will need to configure a gateway or payment method with a compatible klarna script and assign it to the division associated with the app.

A postman collection to quickly setup one of these should be accessible via the [SAP-samples Github](https://github.com/SAP-samples/upscale-commerce-open-payment-integration). Instructions on how to install a payment configuration using a postman collection can be found [here](https://github.com/SAP-samples/upscale-commerce-open-payment-integration/tree/main/postman/klarna/custom-checkout).

Please also be sure to fill in your config's gatewayProviderName (labelled as "Payment gateway name") as the string specified in klarna-checkout.component.ts above.

![configure payment](./documentation/images/configure_payment.png)

## Testing
If all the above setup is complete, please follow the steps below to test your new custom component!

**1\. Download the app from workbench**

**2\. Extract the contents of the zip**

**3\. Install dependencies:**

Access the project root in terminal and run "npm install"

**4\. Add the library module to your application:**

Open the file src/app/core/extension.module.ts in your ide/text editor

Add the following to the first list of imports:

    import { UpscaleExtensionModule } from 'klarna-checkout';

Then add UpscaleExtensionModule to the array of native extension modules:

    // Add Native Extension Modules here
    const modules = [ UpscaleExtensionModule ];

**5\. Start app:**

Access the project root in terminal and run "npm start"

**6\. Test in browser:**

Access the application via localhost:4200, add a product to cart, and proceed to checkout. A klarna payment form should appear in the place of the regular checkout!

![test in pwa](./documentation/images/test_in_pwa.png)

## How it all works
The Klarna Checkout component makes use of the aforementioned front end services made available by upscale-provided dependencies; upscale-web-storefront-sdk and caas-service-client-angular, as well as some provided by angular itself.

Refer to [Klarna Checkout component](https://github.com/SAP-samples/upscale-commerce-open-payment-integration/blob/main/native-extension/klarna/checkout/How%20Klarna%20Checkout%20Component%20Works.docx) for details.

## License
Copyright (c) 2021 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the [LICENSE](LICENSES/Apache-2.0.txt) file.


text:
# get-yahoo-quotes

A script to download Yahoo quotes which works with the new cookie authorized page.

This repo has an associated blog post available here:

[http://blog.bradlucas.com/posts/2017-06-02-new-yahoo-finance-quote-download-url/](http://blog.bradlucas.com/posts/2017-06-02-new-yahoo-finance-quote-download-url/)

## Run

Run the script with the symbol you'd like as a parameter. The script will download to a cvs file named with the symbol.

```
./get-yahoo-quotes.sh SYMBOL
```

repository: bradlucas/get-yahoo-quotes

gha_language: Shell

repo_name: bradlucas/get-yahoo-quotes


text:
# ACM Certificate

A module for creating a certificates that are verified using DNS validation.

## Dependencies

This module assumes that there are DNS zones for the parent domains of all domains passed to the module.

For example, if the module is passed the domain `foo.bar.example.com`, the module assumes an existing DNS zone for `bar.example.com` where the cert validation DNS records will be placed.

repository: rust-lang/simpleinfra

gha_language: HCL

repo_name: rust-lang/simpleinfra


text:
# Rust `audit-check` Action

![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)
[![Gitter](https://badges.gitter.im/actions-rs/community.svg)](https://gitter.im/actions-rs/community)

> Security vulnerabilities audit

This GitHub Action is using [cargo-audit](https://github.com/RustSec/cargo-audit)
to perform an audit for crates with security vulnerabilities.

## Usage

### Audit changes

We can utilize the GitHub Actions ability to execute workflow
only if [the specific files were changed](https://help.github.com/en/articles/workflow-syntax-for-github-actions#onpushpull_requestpaths)
and execute this Action to check the changed dependencies:

```yaml
name: Security audit
on:
  push:
    paths:
      - '**/Cargo.toml'
      - '**/Cargo.lock'
jobs:
  security_audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions-rs/audit-check@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
```

It is recommended to add the `paths:` section into the workflow file,
as it would effectively speed up the CI pipeline, since the audit process
will not be performed if no dependencies were changed.

In case of any security advisories found, [status check](https://help.github.com/en/articles/about-status-checks)
created by this Action will be marked as "failed".\
Note that informational advisories are not affecting the check status.

![Check screenshot](.github/check_screenshot.png)

#### Limitations

Due to [token permissions](https://help.github.com/en/articles/virtual-environments-for-github-actions#token-permissions),
this Action **WILL NOT** be able to create Checks for Pull Requests from the forked repositories,
see [actions-rs/clippy-check#2](https://github.com/actions-rs/clippy-check/issues/2) for details.\
As a fallback this Action will output all found advisories to the stdout.\
It is expected that this behavior will be fixed later by GitHub.

## Scheduled audit

Another option is to use [`schedule`](https://help.github.com/en/articles/events-that-trigger-workflows#scheduled-events-schedule) event
and execute this Action periodically against the `HEAD` of repository default branch.

```yaml
name: Security audit
on:
  schedule:
    - cron: '0 0 * * *'
jobs:
  audit:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - uses: actions-rs/audit-check@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
```

With this example Action will be executed periodically at midnight of each day
and check if there any new advisories appear for crate dependencies.\
For each new advisory (including informal) an issue will be created:

![Issue screenshot](.github/issue_screenshot.png)

## Inputs

| Name        | Required | Description                                                                | Type   | Default |
| ------------| -------- | ---------------------------------------------------------------------------| ------ | --------|
| `token`     | ✓        | [GitHub token], usually a `${{ secrets.GITHUB_TOKEN }}`                    | string |         |

[GitHub token]: https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token

repository: decanus/audit-check

repo_name: decanus/audit-check


text:
# DEA0011 The method decorated by the Update attribute should return void

The method decorated by the Update attribute should return void.

## Examples of patterns that are flagged by this analyzer

```csharp
using DefaultEcs.System;

namespace DummyNamespace
{
    partial class DummyClass : AEntitySystem<float>
    {
        public DummyClass(World world)
            : base(world)
        { }

        [Update]
        int Update(in Entity entity, float state, object dummy) => 42;
    }
}
```

## Solution

Change the return type of the method to void.

gha_language: C#


text:
# Installation instructions

Download [SatisMeter.xcframework](https://github.com/satismeter/satismeter-ios/tree/main/XCFramework/SatisMeter.xcframework) from github, and drag-and-drop it to the target project.

![Screenshot](https://raw.githubusercontent.com/satismeter/satismeter-ios/master/Images/add_xcframework.png)

## Usage

### Import header

```swift
import SatisMeterFramework

```

### Registration

First of all you should create your account in https://satismeter.com

### Identify user

In your app delegate inside didFinishLaunchingWithOptions type this:

```swift
let traitsDictionary = [
    "name" : "James Bond",
    "plan" : "Gold",
    "createdAt" : "2015-11-01T00:00:00.000Z"
]

SatisMeter.sharedInstance().identifyUser(
    withUserId: "007",
    writeKey: "K7eMIPEXyPMlG7fu",
    andTraitsDictionary: traitsDictionary
)
```

Replace the `writeKey` with the one found in SatisMeter settings / Integrations / API Keys.

Replace `user id`, `name`, etc. with the ones of the currently logged-in user.

## Author

SatisMeter, https://satismeter.com

## License

satismeter-ios SDK is available under the MIT license. See the LICENSE file for more info.

repository: satismeter/satismeter-ios

repo_name: satismeter/satismeter-ios


text:
# Vulnerability roundup 112: openssh-8.8p1: 1 advisory [3.7]

[search](https://search.nix.gsc.io/?q=openssh&i=fosho&repos=NixOS-nixpkgs), [files](https://github.com/NixOS/nixpkgs/search?utf8=%E2%9C%93&q=openssh+in%3Apath&type=Code)

* [ ] [CVE-2021-36368](https://nvd.nist.gov/vuln/detail/CVE-2021-36368) CVSSv3=3.7 (nixos-21.11, nixos-unstable)

## CVE details

### CVE-2021-36368

** DISPUTED ** An issue was discovered in OpenSSH before 8.9. If a client is using public-key authentication with agent forwarding but without -oLogLevel=verbose, and an attacker has silently modified the server to support the None authentication option, then the user cannot determine whether FIDO authentication is going to confirm that the user wishes to connect to that server, or that the user wishes to allow that server to connect to a different server on the user's behalf. NOTE: the vendor's position is "this is not an authentication bypass, since nothing is being bypassed."

-----
Scanned versions: nixos-21.11: efea022d6fe; nixos-unstable: 710fed5a248.

Cc @dasJ

repository: ckauhaus/nixos-vulnerability-roundup

repo_name: ckauhaus/nixos-vulnerability-roundup


text:
mxnet ubuntu 18.04 build commands (testing completed. R-package built sucessfully from the master) \
cd incubator-mxnet \
mkdir build \
mkdir build/Release \
cmake -DUSE_CUDA=0 -DUSE_OPENCV=1 -DUSE_BLAS=open -DUSE_LAPACK=1 ../../ \
make -j$(nproc) \
cd ../../docs/install/ \
./install_mxnet_ubuntu_python.sh
./install_mxnet_ubuntu_r.sh
It failed on the master at first run with following error. \
* cp: cannot overwrite non-directory 'R-package/inst/include/dmlc' with directory '3rdparty/dmlc-core/include/dmlc' \
Makefile:583: recipe for target 'rpkg' failed

 But after I applied the changes in the fix #13590
it worked here is the last line.
* DONE (mxnet) \
Done! MXNet for R installation is complete. Go ahead and explore MXNet with R :-)

path: /docs/mxnet(Ubuntu 18.04 build cmd).md

filename: mxnet(Ubuntu 18.04 build cmd).md


text:
Drag And Drop your image files over the top of the program to quickly apply the hex edit to allow them to have transparency on the steam website. In addition to this you can open it to select your files. These files will be named the "orignalfile_transparencyFix.png" for example.

![](https://i.gyazo.com/d0f8fb25e9be839aeecc4943ed3e4ed4.gif)

repository: theopathy/Steam-Transparency-Artwork

repo_name: theopathy/Steam-Transparency-Artwork


text:
## Project Description
We were given the project called "IBM Watson For Good".
As a rather open ended challenge by [Phaedra Boinodiris](https://www.linkedin.com/in/phaedra) from IBM, our team is investigating how Watson can be used in creative ways to drive social change.

We have decided to use IBM Watson to aggregate social media posts related to campus topics, and have the general “mood” be displayed as an artistic representation on significant parts of campus. This aggregation can then be used to enable crowdfunding or automate messages to legislators related to the issue at hand.

# Team Roles
- Client Manager: Michael Gu
- Project Manager: Amogh Sharma
- Editor: Greer Glenn
- Chief Architect: Victor Cui

# Technologies
- IBM Watson: IBM’s Cognitive Color Tool, Tone Analyzer
- Twitter API
- Mailchimp
- Venmo API

# Inspiration
## Art + Activism = Artivism
During the Met Gala last year, IBM Watson collaborated to create a unqiue dress.
The lights lit up with a color that corresponded to Tweets containing #MetGala. All Tweets were analyzed using IBM Watson Sentiemnt Analysis API's, and the aggregate sentiment was mapped to a color.

![Dress](https://media.wired.com/photos/592704e7f3e2356fd800b338/master/w_582,c_limit/KK_FINAL-Red-Carpet-1.jpg)
"The LED lights attached to the dress’ embroidered flowers are connected to Watson’s Tone Analyzer API, which is able to interpret the emotional content of tweets tagged #MetGala and #CognitiveDress. As the tone of the tweets change, Watson is able to pull from the color palettes it generated and change the hue of the dress in real time. If tweets have a high “joy” value, for example, the dress would light up with a bright rose color; while tweets with a more “excited” tone will turn the flowers a shade of aqua. Even the fabric—a lightweight tulle—was chosen through a cognitive process." - https://www.wired.com/2016/05/ibms-watson-helped-design-karolina-kurkovas-light-dress-met-gala/

We wish to apply the idea of **artistic visual representations based on ML aggregation of social media data to campus issues**, specifically Silent Sam.
![Silent Sam](http://www.newsobserver.com/news/local/crime/mj3rol/picture167359702/alternates/FREE_640/RAL_%20081317-SILENT-SAM-TEL-004)

# Potential Ideas
- aggregate tweets related to #SilentSam -> run tweets through Watson Sentiment analysis -> represent the sentiment using lights or physical visual indicator surrounding statue
- show a physical NC map separated by county. Counties light up based on tweets from people from each county. When a certain threshold is reached(visual indicator reaches an extreme), an email is autogenerated and sent to respective legislator with tweet contents
- Venmo integration: when a certain visual indication is reached via Watson Sentiment, send a venmo link to all who've tweeted to enable crowdsourcing donations (to fund UNC Black Student Movement, poltiical campaigns, etc)


text:
# Making Screencasts on MacOS

<!-- generate a ToC with "markdown-toc -i README.md" -->

<!-- toc -->

- [Record with QuickTime](#record-with-quicktime)
  * [Make sure the resolution is just enough](#make-sure-the-resolution-is-just-enough)
  * [Trim and/or Edit](#trim-andor-edit)
  * [Convert to MP4](#convert-to-mp4)
- [Record with Zoom](#record-with-zoom)
- [Split the MP4 video](#split-the-mp4-video)
- [Add captions using AWS transcribe service](#add-captions-using-aws-transcribe-service)
- [Improve automated transcription with custom vocabulary](#improve-automated-transcription-with-custom-vocabulary)
- [Manually review and fix the transcription](#manually-review-and-fix-the-transcription)
- [Generate a transcript with video references](#generate-a-transcript-with-video-references)
- [Wrap in HTML with some Javascript controls](#wrap-in-html-with-some-javascript-controls)
- [Batching it all up](#batching-it-all-up)
- [Review locally before deploying](#review-locally-before-deploying)
- [Deploy to a web server](#deploy-to-a-web-server)
- [Deploy to Google Docs](#deploy-to-google-docs)
- [Browser Compatibility](#browser-compatibility)

<!-- tocstop -->

## Record with QuickTime

Use [Command-Shift-5](https://support.apple.com/en-us/HT208721) and make a Quicktime recording.

For an alternative, see [Record with Zoom](#record-with-zoom), below.

### Make sure the resolution is just enough

Note that recording the Retina display makes a giant resolution file. Find a way to reduce it to something reasonable.

Here are some speed comparisons:

ffmpeg conversion of a 5:54 long fullscreen recording (3360 x 2114 resolution, 60 fps):
```
frame=  432 fps= 60 q=31.0 size=    1042kB time=00:00:07.12 bitrate=1198.7kbits/s speed=0.993x
```

The same video after downscaling the Quicktime and reducing the frame rate from 60 to 15 fps with ffmpeg
(Quicktime Export as 720p; 1152 x 738 resolution, 15 fps):
```
frame= 1525 fps=252 q=27.0 size=    5888kB time=00:01:42.57 bitrate= 470.3kbits/s dup=0 drop=4355 speed=  17x
```

Using ffmpeg to downscale the QuickTime works OK too (and can be batched). It runs at about 2.5x.

```
ffmpeg -i resolution.mov -vcodec h264 -acodec mp2 -r 15 -vf "scale=qhd" resolution-scaled-qhd.mp4
```

Some size comparisons of various scaled resolutions:

```
(env) screencast$ ls -l 02/01jsonapi*.mp4
-rw-r--r--  1 ac45<PHONE_NUMBER>  43916456 Jul  6 14:44 02/01jsonapi-15fps.mp4
-rw-r--r--@ 1 ac45<PHONE_NUMBER>  24769616 Jul  6 14:16 02/01jsonapi-720-15fps.mp4
-rw-r--r--@ 1 ac45<PHONE_NUMBER>  32668772 Jul  6 14:13 02/01jsonapi-720.mp4
-rw-r--r--@ 1 ac45<PHONE_NUMBER>  21752453 Jul  6 14:51 02/01jsonapi-scaled-840-528.mp4
-rw-r--r--  1 ac45<PHONE_NUMBER>  21492952 Jul  6 15:05 02/01jsonapi-scaled-hd480.mp4
-rw-r--r--@ 1 ac45<PHONE_NUMBER>  25663549 Jul  6 14:58 02/01jsonapi-scaled-hd720.mp4
-rw-r--r--  1 ac45<PHONE_NUMBER>  22618104 Jul  6 15:08 02/01jsonapi-scaled-qhd.mp4
-rw-r--r--  1 ac45<PHONE_NUMBER>  73275598 Jul  6 11:47 02/01jsonapi.mp4
```

### Trim and/or Edit

Within the screen recording you can trim off the beginning and end. Use iMovie or something else to edit further.

### Convert to MP4

Next, convert the MOV video to MP4 so it can be viewed in a browser.
You can use [ffmpeg](https://ffmpeg.org/ffmpeg.html) for this.

```
$ brew install ffmpeg
$ ffmpeg -i test.mov -vcodec h264 -acodec mp2 -r 15 test.mp4
```

## Record with Zoom

A perhaps better alternative to recording with QuickTime, although one that comes at a cost, is to record a Zoom
meeting with yourself.  Unlike with QuickTime recordings that can only record the full screeen or a portion of it,
Zoom can record the full screen or a specific application window.  When recording, select Record on this Computer.
At the end of the meeting, the recording will be delivered as an MP4 so you don't have to transcode with with ffmpeg.

## Split the MP4 video

The Zoom session may contain multiple topics. You can split the zoom_0.mp4 into multiple files
with tools like avidemux:

```
$ brew cask install avidemux
```

In Finder, go to Applications and open Avidemux, then:

1. File/Open zoom_0.mp4
2. Click on "A" to set the start point of the clip.
3. Scroll forward to the end and click on "B".
4. Select "MP4 Muxer" as the Output Format.
5. Select "Save" and give it a name (e.g. zoom_1.mp4).

## Add captions using AWS transcribe service

Create a [WEBVTT](https://www.w3.org/TR/webvtt1/) file and just add the text track `<track>`.

See [aws-transcribe.py](aws-transcribe.py) which does a few things:
```text
usage: aws-transcribe.py [options] infile outfile

positional arguments:
  infile                local file or s3 url
  outfile               output VTT file

optional arguments:
  -h, --help            show this help message and exit
  --srt SRT             output SRT file
  --profile PROFILE     AWS config profile [default alan:CTO]
  --job JOB             existing AWS transcribe job
  --saved_job SAVED_JOB
                        use saved AWS transcribe job output
  --job_delete          delete transcription job
  --vocabulary VOCABULARY
                        custom vocabulary to use [default: jsonapi]
  --s3bucket S3BUCKET   s3 bucket [default: n2ygk]
  --s3_delete           delete s3 file
```

- Copies the .mp4 file to S3. If the file is already there, provide an s3:// URL that references it.
- Submits a transcribe job. If the job has already been submitted, provide the `--job` option.
- Waits for the job to complete.
- Pulls the transcription data from AWS.
- Merges the individual words and punctionation into phrases.
- Outputs a .VTT file.
- Deletes the transcripion job results unless `--no_delete` option is used.

## Improve automated transcription with custom vocabulary

The transcription will likely have some systemic errors for things like jargon, specific acronynms and so on.
You can upload a [custom vocabulary](https://docs.aws.amazon.com/transcribe/latest/dg/how-vocabulary.html) to
AWS and apply it to the transcription.

```text
(env) screencast$ aws s3 cp jsonapi-vocab.txt s3://n2ygk --profile alan:CTO
(env) screencast$ aws transcribe create-vocabulary --vocabulary-name jsonapi --language-code en-US --vocabulary-file-uri s3://n2ygk/jsonapi-vocab.txt --profile alan:CTO
{
    "VocabularyName": "jsonapi",
    "LanguageCode": "en-US",
    "VocabularyState": "PENDING"
}
...
(env) screencast$ aws transcribe list-vocabularies --profile alan:CTO
{
    "Vocabularies": [
        {
            "VocabularyName": "jsonapi",
            "LanguageCode": "en-US",
            "VocabularyState": "READY"
        }
    ]
}
```

Here's an example of some vocabulary improvments:
```diff
4,5c4,5
< 00:00:00.700 --> 00:00:04.970
< This is an introduction at rest ful ap eyes rests
---
> 00:00:00.700 --> 00:00:05.670
> This is an introduction at RESTful APIs rests APIs air
8,9c8,9
< 00:00:04.970 --> 00:00:07.870
< AP Eyes were frequently used for micro service is and
---
> 00:00:05.670 --> 00:00:07.510
> frequently used for microservices.
12,13c12,13
< 00:00:07.870 --> 00:00:10.140
< we'll talk a little bit more about that as we ...
---
291,297c283,285
< 73
< 00:03:43.980 --> 00:03:44.570
< hate. Oh,
<
< 74
< 00:03:44.570 --> 00:03:45.790
< yes, kind of thing,
---
> 71
> 00:03:43.980 --> 00:03:45.790
> HATEOAS kind of thing,
```

## Manually review and fix the transcription

The transcription will have some errors. Edit the `.vtt` file to fix them.
`aws-transcribe` will not overwrite an existing .vtt file.

Some further manual improvements:
```diff
240,241c240,241
< 00:03:12.070 --> 00:03:15.300
< which will get into later called JSON API I dot
---
> 00:03:12.070 --> 00:03:15.580
> -- which we will get into later -- called JSONAPI.org

```
## Generate a transcript with video references

[vtt2transcript.py](vtt2transcript.py) reads the (corrected) `.vtt` file and generates a hyperlinked
transcript where each phrase from the captioning causes the video to jump to the associated time.

## Review locally before deploying

NOTE: That when you try to test locally by just opening the file, the subtitles
[will not work in Chrome](https://stackoverflow.com/questions/3828898/can-chrome-be-made-to-perform-an-xsl-transform-on-a-local-file)
but will work in other browsers like Firefox. However, the transcript file refuses to display.

So, run a simple http server locally:
```text
(env) screencast$ npm install http-server -g
/usr/local/bin/http-server -> /usr/local/lib/node_modules/http-server/bin/http-server
/usr/local/bin/hs -> /usr/local/lib/node_modules/http-server/bin/http-server
+<EMAIL_ADDRESS>added 3 packages from 6 contributors and updated 10 packages in 0.905s
(env) screencast$ http-server
Starting up http-server, serving ./
Available on:
  http://<IP_ADDRESS>:8080
  http://<IP_ADDRESS>:8080
Hit CTRL-C to stop the server
```

## Deploy to a web server

Just copy the files to a web server:
```
(env) screencast$ scp videocontrols.js 02/01jsonapi.mp4 02/01jsonapi.vtt 02/01jsonapi.html 02/01jsonapi-transcript.html alan@cunix:public_html/
(env) screencast$ ssh alan@cunix chmod a+r public_html/01*
```

## Deploy to Google Docs

Google Docs magically handles MP4 files and you can even add captions:
1. Google only supports SRT transcript files. `aws-transcribe` has a `--srt FILE` option to generate
this at the same time as the VTT is generated.
1. Upload the MP4 video file to google docs.
1. Click on it after waiting a while -- it will tell you it's still processing it.
1. Click on the vertical `. . .` menu and select "manage caption tracks" and upload your SRT file.

## Browser Compatibility

TODO: So far this only works fully with Chrome.

Firefox: Fails to render the transcript text.

Safari: Fails to play sound.

repository: columbia-it/screencasts

repo_name: columbia-it/screencasts


text:
Surfacer provides several types of texturing primitives. It should not be used by itself. Instead, multiple Surfacers' output should be combined to create a sophisticated texture mask, and can also be combined with other complex texture masks, such as those generated by @RealColor, @HeightFrag, and @GeoShape.

## Properties

- **Amount**: The strength of the mask.
- **Output**: Type of output to create.
    - *Sprinkles* - a noisy convexity mask.
    - *Deposits* - a slope deposits mask.
    - *Edges* - an edge mask.
    - *Splotches* - random splotches on the terrain based on the neighboring terrain structures.
    - *Trace* - traces the most prominent shapes on the terrain.
    - *WindStreaks* - masks areas where winds would swipe across structures. Useful for weathering.

[!TIP]
See **GG2-Surfacer-1.tmd** for examples of using Surfacer to create texture masks.
[TIP!]

repository: QuadSpinner/GeoGlyph-Docs

branch_name: refs/heads/dev

repo_name: QuadSpinner/GeoGlyph-Docs


text:
# Where are the Eyes?

Where are the Eyes is a program for detecting and mapping surveillance cameras. Users mark cameras on their phone as they walk past them, and build a shared global map of surveillance.

Our hope is that Where are the Eyes will be widely adopted and used to help activists in two ways: to increase awareness of surveillance and authoritarian practices, and to plan activist movements.

You can read [more on our website!](https://eyes.daylightingsociety.org)

## Public Repository

The master branch of this repo represents the code currently on the App and Play Stores, as well as F-Droid. Code we are currently developing will be on other branches.

### Is anything different between this code and what is on my phone?

The apps on the App and Play stores will be cryptographically signed, but the code is identical.

## How do I build *Where are the Eyes*?

### Android

* Get a recent version of [Android Studio](https://developer.android.com/studio/index.html) and load the project in the 'Android' folder

* You will need to create an account with [MapBox](https://www.mapbox.com/) and put your API key in Constants.java

### iOS

* Get a recent version of [XCode](https://developer.apple.com/xcode/), and load the project in the 'iOS/Where are the Eyes' folder

* You will need to create an account with [MapBox](https://www.mapbox.com/) and put your API key in Info.plist

* You will also need to download the [MapBox framework](https://www.mapbox.com/ios-sdk/) and put it inside the project folder

### Server

Using your own *Where are the Eyes* server is not recommended because you will not see map updates from other users. The code is provided here so you can see exactly how your data is used once it reaches our servers.

If you want to run the server code for testing, we built it to be embedded in Apache using [Passenger](https://www.phusionpassenger.com/) and [Sinatra](http://www.sinatrarb.com/), along with a few dependencies specified in the Gemfile.

## How can I contribute?

We love bug reports, feature suggestions, and code contributions! We will not accept pull requests to master, since that code represents what is currently released on the App and Play stores.

## License

All the *Where are the Eyes* code and assets are released under the BSD 3-clause license. Read more in the 'LICENSE' file.

## Attribution

All button icons and image assets came from [Open Iconic](http://useiconic.com/open) (specifically version 1.1.1) under the MIT license. The only exceptions are the app logo itself, the camera marker image, and our media posters, created by the Daylighting Society.

repository: OSSSP/WhereAreTheEyes

gha_language: Java

repo_name: OSSSP/WhereAreTheEyes