Skip to content

Instantly share code, notes, and snippets.

View chck's full-sized avatar
🏠
Working from home

chck chck

🏠
Working from home
View GitHub Profile
@namakemono
namakemono / snli_lstm_with_w2v.py
Last active June 27, 2018 04:24
Trains a LSTM with Word2Vec on the SNLI dataset.
"""Trains a LSTM with Word2Vec on the SNLI dataset.
https://nlp.stanford.edu/projects/snli/
Get to 80.12% test accuracy after 18 epochs.
"""
import numpy as np
import pandas as pd
from gensim.models import KeyedVectors
@KatsuhiroMorishita
KatsuhiroMorishita / data_split.py
Last active March 27, 2019 18:53
機械学習用に、データをランダムに並べ替えた上で分割します。学習用のデータと検証用のデータを分ける際にご利用下さい。
# purpose: 機械学習用に、データをランダムに並べ替えた上で分割する
# author: Katsuhiro Morishita
# created: 2017-07-10
# license: MIT
import sys
import numpy as np
import pandas
argvs = sys.argv # コマンドライン引数を格納したリストの取得
if len(argvs) < 3:
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active August 4, 2025 19:04
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@ax3l
ax3l / noglobal.py
Last active May 8, 2024 22:23
Useful Noglobal in Python
# License:
# I hereby state this snippet is below "threshold of originality" where applicable (public domain).
#
# Otherwise, since initially posted on Stackoverflow, use as:
# CC-BY-SA 3.0 skyking, Glenn Maynard, Axel Huebl
# http://stackoverflow.com/a/31047259/2719194
# http://stackoverflow.com/a/4858123/2719194
import types
@manabuyasuda
manabuyasuda / From-engineers-to-designers.md
Last active September 12, 2022 06:33
エンジニアからデザイナーに向けて、デザインカンプを作るときにしておいて欲しいこと。

エンジニアからデザイナーに向けて、デザインカンプを作るときにしておいて欲しいこと。

デザインカンプをコーディングするときに困りがちなことや、こうしてもらえると助かることなどをまとめています。デザイナーが他のデザイナーのデザインカンプを引き継ぐこともあるので、誰にとっても使いやすいデザインカンプを作ることは大切なことだと思います。

このドキュメントは指示ではなく、エンジニア目線の提案です。必ずしも正しいとは考えていませんし、このドキュメントをもとに意見を出し合えたらと思っています。

基本的にデザインカンプに残して欲しいとしていますが、共有されているのであればデザインカンプ以外でも構いません。デザイナーの頭の中にだけある状態はさけたいと考えているので、ストックしておく場所としてデザインカンプを選んでいます。

ツーツはPhotoshopを想定しています。これは単純にPhotoshopで作られることが多いからです。違うツールを使っている場合は、読み替えるか、読み飛ばしてください。

全体編

@enakai00
enakai00 / reversi.ipynb
Created November 7, 2016 08:34
Reinforcement learning example for mini-max method Reversi.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MInner
MInner / parallel.py
Last active August 9, 2022 02:14
Executing jobs in parallel with a nice progress bar: a tqdm wrapper for joblib.Parallel
from tqdm import tqdm_notebook as tqdm
from joblib import Parallel, delayed
import time
import random
def func(x):
time.sleep(random.randint(1, 10))
return x
@frgomes
frgomes / install-docker.sh
Last active June 6, 2021 18:52
Debian - install docker in Debian Jessie
#!/bin/bash
# compiled from https://docs.docker.com/engine/installation/linux/debian/#/debian-jessie-80-64-bit
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install apt-transport-https ca-certificates -y
sudo sh -c "echo deb https://apt.dockerproject.org/repo debian-jessie main > /etc/apt/sources.list.d/docker.list"
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
@edsu
edsu / replies.py
Last active December 7, 2022 18:59
Try to get replies to a particular set of tweets, recursively.
#!/usr/bin/env python
"""
Twitter's API doesn't allow you to get replies to a particular tweet. Strange
but true. But you can use Twitter's Search API to search for tweets that are
directed at a particular user, and then search through the results to see if
any are replies to a given tweet. You probably are also interested in the
replies to any replies as well, so the process is recursive. The big caveat
here is that the search API only returns results for the last 7 days. So