This file contains hidden or 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 Foo.Application do | |
| @moduledoc false | |
| use Application | |
| @impl true | |
| def start(_type, _args) do | |
| children = [ | |
| FooWeb.Telemetry, | |
| Foo.Repo, |
This file contains hidden or 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
| function [intensities, wavelengths, t] = load_oceanView(filesGlobString) | |
| %load_oceanVew | |
| % - output is INSTANTLY ready to be graphed | |
| % via surf(t, wavelengths, intensities) | |
| % - does NOT fail on data that's non-uniform in time | |
| % e.g. when OceanView malfunctions | |
| files = matlab.buildtool.io.FileCollection.fromPaths( ... | |
| replace(filesGlobString,'/',filesep)); | |
| paths = files.paths; |
This file contains hidden or 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 FooApp.Util do | |
| @doc """ | |
| Exactly like [DynamicSupervisor.start_child/2](https://hexdocs.pm/elixir/1.18/DynamicSupervisor.html#start_child/2) | |
| except that the "id" field is not [disregarded](https://hexdocs.pm/elixir/1.15/DynamicSupervisor.html#start_child/2:~:text=while%20the%20:id%20field%20is%20still%20required,the%20value%20is%20ignored), | |
| but instead used as a unique key. | |
| Only works with simple GenServer supervisees for now. | |
| Does NOT work with remote DynamicSupervor or distributed systems for now. |
This file contains hidden or 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 contextlib import contextmanager | |
| from datetime import date | |
| from functools import reduce | |
| from gettext import dgettext | |
| from traceback import format_exception | |
| from types import SimpleNamespace | |
| import re | |
| import uuid | |
| from beancount.core.account import join as account_join, leaf, root, sans_root |
This file contains hidden or 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 contextlib import contextmanager | |
| import re | |
| import traceback | |
| from beancount.core.data import * | |
| from beancount.core.prices import get_price, build_price_map | |
| from beancount.plugins.implicit_prices import ImplicitPriceError as ImplicitPriceError_t | |
| """Beancount plugin to make certain prices transitive |
This file contains hidden or 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
| /* pending https://github.com/tc39/proposal-explicit-resource-management */ | |
| /* Usage: | |
| let result = await use_resource({ | |
| async acquire(url) { | |
| // "__enter__" | |
| const e = document.createElement('iframe'); | |
| e.src = url; | |
| e.hidden = true; |
This file contains hidden or 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 queue | |
| import logging | |
| from tkinter import TclError | |
| import weakref | |
| __all__ = ['data_bind'] | |
| def data_bind(widget, callback, *, pass_tk_event=False, timeout=0.0, catastrophic_timeout=5.0, queueing_mode='auto'): | |
| """Foolproof, thread-safe workaround for https://github.com/python/cpython/issues/47655 |
This file contains hidden or 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
| __all__ = ['check_for_bug', 'patch_bug', 'auto_patch_bug'] | |
| import logging | |
| import os | |
| import pdb | |
| import platform | |
| import sys | |
| import threading | |
| import tkinter |
This file contains hidden or 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
| # Custom Kernel to use AMDGPU driver with Radeon HD 7790, HD 7750-7970, HD 7790, R7 240, R7 250, R7 260, R9 270, R9 280 | |
| # https://www.x.org/wiki/RadeonFeature/#:~:text=Southern%20Islands&text=Sea%20Islands | |
| # https://wiki.archlinux.org/title/AMDGPU#:~:text=Compile%20kernel%20which%20supports%20amdgpu%20driver | |
| # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/amd/amdgpu/Kconfig?h=v6.10&id=0c3836482481200ead7b416ca80c68a29cfdaabd#n37 | |
| boot.kernelPatches = [ { | |
| name = "amdgpu-si-cik"; | |
| patch = null; | |
| extraConfig = '' | |
| DRM_AMDGPU_SI y | |
| DRM_AMDGPU_CIK y |
This file contains hidden or 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
| // To use the functions exported by this module, | |
| // you must already have an existing_channel | |
| // connecting the two endpoints -- a so-called | |
| // "signaling server" -- before you can establish | |
| // a WebRTC connection. | |
| /* | |
| const config = { iceServers: [{ urls: 'stun:stun.l.google.com:19302' }] }; | |
| const _signaling_server = new MessageChannel(); | |
| _signaling_server.port1.start(); |