Skip to content

Instantly share code, notes, and snippets.

View pllim's full-sized avatar
💭
Clickety clack clack. ⌨

P. L. Lim pllim

💭
Clickety clack clack. ⌨
View GitHub Profile
@gnarf
gnarf / ..git-pr.md
Last active April 12, 2024 22:00
git pr - Global .gitconfig aliases for Pull Request Managment

Install

Either copy the aliases from the .gitconfig or run the commands in add-pr-alias.sh

Usage

Easily checkout local copies of pull requests from remotes:

  • git pr 4 - creates local branch pr/4 from the github upstream(if it exists) or origin remote and checks it out
  • git pr 4 someremote - creates local branch pr/4 from someremote remote and checks it out
@bmorris3
bmorris3 / intro_to_astropy.ipynb
Last active June 8, 2018 21:03
Intro to astropy for UW's 2015 ASTR599 class
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arfon
arfon / generate
Last active April 6, 2023 10:37
Let's try and generate some codemeta files.
#!/usr/bin/ruby
# For an OO language, this is distinctly procedural. Should probably fix that.
require 'json'
details = Hash.new({})
capture_params = [
{ :name => "title", :message => "Enter project name." },
{ :name => "url", :message => "Enter the URL of the project repository." },
@barentsen
barentsen / plot-astropy-benchmarks-by-python-version.py
Created January 8, 2017 18:32
Compares the performance of AstroPy between different versions of Python (2.7 vs 3.x).
"""Compares the performance of AstroPy between different versions of Python (2.7 vs 3.x).
This script reads AstroPy's benchmarking output (cf. github.com/astropy/astropy-benchmarks.git)
as generated by the airspeed velocity benchmarking package (cf. asv.readthedocs.io).
It then compares & plots the median execution time for different Python versions.
This script was hacked together as part of the Hack Day at the 229th American Astronomical
Society (AAS) meeting held in Grapevine, Texas. (Twitter: #hackaas #aas229.)
The output of this script is shown in the following tweet:
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@keflavich
keflavich / failure.md
Last active June 12, 2017 19:56
test timeout/failure

command: ~/anaconda/envs/astropy27/bin/python setup.py test --remote-data=astropy -a "--mpl"

========================================================================== test session starts ==========================================================================
platform darwin -- Python 2.7.11, pytest-3.0.7, py-1.4.33, pluggy-0.4.0

Running tests with Astropy version 2.0.dev18294.
Running tests in lib.macosx-10.5-x86_64-2.7/astropy docs.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@saimn
saimn / pre-commit
Last active February 25, 2019 15:06
#!/bin/sh
#
# Git pre commit hook which find the next PR number and replace occurences of
# GUESSPR in the changelog
files_modified=`git diff --cached --name-only --diff-filter=ACM`
if [[ $files_modified == *"CHANGES.rst"* ]]; then
ghurl="https://api.github.com/repos/astropy/astropy/issues?state=all&sort=created&direction=desc&per_page=1"
echo "Fetching PR number from $ghurl"