Skip to content

Instantly share code, notes, and snippets.

View djalmabright's full-sized avatar

Djalma Bina djalmabright

View GitHub Profile
@djalmabright
djalmabright / github.gql
Created September 29, 2017 20:48 — forked from alexandreaquiles/github.gql
Consulta GraphQL que busca estatísticas do projeto Express: o número de stars, de pull requests abertos, de issues abertas, a data da última release e informações do último commit.
query {
repository(owner:"expressjs", name: "express") {
stargazers {
totalCount
}
pullRequests(states: OPEN) {
totalCount
}
issues(states:OPEN) {
totalCount
@djalmabright
djalmabright / gist:0547cf2297104463901675d5e11bda3d
Created September 28, 2017 19:03 — forked from erinata/gist:5489247
Gemfile.lock example 2
GEM
remote: https://rubygems.org/
specs:
actionmailer (3.2.13)
actionpack (= 3.2.13)
mail (~> 2.5.3)
actionpack (3.2.13)
activemodel (= 3.2.13)
activesupport (= 3.2.13)
builder (~> 3.0.0)
<!DOCTYPE html>
<html>
<head>
<script src="https://npmcdn.com/react@0.14.2/dist/react.min.js"></script>
<script src="https://npmcdn.com/react-dom@0.14.2/dist/react-dom.min.js"></script>
<script src="https://npmcdn.com/google-map-react@0.14.6/dist/GoogleMapReact.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
.place{
/*!
* jQuery JavaScript Library v1.7.1
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
import urllib2
import json
key = "[your API key]"
while 1:
zip = raw_input('For which ZIP code would you like to see the weather forecast? ')
url = 'http://api.wunderground.com/api/' + key + '/geolookup/forecast10day/q/' + zip + '.json'
f = urllib2.urlopen(url)
json_string = f.read()
parsed_json = json.loads(json_string)
for day in parsed_json['forecast']['simpleforecast']['forecastday']: