text:
---
layout: page
title: Hire Me
description: "A Consultant in Robotics, Drones and Software Development available for hire in Geneva Area and most of Europe. I'm also available for remote work."
share: true
comments: false
---

# About me

I have 5 years of experience working in Robotics industry as a Consultant, R&D Application Engineer and Software Developer. In this page you will learn more about my expertise and experience.

## Robotics expertise

As a robotics consultant I can offer the following:

* Consultancy and development of robot architectures for custom robots with Robot Operating System (ROS)
* Development of drivers for [ArduPilot](http://ardupilot.org/copter/) and [Px4](https://px4.io/) open source autopilots and ROS
* Implementation of existing solution on custom robot platforms (such as robot_hardware_interface, move_base and ros_control)
* Development of high level functionality for any mobile robot or drone platform
* Hardware In the Loop (HIL) development for existing platforms
* Hardware and sensor integration on custom robot platforms

## Project highlights

Below you will find highlights on the projects I've been working on over the years:

* Development of library for custom UAV autopilot control using any HMI (Human Machine Interface) through Lua Scripts
* Autopilot integration on existing 50+ kg UAV helicopter
* Development of proof of concept system for Speed and Separation Monitoring (SSM) for industrial robot arms
* Implementation of object avoidance on ArduPilot based multirotors utilizing an array of time of flight sensors
* Architecture and development of ROS based modular mobile robot
* Development of a handheld mapping device for creation of 2D floor plans

## Get in touch

You can get in touch with me by sending me an<EMAIL_ADDRESS>or getting in touch on [LinkedIn](https://www.linkedin.com/in/mateuszsadowski/).


text:
# UseMyTools
Build Week Project

Trello Board Link:
https://trello.com/invite/b/ClmWFeLa/4cfe916ef520e1c03aa95f4e673686a9/use-my-tools-3-11

Pitch:
Tired of loaning out your tools to a neighbor and losing them?

MVP:
Users can log in and create a profile. They can then set up items they have available - anything from a shovels to power washers to tile saws.  Users will be able to Create, Read, Update and Delete data. A 2nd user can log in and see items that users have available and request to borrow.

Stretch:
Add a map for loaners to set limits on how far they are willing to lend their tools out, and how far borrowers are willing to drive to borrow something.  Add a review system into the app so that the social aspect is there to ensure that neighbors are good borrowers before you approve a request.

Don't **Fork** the Repo
##### Git Instructions

- Every frontend/UI developer will be working in this repo, but on separate branches.

- After git cloning THIS repo:
   - `git checkout master` <---- Puts you on master branch.

   - You may need to `git pull` before creating a new branch. <--- Git pull fetches and downloads from the branch you are in and merges it with local repo

  - `git branch [firstname-lastname]` <-----  Creates the branch with your first and last name as branch name.

  - `git checkout [firstname-lastname]` <---- Switches your working directory into your newly created branch.

  - `git push -u origin [firstname-lastname]` <-- Pushes that branch to GitHub.
      - Subsequent pushes after the above push can be done with `git push [firstname-lastname]`.

   - You can then `git commit` into that branch with all your changes.

   - **Once you have a fully functional feature:**
      -  `git merge master` <---- Merges your branch to the master repo.
      -  If you get any conflicts merging, contact me to help resolve them.

##### Initial Instructions

- You still need to run `yarn install` to get your node_modules.

- Netlify deployed site: [my-netlify-site].

- Reach out if you need help.

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: JavaScript

gha_license_id: MIT

license_type: permissive


text:
---
layout: post
title: "Chess with Friends: Wes vs Eddie (2/16/2012)"
date: 2012-02-17 21:33
comments: true
categories: ['chess','white','loss','correspondence']
---
My little brother beat me. A good game, although we both made plenty of mistakes.
{{ 'http://wes.skeweredrook.com/images/wes-vs-eddie.pgn' | chessgame }}
<!--more-->
First serious mistake was his 14. ... Nc6, which basically gives up a bishop for nothing.

Second mistake was my 24. Rxe5 (instead of the Stockfish-recommended 24. Nf5 at a score of ~+19!), which trades down. I was afraid of the knight exposing my queen with a check, so I took him out, but it turns out that I was being paranoid. After 24. Rxe5, Stockfish still gives me a ~+3.

Third mistake was 28. Nf5--I saw some exciting things to do with my knight, and wanted to block the rook up there. But this move was the beginning of my downfall, as it pretty much loses the knight for nothing after Qa1+.

I laid all sorts of traps but my brother didn't fall for them. My final mistake was not seeing the checkmate--should have traded queens or moved my bishop to c2 to block the mate on b2.

repository: freeeve/octopress

extension: markdown

repo_name: freeeve/octopress


text:
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

```yaml
## [tag] - YYYY-MM-DD
[tag]: https://github.com/eureka-framework/component-template/compare/1.0.0...master
### Changed
- Change 1
### Added
- Added 1
### Removed
- Remove 1
```

----

## [1.1.0] - 2023-03-15
### Changed
- Update Makefile
- Update CI GitHub Action
- Update composer.json
- Now compatible with PHP 8.2

## [1.0.2] - 2022-11-13
### Changed
- Update Makefile
- Update CI GitHub Action
- Update composer.json

## [1.0.1] - 2022-06-12
### Changed
- Fix changelog template link
- Update github workflow ci file

## [1.0.0] - 2022-06-12
### Added
- Add phpstan for static analyze & php compatibility
- Add Check compatibility with PHP 7.4 & 8.1 in CI
- Add Makefile & .dist files for CI
- Add Dummy Source & Dummy Test
- Add GitHub CI file & sonar project file

repository: eureka-framework/component-template

branch_name: refs/heads/main

gha_language: Makefile

repo_name: eureka-framework/component-template


text:
# [kwb.file v0.3.2](https://github.com/KWB-R/kwb.file/releases/tag/v0.3.2) 2020-12-16

* Add badge for [https://kwb-r.r-universe.dev](https://kwb-r.r-universe.dev)
* Update installation of R package kwb.utils (now latest version on "master" branch)

# [kwb.file v0.3.1](https://github.com/KWB-R/kwb.file/releases/tag/v0.3.1) 2020-06-02

* Update dependency on kwb.utils (now v0.6.0)

# [kwb.file v0.3.0](https://github.com/KWB-R/kwb.file/releases/tag/v0.3.0) 2020-01-10

* split_paths(): add argument "use_fs"
* to_subdir_matrix(): allow to return a list of matrices; improve performance
* Improve NEWS.md

# [kwb.file v0.2.0](https://github.com/KWB-R/kwb.file/releases/tag/v0.2.0) 2019-08-04

* split_paths() now recognises server paths and keeps "//server" as one part
* remove_common_root(): reinterpret argument "n_keep"
* Add tests
* Add a `NEWS.md` file to track changes to the package.
* see https://style.tidyverse.org/news.html for writing a good `NEWS.md`

gha_language: R


text:
# The Rentals announce new LP ft. Yeah Yeah Yeahs & Killers members, share song

Published at: **2019-11-06T12:12:00+00:00**

Author: **Andrew Sacher**

Original: [BrooklynVegan](http://www.brooklynvegan.com/the-rentals-announce-new-lp-ft-yeah-yeah-yeahs-killers-members-share-song/)

Former Weezer member Matt Sharp and his band The Rentals have a new double album called Q36 due June 2, 2020, and it looks like it will be a pretty unusual project for The Rentals. Matt made it with Yeah Yeah Yeahs’ Nick Zinner on guitar, The Killers’ Ronnie Vannucci on drums, and Flaming Lips collaborator Dave Fridmann as mixing engineer). First single “Spaceships” — which sounds much more like a typical Dave Fridmann collaboration than the last Rentals album — is out now, and the remaining 15 songs will come out over the next few months with one song released every two weeks. Here’s much more background via press release:
You can learn more at hitrecord.org and pre-order the album here.

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported


text:
Tomcat command proxy
====================

Tool for execute apache tomcat manager application commands from command prompt.
For example help you undeploy application as a step in a build system without having to install any plug-ins.

## Using
For command list see http://tomcat.apache.org/tomcat-8.0-doc/manager-howto.html

Java 6 or higher (>= 1.6.0_45) is requied for running compiled version of tool. For other versions of java you can compile tool yourself.

## Examples
```
java -jar TomcatCommandProxy.jar --user admin --pass p@ssw0rD --host localhost --command list
java -jar TomcatCommandProxy.jar --user=admin --pass=p@ssw0rD --host=localhost --command=list -v
java -jar TomcatCommandProxy.jar --user admin --pass p@ssw0rD --host localhost --command undeploy --param path=/webapp
```

## Building
For build execute:
`gradlew distZip`
Gradle build system will download additional libraries and build project.Compiled tool will be in build\distributions\ folde

repository: ckesc/tomcat-command-proxy

repo_name: ckesc/tomcat-command-proxy


text:
# Sensirion Raspberry Pi I2C SCD4x Driver

This document explains how to set up the SCD4x sensor to run on a Raspberry Pi
using the provided code.

[](https://sensirion.com/my-scd-ek)

Click [here](https://sensirion.com/my-scd-ek) to learn more about the SCD4x
sensor and the SCD41 Evaluation Kit Board.

## Setup Guide

### Connecting the Sensor

Your sensor has the four different connectors: VCC, GND, SDA, SCL. Use
the following pins to connect your SCD4x:

 *SCD4x*  |    *Raspberry Pi*    | *Jumper Wire*
 :------: | :------------------: | :-----------:
   VCC    |        Pin 1         |      Red
   GND    |        Pin 6         |     Black
   SDA    |        Pin 3         |     Green
   SCL    |        Pin 5         |     Yellow

### Raspberry Pi

- [Install the Raspberry Pi OS on to your Raspberry Pi](https://projects.raspberrypi.org/en/projects/raspberry-pi-setting-up)
- [Enable the I2C interface in the raspi-config](https://www.raspberrypi.org/documentation/configuration/raspi-config.md)
- Download the driver from the [Sensirion GitHub Page](https://github.com/Sensirion/raspberry-pi-i2c-scd4x/tags)
  and extract the `.zip` on your Raspberry Pi
- Compile the driver
    1. Open a [terminal](https://www.raspberrypi.org/documentation/usage/terminal/)
    2. Navigate to the driver directory. E.g. `cd ~/raspberry-pi-i2c-scd4x`
    3. Run the `make` command to compile the driver

       Output:
       ```
       rm -f scd4x_i2c_example_usage
       cc -Os -Wall -fstrict-aliasing -Wstrict-aliasing=1 -Wsign-conversion -fPIC -I. -o scd4x_i2c_example_usage  scd4x_i2c.h scd4x_i2c.c sensirion_i2c_hal.h sensirion_i2c.h sensirion_i2c.c \
       	sensirion_i2c_hal.c sensirion_config.h sensirion_common.h sensirion_common.c scd4x_i2c_example_usage.c
       ```
- Test your connected sensor
    - Run `./scd4x_i2c_example_usage` in the same directory you used to
      compile the driver.

      Output:
      ```
      serial: 0xbff79f073b51
      CO2: 799
      Temperature: 20.92
      Humidity: 35.95
      CO2: 900
      Temperature: 20.92
      Humidity: 36.47
      CO2: 926
      Temperature: 20.81
      Humidity: 36.85
      ...
      ```

Troubleshooting
---------------

### Building driver failed

If the execution of `make` in the compilation step 3 fails with something like

> -bash: make: command not found

your RaspberryPi likely does not have the build tools installed. Proceed as follows:

```
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install build-essential
```

### Initialization failed

If you run `./scd4x_i2c_example_usage` but do not get sensor readings but
something like this instead

```
Error executing scd4x_get_serial_number(): -1
Error executing scd4x_start_periodic_measurement(): -1
Error executing scd4x_read_measurement(): -1
```

then go through the below troubleshooting steps.

-   Ensure that you connected the sensor correctly: All cables are fully
    plugged in and connected to the correct pin.
-   Ensure that I2C is enabled on the Raspberry Pi. For this redo the steps on
    "Enable the I2C interface in the raspi-config" in the guide above.
-   If running the same command as root with `sudo ./scd4x_i2c_example_usage`
    works then your user is likely missing access permissions for the I2C
    interface. See the next chapter how to solve this.

### Missing I2C permissions

If your user is missing access to the I2C interface you should first verfiy
the user belongs to the `i2c` group.

```
$ groups
users input some other groups etc
```
If `i2c` is missing in the list add the user and restart the Raspberry Pi.

```
$ sudo adduser your-user i2c
Adding user `your-user' to group `i2c' ...
Adding user your-user to group i2c
Done.
$ sudo reboot
```

If that did not help you can make globally accessible hardware interfaces
with a udev rule.

Go into the `/etc/udev/rules.d` folder and add a new file named
`local.rules`.
```
$ cd /etc/udev/rules.d/
$ sudo touch local.rules
```
Then add a single line `ACTION=="add", KERNEL=="i2c-[0-1]*", MODE="0666"`
to the file with your favorite editor.
```
$ sudo vi local.rules
```


text:
# Css variables convention

## General
Schema: `--[state*]-[property]`

* `state` - state of elements or its preset. outline/square/flat/primary/secondary
* `property` - common css property. color/transition/border-radius

### Components

Schema: `--[component-name]-[state*]-[nested-element*]-[size*]-[property]`

* `component-name` - component name started with va- prefix. va-button/va-badge
* `state` - state of elements or its preset. outline/square/flat/primary/secondary
* `nested-element` - some element that can be nested in root component. content/wrapper
* `size` - size of target element. sm/lg
* `property` - common css property. color/transition/border-radius

`*` - is unnecessary part needed only for specific cases.

repository: epicmaxco/vuestic-ui

branch_name: refs/heads/develop

gha_language: Vue

repo_name: epicmaxco/vuestic-ui


text:
# abi-wizard
Tool for generating ABI reports for libraries and binaries

[![Go Report Card](https://goreportcard.com/badge/github.com/DataDrake/abi-wizard)](https://goreportcard.com/report/github.com/DataDrake/abi-wizard) [![license](https://img.shields.io/github/license/DataDrake/abi-wizard.svg)]()

## Motivation

As a package maintainer, it's a challenging task to keep track of binary dependencies and ABI changes. This tool generates reports that can be used to inform maintainers of ABI and dependency changes.

## Goals
 * Fast scan times
 * Be completely distro agnostic
 * A+ Rating on [Report Card](https://goreportcard.com/report/github.com/DataDrake/abi-wizard)

## Installation

1. Clone repo and enter its
2. `make`
3. `sudo make install`

## Usage

abi-wizard <file/path>

where file/path is a path to a location to scan.

## Output

Up to 4 files per device architecture may be generated:

| File             | Purpose                                            |
| ---------------- | -------------------------------------------------- |
| abi_libs         | List of ELF files provided by the search path      |
| abi_symbols      | List of symbols exported by the detected ELF files |
| abi_used_libs    | List of libs imported by the detected ELF files    |
| abi_used_symbols | List of symbols imported by the detected ELF files |

A suffix will be added to the output files to signify the architecture:

| Architecture | Suffix |
| ------------ | ------ |
| x86          | 32     |
| x86_64       | N/A    |

Currently only 32-bit and 64-bit x86 architectures are supported

## License

Copyright 2019-2021 Bryan T. Meyers<EMAIL_ADDRESS>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

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

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

repository: GZGavinZhao/abi-wizard

repo_name: GZGavinZhao/abi-wizard


text:
# Harposporium sicyodes Drechsler, 1959 SPECIES

#### Status
ACCEPTED

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
J. Wash. Acad. Sci. 49: 107 (1959)

#### Original name
Harposporium sicyodes Drechsler, 1959

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
### Button edge Events
The repository [s2.1]{https://github.com/kf5011/s2.1} uses a falling and rising edge interrupt on each of the two buttons on the base board.

1. Run the program and examine it's behaviour.  (You'll need the serial-monitor to see the output from the print statements)
2. Pay close attention to when the actions occur, when the button is pressed or released.

1. Identify the input pins related to the buttons and the 5-way joystick on the shield.
2. Each pin can have an interrupt for the rising-edge and falling-edge signal, a total of 14 possible interrupts.
3. Investigate the actions of the interrupts for the base-board switches and the 5-way switch.  What differences can you see?


text:
Actor's Guild
==============

Actors Guild was an experimental Java framework to make concurrent programming easier.
It combined the concept of Actors with Futures. The result was a small API that lets you write concurrent,
multi-threaded code almost like regular Java classes.

While the concept was interesting, in order to put it into practical use a huge amount of infrastructure would
have been required. It is not really possible to combine AG with, say, Spring. Most libraries do not provide
the multi-threading safe, immutable classes that AG requires.

Example of a simple actor:

```java
abstract class Counter extends Actor
{
    private int count;

    @Prop abstract int getInitialCount();

    @Initializer
    public void init() {
        count = getInitialCount();
    }

    @Message
    public AsyncResult<Integer> getCount() {
        return result(count);
    }

    @Message
    public AsyncResult<Void> add(int a) {
        count = count + a;
        return noResult();
    }
}
```

Creating the actor and using its messages:

```java
Agent agent = new DefaultAgent();      // the Agent manages Actors
Counter counter = agent.create(Counter.class, new Props("initialCount", 1));
counter.add(5).await();                // call add(), wait until message has been processed
System.out.println("Result: "+counter.getCount().get());  // will print 6
```

You can find the original documentation here.

repository: timjansen/actorsguild

repo_name: timjansen/actorsguild


text:
## _Spinach Power_

#### _Legend says:_
> Do you want six-pack abs? Do you want 50 inch biceps? Then order our spinach cocktail!!!

Collect **no more than 7 potions**, then defeat the giant ogres.

Use a `while`-loop with a condition that checks how many potions you have collected.

To collect `7` potions, you need to have your loop to run while `potionCount` is less than `7`.

A common error is to loop while `potionCount` is less than or equal to 7, but that will result in `8` potions being collected.

___

repository: ripssr/Code-Combat

repo_name: ripssr/Code-Combat


text:
tumblr-roadtobatcountry
=======================

Tumblr theme with google maps integration for [roadtobatcountry](http://roadtobatcountry.tumblr.com), a blog about the West Coast USA road trip I did in 2013. It features attaching a geographical location to each post and a full-size moving Google Maps background that will pan to the location of the currently visible blog post as you scroll through the content.

Setup
-----

Edit your Tumblr theme and copy the HTML into the box. See the Tumblr help for more information.

To use the theme, you require the following Google keys:

- Google Maps API (this is a generic one for all Google APIs, see https://code.google.com/apis/console/)
- Google Analytics (optional)

Do not set the number of posts per page to more than 10 or the Maps API will complain about too many requests.

Tagging Locations
-----------------

You can attach a location to a post by adding a tag like `location: san francisco~ca`. Allowed separators are:

    ~
    .
    ;
    :
    -

It's important to be specific so the Google Maps API Geocoder understand what you are saying. Always at least provide the country or state. Saying `location: Hannover` will most likely not be enough as there are "Hannover"s in Germany as well as the US at least. Instead, say `location: Hannover~Germany`.

Tumblr Features
---------------

The theme only provides styling for a very simple blog with pagination. No pages are supported. Currently simply adding endless scroll would break the maps integration.

----
This theme is tailored specifically for my needs. You may use this as inspiration or just copy and adapt it. Please change the title of the blog though, as that will probably not fit your needs.

The layout of the page, colors and all graphics (which are not included in this repository) were created by Felix Meyer of [We Think Things](http://www.wethinkthings.com).

repository: simbabque/tumblr-roadtobatcountry

repo_name: simbabque/tumblr-roadtobatcountry


text:
---
author: alex
comments: true
date: 2011-10-05 19:00:11+00:00
layout: post
redirect_from: /2011/10/se-podcast-21
hero: /images/category/podcasts.jpg
slug: se-podcast-21
title: 'SE Podcast #21 - David Fullerton & Jason Punyon'
wordpress_id: 10003
tags:
- company
- podcasts
---

This week, Jeff & Joel are joined (in studio, no less) by [David Fullerton](http://stackoverflow.com/users/91687/david-fullerton), head of the NY Dev Department, and [Jason Punyon](http://stackoverflow.com/users/6212/jason-punyon), a developer here in the office.  Its a fast moving discussion covering all kinds of topics, like:

  * Stack Exchange 1.0 (which gave users wanting their own Q&A site the Stack Exchange software, without being official Stack sites) is touched on. Jeff discusses the clones that exist and their reason for existing.

  * [Trello’s](https://trello.com/) launch caused some kerfuffle on [Web Apps.SE](http://webapps.stackexchange.com/) when general (and off-topic) help questions started being asked. In the larger sense, they discuss the necessity of applications and products to have their own unique help service.

  * Some recent changes made to [Area 51](http://area51.stackexchange.com/) are discussed, including the restructured voting system for example questions. Joel discusses the problems that arose out of the previous method of judging example questions.

  * [Fabian](http://skeptics.stackexchange.com/users/5/fabian) asks about overlapping proposals on Area 51, and David gives an overview of the process that goes along with the decision to merge proposals. Joel admits they aren’t too good at judging whether or not proposals are the right size.

  * Joel gives a call to arms for Area 51! They discuss the soon-to-launch [Biblical Hermeneutics](http://area51.stackexchange.com/proposals/1817/biblical-hermeneutics) site and its relationship to the existing [Christianity](http://christianity.stackexchange.com/) and [Judaism](http://judaism.stackexchange.com/) sites.

  * Jeff brings up some other sites on Area 51, including [LEGO](http://area51.stackexchange.com/proposals/10919/lego) and [Firearms](http://area51.stackexchange.com/proposals/164/firearms). The validity of a [Healthcare IT](http://area51.stackexchange.com/proposals/6433/healthcare-it) site is discussed.

  * Alex just access to Stack Exchange’s real-time [Google Analytics](http://www.google.com/analytics/), so the traffic trends of the site are discussed.

  * Jeff plugs one of his pet proposals, and others discuss theirs ([Krav Maga](http://en.wikipedia.org/wiki/Krav_Maga) does indeed pop up).

  * Joel shifts the conversation over to [Careers](http://careers.stackoverflow.com/). You can visit Joel’s profile [here](http://careers.stackoverflow.com/spolsky)! Careers and Stack Overflow aren’t integrated as well as they should be, and solutions to that are discussed. Jeff and David also talk about cool updates coming to Careers. On a sidenote, if you’ve ever wondered what it’s like to be an intern for Fog Creek, you’re in luck! David talks about that experience briefly.

  * Careers’ relationship with [Linked In](http://www.linkedin.com/) is mentioned and spurs on a wider discussion about the other career site.

  * The history of Careers’ filter is discussed, including how it ran originally and how it runs now.

  * Notifications on Stack Overflow have been modified recently. Jeff goes into the depth about how this was brought about. The term “yak-shaving” is involved.

  * A discussion about parenting questions on other Q&A sites reminds Jeff of a recent discussion on [Parenting.SE](http://parenting.stackexchange.com/), regarding the horrific-sounding [“hot saucing”](http://parenting.stackexchange.com/questions/3085/has-anyone-used-hot-saucing-is-it-bad-parenting).

Join us next week at the usual time when we'll be joined by [Paul Biggar](http://paulbiggar.com/) and his wonderful Irish accent.

[Stack Exchange Podcast - Episode #21 w/ David Fullerton](http://soundcloud.com/stack-exchange/stack-exchange-podcast-21) by [Stack Exchange](http://soundcloud.com/stack-exchange)

<object width="100%" height="81" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowscriptaccess" value="always" /><param name="src" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F24810127" /><embed width="100%" height="81" type="application/x-shockwave-flash" src="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F24810127" allowscriptaccess="always" /></object> Stack Exchange Podcast – Episode #21 w/ David Fullerton by Stack Exchange


text:
# CGP [0009]: Extend the Governance Referendum Stage Duration

- Date: 2020-07-14
- Author(s): @aslawson
- Status: DRAFT
- Governance Proposal ID #: [if submitted]
- Date Executed: [if executed]

## Overview

The on chain governance process has been running at an expedited rate in order to activate features and fine tune parameters in these early stages following the mainnet launch.  The original intent had been to start with this faster cadence and eventually slow it down.  In addition, the greater Celo community has expressed a desire to have more time to review, debate, and vote on proposals.

This proposal attempts to take the first step toward this process by extending the referendum (voting) stage by 3 days to a total of 5 days.  This will give stakeholders more time to review, voice concerns, and vote.  It will also increase the chance that all stages occur during the week, especially execution, as it results in a week-long total lifecycle.

Changes in parameters:

- stageDurations.referendum: 172800 (2 * DAY) --> 432000 (5 * DAY)

where DAY (seconds/day) = 60 * 60 * 24 = 86400

Example Proposal Timeline:
Monday - Propose
Tuesday - Dequeued to Approval
Wednesday - Referendum (voting)
Thursday - Referendum (voting)
--- Additional referendum time ---
Friday - Referendum (voting)
Saturday - Referendum (voting)
Sunday - Referendum (voting)
Monday - Execute

This proposal is not intended to completely solve all cadence issues but as a step toward improvement.  Future steps may include altering the durations of other stages and/or even revisiting the entire lifecycle of a proposal holistically.  Please see [Governance 2.0 Ideas](https://docs.google.com/document/d/1_aLO9xnO6ho02BuFGTReuNsDWMEhDS4Omsc48CiN4O8/edit?usp=sharing) document to review ideas and contribute thoughts.

## Proposed Changes

1. Set Governance Referendum Stage Duration
  - Destination: Governance, [setReferendumStageDuration](https://github.com/celo-org/celo-monorepo/blob/de09a44f5ea2c2116506a6b3d05dcaaef92d4fad/packages/protocol/contracts/governance/Governance.sol#L308)
  - Data: 432000
  - Value: 0 (NA)

## Verification

1. Confirm proposal steps: run `celocli governance:view --proposalID X` //TODO update with proposal ID
2. Confirm current stage durations via [getReferendumStageDuration](https://github.com/celo-org/celo-monorepo/blob/de09a44f5ea2c2116506a6b3d05dcaaef92d4fad/packages/protocol/contracts/governance/Governance.sol#L7785)

### Post-Execution Verification

1. Run the celocli tool [governance:view](https://docs.celo.org/command-line-interface/governance#view) on a newly dequeued proposal and confirm that the `secondsUntilStages.expiration` is 777600 = 9 days (1 Approval + 5 Referendum + 3 Execution)
2. Check Governance contract value via [getReferendumStageDuration](https://github.com/celo-org/celo-monorepo/blob/de09a44f5ea2c2116506a6b3d05dcaaef92d4fad/packages/protocol/contracts/governance/Governance.sol#L7785)

## Risks

- If the times calculated are incorrect, there could be unexpected behavior in the referendum stage duration.

## Useful Links

* [Celo Gold Holders: Make Your Voice Heard Through On-chain Governance](https://medium.com/celoorg/celo-gold-holders-make-your-voice-heard-through-on-chain-governance-96cb5a1e8b90) -- blogpost with high level overview of governance stages
* [Celo Docs - Governance](https://docs.celo.org/celo-codebase/protocol/governance) -- more in depth explanation of each phase

repository: dexfair/celo-proposals

repo_name: dexfair/celo-proposals


text:
---
layout: section
order: 4
title: Workflow
---

You need to generate a .ensime for your project. See how to do this based on which  [build tool](/build_tools/) you are using . You will need to do this again if you change your project dependancies.

Edit a scala file in your project. This will start an ensime server. The first time you run for your project, you will probably need to run ```:EnClasspath``` in vim to generate the classpath for ensime and launch the server.

You probably want to put your build tool to conitnuously compile so that ensime keeps up to date as you edit your files (```~compile``` in sbt)

For information on practical ENSIME workflows, you can find some useful information on the [Emacs page](/editors/emacs/userguide)


text:
---
title: Percentage options
---

Percentage options are the bread and butter of freesewing.
Almost all your options will most likely be percentage options as
they ensure that your part will scale regardless of size.

## Structure

Your percentage option should be a plain object with these properties:

- `pct` : The default percentage
- `min` : The minimum percentage that's allowed
- `max` : The maximum percentage that's allowed

<Note>

###### Percentage options will be divided by 100 when loaded

You specify percentages in your config file. For example, `50` means 50%.
When your configuration is loaded, those percentages will be divided by 100.

So a percentage of `50` in your config file will be `0.5` when you read out that option in your part.

###### Percentage options are not limited to the range 0-100

The minimum and maximum (and default) percentages are not restricted to the range from `0%` to `100%`.
A percentage option that spans from `-25%` to `135%` is just as valid.

</Note>

<Tip>

Like all options that are configured through an object, you can
add more properties to the options' object to implement functionality on
top of what's provided by the core library.

Refer to [extending options](/reference/api/part/config/options/extend) for
more details.

</Tip>

## Example

Below is a simple example:

```js
options: {
  acrossBackFactor: {
    pct:  97,
    min:  93,
    max: 100
  }
}
```

## Advanced use

Percentage options have more advanced features that are supported by the core library.
You can unlock those features by adding the following properties to your option:

- `fromAbs`: A method to [determine the percentage based on a value in millimeter][fromabs]
- `toAbs`: A method to [return the option value in millimeter][toabs]
- `snap`: The configuration to control [snapping of percentage options][snap]

[fromabs]: /reference/api/part/config/options/pct/fromabs
[toabs]: /reference/api/part/config/options/pct/toabs
[snap]: /reference/api/part/config/options/pct/snap

Refer to the relevant documentation for more details:

<ReadMore />

repository: freesewing/freesewing

repo_name: freesewing/freesewing


text:
# tbpong
A small Pong game written in python using [termbox](https://github.com/nsf/termbox)

![screenshot](screenshot.png)

## Instructions

- To move the paddle on the left simply use the up and down arrow keys.
- Start the game by pressing the space bar
- Use CTRL-C, ESC, or the Q key to quit the game

-
This is work-in-progress, the AI still needs some improvements :)

repository: madjoel/tbpong

repo_name: madjoel/tbpong


text:
# STAC Item Specification

The [STAC Item](item-spec.md) object is the most important object in a STAC system. An
**Item** is the entity that contains metadata for a scene and links to the assets.

Item objects are the leaf nodes for a graph of [Catalog](../catalog-spec/catalog-spec.md)
and [Collection](../collection-spec/collection-spec.md) objects. See the
[overview](../overview.md) document for more information about how these objects relate
to each other.

## In this directory

**Specification:** The STAC Item specification is in
*[item-spec.md](item-spec.md)*. It includes an overview and an in-depth explanation of the fields.

**Schemas:** The OpenAPI specification in *[item.json](json-schema/item.json)*
defines an **Item** object. The [basics](json-schema/basics.json),
[datetime](json-schema/datetime.json), [instrument](json-schema/instrument.json),
[licensing](json-schema/licensing.json), and [provider](json-schema/provider.json)
schemas validate additional fields defined in *[Common Metadata](common-metadata.md)*.

**Common Metadata:** A set of commonly-used fields for STAC Items is listed in
*[common-metadata.md](common-metadata.md)*.

repository: radiantearth/stac-api-spec

repo_name: radiantearth/stac-api-spec


text:
## Items

An [Item](/src/main/java/org/corespring/resource/Item.java) represents an assessment item within the Corespring
platform. An item includes the pertinent metadata information related to the item, which can be subsequently accessed
through URLs based on the id.

### ItemQuery

An [ItemQuery](/src/main/java/org/corespring/rest/ItemQuery.java) is a query object which is passed to the CoreSpring API in
order to return a subset of available items. An ItemQuery can be built as follows:

    ItemQuery itemQuery = new ItemQuery.Builder()
        .bloomsTaxonomy("Remembering")
        .contributor("Corespring Assessment Professionals")
        .depthOfKnowledge("Recall & Reproduction")
        .gradeLevel("04")
        .itemType("Multiple Choice")
        .keySkill("Categorize")
        .subject("Mathematics")
        .standard("RL.K.2")
        .collection("4ff2e4cae4b077b9e31689fd")
        .build();

### CorespringClient methods

#### Find items

    Collection<Item> items = client.findItems(itemQuery);

    for (Item item : items) {
      System.out.println(item.getTitle());
    }

#### Count items

    int itemCount = client.countItems(itemQuery);
    System.out.println(itemCount);

repository: corespring/corespring-java

repo_name: corespring/corespring-java


text:
# Cycle and router5

This is development work for a new router5 cycle driver.

## Build

From the root directory this repo:

```sh
npm run build -- --app cycle
http-server -p 8080
```

Navigate to http://localhost:8080.


text:
---
layout: post
title: "WH Worktips(5)"
date: 2015-06-19 15:29:56 +0800
comments: true
categories: Virtualization
---
This worktips will enable the visibility for ansible deployed nodes.

```
[root@z_WHServer Code]# cd ansible-tower-setup-2.1.5/
[root@z_WHServer ansible-tower-setup-2.1.5]# ls
ansible.cfg  configure  group_vars  host_vars  README.md  roles  setup.sh  site.yml
```

Later I will finish this. But remember the tutorial pdf works well.

repository: purplepalmdash/NewBlog

repo_name: purplepalmdash/NewBlog


text:
##Moving around with bash.

Return to home directory:
```bash
cd
```

Move to new directory using absolute path:
```bash
cd /home/my_name/Videos/
```

Move to new directory using relative path:
```bash
cd new_parent_directory/directory_to_enter/
```

Return to previous directory
```bash
cd -
```

##ls command

List all visible (non-hidden) files.
```bash
ls
```

List all files, including hidden, but excluding virtual files (i.e. "." and "..").
```bash
ls -A
```

Show all files with metadata.
```bash
ls -lh
```
To sort by most recent modified
```bash
ls -lht
```

##Misc Commands

Clears all text from screen. actually it just wraps the text up. you can still see previous output by scrolling up:
```bash
clear
```

Gives you information about the contents of a file
```bash
file <file path>
```

Give you metadata on the file path
```bash
stat <file path>
```

Search previous commands for a given term. this is really, really, helpful.
```bash
history | grep <search term>
```

Follows symbolic link chains to the real file
```bash
readlink -f <symbolic link>
```

Search list of current processes
```bash
ps aux | grep <program or user name>
```

Recursively search from <path> to fine all files with <term> in name. For example: find . -type f -iname "*vacation*"
```bash
find <path> -type f -iname "*<term>*"
```

Install package
```bash
sudo apt install -y <package name>
```

Search repos for packages containing search term
```bash
sudo apt search <search term>
```

List conventional disks attached
```bash
sudo fdisk -l
```

List block device attributes (hard drives and such)
```bash
sudo blkid
```

List all devices attached by usb
```bash
sudo usb-devices
```

Calculate size of directory:
```bash
du -hs <directoryName>
```

Search History for command
```bash
history | grep <command>
```

Curl Commands

Make Get Request
```bash
curl -X GET https://www.example.com
```


text:
# Brunch with Marionette and Zurb Foundation 4
This is a simple coffeescript based skeleton for [Brunch](http://brunch.io/) which utilizes [MarionetteJS](http://marionettejs.com/) and Zurb Foundation 4.

Use css for foundation.
If you want use SASS, use [brunch-foundation](https://github.com/talentriot/brunch-foundation) skeleton.

Main features are [CoffeeScript](http://coffeescript.org/),
[Handlebars](http://handlebarsjs.com/).
[Zurb Foundation 4](http://foundation.zurb.com/).

## Getting started
* Create new project via executing `brunch new gh:eyolas/brunch-marionette-foundation <project name>
* Build the project with `brunch b` or `brunch w`.
* Open the `public/` dir to see the result.
* Write your code in `app/`.

## Other
Versions of software the skeleton uses:

* jQuery 2.0.3
* Backbone 1.0.0
* Underscore 1.5.2
* Zurb foundation 4.3.2
* MarionetteJS 1.1.0

## Credit
This skeleton was spawned from [Brunch with Marionette](https://github.com/SimbCo/brunch-with-marionette).
Rewrite for use Zurb foundation

repository: eyolas/brunch-marionette-foundation

repo_name: eyolas/brunch-marionette-foundation


text:
## System models

### ACL:

ACL - Access control list: таблица для определения прав доступа к различным моделям системным / прикладным

* id: ACL identifier
* permissions: [] array of permissions:
* permission: permission name, like "read", "write"
    * users: list of users that have this permission of this kind:
        * id: userId
        * kind: permission, one of ALLOW/DENY
    * userGroups: list of groups that have this permission of this kind

### Invite:

Приглашения для новых пользователей системы

 * id : uuid
 * expireAt : date
 * registeredUser -> User.id
 * createdBy -> User.id
 * disabled : boolean
 * email: invited to this email
 * assignUserGroups [ UserGroup ]: array of user group Ids to assign for user created via this invite

### Login:

Сеанс пользователя системы

* id: login identifier, UUID
* userId -> User.id: user, associated with this login
* createdAt: date of logging-in
* ip: IP address of user's client
* disabled: if this login is disabled

### User:

Пользователь системы

* id: user identifier, UUID
* name: user's full name
* email: email, that user choose for registering
* password: hashed password
* invitedBy: -> User.id: user that created invite
* inviteDate: date of invite
* inviteId -> Invite.id: link to invite
* disabled: if user account is disabled

### UserGroup:

Группа пользователей системы

* id: identifier, UUID
* name: group caption
* systemType: null, Admin, Guest, LoggedIn
* users [User]: members of this group

System types:

* Null: all members are defined by users, not system
* Admin: system type for admin user (first user in system at least) - manually can be added other user accounts
* Guest: not authenticated user
* LoggedIn: Authenticated users (any - admin, other users)

### ACL priorities

If no ACL is defined, then user access will be DENY.

Lowerst priority is for group permissions

User-specific permissions have priority over group permissions.

repository: goodcar-rent/goodcar-rent-docs

repo_name: goodcar-rent/goodcar-rent-docs


text:
<!---
title: "Tutorial 4"
metaTitle: "Utilizing existing FAQs for Question Answering"
metaDescription: ""
slug: "/docs/tutorial4"
date: "2020-09-03"
id: "tutorial4md"
--->

# Utilizing existing FAQs for Question Answering

EXECUTABLE VERSION: [colab](https://colab.research.google.com/github/deepset-ai/haystack/blob/master/tutorials/Tutorial4_Tutorial4_FAQ_style_QA.ipynb)

While *extractive Question Answering* works on pure texts and is therefore more generalizable, there's also a common alternative that utilizes existing FAQ data.

**Pros**:

- Very fast at inference time
- Utilize existing FAQ data
- Quite good control over answers

**Cons**:

- Generalizability: We can only answer questions that are similar to existing ones in FAQ

In some use cases, a combination of extractive QA and FAQ-style can also be an interesting option.

```python
# Install the latest release of Haystack in your own environment
#! pip install farm-haystack

# Install the latest master of Haystack and install the version of torch that works with the colab GPUs
!pip install git+https://github.com/deepset-ai/haystack.git
!pip install torch==1.6.0+cu101 -f https://download.pytorch.org/whl/torch_stable.html
```

```python
from haystack import Finder
from haystack.document_store.elasticsearch import ElasticsearchDocumentStore

from haystack.retriever.dense import EmbeddingRetriever
from haystack.utils import print_answers
import pandas as pd
import requests

```

### Start an Elasticsearch server
You can start Elasticsearch on your local machine instance using Docker. If Docker is not readily available in your environment (eg., in Colab notebooks), then you can manually download and execute Elasticsearch from source.

```python
# Recommended: Start Elasticsearch using Docker
# ! docker run -d -p 9200:9200 -e "discovery.type=single-node" elasticsearch:7.6.2
```

```python
# In Colab / No Docker environments: Start Elasticsearch from source
! wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.6.2-linux-x86_64.tar.gz -q
! tar -xzf elasticsearch-7.6.2-linux-x86_64.tar.gz
! chown -R daemon:daemon elasticsearch-7.6.2

import os
from subprocess import Popen, PIPE, STDOUT
es_server = Popen(['elasticsearch-7.6.2/bin/elasticsearch'],
                   stdout=PIPE, stderr=STDOUT,
                   preexec_fn=lambda: os.setuid(1)  # as daemon
                  )
# wait until ES has started
! sleep 30

```

### Init the DocumentStore
In contrast to Tutorial 1 (extractive QA), we:

* specify the name of our `text_field` in Elasticsearch that we want to return as an answer
* specify the name of our `embedding_field` in Elasticsearch where we'll store the embedding of our question and that is used later for calculating our similarity to the incoming user question
* set `excluded_meta_data=["question_emb"]` so that we don't return the huge embedding vectors in our search results

```python
from haystack.document_store.elasticsearch import ElasticsearchDocumentStore
document_store = ElasticsearchDocumentStore(host="localhost", username="", password="",
                                            index="document",
                                            embedding_field="question_emb",
                                            embedding_dim=768,
                                            excluded_meta_data=["question_emb"])
```

### Create a Retriever using embeddings
Instead of retrieving via Elasticsearch's plain BM25, we want to use vector similarity of the questions (user question vs. FAQ ones).
We can use the `EmbeddingRetriever` for this purpose and specify a model that we use for the embeddings.

```python
retriever = EmbeddingRetriever(document_store=document_store, embedding_model="deepset/sentence_bert", use_gpu=False)
```

### Prepare & Index FAQ data
We create a pandas dataframe containing some FAQ data (i.e curated pairs of question + answer) and index those in elasticsearch.
Here: We download some question-answer pairs related to COVID-19

```python
# Download
temp = requests.get("https://raw.githubusercontent.com/deepset-ai/COVID-QA/master/data/faqs/faq_covidbert.csv")
open('small_faq_covid.csv', 'wb').write(temp.content)

# Get dataframe with columns "question", "answer" and some custom metadata
df = pd.read_csv("small_faq_covid.csv")
# Minimal cleaning
df.fillna(value="", inplace=True)
df["question"] = df["question"].apply(lambda x: x.strip())
print(df.head())

# Get embeddings for our questions from the FAQs
questions = list(df["question"].values)
df["question_emb"] = retriever.embed_queries(texts=questions)
df["question_emb"] = df["question_emb"].apply(list) # convert from numpy to list for ES ingestion
df = df.rename(columns={"answer": "text"})

# Convert Dataframe to list of dicts and index them in our DocumentStore
docs_to_index = df.to_dict(orient="records")
document_store.write_documents(docs_to_index)
```

### Ask questions
Initialize a Finder (this time without a reader) and ask questions

```python
finder = Finder(reader=None, retriever=retriever)
prediction = finder.get_answers_via_similar_questions(question="How is the virus spreading?", top_k_retriever=10)
print_answers(prediction, details="all")
```

repository: tcapilla/haystack

repo_name: tcapilla/haystack


text:
# [Projects](projects.md)

* Correction: [Deprecate faker-optional project.](projects.md#faker-optional)

    Wrapper over other Faker providers to return their value or `None`. Useful to
    create data of type `Optional[Any]`.

    Not needed anymore as I use [pydantic factories](pydantic_factories.md) now.

# Operating Systems

## Linux

### [Linux Snippets](linux_snippets.md)

* New: [Create Basic Auth header.](linux_snippets.md#create-basic-auth-header)

    ```bash
    $ echo -n user:password | base64
    dXNlcjpwYXNzd29yZA==
    ```

    Without the `-n` it won't work well.

* New: [Check vulnerabilities in Node.js applications.](linux_snippets.md#check-vulnerabilities-in-node.js-applications)

    With `yarn audit` you'll see the vulnerabilities, with `yarn outdated` you can
    see the packages that you need to update.

* New: [Check vulnerabilities in rails dependencies.](linux_snippets.md#check-vulnerabilities-in-rails-dependencies)

    ```bash
    gem install bundler-audit
    cd project_with_gem_lock
    bundler-audit
    ```

### [elasticsearch](elasticsearch.md)

* New: [Delete snapshot repository.](elasticsearch.md#delete-snapshot-repository)

    ```bash
    curl -XDELETE {{ url }}/_snapshot/{{ backup_path }}
    ```

repository: lyz-code/blue-book

repo_name: lyz-code/blue-book


text:
## Kubernetes

Galoy focuses on reliability and redundancy. This is why we are relying on kubernetes for orchestrating the different services we are using.

Cloud platforms are the best way to maintain reliability. This also comes with a security tradeoff of having keys on servers physically controlled by a third party. We are mitigating this with a cold storage strategy.

To operate, Lightning nodes have to have at least some funds with keys online. We also keep funds online for a portion of the onchain wallet for users who want to send funds over the layer 1.

Kubernetes comes with some overhead, and while we have not tried to run on low-cost devices such as a raspberry pi, we assume this may not be the best platform to run a bitcoin bank that may have thousands of users, or more. However if you want to give it a try, we'll be glad to see how it goes!

https://twitter.com/memenetes/status/1366826625531342856?s=20

### Deps

Galoy relies on bitcoind and lnd to process transactions. Those dependencies can be installed conveniently from the following [helm chart](https://github.com/GaloyMoney/charts)

Currently Galoy relies on a single lnd instance, but the goal is to be able to manage several lnd instances at the same time, so that lnd can be recycled when needed, and also provide reliability when downtime is needed or to provide multi-region redundancy.

Lnd itself is also adding etcd as another backend option to bring more resilicency; this will be another option when available that will bring more resiliency to Galoy

### Main pods

The main service is run through a graphql server.

The graphql server can scale horizontally with additional pods.

Redis is being used as a distributed lock such that several accounts can't be modified at the same time by different instances.

### Database

Mongodb is the main database which is storing the transactions. It's the source of truth for the customers' accounts.

It's currently setup by default with auto replication on a 2-out-of-3 setup, and writes are only accepted as successful when a majority (2) of the nodes have

repository: chdwlch/galoy

repo_name: chdwlch/galoy


text:
[Properties to YAML Converter](https://github.com/anubhavshukla/properties-to-yaml-converter)
===

This library allows you to convert Properties files into Yaml files. The library can be used through Java code or from command line.

The library can be used to convert a single Properties file to Yaml file or all the Properties files in a directory to a combined Yaml file. For detailed usage see `com.anubhavshukla.p2y.Main` class.

Library usage:

    String yaml = PropertiesToYamlConverter.toYamlString(filePath);

Command line usage:

    $ java -jar ./dist/properties-to-yaml-converter-<version>.jar -location=<properties-file-path>


text:
# Intro to R Continued

### Question 1 - Pythagorean Theorem Function
A Pythagorean trio is a set of three numbers:

* a
* b
* c

These numbers satisfy the Pythagorean theorem if the following relation is true: `a*a + b*b = c*c`.

Write the function `is_pythagorean` that takes three numbers as inputs: `a`, `b`, and `c` and returns `TRUE` if the relation holds and `FALSE` if it does not.

> You must name your function with these name and inputs.

### Question 2 - Loops
Write a for-loop that prints all the prime numbers from 1000 to 100 in reverse order.

> +2 bonus points for creating a function called `is_prime` that checks if a number, `n` is a prime number.

### Question 3 - Professor Xavi's Wine Emporium
In order to prep appetizers, Professor Xavi keeps 3 bottles that contain blends of wine, vodka and lemon juice. His inventory is represented by the following matrix:
| Blend | Wine | Vodka | Lemon Juice |
|-------|------|-------|-------------|
| A     | 20   | 30    | 50          |
| B     | 30   | 20    | 60          |
| C     | 30   | 30    | 32          |

The prices of each ingredient is represented by the following matrix:
|             | Price |
|-------------|-------|
| Wine        | 5     |
| Vodka       | 45    |
| Lemon Juice | 10    |

3a.) Write a program showing the price of each blend.

> For example, the price of Blend A is calculated by the following formula: `20(5)+30(45)+50(10)`

3b.) Write a program that shows the total price of 10 blends of Type A, 4 blends of Type B and 5 blends of Type C.

repository: alanhaq/Intro-to-R-Continued

repo_name: alanhaq/Intro-to-R-Continued


text:
---
title: Image
---

Components deploy pods which are a set of containers. These containers are created based on Docker images. To define the image for a container, simply set the `image` value for the container:
```yaml
deployments:
- name: my-backend
  component:
    containers:
    - image: dscr.io/username/my-backend-image
    - image: nginx:1.15
```
The example above would create a pod with two containers:
1. The first container would be create from the image `dscr.io/username/my-backend-image`
2. The second container would be created from the `nginx` image on [Docker Hub](https://hub.docker.com) which is tagged as version `1.15`

> If you are using a private Docker registry, make sure to [logged into this registry](/docs/image-building/registries/authentication).

repository: izzatzr/devspace

gha_language: Go

repo_name: izzatzr/devspace


text:
---
title: "Logging Selenium commands"
linkTitle: "Logging"
weight: 4
description: >
  Getting information about Selenium execution.
---

Turning on logging is a valuable way to get extra information that might help you determine
why you might be having a problem.

## Getting a logger

{{< tabpane langEqualsHeader=true text=true >}}
  {{% tab header="Java" %}}
Java logs are typically created per class. You can work with the default logger to
work with all loggers. To filter out specific classes, see [Filtering](#logger-filtering)

Get the root logger:
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/troubleshooting/LoggingTest.java#L31" >}}

Java Logging is not exactly straightforward, and if you are just looking for an easy way
to look at the important Selenium logs,
take a look at the [Selenium Logger project](https://github.com/titusfortner/selenium-logger#selenium-logger)
  {{% /tab %}}
  {{% tab header="Python" %}}
Python logs are typically created per module. You can match all submodules by referencing the top
level module. So to work with all loggers in selenium module, you can do this:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L5" >}}
  {{% /tab %}}
  {{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
  {{% /tab %}}
  {{% tab header="Ruby" %}}
If you want to see as much debugging as possible in all the classes,
  you can turn on debugging globally in Ruby by setting `$DEBUG = true`.

For more fine-tuned control, Ruby Selenium created its own Logger class to wrap the default `Logger` class.
This implementation provides some interesting additional features.
Obtain the logger directly from the `#logger`class method on the `Selenium::WebDriver` module:

{{< badge-version version="4.10" >}}
{{< gh-codeblock path="/examples/ruby/spec/troubleshooting/logging_spec.rb#L11" >}}
  {{% /tab %}}
  {{% tab header="JavaScript" %}}
```javascript
const logging = require('selenium-webdriver/lib/logging')
logger = logging.getLogger('webdriver')
```
  {{% /tab %}}
  {{< tab header="Kotlin" >}}
  {{< alert-content >}}{{< /alert-content >}}
  {{< /tab >}}
{{< /tabpane >}}

## Logger level
Logger level helps to filter out logs based on their severity.

{{< tabpane langEqualsHeader=true text=true >}}
  {{% tab header="Java" %}}
  Java has 7 logger levels: `SEVERE`, `WARNING`, `INFO`, `CONFIG`, `FINE`, `FINER`, and `FINEST`.
The default is `INFO`.

You have to change both the level of the logger and the level of the handlers on the root logger:
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/troubleshooting/LoggingTest.java#L32-L35" >}}
  {{% /tab %}}
  {{% tab header="Python" %}}
  Python has 6 logger levels: `CRITICAL`, `ERROR`, `WARNING`, `INFO`, `DEBUG`, and `NOTSET`.
  The default is `WARNING`

To change the level of the logger:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L7" >}}
Things get complicated when you use PyTest, though. By default, PyTest hides logging unless the test
fails. You need to set 3 things to get PyTest to display logs on passing tests.

To always output logs with PyTest you need to run with additional arguments.
First, `-s` to prevent PyTest from capturing the console.
Second, `-p no:logging`, which allows you to override the default PyTest logging settings so logs can
be displayed regardless of errors.

So you need to set these flags in your IDE, or run PyTest on command line like:
```bash
pytest -s -p no:logging
```

Finally, since you turned off logging in the arguments above, you now need to add configuration to
turn it back on:

```py
logging.basicConfig(level=logging.WARN)
```
  {{% /tab %}}
  {{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
  {{% /tab %}}
  {{% tab header="Ruby" %}}
  Ruby logger has 5 logger levels: `:debug`, `:info`, `:warn`, `:error`, `:fatal`.
  The default is `:info`.

To change the level of the logger:
{{< badge-version version="4.10" >}}
{{< gh-codeblock path="/examples/ruby/spec/troubleshooting/logging_spec.rb#L13" >}}
  {{% /tab %}}
  {{% tab header="JavaScript" %}}
  JavaScript has 9 logger levels: `OFF`, `SEVERE`, `WARNING`, `INFO`, `DEBUG`, `FINE`, `FINER`, `FINEST`, `ALL`.
  The default is `OFF`.

  To change the level of the logger:

```javascript
logger.setLevel(logging.Level.INFO)
```
  {{% /tab %}}
  {{< tab header="Kotlin" >}}
  {{< alert-content >}}{{< /alert-content >}}
  {{< /tab >}}
{{< /tabpane >}}

### Actionable items

Things are logged as warnings if they are something the user needs to take action on. This is often used
for deprecations. For various reasons, Selenium project does not follow standard Semantic Versioning practices.
Our policy is to mark things as deprecated for 3 releases and then remove them, so deprecations
may be logged as warnings.

{{< tabpane langEqualsHeader=true text=true >}}
  {{% tab header="Java" %}}
Java logs actionable content at logger level `WARN`

Example:
```text
May 08, 2023 9:23:38 PM dev.selenium.troubleshooting.LoggingTest logging
WARNING: this is a warning
```
  {{% /tab %}}
  {{% tab header="Python" %}}
Python logs actionable content at logger level — `WARNING`
Details about deprecations are logged at this level.

Example:
```text
WARNING  selenium:test_logging.py:23 this is a warning
```
  {{% /tab %}}
  {{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
  {{% /tab %}}
  {{% tab header="Ruby" %}}
Ruby logs actionable content at logger level — `:warn`.
Details about deprecations are logged at this level.

For example:
```text
2023-05-08 20:53:13 WARN Selenium [:example_id] this is a warning
```
  Because these items can get annoying, we've provided an easy way to turn them off, see [filtering section](#logger-filtering) below.
  {{% /tab %}}
  {{< tab header="JavaScript" >}}
  {{< alert-content />}}
  {{< /tab >}}
  {{< tab header="Kotlin" >}}
  {{< alert-content >}}{{< /alert-content >}}
  {{< /tab >}}
{{< /tabpane >}}

### Useful information

This is the default level where Selenium logs things that users should be aware of but do not need to take actions on.
This might reference a new method or direct users to more information about something

{{< tabpane langEqualsHeader=true text=true >}}
  {{% tab header="Java" %}}
  Java logs useful information at logger level `INFO`

Example:
```text
May 08, 2023 9:23:38 PM dev.selenium.troubleshooting.LoggingTest logging
INFO: this is useful information
```
  {{% /tab %}}
  {{% tab header="Python" %}}
Python logs useful information at logger level — `INFO`

Example:
```text
INFO     selenium:test_logging.py:22 this is useful information
```
  {{% /tab %}}
  {{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
  {{% /tab %}}
  {{% tab header="Ruby" %}}
Ruby logs useful information at logger level — `:info`.

Example:
```text
2023-05-08 20:53:13 INFO Selenium [:example_id] this is useful information
```

  {{% /tab %}}
  {{% tab header="JavaScript" %}}
  Logs useful information at level: `INFO`
  {{% /tab %}}
  {{< tab header="Kotlin" >}}
  {{< alert-content >}}{{< /alert-content >}}
  {{< /tab >}}
{{< /tabpane >}}

### Debugging Details

The debug log level is used for information that may be needed for diagnosing issues and troubleshooting problems.

{{< tabpane langEqualsHeader=true text=true >}}
  {{% tab header="Java" %}}
Java logs most debug content at logger level `FINE`

Example:
```text
May 08, 2023 9:23:38 PM dev.selenium.troubleshooting.LoggingTest logging
FINE: this is detailed debug information
```
  {{% /tab %}}
  {{% tab header="Python" %}}
Python logs debugging details at logger level — `DEBUG`

Example:
```text
DEBUG    selenium:test_logging.py:24 this is detailed debug information
```
  {{% /tab %}}
  {{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
  {{% /tab %}}
  {{% tab header="Ruby" %}}
Ruby only provides one level for debugging, so all details are at logger level — `:debug`.

Example:
```text
2023-05-08 20:53:13 DEBUG Selenium [:example_id] this is detailed debug information
```
  {{% /tab %}}
  {{% tab header="JavaScript" %}}
  Logs debugging details at level: `FINER` and `FINEST`
  {{% /tab %}}
  {{< tab header="Kotlin" >}}
  {{< alert-content >}}{{< /alert-content >}}
  {{< /tab >}}
{{< /tabpane >}}

## Logger output

Logs can be displayed in the console or stored in a file. Different languages have different defaults.

{{< tabpane langEqualsHeader=true text=true >}}
  {{% tab header="Java" %}}
By default all logs are sent to `System.err`. To direct output to a file, you need to add a handler:

{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/troubleshooting/LoggingTest.java#L37-L38" >}}
  {{% /tab %}}
  {{% tab header="Python" %}}
  By default all logs are sent to `sys.stderr`. To direct output somewhere else, you need to add a
handler with either a `StreamHandler` or a `FileHandler`:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L9-L10" >}}
  {{% /tab %}}
  {{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
  {{% /tab %}}
  {{% tab header="Ruby" %}}
  By default, logs are sent to the console in `stdout`.
  To store the logs in a file:

{{< badge-version version="4.10" >}}
{{< gh-codeblock path="/examples/ruby/spec/troubleshooting/logging_spec.rb#L15" >}}
  {{% /tab %}}
  {{% tab header="JavaScript" %}}
JavaScript does not currently support sending output to a file.

To send logs to console output:
```javascript
logging.installConsoleHandler()
```
  {{% /tab %}}
  {{< tab header="Kotlin" >}}
  {{< alert-content >}}{{< /alert-content >}}
  {{< /tab >}}
{{< /tabpane >}}

## Logger filtering

{{< tabpane langEqualsHeader=true text=true >}}
{{% tab header="Java" %}}
Java logging is managed on a per class level, so
instead of using the root logger (`Logger.getLogger("")`), set the level you want to use on a per-class
basis:
{{< gh-codeblock path="/examples/java/src/test/java/dev/selenium/troubleshooting/LoggingTest.java#L40-L41" >}}
  {{% /tab %}}
  {{< tab header="Python" >}}
Because logging is managed by module, instead of working with just "selenium", you can specify
different levels for different modules:
{{< gh-codeblock path="/examples/python/tests/troubleshooting/test_logging.py#L12-L13" >}}
  {{< /tab >}}
  {{% tab header="CSharp" %}}
```text
.NET does not currently have a Logging implementation
```
  {{% /tab %}}
  {{% tab header="Ruby" %}}
Ruby's logger allows you to opt in ("allow") or opt out ("ignore") of log messages based on their IDs.
Everything that Selenium logs includes an ID. You can also turn on or off all deprecation notices by
using `:deprecations`.

These methods accept one or more symbols or an array of symbols:
{{< badge-version version="4.10" >}}
{{< gh-codeblock path="/examples/ruby/spec/troubleshooting/logging_spec.rb#17" >}}
or
{{< badge-version version="4.10" >}}
{{< gh-codeblock path="/examples/ruby/spec/troubleshooting/logging_spec.rb#L18" >}}
  {{% /tab %}}
  {{< tab header="JavaScript" >}}
  {{< alert-content >}}{{< /alert-content >}}
  {{< /tab >}}
  {{< tab header="Kotlin" >}}
  {{< alert-content >}}{{< /alert-content >}}
  {{< /tab >}}
{{< /tabpane >}}

branch_name: refs/heads/trunk

gha_language: HTML


text:
# Snake AI

AStar based Snake AI agent running on Löve2D framework.

The code is written in [MoonScript](https://moonscript.org/) -- dynamic scripting language that compiles into Lua. It is highly recommended to read only *.moon files because exported *.lua files tend to be harder to read.

The main part of the project (pathfinding algorithm) is implemented in astar.moon file. Other files provide functionality necessary to display Snake.

After running the project, it chooses one of the maps from maps folder randomly and starts navigating the snake from one treat to another. If the snake blocks itself and the agent is unable to find path to next treat, the project resets automatically after a while and chooses a new map.

Snake only considers his own body in the moment of evaluation, that means he cannot move to unblock the path. While this could be implemented, the implications of this approach are quite complicated. For example you have to store number of previous moves in addition to the head position in the state space, which means that you navigate in 3 dimensional space. Also the shortest path is no longer the best path and heuristic might need to be adjusted.

## Running the Project

To run the project, Löve2D interpreter is required and can be downloaded from [the website](https://love2d.org/#download).

After installing the interpreter, the code can be run by calling
```
$ love .
```
in the project folder.

Keep in mind that love.exe usually needs to be added to PATH manually.

repository: Reiqy/snake-ai

repo_name: Reiqy/snake-ai


text:
---
title: "A person is smart; people are dumb, panicky, dangerous animals and you know it"
date: 2020-03-12T05:00:00Z
draft: false
author: aloysius
image: images/logo.jpg
description: "12 March 2020, weekly newsletter"
---

After an extended hiatus (which has included a visit to Ghana and some annual leave) we are back.

## Topic of the ~~week~~ month

Rather than a single post this time there is one topic that has come up time and
again over the last month. Data breaches. It seems that everybody is fumbling our
personal data all at the same time. Here's a summary of the ones which caught my eye.

* [Network rail](https://www.ispreview.co.uk/index.php/2020/03/network-rail-and-c3uk-confirm-wifi-personal-data-breach.html)
* [SpaceX](https://www.infosecurity-magazine.com/news/spacex-contractor-hit-by-data/)
* [Samsung](https://www.theregister.co.uk/2020/02/24/samsung_data_breach_find_my_mobile/)
* [Zynga](https://www.infosecurity-magazine.com/news/zynga-facing-lawsuit-over-data/)
  (the people who brought you Words with Friends)
* [Virgin
  Media](https://www.itv.com/news/2020-03-05/virgin-media-apologises-after-data-breach-affects-900-000-customers/)
  which allegedly includes personal sexual preference information in the form of
  requested porn website whitelist requests, what could go wrong?

And with confirmation that Vodafone are [siphoning off your
data](https://www.theregister.co.uk/2020/02/19/vodafone_transparency/) there are
probably more which we do not yet know about but for which money is currently
changing hands. Its never been more important to understand the importance of the
value of your information and to take the steps you need to balance your security
with the utility you get by sharing it.

## Non-data science reading

I've really not read much in the data science sphere of late and have been far
more focussed on the topic which led me to the position I'm in. Here's some of my
picks that I think are most interesting to those who are not as mathematically
inclined.

* I'm not convinced that emoji have any place in equations but that is a personal
  preference. If you like the idea then there are plenty more ways to help
  visualise the meaning of mathematics over [here](https://agilescientific.com/blog/2020/2/25/visual-explanations-of-mathematics)
* A good argument that 'speaking mathematics' is a way to [better understanding
  and implementations of code](https://phys.org/news/2020-03-math-code.html)
* So often the sciences (including computer) take from mathematics and give
  nothing back. Now, a [new computer science
  proof](https://www.quantamagazine.org/landmark-computer-science-proof-cascades-through-physics-and-math-20200304/)
  directly contributes back to quantum physics and pure maths and this makes me
  happy.
* I have recently enjoyed small [daily maths
  challenges](https://brilliant.org/daily-problems/) which give you small
  self-contained toy problems that are just fun to do.
* Surprisingly,
  [parrots](https://phys.org/news/2020-03-parrots-probability-stats-choices.html)
  are probably better at statistics than I am!
* Quanta also have a pretty [map of
  mathematics](https://www.quantamagazine.org/the-map-of-mathematics-20200213/)

## Data science reading

* Just when you thought self-driving cars might be safe, there's a [new
  attack](https://www.technologyreview.com/s/615299/reinforcement-learning-adversarial-attack-gaming-ai-deepmind-alphazero-selfdriving-cars/).
* In a shocking turn of events, people are [blowing ML gains out of all
  proportion](https://www.technologyreview.com/s/615232/ai-emotion-recognition-affective-computing-hirevue-regulation-ethics/).
  This time it is 'Emotion AI', the thing that people use to assess video
  interviews to understand candidate suitability for e.g. jobs.

## Origin of the title

The source of all philosophical knowledge, Tommy Lee Jones in Men in Black

{{< youtube kkCwFkOZoOY >}}

repository: karetsu/diaries

gha_language: CSS

repo_name: karetsu/diaries


text:
```@meta
DocTestSetup = :(using DataStructures)
```

# AVL Tree

The `AVLTree` type is an implementation of AVL Tree in Julia. It is a self-balancing binary search tree where balancing occurs based on the difference of height of the left subtree and the right subtree. Operations such as search, insert and delete can be done in `O(log n)` complexity, where `n` is the number of nodes in the `AVLTree`. Order-statistics on the keys can also be done in `O(log n)`.

Examples:

```jldoctest
julia> tree = AVLTree{Int}();

julia> for k in 1:2:20
           push!(tree, k)
       end

julia> haskey(tree, 3)
true

julia> tree[4] # time complexity of this operation is O(log n)
7

julia> for k in 1:2:10
           delete!(tree, k)
       end

julia> haskey(tree, 5)
false

julia> sorted_rank(tree, 17) # used for finding rank of the key
4
```

```@meta
DocTestSetup = nothing
```

gha_language: Julia


text:
---
layout: post
title: Cocktail Maker - Captstone
description: Pour-Shake-Stir Drinks
img: /img/ct_thumbnail.png
---

# Overview

This was my capstone project for my senior year of undergrad at Carnegie Mellon in 24-671 Electromechanical Systems Design. I was on a 5 person team with four other mechanical engineering senior.

This project focuses on building a household automated cocktail machine that makes drinks from the original liquid ingredients. Currently, similar devices either use prepackaged cocktail mixes or are still in development and cost at least $300 to pre-order. Making cocktails can be time-consuming and imprecise, particularly when done at home. Automating this process can reduce time spent away from guest at parties and allow people to control exactly what is in their drink. The Design challenge was to create a system that could pour, stir, and shake drinks quickly and accurately.

# Customer Needs

We compiled the suggestions from the survey, identified similarities/trends, and converted the vague needs to comprehensible customer needs. As a design team, we also added customer needs that we felt were important to its functionality as a household appliance, such as some of the safety and general needs. Below are two tables: one is a chart of our customer needs, and the other is the objective tree for our customer needs.

# Early Prototypes/ Renders (PDR)

To assure the success and have an understanding of the difficulty of the project we did a lot of prototyping. We broke the prototyping into five subassemblies: storage, handling, extended stations, stirring, and shaking. Below are early renders of what we thought each system would look like during our preliminary design review.

Early Render

Left: Handling system Right: Extended Station: System

Shaking

Stirring

Storage

# Mid-level Prototypes (CDR)

After we access the feasibility of our project, we then prepare for our critical design review (CDR), where we had in depth measurements and placements of all our parts. Here is where we bought critical parts and see if they worked.

For the storage and handling system we tested our pumps and tubing. To pour our drinks we went with a peristaltic pump from Trossen Robotics with a flow rate of 2L/min. We ran test for repeatability and the minimum amount of liquid we could precisely pour. Here we observed that there was leaking from the pumps through the tube. As result of this leakage we went from having our liquid bottles from on top of our prototype to the side for no spillage.

The extended station was operated by a stepper motor, for accurate open-loop control, to drive a lead screw. This system was inspired by how 3d printers work. The shaking mechanism we finalize the dimensions for a slider-crank system and a servo-controlled claw. Last we bought and finish the CAD for our stirring mechanism.

# Final Prototypes/ Renders

Below are images of the final prototype for the cocktail maker we presented during our senior design exp.

Final Render

# Videos

path: /_projects/Cocktail Maker.markdown

filename: Cocktail Maker.markdown


text:
What is a wireframe?
   A wireframe helps with designing a site. You can get a better sense of where all the contant will go and how HTML will be used to build the site.

What are the benefits of wireframing?
  The benefits are that you have some sort of site plan and draft of the website. It is better to see what you will be making rather than just coding directly from you mind.
Did you enjoy wireframing your site?
  I did like it, it did need to be simple but I can see how wireframing can take a long time. You can spend too much time on uneccasry things.
Did you revise your wireframe or stick with your first idea?
  I did not revise it too much, I wanted to keep everything simple from the beginning.
What questions did you ask during this challenge?
  Not many, but how complex should we be making the wireframes?
What resources did you find to help you answer them?
  I asked around and then I read the articles that were attached with the assignment.

Which parts of the challenge did you enjoy and which parts did you find tedious?
  I liked designing the site, but I felt limited since I don't HTML fully. The tedious part was the uplaoding and making sure all the pile paths to display were correct.

![Alt text](/week-2/img/Wire-frame.png)!
![Alt text](/week-2/img/wire-frame-blog.png)!

gha_language: Ruby


text:
ColorPickerPopover
==================

Lightweight Color Picker inside NSPopover.

<img src="https://s3.amazonaws.com/cindori/images/colorpicker.png" width="620">

## Installation (CocoaPods)
Configure your Podfile to use `ColorPickerPopover`:

```pod 'ColorPickerPopover', :git => 'https://github.com/OskarGroth/ColorPickerPopover.git'```

(Some Swift3 issues are preventing me from uploading to Cocoapods for now.)
Note that this repo is Swift 3 only.

## Usage

Create an `NSColorWell` in Interface Builder and set it's class to `ColorWell`.

Set its delegate to your view controller or other class.

Implement the delegate method:

    func colorDidChange(colorWell: ColorWell, color: NSColor)

This popover only shows a single color picker (defaulting to Color Wheel).

You can change the color picker by changing:

        let paletteItem = colorPanel?.toolbar?.items[0]

To other color palette item indexes.

If you want to show a true color panel (with the toolbar and all the options), it should be straightforward to extend this project and implement the toolbar manually. If you do, please send me a pull request.

## License
The MIT License (MIT)

Copyright (c) 2016 Oskar Groth

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

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

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


text:
# Groovations - The Groovy Migrations Grails Plugin

Automatically run Groovy based migration scripts in your Grails application!

Documentation is available [here](http://commercehub-oss.github.io/grails-groovations/).

# License
This plugin is available under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).

(c) All rights reserved Commerce Technologies, Inc.

repository: burtbeckwith/grails-groovations

repo_name: burtbeckwith/grails-groovations


text:
# Change Log
All notable changes to this project will be documented in this file.
As of 4.0.0, this project adheres to [Semantic Versioning](http://semver.org/) and the format is based on the suggestions a <http://keepachangelog.com/>.

## [Unreleased]
- The minimum required and tested version of PHP is now 7.3.
- `example.php` clearly indicates when a public album can't be found.

## [4.1.0] - 2018-08-24
### Added
- Support for "non-inline" expansions.

### Changed
- The minimum required and tested version of PHP is now 5.6.
- The `_config` option, if provided as an array, is JSON encoded for ease of use.

### Fixes
- Empty arguments are stripped from the URL before calling the API. Fixes [#43](https://github.com/lildude/phpSmug/issues/12).

## [4.0.0] - 2015-12-31
### Added
- Support for SmugMug's v2 API.

### Changed
- Complete rewrite of phpSmug.
- Introduction of proper semantic versioning.
- Switched to using Guzzle for requests to the API.  This means more reliable and predictable behaviour and allows for easier future improvements in phpSmug without having to worry about maintaining a library that submits requests.
- All tests are now public and run on Travis CI with every push.
- phpSmug is now licensed under the MIT license.
- PSR-1, PSR-2, and PSR-4 coding standards are implemented and enforced by unit testing.
- phpSmug 4.0.0 is not backwardly compatible with phpSmug 3.5 and earlier.

### Removed
- Caching has been removed from this release.
- Support for SmugMug's 1.3.0 and earlier API.

## [3.5] - 2013-03-02
### Added
- Ability to sign an image URL with OAuth authentication parameters to allow embedding of "non-external" images within external sites. Fixes [#16](https://github.com/lildude/phpSmug/issues/16).
- `example-external-links.php` example to demonstrate the above.

### Changed
- Switched to using Markdown for the README file.
- Misc other little coding changes and improvements.

## [3.4] - 2011-06-21
### Fixed
- Added missing hidden header for image uploads that should be hidden. Fixes [#12](https://github.com/lildude/phpSmug/issues/12).

## [3.3] - 2011-06-03
### Fixed
- Worked around bizarre behaviour in the way PHP's `implode()` and `http_build_query()` handle associative array keys with empty values. Fixes [https://github.com/lildude/phpSmug/issues/11].

## [3.2] - 2011-05-30
### Added
- Implemented the ability to force all API communication to occur securely over HTTPS. OAuth Only. ([#9](https://github.com/lildude/phpSmug/issues/9))

### Changed
- phpSmug now uses the documented secure.smugmug.com API endpoints ([#8](https://github.com/lildude/phpSmug/issues/8))
- Updated OAuth example to use new Album URL and to remove its use of the deprecated `session_unregister()` PHP function.
- Improved support for the 1.3.0 API endpoint ([#10](https://github.com/lildude/phpSmug/issues/10))

## [3.1] - 2011-03-28
### Changed
- phpSmug now defaults to using the 1.2.2 API endpoint. All earlier endpoints are still available, but technically deprecated by SmugMug.
- Improved connection settings

### Fixed
- Removed erroneous re-instantiation of processor when setting adapter.
Corrected check for `safe_dir` OR `open_basedir` so fails over to socket connection correctly

## [3.0] - 2010-11-13
### Changed
- The `setProxy()` method now allows you to set a proxy username and password.
- phpSmug no longer depends on PEAR so no longer ships any PEAR modules.
- phpSmug is now 100% PHP 5 `E_STRICT` compliant ([#2](https://github.com/lildude/phpSmug/issues/2)).
phpSmug is now licensed under the GPLv3 license.

### Fixed
- OAuth token setting now works correctly again ([#7](https://github.com/lildude/phpSmug/issues/7)).

## [2.2] - 2010-07-21
### Added
- Added methods to handle calling of the various login.* methods offered by the API when using these instead of the single `login()` method offered by phpSmug. ([#6](https://github.com/lildude/phpSmug/issues/6))

### Changed
- https is forced for all calls that use OAuth with the PLAINTEXT signature method. WARNING: Uploads are however rejected by the API if you use PLAINTEXT (which is NOT the default).
- Upload filenames are now encoded to ensure spaces and non-ascii characters are correctly handled.
- `images_upload()` now honours any earlier `setProxy()` calls so uploads can occur through that proxy.
- `clearCache()` now takes a boolean argument to state whether you want the cache location to be removed when the cache is cleared. Default is FALSE, ie the cache location will NOT be removed.
- For my own benefit, I've now implemented a full PHPUnit test suite that checks all functionality of phpSmug.

### Fixed
- Failed upload responses and smugmug.auth.* method responses are no longer cached.

## [2.1] - 2009-09-27
### Added
- SmugMug's mode (ie read-only etc) is now stored in `$obj->mode` for easy checking of SmugMug's status.

### Changed
- Changed image_upload method to upload to upload.smugmug.com instead of api.smugmug.com. SmugMug made changes to enforce the use of upload.smugmug.com as uploading to api.smugmug.com was causing problems. ([#5](https://github.com/lildude/phpSmug/issues/))

### Fixed
- Resolved issue with recaching of cached data ([#4](https://github.com/lildude/phpSmug/issues/4)).
- Corrected "login with hash" example in the README file.

## [2.0.2] - 2009-02-22
### Changed
- Tidied up code so phpSmug.php is E_STRICT compliant and doesn't report any notice messages.

### Fixed
- Force error log level to be lower than E_STRICT due to limitation of PEAR modules (See notes in [#2](https://github.com/lildude/phpSmug/issues/2)).
- Resolved over-zealous `clearCache()` function ([#3](https://github.com/lildude/phpSmug/issues/3)).

## [2.0.1] - 2008-11-07
### Fixed
- Resolved issue where error code was not passed to `Exception()` line 350 ([#1](https://github.com/lildude/phpSmug/issues/1))

## [2.0.0] - 2008-10-31
### Changed
- phpSmug has been rewritten so it not a backwardly compatible drop-in replacement for phpSmug 1.x.
- Arguments to a method need to be passed either as a series of strings or an array.
- phpSmug is no longer compatible with PHP 4.
- Defaults to using the only stable endpoint provided by SmugMug: the 1.2.0 endpoint. However, it is fully functional with the later endpoint revisions. To use a later version of the endpoint, just set the version when instantiating the instance using `APIver`.
- All smugmug.login.* methods are handled by a single login() method.
- phpSmug now throws exceptions on error.

repository: lildude/phpSmug

gha_language: PHP

repo_name: lildude/phpSmug


text:
Perl script to view Delphi DFM forms in Windows encoding.

One can set it as a textconv driver for git repository (see https://git.wiki.kernel.org/index.php/Textconv).
E.g.
```
    [diff "dfm-viewer"]
        textconv = DFM_ENCODING=cp1251 perl -- <path>/dfm-viewer.pl
```

repository: ashumkin/dfm-viewer

repo_name: ashumkin/dfm-viewer


text:
# Developing Telepresence 2

## Set up your environment

- `KUBECONFIG` needs to be set to a working cluster
- `DEV_KUBECONFIG` is the cluster that is used by tests, if set. Otherwise the tests will use a K3s cluster running in Docker.
- These registry variables should all point to the same registry for now. We'll clean this up in the near future. If you can push to `gcr.io` then that's the cheapest; otherwise something like `docker.io/ark3` will work fine. The `localhost:5000` DTest registry works fine too if you're using the DTest cluster.
  - `DEV_REGISTRY` sets things up for the tests
  - `TELEPRESENCE_REGISTRY` is used by the Tel binary to set the image it uses when adding or modifying the cluster
  - `KO_DOCKER_REPO` is used by the image build -- this may already be unnecessary

The output of `make help` shows some of this information, but not all of it, and it is not quite correct at the moment. We will improve all of this soon.

## Build the binaries

```console
$ make build
mkdir -p build-output/bin
go build -ldflags=-X=github.com/telepresenceio/telepresence/v2/pkg/version.Version=v0.2.0-1605793571 -o build-output/bin ./cmd/...

$ ./build-output/bin/telepresence version
Client v0.2.0-1605793571 (api v3)
```

You can also use `go run ./cmd/telepresence` et al during development, but be aware that the binary will not know its version number.

The Telepresence binary uses the `TELEPRESENCE_REGISTRY` and `TELEPRESENCE_VERSION` environment variables to compute the name and tag of the image it will use when it modifies your cluster (e.g., to add a Traffic Manager), falling back to `docker.io/datawire` and its compiled-in version number respectively if those variables are unset.

## Run the tests

```console
$ sudo id
uid=0(root) gid=0(root) groups=0(root)

$ make check
go test -v ./...
?       github.com/telepresenceio/telepresence/v2/cmd/telepresence      [no test files]
?       github.com/telepresenceio/telepresence/v2/cmd/traffic   [no test files]
=== RUN   TestState_HandleIntercepts
--- PASS: TestState_HandleIntercepts (0.01s)
PASS
ok      github.com/telepresenceio/telepresence/v2/pkg/agent     (cached)
?       github.com/telepresenceio/telepresence/v2/pkg/client    [no test files]
=== RUN   TestTelepresence
Running Suite: Telepresence Suite
=================================
Random Seed:<PHONE_NUMBER>
Will run 9 of 9 specs

•••••••••
Ran 9 of 9 Specs in 47.723 seconds
SUCCESS! -- 9 Passed | 0 Failed | 0 Pending | 0 Skipped
--- PASS: TestTelepresence (47.72s)
PASS
ok      github.com/telepresenceio/telepresence/v2/pkg/client/cli        47.756s
+ kubectl --kubeconfig /tmp/dtest-kubeconfig-ark3-d4942b3f89a9.yaml create namespace telepresence-349112
=== RUN   Test_findTrafficManager_notPresent
--- PASS: Test_findTrafficManager_notPresent (0.01s)
=== RUN   Test_findTrafficManager_present
+ ko publish --local ./cmd/traffic
+ docker tag ko.local/traffic-6c3ca0a9c236a15e275ec10cceb31334:36ff29b03fdc379899eb7652fa8655f3c26590f96319af0ba90b73d938c8b99e localhost:5000/tel2:v0.1.2-test
+ docker push localhost:5000/tel2:v0.1.2-test
--- PASS: Test_findTrafficManager_present (4.09s)
=== RUN   Test_ensureTrafficManager_notPresent
--- PASS: Test_ensureTrafficManager_notPresent (0.17s)
PASS
ok      github.com/telepresenceio/telepresence/v2/pkg/client/connector  52.269s
?       github.com/telepresenceio/telepresence/v2/pkg/client/daemon     [no test files]
?       github.com/telepresenceio/telepresence/v2/pkg/client/daemon/dns [no test files]
2020/11/19 08:48:20 Acquiring machine lock "default" took 50.24 seconds
=== RUN   TestTranslator
--- PASS: TestTranslator (3.54s)
=== RUN   TestSorted
--- PASS: TestSorted (0.01s)
PASS
ok      github.com/telepresenceio/telepresence/v2/pkg/client/daemon/nat 55.759s
?       github.com/telepresenceio/telepresence/v2/pkg/client/daemon/proxy       [no test files]
=== RUN   TestMechanismHelpers
--- PASS: TestMechanismHelpers (0.00s)
=== RUN   TestAgentHelpers
--- PASS: TestAgentHelpers (0.00s)
=== RUN   TestPresence
--- PASS: TestPresence (0.00s)
=== RUN   TestConnect
--- PASS: TestConnect (0.00s)
=== RUN   TestStateInternal
=== RUN   TestStateInternal/agents
=== RUN   TestStateInternal/presence-redundant
--- PASS: TestStateInternal (0.00s)
    --- PASS: TestStateInternal/agents (0.00s)
    --- PASS: TestStateInternal/presence-redundant (0.00s)
=== RUN   TestWatches
    watches_test.go:26: Skipped! Use "env CI=true go test [...]" to run
--- SKIP: TestWatches (0.00s)
PASS
ok      github.com/telepresenceio/telepresence/v2/pkg/manager   (cached)
?       github.com/telepresenceio/telepresence/rpc/v2       [no test files]
?       github.com/telepresenceio/telepresence/rpc/v2/connector     [no test files]
?       github.com/telepresenceio/telepresence/rpc/v2/daemon        [no test files]
?       github.com/telepresenceio/telepresence/rpc/v2/iptables      [no test files]
?       github.com/telepresenceio/telepresence/rpc/v2/version       [no test files]
?       github.com/telepresenceio/telepresence/v2/pkg/version   [no test files]
```

You can also use `gotestsum` or manually run `go test` as you prefer.

### I've made a change to the agent-installer, how do I update the testdata output files?

If you've made a change to the agent-installer that requires updating
the `testadata/addAgentToWorkload/*.output.yaml` files, it can be
tedious to update each file separately.

If you set the `DEV_TELEPRESENCE_GENERATE_GOLD` environment variable
to a non-empty value, and run the test again, it will update the files
based on the current behavior (the test will still fail that first
run, though).  Be sure to look at the diff and make sure that new
behavior is actually correct!

```console
$ DEV_TELEPRESENCE_GENERATE_GOLD=y go test -run=TestAddAgentToWorkload ./pkg/client/connector
```

## Build the image

```console
$ make image
2020/11/19 08:57:58 Using base docker.io/datawire/tel2-base:20201105 for github.com/telepresenceio/telepresence/v2/cmd/traffic
2020/11/19 08:57:58 Building github.com/telepresenceio/telepresence/v2/cmd/traffic for linux/amd64
2020/11/19 08:57:59 Loading ko.local/traffic-6c3ca0a9c236a15e275ec10cceb31334:2f96b389da4fb4a3ae249e55293c3608fb8d9a9cf979d534bea7ace69e853ce0
2020/11/19 08:58:01 Loaded ko.local/traffic-6c3ca0a9c236a15e275ec10cceb31334:2f96b389da4fb4a3ae249e55293c3608fb8d9a9cf979d534bea7ace69e853ce0
2020/11/19 08:58:01 Adding tag latest
2020/11/19 08:58:01 Added tag latest
docker tag ko.local/traffic-6c3ca0a9c236a15e275ec10cceb31334:2f96b389da4fb4a3ae249e55293c3608fb8d9a9cf979d534bea7ace69e853ce0 docker.io/ark3/tel2:v0.2.0-1605794277
```

The image is now in your machine's Docker daemon and tagged as shown. You can push that image manually, thus allowing your Kube cluster to use it.

```console
$ docker push docker.io/ark3/tel2:v0.2.0-1605794277
The push refers to repository [docker.io/ark3/tel2]
41e7a1ba6d29: Pushed
4f76c7cc1547: Mounted from datawire/tel2
3a3c83bc9ed4: Mounted from datawire/tel2
7e2446562a4e: Mounted from datawire/tel2
721384ec99e5: Mounted from ark3/telepresence-local
v0.2.0-1605794277: digest: sha256:f9b26f48659748fea4977cf4664233eb4b98bf6861bfd46033b3c309d34cb6fd size: 1363
```

**Note**: If you've been following along, your Telepresence binary and your Telepresence image have _different versions_: the timestamp will (almost certainly) be different. This means if you run Telepresence against an empty cluster, the image it sets for the Traffic Manager will not exist with the tag it specifies.

During your dev loop you can work around this using any of these methods:
- Set `TELEPRESENCE_VERSION` manually to the image's version number. Update that value only when you rebuild the image.
- Always run `make build push-image` so that everything has the same version number, and it pushes the image every time. This is not as slow as you might think; both `go` and `ko` are very good about reusing existing builds and avoiding unnecessary work.
- Have your dev loop revolve around `make check`, which does the correct building, tagging, etc. automatically.

In practice, this is not a big deal. If you get the version numbers correct once and deploy things to the cluster, you can then use Telepresence with a diverging version number against the existing cluster components and they will work fine. This will be most problematic when you need to update the image itself frequently.

In the long run we'll improve this to work more like classic Telepresence, but even there this is not a fully-solved problem. And we can't really use Telepresence to develop Telepresence. At least not yet.

## Filing a pull request

TL;DR: run `go run ./build/file-pr.go` to push the current branch and
launch your web browser to file a PR for that branch.

Why you should use `file-pr.go` instead of just clicking around in
your web browser:

 1. By default GitHub wants to merge pull requests in to the default
    branch (in our case: `master`).  But telepresence.git's default
    branch is telepresence v1, and you need to PR in to the
    telepresence v2 branch (`release/v2`).  That's some extra
    clicking.
 2. We'd like to have a different pull request template for v1 and v2.
    Unfortunately, the only way to accomplish this is to manually add
    a `template=TEMPLATE_FILENAME` query parameter to the URL.

So, `file-pr.go` sets the target branch to `release/v2`, and sets
`template=v2.md`.

## Building for Release

1. Add a `vSEMVER` tag for the new version: `git tag -a v0.x.y -m "Release 0.x.y"`
2. Push the tag to GitHub: `git push origin v0.x.y`
3. Wait for CI to run

## Log output

There are two logs. The `connector.log` which contains output from the interaction with the traffic-manager and the cluster (traffic-manager and traffic-agent installs, intercepts, port forwards, etc.), and the `daemon.log` which contains output from the DNS resolver and the NAT service. The location of both logs is:

- on MacOS: ~/Library/Logs/telepresence
- on Linux: ~/.cache/telepresence/logs

The logs are rotating and a new log is created every time telepresence creates a new connection to the cluster, e.g. on `telepresence connect` after a `telepresence quit` that terminated the last session.

### Watching the logs

A convenient way to watch rotating logs is to use `tail -F <filename>`. It will automatically and seamlessly follow the rotation.

### Debugging early-initialization errors

If there's an error from the connector or daemon during early
initialization, it might quit before the logfiles are set up.  Perhaps
the problem is even with setting up the logfile itself.

You can run the `connector-foreground` or `daemon-foreground` commands
directly, to see what they spit out on stderr before dying:

```console
$ telepresence connector-foreground    # or daemon-foreground
```

If stdout is a TTY device, they don't set up logfiles and instead log
to stderr.  In order to debug the logfile setup, simply pipe the
command to `cat` to trigger the usual logfile setup:

```console
$ telepresence connector-foreground | cat
```

### Debugging rbac issues

If you are debugging or working on rbac-related feature work with telepresence,
it can be helpful to have a user with limited rbac rules / roles.  There are many
ways you can do this, but the way we do it in our tests is like so:
```console
$ kubectl apply -f k8s/client_rbac.yaml
serviceaccount/telepresence-test-developer created
clusterrole.rbac.authorization.k8s.io/telepresence-role created
clusterrolebinding.rbac.authorization.k8s.io/telepresence-clusterrolebinding created

$ kubectl get sa telepresence-test-developer -o "jsonpath={.secrets[0].name}"
telepresence-test-developer-token-<hash>

$ kubectl get secret telepresence-test-developer-token-<hash> -o "jsonpath={.data.token}" > b64_token
$ cat b64_token | base64 --decode
<plaintext token>

$ kubectl config set-credentials telepresence-test-developer --token <plaintext token>
```
This creates a service account, clusterrole, and clusterrolebinding which can be used
with kubectl (`kubectl config use-context telepresence-test-developer`) to work in
a rbac-restricted environment.