Skip to content

Instantly share code, notes, and snippets.

@Alwahsh
Alwahsh / getWeather.py
Created May 18, 2017 05:25 — forked from anonymous/getWeather.py
Envirotranspiration script for python and Weatherunderground
#!/usr/bin/python
import urllib, json, sys, math, time, os, smtplib;
from datetime import date, timedelta, datetime
from email.mime.text import MIMEText
# Location constant
GMTOFFSET = 5
LATITUDE = 45.4214
LONGITUDE = -75.6919
@Alwahsh
Alwahsh / introrx.md
Created December 10, 2016 05:12 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@Alwahsh
Alwahsh / widgets.py
Created November 13, 2016 04:56 — forked from clooth/widgets.py
GoogleMapsWidget
from django import forms
from django.conf import settings
from django.utils.safestring import mark_safe
class GoogleMapsWidget(forms.HiddenInput):
# Media to be includes with the widget
class Media:
js = (
unless File.exist?('Gemfile')
File.write('Gemfile', <<-GEMFILE)
source 'https://rubygems.org'
gem 'rails', github: 'rails/rails'
gem 'arel', github: 'rails/arel'
gem 'sqlite3'
GEMFILE
system('bundle')
end
require 'bundler'