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] | |
name = "wordle_solver" | |
version = "0.1.0" | |
edition = "2021" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] | |
rand = "0.8.4" |
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
require "string" | |
function checkBluetoothResult(rc, stderr, stderr) | |
if rc ~= 0 then | |
print(string.format("Unexpected result executing `blueutil`: rc=%d stderr=%s stdout=%s", rc, stderr, stdout)) | |
end | |
end | |
function bluetooth(power) | |
print("Setting bluetooth to " .. power) |
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
<h1>Individual Contributor License Agreement</h1> | |
<p>Thank you for your interest in IndraDB. In order to clarify the intellectual property license granted with Contributions from any person or entity, IndraDB must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of IndraDB and its users; it does not change your rights to use your own Contributions for any other purpose.</p> | |
<p>You accept and agree to the following terms and conditions for Your present and future Contributions submitted to IndraDB. In return, IndraDB shall not use Your Contributions in a way that is contrary to the public benefit or inconsistent with its bylaws in effect at the time of the Contribution. Except for the license granted herein to IndraDB and recipients of software distributed by IndraDB, You reserve all right, title, and interest in and to Your Co |
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
""" | |
The script will run multiple simulations of flipping a coin continuously until | |
we hit either the sequence THHH or HHHH. It will print out how many times each | |
sequence was hit. | |
""" | |
# Use `secrets` rather than `random` because this is guaranteed to generate | |
# cryptographically secure random values | |
import secrets |
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
import socket | |
import re | |
PORT = 1075 | |
LINE_VALIDATOR = re.compile(r"(0|1) (0|1) (0|1) (0|1) (0|1)") | |
def main(): | |
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
s.bind(("0.0.0.0", PORT)) |
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 | |
# Uses python3. Example: `python3 mixed_tabs_spaces.py '**/*.py'` | |
import glob | |
import sys | |
def has_mixed_tabs_spaces(f): | |
has_spaces = False | |
has_tabs = False |
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
<html> | |
<body style="text-align: center"> | |
<img id="img" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAtoAAALaCAYAAAAP7vQzAAGx+0lEQVR42uydd5xdVdn9175TEyChgwoi0kvovSm9CoReRak2quCL5RVff4Ki0kQRFAUEAkS69N577yVUEZAOaZNp+/dHCpM75+z9tH3unWQ/n4+Sueecfc6dhMz3LtZeyyFPnjx58pBnl82B9g4A/TO//oPd0bbuWpgLXZgLHnMBmHPa/+aAx9wA5gUwEsBIeMwJYC7ATT3HYxgw43+d8OgA0AagDR5tAGoAWgA4eACAn/YE/fDoA9ANoAdANzymAOgCMBnAJHhMAjARwHh4Px7AZ9P+9zE8PgIwAcAE+Gn/BMYDGI8OTLjjAeCv/6r7BtSAyZOBK+7OfxaabQ455BCceeaZ+RuRJ08Tjcvfgjx58uQBRs4FrL0qgN5pfzk64OBdMOfcc2ME+jACwIjWGuZdf1Us1NKK+dCP+QA3zzSAng/9mKsOljsBdALoANA+DZA/n9DXnHM51w4+1gdgyrT/dcHPAPSp//T4EA4fTYPyDwH/IRw+6OnGf+97Gp/1+WnQXsOnH3yE3r9dN2DtFuC+p4AJk/OfrQzaefJk0M6TJ0+eWXra2oBtNvz86y8sgM4DdsX86MN8AOabbyQWW3x5fAl9+ALgvgDgS+jDvNPU5+nK81QE9TGodY2DaZNzffhcB6Ad3cBMKvg7qOEdAG+j37+DFrw57gW888kEfATgAzh8dNbVwPufTr2+vw+47iGgrz//2cygnSdPBu08efLkGRKz1GLAKisB6AE2Xgsj1lsHC6MLC3d24CvLjMJXAXwZcF+Gx5fRi5HANCV6uraLIrh09rAMlw7Eg2t5G2gPrTn9eDv6UcN4eHwK4H204HUA/wb8G+jHy8+/gHe6u/EuOvDuHQ+j/95nAbQCjzwHvPZu/r |
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
import os | |
import re | |
import sys | |
TRY_PATTERN = re.compile(r"try!\(") | |
def replace_try(contents): | |
match = TRY_PATTERN.search(contents) | |
if match: |
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
# This has been turned into a full-fledged repo: | |
# https://github.com/dailymuse/torender |
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
ag foobar --files-with-matches | while read filename; do subl $filename; done |
NewerOlder