text:
---
layout: post
header-img: img/default-blog-pic.jpg
author: ykapoor
description:
post_id: 4669
created: 2010/08/31 12:56:24
created_gmt: 2010/08/31 07:56:24
comment_status: open
---

# Exploring Android Charting and Graphs solutions

In one of the Android applications that I was creating the requirement was to have graphs and charts to present the data in a meaningful way to the user. With no direct charting API support in Android to address graphs and charts creation, I explored few other possible solutions.

This blog does not focus on comparing the available solutions but demonstrates the simple implementations using the approaches explored.

I considered three different ways to create charts in Android device

  1. [Google chart API][1]
  2. [Achartengine][2]
  3. [ChartDroid][3] I tried creating a Pie Chart while using the solutions. Google charting API being the easiest one to integrate is taken first

#### Google Charting API support

Using Google charting API, we can create charts and graphs directly by providing data to the Google charting service

The call to the Google's charting API looks like below:

[code language="xml"]http://chart.apis.google.com/chart?cht=&chd=&chs=&...additional_parameters...
 ```

More on Google charting API can be found [here][4]

For creating a pie chart using Google charting solution, I created the following URI

[code language="xml"]http://chart.apis.google.com/chart?cht=p3&chd=t:30,60,10&chs=250x100&chl=cars|bikes|trucks
 ```

Within my activity's onCreate() I included the code below

```
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); WebView googleChartView = new WebView(this); setContentView(googleChartView); String mUrl = "http://chart.apis.google.com/chart?cht=p3&chd=t:30,60,10&chs=250x100&chl=cars|bikes|trucks"; googleChartView.loadUrl(mUrl); }
 ```

In the onCreate() method, I am creating a WebView and just loading it with the URL response. It needs an internet access so I included the code below within AndroidManifest.xml [code language="xml"] <uses-permission android:name="android.permission.INTERNET" />
 ```

That's it!!! we are done with the first approach. The screen shot for the application I build using Google chart API looks like below:

[caption id="attachment_4674" align="alignnone" width="300" caption="Google Charting API PIE Chart"]![Google Charting API PIE Chart][5][/caption]

The only issue I had with this approach is that the device should have internet access available which in my case may not be always there. This small limitation made me look into other approaches and I came across another solution [Achartengine][2].

#### Achartengine

This Achart's charting support comes in the form of a download-able [Jar][6].

I added this into the lib folder of my application.

[caption id="attachment_4677" align="alignnone" width="247" caption="Android App Structure"]![Library Folder][7][/caption]

I created a class with a method that gives out a Pie chart intent as below

```
 public class AChartExample {

public Intent execute(Context context) { int[] colors = new int[] { Color.RED, Color.YELLOW, Color.BLUE }; DefaultRenderer renderer = buildCategoryRenderer(colors);

CategorySeries categorySeries = new CategorySeries("Vehicles Chart"); categorySeries.add("cars ", 30); categorySeries.add("trucks", 20); categorySeries.add("bikes ", 60);

return ChartFactory.getPieChartIntent(context, categorySeries, renderer); }

protected DefaultRenderer buildCategoryRenderer(int[] colors) { DefaultRenderer renderer = new DefaultRenderer(); for (int color : colors) { SimpleSeriesRenderer r = new SimpleSeriesRenderer(); r.setColor(color); renderer.addSeriesRenderer(r); } return renderer; } }
 ```

Within the execute method a SimpleSeriesRender is created with the required color that is required in the pie chart. These renderers are then added to the DefaultRender.

Next step is to create a CategorySeries with the appropriate data. Once this is done we can get achartingengine specific intent back with the following call ` ChartFactory.getPieChartIntent(context, categorySeries, renderer); `

With this intent we launch our activity and the code goes as below

```
 Intent achartIntent = new AChartExample().execute(this); startActivity(achartIntent);
 ``` The screen shot below shows the generated PIE chart using Achart library

[caption id="attachment_4697" align="alignleft" width="223" caption="Achart"]![][8][/caption] The other charting solution I explored is [chartDroid ][3]

#### Chartdroid

This solution needs the ChartDroid Application to be installed along with the application which intends to use the charting solution.

Although, we can install the application programmaticly from the Android apps market place, I directly installed the application into my device to explore it further.To install it download the apk from [here][9] and install it to the device.

The Chartdroid's charting solution requires a content provider to be created. Below is the content provider's code that I created

```
 public class ChartDroidDataProvider extends ContentProvider {

static final String AUTHORITY = "com.xyz.contentprovider.chardroid";

@Override public String getType(Uri uri) { return "vnd.android.cursor.dir/vnd.com.googlecode.chartdroid.graphable"; }

public static final Uri PROVIDER_URI = new Uri.Builder().scheme( ContentResolver.SCHEME_CONTENT).authority(AUTHORITY).build();

@Override public Cursor query(Uri uri, String[] projection, String selection, String[] selectionArgs, String sortOrder) {

// Fetch the actual data

MatrixCursor c = new MatrixCursor(new String[] { BaseColumns._ID, "COLUMN_AXIS_INDEX", "COLUMN_SERIES_INDEX", "COLUMN_DATUM_VALUE", "COLUMN_DATUM_LABEL" });

c.newRow().add(1).add(0).add(1).add(30).add(null); c.newRow().add(2).add(0).add(1).add(10).add(null);

   [1]: http://code.google.com/apis/chart/
   [2]: http://www.achartengine.org/
   [3]: http://code.google.com/p/chartdroid/
   [4]: http://code.google.com/apis/chart/docs/making_charts.html
   [5]: http://xebee.xebia.in/wp-content/uploads/2010/08/GoogleAPIChart-300x193.png (GoogleAPIChart)
   [6]: http://code.google.com/p/achartengine/downloads/list
   [7]: http://xebee.xebia.in/wp-content/uploads/2010/08/libFolder.png (libFolder)
   [8]: http://xebee.xebia.in/wp-content/uploads/2010/08/Achart2-223x300.png (Achart)
   [9]: http://code.google.com/p/chartdroid/downloads/list

## Comments

**[Amir](#3111 "2010-11-01 09:33:29"):** thank you very much for your help. I have downloaded it.

**[PM_Android](#3286 "2010-11-19 16:39:07"):** Thanx Yogesh for making my life,,,,,,, this is really an awesome article , actually i was playing and facing trouble with AchartEngine, and then i have tried to create an example from your code section, but failed to do it. Later on, i have downloaded the example code that you have provided ,from the code i came to know that we need to add the following activity to AndroidManifest.xml file, that you have forgot to mentioned above: Now, i got the success !! Thanx

**[Paresh Mayani](#3282 "2010-11-19 12:46:31"):** Really an awesome article you have provided, i have referred the PieChart example using AChartEngine, but please if possible provide a sample for drawing LineChart, i am stack at here

**[Amir](#3086 "2010-10-29 13:10:42"):** hi... Its a Superb tutorial and How to download the entire source code....Im not able to do it... i have registered too..im not able to find an option there...How to do it?

**[MariyaS](#5581 "2011-05-17 18:35:38"):** I want to display the multiple charts in one activity.. that means i want to see that charts one by one using by scrollbars..I used afreechart jar file to generate the charts...... can anyone help me.... Please...... Thanks in advance..

**[Shashank](#5359 "2011-03-22 00:22:06"):** will u plz how 2 draw bar graph using same method Thanx

**[Yogesh Kapoor](#5403 "2011-04-05 19:08:18"):** I don't know if it's useful for you now, as I am too late to respond. If the problem is still not resolved rest of the response might help. You need to make sure that your jar is also dex compiled. So there's an additional step apart from including the jar into the lib folder. In eclipse this automatically happens when we have the Android plugin installed and the **jar is included into eclipse's build path**.

**[Shivakanth](#5357 "2011-03-18 13:42:06"):** I Got it. We have the source @ following shared location: http://code.google.com/p/achartengine/downloads/detail?name=achartengine-0.2.0-demo-source.zip&can=2&q= Thanks a lot for sharing this Article

**[MariyaS](#5580 "2011-05-17 18:33:42"):** I want to display the multiple charts in one activity.. that means i want to see that charts one by one using by scrollbars..I used afreechart jar file to generate the charts...... can anyone help me.... Please...... Thanks in advance...

**[david berneda](#5281 "2011-02-09 14:54:12"):** Hi ! We've just released first beta of TeeChart for Android. https://market.android.com/details?id=com.steema.teechart.android We're working on a simple demo on how to use it from other applications, via Intent, Cursor, ContentProvider and passing simple xml / text data.

**[Diana](#5047 "2011-01-25 16:55:22"):** Hi! Thanx alot for sharing with us.I am going to implement the code.

**[halfhp](#5256 "2011-02-04 12:55:57"):** Great article - nice to see working code examples. Did you happen to come across androidplot during your exploration? (http://androidplot.com) If so, what is your impression of it compared to the ones that you reviewed here?

**[Carling](#5626 "2011-06-19 21:21:12"):** If you are using Achartengine, dont forget to include within the application tag of AndroidManifest.xml file. I had to spend a lot of time for this problem. Thank you Yogesh for this great tutorial.

**[Ankit](#1061 "2010-09-08 20:50:04"):** This was a great tutorial, i'm not sure why your site doesn't come up first when searching for \android charts\\. Thanks,

**[Yogesh Kapoor](#3088 "2010-10-29 16:46:51"):** Hi Amir, I have corrected the source code download link. Give it a try now.

**[Shivakanth](#5356 "2011-03-18 13:10:47"):** this is really an awesome article , actually i was playing and facing trouble with AchartEngine, and then i have tried to create an example from your code section, but failed to do it. We are gettign anerror ststing that we need to add the activity in manifest file. So coul you please provide us the list of activites that needs to be added or could you please provide us the sample working code, So that we can download it.

**[ajay](#3028 "2010-10-14 17:23:24"):** This tutorial has helped me a lot.Great work done. I’m also thinking why your site doesn’t come up first when searching for android charts.

**[xue](#3128 "2010-11-03 14:19:38"):** hi Amir, i wanna known how to draw line chart on achartengine? ths!

**[Shashank](#5358 "2011-03-22 00:19:18"):** Can u tell how to crete bar graphs using same technique Thnx...

**[sathish](#5519 "2011-04-29 14:50:07"):** Hi shilpa, There should be two classes to run the above code. In those, one class should extend Activity, but coming to second one it is not. In the above code you mentioned , 'AChartExample' is a class which is having a method named execute(Context) and it will return an Intent object like follow public class AChartExampe{ \----- \---- private Intent execute(Context c){ \---- \---- Intent i = ChartFactory.getPieChartIntent(context, categorySeries, renderer); return i; } } and there should be another class which is nothing but our activity class, in this class we create an object for AChartExample class and using this object we call the execute(Context) method then we will get an intent and then call startActivity(intent); public class MyActivity extends Activity{ \---- \---- \---- public void userdefinedMethod(){ \--- \--- Intent in= new AChartExample().execute(this); startActivity(in); } }

**[Carling](#5627 "2011-06-19 21:24:08"):** Include activity android:name="org.achartengine.GraphicalActivity" - (for the angular brackets that line is missing in my previous comment.)

**[Shilpa](#5468 "2011-04-14 18:24:39"):** In chartengine solution i am not getting the fallowing step ChartFactory.getPieChartIntent(context, categorySeries, renderer); Intent achartIntent = new AChartExample().execute(this); startActivity(achartIntent); do we need to create seperate class that extends activity for this Please if possible give me details with code i am very mouch in need of it thanks in advance

**[wira](#5372 "2011-03-31 12:24:36"):** Hi, I use AChartEngine, but I'm fail!, My Eclipse can not resolve where is achartengine.jar reside, although I have put it in LIB folder in my project. Is there something that I forgot?

**[saurabh](#5706 "2011-07-11 13:47:37"):** HI Yogesh Excellent tutorial...this must be tagged on the first hit on google i would say.I was wondering is there a way to display the charts in 3 D. Rgds, Saurabh

**[Kazu](#5709 "2011-07-12 05:42:04"):** Thank yo soooooooooo much! Your tutorial saved my life!! :D

**[nik](#5736 "2011-07-20 09:59:42"):** i would like to attach aChartEngine0.6.0 bar chart,column chart in android. can you please provide solution? and one more question are raise in my mind is that for achartEngine0.6.0 , purchase any licence ?

**[Sravanthi](#5984 "2011-10-05 11:21:26"):** It's a very good tutorial in the fresher perspective. It helped me a lot. Thank you.

**[rans](#6117 "2011-11-05 23:40:01"):** thanks alot!!!!! very helpful

**[lerie](#6127 "2011-11-06 21:59:56"):** Im also having a problem linking the library I guess, when I place the Intent code for the new AChartExample it says.. "AChartExample cannot be resolved to a type" my code is.. Intent in = new AChartExample().execute(this); startActivity(in); and it is inside my main activity.

**[lerie](#6128 "2011-11-06 22:02:13"):** Also, when I use the google code for the online stuff, it gives an error saying it chs be at least 1 pixel.. this code was straight copy and pasted from the tutorial.. WebView googleChartView = new WebView(this); setContentView(googleChartView); String mUrl = "http://chart.apis.google.com/chart?cht=p3&chd=t:30,60,10&chs=250x100&chl=cars|bikes|trucks"; googleChartView.loadUrl(mUrl); it does show chs is at 250x100

**[najia](#6425 "2011-12-21 06:55:43"):** Hi Yogesh, I choosed to use google chart but when there is no internet connection,it simply doesn't display the report or throws any error. Can you please let me know.

**[Umar](#6352 "2011-12-07 18:17:54"):** nice tutorial, but google chart which is very simple chart not working at my sitd please try hitting that url and see the error. Thanks,

**[Abhilash](#6389 "2011-12-13 18:43:22"):** while i am running AChartEngine project i am getting error on emulator as "unfortunatly AChartEngine has stopped." please resolve my issue. Thanks in advance...

**[godsmash](#6975 "2012-01-16 12:46:44"):** Hi, First of all, I would like to thank you for this Great tutorial. Secondly, do you have any example of 1- drawing bar chart, and if possible 2- drawing bar chart by retrieving data from database thanks.

**[Fazileh](#7382 "2012-02-05 18:46:47"):** Hi, At first, thank you for this useful tutorial. and second: I used Achartengine, and I have two tab that each tab has to show a chart that their values come from database. My code does not have any error message! But both chart are the same, despite the values are different. I will appreciate if you help me. Thank you

**[Siddhant](#7100 "2012-01-24 14:22:53"):** Nice tutorial.. However, i would like to ask you whether there are any other types of Chart libraries whose source i can download and use (like AChartEngine) which have a more "fancier" or "jazzier" look and feel? Thanks in advance..

**[Swati](#8402 "2012-04-09 11:38:57"):** Great tutorial:-)

**[Swati](#8403 "2012-04-09 11:40:23"):** great tutorial

**[Maidul Ialam](#7897 "2012-03-11 22:27:35"):** Hi Yogesh Kapoor, Hope all is well .Thank you very much for your tutorial sites. I am try to download your source code But I am unable to download.Could you please send me your source code ? I am looking forward to your positive reply. Thanks Maidul Islam

**[Kennie](#9201 "2012-07-20 11:43:13"):** Hi Yogesh Kapoor, Thanks for the tutorial, however when I am running your example codes Achartgraph and ChartDroidgraphs keep force close when I click the button only google chart API is working. Can you please advise me on how to keep it running ? Thanks alot in advance. Kennie


text:
##IOzone
###Overview

Docker version of [IOzone3.434](www.iozone.org/) benchmark suite.

This docker image contains the built IOzone benchmark suite for linux-arm and published with the `spirals/iozone3.434:linux-arm-build` tag.

###Usage

This image has to be used in a non-interactive mode—*i.e.*, all the benchmarks can be directly launched by using the command `docker run`.

For more details, use `docker run spirals/iozone3.434:linux-arm -h`.

repository: mainboy/benchmark-containers

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: mainboy/benchmark-containers


text:
## Installation

### npm

Installing with npm is recommended and it works seamlessly with [webpack](https://webpack.js.org/).

```shell
npm install element-plus --save
```

### CDN

Get the latest version from [unpkg.com/element-plus](https://unpkg.com/element-plus/) , and import JavaScript and CSS file in your page.

```html
<!-- import CSS -->
<link rel="stylesheet" href="https://unpkg.com/element-plus/lib/theme-chalk/index.css">
<!-- import JavaScript -->
<script src="https://unpkg.com/element-plus/lib/index.full.js"></script>
```

:::tip
We recommend our users to lock Element Plus's version when using CDN. Please refer to [unpkg.com](https://unpkg.com) for more information.
:::

### Hello world

If you are using CDN, a hello-world page is easy with Element Plus. [Online Demo](https://codepen.io/iamkun/pen/YzWMaVr)

  See the Pen YzWMaVr by iamkun
  (@iamkun) on CodePen.

If you are using npm and wish to apply webpack, please continue to the next page: [Quick Start](/#/en-US/component/quickstart).

license: MIT

repository: justwiner/element-plus

branch_name: refs/heads/dev

gha_license_id: MIT

repo_name: justwiner/element-plus


text:
# VexCode_2018-2019
Code for my team's robot for the vex robotics challenge, Turning Point, in 2018-2019.
For more information on the challenge for that year see the game manual [which is here](http://southworksrobotics.com/wp-content/uploads/2018/10/vex_2019.pdf).


text:
# ivy-codemirror

## Unreleased

- Deprecate the ivy-codemirror addon with instructions for a custom, modifier-based replacement in the README.
- [#38](https://github.com/IvyApp/ivy-codemirror/pull/38) Upgrade to Ember CLI 3.1.4

## 2.1.0 (May 13, 2017)

- [#29](https://github.com/IvyApp/ivy-codemirror/pull/29) CodeMirror addon support
- [#28](https://github.com/IvyApp/ivy-codemirror/pull/28) Remove Bower
- [#27](https://github.com/IvyApp/ivy-codemirror/pull/27) Upgrade to Ember CLI 2.13

## 2.0.4 (May 12, 2017)

- [#24](https://github.com/IvyApp/ivy-codemirror/pull/24) Fix this.import() issue for nested addons

## 2.0.3 (November 9, 2016)

- [#23](https://github.com/IvyApp/ivy-codemirror/pull/23) Upgrade to Ember CLI 2.9.1

## 2.0.2 (June 1, 2016)

- [#19](https://github.com/IvyApp/ivy-codemirror/pull/19) Put back missing params for valueUpdated

## 2.0.1 (May 31, 2016)

- [#18](https://github.com/IvyApp/ivy-codemirror/pull/18) Lazy Fastboot compatibility

## 2.0.0 (May 31, 2016)

- Bump CodeMirror version to 5.15.x.
- Ensure `valueUpdated` is in the `actions` queue. This prevents `value` from
  being changed within `didInsertElement`, which would cause Ember to emit a
  deprecation warning.
- Move CodeMirror initialization into a `code-mirror` service.
- Following DDAU (Data Down, Actions Up), `ivy-codemirror` no longer sets its
  `value` property directly. Instead, it sends the `valueUpdated` action and
  expects the caller to handle changing the value.
- Update value via `didRender` rather than observers.
- Change how options are specified. Instead of setting individual options, such
  as `autofocus`, `mode`, etc., `ivy-codemirror` now accepts an `options`
  property, which is expected to be a hash of options.

## 1.4.0 (March 24, 2016)

- Bump CodeMirror version to 5.13.x.
- Remove `ember-cli-codemirror-shim`.
- Upgrade `ember-cli` to 2.4.2.
- Remove standalone builds.

## 1.3.0 (December 21, 2015)

- [#12](https://github.com/IvyApp/ivy-codemirror/pull/8) Pass all event params to valueUpdated.

## 1.2.0 (August 3, 2015)

- [#8](https://github.com/IvyApp/ivy-codemirror/pull/8) Send valueUpdated action on update of value from input.
- [#7](https://github.com/IvyApp/ivy-codemirror/pull/7) Allow additional key maps to be imported.
- [#5](https://github.com/IvyApp/ivy-codemirror/pull/5) Update codemirror & support Handlebars.
- Upgrade to ember-cli 1.13.6.

## 1.1.0 (May 12, 2015)

- Upgrade to ember-cli 0.2.3.

## 1.0.0 (March 13, 2015)

- Fix initializer error. This was caused by changing the initializer from
  a named export to the default export.
- Upgrade to ember-cli 0.1.5.
- Upgrade to ember 1.9.1 in dummy app.
- Remove unnecessary ember-data dependency in dummy app.
- Remove version suffix from ivy-codemirror.js.
- Fix incorrect main script in standalone bower.json.

## 0.2.0 (December 12, 2014)

- Convert to an ember-cli addon.

## 0.1.1 (September 15, 2014)

- Fix problem with bound properties not updating correctly.

## 0.1.0 (August 23, 2014)

- Initial release.

repository: IvyApp/ivy-codemirror

repo_name: IvyApp/ivy-codemirror


text:
**npkh - Namecoin PGP Key Handler**
===============================

Allows you to make sure you are using the right PGP key by entering a Namecoin ID (id/ namespace) in your favorite keyserver client (PGP software) and getting a secure fingerprint from the Namecoin blockchain.

**How it works**
Namecoin PGP Key Handler mimics a standard PGP keyserver locally using the OpenPGP HTTP Keyserver Protocol (HKP). It adds functionality to request PGP keys for Namecoin IDs via a long fingerprint saved in the name value. This can be done through any application that can query a keyserver, e.g. Enigmail. By doing so you can make quite sure you are using the right PGP key. Standard (non Namecoin) PGP key requests will be passed through to a standard PGP keyserver.

**Current features**
* will do exact match lookups on id/
* will take a long (>40 characters) key fingerprint from the value field '/gpg/fpr' or '/fpr'
* will download keys from the location specified in the value or from a standard keyserver
* will proxy normal lookups to a standard keyserver
* can be run as plugin for Namecoin's NMControl or in standalone mode
* Known limitation: will not work with NMControl as global DNS provider (which is not a good idea anyway).

**How to run**
* run Namecoin Client (blockchain must be completely downloaded) or a drop in replacement (SPV client)
* Python 3 or Python 2.7.x must be installed (NMControl only works with Python 2.7.x)

in standalone mode:
* download: e.g. `git clone https://github.com/phelix/npkh`
* install requirements: `pip install --upgrade -r requirements.txt`
* run local server: `python ./npkh.py --serv`
* or do a command line query `python ./npkh.py get id/phelix`
* configuration by editing defaults in pluginKeyHandler.py

as NMControl plugin:
* put pluginKeyHandler.py into the NMControl subfolder 'plugin'
* launch NMControl (stop other instances first then launch e.g. from the command line with: `python ./nmcontrol.py --debug=1`)
* configuration via NMControl conf file plugin-keyServer.conf

then:
* from PGP enabled eMail program (tested with Thunderbird) --> enigmail --> key management --> keyserver
* as keyserver enter <IP_ADDRESS>:8083 (default)
* search for e.g. id/domob id/phelix id/jeremy
* you can also search for non id/ keys as usual

**Notes**
continued from https://forum.namecoin.org/viewtopic.php?f=9&t=2476
On Github: https://github.com/phelix/npkh
License: MIT

repository: phelix/npkh

repo_name: phelix/npkh


text:
---
metaTitle: "Microsoft SQL Server - SCOPE_IDENTITY()"
description: "Introduction with Simple Example"
---

# SCOPE_IDENTITY()

## Introduction with Simple Example

SCOPE_IDENTITY() returns the last identity value inserted into an identity column in the same scope. A scope is a module: a stored procedure, trigger, function, or batch. Therefore, two statements are in the same scope if they are in the same stored procedure, function, or batch.

INSERT INTO  ([column1],[column2]) VALUES (8,9);

GO

SELECT SCOPE_IDENTITY() AS [SCOPE_IDENTITY];

GO

#### Syntax

- SELECT SCOPE_IDENTITY();
- SELECT SCOPE_IDENTITY() AS [SCOPE_IDENTITY];
- SCOPE_IDENTITY()

repository: haifenghuang/generate

repo_name: haifenghuang/generate


text:
# Cyclops Sum Types

* [![Maven Central : cyclops-sum-types](https://maven-badges.herokuapp.com/maven-central/com.aol.cyclops/cyclops-sum-types/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.aol.cyclops/cyclops-sum-types)

cyclops-sum-types defines Either implementations from Either through Either4 (to be extended).

All Either implementations have the following features

1. Right biased for ease of use
1. Rich API
1.  Tail recursive map / flatMap methods
1. Interopability via Reactive Streams Publisher - all Eithers implement Publisher
1. Accept Publisher in API calls (flatMapPublisher)
1. Interopability via Iterable - all Eithers implement Iterable
1.

# Naming conventions

### Either
Left,Right

### Either3
Left1,Left2,Right

### Either4
Left1,Left2,Left3,Right


text:
# Rappo.rt #

## Rappo.rt ##
  > Build better relationships

## Sub-Heading ##
  > Rappo.rt helps account management professionals cultivate important client relationships.

## Summary ##
  > Give us information you know about your client. Receive notifications at important moments (e.g. birthday) with ideas about how to grow the relationship. Check your client's feed to find curated content based on the information you've given us. Store all of your client information in one convenient platform.

## Problem ##
  > Building relationships with important clients can be hard. Remembering interesting tidbits and important dates is often highly labor intensive.

## Solution ##
  > Rappo.rt helps you remember important information about your client.  Check your client's feed for interesting conversation topics to bring up during your next meeting. Find new ways to connect and strengthen your relationship.

## Quote from  ##
  > "By using Rappo.rt salespeople and account managers are able to make meaningful connections with their clients." - Stephen Saunders, Founder

## How to Get Started ##
  > Our UI is incredibly simple. Add clients and tell us what you know about them. We do the rest of the work.

## Customer Quote ##
  > "They say it's harder to fire a friend than a company. Rappo.rt has elevated our field agents from company reps to friends." - Dottie Christensen, VP of Sales, Hoo.li

## Closing and Call to Action ##
  > Be a friend. Sign up today!

gha_language: HTML


text:
Current Status
==============

Major hacking is happening here.
If you want to *use* Executor, go to the "original" version at github.com/ctm/executor.

I am trying here to modernize the code base (based on MaddTheSane's C++ port)
by inserting type-safe templates for all Big-Endian values.

This should have three benefits:

1. More type safety, which means fewer bugs once the bugs I add have been fixed again
2. 64 bit support
3. Easier-to-read code, because we can hopyfully automate most byte swapping.

Compilation Notes
=================

Current configure line:

```
CXX='g++ -m32' CC='gcc -m32' ../src/configure --with-front-end=x --with-sound=dummy --host=i686-unknown-linux
```

Original Readme
========================================================================

Executor is a Macintosh emulator that is able to run many ancient Mac
OS 680x0 binaries (System 6 era, early System 7) without using any
intellectual property from Apple Computer.

Executor has not been actively worked on for many years.  It is more
of a curiousity than anything practical; it does not run PowerPC
binaries, nor did it even run most System 7 applications.

The DOS port required various other libraries that we had permission
to use, but that we did not necessarily have the permission to publish
the source for, so the source to some of the packages that the DOS
port requires is not present in the github repository.

If you want to try to build a version of Executor, try this:

  cd src
  autoreconf --install
  cd ..
  mkdir build
  cd build
  ../src/configure
  make
  make install

That should leave you with a binary called "executor" (at least on
32-bit x86 Linux systems, or a Mac (Intel or PowerPC) with XCode 3
installed) and a directory called "skel".  By default, executor will
be installed in "/usr/local/bin" and skel will be installed in
"/usr/local/share/executor".

skel itself isn't meant to be written to; it's meant to be copied
somewhere and for the copy to be read/write.  For example,

  cp -Rp /usr/local/share/executor/skel/volume /tmp/ExecutorVolume
  export SystemFolder="/tmp/ExecutorVolume/System Folder"
  executor

The environment variables that drive Executor including where Executor
looks for the system folder are a bit arcane and meant to fit together
with installers that we no longer use.  It may make sense to make it
so that Executor automatically copies the contents of skel/volume to a
users home-directory the first time Executor is run, but that's an
exercise left to the reader.

If you're on an x86_64 based machine and you have the ability to compile
32-bit binaries and you have these packages installed (where the ? is 3 for
Fedora 10, 5 for Fedora 11 and 6 for Fedora 12):

  SDL-devel.i?86
  libX11-devel.i?86
  db4-devel.i?86
  libXext.i?86
  libXrender.i?86
  libXrandr.i?86

you should be able to build a copy of Executor by overriding CC and
OBJC to be the 32-bit version and explicitly stating that you're
building on a 32-bit system (which is a little bit untrue, but works):

  mkdir -p build/debug-linux
  cd build/debug-linux
  CC='gcc -m32' OBJC='gcc -m32' ../../src/configure --build=i686-pc-linux
  make

The above works on Fedora 10, 11 and 12 x86_64.

Yes, the above is pretty messy.  Since the x86_64 bit native version of
Executor doesn't build and is likely to anytime soon, it probably makes
sense to make it so that by default we build the ix86 version of Executor
when compiling on x86_64, and that we complain if the various 32-bit
libraries aren't available.

In the past it was possible to cross-compile a version of Executor for
Windows using mingw32.  So far that port hasn't been tried since
putting the code on Github.  It probably doesn't work, but probably
could be made to work without much effort.

At one time we had Executor running on the Alpha, a 64-bit
environment.  We actually modified gcc to support "pointer bit-fields"
and were able to get Executor to run.  Now that 64-bit machines are
more popular, I've begun an experiment in supporting 64-bit machines
without modifying the compiler.  See README.64 for more info.

As I continue Executor's transition to a recent gnu build system I may
inadvertantly push versions that don't build when using the above
commands.  Don't hesitate to ask me if you're having trouble
compiling, linking or running any of the above platforms.

My email address is still<EMAIL_ADDRESS>although ARDI itself is
defunct.    I'm ctm on github (http://github.com)
and typically check my email there once a day.

--Cliff Matthews

repository: timofonic-mac/executor

repo_name: timofonic-mac/executor


text:
# Jupiter-II Expansion
An Expansion board for the [Jupiter-II](https://github.com/ricaflops/Jupiter-II) computer

## Expands Jupiter-II with
- Video color: 16 colors, RGB output
- Programmable Sound Generator
- 128K RAM: paged
- 16K ROM: FORTH vocabulary extension
- Serial Interface

![Jupiter-II Color Screen](Jupiter-II_color.jpg)

![Jupiter-II Expansion KiCAD 3D view](Jupiter-II_expansion.jpg)

## FORTH code examples

### Colors
```
CYAN BORDER ( Change screen border color )
WHITE PAPER ( Set char background color )
BLUE DARK INK ( Set char foreground color )

: COLORBAR
  CLS 10 8 AT 16 0
  DO
   I INK 144 EMIT
  LOOP
  BLACK INK
  ;
COLORBAR ( Show a colorfull bar )
```

### Memory/Screen/Font Paging
```
0 FONT  ( select alternative character set )
1 FONT  ( select original character set )

0 SCREEN ( select screen page 0 )
1 SCREEN ( select screen page 1 )

0 MPAGE ( select memory page 0 )
3 MPAGE ( select memory page 3 )
```

### Sounds
```
: PING
  200 0 PSG!
  254 7 PSG!
  16 8 PSG!
  20 12 PSG!
  1 13 PSG!
;

: SHOT
  8 6 PSG!
  247 7 PSG!
  16 8 PSG!
  20 12 PSG!
  1  13 PSG!
;
```

### Serial Comm Port
8 data bits, 1 stop bit, no parity.
```
CREATE BUFFER 256 ALLOT ( Create and Allocate a memory space to work )
: CLRBUF BUFFER 256 32 FILL ; ( Clear Buffer )
: PRTBUF CR 256 0 DO BUFFER I + EMIT LOOP CR ; ( Print Buffer )

9600 BAUD     ( set communication baud rate )
CLRBUF        ( Clear Buffer )
BUFFER 256 RX ( Receive 256 bytes from serial line )
PRTBUF        ( View received data )
BUFFER 256 TX ( Transmit 256 bytes over serial line )
```
*Note: use Space key to abort communication if needed*

# Extra FORTH vocabulary
The extended vocabulary is copied from XROM to a unused 1K RAM area at $3000-$33FF of Jupiter-II during initialization.
That allows safe memory paging while keeping the extra Words accessible.

### Standard FORTH words

```
COUNT ( addr -- addr+1 c )  Extract String length
+! ( n addr -- )  Add 'n' to 'addr' variable
? ( addr -- )  Print variable value
CMOVE ( addr1 addr2 n -- )  Copy 'n' bytes from 'addr1' to 'addr2'
FILL  ( addr n c -- )  Fill 'n' bytes with 'c' starting from 'addr'
DEPTH ( -- n )  Data Stack Depth
HEX   ( -- )  Set numeric base to Hexadecimal
```

### Programmable Sound Generator

```
PSG! ( c reg -- ) Write 'c' to PSG register 'reg'
PSG@ ( reg -- c ) Read PSG register 'reg' contents
```

### Colors

```
BORDER ( c -- ) Set screen BORDER to color 'c' , 0 to 15
INK    ( c -- ) Set character INK to color 'c' , 0 to 15
PAPER  ( c -- ) Set character PAPER to color 'c' , 0 to 15
BLACK  ( -- c ) Stack color code for Black
GREY   ( -- c ) Stack color code for Grey
BLUE   ( -- c ) Stack color code for Blue
GREEN  ( -- c ) Stack color code for Green
CYAN   ( -- c ) Stack color code for Cyan
RED    ( -- c ) Stack color code for Red
PURPLE ( -- c ) Stack color code for Purple
YELLOW ( -- c ) Stack color code for Yellow
WHITE  ( -- c ) Stack color code for White
DARK   ( c1 -- c2 ) Change color code on stack to a darker tone
```

### Serial Communication
8 data bits, 1 stop bit, no parity.

```
BAUD ( n --  )  Set UART to Baud rate 'n'
TX ( addr n --  )  Transmit 'n' bytes starting from 'addr' to serial line
RX ( addr n --  )  Receive 'n' bytes from serial line to memory 'addr'
```

Avoid transfering to/from video RAM using video circuit priority addressing. That prevents transfer speeds above 1200 bauds.
- Video RAM from $2400 to $27FF. Use mirror addressing $2000 to $23FF instead (CPU priority).
- Character Genrator RAM from $2C00 to $2FFF. Use mirror addressing $2800 to $2BFF instead (CPU priority).

*Note: Character Generator RAM is write only*

### Memory Paging
```
MPAGE  ( c -- ) Select memory page 'c' , 0 to 3
SCREEN ( c -- ) Select Screen page 'c' , 0 or 1
FONT   ( c -- ) Select character set 'c' , 0 or 1
```
![Memry Paging](mem_paging.png)

*Note: System resets to page 3*

## Programmable Sound Generator Registers
![Programmable Sound Generator Registers](psg_registers.png)

```
   bits: 76543210 76543210
  R1 R0: ----tttt tttttttt : Tone generator A period (12-bits) 0-4095
  R3 R2: ----tttt tttttttt : Tone generator B period (12-bits) 0-4095
  R5 R4: ----tttt tttttttt : Tone generator C period (12-bits) 0-4095
     R6:          ---ttttt : Noise generator period  (5-bits)  0-31
     R7:          ppcbaCBA : I/O port and sound channel enablers
     R8:          ---Mvvvv : Channel A Volume (v) and Envelope Mode (M)
     R9:          ---Mvvvv : Channel B Volume (v) and Envelope Mode (M)
    R10:          ---Mvvvv : Channel C Volume (v) and Envelope Mode (M)
R12 R11: tttttttt tttttttt : Envelope period (16-bits) 0-65535
    R13:          ----calh : Envelope Shape: Continue (c), Attack (a), Alternate(l), Hold (h)
    R14:          dddddddd : I/O Port-A data
    R15:          dddddddd : I/O Port-B data
```

**R0..R6**: Tone and Noise Period (Frequency) settings

> t = 203125 / f , where f is the desirable frequency in Hz

> Tone Range: 49.6 Hz to 203.1 kHz (0..4095)

> Noise Range: 6.55 kHz to 293.1 kHz (0..31)

**R7**: Tone and Noise Mixer and I/O Ports direction

- bit0: when 0 enables tone A on channel A, 1 disables it
- bit1: when 0 enables tone B on channel B, 1 disables it
- bit2: when 0 enables tone C on channel C, 1 disables it
- bit3: when 0 enables Noise on channel A, 1 disables it
- bit4: when 0 enables Noise on channel B, 1 disables it
- bit5: when 0 enables Noise on channel C, 1 disables it
- bit6: when 0 set digital Port-A as input, 1 set it as output
- bit7: when 0 set digital Port-B as input, 1 set it as output

**R8..R10**: Channel volume

- bit4  : when 0 volume is fixed, when 1 volume is Envelope controlled
- bit3-0: Fixed volume value (0-31)

**R11, R12**: Envelope period

> t = s / 78.769e-6 , where s is the desirable period in seconds

> Period range: 78.8 us to 5.16 seconds

**R13**: Envelope Shape combination

- bit3: Continue: when 1 follows Hold setting, when 0 resets down after one cycle
- bit2: Attack: when 1 attack ramps up, when 0 ramps down
- bit1: Alternate: when 1 envelope shape reverses on each cycle (up/down)
- bit0: Hold: when 1 limits to one cycle and sustain final value

**R14, R15**: Digital I/O Port data

- Port A (register 14) controls PAPER and INK colors
- Port B (register 15) controls BORDER color and paging

![Programmable Sound Generator Ports](psg_io-ports.png)

repository: ricaflops/Jupiter-II-Expansion

repo_name: ricaflops/Jupiter-II-Expansion


text:
#The vvitty rogue arraigned, condemned, & executed. Or, The history of that incomparable thief Richard Hainam. Relating the several robberies, mad pranks, and handsome jests by him performed, as it was taken from his own mouth, not long before his death. Likewise the manner of robbing the King of Denmark, the King of France, the Duke of Normandy, the merchant at Rotterdam, cum multis aliis. Also, with his confession, concerning his robbing of the King of Scots. Together with his speech at the place of execution. / Published by E.S. for information & satisfaction of the people.#

##E. S.##
The vvitty rogue arraigned, condemned, & executed. Or, The history of that incomparable thief Richard Hainam. Relating the several robberies, mad pranks, and handsome jests by him performed, as it was taken from his own mouth, not long before his death. Likewise the manner of robbing the King of Denmark, the King of France, the Duke of Normandy, the merchant at Rotterdam, cum multis aliis. Also, with his confession, concerning his robbing of the King of Scots. Together with his speech at the place of execution. / Published by E.S. for information & satisfaction of the people.
E. S.

##General Summary##

**Links**

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

##Content Summary##

#####Front#####

1. To the READER.

1. The Speech and Confeſsion of Mr.
Richard Hainam, on Tueſday laſt in the
rounds of Smithfield, immediately before
his fatal Leap from off the Ladder.

1. The Contents are as followeth.

#####Body#####

1. The vvitty Rogue
Arraigned, Condemned,
and Executed:
OR,
The HISTORY of that Incomparable
THIEF,
RICHARD HAINAM.

    _ CHAP. I.

     XVIII.

    _ CHAP. XIX.

    _ CHAP. XX.

    _ CHAP. XXI.

    _ CHAP. XXII.

    _ CHAP. XXIII.

    _ CHAP. XXIV.

    _ CHAP. XXV.

    _ CHAP. XXVI.

    _ CHAP. XXVII.

    _ CHAP. XXVIII.

**Types of content**

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

There are 9 **ommitted** fragments!
 @__reason__ (9) : illegible (6), illegible: missing (3)  •  @__extent__ (9) : 1 letter (8), 1 word (1)

**Character listing**

|Text|string(s)|codepoint(s)|
|---|---|---|
|Latin Extended-A|ſ|383|
|General Punctuation|•|8226|
|Geometric Shapes|▪◊|9642 9674|
|CJKSymbolsandPunctuation|〈〉|12296 12297|

##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__|7| @__type__ (7) : DLPS (1), STC (3), EEBO-CITATION (1), PROQUEST (1), VID (1)|
|11.|__keywords__|1| @__scheme__ (1) : http://authorities.loc.gov/ (1)|
|12.|__label__|5||
|13.|__langUsage__|1||
|14.|__language__|1| @__ident__ (1) : eng (1)|
|15.|__listPrefixDef__|1||
|16.|__note__|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__|7||
|28.|__textClass__|1||
|29.|__title__|3||
|30.|__titleStmt__|2||

###Text Tag Usage###

|No|element name|occ|attributes|
|---|---|---|---|
|1.|__closer__|1||
|2.|__desc__|9||
|3.|__div__|33| @__type__ (33) : title_page (1), dedication (1), speech (1), table_of_contents (1), account (1), chapter (28)  •  @__n__ (28) : 1 (1), 2 (1), 3 (1), 4 (1), 5 (1), 6 (1), 7 (1), 8 (1), 9 (1), 10 (1), 11 (1), 12 (1), 13 (1), 14 (1), 15 (1), 16 (1), 17 (1), 18 (1), 19 (1), 20 (1), 21 (1), 22 (1), 23 (1), 24 (1), 25 (1), 26 (1), 27 (1), 28 (1)|
|4.|__g__|214| @__ref__ (214) : char:punc (5), char:EOLhyphen (209)|
|5.|__gap__|9| @__reason__ (9) : illegible (6), illegible: missing (3)  •  @__extent__ (9) : 1 letter (8), 1 word (1)|
|6.|__head__|60| @__type__ (28) : sub (28)|
|7.|__hi__|302| @__rend__ (1) : sup (1)|
|8.|__item__|29||
|9.|__list__|1||
|10.|__opener__|1||
|11.|__p__|37||
|12.|__pb__|56| @__facs__ (56) : tcp:115591:1 (2), tcp:115591:2 (2), tcp:115591:3 (2), tcp:115591:4 (2), tcp:115591:5 (2), tcp:115591:6 (2), tcp:115591:7 (2), tcp:115591:8 (2), tcp:115591:9 (2), tcp:115591:10 (2), tcp:115591:11 (2), tcp:115591:12 (2), tcp:115591:13 (2), tcp:115591:14 (2), tcp:115591:15 (2), tcp:115591:16 (2), tcp:115591:17 (2), tcp:115591:18 (2), tcp:115591:19 (2), tcp:115591:20 (2), tcp:115591:21 (2), tcp:115591:22 (2), tcp:115591:23 (2), tcp:115591:24 (2), tcp:115591:25 (2), tcp:115591:26 (2), tcp:115591:27 (2), tcp:115591:28 (2)  •  @__rendition__ (1) : simple:additions (1)  •  @__n__ (47) : 1 (1), 2 (1), 3 (1), 4 (1), 5 (1), 6 (1), 7 (1), 8 (1), 9 (1), 10 (1), 11 (1), 12 (1), 13 (1), 14 (1), 15 (1), 16 (1), 17 (1), 18 (1), 19 (1), 20 (1), 21 (1), 22 (1), 23 (1), 24 (1), 25 (1), 26 (1), 27 (1), 28 (1), 29 (1), 30 (1), 31 (1), 32 (1), 33 (1), 34 (1), 35 (1), 36 (1), 37 (1), 38 (1), 39 (1), 40 (1), 41 (1), 42 (1), 43 (1), 44 (1), 45 (1), 46 (1), 47 (1)|
|13.|__postscript__|1||
|14.|__salute__|1||
|15.|__seg__|3| @__rend__ (3) : decorInit (3)|
|16.|__trailer__|1||


text:
# Underverse

Underverse is a small backlog/queue manager that detects when items in your
backlog are out of sync and issues a fetch event to retrieve the missing items.
This module makes the following assumptions about your backlog of data:

- The backlog works with a bag of a ids.
- The ids a nummeric which equals the position of the backlog.
- The ids are ordered.
- The backlog has limit.
- The backlog resets it's ids once the limit is reached.

### Build status

[![Build Status](https://travis-ci.org/observing/underverse.png)](https://travis-ci.org/observing/underverse)

### Installation

The installation is done through `npm`

```
npm install underverse --save
```

Add the `--save` if you want to save the module in your `package.json`.

### Usage

The module is initialized with the size of the `backlog`;

```js
var Underverse = require('underverse')
  , uv = new Underverse(1000);
```

The snippet above creates a new `underverse` that works with a backlog that
can contain `1000` items. You should set the initial id of log. For example if
your queue is filled with 100/10000 slots:

```js
uv.cursor(100);
```

As it could be possible that your messages get out of sync if you use a remote
backlog (for example a reconnect) you can listen to the `fetch` event to know
which ids are missing.

```
uv.on('fetch', function (missing, mark) {

})
```

The `fetch` event receives 2 arguments, an array of missing id and a `mark`
function. The mark function allows you set all ids in to a `fetching` state so
you won't retrieve duplicate fetch calls that retrieve the same information. If
you call the `mark` function with a boolean `true` it will mark all missing
ids as `received`.

When you have received a message from your backlog call the `uv.received()`
method with the id.

```js
uv.received(10)
```

and that's it. Take a look at the tests for some examples.

## License

MIT

gha_language: JavaScript


text:
# arXiv spider

A simple spider to crawl metadata of arxiv papers.

## Usage

### requirements

Python 3.5+

### Input arguments

Run `python3 arxiv_spider.py -h` to see help, or refer to the following table:

| argument | description | default |
|----------|-------------|---------|
| -s yymm      | start month (contain) | 0704    |
| -e yymm      | end month (contain) | 0704 |
| -m int | maximum number of metadata to be archived |<PHONE_NUMBER> (consider to be a large number like +INF) |
| -p int | processes used when downloading to accelerate | 1 |
| -r filename | download metadata of a list of arxiv_id specified by a file | |
| -d arxiv_id | download the specified arxiv_id| |

### examples

* `python arxiv_spider.py -s 1001 -e 1010` download metadata of all papers submitted between Jan 2010 and Oct 2010
* `python arxiv_spider.py -s 1001 -e 1001 -m 1000` download metadata of first 100000 papers (ordered by submit time) submitted in Jan 2010
* `python arxiv_spider.py -d 0710.0010` download metadata of paper whose id is 0710.0010 (that is, the 10th paper in Oct 2007)
* `python arxiv_spider.py -r arxiv_ids.log` download metadata of papers specified by file `arxiv_ids.log`

The format of arxiv_id can be found [here](https://arxiv.org/help/arxiv_identifier).

The format of `arxiv_ids.log` is a file that contains a list of arxiv_ids separated by '\n', like
```text
2010.00005
1105.1432
...
0708.1234
```

Worth to mention that the program will log all arxiv_id that failed to download (due to network reason, for example) in `arxiv_download_error.log`, so run `python arxiv_spider.py -r arxiv_download_error.log` will retry all failed metadata downloading attempts.

## Output

The metadata will be stored in `metadata_yymmddhhmmss.json`.
The output format is identical to the official [arXiv Dataset](https://www.kaggle.com/Cornell-University/arxiv).
The metadata normally contains authors, abstract, title, submit time, doi(if there is), etc. More information on what was recorded can be seen [here](https://arxiv.org/help/bulk_data).

The arxiv_id of all failure attempts will be saved in `arxiv_download_error.log`

## Common reason of failure

The program uses arXiv Open Archives Initiative (OAI) interface to download data, which has a connection limit.
One common reason that cause the failure is the user requests the OAI too often.
The server will return 503 or reset the connection if one ip requests more than about 30000 times a day.
Thus, though the program supports multiprocessing to accelerate the download procedure, I highly recommend you to download with only one thread.

## license

The code in under MIT License, however, the metadata of arXiv may have other limitations.
It is nice to check these sites before using the metadata and obey the arXiv TOU.
* [arXiv Code of Conduct](https://arxiv.org/help/policies/code_of_conduct)
* [Terms of Use for arXiv APIs](https://arxiv.org/help/api/tou)

branch_name: refs/heads/main


text:
This document describes how to use CloudTracker with ElasticSearch.

Requirements
============
* CloudTrail logs must be loaded into ElasticSearch.  For instructions on setting up ElasticSearch and ingesting an archive of CloudTrail logs into it see below.
  * ElasticSearch 6.x is supported, but there are reports of ElasticSearch 1.x being used successfully.

Installation
============

### Step 1
Install the Python libraries using one of the provided Makefile targets:

For elasticsearch v6.x:
```
#sudo apt-get update
#sudo apt-get install python3-venv -y
python3 -m venv ./venv && source venv/bin/activate
pip install git+https://github.com/duo-labs/cloudtracker.git#egg=cloudtracker[es6]
```

For older versions, such as elasticsearch v1.x:
```
python3 -m venv ./venv && source venv/bin/activate
pip install git+https://github.com/duo-labs/cloudtracker.git#egg=cloudtracker[es1]
```

### Step 2
Get the IAM data of the account

```
#mkdir account-data
#sudo apt install awscli
aws iam get-account-authorization-details > account-data/demo_iam.json
```

### Step 3
#Create
Edit the `config.yaml`.  You need to specify how to connect to the ElasticSearch cluster, what index the CloudTrail logs are stored in, and information about your AWS account, including the location of the IAM file created in Step 3.

Example `config.yaml` file:
```
elasticsearch:
  host: localhost
  port: 9200
  index: "cloudtrail"
  key_prefix: ""
  timestamp_field: "eventTime"
accounts:
  - name: demo
    id:<PHONE_NUMBER>12
    iam: account-data/demo_iam.json
```

The ElasticSearch configuration section works the same as what is available to the ElasticSearch python library documented here: http://elasticsearch-py.readthedocs.io/en/master/api.html#elasticsearch

Additionally, you can configure:

- `index`: The index you loaded your files at.
- `key_prefix`: Any prefix you have to your CloudTrail records.  For example, if your `eventName` is queryable via `my_cloudtrail_data.eventName`, then the `key_prefix` would be `my_cloudtrail_data`.

Install ElasticSearch
=====================

You can use an AWS managed ElasticSearch cluster or one that you manage, including one running locally on a VM on your laptop.  However, if your logs exceed a few dozen GBs, or over 100M records, you'll likely run into issues running locally.  You'll also want to install Kibana to look at the loaded logs.

Configure the ElasticSearch mapping
-----------------------------------
Using Kibana and clicking on "Dev Tools" you can send commands to ElasticSearch. You can also do this using `curl`.  Run the following to setup a `cloudtrail` index and increase it's total fields to 5000.  If you don't increase that limit, records will be silently dropped.

#sudo add-apt-repository ppa:webupd8team/java
#sudo apt update
#sudo apt -y install oracle-java8-installer
#java -version
#sudo apt -y install oracle-java8-set-default
#sudo vi /etc/environment
#JAVA_HOME="/usr/lib/jvm/java-8-oracle/"
#echo $JAVA_HOME
#wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
#echo "deb https://artifacts.elastic.co/packages/6.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-6.x.list
#sudo apt update
#sudo apt install elasticsearch
#sudo systemctl start elasticsearch
#sudo systemctl enable elasticsearch
#curl -X GET "localhost:9200"

The commands to send
```
{
    "mappings": {
      "doc": {
        "properties": {
          "@timestamp": {
            "type": "date"
          },
          "@version": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "host": {
            "type": "text",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            }
          },
          "message": {
            "properties": {
              "additionalEventData": {
                "properties": {
                  "Note": {
                    "type": "text",
                    "fields": {
                      "keyword": {
                        "type": "keyword",
                        "ignore_above": 256
                      }
                    }
                  }
                }
              },
              "apiVersion": {
                "type": "text"
              }
            }
          }
        }
      }
    }
}
```

You can save the above file as `cloudtrail_mapping.json` and then send it to your ElasticSearch cluster using:

```
curl -X PUT https://YOUR_ES_SERVER/cloudtrail -T cloudtrail_mapping.json  -H "Content-Type: application/json"
```

Do the same for:
```
#PUT /cloudtrail/_settings
{
  "index.mapping.total_fields.limit": 5000
}
```

You can save that to a file named `cloudtrail_settings.json` and then run:
```
curl -X PUT https://YOUR_ES_SERVER/cloudtrail/_settings -T cloudtrail_settings.json  -H "Content-Type: application/json"
```

Ingest CloudTrail logs into ElasticSearch using Hindsight
=========================================================

Copy your CloudTrail logs locally and convert them to a single flat file.

```
# Replace YOUR_BUCKET and YOUR_ACCOUNT_ID in the following command
aws s3 sync s3://YOUR_BUCKET/AWSLogs/YOUR_ACCOUNT_ID/CloudTrail/ .
#cd ..
#touch cloudtrail.json
#chmod 777 cloudtrail.json
#cd ubuntu
find . -name "*.json.gz" -exec gunzip -c {} \; | jq -cr '.Records[] | del(.responseElements.endpoint)' >> ../cloudtrail.json
```

I'm deleting `.responseElements.endpoint` because different API calls return an object or a string for that value and ElasticSearch can't handle mixed types, so I just ignore that value since it is of little use.

Install Hindsight
-----------------
Hindsight is hard to install as it has a number of dependencies.  The project is at https://github.com/mozilla-services/hindsight

Here are some notes, but you'll still probably run into trouble.  Help in improving the installation of those projects would be good.

For the dependencies:
```
sudo apt install -y libcurl-devel autoconf automake libtool cmake
#libcurl4-openssl-dev instead of libcurl-devel

git clone https://github.com/mozilla-services/lua_sandbox.git
cd lua_sandbox/home/ubuntu/lua_sandbox_extensions/release/CMakeFiles/CMakeError.log
mkdir release
cd release

cmake -DCMAKE_BUILD_TYPE=release ..
make
#ctest
#cpack -G TGZ # (DEB|RPM|ZIP)
# if error coming try:
#sudo chown ubuntu install_manifest.txt
#sudo chgrp ubuntu install_manifest.txt
sudo make install

cd ../..

git clone https://github.com/mozilla-services/lua_sandbox_extensions.git
cd lua_sandbox_extensions
mkdir release
cd release
#sudo apt-get install cmake gcc g++
#remove 'CMakeCache.txt'
#run compilation again.
# Disable a bunch of extensions when we build this to avoid further dependencies
cmake -DCMAKE_BUILD_TYPE=release -DEXT_aws=off -DEXT_snappy=off -DEXT_bit=on -DEXT_bloom_filter=on -DEXT_circular_buffer=on -DEXT_cjson=on -DEXT_compat=on -DEXT_cuckoo_filter=on -DEXT_elasticsearch=on -DEXT_gcp=off -DEXT_hindsight=on -DEXT_heka=on -DEXT_hyperloglog=on -DEXT_irc=off -DEXT_jose=off -DEXT_kafka=off -DEXT_libinjection=on -DEXT_lfs=on -DEXT_lpeg=on -DEXT_lsb=on -DEXT_maxminddb=off -DEXT_moz_ingest=on -DEXT_moz_logging=on -DEXT_moz_pioneer=on -DEXT_moz_security=on -DEXT_moz_telemetry=on -DEXT_openssl=off -DEXT_papertrail=on -DEXT_parquet=off -DEXT_postgres=off -DEXT_rjson=off -DEXT_sax=on -DEXT_socket=on -DEXT_ssl=off -DEXT_struct=on -DEXT_syslog=on -DEXT_systemd=off -DEXT_xxhash=on -DEXT_zlib=off -DCPACK_GENERATOR=DEB ..
make
make packages
sudo make install
# In my experience I needed to manually install files, or copy or link them, as you should have files named
# `rjson.so` and `ltn12.lua` at `/usr/local/lib/luasandbox/io_modules/`.
```

Now install Hindsight from https://github.com/mozilla-services/hindsight

git clone https://github.com/mozilla-services/hindsight.git
cd hindsight
mkdir release
cd release

# Linux
cmake -DCMAKE_BUILD_TYPE=release -DWITHOUT_OPENSSL=true ..
make
ctest
cpack -G TGZ # (DEB|RPM|ZIP)

Run a proxy
-----------
This may not be needed, but it's helpful, especially when using an AWS managed ElasticSearch cluster.

```
var http = require('http'),
    httpProxy = require('http-proxy');

var proxy = httpProxy.createProxyServer({});

proxy.on('proxyReq', function(proxyReq, req, res, options) {
  console.log("> Proxying: ", req.url);
  proxyReq.setHeader('content-type', 'application/json');
});

proxy.on('proxyRes', function (proxyRes, req, res) {
  console.log("< ", proxyRes.statusCode);
});

var server = http.createServer(function(req, res) {
  proxy.web(req, res, {
    target: 'https://MY_ES_INSTANCE.us-west-2.es.amazonaws.com', secure: false
  });
});

console.log("listening on port 9201")
server.listen(9201);
```

Here you can see I am ignoring any cert errors when making the TLS connection, so you'll need to decide if that is acceptable for your use case.

Run this with:
```
node proxy.js
```

Configure Hindsight
-------------------
This repo includes a `hindsight/run` directory. Copy the `run` directory to your hindsight repo.

Replace `YOUR_FILE` in `run/input/file.cfg` with the full path to your `cloudtrail.json` file.

Replace `<IP_ADDRESS>` and the port `9200` in `run/output/elasticsearch_bulk_api.cfg` if you are not running ElasticSearch on your localhost.

Run hindsight
-------------
To run hindsight use:

```
hindsight_cli hindsight.cfg
```

You will also want to run `rm -rf output/*` in between runs to clear out the cached files.
You may need to modify `hindsight.cfg` to tell it the `io_lua_path` and other paths are in `/usr/local/lib/` not `/usr/lib/`


text:
#### 📩 Installation

- Make sure [Node.js](https://nodejs.org/en/download) is installed in your system.
- Download this repository or clone: `git clone https://github.com/tarikcoskun/website`,
- Install modules:
  - with Yarn: `yarn` or `yarn install`.
  - with NPM: `npm install`.
- Start the project:
  - in Development mode: `yarn dev` or `npm run dev`,
  - in Production mode: First, run `yarn generate` or `npm run generate` then run `yarn start` or `npm run start`.

### 🙏 Special Thanks

to [EGGSY](https://github.com/eggsy), [Arda](https://github.com/ardasoyturk), [Barış](https://github.com/barbarbar338) and [Florian Lefebvre](https://github.com/florian-lefebvre). Inspired a lot by them, even used some of their amazing code. Make sure to check their profiles and websites 😉

repository: heyimnitho/tarik-website

repo_name: heyimnitho/tarik-website


text:
# Kubernetes-and-Cloud-Native-Associate(KCNA)

## Exam Details

* [CNCF Official Link ](https://training.linuxfoundation.org/certification/kubernetes-cloud-native-associate/?utm_source=lftraining&utm_medium=pr&utm_campaign=kcna1021)
- Duration : 90 minutes
- Number of questions: 60
- Question Types: Single Choice(It says multiple choice, but in my exam, there is no multiple choice question)
- Passing Score: 75
- Certification Validity: 3 years
- Exam Cost: $250 with one free atempt and one year validity

## Exam Objective
- [KCNA Exam Objective](https://github.com/cncf/curriculum/blob/master/KCNA_Curriculum.pdf)

## KCNA Topics

- [X] Kubernetes Fundamentals - 46%
- [X] Container Orchestration - 22%
- [X] Cloud Native Architecture - 16%
- [X] Cloud Native Observability - 8%
- [X] Cloud Native Application Delivery - 8%

### Kubernetes Fundamentals - 46%

:large_blue_diamond: Kubernetes Resources

1. [Kubernetes Pod](https://kubernetes.io/docs/concepts/workloads/pods/)
2. [ReplicaSet](https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/)
3. [Deployments](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/)
4. [Service](https://kubernetes.io/docs/concepts/services-networking/service/)

:large_blue_diamond: Kubernetes Imperative Commands
[Kubernetes Imperative Commands](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/imperative-command/)

:large_blue_diamond: Kubernetes Architecture
[Kubernetes Architecture](https://www.redhat.com/en/topics/containers/kubernetes-architecture)

:large_blue_diamond: Kubernetes API
[Kubernetes API](https://kubernetes.io/docs/reference/)

:large_blue_diamond: Containers
- [Containers](https://kubernetes.io/docs/concepts/containers/)
- [Docker Tutorial for Beginners](https://www.youtube.com/watch?v=fqMOX6JJhGo)

:large_blue_diamond: Scheduling
[Scheduling](https://kubernetes.io/docs/concepts/scheduling-eviction/)
- [How the Kubernetes scheduler works](https://www.youtube.com/watch?v=rDCWxkvPlAw)
- [How Scheduling in Kubernetes Works ](https://www.youtube.com/watch?v=0FvQR-0tK54)

:large_blue_diamond:cloudnative-glossary
[cloudnative-glossary](https://github.com/cncf/glossary/blob/main/cloudnative-glossary.pdf)

### Container Orchestration - 22%

:large_blue_diamond: Container Orchestration Fundamentals
[Container Orchestration Fundamentals](https://www.youtube.com/watch?v=kBF6Bvth0zw&t=3s)

:large_blue_diamond: Runtime
- [Runtime](https://kubernetes.io/docs/setup/production-environment/container-runtimes/)
- [Container Runtime](https://www.youtube.com/watch?v=RyXL1zOa8Bw)

:large_blue_diamond: Security
- [Security](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/)
- [Kubernetes Security](https://www.youtube.com/watch?v=wqsUfvRyYpw)
- [RBAC](https://www.youtube.com/watch?v=4HMRFcg6nEY)

:large_blue_diamond: Networking
- [Networking](https://kubernetes.io/docs/concepts/services-networking/)
- [Container Networking From Scratch](https://www.youtube.com/watch?v=6v_BDHIgOY8)

:large_blue_diamond: Service Mesh
[Service Mesh](https://www.redhat.com/en/topics/microservices/what-is-a-service-mesh)

:large_blue_diamond: Storage
- [Storage](https://kubernetes.io/docs/concepts/storage/)
- [Kubernetes Storage](https://www.youtube.com/watch?v=uSxlgK1bCuA)

:large_blue_diamond: Deployment vs StatefulSet
[Deployment vs StatefulSet](https://stackoverflow.com/questions/41583672/kubernetes-deployments-vs-statefulsets)

### Cloud Native Architecture - 16%

:large_blue_diamond: Autoscaling
[Autoscaling](https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/)

:large_blue_diamond: Serverless
[Serverless](https://developers.redhat.com/coderland/serverless/serverless-knative-intro#)

:large_blue_diamond: Community and Governance
[Community and Governance](https://github.com/kubernetes/community/blob/master/governance.md)

:large_blue_diamond: Personas
[Personas](https://cluster-api.sigs.k8s.io/user/personas.html)

:large_blue_diamond: Open Standards
[Open Standards](https://thenewstack.io/open-standards-and-the-role-of-containerd-in-kubernetes-orchestration/)

### Cloud Native Observability - 8%

:large_blue_diamond: Telemetry & Observability
[Telemetry & Observability](TBD)

:large_blue_diamond: Prometheus
[Prometheus](https://opensource.com/article/19/11/introduction-monitoring-prometheus)

:large_blue_diamond: Cost Management
- [Cost Management](https://searchitoperations.techtarget.com/tip/Kubernetes-cost-management-approaches-to-save-money)
- [Cost Visibility and Optimization in Kubernetes](https://www.youtube.com/watch?v=JhJF5AvtshM)

### Cloud Native Application Delivery - 8%

:large_blue_diamond: Application Delivery Fundamentals
[Application Delivery Fundamentals](TBD)

:large_blue_diamond: GitOps
[GitOps](https://www.redhat.com/en/topics/devops/what-is-gitops)

:large_blue_diamond: CI/CD
- [CI/CD](https://www.containiq.com/post/cicd-pipelines-with-kubernetes)
- [Argo CD Kubernetes](https://www.youtube.com/playlist?list=PL34sAs7_26wMW4bWKnMIfEd87aPuw75by)

### Training Material

1. [Kubernetes and Cloud Native Essentials (LFS250)](https://training.linuxfoundation.org/training/kubernetes-and-cloud-native-essentials-lfs250/)
2. [Certified Kubernetes Administrator (CKA) with Practice Tests](https://www.udemy.com/course/certified-kubernetes-administrator-with-practice-tests/)
3. [Introduction to GitOps (LFS169)](https://training.linuxfoundation.org/training/introduction-to-gitops-lfs169/)


text:
---
layout: post
title: "Bits, Gates & Algebra"
date: 2019-11-16
---

This starts a series of posts where I talked about the very fundamentals of computer architecture. These post are mostly based on my recent learnings from a couple of resources, namely
[But How Do It Know?](http://www.buthowdoitknow.com/index.html), [nand2tetris](https://www.coursera.org/learn/build-a-computer) and [Understanding the Digital World](https://press.princeton.edu/books/hardcover/9780691176543/understanding-the-digital-world). All these are great starting points to learn how computers work from the very ground up. They assume no particular background whatsoever so they are a very good read for anybody interested in the topic, be sure to check them out!

## 10,000-foot view

On a (very) high level computers have 2 main components: the Central Processing Unit (CPU) and the Random Access Memory (RAM). The CPU can be seen as the the brain of the machine and its main functions are to perform calculations and control the flow of information across the whole system. RAM on the other hand, is the physical space where most actively used information is stored. These 2 devices work in tandem in a never-ending cycle as we can see below:

![cpu_ram](https://eduardo-tutorial-videos.s3.us-east-2.amazonaws.com/blogs/computer_arch_1/cpu_ram.png)

The CPU performs calculations using a set of data and instructions that are stored and fetched from the RAM. Based on the results of the calculations the CPU requests a new set of data and instructions which the RAM will again provide, repeating the never ending cycle.

Thus, a great part of understanding how computers work its about understanding how these two components interact with each other and how do they accomplish what they need to do. In the case of the CPU that is, how the data is processed and managed, while for the RAM how the data is stored and retrieved efficiently.

This makes sense intuitively if you think about the last time you bought a computer. When we buy computers we normally take a look at 2 key metrics: the processing power, generally measured on GHz, and memory capacity, measured on GBs. Higher processing GHz means the CPU is able to do more calculations per unit of time, while more GBs for storage translate into more RAM space for the computer to hold information at any given point.

The following series of posts will take a look at how these devices work and interact with each other. We'll be starting our journey from the most fundamental unit of all: **the bit**.

 When enough of these procedures are put together in the right sequence computers are able to perform tasks that are useful and seemingly complex to humans. They do all this by controlling the electrical current that runs through some small wires known as bits. At any given moment these bits can live in any of these two states:

- 1 (or ON) when electricity runs through.
- 0 (or OFF) when NO electricity runs through.

These bits can be arranged into sequences to express any arbitrary meaning or code we want to attribute to them. For example with a single bit, we can determine whether or not a lamp should be on or off. Our code could be something like this:

Bit state | Lamp light
:---:     | :---:
1         | On
0         | Off

Now, with 2 bits we can do more interesting stuff such as determining what light should be on a traffic light. A code for this could look like the following:

Bits state | Traffic Light
:---:      | :---:
00         | ❤
01         | 💛
10         | 💚
11         | ⬅

NOTE: Apologies for the heart emojis but apparently colored circle emojis are not a thing just yet.

Notice how we were able to encode 4 different states by only using 2 bits, this is because the order of the bits matter to the code we just created. In fact, as we add bits the possible amount of combinations double for every bit added. Thus, 3 bits will translate to 8 combinations, 4 to 16 combinations, and so on. The total number of combination can then be calculated by 2number_of_bits.

Now, *Is there anything interesting, besides lamps and traffic lights, that can be encoded with bits?* Yes lots of things! For instance with 8 bits, and its corresponding 256 combinations you have enough possible combinations to represent the whole latin alphabet, which usually consist of 26-30 characters depending on the language. In fact you even have some outstanding combinations to represent the capitalized version of each letter, numbers, punctuation symbols and some other weird characters. This exact same code exists already and it is known as [ASCII](https://www.ascii-code.com/).

This is a very useful code and it's probably used by all computers nowadays but it's important to understand that, just like our lamp or traffic light code, this is a man-made construct. A convention established by a group of people in a room that one day arbitrarily decided that computers should understand "01100011" as the character "c". There is nothing intrinsically special about the bit combination "01100011" that enforces the meaning "c" on a particular computer. It's just part of a standard agreed upon, most likely to have a consistent representation for the letter "c" across all computers, and devices regardless of their manufacturer.

## Logic Gates

This thing about arbitrary codes is all well and good, but how do you go from bit combinations to full fledged systems capable of calculating and remembering things? It's quite the journey but it all starts with logic gates. Logic gates are hardware devices that operate on bits and they usually have the ability to produce output bit(s) given some input bit(s). A couple of very simple gates are

![and/or gates](https://eduardo-tutorial-videos.s3.us-east-2.amazonaws.com/blogs/computer_arch_1/and_or.png)

Both of these gates operate on 2 input bits (**a**, **b**) and have 1 output (**out**). In the case of the AND gate **out** will only be 1 when both of the inputs **a** and **b** are 1. The OR gate on the other hand, produces a 1 **out**bit if any of its inputs **a** or **b** are 1. If you're are a programmer it's easy to draw parallelism between these gates and the common logic "and" and "or" statements used on your day to day job.

There's another gate that's worth taking a look at, the NAND gate. As its name implies the NAND gate is the negation of the AND gate. All it's outputs on the truth table are inverted with respect to the "AND" gate. That is **out** is 1 for all combinations of inputs except for when both **a** and **b** are 1. Here's the truth table for it:

![nand gate](https://eduardo-tutorial-videos.s3.us-east-2.amazonaws.com/blogs/computer_arch_1/nand.png)

One interesting property about the NAND gate is that it can be combined and arranged to create multiple other types of gates. For instance we can start by creating a NOT gate that is a gate that takes an single input **a** and produces the opposite output **out** by simply feeding the same input twice to the NAND gate.

![not gate](https://eduardo-tutorial-videos.s3.us-east-2.amazonaws.com/blogs/computer_arch_1/not_from_nand.png)

We can use this result to recreate the previously seen AND and OR gates, as seen in the diagram below:

![and_or_from_nand](https://eduardo-tutorial-videos.s3.us-east-2.amazonaws.com/blogs/computer_arch_1/and_or_from_nand.png)

You can in fact extrapolate this idea and create ALL (yes ALL!) the different gates and devices you'll ever need to build a computer only starting out from NAND gates! But in order to understand this we need to understand what the canonical representation of a boolean function is.

## Canonical Representation

As we advance in our journey we'll want to build more complex logical devices that fulfill different purposes. One of such is known as multiplexer and it is described below:

The multiplexer has 3 inputs and 1 output. It works in such a way that the input **s** determines which of the other inputs, **a** or **b**, becomes the output. So in this case when **s** = 0, **out** will take the current value of **a**. Conversely, if **s** = 1 the value of **out** will be set to the current value of **b**.

As circuits and devices become more complex it becomes much easier to study them using algebraic expressions. One straight forward way to derive such equations is by obtaining its canonical representation which can be done by using these steps:

1. Select all the rows from the truth table where the output is 1
1. "AND" all the inputs per row
1. "OR" all the results from the step 2

Let's apply these to the MUX device we described above. From step 1 we know that we'll be working with rows 3, 4, 6 and 8 since those are the bits combination that produce **out** = 1. We can take row 3 for example and express it in the following way:

Notice how every input that had a value of 1 was expressed with the same letter found in the table, in this case `a`, and every input that had a value of 0 was drawn with a horizontal bar on top indicating that the input needs to be NOTed for the expression to work, in this case `b` and `s`. We can further simply the notation by removing the `and` altogether much like we do with regular equations when factors multiply, e.g. E = mc2:

Finally, applying step 2) to the outstanding selected rows 4, 6 and 8 and applying step 3) to all the corresponding results we obtain:

![canonical representation](https://eduardo-tutorial-videos.s3.us-east-2.amazonaws.com/blogs/computer_arch_1/canonical_representation.png)

Notice how I've used `+` sings instead of explicit `or`s, again this is done to improve readability and to obtain a more equation looking expression which will become very convenient as we'll see in the next section. We can easily verify that our equation conforms with the truth table by testing some cases. For example by substituting the values in row 4 `a = 1, b = 1, s = 0` we get: `0 OR 1 OR 0 OR 0` which correctly evaluate to `out = 1`, feel free to test other rows to convince yourself.

One important result of the canonical expression is that it shows how we can potentially build any logical device by just using AND, OR and NOT gates which as explained above can all be constructed starting from NAND gates. This explains why NAND gates are normally use as the fundamental primitive to build all computers.

## Boolean Algebra

We could construct a multiplexer device straight out of the canonical expression derived above but that would be a bit more complicated than necessary since we can simplify this expression using some boolean algebraic rules as shown below:

![boolean algebra](https://eduardo-tutorial-videos.s3.us-east-2.amazonaws.com/blogs/computer_arch_1/boolean_algebra.png)

We can see that the resulting expression has been considerably reduced and will translate into simpler chip

![mux diagram](https://eduardo-tutorial-videos.s3.us-east-2.amazonaws.com/blogs/computer_arch_1/+mux_diagram.png)

In practice simplified chips are very desirable because they are cheaper to manufacture as they require less pieces, and occupy less space which is vital for today's computer standards. It's beautiful to see how a seemingly pure theoretical area, such as boolean algebra, can have a very real practical impact in the design of something so ubiquitous such as a computer.

Thanks for reading. Until the next time!

gha_language: SCSS


text:
# Fractals

Program rendering some recognizable fractals in real time.

![Mandelbrot set](/images/mandelbrot.png)

![Julia set](/images/julia.png)

##### supported fractals:
- [x] Julia sets
- [x] Mandelbrot set
- [ ] Burning Ship Fractal
- [ ] some other

##### Requirements:

Application is written in C++ for performance reasons. It requires **SFML** for rendering with **OpenGL** and also **SFGUI** for the GUI.

Another requirement is **PURlib**, which is my library used for parsing program parameters. More information is available [here](http://github.com/purchawek/purlib)

##### Building:

`make` - that's all for now

##### Running:

`./build/main --help` - for details

##### TODOs
*   MORE FRACTALS
*   a better Makefile
*   flexible and easy way for defining new shaders
*   better gui (color selection, shader selection, more config options, help popup etc)
*   installer so it becomes an application
*   total code refactor and cleanup
*   find some way for testing this
*   documentation

repository: purchawek/fractals

repo_name: purchawek/fractals


text:
# Instant-Song-Downloader-with-lyrics

## Usage

```bash
$ javac AwesomeSongDownloader.java
```
```bash
$ java AwesomeSongDownloader
```

```zsh
>> Enter lyrics of some english song.

another turning point a fork stuck in the road

>>0 : Good Riddance (Time of Your Life) Glen Campbell  Meet Glen Campbell Glen Campbell

1 : Good Riddance (Time of Your Life) Green Day  Nimrod Green Day

2 : Good Riddance (Time of Your Life) Green Day  Awesome as F**k Green Day

3 : Good Riddance (Time of Your Life) Lea Michele Glee Cory Monteith Amber Riley Chord Overstreet  Glee: The Music - The Graduation Album Glee

4 : Time of Your Life (Good Riddance) Green Day  Time of Your Life Green Day

5 : Good Riddance (Time of Your Life) Green Day  Brain Stew Green Day

6 : Good Riddance (Time of You Life) Green Day  Hi-End Ultra X-Treme Green Day

7 : Good Riddance (Time of Your Life) James Durbin  American Idol Season 10 Highlights James Durbin

8 : Good Riddance (Time of Your Life) Steve Lieberman the Gangsta Rabbi  Jewish Pirate Steve Lieberman the Gangsta Rabbi

9 : Time of Your Life (Good Riddance) Honeywagon  Green Day Blue Grass: Pickin' on Green Day a Bluegrass Tribute Various Artists

10 : Good Riddance Andrew Benton  Softly Andrew Benton

11 : Good Riddance (Time of Your Life) The Superstarz Kids!  Boyz Rock! The Superstarz Kids!

12 : Good Riddance (Time of Your Life) Ice Nine Kills  Punk Goes 90's, Vol. 2 Various Artists

13 : Breakaway Diffuser  Making the Grade Diffuser

14 : My Fork in the Road (Your Knife in My Back) Atreyu  A Death-Grip on Yesterday Atreyu

15 : A Thousand Years Sting  Brand New Day Sting

16 : Love is the Groove Cher  Believe Cher

17 : Everyday I Die Insane Clown Posse  Hell's Pit, Pt. 1 Insane Clown Posse

18 : The Park Mustard Plug  Yellow #5 Mustard Plug

19 : Ain't No Thang OutKast  Southernplayalisticadillacmuzik OutKast

20 : Never The Roots PAttYCraSH  ...And Then You Shoot Your Cousin The Roots

21 : Exile on Princes Street [#] Marillion  Clutching at Straws [UK Bonus CD] Marillion

22 : A Thousand Years Sting  Red Planet Graeme Revell

23 : Posse On Verner Insane Clown Posse  Forgotten Freshness, Vol. 3 Insane Clown Posse

24 : Renegade Jay-Z Eminem  The Blueprint [Clean Bonus Tracks] Jay-Z

select the position in the list to be downloaded

1

********************************************************
     Lyrics of Good Riddance (Time of Your Life) :
********************************************************
Another turning point, a fork stuck in the road
Time grabs you by the wrist, directs you where to go
So make the best of this test, and don't ask why
It's not a question, but a lesson learned in time
It's something unpredictable, but in the end it's right
I hope you had the time of your life

So take the photographs, and still-frames in your mind
Hang it on the shelf of good health and good time
Tattoo's of memories and dead skin on trial
For what it's worth, it was worth all the while
It's something unpredictable, but in the end it's right
I hope you had the time of your life

It's something unpredictable, but in the end is right
I hope you had the time of your life
It's something unpredictable, but in the end is right
I hope you had the time of your life

```

Here is a snapshot of the program
[id]: https://github.com/aup8497/Instant-Song-Downloader-with-lyrics/blob/master/screenshot1.png
![alt text][id]

[id]: https://github.com/aup8497/Instant-Song-Downloader-with-lyrics/blob/master/screenshot2.png
![alt text][id]

##The MIT LICENSE

>MIT License

>Copyright (c) 2017 Akshay U Prabhu

>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.

>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


text:
### CA2153: Do not catch corrupted state exceptions in general handlers. ###

Do not author general catch handlers in code that receives corrupted state exceptions. Code that receives and intends to handle corrupted state exceptions should author distinct handlers for each exception type.

Category: Microsoft.Security

Severity: Warning

repository: baharedankoyuncu/roslyn-analyzers

repo_name: baharedankoyuncu/roslyn-analyzers


text:
CryptoProj
==========

Team: 32 (The Muffin Men)
Name: Anthony Chiang, Eric Edmond, Steven Louie
Uniqname: aycc, eedmond, slouie
Implementation of SPECK for EECS 475 Final Project @ UofM

Run with one of the following options
Note that all arguments should be in base-16 format

./speck_cipher keygen
./speck_cipher encrypt keyword1 keyword0 plaintext1 plaintext0
./speck_cipher decrypt keyword1 keyword0 ciphertext1 ciphertext0

Output from each of the three options:
keygen  -> keyword1 keyword0
encrypt -> ciphertext1 ciphertext0
decrypt -> plaintext1 plaintext0

Example with output:
Input
./speck_cipher encrypt 0f0e0d0c0b0a0908<PHONE_NUMBER>020100 6c61766975716520<PHONE_NUMBER>616d20

Output
a65d985179783265 7860fedf5c570d18

Many examples can be found in 'test.cpp'.
Type make to compile.

Contact info:
<EMAIL_ADDRESS>
<EMAIL_ADDRESS>
<EMAIL_ADDRESS>


text:
# MLog
##### Custom log output. Contain file, function, line and time.

---

## Cocoapods

### 1. Add the following line to your Podfile:

```
platform :ios, '9.0'

target 'YourIosApps' do

  use_frameworks!

  pod 'MLog', '~> 1.1.0'

end
```

### 2. Then, run the following command:

```
$ pod install
```

## Carthage

### 1、run the following command:
```
$ touch Cartfile
```

### 2、Add the following line to your Cartfile:

```
github "MZC0829/MLog"
```

### 3、run the following command:

```
$ carthage update
```

## Requirements
>
- iOS 9.0+
- swift 3+ and swift 4

## Usage

### - just like

```
MLog("I am a MLog")
```

### - output

```
***** log start *****
2017-11-21 20:57:57
fileName: ViewController.swift -> line: 18 -> func: viewDidLoad()
I am a MLog
*****  log end  *****
```


text:
# Cloud-Blockchain-Fusion-Framework
Implementing the framework from our paper: "CBFF: A Cloud-Blockchain Fusion Framework Ensuring Data Accountability for Multi-cloud Environments"

In this paper, we propose a Cloud-Blockchain Fusion Framework (CBFF) to relieve the “data island” between multiple clouds. CBFF improves the security of cloud data by designing the cooperation between clouds and blockchain. It designs a unified data Naming and Addressing Mechanism to publish and locate cloud data globally in a multi-cloud environment. Also, it proposes the Operation Tracing Mechanism to achieve reliable operation logging and tracing. With CBFF, we present a prototype implementation system using Hyperledger Fabric blockchain and Alibaba Cloud Computing. Our system could provide secure data uploading, sharing, and updating among multiple clouds.

## Requirements

  Hyperledger Fabric v1.4.4(https://github.com/hyperledger/fabric/tree/v1.4.4)

  Fabric Samples v1.4.4(https://github.com/hyperledger/fabric-samples/tree/v1.4.4)

## Install

 - Put folder "cbfm" into ./fabric-samples
 - Put folder "chaincode" into ./fabric-samples
 - cd ./fabric-samples/cbfm
 - Run the script startFabric.sh to start blockchain network, install smart contract, and instantiate smart contract
 - cd ./ca
 - Run the script compileCA.sh to compile CA program. Run the script runCA.sh to start the CA program.
 - cd ../cloud
 - Run the script compileCloud.sh to compile Cloud program. Run the script runCloud.sh to start the Cloud program.
 - cd ../client
 - Run the script compileClient.sh to compile Client program. Run the script runClient.sh to start the Client program.


text:
# Note Taker
I have created a web application which uses the HTML,CSS,BOOTSTRAP,JAVASCRIPT, NODE>JS AND EXPRESS.JS. This web application works as a notes application. All inputs are saved and returned after the web has been closed. The use of back-end storage with EXPRESS.JS

[User Story](#User-Story)

[Installation](#installation)

[Project Screenshots](#Project-Screenshots)

[License](#license)

## User Story
As a developer,
I wanted to create a web application which will make it easy for me to save notes and not lose the saved notes that i can refer back to.
So, that I'm able to refer to notes easier

## Installation

1. npm i (this will install all the required npms)
2. npm express (This will install the express module)

## Project Screenshot
![Screentshot 1](./screenshots/screenshot1.JPG)

![Screentshot 2](./screenshots/screenshot2.JPG)

![Screentshot 3](./screenshots/screenshot3.JPG)

![Screentshot 4](./screenshots/screenshot4.JPG)

![Screentshot 5](./screenshots/screenshot5.JPG)

![Screentshot 6](./screenshots/screenshot6.JPG)

![Screentshot 7](./screenshots/screenshot7.JPG)

## License

You can refer to the licenses used in this project in the license.md file [here](license.md)

### Author

Aman Kumar

Email<EMAIL_ADDRESS>


text:
# Simple Node

## 1. General
This section will teach you how to install the current Node.js version, how to use the awesome package manager, and what tools to use for code management, deployment, etc.

#### Installation
First thing's first - let's install the last stable Node.js version. The best way to ensure you get the most current release if you are running OSX or Linux is to download the binary from the official website and manually install it. However, using a package manager is much easier and will also do the job.

#### Windows
Download and run the official windows installer available on [nodejs.org](https://nodejs.org/en/#download).

#### OSX
There are 3 ways to install Node on OSX. You can use a package manager like this:

    brew install node
  or

    port install nodejs

You can also download the installer from the [official site](https://nodejs.org/en/#download).

#### Linux (Debian & Ubuntu)
I wouldn't recommend using your distro's official package manager to install node, because the available package will most likely be really old. Here's how to to do it properly:

      curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
    sudo apt-get install --yes nodejs

You also need to link the installed files to the node binary, so you can use **node** from the command line.

    sudo ln -s /usr/bin/nodejs /usr/bin/node

---
No matter what OS you're running, verify that everything runs as it should after the installation. Simply do:

    node -v

and you should see the installed Node.js version.

## 2. Tools
---
  npm, bower, installing packages, .gitignore setup

2. Code Organization

  2.1 Directory Structure

    research different structures

  2.2 Modules

  what is module.exports?

  what kind of module exports patterns are there

3. Functions

  3.1 Scope and Asynchronious Operations

  types of scope in JS, how arguments are passed, caching this, ES6 arrow functions

  3.2 Error Handling

  types of errors according to Joyent's Guide

4. Classes

  4.1 Patterns

    prototypal inheritance and es6


text:
# Air Handling Units (AHU)

## Type Definition
Air handling units are common air-side devices which provide conditioning and ventilation to a space or group of spaces. It must handle outside air directly in order to be considered part of this class. Common terms for AHUs include air conditioning units (AC, ACU, etc.) and rooftop units (RTU); note that the location and other specifics of the device (e.g. using DX cooling instead of chilled water) are not considered relevant to whether a device qualifies as an AHU.

## Type Requirements
- It *must* have a fan.
- It *must* condition the air in some way.
- It *must* handle outside air directly.
- It *must* handle return air from the space.

## Example: Single Zone AHUs
This version of AHU serves an individual zone as a stand-alone device.

### BMS Example
![AHU Single Zone](./figures/bms_screenshots/ahu_single_zone.png)

### System Diagram and Connections
![AHU Single Zone](./figures/system_diagrams/ahu_single_zone.png)

### Sample Building Config
```yaml
BLDG-1:
  type: FACILITIES/BUILDING

ZONE-1:
  connections:
    BLDG-1: CONTAINS
    AHU-1: FEEDS
  type: FACILITIES/ZONE

AHU-1:
  cloud_device_id: 1234
  connections:
    BLDG-1: CONTAINS
  type: HVAC/AHU_DFSS_...
  translation:
    compressor_run_command:
      present_value: points.comp_cmd.present_value
      units:
        key: pointset.points.comp_cmd.units
        values:
          percent: '%'
    discharge_air_temperature_sensor:
      present_value: points.supply_air_temperature_sensor.present_value
      units:
        key: pointset.points.supply_air_temperature_sensor.units
        values:
          degrees_celsius: degC
    ...

```

## Example: Multi-Zone AHUs
This version of AHU serves a group of zones through downstream terminal units (VAVs).

VAV-1:
  cloud_device_id: 2345
  connections:
    AHU-1: FEEDS
    BLDG-1: CONTAINS
  type: HVAC/VAV_SD_DSP_...
  translation:
    supply_air_damper_percentage_command:
      present_value: points.air_valve_percentage_command.present_value
      units:
        key: pointset.points.air_valve_percentage_command.units
        values:
          percent: '%'
    zone_air_temperature_sensor:
      present_value: points.zn_air_temperature_sensor.present_value
      units:
        key: pointset.points.zn_air_temperature_sensor.units
        values:
          degrees_celsius: degC
    ...

```

## Example: AHU As Part Of Dual Duct System
This version of AHU serves a group of zones through downstream terminal units (VAVs), and those terminal units are also served by duct furnaces (central air-side heating devices which provide heating via a second set of ductwork known commonly as the 'hot deck').

DFR-1:
  cloud_device_id: 2345
  connections:
    BLDG-1: CONTAINS
  type: HVAC/DFR_SFSS_...
  translation:
    heating_water_valve_percentage_command:
      present_value: points.htg_valve_percentage_command.present_value
      units:
        key: pointset.points.htg_valve_percentage_command.units
        values:
          percent: '%'
    supply_air_temperature_sensor:
      present_value: points.supply_air_temperature_sensor.present_value
      units:
        key: pointset.points.supply_air_temperature_sensor.units
        values:
          degrees_celsius: degC
    ...

VAV-1:
  cloud_device_id: 3456
  connections:
    BLDG-1: CONTAINS
    AHU-1: FEEDS
    DFR-1: FEEDS
  type: HVAC/VAV_SD_DSP_...
  translation:
    supply_air_damper_percentage_command:
      present_value: points.air_valve_percentage_command.present_value
      units:
        key: pointset.points.air_valve_percentage_command.units
        values:
          percent: '%'
    zone_air_temperature_sensor:
      present_value: points.zn_air_temperature_sensor.present_value
      units:
        key: pointset.points.zn_air_temperature_sensor.units
        values:
          degrees_celsius: degC
    ...

```

## Optional And Future Extensions
This section contains some additional features and extensions that could be added in the future.
- While hydronic systems tie equipment together via an explicitly defined entity (the system itself), there is no such concept in the ontology for air-side systems, at least today. This could be added to help describe convoluted systems.
- Risers do exist in the ontology but are utilized only when data exists specifically for that riser (necessitating the entity) or when the system is convoluted enough to justify it. It is best to omit this type of addition, excepting circumstances where it is absolutely necessary.

**Note:** All BMS screenshots taken from Google's WebCTRL instances. WebCTRL is a building automation system owned by Automated Logic.

repository: google/digitalbuildings

gha_language: Python

repo_name: google/digitalbuildings


text:
# HTTP Server

[![Docker Pulls](https://img.shields.io/docker/pulls/patrickdappollonio/docker-http-server?style=flat-square&color=607D8B&label=docker%20pulls&logo=docker)](https://hub.docker.com/r/patrickdappollonio/docker-http-server)
[![GitHub Stars](https://img.shields.io/github/stars/patrickdappollonio/http-server?style=flat-square&color=607D8B&label=github%20stars&logo=github)](https://github.com//patrickdappollonio/http-server)
[![Compose Templates](https://img.shields.io/static/v1?style=flat-square&color=607D8B&label=compose&message=templates)](https://github.com/GhostWriters/DockSTARTer/tree/master/compose/.apps/httpserver)

## Description

[http-server](https://github.com/patrickdappollonio/http-server) is a simple binary to provide a static http server from a given folder.

## Install/Setup

The variable `HTTPSERVER_FILE_SERVER_COLOR_SET` can be modified to use any of the colors listed on [here](https://getmdl.io/customize/index.html).

Whenever you select a color combination, you will get a link at the bottom of the page. The link will include the color towards the end of the link:

> `<link rel="stylesheet" href="https://code.getmdl.io/1.3.0/material.indigo-pink.min.css" />`

What you care about is the bit that says `indigo-red` or `indigo-pink`. That's the color you will set in variable and run the following command to apply any changes:

```bash
ds -c up httpserver
```

repository: GhostWriters/DockSTARTer

gha_language: Shell

repo_name: GhostWriters/DockSTARTer


text:
# Overview

MicroBullet is a simple command line journal for note taking; it's mostly a playground for me to play with Go a bit, so the code
is currently *atrocious*. I want to make it simple to keep a daily journal for myself that can easily be placed on the web, so
currently it uses the file system as a daily note & task storage. Eventually, I'll probably use a simple database and then "export"
to the file system.

**WARNING** the code is a mess. I'm just playing around a bit, and know I need to clean things up.

# Usage

- `note` (or `n`): add a note, either to the current directory's `.mubu` repo, or your user's homedir

license: ISC

repository: lojikil/microbullet

repo_name: lojikil/microbullet


text:
---
title: Asset minification
description: Hugo Pipes allows the minification of any CSS, JS, JSON, HTML, SVG or XML resource.
date: 2018-07-14
publishdate: 2018-07-14
lastmod: 2018-07-14
categories: [asset management]
keywords: []
menu:
  docs:
    parent: "pipes"
    weight: 50
weight: 50
sections_weight: 50
draft: false
---

Any resource of the aforementioned types can be minified using `resources.Minify` which takes for argument the resource object.

```go-html-template
{{ $css := resources.Get "css/main.css" }}
{{ $style := $css | resources.Minify }}
```

Note that you can also minify the final HTML output to `/public` by running `hugo --minify`.

repository: graemephi/kahugo

branch_name: refs/heads/kahugo

gha_language: Go

repo_name: graemephi/kahugo