text:
---
layout: page
title: Tools
permalink: /tools/
---

"Give me six hours to chop down a tree and I will spend the first four
sharpening the axe." - Abraham Lincoln

Tools, machines, services: there are many things out there that have
the potential to make our lives easier. But finding the best tools
among the millions of options can be a difficult and time-consuming
process in itself. Hence, I personally find it pretty useful to hear
about the tools and services that other successful people use.
Similarly, I thought it might be helpful for some people if I share my
experiences as well, even though I'm only moderately successful ;-)

# "Second brain" and organization tools

With increasing age and decreasing brain capacity processing the
constant stream of information that we encounter on a daily basis is
not an easy task. Hence, I rely on a series of tools in order to
steadily take notes, connect the dots between snippets of information
and manage my daily life and tasks. Following are the most important
tools in order to build such a second brain.

### Notion

[Notion.so](https://www.notion.so) is a productivity and organization tool that allows users to
create notes, tasks, wikis, and databases all in one place. It is
often referred to as a "second brain" because it allows users to
centralize and access all of their important information and tasks in
one location. Notion's flexibility and customization options allow
users to tailor it to their specific needs and workflows, making it an
effective tool for staying organized and on top of tasks and projects.

### Instapaper

[Instapaper](https://www.instapaper.com) is a tool for saving and
organizing web pages to a personal library for later viewing, reading
or studying. It minimizes distractions while reading by providing a
customized appearance adjusting the font size, line spacing, and
background color. Additionally, it has a feature called "highlight and
notes" that allows users to highlight specific parts of the article
and add notes to them. These notes can be sync'ed with Notion.so (with
the help of Readwise) and hence are a great way to gradually build up
a personal knowledge database.

### Readwise

[Readwise](https://readwise.io/) is a tool that helps users to review and retain the
information they've read. It works by integrating with popular reading
apps like Kindle, Instapaper and Pocket, and automatically extracts
highlights, notes and annotations that users have made in those apps.
It then presents those notes in a daily email digest, and allows users
to review the information at a scheduled time. By doing so, it helps
users to keep track of what they've read, remember the key points, and
retain the information for longer. However, I mostly use Readwise for
it's ability to sync any notes with Notion.so which is my preferred
tool to stay organized and make the most of the information I've
read by making it easily accessible and reviewable.

### Google cloud services

I generally rely on the set of free cloud-based services from Google.
Gmail is my preferred email service. And Google Keep and Google
Calendar are perfect and lightweight tools for note-taking and
scheduling appointments and reminders, in particular whenever I'm on
the go.

# Software development

## IDE / editor

### Visual Studio Code

Over the years I've tried couple of IDE's and text editors for
software development, note taking and markdown or LaTeX documents. My
current favorite is [Visual Studio
Code](https://code.visualstudio.com/), a highly customizable and
lightweight IDE that is available for Windows, macOS, and Linux
operating systems. It supports a wide range of extensions that can be
installed to enhance its functionality. And it allows customization of
the editor with themes, keyboard shortcuts, and other preferences.
This is a necessary feature for people like me that once climbed the
steep learning curve and used [GNU
Emacs](https://www.gnu.org/software/emacs/) and can't imagine a life
without Emacs shortcuts anymore ;-)

### Emacs

Emacs has a very keyboard-centric interface: it is designed to be used
primarily with the keyboard, which makes it possible to perform many
operations quickly and efficiently. It is also highly customizable and
allows a wide range of text editing capabilities, including syntax
highlighting, auto-completion, search and replace, and recording of
macros. I actually still use it for quick notes, text editing and git
commands through magit.

## Software languages

### Python

At the moment I do most of my coding in
[Python](https://www.python.org/), mostly because I think it has the
best ecosystem for my usecases right now. It comes with great packages
for ML, AI and data science applications. But it also has a great set
of general purpose tools for requirements like unit testing, database
connections, sending / receiving http requests, SDKs for cloud
providers and many more. Also, it is generally well supported by third
party services or frameworks, e.g. AWS lambda functions, Google Earth
Engine, Blender 3D and many more.

### Julia

Before Python I did some for fun coding in
[Julia](https://julialang.org/). I still think that Julia has great
potential because it was designed from the beginning for high
performance. It also comes with a lot of other state of the art syntax
goodies like multiple dispatch, metaprogramming capabilities, abstract
types, multi-threading and many more. I will definitely keep an eye on
Julia, its growing ecosystem and adoption in the industry.

### R

Although Python is my favorite language at the moment,
[R](https://www.r-project.org/) has a great ecosystem of packages as
well, in particular when it comes to statistics and data applications.
It is definitely worthwhile to know at least some of the basics, and I
happen to use R from time to time in order to benefit from some
package that might not yet have a suitable counterpart in the Python
ecosystem.

### Matlab

[Matlab](https://www.mathworks.com/products/matlab.html) was the
language that I used for my first data application (my diploma
thesis), but also was the first language that I used in a production
setup. I still think that it can be a good starting point for
beginners: it comes with a good IDE and a great built-in debugger.
However, due to its proprietary nature Matlab comes with licensing
costs and it also is rather hard to embed into a broader software
infrastructure. It also is rather limited in capabilities for certain
usecases, e.g. data science and AI applications. Most state of the art
research packages are published in open source software languages first.

## Organizing code

### Meld

[Meld](https://gitlab.gnome.org/GNOME/meld) is a visual diff and merge
tool to compare files or directories. It is an open-source software
that runs on Windows, macOS, and Linux operating systems. It provides
users with a graphical user interface that displays the differences
between two or three files side-by-side. This makes it easy to
identify and merge changes made to the code or other text-based files.

### Git

[git](https://git-scm.com/) certainly was a game changer for me when I
started using it roughly a decade ago. I started using it when I had
to sync code between multiple machines (work desktop, laptop at home),
but I soon noticed that it generally forces you to set up a cleaner
folder structure and file history. No more file_v1, file_v2,
file_final labelling required ;-) And of course it reaches its full
potential only when you are working collaboratively with multiple
persons on some project.

### Magit

There are several extensions to git that I use.
[magit](https://magit.vc/) is my favorite entrypoint to quickly
execute git commands with a lot of convenient keyboard shortcuts. But
it requires Emacs, and hence it usually is not the best choice for a
broader audience. But it showed me how much better your git experience
can become when you use some kind of GUI or helpful entrypoint for
git.

### Github desktop, git bash

Whenever I'm working on Windows, I tend to use [Github
Desktop](https://desktop.github.com/) or git bash for more complicated
commands than simple merges and commits.

### MyRepos

I also use [myrepos](https://github.com/RichiH/myrepos) from time to
time when I'm either involved into too many projects and repositories
simultaneously, or when I want to generally make sure that all my
relevant local repositories are up to date. It saves you some time
when you need to fetch all of the latest changes in multiple
repositories.

### git-lfs

For binary and / or large files I mostly use
[git-lfs](https://git-lfs.com/). Although I ran into some
synchronization issues from time to time in projects with multiple
collaborators and files under git-lfs control. So I'm actually still
searching for a better alternative here.

## Reproducible computing and job scheduling

### DVC

One such alternative could be [DVC](https://dvc.org/): data version
control. It has a slightly different way of dealing with large files,
so it is not a perfect substitute. But it is still a great way to keep
track of binary files and / or large files and it actually has an even
much broader scope. It allows you to keep track of which data inputs
and model outputs are associated with each other, so that e.g. in AI
applications you don't lose control of which inputs where used for
which model. But it also allows easy sharing of files amongst multiple
project members so that computationally intensive scripts do not need
to be run multiple times. And if you want, you can also use DVC to
keep track of the sequence of steps and scripts that have to be run in
order to replicate the current project state.

### GNU Make

[GNU Make](https://www.gnu.org/software/make/) was originally invented
as a build automation tool that can be used to automatically build
executable programs and libraries from source code. One needs to
define a set of rules that describe how the various source code files
should be compiled and linked together to produce the final executable
or library. Make uses a file timestamp-based approach to determine
which files need to be rebuilt. This means that if a source file or a
dependency has been modified since the last build, Make will
automatically rebuild the necessary parts of the program. This helps
to ensure that the program is always up-to-date and that unnecessary
rebuilding is avoided.

If you think about it, most projects can actually be defined as a
series of computing steps that need to be followed in a certain
sequence. Once you write down the full series of steps, the project
can be fully reproduced. Or, if you update or change any of the inputs
of the computation sequence, you can compute and update any outputs.
This can be nicely used for machine learning applications, where you
can update your dataset and automatically re-train your model.

### Airflow

While GNU Make can facilitate manually re-running a sequence of
computational steps, you need a more powerful framework if you want to
regularly run scripts (jobs) in a fully automated way. One of the most
popular frameworks to programmatically create, schedule, and monitor
workflows is [Apache Airflow](https://airflow.apache.org/). It was
originally developed by Airbnb and is now an open-source Apache
Software Foundation project. With Airflow, you can define your
workflows as code using Python, which allows you to easily create
complex data pipelines. These pipelines can involve tasks such as
running SQL queries, extracting data from APIs, transforming data, and
loading data into databases or data warehouses. In addition to the
scheduling and computing functionality, Airflow also provides a
web-based user interface for monitoring and managing workflows. This
way you get a nice overview of the status of all jobs in order to
identify any failures and you can see some metrics for your jobs like
average run times. While writing jobs itself is rather trivial, in my
view the hard part with Airflow is setting up an appropriate
infrastructure. You obviously don't want to have Airflow running 24/7
on your laptop, but you need to deploy it to a cloud. So you need to
set up a deploy pipeline, think about how to update your existing
jobs, your Airflow version, your operating system. And depending on
the amount of jobs that you want to run you also need to think about
connecting your Airflow scheduler to a computing cluster that can run
your jobs in parallel.

### Docker

[Docker](https://www.docker.com/) allows you to create snapshots of a
complete software stack, including the application code, runtime,
system tools, and libraries. This is very handy whenever you want to
move your locally developed code to some other machine, e.g. a
computing server or to the cloud. Any code that you run usually comes
with a lot of dependencies and it is a non-trivial task to replicate
the exact codebase on a different machine. E.g. if you want to move
your Python machine learning model to the cloud then first of all you
need to make sure to move the exact version of your code to the cloud.
But besides your own code base, you also need to make sure that you
use the exact same Python packages as well as the same Python
interpreter that you used locally. You can use tools like
[venv](https://docs.python.org/3/library/venv.html) or
[Poetry](https://python-poetry.org/) for this. But in many
applications you also need to fix dependencies that are outside of
your Python stack. For this you would also need to fix certain
libraries of your operating system. E.g. if you want to deploy a model
that does image recognition you might rely on
[OpenCV](https://opencv.org/), or if you work with audio or video
files you might rely on [FFmpeg](https://ffmpeg.org/). So in order to
facilitate re-building an exact computing environment on some other
machine, you can use Docker.

# Computer

As someone who values flexibility, I prefer to work solely on my
laptop without the need for additional screens. This allows me to work
from anywhere with ease. Currently, I use a Lenovo Legion 5 with an
AMD Ryzen 7 6800H processor. The laptop has a large 15.6'' display
with high-resolution, providing me with ample workspace and overview
during coding. Additionally, the laptop boasts a GeForce RTX 3070 GPU,
which I can utilize for computationally intensive tasks such as
machine learning models or 3D graphics rendering. Overall, my setup
allows me to work efficiently and effectively, no matter where I am
for a good price to quality ratio. The only downside is that the
computer only has 16GB RAM and a rather small disk size of 1TB.

### Operation system

Over the years I have found [Ubuntu](https://ubuntu.com/desktop) to be
my favorite operating system. While [Microsoft
Windows](https://www.microsoft.com/en-us/windows?r=1) and its
mouse-click GUI may be the easiest way to get started with computers,
the Linux command line offers a much more efficient way of speeding up
workflows with bash commands and allowing for automation. One of the
major advantages of Ubuntu is that it is free to use, which is why I
have used it in the past when teaching a statistics course in Africa,
where I wanted to ensure all students had access to a free and
reproducible setup. In addition to its cost-effectiveness, Ubuntu also
feels more lightweight than Windows to me. It does not require as many
anti-virus checks and time-consuming updates, making it a more
streamlined and efficient choice for my workflow.

While Ubuntu is my preferred operating system, I do occasionally use
Windows as well. After all, it is still the standard operating system
used by the majority of computer users. When I want to share
something, it's important to consider the OS used by the people I'm
sharing with (which is most likely Windows). Using the same OS as the
recipient can make the process much smoother. Furthermore, there are
certain programs or drivers that only run on Windows or Mac, so it's
necessary to use those operating systems in those specific cases. For
example, the GPU on my laptop only runs correctly on Windows. In these
situations, I find it necessary to switch to Windows myself to ensure
compatibility and optimal performance. While Ubuntu is my go-to
operating system, it's important to choose the right tool for the job
and sometimes this means using Windows or macOS instead of Ubuntu.

### Password management

[KeepassX](https://www.keepassx.org/) is a free and open-source
password management software that helps users to securely store and
manage their passwords in an encrypted database. It is a
cross-platform application that runs on various operating systems,
including Windows, Linux, and macOS. Using a password manager can
encourage you to use better password practices, such as creating
strong and unique passwords and changing them regularly. Since
passwords are stored in an encrypted database, this means that even if
your computer is hacked or stolen, your passwords cannot be accessed
without the master password.

### Stay sync'ed / back'ed up

[Dropbox](https://www.dropbox.com) is a cloud-based file hosting
service that allows users to store and share files and folders across
multiple devices and with other users. It works by creating a virtual
folder on a user's computer or mobile device. Any file or folder
placed in this folder is automatically uploaded to Dropbox's servers
and synced across all of the user's devices that have Dropbox
installed. This means that users can access their files from anywhere
with an internet connection, whether it's on their computer,
smartphone, or tablet.

I use Dropbox for several reasons, including syncing my password
database across devices. For example, this allows me to access my
credit card credentials on my mobile phone when I'm on vacation or
away from my computer. Since KeepassX stores any passwords in an
encrypted database, I do not need to worry about data privacy concerns
in the Dropbox cloud. In addition to password syncing, I also use
Dropbox to sync any e-books or PDF articles across devices. This is
particularly useful when I want to read them on my tablet, which has a
bigger screen size and a pen for highlighting. Another key benefit of
using Dropbox is that files or documents are automatically back'ed up
to the server, so you don't have to worry about losses of data when my
device gets stolen or damaged. However, you should think about data
privacy issues before you put all of your data into the cloud.

## MISC

### OBS Studio

[OBS Studio](https://obsproject.com/) (Open Broadcaster Software
Studio) is a free and open-source software for live streaming and
video recording. It currently is my preferred desktop recording
software that I use to create tutorials or other educational videos on
my laptop. It allows users to capture and record video from multiple
sources, including webcams, desktop screens, and applications, and it
is available for Windows, macOS, and Linux operating systems.

### Blender 3D

[Blender 3D](https://www.blender.org/) is one of most impressive
open-source projects that I've ever seen. It offers a comprehensive
suite of tools and features for creating 3D models, textures,
lighting, and animation. Its rendering engine lets you create
photorealistic images and animations, powerful enough that you could
literally use it to create your own Pixar-like animation movie (have a
look at [this](https://youtu.be/XYaw7gf48kQ) YouTube video to see some
awesome examples of Blender 3D outputs). It is just astonishing to see
how powerful free and open-source software can be.


text:
<!-- [![Build Status](https://travis-ci.org/alextanhongpin/compress.js.svg?branch=master)](https://travis-ci.org/alextanhongpin/compress.js) -->

# compress.js
A JavaScript client side image compression. This library uses the Canvas API to compress the image, and thus will not work on the node.js server-side.

### Advantage:

- quick compression on the client-side
- compress multiple images and convert them to base64 string
- save data by compressing it on the client-side before sending to the server
- automatically resize the image to max 1920px (width or height, but mantains the aspect ratio of the images)
- fix image rotation issue when uploading images from Android an iOS

### NOTE:

There are several limitations for this library:
- When working with `image/gif`, the compressed image will no longer animate.
- When working with `image/png` with transparent background, the compressed image will lose transparency and result in black background.

### Installation

NPM Package [here](https://www.npmjs.com/package/compress.js).

```
npm install compress.js --save
```

### Import

```
const Compress = require('compress.js')
```

### Demo

Try out our demo [here](https://practical-easley-4e78c7.netlify.app/).

### Usage

```javascript

// Initialization
const compress = new Compress()

// Attach listener
const upload = document.getElementById('upload')
upload.addEventListener('change', function (evt) {
  const files = [...evt.target.files]
  compress.compress(files, {
    size: 4, // the max size in MB, defaults to 2MB
    quality: .75, // the quality of the image, max is 1,
    maxWidth: 1920, // the max width of the output image, defaults to 1920px
    maxHeight: 1920, // the max height of the output image, defaults to 1920px
    resize: true, // defaults to true, set false if you do not want to resize the image width and height
    rotate: false, // See the rotation section below
  }).then((data) => {
    // returns an array of compressed images
  })
}, false)

// or simpler
compress.attach('#upload', {
  size: 4,
  quality: .75
}).then((data) => {
  // do something with the compressed image
})
```

```javascript
// example output
[{
  alt: '10mb-image.jpg',
  data: '/9j/4AAQSkZJRgABAQAAAQABAAD/2wBD...',
  elapsedTimeInSeconds: 1.9292250000000004,
  endHeightInPx: 1280,
  endSizeInMb: 0.44418832116788315,
  endWidthInPx: 1920,
  ext: 'image/jpeg',
  initialHeightInPx: 3744,
  initialSizeInMb: 8.989774,
  initialWidthInPx: 5616,
  iterations: 1,
  prefix: 'data:jpeg;base64,'
  quality: 0.75,
  sizeReducedInPercent: 95.058960089899,
}]
```

You can even convert the compressed base64 string to a file before uploading to the server:

```javascript
compress.attach('#upload', {
  size: 4,
  quality: .75
}).then((results) => {
  // Example mimes:
  // image/png, image/jpeg, image/jpg, image/gif, image/bmp, image/tiff, image/x-icon,  image/svg+xml, image/webp, image/xxx, image/png, image/jpeg, image/webp
  // If mime is not provided, it will default to image/jpeg
  const img1 = results[0]
  const base64str = img1.data
  const imgExt = img1.ext
  const file = Compress.convertBase64ToFile(base64str, imgExt)
  // -> Blob {size: 457012, type: "image/png"}
})
```

## Rotation

To enable auto-rotation based on browsers support for [exif-orientation](https://www.daveperrett.com/articles/2012/07/28/exif-orientation-handling-is-a-ghetto/), pass the `rotate` options in the config.

```js
// Use Modernizr to detect if exit-orientation is supported.
const browserSupportsExifOrientation = () => {
  return new Promise((resolve) => Modernizr.on("exiforientation", resolve));
};

// Only rotate if browser does not support exit orientation.
const shouldRotate = async () => {
  const supported = await browserSupportsExifOrientation();
  return !supported;
};

const rotate = await shouldRotate();

// When compressing ...
compress.compress(files, {
    ...
    rotate, // Pass the rotation here
  })
```

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive


text:
# NVIDIA GPU Telemetry Exporter for Prometheus

Write an exporter to push Nvidia Gpu data to Prometheus.

## Requirements

* CUDA ToolKit - Modifications may need to be made in nvml.go to point to your install, you can use this command to find cuda.h path

```bash
locate cuda.h
```

* CUDA NVML - Modifications may need to be made in nvml.go to point to your install, you can use this command to find libnvidia-ml.so path

```bash
locate libnvidia-ml.so | grep -o ".*nvidia-[0-9][0-9][0-9]" | head -n 1
```
## Build
    make

## Usage

    ./nvidia_exporter [flags]

### Flags

* __`web.listen-address`:__ Listen on this address for requests (default: `":9114"`).

* __`web.telemetry-path`:__ Path under which to expose metrics (default: `"/metrics"`).

## License

Portions of nvml.go are based on David Ressman [go-nvml](https://github.com/davidr/go-nvml). It has been cleaned up and modified for this exporter.

MIT


text:
[<<< Previous question <<<](0032.md)  Question ID#0033.md  [>>> Next question >>>](0034.md)

You run the following PHP script:
```php
<?php echo 0x33, ' birds sit on ', 022, ' trees.';
```
What will be the output?

- [x] 51 birds sit on 18 trees.
- [ ] 51 birds sit on 0 trees.
- [ ] 51 birds sit on 22 trees.
- [ ] 51 birds sit on trees.


text:
---
title: I thought paypal was better...
date: '2015-08-10 12:59:58'
tags:
  - web
published: true
modified: '2015-08-11 19:23:55'
---
# I thought paypal was better...

We've been using PayPal for [ffconf](http://ffconf.org) since 2009. The first year it took the full 6 months of sale to sell ~200 tickets. In 2010 it took 3 months to sell 283 tickets. 2011, 4 days - and that was the first of the trouble. 2012 to 2015, it's taken under 10 minutes.

<!--more-->

## The first trouble

The troubles that [PayPal had with effectively killing conferences was well documented](http://www.creativebloq.com/netmag/burned-paypal-9126093).

PayPal had "limited" our funds the first year (2011). There was an "unexpected spike" in our transactions which caused a red flag. Fair enough. The funds were locked until the event was over in November 2011 (IIRC we'd moved most of the funds out quickly and they were only holding around £6,000) - but it's important to note that Julie and I have always bank-rolled the year's event with the previous year's profits.

Specifically, we know that the event covers our costs (both expenses like the venue, and our operating costs). So we can afford to pay the venue ahead of time without the funds from the tickets.

## A hero in the midst

In 2013 it happened again, and somehow [Bill Scott](https://twitter.com/billwscott) got wind of our troubles and explained that he was carrying the message back to the very top dogs (at the time a new CEO was in place and working hard to change PayPal's reputation).

He did an amazing job. Something had shifted in PayPal and they (the company) appeared to understand recurring events and how transactions would work.

2014's tickets sold and there wasn't a peep from PayPal at all. It seems like it was all good.

But...

## 2015 and 1 month after selling out

We released tickets for ffconf 2015 a month ago. We sold out in (two batched totalling) 7 minutes.

As usual, I removed *some* funds from PayPal, and left around £15,000 for any refunds and anticipation of any queries from PayPal (old habits and all).

And here's when it goes all wrong...

This account is so there's something written about how it's going wrong, because I'm having *a lot* of trouble getting information into PayPal directly.

## Going wrong

The timeline:

- I get a phone call (good) at 10am - but no information, just that "John" is calling from PayPal to speak to me, and that they'll email.
- I get an email, asking for the following from me:

> Your account has recently been reviewed by our merchant team due to the following:
 - Increase in volumes processed
>
> We tried to call you on 10/08/2015, but we couldn't reach you. To allow time to review this in more detail, we've temporarily limited what you can do with your account until you submit the information you need to provide and take the actions listed.
>
> Check that you've answered all questions and provided all information we ask for to restore your account as soon as possible.
>
> - When is the event taking place?
> - What kind of service do you provide? (accommodation, registration, tours, etc)
> - Is the event organised by you or you are acting as intermediary between the buyers and the event organiser? (if so, please provide us with the contract with the event organiser).
> - How many tickets are being sold? How many tickets are you planning to sell via PayPal?
> - What is the average ticket cost?
> - Have you previously hosted events? (if yes, how many years have you hosted these events?)
> - Are the proceeds from Ticket Sales required as capital to run the event?
> - If so, can you provide an Event expense List and projected payment dates for each expense? Specifically, details on the expenses that need to be made in advance of the event.
> - Do you have a venue booked for the event? Need confirmation for the venue booking? Confirm capacity of the venue?
> - Do you have insurance in case of event being cancelled? Can they provide details of that insurance? (PayPal may be added as beneficiary to this insurance as a partial mitigant).
> - Expected Total Payment Volume to receive via PayPal? Is PayPal the only processor of this event? If no, what is the % processed through PayPal.
> - How often are you expecting to conduct these events?
> - What is the cancellation policy for this event?
>
> Once we receive the information, we aim to complete our review and respond to you within 72 hours.

- I reply, mostly to say I've given this information before, but include some other points...
- The email **bounces back**... *deep breath*
- I visit PayPal.com - it doesn't say *how much* my account is limited by, just that I need to "resolve" the "check your email for more information"
- I try to upload the text email I replied with...
- "Send files" won't disable, I notice that I can only send PDF, PNG or JPG...
- I print my email reply to a PDF, *then* upload that...

Now I just wait. God knows how they'll get in touch, or whether they will again. I've provided all the information about our transactions in previous years, and what annoys me the most is that the spike in our transactions **is consistent with previous years**.

Honestly, I don't really care what they do. I'm expecting the funds to be held until after the event has finished (or 2 months after...which is just as annoying), after which I'll be expected to somehow prove that people didn't want a refund *post* event.

So, yeah, I thought PayPal was better... Filing under "Funsies".

<div class="update">
**Updated 2015-08-11:** the account limit has been removed. I'm not 100% sure why, since the only information I provided was a slightly ranty email. It's quite possibly *this* blog post that helped, or not. I'm not entirely sure!.
</div>

branch_name: refs/heads/main


text:
---
title: trigger_bounce_stickybombs
category: entity
tags:
 - trigger
 - sticky jump
---

----

A [trigger](https://developer.valvesoftware.com/wiki/Triggers){:target="blank"} volume that causes stickybombs to bounce when colliding with any surface.


text:
## Install

`$ sudo npm install -g explain-command`

## Use

Explain a command from your command line:

```
$ explain tar -xf file.tar.gz

tar(1)
  GNU tar is an archiving program designed to store multiple files in a single
  file (an archive), and to manipulate such archives. The archive can be either
  a regular file or a device (e.g. a tape drive, hence the name of the program,
  which stands for tape archiver), which can be located either on the local or
  on a remote machine.

  -x (-x, --extract, --get)
    Extract files from an archive. Arguments are optional. When given, they
    specify names of the archive members to be extracted.

  -f file.tar.gz (-f, --file=ARCHIVE)
    Use archive file or device ARCHIVE . If this option is not given, tar will
    first examine the environment [... truncated ...]
```

Interactive mode:

```
$ explain
Command: du -s * | sort -n | tail

du(1)
  Summarize disk usage of the set of FILEs, recursively for directories.
  Mandatory arguments to long options are mandatory for short options too.

  -s (-s, --summarize)
    display only a total for each argument

  *

-------------------------------------------------------------------------pipe--

sort(1)
  Write sorted concatenation of all FILE(s) to standard output. With no FILE,
  or when FILE is -, read standard input. Mandatory arguments to long options
  are mandatory for short options too.

  -n (-n, --numeric-sort)
    compare according to string numerical value

-------------------------------------------------------------------------pipe--

tail(1)
  Print the last 10 lines of each FILE to standard output. With more than one
  FILE, precede each with a header giving the file name. With no FILE, or when
  FILE is -, read standard input. Mandatory arguments to long options are
  mandatory for short options too.

Command:
Bye!
```

## License

ISC

license: ISC

repository: jacksonp/explain-command

repo_name: jacksonp/explain-command


text:
SOLID
-----

- S: Single Responsibility
- O: Open/Closed
- L: Liskov Substitution
- I: Interface separation
- D: Dependency Inversion

## 1. Single Responsibility

A class should have one and only one reason to change,
meaning that a class should have only one job.

Initial -

```java
class Marker {
    String name;
    String color;
    int year;
    int price;

    public Marker(String name, String color, int year, int price) {
        this.name = name;
        this.color = color;
        this.year = year;
        this.price = price;
    }
}

class Invoice {
    Marker marker;
    int quantity;

    public Invoice(Marker marker, int quantity) {
        this.marker = marker;
        this.quantity = quantity;
    }

    public int calculateInvoice() {
        return marker.price * this.quantity;
    }

    public void printInvoice() {
        //print invoice
    }

    public void saveToDB() {
        // write to db
    }
}
```

Now break invoice class into classes having single responsibility

```java
class Marker {
    String name;
    String color;
    int year;
    int price;

    public Marker(String name, String color, int year, int price) {
        this.name = name;
        this.color = color;
        this.year = year;
        this.price = price;
    }
}

class Invoice {
    Marker marker;
    int quantity;

    public Invoice(Marker marker, int quantity) {
        this.marker = marker;
        this.quantity = quantity;
    }

    public int calculateInvoice() {
        return marker.price * this.quantity;
    }
}

class InvoicePrinter{
    private Invoice invoice;
    public InvoicePrinter(Invoice invoice) {
        this.invoice = invoice;
    }
    public void print() {

    }
}

class InvoiceDao {
    Invoice invoice;
    public InvoiceDao(Invoice invoice){
        this.invoice = invoice;
    }
    public void saveToDB() {
        // save to DB
    }
}
```

## 2. Open Closed Principle

Open-closed Principle (OCP) states:

    Objects or entities should be open for extension but closed for modification.

This means that a class should be extendable without modifying the class itself.
Don't modify an existing class, rather extends the class for new requirement.

Eg - If I want to save Invoice to a file, I will extend the InvoiceDao class
rather than modifying the existing class

```java
interface InvoiceDao {
    public void save(Invoice invoice);
}

class DBInvoiceDao implements InvoiceDao{
    public void save(Invoice invoice){

    }
}

class FileInvoiceDao implements InvoiceDao{
    public void save(Invoice invoice){

    }
}
```

## 3. Liskov Substitution principle
Every subclass or derived class should be substitutable for their base or parent class.

```java

```

## 4. Interface segregation principle states:

A client should never be forced to implement an interface that it doesn’t use, or clients shouldn’t be forced to depend on methods they do not use.

Code not following interface segregation

- waiter doesn't cook and clean dishes, only serves customer.

```java
interface RestaurantEmployee {
    void cleanDishes();

    void cookFood();

    void serveCustomer();
}

class waiter implements RestaurantEmployee {
    @java.lang.Override
    public void cleanDishes() {

    }

    @java.lang.Override
    public void serveCustomer() {
        System.out.Println("Serving customer");
    }
}
```

- We will segregate RestaurantEmployee interface

```java
interface waiterInterface {
    void serveCustomer();
    void takeOrder();
}

interface ChefInterface {
    void cookFood();
    void decideMenu();
}
```

## 5. Dependency Inversion

Class should depend on interfaces rather than concrete class

Example of code that is directly dependent on concrete class
```java
interface Keyboard {

}
interface Mouse {

}

class WiredKeyboard implements Keyboard{

}
class BluetoothKeyboard implements Keyboard{

}
class WiredMouse implements Mouse{

}
class BluetoothMouse implements Mouse{

}
class Laptop {
    private final WiredKeyboard keyboard;
    private final WiredMouse mouse;
    public Laptop(){
        keyboard = new WiredKeyboard();
        mouse = new WiredMouse();
    }
}
```

instead Laptop should depend on interfaces

```java
class Laptop {
    private final Keyboard keyboard;
    private final Mouse mouse;
    public Laptop(Keyboard keyboard, Mouse mouse){
        this.keyboard = keyboard;
        this.mouse = mouse;
    }
}
```


text:
# Signal Client

Uses Tokenly Signal to send message queue, websocket and webhook notifications.  Also provides a helper class to receive message queue notifications.

# Installation

### Add the package via composer

```
composer require tokenly/signal-client
```

## Usage with Laravel

The service provider will automatically be registered in a Laravel 5.5+ application.

### Sending Notifications

```php
$signal_client = app(\Tokenly\SignalClient\SignalClient::class);
$signal_client->sendWebsocketNotification('mychannel', 'myevent', ['hello' => 'world']);

```

### Consuming Internal Notifications

Create a class `App\Jobs\SignalNotificationJob` that extends `Tokenly\SignalClient\Jobs\SignalConsumerJob`.

The SignalNotificationJob must implement the following method:

```php
public function handle($data) {
    // $data['uuid']
    // $data['eventType']
    // $data['payload']
}
```

You should also define:

```php
    protected $max_attempts = null;
```

in your subclass.

repository: tokenly/signal-client

repo_name: tokenly/signal-client


text:
MooCoverage
=========================

MooCoverage is a simple source-code instrumentation tool for C/C++, primarily targeting measurement of test coverage. It has been developed as my Bachelor's thesis.

	 __________________________________
	< Our official test coverage tool! >
	 ----------------------------------
	        \   ^__^
	         \  (oo)\_______
	            (__)\       )\/\
	                ||----w |
	                ||     ||

**Warning**: This is a very alpha-version tool, with numerous known bugs and limitations. It is (currently) not recommended to be used in its current form as a serious test-coverage solution.

MooCoverage is based on [LLVM](http://llvm.org) and [Clang](http://clang.llvm.org) version 3.7 (note that Clang 3.6 needs to be patched with *clang36_patch.diff*). It uses Clang to parse the source code to be instrumented and build an AST - then it performs the instrumentation based on the AST. It also uses some LLVM libraries, most notably for command line handling.

If you read Hungarian, the best resource for getting acquainted with the project is reading my [BSc thesis](https://dl.dropboxusercontent.com/u/17147594/szakdolgozat.pdf).

The project uses the MIT license: you can do whatever you wish with it, so long as you don't hold me liable and you give credit where credit is due.

Configuration and building
--------------------------------------------------------------

Configuration is done simply using CMake. Make sure that the LLVM binaries are in your PATH: `llvm-config` is invoked during the configuration. Use GCC 4.8 or later to compile.

	mkdir build
	cd build
	cmake ..
	make

The executables will be placed in the *bin*, the libraries in *lib* directories.

Usage
------------------------

*moocov-instrument* is used to instrument C/C++ sources. It requires a compilation database that it can auto-detect from the command line or from the source directory. For more information, refer to the [Clang tooling guide](http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html).

*moocov-instrument* outputs instrumented C/C++ sources and transformation map files as output. When compiling the instrumented sources, you need to link to the moocov runtime (*libmoocovrt*).

The "instrumented binary" (the binary resulting from compiling the instrumented sources) can be run and used as normal, and will produce a *coverage.mocd* file in the current working directory when `moocov_dump()` is called (or automatically upon exit, if the `--auto-dump` option was provided to *moocov-instrument*).

The map and data files produced are text files, and their format is very simple. The only notable thing about them is that all numbers are written out as hexadecimal numbers with their digits reversed (see *runtime/include/moocovrt/fastint.h*).
See *lib/src/CoverageData.cpp* and *lib/src/CoverageMap.cpp* for details.

Currently there's only one tool that can act on the generated map and data files: this is the *moo2gcov* tool that converts these to .gcov files.

Limitations, bugs
-------------------------------------

moocov-instrument

* goto labels and switch cases are not handled well (see the failing test cases instrumentation/labels.cpp and maps/labels.cpp)
* function calls are not treated as potential exit points like they should be (it's tricky to do this right - see instrumentation/src/FileInstrumentation.cpp `FileInstrumentation::handleJumpStmt()`)
* C++11 constexpr functions are ignored (they should be duplicated into a non-constexpr version that can get instrumented properly)
* `moocov_enable()` should also count as a signal
* total lack of support for macros (we should probably only work on preprocessed files)
* eliminate redundant signals
* merge signals whenever possible, like Clang's profiling instrumentation (e.g. in if-then-else cases)
* more configuration options (filters, courseness of instrumentation, etc.)

moo2gcov

* the hit counters per line are often wrong - it's difficult to figure out how to measure these correctly when there can multiple coverage ranges in a single line

runtime

* support multi-threaded applications
* more configuration options
* performance improvements (e.g. inline `_moocov_signal()`)

repository: shdnx/MooCoverage

repo_name: shdnx/MooCoverage


text:
# Skylines Modding Documentation

For more information on how to contribute, check [How to Contribute to the Docs](http://docs.skylinesmodding.com/en/latest/contributing.html) page.

#### Current Build Status
[![Build Status](https://travis-ci.org/SkylinesModding/Docs.svg)](https://travis-ci.org/SkylinesModding/Docs)

Check these [links](http://docs.skylinesmodding.com/en/latest/index.html#links) for more information to get around in the Cities:Skylines community. Also join us at by signing up at the [forum](http://www.skylinesmodding.com/)!


text:
# wep-app-sec
A compact ASP.Net application to learn about securing web applications and apis.

## Introduction
Being a developer for over three decades I have been dealing with with the new keywords, terminology, along with the new and exciting technology, all the time.  Being an old-timer, and a strong proponent of KISS (Keep It Simple and Stupid,) I sometimes feel lost.  In those situations, I try to simplify stuff for others like me, who perhaps can benefit with my work.  This project is along the same lines.

If you are new to this subject, I suggest you to watch a very simple slideshow I prepared on this topic.
[https://www.ipcolony.com/#blog-web-security]

## What you will learn ##
Using this project you will learn pretty much how OAUTH works, though the project itself does not use it.

The following items are covered in the project.
* Forcing https for your site
* Password validation against stored hash
* Returning a token after authentication
* Using token for for subsequent conversation
* Maintaining the tokens on the server side using a simple thread safe list
* Securing Api methods
* Adding added authorization to Api methods so that only selected users can use it

repository: jujiro/wep-app-sec

repo_name: jujiro/wep-app-sec


text:
# Change Log
This project adheres to [Semantic Versioning](http://semver.org/).

This CHANGELOG follows the format listed at [Our CHANGELOG Guidelines](https://github.com/sensu-plugins/community/blob/master/HOW_WE_CHANGELOG.md)

## [Unreleased]

## [2.0.0] - 2020-05-05
### Breaking Changes
- Update minimum required ruby version to 2.3. Drop unsupported ruby versions.
- Bump `sensu-plugin` dependency from `~> 1.2` to `~> 4.0`

### Added
- Bonsai asset support
### Changed
- Updated bundler dependancy to '~> 2.1'
- Updated rubocop dependency to '~> 0.81.0'
- Remediated rubocop issues
- Updated os dependency to '>= 0.9.6', '< 1.2.0'
- Updated codeclimate-test-reporter to '~> 1.0'
- Updated rake dependency to '~> 13.0'

## [1.3.0] - 2017-12-05
### Added
- Options `--facility`, `--level` and `--kernel` to restrict dmesg output on linux OS (@epierotto)
- Option `--seconds` to specify the amount of seconds to lookbehind on dmesg output on linux OS (@epierotto)
- Options validation to prevent running incompatible arguments (@epierotto)

### Changed
- updated changelog guidelines location (@majormoses)
- Replaced the use of `tail` and `head` commands when specifying the option `--invert`, now uses pure ruby (@epierotto)
- Updated rubocop version to 0.49.0 (@epierotto)
- Rubocop test pass (@epierotto)

## [1.2.0] - 2017-11-02
### Changed
- check-hardware-fail.rb: Return the actual and entire query line match if found (@phantasm66)

## [1.1.0] - 2017-07-17
### Added
- Option to limit the number of lines to be parsed from the dmesg output
- Option to specify what pattern (regex) to look for in the dmesg output

## [1.0.0] - 2017-06-14
### Added
- Support for Ruby 2.3 and 2.4 (@eheydrick)

### Removed
- Support for Ruby < 2 (@eheydrick)

### Changed
- Loosen `sensu-plugin` dependency to `~> 1.2` (@mattyjones)

## [0.0.4] - 2015-12-02
### Fixed
- Fix ruby utf8 byte sequence error

## [0.0.3] - 2015-07-14
### Changed
- updated sensu-plugin gem to 1.2.0

## 0.0.1 - 2015-04-30

### Added
- initial release

## [0.0.2] - 2015-06-02
### Fixed
- added binstubs

### Changed
- removed cruft from /lib

[Unreleased]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/2.0.0...HEAD
[2.0.0]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/1.3.0...2.0.0
[1.3.0]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/1.2.0...1.3.0
[1.2.0]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/1.1.0...1.2.0
[1.1.0]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/1.0.0...1.1.0
[1.0.0]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/0.0.4...1.0.0
[0.0.4]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/0.0.3...0.0.4
[0.0.3]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/0.0.2...0.0.3
[0.0.2]: https://github.com/sensu-plugins/sensu-plugins-hardware/compare/0.0.1...0.0.2

repository: sensu-plugins/sensu-plugins-hardware

gha_language: Ruby

repo_name: sensu-plugins/sensu-plugins-hardware


text:
# Comic Swap - App

## Project Description
Stay tuned!

### How to install app
* TBD

### How to use app
* Connect to server with `npm start`.

More to come...

## Technologies
* Node v10

## Contributors

[![Mariah Adams](https://avatars3.githubusercontent.com/u/35393465?s=460&v=4)](https://github.com/MariahAdams) | [![Carrie Carter](https://avatars1.githubusercontent.com/u/3410837?s=460&v=4)](https://github.com/carriecarter) | [![Kevin Grayson](https://media.licdn.com/dms/image/C4E03AQFV0vVipH8D_Q/profile-displayphoto-shrink_800_800/0?e=1542240000&v=beta&t=AF1r62pbAquEdhQRPijzQ41344qDHEYSVFZ-i_lPQ-M)](https://github.com/grayson073)
---|---|---
[Mariah Adams](https://github.com/MariahAdams) | [Carrie Carter](https://github.com/carriecarter) | [Kevin Grayson](https://github.com/grayson073)

## License
This project is licensed under the MIT License - see the [LICENSE.md](LICENSE.md) file for details

## Acknowledgment
This project was created by [TEAM NAME] during the Summer 2018 Full-Stack Javascript Career Track program at [Alchemy Code Lab](https://www.alchemycodelab.com).

repository: carrie-moore/comic-swap-app

repo_name: carrie-moore/comic-swap-app


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

---

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

**To Reproduce**
Steps to reproduce the behavior.

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

**Please complete the following information:**
 - StarNEig version
 - Linux distribution and version
 - Compiler vendor and version
 - StarPU version
 - BLAS vendor and version
 - LAPACK vendor and version
 - ScaLAPACK vendor and version
 - MPI vendor and version
 - CUDA version

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

Consider providing the following from the `build` directory:
 - `CMakeFiles/CMakeOutput.log`
 - `CMakeFiles/CMakeError.log`
 - `src/include/starneig/configuration.h`
 - `src/starneig_config.h`
 - `src/starneig.pc`
 - `Testing/Temporary/LastTest.log` or `Testing/Temporary/LastTest.log.tmp`

repository: NLAFET/StarNEig

gha_language: C

gha_license_id: NOASSERTION

repo_name: NLAFET/StarNEig


text:
# Jenkins FlexDeploy Plugin
A plugin that allows Jenkins to trigger a build workflow in FlexDeploy

## Features
Can trigger a project build in FlexDeploy
When used with the Jenkins Plugin for FlexDeploy, makes it easy to deploy artifacts using FlexDeploy
For more detailed information, check out the FlexDeploy Wiki

## Requirements
Jenkins plugin 1.9.6 requires FlexDeploy version 4.0+ and Java 7+
Jenkins plugin 2.0 requires FlexDeploy version 5.7+ and Java 8
Jenkins plugin 3.0 requires FlexDeploy version 6.0+ and Java 8+

## Usage
Visit the FlexDeploy wiki for recommended usage instructions and more detailed information about the plugin
[Jenkins plugin 2.0 wiki](https://flexagon.atlassian.net/wiki/display/FD57/Jenkins)
[Jenkins plugin 3.0 wiki](https://flexagon.atlassian.net/wiki/display/FD60/Jenkins)

## Building
Download the source zip file and extract it
Run `mvn package` to build. Then upload the compiled `.hpi` to your Jenkins server

repository: jenkinsci/flexdeploy-plugin

gha_language: Java

repo_name: jenkinsci/flexdeploy-plugin


text:
# Supaero Robotics, software set up

This setup is provided as a [Docker](https://www.docker.com/) image and a [VirtualBox](https://www.virtualbox.org/)
image. We expect better performances with Docker, but VirtualBox is easier to use and more bullet-proof.

## Setting up with Docker

1.  Several links are produced by the terminal. Open the one that starts with `<IP_ADDRESS>` in your web browser.
1. An minimal example is produced in ~/hello_talos.ipynb: try it to check your install and say hi to Talos!
1. Notebooks for the tutorials are in ~/supaero2021 .

### Update the notebooks

The VirtualBox or Docker images might not contain the latest version of the notebooks so please pull the latest modifications before the tutorials.  Download the virtual machine using [https://frama.link/supaero2021-vbox](this link).
1. If you don't already have a virtualization system, download [https://www.virtualbox.org/](https://www.virtualbox.org/).
1. Unzip and load the virtual machine into your virtualization system (the virtual machine is in an open format and should be read by any kind of virtualization system).
1. Start the VirtualBox Image. If you start the VirtualBox for the first time, everything should be already running with the test notebook `~/supaero2021/setup/hello_talos.ipynb`. Say Hi to Talos!
1. Otherwise, you can start by running `jupyter notebook` in `~/supaero2021`. Notebooks for the tutorials are in this folder.

### Update the notebooks

The VirtualBox or Docker images might not contain the latest version of the notebooks.
At the begining of each class, just pull the latest modifications before the tutorials. To do that :
1. If running in one of the terminals, kill jupyter notebook using ctrl+C.
1. Pull changes from the repository:
```bash
cd ~/supaero2021
git pull
git submodule update --init
```
1. restart ```jupyter notebook```

## Native installation

*On Ubuntu 18.04, running setup.sh as root should do most of the work, though.
If you feel adventurous on other systems, you can also try to setup the softwares directly on your computer. But you're on your own! Due
to limited time, only few support will be provided. You can ask for help in the project's issue trackers,
but without time guarantees.*

The following dependencies are needed:

- To be install using APT on Ubuntu 18.04 or follow Pinocchio documentation at https://stack-of-tasks.github.io/pinocchio/download.html.

- You also need and some robot models (`sudo apt install robotpkg-py35-example-robot-data`)

- Finally, we need some standard Python packages: `sudo apt install ipython3 python3-pip freeglut3
  python3-matplotlib python3-pil.imagetk jupyter python3-scipy python3-matplotlib jupyter python3-scipy python3-numpy`
  and a 3D viewer `pip3 install --user meshcat`.


text:
## Contributing

You can help out by:

- Solving existing [issues](https://github.com/freeCodeCamp/100DaysOfCode-twitter-bot/labels/bug).
- Enhancing the bot adding more functionality [(see issues)](https://github.com/freeCodeCamp/100DaysOfCode-twitter-bot/labels/enhancement)
- Pointing out bugs/errors.

For above option(s), please create an issue so it can be addressed. New to GitHub issues? They have a pretty handy guide you can use to familiarize yourself with them.

## If you can make a change

What you will need:

- Your _own_ Twitter [account](https://twitter.com/signup) for testing
- API Keys for Twitter.
  - Get your Twitter API keys [here](https://apps.twitter.com/app/new).
- [Fork](https://github.com/freeCodeCamp/100DaysOfCode-twitter-bot) the repository.
- Add API keys to `.env` file, your `.env` file should look something like this:

```shell
CONSUMER_KEY=xxxxxxxxxxxxxxxxxxxxdMhxg
CONSUMER_SECRET=xxxxxxxxxxxxxxxxxxxxkFNNj1H107PFv1mvWwEM6CZH0fjymV
ACCESS_TOKEN=xxxxxxxxx-xxxxxxxxxxxxxxxxxxxxecKpi90bFhdsGG2N7iII
ACCESS_TOKEN_SECRET=xxxxxxxxxxxxxxxxxxxxZAU8wNKAPU8Qz2c0PhOo43cGO

USERNAME_BLACKLIST=someAccount
#QUERY_STRING=100daysofcode,301daysofcode
QUERY_STRING=sometesthashtag

TWEET_TIME_OUT_MIN=1
TWEET_TIME_OUT_MAX=120
TWEET_QUEUE_TIME=5
```

- Make your suggested change.
- Make sure the code style looks similar to the existing code.
- Create a pull request.


text:
# is.js jQuery plugin (usage)

See genaral [usage guide](https://github.com/rthor/isjs/blob/master/README.md) for allowed keywords.

```javascript
// Works on pretty much all DOM elements...
$('.email').is('email'); // Returns boolean value...

// And basic strings!
<EMAIL_ADDRESS>'email'); // Returns true
```

### Contibution

Feel free to contibute in any way you see fit. Just try to keep the coding style that I've chosen in this project and don't break the code :)

To run tests make sure you've got [testem](https://github.com/airportyh/testem) installed on your system. Simply run the following command in the terminal to start testing:

	$ testem

### Get in touch

Follow me on twitter [@rthor](http://twitter.com/rthor) or send me a line in an [email](mailto:ragnar.valgeirsson@gmail.comz).

repository: polds/isjs

repo_name: polds/isjs


text:
---
date: "2015-08-12"
type: curated
title: Innovation ACT 2015 Launch
venue: John Curtin School of Medical Research, Canberra
curators:
  - Natalija Nikolic
artists:
  - Ben Swift
event_url: https://innovationact.org
venue_url: https://jcsmr.anu.edu.au
---

[Innovation ACT](https://innovationact.org) (IACT) is Canberra's largest
entrepreneurship program. In 2015 I was invited to come and launch the event
with a livecoding set. Lots of fun to show the way that code & software are
breaking into all areas of life---including DJing.

This was a long set---around 90 mins---and there's no surviving video for the
full set. The above "excerpt" video gives a flavour[^ap] of the gig, though.

[^ap]:
    observant viewers will notice that the synth line here is _quite_ similar to
    the one I use in the [*aesthetic* visuals set during the AP
    Sessions]({% link _livecoding/2014-09-30-ap-sessions.md
    %}#aesthetic-visuals)---I figure that since the AP sessions were a bit of a
    hybrid gig/research thing (and because I quite liked how it turned out) I'd
    give it another outing in a gig with a "proper" audience

branch_name: refs/heads/source


text:
This concrete subclass uses the millisecond primitive & clock, which are based on a 32-bit Integer, rolling over roughly every 6 days.  Special handling for clock rollover is scatter through the implementation.

There are some code duplications with simbling classes for performance reasons.

See parent class comment for more info.

repository: guillep/pharo

gha_language: Smalltalk

repo_name: guillep/pharo


text:
---
layout: markdown
hero-image: url(/assets/images/about-us/work-in-progress.jpg)
hero-message: Kit Resources
---

Servo Controllers
=========

The servo controller board powers and controls up to 2 [**Servo Motors**](#servo).

#### Block Diagram:

![block diagram](https://github.com/pioneers/SmartSensors/blob/master/Boards/ServoController/block_diag.png?raw=true)

#### Details:

Servo motors require a relatively large current compared to the current supplied by an Arduino. External power (5V and 1A) is required. Power comes from an ATX connector. Servo motors are useful where precise and controlled rotation is necessary. For example, they would be suitable to control the arms of a robot.

---

## Servo

Servo motors are normal electric motors which incorporate sensor feedback to provide controllers with position information (i.e. turn angle). This critical feature distinguishes servo motors from normal motors, as servos allow users to control how much they turn while motors are just turned on and off and rotate (depends on motor). Servo is commonly used for angle precise operations such as arm and door actuation, whereas motors are used for simpler movement

---

## Wiring

Make sure the Orange goes to Sig, Red goes to VCC, and Brown goes to GND, and the ATX is connected to the PDB with a 3A fuse.

repository: pioneers/website

repo_name: pioneers/website


text:
# Track Purchase Orders Template App

## Description
Track Purchase Orders template app is for purchase representatives to monitor the purchase order fulfillment status when the procuring party manages the delivery transportation. The template app answers the following questions:

* How many deliveries in my purchase order are delayed?
* How many deliveries in my purchase order are completed?
* Where are my purchase orders?
* ……

## Requirements
* An SAP Cloud Platform global account with entitlement to the global track and trace option for SAP Logistics Business Network, 1 portal service quota and 2 GB Application Runtime quota
* To integrate with ERP, an SAP ERP or SAP ECC system running on Netweaver 7.31 or higher with SAP NOTE 2937175 being implemented
* The ABAP codes to support sample applications for GTT v2 can be implemented in S4 HANA 2101 on premise, which is not validated in lower release
* To integrate with visibility providers, log your incident in SAP BCP system with component “SCM-LBN-GTT-COR”

## Download and Installation
* 01_Implementation_Guide-TPO

* 02_Extractor_Creation_Guide-TPO

## Limitations
* The eventMatchKey of the shipment’s planned event = shipmentNo + stopId. "stopId" is set by the stage’s sequence.

* The eventMatchKey of the purchase order item's and delivery item's planned event is null.

* To integrate with visibility providers, the following code list sent out from ERP system should be consistent with the code list in the template model of Track Purchase Orders – "Purchase Order fulfillment":

Transportation mode code

Shipping type code

Tracked resource code

Carrier reference document type code

## Known Issue
* If multiple IDOC payloads are generated at the same time or in a very short time in ERP, these payloads will enter the GTT system in disorder. This will cause update failure in some situations. The situation has been improved by asynchronous processing of core engine within the GTT system. But it still might happen when the IDOCs fall into different processing queues.

* For ERP, the EXTENSION segment of processing IDOC is not enabled for planned events. This means that you cannot set up user-defined fields for planned events in the Manage Models app. But you can use Control Parameter’s segment in IDOC and do the field mapping on the tracked process level in the Manage Models app.

## FAQs
* Why couldn’t my shipment events be correlated with the delivery and then with the delivery item?

The correlation starts 90 minutes before the planned departure time of the first stop of delivery-assigned shipment stages, and ends when the last stop’s POD or ARRIVAL of delivery-assigned shipment stages is reported. (If the delivery item is POD relevant, it ends when POD is reported. Otherwise, it ends when ARRIVAL is reported.)

Only during the correlation period can the shipment events be correlated with the delivery and then with the delivery item.

You can set your own correlation period in Event-to-Action by updating “validFrom” and “validTo” logic.

* Why can’t I find any stops and any planned routes on the map?

Check if you have assigned the delivery to any shipment stages.

* Why are some stops missing on the map?

Check if you have updated the right geocoordinates for those locations in the Manage Locations application.

* Why are some actual events missing on the map?

Only events with valid geocoordinates are shown on the map.

* How is the shipment’s execution status changed?

By default, the shipment’s execution status is “Not Started”.

If the shipment’s planned event is reported, the execution status will be changed to “In Transit”.

If the shipment’s all planned PODs and ARRIVALs are reported, the execution status will be changed to “Completed”.

Once the execution status is set as “Completed”, it cannot be changed any more.

You can set your own execution status logic in Event-to-Action.

* How is the delivery’s execution status changed?

By default, the delivery item’ execution status is “Not Started”.

If the delivery item’s planned event or the delivery-assigned shipments’ Check-in, Load Begin, or Load End event is reported, the execution status will be changed to “In Transit”.

If the delivery item’s all planned PODs from the delivery-assigned shipments are reported when the item is POD relevant, or the delivery item’s planned goods receipt quantity are fully reported when the item is not POD relevant, the execution status will be changed to “Completed”.

Once the execution status is set as “Completed”, it cannot be changed any more.

You can set your own execution status logic in Event-to-Action.

## How to Obtain Support
The project is provided "as-is", with no expected support.

If your issue is concerned with the global track and trace option, log your incident in SAP BCP system with component “SCM-LBN-GTT-COR”.


text:
# AliCloud VPC Backend for Flannel

When running in an AliCloud VPC, we recommend using the ali-vpc backend which, instead of using encapsulation, manipulates IP routes to achieve maximum performance. Because of this, a separate flannel interface is not created.

To run flannel on AliCloud, first create an [AliCloud VPC Network](https://vpc.console.aliyun.com/#/vpc/cn-hangzhou/list)

### Create VPC network

Navigate to AliCloud VPC Network list page, then click [create vpc network] button.
![vpc](img/ali-create-vpc.png)

- Set vpc name with a meaningful string.
- Choose a subnet for the VPC: <IP_ADDRESS>/16, <IP_ADDRESS>/12, or <IP_ADDRESS>/8. Choose one according to your cluster size.
- Click create and wait for ready.

### Create switch

Click manager switch to navigate to switch list page, and create a switch.

- Set switch name to a meaningful string.
- Choose one AV Zone where you want to run your ECS
- Set up a subnet which should be contained in your VPC subnet. Here we set subnet as <IP_ADDRESS>/16.
- Confirm Creating.

### Create instance

Create an instance whose network type is VPC and then add the instance to your previous VPC network. The ECS you create  must sit in the same AV zone with your previously created switch.
![create instance](img/ali-create-instance.png)

- Select the proper VPC network.

### Create RAM user

[Click](https://ram.console.aliyun.com/#/user/list?guide) to Create RAM user

+ Set User Name
+ Grant permissions
+ Save AccessKey

![ali-create-ram-user](img/ali-create-ram-user.png)
![ali-create-ram-user-grant-permissions](img/ali-create-ram-user-grant-permissions.png)
![ali-create-ram-user-save-key](img/ali-create-ram-user-save-key.png)

### Launch the instance

All that’s left now is to start etcd, publish the network configuration and run the flannel daemon.
First, SSH into `instance-1`:

- Start etcd:

```
$ etcd --advertise-client-urls http://$INTERNAL_IP:2379 --listen-client-urls http://<IP_ADDRESS>:2379
```
- Publish configuration in etcd (ensure that the network range does not overlap with the one configured for the VPC)

```
$ etcdctl set /coreos.com/network/config '{"Network":"<IP_ADDRESS>/16", "Backend": {"Type": "ali-vpc"}}'
```
- Fetch the latest release using wget from https://github.com/coreos/flannel/

- make dist/flanneld

- export ENV

```
export ACCESS_KEY_ID=YOUR_ACCESS_KEY_SECRET
export ACCESS_KEY_SECRET=YOUR_ACCESS_KEY_SECRET
```

- Run flannel daemon:

```
sudo ./flanneld --etcd-endpoints=http://<IP_ADDRESS>:2379
```

Next, create and connect to a clone of `instance-1`.
Run flannel with the `--etcd-endpoints` flag set to the *internal* IP of the instance running etcd.

Confirm that the subnet route table has entries for the lease acquired by each of the subnets.

![router-confirm](img/ali-vpc-confirm.png)
### Limitations

Keep in mind that the AliCloud VPC [limits](https://vpc.console.aliyun.com/#/vpc/cn-hangzhou/detail/vpc-bp11xpfe5ev6wvhfb14b6/router) the number of entries per route table to 50. If you require more routes, request a quota increase or simply switch to the VXLAN backend.

repository: ciryu/flannel

repo_name: ciryu/flannel


text:
# GitlabCalendar
make GItlab issues as a calendar

## How to start

### Install with docker

```
git clone https://github.com/beastbikes/GitlabCalendar.git
cd GitlabCalendar
cp .docker_dev.example .docker_dev
# change the .docker_dev params fit for you
docker-compose up -d
```

repository: beastbikes/GitlabCalendar

repo_name: beastbikes/GitlabCalendar


text:
# ImageButter
 Image viewer for iOS that supports WebP. What is WebP? Find out more [here](https://developers.google.com/speed/webp/).

 You can find more about why we created this [here](http://engineering.dollarshaveclub.com/shaving-our-image-size/).

## Features

- Animated WebP images support
- Remote fetching and caching
- Avoids duplicated requests
- Async decoding
- Loading/progress view
- Animated GIFs
- PNG/JPG/other standard iOS formats

## Example

```objc
WebPImageView *imgView = [[WebPImageView alloc] initWithFrame:CGRectMake(0, 30, 300, 300)];
[self.view addSubview:imgView];
imgView.url = [NSURL URLWithString<EMAIL_ADDRESS>
//load from disk
//NSString *path = [[[NSBundle mainBundle] bundlePath]<EMAIL_ADDRESS>//imgView.url = [NSURL fileURLWithPath:path];

//add the loading View.
WebPLoadingView *loadingView = [[WebPLoadingView alloc] init];
loadingView.lineColor = [UIColor orangeColor];
loadingView.lineWidth = 8;
//add the loading view to the imageView.
imgView.loadingView = loadingView;
//if you want to add some inset on the image.
CGFloat pad = 20;
imgView.loadingInset = UIEdgeInsetsMake(pad, pad, pad*2, pad*2);
```
That will fetch the image, cache it, and decoding it all asynchronously. It will show a progress view showing the total download and display time. The can see the value of it being a WebP image here:

![graph](https://raw.githubusercontent.com/dollarshaveclub/ImageButter/assets/image-size-graph.jpg)

## Requirements ##

ImageButter requires at least iOS 7 or above.
Dependencies are ImageIO, MobileCoreServices, CoreGraphics, and CommonCrypto.

## Installation

### CocoaPods

Check out [Get Started](https://guides.cocoapods.org/using/getting-started.html) tab on [cocoapods.org](http://cocoapods.org/).

Install CocoaPods if not already available:

	$ [sudo] gem install cocoapods
	$ pod setup

To use ImageButter in your project add the following 'Podfile' to your project

	source 'https://github.com/CocoaPods/Specs.git'
	platform :ios, '9.0'
	pod 'ImageButter'

Then run:

    pod install

## Tests

One of our TODOs. We would mighty appreciate any PRs in this department.

## License

ImageButter is Copyright (c)2016, Dollar Shave Club, INC. It is free software, and may be redistributed under the terms specified in the LICENSE file (MIT License).

## Contact

### Dollar Shave Club

* https://www.dollarshaveclub.com
* https://github.com/dollarshaveclub
* http://engineering.dollarshaveclub.com

### Dalton Cherry
* https://github.com/daltoniam
* http://twitter.com/daltoniam
* http://daltoniam.com

repository: dollarshaveclub/ImageButter

repo_name: dollarshaveclub/ImageButter


text:
# P8-CarND-PID_Controller
[![Udacity - Self-Driving Car NanoDegree](https://s3.amazonaws.com/udacity-sdc/github/shield-carnd.svg)](http://www.udacity.com/drive)

## Overview

In this project, I used what I've learned about PID module. I Coded in C++ a Proportional-Integral-Derivative Controller, or PID for short, in order to drive a simulated car around a virtual track. The project involves implementing the controller for car's steering angle but is used also to determine and control the car's throttle value.

---
### **1 - PID Description**:

The steering angle is stetted in proportion to what's know as the cross track error, which is the lateral distance between the vehicle and the so called reference trajectory. So I steer the vehicle in proportion to this cross-track error, for car's throttle value the reference is the error between the current speed and the reference speed.

* The P, or "proportional", component had the most directly observable effect on the car's behavior. It causes the car to steer proportional (and opposite) to the car's distance from the lane center (which is the CTE) - if the car is far to the right it steers hard to the left, if it's slightly to the left it steers slightly to the right. With only P factor the steering value can oscillate which can produce the car leaves the road.

* The D, or "differential", component counteracts the P component's tendency to ring and overshoot the center line. A properly tuned D parameter will cause the car to approach the center line smoothly without ringing.

* The I, or "integral", component counteracts a bias in the CTE which prevents the P-D controller from reaching the center line. This bias can take several forms, such as a steering drift. The I component particularly serves to reduce the CTE (Error).

### **2 - Hyper-Parameters Selection**:

Hyper-parameters were manually tuned. First I implemented a PID controller for the car's throttle to follow a speed reference around the track no matter the disturbances. The throttle PID controller is fed with the error (`speed_cte`) between the current speed (`json_speed`) and the reference speed (`desired_speed`).

I used the next procedure which is a good baseline tune to get a good response to disturbances and tune a PID controller:

1. Set all gains to zero.
2. Increase the P (`Kp_`) gain until the response to a disturbance is steady oscillation.
3. Increase the D (`Kd_`) gain until the the oscillations go away (Critically damped).
4. Repeat steps 2 and 3 until increasing the D (`Kd_`) gain does not stop the oscillations.
5. Set P (`Kp_`) and D (`Kd_`) to the last stable values.
6. Increase the I (`Ki_`) gain until it brings you to the set-point with the number of oscillations desired (normally zero but a quicker response can be had if you don't mind a couple oscillations of overshoot)

The disturbance in this case is apply manually a huge steering angle or take off the car from the center of the road. This is moving the mechanism by hand away from the set-point and letting go is enough.

If the oscillations grow bigger and bigger then you need to reduce the P (`Kp_`) gain. If you set the D (`Kd_`) gain too high the system will begin to chatter (vibrate at a higher frequency than the P gain oscillations). If this happens, reduce the D (`Kd_`) gain until it stops. This method is quite similar to [Ziegler–Nichols method](https://en.wikipedia.org/wiki/Ziegler%E2%80%93Nichols_method).

Sebastian Thrun presented a simple algorithm for tuning PID in his ["How to Program a Robotic Car"](https://www.youtube.com/watch?v=2uQ2BSzDvXs) class. It's called "twiddle". Twiddle is very prone to finding local minima--this means that you could come up with a set of three constants that are okay, but not optimal for the situation. The problem of tuning PID constants is a subset of a more general search problem to find certain parameters to maximize utility, in this case, minimizing error of the PID algorithm for cross track error and speed reference. There's more general solutions to this problem, like hill-climbing, simulated annealing, genetic algorithms, etc. that might end up finding more optimal solutions, but for this exercise I just decided use the simple method already explained.

So, I got the next parameters for the PID controllers:

    pid_steering -> Kd_ = 0.08000, Kd_ = 0.00000, Kd_ = 1.00000
    pid_speed ----> Kd_ = 0.02000, Kd_ = 0.00035, Kd_ = 1.00000

Probably these PID parameters are not the best solution for this problem, but with these I was able to drive safely the car to 50 mph without leaving the road.

In the next graphs to the left you can see the speed PID controller response and on the right the steering angle PID controller response. For speed Controller in these three cases you can see how the references of 20mph, 40mph, 50mph are followed. The seed controller just overshots a little bit the reference at the beginning due to the I factor. the curves in the road can be shown as disturbances for this PID controller, but you can see how it deals with with the throttle value.

For the steering controller the response is some oscillating, but you can see how the cross track error tends to zero.

Steering and Speed Controller response at 20mph:

Steering and Speed Controllers response at 40mph:

Steering and Speed Controller response at 40mph:

### **3 - Results**:

Final results show how the vehicle successfully drive a lap around the track:
* No tire leave the drivable portion of the track surface.
* The car not pop up onto ledges or roll over any surfaces that would otherwise be considered unsafe (if humans were in the vehicle)

Complete video of PID driving in a complete lap:

[P8-CarND-PID_Controller_40MPH](https://youtu.be/vjxMtnGiqOM)
[P8-CarND-PID_Controller_50MPH](https://youtu.be/QHh3DN3BiJw)

---
## Dependencies

* cmake >= 3.5
 * All OSes: [click here for installation instructions](https://cmake.org/install/)
* make >= 4.1(mac, linux), 3.81(Windows)
  * Linux: make is installed by default on most Linux distros
  * Mac: [install Xcode command line tools to get make](https://developer.apple.com/xcode/features/)
  * Windows: [Click here for installation instructions](http://gnuwin32.sourceforge.net/packages/make.htm)
* gcc/g++ >= 5.4
  * Linux: gcc / g++ is installed by default on most Linux distros
  * Mac: same deal as make - [install Xcode command line tools]((https://developer.apple.com/xcode/features/)
  * Windows: recommend using [MinGW](http://www.mingw.org/)
* [uWebSockets](https://github.com/uWebSockets/uWebSockets)
  * Run either `./install-mac.sh` or `./install-ubuntu.sh`.
  * If you install from source, checkout to commit `e94b6e1`, i.e.
    ```
    git clone https://github.com/uWebSockets/uWebSockets
    cd uWebSockets
    git checkout e94b6e1
    ```
    Some function signatures have changed in v0.14.x. See [this PR](https://github.com/udacity/CarND-MPC-Project/pull/3) for more details.
* Simulator. You can download these from the [project intro page](https://github.com/udacity/self-driving-car-sim/releases) in the classroom.

Students have put together a guide to Windows set-up for the project [here](https://s3-us-west-1.amazonaws.com/udacity-selfdrivingcar/files/Kidnapped_Vehicle_Windows_Setup.pdf) if the environment you have set up for the Sensor Fusion projects does not work for this project. There's also an experimental patch for windows in this [PR](https://github.com/udacity/CarND-PID-Control-Project/pull/3).

---
## Basic Build Instructions

1. Clone [CarND-P8-PID_Controller](https://github.com/JohnBetaCode/CarND-P8-PID_Controller)
2. Make a build directory with: `mkdir build && cd build`
3. Compile: `cmake .. && make`
4. Run it: `./pid`.
5. After this you just can run the script to build and run all:
    ```
    clear && python3 CarND-P8-PID_Controller.py
    ```
Yes, I know, making a build with a python script is horrible, I'm a bad person but too lazy as well to write the make line every time that I changed something in my code, dont judge me. This script also run everything for you. If you want to plot the PID controllers responses just enter in manual mode when you're done in the simulator, in this way the c++ code close csv files to plot them later with matplotlib in the python code.

Tips for setting up the environment can be found [here](https://classroom.udacity.com/nanodegrees/nd013/parts/40f38239-66b6-46ec-ae68-03afd8a601c8/modules/0949fca6-b379-42af-a919-ee50aa304e6a/lessons/f758c44c-5e40-4e01-93b5-1a82aa4e044f/concepts/23d376c7-0195-4276-bdf0-e02f1f3c665d)

---
> **Date:**   04/10/2019
> **Programmer:**  John A. Betancourt G.
> **Mail:**<EMAIL_ADDRESS>
> **Web:**   www.linkedin.com/in/jhon-alberto-betancourt-gonzalez-345557129


text:
# Exercise 001 - Install Code Ready Containers

---

1. Prepare the environment;

2. Download and uncompress [crc executable](https://cloud.redhat.com/openshift/create/local);

3. Put the crc executable into you PATH;

4. Launch crc;

5. Make your host able to run the oc and podman commands;

6. Enable auto complete for oc and podman commands;

repository: mmul-it/training

gha_language: Dockerfile

repo_name: mmul-it/training


text:
# Build Agent docker images

In order to work with images, use the next commands of the build script:

```bash
python3 build_package_new.py image <builder_name> <action>
```

where:

`builder_name` is name of the builder, for now there are `ubuntu` and `alpine` builder, that build images, which are
based on those respective distibutions.

and ``action`` is the action that has to be done, for now it can be:

* ``publish``: Build and already publish image to a registry

* ``build-tarball`` Build image in the for of OCI layout tarball. May be useful when you need to image in form of the
file. For example, we use this tarball in our GitHub Action CI/CD when
we build our images in the form on tarballs and share those tarballs with others, for example test jobs.

* ``load`` Build and loads docker image directly to the current docker engine, so the image has to appear
in the result of the ``docker image ls`` command. This is only a single arch image because docker
does not store multi-arch images.

## Publish an image

In order to publish agent image, additional options has to be provided to the ``publish`` command

``image-type``: Type of the images. Available image types:

* **[docker-json](https://app.scalyr.com/help/install-agent-docker)** - an image for running on Docker configured to fetch
  logs via the file system (the container log directory is mounted to the agent container.) This is the preferred way
  of running on Docker. This image is published to scalyr/scalyr-agent-docker-json.
* **[docker-syslog](https://app.scalyr.com/help/install-agent-docker)** - an image for running on Docker configured to
  receive logs from other containers via syslog. This is the deprecated approach (but is still published under
  scalyr/scalyr-docker-agent for backward compatibility.)  We also publish this under scalyr/scalyr-docker-agent-syslog
  to help with the eventual migration.
* **docker-api** - an image for running on
    Docker configured to fetch logs via the Docker API using docker_raw_logs: false configuration option.
* **[k8s](https://app.scalyr.com/help/install-agent-kubernetes)** - an image for running the agent on Kubernetes.
    This image is published to scalyr/scalyr-k8s-agent.

next required options can be looked up by running the command:

```python3 build_package_new.py image <builder_name> publish --help```

As an example you can publish image to a local registry in a container.

```bash
docker run -it --rm --name registry -p 5005:5000 registry:2

python3 build_package_new.py image ubuntu publish --image-type k8s --registry localhost:5000 --tags=latest --registry-username user --no-verify-tls
```

NOTE: This builds a multi-arch image with all supported architecture.
Meaning that you will have to wait longer because non-native architecture requirement are build with using emulation.
If you need image just to run it on your local machine, you can use the ``load`` command instead of ``publish``

## Using locally built images with minikube

If you want to use locally built images with minikube, the easiest way to do that is to load
local Docker image into minikube using ``minikube image load`` command as shown in the example
below:

```bash
python3 build_package_new.py image ubuntu k8s load --image-type k8s --image-name my-image:latest

minikube image load my-image:latest
```

In addition to that, you also need to update ``k8s/no-kustomize/scalyr-agent-2.yaml``  image
section to look something like this:

```yaml
...
        image: my-image:latest
        imagePullPolicy: Never
...
```

## Supported Images and Architectures

Right now we provide Debian bullseye-slim and Alpine linux based images for the following platforms:
  * ``linux/amd64``
  * ``linux/arm64``
  * ``linux/arm/v7``

Alpine based Linux images are around 50% smaller in size than Debian based ones and can be recognized
using ``-alpine`` tag name suffix (e.g. ``latest-alpine``).

# Build agent Linux packages.

To build agent package for Linux which is managed by OS's package manager run command:

```
python3 build_package_new_refactored.py <build_name> [--last-repo-python-package-file <python_package_file>] [--last-repo-agent-libs-package-file <agent_libs_file>]
```

Possible values for the 'build_name':
    - deb-{amd64}
    - rpm-{x86_64}

It is important to note that along with the agent package itself, the dependency packages ``scalyr-agent-python3`` and
``scalyr-agent-libs`` are also built. Since those packages are updated less often than the agent package and if
they are already presented in the repository, then we can provide additional options ``--last-repo-python-package-file``
and ``--last-repo-agent-libs-package-file`` to the command, so those existing dependency packages will be reused from
that repo.

gha_language: Python


text:
# MPI_PageRank
This is the implementations of PageRank using MPI interface. The following alogrithms are implemented in this project:
* Rowwise block 1-D partitioning
* Cyclic 2-D partitioning

# File Layouts
* **pagerank_1D_par.c**: Implementation with rowwise block 1-D partitioning of matrix.
* **pagerank_2D_par.c**: Implementation with cyclic 2-D partitioning of matrix.
* **pagerank_2D_par_sqp.c**: Optimized version of **pagerank_2D_par.c**, when the number of processes is a square number.

# Syntax
mpirun -n [_num_processes_] **program_name** -i [_dataset_file_name_] -o [_output_file_name_] -m [_num_iteration_] -t [_num_seconds_] -v

# Options
* **-n**: Number of processes used. Required in MPI interface.
* **-i**: Input dataset file name. Required.
* **-o**: File name to store the resulting vector. If not specified, the vector will be printed out on the console.
* **-m**: Maximum number of iterations. If not specified, the program will keep running until resulting vector is converged.
* **-t**: Time limit of execution. If not specified, the program will keep running until resulting vector is converged.
* **-v**: Verbose mode flag.


text:
---
title: This is markdown unity test!
date: '2019-04-22'
tags: ['markdown', 'test', 'unity', 'featured']
cover: './preview-1.jpg'
---

Documentation stored with source files shares the same permissions.
Documentation stored in a separate Git repository can use different
access controls. If Gerrit Code Review is being used, branch level
read permissions can be used to grant or restrict access to any
documentation branches.

## READMEs

Files named `README.md` are automatically displayed below the file's
directory listing. For the top level directory this mirrors the
standard [GitHub](https://github.com/) presentation.

\*\*\* promo
README.md files are meant to provide orientation for developers
browsing the repository, especially first-time users.

---

We recommend that Git repositories have an up-to-date top-level
`README.md` file.

## Markdown syntax

Gitiles supports the core Markdown syntax described in
[Markdown Basics]. Additional extensions are supported
to more closely match [GitHub Flavored Markdown] and
simplify documentation writing.

[markdown basics]: http://daringfireball.net/projects/markdown/basics
[github flavored markdown]: https://help.github.com/articles/github-flavored-markdown/

```js
import Typography from 'typography';

const typography = new Typography({
  baseFontSize: '18px',
  baseLineHeight: 1.666,
  headerFontFamily: ['Avenir Next', 'Helvetica Neue', 'Arial', 'sans-serif'],
  bodyFontFamily: ['Georgia', 'serif']
  // See below for the full list of options.
});

// Output CSS as string.
typography.toString();

// Or insert styles directly into the <head> (works well for client-only
// JS web apps.
typography.injectStyles();
```

```html
<h1>Sample JavaScript</h1>
<div class="gatsby-highlight">
  <pre class="language-jsx">
    <code>
      <!-- Embedded content here ... -->
    </code>
  </pre>
</div>

<h1>Sample HTML</h1>
<div class="gatsby-highlight">
  <pre class="language-html">
    <code>
      <!-- Embedded content here ... -->
    </code>
  </pre>
</div>
```

```js
var rows = prompt('How many rows for your multiplication table?');
var cols = prompt('How many columns for your multiplication table?');
if (rows == '' || rows == null) rows = 10;
if (cols == '' || cols == null) cols = 10;
createTable(rows, cols);
function createTable(rows, cols) {
  var j = 1;
  var output = "<table border='1' width='500' cellspacing='0'cellpadding='5'>";
  for (i = 1; i <= rows; i++) {
    output = output + '<tr>';
    while (j <= cols) {
      output = output + '<td>' + i * j + '</td>';
      j = j + 1;
    }
    output = output + '</tr>';
    j = 1;
  }
  output = output + '</table>';
  document.write(output);
}
```

### Table

| Option | Description                                                               |
| ------ | ------------------------------------------------------------------------- |
| data   | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default.    |
| ext    | extension to be used for dest files.                                      |

Right aligned columns

| Option |                                                               Description |
| -----: | ------------------------------------------------------------------------: |
|   data | path to data files to supply the data that will be passed into templates. |
| engine |    engine to be used for processing templates. Handlebars is the default. |
|    ext |                                      extension to be used for dest files. |

### Lists

A bullet list:

```
* Fruit
    * Orange
    * Pear
* Cake
```

will render into HTML as:

- Fruit
  - Orange
  - Pear
- Cake

The second level items (above Orange, Pear) must be indented with more
spaces than the item they are nested under. Above 2 spaces were used.
Additionally, the entire list must be preceded and followed by a blank
line.

A numbered list:

```
1. Fruit
     1. Orange
     2. Pear
2. Cake
```

will render into HTML as:

1. Fruit
   1. Orange
   2. Pear
2. Cake

### Blockquotes

Sir Winston Churchill once said:

> A lie gets halfway around the world before the truth has a
> chance to get its pants on.

### Mathematical expressions

You can render LaTeX mathematical expressions.

The _Gamma function_ satisfying $\Gamma(n) = (n-1)!\quad\forall n\in\mathbb N$ is via the Euler integral

$$
\Gamma(z) = \int_0^\infty t^{z-1}e^{-t}dt\,.
$$

### UML diagrams

You can render UML diagrams, this will produce a sequence diagram:

```mermaid
sequenceDiagram
Alice ->> Bob: Hello Bob, how are you?
Bob-->>John: How about you John?
Bob--x Alice: I am good thanks!
Bob-x John: I am good thanks!
Note right of John: Bob thinks a long<br/>long time, so long<br/>that the text does<br/>not fit on a row.

Bob-->Alice: Checking with John...
Alice->John: Yes... John, how are you?
```

And this will produce a flow chart:

```mermaid
graph LR
A[Square Rect] -- Link text --> B((Circle))
A --> C(Round Rect)
B --> D{Rhombus}
C --> D
```

Libraries often attempt to remain neutral in the resulting debates, but that neutrality is predicated on the idea that the debates are taking place on a post-enlightenment playing field and that, eventually, the best ideas will succeed. Or at least that, over time, reasonable people will develop a shared set of facts and tools for assessing and discussing that reality. This allows the library to accomplish good for its users by providing access

repository: Public-Health-Coalition/mscvn-web

gha_language: TypeScript

repo_name: Public-Health-Coalition/mscvn-web


text:
---
layout: post
title:  "Quicksort: It's Quick"
date:   2017-06-30 14:51:42 -0400
---

Following up with last week’s blog post, we’ll cover another “divide and conquer” recursive algorithm, quicksort. Like merge sort, quick sort generally has O(nlogn) efficiency (however, worst case it can have O(n^2) efficiency). It is considered less ‘stable’ than merge sort, meaning it’s not going to reorder elements with identical keys. If you have a well-implemented quicksort, it can be the fastest sorting algorithm. However, you have to be weary of data quality lest you end up with a O(n^2) efficiency implementation.

The basic premise of quicksort is to sort an array by choosing a pivot element in the array and sort by comparing the element to a subarray via a partition. Similar to merge sort, we break down the sorting on the left and right sides of the pivot into subproblems to be solved in parts. However unlike merge sort, we do not need to create a new array to keep track of them, we simply need to keep track of the start and end points of each subarray.  Here’s a visual from[ this video](https://www.youtube.com/watch?v=COk73cpQbFQ):

![](http://imgur.com/7vElURv.jpg)

Which after running becomes:

![](http://imgur.com/03ewVLi.jpg)

If that still doesn’t make sense after this blog post, I’d highly recommend checking out the video. He does a very thorough job of explaining how it runs. If you’ll notice, there’s pseudocode on the lefthand side which explains the logic we’ve laid out, adding an if-statement to make sure the recursion ends once the start index of the array is no longer less than the end index - or simply put there is only one element in the array(or any other edge-cases that may come up).

So the two main decisions we need to make are: how do we pick a pivot point and how do we develop the partition logic?

For the first one, stack overflow tells me that we want to get as close to a random pivot as possible to reduce the chances of getting an O(n^2) runtime. More on why that’s bad [here](https://stackoverflow.com/questions/164163/quicksort-choosing-the-pivot). Ultimately, you want your two subarrays to be broken up as close to the middle as possible so that we don’t have one side doing all the work (thus increasing the runtime). If we have a partially sorted array, it’s best to pick the number closest to the middle as a pivot. If you read the post, there’s a lot of discussion on how to do this and ultimately depends on your particular situation. For refactoring this code, check out the [median of three method](https://stackoverflow.com/questions/7559608/median-of-three-values-strategy).

Next, we need to write our partition logic(JavaScript).
![](http://imgur.com/5ZFO6R4.jpg)

Finally, we write the quicksort functionality, which is simply recursive calls for the left and right parts of the array:

![](http://imgur.com/EoFmZIy.jpg)

And let’s test it out:

 ![](http://imgur.com/sLSyuRR.jpg)

Sources:
http://blog.benoitvallon.com/sorting-algorithms-in-javascript/the-quicksort-algorithm/
https://www.nczonline.net/blog/2012/11/27/computer-science-in-javascript-quicksort/
https://gist.github.com/paullewis/1981455
https://stackoverflow.com/questions/5185864/javascript-quicksort
https://stackoverflow.com/questions/1933759/when-is-each-sorting-algorithm-used
https://rawgit.com/escherba/algorithms-in-javascript/master/src/quickmiddle-sort.js

extension: markdown


text:
# Saved Searches Destroy Request

Destroys a saved search for the authenticating user.
The authenticating user must be the owner of saved search id being destroyed.

``` php
use Widop\Twitter\Rest\SavedSearches\SavedSearchesDestroyRequest;

$request = new SavedSearchesDestroyRequest('123');

$request->setId('123');
$id = $request->getId();

$savedSearchDestroyed = $twitter->send($request);
```

You can get more informations [here](https://dev.twitter.com/docs/api/1.1/post/saved_searches/destroy/%3Aid).

repository: widop/twitter-rest

gha_language: PHP

repo_name: widop/twitter-rest


text:
[![GoDoc](https://godoc.org/github.com/garsue/sparql?status.svg)](https://godoc.org/github.com/garsue/sparql)
![Build Status](https://github.com/garsue/sparql/actions/workflows/go.yml/badge.svg)
[![codecov](https://codecov.io/gh/garsue/sparql/branch/master/graph/badge.svg)](https://codecov.io/gh/garsue/sparql)
[![Go Report Card](https://goreportcard.com/badge/github.com/garsue/sparql)](https://goreportcard.com/report/github.com/garsue/sparql)

# Go SQL driver for SPARQL

**SUPER EXPERIMENTAL**

A [SPARQL](https://www.w3.org/TR/sparql11-protocol/)-Driver for Go.
Including [database/sql](https://golang.org/pkg/database/sql/) implementation.

## Usage

See [examples](https://github.com/garsue/go-sparql/tree/master/_example).

## FAQ

Q: Can I use `?` for placeholders?
A: No. Please use `$1`, `$2`, `$3`, ... as placeholders.

Q: Which version's golang is supported?
A: go 1.11.x or later.

repository: garsue/sparql

gha_language: Go

repo_name: garsue/sparql