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 graphviz | |
import datetime | |
def reformat(line): | |
values = line.split('\t') | |
case_number = int(values[0]) | |
if values[3] == '春日市': | |
# 春日市 format e.g., case 659 |
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 ROOT | |
def readSK(fname, batch=False): | |
global nt | |
nt = ROOT.TNtuple('nt', 'nt', 'ch:pe:t:x:y:z') | |
nt.ReadFile(fname) | |
if not batch: | |
nt.SetMarkerStyle(20) |
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 graphviz | |
import datetime | |
import json | |
from urllib import request | |
cases = {} | |
def register_cases(pref): | |
response = request.urlopen('https://www.ctv.co.jp/covid-19/data/%s.csv' % pref) | |
lines = response.readlines() |
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 make_preference_panel() { | |
html = '<strong>Name Style</strong> <form>' + | |
'<input type="radio" name="long_short" onChange="author_list()" id="long" value="long">Use full name ' + | |
'<input type="radio" name="long_short" onChange="author_list()" id="short" value="short" checked="checked">Use initial' + | |
'</form><br>'; | |
html += '<strong>Journal Style</strong> <form>' + | |
'<input type="radio" name="style" onChange="author_list()" id="HTML" value="HTML" checked="checked">HTML ' + | |
'<input type="radio" name="style" onChange="author_list()" id="PoS" value="PoS">PoS ' + | |
'<input type="radio" name="style" onChange="author_list()" id="AIP" value="AIP">AIP' + |
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 author_list(useShortNames, journal, category) { | |
/* Change these three options yourself */ | |
/* useShortNames --- true: A.~Okumura , false: Akira~Okumura */ | |
/* journal --------- POS: Proceedings of Science (e.g., ICRC2015) | |
HTML: HTML output for Word users | |
AIP: American Institute of Physics | |
APP: Astroparticle Physics (not supported yet) | |
APJ: Astrophysical Journal (not supported yet) */ | |
/* category ------- GCT, Science, Camera, Optics, TCS, or MC */ |
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
# Original shell script was written by Adam Stankiewicz (@sheerun) | |
# https://gist.github.com/sheerun/3885694 | |
# | |
# Added on/off of "Web Proxy (HTTP)" for GlimmerBlocker users. | |
[[ -n "$1" ]] || { echo "Usage: proxy [email protected]"; exit 1; } | |
# get service GUID and NAME (like Wi-Fi) to set SOCKS proxy | |
SERVICE_GUID=`printf "open\nget State:/Network/Global/IPv4\nd.show" | \ |
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
$ ssh -D 1080 [email protected] |
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
$ g++ -c Logger.cc -o Logger.o -Wall -Wextra -O2 -DBOOST_LOG_DYN_LINK | |
$ g++ -c main.cc -o main.o -Wall -Wextra -O2 -DBOOST_LOG_DYN_LINK | |
$ g++ Logger.o main.o -o logger -L/opt/local/lib -lboost_log-mt -lboost_thread-mt -lboost_system-mt | |
$ ./logger | |
3 2014/12/14 23:51:46.462308 (UTC) [WARNING] This is a WARNING output | |
4 2014/12/14 23:51:46.462322 (UTC) [ERROR] This is an ERROR output | |
5 2014/12/14 23:51:46.462336 (UTC) [FATAL] This is a FATAL output | |
$ cat debug.log | |
1 2014/12/14 23:51:46.462186 (UTC) [DEBUG] This is a DEBUG output | |
2 2014/12/14 23:51:46.462300 (UTC) [INFO] This is a INFO output |
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
#include "Logger.h" | |
int main() | |
{ | |
MyProject::Logger logFile("debug.log"); | |
logFile.SetFilterLevel(MyProject::Logger::kDebug); | |
MyProject::gLogger.Debug("This is a DEBUG output"); | |
MyProject::gLogger.Info("This is a INFO output"); | |
MyProject::gLogger.Warning("This is a WARNING output"); |
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 MY_PROJECT_LOGGER_H_ | |
#define MY_PROJECT_LOGGER_H_ | |
#include <fstream> | |
#include <stdio.h> | |
#include <stdarg.h> | |
#include <string> | |
#include <boost/smart_ptr/shared_ptr.hpp> | |
#include <boost/smart_ptr/make_shared_object.hpp> | |
#include <boost/phoenix/bind.hpp> |
NewerOlder