Semaphore implementation in rust taken from the previously deprecated std-semaphore
If you have two threads, executing the following:
| Thread A | Thread B |
Semaphore implementation in rust taken from the previously deprecated std-semaphore
If you have two threads, executing the following:
| Thread A | Thread B |
#!/usr/bin/python | |
from bcc import BPF | |
from time import sleep | |
# This outputs a count of how many times the clone and execve syscalls have been made | |
# showing the use of an eBPF map (called syscall). | |
program = """ | |
BPF_HASH(syscall); |
<?hh // strict | |
namespace adventofcode\two; | |
use namespace HH\Lib\C; | |
<<__Entrypoint>> | |
async function main(): Awaitable<noreturn> { | |
$file_contents = await read_file("input.txt"); | |
$parsed_items = \explode("\n", $file_contents); |
#[derive(Debug)] | |
pub struct Demo { | |
f: i32 | |
} | |
#[derive(Debug)] | |
pub struct Other { | |
a: Demo, | |
b: Demo | |
I hereby claim:
To claim this, I am signing this object:
public class AnimatedActivity extends Activity | |
{ | |
@Override | |
protected void onCreate(Bundle savedInstanceState) | |
{ | |
super.onCreate(savedInstanceState); | |
//opening transition animations | |
overridePendingTransition(R.anim.activity_open_translate,R.anim.activity_close_scale); | |
} |
Attention: if you attempt to fork this gist, github will think that you are a spammer and you will have to confirm that you are human with them. Apparantly there are too many links in this list. Also I update it rather frequently (see revisions on the left), so it's probably wise to not fork it anyway.
package trapeziumIntegral; | |
import java.util.ArrayList; | |
import java.util.LinkedList; | |
import java.util.List; | |
import mathematics.IntervalInterface; | |
import mathematics.MathFunctionInterface; | |
/* |
This Python script creates a git repo with your tweets. Obviously its limited by Twitter API limitations as you cannot retrieve more than 3200 tweets at a time.
Given the fact that Twitter doesn't give a fuck about our data, you may not find your old tweets ever again. So nothing is better than keeping an archive of tweets as a Git repo.
This is inspired by @holman's tweets repo. But this doesn't have a dependency on Madrox. Just plain Python and Git.
To create an archive of tweets initiate a git repo in a directory with git init
. Then put the script in the directory and execute: