Skip to content

Instantly share code, notes, and snippets.

View pagenoare's full-sized avatar

Kacper Krupa pagenoare

View GitHub Profile
#include <iostream>
#include <math.h>
using namespace std;
void choinka(int n, int add = 0)
{
n *= 2;
for(int i = 1; i <= n; i++)
{
--- eggs/djangorecipe-1.3-py2.6.egg/djangorecipe/wsgi.py 2012-09-19 14:02:46.454096503 +0200
+++ eggs/djangorecipe-1.3-py2.6.egg/djangorecipe/wsgi.py 2012-09-19 22:38:21.573173243 +0200
@@ -4,21 +4,8 @@
def main(settings_file, logfile=None):
- try:
- mod = __import__(settings_file)
- components = settings_file.split('.')
- for comp in components[1:]:
--- eggs/MercurialRecipe-0.1.3-py2.7.egg/mercurialrecipe/__init__.py 2012-03-19 22:33:00.034439787 +0100
+++ eggs/MercurialRecipe-0.1.3-py2.7.egg/mercurialrecipe/__init__.py 2012-08-21 17:18:40.144016509 +0200
@@ -47,7 +47,7 @@
self.source, self.destination
))
shutil.rmtree(self.destination, ignore_errors = True)
- commands.clone(ui.ui(), get_repository(self.source), self.destination)
+ commands.clone(ui.ui(), self.source, self.destination)
return self.destination
@pagenoare
pagenoare / pylint.cfg
Created June 20, 2012 16:36
bin/pylint script [configured for django]
[pylint]
recipe = zc.recipe.egg:scripts
eggs = pylint
${buildout:eggs}
${django:eggs}
scripts = pylint
entry-points = pylint=pylint.lint:Run
arguments = sys.argv[1:]+[
'--output-format=colorized',
'--ignore=migrations',
#!/bin/bash
patch -p0 < patch
sed -i 's/ docs//' Makefile.am &&
cp /usr/share/aclocal/ac_python_devel.m4 . &&
libtoolize -f -c &&
aclocal --force -I. &&
autoheader -f &&
autoconf -f &&
automake -a -c --gnu --foreign &&
./configure --with-irssi="$1" &&
@pagenoare
pagenoare / zad1.py
Created November 28, 2011 11:55
random tasks
# coding: utf-8
def main():
try:
liczba = int(raw_input('Podaj liczbe: '))
except:
print 'podany wyraz to nie liczba!'
if (liczba % 2 == 0) and (liczba >= 4 and liczba <= 100000000):
i = [liczba / 2, liczba / 2]
if (not liczba_pierwsza(i[0])) and (not liczba_pierwsza(i[1])):
@pagenoare
pagenoare / pary_1.txt
Created November 21, 2011 12:04
ARKUSZ_CZ_II; Zad. 6
222 22121
211 12020
12 21111
2010 20122
1222 12211
2021 20122
111 10221
2 10010
111 22211
122 10221
@pagenoare
pagenoare / actions.py
Created November 11, 2011 16:15
libxdg-basedir pisi package [ dep for awesome wm ]
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2007 TUBITAK/UEKAE
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
from pisi.actionsapi import autotools
from pisi.actionsapi import pisitools
from pisi.actionsapi import get
@pagenoare
pagenoare / actions.py
Created November 11, 2011 16:14
awesome pisi package
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2007 TUBITAK/UEKAE
# Licensed under the GNU General Public License, version 2.
# See the file http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
from pisi.actionsapi import autotools
def setup():
# coding: utf-8
import re
import mechanize
pattern = re.compile('<tr><th class="black tdl">W dniu <b>([^\<]+)</b> o godzinie <b>([^\<]+)</b> przyrost Twojego portfela wynosi</th><td class="money1">([^\%]+)%</td></tr>')
class SIGG(object):
def __init__(self):
self.browser = mechanize.Browser()