Skip to content

Instantly share code, notes, and snippets.

View rciorba's full-sized avatar

Radu Ciorba rciorba

View GitHub Profile
@rciorba
rciorba / go.mod
Last active May 1, 2021 13:02
foo
module github.com/rciorba/gopterbugreport
go 1.16
require github.com/leanovate/gopter v0.2.9 // indirect
@rciorba
rciorba / mydict.py
Created December 21, 2018 09:22
p1-ro-clase-1
class MyDict:
"""Hai să ne implementăm propriul dicționar.
Vom ține datele în o listă de liste de 2 elemente unde primul e cheia, iar a doilea e valoarea.
"""
def __init__(self, sequence=None):
"""Inițializează dicționarul.
Opțional poate lua o secvență de perechi, sau un alt dicționar.
"""
pass
@rciorba
rciorba / 0014_baseline_m.json
Last active January 30, 2017 11:42
borg_fix_skip_hint
{
"version": "3.0.0",
"commit_info": {
"dirty": false,
"id": "94c32d525509f0809034bc3e5238ce9ebdf331f8"
},
"machine_info": {
"processor": "",
"python_compiler": "GCC 4.9.1",
"node": "zed",
@rciorba
rciorba / 0001_baseline.json
Last active July 16, 2017 12:18
Borgbackup robinhood benchmark
{
"version": "3.0.0",
"datetime": "2017-01-16T23:18:22.756960",
"commit_info": {
"dirty": false,
"id": "4743e03ac12dcae3799943e2885d9d8cad090514"
},
"machine_info": {
"python_implementation": "CPython",
"processor": "",
@rciorba
rciorba / args.sh
Created November 11, 2015 09:37
bash argument parsing example
#!/bin/bash
UNCONSUMED=()
while [[ $# > 0 ]]
do
key="$1"
case $key in
-l|--lib)
LIBPATH="$2"
shift # past argument
;;
@rciorba
rciorba / gotcha.py
Last active August 29, 2015 14:20 — forked from vtemian/gotcha.py
# mutable list
def foobar(arg_string="abc", arg_list=[]):
print arg_string, arg_list
arg_string = arg_string + "xyz"
arg_list.append("F")
for i in range(4):
foobar()
@rciorba
rciorba / a.py
Created January 27, 2015 12:38
imports
print "A"
@rciorba
rciorba / imp.py
Last active December 16, 2015 01:09
import test
import sys
f = test.Foo()
del test
del sys.modules["test"]
import test
print isinstance(f, test.Foo) # prints False