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
| #!/usr/bin/env python | |
| #coding=utf8 | |
| import sys | |
| import time | |
| import re | |
| from subprocess import Popen, PIPE | |
| from arprequest import ArpRequest | |
| import arprequest |
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
| >>> l | |
| [(1, 1, 4), (3, 1, 11), (2, 1, 13), (6, 1, 17), (5, 1, 17), (4, 1, 18), (2, 2, 28), (1, 2, 29), (3, 2, 30), (4, 2, 31), (5, 2, 31), (6, 2, 33), (1, 3, 45), (3, 3, 51)] | |
| >>> d = {} | |
| >>> for x in l: | |
| ... if x[0] in d: | |
| ... if x[1] > d[x[0]][0]: | |
| ... d[x[0]] = x[1:] | |
| ... else: | |
| ... d[x[0]] = x[1:] | |
| ... |
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
| #!/usr/bin/env python | |
| #coding=utf8 | |
| # PTI #5 | |
| import pickle | |
| import fcntl | |
| USER_DATABASE = 'users.db' | |
| class User(object): |
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
| #!/usr/bin/env python | |
| #coding=utf8 | |
| import os | |
| import sys | |
| import copy | |
| from random import randint | |
| import pygame; pygame.init() | |
| from pygame.locals import * |
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
| #!/usr/bin/env python2.6 | |
| # | |
| # Riff, rock, and much more !! | |
| # | |
| # Copyright 2008 Antoine Millet <[email protected]> | |
| # | |
| # This program is free software; you can redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as published by | |
| # the Free Software Foundation; either version 2 of the License, or | |
| # (at your option) any later version. |
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
| #!/usr/bin/env python | |
| #coding=utf8 | |
| import pygame; import pygame.font; pygame.init() | |
| from pygame.locals import * | |
| import sys | |
| from random import randint | |
| import time | |
| import math | |
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
| #!/usr/bin/env python | |
| #coding=utf8 | |
| import urllib2 | |
| import re | |
| MOVIE_SEARCH_URL = 'http://www.allocine.fr/recherche/?motcle=__SEARCH__&rub=1' | |
| MOVIE_DETAIL_URL = 'http://www.allocine.fr/film/fichefilm_gen_cfilm=__ID__.html' | |
| SHOW_SEARCH_URL = 'http://www.allocine.fr/recherche/?motcle=__SEARCH__&rub=6' | |
| SHOW_DETAIL_URL = 'http://www.allocine.fr/series/ficheserie_gen_cserie=__ID__.html' |
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
| #!/usr/bin/env python | |
| import pygame; import pygame.font; pygame.init() | |
| import sys | |
| from random import randint | |
| import time | |
| MAX_PARTICLES = 1000 | |
| class Particle(pygame.sprite.Sprite): |
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
| #!/usr/bin/env python | |
| import Image | |
| import sys | |
| class Node(object): | |
| '''This class is an node of a graph''' | |
| def __init__(self, name): | |
| self.name = name |
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
| #!/usr/bin/env python | |
| import Image | |
| import sys | |
| class Node(object): | |
| '''This class is a node of a graph''' | |
| def __init__(self, name): | |
| self.name = name |