Skip to content

Instantly share code, notes, and snippets.

View Sutto's full-sized avatar

Darcy Laycock Sutto

View GitHub Profile
@Sutto
Sutto / config.json
Last active September 16, 2020 10:48 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
import json
import requests
import pandas as pd
data = pd.read_csv('artists.csv',sep=';') # Reading data from csv
data = data.T.to_dict().values() # Converting dataframe into list of dictionaries
json_data = [] # Empty list to temporarily save the new data, and at the end write it into a new CSV
# Iterate through the imported data
from urllib.request import Request, urlopen
import ssl
from bs4 import BeautifulSoup
import pandas as pd
url = 'https://www.who.int/emergencies/diseases/novel-coronavirus-2019/media-resources/news'
#################################################
#################################################
@Sutto
Sutto / about.md
Last active March 31, 2016 00:44
Buildkite Lambda Function

We use this flow with AWS lambda, combined with CloudWatch Scheduled Events, to trigger our builds periodically.

It's nice, avoids duplication and keeps everything together easily.

class ApiController < RocketPants::Base
# Override the json encoding mechanism to use Oj for mega-speed!
def encode_to_json(json)
Oj.dump json, mode: :compat
end
add_method_tracer :encode_to_json
end
@Sutto
Sutto / resources.md
Last active December 28, 2015 16:19
RailsGirls Perth Post-event links

Keeping on Programming

First, there is an incredible breadth of free and paid online coursework you can use to keep going on. The following list are ones we recommend (as does Rails Girls internationally) that cover most topics you need to actually make something:

  • Codecademy is a great series of interactive tutorials designed to teach you the basics of programming.
  • Try Ruby as you've seen is an introduction to the Ruby language - it assumes some general programming concepts, but it's important to understand Ruby and not just Rails (which sits on top of it).
  • Code.org is an incredible program designed to encourage Computer Science among high school students. I highly suggest checking out their video and their learning page - which links to many online resources that have free programming tutorials.
  • Coursera and Udacity are two online university-style teaching places, wit
require 'rubygems'
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
# Uses forman to boostrap ENV from a .env environment.
# This is mostly useful since it means we can then use it from
# things other than foreman (passenger, our own scripts) with easy.
# First: Product - Default without setting hash defaults:
x = %w(a b c)
h = Hash[x.product([true])]
p h # => {'a' => true, 'b' => true, 'c' => true}
p h['a'] # => true
p h['d'] # => nil
# e.g: sphinx takes a hash of field name -> weight pairs, so we use
def search_weights
@Sutto
Sutto / code.md
Last active December 17, 2015 23:58
Our GovHack Source Code
UILocalNotification *localNotification = [UILocalNotification new];
NSDate *dateToFire = [[NSDate date] dateByAddingTimeInterval:2];
localNotification.fireDate = dateToFire;
localNotification.alertBody = @"Time to update your profile";
localNotification.soundName = UILocalNotificationDefaultSoundName;
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification];