Skip to content

Instantly share code, notes, and snippets.

View arfon's full-sized avatar
:shipit:

Arfon Smith arfon

:shipit:
View GitHub Profile
# Install go
$ sudo apt-get install golang-go
# Download goofys package
$ go get github.com/kahing/goofys
# Install goofys
$ go install github.com/kahing/goofys
# Copy the goofys binary to somewhere in your path
  • What would go in to a 'Linux of cities'
  • Idea of a 'code swap' between different cities, where they commit to try out each other's stuff.

RECOGNITION IS IMPORTANT FOR PARTICIPATION

  • Note: OSPOs @ the city level often have a 'signature' piece of code they can contribute.

  • Possibly give out awards aligned with the Sustainable Development Goals?

  • What is the role of an OSPO for this? One answer: They're the gateway to resources (e.g., financial and human).

@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." },
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arfon
arfon / big_query_examples.md
Last active September 19, 2022 13:00
BigQuery Examples for blog post

How many times shouldn't it happen...

-- https://news.ycombinator.com/item?id=11396045

SELECT count(*)
FROM (SELECT id, repo_name, path
        FROM [bigquery-public-data:github_repos.sample_files]
 ) AS F
@arfon
arfon / tess.astroquery.mast.py
Last active November 6, 2021 03:42
Query TESS data at MAST
# This script queries MAST for TESS FFI data for a single sector/camera/chip
# combination and downloads the data from the AWS public dataset rather than
# from MAST servers.
# Working with http://astroquery.readthedocs.io/en/latest/mast/mast.html
# Make sure you're running the latest version of Astroquery:
# pip install https://github.com/astropy/astroquery/archive/master.zip
from astroquery.mast import Observations
import boto3
@arfon
arfon / create_events.md
Last active November 2, 2020 11:49
GitHub Archive event formats

2011-02-15-0.json.gz

{  
   "repo":{  
      "id":1367057,
      "url":"https://api.github.dev/repos/motech/MOTECH",
      "name":"motech/MOTECH"
   },
   "type":"CreateEvent",
@arfon
arfon / repo-cleanup.rb
Created May 17, 2020 12:28
GitHub repo cleanup
require 'octokit'
GH_TOKEN = "xxxxxxxxxxxxxxxxxxxxxxxx"
GITHUB = Octokit::Client.new(:auto_paginate => true, :access_token => GH_TOKEN)
repositories = GITHUB.repositories('arfon')
puts "Working with #{repositories.size} repositories"
repositories.each do |r|
@arfon
arfon / LICENSE
Last active April 16, 2020 01:28
How to make TESS FITS cubes using Astrocut and MAST
BSD 3-Clause License
Copyright (C) 2010-2018 Association of Universities for Research in Astronomy (AURA)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.