Skip to content

Instantly share code, notes, and snippets.

View johnarban's full-sized avatar

John Arban Lewis johnarban

View GitHub Profile
from glue.core import Data, DataCollection
from glue.core.component_link import ComponentLink
for i,d1 in enumerate(dc):
for j,d2 in enumerate(dc):
if j>i:#d1.label != d2.label:
print('\n',d1.label,' <---> ',d2.label,'\n')
comp1 = d1.components
comp2 = d2.components
for c1 in comp1:
for c2 in comp2:
@johnarban
johnarban / whatsapp_chat_log_parser.py
Last active June 6, 2019 01:23
code to analyze whatsapp chat log
import numpy as np
import matplotlib.pyplot as plt
import re
import emoji # pip install emojie
import datetime
from wordcloud import WordCloud #pip install wordcloud
import seaborn as sns # pip install seaborn
from astropy.time import Time # pip install astropy
plt.ion()
@johnarban
johnarban / bash-cheatsheet.sh
Created December 4, 2018 09:35 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04

TERMINAL LESSON PLAN

It is important to note from the outset that most scientific computing is done in a unix environment, which is available on Macs via Terminal or X11 (now provided by XQuartz). Users of Windows machines need not worry. Most research is done in programming languages which can be installed on multiple machine architectures and used via different interactive development environments (IDEs). So if you don’t want to set up a Unix-like environment on your Windows computer, you will probably be fine for the summer, but you will either want to become very proficient at Windows or else set up a Unix-like environment. A Mac, if one can afford it, is a great investment.

Options for Windows users:

  • The easiest, fastest, and arguably best option is to install Cygwin/X and Putty.
  • Cygwin provides a Unix-like terminal
All Ak Low Ak High Ak
synthetic P to P 2.7 1.8 4.44
P to D .13 -1 2.0
D to D -1.37 -1.57 -0.32
D to P 0.099 -0.13 0.087
Megeath P to P 0.65 0.31 0.67
P to D 0.475 0.40 0.49
D to D -0.89 -1.25 -0.71
D to P -1.44 -1.62 -1.18
@johnarban
johnarban / stats.md
Last active March 25, 2016 06:23
Statistics decribing ranges

SEE UPDATE BELOW

There are a few statistics to look at. The most obvious are the ones that compare the different parameters. These take a single parameter and compare it to the true value. I calculate 3 different statistics.

  • The Fractional Delta. This is essentially the percent difference of the model and the input values, but no absolute value is taken. This should be read as a percentage over/under estimation of the true value.
  • The Factor above or below. Read as the name implies.
  • Absolute fractional difference. Basically the standard percent error