text:
---
id: 4831
title: Keep It Simple!
date: 2017-01-09T21:32:32+00:00
author: fabiocozzolino
layout: post
guid: http://www.fabiocozzolino.eu/?p=4831
permalink: /keep-it-simple/
dsq_thread_id:
  - "5450617021"
categories:
  - Architecture
tags:
  - Architecture
  - Methods
---
**Antoine de Saint-Exupéry** wrote in his book **The Little Prince** the following phrase:

> _“Perfection is Achieved Not When There Is Nothing More to Add, But When There Is Nothing Left to Take Away”_

  Thinking about this small sentence, I would like to share with you some small considerations applying it in software development.

### Simplicity is the most complex thing {.headline.hover-highlight.entry-title.js_entry-title}

  Think about software development. Many developers tend to create complex architectures, adding unnecessary patterns or over engineered code. Why they do that? Because they are trying to set the path for future changes that is gonna happen almost…never!

  For example: you choose to abstract a component usage – by using IoC, for example – because, maybe one day, you must be able to use a different component and you don’t wont to change every time your code. Nice and good practice! But, it is really necessary in a iOS app? Maybe yes but, really, how many times you’ll change that component in the app lifetime? Except for really rare case, from zero to one time.

  So, in that case, abstraction it’s like to take “a sledgehammer to crack a nut“.

### Lets evolve your architecture {.headline.hover-highlight.entry-title.js_entry-title}

When your requirements are really not clear at first, write the most simpler code. If you need to read data from database, try to create a simple interface with direct read. This is not so bad at all. When you need to access to the database from another point or view, change your architecture by refactoring your code to create your data access layer.

The idea is simple: **introduce changes in your architecture as late as possibile and only if it is strictly necessary**. You can’t predict the future, so don’t do unnecessary things.

Obviously, if your requirements are clear, keep in mind your architecture while developing!

gha_language: CSS

gha_license_id: NOASSERTION


text:
---
title: "How to create an interactive README for your GitHub profile"
layout: post
date: 2020-07-17 12:37
tag:
- tutorial
- github
- readme
- python
image: /assets/images/posts/github-profile-interactive-readme/gray-metal-cubes-decorative-1005644.jpg
headerImage: true
description: "A tutorial on how to make your GitHub profile standout by having an interactive README"
category: blog
author: kavishhukmani
externalLink: false
---

This is a **NO BS** tutorial on how to create interactive READMEs for your GitHub Profile.

I implemented an interactive game of Tic-Tac-Toe on my [profile](https://github.com/DoubleGremlin181/) and will be using that as an example for this tutorial while keeping it open enough to let you implement your ideas.

### Prerequisites
 - A GitHub account
 - Intermediate knowledge in any scripting language. I will be using Python.
 - Basic Markdown and HTML for formatting your README.
 - Basics of GitHub Actions.

### Let the games begin
1) Create a new GitHub repo with the same name as your username.
`https://github.com/username/username`

2) Create an account on [Link Click Counter](https://www.linkclickcounter.com/) using a (temporary) email ID. This is a free service which will track any clicks on the URLs in realtime. Create as many links as needed.

3) Create a new file in the language of your choice and scrape the results from `https://www.linkclickcounter.com/userAccount.php`. Store the values in a JSON file. The number of new clicks between two runs of the program is the difference between the old and new values. Don't forget to store your email ID and password as environment variables.

  Expand gist

4) The next thing to do is to implement your idea. Use the values calculated from the previous step to make your program interactive.

  Expand gist

5) The last part of the program is to create the template for your README file. The magic lies in using hyperlinks for Link Click Counter URLs behind images

`[![Alt Text](Image link)](Link Click Counter URL)`

  Expand gist

6) Create a `.yml` file in `.github/workflows/` to automatically run your code as desired. For scheduling runs use cron jobs. I would also recommend caching any dependencies.

  Expand gist

7) Commit and push all your files
```
git add -A
git commit -m "Your commit message"
git push origin master
```

8) Add your email ID and password as Secrets to your repo on GitHub
>Settings -> Secrets -> New Secret

### And you're done.

Star my repo if you found this tutorial helpful.

Tweet to @2gremlin181 with your profiles and ideas

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
# NES-LTER
This repository contains code used for data analysis and interpretation associated with the Northeast U.S. Shelf Long-Term Ecological Research (NES-LTER) project.

More information about NES-LTER can be found here:

https://nes-lter.whoi.edu/

More details about the code will be posted here as available:

https://github.com/hsosik/NES-LTER/wiki

repository: hsosik/NES-LTER

gha_language: MATLAB

gha_license_id: MIT

repo_name: hsosik/NES-LTER


text:
# Delete

```ucm:hide
.> builtins.merge
```

The delete command can delete both terms and types.

First, let's make sure it complains when we try to delete a name that doesn't
exist.

```ucm:error
.> delete.verbose foo
```

Now for some easy cases. Deleting an unambiguous term, then deleting an
unambiguous type.

```unison:hide
foo = 1
structural type Foo = Foo ()
```

```ucm
.> add
.> delete.verbose foo
.> delete.verbose Foo
.> delete.verbose Foo.Foo
```

How about an ambiguous term?

```unison:hide
foo = 1
```

```ucm
.a> add
```

```unison:hide
foo = 2
```

```ucm
.b> add
.a> merge .b
```

A delete should remove both versions of the term.

```ucm
.a> delete.verbose foo
```

```ucm:error
.a> ls
```

Let's repeat all that on a type, for completeness.

```unison:hide
structural type Foo = Foo ()
```

```ucm
.a> add
```

```unison:hide
structural type Foo = Foo
```

```ucm
.b> add
.a> merge .b
```

```ucm
.a> delete.verbose Foo
```

```ucm
.a> delete.verbose Foo.Foo
```

Finally, let's try to delete a term and a type with the same name.

```unison:hide
foo = 1
structural type foo = Foo ()
```

```ucm
.> add
```

```ucm
.> delete.verbose foo
```

We want to be able to delete multiple terms at once

```unison:hide
a = "a"
b = "b"
c = "c"
```

```ucm
.> add
.> delete.verbose a b c
```

We can delete terms and types in the same invocation of delete

```unison:hide
structural type Foo = Foo ()
a = "a"
b = "b"
c = "c"
```

```ucm
.> add
.> delete.verbose a b c Foo
.> delete.verbose Foo.Foo
```

We can delete a type and its constructors

```unison:hide
structural type Foo = Foo ()
```

```ucm
.> add
.> delete.verbose Foo Foo.Foo
```

You should not be able to delete terms which are referenced by other terms

```unison:hide
a = 1
b = 2
c = 3
d = a + b + c
```

```ucm:error
.> add
.> delete.verbose a b c
```

But you should be able to delete all terms which reference each other in a single command

```unison:hide
e = 11
f = 12 + e
g = 13 + f
h = e + f + g
```

```ucm
.> add
.> delete.verbose e f g h
```

You should be able to delete a type and all the functions that reference it in a single command

```unison:hide
structural type Foo = Foo Nat

incrementFoo : Foo -> Nat
incrementFoo = cases
  (Foo n) -> n + 1
```

```ucm
.> add
.> delete.verbose Foo Foo.Foo incrementFoo
```

If you mess up on one of the names of your command, delete short circuits

```unison:hide
e = 11
f = 12 + e
g = 13 + f
h = e + f + g
```

```ucm:error
.> add
.> delete.verbose e f gg
```

Cyclical terms which are guarded by a lambda are allowed to be deleted

```unison:hide
ping _ = 1 Nat.+ !pong
pong _ = 4 Nat.+ !ping
```

```ucm
.> add
.> delete.verbose ping
.> view pong
```

repository: unisonweb/unison

branch_name: refs/heads/trunk

gha_language: Haskell

repo_name: unisonweb/unison


text:
  Discord OAuth

An Open Source demonstration of a PHP Discord OAuth login flow, with multiple examples to build on top of.

  Key Features •
  How To Use •
  Contributing •
  Support •
  License

## Key Features

* PHP sessions
* Get user data
  - ID, Username, Avatar, Discrim etc.
* Get user connections
  - Battlenet, Facebook, Github, Spotify, Twitter, Youtube etc.
* Get user guilds
  - IDs, Icons, User permissions, Enabled guild features etc.
* Get guild user
  - Nickname, Roles, Join date etc.
* Join user to guild
* Get guild object (requires bot)
* Give guild role (requires bot)
* ...and more!

## About

This is a small collection of demos, which you can use to start building your Discord PHP application from.

This is in no way a framework, but more a sort of *template* that you can use to build on top of.

The idea behind the repo is to give developers a nice starting point to further expand their application from. If you do end up expanding the possibilites of the script, be sure to check out [Contributing](#contributing) in this repo!

What is this **not**?
* This is not a library
* This is not a one-click installer
* This is not a final product

## How To Use

**Prerequisites:**
* [Git](https://git-scm.com) for cloning the repo
* [XAMPP](https://www.apachefriends.org/download.html) (or another web server) for running the PHP application
* [Discord Application](https://discord.com/developers/applications) with OAuth2 ``CLIENT ID`` and ``CLIENT SECRET``

Start by cloning this repository to your computer.

```bash
$ git clone https://github.com/MarkisDev/discordoauth
```
Now open up XAMPP Control Panel, and click on the `Config` button in the `Apache` module.

You want to search for "DocumentRoot", and change the values from ``C:/xampp/htdocs`` into the path of your `discordoauth` folder.

```bash
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "C:\WEB\discordoauth\demos"
<Directory "C:\WEB\discordoauth\demos">
```
> **Note**
> You may want to point the root directly to one of the included examples for ease of access (`C:\WEB\discordoauth\demos\simple-demo`).

Next you need to open the `config.php` file for the demo you wish to run.

*All demos included in this repo come with their own individual config-file. If you wish to try out multiple demos, you will need to edit the values in their respective `config.php` file.*

Fill out the config file as shown in the examples with values from [Discord Developers Dashboard](https://discord.com/developers/applications).

```php
<?php
# CLIENT ID
$client_id = "623204361394291813";

# CLIENT SECRET
$secret_id = "roOWew9eNHEQS54SQc6v1pl8YBBiX5O0";

# SCOPES SEPARATED BY + SIGN
$scopes = "identify";

# REDIRECT URL
$redirect_url = "http://localhost/simple-demo/includes/login.php";
```

When you have done this, you must copy the full `$redirect_url` link, and paste it on the [Discord Developers Dashboard](https://discord.com/developers/applications) under your Applications OAuth2 Redirects.

> **Note**
> You can add multiple redirects to the same application, so feel free to also add the redirects for the other demos:

> `http://localhost/admin-dashboard/includes/login.php`

> `http://localhost/bot-dashboard/includes/login.php`

When you have done all the above steps, you should be able to visit [localhost/simple-demo](http://localhost/simple-demo) in your browser, and see the OAuth demo in action!

If you encounter any issues along the way, give us a visit in our [Discord Server](https://join.markis.dev), and we'll be sure to lead you back on the right track!

## Contributing

Contributions to the project are **always** welcome!

If you found a bug, please [open an issue](https://github.com/MarkisDev/discordoauth/issues/new/choose) and let us know.

If you have a request for a feature you can also [open an issue](https://github.com/MarkisDev/discordoauth/issues/new/choose) and we will take a look at it.

We accept [pull requests](https://github.com/MarkisDev/discordoauth/compare) for any fixes and/or new features.

If you want to contribute a new demo, please remember to copy any new Discord related functions to the `discord.php` file in the root of the repo.

## Support
**Support the Author here:**

**Support the Maintainer here:**

## License

[MIT License](https://mit-license.org/)

```
Copyright (c) 2022 MarkisDev

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

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

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

[@f-o](https://github.com/f-o)  ·  [@markisdev](https://github.com/markisdev)

repository: MarkisDev/discordoauth

gha_language: PHP

repo_name: MarkisDev/discordoauth


text:
# Table of Contents

Challenges

* [Array Reverse](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/challenges/ArrayReverse)
* [Array Shift](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/challenges/ArrayShift)
* [Array Binary Search](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/challenges/ArrayBinarySearch/BinarySearch)
* [Merge Linked Lists](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/challenges/LLMerge)
* [FIFO Animal Shelter](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/challenges/FIFOAnimalShelter)
* [FizzBuzz Tree](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/challenges/FizzBuzzTree)
* [Left Join](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/challenges/LeftJoin)
* [Multi Bracket Validation](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/challenges/MultiBracketValidation)
* [PseudoQueue](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/challenges/QueueWithStacks)
* [Repeated Word](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/challenges/RepeatedWord)
* [Tree Intersection](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/challenges/TreeIntersection)

Data Structures

* [Linked List](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/data-structures/LinkList)
* [Stacks and Queues]()
* [Trees](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/data-structures/Tree)
* [Hash Table](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/data-structures/HashTable)
* [Graph](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/data-structures/Graph)

Sorts

* [Insertion Sort](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/sorts/insertion-sort)
* [Bubble Sort](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/sorts/bubble-sort)
* [Quick Sort](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/sorts/quick-sort)
* [Merge Sort](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/sorts/merge-sort)
* [Selection Sort](https://github.com/JCode1986/data-structure-and-algorithms-dotnet/tree/master/sorts/selection-sort)

gha_language: C#


text:
## Example Entrypoint Scripts to run GluonTS on Amazon SageMaker

This repository contains the example that supplement the
[blog post](https://aws.amazon.com/blogs/industries/novartis-ag-uses-amazon-sagemaker-and-gluonts-for-demand-forecasting/)
on using [GluonTS](https://ts.gluon.ai/) to develop custom product demand forecasting on
[Amazon SageMaker](https://aws.amazon.com/sagemaker/), and generate demand forecasts for each products with custom models.

The sample notebooks demonstrate faster experimentation with multiple custom models. The changes involves only parameteric changes to the entrypoint train script.

![Structure of this repo](references/repo-layout.png)

## Implementation notes

The entrypoint train script utilizes GluonTS to work with time series data in
a simpler fashion, and to access many state-of-the-art custom models in the
GluonTS library. The novelties demonstrated by the script include:

- a single generic train script that supports multiple built-in algorithms in
  GluonTS.

- Guide modular style implementation in notebooks and entrypoint scripts.

- The train script passes through hyperparameters, it receives as command line
  arguments, directly to the specified GluonTS estimator.

  * The entrypoint train script does not need to explicitly declare all those
    hyperpameters in its body.

  * This functionality utilizes another sample repository:
    [aws-samples/amazon-sagemaker-entrypoint-utilities](https://github.com/aws-samples/amazon-sagemaker-entrypoint-utilities),
    a dependency that the entrypoint train script declares in its
    `requirements.txt`

- At the end of training, the train script performs backtesting on a test
  split. Then, the script outputs to files the backtest performance metrics,
  the forecasts resulted from test split, and backtest plots of all timeseries
  as montages and individual plots.

  * This is done by design, and the aim is to let data scientists quickly
    analyze their model performance without having to separately run inferences
    (and additional downstream tasks for plotting etc.).

  * This functionality utilizes another sample repository:
    [aws-samples/smallmatter-package](https://github.com/aws-samples/smallmatter-package),
    a dependency that the entrypoint train script declares in its
    `requirements.txt`

## Security

See [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information.

## License

This library is licensed under the MIT-0 License. See the LICENSE file.

## Authors
* Verdi March [GitHub](https://github.com/verdimrc)
* Beibit Baktygaliyev
* Zmnako Awrahman [GitHub](https://github.com/zmnaka)

branch_name: refs/heads/main


text:
# image_cacheing

image_cacheing is an image caching package. It is currently tested for Android applications.

ImageCacheing widget takes url as a param. url params take in String url for the image url.
```dart
ImageCacheing(url: "Image URL"),
```

ImageCacheing widget also takes param named loadingWidget. This take widget it will show when the image is loading to be cache to your system.
```dart
ImageCacheing(
    url: global.imageLoadingUrl,
    loadingWidget: Center(child: CircularProgressIndicator())),
```

ImageCacheing widget also takes param named errorWidget. This take widget it will show when an error occurred in the widget. For example, giving in a valid URL.

```dart
ImageCacheing(
    url: global.imageErrorUrl,
    errorWidget: Center(child: Icon(Icons.warning)))
```

gha_language: Dart


text:
# Create Puzzle Solver Project

Although this is all about Azure and the cloud, we're going to start with a simple .NET Core console app that references a .NET standard library which contains the code to scan a two dimensional array of text character to find a set of predefined words. We can then use this library from within the yet to be created Azure functions.

## Create the project

* In the previously created solution, add a new .NET Core Console project and call it _PuzzleSolverTest_.
* Add another project, this time a .NET standard library called _PuzzleSolverLib_

Feel free to organize the two projects in a solution folder if you like to.

![Puzzle Solver Projects](../assets/PuzzleSolverProjects.png)

## Search algorithmn

Our plan is to get back a two dimensional array of text characters from the vision API and we also know what words to look for. Given this input data we can implement an algorithm to search for words.

Let's use the following puzzle as an example. We are looking for the words "FUN", "FAKE" and "KITCHEN":

````
---------------------------------
|   # 0 # 1 # 2 # 3 # 4 # 5 # 6 #
=================================
| 0 # F | U | N | A | C | D | G |
---------------------------------
| 1 # A | R | J | K | O | M | T |
---------------------------------
| 2 # K | I | T | C | H | E | N |
---------------------------------
| 3 # E | X | N | L | Z | I | U |
---------------------------------
````

Columns span from 0 to 6 and rows from 0 to 3.

We can create a "brute force" algorithm by considering every combination of column and row (a cell) as a starting point for a word. The algorithm will iterate over all the cells and call a helper function to check if the cell is the starting point of a word.
By having a separate function to search for words, we can easily search vertically, horizontally but also diagonally.

If a word is found, it will be stored in a result set that also contains the cell positions of the word's individual characters.

## Give it a try

Think about a possible implementation. Maybe you can come up with your own solution. All code should go into the library project. The console app is there to test the functionality and outpout the results.

There should be a method

`public static SearchResult SearchForWord(char[,] grid, string word)`

to search for a spefic word in a grid of characters.

`SearchResult` is a structure:

```cs
public class SearchResult
{
    public bool Found { get; set; }
    public GridPosition StartPos { get; set; }
    public string Word { get; set; }
    public ArrayList Letters { get; set; } = new ArrayList();

    public void AddLetterMatch(char letter, int row, int col)
    {
        Letters.Add(new LetterAtPosition(letter, row, col));
    }
}
```

The two other types used are `GridPosition` and `LetterAtPosition`. You can find them here:

```cs
public struct GridPosition
{
    public int Row;
    public int Col;

    public GridPosition(int row, int col)
    {
        Row = row;
        Col = col;
    }
}

public struct LetterAtPosition
{
    public GridPosition Position { get; set; }
    public char Letter { get; set; }
    public LetterAtPosition(char letter, int row, int col)
    {
        Letter = letter;
        Position = new GridPosition(row, col);
    }
}
```

A completed version of the solver can be found in the repo.

repository: Krumelur/WordPuzzleSolver

repo_name: Krumelur/WordPuzzleSolver


text:
# Terminal

This folder contains files to setup a fancy experience on Windows across all its terminal options such as PowerShell, Linux Subsystem on Windows and Windows Terminal. This repository and its files was inspired by the work done by Neil Pankey, Ryan Beesley, Scott Hanselman, Russell West, and Paul Hampson in this [repository](https://github.com/neilpa/cmd-colors-solarized).

## Color Schemes

Included are three color schemes:

* Solarized Light
* Solarized Dark - The default theme for all PowerShell instances
* Ubuntu - The default theme for Linux Subsystem (Ubuntu distro)

For more details and screenshots, as well as color schemes for other applications see the [Solarized](https://ethanschoonover.com/solarized) home page. The [ColorTool](https://github.com/Microsoft/Terminal/tree/master/src/tools/ColorTool) is also a great tool to create and explore new color schemes and it also  includes support for [iTerm](https://github.com/mbadolato/iTerm2-Color-Schemes) themes!

## Installation

### Update Registry for PowerShell

Import the `.reg` file of choice, e.g. `regedit /s Solarized-Dark.reg`.

This updates the registry defaults that are used for NEW shortcuts that start afresh, via `Windows+R`. It won't change existing
shortcuts you may already created because they have their own color mapping stored as opaque blobs of data directly into the .lnk file.

### Update PowerShell shortcut .lnks

First, ensure that you can execute scripts on your system by running the following command from an elevated PowerShell. To run PowerShell as Administrator, click `Start`, search for PowerShell, `right-click` PowerShell and select `Run as Administrator`.

In the PowerShell window use this command.

```PowerShell
Set-ExecutionPolicy Unrestricted -Scope CurrentUser -Force
```

Then, to update the shortcuts on Windows 10 click `Start`, search for PowerShell. When it appears in the list, `right-click` and select `Open file location`. This will open an Explorer window and show you the shortcut. Hold shift and right-click on the shortcut, then select `Copy as path`. Now open a PowerShell to the location of this project.

In the PowerShell window use this command.

```PowerShell
Update-Link "<shortcut.lnk>" [Light|Dark|System]
```

The path to the shortcut.lnk is the same as you copied to your clipboard in the previous step. To easily paste it in Windows 10,
just right-click on the window. If the path has spaces, you will want to wrap it in quotes, but if you followed the recommended
way to use Copy as path, it will be done for you. If no theme is given, `Update-Link` will default to Solarized Dark.

## Uninstall

### Registry for PowerShell

The file `Defaults.reg` is provided to restore the command prompt colors back to their shipping defaults. The registry settings have been checked for versions of Windows back to at least Windows 7 and the values are the same. To restore the defaults, open the `regedit` and delete the following keys:

* `[HKEY_CURRENT_USER\Console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe]`
* `[HKEY_CURRENT_USER\Console\%SystemRoot%_SysWOW64_WindowsPowerShell_v1.0_powershell.exe]`

Then import the .reg file the same way as you applied it previously, `regedit /s Defaults.reg`.

### PowerShell shortcut .lnks

To restore the shortcut file defaults use the follow command.

```PowerShell
Update-Link "<shortcut.lnk>" System
```

## Side Notes

There are a bunch of great modules out there that can help boost your experience using PowerShell such as [PSReadLine](https://github.com/PowerShell/PSReadLine), which makes PowerShell behave like zsh, that is my favorite shell in GNU/Linux. It gives you substring history search, incremental history search, and awesome tab-completion ([full details on Jason's blog](https://devblogs.microsoft.com/powershell/announcing-psreadline-2-1-with-predictive-intellisense/?WT.mc_id=-blog-scottha)). Down below, some other modules that compose my Powershell customizations:

* [PackageManagement (WinGet)](https://github.com/microsoft/winget-cli)
* [PSReadLine](https://github.com/PowerShell/PSReadLine)
* [posh-git](https://github.com/dahlbyk/posh-git)
* [Terminal-Icons](https://github.com/devblackops/Terminal-Icons)

repository: ariellourenco/dotfiles

repo_name: ariellourenco/dotfiles


text:
{% callout type="caution" title="Can I use component testing?" %}
React component testing with Nx requires **Cypress version 10.7.0** and up.

You can migrate with to v10 via the [migrate-to-cypress-10 generator](/packages/cypress/generators/migrate-to-cypress-10).

This generator is for Cypress based component testing.

If you want to test components via Storybook with Cypress, then check out the [storybook-configuration generator docs](/packages/react/generators/storybook-configuration)
{% /callout %}

This generator is designed to get your React project up and running with Cypress Component Testing.

```shell
nx g @nx/react:cypress-component-configuration --project=my-cool-react-project
```

Running this generator, adds the required files to the specified project with a preconfigured `cypress.config.ts` designed for Nx workspaces.

The following file will be added to projects where the Component Testing build target is using `webpack` for bundling:

```ts {% fileName="cypress.config.ts" %}
import { defineConfig } from 'cypress';
import { nxComponentTestingPreset } from '@nx/react/plugins/component-testing';

export default defineConfig({
  component: nxComponentTestingPreset(__filename, {
    bundler: 'webpack',
  }),
});
```

The following file will be added to projects where the Component Testing build target is using `vite` for bundling:

```ts {% fileName="cypress.config.ts" %}
import { defineConfig } from 'cypress';
import { nxComponentTestingPreset } from '@nx/react/plugins/component-testing';

export default defineConfig({
  component: nxComponentTestingPreset(__filename, {
    bundler: 'vite',
  }),
});
```

Here is an example on how to add custom options to the configuration

```ts {% fileName="cypress.config.ts" %}
import { defineConfig } from 'cypress';
import { nxComponentTestingPreset } from '@nx/react/plugins/component-testing';

export default defineConfig({
  component: {
    ...nxComponentTestingPreset(__filename, {
      bundler: 'webpack',
    }),
    // extra options here
  },
});
```

## The `bundler` option

Component testing supports two different bundlers: `webpack` and `vite`. The Nx generator will pick up the bundler used in the specified project's build target. If the build target is using `@nx/webpack:webpack`, then the generator will use `webpack` as the bundler. If the build target is using `@nx/vite:build`, then the generator will use `vite` as the bundler.

You can manually set the bundler by passing `--bundler=webpack` or `--bundler=vite` to the generator, but that is not needed since the generator will pick up the correct bundler for you. However, if you want to use a different bundler than the one that is used in the build target, then you can manually set it using that flag.

## Specifying a Build Target

Component testing requires a _build target_ to correctly run the component test dev server. This option can be manually specified with `--build-target=some-react-app:build`, but Nx will infer this usage from the [project graph](/concepts/mental-model#the-project-graph) if one isn't provided.

For React projects, the build target needs to be using the `@nx/webpack:webpack` executor.
The generator will throw an error if a build target can't be found and suggest passing one in manually.

Letting Nx infer the build target by default

```shell
nx g @nx/react:cypress-component-configuration --project=my-cool-react-project
```

Manually specifying the build target

```shell
nx g @nx/react:cypress-component-configuration --project=my-cool-react-project --build-target:some-react-app:build --generate-tests
```

{% callout type="note" title="Build Target with Configuration" %}
If you're wanting to use a build target with a specific configuration. i.e. `my-app:build:production`,
then manually providing `--build-target=my-app:build:production` is the best way to do that.
{% /callout %}

## Auto Generating Tests

You can optionally use the `--generate-tests` flag to generate a test file for each component in your project.

```shell
nx g @nx/react:cypress-component-configuration --project=my-cool-react-project --generate-tests
```

## Running Component Tests

A new `component-test` target will be added to the specified project to run your component tests.

```shell
nx g component-test my-cool-react-project
```

Here is an example of the project configuration that is generated. The `--build-target` option is added as the `devServerTarget` which can be changed as needed.

```json {% fileName="project.json" %}
{
  "targets" {
    "component-test": {
      "executor": "@nx/cypress:cypress",
      "options": {
        "cypressConfig": "<path-to-project-root>/cypress.config.ts",
        "testingType": "component",
        "devServerTarget": "some-react-app:build",
        "skipServe": true
      }
    }
  }
}
```

Nx also supports [Angular component testing](/packages/angular/generators/cypress-component-configuration).

repository: nrwl/nx

gha_language: TypeScript

repo_name: nrwl/nx


text:
## Variables

Private and mutability:

- Variables starting with '\_' are private variable and can only be reached by
  the current environment and current environment's children

- Variables starting with an uppercase character (optionally with leading '\_')
  are called **value immutable**. Their environment has only **immutable**
  functions (functions starting where the first parameter is **value
  immutable**) and **immutable** variables, where **mutable** variables in the
  original environment will also be **immutable**.

- Variables which have the type ``&expr`` are **pointer mutable**. They can be
  reassigned after initialization. Variables with other types cannot be
  reassigned. Conversion between pointer (im-)mutable types is done implicitly.

Example:

```
&x : i32 := 100
&x := 100
x = 101 // works
y := 100
y = 101 // doesn't compile
```

### Representing an object

A variable returns ``()`` if it isn't initialized.  A variable can be
initialized using **=** or **:=** to declare and define the variable at the
same time.

### Assignments

Assigning a variable with **=** (re-)initializes the variable. Reinitialization
[^reinit] is only possible if variable is **pointer mutable**. The assigned
object (RHS) is returned.

Assigning a variable with **:=** declares the variable and the initializes
the variable. Returns ``()``.

[^reinit]: The variable is already initialized.

### Local and global

**Local** variables are dropped after a *funcbody* scope ends. **Global**
variables are dropped when the program terminates.

### Shadowing

With *shadowing* identifiers used by previous variable declarations can be used
in another variable declaration. Afterwardss, as long the new variable isn't
dropped, this variable will be referenced when mentioning the identifier
instead of the old one. A variable can only be shadowed if it was declared
in a parent scope.

### Initialization

The value of a *funcbody* variable can be used, if the variable was definitly
initialized, otherwise only initialization is allowed. The initization of
variables in *funcbody* can only be done in the scope the variable was
declared.

repository: federlang/feder-ref

repo_name: federlang/feder-ref


text:
# Release Checklist

- Update CHANGELOG
- Verify that all CI tests pass for current master
- Tag the release, and push to Github
- Wait for tag CI to complete
- Download assets from snapshots.mitmproxy.org
- Create release notice on Github
- Upload wheel to pypi (`twine upload wheelname`)
- Update docker-releases repo
  - Create a new branch based of master for major versions.
  - Add a commit that pins dependencies like so: https://github.com/mitmproxy/docker-releases/commit/3d6a9989fde068ad0aea257823ac3d7986ff1613. The requirements can be obtained by creating a fresh venv, pip-installing the new wheel in there, and then running `pip freeze`.
- Update `latest` tag on https://hub.docker.com/r/mitmproxy/mitmproxy/~/settings/automated-builds/
- Bump the version in https://github.com/mitmproxy/mitmproxy/blob/master/mitmproxy/version.py and update https://github.com/mitmproxy/mitmproxy/blob/master/mitmproxy/io_compat.py in the next commit

repository: laurmurclar/mitmproxy

repo_name: laurmurclar/mitmproxy


text:
# Composable configurations

The `nextflow.config` file plays a major role in production infrastructure while giving us tools such as `profiles` to keep the workloads portable.

This proposal outlines an approach towards constructing the **configuration** files with **composability** and **modularity** in mind.

## Summary

To avoid long and messy configuration files and honor the `DRY` principle, we can simplify the configuration management using a concept similar to *nextflow modules*.

A possible solution could be a combination of  the top-level `nextflow.config` and `configs` folder shown below in the directory tree, which can allow us to keep the overall configuration consistent and composable.

```

├── configs
│   ├── profiles
│   │   ├── dockerhub.config
│   │   ├── gcp_dev.config
│   │   └── gcp_prod.config
│   └── scopes
│       ├── docker.standard.config
│       └── process.standard.config
├── nextflow.config
└── params.yaml

```

## TIP

To develop and debug the `configuration`, checkout the `-c` (soft-override), `-C` (hard-override) top-level options and `config`command on the Nextflow CLI documentation.

You might find yourself using the following command quite often while working on the configuration

```
$ nextflow config -a

```

## Problem-1

**How to avoid long configuration files?**

Once we start thinking about portability and optimizations, top-level `nextflow.config` has a tendency to grow too much. The situation gets complicated once we go beyond the local development environment and have to test and optimize the pipeline across multiple clouds/executors - `profiles` have become a standard way to achieve this.

Take the following as an example

```nextflow

manifest {
    name = 'Analysis'
    version = '0.0.1'
    author = 'some_author'
    mainScript = 'analysis.nf'
    defaultBranch = 'master'
    nextflowVersion = '>=20.01.0-edge'
}

profiles {
  standard {
    process {
      errorStrategy = 'finish'
    }
  }
  dockerhub {
    docker.enabled = true
    docker.fixOwnership = true
    process {
      errorStrategy = 'retry'
      maxRetries = 3
      ext.registry = 'dockerhub.com'
      ext.project = 'local'
    }
  }
  gcp_prod {
    google.project = 'project1'
    google.zone = 'europe-west2-c'
    cloud.preemptible = true
    executor.queueSize = 48
    workDir = 'gs://nextflow-work-bucket/work'
    process {
      executor = 'google-lifesciences'
      errorStrategy = { task.exitStatus==14 ? 'retry' : 'terminate' }
      maxRetries = 3
      ext.registry = 'gcr.io'
      ext.project = 'project1'
      ext.results = "$baseDir/results/prod"
    }
  }
  gcp_dev {
    tower {
      accessToken = 'i_dont_work_d26b1c89d4c0ac1a958c005f289083d6'
      enabled = true
    }
    google {
      zone = 'europe-west2-c'
      lifeSciences.debug = false
      lifeSciences.preemptible = false
      lifeSciences.usePrivateAddress = true
    }
    executor.queueSize = 192
    bucketDir = 'gs://nextflow-work-bucket/work'
    process {
      executor = 'google-lifesciences'
      errorStrategy = 'retry'
      maxRetries = 5
      ext.registry = 'gcr.io'
      ext.project = 'project1-dev'
      ext.results = "$baseDir/results/dev"
    }
  }
}

```

## Solution-1

Use the `includeConfig` feature to tone down the above file to something like the following

```nextflow

manifest {
    name = 'Analysis'
    version = '0.0.1'
    author = 'some_author'
    mainScript = 'analysis.nf'
    defaultBranch = 'master'
    nextflowVersion = '>=20.01.0-edge'
}

profiles {
  standard {
    process {
       includeConfig "./config/scopes/process.standard.config"
    }
  }

    // Profile for dockerhub
    includeConfig "./config/profiles/dockerhub.config"

    // Profile for gcp_dev
    includeConfig "./config/profiles/gcp_dev.config"

    // Profile for gcp_prod
    includeConfig "./config/profiles/gcp_prod.config"

}

```

This allows us to make use of the `includConfig` and the automatic **configuration resolution** which *Nextflow* offers us by default.

We can achieve this composability by relying on certain conventions, for example in the above example, we have relied on a separate folder called `configs` as a base for the **profiles** and **scopes**, as defined in the official Nextflow documentation.

The proposal is to have a folder structure similar to the following and treating the `standard` profile as the ground truth for all other profiles (the reason that scopes files have a `.standard.` in their names).

```

configs
├── profiles
│   └── dockerhub.config
└── scopes
    ├── docker.standard.config
    └── process.standard.config

```

## Problem-2

**How do we keep the configuration `DRY`?**

## Solution-2

Note that there are `scope-fields` which are similar in multiple `profiles`, such as `process.errorStrategy` in the case of `standard`, `dockerhub`, `gcp_prod` and `gcp_dev` though the value of `process.errorStrategy` field (sometimes) differ in these profiles.

It is worth noting that since we are treating the `standard` profile as the ground truth, we rely upon the `soft-override` of properties in the derived profiles.

For example, our `./configs/scopes/process.standard.config` could be something like

``` nextflow
errorStrategy = 'finish'

withName:
"GATK_*" {
    memory = 8
    cpus = 8
}

```

And we can include this within the `standard` profile in the top-level `nextflow.config`

``` nextflow
standard {
    process {
       includeConfig "./config/scopes/process.standard.config"
    }
}

```

To override this default, we can follow the same pattern in the `./configs/profiles/dockerhub.config` file

``` nextflow
dockerhub {
    process {
        // Include the standard process
        includeConfig "../scopes/process.standard.config"

        // Override the standard errorStrtegy
        errorStrategy = 'retry'

        // Add new field specific to this profile
        maxRetries = 3

        // Append new field specific to this profile
        withName:
        "GATK_*" {
            container = "broadinstitute/gatk:<IP_ADDRESS>"
        }

    }

}

```

In the above snippet, we override the `errorStrategy` field from the `process.standard.config` and then add the `maxRetries` field. Moreover, since these are `soft-overrides` whatever value we  don't override in the `dockerhub` scope will be the same as `standard` profile, which means that the `cpus` and `memory` for `GATK_*`  processes is still 8, we only specified that within the `dockerhub` profile we'd like to run these processes with the `broadinstitute/gatk:<IP_ADDRESS>` container.

## TIP

At this point you might be wondering **should we always derive any new profile directly from `standard` scopes?**

The answer to this is, **mostly yes**, though it also depends on how you wish to design it and what's manageable for you and your team. You could also do something like

```
├── configs
│   ├── profiles
│   │   ├── dockerhub.config
│   │   └── gcp
│   │       ├── gcp_dev.config
│   │       ├── gcp_prod.config
│   │       └── utils.config

```

...but it ends up increasing the nesting too much. As a heuristic, it's recommended that you compose the profiles using the standard scopes and then override/add the fields which are specific to that pipeline.

## NOTE

Please note that it is more idiomatic NOT to specify the  `params` scope in the `config` file and instead rely on the `params.yaml` for that. As a thumb rule, all **executor level details** and **profiles** etc should be in the `config` and all `file` path related data or custom pipeline `flags` should be in `params.yaml` or `params.json`

Plus, you can use this YAML/JSON directly with `Tower`.


text:
---
title: Wintering with monarchs
date: '2019-01-18 06:00:00'
image: phil_monarchs_.jpg
tags: butterfly butterflies monarch monarca mexico sanctuary reserve preserve migration
categories: vandwelling spanish
layout: post
---

What country can claim the monarch, which lives in Canada, US and Mexico? Growing up in Indiana, we naturally said "monarchs go to Mexico for the winter" but in Mexico one might naturally say "monarchs go to the US for the spring."

We are wintering with monarchs; we see one from time to time, and when we went to the [Monarch Butterfly Biosphere Reserve](https://en.wikipedia.org/wiki/Monarch_Butterfly_Biosphere_Reserve), we saw millions. There are four public sanctuaries within the Reserve, and we didn't know how to choose - we tried to figure out in advance which would allow dogs, but no info.

We picked El Rosario, and it was amazing - but our trip to [Sierra Chincua](https://www.tripadvisor.com/Attraction_Review-g150796-d506959-Reviews-Sierra_Chincua_Butterfly_Sanctuary-Central_Mexico_and_Gulf_Coast.html) 5 years ago was more magical.  The number of butterflies and how much they're moving is totally about timing - but Sierra Chincua is smaller, less commercial and more intimate. But I'm sure you can't go wrong with any of the 4.

We tried a few times to get to the santuary, and signs like this didn't help.

[![](/images/rosario_sign_.jpg){:width="60%"}](/images/rosario_sign.jpg)

Even though El Rosario is the best-known, most-visited, and should be user-friendly, we managed to get lost between the parking lot and the butterflies. We followed the stone road through the shops and then kept walking on a rocky forest path. We saw small paths in various directions and wondered why we didn't see any signs. Eventually a man walking through the woods asked us (in Spanish) if we were there to see the butterflies. We said yes, and he told us we were going the wrong way. He explained in a couple ways where we should go instead, but it wasn't clear [(how can our Spanish still be so bad!?)](https://reverdecer.annalisagross.com/2018/09/27/learning-the-language/)

He finally decided to escort us. Phillip kept us pretty well, but I was struggling! We were at least 2600 m up and the trail was steep. I was incredibly relieved when he stopped, explained something, and disappeared (with MX$100 thank-you).

We saw through the trees some people on a path, and headed that way. As we got to the rope-lined path and crawled through, a guide scolded us for leaving the path. I tried to explain that we'd never found the path in the first place, but I don't think I succeeded.

For the first half hour I was disappointed, but then the monarchs woke up from their midday nap and began to fly. It was a cloudy day so they never got vivacious. Their clusters don't show up well in my picture, but they congregate on the trees to conserve heat.

[![](/images/monarch_clusters_.jpg){:width="60%"}](/images/monarch_clusters.jpg)

Is that how so many die, in the clustering? Or do they just die of old age? (Which I think might be a couple weeks for a monarch).

[![](/images/dead_monarchs_.jpg){:width="60%"}](/images/dead_monarchs.jpg)

But we were surrounded by millions of monarchs, among staggeringly-high oak and oyamel trees, breathing (hard) fresh air, and it was fabulous. The hummingbird was just bonus.

I wish the video had better sound - the monarchs sound like light rain as they fly, land, fly, land.

We would've stayed longer, but we'd been told to leave the dogs in the car. Told by the kids who patrol the parking lot, singing a song about the monarchs for tips, asking for candy and money, etc. Actually the kids wanted to take care of the dogs (for pay, of course!) while we walked, but we knew they'd prefer the car. The kids said we couldn't take the dogs because they might make noise and scare the butterflies. We tried to explain that these dogs would not make a sound (as long as they're with us) but really, the kids weren't in charge anyway.

And since we went into the woods on the wrong path, we never got a chance to ask the official gatekeepers. Who, by the way, charge MX$50 per adult, so the $100 we gave our unofficial guide was exactly the right price.

Everyone else on the path had a guide with them, even though (once on the path) there would be no way to get lost. Concrete ~15 flights of stairs with ropes on both sides. But the guides certainly had monarch insight that we missed out on.

Monarchs are the furthest-migrating (by far!) pollinator alive. We don't even know all the ways we depend on monarchs. In the meantime, we want to follow their example and winter in Mexico, spring and summer in the US.


text:
## pkghub-render ![npm](https://badge.fury.io/js/pkghub-render.png)

A renderer for pkghub, render html as given `module/template` template.

### Installation

```bash
$ npm install pkghub-render
```

### Example

Render requires `{ moduleName }/{ template }` string as dest file.

```js
import render from 'pkghub-render'

// mails-flat is a module published to NPM
// template dir could be `home` or `home.html`
render('mails-flat/message')
  .then(html => {
    console.log(html)
  })
  .catch(err =>
    console.log(err))
```

### Support View Engines

- swig (built-in)
- jade
- ejs

### Contributing
- Fork this repo
- Clone your repo
- Install dependencies
- Checkout a feature branch
- Feel free to add your features
- Make sure your features are fully tested
- Open a pull request, and enjoy <3

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

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

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

---
![docor](https://cdn1.iconfinder.com/data/icons/windows8_icons_iconpharm/26/doctor.png)
built upon love by [docor](https://github.com/turingou/docor.git) v0.1.2

repository: KairoBoni/obsr

gha_language: JavaScript

repo_name: KairoBoni/obsr


text:
# Weekly 08/25 - 08/31

周报第四十八期

- 催稿人:
  [@ComMouse][dou]
  (由 [@arrowrowe][mie] 代理)
- 交稿人:
  [@at15][at15]
  [@ComMouse][dou]
  [@gaocegege][cece]

[at15]: https://github.com/at15
[mie]: https://github.com/arrowrowe
[dou]: https://github.com/ComMouse
[cece]: https://github.com/gaocegege

## 目录

- [服务](#user-content-service)
  - [Mopidy](https://www.mopidy.com/) the hackable music server.
  - [Shipshape](https://github.com/google/shipshape): Google, Docker, Program Analysis, ...
  - [Postleaf](https://www.postleaf.org/), simple, beautiful publishing.
- [平台](#user-content-platform)
  - [Koding](https://www.koding.com/)
  - [Internet Archive](https://archive.org/)
  - [The Foundation](https://thefoundation.com/?splash_disabled=1)
- [专题: 怎样打造一个分布式数据库](#user-content-special-distributed) from [zenany/weekly`@b0c3de3`](https://github.com/zenany/weekly/commit/b0c3de35d7caa5753295cd54a1961d846a9a6a59)
- [巴别塔](#user-content-babel)
  - [Clojure](#user-content-clojure): [Collaborative Programmable Music](http://overtone.github.io/)
  - [Rust](#user-content-rust): [trust-dns](https://docs.rs/trust-dns)
  - [Go](#user-content-go): [Simple RTMP Server](https://github.com/ossrs/srs) & [Oryx](https://github.com/ossrs/go-oryx), [Thyme](https://github.com/sourcegraph/thyme) the time tracker
  - [JavaScript](#user-content-javascript): [Itsy Bitsy Data Structures](https://github.com/thejameskyle/itsy-bitsy-data-structures), [GreenSock Animation Platform](https://github.com/greensock/GreenSock-JS), [Snap.svg](http://snapsvg.io/)
  - [PHP](#user-content-php): [A History Of PHP Frameworks/Library Collections](https://github.com/pmjones/php-history), [Laravel 5.3 is now released](https://laravel-news.com/2016/08/laravel-5-3-is-now-released/)
- [广告](#user-content-ad): 容器技术开源工程师招募, [DaoCloud 开源战队——中国容器开源生态梦之队](http://blog.daocloud.io/dcosteam0824/)
- [有趣的!](#user-content-fun)
  - [Browserhacks](http://browserhacks.com/)

## 服务

- [Mopidy](https://www.mopidy.com/), an extensible music server that plays music from local disk, Spotify, SoundCloud, Google Play Music, and more.
  - Stream music from the cloud.
  - Just a server, a Python application.
  - Everybody use their favorite client.
  - Mopidy on Raspberry Pi.
  - Hackable. Mopidy's extension support and Python, JSON-RPC, and JavaScript APIs... Perfect for building your own hacks.

  [![Mopidy](https://www.mopidy.com/media/images/martijnboland-moped.png)](https://www.mopidy.com/)
- [Shipshape](https://github.com/google/shipshape), a static program analysis platform that allows custom analyzers to plug in through a common interface.
  - Keywords: Google, Docker, Program Analysis, ...
- [Postleaf](https://www.postleaf.org/) (GitHub: [Postleaf/postleaf](https://github.com/Postleaf/postleaf)), simple, beautiful publishing.

  [![Postleaf](https://www.postleaf.org/content/uploads/2016/07/homepage-splash.png)]((https://www.postleaf.org/))

## 平台

- [Koding](https://www.koding.com/): Seamlessly boot, build and test your dev projects with game-changing collaboration.

  > ___[@at15][at15]:___ Koding is [open sourced](https://github.com/koding/koding) and [integrated with GitLab](https://about.gitlab.com/2016/07/26/koding-and-gitlab-integrated/), maybe we no longer to have course for setting up develop environment?
- [Internet Archive](https://archive.org/)

  > ___[@at15][at15]:___ 一个网站页面存档服务，居然有从 12 年开始的同去 \w/
- [The Foundation](https://thefoundation.com/?splash_disabled=1), start your software business.

## 专题: 怎样打造一个分布式数据库

**from [zenany/weekly@`b0c3de3`](https://github.com/zenany/weekly/commit/b0c3de35d7caa5753295cd54a1961d846a9a6a59)**

- InfoQ: [怎样打造一个分布式数据库](http://www.infoq.com/cn/articles/how-to-build-a-distributed-database)

  > ___[@zenany](https://github.com/zenany):___ 对分布式数据库项技术的的介绍挺详细的，可以了解下业界这项关键技术的各种实现方式。
- [TiDB](https://github.com/pingcap/tidb), a distributed NewSQL database compatible with MySQL protocol.
- [TiKV](https://github.com/pingcap/tikv), a distributed Key-Value database powered by Rust and Raft.
- Cloudflare: [The Cuban CDN](https://blog.cloudflare.com/the-cuban-cdn/), 古巴的 CDN.

## 巴别塔

### Clojure

- [Collaborative Programmable Music](http://overtone.github.io/) (GitHub: [overtone/overtone](https://github.com/overtone/overtone)), an open source audio environment designed to explore new musical ideas from synthesis and sampling to instrument building, live-coding and collaborative jamming.

  ```clojure
    ;; boot the server
    user=> (use 'overtone.live)

    ;; listen to the joys of a simple sine wave
    user=> (demo (sin-osc))

    ;; or something more interesting...
    user=>(demo 7 (lpf (mix (saw [50 (line 100 1600 5) 101 100.5]))
                  (lin-lin (lf-tri (line 2 20 5)) -1 1 400 4000)))
  ```

### Rust

- [trust-dns](https://docs.rs/trust-dns) (GitHub: [bluejekyll/trust-dns](https://github.com/bluejekyll/trust-dns)), a Rust based DNS server.

### Go

- [Simple RTMP Server](https://github.com/ossrs/srs) (SRS), industrial-strength live streaming cluster, for the best conceptual integrity and the simplest implementation.
- [Oryx](https://github.com/ossrs/go-oryx), [SRS](https://github.com/ossrs/srs)++, focus on real-time live streaming cluster.
- [Thyme](https://github.com/sourcegraph/thyme). Automatically track which applications you use and for how long.

  [![Application usage timeline](https://github.com/sourcegraph/thyme/blob/master/assets/images/app_coarse.png)]((https://github.com/sourcegraph/thyme))

### JavaScript

- [Itsy Bitsy Data Structures](https://github.com/thejameskyle/itsy-bitsy-data-structures), all the things you didn't know you wanted to know about data structures.
- [GreenSock Animation Platform](https://github.com/greensock/GreenSock-JS), ultra high-performance, professional-grade animation for the modern web.
  - Example: [Cryptaris](http://www.cryptarismission.com/) by the U.S. Army.
- [Snap.svg](http://snapsvg.io/) (GitHub: [adobe-webplatform/Snap.svg](https://github.com/adobe-webplatform/Snap.svg)), the JavaScript library for modern SVG graphics.

### PHP

- [A History Of PHP Frameworks/Library Collections](https://github.com/pmjones/php-history), a list of the years-of-introductions of notable (to me) PHP framework and library projects.

  > ___[@at15][at15]:___ 通过这个才知道了 archive.org，phalcon 都 3.0 了....

  > ___[@ComMouse][dou]:___ [@at15][at15] Phalcon 3.0 就是 2.1...

  > ___[@at15][at15]:___ [@ComMouse][dou] 嗯，我看到了，本来想吐槽他们为了 semver 而 semver 然后删了.....
- [Laravel 5.3 is now released](https://laravel-news.com/2016/08/laravel-5-3-is-now-released/)

## 广告

- 容器技术开源工程师招募: [DaoCloud 开源战队——中国容器开源生态梦之队](http://blog.daocloud.io/dcosteam0824/)

  > DaoCloud 为你转身，加入中国最强开源战队！

## 有趣的!

- [Browserhacks](http://browserhacks.com/) (GitHub: [4ae9b8/browserhacks](https://github.com/4ae9b8/browserhacks)), an extensive list of browser specific CSS and JavaScript hacks from all over the interwebs.

repository: dyweb/web-stuff

repo_name: dyweb/web-stuff


text:
# GCNGEMM
Optimized half precision gemm assembly kernels on AMD Fiji

## Introduction
This all date back to 2016 when I was trying to understand modern GPU architecture while studying performance optimization techniques for deep learning. Basically, I found out that technicians from NVIDIA have hand-assembled their cuBLAS and cuDNN routines and gained better utilization of their GPU products than AMD’s. Thankfully, [MaxAs](https://github.com/NervanaSystems/maxas) from Scott Gray revealed all those techniques to everyone and I began to consider possibilities of a corresponding GCN implementation.

After a quick investigation of [AMD GCN3 ISA architecture](http://gpuopen.com/compute-product/amd-gcn3-isa-architecture-manual/) and [CLRX](https://github.com/CLRX/CLRX-mirror), I came to the conclusion that it is possible to build optimized assembly kernels for GCN3, so I bought an AMD R9 Nano, an external GPU socket for my notebook and started my journey. After one month, I finished my first kernel and a modified overclock tool to allow 225w power consumption for R9 Nano in October 2016. Out of my expectation, my kernel can achieve around 8 teraflops on a 1.0 GHz 225w R9 Nano for a large square half precision matrix multiplication, that is, near 97.6% utilization (half precision runs at the same speed as single precision on GCN3). The result is encouraging since it’s much faster than clBLAS and we can beat a Titan X Maxwell with cuBLAS.

This repo is basically a snapshot of my work at that time. It contains a certain type of hgemm kernel and a test wrapper, both written for AMD OpenCL 2.0 fglrx driver (which can be ported to ROCm easily I think). I hope it’s useful for other people with the same focus on deep learning and GPGPU programming. If you are interested or have any ideas or questions, feel free to contact me via my email virgil#zju.edu.cn (replace # with @). I’ll write a detailed technical explanation of my code including some unique techniques if many people are interested.

GCNGEMM is not affiliated, sponsored, or otherwise endorsed by Advanced Micro Devices, Inc.

## Requirements
CLRX assembler v0.1.2: https://github.com/CLRX/CLRX-mirror/releases/tag/0.1.2

AMD OpenCL 2.0 fglrx driver: see https://community.amd.com/thread/202821 for details (this modified driver is made by other people)

PyOpenCL: https://github.com/pyopencl/pyopencl

Forked amdcovc for lifting power limit: https://github.com/hyln9/amdcovc

## Usage
```
./kernel.pl
./gemm.py [options] output.clo
```

repository: SingleDavid/GCNGEMM

repo_name: SingleDavid/GCNGEMM


text:
Parsing a Register of Judicial Administration
=============================================
This script uses Python modules **Beautiful Soup**, **Pandas** and **Selenium** to parse public registers and lists of the **Ministry of Justice** of Italy *([Ministero della Giustizia](https://amministratorigiudiziari.giustizia.it/pst/RAG/AlboPubblico.aspx))*.

The script grabs data from 2 main tabs of the webpage: **Sezione Ordinaria** and **Sezione Esperti in Gestione Aziendale**, each of which contains a few dozens of pages with data.

Two dataframes are then created using the parsed information and saved into the Excel file **data_table.xlsx**, into 2 separate sheets.

Requirements
------------
Python 3.6+

Modules:

* [Beautiful Soup](https://www.crummy.com/software/BeautifulSoup/bs4/doc/)
* [Pandas](https://pandas.pydata.org/pandas-docs/stable/)
* [Selenium](https://www.seleniumhq.org/docs/)

How it works
------------
1) Running **admin_reg.py** creates a Crome session in which the script goes through the [webpage](https://amministratorigiudiziari.giustizia.it/pst/RAG/AlboPubblico.aspx)'s first tab *(Sezione Ordinaria)* and parses it's data. Then, the session ends.
#
2) After that, another Chrome session starts and the second tab *(Sezione Esperti in Gestione Aziendale)* gets parsed. The session terminates thereafter.

![terminal](https://user-images.githubusercontent.com/28843507/56517914-68ac2280-653e-11e9-8eae-a0c9b9320e8a.PNG)
#
3) Once the Chrome sessions are finished, the script creates two dataframes *(one for each session's data respectively)* and writes them into the specified Excel file.

![sc1](https://user-images.githubusercontent.com/28843507/56607484-eb011900-6608-11e9-819e-cc3303058548.PNG)
#
4) Data from each tab of the parsed webpage will be stored in the Excel file on a separate sheet:

*Sheet 1*
![sheet1](https://user-images.githubusercontent.com/28843507/56517998-9c874800-653e-11e9-8e33-a61128ce92a8.PNG)

*Sheet 2*
![sheet2](https://user-images.githubusercontent.com/28843507/56518076-c93b5f80-653e-11e9-8ebb-6002f280419b.PNG)


text:
### Status

[![Build Status](https://travis-ci.org/b123400/retain-ios.png)](https://travis-ci.org/b123400/retain-ios)

#Get started

1. Install CocoaPods with `gem install cocoapods`.

2. Edit your Podfile (Create one if you don't have), add this line:

    ```ruby
    pod 'RetainCC'
    ```

3. Run `pod install` in your Xcode project directory.

4. Then import the library in AppDelegate

    ```objective-c
    #import <RetainCC/RetainCC.h>
    ```

5. Setup RetainCC after launch like this:

    ```objective-c
    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    [RetainCC sharedInstanceWithApiKey:@"your api key" appID:@"your app id"];

    return YES;
}
    ```

#Identifying user

- For anonymous

    ```objective-c
    [[RetainCC shared] identifyWithEmail:nil userID:nil]
    ```

- Logged in user with `email` or `user_id`

    ```objective-c
    [[RetainCC shared] identifyWithEmail<EMAIL_ADDRESS>userID:@"12345"]
    ```
    - One user at a time

- Change user attribute

    ```objective-c
    [[RetainCC shared] changeUserAttributes:@{
        @"some custom key" : @"some custom value"
    }];
    ```

#Logging Event

You can log event anywhere in your app like this:
```objective-c
[[RetainCC shared] logEventWithName:@"Clicked" properties:@{@"color":@"red"}];
```

Checkout full [JSON API](http://www.retain.cc/api.html)!

repository: retaincc/retain-ios

gha_language: Objective-C

repo_name: retaincc/retain-ios


text:
---
title: Creating New Hyperdrives
---

You can create as many hyperdrives as you want. Each hyperdrive has its own URL. You [share the URL](sharing-hyperdrives.md) so that other people can visit the hyperdrive.

Only the creator of a hyperdrive can change its files. Visitors can only view the drive (though they can [fork the hyperdrive](advanced/forking-hyperdrives.md) to make their own copy).

To create a new hyperdrive, click on the hamburger menu on the top right of the browser.

![](/img/open-browser-menu.png)

Then select "New Hyperdrive..."

![](/img/new-hyperdrive.png)

You will be prompted to input a title and, optionally, a description. These will be used to identify the hyperdrive.

![](/img/new-hyperdrive-prompt.png)

You will be taken to the new hyperdrive which is (mostly) empty.

![](/img/fresh-hyperdrive.png)

Your hyperdrive is now ready to edit. You can create a new `index.md` (for Markdown) or `index.html` (for HTML) by clicking on the prompts below.

Next, [use the editor](using-the-editor.md) to develop the hyperdrive.

repository: frabrunelle/beaker

repo_name: frabrunelle/beaker


text:
== Remedy Generic Retrieve
This handler returns all the fields of the first matching entry for the
specified Remedy form name and query.

For more information, see the Detailed Description section below.

=== Parameters
[Error Handling]
  Determines what to return if an error is encountered (Error Message or Raise
  Error).
[Remedy Form]
	Remedy Form Name (not display name), eg. People is CTM:People
[Query]
	Advanced Search Query of the record to retrieve

=== Sample Configuration
Error Handling:         Error Message
Remedy Form:            User
Request ID:             <%=@results['retrieve user']['Request ID']%>

=== Results
[Handler Error Message]
	Error message if an error was encountered and Error Handling is set to "Error Message".
[<Remedy Field Name>]
  The value of the Remedy field. (There will be one result for each field retrieved.)

=== Detailed Description
This handler has the ability to have form caching disabled.  To disable form caching set
disable_caching to "Yes".  Disabling caching may negatively impact performance, but it
is also necessary when using a single handler to interact with multiple Remedy
environments.

This handler returns all the fields for the request id provided
in the form specified.

repository: kineticdata/peripherals-bmc-remedy

gha_language: Ruby

repo_name: kineticdata/peripherals-bmc-remedy


text:
---
layout: post
title: 'ClassCraft：課堂遊戲化的理念'
date: 2014-06-07 14:27
comments: true
tags: [教育, rpg]
---
[ClassCraft](http://www.classcraft.com/en/#)

> 教師負責主持及提供經驗值，學生將可選擇戰士、法師或治療師三種職業，學生每積累1000點經驗值就可以升級，如果上課踴躍發問、做對事情就會增加經驗值

> 相對地，如果遲到、遲交或未交作業、或是與老師頂嘴等，生命值會被倒扣，扣光後想要復活，就要扔復活骰子並承受對應懲罰，比如說週六留校查看、手抄五頁課本，或者下次考試時間少五分鐘之類的

引自：[讓上課就像是打LOL或者是魔獸一樣，發動技能就可遲交作業！](http://www.inside.com.tw/2014/06/07/classcraft)

<iframe src="//player.vimeo.com/video/88171112" width="500" height="281" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>

**Character classes**

Healers

![healers](http://www.classcraft.com/wp-content/themes/classcraft/library/images/healers.png)

> When a team member loses life points, the Healer can use his/her healing powers to restore them. Healers can also use these powers on themselves. With maximums of 50 Life Points (HP) and 35 Action Points (AP), Healers are balanced between strength and survival.

Warriors

![warriors](http://www.classcraft.com/wp-content/themes/classcraft/library/images/warriors.png)

> The Warrior uses his/her protection powers to absorb the damage for others while neutralizing the attack. This way, the Warrior only suffers part of the damage. With 80 Life Points (HP), Warriors don’t die as frequently, but with only 30 Action Points (AP), they can’t use their powers as often.

Mages

![mages](http://www.classcraft.com/wp-content/themes/classcraft/library/images/mages.png)

> When a player needs more Action Points (AP) to use a power, Mages can supply them. Mages are the strongest character class because they can acquire a maximum of 50 Action Points, but with only 30 Life Points (HP), they are at risk of dying more frequently.


text:
---
layout: post
title: "Announcing Rust 1.45.0"
author: The Rust Release Team
release: true
---

The Rust team is happy to announce a new version of Rust, 1.45.0. Rust is a
programming language that is empowering everyone to build reliable and
efficient software.

If you have a previous version of Rust installed via rustup, getting Rust
1.45.0 is as easy as:

```console
rustup update stable
```

If you don't have it already, you can [get `rustup`][install] from the
appropriate page on our website, and check out the [detailed release notes for
1.45.0][notes] on GitHub.

[install]: https://www.rust-lang.org/install.html
[notes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1450-2020-07-16

## What's in 1.45.0 stable

There are two big changes to be aware of in Rust 1.45.0: a fix for some
long-standing unsoundness when casting between integers and floats, and the
stabilization of the final feature needed for one of the more popular web
frameworks to work on stable Rust.

## Fixing unsoundness in casts

[Issue 10184](https://github.com/rust-lang/rust/issues/10184) was originally
opened back in October of 2013, a year and a half before Rust 1.0. As you may
know, `rustc` uses [LLVM](http://llvm.org/) as a compiler backend. When you
write code like this:

```rust
pub fn cast(x: f32) -> u8 {
    x as u8
}
```

The Rust compiler in Rust 1.44.0 and before would produce LLVM-IR that looks
like this:

```llvm-ir
define i8 @_ZN10playground4cast17h1bdf307357423fcfE(float %x) unnamed_addr #0 {
start:
  %0 = fptoui float %x to i8
  ret i8 %0
}
```

That `fptoui` implements the cast, it is short for "floating point to
unsigned integer."

But there's a problem here. From [the
docs](https://llvm.org/docs/LangRef.html#fptoui-to-instruction):

> The ‘fptoui’ instruction converts its floating-point operand into the
> nearest (rounding towards zero) unsigned integer value. If the value cannot
> fit in ty2, the result is a poison value.

Now, unless you happen to dig into the depths of compilers regularly, you may
not understand what that means. It's full of jargon, but there's a simpler
explanation: if you cast a floating point number that's large to an integer
that's small, you get undefined behavior.

That means that this, for example, was not well-defined:

```rust
fn cast(x: f32) -> u8 {
    x as u8
}

fn main() {
    let f = 300.0;

    let x = cast(f);

    println!("x: {}", x);
}
```

On Rust 1.44.0, this happens to print "x: 0" on my machine. But it could
print anything, or do anything: this is undefined behavior. But the `unsafe`
keyword is not used within this block of code. This is what we call a
"soundness" bug, that is, it is a bug where the compiler does the wrong thing.
We tag these bugs as
[I-unsound](https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+label%3A%22I-unsound+%F0%9F%92%A5%22)
on our issue tracker, and take them very seriously.

This bug took a long time to resolve, though. The reason is that it was very
unclear what the correct path forward was.

In the end, the decision was made to do this:

* `as` would perform a "saturating cast".
* A new `unsafe` cast would be added if you wanted to skip the checks.

This is very similar to array access, for example:

* `array[i]` will check to make sure that `array` has at least `i + 1` elements.
* You can use `unsafe { array.get_unchecked(i) }` to skip the check.

So, what's a saturating cast? Let's look at a slightly modified example:

```rust
fn cast(x: f32) -> u8 {
    x as u8
}

fn main() {
    let too_big = 300.0;
    let too_small = -100.0;
    let nan = f32::NAN;

    println!("too_big_casted = {}", cast(too_big));
    println!("too_small_casted = {}", cast(too_small));
    println!("not_a_number_casted = {}", cast(nan));
}
```

This will print:

```text
too_big_casted = 255
too_small_casted = 0
not_a_number_casted = 0
```

That is, numbers that are too big turn into the largest possible value.
Numbers that are too small produce the smallest possible value (which is
zero). NaN produces zero.

The new API to cast in an unsafe manner is:

```rust
let x: f32 = 1.0;
let y: u8 = unsafe { x.to_int_unchecked() };
```

But as always, you should only use this method as a last resort. Just like
with array access, the compiler can often optimize the checks away, making
the safe and unsafe versions equivalent when the compiler can prove it.

## Stabilizing function-like procedural macros in expressions, patterns, and statements

In [Rust 1.30.0](https://blog.rust-lang.org/2018/10/25/Rust-1.30.0.html), we stabilized
"function-like procedural macros in item position." For example, [the
`gnome-class` crate](https://gitlab.gnome.org/federico/gnome-class):

> Gnome-class is a procedural macro for Rust.  Within the macro, we
> define a mini-language which looks as Rust-y as possible, and that has
> extensions to let you define GObject subclasses, their properties,
> signals, interface implementations, and the rest of GObject's
> features.  The goal is to require no unsafe code on your part.

This looks like this:

```rust
gobject_gen! {
    class MyClass: GObject {
        foo: Cell<i32>,
        bar: RefCell<String>,
    }

    impl MyClass {
        virtual fn my_virtual_method(&self, x: i32) {
            ... do something with x ...
        }
    }
}
```

The "in item position" bit is some jargon, but basically what this means is that
you could only invoke `gobject_gen!` in certain places in your code.

Rust 1.45.0 adds the ability to invoke procedural macros in three new places:

```rust
// imagine we have a procedural macro named "mac"

mac!(); // item position, this was what was stable before

// but these three are new:
fn main() {
  let expr = mac!(); // expression position

  match expr {
      mac!() => {} // pattern position
  }

  mac!(); // statement position
}
```

Being able to use macros in more places is interesting, but there's another
reason why many Rustaceans have been waiting for this feature for a long time:
[Rocket](https://rocket.rs). Initially released in December of 2016, Rocket is
a popular web framework for Rust often described as one of the best things the
Rust ecosystem has to offer. Here's the "hello world" example from its upcoming
release:

```rust
#[macro_use] extern crate rocket;

#[get("/<name>/<age>")]
fn hello(name: String, age: u8) -> String {
    format!("Hello, {} year old named {}!", age, name)
}

#[launch]
fn rocket() -> rocket::Rocket {
    rocket::ignite().mount("/hello", routes![hello])
}
```

Until today, Rocket depended on nightly-only features to deliver on its promise
of flexibility and ergonomics. In fact, as can be seen on the [project's
homepage](https://rocket.rs/v0.4), the same example above in the current version
of Rocket requires the `proc_macro_hygiene` feature to compile. However, as you
may guess from the feature's name, today it ships in stable! [This
issue](https://github.com/SergioBenitez/Rocket/issues/19) tracked the history of
nightly-only features in Rocket. Now, they're all checked off!

This next version of Rocket is still in the works, but when released, many folks
will be very happy :)

### Library changes

In Rust 1.45.0, the following APIs were stabilized:

- [`Arc::as_ptr`]
- [`BTreeMap::remove_entry`]
- [`Rc::as_ptr`]
- [`rc::Weak::as_ptr`]
- [`rc::Weak::from_raw`]
- [`rc::Weak::into_raw`]
- [`str::strip_prefix`]
- [`str::strip_suffix`]
- [`sync::Weak::as_ptr`]
- [`sync::Weak::from_raw`]
- [`sync::Weak::into_raw`]
- [`char::UNICODE_VERSION`]
- [`Span::resolved_at`]
- [`Span::located_at`]
- [`Span::mixed_site`]
- [`unix::process::CommandExt::arg0`]

Additionally, you can [use `char` with
ranges](https://github.com/rust-lang/rust/pull/72413/), to iterate over
codepoints:

```rust
for ch in 'a'..='z' {
    print!("{}", ch);
}
println!();
// Prints "abcdefghijklmnopqrstuvwxyz"
```

For a full list of changes, see [the full release notes][notes].

### Other changes

There are other changes in the Rust 1.45.0 release: check out what changed in
[Rust][notes], [Cargo][relnotes-cargo], and [Clippy][relnotes-clippy].

## Contributors to 1.45.0

Many people came together to create Rust 1.45.0. We couldn't have done it
without all of you. [Thanks!](https://thanks.rust-lang.org/rust/1.45.0/)

[relnotes-cargo]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-145-2020-07-16
[relnotes-clippy]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-145

[`Arc::as_ptr`]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.as_ptr
[`BTreeMap::remove_entry`]: https://doc.rust-lang.org/stable/std/collections/struct.BTreeMap.html#method.remove_entry
[`Rc::as_ptr`]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.as_ptr
[`rc::Weak::as_ptr`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.as_ptr
[`rc::Weak::from_raw`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.from_raw
[`rc::Weak::into_raw`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.into_raw
[`sync::Weak::as_ptr`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.as_ptr
[`sync::Weak::from_raw`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.from_raw
[`sync::Weak::into_raw`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.into_raw
[`str::strip_prefix`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.strip_prefix
[`str::strip_suffix`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.strip_suffix
[`char::UNICODE_VERSION`]: https://doc.rust-lang.org/stable/std/char/constant.UNICODE_VERSION.html
[`Span::resolved_at`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.resolved_at
[`Span::located_at`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.located_at
[`Span::mixed_site`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.mixed_site
[`unix::process::CommandExt::arg0`]: https://doc.rust-lang.org/std/os/unix/process/trait.CommandExt.html#tymethod.arg0

gha_language: HTML


text:
---
layout: creature
name: "Shoalar Quanderil"
tags: [medium, humanoid, cr4, elemental-evil]
cha: 17 (+3)
wis: 10 (0)
int: 14 (+2)
con: 16 (+3)
dex: 12 (+1)
str: 11 (0)
size: Medium humanoid (water genasi)
alignment: lawful evil
challenge: "4 (1,100 XP)"
languages: "Aquan, Common"
skills: "Arcana +4, Deception +5, Insight +2, Persuasion +5"
speed: "30 ft., swim 30 ft."
hit_points: "60 (8d8+24)"
armor_class: "10 (13 with mage armor)"
damage_resistances: "acid"
---

***Amphibious.*** Shoalar can breathe air and water.

***Innate Spellcasting.*** Shoalar's innate spellcasting ability is Constitution (spell save DC 13, +5 to hit with spell attacks). He can innately cast the following spells:

* At will: shape water

* 1/day: create or destroy water

***Spellcasting.*** Shoalar is a 5th-level spellcaster. His spellcasting ability is Charisma (spell save DC 13, +5 to hit with spell attacks). He knows the following sorcerer spells:

* Cantrips (at will): acid splash, chill touch, friends, prestidigitation, ray of frost

* 1st level (4 slots): disguise self, mage armor, magic missile

* 2nd level (3 slots): hold person, misty step

* 3rd level (2 slots): tidal wave

### Actions

***Dagger.*** Melee or Ranged Weapon Attack: +3 to hit, reach 5 ft. or ranged 20/60 ft., one target. Hit: 3 (1d4 + 1) piercing damage.


text:
# Recommender-Systems
Recommender Systems-In this Project we have to analyze the product reviews from an e-commerce website

Below are the tasks that we are targeting at :

Describe the Dataset:

We will look into basic info. about the dataset and try to build intuition around it

Data Cleaning

We will perform several transformations to clean the text so that it is suitable for feature engineering.Below given operations will be applied for cleaning data :

Lower

Tokenize

Stopwords

Lemmatize

       4.Exploratory Data Analysis

       5.Word Cloud: Word Cloud based on Product Rating

       6.Feature Extraction using NLP Unsupervised Learning

We need to extract the features from the text and their associated sentiment.

For that, we will be using Topic Modelling.

      7. Sentiment Analysis

We will be performing sentiment analysis using Python Packages.

Opinion Word Polarity Identification

Opinion Sentence Polarity Identification

Modelling using ML Techniques

Training a Text Classification Model using ML Techniques like :

Logistic Regression

Random Forest

XGBoost

Naive Bayes

Comparing the results.

Modelling using DL Techniques

Training a Text Classification Model using DL Techniques and comparing the results.

Evaluation. Evaluation of the results using the AUC ROC, AUC PR metrics.

Recommend products based on shopping history of users.

Deployment using Flask and Heroku

Containerize the solution and build a web application with below-given features :

UI to upload text and get sentiment as output

Get a summary of all the reviews

All the features and their importance as the output

Recommending a Product

repository: ederchy/Recommender-Systems

repo_name: ederchy/Recommender-Systems


text:
---
layout: post
title: "Get prepared for OrientDB's query builder "
date: 2011-06-03 13:46
comments: true
categories: [orientdb]
alias: "/357/get-prepared-for-orientdb-s-query-builder"
---

As you can see on [Github](https://github.com/odino/Orient/commits/master), today we fixed all the minor issues of the beta-3 milestone of the [Orient](https://github.com/odino/Orient) library ( a set of tools to manage OrientDB in PHP ).
<!-- more -->

Since the only thing left is to write the query-builder integration tests ( which will directly speak with OrientDB ), we are confident that the next release, the [beta-3](https://github.com/odino/Orient/issues?milestone=1&state=open), will happend during this weekend.

Writing the remaining tests will take a man-day circa so, since I'm pretty focused on releasing as early as possible, we should see this component coming out soon.

For those of you who don't know what is gonna come in this release ( which is not "official" but intended for early adopters ), I can tell you that the main thing will be the query-builder and nothing more: the QB is an OO library in order to build OrientDB SQL commands with a nice fluent interface, in Doctrine 1 style.

By the way: in [DNSEE](http://www.dnsee.com/) we are currently setting-up our brand strategies to expose this and other products ( mainly the CMF ), so, in a few weeks, you should be able to reach something like components.dnsee.com ;-)

branch_name: refs/heads/source

extension: markdown


text:
# NearbyDriver

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Locations** | [**[]LatLng**](LatLng.md) | the lastest recorded driver locations up to 5 sorted in chronological order. | [optional] [default to null]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


text:
# PropertyFetcher @Cluster 1 (fetch, ok, visitor)

***

### [XSLFSimpleShape.java](https://searchcode.com/codesearch/view/97406763/)
> < p > the method is called by poi ' s eventing api for each file in the origin poifs . < / p > @ param @ the value to check
{% highlight java %}
588. boolean fetchShapeProperty(PropertyFetcher visitor) {
589.     boolean ok = visitor.fetch(this);
599.                 ok = visitor.fetch(masterShape);
627.                     ok = visitor.fetch(masterShape);
{% endhighlight %}

***

repository: takata-daiki/catalogen

repo_name: takata-daiki/catalogen


text:
# First things first
I'm a huge fan of working smarter not harder so with that in mind, I like to reference variables before I run a series of commands I could easily mess up. (This is also why I'm a huge fan of Helm - cause, you know, variales.
)

## Getting Started
Let's set some variables we will need to run through this tutorial:

```
# for Jenkins Helm Chart Install
namespace=jenkins
helmReleaseName=jenkins
```

### Install
First we need to install helm3. We can do that a few different ways including downloaded the release from here and manually configuring it.

```
# set helm version
helmVersion=helm-v3.0.0-beta.3-darwin-amd64.tar.gz

# download helm version
wget https://get.helm.sh/$helmVersion
tar xvzf $helmVersion

# mv helm3 binary to local tmp folder
if [[ -e /usr/local/bin/tmp ]] ; then echo "tmp folder already exists" ; else mkdir /usr/local/bin/tmp ; fi
mv darwin-amd64/helm /usr/local/bin/tmp/helm

# TEMPORARY export $HELM_HOME so you don't overwrite Helm2 ~/.helm/
export HELM_HOME=/usr/local/bin/tmp/helm3

# set temp alias
h3=/usr/local/bin/tmp/helm

# add alias to .zshrc or .bashrc
echo "alias h3=/usr/local/bin/tmp/helm" >> ~/.zshrc
# echo "alias h3=/usr/local/bin/tmp/helm" >> ~/.bashrc

# cleanup
rm -rf $helmVersion
rm -rf darwin-amd64
```

Howevever, considering the First Things First Approach (work smarter) I wrote script for you in this repo. Let's just run it: (read it first, maybe?)

`./scripts/setup-helm3.sh`

### Basics
To fully understand just _what_ changed in the latest beta3 release of helm 3, let's try a basic install - an ngnix-ingress controller.

Note: To ensure we don't confuse ourselves, I changed `helm` to `h3` for helm3 commands (helm2 still works on my machine, and hopefully yours since we left the binary path/home folder preserved).

`h3 upgrade --install nginx-ingress stable/nginx-ingress`

It didn't work. What gives? Remember, the default for Helm3: no repos are added initially - we have to add them. So let's add some familiar repos:

```
h3 repo add stable http://storage.googleapis.com/kubernetes-charts
h3 repo add incubator http://storage.googleapis.com/kubernetes-charts-incubator
```

Now let's try our nginx-ingress install again:

`h3 upgrade --install nginx-ingress stable/nginx-ingress`

Cool. It works. We can run some basic K8s commands to make sure we can see our Load Balancer IP and pod up and running.

```
kubectl get pods
kubectl get svc
```

We can optionally setup some CRDS so we can also install a certificate manager (from Jetstack's repo), but it's not _required_ ... up to you.
```
kubectl apply \
    -f https://raw.githubusercontent.com/jetstack/cert-manager/release-0.8/deploy/manifests/00-crds.yaml
```

Before we try to run a command to deploy another chart, we need to add another repo. This process of adding helm repositories in a distributed sense reflects the direction chart management will move to (distributed model) going forward.

`h3 repo add jetstack https://charts.jetstack.io`

Great, we run `h3 repo list` to see the repos we have added to our helm3 instance.

Now let's install a certificate manager:

`h3 upgrade --install cert-mgr jetstack/cert-manager -n kube-system`

Note: cert-manager needs to be installed into kube-system. Notice how we did not have to ensure Tiller was running or ensure Helm had access to kube-system. Remember, Helm's access resembles the local context's access to the cluster.

Now we have to apply (create) our ClusterIssuer object. You will need to update line 7 of [cluster-issuer.yaml](./cluster-issuer.yaml) with your email address.

`kubectl apply -f cluster-issuer.yaml`

Now let's check to see if we still have Helm2 (don't want to have overwritten anything, right?)

`helm version`

And let's confirm helm3 is still installed:

`h3 version`

Now let's go ahead and see our helm releases.

`h3 ls`

Uh oh, that's not all of them. We only see 2. Remember, helm releases are now scoped to namespaces. Let's try to `ls` our releases again, but this time with the `--all-namespaces` flag.

`h3 ls --all-namespaces`

#### Plugins
Let's see if I can still install plugins just as I would. I'm going to choose the kubeval plugin for helm since it will helm me validate my charts.

`h3 plugin install https://github.com/instrumenta/helm-kubeval`

If I want to test the above plugin in action, I have to change directories to a path with a helm chart. Let's use our stable/ngnix-ingress helm chart from earlier. I have it locally downloaded (directly from Git so I'm going to change to that directory)

`cd ../charts`

Now I'm going to test the chart with a known bad `--set` variable to see if the plugin still works.

`h3 kubeval stable/nginx-ingress --set controller.replicaCount=twentyfive`

Sure enough, amongh other warnings (a bunch of files contain empty YAML documents), I also see this error:

```sh
The file nginx-ingress/templates/controller-deployment.yaml contains an invalid Deployment
---> spec.replicas: Invalid type. Expected: [integer,null], given: string
```
That's a good thing - this means our plugin worked as expected!

Now let's take a look at the new XDG model for config paths:

```
h3 --help (see table)
ls $HOME/.cache/helm (linux)
ls $HOME/Library/Caches/helm/ (macOS)
```

Now let's deploy something fun - how about a Jenkins build server. I have a pre-provided [values.yaml](./jenkins-values-demo.yaml). You will just need to update this block of code (lines 47-51) to your environment and DNS:
```
    hostName: helmsummit.h3.az.jessicadeen.com
    tls:
      - secretName: helmsummit.h3.az.jessicadeen.com
        hosts:
          - helmsummit.h3.az.jessicadeen.com
```

Once you confirm the values file is as you want it, let's install the jenkins chart!

`h3 upgrade jenkins --install --namespace $namespace -f ./jenkins-values-demo.yaml stable/jenkins`

While the Jenkins build server is installing, let's try one more chart repo add for fun. Let's add my public repo (hosted in Azure Blob Storage, btw):

`h3 repo add jdcharts https://jdk8s.blob.core.windows.net/helm/`

And, without further ado, let's bring back crochunter.

`h3 upgrade crochunter --install --namespace default --set ingress.hostname=crochunter.h3.az.jessicadeen.com,image=jldeen/croc-hunter,imageTag=0.3.1 jdcharts/croc-hunter`

Note: You will have to update the `ingress.hostname` with a hostname that is specific to your domain and your ingress/DNS.

Now let's check on our Jenkins deployment:

`kubectl get pods -n $namespace`

Once jenkins is deployed (using the same chart we would use with Helm2), we can run our usual `printf` command to get our admin password (since we didn't define one in our values.yaml).

`printf $(kubectl get secret --namespace default jenkins -o jsonpath="{.data.jenkins-admin-password}" | base64 --decode);echo`

## Bonus: Setup your own crochunter with your new Jenkins

I created a special croc-hunter [branch](https://github.com/jldeen/croc-hunter/tree/helmsummit) for everyone at Helm Summit and everyone who is learning the new differences betweeen Helm 2 and Helm 3. This branch has a special Jenkinsfile that will make it easy to setup our own pipeline to build our own CI instance of this wonderful and graphic intensive web app. Guess what - the Jenkinsfile runs a container based pipeline and uses Helm 3 too for linting and packaging! Nice!

`git clone https://github.com/jldeen/croc-hunter`

First, let's take a look at the croc hunter chart - it's one of the oldest charts around. Let's lint our chart with both helm 2 and helm 3 (on the master branch) to see any differences:

```
helm lint
h3 lint
```

Notice the difference? We not get an error in Helm 3 because we didn't specify `apiVersion:` in our chart.yaml, which is now required. You'll notice the chart in our `helmsummit` branch includes the requried `apiVersion:1`

### Migration story: Migrate releases in-place to Helm v3

Great, you've made it this far and you can see that charts that work with Helm2 work with Helm3. Now how do you migrate your releases from Helm2 to Helm3? You can do that with a plugin!

First you want to use Helm2 to install the plugin:

`helm plugin install https://github.com/helm/helm-2to3`

This plugin will migrate:

- Chart starters
- Repositories
- Plugins

Once you've you've installed the Helm-2to3 plugin, you can simulate a release conversion with the following command. Note the `--dry-run` flag:

`helm 2to3 convert --dry-run RELEASE-NAME-HERE`

Of course, now that you can see what release history objects will be created you can run the same command without the `--dry-run` flag to actually perform the migration.

`helm 2to3 convert RELEASE-NAME-HERE`

### TO DO: add in rest of Jenkins Bonus Demo

#### Helpful tools

[kubens and kubectx](https://github.com/ahmetb/kubectx) or `brew install kubectx`

gha_language: Shell


text:
# Unified
A one stop solution to hassle free conferences in a click.The project has been built using WebRTC and Socket.io
<br>
## ❓ Problem Statement

- Build a Microsoft Teams clone.

## What works right now?

1. Video Calls
2. Chatbox
3. Collaborative Whiteboard

## 🚧 Technology Stack

- **Server Enviornment** - NodeJS
- **Frontend** - ReactJS, HTML, CSS, Javascript
- **Video calling** - WebRTC, Socket.io
- **Deployment** - Netlify

## ⬇ Installation

- First, fork this repository 🍴 and follow the given instructions:

```
# clone the repository to your local machine
$ git clone `git clone https://github.com/<YOUR-GITHUB-USERNAME>/Unify.git`

# navigate to the project's directory and install all the relevant dev-dependencies
$ cd Unify && npm intsall

# Start application
$ npm start
```

## Workflow

- Homepage
- Video
- Activity
- Chat
- Whiteboard Collaborator
- Calendar
- Files
- Help

#### How Video Application Works

This video feature helps us to add as many people we want.

- By clicking on Join or create room we can start the video call.
- Then click on Start the meeting for starting video with your username.
- A room code will be displayes that we can shared with others for video chatting.
- In the video control panel there is video on/off button, mute/unmute option, sharing screen, whiteboard collaborator, chat and exit option.

### Future Scope

- Organize online classes and meeting.
- Able to send and receive messages.
- Able to download and send images from the chat.
- Able to access calendar.
- Able to make groups and delete groups.
- Able to add people in the group.

### Additional Features to be added after deadline

- Add a Create Team option and able to add users to it.
- Connect this project with the database so that only authorized Microsoft Teams user can sign in.
- Option to remove or allow a user in the meeting.

### Pending Work

- Able to see messages before and after video call that are sent during the video call.


text:
# Use Flask Template

* Status: [accepted]
* Deciders: [Fabian Bühler]
* Date: [2021-06-29]

## Context and Problem Statement

The REST API for the plugins requires a REST framework.

## Decision Drivers

* Flask is already known

## Considered Options

* [Flask](https://flask.palletsprojects.com/en/2.0.x/) without template
* [**Flask Template**](https://github.com/buehlefs/flask-template/)
* Other Framework

## Decision Outcome

Chosen option: "Flask Template", because it already provides boilerplate code with sane defaults already setup.

### Positive Consequences

* Less work to do
* Framework already known
* Can use Flask [Blueprints](https://flask.palletsprojects.com/en/2.0.x/blueprints/) to define APIs in a plugin

### Negative Consequences

* Template needs to be adapted slightly

repository: AathmanT/qhana-plugin-runner

repo_name: AathmanT/qhana-plugin-runner


text:
# KeyboardSniffer

This application shows keyboard events (`virtual key code`, `hw scan code` and `char`)

## Credits

Toolbar icons from [Silk icon set](http://www.famfamfam.com/lab/icons/silk/)

Application icon from [Free FatCow-Farm Fresh Icons](http://www.fatcow.com/free-icons)

## License

[MIT License](LICENSE)

repository: tkouba/KeyboardSniffer

repo_name: tkouba/KeyboardSniffer


text:
# Indonesian man who helped set strict adultery laws flogged for adultery

Published at: **2019-11-01T08:10:31+00:00**

Author: ****

Original: [BBC News](https://www.bbc.co.uk/news/world-asia-50258727)

        An Indonesian man - who worked for an organisation that helped draft strict adultery laws - has been publicly whipped after being caught having an affair with a married woman.

Mukhlis bin Muhammad of the Aceh Ulema Council (MPU) was flogged 28 times.
The woman he had the affair with was caned 23 times.
Mukhlis is from the deeply conservative Aceh region, the only place in Indonesia which practises the strict Islamic law, Sharia.

"This is God's law. Anyone must be flogged if proven guilty, even if he is a member of the MPU," Husaini Wahab, the deputy mayor of Aceh Besar district, where Mukhlis lives, told BBC News Indonesia.
The couple were caught by officials in September, apparently in a car parked near a tourist beach.
The caning happened on Thursday. Mr Husaini added that Mukhlis would be expelled from the MPU.
The 46-year-old is also an Islamic religious leader. He is the first religious leader to be publicly caned in Aceh since Sharia law came into force in 2005.
The MPU advises the local government and legislature on drafting and implementing Sharia law in Aceh.
Aceh was granted special rights to introduce its own stricter Islamic laws more than a decade ago.
Laws against homosexuality were passed in 2014 and came into effect the following year.
Extra-marital sex, gambling, and the consumption, production and distribution of alcohol are all illegal under Sharia law.
In 2017, two men were caned 83 times each in Aceh after they were caught having sex.
Canes are typically made from rattan. Those carrying out the caning have all their body parts, except their eyes, covered to stop them from being identified.
The caning must take place publicly on an open-air platform, though children are barred from watching.
Sharia law applies to Muslims and non-Muslims alike in Aceh.

license: Unlicense

repository: dsadlollioygjmzvcxv/tdc-exported

repo_name: dsadlollioygjmzvcxv/tdc-exported