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.
{ | |
"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' | |
################################################# | |
################################################# |
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 |
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:
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 |
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]; |