text:
# Getting started

## Introduction

In this guide, we'll build a small distributed App \(DApp\) from the ground up using the [Java client library](https://github.com/radixdlt/radixdlt-java). The techniques you’ll learn in this tutorial are fundamental to make any DApp on [Radix](http://www.radixdlt.com/), and mastering it will give you a better understanding of the Radix distributed ledger.

The guide is divided into several sections:

* ****[**Basic Setup**](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/javascript-client-library/quick-start.md#basic-setup) will give you a starting point to follow the tutorial.
* ****[**Overview**](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/javascript-client-library/quick-start.md#overview) will teach you the fundamentals of Radix's architecture.
* ****[**Building a ChatBot**](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/guides/get-started.md#building-a-chatbot) will show you how to make your first basic DApp.
* ****[**Beyond the basics**](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/javascript-client-library/quick-start.md#beyond-the-basics) will give you additional examples to acquire a deeper understanding of the Java library.

### About our example DApp

As our example DApp for this guide, we'll be building a simple ChatBot that receives and replies messages sent to a specific Radix address. With our small ChatBot DApp you'll learn to:

* Bootstrap and connect to the Radix Distributed Ledger
* Create a Radix [Identity](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/learn/glossary.md#identity)
* Create a Radix [Address](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/learn/glossary.md#address) from this identity
* Send and receive encrypted messages to other Radix addresses

Don't worry if you're new to Radix's concepts, as we will review the basic building blocks along the way.

## Basic setup

Our first step is to set you up so you can start building your first Java DApp with Radix.

### Installation

You can install the **`radixdlt-java`** library via gradle:

```java
repositories {
    maven { url 'https://jitpack.io' }
}
```

```java
implementation 'com.radixdlt:radixdlt-java:0.9.3'
```

### Recommendations

For this guide, we will assume that you have some familiarity with Java, but you should be able to follow along even if you’re coming from a different programming language.

{% hint style="success" %}
If you need to review Java, we recommend reading [this guide](https://www.learnjavaonline.org/).
{% endhint %}

We’ll also assume that you’re familiar with programming concepts like functions, objects, arrays, and classes. Additionally, knowledge of reactive and observable patterns is helpful but not required.

## Overview

Now that you’re set up, feel free to review our glossary so we can share a common language:

{% hint style="success" %}
**Tip:** if you're new to Radix we suggest to take a minute and dig into the concepts that make Radix a unique distributed ledger technology.
{% endhint %}

* [Universe](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/learn/glossary.md#universe)
* [Shards](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/learn/glossary.md#shard)
* [Nodes](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/learn/glossary.md#nodes)
* [Atoms](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/learn/glossary.md#atoms)
* [Account](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/learn/glossary.md#account)
* [Address](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/learn/glossary.md#address)
* [Identity](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/learn/glossary.md#identity)

## Building a ChatBot

Now that we have done a brief overview of the concepts behind Radix and we share a common language, we are ready to begin building our example ChatBot DApp using the **`radixdlt-java`** library.

### Connecting to the network

The first step, before we can interact with the ledger, is to choose which [Universe](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/guides/get-started.md#universe) we want to connect to. In this case, we will use the **ALPHANET** universe configuration since it's our main testing environment.

We start by creating a ChatBot class and initializing the connection to a Radix Universe using the `RadixUniverse.bootstrap()` method:

```java
import com.radixdlt.client.core.RadixUniverse;

public class ChatBot {
    static {
        RadixUniverse.bootstrap(Bootstrap.ALPHANET);
    }

    public ChatBot() {
    }
}
```

This will initialize the connections to the network via the bootstrap nodes available on the **ALPHANET**.

### Creating a Radix Identity

Next, we need to generate a `RadixIdentity` which will handle the private/public key logic on behalf of the ChatBot. We do it by calling the `SimpleRadixIdentity()` constructor:

```java
public class ChatBot {
    static {
        RadixUniverse.bootstrap(Bootstrap.ALPHANET);
    }

    public ChatBot() throws IOException {
        // Load Identity
        final RadixIdentity chatBotIdentity = new SimpleRadixIdentity("chatbot.key");
    }
}
```

{% hint style="info" %}
**Note:** the`chatbot.key` file is where the private key will be saved and loaded.
{% endhint %}

### Creating a Radix Address

Now, using the public key of the identity, we can generate a unique Radix [address](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/learn/glossary.md#address), which is the ChatBot's unique identifier in the Radix Universe.

```java
public class ChatBot {
    static {
        RadixUniverse.bootstrap(Bootstrap.ALPHANET);
    }

    private final RadixAddress address;

    public ChatBot() throws IOException {
        // Load Identity
        final RadixIdentity chatBotIdentity = new SimpleRadixIdentity("chatbot.key");
        final ECPublicKey publicKey = chatBotIdentity.getPublicKey();
        this.address = RadixUniverse.getInstance().getAddressFrom(publicKey);
    }
}
```

### Receiving messages

Once we have created an address for the ChatBot, we can begin to receive messages. To get a message we need to:

* Initialize Radix Messaging module
* Subscribe a listener to our address
* Decrypt each message \(using our identity\)
* Print every message we receive

```java
public class ChatBot {
    static {
        RadixUniverse.bootstrap(Bootstrap.ALPHANET);
    }

    private final RadixAddress address;

    public ChatBot() throws IOException {
        // Load Identity
        final RadixIdentity chatBotIdentity = new SimpleRadixIdentity("chatbot.key");
        final ECPublicKey publicKey = chatBotIdentity.getPublicKey();
        this.address = RadixUniverse.getInstance().getAddressFrom(publicKey);

        // Subscribe/Decrypt messages
        final Observable<RadixMessage> messageObservables = RadixMessaging.getInstance()
            .getAllMessagesDecrypted(chatBotIdentity);

        // Print messages
        messageObservables.subscribe(System.out::println);
    }
}
```

### Sending messages

Now that the ChatBot can receive messages, we can make the bot reply by sending a message back to the sender. We do this by:

* Subscribing another listener to our address
* Filtering messages \(so we don't respond to our own messages\)
* Creating and sending an encrypted echo message to the original sender

```java
public class ChatBot {
    static {
        RadixUniverse.bootstrap(Bootstrap.ALPHANET);
    }

    private final RadixAddress address;

    public ChatBot(Function<String,String> chatBotAlgorithm) {
        // Load Identity
        final RadixIdentity chatBotIdentity = new SimpleRadixIdentity("chatbot.key");
        final ECPublicKey publicKey = chatBotIdentity.getPublicKey();
        this.address = RadixUniverse.getInstance().getAddressFrom(publicKey);

        // Subscribe/Decrypt messages
        final Observable<RadixMessage> messageObservables = RadixMessaging.getInstance()
                                                                    .getAllMessagesDecrypted(chatBotIdentity);

        // Print messages
        messageObservables.subscribe(System.out::println);

        // Chatbot replies
        messageObservables
            .filter(message -> !message.getFrom().equals(address)) // Don't reply to ourselves!
            .filter(message -> Math.abs(message.getTimestamp() - System.currentTimeMillis()) < 60000) // Only reply to recent messages
            .subscribe(message ->
                RadixMessaging.getInstance()
                    .sendMessage(chatBotAlgorithm.apply(message.getContent()), chatBotIdentity, message.getFrom());
    }
}
```

### Finishing touches

At this point, we have all the basic building blocks for our simple ChatBot DApp. Now, to have a complete and functional DApp, let's add some finishing touches:

* Use a `Function<String,String>` to represent the ChatBot algorithm to make it easily extensible
* Build a `main` method to run and test by sending a message to its address

```java
import com.radixdlt.client.core.Bootstrap;
import com.radixdlt.client.core.RadixUniverse;
import com.radixdlt.client.core.address.RadixAddress;
import com.radixdlt.client.core.crypto.ECPublicKey;
import com.radixdlt.client.core.identity.OneTimeUseIdentity;
import com.radixdlt.client.core.identity.RadixIdentity;
import com.radixdlt.client.core.identity.SimpleRadixIdentity;
import com.radixdlt.client.core.network.AtomSubmissionUpdate;
import com.radixdlt.client.messaging.RadixMessage;
import com.radixdlt.client.messaging.RadixMessaging;
import io.reactivex.Observable;
import io.reactivex.ObservableSource;
import java.util.function.Function;

public class ChatBot {
    static {
        RadixUniverse.bootstrap(Bootstrap.ALPHANET);
    }

    private final RadixAddress address;

    public ChatBot(Function<String,String> chatBotAlgorithm) throws Exception {
        // Load Identity
        final RadixIdentity chatBotIdentity = new SimpleRadixIdentity("chatbot.key");
        final ECPublicKey publicKey = chatBotIdentity.getPublicKey();
        this.address = RadixUniverse.getInstance().getAddressFrom(publicKey);

        // Subscribe/Decrypt messages
        final Observable<RadixMessage> messageObservables = RadixMessaging.getInstance()
            .getAllMessagesDecrypted(chatBotIdentity);

        // Print messages
        messageObservables.subscribe(System.out::println);

        // Chatbot replies
        messageObservables
            .filter(message -> !message.getFrom().equals(address)) // Don't reply to ourselves!
            .filter(message -> Math.abs(message.getTimestamp() - System.currentTimeMillis()) < 60000) // Only reply to recent messages
            .flatMap((io.reactivex.functions.Function<RadixMessage, ObservableSource<AtomSubmissionUpdate>>) message ->
                RadixMessaging.getInstance().sendMessage(chatBotAlgorithm.apply(message.getContent() + " from Bot!"), chatBotIdentity, message.getFrom())
            ).subscribe(System.out::println, Throwable::printStackTrace);
    }

    public static void main(String[] args) throws Exception {
        ChatBot chatBot = new ChatBot(Function.identity());
        System.out.println("Chatbot address: " + chatBot.address);

        // Send message to bot
        RadixIdentity oneTimeUseIdentity = new OneTimeUseIdentity();
        RadixMessaging.getInstance()
            .sendMessage("Hello World", oneTimeUseIdentity, chatBot.address)
            .subscribe(System.out::println);
    }
}
```

Running this will produce output similar to this:

```text
Chatbot address: JGX2vijpLPBqTbtbznT81MGM7vVSDNDT95xHuChVdHnGzk9vBie
JGePib7zXBWa4ExNkpCmMbfkNy8H6UP351gMsdoYMgsrGUC43aB -> JGX2vijpLPBqTbtbznT81MGM7vVSDNDT95xHuChVdHnGzk9vBie: Hello World
JGX2vijpLPBqTbtbznT81MGM7vVSDNDT95xHuChVdHnGzk9vBie -> JGePib7zXBWa4ExNkpCmMbfkNy8H6UP351gMsdoYMgsrGUC43aB: Hello World from Bot!
```

Congratulations! You have now created a ChatBot connected to the Radix Network.

## Beyond the basics

As we reach the end of our DApp example, we want to share some extra code snippets for those who want to go beyond the basics and showcase a few additional things that you can do with our library.

### Code examples

* **General**
  * [Initializing a Universe](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/guides/code-examples.md#initializing-a-universe)
* **Manage identities**
  * [Creating an Identity](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/guides/code-examples.md#creating-an-identity)
* **Manage transactions**
  * [Storing and retrieving data](https://github.com/radixdlt/radixdlt-java-docs/tree/a4d56556f33e1b032300053d7d2d93e551dab2e6/guides/code-examples.md#storing-and-retrieving-data)


text:
---
title: "deleteObject"
description: ""
layout: "method"
tags:
    - "method"
    - "sldn"
    - "Scale"
classes:
    - "SoftLayer_Scale_Asset"
aliases:
    - "/reference/services/softlayer_scale_asset/deleteObject"
---
# [SoftLayer_Scale_Asset](/reference/services/SoftLayer_Scale_Asset)::deleteObject

Delete this group asset.

## Overview

-----

### Parameters
|Name | Type | Description |
| --- | --- | --- |

### Required Headers
* authenticate
* SoftLayer_Scale_AssetInitParameters

### Return Values
* boolean

branch_name: refs/heads/master

extension: md

gha_language: HTML

gha_license_id: NOASSERTION

license_type: permissive


text:
---
title: "The today(), card() and display() methods"
layout: ../../layouts/Main.astro
---

TrashDash allows your module class to expose three methods: `today()`, `card()` and `display()` so that it can be rendered.

Since objects of modules are not created, **these methods should either be a `@staticmethod` or a `@classmethod`**, and if it needs any other methods in the module class, they have to be static too.

## `display()`

Let's take a look at the `display()` method first. The `display()` method allows you to display the method as a screen. The display method must return a `rich.console.RenderableType`, which can be a rich module (like `Align` or `Padding`), or a rich-formatted string.

To get started, add the `display()` method to your module class

```python
from rich.align import Align
from rich.console import RenderableType
# ...
class HelloWorldModule(Module):
  # @classmethod - If you need to access other things from this class
  @staticmethod
  def display() -> RenderableType:
    return Align("[b]Hello, world!", "center", vertical="middle")

# ...
```

Now you can view your module by opening TrashDash, pressing `a`, and then the listed keys to open your module.

### Adding a header

You can notice, that while the body of the module is great, the header looks bland, containing only the `display_name` of the module.

Fear not, for TrashDash allows you to edit the header too!

The concerned method is `header()`, and it works similar to the `display()` module, as in, it should be static, and it should return a `RenderableType`, but instead of modifying the body of the screen, it modifies the header.

Let's add a header to our module.

```python
# ...
class HelloWorldModule(Module):
  # This is a class method because I want to access the display_name and description of this module.
  @classmethod
  def header(cls) -> RenderableType:
    return Align(f"{cls.meta.display_name} - {cls.meta.description}")
  # ...
```

And if you restart TrashDash and look at the module, you'll notice that the header at the top has changed!

## `card()`

The `card()` method allows us to display our module as a card. The `card()` method will only work if you set `allow_card` to `True` when registering your module using the `register_module` function.

The `card()` module is similar to the `display()` function again. It has to be static and return a rich renderable. Let's create a card for our module.

```python
from rich.padding import Padding
# ...
class HelloWorldModule(Module):
  @staticmethod
  def card() -> RenderableType:
    return Padding("Hi!", (1, 2))
  # ...
```

You'll need to add your module's name anywhere in the first three elements of the `cards` array in [`settings.toml`](/settings-toml).

```toml
# trash_dash/data/settings.toml
# ...
cards = ["hello_world", "news", "wakatime"]
# ...
```

And now, you should see your card on the screen!

## `today()`

The `today()` method allows your module to be displayed in the Today card. The `today()` method will only work if you set `allow_today` to `True` when registering your module using the `register_module` function.

> Please return one-liners in the `today()` method. This is so that it doesn't occupy too much space and cause content to go off-screen

We're pretty sure that you can implement this method on your own, so give it a try!

If you get confused, you can always look at the other modules that are built-in to TrashDash.

license: MIT

branch_name: refs/heads/main

gha_language: Python

gha_license_id: MIT


text:
---
layout: about
title: about
permalink: /
# subtitle: Affiliations. Address. Contacts. Moto. Etc.

profile:
  align: left
  image: IMG_5533.jpg
  image_circular: false # crops the image to make it circular
  # address: >
  #
555 your office number

  #
123 your address street

  #
Your City, State 12345

news: false  # includes a list of news items
social: true  # includes social icons at the bottom of the page
selected_papers: true # includes a list of papers marked as "selected={true}"
---

## Zheng GU (顾 峥)

I am a Ph.D. candidate at Department of Computer Science and Technology, Nanjing University as a member of [Reasoning and Learning Group](https://cs.nju.edu.cn/rl), advised by [Prof. Yang Gao](https://cs.nju.edu.cn/gaoyang/) and [Dr. Jing Huo](https://cs.nju.edu.cn/huojing).

Currently, I am also a joint Ph.D. at Department of Computer Science and Technology, City Univercity of HongKong, advised by [Prof. Jing LIAO](https://liaojing.github.io/html/index.html).

I received my B.Sc. degree in Computer Science and Technology from Nanjing University in June 2017. My research interests lie in machine learning and computer vision, with a focus on the application and adaptation of generative models.


text:
# Bigenerinoides Zheng in Zheng & Fu, 2001 GENUS

#### Status
ACCEPTED

#### According to
Interim Register of Marine and Nonmarine Genera

#### Published in
in Zheng & Fu, Fauna Sin Granuloreticulosa (Agglutinated Foraminifera): 518.

#### Original name
null

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
This code is based on JVTC. We implement CBN in ``train_cbn.py`` and ``test_cbn.py``.

The original repo: [JVTC](https://github.com/ljn114514/JVTC).

The paper: [Joint Visual and Temporal Consistency for Unsupervised Domain Adaptive Person Re-Identification ECCV 2020](https://arxiv.org/pdf/2007.10854.pdf).


text:
# WebServerPy
A simple web server written in python. It only accepts GET requests and only sends 200 and 404 status codes.

* The default server port is 35698.
* The root is configured to return a index.html file in the directory.
* Every file inside the same folder (and bellow) should be accessible.

Lauch it with:
     ``python WebServer.py``
then access http://localhost:35689

license: Unlicense

repository: bfsgr/webServerPy

repo_name: bfsgr/webServerPy


text:
# Terraform DigitalOcean Swarm Node Module

Terraform module to provision a Docker Swarm cluster node.

## License

[MIT]: https://opensource.org/licenses/MIT

This project is open source software released under the [MIT license][MIT].


text:
---
title : About me
layout : post

---

## Billy Trend

#### Interests

---

#### Education

---

*2012 - Present* : BSc. in Computer Science at the University of St Andrews.

*2007 - 2012* : Norwich School

#### Employment

---

*August 2016 - present* : Bloomberg - .Net developer

*August 2015* : [Fire Tech](http://www.firetechcamp.com/) - Instructor

*June - July 2015* : [Cambridge Consultants](http://www.cambridgeconsultants.com/) - Full stack developer intern

*January 2015* : Solvapli - App developer

*Summer 2014* : cmless.io - self-started web-based cms backed by a stateless database driven api

*Summer 2014* : Web application developer for the St Andrews observatory

*2012 - Present* : [Maths tutor](https://www.firsttutors.com/uk/tutor/billy.maths)

I worked freelance through a tutor website and help 5 students a week to take their exams

*2011 - 2012* : Specialist at [Apple Store, Norwich](http://www.apple.com/uk/retail/chapelfield/)

I went through Apple's world-class retail training and got a fascinating insight into the worlds most valuable company.

*2007 - 2012* : Sailing instructor to adults and children

I was responsible for running accredited sailing courses in a challenging coastal environment. I learnt a lot from the teaching process. I became experienced in explaining even complex


text:
# Attention-based Graph Neural Network in Pytorch

This repo attempts to reproduce the AGNN model described in [Attention-based Graph Neural Network for semi-supervised learning, under review at ICLR 2018](https://openreview.net/pdf?id=rJg4YGWRb)

## Premise
This code implements the exact model and experimental setup described in the paper, but I haven't been able to reproduce their exact results yet.

Ideally the model should reach a 82.6% accuracy on the Cora dataset, with the experimental setup described in the paper and implemented in the code (140 training nodes, 500 validation nodes, 1000 test nodes). If you manage to run the same setup of the paper, let me know your results.

## Requirements

* PyTorch 0.3.0
* Python 2.7

## Usage
```python train.py```

## Acknowledgment
This repo borrows plenty of code from [this repo by Thomas Kipf](https://github.com/tkipf/pygcn).

repository: ghgmail/pytorch-AGNN

repo_name: ghgmail/pytorch-AGNN


text:
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a
Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).

*Note*: certain Spear versions add support for new EventStoreDB features gated
behind new EventStoreDB versions. You should not downgrade your Spear version
in order to avoid these features: Spear aims to keep a stable interface usable
across all EventStoreDB versions v20+.

## [UNRELEASED]

### Added

- Added the `:include_position?` option to `Spear.read_stream/3` to emit a
  `t:Spear.StreamPosition.t/0` after any events
- Added the `:filter` option to `Spear.read_stream/3` and `Spear.stream!/3`
    - This allows one to perform a non-subscription read of the `$all` stream
      and use a server-side filter

These features are not currently released in EventStoreDB.

## 0.10.0 - 2021-08-30

### Added

- Implemented the creation, updating, reading, and deletion of persistent
  subscriptions to the `:all` stream
    - this feature requires EventStoreDB v21.6.0 or later
- Implemented `Spear.append_batch/5` for high-throughput asynchronous appends
    - this feature requires EventStoreDB v21.6.0 or later
    - `Spear.append_batch_stream/2` has also been added for convenience
- Added `Spear.subscribe_to_stats/3` and `c:Spear.Client.subscribe_to_stats/2`
    - this opens a subscription for EventStoreDB monitoring
    - this feature requires EventStoreDB v21.6.0 or later
- Added a dependency on the `:event_store_db_gpb_protobfs` package
    - this package is just a convenience for developing spear: we can
      build gpb definitions for the EventStoreDB protobufs on-the-fly
      via the rebar3 gpb plugin, so we never need to commit the erl/hrl
      files for the generated gpb modules.
    - this also allows other (non-Elixir even) libraries to take advantage
      of versioned, pre-generated gpb definitions for the EventStoreDB
      grpc interface

### Changed

- Non-event read responses are now discarded when reading from a stream
    - this will allow the compatibility of spear v0.10.0 with the next
      release of EventStoreDB
    - this should not change behavior with any existing EventStoreDB
      versions

### Fixed

- Fixed the `Spear.set_global_acl/4` function to correctly append ACL
  data as an event to the `$streams` metadata stream, instead of to
  the `$streams` stream directly.

## 0.9.1 - 2021-06-01

### Added

- Added `Spear.park_stream/2` to the utilities API

### Fixed

- Removed compilation of mint version in user-agent function
    - This could cause a compilation error when using spear as a transitive
      dependency

## 0.9.0 - 2021-04-29

### Added

- Added a `:link` field to the `t:Spear.Event.t/0` struct
    - this is used to provide accurate stream revisions and IDs in projected
      streams as with `Spear.subscribe/4` or in `Spear.ack/3` or `Spear.nack/4`
- Added `Spear.Event.id/1` and `Spear.Event.revision/1` which take a
  `t:Spear.Event.t/0` and give the ID and revision, respectively
    - these new functions respect the new `:link` field and return link
      information instead of event information if the link is present

### Removed

- Removed link metadata from the `Spear.Event.metadata` map's possible `:link`
  field.
    - use the new top-level `:link` field as `Spear.Event.link.metadata`

Note that this may be a breaking change for any consumers depending on the
optional `:link` field in the metadata packet. Consumers should update by
instead matching on a `t:Spear.Event.t/0` struct in the `:link` field of any
event, or by using the new `Spear.Event.id/1` or `Spear.Event.revision/1`
functions.

## 0.8.1 - 2021-04-27

### Added

- Added the link's stream to the `Spear.Event.metadata.link` field

### Fixed

- Fixed some stray references to structs which should be typed as records
- Fixed `Spear.Event.to_checkpoint/1` to carry over the `:subscription` key
  from a `t:Spear.Event.t/0`'s metadata
- Fixed a bug in `Spear.Connection.Configuration` which would incorrectly
  choose the `:http` scheme when the `:tls?` option was set to `true`

## 0.8.0 - 2021-04-26

### Added

- Added the `:read_only?` configuration flag for
  `Spear.Connection.Configuration`
    - this allows one to limit what the `Spear.Connection` will perform to
      read-only operations such as reading streams
- Added link metadata to the `Spear.Event.metadata` packet in a new `:link`
  field

### Fixed

- Fixed the `:from` option in read requests (`Spear.read_stream/3`,
  `Spear.stream!/3` and `Spear.subscribe/4`) to respect the new link information
  in metadata

## 0.7.0 - 2021-04-24

### Added

- Added the subscription reference returned by `Spear.subscribe/4` and
  `Spear.connect_to_persistent_subscription/5` to
    - the metadata map of `t:Spear.Event.t/0` in the path
      `Spear.Event.metadata.subscription`
    - `t:Spear.Filter.Checkpoint.t/0` in a new field `:subscription`
    - the `:eos` tuples in the new shape of
      `{:eos, reference(), :closed | :dropped}`

Note that this is a breaking change for any consumers matching explicitly
on `:eos` tuples. Consumers relying on the prior data shape should update
like so

```diff
- def handle_info({:eos, reason}, state) do
+ def handle_info({:eos, _subscription, reason}, state) do
```

## 0.6.1 - 2021-04-23

### Fixed

- `Spear.stream!/3` now reads `:from` revisions as inclusive
    - e.g. passing some `event` in the stream to `:from` will ensure that the
      first element in the enumerable is `^event`
    - the same principal applies when passing event revisions
    - see #26
    - if this behavior is undesirable, a Spear user may `Stream.drop/2` the
      initial element in the enumerable
- `Spear.connect_to_persistent_subscription/5` now returns an error tuple
  when attempting to connect to a persistent subscription stream and group
  that has not yet been created.
    - the reason is a `Spear.Grpc.Response` struct with a status of `:not_found`

### Added

- Subscriptions may now emit `{:eos, :dropped}` in cases where the EventStoreDB
  explicitly terminates the subscription
    - this can happen if a persistent subscription is deleted while it has
      subscribers actively connected
    - each subscriber will receive `{:eos, :dropped}` in its mailbox

## 0.6.0 - 2021-04-21

### Added

- Added the CRUD portions of persistent subscriptions API
    - `Spear.create_persistent_subscription/5`
    - `Spear.update_persistent_subscription/5`
    - `Spear.delete_persistent_subscription/4`
    - `Spear.list_persistent_subscriptions/2`
    - associated callbacks in `Spear.Client`
- Added subscription functionality for persistent subscriptions
    - `Spear.connect_to_persistent_subscription/5`
    - `Spear.ack/3`
    - `Spear.nack/4`
    - associated callbacks in `Spear.Client`

### Changed

- Moved `Spear.cancel_subscription/3` under the utils API instead of streams
    - This function may also be used to cancel persistent subscriptions

## 0.5.0 - 2021-04-19

### Added

- Added the gossip API
    - this API is very small: just one function `Spear.cluster_info/2`
    - also added `c:Spear.Client.cluster_info/1`
    - under the hood, this also added the ability to decode structured
      UUIDs received from the EventStoreDB, as are received in the
      `Spear.ClusterMember.instance_id` field. See `Spear.Uuid` for the
      interesting implementation.
    - added the record interface `Spear.Records.Gossip`

### Fixed

- Properly grouped free-floating modules under the proper structures and types
  or record interface groupings in the documentation

## 0.4.0 - 2021-04-19

### Fixed

- Updated security guide to use new configuration style

### Added

- Added the operations API
    - `Spear.merge_indexes/2`
    - `Spear.resign_node/2`
    - `Spear.restart_persistent_subscriptions/2`
    - `Spear.set_node_priority/3`
    - `Spear.shutdown/2`
    - `Spear.start_scavenge/2`
    - `Spear.stop_scavenge/3`
    - and associated wrappers in `Spear.Client`

## 0.3.0 - 2021-04-18

### Added

- Added record interface modules for all remaining APIs
- Added functions for interacting with the Users API
    - `Spear.change_user_password/5`
    - `Spear.create_user/6`
    - `Spear.delete_user/3`
    - `Spear.disable_user/3`
    - `Spear.enable_user/3`
    - `Spear.reset_user_password/4`
    - `Spear.update_user/6`
    - `Spear.user_details/3`
    - associated functions in `Spear.Client`

## 0.2.1 - 2021-04-17

### Added

- Wrapped new ACL-related functions in `Spear.Client`
    - `c:Spear.Client.get_stream_metadata/2`
    - `c:Spear.Client.set_stream_metadata/2`
    - `c:Spear.Client.set_global_acl/3`

## 0.2.0 - 2021-04-17

### Changed

- Refactored connection configuration to go through validation
    - `:opts` option has been renamed to `:mint_opts`
    - credentials are passed through the `:connection_string` option or
      as `:username` and `:password` options

### Added

- Implemented and documented keep-alive
    - This can be configured through the `keepAliveInterval` and
      `keepAliveTimeout` query params in `:connection_string` or by the
      new `:keep_alive_interval` and `:keep_alive_timeout` configuration
      options

## 0.1.4 - 2021-04-16

### Added

- `{:eos, :closed}` is now emitted when a subscription is broken due to the
  connection between closed between `Spear.Connection` and EventStoreDB
- `Spear.Connection` now monitors subscription processes and cancels
  EventStoreDB subscriptions upon subscriber process exit

## 0.1.3 - 2021-04-15

### Added

- Added documentation and functionality for using TLS certificates
    - see `Spear.Connection` and the [security guide](guides/security.md)
- Added documentation and functionality for setting the global stream ACL
    - see `Spear.set_global_acl/4` and the `Spear.Acl` module
- Added functionality for getting and setting stream-level metadata.
    - `Spear.meta_stream/1`
    - `Spear.get_stream_metadata/3`
    - `Spear.set_stream_metadata/3`
    - `Spear.StreamMetadata`

## 0.1.2 - 2021-04-14

### Added

- Added dependency on [`connection`](https://hex.pm/packages/connection)
- Added ping functionality for `Spear.Connection`s
    - `Spear.ping/1` and `Spear.ping/2`
    - `c:Spear.Client.ping/0` and `c:Spear.Client.ping/1`
- Added the ability to disconnect a connection by `GenServer.call/3`ing it
  with `:close` as the message
- Added the ability to explicitly reconnect a connection by `GenServer.cast/2`ing
  it a message of `:connect`

### Changed

- Changed the internals of `Spear.Connection` to take advantage of the new
  `Connection` dependency
    - A failure to connect on GenServer init for a connection will no longer
      take down the supervision tree
    - Failures to connect will result in back-off retries in 500ms segments
    - The life-cycle of the HTTP2 connection spawned by a `Spear.Connection`
      is now divorced from the life-cycle of the `Spear.Connection` process

## 0.1.1 - 2021-04-14

### Removed

- Removed dependency on `elixir-protobuf/protobuf`
    - see #4
    - also removed all generated files from protobuf

### Added

- Added dependency on `:gpb`
    - and associated generated erlang files
- Added `Spear.Records.*` interface for interacting with gpb-generated records

## 0.1.0 - 2021-04-12

### Added

- Initial implementation of a client for the streams API
    - all notable functions are labeled with the `since: "0.1.0"` doc
      attribute

repository: sleipnir/spear

repo_name: sleipnir/spear


text:
# google_tpu_node

[back](../google-beta.md)

### Index

- [Example Usage](#example-usage)
- [Variables](#variables)
- [Resource](#resource)
- [Outputs](#outputs)

### Terraform

```terraform
terraform {
  required_providers {
    google-beta = ">= 3.63.0"
  }
}
```

[top](#index)

### Example Usage

```terraform
module "google_tpu_node" {
  source = "./modules/google-beta/r/google_tpu_node"

  # accelerator_type - (required) is a type of string
  accelerator_type = null
  # cidr_block - (optional) is a type of string
  cidr_block = null
  # description - (optional) is a type of string
  description = null
  # labels - (optional) is a type of map of string
  labels = {}
  # name - (required) is a type of string
  name = null
  # network - (optional) is a type of string
  network = null
  # project - (optional) is a type of string
  project = null
  # tensorflow_version - (required) is a type of string
  tensorflow_version = null
  # use_service_networking - (optional) is a type of bool
  use_service_networking = null
  # zone - (optional) is a type of string
  zone = null

  scheduling_config = [{
    preemptible = null
  }]

  timeouts = [{
    create = null
    delete = null
    update = null
  }]
}
```

[top](#index)

### Variables

```terraform
variable "accelerator_type" {
  description = "(required) - The type of hardware accelerators associated with this node."
  type        = string
}

variable "cidr_block" {
  description = "(optional) - The CIDR block that the TPU node will use when selecting an IP\naddress. This CIDR block must be a /29 block; the Compute Engine\nnetworks API forbids a smaller block, and using a larger block would\nbe wasteful (a node can only consume one IP address).\n\nErrors will occur if the CIDR block has already been used for a\ncurrently existing TPU node, the CIDR block conflicts with any\nsubnetworks in the user's provided network, or the provided network\nis peered with another network that is using that CIDR block."
  type        = string
  default     = null
}

variable "description" {
  description = "(optional) - The user-supplied description of the TPU. Maximum of 512 characters."
  type        = string
  default     = null
}

variable "labels" {
  description = "(optional) - Resource labels to represent user provided metadata."
  type        = map(string)
  default     = null
}

variable "name" {
  description = "(required) - The immutable name of the TPU."
  type        = string
}

variable "network" {
  description = "(optional) - The name of a network to peer the TPU node to. It must be a\npreexisting Compute Engine network inside of the project on which\nthis API has been activated. If none is provided, \"default\" will be\nused."
  type        = string
  default     = null
}

variable "project" {
  description = "(optional)"
  type        = string
  default     = null
}

variable "tensorflow_version" {
  description = "(required) - The version of Tensorflow running in the Node."
  type        = string
}

variable "use_service_networking" {
  description = "(optional) - Whether the VPC peering for the node is set up through Service Networking API.\nThe VPC Peering should be set up before provisioning the node. If this field is set,\ncidr_block field should not be specified. If the network that you want to peer the\nTPU Node to is a Shared VPC network, the node must be created with this this field enabled."
  type        = bool
  default     = null
}

variable "zone" {
  description = "(optional) - The GCP location for the TPU. If it is not provided, the provider zone is used."
  type        = string
  default     = null
}

variable "scheduling_config" {
  description = "nested block: NestingList, min items: 0, max items: 1"
  type = set(object(
    {
      preemptible = bool
    }
  ))
  default = []
}

variable "timeouts" {
  description = "nested block: NestingSingle, min items: 0, max items: 0"
  type = set(object(
    {
      create = string
      delete = string
      update = string
    }
  ))
  default = []
}
```

[top](#index)

### Resource

```terraform
resource "google_tpu_node" "this" {
  # accelerator_type - (required) is a type of string
  accelerator_type = var.accelerator_type
  # cidr_block - (optional) is a type of string
  cidr_block = var.cidr_block
  # description - (optional) is a type of string
  description = var.description
  # labels - (optional) is a type of map of string
  labels = var.labels
  # name - (required) is a type of string
  name = var.name
  # network - (optional) is a type of string
  network = var.network
  # project - (optional) is a type of string
  project = var.project
  # tensorflow_version - (required) is a type of string
  tensorflow_version = var.tensorflow_version
  # use_service_networking - (optional) is a type of bool
  use_service_networking = var.use_service_networking
  # zone - (optional) is a type of string
  zone = var.zone

  dynamic "scheduling_config" {
    for_each = var.scheduling_config
    content {
      # preemptible - (required) is a type of bool
      preemptible = scheduling_config.value["preemptible"]
    }
  }

  dynamic "timeouts" {
    for_each = var.timeouts
    content {
      # create - (optional) is a type of string
      create = timeouts.value["create"]
      # delete - (optional) is a type of string
      delete = timeouts.value["delete"]
      # update - (optional) is a type of string
      update = timeouts.value["update"]
    }
  }

}
```

[top](#index)

### Outputs

```terraform
output "cidr_block" {
  description = "returns a string"
  value       = google_tpu_node.this.cidr_block
}

output "id" {
  description = "returns a string"
  value       = google_tpu_node.this.id
}

output "network" {
  description = "returns a string"
  value       = google_tpu_node.this.network
}

output "network_endpoints" {
  description = "returns a list of object"
  value       = google_tpu_node.this.network_endpoints
}

output "project" {
  description = "returns a string"
  value       = google_tpu_node.this.project
}

output "service_account" {
  description = "returns a string"
  value       = google_tpu_node.this.service_account
}

output "zone" {
  description = "returns a string"
  value       = google_tpu_node.this.zone
}

output "this" {
  value = google_tpu_node.this
}
```

[top](#index)

repository: chadwickalex/tfwriter

repo_name: chadwickalex/tfwriter


text:
# delay_decorator
A decorator for delayed function executing.  [中文README.md](README_zh.md)

## What's delay_decorator?

`delay_decorator` is a decorator that is a substitute of Scheduler model of python standard lib.

Auto delay the Function execution for a certain period time.
The new function will replace the older one and reset the countdown of the delay time. `Support python 2.7 ~ python3.5`.

Here's an example of how you might use delay_decorator:

```python

import time
from delay import Delayer

if __name__ == "__main__":

    @Delayer.delay(4)
    def test(key):
        print("The thread: {key} run at {time}".format(key=key, time=str(time.time())))

    print("Now:" + str(time.time()))
    test("First")  # will run after 4 seconds

    time.sleep(5)
    print("Now:" + str(time.time()))
    test("Second")  # Won't run
    time.sleep(2)
    test("Third")   # will run after 6 seconds

```

Some config:

```python
@Delayer.delay(delay_time = delay_time)
```

 - **`delay_time`**: how many seconds to delay. Default is `5`.

## How to Install and Use?

### Install

Three ways to install delay_decorator:

#### 1. Use tool install

 - `pip install delay_decorator`

#### 2. Download to install

 - Download from [https://pypi.python.org/pypi/delay_decorator/](https://pypi.python.org/pypi/delay_decorator/), and run `python setup.py install`.

#### 3. Manual installation

 - Manual installation: Put `delay` folder into current directory or `site-packages`, then `import delay` to use.

### Usage

#### Decorators

```python

import Delayer
@Delayer.delay(delay_time = delay_time)
def need_to_be_delay_function():
	pass    # no returns

```


text:
# ping
A Portable Network Graphics (PING) Library

## Overview
**ping** is a lightweight and extensible library for working at the chunk level of a Portable Network
Graphics formatted image.

## Specification
The [PNG (Portable Network Graphics) Specification, Version 1.2](http://www.libpng.org/pub/png/spec/1.2/PNG-Contents.html),
was used as the basis for this lightweight and extensible library.

## Naming Conventions
In weighing de facto Java naming conventions versus clarity of the type of PNG chunk being manipulated, I selected
to follow the PNG standards and name various chunk files verbatim. In other words, the class that maps the PNG
International textual data, iTXt, has a Java class name that aligns with the the PNG specification,
i.e. _iTXtChunk.java_.

repository: tacomafour/ping

repo_name: tacomafour/ping


text:
# poc-tooling

Repository containing the tooling for showcasing the end-to-end POC demo

### Start the full test environment:
`docker-compose up --build -d`

This will start:
- kafka zookeeper
- kafka broker
- python data generator
- flink cluster

### Utility scripts:

`e2edemo.sh`
 Run end-to-end demo pipeline

`build-new-jar.sh`
 Build a new jar and replace `streaming-monitor.jar`

`submit-job.sh`
 Submit the `streaming-monitor.jar` to the flink cluster
### Versions:

- `Kafka 2.7.0`

### Endpoints

Flink UI: http://localhost:8081

repository: sintezcs/soda-streaming

repo_name: sintezcs/soda-streaming


text:
# sails.io.java

[ ![Download](https://api.bintray.com/packages/joshuamarquez/maven/sails.io.java/images/download.svg) ](https://bintray.com/joshuamarquez/maven/sails.io.java/_latestVersion)

This is an implementation of [sails.io.js](https://github.com/balderdashy/sails.io.js) in Java for communicating w/ [Sails](https://github.com/balderdashy/sails/) via sockets

## Installation

### Gradle

Add it as a gradle dependency, in `build.gradle`.

```groovy
compile 'me.joshuamarquez:sails.io.java:0.4.1'
```

### Maven

Add the following dependency to your `pom.xml`.

```xml
<dependency>
  <groupId>me.joshuamarquez</groupId>
  <artifactId>sails.io.java</artifactId>
  <version>0.4.1</version>
  <type>pom</type>
</dependency>
```

## Usage

```java
// Create socket instance.
SailsSocket sailsSocket = new SailsSocket(url);

// Connect socket.
sailsSocket.connect();

// Make GET request.
sailsSocket.get("MyTAG", "/path", null, new SailsSocketResponse.Listener() {
    @Override
    public void onResponse(JWR response) {
        if (response.isError()) {
            // hadle error
        }

        System.out.println(respose.getBody().toString());
    }
});
```

**Note: A tag should be provided to each request in order to be possible to remove requests later if they are in request queue due to lack of connection.**

## Properties

### Headers

Dictionary of headers to be sent by default with every request. Can be overridden the headers option in `.request()`.

Create headers.

```java
private Map<String, String> headers = new HashMap<String, String>() {
    {
        put("Accept", "application/json");
        put("x-header", "bar");
    }
};
```

#### Setting socket headers

This headers will be append to all requests made by this socket.

```java
// Set socket headers.
SailsSocket sailsSocket = new SailsSocket(url, opts);
headers.put("Accept", "application/json");
sailsSocket.setHeaders(headers);
```

#### Setting request headers

You can set or override global headers and socket headers by request.

```java
Map<String> headers = new HashMap<String, String>();
headers.put("x-test-header-one", "baz");

SailsSocket sailsSocket = new SailsSocket(url, opts);
sailsSocket.request("MyTAG", SailsSocketRequest.METHOD_GET, "/path", null, headers,
    new SailsSocketResponse.Listener() {
        @Override
        public void onResponse(JWR response) { }
    });
```

### Initial connection headers

Dictionary of headers to be sent with the initial connection to the server.

In server code, these can be accessed via `req.socket.handshake.headers` in controller actions or `socket.handshake.headers` in [socket lifecycle callbacks.](http://sailsjs.org/documentation/reference/configuration/sails-config-sockets)

```java
SailsSocket sailsSocket = new SailsSocket(url, opts);
sailsSocket.get("MyTAG", "/path", null, new SailsSocketResponse.Listener() {
    @Override
    public void onResponse(JWR response) { }
});

// Set iniaitialConnectionHeaders
sailsSocket.connect(new HashMap<String, List<String>>() {
    {
        put("cookie", Arrays.asList("foo=1;"));
    }
});
```

### Query

Query string to use with the initial connection to the server.

In server code, this can be accessed via `req.socket.handshake.query` in controller actions or `socket.handshake.query` in [socket lifecycle callbacks.](http://sailsjs.org/documentation/reference/configuration/sails-config-sockets)

```java
// Set query options
IO.Options options = new IO.Options();
options.query = "x-query={\"foo\":\"bar\"}";

SailsSocket sailsSocket = new SailsSocket(url, options);
sailsSocket.get("MyTAG", "/path", null, new SailsSocketResponse.Listener() {
    @Override
    public void onResponse(JWR response) { }
});
```

## SailsSocket Methods

### Basic methods

`.get`, `.post`, `.put` and `.delete` request methods are available. All request should include in this order:

* `TAG`: Set a tag on this request. Can be used to cancel all requests with this tag.
* `url`: destination URL.
* `params`: parameters to send with the request, can be `null`.
* `listener`: listener to call with the response when finished.

`.on()` and `.off()` [socket.io-client-java](https://github.com/socketio/socket.io-client-java) methods are also available.

All methods above use `.request(tag, method, url, params, headers, listener)` internally to build their request.

### Advanced methods

In addition to the basic communication / event listening methods, each SailsSocket instance exposes some additional methods.

#### `.removeRequestsByTag()`

Removes all requests in this queue with the given tag.

```java
sailsSocket.removeRequestsByTag("MyTAG");
```

#### `.removeAllRequests()`

Removes all pending request in queue.

```java
sailsSocket.removeAllRequests();
```

#### `.getSocket()`

Returns Socket.IO instance of SailsSocket.

```java
sailsSocket.getSocket();
```

#### `.isConnected()`

Determines whether the SailsSocket instance is currently connected to a server, returning true if a connection has been established.

```java
sailsSocket.isConnected();
```

#### `.disconnect()`

Disconnect a SailsSocket instance from the server. Will throw an error if the socket is already disconnected.

```java
sailsSocket.disconnect();
```

#### `.reconnect()`

Reconnect a SailsSocket instance to a server after being disconnected.

```java
sailsSocket.reconnect();
```

## JWR

The JWR (JSON WebSocket Response) received from a Sails server.

#### `.isError()`

`true` if response comes with status code of error type.

#### `.getStatusCode()`

Returns response status code as `int`.

#### `.getHeaders()`

Response headers `Map<String, String>`.

#### `.getBody()`

Response body as `Object`.

Example:

```java
sailsSocket.get("MyTAG", "/path", null, new SailsSocketResponse.Listener() {
    @Override
    public void onResponse(JWR response) {
        if (!response.isError()) {
          // success!
        } else {
            // Show Error
            System.out.println(String.format("Status: %d, Response: %s", response.getStatusCode(),
                response.getBody().toString()));
        }
    }
});
```

## TODO

* Overload socket RESTful methods to make `params` optional.
* Make tests for socket request queue.
* Gson support in JWR body
* Make `URL` and `Options` behave like `initialConnectionHeaders` (Global, Socket).
* Make `query` option from `Options` available like `initialConnectionHeaders` is.
* Improve design to make the usage of sockets easier.
* Create Listener for Events with Generics and Gson support.

## License

MIT

gha_language: Java


text:
# DNS-Sinkhole-Lists-A2 [deprecated]

![Logo](https://images2.imgbox.com/f7/d1/eTBopT91_o.png)

## Important News 📰

🛑 This repo is no longer maintained.

🥶 The repo is archived, I don't expect to do more work on it.

### (as of April 7, 2020)

I've made the final decision to deprecate this repo since it isn't achieving my expected outcomes. No more commits will be made.

My new repo is up at: <https://github.com/hl2guide/Filterlist-for-AdGuard>

I advise that you consider making the switch (like I have) to using one of AdGuard's free products:
- AdGuard Home: https://github.com/AdguardTeam/AdGuardHome/wiki/Getting-Started#installation
- Browser Extension: https://adguard.com/en/adguard-browser-extension/overview.html
- AdGuard DNS (in Beta): https://adguard.com/en/adguard-dns/overview.html

## Description 📚

A collection of DNS Sinkhole lists for testing purposes.\
(not for use in production systems)

Lists are combined, cleaned, duplicates are removed and then are sorted alphabetically (nice and clean).

Each combined list consist of zones and domains in plaintext (not HOSTS text format) with one domain per line.

**These combined lists are not for use with the Windows HOSTS file**

A PowerShell script generates the lists and then commits to this repository about every 6 hours.

**It's too early for production usage therefore unless you're a tester please don't use it until it matures to version 1.0.**

There are four options:
 - combined (Australia and US users) **[my 1st recommendation]**
 - combined international (all other countries) **[my 2nd recommendation]**
 - combined (Australia and US users) - *Social Media Allowed*
 - combined international (all other countries) - *Social Media Allowed*

This **readme** created using https://stackedit.io

## How it Works ❓

The combined list contains:

1) a list of blocked TLDs (acts the basis)
2) a blacklist that contains blocked sites that are in trusted zones (e.g. .com)

Testers can test in these supported HOSTS/domain managers:

- DNS66 (Android, requires F-Droid app store)
- Technitium DNS Server (Windows or Linux)
- A PiHole device

Testers please use **only one** of the below raw text links.

## Combined List Files 🗃

Pick one appropriate list from the below four:

| File Name | Description |
|--|--|
| [*COMBINED_LISTS_GENERATED/
0_combined_blocklist.txt*](https://raw.githubusercontent.com/hl2guide/DNS-Sinkhole-Lists-A2/master/COMBINED_LISTS_GENERATED/0_combined_blocklist.txt) | contains 'block_list', 'tld_blocklist'
and 'tld_most_abused' and 'typosquatting_blocklist'
*(users within North America or Australia)* |
| [*COMBINED_LISTS_GENERATED/
0_combined_blocklist_international.txt*](https://raw.githubusercontent.com/hl2guide/DNS-Sinkhole-Lists-A2/master/COMBINED_LISTS_GENERATED/0_combined_blocklist_international.txt) | ditto but for international users
*(users who are outside of North America and Australia)* |
| [*COMBINED_LISTS_GENERATED/
0_combined_blocklist
(social media allowed).txt*](https://raw.githubusercontent.com/hl2guide/DNS-Sinkhole-Lists-A2/master/COMBINED_LISTS_GENERATED/0_combined_blocklist%20%28social%20media%20allowed%29.txt) | contains 'block_list', 'tld_blocklist_international'
and 'tld_most_abused' and 'typosquatting_blocklist'
*(users within North America or Australia) - Social Media Allowed [not recommended]* |
| [*COMBINED_LISTS_GENERATED/
0_combined_blocklist_international
(social media allowed).txt*](https://raw.githubusercontent.com/hl2guide/DNS-Sinkhole-Lists-A2/master/COMBINED_LISTS_GENERATED/0_combined_blocklist_international%20%28social%20media%20allowed%29.txt) | ditto but for international users
*(for users outside of North America and Australia)  - Social Media Allowed [not recommended]* |

## Separated List Files 📂

For reference only.

| File Name | Description |
|--|--|
| [*allowed_zones.txt*](https://raw.githubusercontent.com/hl2guide/DNS-Sinkhole-Lists-A2/master/allowed_zones.txt) | the *whitelist* of domains that are allowed |
| [*block_list.txt*](https://raw.githubusercontent.com/hl2guide/DNS-Sinkhole-Lists-A2/master/block_list.txt)  | the **blacklist** for blocking base zones and then bad domains that fit into allowed zones (e.g. ending with .com) |
| [*tld_blocklist.txt*](https://raw.githubusercontent.com/hl2guide/DNS-Sinkhole-Lists-A2/master/tld_blocklist.txt) | a list of **blocked TLDs** |
| [*tld_blocklist_international.txt*](https://raw.githubusercontent.com/hl2guide/DNS-Sinkhole-Lists-A2/master/tld_blocklist_international.txt) | a list of **blocked TLDs** (international version) |
| [*tld_most_abused.txt*](https://raw.githubusercontent.com/hl2guide/DNS-Sinkhole-Lists-A2/master/tld_most_abused.txt) | a list of the **most abused TLDs** |
| [*typosquatting_blocklist*](https://raw.githubusercontent.com/hl2guide/DNS-Sinkhole-Lists-A2/master/typosquatting_blocklist.txt) | a list of often mistyped domains for popular websites |

## Changelog 📜

### 26-11-2019 at 5PM AEST
- Extended testing phase out to at least March 2020

### 12-11-2019 at 5PM AEST
- Added more lists
- Cleaned up repo structure

### 05-10-2019 at 4PM AEST
- Added typosquatting domains for popular games to typosquatting list

### 23-09-2019 at 2AM AEST

- Rewrote the generator script to be modular and optimized
- Added typosquatting domains for frequently mistyped for the world's most popular websites
- Renamed blocklists for clarity and providing a table for options

### 27-08-2019 at 10PM AEST

- Added the world's most popular TLDs into the filter for included lists during generation

## Credits 😀

Credit and copyright belongs to the below list creators. Thanks for their tireless work :D

## Included Lists 🗂

AdGuard Ad Domains\
Blocks ad serving domains.\
https://raw.githubusercontent.com/justdomains/blocklists/master/lists/adguarddns-justdomains.txt

AdHell List\
Blocks ad serving domains.\
https://getadhell.com/standard-package.txt

AnudeepND Blacklist\
Block ads, tracking and cryptomining domains.\
https://raw.githubusercontent.com/anudeepND/blacklist/master/adservers.txt

Blackbook List\
Blocks malicious domains.\
https://raw.githubusercontent.com/stamparm/blackbook/master/blackbook.txt

Blocklist Project - Crypto\
Blocks cryptomining domains.\
https://blocklist.site/app/dl/crypto

Blocklist Project - Drugs\
Blocks drug domains.\
https://blocklist.site/app/dl/drugs

Blocklist Project - Fake News\
Blocks fakenews domains.\
https://blocklist.site/app/dl/fakenews

Blocklist Project - Gambling\
Blocks gambling domains.\
https://blocklist.site/app/dl/gambling

Blocklist Project - Ransomware\
Blocks ransomware domains.\
https://blocklist.site/app/dl/ransomware

Blocklist Project - Scam\
Blocks scam domains.\
https://blocklist.site/app/dl/scam

Blocklist Project - Spam\
Blocks spam domains.\
https://blocklist.site/app/dl/spam

DeveloperDan Tracking List\
Blocks tracking domains.\
https://www.github.developerdan.com/hosts/lists/tracking-aggressive-extended.txt

DeveloperDan App Ads List\
Blocks ad domains.\
https://www.github.developerdan.com/hosts/lists/ads-and-tracking-extended.txt

Mobile App Ads Block List\
Blocks mobile app ad domains.\
https://raw.githubusercontent.com/evpne/socialblocklists/master/MobileAppsAds/appadsblocklist.txt

EasyList Ad Domains\
Blocks ad serving domains.\
https://raw.githubusercontent.com/justdomains/blocklists/master/lists/easylist-justdomains.txt

EasyPrivacy\
Blocks privacy invading domains.\
https://raw.githubusercontent.com/justdomains/blocklists/master/lists/easyprivacy-justdomains.txt

hemiipatu's Ads Domains\
Blocks ad domains.\
https://raw.githubusercontent.com/hemiipatu/Blocklists/master/advertisement.txt

hemiipatu's Phishing Domains\
Blocks phishing domains.\
https://raw.githubusercontent.com/hemiipatu/Blocklists/master/phishing.txt

hemiipatu's Ransomware Domains\
Blocks ransomware domains.\
https://raw.githubusercontent.com/hemiipatu/Blocklists/master/ransomware.txt

hemiipatu's Scam Domains\
Blocks scam domains.\
https://raw.githubusercontent.com/hemiipatu/Blocklists/master/scam.txt

hemiipatu's Spam Domains\
Blocks spam domains.\
https://raw.githubusercontent.com/hemiipatu/Blocklists/master/spam.txt

ios-trackers\
Blocks iOS trackers.\
https://raw.githubusercontent.com/jakejarvis/ios-trackers/master/blocklist.txt

ios-telemetry\
Blocks iOS telemetry.\
https://raw.githubusercontent.com/adversarialtools/ios-telemetry/master/blacklist

jwSpamSpy Spam Domains\
Blocks spam email domains.\
http://www.joewein.net/dl/bl/dom-bl.txt

Marcel Bischoff's Tracker Domains\
Blocks tracker domains.\
https://raw.githubusercontent.com/herrbischoff/trackers/master/trackers.txt

NoCoin\
Blocks coin miner domains.\
https://raw.githubusercontent.com/justdomains/blocklists/master/lists/nocoin-justdomains.txt

NoTracking Host Names List\
Blocks tracking domains.\
https://raw.githubusercontent.com/notracking/hosts-blocklists/master/hostnames.txt

NoTracking Domains List\
Blocks tracking domains.\
https://raw.githubusercontent.com/notracking/hosts-blocklists/master/domains.txt

NSABlocklist (pi-hole-edition)\
Blocks most known NSA / GCHQ / C.I.A. / F.B.I. spying servers.\
https://raw.githubusercontent.com/Cauchon/NSABlocklist-pi-hole-edition/master/HOSTS%20(excluding%20most%20GOV%20URLs)

Phishing Army Blocklist\
Blocks phishing domains.\
https://phishing.army/download/phishing_army_blocklist.txt

Shalla Malware Domains\
Blocks malware hosting domains.\
https://v.firebog.net/hosts/Shalla-mal.txt

Skype Ads Block List\
Blocks Skype ad domains.\
https://raw.githubusercontent.com/evpne/socialblocklists/master/Skype/skypeblocklist.txt

Smed79 Blacklist\
Blocks ads, tracking and mining domains.\
https://raw.githubusercontent.com/smed79/blacklist/master/hosts.txt

The Big List of Hacked Malware Web Sites\
Blocks malware, ransomware, viruses and trojan serving domains. \
https://raw.githubusercontent.com/mitchellkrogza/The-Big-List-of-Hacked-Malware-Web-Sites/master/hacked-domains.list

WindowsSpyBlocker 7\
Blocks Windows 7 telemetry domains.\
https://raw.githubusercontent.com/deathbybandaid/piholeparser/master/Subscribable-Lists/ParsedBlacklists/WindowsSpyBlocker7.txt

WindowsSpyBlocker 8.1\
Blocks Windows 8.1 telemetry domains.\
https://raw.githubusercontent.com/deathbybandaid/piholeparser/master/Subscribable-Lists/ParsedBlacklists/WindowsSpyBlocker81.txt

WindowsSpyBlocker\
Blocks Windows 10 telemetry domains.\
https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt

XionKzn Block List\
Blocks annoying ads, trackers and scam domains.\
https://raw.githubusercontent.com/XionKzn/PiHole-Lists/master/Blocklist.txt

Xlimit91 Block List\
Blocks annoying ads, trackers and scam domains.\
https://raw.githubusercontent.com/xlimit91/xlimit91-block-list/master/blacklist.txt

Blocklist.kowabit.de List\
Blocks ad serving domains.\
https://raw.githubusercontent.com/hectorm/hmirror/master/data/blocklist.kowabit.de/list.txt

Blockconvert List\
Malware, advert and tracking blacklist.\
https://raw.githubusercontent.com/mkb2091/blockconvert/master/blacklist.txt

Evil Domains List\
Blocks ad serving domains.\
https://raw.githubusercontent.com/hell-sh/Evil-Domains/master/evil-domains.txt

Vk496 List\
Blocks ad serving domains.\
https://raw.githubusercontent.com/vk496/hosts/master/hosts

abuse.ch URLhaus Malicious Hosts Blocklist\
Blocks malware domains.\
https://gitlab.com/curben/urlhaus-filter/raw/master/urlhaus-filter-hosts.txt

Gift Card Killer\
Blocks Gift Card domains.\
https://raw.githubusercontent.com/TakoYachty/Gift-Card-Killer/master/giftcardkiller.txt

Joeylane Hosts List\
Blocks ad domains.\
https://raw.githubusercontent.com/joeylane/hosts/master/hosts

Magento Burner Domains\
Blocks burner domains.\
https://raw.githubusercontent.com/gwillem/magento-malware-scanner/master/rules/burner-domains.txt

PiHoleParser - Blocked Australian Domains\
\
https://raw.githubusercontent.com/deathbybandaid/piholeparser/master/Subscribable-Lists/CountryCodesLists/Australia.txt

PiHoleParser - Blocked British Domains\
\
https://raw.githubusercontent.com/deathbybandaid/piholeparser/master/Subscribable-Lists/CountryCodesLists/UnitedKingdom.txt

PiHoleParser - Blocked North American Domains\
\
https://raw.githubusercontent.com/deathbybandaid/piholeparser/master/Subscribable-Lists/CountryCodesLists/UnitedStatesofAmerica.txt

Pornaway Porn Ads Blocker\
Blocks ad domains.\
https://raw.githubusercontent.com/mhxion/pornaway/master/hosts/porn_ads.txt

PUA Maltrail List\
Blocks Possibly Unwanted Applications.\
https://raw.githubusercontent.com/stamparm/maltrail/master/trails/static/suspicious/pua.txt

R-a-y Ads List\
Blocks ad domains.\
https://raw.githubusercontent.com/r-a-y/mobile-hosts/master/AdguardMobileAds.txt

R-a-y Spyware List\
Blocks spyware domains.\
https://raw.githubusercontent.com/r-a-y/mobile-hosts/master/AdguardMobileSpyware.txt

SNAFU Block List\
Blocks ad domains.\
https://raw.githubusercontent.com/RooneyMcNibNug/pihole-stuff/master/SNAFU.txt

Soteria-Nou Domain-List Ads\
Blocks ad domains.\
https://raw.githubusercontent.com/soteria-nou/domain-list/master/ads.txt

Soteria-Nou Domain-List Affiliates\
Blocks unwanted affiliates.\
https://raw.githubusercontent.com/soteria-nou/domain-list/master/affiliate.txt

Soteria-Nou Domain-List Analytics\
Blocks analytics tracking.\
https://raw.githubusercontent.com/soteria-nou/domain-list/master/analytics.txt

Soteria-Nou Domain-List Blocked Widgets\
Blocks unwanted website widgets.\
https://raw.githubusercontent.com/soteria-nou/domain-list/master/widgets.txt

Soteria-Nou Domain-List Enrichments\
Blocks some enrichments.\
https://raw.githubusercontent.com/soteria-nou/domain-list/master/enrichments.txt

Soteria-Nou Domain-List Fake Sites\
Blocks fake sites.\
https://raw.githubusercontent.com/soteria-nou/domain-list/master/fake.txt

Yahoo Ad Servers\
Blocks some ads on Yahoo.\
https://raw.githubusercontent.com/XionKzn/PiHole-Lists/master/Yahoo_Ad_Servers.txt


text:
# Website for indypy.org

🚨🚨🚨🚨 Pushing or merging to master will automatically deploy 🚨🚨🚨🚨

Just a few notes on how to work with this setup for the website. The most
important is that we are using the static site generator
[Lektor](https://www.getlektor.com/) and are hosting the content on
[Netlify](https://app.netlify.com/sites/indypy).

Repo is a copy from PyCascades

## Why Lektor?

Lektor is a static site generator written in Python. The reason for choosing it
(and if you need somebody to blame...it was Seb) was that it provides a much
easier way to:

1. Customize the website templates without having to build a full themes.
2. Create simple and flexible data representations for different parts of the site.

Basically, Lektor has a file-based data model that allows custom objects to be
defined such as *sponsors*, *organizers* and others.

The best way to understand how Lektor works it to take a look [at the content
model in the docs](https://www.getlektor.com/docs/content/) and through the code
here.

## Running Lektor locally

Let's get you started with downloading the latest version of the repo:

```
$ git clone git@github.com:indypy/indypy.org.git
$ cd indypy.org
```

Lektor needs Python (I think we all do 😉). This means you'll have to setup a
virtualenv before you can install it:

```
$ pipenv --three
$ pipenv shell
```

Now you're ready to get things installed:

```
$ pipenv install --dev
```

And with Lektor finally installed, you can run the built-in development server:

```
$ lektor server
```

You should be able to view the site by heading to
[http://localhost:5000](http://localhost:5000).

## Changes to CSS / Javascript

We are using a hand-rolled extension for Lektor that uses the `webassets` package
to build CSS and Javascript artefacts. This might have some bugs in it still.

If you make changes to a CSS or Javascript file and changes aren't reflected in
the dev server. You should clear the built cache and start the service again:

```
$ lektor clean -yes && lektor server
```

## Adding Sponsors

We have a data model for sponsors that will automatically include it into the
website. Adding an new sponsor to show up on the website, follow these steps:

Create a new folder for the sponsor in `contents/sponsors`:

```
$ mkdir contents/sponsors/google-cloud-platform
```

Now create a `content.lr` file inside this new directory using this template:

```
_hidden: yes
---
name:
---
tier:
---
website:
---
logo:
---
signed_on:
```

The `_hidden` entry prevents a website from being created for the individual
sponsor. We only want them to show up as part of the sponsor listing.

Copy the logo for the sponsor into the same directory and complete all the
fields in the `contents.lr` file. This could look something like this:

```
_hidden: yes
---
name: Google Cloud Platform
---
tier: diamond
---
website: http://cloud.google.com
---
logo: logo_cloud_color.svg
---
signed_on: 2018-09-28
```

## Deploying the site to Netlify

Our Netlify setup is integrated with Github. That means **all branches** that
are pushed to Github will be built on Netlify and will be available on a unique
URL. See 1Password for Netlify access. Check there for deploy status

The `master` branch is the Production branch.

gha_language: CSS


text:
---
layout: default
---

# 1994-06-14 - RE: DNA

## Header Data

From: "Pat Farrell"<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: eb42de1838a4f02fd480731396881e11154d08b23b98883bc5085393084ba21b

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1994-06-14 00:15:49 UTC

Raw Date: Mon, 13 Jun 94 17:15:49 PDT

## Raw message

```
{% raw  %}From: "Pat Farrell"<EMAIL_ADDRESS>Date: Mon, 13 Jun 94 17:15:49 PDT
To<EMAIL_ADDRESS>Subject: RE: DNA
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

In message Mon, 13 Jun 1994 18:54:10 +0200 (METDST),
  Mats Bergstrom<EMAIL_ADDRESS>writes:

> Databases of fingerprints and retina-images might still have a future
> for specialized applications but DNA-typing (why not on a simple blood
> sample at birth) combined with a fixed social security number valid for
> life will probably become a widely used method for governments to control
> the identity of their serfs.
> [good stuff elided]
>
> Unfortunately there is no known method of encrypting one's DNA code
> in situ but hopefully they will safely (in escrow?) encrypt it in
> the databanks.

This issue came up at the CFP-2 conference (Computers Freedom and Privacy,
March 92 edition). There were speakers there claiming that the audience,
when getting up from their chairs, would leave sufficient hair, skin
flakes, sweat, etc. behind that DNA mapping would be easy. Of course, this
mapping would be without the "suspect" having any knowledge of when the map
material was gathered.

I don't know if this was factual then, but no one rose up to claim that the
speaker was in error, and there were lots of folks in the audience that
could have challenged it. None did.

This speach was a major motivation in my interest in these topics.

That, and a chance to listen to Bruce Stirling, DED, and Jim Bidzos...

Pat

Pat Farrell      Grad Student<EMAIL_ADDRESS>Department of Computer Science    George Mason University, Fairfax, VA
Public key availble via finger          #include <standard.disclaimer>

{% endraw %}
```

## Thread

+ Return to [June 1994](/archive/1994/06)

+ Return to "[Mats Bergstrom <matsb@sos.sll.se>](/authors/mats_bergstrom_matsb_at_sos_sll_se_)"
+ Return to "["Pat Farrell" <pfarrell@netcom.com>](/authors/pat_farrell_pfarrell_at_netcom_com_)"
+ Return to<EMAIL_ADDRESS>(James Hicks)](/authors/sonny_at_netcom_com_james_hicks_)"

+ 1994-06-14 (Mon, 13 Jun 94 17:15:49 PDT) - RE: DNA - _"Pat Farrell"<EMAIL_ADDRESS>  + 1994-06-14 (Mon, 13 Jun 94 18:47:31 PDT) - [RE: DNA](/archive/1994/06/61e636de711de1b2173916601a1be4940710e838f4c1b3e6b0ff0233ca8bd575) - _Mats Bergstrom<EMAIL_ADDRESS>  + 1994-06-14 (Mon, 13 Jun 94 18:56:27 PDT) - [Re: DNA](/archive/1994/06/f2c19160a70ac1ed05e31f018cb6a593dd2e830c75b76a197214314b40a67d1f) -<EMAIL_ADDRESS>(James Hicks)_


text:
# Fast Machine Learning Science Benchmarks
[![DOI](https://zenodo.org/badge/445208377.svg)](https://zenodo.org/badge/latestdoi/445208377)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

Implementations of the `fastml-science` benchmark models, including a standard Keras (float) and QKeras (quantized) implementations.

# jet-classify

## Requirements:
Python 3.8

```
conda env create -f environment.yml
```

## Training:

```
python3 train.py -c <config.yml>
```

Upon training completion, graphs for the ROC for each tagger, are saved to the output directory, along with a .h5 saved model file.

The benchmark includes a float/unquantized 3 layer model as well as a uniformally quantized 6b model

## Sample Runs

### Training Float Baseline:

```
python3 train.py -c float_baseline.yml
```
![Alt text](jet-classify/model/float_baseline/keras_roc_curve.png?raw=true "Float Baseline ROC Curve")

`Model test accuracy = 0.766`

`Model test weighted average AUC = 0.943`

### Training Quantized Baseline:

```
python3 train.py -c quantized_baseline.yml
```
![Alt text](jet-classify/model/quantized_baseline/keras_roc_curve.png?raw=true "Quantized Baseline ROC Curve")

`Model test accuracy = 0.764`

`Model test weighted average AUC = 0.941`

# beam-control
WIP

# sensor-data-compression
WIP

repository: fastmachinelearning/fastml-science

repo_name: fastmachinelearning/fastml-science


text:
# cartodb-tools

Command line tool to import and show details about data in your CartoDB account.

## Installation

    gem install cartodb-tools

## Configuration

Configuration of your API credentials and server can either be done with a `.cartodbrc` file
in your `$HOME` directory, or by using environment variables. The `.cartodbrc` file is a YAML
file that contains your account information.

Here is a sample `.cartodbrc` file:

```yaml
host: 'https://username.cartodb.com'
oauth_key: 'YOUR AUTH KEY'
oauth_secret: 'YOUR AUTH SECRET'
username: 'your username/email'
password: 'your password'
```

or, for environment variables:

```sh
export CARTODB_HOST="https://username.cartodb.com"
export CARTODB_OAUTHKEY="YOUR AUTH KEY"
export CARTODB_OAUTHSECRET="YOUR AUTH SECRET"
export CARTODB_USERNAME="your username/email"
export CARTODB_PASSWORD="your password"
```

Note: the environment variables override the settings in the `.cartodbrc` file. You can define a mix,
so just your password can be an environment variable if you like.

## Usage

There are 3 supported commands currently, `import`, `ls`, and `show`

    cartodb import -t "table_name" -f /path/to/some.csv -g Point

    cartodb ls

    cartodb show -t table_name

Note: for some reason, the API is not naming the tables properly. This happens on the current cartodb.com
hosted version and self-hosted instances.

repository: Open-Source-GIS/cartodb-tools

repo_name: Open-Source-GIS/cartodb-tools


text:
# Checkers

Two versions of a classic board game implemented as C++ console application.

### checkers

Original version which two players play and take turns on the same side. All the rules and game mechanics are fully supported, such as crowning and forced capture. Invalid input will be rejected and player will be requested to input again.

### checkers_network

Network version which includes two applications for both server-side and client-side. Server accepts input from client and sends the updated board state to both players, and client prints the current board state from server and allows player to submit input. Network functionality is implemented with the help of the stand-alone [asio C++ library](http://think-async.com/).

![Checkers](https://dingjun.github.io/images/checkers.png)

![Checkers](https://dingjun.github.io/images/checkers2.png)

repository: dingjun/checkers

repo_name: dingjun/checkers


text:
# Day 3

<img src="http://i.imgur.com/XzonCuN.gif" align="right" width="100px">

We started the day looking at the `core.async` library since I thought it would
drastically simplify the way we write time-based events.  It is similar to C#
Co-Routines in Unity.  So we built this simple app to test it out.

```clj
(ns async-test.core
  (:require-macros [cljs.core.async.macros :refer [go]])
  (:require
    [cljs.core.async :refer [put! chan <! timeout]]))

(enable-console-print!)

(println "Hello world!")

; async demo (a go-routine)
(go
  (<! (timeout 1000)) ; wait for 1 second
  (println "HI")
  (<! (timeout 1000)) ; wait for 1 second
  (println "WORLD"))

; same code without async (callback hell)
#_(js/setTimeout
  (fn []
    (println "HI")
    (js/setTimeout
      (fn []
        (println "WORLD"))
      1000))
    1000)

; another async demo (executes concurrently with first go-routine)
(go
  (loop [i 0]
    (println "hola " i)
    (<! (timeout 500))
    (if (< i 6)
      (recur (inc i)))))
```

This outputs:

```
hola 0
hola 1
HI
hola 2
hola 3
WORLD
hola 4
hola 5
hola 6
```

After that experiment, we implemented gravity, stacking, collapsing, and
hard-drop.  Most of our time was spent figuring out ways to do things the
"functional" way.  The other time was spent trying to make it readable and
succinct.

1. Prevent square from rotating.

    ```clj
    (defn rotate-piece
      "Create a new piece by rotating the given piece clockwise."
      [piece]
      (if (= :O (:name piece))
        piece
        (let [new-coords (map (fn [[x y]] [(- y) x]) (:coords piece))]
          (assoc piece :coords new-coords))))
    ```

1. Add gravity and stacking.

    ```clj
    (defn lock-piece!
      "Lock the current piece into the board."
      []
      (let [[x y] (:position @state)
            piece (:piece @state)
            board (:board @state)]
        (swap! state assoc :board (write-piece-to-board piece x y board))
        (try-collapse!)
        (spawn-piece!)))

    (defn go-go-gravity!
      "Starts the gravity routine."
      []
      (go
        (loop []
          (<! (timeout 1000))
          (let [[x y] (:position @state)
                piece (:piece @state)
                board (:board @state)
                ny (inc y)]
            (if (piece-fits? piece x ny board)
              (swap! state assoc-in [:position 1] ny)
              (lock-piece!)))
          (recur))))
    ```

1. Add coloring.

    ```clj
    (def cell-colors
      { 0 "#333"
       :I "#0FF"
       :L "#FA0"
       :J "#00F"
       :S "#0F0"
       :Z "#F00"
       :O "#FF0"
       :T "#A0F"})
    ```

1. Collapse of filled rows.

    ```clj
    (def cell-filled? (complement zero?))

    (defn try-collapse!
      "Try to collapse any full rows on the current board."
      []
      (let [board (:board @state)
            cleared-board (remove #(every? cell-filled? %) board)
            n (- (count board) (count cleared-board))
            new-board (into (vec (repeat n empty-row)) cleared-board)]
        (swap! state assoc :board new-board)))
    ```

1. Add hard-drop.

    ```clj
    (defn get-drop-pos
      "Get the future drop position of the given piece."
      [piece x y board]
      (let [collide? (fn [cy] (not (piece-fits? piece x cy board)))
            cy (first (filter collide? (iterate inc y)))]
        (dec cy)))

    (defn hard-drop!
      "Hard drop the current piece."
      []
      (let [[x y] (:position @state)
            piece (:piece @state)
            board (:board @state)
            ny (get-drop-pos piece x y board)]
        (swap! state assoc :position [x ny])
        (lock-piece!)))
    ```


text:
RabbitMQ Configurations

rabbitmq-plugins enable rabbitmq_mqtt

restart server

rabbitmqctl -n rabbit add_user mqtt

rabbitmqctl -n rabbit set_permissions mqtt ".*" ".*" ".*"

## Docker Notes

Build docker image

```shell
gradle :applications:vehicle-generator-mqtt-source:bootBuildImage
```

```shell script
docker tag vehicle-generator-mqtt-source:0.0.1-SNAPSHOT nyla/vehicle-generator-mqtt-source:0.0.1-SNAPSHOT
docker push nyla/vehicle-generator-mqtt-source:0.0.1-SNAPSHOT
```

```shell
k apply -f cloud/GKE/k8/vehicle-generator-app
```

repository: ggreen/IoT-connected-vehicles-showcase

repo_name: ggreen/IoT-connected-vehicles-showcase


text:
# Instagram Photo Downloader

## Installation

#### Installing Geckodriver in Linux

```sh
$ wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz
$ tar -xvzf geckodriver*
$ chmod +x geckodriver
$ sudo mv geckodriver /usr/local/bin/
```
#### Installing Geckodriver in Windows

1. Download the [Geckodriver](http://https://github.com/mozilla/geckodriver/releases)
2. Unzip it
3. Copy that .exe file and put your into python parent folder (e.g., C:\Python34)

**Make sure you have Python 3 and Firefox browser installed on your PC.**


text:
# Google Places API - Find Place from CSV/Excel/Spreadsheet

This script takes a CSV file, looks up each row in the Google Places API, then spits out an Excel file. As configured, it takes the text from the first column and searches for the corresponding Google place ID, but it can be configured to return any field from the API.

If you have a spreadsheet with a list of places, this is a quick and easy way to find and store the corresponding Google place IDs.

## What it does

It reads the CSV into a pandas DataFrame and creates a new column for the place ID. Then it goes through each row, looking up the place ID, which it places into the new column. If the API returns no result, the cell is left blank.

The final product is saved as "output.xlsx" in the same folder.

## How to use it

### Starting in Excel/Google Sheets/etc:

1. Format your data.

   By default, this script reads data from the first column and adds the place ID to the second column. If you have multiple columns (place name, city, country, etc.), you can concatenate the columns into a single string.

   The first row is for the header and will be ignored.

2. Export your data as a CSV file. The script looks for "input.csv", but you can change that.

### In a Juypter notebook:

3. Set your Google Places API key. Place it within the quotation marks on the line that says "api_key =".

   If desired, change the input and output file names and locations (defaults are "input.csv" and "output.xlsx" in the current folder).

4. Run.


text:
# TVFox .................................................................................... ![Build Status](https://ci.appveyor.com/api/projects/status/github/foxcouncil/tvfox?svg=true)

So far, only works with Elgato's ([HD](https://www.elgato.com/en/gaming/game-capture-hd60-pro)/[4K](https://www.elgato.com/en/gaming/game-capture-4k60pro))60 internal capture cards.

## Search Amazon Stores
- Canada: https://www.amazon.ca/s?k=elgato+internal
- U.S.: https://www.amazon.com/s?k=elgato+internal
- UK: https://www.amazon.co.uk/s?k=elgato+internal
- Japan: https://www.amazon.jp/s?k=elgato+internal
- Australia: https://www.amazon.com.au/s?k=elgato+internal

## Pitiful Amount Of Screenshots
![TVFox in action](https://i.imgur.com/VWwf2dq.png[/img)

repository: FoxCouncil/TVFox

gha_language: C#

repo_name: FoxCouncil/TVFox


text:
# Gcast plugin

The Gcast plugin makes it possible to establish a link between your Google Assistant and Jeedom. It will be possible to use your Google Home / Google Mini to do TTS or interact with Jeedom via interactions

# Configuration

## Plugin configuration

After downloading the plugin you must activate it and enter the IP of your Google Assistant. This plugin allows to speak a google cast and to control its volume. It also acts as a bridge for interactions and Google Home.

# FAQ

> **The volume control works but not the TTS**
>
> You must check your internal network configuration (the plugin uses it for TTS generation), in particular no https on the internal networks.

repository: jeedom/documentations

repo_name: jeedom/documentations


text:
# AlgorithmsCSharp
This library is project for me to better organise various functionality. Currently includes arrays.

This solution contains two projects:
- `AlgorithmsLibrary.csproj`(.NET Standard 2.0) library contains algorithm functionality organised into folders:
  - `ArrayInt` conains functionalty for integer JaggedArrays and Matrices.
  - `ArrayIntChar` contains functionalty for character, integer vectors.
  - `Common` contains helper classes for general functionality.
  - `Sort` contains sorting functionality, currently only Selection Sort.
- `ConsoleApp.csproj` (.NET Framework 4.71) client program to test algorithms with console.
  - `Program.cs` contains test methods for testing AlgorithmLibrary functionality.

repository: neetfreek/AlgorithmsCSharp

repo_name: neetfreek/AlgorithmsCSharp


text:
# mr-yum-test
This is to test the E2E Dine-in path of the Mr Yum Staging Demo Menu.

## Installation

```bash
npm install
```

## Usage
```bash
npm run test
```

## License
[MIT](https://choosealicense.com/licenses/mit/)

repository: annizaperfecto/mr-yum-test

repo_name: annizaperfecto/mr-yum-test


text:
# Ecsbeat

Welcome to Ecsbeat.

Ensure env variables GOPATH and GOROOT are set properly, and this folder is at the following location:
`${GOPATH}/github.com/yangb8`

## Getting Started with Ecsbeat

### Requirements

* [Golang](https://golang.org/dl/) 1.8
* [glide](https://github.com/Masterminds/glide)

### Init Project
To get running with Ecsbeat and also install the
dependencies, run the following command:

```
make setup
```

It will create a clean git history for each major step. Note that you can always rewrite the history if you wish before pushing your changes.

To push Ecsbeat in the git repository, run the following commands:

```
git remote set-url origin https://github.com/yangb8/ecsbeat
git push origin master
```

For further development, check out the [beat developer guide](https://www.elastic.co/guide/en/beats/libbeat/current/new-beat.html).

### Build

To build the binary for Ecsbeat run the command below. This will generate a binary
in the same directory with the name ecsbeat.

```
make
```

### Run

To run Ecsbeat with debugging output enabled, run:

```
modify ecsbeat.yml based on your ecs env
./ecsbeat -c ecsbeat.yml -e -d "*"
```

### Test

To test Ecsbeat, run the following command:

```
make testsuite
```

alternatively:
```
make unit-tests
make system-tests
make integration-tests
make coverage-report
```

The test coverage is reported in the folder `./build/coverage/`

### Update

Each beat has a template for the mapping in elasticsearch and a documentation for the fields
which is automatically generated based on `etc/fields.yml`.
To generate etc/ecsbeat.template.json and etc/ecsbeat.asciidoc

```
make update
```

### Cleanup

To clean  Ecsbeat source code, run the following commands:

```
make fmt
make simplify
```

To clean up the build directory and generated artifacts, run:

```
make clean
```

### Clone

To clone Ecsbeat from the git repository, run the following commands:

```
mkdir -p ${GOPATH}/github.com/yangb8
cd ${GOPATH}/github.com/yangb8
git clone https://github.com/yangb8/ecsbeat
```

For further development, check out the [beat developer guide](https://www.elastic.co/guide/en/beats/libbeat/current/new-beat.html).

## Docker

after build is done

```make docker-image```

## Packaging

The beat frameworks provides tools to crosscompile and package your beat for different platforms. This requires [docker](https://www.docker.com/) and vendoring as described above. To build packages of your beat, run the following command:

```
make package
```

This will fetch and create all images required for the build process. The hole process to finish can take several minutes.

## Example of Common Fields in Output
```
  "ecs-customer": "EMC",
  "ecs-event-type": "disks",
  "ecs-node-ip": "<IP_ADDRESS>",                  # only if the event is on node level
  "ecs-node-name": "ecs-obj-1-1.plylab.local",  # only if the event is on node level
  "ecs-vdc-cfgname": "VDC1",
  "ecs-vdc-id": "urn:storageos:VirtualDataCenterData:407b6b6c-bda4-4ba4-89f7-220ac3d9c044",
  "ecs-vdc-name": "plylab",
  "ecs-version": "<IP_ADDRESS>.86239.1c9e5ec",
```

repository: hldnova/ecsbeat

repo_name: hldnova/ecsbeat


text:
# upper.io/db

`upper.io/db` is a [Go][2] package that allows developers to store and retrive
data to and from different kinds of databases through the use of adapters that
wrap well supported database drivers.

`upper.io/db` is not an ORM, but you may not need one at all:

```go
// This code works the same for all supported databases.
var people []Person
res = col.Find(db.Cond{"name": "Max"}).Skip(1).Limit(2).Sort("-input")
err = res.All(&people)
```

See the project page, recipes and user documentation at [upper.io/db][1].

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

## Supported databases

* [MongoDB](https://upper.io/db/mongo) via [mgo](http://godoc.org/labix.org/v2/mgo)
* [MySQL](https://upper.io/db/mysql) via [mysql](https://github.com/go-sql-driver/mysql)
* [PostgreSQL](https://upper.io/db/postgresql) via [pq](https://github.com/lib/pq)
* [QL](https://upper.io/db/ql) via [ql](https://github.com/cznic/ql)
* [SQLite3](https://upper.io/db/sqlite) via [go-sqlite3](https://github.com/mattn/go-sqlite3)

## License

> Copyright (c) 2012-2014 José Carlos Nieto, https://menteslibres.net/xiam
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
> "Software"), to deal in the Software without restriction, including
> without limitation the rights to use, copy, modify, merge, publish,
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
> LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

[1]: https://upper.io/db
[2]: http://golang.org

repository: doug/db

repo_name: doug/db


text:
# Blacklight::Gallery
[![Gem Version](https://badge.fury.io/rb/blacklight-gallery.svg)](http://badge.fury.io/rb/blacklight-gallery) [![CI](https://github.com/projectblacklight/blacklight-gallery/actions/workflows/ruby.yml/badge.svg)](https://github.com/projectblacklight/blacklight-gallery/actions/workflows/ruby.yml)

Gallery views for Blacklight search results

## Installation

Add this line to your Blacklight application's Gemfile:

    gem 'blacklight-gallery'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install blacklight-gallery

## Usage

Run the gallery generator:

    $ rails g blacklight_gallery:install

## Available Views
If you would like to add or remove any particular view either add or remove the following configurations from your Blacklight controller.

### Gallery

    config.view.gallery.partials = [:index_header, :index]

### Masonry

    config.view.masonry.partials = [:index]

### Slideshow

    config.view.slideshow.partials = [:index]

## Screenshot

![Screenshot](docs/screen_shot.png)

## Contributing

1. Fork it ( http://github.com/<my-github-username>/blacklight-gallery/fork )
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

## Releasing

1. Edit `lib/version.rb` and `package.json` to set the new version
1. Commit the changes e.g. `git commit -am "Bump version to X.X.X"`
1. Push release to rubygems `bundle exec rake release`
1. Push release to NPM `npm publish`
1. Create a release on github with the tag that was just created: https://github.com/projectblacklight/blacklight-gallery/releases/new

repository: projectblacklight/blacklight-gallery

gha_language: Ruby

repo_name: projectblacklight/blacklight-gallery


text:
---
id: utils
title: Utilities
sidebar_label: Utilities
---

### NEAR => yoctoNEAR {#near--yoctonear}

```js
// converts NEAR amount into yoctoNEAR (10^-24)

const { utils } = nearAPI;
const amountInYocto = utils.format.parseNearAmount("1");
```

[ Function `parseNearAmount`](https://near.github.io/near-api-js/modules/utils_format#parsenearamount)

### YoctoNEAR => NEAR {#yoctonear--near}

```js
// converts yoctoNEAR (10^-24) amount into NEAR

const { utils } = nearAPI;
const amountInNEAR = utils.format.formatNearAmount("1000000000000000000000000");
```

[ Function `formatNearAmount`](https://near.github.io/near-api-js/modules/utils_format#formatnearamount)

repository: think-in-universe/docs

gha_language: TypeScript

repo_name: think-in-universe/docs