Skip to content

Instantly share code, notes, and snippets.

View sequeiradenzil's full-sized avatar

Denzil Sequeira sequeiradenzil

  • Mumbai
  • 09:47 (UTC +05:30)
View GitHub Profile
from gensim.models import KeyedVectors
# Load gensim word2vec
w2v_path = '<Gensim File Path>'
w2v = KeyedVectors.load_word2vec_format(w2v_path)
import io
# Vector file, `\t` seperated the vectors and `\n` seperate the words
"""
@hbokh
hbokh / SaltShaker_install_en.md
Last active July 13, 2019 11:39
Install SaltShaker on Ubuntu 16.04.1 LTS

This is a "best-effort" in translating the "install.txt" from SaltShaker into English.
I tried all steps myself on a recent Ubuntu-host and latest SaltStack-packages.


This installation note applies to SaltShaker v2.1.3.

SaltShaker on Ubuntu 16.04.1 LTS

NOTE All commands are to be run as user "root".

@JoshCheek
JoshCheek / apis.txt
Created January 16, 2017 07:24
A big list of APIs (spent like 8 hours just trying to index what's available)
Google apps
https://developers.google.com/google-apps/products
Maps
Calendar
Gmail
Spreadsheets
Tasks (TODO list?)
Drive (like s3?)
Forms (like a generalized survey?)
Hangouts
@scottmagdalein
scottmagdalein / clickable-element.html
Last active March 15, 2023 18:01
Make the Mailchimp Subscriber popup appear on click
<!-- This is the HTML element that, when clicked, will cause the popup to appear. -->
<button id="open-popup">Subscribe to our mailing list</button>
@iMilnb
iMilnb / ec2.py
Created May 27, 2015 12:29
AWS EC2 simple manipulation script using python and boto3
#!/usr/bin/env python
# Simple [boto3](https://github.com/boto/boto3) based EC2 manipulation tool
#
# To start an instance, create a yaml file with the following format:
#
# frankfurt:
# - subnet-azb:
# - type: t2.micro
# image: image-tagname
# Copyright (c) 2013 Georgios Gousios
# MIT-licensed
# [megansquire] Edited to handle new column names (Date instead of CreationDate)
create database stackoverflow DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8mb4_bin;
use stackoverflow;
create table badges (
Id INT NOT NULL PRIMARY KEY,
@KhepryQuixote
KhepryQuixote / PyTorStemPrivoxy.md
Last active January 18, 2025 16:46
Python script to connect to Tor via Stem and Privoxy, requesting a new connection (hence a new IP as well) as desired.

Crawling Anonymously with Tor in Python

adapted from the article "Crawling anonymously with Tor in Python" by S. Acharya, Nov 2, 2013.

The most common use-case is to be able to hide one's identity using TOR or being able to change identities programmatically, for example when you are crawling a website like Google and you don’t want to be rate-limited or blocked via IP address.

Tor

Install Tor.

@gousiosg
gousiosg / stackoverflow.sql
Last active July 22, 2024 11:10
Script to import the stackexchange dumps into MySQL
# Copyright (c) 2013 Georgios Gousios
# MIT-licensed
create database stackoverflow DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
use stackoverflow;
create table badges (
Id INT NOT NULL PRIMARY KEY,
UserId INT,