Command | K2410 | K2470 |
---|---|---|
identity | *IDN? | *IDN? |
reset | *RST | *RST |
clear | *CLS | *CLS |
get error | :SYST:ERR? | :SYST:ERR? |
set beeper | :SYST:BEEP:STAT <OFF,ON> | n/a |
set terminals | :ROUT:TERM \ | :ROUT:TERM \ |
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
! Map umlauts to RIGHT ALT + <key> | |
keycode 108 = Mode_switch | |
keysym e = e E EuroSign | |
keysym c = c C cent | |
keysym a = a A adiaeresis Adiaeresis | |
keysym o = o O adiaeresis Adiaeresis | |
keysym u = u U adiaeresis Adiaeresis | |
keysym s = s S ssharp |
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
// Prescale counter for fractional prescales with fixed precision. | |
#include <iostream> | |
#include <cmath> | |
#include <limits> | |
struct PrescaleCounter { | |
const size_t prescale_count; | |
const size_t single_step; |
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 subprocess | |
import urllib.request | |
import os | |
import re | |
import sys | |
def download(artist: str, album: str) -> str: |
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 math | |
__all__ = ['round_half_away_from_zero'] | |
def round_half_away_from_zero(n: float, decimals: int = 0) -> float: | |
multiplier: float = 10 ** decimals | |
return math.copysign(math.floor(abs(n * multiplier) + 0.5) / multiplier, n) |
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 bisect_asc(arr): | |
if len(arr): | |
return arr[-1] < arr[0] | |
return True | |
def bisect_cmp(arr): | |
if bisect_asc(arr): | |
return lambda x, y: x > y | |
return lambda x, y: x < y |
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 linspace(start, stop, count): | |
delta = (stop - start) / max(1, count - 1) | |
return [start + i * delta for i in range(count)] | |
def sample(data, count): | |
n = len(data) | |
count = min(n, count) | |
return [int(round(i)) for i in linspace(0, len(data) - 1, count)] |
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
template<typename T> | |
const typename T::mapped_type& at(const T& m, const typename T::key_type& k, const typename T::mapped_type& d) | |
{ | |
try { return m.at(k); } catch (const std::out_of_range&) { return d; }; | |
} |
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
set -e | |
version=$1 | |
if [ -z "$version" ]; then | |
echo "usage: $0 <version>" | |
exit 1 | |
fi | |
install_dir="./envs/comet-pqc-$version" | |
if [ -d "$install_dir" ]; then | |
echo "directory already exists: $install_dir" | |
exit 1 |
NewerOlder