Skip to content

Instantly share code, notes, and snippets.

@chetan
chetan / yardoc_cheatsheet.md
Last active May 10, 2024 02:53
YARD cheatsheet
@mechamogera
mechamogera / Readme.md
Created October 5, 2012 08:50
C++言語で簡単なRuby拡張ライブラリを書いてみた

この拡張ライブラリの使用手順

  • このサンプルをダウンロードして解凍したディレクトリで以下を実行
 $ ruby extconf.rb
 $ make
 $ ruby test.rb

ファイルについて

RICOH THETAで撮った写真をPTP-IPで取得する - stoikheia(@3xv)の日記 http://d.hatena.ne.jp/stoikheia/20131201
ここにあるサンプル、Socketが生書きなのでラッピングをこころみてる
@glass5er
glass5er / pptximage.py
Last active May 25, 2023 13:08
add an image in every Powerpoint slide using python-pptx
##
## Copy & Paste Tool for images to PowerPoint(.pptx)
##
import pptx
import pptx.util
import glob
import scipy.misc
OUTPUT_TAG = "MY_TAG"
@gcasey
gcasey / lasreader.pxd
Last active June 23, 2020 08:34
Reading LAS file efficiently into numpy using cython
#%%cython -I/usr/local/include -L/usr/local/lib -llas_c
# Created by Casey Goodlett
cimport cython
import numpy as np
cimport numpy as np
import liblas
DTYPE = np.float64
ctypedef np.float64_t DTYPE_t
@voluntas
voluntas / new_to_mqtt.rst
Last active October 2, 2023 06:26
初めての MQTT
@jgcoded
jgcoded / traveling_salesman.cpp
Last active January 22, 2024 09:43
Traveling Salesman solution in c++ - dynamic programming solution with O(n^2 * 2^n).
#include <vector>
#include <iostream>
using namespace std;
/**
\brief Given a complete, undirected, weighted graph in the form of an adjacency matrix,
returns the smallest tour that visits all nodes and starts and ends at the same
node. This dynamic programming solution runs in O(n^2 * 2^n).
var Hangul = {
startChar: 'ㄱㄲㄴㄷㄸㄹㅁㅂㅃㅅㅆㅇㅈㅉㅊㅋㅌㅍㅎ'.split(''),
middleChar: 'ㅏㅐㅑㅒㅓㅔㅕㅖㅗㅘㅙㅚㅛㅜㅝㅞㅟㅠㅡㅢㅣ'.split(''),
endChar: ' ㄱㄲㄳㄴㄵㄶㄷㄹㄺㄻㄼㄽㄾㄿㅀㅁㅂㅄㅅㅆㅇㅈㅊㅋㅌㅍㅎ'.split(''),
code: '가'.charCodeAt(0)
}
var HanConv = {
start: 'rRseEfaqQtTdwWczxvg'.split(''),
middle: 'k,o,i,O,j,p,u,P,h,hk,ho,hl,y,n,nj,np,nl,b,m,ml,l'.split(','),
# System language
lang en_US
# Language modules to install
langsupport en_US
# System keyboard
keyboard us
# System mouse
@tuxfight3r
tuxfight3r / preseed-desktop.cfg
Last active August 29, 2018 12:29
ubuntu-trusty-preseed.cfg
#ubuntu preseed file for desktop with disk encryption
d-i debian-installer/locale string en_GB.UTF-8
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/variantcode string qwerty
d-i keyboard-configuration/layoutcode string British
d-i netcfg/choose_interface select auto
d-i netcfg/get_hostname string unassigned-hostname
d-i netcfg/get_domain string internal.local
d-i netcfg/wireless_wep string