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
diff --git a/heimchen/flake.nix b/heimchen/flake.nix | |
index d8638c3..fd34ad5 100644 | |
--- a/heimchen/flake.nix | |
+++ b/heimchen/flake.nix | |
@@ -13,9 +13,12 @@ | |
nixvim.url = "github:nix-community/nixvim/nixos-23.11"; | |
nixvim.inputs.nixpkgs.follows = "nixpkgs"; | |
+ | |
+ dream2nix.url = "github:nix-community/dream2nix"; |
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
# disko config for Hetzner dedicated | |
# matching grub config: | |
# | |
# boot.loader.grub = { | |
# devices = [ "/dev/nvme0n1" "/dev/nvme1n1" ]; | |
# efiSupport = true; | |
# efiInstallAsRemovable = true; | |
# }; |
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
defmodule Membrane.Demo.SimplePipeline do | |
@moduledoc """ | |
Sample Membrane pipeline that will play an `.mp3` file. | |
## Example | |
iex> Membrane.Demo.SimplePipeline.start_link(path_to_mp3: "demo.mp3") | |
iex> Membrane.Pipeline.terminate(Membrane.Demo.SimplePipeline) | |
""" |
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
#!/usr/bin/env ruby | |
# Scans Chia logfiles for gaps in challenge processing and gathers some stats. | |
# Resolution is 1 minute, log level needs to be set to INFO at least. | |
require 'date' | |
LOGDIR = '~/.chia/mainnet/log' | |
Dir.chdir(File.expand_path(LOGDIR)) |
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(bucket: "SpaceBucket") | |
|> range(start: v.timeRangeStart, stop: v.timeRangeStop) | |
|> filter(fn: (r) => r["_measurement"] == "chia_farmed_amount") | |
|> filter(fn: (r) => r["_field"] == "farmed_amount") | |
|> map(fn: (r) => ({ | |
r with | |
_value: r._value / 1000000000000.0 | |
}) | |
) | |
|> aggregateWindow(every: v.windowPeriod, fn: last, createEmpty: false) |
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
% ray stop -v !10103 | |
Send termination request to `/Users/sonnenbloom/opt/anaconda3/envs/rootshuffle/lib/python3.7/site-packages/ray/core/src/ray/raylet/raylet --raylet_socket_name=/tmp/ray/session_2020-09-23_13-12-25_470404_34955/sockets/raylet --store_socket_name=/tmp/ray/session_2020-09-23_13-12-25_470404_34955/sockets/plasma_store --object_manager_port=0 --min_worker_port=10000 --max_worker_port=10999 --node_manager_port=57276 --node_ip_address=192.168.213.26 --redis_address=192.168.213.26 --redis_port=6379 --num_initial_workers=8 --maximum_startup_concurrency=8 --static_resource_list=node:192.168.213.26,1.0,CPU,8,memory,88,object_store_memory,30 --config_list=plasma_store_as_thread,True "--python_worker_command=/Users/sonnenbloom/opt/anaconda3/envs/rootshuffle/bin/python /Users/sonnenbloom/opt/anaconda3/envs/rootshuffle/lib/python3.7/site-packages/ray/workers/default_worker.py --no |
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
#!/usr/bin/env python3 | |
import asyncio | |
import logging | |
import ray | |
import time | |
@ray.remote | |
class Worker(): |
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
#!/usr/bin/env python | |
import re | |
def isPhoneNumberRegEx(text): | |
return bool(re.match(r'^\d{3}-\d{3}-\d{3}$', text)) | |
print('666 666 666 is a phone number: ') | |
print(isPhoneNumberRegEx('666-666-666')) | |
print('Moshi moshi is a phone number') |
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
--- phone.orig.py 2018-12-09 19:51:18.000000000 +0100 | |
+++ phone.py 2018-12-09 19:46:12.000000000 +0100 | |
@@ -1,23 +1,25 @@ | |
+#!/usr/bin/env python | |
+ | |
def isPhoneNumber(text): | |
if len(text) != 11: | |
return False | |
for i in range(0,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
#!/usr/bin/env python | |
def isPhoneNumber(text): | |
if len(text) != 11: | |
return False | |
for i in range(0,3): | |
if not text[i].isdigit(): | |
return False |
NewerOlder