text:
---
layout: page
title: "Start Guide2"
date: 2007-09-04T21:38:48+00:00
comments: true
sharing: true
footer: true
group: AstroEmpires
---

Ok, so first of all, this is not my make, but I'd rather say it's a compilation from various sources AND from my experience. Who am I? Search for "Dacus" in the beta server and you'll find out Wink
Also you can contact me for comments and improvements you might have to this.

A quick warning and very important too: DON'T BUILD any defenses nor fleets (except one single fighter at all your bases which have at least one TR- this will prevent others to plunder your trade routes) during these 7 days, they are useless to you as in these 7 days you can't fight, you can't attack and you cannot be attacked, so bear in mind that you're losing money building those; money you can spend better in investing into your future empire. You should build however MAX 2 scouts to help you scout other regions you can't see and when you see good planets you want to take, bookmark them and then move on. In case you already used your bookmarks and there are no more bookmarks available (full list), just make notes and post there the coordinates.

-=-=-=-

Now let's get down to business. When you start a new account, it's preferred that you start on a moon, not a planet with at least 3 solar or gas and more than 4 fertility, unless you start on a crystalline type moon. I'll tell you why later.
So, until you get an astro with at least 5 fertility and at least 2 metal (best to be 3), and at least 2 solar or 2 gas (best will be at least one to be 4), you'll need to restart again. So the BEST target astro to start with is a Rocky-like astro and should be solar or gas >= 4 AND fertility >=5 AND metal 3 and DO NOT choose an asteroid as it's small area will hinder your future efforts of upgrading it.

Now that you have your base (Click on Bases, then Home Planet), click on structures and click build next to Metal Refineries. Then scroll down, there should be a queue structures button and a list of buildings you can queue. Queue up 1 Research lab and 4 metal refineries. Note that you may have to queue a power plant or an urban structure in between them. This is because each building takes up a certain amount of energy and 1 population. You can see those stats in the top of the page. Always build the power plant that gives more energy. Otherwise you're just wasting space. Add these only when you need them. Always remember to keep your queue list full, especially if you're going somewhere or going to sleep. The queue list will finish by itself unless you run out of credits or you messed the queue list up. And when you do run out of credits, the queue list activates when you do have the credits to build.

When that Research Lab was built, go to research and research Computer. Then queue 1 more Computer. While you're doing that, build a spaceport, then a shipyard. When your 2 computer research finishes, build a robotics factory.

This is the basics of what you should do on all your planets, except for the research labs and stuff.

Meaning, that after all this, you should have this:

Structures
1 Research Lab
4 Metal Refineries
1 Robotics Factory
1 Shipyard
1 Spaceport

In Queue:
Metal Refinery
Spaceport
Robotics Factory
Shipyard
Research Lab

And repeat. Add power plants and urban structures whenever necessary too. The specific order is because when you only focus on upgrading one structure, the cost steadily gets higher and your economy and construction won't be able to handle it. Alternating structures makes your economy and base stats grow faster and easier.

Research

2 Computer

You'll need that and 5 Research labs. Don't build them all at once, but slip them in the queue line every once in a while. Get them by the end of the day.

Now, this is what I expect if you started early:

5 Research Labs
7 Metal Refineries
4 Robotics
4 Shipyards
4 Spaceports

2 Computer

Go for 1 Energy and 5 more Energy in the queue.

If you started late, try to get that in queue and rest up for tomorrow.

-----

Second day, time to get to work. It's more building and research and if you were active, you might run out of credits today. This is what you should get by the end of the day, following the rule of alternating structure building:

8 Research Labs
10 Metal Refineries
6 Robotics Factories
6 Shipyards
6 Spaceports

Queue 2 shipyards and as many metal refineries as you can before you go to sleep. I'd say 12 metal refineries on the planet is good.

8 Energy
2 Computer
4 Stellar Drive

If you didn't get 4 stellar drive, you're either bankrupt or not active. After you get 4 stellar drive, queue a Warp Drive. If you have 4 stellar but can't find Warp Drive, this is because you don't have 8 research labs.

If you're bankrupt, don't worry, the queue list will do your work for you while you're asleep.

-----

Before starting, read the whole tutorial again to remember the steps you need to take.

Day 3, now is the time to start building Outpost Ships. These require 8 Shipyards, 1 Warp Drive, and 100 credits on hand. Yes, the sole purpose of the above is to get Outpost Ships as early as possible. If you were able to get these on the second night, you're way ahead, and you have a pretty good chance of getting 10 planets before your account expires.

As a general rule it's a good idea to have 4 economy based astros, 3 Research based astros and 2 mixes Production&Research astros (the first one you'll get will have to be Economy&Production&Research). As the game will progress you'll adjust your planets accordingly, but these are some kind of required for the long run.

I'd advise you to get the economy astros first to boost your economy (to help you expand), then the Prod&Research astros and in the end the Research astros.

Outpost ships let you build new bases on other uninhabited planets. These are the suggested ones to build on:

Crystallines - Rare, but worth getting. I prefer crystallines with 3 solar and 5 fertility, but those are really rare. Frankly, I don't really care about the stats of them, but if they don't have those stats, you might have some problems with developing it. On this kind of planets a different kind of build is necessary. Ok, start always with metal refineries and robotic factory. and at the same time build crystal mines. you know metal refineries and robotic factory accelerate the building. when the crystal mines start getting expensive, alternate it with economic center (based on cost). and don't forget building good defense on it. Get AT MOST 4 of this kind, then go for something else.

Rocky - Pretty common, and are pretty good production bases. I prefer 3 solar and 6 fertility, but 4 solar and 5 fertility work fine too. I also prefer it being a moon instead of a planet (the reason why is at the end of this).

Metallic or Craters - Also common, and are also pretty good production bases. Don't pay much attention to the 1 crystal, as it's really not worth it. 3 solar and 5 fertility is what I'd go for. I'd also prefer a moon over a planet for this one as well.

Asteroids - Not as rare as Crystallines, but they're good to work with. Its only drawback is its small area. I'd also prefer 3 solar and 5 fertility on this, because 4 fertility really hurts when you need to upgrade level 17 urban structures. These aren't as rare, so I do suggest finding these stats. try to alternate crystal mines with spaceports at the beginning. during this 7 days protection you need economy. after you could always change of discretion for production

If you started on a Rocky or Metallic, I'd also suggest an Arid (or Tundra), Gaia (if you can get one) or Earthly or planet for your 10th planet to use it as your research base.

When you're setting up your new base, you'll notice there's a fee. For your first base, it'll cost you 50 credits. Every base after the last will cost twice what it used to. Like so:

50
100
200
400
800

And so on. Your tenth planet will cost you 12800 credits.  You'll be able to do it if you're pretty active.

Once you've set up your base, follow the instructions from day 1 and 2, except without the research labs. These stats are what you should attain on all your planets, regardless of type:

12 Metal Refineries
8 Robotics
8 Shipyards
10 Spaceports

As for research, aim for this and this only:

10 Energy
10 Computer
8 Laser
4 Stellar Drive
1 Warp Drive

This will unlock Economic Centers and Nanite Factories. Build up to level 3 of both on all your bases. Remember to alternate.

I expect you to get a total of 3 bases by the end of the day and 2 more outpost ships in construction for tomorrow.

-----

Before starting, read the whole tutorial again to remember the steps you need to take.

Day 4, you should be starting to really rack in the credits with an economy of over 100. Use those outpost ships to get 2 more planets. You should have around 200 economy by the end of the day, maybe a little less. Build 2 more outpost ships for tomorrow.

-----

Before starting, read the whole tutorial again to remember the steps you need to take.

Day 5, you should have the credits to build your 6th base, and construct your 7th base by nightfall, which costs 1600 and 3200 credits. Remember to get all the above stats for all your planets. By the end of the day you should have about 400 economy or more. Build 3 more outpost ships.

-----

Before starting, read the whole tutorial again to remember the steps you need to take.

Day 6, this is the crucial day, and you should be able to build your 8th and 9th base in the afternoon and tomorrow morning. You must have around 650 economy and stop all construction and research a couple hours before your upgraded account ends.

-----

Before starting, read the whole tutorial again to remember the steps you need to take.

Day 7, spend all day waiting for 12800 credits and if you're worried, recycle some structures. Then build your 10th base. Feel free to do whatever you want from then on.

ADVICES
-=-=-=-

Keep in mind the following:

Very important: DON'T BUILD any defenses nor fleets during these 7 days, they are useless to you as in these 7 days you can't fight and you can't attack, so bear in mind that you're losing money building those; money you can spend better in investing into your future empire. You'll have enough time to build fleets after these few start days.

HOWEVER, when the day 6 of your account is at the end, start building defenses and fleets on all your bases and stop constructing, so that you'll have money for your defenses:
1) fighters and Cruisers as fleet in the ratio 60 FTs to 1 CR. For example a good fleet for defense is 6000 FTs and 100 CRs
2) any turrets you can buy with shields (aim for the highest turret possible - early on disruptors if possible, later aim for the planetary rings). And don't build many shields - 1 batch maximum of each kind of shield. The idea is to hurt the invader Smile

Fertility is the amount of population you add when building Urban Structures.
As each building takes one people, you'll need a lot of people, and Urban Structures are getting very expensive.
Ex, Urban Structure level 20 cost you 3326 credits. But with a level 20 urban on a fertility 6 planet gives you a total of 20*6 = 120 people, whereas on a fertility 4 it gives you only 80 people.

A point for planet occupation, for each occupied planet you need one Command Center, so build some.

To occupy a planet, don't forget newbies have a 7 days protection
send corvettes or scouts to the nearby quadrants to seek acceptable targets (very low or no defense, no or small fleet).
You can only attack people who have account start > 7 and (their player level - your player level) %3c 10
When you find a target, send a sufficient fleet to conquer the base. In the beginning you should find people conquerable with a single corvette but soon you'll need more (some corvettes and destroyers).
Conquer the base.
Conquered bases give you credit by first pillage, then pillage once per day, and you take 30%25 of their economy.
Keep a small fleet above the planet, the occupied people will try to make fleets to free their planets. We call that 'popping debris' Wink

there are other rules about level of protection when you get into the higher degrees, but that's going to happen a lot later, so I'll not describe here

at first, have focused bases.
one for top science,
one for top ship building,
some just for econ (i.e. crystallines or asteroids)
and as you get high in each base's focus, start building up other aspects of that base.
put jump gate on your best shipyard bases...
your standard hybrid is a shipyard/research mix, but all bases should be making as much econ as they can, and should keep construction speeds up...
and don't forget defenses...

Why moons and not planets?
1) On a moon the costs for building planetary rings and planetary shields is a LOT less - believe me it's worth the extra cash you're saving
2) On a moon the cost of Bio Mod is a lot less - the same as above
3) Moons are not so searched for, as people hurry for the planets, so you're going to have a variety of moons to choose from Smile

You should choose planets and not moons ONLY when you have NO intention of upgrading. Planets offer you more space so they are more suitable for free accounts. However, in case you can't upgrade I advise you to contact other people who are upgraded and offer them something in return (in-game or in real-life), so that they upgrade your account too. Believe me, this game is worth to be played while upgraded Smile So beg from your parents, your spouse or from your siblings to get you upgraded Smile

repository: tectronics/Everyspace-Society

extension: markdown

repo_name: tectronics/Everyspace-Society


text:
## Install

**[NPM](https://www.npmjs.com/package/str.scss)**

```
npm install str.scss
```

**[Gist](https://gist.github.com/solovets/0021d71ba4871411481fb91f9a086103)**

[Github Gist](https://gist.github.com/solovets/0021d71ba4871411481fb91f9a086103) with all str.scss functions in one file.

## Usage

```scss
@import "~node_modules/str.scss/str";

$section-name: 'Hello World';

.#{str-to-lowercase(str-replace($section-name, ' ', '-'))} {
    &__title {
        &::after {
            content: str-to-uppercase($section-name)
        }
    }
}
```

Compiled to

```css
            .hello-world__title:after {
                content: "HELLO WORLD";
            }
```

license: MIT

branch_name: refs/heads/master

extension: md

license_type: permissive


text:
---
layout: post
title: Changing Requirements
category: blog
tag:
- 100 Words Challenge
---
Wednesday is usually the day we have our IPM (Iteration Planning Meeting) with our client to discuss what we achieved the week that passed by, but also make a plan on what to tackle next in the upcoming week. Today's IPM was quite interesting to me in the sense that I realized even more how difficult it is to predict complexity.

As with most projects, in the beginning it is common to start off by keeping things as simple as possible when adding features and building the end product. Ideally, this trend will continue even further down the line, however this is often not the case at all for one very simple reason. Changing requirements.

Changing requirements means you have to prepare yourself for the moment that all the good work you put into simplifying your program, is now deemed obsolete. You have to prepare yourself for the moment you realize that what was once useful and simple, is now an obstacle. You must prepare yourself to go past that feeling though and seek the best solution possible even if that means throwing away a bunch of code*.

The big lesson here though is that the best guard against a situation like this, which is very common not just in our industry, is to prepare yourself mentally and accept the fact that changes will happen. Reevaluating a situation constantly helps you stay on the right track and by doing so, you're bound to face changes. Learn to let go and always seek the best solution that you can provide as a response to those changes.

\* Less == More.

repository: Maikon/indigo

branch_name: refs/heads/gh-pages

repo_name: Maikon/indigo


text:
# [GoogleCodeJam 2009](https://codingcompetitions.withgoogle.com/codejam/archive/2009) ![Language](https://img.shields.io/badge/language-Python-orange.svg) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) ![Progress](https://img.shields.io/badge/progress-2%20%2F%2026-ff69b4.svg)

Python solutions of Google Code Jam 2009.

* [Qualification Round](https://github.com/kamyu104/GoogleCodeJam-2009#qualification-round)
* [Round 1A](https://github.com/kamyu104/GoogleCodeJam-2009#round-1a)
* [Round 1B](https://github.com/kamyu104/GoogleCodeJam-2009#round-1b)
* [Round 1C](https://github.com/kamyu104/GoogleCodeJam-2009#round-1c)
* [Round 2](https://github.com/kamyu104/GoogleCodeJam-2009#round-2)
* [Round 3](https://github.com/kamyu104/GoogleCodeJam-2009#round-3)
* [World Finals](https://github.com/kamyu104/GoogleCodeJam-2009#world-finals)

## Qualification Round
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---| ----- | -------- | ---- | ----- | ---------- | --- | ---- |

## Round 1A
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---| ----- | -------- | ---- | ----- | ---------- | --- | ---- |

## Round 1B
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---| ----- | -------- | ---- | ----- | ---------- | --- | ---- |

## Round 1C
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---| ----- | -------- | ---- | ----- | ---------- | --- | ---- |
|C| [Bribe the Prisoners](https://code.google.com/codejam/contest/189252/dashboard#s=p2&a=2)| [Python](./Round%201C/bribe-the-prisoners.py)| _O(Q^3)_ | _O(Q^2)_ | Easy | | DP |

## Round 2
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---| ----- | -------- | ---- | ----- | ---------- | --- | ---- |
|A| [Crazy Rows](https://code.google.com/codejam/contest/204113/dashboard#s=p0&a=0)| [Python](./Round%202/crazy-rows.py)| _O(N^2)_ | _O(N)_ | Easy | | Greedy |

## Round 3
| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---| ----- | -------- | ---- | ----- | ---------- | --- | ---- |

## World Finals

| # | Title | Solution | Time | Space | Difficulty | Tag | Note |
|---| ----- | -------- | ---- | ----- | ---------- | --- | ---- |


text:
---
layout: default
---

# 1997-10-18 - Re: Security flaws introduced by "other readers" in CMR

## Header Data

From: Adam Back<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 9e212c704f65f2f391dc0f85c3ab31ba2b14bed5b03eb05dabe05a51d0a01fed

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1997-10-18 21:29:21 UTC

Raw Date: Sun, 19 Oct 1997 05:29:21 +0800

## Raw message

```
{% raw  %}From: Adam Back<EMAIL_ADDRESS>Date: Sun, 19 Oct 1997 05:29:21 +0800
To<EMAIL_ADDRESS>Subject: Re: Security flaws introduced by "other readers" in CMR
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Greg Broiles<EMAIL_ADDRESS>writes:
> Adam Back writes:
> >You have a dual concern: you are trying to protect against big brother
> >and against little brother.
>
> At the technical level, is there a meaningful difference between the
> brothers?

I think so yes.  I think I am able to demonstrate situations where
there is a trade-off: you can trade government resistance against
little brother resistance.

PGP Inc's CMR I believe is a form of this; they have nice
recommendations for companies, statement of intents for plaintext
handling, and transparent statements of when email is a company
recoverable email address.

But way that they have implemented this functionality I believe could
be perverted for uses other than their intentions by governments.

I think this means that the resulting system has traded off weaker
government resistance to acheive marginally stronger little brother
resistance.  (I may even say no stronger little brother resistance, I
think CDR can acheive same functionality).

The best example I can think of is France.

The situation in France is: currently (or recently) you could not use
encryption at all without a license.  The enforcement rate is low to
zero.  (Jerome Thorel interviewed the head of SCSSI (NSA equivalent),
and they said that if you asked for a license for personal use they
would say "no", but if you didn't bother asking and used PGP2.x
anyway, they wouldn't do anything about it typically).

Now I understand the French have switched position: you can use
encryption without a license *provided* that it has master key access
for the government.

Lets say then that our aim is to design the OpenPGP standard and the
pgp5.5 implementation to be as resistant to use by the French
government as possibe.

With the pgp standard as is french government could insist that people
use pgp5.x.  pgp5.x provides a reasonablly useful framework for the
french government to adapt to be used as a master access system.

Because this will then be explicitly allowed, more people are likely
to use it.  (Current people using pgp2.x illegally are one suspects
the french cypherpunks subset of the population).  This means that the
french government can start to ramp up enforcement as there are less
objections (you _can_ protect confidentiality for business and privacy
uses, use this: pgp5.x).

If on the other hand pgp5.x were to use only single recipients for
confidentiality, and to base company recovery of encrypted mail
folders on key recovery information stored locally alongside the
mailbox the system would be less useful to the french government.

> Aren't we really talking about third-party access to communications,
> and second-party access to stored data ... with the "brother"
> distinction being one made at a social/political level, as a
> judgement about the legitimacy of the access or the size of the
> actor, rather than the character of the access?

It is more than that I think.

This is because many people acknowledge legitimacy of companies to a)
encrypt data b) to recover data in case employee forgets keys, or dies
unexpectedly.

Second party access to stored data is much less scary.  Little brother
can ultimately read _everything_ you do at work.  If he gets
suspicious he can install keyboard logger, keyboard password sniffer,
or concealed videocam whilst you are out of the office.  The best we
can do is discourage little brother from abusing systems designed for
data recovery as mass communications snooping.  The best suggestion I
have seen for this so far was Bill Stewart's suggestion to only store
recovery info for some of the bits.  Make the recovery process
artificially slow: say 40 bits.  Worth it for recovering main
developers design notes made in email when he dies unexpectedly.  Some
hinderance to little brother unless he is determined.  As long as this
hinderance is similar scale to other similar things little brother
could do to check up on suspicious user, you have achieved your goal
of hindering little brother.

Big brother is hindered very significantly if you do recovery locally,
rather than on the communications link as PGP Inc CMR does.  This is
because big brother does not have access to the ciphertext on disks.
He must come and take them.  Whereas for communications he can
practically acheive access to your email ciphertext at push button
convenience.

Your email communications are already secret split with the NSA: the
data is split into to unequally sized halves: the _key_ and the
_ciphertext_.  For this reason you really don't want the NSA to get
that key.

For data storage recovery, your data is again in two halves: you have
one, the _key_, your employee/you have the other, the _ciphertext_ on
disk.  Your employee can recover that info anyway.  The NSA can't
easily.  It is much more logistically expensive to collect or randomly
sample disk contents.

Adam
--
Now officially an EAR violation...
Have *you* exported RSA today? --> http://www.dcs.ex.ac.uk/~aba/rsa/

print pack"C*",split/\D+/,`echo "16iII*o\U@{$/=$z;[(pop,pop,unpack"H*",<>
)]}\EsMsKsN0[lN*1lK[d2%Sa2/d0<X+d*lMLa^*lN%0]dsXx++lMlN/dsM0<J]dsJxp"|dc`

{% endraw %}
```

## Thread

+ Return to [October 1997](/archive/1997/10)

+ Return to "[Adam Back <aba@dcs.ex.ac.uk>](/authors/adam_back_aba_at_dcs_ex_ac_uk_)"
+ Return to "[Fabrice Planchon <fabrice@math.Princeton.EDU>](/authors/fabrice_planchon_fabrice_at_math_princeton_edu_)"
+ Return to "[Greg Broiles <gbroiles@netbox.com>](/authors/greg_broiles_gbroiles_at_netbox_com_)"
+ Return to "[Tim May <tcmay@got.net>](/authors/tim_may_tcmay_at_got_net_)"
+ Return to "[TruthMonger <tm@dev.null>](/authors/truthmonger_tm_at_dev_null_)"
+ Return to "["William H. Geiger III" <whgiii@invweb.net>](/authors/william_h_geiger_iii_whgiii_at_invweb_net_)"

+ _Unknown thread root_
  + 1997-10-18 (Sat, 18 Oct 1997 17:59:25 +0800) - [Re: Security flaws introduced by "other readers" in CMR](/archive/1997/10/155e7f7e943af32a89810a815d63259574394534b071d3be1800de6763c5742c) - _Greg Broiles<EMAIL_ADDRESS>    + 1997-10-18 (Sun, 19 Oct 1997 05:29:21 +0800) - Re: Security flaws introduced by "other readers" in CMR - _Adam Back<EMAIL_ADDRESS>      + 1997-10-19 (Mon, 20 Oct 1997 02:04:00 +0800) - ["First do no harm"](/archive/1997/10/484e1af1d6e2e52940f970706101117d56dbe0b6a6cb74613cd3abecf978a17f) - _Tim May<EMAIL_ADDRESS>        + 1997-10-19 (Mon, 20 Oct 1997 04:05:59 +0800) - [Re: "First do no harm"](/archive/1997/10/c3abc303c70049b769e9b36637b83e5b34d38a50e1dc3d2341f1ce6ae97ee9dc) - _Tim May<EMAIL_ADDRESS>      + 1997-10-19 (Mon, 20 Oct 1997 03:32:12 +0800) - [Re: "First do no harm"](/archive/1997/10/80c7ab1f33a19b85b5705313c2d40a1aa68fcc2d2268dbbcb7ab437313872ef2) - _Fabrice Planchon<EMAIL_ADDRESS>    + 1997-10-19 (Sun, 19 Oct 1997 13:51:13 +0800) - [Re: Security flaws introduced by "other readers" in CMR](/archive/1997/10/13f65301ee65d54ff5521dfe68187959af263e97ec919f3190204cbc60d9b69d) - _Fabrice Planchon<EMAIL_ADDRESS>      + 1997-10-19 (Sun, 19 Oct 1997 17:36:43 +0800) - [Re: Security flaws introduced by "other readers" in CMR](/archive/1997/10/e65987984c223625af4f9034b4bf862ff9488b75ccfa18c3ec4e9c5b93db012a) - _Adam Back<EMAIL_ADDRESS>        + 1997-10-19 (Mon, 20 Oct 1997 00:58:10 +0800) - [Re: Security flaws introduced by "other readers" in CMR](/archive/1997/10/e2cfa00407cae91081e2cdf084e2e24dba15d861fe98afada91decd0b1af9725) - _"William H. Geiger III"<EMAIL_ADDRESS>      + 1997-10-19 (Mon, 20 Oct 1997 02:51:28 +0800) - [Re: Security flaws introduced by "other readers" in CMR](/archive/1997/10/d65064de660f90720bc95091b2ba476871023cd2dad742fb60f9784e6d940d61) - _Fabrice Planchon<EMAIL_ADDRESS>        + 1997-10-19 (Mon, 20 Oct 1997 05:58:35 +0800) - [Re: Security flaws introduced by "other readers" in CMR](/archive/1997/10/954f8b9cad0604a62295b858753bdf4641a104a4a1380633bffcb37ee41c30d1) - _Adam Back<EMAIL_ADDRESS>    + 1997-10-19 (Mon, 20 Oct 1997 01:01:34 +0800) - [Quantum Leaps in PGP](/archive/1997/10/36ecec0deaeb428790208edecc2ff1fb79bdc54dfb0d7c1fe0dd058499bb2f3e) - _TruthMonger<EMAIL_ADDRESS>

gha_license_id: MIT


text:
# react-redux-react-native-snippets-snippets package

Some snippets for React/React-Native and Redux for help you to be a faster developer. I try to make it really easy to remember.

Help for:
- React-Native-Router-Flux
- React-Router

More will coming soon.

# React

### `imr` Import React

```js
import React from 'react';
```

### `imrc` Import Component React

```js
import React, { Component } from 'react';
```

### `sl` Stateless Component

```js
const ${1} = () => (
  ${2}
);

export default ${1};
```

### `rrr` React-Router route

```js
<Route path="${1}" component={${2}} />
```

### `ed` Export Default

```js
export default ${1};
```

### `r` return

```js
return ${1};
```

### `rcc` class React component es6

```js
class ${1} extends Component {
  render() {
    return (
      ${2}
    );
  }
}

export default ${1};
```

---

## React Component Lifecycle

### `cwm` componentWillMount

```js
componentWillMount() {
  ${1}
}
```

### `cdm` componentDidMount

```js
componentDidMount() {
  ${1}
}
```

### `cwum` componentWillUnmount

```js
componentWillUnmount() {
  ${1}
}
```

### `cwu` componentWillUpdate

```js
componentWillUpdate() {
  ${1}
}
```

### `cdu` componentDidUpdate

```js
componentDidUpdate() {
  ${1}
}
```

---

# Redux

### 'ins' INITIAL_STATE

```js
const INITIAL_STATE = {
  ${1}
};
```

### `rrd` Redux Reducer

```js
export default (state = INITIAL_STATE, action) => {
  switch (action.type) {
    case ${1}:
    default:
      return state;
  }
};
```

### `rt` Redux Types

```js
export const ${1} = '${1}';
```

---

# React-Native

### `imrn` Import React-Native

```js
import { ${1} } from 'react-native';
```

### `rnvt` React-Native Text and View

```js
import {
  View,
  Text
} from 'react-native';
```

### `rnsc` React-Native scene

```js
<Scene
  key="${1}"
  title="${2}"
  component={${3}}
/>
```

gha_language: JavaScript


text:
# partymode
Party Mode code for Raspberry Pi

# Setup
* Install lightshowpi
* Install pm2
* Install usb audio: https://learn.adafruit.com/usb-audio-cards-with-a-raspberry-pi?view=all
* Install RPi.GPIO: https://sourceforge.net/p/raspberry-gpio-python/wiki/Home/

# Notes
* Raspberry Pi pinout: https://pi4j.com/1.2/pins/model-3b-rev1.html
* Which gpio pins are pulled up/down: https://elinux.org/RPi_BCM2835_GPIOs

repository: aruether/partymode

repo_name: aruether/partymode


text:
---
external help file: Elizium.Krayola-help.xml
Module Name: Elizium.Krayola
online version:
schema: 2.0.0
---

# Show-ConsoleColours

## SYNOPSIS

  Helper function that shows all the available console colours in the colour
  they represent. This will assist in the development of colour Themes.

## SYNTAX

```powershell
Show-ConsoleColours
```

## DESCRIPTION

Shows console colours.

## PARAMETERS

## INPUTS

### None

## OUTPUTS

### System.Object

## NOTES

## RELATED LINKS

[For assistance in obtaining a better console experience with Windows Terminal see Terminal Buddy](https://github.com/plastikfan/TerminalBuddy)

repository: OpenAnimationLibrary/Krayola

repo_name: OpenAnimationLibrary/Krayola


text:
# render

[license]: http://syntaqx.com/license/
[unrolled/render]: https://github.com/unrolled/render

Package render provides opinionated rendering helpers for JSON, XML, text,
binary data, and HTML templates.

> This package is primarily a wrapper around [unrolled/render][unrolled/render]
> with some added opinions.

## Installation

```
$ go get -u github.com/syntaqx/x/render
```

## License

Released under the [MIT license][license]


text:
# RainbowBar

Progress bar with wild animation for notched status bar. Automatic sizing (height and notch curves) according to device model. Powered by SwiftUI and Combine. Made just for fun and SwiftUI practice) Inspired by https://dribbble.com/shots/3824870-Loading-Animation-for-iPhone-X

![gif demo](https://github.com/DistilleryTech/RainbowBar/blob/master/demo.gif)

## Install

### CocoaPods

To integrate `RainbowBar` into your project add the following to your `Podfile`:

```ruby
platform :ios, '13.0'
use_frameworks!

pod 'RainbowBar'
```

## Usage

```swift
import SwiftUI
import Combine
import RainbowBar

var animatedSignal = PassthroughSubject<Bool, Never>()

RainbowBar(waveEmitPeriod: 0.3,
           visibleWavesCount: 3,
           waveColors: [.red, .green, .blue],
           backgroundColor: .white,
           animated: animatedSignal)

animatedSignal.send(true)
```

repository: TwoDollarsEsq/RainbowBar

repo_name: TwoDollarsEsq/RainbowBar


text:
spawn-error-forwarder [![Build Status](https://travis-ci.org/bendrucker/spawn-error-forwarder.svg?branch=master)](https://travis-ci.org/bendrucker/spawn-error-forwarder)
=====================

Emit errors on stdout stream for a spawned child process. Useful for capturing errors from a spawned process when you want the output from stdout.

## Setup
```bash
$ npm install spawn-error-forwarder
```

## API

#### `fwd(child [, errFactory]` -> `child`

Buffers `child.stderr` output. If the spawned process exits with a code `> 0`, the buffered output of `child.stderr` is used to generate an error which is emitted on `child.stdout`. By default, the error message is the output of `child.stderr`. If you provide an `errFactory` function, it will be called with `code, stderr` where `code` is the child's exit code and `stderr` is string that contains the output of `child.stderr`. `errFactory` should return an `Error` to be emitted on `child.stdout`.

## Example

```js
var fwd   = require('spawn-error-forwarder');
var spawn = require('child_process').spawn;
var child = spawn('git', ['log', 'non-existent-path']);

fwd(child, function (code, stderr) {
  return new Error('git log exited with ' + code + ':\n\n' + stderr);
});

child.stdout
  .on('error', console.error.bind(console))
  .pipe(process.stdout);
```

We want to pipe the output of `git log` to `process.stdout` but since we're providing a path that doesn't exist git will exit with a non-zero code and we'll log its output with `console.error`.


text:
# Mouse_Paint_001
Example mouse painting program
Save Frames and then use: https://imgflip.com/gif-maker?from=images
to make an animated GIF
Have fun

You could make the program save a frame every time you move the mouse
that would generate a very smooth animation with hundreds of frames.


text:
---
title: API Reference

language_tabs: # must be one of https://git.io/vQNgJ
  - shell
  - javascript

toc_footers:
  - Sign Up for a Developer Key
  - Documentation Powered by Slate

includes:
  - errors

search: true
---

# Introduction

The CareRelay API is a RESTful API that is designed to allow one to get, create, update, & delete objects with the HTTP verbs GET, POST, PUT, PATCH, & DELETE.

Making requests to API endpoints gives one everything needed to create new service requests, update/edit, schedule, complete, and bill for services.

## What is REST?

REST is acronym for REpresentational State Transfer. It is architectural style for distributed hypermedia systems and was first presented by Roy Fielding in 2000 in his famous dissertation.

Like any other architectural style, REST also does have it’s own 6 guiding constraints which must be satisfied if an interface needs to be referred as RESTful. These principles are listed below.

## Guiding Principles of REST

Client–server – By separating the user interface concerns from the data storage concerns, we improve the portability of the user interface across multiple platforms and improve scalability by simplifying the server components.

Stateless – Each request from client to server must contain all of the information necessary to understand the request, and cannot take advantage of any stored context on the server. Session state is therefore kept entirely on the client.

Cacheable – Cache constraints require that the data within a response to a request be implicitly or explicitly labeled as cacheable or non-cacheable. If a response is cacheable, then a client cache is given the right to reuse that response data for later, equivalent requests.

Uniform interface – By applying the software engineering principle of generality to the component interface, the overall system architecture is simplified and the visibility of interactions is improved. In order to obtain a uniform interface, multiple architectural constraints are needed to guide the behavior of components. REST is defined by four interface constraints: identification of resources; manipulation of resources through representations; self-descriptive messages; and, hypermedia as the engine of application state.

Layered system – The layered system style allows an architecture to be composed of hierarchical layers by constraining component behavior such that each component cannot “see” beyond the immediate layer with which they are interacting.

Code on demand (optional) – REST allows client functionality to be extended by downloading and executing code in the form of applets or scripts. This simplifies clients by reducing the number of features required to be pre-implemented.

### Resource

The key abstraction of information in REST is a resource. Any information that can be named can be a resource: a document or image, a temporal service, a collection of other resources, a non-virtual object (e.g. a person), and so on. REST uses a resource identifier to identify the particular resource involved in an interaction between components.

The state of resource at any particular timestamp is known as resource representation. A representation consists of data, metadata describing the data and hypermedia links which can help the clients in transition to next desired state.

The data format of a representation is known as a media type. The media type identifies a specification that defines how a representation is to be processed. A truly RESTful API looks like hypertext. Every addressable unit of information carries an address, either explicitly (e.g., link and id attributes) or implicitly (e.g., derived from the media type definition and representation structure).

According to Roy Fielding:

Hypertext (or hypermedia) mean the simultaneous presentation of information and controls such that the information becomes the affordance through which the user (or automaton) obtains choices and selects actions. Remember that hypertext does not need to be HTML (or XML or JSON) on a browser. Machines can follow links when they understand the data format and relationship types.

Further, resource representations shall be self-descriptive: the client does not need to know if a resource is employee or device. It should act on basis of media-type associated with resource. So in practice, you will end up creating lots of custom media-types – normally one media-type associated with one resource.

Every media type defines a default processing model. For example, HTML defines a rendering process for hypertext and the browser behavior around each element. It has no relation to the resource methods GET/PUT/POST/DELETE/… other than the fact that some media type elements will define a process model that goes like “anchor elements with an href attribute create a hypertext link that, when selected, invokes a retrieval request (GET) on the URI corresponding to the CDATA-encoded href attribute.”

### Resource Methods

Other important thing associated with REST is resource methods to be used to perform the desired transition. A large number of people wrongly relate resource methods to HTTP GET/PUT/POST/DELETE methods.

Roy Fielding has never mentioned any recommendation around which method to be used in which condition. All he emphasizes is that it should be uniform interface. If you decide HTTP POST will be used for updating a resource – rather than most people recommend HTTP PUT – it’s alright and application interface will be RESTful.

Ideally, everything that is needed to change the resource state shall be part of API response for that resource – including methods and in what state they will leave the representation.

A REST API should be entered with no prior knowledge beyond the initial URI (bookmark) and set of standardized media types that are appropriate for the intended audience (i.e., expected to be understood by any client that might use the API). From that point on, all application state transitions must be driven by client selection of server-provided choices that are present in the received representations or implied by the user’s manipulation of those representations. The transitions may be determined (or limited by) the client’s knowledge of media types and resource communication mechanisms, both of which may be improved on-the-fly (e.g., code-on-demand).
[Failure here implies that out-of-band information is driving interaction instead of hypertext.]

Another thing which will help you while building RESTful APIs is that query based API results should be represented by a list of links with summary information, not by arrays of original resource representations because query is not a substitute for identification of resources.

# Allowed HTTP Verbs List

HTTP defines a set of request methods to indicate the desired action to be performed for a given resource. The primary or most-commonly-used HTTP verbs (or methods, as they are properly called) are  `POST`, `GET`, `PUT`, `PATCH` and `DELETE`. There are a number of other verbs, too, but are utilized less frequently. All APIs MUST only use the verbs listed in the table below.

|  Method   | Action                                              |
|-----------|---------------------------------------------------------------------------------------------------|
|  `POST`   | Method requests the server to **create** a resource in the database                 |
|  `GET`  | Method **requests data** from the resource and should not produce any side effect         |
|  `PUT`  | Method requests the server to **update** resource or **create** the resource, if it doesn’t exist |
|  `PATCH`  | Method requests the server to **partially update** resource                     |
|  `DELETE` | Method requests that the resources, or its instance, **should be removed** from the database    |

# Authentication

> To authorize, use this code:

```ruby
require 'cri'

api = cri::APIClient.authorize!('carecaptain')
```

```python
import cri

api = cri.authorize('carecaptain')
```

```shell
# With shell, you can just pass the correct header with each request
curl "api_endpoint_here"
  -H "Authorization: carecaptain"
```

```javascript
const cri = require('cri');

let api = cri.authorize('carecaptain');
```

> Make sure to replace `carecaptain` with your API key.

CareRelay uses API keys to allow access to the API. You can register a new CareRelay API key at our [developer portal](http://carerelay.com/developers).

CareRelay expects for the API key to be included in all API requests to the server in a header that looks like the following:

`Authorization: carecaptain`

# Query Products/Services

## List Products/Services

> Example Request

```shell
curl "http://carerelay.com/api/carerelay"
  -H "Authorization: carecaptain"
```

```javascript
client.createCareRelay({
  name: 'example',
  description: 'An example CareRelay Request'
}, function(err, carerelay) {
  console.log(carerelay);
});
```

> The above command returns JSON structured like this:

```json
{
  "id": 152785,
  "num_rows": 1,
  "file_format": "json",
  "name": "Billing Account",
  "array": true,
  "columns": [
    {
      "name": "id",
      "null_percentage": 0,
      "type": "Row Number",
      "formula": ""
    },
    {
      "name": "first_name",
      "null_percentage": 0,
      "type": "First Name",
      "formula": ""
    },
    {
      "name": "last_name",
      "null_percentage": 0,
      "type": "Last Name",
      "formula": ""
    },
    {
      "name": "email",
      "null_percentage": 0,
      "type": "Email Address",
      "formula": ""
    },
    {
      "name": "gender",
      "null_percentage": 0,
      "type": "Gender",
      "formula": ""
    },
    {
      "name": "street",
      "null_percentage": 0,
      "type": "Street Address",
      "formula": ""
    },
    {
      "name": "city",
      "null_percentage": 0,
      "type": "City",
      "formula": ""
    },
    {
      "name": "province",
      "null_percentage": 0,
      "type": "State",
      "onlyUSPlaces": false,
      "formula": ""
    },
    {
      "name": "country",
      "null_percentage": 0,
      "type": "Country",
      "countries": [
        "Canada"
      ],
      "formula": ""
    },
    {
      "name": "postal_code",
      "null_percentage": 0,
      "type": "Postal Code",
      "formula": ""
    },
    {
      "name": "longitude",
      "null_percentage": 0,
      "type": "Longitude",
      "formula": ""
    },
    {
      "name": "latitude",
      "null_percentage": 0,
      "type": "Latitude",
      "formula": ""
    }
  ]
}
```

__This endpoint retrieves all Products/Services__

### HTTP Request

`GET http://carerelay.com/api/products`

Use GET requests to retrieve resource representation/information only – and not to modify it in any way. As GET requests do not change the state of the resource, these are said to be safe methods. Additionally, GET APIs should be idempotent, which means that making multiple identical requests must produce the same result every time until another API (POST or PUT) has changed the state of the resource on the server.

If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process.

For any given HTTP GET API, if the resource is found on the server then it must return HTTP response code 200 (OK) – along with response body in JSON content.

In case resource is NOT found on server then it must return HTTP response code 404 (NOT FOUND).

Similarly, if it is determined that GET request itself is not correctly formed then server will return HTTP response code 400 (BAD REQUEST).

### Query Parameters

Parameter | Default | Description
--------- | ------- | -----------
include_services | false | If set to true, the result will also include cats.
available | true | If set to false, the result will include kittens that have already been adopted.

## Get a Product/Service Details

```ruby
require 'cri'

api = cri::APIClient.authorize!('carecaptain')
api.kittens.get(2)
```

```python
import cri

api = cri.authorize('carecaptain')
api.kittens.get(2)
```

```shell
curl "http://carerelay.com/api/carerelay/2"
  -H "Authorization: carecaptain"
```

```javascript
const cri = require('cri');

let api = cri.authorize('carecaptain');
let max = api.kittens.get(2);
```

> The above command returns JSON structured like this:

```json
{
  "upfront_fare_enabled": false,
  "capacity": 4,
  "product_id": "a1111c8c-c720-46c3-8534-2fcdd730040d",
  "price_details": {
    "service_fees": [
      {
        "fee": 1.55,
        "name": "Booking fee"
      }
    ],
    "cost_per_minute": 0.22,
    "distance_unit": "mile",
    "minimum": 6.55,
    "cost_per_distance": 1.15,
    "base": 2,
    "cancellation_fee": 5,
    "currency_code": "USD"
  },
  "image": "http://d1a3f4spazzrp4.cloudfront.net/car-types/mono/mono-uberx.png",
  "cash_enabled": false,
  "shared": false,
  "short_description": "uberX",
  "display_name": "uberX",
  "product_group": "uberx",
  "description": "THE LOW-COST UBER"
}
```

__This endpoint retrieves a specific Product/Service__

### HTTP Request

`GET http://carerelay.com/api//{product_id}`

Use GET requests to retrieve resource representation/information only – and not to modify it in any way. As GET requests do not change the state of the resource, these are said to be safe methods. Additionally, GET APIs should be idempotent, which means that making multiple identical requests must produce the same result every time until another API (POST or PUT) has changed the state of the resource on the server.

If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process.

For any given HTTP GET API, if the resource is found on the server then it must return HTTP response code 200 (OK) – along with response body in JSON content.

In case resource is NOT found on server then it must return HTTP response code 404 (NOT FOUND).

Similarly, if it is determined that GET request itself is not correctly formed then server will return HTTP response code 400 (BAD REQUEST).

### URL Parameters

Parameter | Description
--------- | -----------
ID | The ID of the Product/Service to retrieve

# Query Price/Time

## Get Quotes/Price Estimates

```ruby
require 'cri'

api = cri::APIClient.authorize!('carecaptain')
api.kittens.delete(2)
```

```python
import cri

api = cri.authorize('carecaptain')
api.kittens.delete(2)
```

```shell
curl "http://carerelay.com/api/carerelay/2"
  -X DELETE
  -H "Authorization: carecaptain"
```

```javascript
const cri = require('cri');

let api = cri.authorize('carecaptain');
let max = api.kittens.delete(2);
```

> The above command returns JSON structured like this:

```json
{
  "prices": [
    {
      "localized_display_name": "POOL",
      "distance": 6.17,
      "display_name": "POOL",
      "product_id": "26546650-e557-4a7b-86e7-6a3942445247",
      "high_estimate": 15,
      "low_estimate": 13,
      "duration": 1080,
      "estimate": "$13-14",
      "currency_code": "USD"
    },
    {
      "localized_display_name": "uberX",
      "distance": 6.17,
      "display_name": "uberX",
      "product_id": "a1111c8c-c720-46c3-8534-2fcdd730040d",
      "high_estimate": 17,
      "low_estimate": 13,
      "duration": 1080,
      "estimate": "$13-17",
      "currency_code": "USD"
    },
    {
      "localized_display_name": "uberXL",
      "distance": 6.17,
      "display_name": "uberXL",
      "product_id": "821415d8-3bd5-4e27-9604-194e4359a449",
      "high_estimate": 26,
      "low_estimate": 20,
      "duration": 1080,
      "estimate": "$20-26",
      "currency_code": "USD"
    },
    {
      "localized_display_name": "SELECT",
      "distance": 6.17,
      "display_name": "SELECT",
      "product_id": "57c0ff4e-1493-4ef9-a4df-6b961525cf92",
      "high_estimate": 38,
      "low_estimate": 30,
      "duration": 1080,
      "estimate": "$30-38",
      "currency_code": "USD"
    },
    {
      "localized_display_name": "BLACK",
      "distance": 6.17,
      "display_name": "BLACK",
      "product_id": "d4abaae7-f4d6-4152-91cc-77523e8165a4",
      "high_estimate": 43,
      "low_estimate": 43,
      "duration": 1080,
      "estimate": "$43.10",
      "currency_code": "USD"
    },
    {
      "localized_display_name": "SUV",
      "distance": 6.17,
      "display_name": "SUV",
      "product_id": "8920cb5e-51a4-4fa4-acdf-dd86c5e18ae0",
      "high_estimate": 63,
      "low_estimate": 50,
      "duration": 1080,
      "estimate": "$50-63",
      "currency_code": "USD"
    },
    {
      "localized_display_name": "ASSIST",
      "distance": 6.17,
      "display_name": "ASSIST",
      "product_id": "ff5ed8fe-6585-4803-be13-3ca541235de3",
      "high_estimate": 17,
      "low_estimate": 13,
      "duration": 1080,
      "estimate": "$13-17",
      "currency_code": "USD"
    },
    {
      "localized_display_name": "WAV",
      "distance": 6.17,
      "display_name": "WAV",
      "product_id": "2832a1f5-cfc0-48bb-ab76-7ea7a62060e7",
      "high_estimate": 33,
      "low_estimate": 25,
      "duration": 1080,
      "estimate": "$25-33",
      "currency_code": "USD"
    },
    {
      "localized_display_name": "TAXI",
      "distance": 6.17,
      "display_name": "TAXI",
      "product_id": "3ab64887-4842-4c8e-9780-ccecd3a0391d",
      "high_estimate": null,
      "low_estimate": null,
      "duration": 1080,
      "estimate": "Metered",
      "currency_code": null
    }
  ]
}
```

This endpoint retrieves a specific Quote/Price

### HTTP Request

`GET http://carerelay.com/api/estimates/price`

Use GET requests to retrieve resource representation/information only – and not to modify it in any way. As GET requests do not change the state of the resource, these are said to be safe methods. Additionally, GET APIs should be idempotent, which means that making multiple identical requests must produce the same result every time until another API (POST or PUT) has changed the state of the resource on the server.

If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process.

For any given HTTP GET API, if the resource is found on the server then it must return HTTP response code 200 (OK) – along with response body in JSON content.

In case resource is NOT found on server then it must return HTTP response code 404 (NOT FOUND).

Similarly, if it is determined that GET request itself is not correctly formed then server will return HTTP response code 400 (BAD REQUEST).

### URL Parameters

Parameter | Description
--------- | -----------
ID | The ID of the kitten to delete

## Get Date/Time Estimates

```ruby
require 'cri'

api = cri::APIClient.authorize!('carecaptain')
api.kittens.delete(2)
```

```python
import cri

api = cri.authorize('carecaptain')
api.kittens.delete(2)
```

```shell
curl "http://carerelay.com/api/carerelay/2"
  -X DELETE
  -H "Authorization: carecaptain"
```

```javascript
const cri = require('cri');

let api = cri.authorize('carecaptain');
let max = api.kittens.delete(2);
```

> The above command returns JSON structured like this:

```json
{
  "times": [
    {
      "localized_display_name": "POOL",
      "estimate": 60,
      "display_name": "POOL",
      "product_id": "26546650-e557-4a7b-86e7-6a3942445247"
    },
    {
      "localized_display_name": "uberX",
      "estimate": 60,
      "display_name": "uberX",
      "product_id": "a1111c8c-c720-46c3-8534-2fcdd730040d"
    },
    {
      "localized_display_name": "uberXL",
      "estimate": 240,
      "display_name": "uberXL",
      "product_id": "821415d8-3bd5-4e27-9604-194e4359a449"
    },
    {
      "localized_display_name": "SELECT",
      "estimate": 240,
      "display_name": "SELECT",
      "product_id": "57c0ff4e-1493-4ef9-a4df-6b961525cf92"
    },
    {
      "localized_display_name": "BLACK",
      "estimate": 240,
      "display_name": "BLACK",
      "product_id": "d4abaae7-f4d6-4152-91cc-77523e8165a4"
    },
    {
      "localized_display_name": "SUV",
      "estimate": 240,
      "display_name": "SUV",
      "product_id": "8920cb5e-51a4-4fa4-acdf-dd86c5e18ae0"
    },
    {
      "localized_display_name": "ASSIST",
      "estimate": 300,
      "display_name": "ASSIST",
      "product_id": "ff5ed8fe-6585-4803-be13-3ca541235de3"
    },
    {
      "localized_display_name": "TAXI",
      "estimate": 480,
      "display_name": "TAXI",
      "product_id": "3ab64887-4842-4c8e-9780-ccecd3a0391d"
    }
  ]
}
```

This endpoint retrieves a specific Time/Date Estimate.

### HTTP Request

`GET http://carerelay.com/api/estimates/time`

Use GET requests to retrieve resource representation/information only – and not to modify it in any way. As GET requests do not change the state of the resource, these are said to be safe methods. Additionally, GET APIs should be idempotent, which means that making multiple identical requests must produce the same result every time until another API (POST or PUT) has changed the state of the resource on the server.

If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process.

For any given HTTP GET API, if the resource is found on the server then it must return HTTP response code 200 (OK) – along with response body in JSON content.

In case resource is NOT found on server then it must return HTTP response code 404 (NOT FOUND).

Similarly, if it is determined that GET request itself is not correctly formed then server will return HTTP response code 400 (BAD REQUEST).

### URL Parameters

Parameter | Description
--------- | -----------
ID | The ID of carerelay to delete

# Create Service Requests

## POST Service Requests

```ruby
require 'cri'

api = cri::APIClient.authorize!('carecaptain')
api.kittens.get
```

```python
import cri

api = cri.authorize('carecaptain')
api.kittens.get()
```

```shell
curl "http://carerelay.com/api/carerelay"
  -H "Authorization: carecaptain"
```

```javascript
const cri = require('cri');

let api = cri.authorize('carecaptain');
let kittens = api.kittens.get();
```

> The above command returns JSON structured like this:

```json
[
  {
    "id": 1,
    "name": "Fluffums",
    "breed": "calico",
    "fluffiness": 6,
    "cuteness": 7
  },
  {
    "id": 2,
    "name": "Max",
    "breed": "unknown",
    "fluffiness": 5,
    "cuteness": 10
  }
]
```

This endpoint retrieves all Products/Services.

### HTTP Request

`POST http://carerelay.com/api/requests`

### POST Service Request Details
Parameter | Default | Description
--------- | ------- | -----------
include_services | false | If set to true, the result will also include cats.
available | true | If set to false, the result will include kittens that have already been adopted.

## GET Service Request Details by ID

```ruby
require 'cri'

api = cri::APIClient.authorize!('carecaptain')
api.kittens.get(2)
```

```python
import cri

api = cri.authorize('carecaptain')
api.kittens.get(2)
```

```shell
curl "http://carerelay.com/api/carerelay/2"
  -H "Authorization: carecaptain"
```

```javascript
const cri = require('cri');

let api = cri.authorize('carecaptain');
let max = api.kittens.get(2);
```

> The above command returns JSON structured like this:

```json
{
  "id": 2,
  "name": "Max",
  "breed": "unknown",
  "fluffiness": 5,
  "cuteness": 10
}
```

This endpoint retrieves a specific Product/Service.

### HTTP Request

`GET http://carerelay.com/api/requests/{request_id}`

Use GET requests to retrieve resource representation/information only – and not to modify it in any way. As GET requests do not change the state of the resource, these are said to be safe methods. Additionally, GET APIs should be idempotent, which means that making multiple identical requests must produce the same result every time until another API (POST or PUT) has changed the state of the resource on the server.

If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the entity in the response and not the source text of the process, unless that text happens to be the output of the process.

For any given HTTP GET API, if the resource is found on the server then it must return HTTP response code 200 (OK) – along with response body in JSON content.

In case resource is NOT found on server then it must return HTTP response code 404 (NOT FOUND).

Similarly, if it is determined that GET request itself is not correctly formed then server will return HTTP response code 400 (BAD REQUEST).

### URL Parameters

Parameter | Description
--------- | -----------
ID | The ID of the Product/Service to retrieve

# Update/Edit or Cancel Service Requests

## Update Service Request

```ruby
require 'cri'

api = cri::APIClient.authorize!('carecaptain')
api.kittens.get
```

```python
import cri

api = cri.authorize('carecaptain')
api.kittens.get()
```

```shell
curl "http://carerelay.com/api/carerelay"
  -H "Authorization: carecaptain"
```

```javascript
const cri = require('cri');

let api = cri.authorize('carecaptain');
let kittens = api.kittens.get();
```

> The above command returns JSON structured like this:

```json
{
  "picture": "https://d1w2poirtb3as9.cloudfront.net/f3be498cb0bbf570aa3d.jpeg",
  "first_name": "Uber",
  "last_name": "Developer",
  "uuid": "f4a416e3-6016-4623-8ec9-d5ee105a6e27",
  "rider_id": "8OlTlUG1TyeAQf1JiBZZdkKxuSSOUwu2IkO0Hf9d2HV52Pm25A0NvsbmbnZr85tLVi-s8CckpBK8Eq0Nke4X-no3AcSHfeVh6J5O6LiQt5LsBZDSi4qyVUdSLeYDnTtirw==",
  "email"<EMAIL_ADDRESS>  "mobile_verified": true,
  "promo_code": "uberd340ue"
}
```

This endpoint retrieves all Products/Services.

### HTTP Request

`PATCH http://carerelay.com/api/requests/{request_id}`

HTTP PATCH requests are to make partial update on a resource. If you see PUT requests also modify a resource entity so to make it clearer – PATCH method is the correct choice for partially updating an existing resource and PUT should only be used if you’re replacing a resource in its entirety.

### POST Service Request Details
Parameter | Default | Description
--------- | ------- | -----------
include_services | false | If set to true, the result will also include cats.
available | true | If set to false, the result will include kittens that have already been adopted.

## Cancel Service Request

```ruby
require 'cri'

api = cri::APIClient.authorize!('carecaptain')
api.kittens.get(2)
```

```python
import cri

api = cri.authorize('carecaptain')
api.kittens.get(2)
```

```shell
curl "http://carerelay.com/api/carerelay/2"
  -H "Authorization: carecaptain"
```

```javascript
const cri = require('cri');

let api = cri.authorize('carecaptain');
let max = api.kittens.get(2);
```

> The above command returns JSON structured like this:

```json
{
  "picture": "https://d1w2poirtb3as9.cloudfront.net/f3be498cb0bbf570aa3d.jpeg",
  "first_name": "Uber",
  "last_name": "Developer",
  "uuid": "f4a416e3-6016-4623-8ec9-d5ee105a6e27",
  "rider_id": "8OlTlUG1TyeAQf1JiBZZdkKxuSSOUwu2IkO0Hf9d2HV52Pm25A0NvsbmbnZr85tLVi-s8CckpBK8Eq0Nke4X-no3AcSHfeVh6J5O6LiQt5LsBZDSi4qyVUdSLeYDnTtirw==",
  "email"<EMAIL_ADDRESS>  "mobile_verified": true,
  "promo_code": "uberd340ue"
}
```

This endpoint retrieves a specific Product/Service.

### HTTP Request

`DELETE http://carerelay.com/api/requests/{request_id}`

As the name applies, DELETE APIs are used to delete resources (identified by the Request-URI).

A successful response of DELETE requests SHOULD be HTTP response code 200 (OK) if the response includes an entity describing the status, 202 (Accepted) if the action has been queued, or 204 (No Content) if the action has been performed but the response does not include an entity.

DELETE operations are idempotent. If you DELETE a resource, it’s removed from the collection of resource. Repeatedly calling DELETE API on that resource will not change the outcome – however calling DELETE on a resource a second time will return a 404 (NOT FOUND) since it was already removed. Some may argue that it makes DELETE method non-idempotent.

If the request passes through a cache and the Request-URI identifies one or more currently cached entities, those entries SHOULD be treated as stale. Responses to this method are not cacheable.

### URL Parameters

Parameter | Description
--------- | -----------
ID | The ID of the Product/Service to retrieve

repository: paololavita/slate

repo_name: paololavita/slate


text:
# Requirements Specification
The project name: "Auto-Fan System"

This module sends IR signals in order to automate a fan which is controlled by a set of IR signals.

In a certain hours of a day, it decides to turn on or off of a fan on a following condition.

 - If humidity or temperature of the room is "high", then the module send a signal to make a fan turn on.

Otherwise, turn off for saving energy.

The settings for the conditions can be configured via web server running on the module. For example,

 - Let a fan work in what hours?
 - How high is the temperature or humidity to turn on?

In the html page, a fan can be turned on or be changed the power manually.

It should be permanently connected the household router in order to perform the web application.

## How to use
 - Set the module so IR signals properly sent to the fan
 - Plug a microUSB power supply into the module
 - Set SSID and its password of the home router
 - Modify configuration if needed.

## Components
 - A NodeMCU development board
    - A Wifi module which is pre-installed on the board
 - An IR signal emitter
 - A temprature and humidity sensor module

## Constraints
 - On and off signal might be same as a fan toggles the on and off states.
 - Similarly, changing the power of a fan might be done by the same signal.
 - 5V power supply with MicroUSB is needed.
 - The number of analog inputs of the NodeMCU is only one.
 - It can not learn the IR signal so it works with one specific model.

repository: hrtune/internet-of-things-project

branch_name: refs/heads/main

repo_name: hrtune/internet-of-things-project


text:
+++
title = "A latent variable model for maximal performance testing with dropouts for military applications"

# Talk start and end times.
#   End time can optionally be hidden by prefixing the line with `#`.
date = 2020-11-19T14:30:00
date_end = 2020-11-19T15:30:00
all_day = false

# Schedule page publish date (NOT talk date).
publishDate = 2017-01-01T00:00:00

# Authors. Comma separated list, e.g. `["Bob Smith", "David Jones"]`.
authors = ["Haziq Jamil"]

# Location of event.
location = "Lecture Room 2 (D2.8), Block D, Integrated Science Building, UBD"

# Name of event and optional event URL.
event = "Institute of Applied Data Analysis (IADA) Seminar"
event_url = ""

# Abstract. What's your talk about?
abstract = "Soldiers are expected to perform complex and demanding tasks during operations, often while carrying a heavy load. It is therefore important for commanders to understand the relationship between load carriage and soldiers’ performance, as such knowledge helps inform decision-making on training policies, operational doctrines, and future soldier systems requirements. In order to investigate this, repeated experiments were conducted to capture key soldier performance parameters under controlled conditions. The data collected was found to contain missing values due to dropouts as well as non-measurement. We propose a Bayesian structural equation model to quantify a latent variable representing soldiers’ abilities, while taking into consideration the non-random nature of the dropouts and time-varying effects. This talk describes the modelling exercise conducted, emphasising the statistical model-building process as well as the practical reporting of the outputs of the model."

# Summary. An optional shortened abstract.
summary = ""

# Is this a featured talk? (true/false)
featured = false

# Tags (optional).
#   Set `tags = []` for no tags, or use the form `tags = ["A Tag", "Another Tag"]` for one or more tags.
tags = ["Latent Variable Models", "Structural Equation Models"]

# Markdown Slides (optional).
#   Associate this talk with Markdown slides.
#   Simply enter your slide deck's filename without extension.
#   E.g. `slides = "example-slides"` references
#   `content/slides/example-slides.md`.
#   Otherwise, set `slides = ""`.
slides = ""

# Optional filename of your slides within your talk folder or a URL.
url_slides = ""

# Projects (optional).
#   Associate this talk with one or more of your projects.
#   Simply enter your project's folder or file name without extension.
#   E.g. `projects = ["deep-learning"]` references
#   `content/project/deep-learning/index.md`.
#   Otherwise, set `projects = []`.
projects = []

# Links (optional).
url_pdf = ""
url_video = ""
url_code = ""
links = []
#[{name = "See Also", url = "http://socialstats.haziqj.ml" }]

# Demo talk page uses LaTeX math.
math = true

# Featured image
# To use, add an image named `featured.jpg/png` to your page's folder.
[image]
  # Caption (optional)
  caption = ""

  # Focal point (optional)
  # Options: Smart, Center, TopLeft, Top, TopRight, Left, Right, BottomLeft, Bottom, BottomRight
  focal_point = ""
+++

## Links

- [An interactive visualisation of Bayesian inference](https://rpsychologist.com/d3/bayes/)
- [MCMC demo](https://github.com/chi-feng/mcmc-demo)

## References

- Bollen, K. A. (1989). *Structural Equations with Latent Variables. John Wiley & Sons.* ISBN: 978-0-471-01171-2. DOI: [10.1002/9781118619179](https://doi.org/10.1002/9781118619179).
- Denwood, M. (2016). *runjags: An R Package Providing Interface Utilities, Model Templates, Parallel Computing Methods and Additional Distributions for MCMC Models in JAGS.* Journal of Statistical Software 71.9, pp. 1–25. DOI: [10.18637/jss.v071.i09](https://doi.org/10.18637/jss.v071.i09).
- Edwards, J. R. and R. P. Bagozzi (2000). *On the nature and direction of relationships between constructs and measures.* Psychological methods 5.2, p. 155.
- Hafez, M. S., I. Moustaki, and J. Kuha (2015). *Analysis of multivariate longitudinal data subject to nonrandom dropout.* Structural Equation Modeling: A Multidisciplinary Journal 22.2, pp. 193–201.
- Kruschke, J. K. (2014). *Doing Bayesian Data Analysis: A tutorial with R, JAGS, and Stan.* Second Edition. Boston: Academic Press. ISBN: 978-0-12-405888-0.
- Rabe-Hesketh, S. and A. Skrondal (2008). *Multilevel and longitudinal modeling using Stata.* STATA press.

## Sample code in JAGS

```r
model{
  for (i in 1:N) {
    for (k in 1:p_phy) {  # Physical
      y_phy[i,k] ~ dnorm(a_phy[k] + b_phy[k] * Phy[i], 1/v_phy[k])
    }
    for (k in 1:p_cgn) {  # Cognitive
      y_cgn[i,k] ~ dnorm(a_cgn[k] + b_cgn[k] * Cgn[i], 1/v_cgn[k])
    }
    for (k in 1:p_cmb) {  # Combatant
      y_cmb[i,k] ~ dnorm(a_cmb[k] + b_cmb[k] * Cmb[i], 1/v_cmb[k])
    }

    Phy[i] ~ dnorm(a_Phy + b_Phy * Abl[i], 1/v_Phy)
    Cgn[i] ~ dnorm(a_Cgn + b_Cgn * Abl[i], 1/v_Cgn)
    Cmb[i] ~ dnorm(a_Cmb + b_Cmb * Abl[i], 1/v_Cmb)

    Abl[i] ~ dnorm(a_Abl, 1/v_Abl)
  }

  # Priors ---------------------------------------------------------------------
  a_phy[1] ~ dnorm(0,1e-3)
  b_phy[1] <- 1
  for(k in 2:p_phy) {
    a_phy[k] ~ dnorm(0,1e-3)
    b_phy[k] ~ dnorm(0,1e-2)
  }
  for(k in 1:p_phy) {
    sd_phy[k] ~ dgamma(1,.5)
    v_phy[k]  <- pow(sd_phy[k],2)
  }

  a_cgn[1] ~ dnorm(0,1e-3)
  b_cgn[1] <- 1
  for(k in 2:p_cgn) {
    a_cgn[k] ~ dnorm(0,1e-3)
    b_cgn[k] ~ dnorm(0,1e-2)
  }
  for(k in 1:p_cgn) {
    sd_cgn[k] ~ dgamma(1,.5)
    v_cgn[k]  <- pow(sd_cgn[k],2)
  }

  a_cmb[1] ~ dnorm(0,1e-3)
  b_cmb[1] <- 1
  for(k in 2:p_cmb) {
    a_cmb[k] ~ dnorm(0,1e-3)
    b_cmb[k] ~ dnorm(0,1e-2)
  }
  for(k in 1:p_cmb) {
    sd_cmb[k] ~ dgamma(1,.5)
    v_cmb[k]  <- pow(sd_cmb[k],2)
  }

  a_Phy <- 0
  a_Cgn <- 0
  a_Cmb <- 0
  a_Abl <- 0

  b_Phy <- 1
  b_Cgn ~ dnorm(0,1e-2)
  b_Cmb ~ dnorm(0,1e-2)

  sd_Phy ~ dgamma(1,.5)
  v_Phy <- pow(sd_Phy,2)
  sd_Cgn ~ dgamma(1,.5)
  v_Cgn <- pow(sd_Cgn,2)
  sd_Cmb ~ dgamma(1,.5)
  v_Cmb <- pow(sd_Cmb,2)
  sd_Abl ~ dgamma(1,.5)
  v_Abl <- pow(sd_Abl,2)
}
```

repository: haziqj/academic-kickstart

repo_name: haziqj/academic-kickstart


text:
#pillar

This is a memorial pillar, that is, simply a large stone or boulder set up on its end.

#poured oil upon the top of it

This action symbolizes that Jacob is dedicating the pillar to God. This can be stated explicitly. AT: "poured oil on the top of it in order to dedicate the pillar to God" (See: [[:en:ta:vol2:translate:translate_symaction]] and [[:en:ta:vol1:translate:figs_explicit]])

#Bethel

Translators may also add a footnote that says "The name Bethel means 'house of God.'"

#Luz

This is the name of a city. (See: [[:en:ta:vol1:translate:translate_names]])


text:
Plan for ACA project
====================

- Focus on one use-case
    - one class classification
    - RBF kernel

- Prune not necessary code from libsvm (?)

- Dataset test cases, which take more advantages from parallelization?
    - Columns >> rows
    - Rows >> columns
    - Columns ~= Rows

Profiling
---------

- Use gprof (some other tool?) to analize:
    - call graph
        - find some graphic to visualize it
    - most time consuming functions

- Insert hook for time measuring
    - around time consuming functions
    - inside most TC part of these functions

- Call graph: at which level the parallelization is applicable?

- Dependencies analisys

- Figure out which are parallelizable

Hypothesis
----------

- Given a parallelizable candidate:
    - Estimate improvement based on threads # and cache size
    - Is it worth it?

gha_language: Java


text:
---
layout: default
title: FillHoles
nav_order: 2
nav_exclude: true
---

# FileHoles
{: .no_toc }

{: .fs-6 .fw-300 }

### Table of contents
{: .no_toc .text-delta }

1. TOC
{:toc}

---

Example link [link](https://google.co.uk)

## Site logo

```yaml
# Set a path/url to a logo that will be displayed instead of the title
logo: "/assets/images/just-the-docs.png"
```

matlab examples

```matlab
disp(test)
```


text:
---
title: Pipeline configuration
subtitle: How configure Nextflow to work on your system
---

One of the strongest features of Nextflow is that it can run on virtually any computational infrastructure.
It has built-in support for HPC execution schedulers such as Slurm, SGE, PBS, LSF and more as well as cloud compute infrastructure such as AWS Batch and Google Cloud.

In order to get nf-core pipelines to run properly on your system, you will need to configure Nextflow so that it knows how best to run your analysis jobs.
Each nf-core pipeline comes with "sensible defaults" for every configuration option. These are then overwritten as needed.

**You do not need to edit the pipeline code to configure nf-core pipelines.**
If you edit the pipeline defaults then you cannot update to more recent versions of the pipeline without overwriting your changes.
You also run the risk of moving away from the canonical pipeline and losing reproducibility.

Pipelines have configuration "profiles" that can be enabled with the command line flag `-profile`.
Multiple profiles can be specified in a comma-separated list.
Alternatively, you can create your own configuration files and supply these to the pipeline when running.

There are three main types of pipeline configuration that you can use:

1. [Basic pipeline configuration profiles](#basic-configuration-profiles)
2. [Shared _nf-core/configs_ configuration profiles](#shared-nf-coreconfigs)
3. [Custom configuration files](#custom-configuration-files)

Note that most users will need to specify an "executor" - telling Nextflow how to submit jobs to a job scheduler (_e.g._ SGE, LSF, SLURM, PBS, AWS Batch _etc._).
This can be done within share configuration profiles or in custom configuration files.
For more information on how to specify an executor, please refer to the [Nextflow documentation](https://www.nextflow.io/docs/latest/executor.html#executor-page).

## Basic configuration profiles

Every nf-core pipeline comes with the config profiles `docker`, `singularity` and `conda`.
Running with these profiles will instruct the pipeline to use the relevant software packaging method.

## Shared nf-core/configs

If you use a shared system with other people, it is best to use a configuration profile from [nf-core/configs](https://github.com/nf-core/configs).
These are shared config profiles loaded by all nf-core pipelines at run time.

You may find that your system already has a shared profile available here (see [https://github.com/nf-core/configs](https://github.com/nf-core/configs)).
If not, please follow the instructions in the repository readme to add your cluster.

## Custom configuration files

If you are the only person to be running this pipeline, you can create a local config file and use this.
Nextflow looks for these files in three locations:

1. User's home directory: `~/.nextflow/config`
2. Analysis working directory: `nextflow.config`
3. Custom path specified on the command line: `-c path/to/config` (multiple can be given)

Configuration parameters are loaded one after another and overwrite previous values.
Hardcoded pipeline defaults are first, then the user's home directory, then the work directory,
then every `-c` file in the order supplied, and finally command line `--parameter` options.

See the [Nextflow documentation](https://www.nextflow.io/docs/latest/config.html) for more information about configuration syntax and available parameters.


text:
### [CVE-2021-29842](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-29842)
![](https://img.shields.io/static/v1?label=Product&message=WebSphere%20Application%20Server%20Liberty&color=blue)
![](https://img.shields.io/static/v1?label=Product&message=WebSphere%20Application%20Server&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=Obtain%20Information&color=brighgreen)

### Description

IBM WebSphere Application Server 7.0, 8.0, 8.5, 9.0 and Liberty <IP_ADDRESS> through <IP_ADDRESS> could allow a remote user to enumerate usernames due to a difference of responses from valid and invalid login attempts. IBM X-Force ID: 205202.

### POC

#### Reference
No PoCs from references.

#### Github
- https://github.com/ARPSyndicate/cvemon
- https://github.com/kaje11/CVEs

repository: trickest/cve

gha_language: HTML

repo_name: trickest/cve


text:
---
layout: post
title: Updating your local branch after getting GitHub suggestions
categories: [github]
tags: [git]
---

GitHub has a useful feature to add code change suggestions right in the web UI.

This is great. But then what if you want to continue editing locally? Here is
some code to help you do that, starting from making the initial pull request.

```
git checkout -b new-branch

# ...Make changes

git add files-changed.txt
git commit -m "Changed files"
git push origin new-branch

# On GitHub some suggestions are made

git fetch

git checkout new-branch
git pull main new-branch
```

gha_license_id: NOASSERTION


text:
# Facebook
This folder contains the extension implementation for
[Facebook](https://about.fb.com/news/tag/data-portability/).

## Data Supported
Facebook currently supports export of the following data types:

 - Photos
 - Videos
 - Social Posts 1
 - Notes 1

1 Please contact the Facebook team at [dataportability<EMAIL_ADDRESS>if you are interested in developing with these data types.

## Current State

 - Photos and Videos export can be [run and tested locally](../../../Documentation/RunningLocally.md)
 - Social Posts and Notes are not yet available as open source, but are coming soon

## Development and Access

Follow the [Developer Guide](../../../Documentation/Developer.md) for setting up your environment, and to find out how to get general support.

### Create a Facebook app
Before getting started, you will need a [Facebook App](https://developers.facebook.com/apps), and you will need to request the required [permissions](https://developers.facebook.com/docs/permissions/reference) as per the data type.

### Permissions

- Photos export - [user_photos](https://developers.facebook.com/docs/permissions/reference/user_photos/)
- Videos export - [user_videos](https://developers.facebook.com/docs/permissions/reference/user_videos/)
- Posts export - [user_posts](https://developers.facebook.com/docs/permissions/reference/user_posts/)
- Notes export - [user_posts](https://developers.facebook.com/docs/permissions/reference/user_posts/)

### Keys & Auth
Facebook uses OAuth 2 for authorization.

Under your Facebook app's Settings (Basic), you can find the _App ID_ and _App Secret_, which you can use as the OAuth `App Key` and `Secret` for authentication, as described in [Keys](../../../Documentation/Keys.md).

## Support

For any technical support or if you are interested in partnering with Facebook under DTP, please reach out to [dataportability@fb.com](mailto:dataportability@fb.com).

## Maintained By

The Facebook extension was created and maintained by the
[DTP<EMAIL_ADDRESS>(this includes developers from Facebook).

repository: google/data-transfer-project

repo_name: google/data-transfer-project


text:
# Introduction

A _**dictionary**_ is Python's primary mapping type that associates a _hashable key_ with a value. The lookup by key is more efficient than searching through an array, but does require more memory.

## Dict construction

Dictionaries can be created in various ways. Two simple options are the use the `dict()` class constructor or the dict literal declaration with key-value pairs.

### Use the `dict()` constructor

```python
>>> bear = dict(name="Black Bear", speed=40, land_animal=True)
{'name': 'Black Bear', 'speed': 40, 'land_animal': True}
```

### Declare a _dict_ literal

```python
>>> whale = {"name": "Blue Whale", "speed": 35, "land_animal": False}
{'name': 'Blue Whale', 'speed': 35, 'land_animal': False}
```

With the dict literal declaration keep in mind that _keys_ are of _data types_ `str` and the colon `:` is used instead of an equal sign `=`.

## Accessing values

You can access an item in a dictionary using the _key_ of the value.

### Using _square brackets_ after the dict object

```python
>>> bear["speed"]
40
```

### Using `.get()`

```python
>>> whale.get("name")
'Blue Whale'
```

## Changing values

You can easily change a value of an item using its _key_.

```python
>>> bear["name"] = "Grizzly Bear"
{'name': 'Grizzly Bear', 'speed': 40, 'land_animal': True}

>>> whale["speed"] = 25
{'name': 'Blue Whale', 'speed': 25, 'land_animal': False}
```

## Deleting values using keys

You can delete an item from a dictionary using `dict.pop(<key>)`. This will remove the (`key`, `value`) pair from the dictionary and return the `value` for use. `dict.pop(<key>)` accepts second argument, `default` that is returned if the `key` is not found  (`dict.pop(<key>, <default>)`). Otherwise, a `KeyError` will be raised for any `key` that is missing.

```python
>>> bear.pop("name")
'Grizzly Bear'
>>> bear.pop("name", "Unknown")
'Unknown'
>>> bear.pop("name")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
KeyError: 'name'
```

## Looping through a dictionary

Looping through a dictionary using `for item in dict` will iterate over the _keys_, but you can access the _values_ by using _square brackets_.

```python
>>> for key in bear:
>>>     (key, bear[key])
('name', 'Black Bear')
('speed', 40)
('land_animal', True)
```

repository: wonhyeongseo/python

gha_language: Python

repo_name: wonhyeongseo/python


text:
Nix xcode tests
===============

This package contains a simple tutorial case, taken from Apple's iOS tutorial:
[http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphone101/Articles/00_Introduction.html](http://developer.apple.com/library/ios/#documentation/iphone/conceptual/iphone101/Articles/00_Introduction.html)
to the test the `xcodeenv.buildApp {}` function that can be used with the
[Nix package manager](http://nixos.org/nix) to build iOS apps. Additionally, it
can be used with `xcodeenv.simulateApp {}` to generate a script that
automatically starts an iOS app.

Apart from the tutorial, it has two additions:

* It implements an iPad storyboard (the process is the same as for an iPhone
  storyboard), so that it can be tested for iPad devices
* It contains some very ugly icons (created myself :-) ), to allow releases to
  pass validation

Prerequisites
=============
In order to run the examples, you must have the
[Nix package manager](http://nixos.org/nix) installed and a copy of
[Nixpkgs](http://nixos.org/nixpkgs). Consult the Nix manual for more details on
this.

Usage
=====
There are two ways to build the example app through Nix. One option is to use the
iPhone simulator which is the most convenient way of trying this out. It does not
require any signing.

In order to test the app on an Apple device or release it to the App store, you
must obtain a certficate and mobile provisioning profile from Apple's developer
portal and sign the app with it.

Building the app for the simulator
----------------------------------
A debug app for the iPhone simulator can be built by entering the `deployment/`
directory and by running:

```bash
nix-build -A helloworld
```

By editing the `helloworld/default.nix` Nix expression and by enabling the
release parameter, a release can be built. In order to do this you need
a distribution certificate and provisioning profile from Apple. The paths
to the keys must be adapted to suit your environment.

Running the app in the iOS simulator
------------------------------------
We can also automatically start a simulator instance running the app.
When building the simulate job and running the resulting script:

```bash
$ nix-build -A simulate_helloworld
$ ./result/bin/run-test-simulator
```

You are asked to select an iOS simulator instance (by its UDID) and for
confirmation when the simulator has actually started. Finally, the app is
installed and launched automatically.

For convenience, the UDID of the simulator instance can also be provided as a
command-line parameter so that there is only little user interaction needed:

```bash
$ ./result/bin/run-test-simulator 9611697B-6F21-4479-AF74-4FA2DEEF06EE
```

Defining build variability points
---------------------------------
By default, the example case has been configured to use the latest version of
Xcode that resides in the default location on the filesystem and the latest
version of the iPhone SDKs.

These values can be overridden by setting a number of parameters, e.g.:

```bash
$ nix-build --argstr xcodeVersion 6.0.1 \
  --argstr xcodeBaseDir "/Applications/Xcode.app" \
  --argstr sdkVersion 8.0 \
  -A helloworld
```

The above parameters specify that Xcode version 6.0.1 should be used that can be
found in `/Applications/Xcode.app` on the filesystem. The iPhone SDK version 8.0
should be used for building.

Building the app for a device or for release
--------------------------------------------
Building the app for a real Apple device or for the App store is more
complicated, since Apple's permissions are required for that.

For testing purposes, you can 'rename' this example app and use the certificate
and mobile provisioning profile of an existing app to produce an IPA archive that
can be deployed to any Apple device that has been granted permissions to run it.

The composition expression `default.nix` contains a collection of extra
parameters that can be set to accomplish that. When setting the `rename`
parameter to `true` and setting a collection of additional parameters:

```bash
$ nix-build --arg rename true \
  --argstr newName "Renamed" \
  --argstr newId "renamedapp" \
  --argstr newDomain "com.example" \
  --argstr newCompanyName "My Renamed Company" \
  --argstr newTeamName "ABCD1234" \ # Should match team identifier in the certificate name
  --arg ipaCertificateFile /path/to/certificate.p12 \
  --argstr ipaCertificatePassword secret \
  --argstr ipaCodeSignIdentity "iPhone Distribution: My Renamed Company (ABCD1234)" \
  --arg ipaProvisioningProfile /path/to/provisioning.mobileprovision \
  --arg xcArchiveCertificateFile /path/to/certificate.p12 \
  --argstr xcArchiveCertificatePassword secret \
  --argstr xcArchiveCodeSignIdentity "iPhone Distribution: My Renamed Company (ABCD1234)" \
  --arg xcArchiveProvisioningProfile /path/to/provisioning.mobileprovision \
  --argstr signMethod "ad-hoc" \ # or: 'enterprise', 'app-store'
  -A renamedPkgs.renamedapp_ipa
```

a sub attribute set called `renamedPkgs` is generated referring to an app that
has renamed several of its standard properties to those provided by the `new*`
parameters.  The `new*` parameters should be changed to match those in your
certificate and mobile provisioning profile.

To find out what they are, use the Keychain to inspect the certificate (p12 file)
and Xcode (or a text editor) to inspect the mobile provisioning profile.

The resulting IPA file can actually be deployed to an Apple device if all
attributes are set correctly.

Enabling wireless ad-hoc distributions of iOS apps
--------------------------------------------------
It is also possible to do automatic installs of ad-hoc IPA files from Hydra, the
Nix-based continuous integration server.

To allow users to do such tasks, we must add a forwarding HTML page build product
to a build and install a couple of PHP scripts on the Hydra server generating a
plist configuration file.

By adding a number of extra parameters to the previous composition expression,
such as `enableWirelessDistribution`, we can generate the forwarding HTML page
build product and provide all relevant settings for generating a plist file:

```bash
$ nix-build --arg rename true \
  --argstr newName "Renamed" \
  --argstr newId "renamedapp" \
  --argstr newDomain "com.example" \
  --argstr newCompanyName "My Renamed Company" \
  --argstr newTeamName "ABCD1234" \ # Should match team identifier in the certificate name
  --arg ipaCertificateFile /path/to/certificate.p12 \
  --argstr ipaCertificatePassword secret \
  --argstr ipaCodeSignIdentity "iPhone Distribution: My Renamed Company (ABCD1234)" \
  --arg ipaProvisioningProfile /path/to/provisioning.mobileprovision \
  --arg xcArchiveCertificateFile /path/to/certificate.p12 \
  --argstr xcArchiveCertificatePassword secret \
  --argstr xcArchiveCodeSignIdentity "iPhone Distribution: My Renamed Company (ABCD1234)" \
  --arg xcArchiveProvisioningProfile /path/to/provisioning.mobileprovision \
  --argstr signMethod "ad-hoc" \ # or: 'enterprise', 'app-store'
  --arg enableWirelessDistribution true \
  --argstr installURL "/installipa.php" \
  --argstr bundleId "com.mycoolcompany.renamed" \
  --argstr appVersion "1.0" \
  -A renamedPkgs.renamedapp_ipa
```

We have also configured an `installURL`, which is a PHP script responsible for
doing the generation.

repository: viteinfinite/nix-xcodeenvtests

repo_name: viteinfinite/nix-xcodeenvtests


text:
## Quickstart

### Build

Run `mvn clean package`

### Run

Run `java -jar log2elastic-0.0.1-SNAPSHOT.jar` FOLDER_LOGS [--elastic5]

* FOLDER_LOGS: folder where the logs file are
* --elastic5: by default application use elasticsearch7 syntax to load logs, use this option if you want to load logs on elasticsearch5

### Configuration

At the moment some configurations are "code" side.

Set in `Application.java`
* GAMEID: gameId of the event to insert into ElasticSearch
* PREFIX_PROCESSED_FILE: a prefix for `gamification.stats.log` files

```
 private static final String PREFIX_PROCESSED_FILE = "NEW-";
 private static final String GAMEID = "";
```

Set in `ESHelper.java`
* ELASTIC_URL: endpoint of elastic server
* INDEX_PREFIX: prefix for index name

```
 private static final String ELASTIC_URL = "http://localhost:9200";
 private static final String INDEX_PREFIX = "gamification-stats-";
```


text:
# Thrifty

Tired of manually regenerating your Thrift interface code every time
the definition changes? Thrifty manages your Thrift interface
definitions behind the scenes.

## Usage

```ruby
require 'thrifty'
Thrifty.register('my_interface.thrift')

Thrifty.require('generated_service')
GeneratedService.do_things
```

See the examples directory for a complete working example.

## Caveats

You must have a working thrift compiler on your PATH. (That is, you
should be able to just type 'thrift'.) Thrifty does not currently
statically check that this is the case.

## TODO

- Add a precompile mode, similar to how the Rails asset pipeline
  works.
- Statically ensure there's a thrift compiler on the PATH.
- Autorequire of all generated Thrift files?

repository: jeremydhoon/thrifty

repo_name: jeremydhoon/thrifty


text:
---
layout: default
---

# 1997-04-12 - Bloated Economies

## Header Data

From: "Timothy C. May"<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: 35384061a74f5033b8c86581240fb403f2877b3e67b22f047ba2be70d0dc1dd6

Message ID<EMAIL_ADDRESS>Reply To: _N/A_

UTC Datetime: 1997-04-12 08:54:58 UTC

Raw Date: Sat, 12 Apr 1997 01:54:58 -0700 (PDT)

## Raw message

```
{% raw  %}From: "Timothy C. May"<EMAIL_ADDRESS>Date: Sat, 12 Apr 1997 01:54:58 -0700 (PDT)
To<EMAIL_ADDRESS>Subject: Bloated Economies
Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

Totohomo has been a source of endless
embarassments to his sympathizers on and off the net.

    o   \ o /  _ o         __|    \ /     |__        o _  \ o /   o
   /|\    |     /\   ___\o   \o    |    o/    o/__   /\     |    /|\
   / \   / \   | \  /)  |    ( \  /o\  / )    |  (\  / |   / \   / \

{% endraw %}
```

## Thread

+ Return to [April 1997](/archive/1997/04)

+ Return to "["Timothy C. May" <tmc@got.net>](/authors/timothy_c_may_tmc_at_got_net_)"

+ 1997-04-12 (Sat, 12 Apr 1997 01:54:58 -0700 (PDT)) - Bloated Economies - _"Timothy C. May"<EMAIL_ADDRESS>


text:
Tawallammat Tifinagh (SIL) Keyboard
=====================

Copyright (C) 2017-2020 SIL International

Version 1.1.1

__DESCRIPTION__
This Tifinagh keyboard was developed to input characters for
Tifinagh scripts. You can use this keyboard with any Tifinagh
Unicode font. This keyboard follows the Moroccan Tamazight Tifinagh
keyboard specification plus additional keys needed for Tamajaq.

Links
-----

 * Home:     https://keyman.com/keyboards/sil_tawallammat

Supported Platforms
-------------------
 * Windows
 * macOS
 * Linux
 * Web
 * Mobile

repository: keymanapp/keyboards

repo_name: keymanapp/keyboards


text:
FRTemplate — a small web site templating framework
==================================================
After maintaining two sites built on a quite similar foundation, I began to merge the common functionality into a framework. This is the result.

Structured as a PHP-based templating system, it provides some utility functions for keeping multi-lingual versions of a web site in sync, with an emphasis on keeping the templating system close to the HTML end result, using PHP in two separate ways:

* as a back-end system using a class structure accessed by an [auto-loading mechanism](http://php.net/manual/en/language.oop5.autoload.php)
* as a light-weight templating system within the HTML templates.

I find that the way to PHP madness is usually avoided by clearly separating its applications in this way. When more advanced functionality spreads to be interspersed with HTML layout, soon everything is lost as per code clarity and maintainability.

* [FRTemplate project page at Github](https://github,com/dandersson/FRTemplate)
* [FRTemplate-sample at Github](https://github.com/dandersson/FRTemplate-sample) — a minimal demonstration of a site structured to use FRTemplate

Generality
----------
The system is not written with general application in mind, but rather tailor-made for a couple of real-life sites. The code is presented here mostly for the very few who might have any interest in this specific collaboration.

Performance
-----------
Performance has never been a problem even with a vanilla Apache configuration for the scale at which the target sites are used. I currently run the sites behind a [Varnish](https://www.varnish-cache.org/) instance anyway, which makes performance an absolute non-issue.

Documentation
-------------
It is tiny enough to be readable in its own. I would not recommend it to anyone who do not want to read any code — that is not its purpose. Rather it is meant to be a framwork that provides some utility functions for tedious tasts, keeping the language constructs available at all moments for anything it natively handles well.

Looking at the code behind the [sample FRTemplate site](https://github.com/dandersson/FRTemplate-sample) should be a nice guide. Some more advanced functionality such as e-mail form functionality with [reCaptcha](https://www.google.com/recaptcha) are not showcased very well at the moment. The standard `mod_rewrite` format used (if this setting is enabled) is described in `FRTemplate/site.php`.

repository: dandersson/FRTemplate

repo_name: dandersson/FRTemplate


text:
# Kitty Registrar

[![Build Status](https://travis-ci.org/t04glovern/kitty-registrar.svg?branch=master)](https://travis-ci.org/t04glovern/kitty-registrar)
[![Current Crates.io Version](https://img.shields.io/crates/v/rocket.svg)](https://crates.io/crates/rocket)

Kitty Registrar is a frontend for cat fostering written in Rust.

## Building

### Nightly

Rocket requires a nightly version of Rust as it makes heavy use of syntax extensions. This means that the [first two unwieldy lines in the introductory](https://rocket.rs/guide/getting-started/#installing-rust) example above are required.

Once you have rustup installed, run the following:

`$ rustup default nightly-2017-12-21`

If you prefer to set the version to just this project, run the following:

`$ rustup override set nightly-2017-12-21`

### kitty-registrar

Run the following to install the cargo dependencies:

`$ rustup update && cargo update`

The simply run the following to start the web service

`$ cargo run`

## Testing

To test Rocket, simply run `./scripts/test.sh` from the root of the source tree. This will build and test the `kitty-registrar` build. This is the script that gets run by Travis CI. To test a crate individually, run `cargo test --all-features`.


text:
Welcome to Go Barber - Backend  👋

# How to run

## Setup Environment

You will need 3 databases running:

* Postgres.
* Redis
* MongoDB

**If you have docker**, then run the following commands:

* Postgres: ``docker run --name dbname -e POSTGRES_PASSWORD=dbpass -p 5432:5432 -d postgres:version``
* Redis: ``docker run --name dbname -p 6379:6379 -d -t redis:alpine``
* MongoDB: ``docker run --name dbname -p 27017 -d -t mongo``

## Install the application

1. Clone the repository in your local machine.
  ``git clone https://github.com/josephdsbr/gobarber-backend.git``.
2. Install dependecies.
  ``yarn``, ``yarn install`` ,``npm i`` or ``npm install``.
3. Setup environment variables:
  Copy the .env.example file, rename it to .env and set the environment variable as needed.

* Mailing system was tested using [mailtrap.io](https://mailtrap.io/). We also recommend you to use it too.

4. Create database and run migrations:
  ``yarn sequelize db:create`` then ```yarn sequelize db:migrate``

5. Start server in development mode:
  ``yarn dev`` or ``yarn dev:debug`` for debugging.

7. Start Queue Mailing System
  ``yarn queue``

## Author

👤 **José Vinícius Santos de Melo**

* Website: https://www.linkedin.com/in/josephdsbr/
* Github: [@josephdsbr](https://github.com/josephdsbr)

## Show your support

Give a ⭐ if this project helped you!

repository: josephdsbr/gobarber-backend

repo_name: josephdsbr/gobarber-backend