This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from setuptools import setup, find_packages | |
requires = [ | |
'cliff', | |
'requests', | |
'numpy', | |
'scipy', | |
'Orange', | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <future> | |
#include <thread> | |
#include <algorithm> | |
#include <cstdlib> | |
#include <sstream> | |
#include <mutex> | |
#include <map> | |
#include <string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The referenced line of code is inside the async in example.cpp here: | |
m.lock(); | |
std::cout << "Starting new thread: " << std::this_thread::get_id() << std::endl; | |
std::cout << "Path: " << entry.path() << std::endl; // example.cpp:37 | |
m.unlock(); | |
---------------- | |
==30211== Thread 4: | |
==30211== Invalid read of size 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require("http"); | |
var url = require('url'); | |
var queryString = require('querystring') | |
var API_KEY = "THE_API_KEY"; | |
var FEED = "THE_FEED_ID"; | |
var STREAM = "THE_STREAM_NAME"; | |
var NUM_ATTENDEES = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def stream_handler(sock, address): | |
""" | |
The first 8 bytes, 64 bits, should be the size of the transfer in network | |
byte order. Transfer size type is unsigned 64 bit integer. | |
Total transfer size T ends up being T + 8. | |
""" | |
import math | |
data = '' | |
# TODO: allow read size to be configured in settings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def read_bytes(length): | |
with open('/dev/urandom') as data: | |
data = os.read(data.fileno(), length) | |
return data | |
def send(conn, data): | |
sent = 0 | |
while sent < len(data): | |
SEMAPHORE.acquire() | |
sent += conn.send(data[sent:]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
You must have nmap installed with the ssl-heartbleed script and its | |
dependencies (tls.lua) in the current directory. | |
You also need xsltproc for html output. | |
The first argument should be a file containing a list of ips, one ip per line, | |
no blank lines. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%matplotlib inline | |
from datetime import date, timedelta | |
RACE_DISTANCE = 200 | |
CLIMBING_DISTANCE = 4219 | |
RACE_DATE = date(2014, 7, 26) | |
RATE = 0.10 | |
PERCENT_OF_TARGET = .80 | |
TODAY = date.today() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Ubuntu Latest | |
After=etcd.service | |
After=docker.service | |
[Service] | |
ExecStart=/usr/bin/docker run --name ubuntu-latest ubuntu /bin/bash -c "while true; do sleep 60; done" | |
ExecStop=/usr/bin/docker stop ubuntu-latest | |
[Install] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat<<-EOF > /etc/systemd/system/ | |
[Unit] | |
Description=Docker Application Container Engine | |
Documentation=http://docs.docker.io | |
[Service] | |
ExecStartPre=/bin/mount --make-rprivate / | |
# Run docker but don't have docker automatically restart | |
# containers. This is a job for systemd and unit files. | |
ExecStart=/usr/bin/docker -d -s=btrfs -r=false --tlsverify --tlscacert=/var/ssl/ca.pem --tlscert=/var/ssl/server-cert.pem --tlskey=/var/ssl/server-key.pem -H fd:// |
OlderNewer