text:
# Installation

### Binary Download

Currently confd ships binaries for OS X and Linux 64bit systems. You can download the latest release from [GitHub](https://github.com/abtreece/confd/releases)

#### OS X

```
$ wget https://github.com/abtreece/confd/releases/download/v0.18.0/confd-0.18.0-darwin-amd64
```

#### Linux

Download the binary
```
$ wget https://github.com/abtreece/confd/releases/download/v0.18.0/confd-0.18.0-linux-amd64
```
Move the binary to an installation path, make it executable, and add to path
```
mkdir -p /opt/confd/bin
mv confd-0.18.0-linux-amd64 /opt/confd/bin/confd
chmod +x /opt/confd/bin/confd
export PATH="$PATH:/opt/confd/bin"
```

#### Building from Source

```
$ make build
$ make install
```

#### Building from Source for Alpine Linux

Since many people are using Alpine Linux as their base images for Docker there's support to build Alpine package also. Naturally by using Docker itself. :)

```
$ docker build -t confd_builder -f Dockerfile.build.alpine .
$ docker run -ti --rm -v $(pwd):/app confd_builder make build
```
The above docker commands will produce binary in the local bin directory.

repository: abtreece/confd

repo_name: abtreece/confd


text:
# Design Document

The purpose of this Node.js application is to hide small amount of data (relative to the image) inside a PNG file. Data can be extracted from the manipulated image using the same key that was used to encrypt the message.

## Algorithms and Data Structures

The application utilizes merge sort to sort individual pixels based on their RGB sum (R + G + B). Merge sort was selected since it is generic O(log(n)) sorting algorithm. Sorted pixels will be stored in a double-ended queue which provides fast access to both ends of the queue. This is necessary since we manipulate pixels at both ends. The side of the queue we select is dependent of the user's key. Based on previous algorithms, space complexity will be O(n).

## Input and Output

### Hiding data

There will be 3 required parameters and 1 optional parameter:

```bash
# -i => path to PNG image
# -f => path to file that will be hidden in image
# -k => path to key file
# -o => name of the generated PNG file (defaul: 'out.png') *OPTIONAL*

# Example
npm start -- -i ~/Desktop/cat.png -f ../text.txt -k ../key.txt -o secret-cat.png
```

### Extracting data

There will be 4 required parameters:

```bash
# -e => for extraction
# -i => path to PNG image
# -k => path to key file
# -o => name of the generated file

# Example
npm start -- -e -i ~/Desktop/secret-cat.png -k ../key.txt -o secret.txt
```

## Illustration

Simplified picture how data hiding will work

![Data hiding illustration](./images/simplified-data-hiding.png)

## Sources

[Steganography](https://en.wikipedia.org/wiki/Steganography)

[Merge sort](https://en.wikipedia.org/wiki/Merge_sort)

[Double-ended queue](https://en.wikipedia.org/wiki/Double-ended_queue)

[Stack](<https://en.wikipedia.org/wiki/Stack_(abstract_data_type)>)

license: MIT

repository: valtterikodisto/png-steganography

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive

repo_name: valtterikodisto/png-steganography


text:
Leaves are turning, midterms are looming, and that means racecar is back in session. This year I'm excited to be work on MIT Motorsports FSAE Electric Racecar and to join Formula Student Driverless for their second year of collaboration with DUT Delft.

MIT Driverless is a really exciting project and I definitely plan to have updates on my vehicle modelling and controls work with them. For the moment though, I really want to document my power limiting work for Motorsports's Electric team.

"What is power limiting," you ask. "Don't you want to use more power?" More power is more acceleration is faster lap times. A major goal of the team this year is to increase the rms power output from 15 kW to 25 kW. This requires a big technical leap to liquid battery cooling and is an exciting project for the battery team.

My job is to limit peak power. Our rules require us to draw no more 80 kW from the battery. At competition, the EE judge Dan Bocci actually installs a custom e-meter into the high voltage system to monitor compliance. In 2018, our racecar exceeded the limit for about 5 milliseconds off the line - enough to get us dequeued from the endurance event. It was real blow to the points total that year.

 Little over the limit in this run.

They've since changed the rules to just add a minute penalty, but limiting power is still required to have a competitive car. Our unlimited runs with the 2019 car have shown it will happily use more than 100 kW during acceleration if we let it. During competition we had to limit the driver's maximum torque command by about a third to prevent exceeding the power limit. This was a big performance hit.

I'm responsible for implementing a better solution this year - one which only limits torque as necessary. The mechanical engineers in the audience might already have an idea for a strategy.

We can compute mechanical power, $ P = \tau \cdot \omega $, right? And we know motor speed from the Emrax motor's resolver. So can't we just limit torque, $ \tau = \frac{P}{\omega} $ such to never exceed 80 kW? There could be some inaccuracies from variation in motor efficiency over the torque-speed curve, but nothing a dynometer test and look-up table won't solve.

 An untrusted estimate of the motor's map

The issue with this strategy is that we've not yet been able to successfully run a dynometer test and that it difficult to estimate the actual torque (and therefore efficiency) produced while driving.

We use a Rinehart motor controller. It is a very nice, very fancy machine which has been the bane of three power limiting leads. The inverter introduces many quirks that make predicting efficiency harder.

The Rinehart has its own internal control loop which converts a torque command to a $I_q$ target for field-oriented control. It then does PID control to track this target. This introduces the problem that the Rinehart usually isn't producing exactly the torque you are commanding. If you try to later try to calculate efficiency using recorded electrical power, torque command, and resolver speed you'll get incorrect inefficiencies. This includes efficiencies which are greater than $1$ or less than $0$ because frequently the vehicle won't be producing as much torque as you are commanding. Part of this is just the traction limit of the car.

 Field Oriented Control

The Rinehart does give us a measurement called feedback torque which uses $I_q$ to produce a prediction of how much torque. However, this prediction is based on a linear relationship between $I_q$ and torque, when the relationship is non-linear. We could try to back out torque for ourselves using $I_q$ but it is hard to be confident of your results.

Field weakening introduces another level of complexity. Motor and generators are essentially the same device and so spinning a motor generates a back-emf proportional to speed. When this back-emf equals your bus voltage, you've reached the motor's maximum speed and can't command any more torque. The Emrax's max speed with our battery voltage is less than the speeds we could see while driving and less than the thermal and mechanical speed limits of the motor. To command torque at higher speeds we use the Rinehart to produce $I_d$ current and produce torque over what would be the speed limit.

 Field weakening is the decaying torque portion of this graph

However, field weakening greatly reduces efficiency since $I_d$ current doesn't produce torque. The onset of field weakening is depends on voltage which can sag and which changes as the battery is drained. This adds a third dimension to our lookup table.

If we want to run with different amounts of $I_d$ current (which we sometimes do) or control temperature you could need to add even more dimensions. The amount of data required and size of your lookup table quickly becomes impractical.

We've done a fair bit of analysis using just feedback torque and speed, but I think the way we'll ultimately resolve this either by finally running a dynometer test or by using the magnetoelastic torque sensor we're adding to model year 2020's drivetrain to measure actual torque.

We use jupyter notebooks for data processing. Here's the link to the [live-hosted repository](https://mybinder.org/v2/gh/CharlieA0/james-watt/master).


text:
# Farhan Angullia (angullia)

> coolcoolcoolcoolcooo

![Meme](/lambdameme4.jpg)
<cite>Change my mind...</cite>

---

**Farhan** is a Tech U Resident from Professional Services for [Amazon Web Services (AWS)][aws].

He enjoys DJing and FPS gaming (i.e CounterStrike).

---

| ///      | ///                                                            |
| -------- | -------------------------------------------------------------- |
| LinkedIn | [farhan-angullia](https://linkedin.com/in/farhan-angullia) |
| Github   | [farhanangullia](https://github.com/farhanangullia)      |
| SoundCloud   | [djfarmosaofficial](https://soundcloud.com/djfarmosaofficial)                     |

[aws]: https://aws.amazon.com

repository: celinadine/git-freedom-wall

repo_name: celinadine/git-freedom-wall


text:
# Blade
Tool for automatic processing of a large amount of sequencing data.

## Description
Blade was implemented to automatically run any executable on a large amount of sequencing data. The used executable must accept sequencing data in FASTA/FASTQ format (with support for compression via gzip) as positional argument. For tools which have different interfaces, a simple encapsulation script can be used instead. If a reference genome is present, it will be passed as the second positional argument to the used executable.

## Dependencies
1. python 2.x or python 3.x
2. cmake 3.2+

## Instalation
To install Blade run the following commands:

```bash
git clone https://github.com/rvaser/blade.git blade
cd blade
mkdir build
cd build
cmake ..
make
```

After successful installation, an executable name `blade` will appear in `build/bin`.

## Usage
Usage of `blade` is as following:

    blade [options ...] executable path [path ...]

        <executable>
            executable which takes reads in FASTA/FASTQ format (with gzip support)
            as positional argument; if present, a file with the reference genome
            in FASTA format will be passed as the second positional argument
            (supported file names are those that contain the word reference)
        <path>
            path to directory which somewhere in its directory tree contains
            compressed/uncompressed sequencing data in FASTA/FASTQ format
            (supported file extensions are .fa, .fasta, .fq, .fastq, .fa.gz,
            .fasta.gz, .fq.gz and .fastq.gz)

        options:
            -r, --reference-required
                ignore data sets without reference genomes
            -h, --help
                prints the usage

## Contact information
For additional information, help and bug reports please send an email to<EMAIL_ADDRESS>
## Acknowledgement
This work has been supported in part by Croatian Science Foundation under the project UIP-11-2013-7353.

repository: rvaser/blade

repo_name: rvaser/blade


text:
# azure_devops_sdk.model.ProjectInfo

## Load the model package
```dart
import 'package:azure_devops_sdk/api.dart';
```

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**abbreviation** | **String** | The abbreviated name of the project. | [optional] [default to null]
**description** | **String** | The description of the project. | [optional] [default to null]
**id** | **String** | The id of the project. | [optional] [default to null]
**lastUpdateTime** | [**DateTime**](DateTime.md) | The time that this project was last updated. | [optional] [default to null]
**name** | **String** | The name of the project. | [optional] [default to null]
**properties** | [**List<ProjectProperty>**](ProjectProperty.md) | A set of name-value pairs storing additional property data related to the project. | [optional] [default to []]
**revision** | **int** | The current revision of the project. | [optional] [default to null]
**state** | **String** | The current state of the project. | [optional] [default to null]
**uri** | **String** | A Uri that can be used to refer to this project. | [optional] [default to null]
**version** | **int** | The version number of the project. | [optional] [default to null]
**visibility** | **String** | Indicates whom the project is visible to. | [optional] [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


text:
## _Interesting-shell-scripts_
A few interesting shell scripts which we come across in our normal daily life

## _jpg2png.sh_
A shell script jpg2png.sh  converts all images in JPEG format in the current directory to PNG format.
It is  assumed that JPEG files and only JPEG files have the suffix jpg.
If the conversion is succesful the JPEG file should be removed.

## _email_image.sh_
A shell script email_image.sh which given a list of image files as arguments displays them one-by-one. After the user has viewed each image the script will prompt the user for an e-mail address. If the user does enter an email address, the script will prompt the user for a message to accompany the image and then send the image to the specified e-mail address.

## _Pre_requisite.pl_
A Perl script which prints courses which can be used to meet prerequisite requirements for a UNSW course.The script will download the UNSW handbook web pages and extract the information from them when it is run and will print the courses in alphabetic order.

## _unsw_courses.pl _
A Perl script unsw_courses.pl prints the course codes with a given prefix of all UNSW courses with lectures on the Kensington Campus in present session(2017).You can change the year and search accordingly.

## _bash2perl.pl_
A Perl program bash2perl.pl which takes a Bash script as input and outputs an equivalent Perl program.
The Shell (Bash) scripts which do arithmetic calculations which we need to translate to Perl.
The scripts use the arithmetic syntax supported by Bash (and several other shells). Fortunately the scripts only use a very limited set of shell features.

gha_language: Shell


text:
# Question Similarity Test

Testing Jaccard similarity and Cosine similarity techniques to calculate the similarity between two questions.

Jaccard similarity
---

![Jaccard similarity](https://wikimedia.org/api/rest_v1/media/math/render/svg/3e9973bd4dbe77354c43c8d356e50adfc780ed80)

Cosine similarity
---

![Cosine similarity](https://wikimedia.org/api/rest_v1/media/math/render/svg/a71c4add4abded66efd42b202c76f6a59944a587)

Usage instructions
---

- Clone this repository;
- Open solution in Visual Studio (this sample was made using Visual Studio 2017 version 15.7.1);
- Run the project.

Dependencies
---

- .NET Core 2.0.7.

repository: fagnercarvalho/QuestionSimilarityTest

repo_name: fagnercarvalho/QuestionSimilarityTest


text:
# Liu_An-Chaochao_Li_AV_App

## Project Title

Audio/Video App  --- This project will build an audio/video app by using queries and database assets.

Based on Roku Flashback, able to log in, select movies, tv show or audio based on user
profile (adult or kids), and build an API that will let a user comment on the
selection, rate it, and share via social media.

For now, we focus on creating the correct app structure
with some tooling in place (Gulp, SASS etc).

Update log: March-15-2019

There are three main part designs: parent, home, kids. And also some simplified layout change for login, detail, user select page.

The home page is putting everything inside, which include Roku ads and Roku TV ads form Roku official site, and Movies, TV, Music part, and News part. The original home page, which is in the userhomeComponent.js, performs as the detail page, because there are a lot details about movies and music. Therefore, once custom click the exact movie, it will jump into this page and show the information and the custom also can look through other movies’ details in this page by click the thumbnail.

![image](https://github.com/an-liu1/An_Liu-Chaochao_Li_AV_App/blob/master/images/git1.png)

## Getting Started

### Prerequisites

In order to make the project operate well, there is some software necessarily:

#### Developing environment:
1. Node.js ---developing environment
2. Gulp --- insert plugins
3. Sass --- easy coding
4. WAMP --- database
5. PHP --- GET & POST

#### Developing tool:
1. Visual Studio Code
2. Github

#### Developing Languages:
1. HTML5
2. CSS
3. Javascript
4. PHP
5. MySQL

### Built With
* Foundation - The web framework used

### Versioning
* 0.1.0 Working in progress
* 0.1.1 Deleting useless files
* 0.2.0 Change: update code and images
* 0.3.3 Change: update README.md

### Authors
* An Liu --- Designer
* Chaochao Li --- Developer

### License

MIT License

gha_language: HTML


text:
### [CVE-2012-6706](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2012-6706)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

A VMSF_DELTA memory corruption was discovered in unrar before 5.5.5, as used in Sophos Anti-Virus Threat Detection Engine before 3.37.2 and other products, that can lead to arbitrary code execution. An integer overflow can be caused in DataSize+CurChannel. The result is a negative value of the "DestPos" variable, which allows the attacker to write out of bounds when setting Mem[DestPos].

### POC

#### Reference
- http://telussecuritylabs.com/threats/show/TSL20121207-01
- https://lock.cmpxchg8b.com/sophailv2.pdf

#### Github
- https://github.com/ARPSyndicate/cvemon
- https://github.com/abge0386/Final-Project

repository: trickest/cve

branch_name: refs/heads/main

repo_name: trickest/cve


text:
---
published: true
title: Complex Analysis - Introduction to complex numbers and holomorphicity
use_math: true
category: math
layout: default

---

WIP.

**The complex numbers are defined as $$\mathbb{C} = \{ a+bi : a, b \in \mathbb{R}\}$$**. We look at some basic operations on the field and dive into differentiability.

# Basic Operations

Consider two complex numbers $z = a + bi$ and $w = c + di$ in the following:

- The **conjugation** of a complex number $$z$$ is defined as $$\bar{z} = a - bi$$. This is an [isomorphic](https://en.wikipedia.org/wiki/Isomorphism#:~:text=In%20mathematics%2C%20an%20isomorphism%20is,an%20isomorphism%20exists%20between%20them.) map of $$\mathbb{C} \to \mathbb{C}$$.
- A non-zero complex number can be written uniquely in **polar form** as $z = re^{i\theta}$, $r > 0, \theta \in \mathbb{R}$, and $\theta$ is called the **argument**.
- The **norm form** of a complex number $z$ is a measure of its distance from the origin: $$N(z) = a^2 + b^2$$, and is the squared distance: $$N(z) = \|z\|^2$$. The **bilinear form** of two complex numbers $$z,w$$ is defined as $$\langle z, w \rangle = Re(z\bar{w}) = \frac{(ac-b(-d))^2+(a(-d) + bc)^2}{2} = \frac{(ac+bd)^2 + (-ad + bc)^2}{2}$$.
- The **$$Re : \mathbb{C} \to \mathbb{R}$$** gives the real part of a complex number $z$ is $a$, and can be derived as $$Re(z) = \frac{z+\bar{z}}{2}$$. Similarly, the **$$Im : \mathbb{C} \to \mathbb{R}$$** part of a complex number is $$b$$ and can be derived as $$Im(z) = \frac{z - \bar{z}}{2i}$$. We have the property $\|Re(z)\|, \|Im(z)\| \leq \|z\| \leq \|Re(z)\| + \|Im(z)\|$ (draw a triangle).
- The **addition** of two complex numbers $z, w$ is defined as $z+w = (a+c) + (b+d)i$. This is a translation mapping in the real and imaginary axes.
- The **subtraction** of two complex numbers $z,w$ is defined as $z-w = (a-c) + (b-d)i$.
- The **multiplication** of two complex numbers $$z,w$$ is defined as $$zw=(a + bi)(c+di) = ac + adi + cbi + bdi^2 = (ac - bd) + (ad + bc)i$$. This is a rotation and scaling operation.
- The **division** of two complex numbers $z,w$ is defined as $$\frac{z}{w} = \frac{a+bi}{c+di} = \frac{a (c-di)}{(c+di)(c-di)} + \frac{bi(c-di)}{(c+di)(c-di)} = \frac{(ac + bd) + (bc - ad)i}{c^2+d^2}$$. It can also be written concisely as $$z \cdot \frac{1}{w} = z \frac{\bar{w}}{N(w)} = \frac{(a+bi)(c-di)}{c^d+d^2} = \frac{(ac + bd) + (bc - ad)i}{c^2+d^2}$$.

## Complex exponentials

This deserves its own section. We can define $e^x = \sum_n^\infty \frac{x^n}{n!}$ for $x\in \mathbb{R}$. This is also true in $\mathbb{C}$. Recall the trigonometric functions:

$$
sin(x) = \sum_n^\infty (-1)^n \frac{x^{2n+1}}{(2n+1)!} \\
cos(x) = \sum_n^\infty (-1)^n \frac{x^{2n}}{(2n)!}
$$

These two look very similar, and we previous had no way of unifying these concepts together. However, plugging in $i$ into the exponential function we get an expansion:

$$
e^{ix} = \sum_n^\infty \frac{i^nx^n}{n!} = cos(x) + isin(x)
$$

This is exactly why $e^{2\pi i} = 1$.

If we look at $e^{-ix} = cos(-x) + isin(-x) = cos(x) - isin(x)$, we can derive that $sin(x) = \frac{e^{ix} - e^{-ix}}{2i}$ and $$cos(x) = \frac{e^{ix} + e^{-ix}}{2}$$, which look very familiar to the [hyperbolic trigonometric functions](https://en.wikipedia.org/wiki/Hyperbolic_functions), which are the $sin, cos$ variants rotated-by-90 degrees in the clockwise direction in the complex plane. These forms are called the **Euler formulas**.

# Complex differentiation

Given a function $f: \mathbb{C} \to \mathbb{C}$, it is **differentiable** at $z_0$ if:

$$
\text{lim}_{h \to 0} \frac{f(z_0 + h) - f(z_0)}{h} = f'(z_0) \in \mathbb{C}
$$

Or, by delta epsilon definitions, it is differentiable at $z_0$ with derivative $f'(z_0)$ if $\forall \epsilon > 0 \exists \delta > 0$ such that for all $\|z-z_0\| < \delta$:

$$
|\frac{f(z)-f(z_0)}{z-z_0} - f'(z_0)| < \epsilon
$$

If $f$ is differentiable everywhere in its domain, then it's called **holomorphic** or **complex differentiable**. The reason we don't call it differentiable simply is because holomorphicity is _stronger_ of a property. As opposed to a real-valued function $f: \mathbb{R} \to \mathbb{R}$ which is easy to draw and visualize, $f: \mathbb{C} \to \mathbb{C}$ is very hard to imagine. It's essentially a mapping from a 2 dimensional space to a 2 dimensional space, requiring 4 dimensions to show the mapping. In multivariable calculus, a function $f: \mathbb{R}^n \to \mathbb{R}^m$ is differentiable at a point if it has a **jacobian** matrix $\textbf{J}$ that is $m \times n$ and represents the approximate linear map at a particular point. The matrix is essentially an arbitrary linear mapping that's comparable to the tangent slope of a scalar real-valued function. Being holomorphic in $\mathbb{C}$ is similar in concept, except it has more restrictions.

If we think about a scalar-valued function, we are essentially finding the *slope of the function*, which is a number in $\mathbb{R}$. Translating it to a complex-valued function, we are finding the same slope, but in $\mathbb{C}$, i.e. it's equivalent to multiplying with a complex number. What is multiplying with a complex number? It's equivalent to *a rotation and scaling action*. Wait... it's equivalent to the class of rotations and scaling in $\mathbb{R}^2$, and these are linear maps! **The restriction is thus the $$2\times 2$$ jacobian matrix for complex numbers is of the class of rotation matrices multiplied with scaling matrices.** In particular, it's of the form:

$$
\begin{bmatrix}a & b \\-b & a\end{bmatrix} \in \mathbb{R^{2x2}}
$$

... in the interpretation of $\mathbb{C}$ as the [Argand plane](https://en.wikipedia.org/wiki/Complex_plane#Argand_diagram).

Because holomorphic functions are essentially a subset of real-valued multivariable differentiable functions, it carries with it the equivalent laws of differentiation. In the below statements, $f, g: \mathbb{C} \to \mathbb{C}$ and are complex differentiable at $z_0$.

1. **Linearity**: $h = f+g \implies h'(z_0) = f'(z_0) + g'(z_0)$

2. **Product rule**: $h = fg \implies h'(z_0) = f'(z_0)g(z_0) + f(z_0)g'(z_0)$

3. **Quotient rule**: $h = f/g \implies h'(z_0) = \frac{g(z_0)f'(z_0) - f(z_0)g'(z_0)}{g(z_0)^2}$
4. **Chain rule**: $h = f \circ g \implies h'(z_0) = f'(g(z_0))g'(z_0)$

One function that might be "smooth" but not holomorphic is $f(z) = \bar{z}$. Individually speaking, $f(Re(z)) = Re(z)$, and $f(Im(z)) = -Im(z)i$. Both of these seem relatively differentiable in their own right but it's not holomorphic:

$$
\text{lim}_{h\to 0} \frac{f(z_0+h) - f(z_o)}{h} = \frac{\bar{h}}{h}
$$

In the direction of $h$ from a real number, the value is 1. In the direction of $h$ from a complex number, the value is $-1$. The limit must be uniformly equal to $f'(z_0) \in \mathbb{C}$ for the function to be considered holomorphic. In the sense that the real component is $x$ and the imaginary component is $y$, if we look at the jacobian of $f(x, y) = (u(x, y), v(x,y)) = (x, -y)$ we also see that:

$$
\textbf{J} = \begin{bmatrix}\frac{\partial u(x,y)}{\partial x} & \frac{\partial u(x,y)}{\partial y} \\\frac{\partial v(x,y)}{\partial x} & \frac{\partial v(x,y)}{\partial y}\end{bmatrix}= \begin{bmatrix}1 & 0 \\0 & -1\end{bmatrix}
$$

the mapping does not conform to the generic type of rotation matrix with scaling. The **Cauchy-Riemann** equations essentially state this, with the following restrictions:

- $\frac{\partial u}{\partial x} = \frac{\partial v}{\partial y}$, which is the $a = a$ portion in the above matrix along the diagonal.
- $\frac{\partial u}{\partial y} = -\frac{\partial v}{\partial x}$, which is the $b = -(-b)$ portion in the above matrix across from the diagonal.

## Power Series

Some examples of power series are:

- The complex exponential: $e^z = \sum_{n=0}^\infty \frac{z^n}{n!}$ and the $sin(x)$ and $cos(x)$ functions that we've seen above.
- The geometric series: $\frac{1}{1-z} = \sum_{n=0}^\infty z^n$ for $\|z\| < 1$.

The general form of power series is in the form of:

$$
\sum_{n=0}^\infty a_nz^n \ \text{where }  a_n, z \in \mathbb{C}
$$

**Theorem: For any power series, there exists $R > 0$ such that if $\|z\| < R$ the series converges absolutely and $\|z\| > R$ the series diverges. This $R$ is called the radius of convergence, and is defined by $\frac{1}{R} = \text{limsup} \|a_n\|^{1/n}$.**

**Proof:** **Let's take care of edge cases.** Let $L = \frac{1}{R}$. If $L = 0 \implies R = \infty$, that means all convergent subsequences of form $\|a_n\|^{1/n}$ converges to 0. Then $a_n$ decays faster than $z^n$ grows, and thus the series is geometric and convergent.

If $L = \infty \implies R = 0$, that means there exists a single subsequence of form $\|a_n\|^{1/n}$ that diverges. A single divergent subsequence implies divergence of the series, and so we must set all terms to 0 to make sure the series converge.

**Let's take care of convergence.** We want to test that the series converges absolutely if $\|z\| < R$:

$$
\sum_{n=0}^\infty |a_nz^n| \leq \sum_{n=0}^\infty |a_n||z|^n < \infty
$$

Then we want to bound $\|a_n\|\|z^n\|$ by some geometrically decaying ratio. This ratio can be obtained in several ways, but fundamentally it's because of the two below statements:

- $\|z\| < R \implies \exists \delta > 0, \|z\|+\delta < R$
- $\forall \epsilon > 0 \exists N \text{ such that } \forall n \geq N, \|\|a_n\|^{1/n} - \frac{1}{R}\| < \epsilon$ due to  $\text{limsup}$ of the sequence.

We start by picking some $\delta$ such that $\|z\| + \delta R < R$. For arbitrary $\epsilon$, there is a sufficiently large $N$ where for all $n \geq N, \|a_n\|^{1/n} - \frac{1}{R} < \frac{\epsilon}{R}$ (we removed the absolute value but it's still true).  Then the series converges geometrically.

**Let's take care of divergence.** We want to test that the series diverges absolutely if $\|z\| > R$. In that case, we'll modify the first statement to:

- $\|z\| > R \implies \exists \delta > 0, \|z\| > R + \delta$

In that case, we can pick some $\delta$ such that $\|z\| > R + \delta R$. For arbitrary $\epsilon$, there is sufficiently large $N, \forall n\geq N \|a_n\|^{1/n} > \frac{1}{R} - \frac{\epsilon}{R}$ (we removed the absolute value in the other way). We have the following inequality:

$$
\sum_{n\geq N} |a_n||z|^n > \sum_{n\geq N} (\frac{1-\epsilon}{R})^n|z|^n > \sum_{n\geq N} (\frac{1-\epsilon}{R})^n((1+\delta)R)^n = \sum_{n\geq N} ((1-\epsilon)(1+\delta))^n
$$

We'll choose an $\epsilon$ sufficiently small so that the ratio $(1-\epsilon)(1+\delta) > 1$. Then the series diverges. $\blacksquare$

---

On the disc of convergence boundary, convergence or divergence is not so easily determined, and is an interesting field of study by itself. For now, we can say some strong things about functions defined within the disc of convergence:

**Theorem: Within the disc of convergence, a power series function $f(z) = \sum_{n=0}^\infty a_nz^n$ is holomorphic with derivative $f'(z) = \sum_{n=0}^\infty n a_nz^{n-1}$.**

This proof is super tedious so... no. However, we can see that the derivative has the same radius of convergence as the original function. This is because $\text{limsup} \|a_n\|^{1/n} = \text{limsup} \|n a_n\|^{1/n}$ since the $\text{lim}_{n \to \infty} n^{1/n} = 1$ (applying sandwich theorem).

As a result of this finding, we see that **power series are infinitely complex differentiable!** Since power series are so important for complex analysis, we say that a function is **analytic** if it has a power series expansion, and thus also infinitely complex differentiable.

gha_language: CSS

gha_license_id: NOASSERTION


text:
Generate [a single HTML document](https://cadars.github.io/portable-php/) from Markdown files.

**Requirements:** PHP

1. Write posts in `content/`
2. Open `http://example.com/portable.php` in your browser
3. Save as `index.html`

Or from the command-line:

```
php portable.php > index.html
```

Included dependencies

- [Parsedown](https://parsedown.org/) converts Markdown to HTML.
- [ParsedownExtra](https://github.com/erusev/parsedown-extra) adds support for footnotes, abbreviations, definition lists, tables, `class` and `id` attributes, fenced code blocks, and Markdown inside HTML blocks.
- [ParsedownExtraPlugin](https://github.com/taufik-nurrohman/parsedown-extra-plugin) allowed to add the `loading="lazy"` attribute to images, figure and figcaption elements, and more. Could be used for [code highlighting](https://github.com/taufik-nurrohman/parsedown-extra-plugin#custom-code-block-contents).

Extra: [portable-feed.php](https://gist.github.com/cadars/c1c2d4bad67e176ef833511385bc888c)

repository: xiamuguizhi/portable-php

repo_name: xiamuguizhi/portable-php


text:
# products-list

A simple eCommerce website's backend using java, spring-boot, spring-data

## Product List server

This server maintains and serves product list.

* Project uses **runtime database** with `Apache Derby [org.apache.derby]`.


text:
#### <sup>:closed_book: [canvas-sketch](../README.md) → [Documentation](./README.md) → Troubleshooting</sup>

---

### Troubleshooting

- [Supported Engines & Browsers](#supported-engines--browsers)
- [Installing Node.js, npm and a terminal](#installing-nodejs-npm-and-a-terminal)
- [Using `canvas-sketch` with Webpack and Other Bundlers](#using-canvas-sketch-with-webpack-and-other-bundlers)
- [Using `canvas-sketch` without Node.js and npm](#using-canvas-sketch-without-nodejs-and-npm)
- [Fixing EACCESS Error on `npm install -g`](#fixing-eaccess-error-on-npm-install--g)
- [Installing `ffmpeg` For Animation Sequences](#installing-ffmpeg-for-animation-sequences)

### Supported Engines & Browsers

The `canvas-sketch` ecosystem is generally designed with ES6 support in mind, intended to be run on modern browsers with support for hardware-accelerated Canvas/WebGL.

The JavaScript library/module is transpiled to ES5 syntax, but relies on some ES6 APIs such as Promise, fetch, etc. Polyfills may allow the library to work in legacy browsers, but it has not been tested.

It should work with a variety of bundlers (Webpack, Rollup, Parcel, Browserify, etc). If you run into integration issues, please open a new issue.

Recommended minimum versions:

- Safari 11+
- iOS Safari 10+
- FireFox 60+
- Chrome for Android 66+
- Chrome 66+
- Node.js 8.10.0+
- npm 5.6.0+

### Installing Node.js, npm and a terminal

If you [download Node.js from its website](https://nodejs.org/en/download/), it will also include a recent version of `npm`. After installation, reboot your computer and the software should be available in your terminal or command-line application:

- **macOS** users can use the built-in Terminal located at *Applications → Utilities → Terminal.app*
- **Windows** users can use the built-in cmd.exe, *Start Menu → (Search "cmd") → Select cmd.exe*
  - For a better development experience on Windows, try a Unix-like terminal emulator like [cmder](http://cmder.net/)

### Using `canvas-sketch` with Webpack and Other Bundlers

The `canvas-sketch` module exports a regular ES5 library, so you should be able to use it in Webpack, Rollup, and other bundlers.

```js
import canvasSketch from 'canvas-sketch';
```

However, without the `canvas-sketch-cli` tool running, file exporting will use regular browser APIs which can lead to a less optimal development experience.

### Using `canvas-sketch` without Node.js and npm

You can use this without a package manager by using the [unpkg.com](https://unpkg.com/) service and pointing to the UMD build. For example:

```html
<html>
  <body>
    <!-- Attaches canvasSketch to window global -->
    <script<EMAIL_ADDRESS>    <!-- Now you can use the library like normal -->
    <script>
      canvasSketch(() => {
        // ...
      });
    </script>
  </body>
</html>
```

You can also download the latest build<EMAIL_ADDRESS>and include it yourself, which is easier for offline use.

### Fixing EACCESS Error on `npm install -g`

If you get an EACCESS error when installing `canvas-sketch-cli` globally, you may want to see these guides:

- [Fixing npm permissions](https://docs.npmjs.com/getting-started/fixing-npm-permissions#option-1-change-the-permission-to-npms-default-directory)
- [More Details (StackOverflow)](https://stackoverflow.com/questions/16151018/npm-throws-error-without-sudo)

### Installing `ffmpeg` For Animation Sequences

To use `canvas-sketch-mp4` and `canvas-sketch-gif`, you'll need to install `ffmpeg` for your platform. You can either install native `ffmpeg` (such as through `brew install ffmpeg` on macOS), or you can install this module which will be resolved locally or globally:

```sh
npm install @ffmpeg-installer/ffmpeg --global
```

Once installed, `ffmpeg` should be added to your PATH environment variable for. This may require restarting terminal or rebooting your computer.

##

#### <sup>[← Back to Documentation](./README.md)

<!--
### Using `ffmpeg` manually and with custom commands

The `canvas-sketch-gif` tool is a thin wrapper around a command that looks like this, with configurable size and fps:

```sh
ffmpeg -r 24 -i %03d.png -y -vf \
  fps=24,scale=256:-1:flags=lanczos,palettegen \
  output_palette.png && ffmpeg -i tmp/%03d.png \
  -i output_palette.png -y -filter_complex \
  "fps=24,scale=256:-1:flags=lanczos[x];[x][1:v]paletteuse" \
  output.gif
```

And the `canvas-sketch-mp4` roughly translates to:

```sh
ffmpeg -framerate 24 -i %03d.png -y -c:v libx264 -profile:v high -crf 20 -pix_fmt yuv420p output.mp4
```
-->

repository: mattdesl/canvas-sketch

repo_name: mattdesl/canvas-sketch


text:
---
layout: default
title: "Puppet Server: Puppet API: Task detail"
canonical: "/puppetserver/latest/puppet-api/v3/task-detail.html"
---

[`environment_timeout`]: https://puppet.com/docs/puppet/latest/config_file_environment.html#environmenttimeout

[`auth.conf`]: ../../config_file_auth.markdown
[`puppetserver.conf`]: ../../config_file_puppetserver.markdown

The tasks API provides access to task information stored in modules. Tasks are
files stored in `tasks` subdirectory of a module. A task consists of an
executable file, with an optional metadata file with the same name with an
added '.json' extension. For example, the "install" task in a module "apache" could
consist of the executable file `install.rb` and the metadata file
`install.json`. This task would have the display name "apache::install".

This endpoint, `/puppet/v3/tasks/:module/:taskname`, allows you to fetch the
details about a task: its metadata, if present, and its associated executable
files. The file entries have additional data on how to fetch their contents so
they can be downloaded and run.

> Note: Tasks file contents in versioned code can be retrieved using the [`static_file_content`](./static_file_content.markdown) endpoint.

### Does not return entries for task files with invalid names

A task file name has the same restriction as puppet type names and must match
the regular expression `\A[a-z][a-z0-9_]*\z` (excluding extensions).

### Will error if the tasks implementations are invalid

Because the returning file information requires parsing metadata and finding
implementation files this endpoint will error if the metadata cannot be parsed
or the implementation content is invalid.

### Does read files

This endpoint will read in contents of metadata and other task files, so it may
be more expensive than the `/tasks` endpoint.

### Uses `application/json` Content-Type

The Content-Type in the response to an task API query is
`application/json`.

## `GET /puppet/v3/tasks/:module/:task?environment=:environment`

(Introduced in Puppet Server 5.1.0.)

Making a request with no query parameters is not supported and returns an HTTP 400 (Bad
Request) response.

### Supported HTTP Methods

GET

### Supported Formats

JSON

### Query Parameters

Provide one parameter to the GET request:

* `environment`: Only the task information pertaining to the specified
environment will be returned for the call.

### Responses

#### GET request with results

```
GET /puppet/v3/tasks/module/taskname?environment=env

HTTP/1.1 200 OK
Etag: b02ede6ecc432b134217a1cc681c406288ef9224
Content-Type: application/json

{
  "metadata": {
    "description": "Install a package",
    "parameters": {
      "name": {
        "description": "The package to install",
        "type": "String[1]"
      }
    }
  },
  "files": [
    {"filename": "taskname.rb",
      "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
      "size_bytes": 1024,
      "uri:" {
        "path": "/puppet/v3/file_content/tasks/module/taskname.rb",
        "params": {
          "environment": "production"
        }
      }
    }
  ]
}
```

#### GET request for invalid module

If you request details for a task which cannot be computed because the metadata
is unreadable or it's implementations are not usable Bolt will return an error
response with a status code of 500 containing `kind`, `msg`, and `details` keys.

```
GET /puppet/v3/tasks/modulename/taskname?environment=env
HTTP/1.1 500 Server Error
Content-Type: application/json

{
    "details": {},
    "kind": "puppet.tasks/unparseable-metadata",
    "msg": "unexpected token at '{ \"name\": \"init.sh\" , }\n  ]\n}\n'"
}
```

#### Environment does not exist

If you send a request with an environment parameter that doesn't correspond to the name of a
directory environment on the server, the server returns an HTTP 404 (Not Found) error:

```
GET /puppet/v3/tasks/module/taskname?environment=doesnotexist

HTTP/1.1 404 Not Found

Could not find environment 'doesnotexist'
```

#### No environment given

```
GET /puppet/v3/tasks/module/taskname

HTTP/1.1 400 Bad Request

You must specify an environment parameter.
```

#### Environment parameter specified with no value

```
GET /puppet/v3/tasks/module/taskname?environment=

HTTP/1.1 400 Bad Request

The environment must be purely alphanumeric, not ''
```

#### Environment includes non-alphanumeric characters

If the environment parameter in your request includes any characters that are
not `A-Z`, `a-z`, `0-9`, or `_` (underscore), the server returns an HTTP 400 (Bad Request) error:

```
GET /puppet/v3/tasks/module/taskname?environment=bog|us

HTTP/1.1 400 Bad Request

The environment must be purely alphanumeric, not 'bog|us'
```

#### Module does not exist

If you send a request for a task in a module that doesn't correspond to the
name of a module on the server, the server returns an HTTP 404 (Not Found)
error:

```
GET /puppet/v3/tasks/doesnotexist/taskname?environment=env

HTTP/1.1 404 Not Found

Could not find module 'doesnotexist'
```

#### Task does not exist or does not have a valid name

If you send a request for a task in that doesn't correspond to the name of a
task on the server, but the module does exist, the server returns an HTTP 404
(Not Found) error:

```
GET /puppet/v3/tasks/module/doesnotexist?environment=env

HTTP/1.1 404 Not Found

Could not find task 'doesnotexist'
```

### Schema

A tasks detail response body conforms to the [task detail schema](./task_detail.json).

### Authorization

All requests made to the environment classes API are authorized using the
Trapperkeeper-based [`auth.conf`][].

For more information about the Puppet Server authorization process and configuration
settings, see the [`auth.conf` documentation][`auth.conf`].

repository: barriserloth/puppetserver

extension: markdown

repo_name: barriserloth/puppetserver


text:
#As one of them opened his sack to give his donkey feed in the lodging place, he saw his money. Behold, it was in the opening of his sack.

"When they stopped at a place for the night, one of the brothers opened his sack to get food for his donkey. In the sack he saw his money!"

#Behold

The word "behold" here alerts us to pay attention to the surprising information that follows.

#My money has been put back

This can be stated in active form. AT: "Someone has put my money back" (See: [[:en:ta:vol2:translate:figs_activepassive]])

#Look at it

"Look in my sack!"

#And their hearts sank

To become afraid is spoken of as if their heart were sinking. Here "hearts" stands for courage. AT: "And they became very afraid" (See: [[:en:ta:vol1:translate:figs_metaphor]] and [[:en:ta:vol2:translate:figs_metonymy]]


text:
# geom_modeling

Geometric Modeling

1. Interactive generation of Bézier and B-spline curves.
[Python functional programming implementation of  algorithms related to these curves](http://nbviewer.ipython.org/github/empet/geom_modeling/blob/master/FP-Bezier-Bspline.ipynb)


text:
XBlogger
========

This is a set of Vim-files for publishing posts to Blogger or Wordpress in your favorite markup language.

Requirements
------------

[b.py](http://http://pythonhosted.org/b.py/) - a command line tool for publishing posts.

Optional utilities:
* linkchecker: pip install linkchecker
* [my plugin for checking markdown files](https://github.com/xvadim/linkchecker/blob/feature/linkcheck/plugins/markdowncheck.py)
  it still is not in the main branch

Optional Vim-plugins:

* [SirVer/ultisnips](https://github.com/SirVer/ultisnips) - snippets
* [tpope/vim-ragtag](https://github.com/tpope/vim-ragtag) - for tag closing
* [aperezdc/vim-template](https://github.com/aperezdc/vim-template) - templates for new files

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

1. Install via Vundle: `Plugin 'xvadim/vim-xblogger'` or just unpack the archive to `$HOME/.vim`
2. Copy the file `external/brc.py` to the directory where you are going to prepare and keep posts
3. Replace `YOU_BLOG_ID` with the real ID of your blog
4. Setup `b.py` as [described in documentation](http://pythonhosted.org/b.py/tutorial.html)

Usage
-----

1. Start post creation: `vim my_post.blog`
2. Create post [as described in documentation](http://pythonhosted.org/b.py/tutorial.html#creating-the-first-post)
3. For publishing the post type in the normal mode: `<Leader>post`

Improvements
------------

If you use plugin **vim-template** copy the file `external/.vim-template:*.blog` to the directory of your posts.
This will insert a header to new files.

If you use [higlhlight.js](https://highlightjs.org/) and plugin **ultisnips** copy the file `snippet/blog.snippets`
to the snippets directory. This adds the snippet `code` which inserts the next fragment:

```
<pre><code class="...">
</code></pre>
```

Also it makes available all snippets for mardown-files.

Also the command `Rc file_name` available. This command inserts the given file as fragment of code.

Links checking
--------------
1. Copy my plugin to the `<...>/site-packages/linkcheck/plugins` directory
2. Add the next lines to the `~/.linkchecker/linkcheckerrc`:
```ini
[MarkdownCheck]
filename_re=.*.(blog|markdown|md(own)?|mkdn?)$
```
3. Run `:make`

repository: vim-scripts/vim-xblogger

repo_name: vim-scripts/vim-xblogger


text:
# i18nparse
Localization of the Python argparse module

## Current status
Only the French language translation was initialy provided. Thanks to [anselmobd](https://github.com/anselmobd) and [blackstream-x](https://github.com/blackstream-x),
the project now contains Portuguese and German language translations.

The binary wheel file contains litte endian mo translation files. Users of big endian systems should use the source distribution to generate the mo files on their own system.

## Goals
The argparse module makes it easy to write user-friendly command-line interfaces. Specifically, it automatically generates help and usage messages and issues errors when users give the program invalid arguments. Unfortunately, even if the module is able to use `gettext` type localization strings, none is provided by the standard library.

This module provides some translations (at least a French one) and will be simply installable through `pip`

## Installing

### End user installation

With pip: `pip install i18nparse`.

### Developper installation

If you want to contribute, you should get a copy of the full tree from [GitHUB](https://github.com/s-ball/i18nparse):

```
git clone https://github.com/s-ball/i18nparse.git [your_working_copy_folder]
```

## Usage

The `i18nparse` module defines 2 functions:

```
def activate(lang = None)
```

which activates the usage of the translation for the required language.
By default, the language for `locale.getlocale()` is used.
Note: In order to use the expected locale, it should be loaded prior to
the call to `activate` with `locale.setlocale(locale.LC_ALL, locale_name)`
where `locale_name` is the name of a known locale or `''` (empty string) for
the default locale.

```
def deactivate()
```

which reverts to the original texts.

Example:

```
import argparse
import i18nparse
import locale

locale.setlocale(locale.LC_ALL, '') # sets a locale
i18nparse.activate()     # Ok use current locale (if translation file exists)

parser = argparse.ArgumentParser('foo')
parser.print_help()      # displays the help message for the current locale
```

Assuming a `fr_FR` locale, this displays:

```
usage : foo [-h]

arguments optionnels:
  -h, --help  affiche ce message et termine le programme
```

## Contributing

Contribution for new language translations or improvement of existing ones are welcome. See [CONTRIBUTING](https://raw.githubusercontent.com/s-ball/i18nparse/master/CONTRIBUTING) for details

## Versioning

This project uses a standard Major.Minor.Patch versioning pattern. Inside a major version, public API stability is expected (at least after 1.0.0 version will be published).

## License

This project is licensed under the MIT License - see the [LICENSE](https://raw.githubusercontent.com/s-ball/i18nparse/master/i18nparse/LICENSE) file for details

gha_language: Python


text:
[![](https://img.shields.io/github/v/release/srg74/Controller-for-WLED-firmware)](https://img.shields.io/github/v/release/srg74/Controller-for-WLED-firmware)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square)](https://github.com/srg74/Controller-for-WLED-firmware/master/LICENSE)
[![](https://img.shields.io/static/v1?label=Localized&message=firmware&color=blue&style=flat-square)](/resources/FIRMWARE/BIN)
[![](https://img.shields.io/static/v1?label=WLED&message=firmware&color=green&style=flat-square)](https://github.com/Aircoookie/WLED/releases)
[![](https://img.shields.io/static/v1?label=WLED&message=app&color=green&style=flat-square)](https://github.com/Aircoookie/WLED-App)

I appreciate your support for my project! [![](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=VU7L89Z2RR7S4&source=url)

## Wi-Fi LED controller based on ESP-07S module with external antenna for WLED firmware.
![Controller](resources/controller.jpg)
```
Controller reference design
```
![Test](resources/PCB_test.jpg)
```
PCB test v0.8
```
## Wi-Fi LED controller with following features
-   Easy to solder components;
-   Relay for reducing delay power consuption;
-   Waterproof enclosure IP67;
-   Level shifter for relaible signal;
-   Power selector (e.g 5VDC or 12VDC);
-   Serial interface connector 3.3V logic levels;
-   IR receiver (optional);
-   SSD1306 I2C OLED display 128x32 or 128x64 (optional);
-   Additional button (optional);
-   Dallas temperature sensor for measuring ambient temperature inside of enclosure (optional);
-   [PCB ORDER](https://www.pcbway.com/project/shareproject/Controller_for_WLED_firmware_in_waterproof_enclosure.html) - Easy and fast way to order quality PCB.
-   [Sign in and save](https://www.pcbway.com/setinvite.aspx?inviteid=83580) - Helping me to save some money for development.

## Firmware used
-   [WLED repository](https://github.com/Aircoookie/WLED) - Main WLED repository
-   [Usermod files](https://github.com/Aircoookie/WLED/tree/master/usermods/Enclosure_with_OLED_temp_ESP07) - Folder with required changes to usermod.cpp in WLED repository
-   [Controller firmware](https://github.com/srg74/Controller-for-WLED-firmware/tree/master/resources/FIRMWARE) - Custom build file, ready for upload. Latest Build 2004061.
## Materials used
-   [Enclosure](https://www.hawkusa.com/manufacturers/bud/enclosures/pn-1321-cmb) - Bud Industries PN-1321-CMB
-   [Connection](https://www.amazon.com/dp/B07Q6XK8KM/ref=cm_sw_em_r_mt_dp_U_P6gQEb3590DWJ) - Waterproof IP65 2pin and 3pin connection cables
-   [Box entry](https://www.amazon.com/dp/B06Y5HGYK2/ref=cm_sw_em_r_mt_dp_U_n9gQEb0NFN1HF) - Cable gland PG7
-   [ESP-07S module](https://www.amazon.com/JESSINIE-ESP-07S-Industrial-Wireless-Internet/dp/B0BLGC7QVZ/ref=sr_1_8?crid=7EX1GREDP9QT&keywords=esp-07s&qid=1672440801&sprefix=esp-07s%2Caps%2C84&sr=8-8) - ESP8266 based ESP-07S module with external antenna connector
-   [Wi-Fi antenna](https://www.amazon.com/gp/product/B00ZBJNO9O/ref=ppx_yo_dt_b_asin_title_o08_s00?ie=UTF8&psc=1) - 2.4G WiFi Antenna with SMA Cable 3DBI Gain
-   [Push button](https://www.newark.com/philmore/30-12638/switch-operation-momentary-spring/dp/43W7758) - Pushbutton Switch with LED. Manufacturer #30-12638
-   [Custom PCB](https://www.pcbway.com) - Custom PCB ordered from PCBway. 10pcs for $5!
-   [BOM for PCBs](https://github.com/srg74/Controller-for-WLED-firmware/blob/master/resources/) - Here is BOM for controller. PLEASE REFFER TO YOUR BUILD!
#### Board creation is inspired by https://github.com/Aircoookie/WLED/wiki


text:
---
layout: post
title: 使用照片或者录像的拍摄日期命名文件
date: 2012-08-08 11:11:56 +0800
categories:
- Windows
tags:
- 照片命名
---

该程序使用自定义GetPhotoDate（）函数获取照片或者录像的“拍摄日期”，作为该照片的文件名。有的照片或者录像没有”拍摄日期“，就不能使用该程序，应该用FileDateTime( )函数获取”创建日期“。

```vb
Dim Index As Integer
Private Type GdiplusStartupInput
    GdiplusVersion As Long
    DebugEventCallback As Long
    SuppressBackgroundThread As Long
    Suppres***ternalCodecs As Long
End Type

Private Type PropertyItem
   propId As Long ' ID of this property
   Length As Long ' Length of the property value, in bytes
   Type As Long ' Type of the value, as one of TAG_TYPE_XXX defined above
   Value As Long ' property value
End Type

Private Declare Function GdiplusStartup Lib "gdiplus" (Token As Long, inputbuf As GdiplusStartupInput, Optional ByVal outputbuf As Long = 0) As Long
Private Declare Sub GdiplusShutdown Lib "gdiplus" (ByVal Token As Long)
Private Declare Function GdipLoadImageFromFile Lib "gdiplus" (ByVal filename As Long, hImage As Long) As Long
Private Declare Function GdipDisposeImage Lib "gdiplus" (ByVal Image As Long) As Long

Private Declare Function GdipGetPropertyCount Lib "gdiplus" (ByVal Image As Long, numOfProperty As Long) As Long
Private Declare Function GdipGetPropertyIdList Lib "gdiplus" (ByVal Image As Long, ByVal numOfProperty As Long, list As Long) As Long
Private Declare Function GdipGetPropertyItemSize Lib "gdiplus" (ByVal Image As Long, ByVal propId As Long, Size As Long) As Long
Private Declare Function GdipGetPropertyItem Lib "gdiplus" (ByVal Image As Long, ByVal propId As Long, ByVal propSize As Long, Buffer As Long) As Long
Private Declare Function GdipGetPropertySize Lib "gdiplus" (ByVal Image As Long, totalBufferSize As Long, numProperties As Long) As Long
Private Declare Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (lpDst As Any, lpSrc As Any, ByVal ByteLength As Long)

Private Function GetPhotoDate(ImagePath As String) As String
    Dim Bitmap As Long
    Dim Token As Long
    Dim Index As Long
    Dim PropertyCount As Long
    Dim ItemSize As Long
    Dim Prop As PropertyItem
    Dim GdipInput As GdiplusStartupInput
    Const PropertyTagExifDTOrig As Long = &H9003& ' Date & time of original

    GdipInput.GdiplusVersion = 1
    GdiplusStartup Token, GdipInput
    GdipLoadImageFromFile StrPtr(ImagePath), Bitmap
    GdipGetPropertyCount Bitmap, PropertyCount
    ReDim PropertyList(PropertyCount - 1) As Long
    GdipGetPropertyIdList Bitmap, PropertyCount, PropertyList(0)
    For Index = 0 To PropertyCount - 1
        GdipGetPropertyItemSize Bitmap, PropertyList(Index), ItemSize
        ReDim Buffer(ItemSize - 1) As Byte
        GdipGetPropertyItem Bitmap, PropertyList(Index), ItemSize, ByVal VarPtr(Buffer(0))
        CopyMemory Prop, ByVal VarPtr(Buffer(0)), Len(Prop)
        ReDim Data(ItemSize - 16) As Byte
        CopyMemory Data(0), ByVal Prop.Value, ItemSize - 16
        Select Case PropertyList(Index)
        Case PropertyTagExifDTOrig
            GetPhotoDate = StrConv(Data, vbUnicode)
        End Select
    Next
    GdipDisposeImage Bitmap
    GdiplusShutdown Token
End Function

Private Sub Command1_Click()
    Dim filename, newfilename$, newfilenameback$, newfilenamekz$, filedt$, exname$
    Dim i%, indexphoto%
    Dim ii%, aa$, cc$
    Dim photoname$(), attachnum%()
    ReDim photoname(1 To File1.ListCount)
    ReDim attachnum(1 To File1.ListCount)

    For i = 1 To File1.ListCount
        attachnum(i) = 1
        photoname(i) = ""
    Next i
    indexphoto = 1

    For i = 0 To File1.ListCount - 1
        aa = ""
        cc = ""
        File1.ListIndex = i
        filename = CStr(File1.filename)
        exname = Right(filename, 4)

        filedt = GetPhotoDate("e:\photo\" & filename)
        filedt = Trim(filedt)
        'MsgBox filedt
        newfilename = getdtname(filedt)
        For ii = 1 To Len(newfilename)
            cc = Mid(newfilename, ii, 1)
            If IsNumeric(cc) = True Then
                aa = aa & cc
            End If
        Next ii
        newfilename = aa
        newfilenamekz = newfilename & exname
        newfilenameback = newfilenamekz
        '如果有重名的文件，就在文件名后增加一个数字，和重名文件区别开
        If ifsamename(photoname(), newfilenamekz) = True Then
            newfilenamekz = (newfilename & attachnum(Index)) & exname
            attachnum(Index) = attachnum(Index) + 1
        Else
            photoname(indexphoto) = newfilenameback
            indexphoto = indexphoto + 1
        End If

        Name "e:\photo\" & filename As "e:\photo\" & newfilenamekz
    Next i
    MsgBox "OK!"
End Sub

Private Sub Form_Load()
    File1.Path = "e:\photo\"
End Sub
Private Function getdtname(dt As String) As String
    '文件的创建时间格式为2010-05-13 19:30:23，即为形参dt。
    '通过getdtname函数得到以文件创建时间为名字的文件名，格式为20100513193023
    Dim dtarray() As String, darray() As String, tarray() As String
    If Len(dt) > 0 Then
        dtarray() = Split(dt)
        'MsgBox dtarray(0)
        'MsgBox dtarray(1)
        darray() = Split(dtarray(0), ":")
        'MsgBox darray(0)
        'MsgBox darray(1)
        'MsgBox darray(2)
        tarray() = Split(dtarray(1), ":")
        'MsgBox tarray(0)
        'MsgBox tarray(1)
        'MsgBox tarray(2)
        If Len(darray(1)) = 1 Then darray(1) = 0 & darray(1)
        If Len(darray(2)) = 1 Then darray(2) = 0 & darray(2)
        If Len(tarray(0)) = 1 Then tarray(0) = 0 & tarray(0)
        If Len(tarray(1)) = 1 Then tarray(1) = 0 & tarray(1)
        If Len(tarray(2)) = 1 Then tarray(2) = 0 & tarray(2)
        getdtname = darray(0) & darray(1) & darray(2) & tarray(0) & tarray(1) & tarray(2)
    End If

End Function
Private Function ifsamename(name$(), destname As String) As Boolean
'判断和destname是否有重名的文件
    Dim Length As Integer, name_index%
    'length = UBound(name()) - LBound(name()) + 1
    For name_index = LBound(name()) To UBound(name())
        If destname = name(name_index) Then
            ifsamename = True
            Index = name_index
            Exit For
        Else
            ifsamename = False
        End If
    Next name_index

End Function
```

[photo_rename.rar](https://github.com/stuyou/stuyou.github.io/raw/master/_posts/data/photo_rename.rar)

filename: 2012-08-08-使用照片或者录像的拍摄日期命名文件.md


text:
## Privacy Policy
This software **does not** share any data to its owner/maintainers – user
configuration, session details and cookies are saved locally. However because
this software connects to [Discord website](https://discord.com/app), it is
expected that the user accepts
[Discord's Privacy Policy](https://discord.com/privacy) when using this
application and registering/logging in to the service.

In the future, following application may ask the user if he want to report an
issue on GitHub when the crash occurs. This feature, however, won't
automatically send any details and will popup a website with bug report preview
to let user decide if he wants to change anything and/or send bug report.

repository: underscore-bama/WebCord

repo_name: underscore-bama/WebCord


text:
---
title: Get Started
date: 2019-04-03
version: 3.8
keywords: [get started, key features, hardware overview, registration, enable flight controller API control, safety]
---

This document takes you through a quick set of steps to see the DJI Onboard SDK in action.

## Register as a DJI Developer

Follow the steps [here](../development-workflow/environment-setup.html#onboard-sdk-application-registration) to register as a DJI Onboard SDK developer, and generate an app ID and key.

## Setup

For this tutorial, you will need :

1. A [compatible](../appendix/versioning.html) DJI vehicle/flight controller
2. An Ubuntu 16.04 PC (virtual machine works as well) to act as your onboard computer
3. A Windows/Mac machine to run DJI Assistant 2, required for simulation.

#### 1. Hardware Setup

Follow the steps in the [Hardware Setup Guide](../development-workflow/hardware-setup.html) to connect your DJI device to your Ubuntu PC.

#### 2. Software Setup

Navigate to the [Linux software setup](../development-workflow/environment-setup.html) page to get your software environment ready.

## Build the Flight Control Linux Sample

For this tutorial, we will be running the position control linux sample app with the vehicle/flight controller in simulation mode.

 1. As per the linux software setup guide, make sure you have the cmake build system installed on your machine.
 2. In the `onboardsdk` root directory, run the following commands to build the sample app:
    ```
    mkdir build && cd build
    cmake ..
    make djiosdk-linux-samples
    cd bin
    ```

## Run the sample app

You are now ready to run the sample app!  You have entered the `sudo usermod -a -G dialout $USER` command, then logged out and logged back in to your account
 1. Vehicle/Flight controller is in simulation mode, connected via USB cable to a computer running DJI Assistant 2
 1. `Enable API Control` is checked on DJI Assistant 2's SDK page
 1. The frequencies at which data is broadcasting on the SDK page are not *all* zero
 1. The baudrate on DJI Assistant 2 matches that in your `UserConfig.txt` file
 1. App ID and Key have been entered in your `UserConfig.txt` file
 1. Your hardware setup matches that in the Hardware Setup guide

If all of these are done, proceed to enter the next set of commands inside the `build/bin` directory:
    ```
    ./djiosdk-flightcontrol-sample ../../sample/linux/common/UserConfig.txt
    ```

You should now see your terminal showing something like this:

![successful-sample-setup](../../images/quick-start/QuickStart_successful.png)

Press the `b` key to run a `Takeoff + Position Control Sample + Landing` cycle. You should see the drone doing these in simulation. You are done!

To learn how to write applications like these, go ahead and check out the reference section.

## Troubleshooting

**Q.** The sample app doesn't show the interactive prompt, instead:
 1. It shows a number of errors
 2. It hangs
 3. It says `Drone version not obtained!`
 4. It looks something like this:
 ![unsuccessful-sample-setup](../../images/quick-start/QuickStart_unsuccessful.png)

**A.** This is usually caused by a connection issue, or a baudrate issue. Please investigate your hardware connections, your baudrate and port name. If it still doesn't work, raise a Github issue.

**Q.** The sample says `Activation failed!` and does not proceed.

**A.** Please make sure you have DJI Go open and your mobile device connected to the internet, and the correct App ID and Key in your `UserConfig.txt` file. Try a couple of times, if it doesn't work, raise a Github issue.

**Q.** The drone doesn't actually move in simulation, even though the sample suggests it is working correctly.

**A.** Make sure your LightBridge 2 RC is powered on and your battery has enough power left in it. Close the simulation window and open it again (don't hit the Stop Simulation button) to eliminate the possiblity of a visualization issue. Raise a Github issue in case these steps don't work.

repository: DingZiming/Onboard-SDK-Doc

repo_name: DingZiming/Onboard-SDK-Doc


text:
# DHT-TemperatureSensor
Wemos ESP8266 based temperature and humidity sensor using DHT11 or DHT22 sensor

If you download this using the zip file, remember to remove the '-master' from the directory when placing this in the arduino folder.

This project requires the following Libraries:
- DHT-sensor-library : https://github.com/adafruit/DHT-sensor-library

repository: ferrymanders/DHT-TemperatureSensor

repo_name: ferrymanders/DHT-TemperatureSensor


text:
# Form

[![Build Status](https://api.shippable.com/projects/5505eecf5ab6cc13529b4a98/badge?branchName=master)](https://app.shippable.com/projects/5505eecf5ab6cc13529b4a98/builds/latest)

Form is a package for handling HTTP web forms input. See godoc for details:

```go
godoc github.com/gravitational/form
```

repository: gravitational/form

gha_language: Go

repo_name: gravitational/form


text:
# Java II: Day 7
*(A link to these notes may be found at http://www.cs.utexas.edu/~nclement/aces/javaII/7-assertions-constructors.html)*

## Intro

Last time: intro to classes and objects

This time: assertions; class constructors

## Warmup

 - https://practiceit.cs.washington.edu/problem/view/bjp3/chapter8/s11%2DgetNormalReverseOrderName

## Assertions
What is output by the following program?
```java
public static void mysteryB(boolean b) {
  System.out.print(b + " ");
  b = (b == false);
  System.out.print(b);
}
```

assertion

a declarative sentence that is either true or false

For example:
 - It is raining
 - I am playing agar.io
 - I should be paying attention in class
 - 2 + 2 equals 4
 - `x > 45`

Not assertions (why?):
 - How old are you?
 - Take me to the nearest Pokestop

Sometimes, assertions are *always* true or false:
 - 2 + 2 equals 4

Other times, they are *contextually* true or false (depends on the context):
 - `x > 45`
 - It is raining
 - Yesterday was the hottest day in history

One of the greatest tasks in writing good programs requires deciding the *context* of assertions.

Assertions can come in many different forms, some of which we've seen:
 - user input
 - assertions from conditionals
 - random numbers
 - function parameters

...and also in things we've just begun to talk about
 - constructors and object functions

### Assertions in input
Can we say anything about the value of variable `result` here?
```java
Scanner console = new Scanner(System.in);
System.out.print("Enter Y or N: ");
String result = console.nextLine();
// is result equal to "Y" or "N" here?
```
What about in this code snippet?
```java
Scanner console = new Scanner(System.in);
System.out.print("Enter Y or N: ");
String result = console.nextLine();
while(!result.equals("Y") && !result.equals("N")) {
  System.out.print("That wasn't a Y or N. ");
  System.out.print("Enter Y or N: ");
  result = console.nextLine();
}
// is result equal to "Y" or "N" here?
```

### Assertions from random numbers
Can we say anything about the value of the variable `result` here?
```java
Random rand = new Random();
int result = rand.nextInt(100);
if (result > 20) {
  result = rand.nextInt(50) + 150;
}
// what is the value of result here?
```

### Functional assertions
Sometimes the variable we want to make an assertion about is not "random" in the sense that it either comes from the user or a random number, but that it might be unexpected. When we write functions, we should be able to handle input in any form.

Can we say anything about the value of the variable `result` here?
```java
public static int mystery(int x) {
  int result = 0;
  if (x > 20) {
    result = -1;
  }
  if (x < 20) {
    result = 1;
  }
  return result;
}
```
When we write functions, they should work for *any* input, not just the ones we would like. For example, the following is a bad method for writing an matrix duplication method:
```java
public static int[][] doubleMatrix(int[][] input) {
  int[][] doubled = new int[input.length][input[0].length]; // A
  for (int i = 0; i < input.length; i++) {                  // B
    for (int j = 0; j < input[i].length; j++) {             // C
      doubled[i][j] = input[i][j] * 2;                      // D
    }
  }
  return doubled;                                           // E
}
```
Which point in our method might return an error?
### Conditional assertions
Suppose you have the following code:
```java
if (x > 3) {
  // A
  x--;
} else {
  // B
  x++;
  // C
}
// D
```
What do you know about the value of `x` at each of the four points?
 - Is `x > 3`?
   - Always?
   - Sometimes?
   - Never?

### Reasoning about programs
Right after a variable is initialized, its value is known:
```java
int x = 3;
// is x > 0? ALWAYS
```
In general, you know nothing about parameters' values
```java
public static void mystery(int a, int b) {
  // is a == 10? SOMETIMES
}
```
Inside an `if`, `while`, or other statements, you may know something:
```java
public static void mystery(int a, int b) {
  if (a < 0) {
    // is a == 10?  NEVER
    ...
  }
}
```

Things that cause a variable's value to be unknown (often leads to "sometimes" answers):
  - reading from a Scanner
  - reading a number from a Random object
  – initial value of a parameter in a method

If you can reach a part of the program both with the answer being "yes" and the answer being "no", then the correct answer is "sometimes”.

For the following snippet of code, decide whether each assertion is ALWAYS, NEVER, or SOMETIMES:
```java
public static void mystery(int x, int y) {
  int z = 0;
  // Point A
  while (x >= y) {
    // Point B
    x = x - y;
    z++;
    if (x != y) {
      // Point C
      z = z * 2;
    }
    // Point D
  }
  // Point E
  System.out.println(z);
}
```
         | `x < y` | `x == y` | `z == 0`
      ---|---------|----------|--------
 Point A |         |          |
 Point B |         |          |
 Point C |         |          |
 Point D |         |          |
 Point E |         |          |

## Object constructors
Consider the following code:
```Processing
public class Dot {
  String name;
  float x;
  float y;

  /**
   * Draws the name, bigger if the name is longer
   */
  public void drawName() {
    textSize(name.length);
    text(name, x, y);
  }
}
```
What is wrong with the `drawName()` method?

We need to make sure certain *assertions* have been made, but how can we be certain the `name` field is filled in?

### Constructors
When you create a new object, you are also calling a method:
```java
Random rand = new Random();
```
Notice that the `new Random()` above has parenthesis, suggesting it is a function call. In fact, it is a function call: a "constructor".

Every object can only be created with these constructors. We can leverage constructors to make sure assertions are filled. A constructor does not have a return type, and also must have the same name as the class, as follows:
```Processing
public class Dot {
  String name;
  float x;
  float y;
  public Dot() {
    name = "none"; // make sure name is always valid
  }

  /**
   * Draws the name, bigger if the name is longer
   */
  public void drawName() {
    textSize(name.length);
    text(name, x, y);
  }
}
```
We can have different constructors:
```java
public class Dot {
  String name;
  float x;
  float y;
  public Dot() {
    name = "none"; // make sure name is always valid
  }
  public Dot(float myX, float myY, String myName) {
    x = myX;
    y = myY;
    name = myName;
  }
  ...
}
```
In fact, if we don't supply the "default constructor" (constructor with no parameters), a user cannot create an object without parameters:
```java
public class Dot {
  String name;
  float x;
  float y;
  public Dot(float myX, float myY, String myName) {
    x = myX;
    y = myY;
    name = myName;
  }
  ...
}

public class DotUser {
  public static void main(String[] args) {
    Dot d1 = new Dot(10, 50, "cool user"); // okay
    Dot d2 = new Dot(); // won't compile
  }
}
```
### Private member variables
Constructors also allow us to make variables "private". In the previous code, we might want to make sure `x` and `y` are always valid (positive). But it is also possible to access the variables if they're public:
```java
Dot d1 = new Dot(10, 50, "cool user");
d1.x = -20;
d1.y = -200;
d1.name = "I JUST TOOK OVER THE WORLD!!";
```
For this reason, we'd like to make member variables "private" and only provide access through a prescribed method. We could have "getters" and "setters" that provide this interface:
```java
public class Dot {
  private int x; // private means they can't be altered by somebody else
  private int y;
  private String name;

  public Dot(int initialX, int initialY) {
    // Make sure they're positive
    if (initialX < 0) {
      initialX = 0;
    }
    if (initialY < 0) {
      initialY = 0;
    }
    // Assertion: Are initialX and initialY ever negative here?
    x = initialX;
    y = initialY;
  }
  public void setX(int newX) {
    if (newX < 0) {
      newX = 0;
    }
    // Assertion: Is newX ever > 0 here?
    x = newX;
  }

  public void setName(String n) {
    // Don't need to check anything here.
    name = n;
  }
  public String getName() {
    return name;
  }
  // Etc...
}
```
We could even go so far as to throw an assertion if the method was incorrect:
```java
import java.lang.IllegalArgumentException;

public class Dot
  private int x;
  private int y;

  public Dot(int initialX, int initialY) {
    // Make sure they're positive
    if (initialX < 0) {
      throw new IllegalArgumentException("x is negative!!");
    }
    if (initialY < 0) {
      throw new IllegalArgumentException("y is negative!!");
    }
    // Assertion: Are initialX and initialY ever negative here?
    x = initialX;
    y = initialY;
  }
  public void setX(int newX) {
    if (newX < 0) {
      throw new IllegalArgumentException("x is negative!");
    }
    // Assertion: Is newX ever > 0 here?
    x = newX;
  }
  // Etc...
}
```

Private variables also let us use things that other people don't need to know about. For example, we might also want to include the length of our string in the class. We might save it in a variable called `length`. However, if we created a `Dot d = new Dot()`, what would we expect the `d.length` method to return??

## Homework
### Self-Check
 - https://practiceit.cs.washington.edu/problem/view/bjp3/chapter5/s28%2Dassertions2
 - https://practiceit.cs.washington.edu/problem/view/bjp3/chapter5/s29%2Dassertions3

### Programming
 - https://practiceit.cs.washington.edu/problem/view/bjp3/chapter8/e18%2DclassRectangle

## More Info
 - http://www.cs.utexas.edu/~scottm/cs312/handouts/slides/topic17_assertions_4Up.pdf
 - http://www.cs.utexas.edu/~scottm/cs312/handouts/slides/topic28_classes_objects_2_4Up.pdf

repository: nclement/java-class

repo_name: nclement/java-class


text:
# jQuery Slide-Box Plugin
A jQuery plugin to accomplish an elegant need: putting a UI or DOM element inside a box, and hiding or showing it with the slide effect; obviously, the hiding part will work partially, in the measure specified by options (letting a part of the target element visible).
## Getting started
Put your target element in a container div, make sure container div is filled completely by the target element, and do this call when you want to hide the target element:
```
$("containerdiv").slideBox("hide");
```
or
```
$("containerDiv").slideBox(); // Because "hide" is the default action
```
Instead, call the following statement when you want it showed:
```
$("containerDiv").slideBox("show")
```


text:
#  Instructions

## Deploy to Server
 1. Setup a Linux/Windows/OSX Server.
 2. Install [.NET Core](https://www.microsoft.com/net/core).
 3. Clone this Repository or download the latest archieve.

### Build the Bot (skip if you downloaded the release)
 1. Clone the repository.
 2. Build the appliication by running one of the following commands:

```
# PowerShell
./build.ps1 -Target Publish

# Bash
./build.sh -Target Publish
```
This publishes the application as zip and folder int the `output` folder.

## Configure the Settings
The Directory `Telegram.Bot.Web` contains two config files:
 1. `appsetings.json` here you can define the config of your bot. All settings can also be configured via Environment variables of the same name.
     - `Telegram:JiraBot:Token` The token of the Telegram bot obtained by [@botfather](https://telegram.me/BotFather).
     - `Telegram:JiraBot:WebToken` Some random secret which is appended to the url. For examle `123456789`.
     - `Telegram:JiraBot:Endpoint` The url where bot messages are processed. For example `https://jira.bot/api/jirabot/update/123456789`.
     - `Telegram:JiraBot:JiraWebhookUrl` The url where jira webhooks are processed. For examle `https:/jira.bot/api/jirabot/webhook/`.
     - `ConnectionString:TelegramSQLConnection` SQL Connection string where the chat-webhook mapping is saved.

 2. `web.config` here you can modify the webserver settings. For more information visit https://support.microsoft.com/EN-US/help/815178.

## Run the Bot
You can simply run the bot by running `dotnet Telegram.Web.dll`.
If you want to run the bot as service here are some additional documentations:
  - [Windows](https://docs.microsoft.com/en-us/aspnet/core/hosting/windows-service)
  - [Unix](http://pmcgrath.net/running-a-simple-dotnet-core-linux-daemon)

If you want to run the webservice behind a reverse proxy you can find more information [here](https://docs.microsoft.com/en-us/aspnet/core/publishing/linuxproduction?tabs=aspnetcore2x).

[![Built with Nuke](http://nuke.build/squared)](https://nuke.build)

repository: StaLeWaR/telegram-jira-bot

repo_name: StaLeWaR/telegram-jira-bot


text:
# 🚗 license-plate-library - Simple license plate generator

> Simple license plate generator for multiple countries.

<!--![license plate](https://github.com/luggesexe/license-plate-library/blob/master/LPL.png)-->

## 📖 Basic Usage
All functions are located in the `\lugges\LPL\LicensePlateLib` class.

This example shows you how to generate a license plate for the FRG.

```php
# First require and use the Library
require('LicensePlateLib.php');
use \lugges\LPL\LicensePlateLib;

# Create a new license plate Library instance
$LPL = new LicensePlateLib;

# Generate the license plate
$generate = $LPL->generateGermanLicensePlate();
echo $generate;

# The generateGermanLicensePlate(); function accepts a region and a city parameter.
# The accepted region parameters are stated below.
# The city parameter is any city code from the given array.

$generateRandomFromNRW = $LPL->generateGermanLicensePlate("NRW");
```
## 🧮 Functions
```php
generateGermanLicensePlate($region, $city); # Regular German license plate
generateGermanArmyPlate(); # German Army license plate
generateGermanWaterPlate(); # German license plate for the Federal Waterways and Shipping Administration
generateSpanishLicensePlate(); # Regular Spanish license plate
```

## 🏙 Region codes

| Country       | Region code   | Translation   |
| ------------- | ------------- | ------------- |
| Germany  | NRW  | North Rhine-Westphalia  |
| Germany  | BV  | Bavaria  |
| Germany  | BW  | Baden-Württemberg  |
| Germany  | H  | Hamburg  |
| Germany  | B  | Berlin  |

## 📝 Questions and Feedback
If you have any questions feel free to open an Issue.
Feedback is appreciated.
Found a typo or want to help? Contributions are welcome.

repository: luggesexe/license-plate-library

repo_name: luggesexe/license-plate-library


text:
---
id: 568
title: "So, I'm Blogging Again"
date: '2018-04-21T09:18:05+08:00'
author: 'Vince Aggrippino'
layout: post
guid: 'https://www.aggrippino.com/?p=568'
permalink: /so-im-blogging-again/
inline_featured_image:
    - '0'
image: /wp-content/uploads/2018/04/alphabet-arts-and-crafts-blog-459688_1200x628-min.jpg
categories:
    - Blogging
tags:
    - blogging
published: true
---
## {{ title }}

> I'm back in the saddle again
> Out where a friend is a friend
>
> Gene Autry & Ray Whitley, 1939

*Am I the cowboy or the horse?*

Inspired by the consistent efforts of [some](https://steemit.com/@webgrrrl) [friends](https://steemit.com/@danieldoughty) and [an article](https://www.freecodecamp.org/news/every-developer-should-have-a-blog-heres-why-and-how-to-stick-with-it-5fd55a247fbf) at freeCodeCamp’s blog, I decided to start blogging again.

I’ve been using GitHub to organize most of my recent efforts and I figured that blogging with [Jekyll](https://jekyllrb.com/) and hosting for free with [GitHub Pages](https://pages.github.com/) would be an ideal solution. All I need to do is create a new project named *blog*, enable GitHub Pages, and start writing [Markdown](https://github.github.com/gfm/) files. No PHP, no server, no database, no security or plugin updates… perfect, right?

It’s not that easy…

> We highly recommend installing Jekyll to preview your site and help troubleshoot failed Jekyll builds.

They repeat this throughout [GitHub’s documentation](https://docs.github.com/en/pages/setting-up-a-github-pages-site-with-jekyll) and they really mean it. There’s no easy way to set up a Jekyll blog on GitHub Pages without either setting up Jekyll locally or forking an existing Jekyll blog.

> Jekyll is not officially supported for Windows. For more information, see “[Jekyll on Windows](http://jekyllrb.com/docs/windows/#installation)” in the official Jekyll documentation.

I know, I know… I shouldn’t be using Windows. I used to be a devoted Linux user and I called myself an Open Source Software enthusiast. Well, I forgot. It’s a thing I’m not going to get into right now, but when I started to think again the computer in front of me had Windows on it. This is currently my only option.

I did the reading. This setup requires Jekyll on Ruby on Bash on Ubuntu on Windows and every step of the process comes with vague warnings about *issues*. Even if I manage to bypass any issues, I have to set up and maintain Ruby on Windows, learn how to use the Gem package manager, setup and maintain Bash on Ubuntu on Windows, learn YAML, and learn the Liquid Templating Engine.

Enough is enough!  What happened to just writing my thoughts in markdown?! I’m busy learning more important things right now. I’m just about ready to throw in the towel and become dependent on WordPress again. One last try… I’ll look for a tutorial.

I found what I needed; An excellent article at Smashing Magazine entitled “[Build A Blog With Jekyll And GitHub Pages](https://www.smashingmagazine.com/2014/08/build-blog-jekyll-github-pages/)” promises to tell me exactly how to set up my own blog with Jekyll and host it with GitHub Pages. That sounds perfect! It is just a little bit misleading, though. The article doesn’t actually tell me how to set up my own blog. It tells me how to fork the author’s blog boilerplate and change some variables to show my information instead of his.

You know what… I don’t care. It got the job done and now I have a Jekyll-driven blog. For now, I can post my thoughts and share them however I want to. When I decide to *upgrade*, either by learning and building Jekyll locally or by diving back into the WordPress ecosystem, I’ll have very little difficulty. My markdown files can very easily be copied over or imported into any system I choose.

repository: VAggrippino/blog

gha_language: SCSS

repo_name: VAggrippino/blog


text:
---
title: SSH Like a Linux Pro You Dawg
date: '2011-03-27'
---

Neck beards rejoice! No longer must you feel trapped to use $cat commands to
awkwardly get your [SSH][1] key from
your Mac to your Linux server...with its' ridiculous up-time. Since this
network admin rarely believes in using Windohs in a server environment, the
below trick might not work for Windows knuckle draggers. For everyone else,
give it a whirl, fire up terminal and connect to your favorite server and copy
your SSH / rsa keys the old-fashioned way:

<script src="https://gist.github.com/2711060.js?file=ssh 1"></script>

<script src="https://gist.github.com/2711060.js?file=copy-id"></script>

You should get some crazy error explaining that your Unix powered Mac is
missing this command. Huh? Because most "normal people" (sadly Macs are getting
more and more simplified due to the influx of iOS people hopping on board)
refuse to try to understand what a server is, let a lone SSH, Apple doesn't
need this rather integral command? Everyone else, you are in luck. Fire up my
favorite Mac OS X packet manager: [Homebrew][2] and type the following command

<script src="https://gist.github.com/2711060.js?file=brew ssh"></script>

Give it a few minutes while the magic finishes, log back into your server
and give the command a whirl again. However, the above snippet only works if
SSH is listening on the default port (port 22).

repository: braidn/blrrrg

gha_language: Liquid

repo_name: braidn/blrrrg


text:
# Data Challenge

Predict if a car purchased at auction is a unfortunate purchase.

## Installation

This assumes the user already has Anaconda installed and is targeted for Python3.5

```bash
pip install -r requirements.txt
```

And install the [`mlutils`](https://github.com/ethen8181/machine-learning/tree/master/projects/mlutils) package which contains customized utility function.

```bash
# navigate to the directory
cd ../mlutils

# install the package
python setup.py install
```

For the modelling part, the [XGBoost](https://github.com/dmlc/xgboost) library is used and based on experience it's best to install it from source. The following section contains the installation instruction for Mac.

```bash
# install gcc from brew,
# note that the second command can
# take up to 30 minutes, be patient
brew tap homebrew/versions
brew install gcc --without-multilib

# install xgboost
git clone --recursive https://github.com/dmlc/xgboost
cd xgboost

# open make/config.mk and uncomment these two lines

# export CC = gcc
# export CXX = g++

# but depending on the installation, we may need to change
# the two lines above to

# export CC = gcc-7
# export CXX = g++-7

# we can check the number after the "-" by entering
# brew install gcc --without-multilib
# it will warn us the version if we already have it

# start the build
cp make/config.mk .
make -j4

cd python-package
sudo python setup.py install
```

## Usage

```bash
# assuming you're at the project's root directory

# train the model on the training set and store it
python src/main.py --train --inputfile training.csv --outputfile prediction.csv

# predict on future dataset and output the prediction
# to a .csv file in a output directory (will be created
# one level above where the script is if it doesn't exist yet)
python src/main.py --inputfile test.csv --outputfile prediction_future.csv
```

## Documentation

- `src/main.ipynb` Jupyter Notebook that contains a walkthrough of the overall process. This is the best place to start. [[nbviewer](http://nbviewer.jupyter.org/github/ethen8181/machine-learning/blob/master/projects/data_challenge/src/main.ipynb)]
- `src/main.py` Once you're acquainted with the process, you can just run this Python script to run the end to end pipeline. [[Python script](https://github.com/ethen8181/machine-learning/blob/master/projects/data_challenge/src/main.py)]
- `src/utils.py` Utility function for the project used throughout the Jupyter notebook and Python script. [[Python script](https://github.com/ethen8181/machine-learning/blob/master/projects/data_challenge/src/utils.py)]

repository: theGreenJedi/Path

gha_language: Jupyter Notebook

repo_name: theGreenJedi/Path


text:
# Fibonacci
<!-- If you'd like to use a logo instead uncomment this code and remove the text above this line

  ![Logo](URL to logo img file goes here)

-->

By Scott Hale

## Description
**Fibonacci** Quickly find the nth number* in the Fibonacci sequence (1,1 style).

*Note: Because of the recursion used in the calculation, passing a number much bigger than 20 could take quite a while to calculate...not recommended!

## Installation

```ruby
require 'fib.rb'
```

## Usage

To use Fibonacci, just pass the nth number you're after into the Fib.nth class method

```erb
Fib.nth(3) # => 2
Fib.nth(7) # => 13
```

## How It Works

Within the fib.rb file in the lib folder, class Fib introduces a class method where recursion is used to calculate all nth numbers in the sequence (except for the first & second numbers: 1 and 1).

## Authors

* Scott Hale (bozcotty)

## Collaborators and Sources

* Sunny Mittal (sunny-mittal)
* http://meowist.github.io/blog/2013/03/02/fibonacci-meets-ruby/

repository: bozcotty/fibonacci

repo_name: bozcotty/fibonacci


text:
---
layout: post
title: "Lessons learned in my first 3 years of data science"
date: 2020-01-01 19:22
comments: true
author: "Jonathan Ramkissoon"
math: true
summary: A compilation of lessons learned in my first 3 years as a data scientist
---

A compilation of lessons learned in my first couple years as a data scientist. Many of these were mistakes I made and some are mistakes I've seen other data scientists make.

### Please build a baseline

This is one of the most important things I learnt in an actual job as opposed to school. For me, school was a time where I get to learn about cool, complicated models, with no real notion of their practicality.  Why would I spend time building this when I'm just going to have to do it over? Just do it. It is likely that instead of wasting time, you end up thinking more about the problem and its constraints, as opposed to trying to use the "best" (by some arbitrary measure) model, for your problem.

### Talk to experts

Data scientists are (should be?) experts at building models, but models are nothing without end users. In this sense,

### Machine learning is glorified

### Checklist of what not to do

I've come across some questonable decisions made by data scientists over the years, and here are some of them. I'm guilty of nearly every single one of these!

- **Machine learning first**: This is the token exmaple of "what not to do as a data scientist" and even though it's so well publicized it still happens. I guess combination of management wanting AI/ML solutions and some managers wanting better branding for their team is deadly?

- **Jumping to complex models too quickly**: Imagine learning how to walk by first trying to run. Although the goal is to run, we first have to figure out how our legs work. This is the same for solving data problems. Time spent playing with simple models give you a better idea of both the data and the problem that will be invaluable in the latter stages of the project. Simple doesn't always mean linear regression, it means don't overthink the modelling phase too early. I've taken this (wrong) approach in different aspects of my life, from sports to academics. Nearly every time, I only realize my mistake when it's too late and time is no longer on my side.

- **Ten steps at a time**:

### The Art Model Development

In school I would frequently get aggitated that I don't know what the best way to approach a dataset was, I didn't really have a systematic way of choosing and experimenting with models, and much more. I quickly learnt that this is not a science, but more of an art. Knowing what to look for in a dataset is not only problem dependent, but also takes time. So does getting familiar with a modelling problem, and its constraints. Sure, you may know some tools, but in the beginning you have no way of really knowing how to use them.


text:
---
slug: today-county-health-officer-lectures
title: "Today: County health officer lectures"
date: January 01 2020
---

  This semester’s Health Sciences/Biology Speaker Series concludes April 28,
  when Monterey County's Director of Public Health Hugh Stallworth visits CSU
  Monterey Bay.

  Public Health: The Good, The Better, The Best – Understanding Public Health
  and Its Importance to a Healthy Community will be Dr. Stallworth's topic.

  The lecture will be held at 4:30 p.m. in Room 3145 of the Tanimura and Antle
  Family Memorial Library. The public is invited. Driving direction and a campus
  map are available here.

  Dr. Stallworth is board-certified in public health and preventive medicine. He
  earned a medical degree from Wayne State University in Detroit, and served his
  internship and residency at Detroit General Hospital and Henry Ford Hospital.
  He completed his Masters in Public Health at CSU Long Beach.

  The first 10 years of Dr. Stallworth’s career were spent in private practice.
  Realizing that he had a gift for teaching, he accepted a position as assistant
  professor of family practice at the University of Kentucky Medical Center.

  Stints as county health officer followed, first in Fresno County and then
  Orange County.During his tenure in Orange County, he guided the health
  department through the largest Multiple Drug Resistant TB outbreak in a school
  in U.S. history.

  From 1999 to 2002, he served as national vice president of cancer control for
  the American Cancer Society, where he developed an outreach model for
  underserved communities. The model has been successful from Massachusetts to
  the Mississippi Delta.

  He has also served as director of health and hospitals for the city of St.
  Louis, as well as adjunct associate professor in the Department of Health
  Management and Policy at St. Louis University School of Public Health.

  The lecture is sponsored by the Tribeta Honor Society and the Pre-Med Club.
  For more information, contact Dr. Aparna Sreenivasan at 582-3210.

repository: csumb-archives/news-gatsby

repo_name: csumb-archives/news-gatsby


text:
# Step 3/4 - Readme

Remember you created a `README.md` file. Now it's time to populate it. Fill the blank topics that were left before. Create a branch named `docs/update-readme` and fill in the info you left blank before. Open a pull request for this branch after finished.

```
  - Project's Name
  - Project's Description
  - Environment and tools *
  - Steps to run and debug *
```

**TIP:** an excellent README is that one document that is sufficient for any developer to be able to run and contribute to your project.

**NOTE 2:** For now on, you're going to create branches and Pull requests on your own. Pick good and clear branch names and try to open Pull Requests for one or only few steps. It's not a good practice to have too much code on a PR. 😅

license: ISC

repository: indigotech/taq-github-bot

gha_language: TypeScript

gha_license_id: ISC

repo_name: indigotech/taq-github-bot


text:
# Find a Word

* Execution

```
cd projects/find_word;
cargo build;
./target/debug/find_word;
cargo doc --open;
```

* Tests

```
cd projects/find_word;
cargo build;
cargo test;
```

* Notes

Originally setup with:

```
mkdir projects
cd projects
cargo new find_word --bin
cd find_word
```

repository: ltfschoen/RustTest

gha_language: Rust

repo_name: ltfschoen/RustTest


text:
# CoSTAR Tools

This section includes the code to manage the MoveIt collision detection and a few other utilities that provide useful services for creating powerful robot programs.

**MoveIt collision detection**: creates a PlanningScene based on detected objects, plus adds a table.

Run with:
```
roslaunch moveit_collision_environment colision_env.launch mesh_source:=$(find moveit_collision_environment)/data/mesh tableTFname:=ar_marker_2 defineParent:=true parentFrameName:=/world
```

**Recording point clouds**: this is used to collect data and scan objects. Run with:

```
rosrun point_cloud_recorder point_cloud_recorder.py _id:=$OBJECT_NAME _camera:=$CAMERA_ID
```

This will expose the ``/record_camera`` rosservice which can be called from a UI node. Files will be created wherever you ran the point cloud recorder.

Roslaunch would look something like:

```xml
<node name="point_cloud_recorder" pkg="point_cloud_recorder" type="point_cloud_recorder.py">
  <param name="id" value="NameOfMyObject"/>
  <param name="camera" value="kinect2"/>
</node>
```


text:
---
title: Accessibility
---

### Layout attributes

Since Layer Cake components live inside your project, you have full control over what your markup looks like. The exception is the built-in layout components `Svg`, `Canvas`, `Html`, `Svg` and `WebGl`.

Each of these components exposes props that will help with accessibility. These are the props that are common to all layout components:

* `label` → Sets [`aria-label`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-label)
* `labelledBy` → Sets [`aria-labelledby`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-labelledby)
* `describedBy` → Sets [`aria-describedby`](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-describedby)

```svelte
<LayerCake>
  <Svg
    label="A chart label of some kind."
  >
    <!-- Components go here -->
  </Svg>
</LayerCake>
```

### HTML layouts

These aria labels are not very meaningful for `Html` components without also specifying a `role` attribute so if you set any of the above attributes, your HTML component will have `role='figure'` set. If you don't want that falue to be `'figure'`, the `Html` component – and only that one – has a `role` prop that will override it.

```svelte
<LayerCake>
  <!-- By default, any Html component has role set to 'figure' but you can change it with a prop -->
  <Html
    role='figure'
    label="A chart label of some kind."
  >
    <!-- Components go here -->
  </Html>
</LayerCake>
```

### SVG layouts

The `Svg` and `ScaledSvg` components have a `title` prop and a named `title` slot.

The prop is shorthand to set the contents of a `<title>` tag like this:

```svelte
<LayerCake>
  <Svg
    title='A chart title of some kind.'
  >
    <!-- Components go here -->
  </Svg>
</LayerCake>
```

And becomes...

```html
<div class="layercake-container">
  <div class="layercake-layout-html">
    <title>A chart title of some kind.</title>
    <!-- Components go here -->
  </div>
</div>
```

If you want to set more custom HTML, you can use the named `title` slot.

```svelte
<LayerCake>
  <Svg>
    <div slot="title">A chart title of some kind in custom HTML.</div>
    <!-- Components go here -->
  </Svg>
</LayerCake>
```

And becomes...

```html
<div class="layercake-container">
  <div class="layercake-layout-svg">
    <div>A chart title of some kind in custom HTML.</div>
    <!-- Components go here -->
  </div>
</div>
```

You mostly will just use the `title` prop but the slot is there as an escape hatch. Setting the `title` slot will override any value you set as the prop.

### Canvas and WebGl layouts

The `Canvas` and `WebGl` layout components have a `fallback` prop and a named `fallback` slot that defines the text to display when `<canvas>` is unavailable.

```svelte
<LayerCake>
  <Canvas fallback="A description of the chart to display when canvas is unavailable.">
    <!-- Components go here -->
  </Canvas>
</LayerCake>
```

And becomes...

```html
<div class="layercake-container">
  <div class="layercake-layout-canvas">
    <canvas>A description of the chart to display when canvas is unavailable.</canvas>
  </div>
</div>
```

If you want more complex fallback markup, set the named `fallback` slot:

```svelte
<LayerCake>
  <Canvas>
    <svelte:fragment slot="fallback">A description of the chart to display when canvas is unavailable.</svelte:fragment>
    <!-- Components go here -->
  </Canvas>
</LayerCake>
```

And becomes...

```html
<div class="layercake-container">
  <div class="layercake-layout-canvas">
    <canvas>A description of the chart to display when canvas is unavailable.</canvas>
  </div>
</div>
```

repository: mhkeller/layercake

gha_language: Svelte

repo_name: mhkeller/layercake


text:
# Apache.NMS.ActiveMQ.NetStd
Apache NMS for ActiveMQ Class Library (.Net Messaging Library Implementation): An implementation of the NMS API for ActiveMQ

Requires [Apache.NMS.NetStd](https://www.nuget.org/packages/Apache.NMS.NetStd).

This was an exact copy of the original [Apache.NMS.ActiveMQ](http://activemq.apache.org/nms/apachenmsactivemq.html) project (v <IP_ADDRESS>08), the difference is it targets .NET Standard 2.0 with some modifications for SslProtocols.

# Version <IP_ADDRESS>14
Added static class **SslTransportManager** to configure **SslProtocols** for **SslTransport**

> i.e SslTransportManager.AllowedProtocols = SslProtocols.Tls | SslProtocols.Tls11 | SslProtocols.Tls12;

**NOTE:** SslProtocols.Ssl2 & SslProtocols.Ssl3 will always be stripped when targeting .Net Core as they are deprecated.