View pipeorganinfo.py
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 | |
# -*- coding: utf-8 -*- | |
# Pipe Organ Database Stoplist Scraper | |
license = ''' | |
Copyright 2021 Joshua Sobel | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software | |
and associated documentation files (the "Software"), to deal in the Software without restriction, | |
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, |
View hover.lua
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
window=new(ui.Window,"Hover Dialog",ui.Layout.Vertical) | |
window.ChildAnchors=ui.Anchors.Fill | |
hovering = false | |
target_alt = 0 | |
target_vs = 0 | |
old_throttle = ship.throttle | |
window.Add(new(ui.Button,"Start Hover",function() |
View trongle.js
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
var x = 0; | |
var active = true; | |
var prev = JSON.stringify(GM.grid.cells); | |
function moved() { | |
if (prev == JSON.stringify(GM.grid.cells)) { | |
prev = JSON.stringify(GM.grid.cells); | |
return false | |
} else { |
View palindrome.go
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
package main | |
import ( | |
"strconv"; | |
"reflect" | |
) | |
func intToSlice(num int) ([]int) { | |
str := strconv.Itoa(num) | |
var nums []int |
View lambda-ski.scm
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
(define (lambda-to-ski f) | |
(match f | |
[`(lambda (,a) (lambda (,b) ,c)) (lambda-to-ski `(lambda (,a) ,(lambda-to-ski `(lambda (,b) ,c))))] | |
[`(lambda (,a) (,exp1 ,exp2)) `((s ,(lambda-to-ski `(lambda (,a) ,exp1))) ,(lambda-to-ski `(lambda (,a) ,exp2)))] | |
[`(lambda (,a) ,a) 'i] | |
[`(lambda (,a) ,b) `(k ,(lambda-to-ski b))] | |
[`(,a ,b) `(,(lambda-to-ski a) ,(lambda-to-ski b))] | |
[_ f])) | |
View lisplisp2lazyk.scm
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
(define (replace source target replacement) | |
(cond ((null? source)'()) | |
((equal? source target) replacement) | |
(else (let ((next (car source)) | |
(rest (cdr source))) | |
(cons (if (not (list? next)) | |
next | |
(replace next target replacement)) | |
(replace rest target replacement)))))) | |
View md5.go
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
package main | |
import ( | |
"fmt" | |
"math" | |
"bytes" | |
"encoding/binary" | |
) | |
type testCase struct { |
View infix-prefix.st
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
Object subclass: Conversion [ | |
isOperator: c [ | |
(c isAlphaNumeric) ifFalse: [ ^true ]. | |
(c isAlphaNumeric) ifTrue: [ ^false ]. | |
] | |
getPriority: char [ | |
(char = $-) ifTrue: [ ^1 ]. | |
(char = $+) ifTrue: [ ^1 ]. | |
(char = $/) ifTrue: [ ^2 ]. |
View nth-root-a.st
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
Number extend [ | |
nthRoot: n [ | |
|x0 m x1| | |
x0 := (self / n) asFloatD. | |
m := n - 1. | |
[true] whileTrue: [ | |
x1 := ((m * x0) + (self/(x0 raisedTo: m))) / n. | |
((x1 - x0) abs) < ((x0 * 1e-9) abs) | |
ifTrue: [ ^ x1 ]. | |
x0 := x1. |
View internet.bat
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
@echo | |
set "host=8.8.8.8" | |
:loop | |
ping -n 1 "%host%" | findstr /r /c:"[0-9] *ms" | |
if %errorlevel% == 0 ( | |
ipconfig /all | |
echo Success! | |
msg * Success! |
NewerOlder