Datasets:

Modalities:
Text
ArXiv:
Libraries:
Datasets
License:
Dataset Preview
Duplicate
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
Job manager was killed while running this job (job exceeded maximum duration).
Error code:   JobManagerExceededMaximumDurationError

Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.

hexsha
string
repo
string
path
string
license
sequence
language
string
identifier
string
original_docstring
string
docstring
string
docstring_tokens
sequence
code
string
code_tokens
sequence
short_docstring
string
short_docstring_tokens
sequence
comment
sequence
parameters
list
docstring_params
dict
bf86d18d90c390905405a84287a89ad2f0b7c1bb
iSoron/Prescient
prescient/gosm/derivative_patterns/graph_utilities.py
[ "BSD-3-Clause" ]
Python
WeightedGraph
This class represents a weighted graph for the purposes of determining clusters via the Markov Clustering Algorithm. To initialize an object of this class, pass in a dictionary which maps pairs (tuples) of vertices to the corresponding weight. Stores internally both an adjacency list and an adjace...
This class represents a weighted graph for the purposes of determining clusters via the Markov Clustering Algorithm. To initialize an object of this class, pass in a dictionary which maps pairs (tuples) of vertices to the corresponding weight. Stores internally both an adjacency list and an adjacency matrix This is fi...
[ "This", "class", "represents", "a", "weighted", "graph", "for", "the", "purposes", "of", "determining", "clusters", "via", "the", "Markov", "Clustering", "Algorithm", ".", "To", "initialize", "an", "object", "of", "this", "class", "pass", "in", "a", "dictionar...
class WeightedGraph: """ This class represents a weighted graph for the purposes of determining clusters via the Markov Clustering Algorithm. To initialize an object of this class, pass in a dictionary which maps pairs (tuples) of vertices to the corresponding weight. Stores internally both an ...
[ "class", "WeightedGraph", ":", "def", "__init__", "(", "self", ",", "pair_weights", ")", ":", "self", ".", "adjacency_list", "=", "self", ".", "_construct_adjacency_list", "(", "pair_weights", ")", "self", ".", "vertices", "=", "list", "(", "self", ".", "adj...
This class represents a weighted graph for the purposes of determining clusters via the Markov Clustering Algorithm.
[ "This", "class", "represents", "a", "weighted", "graph", "for", "the", "purposes", "of", "determining", "clusters", "via", "the", "Markov", "Clustering", "Algorithm", "." ]
[ "\"\"\"\n This class represents a weighted graph for the purposes\n of determining clusters via the Markov Clustering Algorithm.\n To initialize an object of this class, pass in a dictionary\n which maps pairs (tuples) of vertices to the corresponding weight.\n\n Stores internally both an adjacency l...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
44d82532b0e3acb3453df191ceef6f20d3f8da3d
plusus/plus-tuto
tuto-file-handling/libtuto/zone.py
[ "CC-BY-3.0" ]
Python
Zone
Zone with defined boundaries
Zone with defined boundaries
[ "Zone", "with", "defined", "boundaries" ]
class Zone: """ Zone with defined boundaries """ def topLeft(self): """ :rtype: (int, int) """ raise NotImplementedError() def bottomRight(self): """ :rtype: (int, int) """ raise NotImplementedError() def center(self): ""...
[ "class", "Zone", ":", "def", "topLeft", "(", "self", ")", ":", "\"\"\"\n :rtype: (int, int)\n \"\"\"", "raise", "NotImplementedError", "(", ")", "def", "bottomRight", "(", "self", ")", ":", "\"\"\"\n :rtype: (int, int)\n \"\"\"", "raise", "NotI...
Zone with defined boundaries
[ "Zone", "with", "defined", "boundaries" ]
[ "\"\"\"\n Zone with defined boundaries\n \"\"\"", "\"\"\"\n :rtype: (int, int)\n \"\"\"", "\"\"\"\n :rtype: (int, int)\n \"\"\"", "\"\"\"\n :rtype: (int, int)\n \"\"\"" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
44f4e6ceee8ef657f109e2b9814db4070531e985
OthmanEmpire/project_xcape
xcape/common/object.py
[ "MIT" ]
Python
GameObject
The base class for all other classes.
The base class for all other classes.
[ "The", "base", "class", "for", "all", "other", "classes", "." ]
class GameObject: """ The base class for all other classes. """ MENU_EVENT = pg.USEREVENT + 1 SCENE_EVENT = pg.USEREVENT + 2 CUTSCENE_EVENT = pg.USEREVENT + 3 CATEGORIES_MENU = [ "screen", "transition", "complete", "health", "max_health" ] CA...
[ "class", "GameObject", ":", "MENU_EVENT", "=", "pg", ".", "USEREVENT", "+", "1", "SCENE_EVENT", "=", "pg", ".", "USEREVENT", "+", "2", "CUTSCENE_EVENT", "=", "pg", ".", "USEREVENT", "+", "3", "CATEGORIES_MENU", "=", "[", "\"screen\"", ",", "\"transition\"", ...
The base class for all other classes.
[ "The", "base", "class", "for", "all", "other", "classes", "." ]
[ "\"\"\"\n The base class for all other classes.\n \"\"\"", "\"\"\"\n Handles the given event.\n\n :param event: pygame.Event, allowing event-driven programming.\n \"\"\"", "\"\"\"\n Updates the logic of the game object every game tick.\n \"\"\"", "\"\"\"\n Rende...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
780191505bf40f3e172386d4238c7acea61b8ff1
gustavo-bordin/scrapy
scrapy/core/http2/stream.py
[ "BSD-3-Clause" ]
Python
Stream
Represents a single HTTP/2 Stream. Stream is a bidirectional flow of bytes within an established connection, which may carry one or more messages. Handles the transfer of HTTP Headers and Data frames. Role of this class is to 1. Combine all the data frames
Represents a single HTTP/2 Stream. Stream is a bidirectional flow of bytes within an established connection, which may carry one or more messages. Handles the transfer of HTTP Headers and Data frames. Role of this class is to 1. Combine all the data frames
[ "Represents", "a", "single", "HTTP", "/", "2", "Stream", ".", "Stream", "is", "a", "bidirectional", "flow", "of", "bytes", "within", "an", "established", "connection", "which", "may", "carry", "one", "or", "more", "messages", ".", "Handles", "the", "transfer...
class Stream: """Represents a single HTTP/2 Stream. Stream is a bidirectional flow of bytes within an established connection, which may carry one or more messages. Handles the transfer of HTTP Headers and Data frames. Role of this class is to 1. Combine all the data frames """ def __i...
[ "class", "Stream", ":", "def", "__init__", "(", "self", ",", "stream_id", ":", "int", ",", "request", ":", "Request", ",", "protocol", ":", "\"H2ClientProtocol\"", ",", "download_maxsize", ":", "int", "=", "0", ",", "download_warnsize", ":", "int", "=", "0...
Represents a single HTTP/2 Stream.
[ "Represents", "a", "single", "HTTP", "/", "2", "Stream", "." ]
[ "\"\"\"Represents a single HTTP/2 Stream.\n\n Stream is a bidirectional flow of bytes within an established connection,\n which may carry one or more messages. Handles the transfer of HTTP Headers\n and Data frames.\n\n Role of this class is to\n 1. Combine all the data frames\n \"\"\"", "\"\"\"...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
783035b4b9b3f5d8991fd6a577b630ff9a4e1914
PickBas/meta-social
chat/forms.py
[ "MIT" ]
Python
Meta
Meta class. Getting fields.
Meta class. Getting fields.
[ "Meta", "class", ".", "Getting", "fields", "." ]
class Meta: """ Meta class. Getting fields. """ model = Chat fields = ('base_image', )
[ "class", "Meta", ":", "model", "=", "Chat", "fields", "=", "(", "'base_image'", ",", ")" ]
Meta class.
[ "Meta", "class", "." ]
[ "\"\"\"\n Meta class. Getting fields.\n \"\"\"" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
783035b4b9b3f5d8991fd6a577b630ff9a4e1914
PickBas/meta-social
chat/forms.py
[ "MIT" ]
Python
Meta
Meta class. Getting fields.
Meta class. Getting fields.
[ "Meta", "class", ".", "Getting", "fields", "." ]
class Meta: """ Meta class. Getting fields. """ model = MessageImages fields = ('image',)
[ "class", "Meta", ":", "model", "=", "MessageImages", "fields", "=", "(", "'image'", ",", ")" ]
Meta class.
[ "Meta", "class", "." ]
[ "\"\"\"\n Meta class. Getting fields.\n \"\"\"" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
786957ff51f0aade241bd7bd3541659d809c48dd
pwo/irrd
irrd/scopefilter/validators.py
[ "BSD-2-Clause" ]
Python
ScopeFilterValidator
The scope filter validator validates whether prefixes, ASNs or RPSL objects fall within the configured scope filter.
The scope filter validator validates whether prefixes, ASNs or RPSL objects fall within the configured scope filter.
[ "The", "scope", "filter", "validator", "validates", "whether", "prefixes", "ASNs", "or", "RPSL", "objects", "fall", "within", "the", "configured", "scope", "filter", "." ]
class ScopeFilterValidator: """ The scope filter validator validates whether prefixes, ASNs or RPSL objects fall within the configured scope filter. """ def __init__(self): self.load_filters() def load_filters(self): """ (Re)load the local cache of the configured filters...
[ "class", "ScopeFilterValidator", ":", "def", "__init__", "(", "self", ")", ":", "self", ".", "load_filters", "(", ")", "def", "load_filters", "(", "self", ")", ":", "\"\"\"\n (Re)load the local cache of the configured filters.\n Also called by __init__\n ...
The scope filter validator validates whether prefixes, ASNs or RPSL objects fall within the configured scope filter.
[ "The", "scope", "filter", "validator", "validates", "whether", "prefixes", "ASNs", "or", "RPSL", "objects", "fall", "within", "the", "configured", "scope", "filter", "." ]
[ "\"\"\"\n The scope filter validator validates whether prefixes, ASNs or RPSL\n objects fall within the configured scope filter.\n \"\"\"", "\"\"\"\n (Re)load the local cache of the configured filters.\n Also called by __init__\n \"\"\"", "\"\"\"\n Validate a prefix and/or A...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
789fcdd940662c0ac1e593a1b04be96bee4e4bce
Romansko/MessageU
server/database.py
[ "MIT" ]
Python
Client
Represents a client entry
Represents a client entry
[ "Represents", "a", "client", "entry" ]
class Client: """ Represents a client entry """ def __init__(self, cid, cname, public_key, last_seen): self.ID = bytes.fromhex(cid) # Unique client ID, 16 bytes. self.Name = cname # Client's name, null terminated ascii string, 255 bytes. self.PublicKey = public_key # Client's public ...
[ "class", "Client", ":", "def", "__init__", "(", "self", ",", "cid", ",", "cname", ",", "public_key", ",", "last_seen", ")", ":", "self", ".", "ID", "=", "bytes", ".", "fromhex", "(", "cid", ")", "self", ".", "Name", "=", "cname", "self", ".", "Publ...
Represents a client entry
[ "Represents", "a", "client", "entry" ]
[ "\"\"\" Represents a client entry \"\"\"", "# Unique client ID, 16 bytes.", "# Client's name, null terminated ascii string, 255 bytes.", "# Client's public key, 160 bytes.", "# The Date & time of client's last request.", "\"\"\" Validate Client attributes according to the requirements \"\"\"" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
789fcdd940662c0ac1e593a1b04be96bee4e4bce
Romansko/MessageU
server/database.py
[ "MIT" ]
Python
Message
Represents a message entry
Represents a message entry
[ "Represents", "a", "message", "entry" ]
class Message: """ Represents a message entry """ def __init__(self, to_client, from_client, mtype, content): self.ID = 0 # Message ID, 4 bytes. self.ToClient = to_client # Receiver's unique ID, 16 bytes. self.FromClient = from_client # Sender's unique ID, 16 bytes. self.Type...
[ "class", "Message", ":", "def", "__init__", "(", "self", ",", "to_client", ",", "from_client", ",", "mtype", ",", "content", ")", ":", "self", ".", "ID", "=", "0", "self", ".", "ToClient", "=", "to_client", "self", ".", "FromClient", "=", "from_client", ...
Represents a message entry
[ "Represents", "a", "message", "entry" ]
[ "\"\"\" Represents a message entry \"\"\"", "# Message ID, 4 bytes.", "# Receiver's unique ID, 16 bytes.", "# Sender's unique ID, 16 bytes.", "# Message type, 1 byte.", "# Message's content, Blob.", "\"\"\" Validate Message attributes according to the requirements \"\"\"" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
78af814f45a2e5db390cc508ffe44e7889cbd00d
ur1ove/rl_algorithms
algorithms/her.py
[ "MIT" ]
Python
HER
HER (final strategy). Attributes: desired_states (np.ndarray): desired states reward_func (Callable): returns reward from state, action, next_state
HER (final strategy).
[ "HER", "(", "final", "strategy", ")", "." ]
class HER: """HER (final strategy). Attributes: desired_states (np.ndarray): desired states reward_func (Callable): returns reward from state, action, next_state """ def __init__(self, demo_path: str, reward_func: Callable = default_reward_func): """Initialization. Ar...
[ "class", "HER", ":", "def", "__init__", "(", "self", ",", "demo_path", ":", "str", ",", "reward_func", ":", "Callable", "=", "default_reward_func", ")", ":", "\"\"\"Initialization.\n\n Args:\n demo_path (str): path of demonstration including desired states\n ...
HER (final strategy).
[ "HER", "(", "final", "strategy", ")", "." ]
[ "\"\"\"HER (final strategy).\n\n Attributes:\n desired_states (np.ndarray): desired states\n reward_func (Callable): returns reward from state, action, next_state\n\n \"\"\"", "\"\"\"Initialization.\n\n Args:\n demo_path (str): path of demonstration including desired states\n...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [ { "identifier": "desired_states", "type": null, "docstring": null, "docstring_tokens": [ "None" ], "default": null, "is_optional": false }, { "identifier": "reward_func", "t...
78b41cbc059a33010d5dfcf14fdde10feb7c0be0
mwanakijiji/lbti_altair_fizeau
modules/host_removal.py
[ "MIT" ]
Python
HostRemoval
PCA-decompose a saturated host star PSF and remove it
PCA-decompose a saturated host star PSF and remove it
[ "PCA", "-", "decompose", "a", "saturated", "host", "star", "PSF", "and", "remove", "it" ]
class HostRemoval: ''' PCA-decompose a saturated host star PSF and remove it ''' def __init__(self, n_PCA, outdir, abs_PCA_name, config_data = config): ''' INPUTS: n_PCA: number of principal components to use ...
[ "class", "HostRemoval", ":", "def", "__init__", "(", "self", ",", "n_PCA", ",", "outdir", ",", "abs_PCA_name", ",", "config_data", "=", "config", ")", ":", "'''\n INPUTS:\n n_PCA: number of principal components to use\n outdir: directory to deposit the host...
PCA-decompose a saturated host star PSF and remove it
[ "PCA", "-", "decompose", "a", "saturated", "host", "star", "PSF", "and", "remove", "it" ]
[ "'''\n PCA-decompose a saturated host star PSF and remove it\n '''", "'''\n INPUTS:\n n_PCA: number of principal components to use\n outdir: directory to deposit the host-subtracted images in (this has to be\n defined at the function call because the images may or ...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
78b961a6673ec1e12f8d95c33ef081f75561a87c
AIS-Bonn/sl-cutscenes
sl_cutscenes/object_models.py
[ "MIT" ]
Python
MeshLoader
Class to load the meshes for the objects in a scene.
Class to load the meshes for the objects in a scene.
[ "Class", "to", "load", "the", "meshes", "for", "the", "objects", "in", "a", "scene", "." ]
class MeshLoader: """ Class to load the meshes for the objects in a scene. """ def __init__(self): """Module initializer""" self.base_dir = CONSTANTS.MESH_BASE_DIR self.text_dir = CONSTANTS.TEXT_BASE_DIR self.reset() def reset(self): self.loaded_meshes = [] ...
[ "class", "MeshLoader", ":", "def", "__init__", "(", "self", ")", ":", "\"\"\"Module initializer\"\"\"", "self", ".", "base_dir", "=", "CONSTANTS", ".", "MESH_BASE_DIR", "self", ".", "text_dir", "=", "CONSTANTS", ".", "TEXT_BASE_DIR", "self", ".", "reset", "(", ...
Class to load the meshes for the objects in a scene.
[ "Class", "to", "load", "the", "meshes", "for", "the", "objects", "in", "a", "scene", "." ]
[ "\"\"\"\n Class to load the meshes for the objects in a scene.\n \"\"\"", "\"\"\"Module initializer\"\"\"", "\"\"\" \"\"\"", "\"\"\"\n Loads the meshes whose information is given in parameter 'obj_info.\n Each call of this method APPENDS a list to the loaded_meshes attribute.\n :par...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
78b961a6673ec1e12f8d95c33ef081f75561a87c
AIS-Bonn/sl-cutscenes
sl_cutscenes/object_models.py
[ "MIT" ]
Python
ObjectLoader
Class to load the objects in a scene
Class to load the objects in a scene
[ "Class", "to", "load", "the", "objects", "in", "a", "scene" ]
class ObjectLoader: """ Class to load the objects in a scene """ def __init__(self): """Module initializer""" self.reset() def reset(self): self.instance_idx = 0 self.loaded_objects = dict() @property def static_objects(self): return [obj for obj in...
[ "class", "ObjectLoader", ":", "def", "__init__", "(", "self", ")", ":", "\"\"\"Module initializer\"\"\"", "self", ".", "reset", "(", ")", "def", "reset", "(", "self", ")", ":", "self", ".", "instance_idx", "=", "0", "self", ".", "loaded_objects", "=", "dic...
Class to load the objects in a scene
[ "Class", "to", "load", "the", "objects", "in", "a", "scene" ]
[ "\"\"\"\n Class to load the objects in a scene\n \"\"\"", "\"\"\"Module initializer\"\"\"", "\"\"\"\n Proper object setup\n :param mesh:\n :param object_info:\n :param is_static:\n :param obj_mod: Optional object modifiers, specified with a leading 'mod_'.\n I...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
78b961a6673ec1e12f8d95c33ef081f75561a87c
AIS-Bonn/sl-cutscenes
sl_cutscenes/object_models.py
[ "MIT" ]
Python
DecoratorLoader
Class to add random decorative objects to the scene, which do not participate of the scene dynamics. It is based on creating an occupancy matrix of the scene, finding empty locations and placing stuff there
Class to add random decorative objects to the scene, which do not participate of the scene dynamics. It is based on creating an occupancy matrix of the scene, finding empty locations and placing stuff there
[ "Class", "to", "add", "random", "decorative", "objects", "to", "the", "scene", "which", "do", "not", "participate", "of", "the", "scene", "dynamics", ".", "It", "is", "based", "on", "creating", "an", "occupancy", "matrix", "of", "the", "scene", "finding", ...
class DecoratorLoader: """ Class to add random decorative objects to the scene, which do not participate of the scene dynamics. It is based on creating an occupancy matrix of the scene, finding empty locations and placing stuff there """ def __init__(self, scene): """ Object initializer """...
[ "class", "DecoratorLoader", ":", "def", "__init__", "(", "self", ",", "scene", ")", ":", "\"\"\" Object initializer \"\"\"", "self", ".", "config", "=", "SCENARIO_DEFAULTS", "[", "\"decorator\"", "]", "decorations", "=", "self", ".", "config", "[", "\"decorations\...
Class to add random decorative objects to the scene, which do not participate of the scene dynamics.
[ "Class", "to", "add", "random", "decorative", "objects", "to", "the", "scene", "which", "do", "not", "participate", "of", "the", "scene", "dynamics", "." ]
[ "\"\"\"\n Class to add random decorative objects to the scene, which do not participate of the scene dynamics.\n It is based on creating an occupancy matrix of the scene, finding empty locations and placing stuff there\n \"\"\"", "\"\"\" Object initializer \"\"\"", "\"\"\" Loading an object and adding ...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
78c6d327eeab5125863f64f7fe72c2cd35fb66b0
p-koskey/news-sources
app/models.py
[ "MIT" ]
Python
Source
Source class to define source objects
Source class to define source objects
[ "Source", "class", "to", "define", "source", "objects" ]
class Source: ''' Source class to define source objects ''' def __init__(self,id,name,category): self.id = id self.name = name self.category = category
[ "class", "Source", ":", "def", "__init__", "(", "self", ",", "id", ",", "name", ",", "category", ")", ":", "self", ".", "id", "=", "id", "self", ".", "name", "=", "name", "self", ".", "category", "=", "category" ]
Source class to define source objects
[ "Source", "class", "to", "define", "source", "objects" ]
[ "'''\n Source class to define source objects\n '''" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
78c6d327eeab5125863f64f7fe72c2cd35fb66b0
p-koskey/news-sources
app/models.py
[ "MIT" ]
Python
Article
Article class to define article objects
Article class to define article objects
[ "Article", "class", "to", "define", "article", "objects" ]
class Article: ''' Article class to define article objects ''' def __init__(self, name, author, title, description, link, image, publishDate): self.name = name self.author = author self.title = title self.description = description self.link = link self...
[ "class", "Article", ":", "def", "__init__", "(", "self", ",", "name", ",", "author", ",", "title", ",", "description", ",", "link", ",", "image", ",", "publishDate", ")", ":", "self", ".", "name", "=", "name", "self", ".", "author", "=", "author", "s...
Article class to define article objects
[ "Article", "class", "to", "define", "article", "objects" ]
[ "'''\n Article class to define article objects\n '''" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
78c6d327eeab5125863f64f7fe72c2cd35fb66b0
p-koskey/news-sources
app/models.py
[ "MIT" ]
Python
Top
Top headlines class to define headlines objects
Top headlines class to define headlines objects
[ "Top", "headlines", "class", "to", "define", "headlines", "objects" ]
class Top: ''' Top headlines class to define headlines objects ''' def __init__(self, source, author, title, description, link, image): self.source = source self.author = author self.title = title self.description = description self.link = link self.ima...
[ "class", "Top", ":", "def", "__init__", "(", "self", ",", "source", ",", "author", ",", "title", ",", "description", ",", "link", ",", "image", ")", ":", "self", ".", "source", "=", "source", "self", ".", "author", "=", "author", "self", ".", "title"...
Top headlines class to define headlines objects
[ "Top", "headlines", "class", "to", "define", "headlines", "objects" ]
[ "'''\n Top headlines class to define headlines objects\n '''" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
78cef279b1537217c1a5435db8a4394af5e49d17
lrivallain/openfaas-fn
veba-to-argo-fn/handler/function/handler.py
[ "MIT" ]
Python
ArgoWorflow
The ArgoWorflow provide a way to start an argo WF based on an existing template.
The ArgoWorflow provide a way to start an argo WF based on an existing template.
[ "The", "ArgoWorflow", "provide", "a", "way", "to", "start", "an", "argo", "WF", "based", "on", "an", "existing", "template", "." ]
class ArgoWorflow: """The ArgoWorflow provide a way to start an argo WF based on an existing template. """ def __init__(self): """Initialize the ArgoWorflow """ logger.info("Reading configuration files") logger.info(f"Argo config file > {ARGO_CONFIG}") try: ...
[ "class", "ArgoWorflow", ":", "def", "__init__", "(", "self", ")", ":", "\"\"\"Initialize the ArgoWorflow\n \"\"\"", "logger", ".", "info", "(", "\"Reading configuration files\"", ")", "logger", ".", "info", "(", "f\"Argo config file > {ARGO_CONFIG}\"", ")", "try", ...
The ArgoWorflow provide a way to start an argo WF based on an existing template.
[ "The", "ArgoWorflow", "provide", "a", "way", "to", "start", "an", "argo", "WF", "based", "on", "an", "existing", "template", "." ]
[ "\"\"\"The ArgoWorflow provide a way to start an argo WF based on an existing template.\n \"\"\"", "\"\"\"Initialize the ArgoWorflow\n \"\"\"", "# read mandatory parameters", "# read non-mandatory parameters", "# set a from:veba label", "# add configured labels", "\"\"\"Submit the workflow\n\n...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
15ab59507209a9b7264e3945a7277176ff94124e
sbernasek/flyeye
flyeye/dynamics/visualization.py
[ "MIT" ]
Python
TimeseriesPlot
Object describes a 1D timeseries. Attributes: x (np.ndarray) - independent variable y (np.ndarray) - dependent variable ax (matplotlib.axes.AxesSubplot)
Object describes a 1D timeseries. Attributes. x (np.ndarray) - independent variable y (np.ndarray) - dependent variable
[ "Object", "describes", "a", "1D", "timeseries", ".", "Attributes", ".", "x", "(", "np", ".", "ndarray", ")", "-", "independent", "variable", "y", "(", "np", ".", "ndarray", ")", "-", "dependent", "variable" ]
class TimeseriesPlot: """ Object describes a 1D timeseries. Attributes: x (np.ndarray) - independent variable y (np.ndarray) - dependent variable ax (matplotlib.axes.AxesSubplot) """ def __init__(self, x, y, ax=None): """ Instantiate a 1D timeseries. ...
[ "class", "TimeseriesPlot", ":", "def", "__init__", "(", "self", ",", "x", ",", "y", ",", "ax", "=", "None", ")", ":", "\"\"\"\n Instantiate a 1D timeseries.\n\n Args:\n\n x (np.ndarray) - independent variable\n\n y (np.ndarray) - dependent variab...
Object describes a 1D timeseries.
[ "Object", "describes", "a", "1D", "timeseries", "." ]
[ "\"\"\"\n Object describes a 1D timeseries.\n\n Attributes:\n\n x (np.ndarray) - independent variable\n\n y (np.ndarray) - dependent variable\n\n ax (matplotlib.axes.AxesSubplot)\n\n \"\"\"", "\"\"\"\n Instantiate a 1D timeseries.\n\n Args:\n\n x (np.ndarray)...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
ec6a7aa96ee85f520989ee524c59400757ee3b89
fourstix/Sparkfun_CircuitPython_QwiicJoystick
sparkfun_qwiicjoystick.py
[ "MIT" ]
Python
Sparkfun_QwiicJoystick
CircuitPython class for the Sparkfun QwiicJoystick Usage: # import the CircuitPython board and busio libraries import board import busio # Create bus object using the board's I2C port i2c = busio.I2C(board.SCL, board.SDA) joystick = QwiicJoystick(i2c) # default address is 0x20 # us...
CircuitPython class for the Sparkfun QwiicJoystick Usage. import the CircuitPython board and busio libraries import board import busio Create bus object using the board's I2C port i2c = busio.I2C(board.SCL, board.SDA) joystick = QwiicJoystick(i2c) # default address is 0x20 use QwiicJoystick(i2c, address) for a di...
[ "CircuitPython", "class", "for", "the", "Sparkfun", "QwiicJoystick", "Usage", ".", "import", "the", "CircuitPython", "board", "and", "busio", "libraries", "import", "board", "import", "busio", "Create", "bus", "object", "using", "the", "board", "'", "s", "I2C", ...
class Sparkfun_QwiicJoystick: """CircuitPython class for the Sparkfun QwiicJoystick Usage: # import the CircuitPython board and busio libraries import board import busio # Create bus object using the board's I2C port i2c = busio.I2C(board.SCL, board.SDA) joystick = QwiicJoystick(i2c)...
[ "class", "Sparkfun_QwiicJoystick", ":", "def", "__init__", "(", "self", ",", "i2c", ",", "address", "=", "QWIIC_JOYSTICK_ADDR", ",", "debug", "=", "False", ")", ":", "\"\"\"Initialize Qwiic Joystick for i2c communication.\"\"\"", "self", ".", "_device", "=", "I2CDevic...
CircuitPython class for the Sparkfun QwiicJoystick Usage:
[ "CircuitPython", "class", "for", "the", "Sparkfun", "QwiicJoystick", "Usage", ":" ]
[ "\"\"\"CircuitPython class for the Sparkfun QwiicJoystick\n Usage:\n\n # import the CircuitPython board and busio libraries\n\n import board\n import busio\n\n # Create bus object using the board's I2C port\n i2c = busio.I2C(board.SCL, board.SDA)\n\n joystick = QwiicJoystick(i2c) # default add...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
ecaac8c49f868073f9f6b89fcb22c74fdb9c6a04
benhid/d4s
d4s/storage.py
[ "MIT" ]
Python
Item
Class representing store hub files.
Class representing store hub files.
[ "Class", "representing", "store", "hub", "files", "." ]
class Item: """ Class representing store hub files. """ def __init__(self, id: str, base_url: str): self.id = id self.base_url = base_url @cached_property def public_url(self): """ Get public url from item in workspace. """ url = f'{self.base_url}/worksp...
[ "class", "Item", ":", "def", "__init__", "(", "self", ",", "id", ":", "str", ",", "base_url", ":", "str", ")", ":", "self", ".", "id", "=", "id", "self", ".", "base_url", "=", "base_url", "@", "cached_property", "def", "public_url", "(", "self", ")",...
Class representing store hub files.
[ "Class", "representing", "store", "hub", "files", "." ]
[ "\"\"\"\n Class representing store hub files.\n \"\"\"", "\"\"\" Get public url from item in workspace.\n \"\"\"", "# for some reason, the response returns an url with surrounding quote marks" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
ecb3d6f73859938d78658fa282749298aab75d9d
darthryking/VMFMergeTool
gui.py
[ "BSD-3-Clause" ]
Python
VMFCache
An expandable-size cache for VMFs. This lets us skip the load process for VMFs that we've already loaded before, which is helpful for VMFs that take a long time to parse.
An expandable-size cache for VMFs. This lets us skip the load process for VMFs that we've already loaded before, which is helpful for VMFs that take a long time to parse.
[ "An", "expandable", "-", "size", "cache", "for", "VMFs", ".", "This", "lets", "us", "skip", "the", "load", "process", "for", "VMFs", "that", "we", "'", "ve", "already", "loaded", "before", "which", "is", "helpful", "for", "VMFs", "that", "take", "a", "...
class VMFCache: """ An expandable-size cache for VMFs. This lets us skip the load process for VMFs that we've already loaded before, which is helpful for VMFs that take a long time to parse. """ def __init__(self): self.maxSize = 1 self.data = {} self.unusedPaths = ...
[ "class", "VMFCache", ":", "def", "__init__", "(", "self", ")", ":", "self", ".", "maxSize", "=", "1", "self", ".", "data", "=", "{", "}", "self", ".", "unusedPaths", "=", "set", "(", ")", "self", ".", "pendingUnusedPaths", "=", "set", "(", ")", "se...
An expandable-size cache for VMFs.
[ "An", "expandable", "-", "size", "cache", "for", "VMFs", "." ]
[ "\"\"\" An expandable-size cache for VMFs. This lets us skip the load process\n for VMFs that we've already loaded before, which is helpful for VMFs that\n take a long time to parse.\n \n \"\"\"", "''' Increases the max size of the cache to the given number.\n If the requested max size is less ...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
ecc09f1629ed770a0be9fae5c249608721a3c6c2
mithem/helix-cli
statehandler.py
[ "MIT" ]
Python
StateHandler
utilities commonly used when working with states
utilities commonly used when working with states
[ "utilities", "commonly", "used", "when", "working", "with", "states" ]
class StateHandler: """utilities commonly used when working with states""" def getDateString(date): """returns iso-date-string of specified date""" return str(f"{date.year}-{date.month}-{date.day}") def getAppropriateState(title): """returns appropriate state depending of due_date a...
[ "class", "StateHandler", ":", "def", "getDateString", "(", "date", ")", ":", "\"\"\"returns iso-date-string of specified date\"\"\"", "return", "str", "(", "f\"{date.year}-{date.month}-{date.day}\"", ")", "def", "getAppropriateState", "(", "title", ")", ":", "\"\"\"returns ...
utilities commonly used when working with states
[ "utilities", "commonly", "used", "when", "working", "with", "states" ]
[ "\"\"\"utilities commonly used when working with states\"\"\"", "\"\"\"returns iso-date-string of specified date\"\"\"", "\"\"\"returns appropriate state depending of due_date and deadline\"\"\"" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
ecd45ebb5de12537c1bdbc107787ed72f93490f1
lnros/real-estate-web-scraping
config.py
[ "MIT" ]
Python
DBConfig
Holds the DB parameters for the web scraping.
Holds the DB parameters for the web scraping.
[ "Holds", "the", "DB", "parameters", "for", "the", "web", "scraping", "." ]
class DBConfig: """ Holds the DB parameters for the web scraping. """ HOST = "localhost" USER = "root" PASSWORD = "password" # not real password, change after pulling this file DATABASE = "brbeky1hybvf32t4ufxz" INSERT_CITY_QUERY = "INSERT IGNORE INTO cities(city_name) values (%s)" I...
[ "class", "DBConfig", ":", "HOST", "=", "\"localhost\"", "USER", "=", "\"root\"", "PASSWORD", "=", "\"password\"", "DATABASE", "=", "\"brbeky1hybvf32t4ufxz\"", "INSERT_CITY_QUERY", "=", "\"INSERT IGNORE INTO cities(city_name) values (%s)\"", "INSERT_LISTINGS_QUERY", "=", "\"IN...
Holds the DB parameters for the web scraping.
[ "Holds", "the", "DB", "parameters", "for", "the", "web", "scraping", "." ]
[ "\"\"\"\n Holds the DB parameters for the web scraping.\n \"\"\"", "# not real password, change after pulling this file" ]
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
ecd45ebb5de12537c1bdbc107787ed72f93490f1
lnros/real-estate-web-scraping
config.py
[ "MIT" ]
Python
Configuration
Holds the user parameters for the web scraping.
Holds the user parameters for the web scraping.
[ "Holds", "the", "user", "parameters", "for", "the", "web", "scraping", "." ]
class Configuration: """ Holds the user parameters for the web scraping. """ # class attr args = None # PARAMETERS KWARGS KEYS VERBOSE_KEY = 'verbose' LIMIT_KEY = 'limit' PRINT_KEY = 'to_print' SAVE_KEY = 'save' DB_KEY = 'to_database' FETCH_KEY = 'fetch_info' LISTIN...
[ "class", "Configuration", ":", "args", "=", "None", "VERBOSE_KEY", "=", "'verbose'", "LIMIT_KEY", "=", "'limit'", "PRINT_KEY", "=", "'to_print'", "SAVE_KEY", "=", "'save'", "DB_KEY", "=", "'to_database'", "FETCH_KEY", "=", "'fetch_info'", "LISTING_TYPE_KEY", "=", ...
Holds the user parameters for the web scraping.
[ "Holds", "the", "user", "parameters", "for", "the", "web", "scraping", "." ]
[ "\"\"\"\n Holds the user parameters for the web scraping.\n \"\"\"", "# class attr", "# PARAMETERS KWARGS KEYS", "# CONSTANTS FOR SCRAPING", "# INDICES FOR PARSING", "# XPATHS AND SELENIUM COMMANDS", "# Handling strings", "# DF columns names", "\"\"\"\n Creates the command line argument...
[]
{ "returns": [], "raises": [], "params": [], "outlier_params": [], "others": [] }
End of preview.

logo

The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generation

Dataset Summary

The Vault dataset is a comprehensive, large-scale, multilingual parallel dataset that features high-quality code-text pairs derived from The Stack, the largest permissively-licensed source code dataset.

We provide The Vault which contains code snippets from 10 popular programming languages such as Java, JavaScript, Python, Ruby, Rust, Golang, C#, C++, C, and PHP. This dataset provides multiple code-snippet levels, metadata, and 11 docstring styles for enhanced usability and versatility.

Supported Tasks

The Vault can be used for pretraining LLMs or downstream code-text interaction tasks. A number of tasks related to code understanding and geneartion can be constructed using The Vault such as code summarization, text-to-code generation and code search.

Languages

The natural language text (docstring) is in English.

10 programming languages are supported in The Vault: Python, Java, JavaScript, PHP, C, C#, C++, Go, Ruby, Rust

Note: C and Go are not contained in this repo due to the nonexistence of traditional classes in these languages.

Dataset Structure

Data Instances

{
    "hexsha": "78b961a6673ec1e12f8d95c33ef081f75561a87c",
    "repo": "AIS-Bonn/sl-cutscenes",
    "path": "sl_cutscenes/object_models.py",
    "license": [
        "MIT"
    ],
    "language": "Python",
    "identifier": "MeshLoader",
    "original_docstring": "\n    Class to load the meshes for the objects in a scene.\n    ",
    "docstring": "Class to load the meshes for the objects in a scene.",
    "docstring_tokens": [
        "Class",
        "to",
        "load",
        "the",
        "meshes",
        "for",
        "the",
        "objects",
        "in",
        "a",
        "scene",
        "."
    ],
    "code": "class MeshLoader:\n    \"\"\"\n    Class to load the meshes for the objects in a scene.\n    \"\"\"\n\n    def __init__(self):\n        \"\"\"Module initializer\"\"\"\n        self.base_dir = CONSTANTS.MESH_BASE_DIR\n        self.text_dir = CONSTANTS.TEXT_BASE_DIR\n        self.reset()\n\n    def reset(self):\n        self.loaded_meshes = []\n\n    def get_meshes(self):\n        \"\"\" \"\"\"\n        extract_singular = lambda x: x[0] if len(x) == 1 else x\n        return [extract_singular(item) for item in self.loaded_meshes]\n\n    def load_meshes(self, obj_info: List[object_info.ObjectInfo], **kwargs):\n        \"\"\"\n        Loads the meshes whose information is given in parameter 'obj_info.\n        Each call of this method APPENDS a list to the loaded_meshes attribute.\n        :param obj_info: The object information of the meshes to be loaded.\n        :param kwargs: additional mesh modifiers such as scale, specified with a leading 'mod_'\n        \"\"\"\n        paths = []\n        for obj in obj_info:\n            path = self.text_dir if obj.name.endswith(\"_floor\") or obj.name.endswith(\"_wall\") else self.base_dir\n            paths.append((path / obj.mesh_fp).resolve())\n        scales = [obj.scale for obj in obj_info]\n        class_ids = [obj.class_id for obj in obj_info]\n        mod_scales = kwargs.get(\"mod_scale\", [1.0] * len(scales))\n        scales = [s * ms for (s, ms) in zip(scales, mod_scales)]\n        flags = [mesh_flags(obj) for obj in obj_info]\n        meshes = sl.Mesh.load_threaded(filenames=paths, flags=flags)\n\n        # Setup class IDs\n        for _, (mesh, scale, class_id) in enumerate(zip(meshes, scales, class_ids)):\n            pt = torch.eye(4)\n            pt[:3, :3] *= scale\n            mesh.pretransform = pt\n            mesh.class_index = class_id\n\n        info_mesh_tuples = list(zip(obj_info, meshes))\n        self.loaded_meshes.append(info_mesh_tuples)",
    "code_tokens": [
        "class",
        "MeshLoader",
        ":",
        "def",
        "__init__",
        "(",
        "self",
        ")",
        ":",
        "\"\"\"Module initializer\"\"\"",
        "self",
        ".",
        "base_dir",
        "=",
        "CONSTANTS",
        ".",
        "MESH_BASE_DIR",
        "self",
        ".",
        "text_dir",
        "=",
        "CONSTANTS",
        ".",
        "TEXT_BASE_DIR",
        "self",
        ".",
        "reset",
        "(",
        ")",
        "def",
        "reset",
        "(",
        "self",
        ")",
        ":",
        "self",
        ".",
        "loaded_meshes",
        "=",
        "[",
        "]",
        "def",
        "get_meshes",
        "(",
        "self",
        ")",
        ":",
        "\"\"\" \"\"\"",
        "extract_singular",
        "=",
        "lambda",
        "x",
        ":",
        "x",
        "[",
        "0",
        "]",
        "if",
        "len",
        "(",
        "x",
        ")",
        "==",
        "1",
        "else",
        "x",
        "return",
        "[",
        "extract_singular",
        "(",
        "item",
        ")",
        "for",
        "item",
        "in",
        "self",
        ".",
        "loaded_meshes",
        "]",
        "def",
        "load_meshes",
        "(",
        "self",
        ",",
        "obj_info",
        ":",
        "List",
        "[",
        "object_info",
        ".",
        "ObjectInfo",
        "]",
        ",",
        "**",
        "kwargs",
        ")",
        ":",
        "\"\"\"\n        Loads the meshes whose information is given in parameter 'obj_info.\n        Each call of this method APPENDS a list to the loaded_meshes attribute.\n        :param obj_info: The object information of the meshes to be loaded.\n        :param kwargs: additional mesh modifiers such as scale, specified with a leading 'mod_'\n        \"\"\"",
        "paths",
        "=",
        "[",
        "]",
        "for",
        "obj",
        "in",
        "obj_info",
        ":",
        "path",
        "=",
        "self",
        ".",
        "text_dir",
        "if",
        "obj",
        ".",
        "name",
        ".",
        "endswith",
        "(",
        "\"_floor\"",
        ")",
        "or",
        "obj",
        ".",
        "name",
        ".",
        "endswith",
        "(",
        "\"_wall\"",
        ")",
        "else",
        "self",
        ".",
        "base_dir",
        "paths",
        ".",
        "append",
        "(",
        "(",
        "path",
        "/",
        "obj",
        ".",
        "mesh_fp",
        ")",
        ".",
        "resolve",
        "(",
        ")",
        ")",
        "scales",
        "=",
        "[",
        "obj",
        ".",
        "scale",
        "for",
        "obj",
        "in",
        "obj_info",
        "]",
        "class_ids",
        "=",
        "[",
        "obj",
        ".",
        "class_id",
        "for",
        "obj",
        "in",
        "obj_info",
        "]",
        "mod_scales",
        "=",
        "kwargs",
        ".",
        "get",
        "(",
        "\"mod_scale\"",
        ",",
        "[",
        "1.0",
        "]",
        "*",
        "len",
        "(",
        "scales",
        ")",
        ")",
        "scales",
        "=",
        "[",
        "s",
        "*",
        "ms",
        "for",
        "(",
        "s",
        ",",
        "ms",
        ")",
        "in",
        "zip",
        "(",
        "scales",
        ",",
        "mod_scales",
        ")",
        "]",
        "flags",
        "=",
        "[",
        "mesh_flags",
        "(",
        "obj",
        ")",
        "for",
        "obj",
        "in",
        "obj_info",
        "]",
        "meshes",
        "=",
        "sl",
        ".",
        "Mesh",
        ".",
        "load_threaded",
        "(",
        "filenames",
        "=",
        "paths",
        ",",
        "flags",
        "=",
        "flags",
        ")",
        "for",
        "_",
        ",",
        "(",
        "mesh",
        ",",
        "scale",
        ",",
        "class_id",
        ")",
        "in",
        "enumerate",
        "(",
        "zip",
        "(",
        "meshes",
        ",",
        "scales",
        ",",
        "class_ids",
        ")",
        ")",
        ":",
        "pt",
        "=",
        "torch",
        ".",
        "eye",
        "(",
        "4",
        ")",
        "pt",
        "[",
        ":",
        "3",
        ",",
        ":",
        "3",
        "]",
        "*=",
        "scale",
        "mesh",
        ".",
        "pretransform",
        "=",
        "pt",
        "mesh",
        ".",
        "class_index",
        "=",
        "class_id",
        "info_mesh_tuples",
        "=",
        "list",
        "(",
        "zip",
        "(",
        "obj_info",
        ",",
        "meshes",
        ")",
        ")",
        "self",
        ".",
        "loaded_meshes",
        ".",
        "append",
        "(",
        "info_mesh_tuples",
        ")"
    ],
    "short_docstring": "Class to load the meshes for the objects in a scene.",
    "short_docstring_tokens": [
        "Class",
        "to",
        "load",
        "the",
        "meshes",
        "for",
        "the",
        "objects",
        "in",
        "a",
        "scene",
        "."
    ],
    "comment": [
        "\"\"\"\n    Class to load the meshes for the objects in a scene.\n    \"\"\"",
        "\"\"\"Module initializer\"\"\"",
        "\"\"\" \"\"\"",
        "\"\"\"\n        Loads the meshes whose information is given in parameter 'obj_info.\n        Each call of this method APPENDS a list to the loaded_meshes attribute.\n        :param obj_info: The object information of the meshes to be loaded.\n        :param kwargs: additional mesh modifiers such as scale, specified with a leading 'mod_'\n        \"\"\"",
        "# Setup class IDs"
    ],
    "parameters": [],
    "docstring_params": {
        "returns": [],
        "raises": [],
        "params": [],
        "outlier_params": [],
        "others": []
    }
}

Data Fields

Data fields for function level:

  • hexsha (string): the unique git hash of file
  • repo (string): the owner/repo
  • path (string): the full path to the original file
  • license (list): licenses in the repo
  • language (string): the programming language
  • identifier (string): the function or method name
  • original_string (string): original version of function/class node
  • original_docstring (string): the raw string before tokenization or parsing
  • code (string): the part of the original that is code
  • code_tokens (list): tokenized version of code
  • short_docstring (string): short, brief summarization (first line of the docstring)
  • short_docstring_tokens (list): tokenized version of `short_docstring
  • docstring (string): the top-level comment or docstring (docstring version without param’s doc, return, exception fields, etc)
  • docstring_tokens (list): tokenized version of docstring
  • comment (list): list of comments (line) inside the function/class
  • parameters (list): List of parameters and its type (type can be None)
  • docstring_params (dict): Dictionary of the parsed information from docstring

See here for more details and examples.

Data Splits

In this repo, the class level data is not split, and contained in only train set.

Dataset Statistics

Language Number of samples
Python 422,187
Java 4,872,485
JavaScript 291,479
PHP 1,173,916
C# 1,437,800
C++ 174,370
Ruby 353,859
Rust 93,311
C -
Go -
TOTAL 9,121,300

Usage

You can load The Vault dataset using datasets library: pip install datasets

from datasets import load_dataset

# Load full class level dataset
dataset = load_dataset("Fsoft-AIC/the-vault-class")

# specific language (e.g. Python) 
dataset = load_dataset("Fsoft-AIC/the-vault-class", languages=['Python'])

# dataset streaming
data = load_dataset("Fsoft-AIC/the-vault-class", streaming= True)
for sample in iter(data['train']): 
    print(sample)

A back up dataset can be downloaded in azure storage. See Download The Vault from Azure blob storage.

Additional information

Licensing Information

MIT License

Citation Information

@article{manh2023vault,
  title={The Vault: A Comprehensive Multilingual Dataset for Advancing Code Understanding and Generation},
  author={Manh, Dung Nguyen and Hai, Nam Le and Dau, Anh TV and Nguyen, Anh Minh and Nghiem, Khanh and Guo, Jin and Bui, Nghi DQ},
  journal={arXiv preprint arXiv:2305.06156},
  year={2023}
}

Contributions

This dataset is developed by FSOFT AI4Code team.

Downloads last month
952

Collection including Fsoft-AIC/the-vault-class

Paper for Fsoft-AIC/the-vault-class