Skip to content

Instantly share code, notes, and snippets.

@briehanlombaard
briehanlombaard / jpl.py
Created May 18, 2018 07:53
JPL Horizons Object Ephemerides Query
from astroquery.jplhorizons import Horizons
#obj = Horizons(id='Ceres', location='568', epochs={'start':'2018-03-01', 'stop':'2018-05-01', 'step':'10d'})
#obj = Horizons(id='Eris', epochs={'start':'2018-03-01', 'stop':'2018-05-01', 'step':'10d'})
obj = Horizons(id=499, # Mars
epochs={'start':'2018-05-01', 'stop':'2018-05-02', 'step':'10m'}, id_type='majorbody')
eph = obj.ephemerides()
button.btn {
background-color: #060606;
border-width: 2px;
box-shadow: none !important;
position: relative;
}
button.btn:hover,
button.btn:active {
background-color: #060606;
}
import astropy.units as u
from astropy.coordinates import SkyCoord
from astropy.time import Time, TimeDelta
from astroplan import Observer, FixedTarget
SAAO = Observer.at_site('SAAO', timezone='Africa/Johannesburg')
HORIZON = 30 * u.degree
import astropy.units as u
from astropy.coordinates import SkyCoord
from astropy.time import Time
from astroplan import Observer, FixedTarget
SAAO = Observer.at_site('SAAO', timezone='Africa/Johannesburg')
HORIZON = 30 * u.degree
TARGETS = [
# https://github.com/HackerNews/API#start-of-content
import sys
import logging
import json
import urllib
import contextlib
import threading
from Queue import Queue
@briehanlombaard
briehanlombaard / aframe-custom-shader.html
Created November 28, 2017 12:09
Custom shaders for aframe
<script src="https://aframe.io/releases/0.7.0/aframe.min.js"></script>
<script type="text/javascript">
AFRAME.registerShader('hello-world', {
schema: {
color: {type: 'vec3', default: '0.5 0.5 0.5', is: 'uniform'}
},
vertexShader: [
'void main() {',
' gl_Position = gl_ProjectionMatrix * gl_ModelViewMatrix * gl_Vertex;',
<style>
body {
font-family: Georgia, serif;
font-size: 18px;
margin: 0 auto;
max-width: 720px;
padding: 1em;
}
</style>
@briehanlombaard
briehanlombaard / fogcreek.py
Last active April 20, 2019 21:18
Fog Creek Support Engineer Test
"""
To apply, solve the problem below and include your solution as the first word
in the subject line of your application email, which you can send to
jobs@fogcreek.com.
Please include your current resume in PDF, HTML, or Plain Text format. If you
have a website, send us the URL. In the body of the email, describe how you
solved our challenge and explain why you would be a good fit for this job.
http://www.fogcreek.com/jobs/SupportEngineerLevel2
@briehanlombaard
briehanlombaard / Loans.csv
Last active April 20, 2019 21:18
Jumo Technical Test
MSISDN Network Date Product Amount
27729554427 'Network 1' '12-Mar-2016' 'Loan Product 1' 1000.00
27722342551 'Network 2' '16-Mar-2016' 'Loan Product 1' 1122.00
27725544272 'Network 3' '17-Mar-2016' 'Loan Product 2' 2084.00
27725326345 'Network 1' '18-Mar-2016' 'Loan Product 2' 3098.00
27729234533 'Network 2' '01-Apr-2016' 'Loan Product 1' 5671.00
27723453455 'Network 3' '12-Apr-2016' 'Loan Product 3' 1928.00
27725678534 'Network 2' '15-Apr-2016' 'Loan Product 3' 1747.00
27729554427 'Network 1' '16-Apr-2016' 'Loan Product 2' 1801.00
27729554427 'Network 1' '02-Mar-2016' 'Loan Product 1' 500.00
@briehanlombaard
briehanlombaard / yoco.json
Last active March 8, 2018 13:41
Yoco Technical Test
[
{
"playerA": [
"JH",
"2D",
"3C"
],
"playerAWins": true,
"playerB": [
"KS",