Skip to content

Instantly share code, notes, and snippets.

@mcmtroffaes
mcmtroffaes / kfcv.r
Last active November 16, 2018 02:41
k-fold cross validation script for R
kfcv.sizes = function(n, k=10) {
# generate sample sizes for k-fold cross validation on a data set of
# size n
# author: Matthias C. M. Troffaes
# date: 22 Nov 2010
# license: GPLv3
# usage:
#
# kfcv.sizes(n, k=...)
@gregburek
gregburek / rateLimitDecorator.py
Created December 7, 2011 01:51
Rate limiting function calls with Python Decorators
import time
def RateLimited(maxPerSecond):
minInterval = 1.0 / float(maxPerSecond)
def decorate(func):
lastTimeCalled = [0.0]
def rateLimitedFunction(*args,**kargs):
elapsed = time.clock() - lastTimeCalled[0]
leftToWait = minInterval - elapsed
if leftToWait>0:
@rxaviers
rxaviers / gist:7360908
Last active May 27, 2026 08:41
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:
@cferdinandi
cferdinandi / terminal-cheat-sheet.txt
Last active May 6, 2026 18:15
Terminal Cheat Sheet
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help
@parmentf
parmentf / GitCommitEmoji.md
Last active May 24, 2026 14:51
Git Commit message Emoji

Inspired by dannyfritz/commit-message-emoji

See also gitmoji.

Commit type Emoji
Initial commit πŸŽ‰ :tada:
Version tag πŸ”– :bookmark:
New feature ✨ :sparkles:
Bugfix πŸ› :bug:
@aidos-dev
aidos-dev / README.md
Last active May 22, 2026 05:59
How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

How to connect Apple AirPods to Linux (Debian/Ubuntu/Mint)

Step 1.

Open your terminal.

In the root directory run the command:

sudo nano /etc/bluetooth/main.conf