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 | |
## requirements: | |
# beautifulsoup4 | |
# requests | |
# openai | |
# dotenv | |
import os | |
import sys |
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
const record = (twil) => { | |
twil.record({ | |
transcribe: true, | |
transcribeCallback: "/transcribed", // see twilio-vm.js | |
action: "/call-missed", // see twilio-missed.js | |
maxLength: 90, | |
finishOnKey: "*" | |
}) | |
} |
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 python | |
import re | |
import sys | |
import csv | |
class State: | |
def __init__(self, val): | |
self._val = val | |
self._remaining = [] |
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 python | |
import sys | |
import argparse | |
parser = argparse.ArgumentParser(description="du your s3") | |
parser.add_argument("--max-depth", type=int, help="max depth to report") | |
parser.add_argument("--raw", action="store_true", help="do not pretty print output") | |
args = parser.parse_args() |
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 ruby | |
require "aws-sdk-s3" | |
bucket = Aws::S3::Resource.new.bucket(ARGV[0]) | |
bucket.objects().each do |obj| | |
puts "#{obj.size} #{obj.key} #{obj.last_modified}" | |
end |
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 bash | |
PROGNAME=$(basename $0) | |
function usage { | |
echo "usage: $PROGNAME [-n NAMESPACE] [-m MAX-PODS] -s SERVICE -- COMMAND" | |
echo " -s SERVICE K8s service, i.e. a pod selector (required)" | |
echo " COMMAND Command to execute on the pods" | |
echo " -n NAMESPACE K8s namespace (optional)" | |
echo " -m MAX-PODS Max number of pods to run on (optional; default=all)" |
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 bash | |
MYMAC=$(/usr/sbin/networksetup -getmacaddress Wi-Fi | grep -oE "[a-zA-Z0-9]{2}:([a-zA-Z0-9]{2}:?)+") | |
if [ "$1" == "--help" ] || [ $# -gt 1 ]; then | |
echo "usage: $(basename $0) [--random|--orig]" | |
exit 1 | |
fi | |
if [ $# -eq 0 ] || [ "$1" == "--random" ]; then |
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
C:\> git config --global core.editor "C:/Progra~2/Notepad++/notepad++.exe -multiInst -nosession -noPlugin """$*"""" |
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
using System.Threading; | |
using System.Threading.Tasks.Dataflow; | |
class Pipeline<T> | |
{ | |
private readonly SemaphoreSlim _semaphore; | |
private readonly BufferBlock<T> _buffer; | |
Pipeline(Action<T> action, int capacity) | |
{ |
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 ( | |
"sync" | |
"fmt" | |
) | |
func main() { | |
ch := make(chan int) | |
var wg sync.WaitGroup |
NewerOlder