Dataset Viewer
Auto-converted to Parquet Duplicate
Unnamed: 0
int64
0
16k
text_prompt
stringlengths
149
45.7k
code_prompt
stringlengths
67
140k
0
<SYSTEM_TASK:> Given the following text description, write Python code to implement the functionality described below step by step <END_TASK> <USER_TASK:> Description: Tweedie Density Estimation This package follows the following 2 papers to estimate the density of a presumed Tweedie distribution Step1: And to prove ...
<ASSISTANT_TASK:> Python Code: %matplotlib inline from __future__ import print_function import numpy as np import scipy as sp from tweedie import tweedie import seaborn as sns import statsmodels.api as sm # Number of parameters for model p = 20 # Number of simulated observations n = 100000 np.random.seed(43) exog = np....
1
<SYSTEM_TASK:> Given the following text description, write Python code to implement the functionality described below step by step <END_TASK> <USER_TASK:> Description: syncID Step1: We also need to import the following functions created in previous lessons Step2: Calculate Hillshade <img src="http Step3: Now that w...
<ASSISTANT_TASK:> Python Code: from osgeo import gdal import numpy as np import matplotlib.pyplot as plt %matplotlib inline import warnings warnings.filterwarnings('ignore') Explanation: syncID: 7e916532e9fa49aeba7464350e661778 title: "Create a Hillshade from a Terrain Raster in Python" description: "Learn how to creat...
2
<SYSTEM_TASK:> Given the following text description, write Python code to implement the functionality described below step by step <END_TASK> <USER_TASK:> Description: GLM Step1: Local Functions Step2: Generate Data This dummy dataset is created to emulate some data created as part of a study into quantified self, a...
<ASSISTANT_TASK:> Python Code: ## Interactive magics %matplotlib inline import sys import warnings warnings.filterwarnings('ignore') import re import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import patsy as pt from scipy import optimize # pymc3 libraries import pymc3 as pm i...
3
<SYSTEM_TASK:> Given the following text description, write Python code to implement the functionality described below step by step <END_TASK> <USER_TASK:> Description: Chapter 3 - Developing Templates Generating SoftMax distributions from normals could get quite tedious – for any sufficiently complicated shape, the nu...
<ASSISTANT_TASK:> Python Code: import numpy as np %matplotlib inline from cops_and_robots.robo_tools.fusion.softmax import SoftMax, make_regular_2D_poly poly = make_regular_2D_poly(5, max_r=2, theta=-np.pi/4) labels = ['Interior','Heliport Facade','Mall Terrace Entrance', 'River Terrace Entrance', 'Concou...
4
<SYSTEM_TASK:> Given the following text description, write Python code to implement the functionality described below step by step <END_TASK> <USER_TASK:> Description: .. _tut_stats_cluster_source_1samp Step1: Set parameters Step2: Read epochs for all channels, removing a bad one Step3: Transform to source space St...
<ASSISTANT_TASK:> Python Code: # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Eric Larson <larson.eric.d@gmail.com> # License: BSD (3-clause) import os.path as op import numpy as np from numpy.random import randn from scipy import stats as stats import mne from mne import (io, spatia...
5
<SYSTEM_TASK:> Given the following text description, write Python code to implement the functionality described below step by step <END_TASK> <USER_TASK:> Description: * Visualizing of genetic similarity with Lightning + GraphX * Setup lightning Step1: Load structure similarity data Public data from http Step2: Show...
<ASSISTANT_TASK:> Python Code: %libraryDependencies += "org.viz.lightning" %% "lightning-scala" % "0.1.6" %update import org.viz.lightning._ import org.apache.spark.graphx._ val lgn = Lightning(host="https://lightning-spark-summit.herokuapp.com" ) lgn.enableNotebook() Explanation: * Visualizing of genetic similarity wi...
6
<SYSTEM_TASK:> Given the following text description, write Python code to implement the functionality described below step by step <END_TASK> <USER_TASK:> Description: ES-DOC CMIP6 Model Properties - Ocean MIP Era Step1: Document Authors Set document authors Step2: Document Contributors Specify document contributors...
<ASSISTANT_TASK:> Python Code: # DO NOT EDIT ! from pyesdoc.ipython.model_topic import NotebookOutput # DO NOT EDIT ! DOC = NotebookOutput('cmip6', 'noaa-gfdl', 'sandbox-2', 'ocean') Explanation: ES-DOC CMIP6 Model Properties - Ocean MIP Era: CMIP6 Institute: NOAA-GFDL Source ID: SANDBOX-2 Topic: Ocean Sub-Topics...
7
<SYSTEM_TASK:> Given the following text description, write Python code to implement the functionality described below step by step <END_TASK> <USER_TASK:> Description: Step2: Reframing Design Pattern The Reframing design pattern refers to changing the representation of the output of a machine learning problem. For exa...
<ASSISTANT_TASK:> Python Code: import numpy as np import seaborn as sns from google.cloud import bigquery import matplotlib as plt %matplotlib inline bq = bigquery.Client() query = SELECT weight_pounds, is_male, gestation_weeks, mother_age, plurality, mother_race FROM `bigquery-public-data.samples.natali...
8
<SYSTEM_TASK:> Given the following text description, write Python code to implement the functionality described below step by step <END_TASK> <USER_TASK:> Description: YouTube Spam Collection Data Set (Part 2) Source Step1: <a id='section3b'></a> Read in the data from the first CSV alone Step2: <a id='section3c'></a...
<ASSISTANT_TASK:> Python Code: # Import modules import numpy as np import pandas as pd Explanation: YouTube Spam Collection Data Set (Part 2) Source: UCI Machine Learning Repository Original Source: YouTube Spam Collection v. 1 Alberto, T.C., Lochter J.V., Almeida, T.A. Filtragem Automática de Spam nos Comentários do Y...
9
<SYSTEM_TASK:> Given the following text description, write Python code to implement the functionality described below step by step <END_TASK> <USER_TASK:> Description: Table of Contents <p><div class="lev1 toc-item"><a href="#Building-an-ANN" data-toc-modified-id="Building-an-ANN-1"><span class="toc-item-num">1&nbsp;&...
<ASSISTANT_TASK:> Python Code: # Installing Theano # pip install --upgrade --no-deps git+git://github.com/Theano/Theano.git # Installing Tensorflow # pip install tensorflow # Installing Keras # pip install --upgrade keras Explanation: Table of Contents <p><div class="lev1 toc-item"><a href="#Building-an-ANN" data-toc-m...
10
<SYSTEM_TASK:> Given the following text description, write Python code to implement the functionality described below step by step <END_TASK> <USER_TASK:> Description: Enter State Farm Step1: Create Sample The following assumes you've already created your validation set - remember that the training and validation set...
<ASSISTANT_TASK:> Python Code: import theano import os, sys sys.path.insert(1, os.path.join(os.getcwd(), 'utils')) %matplotlib inline from __future__ import print_function, division # path = "data/sample/" path = "data/statefarm/sample/" import utils; reload(utils) from utils import * from IPython.display import FileLi...
11
<SYSTEM_TASK:> Given the following text description, write Python code to implement the functionality described below step by step <END_TASK> <USER_TASK:> Description: Import Step1: Reading initial data Step2: Remove rows with NAN from data Step3: Add diff_pt and cos(diff_phi) Step4: Add max, sum among PIDs Step5:...
<ASSISTANT_TASK:> Python Code: import pandas import numpy from folding_group import FoldingGroupClassifier from rep.data import LabeledDataStorage from rep.report import ClassificationReport from rep.report.metrics import RocAuc from sklearn.ensemble import RandomForestClassifier from sklearn.metrics import roc_curve, ...
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
8