Skip to content

Commit 668f12a

Browse files
committed
restructured; readme mod; roberta finetuning code added
1 parent 1405bae commit 668f12a

12 files changed

+27
-6
lines changed

README.md

+23-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,26 @@
1-
# python-snippets
1+
# data-science-snippets
22

3-
Curated list of daily use Python snippets
3+
Curated list of python snippets for busy and equally lazy Data Scientists :smile:
44

55
List of snippets:
6-
- `get_members_of_object.py`: Get list of all modules within a class. Can be used to fetch function list.
7-
- `git_config.txt`: Basic GIT operations to add your username and email id in git config.
6+
- **Deep Learning** (`deep_learning/`)
7+
- `keras_biLSTM.py`: Keras based example for biLSTM model from data preparation to model initialzation to final training.
8+
- `keras/callback.py`: different callbacks in Keras and how to use them.
9+
10+
- **GIT** (`git/`)
11+
- `git_config.txt`: Basic GIT operations to add your username and email id in git config.
12+
13+
- **Natural Language Processing** (`natural_language_processing/`)
14+
- `finetune_roberta_huggingface.py`: fine tune RoBERTa model on text.
15+
16+
- **Google colab** (`google_colab/`)
17+
- `connect_to_google_drive.py`: connect to google drive using python script
18+
- `download_file_from_google_colab.py` : download specific fil from google colab using python script
19+
20+
- **Python** (`python/`)
21+
- `add_numpy_array_as_pandas_column.py` : transform a numpy array into pandas column
22+
- `get_members_of_object.py`: Get list of all modules within a class. Can be used to fetch function list.
23+
- `install_package.py`: how to install python packages from python code
24+
- `python_packaging.sh`: script to clean, build and publish your python package.
25+
- `virtual_environment.sh`: how to create and activate a virtual python environment (linux and windows)
26+

keras_biLSTM.py renamed to deep_learning/keras_biLSTM.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
"""Sample code for recurrent layer based models
2+
3+
The model code is at line 42; rest are fillers and prerequisities
24
"""
35

46
# ---- Imports ----

keras_callback.py renamed to deep_learning/keras_callback.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Step 2: Assigning the callback
1313
#------------------------------
1414
# fit the model
15-
history = model.fit(train_data_gen,
16-
# ....
15+
history = model.fit(train_data_gen, # training data generator
16+
# .... # put usual code here
1717
callbacks=[checkpoint, earlystopping]
1818
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)