Skip to content

Instantly share code, notes, and snippets.

Avatar

svonava svonava

View GitHub Profile
View relation_loader.js
// --- USAGE ---
import { InjectConnection } from '@nestjs/typeorm';
//...
@Injectable()
export class Service {
constructor(
@InjectConnection()
private connection: Connection,
//...
const prime = await this.repo
View poloniex currency list
1 1CR
2 ABY
3 AC
4 ACH
5 ADN
6 AEON
7 AERO
8 AIR
9 APH
@svonava
svonava / selfspy to google docs
Created Sep 30, 2012
extract data from selfspy and append it as a row to google docs
View selfspy to google docs
import re
from datetime import timedelta
regex = re.compile(r'((?P<hours>\d+?)h)? ((?P<minutes>\d+?)m)? ((?P<seconds>\d+?)s)?')
regex2 = re.compile(r'((?P<minutes>\d+?)m)? ((?P<seconds>\d+?)s)?')
def parse_time(time_str):
parts = regex.match(time_str)
if not parts:
parts = regex2.match(time_str)
parts = parts.groupdict()
time_params = {}
You can’t perform that action at this time.