text:
XPMP2 Remote Functionality
==

This page explains the technical background of the XPMP2 Remote functionality.
For end user documentation refer to
[LiveTraffic/XPMP2 Remote Client](https://twinfan.gitbook.io/livetraffic/setup/installation/xpmp2-remote-client)
documentation.

## Support in your Plugin ##

You do not need to do anything specifically in your plugin to support
the Remote functionality. Just build and link with the latest XPMP2 library.
Don't even ship the Remote Client, but refer to the
[download location](https://forums.x-plane.org/index.php?/files/file/67797-xpmp2-remote-client/),
which is maintained centrally.

Optionally, you _could_ respond to the new `XPMP_CFG_ITM_SUPPORT_REMOTE` configuration
item in your `XPMPIntPrefsFuncTy` configuration callback function, e.g. to provide the
user with an option to switch Remote support on regardless of
network configuration. However, the default, "auto-detect", works in by far
most scenarios already. And in the few others the users would still have
the chance to use the XPMP2.prf config file
[as documented](https://twinfan.gitbook.io/livetraffic/setup/installation/xpmp2-remote-client#adjusting-network-configuration).

Optionally, you _could_ react to an inter-plugin message `XPLM_MSG_RELEASE_PLANES` from
the XPMP2 Remote Client and cede TCAS/AI control in that case
because the Remote Client will take care of your TCAS in that case, too,
but will also have the chance to pick up planes of other XPMP2-based
plugins.
See [LiveTraffic's XPluginReceiveMessage function](https://github.com/TwinFan/LiveTraffic/blob/bba4912ebfe3203689e029f1786607ab897fe597/Src/LiveTraffic.cpp#L578)
for an example.

## Basic Ideas ##

- There are **senders** (the actual XPMP2-based plugins) disseminating position information via UDP multicst into the local network.
- There is one centrally provided **XPMP2 Remote Client** plugin per networked PC,
  which is part of the XPMP2 project. This client reads those multicast messages
  and displays the aircraft in the networked PCs.
- The XPMP2 master shall be independent of the X-Plane master.
  This would allow to run the XPMP2 master on another of the networked PCs for
  load balancing. Or to use the same principle for networked gaming setup with
  several totally independent players, which still could share the same
  XPMP2-driven planes.
- It is possible to collect multicast data from different XPMP2-driven plugins,
  even if they run on different PCs. So the Remote Client is able to identify
  different sources and map their aircraft ids in case they are in conflict.
- Standard setup is "zero-config":
    - The masters will first _listen_ to the multicast port. As soon as they
      receive something they will start broadcasting their own data, too.
    - The clients will first send a "Beacon of interest" message on the multicast
      address and repeat that every once in a while until they eventually
      receive actual data.
- Masters send their configuration regularly.
    - The client needs to replicate relevant configuration settings like
      logging level, replace dataRefs/textures, label and map settings;
    - as different masters could be configured differently the client decides
      for a "best effort" config for each of these items.
- The Remote Client requests TCAS/AI right on startup. This is not perfectly
  in line with [TCAS plugin coordination rules](https://developer.x-plane.com/article/overriding-tcas-and-providing-traffic-information/#Plugin_coordination),
  but necessary so that the Remote Client can actually combine all the other
  plugins' position data into one central TCAS/AI stream.
- The network messages include per plane:
    - Position, attitude
    - Model (the client needs to have the same set of CSL models installed,
      and it still needs to be able to do its own matching in case the
      requested model is not accessible)
    - Configuration, ie. the array of animation dataRefs
    - To save network bandwidth data compression is applied:
        - Full data set only every once in a while (so that clients have a chance
          to fully synch with a new plane),
        - diff data only inbetween, animation dataRefs only if they really change...
- Special situations handled specially:
    - Change of visibility
    - Change of CSL model
    - Removal of aircraft
    - Stale aircraft (not updated in some time)
    - Stale sender (not sending in some time)
- Read an _optional_ config file to be able to change a few parameters and
  enforce network functionality
    - Read by all XPMP2-based plugins, including Remote Client
    - Example provided as Resources/XPMP2.example.prf
    - Includes switch on/off/auto, port, multicast address, max msg length

## Application Architecture ##

![XPMP2 Remote Architecture](pic/XPMP2_Remote_Architecture.png)

## Network Message "Protocol" ##

- Plugin's settings `RemoteMsgSettingsTy` (grey)
    - are sent every 20 seconds,
    - contain plugin information like its name,
    - contain relevant configuration settings,
    - are used by the Remote Client to learn about senders;
      planes can only be processed from known senders.
- Fully detailed `RemoteMsgAcDetailTy` messages (green)
    - contain information for several planes, each plane occupying a
      fixed-length "record" in the message,
    - introduces new planes (the plane icon in the bottom row),
    - are regularly sent every 10s per plane, all planes equally distributed
      over this 10 second period,
    - allows the Remote Client to create new planes and fully synchronize
      all data every 10 seconds.
- Position update `RemoteMsgAcPosUpdateTy` messages (blue)
    - contain information for several planes, each plane occupying a
      fixed-length "record" in the message,
    - include differential position updates only for space efficiency,
    - can be processed by the Remote Client only for already known planes.
- Animation dataRef `RemoteMsgAcAnimTy` messages (orange)
    - contain information for several planes,
    - are variable-length even per plane as only actually changed dataRef
      values are included as key/value pairs,
    - all values are reduced from `float` to 8 bit `uint8_t` values for
      space efficiency,
    - can be processed by the Remote Client only for already known planes.
- Plane removal `RemoteMsgAcRemoveTy` messages (red)
    - contain information for several planes, each plane identified by an
      internal id only,
    - inform the Remote Client to remove that plane.

![XPMP2 Network Messages](pic/XPMP2_Remote_Messages.png)


text:
### serverless-dynamodb-stream-arn-plugin
___
Fetches and then adds existing DynamoDB Table streams to serverless.yml file using table name for serverless framework

This plugin calls AWS Describe Streams on you behalf and adds the stream to serverless config file.

***

How to use

1. Add to your serverless config plugins object

```

plugins:
  - other plugins
  - serverless-dynamodb-stream-arn-plugin

```

2. Call the function on your stream arn key like below

`arn: ${fetchStreamARN(<tableName>)}`

Code Example:
```
functions:
  sourceLambda:
    handler: ./src/functions/dynamodbOperation
    events:
      - stream:
          arn: ${fetchStreamARN(<tableName>)} // This is all the change you need to do
          startingPosition: LATEST
          enabled: true // Any other parameters can be added as provided by serverless
```

The plugin will automatically be called on command `serverless deploy`

Note:
1. Depending on your Iam Role, you might also be required to add this in your serverless config

```
        - Effect: Allow
          Action:
            - "dynamodb:ListStreams"
          Resource: '*'
```
`Resource property can be more specific for example`
`arn:aws:dynamodb:${self:provider.region}:*:table/*/stream/*`

2. Passing region where the table exists is important,

    1. The plugin automatically takes the value of region from `serverless -> provider -> region`
    2. Can also be passed as region `--region <my region>` in command line
    3. Add region by passing it as the second parameter to the fetchStreamArn Function `arn: ${fetchStreamARN(<tableName>, <region>)}`

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# Introduction
This is not yet ready for prime time! Or any time, really, but it CAN auto-generate a Beat Saber song map with a single click. Note that you can't currently build anything because I have to move some things into the library that doesn't yet exist.

If you play Beat Saber, bookmark this repo and come back in a couple of weeks.

This is Joe's Beat Saber Song Map Editor. It's written in C++. There's a CLI that should run on any UNIX-like system. The GUI is written in Qt. I've compiled for MacOS. Someone enterprising should be able to get this to work under Windows.

# Finding Binaries
If you just need the binaries, email me at<EMAIL_ADDRESS>I can only give you Mac binaries, but eventually maybe someone will build for Windows.

My goal is to provide a common location to download precompiled binaries.

# Current Status
This is an initial checkin. The GUI is still crude, and the viewer is beyond weak. The generator is kind of cool.

Right now, the generator doesn't understand past context, so it can do several down-cuts in a row rather than knowing it should pick something else. It will get there.

I cannot create a new difficulty level map yet. For instance, my sample song only has a Normal. It crashes if I try to create an Easy.

And my code is a bit on the naive side when it comes to mapping extensions. I might very well destroy data you would like to have.

# The Generator
The goal is to be able to automatically map an entire song with the push of a button. The program works off the concept of patterns. For instance, a down-up cut is a pattern. The generator doesn't think about individual notes as much as it does patterns.

# Structure
The Library directory holds the none-GUI code.

* A library for manipulating the song files
* The CLI
* Test cases

The BeatPatterns directory holds the GUI. This is a Qt application.

# To Build
If you want to build or contribute, you'll need:

* Qt Open Source Version
* Xcode command line utilities (Mac)
* cppunit for building and running the unit tests
* gmake
* These libraries: -lsfml-audio -lsfml-graphics -lsfml-system -lsfml-window -lboost_filesystem

Clone the git repo. Build the library first. I don't have any autoconfigure tools yet, but maybe someone will produce them. Just run make.

If you want to put the CLI tools into /usr/local/bin and /usr/local/etc, then sudo make install. The CLI itself is not required to build the GUI, but you have to build the library.

To build the GUI, I do it from Qt Creator. Run Qt Creator and open the BeatPatterns project. Then build like you would normally. I'm sorry -- I'm not going to provide a tutorial on Qt.

# Contributing
In the library directory, there are some important includes with their corresponding .cpp files.

* Common.h includes a few simple structures that are used between a song and a pattern.
* Preferences.h provides a preferences system.
* Song.h provides everything for reading/writing the files that BeatSaber expects.
* Pattern.h provides everything for managing the patterns.

Note: Qt on Mac has a problem when running apps from the Qt Creator. There's an easy workaround. You have to do this once.

For inside Qt Creator, in the very left side, go to Projects (Under Welcome, Edit, etc). That gives you a secondary (wider) navigation area. Under Build and Run, under Desktop Qt (etc), click on Run.

This brings you to run settings. In the middle of the screen near the top is a grey box with some stuff. One of those checkboxes near the bottom of that grey box is "Add build library search path to DYLD_LIBRARY_PATH...".

Click that sucker OFF.

# Code Goals
There's a lot to do.

## The Generator

* Doesn't currently understand flow between patterns
* And doesn't currently use sub-beats
* I need a LOT more patterns. See the section on creating more patterns.
* It seems to be putting red cubes in column 3 far more than the random number generator suggests it should.
* It doesn't yet know a thing about lighting.

If you edit the patterns, PLEASE make sure they are still valid JSON. Use some sort of checker.

## The GUI

* I'd like the GUI to be able to edit Patterns rather than editing them manually.
* The editor section is really really lame. Did I mention how lame it is? It's not really functional, and I don't know how to do a 3D view yet.
* I don't work with custom cube colors.

# Using the CLI
Okay, I haven't written it yet.

# Using the GUI
Run the GUI. So far, it requires an existing map, but of course, New Map is one of the goals. So Open an existing map. It can be really sparse, but you need at least one level to work on.

Go to the Song Map in the left toolbar. The buttons along the top let you switch between the levels you have configured. Click one of the View ones (The create ones crash right now.)

You'll get some stats filled in. The bottom area is bogus, but the middle area is kind of cool.

Hit Regenerate. this will destroy your level map and fill it in. So don't do this if you actually like your map, but it's great to give you a playable map!

Then save it.

To install it on your machine, you'll need to know how to use BMBF. And you'll need to zip it yourself.

# About the Patterns files
The code expects to find patterns inside the BeatPatterns.app directory:

    BeatPatterns.app/Contents/Resources/Patterns

The build puts them there. However, it doesn't necessarily update them reliably. If you edit the file in the main project area, you might have to clean-all and rebuild to get it there.

OR there's a Copy.sh script in the BeatPatterns directory you can run.

Note that I also have a bunch of image files that get copied the same way, but there rather static, so it should just be fine. Copy.sh doesn't touch them.

# Immediate Next Steps

* CLI
  * Build the CLI. It will make the next immediate steps more efficient. Estimated 2 hours.
  * Fix creation of new difficulty layer. Estimated 30 minutes.
  * Generator: better flow between patterns. Estimated 2 hours.
  * Generator: some initial default lighting, even if it's weak. Estimated 30 minutes.
  * Save: should generate a new zip file. Estimated 30 minutes.
  * Implement New. Estimated 1 hour.

* GUI
  * Step through the map: Estimated 2 hours.
  * Autoplay through the song: Estimated 30 minutes.
  * Map Set Selection. I think the beatmap sets are for the different forms -- single saber, 90-degrees, 360-degrees, and whatever else. Estimated: 30 minutes
  * About page. Estimated 30 minutes.

* Preferences
  * Different min/max fields based on difficulty. Estimated 30 minutes.

* Packaging
  * Version. Estimated 15 minutes.
  * Store builds somewhere for easy download. Estimated 30 minutes.

repository: jplflyer/BeatPatterns

repo_name: jplflyer/BeatPatterns


text:
# LogLess
> LogLess is a centralized logging/event stack using AWS Kinesis/Lambda. The AWS Lambda handler is used for processing incoming logs from Kinesis stream.

## Usage

Use the `logless_records` generator to process incoming records. The method returns a `LogLessRecord` object which can be used to process individual log entries.

Store the logs into ElasticSearch, use it to chech for alarm states etc.

## Example

```python
import logless_lambda

def processor(event, context):
    for record in logless_lambda.logless_records(event['Records']):
        """
        Process records received from the logless_lambda library.
        """
        print("Received record", record.message, record.timestamp, record.level, record.source)

```

### License
Apache License 2.0

repository: abuzarrizvi/logless-lambda

repo_name: abuzarrizvi/logless-lambda


text:
# Alternative Deployment

## Overview

This document describes steps and resources required to deploy a new instance of elevation application/web site hosted on AWS/EC2.

## Steps

1. Launch an EC2 instance. This deployment and the current production load were tested on the following EC2 instance (as of 15/12/2020): Amazon Linux 2, t3.medium, 20 GiB. Attach the `FSDFInstanceRole` role and `sg-6e50290a` security group to the instance at launch time or after the launch (for the IAM role and security group see the `ga-elevation` account).

2. Install Nessusagent. There are 2 options: a) manual installation or b) ussing SSM. For the latter an SSM role needs to be attached to the instance. As there is the `FSDFInstanceRole` role attached to the isntance, policies need to be added to the `FSDFInstanceRole` role if the SSM installation is used. See [Tenable Installation Guide](https://intranet.ga.gov.au/confluence/display/ARCHCOM/Tenable+Installation+Guide) and Tenable documentation.

3. Copy the `fsdf-elvis/code-deploy/alt_deployment` script to the instance.

4. Run the script once, e.g. `/bin/bash alt_deployment`

5. Add the `export ELEVATION_SERVICE_KEY_VALUE=token=*****` to the `~\.bash_profile`.

6. If domain names other than `elevation.fsdf.org.au` or `elevation-dev.*` are used, edit the `/etc/httpd/conf.d/elevation.conf` file.

7. Reboot the instance.

repository: GeoscienceAustralia/fsdf-elvis

gha_language: JavaScript

repo_name: GeoscienceAustralia/fsdf-elvis


text:
# Readme Generator

[![Generic badge](https://img.shields.io/badge/License-MIT-yellowgreen.svg)](https://shields.io/)

## Description

Creates a readme based on the input of the user through the command line using node.js. This will allow the user to devote more time working on their actual project instead of their readme.

## License

This application is covered under the MIT License.

## Table of Contents

- [installation](#installation)
- [Usage](#usage)
- [Video](#video)
- [License](#license)
- [Credits](#credits)

## Video

Click the link below to watch video displaying the application in use

[Video of Application in use!](https://watch.screencastify.com/v/yXvz7OWidWjNvjfTFNPt)

## Installation

- Install node.js on your machine from the following website [node.js](https://nodejs.org/en/)
  ![screencapture-nodejs-org-en-2021-10-17-18_21_05](https://user-images.githubusercontent.com/88356270/137647071-dffe0aea-e1e4-4144-9156-206d1aa0a3d7.png)

* Clone this repository into your local files by running this command in your desired directory

```md
git clone https://github.com/beamchristian/readme-generator.git
```

## Usage

After you install node.js on your machine navigate to the directory you cloned the repository under. Then open in Visual Studio Code or whatever IDE you would you like and open up the command line.
![Visual Studio Example](https://user-images.githubusercontent.com/88356270/137647410-3db7029d-505e-4d9d-8dc2-f3193dd41cb7.png)

Then type in the command line:
```md
npm install inquirer
```
(This will install the inquirer package needed)

Then type: "node index" and press enter to run the program

```md
node index
```

You will then be asked a series of questions including:

- Project Name
- Project Description
- A confirm which allows you to add installation instructions or not
- Usage Information
- A confirm which allows you to add a credit section or not
- A list of Licenses you can use on your project, which will create a badge and licensing section based on what you choose
- A confirm if you want to add a Contributing Section with the Contributer Covenant badge
- A confirm if you would like to add a test section or not
- A confirm if you would like to add a table of contents or not
- Users GitHub added to questions section
- Users Email added to questions section

Once you have completed the series of questions your README file will be created under the 'dist' directory.

## Credits

- [Node File System package](https://nodejs.org/api/fs.html)
- [Node Inquirer package](https://www.npmjs.com/package/inquirer)
- [The Contributer Covenant](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)

## Contributing

For contributing to this project, please follow the guidelines of the:

[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.1-4baaaa.svg)](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)

## Questions

If there is any issues with the application please send me an email with the issue, thank you!

- [GitHub](https://github.com/beamchristian 'GitHub')
-<EMAIL_ADDRESS>'Email')

repository: beamchristian/readme-generator

branch_name: refs/heads/main

repo_name: beamchristian/readme-generator


text:
# M5Stack Micropython Base [Lobo MicroPython](https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/)

## Getting Start

- See LoBo MicroPython [WiKi](https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki)

## Upload code
- Use [Ampy](https://github.com/adafruit/ampy)
- Use [Lobo Miropython filesystems](https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki/filesystems)

## Contents
- [MicroPython API](#micropython-api)
  - [LCD](#lcd)
  - [Button](#button)
  - [SD Card](#sd-card)
  - [Speaker](#speaker)
  - [GPIO](#gpio)
  - [PWM](#pwm)
  - [ADC](#adc)
  - [DAC](#dac)
  - [I2C](#i2c)
  - [SPI](#spi)
  - [UART](#uart)
  - [Timer](#timer)
  - [Neopixel](#neopixel)
  - [RTC](#rtc)
- [LoBo MicroPython WiKi](https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/wiki)

# MicroPython API

Micropython Getting Started

In m5stack.py already init timer 0 as EXTBASE, lcd pwm use timer 1, speak use timer 2, 8
```python
import m5stack
```

## **LCD**

---

Import M5Stack:

```python
from m5stack import lcd
lcd.print('hello world!')
```

#### Colors

**Color** value are given as 24 bit integer numbers, 8-bit per color.

For example: **0xFF0000** represents the RED color. Only upper 6 bits of the color component value is used.

The following color constants are defined and can be used as color arguments:

**BLACK, NAVY, DARKGREEN, DARKCYAN, MAROON, PURPLE, OLIVE, LIGHTGREY, DARKGREY, BLUE, GREEN, CYAN, RED, MAGENTA, YELLOW, WHITE, ORANGE, GREENYELLOW, PINK**

#### Drawing

All **drawings** coordinates are **relative** to the **display window**.

Initialy, the display window is set to full screen, and there are methods to set the window to the part of the full screen.

#### Fonts

9 bit-mapped fornts and one vector 7-segment font are included.
Unlimited number of fonts from file can also be used.

The following font constants are defined and can be used as font arguments:

**FONT_Default, FONT_DefaultSmall, FONT_DejaVu18, FONT_Dejavu24, FONT_Ubuntu, FONT_Comic, FONT_Minya, FONT_Tooney, FONT_Small, FONT_7seg**

---

## Methods

### lcd.pixel(x, y [,color])

Draw the pixel at position (x,y).

If *color* is not given, current foreground color is used.

### lcd.readPixel(x, y)

Get the pixel color value at position (x,y).

### lcd.line(x, y, x1, y1 [,color])

Draw the line from point (x,y) to point (x1,y1)

If *color* is not given, current foreground color is used.

### lcd.lineByAngle(x, y, start, length, angle [,color])

Draw the line from point (x,y) with length *lenght* starting st distance *start* from center.

If *color* is not given, current foreground color is used.

The angle is given in degrees (0~359).

### lcd.triangle(x, y, x1, y1, x2, y2 [,color, fillcolor])

Draw the triangel between points (x,y), (x1,y1) and (x2,y2).

If *color* is not given, current foreground color is used.

If *fillcolor* is given, filled triangle will be drawn.

### lcd.circle(x, y, r [,color, fillcolor])

Draw the circle with center at (x,y) and radius r.

If *color* is not given, current foreground color is used.

If *fillcolor* is given, filled circle will be drawn.

### lcd.ellipse(x, y, rx, ry [opt, color, fillcolor])

Draw the circle with center at (x,y) and radius r.

If *color* is not given, current foreground color is used.

**opt* argument defines the ellipse segment to be drawn, default id 15, all ellipse segments.

Multiple segments can drawn, combine (logical or) the values.
* 1 - upper left segment
* 2 - upper right segment
* 4 - lower left segment
* 8 - lower right segment

If *fillcolor* is given, filled elipse will be drawn.

### lcd.arc(x, y, r, thick, start, end [color, fillcolor])

Draw the arc with center at (x,y) and radius *r*, starting at angle *start* and ending at angle *end*

The thicknes of the arc outline is set by the *thick* argument

If *fillcolor* is given, filled arc will be drawn.

### lcd.poly(x, y, r, sides, thick, [color, fillcolor, rotate])

Draw the polygon with center at (x,y) and radius *r*, with number of sides *sides*

The thicknes of the polygon outline is set by the *thick* argument

If *fillcolor* is given, filled polygon will be drawn.

If *rotate* is given, the polygon is rotated by the given angle (0~359)

### lcd.rect(x, y, width, height, [color, fillcolor])

Draw the rectangle from the upper left point at (x,y) and width *width* and height *height*

If *fillcolor* is given, filled rectangle will be drawn.

### lcd.roundrect(x, y, width, height, r [color, fillcolor])

Draw the rectangle with rounded corners from the upper left point at **(x,y)** and width **width** and height **height**

Corner radius is given by **r** argument.

If **fillcolor** is given, filled rectangle will be drawn.

### lcd.clear([color])

Clear the screen with default background color or specific color if given.

### lcd.clearWin([color])

Clear the current display window with default background color or specific color if given.

### lcd.orient(orient)

Set the display orientation.

Use one of predifined constants:
**lcd.PORTRAIT**, **lcd.LANDSCAPE**, **lcd.PORTRAIT_FLIP**, **lcd.LANDSCAPE_FLIP**

### lcd.font(font [,rotate, transparent, fixedwidth, dist, width, outline, color])

Set the active font and its characteristics.

| Argument | Description |
| - | - |
| font | required, use font name constant or font file name |
| rotate | optional, set font rotation angle (0~360) |
| transparent | only draw font's foreground pixels |
| fixedwidth | draw proportional font with fixed character width, max character width from the font is used |
| dist | only for 7-seg font, the distance between bars |
| width | only for 7-seg font, the width of the bar |
| outline | only for 7-seg font, draw the outline |
| color | font color, if not given the current foreground color is used |

### lcd.attrib7seg(dist, width, outline, color)

Set characteristics of the 7-segment font

| Argument | Description |
| - | - |
| dist | the distance between bars |
| width | the width of the bar |
| outline | outline color |
| color | fill color |

### lcd.fontSize()

Return width and height of the active font

### lcd.print(text[,x, y, color, rotate, transparent, fixedwidth, wrap])

Display the string *text* at possition (x,y).

If *color* is not given, current foreground color is used.

* **x**: horizontal position of the upper left point in pixels, special values can be given:
  * CENTER, centers the text
  * RIGHT, right justifies the text
  * LASTX, continues from last X position; offset can be used: LASTX+n
* **y**: vertical position of the upper left point in pixels, special values can be given:
  * CENTER, centers the text
  * BOTTOM, bottom justifies the text
  * LASTY, continues from last Y position; offset can be used: LASTY+n
* **text**: string to be displayed. Two special characters are allowed in strings:
  * ‘\r’ CR (0x0D), clears the display to EOL
  * ‘\n’ LF (ox0A), continues to the new line, x=0

### lcd.text(x, y, text [, color])

Display the string *text* at possition (x,y).

If *color* is not given, current foreground color is used.

* **x**: horizontal position of the upper left point in pixels, special values can be given:
  * CENTER, centers the text
  * RIGHT, right justifies the text
  * LASTX, continues from last X position; offset can be used: LASTX+n
* **y**: vertical position of the upper left point in pixels, special values can be given:
  * CENTER, centers the text
  * BOTTOM, bottom justifies the text
  * LASTY, continues from last Y position; offset can be used: LASTY+n
* **text**: string to be displayed. Two special characters are allowed in strings:
  * ‘\r’ CR (0x0D), clears the display to EOL
  * ‘\n’ LF (ox0A), continues to the new line, x=0

### lcd.textWidth(text)

Return the width of the string *text* using the active font fontSize

### lcd.textClear(x, y, text [, color])

Clear the the screen area used by string *text* at possition (x,y) using the bacckground color *color*.

If *color* is not given, current background color is used.

### lcd.image(x, y, file [,scale, type])

Display the image from the file *file* on position (x,y)
* **JPG** and **BMP** can be displayed.
* Constants **lcd.CENTER**, **lcd.BOTTOM**, **lcd.RIGHT** can be used for x&y
* **x** and **y** values can be negative

**scale** (jpg): image scale factor: 0 to 3; if scale>0, image is scaled by factor 1/(2^scale) (1/2, 1/4 or 1/8)

**scale** (bmp): image scale factor: 0 to 7; if scale>0, image is scaled by factor 1/(scale+1)

**type**: optional, set the image type, constants *lcd.JPG* or *lcd.BMP* can be used. If not set, file extension and/or file content will be used to determine the image type.

### lcd.setwin(x, y, x1, y1)

Set active display window to screen rectangle (x,y) - (x1,y1)

### lcd.resetwin()

Reset active display window to full screen size.

### lcd.savewin()

Save active display window dimensions.

### lcd.restorewin()

Restore active display window dimensions previously saved wint savewin().

### lcd.screensize()

Return the display size, (width, height)

### lcd.winsize()

Return the active display window size, (width, height)

### lcd.hsb2rgb(hue, saturation, brightness)

Converts the components of a color, as specified by the HSB model, to an equivalent set of values for the default RGB model.

Returns 24-bit integer value suitable to be used as color argiment

Arguments
* **hue**: float: any number, the floor of this number is subtracted from it to create a fraction between 0 and 1. This fractional number is then multiplied by 360 to produce the hue angle in the HSB color model.
* **saturation**: float; 0 ~ 1.0
* **brightness**: float; 0 ~ 1.0

### lcd.compileFont(file_name [,debug])

Compile the source font file (must have **.c** extension) to the binary font file (same name, **.fon** extension) which can be used as external font.

If *debug=True* the information about compiled font will be printed.

You can create the **c** source file from any **tft** font using the included [ttf2c_vc2003.exe](https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/tree/master/MicroPython_BUILD/components/micropython/esp32/modules_examples/tft/font_tool/) program.
See [README](https://github.com/loboris/MicroPython_ESP32_psRAM_LoBo/tree/master/MicroPython_BUILD/components/micropython/esp32/modules_examples/tft/font_tool/README.md) for instructions.

## **Button**

---
### Method
```python
buttonA.isPressed()
buttonA.isReleased()
buttonA.pressedFor(timeout)

# if set the callback param, it will interrupt callback function
# or if not set param it will return result at once
buttonA.wasPressed(callback=None)
buttonA.wasReleased(callback=None)
buttonA.releasedFor(timeout, callback=None)
```

### Example
Loop:

```python
from m5stack import *
import utime

while True:
  if buttonA.wasPressed():
    lcd.print('Button A was Pressed\n')

  if buttonA.wasReleased():
    lcd.print('Button A was Released\n')

  if buttonA.pressedFor(1.5):
    lcd.print('Button A pressed for 1.5s\n')

  if buttonA.releasedFor(2):
    lcd.print('Button A released for 2s press hold\n')

  utime.sleep(0.1)
```

Callback：

```python
from m5stack import *

def on_wasPressed():
  lcd.print('Button B was Pressed\n')

def on_wasReleased():
  lcd.print('Button B was Released\n')

def on_releasedFor():
  lcd.print('Button B released for 1.2s press hold\n')

buttonB.wasPressed(on_wasPressed)
buttonB.wasReleased(on_wasReleased)
buttonB.releasedFor(1.2, on_releasedFor)
```

## **SD Card**

---

```python
import uos

uos.mountsd()
uos.listdir('/sd')
```

## **Speaker**

---

```python
from m5stack import *

speaker.volume(2)
speaker.tone(freq=1800)
speaker.tone(freq=1800, duration=200) # Non-blocking
```

## **GPIO**

---

```python
import machine

pinout = machine.Pin(0, machine.Pin.OUT)
pinout.value(1)

pinin = machine.Pin(2, machine.Pin.IN)
val = pinin.value()
```

## **PWM**

---
`pwm = machine.PWM(pin [, freq=f] [, duty=d] [, timer=tm])`
`pwm.init([ freq=f] [, duty=d] [, timer=tm])`

| Arg | Description |
| - | - |
| pin | esp32 GPIO number to be used as pwm output
can be given as integer value or machine.Pin object |
| freq | **optional**, default 5 kHz; pwm frequeny in Hz (1 - 40000000) |
| duty | **optional**, default 50% kHz; pwm duty cycle in % (0 - 100) |
| timer | **optional**, default **0**; pwm timer (0 - 3) |

PWM channel is selected automatically from 8 available pwm channels.

```python
import machine
pwm = machine.PWM(26)
pwm.freq(5000)
pwm.duty(66) # 0.0 ~ 100.0
```

## **ADC**

---
```python
import machine

adc = machine.ADC(35)
adc.read()
```

## **DAC**

---
```python
import machine

dac = machine.DAC(machine.Pin(26))
dac.write(128)
```

## **I2C**

---
```python
from machine import I2C

i2c = I2C(freq=400000, sda=21, scl=22)
                                # create I2C peripheral at frequency of 400kHz
                                # depending on the port, extra parameters may be required
                                # to select the peripheral and/or pins to use

i2c.scan()                      # scan for slaves, returning a list of 7-bit addresses

i2c.writeto(42, b'123')         # write 3 bytes to slave with 7-bit address 42
i2c.readfrom(42, 4)             # read 4 bytes from slave with 7-bit address 42

i2c.readfrom_mem(42, 8, 3)      # read 3 bytes from memory of slave 42,
                                #   starting at memory-address 8 in the slave
i2c.writeto_mem(42, 2, b'\x10') # write 1 byte to memory of slave 42
                                #   starting at address 2 in the slave
```

## **SPI**

---
```python
from machine import SPI, Pin

spi = SPI(
    spihost=SPI.HSPI,
    baudrate=2600000
    sck=Pin(18),
    mosi=Pin(23),
    miso=Pin(19),
    cs=Pin(4)
)

spi.write(buf) #NOHEAP
spi.read(nbytes, *, write=0x00) #write is the byte to ?output on MOSI for each byte read in
spi.readinto(buf, *, write=0x00) #NOHEAP
spi.write_readinto(write_buf, read_buf) #NOHEAP; write_buf and read_buf can be the same

```

## **UART**

---
```python
from machine import UART

uart2 = UART(2, tx=17, rx=16)
uart2.init(115200, bits=8, parity=None, stop=1)
uart2.read(10)       # read 10 characters, returns a bytes object
uart2.read()         # read all available characters
uart2.readline()     # read a line
uart2.readinto(buf)  # read and store into the given buffer
uart2.write('abc')   # write the 3 characters
```

## **Timer**

---
tm = machine.Timer(timer_no)

  timer_no argument is the timer number to be used for the timer.
  It can be 0 - 3 for 4 hardware timers or 4 - 11 for extended timers.
  If extended timer is selected, timer 0 must already be configured in EXTBASE mode.
```python
import machine

tcounter = 0

p1 = machine.Pin(27)
p1.init(p1.OUT)
p1.value(1)

def tcb(timer):
    global tcounter
    if tcounter & 1:
        p1.value(0)
    else:
        p1.value(1)
    tcounter += 1
    if (tcounter % 10000) == 0:
        print("[tcb] timer: {} counter: {}".format(timer.timernum(), tcounter))

t1 = machine.Timer(2)
t1.init(period=20, mode=t1.PERIODIC, callback=tcb)
```

## **Neopixel**

---
```python
import machine, time

np = machine.Neopixel(machine.Pin(22), 24)

def rainbow(loops=120, delay=1, sat=1.0, bri=0.2):
    for pos in range(0, loops):
        for i in range(0, 24):
            dHue = 360.0/24*(pos+i);
            hue = dHue % 360;
            np.setHSB(i, hue, sat, bri, 1, False)
        np.show()
        if delay > 0:
            time.sleep_ms(delay)

def blinkRainbow(loops=10, delay=250):
    for pos in range(0, loops):
        for i in range(0, 24):
            dHue = 360.0/24*(pos+i);
            hue = dHue % 360;
            np.setHSB(i, hue, 1.0, 0.1, 1, False)
        np.show()
        time.sleep_ms(delay)
        np.clear()
        time.sleep_ms(delay)
```

## **RTC**

---
```python
import machine
import utime

rtc = machine.RTC()
rtc.ntp_sync(server="hr.pool.ntp.org", tz="CET-1CEST")
rtc.synced()
True
utime.gmtime()
(2018, 1, 29, 16, 3, 18, 2, 29)
utime.localtime()
(2018, 1, 29, 17, 3, 30, 2, 29)
```

gha_license_id: NOASSERTION


text:
# USTwitterIndex
## Resources:
- [US Census Bureau](https://www.census.gov/geo/maps-data/data/tiger.html)
- [USA: State, County and Congressional District boundaries](https://support.google.com/fusiontables/answer/1182141?hl=en "Google")

repository: ChaiBapchya/USTwitterIndex

repo_name: ChaiBapchya/USTwitterIndex


text:
# Route Downcaser

This is our Marley Spoon port of the gem `route_downcaser` by Carsten Gehling. The original source code can be found
here: https://github.com/substancelab/route_downcaser.

The gem is working exactly as intended by Gehling with the only exception that we support `include_patterns` besides
the `exclude_patterns` in the original. Unfortunately, nobody has been interested into merging this into the main
branch.

### Releasing a new version

Releasing a new version will update the gem version automatically (no need to update manually in `version.rb`.)

You can use the shorthands to release a new `patch`, `minor` or `major` version:

`PACKAGECLOUD_TOKEN=my_packagecloud_token script/release patch|minor|major`

You can also release a specific version:

`PACKAGECLOUD_TOKEN=my_packagecloud_token script/release 1.0.0`

The version will be bumped accordingly, a new git tag will be created and pushed to the `origin` remote and, finally, the gem will be packed and uploaded to [PackageCloud](https://packagecloud.io).

gha_language: Ruby

gha_license_id: MIT


text:
# Oscean

This is the repository for the [Oscean Wiki Engine](http://wiki.xxiivv.com/), see [on-site documentation](http://wiki.xxiivv.com/About). Oscean uses a **flow-based framework** called [Riven](https://github.com/XXIIVV/Riven), the routing graph can be seen [here](http://wiki.xxiivv.com/riven.html).

The database formats are [Indental](https://wiki.xxiivv.com/Indental) and [Tablatal](https://wiki.xxiivv.com/Tablatal), their content uses the [Runic](https://wiki.xxiivv.com/Runic) templating format and [Heol LISP](https://wiki.xxiivv.com/Heol) as a **markup language**.

The Master Branch is the **live version**, to see active tasks & issues, visit the [Issue Tracker](http://wiki.xxiivv.com/Oscean:tracker).

## Terminal

A series of tools are available through the search bar, type `~help` to see available commands. This is used mostly to perform maintenance tasks such as generating rss(`~rss`), or to test all lexicon entries for broken entries(`~walk`). Utilities also exist to convert [Lietal](http://wiki.xxiivv.com/Lietal) words English(`~lien viro`), or to convert Gregorian dates to [Arvelie](http://wiki.xxiivv.com/Arvelie)(`~gtoa 1986-03-22`),

## Syntax Highlight

The `Resources/` folder inclues syntax highlight for both [Indental](https://wiki.xxiivv.com/Indental) and [Tablatal](https://wiki.xxiivv.com/Tablatal), to install them onto [Sublime](http://sublimetext.com), copy them into `~/Library/Application Support/Sublime Text 3/Packages/User/`.

## Extras

- Pull Requests are welcome.
- See the [License](LICENSE) file for license rights and limitations(MIT), the media content is [BY-NC-SA 4.0](http://wiki.xxiivv.com/About).

<img src='https://github.com/XXIIVV/Oscean/blob/master/media/identity/logo.crest.png?raw=true' width='200'/>

repository: VegaDeftwing/Oscean

repo_name: VegaDeftwing/Oscean


text:
# LAB04-TICTACTOE
This project holds a minigame built in C# on a .NET console app. The purpose is to allow two users to play a tic tac toe game that will determine a winner or a tie.

## Visual
![](screencap.JPG)

## Use
To run this app, clone the repo and open the .sln file on Visual Studio. Then compile the code and follow instructions on the console.

## Authors & Contributors
Richard Jimenez & Danul De Leon pair programmed this project.
Code Fellows for providing starter code.

gha_language: C#


text:
## Builder

| Address                         |
|---------------------------------|
|<EMAIL_ADDRESS>         |

**Builder** is a visual tool for create any type of bots with no code. Behind the scenes Builder is a state machine fully integrated with the others BLiP's components.

**The Builder** extension allows change some Builder's behaviors programmaticaly. You can **change or reset a user state** with a command. In addition, the extension can be used to manage the whole bot flow.

### Reset user state

In order to reset a user state, send a command with the following properties:

| Name | Description |
|---------------------------------|--------------|
| id    | Unique identifier of the command.   |
| method    | **delete**  |
| uri    | **/contexts/{{user-identity}}/stateid%400**   |
| to     |<EMAIL_ADDRESS>(not required) |

Note: Remember to replace the variable {{user-identity}} for the user identity you want to reset (for instance: 30e26f51-25e5-4dfc-b2bf-6c0ba80027a8.docstest%400mn.io)

```http
POST https://msging.net/commands HTTP/1.1
Content-Type: application/json
Authorization: Key {YOUR_TOKEN}

{
  "id": "0094447a-2581-4597-be6a-a5dff33af156",
  "method": "delete",
  "uri": "/contexts/30e26f51-25e5-4dfc-b2bf-6c0ba80027a8.docstest%400mn.io/stateid%400"
}
```

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
    "method": "delete",
    "status": "success",
    "id": "a32de42c-fb36-49ef-85aa-02384a3733d6",
    "from"<EMAIL_ADDRESS>    "to"<EMAIL_ADDRESS>    "metadata": {
        "#command.uri"<EMAIL_ADDRESS>    }
}
```

### Change user state

In order to change a user state, send a command with the following properties:

| Name | Description |
|---------------------------------|--------------|
| id    | Unique identifier of the command.   |
| method    | **set**  |
| uri    | **/contexts/{{user-identity}}/stateid%400**   |
| to     |<EMAIL_ADDRESS>(not required) |
| type   | **text/plain** |
| resource | **{{state-id}}** |

You need access the portal, go to Builder and click on the block contextual menu to get its ID (as picture below).

![image](state_id.png)

Note: Remember to replace the variable {{user-identity}} for the user identity you want to reset (for instance: 30e26f51-25e5-4dfc-b2bf-6c0ba80027a8.docstest%400mn.io). You must also define what is the new state you want to send the user, replacing the {{state-id}} variable.

```http
POST https://msging.net/commands HTTP/1.1
Content-Type: application/json
Authorization: Key {YOUR_TOKEN}

{
  "id": "1294447a-2581-4597-be6a-a5dff33af156",
  "to"<EMAIL_ADDRESS>  "method": "set",
  "uri": "/contexts/30e26f51-25e5-4dfc-b2bf-6c0ba80027a8.docstest%400mn.io/stateid%400",
  "type": "text/plain",
  "resource": "state"
}
```

```http
HTTP/1.1 200 OK
Content-Type: application/json

{
    "method": "set",
    "status": "success",
    "id": "1294447a-2581-4597-be6a-a5dff33af156",
    "from"<EMAIL_ADDRESS>    "to"<EMAIL_ADDRESS>    "metadata": {
        "#command.uri"<EMAIL_ADDRESS>    }
}
```

repository: andreminelli/blip-docs

repo_name: andreminelli/blip-docs


text:
---
title: "Switching Tools"
date: 2020-08-07T21:57:53-05:00
draft: false
tags:
- blindness
---

This is basically a test post. I've switched from Emacs to VS Code, and I'll
detail why below. The gist is that Emacs is unhelpful, only easy to set up on Mac
and Linux, and Emacs packages are not standard, and Emacspeak, the speech
extension for Emacs, just can't keep up with extensions like LanguageTool, and
probably won't because coding is Emacs' main use case, not writing.

## Why I used Emacs

Emacs has been my work tool for about a year now. I went along with its strange
commands, and even got to liking them. I memorized strange terminology in order
to get the most of the editor. Don't get me wrong, Emacs is a wonderful tool,
and Emacspeak allows me to use it with confidence and even enjoyment.

Before the end, I was writing blog posts, both here and on a Wordpress blog,
using Git and GitHub, and even reading EBooks. I also adore Org-mode, which I
still find superior to anything else for note taking, compiling quick reports,
and just about anything writing-related. Seriously, being able to export just
one part of a file, instead of the whole large file containing every bit of
work-related notes, is huge, and I'll now have to use folders, subfolders,
and folders under those to come close to achieving that level of
productivity. And no, the Org-mode extension for VS Code doesn't have a third of
the ability of the native Emacs Org-mode.

But, Emacs was founded on the do-it-yourself mentality, and it'll stay that way.
If you don't know what to look for, Emacs will just sit there, without any
guidance for you. I'll get more into that as I compare it with VS Code.

## Making Good out of Bad

One day, my MacBook, which is what I run Emacs on, ran very low on battery. It
was in the morning that day, and I have a Windows computer also, so I decided to
see if I could get things done on it. I'd tried writing on it before, using
Markdown in Word, or even VS Code before. But my screen reader, NVDA, wouldn't
read indentation like Emacspeak did, or pause between reading formatting symbols in Markdown like
Emacspeak did, play sounds for quick alerts of action like Emacspeak did, or
even have a settings interface like Emacs did, and definitely didn't have a
voice like Alex on the Mac. Those were my thoughts when I'd tried it before.
I'll tackle them all, now that I've used VS Code for almost a week.

So, I managed to get Markdown support close to how I used it in Emacs, minus the
quick jumping between headings with a single keyboard command. I still miss
that. The LanguageTool extension works perfectly, although I had to learn that
to access the corrections it gave I have to press **Control + . (period)**.
Every extension I've installed so far has worked with NVDA. I cannot say that
for Emacs with Emacspeak. Since the web is so standardized, there isn't too much
an extension could do to not be accessible. Sometimes I wish the suggestions
didn't pop up all the time in some language modes, but I'll take that any day
over inaccessibility.

So, on with debunking the problems I had at first. Hopefully this will help
newcomers to VS Code, or those who are cynical that basically a web app can do
what they need:

### NVDA doesn't read indentation!

Yes, it can. It can either speak the indentation, or beep, starting at, I
believe, low C for the baseline and moving up tones. Sometimes I have to pay a
bit of attention to notice the difference between no space and one space, but
that's what having it speak is for.

### NVDA doesn't pause between formatting symbols!

This is true, and unavoidable for now. But, unlike Emacspeak, NVDA has the
ability to use a braille display, which makes reading, digesting information,
and learning a lot easier for those whose mind, like mine, is more like a train
than a race car. In the future, NVDA's speech refactoring may make pausing, or
changing pitch for syntax highlighting, a reality.

## VS Code doesn't play sounds!

This is true too, and I've not found a setting or extension to make this happen.
Maybe one day...

## VS Code doesn't even have a settings interface!

Before, I thought one had to edit the JSON file for settings to change them.  This is a bit rough around the edges, because you have to Tab
twice from one setting to the next, and you could roam from one section of
settings to another, but it's easier than Emacs.

## But what about the awful Windows voices!

Yes, Windows voices still are dry and boring, or sound fuzzy, but NVDA has many
options for speech now. I've settled on one that I can live with. No, it doesn't
have the seeming contextual awareness of paragraphs like Alex, but it's Windows.
I can't expect *too* much.

## Bonus points for VS Code

### Git

I'm only now starting to get Git. It's a program that allows you to keep
multiple versions of things, so you can roll back your work, or even work on
separate parts of your work in separate branches of the project. Emacs just...
sits there as usual, assuming you have any idea of what you're doing. VS Code,
though, actively tries to help. If you have Git, it offers an extension for
that. If you open a Git repository, it asks if you'd like it to fetch changes
every once in a while to make sure things are up-to-date when you commit your
changes. I was able to commit a pull request in VS Code easily and with minimal
fuss. In Emacs, I didn't even know where to begin. And any program that takes
guessing and meaningless work off my shoulders is a program I'll keep.

### Suggestions while typing

VS Code is pretty good at this. If I'm writing code, it will offer suggestions
as I type. Sometimes they're helpful, sometimes they aren't. In text modes, this
doesn't happen; it appears that this only happens in programming modes. Emacs
would just let you type and type and type, and then browsing Reddit you'd find
out about snippet packages that may or may not work with Emacspeak.

### Standardized

As mentioned before, VS Code is basically a web app. Emacs is a program written
in mostly Emacs Lisp, and a bit written in C. Extensions in VS Code are written
in JavaScript, whereas extensions in Emacs are written in its Lisp dialect.
Since Emacs is completely text based, any kind of fancy interface must be made
manually, which usually means that Emacspeak will not work with it, unless the
author, or a community member, massages the data enough to make it work. This is
a constant battle, and it won't get easier for anyone involved.

VS Code is a graphical tool that has plenty of keyboard commands, and screen
reader support. Its completion, correction, and terminal processes have already
been created, so all extensions have to do is hook into that. This means that a
lot of extensions are accessible, without even knowing it.

## So, any downsides to VS Code?

VS Code is not perfect by any stretch. When screen reader support is enabled, a
few features are actually disabled because Microsoft doesn't know how to convey
them to the user without using sound. Code folding is disabled, which would make
navigating markdown a lot simpler. Word wrapping is disabled, meaning that a
paragraph is on one very long line. I've found Rewrap, a third-party extension
that I can use, so that's fixed. There are no sounds, so the only way I know
there are problems is by going to the next problem, or opening the issues panel.

Overall though, VS Code has impressed me, and I continuously find wonderful,
time-saving, mind-clearing moments where I breathe a sigh of relief that to
create a list in markdown, I can just select lines of text, and choose “toggle
list” from the commands panel, whereas with Emacs I had to mark the list of
lines and remember some strange command like “string-insert-rectangle” and type
“\*” to make all of those list items. These kinds of time-savers make me more
productive, offsetting slightly the lack of features akin to those in Org-mode.

## Conclusion

I didn't expect this post to be so long, but it will be a good test to see if VS
Code's Hugo support is enough to replace Easy-Hugo on Emacs. While VS Code
doesn't have a book reader, at least, not one I think I'd like, or a media
player with Tune-In Radio support made for the blind, and many other packages,
it is a great editor, and does have tools like Hugo extensions that make it
slightly more that an editor. I should branch out more and see what tools
Windows now has for these functions anyways. I already use Foobar2000 for media,
I just have to find a good book reader that doesn't get rid of formatting info.

So, I hope you all have enjoyed reading this long test of VS Code, and an update
on what I've been doing lately when not playing video games and other things.

In other news, I've been using the iOS 14 and macOS 11 public betas. I'll report
on my findings on those when the systems are released this fall.


text:
# Personal Portfolio Website

```BASH
git clone https://github.com/TafadzwaManyenga/verbose-octo-enigma
```

Completed with HTML5, CSS3, and JavaScript.
The CSS framework used was Bootstrap 4.7

### Bootstrap
Find out more about [Bootstrap](https://getbootstrap.com/)

## Extensions

More clean styling and additional CSS transitions to make the site visually appealing.

repository: TafadzwaManyenga/verbose-octo-enigma

repo_name: TafadzwaManyenga/verbose-octo-enigma


text:
#AngularJS Widget Area directive

## About ##
__pk-widget-area__ is an AngularJS directive, which allows you to build iGoogle-like dashboard apps (aka portlets or iNettuts).

__Contributors:__

* [Petr Kotek](https://github.com/petrkotek)

License: [MIT](http://www.opensource.org/licenses/mit-license.php)

## Example & Screenshot ##
See example is in index.html.

![Screenshot](img/screenshot.png "Screenshot")

__Basic terminology/hierarchy:__

* __widgetArea__: the whole directive; has blocks inside; you can change order of blocks
* __block__: consists from columns
* __column__: can include widgets
* __widget__: building block, which you can move in a column or move to some column in different block

## Dependencies
* AngularJS & UI (included in index.html from CDN)
* Twitter Bootstrap (the fluid layout; included in index.html from CDN)
* jQuery (included in index.html from CDN)
* jQuery UI (sortable plugin; included in index.html from CDN)
* [AngularJS multi-sortable](https://github.com/mostr/angular-ui-multi-sortable) (included in index.html from lib/angular-ui-multi-sortable.js)

##Change Log##
* __2013-04-22__ - Version 1.0.0 - Release

repository: petrkotek/angular-widgetarea-directive

repo_name: petrkotek/angular-widgetarea-directive


text:
# back_music_player

```python
>>>
>>>     __               __
>>>    / /_  ____ ______/ /__
>>>   / __ \/ __ `/ ___/ //_/
>>>  / /_/ / /_/ / /__/ ,<
>>> /_.___/\__,_/\___/_/|_|_____
>>>                      /_____/music player
>>>                      version : v0.1 (beta)
>>>
>>> Playing now => https://www.youtube.com/watch?v=AuGIHznyuXk
>>> To stop music press ctrl + shift + #
```

back_music_player  Its Extract audio url from video and play in background

[![Python 3.8](https://img.shields.io/badge/python-3.8-yellow.svg)](https://www.python.org/)

### Requirement

* python3
* Linux

### Example commands

```python
    backmusic "https://www.youtube.com/watch?v=AuGIHznyuXk"
```

### Install
```python
    pip install backmusic
```

### Help
* backmusic --help


text:
# oidc-agent
## Starting oidc-agent
You can start the agent by running:
```
oidc-agent
```
This will print out shell commands which have to be executed in the shell where
you want to run oidc-add, oidc-gen, and any application using oidc-agent.

To start oidc-agent and directly set the needed environment variables you can use:
```
eval `oidc-agent`
```

## Persistence of oidc-agent
A simple way to make oidc-agent persistent is to include this line in your
`.bashrc`:
```
test -e ~/tmp/oidc-agent.env && . ~/tmp/oidc-agent.env
```
And to run the agent as `oidc-agent > ~/tmp/oidc-agent.env`
From now on every new shell should have access to the agent.

You can test this with:
```
oidc-token <shortname>
```

## General Usage
```
$ oidc-agent --help
Usage: oidc-agent [OPTION...]
oidc-agent -- An agent to manage oidc token

 General:
  -k, --kill                 Kill the current agent (given by the OIDCD_PID
                             environment variable)

 Verbosity:
  -c, --console              Runs oidc-agent on the console, without
                             daemonizing
  -g, --debug                Sets the log level to DEBUG

 Help:
  -?, --help                 Give this help list
      --usage                Give a short usage message
  -V, --version              Print program version
```

repository: vingar/oidc-agent

repo_name: vingar/oidc-agent


text:
# Chrome Crawler
Proof-of-concept web page content crawler that runs in Google Chrome.

## Get Started
* Download latest [Python distribution](https://github.com/lqf96/chrome-crawler/raw/master/dist/latest.tar.gz) and install it with `pip`. It is highly recommended to install it in a virtual environment.
```bash
$ wget https://github.com/lqf96/chrome-crawler/raw/master/dist/latest.tar.gz
$ virtualenv testenv
$ . testenv/bin/activate
(testenv) $ pip install latest.tar.gz
```
* Copy the example folder in this repository and run test.py. Then open Chrome with proper flags to allow unconditional cross origin access. (You may use `start-browser` script to open Chrome)
Then browse http://<IP_ADDRESS>:8080 and you should see example crawling script running.

## API
The backend APIs documentation can be found [here](backend/README.md).
The frontend APIs documentation can be found [here](frontend/README.md).

## Known Problems
* Sending message from server to client sometimes doesn't work. (Something wrong with SSE?)
* Currently console doesn't ignore errors and logs generated within the iframe, which makes output messy and confused.
A workaround is to print crawling output directly on the webpage.
* Even if cross-origin access is enabled from command line, Chrome still blocks some pages which enables X-Frame-Options protection.
To allow these pages to be loaded you will need to install some Chrome extensions.

## Example projects
* [Simple Example](example)
* [Yahoo Q&A](https://coding.net/u/lqf96/p/YahooQnA/git)

## License
The whold project is licensed under 3-clause BSD license.


text:
# BG Image (Command-line)

Command line tool for rendering images

## Getting Started

Install the command line tool

```
npm install bgimage-cli -g
```

### Usage

Create task json

```
{
  "Jobs": [
        {
          "platform": "android",
          "input": "master_icon.png",
          "output": "icon.png",
          "outputDir":"android.gradle/game/src/main/res/drawable-xxxhdpi",
          "height": 192,
          "width": 192,
          "rounded":48
        }
    ]
}
```
and run

```
bgimage-cli i <file.json>
```

## Issues with installing on Windows?
 Validate Python is indeed found in the correct folder:

```
C:\Users\ben\.windows-build-tools\python27\python.exe
```
Note - it uses python 2.7 not 3.x as it is not supported

If it doesn't moan, go ahead and create your (user) environment variable:

```
setx PYTHON "%USERPROFILE%\.windows-build-tools\python27\python.exe"
```
restart cmd, and verify the variable exists via set PYTHON which should return the variable

```
Lastly re-apply npm install <module>
```

## Built With

* [Sharp](https://github.com/lovell/sharp/) - High Performance image processing for Node.JS
* [Commander](https://github.com/tj/commander.js/) - Commander

## Authors

* **Bart van den Berg**  - [Blue Giraffe Games](https://www.bluegiraffegames.com)

## License

This project is licensed under the MIT License

repository: Bartjezzz/bgimage-cli

repo_name: Bartjezzz/bgimage-cli


text:
* I am trying to merge a large number of GVCF files and, after opening several files, GVCFgenotyper dies with the error "problem opening ..."

If the file exists and is readable, checkout the max number of file handles that you can open at the same time (ulimit -a).

* How do I create site-only vcf file from the aggregated multi-sample gvcf?

Using bcftools: bcftools view -Ou -G | bcftools norm -m -any -Ou | bcftools view -Oz -o sites.vcf.gz --threads 4

repository: jaredo/gvcfgenotyper

repo_name: jaredo/gvcfgenotyper


text:
# Educational tracking device for LEO orbit satellites
A satellite deployed in a low Earth orbit (LEO) shows a fast pass through the sky. So we need a device that points our directional antenna dynamically in order not to lose communication. This a satellite tracking antenna device or rotator, is based on Raspberry Pi and SG92R servos for educational purpose.

## Mechanics
It is a small piece adapted to the form factor of SG9x servos. so I have used a DLP (resin) printer with the CHITUBOX program. Both the final file, and the .stl files can be found in the 3D_files folder.
|Antenna base|Axis|Platform|
|---|---|---|
||||

## Schematic and Connections
I assembled all the components for the prototype over a full size proto-breadboard. This is the schematic

### OS
As you can see, I used a Raspberry Pi Zero + due to its small size. It has excess performance to run the Python script to control the movement of the servos and enough to run a program for calculating satellite orbits. You can install the Raspberry Pi OS Lite. Here you are the [RPI OS installation guide](https://www.raspberrypi.org/documentation/installation/installing-images/)
You don't need anything special to run the tracking program.

## Where is my SAT?
You can find several applications for mobile which allows you to have the most accessible information. But in the Linux environment there are the applications that will give us more precision and quantity of information. A very easy to install and configure is [Gpredict](https://github.com/csete/gpredict). It allows advanced options such as defining control interfaces with ham radios and rotors like this.

Later I will show how to use the information provided by this program to call the program so that it is oriented to the satellite we want to connect to.

### Instalation
To install GPredict. Being a desktop application I have chosen this way of installation:

After updating the TLE files and changing some settings. You can have a tracking in real time and very precise. For example the ISS:

## Elevation calculation
For low elevation passes, the trajectory approaches a parabolic curve. At elevations closer to the zenith, the approximation to a gaussian bell is better.
|Polar view of a low pass base|Azimuth and elevation evolution in a low pass|IDEM in a hight pass|
|---|---|---|
||||

In this first iteration, the **calculation is based on a quadratic equation of a parabolic curve**:

For the previous case of low pass the equation could be solved like this:

## The code
I have build only one program developed as a Python script. The code is available in this repository and you can [open here](https://github.com/McOrts/mini-tracker4antenna/blob/main/mini-tracker4antenna.py).

## Run
The program is a Python script that you can execute in command prompt. In the table data with the details of the pass obtained in GPredict. You can find the value for the parameters that you need for call the program.

These would be the parameters for the low pass of the example :

There is a help with the call formats and the order and meaning of each parameter:
```
Usage:
 python mini-tracker4antenna.py [total pass time in minutes] [Start azimuth degrees] [End azimuth degrees] [Maximum elevation degrees]
 python mini-tracker4antenna.py test
 python mini-tracker4antenna.py ?
e.g: mini-tracker4antenna.py 9 37 140 60
```

## Demo time
[![Movement demo](./images/mini-tracker4antenna_test.png)](https://youtu.be/1R0TKMD1_78)

## Next steps
* Build a mini-Yagi or Helical antenna handmade.
* Control interface with Gpredict.

## Acknowledgements
**Fernando Bueno** for the 3D design as [fbuenonet in thingverse](https://www.thingiverse.com/fbuenonet/designs)


text:
# image_jpeg

[![pub package](https://img.shields.io/pub/v/image_jpeg.svg)](https://pub.dartlang.org/packages/image_jpeg)
![GitHub](https://img.shields.io/github/license/yangyxd/image_jpeg.svg)
[![GitHub stars](https://img.shields.io/github/stars/yangyxd/image_jpeg.svg?style=social&label=Stars)](https://github.com/yangyxd/image_jpeg)

Flutter plug-in for image compression JPEG upload supports image blurring, rotation processing, and loading resource files and memory images (bytes).

## Usage
To use this plugin, add `image_jpeg` as a dependency in your `pubspec.yaml` file.

## ROADMAP

* [x] Compressed to JPEG
* [x] Image Zoom
* [x] Image Rotate
* [x] Get image information (width, height, fileSize, lastModified)
* [x] Gaussian Blur
* [x] Loading resource images

> Supported  Platforms
> * Android
> * IOS

## Examples

  * [Examples App](https://github.com/yangyxd/image_jpeg/tree/master/example) - Demonstrates how to use the image_jpeg plugin.

```dart
import 'package:image_jpeg/image_jpeg.dart';

// 调用 encodeJpeg ，返回输出的文件名
String newfileName = await ImageJpeg.encodeJpeg(imageFile.path, newfile, 70, JpgImageWidth, JpgImageHeigh);

// 调用encodeImageWithRes从资源文件中加载并处理，返回bytes
List<int> data = await ImageJpeg.encodeImageWithRes(resName, 70, 'drawable', 1000, 1000,  0, 10, 4);

// 加载资源文件（可以不是图像）
List<int> data = await ImageJpeg.loadResFile(resName);

// 高斯模糊
List<int> data = await ImageJpeg.blurImageWithFlie(imageFile.path, 10, 4, 0);

// 获取资源文件信息
var sv = await ImageJpeg.getResImageInfo(resName);

// 获取文件信息
var sv = await ImageJpeg.getInfo(imageFile.path);

```

## License MIT

Copyright (c) 2018

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

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

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

gha_language: Java


text:
# JAESBoilerplate

JAESBoilerplate gives you a quick head start with Jade, AngularJS, Express and Stylus

It also includes a translation engine, just edit public/values/values.js to add your key/value and use the following way:
    In view:
        {{t("dot.notation.values")}}
    In controller
        var = t("dot.nocation.values");

The translation loaded will depend on AngularJS native $locale.id

If value replacement is needed, use it the following way:

    The value:
        "en-us":
        {
            "translate":
            {
                "me": "I'm translated and {{value}} will be replaced"
            }
        }

    The usage:
        t("translate.me", {"value": "HEY"}); //this returns "I'm translated and HEY will be replaced"

## How to install dependencies

Just run the following command: "./run.sh" on your console

## How to make it run on your browser

Just run the following command: "node app" on your console and load it up on your browser with "localhost:3000"

### Credits
**Filipe Melo**
filipefmelo [at] gmail.com

**Felix Müller**
mueller.fe [at] gmail.com

license: Unlicense

repository: filipefmelo/JAESBoilerplate

repo_name: filipefmelo/JAESBoilerplate


text:
# Android JSON Parser Demo App: Developed By Babu Kaliyamoorthy

This repository contains a detailed sample app that implements MVVM architecture using ViewModel,LiveData,
View , Model and DataBinding .

1.This App parse the JSON data from a web service API.

2.App is designed using MVVM pattern and Android architecture components ViewModel, LiveData and DataBinding.

3.Developed App in Kotlin with Coroutines API.

4.App supports both portrait and landscape modes.

#### The app has following packages:
1. **data**: model classes contains the classes like data class,repository accessing classes ,etc.
2. **ui**: View classes along with their corresponding ViewModel.
3. **utils**: Utility classes.
4. **di**: dependency injection classes.
5. **adapter**: Adapter class is available to bind the data to the recyclerview.

#### Classes have been designed in such a way that it could be inherited and maximize the code reuse.

### Library and Concept reference resources:
1. LiveData: https://developer.android.com/topic/libraries/architecture/livedata
2. ViewModel: https://developer.android.com/topic/libraries/architecture/viewmodel
3. DataBinding: https://developer.android.com/topic/libraries/data-binding
3. Coroutines: https://kotlinlang.org/docs/reference/coroutines-overview.html

### License
```
   Copyright (C) 2017 TELSTRA LIMITED

   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: babu-kaliyamoorthy/CountryInfos

repo_name: babu-kaliyamoorthy/CountryInfos


text:
# Weather Dashboard

## Description

This application allows a user to find out the current weather for the city they enter in a search bar.

The information they will see includes:

* City name and current date (Month/Day/Year):

* An icon indicated current conditions (i.e., sunny, cloudy, rain, snow, etc.)

* Temperature: (measured in Fahrenheit, with 1 decimal point).

* Humidity: (0-100%).

* Wind Speed: (in MPH).

* UV Index: (with styling that indicates whether the value is favorable (green), moderate (golden-yellow) or severe (red)).

As well, they will see a 5-Day Forecast below the current weather section. This forecast is for the next 5 days, not including the current day.

Each individual card shows:

* The respective date (Month/Day/Year)

* An icon indicated projected conditions (sunny, cloudy, rain, snow, etc.)

* Temperature: (measured in Fahrenheit, with 2 decimal points).

* Humidity: (0-100%).

## Usage

To start, a user just needs to enter the location they wish to see weather info for in the search bar, then click the search button.

They will then see the current weather and date, including the temperature, humidity, wind speed and UV index, and an icon indicating current conditions (sunny, cloudy, rain, snow, etc).

As well, they will see the 5-Day forecast, each day showing the temperature, humidity level and an icon indicating projected conditions (sunny, cloudy, rain, snow, etc).

## Finished Application

Check the current weather and 5-Day forecast now:

[Weather Dashboard](https://mikeh138.github.io/weather-dashboard/)

![Preview of Weather Dashboard](./assets/images/preview.JPG)

## Code of Conduct

[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg)](code_of_conduct.md)

## License

© 2020 Mike Henson

Licensed under the [MIT](LICENSE.txt) license.


text:
# PyBro - A simple **Py**thon Web **Bro**wser

## Requirements
* Python 3+
* wxPython

## Usage
Clone the repo:
```
git clone https://github.com/mistergates/PyBro.git
```

Change into repo directory:
```
cd PyBro
```

Install requirements:
```
pip install -r requirements.txt
```

Launch browser:
```
python -m PyBro
```

repository: mistergates/PyBro

repo_name: mistergates/PyBro


text:
# Ground truth recordings for validation of spike sorting algorithms

@author: Samuel Garcia

Spampinato from Institut de la Vision have publish data from mice retina recorded with from dense array.
The data contain one ground truth to benchmark spike sorting tools.

Here the official publication of this open dataset:
https://zenodo.org/record/1205233#.W9mq1HWLTIF

This datasets was used by Pierre Yger publish spyking circus:
https://elifesciences.org/articles/34518

Here 2 notebooks:
  * **prepare_and_check_ground_truth.py.ipynb**: prepare files, detect juxta cellular and check validity
  * **sorter_comparison.ipynb** : comparison of severals sorters on this datasets

that compare some sorter on theses recording.

Each recording have several units and **one** of theses have a ground truth recorded with juxta cellular.
The SNR on MEA is differents on each file so we can easily compare the false positive and true positive score by sorter and SNR.

repository: samuelgarcia/spikeresults

repo_name: samuelgarcia/spikeresults


text:
<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) > [@remirror/core](./core.md) > [HelpersFromExtensions](./core.helpersfromextensions.md)

## HelpersFromExtensions type

Utility type which receives an extension and provides the type of helpers it makes available.

<b>Signature:</b>

```typescript
export declare type HelpersFromExtensions<GExtension extends AnyExtension> = UnionToIntersection<MapHelpers<GExtension['_H']>>;
```

repository: tomas-c/remirror

repo_name: tomas-c/remirror


text:
--------------------------------------------------------------------------------

## Treebank Statistics (UD_Kazakh)

There are 7 `ADP` lemmas (3%), 9 `ADP` types (3%) and 13 `ADP` tokens (2%).
Out of 15 observed tags, the rank of `ADP` is: 8 in number of lemmas, 9 in number of types and 9 in number of tokens.

The 10 most frequent `ADP` lemmas: лы, кейін, басқа, бойынша, ретінде, соң, сыз

The 10 most frequent `ADP` types:  кейін, лы, басқа, бойынша, ді, ретінде, соң, сыз, ті

The 10 most frequent ambiguous lemmas:

The 10 most frequent ambiguous types:

## Morphology

The form / lemma ratio of `ADP` is 1.285714 (the average of all parts of speech is 1.240602).

The 1st highest number of forms (3) was observed with the lemma “лы”: ді, лы, ті.

The 2nd highest number of forms (1) was observed with the lemma “басқа”: басқа.

The 3rd highest number of forms (1) was observed with the lemma “бойынша”: бойынша.

`ADP` does not occur with any features.

## Relations

`ADP` nodes are attached to their parents using 1 different relations: [kk-dep/case]() (13; 100% instances)

Parents of `ADP` nodes belong to 2 different parts of speech: [NOUN]() (12; 92% instances), [VERB]() (1; 8% instances)

13 (100%) `ADP` nodes are leaves.

The highest child degree of a `ADP` node is 0.

repository: PhyloStar/UDTelugu

repo_name: PhyloStar/UDTelugu


text:
# custom aggregators translated correctly

    Code
      test_translate_sql(quantile(x, 0.5, na.rm = TRUE), window = FALSE)
    Condition
      Error in `quantile()`:
      ! Translation of `quantile()` in `summarise()` is not supported for SQL Server.
      i Use a combination of `distinct()` and `mutate()` for the same result:
        `mutate(<col> = quantile(x, 0.5, na.rm = TRUE)) %>% distinct(<col>)`
    Code
      test_translate_sql(median(x, na.rm = TRUE), window = FALSE)
    Condition
      Error in `median()`:
      ! Translation of `median()` in `summarise()` is not supported for SQL Server.
      i Use a combination of `distinct()` and `mutate()` for the same result:
        `mutate(<col> = median(x, na.rm = TRUE)) %>% distinct(<col>)`

# custom lubridate functions translated correctly

    Code
      test_translate_sql(month(x, label = TRUE, abbr = TRUE))
    Condition
      Error in `month()`:
      ! `abbr = TRUE` isn't supported in SQL Server translation.
      i It must be FALSE instead.

# convert between bit and boolean as needed

    Code
      mf %>% filter(is.na(x))
    Output
      <SQL>
      SELECT `df`.*

      FROM `df`
      WHERE (`x` = 1 OR `x` = 2)

---

    Code
      mf %>% mutate(z = ifelse(x == 1L, 1L, 2L))
    Output
      <SQL>
      SELECT `df`.*, IIF(`x` = 1, 1, 2) AS `z`
      FROM `df`

---

    Code
      mf %>% mutate(z = case_when(x == 1L ~ 1L))
    Output
      <SQL>
      SELECT `df`.*, CASE WHEN (`x` = 1) THEN 1 END AS `z`
      FROM `df`

---

    Code
      mf %>% mutate(z = !is.na(x))
    Output
      <SQL>
      SELECT `df`.*, ~CAST(IIF((`x` IS NULL), 1, 0) AS BIT) AS `z`
      FROM `df`

---

    Code
      mf %>% mutate(x = x == 1L)
    Output
      <SQL>
      SELECT CAST(IIF(`x` = 1, 1, 0) AS BIT) AS `x`
      FROM `df`

---

    Code
      mf %>% mutate(x = x == 1L || x == 2L)
    Output
      <SQL>
      SELECT CAST(IIF(`x` = 1 OR `x` = 2, 1, 0) AS BIT) AS `x`
      FROM `df`

---

    Code
      mf %>% mutate(x = x == 1L || x == 2L || x == 3L)
    Output
      <SQL>
      SELECT CAST(IIF(`x` = 1 OR `x` = 2 OR `x` = 3, 1, 0) AS BIT) AS `x`
      FROM `df`

---

    Code
      mf %>% mutate(x = !(x == 1L || x == 2L || x == 3L))
    Output
      <SQL>
      SELECT ~CAST(IIF((`x` = 1 OR `x` = 2 OR `x` = 3), 1, 0) AS BIT) AS `x`
      FROM `df`

# handles ORDER BY in subqueries

    Code
      sql_query_select(simulate_mssql(), ident("x"), ident("y"), order_by = "z",
      subquery = TRUE)
    Condition
      Warning:
      ORDER BY is ignored in subqueries without LIMIT
      i Do you need to move arrange() later in the pipeline or use window_order() instead?
    Output
      <SQL> SELECT `x`
      FROM `y`

# custom limit translation

    Code
      sql_query_select(simulate_mssql(), ident("x"), ident("y"), order_by = ident("z"),
      limit = 10)
    Output
      <SQL> SELECT TOP 10 `x`
      FROM `y`
      ORDER BY `z`

# custom escapes translated correctly

    Code
      mf %>% filter(x == a)
    Output
      <SQL>
      SELECT `df`.*
      FROM `df`
      WHERE (`x` = 0x616263)

---

    Code
      mf %>% filter(x %in% L)
    Output
      <SQL>
      SELECT `df`.*
      FROM `df`
      WHERE (`x` IN (0x616263, 0x0102))

---

    Code
      qry
    Output
      <SQL>
      SELECT `df`.*
      FROM `df`
      WHERE (`x` IN (0x616263, 0x0102))

# logical escaping to 0/1 for both filter() and mutate()

    Code
      mf %>% filter(x == TRUE)
    Output
      <SQL>
      SELECT `df`.*
       ROW_NUMBER() OVER (ORDER BY RAND()) AS `col01`
        FROM `df`
      ) AS `q01`
      WHERE (`col01` <= 1)

---

    Code
      copy_inline(con, tibble(x = 1:2, y = letters[1:2])) %>% remote_query()
    Output
      <SQL> SELECT
        TRY_CAST(TRY_CAST(`x` AS NUMERIC) AS INT) AS `x`,
        TRY_CAST(`y` AS VARCHAR(MAX)) AS `y`
      FROM (  VALUES (1, 'a'), (2, 'b')) AS drvd(`x`, `y`)

---

    Code
      copy_inline(con, trees) %>% remote_query()
    Output
      <SQL> SELECT
        TRY_CAST(`Girth` AS FLOAT) AS `Girth`,
        TRY_CAST(`Height` AS FLOAT) AS `Height`,
        TRY_CAST(`Volume` AS FLOAT) AS `Volume`
      FROM (
        VALUES
          (8.3, 70.0, 10.3),
          (8.6, 65.0, 10.3),
          (8.8, 63.0, 10.2),
          (10.5, 72.0, 16.4),
          (10.7, 81.0, 18.8),
          (10.8, 83.0, 19.7),
          (11.0, 66.0, 15.6),
          (11.0, 75.0, 18.2),
          (11.1, 80.0, 22.6),
          (11.2, 75.0, 19.9),
          (11.3, 79.0, 24.2),
          (11.4, 76.0, 21.0),
          (11.4, 76.0, 21.4),
          (11.7, 69.0, 21.3),
          (12.0, 75.0, 19.1),
          (12.9, 74.0, 22.2),
          (12.9, 85.0, 33.8),
          (13.3, 86.0, 27.4),
          (13.7, 71.0, 25.7),
          (13.8, 64.0, 24.9),
          (14.0, 78.0, 34.5),
          (14.2, 80.0, 31.7),
          (14.5, 74.0, 36.3),
          (16.0, 72.0, 38.3),
          (16.3, 77.0, 42.6),
          (17.3, 81.0, 55.4),
          (17.5, 82.0, 55.7),
          (17.9, 80.0, 58.3),
          (18.0, 80.0, 51.5),
          (18.0, 80.0, 51.0),
          (20.6, 87.0, 77.0)
      ) AS drvd(`Girth`, `Height`, `Volume`)

# `sql_query_insert()` is correct

    Code
      sql_query_insert(con = con, table = ident("df_x"), from = sql_render(df_y, con,
        lvl = 1), insert_cols = colnames(df_y), by = c("a", "b"), conflict = "ignore",
      returning_cols = c("a", b2 = "b"))
    Output
      <SQL> INSERT INTO `df_x` (`a`, `b`, `c`, `d`)
      OUTPUT `INSERTED`.`a`, `INSERTED`.`b` AS `b2`
      SELECT *
      FROM (
        SELECT `a`, `b`, `c` + 1.0 AS `c`, `d`
        FROM `df_y`
      ) AS `...y`
      WHERE NOT EXISTS (
        SELECT 1 FROM `df_x`
        WHERE (`df_x`.`a` = `...y`.`a`) AND (`df_x`.`b` = `...y`.`b`)
      )

# `sql_query_append()` is correct

    Code
      sql_query_append(con = con, table = ident("df_x"), from = sql_render(df_y, con,
        lvl = 1), insert_cols = colnames(df_y), returning_cols = c("a", b2 = "b"))
    Output
      <SQL> INSERT INTO `df_x` (`a`, `b`, `c`, `d`)
      OUTPUT `INSERTED`.`a`, `INSERTED`.`b` AS `b2`
      SELECT *
      FROM (
        SELECT `a`, `b`, `c` + 1.0 AS `c`, `d`
        FROM `df_y`
      ) AS `...y`

# `sql_query_update_from()` is correct

    Code
      sql_query_update_from(con = con, table = ident("df_x"), from = sql_render(df_y,
        con, lvl = 1), by = c("a", "b"), update_values = sql(c = "COALESCE(`df_x`.`c`, `...y`.`c`)",
        d = "`...y`.`d`"), returning_cols = c("a", b2 = "b"))
    Output
      <SQL> UPDATE `df_x`
      SET `c` = COALESCE(`df_x`.`c`, `...y`.`c`), `d` = `...y`.`d`
      OUTPUT `INSERTED`.`a`, `INSERTED`.`b` AS `b2`
      FROM `df_x`
      INNER JOIN (
        SELECT `a`, `b`, `c` + 1.0 AS `c`, `d`
        FROM `df_y`
      ) AS `...y`
        ON `...y`.`a` = `df_x`.`a` AND `...y`.`b` = `df_x`.`b`

# `sql_query_delete()` is correct

    Code
      sql_query_delete(con = simulate_mssql(), table = ident("df_x"), from = sql_render(
        df_y, simulate_mssql(), lvl = 2), by = c("a", "b"), returning_cols = c("a",
        b2 = "b"))
    Output
      <SQL> DELETE FROM `df_x`
      OUTPUT `DELETED`.`a`, `DELETED`.`b` AS `b2`
      WHERE EXISTS (
        SELECT 1 FROM (
          SELECT `a`, `b`, `c` + 1.0 AS `c`, `d`
          FROM `df_y`
      ) AS `...y`
        WHERE (`...y`.`a` = `df_x`.`a`) AND (`...y`.`b` = `df_x`.`b`)
      )

# `sql_query_upsert()` is correct

    Code
      sql_query_upsert(con = con, table = ident("df_x"), from = sql_render(df_y, con,
        lvl = 1), by = c("a", "b"), update_cols = c("c", "d"), returning_cols = c("a",
        b2 = "b"))
    Output
      <SQL> MERGE INTO `df_x`
      USING (
        SELECT `a`, `b`, `c` + 1.0 AS `c`, `d`
        FROM `df_y`
      ) AS `...y`
        ON `...y`.`a` = `df_x`.`a` AND `...y`.`b` = `df_x`.`b`
      WHEN MATCHED THEN
        UPDATE SET `c` = `...y`.`c`, `d` = `...y`.`d`
      WHEN NOT MATCHED THEN
        INSERT (`a`, `b`, `c`, `d`)
        VALUES (`...y`.`a`, `...y`.`b`, `...y`.`c`, `...y`.`d`)
      OUTPUT `INSERTED`.`a`, `INSERTED`.`b` AS `b2`
      ;

# row_number() with and without group_by() and arrange(): unordered defaults to Ordering by NULL (per empty_order)

    Code
      mf %>% mutate(rown = row_number())
    Output
      <SQL>
      SELECT `df`.*, ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) AS `rown`
      FROM `df`

---

    Code
      mf %>% group_by(y) %>% mutate(rown = row_number())
    Output
      <SQL>
      SELECT
        `df`.*,
        ROW_NUMBER() OVER (PARTITION BY `y` ORDER BY (SELECT NULL)) AS `rown`
      FROM `df`

---

    Code
      mf %>% arrange(y) %>% mutate(rown = row_number())
    Output
      <SQL>
      SELECT `df`.*, ROW_NUMBER() OVER (ORDER BY `y`) AS `rown`
      FROM `df`
      ORDER BY `y`

repository: tidyverse/dbplyr

gha_language: R

repo_name: tidyverse/dbplyr


text:
# fortnox4j
API to communicate with Fortnox (https://www.fortnox.se)

After cloning this repository from git, use Import Existing Maven Project to work with it in eclipse.

To successfully run `mvn test`

Copy file

src/test/resources/FortnoxClientListSample.xml

to

src/test/resources/FortnoxClientList.xml

and set your own credentials.

## Usage

See the test classes in org.notima.api.fortnox.junit.* for coding examples on how to use this library.

The credentials for accessing a Fortnox entity are normally put in an xml-file and pointed to by

* A constructor parameter pointing to the configuration file
* An empty constructor and then calling setAccessToken with the credentials
* OS Environment variable FORTNOX4JFILE pointing to configuration file

ex. export FORTNOX4JFILE=/home/user/fortnoxClients.xml
* Java Environment variable Fortnox4JFile pointing to configuration file.

ex. -DFortnox4JFile=/home/user/fortnoxClients.xml

See the file [FortnoxClientListSample.xml](https://github.com/notima/fortnox4j/blob/master/src/test/resources/FortnoxClientListSample.xml) for an example of the file structure.

### Example

When you have a FortnoxClient.xml file you can easily retrieve a Fortnox client with the orgNo as a parameter.

```
String orgNo = "SOMETHING";

FortnoxClientInfo ci = null;
FortnoxClientList clist = FortnoxUtil.readFortnoxClientListFromFile("fortnoxClients.xml");
if (orgNo!=null) {
	ci = clist.getClientInfoByOrgNo(orgNo);
} else {
	ci = clist.getFirstClient();
}

FortnoxClient3 fclient = new FortnoxClient3(ci.getAccessToken(), ci.getClientSecret());

```

## Maven

Releases are found in Maven-Central repository and can easliy be used by adding a dependency to your pom.xml.

    <dependency>
        <groupId>org.notima.api</groupId>
        <artifactId>fortnox4j</artifactId>
        <version>1.8.9</version>
    </dependency>

Or karaf

	install -s mvn:org.apache.httpcomponents/httpcore-osgi/4.4.12
	install -s mvn:org.apache.httpcomponents/httpclient-osgi/4.5.10
	install -s mvn:org.notima.piggyback-tools/0.0.2
	install -s mvn:org.notima.api/fortnox4j


text:
## Uptime Checker

Check if your sites are online for $7/mo.

[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://www.heroku.com/deploy/?template=https://github.com/fnando/uptime_checker)

## Configuration

1. Fork this repository. Make sure you hit the "Watch" button on this Github repository, so you can see when you have to update your own fork.
2. Create a branch from `master`.
3.
4. To keep up with `master`, switch to `master` and run `git pull`. Then switch to your branch and run `git rebase master`. This assumes you didn't touch any of the files, so you won't have any merging issues.

### Environment variables

You can configure some options; just define the following environment variables.

- `LOCALE`: the locale. Defaults to `en`. Check available languages at https://github.com/fnando/uptime_checker/tree/master/lib/uptime_checker/locales
- `TIMEZONE`: the timezone. Defaults to `Etc/UTC`.
- `INTERVAL`: the number of seconds between each verification. Defaults to `30`.
- `UPTIME_CHECKER_STORE`: the store type you're going to use. Can be `database` or `redis`. Defaults to `redis`. If you choose `database`, make sure `DATABASE_URL` is defined.

 Here's an example:

```yaml
# these are the default notifications
notify: &notify
  - stdout: ~
  - email<EMAIL_ADDRESS>  - slack: "#core"
  - telegram: 12345678
  - hipchat: 456789
  - twitter: johndoe

checkers:
  - name: My Site
    url: http://example.com
    notify: *notify
    status: 200

  - name: Other site
    url: http://sub.example.com
    notify: *notify
    status: 200
    body: My Other Site
```

You can configure the file location by setting the `CONFIG_FILE` environment variable.

Notice that you can have multiple notifications for the same notifier. Say you also want to send e-mail notification to<EMAIL_ADDRESS>
```yaml
# these are the default notifications
notify: &notify
  - email<EMAIL_ADDRESS>  - email<EMAIL_ADDRESS>
# ...
```

For more information about the notifiers, keep reading this README.

#### Failures threshold

You can set the minimum number of failures before triggering the notification. By default you'll be notified every time a check fails.

The following example will send notifications only when check fails three times.

```yaml
checkers:
  - name: My Site
    url: http://example.com
    notify: *notify
    min_failures: 3
```

### Deployment

#### Deploying to a VPS

You can deploy uptime_checker to a VPS. If you know how to deploy a Rails application, you won't have any issues deploying uptime_checker.

If you don't, instructions to come. Use Heroku in the meantime.

#### Deploying to Heroku

First, clone this repository.

```
git clone https://github.com/fnando/uptime_checker.git
```

Create a new branch.
```

Now, configure Heroku. Create a new app for this.

```
heroku create
```

Now you have to choose your state store type. You may use [Redis](https://redis.io) or [PostgreSQL](https://postgresql.org).

For Redis, use the following command:

```
heroku addons:create heroku-redis
```

For PostgreSQL, use the following command:

```
heroku addons:create heroku-postgresql
```

If you're going to send e-mail notification, you'll need Sendgrid as well.

```
heroku addons:create sendgrid:starter
```

Time to deploy:

```
git push heroku mybranch:master
```

If you're using PostgreSQL, also run `heroku run 'bundle exec sequel -m migrations $DATABASE_URL'`.

## Notifiers

### Telegram

1. Create a bot. The returned API token must be defined as `TELEGRAM_API_TOKEN` environment variable.
2. Create a new group.
3. Add bot to the group you just created.
4. Go to @BotFather and `/setprivacy` to `enabled`. You also have to `/setjoingroups` to `disabled`.
5. Go to the group you created and send a message to the bot; use something like `@YouBotName hello`.
6. Run `ruby setup/telegram.rb` locally to get the channel id. You may need to install the dependencies with `bundle install` before doing it so.
7. Set the notification as `telegram: <chat id>`. Sometimes id can be a negative number and this is important.

Example:

```yaml
# these are the default notifications
notify: &notify
  - telegram: 12345

checkers:
  - name: My Site
    url: http://example.com
    notify: *notify
    status: 200
```

![Telegram Notifications](https://raw.githubusercontent.com/fnando/uptime_checker/master/screenshots/telegram.png)

### E-mail

**Note:** Currently only SendGrid is supported.

1. Set your username as `SENDGRID_USERNAME` environment variable.
2. Set your password as `SENDGRID_PASSWORD` environment variable.
3. Set the notification as `email: <email address>`.

Example:

```yaml
# these are the default notifications
notify: &notify
  - email<EMAIL_ADDRESS>
checkers:
  - name: My Site
    url: http://example.com
    notify: *notify
    status: 200
```

![Email Notifications](https://raw.githubusercontent.com/fnando/uptime_checker/master/screenshots/email.png)

### Twitter

1. Create an user for your bot.
2. Follow your bot, and make your bot follow you.
3. Create a new Twitter application under your bot's account at https://apps.twitter.com/app/new
4. Go to "Keys and Access Tokens" and create a new access token.
5. Set `TWITTER_CONSUMER_KEY`, `TWITTER_CONSUMER_SECRET`, `TWITTER_ACCESS_TOKEN` and `TWITTER_ACCESS_SECRET` environment variables, all available under "Keys and Access Token".
6. Set the notification as `twitter: <username>`.

Example:

```yaml
# these are the default notifications
notify: &notify
  - twitter: johndoe

checkers:
  - name: My Site
    url: http://example.com
    notify: *notify
    status: 200
```

![Twitter Notifications](https://raw.githubusercontent.com/fnando/uptime_checker/master/screenshots/twitter.png)

### Slack

1. Create a new bot user at https://my.slack.com/services/new/bot
2. Set the API token as the `SLACK_API_TOKEN` environment variable.
3. Set the channel name as `slack: "#channel"`.

```yaml
# these are the default notifications
notify: &notify
  - slack: "#core"

checkers:
  - name: My Site
    url: http://example.com
    notify: *notify
    status: 200
```

![Slack Notifications](https://raw.githubusercontent.com/fnando/uptime_checker/master/screenshots/slack.png)

### Campfire

1. Create a new bot user.
2. Logged in as the bot user, go to `https://<your subdomain>.campfirenow.com/member/edit` to get the API token, that must be set as `CAMPFIRE_API_TOKEN`, together with the `CAMPFIRE_SUBDOMAIN`.
3. Set the notification as `campfire: <room id>`.

```yaml
# these are the default notifications
notify: &notify
  - campfire: 123456

checkers:
  - name: My Site
    url: http://example.com
    notify: *notify
    status: 200
```

![Campfire Notifications](https://raw.githubusercontent.com/fnando/uptime_checker/master/screenshots/campfire.png)

### Pushover

To be notified through iOS/Android push notifications, you can use Pushover ($5 for a lifetime license). You can also buy a lifetime license for desktop notifications.

1. Create a new application at https://pushover.net/apps/build
2. Set the API token as the `PUSHOVER_APPLICATION_TOKEN` environment variable.
3. Set the notification as `pushover: <user token>`.

To avoid committing your user token, you can set it as an environment variable (e.g. `PUSHOVER_JOHN`), and then use eRb code like the following:

```yaml
# these are the default notifications
notify: &notify
  - pushover: <%= ENV["PUSHOVER_JOHN"] %>

checkers:
  - name: My Site
    url: http://example.com
    notify: *notify
    status: 200
```

![Pushover Notifications](https://raw.githubusercontent.com/fnando/uptime_checker/master/screenshots/pushover.png)


text:
	:heavy_check_mark: NextLevelWeek 3.0 🚀 Done!!!!:heavy_check_mark:

  Next Level Week   |
  Project   |
  Technologies   |
  Layout   |
  License

## :information_source: What's Next Level Week?

NLW is a practical week with lots of code, challenges, networking and a single objective: to take you to the next level.

### Days
- 1º Dia: Acelerando sua evolução 12/10 - :heavy_check_mark:
- 2º Dia: Olhando as oportunidades 13/10 - :heavy_check_mark:
- 3º Dia: A escolha da Stack 14/10 - :heavy_check_mark:
- 4º Dia: Até 2 anos em 2 meses 15/10 - :heavy_check_mark:
- 5º Dia: Milha extra 16/10 - :heavy_check_mark:

## 💻 Project

Happy is a project developed based on Children's Day.
That aims to connect people to orphanages that allow to make a children's day more special.

### 🛠 Technologies

The following tools were used in the construction of the project:

- [Expo](https://expo.io/)
- [Node.js](https://nodejs.org/en/)
- [React](https://pt-br.reactjs.org/)
- [React Native](https://reactnative.dev/)
- [TypeScript](https://www.typescriptlang.org/)

## :memo: License

This project is under the MIT license. See the [LICENSE](https://github.com/fredericoespeschit/happy/blob/master/LICENSE) for details.


text:
```
@article{2020arXiv200307573B,
archivePrefix = {arXiv},
arxivId = {cs.CV/2003.07573},
author = {Brama, Haya and Grinshpoun, Tal},
eprint = {2003.07573},
journal = {arXiv e-prints},
keywords = {Computer Science - Computer Vision and Pattern Rec,Computer Science - Machine Learning,Computer Science - Neural and Evolutionary Computi},
month = {mar},
pages = {arXiv:2003.07573},
primaryClass = {cs.CV},
title = {{Heat and Blur: An Effective and Fast Defense Against Adversarial Examples}},
year = {2020}
}
```

## Motivation
Some existing methods can increase NNs' robustness, but they often require special architecture or training procedures and are irrelevant to already trained models.

## Methods
It claims that the NN preservers the same info of correct labels for benign and adversarial images, illustrated as a heatmap.

Basicly, it produces a heatmap to identify the primary object. It looks like a kind of attention.

repository: tao-bai/attack-and-defense-methods

repo_name: tao-bai/attack-and-defense-methods


text:
## Install and Test
1. Enter the folder.
2. If you don't have bundler installed: `gem install bundler`
3. Install Ruby gems: `bundle install`
4. Start Jekyll server: `bundle exec jekyll serve --watch`

gha_language: HTML


text:
# bfscore_python
Boundary F1 Score - Python Implementation

This is an open-source python implementation of bfscore (Contour matching score for image segmentation) for multi-class image segmentation, implemented by EMCOM LAB, SEOULTECH.

Reference: [Matlab bfscore](https://www.mathworks.com/help/images/ref/bfscore.html)

# Run
To run the function simply run `python bfscore.py` after setting your image paths and threshold.

# Crosscheck
Score cross-checking with built-in Matlab function is done and presented in `bfscore.pptx`.