Skip to content

Instantly share code, notes, and snippets.

@sizhky
sizhky / GitCommitEmoji.md
Last active November 11, 2021 09:57 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@sizhky
sizhky / remove_jupyter_notebook_cells_output.py
Last active January 5, 2023 14:18 — forked from damianavila/remove_output.py
Remove output from Jupyter notebook from the command line (dev version 1.0)
import sys
import io
import os
from IPython.nbformat.current import read, write
def remove_outputs(nb):
"""remove the outputs from a notebook"""
for ws in nb.worksheets:
for cell in ws.cells:
if cell.cell_type == 'code':
@sizhky
sizhky / colab_important_snipplets.py
Created September 19, 2020 12:11 — forked from adityajn105/colab_important_snipplets.py
Google Colab important code snipplets
### Download a file to Local System from Colab
from google.colab import files
with open('example.txt', 'w') as f:
f.write('some content')
files.download('example.txt')
#======================================================================================================
#upload file to Colab from Local System
from google.colab import files
uploaded = files.upload()