Skip to content

Instantly share code, notes, and snippets.

View antoniocachuan's full-sized avatar

Antonio Cachuan antoniocachuan

View GitHub Profile
@antoniocachuan
antoniocachuan / VisionAPI.txt
Created October 6, 2020 02:47
lab vision API Google Cloud
{
"requests": [
{
"image": {
"source": {
"gcsImageUri": "gs://qwiklabs-gcp-04-cd36f3d11a7c/sign.jpg"
}
},
"features": [
{
@hugobowne
hugobowne / tweet_listener.py
Last active September 22, 2025 04:49
NOTE: this code is for a previous version of the Twitter API and I will not be updating in the near future. If someone else would like to, I'd welcome that! Feel free to ping me. END NOTE. Here I define a Tweet listener that creates a file called 'tweets.txt', collects streaming tweets as .jsons and writes them to the file 'tweets.txt'; once 100…
class MyStreamListener(tweepy.StreamListener):
def __init__(self, api=None):
super(MyStreamListener, self).__init__()
self.num_tweets = 0
self.file = open("tweets.txt", "w")
def on_status(self, status):
tweet = status._json
self.file.write( json.dumps(tweet) + '\n' )
self.num_tweets += 1
@antoniocachuan
antoniocachuan / SendaMail
Created June 17, 2014 17:12
Sending a mail with Java Mail API (Just Run!!)
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.webapp.util;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.PasswordAuthentication;

Pseudo-Classes – :nth-child

how to use the :nth-child pseudo-class to target elements in between the first and last child elements.

A Pen by Antonio on CodePen.

License.