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
# Hide GPU to help with reproducibility between Keras versions | |
import os | |
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" # see issue #152 | |
os.environ["CUDA_VISIBLE_DEVICES"] = "" | |
# Copilot says these apparently reduces the chances or reproducibility issues; treat with caution | |
os.environ["TF_DETERMINISTIC_OPS"] = "1" | |
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
. | |
├── Common.py | |
├── pysdtw | |
│ ├── ... Rest of checkout here | |
│ ├── Test Arrays -> /Some/Common/Path | |
│ ├── test.py | |
├── pytorch-softdtw | |
│ ├── ... Rest of checkout here | |
│ ├── Test Arrays -> /Some/Common/Path | |
│ └── test.py # Test script is very similar but not identical; these two are already tested as identical so not necessarily needed |
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
#ifndef XTCONCATENATE_HPP | |
#define XTCONCATENATE_HPP | |
#include <cstddef> | |
#include <stdexcept> | |
#include <vector> | |
#include <xtensor/xarray.hpp> | |
template <typename S> | |
struct ShapeIndex |
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
// WIP | |
// For half-baked related ideas in a situation when this won't work or be acceptable, see: | |
// | |
// https://initialiser.godbolt.org/z/esqeYf98W | |
// https://initialiser.godbolt.org/z/hzqzfsarz | |
// https://initialiser.godbolt.org/z/a53ojboYd | |
// https://initialiser.godbolt.org/z/G3nExT9ba | |
// | |
struct Foo { |
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
// Inherit from me privately. | |
struct ConstructorPreInitialisation{ | |
// Pass in an arbitrary lambda function here, it will simply be discarded | |
// This remoes the need for a comma operator and importantly avoids cluttering your | |
// real initialisation of member subobjects. | |
inline ConstructorPreInitialisation( [[maybe_unused]] const auto λ ){ λ(); } | |
}; | |
// WARN: This may increase the size of your class using it | |
// The compiler can probably elide this but from memory objects with zero length are not permitted |
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 random, sys, time | |
from pythonosc import dispatcher, osc_server, osc_message_builder, udp_client | |
MessageAddress = "/test" | |
TimeToCutStream = 10 # seconds | |
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 argparse | |
from pathlib import Path | |
import sys | |
from packaging.utils import parse_wheel_filename | |
import platform | |
def diagnose_unsupported(p: Path) -> str: | |
p = Path(p) |
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: https://gist.github.com/jfrey-xx/ed0a8d5d881a7a5734064e6ad89beccd | |
VERSION --use-cache-command 0.6 | |
build: | |
# FROM custom:focal | |
# I originally used a custom image here, with compilers installed. | |
# Using stock ubuntu may have some steps missing, but it should be easy to add (e.g. standard buildtools) | |
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
// Demped from usecase script. Tidy-up to follow. | |
// To include this fromn Greasemonkey | |
// @require https://gist.githubusercontent.com/stellarpower/0e1600b78bb7e478ab9679f5c8213f41/raw/04fdf048d7870e5f655140cc4c4a08a59aaf9b8a/JavascriptDoneOnce.js | |
const ThisScript = "..."; | |
function log(args){ |
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/fish | |
# Instal;ls some rust CLI tools, as documented here: https://zaiste.net/posts/shell-commands-rust/ | |
# Make the shell slightly less hellish and bring it kicking and screaming into the early 2000s. | |
pushd /tmp | |
mkdir rustyShell && cd rustyShell | |
# Debian packages |
NewerOlder