text:
---
title: "Program Code"
weight: 30
pre: "<b>3. </b>"
---

{{% notice note %}}
Read this chapter to find out the cause of the detailed source code error.
[If you want to skip, directly go to solution..](/en/codequality/solve).
{{% /notice %}}

let`s look at the code first.
====================

{{% notice note %}}
ConcurrencySample Code is written in Java, Gradle.
{{% /notice %}}

{{% notice warning %}}
This code has a problem.
{{% /notice %}}

1. This is the structure of the source code.

    ```bash
    -src
        -main/java/com/example/
            -restservice
                -BasicSynchronization.java
                -ConcurrencyCheckout.java
                -SingletonRepo.java
            -s3
                -AwsCredentials-sample.propertie
                -AWSFileMapper.java
                -FileMapper.java
    ```

1.  let's take a look at the **SingletonRepo** file. **SingletonRepo** can only have one instance in the program. And sigletonsrepo have one HashMap. let's look at the putKey() function, which is the core of this class and lab.

    ```java
    public Object putKey(int product_code, int product_price, int tname) {
        if (map.containsKey(product_code)) {
            return map.get(product_code);
        }else{
            return map.put(product_code, new Concurrency(product_code,"test"));
        }
    }
    ```
    putKey works is simple. Check that HashMap has a number with containKey() and if not, save the number with put().

    ![source01](/images/structure_same_single.svg)
1. If the HashMap already has the same value, don't put it.
    ![source01](/images/structure_same_fail4.svg)

1. **BasicSynchronization** calls pukey() of SingletonRepo and inserts a randomly generated number between 0 ~ 10000 in 3000 times.

1. **ConcurrencyCheckout** is Main class. This class creates 5 BasicSynchronizations and starts 5 threads.
    ![source](/images/structure.svg)
1. this program repeats input to one HashMap by 5 threads.

--------------------

So what is the problem with this program?
====================

1. This code has a concurrency issue. if it call two PutKey() from two threads at the same time. What will happen?
![problem0](/images/strustured-same-function.svg)

    The putkey () of both threads will enter the same number in the HashMap and increment the Call Count.

    ```java
    if (map.containsKey(product_code)) {
        return map.get(product_code);
    }else{
        return map.put(product_code, new Concurrency(product_code,"test")); <-----first, second threadn function doing.
    }
    ```
1. The number is entered only once, but the call count is increased twice.
1. HashMap is not thread-safe. The code above is dangerous because get and put don't guarantee atomicity.
1. If the number of threads is increased and the number of putkey calls executed simultaneously increases, the result cannot be guaranteed.
1. An error occurs because the same problem appears in the UnitTest being executed. **SingletonRepotests**, a unit test that is performed, creates 8 threads and raises the count one by one when an input occurs in the HashMap. And after all the work is done, the number of values entered in the HashMap is compared with the number of occurrences. If the values are the same, the number of inputs and the number of HashMaps are the same, so the function worked correctly.

1. However, UnitTest will continue to fail because the current code was programmed without considering concurrency. Of course, if you are very lucky, the test may succeed. However, to prevent this, **SingletonRepotests** performs the same test 1000 times.

-[So how do you solve this problem?](/en/codequality/solve)


text:
---
authors:
  - "tannerwelsh"
team_size: 2
goal_id: 29
---

# Reverse-engineered social media site with HTML & CSS

## Description

Take screenshots of pages on a popular social media site (Twitter, Facebook, Pinterest), and reverse engineer the HTML and CSS from scratch.

You can copy images and inspect the page using developer tools, but avoid copy-pasting! You'll learn a lot more this way.

Get as close as you can to the screenshot.

You don't need to add behavior.
## Context

Looking at the design of an interactive social media site is a great way to learn just how powerful the code that drives them can be. It is in reading and re-writing the code where we can continue to enhance our learning.

Feel free to use frameworks and other libraries, but do not copy-paste, it is crucial that in typing the code out allows you to continually read and discover how the code works.

As you code your site, you will likely encounter scenarios that you may not have expected, which is fine, it only means that you have more opportunities to problem-solve!
## Specifications
- [x] Screenshot(s) of original site included in final product
- [x] Includes at least one error-free HTML page
- [x] CSS is written in its own file(s) and included in the HTML with a `<link>` element
- [x] Final, rendered HTML page(s) are almost indistinguishable from the original screenshot(s)
### Required

_Do not remove these specs - they are required for all goals_.
- [x] The artifact produced is properly licensed, preferably with the [MIT license](https://opensource.org/licenses/MIT).
## Quality Rubric
- Code is well formatted without any linting errors [25pts]
- Proper spacing and indentation are used in all HTML & CSS files [25pts]
- CSS classes, ids, etc. are meaningfully named [25pts]
- HTML/CSS files are well organized into a meaningful file structure [25pts]

---

license: MIT

repository: looknotime/web-development-js

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: looknotime/web-development-js


text:
Lost Toys
=========

A mobile app to help you adopt and find Lost Toys.

An experiment with Oracle MAF and Estimote beacons.

Technologies Used
-----------------

* Oracle JDeveloper <IP_ADDRESS>.0
* Oracle Mobile Application Framework <IP_ADDRESS>.41
* Oracle Application Express <IP_ADDRESS>.08

Framework Features
------------------

* Utilises the [Cordova iOS plugin](https://github.com/apps-ux-ibeacons-hackathon/beacons-cordova-2.x-plugin-for-ios) to interface with Estimote Beacons.
* Customizations were made to the plugin to allow it to vibrate and play sound when toys are detected.
* Uses the Preferences feature of MAF to allow users to specify the UUID for the set of Beacons to use, specify the alert sound to use, specify the "hug proximity", and turn on a debugging mode to display additional information.
* Uses the MAF local SQLite database for storage of the aopted toys and their pictures, as Base64 strings.
* Interfaces to the device camera and gallery for pictures.
* Random names are generated by calling a RESTful web-service running on Oracle APEX.

How It Works
------------
1. Take a toy, Skylanders work well, and put a beacon in it.
    ![Inserting the beacon](resources/screens/shot_01.jpg)

2. Start up the app.
    ![The app's icon](resources/screens/shot_02.jpg) ... ![The splash screen](resources/screens/shot_03.jpg)

3. You haven't yet adopted any Lost Toys, click the link.
    ![Empty gallery](resources/screens/shot_04.jpg)

4. Hug the toy you want to adopt.
    ![Waiting for a toy](resources/screens/shot_05.jpg)

5. Now you can take his picture, or choose an existing one, and change his name.
    ![New toy found](resources/screens/shot_06.jpg)

6. You can generate a random Girl or Boy name by clicking the links, or enter your own.
    ![Picture taken, random name](resources/screens/shot_07.jpg)

7. Now your adopted toy appears in the gallery. You can adopt as many toys as you like. If you lose the toy (like my kids do all the time) you can find it by tapping it in the gallery.
    ![New toy adopted](resources/screens/shot_08.jpg)

8. In the Finder, the dial shows how close you are to the Lost Toy. You can also use this feature to play Hide'n'Seek with the toy!
    ![Finding a  lost toy](resources/screens/shot_09.jpg)

9. Once you find a Lost Toy, and hug it, you're rewarded with love! And you can take a new picture, or rename him.
    ![Found a lost toy](resources/screens/shot_10.jpg)

Conclusion
----------

A very simple app, totalling about 24 hours of development over several evenings, that demonstrates the use of a number of MAF features. Used to investigate the workings of Estimote beacons, and the latest release of JDeveloper and MAF.

I think it could be developed into a cool range of toys for Christmas! Or maybe that's just 'cos my kids are always losing stuff.

You can find more details of how it was developed, in the [wiki](https://github.com/exjones/lost-toys/wiki).

repository: franciscocpg/lost-toys

repo_name: franciscocpg/lost-toys


text:
# Illusion

Illusion is an opinionated, mobile-first, progressive enhanced, accessible, SCSS base kit to kickstart your projects. It combines modern web-design philosophies to write consistent, maintainable and clean SCSS code in less time.

[https://illusion.timble.net](https://illusion.timble.net)

repository: ghermans/illusion

repo_name: ghermans/illusion


text:
# Udyat
Convotutional Neural Network to make action recognition and stop crime, also the data is save or store in a json for future implementations

In the root of the project

python index.py -p "path to the video"

To start the video analyzer

example videos paths:

"example_clips/lifting.mp4"

"example_clips/Robbery033.mp4"

"example_clips/Robbery137.mp4"

"example_clips/Robbery142.mp4"

"example_clips/soccer.mp4"

"example_clips/boxing.mp4"

to select specific video clips change the -i flag
or use
python predict_video.py -m "model/model.h5" -l "model/bin.pickle" -i "example_clips/lifting.mp4" -o "output/output.mp4" -s 128

repository: juancgar/Udyat

gha_language: Python

gha_license_id: MIT

repo_name: juancgar/Udyat


text:
<!--
Output From `ipfs version --all`

If your version is older than *0.4.11* please update
and re-check if the problem persists.
-->
#### Version information:

<!-- Bug, Feature, Enhancement, Etc -->
#### Type:

<!-- One of following:
    Critical - System crash, application panic.
    High - The main functionality of the application does not work, API breakage, repo format breakage, etc.
    Medium - A non-essential functionality does not work, performance issues, etc.
    Low - An optional functionality does not work.
    Very Low - Translation or documentation mistake. Something that really does not matter much but should be noticed for a future release. -->
#### Severity:

#### Description:

<!--
This is for you! Please read, and then delete this text before posting it.
The go-ipfs issues are only for bug reports and directly actionable features.
Read https://github.com/ipfs/community/blob/master/contributing.md#reporting-issues if your issue doesn't fit either of those categories.
Read https://github.com/ipfs/go-ipfs/blob/master/docs/github-issue-guide.md if you are not sure how to fill in this issue.
-->

repository: iosifpeterfi/go-ipfs

repo_name: iosifpeterfi/go-ipfs


text:
# CURRICULUM

###### All code in this repository is supplied as demonstrating the exercises and projects completed for freecodeCamp.
###### Links provided are currently codepens.
###### Any critism or constructive advice is always appreciated.
###### The format for this repository was inspired by the format used by user/brusbilis and their completion of the freeCodeCamp cirriculm.

## Key

##### strikethrough e.g. ~~Not Started~~ project not attempted yet.

## FRONT END

### Responsive Web Design Certification

* [Tribute Page](https://codepen.io/EvanPlayle/pen/KGXqYx) **to upload**
* [Personal Portfolio](https://codepen.io/EvanPlayle/pen/KGXqYx) **to upload**
* [Survey Form](https://codepen.io/EvanPlayle/pen/KGXqYx) **to upload**
* [Product Landing Page](https://codepen.io/EvanPlayle/pen/KGXqYx) **to upload**
* [Technical Documentation Page](https://codepen.io/EvanPlayle/pen/KGXqYx) **to upload**

### Javascript Algorithms And Data Structures Certification

* [Palindrome Checker](https://codepen.io/EvanPlayle/pen/KGXqYx) **to upload**
* [Roman Numeral Converter](https://codepen.io/EvanPlayle/pen/KGXqYx) **to upload**
* [Caesars Cipher](https://codepen.io/EvanPlayle/pen/KGXqYx) **to upload**
* [Telephone Number Validator](https://codepen.io/EvanPlayle/pen/KGXqYx) **to upload**
* [Cash Register](https://codepen.io/EvanPlayle/pen/KGXqYx) **to upload**

### Front End Libraries Certification

* [Javascript Calculator](https://codepen.io/EvanPlayle/pen/KGXqYx) **to upload**
* [Pomodoro Clock](https://codepen.io/EvanPlayle/pen/KGXqYx) **_In Progress_**
* [Markdown Previewer](https://codepen.io/EvanPlayle/pen/KGXqYx) **testing**
* [Random Quote Machine](https://codepen.io/EvanPlayle/pen/KGXqYx) **to upload**
* [Drum Machine](https://codepen.io/EvanPlayle/pen/KGXqYx) **to upload**

### Data Visualization Certification

* [Bar Chart](https://codepen.io/EvanPlayle/pen/KGXqYx) **testing**
* [Scatterplot Graph](https://codepen.io/EvanPlayle/pen/KGXqYx) **testing**
* ~~[Heat Map](https://codepen.io/EvanPlayle/pen/KGXqYx)~~ **testing**
* ~~[Choropleth Map](https://codepen.io/EvanPlayle/pen/KGXqYx)~~ **_In Progress_**
* ~~[Treemap Diagram](https://codepen.io/EvanPlayle/pen/KGXqYx)~~

### Apis And Microservices Certification

* ~~[Timestamp Microservice](https://codepen.io/EvanPlayle/pen/KGXqYx) **_In Progress_**
* ~~[Request Header Parser Microservice](https://codepen.io/EvanPlayle/pen/KGXqYx)~~
* ~~[URL Shortener Microservice](https://codepen.io/EvanPlayle/pen/KGXqYx)~~
* ~~[Exercise Tracker](https://codepen.io/EvanPlayle/pen/KGXqYx)~~
* ~~[File Metadata Microservice](https://codepen.io/EvanPlayle/pen/KGXqYx)~~

### Information Security And Quality Assurance Certification

* ~~[Metric-Imperial Converter](https://codepen.io/EvanPlayle/pen/KGXqYx)~~
* ~~[Issue Tracker](https://codepen.io/EvanPlayle/pen/KGXqYx)~~
* ~~[Personal Library](https://codepen.io/EvanPlayle/pen/KGXqYx)~~
* ~~[Stock Price Checker](https://codepen.io/EvanPlayle/pen/KGXqYx)~~
* ~~[Anonymous Message Board](https://codepen.io/EvanPlayle/pen/KGXqYx)~~

repository: Ampersandme/freeCodeCamp

repo_name: Ampersandme/freeCodeCamp


text:
# CountDownTimerLibrary

Its a simple countdown timer library. You can create multiple instances of the timer with very less overhead on the CPU.

Example: Countdown for 5 seconds.
```C#
  CountDownTimer timer = new CountDownTimer(new TimeSpan(0,0,0,5));
  timer.Start();
  //Do work for 3 seconds
  //Call timer.Remaining() to get the remaining time.
  Console.WriteLine(timer.Remaining()); //prints 00:00:02.00000
  //It can be called multiple times.
  //When the timer runs out, the time remaining is returned as a negative TimeSpan
  //the calling function will have to handle it accordingly.
  //Below code called after 10 seconds
  Console.WriteLine(timer.Remaining()); //prints -00:00:05.00000
```

repository: nikhileshjoshi/CountDownTimerLibrary

repo_name: nikhileshjoshi/CountDownTimerLibrary


text:
[![Release](https://img.shields.io/github/release/velescore/telegram-bot.svg?branch=master)](https://github.com/velescore/telegram-bot/releases)
[![Build Status](https://travis-ci.com/velescore/telegram-bot.svg?branch=master)](https://travis-ci.org/velescore/telegram-bot)
[![go-doc](https://godoc.org/github.com/velescore/telegram-bot?status.svg)](https://godoc.org/github.com/velescore/telegram-bot)
[![Go Report Card](https://goreportcard.com/badge/github.com/velescore/telegram-bot)](https://goreportcard.com/report/github.com/velescore/telegram-bot)
[![Followers](https://img.shields.io/twitter/follow/velescore.svg?style=social&label=Follow)](https://twitter.com/velescore)

# Velescore telegram bot

## Commands

```
	      	/h or /help 	  display help message
		/p <symbol> 	  info about coin price
		/s <symbol> 	  info about supply
		/c <symbol> 	  info about price change
		/a <symbol>	  info about ATH
```

## Telegram address
https://t.me/Velescore
## Binary releases
https://github.com/velescore/telegram-bot/releases

## Building project from source

```
git clone git@github.com:velesscore/telegram-bot.git
cd telegram-bot/
make
```

## Running bot
Basic usage: ```./telegram-bot run -t "telegram_bot_api_key"```

Where telegram_bot_api_key can be generated as described https://core.telegram.org/bots#creating-a-new-bot

Additional parameters are described in help section:
```./telegram-bot run --help```

By default [/metrics](http://localhost:9900/metrics) endopoint is launched which is compatibile with https://prometheus.io/

## Version checking
```./telegram-bot version```

repository: blbruegg/telegram-bot

repo_name: blbruegg/telegram-bot


text:
# YugaByteDB w/ Docker Compose

with default empty password

## Connecting with client

```
docker exec -it yb-tserver-n1 /home/yugabyte/bin/ysqlsh -h yb-tserver-n1
```

## Other docs

[yugabyte docker compose](https://docs.yugabyte.com/latest/deploy/docker/docker-compose/)

repository: alexmacarthur/local-docker-db

gha_language: Go

repo_name: alexmacarthur/local-docker-db


text:
---
speaker: Aiyappan S (IISc Mathematics)
title: "Unfolding Operators in Various Oscillatory Domains: Homogenization of Optimal Control Problems"
date: 18 December, 2017
time: 10:30 am
venue: LH-3, Mathematics Department
series: Thesis
series-prefix: PhD
series-suffix: defence
---

Homogenization of boundary value problems posed on rough domains has paramount importance in real life problems. Materials with oscillating (rough) boundary are used in many industrial applications like micro strip radiator
and nano technologies, biological systems, fractal-type constructions, etc. In this talk, we will be focusing on homogenization of optimal control problems. We will begin with homogenization of a boundary control problem on an
oscillating pillar type domain. Then, we will consider a time-dependent control problem posed on a little more general domain called branched structure domain. Asymptotic analysis of this interior control problem will be explained.
Next, we will present a generalized unfolding operator that we have developed for a general oscillatory domain. Using this unfolding operator, we study the homogenization of a non-linear elliptic problem on this general highly
oscillatory domain. Also, we analyse an optimal control problem on a circular oscillating domain with the assistance of this operator. Finally, we consider a non-linear optimal control problem on the above mentioned general
oscillatory domain and study the asymptotic behaviour.

repository: siddhartha-gadgil/DeptWeb

gha_language: HTML

repo_name: siddhartha-gadgil/DeptWeb


text:
---
layout: default
---

# 1995-09-30 - Computer Misuse Detection System

## Header Data

From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: cff0aad0d9e3d7678bf4d11bcab12c6e5008582263620461fad853b3f21eb66d

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1995-09-30 11:09:16 UTC

Raw Date: Sat, 30 Sep 95 04:09:16 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>Date: Sat, 30 Sep 95 04:09:16 PDT
To<EMAIL_ADDRESS>Subject: Computer Misuse Detection System
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

URL: http://www.saic.com/products/cmds/index.html

   *** Products and Services ***

_________________________________________________________________

                       COMPUTER MISUSE DETECTION SYSTEM

                [CMDS]

   Caught in the Act
          Until now, computer misuse could not be detected
until after
          the damage was done. With CMDS, the system alerts you
to
          suspicious computer activity as it takes place so you
can react
          immediately.

   Round the Clock Security
          CMDS never sleeps. Computer misuse characteristically
takes
          place at times when you are not expecting it. If an
intruder
          rattles your door knob at 2:00 AM, CMDS is there to
watch the
          shop.

   Make the Intruders Think Twice
          Knowing that security software of this type is
installed will
          give the potential misusers reason to reconsider
their actions.
          CMDS affects the intruder's motivations by
threatening them
          with unseen protection. Like police radar, they won't
know it's
          there until they've been caught!

   Security Through Pictures
          If a picture is worth a thousand words and then CMDS
speaks
          volumes about the security status of your network.
The security
          trending reports show you, graphically, all the
information you
          need to identify the intruders.

   Off-the-Rack or Tailor Made
          A well made suit off-the-rack can meet the needs of
most people
          at tremendous cost savings. However, a tailor-made
suit may be
          necessary when the person in need has special
requirements.
          SAIC can tailor a system using CMDS core technology
to meet any
          large heterogeneous network or detection
requirements.

   Increase Efficiency While Reducing Cost, Time Spent, and
Losses
          CMDS will increase efficiency of your security
operations by
          performing faster than a manual review process. Your
security
          staff will be freed up for other activities reducing
your
          overall cost. Your losses will decrease through the
deterrence
          and detection capabilities of CMDS.

_________________________________________________________________

More About CMDS...

          o Detecting Computer Crime
          o Product Description
          o Designed to Detect
          o Detection Capabilities
          o System Requirements
          o Licensing and More Information

_________________________________________________________________

Intrusion Detection Research Papers

          Audit Reduction and Misuse Detection in Heterogeneous
          Environments: Framework and Application.
          Click here to download Macintosh Microsoft Word 5.1
file
          (464K).

_________________________________________________________________

   Copyright SAIC Home

_________________________________________________________________

    Last updated on 07-10-95

{% endraw %}
```

## Thread

+ Return to [September 1995](/archive/1995/09)

+ Return to "[anonymous@freezone.remailer](/authors/anonymous_at_freezone_remailer)"

+ 1995-09-30 (Sat, 30 Sep 95 04:09:16 PDT) - Computer Misuse Detection System -<EMAIL_ADDRESS>


text:
# GemCommonsKit

Most common features that are commonly used and/or reusable can be found in this repo.

## Getting Started

GemCommonsKit requires Swift 5.1.

### Setup for integration:

-   **Carthage:** Put this in your `Cartfile`:

        github "gematik/ref-GemCommonsKit" ~> 1.0

### Setup for development

You will need [Bundler](https://bundler.io/), [XcodeGen](https://github.com/yonaskolb/XcodeGen)
and [fastlane](https://fastlane.tools) to conveniently use the established development environment.

1.  Update ruby gems necessary for build commands

        $ bundle install --path vendor/gems

2.  Checkout (and build) dependencies and generate the xcodeproject

        $ bundle exec fastlane setup

3.  Build the project

        $ bundle exec fastlane build_all [build_mac, build_ios]

## Use

Logging with `DLog()`:

    DLog("Any message")

repository: spilikin/ref-GemCommonsKit

gha_license_id: NOASSERTION

repo_name: spilikin/ref-GemCommonsKit


text:
---
title: OnRowDropped
page_title: OnRowDropped - RadGrid
description: Check our Web Forms article about OnRowDropped.
slug: grid/client-side-programming/events/onrowdropped
tags: onrowdropped
published: True
position: 61
---

# OnRowDropped

##

Telerik.Web.UI.GridDataItemCancelEventArgs OnRowDropped Property

>note To get or set property values for client API properties, you must call property accessor methods that are named with the get_ and set_ prefixes. For example, to get or set a value for a property such as [cancel](https://msdn.microsoft.com/en-us/library/bb310859.aspx), you call the get_cancel or set_cancel.
>

This event can be handled if you would like to execute some extra code logic prior to the server-side OnRowDrop event rising. This event cannot be cancelled and have the same set of arguments as the [OnRowDropping]({%slug grid/client-side-programming/events/onrowdropping%}) client event.

|  **Fired by**  | RadGrid |
| ------ | ------ |
| **Arguments** | **destinationHtmlElement** - target html element. Will be null if the user has dropped over a GirdDataItem **domEvent** - dom event **draggedItems** - an array of the dragged GridDataItems **dropPosition** - indicates the position of the drop indicator if the user has dropped over a RadGrid row - "above" or "below" it **targetGridDataItem** - the GridDataItem over which the user is dropping. May be null if the GridDataItem has not been instantiated beforehand **args.get_TargetDataKeyValue(columnName)** - a method that returns a data key value for the specified column name of the target GridDataItem **targetItemId** - the ClientID of the targer GridDataItem **targetItemIndexHierarchical** - the hierarchical index of the target GridDataItem **targetItemTableView** - the GridTableView object, to which the target GridDataItem belongs **targetRadGrid** - the target RadGrid object|
| **Can be canceled** |No|

Example:

````ASP.NET
<telerik:RadGrid RenderMode="Lightweight" ID="RadGrid1" runat="server">
    <ClientSettings>
        <ClientEvents OnRowDropped="RowDropped" />
    </ClientSettings>
</telerik:RadGrid>
````

````JavaScript
function RowDropped(sender, eventArgs) {
    alert("Dropped target element id is: " + eventArgs.get_destinationHtmlElement().id);
}
````

repository: telerik/ajax-docs

gha_language: C#

repo_name: telerik/ajax-docs


text:
Even China and India have accelerated their investments in cost-effective renewable energy sources and reduced their reliance on fossil fuels.

On Sunday, Republican Sen. Lindsey Graham rebuked 22 of his GOP colleagues, including Senators Cruz and Cornyn, for their letter urging Trump to withdraw from Paris. “Withdrawal from the agreement,” he said, "would be taken as a statement that climate change is not a problem, is not real."

To side with Trump and the fossil fuel billionaires over the overwhelming majority of Americans who support the accord is a crime against the future of people and the planet. The U.S. under this Administration is ceding a leadership role in an increasingly important global arena.

**Call Senators Cruz and Cornyn and tell them it’s time for the U.S. to join the 21st century and the rest of the modern world to stop climate change. There are no jobs on a dead planet.**

## SAMPLE SCRIPT:
>Hi, I’m a constituent of Senator [Cruz/ Cornyn]. My name is _________ and I live in _________. I urge Sen. [Cruz/Cornyn] to support the Paris climate accord and to work to stop climate change. Anything else is reckless. Ultimately, such shortsightedness will give China the edge in new sciences for renewable energy and the role as the leader of the world.

## CONTACT INFO:

**Senator John Cornyn**\\
D.C. Office<PHONE_NUMBER>\\
Austin Office<PHONE_NUMBER>\\
Tyler Office<PHONE_NUMBER>\\

**Senator Ted Cruz**\\
D.C. Office<PHONE_NUMBER>\\
Austin Office<PHONE_NUMBER>\\
Tyler Office<PHONE_NUMBER>

## ADDITIONAL RESOURCES

* [Whatever Trump decides on Paris, he’s already taken the U.S. out of the climate game](https://www.washingtonpost.com/news/energy-environment/wp/2017/05/30/whether-or-not-trump-withdraws-from-paris-hes-already-put-the-brakes-on-climate-action/?tid=sm_tw&utm_term=.08145dbfa385)

**#StandIndivisible**


text:
# Fitness

Fitness is a HTML bootstap 4.5.3 template  for a newsletter.

## Installation

Clone or download and unzip the contents to your chosen folder.

```bash
git clone https://github.com/gondiski/fitness.git
```

## Usage

```html
<!--Edit the fields you'd like to see a change in below-->
<div class="row col border shadow-lg rounded bg-warning bg-gradient-warning px-0">
    <div class="col-8 bg-white h-75">
        <h1 class="display-2">Bhingi Fitness</h1>
        <p class="display-4">Be fit quicker</p>
        <h5 class="lead">Get weekly emails of curated packages that fits your fashion sense and style</h5>
        <br>
        <form action="">
            <div class="form-group">
            <input type="email" class="form-control rounded-pill"></div>
            <div class="form-group">
            <input type="submit" value="Subscribe" class="btn bg-warning bg-gradient-warning rounded-pill text-white">
            </div>
        </form>
        <footer class="footer">
            <a href="https://facebook.com/bhingia" class="text-dark">facebook</a> | <a href="https://twitter.com/bhingia" class="text-dark">twitter</a> | <a href="https://instagram.com/bhingia" class="text-dark">instagram</a> <br>
            <a href="./terms.html" class="text-dark">terms & conditions</a> | <a href="./privacy.html" class="text-dark">privacy</a>
        </footer>
    </div>
</div>
```

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

Please make sure to update tests as appropriate.

## License
[MIT](https://choosealicense.com/licenses/mit/)

repository: gondiski/fitness

branch_name: refs/heads/main

repo_name: gondiski/fitness


text:
# replicate.nvim

A simple plugin which interacts with REPLs in a language agnostic way.

## Installation

### Plugin Managers

I highly recommend that you install replicate.nvim with a plugin manager such as [vim-plug]. Each
manager has a slightly different way of working so see the specific manager's help, for example in
vim-plug you would put

    Plug 'Sean1708/replicate.nvim'

in your `init.vim` (usually `$HOME/.config/nvim/init.vim`) and run

    :PlugUpdate

to automatically install it.

[vim-plug]: https://github.com/junegunn/vim-plug

### Other

Alternatively you can use a runtimepath manager such as [pathogen] or, if you're particularly
masochistic, you can even
[install it manually](http://vimdoc.sourceforge.net/htmldoc/usr_05.html#05.4).

[pathogen]: https://github.com/tpope/vim-pathogen


text:
## Reports
Structured wordlists allow us to directly handle the words to learn and review them in an easier way. I've made some statistics on them and poked around finding some relations between them.

I devide the words into three categories of length: short words for length less than 7 charactors; intermediate words for length not less than 7 but less than 10 charactors; long words for longer than or equal to 10.

This devision is based on the following observations: Short words often doesn't consist of root. Mid words often consists of a root with a simple suffix. And long words are usually composed by a root with prefix, root and one or more than one suffixs. These different modes on word building *require* different ways to memorize them.

Another thing I found useful is to explore the relationship between the wordlists. It is supposed that if a word is found in more than one wordlist, it should be more important. Similarities and differencies of wordlists also suggest the quality of them.

### Magoosh GRE Flashcards wordlist (1000 words)
```
Short words (len < 7): 217 (21.70%)
Mid words (7 <= len < 10): 492 (49.20%)
Long words (10 < len): 291 (29.10%)
```

### GRE Vocabulary Upgrade (1080 words)
```
Short words (len < 7): 252 (23.38%)
Mid words (7 <= len < 10): 534 (49.54%)
Long words (10 < len): 292 (27.09%)
```

### Comparison between wordlists of Magoosh GRE flashcards and GRE Vocabulary Upgrade
They shared 672 words, which is supposed to be the most important words.

I dumped the list into `conj/magoosh-upgrade.json` and conducted the word-length statistics again:
```
Short words (len < 7): 149 (22.17%)
Mid words (7 <= len < 10): 335 (49.85%)
Long words (10 < len): 118 (27.98%)
```

repository: stephica/wordlists

repo_name: stephica/wordlists


text:
# syfin

**S**potify **f**rom **Y**ouTube **In**staller, or **syfin** (pronounced [`siphon`](https://www.google.com/search?q=siphon+pronunciation&safe=active&ssui=on)), is a Command Line Application that searches YouTube for any given Spotify track, album, or playlist, and installs the best matching MP3s.

[*This is a pet project that I'm not completely focused on, it might be a while before this is usable. :)*]

### Installation

TODO: Write installation instruction here.

### Usage

TODO: Write usage instruction here.

### Examples

You can find a comprehensive list of exmaples and snippets [`here`](https://github.com/frissyn/syfin/blob/master/EXAMPLES.md).

### Contributing

1. Fork the repository: [`Fork`](https://github.com/frissyn/syfin/fork)
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create a new Pull Request! 🎉

You can also re-create these steps with GitHub Desktop, Visual Studio Code, or whatever git version control UI you prefer.

### Developement

##### **CLI:**

TODO: Write developement notes for CLI here.

##### **API:**

TODO: Write developement notes for API here.

repository: frissyn/syfin

repo_name: frissyn/syfin


text:
# StartingBlocks::Growl

Growl support for Starting Blocks

## Installation

Or install it yourself as:

    $ gem install starting_blocks-growl

## Usage

Install the gem, then type:

````
sb --growl
````

Check out [Starting Blocks](https://github.com/darrencauthon/starting_blocks) for more details.


text:
# APP NAME

## Branjo's Pitch

# AUTHOR
# brian njoroge

# DESCRIPTION

This is an app that allows users to create,submit,vote pitches based on categories

#### User Stories

* A users can see pitches that other people have posted
* A user can vote on posted pitches with either a down or an up vote
* A user can comment on different pitches and leave feedback
* A user can submit a pitch in any category
* A user can submit to different categories

## Prerequisites
* Python3.6

## Installation steps
* $ git clone
* $ cd IP-Pitch
* $ source virtual/bin/activate
* Inside the manage.py module change the config_name parameter from 'production' to 'development' ie app = create_app('production') should be app = create_app('development')
* $ ./start.sh

# How it works

* A user needs to sign up
* A user the needs to login in order to create,vote and post pitches.

# Technologies Used
* HTML5/CSS
* Bootstrap
* Python3.6
* flask

# Support and Contacts
https://github.com/njorogebrian

# License

* MIT License

Copyright (c) 2019 brian marcel njoroge

repository: njorogebrian/pitch

repo_name: njorogebrian/pitch


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

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

## [Unreleased]

## [0.2.0] - 2019-06-10
### Fixed
- Prevent restart of workers after exit.

### Added
- Enable reaping of zombie processes in services.

### Changed
- Require docker >= 4.0.

### Removed
- Remove unused pinned requirements.

## [0.1.3] - 2019-04-03
### Fixed
- Fix Docker API error due to explicitly attaching service to ingress network.

## [0.1.2] - 2019-03-31
### Fixed
- CI: Do not reject jobs for tagged commits.

## [0.1.1] - 2019-03-31
### Fixed
- Fix `docker.errors.NullResource` due to empty container ID.

## 0.1.0 - 2019-03-31
### Added
- Initial version.

[Unreleased]: https://github.com/cjolowicz/buildbot-docker-swarm-worker/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/cjolowicz/buildbot-docker-swarm-worker/compare/v0.1.3...v0.2.0
[0.1.3]: https://github.com/cjolowicz/buildbot-docker-swarm-worker/compare/v0.1.2...v0.1.3
[0.1.2]: https://github.com/cjolowicz/buildbot-docker-swarm-worker/compare/v0.1.1...v0.1.2
[0.1.1]: https://github.com/cjolowicz/buildbot-docker-swarm-worker/compare/v0.1.0...v0.1.1

repository: cjolowicz/buildbot-docker-swarm-worker

repo_name: cjolowicz/buildbot-docker-swarm-worker


text:
### [CVE-2020-13963](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-13963)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

SOPlanning before 1.47 has Incorrect Access Control because certain secret key information, and the related authentication algorithm, is public. The key for admin is hardcoded in the installation code, and there is no key for publicsp (which is a guest account).

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/Live-Hack-CVE/CVE-2020-13963

repository: trickest/cve

repo_name: trickest/cve


text:
---
published: true
title: SUM( null) != null + 0
tags: sql online null
---
## [SQlite online](http://tpcg.io/AT8Not )

- sum(X) filter null
- null + X => gives null

{% highlight sql %}
select sum(val), count(*)
from ( select 1 + null as val, 1 as row
union
select 4 as val, 1 as row
) t
group by row
{% endhighlight %}


text:
dupfind
=======

## DESCRIPTION

File deduplicator written in Perl as a proof-of-concept for the
Dallas/Fort Worth Perl Mongers Winter 2013 hackathon competition.

## BUGS/CAVEATS

This code doesn't handle hard links.  This proof of concept code
is meant to give you one way to approach the problem.  It is not
meant to give you a full solution (you need to make your own).

Hint: for handling hard links, `perldoc -f lstat`

## AUTHOR

Tommy Butler

## LICENSE

Artistic License 2.0

repository: JTimothyKing/dupfind

repo_name: JTimothyKing/dupfind


text:
The `UncertainScalarPopulation` type allows representation of an uncertain scalar
represented by a population of values who will be sampled according to a vector of
explicitly provided probabilities. Think of it as an explicit kernel density estimate.

# Documentation

```@docs
UncertainScalarPopulation
```


text:
# List
'List' is an android app that helps create and manage lists in your day-to-day life.

## Motivation
I wanted an easy-to-use list app that serves my needs. I found that other list apps were not flexible enough.
So I started making this app to help keep track of my daily lists.

## Features
In the app, you can create multiple lists with each list having multiple items.
You can add due dates and details to your list items, and check off when complete.
You can group lists by tagging them and can view all the lists with the common tag names at one place.
A list can also be tagged to more than one group. This helps see the same list in different contexts.
You can delete items, lists and groups that you don't need anymore.

## Major Usecases -
1. Add a new list. Add items to the list.
2. Delete items from a list by swiping.
3. Add due date and details to an item in a list.
4. Check an item as done.
5. View the items under different tabs - All, Completed, Pending.
6. Delete an existing list by swiping. Also check undo of a swipe.
7. Create a new group in the Navigation Drawer.
8. Add a list to a new group.
9. Delete a group in the Navigation Drawer(Just deletes group name, and does not delete the lists in the group).

## Video Walkthrough
### Opening the app.
![](ListStartDemo.gif)

### Important usecases.
![](ListDemo1.gif)

repository: punamgit/List

repo_name: punamgit/List


text:
---
layout: "unit"
title: "Guide Entry 02.05.08"
path: "/curriculum/guides/2002/5/02.05.08.x.html"
unitTitle: "Healthy Diet, Healthy Eyes"
unitAuthor: "Joanne R. Pompano"
keywords: ""
recommendedFor: "Recommended for Science, Ecology, Environmental Science, Health, and Special Education, grades 9-12."
---

Guide Entry to 02.05.08:

A healthy well-balanced diet is essential to the growth and development of the visual system. This curriculum is designed to help students understand the relationship between a healthy diet and healthy eyes. It assists students in their efforts investigate the problems that occur when diets are not balanced or are tainted by growth and processing techniques. In addition, students are made aware of how certain eye conditions can develop or be controlled by certain foods or supplements to diets.

The unit begins by exploring the role of nutrition in the prenatal development of the visual system. It also provides information on the problems that occur such as diseases and disorders that are caused or made more problematic because of poor diets. It also investigates eye disorders and the role of diet in visual problems.

Developed for students in high school, this unit will assist visually impaired and blind students in their efforts to explore, analyze, and understand the importance of good nutrition for the health of an individual. The project will focus on the development and of healthy eyes and visual processing.

(Recommended for Science, Ecology, Environmental Science, Health, and Special Education, grades 9-12.)


text:
# MCLivingHealEvent

This event is fired just before an entity is healed. This allows you to
 modify the amount of healing or prevent it all together by canceling the
 event.

The event is cancelable.

If the event is canceled, the entity is not healed

The event does not have a result.

## Importing the class

It might be required for you to import the package if you encounter any issues (like casting an Array), so better be safe than sorry and add the import at the very top of the file.
```zenscript
import crafttweaker.api.event.entity.living.MCLivingHealEvent;
```

## Extending MCLivingEvent

MCLivingHealEvent extends [MCLivingEvent](/vanilla/api/event/entity/MCLivingEvent). That means all methods available in [MCLivingEvent](/vanilla/api/event/entity/MCLivingEvent) are also available in MCLivingHealEvent

## Methods

:::group{name=getAmount}

Gets the amount of healing.

Returns: The amount of damage to heal.
Return Type: float

```zenscript
// MCLivingHealEvent.getAmount() as float

event.getAmount();
```

:::

:::group{name=setAmount}

Sets the amount of healing.

Return Type: void

```zenscript
// MCLivingHealEvent.setAmount(amount as float) as void

event.setAmount(0.5);
```

| Parameter | Type | Description |
|-----------|------|-------------|
| amount | float | The amount of damage to heal. |

:::

## Properties

| Name | Type | Has Getter | Has Setter | Description |
|------|------|------------|------------|-------------|
| amount | float | true | true | Gets the amount of healing. |

repository: noobanidus/CraftTweaker-Documentation

gha_language: CSS

repo_name: noobanidus/CraftTweaker-Documentation


text:
# Contrib

There are lots of different ways of using Kubeval, this page collects some of those
contributed by users.

## Git pre-commit hook

Add the following to your Kubernetes configs repository in `.git/hooks/pre-commit` to trigger `kubeval` before each commit.

This will validate all the `yaml` files in the top directory of the repository.

```shell
#!/bin/sh -e

echo "Running kubeval validations..."

if ! [ -x "$(command -v kubeval)" ]; then
  echo 'Error: kubeval is not installed.' >&2
  exit 1
fi

# Inspect code using kubeval
if kubeval --strict -d . ; then
    echo "Static analysis found no problems."
    exit 0
else
    echo 1>&2 "Static analysis found violations that need to be fixed."
    exit 1
fi
```

repository: instrumenta/kubeval

repo_name: instrumenta/kubeval


text:
---
title: Starting the Coding
layout: post
author: jamie.carruthers
permalink: /monday-29th-january/
source-id: 1ufwlodEvd7wDRKImtsT7LUiN9WZOGM3OAwKBhly9zHQ
published: true
---
**Starting the Coding**                                                             29/1/18

Starting Point: We have planned our BuzzFeed quizzes.

Target for this lesson: To start the coding for our quiz.

Did I reach my target: Yes

Lesson Review

In the lesson we first posted the link to our blogs for review then we got onto the main part of our lesson. Starting to code the quiz. We were asked if we needed to have some help to start our coding. We all did. So we came to the front and were shown various programs for no discernable reason and eventually landed on a blank document where we were given an example of how to not code the blog in a sequential way but instead in a way where the majority of the code was a form of a function with some arrays thrown in as well and the code performing the functions was relatively small.

I decided this was too complicated so i went to the old fashion way of sequential coding, just asking a question then changing a variable based on the response then asking another question and changing the variable based on the response and so on. This was a lot easier as i could copy and paste the general format of asking questions and receiving answers to make the whole process quicker.


text:
---
title: Scene Element
icon: scene
tags: ["Element"]
layout: "page.njk"
excerpt: >
  The Scene Element sends a series of actions triggered by a single incoming action.
  They can be send out step by step using a defined delay or by actions.
---

In the configuration a list of `steps` is defined containing actions for other elements.

This list can be executed automatically using a defined `delay` and a `start` action
or can be started individually by a `next` action.

In normal cases when only one or few actions should be triggered multiple actions can be listed inline
in action configurations of elements.

![Scene Element Eb UI](sceneui.png)

The scene element allows sending multiple actions beyond this limit or when different element
need to send the same list of events but different values.

The scene element also can be used to configure presets of multiple element values
at a single place by using multiple scene definitions.

A scene element can also be controlled over the network by using a simple links like:

``` txt
http://homeding/api/state/scene/day?start=1
http://homeding/api/state/scene/night?start=1
http://homeding/api/state/scene/stations?next=1
```

## Element Configuration

<object data="/element.svg?scene" type="image/svg+xml"></object>

This element implements the following properties and actions:

> **steps[]** - This is an array of actions are emitted
> when the value of the scene element is set to any value.
>
> **delay** - This property can be set to enable automatic starting all steps one after one.
> This property specifies the delay duration like `2s`.
> When set to 0 (no automatic next step) a `next` action is required to advance to the next step. Default is `100ms`
>
> **start** - This action is used to start at step[0] and advance automatically when a delay is configured.
>
> **next** - This action will start sending the actions of the next step.
>
> **prev** - This action will start sending the actions of the previous step

{% include "./elementproperties.md" %}

### Configuration Example

This example shows how to configure this element:

``` json
{
  "scene": {
    "day": {
      "steps": [
        "light/ceiling?brightness=$v",
        "light/wall?brightness=$v",
        "switch/steps?value=0"
      ],
      "delay": 1
    },

    "night": {
      "steps": [
        "light/ceiling?brightness=0",
        "light/wall?brightness=0",
        "switch/steps?value=1"
      ],
      "delay": 0
    },
    "off": {
      "steps": [
        "light/ceiling?brightness=0",
        "light/wall?brightness=0",
        "switch/steps?value=0"
      ],
      "delay": 0
    }
  }
}
```

## State

Some internal values of the element can be observed in the state.

``` json
{
  "scene/night": {
    "active": "true"
  }
}
```

## See also

* [Select Element](/elements/select.md)


text:
time-resolutions
================

![Build status](https://api.travis-ci.org/binocarlos/timestamp-resolutions.png)

A collection of time resolutions in milliseconds

## installation

```
$ npm install time-resolutions
```

## usage

```js
var resolutions = require('time-resolutions');

// 150 milliseconds
var ms = 150;

var m = resolutions.resolve(ms); // millisecond

// 3.5 seconds
var secs = 3500;

var s = resolutions.resolve(secs); // second

// 2.5 weeks
var weeks = 2.5 * 1000 * 60 * 60 * 24 * 7;

var w = resolutions.resolve(weeks); // week

// how many milliseconds are in 3 weeks?
var ms = 3 * resolutions.week;
```

### var resolutions.resolve(ms)

Return a string that represents the resolution of the millisecond gap you provide.

### var ms = resolutions.ms('week')

Get how many milliseconds there are in a:

 * second
 * minute
 * hour
 * day
 * week
 * month
 * year

```js
var resolutions = require('time-resolutions');

var ms_in_a_week = resolutions.ms('week');
```

## license

MIT

repository: JodiWarren/Tomatnode

repo_name: JodiWarren/Tomatnode


text:
Semantic search for developers

-------------------------------------------------------------------------------------------------------------------------------------------------------

codequestion is a semantic search application for developer questions.

![demo](https://raw.githubusercontent.com/neuml/codequestion/master/demo.gif)

Developers typically have a web browser window open while they work and run web searches as questions arise. With codequestion, this can be done from a local context. This application executes similarity queries to find similar questions to the input query.

The default model for codequestion is built off the [Stack Exchange Dumps on archive.org](https://archive.org/details/stackexchange). Once a model is installed, codequestion runs locally, no network connection is required.

![architecture](https://raw.githubusercontent.com/neuml/codequestion/master/images/architecture.png#gh-light-mode-only)
![architecture](https://raw.githubusercontent.com/neuml/codequestion/master/images/architecture-dark.png#gh-dark-mode-only)

codequestion is built with Python 3.7+ and [txtai](https://github.com/neuml/txtai).

## Installation

The easiest way to install is via pip and PyPI

```
pip install codequestion
```

Python 3.7+ is supported. Using a Python [virtual environment](https://docs.python.org/3/library/venv.html) is recommended.

codequestion can also be installed directly from GitHub to access the latest, unreleased features.

```
pip install git+https://github.com/neuml/codequestion
```

See [this link](https://neuml.github.io/txtai/install/#environment-specific-prerequisites) for environment-specific troubleshooting.

## Download a model

Once codequestion is installed, a model needs to be downloaded.

```
python -m codequestion.download
```

The model will be stored in ~/.codequestion/

The model can also be manually installed if the machine doesn't have direct internet access. The default model is pulled from the [GitHub release page](https://github.com/neuml/codequestion/releases)

```
unzip cqmodel.zip ~/.codequestion
```

## Search

Start up a codequestion shell to get started.

```
codequestion
```

A prompt will appear. Queries can be typed into the console. Type `help` to see all available commands.

![demo](https://raw.githubusercontent.com/neuml/codequestion/master/demo.gif)

## Topics

The latest release integrates [txtai 5.0](https://medium.com/neuml/whats-new-in-txtai-5-0-e5c75a13b101), which has support for semantic graphs.

Semantic graphs add support for topic modeling and path traversal. Topics organize questions into groups with similar concepts. Path traversal uses the semantic graph to show how two potentially disparate entries are connected. An example covering both topic and path traversal is shown below.

![topics](https://raw.githubusercontent.com/neuml/codequestion/master/images/topics.gif)

## VS Code

A codequestion prompt can be started within Visual Studio Code. This enables asking coding questions right from your IDE.

Run `` Ctrl+` `` to open a new terminal then type `codequestion`.

![vscode](https://raw.githubusercontent.com/neuml/codequestion/master/images/vscode.png)

## API service

codequestion builds a standard txtai embeddings index. As such, it supports hosting the index via a [txtai API service](https://neuml.github.io/txtai/api).

Running the following:

_app.yml_
```yaml
path: /home/user/.codequestion/models/stackexchange/
embeddings:
```

```
# Install API extra
pip install txtai[api]

# Start API
CONFIG=app.yml uvicorn "txtai.api:app"

# Test API
curl "http://<IP_ADDRESS>:8000/search?query=python+query+sqlite&limit=1"
```

Outputs:
```json
[{
    "id":"616429",
    "text":"How to fetch data from sqlite using python? stackoverflow python sqlite",
    "score":0.8401689529418945
}]
```

Additional metadata fields can be pulled back with SQL statements.

```
curl
    --get
    --data-urlencode "query=select id, date, tags, question, score from txtai where similar('python query sqlite')"
    --data-urlencode "limit=1"
    "http://<IP_ADDRESS>:8000/search"
```

```json
[{
    "id":"616429",
    "date":"2022-05-23T10:45:40.397",
    "tags":"python sqlite",
    "question":"How to fetch data from sqlite using python?",
    "score":0.8401689529418945
}]
```

## Tech overview
The following is an overview covering how this project works.

### Process the raw data dumps
The raw 7z XML dumps from Stack Exchange are processed through a series of steps (see [building a model](#building-a-model)). Only highly scored questions with accepted answers are retrieved for storage in the model. Questions and answers are consolidated into a single SQLite file called questions.db. The schema for questions.db is below.

*questions.db schema*

    Id INTEGER PRIMARY KEY
    Source TEXT
    SourceId INTEGER
    Date DATETIME
    Tags TEXT
    Question TEXT
    QuestionUser TEXT
    Answer TEXT
    AnswerUser TEXT
    Reference TEXT

### Index
codequestion builds a txtai embeddings index for questions.db. Each question in the questions.db schema is vectorized with a sentence-transformers model. Once questions.db is converted to a collection of sentence embeddings, the embeddings are normalized and stored in Faiss, which enables fast similarity searches.

### Query
codequestion tokenizes each query using the same method as during indexing. Those tokens are used to build a sentence embedding. That embedding is queried against the Faiss index to find the most similar questions.

## Build a model
The following steps show how to build a codequestion model using Stack Exchange archives.

_This is not necessary if using the default model from the [GitHub release page](https://github.com/neuml/codequestion/releases)_

1.) Download files from Stack Exchange: https://archive.org/details/stackexchange

2.) Place selected files into a directory structure like shown below (current process requires all these files).

- stackexchange/ai/ai.stackexchange.com.7z
- stackexchange/android/android.stackexchange.com.7z
- stackexchange/apple/apple.stackexchange.com.7z
- stackexchange/arduino/arduino.stackexchange.com.7z
- stackexchange/askubuntu/askubuntu.com.7z
- stackexchange/avp/avp.stackexchange.com.7z
- stackexchange/codereview/codereview.stackexchange.com.7z
- stackexchange/cs/cs.stackexchange.com.7z
- stackexchange/datascience/datascience.stackexchange.com.7z
- stackexchange/dba/dba.stackexchange.com.7z
- stackexchange/devops/devops.stackexchange.com.7z
- stackexchange/dsp/dsp.stackexchange.com.7z
- stackexchange/raspberrypi/raspberrypi.stackexchange.com.7z
- stackexchange/reverseengineering/reverseengineering.stackexchange.com.7z
- stackexchange/scicomp/scicomp.stackexchange.com.7z
- stackexchange/security/security.stackexchange.com.7z
- stackexchange/serverfault/serverfault.com.7z
- stackexchange/stackoverflow/stackoverflow.com-Posts.7z
- stackexchange/stats/stats.stackexchange.com.7z
- stackexchange/superuser/superuser.com.7z
- stackexchange/unix/unix.stackexchange.com.7z
- stackexchange/vi/vi.stackexchange.com.7z
- stackexchange/wordpress/wordpress.stackexchange.com.7z

3.) Run the ETL process

```
python -m codequestion.etl.stackexchange.execute stackexchange
```

This will create the file stackexchange/questions.db

4.) __OPTIONAL:__ Build word vectors - only necessary if using a word vectors model. If using word vector models, make sure to run `pip install txtai[similarity]`

```
python -m codequestion.vectors stackexchange/questions.db
```

This will create the file ~/.codequestion/vectors/stackexchange-300d.magnitude

5.) Build embeddings index

```
python -m codequestion.index index.yml stackexchange/questions.db
```

The [default index.yml](https://raw.githubusercontent.com/neuml/codequestion/master/config/index.yml) file is found on GitHub. Settings can be changed to customize how the index is built.

After this step, the index is created and all necessary files are ready to query.

## Model accuracy
The following sections show test results for codequestion v2 and codequestion v1 using the latest Stack Exchange dumps. Version 2 uses a sentence-transformers model. Version 1 uses a word vectors model with BM25 weighting. BM25 and TF-IDF are shown to establish a baseline score.

**StackExchange Query**

Models are scored using [Mean Reciprocal Rank (MRR)](https://en.wikipedia.org/wiki/Mean_reciprocal_rank).

| Model               | MRR   |
| ------------------- | :---: |
| all-MiniLM-L6-v2    | 85.0  |
| SE 300d - BM25      | 77.1  |
| BM25                | 67.7  |
| TF-IDF              | 61.7  |

**STS Benchmark**

Models are scored using [Pearson Correlation](https://en.wikipedia.org/wiki/Pearson_correlation_coefficient). Note that the word vectors model is only trained on Stack Exchange data, so it isn't expected to generalize as well against the STS dataset.

| Model            | Supervision   | Dev   | Test  |
| ---------------- | :-----------: | :---: | :---: |
| all-MiniLM-L6-v2 | Train         | 87.0  | 82.7  |
| SE 300d - BM25   | Train         | 74.0  | 67.4  |

## Tests
To reproduce the tests above, run the following. Substitute $TEST_PATH with any local path.

    mkdir -p $TEST_PATH
    wget https://raw.githubusercontent.com/neuml/codequestion/master/test/stackexchange/query.txt -P $TEST_PATH/stackexchange
    wget http://ixa2.si.ehu.es/stswiki/images/4/48/Stsbenchmark.tar.gz
    tar -C $TEST_PATH -xvzf Stsbenchmark.tar.gz
    python -m codequestion.evaluate -s test -p $TEST_PATH

## Further reading

- [Find answers with codequestion 2.0](https://medium.com/neuml/find-answers-with-codequestion-2-0-50b2cfd8c8fe)
- [Building a sentence embedding index with fastText and BM25 (codequestion 1.0)](https://towardsdatascience.com/building-a-sentence-embedding-index-with-fasttext-and-bm25-f07e7148d240)

repository: neuml/codequestion

repo_name: neuml/codequestion


text:
ACTIVE PROJECT HAS MOVED TO GITLAB! https://gitlab.com/jnfaerch/skillsupp

https://skillsupp.herokuapp.com/

Rails web app created by Johan Faerch, Juandi García, Tanja Kohlen.

'UpSkill' is meant to be a micro learning app for corporations focusing on improving the skills of their employees. Especially it can be used for in-house training like values, procedures and the like but also for extending the outcome of conferences or in-house or external courses.
Users are signed up by the company and administrators can easily make new courses and questions or edit or add to existing ones.

The app runs on any browser and is based on PostgreSQL, Ruby on Rails and needs added features as can be seen in the code. Front-end is based on HTML5, CSS3, Bootstrap4 and JQuery.

repository: jnfaerch/skillsupp

gha_language: Ruby

repo_name: jnfaerch/skillsupp


text:
# Regulatory Comments Scraper

Extracts public comments on proposed Virginia regulations, as submitted to the [Virginia Regulatory Townhall](http://townhall.virginia.gov/), and saves each comment as a JSON file. It does so by parsing HTML with regular expressions, which I am totally OK with and you should be, too, because it works.

## Instructions

0. Run at the command line: `php scraper.php`
0. There is no step 2.

## To Do

* Stop parsing HTML with regular expressions. Sure, it works *now*, but let's be realistic here.

## License

Released under the MIT License.

repository: openva/regulatory-comments

repo_name: openva/regulatory-comments


text:
-------------------------------------------------------------------------------
 libkondo4
 A small C library to control the Kondo RCB-4 and ICS 3.0 protocols.

 Christopher Vo
 cvo1 at cs.gmu.edu
 Autonomous Robotics Laboratory
 George Mason University
-------------------------------------------------------------------------------

1. INSTALLATION

    You will need libusb and libftdi:
    libusb:  http://www.libusb.org/
    libftdi: http://www.intra2net.com/en/developer/libftdi/

    It has been tested on Linux 32-bit and 64-bit.

    On Ubuntu 10.04, you can get libusb using this:
        sudo apt-get install libusb-dev libusb-0.1-4

    To build, there is an example Makefile included.
    Just type 'make'.

    The Makefile creates a shared DLL (libkondo.so) and static lib (libkondo.a)
        in the main directory, which you can use in your programs.

2. USAGE

    Most of the function documentation is in the comments in libkondo.c
    There are also some usage examples in the utils directory,
    And a demo of using the wiimote to remote-control the rcb4 in "wii"
    And Java bindings (using SWIG) example in "java"
    And Python bindings (using SWIG) example in "python"
    And serial (termios API) examples in "serial"

3. LICENSE AND COPYRIGHT

    Copyright 2010 - Christopher Vo<EMAIL_ADDRESS>    George Mason University - Autonomous Robotics Laboratory

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.

path: /original_readme copy.md

filename: original_readme copy.md


text:
# FEW 2.9 GraphQL

## GraphQL

Learn GraphQL the better replacement for REST! Invented at Facebook to solve problems imposed by REST. GraphQL is an open source alternative that offers a new way of managing network resources.

### Why you should know this (optional)

GraphQL provides many advantages over REST. It's used by all of the biggest services.

FaceBook, Coursera, GitHub and many others

GraphQL is built with a schema and strong types. GraphQL provides reliablity through it's strong typing system. GraphQL provides a solution to over fetching and unders fetching data, and allows front end requests to determine what data is returned from an endpoint.

If you want to work with a future of network resources learn GraphQL.

## Course Specifics

**Course Delivery**: online | 7 weeks | 14 sessions

**Course Credits**: 3 units | 37.5 Seat Hours | 75 Total Hours

## Prerequisites

- Senior Standing
- Instructor Approval

## Learning Objectives

Students by the end of the course will be able to ...

1. Compare GraphQL with REST
1. Describe the Features of the GraphQL language
1. Write a basic GraphQL Query and Schema
1. Implement GraphQL in a CRUD Application

## Schedule

**Course Dates:** Tuesday, March 30 – Thursday, May 13, 2019 (7 weeks)

**Class Times:** Tuesday and Thursday at 2:45 PM - 5:30 PM (12 class sessions)

| Class |    Date   |                Topics                  | Assignment |
|:-----:|:---------:|:--------------------------------------:|:-----------|
|  1  | Tue, Mar 30 | [Lesson 1 - GraphQL Intro]             | SWAPI Query Challenges |
|  -  |  Thu, Apr 1 | **No Class - Cesar Chavez**            | - |
|  2  | Tue, Apr 6  | [Lesson 2 - GraphQL Schemas and Types] | GraphQL Resolver Challenges |
|  3  | Thu, Apr 8  | [Lesson 3 - GraphQL + Express]         | GraphQL OpenWeatherMap API |
|  4  | Tue, Apr 13 | [Lesson 4 - React Intro]               | React GraphQL Weather |
|  5  | Thu, Apr 15 | [Lesson 5 - React and GraphQL]         | - |
|  6  | Tue, Apr 20 | [Lesson 6 - GraphQL Mutations]         | - |
|  7  | Thu, Apr 22 | [Lesson 7 - Websockets]                | Subscriptions |
|  8  | Tue, Apr 27 | [Lesson 8 - Subscriptions]             | - |
|  9  | Thu, Apr 29 | [Lesson 9 - Subscriptions Lab]         | GraphQL Hackernews |
|  10 | Tue, May 4  | [Lesson 10 - Advanced Queries]         | - |
|  11 | Thu, May 6  | [Lesson 11 - Lab]                      | - |
|  12 | Tue, May 11 | [Lesson 12 - GraphQL ORM]              | - |
|  13 | Thu, May 13 | Final Exams/Presentations              | - |

[Lesson 1 - GraphQL Intro]: Lessons/Lesson-1.md
[Lesson 2 - GraphQL Schemas and Types]: Lessons/Lesson-2.md
[Lesson 3 - GraphQL + Express]: Lessons/Lesson-3.md
[Lesson 4 - React Intro]: Lessons/Lesson-4.md
[Lesson 5 - React and GraphQL]: Lessons/Lesson-5.md
[Lesson 6 - GraphQL Mutations]: Lessons/Lesson-6.md
[Lesson 7 - Websockets]: Lessons/Lesson-7.md
[Lesson 8 - Subscriptions]: Lessons/Lesson-8.md
[Lesson 9 - Subscriptions Lab]: Lessons/Lesson-9.md
[Lesson 10 - Advanced Queries]: Lessons/Lesson-10.md
[Lesson 11 - Lab]: Lessons/Lesson-11.md
[Lesson 12 - GraphQL ORM]: Lessons/Lesson-12.md

### Homework

- Class 1 - Start: Tues Mar 30 Due: Tues Apr 6
	- Watch How To GraphQL (first 4 sections)
	- Answer Questions on Gradescope
	- Due Class 2
- Class 2 - Start: Tues Apr 6 Due: Thurs Apr 8
	- Watch How to GraphQL (remaining videos)
	- Complete challenges in Lesson-2 #challenges
		- Submit to GradeScope
		- Due Class 3
- Class 3 - Start: Thurs Apr 8 Due: Tues Apr 13
	- OpenWeatherMap graphQL API
		- Complete the challenges in Lesson-3
		- Submit to GradeScope
		- Due Class 5
- Class 4 - Start: Tues Apr 13 Due: Tues Apr 20
	- **Could be a lab for assignment 3**
	- GraphQL Express server and Mutations
	- Complete the challenges in Lesson-4
		- Submit to Gradscope
- Class 5 - **Lab day for assignment 3 and 4**
- Class 6 - Start: Tue, Apr 20 Due: Tue, Apr 27
	- How to GraphQL

## Evaluation
To pass this course you must meet the following requirements:

- Complete all required tutorials
- Pass all projects according to the associated project rubric
- Pass the final summative assessment >=75%
- Actively participate in class and abide by the attendance policy
- Make up all classwork from all absences

## Attendance
Just like any job, attendance at Make School is required and a key component of your success. Attendance is being onsite from 9:30 to 5:30 each day, attending all scheduled sessions including classes, huddles, coaching and school meetings, and working in the study labs when not in a scheduled session. Working onsite allows you to learn with your peers, have access to support from TAs, instructors and others, and is vital to your learning.

Attendance requirements for scheduled sessions are:
- No more than two no call no shows per term in any scheduled session.
- No more than four excused absences per term in any scheduled session.

Failure to meet these requirements will result in a PIP (Participation Improvement Plan).  Failure to improve after the PIP is cause for not being allowed to continue at Make School.

##  Information Resources

Any additional resources you may need (online books, etc.) can be found here. You can also find additional resources through the library linked below:

- [make.sc/library](http://make.sc/library)

## Make School Course Policies

- [Program Learning Outcomes](https://make.sc/program-learning-outcomes) - What you will achieve after finishing Make School, all courses are designed around these outcomes.
- [Grading System](https://make.sc/grading-system) - How grading is done at Make School
- [Code of Conduct, Equity, and Inclusion](https://make.sc/code-of-conduct) - Learn about Diversity and Inclusion at Make School
- [Academic Honesty](https://make.sc/academic-honesty-policy) - Our policies around plagerism, cheating, and other forms of academic misconduct
- [Attendance Policy](https://make.sc/attendance-policy) - What we expect from you in terms of attendance for all classes at Make School
- [Course Credit Policy](https://make.sc/course-credit-policy) - Our policy for how you obtain credit for your courses
- [Disability Services (Academic Accommodations)](https://make.sc/disability-services) - Services and accommodations we provide for students
- [Online Learning Tutorial](https://make.sc/online-learning-tutorial) - How to succeed in online learning at Make School
- [Student Handbook](https://make.sc/student-handbook) - Guidelines, policies, and resources for all Make School students

# Resources

- https://github.com/soggybag/BasicGraphQLExample
- https://github.com/soggybag/react-apollo-github
- https://github.com/soggybag/graphql-express-react

repository: KitsuneNoctus/makeschool

repo_name: KitsuneNoctus/makeschool


text:
# Garden-Of-Words
Automate that can play the game Garden Of Words on phone.

The goal of this project is to build an automate, that can play on its own the game "Garden Of Words".

There are 2 main modules :
* software
  * generate data offline
  * control the automate
* hardware
  * plastic parts to 3D print and assemble
  * electronic parts

There are 3 software modules :
* Gathers data : Takes a picture of the phone's screen, and extracts letters from it.
* Finds all anagrams : Generates list of all possible words using letters gathered
* Commands automate : For each word, controls the automate's motors to spell it by connecting letters on phone's screen

repository: Angorange/Garden-Of-Words

repo_name: Angorange/Garden-Of-Words


text:
---
title: json decode by PHP
author: PipisCrew
date: 2016-04-02
categories: [php,android]
toc: true
---

```js
//get_multi_recordset.php
$brands  = getSet($db, "select brand_id from brands where user_id=?", array($user_id));
$categories  = getSet($db, "select category_id from categories where user_id=?", array($user_id));
$subcategories  = getSet($db, "select subcategory_id from subcategories where user_id=?", array($user_id));
$payments  = getSet($db, "select payment_id from payments where user_id=?", array($user_id));

$json                = array('brands'=> $brands, 'categories' => $categories, 'subcategories'  => $subcategories, 'payments'  => $payments);

header("Content-Type: application/json", true);

echo json_encode($json);
```

```js
//here async, get the response from get_multi_recordset.php, and decode the JSONObject
try {
	JSONObject resp = new JSONObject(response);

	JSONArray brands = resp.getJSONArray("brands");

	String brand_ids="";
	for (int i = 0 ; i < brands.length();="" i++){="" brand_ids+="((JSONObject)" brands.get(i)).getstring("brand_id")="" +="" ",";="" }="" if="" (brand_ids.length()=""> 0)
		brand_ids = brand_ids.substring(0, brand_ids.length() - 1);

} catch (JSONException e) {
	// TODO Auto-generated catch block
	e.printStackTrace();
}
```

the steps :
1-PHP Send us an JSONObject , at android unwrap the first array element (aka brands)
2-Loop through #brands# array element, each array item is JSONObject!
![snap114](https://www.pipiscrew.com/wp-content/uploads/2016/04/snap114.png)

3-use getString to get the desire value! As you see on the screenshot data comes from database so expecting a brand_id

![snap116](https://www.pipiscrew.com/wp-content/uploads/2016/04/snap116.png)

origin - http://www.pipiscrew.com/?p=4712 android-json-decode-by-php


text:
pymtproto
========

[![Build Status](https://travis-ci.org/gcash/bchwallet.png?branch=master)]
(https://travis-ci.org/gcash/bchwallet)

Package pymtproto provides functions for downloading [Bip0070](https://github.com/bitcoin/bips/blob/master/bip-0070.mediawiki)
payment requests and POSTing payments back to the merchant server.

Example Usage:
```go
client := NewPaymentProtocolClient(&chaincfg.MainnetParams, nil)
paymentRequest, err := client.DownloadBip0070PaymentRequest("bitcoincash:?r=https://test.bitpay.com/i/KqSWvRBKC58CgdpfsttzBC")
```

Package pymtproto is licensed under the [copyfree](http://copyfree.org) ISC
License.

license: ISC

repository: gcash/bchwallet

gha_license_id: ISC

repo_name: gcash/bchwallet


text:
# How to contribute

Thank you for taking the time to contribute. We appreciate it!

There are two ways to contribute - via issues, which are used for discussion, and pull requests, which are concrete proposals for changes.

## Issues

The project's issues page is a forum to discuss both major and minor issues related to developing the specification. It also serves as the means for collaborating with the group and discussing contributions that will ultimately lead to changes to the API.

## Workflow

Our workflow is based on [Gitflow](https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow), which defines a strict branching model designed around the project release. This workflow uses two branches to record the history of the project. The `master` branch stores the official release history, and the `develop` branch serves as an integration branch for features. Aside from these two main branches, the workflow utilizes topic and release branches.

### Pull requests

The way to contribute development effort and code to the project is via GitHub pull requests. GitHub provides a nice [overview on how to create a pull request](https://help.github.com/articles/creating-a-pull-request). Pull Requests should usually be made against the `develop` branch.

Some general rules to follow:

- [Fork](https://help.github.com/articles/fork-a-repo) the main project into your personal GitHub space to work on.
- Create a branch for each update that you're working on. These branches are often called "feature" or "topic" branches. Any changes that you push to your feature branch will automatically be shown in the pull request.
- Keep your pull requests as small as possible. Large pull requests are hard to review. Try to break up your changes into self-contained and incremental pull requests.
- The first line of commit messages should be a short (<80 character) summary, followed by an empty line and then any details that you want to share about the commit.
- Each pull request should be associated with an issue.
- Please try to follow [common commit message conventions](https://chris.beams.io/posts/git-commit/).

### Voting
Once a pull request or issue have been submitted, maintainers can comment or vote on to express their opinion following the [Apache voting system](https://www.apache.org/foundation/voting.html). Quick summary:

- +1 something you agree with
- -1 if you have a strong objection to an issue, which will be taken very seriously. A -1 vote should provide an alternative solution.
- +0 or -0 for neutral comments or weak opinions.
- It's okay to have input without voting.
- Silence gives assent.
- In a pull request review:
  - Approval is considered a +1 vote on the pull request.
  - "Request changes" is considered a -1 vote on the pull request.
- A pull request is ready to be merged when either of the following is true:
  - A pull request has at least two +1 votes, no -1 votes, and has been open for at least 3 days.
  - A pull request has no -1 votes, and has been open for at least 14 days.
    - We sometimes waive the time constraint for cosmetic-only changes -- use good judgment. If an issue gets any -1 votes, the comments on the issue need to reach consensus before the issue can be resolved one way or the other. There isn't any strict time limit on a contentious issue.

The project will strive for full consensus on everything until it runs into a problem with this model.

### Topic branches

If you wish to collaborate on a new feature with other GA4GH members, you can create a topic branch. Once a topic branch exists, pull requests can be made against it the usual way. It may also be brought up to date with new changes merged into `develop` by anyone with commit access, if the changes produce merely a fast-forward merge for each constituent branch. However, if changes from the `develop` branch create a new merge commit, that commit needs to be reviewed in a pull request.

Changes made in a topic branch can be merged into develop by creating a pull request against the `develop` branch and then resolving the normal way.

Topic branches that have been merged into develop and that are no longer being developed upon should be [deleted](https://github.com/blog/1335-tidying-up-after-pull-requests).

### Release branches

From time to time the group will make a release. This is achieved by creating a branch named `release-foo`, where `foo` is the release name. Only bug fixes are allowed to release branches. To refer to a specific version of a release branch, either the commit ID can be used, or alternatively (better), a tag can be created.

branch_name: refs/heads/develop


text:
# Ethereum GraphQL

GraphQL schema server built from Ethereum JSON-RPC

## Trying it out

```bash
npm install
npm start
```

Then open [http://localhost:3000/graphiql](http://localhost:3000/graphiql)

# Unused methods
```
eth_getBlockTransactionCountByHash
eth_getBlockTransactionCountByNumber
```

repository: PiotrTrzpil/ethereum-graphql

gha_language: JavaScript

repo_name: PiotrTrzpil/ethereum-graphql


text:
# django-report-builder Documentation

A GUI for Django ORM. Build custom queries and display results.
Targets sys admins and capable end users who might not be able to program or gain
direct interactive shell access.

See [installation instructions.](quickstart.md)

Code
----

https://gitlab.com/burke-software/django-report-builder/

Discussion
--------

https://groups.google.com/forum/#!forum/django-report-builder

repository: Resousse/django-report-builder

repo_name: Resousse/django-report-builder


text:
# INTDAI Mock API

This repository contains the code base for a mock server which serves example data through an HTTP API conforming to the specifications for the INTDAI project's APIs.
The API server is implemented in JavaScript for the NodeJS runtime environment.

## Preconditions

To build and run the project a host machine needs to be made available and provisioned with the latest NodeJS runtime environment software. Depending on the operating system of choice the provisioning of the machine may vary. Further information for each operating system can be found on the [NodeJS website](http://nodejs.org).

## Building the project

Presuming the preconditions to build and execute this project are met, some dependencies for the project in the NodeJS runtime must be met. Those dependencies are described in the `package.js` file and can be installed by running `npm install`in the root of the project path. The project is built when the dependencies are installed successfully to the host machine.

## Test Driven Development

All interfaces of the server are covered with behavioral tests. The tests are implemented for the Mocha framework for the NodeJS runtime environment. In order to run those tests the project first must be built according to the previous section. Once the project was build, the tests can be run by running `npm test` in the root of the project path. This command is resolved according to the specification in the `package.json` configuration file of the project.

## Licence

The MIT License (MIT)

Copyright (c) 2014 Martin Biermann

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

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

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

repository: wedemeyer/intdai-mock-api

repo_name: wedemeyer/intdai-mock-api


text:
---
layout: post
title: "Serenity"
description: "In the future, a spaceship called Serenity is harboring a passenger with a deadly secret. Six rebels on the run. An assassin in pursuit. When the renegade crew of Serenity agrees to hide a fugitive on their ship, they find themselves in an awesome action-packed battle between the relentless military might of a totalitarian regime who will destroy anything - or anyone - to get the girl back and the bloodthirsty creatures who roam the uncharted areas of space. But, the greatest danger of all may be on their ship..."
img: 0379786.jpg
kind: movie
genres: [Action,Adventure,Sci-Fi,Thriller]
tags: Action Adventure Sci-Fi Thriller
year: 2005
imdb_rating: 7.8
votes: 279333
imdb_id: 0379786
netflix_id: 70035994
color: 1b263b
---
Director: `Joss Whedon`

Cast: `Nathan Fillion` `Gina Torres` `Alan Tudyk` `Morena Baccarin` `Adam Baldwin`

The crew of the Serenity is getting desperate. They have lain lower and lower to protect their doctor, Simon Tam, and his telepathic traumatized little sister, River, from the alliance, whom he rescued her from a year earlier. This has made getting jobs harder and now they are desperate. When they take River on a robbery during which Reavers (humans who have gone crazy and turned into cannibals) attack, Simon decides that its time to leave the crew of the Serenity for his and River's safety. She then mutters "Miranda" and goes berserk and nearly shoots Capt. Malcolm Reynolds, until her brother says the safety word to put her to sleep. Reynolds decides to take them back on board for safety, only now an alliance operative is on their tracks and making Reynolds determined to find out what "Miranda" is and what the Alliance is hiding.::Ubernoob

repository: meparth/BongNetflix

repo_name: meparth/BongNetflix


text:
3.1.2 / 2017-04-27
==================

  * [chore] Bump has-binary2 to version 1.0.2 (#70)
  * [fix] Fix Blob detection for iOS 8/9 (#69)

3.1.1 / 2017-04-25
==================

  * [fix] Ensure globals are functions before running `instanceof` (#68)

3.1.0 / 2017-04-24
==================

  * [chore] Bump debug to version 2.6.4 (#67)
  * [feat] Move binary detection to the parser (#66)

3.0.0 / 2017-04-04
==================

  * [chore] Bump isarray to version 2.0.1 (#65)
  * [chore] Use native JSON and drop support for older nodejs versions (#64)

2.3.2 / 2016-12-30
==================

  * [perf] Small optimisations (#57)
  * [chore] Update zuul config to speed up tests in browser (#58)
  * [refactor] Remove useless variable (#55)
  * [chore] Bump dependencies (#56)
  * [refactor] Remove unused var (#53)
  * [refactor] Use strict equality when possible (#52)

2.3.1 / 2016-10-24
==================

* [chore] Revert "Remove deprecated isarray dependency" (#50)

2.3.0 / 2016-10-21
==================

  * [perf] Split try catch into separate function (#40)
  * [chore] remove browsers setting from .zuul.yml (#34)
  * [chore] bump zuul (#37)
  * [chore] Bump zuul to 3.11.0 & zuul-ngrok to 4.0.0 (#41)
  * [chore] Update zuul browser settings following EOL notices (#42)
  * [chore] Restrict files included in npm package (#45)
  * [chore] Update zuul browser settings (#44)
  * [chore] Remove deprecated isarray dependency (#46)
  * [chore] Make the build status badge point towards master (#47)
  * [chore] Move benchmark to dev dependencies (#48)

2.2.6 / 2015-11-25
==================

  * fix the order of exported events [chylli]

2.2.5 / 2015-11-21
==================

  * package: bump debug
  * update JSON3 to 3.3.2

2.2.4 / 2015-03-03
==================

 * index: fix off-by-one bound checks

2.2.3 / 2015-02-03
==================

 * index: fix potential infinite loop with malicious binary packet

2.2.2 / 2014-09-04
==================

 * prevent direct `Buffer` reference that breaks browserify
 * binary: reuse `isBuf` helper

2.2.1 / 2014-06-20
==================

 * added benchmarking [kevin-roark]
 * upgrade component-emitter to 1.1.2 [kevin-roark]
 * update protocol version [kevin-roark]
 * less indentation and a small optimization [kevin-roark]

2.2.0 / 2014-05-30
==================

 * added a BINARY_ACK type [kevin-roark]

2.1.5 / 2014-05-24
==================

 * don't iterate keys of `Date` objects [Rase-]

2.1.4 / 2014-05-17
==================

 * fix null reconstruction bug [kevin-roark]

2.1.3 / 2014-04-27
==================

 * bump zuul version
 * updated protocol version

2.1.2 / 2014-03-06
==================

 * added support for binary in ACK packets

2.1.1 / 2014-03-04
==================

 * removed has-binary-data dependency
 * fixed the object check in binary.removeBlobs

2.1.0 / 2014-03-01
==================

 * faster and smaller binary parser and protocol [kevin-roark]

2.0.0 / 2014-02-19
==================

 * binary support [kevin-roark]

1.1.2 / 2014-02-11
==================

 * package: bump `json3` to fix IE6-7

1.1.1 / 2014-02-10
==================

 * package: bump debug to fix browserify issues

1.1.0 / 2013-12-25
==================

 * index: use `json3`

1.0.3 / 2012-12-18
==================

  * index: added instrumentation through `debug`
  * index: make sure decoded `id` is a `Number`

1.0.2 / 2012-12-18
==================

  * index: allow for falsy values in `id` and `data`

1.0.1 / 2012-12-10
==================

  * Revision 1


text:
# simon-game

## Description
Simon is the classics 80s game that tests your memory. Follow the sound and light sequence to see how far you can get.

## Usage
A Game to improve your memory and fun. Play against friends to see who has the best memory.

## Technology for Portfolio

HTML

CSS

Javascript

## images

# Deployed Website
Simon Game


text:
---
breadcrumbs:
- - /chromium-os
  - Chromium OS
page_name: extracting-a-recovery-kernel-from-a-recovery-image
title: Extracting a Recovery Kernel from a Recovery Image
---

## If you need to generate a recovery image, use "mod_image_for_recovery.sh --image <image_file>".

## <Outdated instructions needed for a few special case CR-48 Users>

## Intro

If you find yourself in the need of an officially signed Recovery Kernel, but
you only have an officially signed Recovery Image: you're in luck! You've come
to the right place.

What are Recovery Images and Recovery Kernels?

*   A **Recovery Image** is an image that can be placed onto a USB disk
            that can boot a particular Chrome OS Notebook and reinstall the
            default software onto the computer, putting it into a known good
            state. Instructions for getting a Recovery Image are usually
            provided by the manufacturer of a Chrome OS Notebook.
*   A **Recovery Kernel** is a small part of the the Recovery Image that
            can be extracted, then used for installing a custom build of the OS.
            Sometimes a manufacturer will provide a separate download of the
            Recovery Kernel as a convenience.

What does it mean for a Recovery Kernel to be officially signed? It means that
it was built by someone (like your device manufacturer) with access to your
device's secret recovery key. That means that your device will allow booting
from this Recovery Kernel. **NOTE**: every hardware product has a different
secret recovery key, so you need to obtain an official Recovery Kernel that is
specific to your product.

...you might have read about the Recovery Kernel in such places as the [Poking
around your Chrome OS
Notebook](/chromium-os/poking-around-your-chrome-os-device) page or the
[Chromium OS Developer Guide](/chromium-os/developer-guide).

## Get an officially-signed Recovery Image

These steps are going to be different for every piece of hardware. However, just
to be illustrative, here are the steps for the Cr-48 Chrome Notebook:

```none
mkdir -p ~/trunk/recovery
curl -L 'https://dl.google.com/dl/chromeos/recovery/latest_mario_beta_channel' > ~/trunk/recovery/recovery_image.zip
TMPDIR=`mktemp -d`
unzip ~/trunk/recovery/recovery_image.zip -d ${TMPDIR}
RECOVERY_IMAGE=`ls ${TMPDIR}/*.bin`
```

Future steps will assume that you've put the recovery image into the
`RECOVERY_IMAGE` variable (as the above instructions do).

## Extract the Recovery Kernel

The easiest way to do this is if you've already followed the instructions in the
[Chromium OS Developer Guide](/chromium-os/developer-guide) and are running from
within the chroot. In that case, you'll have already the `cgpt` tool. That means
you can follow the generic instructions. In that case, the instructions are:

```none
KERNA_START=`cgpt show -b ${RECOVERY_IMAGE} | grep KERN-A | awk '{print $1}'`
KERNA_SIZE=`cgpt show -b ${RECOVERY_IMAGE} | grep KERN-A | awk '{print $2}'`
mkdir -p ~/trunk/recovery/
RECOVERY_KERNEL=~/trunk/recovery/recovery_kernel.bin
dd of=${RECOVERY_KERNEL} if=${RECOVERY_IMAGE} \
   bs=512 count=${KERNA_SIZE} skip=${KERNA_START}
```

If you aren't running from the chroot, most of the commands above are still
valid. You'll just have to figure out your own `KERNA_START` and `KERNA_SIZE`.
At the moment, this document doesn't have the instructions for that (sorry!).
However with current images, you could actually just do:

```none
KERNA_START=4096
KERNA_SIZE=32768
```

...and be done with it.

repository: iridium-browser/iridium-browser

repo_name: iridium-browser/iridium-browser


text:
---
title: Gateway
linktitle: Gateway
description: Gateway is an API service that provides routing for Containerum components.

categories: []
keywords: []

menu:
  docs:
    parent: "components"
    weight: 2
    identifier: platform-gateway

draft: false
---

# Gateway
Gateway is an API service that provides routing for Containerum components.

### Prerequisites

- Kubernetes

### Installation

Using Helm:

```
  helm repo add containerum https://charts.containerum.io
  helm repo update
  helm install containerum/api-gateway
  ```

  Now you can proceed to [installing the auth component](/platform/components/auth).


text:
# Data

The full dataset ("combined.zip") is available (open source): https://osf.io/tb8fx/

Each row is a sample. The study label is "Electrode", the outcome is "DA." "pH" is a nuisance variable not included in analyses. The remainder of the columns are the covaraites.


text:
---
layout: post
title: 'Exposing a local IIS site on your network'
description: "An easy way to share a site served by your local IIS with other devices in your network (useful for testing the mobile version of a website)."
date: '2017-01-08T00:00:00.000-03:00'
tags:
- IIS
- mobile
- networking
---
Have you ever had your local IIS run a site `local.something.com` and eventually needed to test it on your phone (to optimize it beyond the emulator) or to share it with a coworker? you may end up doing lots of releases to your development environment just to see minor layout changes.

If you have, and you'd like to expose your environment either on your network, then this article is for you. Otherwise, just go on with your life ;)

<!--more-->
## The problem
It's fairly straightforward: You have a site (let's say `local.mse.com`) on your machine and you want to access it from another device on your network (in my case, mobile devices).

## The solution
There are several ways to solve this, but I'm convinced this is the easiest one (if you have a better option *please* comment below).

Basically it all comes down to having the client devices resolve the `local.mse.com` domain to you computer's IP. If you're dealing with computers, then you can just change their `hosts` files, but that's not so easy when you want to use mobile devices to test.

### What you need
All you need to know your network IP (I'm going to assume it's `<IP_ADDRESS>` because that's mine). You may want to have your DHCP server assign always the same IP to your machine to make the whole setup persistent, but that's not required.

If you have a router with `DNSMasq` and you have admin access to it, then that's all you need. If you don't, I'm going to show how easy it is to use [docker](https://www.docker.com/) to run `DNSMasq` on your Windows machine.

### What to have to do
* Ensure that your Windows firewall accepts incoming connections on the 80/443 ports on the `<IP_ADDRESS>` interface.
* Ensure that the sites you want to share on IIS have a binding for the `<IP_ADDRESS>` IP.

#### If you have a router with `DNSMasq`
* On your router, add the following `DNSMasq` options so that when any device on your network asks for `local.mse.com`, your router replies with `<IP_ADDRESS>` (I'm adding a couple more, the ones I use at my cool job!)

```
address=/local.mse.com/<IP_ADDRESS>
address=/local.sstatic.net/<IP_ADDRESS>
address=/local.talent.stackoverflow.com/<IP_ADDRESS>
```

This is how it looks on mine:

![](/public/images/dnsmasq.png)

What this change does is telling your router to resolve `local.mse.com` to your IP, so when a device on your network asks for `local.mse.com`, your router replies with `<IP_ADDRESS>` regardless on what's on the real `mse.com` zone.

#### If you don't have a router with `DNSMasq`
You could use any DNS server (and you could skip the docker setup) but IMO nothing beats DNSMasq's simplicity even if it's running as a docker container.

* [Install docker](https://www.docker.com/get-started/)
* Ensure that your Windows firewall accepts incoming connections on the 53/tcp and 53/udp ports on the `<IP_ADDRESS>` interface.
* Run [my image](https://hub.docker.com/r/g3rv4/dnsmasq/) (forked from [andyshinn/dnsmasq](https://hub.docker.com/r/andyshinn/dnsmasq/)) starting `DNSMasq` on a docker container
```
run -p 53:53/tcp -p 53:53/udp --cap-add=NET_ADMIN g3rv4/dnsmasq --address=/local.mse.com/<IP_ADDRESS> --address=/local.sstatic.net/<IP_ADDRESS> --address=/local.talent.stackoverflow.com/<IP_ADDRESS>
```
* On the devices you want to use to test, set the DNS to `<IP_ADDRESS>`

### Profit!
And that's it! now every device (or the devices you set up, if you followed the docker route) on your network can access to `local.mse.com` and it will be handled by your computer.

gha_language: SCSS


text:
# reddit-wallpaper-downloader
Downloads HD wallpapers from whichever subreddit you want

![Screenshot](https://github.com/luisdecker/reddit-wallpaper-downloader/blob/master/screenshot.png "Screenshot")

## How to configure
Edit config in getWalls.py
```
#Saving path
directory = '/home/decker/Wallpapers'
#Default Subreddit
subreddit = 'HDR'
#Minimum width
min_width = 1920
#Minimum Height
min_height = 1080
#Post per Request (Max 100)
json_limit = 100
#Number of requests
loops = 2
```
## How to run
You can run:
```
python ~/reddit-wallpaper-downloader/getWalls.py
```

repository: luisdecker/reddit-wallpaper-downloader

repo_name: luisdecker/reddit-wallpaper-downloader