1. Download basic instant client (and maybe the SQL*Plus package) at
https://www.oracle.com/database/technologies/instant-client/macos-intel-x86-downloads.html#ic_osx_inst
2. Unzip downloads
3. Mostly follow this tutorial: https://www.talkapex.com/2013/03/oracle-instant-client-on-mac-os-x/
a. But create an /oracle folder in /usr/local folder instead
b. Move the unzipped folders to /usr/local/oracle
c. Put lines in .zshrc file if on macOS Catalina and set zsh as default shell
4. Get the tnsnames.ora file (and maybe the sqlnet.ora file) and move to
/usr/local/oracle/instantclient_19_3/network/admin
5. Go into Datagrip and set up an Oracle connection
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
import pandas as pd | |
df = pd.read_csv("Global Temperature Anomalies.csv") | |
print(df.columns) | |
# parameter values | |
id_vars = ['Hemisphere', 'Year'] | |
cols_to_pivot = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', | |
'Aug', 'Sep', 'Oct', 'Nov', 'Dec', 'J-D', 'D-N', 'DJF', 'MAM', 'JJA', | |
'SON'] |
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
# define stopwords to remove in word cloud | |
# some of these words were not useful in describing an area | |
# others were just so obvious that they appeared too much to be useful | |
stopwords = set(STOPWORDS) | |
unigram_stopwords = ["clean", "nice", "perfect", "austin", "great", "place", "stay", "definitely", | |
"would", "host", "house", "location", "home", "beautiful", "highly", "recommend", | |
"comfortable", "space", "would", "us", "everything", "'s", "bed", "amazing", | |
"room", "apartment", "ing", "really", "loved", "wonderful", "good", "needed", | |
"time", "thank", "need", "ed"] |
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 top 10 largest files | |
git rev-list --objects --all | grep -f <(git verify-pack -v .git/objects/pack/*.idx| sort -k 3 -n | cut -f 1 -d " " | tail -10) | |
# clean repo | |
git filter-branch --index-filter 'git rm --cached --ignore-unmatch *.mov' -- --all | |
rm -Rf .git/refs/original | |
rm -Rf .git/logs/ | |
git gc --aggressive --prune=now | |
# push changes |
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
k = hs.hotkey.modal.new('ctrl-shift', 'n') | |
function k:entered() hs.alert'Virtual Numpad' end | |
function k:exited() hs.alert'Exit Virtual Numpad' end | |
k:bind('ctrl-shift', 'n', function() k:exit() end) | |
hs.fnutils.each({ | |
{ key='j', padkey='pad1'}, | |
{ key='k', padkey='pad2'}, | |
{ key='l', padkey='pad3'}, | |
{ key='u', padkey='pad4'}, |
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
#### macOS startup chime | |
# 1. Enter macOS Recovery | |
# 2. Launch Terminal | |
# 3. Copy paste this command and press ENTER: nvram StartupMute=%00 | |
# 4. Reboot | |
# Note that you must unmute your Mac in macOS to hear the chime. | |
#### To fix Messages not staying open | |
defaults write -g NSDisableAutomaticTermination -bool yes |
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
import pandas as pd | |
import pantab | |
from tableauhyperapi import TableName | |
df = pd.read_csv("data/starter_pokemon_grass.csv") | |
# save DataFrame output to .hyper file | |
pantab.frame_to_hyper(df, "hyper/pokemon_public.hyper", table = "pokemon") | |
# save to schema other than public |
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
print(pantab.frames_from_hyper("hyper/pokemon_public.hyper").keys()) | |
# dict_keys([TableName('public', 'pokemon')]) | |
print(pantab.frames_from_hyper("hyper/pokemon_extract.hyper").keys()) | |
# dict_keys([TableName('Extract', 'pokemon')]) |
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
# this errors out with message "HyperException: Specified table does not exist: pokemon." | |
pantab.frame_from_hyper("hyper/pokemon_extract.hyper", table = "pokemon") | |
# need to specify schema to read table from | |
pantab.frame_from_hyper("hyper/pokemon_extract.hyper", table = TableName("Extract", "pokemon")) |
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
# these two are equivalent | |
pantab.frame_from_hyper("hyper/pokemon_public.hyper", table = "pokemon") | |
pantab.frame_from_hyper("hyper/pokemon_public.hyper", table = TableName("public", "pokemon")) |
OlderNewer