Skip to content

Instantly share code, notes, and snippets.

bisco(or nbisco) bisco

Block or report user

Report or block bisco

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bisco /
Created Aug 7, 2019
# これのサンプルコードが動かないので直したもの
def adjust_col(ws):
for col in ws.columns:
max_length = 0
column = col[0].column # Get the column name
column = chr(ord("A") - 1 + column)
for cell in col:
try: # Necessary to avoid error on empty cells
if len(str(cell.value)) > max_length:
bisco /
Created Jan 14, 2019
simple outlier detection using kNN
#!/usr/bin/env python3
from sklearn.neighbors import NearestNeighbors
import numpy as np
import sys
th_pi = 20
th_ep = 5.0
def main():
bisco / 2.json
Created Dec 8, 2018
View 2.json
"CONSUMER_KEY" : "ここにConsumer Keyを入れる",
"CONSUMER_SECRET" : "ここにConsumer Secretを入れる",
"ACCESS_TOKEN" : "さっきのoauth_token",
"ACCESS_TOKEN_SECRET" : "さっきのoauth_verifier"
bisco / 1.json
Created Dec 8, 2018
View 1.json
"CONSUMER_KEY" : "ここにConsumer Keyを入れる",
"CONSUMER_SECRET" : "ここにConsumer Secretを入れる",
"ACCESS_TOKEN" : "まだ空欄でよい",
bisco /
Last active Aug 24, 2018
perf formatter
#!/usr/bin/env python [31/1804]
#fileencoding: utf-8
from __future__ import print_function
import sys
class BranchEntry:
def __init__(self, line):
bisco /
Created Dec 20, 2017
Google Spreadsheet APIの薄いwrapper
import httplib2
import os
from apiclient import discovery
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage
bisco / termbox-color.go
Created Dec 14, 2017
View termbox-color.go
package main
import (
func drawLine(x, y int, str string) {
color := termbox.ColorDefault
bisco / usb.stp
Last active May 21, 2017
systemtap test
View usb.stp
#!/usr/bin/stap -gv
probe begin {
printf("force stop warning short TX\n")
probe end {
printf("stop probe\n")
bisco / Makefile
Last active May 17, 2017
View Makefile
SRCDIR = $(realpath .)
IGNORE = $(SRCDIR)/ignore_file.c
SRCS = $(filter-out $(IGNORE),$(wildcard $(SRCDIR)/*.c))
OBJS = $(subst $(SRCDIR),$(OBJDIR),$(SRCS:.c=.o))
EXE = a.out
CC = gcc
MAKE = make
bisco /
Created Dec 11, 2016
perf scriptでオレオレスクリプトを走らせるサンプル
# perf script event handlers, generated by perf script -g python
# Licensed under the terms of the GNU GPL License version 2
# The common_* event handler fields are the most useful fields common to
# all events. They don't necessarily correspond to the 'common_*' fields
# in the format files. Those fields not available as handler params can
# be retrieved using Python functions of the form common_*(context).
# See the perf-trace-python Documentation for the list of available functions.
import os
You can’t perform that action at this time.