Skip to content

Instantly share code, notes, and snippets.

View automata's full-sized avatar

Vilson Vieira automata

View GitHub Profile

1. Download your Twitter archive

You can find this feature in Settings > Download Twitter Archive. It might take 24 hours to receive. Unzip the file and open the data folder in your terminal:

cd ~/Downloads/twitter-archive-zip-you-downloaded/data

(I have seen reports that this function may no longer be working, so this guide is mostly useful to those who were lucky enough to already have downloaded their archive.)

@MichaelSimons
MichaelSimons / RetrievingDockerImageSizes.md
Last active March 25, 2024 11:14
Retrieving Docker Image Sizes

Retrieving Docker Image Sizes

There are two metrics that are important to consider when discussing the size of Docker images.

  1. Compressed size - This is often referred to as the wire size. This affects how fast/slow images can be pulled from a registry. This impacts the first run experience on machines where images are not cached.
  2. Uncompressed size - This is often referred to as the size on disk. This affects how much local storage is required to support your Docker workloads.

The example commands shown below will work on Windows, MacOS, and Linux.

How to Measure the Compressed Size

@mattdesl
mattdesl / about.md
Last active February 25, 2018 20:50 — forked from automata/about.md
Using @mattdesl's Texel with Three.js (WebGL renderer)
npm install texel@1.0.15 --global
npm install three
texel index.js --open

Wait for output.

output

@mattdesl
mattdesl / about.md
Last active February 27, 2018 04:46
Texel + Saving Canvas PNG

Saving GIF/MP4 Frames with Texel

The above GIF was rendered with Canvas2D and JavaScript. I used texel, a tool I am developing but have not yet released.

If you want to try this very experimental tool, install the latest working version like so:

npm install texel@1.0.15 --global

procedural mesh generation

Generates an algorithmic 3D OBJ file with ThreeJS and Node.js.

# print to stdout
node generate-mesh.js > test.obj

# write to file
node generate-mesh.js test.obj
@dannguyen
dannguyen / README.md
Last active December 28, 2023 15:21
Using Python 3.x and Google Cloud Vision API to OCR scanned documents to extract structured data

Using Python 3 + Google Cloud Vision API's OCR to extract text from photos and scanned documents

Just a quickie test in Python 3 (using Requests) to see if Google Cloud Vision can be used to effectively OCR a scanned data table and preserve its structure, in the way that products such as ABBYY FineReader can OCR an image and provide Excel-ready output.

The short answer: No. While Cloud Vision provides bounding polygon coordinates in its output, it doesn't provide it at the word or region level, which would be needed to then calculate the data delimiters.

On the other hand, the OCR quality is pretty good, if you just need to identify text anywhere in an image, without regards to its physical coordinates. I've included two examples:

####### 1. A low-resolution photo of road signs

@vasanthk
vasanthk / System Design.md
Last active April 18, 2024 13:23
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@debashisbarman
debashisbarman / README.md
Last active February 15, 2024 02:19
A boilerplate Twitter bot that can retweet in response to the tweets matching particluar keyword (https://goo.gl/4whEIt)

Creating a Twitter bot with Node.js

Learn how you can create your own Twitter bot using Node.js and the new Twitter API. The bot will auto retweet in response to tweets with some particular hashtags. (https://goo.gl/4whEIt)

Tools we need

Here are the tools we’ll be using to create the bot — 

  • Node.js installed in your machine
  • A registered Twitter account

Create a Twitter application

#!/bin/bash
# Run this on This AMI on AWS:
# https://console.aws.amazon.com/ec2/v2/home?region=us-east-1#LaunchInstanceWizard:ami=ami-b36981d8
# You should get yourself a fully working GPU enabled tensorflow installation.
cd ~
# grab cuda 7.0