path stringlengths 7 265 | concatenated_notebook stringlengths 46 17M |
|---|---|
exercises/ex1-DAR/teched2020-INT260_Data_Attribute_Recommendation.ipynb | ###Markdown
Cleaning up a service instance*Back to [table of contents](Table-of-Contents)*To clean all data on the service instance, you can run the following snippet. The code is self-contained and does not require you to execute any of the cells above. However, you will need to have the `key.json` containing a servi... |
examples/Train_ppo_cnn+eval_contact-(pretrained).ipynb | ###Markdown
if you wish to set which cores to useaffinity_mask = {4, 5, 7} affinity_mask = {6, 7, 9} affinity_mask = {0, 1, 3} affinity_mask = {2, 3, 5} affinity_mask = {0, 2, 4, 6} pid = 0os.sched_setaffinity(pid, affinity_mask) print("CPU affinity mask is modified to %s for process id 0" % affinity_mask) DEFAULT '... |
courses/08_Plotly_Bokeh/Fire_Australia19.ipynb | ###Markdown
Vuoi conoscere gli incendi divampati dopo il 15 settembre 2019?
###Code
mes = australia_1[(australia_1["acq_date"]>= "2019-09-15")]
mes.head()
mes.describe()
map_sett = folium.Map([-25.274398,133.775136], zoom_start=4)
lat_3 = mes["latitude"].values.tolist()
long_3 = mes["longitude"].values.tolist()
austral... |
presentations/How To - Estimate Pi.ipynb | ###Markdown
Estimating $\pi$ by Sampling PointsBy Evgenia "Jenny" Nitishinskaya and Delaney Granizo-MackenzieNotebook released under the Creative Commons Attribution 4.0 License.---A stochastic way to estimate the value of $\pi$ is to sample points from a square area. Some of the points will fall within the area of a c... |
Concise_Chit_Chat.ipynb | ###Markdown
Concise Chit ChatGitHub Repository: Code TODO:1. create a DataLoader class for dataset preprocess. (Use tf.data.Dataset inside?)1. Create a PyPI package for easy load cornell movie curpos dataset(?)1. Use PyPI module `embeddings` to load `GLOVES`, or use tfhub to load `GLOVES`?1. How to do a `clip_norm`(... |
community/awards/teach_me_qiskit_2018/quantum_machine_learning/1_K_Means/Quantum K-Means Algorithm.ipynb | ###Markdown
Trusted Notebook" width="500 px" align="left"> _*Quantum K-Means algorithm*_ The latest version of this notebook is available on https://github.com/qiskit/qiskit-tutorial.*** Contributors Shan Jin, Xi He, Xiaokai Hou, Li Sun, Dingding Wen, Shaojun Wu and Xiaoting Wang$^{1}$1. Institute of Fundamental and ... |
run/monitor-flir-service.ipynb | ###Markdown
Install and monitor the FLIR camera serviceInstall
###Code
! sudo cp flir-server.service /etc/systemd/system/flir-server.service
###Output
_____no_output_____
###Markdown
Start the service
###Code
! sudo systemctl start flir-server.service
###Output
_____no_output_____
###Markdown
Stop the service
###Code
... |
Problem_3.ipynb | ###Markdown
###Code
import math
def f(x):
return(math.exp(x)) #Trigo function
a = -1
b = 1
n = 10
h = (b-a)/n #Width of Trapezoid
S = h * (f(a)+f(b)) #Value of summation
for i in range(1,n):
S += f(a+i*h)
Integral = S*h
print('Integral = %0.4f' %Integral)
###Output
Integral = 2.1731
###Markdown
###Code
im... |
eda/hyper-parameter_tuning/random_forest-Level0.ipynb | ###Markdown
Get Training Data
###Code
# get training data
train_df = pd.read_csv(os.path.join(ROOT_DIR,DATA_DIR,FEATURE_SET,'train.csv.gz'))
X_train = train_df.drop(ID_VAR + [TARGET_VAR],axis=1)
y_train = train_df.loc[:,TARGET_VAR]
X_train.shape
y_train.shape
y_train[:10]
###Output
_____no_output_____
###Markdown
Set... |
05-statistics.ipynb | ###Markdown
Statistics **Quick intro to the following packages**- `hepstats`.I will not discuss here the `pyhf` package, which is very niche.Please refer to the [GitHub repository](https://github.com/scikit-hep/pyhf) or related material at https://scikit-hep.org/resources. **`hepstats` - statistics tools and utilities... |
wgan_experiment/WGAN_experiment.ipynb | ###Markdown
Let's look at:Number of labels per image (histogram)Quality score per image for images with multiple labels (sigmoid?)
###Code
import csv
from itertools import islice
from collections import defaultdict
import pandas as pd
import matplotlib.pyplot as plt
import torch
import torchvision
import numpy as np
CS... |
Merged Jupyter Notebooks Dataset
Introduction
This dataset is a transformed version of the Jupyter Code-Text Pairs dataset. The original dataset contains markdown, code, and output pairs extracted from Jupyter notebooks. This transformation merges these components into a single, cohesive format that resembles a Jupyter notebook, making it easier to analyze and understand the flow of information.
Dataset Details
Source
The original dataset is sourced from the Hugging Face Hub, specifically the bigcode/jupyter-code-text-pairs dataset. It contains pairs of markdown, code, and output from Jupyter notebooks.
Transformation Process
Using the flexibility and efficiency of DuckDB, I processed the entire dataset without the need for heavy hardware. DuckDB's ability to handle large datasets efficiently allowed me to concatenate the markdown, code, and output for each notebook path into a single string, simulating the structure of a Jupyter notebook.
The transformation was performed using the following DuckDB query:
import duckdb
#Connect to a new DuckDB database
new_db = duckdb.connect('merged_notebooks.db')
#Query to concatenate markdown, code, and output
query = """
SELECT path,
STRING_AGG(CONCAT('###Markdown\n', markdown, '\n###Code\n', code, '\n###Output\n', output), '\n') AS concatenated_notebook
FROM read_parquet('jupyter-code-text-pairs/data/*.parquet')
GROUP BY path
"""
#Execute the query and create a new table
new_db.execute(f"CREATE TABLE concatenated_notebooks AS {query}")
Usage
To replicate the transformation or explore the original dataset, you can download it using the following command:
git clone https://huggingface.co/datasets/bigcode/jupyter-code-text-pairs
Once downloaded, you can use the provided DuckDB query to process the data as needed.
Conclusion
This dataset provides a more integrated view of Jupyter notebooks by merging markdown, code, and output into a single format. The use of DuckDB demonstrates its capability to handle large datasets efficiently, making it an excellent tool for data transformation tasks.
- Downloads last month
- 118