Skip to content

Instantly share code, notes, and snippets.

View grodriguece's full-sized avatar

German Rodriguez grodriguece

  • Medellin
View GitHub Profile
@mapa17
mapa17 / pyexcelerate_to_excel.py
Created September 4, 2018 19:46
A helper function to write pandas.DataFrame to excel using pyexcelerate
import pandas as pd
import numpy as np
import timeit
import pyexcelerate
def pyexecelerate_to_excel(workbook_or_filename, df, sheet_name='Sheet1', origin=(1,1), columns=True, index=False):
"""
Write DataFrame to excel file using pyexelerate library
"""
@barryparkin
barryparkin / (sqlite) Find table in database by field name
Last active February 13, 2024 11:44
(sqlite) Find table in database by field name
SELECT DISTINCT TABLE_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME like '%{{fieldname}}%'
AND TABLE_SCHEMA = {{Database}};
@adamjohnson
adamjohnson / publickey-git-error.markdown
Last active June 8, 2024 15:32
Fix "Permission denied (publickey)" error when pushing with Git

"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"

This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:

  1. Open git bash (Use the Windows search. To find it, type "git bash") or the Mac Terminal. Pro Tip: You can use any *nix based command prompt (but not the default Windows Command Prompt!)
  2. Type cd ~/.ssh. This will take you to the root directory for Git (Likely C:\Users\[YOUR-USER-NAME]\.ssh\ on Windows)
  3. Within the .ssh folder, there should be these two files: id_rsa and id_rsa.pub. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Type ls to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be named id_rsa and id_rsa.pub in order for Git, GitHub, and BitBucket to recognize them by default.
  4. To create the SSH keys, type ssh-keygen -t rsa -C "your_email@example.com". Th