text:
Installing Open vSwitch for OVN
-------------------------------
OVN is currently in development mode and as such there is no released packages
available for direct installation. The installed ipam (described later) and the
ovn-controller should be based off the same code base. You can install it from
source using the mentioned commit below. For e.g., on a Ubuntu 14.04 system,
you can install it with:

```
sudo apt-get install -y autoconf libtool sparse openssl pkg-config make gcc libssl-dev git
git clone https://github.com/openvswitch/ovs.git
cd ovs
./boot.sh
./configure --prefix=/usr --localstatedir=/var  --sysconfdir=/etc --enable-ssl --with-linux=/lib/modules/`uname -r`/build
make -j3
make install
cp debian/openvswitch-switch.init /etc/init.d/openvswitch-switch
insmod ./datapath/linux/openvswitch.ko
insmod ./datapath/linux/vport-geneve.ko
insmod ./datapath/linux/vport-stt.ko
/etc/init.d/openvswitch-switch start
```

Installing Neutron client for OVN
---------------------------------
OVN integration with containers uses OpenStack network APIs. On each host where
you plan to run your containers, install python-neutronclient. For e.g., on
a Ubuntu 14.04 system, you can install it from source with:

```
git clone https://github.com/openstack/python-neutronclient.git
cd python-neutronclient
easy_install -U pip
apt-get install python-dev
pip install -r requirements.txt
python setup.py install
```

Running OVN in the overlay mode
-------------------------------

To better understand OVN's integration with containers in the "overlay"
mode, this document explains the end to end workflow with an example.
(The examples here have been run on a Ubuntu 14.04 machines.)

* Start a IPAM container on a separate host. This container is responsible to
provide IP address and MAC address for your containers and acts as
a central point for your OVN system.
(The ipam is actually a containerized OpenStack Neutron, with OVN plugin
and daemons.  So the same apis that work for OpenStack Neutron, work here too.
The container runs mysql, rabbitmq and OVS daemons. Since the command
below asks you to run the container with '--net=host', it is ideal
if you do not have mysql, rabbitmq and OVS daemons running in the
host already.)

```
docker run -d --net=host --name ipam openvswitch/ipam:v2.4.90 /sbin/ipam
```

Once you start your container, you can do a 'docker logs -f ipam' to see
whether the ipam container has started properly. You should see a log
message of the following form to indicate a successfull start.

```
oslo_messaging._drivers.impl_rabbit [-] Connecting to AMQP server on localhost:5672
neutron.wsgi [-] (670) wsgi starting up on http://<IP_ADDRESS>:9696/
INFO oslo_messaging._drivers.impl_rabbit [-] Connected to AMQP server on <IP_ADDRESS>:5672
```

Note down the IP address of the host. This document referes to this IP address
in the remainder of the document as $IPAM_IP.

* On each host, where you plan to spawn your containers, you will need to
create an Open vSwitch integration bridge.

```
ovn-integrate create-integration-bridge
```

You will also need to set the IPAM server's IP address

```
ovn-integrate set-ipam $IPAM_IP
```

You will also need to provide the local IP address
via which other hosts can reach this host. This IP address
is referred as the local tunnel endpoint.

```
ovn-integrate set-tep $LOCAL_IP
```

By default, OVN uses Geneve tunnels for overlay. If you prefer to
use STT tunnels (which are known for high throughput capabilities when
TSO is turned on in your NICs), you can run the following command.

```
ovn-integrate set-encap-type stt
```

And finally, start the ovn-controller.
```
ovn-controller --pidfile --detach -vconsole:off --log-file
```

* Initialize OVN for the VM in question.

```
ovn-container init --bridge br-int --overlay-mode
```

* Create a logical network and provide the subnet from which
the IP address is assigned to that network.

```
ovn-container net-create ls0 <IP_ADDRESS>/24
```

The above command returns a uuid for that network.

* View all the available networks.

```
ovn-container net-list
```

* Create a port (or endpoint) in the network 'ls0', with an optional port name
'ls0p0'

```
ovn-container endpoint-create ls0 ls0p0
```

The above command returns a uuid for that port. Internally it assigns
an IP address and mac address for that port.

* View all the created endpoints.

```
ovn-container endpoint-list
```

* Create a network container to setup networking with the uuid(or name) of the
endpoint passed as the argument to '--network'. You can add multiple
endpoints to the container by repeating the '--network' command.

```
ovn-container container-create --network=ls0p0
```

The above command returns back the created network container id, referred in
the next step as $NETWORK_CONTAINER.

* Start your main container and ask it to attach to the just created
network container. e.g.:

```
docker run -d --net=container:$NETWORK_CONTAINER  ubuntu /bin/sh -c "while true; do echo hello world; sleep 1; done"
```

The above command returns back the CONTAINER_ID. You can enter the container
to look at the assigned IP and MAC addresses. You can also do any ping tests to
check network connectivity. To enter the container, run:

```
docker exec -it $CONTAINER_ID bash
```

* After you stop your container, you can delete the created endpoint with:

```
ovn-container endpoint-delete ls0p0
```

While deleting the endpoint, if it is noticed that the previously created
network container does not have any endpoints associated with it anymore,
it is deleted automatically.

* If you do not have a need for the created network, you can delete it with:

```
ovn-container net-delete ls0
```

Running OVN in the underlay mode
--------------------------------

To better understand OVN's integration with containers in the "underlay"
mode, this document explains the end to end workflow with an example. This
document assumes that the user is familiar with OpenStack.

* A OpenStack tenant creates a VM with a single network interface that
belongs to a management logical network.  The VM is meant to host containers.

* The OpenStack tenant needs to fetch the port-id associated with the
spawned VM. This can be obtained by running a 'nova list' to fetch the
'id' associated with the VM and then by running the command
'neutron port-list --device_id=$id'

* Inside the VM, download the OpenStack RC file that contains the tenant
information. Edit the file and add the previously obtained port-id information
to the file by appending the following line.
export OS_VIF_ID=$id

Now, source the file: e.g:
source username-openrc.sh

* Your VM will have one ethernet interface (e.g.: 'eth0'). You will need to
add that device as a port to an Open vSwitch bridge and move its IP address
and route related information to that bridge. For example, assuming that
your device is 'eth0, you could run:

```
ovn-integrate nics-to-bridge eth0
```

The above command will move the IP address and route information of 'eth0'
to 'breth0'.

If you use DHCP to obtain an IP address, then you should kill the
DHCP client that was listening on the physical Ethernet interface
(e.g. eth0) and start one listening on the Open vSwitch bridge
(e.g. breth0).

* Initialize OVN for the VM in question.

```
ovn-container init --bridge breth0 --underlay-mode
```

* From here-on the workflow is the same as that for the "overlay" mode
(as described in the section "Running OVN in the overlay mode"). You
can use the "net-create", "net-list", "net-delete", "endpoint-create",
"endpoint-delete", "container-create" commands.


text:
# inbloom
--
    import "github.com/EverythingMe/inbloom/go/inbloom"

Package inbloom implements a portable bloom filter that can export and import
data to and from implementations of the same library in different languages.

## Installation
```bash
go get github.com/EverythingMe/inbloom/go/inbloom
```

## Usage

#### type BloomFilter

```go
type BloomFilter struct {
}
```

BloomFilter is our implementation of a simple dynamically sized bloom filter.

This code was adapted to Go from the libbloom C library -
https://github.com/jvirkki/libbloom

#### func  NewFilter

```go
func NewFilter(entries int, errorRate float64) (*BloomFilter, error)
```
NewFilter creates an empty bloom filter, with the given expected number of
entries, and desired error rate. The number of hash functions and size of the
filter are calculated from these 2 parameters

#### func  Unmarshal

```go
func Unmarshal(data []byte) (*BloomFilter, error)
```
Unmarshal reads a binary dump of an inbloom filter with its header, and returns
the resulting filter. Since this is a dump containing size and precisin
metadata, you do not need to specify them.

If the data is corrupt or the buffer is not complete, we return an error

#### func  UnmarshalBase64

```go
func UnmarshalBase64(b64 string) (*BloomFilter, error)
```
UnmarshalBase64 is a convenience function that unmarshals a filter that has been
encoded into a url parameter

#### func (*BloomFilter) Add

```go
func (f *BloomFilter) Add(key string) bool
```
Add adds a key to the filter

#### func (*BloomFilter) Contains

```go
func (f *BloomFilter) Contains(key string) bool
```
Contains returns true if a key exists in the filter

#### func (*BloomFilter) Len

```go
func (f *BloomFilter) Len() int
```
Len returns the number of BYTES in the filter

#### func (*BloomFilter) Marshal

```go
func (f *BloomFilter) Marshal() []byte
```
Marshal dumps the filter to a byte array, with a header containing the error
rate, cardinality and a checksum. This data can be passed to another inbloom
filter over the network, and thus the other end can open the data without the
user having to pass the filter size explicitly. See Unmarshal for reading these
dumpss

#### func (*BloomFilter) MarshalBase64

```go
func (f *BloomFilter) MarshalBase64() string
```
MarshalBase64 is a convenience method that dumps the filter's data to a base64
encoded string, ready to be passed as an GET/POST parameter

repository: AlexStocks/inbloom

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: AlexStocks/inbloom


text:
{
  "date" : "2019-10-11",
  "author" : {
    "display_name" : "Kashif Iqbal"
  },
  "draft" : "false",
  "toc" : true,
  "title" : "TNEF",
  "description":"Learn about TNEF file format and APIs that can create and open TNEF files.",
  "linktitle" : "TNEF",
  "menu" : {
    "docs" : {
      "parent" : "email"
    }
  },
  "lastmod" : "2019-09-10"
}

## What is a TNEF file?

Transport Neutral Encapsulation Format (TNEF) is a Microsoft proprietary, for encapsulating email attachments based on Messaging Application Programming Interface (**MAPI**). Microsoft Outlook and Microsoft Exchange Server, entirely support TNEF while later decodes TNEF into MAPI and displays the formatted mails. An email attachment with TNEF encoding has a MIME type of MS-TNEF and stores as winmail/win.dat. The attachment in winmail .dat encapsulates the following information:

|Message|OLE objects|Outlook features
---|---|---|
|

Original  message attachments

Original formatted version

fonts, text sizes, and text colors

|

embedded pictures

embedded Office documents

|

custom forms

voting buttons

meeting requests

Other email services who are not TNEF supportive, present plain text for TNEF formatted messages. Outlook embed a rich format of the message in TNEF files (OLE) or particular Outlook features (forms, polling buttons, and conference requests). Sanctioning explicit TNEF encoding within the Outlook e-mail client is not possible, however, Opting RTF format for dispatching an e-mail implicitly facilitates TNEF encoding.

## TNEF File Format

The TNEF data algorithm establishes a flattened structure from rich hierarchical message properties. These flattened structures then use to represent a serial data stream composed of particular properties.

In some situations, where properties occur in groups or have multiple-values, stream might include counts and paddings to enforce a specific data alignments. A distinctive situation where the use of this algorithm is advantageous is in an unsupportive messaging environment. In such environments, a rich message property is encoded into a serial data stream by a TNEF Writer. Further, the properties that do not belongs to the underlying TNEF can be encapsulated during transmission. These encapsulated properties then made available by decoding through a TNEF to ensure the availability of all properties of the original message to the client application.

In TNEF all numeric data types are little-endian and their size are greater than one byte. Handling of these numeric values on non-little-endian platforms require to accomplish the appropriate transformations to get correct values. String values are represented in Augmented Backus-Naur Form (ABNF) format according to [RFC5234] specifications. When the string terminates with null character, it is also included as well; for example<EMAIL_ADDRESS>%x00.

{{
}}

## TNEF Attributes and Processing rules ##

The data stream in TNEF begins with a legacy version number, a signature, a primitive key value, and an attribute represent code page. This code page is generated when encoder records ANSI attributes and properties. After that, the stream became a series of attributes in which message attributes lined first and then followed by attachment attributes. Different message and attachment characteristics are contained in special attributes like attMsgProps, attAttachment, and attRecipTable. The attributes that appear in the TNEF stream, contain the structure, message properties and conversions necessary to engage them with message properties. Each attribute consist of an ID, size and data of the attribute, a checksum and a level according to its application.

## Relationship to Protocols and Other Algorithms ##

The systems that have poor mechanism to display rich message format natively need TNEF data algorithm for transport. Using the media type ms-TNEF, the output of the algorithm consists of an attachment file (winmail.dat) and a body part of MIME specified in [RFC2045]. The plain text message body is transmitted using UUENCODE according to [MSDN-UAF] specification and this message body or equivalent method decoded at the recipient end. Moreover, TNEF can transmit message data using different internet protocols like SMTP, POP3, IMAP4, and the ones, integrate MIME according to RFC2045 standard.

## Applicability Statement ##

In addition to simple message transmission, the original application of TNEF was to be created to use message classes and support additional features that have no original support in transport protocol. This application was further refined for the transmission of rich message properties and named properties that modern messaging clients use now a days. For compliance with original implementation, original attribute syntax is maintained and a special attribute holds the new message properties separately.

## References

* [Transport Neutral Encapsulation Format](https://en.wikipedia.org/wiki/Transport_Neutral_Encapsulation_Format)
* [Email addresses and address books in Exchange Server](https://docs.microsoft.com/en-us/exchange/email-addresses-and-address-books/email-addresses-and-address-books?view#exchserver-2019)
* [[MS-OXTNEF]: Transport Neutral Encapsulation Format (TNEF) Data Algorithm](https://msdn.microsoft.com/en-us/library/cc425498(v#exchg.80).aspx)

license: MIT

gha_language: Mathematica

gha_license_id: MIT


text:
## Plan

1. Create header <!-- Done -->
2. create Rock, Paper, Scissors title <!-- Done -->
3. Create a score box <!-- Done -->

4. Create main div where we will nest everything from section. <!-- Done -->
5. Create a section where we put our Rock, Paper, Scissors buttons <!-- Done -->
6. Create buttons for the Rock, Paper, Scissors using the images provided using HTML. <!-- Done -->
7. Style the buttons in CSS. <!-- Done -->
8. Create Results Section where it's going to show the results when player and computer choose.
9. Create JavaScript onClick() event listener for Rock, Paper, Scissors buttons.
10. In JavaScript create syntax for what the player and the computer chooses.
11. When click on the RPS button, we need to hide the buttons and the display the actual winner.
12. Create Play Again button after the results show in the results section.

13. Create footer
14. Create Rules button
15. Create JavaScript onClick() event listener for Rules button

branch_name: refs/heads/main


text:
---
title: Secure Data Exchange Using Distributed Ledger Technologies
authors:
- matthiasdittberner
date: 2019-11-04
tags:
- Talks
categories:
- Talks
# image:
#   placement: 1
#   caption: 'Sample x ray from BBC.co.uk [1]'
#   focal_point: ""
#   preview_only: false
projects: []
---

Secure data exchange and integration is essential in medical informatics as it
enables and accelerates evidence based medicine. Therefore we are very
interested in related topics. Last October we invited Lucas Antelo as an external
speaker. During his talk he presented the outcome of his bachelor thesis "Secure
Data Exchange Using Distributed Ledger Technologies".

Lucas studied medicine at University Hospital Zurich followed by a computer
science degree at Freie Universität Berlin.

In the German healthcare sector, data are exchanged among patients, healthcare
service providers and facilities, insurance companies as well as private and
public institutions for services, research and billing. For the majority of
these interactions, paper remains the de facto standard and costs all
participants time, resources and money. Today, people are mobile and move more
frequently from one city to another, where they usually seek healthcare related
services. Patients and healthcare service providers possess a fragmented medical
history, which is spread among many different locations. Consequently,
healthcare service providers encounter difficulties concerning how to deliver
the best possible treatment based on the incomplete information provided by the
client during each visit. This impedes the healthcare system ability to be
efficient and cost effective. Distributed ledger technologies (DLT) promise to
solve this problem and consequently reduce time, resources and energy for the
exchange of data. In recent years, new DLT solutions emerged that suit specific
business use cases such as finance, supply chains and healthcare, which
facilitate the adoption of this novel technology. In this thesis, the respective
laws, regulations, data and processes in the healthcare industry are analyzed.
In addition, a requirement analysis based on interviews with a health insurance
company, two clients and two healthcare service providers are performed to build
the foundation for the study of suitable DLT solutions in the healthcare
industry. The thesis concludes that Hyperledger Fabric (HLF), with its modular
architecture, fulfills the majority of the requirements as well as laws and
regulations. This shows that HLF solves inherent problems found in the healthcare
industry. This technology implements access control lists for data access,
transactions, and moreover, allows the creation of software programs, known as
chaincode, to automate secure data exchange procedures. This thesis results in
the creation of a blueprint and a prototype as a data exchange grid for the
healthcare industry. The prototype uses a three-tier software architecture with
HLF as the main data layer and a modular web application as the logic layer
using NodeJS.

You can find the full thesis here: [Secure Data Exchange Using Distributed Ledger Technologies](https://github.com/basacul/Mana/raw/master/documents/Bachelor_Thesis_Final_Version.pdf)

repository: uzh-dqbm-cmi/lab-website

gha_language: TeX

repo_name: uzh-dqbm-cmi/lab-website


text:
# Circular List Queues

The idea behind a circular list queue is that you will have a list of a given size and that will be the size of your queue

Here's a graphic to demonstrate this:
![][enqueue-dequeue]

For example, a queue of size 4 would look like this:

| 0 | 1 | 2 | 3 |
|:-:|:-:|:-:|:-:|
|   |   |   |   |

front=0
end=0

If you were to call *queue.enqueue(5)*, the resulting list will look like this

| 0 | 1 | 2 | 3 |
|:-:|:-:|:-:|:-:|
| 5 |   |   |   |

front=0
end=1

Another call of *queue.enqueue(2)* would result in

| 0 | 1 | 2 | 3 |
|:-:|:-:|:-:|:-:|
| 5 | 2 |   |   |

front=0
end=2

However, one thing to be sure of is that dequeueing should also increment your front
A call of *queue.dequeue()* will result in

| 0 | 1 | 2 | 3 |
|:-:|:-:|:-:|:-:|
|   | 2 |   |   |

front=1
end=1
returned 5

[enqueue-dequeue]: https://upload.wikimedia.org/wikipedia/commons/thumb/5/52/Data_Queue.svg/405px-Data_Queue.svg.png


text:
---
title: "The best of MEM, must read fridays - wk2207 ."
header:
  teaser: mustread-512-384.jpg
author: Kim Oppalfens
date: 2022-02-11
categories:
  - MEM
tags:
  - SCCM
  - ConfigMgr
  - Intune
  - MEM
---

This post highlights the most interesting blogs, tweets and articles I've read relating to MEM in the past week.

# Intro #

I figured I'd try and start something new. To stay up-to-date on what's happening in the MEM and Windows management realm I read a ton of stuff. A serious amount of community effort and a similar amount of items Microsoft puts out. The amount of things being put out is all incredibly valuable, and covers all types of knowledge depth imaginable. On a weekly basis I am going to try and shine a light on some of those items that I personally believe you must read. I'll equally add my view as to why I believe this is something you should probably look into. Items appear in random order.

## Item 1 ##
Peter doesn't use the word awesome lightly, in this post he calls the Windows Update for Business deployment service awesome, not once, but twice. And he's absolutely right, the Windows Update for Business deployment service covers a serious gap for those organizations that have asked for more control over cloud based patching. [Getting started with the Windows Update for Business deployment service]
(https://www.petervanderwoude.nl/post/getting-started-with-the-windows-update-for-business-deployment-service/)

## Item 2 ##
Because it's a pet peeve of mine. The amount of portals Microsoft has is borderline insane. That's just me putting it nicely, you could easily lose the borderline part in the previous sentence. The problem with that is operational, remembering them all is next to impossible. There's equally a security part to that overload of portals. If an admin doesn't know about which portals he needs to use, than he is more susceptible to fall into a credential phishing scam with all the potential damage related to that.
I'd like fewer portals and have all of them end in .microsoft.com to avoid that latter scenario. This post is claiming success on reducing the amount of portals and moves a portal to a name that ends in .microsoft.com and that makes me happy. (That's what you have with pet peeves.)
[All Microsoft Defender for Identity features now available in the Microsoft 365 Defender portal](https://techcommunity.microsoft.com/t5/security-compliance-and-identity/all-microsoft-defender-for-identity-features-now-available-in/ba-p/3130037)

## Item 3 ##
A tool, but not just any tool, [a tool to troubleshoot hybrid azure ad join issues] (https://docs.microsoft.com/en-us/samples/azure-samples/dsregtool/dsregtool/). I am sure that, just like me, several people have spend an abundant amount of time trying to figure out why a device doesn't register. The Device Registration troublehsooter tool should, at the very least, reduce the time needed to spend on that significantly. I haven't had the need to actually test it, but the tests covered are pretty extensive. Would have missed this if it wasn't for Mark pointing to it on [twitter](https://twitter.com/markmorow/status/1449031114408951810)

url: https://raw.githubusercontent.com/kimoppalfens/kimoppalfens.github.io/db30928578c91359be89f4232e9f454f4b68629a/_posts/2022-02-18-The best of MEM - must read fridays wk72022.md


text:
# Xcode Snippets
A collection of snippets to speed up development when using Xcode.

## Installation Instructions
Copy snippet files into `~/Library/Developer/Xcode/UserData/CodeSnippets/`

Whenever files are added or removed from this folder, we need to restart Xcode for them to take effect.

## Background
A little known feature of Xcode is the "Code Snippet Library" that allows you to reuse small chunks of code. As well as the built-in snippets, you can also create your own by dragging a highlighted code block into the library.

![Xcode Code Snippet Library User Interface Pane](images/xcode-code-snippet-library-ui.png)

These snippets can also contain placeholders that can be tabbed through and filled in when used, as shown below:

![Private lazy variable example](images/private-lazy-var.png)

## Usage
Code snippets are used by either dragging the snippet out of the Snippet Library, or using code completion when typing in the Xcode editor.

## Examples
Creating a delegate protocol:

![Typing dele into Xcode text editor](images/delegate-typing.png)
![Resulting code snippet inserted with placeholders](images/delegate-snippet-result.png)

Conform to `UITableViewDataSource` in an extension:

![UITableViewDataSource methods in extension](images/table-view-data-source-extension.png)

repository: axtonpitt/xcodesnippets

repo_name: axtonpitt/xcodesnippets


text:
# Aragon Nest

![](../design/artwork/Nest/01.png)

> **A grants program to support the development of the ecosystem.**

Aragon Nest is brought to you by your friends at [Aragon](https://aragon.one) and [Placeholder](https://twitter.com/placeholdervc).

The goal of the program is to attract talent to research and build the necessary tooling for developing solutions around Aragon and Ethereum.

### More information
- Check out the [**Nest repo**](https://github.com/aragon/nest) to read and participate
- Read the public announcement [**Introducing Aragon Nest**](https://blog.aragon.one/introducing-aragon-nest-1aa8c91c0566)
- Read the [**Launch of Aragon Nest**](https://blog.aragon.one/launch-of-aragon-nest-8d42d1a37595) post
- Discussion regarding the program at [**#nest channel in Aragon Chat**](https://aragon.chat/channel/nest)
- Browse the current [**proposals for grants**](https://github.com/aragon/nest/issues)
- Browse the current [**requests for funding**](https://github.com/aragon/nest/pulls)

repository: serejandmyself/aragon-wiki

repo_name: serejandmyself/aragon-wiki


text:
Local Deployment Steps
----------------------

To build the workshop image locally using `docker` you would run:
```
docker build -t openshiftv4-devday .
```

To run the image, you would then use:

```
docker run --rm -p 10080:10080 openshiftv4-devday
```

Open URL in web browser

```
http://localhost:10080/dashboard/
```

gha_language: Shell


text:
# Introduction
In this notebook, you will build a deep neural network that functions as part of an end-to-end machine translation pipeline. Your completed pipeline will accept English text as input and return the French translation.

# Setup

This project requires GPU acceleration to run efficiently. Support is available to use either of the following two methods for accessing GPU-enabled cloud computing resources.

## Amazon Web Services

Please refer to the Udacity instructions for setting up a GPU instance for this project, and refer to the project instructions in the classroom for setup. The recommended AMI should include compatible versions of all required software and libraries to complete the project. [link for AIND students](https://classroom.udacity.com/nanodegrees/nd889/parts/16cf5df5-73f0-4afa-93a9-de5974257236/modules/53b2a19e-4e29-4ae7-aaf2-33d195dbdeba/lessons/2df3b94c-4f09-476a-8397-e8841b147f84/project)

## Install
- Python 3
- NumPy
- TensorFlow 1.x
- Keras 2.x

"""
Clone the repository, and navigate to the downloaded folder.

git clone https://github.com/udacity/aind2-nlp-capstone

cd aind2-nlp-capstone

Create (and activate) a new environment with Python 3.5 and the numpy package.

conda create --name aind-nlp-capstone python=3.5 numpy
source activate aind-nlp-capstone
Install/Update TensorFlow.

pip install tensorflow==1.1 -U
Install/Update Keras.

pip install keras -U
Switch Keras backend to TensorFlow.

KERAS_BACKEND=tensorflow python -c "from keras import backend"
Start Jupyter: jupyter notebook --no-browser

Look at the output in the window, and find the line that looks like the following:
Copy/paste this URL into your browser when you connect for the first time to login with a token:
http://<IP_ADDRESS>:8888/?token=3156e...
Copy and paste the complete URL into the address bar of a web browser (Firefox, Safari, Chrome, etc). Press Enter.

Click on machine_translation.ipynb. Follow the instructions in the notebook.

"""""""
Submission

# Submission
When you are ready to submit your project, do the following steps:
1. Ensure you pass all points on the [rubric](https://review.udacity.com/#!/rubrics/1004/view).
2. Submit the following in a zip file:
  - `helper.py`
  - `machine_translation.ipynb`
  - `machine_translation.html`

## Converting to HTML

There are several ways to generate an HTML copy of the notebook:

 - Running the last cell of the notebook will export an HTML copy

 - Navigating to **File -> Download as -> HTML (.html)** within the notebook

 - Using `nbconvert` from the command line

    $ pip install nbconvert
    $ nbconvert machine_translation.ipynb


text:
# Parmelia lanata var. subciliata Nyl. VARIETY

#### Status
SYNONYM

#### According to
Index Fungorum

#### Published in
Flora, Jena 51: 346 (1868)

#### Original name
Parmelia lanata var. subciliata Nyl.

### Remarks
null

repository: mdoering/backbone

path: /life/Fungi/Ascomycota/Lecanoromycetes/Lecanorales/Parmeliaceae/Pseudephebe/Pseudephebe pubescens/ Syn. Parmelia lanata subciliata/README.md

repo_name: mdoering/backbone


text:
Temporary README - final version will be directed to user consumption

The scenario for OpsMgr discovery will be very simple:
- we'll have "discovery provider" plugins that need to be installed (similarly to device plugins and inventory hooks)
- we'll have 2 apis added to the opsmgr CLI:
list_supported_provider_plugins - returns the registered types for provider plugins that were installed via the procedure above
import_data - iterates over all registered provider plugins and calls the import_data defined from the interface/abclass they inherit (IProviderPlugin)

The first available provider plugin will be the CobblerProviderPlugin.
For sprint 1 its implementation will be very simple. It will query cobbler to list all "system" elements defined in its database. Each of these elements will be a "device" which data we'll import from Cobbler and then call add_device in opsmgr.
The plugins is only reading the ip_address of the device right now and adding it as a "BareMetal" type of device.
For sprint 2 I'll enhance the plugin to read other things such as:
user/pwd or sshkey from Genesis configuration
OS type from Cobbler data - if Ubuntu, the device will be added as type 'Ubuntu' instead, to mean that this node is ready to be configured via OpenStackAnsible
mac_address - if ip_address is not available but mac_address is, and no OS type is available, we'll use type as "BareMetal" to mean that this node can be configured via Cobbler
a BLOB with all the rest of the data imported from Cobbler

repository: open-power-ref-design-toolkit/opsmgr

repo_name: open-power-ref-design-toolkit/opsmgr


text:
aptly Docker image
==================

## Contents

This image consists of debian:stable-slim + aptly.

## Usage

```
$ docker run -d -v '/root/.gnupg:/root/.gnupg:rw' whitestar/aptly
or
$ sudo mkdir /var/lib/aptly
$ docker run -d -v '/root/.gnupg:/root/.gnupg:rw' -v '/var/lib/aptly:/aptly-data:rw' whitestar/aptly
```

## Configurations

- `/etc/aptly.conf`: configuration file.
- `/root/.gnupg`: for GNU PG signing.
- `/aptly-data`: persistent volume.
- `8080`: distribution service port.
- `8081`: REST API service port.
- `sandbox` repository: default dummy repository.

## License and Authors

- Author:: wdstar at github.com

```text
Copyright 2017-2018, wdstar

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: wdstar/aptly-image

repo_name: wdstar/aptly-image


text:
wordpress-setup
===============

A typical wordpress setup. This could be setup for themes or plugins. The idea here, is to use the src directory to create either a theme or a plugin, then utilize composer for external dependencies, and do automated testing on the src stuff

This assumes that ant, npm, and composer are available globally on the machine. There are a number of articles written on how to accomplish this.

repository: corycollier/wordpress-setup

repo_name: corycollier/wordpress-setup


text:
# rmapshaper (development version)

* Added a more proactive startup message regarding old v8 engines, as the new
  bundled mapshaper library will not work with libv8 < 8.1.307.30 (#140).
* Added pkgdown site at https://andyteucher.ca/rmapshaper/
* Setting `force_FC = TRUE` no longer adds a `rmapshaperid` id column. `force_FC`
  is also better respected across functions and methods; previously it was
  somewhat inconsistent (#151).

# rmapshaper 0.5.0

This is a fairly major release with much of the internal plumbing changed. I have tried to keep user-facing changes to a minimum, but please report any issues to https://github.com/ateucher/rmapshaper/issues.

* Switched to using the `geojsonsf` package instead of `geojsonio` for object conversion (#118).
* Updated the bundled mapshaper version to `v0.6.25` (#130).
* Dropped support for `geojson_list` objects. This was a rarely-used class from the `geojsonio` package (#118).
* Arguments `force_FC`, `sys`, and `sys_mem` are now passed to `apply_mapshaper_commands` via `...` rather than explicitly, so they are now documented in the `...` section of each function. This may break some existing code if you were passing values to these arguments by position rather than by name, especially using `force_FC` in `ms_simplify` as it was not at the end of the argument list. It may also change the class of the return value for some input classes and functions (such as `ms_lines` and `ms_innerlines`) as `force_FC` will inherit the default `TRUE` for all functions.
* Added `quiet` argument to silence mapshaper console messages when using `sys = TRUE`. This can be controlled globally with `options("mapshaper.sys_quiet" = TRUE)` (#125).
* Added ability to globally set the system memory when using the system mapshaper via `options("mapshaper.sys_mem"=X)`, where `X` is the amount of memory in GB.

# rmapshaper 0.4.6

* Fixed a long-standing issue where `units` columns in `sf` objects would cause failures; all numeric columns of class `"units"` are now converted to numeric before running through mapshaper commands. (#116, thanks @Robinlovelace)
* Added a default value for `force_FC` in `apply_mapshaper_commands()`. The default value is `TRUE` (#120, thanks @dblodgett-usgs)
* Documentation fix in `check_sys_mapshaper()` - fixed description of return value (#117, thanks @dblodgett-usgs).
* Included an example of setting memory allocation when using the system mapshaper in README (#114, thanks @baldeagle).

# rmapshaper 0.4.5

* Fixed a bug where functions would fail when there was a space in user's `tmpdir()`
path and `sys = TRUE` (#107)
* Updated bundled mapshaper library to v 0.4.163, which fixed a bug in `ms_erase` (#110, #104, #112)
* When `sys = TRUE`, now uses `mapshaper-xl` in the system call, allowing
larger memory use. Default 8GB can be specified in new argument `sys_mem` (#94, #112)
* Internally switched to using `system2()` over `system()` for flexibility

# rmapshaper 0.4.4

* Small fixes for compatibility with sf >= 0.9

# rmapshaper 0.4.3

* Add checks, a package startup message, and helpful errors for the case when
  a user has an old version of `libv8` installed, as they do not support many
  aspects of modern JavaScript (ES6). This appears to only impact `ms_erase()`
  and `ms_clip()`.
* Using `apply_mapshaper_commands()` no longer deletes a file when used on a local file (#99, #100)

# rmapshaper 0.4.2

* Added `rgdal` to `Suggests` so `ms_clip` and `ms_erase` can transform
 `Spatial*` objects when they have different CRSs.
* When an input `sf` object is a tibble, the output is now now also a tibble,
(#95, thanks @mdsumner)
* Upgraded to `mapshaper` v0.4.107
* Bumped minimum version of V8 to 3.0

# rmapshaper 0.4.1

* Fixed a bug when using `sys = TRUE` would fail on Windows in some circumstances (#77)
* Fixed an issue where running `rmapshaper` functions on `sfc` objects failed with
`sf v0.7`

# rmapshaper 0.4.0

## New features

* Added `sys` argument to allow the use of the system `mapshaper` if it's installed (#61)

## Improvements and bug fixes

* Upgraded to `mapshaper` v0.4.64 (#60)
* `sf::st_read()` is now used throughout for reading from disk and from geojson
strings, which allows for greater consistency and better performance.
* Better handling of different column classes (#68, thanks @mdsumner)
* Avoid stackoverflow caused by adding special geojson classes (#71,
https://github.com/ropensci/geojsonio/issues/128)
* The name of the sf column is now properly retained (#70)
* Fixed issue where encoding/special characters were not preserved (#67)

# rmapshaper 0.3.1

* Fixed a bug where converting geojson objects to sf failed with sf >= 0.5-6 (#64)

# rmapshaper 0.3.0

* Methods for sf and sfc classes have been added (#46)
* `rmapshaperid` column is only retained if it is the only column, otherwise it's dropped.
* `ms_innerlines` returns only the geometry for `sf` and `Spatial*DataFrame` classes. (#57)
* `ms_dissolve` gains a `weight` argument for generating weighted centroids of dissolved points. (#39)

# rmapshaper 0.2.0

* Added `snap_interval` to `ms_simplify()` (#43, @nikolai-b)
* Bug-fix: Respect `drop_null_geometries` argument in `ms_simplify.geo_list()` (#45, @nikolai-b)
* Add Kent Russell (@timelyportfolio) to authors list for his JavaScript expertise and advice
* Add Matthew Bloch (@mbloch) to authors list as mapshaper copyright holder
* Update mapshaper to version 0.3.41
* A V8 session is now launched once per function call and destroyed when the function exits, rather than created on package load and retained for the entire session (#49)
* Column classes are now restored after being sent through mapshaper functions (#46)
* Fixed a bug where very small values of `keep` in `ms_simplify()` were converted to scientific notation (#48)
* Added `weighting` argument to `ms_simplify()` (#27)
* Added `remove_slivers` argument in `ms_clip()` and `ms_erase()`

# rmapshaper 0.1.0

* Initial release

repository: ateucher/rmapshaper

gha_language: R

gha_license_id: NOASSERTION

repo_name: ateucher/rmapshaper


text:
apache2gelf
===========

A set of python scripts to deliver Apache and PHP log files to graylog2. Scripts support the following log files:
* standard Apache 2.2 error log (errorlog2gelf.py);
* custom (but quite close to standard 'combined') Apache access log (accesslog2gelf.py);
* standard PHP error log (phplog2gelf.py).

Requirements:
* python-argparse
* python-graypy (0.2.8+)

Usage example
-------------

For Apache with mod_php:

    <VirtualHost *:80>
      ServerName example.com
      DocumentRoot /var/www/example.com

      ErrorLog "|| /path/to/errorlog2gelf.py --vhost example.com"
      CustomLog "|| /path/to/accesslog2gelf.py --vhost example.com" "%V %h %u \"%r\" %>s %b \"%{Referer}i\""
      php_admin_value error_log "/var/log/php/example.com.php.log"
    </VirtualHost>

phplog2gelf.py basically does 'tail -F', so it should be executed separately:

    /path/to/phplog2gelf.py --vhost example.com /var/log/php/example.com.php.log

Command line parameters
-----------------------

All scripts understand the following command line parameters:
* `--localname` to specify a custom hostname
* `--host` to specify graylog2 server
* `--port` to specify graylog2 GELF port
* `--facility` to specify log facility
* `--vhost` to add an extra field called 'vhost' to all log messages. This allows you to configure per-virtualhost log handlers (on the expense of running N additional processes, of course) and then filter logs in graylog2 accordingly.

accesslog2gelf.py
-----------------

The script has log format hard-coded into it, so if you would like to change the CustomLog fields or resulting log messages, just hack it.

errorlog2gelf.py
----------------

The script outputs all messages to stdout. This allows you to have a local log file as well (you can only have one ErrorLog parameter in Apache configuration)

phplog2gelf.py
--------------

This script is somewhat different from the previous two. Because there is no way to get log messages from php via pipe, we have to 'tail -F' the log file. The script supports multiline PHP error log messages as well.

You should launch `phplog2gelf.py` separately - just stick it into your rc.local file. If you have a Debian/Ubuntu system you can also use the following *monit* configuration:

    check process phplog2gelf_example with pidfile /var/run/phplog2gelf_example.pid
        start program = "/sbin/start-stop-daemon --start --pidfile /var/run/phplog2gelf_example.pid --user www-data --chuid www-data --background --make-pidfile --exec /usr/local/sbin/phplog2gelf.py -- --vhost example.com /var/log/php/example.com.php.log"
        stop program = "/sbin/start-stop-daemon --stop --pidfile /var/run/phplog2gelf_example.pid --verbose"

Credits
=======

Copyright (c) 2012, Anton Tolchanov

The scripts are licensed under MIT license.


text:
[![Build Status](https://travis-ci.org/ornlneutronimaging/CylindricalGeometryCorrection.svg?branch=master)](https://travis-ci.org/ornlneutronimaging/CylindricalGeometryCorrection)
[![Documentation Status](https://readthedocs.org/projects/cylindricalgeometrycorrection/badge/?version=latest)](https://cylindricalgeometrycorrection.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/ornlneutronimaging/CylindricalGeometryCorrection/branch/master/graph/badge.svg)](https://codecov.io/gh/ornlneutronimaging/CylindricalGeometryCorrection)

# Cylindrical Geometry Correction
This library produces an image (tiff or fits) with the cylindrical geometry corrected (hollow sample or not).

# Principle
Any homegenous cylindrical sample placed in a beam (neutron for example) will show a much higher transmission signal
near the edge seen by the beam, compare to the center. This is simply due to the fact that the beam has to go through
more material at the center compare to the side.

ATTENTION: This library only works with cylinder placed in the vertical position!

The following figure illustrate this.

![image](documentation/source/_static/homogeneous_cylinder_2d_view.png)

In order to correctly analyze data for those samples, one must cancel this cylindrical effect by "making" the sample
flat related to the direction of the beam.

The user needs to specify the position of the center as well as the radius of the cylinder. The program will then produce
an image corresponding to the same rectangular sample.

Such samples are called homogeneous because they are made of only one uniform and homogeneous material.

But program also work with inhomogenous sample for which the cylinder is hollow such as shown here.

![image](documentation/source/_static/inhomogeneous_cylinder_2d_view.png)

Program works the same way, user needs to specify center and inner and outer radius of material sample.

# Tests
to run the tests
> pytest -v --cov=tests/

# Tutorial
It's recommended to follow the notebook called **tutorial** to learn how to use the library


text:
# Cassandra on Kubernetes with StorageOS persistent Storage

This example shows an example of how to deploy a three node Cassandra ring on
Kubernetes with Cassandra data being written to a StorageOS backed persistent
volume. The files create a stateful set that can be used *AFTER* a StorageOS
cluster has been created. For more information on how to install a StorageOS
cluster please see [the StorageOS
documentation](https://docs.storageos.com/docs/introduction/quickstart) for
more information.

## Deploy

In order to deploy Cassandra you just need to clone this repostiory and use
kubectl to create the Kubernetes objects.

```bash
$ git clone https://github.com/storageos/use-cases.git storageos-usecases
$ cd storageos-usecases
$ kubectl create -f ./cassandra/
```
Once this is done you can check that three Cassandra pods are running. Because
Cassandra is being deployed as a StatefulSet, pod cassandra-1 will only be
created once cassandra-0 is ready.

```bash
$ kubectl get pods -w -l app=cassandra
NAME          READY   STATUS    RESTARTS   AGE
cassandra-0   1/1     Running   0          8m32s
cassandra-1   1/1     Running   0          7m51s
cassandra-2   1/1     Running   0          6m36s
```

Connect to a Cassandra pod and connect to the Cassandra server through the
service.

```bash
$ kubectl exec -it cassandra-0 -- cqlsh cassandra-0.cassandra
Connected to K8Demo at cassandra-0.cassandra:9042.
[cqlsh 5.0.1 | Cassandra 3.11.3 | CQL spec 3.4.4 | Native protocol v4]
Use HELP for help.
cqlsh> SELECT cluster_name, listen_address FROM system.local;

 cluster_name | listen_address
--------------+----------------
       K8Demo |   <IP_ADDRESS>

(1 rows)
```

repository: storageos/use-cases

repo_name: storageos/use-cases


text:
# DNS Chef

This modified version of [DNS Chef](http://thesprawl.org/projects/dnschef/) that forward DNS query to a function that decoded the hex encoded metadata placed by the scanner [Break Fast Serial](https://github.com/GoSecure/break-fast-serial).

The original version is available at : [http://thesprawl.org/projects/dnschef/]()

repository: GoSecure/break-fast-serial

repo_name: GoSecure/break-fast-serial


text:
# 758. Convert Binary Search Tree to Sorted Doubly Linked List

* *Difficulty: Medium*

* *Topics: Linked List, Divide and Conquer, Tree*

* *Similar Questions:*

  * [Binary Tree Inorder Traversal](binary-tree-inorder-traversal.md)

## Problem:

Convert a BST to a sorted circular doubly-linked list in-place. Think of the left and right pointers as synonymous to the previous and next pointers in a doubly-linked list.

Let's take the following BST as an example, it may help you understand the problem better:

We want to transform this BST into a circular doubly linked list. Each node in a doubly linked list has a predecessor and successor. For a circular doubly linked list, the predecessor of the first element is the last element, and the successor of the last element is the first element.

The figure below shows the circular doubly linked list for the BST above. The "head" symbol means the node it points to is the smallest element of the linked list.

Specifically, we want to do the transformation in place. After the transformation, the left pointer of the tree node should point to its predecessor, and the right pointer should point to its successor. We should return the pointer to the first element of the linked list.

The figure below shows the transformed BST. The solid line indicates the successor relationship, while the dashed line means the predecessor relationship.

## Solutions:

```c++
/*
// Definition for a Node.
class Node {
public:
    int val;
    Node* left;
    Node* right;

    Node() {}

    Node(int _val, Node* _left, Node* _right) {
        val = _val;
        left = _left;
        right = _right;
    }
};
*/
class Solution {
public:
    Node* treeToDoublyList(Node* root) {
        if (root == NULL)   return NULL;
        Node* dummy = new Node(0, NULL, NULL);
        Node* tail = dummy;
        helper(root, tail);
        tail->right = dummy->right;
        dummy->right->left = tail;
        return dummy->right;
    }

    void helper(Node* root, Node*& tail) {
        if (root == NULL)   return;
        Node* left = root->left;
        Node* right = root->right;
        helper(left, tail);
        tail->right = root;
        root->left = tail;
        tail = root;
        helper(right, tail);
    }
};
```

repository: LamhotJM/git-book

gha_language: JavaScript

repo_name: LamhotJM/git-book


text:
# Deploying Stork

## Prepare

- [ ] Log into the benchmarking machine
  - [ ] Update to master
  - [ ] Run benchmarks by running `just generate-stats`
  - [ ] Ensure values are acceptable. If not, abort the release and debug.
- [ ] Create a release PR:
  - [ ] Add date to changelog
  - [ ] Bump the version in package.json and in Cargo.toml for the lib, wasm, and cli crates
  - [ ] Commit to master and push
- [ ] Create a new PR on the site
  - [ ] Update all CDN references to the updated version number
  - [ ] Add documentation, if applicable

## Release

- [ ] On your computer, check out the latest master
- [ ] Run `$ git tag -a vX.Y.Z -m "Release version X.Y.Z"`
- [ ] Run `$ git push origin vX.Y.Z`
- [ ] Wait for the release to be built. Github Actions will deploy the release automatically.

## Aftercare

- [ ] Check that the demo the site's Netlify preview works. If not, abort the release and debug.
- [ ] Add the changelog to the Github release, and publish it
- [ ] Create an Amazon Linux binary. Upload it to the CDN and to the Github release.
  - [ ] Run `cargo build --release --no-default-features --features=build-index-v3` from the amazon-linux build machine
- [ ] Merge the PR you made on [the documentation site](https://github.com/stork-search/site)
- [ ] Update Homebrew
  - [ ] Generate a new brewfile based on the Github-generated tarball:
    - [ ] `$ rm /opt/homebrew/Library/Taps/homebrew/homebrew-core/Formula/stork.rb` on my computer
    - [ ] `$ brew create https://github.com/jameslittle230/stork/archive/vX.Y.Z.tar.gz`
  - [ ] Manually update the URL and SHA in the [Homebrew formula file](https://github.com/jameslittle230/homebrew-stork-tap/blob/master/Formula/stork.rb)
- [ ] Run `$ cargo publish`

repository: hippee-lee/stork

repo_name: hippee-lee/stork


text:
# Boop

Boop is a web application which acts like a library checkout system, but for computers, allowing for an efficient barcode-based issue/return workflow.

Its current main goal is to be better than writing on paper.

## Requirements

Boop requires Ruby 3.0.1, Bundler, Node 16, Yarn, and preferably a Linux environment.
It must be connected to a PostgreSQL database.

To install it in a consistent environment, a [Docker Compose configuration](https://github.com/microlith57/boop_docker/pkgs/container/boop_docker%2Fboop) is provided; this is the recommended method of installaton.

## Manual Installation

1. Clone this repository (`git clone https://github.com/microlith57/boop.git --depth 1`)
2. Run `bin/bundle install` and `bin/yarn install` to install dependencies
3. Configure environment variables as below
4. Run `bin/rails secret`
5. Run `RAILS_ENV=production bin/rails db:prepare` to prepare the production database
6. Run `RAILS_ENV=production bin/rails log:clear tmp:clear assets:precompile` to clear the temporary files and logs, and precompile the necessary assets

### Environment Variables

Environment variables can be configured using `.env` files.
It is recommended to create a file `.env.production.local` in the `boop` directory, and place overrides there.
You must set the following:

- `NODE_ENV=production`
- `POSTGRES_HOST` to the database hostname (eg. `localhost`)
- `POSTGRES_PORT` to the database port (eg. `5432`)
- `POSTGRES_USERNAME` and `POSTGRES_PASSWORD` to the database credentials
- `RAILS_SERVE_STATIC_FILES` to `true` (unless you have a web server set to handle this)

## Updates

1. Pull the latest changes (`git pull` or download a new version)
2. Run `bin/bundle install` and `bin/yarn install` to update dependencies
3. Run `RAILS_ENV=production bin/rails db:migrate` to migrate any database changes
4. Store old logs somewhere if necessary
5. Run `RAILS_ENV=production bin/rails log:clear tmp:clear assets:precompile` to clear the temporary files and logs, and precompile the necessary assets

## Usage

To start the server, run `bin/rails server -e production`; see the Rails documentation for more details.

### Admin Accounts

Currently, no user interface exists to create new accounts or edit existing ones; this requires the use of the Rails console (`bin/rails console -e production`).
Using an external editor for editing passwords is not recommended because the passwords are hashed before storage.

To create an account via the console:

```ruby
Admin.create email<EMAIL_ADDRESS>password: '12345'
```

To edit an existing account:

```ruby
admin = Admin.find_by! email<EMAIL_ADDRESS>
# Edit email
admin.email =<EMAIL_ADDRESS># Edit password
admin.password = '54321'

admin.save!
```

To delete an admin:

```ruby
admin = Admin.find_by! email<EMAIL_ADDRESS>admin.destroy
```

license: ISC

gha_language: SCSS

gha_license_id: ISC


text:
# simple_twitter

Dead simple Twitter API client. Supports both v1 and v2

[![Gem Version](https://badge.fury.io/rb/simple_twitter.svg)](https://badge.fury.io/rb/simple_twitter)
[![test](https://github.com/yhara/simple_twitter/actions/workflows/test.yml/badge.svg)](https://github.com/yhara/simple_twitter/actions/workflows/test.yml)

## Installation

Add this line to your application's Gemfile:

```ruby
gem 'simple_twitter'
```

And then execute:

    $ bundle install

Or install it yourself as:

    $ gem install simple_twitter

## Example

```rb
require 'simple_twitter'

client = SimpleTwitter::Client.new(bearer_token: "...")
pp client.get("https://api.twitter.com/2/tweets",
              params: { ids: "1302127884039909376,1369885448319889409" })
```

Result:

```
{:data=>
  [{:id=>"1302127884039909376",
    :text=>
     "We conclude RubyKaigi Takeout 2020. We hope we can meet in-person, safely at RubyKaigi 2021 in Mie! Thank you all for tuning in. #rubykaigi"},
   {:id=>"1369885448319889409",
    :text=>
     "RubyKaigi 2021 is going online again: RubyKaigi Takeout 2021 will happen this fall. https://t.co/Fv1PlvmUHh"}]}
```

As you see hash keys are converted into symbols (Note that strings as values are not converted.)

### Call API on user context

Some operations (eg. posting a tweet) needs OAuth instead of `bearer_token`.

```rb
config = (load from yaml or something)
client = SimpleTwitter::Client.new(
  api_key: config[:api_key],
  api_secret_key: config[:api_secret_key],
  access_token: config[:access_token],
  access_token_secret: config[:access_token_secret],
)
pp client.post("https://api.twitter.com/1.1/statuses/update.json",
               params: { status: "Test." })
```

You can get the access_token and access_token_secret for your own at the Twitter Developer Portal. For other users, you need to get them via OAuth (out of scope of this gem.)

### Post with JSON body
Since Twitter API v2, POST must be sent as JSON body

e.g.https://developer.twitter.com/en/docs/twitter-api/tweets/manage-tweets/api-reference/post-tweets

Send using the `json` argument.

e.g.

```ruby
client = SimpleTwitter::Client.new(bearer_token: ENV["ACCESS_TOKEN"])
client.post("https://api.twitter.com/2/tweets", json: { text: "Hello twitter!" })
```

### Upload media
If you want to tweet with an image, you need to do the following steps

1. Upload image as media
    * c.f. https://developer.twitter.com/en/docs/twitter-api/v1/media/upload-media/api-reference/post-media-upload
2. Tweet with media
    * c.f. https://developer.twitter.com/en/docs/twitter-api/tweets/manage-tweets/api-reference/post-tweets

e.g.

```ruby
config = (load from yaml or something)
client = SimpleTwitter::Client.new(
  api_key: config[:api_key],
  api_secret_key: config[:api_secret_key],
  access_token: config[:access_token],
  access_token_secret: config[:access_token_secret],
)

# Upload image as media
media = client.post(
          "https://upload.twitter.com/1.1/media/upload.json",
          form: {
            media: HTTP::FormData::File.new("/path/to/image.png")
          }
        )
# =>
# {:media_id=>12345678901234567890,
#  :media_id_string=>"12345678901234567890",
#  :size=>60628,
#  :expires_after_secs=>86400,
#  :image=>{:image_type=>"image/png", :w=>400, :h=>400}}

# Tweet with media
client.post(
  "https://api.twitter.com/2/tweets",
  json: {
    text: "Test tweet with image",
    media: { media_ids: [media[:media_id_string]] },
  }
)
```

### Advanced

If you want the raw json string or use streaming API, use `get_raw`, `post_raw`, etc. which returns `HTTP::Response` of the [http gem](https://github.com/httprb/http).

```rb
res = client.get_raw("https://api.twitter.com/2/tweets/sample/stream")
p res #=> #<HTTP::Response ...>
loop do
  puts res.body.readpartial
end
```

### Hint

Some API parameters has `.` in its name (eg. `tweet.fields`.) Did you know that in Ruby you can include `.` in a hash key if quoted? :-)

```rb
tweets = @client.get("https://api.twitter.com/2/users/#{id}/tweets", params: {
  expansions: "author_id",
  max_results: 100,
  "tweet.fields": "author_id,created_at,referenced_tweets,text",
})
```

### Detailed error details
If an error is returned from the API, you may need more information.

In such cases, you can retrieve it as follows.

```ruby
begin
  client = SimpleTwitter::Client.new(bearer_token: "invalid_bearer_token")
  client.get("https://api.twitter.com/2/users/me")
rescue SimpleTwitter::Error => error
  error.raw_response.class
  #=> HTTP::Response

  error.raw_response.code
  #=> 403

  error.body[:title]
  # => "Unsupported Authentication"
end
```

See more. [SimpleTwitter::Error](https://yhara.github.io/simple_twitter/SimpleTwitter/Error.html)

## API Reference
See https://yhara.github.io/simple_twitter/

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/yhara/simple_twitter.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

gha_language: Ruby


text:
---
title: Weekly summary 2016-08-06
published: 2016-08-06
modified: 2016-08-06
tags: none
type: summary
showTOC: True
---

* Machine learning
    * [PMI images](/posts/tcs/machine_learning/neural_nets/pmi_images.html)
	    * Understood [PMI idea](/posts/tcs/machine_learning/nlp/pmi.html) more thoroughly.
	    * Got code from Ben. Having trouble running. See
		    * https://www.mathworks.com/matlabcentral/newsreader/view_thread/345876#947272
			* https://askrc.princeton.edu/question/255/matlab-on-nobel-error-using-mex/
			* http://stackoverflow.com/questions/38723051/error-using-mex-g-error-no-such-file-or-directory
		* [Brainstorm on convnets](/posts/tcs/machine_learning/neural_nets/convnets_ideas.html). Skimmed the following. **TODO**: understand more thoroughly.
		    * Fastfood - computing Hilbert space expansions in loglinear time
				* Deep-fried convnets
				* Ailon-Chazelle
			* [HA16](/posts/tcs/machine_learning/nlp/HA16.html) Unsupervised Learning of Word-Sequence Representations from Scratch via Convolutional Tensor Decomposition
			* [MKHS14] Convolutional Kernel Networks
	* Representation learning problem (see below)
	    * Talked with Anand.
		* Kernel dictionary learning idea. **TODO**: try to make this rigorous, and test it out.
	* **TODO**: Think about AGD, talk with Cyril.
	    * [Chebyshev polynomials](/posts/math/analysis/numerica/chebyshev.html)
* Probability
    * [HDP](/posts/math/probability/random_matrices/hi_dim_prob.html) Chapters 2-3
* TT/ATP/PL
    * Reviewed HMTI, read more on type theory. See [Types and PL](/posts/cs/type_theory/types_and_pl.html), [Type theory](/posts/cs/type_theory/type_theory.html).

#Representation learning

In dictionary learning, we assume we have samples $y = Ax + e$ where $x$ comes from a sparse distribution (ex. $x_i$ independent, $x_i\neq 0$ with probability $s/n$ and then is drawn from some distribution not concentrated at 0) and $e$ is error (ex. Gaussian).

The way we stated our problem is that $x\cdot a_i$ is large for only a few $i$. This is similar to dictionary learning with $(A^+)^T$ where the columns of $A$ are the $a_i$. (I.e. the $x$'s here are really the $y$'s in DL.)

I may be wrong but I think that what's different is that

* Dictionary learning on $(A^+)^T$ would correspond to when $(x\cdot a_i)_i$ is sparse + noise. Our assumption is a bit different that $x\cdot a_i$ is large for only a few $i$, ex. large negative values don't count against the assumption.
* we're trying to relax the condition on the noise---ex. instead of saying that the noise in the other coordinates is random, we consider worst-case or make an assumption that they're random-like in some way.

(Actually, I think the undercomplete case when the number of $a_i$ is less than the dimension of $n$ doesn't quite correspond to DL because the map $x\mapsto (x\cdot a_i)_i$ is not invertible...)

repository: holdenlee/notebook

repo_name: holdenlee/notebook


text:
## github-action-docker-build

An extremely simple docker image auto build for your repository, made in order to replace in open source Docker Hub build integration, which has gone to the payed tier.

The resulting image is stored in ghcr.io, which is free for open source projects.

`dockerfile` should exist in project root.

Also links a built image back to the repository via adding the according `LABEL` instruction to the dockerfile in a process of a build.

Usage example (include it in a workflow file, e.g. `.github/workflows/build.yml`):

```
on:
  push:
    branches:
      - main
    tags:
      - '*'

jobs:
  build:
    runs-on: ubuntu-20.04

    steps:
    - uses: btmc/github-action-docker-build@v1
```

Generates an image on any commit to the `main` branch or tagged with any tag.

repository: btmc/github-action-docker-build

repo_name: btmc/github-action-docker-build


text:
---
layout: example
title: Dendritic Growth in a Cooling Al+Cu Alloy
image: gallery-39.jpg
data_credits: Klemens Reuther of the Department of Metallic Materials, FSU Jena.
---
Computer simulation of dendritic growth in a cooling Al+Cu alloy. We have
simulated a cube with a side length of 0.2125 mm consisting of liquid
aluminum mixed with 2% Copper at an initial temperature of 919.25° K. The
plot shows the concentration gradient of the copper around the solid
dendrite. As the aluminum crystallizes first, the liquid phase next to
the dendrite exhibits a higher Cu concentration.

The parallel implementation was carried out with LibGeoDecomp.

repository: visit-dav/visit-website

branch_name: refs/heads/gh-pages

repo_name: visit-dav/visit-website


text:
# Djang Charts

## Description

Django charts is buit wiyth pure python. There is no Javascript. The idea was to use pure python libraries and templating system to develop Charts in django. I m using  django chartkit library to show a JSON. django view is sending the JSON object.
 I was using a FITBIT Data. I could Import fitbit xls into my database. And SHOW data like waling and sleeping activity.

## Stack

* Django
* Bootstrap
* Django chartit
* Postgres

## Features

- [x] Import Data from XLS
- [x] Show Charts for users waling and sleeping activity
- [x] Show Charts for users height weight
- [x]  Show users Score
- [x] Login and logout for user

## Installation

```bash
Django_Charts$ pip install -r requirements.py
Django_Charts$ python manage.py make migrations
Django_Charts$ python manage.py migrate

## Run
Django_Charts$ pthon manage.py runserver
You can now open your browser: `http://localhost:8000/`
 `http://localhost:8000/import_db`  :: this will import the csv file into the database. [crude way]

## Licence
The MIT License (MIT)

Copyright (c) 2014 Chintamani Lonkar<EMAIL_ADDRESS>
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.

repository: chintamanil/DjangoCharts

repo_name: chintamanil/DjangoCharts


text:
---
description: >-
  In this guide we show you how you can migrate users from your existing
  on-premise site to Umbraco Cloud and Umbraco ID.
---

# Migrating Users to Umbraco Cloud

{% hint style="warning" %}
This guide is currently being re-evaluated, so it might not work as intended.
{% endhint %}

In this guide, we show you how you can migrate users from your on-premises site to Umbraco Cloud and Umbraco ID.

We will use SQL Server Management Studio to generate a script of the user tables in your SQL Database.

## Prerequisites

* SQL database used on your on-prem site.
* SQL Server Management Studio.
* A cloud site that you are migrating to.

## Migrating a User

To migrate users to Umbraco Cloud, we need to copy the tables beginning with `umbracoUser` to the Cloud site from your on-premises database.

This is done by generating a script using SQL Server Management Studio that we can run on our Umbraco Cloud Database.

### Generate SQL Script

Below are the steps to generate a script with the `umbracoUser` database tables.

1. Go to **SQL Server Management Studio** and connect to the database from which you want to migrate the users.
2. Right-click on it and go to **Tasks > Generate script**.
3. Follow the Wizard.
4. Choose **Select specific tables** when prompted to **Select the database object to script**.
5. Choose the following tables:

```
dbo.umbracoUser
dbo.umbracoUser2NodeNotify
dbo.umbracoUser2UserGroup
dbo.umbracoUserGroup
dbo.umbracoUserGroup2App
dbo.umbracoUserGroup2NodePermission
dbo.umbracoUserLogin
dbo.umbracoUserStartNode
dbo.umbracoUserGroup2Node
dbo.umbracoUserGroup2Language
```

1. Click **Next** and then click **Advanced**.
2. Find **Type of data to script** and choose **Data only**.
3. Choose where to save the script and save it.
4. Connect to your [Umbraco Cloud Database](../../databases/cloud-database.md).
5. Run the script on your Umbraco Cloud Database.
6. Restart your Umbraco Cloud environment.

### Finishing the Migration

Once the script has been run on your Umbraco Cloud Database, it is time for the users to log in to the Cloud backoffice.

The user will be prompted to log in and they should use the password they used on-premises installation.

Once the user logs in they will be asked to enter their email to receive a token and verify their user in Umbraco ID.

Enter the code to verify the user with Umbraco ID.

Once the user has been verified, they will be redirected to the backoffice and their user has been migrated to Umbraco ID and Umbraco Cloud.

repository: umbraco/UmbracoDocs

repo_name: umbraco/UmbracoDocs


text:
---
layout: creature
name: "Ogre Shaman"
tags: [large, giant, cr2, nerzugals-extended-bestiary]
cha: 14 (+2)
wis: 8 (-1)
int: 5 (-3)
con: 16 (+3)
dex: 8 (-1)
str: 16 (+3)
size: Large giant
alignment: chaotic evil
challenge: "2 (450 XP)"
languages: "Common, Giant"
senses: "darkvision 60 ft., passive Perception 9"
speed: "40 ft."
hit_points: "59 (7d10 + 21)"
armor_class: "9"
---

***Thick Hide.*** The ogre has advantage on saving
throws against spells and other magical effects.

***Innate Spellcasting.*** The ogre’s innate spellcasting
ability is Charisma (spell save DC 12). The ogre can
innately cast the following spells, requiring no
material components:

* At will: light, mold earth, create bonfire

* 1/day each: earth tremor, enhance ability, fog cloud, color spray

### Actions

***Club.*** Melee Weapon Attack: +5 to hit, reach 5ft.,
one target. Hit: 10 (2d6 + 3) bludgeoning damage.

gha_language: CSS


text:
---
layout: post
title: "RFE and me"
date: 2020-08-12
---
## About RFE
RFE, or Recursive Feature Elimination, is a wrapper-type feature selection algorithm
that can select features that are most relevant in predicting the label.
A "wrapper=type" algorithm means that a different ML algorithm is used in the core
of the method, wrapped by RFE, and used to select features.

There are two important configuration options to be aware of:

 1. The choice of the number of features to select
 2. The choice of the algorithm used to help choose features

Luckily the performance of the algorithm is not sensitive to these options being
configured well.

RFE attempts to fit the training data to the core ML algorithm chosen, ranking
features by importance, discarding the least important features, and re-fitting the model.

## Why another algorithm?
In order to determine if there are features that are important across different
datasets and drawing conclusions we must run the datasets through different feature
selection algorithms that are more classifier-agnostic (e.g. not optimizing to
  benefit a particular model). We should look at additional datasets as well.

## RFE Notebooks
My initial run against the CTU-13 dataset went well to test the algorithm
[RFE CTU-13](/assets/RFE-CTU-13-072620.html)

But as I went to test other datasets I ran into the error:
```
TerminatedWorkerError: A worker process managed by the executor was
unexpectedly terminated. This could be caused by a segmentation fault while
calling the function or by an excessive memory usage causing the Operating
System to kill the worker.

The exit codes of the workers are {SIGKILL(-9)}
```

[RFE Error](/assets/RFE-error.html)

So it turns out that the following line of code is important:

`scores = cross_val_score(model, X, y, scoring='accuracy', cv=cv, n_jobs=-1`

What I didn't understand about `n_jobs=-1` is that the function will allocate
_all_ cores to the process if left at -1. Once I figured this out I tried with
half my cores. No dice:

[RFE NIDS-AML-Human Error](/assets/RFE-NIDS-AML-Human.html)

But I did get this one to work:
[RFE NIDS-AML-Auto](/assets/RFE-NIDS-AML-Auto.html)

More fiddling and testing is required to get this to produce usable results.

## Making sense of progress
investigate PSH flags

## Additional datasets?


text:
# Worldping

Elixir tools for accessing the WorldPing API (see https://worldping.raintank.io).

## Installation

  1. Add worldping to your list of dependencies in `mix.exs`:
     ```elixir
     def deps do
       [{:worldping, "~> 0.0.1", github: "boringbutgreat/worldping"}]
     end
     ```

  2. Ensure worldping is started before your application:
     ```elixir
     def application do
       [applications: [:worldping]]
     end
     ```

  3. Configure the api_key environment variable in your config files:
     ```elixir
     config :worldping, api_key: "bearer <your_key>"
     ```

## Mocked mode
  ```elixir
  config :worldping, api_host: "test"
  ```

repository: BoringButGreat/worldping

gha_language: Elixir

repo_name: BoringButGreat/worldping


text:
# Credential Server

This is a Credential Provider Server that can generate, sign, validate, update, and revoke credentials. The credentials follow the standard [Verifiable Credentials (VC) by the W3C](https://www.w3.org/TR/vc-data-model/). Credentials can be used to contain information about anything. Also, they can be signed by the issuer, and refer to a subject. Therefore, if the issuer is trusted by a third party, this third party can trust information about the subject by verifying the validity of the credential, whithout having to ask the issuer.

When the previous is leveraged, and the subject is in control of their credentials, we can build identity models that fall into the category of self-sovereign identity (SSI). LACChain is developing a techno-legal framework for SSI.

The Credential Provider Server signs a credential using its own keys, which it is configurable. It manages its own repository of credentials, which by default is a smart contract that is deployed when server inits. The Credentials are verifiable against the smart contract deployed in the blockchain by default, but you can configure and choose your proof and revocation list service.

The [Hashing Service](https://github.com/lacchain/hashing-service) and the Credential Service are being used for the notarizing tool named [LACChain Notarizer](http://notarizer.lacchain.net/), that you can use to register and verify the hash any file in the LACChain Blockchain Network for free. For any questions about the tool, you can also read the [LACChain Notarizer FAQ](https://medium.com/@lacchain.official/lacchain-notarizer-faq-6ae3dbb3441e).

## Prerequisites

* Go 1.12+ installation or later
* **GOPATH** environment variable is set correctly
* docker version 17.03 or later

## Package overview

1. **cmd/credential-provider-server** contains the main for the credential-provider-server command.
2. **lib** contains most of the code.
3. **blockchain** contains smart contracts, ABIs, connections to Ethereum
4. **business** contains business logic that will be consume by APIs
5. **models** contains data models of requests and responses of APIs
6. **swagger** contains documentation about APIs in Swagger and SwaggerUI to visualize this documentation
7. **util** contains util functions about files and ethereum address

## Install

```
$ git clone https://github.com/lacchain/credential-server

$ export GO111MODULE=on

$ cd CredentialMother/cmd/credential-provider-server
$ go build
```

## Run

```
$ credential-provider-server init [-x PASSWORD]
[PASSWORD] is your keystore password that will be created
$ credential-provider-server start --port=8000 --tlscertificate server.crt --tlskey server.key [-x PASSWORD]
```

where --port is a listen port http

You can try in localhost:8000/swagger-ui/

### Docker

* Clone this repository

```
$ git clone https://github.com/lacchain/credential-server
```

* Create a local directory that saves application data

```
$ mkdir /CredentialData
```

* Copy the YAML configuration file and swaggerui from repository to your local directory created above:

```
$ cp repo/CredentialServer/credential-provider-server-config.yaml /CredentialData/
$ cp -r repo/CredentialServer/swagger/swaggerui  /CredentialData/

```

* Now set your parameters into the file credential-provider-server-config.yaml

* Create a directory that will store the keystore which save the private key

```
$ mkdir -p /CredentialData/keystore
```

* After that, save your keystore into this directory

* Finally pull the docker image and run the container, setting your node identity and the folder location that will be the volume

```
$ docker pull ccamaleon5/credentialserver:1.0.0
$ docker run -dit -v {CredentialServer_DIR}:/CredentialProvider -p 8000:8000 -p 8001:8001 aparejaa/credentialserver:1.0.0 credential-provider-server init [-x PASSWORD]
$ docker run -dit -v {CredentialServer_DIR}:/CredentialProvider -p 8000:8000 -p 8001:8001 aparejaa/credentialserver:1.0.0
```

* The container will create KeyStore in your local volume

You can try in localhost:8000/swagger-ui/

## Copyright 2020 LACChain

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: lacchain/credential-server

gha_language: Go

repo_name: lacchain/credential-server


text:
Namey
=====

Namey is a ruby gem for auto-generating names.  It uses the [US Census
Bureau database](http://www.census.gov/genealogy/names/) of first and last names to generate random
names. Since the database itself specifies the frequency of each name,
you can get specify whether you want a common name, rare name, etc.

[![Build Status](https://travis-ci.org/muffinista/namey.png?branch=master)](https://travis-ci.org/muffinista/namey)

## Usage ##

Using namey is pretty straightforward.

    require 'namey'
    @generator = Namey::Generator.new

    @generator.name
     => "Maria Fisher"

Or, to get a particular frequency level, try one of these:

    @generator.name(:common)
     => "Michael Thomas"

	@generator.name(:rare)
	 => "Deangelo Jotblad"

	@generator.name(:all)
     => "Emanuel Boddorf"

You can also specify `male` or `female` to stick to one gender:

    @generator.male
     => "David Gonzales"
    @generator.female
     => "Sharon Richardson"

	@generator.male(:rare)
	=> "Son Plude"

	@generator.female(:rare)
	=> "Blossom VanWie"

NOTE: All these methods default to returning common names unless you
specify a different level.

Finally, you can specify true/false as the second parameter to any
call to specify if you want a surname:

    @generator.male(:common, false)
     => "Michael"
    @generator.male(:common, false)
     => "William"

Finally, you can access the `generate` method directly and specify `min_freq`
and `max_freq` to get a range of names:

	# a somewhat rare name
    @generator.generate(:type => :male, :with_surname => true, :min_freq => 80, :max_freq => 100)
     => "Salvatore Billard"

	# a more rare name
	@generator.generate(:type => :male, :with_surname => true, :min_freq => 90, :max_freq => 100)
	=> "Broderick Burhanuddin"

	# a common name
	@generator.generate(:type => :male, :with_surname => true, :min_freq => 0, :max_freq => 5)
	=> "James Davis"

	# another common name
	@generator.generate(:type => :female, :with_surname => true, :min_freq => 0, :max_freq => 5)
	=> "Linda Williams"

## Data ##

Namey comes with a pre-loaded SQLite database. However, you can
specify a different datasource when initializing the gem:

    @generator = Namey::Generator.new("mysql://username:passwrd@host/database")

Namey uses Sequel to access data, and is tested with both MySQL and
SQLite. It might need some tweaking to work with other engines.

If you want to fiddle around with the data, you can check out
Namey::Importer, or the `namey-load-data` script included with the
gem, which will generate the database from the original source files.

## Capitalization ##

The data from the Census Bureau is in all caps, it looks a lot like
this:

	SMITH          1.006  1.006      1
	JOHNSON        0.810  1.816      2
	WILLIAMS       0.699  2.515      3
	JONES          0.621  3.136      4
	BROWN          0.621  3.757      5

That's fine with basic names, but names with more than one capital in
them are challenging.  The data is also stripped of apostrophes, so
O'Brien is actually OBRIEN. The namey parser attempts to correct some
of this, but it probably misses some.  If you find any glaring
examples, just let me know.

extension: markdown


text:
Typically, Terraspace auto init should handle initialization. You can run init if you need to though.

## Example

    $ terraspace init demo
    Building .terraspace-cache/us-west-2/dev/stacks/demo
    Built in .terraspace-cache/us-west-2/dev/stacks/demo
    Current directory: .terraspace-cache/us-west-2/dev/stacks/demo
    => terraform init -get
    Initializing modules...

    Initializing the backend...

    Initializing provider plugins...
    - Using previously-installed hashicorp/aws v3.7.0
    - Using previously-installed hashicorp/random v2.3.0

    The following providers do not have any version constraints in configuration,
    so the latest version was installed.

    To prevent automatic upgrades to new major versions that may contain breaking
    changes, we recommend adding version constraints in a required_providers block
    in your configuration, with the constraint strings suggested below.

    * hashicorp/aws: version = "~> 3.7.0"
    * hashicorp/random: version = "~> 2.3.0"

    Terraform has been successfully initialized!

    You may now begin working with Terraform. Try running "terraform plan" to see
    any changes that are required for your infrastructure. All Terraform commands
    should now work.

    If you ever set or change modules or backend configuration for Terraform,
    rerun this command to reinitialize your working directory. If you forget, other
    commands will detect it and remind you to do so if necessary.
    $

repository: mbijon/terraspace

repo_name: mbijon/terraspace


text:
---
layout: default
---

# 1997-08-03 - Duncan Long on Cypherpunks and Guns

## Header Data

From: Tim May<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 24ddd4bed9663d51f4efca1b22cd5aaacafd025d27131fc9e849c1fbe98b2961

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-08-03 05:11:18 UTC

Raw Date: Sun, 3 Aug 1997 13:11:18 +0800

## Raw message

```
{% raw  %}From: Tim May<EMAIL_ADDRESS>Date: Sun, 3 Aug 1997 13:11:18 +0800
To<EMAIL_ADDRESS>Subject: Duncan Long on Cypherpunks and Guns
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

While looking through Duncan Long's Web pages on survivalism, guns, and
such, I found this interesting mention of Cypherpunks.

This particular article is at: http://www.prairienet.org/guns/dlgs/gun3.htm
It dates from January, 1996.

His main page is accessible from there. Long is well-known for his series
of books on the M-16, Surviving Nuclear War, terrorist incidents, etc.,
mostly published by Delta Press and Paladin Press. (The kind of books
Loompanics likes to display.) He also has some views on Christianity,
Armageddon, and such...mostly I ignore these views, and am more than happy
to have him be a good Christian so long as his views are not imposed on me.
I mainly read Long for his views on guns and gun laws.

--Tim

--begin excerpt from Duncan Long's article--

Cyberpunks

At the risk of getting "flamed", I thought I'd make a few comments about
Cyberpunks. First, the definitions (using material I've lifted from
some Cyberpunks sites on the WWW). According to those that consider
themselves to be Cyberpunks, there are three main
sub-classifications of Cyberpunks. These are:

Hackers: Persons who are skilled or talented with most aspects of
computers, electronics, and technology. For hackers, technology is not just
a hobby but a way of life.

Cypherpunks: Individuals who believe that the government is out to invade
the privacy of everybody on the planet. The cypherpunk's central
goal is to out-smart the system. (The encryption program, PGP, is often
referred to by this group as "the Cypherpunk's best friend").

Ravers: Folks who use synthesized and sampled music, computer-generated
psychedelic ("cyberdelic") art, and designer drugs to create
massive all-night dance parties and love-fests in empty warehouses.

Now if you grew up during the 1960s, you'll recognize the Ravers; they're
basically hi-tech hippies. And the hackers are those darlings of the
media that show how dangerous those of us on the Internet are to society
(and give the establishment a good reason to demand more controls
on the Net, censorship, etc., etc.).

But if you go beyond the surface, especially with the Cyberpunks, you
discover that these people have a lot in common with the survival,
militia, and gun rights movements. Like us, they don't trust the
government, are using the Net (hey, you're here, aren't you?), and (yes)
even
want to own firearms to protect themselves from lack of good law
enforcement as well as run-away government agents who are apt to trample
on their rights.

There are some differences between the hard-core gun rights crowd and the
Cyberpunks. Gun owners tend to be older and a bit more
knowledgeable about government and how it does and doesn't work. And (as
might be expected) has a better grasp of which firearms are
suitable for self defense and which are Walter Mitty.

But the two groups have a lot in common, even have a lot of "members" that
belong to both groups. I think it will only be a matter of time
before Cyberpunks and gun rights groups join forces or even become one and
the same thing.

Undoubtedly this is another worry that will keep the gun grabbers and those
interested in getting rid of freedom in the US up at night.

--end excerpt from Duncan Long's article--

{% endraw %}
```

## Thread

+ Return to [August 1997](/archive/1997/08)

+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"

+ 1997-08-03 (Sun, 3 Aug 1997 13:11:18 +0800) - Duncan Long on Cypherpunks and Guns - _Tim May<EMAIL_ADDRESS>


text:
# Installation

## Requirements

OpenNMT-tf requires:

* Python (>= 2.7)
* TensorFlow (>= 1.4, < 2.0)

Some features added after the initial release may require newer TensorFlow versions. Please consult the changelog to know about new features availability.

## Via pip (recommended)

Each tagged version of the project is automatically pushed to [PyPi](https://pypi.org/project/OpenNMT-tf/). We recommend installing this package via `pip`:

```bash
pip install OpenNMT-tf
```

To confirm that the package is correctly installed, run:

```bash
onmt-main -h
```

repository: Parkchanjun/OpenNMT-tf

repo_name: Parkchanjun/OpenNMT-tf


text:
# jQuery iOS Dialog Box Plugin
iOS Dialog Box is my new JQuery Plugin that allows to the Web Developers create custom dialog windows to their projects. Using the iOS Style, you can create Web Mobile like an App

Features
--------
- jQuery iOS Alert Dialog Box
- jQuery iOS Confirm Dialog Box

Notes
-----
This is a Pre-Alpha project. I used it before, in some custom CMS Developments.
Use it on your own responsibility.

Related Links
-------------
- Link to [sourceforge.net](https://sourceforge.net/projects/iosdialogbox/) project

repository: DavidGarciaCat/ios-dialog-box

repo_name: DavidGarciaCat/ios-dialog-box


text:
# Sonata Engine
Sonata Engine is a personal project that demonstrate how to write a Game Engine Runtime.

It includes fundamental features such as Reflection, Serialization, Forward Rendering, Phsycis and UI.

The Runtime is implementation on multiple APIs for different systems.

The Runtime provides a common set of features that are platform-independent.

Plugins provide platform-specific and third-party implementations (Direct3D, OpenGL, PhysX...).

# Platforms
* Windows
* SDL

# Features
## Core
* Types
  * Flags
  * String
  * ID (128-bit)
  * Variant
  * Point / Size / Rectangle
  * Colors (integer 8-bit and floating point 32-bit)
* Containers
  * Array (vector)
  * List (linked list)
  * Hashtable (set)
  * Dictionary (map)
  * Stack / Queue
* C++
  * Reflection (macros)
  * Serialization
* IO
  * File Systems
    * Disk
    * Archive
  * Streams
    * Binary
    * Memory
    * Text
    * Console
* Mathematics
  * Vectors, Matrices, and Quaternion
  * Bounding Box (AABB, OBB) and Bounding Sphere
  * Shapes: Plane, Frustum, Capsule, Cylinder
  * Computations (Projections, Euler Angles)
  * Interpolations
  * Intersections (Box, Sphere, Ray, Line)
## Debug
* Log
  * Level
  * Filter
  * Formatter
  * Handlers
* Visualizers
  * Bounding Shapes
  * Normals
* Gizmos
  * Axis
  * Grid
  * Skeleton
## Input
* Keyboard
* Mouse
* Gamepad
## Graphics
* Scene Graph
  * Node Hierarchy
  * Transforms
* Geometry
  * Model / Mesh / Mesh Part
  * Skeleton and Bones
  * Socket support (attachments)
  * Procedural Geometry
    * Plane
    * Box
    * Sphere
* Shader System
  * Vertex and Pixel Shaders
  * Render States
  * Shader Uniforms
* Lighting
  * Forward Lighting with Point, Direction and Spot Lights
* Sky Box and Sky Dome
* Particles
  * Multiple Emitters
  * Multiple Sources (point, cube...)
* Terrain
  * Multiple Generators
* Font
  * Bitmap
  * TTF
* 2D
  * Sprites
* Sofware Rasterizer
* Sofware Raytracer
## Animation
* Transform Keyframes
* Morphing (CPU and GPU)
## UI
* Controls
  * Window
  * Panel / Scrollable Panel
  * Label
  * Text Box
  * Push Button
  * Checkbox Button
  * Radio Button
  * Progress Bar
  * List Box
  * Combo Box
  * Image (with support for render to texture)
* Theme support
* Modal dialogs
* Node Graph
## Audio
* Streaming
* Listener
* Audio Source
* Audio Channels
## Physics
* Rigid Body and Joints
* Physics Materials
* Collision (multiple shapes)
* Software Implementation
## AI
* State Machine (FSM)
* Pathfinding (A*)

# Third-Party
## Graphics
* Diect3D 8
* Diect3D 9
* OpenGL
* Cg
## Audio
* DirectSound 8
* OpenAL
## Input
* Windows
* DiectInput 8
* XInput
## Physics
* PhysX
* ODE

# Game Framework
* Entity
* Cameras
* Messaging and Events

# Formats
* .ZIP
* .DDS
* .BMP
* .TGA
* .DDS
* .3DS
* .OBJ
* .X
* .WAV
### Games
* Quake Models (.MDL, .MD2, .MD3) and Maps (.BSP)
* Unreal .PSK

# Samples
* Model Viewer
* Physics Sandbox
* AI (2D and 3D, Pathfinding)
* Scripting with LUA
* UI Gallery
* Procedural Texture Editor (node graph)
* Stealth Prototype (inspired by MGS)
* Terrain Prototype (vehicle driving)
* Sofware Rasterizer
* Sofware Raytracer

# Images
![](Images/bsp.jpg)
![](Images/stealth.jpg)
![](Images/editor.jpg)
![](Images/procedural.jpg)
![](Images/terrain.jpg)
![](Images/viewer.jpg)
![](Images/physics1.jpg)
![](Images/physics2.jpg)
![](Images/rasterizer.jpg)

repository: jdelezenne/Sonata

repo_name: jdelezenne/Sonata


text:
---
title: Method Chaining Pattern
author: Choi Hyowon
---
```swift
import Foundation

class Chain {
    var width: Int = 0
    var height: Int = 0
    var weight: Int = 0

    func setWidth(width: Int) -> Chain {
        self.width = width
        return self
    }

    func setHeight(height: Int) -> Chain {
        self.height = height
        return self
    }

    func setWeight(weight: Int) -> Chain {
        self.weight = weight
        return self
    }

    func print() {
        Swift.print("Width: \(width), Height: \(height), Weight: \(weight)")
    }
}

let chain = Chain()

// 메서드 체이닝 패턴을 안쓸때
chain.width = 100
chain.height = 100
chain.width = 100
chain.print()

// 메서드 체이닝 패턴을 쓸때
chain.setWidth(width: 100)
    .setHeight(height: 100)
    .setWeight(weight: 100)
    .print()
```


text:
# Case Study Notes

## Airbnb Experiences - Machine Learning Powered Search Ranking

* When creating personalization features it is very important not to “leak the label”
  * Such as exposing some information that happened after the event used for creating the label.
* When using GBDT (gradient boost decision tree), one does not need to worry much about scaling the feature values, or missing values (they can be left as is). However, one important factor to take into account is that, unlike in a linear model, <b>using raw counts as features in a tree-based model to make tree traversal decisions may be problematic when those counts are prone to change rapidly in a fast growing marketplace. In that case, it is better to use ratios of fractions.</b>
* [Reference][1]

[1]:https://medium.com/airbnb-engineering/machine-learning-powered-search-ranking-of-airbnb-experiences-110b4b1a0789

gha_language: Jupyter Notebook


text:
# This project uses Flask to create APIS to get information about paranuara planet.
### This needs python 3.6 or higher to run. If python3 is available as any alias other than python, please use that alias in virtualenv creation command.
#### For this to work, it is important that json files are placed at resources directory of the project.
### Setup

1. Run git clone https://github.com/sapangupta15/paranuara_planet.git to clone the project on local system.
2. Navigate to root directory of checkout path - BASE_PROJECT_DIR

---

#### Windows
RUN following commands in cmd line:
```bat
$ cd <BASE_PROJECT_DIR>
$ SET PYTHONPATH=<BASE_PROJECT_DIR>
$ SET DB_URL=mysql://<username>:<password>@<host>:<port>/<db_name>
$ <python_alias> -m venv venv
$ venv\Scripts\activate
$ pip install -r requirements.txt
$ pytest tests\
$ python db_migration.py
$ python paranuara_challenge\app.py
```

---
#### Linux/MacOS
RUN following commands in terminal:
```bash
$ cd <BASE_PROJECT_DIR>
$ export PYTHONPATH=<BASE_PROJECT_DIR>
$ export DB_URL=mysql://<username>:<password>@<host>:<port>/<db_name>
$ <python_alias> -m venv venv
$ source venv/bin/activate
$ pip install -r requirements.txt
$ $ pytest tests/
$ python db_migration.py
$ python paranuara_challenge/app.py
```

---
These steps essentially perform the following steps:
- navigate to project root directory
- set PYTHONPATH env variable
- set DB_URL env variable, which will be used by the main app, as well as db migrations script
- create virtual environment using python alias. e.g. if python3 is the alias, then use this command: python3 -m venv venv. Activate venv and install dependencies
- Run unit tests
- Run db migrations to create tables in database (This project yoyo-migratons. Checkout https://pypi.org/project/yoyo-migrations/4.2.0/ for more details). This also sets up the required data from json files into database.
##### For this to work, it is important that json files are placed at resources directory of the project.
- Run the flask app

The endpoints are available at for documentation as well as testing:
http://<IP_ADDRESS>:5000/swagger/

Alternatively, any API request tool like curl/wget or scripts using libraries like requests can be used for testing as well

There are 3 endpoints:
1. /employees - takes company_name as query param and returns employees for a company
2. /persons - takes 2 params, name1 and name2 and returns details for these persons as well as mutual funds who are alive and have brown eyes
3. /person - takes name as query param and returns details for person with that name. Also splits favourite food for the person into vegetables and fruits.


text:
# Workout-Tracker

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

## Description

As a user, I want to be able to view create and track daily workouts. I want to be able to log multiple exercises in a workout on a given day. I should also be able to track the name, type, weight, sets, reps, and duration of exercise. If the exercise is a cardio exercise, I should be able to track my distance traveled. A consumer will reach their fitness goals more quickly when they track their workout progress. The application uses Node, NPM, Express, MongoDB, Mongoose and Heroku.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [License](#license)
- [Contributing](#contributing)
- [Tests](#tests)
- [Questions](#questions)

## Installation

In order to download necessary tools, first clone the repository. Navigate inside the project folder. If you do not have Node.js or npm installed, you will first need to install them.
[Install Node.js and npm](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)

## Usage

[Link to Heroku Deployment](https://workout-tracker-alh.herokuapp.com/)

## License

Licensed under [Apache License 2.0](https://www.apache.org/licenses/LICENSE-2.0.html).

## Contributing

Anyone can participate in the project to submit bugs and make pull requests for anything from typos to new content.
If you are interested in fixing issues and contributing to this project, please refer to the [Contributor Covenant](https://www.contributor-covenant.org/).

## Tests

Currently no tests exists for the application.
If you would like to contribute and help us by writing them, see the [Contributing](#contributing) section.

## Questions

- Let's connect on Linkedin at [Angelica Hernandez](https://www.linkedin.com/in/angelica-hernandez-/)
- Follow me on Github at [angelicalorraine](http://github.com/angelicalorraine)
- For more questions contact me<EMAIL_ADDRESS>

repository: angelicalorraine/Workout-Tracker

repo_name: angelicalorraine/Workout-Tracker


text:
# QFXparser
Simple parser for .qfx and .qbo files.

Pass to the library a file path or a Strem and it will return a "Statement" object that contains the Account number and the list of Transactions.

Example:

```csharp
using QFXparser;

FileParser parser = new FileParser("C:\\filename.qbo");
Statement result = parser.BuildStatement();
```

The returned objects are:

**Statement**
```csharp
public class Statement
{
    public string AccountNum { get; set; }
    public ICollection<Transaction> Transactions { get; set; }
    public LedgerBalance LedgerBalance { get; set; }
}
```

**Transaction**
```csharp
public class Transaction
{
    public string Type { get; set; }
    public DateTime PostedOn { get; set; }
    public Decimal Amount { get; set; }
    public string TransactionId { get; set; }
    public string RefNumber { get; set; }
    public string Name { get; set; }
    public string Memo { get; set; }
}
```

**Ledger Balance**
```CSharp
public class LedgerBalance
{
    public decimal Amount { get; set; }
    public DateTime AsOf { get; set; }
}
```

### Transaction Dates
In case the financial institution is not including the timezone with the transaction date, we assume it is UTC.

Please let me know if any issues and if you like give a star.

Thanks to @DashNY for adding Ledger Balance and testing!

repository: eramella/QFXparser

gha_language: C#

repo_name: eramella/QFXparser


text:
---
id: index
title: Introduction
slug: /
---

A complete and local NVR designed for Home Assistant with AI object detection. Uses OpenCV and Tensorflow to perform realtime object detection locally for IP cameras.

Use of a [Google Coral Accelerator](https://coral.ai/products/) is optional, but strongly recommended. CPU detection should only be used for testing purposes. The Coral will outperform even the best CPUs and can process 100+ FPS with very little overhead.

- Tight integration with Home Assistant via a [custom component](https://github.com/blakeblackshear/frigate-hass-integration)
- Designed to minimize resource use and maximize performance by only looking for objects when and where it is necessary
- Leverages multiprocessing heavily with an emphasis on realtime over processing every frame
- Uses a very low overhead motion detection to determine where to run object detection
- Object detection with TensorFlow runs in separate processes for maximum FPS
- Communicates over MQTT for easy integration into other systems
- Recording with retention based on detected objects
- Re-streaming via RTSP to reduce the number of connections to your camera
- A dynamic combined camera view of all tracked cameras.

## Screenshots

![Media Browser](/img/media_browser-min.png)

![Notification](/img/notification-min.png)

repository: blakeblackshear/frigate

branch_name: refs/heads/dev

gha_language: Python

repo_name: blakeblackshear/frigate