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
"basics": { | |
"name": "Ritoban Roy-Chowdhury", | |
"email": "ritobanrc@gmail.com", | |
"additionalInfo": "rroychowdhury@ucsd.edu" | |
}, | |
"education": [ | |
{ | |
"startDate": "2022-09", | |
"endDate": "2026-06", |
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
eps = 1e-6 | |
max_newton_iters = 1000 | |
def vec(arr): | |
return [[a] for a in arr] | |
def matmul(A, B): | |
assert len(A[0]) == len(B) | |
r = [[0 for _ in range(len(B[0]))] for _ in range(len(A))] |
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
use crate::math::*; | |
/// The `Particles` struct, used to store particle data. | |
pub struct Particles<Idx> { | |
pub(crate) float_data: Vec<Vec<T>>, | |
pub(crate) vector_data: Vec<Vec<TV>>, | |
pub(crate) matrix_data: Vec<Vec<Mat>>, | |
idx: std::marker::PhantomData<Idx>, | |
} |
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 minimal example for using Cairo with GTK | |
""" | |
import cairo | |
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk, Gdk, GLib |
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
scriptencoding utf8 | |
" Arch defaults | |
runtime! archlinux.vim | |
call plug#begin('~/.local/share/nvim/plugged') | |
Plug 'junegunn/fzf.vim' | |
Plug 'junegunn/goyo.vim' | |
Plug 'neoclide/coc.nvim', {'branch': 'release'} |
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 `main` function for each day is in `dayXX.rs`, called `dayXX_main()`. To | |
/// run all the solutions, simply run `cargo test`. Inputs should be placed in a folder | |
/// input/dayXX.txt. This also requires the `paste = "0.1.0"` and `anyhow = "1.0.0"` crates | |
/// for creating the function names and handing errors, respectively. | |
use std::io; | |
pub fn load_input(day: usize) -> io::Result<String> { | |
use std::fs::read_to_string; |
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
from math import sqrt, pi, sin, cos | |
def my_sin(x): | |
if x < 0.01: | |
return x | |
return 2 * my_sin(x/2) * my_cos(x/2) | |
def my_cos(x): | |
if x < 0.01: | |
s = my_sin(x) |
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
lyrics = ["Twelve drummers drumming", "eleven pipers piping", | |
"Ten lords a leaping", "nine ladies dancing", "eight maids a milking", | |
"Seven swans a swimming", "six geese a laying", "five gold rings", | |
"Four calling birds", "three French hens", | |
"Two turtle doves", "a partridge in a pear tree"] | |
lyrics.reverse() | |
ordinals = ["first", "second", "third", "fourth", "fifth", "sixth", "seventh", "eigth", "ninth", "tenth", "eleventh", "twelveth"] |
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 | |
[ -f "$2" ] && cp "$2" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Wallpaper changed." | |
[ -d "$2" ] && cp "$(find "$2" -name "*.jpg" -o -name "*.jpeg" -o -name "*.png" -type f | shuf -n 1)" ~/.config/wall.png && notify-send -i "$HOME/.config/wall.png" "Random Wallpaper chosen." | |
xwallpaper --zoom ~/.config/wall.png |
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/python3 | |
from PIL import Image, ImageTk | |
from io import BytesIO | |
import praw | |
import json | |
import re | |
import requests | |
import tkinter as tk | |
import tkinter.ttk as ttk |
NewerOlder