Skip to content

Instantly share code, notes, and snippets.

Distribution of 2-94067605 per run

image

type objectId originalNum runDropCount numberOfRunsWithThisRunDropCount runs
1 9405940 1 1 34 1201
2 6005 1 1 334 1201
2 6005 1 2 38 1201
2 6005 1 3 2 1201
function onOpen() {
var ui = SpreadsheetApp.getUi();
ui.createMenu('API data')
.addItem('Update Data', 'pullData')
.addToUi();
}
const NICE_URL = "https://api.atlasacademy.io/export/JP/nice_servant_lang_en.json";
function fetchData() {
@squaresmile
squaresmile / save_stream.service
Last active October 3, 2021 15:34
Script and systemd service to record twitch stream automatically
[Unit]
Description=Save Twitch stream
After=network.target
[Service]
WorkingDirectory=/home/squaresmile/twitch_streams
ExecStart=/bin/bash /home/squaresmile/twitch_streams/save_stream.sh
User=cereal
[Install]
@squaresmile
squaresmile / extract_usm.ps1
Last active January 27, 2024 03:30
Extract the video file from Criware .usm file
$key_b = ""
$key_a = ""
Get-ChildItem | ForEach-Object {
if ($_.Extension -eq ".usm") {
$VideoName = $_.BaseName
$AudioFiles = Get-ChildItem -Filter "$($VideoName)*.bin"
if ($AudioFiles -ne $null) {
$AudioFile = $AudioFiles | Select-Object -First 1
crid_mod.exe -b $key_b -a $key_a -v $_.Name
$m2v = "$($VideoName).m2v"
$FFMPEG_FOLDER = "ffmpeg"
Remove-Item -Recurse $FFMPEG_FOLDER
$LatestRelease = (Invoke-RestMethod "https://api.github.com/repos/BtbN/FFmpeg-Builds/releases") | Select-Object -First 1
$DownloadRelease = $LatestRelease.assets | Where-Object { $_.name -match "win64-gpl-shared-vulkan.zip$" }
$DownloadUrl = $DownloadRelease.browser_download_url
$FileName = $DownloadRelease.name
"Latest release: ${FileName}"
"Download link : ${DownloadUrl}"
Invoke-WebRequest "https://downloads.rclone.org/rclone-current-windows-amd64.zip" -OutFile rclone.zip
Expand-Archive rclone.zip -DestinationPath .\
Move-Item -Force .\rclone-v*\* .\
Remove-Item -Recurse .\rclone-v*
Remove-Item rclone.zip
Install pyenv on Ubuntu 18.04 + fish shell
- Install the packages required to compile Python
$ sudo apt-get update; sudo apt-get install --no-install-recommends make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
- Download pyenv code from github
$ git clone https://github.com/pyenv/pyenv.git ~/.pyenv
- Define environment variable PYENV_ROOT to point to the path where pyenv repo is cloned
$ echo "set --export PYENV_ROOT $HOME/.pyenv" > ~/.config/fish/conf.d/pyenv.fish
@squaresmile
squaresmile / profile.ps1
Last active February 25, 2021 03:07
Powershell profile
function Prompt {
$loc = Get-Location
$title = $($loc.Drive.Root)
([uri]$loc.Path).segments | Select-Object -Skip 2 | Select-Object -SkipLast 1 | ForEach-Object {
$title = $title + $_.Substring(0, 1) + "\"
}
$leaf = $(Split-Path $loc.Path -Leaf)
# If the path is just the drive C:\ the leaf = title = C:\
if ($title -ne $leaf) {
$title = $title + $leaf
#!/data/data/com.termux/files/usr/bin/env python
import platform
from pathlib import Path
import httpx
NAME = "Cereal"
BASE_PATH = "/data/data/com.termux/files/home/storage/pictures/"
TO_BE_UPLOADED_FOLDER = "Screenshots"
@squaresmile
squaresmile / kazemai.py
Created May 20, 2020 02:20
A small script to extract fgo master data from kazemai
import lzstring
import requests
KAZEMAI_DATA = "https://kazemai.github.io/fgo-vz/common/js/master.js"
print("Downloading master.js")
r = requests.get(KAZEMAI_DATA)
master_data = r.text.splitlines()[0][65:-4]
with open("master.txt", "w", encoding="utf-8") as fp:
fp.write(master_data)