text:
# ![alt text](https://github.com/trampster/JsonSrcGen/blob/master/JsonSrcGen/icon.png "JsonSrcGen Logo") JsonSrcGen
Json library that uses .NET 5 c# Source Generators

Note: Requires the .NET 5 to run.

# Supported Types

**Classes**
Class serializers can be generated by defining a Json attribute on the class
```csharp
[Json]
public class MyType
{
    [JsonName("my_name")]
    public string MyProperty {get;set}

    [JsonIgnore]
    public string IgnoredProperty {get;set;}
}

var converter = new JsonConverter();

ReadOnlySpan<char> json = convert.ToJson(new MyType(){MyProperty = "Some value"});

var myType = new MyType();
convert.FromJson("{\"MyProperty\:\"Some value\"}", myType);
```
Properties with the following types are supported:

Integer Types | Others
------|--------
int | float?
int? | double
uint | double?
uint? | boolean
ushort | boolean?
ushort? | string
short | DateTime
short? | DateTime?
byte | DateTimeOffset
byte? | DateTimeOffset?
long | Guid
long? | Arrays
float | List<T>

**Arrays**

Arrays are generated by defining a JsonArray attribute at the assembly level.

```csharp
[assembly: JsonArray(typeof(bool))]
```

**List**

Lists are generated by defining a JsonList attribute at the assembly level.

```csharp
[assembly: JsonList(typeof(bool))]
```

**Dictionary**

Dictionaries are generated by defining a JsonList attribute at the assembly level. Only Dictionaries with string keys are supported currently.

```csharp
[assembly: JsonDictionary(typeof(string), typeof(int))]
```

**Values**

Simple json values are generated by defining a JsonValue attribute at the assembly level.

```csharp
[assembly: JsonValue(typeof(int))]
```

**Custom Converters**

You can customize the conversion for specific types by providing your own converter. You must implement ICustomConverter<T> and
put the CustomConverter attribute on your class.

```csharp
[CustomConverter(typeof(int))]
public class CustomCaseStringConverter : ICustomConverter<int>
{
    public void ToJson(IJsonBuilder builder, int value)
    {
        // Write your json to the builder here
    }

    public ReadOnlySpan<char> FromJson(ReadOnlySpan<char> json, ref int value)
    {
        // Read the Json from the json span here
    }
}
```

**Leave out null properties**

You can instruct JsonSrcGen to skip serializing null property values by adding the following attribute:

```csharp
[JsonIgnoreNull]
public class MyJsonType
{
    int? MyProperty {get;set;}
}
```

**Set Property to default if missing**

By default JsonSrcGen doesn't set properties to there default value if they are missing in the JSON. If you always give FromJson a new instance this isn't a problem. However if you reused objects (which is a big performance boost) then the property wont get set unless present in the Json. If you want JsonSrcGen to set missing properties to default then you can specify this using the JsonOptionalAttribute

```csharp
public class MyJsonType
{
    [JsonOptional]
    string MyProperty{get;set;}
}
```

**UTF8 Support**

JsonSrcGen supports UTF8 via ReadOnlySpan<byte>.

To Json looks is the same as string ToJson byte with Utf8 at the end of the name

```csharp
ReadOnlySpan<byte> json = convert.ToJsonUtf8(new MyType(){MyProperty = "Some value"});
```

From Json is even easier as the method name is the same as string FromJson but takes a ReadOnlySpan<byte> instead of ReadOnlySpan<char>

```
ReadOnlySpan<byte> utf8Json = Encoding.Utf8.GetBytes("{\"MyProperty\:\"Some value\"}");
convert.FromJson(utf8Json, myType);
```

**Nuget Packages**

JsonSrcGen is available as a nuget package:
https://www.nuget.org/packages/JsonSrcGen/

repository: trampster/JsonSrcGen

gha_language: C#

repo_name: trampster/JsonSrcGen


text:
## Requirements

NodeJS

## Local edit

```
yarn install
yarn dev
```

## Build to deploy

```
yarn build
```

Files will be output in `contents/.vuepress/dist`

license: MIT

repository: kartsims/kb

branch_name: refs/heads/master

extension: md

gha_language: Python

gha_license_id: MIT

license_type: permissive

repo_name: kartsims/kb


text:
# WorkflowHunt

WorkflowHunt is a search engine for scientific workflow repositories. See [WorkflowHunt](http://workflowhunt.com/)

# Initial Setup

This project was built in PHP using CodeIgniter as back-end framework and Bootstrap as front-end framework. The steps to setup the project are explained as follows:

1. Download [Codeigniter](https://www.codeigniter.com/) 3.1.4
2. Clone this project using git (`git clone https://github.com/jbeleno/workflowhunt.git`) or download the [ZIP](https://github.com/jbeleno/workflowhunt/archive/master.zip)
3. Replace the files and directories in CodeIgniter using the files and directories in this project.
4. Setup your favourite web environment for PHP. I personally use AWS (EC2, RDS, and Route 53). Nevertheless, for testing your can download XAMPP (for Windows) or LAMPP (for Linux).
5. Create a database with name `workflowhunt`. For LAMPP/XAMPP the database is MySQL.
6. Setup CodeIgnite. Usually, I just configure 4 files:

6.1. `application/config/autoload.php`: This file setup the packages, libraries, drivers, helpers, languages, models, etc that will be loaded when the project run for first time.
Replace

```
$autoload['libraries'] = array();
```

By

```
$autoload['libraries'] = array('database', 'session');
```

6.2. `application/config/config.php`: This file is for general settings.

Add the timezone after `defined('BASEPATH') OR exit('No direct script access allowed');`

```
// Timezone setting
date_default_timezone_set('America/Sao_Paulo');
```

Replace

```
$config['base_url'] = '';
```

By

```
$config['base_url'] = ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == "on") ? "https" : "http");
$config['base_url'] .= "://".$_SERVER['HTTP_HOST'];
$config['base_url'] .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);
```

6.3. `application/config/database.php`: Settings for database.

6.4. `application/config/routes.php`: This file manages the URL settings and URL defaults in the application.

Replace
```
$route['default_controller'] = 'welcome';
```

By
```
$route['default_controller'] = 'web';
```

7. Setup ElasticSearch. Follow (Part II - Installing Elasticsearch) of this [tutorial](https://www.elastic.co/blog/running-elasticsearch-on-aws)

8. Run Apache/Nginx: `sudo service httpd start`

# Project Setup

Consider the project running in `localhost`.

1. Run `curl http://localhost/index.php/workflow/insert_workflow_metadata`
2. Run `curl http://localhost/index.php/workflow/update_workflow_metadata`
3. Run `curl http://localhost/index.php/ontology/download_terms`
4. Run `curl http://localhost/index.php/wordnet/store_synonyms`
5. Run `curl http://localhost/index.php/semantic/annotate`
6. Run `curl http://localhost/index.php/semantic/expand`
7. Run `curl http://localhost/index.php/elasticsearch/index_metadata`
8. Run `curl http://localhost/index.php/elasticsearch/index_semantics`

repository: Boorgesgc/workflowhunt

repo_name: Boorgesgc/workflowhunt


text:
# Chaetosphaeria crustacea (Sacc.) Réblová & W. Gams, 1999 SPECIES

#### Status
ACCEPTED

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

#### Published in
Czech Mycol. 51(1): 12 (1999)

#### Original name
Zignoëlla crustacea Sacc., 1883

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
# Ansible Role: teslamate-advanced
[![Build Status](https://api.travis-ci.com/tobiasehlert/ansible-role-teslamate.svg?branch=master)](https://travis-ci.com/github/tobiasehlert/ansible-role-teslamate-advanced)

Ansible Role for TeslaMate installation on bare Linux OS

## Available TeslaMate roles

I provide two types of TeslaMate Ansible roles.

The first Ansible role is for setting up TeslaMate inside an docker environment with docker-compose.

The second Ansible role is for installation of TeslaMate on a bare Linux OS by compiling the code, etc.

* teslamate: [Ansible Galaxy](https://galaxy.ansible.com/tobiasehlert/teslamate) or [GitHub](https://github.com/tobiasehlert/ansible-role-teslamate)
* teslamate_advanced: [Ansible Galaxy](https://galaxy.ansible.com/tobiasehlert/teslamate_advanced) or [GitHub](https://github.com/tobiasehlert/ansible-role-teslamate-advanced)

## Requirements
TBA

## Role Variables
TBA

## Dependencies
TBA

## Example Playbook
```
- name: teslamate-advanced.yml
  hosts: all
  roles:
    - tobiasehlert.teslamate_advanced
```

## License
MIT

## Author Information
This role was created in 2020 by [Tobias Lindberg](https://github.com/tobiasehlert).


text:
# BreadLog
Flask app for tracking experimentation with bread recipes

https://breadlog.herokuapp.com/

### Time calculators
Bread recipes can often take an entire day or more. Wondering if you'll have enough time to finish? Do you need to know when to start by in order to make finish in time? BreadLog has easy to use calculators for each recipe.

![Calculator](https://github.com/kailin-lu/BreadLog/blob/main/images/calculator.png)

### Easily build steps and add ingredients
Artisan recipes often have many steps, adding the same ingredient in varying amounts in each step. BreadLog provides an easy to use, step-by-step recipe builder with flexibility to add the same ingredient in multiple steps.

![Add Steps](https://github.com/kailin-lu/BreadLog/blob/main/images/add_step.gif)

repository: kailin-lu/BreadLog

branch_name: refs/heads/main

repo_name: kailin-lu/BreadLog


text:
# LoKu

##### Quick and easy local environment set-up for Kubernetes on OSX.

### :tada: INSTALL :tada:

##### Dependencies:
* [Homebrew](https://brew.sh/)
* [VirtualBox](http://download.virtualbox.org/virtualbox/5.2.0/VirtualBox-5.2.0-118431-OSX.dmg)

###### Once you have installed, and set up the dependencies listed above, you are ready to get rolling.

##### So now run:
```
wget https://raw.githubusercontent.com/poetic/loku/master/loku -O loku && chmod +x loku && mv loku /usr/local/bin/
```

##### After that run: `loku install`

--------
##### Congratulations! You are now ready for...
# :star: Usage :star:

##### USAGE will show you the basics of using your new loku tool and cluster
* First run `loku start`, that will initiate,configure, and build your kubernetes cluster real quick.
* Next run `loku dashboard`, which will pull up your dashboard. There's so much goodness in and around the dashboard I don't want to spoil your journey going trough all that.

After all that you're ready to rock.

 Just run:

`loku drupal`

Watch the logs in your dashboard as the drupal site builds, when the drupal pod is completed you can retrieve the url to the site with:

`loku url [app_name-type]`

The app_name portion will be the app name assigned to it, the type will be the kind of service that the app is. For example a drupal app named green-cat would use `loku url green-cat-drupal`

### Jenkins

Quickly install Jenkins with 'loku jenkins'. After the app is initialized there will be instructions in the output to get the admin password.

repository: RealLukeMartin/loku

repo_name: RealLukeMartin/loku


text:
# MVVMNews
API using News API API Key : c4eb3be15f1f407ea3e039721f0a8bc7

##How to run app

Install Java from 8 or higher
Install Android Studio 3.4.1 or higher
Open App
Just Run App

##Functions in test project:

1. Use https://newsapi.org/ as data source
2. Application must be written in Kotlin
3. Application must be written in MVVM
4. Using Kotlin Coroutines
5. Using Retrofit to send request API
6. Implement AndroidX
7. Using Picasso to load image

repository: playerthong/MVVMNews

repo_name: playerthong/MVVMNews


text:
[![Build Status](https://travis-ci.org/websitemacherei/grav-plugin-lazysizes.svg?branch=master)](https://travis-ci.org/websitemacherei/grav-plugin-lazysizes)

# Lazysizes Plugin

The **Lazysizes** Plugin provides support for lazyloading images defined in the markdown of a page. Instead of manipulating the rendered content it extends the markdown parser and wont't work with editors that are not using the Grav Parsedown Parser, like tinymce-editor for example.

## Installation

Installing the Lazysizes plugin can be done in one of three ways: The GPM (Grav Package Manager) installation method lets you quickly install the plugin with a simple terminal command, the manual method lets you do so via a zip file, and the admin method lets you do so via the Admin Plugin.

### GPM Installation (Preferred)

To install the plugin via the [GPM](http://learn.getgrav.org/advanced/grav-gpm), through your system's terminal (also called the command line), navigate to the root of your Grav-installation, and enter:

    bin/gpm install lazysizes

This will install the Lazysizes plugin into your `/user/plugins`-directory within Grav. Its files can be found under `/your/site/grav/user/plugins/lazysizes`.

### Manual Installation

To install the plugin manually, download the zip-version of this repository and unzip it under `/your/site/grav/user/plugins`. Then rename the folder to `lazysizes`. You can find these files on [GitHub](https://github.com/websitemacherei/grav-plugin-lazysizes) or via [GetGrav.org](http://getgrav.org/downloads/plugins#extras).

You should now have all the plugin files under

    /your/site/grav/user/plugins/lazysizes

> NOTE: This plugin is a modular component for Grav which may require other plugins to operate, please see its [blueprints.yaml-file on GitHub](https://github.com/websitemacherei/grav-plugin-lazysizes/blob/master/blueprints.yaml).

### Admin Plugin

If you use the Admin Plugin, you can install the plugin directly by browsing the `Plugins`-menu and clicking on the `Add` button.

## Configuration

Before configuring this plugin, you should copy the `user/plugins/lazysizes/lazysizes.yaml` to `user/config/plugins/lazysizes.yaml` and only edit that copy.

Here is the default configuration and an explanation of available options:

```yaml
enabled: true
```

Note that if you use the Admin Plugin, a file with your configuration named lazysizes.yaml will be saved in the `user/config/plugins/`-folder once the configuration is saved in the Admin.

repository: websitemacherei/grav-plugin-lazysizes

gha_language: PHP

repo_name: websitemacherei/grav-plugin-lazysizes


text:
# Habitat package: pngquant

Lossy PNG compressor.

## Maintainers

The Habitat Maintainers (humans@habitat.sh).

## Type of package

Library package. Include this plan as a runtime or build dependency for plans that require `pngquant`.

## Usage

```
pkg_deps=(
  core/pngquant
)
```

or

```
pkg_build_deps=(
  core/pngquant
)
```

repository: habitat-sh/core-plans

gha_language: Shell

repo_name: habitat-sh/core-plans


text:
## Actions
First, let’s define some actions.

*Actions* are payloads of information that send data from your application to your store. They are the only source of information for the store. You send them to the store using store.dispatch().

*Actions* 是从应用到store发送的数据，也是发给store数据的唯一途径。发送的话要使用store.dispatch()方法。

Here’s an example action which represents adding a new todo item:

以下是添加一项todo的Action示例：

```JavaScript
const ADD_TODO = 'ADD_TODO'
```

```JavaScript
{
  type: ADD_TODO,
  text: 'Build my first Redux app'
}
```

Actions are plain JavaScript objects. Actions must have a type property that indicates the type of action being performed. Types should typically be defined as string constants. Once your app is large enough, you may want to move them into a separate module.

Actions其实就是一般的JavaScript对象。Actions必须包含一个type属性来标明这个action的类型。类型一般用字符串常量表示。随着应用变得更大更复杂，你可以把类型的定义放在独立的模块中。

```JavaScript
import { ADD_TODO, REMOVE_TODO } from '../actionTypes'
```

Note on Boilerplate
You don’t have to define action type constants in a separate file, or even to define them at all. For a small project, it might be easier to just use string literals for action types. However, there are some benefits to explicitly declaring constants in larger codebases. Read Reducing Boilerplate for more practical tips on keeping your codebase clean.
Other than type, the structure of an action object is really up to you. If you’re interested, check out Flux Standard Action for recommendations on how actions could be constructed.

We’ll add one more action type to describe a user ticking off a todo as completed. We refer to a particular todo by index because we store them in an array. In a real app, it is wiser to generate a unique ID every time something new is created.

```JavaScript
{
  type: COMPLETE_TODO,
  index: 5
}
```

It’s a good idea to pass as little data in each action as possible. For example, it’s better to pass index than the whole todo object.

Finally, we’ll add one more action type for changing the currently visible todos.

```JavaScript
{
  type: SET_VISIBILITY_FILTER,
  filter: SHOW_COMPLETED
}
```

## Action Creators

Action creators are exactly that — functions that create actions. It's easy to conflate the terms “action” and “action creator,” so do your best to use the proper term.

Action creator 其实就是创建action的方法（函数）。action和action creator经常一起出现，用的时候要走心。

In traditional Flux implementations, action creators often trigger a dispatch when invoked, like so:

一般在Flux的实现中，action creator经常会在调用时触发dispatch，就像这样：

```JavaScript
function addTodoWithDispatch(text) {
  const action = {
    type: ADD_TODO,
    text
  }
  dispatch(action)
}
```

By contrast, in Redux action creators simply return an action:

相比之下，在Redux里action creator就只返回个action而已：

```JavaScript
function addTodo(text) {
  return {
    type: ADD_TODO,
    text
  }
}
```

This makes them more portable and easier to test. To actually initiate a dispatch, pass the result to the dispatch() function:

这就使得action creator 更便于移植和测试。如果真想发起dispatch，就把action creator 的返回值作为参数调用dispatch()方法：

```JavaScript
dispatch(addTodo(text))
dispatch(completeTodo(index))
```

Alternatively, you can create a bound action creator that automatically dispatches:

另外，你也可以写成绑定好的action creator 从而自动发起dispatch：

```JavaScript
const boundAddTodo = (text) => dispatch(addTodo(text))
const boundCompleteTodo = (index) => dispatch(completeTodo(index))
```

Now you’ll be able to call them directly:

然后你就可以直接调用了：

```JavaScript
boundAddTodo(text)
boundCompleteTodo(index)
```

The dispatch() function can be accessed directly from the store as store.dispatch(), but more likely you'll access it using a helper like react-redux's connect(). You can use bindActionCreators() to automatically bind many action creators to a dispatch() function.

要调用dispatch()方法的话，首先你可以直接在store中使用store.dispatch()调用。不过一般还是使用react-redux的connect()这类helper方法来调用。bindActionCreators()方法可以用来自动把很多action creator绑定到一个dispatch()方法中。

## Source Code

### actions.js

```JavaScript
/*
 * action types
 */

export const ADD_TODO = 'ADD_TODO'
export const COMPLETE_TODO = 'COMPLETE_TODO'
export const SET_VISIBILITY_FILTER = 'SET_VISIBILITY_FILTER'

/*
 * other constants
 */

export const VisibilityFilters = {
  SHOW_ALL: 'SHOW_ALL',
  SHOW_COMPLETED: 'SHOW_COMPLETED',
  SHOW_ACTIVE: 'SHOW_ACTIVE'
}

/*
 * action creators
 */

export function addTodo(text) {
  return { type: ADD_TODO, text }
}

export function completeTodo(index) {
  return { type: COMPLETE_TODO, index }
}

export function setVisibilityFilter(filter) {
  return { type: SET_VISIBILITY_FILTER, filter }
}
```

## Next Steps

Now let’s define some reducers to specify how the state updates when you dispatch these actions!

Note for Advanced Users

If you’re already familiar with the basic concepts and have previously completed this tutorial, don’t forget to check out async actions in the advanced tutorial to learn how to handle AJAX responses and compose action creators into async control flow.

repository: npmcdn-to-unpkg-bot/nr-todo-react-redux

repo_name: npmcdn-to-unpkg-bot/nr-todo-react-redux


text:
# DengAI disease prediction

# Problem Statement
In recent years dengue fever has been spreading. Historically, the disease has been most prevalent in Southeast Asia and the Pacific islands. These days many of the nearly half billion cases per year are occurring in Latin America:

Using environmental data collected by various U.S. Federal Government agencies—from the Centers for Disease Control and Prevention to the National Oceanic and Atmospheric Administration in the U.S. Department of Commerce—can you predict the number of dengue fever cases reported each week in San Juan, Puerto Rico and Iquitos, Peru?

The repo contains 3 jupyter notebooks.
1. [Data cleaning and data preprocessing notebook](https://github.com/kongaevans/DengAI/blob/master/Dengue_disease_cleaning.ipynb).
2. [Visualization notebook](https://github.com/kongaevans/DengAI/blob/master/Dengeue_disease_visualization.ipynb).
3. [Modeling notebook](https://github.com/kongaevans/DengAI/blob/master/Modeling%20%20Dengue%20fever%20using%20CatBoost%20model.ipynb) - I used Catboost model.

repository: kongkip/DengAI

repo_name: kongkip/DengAI


text:
Welcome to airbnb-design 👋

> An HTML and CSS only (no JS!) copy of the Airbnb homepage. Produced using three images as the reference, I started with zero code and resources, and had to build a fully responsive homepage that hit the three design images exactly. All links and horizontal scrolling divs work as per the original website.

### 🏠 [Homepage](https://github.com/ianwhiscombe/airbnb-design)

### ✨ [Demo](https://airbnb-design.netlify.app)

## Screenshot
![CleanShot 2020-09-11 at 14 37 35@2x](https://user-images.githubusercontent.com/40146191/92932119-5a64ec00-f43c-11ea-9a99-f8868ff09737.png)

## Usage

```sh
Original design images for comparison to my site can be found in the designs folder.
```

## Author

👤 **Ian Whiscombe**

* Website: www.ianwhiscombe.com
* Twitter: [@i4nw](https://twitter.com/i4nw)
* Github: [@ianwhiscombe](https://github.com/ianwhiscombe)
* LinkedIn: [@ian-whiscombe](https://linkedin.com/in/ian-whiscombe)

## Show your support

Give a ⭐ if this project helped you!

***

repository: ianwhiscombe/airbnb-design

repo_name: ianwhiscombe/airbnb-design


text:
# PitchView

3D cricket bowling simulator in JavaScript. Developed as part of learning 3D game programming in **three.js** 3D library and **Physijs** physics library. User can change the bowling speed and swing angle (both inswing and outswing supported) and click on the pitch where the ball needs to be pitched on the ground.

Following camera angles are supported:
* Main Umpire Camera
* Leg Umpire Camera
* Wicket Keeper Camera
* Slip Fielder 1, 2 and 3 Cameras
* Off-side Close Fielder Camera

A working demo is available here: http://codeding.com/PitchView/

![PitchView Screenshot](/Screenshots/MainUmpireView.png)

repository: cincoutprabu/PitchView

repo_name: cincoutprabu/PitchView


text:
# ember-css-modules [![Actions Status](https://github.com/salsify/ember-css-modules/workflows/CI/badge.svg)](https://github.com/salsify/ember-css-modules/actions) [![Ember Observer Score](https://emberobserver.com/badges/ember-css-modules.svg)](https://emberobserver.com/addons/ember-css-modules)

Ember-flavored support for [CSS Modules](https://github.com/css-modules/css-modules). For an overview of some of the motivations for the CSS Modules concept, see [this blog post](http://blog.salsify.com/engineering/good-fences-with-css-modules).

If you have ideas or questions that aren't addressed here, try [#topic-css](https://discordapp.com/channels/480462759797063690/486013244667068436) on the Ember Discord Server.

* [Installation](#installation)
* [What and Why?](#what-and-why)
* [Usage](#usage)
  * [Simple Example](#simple-example)
  * ["Classic" Structure Applications](#classic-structure-applications)
  * [Styling Reuse](#styling-reuse)
  * [Programmatic Styles Access](#programmatic-styles-access)
  * [Global Classes](#global-classes)
  * [Values](#values)
* [Usage in Addons](#usage-in-addons)
* [Plugins](#plugins)
* [Advanced Configuration](#advanced-configuration)
  * [Where to Specify Options](#where-to-specify-options)
  * [Scoped Name Generation](#scoped-name-generation)
  * [Source Maps](#source-maps)
* [Ember Support](#ember-support)

## Installation

```sh
ember install ember-css-modules
```

## What and Why?

When you build a component, you drop a `.js` file and a `.hbs` file in your app directory, and your tooling takes care of the rest. Babel takes your fancy ES6 module and restructures it into nice browser-friendly code, while still giving you isolation and modularity guarantees. Meanwhile, the rest of the Ember CLI build pipeline picks up these new files and automatically incorporates them into your final JS artifact. And when it's time to come back and tweak your component, you (just like the Ember resolver) know exactly where those files live based just on the name of the component.

**With ember-css-modules, your styling is a first-class citizen alongside your templates and JavaScript**. You have one `.css` file per component (or route controller), in the same structure you're already using in the rest of your app. Every class you write is local to that file by default, with explicit mechanisms for opting into sharing, just like your JavaScript modules. And just like all your JS modules are automatically included in `<app-name>.js`, your CSS modules will automatically be included in `<app-name>.css`.

## Usage

### Simple Example

With ember-css-modules, you define styles on a per-component (or -controller) basis. You define these styles using the same file layout you use for templates; for example, in pod structure you'd put `styles.css` alongside `template.hbs` in the component's pod. The classes in that stylesheet are then automatically namespaced to the corresponding  component or controller. In order to reference them, you use the `local-class` attribute rather than the standard `class`.

```hbs
{{! app/components/my-component/template.hbs }}
<div local-class="hello-class">Hello, world!</div>
```

```css
/* app/components/my-component/styles.css */
.hello-class {
  font-weight: bold;
}
```

Similarly, if you were styling e.g. your application controller, you would place your styles alongside `controller.js` in `<podModulePrefix>/application/styles.css`.

### "Classic" Structure Applications

In classic structure, all your modules are grouped by type rather than related functionality. Just like all your templates live in `app/templates` and all your routes live in `app/routes`, all your styles will live in `app/styles`. When determining where to put your CSS for a given controller or component, you should mirror the location of the corresponding template.

For example, the component given above in pod structure would look like this in classic structure:

```hbs
{{! app/templates/components/my-component.hbs }}
<div local-class="hello-class">Hello, world!</div>
```

```css
/* app/styles/components/my-component.css */
.hello-class {
  font-weight: bold;
}
```

Similarly, if you were styling e.g. your application controller, you would mirror the template at `app/templates/application.hbs` and put your CSS at `app/styles/application.css`.

### Component Colocation in Octane Applications

In Octane apps, where component templates can be colocated with their backing class, your styles module for a component takes the same name as the backing class and template files:

```hbs
{{! app/components/my-component.hbs }}
<div local-class="hello-class">Hello, world!</div>
```

```css
/* app/components/my-component.css */
.hello-class {
  font-weight: bold;
}
```

### Styling Reuse

In the example above, `hello-class` is rewritten internally to something like `_hello-class_1dr4n4` to ensure it doesn't conflict with a `hello-class` defined in some other module.

For cases where class reuse is desired, there's [the `composes` property](https://github.com/css-modules/css-modules#composition). Suppose you have a title in your component that you'd like to inherit your app-wide "secondary header" styling, which itself uses generic styling shared by all headers:

```css
/* app/styles/headers.css */
.header {
  font-weight: bold;
  text-decoration: underline;
}

.secondary-header {
  composes: header;
  color: #339;
}
```

```css
/* app/components/my-component/styles.css */
.component-title {
  composes: secondary-header from 'my-app-name/styles/headers';
  background-color: #eee;
}
```

In the template for `my-component`, an element with `local-class="component-title"` will end up with an actual class string like `_component-title_1dr4n4 _secondary-header_1658xu _header_1658xu`, incorporating styles from all of the composing classes.

Note that you may also use relative paths to specify the source modules for composition.

Finally, you can compose local classes from global un-namespaced ones that are provided e.g. by a CSS framework by specifying `global` as the source of the class:

```css
/* vendor/some-lib.css */
.super-important {
  color: orange;
}
```

```css
/* app/components/my-component/styles.css */
.special-button {
  composes: super-important from global;
}
```

### Programmatic Styles Access

Currently the `local-class` attribute is honored on HTML elements and component invocations, e.g. `<div local-class="foo {{bar}}">` and `{{input local-class="baz"}}`. It is not (currently) supported in subexpressions like the `(component)` helper.

If you need to access a local class in a template in other scenarios (such as passing in a class name as a property or reusing a class from another module), there is also a `local-class` helper you can use. For example, the "secondary-header" example above can be written as:

```hbs
{{! app/components/my-component/template.hbs }}
<div class="{{local-class 'secondary-header' from='my-app-name/styles/headers'}}">Hello, world!</div>
```

Note that the `from` parameter is optional; by default classes will come from the current module, as with the `local-class` attribute.

In a JavaScript context, the class mappings can also be imported directly from whatever path the corresponding CSS module occupies, e.g.

```js
import styles from 'my-app-name/components/my-component/styles';
console.log(styles['hello-class']);
// => "_hello-class_1dr4n4"
```

**Note**: by default, the import path for a styles module does _not_ include the `.css` (or equivalent) extension. However, if you set `includeExtensionInModulePath: true`, then you'd instead write:

```js
import styles from 'my-app-name/components/my-component/styles.css';
```

Note that the extension is **always** included for styles modules that are part of an Octane "colocated" component, to avoid a conflict with the import path for the component itself.

### Applying Classes to a Component's Root Element

There is no root element, if you are using either of the following:

- [Glimmer components (`@glimmer/component`)](https://octane-guides-preview.emberjs.com/release/components/component-basics/)
- [template-only components](https://github.com/emberjs/rfcs/blob/master/text/0278-template-only-components.md)
- [tag-less components](https://api.emberjs.com/ember/3.9/classes/Component/properties/tagName?anchor=tagName)

In this case, you can ignore this complete section and just use the `local-class` attribute or helper.

#### Ember Object Model

Just like using [`classNames`](http://emberjs.com/api/classes/Ember.ClassNamesSupport.html#property_classNames) and [`classNameBindings`](http://emberjs.com/api/classes/Ember.ClassNamesSupport.html#property_classNameBindings) to set global classes on a component's root element, the `localClassNames` and `localClassNameBindings` properties allow you to set local classes on the root element.

For instance, to statically set a local `my-component` class on your component:

```js
export default Ember.Component.extend({
  localClassNames: 'my-component'
});
```

To dynamically set one or more classes on your component based on the boolean value of a given property:

```js
export default Ember.Component.extend({
  localClassNameBindings: ['propA', 'propB:special', 'propC:yes:no'],
  propA: true,
  propB: true,
  propC: true
});
```

- If `propA` is true, a local `prop-a` class will be applied. If it's false, no additional classes will be applied.
- If `propB` is true, a local `special` class will be applied. If it's false, no additional classes will be applied.
- If `propC` is true, a local `yes` class will be applied. If it's false, a local `no` class will be applied.

#### Native ES6 Class Syntax

The trusty Ember Object Model, that predates native ES6 class syntax, has served the community well over the years. But it's on its way out and you can already use the new native syntax in your apps today!

Instead of setting [`classNames`](http://emberjs.com/api/classes/Ember.ClassNamesSupport.html#property_classNames) and [`classNameBindings`](http://emberjs.com/api/classes/Ember.ClassNamesSupport.html#property_classNameBindings) properties, you would use [`@classNames`](http://ember-decorators.github.io/ember-decorators/latest/docs/api/modules/@ember-decorators/component#classNames) and [`@className`](http://ember-decorators.github.io/ember-decorators/latest/docs/api/modules/@ember-decorators/component#className) decorators from the amazing [ember-decorators addon](http://ember-decorators.github.io/ember-decorators/latest/). ember-css-modules provides the exact same decorators, but for local classes.

For instance, to statically set a local `my-component` class on your component, you use the `@localClassNames` decorator:

```js
import Component from '@ember/component';
import { localClassNames } from 'ember-css-modules';

@localClassNames('my-component')
export default class ExampleComponent extends Component {
  // your kickass code here
}
```

Just as with [`@classNames`](http://ember-decorators.github.io/ember-decorators/latest/docs/api/modules/@ember-decorators/component#classNames) you can pass as many classes as you like:

```js
import Component from '@ember/component';
import { localClassNames } from 'ember-css-modules';

@localClassNames('my-component', 'make-it-pop', 'vibrant-colors')
export default class ExampleComponent extends Component {
  // your sensational code here
}
```

And just like you'd use [`@className`](http://ember-decorators.github.io/ember-decorators/latest/docs/api/modules/@ember-decorators/component#className) to dynamically toggle classes on your component based on the boolean value of a given property, you use `@localClassName` for local classes:

```js
import Component from '@ember/component';
import { localClassName } from 'ember-css-modules';

export default class ExampleComponent extends Component {
  @localClassName propA;
  @localClassName('special') propB;
  @localClassName('yes', 'no') propC;
}
```

- If `propA` is true, a local `prop-a` class will be applied. If it's false, no additional classes will be applied.
- If `propB` is true, a local `special` class will be applied. If it's false, no additional classes will be applied.
- If `propC` is true, a local `yes` class will be applied. If it's false, a local `no` class will be applied.

This is especially beautiful when combined with other decorators or computed properties:

```js
import Component from '@ember/component';
import { computed } from '@ember-decorators/object';
import { notEmpty } from '@ember-decorators/object/computed';
import { localClassName } from 'ember-css-modules';

export default class ExampleComponent extends Component {
  user; // provided as an attr to the component

  @localClassName
  @notEmpty('user.lastName')
  hasLastName;

  @localClassName('the-good-stuff', 'soda-pop')
  @computed('user.age')
  get isOldEnoughToDrink() {
    return this.user.age >= 21;
  }
}
```

- If the property `user.lastName` is not empty, a local `has-last-name` class will be applied.
- If the user is at least of age `21`, a local `the-good-stuff` class is applied, otherwise a local `soda-pop` class is applied.

You can even return strings from computed properties or decorate string properties in order to set local classes in a fully dynamic fashion:

```js
import Component from '@ember/component';
import { computed } from '@ember-decorators/object';
import { reads } from '@ember-decorators/object/computed';
import { localClassName } from 'ember-css-modules';

export default class ExampleComponent extends Component {
  user; // provided as an attr to the component

  @localClass somethingDynamic = 'hello-world';

  @localClass
  @reads('user.favoriteColor')
  favoriteColor;

  @localClass
  @computed('user.usedTechnologies.[]')
  get coolness() {
    const { usedTechnologies } = this.user;
    const coolTech = ['TypeScript', 'Ember.js', 'ember-css-modules'];
    const coolUsedTech = coolTech.filter(t => usedTechnologies.includes(t));

    switch (coolUsedTech.length) {
      case 1: return 'cool';
      case 2: return 'pretty-rad'
      case 3: return 'rockstar';
    }

    return null;
  }
}
```
- The local `hello-world` class will be applied.
- If the property `user.favoriteColor` is `'red'`, a local `red` class will be applied.
- If the user uses all the cool technologies, the local `rockstar` class will be applied. If the user uses no cool technoloy, no further local class will be applied.

### Global Classes

Some libraries provide explicit class names as part of their public interface in order to allow customization of their look and feel. If, for example, you're wrapping such a library in a component, you need to be able to reference those unscoped class names in the context of your component styles. The `:global` pseudoselector allows for this:

```css
.my-component :global(.some-library-class) {
  color: orange;
}
```

For more details on `:local` and `:global` exceptions, see [the CSS Modules documentation](https://github.com/css-modules/css-modules#exceptions).

### Values

For exposing data other than class names across module boundaries, you can use `@value`.

```css
/* app/styles/colors.css */
@value primary-color: #8af;
@value secondary-color: #fc0;
```

```css
/* app/some-route-pod/styles.css */
@value primary-color, secondary-color from 'my-app-name/styles/colors';

.blurb {
  color: primary-color;
  background-color: secondary-color;
}
```

Note that values are also exposed on the `styles` object for a given module, so they are also accessible from JavaScript if you need to coordinate between the two. As a contrived example:

```js
// app/some-route-pod/controller.js
import styles from 'app/some-route-pod/styles';

export default Ember.Controller.extend({
  logColor() {
    console.log('primary color is', styles['primary-color']);
  }
});
```

## Usage in Addons

You can also use ember-css-modules in addons that expose components to their consuming application. To do this you'll need to move `ember-css-modules` out of `devDependencies` and into `dependencies` in your addon's `package.json` ([see issue #8](https://github.com/salsify/ember-css-modules/issues/8)).

Note also that **your addon must have an `addon/styles` directory** in order to trigger CSS processing in Ember CLI. In order for the directory to be preserved when you publish your addon, you can create an empty `.placeholder` file (`.gitkeep` won't work; by default, the `.npmignore` for your addon will prevent files with that name from being published).

## Plugins

Ember CSS Modules has a plugin ecosystem that allows for people to bundle up common configurations and extensions for easy reuse and distribution. For example, if your organization has a common set of PostCSS plugins you always use, you could package those as a plugin and then just drop that into any Ember project and have it automatically take effect.

For details on developing your own, see the [plugins mini-guide](docs/PLUGINS.md). You can also look at the following examples of what plugin implementations can look like:

 - [ember-css-modules-sass](https://github.com/dfreeman/ember-css-modules-sass)
 - [ember-css-modules-stylelint](https://github.com/dfreeman/ember-css-modules-stylelint)
 - [ember-css-modules-reporter](https://github.com/dfreeman/ember-css-modules-reporter)

You can find a list of all publicly available plugins by browsing [the npm `ember-css-modules-plugin` keyword](https://www.npmjs.com/browse/keyword/ember-css-modules-plugin).

## Advanced Configuration

Details about specific advanced configuration options are broken out into smaller mini-guides that each focus on a single topic:
 - [Using CSS Modules with Tailwind CSS](docs/TAILWINDCSS.md)
 - [Using CSS Modules with other preprocessors like Sass or Less](docs/PREPROCESSORS.md)
 - [Working with PostCSS plugins](docs/POSTCSS.md)
 - [Module ordering](docs/ORDERING.md)
 - [Defining values at build time with virtual modules](docs/VIRTUAL_MODULES.md)
 - [Authoring ember-css-modules plugins](docs/PLUGINS.md)

### Where to Specify Options

For applications, custom configuration for ember-css-modules may be specified in `ember-cli-build.js`:

```js
new EmberApp(defaults, {
  // ...
  cssModules: {
    // config
  }
});
```

For addons, configuration may be specified in your addon's `index.js` instead:

```js
module.exports = {
  // ...
  options: {
    cssModules: {
      // config
    }
  }
};
```

### Extensions in Module Paths

When importing a CSS module's values from JS, or referencing it via `@value` or `composes:`, by default you do not include the `.css` extension in the import path. The exception to this rule is for modules that are part of an Octane-style colocated component, as the extension is the only thing to differentiate the styles module from the component module itself.

If you wish to enable this behavior for _all_ modules, you can set the `includeExtensionInModulePath` flag in your configuration:

```js
new EmberApp(defaults, {
  cssModules: {
    includeExtensionInModulePath: true,
  },
});
```

### Scoped Name Generation

By default, ember-css-modules produces a unique scoped name for each class in a module by combining the original class name with a hash of the path of the containing module. You can override this behavior by passing a `generateScopedName` function in the configuration.

```js
new EmberApp(defaults, {
  cssModules: {
    generateScopedName(className, modulePath) {
      // Your logic here
    }
  }
});
```

Note that addons may specify their own `generateScopedName` function, but otherwise they will fall back to using the one (if any) specified by the host application.

### Source Maps

Ember CLI allows you to [specify source map settings](https://ember-cli.com/user-guide/#source-maps) for your entire build process, and ember-css-modules will honor that configuration. For instance, to enable source maps in all environments for both JS and CSS files, you could put the following in your `ember-cli-build.js`:

```
sourcemaps: {
  enabled: true,
  extensions: ['js', 'css']
}
```

#### Notes
- You should specify the `css` extension in your source map configuration even if you're using a different extension for your modules themselves, since the final output file will be a `.css` file.
- Currently CSS source maps (for _any_ Ember CLI preprocessor) only work for applications, not for addons. Watch [ember-cli/broccoli-concat#58](https://github.com/ember-cli/broccoli-concat/issues/58) for progress on that front.
- Enabling source maps for CSS can cause Ember CLI to output an invalid comment at the end of your `vendor.css` file. This is harmless in many situations, but can cause issues with tools that postprocess your css, like ember-cli-autoprefixer. [ember-cli/broccoli-concat#58](https://github.com/ember-cli/broccoli-concat/issues/58) is the root cause of this issue as well.

## Ember Support

This addon is tested against and expected to work with Ember's active [LTS releases](http://emberjs.com/blog/2016/02/25/announcing-embers-first-lts.html) as well as the current [release, beta, and canary](http://emberjs.com/builds/) builds.

Note that if you're using ember-css-modules with a version of Ember CLI prior to 2.13, you'll need to add the following to your `app.js`:

```js
import 'ember-css-modules/extensions';
```

repository: BobrImperator/ember-css-modules

repo_name: BobrImperator/ember-css-modules


text:
# Naucoria rhombospora (G.F. Atk.) J. Favre, 1948 SPECIES

#### Status
SYNONYM

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

#### Published in
Mat. fl. crypt. Suisse 10(3): 144 (1948)

#### Original name
Lepiota rhombospora G.F. Atk., 1918

### Remarks
null

path: /life/Fungi/Basidiomycota/Agaricomycetes/Agaricales/Inocybaceae/Flammulaster/Flammulaster carpophilus/ Syn. Naucoria rhombospora/README.md


text:
# Zones
(upper zone - letters taht goes up)
(middle zone- stays in middle a,e,i,o,u,etc)
(lower zone- goes down y,z,p,etc)

- tells about what experiences writer wants to include in his life
- what writer wants, needs
- amount of energy it's gonna use at prefeable areas of life

## 1 Upper Zone
- This is formed by strokes and loops above the line of writing.
- These indicate the writer's behaviour, feelings, and thoughts in areas of the spiritual, religious, political and intangible.

- This zone is the realm of the mind.

- This zone is the writer's superego or conscience.

- It reveals the extent of the intellectual curiosity and imagination.

## 2 Middle Zone

- This comprises the main body of the letter as it sits on the line of writing.

- This zone shows the socialization of the writer.

- This is the area of practical involvement in the world, and of essential needs.

- It shows the writer's interest and involvement in the day-to-day activities of home, work and play. This zone is the writer's ego.

## 3 Lower Zone
- This is formed by strokes and loops below the line of writing.

- It shows the extent and nature of the writer's physical needs and desires.

- This zone is the indicator of the writer's drives of money, possessions, physical exercise and sex.
- This zone is the id, or the libido.

repository: hritikamk/Basic-Grapgology-Notes

repo_name: hritikamk/Basic-Grapgology-Notes


text:
---
title: Comprehending YAML
date: 2021-02-11
layout: layouts/post.njk
tags:
  - yaml
---

YAML is a little clever for my taste but I'm starting to get it.

Before [yesterday's post](../a-non-comprehensive-guide-to-yaml-for-folks-who-like-json-just-fine), I had no idea how it related to JSON. In that post I personalized a few examples from the YAML docs and manually converted them.

And after sleeping on my exercise, I have a better picture of what's going on.

- [YAML infers complex types](#yaml-infers-complex-types)
- [YAML infers simple types](#yaml-infers-simple-types)
- [YAML shorthand can be confusing](#yaml-shorthand-can-be-confusing)
- [YAML patterns](#yaml-patterns)
  - [Arrays of arrays](#array-of-arrays-%3A-sequence-of-sequences)
  - [Arrays of objects](#array-of-objects-%3A-sequence-of-mappings)
  - [Objects of arrays](#object-of-arrays-%3A-mapping-of-sequences)
  - [Objects of objects](#object-of-objects-%3A-mapping-of-mappings)
- [All mixed up](#all-mixed-up)

## YAML infers complex types

As much as possible, YAML infers complex data structures by the data it composes.

```yaml
- Evermore
- Folklore
- Lover
```

This is a sequence and the containing Array structure is implied.
Here's how it looks in JSON:

```json
["Evermore", "Folklore", "Love"]
```

Compare this to a YAML mapping, where the root structure is implied to be an object.

```yaml
Evermore: 2020
Folklore: 2020
Lover: 2019
```

Again, here's what that looks like in JSON.

```json
{
  "Evermore": 2020,
  "Folklore": 2020,
  "Lover": 2019
}
```

So what happens if we try to mix sequences and mappings at the root level?

```yaml
-Evermore
Folklore: 2020
Lover: 2019
```

It breaks:

```
YAMLException: end of the stream or a document separator is expected at line 2, column 9: Folklore: 2020
```

This tracks because something can't be both an object AND an array.

### Understanding inference

Indentifying when you're describing an Array (sequence) and when you're describing an Object (mapping) is critically important. And it's not always clear.

Can you guess what the JSON equivalent for this YAML is?

```yaml
- Evermore: 2020
- Folklore: 2020
- Lover: 2019
```

The dashes `-` indicate that the root structure is an array (sequence). But each array item comprises a descrete object (mapping) with a key-value pair. This is inferred from the colon `:` between values in each array item.

So the JSON output for the YAML above is this:

```json
[
  {
    "Evermore": 2020
  },
  {
    "Folklore": 2020
  },
  {
    "Lover": 2019
  }
]
```

An array of objects (or "sequence of mappings").

Now that I understand it, I see the dash (`-`) like list-items in Markdown.

## YAML infers simple types

Let's take an array (sequence) of objects (mappings).

```yaml
- Evermore: 2020
- Folklore: 2020
- Lover: 2019
```

The keys are strings and the values are numbers.

`Evermore` becomes `"Evermore"`.
`2020` stays `2020`.
`Taylor Swift` becomes `"Taylor Swift"`.

## Takeaways

After looking at so much JavaScript and JSON, this is a little unsettling but — in simple examples like this — there's a simplicity to the representation.

## YAML shorthand can be confusing

Below we have an array (sequence) of objects (mappings).

```yaml
- name: Taylor Swift
- name: The National
```

JSON looks like this.

```json
[
  {
    "name": "Taylor Swift"
  },
  {
    "name": "The National"
  }
]
```

What does it look like to add more properties to the these objects?

YAML allows us to use JSON object syntax.

```yaml
- { name: Taylor Swift, album_count: 9 }
- { name: The National, album_count: 8 }
```

But it's not super YAML-y. So there's an alternative that uses newlines.

```yaml
- name: Taylor Swift
  album_count: 9
- name: The National
  album_count: 8
```

This is challenging for me to interpret. Because the dash (`-`) is separating discrete objects (mappings) in the array (sequence). So it _feels_ like the dash (`-`) is a directive for the object (mapping). But it's not, it's communicating that the containing structure is an array.

Pressing into the confusion, consider this array (sequence) containing a string, number, object, and array.

```yaml
- Taylor Swift
- 1989
- album_count: 9
  nationality: American
- - Big Machine
  - Republic
```

This is that same file in JSON.

```json
[
  "Taylor Swift",
  1989,
  {
    "album_count": 9,
    "nationality": "American"
  },
  ["Big Machine", "Republic"]
]
```

### Takeaways

The presence of dash (`-`) and colon (`:`) describe the _surrounding_ structure.

In the case of arrays (sequences) of objects (mappings), with multiple key-value pairs, this terseness can be unclear. At least until you've trained ourselves to see the invisble structures that (`-`) and (`:`) represent.

```yaml
- name: Taylor Swift
  album_count: 9
```

For me, learning to interpret the above line as `an object in an array` has made the biggest difference in my ability to quickly parse YAML.

## YAML patterns

Identifying patterns is helpful.

Here are a few complex handoffs that I had trouble with.

### Array of arrays : sequence of sequences

```yaml
- - Evermore
  - Folklore
  - Lover
- - I Am Easy to Find
  - Sleep Well Beast
  - Trouble Will Find Me
```

This YAML file is an array (sequence) containing two arrays (sequences) each with three strings (scalars).

### Array of objects : sequence of mappings

```yaml
- name: Taylor Swift
  album_count: 9
- name: The National
  album_count: 8
```

This YAML file is an array (sequence) referencing two objects (mappings) each with two key-value pairs.

### Object of arrays : mapping of sequences

```yaml
Taylor Swift:
  - Evermore
  - Folklore
  - Lover
The National:
  - I Am Easy to Find
  - Sleep Well Beast
  - Trouble Will Find Me
```

This YAML file is an object (mapping) with two key-value pairs, each key referencing an array (sequence) of strings (scalars).

### Object of objects : mapping of mappings

```yaml
Taylor Swift:
  album_count: 9
  label: Republic
The National:
  album_count: 8
  label: 4AD
```

This YAML file is an object (mapping) with two key-value pairs, each key referencing another object with two key-value pairs with mixed strings and numbers (scalars) as values.

## All mixed up

Parse isolated patterns is a good start but the big game is reading entire YAML files.

Look at this GitHub Actions workflow.

```yaml
name: Netlify Rebuild
on:
  schedule:
    - cron: "0 21 * * MON-FRI"
jobs:
  build:
    name: Netlify Rebuild
    runs-on: ubuntu-latest
    steps:
      - name: Curl request
        run: curl -X POST -d {} https://api.netlify.com/build_hooks/601321b7879709a8b8874175
```

Here's what we can evaluate.

- The root structure is an object with three properties
- `name` references a string
- `on` references an object with one property
  - `schedule` references an array with one object containing one property
    - `cron` references a string
- `jobs` referencs an object with one property
  - `build` references an object with three properties
    - `name` references a string
    - `runs-on` references a string
    - `steps` references array with an object containing two properties
      - `name` references a string
      - `run` references a string

## Conclusion

I think I understand YAML enough to move on with my life. I hope you feel the same way.

Learning how to identify the implied structures has made all the difference.

## Keep in touch

<br />

<script async data-uid="25d3dad1c6" src="https://chantastic.ck.page/25d3dad1c6/index.js"></script>

repository: rubenmarcus/sites

repo_name: rubenmarcus/sites


text:
# can control name

    Code
      dt %>% count(name = 10) %>% collect()
    Condition
      Error in `check_name()`:
      ! `name` must be a string

repository: tidyverse/dtplyr

gha_language: R

gha_license_id: NOASSERTION

repo_name: tidyverse/dtplyr


text:
# xcframework-maker

![swift 5.4](https://img.shields.io/badge/swift-5.4-orange.svg)
![platform macOS](https://img.shields.io/badge/platform-macOS-blue)
![SPM supported](https://img.shields.io/badge/SPM-supported-green)

macOS utility for converting fat-frameworks to SPM-compatible XCFramework with arm64-simulator support.

## 📝 Description

`make-xcframework` is a simple command-line utility written in Swift that creates **XCFramework** file from fat framework files. The resulting XCFramework file can be added as a dependency to your **Swift Package**, using `.binaryTarget` (read more in [official documentation](https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html)).

Optionally, **arm64-simulator** support can be included in the resulting XCFramework to allow development on a computer with **Apple Silicon (M1)** processor without a need to run Xcode through Rosetta.

The `xcframework-maker` Swift Package contains `make-xcframework` that can be used from the command line and `XCFrameworkMaker` library that you can integrate with your Swift Package and use programmatically.

**Note:** [arm64-to-sim](http://github.com/darrarski/arm64-to-sim) is used to "hack" the native (device) **arm64** architecture slice so it can be used in a simulator running on Apple Silicon. This is an experimental feature, and **it can fail for many reasons**. It was tested and proved to be working with the `GoogleInteractiveMediaAds` dynamic fat framework, but your experience may vary.

## 🛠 Build

Use Swift 5.4 for building the utility on macOS:

```sh
swift build -c release
```

You can copy the executable or run it directly from the build directory:

```sh
.build/release/make-xcframework
```

## ▶ Usage

```
OVERVIEW: Utility for creating XCFramework from legacy fat-framework files.

Use this tool to create XCFramework from legacy fat-framework files. Resulting XCFramework can be
added as a dependency to your Swift Package. Optionally arm64-simulator support can be included in
the resulting XCFramework, so it can be used on M1 Mac without the need to run Xcode through
Rosetta.

USAGE: make-xcframework [-ios <path>] [-tvos <path>] [-arm64sim] -output <path> [-verbose]

OPTIONS:
  -ios <path>             iOS input framework path.
        Provide a path to the iOS fat framework that should be included in the resulting
        XCFramework. Eg "path/to/iOS/Framework.framework"
  -tvos <path>            tvOS input framework path.
        Provide a path to the tvOS fat framework that should be included in the resulting
        XCFramework. Eg "path/to/tvOS/Framework.framework"
  -arm64sim               Add support for arm64 simulator.
        Use device-arm64 architecture slice as a simulator-arm64 architecture slice and include it
        the resulting XCFramework. This makes development possible on M1 Mac without using Rosetta.
  -output <path>          Output directory path.
        Provide a path to a directory where the resulting XCFramework should be created. Eg
        "path/to/output/directory"
  -verbose                Log detailed info to standard output.
        When this flag is provided, detailed information about each performed action is logged to
        standard output.
  -help, -h               Show help information.
```

### Example - GoogleInteractiveMediaAds

1. Download GoogleInteractiveMediaAds fat-frameworks from Google website:
    - [IMA SDK for iOS](https://developers.google.com/interactive-media-ads/docs/sdks/ios/dai/download)
    - [IMA SDK for tvOS](https://developers.google.com/interactive-media-ads/docs/sdks/tvos/dai/download)
2. Unzip downloaded files.
3.  Resulting XCFramework will be created in the provided output directory:

    ```sh
    output/path/GoogleInteractiveMediaAds.xcframework
    ```

## ☕ Do you like the project?

## 📄 License

Copyright © 2021 Dariusz Rybicki Darrarski

License: [MIT](LICENSE)

repository: TrendingTechnology/xcframework-maker

repo_name: TrendingTechnology/xcframework-maker


text:
This project will no longer be updated as this functionality is now replaced by Hacker News' own implementation.  Yay!

#Collapser News

Browser extension for adding [+] and [-] collapse buttons to [Hacker News](http://news.ycombinator.com/) comment threads

##Install
Visit the [Chrome Web Store](https://chrome.google.com/webstore/detail/collapser-news/bffohhiiomenpdhhdpepecklnienjkjg) page, add to chrome, and enable!

##Screenshot
![Collapser News](/res/screenshot_big.png)

This software is licensed under the MIT license

repository: pgoggijr/CollapserNews

repo_name: pgoggijr/CollapserNews


text:
# Platform Compatibility Script

IoT Edge Compatibility script performs many checks to figure out whether a platform has necessary capabilities to run IoT Edge. The script is useful when one has to find if IoT Edge can run in a custom-built OS other than the one listed in [supported IoT Edge platforms](https://docs.microsoft.com/en-us/azure/iot-edge/support?view=iotedge-2020-11). The recommendation is to run this script before installing IoT edge to ensure if the platform has all the capabilities to get started.

## List of Checks

Following are the checks that are performed in the Platform Compatibility script.

### Root User
* To ensure the script has root privileges to perform certain operations.
### Control Groups
* To ensure cgroups hierarchy exist in the current platform.
### Kernel Flags
* The following kernel flags are checked for various capabilities that are necessary for the full functionality of IoT Edge.
	* EXT4_FS_SECURITY
	* NAMESPACES
	* NET_NS
	* PID_NS
	* IPC_NS UTS_NS
	* CGROUPS
	* CGROUP_CPUACCT
	* CGROUP_DEVICE
	* CGROUP_FREEZER
	* CGROUP_SCHED CPUSETS MEMCG
	* KEYS
	* VETH BRIDGE BRIDGE_NETFILTER
	* IP_NF_FILTER
	* IP_NF_TARGET_MASQUERADE
	* NETFILTER_XT_MATCH_ADDRTYPE
	* NETFILTER_XT_MATCH_CONNTRACK
	* NETFILTER_XT_MATCH_IPVS
	* NETFILTER_XT_MARK
	* IP_NF_NAT NF_NAT
	* POSIX_MQUEUE
### Systemd
* Presence of systemd is needed to manage IoT edge services. Its absence alerts to manage them separately.
### Supported Architecture
* IoT Edge does not support all architecture and the check evaluates if the current platform architecture is supported or not.
### Container Engine Client API
* Currently the minimum verion of the Docker engine client API is checked.
### Shared Library Dependency
* IoT Edge has dependency on shared libraries that are part of the OS distro. This check evaluates if the current platform's OS has all the required libraires. Example libraries are `libssl.so.1.1` , `libcrypto.so.1.1` etc.
### Storage Space
* To ensure enough storage space exists in the platform which is needed for the IoT edge binaries and a simple workload of IoT edge containers.
### Memory Space
* To ensure enough memory exists in the platform which is needed for the IoT edge binaries and a simple workload of IoT edge containers.
### Package Managers and CA certificates
* To ensure the platform has supported package managers like `apt-get`, `dnf`, `yum`,`dpkg` and `rpm`. The high level package managers like `apt-get` , `dnf` and `yum` ensures to install the additional packages like ca-certificates. So an additional check is performed with packages managers like `dpkg` and `rpm` to ensure `ca-certificates` in installed.

## Usage

 * To download the script, use the following command

`wget aka.ms/aziot-compatibility.sh`

* To make script executable, use the following command

`chmod +x ./aziot-compatibility.sh`

* To run the script, use the following commands for help.

`./aziot-compatibility.sh --help` or `./aziot-compatibility.sh -h`

* To list the apps that are supported by the Compatibility script

`./aziot-compatibility.sh --list-apps` or `./aziot-compatibility.sh -l`

* To enable the debug logs of the script
`./aziot-compatibility.sh -v` or `./aziot-compatibility.sh --verbose`

* To know the version of the IoT edge supported by the Compatibility script
`./aziot-compatibility.sh --app-version`

## Output

The Compatibility script outputs the results in the following categories

* Successful - Checks that are passed
* Errors - Checks that have failed
* Warning - Checks that have warning messages for alerts of action.
* Skipped - Checks that have been skipped

repository: Azure/iotedge

repo_name: Azure/iotedge


text:
This cop identifies places where `$stderr.puts` can be replaced by
`warn`. The latter has the advantage of easily being disabled by,
e.g. the -W0 interpreter flag, or setting $VERBOSE to nil.

### Example:
    # bad
    $stderr.puts('hello')

    # good
    warn('hello')

repository: duduribeiro/codeclimate-rubocop

repo_name: duduribeiro/codeclimate-rubocop


text:
# NLP Modeling Library

This libary provides a set of Keras primitives (Layers, Networks, and Models)
that can be assembled into transformer-based models. They are
flexible, validated, interoperable, and both TF1 and TF2 compatible.

* [`layers`](layers) are the fundamental building blocks for NLP models.
They can be used to assemble new layers, networks, or models.

* [`networks`](networks) are combinations of layers (and possibly other networks). They are sub-units of models that would not be trained alone. They
encapsulate common network structures like a classification head
or a transformer encoder into an easily handled object with a
standardized configuration.

* [`models`](models) are combinations of layers and networks that would be trained. Pre-built canned models are provided as both convenience functions and canonical examples.

* [`losses`](losses) contains common loss computation used in NLP tasks.

Besides the pre-defined primitives, it also provides scaffold classes to allow
easy experimentation with noval achitectures, e.g., you don’t need to fork a whole Transformer object to try a different kind of attention primitive, for instance.

* [`TransformerScaffold`](layers/transformer_scaffold.py) implements the
Transformer from ["Attention Is All You Need"]
(https://arxiv.org/abs/1706.03762), with a customizable attention layer
option. Users can pass a class to `attention_cls` and associated config to
`attention_cfg`, in which case the scaffold will instantiate the class with
the config, or pass a class instance to `attention_cls`.

* [`EncoderScaffold`](networks/encoder_scaffold.py) implements the transformer
encoder from ["BERT: Pre-training of Deep Bidirectional Transformers for
Language Understanding"](https://arxiv.org/abs/1810.04805), with customizable
embedding subnetwork (which will replace the standard embedding logic) and/or a
custom hidden layer (which will replace the Transformer instantiation in the
encoder).

BERT and ALBERT models in this repo are implemented using this library. Code examples can be found in the corresponding model folder.


text:
# Volumetric Modelling: Assigment 2

## Modelling Task

Assume a hypothetical or actual space frame structure: an assembly made of nodes and edges. Formulate a design strategy based on assumed or given constraints. Model the geometry of one connector node, using an approach that would generalise for all the nodes in the system, independent of the number and angle of edges.

Choose strategies for reducing the weight of the part or increasing its strength with the same weight respectively. For doing so, employ internal lattice fills, smooth corner blends but also surface patterning, ribs, beads (German: "Sicken"). Use to your advantage that whether or not the node is structurally sound will not factor in the grading.

## Required Hand-ins

Please upload to github:
- the **jupyter notebook** with the ipyvolume viewers embedded
- a **sketch** like the one below that shows the entire structure for context. It can be as random as this, no need to first create an actual architectural design
- ![spaceframe](spaceframe.png)
- indicate the node you choose to model
- an `*.obj` file of the final mesh (using `utilities > export_ipv_mesh()`)


text:
# ADVISe

We introduce an interactive visualization called ADVISe, which tackles the
problem of visualizing evolutions in enzyme annotations across several releases
of the UniProt/SwissProt database. More specifically, we visualize the dynamics
of Enzyme Commission numbers (EC numbers), which are a numerical and
hierarchical classification scheme for enzymes based on the chemical reactions
they catalyze.

## Configuration

### Database

ADVISe uses data stored in a MySQL database. Please set up your environment
according to instructions of the [MySQL website][mysql].

You must then download the [database dump of our project][dump], untar the file
and apply it to your database:

    $ tar xvfj ADVISe.tar.bz2
    $ mysql -u <your_username> -p <database_to_be_used> < ADVISe.sql

### Processing

The Processing code is located on the `Processing/ADVISe` folder, and should run
on major operating systems. To download the Processing Sandbox go to
[the website][processing].

You need to download the SQLibrary by Florian Jenett at [this link][sqlibrary]
and follow the instructions on the same link.

The template file `mysql_settings.txt.template` should be used to tell the
program how to access your database:

    $ cp mysql_settings.txt.template mysql_settings.txt

After that, simply edit it to match your database configuration

## License

Released under the [MIT License][license].

[sqlibrary]:http://bezier.de/processing/libs/sql/
[processing]:http://www.processing.org/
[license]:https://github.com/arturhoo/ADVISe/blob/master/LICENSE.md
[mysql]:http://dev.mysql.com/downloads/mysql/
[dump]:https://s3.amazonaws.com/artur/ADVISe.tar.bz2

repository: arturhoo/ADVISe

repo_name: arturhoo/ADVISe


text:
---
title: "About"
permalink: "/about/"
layout: page
---

![](/assets/images/avatar.jpg)

Joshua works as a Senior Security Researcher, where he performs malware reverse engineering and intelligence analysis. Joshua has presented at DEF CON, BSidesLV, BSides Calgary, BSides Edmonton and RSAC focusing on ransomware, malicious document analysis, and cryptojacking malware. He is also the co-author of the SAIT Polytechnic [Information Systems Security diploma](https://www.sait.ca/programs-and-courses/full-time-studies/diplomas/information-systems-security) malware analysis course.

license: Unlicense


text:
---
title: PGLib.jl
summary: Data library in `Julia` for easy access to the [Optimal Power Flow benchmark library](https://github.com/power-grid-lib/pglib-opf) provided by the [IEEE PES Task Force on Benchmarks for Validation of Emerging Power System Algorithms](https://power-grid-lib.github.io/).

tags:
  - Dataset
date: '2019-08-01T00:00:00Z'

# Optional external URL for project (replaces project detail page).
external_link: 'https://github.com/noahrhodes/PGLib.jl'

image:
  caption: Photo by rawpixel on Unsplash
  focal_point: Smart

links:
  # - icon: twitter
  #   icon_pack: fab
  #   name: Follow
  #   url: https://twitter.com/georgecushen
url_code: 'https://github.com/noahrhodes/PGLib.jl'
# url_pdf: ''
# url_slides: ''
# url_video: ''

# Slides (optional).
#   Associate this project with Markdown slides.
#   Simply enter your slide deck's filename without extension.
#   E.g. `slides = "example-slides"` references `content/slides/example-slides.md`.
#   Otherwise, set `slides = ""`.
# slides: example
---

TODO short blurb.


text:
---
layout: page
title: "Introduction"
date: 2013-08-01 16:19
comments: true
sharing: true
footer: true
---
What?
-----
Doxecute is a document based database with basic SQL support such as INSERT, UPDATE, DELETE, and SELECT statement. No more complicated JavaScript filters, expressions, callback functions.

It is schemaless. Because it is a document based database, you can insert or update your document using JSON format without even issuing CREATE TABLE statement. Instead of a table, you have a collection where you put all kinds of JSON documents you want to store.

Doxecute support SQL from version 1.0. JavaScript will be supported from version 2.0.

Why?
----
Popular document based databases support JavaScript as a query language. However, we database guys are familiar with SQL. You can run ad-hoc queries simply by issuing a SQL statement. The SELECT statement supports WHERE, INNER JOIN, GROUP BY, and ORDER BY clause.

Doxecute separates different kinds of JSON documents into different storage to reduce reading unnecessary data from disk while running your query on a specific kind of JSON document.

How?
----
Doxecute is carefully designed to support transaction feature on a document based database. It automatically categorizes JSON documents based on the similarity between documents to store different kinds of JSON documents on different storage. It results in reduced amount of I/O for running a query on a specific kind of JSON documents.

Tutorial?
---------
To check out the tutorial on deploying Doxecute on Amazon EC2 node and manipulating JSON documents with SQL, click [here](tutorials).

When?
-----
The first closed alpha testing starts on 15th Aug. To join the alpha testing, click [here](alpha-testing).

repository: bigdatatools/doxecute-landing-page

extension: markdown

repo_name: bigdatatools/doxecute-landing-page


text:
---
layout: default
---

# 1997-01-20 - [Math Noise]

## Header Data

From<EMAIL_ADDRESS>(Mike Duvos)

To<EMAIL_ADDRESS>Message Hash: 9b6884431893da126a3037f35794f5094cb86e4ccecbc8df8c476137ce8359d7

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-01-20 02:23:19 UTC

Raw Date: Sun, 19 Jan 1997 18:23:19 -0800 (PST)

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>(Mike Duvos)
Date: Sun, 19 Jan 1997 18:23:19 -0800 (PST)
To<EMAIL_ADDRESS>Subject: [Math Noise]
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Jim Choate<EMAIL_ADDRESS>writes:

 > In reference to numbers which you can't describe, if you
 > examine the work they are ALL in the Complex domain, none of
 > them are Real's.

Only countably many real numbers, or members of any uncountable
set, are denumerable. It is the property of being uncountable,
rather than of being real or complex, which is important here.

In general, only countably many members of any uncountable set
can be precisely specified within any formal system, given names
comprised of strings of symbols, or other similar things.

 > Complex numbers deal with areas, not with lengths.

It is often convenient, such as when drawing contour maps, to
consider the complex numbers to be in 1-1 correspondence with the
points of the plane.  However, I wouldn't necessarily consider
regions of the complex plane to have "area" in the Euclidian
sense.

 > If there existed a Real for which we could not describe
 > this would imply that we could not draw a line of that
 > length.

We can't physically draw a line segment to arbitrary high
precision. We can conceive of the notion of line segments being
in 1-1 correspondence with the reals, but we can specify at most
countably many "finitely denumerable" line segments if we wish to
discuss their lengths individually.

--
     Mike Duvos         $    PGP 2.6 Public Key available     $
<EMAIL_ADDRESS>   $    via Finger.                      $

{% endraw %}
```

## Thread

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

+ Return to<EMAIL_ADDRESS>(Mike Duvos)](/authors/mpd_at_netcom_com_mike_duvos_)"

+ 1997-01-20 (Sun, 19 Jan 1997 18:23:19 -0800 (PST)) - [Math Noise] -<EMAIL_ADDRESS>(Mike Duvos)_


text:
# api

An application built with [aqueduct](https://github.com/stablekernel/aqueduct).

## Running the Application in Development

Run `aqueduct serve` from this directory to run the application.

If you wish to use the debugger in your IDE, run the `bin/main.dart` script from your IDE.

## Running Application Tests

To run all tests for this application, run the following in this directory:

```
pub run test
```

You may also run tests from an IntelliJ IDE by right-clicking on a test file or test case and selected 'Run tests'.

Tests will be run using the configuration file `config.src.yaml`. This file should contain  test configuration values and remain in source control. This file is the template for `config.yaml` files, which live on deployed server instances.

See the application test harness, `test/app/harness.dart`, for more details. This file contains a `TestApplication` class that can be set up and torn down for tests.

For more information, see [Getting Started](https://aqueduct.io/docs/) and [Testing](https://aqueduct.io/docs/testing/overview).

## Application Structure

Routes and other initialization are configured in `lib/api_sink.dart`. Endpoint controller files are in `lib/controller/`.

## Configuration

The file `config.src.yaml` is used for testing: it should be checked into source control and contain values for testing purposes. It should maintain the same keys as `config.yaml`.

## Creating API Documentation

In the project directory, run:

```bash
aqueduct document
```

This will print a JSON OpenAPI specification to stdout.

## Deploying an Application

See the documentation for [Deployment](https://aqueduct.io/docs/deploy/overview/).

repository: aloisdeniel/dart-fullstack

repo_name: aloisdeniel/dart-fullstack


text:
# Expiring Tokens for Django Rest Framework

[![Build Status](https://travis-ci.org/JamesRitchie/django-rest-framework-expiring-tokens.svg?branch=master)](https://travis-ci.org/JamesRitchie/django-rest-framework-expiring-tokens)
[![Coverage Status](https://coveralls.io/repos/JamesRitchie/django-rest-framework-expiring-tokens/badge.svg)](https://coveralls.io/r/JamesRitchie/django-rest-framework-expiring-tokens)
[![Code Health](https://landscape.io/github/JamesRitchie/django-rest-framework-expiring-tokens/master/landscape.svg?style=flat)](https://landscape.io/github/JamesRitchie/django-rest-framework-expiring-tokens/master)
[![PyPI version](https://badge.fury.io/py/djangorestframework-expiring-authtoken.svg)](http://badge.fury.io/py/djangorestframework-expiring-authtoken)
[![Requirements Status](https://requires.io/github/JamesRitchie/django-rest-framework-expiring-tokens/requirements.svg?branch=master)](https://requires.io/github/JamesRitchie/django-rest-framework-expiring-tokens/requirements/?branch=master)

This package provides a lightweight extension to the included token
authentication in
[Django Rest Framework](http://www.django-rest-framework.org/), causing tokens
to expire after a specified duration.

This behaviour is good practice when using token authentication for production
APIs.
If you require more complex token functionality, you're probably better off
looking at one of the OAuth2 implementations available for Django Rest
Framework.

This package was inspired by this
[Stack Overflow answer](http://stackoverflow.com/a/15380732).

## Installation

Expiring Tokens is tested against the latest versions of Django 1.6, 1.7 and
the 1.8 preview release, and Django Rest Framework 3.1.1.
It should in theory support Django 1.4.

Grab the package from PyPI.

```zsh
pip install djangorestframework-expiring-authtoken
```

As this package uses a proxy model on the original Token model, the first step
is to setup the default
[TokenAuthentication](http://www.django-rest-framework.org/api-guide/authentication/#tokenauthentication)
scheme, and check that it works.

Then, add the package to `INSTALLED_APPS` along with `rest_framework.authtoken` in `settings.py`.

```python
INSTALLED_APPS = [
    ...
    'rest_framework',
    'rest_framework.authtoken',
    'rest_framework_expiring_authtoken',
    ...
]
```

Specify the desired lifespan of a token with `EXPIRING_TOKEN_LIFESPAN` in
`settings.py` using a
[timedelta object](https://docs.python.org/2/library/datetime.html#timedelta-objects).
If not set, the default is 30 days.

```python
import datetime
EXPIRING_TOKEN_LIFESPAN = datetime.timedelta(days=25)
```

[Set the authentication scheme](http://www.django-rest-framework.org/api-guide/authentication/#setting-the-authentication-scheme) to `rest_framework_expiring_authtoken.authentication.ExpiringTokenAuthentication`
on a default or per-view basis.

If you used the `obtain_auth_token` view, you'll need to replace it with the  `obtain_expiring_auth_token` view in your URLconf.

```python
from rest_framework_expiring_authtoken import views
urlpatterns += [
    url(r'^api-token-auth/', views.obtain_expiring_auth_token)
]
```

If using Django 1.7 or later, you'll need to run `migrate`, even though nothing
is changed, as Django requires proxy models that inherit from models in an
app with migrations to also have migrations.

```zsh
python manage.py migrate
```

## Usage

Expiring Tokens works exactly the same as the default TokenAuth, except that using an expired token will return a response with an HTTP 400 status and a `Token has expired` error message.

The `obtain_expiring_auth_token` view works exactly the same as the `obtain_auth_token` view, except it will replace existing tokens that have expired with a new token.

## Improvements

 * Variable token lifespans.
 * Possibly change `obtain_expiring_auth_token` to always replace an existing token. (Configurable?)
 * South Migrations

## Contributors

 * [James Ritchie](https://github.com/JamesRitchie)
 * [fcasas](https://github.com/fcasas)

## Changelog

 * 0.1.4
  * Fixed a typo causing an incorrect 500 error response with an invalid token.
  * Support Django 1.10 and Django Rest Framework 3.4
 * 0.1.3
  * Set a default token lifespan of 30 days.
 * 0.1.2
  * Changed from deprecated `request.DATA` to `request.data`
 * 0.1.1
  * Initial release


text:
# PostAPL

PostAPL is a tool for transforming Alexa Presentation Language (APL) documents with JS plugins.
These plugins can add, remove, and modify APL nodes and bring consistency to all the APL docs in a project.

PostAPL takes an APL file (JSON with or without comments) and provides an API to analyze and modify its nodes
(by transforming them into an [Abstract Syntax Tree]).
This API can then be used by [plugins] to do a lot of useful things,
e.g., remove properties with empty or null values, report on mainTemplate structure.

For PostAPL commercial support (consulting, PostAPL plugins), contact [Mark Tucker](https://twitter.com/marktucker).

[Abstract Syntax Tree]: https://en.wikipedia.org/wiki/Abstract_syntax_tree
[plugins]:              https://github.com/postapl/postapl#plugins

## Plugins

PostAPL is just getting started and we are open to plugin suggestions. You can find all of the plugins
in the [plugins list]. Below is a list
of our favorite plugins — the best demonstrations of what can be built
on top of PostAPL.

If you have any new ideas, [PostAPL plugin development] is really easy.

[plugins list]:       https://github.com/postapl/postapl/blob/main/docs/plugins.md

### General

* [postapl-remove-empty](https://github.com/postapl/postapl-remove-empty) finds properties whose values are null, empty string, empty array, or empty object and removes them.

[PostAPL plugin development]:   https://github.com/postapl/postapl/blob/main/docs/writing-a-plugin.md

### Reporters

* [postapl-mermaid-graph] creates graph data for [Mermaid Live Editor] of the Component tree of your APL or of the AST.

[Mermaid Live Editor]: https://mermaid.live
[postapl-mermaid-graph]: https://github.com/postapl/postapl-mermaid-graph/

## Usage

You can start using PostAPL in just two steps:

1. Find and add PostAPL extensions for your build tool.
2. [Select plugins] and add them to your PostAPL process.

[Select plugins]: https://github.com/postapl/postapl#plugins

### JS API

For other environments, you can use the JS API:

```js
const { postapl } = require('postapl');
const removeEmpty = require('postapl-removeempty');
const fs = require('fs');

fs.readFile('src/screen.json', (err, apl) => {
  postapl([removeEmpty])
    .process(apl, { from: 'src/screen.json', to: 'dest/screen.json' })
    .then(result => {
      fs.writeFile(result.opts.to, result.apl, () => true)
    })
});
```

Read the [PostAPL API documentation] for more details about the JS API.

### Options

Most PostAPL runners accept two parameters:

* An array of plugins.
* An object of options.

Common options:

* `from`: the input file name.
* `to`: the output file name.

repository: postapl/postapl

repo_name: postapl/postapl


text:
# Required tools
1. Sign up for free Azure account and get Api key: https://azure.microsoft.com/en-us/services/cognitive-services/face/
2. Download Visual Studio Community edition and install Workflow Foundation from options. https://visualstudio.microsoft.com/downloads/

## Platform
1. Windows only
2. Requires .net framework 4.7.2
3. Requires Workflow Foundation runtimes, read more at https://docs.microsoft.com/en-us/dotnet/framework/windows-workflow-foundation/whats-new-in-wf-in-dotnet

## Before compiling and running
Please note that you will need to open up main workflow (Workflow1.xaml) and change values assigned to ApiKey, ApiUrl and ImageFolderPath variables to match personal settings, without valid values demo will cause exception and fail.

# Application context
This application will map out set folder, find all files with .jpg extension and submit them to Azure Face API, download detection result in Json and save it to the set folder with same name as the image file (except with .json extension instead of .jpg).
## Workflow1
![Workflow1](https://github.com/malrock/tyloeng051118/blob/master/workflow/Workflow1.jpg)
## Image processing loop
![process images loop](https://github.com/malrock/tyloeng051118/blob/master/workflow/Process%20each%20image.jpg)


text:
# GrayNet-Keras
* A versatile model for Deep learning application for CT images
* Keras implementation

## Publications
(Stone AI) Urinary Stone Detection on CT Images Using Deep Convolutional Neural Networks: Evaluation of Model Performance and Generalization, Radiology AI, 2019, [link](https://pubs.rsna.org/doi/10.1148/ryai.2019180066)
(Organ segmentation) C-MIMI 2019 presentation [link](https://cdn.ymaws.com/siim.org/resource/resmgr/mimi19/oral4/GrayNet_Kim.pdf)

## How to install
```shell
## go to your project folder
$ cd <your project path>
$ git clone https://github.com/LMIC-MGH/graynet_keras
```
## How to use
```python
from keras.layers import Input, GlobalAveragePooling2D, Dense
from keras.models import Model
from graynet_keras import DenseNet121_GrayNet

# Set your input
input_shape = (256,256,1)
input_tensor = Input(input_shape, name='input')

# Add densnet archtecture with pretrained weight of graynet
# last layer of graynet is global average pooling layer
model = Densenet121_GrayNet(input_tensor=input_tensor, weights='graynet', w_reg=None)

# Set a fully connected layer for your model
output = model.output
output = Dense(units=1, activation='sigmoid', name='fc')(output) ## Your label

model = Model(inputs=input_tensor, outputs=output, name='main_model')
model.summary()

# ... compile your model and run!
# Please see example.ipynb for more example (Jupyter notebook)
# Model archtecture
```

### How to excute Jupyter example codes
```shell
cp GrayNet_example.ipynb ../GrayNet_example.ipynb
```
Then, see & run the codes!


text:
# Heroes Board Game
[![Website](https://img.shields.io/website?label=Gigalixir&url=https%3A%2F%2Fheroes-oblivion.gigalixirapp.com%2Fping)](https://heroes-oblivion.gigalixirapp.com/game)

It is a very simple web game consisting on a 2D grid board with heroes and basic gameplay mechanics.

Players can move heroes across the board except on walls. The goal is to kill other players casting _invisible_ attacks.

There's an instance of the game deployed on [Gigalixir](https://heroes-oblivion.gigalixirapp.com/game).

### Game mechanics
- When player joins a hero is spawned on a random walkable tile
- **Arrow keys** control movements and **space bar** attacks
- Each attack spreads within a radius of 1 tile around the hero
- All enemies in range are attacked at the same time
- One hit is enough to kill

### Where is the focus …
- As much vanilla Elixir as possible
- Software architecture, separation of concerns, readable and testable code
- Production-ready code
- OTP facilities (GenServers, Supervisors) and message passing
- Enough tests for the business logic

### … and where is NOT
- Frontend code
- GUI and interactions
- Libraries (except for the web part)

repository: miquecg/heroes-board-game

gha_language: Elixir

repo_name: miquecg/heroes-board-game


text:
[![Build Status](https://travis-ci.org/tinverse/tsm.svg?branch=master)](https://travis-ci.org/tinverse/tsm)
[![codecov.io](http://codecov.io/github/tinverse/tsm/coverage.svg?branch=master)](http://codecov.io/github/tinverse/tsm?branch=master)
[![Coverity Scan](https://scan.coverity.com/projects/17873/badge.svg)](https://scan.coverity.com/projects/tinverse-tsm)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

The [C++ API documentation](https://tinverse.github.io/tsm/index.html).

### What is tsm?
tsm is a flexible state machine framework with support for Hierarchical and Orthogonal State Machines.

### Features:
    * Hierarchical State machine.
    * Thread safe event queue - Parent (or Single) and Separate (or Async) thread execution context.
    * Ease of installation/distribution - Header only, CMake and Nix support.
    * Policy Based - Ability to customize behavior by defining execution policies.

### Usage
Assume you have a `CdPlayer` state machine. You can create an instance and send events to it.

```
#include <tsm.h>

SingleThreadedHsm<CdPlayer> sm;
sm.send_event(play);
sm.step(); // take the 'play' event from the event queue and transition to the next state
```

or

```cpp
AsynchronousHsm<CdPlayer> sm;
sm.send_event(play);
```

Note that the call to `sm.step()` is not required for the `AsynchronousHsm`. Events are processed in a separate thread.

#### HsmDefinition Class Definition
Your CdPlayer state machine will have States, Events, Actions, Guards and a Transition Table.  It could also  have sub Hsms or orthogonal state machines as states.

##### States, Events, Actions and Guards
```cpp
struct CdPlayer : public HsmDefinition<CdPlayer>
{
    // Actions
    void PlaySong()
    {
        LOG(INFO) << "Play Song";
    }

    // Guards
    bool PlaySongGuard()
    {
        DLOG(INFO) << "Play Song Guard";
        return true;
    }
    // States
    State Stopped;
    HsmExecutor<PlayingHsmDef> Playing;
    State Paused;
    State Empty;
    State Open;

    // Events
    Event play;
    Event open_close;
    Event stop_event;
    Event cd_detected;
    Event pause;
    Event end_pause;
}
```

Actions and Guards are member functions with the above signatures. States and Events are data members.

##### State Transition Table
The state transition table is specified in `CdPlayer`'s constructor.

```csharp
CdPlayer(IHsmDef* parent = nullptr)
      : HsmDefinition<CdPlayer>("CD Player Hsm", parent)
      , Stopped("Player Stopped")
      , Playing(this)
      , Paused("Player Paused")
      , Empty("Player Empty")
      , Open("Player Open")
    {
        // TransitionTable for CdPlayer Hsm
        add(Stopped, play, Playing);
        add(Stopped, open_close, Open);
        add(Stopped, stop_event, Stopped);
        //-------------------------------------------------
        add(Open, open_close, Empty);
        //-------------------------------------------------
        add(Empty, open_close, Open);
        add(Empty, cd_detected, Stopped);
        add(Empty, cd_detected, Playing);
        //-------------------------------------------------
        add(Playing, stop_event, Stopped);
        add(Playing, pause, Paused);
        add(Playing, open_close, Open);
        //-------------------------------------------------
        add(Paused, end_pause, Playing);
        add(Paused, stop_event, Stopped);
        add(Paused, open_close, Open);
    }
```

##### Start and Stop States
Also specify the start and stop states within `CdPlayer`

```cpp
State* getStartState() override { return &Song1; }
State* getStopState() override { return nullptr; }
```

Please browse the [C++ API documentation](https://tinverse.github.io/tsm/index.html) for more details.

### Build

#### Nix - Highly recommended
Install nix by running `curl https://nixos.org/nix/install | sh`. The `default.nix` file is responsible for setting up your environment and installing all required dependencies.

```console
nix-shell --run ./build.sh
```

And you are done! If you open `build.sh` you'll notice that it uses ninja instead of make. `build.sh` creates a build folder, invokes cmake to generate the build scripts and then calls ninja or make via the `cmake --build` command to create the build outputs. You can find the test executable `tsm_test` under `build/test`, documentation under `build/docs/html` and coverage data under `test/tsm_test-coverage`. For your normal workflow,

```console
nix-shell
cd build
ninja tsm_test
```

Other build targets are `coverage` `tsm_doc`. These can be invoked as needed - `ninja coverage`, `ninja tsm_doc` or just plain `ninja` from the build folder.

You can also run `nix-build` from the command-line. This will build all targets and deploy them to `/nix/store`. A sym-link named `result` will be created in the cloned folder (the folder that contains default.nix) to the `/nix/store`. So to invoke tsm_test, run `./result/test/tsm_test`.

#### CMake only
If you don't want to install nix, `sudo apt install cmake ninja-build graphviz doxygen` or `brew install cmake ninja graphviz doxygen`. Read the `CMakeLists.txt` to get a good feel for it. The `cmake/superbuild` folder contains the cmake files that download and install the external dependencies. With Nix, none of these cmake files are needed. The dependencies and environment will be set up when you invoke `nix-shell` or `nix-build`.

```console
git clone https://github.com/tinverse/tsm.git
cd tsm; mkdir build; cd build
# cmake .. && make #if you want to use make
cmake -GNinja .. && ninja
./test/tsm_test
```

### External Dependencies:
    None, if you just want to use the library. Just `#include <tsm>` and start using it! Catch2 unit test framework if you wish to run the unit tests. Set the BUILD_TESTING option in the CMake file to OFF if not needed.

### TODOs
    * UML front end to define State Machine.
    * Expand OrthogonalHsmExecutor support to arbitrary number of Hsms.
    * Implement concurrent execution policy for OrthogonalHsmExecutor.

repository: oxillo/tsm

repo_name: oxillo/tsm


text:
# minenv
Feeds `getenv()`, `$_ENV` and `$_SERVER` with `.env` file's contents.

An incomplete rewrite of [PHP dotenv](https://github.com/vlucas/phpdotenv).

## Purpose

**[You should never commit your production keys to a public repo.](http://www.securityweek.com/github-search-makes-easy-discovery-encryption-keys-passwords-source-code)** [Never.](http://blog.nortal.com/mining-passwords-github-repositories/) [Ever.](http://evandrix.svbtle.com/how-i-gained-access-to-amazon-ec2-servers-from-github-search-adapted) You can publish developer settings, sure -- if you know your setup is safe and unavailable to access from outside. But for most people, configuration contains sensitive data like keys to external APIs, live database credentials and other details that the public shall not see.

Ignored config files are good, but setting the sensitive data directly in the environment is better on the production servers. And to imitate the behaviour in the development? Just use minenv.

## Usage

List the variables in `.env` file in a convenient location, away from users
```
SECRET_KEY=314b0r47353cr37k3y
APP_DSN="mysql:host=localhost;dbname=yourdb;charset=utf8"
APP_USER=yourname
APP_PASS=w3zn13pr0bujh4k0w4c
```

To use the variables, require the `minenv.php` and `loadenv()`.
```php
<?php
require 'minenv.php';
loadenv(__DIR__);
```

You can use composer, too! Just add `pawelabrams/minenv` to your project requirements.
```php
<?php
require 'vendor/autoload.php';
loadenv(__DIR__);
```

The arguments are:
1. the path in where to look for `.env` (required),
2. the name of the file if other than `.env`,
3. options array.

Currently, the only option to set is mutability: both `['mutable' => true]` and `['mutable']` set the precedence of the `.env` variables higher than those which were already set.

## More tricks

Comments can be added using `#`; be sure to include at least one space between the value and the comment when using them on the same line.
```
# this is a comment!
APP_USER = root # the comment's ok, but don't use root user for apps unless necessary
APP_PASS = 3#thisIsStillPartOfPassword
```

Use a different filename:
```php
<?php
require 'minenv.php';
loadenv(__DIR__, '.config');
```

Set to mutable (`.env` overwrites anything it is able to):
```php
<?php
require 'minenv.php';
loadenv(__DIR__, '.env', ['mutable']); # or array('mutable') / array('mutable' => true)
```

As in dotenv, you can add `export` to be able to `source` the file in bash, but nested variables (`$APP_DSN`) are not currently supported in minenv. They will work in bash, though, so you were warned!

```
export S3_BUCKET=bucketname
```

repository: pawelabrams/minenv

repo_name: pawelabrams/minenv


text:
# UDDSketch -  Uniform DDSketch

A C implementation of the DDSketch algorithm [\[1\]][1] for quantile estimation with the following additions:

- uniform collapsing strategy, as described in [\[2\]][2];
- additional sketch implementation for dealing with negative values.

The code is inspired by the Java implementation of DDSketch [\[3\]][4] from [Datadog, Inc.][3]  and make use of the `libdict` C library from Farooq Mela [\[4\]][5].

# Build
Tested on Linux and macOS, it should work on other UNIX-like OSes.

You need CMake 3.15 or higher and build tools installed.

Run the script `build.sh`. At the end, a sub-directory named 'install' will be created in which you will find the binary executable.

# Version history

- v1.3   fixed a bug related to an incorrect handling of zero values in some cases
- v1.2.1 fixed a regression issue introduced in v1.2
- v1.2   fixed some additional memory leaks arising when removing items
- v1.1   fixed some memory leaks
- v1.0   initial release

# Usage

The executable can be run as follows:

uddsketch-test -f <input filaname> -b <buckets> -a <alpha> -s <store> -n -o

In particular:

- the input file must be a binary file storing an array of doubles; this
  parameter is mandatory;
- the number of buckets is the maximum number of buckets except when the store
  selected with -s is the unbounded map store (i.e., -s 0) in which case it is
  ignored; in the other cases, the default value is 256;
- alpha is the desired accuracy parameter; the default value is 0.01;
- store is a parameter related to different implementations:

  s = 0 unbounded map store (no collapses, implements DDSketch);
  s = 1 collapsing last two buckets map store (note: the last two buckets are
  not necessarily adjacent, implements DDSketch);
  s = 2 collapsing first two buckets map store (note: the first two buckets are
  not necessarily adjacent, implements DDSketch);
  s = 3 uniform collapse map store (implements UDDSketch);
  s = 4 uniform collapse map store with initial alpha value set by the code considering a predefined number of collapses (implements UDDSketch);
  i.e., the alpha value set by -a is the desired target accuracy and the code
  automatically selects an initial alpha value so that the desired target alpha
  value is not exceeded (warning: this is true only if the number of buckets is
  large enough; see the paper for additional details;

  the default value is 0 (unbounded map store);

- the parameter -n is required ONLY if the input includes negative values;
- the parameter -o is required ONLY if the output is desired in csv format.

### Notes
- Although this implementation of UDDSketch can handle element removals, the test code in uddsketch-test does not deal with this case.
  If your code also remove items, remember that you need to compute exact quantiles on the final stream resulting from insertions and deletions, not on the initial input!
  Otherwise, when you compare exact versus approximate quantiles output from UDDSketch, the results will not be correct.
- This implementation may not work with alpha values that are too small (less than 10^-6).

# References
\[1\] **Charles Masson, Jee E. Rim and Homin K. Lee**. *DDSketch: a fast and fully-mergeable quantile sketch with relative-error guarantees*. Proceedings of the VLDB Endowment 12.12 (2019): 2195-2205.

\[2\] **Italo Epicoco, Catiuscia Melle, Massimo Cafaro, Marco Pulimeno, Giuseppe Morleo.** *UDDSketch: Accurate Tracking of Quantiles in Data Streams.*

[1]: <http://www.vldb.org/pvldb/vol12/p2195-masson.pdf> "DDSketch: A Fast and fully-Mergeable Quantile Sketch with Relative-Error Guarantees"

[2]: <> "UDDSketch: Accurate Tracking of Quantiles in Data Streams"

[3]: <https://datadoghq.com> "Datadog, Inc."

[4]: <https://github.com/DataDog/sketches-java> "ddsketch Java"

[5]: <https://github.com/fmela/libdict> "libdict C library"

license: ICU

repository: cafaro/UDDSketch

repo_name: cafaro/UDDSketch