text:
---
title: "Tutorial: Using Jinja"
slug: my-file
hidden: false
createdAt: "2019-11-11T19:13:13.819Z"
updatedAt: "2019-11-21T18:41:41.485Z"
---

In this tutorial, we're going to take a common pattern used in SQL, and then use Jinja to improve our code.

View the full list of supported databases [here](doc:supported-databases2).

If you'd like to work through this query, add [this CSV](https://github.com/fishtown-analytics/jaffle_shop/blob/master/data/raw_payments.csv) to the `data/` folder of your dbt project, and then execute `dbt seed`.

While working through the steps of this model, we recommend that you have your compiled SQL open as well, to check what your Jinja compiles to. To do this:
* **Using dbt Cloud:** Click the compile button to see the compiled SQL in the right hand pane
* **Using the dbt CLI:** Run `dbt compile` from the command line. Then open the compiled SQL file in the `target/compiled/{project name}/` directory. Use a split screen in your code editor to keep both files open at once.

# Write the SQL without Jinja
Consider a data model in which an `order` can have many `payments`. Each `payment` may have a `payment_method` of `bank_transfer`, `credit_card` or `gift_card`, and therefore each `order` can have multiple `payment_methods`

From an analytics perspective, it's important to know how much of each `order` was paid for with each `payment_method`. In your dbt project, you can create a model, named `order_payment_method_amounts`, with the following SQL:

[block:html]
{
  "html": "

"
}
[/block]

[block:embed]
{
  "html": "",
  "url": "https://www.youtube.com/watch?v=5yyGT1k2xzY",
  "title": "dbt setup & usage tutorial",
  "favicon": "https://s.ytimg.com/yts/img/favicon-vfl8qSV2F.ico",
  "image": "https://i.ytimg.com/vi/5yyGT1k2xzY/hqdefault.jpg"
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "select\norder_id,\nsum(case when payment_method = 'bank_transfer' then amount end) as bank_transfer_amount,\nsum(case when payment_method = 'credit_card' then amount end) as credit_card_amount,\nsum(case when payment_method = 'gift_card' then amount end) as gift_card_amount,\nsum(amount) as total_amount\nfrom {{ ref('raw_payments') }}\ngroup by 1",
      "language": "sql",
      "name": "models/order_payment_method_amounts.sql"
    }
  ]
}
[/block]
The SQL for each payment method amount is repetitive, which can be difficult to maintain for a number of reasons:
* If the logic or field name were to change, the code would need to be updated in three places.
* Often this code is created by copying and pasting, which may lead to mistakes.
* Other analysts that review the code are less likely to notice errors as its common to only scan through repeated code.

[block:parameters]
{
  "data": {
    "h-0": "Model",
    "h-1": "Config",
    "h-2": "Database Identifier",
    "0-0": "ga_sessions.sql",
    "0-1": "None",
    "0-2": "\"analytics\".\"ga_sessions\"",
    "1-0": "ga_sessions.sql",
    "1-1": "{{ config(alias='sessions') }}",
    "1-2": "\"analytics\".\"sessions\""
  },
  "cols": 3,
  "rows": 2
}
[/block]

[block:code]
{
  "codes": [
    {
      "code": "\n-- This model will be created in the database with the identifier `sessions`\n-- Note that in this example, `alias` is used along with a custom schema\n{{ config(alias='sessions', schema='google_analytics') }}\n\nselect * from ...",
      "language": "sql",
      "name": "models/google_analytics/ga_sessions.sql"
    }
  ]
}
[/block]

[block:image]
{
  "images": [
    {
      "image": [
        "https://files.readme.io/63cf3d2-Screen_Shot_2019-01-31_at_4.39.52_PM.png",
        "Screen Shot 2019-01-31 at 4.39.52 PM.png",
        2664,
        2114,
        "#f3f5f5"
      ],
      "caption": "Click the green button to connect dbt Cloud to your GitHub account"
    }
  ]
}
[/block]

[block:callout]
{
  "type": "danger",
  "body": "dbt actively builds the `graph` variable during the [parsing phase](doc:execute) of running dbt projects, so some properties of the `graph` context variable will be missing or incorrect during parsing. Please read the information below carefully to understand how to effectively use this variable.",
  "title": "Heads up"
}
[/block]


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

## [0.3]
### Changed
- simplified most of the scripts into one big one for now
- added more packages, repos and setup file hosting for easy txfr to targets

## [0.2.1]
### Added
- pkgs_exploits.sh - added more packages for ftp, smb and webdav
- shell_aliases.sh - added additional aliases
### Fixed
- change pkgs_upgrade.sh to not be silent (was killing grub)

## [0.2] - 2019-8-11
### Fixed
- Was incorrectly checking for /tmp file flags with -s, changed to -e to make scripts idempotent
- Disabled misleading colorization from vagrant with keep_color
### Changed
- Moved scripts into files in the /scripts directory so that they can be used outside of Vagrant, and better seperation for source control
- Removed timezone setting
- Remove searchsploit -u, way too slow for this (papers)
- Made adding swap space configurable
- Made UFW allow ports configurable
- Moved almost all customizations to vagrant variables
### Added
- netcat aliases to include rlwrap
- mingw aliases
- python web server alias
- fuzzbunch installer on wine (mostly working, python install is still manual)
- useful git repos cloned

## [0.1.1] - 2019-07-xx
### Fixed
- Less obnoxious header comments in Vagrantfile
- Updated README.md
- Added crude check (/tmp file) to prevent multiple appends to sshd config file
- Changed UFW to stay disabled and require explicit enabling

### Added
- Added this CHANGELOG.MD
- Added TCP 443 as a UFW rule, removed my custom ports
- Added updatedb to script_packages_extra

## [0.1.0] - 2019-06-29
### Added
- Initial release

license: MIT

repository: rahmiy/Disposable-Kali

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: rahmiy/Disposable-Kali


text:
# Python Bytes 100

Sponsored by DigitalOcean: [**pythonbytes.fm/digitalocean**](https://pythonbytes.fm/digitalocean)

Special guests:

* **[Anthony Shaw](https://twitter.com/anthonypjshaw)**
* [**Dan Bader**](https://twitter.com/dbader_org)
* **[Brett Cannon](https://twitter.com/brettsky)**
* **[Nina Zakharenko](https://twitter.com/nnja)**

**Brian #1:** [**poetry**](https://pypi.org/project/poetry/)

- “poetry is a tool to handle dependency installation as well as building and packaging of Python packages. It only needs one file to do all of that: the new, standardized pyproject.toml.
  In other words, poetry uses pyproject.toml to replace setup.py, requirements.txt, setup.cfg, MANIFEST.in and the newly added Pipfile.”
- poetry
	- can be used for both application and library development
	- handles dependencies and lock files
	- strongly encourages virtual environment use (need specifically turn it off)
	- can be used within an existing venv or be used to create a new venv
	- automates package build process
	- automates deployment to PyPI or to another repository
	- CLI and the use model is very different than pipenv. Even if they produced the same files (which they don’t), you’d still want to try both to see which workflow works best for you. For me, I think poetry matches my way of working a bit more than pipenv, but I’m still in the early stages of using either.
- From [**Python's New Package Landscape**](http://andrewsforge.com/article/python-new-package-landscape/)
	- “[PEP 517](https://www.python.org/dev/peps/pep-0517/) and [PEP 518](https://www.python.org/dev/peps/pep-0518/)—accepted in September 2017 and May 2016, respectively—changed this status quo by enabling package authors to select different build systems. Said differently, **for the first time in Python, developers may opt to use a distribution build tool other than** `**distutils**` **or** `**setuptools**`**. The ubiquitous** `**setup.py**` **file is no longer mandatory in Python libraries.”**
- [PEP 517 -- A build-system independent format for source trees](https://www.python.org/dev/peps/pep-0517/)
- [PEP 518 -- Specifying Minimum Build System Requirements for Python Projects](https://www.python.org/dev/peps/pep-0518/)
- Another project that utilizes pyproject.toml is [flit](https://flit.readthedocs.io/en/latest/index.html), which seems to overlap quite a bit with poetry, but I don’t think it does the venv, dependency management, dependency updating, etc.
- See also:
	- [Clarifying PEP 518 (a.k.a. pyproject.toml)](https://snarky.ca/clarifying-pep-518/) - From Brett
- Question for @Brett C 517 and 518 still say “provisional” and not “final”. What’s that mean?
	- We are still allowed to tweak it as necessary before it
- Biggest difference is poetry uses pyproject.toml ([PEP518](https://www.python.org/dev/peps/pep-0518/#id26)) instead of Pipfile. Replaces all others (setup.py, setup.cfg, requirements*.txt, manifest.IN)
	- Even its lock file is in TOML
- Author “does not like” pipenv, or some of the decisions it has made. Note that Kenneth has recently made some calls to introduce more discussion and openness with a PEP-style process called PEEP ([PipEnv Enhancement Proposals](https://github.com/pypa/pipenv/blob/master/peeps/PEEP-001.md)).
	- E.g. uses a more extensive dependency resolver
- Pipenv does not support multiple environments (by design) making it useless for library development. Poetry makes this more open. See https://medium.com/@DJetelina/pipenv-review-after-using-in-production-a05e7176f3f0
- Wait. Why am I doing your notes for you @Brian O ! (awesome. Thanks Ant.)
- Brett has had initial discussions on Twitter with both pipenv and poetry about possibly standardizing on a lockfile format so that’s the artifact these tools produce and everything else is tool preference

**Anthony Shaw #2:** [**pylama**](https://github.com/klen/pylama) **and** [**radon**](https://radon.readthedocs.io/en/latest/)

- Have been investigating tools for measuring complexity and performance of code and how that relates to test
- If you can refactor your code so the tests still pass, the customers are still happy AND it’s simpler then that’s a good thing - right?
- Radon is a Python tool that leverages the AST to give statistics on Cyclomatic Complexity (number of decisions — nested if’s are bad), maintainability index (LoC & Halstead) and Halstead (number of operations an complexity of AST).
- Radon works by adding a ComplexityVisitor to the AST.
- Another option is Ned Batchelder’s McCabe tool which measures the number of possible branches (similar to cyclomatic)
- All of these tools are combined in pylama - a code linter for Python and Javascript. Embeds pycodestyle, mccabe, radon, gjslint and pyflakes.
- Final goal is to have a pytest plugin that fails tests if you make your code more complicated

**Nina Zakharenko #3:** **Tools for teaching Python**

- Teaching Python can come with hurdles — virtual environments, installing python3, pip, working with the command line.
	- Put out a call on twitter asking - “What software and tools do you use to teach Python?”.
	- 50 Responses, 414 votes, learned about lots of new tools. Read the [thread](https://twitter.com/nnja/status/1047190883064397825).
		- 27% use python or ipython repl
		- 13% use built-in IDLE
		- 39% use an IDE or editor - [Visual Studio Code](https://code.visualstudio.com/docs/languages/python?WT.mc_id=pythonbytes-podcast-ninaz), [PyCharm](https://www.jetbrains.com/pycharm/), [Atom](https://atom.io/).
		- 21% use other (mix of local and [hosted Jupyter notebooks](https://notebooks.azure.com/?WT.mc_id=pythonbytes-podcast-ninaz) and other responses)
- New tools I learned about:
	- [Mu editor](https://codewith.mu) - simple python editor, great for those completely new to programming.
		- Large buttons with common actions above the editor.
		- Support for educational platforms
		  - Integrates with hardware platforms -- adafruit [Circuit Playground,](https://www.adafruit.com/product/3333) [micro:bit](https://microbit.org/)
		  - PyGame
		- [Awesome tutorials](https://codewith.mu/en/tutorials/)
  - [Neuron plugin for VS Code](https://marketplace.visualstudio.com/items?itemName=neuron.neuron-IPE&WT.mc_id=pythonbytes-podcast-ninaz), [Hydrogen plugin for Atom](https://atom.io/packages/hydrogen)
		- Interactive coding environment, brings a taste of Jupyter notebooks into your editor.
		- Targeted towards data scientists.
		- Show evaluated values, output pane to display charts and graphs
		- Import to/from Jupyter notebooks
  - [repl.it](https://repl.it) - open source hosted cloud repl with reasonable free tier
		- project goal - [zero effort setup](https://twitter.com/replit/status/1048064521460281345)
		- 3 vertical panes: files, editor, repl, and a button to run the current code.
		- no login, no signup needed to get started
		- visual package installation - no running pip, requirements.txt automatically generated
		- includes a debugger
  - [bpython](https://github.com/bpython/bpython) - Used it years ago, still an active project.
		- Fancy curses interface to the Python interactive interpreter. Windows, type hints, expected parameters lists.
		- Really cool feature — you can rewind your session! Pops the last line, and the entire session is reevaluated.
		- Easily reload imported modules.
- Honorable mentions:
	- [Edublocks](https://edublocks.org/) - Teaching tool for kids, visually drag and drop blocks of Python code. [Open source](https://github.com/AllAboutCode/EduBlocks), created by [Joshua Lowe](http://allaboutcode.co.uk/), a brilliant 14 year old maker and programmer.
	- [pythonanywhere](https://www.pythonanywhere.com), [codeskulptor.org](http://www.codeskulptor.org/), [codesters](https://www.codesters.com/).

**Dan Bader #4: My favorite tool of 2018:** [**“Black” code formatter**](https://black.readthedocs.io/en/stable/) by Łukasz Langa

- Black is the “uncompromising Python code formatter”
- An opinionated auto-formatter for your code (like YAPF/autopep for Python, or gofmt for golang who popularized the idea)
- Heard about it [in episode #73 by Brian](https://pythonbytes.fm/episodes/show/73/this-podcast-comes-in-any-color-you-want-as-long-as-it-s-black)
- Started using it for some small tools, then rolled it out to the whole [realpython.com](https://realpython.com) code base including our public example code repo ([https://github.com/realpython/materials](https://github.com/realpython/materials))
- Benefits are:
	- Auto formatting—Not only does it call you out on formatting violations, it auto-fixes them
	- Code style discussions disappear—just use whatever Black does
	- Super easy to make several code bases look consistent (no more mental gymnastics to format new code to match its surroundings)
	- Automatically enforce consistent formatting on CI with “black --check” (I use a combo of flake8 + black because flake8 also catches syntax errors and some other “code smells”)
		- pro-tip: set up a pre-commit hook/rule to automatically run black before committing to Git. Also add it to your editor workflow (reformat on save / reformat on paste)
- Tool support:
	- [Built into](https://code.visualstudio.com/docs/python/editing#_formatting) the Python extension for VS Code (which Łukasz uses 😉)
	- [Plug-in](https://plugins.jetbrains.com/plugin/10563-black-pycharm) for PyCharm (for Michael and Brian 😁 )
	- Support in [pre-commit](https://pre-commit.com/)
- For the most part I really like the formatting Black applies, if you’re not a fan you might hate this tool because it makes your code look “ugly” 🙂
- Still in beta but found it very useful and helpful as of October 2018. Give it a try!

**Brett Cannon #5:** [**A Web without JavaScript**](https://www.youtube.com/watch?v=2XSeNQyPlTY): Russell Keith-Magee at PyCon AU

- JavaScript has a monopoly in web browsers for client-side programming
- Mono-language situations are not good for anyone
- Can Python somehow break into the client-side web world?
- Example implementation of Luhn algorithm:
	- JavaScript: 0.4KB
	- [Transcrypt](https://www.transcrypt.org/): transpile to 32KB
	- [Brython](https://brython.info/): Python compiler for 0.5KB + 646KB bootstrap
	- [Batavia](https://pybee.org/project/projects/bridges/batavia/): Eval loop for 1.2KB + 5MB bootstrap
	- [Pyodide](https://github.com/iodide-project/pyodide): CPython compiled to WASM for 0.5KB + 3MB bootstrap
- WASM as a Python target might make this feasible
	- Example written in C compiled to 22KB (w/ a 65KB bootstrap for older browsers)
- Maybe easier to target Electron/Node instead of client-side web initially?
- Scott Hanselman’s blog post [https://www.hanselman.com/blog/JavaScriptIsWebAssemblyLanguageAndThatsOK.aspx](https://www.hanselman.com/blog/JavaScriptIsWebAssemblyLanguageAndThatsOK.aspx)
- Hanselminutes interview [https://hanselminutes.com/638/c-and-browser-monoculture-with-vivaldis-patricia-aas](https://hanselminutes.com/638/c-and-browser-monoculture-with-vivaldis-patricia-aas)

**Michael #6:** [**Async WebDriver implementation for asyncio and asyncio-compatible frameworks**](https://github.com/HDE/arsenic)

- You’ve heard of Selenium but in an async world what do we use? Answer: `arsenic`

```
    # Example: Let's run a local Firefox instance.
    async def example():
        # Runs geckodriver and starts a firefox session
        async with get_session(Geckodriver(), Firefox()) as session:
              # go to example.com
              await session.get('http://example.com')
              # wait up to 5 seconds to get the h1 element from the page
              h1 = await session.wait_for_element(5, 'h1')
              # print the text of the h1 element
              print(await h1.get_text())
```

- Use cases include testing of web applications, load testing, automating websites, web scraping or anything else you need a web browser for.
- It uses real web browsers using the Webdriver specification.
- Warning: While this library is asynchronous, web drivers are not. You must call the APIs in sequence. The purpose of this library is to allow you to control multiple web drivers asynchronously or to use a web driver in the same thread as an asynchronous web server.
- [Arsenic with pytest](https://arsenic.readthedocs.io/en/latest/howto/pytest.html)
- Supported browsers
	- [Headless Google Chrome](https://arsenic.readthedocs.io/en/latest/reference/supported-browsers.html#headless-google-chrome)
	- [Headless Firefox](https://arsenic.readthedocs.io/en/latest/reference/supported-browsers.html#headless-firefox)
- Everyone’s thoughts on async in Python these days?
- Selenium-Grid https://www.seleniumhq.org/docs/07_selenium_grid.jsp

**Extra:**

- Take the python survey: [https://talkpython.fm/survey2018](https://talkpython.fm/survey2018)
- 3.7.1rc1 is out [https://docs.python.org/3.7/whatsnew/changelog.html#python-3-7-1-release-candidate-1](https://docs.python.org/3.7/whatsnew/changelog.html#python-3-7-1-release-candidate-1)
- A good review on Python packaging [http://andrewsforge.com/article/python-new-package-landscape/](http://andrewsforge.com/article/python-new-package-landscape/)
- New September release of [Python Extension for Visual Studio Code](https://blogs.msdn.microsoft.com/pythonengineering/2018/10/09/python-in-visual-studio-code-september-2018-release/?WT.mc_id=pythonbytes-podcast-ninaz) — lots of new features, like automatic environment activation in the terminal, debugging improvements, and more!
- [Submit a talk](https://2019.pycascades.com/news/2-cfp-now-open/) to [PyCascades](https://2019.pycascades.com/) happening February 2019 in Seattle. [Call for proposals](https://2019.pycascades.com/news/2-cfp-now-open/) closes October 21st. Mentorship available.

gha_language: Python

gha_license_id: MIT


text:
Water Mark
==========

How to use
----------

You can use

- **WaterMarker.markImage()** to get a bitmap with watermark string
    ```
    Bitmap waterMarkedBitmap = WaterMarker.markImage(bitmap, "Hello World\n2016/03/08 12:34");
    ```

or

- **WaterMarker.markImageFile()** to output a file with watermark string
    ```
    WaterMarker.markImageFile(srcFile, destFile, "Hello World\n2016/03/08 12:34");
    ```

Limitation
----------

- Input is split a message by '\n' character only
- Output is compressed to the PNG file only, not support other types

repository: silviusko/android-toolkit

repo_name: silviusko/android-toolkit


text:
Using a ListView control inside NativeScript app requires some special attention due to the complexity of the NativeScript implementation of the component, with custom item templates, bindings and so on.

The NativeScript modules provides a custom component which simplifies the way native ListView is used.

<snippet id='require-list-view'/>

* [Basics](#basics)
* [Code Behind](#code-behind)
* [Events](#events)
* [Multiple Templates](#multiple-templates)
* [Multiple Templates Selector Function](#multiple-templates-selector-function)


text:
# Welcome to your brand new Disnut forum!

This is what a topic and post looks like. As an administrator, you can edit the post\'s title and content.
To customise your forum, go to the [Administrator Control Panel](../../admin). You can modify all aspects of your forum there, including installation of third-party plugins.

## Additional Resources

* [Disnut Documentation](https://docs.disnut.com)
* [Community Support Forum](https://disnut.com)
* [Project repository](https://github.com/Disnut/Disnut)

repository: yogibackup/Disnut

repo_name: yogibackup/Disnut


text:
---
layout: post
title: "OsFWL6,OsCNR10"
description: ""
category: genes
tags: [panicle, grains per panicle]
---

* **Information**
    + Symbol: OsFWL6,OsCNR10
    + MSU: [LOC_Os03g61470](http://rice.uga.edu/cgi-bin/ORF_infopage.cgi?orf=LOC_Os03g61470)
    + RAPdb: [Os03g0830200](https://rapdb.dna.affrc.go.jp/locus/?name=Os03g0830200)

* **Publication**
    + [Targeted Mutagenesis of the Rice FW 2.2-Like Gene Family Using the CRISPR/Cas9 System Reveals OsFWL4 as a Regulator of Tiller Number and Plant Yield in Rice.](http://www.ncbi.nlm.nih.gov/pubmed?term=Targeted Mutagenesis of the Rice FW 2.2-Like Gene Family Using the CRISPR/Cas9 System Reveals OsFWL4 as a Regulator of Tiller Number and Plant Yield in Rice.%5BTitle%5D), 2020, Int J Mol Sci.
    + [A New RING Finger Protein, PLANT ARCHITECTURE and GRAIN NUMBER 1, Affects Plant Architecture and Grain Yield in Rice.](http://www.ncbi.nlm.nih.gov/pubmed?term=A New RING Finger Protein, PLANT ARCHITECTURE and GRAIN NUMBER 1, Affects Plant Architecture and Grain Yield in Rice.%5BTitle%5D), 2022, Int J Mol Sci.

* **Genbank accession number**

* **Key message**
    + We demonstrated that OsPAGN1 can interact directly with OsCNR10 (CELL NUMBER REGULATOR10), which negatively regulates the number of rice grains per panicle

* **Connection**

[//]: # * **Key figures**


text:
# Quick Reference for the Workshop

- [HTTP Methods](#http-methods)
- [HTTP Status Codes](#http-status-codes)
- [Helper Modules To Retrieve Data](#helper-modules-to-retrieve-data)
- [User ID for the Workshop](#user-id-for-the-workshop)
- [Python Types](#python-types)
  - [The Syntax](#the-syntax)
- [How-To's and Solutions to Exercises](#how-tos-and-solutions-to-exercises)

## HTTP Methods

POST: to create an API resource.
GET: to read an API resource.
PUT*: to update an API resource with a complete resource representation (e.g. completely replace it).
PATCH*: to partially update an API resource (e.g. modify one of the fields).
DELETE: to delete an API resource.

\* PATCH is less commonly used and known than PUT. Many teams also use PUT for partial updates.

## HTTP Status Codes

200 [Operation Succeeded] - Operation is successful
422 [Operation Failed] - Invalid Data / unprocessable entity
404 [Operation Failed] - Resource not found

To learn more about status codes and what other status codes there are, see
the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status).

## Helper Modules To Retrieve Data

These are the "helper modules" to retrieve data. We will use these inside our paths'
functions. They are already imported for you in `main.py`. E.g.

`from grocery_api.data import store as store_data  # noqa`

You can also think of these modules as our existing "backend" or
"functionalities" which we will make accessible via the web using
the API we will be creating with the FastAPI framework.

To use them,

```python
# To get all store resources
store_data.read_all()

# To get a specific store resource given a store ID, store_id
store_data.read(store_id)

# To create a store resource given a python dictionary, new_store_dict
store_data.create(new_store_dict)
```

## User ID for the Workshop

In the workshop, we'll create an endpoint for a user resource and test this endpoint.
We'd need the User ID during this time.

```
c6fce069-4748-499d-a85d-bf310bfd534b
```

## Python Types

These are types relevant for the workshop. They are all included in Python's standard library (based on Python 3.8).

[Built-in types](https://docs.python.org/3/library/stdtypes.html): `str`, `int`, `bool`

From the [`typing` package](https://docs.python.org/3.8/library/typing.html):

- `Optional` (e.g. `Optional[str]` - an optional string; can be an instance of a string or `None`)
- `List`* (e.g. `List[Item]` - a list of `Item` instances)
- `Dict`** (e.g. `Dict[dict]` - a dictionary of dictionaries)

\* When not specifying the type of _what is in the list_, using `list` is sufficient to use for typing.
** When not specifying the type of _keys and values in the dictionary_, using `dict` is sufficient to use for typing.

💡 In 3.9, `List` and `Dict` are deprecated. You can use `list` and `dict` and also specify the types of their elements / keys and values.

From other packages in the standard library:

- `from enum import Enum` - To limit the variable to predefined values
- `from decimal import Decimal` - When precision is important (e.g. prices)

### The Syntax

```
[variable-name]: [type]
```

Examples,

```python
from typing import Optional

class Item:
    name: str
    description: Optional[str]
```

```python
async def add(num1: int, num2: int):
    return num1 + num2
```

## How-To's and Solutions to Exercises

In the [`how_tos_and_exercises` branch](https://github.com/paxcodes/grocery_api/commits/how_tos_and_exercises), you will see the code we will go through during the workshop along with the explanation behind them. This is helpful when you have to be away for a while and may have missed something during the workshop.

![](./readme_assets/how_to_link.png)

![](./readme_assets/how_to_code.png)

You will also see solutions to the exercises (those with "EXERCISE" in the beginning of the commit message) in case you get stuck or don't have enough time to finish the exercises.

branch_name: refs/heads/main


text:
# Benchmark of NJUNMT-pytorch

## DL4MT

### Chinese to English

See configuration in  ```dl4mt_config.yaml```

| **Decay Method** | **Granularity** | **MT03(Dev)** | **MT04**  | **MT05**  | **MT06**  |
|--------------|-------------|-----------|-------|-------|-------|
| Loss         | Word(30K)   | 38.84     | 41.02 | 36.46 | 35.26 |
| Loss         | BPE(30K)    | 37.72     | 38.64 | 35.09 | 33.73 |
| Noam         | Word(30K)   | 38.31     | 39.82 | 35.84 | 33.96 |
| Noam         | BPE(30K)    | 38.48     | 40.47 | 36.79 | 35.21 |

Word(30K): Training NMT at word level and keep most 30K frequent words and keep the rest as a special token <UNK>.

BPE(30K): Use [Byte Pair Encoding](https://github.com/rsennrich/subword-nmt) to split words into subword sequences.
We do 30K BPE operations here and keep all the BPE tokens.

When choosing ```Loss``` as learning rate method, BPE model performs abnormally worse than word-level model. This result
is confusing and one of the possible reasons maybe that the first occurrence of decay is too late, which make this scheduling
policy degenerate into the vanilla Adam.

## Transformer

##  NIST ZH2EN

We use the same settings as transformer_basev2.

| System |MT03(dev) | MT04  | MT05  | MT06  |
|--------------|-----------|-------|-------|-------|
| Word(maxlen=80)         | 43.88     | 45.68 | 42.14 | 41.32 |
| BPE(maxlen=100) | 45.83 | 46.66 | 43.36 | 42.17 |

You can reproduce these results by using ```transformer_nist_zh2en.yaml``` and ```transformer_nist_zh2en_bpe.yaml``` under the ```configs``` folder.

## WMT14 EN2DE

| System | newstest2013(dev) | newstest2014 |
|-----|-------------------|--------------|
| Our | 25.58 | 24.31 |
| (Vaswani et. al, 2017) | 25.8 | n/a |

We also try to reproduce the result reported in "attention is all you need". We use settings of transformer_basev2. We do not use the modified Adam parameters with $beta_1 = 0.9, beta_2=0.98$ as we find it performs inferior to the original parameters. Our BLEU scores report here is generated by the best model in the first 100K steps, which is the same as the settings of abalation experiments in that paper. We also report the BLEU on dev data in that paper.

Your can reproduce this result by using ```transformer_wmt14_en2de.yaml``` under the ```configs``` folder.

repository: vergilus/NJUNMT-pytorch

repo_name: vergilus/NJUNMT-pytorch


text:
# ConfigUpgradeUtility
Upgrade utility engine for upgrade any XML files (useful for embedding to installation process)

# Library
Published library available here: https://www.nuget.org/packages/ConfigUpgradeUtility/

repository: aabiryukov/ConfigUpgradeUtility

repo_name: aabiryukov/ConfigUpgradeUtility


text:
---
title: lib-editor-milkdown-docs
tags: [docs, editor, markdown, milkdown]
created: 2021-07-11T15:07:37.949Z
modified: 2021-07-11T15:08:34.195Z
---

# lib-editor-milkdown-docs

> A plugin-driven WYSIWYG markdown Editor, inspired by Typora, built on top of prosemirror and remark.

# guide
- milkdown /6.5kStar/MIT/202208/ts
  - https://github.com/Saul-Mirone/milkdown
  - https://milkdown.dev/
  - https://milkdown.dev/online-demo
  - 依赖prosemirror、remark、prism、katex，但不依赖prosemirror-markdown、react
  - A plugin-driven WYSIWYG markdown Editor, inspired by Typora, built on top of prosemirror and remark.
  - 不同于其他prosemirror项目，可配置支持的markdown特性
  - ⚠breaking: @milkdown/core@4.4.0(date202107) migrate from markdown-it to remark
# overview
- Milkdown treats every features as plugins.
  - With this pattern, developers can choose what they need in an editor instead of bundle all features even they won't need.
  - Developers can extends the plugin to satisfy their habit such as define a vim keymap plugin.
- plugins in prosemirror and remark community can be easily reused to build a Milkdown plugin.
- Themes and plugins for Milkdown can be shared and installed using npm packages.

- milkdown is made up by two parts:
  - A tiny core which provide markdown parser, serializer and kinds of plugin loader.
  - Lots of plugins provide syntax, commands and components.
- With this pattern you can enable or disable any custom syntax you like, such as table, latex and slash commands.

- Milkdown is headless, there is no style provided by default.
  - Option 1: Style the plain HTML with `.milkdown .editor yourTag` scope
  - Option 2: Add custom class name with `configure()` method

## plugins

- all features in milkdown are supported by plugin.

- Node and Mark are two special atoms that used to define prosemirror Node and Mark.

- Parser is used to transform from markdown string to UI elements.
  - 解析流程：md str > mdast > PM Node > PM EditorView > dom
  - markdown string will be given to `remark-parse` to compile into AST
  - remark AST will be traversed by milkdown parser.
  - The milkdown parser is generated by the parser property of nodes and marks and generate a prosemirror node tree as the result.
  - The prosemirror node will rendered by prosemirror and generate the UI elements.

- The parser state is used to generate the prosemirror node, it provides several useful methods to make the transformation pretty simple.
  - `openNode` method will open a node, and all nodes created after this method will be set as the children of the node until a `closeNode` been called.
  - For nodes have `children`, your `runner` should just take care of the node itself and let other runners to handle the children.

- Serializer is used to transform from UI elements to markdown string.
  - 序列化流程: PM Node > mdast > md str
  - For the current UI status, there will be a prosemirror node tree to represent it.
  - The prosemirror node tree will be traversed by milkdown serializer. The milkdown serializer is generated by the serializer property of nodes and marks and generate a remark AST as the result.
  - The remark AST will by transformed into markdown string through `remark-stringify`.

- The serializer state is used to generate the remark AST, it provides several useful methods to make the transformation pretty simple.
  - `openNode` method will open a node, and all nodes created after this method will be set as the children of the node until a `closeNode` been called.

- **Example: Custom Syntax**
- Generally, if we want to add a custom syntax, there are 5 things need to be done:
  - Add a remark plugin to make sure the syntax can be parsed and serialized correctly.
  - Define the prosemirror schema for your custom node.
  - Write a parser specification to transform the remark AST into prosemirror node.
  - Write a serializer specification to transform the prosemirror node into remark AST.
  - Write prosemirror input rules to make sure user input can be handled correctly.
- Example: we will add a custom iframe syntax to insert iframe as node in milkdown.

## architecture

- Milkdown core is composed mainly by three parts:
  - Markdown Parser
  - Markdown Serializer
  - Prosemirror

- Markdown Parser
  - **transform a markdown string into a prosemirror node tree**
  - It is mainly used by transforming the default value, and can be used in features like paste markdown strings.
  - The parser will parse the markdown strings into ast by remark,
  and transform the ast into the prosemirror node.

- Markdown Serializer
  - **transform a prosemirror node into a markdown string**
  - It is mainly used by listeners, and can be used in features like export to file.
  - The serializer will parse the prosemirror node tree and transform it into markdown ast,
  then the ast can be serialized into markdown string.

- Prosemirror is used for **render the editor**.
  - When users interact with the editor, they actually interact with the prosemirror view instance.

- So basically, a milkdown editor works following these steps:
  1. Default value is parsed by parser, generates a node.
  2. Node generated by step 1 will be used to create a prosemirror instance.
  3. When changes are triggered, the listeners will be called and developers can use serializer to get markdown string.

- In the world of milkdown, everything are Atoms.
  - The only thing the core part of milkdown do is execute these atoms one by one.
  - The order of the atoms loaded matters.
  - We have defined a `LoadState` enum so Atoms can be loaded after the pointed `loadState`.
  - You can access certain properties in context during the given load state.

- Generally speaking, there is no need for you to set the load state of an atom, we have provide some utilities for users to create certain types of atoms.
- `Idle` state means the editor is preparing, nothing has been loaded.
  - props available: loadState, remark, nodes, marks
- `LoadSchema` state means the editor is ready to generate the schema.
  - props available: all props in `Idle` state
- `SchemaReady` state means the editor has generated the schema.
  - props available: all props in `LoadSchema`; schema, parser, serializer, keymap, inputRules, nodeViews
- `LoadPlugin` state means the editor is ready to load prosemirror plugin.
  - props available: all props in `SchemaReady`; prosemirrorPlugins
- `Complete` state means the editor has fully loaded.
  - props available: all props in `LoadPlugin`; editorView


text:
[![Build Status](https://travis-ci.org/RipcordSoftware/libjsapi.svg?branch=master)](https://travis-ci.org/RipcordSoftware/libjsapi)
[![Coverage Status](https://coveralls.io/repos/RipcordSoftware/libjsapi/badge.svg)](https://coveralls.io/r/RipcordSoftware/libjsapi)
[![License](http://img.shields.io/:license-mit-blue.svg)](http://doge.mit-license.org)

# libjsapi
A SpiderMonkey 50 (Mozilla) JSAPI wrapper for C++ 11.

The JSAPI interface to the SpiderMonkey JavaScript VM can be difficult to integrate into
applications without an intermediate abstraction layer managing object creation, object lifetimes and
type mapping. This library is an attempt to hide the complexity of dealing with SpiderMonkey
from modern C++ 11 applications.

With `libjsapi` you will be able to:
* Execute any valid JavaScript
* Invoke JavaScript methods from C++
* Expose C++ methods to JavaScript
* Expose C++ objects to JavaScript
* Consume JavaScript objects in C++
* Handle errors with C++ exceptions
* Create any number of Runtimes and Contexts - simultaneously on multiple threads

##Gratuitous Screenshot

The image below shows `libjsapi` hosting a GTK+ application which emulates enough browser bits to render a funky JavaScript Mandelbrot application ported from https://github.com/cslarsen/mandelbrot-js.

![A JS generated Mandelbrot running under libjsapi](https://pbs.twimg.com/media/CEVOZlRWAAAt6-w.png:large)

The window on the left is Firefox rendering a Mandelbrot fractal, on the right is the `libjsapi` application running (mainly) the same JavaScript code.

##Examples:

The simplest thing that could possibly work:
```c++
#include <iostream>
#include "libjsapi.h"

int main() {
    // create the context which hosts spidermonkey
    rs::jsapi::Context cx;

    // execute a script in the context of the runtime, getting the result
    rs::jsapi::Value result(cx);
    cx.Evaluate("(function(){return 42;})();", result);

    // output the result to the console
    std::cout << result << std::endl;
}
```

Among other things we can expose C++ lambdas (and methods) to JS:
```c++
#include <iostream>
#include "libjsapi.h"

int main() {
    // create the context which hosts spidermonkey
    rs::jsapi::Context cx;

    // define a function in global scope implemented by a C++ lambda
    rs::jsapi::Global::DefineFunction(cx, "getTheAnswer",
        [](const std::vector<rs::jsapi::Value>& args, rs::jsapi::Value& result) {
            result = 42;
    });

    // call the native function from JS
    rs::jsapi::Value result(cx);
    cx.Evaluate("(function(){return getTheAnswer();})();", result);

    // output the result to the console
    std::cout << result << std::endl;
}
```

The [wiki](https://github.com/RipcordSoftware/libjsapi/wiki) contains more background on JSAPI, libjsapi and further examples.

# Building
Requires:
* GCC 4.8.1+
* GNU Make
* lcov and Ruby (for test coverage)
* valgrind (for memory analysis)

To build type:
```bash
$ make
```

The first `libjsapi` build may take a long time to complete since it will invoke a build of SpiderMonkey and GoogleTest. Subsequent builds do not require this step and will be much faster.

To build tests with coverage:
```bash
$ make test
```

To create a coverage report:
```bash
$ ./coverage.sh
```

To create a valgrind report:
```bash
$ ./grind.sh
```

You will find examples in the `examples` directory. You can build these after building libjsapi by running:
```bash
$ cd examples
$ make
```

If building is slow on your system then you can speed it up by stripping the debugging information from the mozjs library by running `./strip_mozjs.sh`.

The [wiki](https://github.com/RipcordSoftware/libjsapi/wiki) contains details on building on different systems.


text:
## Introduction

vtkLine is a cell which representant a line.
It contains static method to make some computations directly link to line.

## See also vtkCell

### intersectWithLine(p1, p2, tol, x, pcoords)
Compute the intersection point of the intersection between line and
line defined by p1 and p2.
tol Tolerance use for the position evaluation
x is the point which intersect triangle (computed in function)
pcoords parametric coordinates (computed in function)
A javascript object is returned :
```js
{
  evaluation: define if the triangle has been intersected or not
  subId: always set to 0
  t: tolerance of the intersection
}
```

(static) distanceToLine(x, p1, p2, closestPoint = null)
: Compute the distance from x to the line composed by p1 and p2.
If an object is set as a fourth argument, then the closest point on the line from
x will be set into it.
```js
{
  t: tolerance of the distance
  distance: quared distance between closest point and x
}
```

(static) intersection(a1, a2, b1, b2, u, v)
: Performs intersection of two finite 3D lines.
An intersection is found if the projection of the two lines onto the plane perpendicular to the cross product of the two lines intersect, and if the distance between the closest points of approach are within a relative tolerance. The parameters (u,v) are the parametric coordinates of the lines at the position of closest approach.
Careful, u and v are filled inside the function. Outside the function, they
have to be access with : u[0] and v[0]
return IntersectionState enum :
```js
IntersectionState : {
	NO_INTERSECTION,
	YES_INTERSECTION,
	ON_LINE
}
```

gha_language: HTML


text:
---
title: Alphago
date: 2018-01-04 07:46:43.887000000 Z
---

## AlphaGo means the future is coming faster than anyone predicted.

What’s newsworthy isn’t just that AlphaGo has won Lee Sedol, who is probably the most well known active player today, but what this means for the acceleration of the pace at which computers are getting smarter.

The next ten years, instead of building towards a computer that can play Go, lots of significant innovation will be built on top of a computer that has mastered Go using a novel combination of A.I. approaches. I am very sure that, with the influence of the match and the technology Google has shared with, many researchers will create more useful products for humans and a lot of industry innovation is going to happen.

In the short term, the implication is that AI researchers now have a proven technique to build extremely competitive game playing machines. However, the broader implication is much larger. The future is coming faster than anyone predicted and it is an exciting future to look forward to.

repository: JimmyLv/jekyll-blog

gha_language: CSS

repo_name: JimmyLv/jekyll-blog


text:
# DHTDigger
Another wiretap in DHT network.

If deployed properly, DHTDigger could capture as many DHT messages as it can,
and queue them in Redis. Another torrent worker will process all queued messages
by downloading and parsing torrents. All metadata parsed from torrents will be stored in
another Redis queue for further processing (ie. feeding one BT search engine or
data mining task).

### Components
- wiretap
- torrent_worker

### Configuration
Configuration file sits in confiuration folder, replace all [placeholder] with your
real environment info. One sample is config.yml.example.

### Usage

Both of them can be started by running shell script under bin folder,
```
bin\run_digger.sh
```
and
```
bin\run_torrent_process.sh
```

###Other

To make sure the whole system running well without our attendence, it's suggest to use
monitoring tools (like [monit](https://mmonit.com/monit/)). Here's one example used in my
Ubuntu 14.04 with Monit Version 5.6.

```
check process dhtdigger with pidfile /path/to/my/pid/file
	start program = "/path/to/my/run_digger.sh"
	stop program = "/bin/cat /path/to/my/pid/file | xargs /bin/kill"
	group dhtdigger
```

###License
MIT


text:
# UI Component

In this guide we'll focus on how to add a new component to the applicaster platform.

For more information check the following guides:

- Android - will be added soon
- React-Native - will be added soon
- [iOS](/ui-components/ios/ui-component-ios.md)
- [UI Component Characteristics](/ui-components/ui-component-characteristics.md)


text:
# Bitbucket Badge

Bitbucket Bagde is a tiny Javascript library written in MooTools to retrieve info about a [Bitbucket](https://bitbucket.org/) user and its repositories. It requires MooTools >= 1.2 and MooTools More for JSONP.

## Features

Bitbucket features are:

* Dead simple to use
* Tiny library
* Multiple instances
* Callbacks
* Fully customizable using CSS
* Ability to use a custom displaying function
* Works on Safari, Firefox, IE 6+, Chrome and Opera
* Open source, full code is available on BitBucket

Download
--------

* Full code is available from [BitBucket](http://www.bitbucket.org/Bounga/bitbucket-badge). If you want to fix bugs or add features, it's the best way to start with
* Full code is also available from a [zip file](http://www.bitbucket.org/Bounga/bitbucket-badge/get/tip.zip)

Usage Example
-------------

Drop **mootools**, **mootools-more** and **bitbucket.js** in your javascripts directory and include it in your XHTML layout :

    <script src="javascripts/mootools.js" type="text/javascript" charset="utf-8"></script>
    <script src="javascripts/mootools-more.js" type="text/javascript" charset="utf-8"></script>
    <script src="javascripts/bitbucket.js" type="text/javascript" charset="utf-8"></script>

then you can create new Bitbucket Badge instances :

    var badge = new Bitbucket('badge', {
        'user': 'Bounga'
    });

    badge.addEvent("dataLoaded", function() {
      this.populateDOM();
    });

Take a look at 'example' directory to see examples.

Options
-------

Available options to tune your Bitbucket Badge are:

    element: 'badge' // id of DOM element to populate with user's info
    user: 'Bounga'   // Bitbucket username you want to retrieve info
    logo: true       // Prepend an image representing language used in front of repo names

Events
------

Available events fired by Bitbucket Badges are:

    dataLoaded // Fired when data for user has been successfully retrieved

Other
-----

For more information see [Project homepage](http://www.bitbucket.org/Bounga/bitbucket-badge/)

Problems, comments, and suggestions are welcome on the [ticket system](http://www.bitbucket.org/Bounga/bitbucket-badge/issues/new/)

Copyright (c) 2013 Nicolas Cavigneaux, released under the [MIT license](http://creativecommons.org/licenses/MIT/)

repository: Bounga/bitbucket-badge

repo_name: Bounga/bitbucket-badge


text:
MediaPipe: A Framework for Perceiving and Processing Reality
by Lugaresi, et al.

### Abstract

* An app with Perceptual i/p involoves more than running not an ML model
* Balancing:
	- devices,
	- resource usage,
	- quality of results,
	- run mutiple ops in  ||,
	- use piplelining to ensure time series data is properly synchronized

* What MEDIAPIPE does:
	- rapidly combines existing and new perception components and prototypes
	- advances them to polished cross platfoem apps
	- Resource Management can be configured using it (both CPU and GPU)
	- Dev can focus on Algo/Model and use MediaPipe as an env for iteratively improving apps and results are reproduciblr cross platform

***

### 1. Introduction
* To enable AR,
	- A typical app proc. sensory data such as A/V at high fps bc UX.
	- Plus there is strong coupleing between the steps
	- Developing the same app cross platform is a headache

* What MediaPipe Does:
	- Abstracts and connects induvidual model into maintainable pipelines
	- Builds a perception pipleline as a graph of modular components (inference model, media proc functions, etc)

* About these Graphs of Modular Components:
	- I/P: Sensory Data (audio, vedio stream, etc)
	- O/P: [Egs] Object Detection results, Face Landmark annotations

NOTE: Remember that Graphs of Ops. are used in projects like [tf](https://www.tensorflow.org/guide/intro_to_graphs), pytorch, cntk, etc.

	- MP. graphs are not about the internals of a NN
	- They specify large scale pipelines in which one or more models are implemented

repository: ArihantChawla/mediapipe

repo_name: ArihantChawla/mediapipe


text:
Shopbeam Flash Multi Widget Example
====================

Overview
-----

Shopbeam provides tools for advertisers and publishers to create and serve display advertisements which when clicked or hovered over load product detail panels on-site which can be used to add items to a universal cart and purchase them without leaving the host website.

The Shopbeam 'widget' is the element that is embedded onto the hosting site's page or served over an ad network which the user can interact with to begin their on-site shopping experience. The Shopbeam widget can be either an html image made active with javascript or a flash swf.The instructions below are for creating and embedding a flash swf Shopbeam widget.

Usage
-----

There are two ways to make that your flash advertisements react to user click loading Shopbeam products detail panel.

1) Linking MovieClips to Shopbeam products
-----

In "YourDocumentClass" file, instantiate the Shopbeam class with your API key.

```as
    import com.shopbeam.*;

    public class YourDocumentClass extends MovieClip {

        public function YourDocumentClass() {
          super();

          var shopbeam:Shopbeam = new Shopbeam("YOUR-API-KEY", this);

          shopbeam.onClickGoToProduct("movieClip1", "product1-id"); /* movieClip1 is the name of a Movie Clip in your flash AD
                                                                       and product1-id is the ID of a Shopbeam product */

          shopbeam.onClickGoToProduct("movieClip2", "product2-id");

      }
  }
```

You can find com.shopbeam library into the examples on this repo.

As we see above, in order to link MovieClips to ShopBeam products, simply create the MovieClips in your stage using Flash, and give they instance names (for the example above: MovieClip1, MovieClip2). Then search into shopbeam.com/products, the IDs of the products you gonna advertise, and give to each "onClickGoToProduct" method the name you gave to the MovieClip, and the Product ID. And that's it!

Note: To find Shopbeam Product ID, you can open the product detail on shopbeam.com/products, click the Text Link tab, copy the code and paste into a text editor, then look for the product id:

```
data-shopbeam-url="/v1/products?id=9184101 ...
```

On the hosting page just embed an object as following:

```html
  <script class="shopbeam-script" type="text/javascript" src="https://www.shopbeam.com/js/widget.loader.js" async="true"></script>
  <object type="application/x-shockwave-flash" data="swfname.swf"
    id="shopbeam-widget-swf-unbootstrapped-UUID"
    width="403" height="253">
    <param name="movie" value="swfname.swf"/>
    <param name="FlashVars" value="widgetUuid=UUID"/>
    <param name="allowscriptaccess" value="always"/>
  </object>

```

2) Loading products from the Embed attributes
-----

Put comma separated urls to our API for each product in the attr ``data-shopbeam-url` as shown below.

```html
    <object type="application/x-shockwave-flash" data="swfname.swf"
      id="shopbeam-widget-swf-unbootstrapped-"
      data-image-src="https://cloudinary-a.akamaihd.net/shopbeam/image/fetch/w_300,h_600,c_pad/https%3A%2F%2Fs3.amazonaws.com%2Fsb-photos%2F15430%2F0f450aa8-f79a-479f-aaee-cbfcb381e371-af14616ba9d74f4aa2121ee8efba0dfa.png"
      data-shopbeam-url="/v1/products?id=9009644&image=1&apiKey=<API-KEY>,/v1/products?id=9009643&image=1&apiKey=<API-KEY>,/v1/products?id=9009639&image=1&apiKey=<API-KEY>" width="900"
      height="600">
      <param name="movie" value="swfname.swf"/>
      <!--NOTE: the "value" of FlashVars MUST be urlEncoded!!!-->
      <param name="FlashVars"
        value="frameless=true&widgetUuid=<WidgetUUID>&imageUrl=https%3A%2F%2Fcloudinary-a.akamaihd.net%2Fshopbeam%2Fimage%2Ffetch%2Fw_300%2Ch_600%2Cc_fill%2Fhttps%253A%252F%252Fs3.amazonaws.com%252Fsb-photos%252F15430%252F0f450aa8-f79a-479f-aaee-cbfcb381e371-af14616ba9d74f4aa2121ee8efba0dfa.png"/>
      <param name="allowscriptaccess" value="always"/>
    </object>
```

Afterwards, in your AS code, simply do:

```as
    shopbeam.loadProductsFromWidgetEmbed();
```
instead of call shopbeam.onClickGoToProduct method.

This will create clickable areas for each comma separated value.

![Example clickable area](http://imgur.com/NxkuZxp.png "Example clickable area")

Important
-----

Do not use both methods at the same time, as this would result in MovieClips overlapping.

repository: shopbeam/flash-widget-example

gha_language: ActionScript

repo_name: shopbeam/flash-widget-example


text:
# Rexlite

This is an extraction of the [Rex library](https://github.com/rapid7/rex) to reduce dependencies for the nexpose-client gem.

Currently only the Rex::MIME module has been pulled over since that is the only dependency that nexpose-client has on Rex.

gha_language: Ruby


text:
---
layout: post
title: Final Project Paper Prototype
subtitle: Components & Circuit Design
tags: [final, project, paper, prototype]
comments: true
---

The circuit in this paper prototype uses conductive thread to connect the buzzer and LEDs to the Lilypad Arduino. The prototype also displays a lithium ion battery, which plugs into the Arduino.
When turned on, the buzzer will play a Christmas song, and the LEDs will begin to glow one by one with increasing brightness and then fade out one after another.

![paperproto](http://Rebecca-ET.github.io/img/finalpaperproto.jpg)


text:
# [L4D] Pet Witch (v1.0.0, 2019-08-08)

## DESCRIPTION:

This is a SourceMod plugin for Left 4 Dead 1.

This plugin allows an admin to spawn a "pet witch" and attack a selected player.

Only admins with the **slay flag** can use it.

I will explain how the menu works.

In option 1 of the menu you can spawn one or more pet witches. The pet is totally harmless (unless you or another player shoves her). Other players cannot cause damage to the pet (but you, the owner, can). This prevents other players from killing your pet witch, unless, of course, she is ordered to attack.

In option 2 you can select the target (only survivors) and immediately start the attack.

As an admin, you can use this plugin to apply a differentiated and yet fun punishment to some other badly behaved player.

[This](https://forums.alliedmods.net/showthread.php?t=318010) is my post on the AlliedModders forum:

And [here](https://youtu.be/59huDdHSRXc) a demo video.

## COMMANDS:

**sm_petwitch** - Opens the plugin menu.

## CVARS:

- **l4d_pet_witch_enable** - Enable or disable this plugin. Default: "1". Minimum: "0.000000". Maximum: "1.000000".
- **l4d_pet_witch_version** - Plugin version. Default: "1.0.0".

## COMPILATION ISSUE:

This plugin uses functions like SDKHook, SDKUnhook and HasEntProp which cause compilation errors with the web compiler. You must to compile the source code by yourself using the latest sourcemod compiler version.

## CHANGELOG:

### 2018-08-08 (v1.0.0)
- Initial release.

repository: samuelviveiros/sourcemod-plugins

repo_name: samuelviveiros/sourcemod-plugins


text:
# [Red Hat OpenShift Container Platform in Microsoft Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/openshift-get-started)

This is an Azure Resource Manager template that provisions a HA OpenShift environment (1-5 master, 1-3 infra, and 1-30 app node) that is suitable for demos, POCs and small workshops.

![Architecture Diagram](./docs/openshiftpoc.png)

## Prerequisites

### 1. Fork the `openshift-arm-setup` repo

Forking is a simple two-step process.

1. On GitHub, navigate to the <https://github.com/ecwpz91/openshift-arm-setup> repo.
2. In the top-right corner of the page, click **Fork**.

That's it! Now, you have a [fork](https://help.github.com/articles/fork-a-repo/) of the original ecwpz91/openshift-arm-setup repo.

### 2. Create a local clone of your fork

Right now, you have a fork of the `openshift-arm-setup` repo, but you don't have the files in that repo on your computer.  Verify your [remotes](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes)

To verify the new upstream repo you've specified for your fork, type `git remote -v`. You should see the URL for your fork as `origin`, and the URL for the original repo as `upstream`.

```sh
origin  git@github.com:your-username/openshift-arm-setup.git (fetch)
origin  git@github.com:your-username/openshift-arm-setup.git (push)
upstream        https://github.com/ecwpz91/openshift-arm-setup (fetch)
upstream        no_push (push)
```

### 4. No `git`? No problem!

```sh
DIRPATH="${HOME}/Downloads/openshift-arm-setup"; GITUSER="ecwpz91"
GITREPO="https://github.com/${GITUSER}/openshift-arm-setup/archive/master.zip"
ARCHIVE="$(printf "%s" "${GITREPO##*/}")"

# Download and extract
wget $GITREPO \
&& temp="$(mktemp -d)" \
&& unzip -d $temp $ARCHIVE \
&& mkdir -p $DIRPATH \
&& mv $temp/*/* $DIRPATH \
&& rm -rf $temp $ARCHIVE \
&& cd $DIRPATH \
&& unset DIRPATH GITUSER GITREPO ARCHIVE temp
```

## Setup/Config

The following requires Azure CLI 2.0.8 or later. You can verify the CLI version with the `az --version` command. To update the CLI version, see [Install Azure CLI 2.0](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest).

### 1. [Sign in to Azure](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/openshift-prerequisites#sign-in-to-azure)
```sh
az login
```

### 2. [Create a resource group](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/openshift-prerequisites#create-a-resource-group)
```sh
az group create --name keyvaultrg --location eastus
```

### 3. [Create a key vault](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/openshift-prerequisites#create-an-ssh-key)
```sh
az keyvault create --resource-group keyvaultrg --name changeme --enabled-for-template-deployment true --location eastus
```

 **Notice** the name for the keyvault must be _globally unique_ to Azure.

### 4. [Create an SSH key](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/openshift-prerequisites#create-an-ssh-key)
```sh
ssh-keygen -f ~/.ssh/openshift -t rsa -N ''
```

### 5. [Store the SSH private key in Azure Key Vault](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/openshift-prerequisites#store-the-ssh-private-key-in-azure-key-vault)
```sh
az keyvault secret set --vault-name changeme --name keysecret --file ~/.ssh/openshift
```

### 6. [Create a service principal](https://docs.microsoft.com/en-us/azure/virtual-machines/linux/openshift-prerequisites#create-a-service-principal)
```sh
az ad sp create-for-rbac --role contributor --scopes $(az group show --name keyvaultrg --query id | sed -e 's/\"\(.*\)\"/\1/')
```

### 7. Set environment variables (optional)
```sh
export AZURE_CLIENT_ID="" #appID/aadClientId
export AZURE_CLIENT_SECRET="" #password/aadClientSecret
export AZURE_SUBSCRIPTION_ID=""
export AZURE_TENANT_ID="" #tenant
export AZURE_LOCATION=""
```

### 8. Update `azuredeploy.parameters.json`

Locate and update any `changeme` values within the deployment configruation file before proceeding to the next section.

## Deployment

The following example deploys the cluster and all related resources into a resource group named `keyvaultrg`, with a deployment name of `ocpdeployment`. The template is referenced directly from this folder, and a local parameters file named `azuredeploy.parameters.json` file is used.

```sh
az group deployment create -g keyvaultrg --name ocpdeployment --template-file ./azuredeploy.json --parameters @./azuredeploy.parameters.json
```

## Teardown

Use the `az group delete` command to remove the resource group, OpenShift cluster, and clean up all related resources when they're no longer needed.

```sh
az group delete -n keyvaultrg
```

repository: andresmmujica/openshift-arm-setup

repo_name: andresmmujica/openshift-arm-setup


text:
# Docker Puppet Module for Boxen
[![Build Status](https://travis-ci.org/boxen/puppet-docker.svg)](https://travis-ci.org/boxen/puppet-docker)

Installs [Docker](https://www.docker.io), an easy, lightweight virtualized environment for portable applications.

## Usage

```puppet
include docker
```

## Required Puppet Modules

* `boxen`
* `homebrew`
* `ripienaar/puppet-module-data`
* `stdlib`

## Development

Write code. Run `script/cibuild` to test it. Check the `script`
directory for other useful tools.

repository: caciasmith/my-boxen

repo_name: caciasmith/my-boxen


text:
# nf-core/eager: Usage

## Table of contents

* [Introduction](#general-nextflow-info)
* [Running the pipeline](#running-the-pipeline)
* [Updating the pipeline](#updating-the-pipeline)
* [Reproducibility](#reproducibility)
* [Main arguments](#main-arguments)
* [Job Resources](#job-resources)
* [Other command line parameters](#other-command-line-parameters)
* [Adjustable parameters for nf-core/eager](#adjustable-parameters-for-nf-coreeager)
* [Automatic resubmission](#automatic-resubmission)
* [Custom resource requests](#custom-resource-requests)
* [AWS batch specific parameters](#aws-batch-specific-parameters)
* [Other command line parameters](#other-command-line-parameters)
* [Adjustable parameters for nf-core/eager](#adjustable-parameters-for-nf-coreeager)

## General Nextflow info
Nextflow handles job submissions on SLURM or other environments, and supervises running the jobs. Thus the Nextflow process must run until the pipeline is finished. We recommend that you put the process running in the background through `screen` / `tmux` or similar tool.

It is recommended to limit the Nextflow Java virtual machines memory. We recommend adding the following line to your environment (typically in `~/.bashrc` or `~./bash_profile`):

```bash
NXF_OPTS='-Xms1g -Xmx4g'
```

## Preamble
To access the nextflow help message run: `nextflow run -help`

## Running the pipeline
The typical command for running the pipeline is as follows:
```bash
nextflow run nf-core/eager --reads '*_R{1,2}.fastq.gz' --fasta 'some.fasta' -profile standard,docker
```

> Note, that you might need to use `-profile standard,singularity` if you installed Singularity and don't want to use Docker. Also make sure, that you specify how much memory is available on your machine by using the `--max_cpus`, `--max_memory` options.

This will launch the pipeline with the `docker` configuration profile. See below for more information about profiles.

Note that the pipeline will create the following files in your working directory:

```bash
work            # Directory containing the nextflow working files
results         # Finished results (configurable, see below)
.nextflow.log   # Log file from Nextflow
# Other nextflow hidden files, eg. history of pipeline runs and old logs.
```

To see the the EAGER pipeline help message run: `nextflow run nf-core/eager --help`

### Updating the pipeline
When you run the above command, Nextflow automatically pulls the pipeline code from GitHub and stores it as a cached version. When running the pipeline after this, it will always use the cached version if available - even if the pipeline has been updated since. To make sure that you're running the latest version of the pipeline, make sure that you regularly update the cached version of the pipeline:

```bash
nextflow pull nf-core/eager
```

### Reproducibility
It's a good idea to specify a pipeline version when running the pipeline on your data. This ensures that a specific version of the pipeline code and software are used when you run your pipeline. If you keep using the same tag, you'll be running the same version of the pipeline, even if there have been changes to the code since.

First, go to the [nf-core/eager releases page](https://github.com/nf-core/eager/releases) and find the latest version number - numeric only (eg. `2.0`). Then specify this when running the pipeline with `-r` (one hyphen) - eg. `-r 2.0`.

This version number will be logged in reports when you run the pipeline, so that you'll know what you used when you look back in the future.

## Mandatory Arguments

### `-profile`

Use this parameter to choose a configuration profile. Profiles can give configuration presets for different compute environments. Note that multiple profiles can be loaded, for example: `-profile standard,docker` - the order of arguments is important!

* `standard`
    * The default profile, used if `-profile` is not specified at all.
    * Runs locally and expects all software to be installed and available on the `PATH`.
* `uzh`
    * A profile for the University of Zurich Research Cloud
    * Loads Singularity and defines appropriate resources for running the pipeline.
* `docker`
    * A generic configuration profile to be used with [Docker](http://docker.com/)
    * Pulls software from dockerhub: [`nfcore/eager`](http://hub.docker.com/r/nfcore/eager/)
* `singularity`
    * A generic configuration profile to be used with [Singularity](http://singularity.lbl.gov/)
    * Pulls software from singularity-hub
* `binac`
    * A profile for the BinAC cluster at the University of Tuebingen
    * Loads Singularity and defines appropriate resources for running the pipeline
* `conda`
    * A generic configuration profile to be used with [conda](https://conda.io/docs/)
    * Pulls most software from [Bioconda](https://bioconda.github.io/)
* `awsbatch`
    * A generic configuration profile to be used with AWS Batch.
* `test`
    * A profile with a complete configuration for automated testing
    * Includes links to test data so needs no other parameters
* `none`
    * No configuration at all. Useful if you want to build your own config from scratch and want to avoid loading in the default `base` config profile (not recommended).

### `--reads`
Use this to specify the location of your input FastQ files. For example:

```bash
--reads 'path/to/data/sample_*_{1,2}.fastq'
```

Please note the following requirements:

1. The path must be enclosed in quotes
2. The path must have at least one `*` wildcard character
3. When using the pipeline with paired end data, the path must use `{1,2}` notation to specify read pairs.

If left unspecified, a default pattern is used: `data/*{1,2}.fastq.gz`

### `--singleEnd`
If you have single-end data, you need to specify `--singleEnd` on the command line when you launch the pipeline. A normal glob pattern, enclosed in quotation marks, can then be used for `--reads`. For example:

```bash
--singleEnd --reads '*.fastq'
```

It is not possible to run a mixture of single-end and paired-end files in one run.

### `--pairedEnd`
If you have paired-end data, you need to specify `--pairedEnd` on the command line when you launc hthe pipeline.

A normal glob pattern, enclosed in quotation marks, can then be used for `--reads`. For example:

```bash
--pairedEnd --reads '*.fastq'
```

### `--fasta`
If you prefer, you can specify the full path to your reference genome when you run the pipeline:

```bash
--fasta '[path to Fasta reference]'
```
> If you don't specify appropriate `--bwa_index`, `--fasta_index` parameters, the pipeline will create these indices for you automatically. Note, that saving these for later has to be turned on using `--saveReference`.

### `--genome` (using iGenomes)

The pipeline config files come bundled with paths to the illumina iGenomes reference index files. If running with docker or AWS, the configuration is set up to use the [AWS-iGenomes](https://ewels.github.io/AWS-iGenomes/) resource.

There are 31 different species supported in the iGenomes references. To run the pipeline, you must specify which to use with the `--genome` flag.

You can find the keys to specify the genomes in the [iGenomes config file](../conf/igenomes.config). Common genomes that are supported are:

* Human
  * `--genome GRCh37`
  * `--genome GRCh38`
* Mouse
  * `--genome GRCm38`
* _Drosophila_
  * `--genome BDGP6`
* _S. cerevisiae_
  * `--genome 'R64-1-1'`

> There are numerous others - check the config file for more.

Note that you can use the same configuration setup to save sets of reference files for your own use, even if they are not part of the iGenomes resource. See the [Nextflow documentation](https://www.nextflow.io/docs/latest/config.html) for instructions on where to save such a file.

The syntax for this reference configuration is as follows:

```nextflow
params {
  genomes {
    'GRCh37' {
      fasta   = '<path to the genome fasta file>' // Used if no star index given
    }
    // Any number of additional genomes, key is used with --genome
  }
}
```

### Optional Reference Utility Files

### `--bwa_index`

Use this to specify a previously created BWA index. This saves time in pipeline execution and is especially advised when running multiple times on the same cluster system for example. You can even add a resource specific profile that sets paths to pre-computed reference genomes, saving even time when specifying these.

### `--seq_dict` false

Use this to specify the required sequence dictionary file for the selected reference genome.

### `--fasta_index` false

Use this to specify the required FastA index file for the selected reference genome.

### `--saveReference` false

If you turn this on, the generated indices will be stored in the `./results/reference_genomes` for you.

## Other command line parameters

### `--outdir`
The output directory where the results will be saved.

### `--email`
Set this parameter to your e-mail address to get a summary e-mail with details of the run sent to you when the workflow exits. If set in your user config file (`~/.nextflow/config`) then you don't need to speicfy this on the command line for every run.

### `-name`
Name for the pipeline run. If not specified, Nextflow will automatically generate a random mnemonic.

This is used in the MultiQC report (if not default) and in the summary HTML / e-mail (always).

**NB:** Single hyphen (core Nextflow option)

### `-resume`
Specify this when restarting a pipeline. Nextflow will used cached results from any pipeline steps where the inputs are the same, continuing from where it got to previously.

You can also supply a run name to resume a specific run: `-resume [run-name]`. Use the `nextflow log` command to show previous run names.

**NB:** Single hyphen (core Nextflow option)

### `-c`
Specify the path to a specific config file (this is a core NextFlow command).

**NB:** Single hyphen (core Nextflow option)

Note - you can use this to override defaults. For example, you can specify a config file using `-c` that contains the following:

```nextflow
process.$multiqc.module = []
```

### `--max_memory`
Use to set a top-limit for the default memory requirement for each process.
Should be a string in the format integer-unit. eg. `--max_memory '8.GB'`

### `--max_time`
Use to set a top-limit for the default time requirement for each process.
Should be a string in the format integer-unit. eg. `--max_time '2.h'`

### `--max_cpus`
Use to set a top-limit for the default CPU requirement for each process.
Should be a string in the format integer-unit. eg. `--max_cpus 1`

### `--plaintext_email`
Set to receive plain-text e-mails instead of HTML formatted.

### `--multiqc_config`
Specify a path to a custom MultiQC configuration file.

# Adjustable parameters for nf-core/eager

This part of the readme contains a list of user-adjustable parameters in nf-core/eager. You can specify any of these parameters on the command line when calling the pipeline by simply prefixing the respective parameter with a double dash `--`.

Example:
```
nextflow run nf-core/eager -r 2.0 -profile standard,docker --singleEnd [...]
```
This would run the pipeline in single end mode, thus assuming that all entered `FastQ` files are sequenced following a single end sequencing protocol.

## General Pipeline Parameters

These parameters are required in some cases, e.g. when performing in-solution SNP capture protocols (390K,1240K, ...) for population genetics for example. Make sure to specify the required parameters in such cases.

### `--snpcapture` false

This is by default set to `false`, but can be turned on to calculate on target metrics automatically for you. Note, that this requires setting `--bedfile` with the target SNPs simultaneously.

### `--bedfile`

Can be used to set a path to a BED file (3/6 column format) to calculate capture target efficiency on the fly. Will not be used without `--bedfile` set as parameter.

### `--udg` false

Defines whether Uracil-DNA glycosylase (UDG) treatment was used to repair DNA damage on the sequencing libraries. If set, the parameter is used by downstream tools such as PMDTools to estimate damage only on CpG sites that are left after such a treatment.

### `--udg_type "Half"`

If you have UDGhalf treated data (Rohland et al 2016), specify this parameter additionally to `--udg` to use a different model for DNA damage assessment in PMDTools.

## Step skipping parameters

Some of the steps in the pipeline can be executed optionally. If you specify specific steps to be skipped, there won't be any output related to these modules.

### `--skip_preseq`

Turns off the computation of library complexity estimation.

### `--skip_damage_calculation`

Turns off the DamageProfiler module to compute DNA damage profiles.

### `--skip_qualimap`

Turns off QualiMap and thus does not compute coverage and other mapping metrics.

### `--skip_deduplication`

Turns off duplicate removal methods DeDup and MarkDuplicates respectively. No duplicates will be removed on any data in the pipeline.

### `--complexity_filter`

Performs a poly-G complexity filtering step in the beginning of the pipeline if turne on. This can be useful for especially assembly projects where low-complexity regions might dramatically influence the assembly of contigs.

## Complexity Filtering Options

### `--complexity_filter_poly_g_min`

This option can be used to define the minimum value for the poly-G filtering step in low complexity filtering. By default, this is set to a value of `10` unless the user has chosen something specifically using this option.

## Adapter Clipping and Merging Options

These options handle various parts of adapter clipping and read merging steps.

### `--clip_forward_adaptor`

Defines the adapter sequence to be used for the forward read. By default, this is set to `AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC`.

### `--clip_reverse_adaptor`

Defines the adapter sequence to be used for the reverse read in paired end sequencing projects. This is set to `AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTA` by default.

### `--clip_readlength` 30

Defines the minimum read length that is required for reads after merging to be considered for downstream analysis after read merging. Default is `30`.

### `--clip_min_read_quality` 20
Defines the minimum read quality per base that is required for a base to be kept. Individual bases at the ends of reads falling below this threshold will be clipped off. Default is set to `20`.

### `--clip_min_adap_overlap` 1
Sets the minimum overlap between two reads when read merging is performed. Default is set to `1` base overlap.

## Read Mapping Parameters

## BWA (default)

These parameters configure mapping algorithm parameters.

### `--bwaalnn`

Configures the `bwa aln -n` parameter, defining how many mismatches are allowed in a read. By default set to `0.04`, if you're uncertain what to set check out [this](https://apeltzer.shinyapps.io/bwa-mismatches/) Shiny App for more information on how to set this parameter efficiently.

### `--bwaalnk`

Configures the `bwa aln -k` parameter for the seeding phase in the mapping algorithm. Default is set to `2`.

### `--bwaalnl`

Configures the length of the seed used in `bwa aln -l`. Default is set to BWA default of `32`.

## CircularMapper

### `--circularmapper`

This turns on the CircularMapper application, that enhances the mapping procedure with the BWA algorithm on circular references utilizing a extend-remap procedure (see Peltzer et al 2016, Genome Biology for details).

### `--circularextension`

The number of bases to extend the reference genome with. By default this is set to `500` if not specified otherwise.

### `--circulartarget`

The chromosome in your FastA reference that you'd like to be treated as circular. By default this is set to `MT` but can be configured to match any other chromosome.

### `--circularfilter`

If you want to filter out reads that don't map to a circular chromosome, turn this on. By default this option is turned off.

## BWA Mem

### `--bwamem`

Turn this on to utilize BWA Mem instead of `bwa aln` for alignment. Can be quite useful for modern DNA, but is rarely used in projects for ancient DNA.

## Read Filtering and Conversion Parameters

Users can configure to keep/discard/extract certain groups of reads efficiently in the nf-core/eager pipeline.

### `--bam_discard_unmapped`

Defines whether unmapped reads should be discarded and stored in FastQ and/or BAM format separately. The behaviour depends on the choice of the `--bam_unmapped_type`.

### `--bam_unmapped_type`

Defines how to proceed with unmapped reads: "discard" removes all unmapped reads, "bam" keeps unmapped reads as BAM file, "fastq" keeps unmapped reads as FastQ file, "both" keeps both BAM and FastQ files. Only effective when option `--bam_discard_unmapped` is turned on.

### `--bam_mapping_quality_threshold`

Specify a mapping quality threshold for mapped reads to be kept for downstream analysis. By default keeps all reads and is therefore set to `0` (basically doesn't filter anything).

## Read DeDuplication Parameters

### `--dedupper`
Sets the duplicate read removal tool. By default uses `dedup` an ancient DNA specific read deduplication tool. Users can also specify `markdup` and use Picard MarkDuplicates instead, which is advised when working with paired end data that is *not* merged beforehand. In all other cases, it is advised to use `dedup`.

### `--dedup_all_merged`
Sets DeDup to treat all reads as merged reads. This is useful if reads are for example not prefixed with `M_` in all cases.

## Library Complexity Estimation Parameters

### `--preseq_step_size`

Can be used to configure the step size of Preseqs `c_curve` method. Can be useful when only few and thus shallow sequencing results are used for extrapolation.

## DNA Damage Assessment Parameters

### `--damageprofiler_length`

Specifies the length filter for DamageProfiler. By default set to `100`.

### `--damageprofiler_threshold`

Specifies the length of the read start and end to be considered for profile generation in DamageProfiler. By default set to `15` bases.

### `--run_pmdtools`

Specifies to run PMDTools for damage based read filtering and assessment of DNA damage in sequencing libraries. By default turned off.

### `--pmdtools_range`

Specifies the range in which to consider DNA damage from the ends of reads. By default set to `10`.

### `--pmdtools_threshold `

Specifies the PMDScore threshold to use in the pipeline when filtering BAM files for DNA damage. Only reads which surpass this damage score are considered for downstream DNA analysis. By default set to `3` if not set specifically by the user.

### `--pmdtools_reference_mask` ''

Can be used to set a reference genome mask for PMDTools.

### `--pmdtools_max_reads`

The maximum number of reads used for damage assessment in PMDtools. Can be used to significantly reduce the amount of time required for damage assessment in PMDTools. Note that a too low value can also obtain incorrect results.

## BAM Trimming Parameters

For some library preparation protocols, users might want to clip off damaged bases before applying genotyping methods. This can be done in nf-core/eager automatically by turning on the `--trim_bam` parameter.

### `--trim_bam`

Turns on the BAM trimming method. Trims off `[n]` bases from reads in the deduplicated BAM file. Damage assessment in PMDTools or DamageProfiler remains untouched, as data is routed through this independently.

### `--bamutils_clip_left` / `--bamutils_clip_right`

Default set to `1` and clipps off one base of the left or right side of reads. Note that reverse reads will automatically be clipped off at the reverse side with this (automatically reverses left and right for the reverse read).

### `--bamutils_softclip`

By default, nf-core/eager uses hard clipping and sets clipped bases to `N` with quality `!` in the BAM output. Turn this on to use soft-clipping instead, masking reads at the read ends respectively using the CIGAR string.

repository: esteinig/eager

repo_name: esteinig/eager


text:
# Space Sweeper - Der Letzte räumt den Weltraum auf

A JavaFX space-themed game with fancy animations, colorful graphics and cool sound.

Student Course Work for Patterns & Frameworks (SS2017)

## Quick Start ##

You can download the latest pre-compiled jar-file of the game including all dependencies here: http://tiny.cc/space-sweeper

Start it in your terminal with (make sure to have Java 8 JRE installed):

`java -jar space-sweeper.jar`

Have fun! :rocket:

## Development ##

TODO

## Credits ##

Idea & Coding by Team Dynamo Beuth
- Tilo Baller
- Karsten Kosmala
- Juliane Strehl

Icons designed by Freepik from Flaticon

Sounds from trekcore.com

repository: tbal/space-sweeper

repo_name: tbal/space-sweeper


text:
---
title: Upgraded my Mac to 8GB RAM (First Gen Unibody with Removable Battery)
author: Mike Moghadas
layout: post
categories:
  - Mac
  - OSX
tags:
  - 8GB
  - Mac
  - Memory
  - OSX
---
While not exactly supported by Apple the “13-inch, Aluminum, Late 2008″ version of the MacBook (Renamed to MacBook Pro) supports 8GB of Memory.

Originally purchased this Mac with 2GB RAM and Upgraded it to 4GB on day one. Had I known more memory was supported (officially or unofficially) my laptop would have been rocking more RAM much sooner.


text:
# Functional Tests

## Execute a Lambda

1. Login to Gestalt
2. Navigate to Sandbox -> Developer Sandbox -> Development -> Lambdas
3. Click on a lambda end-point  (the Factorial lambda, for instance)

A new browser tab should open, and running the lambda should not indicate any error.

## List using fog CLI

The following commands should not indicate any errors:

```sh
# From linux or MacOS:

./download_gestalt_cli.sh

./fog login <gestalt URL>   # (follow the prompts)

./fog status

./fog show hierarchy

./fog show containers /root/gestalt-system-workspace

./fog show lambdas /root/gestalt-system-workspace

```


text:
# evm-chains-extended

Package to query chain data from [ethereum-lists/chains](https://github.com/ethereum-lists/chains) with extended data necessary for EIP3085.

Makes use of Pedro Gomes' [evm-chains](https://github.com/pedrouid/evm-chains) package for the initial data, then merges in the extended data.

Includes Block Explorer URLs and network logos for certain networks.

This package is meant as a holdover and may be deprecated in the future in favor of simply using `evm-chains`. That is dependent on EIPs such as: https://github.com/ethereum/EIPs/pull/3091

NOTE: This also makes use of a silent interface pattern where missing networks will be returned undefined instead of throwing.

## Install

```sh
npm install --save evm-chains-extended

#or

yarn add evm-chains-extended
```

## API

```typescript
function getAllChains(): IChainDataExtended[] | undefined;
function getChain(chainId: number): IChainDataExtended | undefined;
function getChainByChainId(chainId: number): IChainDataExtended | undefined;
function formatNetworkForAddEthereumChain(network: IChainDataExtended): IAddEthereumChainParameter;
```

## Logos

To use network logos import into your dapp:

```typescript
import EthLogo from<EMAIL_ADDRESS>import BscLogo1 from<EMAIL_ADDRESS>import BscLogo2 from<EMAIL_ADDRESS>import OptimismLogo from<EMAIL_ADDRESS>import PoALogo from<EMAIL_ADDRESS>import PolygonLogo from<EMAIL_ADDRESS>import XDaiLogo from<EMAIL_ADDRESS>```

```jsx
// then:
<img src={XDaiLogo} />
```

## Types

```typescript
interface IChainDataExtended {
  name: string;
  chainId: number;
  shortName: string;
  chain: string;
  network: string;
  networkId: number;
  nativeCurrency: {
    name: string;
    symbol: string;
    decimals: number;
  };
  rpc: string[];
  faucets: string[];
  infoURL: string;
  blockExplorerUrls: string[]
}

// format for EIP3085 wallet_addEthereumChain
interface IAddEthereumChainParameter {
  chainId: string; // A 0x-prefixed hexadecimal string
  chainName: string;
  nativeCurrency: {
    name: string;
    symbol: string; // 2-6 characters long
    decimals: number;
  };
  rpcUrls: string[];
  blockExplorerUrls?: string[];
  iconUrls?: string[]; // Currently ignored.
}
```

## Data Source

[https://github.com/ethereum-lists/chains](https://github.com/ethereum-lists/chains)

repository: macaufi/evm-chains-extended

repo_name: macaufi/evm-chains-extended


text:
# ObjectTypeNameResolver

Used to resolve the type name for an object.

## Object type name examples and resolution strategies

### By key

In the most simple case there is only the `key` to go by, which is the name of the property

```js
person {
  car: {
    type: 'object'
    properties: {
      // ...
    }
  }
}
```

We can here assume either that:

- assume the type is the same as the property, such as `car: Car`.
- use a `fullName` type name such as `[ownerName, key].join()`
- the type is generic

In this case use the `fullName` strategy and default to a default type `Object`

### Definition ref

If the object is referencing a definition `#/definition/MegaCar`

```js
person: {
  car: {
    $ref: '#/definition/MegaCar'
  }
},
// ...
definitions: {
  MegaCar: {
    // ...
  }
}
```

We will use the ref name `MegaCar`.

### Name entry

If the value has a `name` entry, we use that.

```js
car: {
  type: 'object',
  name: 'SuperCar',
  properties: {
    // ...
  }
}
```

### Full strategy

We use the name of the first strategy that provides a name in the followin order:

- `refTypeName`
- `name`
- `fullName`
- `defaultType`

Can be expressed as: `refTypeName || name || fullName || defaultType`

Note: If any of the non-default strategies return a name, we expect to have detected a new valid `type` and will `dispatch` an event with information on this finding.

## resolve

Delegates to `resolvedTypeName`

```js
resolve() {
  return this.resolvedTypeName
}
```

## typeName

Tries resolving type name via various naming strategies, using `resolvedTypeName`.
If not enough information available, defaults to using `defaultType`

```js
get typeName() {
  const {object} = this
  const name = this.resolvedTypeName || this.defaultType
  return camelize(name)
}
```

### resolvedTypeName

Tries various naming strategies to resolve the object type name.

Note: Uses memoization to avoid name recalculation

```js
get resolvedTypeName() {
  const {object} = this
  const {refTypeName, name, fullName} = object
  this._resolvedTypeName = this._resolvedTypeName || (refTypeName || name || fullName)
  return this._resolvedTypeName
}
```


text:
```javascript
// fmapMay (<$>) :: (a -> b) -> Maybe a -> Maybe b
const fmapMay = f =>
    mb => mb.Nothing ? (
        mb
    ) : Just(f(mb.Just));
```

```applescript
-- fmapMay (<$>) :: (a -> b) -> Maybe a -> Maybe b
on fmapMay(f, mb)
    if Nothing of mb then
        mb
    else
        Just(|λ|(Just of mb) of mReturn(f))
    end if
end fmapMay
```

url: https://raw.githubusercontent.com/RobTrew/prelude-jxa/84fc4ad572ef0ffa1a8f600044b21151ef59093d/MD javascript vs applescript/fmapMay (<$>).md

repository: RobTrew/prelude-jxa

filename: fmapMay (<$>).md

repo_name: RobTrew/prelude-jxa


text:
## Maintainers

If you have any problems with our library, feel free to reach out to our
maintainer.

* [James Seconde](https://github.com/secondejk)

### Past Maintainers

* [Chris Tankersley](https://github.com/dragonmantank)
* [Lorna Jane Mitchell](https://github.com/lornajane)
* [Tim Lytle](https://github.com/tjlytle)
* [Micheal Heap](https://github.com/mheap)

## Contributors

In no particular order, we would like to thank all the contributors who have
helped work on this library. We truly value our open source community and the
work that they do.

* [Aleksandr Demchenko](https://github.com/stronglab)
* [Ash Allen](https://github.com/ash-jc-allen)
* [Thiago Locks](https://github.com/thiagolcks)
* [Derick Rethans](https://github.com/derickr)
* [Viktor Szépe](https://github.com/szepeviktor)
* [Christopher Lass](https://github.com/arubacao)
* [Greg Holmes](https://github.com/GregHolmes)
* [Vincent Klaiber](https://github.com/vinkla)
* [footballencarta](https://github.com/footballencarta)
* [Vlad Rusu](https://github.com/vladrusu)
* [Vinayak](https://github.com/vinayak42)
* [Valentin Ursuleac](https://github.com/ursuleacv)
* [Tim Craft](https://github.com/timcraft)
* [Sara Bine](https://github.com/sbine)
* [Mathias Strasser](https://github.com/roukmoute)
* [Alex](https://github.com/pushkyn)
* [Ivan](https://github.com/prog1dev)
* [Pierre Grimaud](https://github.com/pgrimaud)
* [Chun-Sheng, Li](https://github.com/peter279k)
* [Mark Lewin](https://github.com/marklewin)
* [Leonardo Maier](https://github.com/leonardomaier)
* [Lauren Lee](https://github.com/laurenelee)
* [Kyle Hudson](https://github.com/kylejmhudson)
* [Jean-Philippe Murray](https://github.com/jpmurray)
* [Jaggy](https://github.com/jaggy)
* [gy741](https://github.com/gy741)
* [Eduardo Cáceres](https://github.com/eduherminio)
* [Dwight Watson](https://github.com/dwightwatson)
* [Mior Muhammad Zaki](https://github.com/crynobone)
* [Ankur Kumar](https://github.com/ankurk91)
* [Testing989](https://github.com/Testing989)
* [Sascha Greuel](https://github.com/SoftCreatR)
* [Mou Ikkai](https://github.com/Mou-Ikkai)
* [Jesse O'Brien](https://github.com/JesseObrien)
* [Fabien Salathe](https://github.com/BafS)
* [Dries Vints](https://github.com/driesvints)

repository: Vonage/vonage-php-sdk-core

gha_language: PHP

repo_name: Vonage/vonage-php-sdk-core


text:
# Election Based On Blockchain

## pre-requisites

### Install node
### https://nodejs.org/en/download/

### Install Ganache
### https://www.trufflesuite.com/ganache

### Install truffle
### https://www.trufflesuite.com/docs/truffle/getting-started/installation

## ganache should be running before hand

## to setup project run "npm install" after cloning

## After changes in contracts you need to migrate contracts as a new copy by runnig "truffle migrate --reset"

## to compile transaction run "truffle compile"

## to run tests of contracts run "truffle test"

## to run project on lite-server, run "npm run dev"

### Project Tour

### Initial View

#### Initially both the candidates have
![1](https://user-images.githubusercontent.com/31301266/75688746-0d060600-5cc6-11ea-8c0d-4da75cff8dc3.png)

#### Confirm transaction for candidate 1
![2_confrm_txn_for_cand1](https://user-images.githubusercontent.com/31301266/75685818-3708f980-5cc1-11ea-8bef-5459824395d7.png)

#### Now Candidate 1 has 1 vote
![3_voted_for_cand1](https://user-images.githubusercontent.com/31301266/75685827-3a03ea00-5cc1-11ea-98a6-40a5d49c548d.png)

#### Once Voted from one account, user cannot vote again, so now we need to import another account
![4_import_another_account](https://user-images.githubusercontent.com/31301266/75685833-3bcdad80-5cc1-11ea-8778-cdcfbcc701e9.png)

#### After confirmation for candidate 2, now candidate 2 also has one vote
![5_cand2_txn_confrm](https://user-images.githubusercontent.com/31301266/75685837-3cfeda80-5cc1-11ea-8eb1-b0d5bbe05cd7.png)

gha_language: JavaScript


text:
# Denoise

ReBench comes with the `rebench-denoise` tool, which adjusts system
settings to reduce the interference from the system that may influence
benchmark results.

`rebench-denoise` is a command-line tool, and supports the `--help` argument
for a brief overview of its options.

```bash
$ rebench-denoise --help
usage: rebench-denoise [-h] [--version] [--json] [--without-nice]
                       [--without-shielding]
                       command

positional arguments:
  command              `minimize`|`restore`|`exec -- `: `minimize` sets system
                       to reduce noise. `restore` sets system to the assumed
                       original settings. `exec -- ` executes the given
                       arguments.

optional arguments:
  -h, --help           show this help message and exit
  --version            show program's version number and exit
  --json               Output results as JSON for processing
  --without-nice       Don't try setting process niceness
  --without-shielding  Don't try shielding cores
```

ReBench will try to use `rebench-denoise` automatically.
However, it may be used as a stand-alone tool manually as well.

The commands are `minimize`, `restore`, and `exec`.

The `minimize` command will configure the system for reliable performance
and reduced interference.
The `restore` command will set the system back to a state that
is the presumed standard state.
With `exec`, the arguments provided after a `--` will be executed as a program.
Depending on the settings, this will include `nice -n-20` and the command to
use core shielding.

repository: smarr/ReBench

repo_name: smarr/ReBench


text:
debian-measurer
===============

Grab all Debian packages and measure them. You will need a `Sources.gz`
file with the directory of packages to be measured. See below for a
script to gather that file from a Debian mirror.

After that, install the tool with

```
python setup.py install
```

You will need the `lockfile` module and the SLOCCount tool.

After that, pass the following command line arguments to
`debian-measurer`:
* Location of the sources file
* Output dir for the results
* Base URL of the Debian mirror from where the packages will be
gathered (from Spain, I recommend ftp://ftp.rediris.es/mirror/debian/)
* Path to SLOCCount if it is not in the default path

## Grab all the Sources.gz for Debian

You need to get the Sources.gz files for the release of Debian you
want to measure. Use this script to grab all the sources for all the releases:

```shell
#!/bin/bash

base_url="ftp://ftp.rediris.es/mirror/debian/"

echo 'stable\ntesting\nsid\nexperimental\nstable-updates\nstable-proposed-updates\ntesting-proposed-updates'| while read d
do

	echo 'main\ncontrib\nnon-free' | while read l
	do
		echo Grabbing $d/$l...
		wget $base_url/dists/$d/$l/source/Sources.gz
		mv Sources.gz Sources-$d-$l.gz
	done
done
```

repository: iht/debian-measurer

repo_name: iht/debian-measurer


text:
# RNA-seq
Align samples against an assembly, count expressed genes, generate bigwigs and perform differential expression analysis.
Bigwigs can be split for stranded protocols, and can be visualized in a trackhub or automatically generated assembly hub.

Samples can be your own fastq files, or GSM/ERR/SRR/SRA entries. The pipeline (automatically) handles both paired-end and single-end data.
Alignment can be performed with multiple aligners. For RNA-seq, you can use STAR and Salmon (the latter requires an Ensembl assembly).
Differential gene expression (DE) analysis can optionally be performed with DESeq2.

### Configuration
To specify which samples to align against which assembly the snakefile looks at the [samples.tsv](https://github.com/vanheeringen-lab/snakemake-workflows/blob/master/workflows/rna_seq/samples.tsv) file. The first entry is the column name *sample*, and every line after specifies a sample file, the second column is which assembly to align against.

In order to perform DE analysis, add columns containing the variables you with to analyse (e.g. time, treatment, batch).
Furthermore, one or more a design contrasts must be specified in the [config.yaml](https://github.com/vanheeringen-lab/snakemake-workflows/blob/master/workflows/rna_seq/config.yaml) file.

Take a look at our [rna-seq wiki](https://github.com/vanheeringen-lab/snakemake-workflows/wiki/5.-RNA-seq) configuration and best practices.


text:
# Steam Screenshot Downloader

A small tool to download all screenshots from steam of one or more users.

  You need this part of it https://steamcommunity.com/id/**ACCOUNT_NAME**/screenshots/

Start the program, enter the account names (multiple accounts comma seperated), press enter. All Screenshots will be placed in the folder where the executeable lies, sorted by the account names.

![Sample](https://github.com/Jnnshschl/SteamScreenshotDownloader/raw/master/SteamScreenshotDownloader/images/screenshot.PNG "Sample Screenshot")

repository: Jnnshschl/SteamScreenshotDownloader

repo_name: Jnnshschl/SteamScreenshotDownloader


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

### Description

Multiple directory traversal vulnerabilities in index.php in Tuned Studios (1) Subwoofer, (2) Freeze Theme, (3) Orange Cutout, (4) Lonely Maple, (5) Endless, (6) Classic Theme, and (7) Music Theme webpage templates allow remote attackers to include and execute arbitrary files via ".." sequences in the page parameter.  NOTE: this can be leveraged for remote file inclusion when running in some PHP 5 environments.

### POC

#### Reference
- https://www.exploit-db.com/exploits/4876

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

repo_name: trickest/cve