Skip to content

Instantly share code, notes, and snippets.

View uselesslemma's full-sized avatar
:bowtie:
Looking for work

Trevor Picard uselesslemma

:bowtie:
Looking for work
View GitHub Profile
@uselesslemma
uselesslemma / criminal_crypto_addresses.txt
Last active April 21, 2022 23:52
Criminal Blacklist
BCH:
qq9yrhef7csy3yzgxgs0rvkvez440mk53gv8ulyu6a
BNB:
bnb1vmwl54jxj9yvsgz33xtyuvqnurdjy2raqnttkq
BTC:
bc1qn6ype8u5kgj672mvsez9wz9wt9wk22tzd5vprp
@uselesslemma
uselesslemma / ApogeeQueries.sql
Created August 12, 2020 02:42
Samples of Python and SQL code written for my graduate school research.
-- Get parameters for all stars with [Fe/H] < -2 with no BAD FLAGS set:
-- You can also select a subset of the stars based on their
-- properties. This example finds a set of metal-poor stars, without any
-- flags set indicating that the observations or analysis is bad.
SELECT TOP 300
s.apogee_id, s.ra, s.dec, s.glon, s.glat,
s.vhelio_avg, s.vscatter,
a.teff, a.logg, a.param_m_h, a.param_alpha_m,
dbo.fApogeeAspcapFlagN(a.aspxcapflag),
@uselesslemma
uselesslemma / DictsSwitchCase.py
Last active August 11, 2020 00:30
Semi-regular Python case studies! Inspired by @dbader.
# Because Python has first-class functions, they
# can be used to emulate switch/case statements!
def switch_if(operator, a, b):
if operator == 'add':
return a + b
elif operator == 'sub':
return a - b
elif operator == 'mul':
return a * b
import numpy as np
import os
import shutil
#range of model masses [solar masses]
m_grid = np.array([0.3, 0.5, 0.8, 1.0, 1.2, 1.5, 2.0, 3.0, 5.0, 6.5, 8.0, 10.0])
#range of He abundance fractions
y_grid = np.array([0.20, 0.25, 0.30, 0.35])
@uselesslemma
uselesslemma / CanMakePalindrome.md
Last active August 11, 2020 00:31
A list of coding exercises and solutions.

Problem:

Given a non-empty string s, you may delete at most one character. Judge whether you can make it a palindrome.

Example 1:

Input: "aba" Output: True