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 python3.10 | |
# trim noise from forvo audio files | |
# experiment with treshold (in db) as needed | |
import sys | |
from pydub import AudioSegment | |
from pydub.silence import split_on_silence |
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
FROM camunda/camunda-bpm-platform:latest | |
RUN echo '<% response.sendRedirect("/camunda"); %>' > /camunda/webapps/ROOT/index.jsp |
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
// ==UserScript== | |
// @name Enlarge Arabic | |
// @namespace danlei | |
// @author danlei | |
// @version 1.1.5 | |
// @updateURL https://gist.githubusercontent.com/danlei/17478a08b53ba9367e83111104bfa002/raw | |
// @installURL https://gist.githubusercontent.com/danlei/17478a08b53ba9367e83111104bfa002/raw | |
// @include /^https?://.*$/ | |
// @exclude https://twitter.com* | |
// @description Increase Arabic font size relatively (adapted from Arminius99's script) |
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
(defun indices (input-file output-file) | |
(with-open-file (in input-file :direction :input) | |
(with-open-file (out output-file :direction :output | |
:if-exists :supersede | |
:if-does-not-exist :create) | |
(loop with previous-field = nil | |
for index from 0 | |
for field = (read in nil nil) | |
while field | |
if (not previous-field) |
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
{-# LANGUAGE TemplateHaskell #-} | |
module LogicTemplates (true, | |
false, | |
eq, | |
taut, | |
cont) | |
where | |
import Language.Haskell.TH |
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
;; Beware: #" is actually not reserved for the user. See: | |
;; http://www.lispworks.com/documentation/HyperSpec/Body/02_dh.htm | |
(defun read-raw-string (stream subchar arg) | |
(declare (ignore subchar arg)) | |
(with-output-to-string (out) | |
(loop for char = (read-char stream nil nil) | |
while (and char (char/= char #\")) | |
do (write-char char out)))) |
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
module Soundex | |
where | |
import Data.Maybe (catMaybes) | |
import GHC.Exts (the) | |
import Data.List (group) | |
import Data.Function (on) | |
classes = [("bfpv",'1'), | |
("cgjkqsxzß",'2'), |
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
(require 'xml) | |
(require 'html-lite) | |
(defun xml-get-nodes (node node-name) | |
(let ((nodes (list))) | |
(labels ((match (node) (eq (xml-node-name node) node-name)) | |
(rec (node) | |
(when (listp node) | |
(if (match node) | |
(push node nodes) |
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
(defun transform-args (args) | |
(if (null args) | |
"" | |
(destructuring-bind (name value . rest) args | |
(when (not (keywordp name)) | |
(signal 'wrong-type-argument (list name))) | |
(concat " " (substring (symbol-name name) 1) | |
"=\"" (format "%s" value) "\"" | |
(transform-args rest))))) |
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
module DSParser | |
where | |
import Prelude hiding (lex) | |
type Word = String | |
type Pos = Integer | |
data Token = Token { pos :: Pos, lex :: Word } |
NewerOlder