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
| local _M = { | |
| scratchpad = {} | |
| } | |
| local yabai = string.gsub(hs.execute("which yabai", true), "%s+", "") | |
| _M.init = function() | |
| local output, status = _M.exec("query --windows") | |
| if not status then return end |
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
| package main | |
| import ( | |
| "bytes" | |
| "compress/gzip" | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "crypto/md5" | |
| "crypto/rand" | |
| "fmt" |
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
| package main | |
| import ( | |
| "math/rand" | |
| "sort" | |
| "testing" | |
| "time" | |
| ) | |
| func randNums() []int { |
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 python | |
| # -*- coding: utf-8 -*- | |
| import socket | |
| import select | |
| import sys | |
| IP_TRANSPARENT = 19 | |
| HOST = "0.0.0.0" | |
| PORT = 10 |
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
| package main | |
| import ( | |
| "testing" | |
| ) | |
| type myStruct struct { | |
| list []string | |
| } |
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
| package main | |
| import ( | |
| "bytes" | |
| "fmt" | |
| "io" | |
| "io/ioutil" | |
| "mime/multipart" | |
| "net/http" | |
| "os" |
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
| package main | |
| import ( | |
| "fmt" | |
| "regexp" | |
| "strings" | |
| "testing" | |
| ) | |
| var template = ` |
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
| package main | |
| import ( | |
| "compress/gzip" | |
| "flag" | |
| "fmt" | |
| "io" | |
| "os" | |
| ) |
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 uuid import uuid4 | |
| from redis import StrictRedis | |
| from functools import wraps | |
| from datetime import datetime | |
| from pytz import timezone | |
| def singleton(cls): | |
| instances = {} |
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
| class DataValidator(object): | |
| def __init__(self, values, validators, force=False, callback=None): | |
| self.values = values | |
| self.validators = validators | |
| self.callback = callback | |
| self.force = force | |
| def check(self): | |
| values = self.values.copy() | |
| for k, v in self.validators.items(): |
NewerOlder