Name | Link | Feed |
---|---|---|
Artificial Intelligence | https://lexfridman.com/ai/ | https://lexfridman.com/category/ai/feed/ |
DataFramed | https://www.datacamp.com/community/podcast | https://feeds.buzzsprout.com/147669.rss |
This Week in Machine Learning & Artificial Intelligence (AI) Podcast | https://twimlai.com | http://twimlai.libsyn.com/rss |
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 functools | |
import time | |
def readable_time(t): | |
a = '' | |
if t < 1: | |
a = f'{t:.2f} sec' | |
elif t < 60: | |
a = f'{t:.0f} sec' | |
elif t < 3600: |
The extensions to install:
- R (https://marketplace.visualstudio.com/items?itemName=Ikuyadeu.r)
- R LSP Client (https://marketplace.visualstudio.com/items?itemName=REditorSupport.r-lsp)
- R Tools (https://marketplace.visualstudio.com/items?itemName=Mikhail-Arkhipov.r)
For R LSP, you need to have R language server installed.
- Ctrl + R Switching workspaces
- Ctrl + P Go to file
- Ctrl+B Toggle Sidebar Visibility
- F4 Focus Next Search Result
- Shift+F4 Focus Previous Search Result
- Ctrl+` Toggle Integrated Terminal
- Ctrl+Space Auto-complete
- Crtl + Alt + up (or down): repeat cursor
- ALT + CLICK — Repeat cursor
To start the docker container, run the following command:
docker run -d -p 8787:8787 -v C:\source:/home/rstudio -e ROOT=TRUE -e PASSWORD=rstudio rocker/rstudio
In the above command, I'm mounting "C:\source" to "/home/rstudio", thus providing the container access to all the contents of "C:\source".
If you want to mount multiple paths use -v multiple time. Example:
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 a summary of a pandas dataframe and its columns | |
# ======================================================================= | |
def df_summary(df): | |
print(f'Dataframe has {df.shape[0]:,} rows and {df.shape[1]:,} columns') | |
if len(df) > 1: | |
summary = pd.DataFrame(df.dtypes, columns=['dtype']).reset_index() | |
summary.rename(columns={'index': 'feature'}, inplace=True) | |
summary['missing'] = df.isnull().sum().values | |
summary['uniques'] = df.nunique().values |
OlderNewer