Skip to content

Instantly share code, notes, and snippets.

@kwonowk
kwonowk / tinydifferences.js
Created January 21, 2022 10:16
Calculating Tinyman LP asset changes
javascript:(function(){
function parseNumber(_txt){
let txt = _txt.split(" ")[0];
let num_clean = parseFloat(txt.replace(",",""));
return num_clean;
}
function asset_name(_txt){
let name = _txt.split(" ")[1];
return name;
}
@divs1210
divs1210 / tinyaprs.js
Created November 26, 2021 14:33
Tinyman APRs
javascript:(function(){
function parseDollarVal(_txt) {
let txt = _txt.split("$")[1] || "0";
let lastChar = txt[txt.length-1];
let multiplier =
lastChar == 'M' ? 1000000
: lastChar == 'K' ? 1000
: 1;
@mhucka
mhucka / gist:59e785a315d813d14cd0258b89a2fcac
Last active February 2, 2024 22:28
Stop the Adobe Creative Cloud app from auto-launching on login on macOS
#!/bin/bash
# =============================================================================
# @file GitHub gist
# @brief stop Adobe Creative Cloud app from auto-launching on login on macOS
# @author Michael Hucka <mhucka@caltech.edu>
# @created 2021-08-12
# @website https://gist.github.com/mhucka/59e785a315d813d14cd0258b89a2fcac
#
# I find Adobe Creative Cloud absolutely infuriating. It installs auto
# launchers that are not in the user's login app list, and the services are
@chad-m
chad-m / streamlit_app_maker.py
Last active March 29, 2023 14:08
A Streamlit app to make Streamlit apps
import base64
import glob
import json
import logging
import os
from pathlib import Path
import re
import requests
import shutil
@FedeMiorelli
FedeMiorelli / turbo_colormap_mpl.py
Last active March 31, 2023 02:45
Turbo Colormap for Matplotlib
# -*- coding: utf-8 -*-
"""
Created on 2019-08-22 09:37:36
@author: fmiorell
"""
# This script registers the "turbo" colormap to matplotlib, and the reversed version as "turbo_r"
# Reference: https://ai.googleblog.com/2019/08/turbo-improved-rainbow-colormap-for.html
@mikhailov-work
mikhailov-work / turbo_colormap.py
Created August 8, 2019 23:31
Turbo Colormap Look-up Table
# Copyright 2019 Google LLC.
# SPDX-License-Identifier: Apache-2.0
# Author: Anton Mikhailov
turbo_colormap_data = [[0.18995,0.07176,0.23217],[0.19483,0.08339,0.26149],[0.19956,0.09498,0.29024],[0.20415,0.10652,0.31844],[0.20860,0.11802,0.34607],[0.21291,0.12947,0.37314],[0.21708,0.14087,0.39964],[0.22111,0.15223,0.42558],[0.22500,0.16354,0.45096],[0.22875,0.17481,0.47578],[0.23236,0.18603,0.50004],[0.23582,0.19720,0.52373],[0.23915,0.20833,0.54686],[0.24234,0.21941,0.56942],[0.24539,0.23044,0.59142],[0.24830,0.24143,0.61286],[0.25107,0.25237,0.63374],[0.25369,0.26327,0.65406],[0.25618,0.27412,0.67381],[0.25853,0.28492,0.69300],[0.26074,0.29568,0.71162],[0.26280,0.30639,0.72968],[0.26473,0.31706,0.74718],[0.26652,0.32768,0.76412],[0.26816,0.33825,0.78050],[0.26967,0.34878,0.79631],[0.27103,0.35926,0.81156],[0.27226,0.36970,0.82624],[0.27334,0.38008,0.84037],[0.27429,0.39043,0.85393],[0.27509,0.40072,0.86692],[0.27576,0.41097,0.87936],[0.27628,0.42118,0.89123],[0.27667,0.43134,0.90254],[0.27691,0.44145,0.913
@actsasgeek
actsasgeek / starter.md
Last active May 15, 2024 13:56
EN685.648 Starter Pack

EN685.648 Data Science

This course requires knowledge of Python and SQL (the requirement is listed in the course description). If you do not know Python, you will not do well and the course will be that much harder.

Instructors

For the Fall 2023 Semester, there are three sections of Data Science being offered. There are different Primary/Secondary Instructors and Chat Platforms for each Primary Instructor:

Section Primary Secondary Chat Platform
@Mahelita
Mahelita / FlyCamera.cs
Last active June 22, 2023 20:28 — forked from McFunkypants/FlyCamera.cs
New Script FlyCamera add to any camera obj: instant unity editor style wasd rightclick debug cam
using UnityEngine;
using System.Collections;
public class FlyCamera : MonoBehaviour
{
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Extended by Mahelita 08-01-18.
@McFunkypants
McFunkypants / FlyCamera.cs
Created November 7, 2014 21:59
New Script FlyCamera add to any camera obj: instant unity editor style wasd rightclick debug cam
using UnityEngine;
using System.Collections;
public class FlyCamera : MonoBehaviour {
/*
Writen by Windexglow 11-13-10. Use it, edit it, steal it I don't care.
Converted to C# 27-02-13 - no credit wanted.
Simple flycam I made, since I couldn't find any others made public.
Made simple to use (drag and drop, done) for regular keyboard layout
@rochacbruno
rochacbruno / haversine.py
Created June 6, 2012 17:43
Calculate distance between latitude longitude pairs with Python
#!/usr/bin/env python
# Haversine formula example in Python
# Author: Wayne Dyck
import math
def distance(origin, destination):
lat1, lon1 = origin
lat2, lon2 = destination