text:
![Hero Picker Logo](images/heropicker/logo/logo_black.png)

[![Vercel Logo](https://user-images.githubusercontent.com/6928620/168695122-e15b69c1-4c39-47c5-86ff-07c550b9c42b.svg)](https://vercel.com/?utm_source=hero-pickers&utm_campaign=oss)

Repository for the Random Hero Picker for Overwatch.
This website allows Overwatch players to get a random suggestion of which hero to play based on a selection of heroes made by the player.

* **Website:** https://owheropicker.com

![Hero Picker Main Page Screenshot](images/heropicker/screenshots/main_page.png)

## Bugs and feature requests

If you find any bug or have a feature request, please post it on the [issue section](https://github.com/andrerfcsantos/overwatch-hero-picker/issues) of this repository.

## Feedback

Any feedback that is not a bug report or a feature request, please send to<EMAIL_ADDRESS>You can also join the [discord server](https://discord.gg/rwQMrCa).

## Building the site from source

Use these instructions to build the site from the source code and having it run on your own machine or server.

### Prerequisites

* [Node](https://nodejs.org/en/)
* [Vue Cli](https://cli.vuejs.org/guide/installation.html)

### Running the site

* Clone the repo
* `cd` into the repo folder
* `npm install` to install the dependencies
* You can now run the site using `npm` directly or generate static files that can be served by a webserver:
    * `npm run serve` to serve the site on localhost
    * `npm run build --prod` to generate the site static files. This command will put all the files under a `dist` directory. These files should then be put behind a webserver to serve the site.

repository: andrerfcsantos/overwatch-hero-picker

gha_language: Vue

repo_name: andrerfcsantos/overwatch-hero-picker


text:
[![StandWithUkraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)

[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)

<!--
[![Java Maven CI](https://github.com/s0nata/updoc/actions/workflows/maven.yml/badge.svg?branch=main)](https://github.com/s0nata/updoc/actions/workflows/maven.yml)
[![CodeQL](https://github.com/s0nata/updoc/actions/workflows/codeql.yml/badge.svg?branch=main)](https://github.com/s0nata/updoc/actions/workflows/codeql.yml)
[![Maintainability](https://api.codeclimate.com/v1/badges/1c882d09db991fc3ce25/maintainability)](https://codeclimate.com/github/s0nata/updoc/maintainability)
[![codecov](https://codecov.io/gh/s0nata/updoc/branch/main/graph/badge.svg?token=D8QZL6JJUB)](https://codecov.io/gh/s0nata/updoc)
![Known Vulnerabilities](https://snyk.io/test/github/s0nata/updoc/badge.svg)
-->

# upDoc

`upDoc` is an experimental comment inconsistency detection tool for Java source code. Given a file under change it checks whether the javadoc comments have been updated for the methods that were changed.

This repository contains:
- the source code of the tool prototype _(currently under development)_
- replication instructions for the experiments from the [original publication at SCAM'20](http://scg.unibe.ch/archive/papers/Stul20b-InconsistentComments.pdf)

## Build and Test

`upDoc` is written in Java 11 and developed with `java-11-openjdk-amd64`. We use `maven` as a build system:

| build phase(s) | result |
|-|-|
| `$ mvn clean compile` | compiles the source code |
| `$ mvn test `| runs unit tests |
| `$ mvn clean package` | produces a standalone executable JAR |
| `$ mvn clean package -DskipTests` | same as above, but not running the unit tests |

### GumTreeDiff

We rely on [`GumTreeDiff`](https://github.com/GumTreeDiff/gumtree#gumtree) in the `ChangeExtractor` component.

This dependency is handled by `maven` but additional configuration of your local working environment might be needed:

**Step 1**

Go to your account and generate a _personal access token_:

  1. Folow the instructions [here](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token)

  2. In step 6 of the above instructions set the token name to `upDoc-GTD` or any other of your choice

  3. In step 7 of the above instructions set at least the following permissions: `repo`, `read:packages`

**Step 2**

Configure `maven` to authenticate GithubPackages as a valid package source:

  1. Full instructions are available [here](https://docs.github.com/en/packages/guides/configuring-apache-maven-for-use-with-github-packages#authenticating-with-a-personal-access-token), section _Authenticating to GitHub Packages/Authenticating with a personal access token_

  2. Create or edit the `~/.m2/settings.xml` from the template provided in the above instructions

  3. Update `repository` and `server` sections of the `settings.xml` to the following values:

```xml
<repository>
  <id>github</id>
  <name>GitHub GumTreeDiff Apache Maven Packages</name>
  <url>https://maven.pkg.github.com/gumtreediff/gumtree</url>
  <releases><enabled>true</enabled></releases>
  <snapshots><enabled>true</enabled></snapshots>
</repository>
```

```xml
<server>
  <id>github</id>
  <username>HERE_YOUR_GITHUB_USERNAME</username>
  <password>HERE_YOUR_GITHUB_PERSONAL_ACCESS_TOKEN</password>
</server>
```

**Step 4**

The `pom.xml` of `upDoc` already has the dependencies from GithubPackages, you can extend them by checking out more `GumTreeDiff`'s packages from its full [package list](https://github.com/orgs/GumTreeDiff/packages).

After succesfully configuring your local `maven` instance you should be able to build `upDoc` following one of the flows described above.

### IntelliJ IDEA and Maven builds

Currently there is some kind of incompatibility between IntelliJ and `maven` third-party library indices. In case an import error for any library occurs, such as `java: package org.apache.commons.collections4.bag does not exist`, follow this [StackOverflow advice](https://stackoverflow.com/a/37601043/7819059):
- close the project
- delete the `.idea` directory, and
- reopen the project

## Demo

Currently there are four demos available, each demonstrating how one individual component of `upDoc` works. You can either run the demos from the command line or use one of the run configurations for IntelliJ IDEA.

| Component | Demo description| IDE run configuration
|-|-|-|
| _Parser_ | prints out the coarse AST nodes extracted from the original source code and respective bag-of-words representations of identifiers | `demo:parsing` |
| _Mapper_ | prints out similarities between the method AST nodes (both signature and body) and individual sentences of the respective javadoc comment |`demo:mapping`
| _Change Extractor_| prints out a simple change description with LOCs and source code excerpts |`demo:change:extraction` |
| _Change Analyzer_ | prints out the complete report of an inconsistent code change, giving the details about sentences that should be updated| `demo:change:analysis` |

### CLI interface

`upDoc` takes the following strings as input arguments: `DEMO-NAME DIR FILE[S] [MAPPING-SENSITIVITY]`. Sample Java source files for the demos are stored in `src/main/resources/demo/` folder.

Running the demos after building the JAR file (e.g., from the `target` directory):

- `$ java -jar upDoc-1.1.0-alpha-jar-with-dependencies.jar demo:parsing ../src/main/resources/demo/ 0_AdaptiveIsomorphismInspectorFactory.java`
- `$ java -jar upDoc-1.1.0-alpha-jar-with-dependencies.jar demo:mapping ../src/main/resources/demo/ FromAdaptiveIsomorphismInspectorFactory.java 0.2`
- `$ java -jar upDoc-1.1.0-alpha-jar-with-dependencies.jar demo:change:extraction ../src/main/resources/demo/ 0_AdaptiveIsomorphismInspectorFactory.java 1_AdaptiveIsomorphismInspectorFactory.java`
- `$ java -jar upDoc-1.1.0-alpha-jar-with-dependencies.jar demo:change:analysis ../src/main/resources/demo/ 0_AdaptiveIsomorphismInspectorFactory.java 1_AdaptiveIsomorphismInspectorFactory.java`

Additionally, there are also IDE run configurations for building and tesing `upDoc`:

- `maven:[clean,compile]` compiles the sources
- `maven:[test]` runs all unit tests

IDE run configurations may be picked up automatically by the IDE or not (depending by the IntelliJ version you are using):
- if your IntelliJ version is using the `.run/` folder, great: configurations are exactly there, hence they should be visible in your IDE!
- otherwise, your IntelliJ version is using the `.idea/runConfigurations` folder to pick up configurations: copy the files in `.run/` to this other folder to see them in your IDE.

#### Tweaks/Troubleshooting

When switching to a newer version of one library (GumTree here in particular), IntelliJ _may_ still be trying to use the older cached `.jar` file. You may realize this is the issue if `mvn compile` is successfull but the code is not compiling in IntelliJ.

**Fix**
If you follow the error message with cmd+click on the line that does not compile, you should find where is this problematic `.jar`. You can safely delete it. Then, in the Project column (on the left of the IDE) do right click on `pom.xml` and `Maven -> Reimport`.

# Publications

## SCAM'20

`upDoc v1.0` was presented at the 20th IEEE International Working Conference on Source Code Analysis and Manipulation ([SCAM'20](https://www.ieee-scam.org/2020/)). Cite this publication as:

```
@inproceedings{upDoc2020,
  author    = {Nataliia Stulova and
               Arianna Blasi and
               Alessandra Gorla and
               Oscar Nierstrasz},
  title     = {Towards Detecting Inconsistent Comments in Java Source Code Automatically},
  booktitle = {20th {IEEE} International Working Conference on Source Code Analysis
               and Manipulation, {SCAM} 2020, Adelaide, Australia,
               September 28 - October 2, 2020},
  pages     = {65--69},
  publisher = {{IEEE}},
  year      = {2020},
  url       = {https://doi.org/10.1109/SCAM51674.2020.00012},
  doi       = {10.1109/SCAM51674.2020.00012},
}
```

### Running the tool and replicating the experimental results from the publication

#### Source code

[![DOI](https://zenodo.org/badge/493304392.svg)](https://zenodo.org/badge/latestdoi/493304392)

The source code of `upDoc v1.0` is available either directly from this repository as a [dedicated release](https://github.com/s0nata/updoc/releases/tag/v1.0) or from [Zenodo](https://zenodo.org/record/6566994).

#### Build instructions

Use maven to

- compile the sources execute: `$ mvn clean compile`

- build a jar execute: `$ mvn package`

- run the unit tests: `$ mvn test`

You can also use several IntelliJ IDEA run configurations to perform various tasks:

- `upDoc [clean,compile]` compiles the sources
- `upDoc [test]` runs unit tests
- `upDoc analysis:mapping` runs the code-comment mapping demo (see below)

These configurations may be picked up automatically by the IDE or not (depending on the IntelliJ version you are using):
- if your IntelliJ version is using the `.run/` folder, great: configurations are exactly there, hence they should be visible in your IDE!
- otherwise, your IntelliJ version is using the `.idea/runConfigurations` folder to pick up configurations: copy the files in `.run/` to this other folder to see them in your IDE.

#### Code-comment mapping demo

1) execution from the sources

`mvn exec:java -Dexec.mainClass="upDoc" -Dexec.args="analysis:mapping src/test/resources/paper-example/ FromAdaptiveIsomorphismInspectorFactory.java 0.2"`

2) executing the jar

`java -jar upDoc-1.0.jar analysis:mapping ../src/test/resources/paper-example/ FromAdaptiveIsomorphismInspectorFactory.java 0.2
`

The demo will run `upDoc` on a single method and report the similarities of the sentences of the javadoc comment to the method signature.

#### Running example

Execute `$ mvn -Dtest=PaperExampleStatTest test`

#### Preliminary evaluation

Execute `$ mvn -Dtest=ICPC19StatsTest test -DuseWMD="true"`

Please note that while in the paper we talk about 67 changes, in the outputs you will read a total of 40. It is because some changes were essentially equivalent, and it was not worth it to write a test for each duplicate (check the [google doc](https://docs.google.com/spreadsheets/d/1maRH6YY0OVuKSB2ACDhrz1-CQCS7sRHHoaZJDvLWi2Y/edit?usp=sharing) for the manual ICPC19 dataset analysis, where we list al lthe 67 changes in question)

license: Unlicense

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
# Linear regression example

![4 Degree Polynomial to learn](images/4degreePol.png)

This project trains a single fully-connected layer to fit a 4th degree polynomial. This is a porting of [pytorch/examples/regression](https://github.com/pytorch/examples/tree/master/regression) making it usables on [FloydHub](https://www.floydhub.com/).

## Usage

Training and Evaluating script:

```bash
usage: main.py [-h] [--seed S] [--outf OUTF] [--ckpf CKPF] [--degree P]
               [--batch-size N] [--train] [--evaluate]

Pytorch Linear Regression

optional arguments:
  -h, --help      show this help message and exit
  --seed S        random seed (default: 1)
  --outf OUTF     folder to output images and model checkpoints
  --ckpf CKPF     path to model checkpoint file (to continue training)
  --degree P      polynomial degree to learn(default: 4)
  --batch-size N  input batch size for training (default: 32)
  --train         training a fully connected layer
  --evaluate      Evaluate a [pre]trained model from a random tensor.
```

## Linear Regression Architecture

![Linear Model](images/Linear_Model.png)

## Run on FloydHub

Here's the commands to training, evaluating and serving your regression model on [FloydHub](ttps://www.floydhub.com/).

### Project Setup

Before you start, log in on FloydHub with the [floyd login](http://docs.floydhub.com/commands/login/) command, then fork and init the project (make sure you have already [created the project on FloydHub](https://docs.floydhub.com/guides/basics/create_new/)):

```bash
$ git clone https://github.com/floydhub/regression.git
$ cd regression
$ floyd init regression
```

### Training

This project will automatically create a dataset from a normal distribution with zero mean and variance one for you(from the generated number will create a sample with polynomial dependency for the given degree), moreover we will use the same generator to evaluate our model. The training stops when the loss will be under the 1e-3 threshold.

Now it's time to run our training on FloydHub. Since the training is driven by a certain threshold, we do not need to specify the number of iterations.

```bash
$ floyd run --gpu --env pytorch-0.2 "python main.py --train --degree 4 --outf /output"
```

Note:
- `--gpu` run your job on a FloydHub GPU instance. This is a very simple task, so you can run the a CPU instance without any performance degradation.
- `--env pytorch-0.2` prepares a pytorch environment for python 3.

You can follow along the progress by using the [logs](http://docs.floydhub.com/commands/logs/) command.
The training should take less than 1 minute.

### Evaluating

It's time to evaluate the model with data from the same distribution:

```bash
$ floyd run --gpu --env pytorch-0.2 --data <REPLACE_WITH_JOB_OUTPUT_NAME>:/model "python main.py --evaluate --degree 4 --ckp /model/regression_4_degree_polynomial.pth"
```

### Serve model through REST API

FloydHub supports seving mode for demo and testing purpose. Before serving your model through REST API,
you need to create a `floyd_requirements.txt` and declare the flask requirement in it. If you run a job
with `--mode serve` flag, FloydHub will run the `app.py` file in your project
and attach it to a dynamic service endpoint:

```bash
floyd run --gpu --mode serve --env pytorch-0.2  --data <REPLACE_WITH_JOB_OUTPUT_NAME>:input
```

The above command will print out a service endpoint for this job in your terminal console.

The service endpoint will take a couple minutes to become ready. Once it's up, you can interact with the model by sending POST request to evaluate the pretrained model on a normal distribution with zero mean and variance one(the same distribution used for training). The `ckp` parameter is optional.

```bash
# Template
# curl -X POST -F "ckp=<MODEL_CHECKPOINT>" <SERVICE_ENDPOINT>

# e.g. of a POST req
curl -X POST https://www.floydhub.com/expose/BhZCFAKom6Z8RptVKskHZW
```

Any job running in serving mode will stay up until it reaches maximum runtime. So
once you are done testing, **remember to shutdown the job!**

*Note that this feature is in preview mode and is not production ready yet*

## More resources

Some useful resources on Linear Regression:

- [Polynomial regression](https://en.wikipedia.org/wiki/Polynomial_regression)
- [How linear regression works - Brandon Rohrer](https://youtu.be/fE0bnkNX77A)
- [Linear Regression With Multiple Variables - Andrew Ng](https://youtu.be/Q4GNLhRtZNc)

## Contributing

For any questions, bug(even typos) and/or features requests do not hesitate to contact me or open an issue!

repository: akshaysravindran/regression

branch_name: refs/heads/master

repo_name: akshaysravindran/regression


text:
# Nodejs with Systemd

The purpose of this exercise is to create a example server using Terraform and configure it a VPC, Internet Gateway, Security Groups, etc. And provision the instance with Node js (Via apt or NVM), install it and check it's working.
Setup a systemd daemon to handle the process. Secrets management also handled by ansible-vault.

## IaC
### How to run it?
Inside `systemd-node` folder:
`terraform init`
`terraform plan -out=systemd_node_tf`
`terraform apply systemd_node_tf`
This will create the infrastructure in AWS and keep everything configured.

> Don't forget to change the key in the [vars](vars.tf) file, so you can have access to the instance via ssh.

## Provisioning
### How to run it?

* Update the [hosts](../hosts) file with the DNS or IP provided by AWS or using `terraform show`
  * You can also pass the hosts via CLI, check [Ansible Docs](https://docs.ansible.com/ansible/latest/cli/ansible-playbook.html)
* Inside the root folder of the project run the next command:
  * `ansible-playbook -i hosts systemd-node/playbook.yml --tags install_node`
  * The `--tags` executes the tags related in the playbook/roles.

gha_language: HCL


text:
# Site Settings
Your sites settings panel can only be accessed by administrators. This where you can customize your site for all users.

## Home Page Settings
| Option             | Description                                                    |
| ------------------ | -------------------------------------------------------------- |
| Language           | The default site language                                      |
| Show Recent        | To display the recent recipes section on the home page         |
| Card Per Section   | The amount of cards displayed in each section on the home page |
| Home Page Sections | Category sections to include on the home page                  |

![Site Settings Image](../assets/img/site-settings.png)

license: MIT

gha_license_id: MIT


text:
CONTRIBUTING
============

Contributions are welcome and we look forward to seeing what you can bring to the project.

We do reserve the right to reject changes that we feel will not benefit users or take the project in a direction we do not wish to take.
We recommend discussing any large changes with us prior to making your changes, you can do this via an issue or email if you prefer.

Issues
------

Issues should include a title and clear description with as much relevant information as possible.

If you'd like to discuss a potential change, you can open an issue or reach out to our open-source team via<EMAIL_ADDRESS>who will get back to you as soon as possible.

If you think you have identified a security vulnerability, please contact our team via<EMAIL_ADDRESS>instead of using the issue tracker.

Submitting Changes
------------------

Before submitting your [pull request](https://help.github.com/en/articles/about-pull-requests),
please make sure that the coding standards are respected and that all tests are passing.

Pull requests should provide an overview of the changes made so it is clear what you are trying to achieve, this will help us when reviewing your changes.

Commit messages should be clear, we don't mind one-line messages for small changes
but larger changes should follow [The Seven Rules](https://chris.beams.io/posts/git-commit/) set by Chris Beams.

We don't mind squashing small changes to tidy things up but please don't squash an entire branch as this can hinder code reviews.

Coding Standards
---------------

This project adheres to the [PSR-12 Coding Standard](https://www.php-fig.org/psr/psr-12/).

Testing
-------

Please ensure all new functionality is matched with appropriate tests, we will advise if we feel more is needed.

repository: ans-group/laravel-health-check

gha_language: PHP

repo_name: ans-group/laravel-health-check


text:
---
abstract: We undertake a survey that estimates WTP and WTA measures for changes in the risk of being a victim of a robbery or theft in the UK. Respondents are less likely to protest when they are asked to reveal their WTP rather than WTA. Employing various protest-treatment techniques, we estimate the mean WTP for reducing current risks of theft and robbery by 50% to range between £38 and £220; for WTA, they are between £351 and £2,175. Higher values for robbery reflect people’s aversion to the violence implicit in this type of crime. The annual value of avoiding a statistical case of crime ranges between £7,011 for theft and £90,087 for robbery. WTP-WTA ratios range from 1:4.8 to 1:16.9 and are influenced by type of crime and elicitation method. In turn, these results support the economic sense of a pre-emptive crime policy that prevents, rather than compensates for, crime occurrence.
authors:
- admin
- Alistair Hunt
- Matteo Pazzona
- Felipe Vasquez Lavin

date: "2017-11-08T00:00:00Z"
doi: "10.1093/oep/gpx050"
featured: false
image:
  caption: 'Image credit: [**Unsplash**](https://scroll.in/article/859674/indias-annual-crime-report-was-supposed-to-be-released-four-months-ago-why-is-it-still-not-out)'
  focal_point: ""
  preview_only: false
projects: []
publication: '*Oxford Economic Papers, 70*(2)'
publication_short: ""
publication_types:
- "2"
publishDate: "2017-11-08T00:00:00Z"
slides:
summary: We undertake a survey that estimates WTP and WTA measures for changes in the risk of being a victim of a robbery or theft in the UK, taking into account the high prevalence of protest responses.
tags:
- Protest Treatment
- Contingent Valuation
- Crime Economicss
title: Protest treatment and its impact on the WTP and WTA estimates for theft and robbery in the UK.
url_code: ""
url_dataset: ""
url_pdf: ""
url_poster: ""
url_project: ""
url_slides: ""
url_source: ""
url_video: ""
---

repository: ighdez/academic-kickstart

repo_name: ighdez/academic-kickstart


text:
### [CVE-2018-21140](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2018-21140)
![](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

Certain NETGEAR devices are affected by incorrect configuration of security settings. This affects D3600 before <IP_ADDRESS> and D6000 before <IP_ADDRESS>.

### POC

#### Reference
- https://kb.netgear.com/000060221/Security-Advisory-for-Security-Misconfiguration-on-Some-Modem-Routers-PSV-2018-0097

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

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
# TFS Helper

An extension for Google Chrome to add a number of usability improvements to Team Foundation Service 2013.

This plugin adds the following functionalities:

1. User-readable HTMLDecode conversion of Test Case steps audit

2. Diff (PrettyTextDiff) performed with results inserted under the __Steps__ audit table

3. Diff (PrettyTextDiff) performed with results inserted under the __Local Data Source__ table

4. Replacement of parameters with actual parameters in the test runner


text:
Cocos2DX-ParticleSystemOpacity
==============================

A Cocos2DX project demonstrating a method of setting a global opacity on a particle system. The particle system is first rendered to a texture which is then used on another sprite node. The opacity can be set on this sprite node modifying the entire particle systems opacity without modifying the particle systems overall appearance.


text:
---
layout: post
title: Understanding Lottery Ticket Hypothesis
comments: false
---

![lottery](/images/lottery.jpg "lottery")

On 7th of this month I attended a meetup at SilverSparrow.The speaker Megh Makwana during his presentation on Mixed Precision Training made a reference to a paper titled "Lottery Ticket Hypothesis".The title and its relevance to theoritical understanding of deep learning pushed me to go through it.

Here my take on this paper.Just a disclaimer that this is my first hand account and by no means written by Phd. bent of mind. :)

## Background
Those who have some knowledge about Neural Networks understood the importance of Initilization(of weights) for sucessfully training a model. Sometimes your choice of weight vector would converge early and sometimes it don't no matter how long you train it.The question why they(Neural Network) behave in this manner is still baffling both the deep learning reseachers and coders.More on this in later half of the post,till then keep horses of your mind reined in.

## Why the name "Lottery Ticket" ?

The authors of this paper Micheal J and Carbin of CSAIL,MIT tried to draw an analogy between initialisation of NN to buying a bag of lottery tickets and the **"winning ticket"** being the model that is successfully trained.
You bought a bag full of every possible ticket that has the chance of winning the lottery and only one of them is going to be the winning ticket.

## What the paper is trying to say or establish ?
Simply put it states that there exists a smaller sub-network within the larger network that is capable of being trained on new data to make predictions that doesn't departs too far from the original network, provided weights are reset (not reinitilised) to the state that the original network had when the training begins.

## Roadblocks
The paper used a brute-force approach to identify 'subnetworks' and doesn't provide a clear framework for identifying them in a larger network.
Also some warmup strategy is to be used in large and deep networks.

## Future Directions

If you want to add something or could explain it better some other way , contact me at tech DOT rajk AT gmail.com, I would update this if found interesting.

Tweet

path: /_posts/2019-9-20-Understanding Lottery Ticket Hypothesis.md


text:
# trypp.support

**Trypp**, which stands for _Try++_, [is my blog for talking about code][trypp]. `trypp.support` is
a collection of general-purpose Kotlin classes, many of which I wrote for learning / educational
purposes.

In general, I aim to include `README.md` files at the root of each subproject and at the root of
each package as well. Please dive into those sub-READMEs for a more detailed explanation of each
part of the overall picture.

[trypp]: http://d9n.github.io/trypp


text:
CloudStructures
===============
Redis Client based on [StackExchange.Redis](https://github.com/StackExchange/StackExchange.Redis). CloudStructures appends connection management, auto serialize/deserialize for RedisValue, key distributed connection(sharding), command logging, Web.config supports and Redis Profiler for Glimpse.

Why use CloudStructures?
---
StackExchange.Redis is pure, low level library. It is Redis driver like ADO.NET. Using raw is very hard. CloudStructures is simple O/R(Object/Redis) Mapper like Dapper in ADO.NET.

Install
---
from NuGet - [CloudStructures](https://nuget.org/packages/CloudStructures/)
```
PM> Install-Package CloudStructures
```

How to use
---
At first, create `RedisSettings` or `RedisGroup` that represents StackExchange.Redis's ConnectionMultiplexer holder and create RedisStructure Class(`RedisString`, `RedisList`, etc).

```csharp
// Settings should holds in static variable
public static class RedisServer
{
    public static readonly RedisSettings Default = new RedisSettings("<IP_ADDRESS>");
}

// a class
public class Person
{
    public string Name { get; set; }
    public int Age { get; set; }
}

// Create RedisString... (or you can use RedisSettings.Default.String<Person>("key"))
var redis = new RedisString<Person>(RedisServer.Default, "test-string-key");

// call command(IntelliSense helps you)
await redis.Set(new Person { Name = "John", Age = 34 });

// get is the same as
var copy = await redis.Get();

// List is the same as
var list = new RedisList<Person>(RedisServer.Default, "test-list-key");
await list.LeftPush(new[] { new Person { Name = "Tom" }, new Person { Name = "Mary" } });

var persons = await list.Range(0, 10);
```

CloudStructures manage object serialization/deserialization automatically.

Data structure of Redis
---
CloudStructures supports these Redis data types. All methods are async.

 Data type prefix(String/List/Set/etc) are Class, removed async suffix and RedisValue to T. For example `ListLeftPushAsync(RedisKey, RedisValue)` -> `new RedisList<T>(RedisKey)`.`LeftPush(T)`.

All storing methods have `RedisExpiry` argument. If expiry isn't null which is appended expiry second. RedisExpiry is convert from DateTime/TimeSpan implicitly.

```csharp
var list = new RedisList<int>(settings);
await list.LeftPush(1, expiry: TimeSpan.FromSeconds(30));
await list.LeftPush(10, expiry: DateTime.Now.AddDays(1));
```

And all classes have `Expire`, `Exists`, `Delete`, `TimeToLive`.

Some classes have additional methods. RedisList has `LeftPushAndFixLength` that simulate fixed size list by LPUSH and TRIM. RedisSortedSet has `RangeByRankWithScoresAndRank` that returns value, score and rank. If class has Increment method which is appended `IncrementLimitByMax` and `IncrementLimitByMin` there are increment with max/min limit by custom LUA script.

Some methods return `RedisResult<T>`. If Redis returns null `RedisResult<T>.HasValue` is false. You can take value from `Value` property or `GetValueOrDefault(defaultValue)` method or `GetValueOrNull()` method that if HasValue is false then return null.

```csharp
var redis = new RedisString<int>(settings);
var result = await Get();

// take from .Value
if (result.HasValue) Debug.Write(result.Value);
// or from GetValueOrDefault
var value = result.GetValueOrDefault(-1);
// take boxed value
var objectValue = result.GetValueOrNull();
```

CloudStructures does not provide multiple key operation such as SUNION, ZINTERSTORE, etc. Because connection might be distributed by RedisGroup, secondary key may not exist in first key's Redis. If you want to do it, you can take raw connection and do manual deserialize.

```csharp
// Connections in the group must be single
var rawResults = settings.GetConnection().GetDatabase().SetCombine(SetOperation.Union, "firstKey", "secondKey");
var results = rawResults.Select(x => { long size; return settings.ValueConverter.Deserialize<Person>(x, out size); }).ToArray();
```

Configuration
---
load configuration from web.config or app.config

```xml
<configSections>
    <section name="cloudStructures" type="CloudStructures.CloudStructuresConfigurationSection, CloudStructures" />
</configSections>

<cloudStructures>
    <redis>
        <group name="Cache">
            <!-- Simple Grouping(key sharding) -->
            <add connectionString="<IP_ADDRESS>,allowAdmin=true" db="0" />
            <add connectionString="<IP_ADDRESS>,allowAdmin=true" db="1" />
        </group>
        <group name="Session">
            <!-- Full option -->
            <add connectionString="<IP_ADDRESS>,allowAdmin=true" db="2" valueConverter="CloudStructures.GZipJsonRedisValueConverter, CloudStructures"  commandTracer="Glimpse.CloudStructures.Redis.GlimpseRedisCommandTracer, Glimpse.CloudStructures.Redis" />
        </group>
    </redis>
</cloudStructures>
```

```csharp
// setting hold static fields
public static class RedisGroups
{
    // load from web.config
    static Dictionary<string, RedisGroup> configDict = CloudStructures.CloudStructuresConfigurationSection
        .GetSection()
        .ToRedisGroups()
        .ToDictionary(x => x.GroupName);

    // setup group
    public static readonly RedisGroup Cache = configDict["Cache"];
    public static readonly RedisGroup Session = configDict["Session"];

    static RedisGroups()
    {
        // If you want to enable Glimpse's RedisInfo then register groups
        Glimpse.CloudStructures.Redis.RedisInfoTab.RegisiterConnection(new[] { Cache, Session });
    }
}
```

connectionString is [StackExchange.Redis's Configuration String](https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/Configuration.md).

ValueConverter
---
Default ValueConverter(Serializer) is JSON by [Jil](https://github.com/kevin-montrose/Jil). You can change ValueConverter on RediSettings's valueConverter property. ClousStructure has 2 compressed valueConverter. One is `GZipJsonRedisValueConverter` it's bundled CloudStructures. Another is `LZ4JsonRedisValueConverter` it's used fastest compression algorithm [LZ4](https://code.google.com/p/lz4/).

Install from NuGet - [CloudStructures.LZ4](https://nuget.org/packages/CloudStructures.LZ4/)

```
PM> Install-Package CloudStructures.LZ4
```

and configuration for

```xml
valueConverter="CloudStructures.LZ4JsonRedisValueConverter, CloudStructures.LZ4"
```

Glimpse.CloudStructures.Redis
---
CloudStructures has Redis Profiler for [Glimpse](http://getglimpse.com/).

Install from NuGet - [Glimpse.CloudStructures.Redis](https://nuget.org/packages/Glimpse.CloudStructures.Redis/)

```
PM> Install-Package Glimpse.CloudStructures.Redis
```

Setup Glimpse and add config with GlimpseRedisCommandTracer. If you use RedisInfoTab then have to set connectionString's allowAdmin = true and regisiter RedisGroup at first.

```xml
<add connectionString="<IP_ADDRESS>,allowAdmin=true" db="0" commandTracer="Glimpse.CloudStructures.Redis.GlimpseRedisCommandTracer, Glimpse.CloudStructures.Redis" />
```

```csharp
Glimpse.CloudStructures.Redis.RedisInfoTab.RegisiterConnection(new[] { Cache, Session });
```

Okay, you can see timeline tab, can visualize parallel access.

![](./Docs/RedisTimeline.png)

Look at the RedisTab! You can see Sent/Received object's dump, each size, key expire, command duration, warning at duplicate command & key.

![](./Docs/RedisTab.png)

Finally, RedisInfoTab. Showing all serverinfo, commandstat, server-configuration and client-configuration and client-status-counter.

![](./Docs/RedisInfoTab.png)

Author Info
---
Yoshifumi Kawai(a.k.a. neuecc) is software developer in Japan.
He is Director/CTO at Grani, Inc.
Grani is top social game developer in Japan(and I'm CTO at Grani).
He awarded Microsoft MVP for Visual C# since 2011.
He is known by creator of [linq.js](http://linqjs.codeplex.com/)(LINQ to Objects for JavaScript) and [UniRx](https://github.com/neuecc/UniRx)(Reactive Extensions for Unity)

Blog: http://neue.cc/ (JPN)
Twitter: https://twitter.com/neuecc (JPN)

History
---
2015-10-09 ver 1.1
* improved GetConnection handling(use connectTimeout and retryCount)
* add RedisSettings.OnConnectAsyncFailed
* update NuGet packages(StackExchange.Redis)

2015-05-26 ver 1.1
* fix SoretedSet.Add(IEnumerable) set wrong key
* update NuGet packages(Jil and StackExchange.Redis)

2015-02-11 ver 1.0.1(only CloudStructures.LZ4)
* LZ4JsonRedisValueConverter's default buffer size changed to 64KB

2015-02-06 ver 1.0.0
* changed base library from BookSleeve to StackExchange.Redis
* overhaul all API, many breaking changes
* improvement RedisTab for Glimpse
* add RedisInfoTab for Glimpse
* regsiter CloudStructures.LZ4 on NuGet
* document rewrite

2013-11-16 ver 0.6.1
* fix, Configuration's GetElementKey take uniq by Host, Port, Db.

2013-11-15 ver 0.6.0
* add, Glimpse.CloudStructures.Redis
* improved, connection waitOpen use syncTimeout.
* improved, can monitor RedisConnection event(Open/Close/Error/Shutdown) on RedisSettings.
* fix bugs, List.AddFirstAndFixLength is always trimed right length -1.
* breaking changes, ICommandTracer receive many extra key(settings, sentObject, receivedObject).

License
---
under [MIT License](http://opensource.org/licenses/MIT)


text:
You can sign up for a student license for free: https://www.jetbrains.com/student/

SourceTree is a nice GUI for Git if you don't want to use the command line: https://www.sourcetreeapp.com/

Note that we use Nunjucks as our templating engine, which has a syntax similar to Twig (and Jinja), so if your editor supports Twig, make sure you set it to treat `njk` files as `twig` files. In JetBrains IDEs, this can be set in **File** > **Settings** > **Editor** > **File Types** and then find **Twig** in the list and add `*.njk` to the registered patterns. If your editor does not support twig (or Jinja), then just treat `njk` files as `html` files.

To begin setting up your dev environment, clone the repo to your machine: `https://github.com/SENG-299-Group-6-Summer16/Go-WebApp.git`

Now run `npm install` from the project directory, which will download and install all the dependencies specified in `package.json`

Next just make sure you have `mongod` running, and then start the server with `node server.js` (Node 6.2.2 or later is recommended).

### Project Layout/Folder Structure
The `server.js` file is where the server is set up, and all the modules and routes are set up.

The actual logic for the pages is handled by the controllers in the `controllers` folder. Controllers are auto-loaded, so after adding a new controller js file, it should just work without having to do anything in `server.js` (other than setting up the routes).

The pages themselves are located in the `views` folder. As mentioned earlier, these are Nunjuck templates. All of our pages should extend the `base.html.njk` file.
Nunjuck templates are basically just HTML with some extra features, you can read about how to write them here: https://mozilla.github.io/nunjucks/templating.html.

Any static content (such as javascript/css libraries) is located in the `public` folder.

### Committing
When committing **make sure** you don't commit any files that are not strictly part of this project, such as editor specific files (the JetBrains editor's `.idea` folder has already been added to the gitignore). Also make sure not to commit the `node_modules` folder (again, it has already been added to the gitignore, so it would be pretty hard to do this by accident).

When writing commit messages, please follow the guidelines set here: http://chris.beams.io/posts/git-commit/
Really, please read that, it's worth it.

### Code Formatting
Indent with tabs not spaces. Class and function declarations should have curly braces on a new line, unless they are being declared inline:

```javascript
function exampleFunc(arg1, arg2)
{
	// function code
}

thingWithCallback(arg, function() {
	// inline function code
});
```

All other blocks should have curly braces on the same line. Blocks with a single line of code in them do not need curly braces, but they should include a line break after the statement and condition:

```javascript
if (condition) {
	// some code
	// some more code
}

while (condition)
	// single line of code
```

Finally, make sure to add a blank line at the end of every file, or else Git diffs will include an annoying 'no blank line' message.

### Dependencies
Here are the links to the pages for all the dependencies we are currently using, use them if you are unsure on how to use something.

**auto-loader**: https://github.com/jwerle/node-auto-loader
**bcrypt**: https://github.com/dcodeIO/bcrypt.js
**body-parser**: https://github.com/expressjs/body-parser
**connect-flash**: https://github.com/jaredhanson/connect-flash
**csurf**: https://github.com/expressjs/csurf
**express**: http://expressjs.com/en/4x/api.html
**express-session**: https://github.com/expressjs/session
**express-ws**: https://github.com/HenningM/express-ws
**mongojs**: https://github.com/mafintosh/mongojs
**nunjucks**: http://mozilla.github.io/nunjucks/


text:
<img src="/logo.svg" width="64px" height="64px"/>

[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)
[![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/syncem)](http://www.rultor.com/p/yegor256/syncem)
[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)

[![Build Status](https://travis-ci.org/yegor256/syncem.svg)](https://travis-ci.org/yegor256/syncem)
[![Build status](https://ci.appveyor.com/api/projects/status/m7hisfd90tpc198s?svg=true)](https://ci.appveyor.com/project/yegor256/syncem)
[![Gem Version](https://badge.fury.io/rb/syncem.svg)](http://badge.fury.io/rb/syncem)
[![Maintainability](https://api.codeclimate.com/v1/badges/5528e182bb5e4a2ecc1f/maintainability)](https://codeclimate.com/github/yegor256/syncem/maintainability)
[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://rubydoc.info/github/yegor256/syncem/master/frames)

[![Hits-of-Code](https://hitsofcode.com/github/yegor256/syncem)](https://hitsofcode.com/view/github/yegor256/syncem)
[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/syncem/blob/master/LICENSE.txt)

Read this blog post:
[_SyncEm: Thread-Safe Decorators in Ruby_](https://www.yegor256.com/2019/06/26/syncem.html).

Sometimes you have an object that is not thread-safe,
but you need to make sure each of its methods is thread-safe, because they
deal with some resources, like files or databases and you want them to
manage those resources sequentially. This small gem will help you achieve
exactly that without any re-design of the objects you already have. Just
decorate them with `SyncEm` [thread-safe decorator](https://www.yegor256.com/2017/01/17/synchronized-decorators.html)
and that is it.

First, install it:

```bash
$ gem install syncem
```

Then, use it like this:

```ruby
require 'syncem'
obj = SyncEm.new(obj)
```

That's it.

## How to contribute

Read [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).
Make sure you build is green before you contribute
your pull request. You will need to have [Ruby](https://www.ruby-lang.org/en/) 2.3+ and
[Bundler](https://bundler.io/) installed. Then:

```
$ bundle update
$ bundle exec rake
```

If it's clean and you don't see any error messages, submit your pull request.

gha_language: Ruby


text:
---
layout: post
title: "From Phonology to Syntax: Unsupervised Linguistic Typology at Different Levels with Language Embeddings"
date: 2018-02-23 11:55:44
categories: arXiv_CL
tags: arXiv_CL Embedding Classification Prediction Quantitative
author: Johannes Bjerva, Isabelle Augenstein
mathjax: true
---

* content
{:toc}

##### Abstract
A core part of linguistic typology is the classification of languages according to linguistic properties, such as those detailed in the World Atlas of Language Structure (WALS). Doing this manually is prohibitively time-consuming, which is in part evidenced by the fact that only 100 out of over 7,000 languages spoken in the world are fully covered in WALS.
 We learn distributed language representations, which can be used to predict typological properties on a massively multilingual scale. Additionally, quantitative and qualitative analyses of these language embeddings can tell us how language similarities are encoded in NLP models for tasks at different typological levels. The representations are learned in an unsupervised manner alongside tasks at three typological levels: phonology (grapheme-to-phoneme prediction, and phoneme reconstruction), morphology (morphological inflection), and syntax (part-of-speech tagging).
 We consider more than 800 languages and find significant differences in the language representations encoded, depending on the target task. For instance, although Norwegian Bokm{\aa}l and Danish are typologically close to one another, they are phonologically distant, which is reflected in their language embeddings growing relatively distant in a phonological task. We are also able to predict typological features in WALS with high accuracies, even for unseen language families.

##### Abstract (translated by Google)
语言类型学的核心部分是根据语言特性对语言进行分类，例如世界语言结构图（WALS）中详述的语言。手动操作非常耗时，部分原因在于世界上使用的7000多种语言中只有100种在WALS中完全覆盖。
 我们学习分布式语言表示，可用于大规模多语言的规模预测类型属性。此外，对这些语言嵌入的定量和定性分析可以告诉我们在NLP模型中如何编码不同类型学任务的语言相似性。这些表征以无监督的方式与三种类型的任务一起学习：音韵（字素到音素预测和音素重构），形态学（形态学变形）和句法（词性标注）。
 我们考虑800多种语言，并根据目标任务发现编码的语言表示有显着差异。例如，尽管挪威语和丹麦语在类型上彼此接近，但它们在语音学上相距较远，这反映在语言嵌入在音韵学任务中相对较远的地方。我们还能够以高精确度预测WALS的类型学特征，即使对于看不见的语言家族也是如此。

##### URL
[http://arxiv.org/abs/1802.09375](http://arxiv.org/abs/1802.09375)

##### PDF
[http://arxiv.org/pdf/1802.09375](http://arxiv.org/pdf/1802.09375)


text:
---
title: Shattered Pixel Dungeon v0.9.1!
excerpt: "Hey Dungeoneers, v0.9.1 has been released! v0.9.1 introduces the second tier of the talent system and makes some major improvements to the first tier of talents! There is also a major expansion to the level generation algorithm and a bunch of smaller additions and improvements."

header:
  image: /assets/images/2020/2020-12-11/header.png
  teaser: /assets/images/2020/2020-12-11/header.png
  width: 1260px

#These tags are parsed by Shattered Pixel Dungeon for display in its news feed
tags: ["SHPD_INGAME", "SHPD_ICON_v464: ICON: CHANGES"]
---

![](/assets/images/icons/SHPD.png){: .align-left .rounded} Hey Dungeoneers, v0.9.1 has been released on [Google Play](https://play.google.com/store/apps/details?id=com.shatteredpixel.shatteredpixeldungeon) and [GitHub](https://github.com/00-Evan/shattered-pixel-dungeon/releases)! It should roll out to users on [Amazon](https://www.amazon.com/Shattered-Pixel-Dungeon/dp/B00OH2C21M/) soon as well.

[You can discuss this update on the Pixel Dungeon Subreddit!](https://www.reddit.com/r/PixelDungeon/comments/kbbo2i/)

## What's new in v0.9.1?

v0.9.1 introduces the second tier of the talent system and makes some major improvements to the first tier of talents! There is also a major expansion to the level generation algorithm and a bunch of smaller additions and improvements.

I talked about many of the talent additions and changes in a previous blog: [Coming Soon to Shattered: Levelgen Refinements!](/blog/coming-soon-to-shattered-levelgen-refinements.html)

I also talked about those levelgen improvements in a previous blog: [Coming Soon to Shattered: Tier Two Talents!](/blog/coming-soon-to-shattered-tier-two-talents.html)

Here's a condensed runthrough of the major changes in v0.9.1. You can check out the changes screen in-game for a fully detailed list.

 v0.9.1 is releasing 68 days after v0.9.0, which released on October 5th 2020

 A new tier of talents has been added! 20 new talents that spans levels 7-12

 Substantial improvements have been made to level generation

 The Huntress and Rogue have both had some innate powers moved to talents

 Significant design changes to tier one talents

 9 misc changes

 20+ bugfixes

 Various significant buffs to Battlemage

 Wand of Transfusion buffed and adjusted

 Ring of Energy artifact charging boost up to 15% from 10%

 Rationed Meal health requirement made more strict

 Cave Spinner melee damage reduced to 10-20 from 10-25

## What's coming next?

![](/assets/images/{{page.date|date:'%Y/%Y-%m-%d'}}/stars.png){: .align-center}

The next update to Shattered Pixel Dungeon will be v0.9.2! The main focus of that update will, obviously, be tier three talents, which I'm expecting to span levels 13-20. That will make for 8 points to spend, probably over 6 different talents. Unlike tiers two and one, these talents are going to have a bit more going on, as they'll be influenced not only by your hero, but by your subclass choice as well...

I don't have any definite plans yet, but I may also take the opportunity to make some design improvements to a few hero subclasses. I'm not yet ready to commit to which ones yet as I'll need to see how possible design changes work out in development first.

Also, just as with tier one talents, I plan to keep an eye on how tier two talents and general hero balance goes in v0.9.1 and make adjustments accordingly.

---

[![](/assets/images/icons/patreon.png){: .align-left .rounded}](https://www.patreon.com/ShatteredPixel) If you enjoy Shattered and want to help me keep making it, [please consider supporting me on Patreon!](https://www.patreon.com/ShatteredPixel) Patrons get access to exclusive weekly mini blogs about upcoming updates, and also help determine content direction through community polls! The Patreon has also recently been expanded with monthly Q&A livestreams!


text:
### [CVE-2021-25061](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-25061)
![](https://img.shields.io/static/v1?label=Product&message=WP%20Booking%20System%20%E2%80%93%20Booking%20Calendar&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=2.0.15%3C%202.0.15%20&color=brighgreen)
![](https://img.shields.io/static/v1?label=Vulnerability&message=CWE-79%20Cross-site%20Scripting%20(XSS)&color=brighgreen)

### Description

The WP Booking System WordPress plugin before 2.0.15 was affected by a reflected xss in wp-booking-system on the wpbs-calendars admin page.

### POC

#### Reference
- https://wpscan.com/vulnerability/bd9dc754-08a4-4bfc-8dda-3f5c0e070f7e

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


text:
# ContractSafety

## Checklist

### 1. Contract:

#### 1.1 Is verified on Etherscan?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > Smart contracts are stored on Ethereum blockchain in bytecode (mainly for optimization reasons) so to be sure that the source code of the contract stored on blockchain is the same as the one published on GitHub or on project page, project team should also verifiy it on Etherscan by providing the raw source code. Etherscan than compares the bytecode of this provided source code with bytecode stored on Ethereum blockchain.

#### 1.2 Is ERC-20 compatible?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > If the contract under reviewed is the token contract (not staking contract, dao etc.) it should be compatible with `ERC-20` standard to provide full functionality while using it.

#### 1.3 It is a proxy contract?
  * [ ] `YES`
  * [ ] `NO`

  ##### If yes, what is the address of the current main contract?

  ##### Why does it matter?
  > If the main contract is a proxy contract, its owner is able change contract functionality without changing contract address. While proxy contract is discovered during the review it is obligatory to also find the current contract behind this proxy.

#### 1.4 Allow for renounce ownership?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > Renounce ownership is a good and common pattern for term called "burning keys". When contract owner is able to do this it is a good sign that he will do it in the future, after that no one will be able to interference with this how this smart contract works and no one will be able to call functions with `onlyOwner` modifier.

#### 1.5 Allow minting?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > Function `mint` is part of `ERC20` standard and not always when the contract use it, it is bad sign, however it should always be checked manually to mitigate potential risk. Using this function in malicious manner might lead to increasing supply "on demand" by the contract owner.

#### 1.6 Allow burning?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > Burning tokens also has two side and should always be checked manually to mitigate potential risk. Using this function in malicious manner might lead to decreasing balance on addresses.

#### 1.7 Is pauseable?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > Pausable means that the contract might be paused by the contract owner. It might be caused by security reasons (someone is using contract in unwanted way - diluting it from money) but it might be caused by malicious behaviour of contract owner (when he is trying to block selling for other except him). This function if is present, should always be checked manually to mitigate potential risk.

#### 1.8 Is some kind of whitelist present?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > Some times contract owners have ability to stand out some addresses (for example if contrac owner pause the contract, those addresses would be still able to trade), it is important to check the contract source code for such malicious features. Should always be checked manually to mitigate potential risk.

#### 1.9 Is some kind of blacklist present?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > Some times contract owners have ability to stand out some addresses (for example if some addresses would not be able to trade), it is important to check the contract source code for such malicious features. Should always be checked manually to mitigate potential risk.

#### 1.10 It is generated contract?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > Generated contract means that contract owner do not code it from scratch, it might mean that the owner do not have needed skills to deal it with his own. There are situation that generated contracts are good for some cases but definietly should not be used for collecting eths from community.

#### 1.11 How contract was funded (DEX, CEX, TornadoCash etc.)?
  * [ ] `DEX`
  * [ ] `CEX`
  * [ ] `TornadoCash`
  * [ ] `External address`
  * [ ] `Contract address`
  ##### Why does it matter?
  > Especially, from where contract owner received eths needed for contract deployment. If from CEX it might be possible to track him in case of rug pull, for example if contract owner address received funds from Tornado Cash (flow anonymizer) it might means that owner want to stay as anonymous as possbile (also for tracking in case of rug pull).

### 2. Owner:

#### 2.1 It is a contract or external address?
  * [ ] `contract (multisig, dao)`
  * [ ] `external address`
  ##### Why does it matter?
  > If the contract owner is also a contract, it might mean that some kind of decentralized management is used for this contract (still needs some manual checks). External address always mean centralized management and should not be considered as a good practice.

#### 2.2 Is deployer of this contract?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > If the contract owner address is different than deployer address it might mean that contract development was outsource outside the project. It is hard to define if it is good ar bad approach, this is information should be taken into account during further project research.

#### 2.3 Are management keys burnt?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > If private keys to the contract owner address are burnt no one could change anything in the contract and no one is able to call functions from this contract.

### 3. Liquidity:

#### 3.1 Available on Uniswap?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > Availbility on DEXes like Uniswap is very important because confirms project liquidity and also means that someone have to put some part of his eths to provide liquidity on automated market maker service like DEX (Uniswap, Sushiswap etc.).

#### 3.2 Is locked (TeamFinance, UniCrypt)?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > Locked liquidity means that until some defined time nobody would be able to remove provided liquidity from DEX. It is worth to mention that if some token is available to trade on single DEX only, removing liquidity means that trades will not be possible anymore (token holders are left with worthless tokens).

### 4. Holders:

#### 4.1 Is Uniswap first?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > If Uniswap or other DEX is main hodler it mainly means that nobody is able to dump or pump the price.

#### 4.2 Is owner a main holder?
  * [ ] `YES`
  * [ ] `NO`
  ##### Why does it matter?
  > When there is one main hodler (and the contract owner or some external address is) it is very likely that he will try to manipulate the price and for example sell holded tokens cheaper to dump the price and earn some eths.

repository: dianxiang-sun/ContractSafety

repo_name: dianxiang-sun/ContractSafety


text:
# 3D Frogger

This code was implemented as part of RMIT University COSC1186/1187 Interactive 3D Graphics and Animation course.

## Controls:

### All modes

| Key | Action      |
| --- | -----       |
| q   | Exit program|
| b   | Pause/Continue|
| m   | Switch between developer mode and game mode|

### Developer mode

| Key         | Action			                 |
| ----        | -----       	   			 |
| Space       | Jump        	   			 |
| v           | Toggle debug mode 			 |
| o           | Toggle axes       			 |
| n           | Toggle normals and the parabola tangent  |
| p           | Toggle wireframe			 |
| l           | Toggle lightining			 |
| w           | Increase speed				 |
| s           | Decrease speed				 |
| a           | Increase angle				 |
| d    	      | Decrease angle				 |
| j    	      | Switch the jumping integration mode	 |
| Left mouse  | Rotate camera				 |
| Left arrow  | Rotate frog left			 |
| Right mouse | Zoom camera				 |
| Right arrow | Rotate frog right			 |

### Game mode

	| Key              | Action			         |
	| ----             | -----       	   		 |
	| w/Up arrow       | Front jump				 |
	| s/Down arrow     | Back jump				 |
	| a/Left arrow     | Left jump				 |
	| d/Right arrow    | Right jump				 |
	| Mouse right/left | Rotates camera around Y axis	 |

## Build

Simple compilation with gcc compiler:

    $ make

## Credits

Some textures and models used are based on creative commons that can be found *[here][LINK1]*, *[here][LINK2]* and *[here][LINK3]*

## Dependencies

This project depends on `OpenGL` libraries to compile.

Therefore, please make sure you have the packages *[OpenGL][OPENGL_LINK]*.

[LINK1]: http://www.theairtightgarage.net/index_textures.html
[LINK2]: http://www.123dapp.com/3dcr-Creature/Racing-frog-8/1625190
[LINK3]: http://www.123dapp.com/123C-3D-Model/Old-Fashioned-Convertible/1124556
[OPENGL_LINK]: https://www.opengl.org/


text:
Doc.Ti=Mutual Non-Disclosure Agreement for Consulting Discussion

P1.=[G/U/Who/acme_incorporated.md]

P2.=[G/U/Who/quake_incorporated.md]

_P1=Acme

_P2=Quake

Doc.GUID=AcmeQuake-0001

EffectiveDate.YMD=2020-12-21

Purpose.cl=to discuss a possible consulting arrangement relating to contract automation

ConfInfo.IdentifyInWriting.Within.days=5 business days

ConfInfo.Include.Specified.cl=information relating to contracts and contract relations and performance of Acme

Conf.Life.End.YMD=2021-06-30

Law.State.the=the State of California

Dispute.Forum.cl=the state and federal courts for San Mateo County, California

Annex.Div=

=[G/NW-NDA/US/00/EN/Form/TechContracts.md]

repository: CommonAccord/Cmacc-Org

gha_language: CSS

repo_name: CommonAccord/Cmacc-Org