text:
---
layout: post
title: GSoC Week 7
tags: [gsoc, python, programming, maths]
comments: true
image:
 feature: gsoc.png
---

### So Far

[PR 9575](https://github.com/sympy/sympy/pull/9575) and [PR
9495](https://github.com/sympy/sympy/pull/9495) got merged this week. All the
basic functions are now in place in `polys.ring_series`. The module supports
Laurent as well as Puiseux series expansion. The order of the day is to
extend this support for nested functions, and encapsulate the whole thing with
classes. The idea is that the user need not bother about calling `ring_series`
functions and that the class should hold all the relevant information about the
series.

Given that SymPy already has `series` infrastructure, we need to decide whether
`ring_series` with be integrated with it or whether it will be distinct from it.

### Next Week

* Discuss and decide how `ring_series` is to be used and write its classes
accordingly. I will build upon [PR 9614](https://github.com/sympy/sympy/pull/9614)

* Write a `series` function that makes use of `ring_series` functions to expand
arbitrary expressions.

I also need to start porting some of it to Symengine. The basic polynomial
operations are in place there. I need to discuss with Ondrej and Sumith how the
series module will best work with the Polynomial module. If that is sorted, I
can start porting the `ring_series` functions.

Cheers!


text:
[**Review #1042 | Scotch Review #357 - Invergordon 43yr Exclusive Malts 1972**]( https://t8ke.review/review-1042-invergordon-43yr-exclusive-malts-1972/)

**The Schtick:** This is an independent bottling of a single grain whiskey that was distilled at Invergordon. It was bottled by the Exclusive Malts after being matured in a refill barrel and bottled at cask strength.

-----

**Distiller:** Invergordon

**Bottler:** The Exclusive Malts

**Selection:** N/A

**ABV:** 48.2% ABV

**Age:** 43 Years

-----

**Nose:**  Honey, rich toffee. Apples, pears and fresh cut melon. Almost a honey dew note. Light pepper.

**Taste:** Medium mouth feel. No real heat at all. Vanilla, rich toffee, and apple crumble. Heat grows mildly. Melon. Light pepper. Tobacco, rich oak presence. Pear.

**Finish:** Long, mild tobacco. Faint musty character. Good oak structure without being overbearing. Apples, pears, vanilla bean, honey and faint toffee.

**Overall:** This was really nice. Ive found a lot of older grain whiskeys to perform really well, and this was no exception. The fruitiness, the tobacco and musty character and the well balanced oak was very nice. I really enjoyed this.

Thanks for reading!

**Rank: 7**

-----

[WEBSITE](https://t8ke.review) | [SEARCHABLE ARCHIVE](https://t8ke.review/review-archive/) | [SUBREDDIT](https://reddit.com/r/t8kereviews)

-----

Decoded:

**1** | **Disgusting** | So bad I poured it out.

**2** | **Poor** | I wouldn't consume by choice.

**3** | **Bad** | Multiple flaws.

**4** | **Sub-par** | Not bad, but many things I'd rather have.

**5** | **Good** | Good, just fine.

**6** | **Very Good** | A cut above.

**7** | **Great** | Well above average

**8** | **Excellent** | Really quite exceptional.

**9** | **Incredible** | An all time favorite

**10** | **Perfect** | Perfect

----

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Arsene Wenger in talks with Bayern

Published at: **2019-11-07T07:43:24+00:00**

Author: **AFP**

Original: [The Express Tribune](https://tribune.com.pk/story/2095323/7-arsene-wenger-talks-bayern/)

BERLIN: Arsene Wenger is reportedly in talks with Bayern Munich to potentially become their new head coach while Ralf Rangnick, another possible candidate, is said to not be interested.
Wenger, 70, gave an evasive answer when broadcaster beIn Sports directly asked him about working at Bayern, who dismissed Niko Kovac on Sunday in the wake of a 5-1 drubbing at Eintracht Frankfurt.
According to German daily Bild, talks have taken place between Wenger and Bayern with club chairman Karl-Heinz Rummenigge leading the search to find Kovac’s replacement.
Wenger, who speaks fluent German, coached Arsenal from October 1996 until May 2018 and said that he misses some aspects of coaching.
While Wenger has enjoyed his year away from football, the satisfaction of winning matches and preparing players is “something you miss, of course,” said the Frenchman.
Meanwhile, Rangnick, currently head of sport and development at Red Bull and the previous sports director at Bundesliga side RB Leipzig, is reportedly the latest big name to turn Bayern down.
“Ralf is not available. We don’t believe that what Ralf Rangnick is all about is currently being sought by Bayern,” Rangnick’s manager Marc Kosicke told Bild.
“That why it doesn’t make sense to hold concrete talks.”
Rangnick joins Ajax coach Erik ten Hag and Paris Saint-Germain boss Thomas Tuchel by stating they will not leave their current jobs this season.
On Tuesday, club president Uli Hoeness said they expected to be able to name a new coach in time for Bayern’s trip to Fortuna Duesseldorf on November 23.
Former Real Madrid and Manchester United manager Jose Mourinho and ex-Juventus coach Massimiliano Allegri have also been linked to the job by the German media.
Former Germany assistant coach Hansi Flick took over as interim coach for Wednesday’s 2-0 Champions League win at home to Olympiakos.
He will also oversee Saturday’s Bundesliga match against second-placed Dortmund at the Allianz Arena. Bayern are currently fourth in the table.
Before kick-off on Wednesday, director of sport Hasan Salihamidzic refused to confirm whether Wenger and Rangnick have been approached.
“We don’t comment on rumours,” said Salihamidzic.
However, he revealed Flick could stay on longer as caretaker coach should their preferred candidate only be available next season.
“We’ll see. I am glad Hansi Flick is here. At the moment he is the right coach.”

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
# Runtime Type Information

Runtime Type Information (RTTI) is a mechanism best known from the C++ platform. It allows for types to be resolved and reflected dynamically at run time. Here we introduce several additions due to the nature of dynamic languages.

## Declared types

The runtime (instance of [`Context`](ref/context) class) maintains a set of declared classes, interfaces and traits (types). The set is divided into two parts:

- **Application types** contains implicitly declared types from referenced libraries.
- **User defined types**  are declared during the program (request) execution.

This allows for the application types to be declared just once, and to be shared by many `Context` instances. The set of types is keyed by the type's fully qualified name and points to the type's runtime information [PhpTypeInfo](ref/phptypeinfo).

Types added to the set of declared types can be both PHP types and .NET types. Every type in the set can be consumed by following PHP constructs:

- `new`, `instanceof`
- reflection API
- static member access

### Application-wide types

The set of application-wide types is populated by runtime once during the load of a [PHP assembly](assembly/compiled-assembly). The assembly specifies types contained in referenced assemblies during the PHP assembly compilation. Types being listed has to be annotated with `[PhpTypeAttribute]` attribute. By default, these are all the PHP built-in classes and interfaces like `stdClass`.

### User-defined types

The runtime type resolution mechanism needs the set of additional types declared during the program execution. The set of user-defined types is bound to an instance of `Context`. A type is added to the set in two possible ways:

- PHP's `class` (or `interface` or `trait`) statement. The statement is actually translated by the compiler to the API call below.
- Call to [Context.DeclareType()](ref/context#methods).

## Autoload

The runtime supports a simulation of autoloading. This means that every time the program requests a type that is not declared in the `Context` yet and the situation allows the autoloading, the autoload mechanism is invoked.

The autoload mechanism complies with autoloading in the PHP language, taking into account both the `__autoload` function and SPL autoloading. The mechanism itself is provided by the service `IPhpAutoloadService`, which is maintained by the instance of `Context`.

For seamless usability of PHP libraries within .NET programs, the autoload may implicitly perform `include_once` of containing script file when needed. This "implicit autoload" is enabled by default and is disabled if SPL autoload gets enabled.

## Related links

- [PhpTypeInfo](ref/PhpTypeInfo)

license: MIT

repository: peachpiecompiler/peachpie-docs

gha_language: PowerShell

gha_license_id: MIT

repo_name: peachpiecompiler/peachpie-docs


text:
# Gesture PiArm

## Introduction
This project uses an optimized model for gesture recognition in order to control a robot without a physical interface. At the current stage of this project, the model utilized below is a pre-trained COCO SSD Inception V2 model trained further on a custom dataset of created and annotated gesture images. Gestures and hand placement relative to the camera view dictate the action of the MeArm Pi V3, the robot shown below.

![Gesture Pi Arm Demo](Gesture_Pi_Arm_Demo_Short.gif)

The provided code does the following:
1. Provides a python library to control the MeArm V3.
2. Provides the gesture model used to control the robot.
3. Provides a plug-and-play python script for not only running the demo, but also for utilizing another model of choice if need be. If another model is utilized, editing of the demo python script may be required.

## Running the Example:

### Prerequisites:
- One Intel NCS 2 Device
- OpenVINO 2020.1 (Python API)
- OpenCV with associated Python bindings*.
- a Raspberry Pi 3 B+
- Pigpio (a Python API for controlling the GPIO of the Raspberry Pi)
- An assembled and calibrated MeArm Pi V3 robot connected to the Raspberry Pi and the provided 6V power supply. Instructions to calibrate and build robot are featured later in this document.
- Custom MeArm Pi V3 python library (downloaded by the Makefile)

### Running Application with Makefile
Provided Makefile has various targets that help with the above mentioned tasks.
- **make run**: Runs the sample application.
- **make run_wout_arm_CPU**: Runs the sample application without robot on CPU
- **make run_wout_arm_MYRIAD**: Runs the sample application without robot using MYRIAD plugin
- **make help**: Shows available targets.
- **make all**:Builds and/or gathers all the required files needed to run the application.
- **make data**: Gathers all of the required data need to run the sample.
- **make deps**: Builds all of the dependencies needed to run the sample.
- **make install_reqs**: Checks the requirements needed to run the sample.
- **make clean**: Removes all the temporary files that are created by the Makefile.

### Running Application Manually
1. Open up the terminal on Raspberry Pi.
2. Make sure that environment variables are set up for your version of OpenVINO by entering `source /opt/intel/openvino`.
3. Enter `cd gesture_piarm && sudo pigpiod` to navigate to the demo directory and start the pigpio daemon.
4. Verify that the Raspberry Pi Cam is connected/working correctly. Point the camera in the direction of your body where it can see your hand easily as you gesture.
5. Plug in the Intel Neural Compute Stick 2 if you haven't already.
6. Enter `python3 gesture_ssd_async.py -i 'cam' -m gesture_model_fp16/<name>.xml -d MYRIAD`.
7. `CTRL + C` to close application and `sudo killall pigpiod` to stop daemon.

### Controlling Robot
The instructions below assume that you are using the model provided with the code in this repository.
- The application features a box with annotated regions on the top, bottom, left, and right of the camera view. Move your hand to each of these boxes to move the robot in the expected direction.
- In order to move the robot outwards, show two exposed palms to the camera, making sure to not intersect the regions around the camera view.
- In order to move the robot inwards, show two fists with the bottom of the palm exposed, making sure to not intersect the regions around the camera view.
- In order to close the grip, show a single fist the bottom of the palm exposed.
- In order to open the grip, show a single exposed palm.
See below for demonstration of gesture control and arm movement.

![Motion Demo](Arm_Motion_Demo.gif)

## Useful Instructions and References

### Instructions for Calibrating Servos and Building the MeArm Pi V3
The python scripts provided in the repository, specifically the `servo.py` and the `mearm_pi.py` scripts, are designed to simplify controlling the MeArm Pi V3. In doing so, calibration of the servos is also simplified. Follow the instructions below to calibrate the servos before assempling the robot.

1. Install pigpio via `sudo apt-get install pigpiod`.
2. Attach the MeArm Pi V3 Hat to the Raspberry Pi.
3. Connect the MeArm Pi Hat via the 6-cord ribbon to the control board used to connect all the servos to the Hat. Make sure that the exposed metal from the female servo connections are facing inwards to the center of the control board.
4. Attach the provided 6V power supply to the Hat.
5. Turn on the Raspberry Pi, and once fully booted up, open terminal and follow the prompts below. The instructions below set the servos to certain angles. These angles are per the instructions said here under *Setting the Servo Motors*: https://learn.mime.co.uk/docs/getting-started-with-the-mearm-pi/.

```
$ sudo pigpiod
$ cd <REPO_INSTALL_DIR>/gesture_piarm
$ python3
>>> from mearm_pi import MeArmPi
>>> mearm = MeArmPi() # set pins will be printed
>>> mearm.moveBaseTo(0) # set pin will be printed
>>> mearm.moveLowerTo(90) # set pin will be printed
>>> mearm.moveUpperTo(70) # set pin will be printed
>>> mearm.moveGripTo(90) # set pin will be printed
>>> exit()
$ sudo killall pigpiod
```

6. Attach the servo horns to the servos as is depicted here when you scroll to *Setting the Servo Motors*: https://learn.mime.co.uk/docs/getting-started-with-the-mearm-pi/.
7. Turn off and remove power supply from Hat. In addition, turn off Raspberry Pi.

 Please follow the instructions here: http://learn.mearm.com/assets/mearm.pdf.

### Interested in Making Your Own Gesture Control?
- Follow instructions from the Tensorflow Object Detection API to curate your own model. Useful links are found here: https://github.com/tensorflow/models/tree/master/research/object_detection.
- Convert the model to IR using OpenVINO's model optimizer. Instructions on how to do this are here: https://docs.openvinotoolkit.org/latest/_docs_MO_DG_prepare_model_convert_model_tf_specific_Convert_Object_Detection_API_Models.html.
- Plug in the model using the command line parameters and edit the code as needed to map gesture class to robot action.

### Hardware:
- MeArm Robot Raspberry Pi Kit
- Instructional: https://www.youtube.com/watch?v=az8JMvvetyU
- Buy: https://www.kitronik.co.uk/4503-mearm-robot-raspberry-pi-kit-blue.html

repository: DrewBearly/ncappzoo

repo_name: DrewBearly/ncappzoo


text:
---
hrs_structure:
  division: '2'
  volume: '11'
  title: '26'
  chapter: 487N
  section: ''
type: chapter
tags:
  - Business
menu:
  hrs:
    identifier: HRS0487N
    parent: title26
    name: Chapter 487N Security Breach of Personal Information
weight: 65000
title: Security Breach of Personal Information
full_title: Chapter 487N Security Breach of Personal Information
---
**CHAPTER 487N**

**[SECURITY BREACH OF PERSONAL INFORMATION]**

Section

487N-1 Definitions

487N-2 Notice of security breach

487N-3 Penalties; civil action

487N-4 Reporting requirements

487N-5 Information privacy and security council;

established; duties; reports

487N-6 Personal information security; best practices;

websites

487N-7 Personal information system; government agencies;

annual report

Note

Personal information protection requirements. L Sp 2008, c 10, §§7 to 15.

Cross References

Personal information policy and oversight responsibilities for government agencies, see §487J-5.

repository: SamMade/BlueAndKrabby

repo_name: SamMade/BlueAndKrabby


text:
---
layout: post
title: "Being a HipstR: the coolest R packages you've never heard of"
---

On Monday September 4th I presented at the [Oxford R user group](https://r-oxford.github.io/) on some R packages I found very useful during my PhD but which people might not have otherwise heard of. The slides for this talk along with links to the packages can be found [here]({{ site.baseurl}}/files/being-a-hipstr.html).

repository: kieranrcampbell/blog

repo_name: kieranrcampbell/blog


text:
# Awesome Chalice

> Community list of resources about AWS Chalice.

[AWS Chalice](https://aws.github.io/chalice/) is a library for serverless Python application development using AWS Lambda. Chalice is suited for:

- Writing HTTPS APIs that wrap AWS infrastructure.
- Building libraries of Ops functions, including ChatOps.
- Managing AWS accounts programmatically.
- Creating web applications with your favorite front-end toolkit.
- Providing the web API backend layer for cross-platform desktop and mobile applications written in Qt for Python.

Join us in Slack.

## Contents
- [AWS Projects](#aws-projects)
- [AWS Python SDKs](#aws-python-sdks)
- [3rd-party Python](#3rd-party-python)
- [Tooling](#tooling)
- [Made with Chalice](#made-with-chalice)
- [Articles](#articles)
- [AWS Serverless Architectures](#aws-serverless-architectures)
- [AWS Labs](#aws-labs)
- [Related Awesome Lists](#related-awesome-lists)

## AWS Projects
Supercharge your app.

- [AWS Data Wrangler](https://github.com/awslabs/aws-data-wrangler) - Integrate Pandas with every major AWS data backend.
- [AWS AutoGluon](https://github.com/awslabs/autogluon) - Automate machine learning training and deployment.
- [AWS Lambda Powertools](https://github.com/awslabs/aws-lambda-powertools-python) - A suite of utilities for AWS Lambda functions to ease adopting best practices such as tracing, structured logging, custom metrics async, parameters and secrets management, idempotency, and more.
- [AWS Cloud Development Kit (CDK)](https://aws.amazon.com/cdk/) - The CDK can deploy Chalice apps, or Chalice can deploy CDK apps.
- [AWS Solutions Constructs Patterns](https://aws.amazon.com/solutions/constructs/patterns/) - Architectural patterns for the CDK that can be chained together.
- [AWS Serverless Application Repository](https://serverlessrepo.aws.amazon.com/applications) - Serverless AWS applications.
- [DynamoDB Global Tables](https://aws.amazon.com/dynamodb/global-tables/) - NoSQL database.
- [Aurora Serverless Global Database 2](https://aws.amazon.com/rds/aurora/serverless/) - OLTP database.
- [AWS Amplify](https://docs.amplify.aws/) - Front-end toolkit.
- [Amazon Athena Federated Query](https://docs.aws.amazon.com/athena/latest/ug/connect-to-a-data-source.html) - Author pure lambda functions for ad-hoc datalakes.
- [AWS SDK for JavaScript](https://aws.amazon.com/sdk-for-javascript/) - Combine with Brython or Pyodide for front-end Python development.

## AWS Python SDKs
Every SDK in one place.

- [AWS SDK for Python (boto3)](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html) - See `aioboto3` for the async version.
- [AWS X-Ray SDK for Python](https://docs.aws.amazon.com/xray/latest/devguide/xray-sdk-python.html) - Instrument with `from aws_xray_sdk.core import patch_all;patch_all();`.
- [AWS IoT SDK for Python](https://github.com/aws/aws-iot-device-sdk-python-v2) - Can talk to Chalice via Kinesis Streams.
- [AWS C Common Runtime](https://github.com/awslabs/aws-c-common) - Use with the AWS CRT Python module.
- [AWS Encryption SDK for Python](https://github.com/aws/aws-encryption-sdk-python/) - Hard encryption in your application logic.
- [AWS SageMaker SDK for Python](https://github.com/aws/sagemaker-python-sdk) - Train and deploy machine learning models. Integrate with your EMR cluster.
- [AWS Step Functions Data Science SDK for Python](https://github.com/aws/aws-step-functions-data-science-sdk-python) - Managed AI/ML infrastructure.
- [AWS Braket SDK for Python](https://github.com/aws/amazon-braket-sdk-python) - Leverage D-Wave quantum computing devices.
- [AWS DynamoDB Encryption SDK for Python](https://github.com/aws/aws-dynamodb-encryption-python) - Encrypt data before sending it to DynamoDB.
- [AWS Transcribe Streaming SDK](https://github.com/awslabs/amazon-transcribe-streaming-sdk) - Convert audio into text.
- [AWS Data API SDK](https://github.com/awslabs/aws-data-api-python-sdk) - HTTP interface to your non-transactional data lake, made with Chalice.

## 3rd-party Python
Only the best.

- [3M Falcano](https://github.com/3mcloud/falcano) - DynamoDB ORM, allowing for single table designs. Successor to PynamoDB.
- [S3Fs](https://s3fs.readthedocs.io/en/latest/) - Use S3 like a filesystem.
- [PySide6](https://www.qt.io/blog/qt-for-python-6-released) - Official Qt module for Python.
- [Hy: A lisp written in Python](https://docs.hylang.org/en/master/tutorial.html) - A lisp that can you can use in your Python code, for FP.
- [Toolz: A set of utility functions for iterators, functions, and dictionaries](https://github.com/pytoolz/toolz) - FP primitives.
- [AWS Limit Checker](https://github.com/jantman/awslimitchecker) - Detect when you are about to run up against AWS limits.
- [Click](https://click.palletsprojects.com/en/7.x/) - Create a CLI.
- [Netflix Metaflow S3](https://github.com/Netflix/metaflow/blob/master/metaflow/datatools/s3.py) - Achieve 20 gigabit S3 throughput.
- [Slack Bolt](https://github.com/slackapi/bolt-python) - Enable AWS ChatOps with Slack's built-in Chalice support.
- [Troposphere](https://github.com/cloudtools/troposphere) - Write CloudFormation using Python.
- [PyCognito](https://github.com/pvizeli/pycognito) - Manage and use Cognito user pools.
- [mrjob](https://github.com/Yelp/mrjob) - Run MapReduce jobs on your EMR cluster.

## Tooling
Create diagrams, write code.

- [AWS Toolkit for PyCharm](https://aws.amazon.com/pycharm/) - Tightly integrated editor, for repl-driven development.
- [Anaconda Python Distribution](https://www.anaconda.com/products/individual/download-success) - Consistent Python environment for local dev.
- [Chalice + LocalStack](https://github.com/localstack/chalice-local) - Dev against local versions of DynamoDB, AWS Lambda, API Gateway, etc.
- [Cloudviz](https://cloudviz.io/) - Create diagrams in the official style.
- [CloudMoji™](https://cloudmoji.com/) - Has the 2021 AWS icon pack.

## Made with Chalice
Example GitHub repos.

- [Coworks Microframework](https://github.com/gdoumenc/coworks) - Based on Step Functions.
- [Agave: REST API for Chalice BluePrints](https://github.com/cuenca-mx/agave) - REST APIs for your managed routes.
- [aws-chalice-swagger](https://github.com/samuelkhtu/aws-chalice-swagger) - How to use Swagger support.
- [Lambda Multi-threading in Chalice](https://github.com/vumdao/multithread-in-lambda) - Map/reduce across your Lambda cores.
- [aws-chalice-boilerplate](https://github.com/GabrielTavares99/aws-chalice-boilerplate) - How to use `chalice.cli.CLIFactory`.
- [chalice_dockerized](https://github.com/vanderlvoff/chalice_dockerized) - Dockerize your application.
- [Chalice-GraphQL](https://github.com/jrbeilke/chalice-graphql) - Add a GraphQL API.
- [chalice-extended-action](https://github.com/jayef0/chalice-extended-action) - Deploy with GitHub Actions.
- [pytest-chalice](https://github.com/studio3104/pytest-chalice) - Py.test fixtures.
- [chalice-cognito-auth](https://github.com/stealthycoin/chalice-cognito-auth) - SSO with a Cognito user pool.

## Articles
Critical background reading.

- [Python support GA: improving Python code quality using Amazon CodeGuru Reviewer](https://aws.amazon.com/blogs/devops/python-support-ga-improving-python-code-quality-using-amazon-codeguru-reviewer/)
- [Amplify Flutter is Now Generally Available: Build Beautiful Cross-Platform Apps](https://aws.amazon.com/blogs/aws/amplify-flutter-is-now-generally-available-build-beautiful-cross-platform-apps/)
- [Using container images to run PyTorch models in AWS Lambda](https://aws.amazon.com/blogs/machine-learning/using-container-images-to-run-pytorch-models-in-aws-lambda/)
- [AWS Chalice adds support for the AWS CDK](https://aws.amazon.com/blogs/developer/aws-chalice-adds-support-for-the-aws-cdk/)
- [Packaging AWS Lambda functions as container images](https://acloudguru.com/blog/engineering/packaging-aws-lambda-functions-as-container-images)
- [New for AWS Lambda – 1ms Billing Granularity Adds Cost Savings](https://aws.amazon.com/blogs/aws/new-for-aws-lambda-1ms-billing-granularity-adds-cost-savings/)
- [Implementing version control using Amazon DynamoDB](https://aws.amazon.com/blogs/database/implementing-version-control-using-amazon-dynamodb/)
- [Introducing Middleware Stack in Modular AWS SDK for JavaScript](https://aws.amazon.com/blogs/developer/middleware-stack-modular-aws-sdk-js/)
- [How do I give internet access to a Lambda function that's connected to an Amazon VPC?](https://aws.amazon.com/premiumsupport/knowledge-center/internet-access-lambda-function/)
- [AWS Lambda Extensions: What are they and why do they matter](https://lumigo.io/blog/aws-lambda-extensions-what-are-they-and-why-do-they-matter/)
- [AWS Chalice now supports Amazon Kinesis and Amazon DynamoDB Streams](https://aws.amazon.com/blogs/developer/aws-chalice-now-supports-amazon-kinesis-and-amazon-dynamodb-streams/)
- [Using AWS Lambda Layers with AWS Chalice](https://aws.amazon.com/blogs/developer/using-aws-lambda-layers-with-aws-chalice/)
- [Following serverless best practices with AWS Chalice and Lambda Powertools](https://aws.amazon.com/blogs/developer/following-serverless-best-practices-with-aws-chalice-and-lambda-powertools/)
- [Automatically deploy a Serverless REST API from GitHub with AWS Chalice](https://aws.amazon.com/blogs/developer/automatically-deploy-a-serverless-rest-api-from-github-with-aws-chalice/)
- [Configuring custom domain names with AWS Chalice](https://aws.amazon.com/blogs/developer/configuring-custom-domain-names-with-aws-chalice/)
- [AWS Chalice Now Supports YAML Templates](https://aws.amazon.com/blogs/developer/aws-chalice-now-supports-yaml-templates/)
- [AWS Solutions Constructs – A Library of Architecture Patterns for the AWS CDK](https://aws.amazon.com/blogs/aws/aws-solutions-constructs-a-library-of-architecture-patterns-for-the-aws-cdk/)
- [Using Amazon EFS for AWS Lambda in your serverless applications](https://aws.amazon.com/blogs/compute/using-amazon-efs-for-aws-lambda-in-your-serverless-applications/)
- [Introducing the AWS Chalice test client](https://aws.amazon.com/blogs/developer/introducing-the-new-test-client-for-aws-chalice/)
- [Use Amazon DynamoDB Accelerator (DAX) from AWS Lambda to increase performance while reducing costs](https://aws.amazon.com/blogs/database/how-to-increase-performance-while-reducing-costs-by-using-amazon-dynamodb-accelerator-dax-and-aws-lambda/)
- [Painless AWS Chalice Application Debug](https://medium.com/cyberark-engineering/painless-aws-chalice-application-debug-90534e33cf76)
- [Modularizing a Chalice Application for Teams](https://medium.com/tensoriot/modularizing-a-chalice-application-for-teams-f716f496b94b)
- [Getting started with the AWS Cloud Development Kit and Python](https://aws.amazon.com/blogs/developer/getting-started-with-the-aws-cloud-development-kit-and-python/)
- [Run your Python Scripts as Slack Commands (ChatOps)](https://medium.com/@yogeshingale94/run-your-python-scripts-as-slack-commands-chatops-63bc334b74cd)
- [Building Serverless Python Apps Using AWS Chalice](https://realpython.com/aws-chalice-serverless-python/)

## AWS Serverless Architectures
Inspiration for your app. [Complete list of 500+ sample architectures](https://github.com/aws-samples?q=&type=&language=python&sort=).

- [AWS Glue ETL Code Samples](https://github.com/aws-samples/aws-glue-samples)
- [AWS Control Tower Account Creation Automation](https://github.com/aws-samples/aws-control-tower-automate-account-creation)
- [AWS Serverless Ecommerce Platform](https://github.com/aws-samples/aws-serverless-ecommerce-platform)
- [Recurring Security Hub Summary Email](https://github.com/aws-samples/aws-security-hub-summary-email)
- [SQS dead letter queue replay with backoff and jitter](https://github.com/aws-samples/amazon-sqs-dlq-replay-backoff)
- [Tokenization and Encryption of Sensitive Data](https://github.com/aws-samples/aws-serverless-tokenization)
- [AWS ParallelCluster serverless API](https://github.com/aws-samples/aws-parallelcluster-serverless-api)
- [Amazon WorkMail Lambda Templates](https://github.com/aws-samples/amazon-workmail-lambda-templates)
- [S3 Glacier Bulk Retrieval](https://github.com/aws-samples/s3-glacier-bulk-retrieval)
- [AutoML with AutoGluon, Amazon SageMaker, and AWS Lambda](https://github.com/aws-samples/automl-pipeline-with-autogluon-sagemaker-lambda)
- [Processing ML Workloads asynchronously in Batch using SageMaker Batch Transform](https://github.com/aws-samples/aws-asynchronous-ml-processing)
- [Serverless Tracking Pixel](https://github.com/aws-samples/aws-serverless-tracking-pixel)
- [Serverless Reference Architecture: Real-time File Processing](https://github.com/aws-samples/lambda-refarch-fileprocessing)
- [Serverless Reference Architecture: IoT Backend](https://github.com/aws-samples/lambda-refarch-iotbackend)
- [AWS X-Ray Serverless Samples](https://github.com/aws-samples/aws-xray-serverless-samples)

## AWS Labs
More inspiration from AWS Labs, closer to production-ready. [Complete list of 100+ Labs solutions](https://github.com/awslabs?q=&type=&language=python&sort=stargazers).

- [AWS Control Tower Customizations](https://github.com/awslabs/aws-control-tower-customizations)
- [Serverless Data Lake Framework (SDLF)](https://github.com/awslabs/aws-serverless-data-lake-framework)
- [Media Insights Engine](https://github.com/awslabs/aws-media-insights-engine)
- [Serverless Transit Network Orchestrator](https://github.com/awslabs/serverless-transit-network-orchestrator)
- [Amazon Aurora Postgres Advanced Monitoring](https://github.com/awslabs/amazon-aurora-postgres-monitoring)
- [AWS Serverless Twitter Event Source](https://github.com/awslabs/aws-serverless-twitter-event-source)
- [Serverless Subtitles](https://github.com/awslabs/serverless-subtitles)
- [AWS Serverless Financial Functions](https://github.com/awslabs/aws-serverless-financial-functions)

## Related Awesome Lists
- [Awesome IAM](https://github.com/kdeldycke/awesome-iam#readme)
- [Awesome CDK](https://github.com/kolomied/awesome-cdk#readme)
- [Awesome AWS](https://github.com/donnemartin/awesome-aws#readme)
- [Awesome Cloud Security](https://github.com/RyanJarv/awesome-cloud-sec#readme)
- [Awesome AWS Amplify](https://github.com/dabit3/awesome-aws-amplify#readme)
- [Awesome Amazon Alexa](https://github.com/miguelmota/awesome-amazon-alexa#readme)
- [Awesome EKS](https://github.com/realvz/awesome-eks#readme)
- [Awesome AWS Research](https://github.com/randyridgley/awesome-aws-research#readme)
- [AWSome Websites](https://github.com/StanForever/AWSome-websites)

repository: akashpayne/awesome-chalice

branch_name: refs/heads/main

repo_name: akashpayne/awesome-chalice


text:
# Quarantine Student Task Manager - Backend

## Official Frontend README
[Main README](https://github.com/python-final-project/quarantine-student-task-manager/blob/staging/README.md)

## Overview
* App to help parents manage their children's homework, websites, and associated passwords.

---

## Dependencies

---

## Authors
- Software Developer: Joseph Zabaleta
  - [Official Github](https://github.com/joseph-zabaleta)
- Software Developer: Jesse Pena
  - [Official Github](https://github.com/jpchato)
- Software Developer: Iris Leal
  - [Official Github](https://github.com/ilealm)

---

## License
This project is under the MIT License.

---

## Acknowledgements / Resources / Inspiration Links
- none

---

## Version History
- 1.0.0 20200708
  - Initial backend files were created 20200713

---

## Software Requirements

[Link to Software Requirements](requirements.md)

repository: python-final-project/qstm-backend

repo_name: python-final-project/qstm-backend


text:
# Network-Multitool
This is a multitool for container/network testing and troubleshooting. It was originally built with Fedora, but is now based on Alpine Linux. The container image contains lots of tools, as well as nginx web server, which listens on port 80 and 443 by default. The web server helps to run this container-image in a straight-forward way, so you can simply `exec` into the container and use various tools.

## Downloadable from Docker Hub:
* [https://hub.docker.com/r/praqma/network-multitool/](https://hub.docker.com/r/praqma/network-multitool/)  (Automated Build)

# Tools included:
* apk package manager
* Nginx Web Server (port 80, port 443) - customisable ports!
* wget, curl, iperf3
* dig, nslookup
* ip, ifconfig, mii-tool, route
* ping, nmap, arp, arping
* awk, sed, grep, cut, diff, wc, find, vi editor
* netstat, ss
* gzip, cpio
* tcpdump
* telnet client, ssh client, ftp client, rsync, tshark
* traceroute, tracepath, mtr
* netcat (nc), socat
* ApacheBench (ab)
* mysql client
* postgresql client
* jq
* git
* kafkacat

**Note:** The SSL certificates are generated for 'localhost', are self signed, and placed in `/certs/` directory. During your testing, ignore the certificate warning/error. While using curl, you can use `-k` to ignore SSL certificate warnings/errors.

# Configurable HTTP and HTTPS ports:
There are times when one may want to join this (multitool) container to another container's IP namespace for troubleshooting. This is true for both Docker and Kubernetes platforms. During that time if the container in question is a web server (nginx), then network-multitool cannot join it in the same IP namespace on Docker, and similarly it cannot join the same pod on Kubernetes. This is because network multitool also runs a web server on port 80 (and 443), and this results in port conflict on the same IP address. To help in this sort of troubleshooting, there are two envronment variables **HTTP_PORT** and **HTTPS_PORT** , which you can use to provide the values of your choice instead of 80 and 443. When the container starts, it uses the values provided by you/user to listen for incoming connections. Below is an example:

```
[kamran@kworkhorse network-multitool]$ docker run -e HTTP_PORT=1180 -e HTTPS_PORT=1443 -p 1180:1180 -p 1443:1443 -d local/network-multitool
4636efd4660c2436b3089ab1a979e5ce3ae23055f9ca5dc9ffbab508f28dfa2a

[kamran@kworkhorse network-multitool]$ docker ps
CONTAINER ID        IMAGE                     COMMAND                  CREATED             STATUS              PORTS                                                             NAMES
4636efd4660c        local/network-multitool   "/docker-entrypoint.…"   4 seconds ago       Up 3 seconds        80/tcp, <IP_ADDRESS>:1180->1180/tcp, 443/tcp, <IP_ADDRESS>:1443->1443/tcp   recursing_nobel
6e8b6ed8bfa6        nginx                     "nginx -g 'daemon of…"   56 minutes ago      Up 56 minutes       80/tcp                                                            nginx

[kamran@kworkhorse network-multitool]$ curl localhost:1180
Praqma Network MultiTool (with NGINX) - 4636efd4660c - <IP_ADDRESS>/16

[kamran@kworkhorse network-multitool]$ curl -k https://localhost:1443
Praqma Network MultiTool (with NGINX) - 4636efd4660c - <IP_ADDRESS>/16
[kamran@kworkhorse network-multitool]$
```

If these environment variables are absent/not provided, the container will listen on normal/default ports 80 and 443.

repository: davizucon/Network-MultiTool

repo_name: davizucon/Network-MultiTool


text:
# Component Mapper

A library to map one component onto another. Used to port UI libraries to BlueBase.

## Docs

- [API Docs](https://bluebasejs.github.io/plugin-material-ui/)

repository: BlueBaseJS/component-mapper

gha_language: TypeScript

repo_name: BlueBaseJS/component-mapper


text:
# Airlift

[![Build Status](https://img.shields.io/travis/poise/airlift.svg)](https://travis-ci.org/poise/airlift)
[![Gem Version](https://img.shields.io/gem/v/airlift.svg)](https://rubygems.org/gems/airlift)
[![Coverage](https://img.shields.io/codecov/c/github/poise/airlift.svg)](https://codecov.io/github/poise/airlift)
[![Gemnasium](https://img.shields.io/gemnasium/poise/airlift.svg)](https://gemnasium.com/poise/airlift)
[![License](https://img.shields.io/badge/license-Apache_2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)

A transport abstraction layer for running commands and manipulating files over
SSH, WinRM, and more.

## Quick Start

```ruby
require 'airlift'

# Create a connection.
conn =<EMAIL_ADDRESS># Run a command.
puts conn.execute!('uname -a').stdout
# Get the content of a file.
puts conn.file('/etc/motd').content
# Upload a file.
conn.file('/tmp/config.rb').upload('config.rb')
```

## `Airlift.connect`

To create a connection object, use `Airlift.connect`. You can specify either
a connection URI, a hash of options, or both. When using the URI style the
scheme will be used as the connection plugin name; the URI's hostname, port,
username, and password will be used as their relevant field, and the query
string will be parsed for additional key/value pairs.

```ruby
# Example of URI style.
<EMAIL_ADDRESS># Example of hash style.
Airlift.connect(name: 'ssh', user: 'me', password: 'secret', host: 'example.com')
```

When using the hash style, if no explicit plugin name is given it will default
to `ssh` if a host if provided or `local` if it is not.

`Airlift.start` can also be passed a block, in which case the connection will
be closed automatically.

```ruby
Airlift.connect('ssh://coderanger.net') do |conn|
  # ...
end
```

## `Airlift::Connection`

The connection object is the core interface to working with the remote system.
The two main methods on it are `command(cmd)` for creating `Airlift::Command` objects
and `file(path)` for creating `Airlift::File` objects.

For convenience two other command methods are provided, `execute(cmd)` will
create a command object and immediately run it, and `execute!(cmd)` will create
a command object, run it, and raise an exception if it fails.

You can use the `tempfile()` method to create a temporary file or directory.

## `Airlift::Command`

The command object contains information about a single command, the parameters
it will be run with and the results of running it. It matches the API of
[`Mixlib::ShellOut`](https://github.com/chef/mixlib-shellout) but some of the
options are not supported (`domain`, `password`, `user`, `group`, `umask`,
and `login`).

Use `conn.command('command to run', options)` to create a new command object.
Once you have the object, call `cmd.run_command` to actually run it and then
you can look in `cmd.stdout`, `cmd.stderr`, and `cmd.exitstatus` for the results.

Additional options on top of the standard `ShellOut` API:
* `sudo` – Boolean for if the command should be run using sudo. *(default:
  connection-level configuration)*
* `sudo_password` – Password for sudo. _NOT IMPLEMENTED_
* `pty` – Request a PTY for the command. *(default: true)*

## Sponsors

Development sponsored by [Bloomberg](http://www.bloomberg.com/company/technology/).

The Poise test server infrastructure is sponsored by [Rackspace](https://rackspace.com/).

## License

Copyright 2016, Noah Kantrowitz

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

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

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

repository: ljsc/airlift

repo_name: ljsc/airlift


text:
# Console Shuffle
A simple Windows implementation of Brian Barto's [No More Secrets](https://github.com/bartobri/no-more-secrets)

## Build
No extra library needed. All Windows compilers (Mingw or MSVC) should work.
```
# Mingw
g++ -o shuffle shuffle.cpp -O2 -Wall -Wextra -pedantic
# MSVC
cl /D _CRT_SECURE_NO_WARNINGS /W4 /O2 shuffle.cpp
```

## Feature
The program "encrypts" the current screen buffer of the console and displays it on the screen. It pauses until you press enter to start the decryption. Once it is done, press enter again to exit.
```
dir & shuffle
```

## Command Line Options
`-a` flag eliminates the need to press a key to start the decryption.

`-e` and `-d` flags change the color of the encrypted and decrypted text respectively. The operand after these two flags is the same as in `COLOR` command of command prompt. By default, encrypted text is in white while decrypted text is in light blue, default background color is black.
```
shuffle -e 07 -d 01 # this is the same as default setting
shuffle -d 0E       # change decrypted text to light yellow with black background
```
Confused? Try `COLOR /?`.

## Limitation
Only works with Ascii code.

repository: rongjiecomputer/console-shuffle

repo_name: rongjiecomputer/console-shuffle


text:
---
title: Container Architecture
category: Developers
order: 2.1
toc: false
---

The following text-diagram shows the inheritance hierarchy of the ESGF Docker containers:

```
centos:6 -> esgf-postgres

nginx -> esgf-proxy

solr:5.5 -> esgf-solr

alpine -> esgf-configure

python:2.7-slim -> esgf-django -> esgf-auth
                               -> esgf-cog
                               -> esgf-slcs

openjdk:8-jre -> tomcat:8 -> esgf-tomcat -> esgf-idp-node
                                         -> esgf-index-node
                                         -> esgf-orp
                                         -> esgf-tds
```

## Configuration

A big effort has been made to make each container capable of configuring itself
using environment variables. Each container image includes a copy of all the
configuration files it requires to start. Some of these configuration files are
"static", i.e. they do not depend on environment variables, and others are
"templates", where values from environment variables are substituted in at runtime.
If an environment variable is required but not given, the container will fail to start.

Individual configuration files or templates can be replaced by mounting in an
alternative, for example to specify other members in a federation. However, the
containers are all capable of configuring themselves in a "standalone"
configuration, i.e. without any other federation members, without mounting anything.

## Build and "mixin" images

Build and "mixin" images both make use of the same capability in different
ways - namely the ability of the
[COPY statement](https://docs.docker.com/engine/reference/builder/#copy) in a
Dockerfile to accept a `--from` argument. The `--from` argument allows for the
copying of files from another container image or build stage without inheriting
from that image.

### Build images

Build images make use of the fact that Dockerfiles allow multiple `FROM`
statements to be used in the process of building an image. Each `FROM` statement
represents a new stage in the building of the final image. Images can pull in
files from previous stages using the `COPY --from=<build-stage>` syntax. This
allows us to install the minimum amount of software required to run an application
in the final image, reducing container bloat and potential attack surface.

A build image can include dependencies that are only required when building
that are not required in the final image - for example, the build image for the
[esgf-slcs](https://github.com/cedadev/esgf-docker/blob/master/slcs/Dockerfile)
installs `build-essential` (for GCC) and the header files for OpenSSL, neither
of which are required to actually run the application. The resulting
[Python wheels](https://pythonwheels.com/) are copied into the application image,
where they are installed.

### "Mixin" images

Mixin images are images that are never intended to be run, and exist purely
as a way to share files with other images using the `COPY --from=<image>` syntax.
This is mainly to work-around the fact that Docker does not allow symlinks in a
build context.

In particular, the `esgf-configure` container is a mixin container, that exists
purely to allow other images to `COPY` the default templates for `/esg/config`
and some useful scripts.

repository: yarden-livnat/esgf-docker

repo_name: yarden-livnat/esgf-docker


text:
---
layout: default
---

# 1996-09-16 - RE: Workers Paradise. /Political rant.

## Header Data

From<EMAIL_ADDRESS>To<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)

Message Hash: 4b5310415173a6ba6df213f88a8823b017dab60c0e91d1e13529f4530ae57ca9

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-09-16 17:30:57 UTC

Raw Date: Tue, 17 Sep 1996 01:30:57 +0800

## Raw message

```
{% raw  %}From<EMAIL_ADDRESS>Date: Tue, 17 Sep 1996 01:30:57 +0800
To<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)
Subject: RE: Workers Paradise. /Political rant.
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

<EMAIL_ADDRESS>(Timothy C. May) writes:
> Crypto Anarchy means getting rid of deadwood the old-fashioned way.

<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM) wrote:
>Starting with the lying old fart himself.

You shouldn't be so hard on Tim. I tried giving up farting years ago but I found
I gained a lot of weight. It's also become more socially acceptable as evidenced
by the new farting section in many English pubs. They even have a special
section for me on some international flights. And unlike smoking, you *can* do
it in the toilet. Besides, it can't be worse than smoking. Unless, perhaps, you
do both at the same time...

Cheers,
James

{% endraw %}
```

## Thread

+ Return to [September 1996](/archive/1996/09)

+ Return to<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)](/authors/dlv_at_bwalk_dm_com_dr_dimitri_vulis_kotm_)"
+ Return to "[jbugden@smtplink.alis.ca](/authors/jbugden_at_smtplink_alis_ca)"

+ 1996-09-16 (Tue, 17 Sep 1996 01:30:57 +0800) - RE: Workers Paradise. /Political rant. -<EMAIL_ADDRESS>  + 1996-09-16 (Tue, 17 Sep 1996 07:58:52 +0800) - [RE: Workers Paradise. /Political rant.](/archive/1996/09/f21d2f1b44f56e30cfa2ff7f977fae28950e8bff4eeae9362921454e223e5f52) -<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)_


text:
     Note: Starting with v0.12.0, Prometheus Operator requires use of Kubernetes v1.7.x and up.

# Running Exporters
Running exporters and scraping them with Prometheus configured by the prometheus-operator.

## The goal of ServiceMonitor(s)
The goal for one ServiceMonitor should be to cover a large number of `Service`s.
This can be achieved by creating a generic `ServiceMonitor`.

## Create a service that exposes Pod(s)
For scraping an exporter or separate metrics port you need a service that targets the pod(s) of the exporter or application.
An example for the `kube-state-metrics` is the below `Service` and a generic `ServiceMonitor` that covers more than just the `kube-state-metrics` `Service`.
After you have created the `Service`, you then continue on by creating the `ServiceMonitor` for it.
The order in which the `Service` and `ServiceMonitor` is created is not important.

### `kube-state-metrics` Service example
```
apiVersion: v1
kind: Service
metadata:
  labels:
    app: kube-state-metrics
    k8s-app: kube-state-metrics
  annotations:
    alpha.monitoring.coreos.com/non-namespaced: "true"
  name: kube-state-metrics
spec:
  ports:
  - name: http-metrics
    port: 8080
    targetPort: metrics
    protocol: TCP
  selector:
    app: kube-state-metrics
```
This Service targets all pods with the label `k8s-app: kube-state-metrics`.

## Create a matching ServiceMonitor
### Generic `ServiceMonitor` example
```
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
  name: k8s-apps-http
  labels:
    k8s-apps: http
spec:
  jobLabel: k8s-app
  selector:
    matchExpressions:
    - {key: k8s-app, operator: Exists}
  namespaceSelector:
    matchNames:
    - kube-system
    - monitoring
  endpoints:
  - port: http-metrics
    interval: 15s
```
(A better example for monitoring Kubernetes cluster components can be found [User Guide "Cluster Monitoring"](cluster-monitoring.md))
This ServiceMonitor targets **all** Services with the label `k8s-app` (`spec.selector`) any value, in the namespaces `kube-system` and `monitoring` (`spec.namespaceSelector`).

## Troubleshooting
### Namespace "limits"/things to keep in mind
See the ServiceMonitor Documentation:
> While `ServiceMonitor`s must live in the same namespace as the `Prometheus`
resource, discovered targets may come from any namespace. This is important to allow
cross-namespace monitoring use cases, e.g. for meta-monitoring. Using the
`namespaceSelector` of the `ServiceMonitorSpec`, one can restrict the
namespaces the `Endpoints` objects are allowed to be discovered from.

repository: DalavanCloud/kafka-trigger

repo_name: DalavanCloud/kafka-trigger


text:
# NodeJS-Hall-Booking-API
We have created Backend API opened with multiple test API endpoints for frontend to create a room, create a booking, view all rooms with booking details and view all bookings.

**Backend Server hosted at :** [https://hall-bookingapi.herokuapp.com/](https://hall-bookingapi.herokuapp.com/)

**API documentation availble at  :** [https://documenter.getpostman.com/view/11361344/TVeiEr3h](https://documenter.getpostman.com/view/11361344/TVeiEr3h)


text:
---
title: "Saint Bede"
author: glennji
date: 2019-01-01T13:44:34+10:00
draft: false
type: note
crosslink: "true"
categories:
  - History
  - Religion
---
Saint Bede, or "Bede the venerable" (Latin: Bēda Venerābilis), was a Benedictine monk (CE 672/3-735) at the monastery of St. Peter and its companion monastery of St. Paul in the Kingdom of Northumbria of the Angles (contemporarily Monkwearmouth–Jarrow Abbey in Tyne and Wear, England) who gained the title "The Father of English History" for his authorship of the Ecclesiastical History of the English People. (Interesting to me: "Monkwearmouth" refers to the Wear river; a nearby area was known as "Bishopwearmouth". Modern day Sunderland.)

repository: glennji/website

gha_language: HTML

repo_name: glennji/website


text:
# [ESL](https://exadel-inc.github.io/esl/) Media Query Utils

Version: *2.0.0*

Authors: *Alexey Stsefanovich (ala'n)*, *Yuliya Adamskaya*, *Julia Murashko*

ESL Media Query is an extended browser MediaQueryList object and related utils.
In addition to native Media Features, ESL Media Query allows special *shortcuts* to simplify syntax and query usage.
ESLMediaQuery is more tolerant to logical operations and allows using of multiple 'not' operators or
having extra conditions inside the query (`all and all` still a valid condition).

### Supported ESL Media Query features

- Native [Media Query Features](https://www.w3.org/TR/css3-mediaqueries/#media1)
  (e.g. `(min-wigth: 300px)`, `(orientation: landscape)`, `(min-wigth: 300px) and (orientation: landscape)`).
- Shortcuts for DPR (Device Pixel Ratio) detection
  Syntax `@x<dpr_value>` (e.g. `@x1`, `@x2`, `@x1.5`).
- Can block queries with DPR value greater than 1 for PageSpeedBots.
- Screen breakpoints shortcuts (e.g. `@XS`, `@md`, `@+LG`, `@-MD`)
  Supports breakpoints declared in [ESLScreenBreakpoints](#breakpoints) registry.
  Accepts modifiers like `+` for upper breakpoints and `-` for lower breakpoints.
- Device and browser detection shortcuts that are registered through [ESLEnvShortcuts](#shortcuts) registry.
  The list of predefined environment shortcuts is the following:
  - `@BOT` - detects search/pagespeed bots
  - `@MOBILE` - detects mobile devices
  - `@DESKTOP` - detects desktops
  - `@ANDROID` - detects Android devices
  - `@IOS` - detects iOS devices
  - `@TOUCH` - cross-browser touch support detection
  - `@IE` - detects InternetExplorer 11
  - `@EDGE` - detects legacy Edge browser (<18) based on EdgeHTML engine
  - `@GECKO` - detects Gecko engine based browsers (e.g. Firefox)
  - `@BLINK` - detects Blink engine based browsers (e.g. Google Chrome, Opera)
  - `@SAFARI` - detects safari browsers
  - `@SAFARI-IOS` - detects mobile safari browsers
- `or` operation alias in addition to `,` (`@xs or @mobile` is the same as `@xs, @mobile`)
- Multiple `not` operators, that is not sensitive to position
  (e.g. `not @ie`, `not @xs and not @mobile`)
---

### ESLScreenBreakpoints

ESLScreenBreakpoints is a custom screen breakpoints registry. It allows defining a named screen width range.

Use `ESLScreenBreakpoints.add` static method to change default or define your own Screen Breakpoint.

You can also use `ESLScreenBreakpoints.remove` to exclude breakpoint shortcut from registry.

You can get all available screen breakpoints through `ESLScreenBreakpoints.names` property or access full breakpoint
definition through `ESLScreenBreakpoints.get`.

---

### ESLScreenDPR

Additional preprocessor to provide DPR shortcuts.

Use `ESLScreenDPR.ignoreBotsDpr` marker to enable DPR ignoring for PageSpeed Bots.

---

### ESLEnvShortcuts

ESLEnvShortcuts is a simple registry for a static shortcuts to describe environment related conditions

An additional shortcuts can be added to the registry through `ESLEnvShortcuts.add` method
ESLEnvShortcuts allows adding boolean result that will be converted to `all` / `not all` query conditions or setup result as native MediaQuery string.

Environment shortcuts can be removed with `ESLEnvShortcuts.remove` method.

---

### ESLMediaQuery

ESLMediaQuery is a central API to create an extended Media Query conditions.

 - Use `ESLMediaQuery.for('query')` to create ESLMediaQuery condition.
   Note: method `ESLMediaQuery.for` is memoized so multiple calls with the same query will return the same query
   instance as the result, which also means you might not need store or optimize ESLMediaQuery.for calls from your side.

 - Use `ESLMediaQuery.from('query')` to create new ESLMediaQuery condition instance.
   Not memoized in opposite to `ESLMediaQuery.for`;

 - Use `ESLMediaQuery.use` to register custom query preprocessor.
   Note: `ESLScreenBreakpoints`, `ESLScreenDPR`, `ESLEnvShortcuts` are three preprocessors that are registered by default.

Note: ESLMediaQuery has no real instances and represents `IMediaQueryConditionInterface` interface.
`IMediaQueryConditionInterface` is implemented by 4 types of inner conditions:
  - `MediaQueryConstCondition` with only two possible instances `ALL` and `NOT_ALL`
  - `MediaQueryCondition` - simple wrapper around native MediaQueryList object
  - `MediaQueryConjunction` - `and` condition container
  - `MediaQueryDisjunction` - `or' condition container

The `ESLMediaQuery`(`IMediaQueryConditionInterface`) instances provide the following set of properties and methods:
  - `matches` - boolean getter that returns if the current environment configuration is acceptable for current query condition
  - `addListener(cb)` - to subscribe on condition state changes
  - `removeListener(cb)` - to unsubscribe from condition state changes
  - `optimize` - inner method to rebuild condition tree, and provide static and logic expression optimization.

---

### ESLMediaRule

Pair of ESLMediaQuery and payload value.
ESLMediaRule is used as an item for [ESLMediaRuleList](#eslmediarulelist).
ESLMediaRule can be parsed from `<ESL Media Query> => <value>` syntax string,
e.g. `@XS => 1` (`1` is a payload) or `@+LG and @DESKTOP => desktop` (`'desktop'` is a payload).

---

### ESLMediaRuleList

ESLMediaRuleList is a [ESLMediaRule](#eslmediarule) collection.
ESLMediaRuleList has methods to work with the whole rules list.
It implements an observable interface, so you can observe active value changes.

ESLMediaRuleList can be parsed from `<default_value> | <ESL Media Rule> | <ESL Media Rule>` string.

ESLMediaRuleList should be generalized with the result value type and according payload parser.
- `ESLMediaRuleList.STRING_PARSER` - out of the box string payload parser.
- `ESLMediaRuleList.OBJECT_PARSER` - out of the box object payload parser (uses evaluation).

Examples:
- ` 1 | @XS => 2` - the RuleList result depends on environment and equals '1' on all screen breakpoints except XS,
  on XS it changes to '2'.

- ` @XS => {option: 1} | @+SM => {option: 2}` - the RuleList result depends on environment and equals `{option: 1}`
  on XS breakpoint, and equals `{option: 2}` on SM and upper breakpoints.

repository: rtkimz/esl

repo_name: rtkimz/esl


text:
# Format conversion
This program can convert between our representation and the standard penn treebank structure.
Below our representation is refered to as 'shp' for 'split head parse'.
The simplest way to run it is:

PTB -> SHP
```Shell
python reprint_trees.py -i p -o hr -e hj0 -h j1 < input_data.ptb
```

SHP -> PTB
```Shell
python reprint_trees.py -i h -o o -e he < input_data.shp
```

# Other conversions
The program has a range of options for conversions (in each case the character in brackets is what should be used).
There are six options, each with various arguments:

- Input, `-i [ (p)enn treebank | (c)onll | split (h)ead ]`
- Output, `-o [ (s)ingle_line [ with (t)races] | (m)ulti_line [with (t)races] | (o)riginal ptb | (t)ex | (w)ords | (o)ntonotes | (p)os tagged | split (h)ead [with (r)everesed null-null] | (d)ependencies ]`
- Edits, `-e [ remove (t)races, remove (f)unction tags, apply (c)ollins rules, (h)omogenise top, remove trivial (u)naries, right (b)inarise coordination, cc(k)-style binarise coordination, remove (e)xtra coordination nodes, (j)kk-style coordination[0-6], redirect (g)apping ]`
- Head rules, `-h [ (c)ollins | (p)ennconverter | (t)iger | (j)kk[0-5] ]`
- Gold input, `-g <gold filenmae>` (can be used by the tex output)
- Length limit, `-l [ number ]` (will leave out sentences longer than this)

Note - not all of these have been thoroughly tested.
The options I have used least are conll input, and output to tex, ontonotes, and dependencies.

For edits, the seven types of coordination we define (j[0-6]) are:

0. `(A  ,  B  ,  C  and  D)`
1. `(A (, B (, C (and D))))`
2. `(A , (B , (C and D)))`
3. `(A (, B) (, C) (and D))`
4. `((((A ,) B ,) C and) D)`
5. `(((A , B) , C) and D)`
6. `((A ,) (B ,) (C and) D)`

For head rules, the six variants we define (j[0-5]) change the head in coordination:

0. First non-punctuation
1. First conjunction
2. First non-punctuation non-conjunction
3. Last non-punctuation
4. Last conjunction
5. Last non-punctuation non-conjunction

license: ISC


text:
## Breast Cancer Prediction

---
Breast cancer is one of the most common types of cancer in the UK. According to NHS, about 1 in 8 women are diagnosed with breast cancer during their lifetime, and early detection will significantly increase the chance of recovery.

### Goal: train machine learning models to predicts whether the cancer is benign or malignant based on a digital scan of the tumour cells.

---

The dataset used in this story is publicly available and was created by Dr. William H. Wolberg, physician at the University Of Wisconsin Hospital at Madison, Wisconsin, USA. To create the dataset Dr. Wolberg used fluid samples, taken from patients with solid breast masses and an easy-to-use graphical computer program called Xcyt, which is capable of perform the analysis of cytological features based on a digital scan. The program uses a curve-fitting algorithm, to compute ten features from each one of the cells in the sample, than it calculates the mean value, extreme value and standard error of each feature for the image, returning a 30 real-valuated vector.

The mean, standard error and “worst” or largest (mean of the three largest values) of these features were computed for each image, resulting in 30 features. For instance, field 3 is Mean Radius, field 13 is Radius SE, field 23 is Worst Radius.

### Data exploration and feature engineering: involved data cleaning, i.e. handling of null values, checking class distribution and exploring collinearity in the dataset.

The final dataset included 9 variables: concave points_worst, radius_se, texture_worst, smoothness_worst, symetry_worst, concave points_se, symetry_mean, franctal_dimension_worst, compactness_se and diagnosis.

Due to the nature of the problem requiring to build a model which can classify the nature of the tumour as benign or malignant, we concluded that the most suitable ML algorithm is a classification one.

Considering that each record in the data was already labelled with the diagnosis, malignant(M) vs benign (B), we decided to experiment with supervised ML algorithms. Classification models used: logistic regression, decision tree, random forest, svm and Adaboost.

The data was split into training data (80% of the entire data set) and test data (20% of the entire data set).

### Evaluation metrics:

Confusion Matrix

A confusion matrix is a summary of prediction results on a classification problem. The number of correct and incorrect predictions are summarized with count values and broken down by each class. A confusion matrix helps us gain an insight into how correct our predictions were and how they hold up against the actual values. The four values are true positive (predicted yes and actually was yes), true negative (predict no and actually was no), false positive (predicted yes and actually was no) and false negative (predicted no and actually was yes).

Confusion matrix for logistic regression:

![log-regression-confusion-matrix](https://raw.githubusercontent.com/puczilka/Breast-cancer-prediction/master/reports/figures/log-regression-confusion-matrix.png)

Accuracy, precision, recall and F-1 score metrics were used to assess the performance of the models applied to the pre-processed breast cancer image data.

Accuracy and precision are two important factors to consider when taking data measurements. Both accuracy and precision reflect how close a measurement is to an actual value, but accuracy reflects how close a measurement is to a known or accepted value, while precision reflects how reproducible measurements are, even if they are far from the accepted value.

* Accuracy is the ratio of the total number of correct predictions and the total number of predictions.
* Precision is the ratio between the True Positives and all the Positives. For our problem statement, that would be the measure of patients that we correctly identify having breast cancer out of all the patients actually having it.
* Recall is the measure of our model correctly identifying True Positives. Thus, for all the patients who actually have breast cancer, recall tells us how many we correctly identified as having a cancer.
* F1-score is the Harmonic mean of the Precision and Recall.

The ROC curve is a graphical plot that illustrates the diagnostic ability of a binary classifier system as its discrimination threshold is varied.

We plotted the ROC curce to assess the performce of the models as seen below. Area under the curve (AUC) represents degree or measure of separability. It tells how much model is capable of distinguishing between classes. Higher the AUC, better the model is at predicting 0s as 0s and 1s as 1s. By analogy, Higher the AUC, better the model is at distinguishing between patients with disease and no disease.

### Results:

![roc-curve](https://raw.githubusercontent.com/puczilka/Breast-cancer-prediction/master/reports/figures/roc-curve.png)

Highest recall, precision and F1-score: Logistic regression

Best AUC: SVM 0.87, this means that the model will be able to distinguish the patients with breast cancer and those without 87% of the time.

|Model|Precision|Recall|F-score|
|-------------------|---------|-------|--------|
|Logistic regression|0.973719|0.973684|0.973621|
|Decision Tree|0.903367|0.903509|0.902763|
|Random Forest|0.956905|0.956140|0.955801|
|SVM|0.956905|0.956140|0.955801|
|Boosted Decision Tree|0.912281|0.912281|0.912281|

### Conclusion:

Logistic regression model applied to a dataset of 8 characteristics derived from a tumour image aid to reconfirm malignant diagnosis, adding evidence to doctors' diagnosis of cancer.

Project Organization
------------

    ├── LICENSE
    ├── Makefile           <- Makefile with commands like `make data` or `make train`
    ├── README.md          <- The top-level README for developers using this project.
    ├── data
    │   ├── external       <- Data from third party sources.
    │   ├── interim        <- Intermediate data that has been transformed.
    │   ├── processed      <- The final, canonical data sets for modeling.
    │   └── raw            <- The original, immutable data dump.
    │
    ├── docs               <- A default Sphinx project; see sphinx-doc.org for details
    │
    ├── models             <- Trained and serialized models, model predictions, or model summaries
    │
    ├── notebooks          <- Jupyter notebooks. Naming convention is a number (for ordering),
    │                         the creator's initials, and a short `-` delimited description, e.g.
    │                         `1.0-jqp-initial-data-exploration`.
    │
    ├── references         <- Data dictionaries, manuals, and all other explanatory materials.
    │
    ├── reports            <- Generated analysis as HTML, PDF, LaTeX, etc.
    │   └── figures        <- Generated graphics and figures to be used in reporting
    │
    ├── requirements.txt   <- The requirements file for reproducing the analysis environment, e.g.
    │                         generated with `pip freeze > requirements.txt`
    │
    ├── setup.py           <- makes project pip installable (pip install -e .) so src can be imported
    ├── src                <- Source code for use in this project.
    │   ├── __init__.py    <- Makes src a Python module
    │   │
    │   ├── data           <- Scripts to download or generate data
    │   │   └── make_dataset.py
    │   │
    │   ├── features       <- Scripts to turn raw data into features for modeling
    │   │   └── build_features.py
    │   │
    │   ├── models         <- Scripts to train models and then use trained models to make
    │   │   │                 predictions
    │   │   ├── predict_model.py
    │   │   └── train_model.py
    │   │
    │   └── visualization  <- Scripts to create exploratory and results oriented visualizations
    │       └── visualize.py
    │
    └── tox.ini            <- tox file with settings for running tox; see tox.readthedocs.io

--------

Project based on the cookiecutter data science project template. #cookiecutterdatascience

repository: puczilka/Breast-cancer-prediction

repo_name: puczilka/Breast-cancer-prediction


text:
# Billing Android
Billingandroid is an Android library for dealing with Google Play Billing. It provides abstraction layer over Google billing that will make it easier for you to implement buying and consuming items.

## Usage

Usage differens depending on whether you use it with or without Netigen Android Api. But general rules are the same.

You need to add this dependency to your build.gradle:

```Groovy
implementation 'com.github.netigenkluzowicz:billingandroid:1.1.0'
```

Here's example of usage with Netigen Api base activities:

### Splash

Your Splash activity should extends BaseSplashActivity implements PurchaseListener

```Java
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        paymentManager = (PaymentManager) PaymentManager.createIPaymentManager(this);
        paymentManager.isItemPurchased(SKU_STRING_HERE, this);
    }
```

BaseSplashActivity method isNoAdsPaymentAvailable should return true for no ads payment to work properly:

```Java
@Override
    public boolean isNoAdsPaymentAvailable() {
        return true;
    }
```
You should also override clickPay method and initiate purchase in there:

```Java
    @Override
    public void clickPay() {
        paymentManager.initiatePurchase(Const.NO_ADS_SKU, this, this);
    }
```

Lastly implementation of these 3 methods should look like this:

```Java
    @Override
    public void onItemBought(String sku) {
        onNoAdsPaymentProcessingFinished(true);
    }

    @Override
    public void onPaymentsError(String errorMsg) {
        onNoAdsPaymentProcessingFinished(false);
    }

    @Override
    public void onItemNotBought(@Nullable String sku) {
        onNoAdsPaymentProcessingFinished(false);
    }
```

### Other Activities

Every Activity that should react on no ads bought should:

```Java
MainActivity extends BaseBannerActivity implements PurchaseListener {
```
In onCreate method you should check if no ads item was bought:

```Java
@Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        paymentManager = (PaymentManager) PaymentManager.createIPaymentManager(this);
        paymentManager.isItemPurchased(SKU_STRING_HERE, this);
    }
```

Lastly implementation of these 3 methods should look like this:

```Java
    @Override
    public void onItemBought(String sku) {
        turnOffAds();
    }

    @Override
    public void onPaymentsError(String errorMsg) {
        //show error message to user
    }

    @Override
    public void onItemNotBought(@Nullable String sku) {
        //item was not bought
    }
```

Any button that should start billing flow for buying no ads should contain this line:

```Java
paymentManager.initiatePurchase(Const.NO_ADS_SKU, this, this);
```

To avoid memory leaks every activity that uses PaymentManager should override its onDestroy method:

```Java
    @Override
    public void onDestroy() {
        paymentManager.onDestroy();
        super.onDestroy();
    }
```

### Testing

Fake visa - "android.test.purchased"

repository: netigenkluzowicz/billingandroid

gha_language: Java

repo_name: netigenkluzowicz/billingandroid


text:
# Feed Reader Test Suite
Explore the test-driven development world with Jasmine. This project adds a suite of test cases for Udacity's feed reader application.

## Table of Contents
* [Installation and Run](#installation-and-run)
* [Creator](#creator)
* [Copyright and License](#copyright-and-license)

## Installation and Run
* Clone repository: `git clone https://github.com/brianquach/feedreader-test-suite.git` or download the zip [here](https://github.com/brianquach/feedreader-test-suite/archive/master.zip).
* Navigate to the directory where you cloned the repo or unzipped the file.
* Use your favorite browser to open `index.html`.

## Creator
**Brian Quach**
* <https://github.com/brianquach>
* <http://bkquach.com>

## Copyright and License
Code copyright 2017 Brian Quach. Code released under the [MIT license](https://github.com/brianquach/feedreader-test-suite/blob/master/LICENSE).

repository: brianquach/feedreader-test-suite

repo_name: brianquach/feedreader-test-suite


text:
# Readux

A ClojureScript library to facilitate predictable state state management for
your reagent-based web-apps. Conceptually, Readux is a reimplementation of the
[redux](http://redux.js.org) library.

Please see [the docs](https://readux.github.io) for more information.

## License

Copyright © 2016 Jesper Wendel Devantier

Distributed under the MIT License. By submitting a pull request for
this project, you agree to license your contribution under the MIT
license to this project.

repository: readux/readux

repo_name: readux/readux


text:
---
layout: post
title: When tests are acting strange and you can't figure out what's wrong...
date: '2010-03-25'
tags:
  - bug
  - class
  - code
  - dumb
  - test
obsolete: true
---

Check that you didn't copy / paste / didn't change the test class definition line.

example:

My BlogPost class was mis-titled...

```ruby
class FundastacheSiteTest < Test::Unit::TestCase
...
```

There went an hour...

license: Unlicense,MIT

repository: funkfinger/blog

detected_licenses: Unlicense MIT

gha_language: JavaScript

gha_license_id: Unlicense

repo_name: funkfinger/blog


text:
# hello
:wrench: hello world in Golang.

[![
* Systray icon [Sheet of Paper icon](https://icons8.com/icons/set/sheet-of-paper--v1) is made by [Icons8](https://icons8.com).

repository: genzj/goTApaper

gha_language: Go

repo_name: genzj/goTApaper


text:
+++
# Date this page was created.
# date = "2016-04-27"

# Project title.
title = "Avadhuta"

# Project summary to display on homepage.
summary = "A Wayfinding tool for indoor tracking"

# Optional image to display on homepage (relative to `static/img/` folder).
# image_preview = "singing.png"

# Optional image to display on project detail page (relative to `static/img/` folder).
# image = ""

# Tags: can be used for filtering projects.
# Example: `tags = ["machine-learning", "deep-learning"]`
tags = ["wayfinding"]

# Optional external URL for project (replaces project detail page).
# external_link = ""

# Does the project detail page use math formatting?
# math = false

+++
Avadhuta: a way finding solution for indoor environments was developed by my team at Singapore-India Hackathon held at Nanyang Technlogical University. The motivation to design this system was to resolve the issue of finding locaton of any department inside a building.
The Global Positioning System (GPS) does not work in indoor environments.
Also, Wi-Fi Received Signal Strength(RSSI) indicator data is unreliable in Non-line of sight conditions.
To resolve this issue, our system used GPS data outdoors and integrated indoor tracking into it. To map the indoor radiation patterns of Wi-Fi signals in each building, a machine learning technique was used. Our GUI provides a provision for scanning QR codes located at selected landmarks.
It can also give directions to the user through the pictures taken by the mobile phone using image processing and pattern recognition.
The main advantage of our system is that we didn't use extra hardwares for indoor tracking except for the QR codes placed at some landmarks.
Our system also considered the obstructions in the Wi-Fi signals by concrete walls and partitions by training a system.
In the absence of Wi-Fi signals, we got other options like
QR codes,
Image Processing from mobile camera,
Sound signatures to verify the correctness of path.

repository: shraddha-hna/Shraddha-academic

path: /content/project/way finding/index.md

repo_name: shraddha-hna/Shraddha-academic


text:
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: avinashpaliwal

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
e.g.
1. Run cells in train.ipynb
2. Set parameters to ____
3. Error/Abnormal behavior

**Expected behavior**
A clear and concise description of what you expected to happen.

**Interpolated results/error output**
Add frames or terminal output as applicable.

**Desktop (please complete the following information):**
 - OS: [e.g. Windows, Ubuntu]
 - Device Used [CPU/GPU]
 - Setup Info [e.g. PyTorch 0.4.1, Python 3.6, ]

**Additional context**
Add any other context about the problem here.

repository: ezyang/Super-SloMo

gha_language: Python

repo_name: ezyang/Super-SloMo


text:
# One-dimensional (or Earth Mover's Distance (EMD)) optimal transport implementation for $L^2$ distance

Implementation of the optimal transport distance for densities $f(x)$ and $g(y)$ for $x,y \in \mathbb{R}$ and the $L^2$ distance.

In this case the $L^2$ distance is strictly convex so can use the northwest corner method, which has complexity O(m + n - 1).


text:
# MetrolinkAdvisoryEmailer
Recieve emails when your trains are delayed.

This is set up to work with the following MetroLink lines:
* Antelope Valley
* Inland Empire-Orange County
* Orange County
* Riverside
* San Bernardino
* Ventura County
* 91/Perris Valley

# Setup
You'll need python3 and pip. Instructions are [here](https://pip.pypa.io/en/stable/installing/) and [here](https://www.python.org/downloads/). Ensure python is added to path.

Then run `pip install -r requirements.txt` in the project folder.

You can now run the script with `python .\advisories.py`.

The script will install headless chromium on first run, which is required for the JS to runs against the website.

# Running
There are two ways to run the script, one via passing arguments over command line, and the other using a config file.

Here's an example for passing cli arguments - `python .\advisories.py --sender_email<EMAIL_ADDRESS>--app_password abcdefghijklmnop --reciever_email<EMAIL_ADDRESS>-t 806 -t 101 -t 201`

And an example for using a config file - `python .\advisories.py --config_file config_example.json`

For an example of the config file, see `config_example.json`.

If you pass both CLI arguments and a config file, only the config file will be used.

The reciever_email is optional for both the config file and command line arguments, if unset it will use the sender_email as the reciever_email.

The script will also create a `.metro_advisories_notified.txt` file to avoid sending repeat advisories. It will clean itself up automatically over time.

# Automation
You can run this on a linux server with cron which is probably the most simple way.
Note that the requests_html library doesn't support ARM devices like raspbery pi and can be complex to set up with Docker.

This script is not endorsed, supported by, or affiliated with Metrolink.

repository: tklusz/MetrolinkAdvisoryEmailer

repo_name: tklusz/MetrolinkAdvisoryEmailer


text:
---
layout: posts
title: Securing Your Webserver with PubKeys
author: matt
---
# PubKey SSH Authentication

One of the confusing things I've always found regarding SSH and security is the difference between password authentication and PubKey authentication.

Over the past year, I decided to invest in a password manager - Remembear to be exact - as a means of increasing my online security regemen. After being constantly hacked through Facebook, my BT email account, and various other online aliasesm, I felt like taking the next step and going full on character string passwords with no means of easy ~~remembering~~ remem**bear**ing. Of course, this is all well and good, but with the way force-brute attacks can work this day and age, purely a password is not the highest form of defence: hence the slow but inevitable ~~betrayal~~ rise of 2FA, or Two-Factor Authentication[^b5831a34]. Think of your SSH PubKey as the Grandfather of 2FA, who has survived the Great War, having been on the frontlines the whole time, with nary a scratch.

[^b5831a34]: Did you get my delightful _Firefly_ reference?

For our Pi (or general Linux) server, getting an SSH key is actually quite simple - I was merely being thick.


text:
---
id: 12301962
title: v0.13.5
date: 2018-08-08T04:50:29Z
slug: v0.13.5
tag: v0.13.5
---

### Enhancements

- Search results now show a snippet of where in the document the term was found
- Slack slash command results also show this snippet! ^
- Improved the ranking of search results
- Added the ability to create a new document from the Starred and Drafts screens
- Added a button to share the document in the header
- When connecting a Slack channel we now post an explanatory message into the channel [#738](https://github.com/outline/outline/pull/738)

---

![search snippets](https://user-images.githubusercontent.com/380914/43816984-1e82524c-9a8c-11e8-9eb9-845bbcac0d4f.png)

### Fixes

- It's now possible to create links to anchors within a document, clicking those links will scroll correctly and not hide the heading behind the top bar.
- Clicking anchors next to headings now copies a link to the clipboard [#739](https://github.com/outline/outline/issues/739)
- There is now a 100 character limit on document titles
- If a document errors while rendering it no longer renders the entire app unusable. We also added more error details to make bug reporting easier. [#737](https://github.com/outline/outline/pull/737)

repository: iamsaumya/website

repo_name: iamsaumya/website


text:
# cps

A CPS (Continuation Passing Style) library to ease the
event-driven/asynchronized coding style in node.js.  There seems to be
enough node.js libs (e.g. async) doing the same thing, why yet
another?  This lib is notably different from other libs in
exception handling.  Using cps:

* Any "throw" statements in the procedures will be transformed to an
  application of the callback onto the error object.
* A "rescue" function is provided, which can be used to catch such
  exceptions pass through the callbacks.

This consistently recovers the try/catch functionality in continuation
passing style programming.

## Install

```text
npm install cps
```

## Terminologies

### Callback

We call a function of the following form a callback:

```javascript
function(err, res) {
  // process the err and res
}
```

A callback is a function that takes two arguments, "err" and "res".
Semantically, a non-null "err" corresponds to a program exception;
while a null "err" corresponds to normal return without any
exceptions.

### Procedure

We call a function of the following form a procedure:

```javascript
function(arg1, arg2, ..., callback) {
  // do some work with the arguments and then invoke the callback to continue
}
```

A procedure is a function that takes a callback as the last argument.
Semantically, a procedure does some work with the input arguments and
at some point, call the callback to continue.  Note that a call to the
"callback" argument MUST always be a tail call.  In particular, the
following is a procedure:

```javascript
function(callback) {
  // do some work and then invoke the callback to continue
}
```

## API Document

* [seq](#seq)
* [pwhile](#pwhile)
* [peach](#peach)
* [pmap](#pmap)
* [pfor](#pfor)
* [rescue](#rescue)
* [parallel](#parallel)

### seq(array_of_procedures, callback)

Sequence a list of procedures.  Note that the result of each procedure
is fed into the next procedure in the listed order.

__Example__

```javascript
var concatFile = function(f1, f2, resFile, cb) {
    var contentOfA, contentOfB;

    cps.seq([
        function(_, cb) {
            fs.readFile(f1, cb);
        },
        function(res, cb) {
            contentOfA = res;
            fs.readFile(f2, cb);
        },
        function(res, cb) {
            contentOfB = res;
            fs.writeFile(resFile, contentA + contentB, cb);
        }
    ], cb);
};
```

### pwhile(bool_procedure, repeat_body_procedure, cb)

An asynchronized version of while loop.

__Example__

Consider a world in which arithmatic operations do not exists and must
be accomplished through alien technology.  Then the Fibonacci function
needs to be written in the following way:

```javascript
var alienAdd = function(a, b, cb) {
    setTimeout(function() {
        cb(null, a + b);
    }, 0);
};

var asyncFib = function(n, cb) {
    if (n < 0) {
        throw new Error('fib input error');
    }
    if (n == 0) {return cb(null, 1);}
    if (n == 1) {return cb(null, 1);}

    var a = 1,
    b = 1,
    i = 2;
    cps.seq([
        function(_, cb) {
            cps.pwhile(
                function(cb) {
                    cb(null, i <= n);
                },
                function(cb) {
                    cps.seq([
                        function(_, cb) {
                            alienAdd(a, b, cb);
                        },
                        function(res, cb) {
                            a = b;
                            b = res;
                            alienAdd(i, 1, cb);
                        },
                        function(res, cb) {
                            i = res;
                            cb();
                        }
                    ], cb);
                },
                cb
            );
        },
        function(_, cb) {
            cb(null, b);
        }
    ], cb);
};
```

### peach(arr, procedure_for_each_element, callback)

Apply a procedure on an array sequentially.

__Example__

Then in the same "arithmetic-less" world, print out the first 10 Fibonacci numbers.

```javascript
cps.peach(
    [1,2,3,4,5,6,7,8,9,10],
    function(el, cb) {
        cps.seq([
            function(_, cb) {
                asyncFib(el, cb);
            },
            function(res, cb) {
                console.log(res);
                cb();
            }
        ], cb);

    },
    cb
);
```

### pmap(arr, procedure_for_each_element, callback)

Apply a procedure on an array sequentially, and record the results in another array, which is pass to the callback.

__Example__

You can also map it out first and then log the result list.

```javascript
cps.seq([
    function(_, cb) {
        cps.pmap(
            [1,2,3,4,5,6,7,8,9,10],
            function(el, cb) {
                asyncFib(el, cb);
            },
            cb
        );
    },
    function(res, cb) {
        console.log(res);
        cb();
    }
], cb);
```

### pfor(number_of_iterations, procedure_for_each_index, callback)

Apply a procedure on a sequence of consecutive indices, starting of 0.

__Example__

```javascript
var sum = 0;
cps.seq([
    function(_, cb) {
        console.log('here');
        cps.pfor(10, function(i, cb) {
            setTimeout(function() {
                sum += i;
                console.log(sum);
                cb();
            }, 1000);
        }, cb);
    },
    function(_, cb) {
        console.log(sum);
        cb(null, 'ok');
    }
], cb);
```

### rescue(try_clause_procedure, catch_clause_procedure, callback)

An asyned version of try/catch.  It take two procedures as arguments.  If the first one fails, the second is executed to rescue.

__Example__

What if there's some invalid input?  Let's catch it without disturbing the overall flow.

```javascript
cps.seq([
    function(_, cb) {
        cps.pmap(
            [1,2,3,4,5,6,7,8,9,10, -1],
            function(el, cb) {
                cps.rescue({
                    'try': function(cb) { // try clause
                        asyncFib(el, cb);
                    },
                    'catch': function(err, cb) { // catch clause
                        console.log(err);
                        cb(null, -1);
                    },
                    'finally': function(cb) { // finally
                        console.log("always print this whether it's good or bad.");
                        cb();
                    }
                }, cb);
            },
            cb
        );
    },
    function(res, cb) {
        console.log(res);
        cb();
    }
], cb);
```

### parallel(array_of_procedures, callback)

Parallel a list of procedures.  The top level callback is only called
after each parallel procedure finishes, regardless the procedure
succeeds or fails.  The callback will never take a non-null error
parameter; the result parameter is an array of the following form:

```js
[
   {"status": "ok", "data": res},  /* in case the procedure in the
                                      corresponding position succeeds
                                      with result res
                                   */
   {"status": "error", "error": err}  /* in case the procedure in the
                                         corresponding position fails
                                         with error err
                                      */
   // ...
]
```

__Example__

See "thread b" being printed out before "thread a":

```javascript
var parallelTest = function(cb) {
    cps.parallel([
        function(cb) {
            setTimeout(function() {
                console.log('3');
                cb(new Error('kaz'));
            }, 3000);
        },
        function(cb) {
            setTimeout(function() {
                console.log('1');
                cb(null, 'ok');
            }, 2000);
        },
        function(cb) {
            setTimeout(function() {
                console.log('2');
                cb(new Error('foobar'));
            }, 1000);
        }
    ], cb);
};
```

Running this procedure will yield the following output:

```text
2
1
3
[ { status: 'error', error: [Error: kaz] },
  { status: 'ok', data: 'ok' },
  { status: 'error', error: [Error: foobar] } ]
```

repository: mephan/regrasp

repo_name: mephan/regrasp


text:
# git_trello_post_commit

This gem can be used in a post-commit hook in any Git repository to comment on and move Trello cards in a specified board. The actions performed by the hook depend on the Git commit message. For example, if a message contains 'Card #20', the hook will add the rest of the commit message as a comment on card #20.

## Installation

Add this line to your application's Gemfile:

    gem 'git_trello_post_commit'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install git_trello_post_commit

## Setup

Add a file like this to your repo:

**my_repo/.git/hooks/post-commit**

    #!/usr/bin/env ruby
    require 'git_trello_post_commit'
    GitTrelloPostCommit::Hook.new(
      :api_key              => 'API_KEY',
      :oauth_token          => 'OAUTH_TOKEN',
      :list_id_in_progress  => 'LIST_ID_IN_PROGRESS',
      :list_id_done         => 'LIST_ID_IN_DONE',
      :board_id             => 'TRELLO_BOARD_ID',
      :commit_url_prefix    => 'https://github.com/my_github_username/my_repo/commits/'
    ).run

Filling in the details using the following approach...

### api_key

Get your developer key from: https://trello.com/1/appKey/generate

### oauth_token

You need to authorize the app with `API_KEY` to access each board separately. To do that:

https://trello.com/1/authorize?response_type=token&name=`BOARD_NAME_AS_SHOWN_IN_URL`&scope=read,write&expiration=never&key=`API_KEY`

### list_id_in_progress & list_id_done

Open a card from your "in progress" and "completed" lists (or whatever you've called them), click the 'More' link in the bottom-right-hand corner, select 'Export JSON' and find the `idList` value.

### board_id

While examining the JSON from the previous step, you can also grab the value of `idBoard`.

### commit_url_prefix

If you have a web view of your Git repo (such as Github), you can enter the URL which, when suffixed with the commit SHA will show the commit in question. The hook will add a link to the commit in the comment it adds to the card.

If you omit the parameter, a link won't be added.

## Usage

The commit-message parser looks for the following keywords:

  * DONE_KEYWORDS:
    * close
    * fix
  * IN_PROGRESS_KEYWORDS:
    * ref
    * reference
    * case
    * issue
    * card

For DONE_KEYWORDS, the card is moved to the list with id `LIST_ID_DONE`, while for IN_PROGRESS_KEYWORDS it is moved to the list with id `LIST_ID_IN_PROGRESS`.

After it has found a keyword, the parser then looks for space, comma or semi-colon separated lists of (hash-prefixed) ids, e.g.:

    closes #1
    closes #1 #2 #3
    closes #1, #2, #3
    closes #1, #2 and #3
    closes #1, #2, and #3
    closes #1, #2 & #3
    closes #1, #2, & #3

So a typical commit message might be:

    Added that awesome feature, refs #42 and closes #1, #2 and #3.

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

## Acknowledgments

This gem is a quick-and-dirty mod of https://github.com/zmilojko/git-trello, so credit to [@zmilojko](https://github.com/zmilojko).


text:
---
layout: default
comments: True
categories: jekyll update
title: "SSM Session Manager"
date: 2021-05-15
description: SSM Session Manager with port forwarding option.
---

AWS Systems Manager Agent (SSM Agent) is Amazon software that can be installed and configured on an EC2 instance, an on- premises server, or a virtual machine (VM). SSM Agent makes it possible for Systems Manager to update, manage, and configure these resources.
In some cases we should have an access to servers securely. Enterprise companies have strict compliance rules.
İmagine that you are managing database, DWH cluster. Lets assume that you have an RDS instance with postgres installation. You need to connect database in a secure manner.
Its private ip is <IP_ADDRESS> and port is 5439. Using SSM by changing host name as localhost and port as 15439 will fix the pain point. Lets dive into topic !

### Prerequisite

1. SSM Agent must be installed on EC2 instance. 2. AWS CLI must be installed.
3. IAM credentials should be located.
4. Session Manager Plugin must be installed.
Configuration
You need to specify a config file in the .ssh hidden directory. The statement will allow you to use ssh command instead of aws ssm.
```bash
# Use IDE e.g. vi,nano emacs that you feel confident
# If you don't have a config file, please create one.
vim ~/.ssh/config
```
### SSH Config File
```bash
# SSH over Session Manager
host i-* mi-*
    ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters
'portNumber=%p'"
# example.com is a placeholder, can be mutable
# instance-id is unique for each instance
# username can be ec2-user
# keyfile can be example.pem
Host example.com
    ProxyCommand sh -c "aws ssm start-session --target %h --document-name AWS-StartSSHSession --parameters
'portNumber=%p'"
        HostName instance-id
    User username
    IdentityFile /path/to/keyfile
```

### Start a Session
```bash
# SSH Client
ssh -i ~/path/to/keyfile username@instance-id
# AWS SSM Client
aws ssm start-session --target instance-id
```
### Port Forwarding

You need to jump a server to forward connection to your local pc. Thats why, we are connecting to jumpbox server with using usernam
e@instance-id.
The part with -L says that private-ip (e.g <IP_ADDRESS>), remote-port (e.g 8080) forwards to my local-port with (e.g 18080)

Start a Port Forwarding Session
```bash
# SSH Client
ssh -L local-port:private-ip:remote-port -i /path/to/keyfile username@instance-id
# AWS SSM Client
aws ssm start-session --target $instance_id\ --document-name AWS-StartPortForwardingSession \ --parameters
'{"portNumber":["remote-port"],"localPortNumber":["local-port"]}'
```
As a result, you are able connect private (internal) application by passing all the steps.
## References
- SSM Agent: https://docs.aws.amazon.com/systems-manager/latest/userguide/ssm-agent.html
- Session Manager plugin: https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with- install-plugin.html
- Session Manager port forwarding blog post: https://aws.amazon.com/blogs/aws/new-port-forwarding-using-aws-system- manager-sessions-manager/
- Reinvent 2019 workshop: https://reinvent2019.aws-management.tools/mgt406/en/scenario.html

{% if page.comments %}

Please enable JavaScript to view the comments powered by Disqus.
{% endif %}

repository: oykuykaya/jekyll-starter

repo_name: oykuykaya/jekyll-starter


text:
# RIPTIDE

## Description

### MITRE Description

> [RIPTIDE](https://attack.mitre.org/software/S0003) is a proxy-aware backdoor used by [APT12](https://attack.mitre.org/groups/G0005). (Citation: Moran 2014)

## Aliases

```
RIPTIDE
```

## Platforms

```
['Windows']
``

# Techniques

* [Symmetric Cryptography](../techniques/Symmetric-Cryptography.md)

* [Web Protocols](../techniques/Web-Protocols.md)

* [Commonly Used Port](../techniques/Commonly-Used-Port.md)

# Actors

* [APT12](../actors/APT12.md)


text:
Introduction
------------

urast (micro rasterizer) is a tiny triangle rasterizer. It takes a
triangle list as input and rasterizes the triangles in random shades
of red.

Building
--------

urast uses the meson build system. To build and run the example, do
```
mkdir build
meson . build
ninja-build -C build
./build/urast
```

repository: krh/urast

repo_name: krh/urast


text:
# Bower-Sass
Example of using bower and SASS with react, also bootstrap added as a novelty.

## Install
Install all required stuff for js and python by using make file.
`make install`

Otherwise you can install them one by one like this.
```bash
pip install -r requirements.txt  # install all python dependencies
npm install  # install all JS dependencies
bower install  # install all bower componenets
```

## Usage
```bash
make install  #
make build  # build & watch js with gulp
make run   # run python server
```

## References
* [The Ultimate Flask Front End -tutorial](https://realpython.com/blog/python/the-ultimate-flask-front-end/)
* [Simple Gulpy Workflow with SASS](http://www.sitepoint.com/simple-gulpy-workflow-sass/)

repository: hanshoi/react-template

repo_name: hanshoi/react-template