function stringlengths 11 56k | repo_name stringlengths 5 60 | features list |
|---|---|---|
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self,
**kwargs | Azure/azure-sdk-for-python | [
3526,
2256,
3526,
986,
1335285972
] |
def __init__(
self, plotly_name="color", parent_name="scatter.unselected.textfont", **kwargs | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def add_dflt(func, dflt_if_none):
@wraps(func)
def wrapped_func(*args, **kwargs):
result = func(*args, **kwargs)
if result is not None:
return result
else:
if callable(dflt_if_none):
return dflt_if_none()
else:
return df... | thorwhalen/ut | [
4,
3,
4,
24,
1426246351
] |
def pipe10(xs):
for i in pipelined(range(len(xs) - 1), ii=-1):
v = xs[i] + xs[i + 1]
v >>= 1
xs[i] = v | ktok07b6/polyphony | [
90,
7,
90,
1,
1448846734
] |
def test():
data = [0, 16, 32, -16, -64]
pipe10(data)
assert 8 == data[0]
assert 24 == data[1]
assert 8 == data[2]
assert -40 == data[3]
assert -64 == data[4] | ktok07b6/polyphony | [
90,
7,
90,
1,
1448846734
] |
def __init__(self, mode="fixed", targetRange=0.0, discrete=False, targetValue=0.0, monitoredPhase="s12N", RegulatingCondEq=None, Terminal=None, RegulationSchedule=None, *args, **kw_args):
"""Initialises a new 'RegulatingControl' instance.
@param mode: The regulating control mode presently available. T... | rwl/PyCIM | [
68,
33,
68,
7,
1238978196
] |
def getRegulatingCondEq(self):
"""The equipment that participates in this regulating control scheme.
"""
return self._RegulatingCondEq | rwl/PyCIM | [
68,
33,
68,
7,
1238978196
] |
def addRegulatingCondEq(self, *RegulatingCondEq):
for obj in RegulatingCondEq:
obj.RegulatingControl = self | rwl/PyCIM | [
68,
33,
68,
7,
1238978196
] |
def getTerminal(self):
"""The terminal associated with this regulating control.
"""
return self._Terminal | rwl/PyCIM | [
68,
33,
68,
7,
1238978196
] |
def getRegulationSchedule(self):
"""Schedule for this Regulating regulating control.
"""
return self._RegulationSchedule | rwl/PyCIM | [
68,
33,
68,
7,
1238978196
] |
def addRegulationSchedule(self, *RegulationSchedule):
for obj in RegulationSchedule:
obj.RegulatingControl = self | rwl/PyCIM | [
68,
33,
68,
7,
1238978196
] |
def __init__(self, message, code=None):
self.message = message
self.code = code | indico/indico | [
1446,
358,
1446,
649,
1311774990
] |
def __init__(self, results, path='', query='', ts=None, extra=None):
if ts is None:
ts = int(time.time())
self.results = results
self.path = path
self.query = query
self.ts = ts
self.extra = extra or {} | indico/indico | [
1446,
358,
1446,
649,
1311774990
] |
def url(self):
prefix = config.BASE_URL
if self.query:
return f'{prefix}{self.path}?{self.query}'
return prefix + self.path | indico/indico | [
1446,
358,
1446,
649,
1311774990
] |
def count(self):
return len(self.results) | indico/indico | [
1446,
358,
1446,
649,
1311774990
] |
def __init__(
self, plotly_name="align", parent_name="scatterternary.hoverlabel", **kwargs | plotly/python-api | [
13052,
2308,
13052,
1319,
1385013188
] |
def __init__(self, *args, **kwargs):
wrap = kwargs.pop('wrap_longitude', True)
super().__init__(*args, **kwargs)
if wrap and isinstance(self._data, (coord.UnitSphericalRepresentation,
coord.SphericalRepresentation)):
self._data.lon.wrap_ang... | adrn/gala | [
104,
51,
104,
37,
1394412978
] |
def represent_as(self, base, s='base', in_frame_units=False):
r = super().represent_as(base, s=s, in_frame_units=in_frame_units)
if hasattr(r, "lon"):
r.lon.wrap_angle = self._default_wrap_angle
return r | adrn/gala | [
104,
51,
104,
37,
1394412978
] |
def icrs_to_jhelum():
""" Compute the transformation from Galactic spherical to
heliocentric Jhelum coordinates.
"""
return R | adrn/gala | [
104,
51,
104,
37,
1394412978
] |
def test_add_comment_marker_props(self):
f = aaf.open()
# add RGBColor TypeDef
rgb_id = AUID("urn:uuid:e96e6d43-c383-11d3-a069-006094eb75cb")
rgb_typedef_pairs = [('red', 'UInt16'),
('green', 'UInt16'),
("blue", 'UInt16'),
... | markreidvfx/pyaaf | [
46,
8,
46,
14,
1377887118
] |
def page_dumb(strng, start=0, screen_lines=25):
"""Very dumb 'pager' in Python, for when nothing else works.
Only moves forward, same interface as page(), except for pager_cmd and
mode."""
out_ln = strng.splitlines()[start:]
screens = chop(out_ln, screen_lines - 1)
if len(screens) == 1:
... | mattvonrocketstein/smash | [
12,
1,
12,
10,
1321798817
] |
def page(strng, start=0, screen_lines=0, pager_cmd=None):
"""Display a string, piping through a pager after a certain length.
strng can be a mime-bundle dict, supplying multiple representations,
keyed by mime-type.
The screen_lines parameter specifies the number of *usable* lines of your
terminal ... | mattvonrocketstein/smash | [
12,
1,
12,
10,
1321798817
] |
def get_pager_cmd(pager_cmd=None):
"""Return a pager command.
Makes some attempts at finding an OS-correct one.
"""
if os.name == 'posix':
default_pager_cmd = 'less -r' # -r for color control sequences
elif os.name in ['nt', 'dos']:
default_pager_cmd = 'type'
if pager_cmd is N... | mattvonrocketstein/smash | [
12,
1,
12,
10,
1321798817
] |
def page_more():
""" Smart pausing between pages
@return: True if need print more lines, False if quit
"""
io.stdout.write('---Return to continue, q to quit--- ')
ans = msvcrt.getwch()
if ans in ("q", "Q"):
result = False
else:
result =... | mattvonrocketstein/smash | [
12,
1,
12,
10,
1321798817
] |
def page_more():
ans = py3compat.input('---Return to continue, q to quit--- ')
if ans.lower().startswith('q'):
return False
else:
return True | mattvonrocketstein/smash | [
12,
1,
12,
10,
1321798817
] |
def get(self):
user = g.user
query = apply_rules_blueprint_templates(user)
query = query.order_by(BlueprintTemplate.name)
results = []
for blueprint_template in query.all():
plugin = Plugin.query.filter_by(id=blueprint_template.plugin).first()
blueprint_te... | CSC-IT-Center-for-Science/pouta-blueprints | [
7,
6,
7,
71,
1418128274
] |
def post(self):
form = BlueprintTemplateForm()
if not form.validate_on_submit():
logging.warn("validation error on create blueprint_template")
return form.errors, 422
blueprint_template = BlueprintTemplate()
blueprint_template.name = form.name.data
bluepri... | CSC-IT-Center-for-Science/pouta-blueprints | [
7,
6,
7,
71,
1418128274
] |
def get(self, template_id):
args = {'template_id': template_id}
query = apply_rules_blueprint_templates(g.user, args)
blueprint_template = query.first()
if not blueprint_template:
abort(404)
return blueprint_template | CSC-IT-Center-for-Science/pouta-blueprints | [
7,
6,
7,
71,
1418128274
] |
def put(self, template_id):
form = BlueprintTemplateForm()
if not form.validate_on_submit():
logging.warn("validation error on update blueprint_template config")
return form.errors, 422
blueprint_template = BlueprintTemplate.query.filter_by(id=template_id).first()
... | CSC-IT-Center-for-Science/pouta-blueprints | [
7,
6,
7,
71,
1418128274
] |
def put(self, template_id):
template = BlueprintTemplate.query.get_or_404(template_id)
db.session.expunge(template)
make_transient(template)
template.id = uuid.uuid4().hex
template.name = format("%s - %s" % (template.name, 'Copy'))
db.session.add(template)
db.ses... | CSC-IT-Center-for-Science/pouta-blueprints | [
7,
6,
7,
71,
1418128274
] |
def blueprint_schemaform_config(blueprint_template):
"""Generates config,schema and model objects used in schemaform ui component for blueprints"""
plugin = Plugin.query.filter_by(id=blueprint_template.plugin).first()
schema = plugin.schema
blueprint_schema = {'type': 'object', 'title': 'Comment', 'desc... | CSC-IT-Center-for-Science/pouta-blueprints | [
7,
6,
7,
71,
1418128274
] |
def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
EventEmitter.__init__(self, event_queue, watch, timeout)
self._lock = threading.Lock()
self._inotify = None | wandb/client | [
5607,
445,
5607,
725,
1490334383
] |
def on_thread_stop(self):
if self._inotify:
self._inotify.close() | wandb/client | [
5607,
445,
5607,
725,
1490334383
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.