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
| 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 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 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 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 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 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 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 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 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="!") |
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 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 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
| \documentclass{article} | |
| \usepackage{titlesec} | |
| \titleformat{\section}{\huge\bfseries}{}{}{} | |
| \setlength{\parindent}{4em} | |
| \setlength{\parskip}{1em} | |
| \begin{document} | |
| \author{Maksims Kovalovs} | |
| \title{Computer science programming project} |
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 pygame | |
| import numpy as np | |
| # change these values | |
| points = 50000 | |
| radius1 = 100.0 | |
| radius2 = 70.0 | |
| point_disp = 100.0 | |
| angle_ratio =radius1/radius2 |
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 pygame | |
| import numpy as np | |
| # change these values | |
| points_temp = 1000 | |
| radius1 = 100 | |
| radius2 = 100 | |
| angular_speed_1 = 0.01 | |
| angular_speed_2 = 0.0002 |
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 pygame | |
| import numpy as np | |
| # change these values | |
| points = 10000 | |
| circles = 30.0 | |
| radius = 200.0 | |
| resolution = np.array([1000, 500]) |
NewerOlder