text:
# foodmap
foodmap is a basic web app used by a few food banks in Washington state to determine client eligibility  based on geographical boundaries.

Live demo available at https://monixlabs.com/foodmap.

### Food Map in action
![foodmap in action](_media/foodmap1.png?raw=true "food map in action")

### Food bank selection screen
![foodmap selection screen](_media/foodmap2.png?raw=true "food bank selection menu")

There are many ways to get GeoJSON representations of anything you could need (cities, school districts, etc.) for free. One of the easiest methods is to use Nominatim to get the data via OpenStreetMap.
e.g: https://nominatim.openstreetmap.org/search.php?q=Bonney+Lake+Wa&polygon_geojson=1&format=json

repository: lukeknowles/foodmap

repo_name: lukeknowles/foodmap


text:
# DeFI-corp
working on  implementing real life applciations of present DeFI protocol using the web3 and present open  source projects .  here  me and Bertrand will work on  putting together the ideas in our discussion and then implement basic MVP's for each of them.

Proposal and some insights that we got from our meeting on  10th april.

 **Creating the future of DLT  based  sustainable enterprises. and participating in hackathons**

**AIM**

- [ ]  to agree on the  implementation of some  structured way of  getting into  DLT  software creation  company ( either as consultants /  project implementation).
    - [ ]  Website creation ( i have some good single page tamplates that we can implement)
    - [ ]  medium blog post of the ideas
    - [ ]  creating a cloud account and  "hack our way out for creating practical  web3.0 organisations".
- [ ]  working on the following hackathons / organisations :
    - [ ]  Gitcoin : taking initially simple gigs and getting reputation score .
    - [ ]  [Blockchain  Hackathon lists](https://gitcoin.co/hackathon-list)
    - [ ]  another prominent community :  [ethglobal](https://www.ethglobal.co/) . [https://defirate.com/](https://defirate.com/) .
    - [ ]  and then  comparing our solutions  / giving our views on  the current financial  news  ( Bloomberg / economic .
- [ ]  And after enough experience and getting committed remote team for  working on the  real adoption with the current finance ,  and even unlocking 0.5% of trillion dollar market will be reserving  vast amount of the  :  [https://www.stateofcrypto.report/](https://www.stateofcrypto.report/) .

## Introduction:

this happened on 10th april , discussing the possiblity of having a part-time collaboration on  making fintech projects  more focused on financial inclusion and creating SaaS on  following  possible themes :

1. Financial inclusion: Seeing the current financial infrastructure being  very questionable when coming in terms of disbursing the aid and  maintaining low transfer costs in the global forex is still taking time to realise ( specially for  third world countries ) thus  the company able to connect the  mall business owners and merchants ( being the bulk of manufacturing and other non metropole job holders )  to line of credits during the crisis and also for creating new oppertunities / jobs   will be the only way to get the higher taxing nations economy back on track . the main focus on keeping the compliance with the banks and companies as close as possible . this includes
    - thus we will be having the middleware which will connect the bank accounts of enterprises ,  using PSD2 api providers  ( plaid ) which then can be connected to the respective  crypto exchanges ( with the easy mitigation of tax compliance , KYC and other steps to be done automatically). following link gives the example of integration :

        [Plaid Demo | Plaid](https://plaid.com/demo/?mkt_tok=eyJpIjoiTlRabVl6QTVZemxoWkRneSIsInQiOiJcL3RsbTZYSlwvVXlCK2Rpb1Z4cVltZm5DT3hPKzVWeFZiS2gxWXlVRG5BRDR6RTVcL09VWTZsVFQ2dFo4b2RyRFRReHpLdmVlakdNeGZXdEJYUHV1VW5FMFhZcEFhWGdtOFcxaUE2TUZEWVl3Zm1cL01WUmRQSXdTWHMxaEpKWVNGUnkifQ%3D%3D&countryCode=FR&language=en&product=transactions)

    - then after getting currency , the virtual secure wallet can be connected to the diffrent pools of the DeFI 2nd layer protocols ( AAVE , compound , dYdX and dharma currently for their  compliance ,  then the investments can be routed  back to the fiat  in bulk transactions.

thus our main intrest is either : gathering

1. My queries : - working on finalising the base of the architecture :
    - for automated swaps and getting them  integrated directly with bank account can also be done via [ramp.network](http://ramp.network) . this will be instant and  less fees ( but for more compliance , plaid is more suitable ).
    - For secure wallet : portis account to be created  for creating the  wallets ( or ledger for more security ) also creating the parallel interface of money and crypto assets for the people to be more accostmed to the robinhood app kind of investment of money : [https://github.com/robinhood](https://github.com/robinhood).

- My own thoughts : for more ambtious thoughts in  trading markets in US forex or other ETF's , using ISDA CDM models to create complex futures and other contracts can be a possiblity if our present solution works .

- [refrences for the defi protocols](https://www.notion.so/DeFi-Onboarding-Guide-a0713cfe5d844ff28bc829006625b118) :

3. [Nuo Crypto trading service](https://www.nuo.network/) : this is somewhat our competitior bt we have much bigger sights , our main focus is the inclusion of the middle class and other  business to take care of their loans and other insurances .

4. some awesome links for blog s for implementation  of our solution :

- [https://defirate.com/gitcoin-round-5-defi-picks/](https://defirate.com/gitcoin-round-5-defi-picks/).

5.  Some other  famous people  working in writing some good quality blogs and ETH #BUILDL

- [Vaibhav saini](https://vaibhavsaini.textile.cafe/) : an 22 yrs guy being  one of the most well known names in developing layer-1/2 solutions on the ethereum

**6 .**    Some innovative ideas  being pursued in the hackathons for creating synthetic assets to understand the architecture of the systems : Synthetix ,  DeFISilver  , Blazar  and DefiZAP protocol.

on 10th may : the main projects being considered for the work to be progressed : aave risk framework , fuse.io  , rcmpi-wallet for creating an local economics for unbanked .

## Consensus distributed : 2  important  connections
### 1. Ms Devorah from Kisspatent :

- [ ] her requirements : making automation in patent registeration and compliance for the given contract on blockchain for  scalablity and transparency  in managing the full stack of the  product rather than hiring the lawyers to maintain the paperwork and just having direct access to notaire for final dispute resolution ( that can also be proposed to work with the aragon courts).

- [ ] also recommending the complete end to end consistent book-keeping of the startups ( fullstack info , and implementing devops on other business management operations into a single consistent wiki using RPA and dlt to maintain the consistent hierarchy and consistency of the workking  of the org to be actual data-driven decisions.

### 2. Ms Beatrice from crypto-trading firm :
    - [ ] needs their telegram manuall based trading to be  automated
            1.1 intresting : even we cna work on using this application  api ( having both privacy compliance and access to immense requests , we cna implement front end in react and add the backen d to select the intresitng aspects , thus there must be

## 4th july:

trying to work on th deFI integration  with SI of wef along with 3D printing investments.

repository: EthereumGeeks/DeFI-corp

branch_name: refs/heads/master

extension: md

license_type: permissive

repo_name: EthereumGeeks/DeFI-corp


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

### Description

Tenda W6-S v<IP_ADDRESS>(510) was discovered to contain a command injection vulnerability in the tpi_get_ping_output function at /goform/exeCommand.

### POC

#### Reference
- https://github.com/z1r00/IOT_Vul/blob/main/Tenda/W6-S/exeCommand/readme.md

#### Github
- https://github.com/ARPSyndicate/cvemon
- https://github.com/z1r00/IOT_Vul

license: MIT

repository: trickest/cve

branch_name: refs/heads/main

gha_language: HTML

gha_license_id: MIT

repo_name: trickest/cve


text:
File Manager (Storage)
======================

A simple Android File Manager (Storage) to create, read, delete, append, encrypt files and more, on internal or external storage spaces.

### Options
* [Easy define Internal or External storage](#initialize)
* [Create directory](#create-directory)
* [Create file](#create-file)
* [Read file content](#read-file)
* [Append content to file](#append-content-to-file)
* [Copy](#copy)
* [Move](#move)
* [Delete directory](#delete-directory)
* [Delete file](#delete-file)
* [Get files](#get-files)
* [More options](#more)
* [Encrypt the file content](#security-configuration)

### Check Directory of File ...

* Is directory exists
	``` java
	boolean dirExists = storage.isDirectoryExists(path);
	```

* Is file exists
	``` java
	boolean fileExists = storage.isFileExist(path);
	```

### Security configuration
You can write and read files while the content is **encrypted**. It means, that no one can read the data of your files from external or internal storage.

You will continue using the same api as before. The only thing you need to do is to configure the Simple Storage library before the you want to create/read encrypted data.

### Security on Java (set encryption)

String IVX = "abcdefghijklmnop"; // 16 lenght - not secret

String SECRET_KEY = "secret1234567890"; // 16 lenght - secret

byte[] SALT = "0000111100001111".getBytes(); // random 16 bytes array


text:
# highly-organized-css
How to write highly organized css

## Usage

Install the node packages

```bash
npm install
```

Start the server

```
fly watch
```

Then go to one of the urls that is output in the console.

To list out file paths like they're in this presentation install a utility called [`tree`](http://mama.indstate.edu/users/ice/tree/) the easiest way to install it is through `brew install tree`.

```bash
tree --dirsfirst -FL 1 [path to the folder]
```

gha_language: JavaScript


text:
## How to run the examples?

The simplest solution is to install Jupyter with Conda as described in the Jupyter [docs][1].

[1]: http://jupyter.readthedocs.io/en/latest/install.html#installing-jupyter-using-anaconda-and-conda

repository: wikp/peaches

repo_name: wikp/peaches


text:
# LLUI
LuaJIT Linux User Interface (LLUI, pronounced 'You Eye')

This repository is a conglomeration of several projects related to UI on Linux.
The intention is that with a single project, you could create anything from a framebuffer direct kiosk app, to a nicely behaved
windowing app that leverages OpenGL.

Included Modules
* libdrm - low level graphics card interaction
* libevdev - low level event handling
* libudev - low level device discovery
* libpixman - low level pixel rendering
* lz4 - for very tight compression

In some cases, you will need to install a package on your given platform.  For example, in order to user libevdev, on Ubuntu, you need to do $apt-get install libevdev.  Check your distribution to determine which items need to be installed.  Over time, if some of these get replaced with direct ioctl calls, or Lua implementations, this need will diminish.

There is also partial support for
* libc - ffi.cdef wrappers for most used routines

And thrown in for ease of programming
* fun - functional programming module
* kernel - lightweight cooperative multi-tasking

repository: katka-juhasova/BP-data

repo_name: katka-juhasova/BP-data


text:
# contwidgetor-ui
<img width="923" alt="screen shot 2015-11-29 at 10 56 38 am" src="https://cloud.githubusercontent.com/assets/1088099/11459292/2b15ccce-9688-11e5-9c38-f42afb2a84a5.png">

### Still in development

## What is it?
A simple React component to display a grid showing your open-source contributions a la github

## API
Calling ```require('contwidgetor-ui');``` makes two components available.

```<NoContributionsGrid />``` does not take any props and will just render a simple text.
```<ContributionsGrid contributions={...}/>``` where contributions is a JSON object.

The JSON object has items of this form:```"2015-11-28": 4```.
The key is a date and the value being the number of contributions for this date.

## Example
There is a working example in the ```Example``` folder.
To run it:

```
cd Example
npm install
webpack
open index.html
```


text:
---
scapolite:
    class: group
    version: '0.51'
id: certified-vendor
id_namespace: org.ssgproject.RHEL-8
title: Operating System Vendor Support and Certification
description: <see below>
contents:
  - class: rule_ref
    idref: installed_OS_is_FIPS_certified
    idref_namespace: org.ssgproject.RHEL-8
    ref_comment: The Installed Operating System Is FIPS 140-2 Certified
  - class: rule_ref
    idref: installed_OS_is_vendor_supported
    idref_namespace: org.ssgproject.RHEL-8
    ref_comment: The Installed Operating System Is Vendor Supported
---

## /description

The
assurance of a vendor to provide operating system support and
maintenance for their product is an important criterion to ensure
product stability and security over the life of the product. A certified
product that follows the necessary standards and government
certification requirements guarantees that known software
vulnerabilities will be remediated, and proper guidance for protecting
and securing the operating system will be given.


text:
# /warn warning "waves"

The C# compiler flag `/warn` controls optional warnings.
When we introduce new warnings that can be reported on existing code,
we do so under an opt-in system so that programmers do not see new warnings
without taking action to enable them.
For that purpose, we have the compiler flag "`/warn:n`"
where `n` is a whole number.

The default warning level when the command-line compiler is used is `4`. If you want the compiler to produce all applicable warnings, you can specify `/warn:9999`.

In a typical project, this setting is controlled by the `AnalysisLevel` property,
which determines the `WarningLevel` property (passed to the `Csc` task).
For more information on `AnalysisLevel`, see https://devblogs.microsoft.com/dotnet/automatically-find-latent-bugs-in-your-code-with-net-5/

## Warning level 8

The compiler shipped with .NET 8 (the C# 12 compiler) contains the following warnings which are reported only under `/warn:8` or higher.

| Warning ID | Description |
|------------|-------------|
| CS9123 | [Taking address of local or parameter in async method can create a GC hole](https://github.com/dotnet/roslyn/issues/63100) |

## Warning level 7

The compiler shipped with .NET 7 (the C# 11 compiler) contains the following warnings which are reported only under `/warn:7` or higher.

| Warning ID | Description |
|------------|-------------|
| CS8981 | [Type names only containing lower-cased ascii characters may become reserved for the language](https://github.com/dotnet/roslyn/issues/56653) |

## Warning level 6

The compiler shipped with .NET 6 (the C# 10 compiler) contains the following warnings which are reported only under `/warn:6` or higher.

| Warning ID | Description |
|------------|-------------|
| CS8826 | [Partial method declarations have signature differences](https://github.com/dotnet/roslyn/issues/47838) |

## Warning level 5

The compiler shipped with .NET 5 (the C# 9 compiler) contains the following warnings which are reported only under `/warn:5` or higher.

| Warning ID | Description |
|------------|-------------|
| CS7023 | [A static type is used in an 'is' or 'as' expression](https://github.com/dotnet/roslyn/issues/30198) |
| CS8073 | [Expression always true (or false) when comparing a struct to null](https://github.com/dotnet/roslyn/issues/45744) |
| CS8848 | [Diagnose precedence error with query expression](https://github.com/dotnet/roslyn/issues/30231) |
| CS8880 | [Struct constructor does not assign auto property (imported struct type with private fields)](https://github.com/dotnet/roslyn/issues/30194) |
| CS8881 | [Struct constructor does not assign field (imported struct type with private fields)](https://github.com/dotnet/roslyn/issues/30194) |
| CS8882 | [Out parameter not assigned (imported struct type with private fields)](https://github.com/dotnet/roslyn/issues/30194) |
| CS8883 | [Auto-property used before assigned in struct constructor (imported struct type with private fields)](https://github.com/dotnet/roslyn/issues/30194) |
| CS8884 | [Field used before assigned in struct constructor (imported struct type with private fields)](https://github.com/dotnet/roslyn/issues/30194) |
| CS8885 | [Struct constructor reads 'this' before assigning all fields (imported struct type with private fields)](https://github.com/dotnet/roslyn/issues/30194) |
| CS8886 | [Out parameter used before being assigned (imported struct type with private fields)](https://github.com/dotnet/roslyn/issues/30194) |
| CS8887 | [Local variable used before being assigned (imported struct type with private fields)](https://github.com/dotnet/roslyn/issues/30194) |
| CS8892 | [Multiple entry points](https://github.com/dotnet/roslyn/issues/46831) |
| CS8897 | [Static class used as the parameter type of a method in an interface type](https://github.com/dotnet/roslyn/issues/38256) |
| CS8898 | [Static class used as the return type of a method in an interface type](https://github.com/dotnet/roslyn/issues/38256) |

repository: dotnet/roslyn

filename: Warnversion Warning Waves.md

gha_language: C#

repo_name: dotnet/roslyn


text:
# self.allowed()

```python
allowed(url)
```

Returns whether the specified site allows for parsing of the passed site based on the sites `robots.txt` file

If `self.check` is `False` the `allowed()` function will always return true

It is reccommended that you keep `self.check` to `True` so you dont get banned/blocked for exceeding rate limits

repository: dosisod/EZWS

gha_language: Python

repo_name: dosisod/EZWS


text:
# Textile Build

## Everything you need to know to start building for the decentralized web

### [Signup now](https://build.textile.io)!

### What will I learn?

* The fundamentals of the decentralized web, including concepts such as content addressing, distributed data structures, peer-to-peer communication, etc
* A deep understanding of the Interplanetary File System's (IPFS) core components, including the core protocols, conventions, and libraries use to access IPFS
* How to develop a distributed application (Đapp), all the way from creating a blank project to deploying it online
* The technical skills needed to interact with decentralized data storage and access, including a specific understanding of adding, pinning, and accessing data on IPFS
* How to combine the right tools to put together a consistent and real world pragmatic Node development environment
* How to deploy a decentralized app to the Interplanetary File System, making it available to the wider public

### Description

Interest in the decentralized web has reached a fever pitch. And with increased concerns over consumer privacy, access, and new regulatory actions, organizations are exploring decentralized applications as a viable development process. But what does it mean to decentralize storage, services, or processes? What tools and/or concepts do we need to be aware of in order to be ready for this brave new world? This course will provide answers to these questions by providing a complete introduction to decentralized application (Đapp) development on the Interplanetary File System (IPFS). By the end of this course, you will have a working understanding of the decentralized web in general, and the specific tools and technologies needed to interact with IPFS more specifically.

### Who is the target audience?

Anybody with a little bit of backend and/or frontend software development - a seasoned developer with an interest in learning about the decentralized web, or a total beginner looking to develop new skills in an exciting area of web-development.

### Requirements

* You should already have developed a couple of software applications, backend, frontend or both
* You need a Mac, Linux or Windows 10 machine to develop the sample application
* You should also be comfortable working on the command-line
* A basic understanding of a programming language like Javascript is definitely a plus 👍

### Course Schedule

| Date           | Topic                                                                                | Skills                                                  |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------- |
| Tues July 31st | **Introduction to the Decentralized Web:** What is content addressing, shared storage, key differences from legacy systems          | Setup: Installing and using IPFS, and development setup |
| Thur Aug 2nd   | **Exploring the Interplanetary File System:** A deep dive into IPFS and the protocol layers that drive it                           | Data access: Accessing IPFS from a browser      |
| Tues Aug 7th   | **Developing a Basic Distributed Application (Đapp):** From an empty project to a working prototype in less than an hour            | Data storage: Adding content from a browser             |
| Thur Aug 9th   | **Adding Complexity by Deploying an Interactive Đapp:** Extending our prototype Đapp and deploying it ‘live’ on the distributed web | Interaction: Adding peer-to-peer communications         |
| Tues Aug 14th  | **Round-up and Final Discussion:** Finishing touches to our Đapp, group discussion, and next steps                                  | Next steps: Fine-tuning your IPFS setup and Đapps       |

## Signup

Signup now at https://build.textile.io


text:
# OTX Pulse explort

Small script that exports IOCs from your AlienVault OTX subscription to csv and stdout.

Edit the api_key in the script with the api key from your OTX account (https://otx.alienvault.com/api) before running.

## Dependencies
Unidecode is the only non-standard dependency at this time:

```pip install unidecode```

## Usage

### Linux:
`python otx_feed.py [output.csv]`

### Windows:
```C:\Python27\python.exe .\otx_feed.py [output.csv]```

repository: SharronQuadros/OTX-pulse-export

repo_name: SharronQuadros/OTX-pulse-export


text:
# MnemonicSwift

An implementation of BIP39 in Swift. MnemonicSwift supports both English and Chinese mnemonics.

This library is a fork of [MnemonicKit](https://github.com/keefertaylor/MnemonicKit). This fork provides provides support for BIP39 using CryptoKit.

## Installation

### CocoaPods
MnemonicSwift supports installation via CocoaPods. You can depened on MnemonicKit by adding the following to your Podfile:

```
pod "MnemonicSwift"
```

#### Carthage

If you use [Carthage](https://github.com/Carthage/Carthage) to manage your dependencies, simply add
MnemonicKit to your `Cartfile`:

```
github "zcash-hackworks/MnemonicSwift"
```

## Usage

### Generate a Mnemonic

```swift
  let englishMnemonic = Mnemonic.generateMnemonic(strength: 64, language: .english)
  let chineseMnemonic = Mnemonic.generateMnemonic(strength: 128, language: .chinese)
```

### Generate a Mnemonic from a Hex Representation

```swift
  let hexRepresentation: String = ...
  let mnemonic = Mnemonic.mnemonicString(from: hexRepresentation)
  print("Mnemonic: \(mnemonic)\nFrom hex string: \(hexRepresentation)")
```

### Generate a Seed String

```swift
  let englishMnemonic = Mnemonic.generateMnemonic(strength: 64, language: .english)
  let passphrase: String = ...
  let deterministicSeedString = Mnemonic.deterministicSeedString(from: mnemonicString,
                                                                 passphrase: passphrase,
                                                                 language: .english)
  print("Deterministic Seed String: \(deterministicSeedString)")
```

## Contributions

To get set up:
```shell
$ brew install xcodegen # if you don't already have it
$ xcodegen generate # Generate an XCode project from Project.yml
$ open MnemonicKit.xcodeproj
```

## License

MIT

repository: pacu/MnemonicKit

gha_language: Swift

repo_name: pacu/MnemonicKit


text:
# CMake Integration

- [CMake Integration](#cmake-integration)
  - [How to configure the spglib library](#how-to-configure-the-spglib-library)
  - [CMake Options](#cmake-options)
  - [How to link spglib C library to your project](#how-to-link-spglib-c-library-to-your-project)
    - [Linking against locally installed spglib](#linking-against-locally-installed-spglib)
    - [Downloading and using specific versions](#downloading-and-using-specific-versions)

## How to configure the spglib library

The configuration is done by passing cmake options and environment variables at the
configuration stage, i.e.:

```console
$ cmake . -B build  ${CMAKE_OPTIONS}
```

Replace the variable `CMAKE_OPTIONS` with appropriate built-in CMake options, e.g.
`-DCMAKE_C_COMPILER=gcc`, and Spglib specific options. For a list of useful options
check [CMake Options](#cmake-options).

## CMake Options

All spglib specific options are prefixed with `SPGLIB_` in order to avoid clashes
and allow the project to be included via `FetchContent`.
Keep in mind that in order to pass cmake options they have to be prefixed with `-D`,
e.g. `-DSPGLIB_WITH_Fortran=ON`.

| Option                   |               Default               | Description                                                                        |
| :----------------------- | :---------------------------------: | :--------------------------------------------------------------------------------- |
| **SPGLIB_SHARED_LIBS**   |                 ON                  | Build spglib as a shared library. Turn off to build static.                        |
| **SPGLIB_WITH_Fortran**  |                 OFF                 | Build Fortran API                                                                  |
| **SPGLIB_WITH_Python**   |                 OFF                 | Build Python API                                                                   |
| **SPGLIB_WITH_TESTS**    |                 ON                  | Include basic tests                                                                |
| **SPGLIB_USE_OMP**       |                 OFF                 | Use OpenMPI                                                                        |
| **SPGLIB_USE_SANITIZER** |                 ""                  | Specify a sanitizer to compile with
 e.g. `address`                            |
| CMAKE_INSTALL_PREFIX     | OS specific
(e.g. `/usr/local`) | Location where to install built project                                            |
| BUILD_SHARED_LIBS        |                 ON                  | Whether to build shared or statically linked libraries
(Currently unsupported) |

## How to link spglib C library to your project

### Linking against locally installed spglib

We currently support two ways of linking this project: using native `cmake` or via `pkg-config`.
The native cmake package and namespace are `Spglib`. The cmake targets and pkg-config files
exported are:

|   CMake target    | pkg-config file | Description                                                      |
| :---------------: | :-------------: | :--------------------------------------------------------------- |
| `Spglib::symspg`  |    `spglib`     | Main C library                                                   |
|   `Spglib::omp`   |       ---       | Equivalent to `Spglib::symspg`
 Guaranteed `OpenMP` support |
| `Spglib::fortran` |  `spglib_f08`   | Fortran wrapper                                                  |

An example `CMakeLists.txt` to link via native `cmake`:

```cmake
project(foo)

find_package(Spglib REQUIRED)

add_library(foo_library)
target_link_libraries(foo_library PRIVATE Spglib::symspg)
```

Additionally, we provide convenient components and variables to control and check the
spglib library:

| Component |  Imported target  | CMake variable    | Description                             |
| :-------: | :---------------: | ----------------- | --------------------------------------- |
| `static`  |        ---        | `Spglib_LIB_TYPE` | Link against statically built libraries |
| `shared`  |        ---        | `Spglib_LIB_TYPE` | Link against shared libraries           |
| `fortran` | `Spglib::fortran` | `Spglib_Fortran`  | Check and include Fortran target        |
|   `omp`   |   `Spglib::omp`   | `Spglib_OMP`      | Check and include OpenMP target         |

See [example/CMakeLists.txt](../example/CMakeLists.txt) for a more complete example.
Note that this library is built as a shared library, unless it is imported via
`FetchContent` or equivalent approaches. This can be controlled via `SPGLIB_SHARED_LIBS`.

### Downloading and using specific versions

Alternatively, you can download spglib automatically using
[`FetchContent`](https://cmake.org/cmake/help/latest/module/FetchContent.html),
and compile it with specific options in [CMake Options](#cmake-options), e.g.:

```cmake
project(foo)

FetchContent_Declare(
	Spglib
	GIT_REPOSITORY https://github.com/spglib/spglib
	GIT_TAG main
)

set(SPGLIB_USE_OMP ON)

FetchContent_MakeAvailable(Spglib)

add_library(foo_library)
target_link_libraries(foo_library PRIVATE Spglib::symspg)
```

repository: spglib/spglib

branch_name: refs/heads/develop

gha_language: C

repo_name: spglib/spglib


text:
# Dzl

### What is it?

Dzl is a *request routing* and *parameter validation* DSL.  It is designed for rapid development of small API services.  It is easy to use, read, maintain, and extend.  It promotes some useful conventions for application design without Doing Too Much.

It is a Racktivesupport web framework like those to which you are probably accustomed.  We will have proper documentation soon.

#### I hate reading and want to use this right now!

Ok... https://github.com/vitrue/dzl/tree/master/lib/dzl/examples

#### Quick philosophical point

In Dzl, the API flows in the direction that the request would be serviced.  You define first the route, then a set of acceptable parameters for that route, and finally designate a handler.

#### Request routing

In this regard, Dzl looks a lot like Sinatra.  Writing (and reading) routes and handlers is simple.  There is no need to have multiple open files to figure out what code responds to `GET /foo`.

#### Parameter Validation

Inside of a route's DSL block (or in a named parameter block which can be used later from any route) you define a set of acceptable (required/optional/header) parameters.  You may also define a set of transformations on each parameter, to be run before or after validation.  For invalid requests, information about which parameters failed validation and which validations they failed is returned.  Otherwise, the (optionally transformed) parameters are yielded to the route handler.

-----------

## Contributing

We welcome pull requests.  With specs.

## Open Source

The MIT License (MIT)
Copyright (c) Vitrue

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

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

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

## Versions

We will stick to Semantic Versioning (http://semver.org/), as closely as Bundler will allow.

repository: akira/dzl

repo_name: akira/dzl


text:
# lability-tutorial
{:.no_toc}

Hello, GitHub 👨💻

This is a tutorial for working with [Lability](https://github.com/VirtualEngine/Lability/).

I recently found Lability and really came to like it.
However, I found it a bit hard to get started with.
I am writing this tutorial to help people get started with this dope module for building Hyper-V test labs.
I hope it's useful.
❤

**Feedback and pull requests are welcome!**
Open issues or submit PRs [on Github](https://github.com/mrled/lability-tutorial).

## On this page
{:.no_toc}

* TOC
{:toc}

## Tutorial status

This tutorial not yet complete -
below you can find a table of contents / to do list.
Where a chapter has been started (not necessarily completed!),
there will be a link to the chapter;
where a chapter has not yet been started,
there will be a list of things to cover.

## Target audience

Who should read this tutorial?

-   I assume a mid-level Powershell background.
    You should be comfortable reading and writing Powershell scripts.
-   I assume at least a passing familiarity with Powershell DSC.
    You may not have written a DSC configuration before,
    but you should understand at a high level what DSC is for
    and be willing to research concepts you don't understand.
-   You should be able to use the Hyper-V GUI tools on a Windows client OS (such as Windows 10 Pro).
    We don't do anything too complex with Hyper-V in this tutorial,
    but you should understand basic concepts like VMs, VHDs, VSwitches, and so forth.

## Tutorial chapters

1.  [An introduction to Lability](01-Introduction):
    a brief intro describing Lability and its documentation.

2.  [A simple configuration](02-Simple):
    a very simple lab that starts just one virtual machine.

     -  Powershell DSC configuration data
     -  Powershell DSC configurations
     -  Lability lab creation behavior (attaching to switches, downloading media, etc)
     -  Configuring and starting the lab

3.  [Debugging labs that won't start](03-Debugging):
    a discussion of troubleshooting strategies when things aren't working correctly.

     -  Logging in via Powershell remoting if possible
     -  Resetting the VMs so you can log on and see what went wrong
     -  DSC logs in Event Viewer
     -  Lability logs in C:\Bootstrap
     -  Deleting existing VHDs before redeploying a lab when troubleshooting
     -  Filtering the error list

4.  [Expanding our simple VM example](04-SimpleExpanded):

     -  Lab prefixes
     -  Custom resources (install Firefox)
     -  DSC modules, version specifiers,
        and what happens if DSC modules are not defined in the config data
        (move this from 02-Simple)

5.  [Simple private network](05-SimpleNetwork)

     -  Add an additional node
     -  Explain `NodeName = '*'`
     -  Create an internal network
     -  Explain types of switches and what happens if the switch doesn't already exist

6.  [NAT network configuration](06-NatNetwork):
    two VMs, one with two NICs acting as a NAT gateway, and one with just one NIC behind the NAT.

     -  Discuss problems related to two NICs and nondeterministic switch assignment order
     -  Discuss double-NAT
     -  Show how to connect to the VMs behind NAT via PS remoting if the gateway is up

7.  [AD domain behind NAT network](07-AdDomain):
    three VMs, one domain controller, one NAT gateway, and one Windows 10 client

     -  Discuss ordering of resources in the config file to minimize errors
     -  Show example of Windows event forwarding

8.  Back matter (?)

     -  Powershell DSC concepts
     -  Lability concepts

license: Unlicense

repository: mrled/lability-tutorial

extension: markdown

gha_language: PowerShell

gha_license_id: Unlicense

repo_name: mrled/lability-tutorial


text:
# remote development using remote-ssh

This enables us to develop, run and debug everything remotely on a single linux machine of our choice.

See <https://code.visualstudio.com/docs/remote/ssh> for instructions how to set this up.

After setup we need to
- clone our fork repo on the remote machine
- install fworch
- stop the services we want to debug (middleware, ui)
- start the services remotely in vs (code) for debugging


text:
# Oracle Apex Overlay Side Navigation Menu
CSS to change the default behaviour of the side navigation menu so that it's displayed as an overlay menu.

## Install
Include the corresponding CSS in your application.

## Preview
![](https://github.com/maxime-tremblay/apex-css-overlay-sidemenu/blob/master/preview.gif)


text:
# buildah-images "1" "March 2017" "buildah"

## NAME
buildah\-images - List images in local storage.

## SYNOPSIS
**buildah images** [*options*] [*image*]

## DESCRIPTION
Displays locally stored images, their names, sizes, created date and their IDs.
The created date is displayed in the time locale of the local machine.

## OPTIONS

**--all, -a**

Show all images, including intermediate images from a build.

**--digests**

Show the image digests.

**--filter, -f=[]**

Filter output based on conditions provided (default []).  Valid
keywords are 'dangling', 'label', 'before' and 'since'.

**--format="TEMPLATE"**

Pretty-print images using a Go template.

**--json**

Display the output in JSON format.

**--noheading, -n**

Omit the table headings from the listing of images.

**--no-trunc, --notruncate**

Do not truncate output.

**--quiet, -q**

Displays only the image IDs.

repository: estroz/buildah

repo_name: estroz/buildah


text:
## `uk.co.artofcode.java.util.QueryableList<T>`
A List implementation, based on `ArrayList`, that allows lambda-expression based querying, filtering, and mapping. In addition to the methods detailed here, all the methods available from `ArrayList` are also available here.

#### `public QueryableList<>()`
The basic constructor: by delegation to the superclass' constructor, constructs an empty list with an initial
capacity of ten.

#### `public QueryableList<>(int initialCapacity)`
By delegation to the superclass' constructor, constructs an empty list with the specified initial capacity.

**Throws:** `IllegalArgumentException` if the specified initial capacity is negative.

#### `public QueryableList<>(Collection<? extends T> c)`
By delegation to the superclass' constructor, constructs a list containing the elements of the given collection,
in the order they are returned by the collection's iterator. You can use `Arrays.asList` with this constructor.

**Throws:** `NullPointerException` if the given collection is null.

#### `public QueryableList<T> query(Predicate<T> expr)`
Tests each element of this list using the specified predicate, and returns as a new list only those elements for
which the predicate returns true.

For example:

    QueryableList<String> testList = new QueryableList<>(Arrays.asList("1", "1 2", "1 2 3", "1 2 3 4"));
    QueryableList<String> results = testList.query((String s) -> s.split(" ").length > 2);

**Throws:** `NullPointerException` if the given predicate is null.

#### `public void filter(Predicate<T> expr)`
Filters this list instance using the specified predicate. Elements for which the predicate returns
false are removed from the list. This method modifies this list instance in-place; if you want to leave this list
unmodified, use `query`.

For example:

    QueryableList<String> testList = new QueryableList<>(Arrays.asList("1", "1 2", "1 2 3", "1 2 3 4"));
    testList.filter((String s) -> s.split(" ").length > 2);

In this example, the two elements with fewer than two "words" in them are removed from the list. The list now has two
elements in it.

**Throws:** `NullPointerException` if the given predicate is null.

#### `public QueryableList<?> map(Function<T, ?> expr)`
Transforms this list by application of a function to each list item. The returned list contains the
return value of the given function for each list item. This method does *not* modify the list in-place, instead
allocating and returning a new list.

For example:

    QueryableList<String> testList = new QueryableList<>(Arrays.asList("ABC", "DEF", "GHI", "JKL"));
    QueryableList<Character> firstChars = (QueryableList<Character>) testList.map((String s) -> s.charAt(0));

To avoid errors caused by the generic type argument, you should cast the result of `map` to a `QueryableList<T>`,
where T is the return type of the specified function.

**Throws:** `NullPointerException` if the given function is null.

repository: ArtOfCode-/java-utils

repo_name: ArtOfCode-/java-utils


text:
# ICING - Infer clones of immunoglobulin data

A Python package to clonal relate immunoglobulins.

**ICING** is an implementation of an unsupervised learning technique
used to identify `clones`, which are groups of immunoglobulins which share
a common ancestor. In other words, immunoglobulins in the same group descend
from the same germline.
Also, the method is designed to be used also in contexts where
the number of samples is very high. For this reason, the framework can be used
in combination with NGS technologies.

## Quickstart
First of all, download ICING from the Python Package Index by using package manager pip
with
```bash
$ pip install icing
```
or clone it from our Github repository with
```bash
$ git clone https://github.com/slipguru/icing
```
and then install it with
```bash
$ python setup.py build_ext --inplace install
```
If you cloned the repository, navigate under `icing/examples` directory. There, run an example with
```bash
$ ici_run.py config_example.py
```
The output should be in the form of
```bash
CRITICAL (2017-02-28 12:52:28,564): Start analysis for clones_95.tab
CRITICAL (2017-02-28 12:52:44,282): Number of clones: 104
```

If you want to produce some plots for the analysis, run
```bash
$ ici_analysis.py icing_example_result/icing_clones_95.tab_<today date> .
```
and that's it.

### "Ok, now I want to use it for real."
Great!

First of all, create a new configuration file with the `-c` command.
```bash
$ ici_run.py -c config.py
```
Modify the configuration file to specify, for example, the path of your input files and non-standard ICING settings.

Run the icing core with
```bash
$ ici_run.py config.py
```
which will produce an output folder in `<current_path>/results/icing_<date_of_today>`.

Now analyse the result
```bash
$ ici_analysis.py results/output_folder/
```
to produce plots related to your analysis.
Done!

## Dependencies
ICING is developed using Python 2.7 and inherits its main functionalities from:

* numpy
* scipy
* scikit-learn
* matplotlib
* seaborn

## Authors and Contributors
Current developer: Federico Tomasi ([@fdtomasi](https://github.com/fdtomasi)).

## Support or Contact
Check out our documentation or contact us:

* federico [dot] tomasi [at] dibris [dot] unige [dot] it


text:
# NPM Integration

npm is the dominant package ecosystem for JavaScript code.  Crux needs to integrate smoothly with it.

## Publishing npm packages

For parity with npm, crux will support multiple executables, but only one library per package.

Crux programs have an automatic, implicit main() function call added to the bottom of the top-level module.

Crux libraries don't.  If the outermost module defines any `export jsffi` exports, they will be available from the generated npm module.

## Importing npm packages

[TODO]

repository: cruxlang/crux

gha_language: Haskell

gha_license_id: NOASSERTION

repo_name: cruxlang/crux


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

### Description

Multiple buffer overflows in Yager 5.24 and earlier allow remote attackers to execute arbitrary code via (1) a crafted nickname or (2) a packet with a large amount of data.

### POC

#### Reference
- http://aluigi.altervista.org/adv/yagerbof-adv.txt
- http://marc.info/?l=bugtraq&m=111352154820865&w=2

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


text:
# verify_path [![Build Status](https://drone.io/github.com/crahles/verify_path/status.png)](https://drone.io/github.com/crahles/verify_path/latest) ![coverage](https://img.shields.io/badge/coverage-95.5%25-green.svg "coverage")

verify_path is a simple util to check if there are paths in your input which dont exist anymore (old entries in crontab).

## Usage

From testfile
```code
cat test_input.txt | verify_path

Path /var/www/xxxmail/releases/20130114112251 does not exists!
Path /var/www/yyy_to_qv/releases/20131022103053 does not exists!
```

Or from your cat/crontab/else stdin via pipe
```code
cat file | verify_path
crontab -l -u xxx | verify_path
```

## TODOs

- remove fixed regexp and parse it from commandline via flags
- only read from stdin if no file given (add option for commandline)
- provide packages via bintray

## Contributing

Contributions are very welcome. Whether it's an issue or even a pull request. For pull requests you can use the following flow:

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

I'd also really appreciate spec only pull requests or bug reports with a failing spec/minimal example as this makes fixing it a lot easier.

Thanks in advance for all contributions of any kind!

## License

Released under the MIT license

Copyright (c) 2014 Christoph Rahles (crahles)


text:
---
author: minko_gechev
categories:
- Angular
- TypeScript
- Case study
date: 2017-01-21T00:00:00Z
tags:
- Angular
- TypeScript
title: Distributing an Angular Library - The Brief Guide
url: /2017/01/21/distributing-an-angular-library-aot-ngc-types/
---

In this post I'll quickly explain the minimum you need to know in order to publish an Angular component to npm. By the end of the post you'll know how your module can:

- Be platform independent (i.e. run in Web Workers, Universal).
- Should be bundled and distributed.
- Work with the Angular's Ahead-of-Time compiler.
- Play well with TypeScript by allowing autocompletion and compile-time type checking.

*If you're only interested in a quick checklist of things you need to consider for distributing your Angular library, go directly to the "[Distributing an Angular Library - Checklist](#checklist)" section.*

Note that this article doesn't aim to provide complete guidelines for developing an npm module. If you're looking for this, I can recommend you:

- [Creating Node.js modules](https://docs.npmjs.com/getting-started/creating-node-modules)
- [module best practices](https://github.com/mattdesl/module-best-practices)
- [How to build and publish an Angular module](https://medium.com/@cyrilletuzi/how-to-build-and-publish-an-angular-module-7ad19c0b4464)

Along the way, I'll provide examples from a module I recently released called [`ngresizable`](https://github.com/mgechev/ngresizable). [`ngresizable`](https://github.com/mgechev/ngresizable) is a simple component which can make a DOM element resizable.

*If you find anything important missing, please don't hesitate to comment below.*

# Writing platform independent components

One of the greatest strengths of Angular is that the framework is platform agnostic. Basically, all the modules which have to interact with the underlying platform depend on an abstraction. This is the abstract `Renderer`. The code you write should also depend on an abstraction, instead of a concrete platform APIs (see the [dependency inversion principle](https://en.wikipedia.org/wiki/Dependency_inversion_principle)). In short, if you're building your library for the Web, you should not touch the DOM directly because this will make it unable to work in Web Workers and on the server and most developers need that!

Lets take a look at an example:

```typescript
// ANTI-PATTERN

@Component({
  selector: 'my-zippy',
  template: `
    <section class="zippy">
      <header #header class="zippy-header">{{ title }}</header>
      <section class="zippy-content" id="zippy-content">
        <ng-content></ng-content>
      </section>
    </section>
  `
})
class ZippyComponent {
  @Input() title = '';
  @Input() toggle = true;
  @ViewChild('header') header: ElementRef;

  ngAfterViewInit() {
    this.header.nativeElement.addEventListener('click', () => {
      this.toggle = !this.toggle;
      document.querySelector('#zippy-content').hidden = !this.toggle;
      if (this.toggle) {
        this.header.nativeElement.classList.add('toggled');
      } else {
        this.header.nativeElement.classList.remove('toggled');
      }
    });
  }
}
```

This snippet is quite coupled to the underlaying platform, and contains plenty of other anti-patterns, for instance we:

1. Direclty interact with the `header` DOM element by invoking it's method `addEventListener`.
2. Do not clear the event listener we add to the `header` element.
3. Access the `classList` property of the native `header` element.
4. Access property of the global object `document`, however, `document` is not available on other platforms.

Lets refactor the code, in order to make it platform agnostic:

```typescript
// Alright...

@Component({
  selector: 'my-zippy',
  template: `
    <section class="zippy">
      <header #header class="zippy-header">{{ title }}</header>
      <section #content class="zippy-content" id="zippy-content">
        <ng-content></ng-content>
      </section>
    </section>
  `
})
class ZippyComponent implements AfterViewInit, OnDestroy {
  @ViewChild('header') header: ElementRef;
  @ViewChild('content') content: ElementRef;
  @Input() title = '';
  @Input() toggle = true;

  private cleanCallback: any;

  constructor(private renderer: Renderer) {}

  ngAfterViewInit() {
    this.cleanCallback = this.renderer.listen(this.header.nativeElement, 'click', () => {
      this.toggle = !this.toggle;
      this.renderer.setElementProperty(this.content.nativeElement, 'hidden', !this.toggle);
      this.renderer.setElementClass(this.header.nativeElement, 'toggled', this.toggle);
    });
  }

  ngOnDestroy() {
    if (typeof this.cleanCallback === 'function')
      this.cleanCallback();
  }
}
```

The code above looks better. It'll work on multiple platforms because we use the [`Renderer`](https://angular.io/docs/ts/latest/api/core/index/Renderer-class.html) instead of directly manipulating the DOM and accessing globals.

Although it works, we can do a bit better. We do a lot of manual things, for instance, imperatively listening for the `click` event and after that removing the listener:

```typescript
// Best

@Component({
  selector: 'my-zippy',
  template: `
    <section class="zippy">
      <header (click)="toggleZippy()" [class.toggled]="toggle"
        class="zippy-header">{{ title }}</header>
      <section class="zippy-content" [hidden]="!toggle">
        <ng-content></ng-content>
      </section>
    </section>
  `
})
class ZippyComponent implements AfterViewInit, OnDestroy {
  @Input() title = '';
  @Input() toggle = true;

  toggleZippy() {
    this.toggle = !this.toggle;
  }
}
```

The code above contains a better implementation, which is platform agnostic and also testable (we toggle the visibility of the content in the method `toggleZippy` so we can write tests for this easier).

# Distributing the components

The components' distribution is not a trivial problem. Even Angular went through several different structures of their npm modules. The things we need to consider for our packages are:

1. They should be tree-shakable. Tree-shaking is exclusively used for producing a production bundle, because it allows us to drop unused exports.
2. Developers should be able to use them as easy as possible in development mode, i.e. no transpilation of any kind should be required.
3. We need to keep the package lean to save network bandwidth and download time.

In order to keep the module tree-shakable, we need to distribute it in a way that it uses ES2015 modules (also known as `esm`). By having it in this format bundlers, such as [Rollup](http://rollupjs.org/) and [Webpack](https://webpack.github.io/), will be able to get rid of unused exports.

For this purpose we can use `tsc` so our `tsconfig.json` should look something like:

```js
{
  "compilerOptions": {
    "target": "es5",
    "module": "es2015",
    "sourceMap": true,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "outDir": "./dist",
    "lib": ["es2015", "dom"]
  },
  "files": [
    "./lib/ngresizable.module.ts"
  ]
}
```

This is a configuration file copied from [`ngresizable`](https://github.com/mgechev/ngresizable).

If we want to make the life of people who are using our package easier, we should also provide ES5 version of it. Here are two options to be considered:

- Distribute it in two directories - `esm` and `es5` which respectively contain two different versions of our module's JavaScript files:
  - `esm` - contains an ES5 version that uses ES2015 modules.
  - `es5` - contains an ES5 version of the package which doesn't use any ES2015 syntax (i.e. the modules are in commonjs, amd, system or UMD format).
- Distribute the packages with `esm` and also provide ES5 UMD (Universal Module Definition) bundle.

The second approach has a few advantages:

- We don't bloat the package with additional files - we have only the `esm` version of our package and a single bundle which contains everything else.
- When developers use our package in development with SystemJS their browser can load the entire library with only a single request to the UMD bundle. In contrast, if we distribute the package without bundling the module but providing it as individual files instead, SystemJS will send request for each file. Once your project grows this can become inconvenient by slowing down each page refresh dramatically.

It doesn't matter much which tool we'd choose for producing the UMD ES5 bundle. Google, for instance, [uses rollup for bundling Angular](https://github.com/angular/angular/blob/174334dec36ff12d4edf364cd0756fba936c69f8/modules/%40angular/core/rollup.config.js), which is also the case for [ngresizable](https://github.com/mgechev/ngresizable/blob/master/rollup.config.js). It's pretty neat that you can compile your module to ES5 and ES2015 modules. Later your bundler can translate the ES2015 module syntax to UMD so you don't need any additional steps of transpilation.

In the end, since we don't have to complicate the directory structure of the package additionally, we can simply output both, the `esm` version of our code and the UMD bundle, in the root of directory of the distribution.

## Configuring the package

So, now we have two different versions of our code `esm` and ES5 UMD bundle. The question is what entry file in `package.json` should we provide? We want bundlers which understand `esm` to use the ES2015 modules, and bundles which don't know how to use ES2015 modules to use the UMD bundle instead.

In order to do this we can:

- Set the value of the `main` property of `package.json` to point to the ES5 UMD bundle.
- Set the value of the `module` property to point to the entry file of the `esm` version of the library. `module` is a field in `package.json` where bundlers such as rollup and webpack 2 expect to find a reference to the ES2015 version of the code. Note that some older versions of the bundlers use `jsnext:main` instead of `module` so we need to set both properties.

Our final [`package.json`](https://github.com/mgechev/ngresizable) should look something like:

```js
{
  ...
  "main": "ngresizable.bundle.js",
  "module": "ngresizable.module.js",
  "jsnext:main": "ngresizable.module.js",
  ...
}
```

So far so good, but that's not all!

## Providing type definitions

Since most likely the users of the package will use TypeScript, we need to provide type definitions to them. To do this, we need to enable the `declaration` flag in `tsconfig.json` and set the `types` field of our `package.json`.

`tsconfig.json` should look like:

```js
{
  "compilerOptions": {
    "target": "es5",
    "module": "es2015",
    "sourceMap": true,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "declaration": true,
    "outDir": "./dist",
    "lib": ["es2015", "dom"]
  },
  "files": [
    "./lib/ngresizable.module.ts"
  ]
}
```

...and respectively `package.json`:

```js
{
  ...
  "main": "ngresizable.bundle.js",
  "module": "ngresizable.module.js",
  "jsnext:main": "ngresizable.module.js",
  "types": "ngresizable.module.d.ts",
  ...
}
```

# Compatibility with Angular's AoT Compiler

Ahead-of-Time compilation is a great feature and we need to develop & distribute our modules compatible with the compiler.

If we distribute our module as JavaScript without any additional metadata, users who depend on them will not be able to compile their Angular application. But how can we provide metadata to `ngc`? Well, we can include the TypeScript version of our modules as well...but it's not required.

Instead, we should precompile our module with `ngc` and enable the `skipTemplateCodegen` flag in `tsconfig.json`'s `angularCompilerOptions`. After the last update our `tsconfig.json` will look like:

```js
{
  "compilerOptions": {
    "target": "es5",
    "module": "es2015",
    "sourceMap": true,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "declaration": true,
    "outDir": "./dist",
    "lib": ["es2015", "dom"]
  },
  "files": [
    "./lib/ngresizable.module.ts"
  ],
  "angularCompilerOptions": {
    "skipTemplateCodegen": true
  }
}
```

By default `ngc` generates ngfactories for the components and modules. By using `skipTemplateCodegen` flag we can skip this and only get `*.metadata.json` files.

# Recap

After applying all these build steps, the final structure of the [`ngresizable`](https://github.com/mgechev/ngresizable) module looks like this:

```
.
├── README.md
├── ngresizable.actions.d.ts
├── ngresizable.actions.js
├── ngresizable.actions.js.map
├── ngresizable.actions.metadata.json
├── ngresizable.bundle.js
├── ngresizable.component.d.ts
├── ngresizable.component.js
├── ngresizable.component.js.map
├── ngresizable.component.metadata.json
├── ngresizable.module.d.ts
├── ngresizable.module.js
├── ngresizable.module.js.map
├── ngresizable.module.metadata.json
├── ngresizable.reducer.d.ts
├── ngresizable.reducer.js
├── ngresizable.reducer.js.map
├── ngresizable.reducer.metadata.json
├── ngresizable.store.d.ts
├── ngresizable.store.js
├── ngresizable.store.js.map
├── ngresizable.store.metadata.json
├── ngresizable.utils.d.ts
├── ngresizable.utils.js
├── ngresizable.utils.js.map
├── ngresizable.utils.metadata.json
└── package.json
```

As recap, notice that in the final package we have:

- `ngresizable.bundle.js` - an ES5 UMD bundle of the module.
- `esm` ES5 version of our code - allows tree-shaking.
- `*.js.map` - source map files for easier debugging.
- `*.metadata.json` - metadata required by `ngc` to do its job.
- `*.d.ts` - type definitions which allow TypeScript to perform compile-time type checking and allow intellisense for our library.

# Other topics

Very important topic that needs to be considered is related to following the style guide. Your modules should follow best practices especially when with given practice you can impact a dependent project. For further information visit [angular.io/styleguide](https://angular.io/styleguide).

For instance, the ngresizable component violates a practice from the styleguide:

- It uses a component as an attribute. This is a practice which violation is acceptable in this specific case because of implementation details of the component.

*Note that using `ng` as prefix of selector for your directives/components is not recommended because of possible collisions with components coming from Google.*

Distributing an Angular Library - Checklist

In this section we'll wrap things up, by briefly mentioning each point you need to consider:

Try not to directly access DOM APIs (i.e. follow the dependency inversion principle).

Provide esm version of your library in order to allow tree-shaking.

Reference the esm version under the module and jsnext:main properties in package.json.

Provide ES5 UMD bundle of your library.

Reference the bundle under the main property of your package.json.

Provide the type definitions of your library by generating them with tsc with the declaration flag set to true.

Reference the type definitions corresponding to the main module of your package in the types property in your package.json.

Compile your library with ngc and include the generated *.metadata.json files in your package. The tsconfig.json used by ngc should have skipTemplateCodegen set to true, under angularCompilerOptions.

# Conclusion

In this blog post we briefly explained the most important things you need to consider when it comes to distributing your Angular library.

We explained how to keep the library decoupled from the underlying platform. After that, we went to distributing our code in a way that it's tree-shakable and has minimum overhead over the user. As next section we described how to make the library friendly to the Angular's Ahead-of-Time compiler.

Finally, we summarized all the practices in a short list which can serve you as a checklist.


text:
# HEAPS
(http://www.geeksforgeeks.org/array-representation-of-binary-heap/)

## Leaf Nodes
Always satisfies and you don't need to care for them

## Heapify an Array
Find first non-leaf node

repository: evanharmon/eph-headspace

repo_name: evanharmon/eph-headspace


text:
Usage
=====

Create a file called `ceph-mon.json` with the repository content.
Eventually run the pod like so:

`kubectl create -f mon.json`

Check the status of the pod:

```
$ kubectl get pod
POD              IP            CONTAINER(S)   IMAGE(S)      HOST                  LABELS          STATUS    CREATED      MESSAGE
ceph-mon-5ceys   <IP_ADDRESS>                                <IP_ADDRESS>/<IP_ADDRESS>   name=frontend   Running   49 minutes
                               ceph-mon       ceph-daemon                                         Running   49 minutes
```

You can check the logs using: `kubectl log ceph-mon-5ceys`

repository: damoon/ceph-docker

gha_language: Shell

repo_name: damoon/ceph-docker


text:
# IoSetting
An experimental collection of protos to improve the ergonomics of Io.

# Setup
For simplicity, add an alias to your .bashrc:

	alias iosetting='io -i <path-to-IoSetting.io>'

# Usage

By default IoSetting doesn't do much execpt to implicitly add its containing folder to the importer pathm, which will allow you to load the modules simply by referencing them.

If you want to bulk-load some protos, the following methods are available:

	IoSetting importStd
	IoSetting importExperimental
	IoSetting importAll

```importStd``` imports set of protos that are expected to be fairly stable, including ```Range``` and ```Regex``` from the Io distribution. These two are loaded for convenience since they supply methods to other protos.

```importExperimental``` imports some experimental protos which haven't been very well tested.

# Protos

## Standard Protos

### ```Range```, ```Regex```

As mentioned above, these aren't new. They're loaded so that you won't have to load them separately.

### ```ListLiteral```

This proto augments ```List```, allowing you to write lists in a more pleasing form. Example:

	List [ 1, 2, 3, 4 ]

This isn't always better looking to be honest, but sometimes it genuinely makes the code read better.

### ```MapLiteral```

This proto is like ```ListLiteral``` above as applied to the ```Map``` type. Example:

	Map { [one, 1], [two, 2], [three, 3], [five, 5] }

```MapLiteral``` uses an included ```FatArrow``` proto to construct pairs, auto-quoting the first item (since only ```Sequences``` may be used as ```Map``` keys) and inserts them into a ```Map``` for you. This solves the problem of awkwardly adding keys and values to a when initializing a ```Map```.

## Experimental Protos

### ```SelectMap```

Currently broken. Do not use.

### ```Mapping```

Using ```SelectMap``` might be inefficient if you have a lot of elements to map. I am not sure if this is really true, but I thought this would be a fun challenge. ```Mapping``` augments ```List``` with a method for construting arbitrarily large mappings that are applied element by element without the need to dispatch map several times. Example:

	List [ 1, 2, 3, 4 ] mapping( [1,2], [4,2] )
	// yields list(2,2,3,2)

**TODO:** implement ```mapping``` for ```Map```s.

# Other

## Pretty-printers for Literals

The DSLs for literals include a ```prettyPrint``` function for emitting a homoiconic pretty-printed string of the value in the DSL form. Examples:

	Map { [ one, 2 ] } prettyPrint
	/* yields:
		"Map {
			[one, 2]  }"
	*/

	List [ 1,2,3,4 ] prettyPrint
	/* yeilds:
		"List [
			1,
			2,
			3,
			4  ]"
	*/

Pretty-printers are will use ```prettyPrint``` on each value if it has the slot, and also make an attept at keeping indentation consistent.

	Map { [a, Map {[b,10]} ], [c, List [1,2,3,4]] } prettyPrint
	/* yields:
		"Map {
			[c, List [
				1,
				2,
				3,
				4  ]],
			[a, Map {
					[b, 10]  }]  }"
	*/

repository: smosher/IoSetting

repo_name: smosher/IoSetting


text:
# Sentiment analysis

## Index

1. [Intoduction](#1-intoduction)
2. [Dataset description](#2-dataset-description)
3. [Classification in Weka](#3-classification-in-weka)
4. [Application](#4-application)
5. [Test of the Classifier](#5-test)

## 1 Introduction
GIAR (Games information and Ratings) is an application that collects information and ratings about videogames. A user can search a game by name using the search bar on the top of the homepage and then access to a page that contain information about the game.

The purpose of the project is to implement a sentiment analysis feature that gives to the user information about the players community opinions on the game. The opinions are obtained through tweets of the players around the world.

For each videogame selected by the user, the application will show the amount of `positive` and `negative` opinions the players express in their tweets regarding the game. The sentiment analysis is performed as a classification task on on-demand fetched tweets. Thus, the following steps are performed:
- Fetching tweets about the selected game through the Twitter API.
- Tweets pre-processing: Cleaning, Tokenization, Stop Words Removal, Stemming, BOW representation.
- Classification: positive, negative and none.

## 2 Dataset
The dataset used for train the model contains tweets about several games. First, we've retrieved tweets with the python library `GetOldTweets3`, searching for the game as keywords. The query is performed selecting english tweets. The result of the query contains several information, such as:
- id
- permalink
- username
- to
- text
- date
- retweets
- favorites
- mentions
- hashtags
- geo.

For the purpose of our analysis we stored only the text, that contains the effective tweet as displayed on Twitter.

Then, we labeled by hand the tweets in three classes: positive for tweets that contains good opinions about the game, negative for the tweets that contains bad opinions and none for the tweets that contains neutral opinion and/or spam. Since the dataset was strongly unbalanced, to obtain a balanced dataset we selected 333 instances per each minority class (positive and negative) from the labeled tweets and than we randomly picked 333 instances from the majority class (none) discarding the others. The dataset is so composed by 999 instances.

The distribution of tweets per game contained in the dataset is shown in the following chart:
![Distribution-Game-Chart](./dataset_tweets_distribution.png)

The none class tweets are randonmly sampled from the last analized game only, because all the none tweets founded in all the games are very similar (i.e. game session tweets, streaming invitations, market advertisement, etc.).

The instances were cleaned and stored together in an arff file. The cleaning process was performed with the python library `tweet-preprocessor`, removing useless information such as: mentions, hashtags and links.

Here's a word cloud representation of the dataset created:
![Word-Cloud-1](./word_cloud_1.png)

We noticed that the words composing the title of the games we looked for were more frequent that the ones that express an opinion (good, bad, etc.). To avoid the biasing of the classification model on that games we decided to remove the word composing the games title. The resulting dataset is:

![Word-Cloud-2](./word_cloud_2.png)

## 3 Classification in Weka

### 3.1 Data pre-processing in Weka
In order to transform the cleaned tweets of the dataset into a `bag of words` representation we perform a three step pre-processing.

**First step:** we need to transform our stream of characters into a stream of processing units, called `tokens`. During this step, after removing punctuation marks, non-text characters and special symbols, each text is represented as a set of words. For removing redundancies between words tokens are converted in lower case. We use the `AlphabeticTokenizer` as tokenizer in Weka.

**Second step:** At this point we need to remove `stop-words`. Those are words providing little or no useful information to the sentiment analysis, for this reason they can be considered as noise. Stop-words are:
- Common stop-words include articles, conjunctions, prepositions, pronouns, etc.
- Other stop-words are those typically appearing very often in sentences of the considered language (language-specific stop-words), or in the particular context analyzed (domain-specific stop-words).
- We also included as stop-words the names of the console such as: `Playstation`, `Xbox`, `Pc`.

We use the `WordsFromFile` as stop-words handler in Weka. We used as list of the NLTK's list of common english stop words, including in the list the console names.

At the end of this step, each text is cleaned from stop-words, and thus reduced to a sequence of relevant tokens. We decided to dont't remove badwords from relevant tokens, because they can be usefull for our analysis as they might be very expressive regarding an opionion.

**Third step:** The last step is the `stemming`: the process of reducing each token to its stem or root form by removing its suffix, in order to group words having closely related semantics. At the end of this step each tweet is represented as a sequence of stems. We use the `english snowballStemmer` as stemmer.

At the end of this step we obtain the `bag of words` representation of the dataset. The attributes so transformed are selected using the `InfoGainAttributeEval` as evaluator and search `Ranker` with a threshold of -1000.

After the pre-processing we perform several tests with different classifiers and for each performing a `10-Fold-Cross-Validation`. We used a `filteredClassifier` to perform tests. A summarization of each test is below shown:

The `Naive Bayes Multinomial Text` don't need to be used as filtered classifier, the attribute selection with this classifier is not performed.

### 3.1 J48

**Correctly Classified Instances:** 672 (67.2673%)

**Incorrectly Classified Instances:** 327 (32.7327%)

**Kappa statistic:** 0.509

**Mean absolute error:** 0.2498

**Root mean squared error:** 0.3922

**Relative absolute error:** 56.2143%

**Root relative squared error:** 83.1879%

**Total Number of Instances:** 999

**Detailed Accuracy By Class**

 .|TP Rate | FP Rate|  Precision | Recall  | F-Measure | MCC  |    ROC Area | PRC Area | Class
 ---|----|----|----|----|----|----|----|----|----|
 -|0,625  |  0,135 |   0,698  |    0,625 |   0,659   |   0,504 |   0,804 |     0,670   |  positive
-|0,679  |  0,242  |  0,584   |   0,679 |   0,628   |   0,423 |   0,794 |     0,641  |   negative
  -|0,715  |  0,114  |  0,758   |   0,715   | 0,736  |    0,610 |   0,877   |  0,795  |   none
Weighted Avg. |   0,673 |   0,164   | 0,680  |    0,673  |  0,674   |   0,512 |   0,825    | 0,702

**Confusion Matrix**

   positive|  negative|  none |  <-- classified as
   --|--|--|-------|
 208 | 96 | 29 |    positive
  60 | 226 | 47 |  negative
  30 | 65 | 238 |  none

### 3.2 Naive Bayes Multinomial Text

**Correctly Classified Instances:** 811 (81.1812%)

**Incorrectly Classified Instances:** 188 (18.8188%)

**Kappa statistic:** 0.7177

**Mean absolute error:** 0.1612

**Root mean squared error:** 0.2988

**Relative absolute error:** 36.2742%

**Root relative squared error:** 63.3739%

**Total Number of Instances:** 999

**Detailed Accuracy By Class**

 .|TP Rate | FP Rate|  Precision | Recall  | F-Measure | MCC  |    ROC Area | PRC Area | Class
 ---|----|----|----|----|----|----|----|----|----|
 . | 0,874  |  0,176  |  0,713   |   0,874 |   0,785  |    0,670 |   0,927  |   0,847   |  positive
 . | 0,730  |  0,084   | 0,813  |    0,730  |  0,769     | 0,665  |  0,919  |   0,873   |  negative
. | 0,832 |   0,023  |  0,949   |   0,832  |  0,886   |   0,839  |  0,967  |   0,957  |   none
Weighted Avg.  |  0,812  |  0,094  |  0,825  |    0,812  |  0,814 |     0,724 |   0,938  |   0,892

**Confusion Matrix**

   positive |  negative |  none |  <-- classified as
   --|--|--|-------|
291 | 33  | 9 |    positive
  84 | 243  | 6 |  negative
  33 | 23  | 277 |   none

### 3.3 1-Nearest-Neighbors

**Correctly Classified Instances:** 639 (63.964 %)

**Incorrectly Classified Instances:** 360 (36.036%)

**Kappa statistic:** 0.4595

**Mean absolute error:** 0.2488

**Root mean squared error:** 0.362

**Relative absolute error:** 55.9741%

**Root relative squared error:** 76.7899%

**Total Number of Instances:** 999

**Detailed Accuracy By Class**

 .|TP Rate | FP Rate|  Precision | Recall  | F-Measure | MCC  |    ROC Area | PRC Area | Class
 ---|----|----|----|----|----|----|----|----|----|
  .|0,652 |   0,179  |  0,646   |   0,652  |  0,649   |   0,472  |  0,844   |  0,741  |   positive
 . |0,586  |  0,245  |  0,545   |   0,586  |  0,564   |   0,335  |  0,804  |   0,702  |   negative
 . | 0,682 |   0,117 |   0,744   |   0,682  |  0,712  |    0,578  |  0,902   |  0,860   |  none
Weighted Avg. |   0,640  |  0,180  |  0,645  |    0,640  |  0,642   |   0,462  |  0,850   |  0,767

**Confusion Matrix**

   positive |  negative |  none |  <-- classified as
   --|--|--|-------|
   217 | 87 | 29 | positive
 89 | 195 | 49 | negative
  30 |  76  | 227 | none

### 3.4 RandomForest

**Correctly Classified Instances:** 804 (80.4805%)

**Incorrectly Classified Instances:** 195 (19.5195%)

**Kappa statistic:** 0.7072

**Mean absolute error:** 0.1303

**Root mean squared error:** 0.3445

**Relative absolute error:** 29.3178%

**Root relative squared error:** 73.0853%

**Total Number of Instances:** 999

**Detailed Accuracy By Class**

 .|TP Rate | FP Rate|  Precision | Recall  | F-Measure | MCC  |    ROC Area | PRC Area | Class
 ---|----|----|----|----|----|----|----|----|----|
  . |0,862  |  0,155  |  0,736   |   0,862  |  0,794  |    0,683  |  0,910  |   0,802   |  positive
 .| 0,712 |   0,066  |  0,843  |    0,712 |   0,772  |    0,677  |  0,897  |   0,839  |   negative
 . | 0,841  |  0,072  |  0,854   |   0,841   | 0,847    |  0,772   | 0,942  |   0,916  |   none
Weighted Avg. |   0,805  |  0,098 |   0,811  |    0,805  |  0,804   |   0,711  |  0,916   |  0,852

**Confusion Matrix**

   positive |  negative |  none |  <-- classified as
   --|--|--|-------|
   287 | 27 | 19 | positive
  67 | 237  | 29 | negative
  36 | 17  | 280 | none

### 3.5 HoeffdingTree

**Correctly Classified Instances:** 429 (42.9429%)

**Incorrectly Classified Instances:** 570 (57.0571%)

**Kappa statistic:** 0.1441

**Mean absolute error:** 0.3801

**Root mean squared error:** 0.6163

**Relative absolute error:** 85.524%

**Root relative squared error:** 130.7381%

**Total Number of Instances:** 999

**Detailed Accuracy By Class**

 .|TP Rate | FP Rate|  Precision | Recall  | F-Measure | MCC  |    ROC Area | PRC Area | Class
 ---|----|----|----|----|----|----|----|----|----|
. | 0,222 |    0,054  |  0,673  |    0,222  |  0,334   |   0,253  |  0,793  |   0,605 |    positive
 . | 0,069  |  0,005  |  0,885  |    0,069  |  0,128   |   0,191  |  0,649  |   0,506  |   negative
 . | 0,997  |  0,797 |   0,385   |   0,997  |   0,555  |    0,275  |   0,604 |    0,387 |    none
Weighted Avg.  |  0,429 |   0,285 |   0,647   |   0,429   | 0,339   |   0,240 |   0,682  |   0,500

**Confusion Matrix**

   positive |  negative |  none |  <-- classified as
   --|--|--|-------|
   74  | 3  | 256 |positive
  35 |  23 | 275 |negative
   1 |  0 | 332 |none

### 3.6 Naive Bayes

**Correctly Classified Instances:** 753 (75.3754%)

**Incorrectly Classified Instances:** 246 (24.6246%)

**Kappa statistic:** 0.6306

**Mean absolute error:** 0.194

**Root mean squared error:** 0.3501

**Relative absolute error:** 43.6583%

**Root relative squared error:** 74.2731%

**Total Number of Instances:** 999

**Detailed Accuracy By Class**

 .|TP Rate | FP Rate|  Precision | Recall  | F-Measure | MCC  |    ROC Area | PRC Area | Class
 ---|----|----|----|----|----|----|----|----|----|
 . | 0,769 |   0,140 |   0,734 |     0,769 |   0,751   |   0,622  |  0,897 |    0,814    | positive
. |0,835  |  0,228   | 0,647  |    0,835 |   0,729    |  0,578  |  0,889   |  0,814  |   negative
. | 0,658 |   0,002 |   0,995  |    0,658 |   0,792   |   0,746 |   0,931  |   0,910  |   none
Weighted Avg. |   0,754  |  0,123 |   0,792  |    0,754  |  0,757 |     0,649  |  0,905  |   0,846

**Confusion Matrix**

   positive |  negative |  none |  <-- classified as
   --|--|--|-------|
   256 |  76  | 1 |positive
  55 | 278 |  0 |negative
  38  | 76 | 219 |none

### 3.7 Support Vector Machine

**Correctly Classified Instances:** 770 (77.0771%)

**Incorrectly Classified Instances:** 229 (22.9229%)

**Kappa statistic:** 0.6562

**Mean absolute error:** 0.1528

**Root mean squared error:** 0.3909

**Relative absolute error:** 34.384%

**Root relative squared error:** 82.9261%

**Total Number of Instances:** 999

**Detailed Accuracy By Class**

 .|TP Rate | FP Rate|  Precision | Recall  | F-Measure | MCC  |    ROC Area | PRC Area | Class
 ---|----|----|----|----|----|----|----|----|----|
. | 0,745 |   0,144  |  0,721  |    0,745  |  0,733   |   0,596  |  0,800  |   0,622  |   positive
. | 0,721  |  0,108 |   0,769   |   0,721 |   0,744    |  0,623  |  0,806  |   0,647   |  negative
  . |0,847 |   0,092 |   0,822   |   0,847 |   0,834  |    0,750  |  0,878  |   0,747  |   none
Weighted Avg.  |  0,771  |  0,115  |  0,771   |   0,771  |  0,770  |    0,656 |   0,828   |  0,672

**Confusion Matrix**

positive |  negative |  none |  <-- classified as
   --|--|--|-------|
   248 |  53 | 32 |positive
  64  | 240 |  29 |negative
  32 | 19 | 282 |none

### 3.8 Comparison of classification models
A short summary of the performances of the classifiers:

![Classifiers-Comparison](./classifiers_performances.png)

The table below relates the various classifiers with the matching measures:

Classifier | Accuracy|  K-statistic | Precision  | Recall | F-Measure  |    ROC
----|----|----|----|----|----|----|
Bayes Multinomial |  81,1812% | 0,7177 | 0,825  |    0,812  |  0,814 | 0,938
Random Forest | 81,0811% | 0,7162 | 0,818   |   0,811  |  0,810  | 0,933
SVM | 77,0771% | 0,6562 | 0,771   |   0,771  |  0,770 | 0,828
Naive Bayes |  75,3754% | 0,6306 | 0,792  |    0,754  |  0,757 | 0,905
J48 | 67,2673% | 0,509 | 0,680  | 0,673  |  0,674 | 0,825
1-NN |  63,964 % | 0,4595 | 0,645 | 0,640 | 0,642 | 0,850

To choose the best classifier we performed a paired t-test on the best two classifier obtained during the tests phase. So we performed the t-test between the `Random Forest` and `Naive Bayes Multinomial` in Weka. The result of the test is shown below:

```
Tester:     weka.experiment.PairedCorrectedTTester -G 4,5,6 -D 1 -R 2 -S 0.05 -result-matrix "weka.experiment.ResultMatrixPlainText -mean-prec 4 -stddev-prec 5 -col-name-width 0 -row-name-width 25 -mean-width 0 -stddev-width 0 -sig-width 0 -count-width 5 -print-col-names -print-row-names -enum-col-names"
Analysing:  Percent_correct
Datasets:   1
Resultsets: 2
Confidence: 0.05 (two tailed)
Sorted by:  Percent_correct
Date:       07/02/20 15.11

Dataset                   (1) meta.Filte | (2) bayes.N
------------------------------------------------------
_Users_gianluca_dataset  (100)   80.2507 |   80.7201
------------------------------------------------------
                                 (v/ /*) |     (0/1/0)

Key:
(1) meta.FilteredClassifier '-F \"MultiFilter -F \\\"unsupervised.attribute.StringToWordVector -R first-last -W 1000 -prune-rate -1.0 -I -N 0 -L -stemmer \\\\\\\"weka.core.stemmers.SnowballStemmer -S english\\\\\\\" -stopwords-handler \\\\\\\"weka.core.stopwords.WordsFromFile -stopwords /Users/gianluca/stopwords.txt\\\\\\\" -M 1 -tokenizer weka.core.tokenizers.AlphabeticTokenizer\\\" -F \\\"supervised.attribute.AttributeSelection -E \\\\\\\"InfoGainAttributeEval \\\\\\\" -S \\\\\\\"Ranker -T -1000.0 -N -1\\\\\\\"\\\"\" -S 1 -W trees.RandomForest -- -P 100 -I 100 -num-slots 1 -K 0 -M 1.0 -V 0.001 -S 1' -4523450618538717400
(2) bayes.NaiveBayesMultinomialText '-W -P 0 -M 2.0 -norm 1.0 -lnorm 2.0 -lowercase -stopwords-handler \"weka.core.stopwords.WordsFromFile -stopwords /Users/gianluca/stopwords.txt\" -tokenizer weka.core.tokenizers.AlphabeticTokenizer -stemmer \"weka.core.stemmers.SnowballStemmer -S porter\"'<PHONE_NUMBER>014821394
````

The performed test has no statistic significance, so we decided to use the `Naive Bayes Multinomial Text` because is the faster to build (0.3 seconds).

## 4 Application

### 4.1 Data Acquisition
Tweets are fetched whenever a user look for information about a game. To download tweets we used the official Twitter API with the `Twitter4j` java library.

To connect with Twitter we need to create a `Twitter` object from a `TwitterFactory`. The Twitter object is retrieved as a Singleton, so we have only one connection during a session. The query is performed using a `Query` object on which several paramenters can be specified. As for the training-set we fetched english tweets based on the game title.

An example of the fetching code:
```java
Twitter twitter;
Query query;
QueryResult result;

twitter = TwitterFactory.getSingleton();
tweets = new ArrayList<String>();
query = new Query(searchTerm);
query.setLang("en");
query.setCount(1000);
result = twitter.search(query);
```

The `setCount` option let specify the maximum number of tweets to return. The result of the query is divided in pages that need to be iterated.

A set of at least 50 tweets are selected to perform the classification faster. The retweets are discarded:
```java
while (tweets.size() < 50) {
	for (Status status : result.getTweets()) {
		if (!status.isRetweet()) {
			tweets.add(tweetCleaning(status));
		}
	}

	//Query for the next pages
	query = result.nextQuery();

	if(query == null) {
		break;
	} else {
		result = twitter.search(query);
	}
}
```
The batch size is chosen due to minimize the time required to download the tweets with the free `Twitter API`.

### 4.2 Data Preprocessing
To perform a sentiment analysis on tweets raw text must be cleaned.

An example of raw tweet:
```
@MainManPepe @MattHDGamer By uninstalling Fifa 20 as it’s terrible 😄
```

In this process we need to delete some noisy elements you find usually in tweets that are not interesting for our aim, such as:
- hashtags
- mentions
- links
- emojis

The tweet after cleaning process:
```
By uninstalling Fifa 20 as it’s terrible
```

To do this we used regular expressions to remove hashtags, mentions and links. To remove emojis we used the `Emoji-Java` library.

Our tweet cleaning function:
```java
private static String tweetCleaning(Status tweet) {
	String cleanedTweet;
	HashtagEntity[] hashtags;
	UserMentionEntity[] mentions;

	//Remove emojis
	cleanedTweet = EmojiParser.removeAllEmojis(tweet.getText());

	//Remove hashtags
	hashtags = tweet.getHashtagEntities();

	for (HashtagEntity h: hashtags) {
		cleanedTweet = cleanedTweet.replaceAll("#" + h.getText() + "\\b", " ");
	}

	//Remove mentions
	mentions = tweet.getUserMentionEntities();

	for (UserMentionEntity m: mentions) {
		cleanedTweet = cleanedTweet.replaceAll("@" + m.getScreenName() + "\\b", " ");
	}

	//Remove links
	cleanedTweet = cleanedTweet.replaceAll("(https?|ftp|file)://[-a-zA-Z0-9+&@#/%?=~_|!:,.;]*[-a-zA-Z0-9+&@#/%=~_|]", " ");

	//Collapse multiple spaces
	cleanedTweet = cleanedTweet.replaceAll("\\s+", " ");

	return cleanedTweet;
}
```

The tokenization, stop-word removal and stemming pre-processing is performed by the model we use.

### 4.3 Classification
In this section we present the most code relevant part concerning the dataset creation and the implementation of the classifying process. To classify the cleaned unlabeled instances we need to first create the dataset with the class attribute unlabeled, then we can classify each instance of the dataset.

To build the dataset we create a dataset with two attributes: `Text` and `Class`, the names of the attribute are self-explaining.
```java
//Create the class values array
ArrayList<String> classLabels;
classLabels = new ArrayList<String>();
classLabels.add("positive");
classLabels.add("negative");
classLabels.add("none");

//Attributes
Attribute clas;
Attribute text;
text = new Attribute("text", true);
clas = new Attribute("class", classLabels);

//List of attributes
ArrayList<Attribute> attributes;
attributes = new ArrayList<Attribute>();
attributes.add(text);
attributes.add(clas);

//Dataset
Instances dataset;
Instance inst;
dataset = new Instances("tweets", attributes, tweets.size());
dataset.setClassIndex(dataset.numAttributes()-1);

//Creation of the instances of the dataset and set the class as missing (unlabeled)
for(int i = 0; i < tweets.size(); i++) {
	double[] value = new double[dataset.numAttributes()];
	value[0] = dataset.attribute(0).addStringValue(tweets.get(i));
	inst = new DenseInstance(1.0, value);
	dataset.add(inst);
	dataset.instance(i).setClassMissing();
}
```

We proceed in the following code to importing the classifier model and classify the unlabeled istances:
```java
//Loading the trained classifier
NaiveBayesMultinomialText classifier;
classifier = (NaiveBayesMultinomialText)SerializationHelper.read("./src/main/resources/classifier.model");

ArrayList<Integer> opinions;
opinions = new ArrayList<Integer>();
opinions.add(0);
opinions.add(0);

for(int i = 0; i < tweets.size(); i++) {
	double predicted;
	dataset.instance(i).setClassValue(classifier.classifyInstance(dataset.instance(i)));
	predicted = dataset.instance(i).classValue();
	if(predicted == 0) { //Index of the class label array -> 0: positive. 1: negative.
		opinions.set(0, opinions.get(0) + 1);
	} else if (predicted == 1) {
		opinions.set(1, opinions.get(1) + 1);
	}
}
```

An example of classified tweet:
```
  'By uninstalling Fifa 20 as it’s terrible',negative
```

### 4.4 Sentiment Analysis
The following method, that uses the previous one, is called from the user's interface in the game's information page:

```java
public static ArrayList<Integer> sentimentAnalysis(String game) {
	ArrayList<String> tweets;
	ArrayList<Integer> opinions = new ArrayList<Integer>();

  //Download the tweets of the game
	tweets = searchTweets(game.toLowerCase());

	if(tweets == null) {
		System.out.println("No opinions found.\n");
	} else {
		opinions.addAll(classify(tweets));
	}

	return opinions;
}
```

Due to the limitations of the `Twitter API`, the process of retrieve tweets is so much slow. For this reason we decided to create a thread and run the sentiment analysis in this thread:

```java
 //Search for opinions on twitter
final Thread sentimentAnalysis = new Thread() {
	public void run() {
		ArrayList<Integer> opinions = TwitterConnector.sentimentAnalysis(gameName);
		if(opinions.size() == 0) {
			positive.setText(Integer.toString(0));
			negative.setText(Integer.toString(0));
		} else {
			positive.setText(opinions.get(0).toString());
			negative.setText(opinions.get(1).toString());
		}
	}
	};

sentimentAnalysis.start();
  ```

In the following the example of performed analysis on the GUI:

  ![Screen](./screen2.gif)

## 5 Test
To test the effective goodness of the classifier we collected classified data from ten games, checked the class by hand and generated the confusion matrix for each game. We collected classified data of the games:
- Assassin's Creed: Odyssey
- Star Wars: Jedi Fallen Order
- Borderlands 3
- Mass Effect: Andromeda
- Horizon Zero Dawn
- Batman: Arkham Asylum
- God of War: Ascension
- Fifa 18
- Bioshock

The game are chosen randomly.

The following table summarizes the results of the test per each game:

Game | Accuracy | Precision  | Recall | F-Measure  |
----|----|----|----|----|
Assassin's Creed: Odyssey | 89,4737% | 0,7085 |	0,8016 |	0,7416 |
Star Wars: Jedi Fallen Order | 71,4286% | 0,4691 |	0,5304 |	0,4575 |
Borderlands 3 | 62,3853% | 0,5361 |	0,7492	 | 0,5334 |
Mass Effect: Andromeda | 69,8925% |  0,6971 |	0,7247 |	0,6846
Horizon Zero Dawn | 68,4211% | 0,5121 |	0,4637 |	0,4847
Batman: Arkham Asylum | 55% | 0,4729 |	0,8235 |	0,7416
God of War: Ascension | 57,5% | 0,5470 |	0,6839	| 0,7417
Fifa 18 |  40,678% | 0,4627 | 0,5507 | 0,7416 |
Bioshock |  52,5% | 0,4820 | 0,7828 | 0,7416 |
Average | 63,0310% | 0,5431 |	0,6789 | 0,6520

The confusion matrices of the games are contained in the [/dataset/classified_data](./dataset/classified_data/) folder.

In the following table the comparison between the result obtained with the training set and the result obtained with the unknown data by the classifier:

Dataset | Accuracy | Precision  | Recall | F-Measure  |
----|----|----|----|----|
Training-set |  81,1812% | 0,825  |  0,812  |  0,814 |
Unknown data | 63,0310% | 0,5431 |	0,6789 | 0,6520

The possible reasons of the discrepancy in the obtained results may be several. First of all the quantity of tweets that the application downloads for the analysis (at least 50) may be not enough. That's because it's difficult to find tweets regarding the specific game using the title. Another reason may be that there are a lot of "spam" tweets (i.e. Twitch advises, Store sales, Game session sharing, etc.) and the tweets that express opinions (positive or negative) are very rare. Anyway the average accuracy obtained is good considering the noisiness of the real data and the problems we highlighted so far.

The service is useful because provides to the users a comparison between historical data (i.e. ratings given by the registered user contained in the database of the application) and a current snapshot of the opinion of the players' community on Twitter about the game. So, the sentiment analysis provides an additional tool to decide if buy a game or not.

repository: seraogianluca/GIAR

gha_language: Java

repo_name: seraogianluca/GIAR


text:
# CCI - Student Information System
University Project

![CCImainForm](https://user-images.githubusercontent.com/53239920/83961003-b0684780-a8c1-11ea-8b56-eb405ac60f97.JPG)

---

## Description

This was built as a university project for CIC. Its built using C# and SQL Server.

#### Technologies

- C#
- SQL Server 2014

# Features

#### Administrator
- Creating users:  Creating new users, managing  and modify the existing users

#### Student
- View Assignments
- View Assignment Status ( Submitted / Not Submitted)
- View ASsignment Grades

#### Student Coordinator
- Add Batch and Subject Details
- Insert Student Info and Allocate them into different batches
- Change status of student assignments as submitted
- Insert / Update Student Grades or Results
- View  the assignment submission status based on the student/ batch/ subject/streams

## How To Use

#### Installation

    - Clone Project
    - Create a Database called CCI in SQL Server
    - Import the Database
    - Open Project in Visual Studio
    - Configure DBconnection.cs
    - Connect to Database
    - To Create an Admin Check the default admin password in Staff Table and Login First

## License

MIT License

Copyright (c) [2017] [James Q Quick]

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

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

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

## Contact Info

- Twitter - [@MishalAreef1](https://twitter.com/MishalAreef1)
- Facebook - [MishalAreef](https://www.facebook.com/AlexiMish)
- Instagram - [@MishalAreef](https://www.instagram.com/mishal.areef)
- Email -<EMAIL_ADDRESS>

repository: MishalAreef/Student-Information-System-

repo_name: MishalAreef/Student-Information-System-


text:
# Kata
Name: [Genetic Algorithm Series - #1 Generate](https://www.codewars.com/kata/genetic-algorithm-series-number-1-generate)

Difficulty: **7 Kyu**

# Description
A **genetic algorithm** is based in groups of chromosomes, called populations. To start our population of chromosomes we need to generate random binary strings with a specified length.

In this kata you have to implement a function `generate` that receives a `length` and has to return a random binary string with `length` characters.

# Example
Generate a chromosome with length of 4 `generate(4)` could return the chromosome `0010`, `1110`, `1111`, ... or any of `2^4` possibilities.

# Scenario
```ruby
def generate(length)
  # Good Luck!
end
```


text:
---

title: 'JSUnconf Recap'
author: Jan
layout: blog-post
comments: true

---

[Ola](https://twitter.com/misprintedtype), [Lewis](http://twitter.com/LewisCowper), [Stephan](http://twitter.com/boennemann) and [Etiene](http://twitter.com/etiene_d) gave a total of six(!) talks at [JSUnconf 2015](http://2015.jsunconf.eu "JS Unconf 2015"), last weekend in Hamburg. The Hoodie community is very proud to be part of such an esteemed event!

We helped Etiene and Lewis with their travel costs to Hamburg. It turns out this was a great bet on future speakers :) — Also, Etiene is [running a fundraiser](https://www.indiegogo.com/projects/etiene-at-hackathons-and-tech-confs#activity) that allows her to go to even more events, you might want to consider supporting her as well.

![Group photo with Ola, Kevin, Lewis, Stephan, Oliver & Jan at JSUnconf 2015](/dist1/blog/2015/04/hoodies_jsunconf2015_1024.jpg)

*Group photo with Ola, Kevin, Lewis, Stephan, [Oliver](https://twitter.com/nintr4) & [Jan](https://twitter.com/janl).*

JSUnconf, as the name suggests is an *un*-conference. This means that **everyone is a potential speaker**.

In the first 90 minutes of every day, people propose topics in front of the whole audience and then vote on which of these talks they want to see during the day.

The result is a tuly **cutting-edge conference programme** that **exactly** reflects that attendee’s interests.

![JSUnconf - Eveyone is a Potential Speaker](/dist1/blog/2015/04/strike-potential-speaker.jpg)

### Saturday

Ola kicked things off with an introduction to Offline First. [Slides](http://slidr.io/zoepage/concat-hello-to-offline-first#1).

After lunch, Lewis shared the heartwarming story of his transition from a forklift driver with harsh and dangerous working conditions to a junior JavaScript developer in just nine months. [Slides](http://slidr.io/lewiscowper/forklift-driver-to-developer-in-9-months#1).

And closing the day off, Ola & Lewis premiered their combined “Worker as a Service” talk about, of course, ServiceWorker. [Slides](http://slidr.io/zoepage/worker-as-a-service-incl-notes#1 ""Worker as a Service" incl. notes // slidr.io").

After a full day of enlighting talks and envigorating discussions with many great people, we joined the social event for a relaxing evening, **celebrating the community**.

### Sunday

Etiene told the story of how she used JavaScript to teach 150 women programming. [Slides](http://www.slideshare.net/EtieneDalcol/what-i-learned-teaching-programming-to-150).

At the same time, Stephan held his inaugural talk about how Semantic Versioning is left best to computers ([Slides](https://speakerdeck.com/boennemann/we-fail-to-follow-semver-and-why-it-neednt-matter)). Don’t miss his [on-video performance at JSConf Budapest in two weeks](http://jsconfbp.com/#boennemann "JSConf Budapest").

![Hauptversionsnummernerhöhungsangst](/dist1/blog/2015/04/semverangst.jpg)

Finally, Lewis closed things out with his legendary lightning talk on Service Workers. [Slides](http://slidr.io/lewiscowper/service-worker-and-the-offline-web-lightning-talk#1) & [Video from the Conc.at conference](https://youtu.be/bx1bVJZueFw?t=1613)

* * *

Special shout out to community member Oliver, who we got to meet in person for the first time! If you want to meet the Hoodie community, maybe we can hang out at [one of these next events](http://hood.ie/events/ "hood.ie Events") :)

* * *

Thank you everyone who made this such a fun weekend! <3

branch_name: refs/heads/gh-pages


text:
# EQPacketParser
Tool for parsing packet captures from Live and Emulator servers. Targets .NET Core 2.1

The tool expects captures to be tab separated with specific column headers as produced by Microsoft Message Analyzer. Column order does not matter, but the column header and names must be present. MMA will output a number of default columns as well as any you select to be visible in the output.

The only required columns are: Source, Destination, and Payload.

Example capture:

MessageNumber	DiagnosisTypes	Timestamp	TimeElapsed	Source	Destination	Module	Summary	PayloadLength	Payload
434	None	2019-01-26T15:44:06.4803768	0.0000013	<IP_ADDRESS>	<IP_ADDRESS>	UDP	SrcPort: 7000, DstPort: 59812, Length: 15	7	00,15,A5,00,24,23,08