text:
# Aigents® Server requirements configuration, operation and API use

![https://aigents.com/](https://aigents.com/img/aigents_wrench.png)

The following describes configuration and operation of Aigents server as a console application or a server deamon (so called “Aigents Farm”) with no user interface.

## Aigents® Requirements

Aigents Server can be installed on any Java-friendly operating environment fulfilling the following requirements.

1. Minimum 4G RAM size, the more - the better.
1. Minumum 32G HDD/SSD size.
1. Java 1.7 or higher installed (JRK from Oracle recommended, not OpenJDK from IBM).
	1. For Linux, follow https://ubuntu.com/tutorials/install-jre and https://www.oracle.com/java/technologies/downloads/#java8-linux
3. Ability to open ports for HTTP/HTTPS and TCP/IP (telnet) connections.
5. Optionally - ability to access email servers for incoming and outgoing email.

## Aigents® Basic configuration

The following describes very basic steps of Aigents server setup.

1. Download Aigents.jar file to application folder such as /home/aigents/ (or any other accessible folder on Linux or Windows system).
1. Download and install all [Installation Pre-requisites](../README.md)
1. Disable access to application folder to web users so its content could not be opened by web server
1. Configure port intended to host Aigents TSP/IP console (for example - 1123) or HTTP Web API (for example 1180) so these ports ar made available for access from the internet (or intranet if you are going to access Aigents locally)
1. Start Aigents server in application folder:
	```
	java -cp Aigents.jar:* -Xms2048m -Xmx3072m net.webstructor.agent.Farm
	```
	* _**Note: To avoid [known issue with Java 8](https://bugs.java.com/view_bug.do?bug_id=8156179), you need to add the option to Java command line:
	-Dsun.zip.disableMemoryMapping=true**_
1. Setup administrative account (need to fill properties **email, name, surname, secret question, secret answer**) - from Aigents command line interface:
	```
	I:Started TCP at 1123.
	I:Started HTTP at 1180.
	my email<EMAIL_ADDRESS>name admin, surname admin.
	Login:email<EMAIL_ADDRESS>name admin, surname admin.
	I:What your secret question, secret answer?
	my secret question password, secret answer 12345.
	I:What your password?
	my password 12345.
	...
	I:Ok. Hello Admin Admin!
	My Aigents 3.1.6 Copyright © 2020 Anton Kolonin, Aigents®.
	...
	```
1. Optionally, for telnet terminal access, re-configure TCP/IP port, filling **tcp port** property (default is port 1123) - from Aigents command line interface:
	```
	...
	your tcp port 1123.
	Dec:Dec:[aigents [tcp port 1123]]. I:Ok.
	what your tcp port?
	Int:[aigents tcp port]?
	I:My tcp port 1123.
	...
	```
1. Optionally, for HTTP/HTTPS web service access, re-configure web site parameters **http origin, http port, cookie domain, cookie name** (needed for Web API access only, default port is 1180):
	```
	...
	your http origin http://aigents.mysite.org, http port 1180, cookie domain aigents.mysite.org, cookie name myaigent.
	Dec:[aigents ([http origin http://aigents.mysite.org] [http port 1180] [cookie domain aigents.mysite.org] [cookie name myaigent])].
	I:Ok.
	your http origin, http port, cookie domain, cookie name?
	Int:[aigents (http origin http port cookie domain cookie name)]?
	I:My cookie domain aigents.mysite.org, cookie name myaigent, http origin http://aigents.mysite.org, http port 1180.
	...
	```
1. Optionally, for email access, setup email account (POP3 and SMTP) and for sending notifications (SMTP), filling properties **email, email login, email password, mail.pop3s.host, mail.smtp.host** (for example, based on mysite.org) - from Aigents command line interface:
	```
	...
	your email<EMAIL_ADDRESS>email login aigent, email password qwerty, mail.pop3s.host mail.mysite.org, mail.smtp.host mysite.org.
	Dec:[aigents ([email<EMAIL_ADDRESS>[email login aigent] [email password qwerty] [mail.pop3s.host mail.mysite.org] [mail.smtp.host mysite.org])].
	I:Ok.
	what your email, email login, email password, mail.pop3s.host, mail.smtp.host?
	Int:[aigents (email email login email password mail.pop3s.host mail.smtp.host)]?
	I:My email<EMAIL_ADDRESS>email login aigent, email password 'qwerty', mail.pop3s.host mail.mysite.org, mail.smtp.host mysite.org.
	...
	```
1. Save configuration and exit Aigents server with command-line interface:
	```
	...
	you save!
	I:Ok.
	bye
	Dec:[name bye].
	...
	I:Ended.
	```
1. Start Aigetns over per step 8 above, but now better using it as daemon with **nohup** Linux command or console application with **screen** Linux command so that server keeps running uninterruptedly upon current session termination:
	```
	#nohup java -cp Aigents.jar:* -Xms2048m -Xmx3072m net.webstructor.agent.Farm console off &
	[1] 12345
	#appending output to nohup.out
	...

	or

	#screen
	#java -cp Aigents.jar:* -Xms2048m -Xmx3072m net.webstructor.agent.Farm
	...
	... open another Linux terminal session ...
	...
	```
1. If telnet terminal access is configured, ensure that you can remotely control Aigents server console, using telnet on TCP/IP port specified above (may be not secure because telnet protocol is not encrypted):
	```
	#telnet aigents.mysite.org 1123
	Trying <IP_ADDRESS>...
	Connected to aigents.mysite.org.
	Escape character is '^]'.
	my name admin
	What your password?
	my password 12345
	Ok. Hello Admi Admin!
	My Aigents 3.1.6 Copyright © 2020 Anton Kolonin, Aigents®.
	...
	bye
	No thing.
	Connection closed by foreign host.
	```
1. If HTTP/HTTPS web service is configured, check access to Aigents Web service API HTTP/HTTPS protocol on TCP/IP port specified above to connect to Aigents server via Web brower or any HTTP client:
	```
	URL:http://aigents.mysite.org:1180/?my%20name%20admin
	What your password?
	URL:http://aigents.mysite.org:1180/?my%20password%2012345
	Ok. Hello Admin Admin!
	My Aigents 3.1.6 Copyright © 2020 Anton Kolonin, Aigents®.
	...
	```
1. Check location of storage and logging files in application folder (containing **Aigents.jar** file):
Storage al.txt file sfould be backed up - either using either Dropbox folder to host the entire application folder or by custom backing up scripts.
Logging files named such as aigents-log-2020-11-30-log.txt should be cleaned up periodically - manually or using custom backing up scripts.

## Aigents® Basic Web API use

The following describes basics of Aigents Web API over HTTP/HTTPS protocol for the purpose of Web monitoring and news collection.

1. Consider that Aigents Web API is similar to plain HTTP/HTTPS REST service API with few differences:
	* Request is submitted in [Aigents Language (AL)](https://github.com/aigents/aigents-java/blob/master/doc/papers/2014/AgentLanguageKolonin.pdf)
	* Response is returned in either AL or JSON (in specific cases)
	* GET and POST methods can be used interchangeably, PUT and DELETE are not supported
	Authentication is based on cookies (configured with properties cookie domain and cookie name, as described in previous section). That is, respective fields of the HTTP header should be filled. When Aigents server parses the HTTP request, it reads Cookie field of HTTP header. If filled in, it keeps it to maintain the session. If not filled in, it generates new one to create new session.
	When Aigents server builds the HTTP response, it fills Set-Cookie field of HTTP header with value of existing on newly created session cookie. On the client side, the sessions and cookies may be maintained, for PHP example, with PEST wrapper of CURL functions (https://github.com/educoder/pest):
	```
	$baseURL = "http://aigents.mysite.org:1180/?";
	$cookie;
	function url_pest( $url ) {
		global $baseURL, $cookie;
		$pest = new Pest($baseURL);
		try {
			$url = $baseURL.urlencode($url);
			if (isset($cookie)) {
				$pest->curl_opts[CURLOPT_COOKIE] = $cookie;
			}
			$result = $pest->get($url);
			$cookie=$pest->last_headers['set-cookie'];
			unset($pest);
			return $result;
		} catch( Exception $e ) {
			unset($pest);
			throw($e);
		}
	}
	```
	* _**Note 1: While the following examples are given using AL over HTTP/HTTPS protocol, the same interactions can be performed over TCP/IP protocol using Telnet or any other client.**_
	* _**Note 2: When submitting AL requests over HTTP/HTTPS, space and its escaped version %20 are interchangeable, so "my%20name%20admin" is equivalent for "my name admin".**_
1. Requests and response are currently processed as HTTP GET requests, so the response is submitted to URL including domain name and optional port, followed by slash and question mark with following URI-encoded text of complete statement in [Aigents Language](https://github.com/aigents/aigents-java/blob/master/doc/papers/2014/AgentLanguageKolonin.pdf), to be parsed accordingly to [language defintion](https://github.com/aigents/aigents-java/blob/master/doc/papers/2014/AgentLanguageKolonin.pdf) while response is written to the stream, for example – the authentication is done as shown below:
	```
	URL:http://aigents.mysite.org:1180/?my%20name%20admin
	What your password?
	URL:http://aigents.mysite.org:1180/?my%20password%2012345
	Ok. Hello Admin Admin!
	My Aigents 3.1.6 Copyright © 2020 Anton Kolonin, Aigents®.
	```
1. Operations with sites, things and news used for web monitoring are performed accordingly to [belief ontology of Aigents for Web](https://github.com/aigents/aigents-java/blob/master/doc/papers/2014/AgentWatchingKolonin.pdf), as described below. All of the following operations are possible after user is authenticated (logged in) as shown above.
	Listing sites is done with “my sites ...” statement, for example:
	```
	URL:http://aigents.mysite.org:1180/?what%20my%20sites?
	Your sites http://money.cnn.com/data/markets/dow/, http://wired.com, http://www.nytimes.com/pages/business/, http://www.reuters.com/.
	```
	Listing things is done with “my knows ...” statement, for example:
	```
	URL:http://aigents.mysite.org:1180/?what%20my%20knows?
	Your knows “goole $topic”, “dow jones $value”.
	```
	Listing news is done with “what times …, is … sources … ” statement, for example:
	```
	URL:http://aigents.mysite.org:1180/?what times yesterday is “google $topic”, text?
	There text google chrome helper; text google chrome helper.
	URL:http://aigents.mysite.org:1180/?what times 2014-10-18 is “google $topic”, topic?
	There topic chrome helper; topic chrome helper.
	URL:http://aigents.mysite.org:1180/?what times 2014-10-18 is “google $topic”, text, sources?
	There sources http://www.reuters.com/, text google chrome helper; sources http://www.wired.com/ text google chrome helper.
	URL:http://aigents.mysite.org:1180/?what sources http://www.reuters.com/ is “google $topic”, text, times?
	There text google chrome helper, times 2014-10-18; text google glass technology, times 2017-10-19; text google now intelligence, times 2017-10-20.
	```
	Adding sites is done with “my sites … ” statement, for example:
	```
	URL:http://aigents.mysite.org:1180/?my%20sites%20http://www.reuters.com/,%20http://www.wired.com/.
	Ok.
	```
	Adding things is done with “my knows … ” statement, for example:
	```
	URL:http://aigents.mysite.org:1180/?my%knows%kung-fu,%20'google $topic',%20“dow jones $value”.
	Ok.
	```
	Configuring extra patterns for things is done with “... patterns …” statement, for example:
	```
	URL:http://aigents.mysite.org:1180/?kung-fu patterns bruce-lee, kung-fu, “kung fu”, shaolin.
	Ok.
	```
	Configuring typed variables (of types such as word, time, number and money) for patterns is done having variables explicitly specified for a thing with “... has ...” statement, for example:
	```
	URL:http://aigents.mysite.org:1180/?dow jones $value” has value.
	Ok.
	URL:http://aigents.mysite.org:1180/?value is number.
	Ok.
	URL:http://aigents.mysite.org:1180/?Trump $action Putin” has action.
	Ok.
	URL:http://aigents.mysite.org:1180/?action is word.
	Ok.
	URL:http://aigents.mysite.org:1180/?Operation starts at $hour_x” has hour_x.
	Ok.
	URL:http://aigents.mysite.org:1180/?hour_x is time.
	Ok.
	URL:http://aigents.mysite.org:1180/?offer_price pas patterns “offer price $price” has price_y.
	Ok.
	URL:http://aigents.mysite.org:1180/?price_y is money.
	Ok.
	```

## Aigents® Extended Web API examples

The following presents various scenarios of Aigents use demonstrated with Aigents server test suite implemented in PHP.

1. Download English and Russian lexicon files to application folder
	```
	https://github.com/aigents/aigents-java/blob/master/lexicon_english.txt
	https://github.com/aigents/aigents-java/blob/master/lexicon_negative_english.txt
	https://github.com/aigents/aigents-java/blob/master/lexicon_positive_english.txt
	https://github.com/aigents/aigents-java/blob/master/lexicon_rude_english.txt
	https://github.com/aigents/aigents-java/blob/master/lexicon_russian.txt
	https://github.com/aigents/aigents-java/blob/master/lexicon_negative_russian.txt
	https://github.com/aigents/aigents-java/blob/master/lexicon_positive_russian.txt
	https://github.com/aigents/aigents-java/blob/master/lexicon_rude_russian.txt
	```
1. Make sure Aigents server can be started on the localhost at port 1080 as described above.
1. Run Aigents server in application folder with no storage mode (with store path '' option):
	```
	#nohup java -cp Aigents.jar:* -Xms2048m -Xmx3072m net.webstructor.agent.Farm store path "''", cookie domain localtest.com, console off &
	```
1. Create separate test folder for tests and copy PHP test suite files to it from https://github.com/aigents/aigents-java/tree/master/php/agent
1. Create separate http folder for test Web server contents and copy test data files to it from https://github.com/aigents/aigents-java/tree/master/html
1. Host Web server in the http folder created above as a root Web folder, on port 80 under domain localtset.com. For other domain, will need to create respective URL-s in PHP files.
	* For hosting Web server, Python SimpleHTTPServer application can be used, as in the following example:
		* Make sure you have Python with SimpleHTTPServer downloaded and installed.
		* Run Python web server as the following command:
			```
			#python -m SimpleHTTPServer 80
			```
1. Run Aigents tests as the following command:
	```
	#php -f agent_test.php
	```
1. Wait till tests are succeeded with success:
	```
	...
	GET:Ok.
	SUCCESS!
	```
1. Study PHP code involved in tests for different use cases.
1. Change or PHP code to explore possible scenarios.

## Aigents® Social Network Integration with Web API

Aigents Server can be used to collect and analyse information in social networks, as it is described in articles [How to get your personal analytics for Steemit social network with help of Aigents bot](https://steemit.com/ai/@akolonin/how-to-get-your-personal-analytics-for-steemit-social-network-with-help-of-aigents-bot), [Using Aigents bot service to get social network analytics for Facebook, Google+ and VKontakte](https://steemit.com/ai/@akolonin/using-aigents-bot-service-to-get-social-network-analytics-for-facebook-google-and-vkontakte), [Personal social graph analysis for Steemit and Golos](https://steemit.com/psychology/@aigents/personal-social-graph-analysis-for-steemit-and-golos) and [Social Graph as Mirror in the Net](https://steemit.com/psychology/@aigents/social-graph-as-mirror-in-the-net).

The following describes how it can be configured and used to access social analytics functions of Aigents, either using existing demo Aigents service at ```"https://aigents.com/al?what your name"``` (as Aigents-branded application) or proprietary servers configured as described above (under brand of your own).

There are many protocols can be used to access the Aigents Social Analytics, such as the following:
* Using Aigents Chat at https://aigents.com/ - available for Aigents Web users at the Aigents Web Demo server or users of any other server hosting the Aigents Server deployment with Web UI;
* Using [Aigents Facebook Messenger Bot](https://www.messenger.com/t/aigents) - available for Aigents Web Demo server users or any users of the any other Aigents Server deployment configured for Facebook;
* Using [Aigents Telegram Bot](https://web.telegram.org/#/im?p=@AigentsBot) - available for Aigents Web Demo server users or any users of the any other Aigents Server deployment configured for Telegram;
* Using raw TCP/IP protocols via sockets, as discussed earlier - available at **aigents.com:1123** and for proprietary servers both;
* Using HTTP/HTTPS web servcice as discussed earlier - available at ```"https://aigents.com/al?"``` and for proprietary servers both - as discussed below:

1. To get reports on any user analytics on public networks based on blockchain technology such as Steemit, Golos or Ethereum with demo Aigents service, use the following flow:
	\
	\
	Logout prompt (recommended to do in the beginning of the session since long idle time to start new session unconditionally):
	```
	https://aigents.com/al?my logout
	```
	Login prompt:
	```
	https://aigents.com/al?my login
		What your email, name, surname?
	```
	Enter login email accordingly to registration:
	```
	https://aigents.com/al?my email <your email>
		What your <secret question>?
	```
	Confirm login email accordingly to configured secret question and answer:
	```
	https://aigents.com/al?my <secret question> <secret answer>
		Ok. Hello <your name>! My Aigents 3.1.6 Copyright © 2020 Anton Kolonin, Aigents®.
	```
	Request fresh report on at Steemit user (in HTML):
	```
	https://aigents.com/al?steemit id akolonin report fresh
		Your report is being prepared, please check back in few minutes…
	```
	Get completed report on any Steemit user requested earlier in HTML format:
	```
	https://aigents.com/al?steemit id akolonin report
		<HTML>
	```
	Request fresh report on at Steemit user in JSON format, for period of given number of days:
	```
	https://aigents.com/al?steemit id akolonin report fresh, format json, period 365
		Your report is being prepared, please check back in few minutes…
	```
	Get completed report on any Steemit user requested earlier in JSON format:
	```
	https://aigents.com/al?steemit id akolonin report, format json
		<JSON>
	```
	Request fresh report on at Steemit user in HTML format, for period of given number of days, with specific tag tag (e.g. “psychology”) with specific options:
	```
	https://aigents.com/al?steemit id akolonin report fresh, format html, period 365, areas psychology
		Your report is being prepared, please check back in few minutes…
	```
	Get completed report on any Steemit user requested earlier in HTML format (refresh if in browser):
	```
	https://aigents.com/al?steemit id akolonin report, format html
		<HTML>
	```
	Request fresh report on at Steemit user in HTML format, for period of given number of days, with specific tag tag (e.g. “ai”) with specific options:
	```
	https://aigents.com/al?steemit id akolonin report fresh, format html, period 365, areas ai, best friends, my words by periods, my karma by periods
		Your report is being prepared, please check back in few minutes…
	```
	Get completed report on any Steemit user requested earlier in HTML format (refresh if in browser):
	```
	https://aigents.com/al?steemit id akolonin report, format html
		<HTML>
	```
	Request fresh report on at Steemit user in JSON format, for period of given number of days, with specific tag tag (e.g. “ai”) with specific option:
	```
	https://aigents.com/al?steemit id akolonin report fresh, format json, period 365, areas ai, my karma by periods
		Your report is being prepared, please check back in few minutes…
	```
	Get completed report on any Steemit user requested earlier in JSON format (refresh if in browser):
	```
	https://aigents.com/al?steemit id akolonin report, format json
		<JSON>
	```
	Request fresh report on at Golos user in JSON format, for period of given number of days, with specific options:
	```
	https://aigents.com/al?golos id akolonin report fresh, format json, period 365, my karma by periods
		Your report is being prepared, please check back in few minutes…
	```
	Get completed report on any Golos user requested earlier in JSON format (refresh if in browser):
	```
	https://aigents.com/al?steemit id akolonin report, format json
		<JSON>
	```
	Request fresh report on at Golos user in JSON format, for period of given number of days, with specific tag (Russian tag names are transliterated like “поиск” => “ru--poisk”) with specific options:
	```
	https://aigents.com/al?golos id akolonin report fresh, format json, areas ru--poisk, period 365, my karma by periods
		Your report is being prepared, please check back in few minutes…
	```
	Get completed report on any Golos user requested earlier in JSON format (refresh if in browser):
	```
	https://aigents.com/al?steemit id akolonin report, format json
		<JSON>
	```
	Request fresh report on at Golos user in JSON format, for period of given number of days, with specific option - best friends, listing only top of them above 20% threshold:
	```
	https://aigents.com/al?golos id akolonin report fresh, format json, period 365, best friends, threshold 20
		Your report is being prepared, please check back in few minutes…
	```
	Get completed report on any Golos user requested earlier in JSON format (refresh if in browser):
	```
	https://aigents.com/al?steemit id akolonin report, format json
		<JSON>
	```
	Request fresh report on at Golos user in JSON format, for period of given number of days, with specific option - best friends, listing all of them above 0% threshold:
	```
	https://aigents.com/al?golos id akolonin report fresh, format json, period 365, best friends, threshold 0
		Your report is being prepared, please check back in few minutes…
	```
	Get completed report on any Golos user requested earlier in JSON format (refresh if in browser):
	```
	https://aigents.com/al?steemit id akolonin report, format json
		<JSON>
	```
1. Extended command options may be used for fine tuning contents and format of analytics:
	\
	\
	format \<file type>\
	\<file type> := html | json\
	(whether to encode report in html or json)\
	Example:
	```
	https://aigents.com/al?steemit id akolonin report fresh, format json
	```
	threshold \<percents>\
	\<percents> := 0  - 100\
	(number of percents of importance to hide least important items)\
	Example:
	```
	https://aigents.com/al?steemit id akolonin report fresh, format json, threshold 50
	```
	period \<days>\
	\<days> := 0  - 1000\
	(number of days to include in analysis from current date)\
	Example:
	```
	https://aigents.com/al?steemit id akolonin report fresh, format json, threshold 50, days 365
	```
	areas \<tag>\
	\<tag> := \<keyword>\
	(tag to restrict scope of analysis, only one tag may be used; multiple tags will be enabled later)\
	Example:
	```
	https://aigents.com/al?steemit id akolonin report fresh, format json, threshold 50, days 365, areas ai
	```
	* _**Note: When using https://golos.io/, only English encodings of tags is supported, so if need to use tag “разум”, should use “ru--razum” instead.**_
	* _**Note: To change report parameters, each time need to do 2 or more calls, depending on amount of data to be included in report, like in the following.**_
		\
		\
		First call - request report with parameters, for example:
		https://aigents.com/al?steemit id akolonin report fresh, format json, threshold 50, days 365, areas ai\
		Next calls - request report data in polling manner, each 10-30 seconds, until it returns valid json or html data, for example:
		https://aigents.com/al?steemit id akolonin report

1. For access of personal analytics and single-sign-on for users on Facebook, Reddit, Twitter, VKontakte and Google+, it is required to use proprietary application server configued with respect to policies of these social networks in respect to personal data and privacy protection, with the following options:
	* Application __id__, __key__ and __token__ for proprietery application obtained for respective social networks, accordingly to their API and developer policies. Obtained application keys and tokens should be configured with the following commands with command line, telnet or web chat with counfuguration saved and server restarted after changes.  For any user of these social networks, the user should accept account binding for respective proprietary application with given social network account. The proritetary application should maintain user tokens obtained in the course of account binding and provide these tokens to the engine upon request for analytics with expra __token__ property, as in the following examples:
	```
	facebook id<PHONE_NUMBER>7968601, token <token>, report
	google id<PHONE_NUMBER>92873877221, token <token>, report, format json
	```
1. The proritetary application should maintain security measures necessary to secure application keys and user tokens so they are not transmitted over public networks without encryption and are not stored in publicly available databases. It is responsibility of prorietary application to ensure protection of personal data of social network users, securing access to respective keys and tokens stored in application itself, in the Aigents server and being transmitted between them.

## Aigents® Web UI Customization

For custom Aigents Web User Interface (UI), get/fork the https://github.com/aigents/aigents-web project containing basic set of JavaScript files and HTML/CSS templates and feel free to override or replace them with account to __Aigents® License and Branding__ requirements below.

Feel free to changhe or customize Aigents Web UI code as distributed under [MIT License](https://github.com/aigents/aigents-java/blob/master/LICENSE).

## Aigents® License and Branding

Aigents® code is desitrubuted under the terms of [MIT License](https://github.com/aigents/aigents-java/blob/master/LICENSE), so the code can be used in any commercial and non-commercial applications in form of the open or closed source as long as the original Aigents® license is preserved.

For any academic, non-commercial or commercial use of Aigents service or user interface, it is required to provide Aigents branding information in the form of text "Powered by Aigents®" accompanied with one of the following icons, all linked to the https://aigents.com web site:

![](https://aigents.com/ui/img/aigent32.png) ![](https://aigents.com/img/aigent64wb.png) ![](https://aigents.com/ui/img/aigent.png)

## Aigents® Contact Information

[Stay in touch with Aigents creators and maintainers for updates, help and feedback](aigents_contacts.md).

![https://aigents.com/](https://aigents.com/img/aigents_wrench.png)

repository: aigents/aigents-java

gha_language: Java

repo_name: aigents/aigents-java


text:
---
title: Week 5
author: David Thomas
layout: collection
permalink: /lessons/week-5
collection: lessons
sidebar:
  nav: "sidebar_nav"
---

### Prepare

- Read
    - [Textbook](https://automatetheboringstuff.com/) Chapter 1.6 (Manipulating Strings)
- Submit
    - Answer the practice questions at the end of Chapter 1.6 in a Word .docx file and submit it on Canvas

### Lesson

- Class Reorganization
- Webscraper.io
    - [Webscraper](https://webscraper.io): Trying Different Sites
    - [Florida Memory: WPA Churches](https://www.floridamemory.com/collections/churchrecords/)
    - [PHI Greek Epigraphy](http://epigraphy.packhum.org/)
    - [Perseus](http://www.perseus.tufts.edu/hopper/collection?collection=Perseus:collection:Greco-Roman)
- Python
    - Strings
        - Escape characters `\' \t \n \\` & raw strings
        - Multiline strings & multiline comments
        - Indexing, slicing and `in` and `not in`
        - `.upper()`, `.lower()`, `.isupper()`, `.islower()`, and `isX()`
        - `starswith()`, `endswith()`
        - `.join()`, `.split()`, and `.strip()`

license: MIT

repository: thePortus/programming-the-past

branch_name: refs/heads/master

extension: md

gha_language: Jupyter Notebook

gha_license_id: MIT

license_type: permissive

repo_name: thePortus/programming-the-past


text:
# N-Space Privacy Policy (iOS)

N-Space does not collect any data on you or your usage of the app. Content created with the app is stored on your device or in your iCloud account only, unless you choose to share it.

repository: mazzzystar/voxel-editor

path: /Privacy Policy iOS.md

filename: Privacy Policy iOS.md

repo_name: mazzzystar/voxel-editor


text:
# React TS Timepicker

[![npm version](https://badge.fury.io/js/react-ts-timepicker.svg)](https://badge.fury.io/js/react-ts-timepicker) ![dependencies](https://david-dm.org/andrianovp/react-ts-timepicker.svg) [![Build Status](https://travis-ci.org/andrianovp/react-ts-timepicker.svg?branch=master)](https://travis-ci.org/andrianovp/react-ts-timepicker) [![Coverage Status](https://coveralls.io/repos/andrianovp/react-ts-timepicker/badge.svg?branch=master)](https://coveralls.io/github/andrianovp/react-ts-timepicker?branch=master)

This is a lightweight and easy to use time picker without dependencies for React, written in Typescript and thoroughly covered by unit tests.

<img src="https://pavelandrianov.ru/react-ts-timepicker/demo.gif" width="250">

## Demo
https://codesandbox.io/s/52ll738ljk

## Installation

Install plugin with npm:
```
$ npm install react-ts-timepicker
```
Or yarn:
```
$ yarn add react-ts-timepicker
```

## Compatibility

React 15.6+

## Basic usage

```javascript
import React, { Component } from 'react';
import TimePicker from 'react-ts-timepicker';

class App extends Component {
  state = {
    value: '10:00',
  }

  onChange = value => {
    this.setState({ value })
  }

  render() {
    return (
      <div>
        <TimePicker
          onChange={this.onChange}
          value={this.state.value}
        />
      </div>
    );
  }
}
```

## Configuration
Property | Type | Default value |Description
------------ | ------------- | ------------- | -------------
value | string / Date / null | `null` | The value of the input.
timeFormat | string | `hh:mma` | moment.js like time format string. See below for more information.
name | string | `timepicker` | The name of the input.
onChange | function | `() => {}` | Function called when the user picks a valid time. Type of the value will be the same as `value` has.
step | number | `30` | Step in minutes between two suggestions.
minTime | string / null | `null` | Suggestions start time.
maxTime | string / null | `null` | Suggestions end time. Without this prop suggestions max time equals one day.
includeMax | boolean | `true` | Whether or not include suggestions max time.
hideOnScroll | boolean | `false` | Whether or not hide suggestions on window scroll.
allowOnlySuggestions | boolean | `false` | Allow on suggestions values to be entered to the input. Input value will be rounded to the nearest suggestion.
className | string | `''` | Class name of the wrapping div. Can be used for overriding default time picker styles.
inputClass | string | `''` | Class name of the input element.
appendTo | string / null | `body` | Element where the suggestions are appended. Takes either `string` to use as a selector or `null` to append suggestions to time picker wrapper itself.

## Time formats
Input | Example | Description
------------ | ------------- | -------------
`H HH` | `0..23` | Hours (24 hour time)
`h hh` | `1..12` | Hours (12 hour time used with a A.)
`a A`	| `am pm`	 | Post or ante meridiem (Note the one character a p are also considered valid)
`m mm` | `0..59` | Minutes
`s ss` | `0..59` | Seconds

## License
This project is licensed under the MIT License .

repository: vektornsk/react-ts-timepicker

repo_name: vektornsk/react-ts-timepicker


text:
# Telegram User

Holds basic information about a user:

* id
* first_name
* last_name
* username
* is_bot

Can be modified to store more information.

repository: purwowd/django-tgbot

repo_name: purwowd/django-tgbot


text:
# About
Prototype of a command line invoice generator that takes git commit input and spits out a .txt invoice. Also my first offline foray into OOB.

### Installation
$ gem install invoices

### Configuration
$ invoices biller -n

$ invoices client -n

$ invoices invoice -c "Client Name"

## TO DO LIST
- Test on Windows & Linux
- add 'init' CL command?
- Verify that there are records in the database
- Write Controller tests
- Prevent invalid data from being saved
- Improve CLI
- Validate data before stored to db
- Support MySQL & PostgreSQL
- Add custom error messages throughout (see comments)
  - Client names need to be in quotes (raise exception if they aren't)
- Allow commit messages to be > 40 characters
- Universalize testing of #project_root
- [Review sqlite3 gem methods](http://sqlite-ruby.rubyforge.org/sqlite3/)
- Allow multiple git repos per invoice
- Provide control over which commits get added to the invoice
- Add ability to regenerate invoices
- Add ability to preview invoices @ the command line
- Allow users to select where they want their invoices to be stored
- Export invoices as PDFs

### Bugs
- Commit 12 in ~/.git throwing error

### License
The MIT License (MIT)
Copyright (c) 2013 Aaron Macy (aaronmacy.com)

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

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

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

repository: amacy/invoices

repo_name: amacy/invoices


text:
# Change Log

All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.3.1](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-31)

### Bug Fixes

* 🐛 expression regex issue ([66f17fc](https://github.com/actionsflow/actionsflow/commit/66f17fc34f3c1e1fead58ec3d38388aa43dd166e))

# [1.3.0](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-28)

**Note:** Version bump only for package actionsflow-core

# [1.3.0-alpha.0](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-28)

### Features

* change cache path ([9ca5f2c](https://github.com/actionsflow/actionsflow/commit/9ca5f2c27746d9aec1e86550a8ce6edc44c75ac1))

## [1.2.1](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-28)

**Note:** Version bump only for package actionsflow-core

# [1.2.0](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-24)

**Note:** Version bump only for package actionsflow-core

# [1.2.0-alpha.1](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-22)

### Features

* 🎸 outputs mode support combine, array ([6f57a98](https://github.com/actionsflow/actionsflow/commit/6f57a989869a0a5a7efe71935bea584c381cefb3))

# [1.2.0-alpha.0](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-21)

### Bug Fixes

* 🐛 skipFirst issue ([9035b2a](https://github.com/actionsflow/actionsflow/commit/9035b2a3e80085fe9e0f94053edeae55526b5a34))

# [1.1.0](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-11)

### Features

* 🎸 support cron and weather trigger ([33d11ab](https://github.com/actionsflow/actionsflow/commit/33d11ab0952b84aaa38e7195407138180f727392)), closes [#9](https://github.com/actionsflow/actionsflow/issues/9)

# [1.1.0-alpha.8](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-11)

### Features

* weather ([a18d1fd](https://github.com/actionsflow/actionsflow/commit/a18d1fd3d27db8a287452381eaf0d38470ea2993))

# [1.1.0-alpha.7](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-11)

### Bug Fixes

* every ([a5beb8a](https://github.com/actionsflow/actionsflow/commit/a5beb8a29b62e3945e03be45e0110151a7191a8e))

# [1.1.0-alpha.6](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-11)

### Bug Fixes

* debug log ([5a6d01a](https://github.com/actionsflow/actionsflow/commit/5a6d01a3db647662fd31c0cd9f99c1da4e0a74b1))

# [1.1.0-alpha.5](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-10)

### Bug Fixes

* global options ([a49652a](https://github.com/actionsflow/actionsflow/commit/a49652a3210f4901b06e1449c9859007cdecb6b5))

# [1.1.0-alpha.4](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-10)

### Features

* task ([c005e79](https://github.com/actionsflow/actionsflow/commit/c005e79fa54fa0e2d275d391578a7a9ff9e6358a))

# [1.1.0-alpha.3](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-10)

### Features

* manual ([1fe186d](https://github.com/actionsflow/actionsflow/commit/1fe186dcce7c284808c81225c730445024dbe2d7))

# [1.1.0-alpha.2](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-10)

### Bug Fixes

* cron dependence ([b13c4b4](https://github.com/actionsflow/actionsflow/commit/b13c4b41b4c7823ede1af76ec3c73630161ba13a))

# [1.1.0-alpha.1](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-10)

**Note:** Version bump only for package actionsflow-core

# [1.1.0-alpha.0](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-10)

### Features

* support cron every ([5c85545](https://github.com/actionsflow/actionsflow/commit/5c85545c4ed86d0722cad3e6645dd667442257a1))

## [1.0.4](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-06)

**Note:** Version bump only for package actionsflow-core

## [1.0.3](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-05)

### Bug Fixes

* 🐛 throw error when trigger throw an error ([00a1ffd](https://github.com/actionsflow/actionsflow/commit/00a1ffd31ff7937a9b470a4e822852c2a440c5cc))

### Performance Improvements

* ⚡ update dependencies ([35d8d15](https://github.com/actionsflow/actionsflow/commit/35d8d15d049f9b8109186449c3405a7c891d1bab))

## [1.0.2](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-04)

### Bug Fixes

* 🐛 js to yaml line width bug ([939f440](https://github.com/actionsflow/actionsflow/commit/939f440e735ebffbf14224974e4ebe325f23edd8))

## [1.0.1](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-04)

**Note:** Version bump only for package actionsflow-core

## [1.0.1-alpha.2](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-04)

**Note:** Version bump only for package actionsflow-core

## [1.0.1-alpha.1](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-04)

### Bug Fixes

* 🐛 fix release workflow ([c14f60f](https://github.com/actionsflow/actionsflow/commit/c14f60f718c3bd527b29402d34a455f51354ad7e))

## [1.0.1-alpha.0](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-04)

### Performance Improvements

* ⚡ move built workflow env to job env for args reduce ([5524302](https://github.com/actionsflow/actionsflow/commit/55243024add71f9d01db99a2e44095ee517fc2fb)), closes [#4](https://github.com/actionsflow/actionsflow/issues/4)

# [1.0.0](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-01)

**Note:** Version bump only for package actionsflow-core

# [1.0.0-alpha.5](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-10-01)

**Note:** Version bump only for package actionsflow-core

# [1.0.0-alpha.4](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-09-30)

### Bug Fixes

* 🐛 createContentDigest support number type ([7d6230b](https://github.com/actionsflow/actionsflow/commit/7d6230b636f57ab4bb79ad358de87d23cd3244e4))

# [1.0.0-alpha.3](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-09-30)

**Note:** Version bump only for package actionsflow-core

# [1.0.0-alpha.2](https://github.com/actionsflow/actionsflow/compare/actionsflow-core<EMAIL_ADDRESS>(2020-09-30)

**Note:** Version bump only for package actionsflow-core

# 1.0.0-alpha.1 (2020-09-29)

### Features

* 🎸 initial commit ([d275509](https://github.com/actionsflow/actionsflow/commit/d2755093e6a0d80d7352f635d147424e4e0747bd))

repository: newagenewstyle/actionsflow

branch_name: refs/heads/main

repo_name: newagenewstyle/actionsflow


text:
# Recent Changes

### v1.1.3
This version of the library has outlined progress icons and a charging bolt for Battery progress icon.

### v1.1.0
This version of the library has collapsed the multiple icon libraries into a single library to simplify imports.

Breaking changes:
* Progress Icons are no longer imported individually in your app.module.ts file
* The new usage imports a single progress icon module

Instead import {NgProgressIconsModule} from '@pxblue/ng-progress-icons' and place that module in your imports array

repository: BrettThePark/icons

repo_name: BrettThePark/icons


text:
---
external help file: Ruleset.ProgramInfo-help.xml
Module Name: Ruleset.ProgramInfo
online version: https://github.com/metablaster/WindowsFirewallRuleset/blob/master/Modules/Ruleset.ProgramInfo/Help/en-US/Find-Installation.md
schema: 2.0.0
---

# Find-Installation

## SYNOPSIS

Find installation directory for given predefined program name

## SYNTAX

```none
Find-Installation [-Program] <String> [[-ComputerName] <String>] [<CommonParameters>]
```

## DESCRIPTION

Find-Installation is called by Test-Installation, ie.
only if test for existing path
fails then this method kicks in

## EXAMPLES

### EXAMPLE 1

```none
Find-Installation "Office"
```

## PARAMETERS

### -Program

Predefined program name

```yaml
Type: System.String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
```

### -ComputerName

Computer name on which to look for program installation

```yaml
Type: System.String
Parameter Sets: (All)
Aliases: Computer, Server, Domain, Host, Machine

Required: False
Position: 2
Default value: [System.Environment]::MachineName
Accept pipeline input: False
Accept wildcard characters: False
```

### CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### None. You cannot pipe objects to Find-Installation

## OUTPUTS

### [bool] true or false if installation directory if found, installation table is updated

## NOTES

None.

## RELATED LINKS


text:
---
layout: default
---

# 1996-08-24 - Re: Spamming (Good or Bad?)

## Header Data

From: Firebeard<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 3ecc93454e255fb26d4a05db8db5ade8e23d1fb6f700c3aa377371de02628efb

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1996-08-24 22:56:16 UTC

Raw Date: Sat, 24 Aug 1996 15:56:16 -0700 (PDT)

## Raw message

```
{% raw  %}From: Firebeard<EMAIL_ADDRESS>Date: Sat, 24 Aug 1996 15:56:16 -0700 (PDT)
To<EMAIL_ADDRESS>Subject: Re: Spamming (Good or Bad?)
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

>>>>> Vipul Ved Prakash writes:

>> Free (commercial)speech for you (perhaps at our expense), but no
>> free speech for us?

VVP> This is peculiar. Nobody seems to mind ads in Newspapers, printed
VVP> magazines, TV, and for that matter web sites. That is unwanted
VVP> stuff too, but now someone is paying for it.

	In the first three cases, the advertising subsidises the cost
of the media - ever notice that the advertiser-free[1] channels are more
expensive?  In the last case, I decide to request the advertising,
increasing my time on-line, potentially increasing my cost of access.
In the case of email spam, the advertiser decides to force me to
receive the advertising, increasing my time on-line, potentially
increasing my cost of access.

--
#include <disclaimer.h>                               /* Sten Drescher */
ObCDABait:      For she doted upon their paramours, whose flesh is as the
flesh of asses, and whose issue is like the issue of horses.  [Eze 23:20]
Unsolicited solicitations will be proofread for a US$500/KB fee.

{% endraw %}
```

## Thread

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

+ Return to "[Brian Davis <bdavis@thepoint.net>](/authors/brian_davis_bdavis_at_thepoint_net_)"
+ Return to<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)](/authors/dlv_at_bwalk_dm_com_dr_dimitri_vulis_kotm_)"
+ Return to "[Firebeard <stend@grendel.austin.texas.net>](/authors/firebeard_stend_at_grendel_austin_texas_net_)"
+ Return to "[Rich Graves <rich@c2.org>](/authors/rich_graves_rich_at_c2_org_)"
+ Return to "["Ross Wright" <rwright@adnetsol.com>](/authors/ross_wright_rwright_at_adnetsol_com_)"
+ Return to "[Vipul Ved Prakash <vipul@pobox.com>](/authors/vipul_ved_prakash_vipul_at_pobox_com_)"

+ 1996-08-21 (Wed, 21 Aug 1996 13:46:44 +0800) - [Re: Spamming (Good or Bad?)](/archive/1996/08/40586ba0b9a65919f0b6699a9ca63efbfdd75ef3f7810e3226b9490381f8cdae) - _"Ross Wright"<EMAIL_ADDRESS>  + 1996-08-21 (Wed, 21 Aug 1996 16:14:51 +0800) - [Re: Spamming (Good or Bad?)](/archive/1996/08/49db11f3e263638884bd059534bc595078e10948917ff332535874af42dac2e5) - _Rich Graves<EMAIL_ADDRESS>  + 1996-08-21 (Thu, 22 Aug 1996 06:40:51 +0800) - [Re: Spamming (Good or Bad?)](/archive/1996/08/c3cf10e090318d89702b49bddc1c26126d7d8871e4d0bf7adfa112d11042df32) - _Brian Davis<EMAIL_ADDRESS>    + 1996-08-23 (Fri, 23 Aug 1996 18:48:42 +0800) - [Re: Spamming (Good or Bad?)](/archive/1996/08/32b30dc425a5f92f68e1a86228bf557814afe302db4b2abd37c69df60f003b0b) - _Vipul Ved Prakash<EMAIL_ADDRESS>      + 1996-08-23 (Fri, 23 Aug 1996 20:03:14 +0800) - [Re: Spamming (Good or Bad?)](/archive/1996/08/87d19860f1a3adcc5e54225288196eae03bb92442fff7b3e907959ae69a63f42) -<EMAIL_ADDRESS>(Dr.Dimitri Vulis KOTM)_
    + 1996-08-24 (Sat, 24 Aug 1996 15:56:16 -0700 (PDT)) - Re: Spamming (Good or Bad?) - _Firebeard<EMAIL_ADDRESS>


text:
# Logger-App

## A quick test of Logger-App REST API

** 1. Send a GET request to the endpoint to get a complete list of all the log entities stored in the DynamoDB please run the `curl` command below:
```
curl -X GET \
  https://a5lgfuj6sa.execute-api.us-east-1.amazonaws.com/Stage \
  -H 'Content-Type: application/javascript' \
  -H 'cache-control: no-cache' \
  -H 'x-api-key: 1G8wVdcIMs7r6V3toNBUF30RSZFHBoZn4iYTcNbD'
```
Example output:
```
{"deviceID": "1N4BU31D2TC186889", "err": 98910, "timestamp":1514766730},
{"deviceID": "1N4BU31D2TC186889", "err": 75698, "timestamp":1514766731},
{"deviceID": "1N4BU31D2TC186889", "err": 35294, "timestamp":1514766784}
```
** 2. Send a GET request to the endpoint to get the logs of the error codes in the reverse chronological order for any given device ID please run the `curl` command below. Please note that the URL ends with the deviceID. Replace it with another id to get different listing:
```
curl -X GET \
  https://a5lgfuj6sa.execute-api.us-east-1.amazonaws.com/Stage/logs/JA3215H14CU015290 \
  -H 'Content-Type: application/javascript' \
  -H 'cache-control: no-cache' \
  -H 'x-api-key: 1G8wVdcIMs7r6V3toNBUF30RSZFHBoZn4iYTcNbD'
```
Example output:
```
[{"error_code":15601, "timestamp":1514767287},
{"error_code":87830, "timestamp":1514767247},
{"error_code":57203, "timestamp":1514767243}]
```

** 3. Send a GET request to the endpoint to get the logs of the the most prevalent error codes (currently requires at least occurrences for a given device id):
```
curl -X GET \
  'https://a5lgfuj6sa.execute-api.us-east-1.amazonaws.com/Stage/stat?min=2' \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -H 'x-api-key: 1G8wVdcIMs7r6V3toNBUF30RSZFHBoZn4iYTcNbD'
```
Example output:
```
{
    "errorsCount": [
        {
            "err": 3.1415,
            "count": 3.1415
        },
        {
            "err": 3.1415,
            "count": 3.1415
        },
        {
            "err": 3.1415,
            "count": 3.1415
        }
    ]
}

```
** 4. Send a GET request to the endpoint to get the logs list that occured within a specific time frame for any given device ID. Please use the `curl` command below. This endpoint takes the `deviceID` as an argument along with the `startDate` and `endDate` Query String Parameters:
```
curl -X GET \
  'https://a5lgfuj6sa.execute-api.us-east-1.amazonaws.com/Stage/range/JA3215H14CU015290?startDate=2017-12-05T08:15:30Z&endDate=2018-01-05T08:15:30Z&x-api-key=1G8wVdcIMs7r6V3toNBUF30RSZFHBoZn4iYTcNbD' \
  -H 'Content-Type: application/javascript' \
  -H 'cache-control: no-cache' \
  -H 'x-api-key: 1G8wVdcIMs7r6V3toNBUF30RSZFHBoZn4iYTcNbD'
  ```
Example output:
```
    {
        "deviceId": "JA3215H14CU015290"
    },
    {
        "deviceId": "JA3215H14CU015290"
    },
    {
        "deviceId": "JA3215H14CU015290"
    },
    {
        "deviceId": "JA3215H14CU015290"
    }

```

** 5. Send a POST request to the endpoint to publish a new error log please use the `curl` command below:
```
curl -X POST \
  https://a5lgfuj6sa.execute-api.us-east-1.amazonaws.com/Stage \
  -H 'Content-Type: application/json' \
  -H 'cache-control: no-cache' \
  -H 'x-api-key: 1G8wVdcIMs7r6V3toNBUF30RSZFHBoZn4iYTcNbD' \
  -d '{"deviceID": "9N4BU31D2TC186896", "err": 35294, "timestamp":1514766784}'
```
Example output:
```
{
    "deviceID": "9N4BU31D2TC186896",
    "timestamp":<PHONE_NUMBER>,
    "err": 35294
}
```

# Logger-App Architecture

Logger-App is an integrated continuous delivery pipeline application. Every change pushed to the source control repository triggers a pipeline that builds and deploys this application automatically. It is made of the following resources:

**Application** – orchestrates five Node.js serverless Lambda functions, build using the AWS Serverless Application Model template.

**Pipeline** – An AWS CodePipeline pipeline that connects the other resources to enable continuous delivery.

**Repository** – A Git AWS CodeCommit repository. With every code commit, the pipeline copies the source code into an Amazon S3 bucket and passes it to the build project.

**Trigger** – An Amazon CloudWatch Events rule that watches the master branch of the repository and triggers the pipeline.

**Build project** – An AWS CodeBuild build that gets the source code from the pipeline and packages the application. The source includes a build specification with commands that install dependencies and prepare the application template for deployment.

**Deployment configuration** – The pipeline's deployment stage defines a set of actions that take the processed AWS SAM template from the build output, and deploy the new version with AWS CloudFormation.

**Bucket** – An Amazon Simple Storage Service S3 bucket for deployment artifact storage.

**Various Roles** – The pipeline's source, build, and deploy stages have IAM roles that manage AWS resources. The application's function has an execution role that allows it to upload logs and can be extended to access other services.

# System Breakdown

** 1. The Application definition
The Logger-App application and its pipeline resources are all defined in AWS CloudFormation template that can be customized and extended. The application repository includes a `template.yml` template that is used to add Amazon DynamoDB tables, an Amazon API Gateway API, and other application resources. The continuous delivery pipeline is defined in a separate template outside of source control and has its own stack.

To access the Logger App using AWS console please use the link below:
```
https://console.aws.amazon.com/lambda/home?region=us-east-1#/applications
```

** 2. DynamoDB database

The DynamoDB is a fully managed NoSQL database that provides fast and predictable performance with seamless scalability. It offloads the administrative burdens of operating and scaling a distributed database, encryption at rest, provides the on-demand backup capability and automatically spreads the data and traffic for the tables. The Logger-App template defines a table of type `AWS::DynamoDB::Table` with the `Primary KeySchema` indexing the `deviceID` field as `hash` keytype and `timestamp` field as `range`. In addition to the `Primary KeySchema` there is a `LocalSecondaryIndexes` defined with `deviceID` as `hash` keytype and `err` as `RANGE`:
```
  SampleTable:
    Type: AWS::DynamoDB::Table
    Properties:
      AttributeDefinitions:
      - AttributeName: timestamp
        AttributeType: N
      - AttributeName: deviceID
        AttributeType: S
      - AttributeName: err
        AttributeType: N
      - AttributeName: status
        AttributeType: S
      KeySchema:
      - AttributeName: deviceID
        KeyType: HASH
      - AttributeName: timestamp
        KeyType: RANGE
      ProvisionedThroughput:
        ReadCapacityUnits: !Ref 'ReadCapacityUnits'
        WriteCapacityUnits: !Ref 'WriteCapacityUnits'
      LocalSecondaryIndexes:
      - IndexName: errIndex
        KeySchema:
        - AttributeName: deviceID
          KeyType: HASH
        - AttributeName: err
          KeyType: RANGE
        Projection:
          ProjectionType: KEYS_ONLY
      GlobalSecondaryIndexes:
      - IndexName: timeIndex
        KeySchema:
        - AttributeName: status
          KeyType: HASH
        - AttributeName: timestamp
          KeyType: RANGE
        Projection:
          ProjectionType: KEYS_ONLY
        ProvisionedThroughput:
          ReadCapacityUnits: !Ref 'ReadCapacityUnits'
          WriteCapacityUnits: !Ref 'WriteCapacityUnits'
```
To access this DynamoDB table using AWS console please use the link below:
```
https://console.aws.amazon.com/dynamodb/home?region=us-east-1#tables:selected=logger-app-SampleTable-I92ZQMWUI63R;tab=items
```

** 3. CodeCommit source code repository

The CodeCommit is used here to host a `Logger-app` Git repository. The commits made to its `master` branch emit the events that trigger the CloudFormation stack that deploys the pipeline infrastructure.

To access this DynamoDB table using AWS console please use the link below:
```
https://console.aws.amazon.com/codesuite/codecommit/repositories/logger-app/browse?region=us-east-1
```

** 4. Lambda functions

While all five Lambda functions are defined in the same `template.yml` file their source code is stores in the separate `javascript` files located in the `/src/handlers/` repository folder:
```
get-all-items.js
get-by-id-time-range.js
get-by-id.js
get-prevalent.js
put-item.js
```
```
https://console.aws.amazon.com/codesuite/codecommit/repositories/logger-app/browse/refs/heads/master/--/src/handlers?region=us-east-1
```
To grant the Lamda functions an access to the DynamoDB tables their permissions boundary has been defined as:

```
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "StackResources",
      "Effect": "Allow",
      "Action": [
        "*"
      ],
      "Resource": [
        "arn:aws:dynamodb:us-east-1:644982427275:table/logger-app-SampleTable-I92ZQMWUI63R",
        "arn:aws:dynamodb:us-east-1:644982427275:table/logger-app-SampleTable-I92ZQMWUI63R/*",
        "arn:aws:apigateway:us-east-1::/restapis/a5lgfuj6sa",
        "arn:aws:apigateway:us-east-1::/restapis/a5lgfuj6sa/*",
        "arn:aws:execute-api:us-east-1:644982427275:a5lgfuj6sa",
        "arn:aws:execute-api:us-east-1:644982427275:a5lgfuj6sa/*",
        "arn:aws:lambda:us-east-1:644982427275:function:logger-app-getAllItemsFunction-HL5TRWK9ZPRW",
        "arn:aws:lambda:us-east-1:644982427275:function:logger-app-getByIdFunction-FAQWAQ4PHQPH",
        "arn:aws:lambda:us-east-1:644982427275:function:logger-app-getByIdTimeRangeFunction-1OV2IAR1SPCXS",
        "arn:aws:lambda:us-east-1:644982427275:function:logger-app-getPrevalentErrorsFunction-U88UBT1MQ0HJ",
        "arn:aws:lambda:us-east-1:644982427275:function:logger-app-putItemFunction-TCUNN2KVS1HP"
      ]
    },
    {
      "Action": [
        "logs:CreateLogGroup",
        "logs:CreateLogStream",
        "logs:DescribeLogGroups",
        "logs:PutLogEvents",
        "xray:Put*"
      ],
      "Resource": "*",
      "Effect": "Allow",
      "Sid": "StaticPermissions"
    },
    {
      "Condition": {
        "StringEquals": {
          "aws:RequestTag/aws:cloudformation:stack-name": [
            "logger-app"
          ]
        },
        "ForAllValues:StringEquals": {
          "aws:TagKeys": "aws:cloudformation:stack-name"
        }
      },
      "Action": "*",
      "Resource": "*",
      "Effect": "Allow",
      "Sid": "StackResourcesTagging"
    }
  ]
}
```
To edit this PermissionBoundary please use the link below:
```
https://console.aws.amazon.com/iam/home?region=us-east-1#/policies/arn:aws:iam::644982427275:policy/logger-app-us-east-1-PermissionsBoundary$edit?step=edit
```
** 5. API Gateway

API Gateway acts here as the front door for the Logger-App application and is used to access data, business logic, or functionality from the backend service running as Lambda functions. It handles all the tasks involved in accepting and processing up to hundreds of thousands of concurrent API calls, including traffic management, CORS support, authorization and access control, throttling, monitoring, and API version management.

To access the API resources please use the link below:
```
https://console.aws.amazon.com/apigateway/home?region=us-east-1#/apis/a5lgfuj6sa/resources/x9bdqbzvs1
```

For each API Resource there were four methods created: `Method Request`, `Integration Request`,  `Method Response` and `Integration Response`.
The are used to configure the Authorization, Validators, URL Query String Parameters and HTTP Request Body/Headers validation. The `AWS_IAM` along with Cognito is used here for the Authorization mechanism. To access the Authorizer configuration page please use the link below:
```
https://console.aws.amazon.com/apigateway/home?region=us-east-1#/apis/a5lgfuj6sa/authorizers
```
** 6. Congito and Authorization tokens

To secure the API calls there are several methods available. To complete the token authentication mechanism implemented in the Logger-App API Gateway
there was a Congitor User Pool defined with the `App client settings` configured to Allow OAuth Flows with `Implicit grant` option. It offers a single step authorization tokens generation. The second `Authorization code grant` option available as well. It can be used to secure the token generation with a two steps process. With the Authorization enabled, the API Gateway will be expecting the authorization token supplied with the `Authorizer` header. To access the `API-AUTH-USERS-POOl` please use the link below:
```
https://console.aws.amazon.com/cognito/users/?region=us-east-1#/pool/us-east-1_mPgGZlgTd/app-integration-app-settings?_k=111q83
```

repository: esputnix/logger-app

repo_name: esputnix/logger-app


text:
### [CVE-2010-0914](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2010-0914)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

Unspecified vulnerability in Oracle Sun Convergence 1.0 allows remote attackers to affect confidentiality via unknown vectors related to Mail, Calendar, Address Book, and Instant Messaging.

### POC

#### Reference
- http://www.oracle.com/technetwork/topics/security/cpuoct2010-175626.html

#### Github
No PoCs found on GitHub currently.

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
#Unto all that wait in Sion, for the consolation of Christ Jesus, is the word of peace and comfort declared and sent in this trying day that all may be comforted, and in God may rejoyce and be glad, who lives for ever and ever : containing three letters, written at three sundry times unto the gathered of God, into the covenant of endless life &c. / by William Green.#

##Green, William, 17th Cent.##
Unto all that wait in Sion, for the consolation of Christ Jesus, is the word of peace and comfort declared and sent in this trying day that all may be comforted, and in God may rejoyce and be glad, who lives for ever and ever : containing three letters, written at three sundry times unto the gathered of God, into the covenant of endless life &c. / by William Green.
Green, William, 17th Cent.

##General Summary##

**Links**

[TCP catalogue](http://www.ota.ox.ac.uk/tcp/)  •
[HTML](http://tei.it.ox.ac.uk/tcp/Texts-HTML/free/A41/A41981.html)  •
[EPUB](http://tei.it.ox.ac.uk/tcp/Texts-EPUB/free/A41/A41981.epub) •
[Page images (Historical Texts)](https://data.historicaltexts.jisc.ac.uk/view?pubId=eebo-08707142e&pageId=eebo-08707142e-41608-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. __2007-10__ __TCP__ *Assigned for keying and markup*
1. __2007-10__ __Apex CoVantage__ *Keyed and coded from ProQuest page images*
1. __2008-01__ __Judith Siefring__ *Sampled and proofread*
1. __2008-01__ __Judith Siefring__ *Text and markup reviewed and edited*
1. __2008-02__ __pfs__ *Batch review (QC) and XML conversion*

##Content Summary##

#####Body#####

1. Unto all that wait in Sion, for the Conſolation of Chriſt Jeſus, is the Word of Peace and Comfort declared and ſent in this trying day; that all may be comforted, and in God may rejoyce, and be glad, who lives for ever and ever.

**Types of content**

  * Oh, Mr. Jourdain, there is **prose** in there!

**Character listing**

|Text|string(s)|codepoint(s)|
|---|---|---|
|Latin Extended-A|ſ|383|

##Tag Usage Summary##

###Header Tag Usage###

|No|element name|occ|attributes|
|---|---|---|---|
|1.|__author__|2||
|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), OCLC (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__|5||
|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__|1||
|28.|__textClass__|1||
|29.|__title__|3||
|30.|__titleStmt__|2||

###Text Tag Usage###

|No|element name|occ|attributes|
|---|---|---|---|
|1.|__argument__|1||
|2.|__body__|3||
|3.|__closer__|3||
|4.|__date__|3||
|5.|__dateline__|3||
|6.|__div__|1| @__type__ (1) : text (1)|
|7.|__floatingText__|3| @__type__ (3) : letter (3)|
|8.|__g__|49| @__ref__ (49) : char:EOLhyphen (49)|
|9.|__head__|1||
|10.|__hi__|28||
|11.|__p__|7||
|12.|__pb__|10| @__facs__ (10) : tcp:41608:1 (2), tcp:41608:2 (2), tcp:41608:3 (2), tcp:41608:4 (2), tcp:41608:5 (2)  •  @__n__ (8) : 1 (1), 2 (1), 3 (1), 4 (1), 5 (1), 6 (1), 7 (1), 8 (1)  •  @__rendition__ (8) : simple:additions (8)|
|13.|__signed__|3||
|14.|__trailer__|1||


text:
# sbt-site

                       |                  |
-----------------------|-------------------
Home                   | http://www.scala-sbt.org/sbt-site/
License                | BSD-3-Clause
Summary                | Create pleasant HTML from Markdown, AsciiDoc, Textile, etc. with site generators like Jekyll, Hugo, Sphinx and [others](http://www.scala-sbt.org/sbt-site/generators/index.html).

# sbt-ghpages

                       |                  |
-----------------------|-------------------
Home                   | https://github.com/sbt/sbt-ghpages#readme
License                | BSD-3-Clause
Summary                | Make it simple to publish project website to GitHub Pages.

repository: indyscala/sbt-plugin-tour

repo_name: indyscala/sbt-plugin-tour


text:
---
title: UWP minimum version is now 10.0.17763.0
category:
  - Release Notes
author: Glenn Watson
---

Due to a ongoing issue with [Azure DevOps](https://github.com/microsoft/azure-pipelines-image-generation/pull/770) we had to change our minimum version from 10.0.16299 to 10.0.17763.0 for the UWP platform.

Without this set as your minimum version ReactiveUI controls will be seen as missing.

To fix the issue change within your .csproj file the following line to be 10.0.17763.0 or above.

```xml
<TargetPlatformMinVersion>10.0.17763.0</TargetPlatformMinVersion>
```

repository: reactiveui/website

repo_name: reactiveui/website


text:
![Build](https://github.com/hugs-cloud/hugs/workflows/Build/badge.svg)
[![codecov](https://codecov.io/gh/hugs-cloud/hugs/branch/devel/graph/badge.svg)](https://codecov.io/gh/hugs-cloud/hugs)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)

### Please note development of this codebase will continue in our new repository at [www.github.com/openghg/openghg](https://github.com/openghg/openghg)

## HUGS - HUb for greenhouse Gas data Science

HUGS is a cloud-based data analysis “hub” for greenhouse gas measurements, modelling and data analysis, funded as a NERC “Constructing a Digital Environment” feasibility study. We aim to streamline the process for greenhouse gas data sharing, analysis and visualisation and add value through automated processes such as atmospheric chemistry transport model runs associated with data.

The HUGS Cloud platform was developed as part of a project to create a platform that would allow researchers in atmospheric chemistry to use the power of the cloud to upload, process and analyse their data.

### Processing

HUGS is capable of processing many different types of data including AGAGE/ICOS/NOAA/EUROCOM amongst others. It is built with modularity in mind so it is easy to create new modules to process different types of data.

### Storage and retrieval

The processed data is stored within a cloud object store which allows for large amounts of data to be easily stored and retrieved. As cloud storage is utilised datasets can grow as new data is added to them with no limits on the size of a dataset. We are currently using the Oracle object store but we have built the platform using open source software to be cloud agnostic. Data stored on the platform is chunked to allow efficient storage and retrieval. This makes it quick to pull a week's worth of data from a decade of measurements.

### Analysis

Using notebooks hosted on our JupyterHub it is possible to query the object store and analyse data within the cloud. This allows analysis and processing of large datasets on any computational device as all processing is done on scalable cloud instances.

### Compliance

We ensure data stored on the platform can be exported as [CF compliant](http://cfconventions.org/) NetCDF files. Here we utilise the [CF Checker](https://github.com/cedadev/cf-checker) tool to ensure that all datasets hold the correct attributes for all data contained within them.

### Cloud Hosted

Currently the HUGS platform can be accessed through our JupyterHub.

### Open-source technologies

As this is an open source project under the Apache licence, all technologies on which the platform is based are readily available and open source themselves. We harness the power of the [Fn](https://fnproject.io) serverless framework for processing and retrieval of data and our JupyterHub based analysis platform is orchestrated using Kubernetes. For more information on our use of these and other open source technologies please see the documentation.

repository: hugs-cloud/hugs

gha_language: C

repo_name: hugs-cloud/hugs


text:
---
layout: post
title:  "Liquid Sunbeam Starter Arithmetic"
date:   2014-01-01 21:30:03
categories: [yeast,  technique]
---

I've got a dubbel planned, full of lots of dark, fruity flavors.
The recipe comes in at 1.067, and I'm planning to pitch [WLP500](http://www.whitelabs.com/yeast/wlp500-trappist-ale-yeast-0) into 5.25g of wort.
Pitching-rate calculators suggest about 250 billion cells for a wort of this gravity and volume -- far over the 53 billion cells in my 2-month-old vial.

Based on the calculator built into BeerSmith, I determined that I needed a 2L starter.
I followed my usual process: combine 2L of water and 200g of DME in the easy-to-remember ratio for creating a 1.030 wort.
I boiled this in an Erlenmeyer flask for about 15 minutes, cooled it in an ice bath, and pitched the yeast.
About 18 hours later, with no visible action from the starter, I reached out to my fellow brewers for help.
Ryan Hope suggested that I had underpitched the starter, and should have made a 1L starter as the first step.
He also suggested, and loaned me, a stir plate.

While the starter was bubbling away, I set about educating myself, so that I could better understand what the tools in BeerSmith and mrmalty.com were telling me.
I began with [Yeast](http://www.amazon.com/Yeast-Practical-Fermentation-Brewing-Elements/dp/0937381969) by by Jamil Zainasheff and Chris White.
Figure 5.5 gives propagation rates as a function of the innoculation rate.
The data is based on pitches of 100 billion cells into different volumes of wort, with no agitation or aeration.
Here's an abridged version:

Starter Volume
(liters)	Innoculation Rate
(millions/mL)	Total Cells at Finish
(billions)

0.5	200	112

1	100	152

2	50	205

4	25	276

My starter was 53 billion cells pitched into 2L of wort, or about 25 million/mL, so based on this data I should expect 2.76×53=146 billion cells -- still a short pitch.

But I'm using a stir plate.
How does that affect the calculation?
All Zainasheff and White have to say is "the yield will be higher."
Thanks guys!

Anecdotal information around the internet ranges from a factor of 1.53 more growth (in [Mr. Malty's Pitching Rate Calculator](http://www.mrmalty.com/calc/calc.html)) through 10 times more growth ([MB Raines' "Yeast Propagation and Maintenance: Principles and Practices"](http://www.maltosefalcons.com/tech/yeast-propagation-and-maintenance-principles-and-practices)).
That's still a pretty wide range!

I [posted](http://www.albanybrewcrafters.com/forum/index.php?topic=843.0) to the Albany Brew Crafters forums and Ryan again helped me out, pointing me to [K. Troester's "Estimating Yeast Growth"](http://braukaiser.com/blog/blog/2012/11/03/estimating-yeast-growth/) and [yeastcalc.com](http://yeastcalc.com) which implements it.

Troester's post is in terms of bilions per gram of extract, but the conversion is simple enough, assuming the standard 10ml/g ratio for building starter worts.
An innoculation rate of 50 million cells per mL, for example, is 500 million cells for 10ml or 1g of extract, or 0.5 B/g.

Similarly, Troester gives growth rates in B/g.
Converting this to a raw cell count is also straightforward, given the starter volume.
For example, a starter volume of 2L contains 200g of extract, so a growth rate of 1.4 B/g will result in 280 billion cells.

Combining Troester's formula with the table from Yeast, still for a pitch of 100 billion cells each:

   Starter Volume
(liters)
   Innoculation Rate
   Total Cells at Finish
No Stir
(billions)
   Total Cells at Finish
Stirred
(billions)

0.5	200 m/mL, 2 B/g	112	150

1	100 m/mL, 1 B/g	152	240

2	50 m/mL, 0.5 B/g	205	380

4	25 m/mL, 0.25 B/g	276	660

My starter had a growth rate of 1.4 B/g in 2L of wort, so I should see 280 billion new cells beyond the 53 billion from the pitch, for a total of 333 billion cells.
At an OG of 1.067, in 5.25g of wort, that will be about 0.98 million cells / mL / °P - close enough for me!

extension: markdown


text:
## Configuration

This bundle can be configured, and this is the list of what you can do :
* Create many pheanstalk client.
* Define specific server / host for each connection.
* Define specific port for each connection. This option is optional and default value is 5000.
* Define specific timeout for each connection. Timeout refere to the connection timeout. This option is optional and default value is 60.
* Use custom proxy for pheanstalk client.
* Disable this bundle. This options is optional and default value is true.

``` yaml
# app/config/config.yml
pheanstalk:
    pheanstalks:
        primary:
            server: evqueue.domain.tld
            user: my_awesome_login_from_env_file
            password: my_awesome_password_from_env_file
            port: 11300
            timeout: 60
        secondary:
            server: evqueue-2.domain.tld
            user: my_awesome_login_from_env_file
            password: my_awesome_password_from_env_file
            default: true
            proxy: acme.pheanstalk
    profiler:
        enabled: true
        template: 'PheanstalkBundle:Profiler:pheanstalk.html.twig'
```

*acme.pheanstalk* is a custom proxy which implements the *PyRowMan\PheanstalkBundle\Proxy\PheanstalkProxyInterface* interface.

**Note:**
```
    You can retreive each pheanstalk using the container with "pheanstalk.[pheanstalk_name]".
    When you define a "default" pheanstalk. You can have a direct access to it with "pheanstalk".
```

```php
<?php

namespace Acme\DemoBundle\Controller;

use Pheanstalk\Structure\Schedule;
use Pheanstalk\Structure\TimeSchedule;
use Pyrowman\PheanstalkBundle\Proxy\PheanstalkProxy;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\DependencyInjection\ContainerInterface;

class HomeController extends AbstractController
{
    public function indexAction()
    {
        $pheanstalkPrimary = $this->get("pheanstalk.primary");
        $pheanstalkSecondary = $this->get("pheanstalk");

        // ----------------------------------------
        // producer (queues jobs) on beanstalk.domain.tld

        $pheanstalkDefault
            ->useTube('testtube')
            ->put("job payload goes here\n");

        // ----------------------------------------
        // worker (performs jobs) on beanstalk-2.domain.tld

        $job = $pheanstalkSecondary
            ->watch('testtube')
            ->ignore('default')
            ->reserve();

        echo $job->getData();

        $pheanstalkSecondary->delete($job);

        // ----------------------------------------
        // on each defined pheanstalks
        $pheanstalkLocator = $this->get("pheanstalk.pheanstalk_locator");

        foreach ($pheanstalkLocator->getPheanstalks() as $pheanstalk) {
            $pheanstalk
                ->useTube('boardcast')
                ->put("job payload goes here\n");
        }
    }
}
```

repository: PyRowMan/pheanstalk-bundle

gha_language: PHP

repo_name: PyRowMan/pheanstalk-bundle


text:
# MaRQ: Mapping RDF Queries

This project is an approach to generate federated queries from RDF mappings.

## Installation

We assume that `Python3` and `pip` is installed

Download IDE for python

this project was created with
`Pycharm`

Installation in a virtualenv is strongly recommended

install venv

`python3 -m venv env`

Install dependencies with pip:

`pip install -r requirements.txt`

## Mappings

Mappings need to be Yarrrml mappings.

MaRQ use types to make queries,
so a saturated mapping can create queries that would have been missed with a standard mapping.

'predicateobjects' should be of the form:

`- [{one and only one predicate}, {one and only one object}]`

Types or language aren't supported and might cause issues.

## Run script

Run the following command to execute MaRQ on each possible pair from n mappings:

`python script.py path/to/mapping/1 ... path/to/mapping/n`

You can also specify a directory containing only mappings to execute MaRQ on every pair of mappings contained in the directory:

`python script.py path/to/directory`

It's also possible to specify the threshold at which a query is made from two template. Only a pair of template that have a Jaccard index >= of this value will pass.

`python script.py float_value path/to/directory`

## Example

This example is made using the mappings<EMAIL_ADDRESS>and<EMAIL_ADDRESS>
Here are examples of query formed with those mappings.
Each of those first features comments that indicates meta information on the queries:
- the type of join
- the mappings
- Which template of which mapping was used, and in which position
- The jaccard index number, which tells us how much the two template were similar. This index is calculated using the types link to a template, we consider both sets of types (one for each template) and then calculate the [Jaccard index](https://en.wikipedia.org/wiki/Jaccard_index)

```
### subject-subject
#M1: small-air-bnb-listings
#M2: small-annuaire-des-professionnels-de-sante
#M1_Subject :   Host
#M2_Subject :   Docteur
#Jaccard index: 0.3333333333333333
Select Count(?S2) Where {
        ?s2 rdf:type <http://schema.org/Person>.        #M1 M2
        ?s2 rdf:type <http://purl.org/goodrelations/v1#BusinessEntity>. #M1
        ?s2 rdf:type <http://linkedgeodata.org/ontology/Doctor>.        #M2
        ?s2 <https://schema.org/location> ?o1.  #M2
        ?s2 <http://dbpedia.org/ontology/speciality> ?o2.       #M2
}
 ```
 This is a "subject-subject" query, which means the two templates that were used to join the mappings were both subjects in their respective mappings.

 ```
### object-object
#M1: small-air-bnb-listings
#M2: small-annuaire-des-professionnels-de-sante
#M1_Object :    Neighbourhood
#M2_Object :    Address
#Jaccard index: 0.3333333333333333
Select Count(?O2) Where {
        ?s1 <https://schema.org/containedInPlace> ?o2.  #M1
        ?s2 <https://schema.org/location> ?o2.  #M2
}
 ```
 This is a "object-object" query, which means the two templates that were used to join the mappings were both objects in their respective mappings.

 ```
### subject-object
#M1: small-air-bnb-listings
#M2: small-annuaire-des-professionnels-de-sante
#M1_Object :    Host
#M2_Subject :   Docteur
#Jaccard index: 0.3333333333333333
Select Count(?T1) Where {
        ?t1 rdf:type <http://schema.org/Person>.        #M2
        ?t1 rdf:type <http://linkedgeodata.org/ontology/Doctor>.        #M2
        ?t1 <https://schema.org/location> ?f1.  #M2
        ?t1 <http://dbpedia.org/ontology/speciality> ?f2.       #M2
        ?f3 <http://dbpedia.org/ontology/owner> ?t1.    #M1
}
 ```
 This is a "subject-object" query, which means the one of the templates that were used to join the mappings was a subject in its mapping and the other template was a object in hin the other a object

 ```
### subject-object
#M1: small-air-bnb-listings
#M2: small-annuaire-des-professionnels-de-sante
#M1_Subject :   Neighbourhood
#M2_Object :    Address
#Jaccard index: 0.3333333333333333
Select Count(?T1) Where {
        ?t1 rdf:type <http://schema.org/Place>. #M1
        ?t1 rdf:type <http://dbpedia.org/ontology/PopulatedPlace>.      #M1
        ?f1 <https://schema.org/location> ?t1.  #M2
}
 ```
 This is another "subject-object" query, this time the subject is in mapping1 and the object is in mapping2

repository: Manoe-K/MaRQ

repo_name: Manoe-K/MaRQ


text:
---
layout: post
title:      "Passed My CLI Project"
date:       2018-07-18 17:03:54 +0000
permalink:  passed_my_cli_project
---

I passed my CLI Project, and I never really thought I’d make it this far.  It wasn’t easy and I needed a lot of help.  But I know I can really do this.

The hardest part (aside from believing I could actually do this) was finding the right website to scrape (I went through several), then trying to scrape the right data, and getting the data to look right.

The second hardest part was writing the code to make it all work, which involved watching multiple videos many times over, playing with my code to see if I can get it all to work (having several nervous-breakdowns in the process), then, finally having an ugly, but working version to submit.

The third hardest part was not knowing where to start on refactoring my code after I had my review, but with some guidance and help, I was able to improve on it, and clean it up significantly. My scraper class alone was 71 lines, which I was able to reduce to just 31.

At last, my CLI was pretty and DRY.

(Originally posted on 7-2-2018)


text:
# webform
Go (golang) package webform fills a struct with form values

It borrows main idea from gorilla/schema which is more complete
solution for complex forms.

webform is simplified idea of the gorilla/schema.
No metadata cache or dotted notation for embedded structs.
Simply take posted form data and map it to structs. That's it.

Only uses url.Values first value of the field. In some cases
web forms are designed to submit fields with multiple values, in that
case this package will not work.

Sets fields on root struct but also on all nested structs.
If finds pointer to nested struct, then creates struct.

Check doc.go for details.

Copyright (C) Tad Vizbaras, MIT license.

repository: tadvi/webform

repo_name: tadvi/webform


text:
---
title: "What does Fast-Trips do differently?"
author: Elizabeth
image: /img/posts/kingctydoor.jpg
comments: true
layout: post
tags: [features]
images:
   image1:
      image: /img/posts/lumpy-rt-choice.png
      caption: "Ignoring individual variation makes transit choices unrealistically lumpy"
      source: "MTC, PSRC, & SFCTA"
   image2:
      image: /img/posts/less-lumpy-rt-choice.png
      caption: "Fast-Trips considers spectrum of perceptions about the route"
      source: "MTC, PSRC, & SFCTA"
   image3:
      image: /img/posts/mkt-segments.png
      caption: "Fast-Trips reveals that different services are important for different people"
      source: "MTC, PSRC, & SFCTA"
   image4:
      image: /img/posts/diversity.png
      caption: "Fast-Trips doesn't assume that everybody is average."
      source: "MTC, PSRC, & SFCTA"
   image5:
      image: /img/posts/indy-vehicles.png
      caption: "Fast-Trips can capture that rider experience can vary greatly across individual vehicles during the same time period"
      source: "MTC, PSRC, & SFCTA"
   image6:
      image: /img/posts/rider-perspectives.png
      caption: "Fast-Trips can show the variety of experiences riders feel at the same time on the same vehicle"
      source: "MTC, PSRC, & SFCTA"
   image7:
      image: /img/posts/muni-downtown.png
      caption: "Fast-Trips can show variation in experiences across riders"
      source: "MTC, PSRC, & SFCTA"
   image8:
      image: /img/posts/q-level.png
      caption: ""
      source: ""
   image9:
      image: /img/posts/q-reliability.png
      caption: ""
      source: ""
   image10:
      image: /img/posts/q-reliability2.png
      caption: ""
      source: ""
   image11:
      image: /img/posts/q-rtchoice.png
      caption: ""
      source: ""
   image12:
      image: /img/posts/q-space.png
      caption: ""
      source: ""
   image13:
      image: /img/posts/q-stop-consolidation.png
      caption: ""
      source: ""
   image14:
      image: /img/posts/q-xfer.png
      caption: ""
      source: ""
---

A question we understandably get a lot is *what is so different about Fast-Trips compared to
what you do now?*  The generic answer [ for most model development projects] is that it
helps us answer important questions relevant to planners and decision-makers that we can't
answer now.  Realizing that the lack of specificity in this response leaves a little to be
desired, we thought we would dedicate a post to diving a little deeper:

* what are the specific features that differentiate it from the conventional process?
* what questions will in answer?

### Promising Characteristics of Fast-Trips

#### 1 - Heterogeneity of riders.

##### What does that really mean?

Fast-Trips uses simulation, which enables it to consider the spectrum of unique combinations
of why riders might choose one route over another.  It has the ability to know that some riders
might prefer shorter walking distances and seats while others will prefer the fastest possible route.

{% include image.html image=page.images.image4 %}

Furthermore, rather than grouping every individual into a category ("market segment") that
chooses based on the average desire of the people in that category (i.e. all the speed-demons
will pick the 38L despite there not being any seats), Fast-Trips has the ability to understand
that "speedy" is relative - and that some speed-demons are more speed-driven than others (i.e.
some might be okay with a trip that is a minute slower, but where you can get a seat to read
your book.

<!--break-->

Conversely, different types of riders affect the transit system in different ways.  Some are
slow to board, some use cash versus a fare-card which makes the bus stop for longer, some
may need a spot for their wheelchair.  All of these things affect the performance of the
transit line.

##### How is that different?
Conventional transit path building methods use a singular set of optimization parameters
for all transit riders.  The problem with this method is that it results in an all-or-nothing
assignment of everybody going between that general origin-destination pair to a singular transit
route.

{% include image.html image=page.images.image1 %}

{% include image.html image=page.images.image2 %}

##### Why do we care?

**More consistent with reality:**  It is what happens in real life; therefore you will
get more realistic sensitivities and results.

**Realistic sensitivities and results:**  Aside from the simplification of theory, this
can be a significant problem in practice because transit routes that are slightly different
 from each other can have vastly different levels of attractiveness to riders.

If you want to design a system that works for everybody - you can't assume everybody will
be well-served by a system optimized for the "average" citizen.

{% include image.html image=page.images.image3 %}

#### 2 - Detailed representation of individual people and vehicles over time

##### What does that really mean?
Fast-trips tracks individual transit vehicles and people as they move through space and time.
 The overflowing 38L bus that arrives at Masonic Blvd. at 8:32 AM is represented separately
 from the bus that arrives at 8:35 AM and has free seats.

Similarly, Fast-Trips can show that individual riders may have different experiences on the
same vehicle.  If you are the person who got a seat, you will feel very differently about
your trip than the person who got passed-up or is squished near the door.

{% include image.html image=page.images.image2 %}

##### How is that different?
Conventional transit path building models use aggregations of time periods, vehicles, and riders.
This means that they cannot capture variations in experiences across vehicles or riders which makes
it difficult or impossible to calculate variables such as reliability or capture issues such
as pass-ups or crowding.

{% include image.html image=page.images.image5 %}

Furthermore, because conventional transit models do not have a concept of an individual rider,
you cannot easily summarize a rider's experience across the entire system (critical for
capturing reliability from the rider's perspective) or calculate "select links."

##### Why do we care?

**Capture important phenomena:** such as crowding, reliability, and the scheduling of
infrequent transit lines.  Since Fast-Trips models individual riders, you can observe the distribution
 of experiences rather than the average experience.

{% include image.html image=page.images.image7 %}

**Infinite summary options:** including select links, tracking individual people or vehicles,
and analyzing how specific groups of people or vehicles perform.  This includes the ability
to analyze reliability from the rider *and* vehicle perspective.

### What are some questions Fast-Trips will be help us answer?

{% include image.html image=page.images.image8 %}
{% include image.html image=page.images.image9 %}
{% include image.html image=page.images.image10 %}
{% include image.html image=page.images.image11 %}
{% include image.html image=page.images.image12 %}
{% include image.html image=page.images.image13 %}

repository: BayAreaMetro/fast-trips-project

branch_name: refs/heads/gh-pages

repo_name: BayAreaMetro/fast-trips-project


text:
# figgy

Provides convenient access to configuration files in various formats, with
support for overriding the values based on environment, hostname, locale, or
any other arbitrary thing you happen to come up with.

## Travis-CI Build Status
[![Build Status](https://secure.travis-ci.org/kingmt/figgy.png)](http://travis-ci.org/kingmt/figgy)

## Documentation
[yardocs](http://rdoc.info/github/pd/figgy/master/frames)

## Installation

Just like everything else these days. In your Gemfile:

    gem 'figgy'

## Overview

Set it up (say, in a Rails initializer):

    AppConfig = Figgy.build do |config|
      config.root = Rails.root.join('etc')

      # config.foo is read from etc/foo.yml
      config.define_overlay :default, nil

      # config.foo is then updated with values from etc/production/foo.yml
      config.define_overlay(:environment) { Rails.env }

      # Maybe you need to load XML files?
      config.define_handler 'xml' do |contents|
        Hash.from_xml(contents)
      end
    end

Access it as a dottable, indifferent-access hash:

    AppConfig.foo.some_key
    AppConfig["foo"]["some_key"]
    AppConfig[:foo].some_key

Multiple overlays can be defined to cascade
    AppConfig = Figgy.build do |config|
      config.root = Rails.root.join('etc')
      config.define_overlay :default, nil

      # config.foo is then updated with values from etc/development/foo.yml
      #                                        then etc/staging/foo.yml
      #                                        then etc/production/foo.yml
      # up to the current Rails environment
      config.define_overlay(:environment), ['development', 'staging', 'production'].slice(0..(env.index(Rails.env)))
    end

Multiple overlays can be defined to be combined
    AppConfig = Figgy.build do |config|
      config.root = Rails.root.join('etc')
      config.define_overlay :default, nil

      # config.foo is then updated with values from etc/development/foo.yml
      #                                        then etc/staging/foo.yml
      #                                        then etc/production/foo.yml
      #                                        from etc/US/foo.yml
      #                                        from etc/development_US/foo.yml
      #                                        then etc/staging_US/foo.yml
      #                                        then etc/production_US/foo.yml
      # up to the current Rails environment
      config.define_overlay(:environment), ['development', 'staging', 'production'].slice(0..(env.index(Rails.env)))
      config.define_overlay :country, 'US'
      config.define_combined_overlay :environment, :country
    end

Multiple cascading overlays can be defined to be combined
    AppConfig = Figgy.build do |config|
      config.root = Rails.root.join('etc')
      config.define_overlay :default, nil

      # config.foo is then updated with values from etc/development/foo.yml
      #                                        then etc/staging/foo.yml
      #                                        then etc/production/foo.yml
      #                                        from etc/a1/foo.yml
      #                                        from etc/b2/foo.yml
      #                                        from etc/c3/foo.yml
      #                                        from etc/development_a1/foo.yml
      #                                        from etc/development_b2/foo.yml
      #                                        from etc/development_c3/foo.yml
      #                                        then etc/staging_a1/foo.yml
      #                                        then etc/staging_b2/foo.yml
      #                                        then etc/staging_c3/foo.yml
      #                                        then etc/production_a1/foo.yml
      #                                        then etc/production_b2/foo.yml
      #                                        then etc/production_c3/foo.yml
      # up to the current Rails environment
      config.define_overlay(:environment), %w(development staging production).slice(0..(env.index(Rails.env)))
      config.define_overlay :arbitrary, %w(a1 b2 c3)
      config.define_combined_overlay :environment, :arbitrary
    end

Multiple root directories may be specified, so that configuration files live in
more than one place (say, in gems):

    AppConfig = Figgy.build do |config|
      config.root = Rails.root.join('etc')
      config.add_root Rails.root.join('vendor/etc')
    end

Precedence of root directories is in reverse order of definition, such that the
root directory added first (typically the one immediately within the application)
has highest precedence. In this way, defaults can be inherited from libraries,
but then overridden when necessary within the application.

Pivot overlays can be defined to provide alternate datasets, an I18n example:
    AppConfig = Figgy.build do |config|
      config.root = Rails.root.join('etc')
      config.define_overlay :default, nil
      config.define_overlay :environment, :development
      config.define_pivot_overlay :language, :lang
    end

    Assuming the following directory structure:
      etc
       |- foo.yml
       |- development
       |   |- foo.yml
       |- lang_en
       |   |- foo.yml
       |   |- development
       |       |- foo.yml
       |- lang.es
       |   |- foo.yml
       |   |- development
       |       |- foo.yml

    AppConfig.foo.value is defined in etc/foo.yml + etc/development/foo.yml
    AppConfig.language('en').foo.value is defined by etc/foo.yml + etc/development/foo.yml + etc/lang_en/foo.yml + etc/lang_en/development/foo.yml
    AppConfig.language('es').foo.value is defined by etc/foo.yml + etc/development/foo.yml + etc/lang_es/foo.yml + etc/lang_es/development/foo.yml
    AppConfig.language('de').foo.value is defined by etc/foo.yml + etc/development/foo.yml
=======

## Caveats

Because the objects exposed by figgy are often hashes, all of the instance methods
of Hash (and, of course, Enumerable) are available along the chain. But note that
this means you can not use key names such as `size` or `each` with the dottable
access style:

    AppConfig.price.bulk   #=> 100.00
    AppConfig.price.each   #=> attempts to invoke Hash#each
    AppConfig.price[:each] #=> 50.00

## Thanks

This was written by pd on [Enova Financial's](http://www.enovafinancial.com) dime/time.
Extensions written by kingmt

repository: billpatrianakos/figgy

repo_name: billpatrianakos/figgy


text:
# _DeadJournal_

#### _A NodeJS application that allows a user to post journal entries, 10.09.2017_

#### By _**Margaret Berry and Sara Spink**_

## Project Goals
* _Practice creating a NodeJS application with a Gulpfile._

## User Stories
* _As a user, I want to..._
* _...post a journal entry with a title and text._
* _...view a journal entry with a title, teaser, and text._
* _...see how many words are in my entry._
* _...see how many vowels and consonants are in my entry._

## Specifications
| Spec              | Input | Output |
|-------------------|-------|--------|
| Shows the number of words     | Today I saw a bird.    | There are 5 words in this entry.      |
| Shows the number of vowels     | Today I saw a bird.    | There are 6 vowels in this entry.      |
| Shows the number of consonants     | Today I saw a bird.    | There are 8 words in this entry.      |

## Setup/Installation Requirements
_Run the following commands in Terminal:_

1. `$ git clone` [this repository](https://github.com/codemargaret/ping_pong_gulp.git)
2. `$ cd ping_pong_gulp`
3. `$ open index.html`

## Known Bugs
_Refresh is required to submit a new entry._

## Support and contact details
_If you have issues, questions, ideas, or concerns, please contact [Margaret](codeberry1@gmail.com). Feel free to make a contribution to the code._

## Technologies Used
* _JavaScript_
* _NodeJS_
* _Gulp_

### License
*This software is licensed under the MIT license.*

Copyright (c) 2017 **_Margaret Berry and Sara Spink_**

repository: codemargaret/DeadJournal

repo_name: codemargaret/DeadJournal


text:
## My BSPWM Rice

Follow the [WIKI](https://wiki.archlinux.org/title/bspwm) to install BSPWM And [Polybar](https://wiki.archlinux.org/title/Polybar)

* If U use this repo, Do not forget to **CHANGE** the path of the files

## Polybar Modules
**On-Screen : [SharkFetch](https://github.com/The-0Day/SharkFetch)**

![](Dotfiles_Images/1.png)

## Rofi - Launcher CENTER

![](Dotfiles_Images/2.png)

## Rofi - launcher L

![](Dotfiles_Images/3.png)

## Rofi - launcher Down

![](Dotfiles_Images/4.png)

## Rofi - MPD

![](Dotfiles_Images/5.png)

# Polybar Module - Bspwm-Round
![](Dotfiles_Images/6.png)