Skip to content

Instantly share code, notes, and snippets.

View gumeniukcom's full-sized avatar
:octocat:
Focusing

Stanislav Gumeniuk gumeniukcom

:octocat:
Focusing
View GitHub Profile
@gumeniukcom
gumeniukcom / task2.py
Created November 9, 2011 20:26
hw6_task2
import string
__author__ = '[email protected]'
# -*- coding: utf-8 -*-
class dlin(object):
#a = []
def __init__(self, str):
#self.a.append(str)
@gumeniukcom
gumeniukcom / task1.py
Created November 9, 2011 20:34
hw6_task1
__author__ = '[email protected]'
for i in range(int("391", 16),int("3AA",16)) :
if i != int("3A2", 16) :
print unichr(i)+unichr(i+32),
@gumeniukcom
gumeniukcom / .vimrc
Last active September 28, 2015 00:47
VIM config
set tabstop=4
set shiftwidth=4
set smarttab
set expandtab
set smartindent
@gumeniukcom
gumeniukcom / gist:1358881
Created November 11, 2011 19:03
Работа со списками в Python
# Создание списков
List = [] # пустой список
List = [ 'hello', 5, [1,2,3] ] # список с вложенным списком
List[i] # индекс
@gumeniukcom
gumeniukcom / gist:1358891
Created November 11, 2011 19:05
Работа со списками в Python #2
List = [x + 1 for x in range(10)] # создается новый список, элементы которого увеличены на единицу
List = [x + 1 for x in range(10) if x % 2 == 0] # создается новый список, четные элементы которого увеличены на единицу
@gumeniukcom
gumeniukcom / car.py
Created November 22, 2011 18:12
mashinko
__author__ = '[email protected]'
# -*- coding: utf-8 -*-
class Car(object):
message = "Привет, я машинко"
def who(self):
print self.message
class DriftCar(Car):
@gumeniukcom
gumeniukcom / database.py
Created November 22, 2011 19:59
databasing
__author__ = 'ViGo'
# -*- coding: utf-8 -*-
import copy
class Student():
name = ""
scores = []
def __init__(self,strname):
self.name = strname
self.scores = []
@gumeniukcom
gumeniukcom / singleton.py
Created December 2, 2011 05:47
Python Singleton
class C(object):
instance = None
def __new__(cls):
if cls.instance is None:
cls.instance = super(C, cls).__new__(cls)
return cls.instance
@gumeniukcom
gumeniukcom / sublime.sh
Created December 17, 2011 15:56
Installing sUblime ubuntu
sudo add-apt-repository ppa:webupd8team/sublime-text-2
sudo apt-get update
sudo apt-get install sublime-text-2
@gumeniukcom
gumeniukcom / b2781.cpp
Created December 17, 2011 22:08
Задача №2781. Декартово дерево
/**
* task b aka 2781
* link: http://informatics.mccme.ru/moodle/mod/statements/view3.php?id=1974&chapterid=2781#1
* Copyright reserved.
* author: Gumeniuk Stanislav
*/
#include <iostream>
#include <fstream>
#include <time.h>