text:
# discord-bot

## Requirements
* Go 1.13
* Redis
* Discord account
* IEX Cloud account
* Alpaca account

## Optional
* Docker
* Minikube (or some other Kubernetes cluster host)
* Kubernetes

## ENV
* `cp .env.example .env`
* Fill in `.env` with your credentials
* Get your bot token from discord from [here](https://discordapp.com/developers/applications/me).
* Enable developer mode for Discord then right click channel or user to get ID.
* Grab your test/real tokens from [https://iexcloud.io/console/](https://iexcloud.io/console/)
* Grab your Alpaca ID and SECRET KEY from [https://app.alpaca.markets](https://app.alpaca.markets)

## Kubernetes Secrets
* Create secrets with `kubectl create secrets generic <uri>`
> Create from file is easier `kubectl create secret generic botsecrets --from-env-file=.env`
* Edit secrets with `kubectl edit secrets <uri>`
* View secrets with `kubectl get secret <uri> -o jsonpath='{.data}'`

## Run tests
### Run without docker
Assuming you have exported ENV vars to your shell from .env you can now run tests with:
```
make test
```
### Run with docker compose
Assuming you have filled in the `.env` file you can now run tests with:
```
make test-in-docker
```

## Get it running one of three ways
### Binary
* Export ENV vars in .env to your shell
* Build the binary `make build-discord-bot`
* Run the binary `make run-discord-bot`
* Done

### Docker Compose
* Create a `.env` file see [example](#ENV).
* Build docker image and run compose `make up`
* Done

### Kubernetes
* Create a `.env` file see [example](#ENV).
* Create secrets `kubectl create secret generic botsecrets --from-env-file=.env`
* Create your cluster `minikube start`
* Apply k8s deployment to cluster `kubectl apply -f k8s/k8s.yml`
* Done

#### Docker Hub
For every bot update the docker image needs to be bumped so that Kubernetes can get the latest image.

* Build and tag image `docker build -t jonwho/discord-bot:runbot-v{n} -f Dockerfile.runbot .`
> Where n is the bump number
* Push the image to Docker Hub `docker push jonwho/discord-bot:runbot-v{n}`

## Deployment
### Heroku
1. `heroku create`
2. Define your `heroku.yml` like `heroku.yml.example`
3. Commit heroku.yml
```
git add heroku.yml
git commit -m 'add heroku.yml'
```
4. Set heroku stack to container `heroku stack:set container`
5. Deploy app `git push heroku master`

repository: jonwho/discord-bot

gha_language: Go

repo_name: jonwho/discord-bot


text:
Pattern: Invalid comment pattern

Issue: -

## Description

Specify a pattern for comments.

```css
/*  comment */
/** ↑
 * The pattern of this */
```

## Examples

The following patterns are considered violations:

```css
/*not starting with foo*/
a { color: red; }
```

The following patterns are _not_ considered violations:

```css
/*foo at the beginning*/
a { color: red; }
```

## Further Reading

* [stylelint - comment-pattern](https://stylelint.io/user-guide/rules/comment-pattern)

license: MIT

repository: Adroiti/docs-for-code-review-tools

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: Adroiti/docs-for-code-review-tools


text:
# Weatherly
By Mike Duke and Jonathan Sweet

Built with React and utilizing the Weather Underground API, this app lets a user search for weather data by location and receive the current, 7-hour, and 10-day forecasts.

## Usage
* Get an api key from [weather underground](https://www.wunderground.com/weather/api/)
* Clone down this repo and change in to the directory
  * `git clone https://github.com/JSweet314/Weatherly.git && cd Weatherly`
* Create a directory called `private/` with a file `apiKey.js`
* Within apiKey.js, type `export const apiKey = "YOUR API KEY"`
* Run `npm install`
* Run `npm start` and visit localhost:8080 in your preferred browser.
* To run the test suite - `npm test`
* To run the linter - `npm run eslint`

Welcome Screen
![Finished Welcome Screen](/lib/images/finishedwelcome.png)

Search Results
![Finished Main Page](/lib/images/finishedMain.png)

gha_language: JavaScript

gha_license_id: MIT


text:
# Linear Time Iteration

This repository contains a notebook illustrating the Linear Time Iteration (LTE) Algorithm algorithm of [Pontus Rendahl (2017)](https://www.ihs.ac.at/publications/eco/es-330.pdf) using Julia.

## Notebooks

### I. LTE in a simple setting

https://github.com/JulienPascal/LinearTimeIteration/blob/master/Linear%20Time%20Iteration.ipynb

![alt text](https://raw.githubusercontent.com/JulienPascal/LinearTimeIteration/master/Linear%20Time%20Iteration_50_1.png)

### II. Neoclassical growth model

https://github.com/JulienPascal/LinearTimeIteration/blob/master/Linear%20Time%20Iteration%20Stochastic%20Growth%20Model.ipynb

![alt text](https://raw.githubusercontent.com/JulienPascal/LinearTimeIteration/master/Linear%20Time%20Iteration%20Stochastic%20Growth%20Model_33_0.png)

## References

Rendahl, Pontus. Linear time iteration. No. 330. IHS Economics Series, 2017. (https://www.ihs.ac.at/publications/eco/es-330.pdf)

repository: JulienPascal/LinearTimeIteration

repo_name: JulienPascal/LinearTimeIteration


text:
---
layout: post
title: Lita and creating a recipe handler
comments: true
---

For the past week, I've been playing around with Lita, a chat bot written in Ruby.  Lita works within different chat protocols, irc being one of them. It does this with the help of a plugin which helps to connect to the chat protocol of choice. There are also handler plugins that will do various tasks such as welcome a user, image search in chat, and a karma ranking for popular words.  I decided to get to work on writing my own handler.

It is actually very easy to begin using Lita. The author has very extensive documentation on this which can be found [here](http://docs.lita.io/). After installing and creating the new bot, I installed gems and configured them to work.  What the configuration file does for Lita is let it know how to utilize the plugins.  Here is an example of botfly, my current Lita bot.

{% highlight ruby %}
Lita.configure do |config|
  config.robot.name = "botfly"
  config.robot.adapter = :irc
  config.adapters.irc.server = "irc.freenode.net"
  config.adapters.irc.channels = ["#mostlybotfly"]
  config.adapters.irc.user = "botfly"
  config.adapters.irc.realname = "botfly"
  config.adapters.irc.password = ENV['BOTFLY_PASS']
  config.adapters.irc.cinch = lambda do |cinch_config|
    cinch_config.max_reconnect_delay = 123
  end
  config.redis[:host] = "<IP_ADDRESS>"
  config.redis[:port] = 6379
  config.handlers.karma.term_pattern = /[\[\]\p{Word}\._|\{\}]{2,}|[<:][^>:]+[>:]/
  config.handlers.karma.term_normalizer = lambda do |term|
    term.to_s.downcase.strip.sub(/[<:]([^>:]+)[>:]/, '\1')
  end
  config.handlers.recipe.api_key = ENV['F2F_KEY']
end
{% endhighlight %}

What the above shows is that my bot will be connecting to irc channel #mostlybotfly, login as "botfly" and authenticated with a password. Below this is the connection to the local redis host, special term_pattern for the karma handler, as well as setting the api for my recipe handler. Documentation for various handlers could be find online, but in general they involve sending a command to Lita and getting a response in return.  Below is an example of a handler for Lita that I had fun writing.

The lita-recipe handler will return a random top recipe from Food2Fork.  The idea is that if you are in a chat and looking for a random recipe idea, you can have it on demand.  Lita makes it easy to create handlers and can be quickly created using `lita handler NAME_OF_YOUR_HANDLER`.  For mine, I did `lita handler lita-recipe`. From there, Lita creates a handler ruby file to create the actions to be carried out.  I have provided an example of the lita-recipe code:

{% highlight ruby %}
require 'lita'
require 'net/http'
require 'uri'
require 'multi_json'

module Lita
  module Handlers
    class Recipe < Handler
      config :api_key, required: true
      route(/^recipe/, :recipe, command: true, help: { "recipe" => "random recipe" })

      def recipe(response)
        res = Net::HTTP.get_response(URI("http://food2fork.com/api/search?key=#{api_key}&sort=t"))
        top_list = MultiJson.load(res.body)
        response.reply(top_list["recipes"].shuffle.first["f2f_url"])
      end
      private

      def api_key
        Lita.config.handlers.recipe.api_key
      end

      Lita.register_handler(Recipe)
    end
  end
end
{% endhighlight %}

You can check out lita-recipe on my [github page.](https://github.com/mostlybadfly/lita-recipe)

In the above, the handler is getting a response from Food2Fork's search, using an API key which would have to be provided. After running some rspec tests to make sure the handlers was replying as needed, I completed the gemspec and deployed my first gem to rubygems! It was a little too exciting to be able to include `gem "lita-recipe"` in my gemfile.

Working on Lita so far has helped to reinforce my interest and workflow as a developer.  I hope to create another handler which will evaluate ruby code, much like irb for a chat room.

repository: mostlybadfly/jekyllsite

repo_name: mostlybadfly/jekyllsite


text:
---
layout: default
---

# 1996-07-13 - RE: FW: [RANT] Giving Mind Control Drugs to Children

## Header Data

From: blanc<EMAIL_ADDRESS>To: "'E. ALLEN SMITH'"<EMAIL_ADDRESS>Message Hash: b109dc43650305bce855fed428811d97d9a5993d556bc583e7bf10c989c88b82

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1996-07-13 06:31:28 UTC

Raw Date: Sat, 13 Jul 1996 14:31:28 +0800

## Raw message

```
{% raw  %}From: blanc<EMAIL_ADDRESS>Date: Sat, 13 Jul 1996 14:31:28 +0800
To: "'E. ALLEN SMITH'"<EMAIL_ADDRESS>Subject: RE: FW: [RANT] Giving Mind Control Drugs to Children
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

From: 	E. ALLEN SMITH

	Actually, my Ritalin was one of the things that led me to come to the
conclusion that drug laws were nonsense. It's a Schedule II drug that I never
felt _any_ addiction to; I was off it on evenings, weekends, and during
holidays. So at least in my case it had a pro-libertarian effect.
........................................................................

{% endraw %}
```

## Thread

+ Return to [July 1996](/archive/1996/07)

+ Return to "[blanc <blancw@accessone.com>](/authors/blanc_blancw_at_accessone_com_)"

+ 1996-07-13 (Sat, 13 Jul 1996 14:31:28 +0800) - RE: FW: [RANT] Giving Mind Control Drugs to Children - _blanc<EMAIL_ADDRESS>


text:
ansible-nagios
==============
Playbook for setting up the Nagios monitoring server and clients (CentOS/Rocky/RHEL/Fedora/FreeBSD)

![Nagios](/image/ansible-nagios.png?raw=true)

[![GA](https://github.com/sadsfae/ansible-nagios/actions/workflows/ansible-lint.yml/badge.svg)](https://github.com/sadsfae/ansible-nagios/actions)

## What does it do?
   - Automated deployment of Nagios Server on CentOS7, Rocky 8/9 or RHEL 7/8/9
   - Automated deployment of Nagios client on CentOS6/7/8, RHEL6/7/8/9 or Rocky, Fedora and FreeBSD
     * Generates service checks and monitored hosts from Ansible inventory
     * Generates comprehensive checks for the Nagios server itself
     * Generates comprehensive checks for all hosts/services via NRPE
     * Generates most of the other configs based on jinja2 templates
     * Wraps Nagios in SSL via Apache
     * Sets up proper firewall rules (firewalld or iptables-services)
     * Support sending alerts via email and outgoing webhooks.
     * This is also available via [Ansible Galaxy](https://galaxy.ansible.com/sadsfae/ansible-nagios/)

## How do I use it?
   - Add your nagios server under `[nagios]` in `hosts` inventory
   - Add respective services/hosts under their inventory group, **hosts can only belong under one group.**
   - Take a look at `install/group_vars/all.yml` to change anything like email address, nagios user, guest user etc.
   - Run the playbook.  Read below for more details if needed.

## Requirements
   - CentOS7 or RHEL7/8/9 or Rocky 8/9 for Nagios server only (for now).
   - RHEL6/7/8/9, CentOS6/7/8/9, Fedora or FreeBSD for the NRPE Nagios client
   - If you require SuperMicro server monitoring via IPMI (optional) then do the following
     - Install```perl-IPC-Run``` and ```perl-IO-Tty``` RPMs for RHEL7 for optional IPMI sensor monitoring on SuperMicro.
       - I've placed them [here](https://funcamp.net/w/rpm/el7/) if you can't find them, CentOS7 has them however.
     - Modify ```install/group_vars/all.yml``` to include ```supermicro_enable_checks: true```
   - Please note I'll likely remove IPMI sensor monitoring support because it's a real pain and not that reliable, SNMP with MiB is better.

## Notes
   - Sets the ```nagiosadmin``` password to ```changeme```, you'll want to change this.
   - Creates a read-only user, set ```nagios_create_guest_user: false``` to disable this in ```install/group_vars/all.yml```
   - You can turn off creation/management of firewall rules via ```install/group_vars/all.yml```
   - Adding new hosts to inventory file will just regenerate the Nagios configs

## Supported Service Checks
   - Implementation is very simple, with the following resource/service checks generated:
     - Generic out-of-band interfaces *(ping, ssh, http)*
     - Generic Linux servers *(ping, ssh, load, users, procs, uptime, disk space, swap, zombie procs)*
     - Generic Linux servers with MDADM RAID (same as above)
     - [ELK servers](https://github.com/sadsfae/ansible-elk) *(same as servers plus elasticsearch and Kibana)*
     - Elasticsearch *(same as servers plus TCP/9200 for elasticsearch)*
     - Webservers *(same as servers plus 80/TCP for webserver)*
     - Webservers with SSL certificate checking *(same as webservers plus checks SSL certificate validity/expiration)*
     - DNS Servers *(same as servers plus UDP/53 for DNS)*
     - DNS Servers with MDADM RAID (same as above)
     - DNS Service Only (DNS and ICMP check)
     - Jenkins CI *(same as servers plus TCP/8080 for Jenkins and optional nginx reverse proxy with auth)*
     - FreeNAS Appliances *(ping, ssh, volume status, alerts, disk health)*
     - Network switches *(ping, ssh)*
     - IoT and ping-only devices *(ping)*
     - Dell iDRAC server checks via @dangmocrang [check_idrac](https://github.com/dangmocrang/check_idrac)
       - You can select which checks you want in ```install/group_vars/all.yml```
         - CPU, DISK, VDISK, PS, POWER, TEMP, MEM, FAN
     - SuperMicro server checks via the IPMI interface.
       - CPU, DISK, PS, TEMP, MEM: or anything supported via ```freeipmi``` sensors.
       - *Note: This is **not** the best way to monitor things, SNMP checks are WIP once we purchase licenses for them for our systems
   - ```contacts.cfg``` notification settings are in ```install/group_vars/all.yml``` and templated for easy modification.

## Nagios Server Instructions
   - Clone repo and setup your Ansible inventory (hosts) file
```
git clone https://github.com/sadsfae/ansible-nagios
cd ansible-nagios
sed -i 's/host-01/yournagioshost/' hosts
```
   - Add any hosts for checks in the ```hosts``` inventory
   - The same host can only belong to **one** host inventory category
   - Note that you need to add ```ansible_host``` entries __only__ for IP addresses for idrac, switches, out-of-band interfaces and anything that typically doesn't support Python and Ansible fact discovery.
   - Anything __not__ an ```idrac```, ```switch``` or ```oobserver``` should use the FQDN (or an /etc/hosts entry) for the inventory hostname or you may see this error:
     - ```AnsibleUndefinedVariable: 'dict object' has no attribute 'ansible_default_ipv4'}```

```
[webservers]
webserver01

[switches]
switch01 ansible_host=<IP_ADDRESS>
switch02 ansible_host=<IP_ADDRESS>

[oobservers]
webserver01-ilo ansible_host=<IP_ADDRESS>

[servers]
server01

[servers_with_mdadm_raid]

[jenkins]
jenkins01

[dns]

[dns_with_mdadm_raid]

[idrac]
database01-idrac ansible_host=<IP_ADDRESS>

[supermicro-6048r]
web01-supermicro-ipmi ansible_host=<IP_ADDRESS>

[supermicro-6018r]

[supermicro-1028r]

```
   - Run the playbook
```
ansible-playbook -i hosts install/nagios.yml
```
   - Navigate to the server at https://yourhost/nagios
   - Default login is ```nagiosadmin / changeme``` unless you changed it in ```install/group_vars/all.yml```

## Known Issues

* If you're using a non-root Ansible user you will want to edit ```install/group_vars/all.yml``` setting, e.g. AWS EC2:

```
ansible_system_user: ec2-user
```

* SELinux doesn't always play well with Nagios, or the policies may be out of date as shipped with CentOS/RHEL.
```
avc: denied { create } for pid=8800 comm="nagios" name="nagios.qh
```
   - If you see this (or nagios doesn't start) you'll need to create an SELinux policy module.
```
# cat /var/log/audit/audit.log | audit2allow -M mynagios
# semodule -i mynagios.pp
```
Now restart Nagios and Apache and you should be good to go.
```
systemctl restart nagios
systemctl restart httpd
```
If all else fails set SELinux to permissive until it's running then run the above command again.
```
setenforce 1
```

* If you have errors on RHEL7 you may need a few [Perl packages](https://funcamp.net/w/rpm/el7/) if you opted to include SuperMicro monitoring via:

```
supermicro_enable_checks: true
```

## Mass-generating Ansible Inventory
If you're using something like [QUADS](https://quads.dev/about-quads) to manage your infrastructure automation scheduling you can do the following to generate all of your out-of-band or iDRAC interfaces.

```
quads-cli --ls-hosts | sed -e 's/^/mgmt-/g' > /tmp/all_ipmi_2019-10-23
for ipmi in $(cat all_ipmi_2019-10-23); do printf $ipmi ; echo " ansible_host=$(host $ipmi | awk '{print $NF}')"; done > /tmp/add_oobserver
```

Now you can paste `/tmp/add_oobserver` under the `[oobservers]` or `[idrac]` Ansible inventory group respectively.

## Demonstration
   - You can view a video of the Ansible deployment here:

[![Ansible Nagios](http://img.youtube.com/vi/6vfhflwC_Wg/0.jpg)](http://www.youtube.com/watch?v=6vfhflwC_Wg "Deploying Nagios with Ansible")

## iDRAC Server Health Details
   - The iDRAC health checks are all optional, you can pick which ones you want to monitor.

![CHECK](/image/idrac-check.jpg?raw=true)

   - The iDRAC health check will provide exhaustive health information and alert upon it.

![iDRAC](/image/nagios-idrac.png?raw=true)

## Files

```
.
├── hosts
├── install
│   ├── group_vars
│   │   └── all.yml
│   ├── nagios.yml
│   └── roles
│       ├── firewall
│       │   └── tasks
│       │       └── main.yml
│       ├── firewall_client
│       │   └── tasks
│       │       └── main.yml
│       ├── instructions
│       │   └── tasks
│       │       └── main.yml
│       ├── nagios
│       │   ├── files
│       │   │   ├── check_ipmi_sensor
│       │   │   ├── idrac_2.2rc4
│       │   │   ├── idrac-smiv2.mib
│       │   │   ├── nagios.cfg
│       │   │   └── nagios.conf
│       │   ├── handlers
│       │   │   └── main.yml
│       │   ├── tasks
│       │   │   └── main.yml
│       │   └── templates
│       │       ├── cgi.cfg.j2
│       │       ├── check_freenas.py.j2
│       │       ├── commands.cfg.j2
│       │       ├── contacts.cfg.j2
│       │       ├── devices.cfg.j2
│       │       ├── dns.cfg.j2
│       │       ├── dns_with_mdadm_raid.cfg.j2
│       │       ├── elasticsearch.cfg.j2
│       │       ├── elkservers.cfg.j2
│       │       ├── freenas.cfg.j2
│       │       ├── idrac.cfg.j2
│       │       ├── ipmi.cfg.j2
│       │       ├── jenkins.cfg.j2
│       │       ├── localhost.cfg.j2
│       │       ├── oobservers.cfg.j2
│       │       ├── servers.cfg.j2
│       │       ├── servers_with_mdadm_raid.cfg.j2
│       │       ├── services.cfg.j2
│       │       ├── supermicro_1028r.cfg.j2
│       │       ├── supermicro_6018r.cfg.j2
│       │       ├── supermicro_6048r.cfg.j2
│       │       ├── switches.cfg.j2
│       │       └── webservers.cfg.j2
│       └── nagios_client
│           ├── files
│           │   ├── bsd_check_uptime.sh
│           │   └── check_raid
│           ├── handlers
│           │   └── main.yml
│           ├── tasks
│           │   └── main.yml
│           └── templates
│               └── nrpe.cfg.j2
├── meta
│   └── main.yml
└── tests
    └── test-requirements.txt

21 directories, 43 files

```

repository: sadsfae/ansible-nagios

gha_language: Shell

repo_name: sadsfae/ansible-nagios


text:
---
layout: post
title:      "Rails Project"
date:       2020-07-18 01:27:43 +0000
permalink:  rails_project
---

Wow. Where to begin? I think this project was one of the most challenging project yet I think I have learned so much from this project, especially seeing everything come together and how routes work and how object relate to each other and build it into a real website. Although it is not the perfect app but I think it really helped my growth in the right direction.
I ran into many issues while doing this project that had to be solved one by one.
One of the earlier issues that I ran into was the has_many: :through relationships. I learned that you to have a has_many: relationship before your next line of code and have a has_many::through relationship.
For example.
```
class User < ActiveRecord::Base

    has_secure_password
    validates :name, presence: true
    validates :email, email: true
    validates :email, uniqueness: true
    validates :password, presence: true

    has_many :artworks
    has_many :museums, :through => :artworks

end
```

The user model has to have many artworks before it can know about the museums that these artworks belong in.
It took me a few tries to understand this but it really deepened my understanding when I figured out you could directly called User.Museums because they were related through ActiveRecord.
Another thing that we can see from this code snippet is the validates. I personally think validation is really cool and that i can control a lot of the data that I want. For example a email must be unique and there shouldn't be the same email in my database ever.

I'm going to skip over to the database and talk about migrations. I think some of the rails ability to generate migrations/models were very helpful as well. For example typing in
```
rails g migrations --------
```
really helped me set up a lot of migrations table easily and I can only imagine that having a lot of tables to generate how useful this action really helps.

Now we get to the meat of the project. The CRUD of my controllers.

```
class MuseumsController < ApplicationController
    before_action :verify_user_is_authenticated

    def index
        @museums = current_user.museums

    end

    def new
        @museum = Museum.new
    end

    def create
        @museum = Museum.new(museum_params)
        if @museum.save
            redirect_to museum_path(@museum)
        else
            render :new
        end
    end

    def show
        @museum = Museum.find_by(id: params[:id])
        if @museum
            render :show
        else
            redirect_to museums_path
        end
    end

    def edit
        @museum = Museum.find_by(id: params[:id])
        if @museum
            render :edit
        else
            redirect_to museums_path
        end
    end

    def update
        @museum = Museum.find_by(id: params[:id])
        if @museum
            @museum.update(museum_params)
            redirect_to museum_path(@museum)
        else
            redirect_to museum_path(@museum)
        end
    end

    def destroy
        @museum = Museum.find_by(id: params[:id])
        if @museum
            @museum.destroy
            redirect_to museums_path
        else
            redirect_to museum_path(@museum)
        end
    end

    private

    def museum_params
        params.require(:museum).permit(
            :name,
            :location
        )
    end

end
```

After this project I am so much more comfortable in objects and edition objects and destroying them. Also one of the most important thing from this is the museum_params, which is what we get back from the forms and if we don't permit these tags, we will not be able to create a Museum in my case. So just learning about that was very cool and how to build out a full CRUD for the project helped me learn a lot.

Another important learning through this project was the forms.

```
<%= form_for @user do |f| %>

    <% if @user.errors.any? %>
        <ul>
            <% @user.errors.full_messages.each do |msg| %>
                <li> <%= msg %></li>
            <% end %>
        </ul>
    <% end %>

    <%= f.label :name %>
    <%= f.text_field :name %>

    <%= f.label :email %>
    <%= f.text_field :email %>

    <%= f.label :password %>
    <%= f.password_field :password %>

    <%= f.submit "Create User" %>

<% end %>
```

This produced label name, email and password and a box for user to enter in the information. Also in here was another thing that we learned which is that if there were any errors it would spit out a message telling us what the error was. But this form is what gets passed back to the Controller to create objects and i really liked how simple of a code it is but how powerful it is to generate a lot of crucial information that we needed for our project. Also learned about partials to reduce the coding that we have, I ended making the errors into a partial that way many of my forms can call upon it and use it and it becomes a one liner. It is just another very neat way to refactor the code and it was very cool to see how all that worked.

The last part of the project I would like to talk about is the User/Session Control and authentication systems. I used Facebook Omni Authenticator and I kept running into issues for example it didn't pass a password on and therefore I could not create a User. After that I learned about SecureRandom.hex to generate random passwords to be passed in. However they were not in my originally specified password range of 6-20 characters. It was interesting to debug and solve out all the little bit of tiny issues that I had with omniauth and it was great to see the results come through.

Another important topic has always been sessions, and I thought that after this project I am very comfortable with the ideology of users having sessions and that one should not be able to access certain data unless they are authenticated.

All in all this project was great and I really learned a lot from it, although I ran into a bunch of problems but it all worked out in the end and I enhanced my coding skills!

extension: markdown


text:
## Issue

**Generator Information**:

- Shared with us your `.yo-rc.json` with your prompt responses: ¹
- Did you test with the newest generator? (Y/N) ¹

**Your computer**:

- Operating System where you are using the generator:
- `node` version:
- `npm` version:

**Deployment issues**

If the generated inventories failed to deploy, give us details of:
- your number of VM instances
- operating system and version
- other related relevant information

**Problem description**:

- Expected behavior and what happened instead: ¹
- Logs. If logs are very long, attach them in .zip file or use a paste service: ¹

¹ **Required**

repository: living-atlases/generator-living-atlas

gha_language: Python

gha_license_id: NOASSERTION

repo_name: living-atlases/generator-living-atlas


text:
---
title: Xamarin.Android error XA0127
description: XA0127 error code
ms.date: 08/07/2020
---
# Xamarin.Android error XA0127

## Issue

If you encounter this issue something unexpected happened with the Fast Deployment
native tooling. This is most likely to be a native crash.

## Solution

To work around the issue disable Fast Deployment by setting  `EmbedAssembliesIntoApk = True`
in your .csproj. Or turn off `Fast Deployment` in the IDE. You will still be able to debug
on the device, all the required files will be packaged inside the .apk.

In addition raise an issue at [https://github.com/xamarin/xamarin-android/issues/new/choose](https://github.com/xamarin/xamarin-android/issues/new/choose). Please provide the deployment log and as much detail as possible.

repository: xamarin/xamarin-android

branch_name: refs/heads/main

gha_language: C#

repo_name: xamarin/xamarin-android


text:
# _Pizza Maker_

#### _Select pizza toppings and size, 6/17/2016_

#### By _**Alan Denison**_

## Description

BDD

this program should allow the user to select size of pizza
  input: large
  output large pizza

this program should allow users to create a pizza and select toppings
  input: cheese
  output: pizza with cheese

this program should display a price based on the options selected
  input: large cheese pizza
  output: $19.99

## Setup/Installation Requirements
_Viewable in modern browsers_

## Technologies Used

CSS, Bootstrap, JQuery
### License
MIT/open source license

Copyright (c) 2016 **_Alan Denison_**

repository: alandenison/pizza

repo_name: alandenison/pizza


text:
---
title: Introduction to Calculated Metrics in Customer Journey Analytics
description: In this video, we'll walk through the basics of creating Calculated Metrics in Customer Journey Analytics.
feature: customer journey analytics - calculated metrics
topics:
audience: analyst, marketer
activity: use
doc-type: feature video
team: Technical Marketing
kt: 4448
thumbnail: 31787.jpg

---

# Introduction to [!UICONTROL Calculated Metrics] in Customer Journey Analytics

In this video, we'll walk through the basics of creating [!UICONTROL Calculated Metrics] in Customer Journey Analytics.

>[!VIDEO](https://video.tv.adobe.com/v/31787/?quality=12)

For more information about Customer Journey Analytics, visit the [documentation](https://docs.adobe.com/content/help/en/analytics-platform/using/cja-landing.html).


text:
# Project 8: Capstone: Real Estate Marketplace

## Overview
In this project you will be minting your own tokens to represent your title to the properties. Before you mint a token, you need to verify you own the property. You will use zk-SNARKs to create a verification system which can prove you have title to the property without revealing that specific information on the property.

## Installation
Go to https://nodejs.org to install **node.js** as our develop environment.

## Usage
Install the tools we want:
* Truffle Framework
* Ganache - One Click Blockchain
* MetaMask
* Open Zeppelin
* Interactive zero knowledge 3-colorability demonstration
* Docker
* ZoKrates
* Web3

## Test
`cd` to your project file then run:
`truffle compile`
`truffle test test/TestERC721Mintable.js`
`truffle test test/TestSquareVerifier.js`
`truffle test test/TestSolnSquareVerifier.js`

## Deploy Contracts
`cd` to your project file then run:
`truffle migrate --network rinkeby`

## Contract Addresses and OpenSea MarketPlace Storefront link's
* SolnSquareVerifier Contract Address: 0x81Ddf929097B211E943c2Af6be7Fea99F037c9Bc
* Verifier Contract Address: 0x87C44F957717b74Ee9cc72b933f162f44FDC6617
* OpenSea Marketplace Storefront link's: https://rinkeby.opensea.io/category/capstonev2

## Big Thanks
This project is support by Udacity.


text:
# Credible or not Credible Clients - Default of Credit Card

From a bank’s perspective, one of the most important piece of information about clients is
how willing are they to default? In possession of this banks can set credit limits as well
as interest rates that clients must bear. In addition, it’s fundamental piece to calculate
contingent liabilities on the balance sheet.

## Key Takeaways

1. Default in the previous month is the most important feature to explain customer default, the credit limit also has predictive power, but the relationship is inverse;
2. The importance of gender, age and marriage is secundary compared tow history of payment and credit limit.

### Brief data description

The dataset contains 23 numerical attributes and a binary variable on default credit card payment. There are 30,000 observations, each observation represent one customer record. Finally, the dataset is unbalanced.

## Models

The F1 score was set to evaluate the model for two reasons: (1) It is a well-balanced score that assesses accuracy and recall equally, and since we are interested in a well-balanced
model, it is naturally a good indicator. (2) Since the dataset is unbalanced, accuracy is no longer a good measure of adequacy.

First I tried two ensemble models based on trees because it has no cost to scale and centralize the data. I used `GridSearchCV` to tune the best `RandomForestClassifier` against the best `ExtraTreesClassifier`. These Classifiers have set the baseline score.

Secondly I scaled the data and tried others estimators, I also tried a `VotingClassifier` with `LinearSVC`, `LogisticRegression` and `KNeighborsClassifier`, but at the end no one could bet the `ExtraTreeClassifier`.

Finally, I presented the confusion matrix for the winner classifier. As can be seen, the result is just ok, but should be improved. Two possibilities (1) More data, mainly other social features such as employment, may be helpful. (2) More complex model.

![](./report/confusion.png)

## Reproducibility

DVC pipelines, CML and GitHub actions to track and reproduce the final model.

Find out more in the [report!](./report/report.pdf)


text:
---
layout: default
---

# 1998-01-13 - Re: Talk of Banning Research into Human Cloning

## Header Data

From: "Brian B. Riley"<EMAIL_ADDRESS>To: "CypherPunks List"<EMAIL_ADDRESS>Message Hash: 039f0bcf2cc44fa6f4e74d429eddd36840453eb7c4e6a4ee9cce0e8fdc7c1bda

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1998-01-13 04:08:57 UTC

Raw Date: Tue, 13 Jan 1998 12:08:57 +0800

## Raw message

```
{% raw  %}From: "Brian B. Riley"<EMAIL_ADDRESS>Date: Tue, 13 Jan 1998 12:08:57 +0800
To: "CypherPunks List"<EMAIL_ADDRESS>Subject: Re: Talk of Banning Research into Human Cloning
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

-----BEGIN PGP SIGNED MESSAGE-----

On 1/12/98 3:32 PM, Tim May<EMAIL_ADDRESS> passed this wisdom:

>Any implications for crypto? If Congress can successfully make
>certain types of science illegal, felonizing the search for truth,
>why not a ban on certain types of mathematics research?

 I think many of us are understandably nervous about the mistakes that
could be made in the process of perfecting human cloning. But Tim's
point is well taken, yet another potential 'slippery slope.'

  It also begs the question again of 'are we getting too paranoid?' I
think the nanswer is still "no, not yet", as the Klinton
administration proves to us almost every day it seems.
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQEVAwUBNLroFD7r4fUXwraZAQF9Cwf6AtGeZgKDN3nwY0FMsxoTgwXgalRmjGJT
gqliyEIdYfqcQK/kGTFYvBbcGd0xl1dr+XpmJXvr7ItQ8lrsyyqEozGC2KJGYpJe
7C8nMl/nf49Pd4UcJRNZb86qAdwAB7wERW7nL8aGB5Bzm46tKEeaAS2jrzxVOgIt
z7ysxDd+VNoU2czWrergrhvDjbtnXKjPVcIfwkN0M57SJgdWqIlX/fo5HLuiw8IZ
i/Qg8JsLXJgnWr5ZDgrSRSNgVqmwAaV8980piBGyqY0X9ytOcYdjV197+rz55Hkh
iqzIQm6aQa5BJuDy3p8B44LlICtxFB0XZP1UdgvRCbFWO3YD8P3mOA==
=O6Dk
-----END PGP SIGNATURE-----

Brian B. Riley --> http://members.macconnect.com/~brianbr
  For PGP Keys  <mailto:brianbr@together.net?subject=Get%20PGP%20Key>

   "It's what you learn after you know it all that counts"
           John Wooden

{% endraw %}
```

## Thread

+ Return to [January 1998](/archive/1998/01)

+ Return to "["Brian B. Riley" <brianbr@together.net>](/authors/brian_b_riley_brianbr_at_together_net_)"
+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"

+ 1998-01-13 (Tue, 13 Jan 1998 12:08:57 +0800) - Re: Talk of Banning Research into Human Cloning - _"Brian B. Riley"<EMAIL_ADDRESS>  + 1998-01-13 (Tue, 13 Jan 1998 12:36:59 +0800) - [Announcement: Clonerpunks mailing list](/archive/1998/01/debd371a8699a7aa10cd4a4422a940814972fa47c15db063d21885bfaaad3582) - _Tim May<EMAIL_ADDRESS>


text:
# How to win friends and influence people

## Interesting points

* Retrospectives being done since 1930 :-)
* Dont criticize people, understand them
* If you want honey, dont kick the beehive
* People want to be important and appreciated
* People can even go crazy without appreciation
* Speak no harm, focus on the qualities
* Inspire people so they get eager to do stuff, instead of just commanding
* Find out what people want and care about that
* Everyone is in love with its own name, use this
* Listening to someone is one of the best compliments
* Encourage others to talk about themselves
* Dramatize
* Love the game
* Throw a challenge
* Ask questions, no orders
* Let people save face

## Just thinking on what you are going to say next

I do this all the time and it is awful, the best thing to do is truly listen to
the person, instead of just listening pretty fast until I got my chance to talk.

This is a sign of an inflated ego and wrong sense of self importance.

## People love their own names

Cool history about how a kid with 8 years old convinced all its friends
to find food to its rabbits just by proposing to name the rabbits after them.

Humans do all kind of stuff to get their names on stuff, like libraries and
hospitals. Give them sense of importance by using this.

 I thought being blunt and always criticizing if
something was not ok was better. In part is because if someone do this with me, usually I do
not care, and if I was really wrong, I enjoy it.

But this is another mistake that I'm always making, **people are NOT like me** and I cant expect
them to be. In general people respond to praise.

Praise is harder and more effective than criticizing, I need to think on ways to criticize
that involve praising first. Two interesting techniques:

* Always praise before talking about a mistake, makes it easier
* Talk how I myself have done similar mistakes on the past

repository: katcipis/sophia

repo_name: katcipis/sophia


text:
# Alara Kit

Frontend framework for Alara projects

## Introduction

I recognize there are a plethora of frontend frameworks in the wild currently. But in an effort to keep our projects somewhat uniform, I have created this kit for all Alara projects to start from.

I've opened this to the public, but really, you'll probably get more mileage out of a more commercial framework like [Bootstrap](http://getbootstrap.com) or [Bulma](http://bulma.io).

## Documentation

Eventually, yes...

## License

Alara Kit is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

repository: alaracreative/alara-kit

repo_name: alaracreative/alara-kit


text:
---
title: Describe the spatial extent and resolution of your dataset
layout: bestpractice_cover
tags:
  - describe
  - documentation
  - geospatial
  - location
  - measurement
  - metadata
step:
  - describe
related:
  - choose-and-use
  - consider-the-compatibility
  - use-consistent-codes
update:
  - August 30, 2011
author:
  - Ruth Duerr
organization: DataONE
org_url: http://www.dataone.org
org_logo: DataONE.png
resource: true
categories: ["Best Practice"]
---

The spatial extent of your data set or collection as a whole should be described. The minimum acceptable description would be a bounding box describing the northern most, southern most, western most, and eastern most limits of the data.

- If the entire collection is from a single location, use the same values for northerly/southerly limits and easterly/westerly values.
- Be sure to specify in the metadata what units you choose to describe your spatial extent.
- Use the following guidelines for quality control:
  - If the collection spans the north pole, the northerly limit should be 90.0 degrees
  - If the collection spans the south pole, the southerly limit should be -90.0 degrees
  - If the collection crosses the date line, the westerly limit should be greater than the easterly limit

If your data collection or dataset as a whole contains data acquired over a range of spatial locations during each collection period, it is important to document the spatial resolution of your dataset. Many metadata standards have standard terminology for describing data spacing or resolution (e.g. every half degree, 250 m resolution, etc.), but it may be necessary to describe complex data acquisition schemes textually.

## Description Rationale

Describing the spatial boundaries of a data collection as a whole allows users to assess the collection for applicability to their research needs without having to individually assess the relevance of each individual component of the collection.

## Additional Information

NASA-GCMD (spatial coverage & data resolution): [https://gcmd.nasa.gov/add/difguide/index.html](https://gcmd.nasa.gov/add/difguide/index.html)

## Examples

A data collection consisting of a number of buoys floating in the Arctic ocean might have a spatial extent of...

- Northernmost latitude: 90.0
- Westernmost longitude: -180.0
- Easternmost longitude: 180.0
- Southernmost latitude: 66.0

250m gridded data:

- Data are measured every 250 m along a series of 1 km transects defined in a shape file

gha_language: HTML


text:
# sim-eeros
Hardware Simulator for EEROS

visit http://eeros.org/ and https://github.com/eeros-project

## Available devices
* reflect: reflects input from subdevice channel x to output subdevice channel x

## Usage of simulation blocks

#### simulate digital Output
1. connect digital output from eeros-application to subdevice 0 (REFLECT_OUT_DIGOUT) and desired channel x
2. connect digital test input to subdevice 1 (REFLECT_OUT_DIGIN) and channel x
3. you can read state of digital output at your test input channel

#### simulate digital Input
1. connect intput to subdevice 2 (REFLECT_IN_DIGIN) and channel y
2. connect test output to subdevice 3 (REFLECT_IN_DIGOUT) and channel y
3. read state of your input on test output channel

#### example in EEROS config file
example to test digital output "out0" which can be read on test input "inTest0"
```js
{
    "device0": {
		    "library": "libsimeeros.so",
		    "devHandle": "reflect",
		    "subdevice0": {
			          "type": "DigOut",
			          "channel0": {
				              "signalId": "out0"
			          }
		    },
		    "subdevice1": {
			          "type": "DigIn",
			          "channel0": {
				              "signalId": "inTest0"
			          }
		    }
}
```
for a complete example visit https://github.com/akalberer/eeros-framework/tree/hal/examples/sim
or soon on https://github.com/eeros-project/eeros-framework

## Available subdevices
| Function            | Description                     | Subdevice     | available Channels  |
| --------------------|:------------------------------- |:-------------:| :------------------:|
| Digital Output      | Output to test                  |     0         |        0-10         |
|                     | Reflected test input for EEROS  |     1         |        0-10         |
| Digital Input       | Input to test                   |     2         |        0-10         |
|                     | Reflected test output for EEROS |     3         |        0-10         |
| Analog Output       | Output to test                  |     4         |        0-10         |
|                     | Reflected test input for EEROS  |     5         |        0-10         |
| Analog Input        | Input to test                   |     6         |        0-10         |
|                     | Reflected test output for EEROS |     7         |        0-10         |

### for Developers: add new device type to sim-eeros
1. create class derived from SimBehaviour.hpp
1. implement member functions according to your needs
   * constructor: create your simulation channels
   * run() : implement your desired simulation function -> will be called from SimDevice::run()
   * getInChannel(): return shared_ptr to input channel of your device
   * getOutChannel(): return shared_ptr to output channel of your device
1. add newly created device type as member object to SimDevice.hpp (for example see sim::Reflect<bool> reflectDigOut)
1. call run() of your newly added channels in SimDevice::run(): only with this your device run() is executed
1. add identifier string to available simFeatures in SimDevice.hpp
1. add entries to SubDeviceNumber-Enum in SimDevice.hpp with your desired subdevice number for your sim-device
1. add getInChannel() and getOutChannel() of your device type to getLogicChannel() or getRealChannel() in SimDevice.cpp accordingly

repository: akalberer/sim-eeros

repo_name: akalberer/sim-eeros


text:
---
title: '"Bassel K"'
author: Mark Weidenbaum
section: Collective Memory
layout: book
previous: What Does Freedom Mean to You, Mr. Government?
up: Collective Memory
next: My Friend is Not Free
---

I read _"The Trial"_ at too young an age. It instilled in me many
things, some of them even positive, such as an affection for Franz
Kafka, an aspiration to taut structure, and a desire to tell
stories. It also haunted me, and it does to this day. It imprinted on
me an intense fear of undeserved imprisonment.

I was introduced to the imprisonment of Bassel Khartabil by three
remarkable people: Niki Korth, Jon Phillips, and Barry Threw. They are
in many admirable ways as free as Bassel is not. Each of the trio is
dedicated to their own individual and collective artistic pursuits to
explore the deep potential where technology and culture meet. They
make and celebrate the things that make today a special time.

And they know full well that all is not right in our time. They expend
significant energy in building awareness of the ongoing fact of
Bassel's murky, tragic legal status. At their suggestion, back in
January 2014, I gathered musicians to highlight Bassel's plight. These
musicians participate collectively in something called the Disquiet
Junto. It's a freeform group I moderate that each Thursday responds to
music-composition prompts. The idea behind all the prompts is that
creative constraints, such as those employed in Oulipo and Fluxus, are
a useful springboard for creativity and productivity.

The Junto's fondness for such "constraints" met a fierce complement
when we tackled Bassel's situation, which is that of a most uncreative
form of constraint. There were many ways we could have paid tribute to
Bassel. What we elected to do in the Junto was to keep one of his
projects going: he may be in jail, but his art could continue to
develop. Prior to Bassel's arrest on March 15, 2012, in Damascus, he
was working on several projects. Among them was a three-dimensional
computer rendering of the ancient city of Palmyra. What we in the
Junto did was make "fake field recordings," audio of what the halls of
Palmyra's structures might have sounded like millennia ago. Much as
Bassel was trying to revive an ancient world, the Junto participants
were, in essence, keeping one of his projects alive while he is
incapable of doing so. And, of course, building upon his artistic
efforts was true to the ethos of the Creative Commons, in which Bassel
has been profoundly engaged.

We had no idea, of course, back in early 2014, that Palymra would
itself receive worldwide attention when ISIS, the extremist movement,
would in 2015 move to destroy much of the ancient city's remaining
architectural history, or that, later still, Russian warplanes would
further damage the site. This is one of Kafka's lasting legacies: just
when things seem horrible, they can and do get worse.

Palmyra has fallen. Bassel remains in jail. The challenge to rectify
his situation has long since surpassed the overly employed term
"Kafkaesque." Someone must have been telling lies about Bassel K,
because he is still kept from his freedom. But as long as he is in
prison, there are plenty of people telling his story, and keeping his
work alive.

Marc Weidenbaum publishes a webzine, Disquiet,
about electronic ambient music and has contributed to the scientific
journal Nature upon this subject. He was editor-in-chief for two of
Viz Media's magazines. He lives in San Francisco.

repository: costoffreedom/oldies

gha_language: CSS

repo_name: costoffreedom/oldies


text:
# 🚪 Vue prevent unload

> Vue component that conditionaly prevents page leave/reload

## :art: Playground on the Web

In TODO

## :cd: Installation

This version requires Vue 2.X.
```sh
npm install vue-prevent-unload
```

## :rocket: Usage

```html
<template>
  <PreventUnload :when="hasChanges"/>
</template>
<script>
  import PreventUnload from 'vue-prevent-unload';
  export default {
    data() {
      return {
        hasChanges: true,
      }
    },
    components: {
      PreventUnload,
    }
  }
</script>
```

## :syringe: Tests

In TODO

## :anchor: Semantic Versioning Policy

This plugin follows [semantic versioning](http://semver.org/).

## :newspaper: Changelog

We're using [GitHub Releases](https://github.com/probil/vue-prevent-unload/releases).

## :beers: Contributing

We're more than happy to see potential contributions, so don't hesitate. If you have any suggestions, ideas or problems feel free to add new [issue](https://github.com/probil/vue-prevent-unload/issues), but first please make sure your question does not repeat previous ones.

**Notice:** Don't try to edit files from `dist` as it compiled from `src` by babel and shouldn't be changed manually.

## :lock: License

See the [LICENSE](LICENSE) file for license rights and limitations (MIT).

repository: RubenReyesA/Troya-PWA

repo_name: RubenReyesA/Troya-PWA


text:
# JOINTLY PREDICTION PLANNING EVALUATOR

# Introduction

The prediction module comprises 4 main functionalities: Container, Scenario, Evaluator and Predictor.

The Evaluator predicts path and speed separately for any given obstacle. An evaluator evaluates a path by outputting a probability for it (lane sequence) using the given model stored in prediction/data/.

Jointly prediction planning evaluator is used in the new Interactive Obstacle(vehicle-type) model to generate short term trajectory points which are calculated using Vectornet and LSTM. By considering ADC's trajectory info, the obstacle trajectory prediction can be more accurate under interaction scenario.

![Diagram](images/interaction_model_fig_1.png)

# Where is the code

Please refer [jointly prediction planning evaluator](https://github.com/ApolloAuto/apollo/tree/master/modules/prediction/evaluator/vehicle).

# Code Reading

## Interaction filter
Please refer [interaction filter](https://github.com/ApolloAuto/apollo/tree/master/modules/prediction/scenario/interaction_filter).
1. The interaction filter is a rule-based filter for selecting interactive obstacles.

2. Such interactive obstacles will be labeled.

    ```cpp
    void AssignInteractiveTag();
    ```

## Model inference
1. The encoder of jointly prediction planning evaluator is Vectornet, before model inference, we need to process obstacle and map data into the correct format.


text:
---
uid: crmscript_ref_NSUser_GetDeleted
title: Bool GetDeleted()
intellisense: NSUser.GetDeleted
keywords: NSUser, GetDeleted
so.topic: reference
---

# Bool GetDeleted()

If true, the user is retired and should have no rights, not appear in lists, etc.

**Returns:** Bool

```crmscript
NSUser thing;
Bool deleted  = thing.GetDeleted();
```

repository: stianol/crmscript

repo_name: stianol/crmscript


text:
# Skylines-Multiplayer

This mod is now unmaintaied, currently does not work with the current version of Cities: Skylines

Detour code written by cope. https://github.com/sschoener/cities-skylines-detour

repository: devenlil/Skylines-Multiplayer

repo_name: devenlil/Skylines-Multiplayer


text:
# Operators and bit manipulation

## Operators

A set of symbol and keywords can be used as infix operators
Nim supports operator overloading.

Those symbols are:

```
=     +     -     *     /     <     >
@     $     ~     &     %     |
!     ?     ^     .     :     \
```

The keyword operators are

```
and or not xor shl shr div mod in notin is isnot of as
```

In-particular:
- bitwise and, or, flip, xor are denoted `and`, `or`, `not`, `xor` instead of using a symbol
- shift left and right are `shl` and `shr`
- division and modulo are `div` and `mod`

### Implementation-defined behaviors

`mod` is defined as the mathematical remainder, like C. With signed integers `a mod b` has the same sign as `a`

`shr` of a signed integer will not preserve the sign bit.
`ashr` can be used for arithmetic right shift.

This distinction was introduced recently and may lead to subtle bugs,
also `ashr` relies on the C compiler actually lowering `>>` to SAR for signed integer.
This is specified for GCC and Clang ([https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html#Integers-implementation](https://gcc.gnu.org/onlinedocs/gcc/Integers-implementation.html#Integers-implementation))
but implementation defined in general.

### Operator precedence

Operator precedence is specified described in the manual:

[https://nim-lang.org/docs/manual.html#syntax-precedence](https://nim-lang.org/docs/manual.html#syntax-precedence)

### Additional system operators

Nim system exports additional operators with a `%` like `+%` and `-%`.
Those cast the signed integer operand to unsigned and cast the result back to signed.
This is intended to use with the ByteAddress type for pointer arithmetic

## Bit manipulation

[https://github.com/status-im/nim-stew/blob/master/stew/bitops2.nim](https://github.com/status-im/nim-stew/blob/master/stew/bitops2.nim)

branch_name: refs/heads/stable


text:
# neural-vqa-attention

Torch implementation of an attention-based visual question answering model ([Yang et al., CVPR16][1]).

1. [Train your own network](#train-your-own-network)
    1. [Extract image features](#extract-image-features)
    2. [Preprocess VQA dataset](#preprocess-vqa-dataset)
    3. [Training](#training)
2. [Use a pretrained model](#use-a-pretrained-model)
    1. [Pretrained models and data files](#pretrained-models-and-data-files)
    2. [Running evaluation](#running-evaluation)
3. [Results](#results)

Intuitively, the model looks at an image, reads a question, and comes up with an answer to the question and a heatmap of where it looked in the image to answer it.

The model/code also supports referring back to the image multiple times ([Stacked Attention][1]) before producing the answer. This is supported via a `num_attention_layers` parameter in the code (default = 1).

**NOTE**: This is NOT a state-of-the-art model. Refer to [MCB][7], [MLB][8] or [HieCoAtt][9] for that.
This is a simple, somewhat interpretable model that gets decent accuracies and produces [nice-looking results](#results).
The code was written about ~1 year ago as part of [VQA-HAT][12], and I'd meant to release it earlier, but couldn't get around to cleaning things up.

If you just want to run the model on your own images, download links to pretrained models are given below.

## Train your own network

### Extract image features

Since we don't finetune the CNN, training is significantly faster if image features are pre-extracted. We use image features from VGG-19. The model can be downloaded and features extracted using:

```
sh scripts/download_vgg19.sh
th prepro_img.lua -image_root /path/to/coco/images/ -gpuid 0
```

### Preprocess VQA dataset

Pass `split` as `1` to train on `train` and evaluate on `val`, and `2` to train on `train`+`val` and evaluate on `test`.

```
cd data/
python vqa_preprocessing.py --download True --split 1
cd ..
```
```
python prepro.py --input_train_json data/vqa_raw_train.json --input_test_json data/vqa_raw_test.json --num_ans 1000
```

### Training

```
th train.lua
```

## Use a pretrained model

### Pretrained models and data files

All files available for download [here][10].
- `san1_120000.t7`: pretrained model with 1 attention layer
- `san2_150000.t7`: pretrained model with 2 attention layers
- `params.json`: vocabulary file
- `img_train.h5` & `img_test.h5` (optional): extracted COCO image features using VGG-19
- `qa.h5` (optional): extracted VQA v1.9 features

### Running evaluation

TODO

## Results

**Format**: sets of 3 columns, col 1 shows original image, 2 shows 'attention' heatmap of where the model looks, 3 shows image overlaid with attention. Input question and answer predicted by model are shown below examples.
![](http://i.imgur.com/Q0byOyp.jpg)

More results available [here][3].

### Quantitative Results

Trained on [VQA v1.9][5] `train`, a single attention layer model (SAN-1) gets **53.01** VQA accuracy on `val`.

Other available VQA models are evaluated on VQA v1.0, which is a significantly easier dataset.
For a point of reference, the [Deeper LSTM + Norm I][4] model from [Antol et al., ICCV15][6] gets 51.52 on VQA v1.9 `val`.

#### VQA v1.0

Trained on [VQA v1.0][6] `train`+`val`, SAN-2 gets **59.59** on `test-std`. This is slightly better than the best reported result in the [paper][1] (58.9). For comparison, [MCB][7] gets ~65.4 (66.7 for ensemble), [MLB][8] gets 65.07, [HieCoAtt][9] gets 62.1 and [Deeper LSTM + Norm I][4] gets 58.16.

## References

- [Stacked Attention Networks for Image Question Answering][1], Yang et al., CVPR16
- [Making the V in VQA Matter: Elevating the Role of Image Understanding in Visual Question Answering][11], Goyal and Khot et al., CVPR17
- [VQA: Visual Question Answering][6], Antol et al., ICCV15

## Acknowledgements

- Data preprocessing script borrowed from [VT-vision-lab/VQA_LSTM_CNN][4]

## License

[MIT][2]

[1]: https://arxiv.org/abs/1511.02274
[2]: https://abhshkdz.mit-license.org/
[3]: https://computing.ece.vt.edu/~abhshkdz/neural-vqa-attention/figures/
[4]: https://github.com/VT-vision-lab/VQA_LSTM_CNN
[5]: http://visualqa.org/download.html
[6]: http://arxiv.org/abs/1505.00468
[7]: https://github.com/akirafukui/vqa-mcb
[8]: https://github.com/jnhwkim/MulLowBiVQA
[9]: https://github.com/jiasenlu/HieCoAttenVQA
[10]: https://computing.ece.vt.edu/~abhshkdz/neural-vqa-attention/pretrained/
[11]: https://arxiv.org/abs/1612.00837
[12]: https://computing.ece.vt.edu/~abhshkdz/vqa-hat/

repository: BenJamesbabala/neural-vqa-attention

repo_name: BenJamesbabala/neural-vqa-attention


text:
# Inspector Plugin for Craft CMS

This plugin adds a helpful `inspect` method to your Craft templates. This will help you
see in the dark - figure out what kind of variables you are dealing with, and what methods
they implement.

## Installation

1. Upload this directory to `craft/plugins/inspector/` on your server.
2. Enable the plugin under *Craft Admin > Settings > Plugins*

## Usage

You can use inspector either as a function or filter:

    {{ craft.request | inspect }}
    {{ inspect(craft.request) }}

Either way, it will return the same output:

    Craft\HttpRequestVariable
    -------------------------

    Attributes:

    Methods:
        getFirstSegment
        getLastSegment
        getParam
        getPost
        getQuery
        getSegment
        getSegments
        getServerName
        getUri
        getUrl
        getUrlFormat
        isSecure

Aha! We can see this variable has some useful methods on it. Let's dig deeper:

    {{ craft.request.getSegments | inspect }}

This returns:

    Array: ["blog","2012","11","my-post-title"]

Now we're getting somewhere! No more digging around in the documentation trying to figure out
what's available to you.

The output is wrapped in `<pre>` tags to format it nicely.

## Developers

Add support for Inspector to your plugins! Simply add a `getHelpText` method to your models,
and it will be displayed when people inspect your object. For example:

    class PizzaModel extends BaseModel
    {
        public function getHelpText()
        {
            return "This variable represents a pizza.";
        }
    }

When people inspect your object, they will now see:

    Craft\PizzaModel
    ----------------
    This variable represents a pizza.

    Attributes:

    Methods:


text:
# Dropbox
Dropbox for CodePath

Submitted by: Diana Nedkova

## Project Requirements
* [x] User can tap through the 3 welcome screens.
* [x] User can follow the create user flow.
      * On the create user form, the user can tap the back button to go to the page where they can sign in or create an account.
      * Before creating the account, user can choose to read the terms of service.
      * After creating the account, user can view the placeholders for Files, Photos, and Favorites as well as the Settings screen.
      * User can log out from the Settings screen.
* [x] User can follow the sign in flow.
      * User can tap the area for "Having trouble signing in?"
      * User can log out from the Settings screen.
* [x] Optional: Add a detail view for one of the files and implement favoriting the file. Configure a Button
* [ ] Optional: Add UITextFields for the forms so you can actually type in them and handle dismissing the keyboard. Dismissing the Keyboard
* [x] Optional: You should be able to swipe through the welcome screens instead of just tapping them.
      * Create a custom free form view controller that is wide enough for 4 screens. Creating Custom View Controllers, Creating a Free Form View Controller
      * Add a UIScrollView with paging enabled.
      * Add 4 UIImageViews for the welcome screens

## Video Walkthrough

Here's walkthrough demos of implemented user stories:

GIF created with [LiceCap](http://www.cockos.com/licecap/).

## License

    Copyright [2016] [Diana Nedkova]

    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: dnedkova/Dropbox

repo_name: dnedkova/Dropbox


text:
# Installation

## As an SPM package

To install SwifterLog type the following:

    $ git clone https://github.com/Balancingrock/SwifterLog

This will create a directory SwifterLog with the project contained in it.

Go down in the directory that was created:

    $ cd SwifterLog

Then perform a SPM build.

    $ swift build

## Adding to an Xcode project

In the Xcode project using the navigator panel select the target SwifterLog should be added to.

Then select the `General` tab and click the `+` sign of the `Frameworks, Libraries, and Embedded Content` section.

In the dropdown window select `Add Other...` and choose `Add Package Dependency...`.

In the new dropdown window type `https://github.com/Balancingrock/SwifterLog.git` and click `Next`, `Next` and `Finish`.

Now use `import SwifterLog` in each source file where you need its capabilities.

## Optional removal of Ascii, BRUtils, VJson and SwifterSockets dependency

By default SwifterLog also needs Ascii, BRUtils, VJson and SwifterSockets for the networking target. If the networking target is not needed, that code can be excluded by adding an Active Compilation Condition:

In the xcode project, the SwifterLog framework target, select the `Build Settings` and under `Swift Compiler - Custom Flags` add `SWIFTERLOG_DISABLE_NETWORK_TARGET` to the `Active Compiler Conditions`.

Also remove the Ascii, BRUtils, VJson and SwifterSockets from the `Linked Frameworks and Libraries` settings under the `General` tab for the SwifterLog target.

repository: Balancingrock/SwifterLog

gha_language: Swift

repo_name: Balancingrock/SwifterLog


text:
# OpenShift Python Cartridge
This cartridge is documented in the [Cartridge Guide](http://openshift.github.io/documentation/oo_cartridge_guide.html#python).

repository: getupcloud/origin-server

gha_language: Ruby

repo_name: getupcloud/origin-server


text:
# Notes on go
- First write the HTTP Client library for EBS.
- Fields validation issue.
- The good thing in w http.ResponseWriter is that i can, at anytime, just raise 400s! I mean, WOW!
- router handler, such that you'd transfer your request into it.
- multiple response.WriteHeader calls. I totally got that. Now fixing.
- store the incoming request into a EndpointFields handler so you can decode/encode it multiple times. Good
in case you need to do logging/further validation with the request body.
- parse EBS response body since they don't use proper HTTP codes. You have to parse that off the response body. I will
a slice for that. The good thing is, EBS response is not nested, so I will only search for `responseCode == 0` in the
request body and just either return 200 (if true), or 400 if wrong.
- Horray! My idea, about this project is to experiment with writing microservices in go; both of which I'm learning. Turns out,
the exact idea of building layers on top of each other's for every service is what gokit is doing. Which is really cool!
- properly use environmental variables to handle e.g., EBS url and other parameters
- i don't like the amount of DRY i'm violating here.
    - I already have skeleton handler for sending to EBS.
    - Now, i need to make another skeleton to handle the rest of

- what does our endpoint handler do?
- check for the request fields
- pass them over onto the next layer, in this case to EBS

## Notes on the current implementation
Well, it is really simple and I shouldn't be worried about it that much. But...

- I can chain gin handlers, and using c.Next(), I can give the control onto the other one
- each handler accepts only gin.Contect object, which captures everything about the request
- the request body is a stream. It is consumed *only* once and then it gets emptied.
- the request body is `Unmarshalled` into a request field template, one for each endpoint
- and then, if succeeded, will be passed onto EBS Client
- EBSClient accepts (gin.Context, url), for:
    - gin.Context to return http responses
    - url to call the appropriate EBS endpoint
- Handle the response messages. They are not clean at all
- Handle the cases where the client didn't send any request!

# Let's move towards a new layer
- add Redis

repository: adonese/noebs

repo_name: adonese/noebs


text:
# The Firebase Client implementation
```FirebaseAuthClient implements AuthClient``` which enables you easily
to change the implementation. So if you're not sure what to use yet and
want to get started with firebase, this is a good thing todo.
At the moment it supports:
* Email/Password Login
* Google Login
* Facebook Login
* Twitter Login

## 1. Setup
* Add the dependency
```gradle
implementation 'com.andretietz.auth:client-firebase:X.Y.Z'
```
* Create a firebase project using the [firebase console](https://console.firebase.google.com).
* Add an Android application to the project
* Enable the auth-providers you need in the console.
* Download the google-services.json put it into your app directory [(see documentation)](https://developers.google.com/android/guides/google-services-plugin)
* Add the google services plugin in your root gradle:
```gradle
classpath 'com.google.gms:google-services:3.1.2'
```
* Apply the plugin in the apps build.gradle on the bottom of the file
```gradle
apply plugin: 'com.google.gms.google-services'
```

## 2. Create a UserFactory
In order to use this client implementation you need to implement the
```UserFactory``` interface. This interface provides in one method
the FirebaseUser object as soon as available and will return any type
of user you need in your app.
i.e.:
```kotlin
class FirebaseUserFactory @Inject constructor() : UserFactory<User> {
    override fun createUser(firebaseUser: FirebaseUser): User {
        return User(
                firebaseUser.uid,
                firebaseUser.email,
                firebaseUser.phoneNumber,
                firebaseUser.displayName ?: firebaseUser.email ?: "User",
                firebaseUser.photoUrl.toString()
        )
    }
}
```

## 3. Create an instance

```kotlin
val userFactory = YourUserFactoryImplementation()
val authClient = FirebaseAuthClient(userFactory)
```

## Ready to go

```
authClient.signUp(facebookCredentials)
    .subscribe{ userOfMyUserType -> updateUI(userOfMyUserType)}
```


text:
---
date: '2003-05-22T02:01:00-04:00'
old:
  layout: post
  oldcategories:
  - openbsd
  status: published
  timestamp: 02:01 AM Thursday, May 22, 2003 EDT
  wordpress_id: '99'
oldtags:
- ipv6
- howto
slug: openbsdandipv6minihow-to
tags:
- openbsd
- howto
- ipv6
title: OpenBSD and IPv6 Mini How-To
url: /weblog/2003/05/22/openbsdandipv6minihow-to/
---

After some mucking around, I've gotten IPv6 and OpenBSD to play nicely
together.  Furthermore, I've got my OpenBSD box acting as a router for my other
computers behind it, as such they all have globally addressable ipv6 addresses
now too.  I got a lot of help from Carl Brewer's page on [making a 6bone router
using OpenBSD](http://rollcage.bl.echidna.id.au/IPv6/openbsd.html), but needed
to do some small modifications to account for the changes between OpenBSD 2.8
and OpenBSD 3.3.

Here is the basic overview of what I needed to for this to happen.  Step 1 is
to set up an IPv6 tunnel.  There are a variety of services that can do this for
you, I'm using [TunnelBroker](http://www.tunnelbroker.net/) from [Hurricane
Electric](http://www.he.net/) (good people, they've been long time supporters
of [PHP](http://www.php.net/)).

When you register on TunnelBroker, they'll need information about your IPv4
endpoint.  Fortunately, I have a static IP address.  I'm not real sure how well
this would work if I didn't.  So let's just hope that you have a static IP
address (I may have to work around that when I move in a few months).  After
registering your endpoint, it will take up to 24 hours for the tunnel to be set
up (this is in contrast to places like [freenet6](http://www.freenet6.net/)
where you can get instant set ups, but my pings here seem to be lower, and you
get more options here).

After your tunnel is initialized, log back into TunnelBroker and look at the
example configuration.  Select OpenBSD from the list.  This should give a
configuration something like this:

    ifconfig gif0 giftunnel <IP_ADDRESS> <IP_ADDRESS>
    ifconfig gif0 inet6 alias 2001:470:1F00:FFFF::3B1 2001:470:1F00:FFFF::3B0 prefixlen 128
    route -n add -inet6 default 2001:470:1F00:FFFF::3B0

You can feel free to run those commands right away.  Also make sure you paste
those at the end of your **/etc/rc.local** configuration file.  You'll also
want to make sure that you've got a line to start rout6d in there too.  I have
this hunk of code in mine:

    # IPv6 Information
    echo -n ' setting up IPv6 to he.net'
    ifconfig gif0 giftunnel <IP_ADDRESS> <IP_ADDRESS>
    ifconfig gif0 inet6 alias 2001:470:1F00:FFFF::3B1 2001:470:1F00:FFFF::3B0 prefixlen 128
    route -n add -inet6 default 2001:470:1F00:FFFF::3B0
    route6d

At this point you can try a ping6 to the other endpoint, which is the second
set of numbers up there.

    ping6 2001:470:1F00:FFFF::3B0

If your ping6 went through, you're in really good shape to get your own /64
subnet.  This is a MAMMOTH amount of address space, but hey, it's IPv6.  Go to
the page on TunnelBroker and select /64 Allocation.  Then just click submit,
you can leave the fields blank for now until you set up ipv6 dns (which will be
covered in another writeup).

The page will reload and it will contain text similar to this:
`Assigned Prefix: 2001:470:1F00:572::/64`

This is your /64 address space allocation from Hurricane Electric.  Requests
for nodes on that subnet (which has a number of nodes equal to the square of
the TOTAL number of IPv4 nodes) will be routed to your OpenBSD box.  The next
step is to set up an ethernet interface to have an IPv6 address. In this case I
chose to give device ne1, which is my internal network interface, an IPv6
address.  This is what my **/etc/hostname.ne1** now looks like:

    inet <IP_ADDRESS> <IP_ADDRESS> NONE
    inet6 alias 2001:470:1F00:572::1 64

The first line is the normal IPv4 address that I use for routing everything and
talking to all my nodes that are natted.  The second line sets up an alias for
IPv6.  While IPv6 does have this really cool concept of stateless
autoconfiguration, we're not going to use it here because this will be a
router.  So I've chosen to give this interface the first address in my IPv6
address space.  The 64 indicates how many bits in my subnet, in this case, 64.
A reboot or a quick running of **/etc/netstart ne1** will bring the device up.
If you run a **ifconfig ne1** you should see something like this:

    ne1: flags=8863<UP,BROADCAST,NOTRAILERS,RUNNING,SIMPLEX,MULTICAST> mtu 1500
            address: 00:80:ad:1b:cd:b7
            media: Ethernet manual
            inet <IP_ADDRESS> netmask 0xffffff00 broadcast <IP_ADDRESS>
            inet6 fe80::280:adff:fe1b:cdb7%ne1 prefixlen 64 scopeid 0x1
            inet6 2001:470:1f00:572::1 prefixlen 64

If you see the last line with your address, you should be good to go.  The
second to the last line is the link identifier, but we're not going to worry
about that right now.  Unfortunately, we're not quite ready to test our
connection yet.  We need to set up the system so it does routing of IPv6
packets.  To do this you need to set the following lines in
**/etc/sysctl.conf**:

    net.inet6.ip6.forwarding=1      # 1=Permit forwarding (routing) of packets
    net.inet6.ip6.accept_rtadv=0    # 1=Permit IPv6 autoconf (forwarding must be 0)

These two options are mutually exclusive.  You can't do auto configuration and
also do routing, which makes sense, routers are supposed to have static
addresses.

Now we get to muck around in **/etc/rc.conf** and set some more options.  Here
are the ones that are important:

    rtadvd_flags=ne1        # for normal use: list of interfaces
                            # be sure to set net.inet6.ip6.forwarding=1
    route6d_flags=""        # for normal use: ""
                            # be sure to set net.inet6.ip6.forwarding=1
    rtsold_flags=NO         # for normal use: interface
                            # be sure to set net.inet6.ip6.forwarding=0
                            # be sure to set net.inet6.ip6.accept_rtadv=1

These options should make the route advertisement daemon start at boot time.
The last step you should have to do is to configure rtadvd.  You can do this by
editing **/etc/rtadvd.conf** and inserting text similar to this:

    ne1:\
            :addrs#1:addr="2001:470:1F00:572::":prefixlen#64:tc=ether:

Where you'll want to change ne1 to the proper device that you gave an ip to
earlier and add to whatever your /64 allocation from TunnelBroker is.

Now, all you need to do is reboot and you should be good to go (you could start
up everything manually, but rebooting is just as easy).  Now go back to
TunnelBroker and select connectivity and try to ping the IP address you just
created.  If all goes well, it should work.

If for some reason it doesn't work, you might have very tight rules for pf.
Placing these rules in should help out some (see [yesterday's article for more
on building a proper
firewall](http://patrick.wagstrom.net/weblog/archives/000124.html)):

    pass in quick proto 41 from any to any
    pass out quick proto 41 from any to any

Now comes the true test.  I've got a linux box (running a heavily modified
version of RedHat 7.3) behind my OpenBSD router.  If you have an IPv6 module
ready for your kernel you should be able to run **modprobe ipv6** and then your
devices connected to your OpenBSD router will immediately get IP addresses.
Here's what the output of **ifconfig eth0** looks like for me:

    eth0      Link encap:Ethernet  HWaddr 00:01:02:39:A5:67
              inet addr:<IP_ADDRESS>  Bcast:<IP_ADDRESS>  Mask:<IP_ADDRESS>
              inet6 addr: 2001:470:1f00:572:201:2ff:fe39:a567/64 Scope:Global
              inet6 addr: fe80::201:2ff:fe39:a567/10 Scope:Link
              UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:9259 errors:0 dropped:0 overruns:0 frame:0
              TX packets:14256 errors:0 dropped:0 overruns:0 carrier:0
              collisions:21 txqueuelen:100
              RX bytes:2440576 (2.3 Mb)  TX bytes:2228114 (2.1 Mb)
              Interrupt:10 Base address:0xe800

The second inet6 line should be an IPv6 address.  If everything went as planned
you should be able to go back to TunnelBroker and do a ping6 to that address
and it should work.  Furthermore, browsing the web will now use IPv6 if
possible.  This will get you the coveted [dancing kame](http://www.kame.net/).

Later on I'll post a more in depth article on getting applications running
under OpenBSD and Linux with IPv6.

**Update:** I've completed my [overview of IPv6 applications](/2003/05/22/ipv6applications/).


text:
# Script on Docker Events

[![Build Status](https://travis-ci.com/meowfaceman/script-on-docker-events.svg?branch=master)](https://travis-ci.com/meowfaceman/script-on-docker-events)

Script on Docker Events is a small utility that will execute a set of commands when a Docker event occurs.
I made this to automate a few things on my Unraid server. Rather than maintain your own Docker container for
specific applications on Unraid, this should allow you to rely on the existing community applications without
having to create your own Docker containers to bake in whatever automation you want to add.

## Requirements

* go 1.15+
* bash

## Configuration

The event processing config consists of:

* A free-form identifier for the event. This is for your use, so you should make this as descriptive as you
  need.
* An object type. This corresponds to Docker object types from events, which can be seen in more detail
  [here](https://docs.docker.com/engine/reference/commandline/events/). Note that, on this page, the object
  types are listed as plural (containers, images) but in actuality they are singular (container, image)
* An action which corresponds to a Docker event action. This describes what action has occurred to the
  object type. A few example object type/action pairs would be: `container:start`, `image:pull`.
* A list of commands to run. These will be passed as an argument to `bash -c <command>` and will be run
  asynchronously.

At present, the Docker client is only configurable via the environment.

### Initialization event

There is a special event that can be added to the config called "init." If you label the type and action as
"init," it will be executed prior to any other events. The commands run as part of init are synchronous to ensure
that any following command execute as expected.

## Subcommands

### echo-config

```
script-on-docker-events echo-config --config <config-file>
```

echo-config will take your config file and just echo a processed version of it to standard out. This is
useful for ensuring that things are being parsed as expected.

### process-events

```
script-on-docker-events process-events --config <config-file> [--start-minutes-ago <number>]
```

process-events will take your config and actually monitor docker events and run the configured commands.
By default, process-events will examinute the previous 5 minutes of events on startup. This is to avoid race conditions
where this utility starts up slightly after an intended target container and misses the actual event as it happens.
This time can be adjusted using the `--start-minutes-ago` argument.

repository: mdwn/script-on-docker-events

repo_name: mdwn/script-on-docker-events


text:
# rpcxdump

A tcpdump-like tool to capture rpcx tcp packets for debugging [rpcx services](https://github.com/smallnest/rpcx).

You **do not** need to modify/restart any existed services. One thing what you need is to copy this tool to the server and begin to dump.

It is convenient to debug communication between rpcx services and clients.

run it as :

```sh
go build -o xdump .
./xdump -c <IP_ADDRESS>:8972 -p -color
```

or

```sh
go run github.com/smallnest/rpcxdump
```

If you use win10, you should install [npcap](https://nmap.org/npcap/#download) for pcap.dll, the [win10pcap](http://www.win10pcap.org/) can not capture loopback device such as <IP_ADDRESS>.

## Notice

~~For windows users, you must install [winpcap](https://www.winpcap.org/install/) or nmap or wireshark for using wpcap.dll.
And you can't capture loopback address such as <IP_ADDRESS> in Windows.~~

It looks pcap can't capture the local packets in Windows

![](snapshoot.png)

repository: smallnest/rpcxdump

repo_name: smallnest/rpcxdump


text:
# Elastix--container Docker

This docker image provides [elastix](https://elastix.lumc.nl/) a toolbox for rigid and nonrigid registration of images.

Elastix is distributed under [an Apache 2.0 license](https://github.com/SuperElastix/elastix/blob/develop/LICENSE)

## Usage

This is a bare docker providing the an installed elastix environment.

repository: Svdvoort/docker-images

repo_name: Svdvoort/docker-images


text:
hubot-github-compare
====================

> Return Github comparison URL for 2 branches/releases on a specified repo

```
Hubot> hubot compare me user/repo develop 1.0.1
Hubot> https://github.com/user/repo/compare/develop...1.0.1
```

If you set the `HUBOT_GITHUB_USER` environmental variable, hubot will assume any repos that *are not* namespaced are in your user or org account.

`export HUBOT_GITHUB_USER=markhuge`

```
Hubot> hubot compare me hubot-github-compare develop master
Hubot> https://github.com/markhuge/hubot-github-compare/compare/develop...master
```

repository: mal/hubot-github-compare

repo_name: mal/hubot-github-compare


text:
[![license](https://img.shields.io/badge/LICENSE-CC0%201.0%20Universal-green.svg)](https://creativecommons.org/publicdomain/zero/1.0/)

## I want to contribute

Please read our [contributing guidelines](contributing.md) and open a [pull-request](https://help.github.com/articles/about-pull-requests/).

## Software Libraries

* C#
    * [openair](https://github.com/hzexe/openair) - National air quality data acquisition library (Chinese)

* NodeJS
    * [openaq](https://github.com/nickolasclarke/openaq) - _A JS client for the OpenAQ API_

* Python
    * [atmospy](https://github.com/quant-aq/atmospy)  - _visualization and analysis tools for air quality data in python_
    * [bme680-python](https://github.com/pimoroni/bme680-python) - _Python library for the BME680 gas, temperature, humidity and pressure sensor._
    * [py-licor](https://github.com/quant-aq/py-licor) - _Python logging software for the Licor 840 CO2/H2O analyzer_
    * [py-openaq](https://github.com/dhhagan/py-openaq) - _python wrapper for the OpenAQ API_
    * [py-quantaq](https://github.com/quant-aq/py-quantaq) - _A python wrapper for the QuantAQ RESTful API_
    * [py-opcsim](https://github.com/dhhagan/opcsim) - _Python library to simulate OPCs and Nephlometers under different conditions_
    * [py-smps](https://github.com/quant-aq/py-smps) - _Python library for the analysis and visualization of data from a Scanning Mobility Particle Sizer (SMPS) and other similar instruments (SEMS, OPC's)._
    * [python-aqi](https://github.com/hrbonz/python-aqi) - _A library to convert between AQI value and pollutant concentration (µg/m³ or ppm)_
    * [The QuantAQ CLI](https://github.com/quant-aq/cli) - _QuantAQ command line interface_
    * [quantpy](https://github.com/wacl-york/quant-air-pollution-measurement-errors) - _Provides tools for visually evaluating low-cost air quality sensors_
    * [sensortoolkit](https://github.com/USEPA/sensortoolkit) - _Air Sensor Data Analysis Library_

* R
    * [AirBeamR](https://github.com/aq-sensors/airbeamR) - An interactive data tool to visualize and work with AirBeam, OpenAQ, and PurpleAir data
    * [AirMonitor](https://github.com/MazamaScience/AirMonitor) - _Utilities for working with air quality monitoring data_ [CRAN](https://cran.r-project.org/web/packages/AirMonitor/index.html)
    * [AirSensor](https://github.com/MazamaScience/AirSensor)  - _Utilities for working with data from PurpleAir sensors_[CRAN](https://cran.r-project.org/web/packages/AirSensor/index.html)
    * [openair](https://github.com/davidcarslaw/openair) - _Tools to analyse, interpret and understand air pollution data. Data are typically hourly time series and both monitoring data and dispersion model output can be analysed. Many functions can also be applied to other data, including meteorological and traffic data._ [CRAN](https://cran.r-project.org/web/packages/openair/index.html)
    * [openairmaps](https://github.com/davidcarslaw/openairmaps) - _mapping functions to support openair_ [CRAN](https://cran.r-project.org/web/packages/openairmaps/index.html)
    * [Purple Air Data Merger](https://github.com/SebAire/Purple-Air-Data-Merger) - _Merges and corrects Purple Air SD Card Data_
    * [quantr](https://github.com/wacl-york/quant-air-pollution-measurement-errors) - _Provides tools for visually evaluating low-cost air quality sensors_
    * [sensortoolkit](https://github.com/gmiskell/sensortoolkit) - _A collection of R scripts for managing an air quality sensor network

* Rust
  * [openaq-client](https://github.com/igncp/openaq-client) - Unofficial Open Air Quality API Client written in Rust [crate](https://crates.io/crates/openaq-client)

## Hardware drivers / software

* C
    * [Embedded SGP Drivers for Sensirion Gas Sensors](https://github.com/Sensirion/embedded-sgp)
    * [Embedded i2c Driver for Sensirion Particulate Matter Sensors](https://github.com/Sensirion/embedded-sps)
    * [Embedded SCD Drivers for Sensirion CO2 Sensors](https://github.com/Sensirion/embedded-scd)
    * [LibreCO2](https://github.com/danielbernalb/LibreCO2)

* C++
    * [Nova Fitness SDS dust sensors arduino library](https://github.com/lewapek/sds-dust-sensors-arduino-library)
    * [PMS](https://github.com/fu-hsi/PMS) - _Arduino library for Plantower PMS x003 family sensors._
    * [Sensirion SPS30 driver for ESP32, SODAQ, MEGA2560, UNO, ESP8266, Particle-photon on UART OR I2C coummunication](https://github.com/paulvha/sps30)
    * [Arduino library for Sensirion SCD4x sensors](https://github.com/Sensirion/arduino-i2c-scd4x)
    * [Embedded UART Driver for Sensirion Particulate Matter Sensors](https://github.com/Sensirion/embedded-uart-sps)

* Python
    * [Software to read out Sensirion SCD30 CO₂ Sensor values over I2C on Raspberry Pi](https://github.com/UnravelTEC/Raspi-Driver-SCD30)
    * [Sentinair](https://github.com/domenico-suriano/SentinAir) - _A flexible tool for data acquisition from heterogeneous low-cost gas sensors and other devices_

* Rust
    * [Rust library with common functionality for I2C sensors](https://github.com/Sensirion/sensirion-i2c-rs)

repository: openaq/awesome-air-quality

repo_name: openaq/awesome-air-quality


text:
---
Video: "Behind the Scenes of a Hackathon"
categories: multimedia
---

As this [video](https://youtu.be/Oo207nA5mbo) demonstrates, thrice-yearly hackathons at LLNL provide 24-hour opportunities to brainstorm, foster creativity, prototype, and explore. Participants work in groups or individually to learn new skills, languages, and tools. Many hackers use the time to use open-source tools and contribute to the open-source community.


text:
# homebrew-corge

Homebrew test tap for rpath issues. Look at how use of `@rpath` and `LC_RPATH` affects brew installed packages.

repository: drbenmorgan/homebrew-corge

repo_name: drbenmorgan/homebrew-corge