This file contains hidden or 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/python | |
"""" | |
Counts the number of heartbeats per minute. | |
For example, you can use it to count your mp3's bpm or your number or heartbeats or breaths per minute. | |
$ python bpm.py | |
BPM - Calcule les bpm sur les 4 derniers beats. | |
Appuyer sur a chaque beat, 'q' pour quitter. |
This file contains hidden or 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
# http://corkami.googlecode.com/svn/trunk/src/HexII/ | |
$ ./hello | |
Hello world | |
$ hexdump hello | |
0000000 ce fa ed fe 07 00 00 00 03 00 00 00 02 00 00 00 | |
0000010 02 00 00 00 88 00 00 00 01 00 00 00 01 00 00 00 | |
0000020 38 00 00 00 5f 5f 54 45 58 54 00 00 00 00 00 00 | |
0000030 00 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 |
This file contains hidden or 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
// | |
// main.m | |
// Unicode | |
// | |
// Created by Nicolas Seriot on 26/07/14. | |
// Copyright (c) 2014 Nicolas Seriot. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <AppKit/AppKit.h> |
This file contains hidden or 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 | |
HIGH_BITS_MAX = 0xFF | |
LOW_BITS_MAX = 0xFF | |
def write_plane(plane_number, path): | |
with open(path, 'w+') as f: | |
f.write("""<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
"http://www.w3.org/TR/html4/strict.dtd"> |
This file contains hidden or 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
// | |
// main.m | |
// Unicode | |
// | |
// Created by Nicolas Seriot on 26/07/14. | |
// Copyright (c) 2014 Nicolas Seriot. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> | |
#import <AppKit/AppKit.h> |
This file contains hidden or 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
see https://github.com/nst/HTTPRequests |
This file contains hidden or 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
__Add Submodule__ | |
git submodule add https://github.com/username/Module | |
┌─────────────────────────┐ | |
│ MyProject │ | |
│ ┌────────────────┐ │ | |
│ │ Module │ │ | |
│ └────────────────┘ │ | |
└─────────────────────────┘ |
This file contains hidden or 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 | |
""" | |
For some reason, Strava lets you export the GPX of another athletes but removes | |
the timestamps, presumably so that you can't "steal" their paths. | |
This script adds fake timestamps to these GPX files, so that you see the | |
overview of the run in other services like doarama for instance. | |
Technically, the script adds a timstamp after the </ele> tag, +1s at each point: |
This file contains hidden or 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
// go build test_json.go | |
// echo -n "[1e1000]" > n.json | |
// ./test_json n.json | |
// echo $? # 0 - failed to parse valid JSON | |
// echo -en '["\xFF"]' > s.json | |
// ./test_json s.json | |
// echo $? # 1 - parsed invalid JSON |
This file contains hidden or 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/python | |
__author__ = "Nicolas Seriot" | |
__date__ = "2017-05-24" | |
# http://mathworld.wolfram.com/ElementaryCellularAutomaton.html | |
# https://en.wikipedia.org/wiki/Rule_110 | |
import png |