Skip to content

Instantly share code, notes, and snippets.

Avatar
🏡
Working from home

Hervé Beraud 4383

🏡
Working from home
View GitHub Profile
@4383
4383 / file.yaml
Created Apr 30, 2018
YAML file sample for niet testing purpose
View file.yaml
# /path/to/your/file.yaml
project:
meta:
name: my-project
foo: bar
list-items:
- item1
- item2
- item3
@4383
4383 / file.json
Created Apr 30, 2018
JSON file sample for niet testing purpose
View file.json
{
"project": {
"meta": {
"name": "my-project"
}
},
"foo": "bar",
"list-items": [
"item1",
"item2",
@4383
4383 / README-Template.md
Created May 2, 2018 — forked from PurpleBooth/README-Template.md
A template to make good README.md
View README-Template.md

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.

Prerequisites

@4383
4383 / git.sh
Last active May 4, 2018
Git rebase the root commit
View git.sh
git rebase -i --root
# edit on the root commit
git commit --amend --no-edit # per example
# or change the commit date
git commit --amend --date="Wed Feb 16 14:00 2011 +0100"
# or change the commit author
git commit --amend --author="Hervé Beraud"
git rebase --continue
View classifier_from_little_data_script_1.py
'''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
@4383
4383 / enumerate_interfaces.py
Last active Jun 26, 2018 — forked from pklaus/enumerate_interfaces.py
Python: List all Network Interfaces On Computer
View enumerate_interfaces.py
# 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.
@4383
4383 / docker.sh
Last active Jul 5, 2018
docker tips and tricks
View docker.sh
# remove all container by ID
for el in $(docker ps -a --format "{{.ID}}"); do docker rm $el; done
# remove all images by ID
for el in $(docker images --format "{{.ID}}"); do docker rmi $el; done
@4383
4383 / compress-pdf.sh
Last active Aug 9, 2018
Bash functions to compress pdf files
View compress-pdf.sh
## Bash functions to compress pdf files
## Usage:
## $ source compress-pdf.sh
## $ compress-pdf-medium
function compress-pdf-medium {
# Medium level compression
# Medium does mean it's the medium quality level
gs \
-sDEVICE=pdfwrite \
-dCompatibilityLevel=1.4 \
@4383
4383 / irc.md
Created Sep 17, 2018 — forked from xero/irc.md
irc cheat sheet
View irc.md

#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.
@4383
4383 / keybase.md
Last active Nov 5, 2018
keybase.md
View keybase.md

Keybase proof

I hereby claim:

  • I am 4383 on github.
  • I am 4383 (https://keybase.io/4383) on keybase.
  • I have a public key whose fingerprint is 0695 6466 CF91 B28D EEB4 554F 07C1 7441 3641 8D7A

To claim this, I am signing this object: