text:
# ECS189M Repo

This is the repo for all the ECS189M challenges and how to set everything up. Useful if you came from the class and would like to know how stuff works under the hood, or if you're planning on creating a CTF, in which case this infrastructure might be useful to you.

For the list of challenges, you can look [here](lectures/challenges.md).

I have spent some time porting all the challenges over to my [private server](https://photon.rkevin.dev), so if you want to continue trying out the challenges, you can! I put it together hastily, so let me know if there are technical issues so I can fix it.

The `master` branch is the old branch with all the code from ECS189M as I taught it. Active "development" (mainly maintenance work and such) is on the `photon` branch and that's the version deployed on https://photon.rkevin.dev.

# Table of Contents
1. [Directory structure](#directory-structure)
2. [Creating your own challenges](#creating-your-own-challenges)
3. [Hosting the challenges](#hosting-the-challenges)

# Directory structure

## challenges

Folder with all the challenges in it. Contains a `categories.yml` with information on each of the categories (dates are out of date) and one folder per category

Each category would have a bunch of subdirectories, each indicating a challenge. There would be an `info.yml` file with information for the build script.

## lectures

Random files on lecture status and challenge status. Not important for you, and mostly out of date.

## xinetd_base

Base chroot environments for xinetd challenges. I know this is not the proper way to do things, but whatever. In retrospect I should move this into the `utils` folder.

## build.py

This is the build script that parses the list of challenges and "builds" them into a `build` folder. More on that later.

WARNING: Read the script in its entirety before using it. It does a lot of stuff you might not expect unless you're the creator (for example, it automatically creates users). I'm not responsible if you bork your system using it, but then again that applies to everything in this repo.

## utils

Random utilities, listed below:

### Beamsplitter

A Python program that manages webapp challenges. It can spin up containers for a challenge when a user requests, route all requests from the same person into the same container, and kill the container after a period of inactivity. Required for webapp challenges.

### lamp_base

Unused. Originally gonna be for a LAMP stack to build SQLi challenges on, but decided to put it in the individual Dockerfiles instead.

### mellivora

Our scoreboard is [Mellivora](https://github.com/Nakiami/mellivora), but I have made some custom changes to it to better fit the course and fix some bugs. That folder contains a list of differences between my version and upstream.

### noaslr

The `noaslr` binary required for all memory corruption challenges, which disables ASLR and removes environment variables so stack offsets stay consistent.

### qaframework

Was about to be a framework on which you can build challenges where the user answers a bunch of questions, and the flag is only given when you answer all questions correctly. This is deprecated and you should consult the `linuxbasics`, `linuxadv` and `loganalysis` challenges instead if you want to do this yourself.

### vagrant

A Vagrant testing machine, built by @aenygma, not me.

### xinetd

The Docker container from which all xinetd challenges (i.e. the ones where you `nc` into a port) are served from, including the compose file.

### flaggen.sh

A simple shell script for generating flags.

# Creating your own challenges

To create a challenge, you need to create the following directory structure:
```
challenges
  - categories.yml
  - category1
    - challenge1
    - challenge2
  - category2
    - challenge3
    - challenge4
```

The `categories.yml` is a YAML file structured like this:
```yaml
categories:
  category1:
    name: My awesome category
    start: 2020-01-06 00:00:00
    end: 2020-03-20 22:00:00
  category2:
    name: My other awesome category
    start: 2009-04-13 10:25:00
    end: 2016-10-25 06:12:00
```

Inside each challenge folder, there is also an `info.yml` file with some challenge details. Note that originally I planned on populating Mellivora (the scoreboard) with all the challenges, so I originally wanted to include all the challenge descriptions, point values and flags, but I have changed my mind so those fields are no longer required (except for `flag`, which is required for xinetd challenges).

It's required for the challenges to have distinct names, even if they're in different categories. Also, it's highly recommended to keep the challenge names to only contain alphanumeric characters (I know if you use underscores you might break beamsplitter later on, but in general best play it safe) since I don't do too much input sanitization (this is originally only for internal use, after all).

There are four fields that can be applied to all challenges:
```yaml
disabled: true
prebuild: sleep 5
postbuild: sleep 10 && sleep 15
type: misc
```

Only `type` is required, everything else is optional. If `disabled` is true, then this challenge will be skipped by the build script. If `prebuild` is not empty, that will be executed in `os.system()` with the working directory set as the challege directory. This is useful if you want to compile binaries, copy files, etc. (Off topic, I originally used this to compile binary challenges, but at the end I decided against it and precompiled them since I don't want the binaries to change when I update my compiler.) `postbuild` works like `prebuild` but only after building the challenge.

There are four different types of challenges, `misc`, `sshable`, `webapp` and `xinetd`, detailed below:

For `misc` challenges, the build script does nothing, other than running the prebuild and postbuild scripts. This is helpful for challenges that don't require a server, like some crypto challenges.

For `sshable` and `webapp` challenges, the build script will build a Docker container in that directory, tagged as the challenge name. Be sure to have a `Dockerfile` in there.

For `sshable`, it will also create a user automatically on the system, with the username the same as the challenge name. It will give the user a default shell, which is a SUID binary that spins up the Docker container and drops the user into it. Make sure the Docker image runs as a non-root user by default, and it will run bash, so the user can explore in the container. If you need to spin up challenges with cron or something else running in the background, you need a custom entrypoint. Check the `privesc2` or `privesc3` challenges for examples of that.

For `webapp` challenges, make sure the Docker image runs a webserver on port `8080`. The web challenge containers will be spun up by beamsplitter, more on that in the hosting section. Also, if you're doing XSS challenges, make sure the headless browser has a cookie set so it can be routed back to itself. There is an environment variable called `beamsplitter_cookie`, and you need to set a cookie with the name `beamsplitter_challengename` (like `beamsplitter_xss`) with that value for requests to route properly.

For `xinetd` challenges, you need an extra element in your `info.yml` file, like follows:

```yaml
flag: ECS{fakeflag}
type: xinetd
xinetd_config:
  base: binary
  port: 30005
  executable: /bin/noaslr ./babybufov
```

All `xinetd` challenges will be served in a chroot environment, and you can choose between one of three predefined environments:

1. `binary`: A barebones environment to run binary exploitation challenges in. There's only a bash shell, 32 and 64 bit libc, and a couple of other stuff in there like the `noaslr` helper, but that's it.

2. `python`: An environment with Python 3.7 installed. Helpful if you're making an interactive challenge and prefer to use Python.

3. `python-crypto`: An environment with Python 3.7 and the `cryptography` library. Useful for interactive crypto challenges.

You can also add more base chroot environments in the `xinetd-base` directory in the root of this repo.

Make sure you have a `dist` folder inside the challenge directory, and it will be copied over into the `chroot` environment. In addition, a file called `flag` will be created in the root directory containing the flag, which you set in the yaml file.

# Hosting the challenges

To host the challenges, build them using the build script first. You can just do `sudo ./build.py`. The script should be run as root, because it needs to build Docker containers and add users to the system. If you have another user who's in the `docker` group and don't have sshable challenges, feel free to not run it as root, but be careful since all the files being copied now has your UID, and if someone solved, say, an xinetd challenge and all the files are owned by a non-root UID, they might be able to do some damage.

If you want to host `sshable` challenges, all you need to do is to allow people to SSH into your machine. The username is the same as the challenge name, and you should setup a password separately by using `passwd` or set up SSH key access. Once they SSH in, they'll be automatically dropped into a freshly created challenge container, and it will be killed after 6 hours or after they exit, whichever is earlier.

_NOTE: I HAVEN'T ADDED ULIMITS._ There are Docker limits like maximum amount of memory and CPU usage, but I couldn't find a way to add PID limits, so if someone wants to forkbomb the server _THEY CAN_. TODO: Find a way to fix it.

If you want to host `xinetd` challenges, you just need to go to the `utils/xinetd` directory and do a `docker-compose build && docker-compose up`. It will automatically use stuff in the `build` directory and expose those challenges. You might want to edit the `docker-compose.yml` to expose different ports than the one I have right now.

If you want to host `webapp` challenges, things become a bit more tricky. You will need Apache on the host and run beamsplitter. You may consult [here](utils/beamsplitter) for instructions.


text:
---
layout: default
title: Collection Test 2
---

This collection test page assigns no specific toc or navmenu, so should use the general collection navmenu and toc.

{% highlight yaml %}
---
layout: default
title: Collection Test 2
---
{% endhighlight %}

The test passes if the navmenu includes the item "NAV TEST COLLECTION" and the TOC first item should be "TOC TEST COLLECTION" (from **/_data/toc_test_collection.yml**).

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: HTML

gha_license_id: MIT

license_type: permissive


text:
---
layout: default
---

# 1997-01-31 - Re: Denial of service attack

## Header Data

From<EMAIL_ADDRESS>(Huge Cajones Remailer)

To<EMAIL_ADDRESS>Message Hash: 207c6211b4d7e6e286d9f3f36ab4676004fa3366f50fcf5667ca4f3b0e78367c

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-01-31 22:56:16 UTC

Raw Date: Fri, 31 Jan 1997 14:56:16 -0800 (PST)

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Huge Cajones Remailer)
Date: Fri, 31 Jan 1997 14:56:16 -0800 (PST)
To<EMAIL_ADDRESS>Subject: Re: Denial of service attack
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Dimwit Virus K[arcinogen]OfTheMonth styles his facial hair to
look more like pubic hair.

             \|/
             @ @
        -oOO-(_)-OOo- Dimwit Virus K[arcinogen]OfTheMonth

{% endraw %}
```

## Thread

+ Return to [January 1997](/archive/1997/01)

+ Return to<EMAIL_ADDRESS>(Huge Cajones Remailer)](/authors/nobody_at_huge_cajones_com_huge_cajones_remailer_)"

+ 1997-01-31 (Fri, 31 Jan 1997 14:56:16 -0800 (PST)) - Re: Denial of service attack -<EMAIL_ADDRESS>(Huge Cajones Remailer)_


text:
From **development** to **production**, kool brings speed and security to software development teams from different stacks, making their development environments reproducible and easy to set up.

Here are a few things kool can help you with:

* Stop installing lots of things on your machine like NGINX, PHP, NODE
* Stop writing documentation on how to setup local environments
* No more works on my machine due to different version / setup
* Have total control of the stack per project, different projects on different versions? No problem!
* Have the very same stack / version from your production environment
* Work the same way on different stacks / projects (laravel? adonis? nextjs? symfony?)

repository: leandroncbrito/kool

repo_name: leandroncbrito/kool


text:
# april
Wordpress theme based on Bootstrap 4

## Features
* Responsive design
* Sticky posts in categories
  * if there are posts marked as sticky, they are displayed as first posts on all pages of a **category** listing (e.g. if you have 5 posts per page and 2 sticky posts the page will show 7 posts)
  * the default post listing (main query/landing page) is not altered (sticky posts will be displayed only on the **first** page)
  * if a post has the tag **sticky** it will have an alternative color and no date displayed

## Used libraries
* [Bootstrap 4](https://getbootstrap.com/ "Bootstrap 4")

## Development
You need to have Ruby installed. Install [RVM](https://rvm.io/), enable it: `source ~/.rvm/scripts/rvm` and use it `rvm use`. You may need to install the proper ruby version.
If not yet available, you need to install Sass into it: `gem install sass`.

To auto compile the SCSS to CSS, run the following in a terminal from the theme root:
```
sass -t compact --scss --watch sass/april.scss:css/april.css
```

To create the languages, do the following (needs the `wordpress-core` checked out):
```
/home/alex/php /home/alex/projects/wordpress-core/tools/i18n/makepot.php wp-theme /home/alex/projects/github/april/
```
`/home/alex/php` in this case references to the Docker image [darignac/php:alpine](https://hub.docker.com/r/darignac/php/):
```
#!/bin/bash
docker run --rm -i -v /home/alex:/home/alex -v $PWD:/code -w /code darignac/php:alpine php "$@"
```

## Distribution
* for distribution, Grunt is used (required yarn and Grunt globally)
    * it will copy the theme into a dist folder with all sass and js compiled and minimized (see ``Gruntfile.js`` for more info)
```
npm install
node_modules/.bin/grunt
```
* the version number is the version in ``package.json``
    * as the ``style.css`` is created by sass and then minified, Grunt inserts the required Wordpress header into the minified ``style.css``
* *the theme does not meet the Wordpress requirements for a theme yet* (haven't checked them)
* distribution is automatically done by TravisCI if a tag is created

### Create a release
* adjust the version in `package.json`
* ensure that all changes are added to the changelog in the `README.md` file with the correct version number
* check if to update translations, if so, update the `pot` file and the translations
* commit with a release message
* tag and push the tag and wait until TravisCI has released it

## Continuous Integration
* each commit will be dealt at TravisCI, the release script is executed
* [![Build Status](https://travis-ci.org/dArignac/april.svg?branch=master)](https://travis-ci.org/dArignac/april)

## Changelog
* TBA
  * Bugfixes
    * fixed invalid escaped selector for anchor scrolling
* 2.0.2
  * Bugfixes
    * [#51](https://github.com/dArignac/april/issues/51) Article date is always today
* 2.0.1
  * Bugfixes
    * [#51](https://github.com/dArignac/april/issues/51) Article date is always today
* 2.0.0
  * **Breaking**
    * [#49](https://github.com/dArignac/april/issues/49) removed nggallery support
  * Enhancements
    * changed from `npm` to `yarn` as package manager for local development
  * Bugfixes
    * [50](https://github.com/dArignac/april/issues/50) fixed menu display if there is no primary menu
    * [48](https://github.com/dArignac/april/issues/48) avoided caching of style upon new release
* 1.8.0
  * Enhancements
    * [#46](https://github.com/dArignac/april/issues/46) footer is now sticky
    * [#47](https://github.com/dArignac/april/issues/47) fixed some minor German translations
* 1.7.0
  * Enhancements
    * [#45](https://github.com/dArignac/april/pull/45) limit search results to posts only
  * Bugfixes
    * [#44](https://github.com/dArignac/april/pull/44) hide comment submit form if plugin _Google's No Captcha reCaptcha_ is installed to avoid two submit buttons
* 1.6.0
  * Enhancements
    * [#40](https://github.com/dArignac/april/pull/40) adjusted tag styling on article page
    * [#42](https://github.com/dArignac/april/pull/42) added previous and next post links to posts page
  * Bugfixes
    * [#34](https://github.com/dArignac/april/issues/34) fixed scrolling to anchors
    * [#43](https://github.com/dArignac/april/issues/43) fixed invalid bundled javascript file
* 1.5.0
  * Enhancements
    * [#38](https://github.com/dArignac/april/pull/38) adjusted to Bootstrap 4.1 release version
  * Bugfixes
    * [#39](https://github.com/dArignac/april/issues/39) fixed Sass deprecation warnings
* 1.4.0
  * Enhancements
    * [#36](https://github.com/dArignac/april/issues/36) show sticky posts on category listings on all pages
* 1.3.1
  * Enhancements
    * [#35](https://github.com/dArignac/april/issues/35) show only sticky posts of configured categories on landing page
    * [#16](https://github.com/dArignac/april/issues/16) better way to filter front page categories
* 1.3.0
  * Enhancements
    * [#15](https://github.com/dArignac/april/issues/15) header is now fixed
  * Bugfixes
    * [#32](https://github.com/dArignac/april/issues/32) styled search page
* 1.2.0
  * Update-Info
    * several changes in settings come with this version - unfortunately **you have to configure them all again**
  * Enhancements
    * [#30](https://github.com/dArignac/april/issues/30) added additional first level navigation on desktop browsers
    * [#13](https://github.com/dArignac/april/issues/13) hamburger image and widgets open/close image is now customizable
* 1.1.1
  * Enhancements
    * [#27](https://github.com/dArignac/april/issues/27) added border between post content and comment form
    * [#26](https://github.com/dArignac/april/issues/26) removed outline on widget opening button
    * [#25](https://github.com/dArignac/april/issues/25) styled post navigation
    * [#24](https://github.com/dArignac/april/issues/24) links are no longer bold
  * Bugfixes
    * [#27](https://github.com/dArignac/april/issues/27) added margin between post preview and read more row
    * [#22](https://github.com/dArignac/april/issues/22) several gallery fixes
      * navigation with more than one gallery on a page now works
      * galleries to not autoplay any more
      * caption background is less opaque now
  * Integration
    * [#23](https://github.com/dArignac/april/issues/23) releases are now built on travis
* 1.1.0
  * Enhancements
    * [#19](https://github.com/dArignac/april/issues/19) basic template for NextGEN gallery
    * [#16](https://github.com/dArignac/april/issues/16) be able to filter categories on front page
  * Bugfixes
    * [#21](https://github.com/dArignac/april/issues/21) fixed wrong link color
    * [#20](https://github.com/dArignac/april/issues/20) added missing page title
    * [#17](https://github.com/dArignac/april/issues/17) fixed styles for tag cloud
* 1.0.1
  * Enhancements
    * [#12](https://github.com/dArignac/april/issues/12) header image now links to home page
  * Bugfixes
    * [#14](https://github.com/dArignac/april/issues/14) post images overflow column layout
* 1.0.0
  * initial release

repository: dArignac/april

gha_language: PHP

repo_name: dArignac/april


text:
# ♗ chs

> Play chess against the Stockfish engine in your terminal.

### Table of Contents

- [Installation](#installation)
  - [Pip](#pip)
  - [Arch Linux](#arch-linux)
- [Usage](#usage)
  - [How to start playing](#how-to-start-playing)
  - [How to play](#how-to-play)
- [License](#license)

## Installation

#### Pip

This package is available via PyPi.

```
$ python3 -m pip install chs
```

#### Arch Linux

There is a [chs-git](https://aur.archlinux.org/packages/chs-git/) package in the Arch User Repository, which you can install with an AUR helper:

```
$ yay -S chs-git || paru -S chs-git
```

## Usage

To play against the default level 1 (easiest) version of the Stockfish engine, just run `chs` command.

### How to start playing

```
$ chs
```

To see all possible options, use the help command.

```
$ chs help
```

To play as the black pieces, use the `--play-black` flag.

```
$ chs --play-black
```

You can also specify the level of the engine if you want to tweak the difficulty.

```
$ chs --level=8
```

### How to play

There are a few things you can do while playing:

- Make moves using valid algebraic notation (e.g. `Nf3`, `e4`, etc.).
- Take back your last move by playing `back` instead of a valid move.
- Get a hint from the engine by playing `hint` instead of a valid move.

## License

This software is free to use under the MIT License. See [this reference](https://opensource.org/licenses/MIT) for license text and copyright information.


text:
# Use an enum as an autocomplete suggestion list

It is possible to have an enum that can be used as an autocomplete suggestion list.
The list will be available for you to search and select from, similar to the normal enums.
However unlike regular enums, you can create/add your own entries and select them even though they're not in the list.

To define the autocomplete field in your schema, use the custom field "dj:autocomplete" as follows:

```json
{
    "dj:autocomplete": {
      "enum": [
        "Lothlorien",
        "Dale",
        "Gondor",
        "Rohan",
        "Mordor"
      ]
    }
}
```

The autocomplete field also supports "**$ref**" references to other files where you can define your enums.

You can see the examples of "**dj:autcomplete**" and "**$ref** usage in the following example files:
- The json schema ("heroNames.schema.json") where the "dj:autocomplete" is defined.
- The referenced enum ("./_types/origins.json")

repository: innogames/dr-json

gha_language: TypeScript

repo_name: innogames/dr-json


text:
# Cache

This is a folder for cached files.
The caches will be made for every bert model & (test, train) set.
They also will be made with the python module _Pickle_.

For example: `cached_bert-base-multilingual-cased_train.pkl`

The file above contains train set, tokenized by pretrained _bert-base-multilingual_ model.

repository: nlpcl-lab/msent-cred-predictor

repo_name: nlpcl-lab/msent-cred-predictor


text:
# Usage

This package provides a `djcodemod` command line tool with 2 main supported workflows:

- Prepare future upgrades by modifying code which is deprecated in a given version using the `deprecated-in` option
- Fix previous deprecated code which is removed in a given version using the `removed-in` option

## Workflows

### Deprecations

Let's say you just updated to Django 3.0, and suddenly you're flooded with deprecations warning on your CI (you have warning enabled on CI, right?).

You want to resolve them to avoid missing another important warning. You can do so by running the following command from the root of your repo:

```bash
djcodemod run --deprecated-in 3.0 .
```

### Removals

This is more a just in time operation, assuming you haven't kept up to date with deprecation warnings, and right before upgrading to a given version (let's assume Django 4.0). In this case, you should be running:

```bash
djcodemod run --removed-in 4.0 .
```

### Mix and match

Both `--deprecated-in` and `--removed-in` can be passed at once, and both accept multiple repetitions.

## Next steps

In either case, the tool will take a few minutes and apply a set of modifications to your code to fix deprecated or removed usages of Django. This should be much faster than doing it manually and much robust than a simple find & replace.

For the list of possible codemodders, you may use the `list` subcommand or check {ref}`the next section <list_of_codemodders>`.

```bash
> djcodemod list
┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Codemodder          ┃ Deprecated in ┃ Removed in ┃ Description                                                ┃
┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ OnDeleteTransformer │           1.9 │        2.0 │ Add the on_delete=CASCADE to ForeignKey and OneToOneField. │
│ ...                 │           ... │        ... │                                                            │
└─────────────────────┴───────────────┴────────────┴────────────────────────────────────────────────────────────┘
```

branch_name: refs/heads/main


text:
# Streetwise App

Mobile web application for the Streetwise project. For background information, please visit https://streetwise.space

![Vue Logo](/docs/vue-logo.png "Vue Logo") ![Flask Logo](/docs/flask-logo.png "Flask Logo")

This project uses Flask & Flask-RestPlus to create a REST-style API, accessed through Vue.js to handle the frontend and asset pipeline. Data from the Python server to the Vue application is passed by making Ajax requests.

- The API is served using a Flask blueprint at `/api/` using Flask RestPlus class-based resource routing.
- A Flask view is used to serve the `index.html` as an entry point into the Vue app at the endpoint `/`.
- Additional endpoints currently include: `/tour` `/wise` `/complete`

The easiest way to deploy this project is currently using this button (see Production details below):

[![Deploy on Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/streetwise/streetwise-app)

## History

- **0.2** 6.5.2020: Patch release
- **0.1** 29.4.2020: Initial release

### Components

* [Flask](https://flask.palletsprojects.com/), a [Python](https://python.org) web framework
* [Flask-RestPlus](https://flask-restplus.readthedocs.io/en/stable/) API layer
* [SQLAlchemy](https://docs.sqlalchemy.org/) data persistence
* [PyTest](https://pytest.org) test suite
* [Vue.js v2](https://vuejs.org/v2/guide/) front-end framework
* [vue-cli](https://github.com/vuejs/vue-cli/blob/dev/docs/README.md), [Vuex](https://vuex.vuejs.org/), [Router](https://router.vuejs.org/)
* [Axios](https://github.com/axios/axios/) for backend communication with [Vue Filters](https://vuejs.org/v2/guide/filters.html)
* [Gunicorn](https://gunicorn.org/) web server support
* [Heroku](https://heroku.com) deployment support

### Project structure

| Location                |  Content                             |
|-------------------------|--------------------------------------|
| `/streetwise`           | Main application                     |
| `/streetwise/api`       | Flask REST API (`/api`)              |
| `/streetwise/client.py` | Flask Client (`/`)                   |
| `/src`                  | Vue App .                            |
| `/src/main.js`          | JS Application Entry Point           |
| `/public/index.html`    | Html Application Entry Point (`/`)   |
| `/public/static`        | Static Assets                        |
| `/dist/`                | Bundled Assets Output (`yarn build`) |

## Installation

First, clone this repository and make sure to set up the following dependencies:

- [X] [Python 3](https://python.org)
- [X] [Poetry](https://python-poetry.org/docs/)
- [X] [Yarn](https://yarnpkg.com/en/docs/install)
- [X] [Vue CLI 3](https://cli.vuejs.org/guide/installation.html) (optional)
- [X] [Heroku CLI](https://devcenter.heroku.com/articles/heroku-cli) (optional)

Setup a virtual environment, install dependencies, and activate it:

```
$ poetry install
$ poetry shell
```

Create a file called `.flaskenv` in the root folder and add development settings:

```
# Production Enviroment should be set to 'production'
FLASK_ENV = "development"
FLASK_APP = "streetwise"

# Uncomment this to debug:
FLASK_DEBUG = 1
```

Prepare your database using the Flask Migrate upgrade command:

`flask db upgrade`

Import the image files, defaulting from the `ch_data.csv` file in the `data` folder:

`./manage.py images`

### Dependency management

We are using poetry (and GitHub bots) to keep this project up to date. To check if you have the latest versions of upstream libraries, run:

`poetry update`

Heroku's buildpack currently does not support loading Python dependencies from poetry automatically. [We're working on it](https://github.com/heroku/heroku-buildpack-python/issues/796#issuecomment-611198469) ... in the meantime, please remember to run this command after upgrading dependencies:

`poetry export -f requirements.txt > requirements.txt`

### Frontend setup

Install JS dependencies:

```
$ yarn
```

Run the test suite to make sure we're up to scratch (do it at this point, since it will expect frontend set up to be complete):

```
$ pytest
```

Start the Webpack dev server:

```
$ yarn serve
```

The template uses vue-cli 3 and assumes Vue Cli & Webpack will manage front-end resources and assets, so it does overwrite template delimiter. The Vue instance is preconfigured with Filters, Vue-Router, Vuex; each of these can easilly removed if they are not desired.

Start the development server (in a separate tab from Webpack):

```
$ flask run
```

- The Vue application will be served from http://localhost:8080
- The API and static files will be served from http://localhost:5000

### Notes

The dual dev-server setup allows you to take advantage of Webpack's development server with hot module replacement.

Proxy config in `vue.config.js` is used to route the requests back to Flask's API on port 5000.

If you would rather run a single dev server, you can run Flask's development server only on `:5000`, but you have to build build the Vue app first, and the page will not reload on changes:

```
$ yarn build
$ flask run
```

See additional deploy tasks with:

`python manage.py`

## Production

[![Deploy on Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/streetwise/streetwise-app)

This template is configured to work with Heroku + Gunicorn and is pre-configured to have Heroku build the application before releasing it. The command to test this locally is:

`gunicorn manage:app`

Or using Heroku's cli:

`heroku local`

Heroku's nodejs buildpack will handle install for all the dependencies from the `packages.json` file.
It will then trigger the `postinstall` command which calls `yarn build`.
This will create the bundled `dist` folder which will be served by whitenoise.

For a good introduction to production Flask apps, see [freecodecamp article by Greg Obinna](https://www.freecodecamp.org/news/structuring-a-flask-restplus-web-service-for-production-builds-c2ec676de563/).

## Acknowledgements

This project was started with parts of [smartuse/platform](https://github.com/smartuse/platform) and [gtalarico/flask-vuejs-template](https://github.com/gtalarico/flask-vuejs-template).

repository: loleg/streetwise-app

repo_name: loleg/streetwise-app


text:
---
layout: default
---

# 1997-11-25 - "Good job NANAE.  (was: Furor over Spam)

## Header Data

From: lcs Mixmaster Remailer<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: e4062ab4cef37b0ffe57bbb1433b1d665ff660dfdc2bf70425ec6b26385343f0

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-11-25 03:13:49 UTC

Raw Date: Tue, 25 Nov 1997 11:13:49 +0800

## Raw message

```
{% raw  %}From: lcs Mixmaster Remailer<EMAIL_ADDRESS>Date: Tue, 25 Nov 1997 11:13:49 +0800
To<EMAIL_ADDRESS>Subject: "Good job NANAE.    The unworthy "databasix goons"
                                                          ^^^^^^^^^^^^^^^^^
> were concerned just about this sort of thing occuring.

Isn't it amazing how they can "predict" thing like that?

> I hope that
> LOA was running some sort of caller ID, or supeonas the phone records
> of those calls who step across the line and made threats in their 4am
> phone calls.  Can't wait to see how this story sways the congresscritters
> when Sanford tries to spin this incident his was in the anti-spam legislation
> hearings.

Maybe you ought to give (or sell cheaply) your fellow "databasix goon" Gary
Burnore the clue that if he's going to call an alleged "spammer" on the phone
at 2 AM and ream him about a Usenet post, that he shouldn't brag about it
publicly.

And yet he did exactly that.  Would it be any wonder if people were to
start suspecting that he might have done the same thing again?

Now go subpoena those phone records.  You might want to concentrate on calls
made from the Raleigh-Durham, NC area.  If you're alluding to the fact that
Ron Guilmette may have been responsible, since the disinformation team at
DataBasix has accused him practically everything else, you have about as
much chance of proving that as O.J. Simpson does of "finding the real
killers".

> Good job NANAE.

One could conceivably substitute "DataBasix" for "NANAE" in that flame.

--

{% endraw %}
```

## Thread

+ Return to [November 1997](/archive/1997/11)

+ Return to "[lcs Mixmaster Remailer <mix@anon.lcs.mit.edu>](/authors/lcs_mixmaster_remailer_mix_at_anon_lcs_mit_edu_)"

+ _Unknown thread root_
  + 1997-11-25 (Tue, 25 Nov 1997 11:13:49 +0800) - "Good job NANAE.  (was: Furor over Spam) - _lcs Mixmaster Remailer<EMAIL_ADDRESS>


text:
# HyLFM-Net

## Requirements
- [CUDA-enabled GPU](https://developer.nvidia.com/cuda-gpus#compute)
- Linux OS (tested on CentOs Linux 7 (Core))
- [[mini]conda](https://docs.conda.io/en/latest/miniconda.html#linux-installers) (tested with miniconda 4.8.4)

## Installation
##### Clone repository
Clone and navigate to this repository
```
git clone git@github.com:kreshuklab/hylfm-net.git
cd hylfm-net
```

##### Install hylfm conda environment
```
conda env create -f environment.yml
```
##### Install time
The install time greatly depends on download speed (several hundred MB).

🕐 Without download (or very fast download), the [installation](#install-hylfm-conda-environment) takes around **9 min**.

## Demo
##### Activate hylfm conda environment
```
conda activate hylfm
```

##### Choose a CUDA device
When running hylfm ([train](#train-hylfm-net-on-beads) or [test](#test-hylfm-net-on-beads)) a CUDA device will be used. Run `nvidia-smi` to see available CUDA devices on your machine. If more than one CUDA device is available you need to specify which one to use either bei setting the 'CUDA_VISIBLE_DEVICES' environment variable or by command line argument `--cuda`:
```
python -m hylfm --cuda <cuda device, e.g. 0> ...
```

#### Train HyLFM-Net on beads
```
python -m hylfm configs/train/beads/z_out51/small_f8.yml
```
🕐 Excluding download time, this training configuration runs for approximately **1,5 days** (on a GTX 2080 Ti).

#### Test HyLFM-Net on beads
Download (to hylfm-net/download).
```
python -m hylfm configs/test/beads/z_out51/small_f8.yml --checkpoint small_beads_demo
```
🕐 Excluding download time, this test configuration runs for approximately **6,5 min** in total with 12 s per sample (on a GTX 2080 Ti). Most time is spend on computing metrics specified in `configs/metrics/beads.yml`.

##### Monitoring with TensorBoard
With default settings and in the [hylfm repository directory](#clone-repository), run
```
$ tensorboard --logdir=logs
```
which will yield an output like:
```
TensorBoard 1.15.0 at <address>:<port> (Press CTRL+C to quit)
```
With the TensorBoard running, open `<address>:<port>` in your browser to see logged scalars (screenshot from [training](#train-hylfm-net-on-beads)):

![tensorboard screenshot](images/tensorboard_scalars.png "Tensorboard Scalars in training")

Switch to `<address>:<port>/#images` for 2d (and max projections of 3d) tensors and plots (screenshot from [testing](#test-hylfm-net-on-beads)):

![tensorboard screenshot](images/tensorboard_images.png "Tensorboard Images of test run")

## On Your Data
- Write a `get_tensor_info` function in `hylfm/datasets/local/<your dataset group>.py` analogously to `hylfm/datasets/local/example.py`.
- Write a config yaml file in `configs` analogously to `configs/train/beads/z_out51/small_f8.yml`.
    - Use tensors from \<your dataset group\>:

        in demo `small_f8.yml`:
        ```yaml
        - tensors: {lf: beads.small_0, ls_reg: beads.small_0}
        ```

        in your `configs/**/<your config>.yml`:
        ```yaml
        - tensors: {<name>: local.<your dataset group>.<tag>, <other name>: local.<your dataset group>.<tag>}
        ```

- Train or test HyLFM-Net as described in [Demo](#demo).

## HyLFM config yaml
```yaml
toolbox:                             # defines yaml anchors for convenience (is ignored by hylfm setup)
  eval_batch_size: &eval_batch_size 1  # example for yaml placeholders
  <key>: <file name.yml>  # any subconfig part can be substituted by a yml file in configs/<key>/<file name.yml>

model:                   # model setup
  name: <str>              # model name as specified in hyflm.models
  kwargs: {...}            # model key word arguments
  checkpoint: <str>        # path to hylfm checkpoint to load instead of random initialization
  partial_weights: <bool>  # if true ignore additionl/missing tensors in model checkpoint with different architecture
  precision: <float|half>  # model precision

stages:  # list of stages, each stage may be a training or a test stage, and will be run consecutively
  - train:  # stage name
      optimizer:         # stages with 'optimizer' are training stages
        name: <str>      # optimizer class as specified in hylfm.optimizers
        kwargs: {...}

      max_epochs: <int>  # stop after max epochs even if validation score is still improving
      metrics: [...]     # metrics to evaluate (and log according to 'log')
      log:               # loggers as specified in hylfm.loggers
        TqdmLogger: {}                          # show tqdm progress bar
        TensorBoardLogger:                      # log to TensorBoard event file
          scalars_every: {value: <int>, unit: <epoch|iteration>}  #  how often to log scalar metrics and loss
          tensors_every: {value: <int>, unit: <epoch|iteration>}  #  how often to log below specified tensors and plots
          tensor_names: [<str>, ...]            # names of tensors to be logged as 2d (max projection) images
        FileLogger:                             # individual output files
          scalars_every: {value: <int>, unit: <epoch|iteration>}
          tensors_every: {value: <int>, unit: <epoch|iteration>}
          tensor_names: [<str>, ...]            # names of tensors to be logged as .tif files

      criterion:                  # criterion to optimize ('loss')
        name: <str>                 # `LossOnTensors` child class specified in hylfm.losses
        kwargs: {...}               # key word arguments
        tensor_names: {...}         # tensor name mapping

      sampler:                    # data sampling strategy
        base: <str>               # `torch.utils.data.sampler.Sampler` child class in torch.utils.data
        drop_last: <bool>           # drop last samples if less samples than 'batch_size' remain

      batch_preprocessing: [...]  # List of `Transform` child classes as specified in hylfm.transformations with kwargs
      batch_preprocessing_in_step: [...]  # like 'batch_preprocessing', but in the iteration step (on GPU)
      batch_postprocessing: [...]  # like 'batch_preprocessing', but after `model.forward()`

      data:
        - batch_size: <int>
          sample_preprocessing: [...]  # like 'batch_preprocessing', but before batch assembly on single sample
          datasets:                    # list of datasets=named tensors
            - tensors: {<tensor_name>: <str>, ...}  # named tensors, each resolved by `hylfm.datasets.get_tensor_info()`
              [sample_transformations: [...]]       # overwrites 'sample_preprocessing' for this dataset (optional)
              # subselect indices as List[int], int, or string resolved by `hylfm.setup._utils.indice_string_to_list()`
              indices: null                         # null = "all indices"

      validate:            # validation stage of this training stage
        ...                  # a validation stage is an evaluation stage with the following additional keys:
        score_metric: <str>  # metric name (that has to exist in this stage's 'metrics') to use as validation score
        period: {value: <int>, unit: <epoch|iteration>}  # how often to validate wrt to parent training stage
        patience: <int>      # stop after not improvement of 'score_metric' for 'patience' validations

  - test:  # stage name of an evaluation stage (no 'optimizer' defined)
      # the following fields are described above in 'train':
      metrics:  [...]
      log: {...}
      batch_preprocessing: [...]
      batch_preprocessing_in_step: [...]
      batch_postprocessing: [...]
      data: [...]
```

## Settings
To overwrite default settings, like the number of worker threads per pytorch Dataloader, adapt `hylfm/_settings/local.py` (copy from `hylfm/_settings/local.template.py`)

repository: AsajuHuishi/hylfm-net

repo_name: AsajuHuishi/hylfm-net


text:
---
published: true
position: 2
title: Recreational Rhythmic Gymnastics Courses
---
Please find all our ***Recreational courses*** below:

* *RG Baby group* (4 to 6 years old)
* *RG recreational* (6 to 12 years old)

Our recreational gymnastics programme is designed to engage children age 4 and over in gymnastics in a fun, friendly and developmental way.

The aspiration is to develop your child's physical literacy through gymnastics. During our training children will develop their confidence and motivation for sport and physical activity, as well as their physical movement skills, coordination, flexibility, strength, stamina and acrobatics. Whether they choose to continue with rhythmic gymnastics or will decide to pursue another sport, their experience during the programme will provide them with an excellent basis for progression into an active and healthy lifestyle.

*Who is this programme for?*

Everybody who wishes to participate, no matter the age or level of gymnastic experience.

We will teach the fundamentals of rhythmic gymnastics and ensure that children develop confidence in using gymnastics hand-held apparatus safely before moving to more challenging exercises.

Find our Timetable ***[here](https://www.rhythmicexcellence.london/timetable)***.

![]()

![](/assets/dan_3098.jpg)

![]()

![]()

Picture by [](https://www.instagram.com/gbswimstars_gbdancestars/?hl=en)[Dan Pickard](http://danpickard.com/)

gha_language: JavaScript


text:
---
layout: page-fullwidth
title: "QSGW Tutorial: Optics and resolved DOS in Fe"
subheadline: ""
show_meta: false
teaser: ""
permalink: "/tutorial/gw/fe_optics/"
sidebar: "left"
header: no
---

### _Purpose_
{:.no_toc}
_____________________________________________________________

This tutorial shows how to use apply the optics package extract information about
electronic properties of Fe. It builds on the [QSGW Tutorial for Fe](/tutorial/gw/qsgw_fe/).

### _Table of Contents_
{:.no_toc}
*  Auto generated table of contents
{:toc}
_____________________________________________________________

### _Preliminaries_
_____________________________________________________________

You should first carry out the LDA self-consistency steps in the [QSGW Tutorial for Fe](/tutorial/gw/qsgw_fe/).
This tutorial is written assuming you stopped at the LDA level (step 1).  However the tutorial equally applies
if you want the same results at the QSGW level (step 2).

To view the postscript file, this document assumes you are using the apple-style **open**{: style="color: blue"} command.

### _Command summary_
[//]: (/tutorial/gw/qsgw_fe/#command-summary)
________________________________________________________________________________________________

<button type="button" class="button tiny radius">Commands - Click to show.</button>

{::nomarkdown}
{:/}

LDA self-consistency (starting from  _init.fe_{: style="color: green"})

~~~
nano init.fe
blm --nit=20 --nk=16 --gmax=7.9 --mag --nkgw=8 --gw fe
cp actrl.fe ctrl.fe
lmfa fe
cat basp0.fe | sed -e 's/\(Fe.*\)/\1 PZ=0 0 4.5'/ > basp.fe
lmf fe > out.lmf
~~~

Edit the ctrl file to add **BZ** and **OPTICS** tags.

    nano ctrl.fe

Total DOS and integrated DOS

~~~
lmf -vnkabc=16 fe --quit=band --dos:rdm
cp dos.fe tdos.fe
lmf -vnkabc=16 fe --quit=band --dos:rdm:idos
~~~

Plot the total DOS and integrated DOS

~~~
fplot -lt 1,col=1,0,0 -colsy 2 tdos.fe -lt 1,col=0,1,0 -colsy 3 tdos.fe
open fplot.ps
fplot -frme:xor=-0.000599:yab=8 0,1,0,1 -lt 1,col=1,0,0 -ord x2+x3 dos.fe
open fplot.ps
~~~

Identify the t2g and eg orbitals

    lmf fe --pr60 --quit=ham

Make the Mulliken t2g and eg majority spin DOS

~~~
lmf fe -vlteto=3 -voptmod=-5 -vnk=16 --quit=band --jdosw=5,6,8,21,22,24,26,27,29 --jdosw2=7,9,23,25,28,30
~~~

Compare resolved to total DOS

~~~
fplot -lt 1,col=0,0,0  jdos.fe -lt 1,col=.6,.6,.6 -ord x3+x4 jdos.fe -lt 2,col=1,0,0 -ord x3 jdos.fe -lt 2,col=0,1,0 -ord x4 jdos.fe
~~~

Further resolve the DOS by _k_:

~~~
lmf fe -vlteto=3 -voptmod=-5 -vnk=16 -vlpart=12 --quit=band --jdosw=5,6,8,21,22,24,26,27,29 --jdosw2=7,9,23,25,28,30
~~~

{::nomarkdown}
{:/}

### _Introduction_

This tutorial is intended to show various ways in which DOS can be decomposed.

### 1. _Self-consistent_ LDA _calculation for Fe_

Do step 1 of the [QSGW Tutorial for Fe](/tutorial/gw/qsgw_fe/#self-consistent-lda-calculation-for-fe).
To follow this tutorial at the QSGW level, also complete step 2.

### 2. _Setup for Optics_

This optics tutorial requires some additional tags to the input file.
Append the following lines to _ctrl.fe_{: style="color: green"}.

~~~
BZ      NPTS=1001 DOS=-.7 .8 SAVDOS=T
% const optmod=0 lteto=3 lpart=0
% ifdef (optmod==-5|optmod==-6)
OPTICS  MODE={optmod} NPTS=1001 WINDOW=-.7 .8 LTET={lteto}
% else
OPTICS  MODE={optmod} NPTS=301 WINDOW=0 1 LTET={lteto}
%endif
        PART={lpart}
~~~

The reasons for these extra tags will become clear in the tutorial.

### 3. _Total Number and Density of States_

Total DOS are generated automatically when **BZ\_SAVDOS=T**.  With **BZ** added
to the ctrl file, you can generate it immediately.

The following generates the total DOS, saving it into file _tdos.fe_{: style="color: green"}:

    $ lmf -vnkabc=16 fe --quit=band --dos:rdm
    $ cp dos.fe tdos.fe

and the following generates the number-of states (NOS), or integrated DOS:

    $ lmf -vnkabc=16 fe --quit=band --dos:rdm:idos

_Notes:_{: style="color: red"}

+ the Fermi level should come out to **-0.000599** Ry.
+ At the Fermi level the total number of electrons should be 8.
+ the **:rdm** tag is not necessary (DOS will be written wether the entire **\-\-dos** switch is present),
  but it causes **lmf**{: style="color: blue"} to write the file in
  an easy to read [Questaal format](/docs/input/data_format/#standard-data-formats-for-2d-arrays) for 2D arrays.
+ The majority and minority DOS are roughly similar, but spin split by slightly
  less than 0.2 Ry, or about 2.2 eV, as noted in the
  [QSGW tutorial](/tutorial/gw/gw_self_energy/#compare-interacting-and-independent-particle-density-of-states-in-fe).

Click here to make or view figures of the DOS and NOS.

{::nomarkdown}
{:/}

The following uses the [**fplot**{: style="color: blue"}](/docs/misc/fplot/) utility to make postscript files.

For the DOS:

    $ fplot -lt 1,col=1,0,0 -colsy 2 tdos.fe -lt 1,col=0,1,0 -colsy 3 tdos.fe
    $ open fplot.ps

For the combined spin↑ + spin↓ NOS:

    $ fplot -frme:xor=-0.000599:yab=8 0,1,0,1 -lt 1,col=1,0,0 -ord x2+x3 dos.fe
    $ open fplot.ps

The figures should look like like those shown below.  In the left figure the vertical
axis is aligned with the Fermi level, and the horizontal axis lies at 8 electrons.
You can confirm that the integrated DOS crosses 8 at EF.

In the right figure DOS are resolved by spin (red for majority spin, green for minority spin).

![Fe total NOS and DOS](/assets/img/Fe-DOS.svg)
{::nomarkdown}
{:/}

See [Table of Contents](/tutorial/lmf/lmf_bi2te3_tutorial/#table-of-contents)

### 4. _Resolve DOS into t2g and eg symmetry_
[//]: (/tutorial/gw/fe_optics/#resolve-dos-into-itisub2gsub-and-ieisubgsub-symmetry)

In Fe the d orbitals are of primary interest.  Spherical
harmonics for _l_=2 split under cubic symmetry into
t2g and eg symmetry.  In
this section we resolve the spin-1 DOS into those symmetries.

Optics [**MODE=-5**](tutorial/application/optics/#further-optics-modes)
generates the spin 1 DOS.  Step 3 already supplied this information,
but the optics **MODE=-5** works in concert with the
**-\-jdos** switch which enables you to project the DOS into orbitals
of your choosing, using a Mulliken analysis.  **-\-jdos** offers a
lot of flexibility, but a bit of extra work is needed to identify
which orbitals in the LMTO basis set are associated with
t2g and eg symmetry.

Run **lmf**{: style="color: blue"} with a high verbosity, stopping early:

    lmf fe --pr60 --quit=ham

You should see this table:

~~~
 Orbital positions in hamiltonian, resolved by l:
 Site  Spec  Total    By l ...
   1   Fe    1:30   1:1(s)   2:4(p)   5:9(d)   10:16(f) 17:17(s) 18:20(p) 21:25(d) 26:30(d)
~~~

It tells you that channels 5:9 (first kappa), 21:25 (second kappa) and 26:30 (local orbitals)
are associated with the Fe _d_ orbitals.  In each group of 5 orbitals, three three of them
are of t2g character and two of eg character.
The t2g are the _xy_, _xz_, and _yz_, orbitals; the eg
have 3_z_2−1 and x2−y2 character.
At the Γ point in the Brillouin zone, the Fe _d_ states are three-fold and two-fold degenerate,
according to their character.

To know which of the 5 orbitals belong to each class, consult the
[spherical harmonics](/docs/numerics/spherical_harmonics/) page.  The
table indicates that the first, second, and fourth _l_=2 orbitals are
t2g, and orbitals 3 and 5 are the
eg.  Since the _d_ orbitals appear three times in the basis,
there are 9 and 6 t2g and
eg orbitals, respectively.

Comparing to the table above, channels 5,6,8, 21,22,24, and 26,27,29 can be identified as
t2g orbitals, and channels 7,9, 23,25, and 28,30 the
eg.

Run **lmf**{: style="color: blue"} as follows:

~~~
$ lmf fe -vlteto=3 -voptmod=-5 -vnk=16 --quit=band --jdosw=5,6,8,21,22,24,26,27,29 --jdosw2=7,9,23,25,28,30
~~~

_Notes_{: style="color: red"}:

+ You can project onto one (**-\-jdosw**) or two (**-\-jdosw** and **-\-jdosw2**) combinations of orbitals,
  using Mulliken projection.
+ This special Mulliken projected DOS **MODE=-5** requires the enhanced tetrahedron integrator (**LTET=3**).
+ You can of course use more or fewer _k_ points.
+ A file _jdos.fe_{: style="color: green"} should be written to disk with total and the two Mulliken-projected DOS in the format
  described [here](/docs/input/data_format/#file-jdos).
+ **--quit=band** avoids overwriting the density restart file.
+ **lmf**{: style="color: blue"} prints out messages like this:

  ~~~
   optics: restrict transitions to : occ=(1,4) unocc=(2,6)
  ~~~

  This message is not relevant for the DOS.

Click here to make or view figures that show how the DOS is partitioned into components.

{::nomarkdown}
{:/}

As a sanity check, the total DOS in _jdos.fe_{: style="color: green"} should match _tdos.fe_{: style="color: green"}

    $ fplot tdos.fe -lt 2,col=1,0,0  jdos.fe

The black and red dashed lines should lie on top of one another.

Make a Figure drawing:

1. the total spin&uar; DOS;
2. the sum of t2g and eg DOS in light grey;
3. the t2g DOS in red;
4. the eg DOS in green

    $ fplot -lt 1,col=0,0,0  jdos.fe -lt 1,col=.7,.7,.7 -ord x3+x4 jdos.fe -lt 2,col=1,0,0 -ord x3 jdos.fe -lt 2,col=0,1,0 -ord x4 jdos.fe

the figure should look similar to this:

![Fe total NOS and DOS](/assets/img/Fe-pDOS.svg)
{::nomarkdown}
{:/}

In the interval (−0.35,0) Ry, the grey almost superimposes on the black.  This shows that almost all the
DOS in that interval is of Fe _d_ character.  Below −0.4 and above 0, a difference in the two appears: the _d_ bandwidth has been exhausted and
what remains is mostly of Fe _s_ character.  You can also see that the
t2g is a somewhat wider than the eg.

### 5. _Resolve DOS by_ k
[//]: (/tutorial/gw/fe_optics/#resolve-dos-by-k)

In the previous section the DOS were resolved into t2g and eg character.
Here it is further resolved by k.  To accomplish this use the **OPTICS_PART** tag.
To see its function, look at the [web documentation](/docs/input/inputfile/#optics)
or just do

    lmf --input | grep -A 10 OPTICS_PART

Use **OPTICS_PART=2** to resolve by _k_; we will use
**OPTICS_PART=12** to write the output to a binary file _poptb.fe_{:
style="color: green"}, since resolving DOS into 145 distinct _k_
channels and three kinds of DOS creates a large file.  Column 1 is the energy.
The DOS channels are ordered as

|    -    |   -      | :---:                 | :---:
|         |  total   | t2g | eg
 columns  |  2:146   | 147:291               | 292:436

Repeat the previous calculation adding a variable **-vlpart=12**:

~~~
$ lmf fe -vlteto=3 -voptmod=-5 -vlpart=12 -vnk=16 --quit=band --jdosw=5,6,8,21,22,24,26,27,29 --jdosw2=7,9,23,25,28,30
~~~

This should create a binary file _poptb.fe_{: style="color: green"}.
To confirm that the _k_ resolved DOS sum to the total DOS, do:

~~~
mc -br poptb.fe -split a 1,nr+1 1,2,'(nc-1)/3'+2,'(nc-1)/3*2'+2,'(nc-1)/3*3'+2 a11 a12 -csum -ccat jdos.fe -coll 1,2 -- -px:5
mc -br poptb.fe -split a 1,nr+1 1,2,'(nc-1)/3'+2,'(nc-1)/3*2'+2,'(nc-1)/3*3'+2 a11 a13 -csum -ccat jdos.fe -coll 1,3 -- -px:5
mc -br poptb.fe -split a 1,nr+1 1,2,'(nc-1)/3'+2,'(nc-1)/3*2'+2,'(nc-1)/3*3'+2 a11 a14 -csum -ccat jdos.fe -coll 1,4 -- -px:5
~~~

#### 5.1 _DOS Heat Maps_
[//]: (/tutorial/gw/fe_optics/#dos-heat-maps)

The _k_ resolved DOS can be used to make a "heat map" of the Fermi surface, that is a tabulation of the
DOS for all _k_ points in the Brillouin Zone for a specific energy.

This is accomplished with optics editor, which you invoke with **-\---popted** :

    $ lmf fe --rs=1,0 -vlteto=3 -voptmod=-5 -vlpart=12 -vnk=16 --popted

You will be prompted for an instruction:

     Option :

Typing  ? \<enter\>  will give you a menu of options.

As with many of the Questaal editors you can string a sequence of instructions on
the command line: the editor will treat them as though you entered them
interactively.  Separate instructions are delimited by the character immediately following
**-\-popted**.  In the present case, try

    $ lmf fe --rs=1,0 -vlteto=3 -voptmod=-5 -vlpart=12 -vnk=16 '--popted:readb:npol 3:kshowe -0.01 1 sort ds,q3:kmape 0.05 1:saveka:q'

**:**  was used as the delimiter.  These instructions do the following:

+ **:readb**  reads binary file _poptb.ext_{: style="color: green"}
+ **:npol 3**  tells the editor that the file has three "polarizations."
    In this case "polarizations" refer to total DOS, and first and second Mulliken DOS.
+ **:kshowe -0.01 1 sort ds,q3**  causes the editor to :
    + print out the DOS at ω=−0.01 Ry
    + print out the DOS for the first "polarization" (total DOS in this case).
    + sort the list by increasing length, and for two vectors of the same length
      by the third component of **k**.  Results are printed to standard output.
+ **:kmape 0.05 1**  causes the editor to :
    + Map DOS(_ω_=0.05 Ry) to each point in the full BZ
    + Maps the first "polarization" (total DOS in this case)
    + Results are kept in an internal array
+ **:saveka**  saves the internal array generated by **kmape** to an ASCII file, _pka.ext_{: style="color: green"}.
+ **:q**  quits the editor.

### _Additional exercises_
[//]: (/tutorial/gw/qsgw_fe/#additional-exercises)

{::comment}

First figure
fplot -frme:xor=-0.000599:yab=8 -.3,-.3+.6,1.1,1.6 -lt 1,col=1,0,0 -ord x2+x3 dos.fe -frme .5,1,1.1,1.6 -frmt th=3,1,1 -lt 1,col=1,0,0 -colsy 2 tdos.fe -lt 1,col=0,1,0 -colsy 3 tdos.fe

{:/comment}


text:
# Cloudmesh Compute Project for  Google Cloud Platform (GCP)

Harshawardhan  Pandit, [fa19-516-165](https://github.com/cloudmesh-community/fa19-516-169)

## Abstract

Cloudmesh enables you to access multi-cloud environments such as AWS, Azure, Google, and OpenStack Cloudsvery easily.
The purpose of this project is to implement identified features for the **Google Cloud Platform**.  The two cloud interface will be implemented using:
1. Google Cloud Platform
2. AWS

Selected APIs will be
added for the following features. :

1. Images
2. Flavors
3. Virtual machines
4. Keys
4. Security groups

## Architecture

![Architecture](https://github.com/cloudmesh-community/fa19-516-169/blob/master/project/images/Architecture.png)

## APIs

Typical List of APIS to be developed may include in the follow categories:

**VM**
1. start
2. reboot
3. stop
4. resume
5. suspend
6. info
7. status
8. list
9. create
10. create_vm_parameters

**Flavors**

1. flavors
2. flavor

**image**

1. image

**keys**
1. keys
2. key_uplo
3. key_delete

**Security groups**
1. ssh
2. get_resource_group
3. set_server_metadata
4. delete_server_metadata
5. list_secgroups
6. list_secgroup_rules
7. add_secgroup
8. add_secgroup_rule
9. remove_secgroup
10. upoad_secgroup
11. add_rules_to_secgroup
12. remove_rules_from_secgroup

## Technologies

Python 3.7.4
REST API
Cloudmesh

## Progress:
1.  Week of 22nd Sep:
    Project Definition and approval

2.  Week of 7th Oct:
    Rest API ramp up

3.  Week of 14th Oct:
    Cloudmesh Installation on Windows. Solving the laptop issues and finally succeeded in Cloudmesh installation on
    Windows 10 environment.

4.  Week of 21st Oct:

    1.   Study of existing Cloudmesh Compute Project/source code structure.
    2.   Initial Architecture Diagram (In Progress).
    3.   Listing down potential APIs for Cloudmesh Compute GCP Interface.
    4.   Initial study of [Compute Engine API](https://cloud.google.com/compute/docs/reference/rest/v1/) from Google.
    5.   Creation of WBS. Plan.

## Work Breakdown Structure:

This is intended WBS  and schedule. This can change as we proceed as the proposed plan below and will evolve.
1.  Week of 28th Oct : Architecture, Design finalization.

2.  Week of 4th Nov:
    .  API signature definition and scope freeze (This should define how many APIs will be )
    .  Environment creation  & Code Framework Creation (Skeleton, stub and dummy test cases)

4.  Week of 11th Nov:  Selected APIs for  'VM'

5.  Week of 18th Nov:  Selected APIs for 'Image'

6.  Week of 25th Nov:  Selected APIs for 'Security'

7.  Week of 2nd Dec:
    .   Buffer
    .   Documentation completion
    .   Pending PyTest (if any) completion

## Results:

## Benchmark

TBD- Benchmarking will be added as the interfaces are defined

## Testing:

TBD- Pytests will be added to the interfaces, as the APIs are developed.

## References

1. https://cloudmesh.github.io/cloudmesh-manual/projects/project-compute.html
2. https://github.com/cloudmesh/cloudmesh-cloud/tree/master/cloudmesh/compute


text:
---
title: Step 3
subtitle: Modify your Template
date: 2017-10-01T12:00:05.000Z
tag: 0703
guideNumber: 7
image1: img/blog/quick-guide-3.jpg
image2: img/blog/quick-guide-3b.jpg
image3: img/blog/quick-guide-3c.jpg
---

#
#### Image 1: View and Change Data Parameters

Click on a Route Component in the left navigation menu to view the data parameters. Click Simple/Advanced toggle button and choose Advanced setting as shown on image.

#### Image 2: Customize data/time and resolution

The “Advanced” (red box) data parameters settings include detailed parameter settings for almost any date/time bounds and time resolution. Choose a different date by typing (or using the calendar) in Start/End date, and picking a different Start/End time by using Peak selectors. You can also choose weekdays or weekends, resolutions of 5-min, 15-min, hour, day, weekday, month, and year, and Trucks, Passenger Vehicles, and All Vehicles. Lastly, you can download raw data using the data download button.

You can also copy and paste your route as a new layer by clicking the + sign (red arrow) in a route layer. In this new layer you can open advanced tools again and change data parameters to compare it with other time frames (e.g. average of each season vs average of a full year).

#### Image 3: Add more graphs and save it to New Report
 Under + Graph, all graph tools used for the template are listed. Click + Graph button (red arrow) to get Graphs tools window (red box). This will show all available Graphs, grouped by Line Graphs, Bar Graphs, Grid Graphs, Info Graphs, Incidents Graphs, and Maps. You can add graph tools into the current template by clicking each graph name and you can also delete graphs by clicking "x" on top right of each graph.  Lastly, you can save your customized version of the template as a new report by clicking "Save" button (red arrow) and put a name and a description of your report for you to find it easily from the report section of NPMRDS' main menu later on.

 If you want to learn more in-depth about the Data Parameter setting, click [**here**](https://npmrds.availabs.org/g/guide/data-params/) to see "Route Component Data Parameters Guide."


text:
## Introduction

　　如果你从事游戏、APP的开发或运营相关工作，你可能会为黑产团队或游戏工作室的的恶意登录行为感到困扰。面对上百万甚至更多的账号登录记录，当老板要求你尽快从中筛选出哪些是恶意账号而哪些是普通玩家的账号，对此你是否也会感到力不从心？（尤其是面对那些使用动态IP或动态修改机器码的，它们的账号难以通过IP、机器码等信息进行聚类，只能通过账号名称相似度来判断）

　　作为一个懒人，我写了一个相似度聚类脚本以及一个专门为这个场景设计的相似度算法，自动对账号名称进行聚类分析，仅需一杯茶的时间就能揪出高频账号组（如果数据量只有几万的话可能只需撕开调料包的时间），希望能帮到你。

　　If you are engaged in game or APP development or operation related work, you may be troubled by malicious login behaviors of black production teams or game studios. Faced with millions or more of account login records, when your boss asks you to filter out which are malicious accounts and which are ordinary player accounts as soon as possible, will you feel powerless? (Especially for those who use dynamic IP or dynamically modify the machine code, their accounts are difficult to cluster by IP, machine code and other information, and can only be judged by account name similarity)

　　As a lazy person, I wrote a similarity clustering script and a similarity algorithm specially designed for this scenario, which automatically performs cluster analysis on account names. It only takes a cup of tea to find out high-frequency account groups ( If the amount of data is only tens of thousands, it may only take the time to tear the seasoning package), I hope it can help you.

## Installation
```toml
[dependencies]
account_name_similarity = "0.1.0"
```

### Test Data
　　你可以通过下面的链接获取测试数据:

　　You can get the test data by visiting the link below:

``` link
链接：https://pan.baidu.com/s/1QOB0143xLmq6UsTSS3XjHg
提取码：ef7g
```

###

### Life is short, why not use python
　　一开始我使用python很轻易地实现了这个功能，但当我第一次使用rust后我爱上了这个语言，所以尝试使用rust重写了这个算法，顺便学习这门语言。由于还是个rust菜鸟，所以有些代码可能写得比较丑陋^_^。当然了，运行效率也有了巨大的提升。由于python可以调用rust，所以旧的python代码就不发上来了。

　　At first, I realized this function easily with python, but when I used rust for the first time, I fell in love with this language, so I tried to use rust to rewrite this algorithm and learn this language by the way.  Of course, the operating efficiency has also been greatly improved. Since python can call rust, the old python code will not be posted.
###


text:
# SoilTypesRecognition Dataset

[![Licence Apache2](https://img.shields.io/hexpm/l/plug.svg)](http://www.apache.org/licenses/LICENSE-2.0)

---

Datasets
---
* __soil_types__
* __soil_types_participant__
* __soil_types_position__

Attributes
---
* For each dataset under the __raw__ folder, attributes refers to raw data produced by each axis of the IMU in __[acc_x, acc_y, acc_z, gyr_x, gyr_y, gyr_z, mag_x, mag_y, mag_z]__.
* For each dataset under the __feature__ folder, attributes refers to both time and frequency domain features. To convert the original signal from time domain to its representation in frequency domain, we have used the Fast Fourier Transform (FFT) algorithm.

	* Time domain: Mean for each axis and on all axis; Standard deviation for each axis and on all axis; Skewness for each axis and on all axis; Kurtosis for each axis and on all axis; Zero-Crossing-Rate for each axis and on all axis; Correlation between for all possible axis combinations.

	* Frequency domain: DC Component for each axis; Energy for each axis; Entropy for each axis.

Classes
---
1. soil types in __[cement, gravel, snow, sand]__.
2. soil types for each given participant in __[cement_A, cement_B,..., sand_I]__.
3. soil types for each given position in __[cement_backpack, cement_left_pocket,..., sand_right_pocket]__.

Independencies
---
Seperated datasets are provided for both user and position in order to verify if data are either or both, user-independant or position-independent.

* One dataset per position in __[backpack, left_pocket, left_hand_bag, right_hand_bag, right_pocket]__.
* One dataset per participant in __[A, B, C, D, E, F, G, H, I]__.

Authors
---
This work was achieved by Ph.D. students affiliated to the **[LIARA laboratory](http://liara.uqac.ca/)** at the Uniersité du Québec à Chicoutimi.

* __[Florentin Thullier](florentin.thullier1@uqac.ca)__, LIARA Laboratory, Université du Québec à Chicoutimi, QC, Canada.
* __[Valère Plantevin](valere.plantevin1@uqac.ca)__, LIARA Laboratory, Université du Québec à Chicoutimi, QC, Canada.

Licence
---
Copyright 2018 LIARA Laboratory.

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

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

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

repository: LIARALab/Datasets

repo_name: LIARALab/Datasets


text:
# `polyoligo-kasp`

## Usage

### General usage and available options

```
polyoligo-kasp <INPUT> <OUTPUT> <BLASTDB> <OPTIONS>
```

For a list of all available options and their descriptions, type:

```
polyoligo-kasp -h
```

> Recommendations (when applicable) are given in the option caption. Note that switches, i.e. boolean options that do not need arguments, have defaults set to `False`.

### Example usage
In the following example, KASP primers will be designed with VIC/FAM reporter dyes included and by considering both homologs and mutations within a selected subset population:

```
polyoligo-kasp sample_data/markers.txt out sample_data/blastdb --vcf sample_data/vcf.txt.gz --vcf_include sample_data/vcf_include.txt
```

### Inputs
The software requires three mandatory inputs:

**`<INPUT>`**: A text file containing target markers as a list of [CHR POS NAME REF ALT]. See this [example file](sample_data/markers.txt). Deletions are denoted by `*` and `.` indicates no name . For example `Fvb1-1 10000 . G *` is a valid entry.

**`<OUTPUT>`**: The base name of the output files.

**`<FASTA/BLASTDB>`**: A FASTA file and/or a BLAST database to use as the reference genome. Both file types can be provided by using the same basename. If either is provided, then a conversion will automatically be made to obtain both file types.

Optional files include:

**`--vcf`**: A VCF file to design primers considering mutations (both SNPs and indels).

> Note that a tabix index file, created using the Samtools' [`tabix`](http://www.htslib.org/doc/tabix.html) binary is required. To create it, use the command `tabix -p vcf <VCF>.txt.gz`.

**`--vcf_include/--vcf_exclude`**: List of samples in a text file to include/exclude from the VCF. See this [example file](sample_data/vcf_include.txt).

**`--primer3`**: YAML configuration file for Primer3. All Primer3 arguments can be set here. See this [example file](sample_data/primer3_example.yaml).

### Outputs
Three output files are produced:

**`<OUTPUT>.log`**: A log file which contain details on the number of valid primers found during each search and for each marker.

**`<OUTPUT>.bed`** KASP primers reported in BED format for use with genome browsers. Names are composites of `<primer_id>-<goodness>` (see below).

**`<OUTPUT>.txt`** KASP primers reported as a tab-separated list with the following columns:

|Column|Description|
|---|---|
|`marker`|SNP ID/label|
|`chr`|Chromosome|
|`pos`|Position|
|`ref`|Reference allele|
|`alt`|Alternative allele|
|`start`|Primer start position in the genome|
|`end`|Primer end position in the genome|
|`direction`|Direction of the primer as F/R for forward/reverse, respectively|
|`type`|Primer type as REF/ALT/COM for reference allele/alternative allele/common primer|
|`assay_id`|ID of the assay|
|`seq5_3`|Sequence of the primer in a 5'-3' direction with the reporters|
|`seq_5_3_ambiguous`|Sequence of the primer in a 5'-3' direction with the reporters and ambiguous nucleotides for mutations (no indels)|
|`primer_id`|Unique primer identification for each marker. Intended to ensure same primers are not purchased multiple time.|
|`goodness`|Heuristic goodness score based on multiple criteria. Maximum score is 10|
|`qcode`|Quality code containing warnings about the assay. Characters mean the following:
. =  No warnings
t = Bad TM
O = Off-targets
d = Heterodimerization
m/M = Mutations with allele frequencies >0/>0.1
i/I = Indels larger than 0/50 nucleotides|
|`length`|Primer length|
|`prod_size`|Expected PCR product size|
|`tm`|Predicted primer melting temperature (based on a NN thermodynamic model with SantaLucia et al, 1998 parameters)|
|`gc_content`|Percent GC in the primer sequence|
|`will_dimerize`|True/False, if the primers may form heterodimers|
|`n_offtargets`|Number of possible genome-wide off-target PCR products. If larger than 5, then the number does not represent an exhaustive list.|
|`max_aaf`|Maximum alternative allele frequency across all mutations located in the primer|
|`indels`|Length of any indels located in the target PCR product|
|`offtargets`|Comma-separated list of expected off-target PCR products. If larger than 5, then this list is not exhaustive|
|`mutations`|Comma-separated list of mutations located in the primers and reported as [REF/ALT:AAF]|

### Optional output files
Optionally, a list of all subjects containing alternative alleles can be requested using the flag `--report_alts`, if a VCF file if provided. The list will be reported in `<OUTPUT>_altlist.txt`. Each mutation is listed in a pseudo-FASTA format as `>REFPOSALT`, similar to what is reported in the standard output but without allele frequencies. The first and second lines list all hets and homozygotes, respectively. This file can be used to investigate markers where no primers exempt of mutations exists.

## Credits
This software was inspired by [SNP_Primer_Pipeline](https://github.com/pinbo/SNP_Primer_Pipeline).

repository: MirkoLedda/polyoligo

gha_language: Python

repo_name: MirkoLedda/polyoligo


text:
### [CVE-2013-7341](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-7341)
![](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 cross-site scripting (XSS) vulnerabilities in Flowplayer Flash before 3.2.17, as used in Moodle through 2.3.11, 2.4.x before 2.4.9, 2.5.x before 2.5.5, and 2.6.x before 2.6.2, allow remote attackers to inject arbitrary web script or HTML by (1) providing a crafted playerId or (2) referencing an external domain, a related issue to CVE-2013-7342.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/lukeber4/usn-search

repository: trickest/cve

repo_name: trickest/cve


text:
# openasset-rest-cs
C# library & sample code for using the OpenAsset REST API v1

## Documentation
The documentation for the REST API endpoints used by this library can be found at:
http://help.openasset.com/06_Integration/REST_API

### Sample Usage
The examples below show how to establish connection to OpenAsset and get/send data.

```csharp
// import library directives
using OpenAsset.RestClient;
using OpenAsset.RestClient.Library;
using OpenAsset.RestClient.Library.Noun;
```

#### Establish Connection to OpenAsset
```csharp
string baseURL = "http://localhost";
string password = "password";
string username = "username";

// Establish connection to OpenAsset
Connection conn = Connection.GetConnection(baseURL, username, password);

// Verify credentials
bool isCorrectCredentials = conn.ValidateCredentials();
if (isCorrectCredentials)
{
    Console.WriteLine("Correct Credentials");
}
else
{
    Console.WriteLine("Incorrect Credentials");
}
```

#### Sample Code to Get Nouns
```csharp
// Create a RestOptions object to filter search
RESTOptions<File> options = new RESTOptions<File>();

// Adding filter for rank
options.SetSearchParameter("rank", "5");

// Setting a limit of 10 files
options.Limit = 10;

// Create a List of Files to contain the response of file objects
List<File> fileList = conn.GetObjects<File>(options);

// Iterate over the list and print the filenames of the files
foreach (File fileObj in fileList) {
    Console.WriteLine(fileObj.Filename);
}
```

#### Sample Code to Create a Noun
```csharp
String filename = "test.jpg";
String filepath = "C:\\test.jpg";

// Create a new file object
File fileItem = new File();

// Add file details
fileItem.OriginalFilename = filename;
fileItem.CategoryId = 2;

// Make a POST request by setting the last parameter as TRUE
File responseFile = conn.SendObject<File>(fileItem, filepath, true);

// Get the id of the newly created file
Console.WriteLine(responseFile.Id);
```

#### Sample Code to Update a Noun
```csharp
// Create a new file object
File fileItem = new File();

// Set the id to an existing image in OpenAsset
fileItem.Id = 254;

// Updating its description field
fileItem.Description = "Updated Description!!";

// Make a PUT request by setting the last parameter as FALSE
File responseFile = conn.SendObject<File>(fileItem, false);

// Print the description of the updated file
Console.WriteLine(responseFile.Description);
```

#### Sample Code to Delete a Noun
```csharp
// Create a new file object
File fileItem = new File();

// Set the id to an existing image in OpenAsset
fileItem.Id = 254;

// Send the File object to the DeleteObject method
conn.DeleteObject(noun);

Console.WriteLine("File deleted!");
```

#### Integration of Nouns
You can also integrate individual nouns with each other. For example, the below code integrates an Album noun with the File noun. You can check out the IntegrationTest.cs file inside the TestLibrary for more examples of noun integration.
```csharp
// Establish connection to OpenAsset and validate credentials
Connection conn = Connection.GetConnection("http://<IP_ADDRESS>", "username", "password");
conn.ValidateCredentials();

// Create a new File object and set its id to an existing file in OpenAsset
File fileItem = new File();
fileItem.Id = 209;

// Create a new Album Object
Album albumItem = new Album();

// Set its properties
albumItem.Name = "Test Album";
albumItem.Description = "This is a test album";
albumItem.CompanyAlbum = true;

// Add the file object to this album
albumItem.Files.Add(fileItem);

// Make a POST request to create the album and add the file to it
Album responseAlbum = conn.SendObject<Album>(albumItem, true);

// Print the id of the newly created album
Console.WriteLine("New Album Id: " + responseAlbum.Id);

// Iterate over all the files inside the album and print their ids
List<File> fileList = responseAlbum.Files;
foreach (File file in fileList)
{
    Console.WriteLine(file.Id);
}
```

### Find out more

Please get in contact if you're interested in knowing more

- https://twitter.com/OpenAsset
- http://www.openasset.com

### License

The MIT License (MIT)
Copyright (c) 2013-2015 Axomic Ltd

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

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

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

## Third party libraries:

### Json.NET Library (http://json.codeplex.com/)
####License:

Copyright (c) 2007 James Newton-King

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

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

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

repository: axomic/openasset-rest-cs

gha_language: C#

repo_name: axomic/openasset-rest-cs


text:
kamix - Query k-mers matrices index as BGZF files.
======================================================

``kamix`` leverages the fantastic BGZF library in ``samtools`` to provide random access into
k-mer matrices files that have been compressed with ``bgzip``.

Kamix expect k-mer matrices compressed with bgzip. In this matrice, k-mer must be sorted in lexicographic.

Example :

```
tag	SRR2966453	SRR2966456	SRR2966471	SRR2966474	SRR2966454	SRR2966457	SRR2966472	SRR2966475	SRR2966455	SRR2966458	SRR2966473	SRR2966476
AAAAAATGTTTTGTAAGAAT	3	7	4	0	3	0	0	8	0	5	0	6
AAAAAATGTTTTGTAAGGAC	3	0	0	0	0	0	0	0	0	0	0	0
AAAAAATGTTTTGTAATTGA	5	5	5	7	3	8	4	5	6	0	3	9
AAAAAATGTTTTGTACAAAA	8	6	6	4	5	0	6	6	7	0	6	4
AAAAAATGTTTTGTAGAAAC	0	3	0	0	0	0	0	0	0	0	0	0
AAAAAATGTTTTGTAGAAAT	0	0	6	8	0	0	3	5	0	5	6	0
AAAAAATGTTTTGTAGACAT	6	4	0	6	3	0	0	0	3	0	0	0
```

## Examples

```
# 1. Index the k-mer matrice with bgzipped
bgzip counts-matrix.tsv

# 2. create a kamix index (big.vcf.gz.gbi)
kamix index counts-matrix.tsv.gz

# 3. query a k-mer." << endl;
kamix query counts-matrix.tsv.gz AAAAAAAAAAGGCTAAACAT

# extract the 100 random kmers.
kamix random counts-matrix.tsv.gz 100

# Is the file bgzipped?
kamix check counts-matrix.tsv.gz

# get total number of lines in the file (minus the header).
kamix size counts-matrix.tsv.gz
```

## Create a k-mer matrice with jellyfish and JoinCounts

**Counting and sorting 32-mer with Jellyfish**

```
jellyfish count -m 32 -s 10000 -o sample.jf <(zcat sample.fastq.gz)
jellyfish dump  -c sample.jf | sort -k 1 > counts.tsv
```

Consider using the sort command with `-S {resources.ram}G` and `--parallel {threads}` parameters to speed-up the sorting for large k-mer libraries.

**Join counts from multiple libraries with joinCounts**

Download and install [joinCounts](https://github.com/Transipedia/dekupl-joinCounts), to join counts files generated for each libraries.

```
joinCounts counts1.tsv counts2.tsv > counts-matrix.tsv
```

## Credit

kamix is derived from [grabix](https://github.com/arq5x/grabix) that uses BGZF library.

repository: rchikhi/kamix

repo_name: rchikhi/kamix


text:
![Logo](https://www.creesch.com/dump/img/img_5c370feea94c2.png)

Readable text posts on reddit
========================
readReddit adds a pleasant & clutter free reading mode for reddit text posts and comments.

Reformat text posts from this:
![Before](https://www.creesch.com/dump/img/img_5c37109ddbe6c.png)

Into a nice readable format without any distractions. Like this:

![After](https://www.creesch.com/dump/img/img_5c3710ca05f08.png)

Or if you are more into dark themes:

![After dark](https://www.creesch.com/dump/img/img_5c3710f5dd1c4.png)

Or do the same for all top level comments in subreddits like /r/WritingPrompts.

Activated from a simple floating button. ![Floating button](https://www.creesch.com/dump/img/img_5c3a30f3538b5.png)

# Download

- [Firefox](https://addons.mozilla.org/en-US/firefox/addon/readable-text-posts-on-reddit/)
- [Chrome](https://chrome.google.com/webstore/detail/readable-text-posts-on-re/kpffhggoghnmcbofgjdccdgflkodakkj)

# Features

- Will also go over comments to look for first level comments by the author to include these in the formatted text. Useful for those text posts where the author runs out of space and continues their story in the comments.
- Light and dark mode.
- Choose your own font.
- Adjust the font size.
- Adjust the text width.

# Future:

Some things I might build in the future.

- Custom themes

# Build instructions:

- [Download](https://nodejs.org/en/download/) and install nodeJS (Instructions written when LTS Version: 16.15.0  was the current version )
- From a commandline terminal run `npm install` from the root directory of this repository.
- From a commandline terminal run `npm run build`
- A `build` directory will be created containing the following:
    - `firefox` directory containing the unpackaged extension for firefox
    - `readReddit_vX.X.X_firefox.zip` file containing the packaged extension for firefox.
    - `chrome` directory containing the unpackaged extension for chrome and chromium based browsers.
    - `readReddit_vX.X.X_chrome.zip` file containing the packaged extension for chrome and chromium based browsers.

repository: creesch/readReddit

repo_name: creesch/readReddit


text:
# FreeHit

FreeHit is an ad-free lightweight all-in-one app for all your cricket information.

## Features

It has the following features

Home
* View all the Live , Recent and Upcoming Matches at a glance
* Get News About your favorite team

Matches
* Live Matches - Get all your live match data in a neat simple card.
* Past Matches - Browse all past matches, from upto two years ago!
* Upcoming Matches - Find out all upcoming match information and be prepared to cheer for your home team.

News
* Get all your cricket news in a simple list.

Social - Polls and Twitter
* Polls - Vote for polls varying from your favorite player to which team you think is the greatest of all time.
* Twitter - Check the Twitter feed for tweets from your favorite team.

Stats
* Players - Search for your favorite player and learn everything about their career, from number of 50's to number of wickets taken!
* Teams - Search for a team and find out the current squad, when your team is playing next and all their past matches using Teams.
* Series - Go through all current series and browse all their upcoming , past matches and best performers of the series
* Rankings - Follow the progress of your favorite teams and players !

Select your favorite team (or skip it and select it later from the Settings menu) and get started with FreeHit!

## Screenshots

## Changelog

- Reduced Application size from 3.7 MB to 2.8 MB
- Added links to our open-source Github repository with all our code ( Kindly note, that our API is not open-source at this point of time due to server constrictions)
- New UI for Stats
- New UI for Teams
- New UI for Players
- News animation is now better and butter (smoother , because why not)
- Labels added to Matches (For live matches only)
- New UI for Matches (Changed it to be more simplistic and easy to use, based on user feedback, so let us know if you like it)
- Added search function for matches (Search through past or upcoming matches and obtain a detailed preview!)
- Added About section, we will keep all users posted on upcoming updates and planned progress through this section (Also includes links to potential future projects and contact info, hit us up!)
- General Performance improvements, app should be smoother and shuold consume less memory (Please inform us if any issues are faced)

Note : It's been a while since we have made any changes as we were busy with college, however we are now back on track so leave all your feedback, negative or positive and expect frequent updates


text:
globalsdb-node-mundo
=====================

An experiment replicating MongoDB-esque functionality in GlobalsDB/Cache.

###Storage Structure

    {
        _id: 1,
        test: "val",
        sports: ['baseball', 'softball', 'dodgeball'],
        numba: 7.334,
        nullo: null,
        something: "8.3",
        addr: {
            street: '1 Memorial Dr',
            city: 'Cambridge'
        },
        bool: true
    }

is stored as

    ^x(1)="o"
    ^x(1,"addr")="o"
    ^x(1,"addr","city")="sCambridge"
    ^x(1,"addr","street")="s1 Memorial Dr"
    ^x(1,"bool")="b1"
    ^x(1,"nullo")="u"
    ^x(1,"numba")="n7.334"
    ^x(1,"something")="s8.3"
    ^x(1,"sports")="a"
    ^x(1,"sports",0)="sbaseball"
    ^x(1,"sports",1)="ssoftball"
    ^x(1,"sports",2)="sdodgeball"
    ^x(1,"test")="sval"

###Benchmarking

    * 10000 Insertions of the above object:
        - Globals: 3.269745131s
        - MongoDB: 1.410825992s
    * 10000 Retrievals of those objects, by _id:
        - Globals: 4.642820684s
        - MongoDB: 1.166664768s

###TODO

	* Projections - these may give Globals an advantage
	* Queries - this would be difficult
	* Indexings

repository: brandonhorst/globalsdb-node-mundo

repo_name: brandonhorst/globalsdb-node-mundo


text:
<<<<<<< HEAD
# Trivia_Challenge
A trivia Challenge game written in C++
=======
# Cpp_Lab_03
convert the tic tac toe game

Take the existing Python program, and translate it into C++ code.
You will need to use a 2-dimensinal array instead of a "list of lists".

make sure to comment your code, and give credit to collaborators.

name your project:

#Lab3_1

>>>>>>> d715551b9ed5b8a5aeb15dcefb1708f975b21956

license: Unlicense


text:
# IHF:Code Base Image

### Purpose

We noticed a common issue when delivering training to people, the equipment and operating environment can vary from person to person, leading to a lot of issues and usage of precious learning time trying to diagnose IT issues.

To remedy this and concentrate on learning, we developed a solution based off the code-server project to enable a containerised IDE that has a set of development tools off and can be accessed via a web browser.

[https://github.com/cdr/code-server](https://github.com/cdr/code-server)

This image is the base image we use to build our development environments upon, it is based off the debian:buster-slim image which sits around 27mb in size.

### Usage

This image will bring up a basic IDE but will have very little installed, it's useful to use this image as a base image.

### Running locally

To run this image using docker locally use the following command

docker run -it -p <IP_ADDRESS>:8080:8080 -e PASSWORD=password \
	-v /Users/gary/Developer:/home/coder/project \
	--user coder ihfcode/code-base:latest

The user must be set to coder for the environment to come up correctly.

The port Code-Server runs on is 8080
You can set a password using the -e PASSWORD=<mypassword> environment variable
You can mount a folder into the IDE using the -v flag to docker.

### Accessing the environment

When you run the docker command above, the environment can be accessed via a Web browser using the url : http://localhost:8080

### Building development environments

You can use this image as a base image for more detailed development environments, by using the Dockerfile FROM ihfcode/code-env:latest image.

repository: ihf-code/dev-env-base

gha_language: Shell

repo_name: ihf-code/dev-env-base


text:
Write a function to compute the fewest number of coins that you need to make up that amount. If that amount of money cannot be made up by any combination of the coins, return -1.

You may assume that you have an infinite number of each kind of coin.

```python
Input: coins = [1,2,5], amount = 11
Output: 3
Explanation: 11 = 5 + 5 + 1
```

```python
Input: coins = [2], amount = 3
Output: -1
```

```python
Input: coins = [1], amount = 0
Output: 0
```

```python
Input: coins = [1], amount = 1
Output: 1
```

```python
Input: coins = [1], amount = 2
Output: 2
```

## Solution your_name_here

```python
from functools import lru_cache
from typing import List
class Solution:
    def coinChange(self,coins: List[int], amount: int) -> int:

        @lru_cache
        def recurse(amount:int)->int:
            ans=amount+1
            if amount==0:
                return 0
            for c in coins:
                if amount>=c:
                    left=recurse(amount-c)
                    if left!=-1:
                        ans=min(ans,left+1)

            if ans==amount+1: ans=-1
            return ans

        return recurse(amount)

```

repository: lakshmanboddoju/algosig

repo_name: lakshmanboddoju/algosig


text:
# Defining custom CKEditor configurations

Sometimes you want to limit or extend the possibilities of your rich text editor fields used in the Kunstmaan bundles admin.
You can do so by following 3 easy steps.

## Extending the configuration file

First step is to extend the '_ckeditor_configs_extra.html.twig` file. You can do this by creating this file in the following location: `app/Resources/KunstmaanAdminBundle/views/Default/`

## Creating the new configurations

Next step is adding the custom configurations.
As example we have added a option with only some basic styles but you can alter these as you see fit.

```javascript
ckEditorConfigs = {
  'new_style': {
    skin: 'bootstrapck',
    startupFocus: false,
    bodyClass: 'CKEditor',
    filebrowserWindowWidth: 970,
    filebrowserImageWindowWidth: 970,
    filebrowserImageUploadUrl: '',
    toolbar: [{
      name: 'basicstyles',
      items: ['Bold', 'Italic', 'Underline', 'Subscript', 'Superscript', 'RemoveFormat']
    }]
  },
  'other_new_style': {
	  ...
	}
};
```

## Linking the configuration and the form field

Last step is linking your form and newly created styles.
You can do so by adding 'type' as an attribute to your wysiwyg field.

Bundles >= v3.1
```PHP
public function buildForm(FormBuilderInterface $builder, array $options) {
  $builder->add('entityName', 'wysiwyg', array(
    'attr' => array('type' => 'new_style')
  ));
}

```

The important thing is to match the value of the type with the name of your newly created style.
Your

repository: syzygypl/KunstmaanBundlesCMS

repo_name: syzygypl/KunstmaanBundlesCMS


text:
# Guidelines

Guidelines is a Brackets extension that displays column guidelines (print
margins) at a specified column. This is useful to keep code length below a
desired threshold for readability.

![Print Margin](https://github.com/yellowhangar/Guidelines/blob/master/assets/guidelines-a.jpg)
![Print Margin](https://github.com/yellowhangar/Guidelines/blob/master/assets/guidelines-b.jpg)

*Print margin on column 80 and the preferences dialog*

## Features

* Works with multiple panes in any orientation.
* Works with inline code editors.
* The guideline fills the entire viewport, not just the visible code.
* Displays properly if line numbers are hidden.
* Accommodates  custom gutter widths.
* The guideline will not trigger scrolling in the viewport.
* Will correct for zoomed font sizes.

## Preferences

Users can set the column number at which to draw the guideline and the guideline
color via the menu at: View > Guidelines.

The extension can also be disabled via the menu.

## License

MIT (Expat)


text:
Web Gallery from a Folder
===

A web server that displays folders of images, video and audio.

Simple browsing of media files as web pages. Read only - no editing or uploading.
Limited only to the folder you want.

Produces a standalone executable. The only optional external
dependency is `ffmpeg` for video thumbnails.

Optional support for TLS and http2.

Javascript is not needed to browse the web gallery.
However some javascript is used when the overlay media on page feature is on.

Can work even on openwrt routers. But thumbnail generation is very slow there.

Has RSS/atom feed.

Optional Discord webhook for new uploads.

![](screenshot.png "Foldergal Screenshot")

Usage
---

TLDR;
1. Run in terminal something like
   `./foldergal-binary --root /path/to/serve/files/from --home /tmp/foldergal`
2. Visit http://localhost:8080

### Configuration

#### Config File

`foldergal --config /path/to/config.json`

See config.default.json for details. Parameter names are case insensitive.

All settings in the config file override the env and cli parameters!

#### Environment variables and their defaults
```
export FOLDERGAL_CACHE_EXPIRES_AFTER=0
export FOLDERGAL_CONFIG=
export FOLDERGAL_DISCORD_NAME=Gallery
export FOLDERGAL_DISCORD_WEBHOOK=
export FOLDERGAL_HOME=.
export FOLDERGAL_HOST=localhost
export FOLDERGAL_HTTP2=false
export FOLDERGAL_NOTIFY_AFTER=30s
export FOLDERGAL_PORT=8080
export FOLDERGAL_PREFIX=
export FOLDERGAL_PUBLIC_HOST=
export FOLDERGAL_QUIET=false
export FOLDERGAL_ROOT=.
export FOLDERGAL_THUMB_H=400
export FOLDERGAL_THUMB_W=400
export FOLDERGAL_TLS_CRT=
export FOLDERGAL_TLS_KEY=
```

#### Parameters

Run `./foldergal --help` for full info on command line parameters.
They will override the env variables.

#### Home folder structure

* home (defaults to current folder)
  * `foldergal.log`
  * `_foldergal_cache/` (created automatically)

You can put config.json and tls certificates there but you will still have
to point the executable to them.

Limitations and known issues
---

Privacy warning: all media is served as is, to the byte.
This means that no EXIF or other metadata is removed from your files.

Http2 works only with TLS, which works only if you provide certificate files.

You should clean the "home" folder manually after using the application.
The thumnail cache and the log file remain on your disk.

In the rare case that you shared a folder from one volume (windows drive) and
later shared a folder with the same name but from different volume
you might see some erroneous thumbnails.

If you see an error stating "too many open files" you should set a larger
file descriptor limit. Like running `ulimit -n 100000` in the current terminal.

Developer notes
---

1. `go generate`
1. `go build`
1. ... run

Use the [Makefile]().

Foldergal uses go modules.

Tested with go version 1.15.

When building use these flags to set the build time and version:
```
go build -ldflags="-X 'main.BuildTimestamp=TIME' -X 'main.BuildVersion=VERSION'"
```
Where TIME must be an RFC3339 string.

Package fsnotify requires `go get -u golang.org/x/sys/...`

Setting up service on Freebsd
---

1. copy somewehere the executable e.g. `/usr/local/bin/foldergal`
1. create a user to run the service e.g. `foldergaluser`
1. create the folder `/var/run/foldergal` and make the service user it's owner
1. create a file `/usr/local/etc/rc.d/foldergal` make sure it is executable
1. put there the contents of `example-rc-freebsd.sh` and edit
1. set the service user, correct paths, port, public name
1. add the line `foldergal_enable="yes"` in /etc/rc.conf
1. `service foldergal start`
1. you can check the logs in `FOLDERGAL_HOME` foldergal.log

Important: in order for file type detection to work you will need to have
`/etc/mime-types` which freebsd does not have.
One solution is to install apache and symlink to it's mime.types.
Ugly, yes, but foldergal will not see your videos otherwise.

Service on Debian
--

Create `/etc/systemd/system/foldergal.service` similar to
`example-systemd.service`. Change paths, user and don't forget to
edit your `config.json`.

After `sudo systemctl daemon-reload` you can `sudo service foldergal start`.

To enable auto-start: `sudo systemctl enable foldergal`

TODO
---

* [ ] Generate pdf thumbnails (imagemagick?)
* [x] Generate audio file thumbnails
* [ ] In-browser notifications for new uploads
* [ ] 100% test coverage
* [ ] Add fuzz tests
  <https://blog.fuzzbuzz.io/go-fuzzing-basics>
* [ ] Use touch events for overlay media navigation
* [ ] Loading indicator for overlay image next and prev
* [ ] (maybe) Implement README.md parsing in folders (using https://github.com/yuin/goldmark)
* [ ] (maybe) Dynamic folder icons generated from the full folder path
* [ ] (maybe) Rework http server startup https://bojanz.github.io/increasing-http-server-boilerplate-go/
* [ ] Combine svg icons in a single file and `<use>` sprites
* [ ] Fix misterious date bug 0001-01-01 on freebsd
* [x] Rewrite embedded files using the `go:embed` directive available in go 1.16
* [ ] Rewrite HTTP handlers using middleware e.g.
  <https://eli.thegreenplace.net/2021/life-of-an-http-request-in-a-go-server/>
* [ ] Exclude thumbs.db files
* [ ] (maybe) Use webauthn for authentication
  <https://github.com/duo-labs/webauthn>
* [ ] Make sure thumbnail generation uses correct resizing
  <https://zuru.tech/blog/the-dangers-behind-image-resizing>

repository: specto/foldergal

gha_language: Go

repo_name: specto/foldergal


text:
DbpediaConceptSearch
====================

A tool that queries dbpedia.org's lookup tool to find concepts, and then
bundles the results into either ruby objects (using Hashie) or json.

Installation
------------

    gem install 'dbpedia_concept_search'

or if using bundler, add this to your Gemfile:

    gem 'dbpedia_concept_search'

Usage
-----

The initial search is defined by creating a new DbpediaConceptSearch:

    require 'dbpedia_concept_search'

    search = DbpediaConceptSearch.new('place', 'London')

This will lead to a query matching [this](http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?QueryClass=place&QueryString=London)

Results
-------

The results method will return an array of objects. See lib/example.rb

JSON
----

Use search.to_json to return a JSON representation of the data.

Background service
------------------

DbpediaConceptSearch relies on [the dbpedia lookup service](http://wiki.dbpedia.org/Lookup?show_files=1).
To test this service, check that the flowing URL returns XML describing Berlin concepts:

http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?QueryClass=place&QueryString=berlin

If you get a failure, I've found the best solution is to post the error to
<EMAIL_ADDRESS>

repository: reggieb/DbpediaConceptSearch

repo_name: reggieb/DbpediaConceptSearch