UPDATE a fork of this gist has been used as a starting point for a community-maintained "awesome" list: machine-learning-with-ruby Please look here for the most up-to-date info!
- liblinear-ruby: Ruby interface to LIBLINEAR using SWIG
Dark Sky Attribute Name | JSON Path | Units (US) | |
---|---|---|---|
time | dt | seconds since UNIX epoch | |
temperature | main.temp | °F | |
apparentTemperature | N/A | N/A | |
dewPoint | main.dew_point | °F | |
humidity | main.humidity | % | |
pressure | main.pressure | hPa | |
windSpeed | wind.speed | mph | |
windGust | wind.gust | mph | |
windBearing | wind.deg | ° |
Dark Sky Attribute Name | JSON Path in Open Meteo Forecast API | |
---|---|---|
time | $.forecast.timestamp | |
summary | $.forecast.weather.description | |
icon | $.forecast.weather.icon | |
sunriseTime | $.forecast.sunrise | |
sunsetTime | $.forecast.sunset | |
moonPhase | $.forecast.moon_phase | |
precipIntensity | $.forecast.rain | |
precipProbability | $.forecast.probability_of_precipitation | |
precipType | $.forecast.weather.icon |
Map attributes from the open meteo forecast api to the format used by the Dark Sky API | |
The Open Meteo Forecast API and the Dark Sky API have different attribute names and structures, so mapping the attributes from one API to another requires some translation. Here's a list of Open Meteo Forecast API attributes and their corresponding Dark Sky API attributes: | |
Temperature | |
Open Meteo Forecast API: "temp" | |
Dark Sky API: "temperature" | |
Minimum temperature | |
Open Meteo Forecast API: "temp_min" | |
Dark Sky API: "temperatureMin" | |
Maximum temperature |
#!/bin/sh | |
# Clear the Bluetooth attributes cache on Mac OS X | |
# From http://expertsoverflow.com/questions/23549859/clearing-corebluetooth-gatt-cache-without-removing-bond | |
sudo defaults write /Library/Preferences/com.apple.Bluetooth CoreBluetoothCache -dict | |
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.blued.plist | |
sudo launchctl load /System/Library/LaunchDaemons/com.apple.blued.plist |
gem 'resque-scheduler' |
I hereby claim:
To claim this, I am signing this object:
# database 1 | |
# output single row in format compatible with INSERT VALUES | |
\copy (SELECT * FROM users WHERE email = 'me@example.com') To stdout With CSV force quote * null 'NULL' quote '''' | |
# database 2 | |
# insert values outputted from above command into another database | |
INSERT INTO users VALUES (...); |
# Blocks until response received | |
# Designed to be run from a background job, not in request-response | |
# Usage: | |
# assembly = Transloadit::Rails::Engine.template :my_template | |
# response = TransloaditBlockingAssemblyRunner.run assembly | |
# results = response['results'] | |
module TransloaditBlockingAssemblyRunner | |
class Error < StandardError; end | |
class TimeoutError < Error; end | |
class AssemblyError < Error; end |
require 'rest-client' | |
require 'json' | |
module Neo4jClient | |
SERVER = 'http://neo4j:neo4j@localhost:7474' | |
def self.cypher query, params = {} | |
resp = RestClient.post("#{SERVER}/db/data/cypher", {query: query, params: params}.to_json, content_type: :json, accept: :json) | |
JSON.parse resp | |
end |