Skip to content

Instantly share code, notes, and snippets.

View dmadisetti's full-sized avatar
🇩🇲
Set status

Dylan Madisetti dmadisetti

🇩🇲
Set status
View GitHub Profile
@dmadisetti
dmadisetti / scroggs_grid.py
Last active December 11, 2023 17:07
jupyter helper for https://www.mscroggs.co.uk/ advent calender
from IPython.display import HTML, display
import numpy as np
import pandas as pd
from IPython.display import HTML
import pandas as pd
from bs4 import BeautifulSoup
import math
def math_grid(grid, args, ans=None, callback=None):
style="""<style>
@dmadisetti
dmadisetti / consolidated_climate_data.csv
Last active December 8, 2023 20:08
fam-climate.ipynb
Year Total_Emission_Debt Fossil_Emissions CO2_ppm Temp_Model_Adjusted J-D NASA_Temp_Anomaly Fusion_World_Temp_Model Ocean_Sink Land_Sink Cement_Sink Land_Emissions
1850 44.62777214 53.69868079 280.0767681 -0.6798807638 18.92484 16.4195 45.86756865 72.141
1851 142.8091743 54.22164267 280.2456586 -0.6772716508 12.55284 16.5485 1.526900468 74.588
1852 238.3707906 56.60868334 280.4100425 -0.6747336667 6.96672 17.1645 12.79518039 75.87933333
1853 339.1552426 59.25776166 280.5834107 -0.6720585828 0.97704 17.2905 17.704103 77.49833333
1854 428.4229425 69.60512241 280.7369679 -0.6696905637 -3.90816 17.432 45.28458255 78.471
1855 549.1738302 70.98919056 280.9446821 -0.6664894451 -6.35076 18.083 17.25272954 78.74666667
1856 630.0007868 75.68134435 281.0837197 -0.6643480361 -6.32952 18.227 62.13890773 79.182
1857 668.2234337 76.40065946 281.1494698 -0.6633357438 -5.28876 18.896 104.8241059 80.25333333
1858 782.5013495 77.57236773 281.3460493 -0.6603106077 -3.63204 19.561 28.15549193 8
@dmadisetti
dmadisetti / words.hex
Created June 12, 2022 16:30
reasonable 4 character words in hex
abe7
ab1e
ace5
add5
a1a5
a10e
a150
baba
babe
bade
#!/usr/bin/env python
import os
import re
import sys
import argparse
from pybtex.database.input import bibtex
from pybtex.database import BibliographyData
def arg_is_file(path):
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
### Keybase proof
I hereby claim:
* I am dmadisetti on github.
* I am dmadisetti (https://keybase.io/dmadisetti) on keybase.
* I have a public key ASBJb8K_smPFGC40TFBXWKRbB85OVfH_7bBFowj4dUGkhgo
To claim this, I am signing this object:
@dmadisetti
dmadisetti / generate-wildcard-certificate.sh
Last active September 14, 2024 22:17 — forked from PowerKiKi/generate-wildcard-certificate.sh
Generate self-signed wildcard SSL certificate for development environment
#!/usr/bin/env bash
# print usage
DOMAIN=$1
if [ -z "$1" ]; then
echo "USAGE: $0 tld"
echo ""
echo "This will generate a non-secure self-signed wildcard certificate for "
echo "a given development tld."
echo "This should only be used in a development environment."
@dmadisetti
dmadisetti / zotero.py
Created September 20, 2021 12:08
move files from zotero to one location, and renames them by the extra tag and builds a bibtex
from pyzotero import zotero
from os import path, environ
from glob import glob
import shutil
from pybtex import database as btex
zot = zotero.Zotero(environ["ZOTERO_ID"], "user", envior["ZOTERO_SECRET"])
items = zot.top()
@dmadisetti
dmadisetti / histogram2d.py
Last active October 28, 2021 20:28 — forked from isentropic/histogram2d.py
Tensorflow histogram2d (Simple implementation)
@tf.function
def histogram(x, y,
value_range,
nbins=100,
weights=None,
bin_dtype=tf.dtypes.int32):
"""
Bins x, y coordinates of points onto simple square 2d histogram
Given the tensor x and y:
@dmadisetti
dmadisetti / .vimrc
Last active September 28, 2019 05:45
.files
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required