- everything is built around the concept of a
Strategy
- a
Strategy
can be a collection of other strategies, or a singleStrategy
- a
Strategy
returns aValueTree
that shrinks or complicates a value within that strategy- eg in a number range, shrinking would approx try to do a binary search to figure out the failing threshold
PROPTEST_CASES
is equal to256
any
for built in typesany::<u32>()
is aStrategy
for allu32
s
- we can use
prop_map
to transform strategies
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
# set scroll history to 100,000 lines | |
set-option -g history-limit 100000 | |
# modern colors | |
set -g default-terminal "tmux-256color" | |
set -ga terminal-overrides ",alacritty:Tc" | |
# vim copy mode | |
bind -T copy-mode-vi v send -X begin-selection | |
bind -T copy-mode-vi y send-keys -X copy-pipe 'pbcopy' |
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
-- always set leader first! | |
vim.keymap.set("n", "<Space>", "<Nop>", { silent = true }) | |
vim.g.mapleader = " " | |
------------------------------------------------------------------------------- | |
-- | |
-- preferences | |
-- | |
------------------------------------------------------------------------------- | |
-- never ever folding |
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
import numpy as np | |
import albumentations as A | |
from albumentations.pytorch import ToTensorV2 | |
from PIL import Image | |
def get_transforms(train=False): | |
""" | |
Takes a list of images and applies the same augmentations to all of them. | |
This is completely overengineered but it makes it easier to use in our pipeline |
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
def upload_time_in_days(mbps, tb): | |
mbps_in_MBps = mbps / 8 | |
tb_in_MB = tb * 1000000 | |
total_seconds = tb_in_MB / mbps_in_MBps | |
total_days = total_seconds / (60 * 60 * 24) | |
return total_days |
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 --platform=linux/amd64 ubuntu:22.04 | |
ENV DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update && \ | |
apt-get install -y curl unzip wget zsh \ | |
libopenblas-dev \ | |
libjpeg-dev \ | |
libpng-dev \ | |
build-essential \ |
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
# Wait for the transform to become available | |
listener.waitForTransform('/base_link', '/end_effector', rospy.Time(), rospy.Duration(4.0)) | |
# Get the transformation matrix from the robot base to the end effector | |
(trans, rot) = listener.lookupTransform('/base_link', '/end_effector', rospy.Time(0)) | |
rot_matrix = tf.transformations.quaternion_matrix(rot) | |
transformation_matrix = tf.transformations.concatenate_matrices(rot_matrix, tf.transformations.translation_matrix(trans)) |
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
import rospy | |
import tf | |
from geometry_msgs.msg import Quaternion | |
# Create a quaternion object | |
quat = Quaternion() | |
quat.x = 0.1 | |
quat.y = 0.2 | |
quat.z = 0.3 | |
quat.w = 0.4 |
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 | |
import rospy | |
import cv2 | |
from sensor_msgs.msg import Image | |
from cv_bridge import CvBridge | |
from PyCapture2 import * | |
def image_publisher(): | |
rospy.init_node('epiphan_image_publisher', anonymous=True) | |
pub = rospy.Publisher('image_topic', Image, queue_size=10) |
<%*
let weekNumber = moment().format('W')
let year = moment().format('Y')
let month = tp.date.now("MM-MMMM")
let yesterday = tp.date.now("YYYY-MM-DD_ddd", -1)
let today = tp.date.now("YYYY-MM-DD_ddd")
let tag = "#cw" + weekNumber + "_" + year
let prevTag = #cw${weekNumber - 1}_${year}
let file_path = A_daily_notes/${year}/${month}/${today}
%>
NewerOlder