from bs4 import BeautifulSoup | |
import os | |
import re | |
import requests | |
import urlparse | |
import smtplib | |
from smtplib import SMTP | |
from smtplib import SMTP_SSL | |
from smtplib import SMTPAuthenticationError |
;; Show history of an entity | |
;; | |
;; useful for interactively inspecting what happened to a datomic entity in its lifetime | |
;; | |
;; use `entity-history` to get a list of transactions that have touched the entity (assertions, retractions) | |
;; | |
;; use `explain-tx` to find out what else was transacted in the txs | |
(defn entity-history | |
"Takes an entity and shows all the transactions that touched this entity. |
#!/usr/bin/env python3 | |
import sys | |
import os | |
def curl_to_ab(curl_cmd: list, num: int=200, cur: int=4) -> str: | |
""" | |
Translate a cURL command created by Chrome's developer tools into a | |
command for ``ab``, the ApacheBench HTTP benchmarking tool. |
;; Adds support to Transit for emitting Joda DateTimes in the same format as standard java.util.Date. | |
;; Dependencies: [clj-time "0.9.0"] and [com.cognitect/transit-clj "0.8.259"] (newer version will likely still work) | |
(require '[cognitect.transit :as transit]) | |
(require '[clj-time.coerce :as coerce]) | |
(import '[java.io ByteArrayOutputStream]) | |
(def ^:private joda-time-verbose-handler | |
(transit/write-handler |
This is a study of interpersonal closeness, and your task, which we think will be quite enjoyable, is simply to get close to your partner. We believe that the best way for you to get close to your partner is for you to share with them and for them to share with you. Of course, when we advise you about getting close to your partner, we are giving advice regarding your behavior in this demonstration only, we are not advising you about your behavior outside of this demonstration.
In order to help you get close we've arranged for the two of you to engage in a kind of sharing game. You're sharing time will be for about one hour, after which time we ask you to fill out a questionnaire concerning your experience of getting close to your partner.
You have been given three sets of slips. Each slip has a question or a task written on it. As soon as you both finish reading these instructions, you should
# OSX for Hackers (Mavericks/Yosemite) | |
# | |
# Source: https://gist.github.com/brandonb927/3195465 | |
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Ask for the administrator password upfront |
Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
(ns lein-headless | |
(:require [ccw.e4.dsl :refer [defcommand defhandler defkeybinding]] | |
[ccw.e4.model :refer [context-key]]) | |
(:import [ccw.launching ClojureLaunchShortcut])) | |
(defn run | |
"Try to start a Leiningen Project. If focus is on a ClojureEditor, then first | |
try to launch from the editor project, else try to launch from the selection." | |
[context] | |
(let [editor (context-key context org.eclipse.ui.IEditorPart)] |
# Source : http://thezinx.com/2013/10/29/create-bootable-dmg-iso-mavericks-app.html | |
# Mount the installer image | |
hdiutil attach /Applications/Install\ OS\ X\ Mavericks.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app | |
# Convert the boot image to a sparse bundle | |
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Mavericks | |
# Increase the sparse bundle capacity to accommodate the packages | |
hdiutil resize -size 8g /tmp/Mavericks.sparseimage |