Skip to content

Instantly share code, notes, and snippets.

@blinks
blinks / smtpcheck.py
Created January 16, 2009 16:35
Check if an email address exists without sending an email. Technique from: http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exists-without-sending-an-email/
#!/usr/bin/env python
"""
Check that a particular email address exists.
Adam Blinkinsop <blinks@acm.org>
WARNING:
Checking email addresses in this way is not recommended, and will lead to
your site being listed in RBLs as a source of abusive traffic. Mail server
admins do like it when they get connections that don't result in email being
sent, because spammers often use this technique to verify email addresses.
@hellerbarde
hellerbarde / latency.markdown
Created May 31, 2012 13:16 — forked from jboner/latency.txt
Latency numbers every programmer should know

Latency numbers every programmer should know

L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns             
Compress 1K bytes with Zippy ............. 3,000 ns  =   3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns  =  20 µs
SSD random read ........................ 150,000 ns  = 150 µs

Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs

@shadowmint
shadowmint / gist:6928668
Created October 11, 2013 02:20
SDL2 mixer example
import ctypes
import unittest
import time
import os.path
from sdl2 import *
from sdl2.sdlmixer import *
class MixerTests(unittest.TestCase):
@admalledd
admalledd / obs_deps.sh
Last active September 20, 2016 10:03
Helper script to compile obs-studio. Gets the needed depenancies for you!
#!/bin/bash
set -e #quit on error stuff!
#This script was only testing on linux mint 16, with a large pile of custom tweaking.
#This file should be used more as a "guide line" than anything else...
# PLEASE edit certain settings before going around and running this! to make sure of that I
# have the next line kill the script unless commented out!
echo "You forgot to set up this file! Edit it with correct paths to use!" && exit 0
# Copyright (c) 2015 Andrew Durdin
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
@pervognsen
pervognsen / rot.py
Last active October 17, 2015 20:53
for jp
from string import maketrans, ascii_lowercase as lc, ascii_uppercase as uc
rots = [maketrans(lc + uc, lc[n:] + lc[:n] + uc[n:] + uc[:n]) for n in range(26)]
def rot(s, n): return s.translate(rots[n % 26])
@adamv
adamv / table.py
Last active November 17, 2015 18:10
class Table(object):
def __init__(self):
self.rows = []
def add(self, row):
self.rows.append(row)
def render(self):
if not self.rows:
return
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active July 9, 2024 15:59
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
Failed to locate BG usecode file but found FOV.
// externs
extern void Func08FF 0x8FF (var var0000);
extern var Func0829 0x829 (var var0000);
void Func0096 shape#(0x96) ()
{
if (!(event == 0x0001)) goto labelFunc0096_0038;
if (!UI_get_item_flag(item, 0x000A)) goto labelFunc0096_001C;
Func08FF("@The sails must be furled before the planks are raised.@");
@marrub--
marrub-- / README.md
Last active October 15, 2019 08:33
ZScript Language Documentation