I hereby claim:
- I am samclane on github.
- I am sawyermclane (https://keybase.io/sawyermclane) on keybase.
- I have a public key ASAqk0V6tI-mw3FWMQwC_kv0KXlqEvIJeib4wsKWnWY8bAo
To claim this, I am signing this object:
from __future__ import annotations | |
from functools import reduce | |
from operator import add | |
from typing import Sequence, Union, Iterable, Any | |
NumberTypes = (int, float, complex,) | |
Number = Union[NumberTypes] | |
NestedSequences = Union[Number, Sequence['NestedSequences']] |
from typing import Dict, Any | |
class SelfCastingClass: | |
def __init__(self, **kwargs: Dict[str, Any]): | |
for k, v in kwargs.items(): | |
self.__setattr__(k, self.__annotations__[k](v)) | |
def __repr__(self): | |
return "{" + ", ".join([f"'{k}': {v.__repr__()}" for k, v in self.__dict__.items()]) + "}" |
I hereby claim:
To claim this, I am signing this object:
class LoggedList(list): | |
def __init__(self, *args, name=None, **kwargs): | |
super().__init__(*args, **kwargs) | |
self._name = name | |
def __getitem__(self, item): | |
logging.info(f"{self._name} Getting item {item}") | |
super().__getitem__(item) | |
def __setitem__(self, key, value): |
sudo apt-get install build-essential checkinstall | |
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev | |
cd ~/Downloads/ | |
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz | |
tar -xvf Python-3.6.8.tgz | |
cd Python-3.6.8 | |
./configure | |
make |
import peasy.*; | |
float x = 0.01; | |
float y = 0; | |
float z = 0; | |
float a = 10; | |
float b = 28; | |
float c = 8./3.; |
/* | |
Recreating /u/f-x-p-x's AAA animation. | |
Requires OpenSimplexNoise.java: | |
https://github.com/CodingTrain/website/blob/master/CodingChallenges/CC_137_4D_Noise_Loop/Processing/CC_137_4D_Noise_Loop/OpenSimplexNoise.java | |
*/ | |
PGraphics pg; | |
float fontSize; | |
int cols = 30; |
import numpy as np | |
import pixelhouse as ph | |
WIDTH = 255 | |
HEIGHT = 255 | |
COLOR = "#6639B7" | |
CIRCLE_SCALE_FACTOR = 1/65 | |
def logo_animation(): | |
A = ph.Animation(fps=60, duration=1.5, width=WIDTH, height=HEIGHT, bg=COLOR) |
Using service-definition.json
, find the values of serviceName
and cluster
Run the following:
aws ecs update-service --service <serviceName
> --cluster <cluster
> --desired-count 0
This scales down the service to 0 so it can be stopped:
aws ecs delete-service --cluster <cluster
> --service ``
#!/usr/bin/python | |
""" | |
Download data from a Rigol DS1052E oscilloscope channel 1 and | |
dump to a .wav file. | |
By Ken Shirriff, http://righto.com/rigol | |
Modified by Sawyer McLane 2/28/2019 | |
""" | |
import sys |