text:
---
layout: lesson
title: "1.1 - Description of Motion"
---

Students will calculate the distance, velocity, and acceleration of an object given stop motion images of its movement.

Standards: None, building foundations for H2-PS-2 Motion and stability.

Vocabulary: distance (d), velocity (v), acceleration (a), time (t)

Equations:

  * velocity = slope of distance
  * acceleration = slope of velocity

## Assessment
  * Students will submit their graphs indicating the motion of a thrown object
  * Quiz matching vocabulary to the different terms

## Outline

  1. Students come up with 3 examples of motion in games, either physical or virtual
  2. Lecture defining vocabulary and demonstrating how to calculate the velocity and acceleration.
  3. Graph match activity.
  4. Plot the movement, calculate the velocity, and acceleration by hand (2nd day)
  5. Note quiz at the end of the day
  6. Extra credit if you can make an excel sheet that will do the appropriate calcuations by hand before the next class

### Day 1
Students will do the graph match activity from Vernier to develope a physical sense of the relationship between graphs and motion.

#### Handout
  *

#### Resources

### Activity 2
#### Teacher

#### Student

#### Resources

[Previous](./1.0-description)
[Next](./1.2-forces)

gha_language: HTML


text:
The full set of learning tutorials for the mall project are in serial，[Follow the public account](#No public) Get it the first time.

# Mall architecture and function overview

> Overview of mall architecture, functions and database structure

## Mall project introduction

The mall project is a set of e-commerce systems, including a front-end mall system and a back-end management system, based on SpringBoot+MyBatis. The front-end mall system includes modules such as home portal, product recommendation, product search, product display, shopping cart, order process, member center, customer service, and help center. The background management system includes modules for commodity management, order management, membership management, promotion management, operation management, content management, statistical reports, financial management, authority management, and settings.

## Project demo

- back-end project demo：[http://www.kratos47mhs.com/admin/index.html](http://www.kratos47mhs.com/admin/index.html)
- Mobile project demonstration：[http://www.kratos47mhs.com/app/index.html](http://www.kratos47mhs.com/app/index.html)

## Technology used in mall

> Mall is implemented using current mainstream technology, covering almost all technologies used in general projects.

Technology | Version | Description
----|----|----
Spring Boot | 2.1.3 | Container + MVC framework
Spring Security | 5.1.4 | Authentication and authorization framework
MyBatis | 3.4.6 | ORM framework
MyBatisGenerator | 1.3.3 | Data layer code generation
PageHelper | 5.1.8 | My Batis physical paging plugin
Swagger-UI | 2.7.0 | Document production tools
Elasticsearch | 6.2.2 | search engine
RabbitMq |3.7.14 | message queue
Redis | 3.2 | Distributed cache
MongoDb | 3.2 | No Sql database
Docker | 18.09.0 | Application container engine
Druid | 1.1.10 | Database connection pool
OSS | 2.5.0 | Object storage
JWT | 0.9.0 | JWT login support
Lombok | 1.18.6 | reduce boilerplate code for model/data objects

## Overview of the functions implemented by mall

> For details, please see the demo address and experience it for yourself：[http://www.kratos47mhs.com/admin/index.html](http://www.kratos47mhs.com/admin/index.html)

- Product module
  - Product management
  - Product category management
  - Product type management
  - Brand management
- Order module
  - Order management
  - Order settings
  - Return application processing
  - returnReasonSetting
- Sale module
  - Flash Promotion activity management
  - Discount price management
  - Brand recommendation management
  - New product recommendation management
  - Popular recommendation management
  - Subject recommendation management
  - Homepage advertising management

## Mall database table overview
> The mall project currently has 71 data sheets, and the business logic has a certain complexity. Usually, it is enough to make a project reference.

![Mall database table display](../images/mall_mysql_all.png)

### Database table prefix description

- cms_*：Content management module related table
- oms_*：Order management module related table
- pms_*：Product module related table
- sms_*：Sale module related table
- ums_*：User module related table

## No public

![Public account picture](https://kratos47mhs.github.io/images/logo.png)

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# kross

A simple CLI to "multi-arch all the things"

[![](https://badge.fury.io/py/kross.svg)](https://badge.fury.io/py/kross)
[![](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![](https://img.shields.io/pypi/pyversions/kross.svg)](https://pypi.org/project/kross/)
[![](https://img.shields.io/requires/github/pcorbel/kross.svg)](https://requires.io/github/pcorbel/kross/requirements/)
[![](https://img.shields.io/badge/status-stable-green.svg)]()
[![](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

# What is kross ?

kross is a tool to automate the build of Docker images for multiple architectures without any changes required on your code

# Quick start

* Install via pip

`pip install kross`

* Initialize it (once)

`kross init`

* Update your docker build commands

> Before

```
docker build -t me/myapp:vX.X.X ...args... path/to/docker/context
docker push me/myapp:vX.X.X
```

> After

```
kross build -t me/myapp:vX.X.X ...args... path/to/docker/context
kross push me/myapp:vX.X.X
```

# Why kross ?

Kross is born from a Raspberry Pi passionnate developer.
Because Raspberry Pi are arm-based and 90% of images on Dockerhub are amd64-based, developers have to duplicate/tweak all Dockerfiles so the image will work on it and avoid the too much popular `cannot execute binary file: Exec format error`.

<EMAIL_ADDRESS>
To know more, read the [full article](https://medium.com/@pierrot.corbel/kross-arch-all-the-things-2dcdee09da71).

# How kross is working ?

kross is based upon the [qemu library](https://www.qemu.org/) to build multiple architectures images on a amd64-based host machine.
After all images are built and pushed to a docker registry, a [manifest list](https://docs.docker.com/engine/reference/commandline/manifest/#create-and-push-a-manifest-list) is pushed too so that users can pull images based on their architectures in a seamless way.

<EMAIL_ADDRESS>
# Supported architectures

kross will try to build images for the following architectures:

* amd64
* arm32v6
* arm32v7
* arm64v8
* ppc64le
* s390x
* i386

# Run the example

* Install kross
`pip install kross`

* Check your machine configuration
`kross init`

* Run the kross build
`kross build -t kross-world:v0.1.0 https://raw.githubusercontent.com/pcorbel/kross/master/docs/example/Dockerfile`

* Run the kross push
`kross push kross-world:v0.1.0`

* Check images availability on your [Dockerhub account](https://hub.docker.com/)

* Run your image anywhere

`docker run --rm kross-world:v0.1.0`

Example image available [here](https://cloud.docker.com/u/pcorbel/repository/docker/pcorbel/kross-world)

# Tips and tricks

To know exactly what is happening while kross is working
`export KROSS_VERBOSE=true`

repository: pcorbel/kross

gha_language: Python

repo_name: pcorbel/kross


text:
# ProvBuild

This is the artifact is for the paper: "Improving Data Scientist Efficiency with Provenance".

## Artifact Description

This artifact contains:

* A prototype tool of ProvBuild
	* Source code is available [here](https://github.com/CrystalMei/ProvBuild), no hidden links and access password.
* Documentation about ProvBuild installation and how to interact with ProvBuild.

## Documentation

### About ProvBuild
ProvBuild is a data analysis environment that uses change impact analysis to improve the iterative editing process in script-based workflow pipelines by harnessing a script’s provenance.

ProvBuild obtains provenance using noWorkflow, a Python-based provenance capture tool. Using the provenance information, ProvBuild identifies dependencies between inputs, program statements, functions, variables, and outputs, allowing it to precisely identify the sections of a script that must be re-executed to correctly update results after a modification. ProvBuild then generates a customized script, the _ProvScript_, that contains only those sections affected by a modification.

### Tool

ProvBuild is built on top of noWorkflow (Version 1.11.2). Check out [noWorkflow's Github](https://github.com/gems-uff/noworkflow) for more information details.

### Prerequisites
This version of ProvBuild only support **Python 2.7**. ProvBuild and all tests are developed under Linux and macOS. Windows may not be supported by this tool.

To install ProvBuild, you should follow these basic instructions:

If you have python `pip`, install the following packages:

	$ pip install flask
	$ pip install sqlalchemy
	$ pip install pyposast
	$ pip install future
	$ pip install apted

### Clone the Repository

	$ git clone https://github.com/CrystalMei/ProvBuild.git
	$ cd ProvBuild

### ProvBuild Interface and Demo
- Step 1: The user runs `python app.py` and it will start a webpage as shown below:
![StartPage](img/0.png)

- Step 2: The user selects ProvBuild mode and upload demo script `./example/Demo.py` (Note: We designed _User_ _name_ for user study in our paper (Study 1). It is not required for daily use.):
![](img/1.png)

- Step 3: After script submission, the webpage will be updated:
![](img/2.png)

- Step 4: The user inputs the name of the function or variable (e.g. variable `z` in `Demo.py`) to edit:
![](img/4.png)

- Step 5: After click **Search**, ProvBuild extracts the object's dependencies based on the stored provenance information and generates a _ProvScript_ containing only code pertaining to the chosen object. The webpage will be updated:
![](img/5.png)

- Step 6: The user directly makes modifications on the _ProvScript_ (shown as {1}). After click **Run**, instead of running the original `Demo.py`, ProvBuild executes the shortened _ProvScript_ for the user (shown as {2}):
![](img/6.png)

- Step 7:  The program results will be updated (shown as {1}). After click **Merge**, the user seasily merge edits from the _ProvScript_ into the original `Demo.py` (shown as {2}):
![](img/7.png)

- Step 8: The original file will be updated with the user's modification:
![](img/8.png)

## Github Link
[https://github.com/CrystalMei/ProvBuild](https://github.com/CrystalMei/ProvBuild)

license: MIT

gha_license_id: Unlicense


text:
---
title: Callbacks And Closure
published: true
---

Callbacks, closure and other things I wish to get out of life... but I digress. In programming, a callback is a function that gets passed into another function. In Java, this would look like;

```java
public class A {

    public void B (DoSomethingCallback callback) {
        // Does something ....
        // Something is done
        // Calls callback
        callback.onSomethingDone(...)
        // Maybe does something else ...
    }

    interface DoSomethingCallback {
        // Callback method
        void onSomethingDone();
    }
}
```

While I am not new to the concept, I have recently been working with it a lot in Java async code and it's a fascinating paradigm.

In the best case, the callback is simple and straightforward like the snippet above shows. However, in some cases, it can get pretty complicated to understand what exactly is going on aka [Callback Hell](https://www.geeksforgeeks.org/what-is-callback-hell-in-node-js/#:~:text=This%20is%20a%20big%20issue,result%20of%20the%20previous%20callbacks.).

A closure on the other hand is a function defined inside of another function. In python this would look like;

```python
def foo_operator(x, y):
    # Outer function
    def add():
        # Nested inner function (closure)
        print(x)
        print(y)
    # return inner function (closure)
    return add
```

This is a very common paradigm in python and is used a lot by python [decorators](https://www.programiz.com/python-programming/decorator).

With closures, the inner function, can have access to the outer functions variables  (In the above example it's possible to access x & y from the add() method). This is a distinction from the callback paradigm since callbacks are unable to access variables without being passed.

I think it's useful being familiar with these two paradigms as it makes code much easier to read and understand, since they occur quite frequently.

branch_name: refs/heads/main

gha_language: SCSS


text:
# Atom-Splash [WIP]
A new way of representation

Right now we are working on a library named atom-splash which gives you a new way of representation.

![Example](https://github.com/yaki29/Atom-Splash/raw/master/example/example.png "Example 1")


text:
---
title: Paris Decrypt the Stre.eth

description:
  Giant treasure hunt of street art NFT

name: Paris Decrypt the Stre.eth

synopsis:
  -
    It is time to inject some fun and culture back in our life.
  -
    For PARIS DECRYPT THE STRE ET(H), 13 artists have created an original artwork in a specific location around the city.
  -
    In order the find all of the artworks you first need to solve a series of enigmas that will give you their locations - you'll need to download our app to get started.
  -
    Once you know where they all are, you then need to find a special word hidden in each of the 13 artworks for a chance to win 13 rare digital artwork and 2 Ethereum. Simply enter all the hidden words on our website to enter the competition.
  -
    This is a participative and original event that aims to bring more people in the cryptospace through in a fun and interactive way while also promoting urban art and talented artists into the equation.
  -
    This event is free and open to all, and made possible thanks to Ethereum France and its awesome yearly event EthCC.
  -
    This event has been conceived with love and is powered by Wallkanda, the web3 toolbox for urban artists and Background Paris, the Graffiti event agency.

date: 2021-07-20
endDate:

time: '12:00'
endTime:

tickets: https://paris.decryptstreet.art/

price:

venue: Paris

address:

# The category of the event. Valid options:
# - conference
# - event
# - hackathon
# - workshop
# - drink
# Use _only_ one, and don't capitalize.
category: event

speakers:

    #name: Tomer Bariach
    #title:
    #company: Good Dollar
    #companyURL: https://harmony.one
    twitter: APWine
    #website:
    #bio:

### DON'T MAKE CHANGES BELOW THIS LINE! ###
---
<!-- ### DON'T MAKE CHANGES BELOW THIS LINE! ### -->

<Event-Content/>


text:
# hexo-deployer-rss3

RSS3 deployer plugin for Hexo.

## 📝 Docs

- English
- [简体中文](https://github.com/NaturalSelectionLabs/hexo-deployer-rss3/tree/develop/docs/zh_CN/start.md)
- [正體中文](https://github.com/NaturalSelectionLabs/hexo-deployer-rss3/tree/develop/docs/zh_TW/start.md)

For Hexo generators' using instructions, you can refer to [One-Command Deployment - Hexo](https://hexo.io/docs/one-command-deployment.html)

A detailed tutorial can be found at [Deploying Hexo Blog to RSS3](https://github.com/NaturalSelectionLabs/hexo-deployer-rss3/tree/develop/docs/en/guide.md)

## 🎁 Install

``` sh
npm install hexo-deployer-rss3
```

or

``` sh
yarn add hexo-deployer-rss3
```

You need Node v14 or later to run it properly, old versions cannot recognize `?.` and thus would cause `Unexpected token` error. Referrer to [Optional chaining](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining) for more information.

## 💎 Before start...

1. What means for `privateKey` field in config ?

    It's the only thing marking you as the full controller of a RSS3 persona. Remember to take good care of it.

    Theoretically you can use any ETH-compatible private keys, but we prefer you to generate one using [Re: ID](https://github.com/NaturalSelectionLabs/Re-ID).

    This way, you can also get what you've published clearly in a simple way.

2. What if I don't have any IPFS gateway accounts ?

    You can manually choose whether publish to IPFS or not by changing `ipfs/deploy` field.

    We also provide one pair of api key for you to enjoy RSS3, which has been provided in below demo.

    We do not promise any accessibility of files Larger than 50 MB. DO NEVER abuse it.

    Only the post html file itself could be deployed to IPFS currently.
    Please confirm if your theme can render correctly in single-file mode (like open generated html files after `hexo g`)
    before enabling the `ipfs/deploy` option.

## ⚙ Config

Add hexo-deployer-rss3 specified configurations info your site's `_config.yml` file.

``` yaml
deploy: # definitation root for all deployers
- type: rss3
  endpoint: https://hub.rss3.io # link to a RSS3 hub
  privateKey: 47e18d6c386898b424025cd9db446f779ef24ad33a26c499c87bb3d9372540ba # your private key, 64 chars
  ipfs: # ipfs specified configurations
    deploy: true # deploy to IPFS
    gateway: pinata # IPFS API gateway
    api: # IPFS gateway related auth credentials
      key: d693df715d3631e489d6
      secret: ee8b74626f12b61c1a4bde3b8c331ad390567c86ba779c9b18561ee92c1cbff0
```


text:
<frontmatter>
  title: Documentation
  header: pagetop.md
  footer: footer.md
  head: head.md
  siteNav: mainNav.md
  pageNav: 3
</frontmatter>

{{ booktitle | safe }}

# Documentation

Authors: [Chua Ka Yi Ong](https://github.com/kychua)

<box id="article-toc">

* [Introduction](#introduction)
* [Why Write Documentation](#why-write-documentation)
* [Writing Good Documentation](#writing-good-documentation)
  * [Written Documentation](#written-documentation)
  * [Code Documentation](#code-documentation)
  * [Version Control](#version-control)
* [Resources](#resources)
* [Acknowledgements](#acknowledgements)
</box>

## Introduction

Software documentation refers to information that explains the code in a software project or how to use a software product or API.
Many developers neglect writing documentation because they find it boring or troublesome, which is a pity because documentation communicates what you have done to the world - without documentation, people won't know about your awesome code or cool features.

> The difference between a tolerable programmer and a great programmer is not how many programming languages they know, and it’s not whether they prefer Python or Java. It’s whether they can communicate their ideas. By persuading other people, they get leverage. By writing clear comments and technical specs, they let other programmers understand their code, which means other programmers can use and work with their code instead of rewriting it. Absent this, their code is worthless. By writing clear technical documentation for end users, they allow people to figure out what their code is supposed to do, which is the only way those users can see the value in their code. There’s a lot of wonderful, useful code buried on sourceforge somewhere that nobody uses because it was created by programmers who don’t write very well (or don’t write at all), and so nobody knows what they’ve done and their brilliant code languishes.
>
> [Advice for Computer Science College Students](https://www.joelonsoftware.com/2005/01/02/advice-for-computer-science-college-students/), by Joel Spolsky

## Why Write Documentation

There are many benefits to writing good documentation, such as the following:

* **Makes things easier for yourself**: when you look back at your code a few months later, well-written documentation can make things a lot easier by explaining what you had been thinking when you were writing the code, when you find yourself confused by your own work
* **Improves your code**: documentation forces you to think carefully about what you are trying to do and why you have chosen to implement it in a particular way
* **Encourages others to contribute to your software**: by documenting how to contribute, it makes easier for others to do so, so they are more likely to help out
* **Encourages others to use your software**: ["If it isn't documented, it doesn't exist."](http://www.mikepope.com/blog/DisplayBlog.aspx?permalink=1680)

## Writing Good Documentation

Documentation should not be written for the sake of writing, but rather, to fulfill a need.
Good documentation is up-to-date and includes only what is necessary.

Documentation comes in many different forms.
Below are some guidelines on how to tackle each type of documentation.

### Written Documentation

Written documentation refers to what people usually think of as documentation - READMEs, user guides and developer guides.

In general, written documentation should use:

* grammatically correct language
* [simple language](https://wiki.zephyrproject.org/view/Documentation_style_guide#Simple_English): your documentation might be read by non-native speakers and use of idioms or flowery language can make it difficult for readers to understand
* markup: use formatting such as colors and italics and structural elements like admonition blocks to highlight important points
* realistic examples

Futhermore, you should always:

* [test your instructions](https://idratherbewriting.com/2015/07/07/testing-your-instructions/)
* find *someone else* to test your instructions
* [revise, revise and revise!](https://jacobian.org/writing/editors/)

[This](https://www.bluemangolearning.com/software-documentation/) provides useful general tips for writing documentation and
[this guide](https://jacobian.org/writing/technical-style/) provides more tips on writing well.

#### README

A README serves as an introduction to your project, and is often the first thing people see when encountering your project.

A good README should convince users to use your product or contribute to your code, by providing enough information to make it easy for them to get started.

For a good guide on how to write a README, check out [this guide](https://www.writethedocs.org/guide/writing/beginners-guide-to-docs/).

* Some suggest that READMEs should be written before you start coding, as it gives you an overview of your project and what you need to do.
This is known as [Readme Driven Development](https://tom.preston-werner.com/2010/08/23/readme-driven-development.html).

#### User Guide

A user guide teaches users how to use your software.
User guides can include quickstart guides, reference materials, tutorials, cookbooks/recipes and more.

[Here](https://jacobian.org/writing/what-to-write/) is a useful guide on how to tackle different types of user documentation.
[This](https://stevelosh.com/blog/2013/09/teach-dont-tell/) points out the problems with common approaches to documentation and builds on the previous article.

#### Developer Guide

Developer guides teach new developers how to contribute to the code base.
They should give an overview of the code and an explanation of the design, as well as include instructions for setting up, making changes and deploying.

See [this](https://www.petrikainulainen.net/software-development/processes/writing-just-enough-documentation/) to learn more about what to include in a developer guide.

### Code Documentation

Code docummentation refers to documentation that is found within the source code.
All the following types of code documentation are important and complement one another.
Note that such documentation should always be updated together with the code.

#### Comments

Comments are a well-known form of documentation.
They [complement the code](https://softwareengineering.stackexchange.com/a/285789) and are intended for developers who use and work on the code.
They include API documentation for variables, methods, classes, and packages, as well as inline comments.

API documentation for variables, methods, classes, and packages explain what they do.
Good API documentation should enable users to use the API without having to guess how to use it or be confronted with unexpected behavior.
Thus, comments for methods should include the input and output, assumptions, edge cases and possible exceptions or errors thrown by the method.

Comments can also refer to inline comments.
Even the most well-written code can leave ambiguous questions.
For example, code cannot explain why a line of code was written in a specific way, as discussed in [this article](https://blog.codinghorror.com/code-tells-you-how-comments-tell-you-why/).
In such cases, well-written comments can clarify and make the code easier to understand.

Note however, that excessive comments are also a code smell.
Comments should not repeat what the code is saying and requiring a lot of comments to explain what you are doing can suggest that the code is too convoluted.
Often, comments can be replaced by clearer code.
As much as possible, code should be written as clearly as possible, with comments added in only when necessary.
[This Stack Overflow answer](https://stackoverflow.com/a/209089) gives a good example on how to do this.
For a more detailed explanation, read [this article](https://blog.codinghorror.com/coding-without-comments/).

#### Source Code

The source code is a form of documentation.
Well-written code makes it easy for developers to understand what the code is doing.
This can be done via a number of ways, such as

* using meaningful names for variables, functions and classes
* using useful error messages
* being consistent
* following software engineering principles

#### Tests

Tests are another form of documentation as they make the expected behavior of the methods clear for different types of input and edge cases.

### Version Control

Version control is also a form of documentation.
Having access to how the code base was changed over time can shows how, when and why a piece of code was written or changed.
For this to work well, it is important to write good commit messages and follow good commit practices.

[This](https://robots.thoughtbot.com/5-useful-tips-for-a-better-commit-message) explains what to include in commit messages while
[this article](https://mislav.net/2014/02/hidden-documentation/) explains how to use Git to make full use of your code's version control history.
For more resources on commit messages, check out [this Stack Overflow thread](https://stackoverflow.com/questions/15324900/standard-to-follow-when-writing-git-commit-messages).

## Resources

* For inspiration: https://github.com/PharkMillups/beautiful-docs
* An overview of the different types of documentation and good examples of each type: https://www.ybrikman.com/writing/2014/05/05/you-are-what-you-document/
* Documentation principles: https://www.writethedocs.org/guide/writing/docs-principles/
* Agile documentation: https://www.agilemodeling.com/essays/agileDocumentationBestPractices.htm
* Video on how to write great documentation: https://www.youtube.com/watch?v=z3fRu9pkuXE

## Acknowledgements

In addition to the links mentioned above, here are the links used in the writing of this article:

* https://opensource.com/business/15/5/write-better-docs
* https://www.developer.com/tech/article.php/10923_3848981_2/The-7-Rules-for-Writing-World-Class-Technical-Documentation.htm
* https://spin.atomicobject.com/2015/04/17/code-as-documentation/
* https://mikegrouchy.com/blog/2013/03/yes-your-code-does-need-comments.html
* https://chromium.googlesource.com/chromium/src/+/master/docs/documentation_best_practices.md#Documentation-is-the-story-of-your-code
* https://blog.jooq.org/2013/02/26/the-golden-rules-of-code-documentation/
* https://bryce.fisher-fleig.org/blog/effective-commit-messages/
* https://tom.preston-werner.com/2010/08/23/readme-driven-development.html
* http://www.cs.ecu.edu/karl/3300/spr14/Notes/Documentation/documentation.html
* https://www.tylerbutler.com/2013/06/the-importance-of-documentation/
* https://softwareengineering.stackexchange.com/questions/154615/are-unit-tests-really-used-as-documentation
* https://blog.smartbear.com/careers/13-things-people-hate-about-your-open-source-docs/
* https://byrslf.co/writing-great-documentation-44d90367115a#.qdxj6dcx4
* https://news.ycombinator.com/item?id=8414714
* https://www.developer.com/tech/article.php/10923_3848981_2/The-7-Rules-for-Writing-World-Class-Technical-Documentation.htm
* http://www.onlamp.com/pub/a/onlamp/2006/09/07/unit-testing-docs.html
* https://blog.jooq.org/2013/02/26/the-golden-rules-of-code-documentation/
* https://vip.wordpress.com/documentation/commit-messages/#a-good-commit-message-should-not-depend-on-the-code-to-explain-what-it-does-or-why-it-does-it
* https://news.ycombinator.com/item?id=10212582
* https://arialdomartini.wordpress.com/2012/09/03/pre-emptive-commit-comments/
* https://spin.atomicobject.com/2015/04/24/source-control-documentation/
* https://wiki.openstack.org/wiki/GitCommitMessages
* https://github.com/matiassingers/awesome-readme

repository: antomuli/learningresources

repo_name: antomuli/learningresources


text:
# DigiAssets.Core
Simple .NET Core wrapper for DigiAssets RESTful API

## Installation
Install the NuGet package: `Install-Package DigiAssets.Core`

## Usage
```cs
try
{
    DigiAssets digiAssets = new DigiAssets("https://api.digiassets.net/v3");

    IssueAssetResponse myDigitalAsset = await digiAssets.Issue(new AssetIssueObject
    {
        amount = 500,
        metadata = new Metadata
        {
            assetName = "My Digital Asset Name",
            issuer = "Digital Asset, LLC",
            description = "Tokenized shares Digital Asset, LLC"
        },
        divisibility = 2,
        fee = 1000,
        reissueable = true,
        issueAddress = "{YOUR_ISSUE_ADDRESS}"
    });
}
catch (Exception ex)
{
    // handle exception
}
```

## More information
[DigiByte Protocol Specifications](https://github.com/DigiByte-Core/DigiAssets-Protocol-Specifications/wiki)

[DigiByte Protocol Specifications: getting started](https://github.com/DigiByte-Core/DigiAssets-Protocol-Specifications/wiki/Getting%20Started)

repository: EUCX/digiassets-core

gha_language: C#

gha_license_id: MIT

repo_name: EUCX/digiassets-core


text:
# Go Regression
Data science projects using the Go language and the Advertising data (TV, Radio, Newspaper, Sales)

Cd into the respective folder and use go run .

* simpleLinearRegression solves for y = mx + b (b0 and b1)
* linearRegression provides a menu for describing the data, plotting the data, splitting the data between train and test, solving for selected coefficients, or using ridge regression
* gradientDescent uses standardized data to find the minimum coefficients

repository: cliffwhitworth/goRegression

repo_name: cliffwhitworth/goRegression


text:
# Byte Buddy Maven Plugin

The **Byte Buddy Maven Plugin** enables you to apply bytecode enhancements during the build process. To activate this process, add the following sections to your project POM file:

###### pom.xml
```xml
  <build>
    <plugins>
      <plugin>
        <groupId>net.bytebuddy</groupId>
        <artifactId>byte-buddy-maven-plugin</artifactId>
        <version>LATEST</version>
        <executions>
          <execution>
            <goals>
              <goal>transform</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <transformations>
            <transformation>
              <groupId>net.bytebuddy</groupId>
              <artifactId>byte-buddy</artifactId>
              <version>LATEST</version>
              <plugin>net.bytebuddy.build.CachedReturnPlugin</plugin>
            </transformation>
          </transformations>
        </configuration>
      </plugin>
    </plugins>
  </build>
```

This example transformation uses a standard plugin that is shipped with Byte Buddy, which caches any method return value if annotated by `CachedReturnPlugin.Enhance`. The plugin in the example is applied onto the main source set, test classes can be transformed by specifying the *transform-test* goal. Furthermore, it is possible to transform production classes while retaining runtime classes by using *transform-runtime*, or to retain dependencies of all non-test scopes by *transform-extended*. Custom plugins must implement Byte Buddy's `Plugin` interface where the plugin's location is specified by Maven artifact coordinates as shown in the example. The coordinates can be dropped if the plugin is contained within the transformed artifact itself.

A plugin can declare a constructor that takes arguments of type `File`, `BuildLogger` or a Gradle-specific `Logger` where the class file root directory or an appropriate logger is provided. It is also possible to supply an argument explicitly by specifying an argument in the plugin configuration.

A plugin can be applied automatically when it is included as a dependency of the *byte-buddy-maven-plugin* configuration and if the plugin's containing jar file declares the plugin's name in the *META-INF/net.bytebuddy/build.plugins* file.

The plugin supports Maven's `BuildContext` and incremental build feature which is currently supported by the Eclipse IDE. To enable it, it needs to be activated explicitly by setting the `incremental` property to `true`.

repository: raphw/byte-buddy

gha_language: Java

repo_name: raphw/byte-buddy


text:
This repository is meant to help create Cairo DLLs for Windows. Both 32-bit and 64-bit versions can be built. The resulting `cairo.dll` file is fully self-contained and does not depend on any other third-party DLLs. FreeType support is included. See [this blog post](http://preshing.com/20170529/heres-a-standalone-cairo-dll-for-windows) for more information.

Binary releases are available [here](https://github.com/preshing/cairo-windows/releases).

# Build Steps

The `build-cairo-windows.sh` shell script will download, extract, and build all the necessary libraries to link a self-contained `cairo.dll` with FreeType support. It uses the existing build pipelines of each library as much as possible. It was adapted from https://www.cairographics.org/end_to_end_build_for_win32/

The Visual Studio 2017 compiler is used. Either MSYS, MSYS2 or Cygwin must be used to drive the build environment. So far it has only been tested with MSYS2. If using MSYS2, you'll need to install `tar` and `make` first:

    $ pacman -S tar make

## Building 32-bit

From the start menu, open "x86 Native Tools Command Prompt for VS 2017". Add the MSYS2 (for example) toolchain to the path. Start an MSYS2 shell (which inherits the `INCLUDE`, `LIB` and `PATH` variables from the first prompt), then run the script.

```
(from an x86 Native Tools Command Prompt for VS 2017)
> set PATH=C:\msys32\usr\bin;%PATH%
> sh
$ ./build-cairo-windows.sh
```

When it's done, you'll find a self-contained package in a subdirectory named `output/cairo-windows-x.x.x`.

## Building 64-bit

1. First build 32-bit.
2. Open `libpng\projects\vstudio\vstudio.sln` in Visual Studio, then add the "x64" platform to the solution as follows:
   * Build → Configuration Manager
   * Active solution platform: → <New...>
   * Select x64, click OK, close the Configuration Manager
   * File → Save All
3. Perform similar steps as for 32-bit, but open an "**x64** Native Tools Command Prompt for VS 2017" instead, and pass `x64` as an argument to the script:

```
(from an x64 Native Tools Command Prompt for VS 2017)
> set PATH=C:\msys32\usr\bin;%PATH%
> sh
$ ./build-cairo-windows.sh x64
```

license: Unlicense

repository: aymanmh/cairo-windows

repo_name: aymanmh/cairo-windows


text:
# Geohash-poly

`npm install geohash-poly`

Transform a GeoJSON (Multi)Polygon to a list of geohashes that cover it.

Currently only includes hashes whose centroid falls within the poly itself. This does not create 100% coverage, but I could consider adding this if there is a need.

Method used is pretty brute-force, but still relatively quick compared to alternative implementations if hash precision is not too granular. Creates an envelope around poly, and iterates over rows and columns, only including hashes that fall in the poly.

## Streaming
Hashes can be streamed. Each _read will generate a row of hashes into buffer, as some form of throttling. This allows massive polygons with high precision hashes to avoid memory constraint issues. If your polys have the potential to hit memory issues, use this method.

If you specify rowMode as true, such as `.stream(poly, precision, rowMode)`, each chunk in the stream will be an array using streams2 objectMode.

```javascript

var through2 = require('through2');

var polygon = [[[-122.350051, 47.702893 ], [-122.344774, 47.702877 ], [-122.344777, 47.70324 ], [-122.341982, 47.703234 ], [-122.341959, 47.701421 ], [-122.339749, 47.701416 ], [-122.339704, 47.69776 ], [-122.341913, 47.697797 ], [-122.341905, 47.697071 ], [-122.344576, 47.697084 ], [-122.344609, 47.697807 ], [-122.349999, 47.697822 ], [-122.350051, 47.702893 ]]];

var stream = geohashpoly.stream(polygon, 7);

stream
  .on('end', function () {
    console.log("It's all over.");
  })
  .pipe(through2(function (chunk, enc, callback) {
    console.log(chunk.toString());
    callback();
  }));

```

Results in the hashes spit out line by line to the console.

## Standard
If you just want your hashes out in an array, use this.
```javascript

var polygon = [[[-122.350051, 47.702893 ], [-122.344774, 47.702877 ], [-122.344777, 47.70324 ], [-122.341982, 47.703234 ], [-122.341959, 47.701421 ], [-122.339749, 47.701416 ], [-122.339704, 47.69776 ], [-122.341913, 47.697797 ], [-122.341905, 47.697071 ], [-122.344576, 47.697084 ], [-122.344609, 47.697807 ], [-122.349999, 47.697822 ], [-122.350051, 47.702893 ]]];

geohashpoly(polygon, 7, function (err, hashes) {
	console.log(hashes);
});
```

Results in:
```
[ 'c22zrgg', 'c22zrgu', 'c22zrgv', 'c22zrgy', 'c22zrgz', 'c23p25b', 'c22zrge', 'c22zrgs', 'c22zrgt', 'c22zrgw', 'c22zrgx', 'c23p258', 'c23p259', 'c23p25d', 'c22zrg7', 'c22zrgk', 'c22zrgm', 'c22zrgq', 'c22zrgr', 'c23p252', 'c23p253', 'c23p256', 'c22zrg5', 'c22zrgh', 'c22zrgj', 'c22zrgn', 'c22zrgp', 'c23p250', 'c23p251', 'c23p254' ]
```

----------
## Completely unscientific benchmarks

These are just from running my machine, running the streaming example in rowMode.

### v0.2.1
+ Modifications: only performs an intersection on the poly if there are > n points in the polygon.
+ Runtime: 84.20s

### v0.2.0
+ Split the operating polygon to only utilize its current row, defined by bounding box E/W and geohash N/S.
+ Runtime: 83.01s

repository: jakeorr/geohash-poly

repo_name: jakeorr/geohash-poly


text:
# powershelltips
This is a community-driven repository of secrets/tips/tricks for using PowerShell. All community members are free to submit suggestions, additions, and changes through pull requests.

The idea for this project came from a tweet thread on [Twitter](https://twitter.com/MichaelBender/status/1095394513500205056?s=20) asking people for tips & tricks for beginners to learn PowerShell, and the things that "turn on the lightbulbs".

## Version 1.0
This version will be simply a collection of all of the suggestions from Twitter, so there will be little organization at the outset. As time allows, items will be organized, linked to relevant resources, and fleshed out. The end goal is to create a dynamic resource for PowerShell users.

*Maintainer:* Michael Bender - Cloud Advocate at Microsoft, PowerShell Community participant

repository: themichaelbender/pwsh-tips

repo_name: themichaelbender/pwsh-tips


text:
# RayTracingSwiftly-Code

Unit Tests and sample solutions code for [The Ray Tracer Challenge](https://pragprog.com/book/jbtracer/the-ray-tracer-challenge) The book is awesome, very clearly explains how ray tracers work and how to implement. It is remarkable how far you can get with pretty straightforward code and basic maths.

I did get up to reflections and shadows. i.e. did get as far as:

- [x] Tuples, Points, and Vectors
- [x] Drawing on a Canvas
- [x] Matrices
- [x] Matrix Transformations
- [x] Ray-Sphere Intersections
- [x] Putting It Together
- [x] Light and Shading
- [x] Reflecting
- [x] Shadows
- [x] Planes
- [x] Patterns
- [x] Reflection

I did some basic optimisation/caching of transforms which *massively* improvded performance.

```swift
    var transformation = Matrix.eye(4) {
        didSet {
            invertedTransformation = transformation.inverted()
            invertedTransformationTranspose = invertedTransformation.transposed()
        }
    }
```

You might want to leave that out to keep code nicer (but speed up is ridiculous).

I include output as `NSImage` which is for Mac use in place of text based output.

I gave up at the refraction bit as I found it was getting a bit tedious. (In part because I had to write out these tests which you can just copy). The solutions probably shouldn't be used directly but can be consulted.

I also included a View Controller for very basic MacApp that can run things/show results. You'll need to create your own UI etc if you want to use this.

repository: jamesporter/RayTracingSwiftly-Code

repo_name: jamesporter/RayTracingSwiftly-Code


text:
# USB device boot code

This is the USB MSD boot code which should work on the Raspberry Pi model A, Compute Module, Compute
Module 3, Compute Module 4 and Raspberry Pi Zero.

The default behaviour when run with no arguments is to boot the Raspberry Pi with
special firmware so that it emulates USB Mass Storage Device (MSD). The host OS
will treat this as a normal USB mass storage device allowing the file-system
to be accessed. If the storage has not been formatted yet (default for Compute Module)
then the [Raspberry Pi Imager App](https://www.raspberrypi.com/software/) can be
used to install a new operating system.

Since `RPIBOOT` is a generic firmware loading interface it is possible to load
other versions of the firmware by passing the `-d` flag to specify the directory
where the firmware should be loaded from.
E.g. The firmware in the [msd](msd/README.md) can be replaced with newer/older versions.

For more information run `rpiboot -h`

## Building

### Linux / Cygwin / WSL
Clone this on your Pi or a Linux machine.
Make sure that the system date is set correctly, otherwise Git may produce an error.

```
sudo apt install git libusb-1.0-0-dev
git clone --depth=1 https://github.com/raspberrypi/usbboot
cd usbboot
make
sudo ./rpiboot
```

### macOS
From a macOS machine, you can also run usbboot, just follow the same steps:

1. Clone the `usbboot` repository
2. Install `libusb` (`brew install libusb`)
3. Install `pkg-config` (`brew install pkg-config`)
4. Build using make
5. Run the binary

```
git clone --depth=1 https://github.com/raspberrypi/usbboot
cd usbboot
brew install libusb
brew install pkg-config
make
sudo ./rpiboot
```

## Running

### Compute Module 3
Fit the `EMMC-DISABLE` jumper on the Compute Module IO board before powering on the board
or connecting the USB cable.

### Compute Module 4
On Compute Module 4 EMMC-DISABLE / nRPIBOOT (GPIO 40) must be fitted to switch the ROM to usbboot mode.
Otherwise, the SPI EEPROM bootloader image will be loaded instead.

## Compute Module 4 extensions
In addition to the MSD functionality, there are a number of other utilities that can be loaded
via RPIBOOT on Compute Module 4.

| Directory | Description |
| ----------| ----------- |
| [recovery](recovery/README.md) | Updates the bootloader EEPROM on a Compute Module 4 |
| [rpi-imager-embedded](rpi-imager-embedded/README.md) | Runs the embedded version of Raspberry Pi Imager on the target device |
| [mass-storage-gadget](mass-storage-gadget/README.md) | Replacement for MSD firmware. Uses Linux USB gadgetfs drivers to export all block devices (e.g. NVMe, EMMC) as MSD devices |
| [secure-boot-recovery](secure-boot-recovery/README.md) | Scripts that extend the `recovery` process to enable secure-boot, sign images etc |
| [secure-boot-msd](secure-boot-msd/README.md) | Scripts for signing the MSD firmware so that it can be used on a secure-boot device |
| [secure-boot-example](secure-boot-example/README.md) | Simple Linux initrd with a UART console.

## Booting Linux
The `RPIBOOT` protocol provides a virtual file-system to the Raspberry Pi bootloader and GPU firmware. It's therefore possible to
boot Linux. To do this, you will need to copy all of the files from a Raspberry Pi boot partition plus create your own
initramfs.
On Raspberry Pi 4 / CM4 the recommended approach is to use a `boot.img` which is a FAT disk image containing
the minimal set of files required from the boot partition.

## Secure Boot
Secure Boot requires the latest stable bootloader image.
WARNING: If the `revoke_devkey` option is used to revoke the ROM development key then it will
not be possible to downgrade to a bootloader older than 2022-01-06 OR disable secure-boot mode.

### Host setup
Secure boot require a 2048 bit RSA asymmetric keypair and the Python `pycrytodomex` module to sign the EEPROM config and boot image.

#### Install Python Crypto support (the pycryptodomex module)
```bash
python3 -m pip install pycryptodomex
# or
pip install pycryptodomex
```

#### Create an RSA key-pair using OpenSSL. Must be 2048 bits
```bash
cd $HOME
openssl genrsa 2048 > private.pem
```

### Secure Boot - configuration
* Please see the [secure boot EEPROM guide](secure-boot-recovery/README.md) to enable via rpiboot `recovery.bin`.
* Please see the [secure boot MSD guide](secure-boot-msd/README.md) for instructions about to mount the EMMC via USB mass-storage once secure-boot has been enabled.

## Secure Boot - image creation
Secure boot requires a `boot.img` FAT image to be created. This plus a signature file (boot.sig)
must be placed in the boot partition of the Raspberry Pi.

The contents of the `boot.img` are the files normally present in the Raspberry Pi OS boot
partition i.e. firmware, DTBs and kernel image. However, in order to reduce boot time
it is advisable to remove unused files e.g. firmware or kernel images for Pi models.

The firmware must be new enough to support secure boot. The latest firmware APT
package supports secure boot. To download the firmware files directly.

`git clone --depth 1 --branch stable https://github.com/raspberrypi/firmware`

A helper script (`make-boot-image`) is provided to automate the image creation process. This
script depends upon the `mkfs.fat` and `losetup` tools and only runs on Linux.

### Root file-system
Normally, the Kernel modules and overlays for a secure-boot system would be provided
in an [initramfs](https://www.raspberrypi.com/documentation/computers/config_txt.html#initramfs)
and built with (buildroot)[https://buildroot.org/] or (yocto)[https://www.yoctoproject.org/].

This ensures that all of the kernel modules and device tree dependencies are covered
by the secure-boot signature.

Since the `initramfs` is part of the `boot.img` it is possible to replace GPU firmware,
kernel and dependencies in a single file update.

Alternatively, for test/development the following instructions explain how a normal
Raspberry Pi OS install can be modified to be booted with the secure-boot loader.

#### Clone the Raspberry Pi OS boot files
Copy the contents of `/boot` to a local directory called `secure-boot-files`

#### Set the kernel root device
Since the boot file-system for the firmware is now in a signed disk image the OS cannot write to this.
Therefore, any changes to `cmdline.txt` must be made before the `boot.img` file is signed.

* Verify that `cmdline.txt` in `secure-boot-files` points to the correct UUID for the root file-system.
  Alternatively, for testing, you can specify the root device name e.g. `root=/dev/mmcblk0p2`.

* Remove `init-resize.sh` from `cmdline.txt`

#### Create the boot image
The `-b` product argument (pi4,pi400,cm4) tells the script to discard files which are not required by that product. This makes the image smaller and reduces the time taken to calculate the hash of the image file thereby reducing the boot time.
```bash
sudo ../tools/make-boot-image -d secure-boot-files -o boot.img -b pi4
```

The maximum supported size for boot.img is currently 96 megabytes.

#### Verify the boot image
To verify that the boot image has been created correctly use losetup to mount the .img file.

```bash
sudo su
mkdir -p boot-mount
LOOP=$(losetup -f)
losetup -f boot.img
mount ${LOOP} boot-mount/

 echo boot.img contains
find boot-mount/

umount boot-mount
losetup -d ${LOOP}
rmdir boot-mount
```

#### Sign the boot image
For secure-boot, `rpi-eeprom-digest` extends the current `.sig` format of
sha256 + timestamp to include an hex format RSA bit PKCS#1 v1.5 signature. The key length
must be 2048 bits.

```bash
../tools/rpi-eeprom-digest -i boot.img -o boot.sig -k "${KEY_FILE}"
```
#### Hardware security modules
`rpi-eeprom-digest` is a shell script that wraps a call to `openssl dgst -sign`.
If the private key is stored withing a hardware security module instead of
a .PEM file the `openssl` command will need to be replaced with the appropriate call to the HSM.

`rpi-eeprom-digest` called by `update-pieeprom.sh` to sign the EEPROM config file.

The RSA public key must be stored within the EEPROM so that it can be used by the bootloader.
By default, the RSA public key is automatically extracted from the private key PEM file. Alternatively,
the public key may be specified separately via the `-p` argument to `update-pieeprom.sh` and `rpi-eeprom-config`.

To extract the public key in PEM format from a private key PEM file, run:
```bash
openssl rsa -in private.pem -pubout -out public.pem`
```

#### Copy the secure boot image to the boot partition on the Raspberry Pi.
Copy `boot.img` and `boot.sig` to the chosen boot filesystem. Secure boot images can be loaded from any of the normal boot devices (e.g. SD, USB, Network).

repository: grid-x/usbboot

repo_name: grid-x/usbboot


text:
---
layout: post
title: Custom Searches with Alfred
date: '2014-12-01 06:12:10'
---

<img src="/assets/images/2014/Dec/alfred_logo.png" style="float: left; width: 150px; padding-right: 1em;" /> If you use Mac OS X, then you are probably already aware of the [Alfred](http://www.alfredapp.com/) productivity app. Even though there is a native OS Spotlight, I find that Alfred suites my needs better. One of these gems is... **Custom Search**.

## Custom Web & URL Searches

Alfred comes with built-in Web Searches such as `google`, `translate`, `twitter`, `wiki`, `imdb`, `facebook`, `weather`, etc... but it also lets you create your own custom search.

You can create a custom search of your own by identifying a website that supports URL parameters. For example, let's create a Custom Search for `Stack Overflow`.

Here we provide the `Search URL` including the `{query}` that represents the value we provide to Alfred.

![](/assets/images/2014/Dec/Screen_Shot_2014_11_30_at_11_52_43_PM.png)

Now I can use the custom search by triggering Alfred with my new keyword and a search term like the following... `stack reactjs flux`

![](/assets/images/2014/Dec/stack_blog.gif)

## Can I Use?

If you are writing cross-browser web sites and need to search for feature support, then you are probably visiting the [Can I Use?](http://caniuse.com) website fairly frequently.

For this purpose, why not make a `caniuse` Alfred Custom Search... `http://caniuse.com/#search={query}`

![](/assets/images/2014/Dec/caniuse_blog.gif)

## Dev Docs

The API documentation for all the technologies we use are spread out all over the internet. [Dev Docs](http://devdocs.io/) is a handy online tool that allows you to search across many technologies to find API level documentation. They currently support HTML, CSS, JavaScript, Git, Grunt, Lo-Dash, Sass, SVG, and over 30 more APIs.

For this I've created a `devdocs` custom search... `http://devdocs.io/#q={query}`

![](/assets/images/2014/Dec/devdocs_blog.gif)

extension: markdown

gha_language: JavaScript

gha_license_id: NOASSERTION


text:
# PDFtoWhateverC     ![PDFtoWhateverC](PDFtoWhateverC/SplitMaker.ico)

A front end program that splits a list of PDF files into individual image files that the user would be selecting for some purpose. Each PDF page is processed into the image type as desired.

This program is originally created to split manufacturer's product cut sheets into individual images where selected images are later annotated for incorporation into design proposals.

## Brief Instructions

![SplitsMaker](DocImages/PDFSplitsMaker.PNG)

- Specify the source folder where the PDFs reside.
- Specify the splits target folder. This folder should be carefully selected because **PDFtoWhateverC** is going to fill it up with files.
- Select the output type.
- Checkmark the source PDF files you want processed.
- Press the Start Process button.
- The file progress status is updated as the PDF files are processed.

![PDFSplitsMakerInPtrogress](DocImages/PDFSplitsMakerInProcess.PNG)

- The process is accomplished with a background thread. The status indicates when the process is complete.

![PDFSplitsMakerDone](DocImages/PDFSplitsMakerDone.PNG)

- When the **Splits Viewer** check box is checked then the image results for any PDF file that has been processed are displayed in a separate splits images viewer.

![SplitsViewer](DocImages/SplitsViewer.PNG)

- The splits images viewer is intended for one to review the output and delete the images not needed. Pressing delete when any one or more images selected in the viewer allows one to delete the unwanted images.

## What Is Going On

- **ImageMagick** and **GhostScript** preform the tasks.

## Install

- Use the files in the AlreadyBuilt folder or rebuild using the repository VS project files.
- The **Magick.NET** file must be in the folder with the executable. **Magick.NET** is a .NET analogue for **ImageMagick**.
- **GhostScript** must also be loaded on your computer because **ImageMagick** relies on **GhostScript** for its PDF operations. In hindsight this program really should have been made without using **Magick.NET** and just relied on both **ImageMagick** and **GhostScript** loaded on your computer.

repository: akseidel/PDFtoWhateverC

repo_name: akseidel/PDFtoWhateverC


text:
![King Sans](https://github.com/codycurley/king-sans/blob/master/specimen/specimen-title.png?raw=true)

A sans-serif font inspired by the hand lettered MLK memorial march placards.

![I AM A MAN POSTER](https://github.com/codycurley/king-sans/blob/master/specimen/specimen-iam.png?raw=true)
![80PT](https://github.com/codycurley/king-sans/blob/master/specimen/specimen-glyphs-80pt.png?raw=true)
![HONOR KING POSTER](https://github.com/codycurley/king-sans/blob/master/specimen/specimen-honor.png?raw=true)

### ChangeLog

June 8, 2020 - Version 0.3
- Added # character

June 3, 2020 - Version 0.2
- Added initial repo
- Fixed descender values

April 3, 2020 - Version 0.1
- Initial set of character compelte `A-Z 0-9 . ! - en dash em dash :`

repository: codycurley/king-sans

repo_name: codycurley/king-sans


text:
# cmpe487-final_project
# Group Members
- Yasin Kaya
- Adil Numan Çelik

# Description
S0S! A new game based on classical SOS game.
You need to solve easy mathematical problems before your opponent to get right to make your move.

# Tested on
Windows 10 Operating System

We highly recommend you to run it on Windows 10. Ubuntu or another operating system won't run the program.

However, if you want to run it on Ubuntu you will need to install Tkinter following this [tutorial](https://www.techinfected.net/2015/09/how-to-install-and-use-tkinter-in-ubuntu-debian-linux-mint.html)

If you face with this error:
```bash
_tkinter.TclError: no display name and no +DISPLAY environment variable
```

Try this [solution](https://stackoverflow.com/questions/48254530/tkinter-in-ubuntu-inside-windows-10-error-no-display-name-and-no-display-env).

# How to Run
- To run the client open ../game/client folder in your Windows Terminal (cmd) and type:
```bash
python client_app.py
```

- To run the server:

During the presentation we will deploy our server on an AWS EC2 instance located on Frankfurt.
However, anytime you'd like to play the game you'll need to run the server on a machine of your choice.
When you run your own server you'll need to change the hard coded SERVER_IP value in client_app.py file's 63rd line.
Then, you can open ../game/server folder in your Windows Terminal (cmd) and type:
```bash
python receiver.py
```

# How to Play
You need to follow instruction on GUI.
Every time you get a new question fill the form and press enter as fast as you can.
You have unlimited number of tries before either you or your opponent finds the correct answer.
If you find the correct answer first, you can make your move.
To make move, first pick either S or O and press a button on board.

# Network Challenges
We calculate timestamp differences of two machines and average pings of players at last 6 messages.
This allows us to understand the sources of time difference between two answers.
- Timestamp difference is usually fixed and always considered while doing calculations.
- Ping difference is not fixed and calculated after every message to make sure players play on fair conditions.

To create a fair game we
- Make the player with faster connection wait as much as the ping difference between players.
- Calculate the time difference that two players receive the message using the average ping difference and timestamp difference. If this difference is more than 10 ms we update the question until we make sure that this difference is less than 10 ms.
- We calculate the amount of time players needed to answer a question. It is equal to difference between the moments that client sends the answer and receives the question. Since, all these times are calculated in clients, they will not be effected by timestamp differences and network latency. Clients send this calculated amount of time to server and server compares them. The player with the smallest amount of time gets the turn.


text:
[![][travis img]][travis]
[![][license img]][license]
[![][sonar img]][sonar]
[![][bugs img]][bugs]
[![][coverage img]][coverage]
[![][lines img]][lines]
[![][vulnerabilities img]][vulnerabilities]
[![][code_smells img]][code_smells]
[![][paypal img]][paypal]

[travis]:https://travis-ci.org/jslsolucoes/nginx-admin
[travis img]:https://travis-ci.org/jslsolucoes/nginx-admin.svg?branch=master

[license]:LICENSE
[license img]:https://img.shields.io/badge/License-Apache%202-blue.svg

[sonar]:https://sonarcloud.io/dashboard/index/com.jslsolucoes:nginx-admin
[sonar img]:https://sonarcloud.io/api/badges/gate?key=com.jslsolucoes:nginx-admin

[bugs]:https://sonarcloud.io/dashboard/index/com.jslsolucoes:nginx-admin
[bugs img]:https://sonarcloud.io/api/badges/measure?key=com.jslsolucoes:nginx-admin&metric=bugs

[coverage]:https://sonarcloud.io/dashboard/index/com.jslsolucoes:nginx-admin
[coverage img]:https://sonarcloud.io/api/badges/measure?key=com.jslsolucoes:nginx-admin&metric=coverage

[bugs]:https://sonarcloud.io/dashboard/index/com.jslsolucoes:nginx-admin
[bugs img]:https://sonarcloud.io/api/badges/measure?key=com.jslsolucoes:nginx-admin&metric=bugs

[lines]:https://sonarcloud.io/dashboard/index/com.jslsolucoes:nginx-admin
[lines img]:https://sonarcloud.io/api/badges/measure?key=com.jslsolucoes:nginx-admin&metric=lines

[vulnerabilities]:https://sonarcloud.io/dashboard/index/com.jslsolucoes:nginx-admin
[vulnerabilities img]:https://sonarcloud.io/api/badges/measure?key=com.jslsolucoes:nginx-admin&metric=vulnerabilities

[code_smells]:https://sonarcloud.io/dashboard/index/com.jslsolucoes:nginx-admin
[code_smells img]:https://sonarcloud.io/api/badges/measure?key=com.jslsolucoes:nginx-admin&metric=code_smells

[paypal]:https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=PE25DPU3CNFH4
[paypal img]:https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif

Java profiler
![jprofiler jprofiler](https://www.ej-technologies.com/images/product_banners/jprofiler_small.png)

# Updating news

15-06-2022 - Im currently looking for project sponsors/recurrent donations via paypal to host project binaries properly without quota usage and keep project updated bringing new features cycles. Company in pandemics is suffering a lot and nowadays i`m currently alone in this project with no money to pay for private storages or github storages. Project is sleeping for some years. I have some free extra time to work in the project but i need financial help. If you interested in help someway please contact<EMAIL_ADDRESS>

# nginx-admin
Nginx admin is an open source multiplatform manager for nginx software

Welcome to the new brand Nginx Admin 2.x-RC4 with a lot of improvments and bug fixes.
This milestone develop was a great breakthrough in system arch and unfortunately break compatibility with old 1.x version.
You can check new way to install components arch and new features like manager multiple nginx in a single manager ui on hot site.

Click here to check installation details, configurations, features, tutorials, etc

The default user for nginx admin ui manager is:
Login :    admin
Password : admin

Thanks for using nginx-admin.
Issues or questions can be done in https://github.com/jslsolucoes/nginx-admin/issues.

repository: jslsolucoes/nginx-admin

repo_name: jslsolucoes/nginx-admin


text:
# regrep.py

Regrep.py is a simple tool that allows you to recursively search a given directory for files with content matching a given expression.

## Usage

**python regrep.py [-h] [-name [NAME]] expression directory**

-h: Prints help

-name: Allows you to only search files matching a given name. * is wildcard.

expression: The regex expression to match

directory: The directory to traverse

## TODO
- Add concurrency
- Add timing printout "Done. Searched 4500 files in 4.3s"


text:
# Web map checker

This app demonstrates the use of ArcGIS REST JS with [sapper](https://sapper.svelte.technology/) a cutting edge web framework. [sapper is built on the [svelte](https://svelte.technology) component library and is a universal app framework that supports both client and server side rendering.

You may want to use a universal framework in your app for a few reasons:

1. Better SEO, because the app is rendered on the server search engines like Google can read the content and index your pages without using JavaScript.
2. Very fast performance. Because the app is rendered on the server browsers will render the initial HTML on the page providing a very fast experience, then JavaScript loads making the app interactive.
3. Server based sign in experiences can have longer sessions with less logins.
4. You might want access to a users token on the server side to perform background tasks like monitoring or data processing.
5. Increased security. In this example a users token is never stored on the client. Instead a a secure cookie is used on the client that pairs with an encrypted session store on the server. The client only gets short lived access tokens and is expected to frequently refresh them.

Since ArcGIS REST JS works on both the client and the server it is ideal for use in universal app frameworks.

Sapper is still in alpha and should not be used for production. However there are other universal app frameworks like [Nuxt](https://nuxtjs.org/) (Vue JS) and Next](https://nextjs.org/) (React)

## App Overview

Sapper works by starting up an [Express JS](https://expressjs.com/) web server and creating a route for each of the files in `src/routes`. Files ending in `.js` are API endpoints and files ending in `.html` are rendered as Svelte components.

The app has 4 API endpoints

* `src/routes/auth/authorize.js` - starts the oAuth 2.0 process to sign in a user.
* `src/routes/auth/post-sign-in.js` - completes the oAuth 2.0 process.
* `src/routes/auth/exchange-token.js` - provides a fresh token based on the secure session cookie when the current token expires.
* `src/routes/auth/sign-out.js` - signs the user out, destroying the saved session on the server and the session cookie on the client.

and 3 Svelte routes:

* `src/routes/index.html` - renders the main page for signed out users which shows a sign in buttons.
* `src/routes/webmaps/index.html` - renders a list of the users webmaps
* `src/routes/webmaps/[webmapId].html` - renders a detailed view for a webmap. The brackets indicate that will be replaced by an actual URL like `/webmaps/c7f2cdb8638147b0b5b792bcee800b48`

The `server.js` file defines the server and sets up [`express-session`](https://www.npmjs.com/package/express-session) with [`session-file-store`](https://www.npmjs.com/package/session-file-store) as well as defining the server side Svelte `Store` used to power the server side rendering.

`client.js` consumes the server side Svelte `Store` and uses it to hydrate the client side `Store`.

Once the app boots subsequent navigation by the user is handled client side by Svelte for better performance.

This app is based on https://github.com/sveltejs/sapper-template.

## Running this demo

1. Like all the other demo apps, run `npm run bootstrap` in the root directory.
1. `cd demos/webmap-checker-sapper`
1. Create a `.env` file at the root of the `webmap-checker-sapper` folder that contains the following:
   ```text
   CLIENT_ID=YfFEWoHwtOY4KP1t
   REDIRECT_URI=http://localhost:3000/auth/post-sign-in
   ENCRYPTION_KEY=vf00tpMiGRSCO36yrbNm9jWyAStIJWJ5
   SESSION_SECRET=Sb66uSlcA3RqyIXLOtwK5P1a37FvYqHD
   PORT=3000
   ```
   **Use these values only for development and testing out the demo.**
1. `npm run dev`

## Configuration

There are five config values stored in `.env`:

* `CLIENT_ID` - The client id from an app registered in ArcGIS Online. Directions for setting this up are part of the [named user login documentation](https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/signing-in-arcgis-online-users/).
* `REDIRECT_URL` - A valid redirect URL from the app that owns the `CLIENT_ID`. Directions for setting this up are part of the [named user login documentation](https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/signing-in-arcgis-online-users/).
* `ENCRYPTION_KEY` - Any string, but preferably a secure key from somewhere like https://randomkeygen.com/.
* `SESSION_SECRET` - Any string, but preferably a secure key from somewhere like https://randomkeygen.com/.
* `PORT` - The port to run the development server on.

## Authentication Workflow

This sample differs from other workflows in how authentication works but shows the flexibility of the ArcGIS REST JS library to perform server based authentication, store sessions on the server and seamlessly share sessions with the client and ArcGIS API for JavaScript

1. First a user sign in with OAuth 2.0. This starts by sending the user to `/auth/authorize`:

   ```html
   <a href="/auth/authorize">Sign in to get stared</a>
   ```
2. Inside the `/auth/authorize` endpoint we call [`UserSession.authorize()`](https://esri.github.io/arcgis-rest-js/api/auth/UserSession/#authorize) to start the Oauth 2.0 login process. This redirects the user to the ArcGIS Online authorization page where they will sign in with their ArcGIS Online account.
3. After the user signs in with their ArcGIS Online account they are redirected back the app at the configured redirect URL which is `/auth/post-sign-in`. We then call [`UserSession.exchangeAuthorizationCode()`](https://esri.github.io/arcgis-rest-js/api/auth/UserSession/#exchangeAuthorizationCode) which finishes the authroization workflow and returns a [`UserSession`](https://esri.github.io/arcgis-rest-js/api/auth/UserSession/) that we can use to authenticate subsequent requests. In order to persist the session we assign it to `request.session.userSession` which triggers the [Express session middleware](https://github.com/expressjs/session). `/auth/post-sign-in` finishes by redirecting the user to `/webmaps` which is the main landing page of the app.
4. When `/auth/post-sign-in` finishes the session middleware saves the values assigned to `request.session` which includes our [`UserSession`](https://esri.github.io/arcgis-rest-js/api/auth/UserSession/). The session middleware uses a defined store (in this case [`session-file-store`](https://www.npmjs.com/package/session-file-store)) to serialize and encrypt the session to a file on disk. Then the session middleware sets a cookie on the client. On subsequent requests the session middleware will use the cookie to lookup the encrypted session and rehydrate our [`UserSession`](https://esri.github.io/arcgis-rest-js/api/auth/UserSession/).
5. Since we also need access ot our [`UserSession`](https://esri.github.io/arcgis-rest-js/api/auth/UserSession/) on the client we can use [`UserSession.toJSON()`](https://esri.github.io/arcgis-rest-js/api/auth/UserSession/#toJSON) method to convert it to a JSON object that can be serialized and sent to the client. Since our server-side session includes a refresh token we also need to delete the refresh token from the session before sending it to the client. The serialized session is sent to the client via sappers `Store` class.
6. On the client the serialized session is recreated and can now be used for requests on the client.
7. Since sessions on the client are short lived (they expire after a few hours) we need a mechanism to refresh the client side session with a new token if the old token expires. This needs to work seamlessly even in the middle of a series of requests. ArcGIS REST JS provides an easy mechanism to do this. Consider the following request:

   ```js
   getItem(webmapId, {
     authentication: userSession // userSession is expired
   }).catch(error => {
     // handle the error
   })
   ```

   `error` will be an instance of either [`ArcGISRequestError`](https://esri.github.io/arcgis-rest-js/api/request/ArcGISRequestError/) or [`ArcGISAuthError`](https://esri.github.io/arcgis-rest-js/api/request/ArcGISAuthError/). `ArcGISAuthError` includes a special `retry()` method that can accept a new session and retry the request. You can them implement your logic to refresh a session and retry the request as in this example:

   ```js
   getItem(webmapId, {
     authentication: userSession // userSession is expired
   }).catch(error => {
     if (error.name === "ArcGISAuthError") {
       return methodThatRefreshesSession(error).then((newSession) => {
         return error.retry(newSession);
       });
     }

     throw error; // otherwise rethrow the error so we can handle it in a later catch
   }).then(response => {
     // handle a successful response.
   }).catch(error => {
     // handle an actual request failure or error.
   });
   ```
8. The retry workflow is handled entirely by a simple utility function called `retryWithNewSession()`. In order to get a new token a request is made to `/auth/exchange-token`. This request includes the session cookie so the server can find the instance of [`UserSession`](https://esri.github.io/arcgis-rest-js/api/auth/UserSession/) and call [`UserSession.refreshSession`](https://esri.github.io/arcgis-rest-js/api/auth/UserSession/#refreshSession) to refresh the session, strip out the refresh token and return the new session to the client which then retries the request with the new authentication.
9. In order to load the webmaps we also need to pass our [`UserSession`](https://esri.github.io/arcgis-rest-js/api/auth/UserSession/) to the ArcGIS API for JavaScript [`IdentityManager`](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html) to allow it load resources that require authentication. You can use [`UserSession.toCredential()`](https://esri.github.io/arcgis-rest-js/api/auth/UserSession/#toCredential-summary) to convert the session into a [`Credential`](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-Credential.html) to pass to [`IdentityManager`](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html) as shown below:

   ```js
   require([
     "esri/identity/IdentityManager"
   ], function (esriId){
       esriId.registerToken(session.toCredential());
   });
   ```

   New credentials should also be registered with [`IdentityManager`](https://developers.arcgis.com/javascript/latest/api-reference/esri-identity-IdentityManager.html) when they are retrieved from the server as older sessions expire.

repository: jgravois/arcgis-rest-js

gha_language: TypeScript

repo_name: jgravois/arcgis-rest-js


text:
# maybe

[![Pub](https://img.shields.io/pub/v/maybe.svg)](https://pub.dartlang.org/packages/maybe)

No more null check with an dart equivalent of Maybe (Haskel, Elm) / Option (F#).

## Usage

The key is that you need to call the `some` or `when` to access your potential value so you are forced to check its status before using it.

### `Maybe<T>.nothing` : creating an optional item that is empty

```dart
final maybe = Maybe<String>.nothing();
```

### `Maybe.some` : creating an optional item with a value

```dart
final maybe = Maybe.some("hello world");
```

```dart
final isNothing = Maybe<String>.some(null); // By default `some` with a null value is converted to `nothing`
final isNotNothing = Maybe<String>.some(null, nullable: true);
```

### `some` : extracting some value

```dart
final maybe = Maybe.some("hello world");
final value = some(maybe, "default"); // == "hello world"
```

```dart
final maybe = Maybe<String>.nothing();
final value = some(maybe, "default"); // == "default"
```

### `isNothing` : testing if some value

```dart
final maybe = Maybe.some("hello world");
final value = isNothing(maybe); // false
```

```dart
final maybe = Maybe<String>.nothing();
final value = isNothing(maybe); // true
```

### `when` : triggering an action

```dart
var maybe = Maybe.some("hello world");
when(maybe, some: (v) {
    print(v); // "hello world"
});

// Defining nothing
maybe = Maybe.nothing();
when(maybe, some: (v) {
    print(v); // not called!
});

// You can add a default value when nothing
maybe = Maybe<String>.some(null);
when(maybe, some: (v) {
        print(v); // "hello world"
    },
    defaultValue: () => "hello world");
```

### `mapSome` : converts a value type to another

```dart
var maybe = Maybe.some("hello world");
var converted = mapSome<String,int>(maybe, (v) => v.length);
var value = some(converted,0); // == 11
```

```dart
var maybe = Maybe<String>.nothing();
var converted = mapSome<String,int>(maybe, (v) => v.length);
var value = some(converted, 0); // == 0
```

### `MaybeMap<K,V>` : a map with optional values (*aka Map<K, Maybe<V>>*)

```dart
var map = MaybeMap<String,String>();
map["test"] = Maybe.nothing(); // doesn't add value
map["test"] = Maybe.some("value"); // adds value
when(map["test"], some: (v) => print(v));

map["test"] = Maybe.nothing(); // deletes key
when(map["test"], isNothing: (v) => print("deleted :" + map.containsKey("test").toString()));
```

```dart
Map<String,String> maybeMap = {
    "test": "value",
};
var maybeMap = MaybeMap<String,String>.fromMap(maybeMap);
when(map["test"], some: (v) => print(v));
```

## What about quiver's `Optional` ?

The [Optional](https://github.com/google/quiver-dart/blob/master/lib/src/core/optional.dart) type has several similarities with `Maybe`, but there are several subtle differences.

### Optional can be `null`

Let's take a quick example :

```dart
class Update {
  final Optional<String> title;
  final Optional<String> description;

  Update({Optional<String> title, Optional<String> description})
      : this.title = title ?? Optional<String>.absent(),
        this.description = description ?? Optional<String>.absent();
}

final update = Update(title: Optional.of('sample'));

update.title.ifPresent((v) {
    print('title: $v');
});

update.description.ifPresent((v) {
    print('description: $v');
});
```

Thanks to static functions, all can be replaced by :

```dart
class Update {
  final Maybe<String> title;
  final Maybe<String> description;

  Update({this.title this.description});
}

final update = Update(title: Maybe.some('sample'));

when(update.title, some: (v) {
    print('title: $v');
});

when(update.description, some: (v) {
    print('description: $v');
});
```

So, the critical part is that you can forget that `Optional` can be `null` itself and produce exceptions (`update.title.ifPresent` in our example). You are then forced to test its nullity and you come back to the initial problematic. This is where `Maybe` feels more robust to me.

### `absent` is similar to `null`

With `Maybe`, values can be nullable.

In the following example, we explicitly say that the title should have a new `null` value.

```dart
class Update {
  final Maybe<String> title;
  final Maybe<String> description;

  Update({ this.title, this.description});
}

final update = Update(title: Maybe.some(null, nullable: true);
```

This is really different than having a `nothing` title, which significates that the title shouldn't be modified.

```dart
final update = Update(title: Maybe.nothing());
```

gha_language: Dart


text:
# Not actively maintained, but PRs are welcome

# TraceViewer
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

The trace viewer can be used to _view_ and _visualize_ (buggy) execution traces generated by the [P#](https://github.com/p-org/PSharp) tester. Its goal is to provide _highly-customizable trace views_ to significantly help the process of debugging your asynchronous application.

## How to build
First run the following in your command line to restore the packages:
```
dotnet restore .\TraceViewer.sln
```

Then, open the `.\TraceViewer.sln` solution and build.

## How to use

To open the trace viewer use the following command:
```
.\bin\net46\TraceViewer.exe
```

The input to the trace viewer is a `.pstrace` file, which is dumped by the `PSharpTester.exe`. From the `File` menu, choose the trace file to be loaded. The viewer will then populate the _dynamic trace view_.

## Trace Viewing
The dynamic trace view can help you read and make sense of a specified `.pstrace` file. By default it lists all the actions that occurred during the program execution, as seen in the following figure:

![](./Images/trace_viewer_0.png)

### Trace View Focus
You can focus on specific steps of the trace by selecting a cell. The trace viewer will then highlight only the steps that are related to the selection. For example, in the following figure, the trace viewer focuses on any action related to machine `Raft.Server(3)`.

![](./Images/trace_viewer_1.png)

In the following figure, the trace viewer focuses on any action that caused a `VoteRequest` event to be sent.

![](./Images/trace_viewer_2.png)

### Trace Searching
You can use the search text box (Ctrl+F) to find strings in the trace. All rows that do not contain the searched string will fade. By pressing enter you can move to the next row containing the string.

### Trace View Collapse
You are also able to collapse the trace view by selecting a cell and then clicking the `Collapse` menu button. This hides all actions not related to the selected cell, similar to the following figure:

![](./Images/trace_viewer_3.png)

To reset the trace view, click the `Expand` menu button (or click outside the trace view).

repository: p-org/TraceViewer

repo_name: p-org/TraceViewer


text:
* both collection of TEST, and of dependencies, requires 'parsing' of
  the .c .h files, so, do both in the same program.

* `target/` is used to build, flat. Every basename (both .c and .s)
  can only appear once across *all* used libraries currently. This is
  nuts of course, just the status quo for right now.

* we find the list of all .o files that need to be build *also* from
  the same dependency information that is collected from 'parsing' the
  .h and .c files. We simply expect that the dir+basename of .h files
  and belonging .c files is the same. Also, we expect that each .s
  file has a corresponding .h file that's included by the programs
  that use the routines in the .s file (sounds reasonable).

repository: pflanze/chj-ctest

repo_name: pflanze/chj-ctest


text:
# Changelog

## 0.3.2
- Fix erratic behaviour after opening new files

## 0.3.1
- Updated documentation

## 0.3.0
- Compatibility with Atom 1.2.0 (Thanks to @Yoshi325)
- Better support for multiple selections
- Grouped undo/redo. It is no longer necessary to press Ctrl+Z for each character typed.

## 0.2.3 - update to shadow DOM
- Fix #5. Thanks again @muchweb for his contribution to make it compatible with [shadow DOM](https://atom.io/docs/latest/upgrading/upgrading-your-syntax-theme)

## 0.2.2 - theme changes
- Thanks to @muchweb for his contribution around cursor appearance

## 0.2.1
- First published version

repository: AlbertoMarnetto/my-atom-theme

repo_name: AlbertoMarnetto/my-atom-theme


text:
# Changelog

All notable changes to this project will be documented in this file.

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

## [0.2.2] - 2021-01-26
### Changed
- Update module dependencies.

## [0.2.1] - 2020-12-21
### Changed
- Update module dependencies.

## [0.2.0] - 2020-10-22
### Changed
- Use a hash of the function arguments instead of just concatenating everything into a string.

### Added
- Extra tests for scenarios in which promises get rejected.

## [0.1.3] - 2020-10-20
### Changed
- Drop jsdoc documentation.

## [0.1.2] - 2020-10-20
### Security
- Update dependencies.

## [0.1.1] - 2020-10-18
### Added
- Working example involving recyclable requests to an HTTP server.

### Changed
- More legible README.md.
- Extra assertions in unit tests.

## [0.1.0] - 2020-10-16
### Added
- Initial module implementation.


text:
---
title: But some of them are on opposite sides
author: en
---

Before we can properly consider why Good ought to be rewarded, and why Evil
ought to be punished, and why not the other way around (or why it *is* the
other way around), one should first consider what Good and Evil are, and why
they *are* at all, what it means for a thing to be Good or Evil. If we
accept that human nature has us believe that Good ought to be rewarded and
Evil ought to be punished, this permits us the following operational
definitions: Good is what is rewarded, and Evil is what is punished.

Such a definition is very simplifying, easily explaining why one ought to do
Good (there is reward), why one oughtn't to do evil (there is punishment),
glorification of the rich and powerful (it was rewarded, it must have been
Food), and victim blaming (it was punished, it must have been Evil).

The explanation of why one ought to act ethically even if punished for it,
then, is perhaps not the most satisfying: one shouldn't, ethics is not Good;
one not should act ethically because this has some intrinsic quality which
has that it ought to be done even when it is punished; that makes *no sense*
unless we that make the assumption *there is a reward for punishment*, which
is tantamount to postulating falsum.

Complications in this model arise in three ways: first, why human nature is
so; second, whether the consequences to an action can be perceived as reward
or punishment or neither or not at all; and third, weighing rewards with
punishments.

The first of these is most easily explained by anthropic bias: this is what
we observe, because if it were otherwise, we could not observe it; if we did
not define what ought and oughtn't to be somewhat like this, there wouldn't
really be enough humans around, let alone with enough time to spare thinking
about the source of ethics and morality: there wouldn't really be an excuse
to *be* at all. There are apparently people who think that way, though, but
they have a certain tendency to stop thinking that way, either by being
convinced otherwise or by being prevented from thinking by a failure to be.

The second and the third are rather more interesting, and interact with each
other somewhat:

It's difficult to say whether it's actually possible to compare an arbitrary
pair of rewards and punishments, but certainly we can *posit* two extremes:
a maximum reward which yields a net reward when compared to the sum of all
possible simultaneous punishments; and a maximum punishment which yields a
net punishment compared to the sum of all possible simultaneous rewards.
(The two are, of course, not simultaneously possible---is the set containing
all nonrecursive sets recursive?) This provides a familiar conception of
absolute Good and Evil in terms of actions which result in these maximum
consequences.

However, in defining Good an Evil in terms of consequences, we have added an
element of futurity, and thus incertainty, which introduces the problem of
*judging* the consequences of an action; and it is natural that, to some
extent, we form expectations for consequences based on what has previously
followed similar actions---and, if the psychology of other mammals is any
guide, frequently generalising and discriminating only when expectation is
violated.

Then, one still must evaluate whether the consequences are desirable (Good)
or undesirable (Evil), and it is entirely possible for the consequence to be
entirely inconsequential or at least in part indiscernable---whether due to
lack of information or because information is contradictory. Furthermore, if
both rewards and punishments are possible consequences, their respective
values and probabilities *must be weighed against each other*; the relative
values assigned to consequences and weights assigned to probabilities can
contribute substantially to different persons' assessments of a situation.
In addition, there is an element of the *unknown* and unforeseeable, which,
understandably, is difficult to account for.

However, since the future is not, from our point of view, deterministic, it
becomes impossible to evaluate the morality of any action unless one is at
the terminal end of time and all possible consequences have resolved, and,
supposing causality, information about an action acquired after the actor
acted cannot affect the action, it is only *useful* to judge whether an
action is Good or Evil in light of all information available to the actor at
the time of the action.

All of this, brings us back to Job thus: Job has received a negative result,
but what information he has brings him to the conclusion that he has been
righteous; he is *not* able to know that he was chosen for this "punishment"
*because* he has been the most righteous.

There is, however, no guarantee that what is expected is what will actually
come to pass; and God's information is not the same as Job's. Therefore, one
cannot attribute to God the same beliefs regarding Good and Evil as Job or
any of humanity; indeed, for an omnipotent being, consequential morality is
not really *meaningful*. God doesn't *need* a reason to something; it *is*.
And just as well, if God doesn't need a reason for anything, there's no use
in worrying how God might respond to one's action: God can respond however,
and can't be anticipated; one ought, instead, to pay attention to things
which *do* need reasons and have limitations---such as, say, the world.

repository: didhe/hatfree-hakyll

repo_name: didhe/hatfree-hakyll


text:
django-social-friends-finder
============================

An extension app for `django-social-auth` or `django-allauth` that fetches your friends from different social-networks.
It displays matched friends so you can suggest your users to add them as friend or follow them.

Dependencies
------------

To use it with `django-social-auth`

  * django-social-auth>=0.7.10 and all its dependencies https://github.com/omab/django-social-auth.git

To use it with `django-allauth`

  * django-allauth>=0.8.3 and all its dependencies https://github.com/pennersr/django-allauth

Back-end dependencies

  * python-twitter>=0.8.2 for twitter backend http://code.google.com/p/python-twitter/
  * facebook-sdk for facebook backend https://github.com/pythonforfacebook/facebook-sdk.git

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

There are 3 ways to install this app

    pip install django-social-friends-finder

or build from the source.

    python setup.py install

or add `social_friends_finder` to your path

Usage and Configuration
-----------------------

Add `social_friends_finder` to your APPS list in your settings file

    INSTALLED_APPS = (
        ...
        "social_friends_finder",
    )

Add urls to your url config

    urlpatterns = patterns('',
        ...
        url(r'^find-friends/', include('social_friends_finder.urls')),
    )

Optionally you can use following settings:

    SF_REDIRECT_IF_NO_SOCIAL_ACCOUNT_FOUND: True if no social account found. Default is True
    REDIRECT_URL: The url to redirect if above setting is used. Default is "/"

Go to `/find-friends/list/` on your browser.

Contributions
-------------

Currently there are facebook and twitter backends are available. Please help to implement new backends.

Implementing backend classes are easy. Just create a class inherits from `BaseFriendsProvider` and implement two of its methods.
See backends module for example implementations

The software design for back-ends needs to be tweaked a little. Encapsulating the allauth and social-auth behaviors in different subclasses would help.
Also a common interface for backends to load them silently is crucial. Now if there is a missing backend, we raise an error. Factory class that loads them is also very ugly.

I needed to implement this app for a real-world project with an impossible deadline, and now no time to refactor it. So if you can spend some time on the above issues, that'd be awesome.

Thanks `lizrice` for the `django-allauth` integration.

Change Log
----------

See `CHANGES.txt` file for history

repository: TankTopTV/django-social-friends-finder

repo_name: TankTopTV/django-social-friends-finder


text:
# h5fortran Examples

From the h5fortran/ directory, specify the h5fortran install like:

```sh
cmake -B build -DCMAKE_INSTALL_PREFIX=~/h5fortran
cmake --build build
cmake --install build

cmake -B example/build -S Examples -Dh5fortran_ROOT=~/h5fortran
```

## Example 1

Example 1 shows the functional one-step interface of h5fortran

## Example 2

Example 2 shows the object-oriented interface of h5fortran, which may offer faster performance if more than one variable is being read or written.

## Example 3

Example 3 is of a C main program calling a Fortran interface to h5fortran

## Example 4

Example 4 is of a C++ main program calling a Fortran interface to h5fortran

For a C++ header-only object-oriented HDF5 library, consider [HighFive](https://github.com/BlueBrain/HighFive)

## Notes

### Non CMake build

CMake makes building much easier.
If for whatever you don't wish to use CMake, the HDF5 compiler wrapper (if available on your system) may work.
Since the HDF5 compiler wrapper is not always working or available, we strongly recommended CMake as above for any HDF5-based application.

On Ubuntu it looks like:

```sh
$ h5fc -show

gfortran -I/usr/include/hdf5/serial -L/usr/lib/x86_64-linux-gnu/hdf5/serial /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5hl_fortran.a /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_hl.a /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5_fortran.a /usr/lib/x86_64-linux-gnu/hdf5/serial/libhdf5.a -lpthread -lsz -lz -ldl -lm -Wl,-rpath -Wl,/usr/lib/x86_64-linux-gnu/hdf5/serial
```

gha_language: Fortran


text:
# Calendar Generator
A simple web page that allows to create a personalized, printable calendar for any year, complete of holidays and an image for each month.

A live version is hosted here: http://fmossott.github.io/CalendarGenerator/calendario.html

repository: fmossott/CalendarGenerator

repo_name: fmossott/CalendarGenerator


text:
# QlikSenseQRSAPI- Delete a user
Script to delete a user

# ReadMe
- The user has to be existed in Qlik Sense prior to run this script.
- ID of the user to be deleted is necessary to run this script - You can find the ID of the user in Qlik Sense Managemnet Console
- Please run this script on Qlik Sense Central node
- Please change the code based on your environment
- You may need to change objectID (ID of the user), UserDirectory and UserId based on your environment

# Instruction
1. Donwload QRS_Delete.ps1 onto Qlik Sense Central node
2. Follow each bullets stated in ReadMe
3. Open Windows Powershell and move to the folder where you saved QRS_DeleteUser.ps1 on Powershell Console
4. Run .\QRS_DeleteUser.ps1

# Requirement
Qlik Sense

# Disclaimer
The scripts is not supported by Qlik. Please use it on your own risk
# License
This project is provided "AS IS", without any warranty, under the MIT License - see the LICENSE file for details


text:
# sgrtab
Display standard/custom table of SGR combinations (terminal colors)

https://github.com/avih/sgrtab

`sgrtab` is a POSIX-compliant shell script which renders a standard or custom
table of SGR combinations - _Select Graphic Rendition_ terminal codes.

By default it renders the standard table with ` gYw ` using all the colors,
i.e. columns (X) are the different background colors, rows (Y) are different
foregrounds, and each row is displayed twice (Z): normal or bold.

However, all the values are fully customizable: the values of each axis,
the sample text at the cells, and it's also possible to use global modifiers
which affect all table cells, for instance adding "2" which is the SGR code for
"dim", or even 2 and 7 to make all cells dim and inverted.

But it's not limited to the normal colors. You could use 256-colors values
at the axes, or true colors, or even not use colors and instead display
combinations of different attributes (bold, dim, underline, etc).

All this while keeping the table nicely aligned and being reasonably quick.

```
Usage: sgrtab [[-g] G1..] [-m MODE] [-t TXT [-w W]] [-[xXyYzZ] S1..] ...
Display terminal colors (SGR sequences) in various modes.
  MODE : table(default)/256/true/info
  G1.. : Global individual SGR modifiers added to all table cells.

-m MODE or --MODE:
  256  : 256 colors indexed palette (accepts -g, ignores others).
  true : true-colors surface (accepts -[gt], ignores others).
  info : attributes and their SGR codes (accepts -[gty], ignores others).
  table: (default) display standard/custom table of terminal colors:
   - The Z axis repeats each row with the different z values.
   - Default: X: 40-47 (bg colors), Y: 30-37 (fg), Z: -/1 (normal/bold).

TXT   : Sample text. The default is ' gYw ', or ' ' with mode 'true'.
W     : On-screen width of txt (work around locale/alignment issues).
S1..  : Axis SGR sequences. Use '-' as an empty sequence.
-[xyz]: S1 S2 ... are added to the axis. -[XYZ]: replace axis values.
Each cell uses an SGR sequence of: [x-seq][y-seq][z-seq][G1;G2...] .
Example: sgrtab -g 3 -y 7 '33;7' -X '- 2 4 48;5;40'
         > global italic (3), two extra rows (-y), four columns (-X).
```

# Screenshots

## Default mode (`table`)
![sgrtab screenshots using xterm](https://raw.githubusercontent.com/avih/auxiliary/master/images/sgrtab/sgrtab-examples.png)

## Other modes: `--info`, `--256`, `--true`
![sgrtab screenshots using xterm](https://raw.githubusercontent.com/avih/auxiliary/master/images/sgrtab/sgrtab-info-256-true.png)

repository: avih/sgrtab

repo_name: avih/sgrtab


text:
import withDoc from '../../../lib/with-doc'

import { sergio } from '../../../lib/data/team'

export const meta = {
  title: 'Support Channels',
  description: 'Finding help beyond documentation for ZEIT and Now',
  date: '21 Jul 2017',
  authors: [sergio],
  editUrl: 'pages/docs/other/support-channels.md'
}

We have a few support channels you can use to clarify doubts and solve issues.

## Platform Status
Check our [Twitter status account](https://twitter.com/zeit_status) and our [status page](https://zeit-status.co/) to verify if the platform have some issue at the moment.

## Documentation
Check the [documentation](/docs), here we have a lot of information about how you can use the CLI and the platform, and we have project examples and integration with third-party services

### API Documentation
We also have a [documentation for our API](https://zeit.co/api). If you want to build something on top of our platform you will find a lot of information about it there.

## GitHub
We have many [GitHub repositories](https://github.com/zeit) for almost every service or product we have. You can create issues in that repositories and the team and the community will help you as soon as possible. Some repositories you can access are [now-cloud](https://github.com/zeit/now-cloud), [now-cli](https://github.com/zeit/now-cli), [now-desktop](https://github.com/zeit/now-desktop), [now-client](https://github.com/zeit/now-client), [next.js](https://github.com/zeit/next.js), [hyper](https://github.com/zeit/hyper), [pkg](https://github.com/zeit/pkg), [micro](https://github.com/zeit/micro) and [more](https://github.com/zeit).

## zeit.chat
Our community's Slack, there you can ask for help and either the community and the ZEIT Team will answer and help you solve any doubt you could have. You can access to it going to [zeit.chat](https://zeit.chat).

## Twitter
You can use Twitter to send us a DM or mention to [@zeithq](https://twitter.com/zeithq) and a team member will contact you and help you with anything.

## Email
The last but not least support channel is our [support<EMAIL_ADDRESS>email. If you have very custom questions or related to private information (eg. billing issues) you don't want to share in Slack or you like more to use email you can contact us and we happily will help you as far as we could.

export default withDoc({...meta})(({children}) => <>{children}</>)

repository: lachlanjc/docs

repo_name: lachlanjc/docs