text:
# CodeTags in Python

## Description
CodeTags are a way to add comments that indicate specific meanings. They are not officially supported in the python language specification, and as such are more of a convention than a feature. Still they are incredibly useful for code organization in large projects, and during collaboration.

Also some code editors (like VSCode), actually recognize CodeTags and highlight them for you to make them stand out.

## Definitions

### Code Tag
A code tag is a predefined phrase (usually in all caps) that has a specific meaning. For example TODO is a CodeTag that lets people who are reading the comment know that something needs to be done.

The typical syntax for this is ```<CODETAG>: <Description> ``` for example:
```python
username = input("enter username: ") #TODO: Save user input after entry
```

## Usage

Since codetags are not 'officially' supported there is no full list of CodeTags (the closest is in the original proposal [PEP-350](https://www.python.org/dev/peps/pep-0350/#mnemonics))
but I have compiled a list of the most common/useful ones:
```python
# NOTE: A general note/mild warning
# HACK: Temporary solution to a problem, to be properly solved later
# PORT: An OS/Platform specific workaround
# IDEA: An idea to solve an issue (Not that useful unless solution will take time to implement)
# REQ: Requirement for a file/function/class
# FAQ: A frequently asked question
# SEE: Point to a reference such as a documentation link, or other function
# TODO: As the name implies, tells people/you something that needs to be done (very useful for multi-day/multi-developer projects)
# FIXME: Addresses a problem that should be fixed in the code
# BUG: Identifies a known bug
# WONTFIX: Put next to something you know has an unintended/unexpected outcome, but have no intention to fix
# CAVEAT: A caveat to the implementation; something that is not so obvious to layman's, or first time users necessarily
# DOCUMENT:Need to write documentation
```
### Running

There isn't really a demo for this, since it is documentation related. I have included some random functions in ```codetags.py``` that include various CodeTags as examples of the functionality.

## Real World Applications
These CodeTags can be a real help for quickly identifying tasks that need to be done, especially when using CodeTags that have syntax highlighting such as NOTE, TODO, HACK, BUG, and FIXME.

KEEP IN MIND, I am not suggesting you actually use all of these in every situation.

license: Unlicense

url: https://raw.githubusercontent.com/canadian-coding/posts/d28fe7f561c46b0bc27eed88a7adb6401a0e49cc/2019/July/9th - CodeTags in Python/readme.md

repository: canadian-coding/posts

repo_name: canadian-coding/posts


text:
# Projects Developed During the [SIGCOMM'18 Hackathon](https://conferences.sigcomm.org/sigcomm/2018/hackathon.html)

## IPv6 Segment Routing (SRv6)

**Team Members**:
Mathieu Jadin (UC Louvain), Vladimir Olteanu (University Politehnica of Bucharest), Alonso Reyes (Universidad de Chile), Ferenc Fejes (University of Debrecen).

* [Presentation](https://docs.google.com/presentation/d/1T00nLg7H7R5nX489IGLG3lEmP_P-I4o2fgh5tR_7ZPA/edit?usp=sharing)
* [Demo](https://www.youtube.com/watch?v=e03SLEb-B3k&feature=youtu.be)
* Source code:
    * Socksv6 with SRv6 Support:
        * [libsocks6msg](https://github.com/45G/libsocks6msg/tree/ipv6sr)
        * [sixtysocks](https://github.com/45G/sixtysocks/tree/ipv6sr)
        * [libsocks6util](https://github.com/45G/libsocks6util/tree/ipv6sr)
        * [socksget](https://github.com/45G/socksget/tree/ipv6sr)
    * [iperf3 support](https://github.com/SPYFF/iperf/tree/seg6)

## Fine Grained Network Path Profiling from Traceroutes

**Team Members**:
Petros Gigis (ICS FORTH/University of Crete), George Nomikos (ICS FORTH), Savvas Kastanakis (ICS FORTH/University of Crete), Max Demoulin (University of Pennsylvania), Ross Teixeira (Princeton University), Claro Noda (Mid Sweden University)

* [Presentation](https://github.com/acmsigcomm18hackathon/hackathonprojects/blob/master/SIGCOMM%20Hackathon.pdf)
* [Source code](https://github.com/pgigis/vantage-point-similarity)

## MNKernel: Unikernel Support for Mininet

**Team Members**:
Alexander Jung (Lancaster University), Michał Król (University College London), Torsten Runge (Technischen Universität Hamburg)

* [Presentation](https://github.com/acmsigcomm18hackathon/hackathonprojects/blob/master/SIGCOMM%20Hackaton%20Presentation%20Unikernel%20Support%20for%20Mininet.pptx)
* [Source code](https://github.com/nderjung/mininet)

## MobileInsight

**Team Members**:
Chunyi Peng (Purdue University), Quentin De Coninck (UCLouvain), Syed Ali Raza Zaidi (University of Leeds), Ensar Zeljkovic (IDLab research group - Imec, University of Antwerp), Maryam Hafeez (University of Huddersfield)

* [Presentation](https://www.cs.purdue.edu/homes/chunyi/talks/mobileinsight-hackaton-201808-full-final.pptx)
* [Source code](https://github.com/qdeconinck/hackathon-2018-mobileinsight)

## NEC (Name Data Networking, Edge Computing, and Cloud Computing) Project

**Team Members**:
Rehmat Ullah, Muhammad Atif and RehmanByung-Seo Kim (Hongik University, South Korea)

* [Report](https://github.com/acmsigcomm18hackathon/hackathonprojects/blob/master/ACM%20SIGCOMM%20Hackathon%20Report.docx)
* Source Code
  * [NDN](https://github.com/atifrehman/NEC/tree/master/ndnSIM/apps)
  * [Edge](https://github.com/atifrehman/NEC/tree/master/Edge)
  * [Cloud](https://github.com/atifrehman/NEC/tree/master/Cloud)

## Populating ASN information during MLAB data ingestion

**Team Members**:
Todd Arnold (Columbia), Sarah	Wassermann (Inria Paris), Thibaut Cuvelier (Orange Labs)

* [Presentation](https://github.com/acmsigcomm18hackathon/hackathonprojects/blob/master/Populate%20ASN%20Information%20During%20Data%20Ingest.pdf)

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
layout: default
---

# 1994-07-23 - Re: GUT and P=NP

## Header Data

From<EMAIL_ADDRESS>(Mike McNally)

To<EMAIL_ADDRESS>(Ray)

Message Hash: 93297f80fd5d387ea0efc0045a598d73961af28b772dfa59829eee0ef62a8aea

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1994-07-23 13:29:32 UTC

Raw Date: Sat, 23 Jul 94 06:29:32 PDT

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Mike McNally)
Date: Sat, 23 Jul 94 06:29:32 PDT
To<EMAIL_ADDRESS>(Ray)
Subject: Re: GUT and P=NP
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

>    We are not talking about physical computers, we are talking about
> turing machines. If there is some *finite* deterministic process to
> get from the initial data to the final result, no matter how long it
> takes, it is an algorithm.

I don't see the need for determinism; it depends on the underlying
computational model.

>   I can't think of a single thing which is non-algorithmic
> except true randomness or non-determinism.

The "essence" of nondeterminism may not be algorithmic, but I don't
see why that's important.  If nondeterminism can be sufficiently
characterized that I can express an algorithmic process involving
it (and of course we can; that's how NP problems are expressed) then
my boat floats.

{% endraw %}
```

## Thread

+ Return to [July 1994](/archive/1994/07)

+ Return to<EMAIL_ADDRESS>(James A. Donald)](/authors/jamesd_at_netcom_com_james_a_donald_)"
+ Return to<EMAIL_ADDRESS>(Mike McNally)](/authors/m5_at_vail_tivoli_com_mike_mcnally_)"
+ Return to "["Perry E. Metzger" <perry@imsi.com>](/authors/perry_e_metzger_perry_at_imsi_com_)"
+ Return to<EMAIL_ADDRESS>(Ray)](/authors/rjc_at_gnu_ai_mit_edu_ray_)"

+ 1994-07-22 (Thu, 21 Jul 94 21:44:13 PDT) - [Re: GUT and P=NP](/archive/1994/07/e2f9583e7ee5b4a219e28f80c6098c2ace82c4b97fbe737d7274fe057f438b0a) -<EMAIL_ADDRESS>(Ray)_
  + 1994-07-23 (Fri, 22 Jul 94 21:57:43 PDT) - [Re: GUT and P=NP](/archive/1994/07/e05a21d89f9469684724581bd9227a41bde681d2e91582922b14d2cf18eec70d) -<EMAIL_ADDRESS>(James A. Donald)_
    + 1994-07-23 (Sat, 23 Jul 94 02:56:45 PDT) - [Re: GUT and P=NP](/archive/1994/07/abb39d4d4fe74c8ddb848de1092b19b3d2377ddb6212baa0c4b8feab7d8a1fc4) -<EMAIL_ADDRESS>(Ray)_
      + 1994-07-23 (Sat, 23 Jul 94 06:29:32 PDT) - Re: GUT and P=NP -<EMAIL_ADDRESS>(Mike McNally)_
    + 1994-07-26 (Mon, 25 Jul 94 20:07:04 PDT) - [Re: GUT and P=NP](/archive/1994/07/4368ca920b61ffc2f2b4efd613e5d2d822495e3237cc497f0afde6aa47ec5b00) - _"Perry E. Metzger"<EMAIL_ADDRESS>

gha_license_id: MIT


text:
# Chromium 72.0.3626.x

## DOWNLOAD

- Android Jelly Bean and newer: [Download ChromePublic.apk](https://github.com/andi34/prebuilt_chromium/raw/master/ChromePublic.apk)
- Android Lollipop and newer: [Download ChromeModernPublic.apk](https://github.com/andi34/prebuilt_chromium/raw/master/ChromeModernPublic.apk)
- Android Nougat and newer: [Download MonochromePublic.apk](https://github.com/andi34/prebuilt_chromium/raw/master/MonochromePublic.apk)

## Changes on top of official Chromium Source

- use Chromium branding in more places
- enable dubious Do Not Track feature by default
- disable navigation error correction by default
- disable contextual search by default
- disable network prediction by default
- disable metrics by default
- disable data reduction proxy promotions
- add DuckDuckGo search engine
- Chromium: use startpage searchengine by default
- Chromium: disable strict mode

[Source](https://github.com/andi34/chromium_patches/tree/66)

### Extra Changes on top of official Chromium Source for 64.x - 71.x only

- disable first run welcome page

### Extra Changes on top of official Chromium Source for 64.x - 69.x only

- disable autofill by default

### Extra Changes on top of official Chromium Source for 64.x & 65.x only

- disable hyperlink auditing by default

[Source](https://github.com/andi34/chromium_patches/tree/65)

### Extra Changes on top of official Chromium Source for 64.x only

- mark non-secure origins as non-secure
- stop enabling search engine geolocation by default
- hide passwords.google.com link when not supported

[Source](https://github.com/andi34/chromium_patches/tree/64)

## H264 encoder support for Chromium

Support for h264 encoder is not added for legal reasons

### Why using e.g. Chromium?

AOSP Source uses AOSP Browser until Android 6 by default.
AOSP Browser is absoloutly not up to date and should not be used on any roms these days because of it's security holes.

### There's a great lightweight Browser, can't i use it?

On Android 6+ it is ok to use a lightweight Browser which is using systems Webview implementation (as long as your system still gets security updates).
If you have access to Rom source and compiling the Rom yourself you can find an updated Chromium-based WebView Implementation below in the ["Information for Developer"](https://github.com/andi34/prebuilts_chromium#updated-chromium-based-webview).

On Android 4 and older you should use a Browser which comes with it's own, updated, Webview.
(Currently there's no good way to update WebView on Android 4.)

## Information for Developer

You can use this repo to add Chromium prebuilt into your Rom. Please read below information.

### How to add Chromium prebuilt into our Rom?

Add Chromium to your build config once you have cloned this repo into your Rom source:

```
# Chromium Browser
PRODUCT_PACKAGES += \
    Chromium

```
(e.g. inside your device.mk)

On most roms you can avoid adding Chromium to your device config.
Most Roms support an easy way to add more packages - you only need to create
```
vendor/extra/product.mk
```
and add call the PRODUCT_PACKAGES from there.

Here's an example of an local_manifest you can use:
```
<?xml version="1.0" encoding="UTF-8"?>
<manifest>

  <remote  name="andi34"
           fetch="https://github.com/andi34/" />

  <project path="vendor/extra" name="android_vendor_extra" remote="andi34" revision="m" />
  <project path="prebuilts/chromium-browser" name="prebuilts_chromium" remote="andi34" revision="master" />

</manifest>
```

CyanogenMod initial added support for an easy way to add more packages by the following changes:

1. [add a hook to add extra packages](https://github.com/LineageOS/android_vendor_cm/commit/45e6598078e3a919ec644b8ad22bf9ad2912e876)
2. [cm: Update use of vendor/extra](https://github.com/LineageOS/android_vendor_cm/commit/b9dd400b385b18519cad768b5ec45fcbe9973f22)
3. [Allow vendor/cyngn overlays to override vendor/cm overlays](https://github.com/LineageOS/android_vendor_cm/commit/39b9aa83f003aaf9842bc091ef0a4c2d3d2d15e4)

You can adapt those changes to your rom source if it isn't supported yet.

### Let's avoid patching our device tree or rom source to add Chromium prebuilt to our Rom

- For Android 5 and below we are using ChromePublic.apk
- For Android 6 and newer we are using ChromeModernPublic.apk (we use an updated Webview Implementation, see below ["Updated Chromium-based WebView"](https://github.com/andi34/prebuilts_chromium#updated-chromium-based-webview))

### How to use MonochromePublic on Android 7+

To use prebuilt MonochromePublic.apk on Android 7+ you need to add chromium to frameworks/base/core/res/res/xml/config_webview_packages.xml
(Your can also add it to your device overlay).

```
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2015 The Android Open Source Project
     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.
-->

<webviewproviders>
    <!-- The default WebView implementation -->
    <webviewprovider description="Chromium" packageName="org.chromium.chrome" availableByDefault="true">
    </webviewprovider>
</webviewproviders>
```
Once that's done you need to [modify the Android.mk](https://github.com/andi34/prebuilts_chromium/commit/09cd63b824ffa08c2365d276d1540ba45cf3c865#diff-3ae6be565f1e33e90e0b11f768de1f6c) to use MonochromePublic.apk.

Note: You can save some space while using ChromeModernPublic.apk and updating Webview inside your Rom source instead using MonochromePublic.apk, see below ["Updated Chromium-based WebView"](https://github.com/andi34/prebuilts_chromium#updated-chromium-based-webview).

### How to use ChromeModernPublic on Android 5

On Android 5 ChromeModernPublic.apk can't be used as prebuilt without patching your Rom source:

Run these commands:
```
cd build
curl https://raw.githubusercontent.com/andi34/prebuilt_chromium/master/patches/Lollipop/0001-Fix-Chrome.patch | git am -
```
Once that's done you need to modify the Android.mk to use ChromeModernPublic.apk:
```
LOCAL_SRC_FILES    := ChromeModernPublic.apk
LOCAL_PREBUILT_JNI_LIBS_arm := @lib/armeabi-v7a/crazy.libchrome.so
LOCAL_PREBUILT_JNI_LIBS_arm += @lib/armeabi-v7a/libchromium_android_linker.so
```

### Updated Chromium-based WebView

- an updated Chromium-based WebView for Android 6 [can be found here](https://github.com/android-security/android_external_chromium-webview/tree/aosp-6.0)
- an updated Chromium-based WebView for Android 7 [can be found here](https://github.com/android-security/android_external_chromium-webview/tree/aosp-7.1)

You should use the updated WebView if you are compiling your Rom from source.

### Build instructions

You can find the build instructions [here](https://www.chromium.org/developers/how-tos/get-the-code) to Checkout, Build, & Run Chromium for your OS.

### Our build settings

Chromium for Android is compiled using the GN build tool. To match our build settings, set:

```
target_os = "android"
is_debug = false
symbol_level = 0
enable_nacl = false
remove_webcore_debug_symbols = true
```

in your GN argument file before building.

### H264 encoder support for Chromium

Support for h264 encoder is not added for legal reasons. If you like to compile Chromium yourself with h264 encoder support you need to extend your GN argument file with the following:

```
proprietary_codecs = true
ffmpeg_branding = "Chrome"
```

### Multiple Chrome APK Targets according to the official build instructions

1. `chrome_public_apk` (ChromePublic.apk)
   * `minSdkVersion=16` (Jelly Bean).
   * Stores libchrome.so compressed within the APK.
   * Uses [Crazy Linker](https://cs.chromium.org/chromium/src/base/android/linker/BUILD.gn?rcl=6bb29391a86f2be58c626170156cbfaa2cbc5c91&l=9).
   * Shipped only for Android < 21, but still works fine on Android >= 21.
2. `chrome_modern_public_apk` (ChromeModernPublic.apk)
   * `minSdkVersion=21` (Lollipop).
   * Uses [Crazy Linker](https://cs.chromium.org/chromium/src/base/android/linker/BUILD.gn?rcl=6bb29391a86f2be58c626170156cbfaa2cbc5c91&l=9).
   * Stores libchrome.so uncompressed within the APK.
     * This APK is bigger, but the installation size is smaller since there is
       no need to extract the .so file.
3. `monochrome_public_apk` (MonochromePublic.apk)
   * `minSdkVersion=24` (Nougat).
   * Contains both WebView and Chrome within the same APK.
     * This APK is even bigger, but much smaller than SystemWebView.apk + ChromePublic.apk.
   * Stores libchrome.so uncompressed within the APK.
   * Does not use Crazy Linker (WebView requires system linker).
     * But system linker supports crazy linker features now anyways.


text:
Indent with 2 spaces and limit lines to 80 characters please.

To contribute to Karma itself, please see [Contributing to Karma] guide.

[Contributing to Karma]: https://github.com/karma-runner/karma/blob/master/CONTRIBUTING.md

repository: jonyio/karma-html-live-reporter

gha_language: JavaScript

repo_name: jonyio/karma-html-live-reporter


text:
### Run the dd command to check io operations
* checking the write throughput
```shell
dd bs=1M count=10000 if=/dev/zero of=/data01/test.img conv=fdatasync
```
* cheking the read throughput
```shell
dd if=/data01/test.img of=/dev/null bs=1M count=10000
```
* checking the io Scheduler
```shell
cat /sys/block/sd*/queue/scheduler
```
it should deadline. It is deadline (default) in Rhel 7 and onward but
cfq or noop for 6 and below

### Check the networks
Using iperf
* to check the connectivity between 2 servers
  * on serverA
  ```iperf - s -p 2000```

  * on server B
  ```iperf -c serverA -p 2000 -n 10000M```


text:
# jool_session_monitor
jool(NAT64 component) TCP/UDP/ICMP session monitor on Zabbix

## 1. Overview
This tool can draw graph of jool's TCP/UDP/ICMP session amount on Zabbix.
it's better to use in combination with cron.
jool is Linux kernel module as NAT64 component.
![jool_tcp_session](https://github.com/onifinger/images/blob/master/tcp_session.png)

2017/11/28 merged pull request from http://github.com/enukane
changing output format of jool command after ver.3.5.4.
dealing with the above. ($2 -> $NF)

## 2. Description
I was programmed this tool for NAT64 Wi-Fi network on iOS developer's conference that have over 400 visitors.
This tool send session amounts to zabbix server by using jool commands and zabbix_sender.
I was monitored session amount even 1 minutes in this conference by cron and this tool.

## 3. Requirement
+ zabbix_agent
  - zabbix_sender contains zabbix_agent, so you need to install zabbix_agent to your jool server.

  ```
  $ yum install zabbix_agent
  ```

+ jool userspace application
  - one jool command can pick up current session amount. may you have installed jool userspace application when you set up jool.
  - will you check the URL below when you want to install.
  - https://jool.mx/en/install-usr.html

## 4. Installation
only cloning this repo to your local folder.

```:bash
$ git clone https://github.com/onifinger/jool_session_monitor.git
```

## 5. Usage
1. edit variables
  uncomment and edit these variables to suit your environment.

  ```
  # $YOUR_ZABBIX_IPADDR=
  # $YOUR_JOOL_HOSTNAME_ON_ZABBIX=
  # $YOUR_KEY_OF_TCP_ON_ZABBIX=jool.tcp.session
  # $YOUR_KEY_OF_UDP_ON_ZABBIX=jool.udp.session
  # $YOUR_KEY_OF_ICMP_ON_ZABBIX=jool.icmp.session
  ```

  Write your zabbix server's IPv4 addr to $YOUR_ZABBIX_IPADDR.
  Write jool hostname to $YOUR_JOOL_HOSTNAME_ON_ZABBIX.
  **[!] jool hostname == hostname on zabbix configuration**

  Anything is enough for $YOUR_KEY_OF_xxx_ON_ZABBIX if you meet the set point of the item on zabbix side.

1. run by your hand
  you can send current session amount to zabbix server by line below.

  ```
  $ sh jool_session.sh
  ```

1. use in combination with cron
  it is an example of crontab.

  ```
  $ crontab -l
  :
  :
  */1 * * * * /bin/sh /home/YOURNAME/jool_session.sh >>/home/YOURNAME/cron.log 2>> /home/YOURNAME/cronerr.log
  :
  :
  ```

## 6. Licence
MIT

gha_language: Shell


text:
# HandyFont
>

[ ![Download](https://api.bintray.com/packages/houtengzhi/maven/HandyFont/images/download.svg) ](https://bintray.com/houtengzhi/maven/HandyFont/_latestVersion)

> HandyFont is a library to replace font in Android.

## Installation

Add jcenter repo:

```
allprojects {
    repositories {
        jcenter()
    }
}
```

Add dependency:

```
implementation 'com.yechy.handyfont:handyfont:1.0.1'
```

## Usage

Firstly copy font files to ```assets/font/``` directory. Some configurations need to be setted, you can do it in your ```Application```.

```java
private String chilanka_regular = "font/Chilanka-Regular.ttf";
private String dancingScript_bold = "font/DancingScript-Bold.ttf";
private String dancingScript_regular = "font/DancingScript-Regular.ttf";

private String sans_serif = "sans-serif";
private String sans_serif_medium = "sans-serif-medium";

HandyFontConfig.getInstance()
                .setLogEnabled(true)
                .setDebugEnabled(true)
                .setReplaceEnabled(true)
                .addReplaceDefaultFont(dancingScript_bold)
                .addReplacedFont(sans_serif, chilanka_regular)
                .addReplacedFont(sans_serif_medium, dancingScript_regular);
```

Then replace the ```Activity``` contextwrapper with ```HandyContextWrapper```:

```java
    @Override
    protected void attachBaseContext(Context newBase) {
        super.attachBaseContext(HandyContextWrapper.wrap(newBase, this));
    }
```

or

```Java
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        HandyFontLayoutFactory factory = new HandyFontLayoutFactory(this);
        factory.installViewFactory();
        super.onCreate(savedInstanceState);
    }
```
For the fonts in ```ContextMenu```, need to replace the contextwrapper in ```Application```

```java
    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(HandyContextWrapper.wrap(base));
    }
```
For the custom view created dynamically, it's need to be set typeface manually.

```java
HandyTypeface.setTypeface(textView, null);
```

## Licence
```
    Copyright 2019 Cloud Ye

    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.
```

repository: houtengzhi/HandyFont

repo_name: houtengzhi/HandyFont


text:
---
title: "Written Image: Jellyfish"
header:
  image: /assets/images/content/header_jellyfish.png
  teaser: "/assets/images/content/teaser/t_jelly.png"
categories:
  - Written Image
tags:
  - black and white ink
  - written image poetry
  - jellyfish black and white
  - process
  - sketches
  - lineart
  - composition
---

## 2 Jellyfish

## The rest
A few weeks ago I wrote about jellyfish. I’m not going to say this is a poem – I won’t claim I can write poetry. Instead, I wrote an image on jellyfish. Images are different from poems … I think my goal was to create something that moves, rather than crafting with words. By this word ‘written image’, I mean the qualitative characteristics of what an image, which is a visual representation of a thing, provides. Think of the term ‘written image’ as something more technical and abstract.

## What is a written image (in my terms)?

As usual, words weren’t enough, so I decided to take writing an image literally: drawing an image (now, I use the term ‘image’ with the basic connotation: visual representation). That’s what makes a written image complete. A poem can have an image attached, but was the poem originally intended to have an image? If it wasn’t intended to have an image then it’s certainly a poem. If an image was in mind and then included, then there is a written image. Take note that the words are also a part of the drawing. It’s not in a random space on the page, but blending with the jellyfish.

That is what a written image is, summed up in a basic manner.

As an addition to this post, my portfolio would not be complete without the actual drawing. Here’s the jellyfish without the written image. I am pleased with the line work. I drew the jellyfish in a quick manner; about two hours total. I kept the shading and bw work at a minimum because that would obscure the very delicate line work.


text:
# Tilletia okudairae (Miyabe) L. Ling, 1953 SPECIES

#### Status
SYNONYM

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

#### Published in
Farlowia 4: 308 (1953)

#### Original name
Ustilago okudairae Miyabe, 1935

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Basidiomycota/Ustilaginomycetes/Ustilaginales/Ustilaginaceae/Franzpetrakia/Franzpetrakia okudairae/ Syn. Tilletia okudairae/README.md

repo_name: mdoering/backbone


text:
2558\. Take Gifts From the Richest Pile

Easy

You are given an integer array `gifts` denoting the number of gifts in various piles. Every second, you do the following:

*   Choose the pile with the maximum number of gifts.
*   If there is more than one pile with the maximum number of gifts, choose any.
*   Leave behind the floor of the square root of the number of gifts in the pile. Take the rest of the gifts.

Return _the number of gifts remaining after_ `k` _seconds._

**Example 1:**

**Input:** gifts = [25,64,9,4,100], k = 4

**Output:** 29

**Explanation:** The gifts are taken in the following way:

- In the first second, the last pile is chosen and 10 gifts are left behind.
- Then the second pile is chosen and 8 gifts are left behind.
- After that the first pile is chosen and 5 gifts are left behind.
- Finally, the last pile is chosen again and 3 gifts are left behind.

The final remaining gifts are [5,8,9,4,3], so the total number of gifts remaining is 29.

**Example 2:**

**Input:** gifts = [1,1,1,1], k = 4

**Output:** 4

**Explanation:**

In this case, regardless which pile you choose, you have to leave behind 1 gift in each pile.

That is, you can't take any pile with you.

So, the total gifts remaining are 4.

**Constraints:**

*   1 <= gifts.length <= 103
*   1 <= gifts[i] <= 109
*   1 <= k <= 103

repository: javadev/LeetCode-in-Java

branch_name: refs/heads/main

gha_language: Java

repo_name: javadev/LeetCode-in-Java


text:
# jupyter-shiny-proxy

**jupyter-shiny-proxy** leverages jupyter-server-proxy to proxy Shiny applications inside a Jupyter server.

![Screenshot](screenshot.png)

If you have a JupyterHub deployment, jupyter-shiny-proxy can take advantage of JupyterHub's existing authenticator and spawner to launch Shiny applications in users' Jupyter environments. You can also run this from within Jupyter.
[RStudio Connect](https://rstudio.com/products/connect/evaluation) and [Shinyapps.io](https://www.shinyapps.io/) are other options from the creator of SHiny.

## Installation

### Pre-reqs

#### Install shiny-server
[Download](https://rstudio.com/products/shiny/download-server/) the corresponding package for your platform.

### Install jupyter-shiny-proxy

Install the library:
```
pip install jupyter-shiny-proxy
```

repository: ryanlovett/jupyter-shiny-proxy

repo_name: ryanlovett/jupyter-shiny-proxy


text:
---
layout: post
author: Garrett Serack @fearthecowboy
title: The first CoApp Packages are finally here!
tags: news packages
categories:
- news
---
After what seems like an eternity and a half to get to this point, I am proud to announce that the first CoApp packages are finally here!

I've started by packaging up the CoApp installer itself as a CoApp package, and you can [download that](http://coapp.org/install) , but it's not *really* necessary, as CoApp will install itself when you install any CoApp package.

The next package that's ready is the first beta of the CoApp developer tools, this release contains the following tools:

*autopackage.exe* -- the CoApp packaging tool ... while it's a bit rough around the edges (like most of the tools) it's what I've been using to build packages so far (*note: it requires a recent build of WiX to be installed* to actually work)

*ptk.exe* -- the CoApp porting toolkit tool -- we use this to do our shallow forks

*dllimport.exe* -- a tool for creating C exports from .NET assemblies ... I should really document this :D

*quicktool.exe* -- a quick little tool for posting source snippets, images and shortening URLs... Again, I should probably document that tool so others could use it.

These tools can be found in the [coapp.devtools package](http://coapp.org/devtools).

And finally, because I'm such a big Node.js fan, a CoApp package for [node.js 0.5.2](http://coapp.org/cdn/node-<IP_ADDRESS>-x86.msi)

extension: markdown


text:
---
heading: Edit
thumbnail: plugins/images/thumbnails/edit.png
categories:
  - admin
description: A simple admin for Pico with pages/404/options editor.  Pico Edit provides a back-end interface to edit Pico pages.
link: https://github.com/blocknotes/pico_edit
images:
  - plugins/images/fullsize/edit.png
info:
  By: "[blocknotes](https://github.com/blocknotes)"
  License: "[The MIT License](https://github.com/blocknotes/pico_edit/blob/master/LICENSE.txt)"
---

A simple admin for Pico with pages/404/options editor.  Pico Edit provides a back-end interface to edit Pico pages. Additionally, it has the ability to perform some basic Git operations such as commit, push/pull etc.

**Features**

* Simple and clean interface
* Page create/edit/delete
* Markdown preview (top right icon in the editor)
* Edit 404 page (aka "page not found")
* Edit Pico options

gha_language: HTML


text:
Tai-Chi-Grading-System
======================

To further explore the field of AI, I am now developing a grading system for T’ai Chi Ch’uan
(a traditional Chinese martial art) using Kinect, OpenNI and OpenGL as my final-year research project.
. In this research project, I have used Kinect to capture and record the
T’ai Chi actions performed by experts and users, reduced image dimensions using the Principal Component Analysis (PCA),
and saved experts’ actions and characteristic information in database. The follow-up step I am now working on is
to use Naïve-Bayes-Nearest-Neighbor (NBNN) classier to match users’ actions with experts’, and to covert T’ai Chi rules
from text to geometry for grading. Although challenging, this AI research project is promising in that it helps establish
a standard, objective grading system to avoid human factors (e.g. referees’ fatigue), and can also be used as an
application for the training and dissemination of T’ai Chi Ch’uan as a cultural heritage among the public.

repository: Harryyan/Tai-Chi-Grading-System

repo_name: Harryyan/Tai-Chi-Grading-System


text:
![example workflow](https://github.com/distrustME/pata-beat/actions/workflows/build.yml/badge.svg)
# pata-beat
Rhythm based input engine similiar to the game [Patapon](https://wikipedia.org/wiki/Patapon).
This project might get refactored as a plugin later. It is currently in an early stage and still in development.

![Patapon](https://thumbs.gfycat.com/FemaleEthicalBuck-size_restricted.gif)

## Installation
In order to run this project you need the [Godot Engine v3.3.2](https://godotengine.org/download/windows) installed.
After that import the game in the project view.

## Licenses
### Source code
The code in this repository falls under the [MIT-License](https://github.com/distrustME/pata-beat/blob/master/LICENSE).

### Assets
* [NESCyrillic - Font](http://www.pentacom.jp/pentacom/bitfontmaker2/gallery/?id=234)
* [Bosca Ceoil - Audio](https://boscaceoil.net/)

repository: Morphclue/pata-beat

repo_name: Morphclue/pata-beat


text:
In one city it is allowed to write words on the buildings walls. The local janitor, however, doesn't approve of it at all. Every night he vandalizes the writings by erasing all occurrences of some letter.

Given a word, find the minimum width of the mop required to erase each of the letters.

Example

For  `word = "abacaba"`, the output should be
`theJanitor(word) = [7, 5, 1, 0, 0, ..., 0, 0]`  (`26`  elements altogether).

Input/Output

-   **[execution time limit] 3 seconds (cs)**

-   **[input] string word**

    A word consisting of only lowercase English letters.

    _Guaranteed constraints:_
    `5 ≤ word.length ≤ 50`.

-   **[output] array.integer**

    -   An array of length  `26`. The first element is the minimum width of the mop to erase letter  `'a'`, the second - letter  `'b'`  etc.

repository: M-Ekrim/codeSignal

repo_name: M-Ekrim/codeSignal


text:
# functionalify

Functional programming tools with close integration with JavaScript.

## Installation
```sh
npm install functionalify
```

## Sample Usage
```js
var functionalify = require("functionalify");
```

## Motivation
JavaScript provides us with first-class functions to build great functional programs.
Unfortunately, it also doesn't provide us with either the data structures or the methods to do so.
functionalify fills in these holes by:

1. Adding immutable, monadic, and other operations and useful to existing data structures (arrays and objects).
    * Yes, modifying prototypes is considered a no-no. But now you can use existing APIs in a functional way.
2. Contributing new, but necessary, data structures (maps, sets, and maybes (options)).
    * Yes, ES6 does define maps and sets. Ours are immutable.
3. Making all of the above work with the common frameworks/libraries of today.
    * Yes, we realize that some libraries can overwrite our methods. We'll let them.

Below are some motivating examples:

### Finding the value of a query string param
```js
function getParamValue(search, param) {
    return search.slice(1).split("&")
        .find(function(component) { return component.startswith(param + "=") })
        .flatMap(function(item) { return item.split("=").last })
        .getOrElse("");
}

const search = "?foo=bar&bar=baz&taco=belle";
getParamValue(search, "foo"); // "bar"
getParamValue(search, "freedom"); // ""
```

### Grouping values together
``` js
const evensAndOdds = (10).times.groupBy(function(val) {
    return val % 2 ? "odd" : "even";
}); // { even: [ 0, 2, 4, 6, 8 ], odd: [ 1, 3, 5, 7, 9 ] }
```
## API
### `Array`
#### Class Methods
- `from(array:Array-Like)`
    - returns array
```js
Array.from(document.querySelectorAll("p")) // Array[HTMLElement]
```

repository: kklimuk/functionalify

repo_name: kklimuk/functionalify


text:
# Dragon
Dragon is a library for geometry processing.

## What can dragon do?
### DragonView2D
- Voronoi diagram and Delaunay triangulation

![](./image/dragon_voronoi.gif)
- 7 kinds of Curves

![](./image/dragon_curve.gif)

### DragonView3D
#### Mesh
- Mesh Curvature
- Mesh Smoothing
- Mesh Parameterization for model with border
- Mesh simplification

![](./image/dragon_mesh.gif)

- Loop subdivision (updated in 2021/3/10)

![](./image/dragon_loopsubdivision.gif)

#### Point Cloud
- Point Cloud Processing
- Octree
- Simplified RBF reconstruction and Poisson reconstruction

![](./image/dragon_pcd.gif)

##### Reconstructed model using RBF and Poisson
![](./image/arma_comp.jpg)

![](./image/dragon_comp.jpg)

![](./image/kitten_comp.jpg)

##### Reconstructed model with different depth (3-7)
![](./image/arma.jpg)

![](./image/dragon.jpg)

![](./image/kitten.jpg)
### Other
- SpiderMan (The curve is cubic spline):

![](./image/dragon_spiderman.gif)

## Get Started
Prerequisites:
- OpenGL, GLUT, GLEW

Other 3rd libraries are packaged into 3rdparty (imgui)
```
mkdir build
cd build
cmake .. && make -j
```
Refer to [https://github.com/MyEvolution/GAMES102](https://github.com/MyEvolution/GAMES102) for more information.

## Acknowledgement

Thanks to [GAMES 102](http://staff.ustc.edu.cn/~lgliu/Courses/GAMES102_2020/default.html), a large part of this library comes from the assignments of this course.

## TODO
Remeshing
## ChangeLog
- 2021/3/10: Loop subdivision
- 2021/3/14: Apply real Phong model on visualization as following(the old shader is from elastic fusion and flashfusion, and the color on each vertex will not change as the moving object):
![](./image/dragon_phong_model.gif)
## License
Under the MIT License, see http://opensource.org/licenses/MIT.

repository: SiChiTong/Dragon

repo_name: SiChiTong/Dragon


text:
# Mattermost Support

#### Assumptions
- Mattermost is already installed.
- Mattermost server IP is reachable from the cluster.

### Summary
`Mattermost` is an open source, self-hosted Slack-alternative and we want to add support for the same in Botkube.

### Motivation
Currently Botkube is supporting Slack, and as a feature addition we want to include `Mattermost` support. Botkube will run on the clusters and send notifications and alerts to the configured Mattermost team. It will also be able to execute `@botkube` commands from `Mattermost`.

### Design
Steps for adding Mattermost support:
- Add package for Mattermost referring to `mattermost-server` repository.
- Add Mattermost configurations in helm chart or config.yaml.
- While starting controller, check in config if Mattermost support is enabled.
- If support enabled, initialize Mattermost with values from config.
- Start a goroutine for Mattermost.
- In controller, add notifier for `SendEvent` and `SendMessage` for Mattermost.

#### Adding package
The [mattermost-server](https://github.com/mattermost/mattermost-server) repository contains a client package to perform operations on `Mattermost` server. We will perform below operations using the package.
- Connecting to Mattermost server.
- Create `Botkube` user in Mattermost.
- Finding team in Mattermost and adding `Botkube` user to the Team.
- Finding channel or create channel if needed and adding `Botkube` user to the Channel.
- Send and Receive messages from Mattermost server.

#### Adding Configurations
We need to add below values for Mattermost in Helm Chart or config.yaml.
- Mattermost Support enabled/disabled flag
- Mattermost Server IP
- Team Name
- User-Email
- User-Name
- Password
- Channel Name(Same as Slack)

#### Controller Modifications
- In `main.go`, check in config if Mattermost support is enabled.
- If yes, then get config and add a goroutine for Mattermost.
- In `controller.go`, for event notifications and sending start/stop messages, add notifier for Mattermost.

### References
- https://github.com/mattermost/mattermost-bot-sample-golang
- https://github.com/mattermost/mattermost-server/blob/master/model/client4.go
- https://docs.mattermost.com/install/install-ubuntu-1804.html

repository: anoopmsivadas/botkube

branch_name: refs/heads/develop

repo_name: anoopmsivadas/botkube


text:
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

# 2.0.0 (2018-12-27)

### Bug Fixes

* update deps ([22e2393](https://github.com/azu/gitbook-plugin-js-console/commit/22e2393))
* **codemirror-console-ui:** export named function ([6a87ad2](https://github.com/azu/gitbook-plugin-js-console/commit/6a87ad2))
* **package:** fix webpack config ([7dc0bed](https://github.com/azu/gitbook-plugin-js-console/commit/7dc0bed))
* **plugin:** fix next pattern ([96d5806](https://github.com/azu/gitbook-plugin-js-console/commit/96d5806))

### Features

* support <!-- js-console --> comment ([567343f](https://github.com/azu/gitbook-plugin-js-console/commit/567343f))
* **gitbook-plugin-js-console:** migrate to webpack from browserify ([9189ef9](https://github.com/azu/gitbook-plugin-js-console/commit/9189ef9))
* **gitbook-plugin-js-console:** support `js-console:closed|open` ([791f02a](https://github.com/azu/gitbook-plugin-js-console/commit/791f02a))
* **plugin:** add fallback ([ebda66b](https://github.com/azu/gitbook-plugin-js-console/commit/ebda66b))
* **plugin:** enable by class ([5c6d335](https://github.com/azu/gitbook-plugin-js-console/commit/5c6d335))

repository: kakahanhaoniao/codemirror-console

repo_name: kakahanhaoniao/codemirror-console


text:
# Text-to-Handwriting

# Files

## 1 - txttohandwriting-to-img

 - This converts whatever written in the testfile.txt to IMG

## 2 - txttohandwriting-to-PDF

- This converts whatever written in the testfile.txt to PDF
## 3 - ScannedImages-to-IMG
- This converts the scanned image that is passed in arguments to IMG

## 4 - ScannedImages-to-PDF
- This converts the scanned image that is passed in arguments to IMG##
# Sample Output
![Sample Output](https://github.com/sabarishkumaran/Text-to-Handwriting/blob/master/Sample-output.png)

repository: sabarishkumaran/Text-to-Handwriting

repo_name: sabarishkumaran/Text-to-Handwriting


text:
# **Traffic Sign Recognition**

## Writeup

**Build a Traffic Sign Recognition Project**

The goals / steps of this project are the following:
* Load the data set (see below for links to the project data set)
* Explore, summarize and visualize the data set
* Design, train and test a model architecture
* Use the model to make predictions on new images
* Analyze the softmax probabilities of the new images
* Summarize the results with a written report

[//]: # (Image References)

[image1]: ./examples/visualization.jpg "Visualization"
[image2]: ./examples/grayscale.jpg "Grayscaling"
[image3]: ./examples/random_noise.jpg "Random Noise"
[image4]: ./examples/placeholder.png "Traffic Sign 1"
[image5]: ./examples/placeholder.png "Traffic Sign 2"
[image6]: ./examples/placeholder.png "Traffic Sign 3"
[image7]: ./examples/placeholder.png "Traffic Sign 4"
[image8]: ./examples/placeholder.png "Traffic Sign 5"

## Rubric Points
### Here I will consider the [rubric points](https://review.udacity.com/#!/rubrics/481/view) individually and describe how I addressed each point in my implementation.

---
### Writeup / README

#### 1. Provide a Writeup / README that includes all the rubric points and how you addressed each one. You can submit your writeup as markdown or pdf. You can use this template as a guide for writing the report. The submission includes the project code.

You're reading it! and here is a link to my [project code](https://github.com/Dios-Malone/CarND-Traffic-Sign-Classifier-Project/blob/master/Traffic_Sign_Classifier.ipynb)

### Data Set Summary & Exploration

#### 1. Provide a basic summary of the data set. In the code, the analysis should be done using python, numpy and/or pandas methods rather than hardcoding results manually.

I used the pandas library to calculate summary statistics of the traffic
signs data set:

* The size of training set is 34799
* The size of the validation set is 4410
* The size of test set is 12630
* The shape of a traffic sign image is (32, 32, 3)
* The number of unique classes/labels in the data set is 43

#### 2. Include an exploratory visualization of the dataset.

Here is an exploratory visualization of the data set. It is a bar chart showing how the data ...

![train_distribution](ref_img/train_distribution.PNG)
![valid_distribution](ref_img/valid_distribution.PNG)
![test_distribution](ref_img/test_distribution.PNG)

### Design and Test a Model Architecture

#### 1. Describe how you preprocessed the image data. What techniques were chosen and why did you choose these techniques? Consider including images showing the output of each preprocessing technique. Pre-processing refers to techniques such as converting to grayscale, normalization, etc. (OPTIONAL: As described in the "Stand Out Suggestions" part of the rubric, if you generated additional data for training, describe why you decided to generate additional data, how you generated the data, and provide example images of the additional data. Then describe the characteristics of the augmented training set like number of images in the set, number of images for each class, etc.)

As a first step, I decided to convert the images to grayscale because converting image to grayscale removes a lot of unnecessary information. It make the training faster and the model could focus on the more relevent information.

Here is an example of a traffic sign image before and after grayscaling.

![original image](ref_img/orig_img.png)
![grayscale image](ref_img/gray_img.png)

As a last step, I normalized the image data because it shifts the data closer to the origin and could effectively prevent from overfitting.

I decided to generate additional data because more data means more accurate. And more data could cover more edge senarios of the specific traffic sign group.

To add more data to the the data set, I used the following techniques:
* Randomly rotate the image
* Randomly project the image

Here is an example of an original image and an augmented image:

![grayscale image](ref_img/gray_img.png)
![rotated image](ref_img/rotated_img.png)
![grayscale image](ref_img/projected_img.png)

#### 2. Describe what your final model architecture looks like including model type, layers, layer sizes, connectivity, etc.) Consider including a diagram and/or table describing the final model.

My final model consisted of the following layers:

| Layer         		|     Description	        					|
|:---------------------:|:---------------------------------------------:|
| Input         		| 32x32x1 Gray image   							|
| Convolution 5x5     	| 1x1 stride, VALID padding, outputs 28x28x18	|
| RELU					| Activation									|
| Dropout				| keep rate at 0.7								|
| Max pooling	      	| 2x2 stride,  outputs 14x14x18 				|
| Convolution 5x5     	| 1x1 stride, VALID padding, outputs 10x10x32	|
| RELU					| Activation									|
| Dropout				| keep rate at 0.7								|
| Convolution 5x5     	| 1x1 stride, VALID padding, outputs 6x6x60		|
| RELU					| Activation									|
| Dropout				| keep rate at 0.7								|
| Max pooling	      	| 2x2 stride,  outputs 3x3x60	 				|
| Flatten				| outputs 540									|
| Fully connected		| outputs 120      								|
| RELU					| Activation									|
| Dropout				| keep rate at 0.7								|
| Fully connected		| outputs 84      								|
| RELU					| Activation									|
| Fully connected		| outputs 43      								|
| Softmax				| etc.        									|

#### 3. Describe how you trained your model. The discussion can include the type of optimizer, the batch size, number of epochs and any hyperparameters such as learning rate.

To train the model, I used an softmax_cross_entropy_with_logits to calcuate the cross entropy and provided it to reduce_mean to get loss value. Then I choosed AdamOptimizer with training rate 0.001 to train the model. During the training, I kept the batch size from previous LeNet lab as I didn't feel the training slow and I increased the epochs to 20 so that I could get a better result.

#### 4. Describe the approach taken for finding a solution and getting the validation set accuracy to be at least 0.93. Include in the discussion the results on the training, validation and test sets and where in the code these were calculated. Your approach may have been an iterative process, in which case, outline the steps you took to get to the final solution and why you chose those steps. Perhaps your solution involved an already well known implementation or architecture. In this case, discuss why you think the architecture is suitable for the current problem.

My final model results were:
* training set accuracy of 99.9%
* validation set accuracy of 96.7%
* test set accuracy of 95.8%

If an iterative approach was chosen:
* What was the first architecture that was tried and why was it chosen?
	* The first architecture used was following LeNet lab. I choosed it as a starting point to test how good it is.
* What were some problems with the initial architecture?
	* The accuracy just stopped around 0.89 no matter how I tuned the hyperparameters
* How was the architecture adjusted and why was it adjusted? Typical adjustments could include choosing a different model architecture, adding or taking away layers (pooling, dropout, convolution, etc), using an activation function or changing the activation function. One common justification for adjusting an architecture would be due to overfitting or underfitting. A high accuracy on the training set but low accuracy on the validation set indicates over fitting; a low accuracy on both sets indicates under fitting.
	* I first added a dropout layer after each activation. They were added because I would like to force less information to be used in the training, so that the model could be trained in a way that it can predict the right result with less information. In return, it could increase the accuracy. This adjustment helped me increasing the accuracy to around 92%
	* Next step, I added a convolution layer. At the first moment when I thought of adding this layer, I remember the words "the deeper the network is, the result is always better". After I added, I found the training time is still acceptable. And finally I got my accuracy above 0.93.
	* At last, I realized a reminder from my mentor. He told me that not use dropout before the last layer. I tried to remove my dropout layer before last layer. The accuracy surprisingly raised to 0.95. In the end, I understood that the dropout layer before the last layer would drop the predictions there. It means the even the model predicts the correct answer, it might be dropped out there.
* Which parameters were tuned? How were they adjusted and why?
	* The epoch was tuned up to 100, but eventually I fixed it at 20. Even through the more epochs it runs meaning that the model is trained more, too many epochs also means longer time for training. And it also causes the model to overfiting.

### Test a Model on New Images

#### 1. Choose five German traffic signs found on the web and provide them in the report. For each image, discuss what quality or qualities might be difficult to classify.

Here are five German traffic signs that I found on the web:

![image1][new_images\image_6.PNG] ![image2][new_images\image_7.PNG] ![image3][new_images\image_8.PNG]
![image4][new_images\image_9.PNG] ![image5][new_images\image_10.PNG]

All of the 5 images should be very easily classified because they are all very clear. They were taken under a good weather condition. There is nothing hiding the appearance and the lighting is also just good.

#### 2. Discuss the model's predictions on these new traffic signs and compare the results to predicting on the test set. At a minimum, discuss what the predictions were, the accuracy on these new predictions, and compare the accuracy to the accuracy on the test set (OPTIONAL: Discuss the results in more detail as described in the "Stand Out Suggestions" part of the rubric).

Here are the results of the prediction:

| Image			      			|     Prediction	        					|
|:-----------------------------:|:---------------------------------------------:|
| Speed limit (70km/h)			| Speed limit (70km/h)							|
| Priority road					| Priority road 								|
| Road work						| Dangerous curve to the right					|
| Turn right ahead 				| Turn right ahead				 				|
| Road narrows on the left		| Road narrows on the right						|

The model was able to correctly guess 3 of the 5 traffic signs, which gives an accuracy of 60%. This compares worse to the accuracy on the test set of 95.8%

#### 3. Describe how certain the model is when predicting on each of the five new images by looking at the softmax probabilities for each prediction. Provide the top 5 softmax probabilities for each image along with the sign type of each probability. (OPTIONAL: as described in the "Stand Out Suggestions" part of the rubric, visualizations can also be provided such as bar charts)

The code for making predictions on my final model is located in the 22nd cell of the Ipython notebook.

For the first image, the model is absolutely sure that this is a Speed limit (70km/h) (probability of 0.970), and the image does contain a Speed limit (70km/h) sign. The top five soft max probabilities were

| Probability         	|     Prediction	        					|
|:---------------------:|:---------------------------------------------:|
| 0.970         		| Speed limit (70km/h)							|
| 0.025     			| Speed limit (120km/h)							|
| 0.005					| Speed limit (20km/h)							|
| 0.000	      			| Speed limit (30km/h)			 				|
| 0.000				    | Traffic signals      							|

For the second image, the model is also very sure that this is a priority sign (probability of 0.834), and the image does contain a priority sign. The top five soft max probabilities were

| Probability         	|     Prediction	        					|
|:---------------------:|:---------------------------------------------:|
| 0.834         		| Priority Road									|
| 0.119     			| Speed limit (50km/h)							|
| 0.024					| Yield											|
| 0.005	      			| Stop							 				|
| 0.005				    | Double curve      							|

For the third image, the model is relatively sure that this is a sign of Dangerous curve to the right (probability of 0.721), and the image does not actually contains a sign of dangerous curve. Instead, the 2nd top prediction is the correct one. The top five soft max probabilities were

| Probability         	|     Prediction	        					|
|:---------------------:|:---------------------------------------------:|
| 0.721         		| Dangerous curve to the right					|
| 0.279     			| Road work										|
| 0.000					| Keep right									|
| 0.000	      			| Children crossing				 				|
| 0.000				    | Beware of ice/snow							|

For the forth image, the model is absolutely sure that this is a sign of Turn right ahead (probability of 1.000), and the image contains a sign of Turn right ahead. The top five soft max probabilities were

| Probability         	|     Prediction	        					|
|:---------------------:|:---------------------------------------------:|
| 1.000         		| Turn right ahead								|
| 0.000     			| Right-of-way at the next intersection			|
| 0.000					| Ahead only									|
| 0.000	      			| Speed limit (100km/h)			 				|
| 0.000				    | Go straight or left							|

For the last image, the model is relatively sure that this is a sign of Road narrows on the right (probability of 0.912), and the image contains a sign of Road narrows on the left. The sign and the predicted sign are very similar and the most important thing is that this sign is not really in the training data classes. Hence, there is no doubt that the model classify this image wrongly. But impressively the predicted sign is so close to this one. The top five soft max probabilities were

| Probability         	|     Prediction	        					|
|:---------------------:|:---------------------------------------------:|
| 0.912         		| Road narrows on the right						|
| 0.049     			| Dangerous curve to the right					|
| 0.031					| Pedestrians									|
| 0.007	      			| Children crossing				 				|
| 0.001				    | General caution								|

### (Optional) Visualizing the Neural Network (See Step 4 of the Ipython notebook for more details)
#### 1. Discuss the visual output of your trained network's feature maps. What characteristics did the neural network use to make classifications?


text:
# skaffold-mvn

This directory contains a Dockerfile for a custom Cloud Build [custom builder](https://cloud.google.com/build/docs/cloud-builders), with the necessary tools (skaffold, maven, Java) needed to build the CymbalBank app images.

This image is publicly available at: `gcr.io/google-samples/intro-to-krm/skaffold-mvn:latest`

repository: raghu-manne/build-a-platform-with-krm

repo_name: raghu-manne/build-a-platform-with-krm


text:
# "Being Proud of Who We Are" - A Statement of Pride

Every year when June rolls around we see large corporations with little
involvement in real world affairs pounce on the opportunity to reap some extra
popularity by flaunting a facade of social awareness.

 The
people that once oppressed the LGBTQ+ community are now using the flag and the
name to put on a front of Oscar-winning activism.

This year, that changes. Kludge Cyber Systems is striving to do better, because
we understand where this began and we'd like to carry it through to the end.
Our heart lies with everyone that has had to conceal their identity to feel
safe, everyone that has had to filter who they are to fit in, everyone that has
been scared to come out or still is, et cetera.

I, Tyler J. Russell, founder and lead engineer of Kludge Cyber Systems, am
bisexual myself. I will never know your pain because I have not faced many of
our community's common fears, but that's why I'm here to help.

## So, here's our plan

1. We're not changing our logo or selling rainbow-clad products in a meagre
   attempt to wear your flag for social justice points or our own monetary
   gain, because we believe in true activism and the power of people. *Yes,
   that is a dig at those megacorporations. No, we will not be apologising to
   them.*
2. We're allocating a charity appeal to help pay off higher education tuition
   fees for LGBTQ+ youth on our Open Collective to help the brilliant minds of
   this marginalized community access better opportunities, which can be found
   [here][oc].
3. I'll be taking emails from LGBTQ+ voices on<EMAIL_ADDRESS>for further
   suggestions as to ways we can help out or personal appeals we can provide
   a larger platform for, so do not hesitate to send us an email.

[oc]: https://opencollective.com/pride

## Further Resources

- [The Trevor Project][trevor], "Saving Young LGBTQ Lives"
- [Stonewall], "Acceptance without Exception"

[trevor]: https://www.thetrevorproject.org/
[stonewall]: https://www.stonewall.org.uk/

repository: kludge-cs/transparency

repo_name: kludge-cs/transparency


text:
# s3-trigger-image-processing

Monitors the s3 buckets "upload" directory for new image files and triggers their processing by calling the [step function](https://github.com/goruck/smart-zoneminder/tree/master/aws-step-function).

Based on and inspired by [smart-security-camera](https://github.com/markwest1972/smart-security-camera).

## Contents

1. **index.js** - source code.

## How to use

### IAM Role

1. Using the [AWS IAM Console](https://aws.amazon.com/console/) create an IAM Role containing the "AWSLambdaBasicExecutionRole" and "AmazonS3FullAccess" permissions.
2. Using the [AWS IAM Console](https://aws.amazon.com/console/) you also need to manually add an inline policy to your new created IAM Role, giving permission to run Step Functions:
```json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "states:StartExecution"
            ],
            "Resource": [
                "*"
            ]
        }
    ]
}
```

### Environment Variables

The variable STEP_MACHINE_ARN needs to be declared and defined in the Lambda Function console.  This should point to the ARN of your Step Function.

### Upload to AWS

1. Using the [AWS Lambda Console](https://aws.amazon.com/lambda), create a new Lambda Function, using the "blank function" blueprint.
2. Create a trigger for your s3 bucket with the event type "Object Create (All)" and the prefix "upload/".  This will ensure that this function is run for each new item uploaded to the "upload" directory of your s3 bucket.
3. Once the trigger has been specified you can copy the code from s3-trigger-image-processing.js directly into the inline code editor.
4. Ensure that the function uses your newly created IAM Role.

repository: pbran/smart-zoneminder

repo_name: pbran/smart-zoneminder


text:
# Coffee-React-Oauth app
This coffee app uses local authentication and Node.js middleware.

![coffee preview](https://github.com/gabrielacepeda/coffee-auth/blob/master/coffee.png)

## How It's Made:

**Tech used:** HTML, CSS, JavaScript, React, Node.js middleware (Express, Passport, Mongoose)

I installed the necessary middleware that would be needed to initialize this app. The local authentication service was delivered by passport, which allows the implementing of authentication. The way it works is the Barista logs into their account and adds a customer's coffee order to a list. Once the order is prepared, the coffee is marked as complete, and the name of the barista and "complete!" will appear next to the order.

## Optimizations
When the coffee order is marked as completed, the name of the customer and his/her order could be announced via a text-to-voice API.

## Lessons Learned:
It was my first applcation using React and it was challenging at first, but I learned a lot.

## Installation

1. Clone repo
2. run `npm install`

## Usage

1. run `node server.js`
2. Navigate to `localhost:8080`

## Credit

Modified from Scotch.io's auth tutorial
## coffee

repository: gabrielacepeda/coffee-react-app

repo_name: gabrielacepeda/coffee-react-app


text:
# My Python scripts

I always try to use the latest version of Python 3. Haven't tested any of the scripts with Python 2.

- [ssh-known-hosts](#ssh-known-hosts)
- [mp3-idv3-tags](#mp3-idv3-tags)
- [generate-iconset](#generate-iconset)
- [oxps-to-pdf](#oxps-to-pdf)
- [create-folders-for-files](#create-folders-for-files)
- [tinyurl](#tinyurl)
- [folders-creation-datetimes](#folders-creation-datetimes)
- [getPossibleTestResults](#getpossibletestresults)

## ssh-known-hosts

SSH config known hosts analysis.

## mp3-idv3-tags

Mass ID3v2 tags editing.

``` bash
python mp3-idv3-tags.py /path/to/folder/with/mp3files/
```

## generate-iconset

Generate `.icns` file for Mac OS application from `.png` picture.

``` bash
python generate-iconset.py /path/to/original/icon.png
```

Result (`icon.icns`) will be saved to `/path/to/original/`.

More information in the following [article](https://retifrav.github.io/blog/2018/10/09/macos-convert-png-to-icns/).

## oxps-to-pdf

Convert OXPS files into PDF. Requires `ghostscript`/`gxps` to be installed.

``` bash
python oxps-to-pdf.py /path/to/folder/with/oxps/files
```

## create-folders-for-files

I [needed that](http://retifrav.github.io/blog/2019/03/17/migrating-from-octopress-to-hugo/#reorganizing-the-posts) to reorganize my Octopress blog posts to a new folder structure for Hugo.

Original structure:

```
.
├── first-post.md
├── ios-player-buttons-areas.md
├── gta-iv-final-mission-bug.md
├── sidebar-in-octopress.md
├── no-more-overlicensed.md
...
```

New structure:

```
.
├── first-post
│   └── index.md
├── ios-player-buttons-areas
│   └── index.md
├── gta-iv-final-mission-bug
│   └── index.md
├── sidebar-in-octopress
│   └── index.md
├── no-more-overlicensed
...
```

It takes only one argument which is the path to folder with the files you want to reorganize:

``` bash
python create-folders-for-files.py ~/Desktop/posts/
```

## tinyurl

A [TinyURL](http://tinyurl.com) API caller:

``` bash
python tinyurl.py http://example.org
```

Part of [my Alfred workflow](http://retifrav.github.io/blog/2019/04/02/tinyurl-alfred-workflow/).

## folders-creation-datetimes

There is the following folders structure:

```
/tmp/revisions/
├── 37829
│   └── Tools
├── 37976
│   └── Tools
└── 37993
    └── Tools

Nov 24 18:30 37829/Tools
Nov 24 18:37 37976/Tools
Nov 24 18:31 37993/Tools
```

Need to get UTC datetimes of `Tools` folders and form a list of SQL queries for inserting like this:

``` sql
insert into revisions(dt_published,release_id,revision,content_id) values('2019-11-24 17:31:07',1,'37993',3);
insert into revisions(dt_published,release_id,revision,content_id) values('2019-11-24 17:30:21',1,'37829',3);
insert into revisions(dt_published,release_id,revision,content_id) values('2019-11-24 17:37:17',1,'37976',3);
```

Run:

```
python folders-creation-datetimes.py /tmp/revisions/
```

## getPossibleTestResults

There is some online test and you want to get all the possible results. Having a results URL like `http://mindmix.ru/result?t=23147&1=3&2=3&3=2&4=3&5=4&6=2&7=2&8=2&9=3&10=4`, you can send a 1000 requests with random values.

repository: alagrede/python-scripts

repo_name: alagrede/python-scripts


text:
# User Guide for APEC

(Accessibility Pattern based Epigenomic Clustering)

## Introduction

APEC can perform fine cell type clustering on single cell chromatin accessibility data from scATAC-seq, snATAC-seq, sciATAC-seq or any other relevant experiment. It can also be used to control data quality, map fragment count matrices, search for important differential motifs/genes for each cell cluster, find super enhancers, and construct pseudo-time trajectory (by calling Monocle).

**If users want to process the raw fastq data from scATAC-seq experiment, please run APEC from section 2 "Fragment count matrix". If users have their own fragment count matrix from snATAC-seq, sciATAC-seq or other experiments, where each element is the number of fragments per-cell-per-peak, please skip section 2 and run APEC from section 3 "Clustering".**

For our example projects, most of APEC's results (including plots and dataframes) can be reproduced on a general computer system. For each APEC program, users can add the '-h' parameter to display an introduction to the input parameters.

## 1. Requirements and installation

### 1.1	Requirements

APEC requires users to use Linux system (CentOS 7.3+ or Ubuntu 16.04+), as well as Python (version 2.7.15+), Java (version 1.8.0+) and R (version 3.4+) environment. Users also need to install the latest version of the following packages (**All these packages can be installed by miniconda, as described in "Install_by_miniconda.md"**):

(1) Python packages and libraries:

    numpy, scipy (1.0.0), pandas, scikit-learn (0.20.0), multiprocessing, numba, pysam, matplotlib,
    seaborn, setuptools, networkx, python-louvain (0.11), python-Levenshtein, multicore-tsne, ryp2(2.8.6).

    All upon python packages can be installed by: pip install package_name

Note: Please use scikit-learn=0.20.0 and python-louvain=0.11 if you want to reproduce the tSNE plots of our example projects.

(2) R packages and libraries:

    Monocle 2.4.0: http://cole-trapnell-lab.github.io/monocle-release/

(3) Other necessary software:

All of the following software needs to be placed in the global environment of the Linux system to ensure that they can be called in any path/folder. Picard is also required, but we have placed it into $APEC/reference folder, and users don't need to install it. We recommend that users adopt the latest version of these software, except Meme (version 4.11.2). If users have their own fragment count matrix and only want to run APEC from section 3 "Clustering", then Bowtie2 and Macs2 are not required.

    Bowtie2: https://sourceforge.net/projects/bowtie-bio/files/bowtie2/2.2.9/
    Samtools: https://github.com/samtools/samtools
    Bedtools: http://bedtools.readthedocs.io/en/latest/content/installation.html
    Macs2: https://github.com/taoliu/MACS.git
    Meme 4.11.2: http://meme-suite.org/doc/download.html?man_type=web
    bedGraphToBigWig: http://hgdownload.soe.ucsc.edu/admin/exe/linux.x86_64/
    Homer: http://homer.ucsd.edu/homer/

**notes: Users need to download genome reference for Homer by "perl /path-to-homer/configureHomer.pl -install hg19" and "perl /path-to-homer/configureHomer.pl -install mm10".**

### 1.2	Installation

Users simply completes the APEC installation by copying the APEC folder to any path on the computer (i.e. $APEC). There are two subfolders in APEC: a **code** folder (code_v1.0.5), which contains all APEC programs for data processing; a **reference** folder, which contains all necessary index and reference files for the hg19 and mm10 genomes. Users **must** run APEC program directly in $APEC/code/, since each program will invoke the reference files automatically. The **reference** folder is required for APEC and should be placed in the same path ($APEC) with the **code** folder. **But we didn't upload reference files to GitHub since they are too big. Users can download all reference files from http://galaxy.ustc.edu.cn:30803/APEC/**. If users have downloaded the **code** and **reference** folders, the installation will take less than 1 minute by moving them to the same path (i.e. $APEC). The **reference** folder should contains the following files:

    hg19_refseq_genes_TSS.txt, hg19_RefSeq_genes.gtf, hg19_blacklist.JDB.bed,
    hg19_chr.fa, hg19_chr.fa.fai, hg19.chrom.sizes,
    hg19.1.bt2, hg19.2.bt2, hg19.3.bt2, hg19.4.bt2, hg19.rev.1.bt2, hg19.rev.2.bt2,
    mm10_refseq_genes_TSS.txt, mm10_RefSeq_genes.gtf, mm10_blacklist.BIN.bed,
    mm10_chr.fa, mm10_chr.fa.fai, mm10.chrom.sizes,
    mm10.1.bt2, mm10.2.bt2, mm10.3.bt2, mm10.4.bt2, mm10.rev.1.bt2, mm10.rev.2.bt2,
    JASPAR2018_CORE_vertebrates_non-redundant_pfms_meme.txt, tier1_markov1.norc.txt, picard.jar

## 2. Fragment count matrix

### 2.1	Arrangement of raw data

Users need to build a project folder (i.e. $project), which contains a **data** folder, then copy all raw sequencing fastq files into the $project/**data**/ folder. All these pair-end fastq files should be named as:

    type1-001_1.fastq, type1-001_2.fastq, type1-002_1.fastq, type1-002_2.fastq, ……;
    type2-001_1.fastq, type2-001_2.fastq, type2-002_1.fastq, type2-002_2.fastq, ……;
    ……

where "\_1" and "\_2" indicate forward and backward reads for pair-end sequencing. {type1, type2, ...} can be cell-types or batches of samples, such as {GM, K562, ...}, or {batch1, batch2, ...}, or any other words without underline "\_" or dash "-".
The **work**, **matrix**, **peak**, **result** and **figure** folders will be automatically built by subsequent steps, and placed in $project folder.

### 2.2	Easy-run of matrix preparation

Users can use the script ***APEC_prepare_steps.sh*** to finish the process from raw data to fragment count matrix.  This script includes steps of "trimming", "mapping", "peak calling", "aligning read counts matrix", "quality control", "estimating gene score". Running this step on our example project (i.e. project01 with 672 cells) will take 10~20 hours on an 8-core 32 GB computer, since the sequence mapping step is the slowest step.

Example:

    bash APEC_prepare_steps.sh -s $project -g hg19 -n 4 -l 3 -p 0.2 -f 2000

Input parameters:

    -s: The project path, which should contain data folder before running APEC.
    -g: "hg19" or "mm10".
    -n: Number of CPU cores.
    -l: Threshold for the –log(Q-value) of peaks, used to filter peaks.
    -p: Threshold of the percentage of fragments in peaks, used to filter cells.
    -f: Threshold of the fragment number of each cell, used to filter cells.

Output files:

The script ***APEC_prepare_steps.sh*** will generate **work**, **peak**, **matrix**, and **figure** folders with many output files. Here, we only introduce files that are useful to users. For our example projects, all of these results can be reproduced on a general computer system.

(1) In **data** folder:

    cell_info.csv: Two-column list of cell information.

(2) In **work** folder:

For each cell, the mapping step can generate a subfolder (with cell name) in the **work** folder. There are several useful files in each subfolder:

    cell_name.hist.pdf: A histogram of fragment length distribution of each cell.
    cell_name.RefSeqTSS.pdf: Insert enrichment around TSS regions of each cell.

(3) In **peak** folder:

    mergeAll.hist.pdf: A histogram of fragment length distribution of all cells.
    mergeAll.RefSeqTSS.pdf: Insert enrichment around TSS regions of all cells.
    top_filtered_peaks.bed: Filtered top peaks, ranked by Q-value.
    genes_scored_by_peaks.csv: Gene scores evaluated by TSS peaks.

(4) In **matrix** folder:

    reads.mtx: Fragment count matrix.
    cell_info.merged.csv: Data quality report of each cell.
    filtered_cells.csv: Filtered cells.
    filtered_reads.mtx: Filtered fragment count matrix in mtx format.

(5) In **figure** folder:

    cell_quality.pdf: A scatter plot of the fragment number and the percentage of fragments in peaks.

_Figure 1. cell_quality.pdf in **figure** folder_

_Figure 2. mergeAll.RefSeqTSS.pdf in **peak** folder_

## 3.	Clustering

### 3.1	If users want to apply their own matrix

**Skip this step** if users have run ***APEC_prepare_steps.sh*** in Section 2 "Fragment count matrix" and generated fragment count matrix from the raw scATAC-seq data.

If users have their own fragment count matrix, please build **matrix**, **peak**, and **figure** folders in $project path, and place "filtered_cells.csv" and "filtered_reads.mtx" in **matrix** folder, "top_filtered_peaks.bed" in **peak** folder. Then users need to run script ***prepare_premappedMatrix.py*** if they want to run motif and gene analysis in the next steps. This step will take about 60 minutes to run our example project (i.e. project02) on an 8-core 32 GB computer.

Example:

    python prepare_premappedMatrix.py -s $project --ref hg19 --fa $APEC/reference/hg19_chr.fa --np 4

Input parameters:

    -s:    The project path that contains data, work, matrix, peak, result and figure folders.
    --ref: "hg19" or "mm10".
    --fa:  The "hg19_chr.fa" or "mm10_chr.fa" file in the reference folder.
    --np:  Number of CPU cores.

Details about initial files:

    filtered_cells.csv: Two-column (separated by tabs) list of cell information ('name' and 'notes'), such as:
                        	name    notes
                        	CD4-001 CD4
                        	CD4-002 CD4
                        	CD8-001 CD8
                        	CD8-002 CD8
    top_filtered_peaks.bed: Three-column list of peaks, similar to the peaks.bed file in the 10X scATAC-seq datasets
    filtered_reads.mtx: Fragment count matrix in mtx format, where each row is a peak and each column represents a cell,
                        similar to the matrix.mtx file in the 10X scATAC-seq datasets.
                        The order of cells should be same with "filtered_cells.csv", and the order of peaks should be
                        same with "filtered_top_peaks.bed".

### 3.2 Clustering based on accessons

To clustering cells by accessons, users can run the script ***cluster_byAccesson.py*** on the fragment count matrix. This step will take about 5 minutes to run our example projects (project01) on one single core of CPU if users run Louvain clustering only. Hierarchical clustering will be expensive for project with more than 3000 cells.

Example:

    Python cluster_byAccesson.py -s $project

Input parameters:

    -s:       The project path that contains data, work, matrix, peak, result and figure folders.
    --nc:     Number of cell clusters. If nc=0, it will be predicted by Louvain algorithm. default=0.
              If users set their own cluster number, APEC will perform KNN clustering.
    --ngroup: Number of accessons, default=600.
    --norm:   score or probability; set normalization method, default=zscore.
    --hc:     Run hierarchical clustering or not, would be very slow for more than 3000 cells.
              If hc=no, only Louvain clustering will be applied. default=no.

Output files important to users:

(1) In **result** folder:

    TSNE_by_APEC.csv: tSNE transformation of accesson count matrix.
    louvain_cluster_by_APEC.csv: Result of Louvain clustering.
    KNN_cluster_by_APEC.csv: KNN clustering result, if users set their own cluster number (--nc).

(2) In **figure** folder:

    TSNE_by_APEC.pdf: tSNE diagram of cells, colored by the "notes" column in $project/matrix/filtered_cells.csv.
    louvain_cluster_by_APEC.pdf: Louvain clustering result of cells, plotted on tSNE map.
    KNN_cluster_by_APEC.pdf: KNN clustering result, if users set their own cluster number (--nc).
    cell_cell_correlation_by_APEC.png: Hierarchical clustering of corrlation matrix of cells, if "--hc yes".

(3) In **matrix** folder:

    Accesson_reads.csv: Accesson fragment count matrix.
    Accesson_peaks.csv: Peaks that labeled by corresponding accesson.

_Figure 3. TSNE_by_APEC.pdf in **figure** folder_

_Figure 4. louvain_cluster_by_APEC.pdf in **figure** folder_

### 3.3 Clustering based on motifs (same as chromVAR)

The script ***cluster_byMotif.py*** provides a python version of motif-based cell clustering, with the same algorithm as chromVAR. This step will take about 30 minutes to run our example projects (project01) on a 8-core CPU.

Example:

    python cluster_byMotif.py -s $project --ns 50 --np 8 --nc 0 --space pca

Input parameters:

    -s:      The project path that contains data, work, matrix, peak, result and figure folders.
    --ns:    Number of permuted samplings to calculate the bias-corrected deviations of motifs.
             Its default value is 50.
    --np:    Number of CPU cores.
    --nc:    Number of cell clusters. If nc=0, it will be predicted by Louvain algorithm. default=0.
             If users set their own cluster number, APEC will perform KNN clustering.
    --hc:    Run hierarchical clustering or not, would be very slow for more than 3000 cells.
             If hc=no, only Louvain clustering will be applied. default=no.

Output files description:

(1) In **result** folder:

TSNE_by_chromVAR.csv and louvain_cluster_by_chromVAR.csv are similar to the results in Section 3.2, except that they are generated by motif-based clustering (same as chromVAR). And deviation_chromVAR.csv is the bias corrected deviation matrix generated by chromVAR algorithm.

(2) In **figure** folder:

TSNE_by_chromVAR.pdf and louvain_cluster_by_chromVAR.pdf are similar to the results in Section 3.2, except that they are generated by motif-based clustering (same as chromVAR).

### 3.4 Clustering comparison

Users can run ***cluster_comparsion.py*** to measure the accuracy of the clustering algorithm by comparing its result with known FACS cell indexes, or to compare the clustering results of two different algorithms.

Example:

    python cluster_comparison.py --c1 $project/matrix/filtered_cells.csv
                                 --c2 $project/result/louvain_cluster_by_APEC.csv

Input parameters:

    --c1: "filtered_cells.csv" file in matrix folder, or "cluster_by_XXX.csv" in result folder.
    --c2: Cell clustering result file different with c1.

The output information will be directly printed on the screen, including the contingency matrix and the ARI (adjusted rand index) value.

## 4. Feature analysis

### 4.1 Differential motifs and genes

Before the running of differential feature analysis, please run ***generate_gene_score_by_accesson.py*** first:

    python generate_gene_score_by_accesson.py -s $project --genome hg19

Input Parameter:

    -s:        The project path.
    --genome   Genome reference used for gene annotation, can be "hg19" or "mm10".
    --width    Width of genome window for fisher exact test, default=1000000.
    --pvalue   P-value threshold for fisher exact test, default=0.01.

Output files:

    $project/matrix/Accesson_annotated.csv
    $project/matrix/gene_annotated.csv
    $project/matrix/gene_score.csv

Then users can run differential feature search as:

    python generate_differential_markers.py -s $project
                                            --cfile $project/result/louvain_cluster_by_APEC.csv
                                            --cluster 1 --vs 2,3 --motif yes --gene yes

Input parameters:

    -s:        The project path.
    --cfile:   The cluster.csv file of a clustering method, e.g. $project/result/louvain_cluster_by_APEC.csv
    --cluster: The target cluster for differential markers analysis, can be 0, 1, 2, …, or a batch of
               clusters like "0,2".
    --vs:      vs which clusters users search differential markers for target cluster, e.g. "1,3". default=all.
    --pvalue:  P-value threshold for differential markers, default=0.001.
    --fold:    Fold change cutoff of differential markers, default=2.
    --motif:   Whether to search differential motifs, default=no.
    --gene:    Whether to search differential genes, default=yes.

Output files:

In **result** folder, users can see three types of output files: "genes_of_cluster_XXX.csv", and "motifs_of_cluster_XXX.csv", which respectively list the differential peaks, genes, and motifs of one cell-cluster (vs all other clusters or a batch of clusters).

### 4.2 Pseudo-time trajectory

Example:

    python generate_trajectory.py -s $project --npc 5 --cfile $project/matrix/filtered_cells.csv

Input parameters:

    -s:      The project path.
    --npc:   Number of principle components used for pseudo-time trajectory, default=5.
    --cfile: Cell-types file, e.g. $project/matrix/filtered_cells.csv or $project/result/louvain_cluster_by_APEC.csv.
    --dim:   Plot 2D or 3D trajectory, default=3.
    --angle: Angles to rotate the 3D trajectory, default="30,30".

Output files:

This script can generate "monocle_reduced_dimension.csv" and "monocle_trajectory.csv" in **result** folder, and "pseudotime_trajectory.pdf" in **figure** folder. These files depict the structured data and 3D image for pseudo-time trajectory respectively.

### 4.3 Marker motif/gene plot

Example:

    python generate_markers_on_plots.py -s $project
                                        --cfile $project/result/TSNE_by_APEC.csv
                                        --type motif --name RELA

Input parameters:

    -s:      The project path.
    --cfile: "TSNE_by_APEC.csv" or "monocle_reduced_dimension.csv" file (in result folder) to render
             the enrichment of marker gene/motif.
    --type:  Type of marker, can be "motif" or "gene".
    --name:  Name of marker.
    --angle: Angles to rotate the 3D trajectory, default="30,30".

Output files:

Depending on the type of marker (motif or gene) and diagram (tSNE or pseudo-time trajectory), users will find different output plots in **figure** folder:

    motif_XXX_on_TSNE_by_APEC.pdf
    gene_XXX_on_TSNE_by_APEC.pdf
    motif_XXX_on_trajectory_by_APEC.pdf
    gene_XXX_on_trajectory_by_APEC.pdf

_Figure 5. motif_FOS_on_TSNE_by_APEC.pdf in **figure** folder_

### 4.4 UCSC track

The program "generate_UCSCtrack.py" is not available if users have their own fragment count matrix and run APEC from section 3 "Clustering".

Example:

    python generate_UCSCtrack.py -s $project --cfile $project/result/louvain_cluster_by_APEC.csv
                                 --gsize $APEC/reference/hg19.chrom.sizes

Input parameters:

    -s: The project path.
    --cfile: The cell clustering result file, e.g. "louvain_cluster_by_APEC.csv" file in $project/result/ folder.
    --gsize: The chromosome lengths file, i.e. "hg19.chrom.sizes" or "mm10.chrom.sizes" in $APEC/reference/ folder

Output files:

This script will generate several .bw files in $project/result/track/ folder, and each .bw file is named by its corresponding cell-cluster. Other files (.bam, .bedgraph) in this folder can also be helpful if users want to know more details about the genome-wide fragment count for each cell-cluster.

### 4.5 Super enhancer

Example:

    python generate_superEnhancer.py -s $project

Input parameters:

    -s: The project path.

Output files:

The "potential_super_enhancer.csv" in **result** folder shows the adjacent peaks belonging to the same accesson, and their genomic regions. Users need to check the .bw files of the cell-clusters on the UCSC track browser to confirm the super enhancer regions.

repository: QuKunLab/APEC

repo_name: QuKunLab/APEC


text:
# Quiet please!

An Angular application that sends alerts using the SendHub API.

### Run the Application

Preconfigured the project with a simple development web server.  The simplest way to start
this server is:

```
npm start
```

Now browse to the app at `http://localhost:8000/app/alerter/alerter.html`.

## Testing

### Running Unit Tests

The angular-seed app off on which this project is based, comes preconfigured with unit tests. These are written in
[Jasmine][jasmine], which we run with the [Karma Test Runner][karma]. We provide a Karma
configuration file to run them.

* the configuration is found at `karma.conf.js`
* the unit tests are found next to the code they are testing and are named as `..._test.js`.

The easiest way to run the unit tests is to use the supplied npm script:

```
npm test
```

[git]: http://git-scm.com/
[bower]: http://bower.io
[npm]: https://www.npmjs.org/
[node]: http://nodejs.org
[protractor]: https://github.com/angular/protractor
[jasmine]: http://jasmine.github.io

[karma]: http://karma-runner.github.io
[travis]: https://travis-ci.org/
[http-server]: https://github.com/nodeapps/http-server


text:
# Roary

Roary is a high speed Pan Genome pipeline. Roary is not intended for meta-genomics or for comparing extremely diverse sets of genomes. In order to achieve this speed up of the NP-hard task of Pan Genome assembly, Roary is non-deterministic.

This is a [KBase](https://kbase.us) module generated by the [KBase Software Development Kit (SDK)](https://github.com/kbase/kb_sdk).

You will need to have the SDK installed to use this module. [Learn more about the SDK and how to use it](https://kbase.github.io/kb_sdk_docs/).

You can also learn more about the apps implemented in this module from its [catalog page](https://narrative.kbase.us/#catalog/modules/Roary) or its [spec file]($module_name.spec).

Link to the github repository for this KBase SDK application [github repo](https://github.com/slebras/Roary)

Roary is developed by Sanget Pathogens and more information about its use can be found at their website [Roary website](https://sanger-pathogens.github.io/Roary/) and github repository for Roary [Roary github](https://github.com/sanger-pathogens/Roary)

# Setup and test

Add your KBase developer token to `test_local/test.cfg` and run the following:

```bash
$ make
$ kb-sdk test
```

After making any additional changes to this repo, run `kb-sdk test` again to verify that everything still works.

# Installation from another module

To use this code in another SDK module, call `kb-sdk install Roary` in the other module's root directory.

# Help

You may find the answers to your questions in our [FAQ](https://kbase.github.io/kb_sdk_docs/references/questions_and_answers.html) or [Troubleshooting Guide](https://kbase.github.io/kb_sdk_docs/references/troubleshooting.html).

repository: slebras/Roary

repo_name: slebras/Roary


text:
# Land-use impacts of Brazilian wind power expansion

**Olga Turkovska, Gabriel Castro, Michael Klingler, Felix Nitsch, Peter Regner, Aline Cristina Soterroni, Johannes Schmidt**

This repository contains code used to obtain the results presented in _Land-use impacts of Brazilian wind power expansion_ paper, published in Environmental Research Letters.

Turkovska, O., Castro, G., Klingler, M., Nitsch, F., Regner, P., Soterroni, A.C., Schmidt, J., 2020. Land-use impacts of Brazilian wind power expansion. Environ. Res. Lett. https://doi.org/10.1088/1748-9326/abd12f

### Repository description

* Necessary Python packages and dependancies are provided in *environment.yml*
* This environment is applicable for Windows 10.
* Original data include:
    * MapBiomas land-use & land cover map timeseries. Collection 4. https://mapbiomas.org/
    * Sistema Georreferenciado do Setor Elétrico do Agência Nacional de Energia Elétrica (ANEEL) wind turbine database.
    * IBGE federal states boundaries.
* DATA WARNING: unfortunately, ANEEL wind turbine database - as used in this study - is not accessible anymore outside of Brazil.
                Data-processing module of this repository is not adapted to the new data format of MapBiomas maps.

**Acknowledgment**

We gratefully acknowledge support from the European Research Council (“reFUEL” ERC2017-STG 758149).

repository: olga-turkovska/wind-land-brazil

gha_language: Python

repo_name: olga-turkovska/wind-land-brazil


text:
# dotfiles-laptop

This repository is a backup of my dotfiles for my laptop.

## Softwares

The config files needs to be copied in:

Name          | Path
------------- | -------------
i3            | $HOME/.config/i3
i3lock        | $HOME/.config/scripts/i3lock
polybar       | $HOME/.config/polybar
Xressources   | $HOME/

## Scripts

Some scripts are also present, maily used by Polybar:
* `pkg.sh`: Shows the number of new updates
* `polybarLauncher.sh`: Launch the Polybar bar if not already started

## Results

### Clean

![alt tag](https://github.com/frenchieisverige/dotfiles-laptop/blob/master/ressources/clean.png)
### Dirty

![alt tag](https://github.com/frenchieisverige/dotfiles-laptop/blob/master/ressources/dirty.png)

## TODOs

Some configuration files are still needed to be done:
* `ranger`
* `dunst`
* `lightdm`
* Firefox CSS
* GTK3
* Script deployment with SYMLINK

## Built With

* [Unixporn](https://www.reddit.com/r/unixporn/) - The subreddit for *NIX desktops customization

## License

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

## Authors

* **FrenchieiSverige** - *Initial work* - [Laptop Dotfiles](https://github.com/frenchieisverige)

repository: frenchieisverige/dotfiles-laptop

repo_name: frenchieisverige/dotfiles-laptop


text:
# [DEPRECATED]

# Introduction

This is a simple example of a Node.JS applications build using scripts and a VSTS declarative build definition (`.vsts-ci.yml`).

The sample contains scripts for both *bash* and *Powershell Core* (pick a flavor), and means to express a VSTS build definiton in a declarative style.

## Prerequisites

A couple of components are required to be installed before executing the script. Here is a list of them, with a small explenation:

| Tool    | Comment |
|---------|---------|
| AWS CLI | A command line tool that the script heavily relies on for interacting with AWS ECR |
| AWS access | The AWS CLI should be authenticated either by environment variables or a config file within you user folder. |

## Usage

The following will show how to use both the linux shell script and the powershell core editions of the pipeline.

## Linux Shell Script

The general usage is as followed:

```text
Usage: pipeline.sh [buildnumber]

Options:

- buildnumber   Specifing a buildnumber will also push the container
                to the container registry.
```

### Local usage

```bash
./pipeline.sh
```

### Build server usage (on VSTS)

To enable automatic push of container image, please supply an argument to the `pipeline.sh` bash script. Like:

```text
./pipeline.sh $(Build.BuildId)
```

NOTE: When executing `pipeline.sh` bash script as an inline script (or through the `.vsts-ci.yml`) the script needs *execute permission*. Also be aware that VSTS secrets are **NOT** available as environment variables, but can be made available through the use of build variables:

```bash
export AWS_SECRET_ACCESS_KEY=$(AWS_SECRET_ACCESS_KEY)
chmod +x ./pipeline.sh
./pipeline.sh $(Build.BuildId)
```

## Powershell Core

The general usage is as followed:

```text
Usage: pipeline.ps1 [-containerImageName <name>] [-pushImage -buildNumber <buildnumber>]

Options:

- containerImageName    Specifies name of the container image when built.
- pushImage             Flag for indicating that image should be pushed to registry.
                        Please note that if set a build number is also required.
- buildNumber           String indicating the build number that the container
                        image will be tagged with.
```

### Local usage

For local usage you can execute the pipeline up until the container image is actually pushed to a registry. Run the following:

```powershell
PS> ./pipeline.ps1
```

Run `docker images` afterwards to verify that the container image has been built.

### Build server usage (on VSTS)

On VSTS a recommended execution could be:

```powershell
PS> ./pipeline.ps1 -pushImage -buildNumber $(Build.BuildId)
```

The example above injects the VSTS build number into the pipeline script, so that it can be used to tagging the container image.

NOTE: When executing the `pipeline.ps1` script as an inline script (or through the `.vsts-ci.yml`), be aware that VSTS secrets are **NOT** available as environment variables, but can be made available through the use of build variables:

```powershell
$env:AWS_SECRET_ACCESS_KEY = "$(AWS_SECRET_ACCESS_KEY)"
./pipeline.ps1 -pushImage -buildNumber $(Build.BuildId)
```

## Declarative Build Definition (a.k.a. `.vsts-ci.yml`)

> **IMPORTANT**: The naming and location of `.vsts-ci.yml` is fixed - otherwise the build will not have the required permission to build agents and other resources in VSTS.

The `.vsts-ci.yml` contains the steps need to execute a build in VSTS that:

1. Runs the build script (either `pipeline.sh` or `pipeline.ps1`), which final output is a container image pushed to the registry.
1. Publishes test results using the "Publish Test Results" VSTS task.
1. Publishes the Kubernetes manifests as build artifacts using the "Publish Build Artifacts" VSTS task.

> **NOTE**: For other application setups some manual modification is most likely required.

repository: samidbb/samples-pipeline-nodejs

repo_name: samidbb/samples-pipeline-nodejs


text:
# 1. Download SARS-CoV-2 open data

Downloading data from <https://nextstrain.org/ncov/open/global> and placing into directory `input/`. Data downloaded as of August 12, 2021.

```bash
mkdir input/
cd input/

wget https://data.nextstrain.org/files/ncov/open/sequences.fasta.xz
wget https://data.nextstrain.org/files/ncov/open/metadata.tsv.gz
```

Also downloading preprocessed files to compare everything to in directory `input/nextstrain-preprocessed`. Data downloaded as of August 12, 2021.

```bash
mkdir nextstrain-preprocessed
cd nextstrain-preprocessed

wget https://data.nextstrain.org/files/ncov/open/aligned.fasta.xz
wget https://data.nextstrain.org/files/ncov/open/filtered.fasta.xz
wget https://data.nextstrain.org/files/ncov/open/masked.fasta.xz
wget https://data.nextstrain.org/files/ncov/open/mutation-summary.tsv.xz
```

```bash
find input/ | xargs sha256sum >> sha256.input
```

# 2. Extract sequences to separate files

I currently need every genome to be a separate fasta file to analyze the data in my software. So I need to extract all genomes into separate fasta files.

Run `1-subset-sequences.ipynb`

# 3. Update pangolin lineages

To update pangolin lineages run `2-pangolin-lineages.ipynb`

# 3. Create index

Run the following:

```bash
gdi init index
gdi --project-dir index --ncores 32 analysis --use-conda --no-load-data --reference-file references/NC_045512.gbk.gz --sample-batch-size 10000 --input-structured-genomes-file input-files.tsv
gdi --project-dir index --ncores 32 load vcf --reference-file references/NC_045512.gbk.gz --sample-batch-size 10000 snakemake-assemblies.1628885062.6623144/gdi-input.fofn
```

repository: apetkau/genomics-data-index-evaluation

repo_name: apetkau/genomics-data-index-evaluation


text:
# randchoice - Pick random choices from lists.

A micro library for picking random item(s) from lists.

The population of lists can be weighted if required.

Inspired by Python's random.choices.

## Usage Lists

A simple usage example:

    main() {
      print('\nExample 1 - Pick 1 from a list.');
      print(RandomChoice.choices(['a', 'b', 'c'])[0]);

      print('\nExample 2 - Pick 2 from a list.');
      var results = RandomChoice.choices(['red', 'green', 'blue', 'alpha'], 2);
      print(results[0]);
      print(results[1]);

      print('\nExample 3 - Pick 10 from a list and ');
      print('weight the elephants to be twice as likely.');
      results = RandomChoice.choices(['elephant', 'frog'], 10, [2, 1]);
      results.forEach((String animal) => print('\t$animal'));

      print('\nExample 4 - Pick 10 from a list and ');
      print('weight the elephants to be four times as likely.');
      results = RandomChoice.choices(['elephant', 'frog'], 10, [4, 1]);
      results.forEach((String animal) => print('\t$animal'));
    }

## Features and bugs

Please file feature requests and bugs at the [issue tracker][tracker].

[tracker]: https://github.com/daftspaniel/randchoice/issues

repository: daftspaniel/randchoice

repo_name: daftspaniel/randchoice


text:
# React Native PubNub example

**Additional getting started resources:**

-   The [React Native Tutorial](https://pubnub.com/tutorials/getting-started-chat-sdk-react-native/) and accompanying [sample app](https://github.com/PubNubDevelopers/)

---

## Prerequisites

You need to have a React Native development environment set up using the guides in [React Native documentation](https://facebook.github.io/react-native/docs/getting-started) (React Native CLI Quickstart tab).

## Getting started

1. Clone parent repository (pubnub/react) and enter the `examples/reactnative` directory

```bash
$ git clone https://github.com/pubnub/react
$ cd react/examples/reactnative
```

2. Install dependencies

```bash
$ npm install
```

3. Run the emulator!

```bash
# for Android:
$ npm run android

# for iOS:
$ npm run ios
```

repository: pubnub/react

gha_language: TypeScript

repo_name: pubnub/react