uid
stringlengths
24
24
split
stringclasses
1 value
category
stringclasses
2 values
content
stringlengths
5
482k
signature
stringlengths
1
14k
suffix
stringlengths
1
482k
prefix
stringlengths
9
14k
prefix_token_count
int64
3
5.01k
prefix_token_budget
int64
64
256
element_token_count
int64
1
292k
signature_token_count
int64
1
5.01k
prefix_context_token_count
int64
0
255
repo
stringlengths
7
112
path
stringlengths
4
208
language
stringclasses
1 value
name
stringlengths
1
218
qualname
stringlengths
1
218
start_line
int64
1
26.7k
end_line
int64
1
26.7k
signature_start_line
int64
1
26.7k
signature_end_line
int64
1
26.7k
source_hash
stringlengths
40
40
source_dataset
stringclasses
1 value
source_split
stringclasses
1 value
ab40aae9944373117464130b
train
function
def setup(*args, **kwargs): from setuptools import setup try: setup(*args, **kwargs) except KeyboardInterrupt: raise except SystemExit: raise except Exception: print(DASH_SEPARATOR) print("Sorry, your build failed. Try rerunning configure.py with " ...
def setup(*args, **kwargs):
from setuptools import setup try: setup(*args, **kwargs) except KeyboardInterrupt: raise except SystemExit: raise except Exception: print(DASH_SEPARATOR) print("Sorry, your build failed. Try rerunning configure.py with " "different options.") ...
time import sleep while delay: sys.stdout.write("Continuing in %d seconds... \r" % delay) sys.stdout.flush() delay -= 1 sleep(1) print("") DASH_SEPARATOR = 75 * "-" def setup(*args, **kwargs):
63
64
81
8
55
kanderso-nrel/pyopencl
aksetup_helper.py
Python
setup
setup
28
41
28
28
93fbba985f6aff6c374a96f5c7bd778af8d84fbe
bigcode/the-stack
train
cf575373917025233d8d34cb
train
function
def _run_git_command(cmd): git_error = None from subprocess import Popen, PIPE stdout = None try: popen = Popen(["git"] + cmd, stdout=PIPE) stdout, stderr = popen.communicate() if popen.returncode != 0: git_error = "git returned error code %d: %s" % (popen.returncode,...
def _run_git_command(cmd):
git_error = None from subprocess import Popen, PIPE stdout = None try: popen = Popen(["git"] + cmd, stdout=PIPE) stdout, stderr = popen.communicate() if popen.returncode != 0: git_error = "git returned error code %d: %s" % (popen.returncode, stderr) except OSError...
(2, "# %s\n" % (" ".join(sys.argv))) with open(fname, "w") as outf: outf.write("".join(new_lines)) from os import stat, chmod infile_stat_res = stat(fname_in) chmod(fname, infile_stat_res.st_mode) # {{{ git bits def _run_git_command(cmd):
74
74
248
7
66
kanderso-nrel/pyopencl
aksetup_helper.py
Python
_run_git_command
_run_git_command
768
795
768
768
b6a9ff0a11f68468be2d8848846cf34dfb36d889
bigcode/the-stack
train
38f057d37c0e98a1f934b70d
train
class
class BoostLibraries(Libraries): def __init__(self, lib_base_name, default_lib_name=None): if default_lib_name is None: if lib_base_name == "python": default_lib_name = "boost_python-py%d%d" % sys.version_info[:2] else: default_lib_name = "boost_%s" % ...
class BoostLibraries(Libraries):
def __init__(self, lib_base_name, default_lib_name=None): if default_lib_name is None: if lib_base_name == "python": default_lib_name = "boost_python-py%d%d" % sys.version_info[:2] else: default_lib_name = "boost_%s" % lib_base_name Libraries....
ListOption.__init__(self, "%s_LIBNAME" % lib_name, default, help=help or ("Library names for %s (without lib or .so)" % (human_name or humanize(lib_name)))) # }}} # {{{ configure options for specific software class BoostLibraries(Libraries):
64
64
128
6
57
kanderso-nrel/pyopencl
aksetup_helper.py
Python
BoostLibraries
BoostLibraries
539
550
539
539
70e4af174e7d0697a2ec72a63131a49e4b75cbb8
bigcode/the-stack
train
cadc9382018e874b94c113bb
train
class
class IncludeDir(StringListOption): def __init__(self, lib_name, default=None, human_name=None, help=None): StringListOption.__init__(self, "%s_INC_DIR" % lib_name, default, help=help or ("Include directories for %s" % (human_name or humanize(lib_name))))
class IncludeDir(StringListOption):
def __init__(self, lib_name, default=None, human_name=None, help=None): StringListOption.__init__(self, "%s_INC_DIR" % lib_name, default, help=help or ("Include directories for %s" % (human_name or humanize(lib_name))))
else: if opt: import re sep = re.compile(r"(?<!\\),") result = sep.split(opt) result = [i.replace(r"\,", ",") for i in result] return result else: return [] class IncludeDir(StringListOption):...
63
64
70
7
56
kanderso-nrel/pyopencl
aksetup_helper.py
Python
IncludeDir
IncludeDir
514
518
514
514
2f625764ee37b31d95644c2bbebd5efaeea7cccd
bigcode/the-stack
train
e75c2f4948bb8a8ca008bd2a
train
function
def make_boost_base_options(): return [ IncludeDir("BOOST", []), LibraryDir("BOOST", []), Option("BOOST_COMPILER", default="gcc43", help="The compiler with which Boost C++ was compiled, e.g. gcc43"), ]
def make_boost_base_options():
return [ IncludeDir("BOOST", []), LibraryDir("BOOST", []), Option("BOOST_COMPILER", default="gcc43", help="The compiler with which Boost C++ was compiled, e.g. gcc43"), ]
elif boost_chrono == "header_only": defines["BOOST_CHRONO_HEADER_ONLY"] = 1 else: raise ValueError("invalid value of 'boost_chrono'") return (source_files, defines) else: return [], {} def make_boost_base_options():
63
64
59
7
56
kanderso-nrel/pyopencl
aksetup_helper.py
Python
make_boost_base_options
make_boost_base_options
654
660
654
654
f614f543c7846dbeb0b003041bf6508b707f2b11
bigcode/the-stack
train
8a0a75e77565d56255faa4f0
train
class
class LibraryDir(StringListOption): def __init__(self, lib_name, default=None, human_name=None, help=None): StringListOption.__init__(self, "%s_LIB_DIR" % lib_name, default, help=help or ("Library directories for %s" % (human_name or humanize(lib_name))))
class LibraryDir(StringListOption):
def __init__(self, lib_name, default=None, human_name=None, help=None): StringListOption.__init__(self, "%s_LIB_DIR" % lib_name, default, help=help or ("Library directories for %s" % (human_name or humanize(lib_name))))
lib_name, default=None, human_name=None, help=None): StringListOption.__init__(self, "%s_INC_DIR" % lib_name, default, help=help or ("Include directories for %s" % (human_name or humanize(lib_name)))) class LibraryDir(StringListOption):
63
64
70
7
56
kanderso-nrel/pyopencl
aksetup_helper.py
Python
LibraryDir
LibraryDir
521
525
521
521
1b400a1a37ac29cb8713561dfc53531e6931c5d8
bigcode/the-stack
train
f350258a04d4fea1fea4adb1
train
function
def has_flag(compiler, flagname): """Return a boolean indicating whether a flag name is supported on the specified compiler. """ import tempfile with tempfile.NamedTemporaryFile("w", suffix=".cpp", delete=False) as f: f.write("int main (int argc, char **argv) { return 0; }") fname = ...
def has_flag(compiler, flagname):
"""Return a boolean indicating whether a flag name is supported on the specified compiler. """ import tempfile with tempfile.NamedTemporaryFile("w", suffix=".cpp", delete=False) as f: f.write("int main (int argc, char **argv) { return 0; }") fname = f.name import setuptools ...
def __str__(self): import pybind11 return pybind11.get_include(self.user) # As of Python 3.6, CCompiler has a `has_flag` method. # cf http://bugs.python.org/issue26689 def has_flag(compiler, flagname):
64
64
118
9
54
kanderso-nrel/pyopencl
aksetup_helper.py
Python
has_flag
has_flag
918
933
918
918
ff7ec75ddc28fb8174fde561ad6ecd413ca8f9ab
bigcode/the-stack
train
6df5bbe1778157e423aa058b
train
class
class Libraries(StringListOption): def __init__(self, lib_name, default=None, human_name=None, help=None): StringListOption.__init__(self, "%s_LIBNAME" % lib_name, default, help=help or ("Library names for %s (without lib or .so)" % (human_name or humanize(lib_name))))
class Libraries(StringListOption):
def __init__(self, lib_name, default=None, human_name=None, help=None): StringListOption.__init__(self, "%s_LIBNAME" % lib_name, default, help=help or ("Library names for %s (without lib or .so)" % (human_name or humanize(lib_name))))
, lib_name, default=None, human_name=None, help=None): StringListOption.__init__(self, "%s_LIB_DIR" % lib_name, default, help=help or ("Library directories for %s" % (human_name or humanize(lib_name)))) class Libraries(StringListOption):
63
64
75
6
57
kanderso-nrel/pyopencl
aksetup_helper.py
Python
Libraries
Libraries
528
532
528
528
588ef6e3eecfd12cf8fc2ee2f406b22e10a6eb7c
bigcode/the-stack
train
b56dcd4988255a4a429fc501
train
function
def get_config(schema=None, warn_about_no_config=True): if schema is None: from setup import get_config_schema schema = get_config_schema() if (not schema.have_config() and not schema.have_global_config() and warn_about_no_config): print("************************************...
def get_config(schema=None, warn_about_no_config=True):
if schema is None: from setup import get_config_schema schema = get_config_schema() if (not schema.have_config() and not schema.have_global_config() and warn_about_no_config): print("*************************************************************") print("*** I have de...
: for j in sublist: yield j def humanize(sym_str): words = sym_str.lower().replace("_", " ").split(" ") return " ".join([word.capitalize() for word in words]) # }}} # {{{ siteconf handling def get_config(schema=None, warn_about_no_config=True):
68
68
229
12
55
kanderso-nrel/pyopencl
aksetup_helper.py
Python
get_config
get_config
127
153
127
127
678a070a4e7690a35231a3fbc977a93d19d8a4ee
bigcode/the-stack
train
9a31163dac756e0ac5241b75
train
function
def expand_str(s, options): import re def my_repl(match): sym = match.group(1) try: repl = options[sym] except KeyError: from os import environ repl = environ[sym] return expand_str(repl, options) return re.subn(r"\$\{([a-zA-Z0-9_]+)\}",...
def expand_str(s, options):
import re def my_repl(match): sym = match.group(1) try: repl = options[sym] except KeyError: from os import environ repl = environ[sym] return expand_str(repl, options) return re.subn(r"\$\{([a-zA-Z0-9_]+)\}", my_repl, s)[0]
.split(), ["-Wl,-O"]) cvars[varname] = str.join(" ", ldsharedflags) # }}} # {{{ configure guts def default_or(a, b): if a is None: return b else: return a def expand_str(s, options):
64
64
92
7
56
kanderso-nrel/pyopencl
aksetup_helper.py
Python
expand_str
expand_str
219
232
219
219
c586e549e2ff29c4beeee2c4522e962198dad390
bigcode/the-stack
train
177a5243f9e5bf7f458c2495
train
function
def substitute(substitutions, fname): import re var_re = re.compile(r"\$\{([A-Za-z_0-9]+)\}") string_var_re = re.compile(r"\$str\{([A-Za-z_0-9]+)\}") fname_in = fname+".in" with open(fname_in, "r") as inf: lines = inf.readlines() new_lines = [] for line in lines: made_chang...
def substitute(substitutions, fname):
import re var_re = re.compile(r"\$\{([A-Za-z_0-9]+)\}") string_var_re = re.compile(r"\$str\{([A-Za-z_0-9]+)\}") fname_in = fname+".in" with open(fname_in, "r") as inf: lines = inf.readlines() new_lines = [] for line in lines: made_change = True while made_change: ...
.get_from_configparser(options) schema.write_config(config) if options.update_user: schema.update_user_config(config) if options.update_global: schema.update_global_config(config) import os if os.access("Makefile.in", os.F_OK): substs = schema.make_substitutions(config) ...
101
101
337
8
93
kanderso-nrel/pyopencl
aksetup_helper.py
Python
substitute
substitute
720
763
720
720
925188d18e18217f501d1494f0f4f3b613e8e90d
bigcode/the-stack
train
3b8e2724b013f1c373827aa4
train
class
class Option(object): def __init__(self, name, default=None, help=None): self.name = name self.default = default self.help = help def as_option(self): return self.name.lower().replace("_", "-") def metavar(self): last_underscore = self.name.rfind("_") return...
class Option(object):
def __init__(self, name, default=None, help=None): self.name = name self.default = default self.help = help def as_option(self): return self.name.lower().replace("_", "-") def metavar(self): last_underscore = self.name.rfind("_") return self.name[last_unders...
value is not None: outf.write("%s = %s\n" % (opt.name, repr(config[opt.name]))) outf.close() def make_substitutions(self, config): return dict((opt.name, opt.value_to_str(config[opt.name])) for opt in self.options) class Option(object):
67
67
226
4
63
kanderso-nrel/pyopencl
aksetup_helper.py
Python
Option
Option
430
462
430
430
7caa19b82b34fa5e9bdc088d7f8c1f443be7ebac
bigcode/the-stack
train
ab14c24493abeb890942ab2e
train
class
class StringListOption(Option): def value_to_str(self, default): if default is None: return None return ",".join([str(el).replace(",", r"\,") for el in default]) def get_help(self, default): return Option.get_help(self, default) + " (several ok)" def take_from_configpa...
class StringListOption(Option):
def value_to_str(self, default): if default is None: return None return ",".join([str(el).replace(",", r"\,") for el in default]) def get_help(self, default): return Option.get_help(self, default) + " (several ok)" def take_from_configparser(self, options): opt...
no-" + option_name action = "store_false" else: action = "store_true" parser.add_option( "--" + option_name, dest=self.name, help=self.get_help(default), default=default, action=action) class StringListOption(Option):
64
64
155
7
57
kanderso-nrel/pyopencl
aksetup_helper.py
Python
StringListOption
StringListOption
489
511
489
489
eb5fbff02de61354b345276e9af0089d600eecbb
bigcode/the-stack
train
7a4ff557502cf42e82553460
train
class
class ConfigSchema: def __init__(self, options, conf_file="siteconf.py", conf_dir="."): self.optdict = dict((opt.name, opt) for opt in options) self.options = options self.conf_dir = conf_dir self.conf_file = conf_file from os.path import expanduser self.user_conf_fi...
class ConfigSchema:
def __init__(self, options, conf_file="siteconf.py", conf_dir="."): self.optdict = dict((opt.name, opt) for opt in options) self.options = options self.conf_dir = conf_dir self.conf_file = conf_file from os.path import expanduser self.user_conf_file = expanduser("~/....
["-Wl,-O"]) cvars[varname] = str.join(" ", ldsharedflags) # }}} # {{{ configure guts def default_or(a, b): if a is None: return b else: return a def expand_str(s, options): import re def my_repl(match): sym = match.group(1) try: rep...
256
256
1,119
4
252
kanderso-nrel/pyopencl
aksetup_helper.py
Python
ConfigSchema
ConfigSchema
258
427
258
258
ff72dc4c2f2dff62ef9ecd81a853f9234a9de415
bigcode/the-stack
train
2900e7f1a2b334a43cf3c11e
train
function
def get_numpy_incpath(): from imp import find_module # avoid actually importing numpy, it screws up distutils file, pathname, descr = find_module("numpy") from os.path import join return join(pathname, "core", "include")
def get_numpy_incpath():
from imp import find_module # avoid actually importing numpy, it screws up distutils file, pathname, descr = find_module("numpy") from os.path import join return join(pathname, "core", "include")
kwargs) except KeyboardInterrupt: raise except SystemExit: raise except Exception: print(DASH_SEPARATOR) print("Sorry, your build failed. Try rerunning configure.py with " "different options.") print(DASH_SEPARATOR) raise def get_numpy_incpath(...
64
64
57
6
57
kanderso-nrel/pyopencl
aksetup_helper.py
Python
get_numpy_incpath
get_numpy_incpath
44
49
44
44
ca66e86dc2c19a52581ddaafe816744d10bc3b9d
bigcode/the-stack
train
049b7f9511c56eda3807ae45
train
class
class PybindBuildExtCommand(NumpyBuildExtCommand): """A custom build extension for adding compiler-specific options.""" c_opts = { "msvc": ["/EHsc"], "unix": [], } def build_extensions(self): ct = self.compiler.compiler_type opts = self.c_opts.get(ct, []) cxx_opt...
class PybindBuildExtCommand(NumpyBuildExtCommand):
"""A custom build extension for adding compiler-specific options.""" c_opts = { "msvc": ["/EHsc"], "unix": [], } def build_extensions(self): ct = self.compiler.compiler_type opts = self.c_opts.get(ct, []) cxx_opts = [] if ct in ["unix", "mingw32"]: ...
c++14 is preferred over c++11 (when it is available). """ if has_flag(compiler, "-std=gnu++14"): return "-std=gnu++14" elif has_flag(compiler, "-std=c++14"): return "-std=c++14" elif has_flag(compiler, "-std=c++11"): return "-std=c++11" else: raise RuntimeError("Unsu...
117
118
396
12
105
kanderso-nrel/pyopencl
aksetup_helper.py
Python
PybindBuildExtCommand
PybindBuildExtCommand
952
994
952
952
d375a303a11fe9765a8f7c36f1ab2954745c1b49
bigcode/the-stack
train
d85d69f65575f1b334f0cd15
train
class
class VoiceActivityDetector(): """ Use signal energy to detect voice activity in wav file """ def __init__(self, speech, sr): # self._read_wav(wave_input_filename)._convert_to_mono() self.data = np.array(speech.squeeze()) self.rate = sr self.sample_window = 0.02 #20 ms ...
class VoiceActivityDetector():
""" Use signal energy to detect voice activity in wav file """ def __init__(self, speech, sr): # self._read_wav(wave_input_filename)._convert_to_mono() self.data = np.array(speech.squeeze()) self.rate = sr self.sample_window = 0.02 #20 ms self.sample_overlap = 0.01 #...
# @Time : 8/20/21 18:00 PM # @Author : Yunqi Chen # @Affiliation : Nanyang Technological University # @Email : chenyunqi101@gmail.com # @File : vad_torch.py import numpy as np import torch import scipy.io.wavfile as wf import matplotlib.pyplot as plt class VoiceActivityDetector():
88
256
1,525
5
82
Jasson-Chen/Add_noise_and_rir_to_speech
vad_torch.py
Python
VoiceActivityDetector
VoiceActivityDetector
12
165
12
12
8b4fc02936f8eb70109baaf3d0a539a71c3b5357
bigcode/the-stack
train
7b930259c16dc66b9baad555
train
class
class Provider(AddressProvider): city_formats = ("{{city_name}}", ) building_number_formats = ("%號", "%#號", "%##號", ) postcode_formats = ("%####", "%##", ) section_formats = ( "", "", "", "", "%段", ) street_address_formats = ( "{{street_name}}{{street_name_suffix}}{{section_number}}{{building_n...
class Provider(AddressProvider):
city_formats = ("{{city_name}}", ) building_number_formats = ("%號", "%#號", "%##號", ) postcode_formats = ("%####", "%##", ) section_formats = ( "", "", "", "", "%段", ) street_address_formats = ( "{{street_name}}{{street_name_suffix}}{{section_number}}{{building_number}}", ) city_formats = ( ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .. import Provider as AddressProvider class Provider(AddressProvider):
30
256
2,059
5
24
sainjusajan/django-oscar
oscar/lib/python2.7/site-packages/faker/providers/address/zh_TW/__init__.py
Python
Provider
Provider
6
110
6
6
83ba2b506c3c3a6f5b6c16d830cfbb70354f0514
bigcode/the-stack
train
5ac8af9b2b475c518310abc8
train
function
def handle_camo_url(request: HttpRequest, digest: str, received_url: str) -> HttpResponse: if not settings.THUMBOR_SERVES_CAMO: return HttpResponseNotFound() hex_encoded_url = received_url.encode('utf-8') hex_decoded_url = binascii.a2b_hex(hex_encoded_url) original_url = hex...
def handle_camo_url(request: HttpRequest, digest: str, received_url: str) -> HttpResponse:
if not settings.THUMBOR_SERVES_CAMO: return HttpResponseNotFound() hex_encoded_url = received_url.encode('utf-8') hex_decoded_url = binascii.a2b_hex(hex_encoded_url) original_url = hex_decoded_url.decode('utf-8') if is_camo_url_valid(digest, original_url): return redirect(generate_t...
HttpResponse, HttpResponseForbidden, HttpResponseNotFound ) from zerver.lib.camo import is_camo_url_valid from zerver.lib.thumbnail import generate_thumbnail_url import binascii def handle_camo_url(request: HttpRequest, digest: str, received_url: str) -> HttpResponse:
64
64
134
24
39
alexandraciobica/zulip
zerver/views/camo.py
Python
handle_camo_url
handle_camo_url
12
23
12
13
bff30c1c7e11f8efefcf60ce41b80f3017da779e
bigcode/the-stack
train
32a91d8f63e03eb800ae36a5
train
class
class non_empty_voq(PybindBase): """ This class was auto-generated by the PythonClass plugin for PYANG from YANG module brocade-sysdiag-operational - based on the path /tm-state/non-empty-voq. Each member element of the container is represented as a class variable - with a specific YANG type. YANG Descript...
class non_empty_voq(PybindBase):
""" This class was auto-generated by the PythonClass plugin for PYANG from YANG module brocade-sysdiag-operational - based on the path /tm-state/non-empty-voq. Each member element of the container is represented as a class variable - with a specific YANG type. YANG Description: non empty voq's in the syste...
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
100
256
3,770
9
91
extremenetworks/pybind
pybind/slxos/v17r_2_00/tm_state/non_empty_voq/__init__.py
Python
non_empty_voq
non_empty_voq
10
253
10
10
aa1e6c12421907bbf077046e6fd92ce568fa462d
bigcode/the-stack
train
e5bdd17dded576c1a05c9e13
train
function
def convert_to_integer(prgm): return { prgrma: 0, prgrmb: 1, prgrmc: 2, prgrmd: 3 }.get(prgm, 18)
def convert_to_integer(prgm):
return { prgrma: 0, prgrmb: 1, prgrmc: 2, prgrmd: 3 }.get(prgm, 18)
from sprinkler_control import * from flask import Flask, request import json app = Flask(__name__) @app.before_request def auth(): apikey = request.get_json('key') if apikey['apikey'] != apikeyvalue: return 'Unauthorized' def convert_to_integer(prgm):
63
64
51
7
56
biofects/google-pyrainbird
api.py
Python
convert_to_integer
convert_to_integer
14
20
14
14
90f715ab350786224964ad97592d88fe131a3cf9
bigcode/the-stack
train
b5e0b4646c4e6261b2035fdf
train
function
@app.route('/sprinkler/stop') def stop(): controller.stopIrrigation() return "Stopping irrigation"
@app.route('/sprinkler/stop') def stop():
controller.stopIrrigation() return "Stopping irrigation"
int = convert_to_integer(prgm) if someint == 18: return 'Invalid program' controller.startProgram(convert_to_integer(prgm)) #return str(convert_to_integer(prgm)) return "Started program " + prgm @app.route('/sprinkler/stop') def stop():
64
64
25
12
51
biofects/google-pyrainbird
api.py
Python
stop
stop
32
35
32
33
b46eca7113594a034beffc3969e1d14d5484ce45
bigcode/the-stack
train
54b137ac31cb9dfc21c37593
train
function
@app.route('/sprinkler/<prgm>') def start(prgm): someint = convert_to_integer(prgm) if someint == 18: return 'Invalid program' controller.startProgram(convert_to_integer(prgm)) #return str(convert_to_integer(prgm)) return "Started program " + prgm
@app.route('/sprinkler/<prgm>') def start(prgm):
someint = convert_to_integer(prgm) if someint == 18: return 'Invalid program' controller.startProgram(convert_to_integer(prgm)) #return str(convert_to_integer(prgm)) return "Started program " + prgm
_to_integer(prgm): return { prgrma: 0, prgrmb: 1, prgrmc: 2, prgrmd: 3 }.get(prgm, 18) @app.route('/sprinkler/<prgm>') def start(prgm):
64
64
69
15
49
biofects/google-pyrainbird
api.py
Python
start
start
22
29
22
23
657a86e16c6f5e761c5211b30cf2e87b27860c49
bigcode/the-stack
train
ed0c986d8cedc041cee4c9c0
train
function
@app.before_request def auth(): apikey = request.get_json('key') if apikey['apikey'] != apikeyvalue: return 'Unauthorized'
@app.before_request def auth():
apikey = request.get_json('key') if apikey['apikey'] != apikeyvalue: return 'Unauthorized'
from sprinkler_control import * from flask import Flask, request import json app = Flask(__name__) @app.before_request def auth():
28
64
35
7
21
biofects/google-pyrainbird
api.py
Python
auth
auth
7
12
7
8
16441ecc0f754f6f3d9b17c10e1e80967bf08e46
bigcode/the-stack
train
fa45381397835cba38f46e7a
train
class
class AvroStringWriter(object): def __init__(self, schema): """ Utility class for encoding Avro. Args: schema (string|dict|:class:`avro.schema.Schema`): An avro schema for encoding. Notes: The `schema` arg may be given in any of these forms: ...
class AvroStringWriter(object):
def __init__(self, schema): """ Utility class for encoding Avro. Args: schema (string|dict|:class:`avro.schema.Schema`): An avro schema for encoding. Notes: The `schema` arg may be given in any of these forms: - An avro json string ...
on an # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. from __future__ import absolute_import from __future__ import unicode_literals import cStringIO import avro.io from...
99
99
330
7
91
Yelp/data_pipeline_avro_util
data_pipeline_avro_util/avro_string_writer.py
Python
AvroStringWriter
AvroStringWriter
27
66
27
27
5989eea97159680b5f8374030d95ae7de3cc5a6a
bigcode/the-stack
train
d9ddb68bbe81d490fd8bedc1
train
function
def get_utilization_threshold(): try: # 接口利用率 告警阈值 utilization_threshold_obj = Thresholdutilization.objects.get(id=1) threshold = utilization_threshold_obj.utilization_threshold # 判断是否有告警阈值 if not threshold: return False else: # 接口利用率 告警周期 ...
def get_utilization_threshold():
try: # 接口利用率 告警阈值 utilization_threshold_obj = Thresholdutilization.objects.get(id=1) threshold = utilization_threshold_obj.utilization_threshold # 判断是否有告警阈值 if not threshold: return False else: # 接口利用率 告警周期 interval = utilization_th...
ization from devnet2019.models import LastAlarmUtilization from modules.devnet_0_snmp_get import get_interface_info from datetime import datetime from modules.devnet_0_smtp import alarm_msg # 接口告警阈值和告警周期 def get_utilization_threshold():
64
64
130
6
57
snowtrain/network-ops
modules/devnet_3_interfaces.py
Python
get_utilization_threshold
get_utilization_threshold
20
37
20
20
e50f1a4984ff61537da6d0cd5575135e7bae0e6e
bigcode/the-stack
train
c00e4d404baa71f2e273f325
train
function
def get_utilization_last_alarm(interface_obj): if not get_utilization_threshold(): return False # 获取告警周期 interval = get_utilization_threshold()[1] try: # 获取上一次告警记录时间 last_alarm = LastAlarmUtilization.objects.get(interface=interface_obj).last_alarm_datetime # 判断两次告警间隔是否大于1...
def get_utilization_last_alarm(interface_obj):
if not get_utilization_threshold(): return False # 获取告警周期 interval = get_utilization_threshold()[1] try: # 获取上一次告警记录时间 last_alarm = LastAlarmUtilization.objects.get(interface=interface_obj).last_alarm_datetime # 判断两次告警间隔是否大于1小时 if (datetime.now() - last_alarm).sec...
_threshold_obj.alarm_interval # 判断是否有告警周期 if not interval: return False else: return threshold, interval except Thresholdutilization.DoesNotExist: return False # 刷新告警记录时间 def get_utilization_last_alarm(interface_obj):
64
64
181
9
54
snowtrain/network-ops
modules/devnet_3_interfaces.py
Python
get_utilization_last_alarm
get_utilization_last_alarm
41
61
41
41
fa4b63a6022503f07b28a1dcffa3c84cc67de8e8
bigcode/the-stack
train
275686621253c827add6d61c
train
function
def get_interface_todb(): for device in Devicedb.objects.all(): try: # 如果设备snmp可达 if device.reachable.all().order_by('-id')[0].snmp_reachable: # 通过zip()函数得到所有接口数据列表 interface_info_list = get_interface_info(device.ip) for x in interface_...
def get_interface_todb():
for device in Devicedb.objects.all(): try: # 如果设备snmp可达 if device.reachable.all().order_by('-id')[0].snmp_reachable: # 通过zip()函数得到所有接口数据列表 interface_info_list = get_interface_info(device.ip) for x in interface_info_list: ...
告警周期 interval = utilization_threshold_obj.alarm_interval # 判断是否有告警周期 if not interval: return False else: return threshold, interval except Thresholdutilization.DoesNotExist: return False # 刷新告警记录时间 def get_utilization_last_al...
256
256
1,081
6
249
snowtrain/network-ops
modules/devnet_3_interfaces.py
Python
get_interface_todb
get_interface_todb
65
153
65
65
c664d8688f3be9b357417f6b40ee1d737e12e388
bigcode/the-stack
train
261f45907111624d355d0eb2
train
class
class TestXport(object): def setup_method(self, method): self.dirpath = tm.get_data_path() self.file01 = os.path.join(self.dirpath, "DEMO_G.xpt") self.file02 = os.path.join(self.dirpath, "SSHSV1_A.xpt") self.file03 = os.path.join(self.dirpath, "DRXFCD_G.xpt") self.file04 = o...
class TestXport(object):
def setup_method(self, method): self.dirpath = tm.get_data_path() self.file01 = os.path.join(self.dirpath, "DEMO_G.xpt") self.file02 = os.path.join(self.dirpath, "SSHSV1_A.xpt") self.file03 = os.path.join(self.dirpath, "DRXFCD_G.xpt") self.file04 = os.path.join(self.dirpath, ...
import pandas as pd import pandas.util.testing as tm from pandas.io.sas.sasreader import read_sas import numpy as np import os # CSV versions of test xpt files were obtained using the R foreign library # Numbers in a SAS xport file are always float64, so need to convert # before making comparisons. def numeric_as_f...
117
256
1,089
6
111
vimalromeo/pandas
pandas/tests/io/sas/test_xport.py
Python
TestXport
TestXport
19
141
19
20
15eb7ad6756710d977f11fa060a31602e7ad9b89
bigcode/the-stack
train
4db5804262b424a4624e563e
train
function
def numeric_as_float(data): for v in data.columns: if data[v].dtype is np.dtype('int64'): data[v] = data[v].astype(np.float64)
def numeric_as_float(data):
for v in data.columns: if data[v].dtype is np.dtype('int64'): data[v] = data[v].astype(np.float64)
.io.sas.sasreader import read_sas import numpy as np import os # CSV versions of test xpt files were obtained using the R foreign library # Numbers in a SAS xport file are always float64, so need to convert # before making comparisons. def numeric_as_float(data):
64
64
39
6
58
vimalromeo/pandas
pandas/tests/io/sas/test_xport.py
Python
numeric_as_float
numeric_as_float
13
16
13
13
c091ee2c3bf42a8dab524e80d7cb0f89bb054a0b
bigcode/the-stack
train
4a23d8c384e1d71bb66eb4ba
train
function
def get_val_metric(pred_cls, pred_trajectory, labels, namespace='val'): rtn_dict = dict() bs, M, num_pts, _ = pred_trajectory.shape # Lagecy metric: Prediction L2 loss pred_label = torch.argmax(pred_cls, -1) # B, pred_trajectory_single = pred_trajectory[torch.tensor(range(bs), device=pred_cls.devi...
def get_val_metric(pred_cls, pred_trajectory, labels, namespace='val'):
rtn_dict = dict() bs, M, num_pts, _ = pred_trajectory.shape # Lagecy metric: Prediction L2 loss pred_label = torch.argmax(pred_cls, -1) # B, pred_trajectory_single = pred_trajectory[torch.tensor(range(bs), device=pred_cls.device), pred_label, ...] l2_dists = F.mse_loss(pred_trajectory_single, ...
1 else 'pred%d (%.3f)' % (idx, conf) alpha = 1.0 if transparent: alpha = 1.0 if conf == max_conf else np.clip(conf, 0.1, None) plot_args = dict(label=label, alpha=alpha, linewidth=2 if alpha == 1.0 else 1) if label == 'gt': plot_args['color'] = '#d62728' ...
192
192
640
17
174
ElectronicElephant/openpilot-reimplementation
utils.py
Python
get_val_metric
get_val_metric
46
83
46
46
33a64fc9b8000ed01f8af68c6d683ca137971f0a
bigcode/the-stack
train
028fae6caf000eee7f95893a
train
function
def get_val_metric_keys(namespace='val'): rtn_dict = dict() rtn_dict.update({'l2_dist': [], 'cls_acc': []}) # New Metric distance_splits = ((0, 10), (10, 20), (20, 30), (30, 50), (50, 1000)) AP_thresholds = (0.5, 1, 2) for min_dst, max_dst in distance_splits: rtn_dict.update({'eucliden...
def get_val_metric_keys(namespace='val'):
rtn_dict = dict() rtn_dict.update({'l2_dist': [], 'cls_acc': []}) # New Metric distance_splits = ((0, 10), (10, 20), (20, 30), (30, 50), (50, 1000)) AP_thresholds = (0.5, 1, 2) for min_dst, max_dst in distance_splits: rtn_dict.update({'eucliden_%d_%d' % (min_dst, max_dst): []}) # [sum...
_%d_%d_%s' % (min_dst, max_dst, AP_threshold): hit_mask[points_mask]}) # add namespace if namespace is not None: for k in list(rtn_dict.keys()): rtn_dict['%s/%s' % (namespace, k)] = rtn_dict.pop(k) return rtn_dict def get_val_metric_keys(namespace='val'):
82
82
275
9
72
ElectronicElephant/openpilot-reimplementation
utils.py
Python
get_val_metric_keys
get_val_metric_keys
86
105
86
86
f9f64bad0efc28e83ea83dd63b659af7688658b8
bigcode/the-stack
train
1a9f5b94ff9235f2f14be4bb
train
function
def generate_random_params_for_warp(img, random_rate=0.1): h, w = img.shape[:2] width_max = random_rate * w height_max = random_rate * h # 8 offsets w_offsets = list(np.random.uniform(0, width_max) for _ in range(4)) h_offsets = list(np.random.uniform(0, height_max) for _ in range(4)) ret...
def generate_random_params_for_warp(img, random_rate=0.1):
h, w = img.shape[:2] width_max = random_rate * w height_max = random_rate * h # 8 offsets w_offsets = list(np.random.uniform(0, width_max) for _ in range(4)) h_offsets = list(np.random.uniform(0, height_max) for _ in range(4)) return w_offsets, h_offsets
# add namespace if namespace is not None: for k in list(rtn_dict.keys()): rtn_dict['%s/%s' % (namespace, k)] = rtn_dict.pop(k) return rtn_dict def generate_random_params_for_warp(img, random_rate=0.1):
64
64
100
16
47
ElectronicElephant/openpilot-reimplementation
utils.py
Python
generate_random_params_for_warp
generate_random_params_for_warp
108
118
108
108
b0a36e602020933221edc7456ddf7e066f9240ed
bigcode/the-stack
train
67afc35a0bcceb0b46910c18
train
function
def draw_trajectory_on_ax(ax: Axes, trajectories, confs, line_type='o-', transparent=True, xlim=(-30, 30), ylim=(0, 100)): ''' ax: matplotlib.axes.Axes, the axis to draw trajectories on trajectories: List of numpy arrays of shape (num_points, 2 or 3) confs: List of numbers, 1 means gt ''' # get...
def draw_trajectory_on_ax(ax: Axes, trajectories, confs, line_type='o-', transparent=True, xlim=(-30, 30), ylim=(0, 100)):
''' ax: matplotlib.axes.Axes, the axis to draw trajectories on trajectories: List of numpy arrays of shape (num_points, 2 or 3) confs: List of numbers, 1 means gt ''' # get the max conf max_conf = max([conf for conf in confs if conf != 1]) for idx, (trajectory, conf) in enumerate(zip(t...
#1f77b4', '#ff7f0e', '#2ca02c', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf']) def draw_trajectory_on_ax(ax: Axes, trajectories, confs, line_type='o-', transparent=True, xlim=(-30, 30), ylim=(0, 100)):
94
95
319
39
55
ElectronicElephant/openpilot-reimplementation
utils.py
Python
draw_trajectory_on_ax
draw_trajectory_on_ax
16
43
16
16
ed0961c244ebee89cf0280aa60c9dca8d6ad7721
bigcode/the-stack
train
ad43fa48d7ecf2ddb06a019e
train
function
def warp(img, w_offsets, h_offsets): h, w = img.shape[:2] original_corner_pts = np.array( ( (w_offsets[0], h_offsets[0]), (w - w_offsets[1], h_offsets[1]), (w_offsets[2], h - h_offsets[2]), (w - w_offsets[3], h - h_offsets[3]), ), dtype=np.float32...
def warp(img, w_offsets, h_offsets):
h, w = img.shape[:2] original_corner_pts = np.array( ( (w_offsets[0], h_offsets[0]), (w - w_offsets[1], h_offsets[1]), (w_offsets[2], h - h_offsets[2]), (w - w_offsets[3], h - h_offsets[3]), ), dtype=np.float32 ) target_corner_pts = np.ar...
8 offsets w_offsets = list(np.random.uniform(0, width_max) for _ in range(4)) h_offsets = list(np.random.uniform(0, height_max) for _ in range(4)) return w_offsets, h_offsets def warp(img, w_offsets, h_offsets):
64
64
201
10
53
ElectronicElephant/openpilot-reimplementation
utils.py
Python
warp
warp
121
146
121
121
0a38cbfc9787784cdb109f91e48e95ca9003f766
bigcode/the-stack
train
6f01384569c583afeec2ea15
train
function
def draw_path(device_path, img, width=1, height=1.2, fill_color=(128,0,255), line_color=(0,255,0)): # device_path: N, 3 device_path_l = device_path + np.array([0, 0, height]) device_path_r = device_path + np.array([0, 0, height]) ...
def draw_path(device_path, img, width=1, height=1.2, fill_color=(128,0,255), line_color=(0,255,0)): # device_path: N, 3
device_path_l = device_path + np.array([0, 0, height]) device_path_r = device_path + np.array([0, 0, height]) device_path_l[:,1] -= width ...
(w, h), # Bottom-right ), dtype=np.float32 ) transform_matrix = cv2.getPerspectiveTransform(original_corner_pts, target_corner_pts) transformed_image = cv2.warpPerspective(img, transform_matrix, (w, h)) return transformed_image def draw_path(device_path, img, width=1, height=1.2...
108
108
362
46
61
ElectronicElephant/openpilot-reimplementation
utils.py
Python
draw_path
draw_path
149
173
149
150
05cdfba933426ddb826cf6fa3d5bb001edb32a4c
bigcode/the-stack
train
1142a3ab34f7bb4a1ffe5f7a
train
function
def sorteia(lista): """ Sorteia números aleatórios e coloca ele em uma lista :param lista: Uma lista aleatória de 5 números :return:Sem um retorno específico Função criada por Gustavo Guanabara do curso em Vídeo """ print('Sorteando os 5 valores de lista:', end='') for contador in range(...
def sorteia(lista):
""" Sorteia números aleatórios e coloca ele em uma lista :param lista: Uma lista aleatória de 5 números :return:Sem um retorno específico Função criada por Gustavo Guanabara do curso em Vídeo """ print('Sorteando os 5 valores de lista:', end='') for contador in range(0, 5): n = r...
amadas sorteia() e somaPar(). A primeira função vai sortear 5 números #e vai coloca-los dentro da lista e o segunda função vai mostrar a soma #entre todos os valores PARES sorteados pela função anterior. from random import randint from time import sleep def sorteia(lista):
64
64
122
5
58
raphaeltertuliano/Python
Ex100.py
Python
sorteia
sorteia
9
22
9
9
db8693e8e3ca3ac68d5f1e3828cfb970c8dcfa0d
bigcode/the-stack
train
a16599f8056da0b75590ddb1
train
function
def somaPar(lista): soma = 0 for valor in lista: if valor % 2 == 0: soma += valor print(f'Somando os valores pares de {lista}, temos {soma}')
def somaPar(lista):
soma = 0 for valor in lista: if valor % 2 == 0: soma += valor print(f'Somando os valores pares de {lista}, temos {soma}')
orteando os 5 valores de lista:', end='') for contador in range(0, 5): n = randint(1, 10) lista.append(n) print(f'{n} ', end='') sleep(0.3) print('PRONTO') def somaPar(lista):
64
64
50
5
59
raphaeltertuliano/Python
Ex100.py
Python
somaPar
somaPar
25
30
25
25
d7f77a0432df4bcc30b9c07c2c63b5ab63609a7b
bigcode/the-stack
train
b63ce537db5e98ec34a76cfd
train
class
class DauphinPipelineRuns(dauphin.ObjectType): class Meta: name = "PipelineRuns" def __init__(self, filters, cursor, limit): self._filters = filters self._cursor = cursor self._limit = limit results = dauphin.non_null_list("PipelineRun") count = dauphin.Int() def r...
class DauphinPipelineRuns(dauphin.ObjectType):
class Meta: name = "PipelineRuns" def __init__(self, filters, cursor, limit): self._filters = filters self._cursor = cursor self._limit = limit results = dauphin.non_null_list("PipelineRun") count = dauphin.Int() def resolve_results(self, graphene_info): re...
) class DauphinPipelineRunOrError(dauphin.Union): class Meta: name = "PipelineRunOrError" types = ("PipelineRun", DauphinPipelineRunNotFoundError, DauphinPythonError) class DauphinPipelineRuns(dauphin.ObjectType):
64
64
130
13
51
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPipelineRuns
DauphinPipelineRuns
557
573
557
557
f4ac2055d971028f692dd35db8675428a079c0f7
bigcode/the-stack
train
1a0a53ff19b37d0d5292d803
train
class
class DauphinInvalidSubsetError(dauphin.ObjectType): class Meta: name = "InvalidSubsetError" interfaces = (DauphinError,) pipeline = dauphin.Field(dauphin.NonNull("Pipeline")) def __init__(self, message, pipeline): super(DauphinInvalidSubsetError, self).__init__() self.mess...
class DauphinInvalidSubsetError(dauphin.ObjectType):
class Meta: name = "InvalidSubsetError" interfaces = (DauphinError,) pipeline = dauphin.Field(dauphin.NonNull("Pipeline")) def __init__(self, message, pipeline): super(DauphinInvalidSubsetError, self).__init__() self.message = check.str_param(message, "message") sel...
RunGroupNotFoundError, self).__init__() self.run_id = check.str_param(run_id, "run_id") self.message = "Run group of run {run_id} could not be found.".format(run_id=run_id) class DauphinInvalidSubsetError(dauphin.ObjectType):
64
64
96
14
50
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinInvalidSubsetError
DauphinInvalidSubsetError
150
160
150
150
1d3fc88075d12c8d6fc97888c907beab303245b8
bigcode/the-stack
train
6709126bc6692329878ef168
train
class
class DauphinError(dauphin.Interface): class Meta: name = "Error" message = dauphin.String(required=True)
class DauphinError(dauphin.Interface):
class Meta: name = "Error" message = dauphin.String(required=True)
from dagster.utils.error import SerializableErrorInfo from dagster_graphql import dauphin from ..implementation.fetch_runs import get_runs, get_runs_count from ..implementation.utils import PipelineSelector from .config_types import DauphinConfigTypeField class DauphinError(dauphin.Interface):
64
64
31
11
52
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinError
DauphinError
22
26
22
22
72182a93571ee8b3de90cdcb9003bf0029db3cb5
bigcode/the-stack
train
4883d8819e870b91de6a311a
train
class
class DauphinLaunchPipelineRunSuccess(dauphin.ObjectType): class Meta: name = "LaunchPipelineRunSuccess" run = dauphin.Field(dauphin.NonNull("PipelineRun"))
class DauphinLaunchPipelineRunSuccess(dauphin.ObjectType):
class Meta: name = "LaunchPipelineRunSuccess" run = dauphin.Field(dauphin.NonNull("PipelineRun"))
ExecutionPlanOrError" types = ( "ExecutionPlan", DauphinPipelineConfigValidationInvalid, DauphinPipelineNotFoundError, DauphinInvalidSubsetError, DauphinPythonError, ) class DauphinLaunchPipelineRunSuccess(dauphin.ObjectType):
64
64
45
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinLaunchPipelineRunSuccess
DauphinLaunchPipelineRunSuccess
452
456
452
452
2290e58a3d6cdd1ebec180fca39c0d633d65087a
bigcode/the-stack
train
6adc98a6898ad2f36eb25b2c
train
class
class DauphinEvaluationStackPathEntry(dauphin.ObjectType): class Meta: name = "EvaluationStackPathEntry" def __init__(self, field_name): self._field_name = check.str_param(field_name, "field_name") super(DauphinEvaluationStackPathEntry, self).__init__() field_name = dauphin.NonNull...
class DauphinEvaluationStackPathEntry(dauphin.ObjectType):
class Meta: name = "EvaluationStackPathEntry" def __init__(self, field_name): self._field_name = check.str_param(field_name, "field_name") super(DauphinEvaluationStackPathEntry, self).__init__() field_name = dauphin.NonNull(dauphin.String) def resolve_field_name(self, _info): ...
ListItemEntry, self).__init__() self._list_index = list_index list_index = dauphin.NonNull(dauphin.Int) def resolve_list_index(self, _info): return self._list_index class DauphinEvaluationStackPathEntry(dauphin.ObjectType):
64
64
101
15
48
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinEvaluationStackPathEntry
DauphinEvaluationStackPathEntry
394
405
394
394
47764b329e2522f47468519a8a1e027ec1ecd8e8
bigcode/the-stack
train
6c965dbc6eb96184a057ae8a
train
class
class DauphinMissingFieldConfigError(dauphin.ObjectType): class Meta: name = "MissingFieldConfigError" interfaces = (DauphinPipelineConfigValidationError,) field = dauphin.NonNull("ConfigTypeField")
class DauphinMissingFieldConfigError(dauphin.ObjectType):
class Meta: name = "MissingFieldConfigError" interfaces = (DauphinPipelineConfigValidationError,) field = dauphin.NonNull("ConfigTypeField")
Error(dauphin.ObjectType): class Meta: name = "RuntimeMismatchConfigError" interfaces = (DauphinPipelineConfigValidationError,) value_rep = dauphin.Field(dauphin.String) class DauphinMissingFieldConfigError(dauphin.ObjectType):
64
64
55
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinMissingFieldConfigError
DauphinMissingFieldConfigError
328
333
328
328
7ae6093aaa43b4c7da108c30a039b5d5637c5a19
bigcode/the-stack
train
bc517da05470901d275e4f1c
train
class
class DauphinMissingFieldsConfigError(dauphin.ObjectType): class Meta: name = "MissingFieldsConfigError" interfaces = (DauphinPipelineConfigValidationError,) fields = dauphin.non_null_list("ConfigTypeField")
class DauphinMissingFieldsConfigError(dauphin.ObjectType):
class Meta: name = "MissingFieldsConfigError" interfaces = (DauphinPipelineConfigValidationError,) fields = dauphin.non_null_list("ConfigTypeField")
ConfigError(dauphin.ObjectType): class Meta: name = "MissingFieldConfigError" interfaces = (DauphinPipelineConfigValidationError,) field = dauphin.NonNull("ConfigTypeField") class DauphinMissingFieldsConfigError(dauphin.ObjectType):
64
64
56
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinMissingFieldsConfigError
DauphinMissingFieldsConfigError
336
341
336
336
18d6beae3a6b05f0235a92b1204105ca59a9f699
bigcode/the-stack
train
a9c4744d0308df868badc2cd
train
class
class DauphinRepositoryNotFoundError(dauphin.ObjectType): class Meta: name = "RepositoryNotFoundError" interfaces = (DauphinError,) repository_name = dauphin.NonNull(dauphin.String) repository_location_name = dauphin.NonNull(dauphin.String) def __init__(self, repository_location_name, ...
class DauphinRepositoryNotFoundError(dauphin.ObjectType):
class Meta: name = "RepositoryNotFoundError" interfaces = (DauphinError,) repository_name = dauphin.NonNull(dauphin.String) repository_location_name = dauphin.NonNull(dauphin.String) def __init__(self, repository_location_name, repository_name): super(DauphinRepositoryNotFoundE...
("RepositoryConnection", DauphinPythonError) class RepositoryLocationsOrError(dauphin.Union): class Meta: name = "RepositoryLocationsOrError" types = ("RepositoryLocationConnection", DauphinPythonError) class DauphinRepositoryNotFoundError(dauphin.ObjectType):
64
64
172
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinRepositoryNotFoundError
DauphinRepositoryNotFoundError
668
684
668
668
0870dbc11822fb9b13f2c5d4400553d19c0f2cb1
bigcode/the-stack
train
8b60f68c095494658932dce5
train
class
class DauphinRuntimeMismatchConfigError(dauphin.ObjectType): class Meta: name = "RuntimeMismatchConfigError" interfaces = (DauphinPipelineConfigValidationError,) value_rep = dauphin.Field(dauphin.String)
class DauphinRuntimeMismatchConfigError(dauphin.ObjectType):
class Meta: name = "RuntimeMismatchConfigError" interfaces = (DauphinPipelineConfigValidationError,) value_rep = dauphin.Field(dauphin.String)
.stack), reason=error.reason, incoming_fields=error.error_data.incoming_fields, ) else: check.failed( "Error type not supported {error_data}".format(error_data=repr(error.error_data)) ) class DauphinRuntimeMismatchConfigError(da...
64
64
56
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinRuntimeMismatchConfigError
DauphinRuntimeMismatchConfigError
320
325
320
320
c23247151c33e507721248cee76dd0209745fbbf
bigcode/the-stack
train
f9d0171bece613ff23b4b583
train
class
class DauphinPipelineNotFoundError(dauphin.ObjectType): class Meta: name = "PipelineNotFoundError" interfaces = (DauphinError,) pipeline_name = dauphin.NonNull(dauphin.String) repository_name = dauphin.NonNull(dauphin.String) repository_location_name = dauphin.NonNull(dauphin.String) ...
class DauphinPipelineNotFoundError(dauphin.ObjectType):
class Meta: name = "PipelineNotFoundError" interfaces = (DauphinError,) pipeline_name = dauphin.NonNull(dauphin.String) repository_name = dauphin.NonNull(dauphin.String) repository_location_name = dauphin.NonNull(dauphin.String) def __init__(self, selector): super(DauphinPi...
NotFound" interfaces = (DauphinError,) def __init__(self, location_name): self.message = "Location {location_name} does not exist.".format( location_name=location_name ) class DauphinPipelineNotFoundError(dauphin.ObjectType):
64
64
180
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPipelineNotFoundError
DauphinPipelineNotFoundError
94
111
94
94
6cf7ef4ac5368f563d01830bfe977cf3c21a5046
bigcode/the-stack
train
b592da30c3a74d2cad5d23ab
train
class
class DauphinPipelineRunConflict(dauphin.ObjectType): class Meta: name = "PipelineRunConflict" interfaces = (DauphinError,)
class DauphinPipelineRunConflict(dauphin.ObjectType):
class Meta: name = "PipelineRunConflict" interfaces = (DauphinError,)
(dauphin.ObjectType): class Meta: name = "InvalidOutputError" step_key = dauphin.NonNull(dauphin.String) invalid_output_name = dauphin.NonNull(dauphin.String) class DauphinPipelineRunConflict(dauphin.ObjectType):
64
64
36
14
50
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPipelineRunConflict
DauphinPipelineRunConflict
474
477
474
474
91622a6e92003d5f29935c513c64609d27b7d7df
bigcode/the-stack
train
c19fd774b4cec82782a57e63
train
class
class DauphinFieldNotDefinedConfigError(dauphin.ObjectType): class Meta: name = "FieldNotDefinedConfigError" interfaces = (DauphinPipelineConfigValidationError,) field_name = dauphin.NonNull(dauphin.String)
class DauphinFieldNotDefinedConfigError(dauphin.ObjectType):
class Meta: name = "FieldNotDefinedConfigError" interfaces = (DauphinPipelineConfigValidationError,) field_name = dauphin.NonNull(dauphin.String)
(dauphin.ObjectType): class Meta: name = "MissingFieldsConfigError" interfaces = (DauphinPipelineConfigValidationError,) fields = dauphin.non_null_list("ConfigTypeField") class DauphinFieldNotDefinedConfigError(dauphin.ObjectType):
64
64
59
16
48
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinFieldNotDefinedConfigError
DauphinFieldNotDefinedConfigError
344
349
344
344
fc2002362c0042d208a1e3a73f7ddcbd3ebea9ea
bigcode/the-stack
train
23c1a4c7d560f1364482a7d0
train
class
class DauphinFieldsNotDefinedConfigError(dauphin.ObjectType): class Meta: name = "FieldsNotDefinedConfigError" interfaces = (DauphinPipelineConfigValidationError,) field_names = dauphin.non_null_list(dauphin.String)
class DauphinFieldsNotDefinedConfigError(dauphin.ObjectType):
class Meta: name = "FieldsNotDefinedConfigError" interfaces = (DauphinPipelineConfigValidationError,) field_names = dauphin.non_null_list(dauphin.String)
phin.ObjectType): class Meta: name = "FieldNotDefinedConfigError" interfaces = (DauphinPipelineConfigValidationError,) field_name = dauphin.NonNull(dauphin.String) class DauphinFieldsNotDefinedConfigError(dauphin.ObjectType):
64
64
60
16
48
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinFieldsNotDefinedConfigError
DauphinFieldsNotDefinedConfigError
352
357
352
352
13a8503bb81a130f88cb04cd90659414c7304e0c
bigcode/the-stack
train
85186c075e20545d924d0ec7
train
class
class DauphinConfigTypeNotFoundError(dauphin.ObjectType): class Meta: name = "ConfigTypeNotFoundError" interfaces = (DauphinError,) pipeline = dauphin.NonNull("Pipeline") config_type_name = dauphin.NonNull(dauphin.String)
class DauphinConfigTypeNotFoundError(dauphin.ObjectType):
class Meta: name = "ConfigTypeNotFoundError" interfaces = (DauphinError,) pipeline = dauphin.NonNull("Pipeline") config_type_name = dauphin.NonNull(dauphin.String)
_execution_error_types class DauphinLaunchPipelineReexecutionResult(dauphin.Union): class Meta: name = "LaunchPipelineReexecutionResult" types = launch_pipeline_run_result_types + pipeline_execution_error_types class DauphinConfigTypeNotFoundError(dauphin.ObjectType):
64
64
68
16
47
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinConfigTypeNotFoundError
DauphinConfigTypeNotFoundError
510
516
510
510
659ee2a48784fac89af802ca5a45d24160cadc18
bigcode/the-stack
train
39620df69a0fdc1572b8e699
train
class
class DauphinRepositoryOrError(dauphin.Union): class Meta: name = "RepositoryOrError" types = (DauphinPythonError, "Repository", DauphinRepositoryNotFoundError)
class DauphinRepositoryOrError(dauphin.Union):
class Meta: name = "RepositoryOrError" types = (DauphinPythonError, "Repository", DauphinRepositoryNotFoundError)
_param( repository_location_name, "repository_location_name" ) self.message = "Could not find Repository {repository_location_name}.{repository_name}".format( repository_name=repository_name, repository_location_name=repository_location_name ) class DauphinRepositoryOrErr...
64
64
48
14
50
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinRepositoryOrError
DauphinRepositoryOrError
687
690
687
687
f8d140ef27d115ce00a3ec1db6548fde3da918db
bigcode/the-stack
train
01d4868f1e890f526231d495
train
class
class DauphinPipelineSnapshotNotFoundError(dauphin.ObjectType): class Meta: name = "PipelineSnapshotNotFoundError" interfaces = (DauphinError,) snapshot_id = dauphin.NonNull(dauphin.String) def __init__(self, snapshot_id): super(DauphinPipelineSnapshotNotFoundError, self).__init__(...
class DauphinPipelineSnapshotNotFoundError(dauphin.ObjectType):
class Meta: name = "PipelineSnapshotNotFoundError" interfaces = (DauphinError,) snapshot_id = dauphin.NonNull(dauphin.String) def __init__(self, snapshot_id): super(DauphinPipelineSnapshotNotFoundError, self).__init__() self.snapshot_id = check.str_param(snapshot_id, "snaps...
interfaces = (DauphinError,) def __init__(self): super(DauphinSchedulerNotDefinedError, self).__init__() self.message = "Scheduler is not defined for the currently loaded repository." class DauphinPipelineSnapshotNotFoundError(dauphin.ObjectType):
64
64
127
16
48
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPipelineSnapshotNotFoundError
DauphinPipelineSnapshotNotFoundError
57
69
57
57
2b6ef03a79cbe7c2c120095c89fb0bace70aba24
bigcode/the-stack
train
29889fb0fd1af8d943865eea
train
class
class DauphinRepositoryLocationNotFound(dauphin.ObjectType): class Meta: name = "RepositoryLocationNotFound" interfaces = (DauphinError,) def __init__(self, location_name): self.message = "Location {location_name} does not exist.".format( location_name=location_name ...
class DauphinRepositoryLocationNotFound(dauphin.ObjectType):
class Meta: name = "RepositoryLocationNotFound" interfaces = (DauphinError,) def __init__(self, location_name): self.message = "Location {location_name} does not exist.".format( location_name=location_name )
" interfaces = (DauphinError,) def __init__(self, location_name): self.message = "Location {location_name} does not support reloading.".format( location_name=location_name ) class DauphinRepositoryLocationNotFound(dauphin.ObjectType):
64
64
74
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinRepositoryLocationNotFound
DauphinRepositoryLocationNotFound
83
91
83
83
3a5886a92e335d8053fafe92cceab2d15b75e146
bigcode/the-stack
train
ea9c24d81c90356216cb07e1
train
class
class DauphinInvalidStepError(dauphin.ObjectType): class Meta: name = "InvalidStepError" invalid_step_key = dauphin.NonNull(dauphin.String)
class DauphinInvalidStepError(dauphin.ObjectType):
class Meta: name = "InvalidStepError" invalid_step_key = dauphin.NonNull(dauphin.String)
Error, ) class DauphinLaunchPipelineRunSuccess(dauphin.ObjectType): class Meta: name = "LaunchPipelineRunSuccess" run = dauphin.Field(dauphin.NonNull("PipelineRun")) class DauphinInvalidStepError(dauphin.ObjectType):
63
64
42
14
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinInvalidStepError
DauphinInvalidStepError
459
463
459
459
74c7600dd8047917ce16f6a56f167a5b6178eb11
bigcode/the-stack
train
5178cee5c3a95bd0a9c9058a
train
class
class DauphinPipelineConfigValidationValid(dauphin.ObjectType): class Meta: name = "PipelineConfigValidationValid" pipeline_name = dauphin.NonNull(dauphin.String)
class DauphinPipelineConfigValidationValid(dauphin.ObjectType):
class Meta: name = "PipelineConfigValidationValid" pipeline_name = dauphin.NonNull(dauphin.String)
, mode, selector): self.mode = check.str_param(mode, "mode") self.message = "Mode {mode} not found in pipeline {pipeline}.".format( mode=mode, pipeline=selector.pipeline_name ) class DauphinPipelineConfigValidationValid(dauphin.ObjectType):
64
64
43
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPipelineConfigValidationValid
DauphinPipelineConfigValidationValid
202
206
202
202
043895f4318394d3795dcad8ab7e59f840a3912c
bigcode/the-stack
train
316e61d6bbeafdb399111fd4
train
class
class DauphinPythonError(dauphin.ObjectType): class Meta: name = "PythonError" interfaces = (DauphinError,) className = dauphin.Field(dauphin.String) stack = dauphin.non_null_list(dauphin.String) cause = dauphin.Field("PythonError") def __init__(self, error_info): super(Dau...
class DauphinPythonError(dauphin.ObjectType):
class Meta: name = "PythonError" interfaces = (DauphinError,) className = dauphin.Field(dauphin.String) stack = dauphin.non_null_list(dauphin.String) cause = dauphin.Field("PythonError") def __init__(self, error_info): super(DauphinPythonError, self).__init__() chec...
from ..implementation.utils import PipelineSelector from .config_types import DauphinConfigTypeField class DauphinError(dauphin.Interface): class Meta: name = "Error" message = dauphin.String(required=True) class DauphinPythonError(dauphin.ObjectType):
64
64
149
13
51
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPythonError
DauphinPythonError
29
44
29
29
23dbbfccd83a9cbcdc27c2a55de410fa3f7df7bb
bigcode/the-stack
train
d20b79ba9abe97cda8ece904
train
class
class DauphinLaunchPipelineExecutionResult(dauphin.Union): class Meta: name = "LaunchPipelineExecutionResult" types = launch_pipeline_run_result_types + pipeline_execution_error_types
class DauphinLaunchPipelineExecutionResult(dauphin.Union):
class Meta: name = "LaunchPipelineExecutionResult" types = launch_pipeline_run_result_types + pipeline_execution_error_types
DauphinPipelineNotFoundError, DauphinPipelineRunConflict, DauphinPythonError, ) + create_execution_params_error_types launch_pipeline_run_result_types = (DauphinLaunchPipelineRunSuccess,) class DauphinLaunchPipelineExecutionResult(dauphin.Union):
63
64
42
15
48
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinLaunchPipelineExecutionResult
DauphinLaunchPipelineExecutionResult
498
501
498
498
266adf03bdef7e39704173791b5dcd125fa6c934
bigcode/the-stack
train
e506de64bd9eb3f182f222c4
train
class
class DauphinEvaluationStackListItemEntry(dauphin.ObjectType): class Meta: name = "EvaluationStackListItemEntry" def __init__(self, list_index): super(DauphinEvaluationStackListItemEntry, self).__init__() self._list_index = list_index list_index = dauphin.NonNull(dauphin.Int) ...
class DauphinEvaluationStackListItemEntry(dauphin.ObjectType):
class Meta: name = "EvaluationStackListItemEntry" def __init__(self, list_index): super(DauphinEvaluationStackListItemEntry, self).__init__() self._list_index = list_index list_index = dauphin.NonNull(dauphin.Int) def resolve_list_index(self, _info): return self._list_...
_REQUIRED_FIELD" MISSING_REQUIRED_FIELDS = "MISSING_REQUIRED_FIELDS" FIELD_NOT_DEFINED = "FIELD_NOT_DEFINED" FIELDS_NOT_DEFINED = "FIELDS_NOT_DEFINED" SELECTOR_FIELD_ERROR = "SELECTOR_FIELD_ERROR" class DauphinEvaluationStackListItemEntry(dauphin.ObjectType):
64
64
97
16
48
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinEvaluationStackListItemEntry
DauphinEvaluationStackListItemEntry
380
391
380
380
1d87cb6be460bc481cbcf7531bdfea9cfa68b5e5
bigcode/the-stack
train
ab0ef67ca650c9be3625cc82
train
class
class DauphinPipelineConfigValidationError(dauphin.Interface): class Meta: name = "PipelineConfigValidationError" message = dauphin.NonNull(dauphin.String) path = dauphin.non_null_list(dauphin.String) stack = dauphin.NonNull("EvaluationStack") reason = dauphin.NonNull("EvaluationErrorReason...
class DauphinPipelineConfigValidationError(dauphin.Interface):
class Meta: name = "PipelineConfigValidationError" message = dauphin.NonNull(dauphin.String) path = dauphin.non_null_list(dauphin.String) stack = dauphin.NonNull("EvaluationStack") reason = dauphin.NonNull("EvaluationErrorReason") @staticmethod def from_dagster_error(config_schema_...
def for_validation_errors(represented_pipeline, errors): check.inst_param(represented_pipeline, "represented_pipeline", RepresentedPipeline) check.list_param(errors, "errors", of_type=EvaluationError) return DauphinPipelineConfigValidationInvalid( pipeline_name=represented_pipeline....
189
189
631
14
175
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPipelineConfigValidationError
DauphinPipelineConfigValidationError
243
317
243
243
27f8c99d9c728614cb74a8baee5312c121bb7355
bigcode/the-stack
train
9e443b77e88ed14fb53cb0cf
train
class
class DauphinPartitionBackfillSuccess(dauphin.ObjectType): class Meta: name = "PartitionBackfillSuccess" backfill_id = dauphin.NonNull(dauphin.String) launched_run_ids = dauphin.non_null_list(dauphin.String)
class DauphinPartitionBackfillSuccess(dauphin.ObjectType):
class Meta: name = "PartitionBackfillSuccess" backfill_id = dauphin.NonNull(dauphin.String) launched_run_ids = dauphin.non_null_list(dauphin.String)
self.partition_set_name = check.str_param(partition_set_name, "partition_set_name") self.message = "Partition set {partition_set_name} could not be found.".format( partition_set_name=self.partition_set_name ) class DauphinPartitionBackfillSuccess(dauphin.ObjectType):
64
64
61
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPartitionBackfillSuccess
DauphinPartitionBackfillSuccess
639
644
639
639
fa8065251c43c00bf6526688a2db739c71c0f5ae
bigcode/the-stack
train
27a33597c31f3e8b07d55218
train
class
class DauphinPipelineRunOrError(dauphin.Union): class Meta: name = "PipelineRunOrError" types = ("PipelineRun", DauphinPipelineRunNotFoundError, DauphinPythonError)
class DauphinPipelineRunOrError(dauphin.Union):
class Meta: name = "PipelineRunOrError" types = ("PipelineRun", DauphinPipelineRunNotFoundError, DauphinPythonError)
name = "DagsterTypeOrError" types = ( "RegularDagsterType", DauphinPipelineNotFoundError, DauphinDagsterTypeNotFoundError, DauphinPythonError, ) class DauphinPipelineRunOrError(dauphin.Union):
64
64
50
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPipelineRunOrError
DauphinPipelineRunOrError
551
554
551
551
67a4f6eb84d197ee60447e79a4575ffff92cf975
bigcode/the-stack
train
9330f929569d0ab3f935cd91
train
class
class DauphinScheduleNotFoundError(dauphin.ObjectType): class Meta: name = "ScheduleNotFoundError" interfaces = (DauphinError,) schedule_name = dauphin.NonNull(dauphin.String) def __init__(self, schedule_name): super(DauphinScheduleNotFoundError, self).__init__() self.sched...
class DauphinScheduleNotFoundError(dauphin.ObjectType):
class Meta: name = "ScheduleNotFoundError" interfaces = (DauphinError,) schedule_name = dauphin.NonNull(dauphin.String) def __init__(self, schedule_name): super(DauphinScheduleNotFoundError, self).__init__() self.schedule_name = check.str_param(schedule_name, "schedule_name...
GroupsOrError(dauphin.ObjectType): class Meta: name = "RunGroupsOrError" types = ("RunGroups", DauphinPythonError) results = dauphin.non_null_list("RunGroup") class DauphinScheduleNotFoundError(dauphin.ObjectType):
64
64
120
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinScheduleNotFoundError
DauphinScheduleNotFoundError
596
608
596
596
456d2078e2210d6fe3b7060328812d8929dd794b
bigcode/the-stack
train
9132ac73e851a0e12e3baca6
train
class
class DauphinSchedulerNotDefinedError(dauphin.ObjectType): class Meta: name = "SchedulerNotDefinedError" interfaces = (DauphinError,) def __init__(self): super(DauphinSchedulerNotDefinedError, self).__init__() self.message = "Scheduler is not defined for the currently loaded rep...
class DauphinSchedulerNotDefinedError(dauphin.ObjectType):
class Meta: name = "SchedulerNotDefinedError" interfaces = (DauphinError,) def __init__(self): super(DauphinSchedulerNotDefinedError, self).__init__() self.message = "Scheduler is not defined for the currently loaded repository."
.inst_param(error_info, "error_info", SerializableErrorInfo) self.message = error_info.message self.stack = error_info.stack self.cause = error_info.cause self.className = error_info.cls_name class DauphinSchedulerNotDefinedError(dauphin.ObjectType):
64
64
76
15
48
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinSchedulerNotDefinedError
DauphinSchedulerNotDefinedError
47
54
47
47
2740e0c2dd3a2427554352ad5914cc6b81e2dbe2
bigcode/the-stack
train
f865b9be0e6b853622ebc8f9
train
class
class DauphinConfigTypeOrError(dauphin.Union): class Meta: name = "ConfigTypeOrError" types = ( "EnumConfigType", "CompositeConfigType", "RegularConfigType", DauphinPipelineNotFoundError, DauphinConfigTypeNotFoundError, DauphinP...
class DauphinConfigTypeOrError(dauphin.Union):
class Meta: name = "ConfigTypeOrError" types = ( "EnumConfigType", "CompositeConfigType", "RegularConfigType", DauphinPipelineNotFoundError, DauphinConfigTypeNotFoundError, DauphinPythonError, )
auphin.ObjectType): class Meta: name = "DagsterTypeNotFoundError" interfaces = (DauphinError,) dagster_type_name = dauphin.NonNull(dauphin.String) class DauphinConfigTypeOrError(dauphin.Union):
64
64
78
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinConfigTypeOrError
DauphinConfigTypeOrError
527
537
527
527
d19c5b057a3a47a9d3895c36ee452ee33432af94
bigcode/the-stack
train
6789f7486661d1add47ec146
train
class
class DauphinEvaluationErrorReason(dauphin.Enum): class Meta: name = "EvaluationErrorReason" RUNTIME_TYPE_MISMATCH = "RUNTIME_TYPE_MISMATCH" MISSING_REQUIRED_FIELD = "MISSING_REQUIRED_FIELD" MISSING_REQUIRED_FIELDS = "MISSING_REQUIRED_FIELDS" FIELD_NOT_DEFINED = "FIELD_NOT_DEFINED" FIEL...
class DauphinEvaluationErrorReason(dauphin.Enum):
class Meta: name = "EvaluationErrorReason" RUNTIME_TYPE_MISMATCH = "RUNTIME_TYPE_MISMATCH" MISSING_REQUIRED_FIELD = "MISSING_REQUIRED_FIELD" MISSING_REQUIRED_FIELDS = "MISSING_REQUIRED_FIELDS" FIELD_NOT_DEFINED = "FIELD_NOT_DEFINED" FIELDS_NOT_DEFINED = "FIELDS_NOT_DEFINED" SELECTOR...
Error(dauphin.ObjectType): class Meta: name = "SelectorTypeConfigError" interfaces = (DauphinPipelineConfigValidationError,) incoming_fields = dauphin.non_null_list(dauphin.String) class DauphinEvaluationErrorReason(dauphin.Enum):
64
64
98
13
51
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinEvaluationErrorReason
DauphinEvaluationErrorReason
368
377
368
368
b3fc54ffa55f2cb6f0a35de45ed72215b640325f
bigcode/the-stack
train
1820008fb1017a8831a94e8c
train
class
class DauphinRunGroupNotFoundError(dauphin.ObjectType): class Meta: name = "RunGroupNotFoundError" interfaces = (DauphinError,) run_id = dauphin.NonNull(dauphin.String) def __init__(self, run_id): super(DauphinRunGroupNotFoundError, self).__init__() self.run_id = check.str_...
class DauphinRunGroupNotFoundError(dauphin.ObjectType):
class Meta: name = "RunGroupNotFoundError" interfaces = (DauphinError,) run_id = dauphin.NonNull(dauphin.String) def __init__(self, run_id): super(DauphinRunGroupNotFoundError, self).__init__() self.run_id = check.str_param(run_id, "run_id") self.message = "Run grou...
interfaces = (DauphinError,) def __init__(self, message): super(DauphinInvalidPipelineRunsFilterError, self).__init__() self.message = check.str_param(message, "message") class DauphinRunGroupNotFoundError(dauphin.ObjectType):
64
64
122
16
48
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinRunGroupNotFoundError
DauphinRunGroupNotFoundError
137
147
137
137
a967f37f5150c29c37806f89bd7824a09c2bf163
bigcode/the-stack
train
50d9cdd330af0206685f97ba
train
class
class DauphinLaunchPipelineReexecutionResult(dauphin.Union): class Meta: name = "LaunchPipelineReexecutionResult" types = launch_pipeline_run_result_types + pipeline_execution_error_types
class DauphinLaunchPipelineReexecutionResult(dauphin.Union):
class Meta: name = "LaunchPipelineReexecutionResult" types = launch_pipeline_run_result_types + pipeline_execution_error_types
LaunchPipelineRunSuccess,) class DauphinLaunchPipelineExecutionResult(dauphin.Union): class Meta: name = "LaunchPipelineExecutionResult" types = launch_pipeline_run_result_types + pipeline_execution_error_types class DauphinLaunchPipelineReexecutionResult(dauphin.Union):
64
64
44
16
47
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinLaunchPipelineReexecutionResult
DauphinLaunchPipelineReexecutionResult
504
507
504
504
6c0154a76f9f62ecb1a73865f07f8dcc9b740fb2
bigcode/the-stack
train
5969322b3e485c09149a7fd8
train
class
class DauphinConflictingExecutionParamsError(dauphin.ObjectType): class Meta: name = "ConflictingExecutionParamsError" interfaces = (DauphinError,) def __init__(self, conflicting_param): self.message = "Invalid ExecutionParams. Cannot define {conflicting_param} when using a preset.".for...
class DauphinConflictingExecutionParamsError(dauphin.ObjectType):
class Meta: name = "ConflictingExecutionParamsError" interfaces = (DauphinError,) def __init__(self, conflicting_param): self.message = "Invalid ExecutionParams. Cannot define {conflicting_param} when using a preset.".format( conflicting_param=conflicting_param )
selector): self.preset = check.str_param(preset, "preset") self.message = "Preset {preset} not found in pipeline {pipeline}.".format( preset=preset, pipeline=selector.pipeline_name ) class DauphinConflictingExecutionParamsError(dauphin.ObjectType):
64
64
84
16
48
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinConflictingExecutionParamsError
DauphinConflictingExecutionParamsError
177
185
177
177
84e6573c946644857f68219a2927e0887c4289f1
bigcode/the-stack
train
8d11c8819788597efcaa9826
train
class
class RepositoryLocationsOrError(dauphin.Union): class Meta: name = "RepositoryLocationsOrError" types = ("RepositoryLocationConnection", DauphinPythonError)
class RepositoryLocationsOrError(dauphin.Union):
class Meta: name = "RepositoryLocationsOrError" types = ("RepositoryLocationConnection", DauphinPythonError)
SetNotFoundError, ) + pipeline_execution_error_types class DauphinRepositoriesOrError(dauphin.Union): class Meta: name = "RepositoriesOrError" types = ("RepositoryConnection", DauphinPythonError) class RepositoryLocationsOrError(dauphin.Union):
64
64
39
12
52
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
RepositoryLocationsOrError
RepositoryLocationsOrError
662
665
662
662
5a61494ebe7d65ae00e17473320ed7e30fec1ee6
bigcode/the-stack
train
7a2e80a196c0f66a96205454
train
class
class DauphinDagsterTypeOrError(dauphin.Union): class Meta: name = "DagsterTypeOrError" types = ( "RegularDagsterType", DauphinPipelineNotFoundError, DauphinDagsterTypeNotFoundError, DauphinPythonError, )
class DauphinDagsterTypeOrError(dauphin.Union):
class Meta: name = "DagsterTypeOrError" types = ( "RegularDagsterType", DauphinPipelineNotFoundError, DauphinDagsterTypeNotFoundError, DauphinPythonError, )
= ( "EnumConfigType", "CompositeConfigType", "RegularConfigType", DauphinPipelineNotFoundError, DauphinConfigTypeNotFoundError, DauphinPythonError, ) class DauphinDagsterTypeOrError(dauphin.Union):
64
64
70
16
48
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinDagsterTypeOrError
DauphinDagsterTypeOrError
540
548
540
540
060950367b67ef661c977b5f89c2ac113376ed8d
bigcode/the-stack
train
f31b41d5cbff916d67a15bf9
train
class
class DauphinInvalidOutputError(dauphin.ObjectType): class Meta: name = "InvalidOutputError" step_key = dauphin.NonNull(dauphin.String) invalid_output_name = dauphin.NonNull(dauphin.String)
class DauphinInvalidOutputError(dauphin.ObjectType):
class Meta: name = "InvalidOutputError" step_key = dauphin.NonNull(dauphin.String) invalid_output_name = dauphin.NonNull(dauphin.String)
in.NonNull("PipelineRun")) class DauphinInvalidStepError(dauphin.ObjectType): class Meta: name = "InvalidStepError" invalid_step_key = dauphin.NonNull(dauphin.String) class DauphinInvalidOutputError(dauphin.ObjectType):
64
64
57
14
50
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinInvalidOutputError
DauphinInvalidOutputError
466
471
466
466
3affb5e4081e84abac4d6058d11a4620cd80588c
bigcode/the-stack
train
bca1cb3a74b55e4bdefdc583
train
class
class DauphinModeNotFoundError(dauphin.ObjectType): class Meta: name = "ModeNotFoundError" interfaces = (DauphinError,) mode = dauphin.NonNull(dauphin.String) def __init__(self, mode, selector): self.mode = check.str_param(mode, "mode") self.message = "Mode {mode} not found...
class DauphinModeNotFoundError(dauphin.ObjectType):
class Meta: name = "ModeNotFoundError" interfaces = (DauphinError,) mode = dauphin.NonNull(dauphin.String) def __init__(self, mode, selector): self.mode = check.str_param(mode, "mode") self.message = "Mode {mode} not found in pipeline {pipeline}.".format( mode=m...
auphinError,) def __init__(self, conflicting_param): self.message = "Invalid ExecutionParams. Cannot define {conflicting_param} when using a preset.".format( conflicting_param=conflicting_param ) class DauphinModeNotFoundError(dauphin.ObjectType):
64
64
108
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinModeNotFoundError
DauphinModeNotFoundError
188
199
188
188
930667fb7c60f3dcd924bb1b1214980266bbadfe
bigcode/the-stack
train
23e703021f09918387eba3d0
train
class
class DauphinSensorNotFoundError(dauphin.ObjectType): class Meta: name = "SensorNotFoundError" interfaces = (DauphinError,) sensor_name = dauphin.NonNull(dauphin.String) def __init__(self, sensor_name): super(DauphinSensorNotFoundError, self).__init__() self.name = check.st...
class DauphinSensorNotFoundError(dauphin.ObjectType):
class Meta: name = "SensorNotFoundError" interfaces = (DauphinError,) sensor_name = dauphin.NonNull(dauphin.String) def __init__(self, sensor_name): super(DauphinSensorNotFoundError, self).__init__() self.name = check.str_param(sensor_name, "sensor_name") self.messa...
NotFoundError, self).__init__() self.schedule_name = check.str_param(schedule_name, "schedule_name") self.message = "Schedule {schedule_name} could not be found.".format( schedule_name=self.schedule_name ) class DauphinSensorNotFoundError(dauphin.ObjectType):
64
64
113
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinSensorNotFoundError
DauphinSensorNotFoundError
611
621
611
611
1ed45c418a9891b49a6ec503b3c48794d6a83347
bigcode/the-stack
train
0339c7b88d21d14dc4fbc07a
train
class
class DauphinPresetNotFoundError(dauphin.ObjectType): class Meta: name = "PresetNotFoundError" interfaces = (DauphinError,) preset = dauphin.NonNull(dauphin.String) def __init__(self, preset, selector): self.preset = check.str_param(preset, "preset") self.message = "Preset ...
class DauphinPresetNotFoundError(dauphin.ObjectType):
class Meta: name = "PresetNotFoundError" interfaces = (DauphinError,) preset = dauphin.NonNull(dauphin.String) def __init__(self, preset, selector): self.preset = check.str_param(preset, "preset") self.message = "Preset {preset} not found in pipeline {pipeline}.".format( ...
in.NonNull("Pipeline")) def __init__(self, message, pipeline): super(DauphinInvalidSubsetError, self).__init__() self.message = check.str_param(message, "message") self.pipeline = pipeline class DauphinPresetNotFoundError(dauphin.ObjectType):
64
64
110
15
48
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPresetNotFoundError
DauphinPresetNotFoundError
163
174
163
163
21cd791a407da4150e51b5fca3aeeae10c3af295
bigcode/the-stack
train
40a0db22b97d16708c620225
train
class
class DauphinReloadNotSupported(dauphin.ObjectType): class Meta: name = "ReloadNotSupported" interfaces = (DauphinError,) def __init__(self, location_name): self.message = "Location {location_name} does not support reloading.".format( location_name=location_name )
class DauphinReloadNotSupported(dauphin.ObjectType):
class Meta: name = "ReloadNotSupported" interfaces = (DauphinError,) def __init__(self, location_name): self.message = "Location {location_name} does not support reloading.".format( location_name=location_name )
, self).__init__() self.snapshot_id = check.str_param(snapshot_id, "snapshot_id") self.message = ( "Pipeline snapshot {snapshot_id} is not present in the current instance." ).format(snapshot_id=snapshot_id) class DauphinReloadNotSupported(dauphin.ObjectType):
64
64
74
14
50
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinReloadNotSupported
DauphinReloadNotSupported
72
80
72
72
ff42d37cbc2378f715fccbd929965f8988e8f4b7
bigcode/the-stack
train
a4a168a858856e1f956f5e6c
train
class
class DauphinPartitionBackfillResult(dauphin.Union): class Meta: name = "PartitionBackfillResult" types = ( DauphinPartitionBackfillSuccess, DauphinPartitionSetNotFoundError, ) + pipeline_execution_error_types
class DauphinPartitionBackfillResult(dauphin.Union):
class Meta: name = "PartitionBackfillResult" types = ( DauphinPartitionBackfillSuccess, DauphinPartitionSetNotFoundError, ) + pipeline_execution_error_types
.ObjectType): class Meta: name = "PartitionBackfillSuccess" backfill_id = dauphin.NonNull(dauphin.String) launched_run_ids = dauphin.non_null_list(dauphin.String) class DauphinPartitionBackfillResult(dauphin.Union):
64
64
59
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPartitionBackfillResult
DauphinPartitionBackfillResult
647
653
647
647
0f6486dc3bbf0e0879e22c68e4974135382b6883
bigcode/the-stack
train
97a2fec28e12c3503f10a838
train
class
class DauphinEvaluationStackEntry(dauphin.Union): class Meta: name = "EvaluationStackEntry" types = (DauphinEvaluationStackListItemEntry, DauphinEvaluationStackPathEntry) @staticmethod def from_native_entry(entry): if isinstance(entry, EvaluationStackPathEntry): return D...
class DauphinEvaluationStackEntry(dauphin.Union):
class Meta: name = "EvaluationStackEntry" types = (DauphinEvaluationStackListItemEntry, DauphinEvaluationStackPathEntry) @staticmethod def from_native_entry(entry): if isinstance(entry, EvaluationStackPathEntry): return DauphinEvaluationStackPathEntry(field_name=entry.fi...
field_name") super(DauphinEvaluationStackPathEntry, self).__init__() field_name = dauphin.NonNull(dauphin.String) def resolve_field_name(self, _info): return self._field_name class DauphinEvaluationStackEntry(dauphin.Union):
64
64
132
14
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinEvaluationStackEntry
DauphinEvaluationStackEntry
408
420
408
408
1e9a48efd0235b0a8084431da440d2694dae3aea
bigcode/the-stack
train
badb801ee8dd365c4efc4260
train
class
class DauphinPipelineConfigValidationResult(dauphin.Union): class Meta: name = "PipelineConfigValidationResult" types = ( DauphinInvalidSubsetError, DauphinPipelineConfigValidationValid, DauphinPipelineConfigValidationInvalid, DauphinPipelineNotFoundEr...
class DauphinPipelineConfigValidationResult(dauphin.Union):
class Meta: name = "PipelineConfigValidationResult" types = ( DauphinInvalidSubsetError, DauphinPipelineConfigValidationValid, DauphinPipelineConfigValidationInvalid, DauphinPipelineNotFoundError, DauphinPythonError, )
ValidationInvalid( pipeline_name=represented_pipeline.name, errors=[ DauphinPipelineConfigValidationError.from_dagster_error( represented_pipeline.config_schema_snapshot, err ) for err in errors ], ) class Da...
64
64
76
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPipelineConfigValidationResult
DauphinPipelineConfigValidationResult
231
240
231
231
da30c77919227a1e1d7f338214497272d133aab8
bigcode/the-stack
train
7ae401896d79a287900a78cd
train
class
class DauphinRunGroupOrError(dauphin.Union): class Meta: name = "RunGroupOrError" types = ("RunGroup", DauphinRunGroupNotFoundError, DauphinPythonError)
class DauphinRunGroupOrError(dauphin.Union):
class Meta: name = "RunGroupOrError" types = ("RunGroup", DauphinRunGroupNotFoundError, DauphinPythonError)
RunsOrError(dauphin.Union): class Meta: name = "PipelineRunsOrError" types = (DauphinPipelineRuns, DauphinInvalidPipelineRunsFilterError, DauphinPythonError) class DauphinRunGroupOrError(dauphin.Union):
64
64
50
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinRunGroupOrError
DauphinRunGroupOrError
582
585
582
582
34cd9463dc11395e983b00fe36b2037404905cca
bigcode/the-stack
train
7e389eac382f9608872024b7
train
class
class DauphinExecutionPlanOrError(dauphin.Union): class Meta: name = "ExecutionPlanOrError" types = ( "ExecutionPlan", DauphinPipelineConfigValidationInvalid, DauphinPipelineNotFoundError, DauphinInvalidSubsetError, DauphinPythonError, ...
class DauphinExecutionPlanOrError(dauphin.Union):
class Meta: name = "ExecutionPlanOrError" types = ( "ExecutionPlan", DauphinPipelineConfigValidationInvalid, DauphinPipelineNotFoundError, DauphinInvalidSubsetError, DauphinPythonError, )
: name = "EvaluationStack" entries = dauphin.non_null_list("EvaluationStackEntry") def resolve_entries(self, _): return map(DauphinEvaluationStackEntry.from_native_entry, self._stack.entries) class DauphinExecutionPlanOrError(dauphin.Union):
64
64
72
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinExecutionPlanOrError
DauphinExecutionPlanOrError
440
449
440
440
f61c6501320b4599b560fee21411d0e7111a5e6a
bigcode/the-stack
train
023c9fae653cbd395088772c
train
class
class DauphinPipelineRunNotFoundError(dauphin.ObjectType): class Meta: name = "PipelineRunNotFoundError" interfaces = (DauphinError,) run_id = dauphin.NonNull(dauphin.String) def __init__(self, run_id): super(DauphinPipelineRunNotFoundError, self).__init__() self.run_id = c...
class DauphinPipelineRunNotFoundError(dauphin.ObjectType):
class Meta: name = "PipelineRunNotFoundError" interfaces = (DauphinError,) run_id = dauphin.NonNull(dauphin.String) def __init__(self, run_id): super(DauphinPipelineRunNotFoundError, self).__init__() self.run_id = check.str_param(run_id, "run_id") self.message = "Pi...
.repository_name = selector.repository_name self.repository_location_name = selector.location_name self.message = "Could not find Pipeline {selector.location_name}.{selector.repository_name}.{selector.pipeline_name}".format( selector=selector ) class DauphinPipelineRunNotFoundError(d...
64
64
120
16
48
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPipelineRunNotFoundError
DauphinPipelineRunNotFoundError
114
124
114
114
1b951020e72182549237a8aa6dcdc4cb9ac9b77d
bigcode/the-stack
train
25d76528fe9cf2803dceb490
train
class
class DauphinPipelineConfigValidationInvalid(dauphin.ObjectType): class Meta: name = "PipelineConfigValidationInvalid" pipeline_name = dauphin.NonNull(dauphin.String) errors = dauphin.non_null_list("PipelineConfigValidationError") @staticmethod def for_validation_errors(represented_pipelin...
class DauphinPipelineConfigValidationInvalid(dauphin.ObjectType):
class Meta: name = "PipelineConfigValidationInvalid" pipeline_name = dauphin.NonNull(dauphin.String) errors = dauphin.non_null_list("PipelineConfigValidationError") @staticmethod def for_validation_errors(represented_pipeline, errors): check.inst_param(represented_pipeline, "repres...
selector.pipeline_name ) class DauphinPipelineConfigValidationValid(dauphin.ObjectType): class Meta: name = "PipelineConfigValidationValid" pipeline_name = dauphin.NonNull(dauphin.String) class DauphinPipelineConfigValidationInvalid(dauphin.ObjectType):
64
64
162
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPipelineConfigValidationInvalid
DauphinPipelineConfigValidationInvalid
209
228
209
209
2020d84ec93ae4b2a2ecf72ac904fe77691bbd5b
bigcode/the-stack
train
cbc72f8d10cc602ea1d6c8e8
train
class
class DauphinRunGroupsOrError(dauphin.ObjectType): class Meta: name = "RunGroupsOrError" types = ("RunGroups", DauphinPythonError) results = dauphin.non_null_list("RunGroup")
class DauphinRunGroupsOrError(dauphin.ObjectType):
class Meta: name = "RunGroupsOrError" types = ("RunGroups", DauphinPythonError) results = dauphin.non_null_list("RunGroup")
DauphinRunGroupOrError(dauphin.Union): class Meta: name = "RunGroupOrError" types = ("RunGroup", DauphinRunGroupNotFoundError, DauphinPythonError) class DauphinRunGroupsOrError(dauphin.ObjectType):
64
64
54
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinRunGroupsOrError
DauphinRunGroupsOrError
588
593
588
588
dd0655e0fdd846e3bbdbb3042c48f31c44e5fe5c
bigcode/the-stack
train
1d8cb4c380bb1e4e253cbac3
train
class
class DauphinInvalidPipelineRunsFilterError(dauphin.ObjectType): class Meta: name = "InvalidPipelineRunsFilterError" interfaces = (DauphinError,) def __init__(self, message): super(DauphinInvalidPipelineRunsFilterError, self).__init__() self.message = check.str_param(message, "m...
class DauphinInvalidPipelineRunsFilterError(dauphin.ObjectType):
class Meta: name = "InvalidPipelineRunsFilterError" interfaces = (DauphinError,) def __init__(self, message): super(DauphinInvalidPipelineRunsFilterError, self).__init__() self.message = check.str_param(message, "message")
PipelineRunNotFoundError, self).__init__() self.run_id = check.str_param(run_id, "run_id") self.message = "Pipeline run {run_id} could not be found.".format(run_id=run_id) class DauphinInvalidPipelineRunsFilterError(dauphin.ObjectType):
64
64
78
16
48
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinInvalidPipelineRunsFilterError
DauphinInvalidPipelineRunsFilterError
127
134
127
127
c292f206554e9d4c6b45997486fd3987a1d0b989
bigcode/the-stack
train
7d73475a7acb680bb0f1d0c5
train
class
class DauphinRepositoriesOrError(dauphin.Union): class Meta: name = "RepositoriesOrError" types = ("RepositoryConnection", DauphinPythonError)
class DauphinRepositoriesOrError(dauphin.Union):
class Meta: name = "RepositoriesOrError" types = ("RepositoryConnection", DauphinPythonError)
auphin.Union): class Meta: name = "PartitionBackfillResult" types = ( DauphinPartitionBackfillSuccess, DauphinPartitionSetNotFoundError, ) + pipeline_execution_error_types class DauphinRepositoriesOrError(dauphin.Union):
64
64
39
14
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinRepositoriesOrError
DauphinRepositoriesOrError
656
659
656
656
f13e7504094f8e6fcbd68ef0145188096410ba4b
bigcode/the-stack
train
69a4e41a849a42ef0e3ae962
train
class
class DauphinPipelineRunsOrError(dauphin.Union): class Meta: name = "PipelineRunsOrError" types = (DauphinPipelineRuns, DauphinInvalidPipelineRunsFilterError, DauphinPythonError)
class DauphinPipelineRunsOrError(dauphin.Union):
class Meta: name = "PipelineRunsOrError" types = (DauphinPipelineRuns, DauphinInvalidPipelineRunsFilterError, DauphinPythonError)
resolve_results(self, graphene_info): return get_runs(graphene_info, self._filters, self._cursor, self._limit) def resolve_count(self, graphene_info): return get_runs_count(graphene_info, self._filters) class DauphinPipelineRunsOrError(dauphin.Union):
64
64
54
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPipelineRunsOrError
DauphinPipelineRunsOrError
576
579
576
576
4fbf19f85b415a9c3bb05156911d50de7e8486cb
bigcode/the-stack
train
9bacc5e9cb65c71494cf91fe
train
class
class DauphinSelectorTypeConfigError(dauphin.ObjectType): class Meta: name = "SelectorTypeConfigError" interfaces = (DauphinPipelineConfigValidationError,) incoming_fields = dauphin.non_null_list(dauphin.String)
class DauphinSelectorTypeConfigError(dauphin.ObjectType):
class Meta: name = "SelectorTypeConfigError" interfaces = (DauphinPipelineConfigValidationError,) incoming_fields = dauphin.non_null_list(dauphin.String)
phin.ObjectType): class Meta: name = "FieldsNotDefinedConfigError" interfaces = (DauphinPipelineConfigValidationError,) field_names = dauphin.non_null_list(dauphin.String) class DauphinSelectorTypeConfigError(dauphin.ObjectType):
64
64
58
15
49
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinSelectorTypeConfigError
DauphinSelectorTypeConfigError
360
365
360
360
15f01f35f30bef47a75d990bd0576a0f3f8ec558
bigcode/the-stack
train
458f9ec0fbb26e2e77c93066
train
class
class DauphinEvaluationStack(dauphin.ObjectType): def __init__(self, config_schema_snapshot, stack): self._config_schema_snapshot = check.inst_param( config_schema_snapshot, "config_schema_snapshot", ConfigSchemaSnapshot ) self._stack = stack super(DauphinEvaluationStack,...
class DauphinEvaluationStack(dauphin.ObjectType):
def __init__(self, config_schema_snapshot, stack): self._config_schema_snapshot = check.inst_param( config_schema_snapshot, "config_schema_snapshot", ConfigSchemaSnapshot ) self._stack = stack super(DauphinEvaluationStack, self).__init__() class Meta: name = ...
entry.field_name) elif isinstance(entry, EvaluationStackListItemEntry): return DauphinEvaluationStackListItemEntry(list_index=entry.list_index) else: check.failed("Unsupported stack entry type {entry}".format(entry=entry)) class DauphinEvaluationStack(dauphin.ObjectType):
64
64
125
13
51
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinEvaluationStack
DauphinEvaluationStack
423
437
423
423
e7f3d10f551dbdc14699b9f7bf672eaa40abab52
bigcode/the-stack
train
829711e1be64f391172986e1
train
class
class DauphinPartitionSetNotFoundError(dauphin.ObjectType): class Meta: name = "PartitionSetNotFoundError" interfaces = (DauphinError,) partition_set_name = dauphin.NonNull(dauphin.String) def __init__(self, partition_set_name): super(DauphinPartitionSetNotFoundError, self).__init_...
class DauphinPartitionSetNotFoundError(dauphin.ObjectType):
class Meta: name = "PartitionSetNotFoundError" interfaces = (DauphinError,) partition_set_name = dauphin.NonNull(dauphin.String) def __init__(self, partition_set_name): super(DauphinPartitionSetNotFoundError, self).__init__() self.partition_set_name = check.str_param(partit...
super(DauphinSensorNotFoundError, self).__init__() self.name = check.str_param(sensor_name, "sensor_name") self.message = f"Sensor {sensor_name} is not present in the currently loaded repository." class DauphinPartitionSetNotFoundError(dauphin.ObjectType):
64
64
133
16
48
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinPartitionSetNotFoundError
DauphinPartitionSetNotFoundError
624
636
624
624
f974f5e446a2b795fedfd105f4a411e4df766380
bigcode/the-stack
train
e622a2af89e581ca45c2a8db
train
class
class DauphinDagsterTypeNotFoundError(dauphin.ObjectType): class Meta: name = "DagsterTypeNotFoundError" interfaces = (DauphinError,) dagster_type_name = dauphin.NonNull(dauphin.String)
class DauphinDagsterTypeNotFoundError(dauphin.ObjectType):
class Meta: name = "DagsterTypeNotFoundError" interfaces = (DauphinError,) dagster_type_name = dauphin.NonNull(dauphin.String)
name = "ConfigTypeNotFoundError" interfaces = (DauphinError,) pipeline = dauphin.NonNull("Pipeline") config_type_name = dauphin.NonNull(dauphin.String) class DauphinDagsterTypeNotFoundError(dauphin.ObjectType):
64
64
60
17
47
ericct/dagster
python_modules/dagster-graphql/dagster_graphql/schema/errors.py
Python
DauphinDagsterTypeNotFoundError
DauphinDagsterTypeNotFoundError
519
524
519
519
018dada261b51a074dbc98186bdf6bed5e208ec0
bigcode/the-stack
train
ea2f4900185cc269ab499a65
train
function
def _wrap_callback_errors(callback, on_callback_error, message): """Wraps a user callback so that if an exception occurs the message is nacked. Args: callback (Callable[None, Message]): The user callback. message (~Message): The Pub/Sub message. """ try: callback(message) ...
def _wrap_callback_errors(callback, on_callback_error, message):
"""Wraps a user callback so that if an exception occurs the message is nacked. Args: callback (Callable[None, Message]): The user callback. message (~Message): The Pub/Sub message. """ try: callback(message) except Exception as exc: # Note: the likelihood of this...
sub)class. """ if isinstance(maybe_exception, grpc.RpcError): return exceptions.from_grpc_error(maybe_exception) elif isinstance(maybe_exception, BaseException): return maybe_exception return Exception(maybe_exception) def _wrap_callback_errors(callback, on_callback_error, message):
64
64
155
13
51
manojpandey/python-pubsub
google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py
Python
_wrap_callback_errors
_wrap_callback_errors
74
92
74
74
e2482609e4ff25f435cad2821e96cc96fc69d532
bigcode/the-stack
train
ee7c9cb868c92ac2af6bcf3c
train
class
class StreamingPullManager(object): """The streaming pull manager coordinates pulling messages from Pub/Sub, leasing them, and scheduling them to be processed. Args: client (~.pubsub_v1.subscriber.client): The subscriber client used to create this instance. subscription (str): T...
class StreamingPullManager(object):
"""The streaming pull manager coordinates pulling messages from Pub/Sub, leasing them, and scheduling them to be processed. Args: client (~.pubsub_v1.subscriber.client): The subscriber client used to create this instance. subscription (str): The name of the subscription. The can...
Any): The object to wrap, usually a gRPC exception class. Returns: The argument itself if an instance of ``BaseException``, otherwise the argument represented as an instance of ``Exception`` (sub)class. """ if isinstance(maybe_exception, grpc.RpcError): return exceptions.from_grpc...
256
256
5,009
6
250
manojpandey/python-pubsub
google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py
Python
StreamingPullManager
StreamingPullManager
95
728
95
95
00a60e8b80ddc49fd72ca96e499a15f9efad01c8
bigcode/the-stack
train
ad6cd563df3d1fe2df36baac
train
function
def _wrap_as_exception(maybe_exception): """Wrap an object as a Python exception, if needed. Args: maybe_exception (Any): The object to wrap, usually a gRPC exception class. Returns: The argument itself if an instance of ``BaseException``, otherwise the argument represented as an...
def _wrap_as_exception(maybe_exception):
"""Wrap an object as a Python exception, if needed. Args: maybe_exception (Any): The object to wrap, usually a gRPC exception class. Returns: The argument itself if an instance of ``BaseException``, otherwise the argument represented as an instance of ``Exception`` (sub)class. ...
_TERMINATING_STREAM_ERRORS = (exceptions.Cancelled,) _MAX_LOAD = 1.0 """The load threshold above which to pause the incoming message stream.""" _RESUME_THRESHOLD = 0.8 """The load threshold below which to resume the incoming message stream.""" def _wrap_as_exception(maybe_exception):
63
64
124
9
54
manojpandey/python-pubsub
google/cloud/pubsub_v1/subscriber/_protocol/streaming_pull_manager.py
Python
_wrap_as_exception
_wrap_as_exception
56
71
56
56
bde6b5703af7a96f50e61c0ecec657812e167a98
bigcode/the-stack
train
1048ea4cea15df7fa1b9b0d6
train
function
def get_snapshot(hCamera, imageFormat, fileName): assert 0 != hCamera assert fileName # Determine the size of buffer we'll need to hold an image from the camera width, height, bytesPerPixel = determine_raw_image_size(hCamera) if 0 == width or 0 == height: return FAILURE ...
def get_snapshot(hCamera, imageFormat, fileName):
assert 0 != hCamera assert fileName # Determine the size of buffer we'll need to hold an image from the camera width, height, bytesPerPixel = determine_raw_image_size(hCamera) if 0 == width or 0 == height: return FAILURE # Create a buffer to hold the raw image npImage ...
capture an image from a Pixelink camera and save the encoded image to folder as a file. This code is very similiar with the getSnappshot sample, but a NumPy 2D array is used for the image buffer """ from pixelinkWrapper import* from ctypes import* import os import numpy as np SUCCESS = 0 FAILURE = 1 ""...
107
107
357
12
95
pixelink-support/PixelinkPythonWrapper
samples/Linux/getNumPySnapshot.py
Python
get_snapshot
get_snapshot
19
59
19
20
bb6c10e19fdb5c5b1e7106893e62de1bd95171e6
bigcode/the-stack
train
b6f4f3458cc602806561cdb3
train
function
def main(): filenameJpeg = "snapshot.jpg" filenameBmp = "snapshot.bmp" filenameTiff = "snapshot.tiff" filenamePsd = "snapshot.psd" filenameRgb24 = "snapshot.rgb24.bin" filenameRgb24Nondib = "snapshot.rgb24nondib.bin" filenameRgb48 = "snapshot.rgb48.bin" filenameMono8 = "sna...
def main():
filenameJpeg = "snapshot.jpg" filenameBmp = "snapshot.bmp" filenameTiff = "snapshot.tiff" filenamePsd = "snapshot.psd" filenameRgb24 = "snapshot.rgb24.bin" filenameRgb24Nondib = "snapshot.rgb24nondib.bin" filenameRgb48 = "snapshot.rgb48.bin" filenameMono8 = "snapshot.mono8.bin" ...
ret is used for this call, it will lose frame descriptor information. PxLApi.setStreamState(hCamera, PxLApi.StreamState.STOP) return ret """ Save the encoded image buffer to a file This overwrites any existing file Returns SUCCESS or FAILURE """ def save_image_to_file(fileName, formatedImage): ...
195
195
653
4
190
pixelink-support/PixelinkPythonWrapper
samples/Linux/getNumPySnapshot.py
Python
main
main
180
238
180
181
4d92963792ff0a63b5e2b9c049311ea93475c844
bigcode/the-stack
train
275f923379708321696c121b
train
function
def get_np_image(hCamera, npImage): assert 0 != hCamera assert 0 != len(npImage) MAX_NUM_TRIES = 4 # Put camera into streaming state so we can capture an image ret = PxLApi.setStreamState(hCamera, PxLApi.StreamState.START) if not PxLApi.apiSuccess(ret[0]): return FAILURE ...
def get_np_image(hCamera, npImage):
assert 0 != hCamera assert 0 != len(npImage) MAX_NUM_TRIES = 4 # Put camera into streaming state so we can capture an image ret = PxLApi.setStreamState(hCamera, PxLApi.StreamState.START) if not PxLApi.apiSuccess(ret[0]): return FAILURE # Get an image # NOTE: P...
: PxLApi.getNextNumPyFrame is a blocking call. i.e. PxLApi.getNextNumPyFrame won't return until an image is captured. So, if you're using hardware triggering, it won't return until the camera is triggered. Returns a return code with success and frame descriptor information or API error """ def get_np_image(hCame...
76
76
255
10
66
pixelink-support/PixelinkPythonWrapper
samples/Linux/getNumPySnapshot.py
Python
get_np_image
get_np_image
122
149
122
123
ad8aa4decc7c1ffc3960fe83027d100e12b827ea
bigcode/the-stack
train
807fe866cd5ed839180eee9b
train
function
def save_image_to_file(fileName, formatedImage): assert fileName assert 0 != len(formatedImage) # Create a folder to save snapshots if it does not exist if not os.path.exists("getSnapshot"): os.makedirs("getSnapshot") filepath = "getSnapshot/" + fileName # Open a file f...
def save_image_to_file(fileName, formatedImage):
assert fileName assert 0 != len(formatedImage) # Create a folder to save snapshots if it does not exist if not os.path.exists("getSnapshot"): os.makedirs("getSnapshot") filepath = "getSnapshot/" + fileName # Open a file for binary write file = open(filepath, "wb") if...
will lose frame descriptor information. PxLApi.setStreamState(hCamera, PxLApi.StreamState.STOP) return ret """ Save the encoded image buffer to a file This overwrites any existing file Returns SUCCESS or FAILURE """ def save_image_to_file(fileName, formatedImage):
64
64
132
13
51
pixelink-support/PixelinkPythonWrapper
samples/Linux/getNumPySnapshot.py
Python
save_image_to_file
save_image_to_file
157
177
157
158
eedbadba89ab7931f4b8fd034b0a3ef03f3bd7ba
bigcode/the-stack
train
64706957f2291c767bf42621
train
function
def determine_raw_image_size(hCamera): assert 0 != hCamera roiWidth = 0 roiHeight = 0 # Get region of interest (ROI) ret = PxLApi.getFeature(hCamera, PxLApi.FeatureId.ROI) if PxLApi.apiSuccess(ret[0]): params = ret[2] roiWidth = params[PxLApi.RoiParams.WIDTH] ...
def determine_raw_image_size(hCamera):
assert 0 != hCamera roiWidth = 0 roiHeight = 0 # Get region of interest (ROI) ret = PxLApi.getFeature(hCamera, PxLApi.FeatureId.ROI) if PxLApi.apiSuccess(ret[0]): params = ret[2] roiWidth = params[PxLApi.RoiParams.WIDTH] roiHeight = params[PxLApi.RoiParams.HEI...
:endCol] = 0xff # Encode the raw image into something displayable ret = PxLApi.formatNumPyImage(npImage, frameDescriptor, imageFormat) if SUCCESS == ret[0]: formatedImage = ret[1] # Save formated image into a file if s...
138
138
461
8
130
pixelink-support/PixelinkPythonWrapper
samples/Linux/getNumPySnapshot.py
Python
determine_raw_image_size
determine_raw_image_size
67
111
67
68
25ed9e404982b2731733345a434a083e70ec9b40
bigcode/the-stack
train