Skip to content

Instantly share code, notes, and snippets.

Working from home

Hervé Beraud 4383

Working from home
View GitHub Profile
4383 /
Last active Jun 26, 2018 — forked from pklaus/
Python: List all Network Interfaces On Computer
# Use those functions to enumerate all interfaces available on the system using Python.
# found on <>
import socket
import fcntl
import struct
import array
def all_interfaces():
max_possible = 128 # arbitrary. raise if needed.
4383 /
Created May 2, 2018 — forked from PurpleBooth/
A template to make good

Project Title

One Paragraph of project description goes here

Getting Started

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.


'''This script goes along the blog post
"Building powerful image classification models using very little data"
It uses data that can be downloaded at:
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
4383 /
Created Sep 17, 2018 — forked from xero/
irc cheat sheet

#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
    • Joins the specified channel.
  • /part #channel
    • Leaves the specified channel.
View gist:8b33eef07fb6b5de044bb4541c19599b
export OS_USER_DOMAIN_NAME='Default'
export OS_PROJECT_NAME='admin'
export OS_USERNAME='admin'
export OS_AUTH_URL=
export OS_AUTH_TYPE='password'
export OS_PASSWORD=$(hiera -c /etc/puppet/hiera.yaml keystone::admin_password)
4383 /
Created Feb 1, 2019 — forked from bogdando/
Comparing the time it takes to launch containers concurrently for docker and podman runtimes
set -e
podman pull $container_image
docker pull $container_image
rm -f bench-jobs.txt
./tools/ --job periodic-foobar-proposal --project dev/foobar --pipeline periodic --url --logpath /dev/null --newrev refs/heads/master --refname refs/heads/master
4383 /
Created May 17, 2019 — forked from zzzeek/
Python getargspec, getfullargspec, Signature performance comparison
# 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
4383 /
Created Jun 21, 2019 — forked from zaneb/
Run flake8 against only files that have changed
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