This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
A quick Python uploader script for pushing files to AWS Glacier storage. | |
Assumptions: | |
1) You have boto installed (eg. with pip) | |
2) You have AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY set as environment variables | |
Based (very loosely) on some code found here: | |
http://forrestbao.blogspot.com/2013/06/amazon-glacier-in-python-with-boto-part.html | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ------------- // | |
// Google Chrome // | |
// ------------- // | |
::-webkit-scrollbar { | |
width: 7px; // width of vertical scrollbar | |
height: 7px; // height of horizontal scrollbar | |
} | |
| |
// Part of scrollbar that moves up and down as you scroll | |
::-webkit-scrollbar-thumb { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyowm | |
owm = pyowm.OWM('<api_key>') # TODO: Replace <api_key> with your API key | |
la = owm.three_hours_forecast('Los Angeles, US') | |
print(la.will_have_clouds()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyowm | |
owm = pyowm.OWM('<api_key>') # TODO: Replace <api_key> with your API key | |
london = owm.three_hours_forecast('London, GB') | |
print(london.will_have_rain()) | |
print(london.will_have_fog()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyowm | |
owm = pyowm.OWM('<api_key>') # TODO: Replace <api_key> with your API key | |
sf = owm.weather_at_place('San Francisco, US') | |
weather = sf.get_weather() | |
print(weather.get_temperature('fahrenheit')['temp']) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pyowm | |
owm = pyowm.OWM('<api_key>') # TODO: Replace <api_key> with your API key | |
boston = owm.weather_at_place('Boston, US') | |
weather = boston.get_weather() | |
print(weather.get_sunrise_time(timeformat='iso')) # Prints time in GMT timezone | |
print(weather.get_sunset_time(timeformat='iso')) # Prints time in GMT timezone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def add(x, y): | |
return x + y | |
def subtract(x, y): | |
return x - y | |
def multiply(x, y): | |
return x * y | |
def divide(x, y): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def add(x, y): | |
return x + y | |
def subtract(x, y): | |
return x - y | |
def multiply(x, y): | |
return x * y | |
def divide(x, y): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hostname "localhost" | |
FQDNLookup true | |
BaseDir "/var/lib/collectd" | |
PluginDir "/usr/lib/collectd" | |
#TypesDB "/usr/share/collectd/types.db" "/etc/collectd/my_types.db" | |
AutoLoadPlugin false | |
CollectInternalStats false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LoadPlugin logfile | |
<Plugin logfile> | |
LogLevel "info" | |
File "/root/sandbox/collectd.log" | |
PrintSeverity true | |
</Plugin> |
OlderNewer