(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| def color(text, **user_styles): | |
| styles = { | |
| # styles | |
| 'reset': '\033[0m', | |
| 'bold': '\033[01m', | |
| 'disabled': '\033[02m', | |
| 'underline': '\033[04m', | |
| 'reverse': '\033[07m', |
| #!/usr/bin/env python | |
| # -*- encoding: utf-8 -*- | |
| # pylint: disable=invalid-name,missing-docstring,bad-builtin | |
| from sys import stdin | |
| from collections import deque | |
| def main(): | |
| def steps(a, b, c): | |
| queue = deque([(0, 0), (-1, -1)]) | |
| visited = set() |
| package main | |
| import ( | |
| "fmt" | |
| "log" | |
| "net" | |
| "time" | |
| "github.com/hashicorp/yamux" | |
| ) |
| diff --git a/ptop/interfaces/GUI.py b/ptop/interfaces/GUI.py | |
| index 897bef3..c045fe7 100644 | |
| --- a/ptop/interfaces/GUI.py | |
| +++ b/ptop/interfaces/GUI.py | |
| @@ -305,6 +305,9 @@ class PtopGUI(npyscreen.NPSApp): | |
| self.CHART_LENGTH = int(self.CHART_LENGTH*self.X_SCALING_FACTOR) | |
| self.CHART_HEIGHT = int(self.CHART_HEIGHT*self.Y_SCALING_FACTOR) | |
| + self.cpu_array = [0]*self.CHART_LENGTH | |
| + self.memory_array = [0]*self.CHART_LENGTH |
| package main | |
| import ( | |
| "fmt" | |
| "net" | |
| "os" | |
| "syscall" | |
| ) | |
| const ( |
Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.
This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would
| """ | |
| An alternative text clip for Moviepy, relying on Gizeh instead of ImageMagick | |
| Advantages: | |
| - Super fast (20x faster) | |
| - no need to install imagemagick | |
| - full-vector graphic, no aliasing problems | |
| - Easier font names | |
| Disadvantages: |
| """ | |
| stable diffusion dreaming | |
| creates hypnotic moving videos by smoothly walking randomly through the sample space | |
| example way to run this script: | |
| $ python stablediffusionwalk.py --prompt "blueberry spaghetti" --name blueberry | |
| to stitch together the images, e.g.: | |
| $ ffmpeg -r 10 -f image2 -s 512x512 -i blueberry/frame%06d.jpg -vcodec libx264 -crf 10 -pix_fmt yuv420p blueberry.mp4 |