function stringlengths 11 56k | repo_name stringlengths 5 60 | features list |
|---|---|---|
def create_fitted_threshold_hists(self):
return self._create_fitted_threshold_hists | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_fitted_threshold_hists(self, value):
self._create_fitted_threshold_hists = value | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def correct_corrupted_data(self):
return self._correct_corrupted_data | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def correct_corrupted_data(self, value):
self._correct_corrupted_data = value | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_error_hist(self):
return self._create_error_hist | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_error_hist(self, value):
self._create_error_hist = value | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_trigger_error_hist(self):
return self._create_trigger_error_hist | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_trigger_error_hist(self, value):
self._create_trigger_error_hist = value | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_service_record_hist(self):
return self._create_service_record_hist | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_service_record_hist(self, value):
self._create_service_record_hist = value | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_tdc_counter_hist(self):
return self._create_tdc_counter_hist | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_tdc_counter_hist(self, value):
self._create_tdc_counter_hist = value | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_meta_event_index(self):
return self._create_meta_event_index | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_meta_event_index(self, value):
self._create_meta_event_index = value | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_meta_word_index(self):
return self._create_meta_word_index | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_meta_word_index(self, value):
self._create_meta_word_index = value
self.interpreter.create_meta_data_word_index(value) | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def fei4b(self):
return self._fei4b | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def fei4b(self, value):
self._fei4b = value
self.interpreter.set_FEI4B(value) | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def n_injections(self):
"""Get the numbers of injections per pixel."""
return self._n_injection | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def n_injections(self, value):
"""Set the numbers of injections per pixel."""
self._n_injection = value | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def trig_count(self):
"""Get the numbers of BCIDs (usually 16) of one event."""
return self._trig_count | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def trig_count(self, value):
"""Set the numbers of BCIDs (usually 16) of one event."""
self._trig_count = 16 if value == 0 else value
self.interpreter.set_trig_count(self._trig_count) | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def max_tot_value(self):
"""Get maximum ToT value that is considered to be a hit"""
return self._max_tot_value | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def max_tot_value(self, value):
"""Set maximum ToT value that is considered to be a hit"""
self._max_tot_value = value
self.interpreter.set_max_tot(self._max_tot_value)
self.histogram.set_max_tot(self._max_tot_value)
self.clusterizer.set_max_hit_charge(self._max_tot_value) | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_cluster_hit_table(self):
return self._create_cluster_hit_table | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_cluster_hit_table(self, value):
self._create_cluster_hit_table = value | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_cluster_table(self):
return self._create_cluster_table | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_cluster_table(self, value):
self._create_cluster_table = value | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_cluster_size_hist(self):
return self._create_cluster_size_hist | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_cluster_size_hist(self, value):
self._create_cluster_size_hist = value | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_cluster_tot_hist(self):
return self._create_cluster_tot_hist | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def create_cluster_tot_hist(self, value):
self._create_cluster_tot_hist = value | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def align_at_trigger(self):
return self._align_at_trigger | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def align_at_trigger(self, value):
self._align_at_trigger = value
self.interpreter.align_at_trigger(value) | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def align_at_tdc(self):
return self._align_at_tdc | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def align_at_tdc(self, value):
self._align_at_tdc = value
self.interpreter.align_at_tdc(value) | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def trigger_data_format(self):
return self._trigger_data_format | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def trigger_data_format(self, value):
self._trigger_data_format = value
self.interpreter.set_trigger_data_format(value) | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def use_tdc_trigger_time_stamp(self):
return self._use_tdc_trigger_time_stamp | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def use_tdc_trigger_time_stamp(self, value):
self._use_tdc_trigger_time_stamp = value
self.interpreter.use_tdc_trigger_time_stamp(value) | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def max_tdc_delay(self):
return self._max_tdc_delay | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def max_tdc_delay(self, value):
self._max_tdc_delay = value
self.interpreter.set_max_tdc_delay(value) | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def max_trigger_number(self):
return self._max_trigger_number | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def max_trigger_number(self, value):
self._max_trigger_number = value
self.interpreter.set_max_trigger_number(value) | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def set_stop_mode(self):
return self._set_stop_mode | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def set_stop_mode(self, value):
self._set_stop_mode = value | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def _create_additional_data(self):
logging.info('Creating selected event histograms...')
if self._analyzed_data_file is not None and self._create_meta_event_index:
meta_data_size = self.meta_data.shape[0]
n_event_index = self.interpreter.get_n_meta_data_event()
if met... | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def _create_additional_cluster_data(self, safe_to_file=True):
logging.info('Create selected cluster histograms')
if self._create_cluster_size_hist:
if self._analyzed_data_file is not None and safe_to_file:
cluster_size_hist_table = self.out_file_h5.create_carray(self.out_file... | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def analyze_hits(self, hits, scan_parameter=None):
n_hits = hits.shape[0]
logging.debug('Analyze %d hits' % n_hits)
if scan_parameter is None: # if nothing specified keep actual setting
logging.debug('Keep scan parameter settings ')
elif not scan_parameter: # set no scan... | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def histogram_hits(self, hits, start_index=None, stop_index=None):
self.histogram.add_hits(hits[start_index:stop_index]) | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def plot_histograms(self, pdf_filename=None, analyzed_data_file=None, maximum=None, create_hit_hists_only=False): # plots the histogram from output file if available otherwise from ram
logging.info('Creating histograms%s', (' (source: %s)' % analyzed_data_file) if analyzed_data_file is not None else (' (source... | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def is_open(self, h5_file):
if isinstance(h5_file, tb.file.File):
return True
return False | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def is_cluster_hits(self): # returns true if a setting needs to have the clusterizer active
if self.create_cluster_hit_table or self.create_cluster_table or self.create_cluster_size_hist or self.create_cluster_tot_hist:
return True
return False | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def _get_plsr_dac_charge(self, plsr_dac_array, no_offset=False):
'''Takes the PlsrDAC calibration and the stored C-high/C-low mask to calculate the charge from the PlsrDAC array on a pixel basis
'''
charge = np.zeros_like(self.c_low_mask, dtype=np.float16) # charge in electrons
if self.... | SiLab-Bonn/pyBAR | [
9,
17,
9,
3,
1422005052
] |
def setupUi(self, highlowDialog):
highlowDialog.setObjectName("highlowDialog")
highlowDialog.resize(352, 128)
self.buttonBox = QtGui.QDialogButtonBox(highlowDialog)
self.buttonBox.setGeometry(QtCore.QRect(0, 70, 341, 32))
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
... | johnmgregoire/vanDover_CHESS | [
4,
2,
4,
2,
1277070865
] |
def add_pinpoint_gateway_fee_for_migration(apps, schema_editor):
bootstrap_pinpoint_gateway(apps) | dimagi/commcare-hq | [
465,
201,
465,
202,
1247158807
] |
def __init__(
self,
store: Union[Store, str] = "default",
identifier: Optional[Union[IdentifiedNode, str]] = None,
namespace_manager: Optional[NamespaceManager] = None,
base: Optional[str] = None, | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def store(self):
return self.__store | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def identifier(self):
return self.__identifier | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def namespace_manager(self):
"""
this graph's namespace-manager
"""
if self.__namespace_manager is None:
self.__namespace_manager = NamespaceManager(self)
return self.__namespace_manager | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def namespace_manager(self, nm):
self.__namespace_manager = nm | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def __str__(self):
if isinstance(self.identifier, URIRef):
return (
"%s a rdfg:Graph;rdflib:storage " + "[a rdflib:Store;rdfs:label '%s']."
) % (self.identifier.n3(), self.store.__class__.__name__)
else:
return (
"[a rdfg:Graph;rdflib:s... | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def destroy(self, configuration):
"""Destroy the store identified by `configuration` if supported"""
self.__store.destroy(configuration)
return self | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def commit(self):
"""Commits active transactions"""
self.__store.commit()
return self | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def open(self, configuration, create=False):
"""Open the graph store
Might be necessary for stores that require opening a connection to a
database or acquiring some resource.
"""
return self.__store.open(configuration, create) | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def add(self, triple: Tuple[Node, Node, Node]):
"""Add a triple with self as context"""
s, p, o = triple
assert isinstance(s, Node), "Subject %s must be an rdflib term" % (s,)
assert isinstance(p, Node), "Predicate %s must be an rdflib term" % (p,)
assert isinstance(o, Node), "Ob... | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def remove(self, triple):
"""Remove a triple from the graph
If the triple does not provide a context attribute, removes the triple
from all contexts.
"""
self.__store.remove(triple, context=self)
return self | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def triples(
self,
triple: Tuple[
Optional[IdentifiedNode], Optional[IdentifiedNode], Optional[Node]
], | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def triples(
self,
triple: Tuple[Optional[IdentifiedNode], Path, Optional[Node]], | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def triples(
self,
triple: Tuple[
Optional[IdentifiedNode], Union[None, Path, IdentifiedNode], Optional[Node]
], | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def triples(
self,
triple: Tuple[
Optional[IdentifiedNode], Union[None, Path, IdentifiedNode], Optional[Node]
], | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def __getitem__(self, item):
"""
A graph can be "sliced" as a shortcut for the triples method
The python slice syntax is (ab)used for specifying triples.
A generator over matches is returned,
the returned tuples include only the parts not given
>>> import rdflib
... | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def __iter__(self):
"""Iterates over all triples in the store"""
return self.triples((None, None, None)) | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def __hash__(self):
return hash(self.identifier) | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def __eq__(self, other):
return isinstance(other, Graph) and self.identifier == other.identifier | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def __le__(self, other):
return self < other or self == other | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def __ge__(self, other):
return self > other or self == other | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def __isub__(self, other):
"""Subtract all triples in Graph other from Graph.
BNode IDs are not changed."""
for triple in other:
self.remove(triple)
return self | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def __mul__(self, other):
"""Set-theoretic intersection.
BNode IDs are not changed."""
try:
retval = type(self)()
except TypeError:
retval = Graph()
for x in other:
if x in self:
retval.add(x)
return retval | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def __xor__(self, other):
"""Set-theoretic XOR.
BNode IDs are not changed."""
return (self - other) + (other - self) | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def set(self, triple):
"""Convenience method to update the value of object
Remove any existing triples for subject and predicate before adding
(subject, predicate, object).
"""
(subject, predicate, object_) = triple
assert (
subject is not None
), "s ... | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def predicates(
self,
subject: Optional[IdentifiedNode] = None,
object: Optional[Node] = None,
unique: bool = False, | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def objects(
self,
subject: Optional[IdentifiedNode] = None,
predicate: Union[None, Path, IdentifiedNode] = None,
unique: bool = False, | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def subject_predicates(
self, object: Optional[Node] = None, unique: bool = False | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def subject_objects(
self, predicate: Union[None, Path, IdentifiedNode] = None, unique: bool = False | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def predicate_objects(
self, subject: Optional[IdentifiedNode] = None, unique: bool = False | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def triples_choices(self, triple, context=None):
subject, predicate, object_ = triple
for (s, p, o), cg in self.store.triples_choices(
(subject, predicate, object_), context=self
):
yield s, p, o | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def items(self, list):
"""Generator over all items in the resource specified by list
list is an RDF collection.
"""
chain = set([list])
while list:
item = self.value(list, RDF.first)
if item is not None:
yield item
list = self.... | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def transitive_objects(self, subject, predicate, remember=None):
"""Transitively generate objects for the ``predicate`` relationship
Generated objects belong to the depth first transitive closure of the
``predicate`` relationship starting at ``subject``.
"""
if remember is None:... | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def qname(self, uri):
return self.namespace_manager.qname(uri) | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def bind(self, prefix, namespace, override=True, replace=False) -> None:
"""Bind prefix to namespace
If override is True will bind namespace to given prefix even
if namespace was already bound to a different prefix.
if replace, replace any existing prefix with the new namespace
... | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def absolutize(self, uri, defrag=1):
"""Turn uri into an absolute URI if it's not one already"""
return self.namespace_manager.absolutize(uri, defrag) | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def serialize(
self, destination: None, format: str, base: Optional[str], encoding: str, **args | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def serialize(
self,
destination: None = ...,
format: str = ...,
base: Optional[str] = ...,
*,
encoding: str,
**args, | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def serialize(
self,
destination: None = ...,
format: str = ...,
base: Optional[str] = ...,
encoding: None = ...,
**args, | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def serialize(
self,
destination: Union[str, pathlib.PurePath, IO[bytes]],
format: str = ...,
base: Optional[str] = ...,
encoding: Optional[str] = ...,
**args, | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def serialize(
self,
destination: Optional[Union[str, pathlib.PurePath, IO[bytes]]] = ...,
format: str = ...,
base: Optional[str] = ...,
encoding: Optional[str] = ...,
**args, | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def serialize(
self,
destination: Optional[Union[str, pathlib.PurePath, IO[bytes]]] = None,
format: str = "turtle",
base: Optional[str] = None,
encoding: Optional[str] = None,
**args: Any, | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def print(self, format="turtle", encoding="utf-8", out=None):
print(
self.serialize(None, format=format, encoding=encoding).decode(encoding),
file=out,
flush=True,
) | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
def query(
self,
query_object,
processor: Union[str, query.Processor] = "sparql",
result: Union[str, Type[query.Result]] = "sparql",
initNs=None,
initBindings=None,
use_store_provided: bool = True,
**kwargs, | RDFLib/rdflib | [
1851,
516,
1851,
221,
1328248153
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.