text:
Simple TCP mocking tool for replaying [tcpdump](http://www.tcpdump.org/) or [Wireshark](https://www.wireshark.org/) captured service or client traffic.

If you like this project, **please give it a star :star:!** This helps the project be more visible, gain relevance and encourages us to invest more effort in new features.

## Description

This project is inspired in other tools like [WireMock](http://wiremock.org/), [mountebank](http://www.mbtest.org/) and [MockTCPServer](https://github.com/CloudRacer/MockTCPServer), but provides following features that are partially supported by listed tools:
  * TCP mocking support, with async messages sent (i.e: allows sending welcome messages which are not supported by mountebank).
  * Load mocking specification from tcpdump `.pcap` or Wireshark `.json` dump files and provides a reduced `.yaml` format for easy versioning.
  * Allows to easily run the mock embedded in Java projects for easy testing
  * Allows both mocking servers and clients.

Take into consideration that this tool is very simple, and only replays TCP traffic that has previously been recorded, so if user (or server) interacts with the tool in unexpected ways, then the mock will not answer until next expected packet is received. For more complex scenarios consider using one of previously mentioned tools.

## Usage

This tool (as previously listed ones) is particularly useful to implement integration tests without the hassle of flaky connections, or complex environment setup or restrictions (VPN, quotas, etc).

**Note:** If you use `.pcap`, since Wiresham uses [pcap4j](https://www.pcap4j.org/) for `.pcap` files support, you need to install libpcap or winpcap as detailed in [pcap4j website](https://www.pcap4j.org/).

The general use case for the tool takes following steps:
  1. User captures traffic with tcpdump (with something like `tcpdump port 23 -w ~/traffic.pcap`) or Wireshark between a client application and a service.
  1. If traffic has been captured with Wireshark then store the captured traffic, filtering with proper condition for service port, in a `.json` file (File -> Export Packet Dissections -> As JSON...)
  1. At this point user might follow three potential courses:
      1. Start Wiresham in standalone mode with stored `.pcap` or `.json` and connect to it with the client application to reproduce previously stored traffic.

          E.g.: `java -jar wiresham-standalone.jar -p 2324 -a <IP_ADDRESS> wireshark-dump.json`

          > Latest version of wiresham-standalone.jar can be downloaded from [maven central](https://search.maven.org/).

          A similar example for a tcpdump traffic:

          E.g.: `java -jar wiresham-standalone.jar -p 2324 -a <IP_ADDRESS> traffic.pcap`

          > Run `java -jar wiresham-standalone.jar -h` to get usage instructions and help.
      1. Same as previous one but start Wiresham in standalong mode to emulate a client application (instead of a service application):

        E.g.: `java -jar wiresham-standalone.jar -t <IP_ADDRESS>:23 -a <IP_ADDRESS> wireshark-dump.json`

        > Note that the only difference with previous example is the use of `-t` to specify target server address instead of the `-p` option to specify the local port.

      1. Convert the tcpdump or Wireshark dump to a reduced `.yaml` file (an example file can be found in [simple.yaml](src/test/resources/simple.yaml)), optionally manually tune it (response times or binary packets), add it to the project repository and implement tests using [VirtualTcpService class](src/main/java/us/abstracta/wiresham/VirtualTcpService.java) or [VirtualTcpClient class](src/main/java/us/abstracta/wiresham/VirtualTcpClient.java).

          To convert a script run something like `java -jar wiresham-standalone.jar -d reduced-dump.yml -a <IP_ADDRESS> wireshark-dump.json`.

          To add Wiresham as dependency in maven project include in `pom.xml` the dependency:

          ```xml
          <dependency>
           <groupId>us.abstracta</groupId>
           <artifactId>wiresham</artifactId>
           <version>0.1</version>
          </dependency>
          ```

          > Check what is the latest version in [releases](https://github.com/abstracta/wiresham/releases)

          > Check [VirtualTcpServiceTest](src/test/java/us/abstracta/wiresham/VirtualTcpServiceTest.java) and [VirtualTcpClientTest](src/test/java/us/abstracta/wiresham/VirtualTcpClientTest.java) for simple and raw examples on how to use the classes.

## Must-know features

### Multiple port
There are some scenarios where we need to mock several services under the same domain but differing from port.
For such scenarios multiple port support was added.
Here there is a flow example on how a YAML would look:

```yaml
- !server {data: FFFF, delayMillis: 10, port: 2324}
- !client {data: FFFF}
- !server {data: FFFF, port: 2325}
- !client {data: FFFF}
- !server {data: FFFF}
```

**Important considerations:**

1. Connections can be established at any time
1. Dump is read sequentially. Meaning that any packet received out of order will be ignored (parallelism not yet supported)
1. When a port is defined, subsequent packets until another port is defined will use the mentioned port without having to explicitly define it (as shown in the example)
1. *Wireshark* dumps and *tcpdumps* are parsed using multiple port when providing endpoint address using `-a` flag
	>  Note: if port is provided alonside with the address *E.g: <IP_ADDRESS>:23* only the specified port will be parsed otherwise, all involved ports will be part of the flow.
1. Client mode also supported

## Tips

#### How to filter by port while using packet dissections
Since packet dissections are in JSON schema we can take advantage of using [**jq**](https://jqplay.org/).

The filter to use can be applied using:
- Using [jq playground](https://jqplay.org/) (online version of jq). [Here](https://jqplay.org/s/qh8LMDecqyR) there is an example.
- Using jq cli. `jq '<filter-here>' dissection-packets.json`

Filter: `. |= map(select((.["_source"].layers.tcp["tcp.srcport"]  == "PORT_NUMBER") or (.["_source"].layers.tcp["tcp.dstport"]  == "PORT_NUMBER")))`
> PORT_NUMBER needs to be replaced by the port we want to filter.

In short, this filter is going to exclude all packets that don't interact with the PORT_NUMBER we want.

## Build

In case you want to build this project from scratch, it is required [JDK8+](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html) and [maven](https://maven.apache.org/) 3.3+.

Then just run `mvn clean install` and the library (and standalone version) will be built and installed in the local maven repository.

## Release

To release the project, define the version to be released by checking included changes since last release and following [semantic versioning](https://semver.org/).
Then, create a [release](https://github.com/abstracta/wiresham/releases) (including `v` as prefix of the version, e.g. `v0.1`), this will trigger a GitHub Actions workflow which will publish the jars to maven central repository (and make it general available to be used as maven dependency projects) in around 10 mins and can be found in [maven central search](https://search.maven.org/#search%7Cgav%7C1%7Cg%3A%22us.abstracta%22%20AND%20a%3A%22wiresham%22) after up to 2 hours.

repository: abstracta/wiresham

gha_language: Java

repo_name: abstracta/wiresham


text:
README
======

Transistor One - Simple Radio App
-----------------------------

**Version 3.2.x ("Life on Mars?")**

Transistor One is a bare bones app for listening to radio programs over the internet. The app stores stations as files on your device's external storage. It currently understands streams encoded in MP3, AAC and Ogg/Opus(*).

Important note: This is an app of type BYOS ("bring your own station"). It does not feature any kind of built-in search option. You will have to manually add radio stations.

Transistor One is free software. It is published under the [MIT open source license](https://opensource.org/licenses/MIT). Want to help? Please check out the notes in [CONTRIBUTE.md](https://github.com/y20k/transistorone/blob/master/CONTRIBUTE.md) first.

Transistor One, Transistor? How confusing!
------------------
Transistor One is the old Transistor app before version 4.x. The new [Transistor](https://github.com/y20k/transistor/) only supports Android from version 7.1 on upwards. Transistor One on the other hand runs on Android devices from version 4.4 on. Transistor Ones is just a maintainance fork of the old Transtistor 3.2. Do not expect any new features.

How to use Transistor One
---------------------
### How to add a new radio station?
The easiest way to add a new station is to search for streaming links (m3u or pls) and then choose Transistor One as a your default handler for those file types. You can also tap the (+) symbol in the top bar and paste in streaming links directly. Please note: Transistor One does not feature any kind of built-in search option.

### How to play back a radio station?
Tap the Play button ;).

### How to stop playback?
Tap the Stop button within the app or on the notification - or just unplug your headphones.

### How to start the sleep timer?
Tapping the Clock symbol in the stations detail screen starts a 15 minute countdown after which Transistor One stops playback. An additional tap adds 15 minutes to the clock. Playback must be running to be able to activate the sleep timer.

### How to place a station shortcut on the Home screen?
The option to place a shortcut for a station on the Home screen can be accessed from the station's three dots menu. A tap on a shortcut will open Transistor One - playback will start immediately.

### How to rename or delete a station?
The rename and delete options can be accessed both from the station's detail screen. Just tap on the three dots symbol. You can manage the list of stations also from a file browser (see next question).

### Where does Transistor One store its stations?
Transistor One does not save its list of stations in a database. Instead it stores stations as M3U files on your device's external storage. Feel free to tinker with those files using the text editor of your choice. The files are stored in /Android/data/org.y20k.transistorone/files/Collection.

### How do I backup and transfer my radio stations?
Transistor One supports Android 6's [Auto Backup](http://developer.android.com/about/versions/marshmallow/android-6.0.html#backup) feature. Radio stations are always backed up to your Google account and will be restored at reinstall. On devices running on older versions of Android you must manually save and restore the "Collection" folder.

### Why does Transistor One not have any setting?
There is nothing to be set ;). Transistor One is a very simple app. Depending on your point of view "simple" is either great or lame.

Which Permissions does Transistor One need?
---------------------------------------
### Permission "INSTALL_SHORTCUT" and "UNINSTALL_SHORTCUT"
This permission is needed to install and uninstall radio station shortcuts on the Android Home screen.

### Permission "INTERNET"
Transistor One streams radio stations over the internet.

### Permission "READ_EXTERNAL_STORAGE"
Transistor One needs access to images, photos and documents to be able to customize radio station icons and to able to open locally saved playlist files.

### Permission "VIBRATE"
Tapping and holding a radio station will toggle a tiny vibration.

### Permission "WAKE_LOCK"
During Playback Transistor One acquires a so called partial wake lock. That prevents the Android system to stop playback for power saving reasons.

(*) Opus playback is only supported on devices running Android 5.0+

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# CifraChaCha20Poly1305

An Arduino library that contains ChaCha20 and Poly1305 implementations from
Joseph Birr-Pixton's [Cifra](https://github.com/ctz/cifra) project.

After removing files not needed for ChaCha20 and Poly1305, only minimal changes
were required to build Cifra's source code with the Arduino toolchain.

1. handy.h was moved from src/ext so the C file includes didn't have to change
   (there's no easy way to add an include path for src/ext when Arduino builds libraries)
2. The "static" keyword was removed from array size initializers
3. Wrap header files with non-static functions with 'extern "C" {}'

## Project

Find CifraChaCha20Poly1305 at [https://github.com/sterwill/CifraChaCha20Poly1305](https://github.com/sterwill/CifraChaCha20Poly1305)

## Upstream Version

The files in this library are derived from [this commit of Cifra](https://github.com/ctz/cifra/tree/319fdb764cd12e12b8296358cfcd640346c4d0dd).

## License

[CC0](https://creativecommons.org/publicdomain/zero/1.0/).

Please attribute the author.  This is a request only, and not a license term.

## Author

Joseph Birr-Pixton<EMAIL_ADDRESS>
## Arduino Library Maintainer

Shaw Terwilliger<EMAIL_ADDRESS>


text:
---
title: Add Images to markdown file
date : "2020-01-23"
description: "Markdown Cheatsheet"
featuredImage: ../../images/gatsby-icon.png
sectionImage: ../../images/gatsby-astronaut.png
---
## Learning Goal:
Add Images to the markdown post

## Solutions
### 1. Query images from frontmatter
Add new key value pairs that could provide specfic data value and be queried in the GraphQL data layer. This data is called frontmatter and is denoted by the triple dashes at the start and end of the block.
In this case, I add two new data values to this post, one is called featuredImage(Fixed), the other is called sectionImage(Fluid). As not all the blog posts has these two value pairs, I used conditional rendering to check if the data is existed.

```javascript
// Set up key value pair in your markdown file
featuredImage: ../../images/gatsby-icon.png

// Your blog post component
export default ((data) => {
  const featuredImage = data.markdownRemark.frontmatter.featuredImage

  return (
    {
      featuredImage ? <Img fixed={featuredImage.childImageSharp.fixed} /> : ''
    }
  )
})

// Query in your blog template file
query($slug: String!) {
  markdownRemark(fields: { slug: { eq: $slug } }) {
    frontmatter {
      featuredImage {
        childImageSharp {
          fixed(width: 50) {
            ...GatsbyImageSharpFixed
          }
        }
      }
    }
  }
}
```

### 2. Using the Transformer Remark Plugin for Inline images
![The Astronaut](../../images/gatsby-astronaut.png)
You can display your images in the Markdown body itself by add the plugin `gatsby-remark-images`. Make sure to configure your newly installed plugins in the `gatsby-config` file.
```javascript
plugins: [
    `gatsby-plugin-sharp`,
    {
      resolve: `gatsby-transformer-remark`,
      options: {
        plugins: [
          {
            resolve: `gatsby-remark-images`,
            options: {
              maxWidth: 800,
            },
          },
        ],
      },
    },
    {
      resolve: `gatsby-source-filesystem`,
      options: {
        path: `${__dirname}/src/content/blogs`,
      },
    },
  ],
```

Learn more: [gatsby-remark-images](https://www.gatsbyjs.org/packages/gatsby-remark-images)

repository: tesshuang/gatstby-blog

gha_language: JavaScript

gha_license_id: MIT

repo_name: tesshuang/gatstby-blog


text:
# autonomous_vehicle
![selfdriving](img/self_drive.gif)

The goal of the project is to build a platform that will simulate an autonomous vehicle. The platform should provide essential functionality:
- controlling the vehicle
- collecting the data
- autonomous ride

The following image shows the concept of the simulation platform:
![platform_concept](img/platform_concept.png)
- Prius block - a vehicle with access to steering inputs, odometry and images from cameras
- Joy/Keyboard block - Controlling the vehicle, changing vehicle ride mode (manual/autonomous), turning on/off collecting the data
- Visualization block - Visualizing current velocity, drive mode, steering inputs on front camera image
- Dataset block - collecting the images and labels used to train the CNN model.
- Convolutional Neural Network Model - The trained model that returns the predicted steering angle and vehicle based on input image. The vehicle should ride autonomously after turing on corresponding mode
- PID - the predicted vehicle speed needs to be converted to throttle/brake inputs
- We actually added one more PID block, so the predicted steering angle is also used by PID

## Dependencies
- Ubuntu 18.04 or Ubuntu 20.04
- Docker

## Network architectures
During implementation, we've tested 2 different network architectures.
- [PilotNet](https://arxiv.org/pdf/2010.08776.pdf?fbclid=IwAR0gxHvJrJUz59P3dSA-cJEfDyx9VJt9h9UNq9GXf9hb74VNLjDN8VhLfjs)
- [Network by M. V. Smolyakov and his team](https://www.researchgate.net/publication/334080652_Self-Driving_Car_Steering_Angle_Prediction_Based_On_Deep_Neural_Network_An_Example_Of_CarND_Udacity_Simulator)

The second network seemed to work better for us. We adapted it a bit and changed the input shape of the image to 800x264
as well as the output shape as we had to predict steering angle and velocity. Final network architecture looks following:
![network_architecture](img/model.png)

## First run
The commands run in host are marked as **H** and the commands from terminal are marked as **C**

- Clone the repository
- Go to the `docker` directory - `H$ cd docker`
- Build the docker image - `H$ ./build.sh`
- Run the container using `H$ run_cpu.sh` or `H$ run_gpu.sh`
- Go to main workspace `C$ cd /av_ws`
- Initialize and build the workspace (It might take long) `C$ catkin init`, `C$ catkin build`
- Load environment variables `C$ source/av_ws/devel/setup.bash`
- Run demo package `C$ roslaunch car_demo demo.launch`
- [Save the docker container](#saving-docker-container)
- Close the container
- Create workspace on your local machine `H$ mkdir -p ~/av_ws/src`
- Move the `av_03` and `av_msgs` folder to `H$ ~/av_ws/src` directory
- Make sure that `--volume` arguments in `docker/run_gpu.sh` or `docker/run_cpu.sh` points to the correct directories containing `av_03` and `av_msgs`
    * Sometimes you need to change $USER value to your real username
- Run the container `H$ run_cpu.sh` or `H$ run_gpu.sh`
- Go to the main workspace directory and then to `av_03` package and see if the files are there
```
C$ cd /av_ws/src/av_03/
C$ ls
```

## Running the package
- Run the docker container
- Go to the workspace directory
- Download the trained model and put it in `cnn_models` in `av_03` package
- Build catkin package
```
C$ catkin build
```
- Source the environment
```
C$ source devel/setup.bash
```
- Launch the demo
```
C$ roslaunch av_03 av.launch
```

### Selfdriving
To start the selfdriving run:
```
C$ rostopic pub --once /prius/mode av_msgs/Mode "{header:{seq: 0, stamp:{secs: 0, nsecs: 0}, frame_id: ''}, selfdriving: true, collect: false}"
```

### Collecting the data
To collect the data you need to launch controller_node. To do so uncomment line 31 in `av.launch` file.
Then pressing `C` will start collecting data. The steering is being done by the arrow keys

## Saving docker container
```
H$ docker container ps
H$ docker commit container_name av:master
```

branch_name: refs/heads/main


text:
# deepspeech-basics
I am creating this project to learn about [Baidu's DeepSpeech](https://arxiv.org/abs/1412.5567) and its implementation by Mozilla.

The jupyter notebook covers how to setup a Google Colab environment for **DeepSpeech 0.6.1**:

Setup steps:
  * install `git lfs`
  * download the DeepSpeech model as described in the [release notes](https://github.com/mozilla/DeepSpeech/releases/tag/v0.6.1)
  * download the checkpoint file
  * download the sample audio files
  * clone [Mozilla's DeepSpeech git repo](https://github.com/mozilla/DeepSpeech)
  * `pip install deepspeech`
  * `pip install -r requirements.txt`

The notebook continues on with:
  * running a transcription example from [Mozilla's docs](https://deepspeech.readthedocs.io/en/v0.6.1/).
  * running a training example from Mozilla's docs.

And finishes with an attempt to train a new network to recognise a complex word such as the name of an antibiotic.

repository: micheldanjou/deepspeech-basics

repo_name: micheldanjou/deepspeech-basics


text:
# Quickstart for Java Docker Compose debugging

A sample application for using Rookout to debug a Java app built using Maven or Gradle, and deployed using Docker Compose.

Before following this guide we recommend completing the basic [Java + Rookout tutorial](https://github.com/Rookout/tutorial-java).

This sample may be out of date. If you face any issues, please reach out to<EMAIL_ADDRESS>and let us know.

* [Using Docker Compose](#using-docker-compose)
* [Rookout Integration explained](#rookout-integration-explained)

## Using Docker Compose

1. Compile the project jar:
     ```bash
    $ make build-local-maven
    ```
    or
    ```bash
    $ make build-local-gradle
    ```
2. Edit docker-compose.yaml and add your Rookout token:
    ``` YAML
        environment:
          ROOKOUT_TOKEN: YOUR_TOKEN_HERE
    ```
3. Build the image:
    ``` bash
    $ docker-compose build

    ```
4. Run:
    ```bash
    $ docker-compose up
    ```
5. Make sure everything worked: [http://localhost:7000/hello](http://localhost:7000/hello)

6. Go to [http://app.rookout.com](http://app.rookout.com) and start debugging!
## Rookout Integration explained

This example is based of the Java javalin "Hello-World" example available [here].

We have added Rookout to the original project by:
1. Adding soruces to the project jar(`pom.xml`):
    ```xml
            <resources>
                <resource>
                    <directory>${basedir}/src/main/java</directory>
                </resource>
            </resources>
    ```

2. Downloading the Rookout Java Agent available on [maven central]:
    ```bash
        wget "https://search.maven.org/remote_content?g=com.rookout&a=rook&v=LATEST"  -O rook.jar
    ```

3. Configuring our `ROOKOUT_TOKEN` on `docker-compose.yaml`:
    ``` YAML
        environment:
          ROOKOUT_TOKEN: YOUR_TOKEN_HERE
    ```

3. Specifying the Rookout Java Agent when running:
    ```bash
        java  -javaagent:rook.jar -jar target/rookoutDemo-1.0.0.jar
    ```

[Java + Rookout]: https://docs.rookout.com/docs/sdk-setup.html
[here]: https://github.com/tipsy/javalin/
[maven central]: https://mvnrepository.com/artifact/com.rookout/rook

repository: Rookout/deployment-examples

repo_name: Rookout/deployment-examples


text:
Laravel-Jobs An Amazing Project
============

A Laravel 4 package for adding jobs listings to a website

## Features

* Jobs index and detail page functionality with search
* Ability to apply for a job and upload a CV
* Jobs can be draft or approved
* Jobs can be permanent or temporary and part time or full time
* Flexible configurable way of having salaries associated with a job
* They have a published date that you can set in the future for delayed/scheduled publishing
* Job slugs are automatically created from the job title
* Control meta description and keywords of job detail pages for SEO purposes
* Uses soft deletes in case you need to retrieve old content
* Configure the rendered views so you can use one in your app rather than the one in the package
* Make use of partials in your own view so you can add extra stuff around the partial

## Comes with a

* Migration for creating the fbf_jobs table (N.B. The search function makes use of MySQL Full Text search, so the engine is set to MyISAM)
* Model, controller and views (main view and partials)
* Built in configurable routes
* Faker seed to seed your database with loads of good test data

## Installation

Add the following to you composer.json file

    "fbf/laravel-jobs": "dev-master"

Run

    composer update

Add the following to app/config/app.php

    'Fbf\LaravelJobs\LaravelJobsServiceProvider'

Publish the config

    php artisan config:publish fbf/laravel-jobs

Run the migration

    php artisan migrate --package="fbf/laravel-jobs"

Optionally copy the administrator config to your administrators model config directory, if you have one

## Configuration

There are loads of options in the config file, check it out.

## Administrator

You can use the excellent Laravel Administrator package by frozennode to administer your jobs.

http://administrator.frozennode.com/docs/installation

A ready-to-use model config file for the Job model (jobs.php) is provided in the src/config/administrator directory of the package, which you can copy into the app/config/administrator directory (or whatever you set as the model_config_path in the administrator config file).

## Faker seed

The package comes with a seed that can populate the table with a whole bunch of sample jobs. To run it:

    php artisan db:seed --class="Fbf\LaravelJobs\JobsTableFakeSeeder"


text:
# Road Trip Pin

# Project Description
RoadTripPin is a Full Stack Web application. It allows a user to sign up, login, explore their dashboard, start a new roadtrip, and save pins to this trip to have a fully functional google maps integrated list. Just click the links to see the addresses open up in google maps. Return to the app to find your next pin. There are enless roads of possibilities with RoadTripPin.

# Usage Information
Click the login page, sign up for an account. Once signed in, you'll be able to add view and edit trips on your profile.

# Installation Instructions
No additional installation required.

# User Story

```md
As a user I need to be able to view planned trips in my app
As a user I need to be able to add a new trip
As a user I need to be able to add a stop to my trip
As a user I need to be able to categorize my stops (scenic, rest stop, point of interest)
As a user I need to be able to add a photo of what I should be seeing at my stop
As a user I need to be able to add a stop length
As a user I need to be able to add a price for my stop
As a user I need to be able to add a website link for additional information
As a user I need to be able to add a name to my stop
As a user I need to be able to add comments
As a user I need to be able add information about parking at my stop

```

# Acceptance Criteria

```md
Application uses React for the front end.

 Application has a GraphQL API with a Node.js and Express.js server, and uses queries and mutations for retrieving, adding, updating, and deleting data.

 Application uses MongoDB and the Mongoose ODM for the database and protects sensitive API key information on the server.

 Application includes user authentication using JWT.

```

## Screenshots

Logo                       | Home screen
:-------------------------:|:-------------------------:
![screenshot_logo](https://user-images.githubusercontent.com/70031550/128609829-bf46585f-03f7-4a29-b9f8-ece10b8dbcad.JPG)  |  ![screenshot_home](https://user-images.githubusercontent.com/70031550/128609233-194b562c-b124-4060-a73d-2cab9af4bd26.JPG)

Signup screen              |  Login screen
:-------------------------:|:-------------------------:
![screenshot_SignUp](https://user-images.githubusercontent.com/70031550/128609297-8dc3b102-e0a1-4285-8426-383550f5f216.JPG)  |  ![screenshot_login](https://user-images.githubusercontent.com/70031550/128609455-5808d0be-d5a5-465b-a2a9-1ec385a335c3.JPG)

Dashboard screen           | View screen
:-------------------------:|:-------------------------:
![screenshot_dashboard](https://user-images.githubusercontent.com/70031550/128609252-f14aea9c-eaf5-4b15-8773-a5a96d799cc3.JPG)  |  ![screenshot_view](https://user-images.githubusercontent.com/70031550/128609311-c124570d-f184-4363-9d80-1a4da103840f.JPG)

Start a new trip screen    | Add a Pin screen
:-------------------------:|:-------------------------:
![screenshot_startNewTrip](https://user-images.githubusercontent.com/70031550/128609305-d9f173b8-e334-4450-9d36-b56f96851fab.JPG)  |  ![screenshot_addPin](https://user-images.githubusercontent.com/70031550/128609236-c64d150f-8cc0-4690-925f-7bb0fee9485a.JPG)

Calendar screen    | Current Weather Conditions screen
:-------------------------:|:-------------------------:
![screenshot_calendar](https://user-images.githubusercontent.com/70031550/128609242-300bd0c1-652b-437e-87f9-6863aca36cbf.JPG)  |  ![screenshot_current weather](https://user-images.githubusercontent.com/70031550/128609696-03b51c02-a881-4dbc-b723-4f1ef24dd115.JPG)

# Authors

**We hope you found something interesting!** :scroll:

If you have any questions, please do not hesitate to reach out to any of the group members below at:
`
<EMAIL_ADDRESS>|| LinkedIn @ Alicia Krolak || GitHub @ AliciaJK
<EMAIL_ADDRESS>|| LinkedIn @ Nathan Wichmann || GitHub @ nathanwichmann
<EMAIL_ADDRESS>|| LinkedIn @ Jodi Ladouceur || GitHub @ JoJo-designs
<EMAIL_ADDRESS>|| LinkedIn @ Mark Laham || GitHub @ MarkLaham
<EMAIL_ADDRESS>|| LinkedIn @ Tatyana Yarushin || GitHub @ TatyanaYarush
`

## Additional Links:
Mock up:
https://drive.google.com/file/d/1GzPn5NQ-d1GBu36lOQkJr3v1Yw0lPCxE/view?usp=sharing

Presentation:
https://docs.google.com/presentation/d/1xQ4zkJ9YvEgHgh49qzppAaqED5mb2SRbTR6vEu1fhVk/edit?usp=sharing

Working google doc:
https://docs.google.com/document/d/1_ZS74Rq27_SiwUChJLzdaRNbvEbIBdkW8zaaUkRGeDc/edit?usp=sharing

Heroku: https://serene-castle-18240.herokuapp.com/

repository: TatyanaYarush/RoadTripApp

repo_name: TatyanaYarush/RoadTripApp


text:
## DEPRECATED

Please refer to:
* [data model on our developer micro-site] (http://developer.tidepool.io/data-model/v1/)
* [data model in developer micro-site repo]  (https://github.com/tidepool-org/tidepool-org.github.io/tree/master/_docs/data-model)

repository: tidepool-org/deprecated-data-model

gha_language: Python

gha_license_id: NOASSERTION

repo_name: tidepool-org/deprecated-data-model


text:
https://github.com/xhorna16/Digital-electronics-1/blob/main/Labs/07-ffs/README.md
```
D:  q(n+1)=d;
JK: q(n+1)=j*/qn + /k* qn;
T:  q(n+1)=t*/qn + /t* qn;
```
   | **clk** | **d** | **q(n)** | **q(n+1)** | **Comments** |
   | :-: | :-: | :-: | :-: | :-- |
   |  | 0 | 0 | 0 |  |
   |  | 0 | 1 | 0 |  |
   |  | 1 | 0 | 1 |  |
   |  | 1 | 1 | 1 |  |

   | **clk** | **j** | **k** | **q(n)** | **q(n+1)** | **Comments** |
   | :-: | :-: | :-: | :-: | :-: | :-- |
   |  | 0 | 0 | 0 | 0 | No change |
   |  | 0 | 0 | 1 | 1 | No change |
   |  | 0 | 1 | 0 | 0 |  |
   |  | 0 | 1 | 1 | 0 |  |
   |  | 1 | 0 | 0 | 1 |  |
   |  | 1 | 0 | 1 | 1 |  |
   |  | 1 | 1 | 0 | 1 |  |
   |  | 1 | 1 | 1 | 0 |  |

   | **clk** | **t** | **q(n)** | **q(n+1)** | **Comments** |
   | :-: | :-: | :-: | :-: | :-- |
   |  | 0 | 0 | 0 |  |
   |  | 0 | 1 | 1 |  |
   |  | 1 | 0 | 1 |  |
   |  | 1 | 1 | 0 |  |

## D latch
```vhdl
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;

-- Uncomment the following library declaration if instantiating
-- any Xilinx leaf cells in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity d_latch is
    Port ( en : in STD_LOGIC;
           d : in STD_LOGIC;
           arst : in STD_LOGIC;
           q : out STD_LOGIC;
           q_bar : out STD_LOGIC);
end d_latch;

architecture Behavioral of d_latch is

begin
    p_d_latch : process(en, d, arst)
    begin
        if (arst='1') then
            q <= '0';
            q_bar <= '1';
        elsif (en='1') then
            q <= d;
            q_bar <= not d;
        end if;
    end process p_d_latch;
end Behavioral;
```
### testbench
```vhdl
p_stimulus : process
        begin
            -- Report a note at the beginning of stimulus process
            report "Stimulus process started" severity note;
            s_en    <= '0';
            s_d     <= '0';
            s_arst  <= '0';
            wait for 26 ns;
            s_d     <= '1';
            wait for 14 ns;
            s_d     <= '0';
            wait for 24 ns;
            s_d     <= '1';
            wait for 22 ns;
            s_d     <= '0';
            wait for 14 ns;

            s_en    <= '1';
            wait for 14 ns;
            s_d     <= '1';
            wait for 14 ns;
            s_d     <= '0';
            wait for 24 ns;
            s_d     <= '1';
            wait for 22 ns;
            s_d     <= '0';
            wait for 36 ns;
            s_en   <= '0';
            wait for 56 ns;

            s_d     <= '1';
            wait for 14 ns;
            s_d     <= '0';
            wait for 24 ns;
            s_d     <= '1';
            wait for 22 ns;
            s_d     <= '0';
            wait for 14 ns;

            s_en    <= '1';
            wait for 14 ns;
            s_d     <= '1';
            wait for 14 ns;
            s_arst <= '1'; -- RESET
            wait for 24 ns;
            s_d     <= '0';
            wait for 36 ns;
            s_d     <= '1';
            wait for 22 ns;
            s_d     <= '0';
            wait for 36 ns;
            s_arst <= '0';
            wait for 56 ns;

            s_d     <= '1';
            wait for 14 ns;
            s_d     <= '0';
            wait for 24 ns;
            s_d     <= '1';
            wait for 22 ns;
            s_d     <= '0';
            wait for 14 ns;
            report "Stimulus process finished" severity note;
            wait;
        end process p_stimulus;
```
### simulation results
![sim1](sim1.png)

## d_ff_arst
```vhdl
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

entity d_ff_arst is
    Port ( clk : in STD_LOGIC;
           d : in STD_LOGIC;
           arst : in STD_LOGIC;
           q : out STD_LOGIC;
           q_bar : out STD_LOGIC);
end d_ff_arst;

architecture Behavioral of d_ff_arst is
begin
    p_d_ff_arst : process (clk, arst)
    begin
        if arst = '1' then
            q <= '0';
            q_bar <= '1';
        elsif rising_edge (clk) then
            q <= d;
            q_bar <= not d;
        end if;
    end process p_d_ff_arst;
end Behavioral;
```
### testbench
```vhdl
p_reset_gen : process
        begin
            s_arst <= '0';
            wait for 20 ns;

            s_arst <= '1';
            wait for 155 ns;

            s_arst <= '0';
            wait;
        end process p_reset_gen;

        p_stimulus : process
        begin
            -- Report a note at the beginning of stimulus process
            report "Stimulus process started" severity note;

            s_d     <= '0';
            s_arst  <= '0';
            wait for 26 ns;
            s_d     <= '1';
            wait for 14 ns;
            s_d     <= '0';
            wait for 24 ns;
            s_d     <= '1';
            wait for 22 ns;
            s_d     <= '0';
            wait for 14 ns;

            s_d     <= '1';
            wait for 14 ns;
            s_d     <= '0';
            wait for 24 ns;
            s_d     <= '1';
            wait for 22 ns;
            s_d     <= '0';
            wait for 36 ns;

            s_d     <= '1';
            wait for 14 ns;
            s_d     <= '0';
            wait for 24 ns;
            s_d     <= '1';
            wait for 22 ns;
            s_d     <= '0';
            wait for 14 ns;

            s_d     <= '1';
            wait for 14 ns;
            s_arst <= '1'; -- RESET
            wait for 24 ns;
            s_d     <= '0';
            wait for 36 ns;
            s_d     <= '1';
            wait for 22 ns;
            s_d     <= '0';
            wait for 36 ns;
            s_arst <= '0';
            wait for 56 ns;

            s_d     <= '1';
            wait for 14 ns;
            s_d     <= '0';
            wait for 24 ns;
            s_d     <= '1';
            wait for 22 ns;
            s_d     <= '0';
            wait for 14 ns;
            report "Stimulus process finished" severity note;
            wait;
        end process p_stimulus;
```
### simulation results
![ffd](ffd.png)
## d_ff_jk_rst
```vhdl
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;
entity jk_ff_rst is
    Port ( clk : in STD_LOGIC;
           j : in STD_LOGIC;
           k : in STD_LOGIC;
           rst : in STD_LOGIC;
           q : out STD_LOGIC;
           q_bar : out STD_LOGIC);
end jk_ff_rst;

architecture Behavioral of jk_ff_rst is
    signal s_q : STD_LOGIC;
    signal s_q_bar : STD_LOGIC;
begin
    p_jk_ff_rst : process (clk) --reset will be done only if clk is changed
    begin
        if rising_edge (clk) then
            if (rst = '1') then --the highest priority signal
                s_q     <= '0';
                s_q_bar <= '1';
            else
                if (j = '0' and k = '0') then
                    s_q     <= s_q;
                    s_q_bar <= s_q_bar;
                elsif (j = '0' and k = '1') then
                    s_q     <= '0';
                    s_q_bar <= '1';
                elsif (j = '1' and k = '0') then
                    s_q     <= '0';
                    s_q_bar <= '1';
                else
                    s_q     <= not s_q;
                    s_q_bar <= not s_q_bar;
                end if;
            end if;
        end if;
    end process p_jk_ff_rst;
    q     <= s_q;
    q_bar <= s_q_bar;
end Behavioral;
```
### testbench
```vhdl
        p_reset_gen : process
        begin
            s_rst <= '0';
            wait for 20 ns;

            s_rst <= '1';
            wait for 155 ns;

            s_rst <= '0';
            wait;
        end process p_reset_gen;
        p_stimulus : process
        begin
            -- Report a note at the beginning of stimulus process
            report "Stimulus process started" severity note;

            s_j  <= '0'; --1
            s_k  <= '0';
            wait for 26 ns;
            s_j  <= '1';
            s_k  <= '0';
            wait for 14 ns;
            s_j  <= '0';
            s_k  <= '0';
            wait for 24 ns;
            s_j  <= '0';
            s_k  <= '1';
            wait for 22 ns;
            s_j  <= '1';
            s_k  <= '1';
            wait for 14 ns;
            s_j  <= '0'; --1
            s_k  <= '0';
            wait for 26 ns;

            s_j  <= '0'; --2
            s_k  <= '0';
            wait for 26 ns;
            s_j  <= '1';
            s_k  <= '0';
            wait for 14 ns;
            s_j  <= '0';
            s_k  <= '0';
            wait for 24 ns;
            s_j  <= '0';
            s_k  <= '1';
            wait for 22 ns;
            s_j  <= '1';
            s_k  <= '1';
            wait for 14 ns;
            s_j  <= '0';
            s_k  <= '0';
            wait for 26 ns;

            s_j  <= '0'; --3
            s_k  <= '0';
            wait for 26 ns;
            s_j  <= '1';
            s_k  <= '0';
            wait for 14 ns;
            s_j  <= '0';
            s_k  <= '0';
            wait for 24 ns;
            s_j  <= '0';
            s_k  <= '1';
            wait for 22 ns;
            s_j  <= '1';
            s_k  <= '1';
            wait for 14 ns;
            s_j  <= '0';
            s_k  <= '0';
            wait for 26 ns;

            s_j  <= '0'; --4
            s_k  <= '0';
            wait for 26 ns;
            s_j  <= '1';
            s_k  <= '0';
            wait for 14 ns;
            s_j  <= '0';
            s_k  <= '0';
            wait for 24 ns;
            s_j  <= '0';
            s_k  <= '1';
            wait for 22 ns;
            s_j  <= '1';
            s_k  <= '1';
            wait for 14 ns;
            s_j  <= '0';
            s_k  <= '0';
            wait for 26 ns;
;
            report "Stimulus process finished" severity note;
            wait;
        end process p_stimulus;
end Behavioral;
```
### simulation results
![ffjk](ffjk.png)
## t_ff_rst
```vhdl
library IEEE;
use IEEE.STD_LOGIC_1164.ALL;

-- Uncomment the following library declaration if using
-- arithmetic functions with Signed or Unsigned values
--use IEEE.NUMERIC_STD.ALL;

-- Uncomment the following library declaration if instantiating
-- any Xilinx leaf cells in this code.
--library UNISIM;
--use UNISIM.VComponents.all;

entity t_ff_rst is
    Port ( t     : in  STD_LOGIC;
           clk   : in  STD_LOGIC;
           rst   : in  STD_LOGIC;
           q     : out STD_LOGIC;
           q_bar : out STD_LOGIC);
end t_ff_rst;

architecture Behavioral of t_ff_rst is
    signal s_q : STD_LOGIC;
    signal s_q_bar : STD_LOGIC;
begin
    t_ff_rst : process (clk)
    begin
        if rising_edge (clk) then
            if (rst = '1') then
                s_q     <= '0';
                s_q_bar <= '1';
            else
                if (t = '0') then
                    s_q     <= s_q;
                    s_q_bar <= s_q_bar;
                else
                    s_q     <= not s_q;
                    s_q_bar <= not s_q_bar;
                end if;
            end if;
        end if;
    end process t_ff_rst;
    q     <= s_q;
    q_bar <= s_q_bar;

end Behavioral;
```
### testbench
```vhdl
p_reset_gen : process
        begin
            s_rst <= '0';
            wait for 10 ns;

            s_rst <= '1';
            wait for 10 ns;

            s_rst <= '0';
            wait;
        end process p_reset_gen;
        p_stimulus : process
        begin
            -- Report a note at the beginning of stimulus process
            report "Stimulus process started" severity note;
            s_t  <= '1';
            wait for 26 ns;
            s_t  <= '0';
            wait for 14 ns;
            s_t  <= '1';
            wait for 24 ns;
            s_t  <= '0';
            wait for 22 ns;
            s_t  <= '1';
            wait for 14 ns;
            s_t  <= '0';
            wait for 26 ns;
            s_t  <= '1';
            wait;
            report "Stimulus process finished" severity note;
            wait;
        end process p_stimulus;
```
### simulation
![fft](fft.png)
## Shift register
![reg](reg.jpg)


text:
---
title: "Configure IAM Policy for Worker Nodes"
date: 2018-08-07T08:30:11-07:00
weight: 10
---

We will be deploying Fluentd as a DaemonSet, or one pod per worker node. The fluentd log daemon will collect logs and forward to CloudWatch Logs. This will require the nodes to have permissions to send logs and create log groups and log streams. This can be accomplished with an IAM user, IAM role, or by using a tool like `Kube2IAM`.

In our example, we will create an IAM policy and attach it the the Worker node role.

First, we will need to ensure the Role Name our workers use is set in our environment:

```
test -n "$ROLE_NAME" && echo ROLE_NAME is "$ROLE_NAME" || echo ROLE_NAME is not set
```

If you receive an error or empty response, expand the steps below to export.

{{%expand "Expand here if you need to export the Role Name" %}}
If `ROLE_NAME` is not set, please review: [/030_eksctl/test/](/030_eksctl/test/)
{{% /expand %}}

```
mkdir ~/environment/iam_policy
cat <<EoF > ~/environment/iam_policy/k8s-logs-policy.json
{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Action": [
                "logs:DescribeLogGroups",
                "logs:DescribeLogStreams",
                "logs:CreateLogGroup",
                "logs:CreateLogStream",
                "logs:PutLogEvents"
            ],
            "Resource": "*",
            "Effect": "Allow"
        }
    ]
}
EoF

aws iam put-role-policy --role-name $ROLE_NAME --policy-name Logs-Policy-For-Worker --policy-document file://~/environment/iam_policy/k8s-logs-policy.json
```

Validate that the policy is attached to the role
```
aws iam get-role-policy --role-name $ROLE_NAME --policy-name Logs-Policy-For-Worker
```

repository: zengelan/eks-workshop

gha_language: CSS

repo_name: zengelan/eks-workshop


text:
Twiddler Bot
=============
Twiddler Bot is an IRC bot. The main purpose of Twiddler is to gather statistics
from the channels that it's in. It saves these statistics and make the available
for the user of Twiddler Bot.

Twiddler Bot both supports using the command line on the hosting machine to
give Twiddler commands or to message it in IRC using a whitelist to determine
permissions.

repository: Criticalstone/twitch-word-bot

repo_name: Criticalstone/twitch-word-bot


text:
# Password_locker

A system to help you generate and change your account password and other possible details

# Author

RONALD OTIENO

## Description
Password Locker is a terminal run python application that allows users to store details i.e. usernames and passwords of their various accounts.

## SetUp / Installation Requirements
python3.6
Cloning
    $ git clone https://github.com/ronnieoginga/Password-locker.git
    $ cd Password-locker
## Running the Application

For you to run the application:you need to use the comands below in your terminal

    $ chmod +x run.py
    $ ./run.py
## Testing the Application

To run the tests for the class file:

    $ python3.6 user_credential_testpy

# Technologies Used

Python3.6

# License

MIT ©2018 RONALDOTIENO

repository: ronnieoginga/Password-locker

repo_name: ronnieoginga/Password-locker


text:
# knife.convoke

Flatten async code with coroutines.

## Overview

Heavy use of callbacks can lead to deeply nested, hard to maintain code:

```lua
print 'fading in'
Timer.after(1, function ()
    print 'showing splash screen'
    Timer.after(1, function ()
        print 'showing title screen'
        Timer.after(1, function ()
            print 'playing demo'
        end)
    end)
end)
```

Convoke can be used to remedy that. The example above can be written like this:

```lua
Convoke(function (continue, wait)
    print 'fading in'
    Timer.after(1, continue())
    wait()
    print 'showing splash screen'
    Timer.after(1, continue())
    wait()
    print 'showing title screen'
    Timer.after(1, continue())
    wait()
    print 'playing demo'
end)()
```

## API

The `Convoke` function takes a **callback** function as its sole argument, and
returns a **future** function.

The first argument passed to the callback is a **continue** function. Invoke
this function to obtain a continuation function. Generally, this function
should be passed into an asynchronous function as the callback, as in the
example above.

The second argument passed to the callback is a **wait** function. Call this
function to resume execution. Any arguments passed into the continuation
function returned from `continue()` (the callback arguments) are returned
from `wait`.

The **future** function returned from a call to `Convoke` has nearly the same
API as `Convoke` itself, with two additional behaviors:

- Calling the future function with no arguments executes the routine.

- Calling the future function with a callback once the routine has been
  executed will cause it to run as soon as the previous section has run,
  or immediately if the previous section has finished running.

repository: lennyferguson/SecretCentury

repo_name: lennyferguson/SecretCentury


text:
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [2.0.1](https://github.com/dmnsgn/glsl-tone-map/compare/v2.0.0...v2.0.1) (2022-06-14)

# 2.0.0 (2022-06-08)

### Code Refactoring

* use ES modules ([a1bffd1](https://github.com/dmnsgn/glsl-tone-map/commit/a1bffd1ad9933633a7908a5c21b880b453403ad3))

### BREAKING CHANGES

* switch to type module

repository: dmnsgn/glsl-tone-map

gha_language: GLSL

repo_name: dmnsgn/glsl-tone-map


text:
---
layout: post
title: "Disrupt Nothing: The Importance of Getting Into Workflows"
alias:  [/future-stack-2013, /fs13]
---

{% slide 001-001 %}

> Habits are hard to change and in all likelihood users aren‘t going to change their's to fit a new app into it. This talk will explore the importance of developing software that fits into users lives and several methods to do so. See how to change users lives, by not changing anything they do.

- [Slides]({% resource_dir %}disrupt-nothing-the-Importance-of-getting-into-workflows.pdf)
- [Video](http://www.youtube.com/watch?v=b5P3EEOV_oc#t=68)

This talk was originally given at [Future Stack 2013](http://futurestack.io) in San Francisco.

repository: nquinlan/talks

repo_name: nquinlan/talks


text:
# ANUVAAD AUDITOR

A python package that has been implemented to abstract out and standardize the process of logging and error handling for the anuvaad dataflow pipeline. This also serves as a service that enables features like Session tracing, Job tracing, Error debugging and troubleshoot features for the pipeline. The library has two parts to it:
1. Logging/Auditing.
2. Error Handling.

## Prerequisites
- python 3.7
- ubuntu 16.04

INSTALLATION:
```bash
pip install anuvaad-auditor==0.1.6
```
Versions Available:
```bash
anuvaad-auditor==0.1.6
anuvaad-auditor==0.1.4
anuvaad-auditor==0.1.2
anuvaad-auditor==0.1.1
```

## Logging/Auditing.
```bash
log_info(<str(message)>, <json(input object)>):
```
This function has to be used at places where the service wants to log INFO level information. The message to be logged and the input received from WFM either through Kafka or REST has to be passed as parameters as shown.

```bash
log_debug(<str(message)>, <json(input object)>):
```
This function has to be used at places where the service wants to log DEBUGlevel information. The message to be logged and the input received from WFM either through Kafka or REST has to be passed as parameters as shown.

```bash
log_error(<str(error_message)>, <json(input object)>, <exception_object>):
```
This function has to be used at places where the service wants to log ERROR level information. The message to be logged and the input received from WFM either through Kafka or REST has to be passed as parameters as shown. In case this method is called within an exception context in order to register a logical error, the exception object has to be passed.

```bash
log_exception(<str(exception_message)>, <json(input object)>, <exception_object>):
```
This function has to be used at places where the service wants to log EXCEPTIONlevel information. The message to be logged and the input received from WFM either through Kafka or REST has to be passed as parameters as shown. This should always be called within an exception context and the exception object has to be passed.
The difference between log_error and log_exception is that log_error should be used for logical errors like “File is not valid”, “File format not accepted” etc. Whereas, log_exception should be used in case of exceptions like “TypeError”, “KeyError” etc.

## Error Handling.
```bash
post_error(<str(error_code)>, <str(error_msg)>, <exception_object>):
```
This method returns a standard error object that can be used to reply back to the client during a SYNC call. The error at the same time is also indexed to an error index. This function should ideally be used when:
a. During a SYNC call, which means when the request comes directly from UI.

```bash
post_error_wf(<str(error_code)>, <str(error_msg)>, <json(input-obj)>, <exception_object>):
```
This method constructs a standard error object which will be indexed to a different error index and at the same time PUSHES THE ERROR TO WFM internally. This means, at any point due to a logical error or an exception if the module needs to inform WFM of the error, the module should use this function.
So, for any flow that is triggered via kafka or REST through WFM, please use this function only. WFM is dependent on this function to understand if the job has failed somewhere downstream and acts accordingly.
The modules will construct and push the objects only in case of successful job completion, in any case of failure just use this method and avoid pushing custom error objects to the output topic.

## License
[MIT](https://choosealicense.com/licenses/mit/)

repository: project-anuvaad/anuvaad-em

repo_name: project-anuvaad/anuvaad-em


text:
# purescript-pathy

[![Latest release](http://img.shields.io/github/release/slamdata/purescript-pathy.svg)](https://github.com/slamdata/purescript-pathy/releases)
[![Build status](https://travis-ci.org/slamdata/purescript-pathy.svg?branch=master)](https://travis-ci.org/slamdata/purescript-pathy)
[![Dependency status](https://img.shields.io/librariesio/github/slamdata/purescript-pathy.svg)](https://libraries.io/github/slamdata/purescript-pathy)

A type-safe abstraction for platform-independent file system paths.

# Example

```purescript
fullPath = rootDir </> dir "baz" </> file "foo.png"
```

See the [tests file](/test/Main.purs) for various example usages more.

# Getting Started

## Installation

```bash
bower install purescript-pathy
```

```purescript
import Data.Path.Pathy
```

## Introduction

Applications often have to refer to file system paths in a platform-independent way.

Many path libraries provide a single abstraction to deal with file system paths. This allows easy composition of different kinds of paths, but comes at the expense of the following distinctions:

 * The distinction between relative and absolute paths.
 * The distinction between paths denoting file resources and paths denoting directories.
 * The distinction between paths that are secure (sandboxed to some location in the file system) and those that are insecure.

*Pathy* also uses a single abstraction for file system paths, called `Path`, but uses *phantom types* to keep track of the above distinctions.

This approach lets you write code that performs type-safe composition of relative, absolute, file, and directory paths, and makes sure you never use paths in an unsafe fashion. Bogus and insecure operations simply aren't allowed by the type system!

Many paths come from user-input or configuration data. Pathy can parse such string paths and allow you to safely resolve them to expected types.

### Paths Literals

Building path liberals is easy. You will typically build path literals from the following components:

 * `rootDir`    — The root directory of an absolute path.
 * `currentDir` — The current directory (AKA the "working directory"), useful for building relative paths.
 * `file`       — A file (in the current directory).
 * `dir`        — A directory (in the current directory).
 * `(</>)`      — Adds a relative path to the end of a (relative or absolute) path.
 * `(<.>)`      — Sets the extension of a file path.
 * `(<..>)`     — Ascends one level in a directory, then descends into the specified relative path.

For example:

```purescript
let
  path1 = rootDir    </> dir "foo" </> dir "bar" </> file "baz.boo"
  path2 = currentDir </> dir "foo"
in do
  trace $ show $ printPath path1
  trace $ show $ printPath path2
```

Pathy doesn't let you create combinators that don't make sense, such as:

```purescript
rootDir    </> rootDir
currentDir </> rootDir
file "foo" </> file "bar"
file "foo" </> dir "bar"
```

All these combinations will be disallowed at compile time!

### The Path Type

The `Path a b s` type has three type parameters:

 * `a` — This may be `Abs` or `Rel`, indicating whether the path is absolute or relative.
 * `b` — This may be `Dir` or `File`, indicating whether the path is a file or directory.
 * `s` — This may be `Sandboxed` or `Unsandboxed`, indicating whether the path has been sandboxed yet or not.

You should try to make the `Path` functions that you write as generic as possible. If you have a function that only cares if a path refers to a file, then you can write it like this:

```purescript
myFunction :: forall a s.

### Parse Paths from Strings

To parse a string into a `Path`, you can use the `parsePath` function, which expects you to handle four cases:

 * `Path Rel File Unsandboxed`
 * `Path Abs File Unsandboxed`
 * `Path Rel Dir Unsandboxed`
 * `Path Abs Dir Unsandboxed`

If you need a specific case, you can use helper functions such as `parseRelFile`, which return a `Maybe`.

### Print Paths to Strings

You can print any path as a `String` by calling the `printPath` function.

For security reasons, you can only perform this operation if you have *sandboxed* the path. Sandboxing a path ensures that users cannot escape a sandbox directory that you specify; it's the right thing to do!

### Sandboxing

Pathy makes it easy to create relative paths, even paths that ascend into parent directories of relative paths.

With this power comes danger: if you parse a user string, the user may be able to escape any arbitrary directory.

Pathy solves this security problem by *disallowing* conversion from a `Path` to a `String` until the `Path` has been *sandboxed*.

To sandbox a path, you just call `sandbox` and provide the sandbox directory, as well as the path to sandbox:

```purescript
sandbox (rootDir </> dir "foo") (rootDir </> dir "foo" </> dir "bar")
```

This returns a `Maybe`, which is either equal to `Nothing` if the tainted path escapes the sandbox, or `Just p`, where `p` is the tainted path, relative to the sandbox path.

After you have sandboxed a foreign path, you may call `printPath` on it. There's no need to remember this rule because it's enforced at compile-time by phantom types!

All the path literals you build by hand are automatically sandboxed, unless you call `parentDir'` on them.

### Renaming, Transforming, Etc.

There are many other functions available to you for renaming files, renaming directories, getting parent directories, etc.

These are all documented [on Pursuit](http://pursuit.purescript.org/packages/purescript-pathy), and you can find [test usages](/test/Main.purs) for most of them.

# API Docs

Documentation for all functions and types is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-pathy).

repository: athanclark/purescript-pathy

repo_name: athanclark/purescript-pathy


text:
# [BuyRegion](https://www.spigotmc.org/resources/buyregion-updated-for-1-13.60189/)

This is an updated version of [BuyRegion](https://www.spigotmc.org/resources/buyregion.507/) for Minecraft 1.13.

Full credit goes to [Luke199](https://www.spigotmc.org/resources/authors/luke199.2113/).

If anyone has a problem with me publishing this resource, please let me know.

# Building This Project

First fork or clone the project and setup a local instance in your development environment. For example, within Eclipse, choose the option `File -> Import... -> Gradle / Existing Gradle Project ->` then follow the prompts to select the directory and then import it.

At the root of the project's directory, create a new directory name `libs`.  Then download a copy of RedProtect and place it within that libs directory.  Make sure the name of that jar matches what's in the file `build.gradle`.  For example:

```
    implementation files('libs/RedProtect-7.6.2-b247-Universal.jar')
```

Then run the gradle build either through your IDE, or manually from a command prompt using `./gradlew build`.  Note the `./` prefix may, or may not be required.

You can then find the build artifact under the path `build/libs/` and generated jar's name will include the property `pluginVersion`.  For example if `pluginVersion=2.2.4-alpha.1` it will generate the build artifact of `build/libs/BuyRegion-2.2.4-alpha.1.jar`.

repository: rbluer/BuyRegion

repo_name: rbluer/BuyRegion


text:
---
title: Development - Analytics
subtitle: analyzing...
category:
  - About Heimdall
author: 'David Waidner, Timo Sickinger'
date: 2020-04-02T17:50:45.507Z
featureImage: /uploads/analysis.jpg
---
This week we set up the hooks to analyze the data of our game. The goal is to improve the gameplay and feeling of our game with the data we are going to collect from our users (No worries: we are not tracking personal data).

To track all the data we need, we are using the built-in Unity-Analytics service. This allows us to view the collected data inside of an online dashboard and visiualize it with graphs.

## The Hooks - Gameplay

* The achieved Score
* The highest Score
* The amount and the kind of DefenceObjects that were placed
* Won the Game?
* Skipped the Intro? If yes: at which point?

## The Hooks - Performance

Of course a huge part of our game is the new ECS System which is made to be extremely performant. So we also want to track the average performance of the game and, in relation to the performance, the amount of time the game lasted. This will help us the improve the performance and therefore get more people to be able play the game.

* average FPS
* length of the game

## New Content

As always, we also added some new content to the game. We now have a main menu which can be used to start the game:

![](/uploads/menu_first.jpg)

At the begin of the game we now also show a short cutscene that introduces the player to the game. The UI has also been improved, with a health bar on the top right showing the current HP of the player's base, and a big animated counter on the top that shows the current minion kill score. Next to that you also see the last highscore.

![](/uploads/score_display.jpg)

We also added  a new unit the player can use to defend his base against the minion hordes: the archer. He can be placed like any other defense building, but he can also be built on some of the existing walls (or newly placed ones).

Archers will shoot arrows towards the minion armies, and are very useful for picking off targets that have made it past your bigger but slower aiming turrets. The archers are very accurate at a close distance, but have a hard time at hitting targets further away.

To allow the players to use large amounts of archers (to achieve huge movielike arrow storms) we implemented the arrows of the archers using the ecs system. Each arrow is it's own entity, and the flight path for the entity will be calculated when launching it, and is based on elliptical curves. Once the arrows reach a certain height (towards the end of their flight) we use batched raycasts to detect collisions with enemy minions, and apply damage to the first minion the ray finds. If no minion is found, the arrow will just get stuck in the ground, where it will stay for a few seconds after being removed from the game.

![](/uploads/archers_on_wall.jpg)

You can also download the current version of the game [using this link](https://developer.cloud.unity3d.com/share/share.html?shareId=W19pwQr3iB). Please give it a try and leave us some feedback in the comments.

## Question-Time

This week we want to know from you:

* Do you have ideas on what to track in the future?
* Should we share the collected data in a future post?

gha_language: Vue


text:
date: 2012-10-19
slug: moving-from-jekyll-to-pelican
title: Moving from Jekyll to Pelican
lang: en

I just finished migrating this blog from Jekyll to [Pelican](http://blog.getpelican.com/).
I've stumbled upon (no pun intended) Pelican a couple of months ago on `/r/python`.
I thought it was cool but that was it.
But recently, I've decided I'd be translating some Litil posts from French to English in the next weeks.
I've checked, and there wasn't any straitforward way to handle translation in Jekyll.
I could create the translations as new posts, but that would just be messy.
That's when I remembered Pelican, and the fact that it handled translations out of the box.
The fact that Pelican is written in Python didn't hurt, as I'm much more comfortable with Python than with Ruby.

Since I was stranded at home for a couple of days after getting injured in a football game, I've decided to give Pelican a try.
Here's how I've proceeded:

## Content

I started with the content.
Luckily *(or rather unfortunately ?)*, I only had 3 posts in this new blog.
I'm using markdown as my posts format. I had to modify the metadata from the Jekyll format to Pelican's.
All I had to do was to delete the lines (`-`) surrounding the metadata and change a couple of key names.
So it went from:

```
---
date: '2012-06-27 21:45:00'
layout: post
slug: creation-langage-programmation-litil-2-lexer
published: true
title: Le conte de Litil - Chapitre 2, Le dépeceur du texte, aka Lexer
---
```

To:

```
date: 2012-06-27
slug: creation-langage-programmation-litil-2-lexer
title: Le conte de Litil - Chapitre 2, Le dépeceur du texte, aka Lexer
```

I also had to change the code highlighting parts. Whereas in Jekyll it was done using a Liquid block:

```
{% highlight java}
public static final int answer = 42;
{% endhighlight %}
```

In Pelican you use fenced code blocks à-la Github instead:

    :::
    ```java
    public static final int answer = 42;
    ```

I was left with one last problem regarding the content:
with Jekyll, I have developed a Liquid extension that generates an image from a graph defintion (in the dot language) and inserted it into the content (I used it in [this post](http://jawher.me/2012/06/27/creation-langage-programmation-litil-2-lexer/) for example).
Here's how the source looked like:

```
{% graphviz litil-lexer-dfa0.png %}
digraph G {
  rankdir=LR
  S0 -> A [label="-"]
  A -> B [label="-"]
  A -> C [label=">"]

  A [peripheries=2]
  B [peripheries=2]
  C [peripheries=2]
}
{% endgraphviz %}
```

So I had to come up with something similar in Pelican.
Even worse, I couldn't use something off the shelf as it had to work tightly with the site generator (e.g. place the generated images in a specific directory).
A quick googling didn't turn anything useful, so I came up with [my own version](https://github.com/jawher/markdown-dot).
I've done it differently that with Jekyll though.
This new version is a markdown extension rather than a custom tag (of the templating system), as in Pelican, and unless I'm mistaken, posts do not get processed by the templating engine.
Here's how it looks like now *(ugly syntax, I know)*:

    :::
    {% dot litil-lexer-dfa0.png
    digraph G {
      rankdir=LR
      S0 -> A [label="-"]
      A -> B [label="-"]
      A -> C [label=">"]

      A [peripheries=2]
      B [peripheries=2]
      C [peripheries=2]
    }
    %}

## Settings

I've then started tweaking the settings.
The existing urls had to continue working.
It's as simple as that.
Luckily, that wasn't hard at all using these 2 lines:

```python
ARTICLE_URL = '{date:%Y}/{date:%m}/{date:%d}/{slug}/'
ARTICLE_SAVE_AS = '{date:%Y}/{date:%m}/{date:%d}/{slug}/index.html'
```

I also had to tweak the feed generation part:

```python
FEED_ATOM = ('atom.xml')
CATEGORY_FEED_ATOM = None
FEED_DOMAIN = SITEURL
TRANSLATION_FEED = None
```

I couldn't keep the same urls for everything though, e.g. the css files and images.
Pelican has some hard-coded paths for this kind of assets.
Hopefully it'll get more flexible in the future.

## Theming

The theming part was the trickiest.
Theming is handled differently between Jekyll and Pelican.
Jekyll's approach is more *abstract*, e.g. you used metadata in the template files to indicate inheritance, and special vars to inject the content.
Pelican's way of doing things is closer to the metal:
it used Jinja2 as a templating engine, and that was it.

For example, the article template went from:

```html
---
layout: default
---

<div class="nav">
  <a href="/">← all posts</a>
    —
  <a href="/my-projects">my projects</a>
   —
  <a href="https://twitter.com/#!/jawher">twitter</a>
   —
  <a href="https://github.com/jawher">github</a>
</div>

<article id="post">
    <div class="meta">
        <div class="date">
            <span class="day">{{ page.date | date: "%d" }}</span>
            <span class="month">{{ page.date | date: "%b" }}</span>
            <span class="year">{{ page.date | date: "%Y" }}</span>
        </div>
        <!--<div><a href="{{ page.url }}#disqus_thread" data-disqus-identifier="{{ page.url }}">Count</a></div>-->
    </div>

{{ content }}
</article>
```

To:

```html
{% extends "base.html" %}
{% block extra_links %}
  <li><a href="/">← home</a>★</li>
{% endblock %}
{% block content %}

<article id="post">
    <div class="meta">
        <div class="date">
            <span class="day">{{ article.date.strftime("%d") }}</span>
            <span class="month">{{ article.date.strftime("%b") }}</span>
            <span class="year">{{ article.date.strftime("%Y") }}</span>
        </div>
    </div>

<h1>{{article.title}}</h1>
{{ article.content }}
</article>
```

I have to admit that I like Pelican's approach much mor than Jekyll's.
While it was more low level, I found it to be much more intuitive.

And while I was at it, I've also tweaked the design a bit.
Mostly changing the post and page templates design to match the index page.

## Conclusion

Pelican's documentation, while rich, is often imprecise and lacks details.
For example, it'll often tell you to place static assets in a images directory so that they'll be automatically copied to the output.
What it doesn't tell you though is that this directory must be placed in the content directory, and not in the site root.

But all in all, it wasn't such a bad experience, and went rather smoothly. I've grown to love the `make devserver` command, and the generation speed (light years ahead of Jekyll).

Now that the migration is done, I have no more excuses for not publishing more often. See you in the next post.


text:
# Qt Interface library for the 8 key XKeys-8 USB strip

Loosely based on the QXKeys-24 library by CZectech

https://github.com/czechtech/libqxkey24


text:
# osa
OSA pipeline development

## Learn about git...

In addition to reading this README file, try one of the following tutorials:

* https://product.hubspot.com/blog/git-and-github-tutorial-for-beginners
* https://git-scm.com/book/en/v2
* https://help.github.com/articles/set-up-git/

Or search the web. There's plenty of info to help.

## Getting started with this repo...

First clone this repo:

```
https://github.com/magland/osa.git osa
```

That should make a new directory on your computer called osa. There's a very important (hidden) folder in osa called .git. Take a look like this:

```
cd osa/.git
ls
```

You should see various files and folders such as `branches`, `COMMIT_EDITMSG`, etc. Those are all the internal things that the git system keeps track of. You don't need to worry about it. Just be aware that it is there. Now cd back to the osa directory:

```
cd ..
```

Now modify a file and then check the status of your working directory as follows:

```
echo "some stuff" > new_file.txt
git status
```

You will notice that the status shows the new file as an untracked change. Here's something very important to understand: some files in your working directory are part of the repo, and some are not. By default, `new_file.txt` is not part of the working directory. In other words, it will not show up on github, and if somebody else clones the repo, they won't get that file. In this case, if you wanted to add this to the repo you would do the following:

```
git add new_file.txt
git commit -m "Added a new file"
```

Note the two steps. First we add, then we commit (and every commit needs a comment message). Why two steps, not one? It's because git allows us to do multiple adds (or other staged changes) before committing. The first steps (add, rm, mv) are called staging changes, and the commit step is called committing those changes.

But, there's a third step. Those changes are still not on github -- they're only on your computer. So do the following to push your commit:

```
git push
```

If everything went well, the new committed file just got uploaded to github! So if other people clone the repo, then they will get the changes.

What if your friend makes a change, and you want to get it on your computer. Do you need to clone again? ... NO. Instead you do the following within your working directory:

```
git pull
```

That will pull the changes down to your computer.

There's a lot more to understand about git and github, but this is the basic flow:

* Pull (`git pull`, or if it's the first time `git clone [repo]`)
* Modify some files
* Stage the changes (`git add [filenames]`)
* Check the status (`git status`)
* Commit `git commit -m "explain what you did"`
* Push `git push`
* View the github website to browse your changes

If something goes wrong (which it most certainly will), don't forget the following crucial advice: https://xkcd.com/1597/

It is also possible to modify files directly from github, but that is somewhat discouraged (not in the spirit of git). But I usually do that for editing this README.md file. Sometimes it makes sense to do it this way.

Tip: If you modify some files that are already in the repo, and you want to commit all of your changes (this is often the case), then use the following:

```
git add -u
git status
git commit -m "Explain what you did"
git push
```

Note that it is important to do `git status` so that you can see what is about to be committed.

Very important: DO NOT stage/commit very large files! Only commit small source code files (like scripts and things).

**Which files should you commit?** As mentioned above, some of the files in your working directory are in the repo, and others are not in the repo. Which should be in the repo? Roughly speaking, if it is source code, then yes it should be in the repo. If it is files that are generated by running a program, then no it should not be in the repo. The idea is that those files that get generated should be generated separately by each person who clones the repo.

One nice thing about git is that it remembers versions of your repo. So each time you make a commit, it's like taking a snapshot of your project. If you mess something up, you can always go back to a past snapshot.

## What's in this repo?

* `README.md` This file!
* `LICENSE` It's good to have a license file in every repo.
* `code` This is the code we will work with (.m files and stuff)
* `code-original` A copy of the original code before we modified it -- so you don't need to worry about trying stuff out. But remember anyway that git keeps track of all previous versions of the code.

## What's that MRklar-master folder?

You will notice there is a folder called `code/MRklar-master`. This is a different project that is hosted on github too! It was downloaded from here:

https://github.com/gkaguirrelab/MRklar

The person who downloaded it made some changes, so the version in this repo is a bit different, and has some extra things. On the MRklar page we see the following:

### Required software:
- Freesurfer (https://surfer.nmr.mgh.harvard.edu/)
- FSL (https://fsl.fmrib.ox.ac.uk/fsl/fslwiki)
- MRIcron (https://www.nitrc.org/projects/mricron/)
---

So it's important that we install that stuff before we get started.

repository: magland/osa

repo_name: magland/osa


text:
# Assessment

Candidates should assume that the solution will be deployed to an empty cloud subscription with no existing infrastructure in place.

There *should not* be a requirement for Servian to access a candidate's cloud services account to deploy this solution.

Demonstrate regular commits and good git workflow practices.

There is no time limit for this challenge.

Candidates should provide documentation on their solution, including:

- Pre requisites for your deployment solution.
- High level architectural overview of your deployment.
- Process instructions for provisioning your solution.

## Assessment Grading Criteria

### Key Criteria

Candidates should take care to ensure that their submission meets the following criteria:

- Must be able to start from a cloned git repo.
- Must document any pre-requisites clearly.
- Must be contained within a GitHub repository.
- Must deploy via an automated process.
- Must deploy infrastructure using code.

### Grading

Candidates will be assessed across the following categories:

#### Coding Style

- Clarity of code
- Comments where relevant
- Consistency of Coding

#### Security

- Network segmentation (if applicable to the implementation)
- Secret storage
- Platform security features

#### Simplicity

- No superfluous dependencies
- Do not overengineer the solution

#### Resiliency

- Auto scaling and highly available frontend
- Highly available Database

## Tech Challenge Application

Single page application designed to be ran inside a container or on a vm (IaaS) with a postgres database to store data.

It is completely self contained, and should not require any additional dependencies to run.

## Install

1. Download latest binary from release
2. unzip into desired location
3. and you should be good to go

## Start server

update `conf.toml` with database settings

`./TechChallengeApp updatedb` to create a database and seed it with test data

`./TechChallengeApp serve` will start serving requests

## Interesting endpoints

`/` - root endpoint that will load the SPA

`/api/tasks/` - api endpoint to create, read, update, and delete tasks

`/healthcheck/` - Used to validate the health of the application

## Compile from source

### Requires

#### dep

`curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh`

### Process

`go get -d github.com/Servian/TechChallengeApp`

run `build.sh`

the `dist` folder contains the compiled web package

### Docker build

`docker build . -t servian/techchallengeapp:latest`

repository: KottiswaranKarthik/ChallengeApp

gha_language: Go

repo_name: KottiswaranKarthik/ChallengeApp


text:
# Table of Contents for the CSS/SASS Directory #
## Siren Listening Page Boilerplate v1.0 ##
This Table of Contents goes through top level files first and then the files, .scss snippets, in the different subdirectories grouped by subdirectory.

### FILES ###
Collection files

1. basic.scss
	- Contains the Safe CSS styles served to all browsers inline in the <head>
	- Collects snippet files
2. enhanced.scss
	- Contains the enhanced styles that are applied following a test.
	- Developed responsively and mobile-first
	- Collects snippet files
3. enhanced-ie.scss
	- Served to IE8 browsers
	- Same as enhanced.css but without the media queries as that code is generated by respond.js for these browsers
	- Can contain IE specific rules if necessary
	- Collects snippet files

### DIRECTORIES ###
The directories in the CSS/SCSS folder and notes.

1. BASE-ENHANCED
	- Contains SCSS snippets referring to universal selectors in the enhanced experience for the project
2. BASIC
	- Contains SCSS snippets for the basic experience including a variant on the Normalize reset
3. LAYOUT
	- Contains all snippets pertaining to layout rules
4. MISC
	- Contains snippets that don't fit elsewhere the _print.scss snippet
5. MIXINS
	- Contains snippets for mixins
6. OBJECTS
	- Contains highlevel CSS objects seperated into snippets based on purpose
7. RESPONSIVE
	- Contains snippets related to the responsive design of the site
	- Everything is mobile first
8. VARIABLES
	- Contains snippets relating to Global variables for the project

### FILES BY SUBDIRECTORIES ###
This list, more than others, should be updated often throughout the project.

#### VARIABLES ####
1. _variables.scss
	- Contains Variables for colors used throughout the project
	- Contains extendable classes for fonts used throughout the project
	- Contains configuration for Modular Scale mixins
	- Contains configuration for Vertical Rhythm mixins
	- Intended for use in enhanced.scss

#### MIXINS ####
1. _mixins.scss
	- Contains mixins that represent common CSS patterns

#### BASIC ####
1. _core.scss
	- Contains a variant on the Normalize reset and the basic styles for the project
	- Contains SAFE styles only

#### BASE-ENHANCED ####
1. _core-enhanced.scss
	- Extends the style rules for _core.scss for the enhanced experience

#### LAYOUT ####
1. _container.scss
	- Contains the style rules for content containers

2. _grid.scss
	- Contains the basic horrizontal grid rules for the project and related classes

#### OBJECTS ####
1. _headerfooter.scss
	- Contain the style rules for the Header and Footer sections of the project
	- Shouldn't be extensive for Listing Page sites
2. _password.scss
	- Styles for the Password form on the homepage
3. _playlist.scss
	- Styles for the playlist and associated elements on the listening page
4. _mgmt.scss
	- Styles for Management container elments on listening page
5. _nope.scss
	- Styles for the "Password is Wrong" page

#### RESPONSIVE ####
1. _responsive.scss
	- The home for all media-queries

#### MISC ####
1. _print.scss
	- Contains the print style rules


text:
RxAppState [![Build Status](https://travis-ci.org/jenzz/RxAppState.svg?branch=master)](https://travis-ci.org/jenzz/RxAppState)
==========
A simple, reactive Android library based on [RxJava](https://github.com/ReactiveX/RxJava) that monitors app state changes.
It notifies subscribers every time the app goes into background and comes back into foreground.

A typical use case is, for example, session tracking for analytics purposes
or suppressing push notifications when the app is currently visible to the user.

Background
----------
Android has this ancient pain of not providing any type of callback to know if your app is currently in the foreground or background.
It is lacking an equivalent of the iOS [UIApplicationDelegate](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol)
which offers callbacks like [`applicationDidEnterBackground`](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/#//apple_ref/occ/intfm/UIApplicationDelegate/applicationDidEnterBackground:)
and [`applicationDidBecomeActive`](https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIApplicationDelegate_Protocol/#//apple_ref/occ/intfm/UIApplicationDelegate/applicationDidBecomeActive:).

There are two popular discussions on this topic on StackOverflow:

* [How to detect when an Android app goes to the background and come back to the foreground](http://stackoverflow.com/questions/4414171/how-to-detect-when-an-android-app-goes-to-the-background-and-come-back-to-the-fo)
* [Checking if an Android application is running in the background](http://stackoverflow.com/questions/3667022/checking-if-an-android-application-is-running-in-the-background)

This library internally uses a combination of `ActivityLifecycleCallbacks` and the `onTrimMemory(int level)` callback to identify the current app state.
Just check out the source code (mainly: [AppStateRecognizer](https://github.com/jenzz/RxAppState/blob/master/library/src/main/java/com/jenzz/appstate/internal/AppStateRecognizer.java)).
The implementation is dead simple.

Usage
-----
You most probably want to monitor for app state changes in your application's `onCreate()` method
in which case you also don't need to worry about unsubscribing from the `Observable`.
Remember that if you subscribe in an `Activity` or `Fragment` don't forget to unsubscribe to avoid memory leaks.
```java
RxAppStateMonitor.monitor(this).subscribe(new Action1<AppState>() {
    @Override
    public void call(AppState appState) {
        switch (appState) {
            case FOREGROUND:
                // Hocus Pocus...
                break;
            case BACKGROUND:
                // Abracadabra!
                break;
        }
    }
});
```

If you haven't jumped onto the hip RX bandwagon yet, you can also register oldskool callback listeners:
```java
AppStateMonitor appStateMonitor = RxAppStateMonitor.create(this);
appStateMonitor.addListener(new AppStateListener() {
    @Override
    public void onAppDidEnterForeground() {
        // ...
    }

    @Override
    public void onAppDidEnterBackground() {
        // ...
    }
});
appStateMonitor.start();
```

Example
-------
Check out the [sample project](https://github.com/jenzz/RxAppState/tree/master/sample) for an example implementation.

Download
--------
This library is published via [JitPack](https://jitpack.io/#com.jenzz/RxAppState).

**Step 1.** Add the JitPack repository to your project root `build.gradle`:

```groovy
allprojects {
  repositories {
	...
	maven { url "https://jitpack.io" }
  }
}
```

**Step 2.** Add the dependency to your app `build.gradle`:

```groovy
dependencies {
  compile 'com.jenzz:RxAppState:2.0.1'
}
```

License
-------
This project is licensed under the [MIT License](https://raw.githubusercontent.com/jenzz/RxAppState/master/LICENSE).

repository: marinoluck/RxAppState

repo_name: marinoluck/RxAppState


text:
Pattern: Malformed spacing for arbitrary parentheses

Issue: -

## Description

Checks & fixes whitespace on the inside of arbitrary parentheses.

Arbitrary parentheses are those which are not owned by a function (call), array or control structure.
Spacing on the outside is not checked on purpose as this would too easily conflict with other spacing rules.

repository: Adroiti/docs-for-code-review-tools

repo_name: Adroiti/docs-for-code-review-tools


text:
# Astro Image Viewer Sample
This JavaScript sample allows the amateur astronomer to efficiently display ultra-high resolution wide angle images on their web site. The images can be annotated with other images; for example, deep space objects taken with more powerful telescopes or with different instruments. Images and their annotations are specified through configuration files, making it easy to integrate astronomical images into content management systems such as WordPress.

The sample builds upon various technologies including OpenSeadragon for deep zoom images, and Annotorius for image annotations.

# Example in use
An example of the sample in use can be seen at:
[http://feistyphoton.org/project/carinatour/](http://feistyphoton.org/project/carinatour/)

This image of the southern night sky includes many famous deep space objects that can only be observed from the southern hemisphere. Those deep sky objects include NGC 3372 (Carina Nebula), NGC 3532 (Wishing Well Cluster), IC 2944 (Running Chicken Nebula) and IC 2602 (Southern Pleiades).

Each image has an article describing the object including how it was taken and how the raw data was processed. This particular image is a mosaic of 12 separate images taken with a wide field telescope (Takahashi FSQ 106 ED with an SBIG STL-11000M camera) rented from iTelescope.net  (Coonabarabran, New South Wales, Australia). Given its large size (80 megapixels), the image is an ideal candidate for rendering with OpenSeadragon!

Click the full screen button on the image’s toolbar to explore the image in more detail. Use either your mouse’s scroll button, two-fingered scroll on your touchpad or the zoom in / out buttons on the toolbar. As you zoom into the image, OpenSeadragon loads in additional image detail on demand.

Most of the deep sky objects in the image were imaged using a more powerful telescope with a narrower field of view and / or using narrow band filters.  (Taking the whole image with the more powerful telescope would have been prohibitively expensive!)  Hover over an object (for example, NGC 3372 (Carina Nebula)) in the top right corner) and click one of the additional images. The technology to display the annotations is provided by Annotorius. In this usage scenario, the user is not annotating the images but instead the annotations are added programmatically on image rendering.

Each of the images on this web site [http://feistyphoton.org](http://feistyphoton.org) are displayed using this JavaScript sample. The site was developed using WordPress with Elegant Theme’s Divi builder and theme. Where an image and its article is required (e.g. [http://feistyphoton.org/project/m45-pleiades/](http://feistyphoton.org/project/m45-pleiades/))  a simple JavaScript call inserts the required content into the page.

# Dependencies and licenses

## Sample License
This sample is distributed under the MIT license ([https://opensource.org/licenses/MIT](https://opensource.org/licenses/MIT))

## Dependencies
* **OpenSeadragon V2.2.1**
 * [https://openseadragon.github.io/](https://openseadragon.github.io/)
 * This component provides the zoomable image supported and is distributed under the New BSD license ([https://openseadragon.github.io/license/](https://openseadragon.github.io/license/)
* **Annotorius 0.6.4**
 * [https://annotorious.github.io/](https://annotorious.github.io/)
 * This component provides the annotation support and is distributed under the MIT license ([http://annotorious.github.io/about.html](http://annotorious.github.io/about.html))
* **JQuery (compressed, production V3.1.1)**
 * [http://jquery.com/](http://jquery.com/)
 * Used in many ways – too numerous to enumerate!
 * Released under the MIT license (see header of js file).
* **Underscore.js  (Production V1.8.3)**
 * [http://underscorejs.org/](http://underscorejs.org/)
 * This sample uses the uniq function to remove duplicates from an array. This dependency is available under the MIT license ([http://underscorejs.org/docs/underscore.html](http://underscorejs.org/docs/underscore.html))
* **Icons provided by Google material icons**
 * [https://material.io/icons/](https://material.io/icons/)
 * The icons are made available under the Apache 2.0 license. At the time of writing  (December 21st 2016) the only attribution requirements were "We'd love attribution in your app's "about" screen, but it's not required. The only thing we ask is that you not re-sell these icons. " ([https://material.io/icons/](https://material.io/icons/))

# How to use this sample

Once you have the setup sample it should look like
[http://fesityphoton.org/astroimageviewer/example.html](http://fesityphoton.org/astroimageviewer/example.html)

## Step 1: Make a copy of this this repository on your local file system

## Step 2: Download the dependencies
Review and download the following dependencies into the appropriate folder into the folder `{DownloadLocation}\astroimageviewer\extern\script`

* OpenSeadragon: [https://openseadragon.github.io/](https://openseadragon.github.io/)
* Annotorius: [https://annotorious.github.io/](https://annotorious.github.io/)
* JQuery: [http://jquery.com/](http://jquery.com/)
* Underscore.js [http://underscorejs.org/](http://underscorejs.org/)

## Step 3: Upload the files to your web site
Copy the folder `{DownloadLocation}\astroimagerviewer` to the base directory of your web site

## Step 4:
Open the following URL in a browser
[http://yourwebsite.url/astroimageviewer/example.html](http://yourwebsite.url/astroimageviewer/example.html)

# Extending this sample
##Images
The individual images are stored in folders in `{DownloadLocation}\astroimageviewer\assets\images`

Each folder contains

* A 100 * 100 pixel thumb nail (100.jpg)
* The source image (Image.jpg)
* The HTML for the article (Article.hml). When programmatically including HTML into a web page, take care to ensure it comes from a trusted source. Future work could migrate this content to a simple database and the sanitized text rendered on demand.
* Optionally a Deep Zoom Image (DZI) version in the image stored in the DZI folder. The images in the sample were created with the Deep Zoom Composer ([https://www.microsoft.com/en-us/download/details.aspx?id=24819](https://www.microsoft.com/en-us/download/details.aspx?id=24819)). The tool is straightforward to use. On the last step (Export) the following options: Output type = Silverlight Deep Zoom, Export options = Export as a composition (single image).

## Image Data
The image data is stored in a lightweight fashion using a JavaScript function {DownloadLocation}\astroimageviewer\assets\imageData.js

This JS files contains a couple of examples with an explanation how to include other images. Again, future work could migrate this data into a database but the sample intent was to provide a simple script with minimal dependences on the target machine.

## Annotation Data

Again a lightweight structure is used – see `{DownloadLocation}\astroimageviewer\assets\NGC7000Annotations.js`

Each annotation consists of a description, an image id for the annotation and the coordinates of where to mark the annotation in the parent image.

 ```
 "Cygnus wall": {
        geometry: { height: 0.2788, width: 0.2747, x :0.0069, y:0.3375 },
        LeftAnnotationID: 2}
```

**Tip**: guessing the correct coordinates for the annotation will be tricky! In astroImageViewer.js set

```
var allowAnnotationCreation = true;
```

Use the UI to create the annotations, then enter the browser debug mode and at the console type

```
Anno.getAnnotations()
```

You should then be able to inspect the geometry values for the newly created annotation.

## Adding an annotation in your page

The file `{DownloadLocation}\astroimageviewer\example.html` has a stripped down minimal version of how to do this.

First, create a DIV where the image and article need to be on the page:

```
<div id = "osd_panel">

</div>
```

Next load in JQuery. **Tip:** loading JQuery from a CDN e.g. Google will speed up script execution.

```html
<script src="/astroimageviewer/extern/script/JQuery/jquery-3.1.1.min.js"></script>
```

Next load in the data and script. **Tip:** this script can be wrapped into a helper script to make it easier to integrate into your content management system

```html

<script>

$('head').append ('<script src="/astroimageviewer/script/astroImageViewer.js"/>');
$('head').append ('<script src="/astroimageviewer/assets/imageData.js"/>');
$('head').append ('<script src="/astroimageviewer/assets/NGC7000Annotations.js"/>');
viewDZIWithAnnotations( '#osd_panel',
astroImageData, 0, NGC7000Annotations);
</script>

```

The call to viewDZIWithAnnotations requires a tag indicating where in the page to insert the image and article, the image data, the index of the image to view and the annotation data.

Alternatively if the annotations are not required, image #1 can be rendered this call
```
viewDZI('#osd_panel', astroImageData, 1);
```
If you have an image (#2) without a Deep Zoom Image then it can be rendered with

```
viewDZI('#osd_panel', astroImageData, 2);
```

# Known issues
Currently Annotorius does not support selection of the annotation on mobile. On these devices, the script enumerates the annotations into a combo box in the toolbar.

#Image Credits
The sample images were taken with iTelescope.net and processed with PixInsight, Adobe Lightroom and Adobe Photoshop.

repository: DarrynLavery/astro-image-viewer

repo_name: DarrynLavery/astro-image-viewer


text:
# stock_reminder bot 🤖
[![Build Status](https://travis-ci.org/luisgc93/stock_reminder_bot.svg?branch=master)](https://travis-ci.org/luisgc93/stock_reminder_bot) [![codecov](https://codecov.io/gh/luisgc93/stock_reminder_bot/branch/master/graph/badge.svg?token=2sx6C5pkSW)](https://codecov.io/gh/luisgc93/stock_reminder_bot)

A [twitter bot](https://twitter.com/stock_reminder) that registers reminders for stock and cryptocurrency prices.
Mention the bot with a [cashtag](https://money.cnn.com/2012/07/31/technology/twitter-cashtag/index.htm) followed by a stock or cryptocurrency ticker symbol and the reminder date:

The bot will then get back to you on the specified date with your investment results and a randomly generated gif that will match your earnings:

Additionally, the bot can also produce rating reports when it is mentioned with a ticker symbol and the words "report" or "analyse"/"analyze":

## Implementation 🛠
The bot uses [RomelTorres' python wrapper](https://github.com/RomelTorres/alpha_vantage) for the [Alpha Vantage API](https://www.alphavantage.co/documentation/). It's deployed on [Heroku with Docker](https://devcenter.heroku.com/articles/build-docker-images-heroku-yml) 🐳 and uses a [clock process](https://devcenter.heroku.com/articles/clock-processes-python) for replying to twitter mentions and posting reminders. When a mention is in the correct format, a reminder object is saved into a postgres database through [peewee](http://docs.peewee-orm.com/en/latest/)'s ORM. Every 2 minutes, the bot will check whether any reminders are due and publish an update by replying to the initial tweet with the investment results. Further implementation details can be found in the project's [medium post](https://luisgc93.medium.com/building-a-stock-reminder-twitter-bot-with-python-and-alpha-vantage-api-24189566e705).

## Usage
Register an account on [Twitter's Developer Platform](https://developer.twitter.com/en) and store your credentials in `/envfiles/local.env`.
To run the bot locally, start the project containers with `make env-start` and then try out the bot's features with:

`make reply-mentions`

To run all the tests use:

`make test`

To check code formatting:

`make linting`


text:
---
layout: post
title: Learning by MOOC courses !
last_updated: September 10, 2022
---

**Python Certification 2022**

A NetAcad.com course by Cisco

* [PCAP - Programming Essentials In Python English 0722b][21]{:target="_blank"} : PCAP: Programming Essentials in Python (short form: Python Essentials) is a two-course series that covers all the basics of programming in Python, as well as general computer programming concepts and techniques, and the object-oriented approach.

* [Python Essentials by Python Institute][22]{:target="_blank"} : This course is the first in a 2-course series that will prepare you for the PCEP - Certified Entry-Level Python Programmer and PCAP: Certified Associate in Python Programming certification exams.

* [CisconetAtLatam ofrece certification en Python][2]{:target="_blank"} : also to check

**Blockchain**

* [Blockcain Essentials][31]{:target="_blank"} : Course offered by IBM Cognitive AI Class

* [Create a Cryptocurrency Trading Algorithm in Python][32]{:target="_blank"} : Course offered by IBM Cognitive AI Class

**Big Data**

* [Learning from Data by CalTech Lectures][41]{:target="_blank"} : The fundamental concepts and techniques are explained in detail. The focus of the lectures is real understanding, not just "knowing." Includes a playlist in Youtube.

**Data Science**

* [Data Science Math Skills][11]{:target="_blank"} : A Coursera course by Duke University

**Android track 2022**

Some Coursera courses offered by UNAM

* [Programando con Java para aplicaciones Android][1]{:target="_blank"}

* [Fundamentos de Android][2]{:target="_blank"}

* [Desarrollo de aplicaciones con Android][3]{:target="_blank"}

* [Desarrollo de aplicaciones avanzadas con Android][3]{:target="_blank"} : Cómo implementar mapas con el API de Google Maps.  cómo aprovechar el multitask de Android y hacer animaciones en 2D  para llevar tus aplicaciones a más dispositivos como weareables, televisiones y autos. Después de este curso, podrás subir tu aplicación a Google Play Store.

**Track for Google IT Automation with Python Professional Certificate**

Learn in-demand skills like Python, Git, and IT automation to advance your career

* [Google IT Automation with Python Professional Certificate][51]{:target="_blank"} : 7-days free for 6 Coursera courses offered by Google.

[1]: https://www.coursera.org/learn/programandoconjava
[2]: https://www.coursera.org/learn/fundamentos
[3]: https://www.coursera.org/learn/desarrollo-de-aplicaciones
[4]: https://www.coursera.org/learn/aplicaciones-android
[11]: https://www.coursera.org/learn/datasciencemathskills
[21]: https://lms.netacad.com/course/view.php?id=1387362
[22]: https://edube.org/learn/python-essentials-1/python-essentials-part-1-1
[23]: http://cisconetacadlatam.com/python/
[31]: https://courses.cognitiveclass.ai/courses/course-v1:developerWorks+BC0101EN+v1/course/
[32]: https://courses.cognitiveclass.ai/courses/course-v1:IBM+GPXX0PICEN+v1/course/
[41]: https://home.work.caltech.edu/lectures.html
[51]: https://www.coursera.org/professional-certificates/google-it-automation