This file contains hidden or 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
| """ | |
| Pencil Sketch Profile Picture Generator | |
| ======================================== | |
| A GUI tool for creating artistic pencil sketch portraits | |
| with full control over all image parameters. | |
| Requirements: pip install Pillow numpy | |
| Usage: python pencil_sketch_gui.py | |
| """ |
This file contains hidden or 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
| (defmacro deftestpackage (package-name for-package &optional (test-library-package-name :unit-test)) | |
| "Define a new package PACKAGE-NAME used to test the package | |
| designated by FOR-PACKAGE. The new package will import all symbols | |
| from FOR-PACKAGE and :USE the package designated by | |
| TEST-LIBRARY-PACKAGE-NAME which supposedly contains unit testing | |
| functions and macros." | |
| `(defpackage ,package-name | |
| (:use ,test-library-package-name ,@(mapcar #'package-name (package-use-list for-package))) | |
| (:import-from ,for-package | |
| ,@(let (symbols) |
This file contains hidden or 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
| use std::env; | |
| use std::fs::read_to_string; | |
| use regex::Regex; | |
| use std::collections::HashMap; | |
| use memoize::memoize; | |
| const DIGIT_NAMES: [&str; 10] = ["zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine"]; | |
| #[memoize] | |
| fn digit_encoding() -> (Regex, HashMap<String, usize>) { |
This file contains hidden or 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 luajit | |
| local xmlua = require("xmlua") | |
| xml = [[<?xml version="1.0" encoding="utf-8"?> | |
| <EntityDescriptor xmlns="urn:oasis:names:tc:SAML:2.0:metadata" xmlns:alg="urn:oasis:names:tc:SAML:metadata:algsupport" ID="_21f12cc0-a7f7-4e65-8b21-a0bba35e39c5" entityID="urn:federation:MicrosoftOnline"> | |
| <Signature xmlns="http://www.w3.org/2000/09/xmldsig#"> | |
| <SignedInfo> | |
| <CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> | |
| <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> |
This file contains hidden or 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
| // While jamming with a keyboard, I often want to record some theme into a clip. | |
| // I find it rather disruptive to have reach out for the mouse, or find a free clip | |
| // slot on an APC, or use a touch interface or whatever. So this script comes to the | |
| // rescue. It listens to MIDI events that I can trigger with a foot switch and records | |
| // clips to the currently selected track. It uses the global quantization setting to | |
| // determine the length of the clips that are created. Three MIDI events are used, | |
| // one to record one clip, one to record clips until stops, and one to stop recording. | |
| // The script automatically adds clips to the end of the currently selected track. |
This file contains hidden or 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
| broker_ip_address='192.168.178.19' | |
| wifi.sta.config({ssid="ssid",pwd="password"}) | |
| m = mqtt.Client('esp', 120, 'dev', 'dev') | |
| wifi.setmode(wifi.STATION) | |
| gpio.mode(1, gpio.INPUT, gpio.PULLUP) | |
| gpio.mode(2, gpio.INPUT, gpio.PULLUP) | |
| gpio.mode(3, gpio.OUTPUT, gpio.PULLUP) |
This file contains hidden or 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
| clabin 1175_% rlwrap lein run -m clojure.main script/figwheel.clj | |
| Figwheel: Starting server at http://localhost:3449 | |
| Figwheel: Watching build - dev | |
| Compiling "resources/public/js/main.js" from ["src"]... | |
| Reading analysis cache for jar:file:/Users/hans/.m2/repository/org/clojure/clojurescript/1.7.170/clojurescript-1.7.170.jar!/cljs/core.cljs | |
| Compiling target/figwheel_temp/dev/figwheel/connect.cljs | |
| Reading analysis cache for jar:file:/Users/hans/.m2/repository/org/omcljs/om/1.0.0-alpha22/om-1.0.0-alpha22.jar!/om/util.cljs | |
| Reading analysis cache for jar:file:/Users/hans/.m2/repository/org/omcljs/om/1.0.0-alpha22/om-1.0.0-alpha22.jar!/om/dom.cljs | |
| {:tag :cljs/analysis-error} | |
| ANALYSIS ERROR: Map literal must contain an even number of forms on file null, line null, column null |
This file contains hidden or 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
| (defpackage :fixed-width-record | |
| (:use :cl) | |
| (:export #:define-format | |
| #:write* | |
| #:read* | |
| #:field-parse-error | |
| #:create-table | |
| #:insert-record)) | |
| (in-package :fixed-width-record) |
This file contains hidden or 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
| ;;;; qdiff.lisp | |
| (defpackage #:qdiff | |
| (:use #:cl) | |
| (:shadowing-import-from #:ql-dist | |
| #:name | |
| #:release | |
| #:ensure-local-archive-file | |
| #:base-directory | |
| #:prefix) |
This file contains hidden or 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
| var plistParser = require("../lib/sax").parser(false, {lowercasetags:true, trim:true}), | |
| sys = require("sys"), | |
| fs = require("fs"); | |
| function entity (str) { | |
| return str.replace('"', '"'); | |
| } | |
| plistParser.getInteger = function (string) { | |
| this.value = parseInt(string, 10); |
NewerOlder