Skip to content

Instantly share code, notes, and snippets.

View soichisumi's full-sized avatar
🔥
Focusing on GenAI. Professional in AI, SRE and Blockchain

Soichi Sumi soichisumi

🔥
Focusing on GenAI. Professional in AI, SRE and Blockchain
View GitHub Profile
@soichisumi
soichisumi / openIterm2.js
Created November 5, 2017 12:19
Script to open iTerm2 and
function run(input, parameters) {
// open iterm2 and retrieve session object
var iTerm = Application("iTerm2");
var win = iTerm.createWindowWithDefaultProfile();
var tab = win.currentTab();
var ses = tab.currentSession();
//run command in the session
ses.write({text: "echo yoyo"});
@soichisumi
soichisumi / Hoge.java
Last active October 7, 2017 22:37
mockito and powermockito test example
/**
* Created by souichi_sumi on 2017/09/28.
*/
//unimplemented class
public class Hoge {
static String var1 = "hoge1";
static String var2 = "hoge2";
static String var3 = "hoge3";
static String var4 = "hoge4";
@soichisumi
soichisumi / maxlen.py
Last active September 30, 2017 18:27
都道府県+市区町村の名前の最大長を調べた
import pandas as pd
import math as ma
import sys
import googlemaps
df = pd.read_csv('jusho.csv')
maxlen=0
maxlenKen=0
maxlenSi=0
for key, row in df.iterrows():
if maxlenKen<len(row[1]):