As of July 2018, Raspbian does not yet include the latest Python release, Python 3.7.0 This means we will have to build it ourselves, and here is how to do it.
- Install the required build-tools (some might already be installed on your system).
money_dict = {"Group": [[(17100.0, '1.07')], [(-22553.42, '1.07'), (106851.92, '1.07')], [(42000.0, '2')]]} | |
def recursive_tuple(data): | |
class TempBucket: | |
pass | |
bak = TempBucket() | |
bak.bucket = 0 |
import asyncio | |
import aiohttp | |
async def get_http(url): | |
async with aiohttp.ClientSession() as session: | |
async with session.get(url) as response: | |
return await response.text() | |
server { | |
listen 443 ssl; | |
server_name x.x.net; | |
ssl on; | |
client_max_body_size 0; | |
location / { | |
mirror /root_mirror; | |
mirror_request_body on; | |
proxy_pass https://b.b/partner; | |
proxy_ssl_verify off; |
import aiohttp | |
import asyncio | |
import os | |
import time | |
def timeit(method): | |
def timed(*args, **kw): | |
ts = time.time() | |
result = method(*args, **kw) |
import requests | |
import os | |
import time | |
def timeit(method): | |
def timed(*args, **kw): | |
ts = time.time() | |
result = method(*args, **kw) | |
te = time.time() |
import re | |
import json | |
regex_pattern = r"^logzero_default - (\d{4}-\d\d-\d\d).*INFO: ([a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+), \d*. (.*).zip$" | |
input_file = 'logfile.log' | |
def return_rows(input_file): | |
with open(input_file, 'r') as inputf: | |
return inputf.read().splitlines() |
class Room: | |
def __init__(self, has_door=True): | |
self.has_door = has_door | |
self.color = "White" | |
def show(self): | |
return("Here's your door: [-]") | |
a = Room() |
""" | |
Playing around with decorators. | |
""" | |
__author__ = 'Shay Elmualem' | |
import time | |
import string | |
from threading import Thread |
""" | |
Playing around with decorators. | |
""" | |
__author__ = 'Shay Elmualem' | |
import time | |
def calc_func_runtime(func): |