This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f -iname \*.jpg -delete |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
find . -type f \( -iname "*.jpg" -o -iname "*.jpeg" \) -exec cp '{}' /dirname \; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Title : Pandas Row Shuffler | |
Author : Felan Carlo Garcia | |
''' | |
import numpy as np | |
import pandas as pd | |
def shuffler(filename): | |
df = pd.read_csv(filename, header=0) | |
# return the pandas dataframe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo fuser -n tcp [local_port] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Inner Join | |
SELECT * FROM A INNER JOIN B ON A.key = B.key | |
-- Left Join | |
SELECT * FROM A LEFT JOIN B ON A.key = B.key | |
-- Left Join without Intersection | |
SELECT * FROM A INNER JOIN B ON A.key = B.key where B.key IS NULL | |
-- Right Join |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
conda clean --lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chown username -R /whatever/floats/your/boat/dir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Removes punctuations and non Alpha-numeric characters, removes trailing spaces | |
and prints the string in lowercase | |
''' | |
import re | |
text = " sample_ @$@string %*hi^*&there " | |
clean_text = re.sub(r'[^A-Za-z0-9\s]+','',text).lower().strip() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://www.pixelbeat.org/scripts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Like, basically PERFECT scrollbars | |
*/ | |
/* | |
It's pure CSS. | |
Since a quick google search will confirm people going crazy about Mac OS Lion scrollbars... | |
this has no fade-out effect. | |
In Mac OS Lion, the lowest common denominator is always showing scrollbars by a setting. |
OlderNewer