graph TB
Random:::done --> Sort:::done --> MultiArrayList ---> Parser
HashMap:::done --> GeneralPurposeAllocator:::done --> Parser
MultiArrayList --> ArrayHashMap --> AstGen
HashMap & Parser --> AstGen
Allocator:::done --> ArrayList:::done --> Parser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.logger import Logger | |
from kivymd.app import MDApp | |
from kivymd.uix.screen import MDScreen | |
from kivymd.uix.button import MDFlatButton | |
from kivymd.uix.boxlayout import MDBoxLayout | |
from kivymd.uix.dialog.dialog import MDDialog | |
from kivymd.uix.textfield.textfield import MDTextField | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.clock import Clock | |
from kivymd.uix.widget import MDWidget as Widget | |
LONG_TOUCH_TIME = 0.8 | |
class LongShortTouchMixin(Widget): | |
def __init__(self, **kw): | |
self.last_touch = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LLVM_PROJECT=llvm-project-14 | |
LLVM_BASE=Downloads/$(LLVM_PROJECT) | |
LLVM_INST=$(LLVM_BASE)/local | |
ZIG2 := $(shell realpath stage2/bin/zig) | |
ZIG3 := $(shell realpath stage3/bin/zig) | |
ZIG4 := $(shell realpath stage4/bin/zig) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
VERINDEX_URL="https://ziglang.org/download/index.json" | |
VERINDEX=/tmp/zig-download-index.json | |
fetch_index() { | |
FLAGFILE=/tmp/index-refetch.$$ | |
touch -d '1 day ago' $FLAGFILE | |
if [ -f "$VERINDEX" ]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
results_dir = Path(__file__).parent / 'expected_results_dir' | |
def test_one_process(bash): | |
bash.run_script('prog1', ['arg1', 'arg2']) | |
assert bash.path_exists('/path/to/outfile') | |
assert bash.file_contents('/path/to/outfile') == 'expected_result_text' | |
assert bash.file_contents('/path/to/outfile') == bash.file_contents(results_dir / 'one_process_results.txt') | |
def test_two_processes(bash): | |
bash.run_script('prog1', ['arg1', 'arg2']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# based on https://github.com/victorcoder/dkron/issues/212 | |
#dkron_url="http://localhost:8080" | |
dkron_url=$1 | |
if [ -z "$dkron_url" ]; then | |
echo "Usage: $0 <dkron base url>" | |
exit 1 | |
fi | |
curl -s -X GET "$dkron_url/v1/jobs" -H "accept: application/json" -o - | |
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: get the pip version | |
command: pip --version | |
register: pip_version | |
ignore_errors: True | |
- name: fetch pip installer | |
get_url: | |
url: https://bootstrap.pypa.io/get-pip.py | |
dest: /tmp/get-pip.py | |
when: pip_version|failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_ma_short_skips(): | |
ma = MovingAverage([1,2,5,10]) | |
for i in range(11): | |
ma.update(i, 5) | |
assert ma.cur == [ 5, 5, 5, 5 ] | |
ma = MovingAverage([1,2,3]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import timeit | |
class Foo: pass | |
foo = Foo() | |
sfoo = 'foo' * 333 | |
sfo = 'foo' * 332 | |
dfoo = { 'foo': 1, 'bar': 2, 'baz': 3, 'bal': 4 } | |
setfoo = set(['foo', 'bar', 'baz', 'bal']) |
NewerOlder