text:
# ComposerCore API Reference - IComposer

Here's the defintion of `IComposer` interface:

```csharp
	[Contract]
	public interface IComposer
	{
        ComposerConfiguration Configuration { get; }

		// Component Lookup methods

		TContract GetComponent<TContract>() where TContract : class;
		TContract GetComponent<TContract>(string name) where TContract : class;
		object GetComponent(Type contract);
		object GetComponent(Type contract, string name);

		IEnumerable<TContract> GetAllComponents<TContract>() where TContract : class;
		IEnumerable<TContract> GetAllComponents<TContract>(string name) where TContract : class;
		IEnumerable<object> GetAllComponents(Type contract);
		IEnumerable<object> GetAllComponents(Type contract, string name);

		IEnumerable<TContract> GetComponentFamily<TContract>();
		IEnumerable<object> GetComponentFamily(Type contract);

		// Variable Lookup methods

		object GetVariable(string name);

		// Other methods

		void InitializePlugs<T>(T componentInstance);
		void InitializePlugs(object componentInstance, Type componentType);
	}
```

ComposerCore's implementation class, `ComponentContext`, implements `IComposer` and provides the above
functionality. This document summarizes the usage of each of the methods above.

## General behavior

These behaviors apply to all methods in this interface:

#### Attribute checking

Starting from version 1.4.1, query methods do not check `[Contract]` attribute on the queried
contract type, for the performance reason. All attribute checkings are performed during registration.

#### Thread-safety

All methods in IComposer interface are thread-safe and re-entrant among each-other, but not
with `IComponentContext` methods. This means that these methods should not be used during
registration or change in component configurations.

But while no change is being made to the
component registrations, you're free to call the `IComposer` methods in any way. Caching, or
life-cycle management of component instances, are thread-safe and prevent creation of multiple
component instances (when cached) even if called concurrently.

#### IComposer is a Contract itself

The `IComposer` interface is itself marked with `[Contract]` attribute, and automatically registered
in the ComposerCore upon creation of the `ComponentContext` class. So, you can reach an instance of the
`IComposer` similar to any other components in the composition (like as a constructor argument, using
`[ComponentPlug]` on a property or a field, ...)

## Configuration

The `Configuration` property encapsulates configuration settings that ComposerCore uses to function.
For more information about it, see [Configuration](configuration.md) documentation.

## GetComponent overloads

Different `GetComponent` overloads are used to query ComposerCore for a component. The type you pass to these
methods, is the contract type that the component provides.

Generic overloads (which has a `TContract` type parameter) can be used to avoid casting, and results in
more readable and cleaner code, unless you don't know the component type in compile time.

The overloads that do not have a `name` parameter, consider the component name to be `null`. To be
exact, they look for a `ContractIdentity` with the specified type and `null` name.

#### Not-found behavior

The query methods return `null` in case no component is registered with the ComposerCore that
provides the requested contract, with the requested name. It doesn't throw any exceptions.

## Multiple-registrations per contract identity

If multiple components are registered for a single contract identity (with the same contract type
and name), `GetComponent` method returns one of them. The returned one is not defined (might be
any one of the registered ones).

## GetAllComponents overloads

Different components can be registered with the same contract in the ComposerCore. Even the same component
can be registered multiple times. While `GetComponent` returns one of them, `GetAllComponents` return
all of them.

Different `GetAllComponents` overloads are similar in logic to different `GetComponent` overloads, with
the difference that they return all of the registrations for a single contract identity. Thus, they all
return an `IEnumerable` of the contract type.

Note that they still operate for the same *contract identity*. If you register multiple components with
different names, but with the same contract type, you can't use `GetAllComponents` to retrieve them all.

## GetComponentFamily overloads

Regardless of the `name` used to register a component type, the `GetComponentFamily` method returns all
of the components that provide a specific contract type. It's like building contract identities with
different names (but same contract type), and then querying them using `GetAllComponents` and
concatenating the result.

## GetVariable

Returns the contents of a ComposerCore variable, given its name. ComposerCore variables are means of storing
arbitrary objects on the `ComponentContext` and pass them around your application, mostly used for
configuration data.

## InitializePlugs overloads

You may have a case that you can't (or don't want to) take control for creation of an object,
so you can't / don't want to make it a component and ask ComposerCore to instantiate it, or manage
its lifecycle. An example can be instantiation of `View` objects, where a framework does the
work.

But you may still need to use dependencies, and want them injected. In such a case, you can
declare `[ComponentPlugs]` and `[ConfigurationPoints]` as before, and ask ComposerCore to fill them
on an already-instantiated object, using `InitializePlugs` method.

In this case, ComposerCore will reflect on the object, identify dependencies and fills them up.
ComposerCore will not cache or keep an instance to the object when initialized in this way, and you
(or the framework of your choice) is responsible to manage the object / component's lifecycle.


text:
---
title: Bug Bounty - IDOR in domain of Alibaba Group - HackerOne
date: 2020-06-24
#categories: [TOP_CATEGORIE, SUB_CATEGORIE]
tags: [bug, bounty, hackerone, h1, alibaba, group, web, shop, idor, api, authorization]
image: /assets/img/posts/2020/06/d10c88f869301b1238f53cfdff8e9d7c.png
---

![image](/assets/img/posts/2020/06/d10c88f869301b1238f53cfdff8e9d7c.png)

## Introduction

Some programs were made public in HackerOne bug bounty platform last month, including [Alibaba Group Bug Bounty Program](https://hackerone.com/alibaba). After having a look at their program details I've noticed they had pretty standard rewards but a huge scope to explore.

Alibaba Group is made up of private companies based in China whose businesses are focused on e-commerce, retail sales and online payment services. They also power up a search engine for purchases and cloud computing services.

The main services of this group are, just to name a few:

* Alibaba
* Alibaba Cloud aka Aliyun
* Aliexpress
* Alipay
* Taobao
* Tmall

## Scope

Their scope include Taobao assets. I decided to begin here.

As usual, started by doing some subdomain enumeration using common tools such as: **Amass**, **Sublist3r**, **Assetfinder** and **Findomain**. Also used online tools to perform passive reconaissance like **C99 Subdomain Finder**.

The scan generated an output of more than 2 MBs of subomains related to Taobao itself, that's almost *100.000 lines* of unique subdomains.

## Exploration

By navigating a while through subdomains I've found this particular one **dianshi.taobao.com**. Since I'm not fluent in Chinese I've used Google Chrome to translate the text on this page in order to understand the context.

![image](/assets/img/posts/2020/06/348aaed41a0630e73635d675c1e55ba5.png)

Turns out this is a cable TV service, or similar. The referenced pages are **TV Taobao**, **Watch-buy** and **Voice**. This frontend does not have anything interesting as it seems a static HTML page with some information on it.

At this point, more enumeration was performed to increase attack surface via sub directory scanning with **Gobuster**, which is pretty quick for this task together with wordlists.

This web server doesn't return a **404** status code when a page is not found, **instead it returns a 200**. This difficults finding sub directories as it will consider every word in wordlist to be a valid directory in website.

To be able to distinguish found pages from not-found pages, **Gobuster** can be configured to display *HTTP body response length* (argument **flag -l**). This way it is possible to compare response and decide whether is a valid directory or not.

By tweaking and running the tool, it found the directory **/pxb/**.

![image](/assets/img/posts/2020/06/67971d892fee4c1c0a6f75394bbedb62.png)

The page took a little to load since it runs over *Java Spring Framework*. Having a look at the interface it is very similar to the index page, however, seems to be way more interactive and with functionality.

Quickly noticed the top right *Login/Register* and logged in via my Taobao test **user1** account. Every website from the group shares the same universal authentication mechanism. This means credentials will work everywhere within the services of Alibaba Group.

After logging in with the test account, the server displayed a page with the following error message: Your shop does not exist or is not the owner account of the shop. Does not meet user access requirements, temporarily unable to view.

![image](/assets/img/posts/2020/06/67da38cdc9f75aff0e8271ac3478c753.png)

Unhappy with the results, decided to explore further. Test account only had permissions to read and modify its own personal details, such as full name, email, phone, etc.

## Exploitation

To understand what was happening behind the scenes I've started **Burp Suite** to intercept and analyze HTTP requests. When editing personal details of test account, immediately observed that input verification was performed on client-side.

For example, modifying e-mail to **not_@_valid_email** in web browser would trigger a responsive error message, and modifying it in Burp repeater would successfully change it. The response in JSON format included a parameter named **unb** which was also a valid cookie with a value that represents a big integer of user ID.

At this time, created a second test account **user2** and grabbed the user ID.

By sending the same previous request while authenticated as **user1** and tampering the value of unb with the new created second account ID, modifies the user information of **user2**.

![image](/assets/img/posts/2020/06/49c7e46aaed17513f76f32940af2fbe3.png)

This can be considered a valid IDOR as the web application relies on client-side values to perform operations. An attacker is able to bypass access controls by changing the ID to anyone else ID.

Even while validating this vulnerability with success, the permission problem still persist. In order to use other features the user must be authenticated with a shop account since test accounts hadn't enough fancy permissions.

As the website relies mostly on client's browser to execute Javascript, the tool **Relative-url-extractor** revealed interesting results against the included Javascript files.

The tool returned a lot of other API endpoints that weren't used in main page. For example, the endpoints

* **/api/user/view_info**
* **/api/user/update_info**
* **/api/user/check_level**

The user ID's were not ideal to perform a brute-force because they were 13 digits long. It would be exhaustive to send a lot of requests to the server and did not want to take it down by DDoSing.

By doing a Google search with dorks, came across multiple shop user ID's. In fact, these ID's can be found within Taobao sellers page.

Requesting the **/api/user/check_level** endpoint with my test account ID results in level **200** whereas requesting with a shop user ID results in level **250**.

There was another interesting API endpoint which wasn't available to simple user accounts but appeared to work with shop accounts: **/api/order/create_order?id=**.

![image](/assets/img/posts/2020/06/9c7a28af9c0f3efa2f9ba298c8758ede.png)

By tweaking some parameters in Burp Intruder it was possible to observe the following order history. These orders were created on behalf of privileged users (shop owners).

![image](/assets/img/posts/2020/06/a0773a0f938651d65c38e325ba09c5b8.png)

Tampering the user ID with a shop ID value and sending a request to this endpoint will **successfully create a new order on behalf of the shop owner!**

This way it is possible to leverage the IDOR and perform other privileged operations by escalating vertically.

## Timeline

* 2020-05-05: Reported this vulnerability to HackerOne Alibaba bug bounty program
* 2020-05-06: Triager closed as **N/A** saying that it wasn't a valid security issue
* (...)
* 2020-05-17: Added more context to report since then, but triager do not reply anymore
* 2020-05-18: Contacted Alibaba Security Team directly
* 2020-05-19: Alibaba Security Team changed status of my submission to ignored
* 2020-06-24: Public Disclosure for Transparency

license: MIT

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
# Change Log

## [Unreleased](https://github.com/gaocegege/maintainer/tree/HEAD)

[Full Changelog](https://github.com/gaocegege/maintainer/compare/v1.0.4...HEAD)

**Closed issues:**

- Detect the language for CONTRIBUTING [\#8](https://github.com/gaocegege/maintainer/issues/8)

## [v1.0.4](https://github.com/gaocegege/maintainer/tree/v1.0.4) (2017-05-01)
[Full Changelog](https://github.com/gaocegege/maintainer/compare/v1.0.3...v1.0.4)

**Closed issues:**

- Fix Docker image because of gh-md-toc [\#12](https://github.com/gaocegege/maintainer/issues/12)
- New subcommand: readme [\#9](https://github.com/gaocegege/maintainer/issues/9)

**Merged pull requests:**

- contributing: detect the language [\#15](https://github.com/gaocegege/maintainer/pull/15) ([gaocegege](https://github.com/gaocegege))
- dockerfile: Add gh-md-toc support [\#13](https://github.com/gaocegege/maintainer/pull/13) ([gaocegege](https://github.com/gaocegege))
- Readme toc subcommand [\#11](https://github.com/gaocegege/maintainer/pull/11) ([gaocegege](https://github.com/gaocegege))

## [v1.0.3](https://github.com/gaocegege/maintainer/tree/v1.0.3) (2017-04-28)
[Full Changelog](https://github.com/gaocegege/maintainer/compare/v1.0.2...v1.0.3)

**Closed issues:**

- CONTRIBUTION.md can't display the format of commit message normally [\#4](https://github.com/gaocegege/maintainer/issues/4)

## [v1.0.2](https://github.com/gaocegege/maintainer/tree/v1.0.2) (2017-04-27)
[Full Changelog](https://github.com/gaocegege/maintainer/compare/v1.0.1...v1.0.2)

**Closed issues:**

- redirect github\_changelog\_generator output [\#3](https://github.com/gaocegege/maintainer/issues/3)
- There is one empty item when author generation. [\#2](https://github.com/gaocegege/maintainer/issues/2)
- Support maintainer config [\#1](https://github.com/gaocegege/maintainer/issues/1)

## [v1.0.1](https://github.com/gaocegege/maintainer/tree/v1.0.1) (2017-04-27)

\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*

repository: cglewis/maintainer

branch_name: refs/heads/master

gha_language: Go

repo_name: cglewis/maintainer


text:
#Python custom log Handler
- Install pulse_appender
`pip install [project_root]/appenders/python/pulse_appender`
- Import RequestsHandler to your program
`import RequestsHandler`
- RequestsHandler takes 3 Arguments hostname, url, Method (currently just post method is implemented)
- LogFormatter converts log record to json format
- RequestsHandler is set to use LogFormatter

repository: afoerster/pulse

repo_name: afoerster/pulse


text:
# Hubiquitus-failsafe

Hubiquitus-failsafe persists messages before sending them and keeps them until remote actors acknowledge it.

Messages are stored in a local database (backed by leveldb).

In case remote container/actor crashes, messages are replayed if no acknowledgement is received within sendTimeout (120s by default).

After a max timeout (600s by default) messages are sent to a deadQueue actor (backed by a mongodb database).

In case local actor crashes, messages stored in local db are replayed following previous rules.

![Explanations](docs/explanations.png)

## Usage

Add the hubiquitus-failsafe addon and hubiquitus to your package.json

```js
var opts = ({sendTimeout: 300000});  // remote acknowledgement is raised to 300s
var hSafe = require('hubiquitus-failsafe')(opts);

hSafe.send('ping', 'pong', {key: 'value'}, function (err) {
    if (err) console.log('An error occured with safe send :', err);
});
```

## API

### init

```js
require('hubiquitus-failsafe')(opts);
```

Opts should be an object. Available opts are :
* sendTimeout : in ms (120000ms by default). Max time that remote actor can take to acknowledge a message
* maxTimeout : in ms (600000ms by default). Max time until the system sends the message to the deadQueue. (System tries to send the message each time a sentTimeout occurs until the max timeout)
* deadQueue : deadQueue actor id. 'deadQueue' by default.
* maxQueueConcurrentSend : by default 100. On local actor failure, system sends messages stored in the queue concurrently up to this value.
* db : path to localdb. By default process.cwd() + './failsafedb'. This can also be overriden through command line with option --fsdb path/to/db

### send

```js
var hSafe = require('hubiquitus-failsafe')(opts);

hSafe.send(from, to, content, callback);  // callback = function (err) { ... }
```

## Warning

When you use the send method of this addon, you should explicit acknowledge message on the remote end.
If not, message will be sent every sendTimeout until maxTimeout. After max timeout they are sent to the deadQueue actor.

## DeadQueue API

Dead Queue Actor will collect messages that excedeed maxTimeout and couldn't be sent.

### usage

To add the deadQueue actor :

```js
var deadQueue = require('hubiquitus-failsafe').deadQueue;

var deadQueue = deadQueue(opts);
```

Opts should be an object. Available opts are :
* mongo : mongo url (by default : mongodb://localhost:27017/failsafe)
* collection : collection used to store messages (by default : deadQueue)
* deadQueue : Actor id (by default : deadQueue).

## Monitoring

If used with the hubiquitus-ping addon, deadQueue infos can be seen using the url PING_MONITOR_URL/addons.

This addon adds a local actor with the name CONTAINER_ID:failsafe:monitoring that can be queried to get the same info relayed to the hubiquitus-ping addon.

repository: hubiquitus-addons/hubiquitus-failsafe

repo_name: hubiquitus-addons/hubiquitus-failsafe


text:
# CycleGAN
You can read the project explaination here:
https://docs.google.com/document/d/1Eeq1lYp01QimSYfL7lo4ydQUKEBfPuumDcpRwTnM77E/edit?usp=sharing

# Deployment and run
## Dependencies
Run
```
conda env create -f environment.yml
```
to install the needed dependencies.

Then, activate the environment:
`conda activate gan`

After that, install additional dependencies using:
`pip install flickrapi IPython opencv-python tensorflow-addons split-folders`

## Checkpoint
Create the directory first using `mkdir -p res/checkpoints/train/`.

Download the weights (link in relation) and place them in the following folder: `res/checkpoints/train/`.

## Datasets
Create the directory first using `mkdir -p res/dataset/x/` and `mkdir -p res/dataset/y/`.

Download the datasets (link in relation) and place them in order to have the following structure
(create the train/test/val directories first, like before):
- portrait task: `res/dataset/x/train/image0.jpg` and `res/dataset/y/train/image0.jpg`
- flower task: `res/dataset/x/train/jpg/image0.jpg` and `res/dataset/y/train/jpg/image0.jpg`

Note that the flower task needs a `jpg/` additional folder.

You can manually divide the datasets into train/test/val or use the script in `utils/splitter.py`

## Run
Run the `notebook.ipynb` using `jupyter notebook` command.

# Other scripts
The documentation of other (less important) scripts is a work in progress.

repository: albertobagnacani/CycleGAN

repo_name: albertobagnacani/CycleGAN


text:
# News management system
## About project
This is an extension of system for management news build on Spring Framework and using Hibernate.
## What's new?
To see full revision history read file: `changelog.md`
## Legal Parameters
This project is under Apache License 2.0. Read the file: `license.md`
## Database
Used Oracle 11g XE

repository: piatrovich/news-management-orm

repo_name: piatrovich/news-management-orm


text:
# Asterostomella indica V.G. Rao & Anahosur SPECIES

#### Status
ACCEPTED

#### According to
Index Fungorum

#### Published in
Indian Journal of Mycology and Plant Pathology 2(1): 33 (1972)

#### Original name
Asterostomella indica V.G. Rao & Anahosur

### Remarks
null

repository: mdoering/backbone

repo_name: mdoering/backbone


text:
<img src="icon.png" align="right" />

# C.A.R.V.I.S. [![C.A.R.V.I.S.](https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg)](https://github.com/Torrax/CARVIS)
> A Multifunction Robot Car Project

ENTER DESCRIPTION HERE

## Usage

Step 1:

```sh
step 1
```

Step 2:

```sh
step 2
```

## Schematics & Diagrams

- [Schematic Overview](https://github.com/Torrax/CARVIS/photos/) - This is an image illistrating...
- [PCB Overview](https://github.com/Torrax/CARVIS/photos/) - This is an image illistrating...
- [Photo 1](https://github.com/Torrax/CARVIS/photos/) - This is an image illistrating...
- [Photo 2](https://github.com/Torrax/CARVIS/photos/) - This is an image illistrating...
- [Photo 3](https://github.com/Torrax/CARVIS/photos/) - This is an image illistrating...
- [Photo 4](https://github.com/Torrax/CARVIS/photos/) - This is an image illistrating...
- [Photo 5](https://github.com/Torrax/CARVIS/photos/) - This is an image illistrating...
- [Photo 6](https://github.com/Torrax/CARVIS/photos/) - This is an image illistrating...

## Examples

- [Mode Select](https://github.com/Torrax/CARVIS/examples/) - Mode Select -
- [Mode Select](https://github.com/Torrax/CARVIS/examples/) - Mode Select -
- [Mode Select](https://github.com/Torrax/CARVIS/examples/) - Mode Select -
- [Mode Select](https://github.com/Torrax/CARVIS/examples/) - Mode Select -
- [Mode Select](https://github.com/Torrax/CARVIS/examples/) - Mode Select -
- [Mode Select](https://github.com/Torrax/CARVIS/examples/) - Mode Select -
- [Mode Select](https://github.com/Torrax/CARVIS/examples/) - Mode Select -
- [Mode Select](https://github.com/Torrax/CARVIS/examples/) - Mode Select -

## Feedback

-<EMAIL_ADDRESS>- Feedback is always welcome! If you have any methods to contibute to make any of my projects better, please feel free to leave a pull request on contact me personally!

## License

[![CC0](https://licensebuttons.net/p/zero/1.0/88x31.png)](https://creativecommons.org/publicdomain/zero/1.0/)

To the extent possible under law, Carson Morris has waived all copyright and related or neighboring rights to this work.


text:
---
title: "The Interview Process isn't broken, it is intolerant by design"
excerpt_separator:
biblio:
  - title: "Google Guide: Train your interviewers"
    link: https://rework.withgoogle.com/guides/hiring-train-your-interviewers/steps/make-interviewing-everyones-job/
  - title: "Field Report: Making Talent Decisions Less Biased II"
    link: https://medium.com/@gapjumpers/field-report-making-talent-decisions-less-biased-ii-8d3d23e38082
  - title: What do the best interviewers have in common? We looked at thousands of real interviews to find out.
    link: https://blog.interviewing.io/what-do-the-best-interviewers-have-in-common-we-looked-at-thousands-of-real-interviews-to-find-out/
  - title: After a lot more data, technical interview performance really is kind of arbitrary.
    link: https://blog.interviewing.io/after-a-lot-more-data-technical-interview-performance-really-is-kind-of-arbitrary/
  - title: There is a real connection between technical interview performance and salary.
    link: https://blog.interviewing.io/there-is-a-real-connection-between-technical-interview-performance-and-salary-heres-the-data/
  - title: Who Y Combinator companies want
    link: https://triplebyte.com/blog/who-y-combinator-companies-want
  - title: "Hans Christian Andersen: The Princess and the Pea"
    link: http://www.eastoftheweb.com/short-stories/UBooks/PriPea.shtml
  - title: "Invisible Women: Exposing Data Bias in a World Designed for Men"
    linke: https://www.goodreads.com/book/show/41104077-invisible-women
---

At the moment, the IT industry is considered a pretty prestigious profession. It attracts lots and lots of people because the pay is good, the working conditions are good and the whole society is in awe of the masterful things programmers produce.

And the Covid-19 disaster, that plunged so many into financial insecurity? It didn't even leave a scratch on IT: the work is practically the same and the pay is still great. The fabulously uncomplicated transition from office work to home work made IT only more prestigious. So, yes, potential workers are coming in droves. They have been, for many years.

This could have been a golden opportunity for IT companies to test all kinds of interview approaches on a vast number of people and develop a data-backed super approach. One that could finally tell what makes a good co-worker while not wasting days and days for both the candidate and the company.

Instead, we are willingly standing still, voluntarily propping up this broken and deformed interview process. Why do we do this? **If we mostly agree that the interview process does not produce dreamy IT teams, then why are we sticking with it?**

The answer is simple: **while it might not produce *dreamy* teams, it does produce teams that *feel and look and smell* like propper IT teams**, so the process must be correct after all.

## Why do many claim the interview process is broken?

The short answer: people, who consider themselves completely decent devs, feel left out. And they are right. From my statistic, I can confirm that many of them are completely decent devs and they are still left rejected.

**The perfectly competent devs feel they were rejected not because they had too little skill or talent, but because they didn't know answers to questions, they felt weren't truly relevant to the job posting. And I tend to agree with them.**

From what I've seen and learned over the years, I doubt the value of many questions that wind up being asked in interviews.

Obviously, companies are very different from each other and some do have adequate and successful interview processes, but those are the exception, not the rule.

Over the years, I have been on all sides of the interview process, I've been the interviewer, the interviewee, the observer, the interviewer-adviser, the interviewee-adviser, ... . This does not make me an expert on interviews in any way, it just gives me a lot of anecdotal evidence.

#### What's the point of the questions

**The worst failing** I have noticed **is that almost no interviewer** I spoke to **concerned themselves with the value of all the possible answers to their questions.**

Things like: **What am I even trying to learn about the interviewee with Question 43?** Why am I asking this specific question and not some other? Does this question tell me anything useful about the potential hire, what is the big picture? What are all the possible "good" answers to this question 43, what are really "bad" ones and what does it mean if the interviewee answers something in between, does it mean anything at all?

Too many interviewers treat questions like a test: you get 10 questions, each is worth 10 points, you get a score according to how close you are to what I deem the most correct answer and you need 80 points to get to the next level.

I don't want to say I never met anybody, who cared whether the questions they were asking actually gave them any useful information, it's just that I can't name anybody at the moment 😛.

The obvious flaw in this approach is that all human knowledge is absolutely vast, even if you limit it to IT knowledge. Everybody will have gaping holes in their knowledge. **If you want to prove that somebody doesn't know enough, you can always do it:** just pick any niche topic, read about it for an hour and then ask about the details you've read. Works almost all the time. To make it work all the time, just pick 2 different niche topics and by the power of probability, you should be covered.

The interviewer will (and should) always know more about a question, because she had to look it up before asking and because she heard a lot of different answers from different people. She will always have the upper hand in this one niche topic. Which should prompt every interviewer to be wary of this bias. But most aren't.

Even worse, many believe the topics have been chosen objectively.

#### *"I'm searching for somebody, who is just like me"*

In reality, **the topics are mostly chosen poorly and randomly**. More often than not they are chosen **from the knowledge that the first interviewer happened to have**. And what these topics are good at is finding other people, who are just like that first interviewer.

We are not searching for the best employees, we are searching for those, who feel and look and smell like that first person with hiring power in the company.

If you are not like that first interviewer, then the only other way to get hired is luck or networking. The "correct" answers to all interview topics can usually be obtained by having friends, who work there or are otherwise close to the company. But last time I checked, to be friends with somebody, you have to have even more in common than just the knowledge of some IT topics.

Rejecting everybody, who is not deeply similar to the existing employees or does not have informal connections to your employees, helps to make the interview process feel broken.

## Everybody can be an interviewer

Most companies further damage the process by treating it as something anybody can do, no training required. Why is this belief so prevalent among us?  Heck, even Google recommends it:

> Make interviewing everyone’s job
>
> ... Google wants interviewing to be part of every Googler’s job.

- [Google Guide: Train your interviewers](https://rework.withgoogle.com/guides/hiring-train-your-interviewers/steps/make-interviewing-everyones-job/){:target="_blank"}

To be honest, Google does add that they train their interviewers before they put them in charge of inspecting applicants.

> ..., interviewers learn about desired attributes for candidates and review the interview process as a whole. The more interviewers understand what they’re looking for and how it fits into the larger picture, the more effective they can be.

- [Google Guide: Train your interviewers](https://rework.withgoogle.com/guides/hiring-train-your-interviewers/steps/make-interviewing-everyones-job/){:target="_blank"}

But, I do wonder, how well they really train them. Everybody does not make a good interviewer. Being good at interviewing is a skill and like every other skill, you get better as you practice. But you will suck at it for a long long time, before becoming good at it. Imagine how good a piano student is after 1 month of practice or even after the 1st year of practice. So, how long should you actively practice interviewing, before you can be trusted with a job candidate?

#### Can you beat bias with bias?

I understand the appeal of making everybody participate in hiring. Like it or not, we are all biased to some degree. **People like to hire other people if they "click" with them, which usually means that they have some deep-rooted similarities.** Intuition might say, that the easiest way to achieve greater diversity of employees is simply making the group of decision-makers very diverse.

If a group of people is diverse, then their biases should be just as diverse and the group together will make a better hiring apparatus.

Diversity is a goal worth pursuing because it gives you greater flexibility and stability. Just as a diverse microbiome in your gut gives you better health or a diverse portfolio of stocks gives your better wealth or a diverse group of friends gives you better social support.

But what gives us the confidence that a diverse group of interviewers has diverse biases? They might be different, but if they are very well assimilated into a cohesive community, then their biases will reflect the average bias of the community.

**Just because people seem varied, doesn't mean their biases are varied.** A bias is something that we form from experience and from what we believe is expected of us. It is not as trivial to identify bias as most believe.

`GapJumper` is a company that tries to perform blind recruitment processes in the name of other companies. They give all applicants the same task and send those with the best results to the company with no identifying information.

In 2019 a company asked them to figure out why they had low promotion levels of female employees in some departments. It turned out that the problem wasn't bias of those, who reviewed the work of women, but the bias of those, who assigned tasks. **The women employees were reviewed favourably, the issue was simply that the tasks they got assigned were less important than the tasks assigned to a few men.**

> Our analysis of performance reviews found no bias during performance review. Issue was disproportionate assigning of high impact project to a few (male) employees.

- [Field Report: Making Talent Decisions Less Biased II](https://medium.com/@gapjumpers/field-report-making-talent-decisions-less-biased-ii-8d3d23e38082){:target:_blank}

Bias comes in many ways. **If our interview process is consistently producing teams of workers that are unquestionably less diverse than the overall population, then we absolutely are excluding some people from our jobs.**

#### Interviewing as a skill

Not everybody can be an interviewer. I very strongly agree with this statement by Aline Lerner, the founder of `interviewing.io`:

> Being a good interviewer takes time and effort and a fundamental willingness to get out of autopilot and engage meaningfully with the other person.

- [What do the best interviewers have in common? We looked at thousands of real interviews to find out.](https://blog.interviewing.io/what-do-the-best-interviewers-have-in-common-we-looked-at-thousands-of-real-interviews-to-find-out/){:target="_blank"}

Interviewing is a skill. If you want to be good at it, you have to learn, you have to grow and you have to practice.

But if you have to practice a lot, then you have to enjoy doing it. You have to enjoy helping strangers show off their skills, their personality, while under pressure, even if you don't see yourself getting a bear with them afterwards.

How many people you know, interview like that?

## We don't understand our profession, but we do believe the interview process is infallible

What does a programmer do?

Some of us see ourselves as artists, creating beautiful things from emptiness. Others say we are mathematicians, taking formulas and putting them together into new formulas. Still others say we are handypeople, similar to plumbers or carpenters, we go from house to house, doing essentially the same job in each one. Yet others say we are surgeons, writing instructions for aeroplanes and medical equipment, using our precision to make sure people live and don't die.

Given that our field is highly respected, many are suffering from an inflated ego. And so, we like to compare ourselves to life-saving surgeons or misunderstood genius artists. And the interview setup is a pretty good stage for us to prove we are better than the young ones that are following us.

This can cause 2 problems:
- **We misjudge when picking interview questions.**

  Our ideal programmer knows everything about sorting algorithms and bit manipulation, so we ask those questions. Forgetting that neither we nor any of our co-workers used this knowledge in the last 2 years.

- **We are suspicious of the candidate,** erring rather on the side of reject.

  After all, the candidate has to prove herself worthy of this job opportunity. What we do is only for the anointed.

The research, however, shows that performance on technical interviews is highly volatile for almost all candidates.

`interviewing.io` provides mock interviews to their users, they can use the platform to practice interviewing or to practice being interviewed. Each person does multiple of these sessions, which allowed them to compare the results for each person.

They found that **just 20% of their users consistently scored the same**. The others did well on some interviews and poorly on others. In real life, you usually can't afford to not be at your best all the time... always. Usually, **if you flunk 1 interview step, you are out**.

Their scores go from 1 to 4:

> Many people who scored at least one 4 also scored at least one 2.
>
>...a good amount of people who scored at least one 4 also scored at least one 1.
>
> If we look at high performers (mean of 3.3 or higher), we still see a fair amount of variation.

- [After a lot more data, technical interview performance really is kind of arbitrary.](https://blog.interviewing.io/after-a-lot-more-data-technical-interview-performance-really-is-kind-of-arbitrary/){:target="_blank"} (Hover over the people icons to see their individual scores.)

#### We penalize those, who don't know how to play the game

All of this builds up huge pressure on interviewees. Especially on 3 groups:

- **complete beginners**, who are still outsiders to our community and don't yet know how the game is played
- **underrepresented groups**, who are more likely to be sidelined by the community and thus also don't know how to play the game
- **senior devs**, because they have to prove themselves with college knowledge as well as detailed accounts of real-life problem-solving experiences

Playing the game is hard work. But that is not the real problem, **the real problem is withholding information.**

The IT interviewing process is a game when it shouldn't be.

**This game has exact rules of behaviour and exact, unambiguous rules for winning.** Proof for this are all the "Cracking the Coding Interview."-books and courses, which will successfullly teach you how to win in interviews.

If you want to be a master interviewee, you have to look up certain topics, that are considered "basic IT knowledge", approach problems in a constructive, "I fear you not"-way and you have to have an air around you that says "I have a wide range of experience", "I have smart things to say about your product", and of course you need a healthy amount of self-confidence, ... . **It's like Tinder, but for jobs.**

Nobody actually is all those things, but that's not a problem, because the interview process is a lot about the looks.

As a complete beginner, I had no idea, there was a game, let alone what rules there were or what was expected of me. I didn't know the common questions nor the "correct" answers.

And as I belonged to an under-represented group, my friends weren't in IT and when we met, we would not talk about the latest Linux distro or an awesome dev blog post. It took time for me to figure all this out. But now, that I'm "in", I can see that most of my colleagues are unaware of this advantage. Even the most welcoming, supportive people, including me sometimes.

It so happened that I once had an opportunity to work with somebody, who I rejected on the interview. And you know what? This person proved to be a good dev, who could do his job successfully. I misjudged him, even though I was actively trying not to 🙂.

#### Interviews pin your compensation options

I've also seen a very good dev, go to an interview, totally unprepared. **The result was a job offer for a low position with small pay.** `interviewing.io` also found a correlation between how good the interview goes and your eventual compensation (their data is for San Francisco):

> Interview performance doesn’t just get you in the door or not: it can have a demonstrable connection to your eventual compensation. For instance, doing just a point better in your technical interview could be worth 10k or more, and with bonus, it could add 20k to your annual comp.

- [There is a real connection between technical interview performance and salary.](https://blog.interviewing.io/there-is-a-real-connection-between-technical-interview-performance-and-salary-heres-the-data/){:target="_blank"}

The interview doesn't just determine whether or not you get the job, it also **determines what you are going to be paid for the foreseeable future.**

I don't know how it is where you live, but where I live, upwards mobility inside the same company is much more difficult than switching jobs and getting a better position and compensation at a different company.

We are all more sympathetic to people, who have had the same struggles in life as we did and less sympathetic to those who can't overcome something foreign to us.

Recently an old colleague lamented how devs have become too expensive, but in the same breath said that he doesn't really want to hire a dev, who doesn't know what the current rate for a dev is. If you don't know how much the top 10% of devs in our area is paid, then you probably also don't know the latest programming approaches.

In my eyes, this principle just makes sure that people, who are on the outside, stay on the outside.

People like forgetting how they came to where they are. **We all experience amnesia when it comes to remembering our past incompetence.** And still, we are tasked with assessing a job applicant and deciding how much money they are worth.

Rather presumptuous of us. But it does explain why everybody wants to hire seniors because nobody remembers ever being a junior.

## Malevolent forces of the "culture fit"

So, what's the deal? If the interview process is broken, then why do we stick with it? Is it apathy, just plain laziness or is it an intentional conspiracy?

In my eyes, the answer is pretty simple: **each system must be more beneficial than disadvantageous to still exist**.

Lots of us are asking interview questions that are ineffective and are tormenting job applicants for months. **But nobody is forcing us to do it.** So, ... we must be doing it because we believe this is the best way to figure out who to hire.

The sad truth we don't realize is, however, that we are perpetuating old wrongs, old biases by making sure the system only allows very limited types of people to pass.

If we were filtering by job-relevant skills, the approach would work. But we don't.

#### How to objectively score job applicants?

You might think: let's eliminate the bias by creating an objective scoring system. But what is an objective scoring system, if we have no objective units of measure?

**We can't express a candidate's Python knowledge in meters or seconds or pascals.** Those were examples of objective units. Whereas measuring a candidate's communication skill on a scale of 1 - 4 is neither accurate nor objective.

**Neither the process nor the score can be standardized.** The process of measuring the communication skills will differ from candidate to candidate. Just as the scoring will be highly subjective and tied to the current mood of the interviewer.

`Triplebyte` is an IT job search platform that also tests, measures and recommends devs to companies. They too started out believing that comparing devs amongst themselves is going to be straightforward: just pick the right parameters and score devs on those parameters. But they soon found that there is little objectivity in job interviews:

> One of the first people to pass our process really impressed us. He was a superb, intelligent programmer. He solved hard algorithm problems like they were nothing, and understood JavaScript deeply. We introduced him to a company he was excited about, and sat back to watch him get a job. We were startled when he failed his first interview. The company told us they valued process more than raw ability, and he’d not written tests during the interview. He went on to get a bunch of offers from other companies, and one founder told us he was among the best programmers they had ever interviewed.
>
> This lack of agreement is the rule, not the exception. Almost no one passes all their programming interviews.

- [Who Y Combinator companies want](https://triplebyte.com/blog/who-y-combinator-companies-want){:target=_blank}

**The underlying problem is that no objective parameters for dev scoring exist.**

It doesn't matter if we rely on a point system or interviewers' guts, both approaches originate in the same thing: the interviewer's impression of the applicant. **How close the applicant was to what the interviewer *thinks* the applicant should be.**

#### The "Princess on the pea"-test

Sadly, the heterogeneity among software engineers is so small that you can cover the vast majority with this description: white, male, aged 25-35, wearing a hoody.

Add to this the **cultural stereotypes, we** kinda, truly **still believe**: that the best devs are socially awkward, have no children, know all the trivia of the IT world, are obsessed with their coding to the point of coding all the time and most importantly **are born this way**.

If somebody does not exhibit at least some of these characteristics, then they are just not a true developer.

**We are doing the "Princess on the pea"-test on job applicants.** Here's how the fairytale starts, I've replaced "princess" with "developer". What do you think? Does it fit our reality?

> Once upon a time there was a *company* that wanted to find a *developer*; but *he* would have to be a real *developer*. They looked all over the world to find one, but nowhere could they get what they wanted. There were *developers* enough, but it was difficult to find out whether they were real ones. There was always something about them that was not as it should be. So they were sad, for they would have liked very much to have a real developer.

- [Hans Christian Andersen: The Princess and the Pea](http://www.eastoftheweb.com/short-stories/UBooks/PriPea.shtml)

`Triplebyte` also found that what you feel and look and smell like counts a lot. **If there ever was an honest description of the hiring favouritism in IT I found it here:**

> But company recruiter decisions are driven largely by pattern matching, so there is a strong argument that making yourself look like candidates who companies want will increase your pass rate. ...
>
> Reading bios of founders and applying to companies where the CTO shares your background is probably an effective job-search strategy.

- [Who Y Combinator companies want](https://triplebyte.com/blog/who-y-combinator-companies-want){:target=_blank}

## What are we losing, by being snobbish

Ok, so our interview processes are killing diversity. So what?

**If the best of the best are all young white man, who all know each other because they all went to the same school and worked at the same couple of companies and are all mostly almost the same age and all meet at the same meetups and talk at the same conferences and have the same interests and ... What are the odds of that being true? Zero.**

A political system, where all the control is in the hands of a small group of people, who all know each other and all socialize with each other, is called an oligarchy.

By definition oligarchy does *not* place the best people into the most important positions, because it doesn't have access to the best people, its pool of possible  candidates is diminished to the extreme because only members of the oligarchy can be given positions.

**Instead of picking the best and brightest of all, who were born, they are forced to pick whoever is best amongst them.** Preferably they would like to give all the oligarchy members important positions, **but competence is always equally distributed in a society,** so they can't all be better than all the rest of the population.

That is what we are losing. We are losing innovation and richness of taste. **It is not just the underrepresented groups that are being left behind, but everybody, who doesn't want or can pretend to be the best thing that ever happened to development.**

**We are losing new ideas, better approaches, we could already have solutions to a million still unsolved problems, but we don't, because we want to handpick the people, who will be allowed to work on them.**

So,... if you are hiring, look at your already hired employees.

Did you succeed in bringing in a *varied team* of people or are they *pretty uniform*?

Think about questioning your interview process. Are you really asking things that you want to know?

Is it equally likely that all your job applicants would know how to correctly answer your questions? Or do some have advantages - **informal because they are good friends with your employees** or **formal because they went to the same meetup**?

And if you are searching for a job, just treat it like Tinder. Figure out what type of company you wish to work for then figure out what type of dev they are looking for and try to show that you have those very specific characteristics.

And try not to feel jaded, that the system is as shitty as it is. But the best jobs are usually still best accessible via acquaintances.

And who knows, maybe we will one day live in a society that will give everybody a chance.

gha_language: SCSS


text:
# Angular DateTimePicker

**Angular date time picker - Angular reusable UI component**
**This package supports Angular 4**

### Description

Simple Angular date time picker. Online demo is [here](https://ng-community.github.io/date-time-picker/).
This picker is responsive design, so feel free to try it in your desktops, tablets and mobile devices.
This picker uses  [date-fns](https://date-fns.org/).

### How to Use

1. Install with [npm](https://www.npmjs.com) or [yarn](https://yarnpkg.com):

```bash
npm install @ng-community/date-time-picker --save
```

or

```bash
yarn add @ng-community/date-time-picker
```

2. Add fonts:

```css
@font-face {
    font-family: 'fontello';
    src: url('./assets/fonts/fontello.eot?81091010');
    src: url('./assets/fonts/fontello.eot?81091010#iefix') format('embedded-opentype'),
    url('./assets/fonts/fontello.woff2?81091010') format('woff2'),
    url('./assets/fonts/fontello.woff?81091010') format('woff'),
    url('./assets/fonts/fontello.ttf?81091010') format('truetype'),
    url('./assets/fonts/fontello.svg?81091010#fontello') format('svg');
    font-weight: normal;
    font-style: normal;
}
```

3. import __FormsModule__, __BrowserAnimationsModule__, __DateTimePickerModule__,  to your __@NgModule__ like example below

```js
import { NgModule } from '@angular/core';
import { FormsModule } from "@angular/forms";
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { MyTestApp } from './my-test-app';

import { DateTimePickerModule } from '@ng-community/date-time-picker';

@NgModule({
    imports: [
        FormsModule,
        BrowserModule,
        DateTimePickerModule,
        BrowserAnimationsModule
    ],
    declarations: [ MyTestApp ],
    bootstrap:    [ MyTestApp ]
})
export class MyTestAppModule {}
```

4. If you are using __systemjs__ package loader add the following `@ng-community/date-time-picker` properties to the __System.config__:
```js
(function (global) {
    System.config({
        paths: {
            'npm:': 'node_modules/'
        },
        map: {
            // Other components are here...

            '@ng-community/date-time-picker': 'npm:@ng-community/date-time-picker',
        },
        packages: {
            // Other components are here...

        // the picker
            '@ng-community/date-time-picker': {
                main: 'picker.bundle.js',
                defaultExtension: 'js'
            },
        }
    });
})(this);
```
5. Add picker component to your component:
```<owl-date-time [(ngModel)]="moment" ></owl-date-time>```

### Properties

|Name|Type|Required|Default|Description|
|:--- |:--- |:--- |:--- |:--- |
|`dataType`|string|Optional|`'date'`| Type of the value to write back to ngModel. Default type is Javascript Date object. You could change it as string type |
|`dateFormat`|string|Optional|`YYYY/MM/DD HH:mm`| Format of the date. You could find more in [this](https://date-fns.org/v1.28.5/docs/format).|
|`disabled`|boolean|Optional|`false`| When specified, disables the component.|
|`disabledDates`|Array-Date[]|Optional|`null`|Array with dates that should be disabled (not selectable).|
|`disabledDays`|Array-number[]|Optional|`null`|Array with weekday numbers that should be disabled (not selectable). Start from 0(Sunday) to 6(Saturday).|
|`hourFormat`|string|Optional|`'24'`|Specify the hour format, valid values are '12' and '24'.|
|`inline`|boolean|Optional|`false`|When enabled, displays the picker as inline. Default is false for popup mode.|
|`inputId`|string|Optional|`null`|Identifier of the focus input to match a label defined for the component.|
|`inputStyle`|Object|Optional|`null`|Inline style of the picker text input.|
|`inputStyleClass`|string|Optional|`null`|Style class of the picker text input.|
|`locale`|Object|Optional|`null`|An object having regional configuration properties for the dateTimePicker. You could learn more in below.|
|`maxDateCount`|number|Optional|`null`|Maximum number of selectable dates in multiple mode.|
|`max`|Date / string|Optional|`null`|Set the maximum date/time that is selectable.|
|`min`|Date / string|Optional|`null`|Set the minimum date/time that is selectable.|
|`placeHolder`|string|Optional|`'yyyy/mm/dd hh:mm'`|Placeholder text for the input.|
|`required`|boolean|Optional|`false`|When present, it specifies that an input field must be filled out before submitting the form.|
|`selectionMode`|string|Optional|`'single'`|Defines the quantity of the selection, valid values are "single", "multiple" and "range".|
|`showHeader`|boolean|Optional|`false`|Defines whether to show the picker dialog header.|
|`showOtherMonths`|boolean|Optional|`true`|When it is set to false, it would only show current month's days in calendar.|
|`showSecondsTimer`|boolean|Optional|`false`|Defines whether to show a timer to control time's second value.|
|`style`|Object|Optional|`null`|Inline style of the whole component.|
|`styleClass`|string|Optional|`null`|Style class of the whole component.|
|`tabIndex`|number|Optional|`null`|Index of the element in tabbing order.|
|`type`|string|Optional|`'both'`|Specify the type of the date-time picker, valid value are 'both', 'calendar' and 'timer'.|

### Events

|Events|Parameter|Description|
|:--- |:--- |:--- |
|`onBlur`|event: Blur event|Callback to invoke on blur of input field|
|`onFocus`|event: Focus event|Callback to invoke on focus of input field.|
|`onInvalid`|originalEvent: event, value: invalid date-time value|Callback to invoke when a invalid date-time value is selected.|

### Styling

Following is the list of structural style classes.

|Name|Element|
|:--- |:--- |
|`owl-dateTime`|Wrapper of the whole element|
|`owl-dateTime-input`|Input element|
|`owl-dateTime-dialog`|Wrapper of the dropdown dialog|

### DateFormat

Default date format is 'YYYY/MM/DD HH:mm', to customize this use dateFormat property.
Following options can be a part of the format.

 - s - second of the time value (no leading zero 0, 1, ..., 59)
 - ss - second of the time value (two digits 00, 01, ..., 59)
 - m - minute of the time value (no leading zero 0, 1, ..., 59)
 - mm - minute of the time value (two digits 00, 01, ..., 59)
 - h - hour of the time value, 12 hour format (no leading zero 1, 2, ..., 12)
 - hh - hour of the time value, 12 hour format (two digits 01, 02, ..., 12)
 - H - hour of the time value, 24 hour format (no leading zero 0, 1, ..., 23)
 - HH - hour of the time value, 24 hour format (two digits 00, 01, ..., 23)
 - A - meridian of the time value (AM, PM)
 - a - meridian of the time value (am, pm)
 - D - day of the month (no leading zero 1, 2, ..., 31)
 - DD - day of the month (two digits 01, 02, ..., 31)
 - M - month of the year (no leading zero 1, 2, ..., 12)
 - MM - month of the year (two digits 01, 02, ..., 12)
 - MMM - month of the year (Jan, Feb, ..., Dec)
 - MMMM - month of the year (January, February, ..., December)
 - YYYY - year(2015, 2016, 2017 ...)

Your could learn more about this from [here](https://date-fns.org/v1.28.5/docs/format).

### Localization

Localization for different languages and formats is defined by binding the locale settings object to the locale property. Following is the default values for English.

```
<owl-date-time [(ngModel)]="dateValue" [locale]="en"></owl-date-time>
```

```js
export class MyModel {

    en: any;

    ngOnInit() {
        this.en = {
            firstDayOfWeek: 0,
            dayNames: ["Sunday", "Monday", "Tuesday","Wednesday", "Thursday", "Friday", "Saturday"],
            dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
            monthNames: [ "January","February","March","April","May","June","July","August","September","October","November","December" ],
            monthNamesShort: [ "Jan", "Feb", "Mar", "Apr", "May", "Jun","Jul", "Aug", "Sep", "Oct", "Nov", "Dec" ]
        };
    }
}
```

If you want the formatted date time to be localized as well, you need to npm install [date-fns](https://date-fns.org/).

```
<owl-date-time [(ngModel)]="dateValue" [locale]="es"></owl-date-time>
```

```js
export class MyModel {

    es: any;
    esLocale = require('date-fns/locale/es')

    ngOnInit() {
        this.es = {
			 firstDayOfWeek: 1,
		     dayNames:["domingo","lunes","martes","miércoles","jueves","viernes","sábado" ],
		     dayNamesShort: [ "dom","lun","mar","mié","jue","vie","sáb" ],
		     monthNames: [ "enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre" ],
		     monthNamesShort: [ "ene","feb","mar","abr","may","jun","jul","ago","sep","oct","nov","dic" ],
		     dateFns: esLocale
        };
    }
}
```

### Dependencies

- [date-fns](https://date-fns.org/)

```bash
npm install date-fns --save
```

or

```bash
yarn install date-fns
```

### Demo
Online demo is [here](https://ng-community.github.io/#/date-time-picker)

### License
* License: MIT

### Author
**HieuNV**


text:
When it comes to updating westerosblock.json, the update 'loop' is essentially
the same - but the stuff to be copied back into the source tree is a bit more
complicated.
Look at https://github.com/WesterosCraft/WesterosBlocks/blob/1.18.2/copyFiles.sh
for the shell script I use about 20 times an evening to transfer the generated
content from by test server directory (~/forge-1.18.2) to my source tree.

You'll want to adjust it for yourself, but it shows the flow of what to clean up vs copy,
particularly since the newer westerosblocks.json features (like the condStates for biomes and Y coordinate limits, and the basic CTM featues like random, vertical, horizontal)
all result in changes in the set of generated model files and such.

So my basic loop for doing westerosblocks.json relevant updates winds up looking like:
1) Update the code or westerosblocks.json
2) Run './gradlew build'
3) Copy build/libs/WesterosBlocks-6.0.Dev.jar to my test forge server mod directory (~/westeros-1.18.2/mods)
4) Start the server, and tell it to stop as soon as it's done starting (stop command)
5) Run './copyFiles.sh' to copy new generated content back to source tree
6) Run './gradlew build' again, this time to generate the full updated mod (including the generated resources)
7) Copy build/libs/WesterosBlocks-6.0.Dev to my test forge client's mod directory (~/westerosclient-1.18.2/mods)
8) Fire up test client, and look at the pretty blocks!

Note that to make the server generate the needed files, go to config/westerosblocks/westerosblocks.toml and change blockDevMode to true

repository: WesterosCraft/WesterosBlocks

gha_language: Java

repo_name: WesterosCraft/WesterosBlocks


text:
# Mintee

Mintee (minimal tee) is a simple program to execute a command and write its output to a file and the standard output.
It kinda works like the Unix tee program, with the exception that only one file can be used to write the output.

![Mintee concept of operation](http://dl.dropbox.com/u/599926/images/mintee.svg)

## Build instructions

The FPC compiler (2.6+) is necessary to compile the source code - it can be downloaded from [http://www.freepascal.org/download.var](http://www.freepascal.org/download.var).

To compile mintee, open a command-line window and change the directory to the one where mintee.lpr is located.
Then give:

    fpc mintee.lpr

This should produce the mintee executable.

## Usage

    mintee [OPTIONS] [FILE]
    Copy standard input to FILE, and also to standard output.

        -a, --append              append instead of overwriting files
        -c <cmd>, --command=<cmd> execute command <cmd> and read from its output instead of stdin
        --no-stdout               do not write to stdout

## License

Distributed under the terms of the MIT license.
Copyright © 2012 Georgios Migdos.

repository: cyberpython/Mintee

repo_name: cyberpython/Mintee


text:
---
title: 'Facebook Messenger Output'
excerpt: 'Learn more about Jovo output templates for Facebook Messenger.'
url: 'https://www.jovo.tech/marketplace/platform-facebookmessenger/output'
---

# Facebook Messenger Output

Learn more about output templates for [Facebook Messenger](https://www.jovo.tech/marketplace/platform-facebookmessenger).

## Introduction

Jovo offers the ability to [create structured output](https://www.jovo.tech/docs/output) that is then translated into native platform responses.

This structured output is called [output template](https://www.jovo.tech/docs/output-templates). Its root properties are generic output elements that work across platforms. [Learn more about how generic output is translated into a Facebook Messenger response below](#generic-output-elements).

```typescript
{
  message: `Hello world! What's your name?`;
}
```

You can also add platform-specific output to an output template. [Learn more about Facebook Messenger-specific output below](#facebook-messenger-output-elements).

```typescript
{
  // ...
  platforms: {
    facebookMessenger: {
      // ...
    }
  }
}
```

## Generic Output Elements

Generic output elements are in the root of the output template and work across platforms. [Learn more in the Jovo output template docs](https://www.jovo.tech/docs/output-templates).

Below, you can find a list of generic output elements that work with Facebook Messenger:

- [`message`](#message)
- [`quickReplies`](#quickreplies)
- [`card`](#card)
- [`carousel`](#carousel)

### message

The [generic `message` element](https://www.jovo.tech/docs/output-templates#message) contains the main response of your bot, which is usually displayed in a chat bubble:

```typescript
{
  message: 'Hello world!',
}
```

It is also possible to use `message` as an object which contains both a `speech` (the _spoken_ text on platforms like Alexa) and a `text` (_written_ text to be displayed in chat bubbles) field. In this case, Facebook Messenger uses the `text` element.

```typescript
{
  message: {
    speech: 'Hello listener!',
    text: 'Hello reader!'
  }
}
```

Under the hood, Jovo translates the `message` into `message.text` as part of a call to the Facebook Send API ([see the official Facebook Messenger docs](https://developers.facebook.com/docs/messenger-platform/send-messages#sending_text)):

```json
{
  "recipient": {
    "id": "<PSID>"
  },
  "message": {
    "text": "Hello world!"
  }
}
```

### quickReplies

The [generic `quickReplies` element](https://www.jovo.tech/docs/output-templates#quick-replies) allows you to define small buttons that help the user answer a question faster. This concept is also called [quick replies in the Facebook Messenger documentation](https://developers.facebook.com/docs/messenger-platform/send-messages/quick-replies).

Quick replies can be an array of strings:

```typescript
{
  // ...
  quickReplies: ['yes', 'no'];
}
```

Alternatively, you can use an array of objects that includes a `text` (what the user sees) and a `value` (what is passed to the bot):

```typescript
{
  // ...
  quickReplies: [
    {
      text: 'oh yeah',
      value: 'yes',
    },
    {
      text: 'hell no',
      value: 'no',
    },
  ];
}
```

Under the hood, Jovo translates these into Facebook Messenger quick replies of the type `text`. [Learn more in the official Facebook Messenger documentation](https://developers.facebook.com/docs/messenger-platform/send-messages/quick-replies#text). The quick replies are added to a `message`:

```json
{
  "recipient": {
    "id": "<PSID>"
  },
  "messaging_type": "RESPONSE",
  "message": {
    "quick_replies": [
      {
        "content_type": "text",
        "title": "oh yeah",
        "payload": "yes"
      },
      {
        "content_type": "text",
        "title": "hell no",
        "payload": "no"
      }
    ]
  }
}
```

The `payload` is the value that gets passed to the [NLU integration](https://www.jovo.tech/docs/nlu) to turn raw text into structured content. For quick replies that are passed as strings, the `title` and `payload` are the same. If the quick replies are objects, the `text` gets turned into `title` and the `value` into `payload`.

For other quick reply content types, see [`nativeQuickReplies`](#nativequickreplies) below.

### card

The [generic `card` element](https://www.jovo.tech/docs/output-templates#card) can be used to send a [Facebook Messenger generic template](https://developers.facebook.com/docs/messenger-platform/send-messages/template/generic). [Learn more about other templates below](#template).

Here is an example of a card with all properties that are supported by Facebook Messenger:

```typescript
{
  // ...
  card: {
    title: 'Hello world!',
    subtitle: 'Welcome to the show.',
    imageUrl: 'https://...',

    // Facebook Messenger specific properties
    defaultAction: { /* ... */ },
    buttons: [ /* ... */ ]
  },
}
```

The following values are specific for Facebook Messenger and are described in detail in sections below:

- `defaultAction`: A URL that is opened in the Facebook Messenger webview when a user taps the template. This element has the same properties as the URL button type that's described in the [`buttons` section below](#buttons).
- [`buttons`](#buttons): Up to 3 buttons that can be attached to the card.

Under the hood, Jovo translates the `card` into the following generic template:

```json
{
  "recipient": {
    "id": "<PSID>"
  },
  "message": {
    "attachment": {
      "type": "template",
      "payload": {
        "template_type": "generic",
        "elements": [
          {
            "title": "Hello world!",
            "image_url": "https://...",
            "subtitle": "Welcome to the show.",
            "default_action": {
              "type": "web_url",
              "url": "https://...",
              "webview_height_ratio": "tall"
            },
            "buttons": [
              {
                "type": "postback",
                "title": "Start Chatting",
                "payload": "DEVELOPER_DEFINED_PAYLOAD"
              }
            ]
          }
        ]
      }
    }
  }
}
```

Learn more about this structure in the [official API reference by Facebook](https://developers.facebook.com/docs/messenger-platform/reference/templates/generic).

### carousel

A [generic `carousel` element](https://www.jovo.tech/docs/output-templates#carousel) is a horizontally scrollable set of [`card`](#card) items. In Facebook's definition, this is called a [carousel of generic templates](https://developers.facebook.com/docs/messenger-platform/send-messages/template/generic#carousel).

This is how a carousel can be defined:

```typescript
{
  // ...
  carousel: {
    items: [
      {
        title: 'Hello world!',
        subtitle: 'Welcome to the show.',
        imageUrl: 'https://...',
      },
      {
        title: 'Hello again!',
        subtitle: 'This is element 2.',
        imageUrl: 'https://...',
      }
    ]
  },
}
```

The elements in an `items` array can contain all properties that are shown in the [`card` section](#card).

## Facebook Messenger Output Elements

It is possible to add platform-specific output elements to an output template. [Learn more in the Jovo output template documentation](https://www.jovo.tech/docs/output-templates#platform-specific-output-elements).

For Facebook Messenger, you can add output elements inside a `facebookMessenger` object:

```typescript
{
  // ...
  platforms: {
    facebookMessenger: {
      // ...
    }
  }
}
```

These elements include:

- [`nativeQuickReplies`](#nativequickreplies)
- [`template`](#template)
- [`buttons`](#buttons)

### nativeQuickReplies

The [generic `quickReplies` element](#quickreplies) can be used for text based quick replies that are supported by many platforms. Additionally, Facebook Messenger supports quick replies that allow you to ask users for their phone number or their email address.

For this, you can use the `nativeQuickReplies` element that offers all properties in the same way as they are detailed in the [official Facebook Messenger API reference](https://developers.facebook.com/docs/messenger-platform/reference/buttons/quick-replies).

Here is an example for a phone number quick reply:

```typescript
import { QuickReplyContentType } from '@jovotech/platform-facebookmessenger';

// ...

{
  // ...
  platforms: {
    facebookMessenger: {
      nativeQuickReplies: [
        {
          content_type: QuickReplyContentType.UserPhoneNumber, // or 'user_phone_number'
        },
      ];
    }
  }
}
```

The following quick reply types are supported:

| Enum key                                | Enum value            | Links                                                                                |
| --------------------------------------- | --------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `QuickReplyContentType.Text`            | `'text'`              | [Code](https://github.com/jovotech/jovo-output/blob/master/output-facebookmessenger/src/models/quick-reply/TextQuickReply.ts), [Official Docs](https://developers.facebook.com/docs/messenger-platform/send-messages/quick-replies#text)             |
| `QuickReplyContentType.UserPhoneNumber` | `'user_phone_number'` | [Code](https://github.com/jovotech/jovo-output/blob/master/output-facebookmessenger/src/models/quick-reply/UserPhoneNumberQuickReply.ts), [Official Docs](https://developers.facebook.com/docs/messenger-platform/send-messages/quick-replies#phone) |
| `QuickReplyContentType.UserEmail`       | `'user_email'`        | [Code](https://github.com/jovotech/jovo-output/blob/master/output-facebookmessenger/src/models/quick-reply/UserEmailQuickReply.ts), [Official Docs](https://developers.facebook.com/docs/messenger-platform/send-messages/quick-replies#email)       |

### template

Facebook offers different types of message templates. The generic template (which is the result of the [generic `card` element](#card) from above) is one example for structured data that can be displayed. Learn more about templates in the official Facebook Messenger docs](https://developers.facebook.com/docs/messenger-platform/send-messages/templates).

You can add a template like this:

```typescript
import { TemplateType } from '@jovotech/platform-facebookmessenger';

// ...

{
  // ...
  platforms: {
    facebookMessenger: {
      template: [
        {
          template_type: TemplateType.Receipt, // or 'receipt'
        },
      ];
    }
  }
}
```

Depending on the type, different properties can be added in the same way they are used in the Facebook Messenger API,for example:

```typescript
import { TemplateType } from '@jovotech/platform-facebookmessenger';

// ...

{
  // ...
  platforms: {
    facebookMessenger: {
      template: [
        {
          template_type: TemplateType.Receipt, // or 'receipt'
          recipient_name: 'Some Name',
          order_number: '2021100123',
          // ...
        },
      ];
    }
  }
}
```

Here is a table of all supported template types:

| Enum key               | Enum value  | Links                                                                                |
| ---------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `TemplateType.Generic` | `'generic'` | [Code](https://github.com/jovotech/jovo-output/blob/master/output-facebookmessenger/src/models/template/GenericTemplate.ts), [Official Docs](https://developers.facebook.com/docs/messenger-platform/send-messages/template/generic) |
| `TemplateType.Receipt` | `'receipt'` | [Code](https://github.com/jovotech/jovo-output/blob/master/output-facebookmessenger/src/models/template/ReceiptTemplate.ts), [Official Docs](https://developers.facebook.com/docs/messenger-platform/send-messages/template/receipt) |
| `TemplateType.Button`  | `'button'`  | [Code](https://github.com/jovotech/jovo-output/blob/master/output-facebookmessenger/src/models/template/ButtonTemplate.ts), [Official Docs](https://developers.facebook.com/docs/messenger-platform/send-messages/template/button)   |
| `TemplateType.Media`   | `'media'`   | [Code](https://github.com/jovotech/jovo-output/blob/master/output-facebookmessenger/src/models/template/MediaTemplate.ts), [Official Docs](https://developers.facebook.com/docs/messenger-platform/send-messages/template/media)     |

A template gets translated into the following:

```JSON
{
  "recipient":{
    "id":"<PSID>"
  },
  "message":{
    "attachment":{
      "type":"template",
      "payload":{
        "template_type":"<TEMPLATE_TYPE>",
        // ...
      }
    }
  }
}
```

### buttons

All [templates](#template) (including the [generic `card` element](#card) that gets translated into a generic template) may contain buttons, which are added using the `buttons` array.

```typescript
import { ButtonType } from '@jovotech/platform-facebookmessenger';

// ...

{
  // ...
  card: {
    // ...
    buttons: [
      {
        type: ButtonType.Postback, // or 'postback'
        title: 'Start Chatting',
        payload: 'DEVELOPER_DEFINED_PAYLOAD' // what happens with payload?
      }

    ],
  },
}
```

Here is a table of all supported button types:

| Enum key              | Enum value         | Links                                                                                |
| --------------------- | ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ButtonType.Postback` | `'postback'`       | [Code](https://github.com/jovotech/jovo-output/blob/master/output-facebookmessenger/src/models/button/PostbackButton.ts), [Official Docs](https://developers.facebook.com/docs/messenger-platform/send-messages/buttons#postback)  |
| `ButtonType.Url`      | `'web_url'`        | [Code](https://github.com/jovotech/jovo-output/blob/master/output-facebookmessenger/src/models/button/UrlButton.ts), [Official Docs](https://developers.facebook.com/docs/messenger-platform/send-messages/buttons#url)            |
| `ButtonType.Call`     | `'phone_number'`   | [Code](https://github.com/jovotech/jovo-output/blob/master/output-facebookmessenger/src/models/button/CallButton.ts), [Official Docs](hhttps://developers.facebook.com/docs/messenger-platform/send-messages/buttons#call)         |
| `ButtonType.LogIn`    | `'account_link'`   | [Code](https://github.com/jovotech/jovo-output/blob/master/output-facebookmessenger/src/models/button/LogInButton.ts), [Official Docs](https://developers.facebook.com/docs/messenger-platform/send-messages/buttons#login)        |
| `ButtonType.LogOut`   | `'account_unlink'` | [Code](https://github.com/jovotech/jovo-output/blob/master/output-facebookmessenger/src/models/button/LogOutButton.ts), [Official Docs](https://developers.facebook.com/docs/messenger-platform/send-messages/buttons#logout)      |
| `ButtonType.GamePlay` | `'game_play'`      | [Code](https://github.com/jovotech/jovo-output/blob/master/output-facebookmessenger/src/models/button/GamePlayButton.ts), [Official Docs](https://developers.facebook.com/docs/messenger-platform/send-messages/buttons#game_play) |

[Learn more about all buttons types in the official Facebook Messenger docs](https://developers.facebook.com/docs/messenger-platform/send-messages/buttons)

repository: jovotech/jovo-framework

gha_language: TypeScript

repo_name: jovotech/jovo-framework


text:
# Marketplace extensions

This directory contains production quality extensions for the
[Extension Marketplace](https://www.contentful.com/developers/marketplace).

These extensions are production quality and ready to use out of the box.

## Development

Extensions should be created using `create-contentful-extension`. After copying them over the require only minimal
modifications:

- Add a `version` property to `package.json` with the value `1.0.0` or higher.
- Add unit tests. Preferably using Jest.

  - Modify `.babelrc` to be environments aware.

    There need to be at environments for `test` (for Jest), `production` and `development`. The `test` environment must
    include the transformation of EcmaScript Modules to CommonJS while the other environments should omit this step.

- Follow the code formatting and linting rules of this directory.
- Add a file called `MARKETPLACE.md` containing the text for the marketplace listing. If it does not exist, the
  marketplace will fallback to a `README.md`, but it's better to have a more user-focused text for the marketplace. If
  neither file exists the marketplace won't list the extension.

license: ISC


text:
# Type checking

Lua doesn't care what type of data a variable has.

```lua
data = 12
data = "hello"
data = true
```

To this end, we can use the `type` function to check what kind of data a variable is holding.

```lua
type(data)
```
```
=> boolean
```

We can check the type of function:

```lua
type(string.reverse)
type(type)
```

We can also use it to check what type of data a function is returning back to us:

```lua
type(string.reverse("hello"))
```
```
=> string
```
```lua
type(type(12))
```
```
=> string
```

## Converting data types

We've already seen data type conversion previously when we took numbers and an operation in, transforming that into a true or false statement.

```lua
type(12 > 3)
```
```
=> boolean
```

There are also ways to convert between numbers and strings using `tonumber` and `tostring`.

```lua
number = tonumber("24")
print(type(number))
string = tostring(number)
print(type(string))
```
```
number
string
```

Interesting but maybe less useful, you can convert other data types to string:

```lua
print(tostring("already a string"))
print(tostring(true))
print(tostring(nil))
print(tostring(tostring))
```

## Exercises

- Which of these strings can be converted to a number successfully? `"001"`, `"7.12000"`, `"  5  "`, `"1,943"`

gha_language: Lua

gha_license_id: MIT


text:
# NIMA: Neural Image Assessment
Implementation of [NIMA: Neural Image Assessment](https://arxiv.org/abs/1709.05424) in Keras + Tensorflow with weights for MobileNet model trained on AVA dataset.

NIMA assigns a Mean + Standard Deviation score to images, and can be used as a tool to automatically inspect quality of images or as a loss function to further improve the quality of generated images.

Contains weights trained on the AVA dataset for the following models:
- NASNet Mobile (0.067 EMD on valset thanks to [@tfriedel](https://github.com/tfriedel) !, 0.0848 EMD with just pre-training)
- Inception ResNet v2 (~ 0.07 EMD on valset, thanks to [@tfriedel](https://github.com/tfriedel) !)
- MobileNet (0.0804 EMD on valset)

# Usage
## Evaluation
There are `evaluate_*.py` scripts which can be used to evaluate an image using a specific model. The weights for the specific model must be downloaded from the [Releases Tab](https://github.com/titu1994/neural-image-assessment/releases) and placed in the weights directory.

Supports either passing a directory using `--dir` or a set of full paths of specific images using `--img` (seperate multiple image paths using spaces between them)

There's also a script sort_lightroom_collection.py, which will sort a Adobe Lightroom collection using the calculated scores. For an example see the screenshots.

### Arguments:
```
--dir    : Pass the relative/full path of a directory containing a set of images. Only png, jpg and jpeg images will be scored.
--img    : Pass one or more relative/full paths of images to score them. Can support all image types supported by PIL.
```

## Training
The AVA dataset is required for training these models. I used about 240.000 images to train and the last 10.000 images to evaluate (this is not the same format as in the paper).
You can download it as a torrent from here:
http://academictorrents.com/details/71631f83b11d3d79d8f84efe0a7e12f0ac001460

First, ensure that the dataset is clean - no corrupted JPG files etc by using the `check_dataset.py` script in the utils folder. If such currupted images exist, it will drastically slow down training since the Tensorflow Dataset buffers will constantly flush and reload on each occurance of a corrupted image.
Then just run train_nasnet_mobile.py.

# Example
## best ranked images

## worst ranked images

# Requirements
- Keras
- Tensorflow (CPU to evaluate, GPU to train)
- path.py
- tqdm
- pillow

repository: DorisWZG/neural-image-assessment

repo_name: DorisWZG/neural-image-assessment


text:
---
title: Variables
---

Project variables are provided whenever you build, deploy, or run `railway run`.
Together these variables form your Railway environment. Each
plugin provides the necessary environment variables needed to use it (such as
`DATABASE_URL` for the PG plugin). You can also specify custom variables on the
project variables page.

<NextImage  src="https://res.cloudinary.com/railway/image/upload/v1631917786/docs/project-vars_yu71yi.png"
            alt="Screenshot of Project Variables on Railway Dashboard"
            layout="responsive"
            width={1083}
            height={865}
            quality={80} />

You can view all variables for the current environment with `railway vars` and change the environment with `railway environment`.

## Bulk Import

Chances are you might already have a `.env` file laying around. You can import your existing environment variables via Bulk Import.

You can click the `Bulk Import` link to open up a modal where you can paste in a list of variables separated by new line.

## Multiline Variables

Railway supports multiline variables/object variables. Just type or paste in the value as you would normally.

## Railway Provided Variables

Railway provides the following additional system environment variables to all
builds and deployments.

| Name                         | Description |
|------------------------------|-------------|
| `RAILWAY_STATIC_URL`         | The public domain, of the form `example.up.railway.app` |
| `RAILWAY_GIT_COMMIT_SHA`     | The git [SHA](https://docs.github.com/en/github/getting-started-with-github/github-glossary#commit) of the commit that triggered the deployment. Example: `d0beb8f5c55b36df7d674d55965a23b8d54ad69b` |
| `RAILWAY_GIT_AUTHOR`         | The user of the commit that triggered the deployment. Example `gschier` |
| `RAILWAY_GIT_BRANCH`         | The branch that triggered the deployment. Example `main` |
| `RAILWAY_GIT_REPO_NAME`      | The name of the repository that triggered the deployment. Example `myproject` |
| `RAILWAY_GIT_REPO_OWNER`     | The name of the repository owner that triggered the deployment. Example `mycompany` |
| `RAILWAY_GIT_COMMIT_MESSAGE` | The message of the commit that triggered the deployment. Example `Fixed a few bugs` |

## Templated Variables

Variables can reference other variables using the `${{ MY_VAR }}` templating
syntax. This can help reduce duplication if you need the same value in more than
one variable, or need to present a plugin-provided variable differently.

**Note:** The above `RAILWAY_*` variables aren't yet supported in templates

### Construct "Meta" Variables

If you find yourself needing the same value in more than one place, you can
create a template to avoid duplication. The following example constructs a URL
from an AWS S3 configuration:

```
S3_HOST    = us-west-2.amazonaws.com
S3_BUCKET  = mybucket
STATIC_URL = https://${{ S3_HOST }}/${{ S3_BUCKET }}/static/
```

### "Rename" Plugin Variables

Railway plugins provide a fixed set of variables. If your application requires a
variable to be under different name, create a new custom variable that uses a
template to reference the original:

```
DATABASE_URL = ${{ MYSQL_URL }}
```


text:
# supabase-client
A Supabase client for Python. This mirrors the design of [supabase-js](https://github.com/supabase/supabase-js/blob/master/README.md)

[Full documentation: https://keosariel.github.io/2021/08/08/supabase-client-python/](https://keosariel.github.io/2021/08/08/supabase-client-python/)

## Overview
[Supabase](https://supabase.io/) is an Open Source Firebase Alternative that provides the tools and infrastructure you need to develop apps. It lets you
create a backend in less than 2 minutes. The **Supabase-Client** abstracts access the endpoints to the READ, INSERT, UPDATE, and DELETE operations on an existing **table** in your supabase application.

However, this project is base on the [Supabase API](https://supabase.io/docs/guides/api)

## Installation
To install Supabase-Client, simply execute the following command in a terminal:
```
pip install supabase-client
```

## Managing Data

```python

# requirement: pip install python-dotenv

import asyncio
from supabase_client import Client

from dotenv import dotenv_values
config = dotenv_values(".env")

supabase = Client(
    api_url=config.get("SUPABASE_URL"),
    api_key=config.get("SUPABASE_KEY")
)

async def main():
    # Insertion of Data

    error, result = await (
      supabase.table("posts")
      .insert([{"title": "post title"}])
    )

    # Updating of Data
    new_title  =  "updated title"
    _id        = 1
    error, result =  await (
      supabase.table("posts")
      .update(
        {"id"   : f"eq.{_id}"},
        {"title": new_title}
      )
    )

    # Deleting of Data

    error, result = await (
        supabase.table("posts")
        .delete({"id": _id})
    )

    # Filtering Data

    # All posts
    error, results = await (
        supabase.table("posts")
        .select("*")
        .query()
    )

    # Add limits/range
    error, results = await (
        supabase.table("posts")
        .select("*")
        .range(0,10)
        .query()
    )

    # Being specific
    error, results = await (
        supabase.table("posts")
        .select("*")
        .eq("id",1)
        .query()
    )

if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())
```

## License
Supabase-Client is licensed under the [MIT License](https://mit-license.org/)

See [Supabase Docs](https://supabase.io/docs/guides/api)

repository: TrendingTechnology/supabase-client

repo_name: TrendingTechnology/supabase-client


text:
{
  "title": "Hey #developers arguing over programming languages aka language wars is not any smarter than debating English vs. Chinese. 谢谢 @xieyihui ! https://t.co/9OEjYtqwpz",
  "date": "2018-11-25"
}

# blogdown

> **Martin John Hadley** (@martinjhnhadley; 1/0): Hey #rstats #blogdown bloggers 👋 how have you written blogposts where you need a .httr-oauth token for the .Rmd to render?
>
Here's a reprex https://t.co/Ss7FNsW7CJ for my specific example of using #rfigshare for getting an open dataset  [↪](https://twitter.com/xieyihui/status/1066301348554162176)

<!-- -->

# bookdown

> **Paolo Crosetto** (@PaoloCrosetto; 1/0): @benleo_econ Beamer is complex but doing slides in markdown with Rstudio is a breeze. Take one hour to go through the tutorial here: https://t.co/cDaVP9813G . I bet it is enough to learn the tool in and out. It is sometimes simplistic but it's what you need: no clutter.  [↪](https://twitter.com/xieyihui/status/1066230617111707648)

<!-- -->

# yihui.name

> **Matt Bannert** (@whatsgoodio; 1/0): Hey #developers arguing over programming languages aka language wars is not any smarter than debating English vs. Chinese. 谢谢 @xieyihui !
https://t.co/9OEjYtqwpz  [↪](https://twitter.com/xieyihui/status/1066360469605228544)

<!-- -->

> **Ajay Koli** (@ajay__koli; 0/0): If you're struggling too with either computer or native language  https://t.co/w6y34WjcE9  [↪](https://twitter.com/xieyihui/status/1066182639323963392)

<!-- -->

repository: cgpu/twitter-blogdown

repo_name: cgpu/twitter-blogdown


text:
# Plugins short description

## auto-pairs https://github.com/jiangmiao/auto-pairs
Auto inserting pairs

## ale https://github.com/w0rp/ale
Code erros linter

## vim-yankstack https://github.com/maxbrunsfeld/vim-yankstack
Increase number of yank history

## ack.vim https://github.com/mileszs/ack.vim
Ack script for vim

## bufexplorer https://github.com/corntrace/bufexplorer
Buffer explorer

## ctrlp.vim https://github.com/ctrlpvim/ctrlp.vim
Find files (support regex)

## nerdtree https://github.com/scrooloose/nerdtree
Tree like file explorer

## nginx.vim https://github.com/chr4/nginx.vim
Highlight nginx syntax

## open_file_under_cursor.vim https://github.com/amix/open_file_under_cursor.vim
Open file under cursor

## snipmate-snippets https://github.com/scrooloose/snipmate-snippets
Some snippets for snipmate

## tlib https://github.com/vim-scripts/tlib
Library

## vim-addon-mw-utils https://github.com/MarcWeber/vim-addon-mw-utils
Library, cache files

## vim-bundle-mako https://github.com/sophacles/vim-bundle-mako
Python template mako (html?)

## vim-coffee-script https://github.com/kchmck/vim-coffee-script
Vim coffee scripts, syntax highlight (javascript like)

## vim-colors-solarized https://github.com/altercation/vim-colors-solarized
Colorscheme [-]

## vim-indent-object https://github.com/michaeljsmith/vim-indent-object
New motions (ii = ident level, ai = ii + line above, aI = ai + line below)

## vim-less https://github.com/groenewege/vim-less
Syntax and stuff for LESS stylesheet language [-]

## vim-markdown https://github.com/tpope/vim-markdown
Syntax, stuff, shouldnt be really useful

## vim-pyte https://github.com/therubymug/vim-pyte
Colorscheme for GUI vim [--]

## vim-snipmate https://github.com/garbas/vim-snipmate
Auto complete using tab

## vim-snippets https://github.com/honza/vim-snippets
Snippets for snipmate

## vim-surround https://github.com/tpope/vim-surround
add surrounding (s) motion to edit tags / quotes / delimiters

## vim-expand-region https://github.com/terryma/vim-expand-region
+ / - to expand visual selection

## vim-multiple-cursors https://github.com/terryma/vim-multiple-cursors
Multiple cursor, similar to Ctrl-V block

## vim-fugitive https://github.com/tpope/vim-fugitive
Git wrapper

## goyo.vim https://github.com/junegunn/goyo.vim
:Goyo (funny reading)

## vim-zenroom2 https://github.com/amix/vim-zenroom2
Goyo stuff

## vim-repeat https://github.com/tpope/vim-repeat
Repeat plugin maps

## vim-commentary https://github.com/tpope/vim-commentary
Comment stuff using `gc`

## vim-go https://github.com/fatih/vim-go
Go languge support for vim

## vim-gitgutter https://github.com/airblade/vim-gitgutter
Display git diffs in buffer, can stage and stuff

## gruvbox https://github.com/morhetz/gruvbox
Retro groove colorscheme

## vim-flake8 https://github.com/nvie/vim-flake8
Shows errors in python scripts

## vim-pug https://github.com/digitaltoad/vim-pug
Syntax highlihgting for pug templates

## lightline.vim https://github.com/itchyny/lightline.vim
Cool status line

## vim-abolish https://github.com/tpope/tpope-vim-abolish
cr{s,c,u,.,-) coercion, substitutions, abreviations for all cases

## mru.vim https://github.com/vim-scripts/mru.vim
Most recently used (:MRU), Leader + f

## vim-markdown https://github.com/plasticboy/vim-markdown
Folding for markdown (zr = reduce fold, zm = increase)

## comfortable-motion.vim https://github.com/yuttie/comfortable-motion.vim
Ctrl-d, Ctrl-u, Ctrl-f, Ctrl-b scrollings

repository: ninichat/vimrc

repo_name: ninichat/vimrc


text:
---
layout: song
category: tip_technique
topic_id: topic__strumming_rhythm
title: How to read & write strumming patterns
slug: "260"
date_published: 2019-10-06
tags: [Tips & Techniques, Strumming]
yt_video_id: aqL53vVivoE
pdf_version: v2
pdf_numpages: 2
patreon_lesson_available: true
patreon_lesson_url: https://www.patreon.com/posts/30540917
redirect_from:
  - /tips/27/
---

## Video Overview

<!-- Coming soon! -->

{% include youtube_embed.html yt_id = page.yt_video_id %}

{% include pdf-module.html slug = page.slug pdf_numpages = page.pdf_numpages pdf_version = page.pdf_version has_patreon_url = page.patreon_lesson_url patreon_url = page.patreon_lesson_url free_pdf_available = page.free_pdf_available free_pdf_url = page.free_pdf_url song_name = page.song_title pdf_for_sale = page.pdf_for_sale musicnotes_url = page.musicnotes_url %}

<!-- Coming soon! -->

## Editor's notes

In this lesson I'll show you 7 tips for reading & writing strumming patterns as part of your ongoing guitar play & practice. Whether you're following along with another lesson, learning a song by ear, or writing songs for yourself – there's many situations where this is a vital skill to have as a guitarist. No reading music, no dissecting tabs... this one is all about simple, practical ways to write down those ups & down strums in ways you can easily read later. I'll cover the basics, and then get into some slightly more advanced grounds in looking at things like accents, rests, slap strumming, and bass notes.

Timestamps for this video:

- 0:00 Lesson overview
- 1:02 Tip 1 - Ups & down strums
- 2:32 Tip 2 - Counting & rhythm
- 4:25 Tip 3 - Combining timing w/ strum directions
- 6:02 Tip 4 - Rests & Silence
- 7:51 Tip 5 - Accented Strums
- 10:25 Tip 6 - Bass Note Strumming
- 13:04 Tip 7 - Slap Strumming
- 14:05 Farewell

## Related lesson I made

Here's my video on "slap strumming" technique I mention in tip #7.

<iframe width="560" height="315" src="https://www.youtube.com/embed/iQ7pLK4oUEc" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

repository: davidpots/playsongnotes

gha_language: HTML

gha_license_id: NOASSERTION

repo_name: davidpots/playsongnotes