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
db.countries.insert({acron: 'AF', name: 'Afeganistão'} ) | |
db.countries.insert({acron: 'AL', name: 'Albânia'} ) | |
db.countries.insert({acron: 'DZ', name: 'Argélia'} ) | |
db.countries.insert({acron: 'DS', name: 'Samoa'} ) | |
db.countries.insert({acron: 'AD', name: 'Andorra'} ) | |
db.countries.insert({acron: 'AO', name: 'Angola'} ) | |
db.countries.insert({acron: 'AI', name: 'Anguilla'} ) | |
db.countries.insert({acron: 'AQ', name: 'Antártica'} ) | |
db.countries.insert({acron: 'AG', name: 'Antigua e / ou Barbuda'} ) | |
db.countries.insert({acron: 'AR', name: 'Argentina'} ) |
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
# Set variables in .bashrc file | |
# don't forget to change your path correctly! | |
export GOPATH=$HOME/golang | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
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
from Queue import Queue | |
from threading import Thread | |
class Worker(Thread): | |
"""Thread executing tasks from a given tasks queue""" | |
def __init__(self, tasks): | |
Thread.__init__(self) | |
self.tasks = tasks | |
self.daemon = True | |
self.start() |
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 pandas as pd | |
data = {'a': [1, 3, 4, 4], 'b': [1, 3, 2, 3]} | |
df = pd.DataFrame(data=data) | |
df.to_csv("data/old_data.csv") | |
data2 = {'a': [1, 3, 5, 4], 'b': [1, 3, 2, 3]} | |
df2 = pd.DataFrame(data=data2) | |
df2.to_csv("data/new_data.csv") |
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
package main | |
import ( | |
"fmt" | |
"reflect" | |
) | |
type Foo struct { | |
FirstName string `tag_name:"tag 1"` | |
LastName string `tag_name:"tag 2"` |
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
# -*- coding:utf-8 -*- | |
''' | |
Simplistic script to parse the detailed AWS billing CSV file. | |
Script displays cost of S3 operations broken down per region, bucket and usage | |
type (either storage or network). It also sums up the amount of storage used per bucket. | |
Output is filtered wrt to costs < 1$. | |
See http://docs.aws.amazon.com/awsaccountbilling/latest/about/programaccess.html for | |
how to set up programmatic access to your billing. |
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 Foundation | |
protocol GQLNodeArgument {} | |
extension String: GQLNodeArgument {} | |
extension NSNumber: GQLNodeArgument {} | |
class GQLNode: StringLiteralConvertible, ArrayLiteralConvertible, Printable, DebugPrintable { | |
let name: String? |
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
// | |
// ColorsUtil.swift | |
// | |
// Created by Vinicius Souza on 5/11/16. | |
// Copyright © 2016 Vinicius Souza. All rights reserved. | |
// | |
import Foundation | |
import UIKit |
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 HTTP | |
import File | |
import HTTPSClient | |
import JSON | |
var url: String? | |
do { | |
let client = try! Client(uri: "https://api.github.com:443") | |
var response = try client.get("/repos/vsouza/awesome-ios/git/trees/HEAD") | |
let buffer = try response.body.becomeBuffer() |
OlderNewer