One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
# Use those functions to enumerate all interfaces available on the system using Python. | |
# found on <http://code.activestate.com/recipes/439093/#c1> | |
import socket | |
import fcntl | |
import struct | |
import array | |
def all_interfaces(): | |
max_possible = 128 # arbitrary. raise if needed. |
'''This script goes along the blog post | |
"Building powerful image classification models using very little data" | |
from blog.keras.io. | |
It uses data that can be downloaded at: | |
https://www.kaggle.com/c/dogs-vs-cats/data | |
In our setup, we: | |
- created a data/ folder | |
- created train/ and validation/ subfolders inside data/ | |
- created cats/ and dogs/ subfolders inside train/ and validation/ | |
- put the cat pictures index 0-999 in data/train/cats |
#IRC Reference
Not intended as a guide for newbies, more like a "cheat sheet" for the somewhat experienced IRC user, especially one who wields some power over a channel.
##The Basics
/join #channel
/part #channel
export OS_PROJECT_DOMAIN_NAME='Default' | |
export OS_USER_DOMAIN_NAME='Default' | |
export OS_PROJECT_NAME='admin' | |
export OS_USERNAME='admin' | |
export OS_AUTH_URL=http://192.168.24.2:5000/ | |
export OS_AUTH_TYPE='password' | |
export OS_IDENTITY_API_VERSION='3' | |
export OS_PASSWORD=$(hiera -c /etc/puppet/hiera.yaml keystone::admin_password) |
#!/bin/bash | |
set -e | |
containers_total=${1:-100} | |
containers_concur=${2:-10} | |
container_image=${3:-docker.io/library/busybox} | |
podman pull $container_image | |
docker pull $container_image | |
rm -f bench-jobs.txt |
./tools/trigger-job.py --job periodic-foobar-proposal --project dev/foobar --pipeline periodic --url https://zuul.example.org/p --logpath /dev/null --newrev refs/heads/master --refname refs/heads/master |
# So interestingly, Signature seems to be twice as fast in Python 3.6 and 3.7 as it | |
# was in Python 3.3 and 3.4. However, it is still 6-18 times slower than the old | |
# getargspec or getfullargspec that was in Python 3.3. | |
Python 2.7 getargspec (doesn't use Signature) : specimen_one (6 args) : 0.0503 | |
Python 2.7 getargspec (doesn't use Signature) : specimen_two (0 args) : 0.0496 | |
Python 2.7 getargspec (doesn't use Signature) : specimen_three (6 args) : 0.0500 | |
Python 2.7 getargspec (doesn't use Signature) : specimen_four (13 args) : 0.0652 | |
Python 3.3 getfullargspec (doesn't use Signature) : specimen_one (6 args) : 0.0539 |
#!/bin/bash | |
set -e | |
enable_env() { | |
local env_name="$1" | |
local env_dir=".tox/${env_name}" | |
if [ ! -d "${env_dir}" ]; then | |
if [ ! -f tox.ini ]; then | |
echo 'No tox.ini found' >&2 |