Skip to content

Instantly share code, notes, and snippets.

View yuzawa-san's full-sized avatar

James Yuzawa yuzawa-san

View GitHub Profile
@yuzawa-san
yuzawa-san / terminal_notifier.sh
Created November 7, 2024 18:31
long running task terminal notification
# add to .zshrc
# lets me know when a long running command finishes out of view
# usage: my_long_command;b
b () {
local retcode=$?
if [[ $retcode -eq 0 ]]; then
osascript -e 'if not frontmost of application "Terminal" then' -e 'display notification "Command Succeeded" with title "Terminal" sound name "Glass"' -e 'end if'
else
osascript -e 'if not frontmost of application "Terminal" then' -e 'display notification "Command Failed" with title "Terminal"' -e 'end if'
echo '\a'
package com.jyuzawa.springstress;
import java.net.URI;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;
@yuzawa-san
yuzawa-san / OnnxRuntimeMultithreadCrash.java
Created July 29, 2020 18:39
OnnxRuntimeMultithreadCrash
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import ai.onnxruntime.OnnxTensor;
import ai.onnxruntime.OrtEnvironment;
@yuzawa-san
yuzawa-san / fbfeed2csv.py
Last active January 28, 2021 00:45
fbfeed2csv: a tool to download all posts from a user/group/page's facebook feed to a csv file
"""
fbfeed2csv: a tool to download all posts from a user/group/page's facebook feed to a csv file
yuzawa-san
https://github.com/yuzawa-san
"""
import json
import urllib2
import time
import csv