Skip to content

Instantly share code, notes, and snippets.

Tarvitz tarvitz

Block or report user

Report or block tarvitz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:6bf0b65c9283fa0e03fb5252abb357c6
#!/usr/bin/env python
class A(object):
def __init__(self, obj):
self.obj = obj
def __repr__(self):
return str(self.obj)
View Evolution of a Python programmer.py
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal
View settings.py
# coding: utf-8
import os
PROJECT_ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
def rel(*path):
"""returns absolute path from topside (root) of the project
:param path: relative path
:return: absolute path
@tarvitz
tarvitz / shell.py
Created Jul 4, 2014
Google App Engine remote(local) shell with ipython detection and small battaries inside
View shell.py
#!/usr/bin/env python
# coding: utf-8
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
View eur0pa-ds_deathcount
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import struct
def main():
with open('DRAKS0005.sl2', 'rb') as fo:
fo.seek(0x2c0, 0)
for slot in range(0, 10):
fo.seek(0x100, 1)
You can’t perform that action at this time.