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
<link rel="import" href="../paper-tabs/paper-tabs.html"> | |
<link rel="import" href="../paper-tabs/paper-tab.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |
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 PIL import Image | |
def generate_gradient(): | |
im = Image.new("RGB", (255, 255)) | |
for x in range(255): | |
for y in range(255): | |
im.putpixel((x, y), (x, 0, y)) | |
im.save("../../portfolio/less1/gradient.png") | |
im.show() |
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 PIL import Image | |
def generate_gradient(): | |
im = Image.new("RGB", (255, 255)) | |
for x in range(255): | |
for y in range(255): | |
im.putpixel((x, y), (x, 0, y)) | |
im.show() |
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 enum import Enum | |
class OpType(Enum): | |
permutation = 1 | |
variation = 4 | |
variation_repetition = 2 | |
combination = 5 | |
combination_repetition = 3 |
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 random | |
from PIL import Image | |
import matplotlib.colors as colors | |
from python.less2.combinatorics import vartiations | |
''' | |
' Calculates combination number using cache (doesn't recalculate already calculated values) | |
''' |
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 sys | |
from math import cos, sin, radians | |
from python.common.line import Line | |
from python.common.svg import Svg | |
class Turtle: | |
x_max, x_min, y_max, y_min = - sys.maxsize, sys.maxsize, -sys.maxsize, sys.maxsize |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 math | |
from PIL import Image | |
def circle(r=20, fill=True): | |
im = Image.new("RGB", (r * 2 + 1, r * 2 + 1), (255, 255, 255)) | |
for a in range(360): | |
x = int(r + r * math.cos(math.radians(a))) | |
y = int(r + r * math.sin(math.radians(a))) |
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 math | |
from PIL import Image | |
def spiral(r=20): | |
im = Image.new("RGB", (r * 2, r * 2), (255, 255, 255)) | |
inc = 10 | |
inside = True | |
angle = 0 |
OlderNewer