Skip to content

Instantly share code, notes, and snippets.

View yabirgb's full-sized avatar
🤡
Working from home

Yábir Benchakhtir yabirgb

🤡
Working from home
View GitHub Profile
@pytest.mark.parametrize('mocked_price_queries', [prices])
def test_correct_deduction(accountant):
history = [{
'timestamp': 1624395186,
'base_asset': '_ceth_0xdAC17F958D2ee523a2206206994597C13D831ec7',
'quote_asset': 'EUR',
'trade_type': 'buy',
'rate': 0.8547,
'fee': 0.019921972,
'fee_currency': '_ceth_0xdAC17F958D2ee523a2206206994597C13D831ec7',
#!/bin/bash
cp /fenix/depar/lsi/UML/*.gz /tmp
cd /tmp
gunzip *.gz
./kernel32-3.0.4 ubda=./Fedora14-x86-root_fs mem=1024m
@yabirgb
yabirgb / format.js
Last active November 15, 2015 15:56
A little script that simulates what is the format function in python for javascript
function removeBrackets(text, position){
return text.slice(0, position) + text.slice(position + 2);
}
// Function that insert in a string at a position a given string
String.prototype.insertAt=function(index, string) {
return this.substr(0, index) + string + this.substr(index);
}
// You may use format with a string where {} indicates that you want to insert something in that position and
import os, sys
"""This part is for setup the database needed stuff"""
#Shit happends. Django looks like needs to start and then you can work with it. so create a environemant and start
#http://www.dangtrinh.com/2014/11/how-to-avoid-models-arent-loaded-yet.html
def setup_environment():
pathname = os.path.dirname(sys.argv[0])
sys.path.append(os.path.abspath(pathname))