text:
# Day 1 - 2021/08/07
I spent the day mostly brainstorming different ideas of what to implement and how to implement them.

Ideas included:
- 2P / co-op mode (either with human or AI allies)
- Different "arena" shapes (e.g. hexagon, circle, etc)
- Different enemies and boss fights
- Different levels and "biomes" (e.g. graveyards with ghosts, road with cars)
- Foosball level with 2-3 players per side and players can only move in one dimension
- Infinite mode where the first level is a triangle with three players, the second is a square with four players, etc.
- Colour and face picker for when player starts the game

One approach that I want to follow differently from the prototype is relying on the editor to handcraft levels. With the prototype, I started off using the editor to place every element in the level. I found it a bit tedious to make sure everything is pixel perfect so I converted everything over to generating every level element programatically. But when I think ahead of the different types of levels I want to make, I think it'll be more manageable in the long-term if I design the levels in the editor, and if there's any I want to re-use (e.g. standard 4-player layout), I can simply duplicate them. I want to minimize the amount of level-specific code I have to write.

# Day 2 - 2021/08/08
I got started on re-implementation of my prototype. Aside from some housekeeping of adding utility functions and configs, the main thing I added was player and ball scenes, with their movement and basic AI.

I did experiment with a different approach for the AI from my prototype. In the prototype, I simply updated the AI's input to be in the direction of the ball at all times. I found this to be a little unnatural since humans tend to only follow the ball if it's moving their way - otherwise, they either stay in the middle or move toward where they predict the ball to go. The approach I tried using was adding an Area2D and having the AI only move toward the ball when the ball is within the AI's Area2D. However, this approach wasn't better. I had to increase the size of the Area2D otherwise the AI would not track the ball until it was too late. But I had to increase it so much that it was almost tracking the entire field of play anyway

# Day 3 - 2021/08/09
I finished the first level which is a replica of the Quadrapong layout. I spent some time looking into an issue where the player gets pushed off their starting axis and added a fix to this. I also updated the controls so the player has some acceleration when moving from side to side. This should make it more smooth and easier to do finer movements.

# Day 4 - 2021/08/10
The main thing I added was detecting when a player loses their health, and if so, remove them from the game and adding a wall where their net used to be. This is pretty identical in functionality to what happened in Quadrapong. I struggled with how to approach this implementation in a way that would keep things simple. I think my final solution is quite good. The left and right walls behind each player, I referred to those as "side posts." They're just StaticBody2D with a ColorRect and CollisionShape. Then I made a "middle post" which is exactly the same except it's a bit longer and in the middle.

When a Net is loaded into the scene, the MiddePost is disabled. When the Net detects a goal scored, if the player has no more health, it enables the MiddlePost.

For now, I've added the logic of removing the player within the Net object but in the future, I imagine I'll have to some sort of global GameManager that is responsible for these actions.

# Day 5 - 2021/08/11
I added a second level (graveyard) with an enemy that appears every few seconds (ghost).

A challenge I had was I didn't know how to add my tilemap tiles at a 8px offset. By default, I could only add them at 16px offsets.  I ended up setting the `cell_size` property 8px by 8px which resolved it, but I'm not quite sure if this is the right approach.

Additionally, I first tried using the Tilemap node for any objects that also required collisions - for example, the gravestones in the graveyard. However, since the sprite's aren't complete rectangles, I wasn't sure if there is a way to add CollisionPolygon2D to tiles in a TileMap. As a result, I ended up just creating StaticBody2Ds for any obstacle I place on the level.

# Day 6 - 2021/08/12
Short update: I added a new level (river forest), added a new enemy (octopus), and added some level selection to the main menu.

There's some duplicate code shared between both the Ghost and Octopus enemies. I think I can definitely refactor how they fade in to appear and fade out to disappear by creating some AnimationPlayer that has two animations: fade_in and fade_out. Then I can re-use this component on any enemies within my game. For now, I'll leave it as is but I've added it to my backlog for next week.

# Day 7 - 2021/08/13
I started adding some sound and visual effects to the game.

I initially started using [Bfxr](https://www.bfxr.net), but I couldn't produce many sound effects that I was too thrilled with. I had used [ChipTone](https://sfbgames.itch.io/chiptone) a few times before so I switched back to it and I found I was able to make the types of sound effects I was looking for. I did briefly watch a video of [Arkanoid (NES)](https://www.youtube.com/watch?v=3luUb7WEm7k) to get a sense of what types of sound effects were used in the game. So far, I've just added some basic menu selection, wall hit, and player hit sounds.

As for visual effects, I've been inspired by a recent talk I watched, [Juice it or lose it](https://www.youtube.com/watch?v=Fy0aCDmgnxg), by Martin Jonasson and Petri Puhro. I wanted to do similar sorts of "juicy" effects in my game but wasn't exactly sure how to do it. My first instinct was just to use a Tween and tween the player's scale to a certain amount and back. I found I didn't need to make it that complicated - I just need a single tween from 1.3x scale back to 1.0x scale:

```gdscript
func on_hit():
	SoundFX.play("player_hit.wav")
	$Tween.interpolate_property(
		self, # object
		"scale", # property
		Vector2(1.3, 1.3), # initial_val
		Vector2(1.0, 1.0), # final_val
		0.3, # duration
		Tween.TRANS_BACK, # trans_type
		Tween.EASE_IN # ease_type
	)
	$Tween.start()
```

As for the walls, I had something similar in mind. The one thing I wanted to do was add a little color for when the ball hits the wall. I was inspired by a demo in the [Godot docs](https://docs.godotengine.org/en/stable/tutorials/physics/using_kinematic_body_2d.html#bouncing-reflecting) where the wall has a flashing effect on hit. I implemented this in a similar way, where I just start a Tween from red to white.

# Day 8 - 2021/08/14
Not the largest update but I continued adding visual and sound effects to the game: hitting a gravestone, scoring a goal, letting a goal in, and hitting a tree. I also added some quality of life features: press "r" to reset the ball to the middle and "s" to serve it.

To date, I haven't had a hard plan of exactly what I'm doing each day. I have sort of a laundry list of tasks in Trello, sorted by "this week" and "eventually". "This week" are tasks that I generally deem necessary to have some decent sort of demo, and all of my issues or nice-to-have's go under "eventually."

# Day 9 - 2021/08/15
The main things I added were life bars for each player, a UFO enemy, and a generic enemy spawnner that I can reuse across levels.

The generic enemy spawnner is quite simple: it takes a `spawn_interval`, `max_spawn_count` and the enemy scene that it needs to spawn. Every `spawn_interval` seconds, it checks to see how many enemies it's spwanned already - if this is less than `max_spawn_count`, it spawns a new one.

Each enemy stores its own internal logic of how it moves, where it starts, where it moves toward.

Something I have noticed is that I'm reusing the same Tween over and over again in each enemy class:

```gdscript
func on_hit():
	$Tween.interpolate_property(
		self, # object
		"scale", # property
		Vector2(1.2, 1.2), # initial_val
		Vector2(1.0, 1.0), # final_val
		0.2, # duration
		Tween.TRANS_BACK, # trans_type
		Tween.EASE_IN # ease_type
	)
	$Tween.start()
```

It's beginning to be a bit cumbersome to have to do this on every enemy I create (along with every object in the game that becomes bigger on hit). I've thought about making a global Tween and adding a default `interpolate_size` method so that for all objects, I can simply do:

```gdscript
// enemy.gd
func on_hit():
	GlobalTween.interpolate_size(self)

// global_tween.gd
func interpolate_size(object):
	$Tween.interpolate_property(
		object,
		"scale", # property
		Vector2(1.2, 1.2), # initial_val
		object.scale, , # final_val
		0.2, # duration
		Tween.TRANS_BACK, # trans_type
		Tween.EASE_IN # ease_type
	)
	$Tween.start()
```

# Day 10 - 2021/08/16
I added a new level (road intersection) with a new type of interactable (car). To date, any object on the screen that randomly appears and moves around on its own... I've been just grouping it in the "enemies" folder for lack of a better place to put it. I'm not quite sure where it makes the most sense. I could just rename that folder to "interactables" since they're not enemies - they're just active bodies on the screen that move around.

Another observation I've had is balancing when to move on with a "decent" solution versus spending more time trying to get the "perfect" one. For example, when I implemented the Car, I noticed some behaviour that I forgot to anticipate such as when some players have lost all their health. In this case, the arena closes its walls so the roads of Level 4 become blocked.

What I ended up doing, and I think is okay for now, is I just came up with an "okay" solution that's good enough - which is, if there is a collision, stop  moving. This has the side-effect of piling up cars which isn't great, since the spawnner won't be able to spawn new cars once the `max_spawn_count` has been reached. However, I think right now, I'm still in the phase of implementing the full scope of my demo so I don't want to spend too long on any particular task. The general schedule I'm thinking for releasing a game every month is:
- week 1: build out core mechanics with 2 levels
- week 2: build out game with all levels and functionality
- week 3: play test thoroughly each level and fix obvious issues / things with lack of polish
- week 4: prepare for people other than me to play it, continue adding polish

I think polishing a game and tweaking it to improve the player experience is quite crucial, and I don't want to leave that until the last day. Instead, I want to focus on building the core experience as quick as I can, and then going back later on.

# Day 11 - 2021/08/17
I added a very basic options menu that you can access from start menu. I only had about 30 minutes to spare yesterday, so I really just wanted to get anything done - some progress is better than nothing. I saw a poster a few years ago that had:

1.01^365 = 37.8
0.99^365 = 0.03

With that in mind, I've made it a habit to publish at least one commit per day on this project, no matter how small they are. Even with small commits, there are things I'm learning. For example, yesterday I wasn't sure how I can enable/disable the CanvasLayer that I have the CRT texture on. I noticed in the AutoLoad tab in Project Settings that each global node has an Enabled checkbox. I figured this must be a property I can manipulate, but it turns out, this just affects how you can access the node (e.g. `CRT` vs. `get_node("/root/CRT")`).

# Day 12 - 2021/08/18
I added the first powerup to the game: a red apple. Currently, if a ball collides with the apple, the last player to touch it receives one additional health. If no previous player had touched it (e.g. off a serve), no health is rewarded and the apple does not disappear.

I also made a new spawnner, PowerupSpawnner, that will have a list of potential powerups to spawn along with the probability of their occurrence. For now, it just spawns the apple at some regular interval.

I also spent some time thinking about the colour palette. I initally started with the [ZX Spectrum palette](https://lospec.com/palette-list/zx-spectrum). Howeve, many of my sprites are from Kenney's [1-Bit Pack](https://www.kenney.nl/assets/bit-pack), but I'm not sure what colour palette is used for it. It does introduce a few more colours: blue, yellow, green, red, brown, and a maroon. But I would like to unify all the colours in the game with just a single palette. However, one challenge I'm not sure how to solve is how can I test my changes out without manually replacing every colour in the game.

I also thought a bit about what my fifth level should be. I initially thought I would make a boss level as a way to finish the demo. However, I wonder if this is even necessary - instead, perhaps I should just have a regular fifth level. This would be more similar to games like Bubble Bobble, where you would just simply play through all the levels.

# Day 13 - 2021/08/19
I updated the in-game colour palette to use [PICO-8](https://lospec.com/palette-list/pico-8), added a pause menu, and refactored the existing menus to match the pause menu style.

In terms of choosing a colour palette, what I did was:
1. Search on [Lospec](https://lospec.com/palette-list) for all palettes with max 16 colours, sorted by downloads.
2. Hand pick a few palettes that seem promising: for me, these were [PICO-8](https://lospec.com/palette-list/pico-8), [Island Joy](https://lospec.com/palette-list/island-joy-16), [Bubblegum](https://lospec.com/palette-list/bubblegum-16) and [Vanilla Milkshake](https://lospec.com/palette-list/vanilla-milkshake).
3. Open up a screenshot of my game in Aseprite and make a new frame for each palette.
4. For each palette, make a new frame, and replace the 6 or 7 colours in the screenshot with their replacement from palette. This was easy to do by simply clicking Shift + R, and copy-pasting the new value.

Once I had a frame for each palette, I simply went through each of them, compared them, and picked the one that I thought was the best.

As for the pause menu, the reference project I was using had implemented in a slightly different way. I didn't realize this until after I had finished my implementation and was debugging it trying to figure out why it's not working. Here's how my reference project did it:

World (Node)
- Camera
- UI (CanvasLayer)
  - PauseMenu (ColorRect)

When loaded, the World node is then responsible for determing what level should be loaded on the screen. This way, the UI node that contains the PauseMenu is always present as long as a level is loaded. Otherwise, if you're on the StartMenu for example, the UI node and PauseMenu won't be accessible.

The way I implemented it (or I should say, the way I got it working) was by adding a global singleton:

PauseMenu (CanvasLayer)
- ColorRect

Then in PauseMenu.gd, I simply have some logic that determines if the current scene is a level or not: `get_tree().get_nodes_in_group("Player").size() > 0`.

There are some other approaches I could have used:
- Refactor my code to create a generic World node that controls which Levels gets instanced, similar to the reference project
- Instantiate the PauseMenu on each level

But, for now, I just ended up going through with what I got working. It's not the greatest but it's good enough.

# Day 14 - 2021/08/20
I added the fifth level: one where there's a face in the middle that gets red, large, and angry if it hasn't been hit by a ball in a while. I'm not super thrilled with it - I think it might be a bit boring. But I was really struggling yesterday to come up with something that I felt was pretty good that wasn't this. In the end, I decided just to go through with it, and I can always come to it later if needed.

This marks the end of the second week since I've started on this game. As I said before, I won't be adding any more content at this point. I went through my backlog of tasks for this game and re-prioritized each into three categories: must have, should have, or could have. This is all based on a 1-month timeline, so the "must have" tasks should be done by end of week 3, and the "should have" tasks should be done by end of week 4.

At the moment, most of my "must have" tasks are polish-related: fixing bugs, adding transitions between levels, adding a lose screen, adding a win screen, and so forth.

# Day 15 - 2021/08/21
I had a very productive day yesterday: fixed two bugs, added a "game over" screen, added a "level selection" screen", and added a "face selection" screen.

Everything I implemented is fairly basic - the level selection screen just lists the levels in numeric order. There's no fancy overworld where a character travels to and from different levels such as in Overcooked 2 or Super Hiking League DX. I definitely feel that with a one-month constraint, I don't really have time to explore different ideas since that puts the project at risk of not being complete by the end of the month. That's something I want to keep in mind for future months.

# Day 16 - 2021/08/22
I added some more UI polish: the label that you are currently on in the UI slides, some sound effects to other menus/screens, and updated each player's life bar to match their player colour.

I did quite a lot of playtesting yesterday and I definitely need to reduce the difficulty. I also need to improve the control of the player - getting the player to move to exactly where you want is not ideal. I've gotten used to it by simply tapping the arrow keys lightly but a new player wouldn't know how to do it. I also have to replace a lot debug-only features (e.g. ball always spawns in the top-left corner) with a real feature (e.g. the player who just allowed a goal gets to serve).

# Day 17 - 2021/08/23
I added the concept of a "serve position". Each Player has a Position2D, named ServingPosition. When the game starts, the human player will have the ball spawn at the serving position. When a player allows a goal, they will become the server and the ball will spawn at their serving position.

I did look into adding more control of where the ball goes when it's served but the implementation was a bit too much for me to get done in just a few hours so I decided to go with something simple.

# Day 18 - 2021/08/24
I had a very productive day:
- added two game difficulty modes (easy and hard)
- refactored menus and shared label components
- fixed a few bugs (i.e. AI colour matches human player, level01 always loads when player restarts the game, pause menu's default label doesn't default to "Resume" when opening it)

For the game difficulty modes, the settings that change are the ball speed, max ball speed, and the AI speed. For the hard difficulty, I used values that definitely give me a challenge to win but are still doable. For the easy difficulty, I ramped these down considerably to a level where I think anyone can win. I'll have to some play testing to see if it's possibly too easy.

For refactoring, I noticed I used the exact same label and configuration across all my menus: 7px font with the lace colour. I simply made a new Label node with this configuration and updated all my existing menus to match it.

# Day 19 - 2021/08/25
Yet another productive day. I spent it polishing up the ghost enemy. When I first implemented, it was very barebones - upon collision, it would just disappear. There would be no death effect, no sound effect, and the ball would just bounce off of it as if it were a wall.

I've:
- Added a shadow underneath the ghost
- Added a death and sound effect that plays when the ghost is hit
- Changed the collision mechanic so the ball doesn't bounce off the ghost but instead, it goes through it with some variation in direction and speed

# Day 20 - 2021/08/26
I added a level completion screen. The way I implemented is every time an AI loses all their health, they send a signal that my global Utils.gd listens to. It checks the scene tree and sees if there's any AIs left with health. If not, then it loads the level cleared screen. For future projects, I feel adding more and more to my Utils.gd isn't the best approach. Ideally what I will do is have a generic LevelManager or GameManager that is responsible for loading levels, transitioning between them, and transitioning away from them to "level cleared" screens.

Something I got really lucky with is Godot's RichTextLabel and its capability. I wanted to add a juicy "level cleared" label but thought I might have to write a shader to create a cool, rainbow effect. Fortunately, Godot already has this built-in and they offer a few different options for cool effects: tornado, wave, shake, etc.

# Day 21 - 2021/08/27
I added a crown beside each completed level in the level selection screen. At least this way, the players have some notion of making progress throughout the demo. Ideally I'd like to add some sort of "demo complete" screen once the players have completed all five levels.

I did explore using the RichTextLabel and its effects to replace my regular Label. However, I ran into an issue where whenever I use an effect, it introduces a large space between the label and the node above. I haven't solved it so for now, I'll continue using the regular Label but hopefully for the next project I can switch over to using RichTextLabel for everything since I think the default effects add a lot of juice to the game with not much extra code.

# Day 22 - 2021/08/28
Very productive day with several bug fixes and some polishing:
- Polished the river level by replacing the octopus instancing logic that was contained in level03.gd with the generic enemy spawnner I had built a while back.
- Dixed a bug where pressing the serve button immediately after you lost your last health and there's only 1 other AI left crashes the game. This happened since it would try find another random AI to serve the ball to, but since there's only 1, it would run in a forever loop without finding one.
- Fixed a bug where pressing the pause button immediately after you lost your last health allows you to restart the level without every seeing the game over screen.
- Added a death effect to cars that triggers when they've been stuck for 1 second. This was my solution to the problem I was facing where cars would just pile up on closed nets in level04.

I also spent some time thinking and testing how to make the game easier for players. The first change I made was I reduced the AI's tracking and speed - this should lead to the AI being scored on more often. The second is I increased the default scale of the players in the easy version. Lastly, I changed the collision sprite on human players to be 1px larger in radius than that of the AIs. Hopefully this leads to more players beating the game and overall, a more enjoyable experience.

# Day 23 - 2021/08/29
Not a very productive day - the only thing I added was a "demo cleared" screen when the player finishes all five levels. On days when I spend a lot of time outside (e.g. yesterday I went hiking for a few hours in the morning), I find it incredibly difficult to do anything but relax afterward. I tried my hand at music composition for a bit in the afternoon but didn't make much progress. As the day went on, I kept looking at my to-do list and didn't see anything that I thought I could reasonably finish in a single day.

I eventually settled on something in the evening, but I definitely don't want to repeat this in the future. Next time, I think I'll try to just pick out some "easy/trivial" tasks that I can knock off, so I still maintain my 1 commit per day and I don't feel unproductive.

Even though I studied music as a kid, I haven't done any music composition in over a decade now. As a result, there's quite a learning curve just getting back to it. I don't know if doing a game every month gives me ample time to really practice and learn new things, as opposed to just execute on a game. I definitely feel the shortcomings in my skills so I want to make sure I have time to actually improve them.

# Day 24 - 2021/08/30
Small additions yesterday: added a sound toggle in the options menu and refactored the start menu. I spent a bit more time trying to make a title screen tune using Bosca Ceoil, but no luck there. I've heard good things about LMMS so I'm going to watch a few tutorials on that today and see what I can do.

# Day 25 - 2021/08/31
I spent more time getting up to speed on LMMS and playing around with trying to compose some basic melodies. At this point in the project, I would say it's code complete. There is almost an endless list of features or changes that I should make and could make, but I'm starting to feel a little burnt out on this project.

I haven't written about burn out yet, and it hasn't really affected me until today. I'm pretty much in a "ready to move on" mindset where I'm satisfied with what I've produced in the last few weeks. I know it's far from perfect but I think it's a good first effort at releasing a game. There's tons of decision I made that I probably would do differently if I were to start it again.

As a result, I've since started writing a retrospective on my learnings over the last month and my general thoughts going forward. I'm not quite sure if I will publish that in this repository or somewhere else.

# Day 26 - 2021/09/01
Spent most of my time exploring Itch.io project requirements and figuring out how to make the content I need for it. The most important one that took the longest was getting good screenshots and GIFs that I could use. I used QuickTime to record about 10 minutes of gameplay and then I trimmed individual sections to about 3 to 4 seconds. I made 3 to 5 GIFs per level and then I went through and highlighted the best ones.

Unfortunately, I didn't realize until I was done that Itch.io requires GIFs to be smaller than 3MB in size. Fortunately, I only had one or two that exceeded this size limit but it's something I should be aware of going forward.

For filling out the project description, I browsed through some recent projects to get an idea of what others write here. For the most, it seems it's just a 2-3 sentence description, controls, and then credits - nothing complex.

# Day 27 - 2021/09/02
Continued setting up the Itch.io project page and uploaded the game. The main issue I faced was that audio wasn't working. After some searching on Google, I was about to find the resolution in the [Godot Engine Q&A](https://godotengine.org/qa/96597/audio-crashes-and-missing-on-exported-project-3-2-3).

Essentially, I had a SoundFX (Node) singleton with:

```gdscript
var cache = {}
func _ready():
	for file in Utils.list_files_in_directory("res://sounds/", ".wav"):
		cache[file] = load(sounds_path + file)
```

Rather than loading at runtime, I load all .wav files when the project is started. However, this doesn't work when the project is exported because:

> When exporting the project, the imported files can no longer be found in their original locations and are instead stored in the .import folder. However, the .import files are still in their original locations. To use Directory to look through a folder in order to find files, you need to look for the .import files instead. Then, remove the .import from the file name, and load the resulting path (the ResourceLoader will automatically account for the moved file).

Indeed in my `Utils.list_files_in_directory` function, I was using `Directory.new()`. So I had to change the above code to the following in order to get it to work:

```gdscript
func _ready():
	for file in Utils.list_files_in_directory(sounds_path, ".wav.import"):
		file = file.rstrip(".import")
		cache[file] = load(sounds_path + file)
```

I also spent quite a bit of time trying to add an audio file to a recorded video (with existing audio). For reference, I had recorded gameplay using QuickTime with BlackHole 2ch. In order to add another audio so that the two audio tracks are combined, I used this ffmpeg command thanks to [StackOverflow](
https://stackoverflow.com/questions/11779490/how-to-add-a-new-audio-not-mixing-into-a-video-using-ffmpeg):

`ffmpeg -i trailer.mov -i audio.m4a -filter_complex "[0:a][1:a]amerge=inputs=2[a]" -map 0:v -map "[a]" -c:v copy -ac 2 -shortest trailer-with-audio.mp4`

I made a trailer with music since Itch.io offers a way to add a YouTube or Video video. But once I uploaded it to YouTube and started filling out the information about the video, I realized I needed a good cover shot with 1280x720 resolution. Then I tried to find some good examples of the general structure of what this should look like.

Lastly, I made a few more changes in preparation for releasing the game:
- Updated the colours to match the Itch.io background
- Set default AI difficulty to easy
- Make the AI easy difficulty slightly better (since they were missing some trivial shots at low speeds)

repository: celestialturnip/FACEPONG

repo_name: celestialturnip/FACEPONG


text:
https://www.urionlinejudge.com.br/judge/en/problems/view/1550

# Inversion

Peter is a curious boy who liked electronics. One day, the boy was playing in
his school lab and found a box full of small electronic devices made by other
students in previous years.

Inside that box was a device that had only one display and two buttons. This
display had an integer. Pressing the buttons, Peter discovered the functions
for each of the buttons. The first button add a unit to the number on the
display. The second button reverse the digits, for example, 123 inverted is
321 and 150 inverted is 51 (ignore the leading zeros).

Initially, the display showed the number $A$. After discover the functions of
the buttons, Peter wants to know how to change the display number of $A$ to a
greater number equal to $B$. Your job in this problem is to help Peter to find
out what the minimum number of button pressings to make the display the number
be equal to $B$.

## Input

The input is started by an integer $T$, $0 < T \leq 500$, which indicates the
number of test cases. After this, the input consists of $T$ lines, each one
containing two integers $A$ and $B$, $0 < A < B < 10000$, $A$ is equal to the
initial value on the display and $B$ is equal to the final number we need to
get on the display.

## Output

For each test, your program must output one integer equal to the minimum
number of button pressings to make the number A on the displays change to the
number B.

license: MIT

branch_name: refs/heads/main

extension: md

license_type: permissive


text:
---
category: workshops
title: Workshop - Workflows for atomistic simulation
---
We are happy to announce our next virtual workshop on ["Workflows for atomistic simulation" from 10th to 12th of March 2021](http://potentials.rub.de):
The workshop is focused on fitting interatomic potentials including classical pair-potentials, EAM-potentials as well as modern machine learning potentials.
Interested participants can register on [potentials.rub.de](http://potentials.rub.de). The workshop is limited to a maximum of 80 participants.

gha_language: SCSS


text:
# Useful Administrative Commands

Notes based on tutorials from
* https://cloud.google.com/kubernetes-engine/docs/tutorials/guestbook
* https://kubernetes.io/docs/tutorials/kubernetes-basics/explore/explore-intro/

```
kubectl version
```
```
kubectl get nodes

kubectl cluster-info

```

## Deployment Configuration
Once the application instances are created, a **Kubernetes Deployment Controller** continuously monitors those instances. If the Node hosting an instance goes down or is deleted, the Deployment controller replaces the instance with an instance on another Node in the cluster.

Example:
```
kubectl create deployment kubernetes-bootcamp --image=gcr.io/google-samples/kubernetes-bootcamp:v1
```
list deployments
```
kubectl get deployments
```
create a proxy to expose environment
```
kubectl proxy
```
query the api through the proxy
```
curl http://localhost:8001/version
```

The API server will automatically create an endpoint for each pod, based on the pod name, that is also accessible through the proxy.

First we need to get the Pod name, and we'll store in the environment variable POD_NAME:

```
export POD_NAME=$(kubectl get pods -o go-template --template '{{rnge .items}}{{.metadata.name}}{{"\n"}}{{end}}')
```

## Services
To expose without a proxy, create a service (liminiting the scope for security)

repository: nic-instruction/docker-kubernetes

repo_name: nic-instruction/docker-kubernetes


text:
---
title: Signal
date: 20210312
author: Lyz
---

[Signal](https://en.wikipedia.org/wiki/Signal_%28software%29) is
a cross-platform centralized encrypted messaging service developed by the Signal
Technology Foundation and Signal Messenger LLC. It uses the Internet to send
one-to-one and group messages, which can include files, voice notes, images and
videos. It can also be used to make one-to-one and group voice and video
calls.

Signal uses standard cellular telephone numbers as identifiers and secures all
communications to other Signal users with end-to-end encryption. The apps
include mechanisms by which users can independently verify the identity of their
contacts and the integrity of the data channel.

Signal's software is free and open-source. Its clients are published under the
GPLv3 license, while the server code is published under the AGPLv3
license. The official Android app generally uses the proprietary Google Play
Services (installed on most Android devices), though it is designed to still
work without them installed. Signal also has an official client app for iOS and
desktop apps for Windows, MacOS and Linux.

## Pros and cons

Pros:

* Good security by default.
* Easy to use for non technical users.
* Good multi-device support.

Cons:

* Uses phones to identify users.
* Centralized.
* [Not available in
    F-droid](https://community.signalusers.org/t/wiki-signal-android-app-on-f-droid-store-f-droid-status/28581).

# Backup extraction

I'd first try to use [signal-black](https://github.com/xeals/signal-back).

# References

* [Home]()

branch_name: refs/heads/master


text:
### [CVE-2022-28573](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2022-28573)
![](https://img.shields.io/static/v1?label=Product&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Version&message=n%2Fa&color=blue)
![](https://img.shields.io/static/v1?label=Vulnerability&message=n%2Fa&color=brighgreen)

### Description

D-Link DIR-823-Pro v1.0.2 was discovered to contain a command injection vulnerability in the function SetNTPserverSeting. This vulnerability allows attackers to execute arbitrary commands via the system_time_timezone parameter.

### POC

#### Reference
- https://github.com/F0und-icu/TempName/tree/main/Dlink-823pro

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

repository: trickest/cve

gha_language: HTML

gha_license_id: MIT

repo_name: trickest/cve


text:
# RL Scaffolding
When starting a new project, I'll clone this repository as a starting place. It should make experimentation with the type of logging I prefer easier.

## Steps
1. Download this repo.
2. Change the remote origin to where you want your project to live: `git remote rm origin && git remote add origin git@github.com:samlobel/my_new_repo.git`
3. Change the name of the folder from "rl_scaffolding" to something related to your project
4. Change the "name" field in `setup.py`.
5. Make a >=python3.7 virtual environment. Do "pip install requirements.txt" from this directory to install your package!
6.

#### Example that works:

`python experiments/experiment1.py --hyper_parameter_name 00 --experiment_name ./results/testing --run_title testing --learning_rate 100.0`


text:
## spaceshipJs

Very simple browser game, made using js / enchantJs.

## Online demo:

https://rawgithub.com/hmoraldo/spaceshipJs/master/index.html

This is a simple enchantJs experiment, not a complete game.

## Controls:

Controls are:

- the arrow keys to move
- space to shoot

repository: hmoraldo/spaceshipJs

repo_name: hmoraldo/spaceshipJs


text:
# programming-cw
## Database Schema:
1. Appointment (data from patient team)
   - "slot_id"	INTEGER,
   - "is_confirmed"	INTEGER DEFAULT 0,
   - "is_rejected"	INTEGER DEFAULT 0,
   - "appointment_id"	INTEGER,
   - "patient_id"	INTEGER,
   - "gp_id"	INTEGER,
   - **"reason"	TEXT,**
   - **"referred_specialist_id"	INTEGER,**
   - **"clinical_notes"	TEXT,**
   - **"is_completed"	INTEGER,**

2. Users (data from all teams)
    - "firstName"	TEXT,
    - "lastName"	TEXT,
	- "email"	TEXT,
	- "password"	TEXT,
	- "accountType"	TEXT,
	- "is_registered"	INTEGER,
	- "is_active"	INTEGER,
	- "signUpDate"	TEXT DEFAULT CURRENT_TIMESTAMP,(**format**)
	- "userId"	INTEGER,
	- **"date_of_birth"	TEXT,**

3. slots (data in 2021 year that **excludes weekend**)
   - "slot_id"	INTEGER,
   - "startTime"	TEXT,
   - "endTime"	TEXT,

4. specialist (data from gp team)
    - "firstName"	TEXT,
    - "lastName"	TEXT,
    - "**hospital**"	TEXT,
    - "specialist_id"	INTEGER,
    - "department_id"	INTEGER,

5. Department (data from gp team)
    - "name"	INTEGER,
    - "description"	INTEGER,
    - "department_id"	INTEGER

6. gp_time_off (data from gp team)
    - "time_off_id"	INTEGER,
    - "gp_id"	INTEGER,
    - "startTime"	TEXT,
    - "endTime"	TEXT

7. **Prescription** (data from gp team)
    - "medicine_name"	TEXT,
    - "treatment_description"	TEXT,
    - "pres_frequency_in_days"	NUMERIC,
    - "startDate"	TEXT DEFAULT CURRENT_TIMESTAMP,
    - "expiryDate"	TEXT,
    - "prescription_id"	INTEGER,
    - "appointment_id"	INTEGER

8. **MedicalHistory** (data from admin team)
	- "Medical_historyNo"	INTEGER,
	- "UserID"	INTEGER,
	- "illness"	TEXT,
	- "time_afflicted"	TEXT,
	- "description"	TEXT,
	- "prescribed_medication"	TEXT

## Resources:
### [SQLLITE3:](https://docs.python.org/3/library/sqlite3.html)
1. https://stackoverflow.com/questions/6318126/why-do-you-need-to-create-a-cursor-when-querying-a-sqlite-database
2. To **retrieve data** after executing a SELECT statement, you can either treat the cursor as an **iterator**, call the cursor’s **fetchone()** method to retrieve a single matching row, or call **fetchall()** to get a list of the matching rows.
3. Usually your SQL operations will need to use values from Python variables. You shouldn’t assemble your query using Python’s string operations because doing so is insecure; it makes your program vulnerable to an SQL injection attack (see https://xkcd.com/327/ for humorous example of what can go wrong).
- Instead, use the DB-API’s parameter substitution. Put **?** as a placeholder wherever you want to use a value, and then provide a **tuple** of values as the second argument to the cursor’s execute() method. (Other database modules may use a different placeholder, such as %s or :1.)
### [Bcrypt:](http://zetcode.com/python/bcrypt/)
1. encode before use: line.encode('utf-8'),
1. salt = **bcrypt.gensalt()**; hashed = **bcrypt.hashpw(passwd, salt)**; if **bcrypt.checkpw(passwd, hashed)**:
### [Tkinter:](https://www.youtube.com/watch?v=YXPyB4XeYLA&feature=youtu.be)

repository: TketEZ/health-care-system

repo_name: TketEZ/health-care-system


text:
# ABOUT Figure 1 - *cyc2* gene verification and novelty
Copyright Jackson M. Tsuji, Neufeld Research Group, 2019
Part of the larger *IISD-ELA Chlorobia cyc2 project*.

This figure is composed of three panels that were produced separately and then combined in Inkscape.

## Panel A - homlogy model of *cyc2* from *Chl. phaeoferrooxidans KB01
The homlogy model from I-TASSER (PDB file) was rendered as a PNG via Chimera (to make `C_phaeo_vs1.png`) and was then cropped in Inkscape to produce `C_phaeo_vs1_edit.png`.

## Panel B - gene neighbourhood analysis of *cyc2*
This panel was semi-automated but involved a fair amount of manual work.

### 1. Input files
The `input_data` directory in `panel_B` contains the data used to create the plot:
- `gff_subset_files` - folder with subsetted GFF files giving the gene context around *cyc2* for each relevant *Chlorobia* genome. The GFF subsets were generated in `Data_analysis_pipeline/06_comparative_genomics/08_gff_subset` - see code there.
- `Chlorobia_cyc2_genome_info.tsv` - guide file linking GFF files and genome names to cyc2 accessions
- `Figure_1B_plotting_colours.tsv` - guide file for the colours in the final plot
- `Figure_1B_plotting_data_raw.tsv` - raw *cyc2*-centered GFFs output by the script (see below) for manual refinement
- `Figure_1B_plotting_data.tsv` - manually curated GFF information that was used for the final plot (see below)

### 2. Plotted the figure
Ran `plot/Figure_1B_plotter.R` in interactive mode (e.g., in RStudio) with the following settings to produce `input_data/Figure_1B_plotting_data_raw.tsv`. Note that you'll need to install all libraries loaded at the top of the script:
```R
######################################
## User variables
######################################
params <- list()
params$gff_summary_filename <- here::here("input_data", "Figure_1B_plotting_data_raw.tsv")
params$plotting_colour_guide_filename <- here::here("input_data", "Figure_1B_plotting_colours_template.tsv")
params$pdf_filename <- here::here("plot", "Figure_1B_raw.pdf")
params$cyc2_info_filename <- here::here("input_data", "Chlorobia_cyc2_genome_info.tsv")
params$gff_directory <- here::here("input_data", "gff_subset_files")
params$threads <- 4
params$buffer_length <- 5000
params$run_mode <- "auto"
######################################
```
From here, `input_data/Figure_1B_plotting_data_raw.tsv` had to be manually checked for accuracy. Although not shown in the repo, I went back and mined ORF prediction files corresponding to the GFFs to get the protein sequences of each entry, and I then ran those through BLASTP online. Each entry was checked for the annotation and taxonomic affiliation of its closest representatives, allowing for the annotation colours and abbreviations in the final plot. Generally, I followed the following protocol:
- Labelled a protein as 'Other (annotated)' if its closest BLASTP hit was to another member of *Chlorobia* with ~ >50% sequence identity, and the hit was annotated as a protein of known function.
- Labelled a protein "Other shared gene" if it matched all of the above criteria plus was related to another protein in the figure
- Labelled a protein 'Other (hypotheticl)' if it hit *Chlorobia* with ~ >50% sequence identity as above but the hit protein had unknown function, OR if the closest database hit was ~ <50% sequence identity (regardless of its taxonomy/annotation)
- Labelled a protein as a "Non-Chlorobia gene" if it had a hit of ~ >50% sequence identity to a non-*Chlorobia* sequence.

Once done, the manually curated `input_data/Figure_1B_plotting_data.tsv`, along with the corresponding `input_data/Figure_1B_plotting_colours.tsv` were fed into `plot/Figure_1B_plotter.R` with alternative settings for producing the final plot:
```R
######################################
## User variables
######################################
params <- list()
params$gff_summary_filename <- here::here("input_data", "Figure_1B_plotting_data.tsv")
params$plotting_colour_guide_filename <- here::here("input_data", "Figure_1B_plotting_colours.tsv")
params$pdf_filename <- here::here("plot", "Figure_1B_raw.pdf")
params$cyc2_info_filename <- NA
params$gff_directory <- NA
params$threads <- 4
params$buffer_length <- 5000
params$run_mode <- "normal"
######################################
```

The output plot (`plot/Figure_1B_raw.pdf`) was still lacking several details that had to be added manually:
- lengths of contigs
- short form abbreviations for each gene
- legend
- (Note that I removed a couple genes from the sides that stuck out too far to the left or right of the plot, and also added one on the right side of L304 (next entry in the GFF file) because of empty space.)

Once added, this resulted in `Figure_1B_cleaned.pdf`.

See R package versions in `R_session_info.log`. Log was generated after running the above script by:
```R
sink("R_session_info.log")
sessionInfo()
sink()
```

## Panel C - MSA and phylogeny of *cyc2*
This plot was mostly automated.

### 1. Input files
The `input_data` directory in `panel_C` contains the data used to create the plot:
- `cyc2_seqs_all_aligned.faa` - unmasked alignment of the *cyc2* predicted primary sequences, as generated in `Data_analysis_pipeline/04_HMM_development/02_alignment`
- `cyc2_phylogeny.treefile` - Cyc2 phylogeny, as generated in `Data_analysis_pipeline/06_comparative_genomics/02_cyc2_phylogeny`
- `cyc2_plotting_name_info.tsv` - guide file for the final names to be used in the plot
- `residue_colours_rasmol.tsv` - guide file for amino acid colours. I used a colour scheme widely availble online attributed to [RasMol](http://www.openrasmol.org/doc/), an open-source molecular visualization tool. Thanks, RasMol.

### 2. Plotted the figure
Ran `plot/Figure_1B_plotter.R` in interactive mode (e.g., in RStudio) to produce `plot/Figure_1C_raw.pdf`. Note that you'll need to install all libraries loaded at the top of the script. The output figure was then touched up a bit in Inkscape to produce the final panel, `plot/Figure_1C_cleaned.pdf`.

See R package versions in `R_session_info.log`. Log was generated after running the above script by:
```R
sink("R_session_info.log")
sessionInfo()
sink()
```

## Final figure
Each panel was combined to produce Figure 1:
![Figure_01](Figure_01_cleaned.png)

gha_language: Jupyter Notebook


text:
# SECOND for KITTI object detection

This is a ROS version for SECOND--a net for 3D Object detection. Origin ver is [here](https://github.com/traveller59/second.pytorch)

Thanks for [traveller59](https://github.com/traveller59)

## dependence

* [python-pcl](https://github.com/strawlab/python-pcl)

## usage

### PCD dataset.

Impelement custom datafile in pcd format.

1. rename pcd files into 0.pcd , 1.pcd, 2.pcd ....
2. in kittiviewer,set root info as pcd files dir.
3. click 'load'.
4. python ./data/pcd_dataset.py create_PCD_info_file --data_path=pcd_root_path
5. build net in kitti viewer and inference.

## TODO

- [ ] Predict single point cloud file.
- [ ] ROS msg to tensor.
- [x] Custom point cloud apply.


text:
# Unscented Kalman Filter Project
In this project I utilize an Unscented Kalman filter using C++ to estimate the state of a moving object of interest with noisy lidar and radar measurements. Input data consisting of laser measurements (given directly as x and y positions, with some known uncertainty) and radar measurements (given as radius, angle, and radial velocity relative to some fixed measurement site, with some known uncertainty) are combined with a motion model to track a vehicle with much better accuracy than the individual measurements alone allow.t.

My algorithm is run against Dataset 1 in the simulator "data/obj_pose-laser-radar-synthetic-input.txt" I collect the positions that my algorithm outputs into the folder results and compare them to ground truth data. My px, py, vx, and vy RMSE is less than or equal to the values [.09, .10, .40, .30].

## This meets the project rubric threshold requirements of [.09, .10, .40, .30]

![Image of RMSE 2](images/ukf_tracking.png)

**Red circles are lidar measurements.**

**Blue circles** are radar measurements (position markers inferred from radius and angle; the also-supplied radial velocity measurements are not shown).

**Green markers** are the car's position as estimated by the Unscented Kalman filter. It's clear that the Kalman filter does a good job of tracking the car's position with significantly reduced noise.

## The contents of the repository

 - **src a directory with the project code:**

    **main.cpp** - reads in data, calls a function to run the Unscented Kalman filter, calls a function to calculate RMSE
    **ukf.cpp** - initializes the filter, calls the predict function, calls the update function
    **tools.cpp** - a function to calculate RMSE

repository: PanasheC/Unscented-Kalman-Filter

repo_name: PanasheC/Unscented-Kalman-Filter


text:
# Change Log

## [0.11.1](https://github.com/Tapjoy/ldap_tools/tree/0.10.1) (2019-11-06)
[Full Changelog](https://github.com/Tapjoy/ldap_tools/compare/0.11.0...0.11.1)

## [0.11.0](https://github.com/Tapjoy/ldap_tools/tree/0.10.1) (2019-11-06)
[Full Changelog](https://github.com/Tapjoy/ldap_tools/compare/0.10.1...0.11.0)

**Merged pull requests:**

- Remove runtime requirement on pry gem. [\#25](https://github.com/Tapjoy/ldap_tools/pull/25) ([ehealy](https://github.com/ehealy))

- Replace Trollop with Optimist [\#24](https://github.com/Tapjoy/ldap_tools/pull/24) ([alanbrent](https://github.com/alanbrent))

- Fix incorrect username references [\#23](https://github.com/Tapjoy/ldap_tools/pull/23) ([alanbrent](https://github.com/alanbrent))

- Fix key list [\#23](https://github.com/Tapjoy/ldap_tools/pull/23) ([alanbrent](https://github.com/alanbrent))

## [0.10.1](https://github.com/Tapjoy/ldap_tools/tree/0.10.1) (2017-12-20)
[Full Changelog](https://github.com/Tapjoy/ldap_tools/compare/0.10.0...0.10.1)

## [0.10.0](https://github.com/Tapjoy/ldap_tools/tree/0.10.0) (2017-10-13)
[Full Changelog](https://github.com/Tapjoy/ldap_tools/compare/0.9.2...0.10.0)

**Merged pull requests:**
- Remove unused activesupport dependency [\#22](https://github.com/Tapjoy/ldap_tools/pull/22) ([atayarani](https://github.com/atayarani))
- Make arguments more consistent [\#21](https://github.com/Tapjoy/ldap_tools/pull/21) ([atayarani](https://github.com/atayarani))

## [0.9.2](https://github.com/Tapjoy/ldap_tools/tree/0.9.2) (2017-09-13)
[Full Changelog](https://github.com/Tapjoy/ldap_tools/compare/0.8.2...0.9.2)

**Merged pull requests:**

- update changelog [\#20](https://github.com/Tapjoy/ldap_tools/pull/20) ([atayarani](https://github.com/atayarani))
- Allow ldaptools to use env vars as well as config files [\#19](https://github.com/Tapjoy/ldap_tools/pull/19) ([atayarani](https://github.com/atayarani))

## [0.8.2](https://github.com/Tapjoy/ldap_tools/tree/0.8.2) (2016-07-13)
[Full Changelog](https://github.com/Tapjoy/ldap_tools/compare/0.8.1...0.8.2)

**Merged pull requests:**

- don't memoize uids [\#18](https://github.com/Tapjoy/ldap_tools/pull/18) ([atayarani](https://github.com/atayarani))

## [0.8.1](https://github.com/Tapjoy/ldap_tools/tree/0.8.1) (2016-06-01)
[Full Changelog](https://github.com/Tapjoy/ldap_tools/compare/0.8.0...0.8.1)

**Merged pull requests:**

- first pass at group API [\#16](https://github.com/Tapjoy/ldap_tools/pull/16) ([atayarani](https://github.com/atayarani))
- Add code climate integration [\#15](https://github.com/Tapjoy/ldap_tools/pull/15) ([atayarani](https://github.com/atayarani))

## [0.8.0](https://github.com/Tapjoy/ldap_tools/tree/0.8.0) (2016-05-23)
[Full Changelog](https://github.com/Tapjoy/ldap_tools/compare/0.7.0...0.8.0)

**Merged pull requests:**

- WIP LDAP Tools massive refactor [\#14](https://github.com/Tapjoy/ldap_tools/pull/14) ([atayarani](https://github.com/atayarani))
- \[OPER-2066\] Stub confirm method in remove\_user spec to allow specs to… [\#13](https://github.com/Tapjoy/ldap_tools/pull/13) ([ehealy](https://github.com/ehealy))
- OPER-1992 Fix key management [\#12](https://github.com/Tapjoy/ldap_tools/pull/12) ([alanbrent](https://github.com/alanbrent))
- Updating readme with new subcommand [\#11](https://github.com/Tapjoy/ldap_tools/pull/11) ([alanbrent](https://github.com/alanbrent))
- Feature to remove user from an existing group [\#10](https://github.com/Tapjoy/ldap_tools/pull/10) ([alanbrent](https://github.com/alanbrent))
- V070 [\#9](https://github.com/Tapjoy/ldap_tools/pull/9) ([atayarani](https://github.com/atayarani))

## [0.7.0](https://github.com/Tapjoy/ldap_tools/tree/0.7.0) (2016-01-08)
[Full Changelog](https://github.com/Tapjoy/ldap_tools/compare/0.6.0...0.7.0)

**Merged pull requests:**

- V060 [\#8](https://github.com/Tapjoy/ldap_tools/pull/8) ([atayarani](https://github.com/atayarani))

## [0.6.0](https://github.com/Tapjoy/ldap_tools/tree/0.6.0) (2016-01-08)
[Full Changelog](https://github.com/Tapjoy/ldap_tools/compare/0.5.0...0.6.0)

**Merged pull requests:**

- V050 [\#7](https://github.com/Tapjoy/ldap_tools/pull/7) ([atayarani](https://github.com/atayarani))

## [0.5.0](https://github.com/Tapjoy/ldap_tools/tree/0.5.0) (2015-12-12)
[Full Changelog](https://github.com/Tapjoy/ldap_tools/compare/0.4.0...0.5.0)

**Merged pull requests:**

- refactor Group flow and some fixes around User [\#6](https://github.com/Tapjoy/ldap_tools/pull/6) ([atayarani](https://github.com/atayarani))

## [0.4.0](https://github.com/Tapjoy/ldap_tools/tree/0.4.0) (2015-12-10)
[Full Changelog](https://github.com/Tapjoy/ldap_tools/compare/0.3.0...0.4.0)

**Merged pull requests:**

- V030 [\#3](https://github.com/Tapjoy/ldap_tools/pull/3) ([atayarani](https://github.com/atayarani))

## [0.3.0](https://github.com/Tapjoy/ldap_tools/tree/0.3.0) (2015-12-05)
**Merged pull requests:**

- Add ability to look up a user's key [\#2](https://github.com/Tapjoy/ldap_tools/pull/2) ([atayarani](https://github.com/atayarani))
- fixed homepage in gemspec [\#1](https://github.com/Tapjoy/ldap_tools/pull/1) ([atayarani](https://github.com/atayarani))

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

gha_language: Ruby


text:
# Orange

⚠ **WARNING**: _do not use this on a computer where you care about your Bitcoin data. This software might delete your funds, wallets, and blockchain data. This software is just a proof-of-concept. It is not meant for actual use._

Orange is a Bitcoin full node client built using Electron, TypeScript, and React. It uses Bitcoin Core's `bitcoind` under the hood.

This project is not affiliated with Bitcoin Core.

The only feature that's currently implemented is the information tab. No wallet or other operations are supported yet.

[![See screenshots](./docs/orange-rpc-console.png)](./docs)

## Table of Contents

- [Goal of the project](#goal-of-the-project)
- [How it works](#how-it-works)
- [Architecture and security](#architecture-and-security)
- [Install and contribute](#install-and-contribute)
- [Questions and help](#questions-and-help)

## Goal of the project

The goal of the project is to explore using Electron, React, and TypeScript to build a better Bitcoin client on top of Bitcoin Core while still providing strong security.

## How it works

Orange is just a UI. The Bitcoin functionality comes from [`bitcoind`](https://en.bitcoin.it/wiki/Bitcoind). When you start Orange, it starts `bitcoind` and communicates with it through RPC to power the UI.

## Architecture and security

Orange uses many npm modules. Some of these npm modules could get compromised. To prevent a compromised module from causing damage, Orange is sandboxed. Orange cannot make outbound connections and cannot receive inbound connections except to and from `bitcoind`.

The communication channel between Orange and `bitcoind` is protected by a password that minimizes unauthorized use of this channel by npm modules.

I don't think this theoretical vulnerability poses a serious risk because, to exploit it, the `React`, `Redux`, or a related team would have to publish code that specifically targets Orange, and then a new version of Orange would have to import this malicious code and be released before anyone notices it. I don't think this can happen.

### Details on the architecture

All Electron applications have 3 separate processes. The nature of these 3 processes is what enables the architecture described above.

The 3 processes are called `main`, `renderer`, and `preload`. Each one of these processes is granted a different level of access privilege over the system, as described below.

#### The `main` process

In Orange the `main` has full access over the system. It uses Node.js to talk to the file system and it can talk to the operating system. **Because `main` has this much privilege, we don't use npm modules in it.**

`main` talks to `bitcoind`.

#### The `renderer` process

The `renderer` process is where the UI code actually is.

The `renderer` process has no access to Node.js APIs, the filesystem, or any operating system features. The `renderer` process is also prohibited from:

- making network requests
- loading remote content (at run time)
- opening webpages
- navigating

Some implementation details

We implement the [security recommendations](https://electronjs.org/docs/tutorial/security?q=j#checklist-security-recommendations) provided by Electron. Many of these recommendations are particular to loading "remote content", that is content over the network. In Orange we disable networking completely, but we consider npm modules in the `renderer` process to be equivalent to "remote content" so we follow these recommendations as strictly as possible:

- Node integration is disabled
- Content isolation is enabled
- Web security is enabled
- A strict content security policy is provided
- Running insecure content is disabled
- No experimental Chromium or Blink features are used
- WebView creation is disabled
- Navigation is disabled
- The remote module is disabled

#### How does `renderer` get the data to display if it's sandboxed?

This is where the `preload` process comes into play. `preload` is the middleman between `main` and `renderer`. It relays messages between the two, but only very specific kinds of messages.

#### How is the communication between `renderer` and `main` secured?

`main` and `renderer` use a nonce (i.e. password) to communicate with each other. This nonce is agreed upon between `main` and `renderer` only after all the npm modules have been downloaded, so remote code has no way of knowing what it is.

Implementation details

After the npm modules have been downloaded but before the Orange distributable is created, the string `__NONCE__` in the code will be replaced with a base64 encoded random bytes. Care has to be taken to make sure this nonce is only known to the local Orange code, not to the npm modules.

## Install and contribute

At this time, Orange will only work on macOS. The included `bitcoind` was built on macOS.

To run this locally and contribute:

1. Clone this repo
1. `cd` into the repo
1. Execute `npm install` to install the dependencies
1. Execute `npm run wds` to start the build and server for the `renderer` bundle. This command will occupy the terminal window
1. In a separate terminal window, but in the same folder, execute `npm run electron` to start the build process of the `main` bundle. This command will also occupy the terminal window

Feel free to play around with the code, make modifications, or send a PR!

**Note**: I haven't tested Orange with a fully synced blockchain. I usually test with only partially synced blockchains on testnet

## Questions and help

If you have a question or need help, [file an issue](https://github.com/orange-org/orange/issues/new) or [tweet me](https://twitter.com/msafi).

license: Unlicense

repository: setlife-network/orange

repo_name: setlife-network/orange


text:
listNavToSelect
================

### A jQuery plugin to convert lists into select fields

2012 by [Christian Doebler](http://www.christian-doebler.net/)

This plugin automates the process of creating navigations in
projects with responsive design

#### Examples

Convert list into select field using default values:

$(".navigation").listNavToSelect();

Convert list into select field and store it in element with class "container":

$(".navigation").listNavToSelect({
	container_selector: ".container"
});

Convert only first level of list into select field:

$(".navigation").listNavToSelect({
	anchor_selector: "> li > a"
});

#### Settings

container_selector      jQuery selector for the container element for the select field
                        default: false (select field is inserted before list)

anchor_selector         jQuery selector for anchor elements in source list
                        default: "li a"

class_target_blank      css class for options which should open a new window
                        default: false

class_list_active       css class of active li element
						default: "active"

sub_options_indent      string to use per depth level when creation sub options which
                        were generated because of nested lists
                        default: "  "

hide_list               flag to trigger visibility of source list
                        default: true

copy_list_classes       flag to trigger copy of list classes to select field
                        default: false

select_class            css class to add to select field
                        default: false

repository: cdoebler/listNavToSelect

repo_name: cdoebler/listNavToSelect


text:
---
layout: default
---

# 1995-10-14 - Re: Netscape question transformed

## Header Data

From: Sentiono Leowinata<EMAIL_ADDRESS>To<EMAIL_ADDRESS>Message Hash: d1c9bdddcde8c5d54b564e6b175323c162f3f8667d375a5586b3fcd969e6f0d9

Message ID<EMAIL_ADDRESS>Reply To<EMAIL_ADDRESS>UTC Datetime: 1995-10-14 19:23:08 UTC

Raw Date: Sat, 14 Oct 95 12:23:08 PDT

## Raw message

```
{% raw  %}From: Sentiono Leowinata<EMAIL_ADDRESS>Date: Sat, 14 Oct 95 12:23:08 PDT
To<EMAIL_ADDRESS>Subject: Re: Netscape question transformed
In-Reply-To<EMAIL_ADDRESS>Message-ID<EMAIL_ADDRESS>MIME-Version: 1.0
Content-Type: text/plain

On Fri, 13 Oct 1995, Jeff Weinstein wrote:

>   The reason we do it is that without wide exposure outside the
> company, it is virtually impossible to get complete testing coverage.
> Given the incredible variety of machines, OS's, peripherals, etc.
	    ^^^^^^^^^^^^^^^^^^		    ^^^^
> that are available in the real world, there is no way we could
> re-create every possible configuration in the lab.

Yeah right. Way to go, Jeff.
 Get real.
Don't you even realize that OS/2 is another OS! It has its own API.
Stop treating other OS-es whose have emulator with the original one.
Netscape uses some low-level MS-Windows specific API in order to run
it well. How could you expect it run under emulator?
Now, wait! .. PowerPC will have OS/2 .. therefore, Netscape will say,
sorry folks - you have to use Netscape for Windows .. bla-bla-bla.
Get real Jeff. Many people try to improve and make a wonderful product
better, and Netscape certainly one of it. See how many people have
pledge (even begged - I heard) Netscape to make Netscape for OS/2 (not
to mention Amiga (oh ya, I forgot, Netscape will tell Amiga users to
use Mac version because Amiga can run Mac-emulator - ha ha)).

>   We also can't visit every web page, or think of every combination
> of features that clever people in the real world come up with every
> day.

That's true enough.

Regards,
Sent.

{% endraw %}
```

## Thread

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

+ Return to "[Derek Atkins <warlord@ATHENA.MIT.EDU>](/authors/derek_atkins_warlord_at_athena_mit_edu_)"
+ Return to "[Jeff Weinstein <jsw@netscape.com>](/authors/jeff_weinstein_jsw_at_netscape_com_)"
+ Return to "[Rob L <robl@on-ramp.ior.com>](/authors/rob_l_robl_at_onramp_ior_com_)"
+ Return to "[Sentiono Leowinata <sentiono@cycor.ca>](/authors/sentiono_leowinata_sentiono_at_cycor_ca_)"
+ Return to "[zoetrope@infinet.com](/authors/zoetrope_at_infinet_com)"

+ 1995-10-13 (Fri, 13 Oct 95 12:42:43 PDT) - [Netscape question transformed](/archive/1995/10/0fa4d2285ff017cd4e5a6242805af3244c861492bd135e4683e020feb9181186) -<EMAIL_ADDRESS>  + 1995-10-13 (Fri, 13 Oct 95 13:39:59 PDT) - [Re: Netscape question transformed](/archive/1995/10/65fe65ef907c42f7e1bf84f5e0f6c517be09df07bd73b5ba719dbe218df97342) - _Derek Atkins<EMAIL_ADDRESS>  + 1995-10-13 (Fri, 13 Oct 95 15:21:47 PDT) - [Re: Netscape question transformed](/archive/1995/10/f6028f8d7d404e25a00ea018845c0e39396f7968ea9c8807b363263e48094047) - _Rob L<EMAIL_ADDRESS>  + 1995-10-14 (Fri, 13 Oct 95 23:16:23 PDT) - [Re: Netscape question transformed](/archive/1995/10/48ae976b2c99b52f9eeee9a23359510a7af97b183689cbb66b96c3000e7de122) - _Jeff Weinstein<EMAIL_ADDRESS>    + 1995-10-14 (Sat, 14 Oct 95 12:23:08 PDT) - Re: Netscape question transformed - _Sentiono Leowinata<EMAIL_ADDRESS>


text:
<img src="https://github.com/rollasoul/clay_prayers/blob/master/16265646_243260219456703_1608198604390170781_n.jpg" width="400">

# clay_prayers
Densecap and torch-rnn create little prayers and metaphysical quotes out of clay. Client is raspberry pi (or any other machine running python)

# server setup

All of the files above for running the server are included in the docker image, no need to git clone them.

- install docker on remote server (ubuntu 16.04)
```
sudo apt-get install docker.io
```

- run docker image (will start download and image)
```
docker run -it -p 12345:12345 rollasoul/clay_phil
```

- run python script (loops clay.py to continuously listen for incoming data from client, analyses image with densecap, seeds haiku-captions to torch-rnn, generates quote, sends it back to client)
```
python clay-run.py
```

# raspberry pi setup:

Git clone the repository to get all the files.

- install fswebcam for external usb-camera
```
install fswebcam
```
- run python script (starts processing sketch, waits for light sensor to detect light change, takes image of clay, sends it to server, gets quote, displays it in sketch)
```
python clay_run_pi.py
```


text:
# Purpose

This image uses a combination of Nginx and Jbake to run a web server with a static site.

## 1. Flow

1. The developer works on a JBake site and commits the sources to a Git server (GitLab or GitHub, anything for Git) in a certain branch.
2. The code is checked out on start up of the image and is refreshed periodically using a cron job.
3. The static site is baked using JBake into a certain directory.
4. Nginx serves this static directory.

## 2. Current versions

JBake is not available on Debian Stretch, so it is installed using their preferred way: SDKMAN.  Nginx provided by Debian is also outdated, so it is installed using the repositories provided by the Nginx team. The JDK is Oracle's JDK provided by the upstream image.

- Jbake: 2.6.1.
- Nginx: 1.14.0.
- Oracle JDK: 8u181-b13 as provided by the debian-oracle image, only needed by JBake.
- Git: as provided by Debian.

## 3. Usage

### 3.1 Environment variables
This image has several environment variables that are used in the scripts to fetch data from the right repository and branch, set the location where the Jbake sources are and set the refresh timing. You can either provide them as separate environments or through an environment file when you run the image.

```
GIT_USER=XXX
GIT_PASSWORD=YYY
GIT_PROTOCOL=https
GIT_REPO=gitlab.asynchrone.net/jbake-site-repo.git
GIT_BRANCH=master
GIT_SSLVERIFY=true
JBAKE_SOURCE=src/jbake
JBAKE_INTERVAL="*/1 * * * *"
```

##### GIT_USER

The user used to connect to the Git server (for instance GitLab).

##### GIT_PASSWORD

The password for the user above.

##### GIT_PROTOCOL

The protocol (http or https) to connect to the Git server.

##### GIT_REPO

The URL of the repo (without the protocol).

##### GIT_BRANCH

The branch you want to checkout. This allows you to deploy a site in different environments according to the lifecycle of development (dev, qa, prod).

##### GIT_SSLVERIFY

This is a workaround for the moment used because the git clone command throws an error when connecting to some Git servers. To be solved in the future, but, if you have an authentication failure, set this to "false".

##### JBAKE_SOURCE

The root directory within your git repository where you did the "jbake -i" command. For me (vindevoy), I put my sources in /src/jbake. If you have the root directory of Jbake also as root of your repo, you can use a dot.

##### JBAKE_INTERVAL

The refresh interval for doing a Git pull and a new bake. This is a standard cron expression.  The above example refreshes the site every minute, which is most likely what you want for development but not for production.

### 3.2 Running the container

There are 2 important things to keep in mind when you run this container:

1. You must specify all the environment properties as described above.
2. You must call the /srv/script/start.sh script to start the container with (not /bin/bash). This script will pull the code, bake the site and start the Nginx server.

```
docker run --rm -t -d -p 80:80 --env-file /full-path-to/your-envionment-file.properties --name jbake1 dockeredcom/debian-webserver-jbake /srv/script/start.sh
```

# Support

This image is supported and maintained by Asynchrone.  Asynchrone is the owner of dockered.com (and user dockeredcom). If you have any problems, bugs or questions, please contact<EMAIL_ADDRESS>or<EMAIL_ADDRESS>Asynchrone will provide the best support possible. However, as this is a free and open source image, Asynchrone cannot guarantee any timing, nor solution. If you want a higher level of support, you may want to consider a paid support option. Contact<EMAIL_ADDRESS>for paid support questions.

repository: dockeredcom/debian-webserver-jbake

repo_name: dockeredcom/debian-webserver-jbake


text:
> A curated list of starting points, or boilerplates for you to use and learn from!

## Contents

- [Boilerplates](#boilerplates)
- [Packages](#packages)
- [Utilities](#utilities)
    - [Atom](#atom)
    - [Postman](#postman)

## Javascript Boilerplates

- [Meteor: Base](https://themeteorchef.com/base/introduction) - A starting point for Meteor apps
- [Meteor: AutoForm](https://github.com/aldeed/meteor-autoform) - Easily create basic forms with automatic insert and update events, and automatic reactive validation.
- [Meteor: Building Complex Forms](https://github.com/themeteorchef/building-complex-forms) - Demonstrates complex forms with a pizza delivery system
- [Meteor: Filesystem](https://github.com/vsivsi/meteor-file-sample-app)
- [Meteor: Instant Search](https://github.com/meteorhacks-samples/meteor-instant-search-demo)
- [Meteor: Todos](https://github.com/meteor/todos)
- [Meteor: Local Market](https://github.com/meteor/localmarket)
- [Meteor/React: PDFs](https://github.com/themeteorchef/react-pdfs)
- [Meteor/Materialize](http://www.kylephelps.com/technology/2016/6/20/meteor-boilerplate-with-materialize)
- [Node: Hackathon Starter](https://github.com/sahat/hackathon-starter)
- [Node: Flakes Admin UI](http://getflakes.com/) - Business software builder
- [CiscoDevNet](https://github.com/CiscoDevNet/coding-skills-sample-code) - Coding Skills Sample Code

## Packages

- [glyphicons](http://glyphicons.com/) - GLYPHICONS is a library of precisely prepared monochromatic icons and symbols, created with an emphasis to simplicity and easy orientation.
- [fontawesome](http://fontawesome.io/) - Font Awesome gives you scalable vector icons that can instantly be customized — size, color, drop shadow, and anything that can be done with the power of CSS
- [bert](https://github.com/themeteorchef/bert) - Bert is a client side, multi-style alerts system for Meteor
- [bootbox](http://bootboxjs.com) - Bootbox is the easiest way to generate and render modal dialogues
- [favico generator](http://realfavicongenerator.net/) - Favicon Generator. For real.
- [bootstrap](http://getbootstrap.com/) - Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.
- [react bootstrap](https://react-bootstrap.github.io/) - The most popular front-end framework, rebuilt for React.
- [bootswatch](https://bootswatch.com/) - Free themes for Bootstrap
- [datatables](https://datatables.net/) - Reactive Tables with built-in utilities
- [esignature](https://github.com/cunneen/meteor-signature-pad) - Signature pad
- [pdfmake](http://pdfmake.org/#/) - PDF creation from javascript
- [editable-text](https://atmospherejs.com/babrahams/editable-text) - Edit text reactively
- [flow-router](https://github.com/kadirahq/flow-router/) - Best meteor router
- [nginx + letsencrypt](https://blog.ibrahimzahoor.me/lets-encrypt-ssl-nginx-mup-deployment-meteor-3aea28b6dbd9) - Add a free SSL cert to your meteor app
- [PM2](http://pm2.keymetrics.io) - Advanced Node.js process manager / deploy to production
- [lodash](https://lodash.com/) - makes JavaScript easier by taking the hassle out of working with arrays, numbers, objects, strings, etc.
- [body-parser](https://www.npmjs.com/package/body-parser) - Parse incoming request bodies in a middleware before your handlers, available under the req.body property.

## Utilities

- [robomongo](https://robomongo.org/) - Mongo database explorer with a GUI
- [ngrok](https://ngrok.com/) - The DynDNS of Webhooks. No NATs required!
- [meteor toys](http://meteor.toys) - Insanely handy development tools for Meteor
- [requestb.in](http://requestb.in/) - Use RequestBin to see what your HTTP client is sending or to inspect and debug webhook requests.
- [postman](http://getpostman.com/) - Developing APIs is hard. Postman makes it easy.
- [atom](https://atom.io) - The Hackable IDE/text editor
- [json viewer](http://jsonviewer.stack.hu/) - A JSON viewer/editor
- [jsfiddle](https://jsfiddle.net/) - Online html/css/javascript viewer
- [regex tester](https://regex101.com/) - Regular expression formulator for a number of languages

## Postman
Import these collections into Postman to test API calls to your favorite services, just use your API key.

- [Cisco Spark](https://github.com/CiscoDevNet/postman-ciscospark)
- [Tropo](https://github.com/ObjectIsAdvantag/answering-machine)
- [Slack](https://github.com/wrongtarget/slack-api-postman)
- [Twilio](https://github.com/devinrader/Twilio-postman)
- [Box](https://docs.box.com/docs/box-postman-collection)
- [Cisco APIC-EM](https://github.com/CiscoDevNet/apic-em-samples-aradford/tree/master/tools/postman)
- [Salesforce](https://github.com/salesforce-marketingcloud/postman)
- [Google Maps](https://github.com/Geo-Developers/geocoders-postman-collection)
- [Yammer](https://github.com/yammer/yammer_api_postman_collection)
- [PayPal](https://github.com/UnexpectedEOF/paypal-rest-postman-collections)
- [Docusign](https://github.com/docusign/postman-esign-api-collection)
- [F5 Automation Labs](https://github.com/f5devcentral/f5-automation-labs)
- [Solidfire](https://github.com/solidfire/postman)

## Atom
Use these plugins for Atom to make debugging easier and coding more user friendly.

- [bracket matcher](https://github.com/atom/bracket-matcher)
- [tree view](https://github.com/atom/tree-view)
- [git diff](https://github.com/atom/git-diff)
- [markdown preview](https://github.com/atom/markdown-preview)
- [autocomplete](https://github.com/atom/autocomplete-plus)
- [tabs](https://github.com/atom/tabs)
- [language - javascript](https://github.com/atom/language-javascript)
- [language - python](https://github.com/atom/language-python)
- [language - ruby](https://github.com/atom/language-ruby)
- [language - java](https://github.com/atom/language-java)
- [language - shellscript](https://github.com/atom/language-shellscript)
- [language - perl](https://github.com/atom/language-perl)
- [language - c/c++](https://github.com/atom/language-c)
- [language - html](https://github.com/atom/language-html)
- [language - json](https://github.com/atom/language-json)
- [language - xml](https://github.com/atom/language-xml)

repository: levensailor/awesome-starter

repo_name: levensailor/awesome-starter


text:
If you're using our catalog to create a product or service we would appreciate if you would spread the word about this project.
It's not mandatory, but definitely helps us to grow bigger and the entire API ecosystem will benefit.

Pages which show some info from our catalog could have one of the following links:
 - **Powered by \<LOGO\>**
 - **API specs supplied by \<LOGO\>**

All links should point to http://APIs.guru, at the moment it's **temporarily** redirected to GitHub repo.

You should use only official logos:

| [Logo]| [Horizontal logo]| [Vertical logo]|
|-------|------------------|----------------|
|![Logo]|![Horizontal logo]|![Vertical logo] |

The correct way to write our name is **APIs.guru** with exact this combination of uppercase and lowercase letters.
We recommended using the [Sansation](http://www.dafont.com/sansation.font) font, or simply use the logo with name included.

If you want to write article or blog post, please use our banner image:
![Banner](https://raw.githubusercontent.com/APIs-guru/openapi-directory/master/branding/banner.svg)

### Adding an API to the collection

Please see the [FAQ](https://github.com/APIs-guru/openapi-directory/wiki/FAQ#how-can-i-add-an-api-to-the-collection) in the [wiki](https://github.com/APIs-guru/openapi-directory/wiki/)

[Logo]: https://apis.guru/branding/logo.svg "Logo"
[Vertical logo]: https://apis.guru/branding/logo_vertical.svg "Vertical logo"
[Horizontal logo]: https://apis.guru/branding/logo_horizontal.svg "Horizontal logo"
[Banner]: https://apis.guru/branding/banner.svg

repository: mofahimian/openapi-directory

repo_name: mofahimian/openapi-directory


text:
Quantum Chip
============
Garry's Mod in-game scripting language.

How to compile
==============
Since this project is written in LuaAdvanced, you first need to download the LuaAdvanced compiler from [here](https://github.com/szymski/LuaAdvanced).

Credits
==============
[Oskar94](https://github.com/oskar94) - for code editor component

[Rusketh](https://github.com/Rusketh) - for making Expression Advanced 2 which really helped me making QC

repository: szymski/QuantumChip

repo_name: szymski/QuantumChip


text:
# Working with Binary Data in Classic ASP

[![Contributors][contributors-shield]][contributors-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![MIT License][license-shield]][license-url]
[![LinkedIn][linkedin-shield]][linkedin-url]
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/cloudposse.svg?style=social&label=Follow%20%40coderProNet)](https://twitter.com/coderProNet)
[![GitHub](https://img.shields.io/github/followers/coderpros?label=Follow&style=social)](https://github.com/coderpros)

[contributors-shield]: https://img.shields.io/github/contributors/coderpros/classic-asp-working-with-binary-data.svg?style=flat-square
[contributors-url]: https://github.com/coderpros/classic-asp-working-with-binary-data/graphs/contributors
[forks-shield]: https://img.shields.io/github/forks/coderpros/classic-asp-working-with-binary-data?style=flat-square
[forks-url]: https://github.com/coderpros/classic-asp-working-with-binary-data/network/members
[stars-shield]: https://img.shields.io/github/stars/coderpros/classic-asp-working-with-binary-data.svg?style=flat-square
[stars-url]: https://github.com/coderpros/classic-asp-working-with-binary-data/stargazers
[issues-shield]: https://img.shields.io/github/issues/coderpros/classic-asp-working-with-binary-data?style=flat-square
[issues-url]: https://github.com/coderpros/classic-asp-working-with-binary-data/issues
[license-shield]: https://img.shields.io/github/license/coderpros/classic-asp-working-with-binary-data?style=flat-square
[license-url]: https://github.com/coderpros/classic-asp-working-with-binary-data/master/LICENSE
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=flat-square&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/company/coderpros
[twitter-shield]: https://img.shields.io/twitter/follow/coderpronet?style=social
[twitter-follow-url]: https://img.shields.io/twitter/follow/coderpronet?style=social
[github-shield]: https://img.shields.io/github/followers/coderpros?label=Follow&style=social
[github-follow-url]: https://img.shields.io/twitter/follow/coderpronet?style=social

> Classic ASP doesn't make it particularly easy for developers to work with binary data or files received from forms. This project shows you how to from send a file from
one classic ASP website to another.

## Change Log
* 2021/10/01: Project creation / initial checkin.

## Notes


text:
---
layout: kanji
v4: 513
v6: 552
kanji: 県
keyword: prefecture
elements: prefecture, eye, fishhook, small, little
strokes: 9
image: E79C8C
on-yomi: ケン
kun-yomi: か.ける
permalink: /rtk/県/
prev: 歳
next: 栃
---

1) [AndamanIslander] 6-4-2008(206): In Japanese this is KEN, as in Barbie's boyfriend. He has lovely blue eyes, a girlfriend who is as thin as a straightened out fish hook. But, down where it counts, he has very little to show...

2) [smithsonian] 9-1-2007(177): After sticking a fishhook in your eye, the yakuza boss probably has little more to do to convince you to move to a different prefecture.

3) [kresobilan] 5-3-2008(81): Smaller administrative units, hooked together by a (Sauron's) central eye.

4) [raulir] 25-4-2006(53): Contradictory to what Heisig says, there is no eye of a needle in this picture, because that would be the top part of 直 . Instead, there is the eye of a fishhook. I will not hazard a guess as to what lives in such a place, but in fact the eye of a fishhook - as it has well-defined borders - makes a small prefecture of its own.


text:
# (Upon) Further Review

[![Build Status][travis-badge]][travis-link]
[![Coverage Status][coveralls-badge]][coveralls-link]
[![Dependency Status][dependency-badge]][dependency-link]

**Further Review** enforces glob based code reviews on PRs.

* [Getting Started](#getting-started)
* [How it works](docs/how-it-works.md)
* [Providers](docs/providers.md)
* [Watch / Subscriptions only](#using-for-glob-based-watch--subscriptions)
* [Inspirations](#inspirations)

## Getting Started

There are a number of ways to use Further Review with your repo, but the easiest is to just add a **.further-review.yml** file similar to this example:

```yaml
reviews:
  - name: Package.json Maintainers
    # List of GitHub usernames
    logins:
      # All three of the following formats are supported:
      - paultyng
      - paultyng<EMAIL_ADDRESS>      - Paul Tyng<EMAIL_ADDRESS>(@paultyng)
    # Optional glob to match on
    glob: package.json
    # Number of required sign offs
    required: 1
  # Multiple reviews can be listed.
  - name: General Maintainers
    logins:
      - user1
      - user2
```

Given the file above, when a new PR is submitted, at least one of **user1** or **user2** will need to sign off due to the `General Maintainers` rule, and if the PR touches the **package.json** file, **paultyng** would also need to sign off.

### Preliminary Setup

#### Github Access Token

Create a [personal access token](https://github.com/settings/tokens):
![Setting a personal access token](docs/img/access-token.png)

### Installation

#### Docker

```bash
> git clone git@github.com:underarmour/further-review.git
> cd further-review
> docker build .
> docker run --env GITHUB__TOKEN=<token> <image_id>
```

To run in Github Enterprise, use:

```bash
> docker run --env GITHUB__TOKEN=<token> --env GITHUB__BASE_URL=<api_path> <image_id>
```

#### Lambda

This application uses [Apex](http://apex.run) to run on AWS Lambda.  To deploy on Lambda:

1. Create an **env.json** file (`GITHUB_BASE_URL` defaults to public GitHub):

  ```json
  {
    "GITHUB_TOKEN": "YOUR ACCESS TOKEN HERE",
    "GITHUB_BASE_URL": "https://api.github.com/"
  }
  ```

1. Run `apex deploy -e env.json`

#### Setting up the Webhooks

> ##### Local Development Note
You'll need a tunnel or public ip for github to reach your hook.
If you don't have a public host, you can use a service like [ngrok](https://ngrok.com/).

A webhook should be configured in GitHub with the payload URL of
```
http://<host or ip from docker or Lambda>/github-webhook
```
with the following events:

* Issue comment
* Pull request
* Pull request review comment

### Additional Setup

#### Protecting the Branch

Further Review works best when the `master` branch is protected until it reviews the PR.  You can set this up in GitHub settings for the repo.

![Protecting the master branch](docs/img/protect-branch.png)

## Using for Glob based Watch / Subscriptions

To just subscribe to files for notification but not be required for review, you can add a targeted review with zero required sign-offs.

## Whitelisted Users / Tools

When using a tool that creates automatically managed PRs, such as Greenkeeper or Renovate, you may wish to bypass FR.

Use the `users_whitelist` config setting to provide a list of users.  If a PR is opened for a user in that list, the status check
will be marked as successful and the providers will not run against it.

```yaml
users_whitelist:
  - greenkeeper
  - renovate
reviews:
  - name: Package.json Maintainers
    # List of GitHub usernames
    logins:
      # All three of the following formats are supported:
      - paultyng
      - paultyng<EMAIL_ADDRESS>      - Paul Tyng<EMAIL_ADDRESS>(@paultyng)
    # Optional glob to match on
    glob: package.json
    # Number of required sign offs
    required: 1
  # Multiple reviews can be listed.
  - name: General Maintainers
    logins:
      - user1
      - user2

```

## Inspirations

* [LGTM](https://lgtm.co)
* [Facebook's Mention Bot](https://github.com/facebook/mention-bot)

[travis-badge]: https://travis-ci.org/underarmour/further-review.svg?branch=master
[travis-link]: https://travis-ci.org/underarmour/further-review
[coveralls-badge]: https://coveralls.io/repos/github/underarmour/further-review/badge.svg?branch=master
[coveralls-link]: https://coveralls.io/github/underarmour/further-review?branch=master
[dependency-badge]: https://dependencyci.com/github/underarmour/further-review/badge
[dependency-link]: https://dependencyci.com/github/underarmour/further-review

repository: CKarper/further-review

repo_name: CKarper/further-review


text:
# ![gibet](https://raw.githubusercontent.com/aornota/gibet/master/src/ui/public/gibet-24x24.png) | gibet (ρ)

An **opinionated** (i.e. decidedly eccentric) "scaffold"/example for full-stack [F#](http://fsharp.org/) web-app development using [Fable](http://fable.io/),
[Elmish](https://elmish.github.io/), [Fulma](https://fulma.github.io/Fulma/) / [Bulma](https://bulma.io/), [Fable.Remoting](https://github.com/Zaid-Ajaj/Fable.Remoting/),
[Elmish.Bridge](https://github.com/Nhowka/Elmish.Bridge/), [Giraffe](https://github.com/giraffe-fsharp/Giraffe/) and [ASP.NET Core](https://docs.microsoft.com/en-us/aspnet/core/).

The [example web-app](https://gibet.azurewebsites.net/) is running on Azure - albeit on a free service plan (F1), which limits the number of concurrent websocket connections to a
paltry 5.

And yes, I know that a _gibet_ (gibbet) is not the same as a scaffold - but I love Ravel's _Gaspard de la nuit_, especially _[Le Gibet](https://www.youtube.com/watch?v=vRQF490yyAY/)_.

#### Development prerequisites

- [Microsoft .NET 5.0 SDK](https://dotnet.microsoft.com/download/dotnet/5.0): I'm currently using 5.0.400
- [Yarn](https://yarnpkg.com/lang/en/docs/install/): I'm currently using 1.22.5
- [Node.js (LTS)](https://nodejs.org/en/download/): I'm currently using 14.17.5

##### Also recommended

- [Microsoft Visual Studio Code](https://code.visualstudio.com/download/) with the following extensions:
    - [Microsoft C#](https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp)
    - [Ionide-fsharp](https://marketplace.visualstudio.com/items?itemName=ionide.ionide-fsharp)
    - [Microsoft Debugger for Chrome](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome)
    - [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=editorconfig.editorconfig)
    - [Rainbow Brackets](https://marketplace.visualstudio.com/items?itemName=2gua.rainbow-brackets)
- [Google Chrome](https://www.google.com/chrome/) with the following extensions:
    - [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi/)
    - [Redux DevTools](https://chrome.google.com/webstore/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd/)
- ([Microsoft .NET Framework 4.7.2 Developer Pack](https://dotnet.microsoft.com/download/dotnet-framework/net472/): this appeared to resolve problems with Intellisense in
_[build.fsx](https://github.com/aornota/gibet/blob/master/build.fsx)_)

#### History

- Installed SAFE templates for .NET Core: _dotnet new -i "SAFE.Template::*"_
- Created from template: _dotnet new SAFE --server giraffe --layout fulma-basic --communication remoting --pattern default --deploy azure --js-deps yarn_

#### Running / building / publishing / deploying

- Before first running:
    - _dotnet tool restore_
    - _dotnet paket install_
- Build targets:
    - Run/watch for development (debug): _dotnet fake build -t run_
    - Build for production (release): _dotnet fake build -t build_
    - Publish for production (release): _dotnet fake build -t publish_
    - Deploy to Azure (release): _dotnet fake build -t deploy-azure_;
see [Registering with Azure](https://safe-stack.github.io/docs/legacy-template-azure-registration/) and [Deploy to App Service](https://safe-stack.github.io/docs/legacy-template-appservice/)
    - Run the dev-console (debug): _dotnet fake build -t run-dev-console_
    - Help (lists key targets): _dotnet fake build -t help_ (or just _dotnet fake build_)

#### Unit tests

There are no unit tests yet ;(

However, the repository and web API services have been designed to work with ASP.NET Core dependency injection, which should also facilitate unit testing.

See _[test-users-repo-and-users-agent.fs](https://github.com/aornota/gibet/blob/master/src/dev-console/test-users-repo-and-users-agent.fs)_ for an example of "testing" IUsersRepo
(e.g. fake implementation) and UsersApi (e.g. UsersAgent) from a console project.

### To do

- [ ] extend functionality, e.g. Sqlite users repository? | &c.
- [ ] unit tests? AspNetCore.TestHost?
- [ ] additional documentation, e.g. [(currently non-existent) gh-pages branch](https://aornota.github.io/gibet/)?

repository: aornota/gibet

gha_language: F#

repo_name: aornota/gibet


text:
# Changelog

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

## [0.1.0] - 2021-11-22

We're super excited to announce FLUTE: Federated Learning Utilities for Testing and Experimentation, a platform for conducting high-performance federated learning simulations!

This first release fully focuses on implementing fast prototyping to validate different CL scenarios
in an Federated environment.

### Features

- large scale simulation (millions of clients, sampling tens of thousands per round).
- multi-GPU and multi-node orchestration backed up by MPI.
- local or global differential privacy.
- model quantization.
- a variety of standard optimizers and aggregation methods.
- most model types including CNNs, RNNs, and Huggingface Transformers.
- extensibility, enabling new models, dataloaders, optimizers, and aggregators.
- local or cloud-based job staging using AzureML.

## [1.0.0] - 2022-08-29

This release contain major changes in the communication backbone , in order
to run previous experiments you have already integrated in FLUTE, please make sure
to use `torch.distributed` instead of `MPI `to launch the jobs. For more documentation
about the new command, please refer to the [README](README.md).

### New features

- 🏎 Better performance: Support for NCCL and Gloo as backend communication protocols.
  - Improvements in GPU utilization and overall communication speed (on the order of minutes!) for projects with huge models and datasets.
- 🌟 Remove file type dependency on client.py, now FLUTE can receive any kind of dataset and even download the data on-the-fly. The data intantiation is completely under control of each task dataset.
  - In older versions FLUTE only allowed `json` and `hdf5` files, so the client could recognize it.
- 🌟 Abstract classes for new models/dataloaders.
- 🌟 Allows Federated Learning with Personalization.
  - Personalization allows you to leverage each client local data to obtain models that are better adjusted to their own data distribution. You can run the `cv` task in order to try out this feature.

## [1.0.1] - 2023-07-29

🔋 This release removes the restriction of the minimum number of GPUs available in FLUTE,
allowing users to run experiments using a single-GPU worker by instantiating both: Server
and clients on the same device. For more documentation about how to run an experiments
using a single GPU, please refer to the [README](README.md).

### New features

- 🌟 Include FedProx aggregation method

repository: microsoft/msrflute

gha_language: Python

repo_name: microsoft/msrflute


text:
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

**Expected behavior**
A clear and concise description of what you expected to happen.

**Code or Screenshots**
If applicable, add a minimal and self contained code example or screenshots to help explain your problem.

```python
def foo(self) -> str:
    return 3
```

**Additional context**
Add any other context about the problem here.

 - OS [e.g. Windows]
 - RxPY version [e.g 4.0.0]
 - Python version [e.g. 3.10.2]

repository: ReactiveX/RxPY

repo_name: ReactiveX/RxPY


text:
# sphinx-exercise

[![Documentation Status][rtd-badge]][rtd-link]
[![Github-CI][github-ci]][github-link]
[![Coverage Status][codecov-badge]][codecov-link]

**An exercise extension for Sphinx**.

This package contains a [Sphinx](http://www.sphinx-doc.org/en/master/) extension
for producing exercise and solution directives.

## Get started

To get started with `sphinx-exercise`, first install it through `pip`:

```
pip install sphinx-exercise
```

then, add `sphinx_exercise` to your sphinx `extensions` in the `conf.py`

```python
...
extensions = ["sphinx_exercise"]
...
```

## Documentation

See the [Sphinx Exercise documentation](https://ebp-sphinx-exercise.readthedocs.io/en/latest/) for more information.

## Contributing

We welcome all contributions! See the [EBP Contributing Guide](https://executablebooks.org/en/latest/contributing.html) for general details, and below for guidance specific to sphinx-exercise.

[rtd-badge]: https://readthedocs.org/projects/ebp-sphinx-exercise/badge/?version=latest
[rtd-link]: https://ebp-sphinx-exercise.readthedocs.io/en/latest/?badge=latest
[github-ci]: https://github.com/executablebooks/sphinx-exercise/workflows/continuous-integration/badge.svg?branch=master
[github-link]: https://github.com/executablebooks/sphinx-exercise
[codecov-badge]: https://codecov.io/gh/executablebooks/sphinx-exercise/branch/master/graph/badge.svg
[codecov-link]: https://codecov.io/gh/executablebooks/sphinx-exercise

repository: fmaussion/sphinx-exercise

repo_name: fmaussion/sphinx-exercise