This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ctypes | |
import win32net, win32api | |
import time | |
current_user = win32api.GetUserNameEx(2) | |
data = [{"domainandname": current_user}] | |
def get_members(group_name): | |
members = win32net.NetLocalGroupGetMembers(None, group_name, 3)[0] | |
print members |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun eval. (e a) | |
(cond | |
((atom e) (assoc. e a)) | |
((atom (car e)) | |
(cond | |
((eq (car e) 'quote) (cadr e)) | |
((eq (car e) 'atom) (atom (eval. (cadr e) a))) | |
((eq (car e) 'eq) (eq (eval. (cadr e) a) | |
(eval. (caddr e) a))) | |
((eq (car e) 'car) (car (eval. (cadr e) a))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn words [text] (re-seq #"[a-z]+" (.toLowerCase text))) | |
(defn train [features] | |
(reduce (fn [model f] (assoc model f (inc (get model f 1)))) {} features)) | |
(def *nwords* (train (words (slurp "big.txt")))) | |
(defn edits1 [word] | |
(let [alphabet "abcdefghijklmnopqrstuvwxyz", n (count word)] | |
(distinct (concat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import redis | |
import datetime | |
import time | |
def main(): | |
r = redis.client.StrictRedis() | |
while True: | |
now = datetime.datetime.now() | |
print 'Sending {0}'.format(now) | |
r.publish('clock', now) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* ShowOff JS Logic */ | |
var ShowOff = {}; | |
var preso_started = false | |
var slidenum = 0 | |
var slideTotal = 0 | |
var slides | |
var currentSlide | |
var totalslides = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns quil-ravi.core | |
(:use quil.core)) | |
(defn setup [] | |
(smooth) ;;Turn on anti-aliasing | |
(frame-rate 65) ;;Set framerate to 1 FPS | |
(background 200)) ;;Set the background colour to | |
;; a nice shade of grey. | |
(defn savef [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script> | |
function copy(event) { | |
event.clipboardData.setData('text/plain', 'Hello World!'); | |
} | |
</script> | |
<body oncopy="copy(event)"> | |
</body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<meta charset="utf-8"> | |
<style> | |
.country { | |
fill: #b8b8b8; | |
stroke: #fff; | |
stroke-width: .5px; | |
stroke-linejoin: round; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# script for optimizing images in a directory (recursive) | |
# pngcrush & jpegtran settings from: | |
# http://developer.yahoo.com/performance/rules.html#opt_images | |
# pngcrush | |
find $1 -iname "*.png" | while read png | |
do | |
echo "crushing $png ..." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import threading | |
import time | |
class Sleepy(threading.Thread): | |
def run(self): | |
time.sleep(5) |
OlderNewer