PEP: 9999 Title: Add Lab to colorsys Author: Cassie Jones <code@witchoflight>
codl
Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 28-Nov-2017 Python-Version: 3.7 Post-History: 30-Aug-2002
| (let! *width* 128) | |
| (let! *height* 128) | |
| (struct cplx | |
| real imag) | |
| (let! real cplx/real) | |
| (let! imag cplx/imag) | |
| (defn (c/+ a b) |
| <html> | |
| <head> | |
| <meta charset="utf8"/> | |
| <title>Driver Station</title> | |
| </head> | |
| <body> | |
| <img src="http://10.10.76.17:5807/?action=stream" width="480" height="360" class="flip"/> | |
| <img src="http://10.10.76.19:5809/?action=stream" width="480" height="360" class="flip"/> | |
| <style>.flip { transform: rotate(180deg); }</style> | |
| </body> |
| /* Compile as gcc philosophers.c -pthread */ | |
| #include <stdio.h> | |
| #include <pthread.h> | |
| #include <unistd.h> | |
| pthread_mutex_t fork_ = PTHREAD_MUTEX_INITIALIZER; | |
| pthread_mutex_t knife = PTHREAD_MUTEX_INITIALIZER; | |
| void *socrates(void *nothing) { |
| User | Kanye | Anime | Comment | |
|---|---|---|---|---|
| SufjanStevens | Late Registration | good | ||
| joaquin | 808s | bad | ||
| pedroteixeira | MBDTF | good | ||
| Tahloolah | MBDTF | good | ||
| ligeti | MBDTF | N/A | Q2) My Beautiful Dark Twisted Fantasy | |
| Ziven001 | Yeezus | good | ||
| CrimeFuck | College Dropout | good | ||
| shaded_fox | Late Registration | good | ||
| Cian | 808s | good |
| import itertools | |
| import time | |
| COUNTS_SUMMING = {0: [[]]} | |
| def counts_summing(n): | |
| if n not in COUNTS_SUMMING: | |
| sums = [] | |
| for first in range(1, n+1): | |
| for rest in counts_summing(n - first): | |
| sums.append([first] + rest) |
| def fib(n): | |
| a, b = 0, 1 | |
| for _ in range(n): | |
| a, b = b, a + b | |
| return a | |
| Then, using dis.dis(fib) | |
| CPython bytecode: | |
| 2 0 LOAD_CONST 3 ((0, 1)) |
| from collections import defaultdict | |
| class Table: | |
| def __init__(self): | |
| self.items = [] | |
| self.indices = {} | |
| @staticmethod | |
| def _get_key(item, key): |
PEP: 9999 Title: Add Lab to colorsys Author: Cassie Jones <code@witchoflight>
codl
Status: Draft Type: Standards Track Content-Type: text/x-rst Created: 28-Nov-2017 Python-Version: 3.7 Post-History: 30-Aug-2002
| // this is the embedded DSL | |
| tasks! { | |
| heap h; | |
| task { | |
| loop { | |
| wait for AbsDiff(1, 2); | |
| [3] = h[&1] - h[&2]; | |
| if (h[&3] > 0) { |
| #!/bin/sh | |
| set -ex | |
| ffmpeg -y -i "$1" -f u8 -ac 1 all-star.pcm | |
| size=`wc -c all-star.pcm | tr -s ' ' | cut -d' ' -f2` | |
| size=`python3 -c "M = $size//3; N=int(M**0.5); print(f'{N}x{M//N}')"` | |
| convert -size "$size" -depth 8 rgb:all-star.pcm -quality 0% "$2" |