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
from math import * | |
from kandinsky import * | |
from random import * | |
from math import * | |
def degrade(c1,c2,k): | |
dr=c2[0]-c1[0] | |
dg=c2[1]-c1[1] | |
db=c2[2]-c1[2] | |
return color(c1[0]+int(k*dr), | |
c1[1]+int(k*dg),c1[2]+int(k*db)) |
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
from kandinsky import * | |
from math import * | |
def cercle1(x0,y0,r,c,e): | |
for i in range(2*e): | |
xd=x0-int((r-i*0.5)/sqrt(2)) | |
xf=x0+int((r-i*0.5)/sqrt(2)) | |
for x in range(xd,xf+1): | |
x1=x | |
y1=y0+int(sqrt((r-i*0.5)**2-(x-x0)**2)) | |
if sqrt((160-x1)**2+(111-y1)**2)<r: |
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
from kandinsky import * | |
def rect(x,y,L,r,v,b): | |
c=color(r,v,b) | |
for i in range(L): | |
for j in range (2*L): | |
set_pixel(x+i,y+j,c) | |
def rect2(x,y,L,r,v,b): | |
c=color(r,v,b) |
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
# | |
# Secret Labs' Regular Expression Engine | |
# | |
# re-compatible interface for the sre matching engine | |
# | |
# Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved. | |
# | |
# This version of the SRE library can be redistributed under CNRI's | |
# Python 1.6 license. For any other use, please contact Secret Labs | |
# AB ([email protected]). |
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 python3 | |
"""Base16, Base32, Base64 (RFC 3548), Base85 and Ascii85 data encodings""" | |
# Modified 04-Oct-1995 by Jack Jansen to use binascii module | |
# Modified 30-Dec-2003 by Barry Warsaw to add full RFC 3548 support | |
# Modified 22-May-2007 by Guido van Rossum to use bytes everywhere | |
# import re | |
import struct |
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
from math import * |