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/env python3 | |
import sys | |
import array | |
import math | |
import random | |
import os.path | |
import win32com.client | |
def get_catia(): |
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/perl | |
# By: Jeremiah LaRocco | |
# Use translate.google.com to translate between languages. | |
# Sample run: | |
# gtrans.pl --to french --from english This is a test | |
# Ceci est un test | |
# | |
use strict; |
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/env python3 | |
# Use lxml to validate XML against a DTD | |
import re | |
import sys | |
import os.path | |
import codecs | |
from lxml import etree |
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
#include <stdio.h> | |
#include <queue> | |
#include <unistd.h> | |
#include <pthread.h> | |
#include <stdlib.h> | |
// Base task for Tasks |
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
;; -*- mode: Lisp; fill-column: 75; comment-column: 50; -*- | |
;;(declaim (optimize (speed 3) (safety 1) (debug 1))) | |
(setf *read-default-float-format* 'double-float) | |
#-quicklisp | |
(let ((quicklisp-init "/home/jeremiah/quicklisp/setup.lisp")) | |
(when (probe-file quicklisp-init) | |
(load quicklisp-init))) |
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
/* | |
readmp3.c | |
Copyright (c) 2012, Jeremiah LaRocco jeremiah.larocco@gmail.com | |
Permission to use, copy, modify, and/or distribute this software for any | |
purpose with or without fee is hereby granted, provided that the above | |
copyright notice and this permission notice appear in all copies. | |
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
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
(ql:quickload :cl-glfw3) | |
(glfw:def-key-callback keyboard-handler (window key scancode action mod-keys) | |
(format t "Window ~a key ~a scancode ~a action ~a mod-keys ~a~%" window key scancode action mod-keys) | |
(when (eq key :escape) | |
(glfw:set-window-should-close window))) | |
(defun show-window (name) | |
(let ((win (glfw:create-window :title (format nil "GLFW Window (~a)" name) | |
:width 100 |
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 replace-python-exp () | |
"Run the region as a Python script, kill the region, insert the output of the Python script." | |
(interactive) | |
(let* ((tmp-file (make-temp-file "tmppl")) | |
(rb (region-beginning)) | |
(re (region-end)) | |
(str (buffer-substring-no-properties rb re))) | |
(if (string-match "print" str) | |
(progn | |
(write-region rb re tmp-file nil 1) |
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
(ql:quickload :cl-csv) | |
(ql:quickload :zip) | |
(ql:quickload :cl-strings) | |
;; Download transit data from this French site: | |
;; https://www.data.gouv.fr/fr/datasets/transport-donnees-gtfs/ | |
(defun read-transit-data (&key (zip-file-path "~/Downloads/gtfs_current.zip")) | |
(flet ((csv-name-to-lisp (name) | |
(string-upcase (cl-strings:replace-all name "_" "-")))) |
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
(load "~/src/gtd/config") | |
;; Source: http://www.emacswiki.org/emacs-en/download/misc-cmds.el | |
(defun revert-buffer-no-confirm () | |
"Revert buffer without confirmation." | |
(interactive) | |
(revert-buffer :ignore-auto :noconfirm)) | |
(defun toggle-kbd-macro-recording-on () |
NewerOlder