This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import string | |
| __author__ = 'vigo@vigo.su' | |
| # -*- coding: utf-8 -*- | |
| class dlin(object): | |
| #a = [] | |
| def __init__(self, str): | |
| #self.a.append(str) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'vigo@vigo.su' | |
| for i in range(int("391", 16),int("3AA",16)) : | |
| if i != int("3A2", 16) : | |
| print unichr(i)+unichr(i+32), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set tabstop=4 | |
| set shiftwidth=4 | |
| set smarttab | |
| set expandtab | |
| set smartindent |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Создание списков | |
| List = [] # пустой список | |
| List = [ 'hello', 5, [1,2,3] ] # список с вложенным списком | |
| List[i] # индекс |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| List = [x + 1 for x in range(10)] # создается новый список, элементы которого увеличены на единицу | |
| List = [x + 1 for x in range(10) if x % 2 == 0] # создается новый список, четные элементы которого увеличены на единицу |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'vigo@vigo.su' | |
| # -*- coding: utf-8 -*- | |
| class Car(object): | |
| message = "Привет, я машинко" | |
| def who(self): | |
| print self.message | |
| class DriftCar(Car): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| __author__ = 'ViGo' | |
| # -*- coding: utf-8 -*- | |
| import copy | |
| class Student(): | |
| name = "" | |
| scores = [] | |
| def __init__(self,strname): | |
| self.name = strname | |
| self.scores = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class C(object): | |
| instance = None | |
| def __new__(cls): | |
| if cls.instance is None: | |
| cls.instance = super(C, cls).__new__(cls) | |
| return cls.instance |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo add-apt-repository ppa:webupd8team/sublime-text-2 | |
| sudo apt-get update | |
| sudo apt-get install sublime-text-2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * 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> |
OlderNewer