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
function split_values() { | |
local fpat='([^,]+)|([[:space:]]*\"(\\\\.|[^\\\\"])*\"[[:space:]]*)' | |
echo "$1" | awk -vFPAT="${fpat}" '{for(i=1;i<=NF;i++){print $i}}' | |
} |
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 bash | |
readonly DOPPEL_VER="0.0.1" | |
readonly DOPPEL_ROOT="${DOPPEL_ROOT:-"${HOME}/.doppel"}" | |
# These messages were generated by ChatGPT | |
readonly DOPPEL_SUCCES_MESSAGES=( | |
"Your project has been generated, time to fire up the coffee machine and get coding!" | |
"Project generation complete. Time to caffeinate and conquer some code!" |
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
// C++ template for AtCoder created by nazfox | |
#include <functional> | |
#include <algorithm> | |
#include <iostream> | |
#include <iomanip> | |
#include <bitset> | |
#include <stdexcept> | |
#include <string> | |
#include <vector> |
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 | |
# video device list: `v4l2-ctl --list-devices` | |
# audio device list: `pacmd list short sources` | |
video_device='your video device name' | |
audio_device='your audio device name' | |
video_device_path=$(v4l2-ctl --list-devices | grep -A1 "$video_device" | tail -n1 | sed 's/^[ \t]*//') |
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/env python | |
def ease_in_out_quad(x): | |
if x < 0.5: | |
return 2 * x * x | |
else: | |
return 1 - pow(-2 * x + 2, 2) / 2 | |
n_step = 50 | |
n_sway = 2 |
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 | |
theme="$1" | |
template="./template.yml" | |
output="./alacritty.yml" | |
if [[ ! -f $template ]]; then | |
echo "template file does not exists." 1>&2 | |
exit 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
import torch | |
from torch import nn | |
class BaseCouplingLayer(nn.Module): | |
def __init__(self, mask, m): | |
super().__init__() | |
self.mask = mask | |
self.m = m |
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/bash | |
#=========================================================== | |
# | |
# This is a task runner. | |
# To learn how to use this, try running `./task help` first. | |
# | |
#=========================================================== | |
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/bash | |
install_stamp=".install.stamp" | |
ver="0.1.0" | |
function find_command() { | |
type $1 > /dev/null 2>&1 | |
} | |
function pipenv_error() { |
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
################################################## | |
# GLOBALS | |
################################################## | |
LOG_DIR = ./log/ | |
SCRIPT_DIR = ./src/scripts/ | |
NOTEBOOK_DIR = ./notebooks/ | |
FIND_COMMAND = $(SCRIPT_DIR)/find-command.sh | |
MAKEFILE_USAGE = $(SCRIPT_DIR)/makefile-usage.sh |
NewerOlder