Skip to content

Instantly share code, notes, and snippets.

View rawsh's full-sized avatar

Robert Washbourne rawsh

View GitHub Profile
@yzdbg
yzdbg / auto-dr.md
Last active November 3, 2023 17:11

Automating Daily Reports, because fuck it, really...

Each day at our company, developers are required to document their activities, painstakingly jotting down their daily work and future plans. A monotonous chore that I just really dislike.

So now, there's a scribe for that :

auto-dr-

Code

@alessiot
alessiot / grad_viz.ipynb
Last active February 23, 2022 20:07
Visualizing Gradient Descend
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rawsh
rawsh / file.md
Last active April 23, 2018 17:54
Content Aware Cropping Using a Neural Net

Photographers wade through thousands of photos every shoot, and some crops are far from optimal. A smart crop tool can assist these photographers, provide a baseline for them to work from, and automate the crops for many photos.

Reading trained network weights

A good algorithm for finding objects in photos is the YOLO algorithm (You Only Look Once). A pretrained network that works well is the darknet network by Joseph Chet Redmon. This can be imported into Mathematica as a binary file through this code [^1]:

leayReLU[alpha_] := ElementwiseLayer[Ramp[#] - alpha*Ramp[-#] &]
@rawsh
rawsh / lock.sh
Created February 16, 2017 23:53
Simple lock script preserving background with xwobf and i3lock.
#!/bin/bash
scrot /tmp/screen.png
xwobf -s 11 /tmp/screen.png
i3lock --textcolor=ffffff00 --insidecolor=ffffff1c --ringcolor=ffffff3e --linecolor=ffffff00 --keyhlcolor=00000080 --ringvercolor=00000000 --separatorcolor=22222260 --insidevercolor=0000001c --ringwrongcolor=00000055 --insidewrongcolor=0000001c -i /tmp/screen.png
rm /tmp/screen.png
@rawsh
rawsh / tint2rc
Last active May 19, 2018 01:46
tint2rc
#---- Generated by tint2conf 9757 ----
# See https://gitlab.com/o9000/tint2/wikis/Configure for
# full documentation of the configuration options.
#-------------------------------------
# Backgrounds
# Background 1: Panel, Tooltip
rounded = 0
border_width = 0
border_sides = TBLR
background_color = #16161d 63
@rawsh
rawsh / yabar.conf
Created November 28, 2016 23:54
My yabar config (.config/yabar/yabar.conf)
bar-list = ["topbar"];
topbar: {
// List of all blocks
block-list: ["workspaces", "space", "title", "cpu", "memory", "network", "date"];
font: "Droid Sans Mono 8"
// set monitor if you wish:
// monitor: "HDMI-1";
@bshyong
bshyong / python_bst.py
Last active March 11, 2021 23:09
Python BST implementation
class BSTnode(object):
"""
Representation of a node in a binary search tree.
Has a left child, right child, and key value, and stores its subtree size.
"""
def __init__(self, parent, t):
"""Create a new leaf with key t."""
self.key = t
self.parent = parent
self.left = None
@jdevalk
jdevalk / .htaccess
Last active November 28, 2023 20:28
These three files together form an affiliate link redirect script.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^index\.php$ - [L]
RewriteRule (.*) ./index.php?id=$1 [L]
</IfModule>