Skip to content

Instantly share code, notes, and snippets.

View Drunkar's full-sized avatar

Akio Ohta Drunkar

View GitHub Profile
import tensorflow as tf
import optuna
import sklearn.datasets
from sklearn.model_selection import train_test_split
class TensorFlowPruningHook(tf.train.SessionRunHook):
def __init__(self, trial, estimator, metric, is_higher_better, run_every_steps):
self.trial = trial
@smeschke
smeschke / smooth_pose_data.py
Last active March 3, 2024 17:57
Smooth Pose Estimation Data
import pandas as pd
import numpy as np
import cv2, os
import scipy
from scipy import signal
import csv
circle_color, line_color = (255,255,0), (0,0,255)
window_length, polyorder = 13, 2
sd = "workout"
@voluntas
voluntas / death_march.md
Last active December 29, 2023 15:36
デスマーチが起きる理由 - 3つの指標

デスマーチが起きる理由 - 3つの指標

著者: 青い鴉(ぶるくろ)さん @bluecrow2

これは結城浩さんの運用されていた YukiWiki に当時 Coffee 様 (青い鴉(ぶるくろ)さん)がかかれていた文章です。 ただ 2018 年 3 月 7 日に YukiWiki が運用停止したため消えてしまいました。その記事のバックアップです。

今は 404 ですが、もともとの記事の URL は http://www.hyuki.com/yukiwiki/wiki.cgi?%A5%C7%A5%B9%A5%DE%A1%BC%A5%C1%A4%AC%B5%AF%A4%AD%A4%EB%CD%FD%CD%B3 になります。

昔、自分がとても感銘を受けた文章なので、このまま読めなくなるのはとてももったいないと思い、バックアップとして公開しています。

from selenium import webdriver
from selenium.webdriver.chrome.options import DesiredCapabilities
from selenium.webdriver.common.proxy import Proxy, ProxyType
import time
co = webdriver.ChromeOptions()
co.add_argument("log-level=3")
co.add_argument("--headless")
@ksasao
ksasao / analog_mic_draw.ino
Last active May 17, 2018 04:11
[M5Stack] mic input test (speaker noise suppressed) refer to https://gist.github.com/ksasao/485ffbccbf3c47ea9cb814d3484e85e0
#include <driver/adc.h>
#include <M5Stack.h>
const int _bufSize = 128;
int _buf[_bufSize]; // adc buffer for suppress speaker noise
int _pos = 0;
int _old = 0;
int _count = 0;
int _offset = 0;
# coding: utf-8
import logging
import traceback
import argparse
import time
from logging.handlers import RotatingFileHandler
from contextlib import contextmanager
logger = logging.getLogger(__name__)
@gustavohenrique
gustavohenrique / pre-sharedkey-aes.py
Created September 13, 2017 17:52
An example using Python3 and AES criptography
import sys
import base64
from Crypto.Cipher import AES
class AESCipher(object):
def __init__(self, key):
self.bs = 16
self.cipher = AES.new(key, AES.MODE_ECB)
@voluntas
voluntas / shiguredo_product.rst
Last active March 14, 2024 04:02
時雨堂自社製品コトハジメ
@Bruttagente
Bruttagente / PoloniexCompleteBalance.gs
Last active September 8, 2017 05:09
Google Script to fetch the Poloniex balance and fill a Sheet with the retrieved data
//This is a simple Google Script to fetch the personal balance from the Poloniex website and fill a Google Sheet.
//You had to insert you API key and secret where indicated, and use your own Google Sheet address and sheet name.
//
//If you find this script useful, you can send me a tip on my bitcoin address: 17wzVMssHULq3LcJaESBkiB2cu2L9yCYn1
//
function sendHttpPost() {
//if you get an error about the nonce number, change it with a greater one as suggested by the debug
@learntheropes
learntheropes / poloniex_private_api.gs
Last active June 2, 2019 01:18
Poloniex private API for Google Apps Script (Google Sheet)
// work in progress
// you need a poloniex API key and secret with trading option enabled
// you can test it with:
// = polo("returnBalances","BTC")
// or
// = polo("returnBalances","all")
// or buy and sell:
// polo("BUY","BTC_LTC", 0.0251, 1) or polo("SELL","BTC_LTC", 0.0251, 1)