Skip to content

Instantly share code, notes, and snippets.

View langheran's full-sized avatar
🎧
Automation Ninja 🐱‍👓

Nisim Hurst-Tarrab langheran

🎧
Automation Ninja 🐱‍👓
View GitHub Profile
@GabrielSGoncalves
GabrielSGoncalves / read_private_file_from_gdrive.py
Last active September 21, 2023 16:06
Read private files from a Google Drive
from typing import Union, Dict
from io import BytesIO, StringIO
import json
import pandas as pd
import requests
from pydrive2.auth import GoogleAuth
from pydrive2.drive import GoogleDrive
def read_private_file_from_gdrive(
file_url: str, file_format: str, google_auth: GoogleAuth, **kwargs
@donhector
donhector / configuration.xml
Created February 23, 2021 01:13
Office Deployment Tool config file
<Configuration>
<Add OfficeClientEdition="64" Channel="PerpetualVL2019" ForceUpgrade="TRUE">
<Product ID="ProPlus2019Volume" PIDKEY="NMMKJ-6RK4F-KMJVX-8D9MJ-6MWKP">
<Language ID="MatchOS" />
<!-- If you need , comment it. -->
<!-- <ExcludeApp ID="Word" /> -->
<!-- <ExcludeApp ID="Excel" /> -->
<!-- <ExcludeApp ID="PowerPoint" /> -->
<ExcludeApp ID="Access" />
<ExcludeApp ID="Groove" />
(() => {
let count = 0;
function getAllButtons() {
return document.querySelectorAll('button.is-following') || [];
}
async function unfollowAll() {
const buttons = getAllButtons();
@brunolemos
brunolemos / linkedin-unfollow-everyone.js
Last active December 23, 2024 12:51
Unfollow everyone on Linkedin
(() => {
let count = 0;
function getAllButtons() {
return document.querySelectorAll('button.is-following') || [];
}
async function unfollowAll() {
const buttons = getAllButtons();
@chmodsss
chmodsss / fine_tune_glove.py
Created April 19, 2020 06:26
Fine tuning glove embeddings using Mittens
import csv
import numpy as np
from collections import Counter
from nltk.corpus import brown
from mittens import GloVe, Mittens
from sklearn.feature_extraction import stop_words
from sklearn.feature_extraction.text import CountVectorizer
def glove2dict(glove_filename):
@igponce
igponce / kanban_board.plantuml
Created December 19, 2019 15:33
Kanban (trello-like) board in PlantUML
@startuml Kanban Board
caption "Kanban board for 2019.12.19"
rectangle stack_TODO as "To-do" {
node Task3 [
** Task Name **
====

Visual Studio Code as Diff Tool

Comparing files using the command line Using Visual Studio Code

"%LOCALAPPDATA%\Programs\Microsoft VS Code\code.exe" --diff file1.cs file2.cs

Using Visual Studio Code Insiders

@evan-burke
evan-burke / schema.py
Last active July 5, 2022 16:08
Fastest way to generate a SQL schema from raw data and/or insert data to the table
# Use Pandas & SQLAlchemy.
# https://stackoverflow.com/questions/23103962/how-to-write-dataframe-to-postgres-table
# Note this will create a new table; see the 'faster option' at the above link for a method using 'copy' to an existing table.
# However, 'copy' cannot do an upsert; that requires inserting to a temp table, then upserting form temp table to destination table.
# This will lack PKs and FKs and indexes, of course, so if used naively you may see data duplication.
# Also the df.to_sql command can do an append (but not upsert), using the if_exists param:
# https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_sql.html
@artificialsoph
artificialsoph / jupyter_ngrok.md
Last active March 23, 2025 15:36
Quickest way to get Jupyter notebook running on a remote server.

Log into your server with ssh, something like

ssh -i "my_secret.pem" [email protected]

If it's a new server, you'll need to install a few things.

Install conda with

@kaze
kaze / selenium-install
Last active May 17, 2024 12:12 — forked from xiaol825/install.txt
How to install Chrome, ChromeDriver and Selenium on CentOS. Plus a sample scraping script.
#!/usr/bin/env bash
# https://developers.supportbee.com/blog/setting-up-cucumber-to-run-with-Chrome-on-Linux/
# https://gist.github.com/curtismcmullan/7be1a8c1c841a9d8db2c
# http://stackoverflow.com/questions/10792403/how-do-i-get-chrome-working-with-selenium-using-php-webdriver
# http://stackoverflow.com/questions/26133486/how-to-specify-binary-path-for-remote-chromedriver-in-codeception
# http://stackoverflow.com/questions/40262682/how-to-run-selenium-3-x-with-chrome-driver-through-terminal
# http://askubuntu.com/questions/760085/how-do-you-install-google-chrome-on-ubuntu-16-04
# Versions
CHROME_DRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE`