text:
---
title: Security
---

Below is a list of recommendations and issues to consider, in order to ensure the security of your implementation of Sana and maintain confidentiality and integrity of patient data.

Phone Security
--------------

#### Screen Locking Pattern

To prevent unauthorized individuals from being able to upload false patient data to OpenMRS, it is strongly recommended to enable the pattern screen unlock option on the Android phone (the feature is off by default). With this feature, if there is no interaction with the phone after several minutes, the screen will automatically lock until the correct user enters their secret pattern in.

1.  Go to Home \> Menu \> Settings
2.  Select "Security & Location"
3.  Select "Set Unlock Pattern"
4.  Follow on-screen instructions to draw an unlock pattern.
5.  Back on the "Security & Location" menu, select "Require pattern"
6.  Feel free to change the two settings directly beneath that
    1.  Unselect "Use visible pattern" (to prevent others visibly seeing your unlock pattern)
    2.  Select "Use tactile feedback" (to make it easier to know if you are entering in the right pattern)

#### Preventative Measures Against Mobile Threats

Using cell phones can introduce a whole host of vulnerabilities including mobile specific or Internet viruses, so to take cautionary measures, the healthcare worker should not use the phone for unnecessary web browsing or other uses aside from telemedicine. The healthcare worker should have their own phone for personal calls and uses. Another option to look into is anti-virus software for the phone.

#### Preventing Theft

Because these Android phones are expensive (on the order of hundreds of dollars), be cautious about protecting the devices from theft. Lock them in a secure place after use and do not leave them out in public view.

Keep an inventory of phones so you know which healthcare workers have which phone (note down the serial number of the phone and when they received it), so that each worker is responsible and liable for their phone.

Computer Security
-----------------

#### Screen Timeout Password

Ensure that the computer has the password-protected time-out functionality turned on.

#### Email Encryption

Sana has the ability to notify healthcare providers by email about new cases and the resulting diagnoses. Ideally there shouldn't be any personal health information being transmitted using email because it isn't secure and doesn't allow for organized tracking of patient's health over long periods of time. If email is necessary for notification purposes, then be sure to turn on the SSL encryption setting on.

1.  For example, in Gmail:
    1.  Go to top right corner and click "Settings"
    2.  Under "General Settings" \> "Browser Connection, select "Always use https"

SSL Encryption System Configuration Settings
--------------------------------------------

### Requirements

1.  Apache version 2.2 or higher installed
2.  Tomcat version 6.0 or higher.

### Installation

On an Ubuntu system execute:

` sudo apt-get install apache2.2-common apache2-utils tomcat6`

Sever Configuration
-------------------

Prior to configuring your Apache and Tomcat servers, you will need to either create your own self-signed certificate (only for testing purposes, not advised for deployments) or get one signed by a trusted certificate authority.

Instructions for generating your own self-signed certificate

Generate the keys, enter a pass phrase when prompted

` openssl genrsa -des3 -out server.key 1024`
` openssl rsa -in server.key -out server.key.insecure`

**Warning:** "You can also run your secure service without a passphrase. This is convenient because you will not need to enter the passphrase every time you start your secure service. But it is highly insecure and a compromise of the key means a compromise of the server as well" [Ubuntu server guide.](https://help.ubuntu.com/12.04/serverguide/certificates-and-security.html)

Use one of the following depending on which key you would like to use:

` openssl req -new -key server.key -out server.csr`
` openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt`
`       **OR**`
` openssl x509 -req -days 365 -in server.csr -signkey server.key.insecure -out server.crt`

You will be prompted for some information.

1.  Type in country, state, city, org, common name
2.  Skip challenge password and company name

Finally, copy your key and certificate to the ssl configuration directories

`sudo cp server.crt /etc/ssl/certs`
`sudo cp server.key /etc/ssl/private`

### Apache Configuration

**Important!** SSL encryption requires version 1.1 or higher of the Android client. Requires the AJP connector which is available as part of the **libapache2-mod-jk** package. Additional proxy mods should be installed by default.

Create a new site file:

**sudo touch /etc/apache2/sites/available/sana-ssl**

open the file and copy the sample configuration below:

**sudo nano /etc/apache2/sites-available/sana-ssl**

Apache site configuration for Sana using mod_ssl:

` ##############################################################################`
` # Sample SSL config file for Sana`
` # version: 1.1`
` # Author: Sana Development`
` ##############################################################################`
` `<IfModule mod_ssl.c>
`   `<VirtualHost *:443>
`       # Replace with local admin email`
`       ServerAdmin webmaster@localhost`
`       # Uncomment and replace $HOST with domain name if registered`
`       #ServerName $HOST`
`       DocumentRoot /var/www`
`       SSLEngine on`
`       SSLOptions +StrictRequire`
`       SSLCertificateFile    /etc/ssl/certs/server.crt`
`       SSLCertificateKeyFile /etc/ssl/private/server.key`
`       `<Directory />
`               Options FollowSymLinks`
`               AllowOverride None`
`       `</Directory>
`       `<Directory /var/www/>
`               Options Indexes FollowSymLinks MultiViews`
`               AllowOverride None`
`               Order allow,deny`
`               allow from all`
`       `</Directory>
`       ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/`
`       `<Directory "/usr/lib/cgi-bin">
`               AllowOverride None`
`               Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch`
`               Order allow,deny`
`               Allow from all`
`       `</Directory>
`       # Logging`
`       ErrorLog /var/log/apache2/error.log`
`       CustomLog /var/log/apache2/ssl_access.log combined`
`       # Possible values include: debug, info, notice, warn, error, crit,`
`       # alert, emerg.`
`       LogLevel warn`
`       # mDS Section`
`       `<Location "/mds">
`           SetHandler python-program`
`           PythonHandler django.core.handlers.modpython`
`           # Use moca.settings for 1.0.x releases of mds`
`           SetEnv DJANGO_SETTINGS_MODULE sana.settings`
`           PythonPath "['/opt']+sys.path"`
`           PythonInterpreter mds`
`           PythonOption django.root /mds`
`           # Uncomment the following two lines when debugging mDS`
`           #PythonDebug On`
`           #PythonAutoReload On`
`       `</Location>
`       # Should be the same as the MEDIA_URL in settings.py`
`       `<Location "/mds/media">
`           SetHandler none`
`       `</Location>
`       # Proxy Section - required when Apache is forwarding to Tomcat`
`       ProxyRequests Off`
`       ProxyPreserveHost On`
`       ProxyStaus Off`
`       # Use proxy to restrict the need for a port in the URL`
`       # Replace localhost if tomcat is not running locally`
`       ProxyPass /openmrs ajp://localhost:8009/openmrs`
`       ProxyPassReverse /openmrs ajp://localhost:8009/openmrs`
`   `</VirtualHost>
` `</IfModule>

After the file is in the **/etc/apache2/sites-available** directory, perform the following:

` `**`a2enmod` `proxy`**
` `**`a2enmod` `proxy_http`**
` `**`a2enmod` `proxy_ajp`**
` `**`sudo` `a2enmod` `ssl`**
` `**`sudo` `a2ensite` `sana-ssl`**
` `**`sudo` `service` `apache2` `restart`**

### Tomcat Configuration

We will use Apache to handle the SSL encryption and merely forward unencrypted as the requests are forwarded by Apache to Tomcat. We will also allow the local mds to send requests directly to OpenMRS unencrypted through port 8080. You will need to edit your **/etc/tomcat6/server.xml** file to have the following connectors:

`   `<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443" />
`   `
`   `<Connector port="8443" protocol="HTTP/1.1" maxThreads="150"/>
`   `
`   `<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" />

Lastly, restart Tomcat:

` sudo service tomcat6 restart`

### Firewall Configuration

The simplest mechanism for configuring the firewall on the recommended Ubuntu system is to use the **ufw** tool. The following commands will block all non local traffic except to the secure ports:

` sudo ufw enable`
` sudo ufw allow 443`
` sudo ufw allow proto tcp from <IP_ADDRESS>/24 to any port 8081`

*Note* You will need to **allow** any other ports used by other services you will be running. For more information, consult the [firewall](https://help.ubuntu.com/12.04/serverguide/C/firewall.html#firewall-ufw) portion of the Ubuntu server guide.

### Testing the Connection

Finally, open a browser and test that the following can be reached.

` `[`https://$HOST/mds/`](https://$HOST/mds/)
` `[`https://$HOST/openmrs/`](https://$HOST/openmrs/)

*Note:* If you used a self signed certificate you will likely get a warning.

### Client Compatibility and Configuration

For the Android client app to be compatible with these server changes, download the 1.1 version of the application and select **Secure Transmission** from **Menu --\> Settings --\> Sana Network**

[<File:client_settings.png>](/File:client_settings.png "wikilink") [<File:network_settings.png>](/File:network_settings.png "wikilink")

#### Resources

HTTPS Configuration on Apache Server <https://help.ubuntu.com/12.04/serverguide/C/httpd.html>

Certificates <https://help.ubuntu.com/12.04/serverguide/C/certificates-and-security.html>

Firewall <https://help.ubuntu.com/12.04/serverguide/C/firewall.html#firewall-ufw> firewall

Setting up Tomcat on HTTPS using Apache <http://www.ctrip.ufl.edu/howto-install-mod_proxy_http-apache2-tomcat6-debian-lenny>

Password-Protection of MDS
--------------------------

1.  htpasswd -c .htpasswd username (where username is substituted for your username)
2.  Go to the **mds/media** folder that you want to password protect. For standard installations this will exist as **/opt/sana/media** on the file system.
    1.  Create a password file
    2.  sudo nano .htaccess
    3.  Copy this into that file and replace valid-user with your username and replace the full path to the .htpasswd file

`      AuthUserFile /full/path/to/.htpasswd`
`      AuthType Basic`
`      AuthName "MediaFolder"`
`      Require username`

1.  (Optional) Add more users
    1.  htpasswd .htpasswd username2

2.  sudo apache2ctl graceful

##### Resources

Password Protecting Your Pages with Htaccess <http://www.elated.com/articles/password-protecting-your-pages-with-htaccess/>

Authentication
--------------

#### Healthcare Worker Authentication

As mentioned above, we need a mechanism for authenticating the healthcare worker, so that false information is not uploaded to the Sana queue and wasting the time of specialists reviewing the cases. If an adversary got their hands on a phone and uploaded many, many cases, they could launch a Denial of Service attack such that other healthcare workers and patients who actually need medical expertise would not be able to receive it in a timely manner.

Currently Android phones do not have support for fingerprint recognition or other biometrics (except for handwritten signatures on the touchscreen), but you can look into other methods of authentication such as existing stand-alone biometric authentication devices, smart cards, voice recognition software, and etc...

#### Patient Authentication

It is crucial to be able to link a patient with the right electronic health record. For a difficult case, a specialist may scan through the history of a patient in the medical record system to look for indications to help in diagnosis. Hence, we never want to upload data for a patient into the record of another patient.

Unfortunately, there is a high error rate for healthcare providers typing in patient medical record numbers incorrectly into a computer. In addition, with a small keyboard on the phone, a person is more likely to hit the wrong key unknowingly and the number of data entry errors will increase. Hence, we strongly recommend the use of the barcode reader that has been integrated into Sana for patient authentication (instead of simply manually typing in the patient's ID number).

There should be a systematic method for issuing ID card to patients with these medical record numbers. With an organized system, we can ensure that no two patients have the same ID number (otherwise their records would be mixed when data is uploaded). We recommend building off the ID card module (http://www.sanamobile.org/development/index.php?title=Learn_about_OpenMRS\#ID_Cards) already available in OpenMRS and customizing it to fit your workflow.

#### Specialist Authentication

Since the specialist will be making the diagnosis for the patient, it is very important that this person is identified properly. Because they will be interacting with Sana through the OpenMRS interface, they should at the minimum have their own username/password. (In case you're interested, passwords in OpenMRS are not stored in plaintext, the hash of the password is stored instead for security reasons. Passwords in OpenMRS are also required to be a certain length, with upper and lowercase letters and symbols, so the password should be difficult to guess. As a pointer, do not use words that appear in the dictionary for your password). The OpenMRS admin account should not be given out to doctors. The admin account has the ability to create/delete users, change their passwords, etc... so this is not something that the medical specialists should have access to.

If you have time and resources available, you can consider integrating biometrics or other types of authentication to OpenMRS for access to the Sana queue of patient cases (i.e. requiring fingerprint for system entry, a retina scan, or barcode scanning). Sana currently does not have support for these features yet, but if you do make these changes, we welcome you to share these changes as our other partners could also make use of this.

Physical Security
-----------------

It is important to take measures to create a physically secure environment for the hardware devices involved in the telemedicine system. Physical security means protecting the site from natural disasters, theft, intrusion, accidents, and vandalism (NCES). The most sophisticated infrastructure could be put in place to protect the data but if the server is physically easily available to outside hackers, then there isn’t much protection because the system is as strong as its “weakest” component. To start off, the server should be located in a place that is locked away in a data center or location where it cannot be tampered with. Depending on how critical the data is and the financial resources available, one may also consider installing locks, window bars, security cameras, alarms, and having security guards to protect the server.

In Sana, because the specialist is no longer tied to a specific location, we can’t be sure about what environment the specialist will be located in. He could be answering referral inquiries in a very public place such as on a public transit vehicle or in his own home with family members walking around. To prevent over-the-shoulder attacks, it can also be recommended that the specialist has a computer screen cover. Alternatively, a security policy could be enforced that restricts the location of the review process to the hospital computer or home office.

Physical security can be designed by first doing a risk assessment of the perimeter where telemedicine transactions will be performed. Then steps should be taken to address each of those physical threats. Examples include storing away laptops or other expensive equipment, shredding confidential documents no longer needed, labeling equipment as belonging to the organization, and separating general equipment from those with sensitive information. There should also be a protocol to follow in case an emergency does happen (i.e. fire or intruder).

Assessment of Site-Specific Potential Security Weaknesses
---------------------------------------------------------

The clinical application that Sana will be used in will involve a slightly different workflow at each site. Hence, it is important to do a site-specific assessment of the workflow to identify potential loopholes for adversaries to access and tamper with the patient data. Then appropriate security procedures can be put in place to address those issues.

Training
--------

It's appropriate to hold training sessions to teach users to be conscious of the patient data privacy laws local to your country and how they can perform safe practices to ensure the system is secure.

Internal Audits of the Security Procedure
-----------------------------------------

Like any policy, it is useless unless enforced. Hence, random audits should be performed to check that the system is properly secured according to the policy and protocol decided upon. Monitoring and evaluating the actual practices of the healthcare workers and specialists involved can provide useful insight into what improvements or changes to the policy are needed, and will be a continual feedback loop. Through quality assurance, we can gain confidence that the patients are receiving the same standard of care as in face-to-face consultations.

References
----------

-   For more information on HIPAA Security Rule, visit the U.S. Department of Health and Human Services website: <http://www.hhs.gov/ocr/privacy/hipaa/administrative/securityrule/index.html>


text:
# API Key

Nodejs module for generating ```base62``` API keys.

## Install

    $ npm install apikeygen

## Usage

    var apikey = require("apikeygen").apikey;
    var key = apikey();  // generates 40 char base64 encoded key

### Key Length
The default key length is 40 chars. To change this, call ```apikey``` with the
new key length

    var key = apikey(30);

## Dependencies
Internally, ```apikey``` uses ```crypto.randomBytes()```.

## Tests

    npm test

license: MIT

branch_name: refs/heads/master

extension: md

gha_language: CSS

gha_license_id: MIT

license_type: permissive


text:
# PROJECT: BULK DATA TRANSFER

## PRE-GSOC STATE OF ART

The existing system for downloading image archives is a Java based standalone
solution. However, it has some of the following shortcomings:

- Requires Java to be installed and involves dependency issues, updating Java
version on different OS platforms, etc
- Recognizing a JNLP file and launching with Java Webstart (JavaWS). Sometimes
 this causes issues for users behind proxy. Basically getting the JavaWS
application in a working mode involves some troubleshooting
- A standalone application doesn't serve the purpose to full extent when we're
dealing with cross platform solutions. It has to be more robust, flexible,
generic and scalable which is loosely coupled with any system

---

## SCOPE

The existing system is highly coupled with client side compatibilities. We need
to minimize this dependency and provide for a generic solution that would work
with all possible client platforms with minimal prerequisite/setup.

To develop a browser based application to suffice the purpose effectively.

---

## DESIGN & ARCHITECTURE

**Aim**: To mimic the currently implemented solution using browser based stack
i.e.  using *JavaScript* for the download applet and *HTML*, *CSS* for interface

Following outlines the basic implementation design:

- Using various `npm modules` for the project since they provide a wide range of
functionalities (tar parsing, concurrent downloads, etc) and account for a vast
community support for maintenance, testing, etc.
- [`Browserify`](http://browserify.org/) which lets us `require('modules')` in
the browser by bundling up all of the node dependencies
- [`IndexedDB`](http://www.w3.org/TR/IndexedDB/) as a storage option -
is persistent and capable of storing large amounts of structured data. Thus data
can be stored locally on browser side, so that whenever a network failure or
other such interruptions occur we have our data consistent within the
application itself. (The term "data" here refers to structured hierarchy of the
manifest schema as well as status of partially/completely downloaded files)
- Using [`Minimongo`](https://github.com/mWater/minimongo) backed by IndexedDB:
  - Directly using IndexedDB without any wrapper doesn't simply follow the
  straighforward way of managing a database. Every operation that one performs
  when using IndexedDB must be carried out within a transaction. Whether that's
  reading information from an object store, manipulating data in it or changing
  its structure.
  - Minimongo is a client-side MongoDB implementation which has the option to
  be backed by IndexedDB. Thus, it provides a wrapper over IndexedDB providing
  more of a JavaScript based MongoDB API which makes interaction with the
  database easier
  - Designed to be used with browserify
- Product: `Chrome Application` instead of a website based application
  - Website based application requires user to modify certain options in the
  browser and also a script needs to be shipped along with the downloads that
  will basically re-arrange all the files into a specific folder hierarchy
  - Chrome Application reduces the cross-browser flexibility but still it
  enables the user to interactively select folder for the files to be
  downloaded and works similar to the current download manager. Thus, the only
  requirement to install this application is that the Chrome browser be
  installed in the user's operating system.

---

## IMPLEMENTATION - Developer Manual

Each module of the Chrome Application is written using Node.js and then
browserified using Browserify (with required `module.exports`) into a
`bundle.js` file. This bundle.js is then included in the index page of the
application.

### Invoking the Chrome App from webpage

Following the process of creating download basket on cancerimagingarchive.net,
instead of downloading the *.jnlp* file, we need to invoke our Chrome
Application from within the site itself (assuming Chrome Application is already
installed, else inline installation will be prompted after pushing the
application to Chrome Webstore) and pass the Jnlp file URL for further
processing.

[`url_handlers`](https://developer.chrome.com/apps/manifest/url_handlers) is
used to specify URL patterns the app wants to intercept and handle. The
application will be launched for all matching navigations inside the browser
tabs. It will receive a new kind of the `app.runtime.onLaunched` event, with
the `launchData` object containing the matched handler's identifier, the URL
being navigated to, and the referrer's URL. We can modify the URL as required
under "url_handlers" attribute in `manifest.json`

File: [nbia-launch.html](nbia-launch.html)

### Messaging from webpage to Chrome App

Now, we need to pass the Jnlp file URL to the Chrome Application for further
processing. This is done using
[`messaging`](https://developer.chrome.com/extensions/messaging#external-webpage).
To use this feature, we specify which web sites we want to communicate with in
manifest.json. For e.g.:

```javascript
"externally_connectable": {
  "matches": ["*://*.example.com/*"]
}
```
In our case, we can have the matching URL as
"https://\*.cancerimagingarchive.net/\*" so as to communicate with
cancerimagingarchive domain pages. Thus, the `onClick` functionality of
"Download Basket" button can be modified to be:

```javascript
// Make a simple request:
chrome.runtime.sendMessage(extensionId, {jnlp: JnlpURL},
    function(response) {}
    );
```
where `extensionId` is the Chrome Application ID obtained after publishing to
Chrome WebStore and `JnlpURL` is URL of the Jnlp file (which is downloaded by
default in current implementation).

In the Chrome App, we have a `chrome.runtime.onMessageExternal` listener in
"background.js"" which listens to external messages by webpages. This listener
acknowledges the JnlpURL sent by the website and sends this JnlpURL to "app.js"
for fetching the Jnlp file and processing it further.

Note: 'JnlpURL' is sent to app.js only when the Chrome Application is fully
loaded

File: [background.js](nbia-chrome-app/background.js)

### Initialization

**- Storing manifest schema**

Now since the 'JnlpURL' in accessible in app.js, the Jnlp file is fetched from
server for parsing and extracting necessary properties viz., `userId`,
`password`, `includeAnnotations`, `downloadServerUrl` and `argument` (for the
`serverjnlpfileloc` attribute in manifest URL). Also, at the same time this
JnlpURL is stored in DB for the purpose of recovery from failures. (File:
`fetchJnlp.js`). Once these properties are fetched, manifest URL is constructed
and the manifest schema is fetched accordingly.

This manifest schema is stored in a structured format in IndexedDB to maintain
the hierarchy of collection, patients, studies and series as well as to monitor
status of download for each individual series (thus making the application
failure resistant). The schema for each manifest entry is stored sequentially
to maintain the document (tuple) consistency in database. Thus, this process
might require some time (approximately 5 minutes) for huge sized downloads
containing high number of series.

File: [storeSchema.js](browserifyJSFiles/storeSchema.js)

**- Creating Folder Hierarchy**

Now, since the manifest schema is stored in structured format in the DB, the
folders are created in the user's filesystem within chosen directory (user is
given a choice of choosing directory to specify the location for files to be
downloaded) using
[`chrome.filesystem`](https://developer.chrome.com/apps/fileSystem) API.

Each of the collections, its patients, their studies and respective series
folders are created in parallel using
[`async.each`](https://github.om/caolan/async/#each) to minimize the time
required for creating the required folder hierarchy. For each series, it's
filesystem path is stored in database to download files in respective folder.

File: [createFolderHierarchy.js](browserifyJSFiles/createFolderHierarchy.js)

### Downloading Files

**- Asynchronous concurrency**

On clicking "Download Files", the download is initiated. To maintain a
concurrency level of "3" i.e. keep downloading atleast 3 series at a time,
`async.eachLimit` is used with concurrency limit set to 3. This can be increased
or decreased by modifying the parameter value in `downloadSeries` function.

The download URL for each series is created using properties fetched from Jnlp
file and `sopUIDs` parameter is populated from the database. For each series, a
`files` array is maintained which records the sopUID of each DICOM file
downloaded successfully. Thus using this 'files' array, the `sopUIDs` parameter
is set in appropriate format to indicate the list of already downloaded files
for that particular series.

File: [fetchAndParseTar.js](browserifyJSFiles/fetchAndParseTar.js)

### Parsing Tar Stream

The download URL for each series fetches a tar stream of that particular series
from the server. To parse this tar,
[tar-stream](https://github.com/mafintosh/tar-stream) module is used. It's
basically a streaming tar parser. (Without resorting to npm modules, browser
based tar parsers were accounted for, however they weren't much docmented or had
limited exposed API.)

File: [fetchAndParseTar.js](browserifyJSFiles/fetchAndParseTar.js)

### Updating DB

For each successful fetched entry of the tar stream, the entry i.e. the file is
downloaded to user's chosen directory in respective folder and on writing the
file to disk, it's 'sopUID' is added to the `files` array of the series it is a
part of. This helps in resuming download of a partially downloaded series by
appending the already fetched DICOM files to 'sopUIDs' parameter in URL as
mentioned above.

### Failure tolerance measures

Considering failures as network interruptions, system restart, application
crashes etc., the application must be able to recover from such failure
instances with minimal loss (i.e. re-downloading of files should be minimized).

For each series a `downloadStatusFlag` is maintained whose value is either
of [0, 1, 2], where

0 => "not encountered/failed"
1 => "encountered but not complete yet (partially completed)"
2 => "completed"

These status flags help in re-downloading only the the failed/incomplete series
i.e. series with value of 'downloadStatusFlag' either "0" or "1" are downloaded
after an interrupt occurs. Totally completed series remain untouched. Also,
since within a series, we maintain a list of successfully downloaded DICOM files
in an array, only those files are downloaded which are not yet fetched.

Files: [restoreState.js](browserifyJSFiles/restoreState.js),
  [execute.js](browserifyJSFiles/execute.js),
  [fetchAndParseTar.js](browserifyJSFiles/fetchAndParseTar.js)
'restoreState' module sets appropriate flags for recovery for what has been done
and what isn't.
'execute' module initiates recovery process, completes initialization part if
not done completely earlier and calls 'fetchAndParseTar' module.
'fetchAndParseTar' module resumes download of files considering previous
download states

The Chrome Application is tested for network interruptions, application crashes,
system restart and it is able to successfully recover from the previous state
with minimal or no loss as desired (as per the current Download manager
behavior).

### Chunked Transfer Encoding Behavior

While downloading a series, it is expected that the application would pipe the
stream on-the-fly to the tar parser on receiving each chunk of data from the
server. Instead it waits until all chunks are received and then passes the data
to the tar parser. This leads almost to a "binary" download of series i.e. the
whole series gets fetched, then it is passed on to the tar parser and thereafter
the files are downloaded to respective folder.

The code has been written to work as per on-the-fly approach, however as
discussed in [this StackOverflow
question](http://stackoverflow.com/q/13557900/2385420), this is indeed the
behavior of a web based application. Browsers (or Chrome Application in our
case) needs some payload to start rendering chunks as they received. The
discussion [here](http://stackoverflow.com/q/16909227/2385420) refers to size
of the content that needs to be padded (i.e. initial payload) so that the
application starts rendering partial response.

To workaround this issue, either some arbitrary data can be padded initially
with the response or a custom header can be passed with required content size
(if the browser validates payload as size of response plus header). However,
this must be done on the server side.

### Developer Takeways

For further development, [browserify](http://browserify.org/) must be installed.
Installation instructions can be found [here](http://browserify.org/#install).

For creating 'bundle.js', execute the following command:

```bash
$ browserify -s bundle fetchAndParseTar.js -o <application-path>/js/bundle.js
```

Note: 'createFolderHierarchy.js', 'execute.js', 'fetchAndParseTar.js',
'fetchJnlp.js', 'restoreState.js', 'storeSchema.js', 'updateRows.js' must be in
the same folder (say "browserifyJSFiles" for instance) for running the above
command.
The *-s* option creates a standalone bundle from
'fetchAndParseTar.js' file into an output file: 'bundle.js'.

To add other module, `require("./newModule")` in fetchAndParseTar.js and
append its function to `bundle` variable. This will export the required function
from 'newModule' into `module.exports` object. E.g.:

```javascript
var newModule = require("./newModule");

var bundle = {
  foobar: newModule.foobar,
  ...
}
```
To call this exported function, use `bundle.foobar()` with required parameters.

---

## USER MANUAL

You must have version 31 or higher of Google Chrome installed to be able to open
the Download Manager. Also, you need to install the Chrome Application **NBIA
Download Manager** (that would be available on Chrome Webstore when published.
[`Inline installation`](https://developer.chrome.com/webstore/inline_installation)
can be added once the Application is published on Webstore. This would enable
to prompt for installing the application automatically, if not installed).

To download objects using the Chrome Application Download Manager, follow these
steps:

1. Click the "Download Manager" button on NBIA website. This opens the Chrome
   Application, shown in the following figure.

   ![Chrome Application - Initialization](https://www.dropbox.com/s/xfal7plgbe8nb6m/ChromeApp-Init.png?dl=1 "Chrome Application - Initialization")

   The Download Manager lists series items you selected in the data basket. You
   can mouse over the Patient ID, Study Instance and Series Instance columns to
   reveal the complete corresponding IDs. If there are large number of entries
   in the basket, you can selectively choose to specify how many series items
   you would like to be displayed on a single page. Options available are [10,
   25, 50, All] and on selecting one of them, pagination will be created
   dynamically. (Default or Full Screen view of the application is recommended
   for optimal visualization)

2. The Download Manager initially lists everything in your Data Basket. After
   you open the application, however, you can remove the items you do not want
   to download. To remove the items, just click on the row(s) you don't want to
   download (multiple selection is possible) and click on the "Remove
   selection" button (as illustrated in the following figure)

   ![Chrome Application - Remove Rows](https://www.dropbox.com/s/tk2oobwuu10hhpv/ChromeApp-RemoveRows.png?dl=1 "Chrome Application - Remove Rows")

3. Browse for the destination where you want the images/annotations to be
   downloaded using "Choose Directory" button. This is where the appropriate
   folder hierarchy will be created to download the images in a structured
   format.

4. Click "Download Files" to execute the download. You can monitor the download
   in the Progress column. The Status column indicates when the download for
   each item is complete. The following image shows download in progress:

   ![Chrome Application - Process](https://www.dropbox.com/s/2gkrz7w9r9bwjli/ChromeApp-Process.png?dl=1 "Chrome Application - Process")

5. At any point in the process, you can close the application and restart it at
   a later stage to resume the process. Your previous download state will be
   aptly restored.

**Note:**
Whenever the Chrome Application is invoked from the website (i.e. clicking
"Download Manager" button on cancerimagingarchive website), the previous
download state is flushed and a new instance is started.

If network errors, application crash, system restart, etc. occur during
large downloads, all you've to do is open the Download Manager from Chrome
Application Launcher. The Download Manager retries downloading
failed/incomplete files until all of them are successfully downloaded.

---

### Contact

For any queries or to get in touch:

Tejas Shah
Email ID<EMAIL_ADDRESS>
Github  : [tejasshah93](https://github.com/tejasshah93)
Website : http://researchweb.iiit.ac.in/~tejas.shah/


text:
# proxynova

[![Build Status](https://secure.travis-ci.org/brianc/node-proxynova.png)](http://travis-ci.org/brianc/node-proxynova)

Retreive a list of free http proxy servers from http://www.proxynova.com because sometimes [it comes in handy](https://github.com/brianc/node-hacker-news-parser)

## api

### require('proxynova')([array of countries], [maximum latency], callback);

Retreive a list of free http proxies from http://www.proxynova.com.

Provide `[array of countries]` such as `['fr', 'us']` to filter by specific countries.

Provide `[maximum latency]` as a number to filter the list only to proxies which can retreive `https://google.com` within `[maximum latency]` milliseconds.

The `callback` is mandatory and accepts two arguments: `(error, [proxies])` where `[proxies]` is an array of strings.  See example.

## example

```js
var proxynova = require('proxynova');

//first 100 proxies
proxynova(function(err, proxies) {
  console.log(proxies[0]); //"<IP_ADDRESS>:8082"
});

//proxies in US or France which respond within 1 second
proxynova(['us', 'fr'], 1000, function(err, proxies) {
  //...
});
```

## notes

I am not affiliated with proxynova in any way.

Proxynova has a 100 request per day limit on their API.  This limit is enforced against this library, so you can only use this library 100 times per day per ip address.
I suggest you cache responses for 15 minutes or so, especially if you filter by maximum latency as this is a non-trivial filtering (requests google.com for each proxy)

## license

MIT

repository: brianc/node-proxynova

repo_name: brianc/node-proxynova


text:
# DNA Control Center Azure connection

DNA offers connectivity for IoT devices to send data to cloud providers. DNA Control Center is tool that allows you to centrally manage your connectivity assets. Azure is major cloud provider that has many services, including ones that help build IoT connected devices.

With the following instructions we connect a device to Azure cloud by utilizing DNA connectivity and integrate DNA Control Center generated statistics and connectivity status to Azure services. The instructions are built so that with little customization different sensors, gateways or DNA Control Center statistics (different with the ones in this demo) can be taken into action.

## Table of content
1. Azure setup
2. Gateway setup (Raspberry Pi)
3. Visualization
4. DNA Control Center

## Prerequisite

In order to build demo for yourselves you need the following
- Azure Account
- Git
- Gateway device (in demo Raspberry pi 3 model B+ is used)
- DNA connectivity
- Basic knowledge of python
- Sensor is optional (in demo we used DHT22 temperature sensor)

> MORE INSTRUCTIONS AND CODE COMING SOON!

repository: joniluomala-solita/DNA-IoT

repo_name: joniluomala-solita/DNA-IoT


text:
# Topic

> 【搭訕守則】十個經心理學證實有用的搭訕策略 (10 Psychologically-proven Flirting Strategies)

> 55% of attraction communication is made through body language, and one of the most subtle, yet most effective methods of flirting with someone is to mirror their actions.

> 55% 釋放吸引力的交流方式是透過肢體語言，其中最細微但最有效的撩人方法就是去模仿對方的動作。

[![Image](https://cdn.voicetube.com/assets/thumbnails/3ObDYK5JYug.jpg)](https://www.youtube.com/embed/3ObDYK5JYug?rel=0&showinfo=0&cc_load_policy=0&controls=1&autoplay=1&iv_load_policy=3&playsinline=1&wmode=transparent&start=247&end=261&enablejsapi=1&origin=https://tw.voicetube.com&widgetid=1)

Host: Ingrid

Today issue: HI, I'm Ingrid. I dare you to pronounce my name as a challenge!

[Host record](https://cdn.voicetube.com/tmp/everyday_records/ingrid.wang_vt_50297/2825.mp3)

## learning points
1. _
	* attraction [əˋtrækʃən] (n.) 吸引力；有吸引力的事物
		- I felt an immediate attraction when I met Diana for the first time.
			+ 當我第一次見到Diana時，我立刻被她吸引。
	* tourist attraction  [] (.) 熱門旅遊景點
		- The Empire State Building is a popular tourist attraction in New York.
			+ 帝國大廈是紐約的熱門旅遊景點。

2. _
	* subtle [ˋsʌt!] (adj.) 隱約的；不明顯的；細微的
		- b 不發音 => 念起來像suttle
		- There is a subtle taste of wine in my grandma's beef soup.
			+ 我奶奶的牛肉湯有一種微妙的葡萄酒味道。

3. _
	* effective [ɪˋfɛktɪv] (adj.) 能産生預期結果的；有效的
		- The most effective way to lose weight is to eat clean and exercise.
			+ 減肥最有效的方法是吃天然的食物和運動。
			+ eat clean => 吃天然食物
	* affective [əˋfɛktɪv] (adj.) 感情的
		- affective <=> effective
		- I have such an affective bond with my cousins because we used to live together.
			+ 因為我們過去住在一起，所以我和我的表親們感情很好。

4. _
	* method [ˋmɛθəd] (n.) 方法；方式
		- He believes reading story books the kids is the best method to increase their creativity.
			+ 他認為閱讀故事書是孩子們提高創造力的最佳方法。

5. _
	* flirt [flɝt] (v.) 調情；打情罵俏
		- It's not cool for him to flirt with other girls while being in a serious relationship with his girlfriend.
			+ 他已經有女朋友了，還跟其他女生打情罵俏，這樣很不好。


text:
# Endpoints

Apart from the [channels](/channels), once your Chatto bot is running, you can interact with it via the HTTP endpoints.

## HTTP Endpoint

Chatto will run on port `4770` by default. You can specify a different one with the `-port` flag.

Send a `POST` request to `/channels/rest` with the following body structure:

```json
{
    "sender": "foo",
    "text": "bar"
}
```

Example with cURL:

```bash
curl --request POST 'http://localhost:4770/channels/rest' \
--header 'Content-Type: application/json' \
--data-raw '{
    "sender": "foo",
    "text": "bar"
}'
```

The bot will respond as such:

```json
[
    {
        "text": "some answer",
        "image": "some image"
    }
]
```

## CLI

You can use the Chatto CLI tool by running the `chatto cli` tool, which launches a command line interface where you can send and receive messages from your bot. This is a useful mode when debugging.

## Prediction

You can test the command predictions with a `POST` request to the `/bot/predict` endpoint with the following body structure:

```json
{
    "text": "good"
}
```

Example with cURL:

```bash
curl --request POST 'http://localhost:4770/bot/predict' \
--header 'Content-Type: application/json' \
--data-raw '{
    "text": "foo"
}'
```

The resulting prediction will look like this:

```json
{
    "original": "foo",
    "predicted": "good",
    "probability": 0.3274336283185841
}
```

repository: Erzhan-Temir/chatto

repo_name: Erzhan-Temir/chatto


text:
# Contributing

We recommend that you use an [example](./example) or external app when developing and testing changes to this library.

You can install all the dependencies in the root directory. Since the monorepo uses Lerna and Yarn Workspaces, npm CLI is not supported (only yarn). We declare a preferred NPM version in the root directory and if you have corepack enabled, the correct version of yarn will automatically be used.

```sh
nvm use
corepack enable
yarn install
```

This will install all dependencies in each project, build them, and symlink them via Lerna

## Development workflow

Because sdk-react is a multi-package monorepo, one can work on multiple packages at the same time or on a single package within the larger set. All commands made from the root directory of the repo will execute that command in each of its packages.

This will launch and watch all packages within sdk-react.

```sh
yarn start
```

It is most often the case that developers are interesting in making changes in a single package within the monorepo. For those cases, it is faster to cd into the packages directory and behave as if you were working within a single project repository.

```sh
cd packages/hooks
yarn start
```

Each package builds into it's `<packages>/<package>/dist` directory and runs the project in watch mode so any edits you save inside `<packages>/<package>/src` cause a rebuild to `<packages>/<package>/dist`. The results will stream to to the terminal.

### Using the example/playground

You can play with local packages in the Parcel-powered example/playground.

```sh
cd example/parcel
yarn
yarn start
```

This will start the example/playground on `localhost:1234`. If you have lerna running watch in parallel mode in one terminal, and then you run parcel, your playground will hot reload when you make changes to any imported module whose source is inside of `packages/*/src/*`. Note that to accomplish this, each package's `start` command passes TDSX the `--noClean` flag. This prevents Parcel from exploding between rebuilds because of File Not Found errors.

Important Safety Tip: When adding/altering packages in the playground, use `alias` object in package.json. This will tell Parcel to resolve them to the filesystem instead of trying to install the package from NPM. It also fixes duplicate React errors you may run into.

#### Yarn link

https://classic.yarnpkg.com/en/docs/cli/link
`yarn link` is a command that helps during the development of npm packages. It links a local npm package to an existing project that uses yarn package manager. This will be helpful to make local changes to sdk-react reflected on other packages seamlessly

## Link

1. cd to the package you want to link (for example, `./packages/hooks`), then run:

```sh
yarn link
```

notice the package name on package.json, it should be `@sajari/*`. In this case we have `@sajari/react-hooks`

2. cd to the repository you want to link `@sajari/react-hooks` with, then run

```sh
yarn link @sajari/react-hooks
```

now `./packages/hooks` will be linked to `{YOUR_REPO}/node_modules` and changes to `./packages/hooks/dist` will affect that repository instantly

## Unlink

If you don't want to use the local package anymore, run

```sh
yarn unlink @sajari/react-hooks
yarn install --force
```

to use the remote package

## Unlink all

To clear all the linked packages you have register to yarn, run

```sh
rm -rf ~/.config/yarn/link
yarn install --force
```

Check out `Yalc` if `yarn link` doesn't work for you!

#### Yalc

[Yalc](https://github.com/whitecolor/yalc) is an alternative to `yarn/npm link` (and Parcel aliasing) that many developers find useful because it more closely mimics how NPM works. It works kind of like a local package registry via filesystem and symlinking magic.

To do this, install yalc globally.

Using NPM:

```sh
npm i yalc -g
```

Using Yarn:

```sh
yarn global add yalc
```

Then in each package's `start` command add a [`yalc publish`](https://github.com/whitecolor/yalc#publish) or `yalc push` as an TSDX `--onSuccess` hook.

```diff
"scripts": {
-   "start": "tsdx watch --verbose --noClean",
+   "start": "tsdx watch --verbose --noClean --onSuccess yalc publish",
    "build": "tsdx build --tsconfig tsconfig.build.json",
    "test": "tsdx test",
    "lint": "tsdx lint",
    "prepublish": "npm run build"
  },
```

In your example directory, now add each package via yalc

```sh
yalc add <package>
# or
yalc link <package>
```

There's definitely room for improvement with this workflow, so please contribute if you come up with something better.

## Release

We use [Changesets](https://github.com/changesets/changesets) and Github Pull Requests to manage releases. Any PR which makes changes to behaviour of a released package should create a changeset before posting the PR for review.

```sh
yarn changeset
```

When a PR with a changeset is merged to master, an automated process will handle creating a subsequent PR which can be used to release that new change publicly.

repository: tuanddd/sajari-sdk-react

repo_name: tuanddd/sajari-sdk-react


text:
# [webpack](http://github.com/webpack/webpack) Plugin for [DocPad](http://docpad.org)

[![Build Status](https://secure.travis-ci.org/RobLoach/docpad-plugin-webpack.png?branch=master)](http://travis-ci.org/RobLoach/docpad-plugin-webpack "Check this project's build status on TravisCI")
[![NPM version](https://badge.fury.io/js/docpad-plugin-webpack.png)](http://badge.fury.io/js/docpad-plugin-webpack "View this project on NPM")
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/RobLoach/docpad-plugin-webpack/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

[DocPad](https://docpad.org) plugin that allows bundling CommonJs/AMD/Labeled
Modules for the browser using [webpack](http://github.com/webpack/webpack).

## Install

```bash
$ docpad install webpack
```

## Usage

Reference the [webpack documentation](http://github.com/webpack/docs/wiki) for
a full understanding of webpack. The below is only an introduction to how to use
it with DocPad:

### Entry

The entry point to webpack defaults to `src/entry.js`, so create a file there:

``` javascript
console.write("It works.");
```

When building with DocPad, webpack will compile the bundles to `out/bundle.js`.

### Second file

Create a file `src/content.js` with the following content:

``` javascript
module.exports = "It works from content.js.";
```

Modify `entry.js` to make use of it:

``` javascript
var content = require("./content.js");
console.log(content);
```

Rebuilding with DocPad will bundle both `entry.js` and `content.js` into the
same `out/bundle.js`.

## Configuration

The default configuration for this plugin is the equivalant of adding the
following [webpack options](http://github.com/webpack/docs/wiki/webpack-options)
to your [DocPad configuration file](http://docpad.org/docs/config):

``` coffeescript
plugins:
  webpack:
    webpackOptions:
      entry: './entry.js'
      context: ''
      cache: false
      optimize:
        minimize: false
      output:
        path: ''
        filename: 'bundle.js'
```

## History
[You can discover the history inside the `History.md` file](https://github.com/robloach/docpad-plugin-webpack/blob/master/History.md#files)

## Contributing
[You can discover the contributing instructions inside the `Contributing.md` file](https://github.com/robloach/docpad-plugin-webpack/blob/master/Contributing.md#files)

## License
Licensed under the incredibly [permissive](http://en.wikipedia.org/wiki/Permissive_free_software_licence) [MIT License](http://creativecommons.org/licenses/MIT/)
<br/>Copyright © 2013 [Rob Loach](http://robloach.net)

repository: sokra/docpad-plugin-webpack

repo_name: sokra/docpad-plugin-webpack


text:
# Visio Lending Coding Challenge

#### Table of Contents
- [Business Requirements](#business-requirements)
- [Functional Requirements](#functional-requirements)
- [Testing](#testing)
- [References](#references)
- [License](#license)
- [Additional Info](#additional-info)

---

## Business Requirements

> #### Summary
>A stakeholder at Visio Financial Services wants a solution that allows the business to dynamically generating product pricing from a set rules defined by the finance team.
>

>The finance team has given you an initial set of rules on how to price the products, however, these rules could change at any time so we need to be able to update the rules easily and rerun the product pricing to see the new prices of the products.
>
> #### Initial Rules:
>* All products start at 5.0 interest_rate.
>* If the person lives in Florida (condition), we do not offer the product to them and the product is to be disqualified (action).
>* If the person has a credit score greater than or equal to 720(condition) then we reduce the interest_rate on the product by .3 (action that has an input of “.3”, remember the business may decide in the future they want to reduce it by .5).
>* If the person has a credit score lower than 720 we increase the interest_rate on the product by .5.
>* If the name of the product is “7-1 ARM” then we need to add .5 to the interest_rate of the product.

---

## Functional Requirements
>
> #### Base Product Rules values
>* product id, name, description
>* base interest rate
>* high credit score interest rate offset
>* low credit score interest rate offset
>* discount qualifying credit score
>* list of disqualifying States
>
> #### Product Rules values:
>* product id, name, description
>* product-specific interest rate offset
>* product-specific minimum qualifying credit score
>
> #### Rules Definition:
>* Needs to be extendable and defined outside of the code.
>* Should define an action, any parameters an action needs, and under what condition to execute the action.
>
>![productRules json](https://user-images.githubusercontent.com/56689034/67430813-a6027300-f5a8-11e9-8d1d-b8a4e041693a.png)

---

## Test Validation

> #### Product Qualification:
> Validate qualification based on the person's residing state.
>* Person should be qualified if person's residing state is not in base rule's disqualified states list.
>   * Qualified person, based on residing state, should be disqualified if the credit score is lower than the minimum credit score required for the product.
>* Person should be disqualified if the person's residing state is in base rule's disqualified states list.
>   * Disqualified person, based on residing state, should not be qualified based on meeting or exceeding the minimum credit score required for the product.
>
>#### Product Interest Rate Offset:
> * Validate interest rate offset based on person's credit score.
>   * Product interest rate should be discounted if the person's credit score greater or equaled to the defined discount qualifying credit score.
>   * Product interest rate should be increased if the person's credit score is lower then the defined discount qualifying credit score.
> * Validate interest rate offset based on product.
>   * Product interest rate should be adjusted accordingly based on the product's 'additionalProductInterestRate' value.
>
> #### Example:
> ###### Simple Test
> ![SimpleTest](https://user-images.githubusercontent.com/56689034/67430814-a6027300-f5a8-11e9-8199-f5697d55d6c7.png)
>
> ###### Parameterized Test
> ![ParameterizedTestResults](https://user-images.githubusercontent.com/56689034/67430812-a6027300-f5a8-11e9-80a8-ccd0d33500a2.png)

[Back To The Top](#visio-lending-coding-challenge)

---

## Expectations

>- [ ] Build a rules engine to accomplish what the business has asked above.
>- [ ] Exhaustively test all possible rule outcomes and assert that the rules engine works as expected and meets the business requirements.
>- [ ] Show the extendability of your rules engine and create your own rules definition to execute an additional action on a product.
>- [ ] Upload your solution to github giving instructions on how to run the rules engine and any tests.
>- [ ] Finally, be prepared to lead a review on the submitted code to discuss any patterns or design decisions you made.

[Back To The Top](#visio-lending-coding-challenge)

---

## References
>
> [Guide to JUnit5 Parameterized Tests](https://www.baeldung.com/parameterized-tests-junit-5)

[Back To The Top](#visio-lending-coding-challenge)

---

## License
    The MIT License (MIT)

    Copyright (c) (2019) Sean Kim

    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.

[Back To The Top](#visio-lending-coding-challenge)

---

## Additional Info
> GitHub Repo: [github.com/seankimsdet/visiolendingdemo](https://github.com/seankimsdet/visiolendingdemo)
>
 Author Profile: [seankimsdet.github.io](https://seankimsdet.github.io)

[Back To The Top](#visio-lending-coding-challenge)

repository: seankimsdet/visiolendingdemo

gha_language: Java

repo_name: seankimsdet/visiolendingdemo


text:
# FixOldPHPMySQL
Project which I created to revive an old project made in PHP 5.3 with old MySQL functions like mysql_connect, mysql_query (replaced by mysqli) and a fix to get an associative array with mysqli_fetch_assoc.

You will need the Apache Commons IO library.

How to use when you compile:

`java -jar FixOldPHPMySQL.jar ./PHP_files_path var_without_dollar`

license: Unlicense


text:
---
bio: My research interests are in sensory & foraging ecology, the impact of anthropogenic noise in the oceans, and the development and application of high resolution biologging systems.
education: []
email: ""
highlight_name: false
interests: []
organizations:
- name: University of St. Andrews, UK
  url: https://www.st-andrews.ac.uk/
role: Other Contributor
superuser: true
title: René Swift
active: true
user_groups:
    - Researchers
---
René Swift is a research assistant within the Sound & Movement Tag Lab and part time PhD student. René has an honours degree in Zoology, a Masters degree in Oceanography, and 20 years of field experience. René could be called a “jack of all trades and a master of none”; he has broad research interests in sensory & foraging ecology, the impact of anthropogenic noise in the oceans, and the development and application of high resolution biologging systems. Within in the Sound & MovementTag Lab René is involved in Dtag development, construction, testing & calibration; he is also involved in writing and testing software tools for processing, analysing & visualising tag data. René is happiest in the field or in the lab creating things with his hands. [René Swift](https://www.soundtags.org/people/rene-swift/)

repository: stacyderuiter/animaltags

branch_name: refs/heads/main

repo_name: stacyderuiter/animaltags


text:
---
# Documentation: https://sourcethemes.com/academic/docs/managing-content/

title: 'Social and physical disorder : how community, business presence and entrepreneurs
  influence disorder in Dutch neighborhoods'
subtitle: ''
summary: ''
authors:
- Wouter Steenbeek
tags: []
categories: []
date: '2011-05-01'
lastmod: 2020-09-28T13:46:04+02:00
featured: false
draft: false

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
# Focal points: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight.
image:
  caption: ''
  focal_point: ''
  preview_only: false

# Projects (optional).
#   Associate this post with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["internal-project"]` references `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects: []
publishDate: '2020-09-28T11:46:04.213546Z'
publication_types:
- 0
abstract: From 2000 onwards Dutch governments have tried to improve the general 'livability'
  of neighborhoods, of which troublesome and potentially threatening social conditions
  (social disorder) and physical conditions (physical disorder) are one part. A major
  focus in these plans for improvement is the juxtaposition of 'living' and 'working'
  in the same neighborhood.   The presence of firms and local business ownership is
  thought to improve the neighborhood. Evidence for this idea is, however, hard to
  find. Business presence may lead to a regular flow of people on the street, thereby
  stimulating normal use and providing 'eyes on the street'. In contrast, empirical
  studies often find that business presence is related to more social and physical
  disorder rather than less disorder. Moreover, there is almost no research on individual
  actions by local entrepreneurs to make the neighborhood safer or cleaner.   This
  dissertation, a collection of five research papers, addresses these issues. It investigates
  the effect of neighborhood community characteristics and the effect of businesses
  on a neighborhood’s social and physical disorder. Complementary arguments from social
  disorganization theory and routine activity theory are combined to derive hypotheses
  on the effect of business presence and the actions by local business owners on the
  level of social and physical disorder. A combination of datasets and different statistical
  analyses (structural equation modeling, hierarchical linear analyses) are used to
  answer the research questions.   Most importantly, this study finds that (a) the
  presence of businesses is an important predictor of disorder, rivaling traditional
  explanations (e.g., population turnover); (b) disorder is not only caused by, but
  also drives population turnover and weakening of social control; (c) local entrepreneurs
  only differ from (unemployed) residents with regard to their willingness to intervene
  in disorderly situations
publication: ''
url_pdf: http://dspace.library.uu.nl/handle/1874/204642
---

repository: wsteenbeek/woutersteenbeeknl-website

repo_name: wsteenbeek/woutersteenbeeknl-website


text:
This document will be sparse. I hope to convery information verbally, either as a presentation to the group or one-on-one as you work. But this is here as a reference.

* [Useful Info](#useful-info)
    * [SSH to the VM](#ssh-to-the-vm)
* [Overview](#overview)
* [Docker](#docker)
    * [Making a docker image](#making-a-docker-image)
    * [Running a container](#running-a-container)
        * [Mounting data](#mounting-data)
    * [Getting your image onto the server](#getting-your-image-onto-the-server)
* [Container Service](#container-service)

# Useful Info

* Hackathon VM: [https://containers-demo.xnat.org](https://containers-demo.xnat.org)
* Swagger UI [https://containers-demo.xnat.org/xapi/swagger-ui.html](https://containers-demo.xnat.org/xapi/swagger-ui.html)
* Private key file for SSH: [ftp://ftp.nrg.wustl.edu/pub/data/containers/hackathon/keys/hackathon](ftp://ftp.nrg.wustl.edu/pub/data/containers/hackathon/keys/hackathon)
* Example Dockerfiles / Commands: [https://github.com/NrgXnat/docker-images](https://github.com/NrgXnat/docker-images)

## SSH to the VM
Get the private key file from the [FTP link](ftp://ftp.nrg.wustl.edu/pub/data/containers/hackathon/keys/hackathon). Put it somewhere (`~/.ssh` is a good place for linux/macOS).

SSH to the VM with the following info:

* username: `hack`
* server: `containers-demo.xnat.org`
* Private key passphrase: `gruesome-demigod` (It was randomly generated.)

So your ssh line will be:

    $ ssh -i <path to private key><EMAIL_ADDRESS>    Enter passphrase for key '<path to private key>':

And you will enter the passphrase `gruesome-demigod`.

# Overview
Today we will be

* Learning about docker
* Learning about the XNAT Container Service
* Making a docker image
* Writing a Command
* Launching a container from your Command

There are two things you need to have to run something with the container service:

1. A docker image
2. A Command that describes that docker image

# Docker

Docker is an executable that you can use to build and run containers. As part of this hackathon, you should create a docker image to do something that you want to do from within XNAT.

## Making a Docker image
Write a Dockerfile. [tutorial](https://docs.docker.com/engine/getstarted/step_four/)

You can check some examples that I wrote: [https://github.com/NrgXnat/docker-images](https://github.com/NrgXnat/docker-images).

## Running a container

Your Docker image is a perfect, unchanging, etherial entity. It only has some executable and the bare minimum of requirements. But you probably want to actually _do_ something with it. You do that by launching a container from the image.

    $ docker run <name of your image> <the command line for your image>

### Mounting data
It is likely that we will have some data outside the container that we want to bring inside (say, some dicom files that we want to do something with). To do that, we must **mount** the data into the container.

    $ docker run -v /path/to/data:/path/inside <name of your image> <the command line for your image>

Whatever is in the directory `/path/to/data` on the host machine will be seen by your container at `/path/inside`.

So, for example, let's say you are running a dicom to nifti conversion. On your host machine you have a directory full of dicom files at `/data/my_project/subject_123/T1/resources/dicom` and you've created an empty destination directory at `/temp/results/subject_123`. Your docker image (and the containers that spawn from it) could be written to expect to read files at `/input` and write files to `/output`.

You could mount those directories into your container as `/input` and `/output`, or `/dicom` and `/nifti`, or whatever you want.

## Getting your image onto the server
If you build it on your local machine, and push it up to Docker Hub, you can get it onto the server by

* SSHing in to the VM and building the image there
* Push your image up to Docker Hub, and
    * Pull it down on the VM using docker
    * Pull it down on the VM using XNAT by `POST`ing to `/xapi/docker/images/pull?image=<your image name>`

# Container Service

The Container Service is an XNAT 1.7 plugin that allows XNAT and its users to launch docker containers to do work on their XNAT data.

## Command
The all-important object that you need to create to run a docker image with the container service is the Command. (I wrote a lot about the format of the Command [here](https://wiki.xnat.org/display/CS/Command).)

You will need to define a Command to run your docker image. You will put into this Command definition things like:

* The docker image you're running
* How to run the image on the command line
* What data needs to be mounted? (This data will likely come from something in XNAT, so you'll need...)
* Inputs? Simple things like strings and booleans, or XNAT things like Sessions, Scans, and Resources.
* Outputs? If you want files to go back into XNAT, you'll need to note where they are, and where they will go.

See the [Command documentation](https://wiki.xnat.org/display/CS/Command) for more.

repository: NrgXnat/container-service

gha_license_id: NOASSERTION

repo_name: NrgXnat/container-service


text:
Postman for Node.js
=======
- Homepage (Google Chrome app) - http://www.getpostman.com
- Blog (Tutorials/Updates) - http://blog.getpostman.com
- Documentation - http://www.getpostman.com/docs/

About Postman for Node.js
=======
Postman for Node.js is a fork of the popular Postman app for Google Chrome. Its goal is to help you be more efficient while working with HTTP APIs.

While the original Postman ran only in your local browser, Postman for Node.js runs on a Node.js server, which means it can be deployed anywhere for the purpose of providing a SaaS solution for testing APIs. For example, Postman can now be used to test APIs that otherwise might be inaccessible due to firewall restrictions.

Features
========

Create requests quickly.

- Compact layout
- HTTP requests with file upload support
- Formatted API responses for JSON and XML
- HATEOAS support
- Image previews
- Request history
- Basic Auth and OAuth 1.0 helpers
- Autocomplete for URL and header values
- Key/value editors for adding parameters or header values. Works for URL parameters too.
- Use environment variables to easily shift between settings. Great for testing production, staging or local setups.
- Keyboard shortcuts to maximize your productivity

Document and share APIs.

- Use collections to organize requests.
- Document requests inside collections. You can even store entire HTML notes. Postman uses Bootstrap so you can use it too to style your notes.
- Download and share collections with your team of developers.

Installing
=========================

Postman for Node should run easily in any Node.js capable environment.

Running locally
-------------------------
1. `git clone` this repository
2. `npm install` to grab all of the dependencies
3. `npm start` to run the app
4. Launch a browser and visit `http://localhost:3000`

Postman for Node should also run more or less unmodified on Platform-as-a-Service (PaaS) providers that support Node.js natively.

Building and Developing
=========================
1. Install the dependencies
	```
	sudo npm install -g grunt grunt-cli
	```

2. Generate the template.js and request.js files by running grunt. You can watch the folder for changes using:
	```
	grunt watch
	```
3. For misc. grunt tasks, take a look at `grunt.js`.

Submitting bugs
===============
Simply open a new issue at: https://github.com/mhamann/postman-node/issues

repository: harishjan/postman-node

repo_name: harishjan/postman-node


text:
# Issue name

* Related Issues: _#IssueNumber if necessary_

## Introduction

A short description of what the features or the bugs are. Try to keep it simple and within a
single-paragraph.

## Issue Description

Describe the bug found or the feature that you are proposing.

If it's completely new feature explain why this new functionality is necessary, and propose some advice for the development (or just open a Pull Request if you have already started to work on the feature on your own).

## Steps to reproduce issue

If the bug is complex to describe, show how developers can reproduce it (using code snippet, database data, etc...) and describe its drawbacks.

## Expected behaviour

Explain what is the expected behaviour of a program while using the code related to this issue.

## Actual behaviour

Explain what is the actual behaviour of a program and what are the actual errors while running the affected code.


text:
---
layout: post
title: Testing Machine Learning Tools with Ames Housing Data
featured-img : ames-iowa
categories: [Project, EDA]
---

The Ames Iowa Housing dataset is well known teaching dataset from Kaggle and provides a solid dataset to test new practices and expand knowledge. In this post, I will outline some of the latest methods I have been trying to learn more about them and understand best use cases.

### Missing Data and Imputing Values

- Different methods

### Feature Engineering

### Testing New Models or Python Libraries

- TPOT


text:
## Status Quo [![Code Climate](https://codeclimate.com/github/solid5nake/status-quo/badges/gpa.svg)](https://codeclimate.com/github/solid5nake/status-quo) [![Travis CI](https://travis-ci.org/solid5nake/status-quo.svg)](https://travis-ci.org/solid5nake/status-quo)

Monitor the status of your application. Send alerts and visualize the application status over time

### Usage

```ruby
StatusQuo.watch :social_media do

  segment :facebook do
    schedule "30 9 * * *"
    confirm do
      `curl -sL -w "%{http_code}" "http://facebook.com" -o /dev/null` == "200"
    end
  end

  segment :twitter do
    recipient<EMAIL_ADDRESS>    schedule "30 9 * * *"
    confirm do
      `curl -sL -w "%{http_code}" "http://twitter.com" -o /dev/null` == "200"
    end
  end

  segment :instagram do
    schedule "30 9 * * *"
    confirm do
      `curl -sL -w "%{http_code}" "http://instagram.com" -o /dev/null` == "200"
    end
  end

end
```

### License

Copyright (c) 2015 Bram Engel, released under the MIT License

http://github.com/solid5nake –<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.


text:
---
title: "Week 18 & 19 - Training ConvLSTM for raw samples"
excerpt: "Train a ConvLSTM with all motion types and DOF on raw samples."
sidebar:
  nav: "docs"

classes: wide

categories:
- logbook

tags:
- logbook
- studying

author: NuriaOF
pinned: false

---

## Proposed net

Continuing with the use of raw images recurrence propose the use of ConvLSTM layer resulting in the following net:
{% include figure image_path="/assets/images/logbook/week18/REC_convLSTM_simple.png" alt="ConvLSTM Net" %}

Before the recurrent layer, it is necessary to introduce a convolve to reduce the dimensionality of the data and make it more manageable.

## Linear dataset results

- 1 DOF, 8000 training samples, 1000 test samples
{% include figure image_path="/assets/images/logbook/week18/lin_1DOF.png" alt="ConvLSTM-Linear 1 DOF " %}

- 2 DOF, 8000 training samples, 10000 test samples
{% include figure image_path="/assets/images/logbook/week18/lin_2DOF.png" alt="ConvLSTM-Linear 2 DOF " %}

## Parabolic dataset results

- 1 DOF, 8000 training samples, 10000 test samples
{% include figure image_path="/assets/images/logbook/week18/par_1DOF.png" alt="ConvLSTM-Parabolic 1 DOF " %}

- 2 DOF, 8000 training samples, 10000 test samples
{% include figure image_path="/assets/images/logbook/week18/par_2DOF.png" alt="ConvLSTM-Parabolic 2 DOF " %}

- 3 DOF, 80000 training samples, 10000 test samples
{% include figure image_path="/assets/images/logbook/week18/par_3DOF.png" alt="ConvLSTM-Parabolic 3 DOF " %}

## Sinusoidal dataset results

- 1 DOF, 80000 training samples, 10000 test samples
{% include figure image_path="/assets/images/logbook/week18/sin_1DOF.png" alt="ConvLSTM-Sinusoidal 1 DOF " %}

- 2 DOF, 80000 training samples, 10000 test samples
{% include figure image_path="/assets/images/logbook/week18/sin_2DOF.png" alt="ConvLSTM-Sinusoidal 2 DOF " %}

- 3 DOF, 80000 training samples, 10000 test samples
{% include figure image_path="/assets/images/logbook/week18/sin_3DOF.png" alt="ConvLSTM-Sinusoidal 3 DOF " %}

- 4 DOF, 80000 training samples, 10000 test samples
{% include figure image_path="/assets/images/logbook/week18/sin_4DOF.png" alt="ConvLSTM-Sinusoidal 4 DOF " %}

## Conclusions

The results obtained are better than those of the CNN, although there is still a prediction limit in the prabolic 3 DOF and in the sinusoidal 2 DOF, although with a smaller error. It should also be noted that, although low average values are obtained, the maximums are high and there is a large presence of outliers that worsen the prediction.

gha_language: Python


text:
![2010-07-07_ukp_banner](https://user-images.githubusercontent.com/29311022/27184688-27629126-51e3-11e7-9a23-276628da2430.png)

![aiphes_logo - small](https://user-images.githubusercontent.com/29311022/27278631-2e19f99e-54e2-11e7-919c-f89ae0c90648.png)
![tud_weblogo](https://user-images.githubusercontent.com/29311022/27184769-65c6583a-51e3-11e7-90e0-12a4bdf292e2.png)

## Repository of the COLING 2018 paper: [A Retrospective Analysis of the Fake News Challenge Stance Detection Task](https://arxiv.org/pdf/1806.05180.pdf)
* BibTeX:

		@inproceedings{tubiblio105434,
           		month = {Juni},
            		year = {2018},
       			booktitle = {Proceedings of the 27th International Conference on Computational Linguistics (COLING 2018)},
           		title = {A Retrospective Analysis of the Fake News Challenge Stance-Detection Task},
          		author = {Andreas Hanselowski and Avinesh P.V.S. and Benjamin Schiller and Felix Caspelherr and Debanjan * Chaudhuri and Christian M. Meyer and Iryna Gurevych},
             		url = {http://tubiblio.ulb.tu-darmstadt.de/105434/}
			}

## Introduction

The repository was originaly developed as a part of the Fake News Challenge Stage 1 (FNC-1 http://www.fakenewschallenge.org/) by team Athene:
[Andreas Hanselowski](mailto:hanselowski@aiphes.tu-darmstadt.de), [Avinesh PVS](mailto:avinesh@aiphes.tu-darmstadt.de), [Benjamin<EMAIL_ADDRESS>and [Felix Caspelherr](mailto:felixc@shared-files.de).
In the project, we worked in close collaboration with [Debanjan Chaudhuri](mailto:deba.kgec@gmail.com).

Prof. Dr. Iryna Gurevych, AIPHES-Ubiquitous Knowledge Processing (UKP) Lab, TU-Darmstadt, Germany

It was further developed and enhanced by [Felix<EMAIL_ADDRESS>in scope of his master thesis.
The code was additionaly modified and extended for the submission to the "[27th International Conference on Computational Linguistics (COLING 2018)](https://coling2018.org/)":
"[A Retrospective Analysis of the Fake News Challenge Stance Detection Task](https://arxiv.org/pdf/1806.05180.pdf)"

## Requirements

* Software dependencies

		python >= 3.4 (tested with 3.4)

## Installation

1. Install required python packages.

		python3.4 -m pip install -r requirements.txt --upgrade
		python3.4 -m pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0rc0-cp34-cp34m-linux_x86_64.whl

    alternatively you can set up an anaconda environment based on "anaconda_env_FNC_challenge.yml" by executing following command in the fnc folder:

        conda env create -f anaconda_env_FNC_challenge.yml

    (Note: If you use a higher CUDA version, you might have to use a newer version of tensorflow.)

2. Parts of the Natural Language Toolkit (NLTK) might need to be installed manually.

		python3.4 -c "import nltk; nltk.download('stopwords'); nltk.download('punkt'); nltk.download('wordnet'); nltk.download('cmudict');"

3. Copy Word2Vec [GoogleNews-vectors-negative300.bin.gz](https://drive.google.com/file/d/0B7XkCwpI5KDYNlNUTTlSS21pQmM/edit) in folder

        [project_name]/data/embeddings/google_news/

    (folders have to be created)

4. Download [Paraphrase Database: Lexical XL Paraphrases 1.0](http://www.cis.upenn.edu/~ccb/ppdb/release-1.0/ppdb-1.0-xl-lexical.gz) and extract it to the ppdb folder.

		gunzip ppdb-1.0-xl-lexical.gz [project_name]/data/ppdb/

    (folders have to be created)

5. To use the Stanford-parser an instance has to be started in parallel: Download [Stanford CoreNLP](https://stanfordnlp.github.io/CoreNLP/index.html), extract anywhere and execute following command:

		wget http://nlp.stanford.edu/software/stanford-corenlp-full-2016-10-31.zip
		java -mx4g -cp "*" edu.stanford.nlp.pipeline.StanfordCoreNLPServer -port 9020

6. In order to reproduce the the results of the experiments mentioned in our COLING paper "A Retrospective Analysis of the Fake News Challenge Stance Detection Task", please modify fnc/settings.py to match the desired experiments.
At the current state, the model "voting_mlps_hard" will be trained and tested on the FNC corpus. All combinations of models and features used are listed in the settings file in _feature_list_.

## Additional notes

* Setup tested on Anaconda3 (tensorflow 0.9 gpu version)*
Be sure that cuda library is setup correctly.

		conda create -n env_python3.4 python=3.4 anaconda
		source activate env_python3.4
		python3.4 -m pip install -r requirements.txt --upgrade
		python3.4 -m pip install --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow-0.9.0rc0-cp34-cp34m-linux_x86_64.whl

## To Run

To run execute following steps:
1. Make sure that an instance of th Stanford CoreNLP server is running (see step 5 above)
2. run "python pipeline.py -p ftrain"

 --> features will be created and saved in the corresponding folder fnc/data/fnc-1/features/[selected corpus]/

 --> the model will be saved in /fnc/data/fnc-1/mlp_models/
3. note down the model name of the trained model and align settings.py
4. run "python pipeline.py -p ftest" to obtain results (FNC score, F1 scores and confusion matrix)

 --> Result-scores will appended to fnc/fnc_results.txt

 --> The labeled test-file will be saved to fnc/data/fnc-1/fnc_results/

Note: The "stanford features" and topic features may take several hours to be computed.

For more details

	python pipeline.py --help

        e.g.: python pipeline.py -p crossv holdout ftrain ftest

        * crossv: runs 10-fold cross validation on train / validation set and prints the results
        * holdout: trains classifier on train and validation set, tests it on holdout set and prints the results
        * ftrain: trains classifier on train/validation/holdout set and saves it to fnc/data/fnc-1/mlp_models/
        * ftest: predicts stances of unlabeled test set based on the model

## System description

A more detailed description of the system including the features, which have been used, can be found in the document: [system_description_athene.pdf](https://github.com/hanselowski/athene_system/edit/master/system_description_athene.pdf)


text:
# Illustration and Design

All illustrations done by Kelly Dern www.kellydern.com

# Template

This template uses the responsive blog theme based off the [ButterCMS blog](https://buttercms.com/blog/) and [Bootstrap](http://getbootstrap.com/).

[See the theme](https://buttercms.github.io/blog-template/)

```shell
sass --watch styles/styles.scss:styles/styles.css
```

### Help

Open an issue here or email [support@buttercms.com](mailto:support@buttercms.com).

### License

This code is released under the MIT license

repository: kellydern/leftoftheabyss

repo_name: kellydern/leftoftheabyss


text:
#The rules and righte ample documentes, touchinge the vse and practise of the common almanackes, which are named ephemerides A briefe and shorte introduction vpon the iudiciall astrologie, for to prognosticate of thinges to come, by the helpe of the sayde ephemerides. With a treatise added hereunto, touchinge the coniunction of the planets, in euery one of the. 12. signes, and of their prognostications and reuolutions of yeres. The hole faithfully, and clerely translated into Englyshe by Humfrey Baker. Canons & documents tresamples, touchant l'usage & practique des communs almanachz, que l'on nomme ephemerides. English#

##Fine, Oronce, 1494-1555.##
The rules and righte ample documentes, touchinge the vse and practise of the common almanackes, which are named ephemerides A briefe and shorte introduction vpon the iudiciall astrologie, for to prognosticate of thinges to come, by the helpe of the sayde ephemerides. With a treatise added hereunto, touchinge the coniunction of the planets, in euery one of the. 12. signes, and of their prognostications and reuolutions of yeres. The hole faithfully, and clerely translated into Englyshe by Humfrey Baker.
Canons & documents tresamples, touchant l'usage & practique des communs almanachz, que l'on nomme ephemerides. English
Fine, Oronce, 1494-1555.

##General Summary##

**Links**

[TCP catalogue](http://www.ota.ox.ac.uk/tcp/)  •
[HTML](http://tei.it.ox.ac.uk/tcp/Texts-HTML/free/A00/A00750.html)  •
[EPUB](http://tei.it.ox.ac.uk/tcp/Texts-EPUB/free/A00/A00750.epub) •
[Page images (Historical Texts)](https://data.historicaltexts.jisc.ac.uk/view?pubId=eebo-99843120e&pageId=eebo-99843120e-7830-1)

**Availability**

This keyboarded and encoded edition of the
	       work described above is co-owned by the institutions
	       providing financial support to the Early English Books
	       Online Text Creation Partnership. This Phase I text is
	       available for reuse, according to the terms of Creative
	       Commons 0 1.0 Universal. The text can be copied,
	       modified, distributed and performed, even for
	       commercial purposes, all without asking permission.

**Major revisions**

1. __2006-12__ __TCP__ *Assigned for keying and markup*
1. __2007-01__ __Apex CoVantage__ *Keyed and coded from ProQuest page images*
1. __2007-05__ __Emma (Leeson) Huber__ *Sampled and proofread*
1. __2007-05__ __Emma (Leeson) Huber__ *Text and markup reviewed and edited*
1. __2008-02__ __pfs__ *Batch review (QC) and XML conversion*

##Content Summary##

#####Front#####

1. ¶ To the louynge Reader.

1. ¶ The Table of the Rules and generall thinges conteyned in this volume.

#####Body#####

1. ¶ Of thynges conteyned at the begynnyng and entring of the Ephemerides The firſt Rule, or Canon.

1. Of the Eclipes of the ſunne and mone ſecond Rule.

1. For to knowe the quantitie of the ſaid eclipſes. 3. Rule.

    _ Example.

1. Of the directions and retrogradaciōs of the. 5. planets the. 4.

1. ¶ Of the true mouementes of the lightes and the planetes and other thinges conteyned in the lefte face of the ſayde Ephemerides. 5. rule.

1. Of the equallitie, and vnequallitie of the naturall daies. the. 6.

1. The manner too bringe the true place and mouemente of the moone, vnto the true noonetide. The. 7.

1. To know ye true place, & mouemēt of ye lightes & planets, at euery howre that a mā pleaſe: whether it be, afore or after noone. The. 8. Rule.

1. ¶ For to bringe the true mouement of the moone vnto what meridiane you pleaſe. 9. rule.

1. Of the latitude of the. 5. planetes. ♄. ♃. ♂. ♀. and. ☿.

1. Of the Latytude of the moone. the. 11.

1. Of the aſpectes of the moone vnto the ſunne and planetes, & other thinges conteyned in the righte and ſeconde face of the ſaide Ephemerides the. 12. rule.

1. Howe the newe and full mones, and eclypſes, maye be reduced vnto what meridiane you will, differynge from the ſame of the Ephemerides▪ The. 13.

1. Of the aſpectes of the ſunne vnto the planettes, and of the planettes amonge theim ſelues, and of the dragon of the moone. The. 14.

1. ¶ When the planets are oriental or occidental. 15. rule.

1. For to knowe the quantitie of the artificial daye and of the nighte, and at what houre the ſunne ryſethe and ſetteth. 16. rule

1. ¶ Of the, 12. houſes of heauen, and of their nature accidentall accordinge vnto the iudgement of the aſtrologians. 17. rule.

1. ¶ Howe to erecte and diſtyngue the. 12. houſes of heauen, after the order of the ſayd Ephemerides. 18. rule

    _ ¶ The firſte parte or difference, when the time is preciſely at noone

      * ¶ The maner how to proportionate the ſayde houſes when the true place of the ſunne hath minutes.

    _ ¶ The ſeconde parte or difference, when the time propoſed is after none.

    _ ¶ The thirde parte or difference when the time propoſed is before none.

      * ¶ Of the ſixe houſes occidentals, oppoſites, or contrarye vnto the ſixe goinge before.

1. ¶ Of the nature and complexion of the lightes, and of the .v. planetes. The .xx. rule.

1. Of the force and accidentall nature of the aſpectes. The. 21. • ule.

1. ¶ A declaration of the table of the fixed ſterres whiche is in the Ephemerides. The. 22. rule.

1. Of the 28 manſions or abidinge places of the mone. The 23. rule.

    _ ¶ Heare foloweth the nature and qualitie of the 28 manſions of the mone, with the elections depending of the ſame.

1. ¶ A declaration of the table whiche is before the Ephemerides, touching the force, dignitie, exaltation, and other termes or boundes of the Planetes in euery of the 12 ſignes. 24 rule.

1. ¶ Generall and perticuler rules, for to iudge of the mutation and chaunge of the ayre. The 25 rule.

    _ ¶ Perticuler rules of the aſpectes of the planetes amonge them ſelues.

    _ ¶ Perticuler rules by the aſpectes of the mone with the planetes.

    _ ¶ Other rules, and generall doctrines, for to knowe better and more ſurelye to iudge of the varietie of the time and weather, of the alteration of the ayre by the coniunctions, quadratures, & oppoſitions of the ſunne and of the mone.

1. ¶ Of the aſpectes and conſtellations which muſt be obſerued and choſen for to beginne and ende happelye all workes and humayne buſineſſe. The .xxvii. rule.

1. ¶ Of elections which are to be obſerued in the plylebotomie or lettinge of bloud. The. 28. rule.
〈1… pages missing〉with Mars, Saturne, or Jupiter. And this ſhal ſatiſfy you for me decinal rlections
1. ¶ Of elections for to ſowe, and to plant trees and vines. The .xxx. rule.

1. ✴Here folovveth a ſingular treatiſe of Aſtrologie touching the coniunctions of the planettes in euery of the twelue ſignes, and of theyr Prognoſtications in the reuolutions of yeares.

    _ ¶ Of the ſignifications of the planetes in euerye of the ſayde ſignes and houſes.

    _ Of the ſignification of the coniuntion of the planets in the ſigne of Aries.

    _ Of the ſignification of the coniunction of the planets in the ſigne of Taurus.

    _ ¶ Of the ſignification of the cōiunction of the planetes in Gemini.

    _ ¶ Of the ſignification of the cōiunction of the planetes in Cancer.

    _ Of the coniunctiō of the planets in Leo.

    _ ¶ Of the ſignificatiō of the coniunction of the planets in Uirgo.

    _ ¶ Of the ſignification of the coniunctiō of the planets in Libra.

    _ ¶ Of the ſignification of the coniunctiō of the planetes in Scorpius.

    _ ¶ Of the ſignification of the cōiunction of the planets in Sagittarius.

    _ Of the ſignification of the coniunction of ye planets in the ſigne of capriconus.

    _ Of the ſignification of the coniunction of the planets in the ſigne of Aquarius.

    _ Of the ſignification of the coniūction of the planets in the ſigne of Piſces.

#####Back#####
¶ Imprinted at London in Fleteſtrete nere to S. Dunſtons church by Thomas Marſhe.
**Types of content**

  * There are 4 **verse** lines!
  * Oh, Mr. Jourdain, there is **prose** in there!

There are 187 **ommitted** fragments!
 @__reason__ (187) : illegible (185), missing (2)  •  @__resp__ (185) : #APEX (185)  •  @__extent__ (187) : 2 letters (25), 4 letters (10), 1 letter (119), 3 letters (11), 1 word (5), 1 span (15), 1+ pages (2)

**Character listing**

|Text|string(s)|codepoint(s)|
|---|---|---|
|Latin-1 Supplement|¶ë ô|182 235 160 244|
|Latin Extended-A|ſ|383|
|Combining             Diacritical Marks|̄|772|
|General Punctuation|•…|8226 8230|
|Geometric Shapes|▪□△◊|9642 9633 9651 9674|
|Miscellaneous Symbols|☉☽♄♃♂♀☿☊☋♈♉♊♋♌♍♎♏♐♑♒♓☌☍⚹|9737 9789 9796 9795 9794 9792 9791 9738 9739 9800 9801 9802 9803 9804 9805 9806 9807 9808 9809 9810 9811 9740 9741 9913|
|Dingbats|✴|10036|
|CJKSymbolsandPunctuation|〈〉|12296 12297|

##Tag Usage Summary##

###Header Tag Usage###

|No|element name|occ|attributes|
|---|---|---|---|
|1.|__author__|3||
|2.|__availability__|1||
|3.|__biblFull__|1||
|4.|__change__|5||
|5.|__date__|8| @__when__ (1) : 2008-09 (1)|
|6.|__edition__|1||
|7.|__editionStmt__|1||
|8.|__editorialDecl__|1||
|9.|__extent__|2||
|10.|__idno__|6| @__type__ (6) : DLPS (1), STC (2), EEBO-CITATION (1), PROQUEST (1), VID (1)|
|11.|__keywords__|1| @__scheme__ (1) : http://authorities.loc.gov/ (1)|
|12.|__label__|5||
|13.|__langUsage__|1||
|14.|__language__|1| @__ident__ (1) : eng (1)|
|15.|__listPrefixDef__|1||
|16.|__note__|8||
|17.|__notesStmt__|2||
|18.|__p__|11||
|19.|__prefixDef__|2| @__ident__ (2) : tcp (1), char (1)  •  @__matchPattern__ (2) : ([0-9\-]+):([0-9IVX]+) (1), (.+) (1)  •  @__replacementPattern__ (2) : http://eebo.chadwyck.com/downloadtiff?vid=$1&page=$2 (1), https://raw.githubusercontent.com/textcreationpartnership/Texts/master/tcpchars.xml#$1 (1)|
|20.|__projectDesc__|1||
|21.|__pubPlace__|2||
|22.|__publicationStmt__|2||
|23.|__publisher__|2||
|24.|__ref__|2| @__target__ (2) : https://creativecommons.org/publicdomain/zero/1.0/ (1), http://www.textcreationpartnership.org/docs/. (1)|
|25.|__seriesStmt__|1||
|26.|__sourceDesc__|1||
|27.|__term__|2||
|28.|__textClass__|1||
|29.|__title__|5||
|30.|__titleStmt__|2||

###Text Tag Usage###

|No|element name|occ|attributes|
|---|---|---|---|
|1.|__cell__|641| @__rows__ (23) : 2 (3), 4 (7), 7 (2), 3 (5), 5 (4), 6 (2)  •  @__role__ (21) : label (21)  •  @__cols__ (40) : 15 (6), 3 (2), 2 (24), 12 (1), 14 (7)|
|2.|__desc__|187||
|3.|__div__|56| @__type__ (56) : title_page (1), to_the_reader (1), table_of_contents (1), part (29), example (1), subpart (20), section (2), treatise (1)  •  @__n__ (30) : 1 (2), 2 (2), 3 (2), 4 (1), 5 (1), 6 (1), 7 (1), 8 (1), 9 (1), 11 (1), 12 (1), 13 (1), 14 (1), 15 (1), 16 (1), 17 (1), 18 (1), 20 (1), 21 (1), 22 (1), 23 (1), 24 (1), 25 (1), 27 (1), 28 (1), 29 (1), 30 (1)|
|4.|__epigraph__|2||
|5.|__figure__|2||
|6.|__g__|842| @__ref__ (842) : char:EOLhyphen (404), char:cmbAbbrStroke (127), char:EOLunhyphen (234), char:Moon (11), char:punc (43), char:quadrine (21), char:trine (1), char:stella (1)|
|7.|__gap__|187| @__reason__ (187) : illegible (185), missing (2)  •  @__resp__ (185) : #APEX (185)  •  @__extent__ (187) : 2 letters (25), 4 letters (10), 1 letter (119), 3 letters (11), 1 word (5), 1 span (15), 1+ pages (2)|
|8.|__head__|61||
|9.|__hi__|224| @__rend__ (58) : sup (58)|
|10.|__item__|33||
|11.|__l__|4||
|12.|__label__|12||
|13.|__lg__|1||
|14.|__list__|3||
|15.|__note__|22| @__place__ (22) : margin (22)|
|16.|__p__|200| @__n__ (29) : 2 (1), 3 (1), 4 (1), 5 (1), 6 (1), 7 (1), 8 (1), 9 (1), 10 (1), 11 (1), 12 (1), 13 (1), 14 (1), 15 (1), 16 (1), 17 (1), 18 (1), 19 (1), 20 (1), 21 (1), 22 (1), 23 (1), 24 (1), 25 (1), 26 (1), 27 (1), 28 (1), 29 (1), 30 (1)|
|17.|__pb__|107| @__facs__ (107) : tcp:7830:1 (2), tcp:7830:2 (2), tcp:7830:3 (2), tcp:7830:4 (2), tcp:7830:5 (2), tcp:7830:6 (2), tcp:7830:7 (2), tcp:7830:8 (2), tcp:7830:9 (2), tcp:7830:10 (2), tcp:7830:11 (2), tcp:7830:12 (2), tcp:7830:13 (2), tcp:7830:14 (2), tcp:7830:15 (2), tcp:7830:16 (2), tcp:7830:17 (2), tcp:7830:18 (2), tcp:7830:19 (2), tcp:7830:20 (1), tcp:7830:21 (2), tcp:7830:22 (2), tcp:7830:23 (2), tcp:7830:24 (2), tcp:7830:25 (2), tcp:7830:26 (2), tcp:7830:27 (2), tcp:7830:28 (2), tcp:7830:29 (2), tcp:7830:30 (2), tcp:7830:31 (2), tcp:7830:32 (2), tcp:7830:33 (2), tcp:7830:34 (2), tcp:7830:35 (2), tcp:7830:36 (2), tcp:7830:37 (2), tcp:7830:38 (2), tcp:7830:39 (2), tcp:7830:40 (2), tcp:7830:41 (2), tcp:7830:42 (2), tcp:7830:43 (2), tcp:7830:44 (2), tcp:7830:45 (2), tcp:7830:46 (2), tcp:7830:47 (2), tcp:7830:48 (2), tcp:7830:49 (2), tcp:7830:50 (2), tcp:7830:51 (2), tcp:7830:52 (2), tcp:7830:53 (2), tcp:7830:54 (2)  •  @__rendition__ (1) : simple:additions (1)|
|18.|__q__|2||
|19.|__row__|137||
|20.|__seg__|4| @__rend__ (4) : decorInit (4)|
|21.|__table__|22||
|22.|__trailer__|4||


text:
# DevOps

## Continuous Integration

### [Bandit](bandit.md)

* New: Explain how to ignore errors.

# Coding

## [Python](python.md)

* New: Explain how to check if a loop ends completely.
* New: Explain how to merge lists and dictionaries.
* New: Explain how to create your own exceptions.

### [Libraries](requests_mock.md)

* New: Explain how to set cookies and headers in responses.

### [DeepDiff](deepdiff.md)

* Correction: Remove murmur from the installation steps.

    It seems it's the default for the new versions

### [FactoryBoy](factoryboy.md)

* New: Explain how to generate your own attributes.

    We earlier used lazy_attribute but if you want to use Faker inside the
    attribute definition, you're going to have a bad time. The new solution
    uses the creation of custom Fake providers.

### [Faker](faker.md)

* New: Explain how to create your own provider.

    Useful to generate custom objects for testing purposes.

### [Python Snippets](python_snippets.md)

* Correction: Explain how to show the message in custom exceptions.
* New: Explain how to import a module or object from within a python program.

### [pexpect](pexpect.md)

* New: Introduce the pexpect python library.

    A pure Python module for spawning
    child applications; controlling them; and responding to expected patterns in
    their output. Pexpect works like Don Libes’ Expect. Pexpect allows your
    script
    to spawn a child application and control it as if a human were typing
    commands.

### [Prompt Toolkit](prompt_toolkit.md)

* New: Introduce the tui python library.

    Useful to build text-based user interfaces, it allows the creation of
    intelligent prompts, dialogs, and full screen ncurses-like applications.

### [Pydantic](pydantic.md)

* New: Explain how to initialize attributes.

    Use validators to initialize attributes

* New: Name the pros and cons of using the library.
* New: Explain how to create bidirectional relationship between entities.
* New: Warn on the lack of TypeDict support.

### [Pypika](pypika.md)

* New: Explain how to insert, update, select data.
* New: Explain how to join tables.

### [questionary](questionary.md)

* New: Introduce tui python library.

    [questionary](https://questionary.readthedocs.io) is a Python library
    for effortlessly building pretty command line interfaces. It makes it
    very easy to query your user for input.

### [Requests](requests.md)

* New: Introduce the requests python library.

### [Rq](rq.md)

* New: Add note to test arq.

    arq is a similar library that can be better.

## [SQL](sql.md)

* New: Give examples on joins for each relationship type.

## [SQLite](sqlite.md)

* New: Solve the autoincrementation not working bug.

# Life Management

## Automation

### [Accounting Automation](money_management.md)

* New: Explain my accounting automation workflow.

# Operative Systems

## Linux

### [beancount](beancount.md)

* New: Introduce the cli double entry accounting program.
* New: Add links on how to use as a library.
* Correction: Correct the git repository link.

## Android

### [cone](cone.md)

* New: Introduce the mobile double entry accounting application.
* Correction: Correct the description of the transaction to be beancount compatible.

# Other

* New: Add remote work tips.
* New: Introduce lazy loading implementation paradigm with python.
* New: Explain how to lazy load pydantic objects.

repository: lyz-code/blue-book

gha_language: Makefile

repo_name: lyz-code/blue-book


text:
---
title: Java Setup
---

The Apache Tomcat® software is an open source implementation of the Java Servlet (.jsp files)

Or Maven or IntelliJ

export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_201.jdk/Contents/Home

repository: arthuranteater/my-blog

gha_language: JavaScript

repo_name: arthuranteater/my-blog


text:
===================

SeaHash: A bizarrely fast hash function.

SeaHash is a hash function with performance better than (around 3-20% improvement) xxHash and
MetroHash. Furthermore, SeaHash has mathematically provable statistical guarantees.

In action:

[![The hash function in action.](http://ticki.github.io/img/seahash_construction_diagram.svg)](http://ticki.github.io/img/seahash_construction_diagram.svg)

repository: ahmed-masud/tfs

gha_language: Rust

repo_name: ahmed-masud/tfs