text:
# PubNub demo application using Twitter Streaming API - backend

This is the backend part of the PubNub demo application which receives live tweets from the
Twitter Streaming API and publishes them using the [PubNub](https://www.pubnub.com/) Java client library.

Source code repository for the frontend:
[TwitterStreamingPubNubDemoFrontend](https://github.com/VictorGil/TwitterStreamingPubNubDemoFrontend).

Explanatory video on [YouTube](https://youtu.be/A0QXLJFLzm4)

## Requirements

 - Maven 3
 - Java 8+

## Usage

 - Sign up for a free developer account on [pubnub.com](https://www.pubnub.com/) in order to get your
**Publish** **key** and your **Subscribe** **key**.
 - Checkout the source code and set the values of the `pubnub_publish_key` and the `pubnub_subscribe_key` properties
in the [config.json](https://github.com/VictorGil/TwitterStreamingPubNubDemoBackend/blob/master/src/main/resources/config.json#L4)
file to the ones you got from PubNub after registering.
 - You also need one or more (up to three) sets of **Twitter Web API keys and tokens** in order to connect to the Twitter Streaming API,
you may watch [this video](https://youtu.be/KPHC2ygBak4) for the instructions. Then set the values accordingly in the
[config.json](https://github.com/VictorGil/TwitterStreamingPubNubDemoBackend/blob/master/src/main/resources/config.json) file.
 - Compile/build the application source code using Maven (`mvn clean install`)
 - Run the main class: [PublisherMain](https://github.com/VictorGil/TwitterStreamingPubNubDemoBackend/blob/master/src/main/java/net/devaction/pubnubdemo/main/PublisherMain.java)
Please note that the directory `src/main/resources` must be included in the classpath.

To gracefully shutdown the application on a Linux system, send the `WINCH` signal to the running Java process, i.e.:
```
$ kill -WINCH <PID>
```


text:
---
layout: post
title: More dynamic list sorting
tags:
- LINQ
- Sort
---

A little while ago, I looked into [dynamically sorting a list]({{ site.url }}/2010/10/31/Select-how-to-sort-a-list-dynamically/), based on a criterion supplied by the user. There was one limit on the solution I presented, however: only one criterion could be applied at a time. What if we wanted to sort by multiple criteria?
For instance, using the same example as in the previous post, if we had a list of `Products` with a Name, a `Supplier` and a `Price`, how would we go about sorting by Supplier and then by Price? Or by Name and then Supplier? And how could we make that flexible, so that we can sort by an arbitrary number of criteria. This would be particularly useful if we had in mind the development of a user interface where users could select how they want to see a list of items displayed on screen.

Besides `OrderBy`, LINQ provides the `[ThenBy](http://msdn.microsoft.com/en-us/library/bb534743.aspx)
<a href="http://msdn.microsoft.com/en-us/library/bb534743.aspx">` extension method. `ThenBy` is applied to an `IOrderedEnumerable` – a collection that has already been ordered – and sorts its, maintaining the existing order. For instance, in the following example, products are first sorted by `Supplier`, and for each `Supplier`, by `Price`:

``` csharp
private static void Main(string[] args)
{
   var apple = new Product() { Supplier = "Joe's Fruits", Name = "Apple", Price = 1.5 };
   var apricot = new Product() { Supplier = "Jack & Co", Name = "Apricot", Price = 2.5 };
   var banana = new Product() { Supplier = "Joe's Fruits", Name = "Banana", Price = 1.2 };
   var peach = new Product() { Supplier = "Jack & Co", Name = "Peach", Price = 1.5 };
   var pear = new Product() { Supplier = "Joe's Fruits", Name = "Pear", Price = 2 };

   var originalFruits = new List<Product>() { apple, apricot, banana, peach, pear };

   Func<Product, IComparable> sortByPrice = (product) => product.Price;
   Func<Product, IComparable> sortByName = (product) => product.Name;
   Func<Product, IComparable> sortBySupplier = (product) => product.Supplier;

   var sortedFruits = originalFruits
      .OrderBy(sortBySupplier)
      .ThenBy(sortByPrice);

   foreach (var fruit in sortedFruits)
   {
      Console.WriteLine(string.Format("{0} from {1} has a price of {2}.",
         fruit.Name,
         fruit.Supplier,
         fruit.Price));
   }

   Console.ReadLine();
}
```

<!--more-->

Note that this is not the same as the following:

``` csharp
var sortedFruits = originalFruits
   .OrderBy(sortBySupplier)
   .OrderBy(sortByPrice);
```

This version orders products by `Supplier` first, and then completely re-orders by `Price`, ignoring the initial sorting by `Supplier`.

Now that we know how to perform a hierarchical sort, let’s see if we can go further and make that more dynamic, by applying an arbitrary list of sorting criteria. Naively following the pattern we have established above, we need a list of sorting criteria, which we will apply in order, first using `OrderBy`, then `ThenBy`:

``` csharp
public static IEnumerable<Product> HierarchicalSort(
   IEnumerable<Product> products,
   IList<Func<Product, IComparable>> criteria)
{
   if (criteria == null || criteria.Count == 0)
   {
      return products;
   }

   var sorted = products.OrderBy(criteria[0]);
   for (var index = 1; index < criteria.Count; index++)
   {
      sorted = sorted.ThenBy(criteria[index]);
   }

   return sorted;
}
```

Let’s try that out, and use the HierarchicalSort method in place of the hard-coded sortedFruit:

``` csharp
var criteria = new List<Func<Product, IComparable>>();
criteria.Add(sortBySupplier);
criteria.Add(sortByPrice);

var sortedFruits = Sort.HierarchicalSort(originalFruits, criteria);
```

Running it produces the following output, sorting fruits by price for each supplier:

![HierarchicalSort]({{ site.url }}/assets/2010-12-26-HierarchicalSort_thumb.png)

That’s it – we now have a sorting method which will take an arbitrary list of criteria, and apply it in order to a list of items. It wouldn’t take much of an effort to turn it into a generic method – I trust that my smart readers won’t have much of a problem with that part.

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: CSS

gha_license_id: MIT

license_type: permissive


text:
# debian_full_setup
Sets up a minimal Debian system to a Debian system with my preferred defaults.

## Introduction
Rather than configure a system inch-by-inch, why not put everything into a few shell scripts and forget all your troubles?  This is what I prefer to do.  Doing a project such as this is great for practicing regular expressions with awk and sed, using wget and apt to install packages without a web browser, replacing config files with others from another git repository, automating system administration, and much more.

I've been using Debian Stable with KDE and backports for several years now, and expect my computer to never surprise me with noticable updates.

## Usage
These are what I use.  You'll likely need to get your hands dirty and change these where needed.  For instance, you should know your video driver in advance (intel, amd, nouveau, nvidia, etc).  Reboot after running each script in order.

## Todo
* Add KDE config files to the process
* Fully test on Buster

### 1. At the tasksel prompt during install, uncheck everything.

### 2. Run the following commands

#### a. Configure
```
$ sudo apt-get install git -y
$ git clone https://github.com/summonholmes/debian_full_setup.git
$ cd debian_full_setup
$ sudo sh -c "./1_configure.sh"
```

#### b. Update
```
$ sudo sh -c "./2_update.sh"
```

#### c. Install All
```
$ sudo sh -c "./3_install_all.sh"
```

gha_language: Shell


text:
# User

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | Unique Id | [optional]
**first_name** | **str** | First name | [optional]
**last_name** | **str** | Last name | [optional]
**display_name** | **str** | Full name for display (available only if both first_name and last_name are set) | [optional]
**email** | **str** | EMail address | [optional]
**is_disabled** | **bool** | Account has been disabled | [optional]
**avatar_url** | **str** | URL for the avatar image (may be generic) | [optional]
**home_space_id** | **str** | ID string for user's home space | [optional]
**personal_space_id** | **int** | ID of user's personal space | [optional]
**embed_group_space_id** | **int** | (Embed only) ID of user's group space based on the external_group_id optionally specified during embed user login | [optional]
**access_filters** | [**list[AccessFilter]**](AccessFilter.md) | Model access filters. | [optional]
**credentials_email** | [**CredentialsEmail**](CredentialsEmail.md) | Email/Password login credentials | [optional]
**credentials_totp** | [**CredentialsTotp**](CredentialsTotp.md) | Two-factor credentials | [optional]
**credentials_ldap** | [**CredentialsLDAP**](CredentialsLDAP.md) | LDAP credentials | [optional]
**credentials_google** | [**CredentialsGoogle**](CredentialsGoogle.md) | Google auth credentials | [optional]
**credentials_saml** | [**CredentialsSaml**](CredentialsSaml.md) | Saml auth credentials | [optional]
**credentials_oidc** | [**CredentialsOIDC**](CredentialsOIDC.md) | OpenID Connect auth credentials | [optional]
**credentials_api** | [**CredentialsApi**](CredentialsApi.md) | API user credentials. NO LONGER SUPPORTED. | [optional]
**credentials_api3** | [**list[CredentialsApi3]**](CredentialsApi3.md) | API 3 credentials | [optional]
**credentials_embed** | [**list[CredentialsEmbed]**](CredentialsEmbed.md) | Embed credentials | [optional]
**credentials_looker_openid** | [**CredentialsLookerOpenid**](CredentialsLookerOpenid.md) | LookerOpenID credentials. Used for login by Looker Analysts | [optional]
**sessions** | [**list[Session]**](Session.md) | Active sessions | [optional]
**role_ids** | **list[int]** | Array of ids of the roles for this user | [optional]
**group_ids** | **list[int]** | Array of ids of the groups for this user | [optional]
**presumed_looker_employee** | **bool** | User is identified as an employee of Looker | [optional]
**verified_looker_employee** | **bool** | User is identified as an employee of Looker who has been verified via Looker corporate authentication | [optional]
**looker_versions** | **list[str]** | Array of strings representing the Looker versions that this user has used (this only goes back as far as '3.54.0') | [optional]
**ui_state** | **dict(str, str)** | Per user dictionary of undocumented state information owned by the Looker UI. | [optional]
**locale** | **str** | User's preferred locale. User locale takes precedence over Looker's system-wide default locale. Locale determines language of display strings and date and numeric formatting in API responses. Locale string must be a 2 letter language code or a combination of language code and region code: 'en' or 'en-US', for example. | [optional]
**url** | **str** | Link to get this item | [optional]
**can** | **dict(str, bool)** | Operations the current user is able to perform on this object | [optional]

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

gha_language: Python


text:
# Contributing Guidelines

Please read this before contributing.

## Rules

- Be nice and respectful.
- English only.
- Be constructive.
- Please feel free to *review changes* in the *files changed* tab of any
  pull request at any time.
- See also our [Code of Conduct](https://github.com/privacytoolsIO/privacytools.io/blob/master/CODE_OF_CONDUCT.md)

## Quality over Quantity

We're trying to keep it simple and promote the best tools, not all of them.

## Software Criteria
### Main
- Easy to use. Could your mother use that tool or service? Usability is most important.
- Cross-platform / Accessible.
- Privacy respecting.
- Open Source / Free Software is preferred but not required.
- Must list source code in [source_code.md](https://github.com/privacytoolsIO/privacytools.io/blob/master/source_code.md) (if applicable)
- Prioritize Products without Vendor Lock-in (decentralized/self-hostable) or data interoperability.

There can be exceptions if no software is available that meet the criteria.

Note: This criteria applies to all of privacytools.io
### Providers
- Prioritize Products by privacy respecting nationality.

### DNS

- supports DoH or DoT (We love DNSCrypt, but there is already https://github.com/DNSCrypt/dnscrypt-resolvers which is directly supported by dnscrypt-proxy, so we don't consider useful to list providers only supporting it).
- supports DNSSEC (https://dnssec.vs.uni-due.de/ can test your current DNS provider).
- doesn't log IP addresses during normal operation (If your suggestion logs, please compare its privacy policy with other servers on our table that keep logs).
- preferably supports QNAME minimization (if you have access to the dig command, `dig +short txt qnamemintest.internet.nl` or `Resolve-DnsName -Type TXT -Name qnamemintest.internet.nl` if you are on Windows 10)

### VPN
- Prioritize Products by privacy respecting nationality.
- Cannot be based in USA or UK.
- Must be accessible via Open Source Software (i.e OpenVPN, WireGuard)
- Use Encryption
- Accept Cryptocurrency
- No logging policy

### Email
- Outside of USA
- Support SMTP SSL
- Accessable Using Open Source Software (i.e IMAP)

### Hardware
- Must be [H-Node Class A](https://h-node.org/wiki/page/en/compatibility-classes) or equivalent (if applicable)
- Must prioritize hardware certifications like [RYF](https://ryf.fsf.org/), [OSHWA](https://certification.oshwa.org/), and OSI when avalible.
- Cannot lock users to a particular platform.

### Software
- Must be able to download over encrypted network (can be a mirror)
- Must be Open Source Software

### Encryption
- Only verifiable encryption is to be trusted

### OSes
- Must state if recommends, depends on, or offers non-free software (contrib)
- No Tracking Policy (opt-in analytics is ok)

## Images

- Provider logos are 200px x 70px ([example](https://www.privacytools.io/assets/img/provider/AirVPN.png))
- Tool logos are 120px x 120px ([example](https://www.privacytools.io/assets/img/tools/ChatSecure.png))


text:
---
name: 'SoA Thesis Homepage 2020'
type: 'web'
slug: 'soathesis20'
date: '2020-05-20'
thumbnail: thumbnail.jpg
---

As development lead on Carnegie Mellon University's School of Architecture web presense in Spring 2020, I was tasked with creating a responsive homepage to greet those entering the [thesis gallery](http://thesis.soa.cmu.edu).

Design: Michael Powell, Rachel Park

Development: Lukas Hermann

![Desktop view](desktop.jpg)

![Responsive view](resize.gif)

![mobile](mobile.jpg)

gha_language: JavaScript


text:
---
layout: post
title: " TypeError: 'int' object is not iterable"
published: true
comments: true
tags : python static-typing dynamic-typing
---
Recently i started to learn python. For a long time, i wanted to learn a scripting language. i thought i would learn python by solving [spoj](http://www.spoj.com/) problems.spoj is a site that has a set of programming problems and one can write code in any language to solve it.On solving the problem ,the solution is submitted to a spoj server and is evaluated for its correctness by running it across a set of test cases.Its good site to get used to solving programming problems.

I started writing some of the basic problems to get an idea of working with python.One thing i stumble often is  dynamic typed feature of python, it could lead to subtle errors while programming. I not blaming the language but its something that people from static typed language find it a bit hard at first.In static typed language, the variables are checked at compile time their types and hence one can avoid common errors of type changes easily.

The problem i am faced was because of dynamic typing and it startled me for a second. It was fun and i wanted to kick myself when i found it.Here it goes

I was trying to solve the problem of finding the number of trailing zeros for factorial.This was a solution, to one of the spoj problem.In order to get the input, which will contain all the numbers to find the solution i ended up writing a code as below

{% highlight python linenos=table %}
#finding the number of zeros in factorial
# the trick is to find the number of 5 and its factors
AllInputs = []

#get the number of inputs
numberOfInputs = input()

# get all the inputs
for i in range(numberOfInputs) :
	AllInputs = input()

for number in AllInputs :
	# logic to handle the inputs
{% endhighlight %}

Now on executing the program on input i ended up getting the following error

```
Traceback (most recent call last):
  File "test4.py", line 13, in <module>
    for number in AllInputs :
TypeError: 'int' object is not iterable
```
In the above code line 13 is accessing all the input values. I was wondering that i have already declared `AllInputs` as in list in line 1. This got me confusing and on closer look at code the culprit was the below line

{% highlight python  %}
# get all the inputs
for i in range(numberOfInputs) :
        AllInputs = input()
{% endhighlight %}

In the assignment section i have mistakenly converted the array into a integer and python being a dynamically typed language did not warn me of the change in type :)

The fix was of course a simple one

{% highlight python  %}
for i in range(numberOfInputs) :
	AllInputs.append (input())
{% endhighlight %}

The above problem tought me more about static typed language and dynamic typed language more than i could have ever understood or learnt from book.


text:
## Example

* Add repository manager on your application.

![img](/images/workflows.pipelines.actions.builtin.gitclone-repo-manager.png)

* Job Configuration.

![img](/images/workflows.pipelines.actions.builtin.gitclone-edit-job.png)

* Launch workflow, you can select the git branch.

![img](/images/workflows.pipelines.actions.builtin.gitclone-run-workflow.png)

* View logs on job

![img](/images/workflows.pipelines.actions.builtin.gitclone-run-job.png)

## Notes

By default, depth is 50 and git clone with `--single-branch` automatically.
So, if you want to do in a step script `git diff anotherBranch`, you have to set depth to 'false'.

If there is no user && password && sshkey set in action GitClone, CDS checks on Application VCS Strategy if some auth parameters can be used.

repository: ovh/cds

gha_language: Go

repo_name: ovh/cds


text:
## SA1515

  TypeName
  SA1515SingleLineCommentMustBePrecededByBlankLine

  CheckId
  SA1515

  Category
  Layout Rules

## Cause

A single-line comment within C# code is not preceded by a blank line.

## Rule description

To improve the readability of the code, StyleCop requires blank lines in certain situations, and prohibits blank lines
in other situations. This results in a consistent visual pattern across the code, which can improve recognition and
readability of unfamiliar code.

A violation of this rule occurs when a single-line comment is not preceded by a blank line. For example:

```csharp
public bool Enabled
{
    get
    {
        Console.WriteLine("Getting the enabled flag.");
        // Return the value of the 'enabled' field.
        return this.enabled;
    }
}
```

The code above would generate an instance of this violation, since the single-line comment is not preceded by a blank
line.

An exception to this rule occurs when the single-line comment is the first item within its scope. In this case, the
comment should not be preceded by a blank line. For example:

```csharp
public bool Enabled
{
    get
    {
        // Return the value of the 'enabled' field.
        return this.enabled;
    }
}
```

In the code above, the comment is the first item within its scope, and thus it should not be preceded by a blank line.

If the comment is being used to comment out a line of code, begin the comment with four forward slashes rather than two.
This will cause StyleCop to ignore this violation. For example:

```csharp
public bool Enabled
{
    get
    {
        Console.WriteLine("Getting the enabled flag.");
        ////return false;
        return this.enabled;
    }
}
```

## How to fix violations

To fix a violation of this rule, add a blank line above the comment.

## How to suppress violations

```csharp
[SuppressMessage("StyleCop.CSharp.LayoutRules", "SA1515:SingleLineCommentMustBePrecededByBlankLine", Justification = "Reviewed.")]
```

```csharp
#pragma warning disable SA1515 // SingleLineCommentMustBePrecededByBlankLine
#pragma warning restore SA1515 // SingleLineCommentMustBePrecededByBlankLine
```

repository: AraHaan/StyleCopAnalyzers

gha_language: C#

repo_name: AraHaan/StyleCopAnalyzers


text:
# Table of Contents
- [Building](#building)
- [Python](#python)
- [Default Values and Constants (block_module.c)](#default-values-and-constants-block_modulec)
  - [Notes](#notes)
  - [`#define` constants](#define-constants)
- [Functions](#functions)
  - [`pico_config()`](#pico_config)
    - [Description](#description)
    - [Parameters](#parameters)
    - [Returns](#returns)
  - [`pico_init()`](#pico_init)
    - [Description](#description-1)
    - [Parameters](#parameters-1)
    - [Returns](#returns-1)
  - [`pico_get_data()`](#pico_get_data)
    - [Description](#description-2)
    - [Parameters](#parameters-2)
    - [Returns](#returns-2)
  - [`pico_close()`](#pico_close)
    - [Description](#description-3)
    - [Parameters](#parameters-3)
    - [Returns](#returns-3)
  - [`pico_get_sample_interval()`](#pico_get_sample_interval)
    - [Description](#description-4)
    - [Parameters](#parameters-4)
    - [Returns](#returns-4)

# Building
Assuming the picoscope driver libraries are properly installed, `sh build.sh` will build the block_module.

TODO: Convert to makefile.

# Python
View the `sample.py` file for an example work flow. Module is imported with `import pico_module`.

# Default Values and Constants (block_module.c)
## Notes
All variables not listed here should not be modified, or modifying them has no effect on the program (IE they are set by the program).

## `#define` constants
The `#define`'d constants specify default settings and should only be changed if the sub hardware changes. Otherwise, `pico_config` should be used.

* `DEF_NUM_CHANNELS` - The number of channels that the oscilloscope reads data from. Generally = **4**.
* `DEF_DIRECTION` - The signal direction for a trigger to occur. Uses named constants from `libps2000a-1.1/ps2000aApi.h`. See table below for values. **Bolded** value is the one we use. See the [PS2000A API](https://www.picotech.com/download/manuals/ps2000apg.en-6.pdf) for more details on what each constant means.

Option |
-------|
**PS2000A_RISING** |
PS2000A_FALLING |
PS2000A_ABOVE |
PS2000A_BELOW |
PS2000A_RISING_OR_FALLING |

* `DEF_THRESHOLD` - The threshold value for a trigger to occur. Has a range of `-32512` (-100%) to `32512` (100%). `INPUT_VOLTAGE` (below) provides context for what those values mean. Example: for PS2000A_100MV -- `THRESHOLD` = `16512` means the trigger will occur at 50%, or 50mv. Default value is **6000**
* `DEF_NUM_SAMPLES` - In block mode, this has a hard upper limit of 48000 / number of active channels = **12000**
* `DEF_INPUT_VOLTAGE` - This is the voltage range for the output data. It uses named constants from `libps2000a-1.1/ps2000aApi.h`. See the table below for valid values. Note that the actual output by the driver is always the same (`-32512` to `32512`), but this setting gives it meaning (Example: for `PS2000A_100MV` -- 100mv = `32512`, -50mv = `-16256` ). The value in **bold** has been found to work in most situations for the hardware at the time of this writing (2018-06-06)

Millivolts    | Volts
--------------|-------------
PS2000A_20MV  | PS2000A_1V
PS2000A_50MV  | PS2000A_2V
**PS2000A_100MV** | PS2000A_5V
PS2000A_200MV | PS2000A_10V
PS2000A_500MV | PS2000A_20V

* `DEF_SAMPLE_INTERVAL` - Manually setting this in block mode has no effect.
* `DEF_PRE_TRIGGER_SAMPLES` - **It has not yet been confirmed if this has any effect on the operation of the program.** It is supposed to set the number of samples recorded and returned before a trigger occures.
* `DEF_AUTO_TRIG_MS` - **It has not yet been confirmed if this has any effect on the operation of the program.** It is supposed to automatically trigger data collection after X milliseconds have passed with no trigger (so the picoscope doesn't get 'stuck').
* `DEF_TIMEBASE` - The starting value for searching for a timebase. Default value is **35**. See the [PS2000A API](https://www.picotech.com/download/manuals/ps2000apg.en-6.pdf) for more information on timebases.

# Functions
## `pico_config()`
### Description
#### `pico_config(numChannels, direction, threshold, numSamples, inputVoltage, preTrigSamples, autoTrigMS, timebase)`
Configures the picoscope based on the given parameters. If a parameter or a combination of parameters is invalid, returns a string specifiying which parameter is invalid. If all parameters are valid, returns `"OK"`.
### Parameters
* `numChannels (int)` - the number of channels to record data from. `1 <= numChannels <= 4`
* `direction (string)` - a string representing the signal direction for a trigger to occur. Valid options are:
  * `"RISING"`
  * `"FALLING"`
  * `"ABOVE"`
  * `"BELOW"`
  * `"RISING_OR_FALLING"`
* `threshold (int)` - when the trigger should occur. `-32512 <= threshold <= 32512`
* `numSamples (int)` - the number of samples to collect. `1 <= numSamples <= 12655`
* `inputVoltage (string)` - a string specifying the input voltage. Valid options are:
  * `"20MV"`
  * `"50MV"`
  * `"100MV"`
  * `"200MV"`
  * `"500MV"`
  * `"1V"`
  * `"5V"`
  * `"10V"`
  * `"20V"`
* `preTrigSamples (int)` - the number of samples to collect before the trigger occurs. `preTrigSamples <= numSamples`
* `autoTrigMS (int)` - how long the picoscope should wait in milliseconds before auto triggering
* `timebase (int)` - the timebase to use for data collection. affects sampling rate (lower value = higher sampling rate)
### Returns
If all parameters are valid, returns the string `"OK"`.
If a parameter is invalid, returns which parameter is invalid and a short description why.
## `pico_init()`
#### `pico_init(int debug)`
### Description
Must be called before `pico_get_data()` and `pico_close()`. Connects to and initializes the picoscope. Initialization includes allocating memory, configuring channels, and establishing the timebase (sampling rate).
### Parameters
Parameter | Description
--------------|-------------
int debug | 0 = false. When enabled, outputs some debugging/logging information to the terminal window.
### Returns
Returns the handle for the picoscope. **This must be saved in your python code in order to retrieve data and properly close the unit.**
## `pico_get_data()`
#### `pico_get_data(int handle)`
### Description
Retrieves the next data sample available (whenever the next trigger occures). Can be called repeatedly between opening and closing the unit. Must call `pico_get_sample_interval()` to determine the sampling interval of the data (otherwise the data has no real meaning).
### Parameters
Parameter | Description
--------------|-------------
int handle | The handle value returned by `pico_init()`.
### Returns
Returns a 2D array containing the captured values. The array has the format `arr[CHANNEL][SAMPLE]`.
## `pico_close()`
#### pico_close(int handle)
### Description
Closes the picoscope. Must be called before the python program closes or else the resources will be list and the device must be unplugged.
### Parameters
Parameter | Description
--------------|-------------
int handle | The handle value returned by `pico_init()`.
### Returns
Nothing.
## `pico_get_sample_interval()`
#### pico_get_sample_interval()
### Description
Returns the actual sampling interval used by the picoscope. The returned value indicates how many nanoseconds pass between each sample.
### Parameters
None.
### Returns
Returns the actual sampling interval used by the picoscope.


text:
# HexViewer
Read the binary data of a file in hex

# Updated Rust Version
Better rust version: https://github.com/JakeRoggenbuck/hexviewer-rs

# Usage
```
python3 main.py -i video.mp4
```

![Example image](https://github.com/JakeRoggenbuck/HexViewer/blob/main/screenshot.png?raw=true)

repository: JakeRoggenbuck/HexViewer

branch_name: refs/heads/main

repo_name: JakeRoggenbuck/HexViewer


text:
---
title: "Lossless-sente-export: read me"
author: Till Grallert
date: 2022-10-31
---

The academic reference manager [Sente for OSX and iOS](http://www.thirdstreetsoftware.com) has become abandonware. The [forum](http://sente.tenderapp.com) was deleted in late 2015 without any warning to the community and without any attempt at preserving this huge knowledge base. In Fall 2017, sync servers were suddenly shut down.
Sente natively supports a number of export options of bibliographic data as well as annotated PDFs, but these are either somewhat incomplete or cannot be used in batch mode. Thus, we have to conceive of ways to export absolutely everything from Sente into an open format.

# Problem 1: incomplete XML export

Sente supports XML export following its own schema; but some important information is missing from this export,

- particularly for the notes attached to PDFs:
    - colour of the note;
    - the UUID of the PDF this note is pointing to (important in the case of more than one attachment to a reference);
    - exact location of the note in the PDF.
- other information missing:
    + the collections a reference is part of;[^1]

## Solution

Sente stores all data in an open-source SQLite database and thus all necessary information can be retrieved using appropriate SQL queries. This requires in-depth knowledge of the underlying database's structure, which some people in the community have already acquired. [*Mrobe*](https://github.com/mrobe), for instance, built his immensely helpful and popular "[Sente Assistant](https://github.com/mrobe/senteAssistant)" on direct queries to the underlying database.

After some poking around, I settled on using the free, multi-platform [SQLiteStudio](http://sqlitestudio.pl) to export all tables as generic XML. This export is then be transformed into standard Sente XML with a few custom additions using the XSLT stylesheet [`tss_generate-xml-from-sql.xsl`](xslt/tss_generate-xml-from-sql.xsl) in this repository.

- to do:
    + write/adopt the XML schema for Sente XML in order for processing tools to know what to expect when presented with our XML output.
- currently implemented templates
    + main template for all `<tss:reference>`s, including all custom fields
    + generating `<tss:notes>`
        * only some parts of the JSON serialisation of position in file, location on page, color, etc. have been translated into CSS styling attributes
        * The entire JSON serialisation is kept for further processing in a new custom child of `<tss:note>` named `<tss:annotationDetails>`

    ```xml
    <tss:note
     xml:id="uuid_0B3368F6-BF56-49BE-94B5-396D0B7F50BC"
     correspReference="#uuid_21D0D0DC-FFFE-4DF7-B588-EF192D1427B9"
     correspAttachment="#uuid_CFF6C9A0-BCCD-47FC-8359-B8BDAD3FE4B1"
     editor="Sente User Sebastian"
     when-iso="2017-12-17T09:18:22+0000"
     style="display:block; border-style:solid; border-radius: 3px; border-width: 4px; border-color: rgba(1,0.3137255,0.3137255,0.2);">
        <title>test note</title>
        <comment>Some comment</comment>
        <quotation>ḥawādith al-wilāya</quotation>
        <pages>1</pages>
        <locationInAttachedFile>{"Encoding":"V1","X":559.4985,"Page":1,"Y":641.07}</locationInAttachedFile>
        <annotationDetails>{"Encoding":"V1","Selection Original Ending Point":"{551.498474,504.381134}","Type":"Highlighted Text","Original Selection Mode":"Region","Selection Target Zone":"{{430.897891,504.381134},{120.600583,136.688866}}","Rectangles":[{"Stroke RGBA":[1,0.3137255,0.3137255,0.2],"Bounds":"{{430.897891,504.381134},{120.600583,136.688866}}","Stroke Width":4,"Corner Radius":3}],"Selection Original Starting Point":"{430.897891,641.070000}"}</annotationDetails>
    </tss:note>
    ```

    + generating `<tss:attachments>`
        * Problem: local paths are stored as alphanumerical strings using Base64. There are numerous implementations to convert `xs:base64Binary` to `xs:string` but none of the available extensions ([saxon's `saxon:base64Binary-to-string`]() and [EXPath's `bin:decode-string()`](http://expath.org/spec/binary#decode-string)) and [stylesheets](https://github.com/ilyakharlamov/xslt_base64) is both free to use and can deal with unicode. Thus, I decided to leave base64 binary data as it is.
        * example XML:

    ```xml
    <tss:attachmentReference
     xml:id="uuid_9F730A80-E794-4726-8141-D37EEF4B51F5"
     correspReference="#uuid_9ED5D922-8984-4EBB-951B-11919769814A"
     type=""
     editor="Sente User Sebastian"
     when-iso="2017-11-07T11:11:42+0000">
        <name/>
        <URL>(null):images/pdfs/oclc_792755216-i_1.pdf</URL>
    </tss:attachmentReference>
    ```

    + generating `<tss:keywords>`

    ```xml
    <tss:keyword
     assigner="Sente User Sebastian"
     correspReference="#uuid_21D0D0DC-FFFE-4DF7-B588-EF192D1427B9">Source</tss:keyword>
    ```

## Workflow

1. Download and install [SQLiteStudio](http://sqlitestudio.pl)
2. Open your Sente library with SQLiteStudio
    - on macOS do the following:
        + In the Finder, right-click on your Sente library and select `Show Package Contents`.
        + The actual SQLite database is then located at `Contents/primaryLibrary.sente601`
3. Export all tables emphasised in bold in the documentation below to XML using the table names as file names.
    1. **Attachment**
    2. **AttachmentLocation**
    3. **Author**
    6. **Keyword**
    8. **LibraryProperty**
    9. **Note**
    14. **Reference**
    21. **SparseAttribute**
    24. **VersionedLibraryProperty**
4. Clean the export: as of October 2022, this is no longer necessary
    1. Open all XML files in a text editor and manually remove the trailing `<index>` nodes from every XML file as these prevent the files from being well-formed XML.
    2. Remove invalid XML characters. The cause is bibliographic data imported from non-English references and notes on OCRed PDFs. If nothing else is provided, replace with spaces
        - ``
        - ``
        - ``: " "
        - ``
        - ``
        - ``
        - ``
        - ``
        - ``
        - ``
        - ``
        - ``: "ft"
        - ``
        - ``
        - ``
        - ``
        - ``
        - ``
        - ``
        - ``
        - ``
        - ``
        - ``: "fl"
        - ``: "ff"
        - ``
        - ``
        - ``
        - ``
        - ``: ü
        - ``
5. Run the stylesheet [`tss_generate-xml-from-sql.xsl`](xslt/tss_generate-xml-from-sql.xsl) on `Reference.xml`. The output file `compiled.TSS.xml` contains all information available in the SQLite database. It will be saved in the `_output/` folder and can be used for further processing.

    Options to apply the transformation include:

    + running [Saxon-HE](http://saxon.sourceforge.net/#F9.8HE) for Java in the terminal:

    ```bash
    $ java -jar "path/to/saxon9he.jar" -s:"path/to/Reference.xml" -xsl:"path/to/tss_generate-xml-from-sql.xsl"
    ```

    + using one of the XML editors that include an XSLT processor, such as oXygen (30 days trial licences available)
        * In this case, you should set the parameter `$p_limited-to-saxon-he` to `false()` in order to translate base64 binary data to proper file paths to attachments.

# Problem 2: no batch export of annotated PDFs

Sente does not allow for bulk export of annotated PDFs. One idea would to write a script using macOS' GUI scripting to perform manual clicks and let it run for days on end. Another option would be to somehow use XSL-FO to add notes to PDFs using the information in the "Note" table.

# Convert to useful data format
## Zotero

I provide the necessary code to convert Sente XML to Zotero RDF (XML) in [another repository](https://github.com/tillgrallert/convert_tss-to-bibliographic-data). I have made extensive use of this code and it works reliably with all built-in reference types (and a number of custom types specific to my work). It also retains the Sente Citation ID as the BibTeX Key for continued use in publications.

# Documentation
## Database structure: tables

1. **Attachment**
2. **AttachmentLocation**
3. **Author**
4. Collection: one row for every collection
5. CollectionReference: empty
    - this table was clearly planned to contain information on which references is part of which collection, but this information was never stored here.
6. **Keyword**
7. Library: empty
8. **LibraryProperty**: stores basic settings, including the path to the Sente library and thus attachments. If you have access to Saxon PE or Saxon EE, export this table as XML
9. **Note**:
    - This is the most important table to improve the generic XML export
    - contains information otherwise missing as JSON:
        + color
        + the file this note is attached to
        + location on the page
        + size
        + date edited
10. NoteKeyword: empty, was never implemented
11. QLP_SchemaTable: not necessary
12. RDFTuple
    - logs PDF reading posistions
14. **Reference**
15. ReferenceAllSearchableFields
    - replicates the content of "References"; fields are separated by pipe characters
17. ReferenceFilter
18. ReferenceSignature
19. ReferenceSignatureDefinition
20. SenteQuery: empty
21. **SparseAttribute**
    - contains all custom fields
23. Thumbnail
24. **VersionedLibraryProperty**
    - this table contains JSON
        + *QuickTag* list and hierarchy
        + *status* definitions
        + *hotwords* definitions
        + custom publication types
        + custom reference fields
        + layouts for the reference editor by reference type
        + autolink definitions

## Issues

- the order of columns in tables differs between Sente libraries (why?!). This requires additional pre-processing
- currently, I have found different sequences of columns in
    + `Note`
    + `Attachment`

[^1]: It is unclear where this information is kept in the SQLite data base

repository: tillgrallert/lossless-sente-export

repo_name: tillgrallert/lossless-sente-export


text:
# Gotlib Cli

Have you also always wanted to be able to borrow your books through the terminal?
**Gotlib Cli** makes this possible and is the result of me wanting to play around with the web scraping tool [Puppeteer](https://github.com/puppeteer/puppeteer).
Built with Typescript.

## About This Project

- Log in to your library account through the terminal.
- Search for books and borrow.
- Manage your account and cancel reservations you do not want.

## How To Use It

- 1. Clone the repository using `git clone https://github.com/jesperlndqvst/gotlib-cli` in your chosen terminal.
- 2. Enter the project folder using the command `cd gotlib-cli`.
- 3. Create a file named `.env` in the root of the project and enter your library log in credentials that you use when you log in to [Gotlib](https://encore.gotlib.goteborg.se/) according to the `.env-template`.
- 4. Install the dependencies and run the project by using the command `npm install && npm start`.

## Preview
![preview](https://user-images.githubusercontent.com/8672087/109429982-25a31c00-79ff-11eb-834b-8eac11531cc9.gif)

## Author

- [Jesper Lundqvist](https://github.com/jesperlndqvst)

## License

This assignment is licensed under the MIT License. You can get all the details [here](https://github.com/jesperlndqvst/gotlib-cli/blob/master/LICENSE).

repository: jesperlndqvst/gotlib-cli

repo_name: jesperlndqvst/gotlib-cli


text:
![cgat-showcase](https://github.com/cgat-developers/cgat-showcase/blob/master/docs/img/CGAT_showcase.png)
=======

cgat-showcase is a repository containing an example pipeline constructed to demonstrate how the [cgat-core](https://github.com/cgat-developers/cgat-core) workflow management system can be used to create common workflows required in bioinformatics analysis.

Within this repository is an example [pipeline](https://github.com/cgat-developers/cgat-showcase/blob/master/cgatshowcase/pipeline_transdiffexprs.py) `pipeline_transdiffexprs.py` that performs pseudoalignment of fastq files
with [kallisto](https://pachterlab.github.io/kallisto/about.html) and differential expression using [DESeq2](https://www.bioconductor.org/packages/release/bioc/html/DESeq2.html). It can be run locally on your own machine or distributed across a cluster depending on your requirements.

Documentation on how to run this pipeline can be found [here](https://cgat-showcase.readthedocs.io/en/latest/) and documentation on how
to build your own custom workflow from scratch can be found [here](https://cgat-core.readthedocs.io/en/latest/defining_workflow/Tutorial.html).

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

The following sections describe how to install the cgat-showcase pipeline.

We recommend installing using conda and the steps are described below::

   `conda install -c cgat cgatshowcase`

Alternatively, the pipeline can be installed using pip::

   `pip install cgatshowcase`

However, you will require certain software to run the pipeline. More detail on installation can be found on the [Installation](https://cgat-showcase.readthedocs.io/en/latest/getting_started/Installation.html) documentation.

Installation issues
-------------------

Conda installation can be quite slow (particularly for linux) and this is primarily an issue
with the conda solver, which is known and conda developers are working on making it faster, so if installation
is taking a long time then try to install using one of our conda-envs
(see conda-envs/environment-mac.yml or conda-envs/environment-linux.yml).

	`conda env create -f [environment-mac.yml/environment-linux.yml]`

repository: cgat-developers/cgat-showcase

gha_license_id: NOASSERTION

repo_name: cgat-developers/cgat-showcase


text:
# Password Locker

## Created By Cynthia.K, 12th February,2019

## Description
Password Locker is a terminal run python application that allows users to store details i.e. usernames and passwords of their various accounts.the user have to firstly create an accout,then login after login.he/she have to type dp for displaying all password saved,or type fp for seaching passord by name or type del to delete an account created or type gp to generate a password.

## installation requirement
* clone the repository in your computer
* type python3.6 to ensure that you have installed python in your computer
* in terminal move to clone project folder
* run python3.6 run.py
now you view the app in terminal

## Specifications
tha app hhandle the following process to run:
he/she have to write her name and fill the form and after click on enter he/she have to login by using his name he had fill and tha password he had fill when he/she fill the first form after that process he/she have to continue by creating new account where he/she have to put credential name and password to save it.after that he had also poassibility to type dp to see all password saved,after that he can also type fp to find password by the name.he can also generate password by type name and the length so that computer automatically provide the password.he/she can type del to delete the account
## short code
* np:create new account
* dp:display all saved password
* fp:search password by name
* gp:generate password
* del:delete account
* ex:exit

### Cloning
* In your terminal:

        $ git clone https://github.com/KAYITARES/githubsearch.git
        $ cd Password-Locker

## Running the Application
* To run the application, in your terminal:

        $ chmod +x password_locker.py
        $ ./password_locker.py

## Testing the Application
* To run the tests for the class file:

        $ python3.6 user_credentials_test.py
## Bugs
No bugs so far. but you can steel make a research on how you can use database with pyhon to better save all created password. If found, email me at<EMAIL_ADDRESS>
## Technologies Used
* Python3.6
* github
* Terminal
## support
For any support please contact me on:
Phone:0788774039
<EMAIL_ADDRESS>## License
**[MIT](http://choosealicense.com/licenses/mit)** copyright©2019 **Cynthia kayitare**

repository: KAYITARES/password-lock

repo_name: KAYITARES/password-lock


text:
## 2.6.0
* Updated after breaking changes:
  * Removed dependency on displayBuffer
  * Fixes bugs with task management
  * Tests are broken, so they are removed temporarily until a solution is found

## 2.5.1
* Added timestamp command to menu and readme

## 2.5.0
* Rewrote grammar to prevent extra markers from highlighting
* Added support for highlighting urls inline
* Added new command for adding/updating the timestamp on a task

## 2.4.0
* Added hotkey for convert-to-task

## 2.3.0
* Added support for markdown highlighting in tasks

## 2.2.0
* Added setting for controlling the attribute marker

## 2.1.0
* Added setting for controlling the archive separator

## 2.0.2
* Fix for removal of bufferColumnForToken

## 2.0.1
* Fix for bug with urls in tasks

## 2.0.0 - Big Ol Rewrite
* Major rewrite of core code
* Moved archive tasks hotkey to cmd-shift-a
* Convert a non-task to a task
* Optimized performance for larger files
* Colors improved
* Supports line wrapping
* Added status bar item for progress
* Added utility functions for managing tags
* Supports complex tokens like [ ], [x]
* Menu commands have spaces in names

## 1.4.1 - Readme update
* Updated hotkeys in readme

## 1.4.0 - Tags for status
* Now uses line tags to dictate state (improves support for taskpaper)
* Project whitespace fix (thanks @JohannWeging)
* Added shortcut for adding a tag above

## 1.3.0 - Wrapping support
* Updated grammar to support multi-line items

## 1.2.5 - More fixes and cleanup
* Removed some editor deprecations
* Fixed the specs
* General cleanup

## 1.2.4 - Deprecation Fixes
* Updated to fix deprecation notices

## 1.2.2 - ShadowDom Support
* Updated stylesheet selector to support shadow dom editor

## 1.0.1 - Fix updating to new grammar
* Open todo/tasklist files will reload their grammar on settings-change

## 1.0.0 - Overhaul of Grammar
* Grammar now set via code
* Added ability to change markers via settings

## 0.5.0 - Added task cancelling
* Users can now cancel tasks
* Fixed display of context menu to only show on todo files

## 0.4.0 - Added custom date format settings
* Added momentjs back in
* Added custom setting for date format
* Added function to convert dates in-file to format in settings

## 0.3.0 - Removed Momentjs dependency
* Removed momentjs

## 0.2.1 - Changelog
* Finally filled out the changelog
* Fixed some formatting in readme

## 0.2.0 - Publish to Atom
* First publish to atom listing

## 0.1.0 - First Release
* Base syntax highlighting
* Actions for adding new tasks
* Actions for completing tasks
* Actions for archiving

repository: sanata-/dotenv

repo_name: sanata-/dotenv


text:
> [Go to French version](/fr/Règlements/Textes%20réglementaires/2019/56.md)

# Order Designating the Minister of Employment and Social Development, a member of the Queen’s Privy Council for Canada, as the Minister for the purposes of that Act

**SI/2019-56**

Enabling authorities:
- [ACCESSIBLE CANADA ACT](/en/Acts/Statutes%20of%20Canada/2019/c.%2010.md)

Date registered: 24 July 2019

----------

Her Excellency the Governor General in Council, on the recommendation of the Prime Minister, pursuant to section 4 of the [Accessible Canada Act](/en/Acts/Statutes%20of%20Canada/2019/c.%2010.md)[a], designates the Minister of Employment and Social Development, a member of the Queen’s Privy Council for Canada, as the Minister for the purposes of that Act, effective July 11, 2019.

a: S.C. 2019, c. 10

repository: TravisMadill/CanadianLaws

repo_name: TravisMadill/CanadianLaws


text:
# gradle-basics-gr8workshops

##Gradle Basics

An introduction to Gradle talk adapted from Craig Burke's talk at the Pittsburgh Groovy Meetup on January 28, 2016.

# About the Slides

## Running Locally
This presentation is based on the [Object Partners Reveal Template](https://github.com/objectpartners/opi-reveal-template) which uses jade as a templating engine and grunt to run, reload, and publish the presentation to github pages.

* `npm install`
* `grunt assemble`
* `grunt run`

Source code is in the *src* folder.  The distrubution is in the *dist* folder. Be careful. Changes in *dist* will be overwritten by the next assemble or reload.

## Publishing to github
Github supports web hosting on the gh-pages branch of a repository(like this one!)

If you have forked this repository, the `grunt publish` task takes the dist folder and packages it on the gh-pages branch of your repository. Remember to run `grunt assemble` before publishing.


text:
***

# Calorie-Counter Api

## Thursday, November 4 2020 ;

---

## Author
> [Akumu Collins](https://github.com/Akumucollins)

***

## Description
>This is a Django application hat will display an API as part of a larger project. It will allow a user to retrieve and psot information into a database. The project uses rest_framework to post, put, delete and get data from the database.

---

## Live Link
[View Site](https://hood-posted.herokuapp.com/)

***

## Setup/Installation Requirements
To get the code..
Cloning the repository using:
 https://github.com/Akumucollins/Calorie-Counter.git

Move to the folder and install requirements using
  ```bash
  cd Calorie-Counter
  pip install -r requirements.txt
  ```
Setup Configurations and  Database
  ```bash
  python3 manage.py makemigrations
  ```
Running the application
  ```bash
  python3 manage.py runserver
  ```

Testing the application
  ```bash
  python3 manage.py test
  ```
Open the application on your browser
[<IP_ADDRESS>:8000](http://<IP_ADDRESS>:8000/)

---

## Dependencies
>* python3.7.3
>* Django 3.1.2
>* virtual environment
>* heroku
***

## Technologies Used
>* Bootstrap.
>* Python.

---

## Support and Contact Information
> The application is an open-source product if you  want to improve it or include an event of a bug  contact this
><EMAIL_ADDRESS>.

***

## License
The project is [MIT](LICENSE) licensed

repository: Akumucollins/Calorie-Counter

repo_name: Akumucollins/Calorie-Counter


text:
[![Latest Stable Version](https://poser.pugx.org/cupoftea/eloquent-snake-relations/version.svg)](https://packagist.org/packages/cupoftea/eloquent-snake-relations) [![Total Downloads](https://poser.pugx.org/cupoftea/eloquent-snake-relations/d/total.svg)](https://packagist.org/packages/cupoftea/cupoftea/eloquent-snake-relations) [![Latest Unstable Version](https://poser.pugx.org/cupoftea/eloquent-snake-relations/v/unstable.svg)](https://packagist.org/packages/cupoftea/eloquent-snake-relations)
[![StyleCI](https://styleci.io/repos/186055024/shield?style=flat)](https://styleci.io/repos/186055024)
[![License](https://poser.pugx.org/cupoftea/eloquent-snake-relations/license)](https://packagist.org/packages/eloquent-snake-relations/fluent)

# Eloquent snake_case Relations

A simple trait to access your Eloquent relations using its snake_case property

## Installation

Install via composer by running `composer require cupoftea/eloquent-snake-relations`.

Once installed, Models created via the `make:model` command will automatically extend `CupOfTea\Database\Eloquent\Model` to allow relation access via the snake_cased relation name.

To update the User Model, replace the `Illuminate\Foundation\Auth\User` import with `CupOfTea\Auth\User`. You can keep the alias used for the import.

If you have already created some Models in your Application, simply replace the `Illuminate\Database\Eloquent\Model` import with `CupOfTea\Database\Eloquent\Model`, or for Pivot Models, replace the `Illuminate\Database\Eloquent\Relations\Pivot` import with `CupOfTea\Database\Eloquent\Relations\Pivot`.

Alternatively, if you are extending your own Model class, you can use the `CupOfTea\Database\Eloquent\Concerns\HasSnakeCaseRelations` trait on that Model, or extend it from `CupOfTea\Database\Eloquent\Model` instead of `Illuminate\Database\Eloquent\Model`.

## Usage

To access your model relations, you can now use the snake_case property, even if your relation method is camelCase. For example, if your your relationship method is defined as `User::creditCards()`, you can access it via `$user->credit_cards`.

> **Note**: Please note that only property access can use snake_case. Additional relationship queries or eager loading should still use the relationship method name as is. For example, `$creditCards = User::find(1)->creditCards()->orderBy('expires')->get();`, or `$users = User::with('creditCards')->all();`

gha_language: PHP


text:
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/afbc8438e34a48fea86d20a953bf6998)](https://app.codacy.com/app/jonathankamau/andela-societies-backend?utm_source=github.com&utm_medium=referral&utm_content=AndelaOSP/andela-societies-backend&utm_campaign=badger)
[![CircleCI](https://circleci.com/gh/AndelaOSP/andela-societies-backend.svg?style=svg)](https://circleci.com/gh/AndelaOSP/andela-societies-backend)
[![Coverage Status](https://coveralls.io/repos/github/AndelaOSP/andela-societies-backend/badge.svg?branch=setup-circle-ci)](https://coveralls.io/github/AndelaOSP/andela-societies-backend?branch=setup-circle-ci)

# Society-platform ✍
API for an Andela Societies.

```Insert Description here```

- ## API
This App exposes endpoints that allows ```clients/Users``` to interact with Andela society Platform.

- #### Available Resource Endpoints

|Method | Endpoint | Usage |
| ---- | ---- | --------------- |
|POST| `/api/v1.0/login` | Login user.|

## Getting Started 🕵
- To run on local machine git clone this project :
```
 $ git clone https://github.com/AndelaOSP/andela-societies-backend.git
 ```

 Copy and paste the above command in your terminal, the project will be downloaded to your local machine.

- To consume API in client of choice navigate to:
 ```
 <Insert Hosted site here>
 ```

### Prerequisites
The application is built using python: flask framework.
>[Flask](http://flask.pocoo.org/) is a microframework for the Python programming language.

To Install python checkout:
```
https://www.python.org/
```

### Installing
For this section I will assume you have python3 and it's configured on your machine. </br>
Navigate to the folder you cloned and run: </br>

- Install Requirements
```
$ cd src
$ pip install -r requirements.txt
```

- Configure Environment.
```
<Insert Config here>
```
> Note replace the value for DEV_DATABASE with real database path and SECRET with a strong string value

- Configure database
```
<Insert Config here>
```

- Run App 🏃
```
$ cd src
$ python manage.py runserver
```
The app should be accessiable via : http://<IP_ADDRESS>:5000/

## Running the tests

```
$ cd src
$ python manage.py test
```

- Coding style tests

[Pep8](https://www.python.org/dev/peps/pep-0008/) standards are followed in project.

```
$ cd src
$ pep8 api --count

```

## Deployment 🚀

- [Check this out to deploy to heroku](https://devcenter.heroku.com/articles/getting-started-with-python#introduction)

## Built With  🏗 🔨⚒

* [Flask](http://flask.pocoo.org/) - The web framework used
* [Flaskrestplus](https://flask-restplus.readthedocs.io/en/stable/) - Extension for Flask that adds support for quickly building REST APIs.

## Contributing 👍

- Please Fork me! :-)

## Versioning ⚙

- [Checkout our releases](https://github.com/AndelaOSP/andela-societies-backend/releases)

## Authors 📚

* **AndelaOSP**

## License 🤝

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

## Acknowledgments 🙏

* [Andela ](https://andela.com/) - We are hiring !
* [Motivation](https://www.youtube.com/watch?v=dQw4w9WgXcQ) - BEST RESOURCE EVER!!! 🤓🤓

repository: FlevianK/andela-societies-backend

branch_name: refs/heads/develop

repo_name: FlevianK/andela-societies-backend


text:
# Part 01

I used this prototype inspiration for the viaduct:
![Image of steel viaduct](bv.png) ![Image Concrete Overpass](PENNSYLVANIA_overpass.png)

Here is the first pass dry-fitting the 3D printed parts and the sheet styrene parts:
![Image of steel viaduct](IMG_0132.png) ![Image of steel viaduct](IMG_0134.png) ![Image of steel viaduct](IMG_0136.png)

## Sheet Styrene
The sheet styrene pictured for the road and sidewalk is actually a "For Sale" sign I purchased from Wall-mart for $4.00. You have probably noticed that buying sheet styrene at hobby stores is expensive. It's not unusual to pay $10 for a package containing one or two 4x10 inch [10x25cm] sheets. Inexpensive signs are made from the exact same styrene material at 1/10th the price. You can find signs in sizes from 4x4 inches [10x10cm] to 30x20 inches [76x50cm]. You can find signs in a variety of thicknesses from 1/32 inch [0.8mm] to 1/8 inch [32mm]. There are only a couple of down sides to cutting up signs: A) The signs tend to be painted as opposed to bare white. B) Some signs have holes cut into them for attachment fixtures. I paint the styrene after it has been glued, so any pre-existing paint is covered. I either cut around the holes, or when modeling N-Scale roads, I use the holes as manholes. They are just the right size.

The pictures of the road show a hole and portions of the sign that haven't been painted yet.

Once I'm completely satisfied with the dry fit, I'll glue the retaining walls and road to the benchwork. Then, I'll weather the walls and road, add details like tire-tread marks, cracks in the concrete, etc. Eventually, I'll add grass and trees to produce a scene similar to the prototype inspiration.

![Image Setting](Setting.png)

![Setting](retainingWall_p.png)

[Back](../Scenery.md)

gha_language: G-code


text:
# ![C++React](http://schlangster.github.io/cpp.react//media/logo_banner3.png)

C++React is reactive programming library for C++11.

Generally speaking, it provides abstractions to handle change propagation and data processing for a push-based event model.
A more practical description is that it enables coordinated, multi-layered - _and potentially parallel_ - execution of callbacks.
All this happens implicitly, based on declarative definitions, with guarantees regarding

- _update minimality_ - nothing is re-calculated or processed unnecessarily;
- _glitch freedom_ - no transiently inconsistent data sets;
- _thread safety_ - no data races for parallel execution by avoiding side effects.

The core abstractions of the library are

- _signals_, reactive variables that are automatically re-calculated when their dependencies change, and
- _event streams_ as composable first class objects.

Signals specifically deal with aspects of time-varying state, whereas event streams facilitate event processing in general.

Additional features include

- a publish/subscribe mechanism for callbacks with side effects;
- a set of operations and algorithms to combine signals and events;
- a domain model to encapsulate multiple reactive systems;
- transactions to group related events, supporting both synchronous and asynchrounous execution.

## Documentation

[If you're interested in learning about C++React, have a look at its documentation.](http://schlangster.github.io/cpp.react/)

## Using the library

This library is a work-in-progress. It should not be considered release quality yet and its API might still change.
It is, however, in a perfectly usable state and has already received a fair amount of testing and tuning.

### Dependencies

* [Intel TBB 4.2](https://www.threadingbuildingblocks.org/) (required)
* [Google test framework](https://code.google.com/p/googletest/) (optional, to compile the unit tests)
* [Boost 1.55.0 C++ Libraries](http://www.boost.org/) (optional, to include Reactor.h, which requires `boost::coroutine`)

### Compiling

C++React has been tested with the following compilers:

* Visual Studio 2013.2
* GCC 4.8.2
* Clang 3.4
* Apple LLVM version 7.3.0 (clang-7<IP_ADDRESS>)

To build with Visual Studio, use the pre-made solution found in `project/msvc/`.

To build with GCC or Clang, use [CMake](http://www.cmake.org/):
```
mkdir build
cd build
cmake ..
make
```

For more details, refer to the [Build instructions](https://github.com/schlangster/cpp.react/wiki/Build-instructions).

## Features by example

### Signals

Signals are self-updating reactive variables.
They can be combined in expressions to create new signals, which are automatically re-calculated when their dependencies change.

```C++
using namespace std;
using namespace react;

// Defines a reactive domain that uses single-threaded, sequential updating
REACTIVE_DOMAIN(D, sequential)

// Defines aliases for types of the given domain,
// e.g. using VarSignalT<X> = VarSignal<D,X>
USING_REACTIVE_DOMAIN(D)

// Two reactive variables that can be manipulated imperatively
// to input external changes
VarSignalT<int> width  = MakeVar<D>(1);
VarSignalT<int> height = MakeVar<D>(2);

// A signal that depends on width and height and multiplies their values
SignalT<int> area = MakeSignal(
    With(width, height),
    [] (int w, int h) {
        return w * h;
    });
```
Signal values can be accessed imperatively:
```C++
cout << "area: " << area.Value() << endl; // => area: 2

// Width changed, so area is re-calculated automatically
width.Set(10);

cout << "area: " << area.Value() << endl; // => area: 20
```

Or, instead of using `Value()` to pull the new value, callback functions can be registered to receive notifications on a change:
```C++
Observe(area, [] (int newValue) {
	cout << "area changed: " << newValue << endl;
});
```

Overloaded operators for signal types allow to omit `MakeSignal` for a more concise syntax:
```C++
// Lift as reactive expression - equivalent to previous example
SignalT<int> area = width * height;
```

### Event streams

Unlike signals, event streams are not centered on changing state, but represent flows of discrete values.
They are first-class objects and can be merged, filtered, transformed or composed to more complex types:

```C++
using namespace std;
using namespace react;

REACTIVE_DOMAIN(D, sequential)
USING_REACTIVE_DOMAIN(D)

// Two event sources
EventSourceT<Token> leftClick  = MakeEventSource<D>();
EventSourceT<Token> rightClick = MakeEventSource<D>();

// Merge both event streams
EventsT<Token> anyClick = leftClick | rightClick;

// React to events
Observe(anyClick, [] (Token) {
    cout << "clicked!" << endl;
});
```
```
leftClick.Emit(); // => clicked!
rightClick.Emit(); // => clicked!
```

### Parallelism and concurrency

When enabling it through the concurrency policy, updates are automatically parallelized:

```C++
REACTIVE_DOMAIN(D, parallel)

VarSignalT<int> in = MakeVar<D>(0);

SignalT<int> op1 = MakeSignal(in,
    [] (int in) {
        int result = doCostlyOperation1(in);
        return result;
    });

SignalT<int> op2 = MakeSignal(in,
    [] (int in) {
        int result = doCostlyOperation2(in);
        return result;
    });

// op1 and op2 can be re-calculated in parallel
SignalT<int> out = op1 + op2;
```

## Acknowledgements

The API of C++React has been inspired by the following two research papers:

* [Deprecating the Observer Pattern with Scala.React](http://infoscience.epfl.ch/record/176887/files/DeprecatingObservers2012.pdf)
* [REScala: Bridging Between Object-oriented and Functional Style in Reactive Applications](http://www.stg.tu-darmstadt.de/media/st/research/rescala_folder/REScala-Bridging-The-Gap-Between-Object-Oriented-And-Functional-Style-In-Reactive-Applications.pdf)


text:
# logs-bot

logs-bot is a simple Twitch bot that fetches TF2 match logs from logs.tf and posts them in a Twitch chat room.
![Chat Screenshot](https://raw.githubusercontent.com/dpolansky/logs-bot/master/chat-screenshot.png)

## Installation

```
go get -u github.com/dpolansky/logs-bot
```

## Usage
Set environment variables for the Twitch bot's username and oauthkey (which can be found [here](https://twitchapps.com/tmi/))

```
export LOGS_BOT_USERNAME="LogsTFBot"
export LOGS_BOT_OAUTH_KEY=key
```

Create a file `channels.json` with a mapping from each steamID to Twitch channel name:
```javascript
{
  "76561198107240606": "lansky",
  "76561197991735941": "clockwork"
}
```

`go get` will create an executable in your `$GOPATH/bin` (make sure `$GOPATH/bin` is in your $PATH), or build the executable with:
```
go build
```

Then run the executable:
```
logs-bot
```


text:
# Community Maintained

This plugin is being maintained by the Ionic community. Interested in helping? Message `max` on ionic worldwide slack.

Another great solution for deep links for Ionic is the Branch Metrics plugin: [https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking](https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking)

If you used to handle URI schemes with the help of this plugin and have migrated to Branch Metrics, you can make use of a plugin such as [https://github.com/EddyVerbruggen/Custom-URL-scheme](https://github.com/EddyVerbruggen/Custom-URL-scheme) to facilitate custom URL schemes.

Ionic Deeplinks Plugin
======

This plugin makes it easy to respond to deeplinks through custom URL schemes
and Universal/App Links on iOS and Android.

For example, you can have your app open through a link to https://yoursite.com/product/cool-beans and then navigate
to display the Cool Beans in your app (cool beans!).

Additionally, on Android iOS, your app can be opened through a custom URL scheme, like `coolbeans://product/cool-beans`.

Since Custom URL scheme behavior has changed quite a bit in iOS 9.2 for the case where the app isn't installed, you'll want to start using [Universal Links](#ios-configuration) as it's clear custom URL schemes are on the way out.

*Note: this plugin may clash with existing Custom URL Scheme and Universal Links Plugins. Please let
us know if you encounter compatibility issues. Also, try removing them and using this one on its own.*

Thank you to the [Cordova Universal Links Plugin](https://github.com/nordnet/cordova-universal-links-plugin) and the [Custom URL Scheme](https://github.com/EddyVerbruggen/Custom-URL-scheme) plugin that this plugin is inspired and borrows from.

## Installation

```bash
cordova plugin add ionic-plugin-deeplinks
--variable URL_SCHEME=myapp --variable DEEPLINK_SCHEME=https --variable DEEPLINK_HOST=example.com
--variable ANDROID_PATH_PREFIX=/
```

Fill in the appropriate values as shown below:

 * `URL_SCHEME` - the custom URL scheme you'd like to use for your app. This lets your app respond to links like `myapp://blah`
 * `DEEPLINK_SCHEME` - the scheme to use for universal/app links. Defaults to 'https' in 1.0.13. 99% of the time you'll use `https` here as iOS and Android require SSL for app links domains.
 * `DEEPLINK_HOST` - the host that will respond to deeplinks. For example, if we want `example.com/product/cool-beans` to open in our app, we'd use `example.com` here.
 * `ANDROID_PATH_PREFIX` - (optional): specify which path prefix our Android app should open from [more info](https://developer.android.com/guide/topics/manifest/data-element.html)

(New in 1.0.13): If you'd like to support multiple hosts for Android, you can also set the variables `DEEPLINK_2_SCHEME`, `DEEPLINK_2_HOST`, `ANDROID_2_PATH_PREFIX` and optionally substitue `2` with 3, 4, and 5 to set more.

## Handling Deeplinks in JavaScript

#### Ionic/Angular 2

*note: make sure to call IonicDeeplink from a platform.ready or `deviceready` event*

Using [Ionic Native](https://github.com/ionic-team/ionic-native) (available in 1.2.4 or greater):

```javascript
import { Platform, NavController } from 'ionic-angular';
import { Deeplinks } from '@ionic-native/deeplinks/ngx';

export class MyApp {
  constructor(
    protected platform: Platform
    , protected navController: NavController
    , protected deeplinks: Deeplinks
    ) {
    this.platform.ready().then(() => {
      this.deeplinks.route({
        '/about-us': HomePage,
        '/products/:productId': HelpPage
      }).subscribe((match) => {
        // match.$route - the route we matched, which is the matched entry from the arguments to route()
        // match.$args - the args passed in the link
        // match.$link - the full link data
        console.log('Successfully matched route', match);
      },
      (nomatch) => {
        // nomatch.$link - the full link data
        console.error('Got a deeplink that didn\'t match', nomatch);
      });
    });
  }
}

// Note: routeWithNavController returns an observable from Ionic Native so it *must* be subscribed to first in order to trigger.
```

If you're using Ionic 2, there is a convenience method to route automatically (see the simple [Ionic 2 Deeplinks](https://github.com/ionic-team/ionic2-deeplinks-demo/blob/master/app/app.ts) demo for an example):

```javascript
import { Platform, NavController } from 'ionic-angular';
import { Deeplinks } from '@ionic-native/deeplinks/ngx';

export class MyApp {
  constructor(
    protected platform: Platform
    , protected navController: NavController
    , protected deeplinks: Deeplinks
    ) {
    this.platform.ready().then(() => {
      this.deeplinks.routeWithNavController(this.navController, {
        '/about-us': HomePage,
        '/products/:productId': HelpPage
      }).subscribe((match) => {
        // match.$route - the route we matched, which is the matched entry from the arguments to route()
        // match.$args - the args passed in the link
        // match.$link - the full link data
        console.log('Successfully matched route', match);
      },
      (nomatch) => {
        // nomatch.$link - the full link data
        console.error('Got a deeplink that didn\'t match', nomatch);
      });
    });
  }
}

// Note: routeWithNavController returns an observable from Ionic Native so it *must* be subscribed to first in order to trigger.
```

#### Ionic/Angular 1

For Ionic 1 and Angular 1 apps using Ionic Native, there are many ways we can handle deeplinks. However,
we need to make sure we set up a history stack for the user, we can't navigate directly to our page
because Ionic 1's navigation system won't properly build the navigation stack (to show a back button, for example).

This is all fine because deeplinks should provide the user with a designed experience for what the back button
should do, as we are putting them deep into the app and need to provide a natural way back to the main flow:

(See a simple [demo](https://github.com/ionic-team/ionic1-deeplinks-demo) of v1 deeplinking).

```javascript
angular.module('myApp', ['ionic', 'ionic.native'])

.run(['$ionicPlatform', '$cordovaDeeplinks', '$state', '$timeout', function($ionicPlatform, $cordovaDeeplinks, $state, $timeout) {
  $ionicPlatform.ready(function() {
    // Note: route's first argument can take any kind of object as its data,
    // and will send along the matching object if the route matches the deeplink
    $cordovaDeeplinks.route({
      '/product/:productId': {
        target: 'product',
        parent: 'products'
      }
    }).subscribe(function(match) {
      // One of our routes matched, we will quickly navigate to our parent
      // view to give the user a natural back button flow
      $timeout(function() {
        $state.go(match.$route.parent, match.$args);

        // Finally, we will navigate to the deeplink page. Now the user has
        // the 'product' view visibile, and the back button goes back to the
        // 'products' view.
        $timeout(function() {
          $state.go(match.$route.target, match.$args);
        }, 800);
      }, 100); // Timeouts can be tweaked to customize the feel of the deeplink
    }, function(nomatch) {
      console.warn('No match', nomatch);
    });
  });
}])
```

#### Non-Ionic/angular

Ionic Native works with non-Ionic/Angular projects and can be accessed at `window.IonicNative` if imported.

If you don't want to use Ionic Native, the plugin is available on `window.IonicDeeplink` with a similar API minus the observable callback:

```javascript
window.addEventListener('deviceready', function() {
  IonicDeeplink.route({
    '/product/:productId': {
      target: 'product',
      parent: 'products'
    }
  }, function(match) {
  }, function(nomatch) {
  });
})
```

## iOS Configuration

As of iOS 9.2, Universal Links *must* be enabled in order to deep link to your app. Custom URL schemes are no longer supported.

Follow the official [Universal Links](https://developer.apple.com/library/ios/documentation/General/Conceptual/AppSearch/UniversalLinks.html) guide on the Apple Developer docs
to set up your domain to allow Universal Links.

### How to set up top-level domains (TLD's)
#### Set up Associated Domains
First you must enable the `Associated Domains` capability in your [provisioning profile](https://developer.apple.com/account/resources/profiles/list).
After that you must enable it in the Xcode project, too.
For automated builds you can do it easily by adding this to your `config.xml`.

    <config-file target="*-Debug.plist" parent="com.apple.developer.associated-domains">
        <array>
            <string>applinks:example.org</string>
        </array>
    </config-file>

    <config-file target="*-Release.plist" parent="com.apple.developer.associated-domains">
        <array>
            <string>applinks:example.org</string>
        </array>
    </config-file>

Instead of `applinks` only you could use `<string>webcredentials:example.org</string>` or `<string>activitycontinuation:example.org</string>`, too.

#### Set up Apple App Site Association (AASA)
Your website (i.e. `example.org`) must provide this both files.

* /apple-app-site-association
* /.well-known/apple-app-site-association

The content should contain your app.

    {
      "applinks": {
        "apps": [],
        "details": [
          {
            "appID": "1A234BCD56.org.example",
            "paths": [
              "NOT \/api\/*",
              "NOT \/",
              "*"
            ]
          }
        ]
      }
    }

This means that all your requests - except /api and / - will be redirected to your app.
Please replace `1A234BCD56` with your TEAM ID and `org.example` with your Bundle-ID. (the `id=""` of your `<widget />`)

## Android Configuration

Android supports Custom URL Scheme links, and as of Android 6.0 supports a similar feature to iOS' Universal Links called App Links.

Follow the App Links documentation on [Declaring Website Associations](https://developer.android.com/training/app-links/index.html#web-assoc) to enable your domain to
deeplink to your Android app.

To prevent Android from creating multiple app instances when opening deeplinks, you can add the following preference in Cordova config.xml file:

```xml
 <preference name="AndroidLaunchMode" value="singleTask" />
```

### How to set up top-level domains (TLD's)
#### Set up [Android App Links](https://developer.android.com/training/app-links)
Your website (i.e. `example.org`) must provide this file.

* /.well-known/assetlinks.json

The content should contain your app.

    [
      {
        "relation": [
          "delegate_permission\/common.handle_all_urls"
        ],
        "target": {
          "namespace": "android_app",
          "package_name": "org.example",
          "sha256_cert_fingerprints": [
            "12:A3:BC:D4:56:E7:89:F0:12:34:5A:B6:78:90:C1:23:45:DE:67:FA:89:01:2B:C3:45:67:8D:9E:0F:1A:2B:C3"
          ]
        }
      }
    ]

Replace `org.example` with your app package. (the `id=""` of your `<widget />`)
The fingerprints you can get via `$ keytool -list -v -keystore my-release-key.keystore`.
You can test it via https://developers.google.com/digital-asset-links/tools/generator.

repository: ionic-team/ionic-plugin-deeplinks

gha_language: Objective-C

repo_name: ionic-team/ionic-plugin-deeplinks


text:
# Let's All Feed The Mouth

A game about feeding The Mouth, together.

This is a 3 player game, so you'll want to get 2 of your closest friends together to play.

[Play LAFTM](http://small-kouprey.cloudvent.net/)

## Installing this

If the above link doesn't work, and you still want to experience this derangement, you will need to set it up on your computer.

Since this game is written in [Phaser](https://phaser.io), it needs to be hosted on a static webserver to be played. Sorry about that. It's worth it, I promise.

Specifically, the `bin` folder is all that needs to be served. You can do this any way you like, but an easy way is to install Python, and run its built-in `SimpleHTTPServer` from the bin directory.

With Python v2:

    cd bin
    python -m SimpleHTTPServer 5858

Or with Python v3:

    cd bin
    python -m http.server 5858

Then open http://localhost:5858 in your browser

repository: aaaidan/tentacools

repo_name: aaaidan/tentacools


text:
clipping-with-caps
==================

### Clipping a mesh and covering the openings with caps in WebGL ###

[View the demo](http://daign.github.io/clipping-with-caps/)

![screenshot](./screenshot_01.png)

Licensed under [MIT License](./LICENSE)

Dependencies:
* [three.js](https://github.com/mrdoob/three.js)

---

Clipping meshes inside a shader program is fast and avoids triangulation problems that can arise
when actually constructing a clipped mesh with constructive solid geometry.
But since a mesh is just a hollow hull of triangles the clipped object will have an opening along
the clipping edge.
It is however possible to visually close this gaps without actually constructing the cap faces.

When there is just one clipping plane on an otherwise closed mesh and backface rendering is enabled,
then there are backsides visible through the whole opening.
Rendered into a stencil this area can be used to define where to render the caps.
First a scene showing only the backfaces is used to increment the stencil and then another scene
showing the front faces decrements the stencil.
The resulting stencil is applied to a scene rendering a plane at the location of the clipping plane.

But this method fails when there is more than one clipping plane.
Because clipping planes facing away from the camera result in hidden backfaces, these areas are
missing in the stencil.
The result would look like this:

![screenshot](./screenshot_02.png)

The solution is to use a different shader for rendering the stencil areas, that only clipps at
clipping planes facing the camera.
Since the camera position is known it can be calculated in the shader whether a clipping plane is
facing towards the camera or away from it.

repository: AssisrMatheus/clipping-with-caps

repo_name: AssisrMatheus/clipping-with-caps


text:
---
title: thumbsup
repo: thumbsup/thumbsup
homepage: https://thumbsup.github.io
language:
  - JavaScript
license:
  - MIT
templates:
  - None
description: Static photo & video gallery generator
---

## Static web galleries for all your photos and videos

Give `thumbsup` a folder full of photos and videos, and it will build HTML galleries to view them.
It takes care of resizing photos, creating thumbnails, re-encoding videos to a web-friendly format, and more...

## Highlights

- Get started in seconds

Create a whole gallery from a single command.
If you have more time, pick a theme, configure your styles, or change the config settings to control how albums are created.

- Fast

Thumbsup keeps track of which photos are new and only rebuilds what's necessary.
If everything is up to date, running thumbsup on a 50GB folder only takes a few seconds.

- Mobile friendly

The generated website can be viewed on any device - including videos.
Have a look for yourself at the demo site.

- Cross-platform

Available as an npm module or a Docker image, it works on macOS, Linux and Windows.
Thumbsup it built upon well established tools like ffmpeg.

- Deploy anywhere

The generated galleries are fully static and self contained.
Browse them from your computer, or upload them to AWS S3 for the world to see.

## Examples

![Mosaic albums](https://thumbsup.github.io/public/images/theme-mosaic-albums.png)
![Mosaic media](https://thumbsup.github.io/public/images/theme-mosaic-media.png)


text:
fall-2017-seminar-02 <img src="https://raw.githubusercontent.com/slu-dss/fall-2017-seminar-01/sources/logo.png" align="right" />
===========================================================

### Repository Contents
This repository contains files for:
-   `fall-2017-seminar-02.nb.html` - R notebook output for seminar
-   `fall-2017-seminar-02.Rmd` - R notebook source code for seminar
-   `fall-2017-seminar-02.Rproj` - R project for seminar
-   `fall-2017-seminar-02-handout.pdf` - handout
-   `missouriTract` - shapefile of census tracts in Missouri
-   `missouriTract.png` - image of census tracts in Missouri
-   `missouriTractDetail.png` - image of census tracts in the metro St. Louis area
-   `polygon.png` - image of a theoretical polygon
-   `stlInsurance.csv` - tabular data of insurance rates in the City of St. Louis
-   `stlLead.csv` - tabular data of elevated blood lead level test results in the City of St. louis
-   `stlTract` - shapefile of census tracts in the City of St. Louis
-   `.gitignore`
-   `LICENSE.md`
-   `README.md` - seminar resources

## Resources
### `ggplot2` Resources
*   [Data Visualization chapter](http://r4ds.had.co.nz/data-visualisation.html) in [R for Data Science](http://r4ds.had.co.nz) - by Hadley Wickham and Garrett Grolemund
*   [Data Visualization for Social Science](http://socviz.co) - by Kieran Healy
*   [Data Viusalization Cheat Sheet](https://github.com/rstudio/cheatsheets/raw/master/source/pdfs/ggplot2-cheatsheet-2.1.pdf)
*   `ggplot2` Introductory YouTube videos ([Part 1](https://www.youtube.com/watch?v=eT_6tw4fWRE&t) and [Part 2](https://www.youtube.com/watch?v=EHZ2JtVCDCQ)) from Chris's statistics course at SLU

*   [`geom_histogram()`](http://ggplot2.tidyverse.org/reference/geom_histogram.html)
*   [`geom_point()`](http://ggplot2.tidyverse.org/reference/geom_point.html)
*   [`geom_polygon()`](http://ggplot2.tidyverse.org/reference/geom_polygon.html)

### `broom` Resources
*   [`broom` Intro](https://github.com/tidyverse/broom/blob/master/README.md)
*   [`broom` Vignette](https://cran.r-project.org/web/packages/broom/vignettes/broom.html)

### Basic GIS Resources
*   [Shapefile (Wikipedia)](https://en.wikipedia.org/wiki/Shapefile)
*   [Polygon Feature Class](http://wiki.gis.com/wiki/index.php/Polygon_Feature_Class)

## About the SLU DSS
### Fall 2017 - GIS in `R`
This is the fourth edition of the SLU Data Science Seminar (DSS). This semester is focused on using `R` to produce some basic parametric inferential statistics along with some linear regression models. Along the way, we'll also provide you with an overview of the nuts and bolts of `R`.

### About the SLU Data Science Seminar
The [SLU Data Science Seminar](https://slu-dss.githb.io) (DSS) is a collaborative, interdisciplinary group at Saint Louis University focused on building researchers’ data science skills using open source software. We currently host seminars focused on the programming language R. The SLU DSS is co-organized by [Christina Gacia, Ph.D.](mailto:christina.garcia@slu.edu), [Kelly Lovejoy, Ph.D.](mailto:kelly.lovejoy@slu.edu@slu.edu), and [Christopher Prener, Ph.D.](mailto:chris.prener@slu.edu}). You can keep up with us here on GitHub, on our [website](https://slu-dss.githb.io), and on [Twitter](https://twitter.com/SLUDSS).

### About Saint Louis University
[Saint Louis University](http://wwww.slu.edu) is a Catholic, Jesuit institution that values academic excellence, life-changing research, compassionate health care, and a strong commitment to faith and service. Founded in 1818, the University fosters the intellectual and character development of more than 13,000 students on two campuses in St. Louis and Madrid, Spain. Building on a legacy of nearly 200 years, Saint Louis University continues to move forward with an unwavering commitment to a higher purpose, a greater good.


text:
# oVirt Infrastructure Management using Ansible

## Introduction

Currently it is using Foreman+Puppet, so this is a first shot at
preparing a future migration. The migration to Mailman 3 on
mail.phx.ovirt.org is used as a working example.

You need Ansible >=2.3 to be able to handle the (new) YAML-based 'hosts' file format.

## Admin-specific Production Settings

You can use `group_vars/all/local_settings.yml` for you local
settings like `ansible_become_pass` if your computer storage is
encrypted. Use `--ask-sudo-pass` if you don't want to use this
method. Currently Ansible is unable to ask _when needed_ so
the global setting has been disabled in `ansible.cfg`.

## Dealing with Secrets

We use Ansible Vault (`ansible-vault` command) to hide some parameters
like service credentials or emails to avoid SPAM.

To make it easy all such files are named '\*.vault.yml' and git
attributes are defined to make diff-ing and merging easy.

Your config needs to be enhanced to tel git how to handle these files.
This is very easy, look at this URL for more info:
  https://github.com/building5/ansible-vault-tools

## Improving Ansible Speed

Ansible is slow, but there's a nice project to improve its performance. It still has glitches so it's not enabled by default, but it's easy to enable it.

First install the library (it is not yet packaged):

  pip install mitogen

Then you just need to run playbooks this way:

  ANSIBLE_STRATEGY=mitogen_linear ansible-playbook …

repository: oVirt/infra-ansible

repo_name: oVirt/infra-ansible


text:
---
title: PROMIS 1 Wave 1
organization: Robert H. Lurie Comprehensive Cancer Center of Northwestern University
notes: 'Calibration data for the majority of PROMIS item banks and short forms. From July 2006 to March 2007, data were collected from the U.S. general population and multiple disease populations. The sampling plan was developed for collecting responses to the candidate items from the targeted PROMIS domains and was designed to accommodate multiple objectives 1) create item calibrations for each domain; 2) estimate profile scores for various disease populations; 3) create linking metrics to legacy questionnaires (e.g., SF–36); 4) confirm the factor structure of the domains; and 5) conduct item and bank analyses. Because of the large total number of items (> 1000), it was not possible for participants to respond to the entire pool. Based on an estimate of 4 questions per minute, the number of items administered to any respondent was limited to about 150 (37 minutes). (2010)'
resources:
  - name: The Patient-Reported Outcomes Measurement Information System (PROMIS)
    url: 'http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2829758/'
    format: html
category:
  - 'Medicine, Health and Life Sciences'
  - Patient Reported Outcomes
  - Social sciences
maintainer: Katy Wortman
maintainer_email<EMAIL_ADDRESS>---

repository: NUBIC/jkan

branch_name: refs/heads/gh-pages

repo_name: NUBIC/jkan


text:
# Laravel - Africa is Talking Sms

Using Laravel Framework and Africa Is Talking Api, SMS can now be sent in Africa with ease. Follow the steps below and use the Package
## Installation

Run composer require ftg/sms:dev-master at the root of your Laravel Project.

## Africa is Talking Account Creation

You will need an account in Africa is Talking. By default a new account has 10 free sms for test purposes. Visit [Africa is Talking](https://account.africastalking.com/login) and create an account or login if you have one.
#### Api Creation
Create an Api Key that will be used to send the messages

## Configuration
Add the following line to your providers in the App/Config/app.php file;

     Ftg\Sms\SmsServiceProvider::class,

Add the following line to your aliases in the App/Config/app.php file;

    'SMS' => Ftg\Sms\Facades\Sms::class,

Add the following lines to your .env file for the Package to pick your africa is talking username and api key. Complete them with the relevant credentials

    Africa_Is_Talking_Username=
    Africa_Is_Talking_API_KEY=
    Africa_Is_Talking_ID=

##Usage
In your controller include the following line at the top;

    use Ftg\Sms\Facades\Sms;

In the function send the message as follows;

    /**
     * Sending of Sms
     * Not that numbers have to begin with 254 for Kenya
     **/
    public function test()
    {
            $mobile = "254...";
            $message = "Your Message goes here";
            Sms::send_sms($mobile,$message);
            return "message sent";
    }

## License

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