Skip to content

Instantly share code, notes, and snippets.

@hrldcpr
hrldcpr / tree.md
Last active May 1, 2024 00:11
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!

@taichi
taichi / configure_bower.md
Created September 2, 2013 06:50
bowerにbowerrcを使ってプロキシの設定をする

bowerにプロキシの設定をする方法

プロジェクトのディレクトリかユーザホームディレクトリに.bowerrcファイルを作る。

  • Windowsのユーザホームの確認の仕方
> echo %HOMEPATH%
@rxaviers
rxaviers / gist:7360908
Last active May 28, 2024 10:54
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@branneman
branneman / better-nodejs-require-paths.md
Last active April 27, 2024 04:16
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@madjar
madjar / scrapper.py
Last active March 5, 2023 15:02
A example of scrapper using asyncio and aiohttp
import asyncio
import aiohttp
import bs4
import tqdm
@asyncio.coroutine
def get(*args, **kwargs):
response = yield from aiohttp.request('GET', *args, **kwargs)
return (yield from response.read_and_close(decode=True))
@molaschi
molaschi / stash_slack_integration.md
Created June 4, 2014 17:10
Integrate Stash with Slack using webhooks

This is a short article on how we integrate stash and slack in openmind

First of all i assume you have:

  • a working stash installation
  • a repository you to notify slack on pushes
  • stash user with administration priviledges
  • full access to the server (linux) where stash is installed on
  • a team configured on slack
  • slack user with administration priviledges
@regen100
regen100 / vcvarsall.bat
Last active August 29, 2015 14:06
vcvarsall.bat for VC++ 9.0 (2008)
@echo off
if "%1" == "" goto x86
if not "%2" == "" goto usage
if /i %1 == x86 goto x86
if /i %1 == amd64 goto amd64
if /i %1 == x64 goto amd64
if /i %1 == ia64 goto ia64
if /i %1 == x86_amd64 goto x86_amd64
if /i %1 == x86_ia64 goto x86_ia64
@augbog
augbog / Free O'Reilly Books.md
Last active May 14, 2024 10:27
Free O'Reilly Books

Free O'Reilly books and convenient script to just download them.

Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post

How to use:

  1. Take the download.sh file and put it into a directory where you want the files to be saved.
  2. cd into the directory and make sure that it has executable permissions (chmod +x download.sh should do it)
  3. Run ./download.sh and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.
@enakai00
enakai00 / reversi.ipynb
Created November 7, 2016 08:34
Reinforcement learning example for mini-max method Reversi.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@icoxfog417
icoxfog417 / edi_security_list.csv
Last active May 21, 2024 15:23
EDINET code & Security code
EDINET CODE 証券コード 会社名 33業種区分 17業種区分 規模区分
E01631 64800 日本トムソン株式会社 機械 機械 6
E04768 85840 株式会社ジャックス その他金融業 金融(除く銀行) 6
E25551 28820 イートアンド株式会社 食料品 食品 7
E00645 38650 北越紀州製紙株式会社 パルプ・紙 素材・化学 6
E01092 51950 バンドー化学株式会社 ゴム製品 自動車・輸送機 7
E00815 41820 三菱瓦斯化学株式会社 化学 素材・化学 4
E00871 42420 株式会社タカギセイコー 化学 素材・化学
E02986 33740 内外テック株式会社 卸売業 商社・卸売
E30863 JA三井リース株式会社