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/bash | |
#File: git-diffbeyond | |
#Author: Yves Chevallier <[email protected]> | |
#Date: 2015-03-24 Tue 02:16 PM | |
head="HEAD~1" | |
# Create temporary folder | |
OUT="$(mktemp -d)" | |
# Copy current files into this folder |
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/python | |
import os | |
import loremipsum | |
import random | |
import bisect | |
import numpy | |
import textwrap | |
class RandomWeight: | |
def __init__(self, weight): |
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
### Keybase proof | |
I hereby claim: | |
* I am nowox on github. | |
* I am nowox (https://keybase.io/nowox) on keybase. | |
* I have a public key ASCn7HlZniQK49Xt9ayx717TlY68s7kLY2v-npo8f0QKCgo | |
To claim this, I am signing this object: |
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/python | |
import cProfile, pstats, StringIO | |
from random import choice, random | |
import copy | |
import collections | |
class DataGenerator(object): | |
depth = 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
#!/usr/bin/env python | |
"""Update of new names in source code after massive file rename onto a Git repository. | |
This script considers: | |
- The script is located at the root of the Git repository | |
- The head of the branch where the files were renamed is checkout | |
- This branch as a common ancestor with the master | |
- This common ancestor is used for the diff |
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
]10;#d0d0d0]11;#151515]12;#FD9D4F]4;262;#FD9D4F]4;0;#252525]4;8;#4a5a5a]4;1;#AC4142]4;9;#b26364]4;2;#90A959]4;10;#A6BB7B]4;3;#F4BF75]4;11;#F8D5A5]4;4;#6A9FB5]4;12;#8CB5C6]4;5;#AA759F]4;13;#BE95B5]4;6;#75B5AA]4;14;#97C7BE]4;7;#D0D0D0]4;15;#F5F5F5[5 q[0m[0;32m(0) [0;33m~[0m $ [0mvi .minttyrc [C[3P-u NONE | |
[?1049h[?1h=[1;51r[?12;25h[?12l[?25h[27m[23m[m[H[2J[?25l[2;1H[94m~ [3;1H~ [4;1H~ [5;1H~ [6;1H~ [7;1H~ |
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
In [119]: d = { | |
...: 'test1': { | |
...: 0: {'a': {'min': 1, 'mid': 12, 'max': 13}, | |
...: 'b': {'min': 2, 'mid': 22, 'max': 23}}, | |
...: 3: {'a': {'min': 3, 'mid': 32, 'max': 33}, | |
...: 'b': {'min': 4, 'mid': 42, 'max': 43}}, | |
...: 8: {'a': {'min': 5, 'mid': 52, 'max': 53}, | |
...: 'b': {'min': 6, 'mid': 62, 'max': 63}}, | |
...: }, | |
...: 'test2': { |
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
In [297]: d = {0: {'foo': {'a': 12.68, 'b': 54.44, 'c': 83.98}, | |
...: 'bar': {'a': 11.73, 'b': 53.34, 'c': 82.93}}, | |
...: 2: {'foo': {'a': 11.12, 'b': 57.99, 'c': 81.05}, | |
...: 'bar': {'a': 10.05, 'b': 56.12, 'c': 80.01}}, | |
...: 1: {'foo': {'a': 13.41, 'b': 54.32, 'c': 82.74}, | |
...: 'bar': {'a': 12.77, 'b': 53.15, 'c': 82.01}}} | |
In [298]: ds = (pd.DataFrame.from_dict(d, orient='index') | |
...: .stack().apply(pd.Series) | |
...: .rename_axis(['experiment', 'setup'])) |
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
~ $ cd test | |
~/test $ git init | |
git clone --depth=1 --no-checkout ../sub sub | |
git submodule add ../sub sub | |
git submodule absorbgitdirs | |
# note there is no "submodule.sub.sparsecheckout" key | |
git -C sub config core.sparseCheckout true | |
echo bar >>.git/modules/sub/info/sparse-checkout | |
git submodule update subInitialized empty Git repository in /cygdrive/c/Users/Ycr/Home/ppp/test/.git/ | |
~/test $ # I did not find a way to add submodule in 1 step without checking out |
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
0 ~/test $ git init | |
Initialized empty Git repository in /cygdrive/c/Users/Ycr/Home/test/.git/ | |
0 ~/test $ cat .git/config | |
[core] | |
ignorecase = true | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true |
OlderNewer