I hereby claim:
- I am Back2Basics on github.
- I am back2basics (https://keybase.io/back2basics) on keybase.
- I have a public key whose fingerprint is E00C 4FA6 2288 F2C4 21D5 CCA4 158D D0A0 44B8 C5AA
To claim this, I am signing this object:
from collections import OrderedDict, namedtuple | |
import random | |
# <codecell> | |
criteria = namedtuple('criteria', ['owner', 'cost', 'square_type', 'rent'], verbose=True) | |
# <codecell> | |
board = OrderedDict() # you need to add the sale price before the group |
import string | |
with open('somefile.txt', 'r') as infile: | |
fread = infile.readlines() | |
d = {} | |
for x in fread: | |
if "\xe2\x80\xa2 " in x: | |
x = x.strip() | |
val = x.split("\xe2\x80\xa2 ") | |
d[value].append(val[1]) |
import itertools as it | |
import math | |
import sympy as sy | |
Energy, Frequency, Kinetic_energy, Mass, Momentum, Wavelength, Work_function, Speed_of_light,Force,Acceleration= sy.symbols("Energy Frequency Kinetic_energy Mass Momentum Wavelength Work_function Speed_of_light Force Acceleration") | |
Symbols_list=[Energy, Frequency, Kinetic_energy, Mass, | |
Momentum, Wavelength, Work_function, Speed_of_light] | |
Equations= [sy.Eq(Energy,Mass * Speed_of_light**2),sy.Eq(Force,Mass * Acceleration)] | |
Term_dict={} |
from multiprocessing import Process | |
import webbrowser as wb | |
def shutdown_server(): | |
func = request.environ.get('werkzeug.server.shutdown') | |
if func is None: | |
raise RuntimeError('Not running with the Werkzeug Server') | |
func() | |
def webserver(): |
I hereby claim:
To claim this, I am signing this object:
# Copyright (c) 2010-2013 Samuel Sutch [samuel.sutch@gmail.com] | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in |
from collections import deque, Counter | |
from typing import Iterable, Callable | |
def sliding_window(someiterable: Iterable, n: int, returnable: Callable = ''.join): | |
""" | |
generates an n element sliding window one element | |
at a time in whatever type you want returned | |
returnable could be tuple or list | |
""" | |
n_things = deque() |
# this was used in the youtube clip | |
data = “”” <paste data here> “”” | |
read_this = [line.partition(‘\xa0’)[2] for line in data.split(‘\n’)] | |
import subprocess as sp | |
sp.call([‘say’, ‘ ‘.join(read_this)]) |