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
locals { | |
common_tags = { | |
Description = "VPC with public and private EC2 instances", | |
Env = "dev", | |
Project = "bastion-vpc" | |
} | |
} | |
resource "aws_vpc" "ami_exp" { | |
cidr_block = "10.0.0.0/16" |
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
data "aws_ami" "arch" { | |
owners = ["093273469852"] # Uplink Labs | |
most_recent = true | |
filter { | |
name = "name" | |
values = ["arch-linux-hvm-*"] | |
} | |
filter { |
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
.PHONY: all | |
all: config.json rootfs | |
config.json: | |
sudo runc spec | |
busybox: | |
skopeo copy docker://busybox:latest oci:busybox:latest | |
bundle: busybox |
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 | |
from random import randint | |
def miller_rabin(n: int) -> bool: | |
if n <= 3 or n % 2 == 0: | |
raise RuntimeError("n <= 3 or n % 2 == 0") | |
k = 1 | |
while (n - 1) % (1 << k) == 0 and ((n - 1) // (1 << k)) % 2 == 0: |
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
A: 𝔄 | |
B: 𝔅 | |
C: ℭ | |
D: 𝔇 | |
E: 𝔈 | |
F: 𝔉 | |
G: 𝔊 | |
H: ℌ | |
I: ℑ | |
J: 𝔍 |
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
>MN908947.3 Severe acute respiratory syndrome coronavirus 2 isolate Wuhan-Hu-1, complete genome | |
ATTAAAGGTTTATACCTTCCCAGGTAACAAACCAACCAACTTTCGATCTCTTGTAGATCTGTTCTCTAAA | |
CGAACTTTAAAATCTGTGTGGCTGTCACTCGGCTGCATGCTTAGTGCACTCACGCAGTATAATTAATAAC | |
TAATTACTGTCGTTGACAGGACACGAGTAACTCGTCTATCTTCTGCAGGCTGCTTACGGTTTCGTCCGTG | |
TTGCAGCCGATCATCAGCACATCTAGGTTTCGTCCGGGTGTGACCGAAAGGTAAGATGGAGAGCCTTGTC | |
CCTGGTTTCAACGAGAAAACACACGTCCAACTCAGTTTGCCTGTTTTACAGGTTCGCGACGTGCTCGTAC | |
GTGGCTTTGGAGACTCCGTGGAGGAGGTCTTATCAGAGGCACGTCAACATCTTAAAGATGGCACTTGTGG | |
CTTAGTAGAAGTTGAAAAAGGCGTTTTGCCTCAACTTGAACAGCCCTATGTGTTCATCAAACGTTCGGAT | |
GCTCGAACTGCACCTCATGGTCATGTTATGGTTGAGCTGGTAGCAGAACTCGAAGGCATTCAGTACGGTC | |
GTAGTGGTGAGACACTTGGTGTCCTTGTCCCTCATGTGGGCGAAATACCAGTGGCTTACCGCAAGGTTCT |
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
class LagrangePolynomial: | |
def __init__(self, x_points: list[float], y_points: list[float]) -> None: | |
self.xs = x_points | |
self.ys = y_points | |
def _basis(self, x: float, j: int) -> float: | |
"""Lagrange basis polynomial l_j(x)""" | |
x_j = self.xs[j] | |
product = 1.0 |
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
# symlink to /etc/systemd/system/ | |
[Unit] | |
Description=%I bot | |
After=network.target | |
[Service] | |
Type=simple | |
WorkingDirectory=/home/fionn/bots/%i/ | |
EnvironmentFile=/home/fionn/bots/%i/.env |
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
locals { | |
project = "eng-sandbox" | |
region = "us-west1" | |
state_bucket_name = "test-terraform-state-2487523" | |
labels = { | |
env = "non-prod" | |
usage = "infra" | |
owned-by = "eng" | |
team = "test" |
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
#!/bin/bash | |
# | |
# drawHelix.sh <input.fa> | |
# | |
# Reads a fasta input file and stream a B-Form DNA | |
# helix with the sequence to STDOUT | |
# | |
## __ __ __ ___ | |
### |__) | / \ /__` \ / |\ | | /\ \_/ | |
#### |__) | \__/ .__/ | | \| | /~~\ / \ |