This file contains 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 pygame, pygame.font | |
import random | |
def IsWritten(): | |
defTemp = True | |
for x in xrange((lettersOnScreen[0] / 2) - (len(str) / 2), (lettersOnScreen[0] / 2) + (len(str) / 2) + 1): | |
if xHeads[x] == -1: | |
defTemp = False | |
return defTemp |
This file contains 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 requests | |
from BeautifulSoup import BeautifulSoup | |
import dryscrape | |
import time | |
url = "http://www.drfrostmaths.com/homework/do-question.php?aaid=161230" | |
sess = dryscrape.Session() | |
sess.visit("http://www.drfrostmaths.com/homework/login.php") | |
name = sess.at_xpath('//*[@name="login-email"]') # Where <input name="username"> | |
name.set("email here") |
This file contains 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 pygame, math, sys | |
def draw(dot1,dot2,dot3,order): | |
pygame.draw.lines(screen, (255,0,0), True, [dot1,dot2,dot3], 1) | |
if order>0: | |
newDot1 = (int((dot1[0]+dot2[0])*0.5),int((dot1[1]+dot2[1])*0.5)) | |
newDot2 = (int((dot2[0]+dot3[0])*0.5),int((dot2[1]+dot3[1])*0.5)) | |
newDot3 = (int((dot3[0]+dot1[0])*0.5),int((dot3[1]+dot1[1])*0.5)) | |
pygame.draw.lines(screen, (255,0,0), True, [newDot1,newDot2,newDot3], 1) |
This file contains 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
program rucksack; | |
uses math; | |
type THistory = array [0..10000,0..10000] of integer; | |
tItem= record | |
val,size:integer; | |
end; | |
TItems = array [1..10000] of tItem; | |
var fin,fout: text; | |
maxSize,maxItems,curSize,counter,counter2:integer; | |
History:THIstory; |
This file contains 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 pygame | |
import math | |
start_x = 50 | |
start_y = 150 | |
start_dist = 300 | |
top_guy = [start_x,start_dist+start_y] | |
bottom_guy = [start_x,start_y] | |
vel = 0.1 | |
angle = 0 |
This file contains 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 colorsys | |
import pandas as pd | |
from scipy.stats import beta | |
from matplotlib import pyplot as plt | |
import math | |
import numpy as np | |
import matplotlib.patches as mpatches | |
This file contains 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
num = int(input()) | |
verteces = int(input()) | |
data = [[-1]*(verteces+1) for i in range(verteces+1)] | |
for i in range(num): | |
indata = [int(i) for i in input().split()] | |
data[indata[0]][indata[1]] = indata[2] | |
current = 1 |
This file contains 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 string import ascii_lowercase | |
from collections import Counter | |
import matplotlib.pyplot as plt | |
import operator | |
import numpy as np | |
import glob | |
my_counter = Counter() | |
# for filename in glob.iglob(/home/max/*.txt): |
This file contains 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__ = 'mk070_000' | |
#R KEY - INCREASE FUNCTION LOOPS OR ACCURACY | |
#LEFT MOUSE, HOLD, MOVE, RELEASE - CHOOSE FUNCTION MERITS (max values, can be use to zoom in) | |
#RIGHT MOUSE - CREATE A JULIA SET , USING THE MOUSE COORDINATES | |
import math, pygame, cmath, sys | |
from pygame import gfxdraw | |
def mandelbrot(point ,koeff , n): | |
if abs(point) > 5: | |
return 254-(254.0/accuracy)*n |
This file contains 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 cleverwrap import CleverWrap | |
import discord | |
from discord.ext.commands import Bot | |
import wolframalpha | |
at_max_id = "--MY ID--" | |
at_bot_id = "--BOT ID--" | |
cb = CleverWrap("--cb id--") | |
token = "--chat token--" | |
my_bot = Bot(command_prefix="!") |
NewerOlder