function
stringlengths
11
56k
repo_name
stringlengths
5
60
features
list
def machineName(self) -> str: return self._machine_name
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def updatableMachinesModel(self) -> UpdatableMachinesModel: return cast(UpdatableMachinesModel, self._updatable_machines_model)
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def qualityType(self) -> str: return self._quality_type
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def numSettingsOverridenByQualityChanges(self) -> int: return self._num_settings_overridden_by_quality_changes
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def qualityName(self) -> str: return self._quality_name
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def intentName(self) -> str: return self._intent_name
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def activeMode(self) -> str: return self._active_mode
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def hasVisibleSettingsField(self) -> bool: return self._has_visible_settings_field
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def totalNumberOfSettings(self) -> int: general_definition_containers = ContainerRegistry.getInstance().findDefinitionContainers(id = "fdmprinter") if not general_definition_containers: return 0 return len(general_definition_containers[0].getAllKeys())
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def numVisibleSettings(self) -> int: return self._num_visible_settings
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def machineConflict(self) -> bool: return self._has_machine_conflict
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def qualityChangesConflict(self) -> bool: return self._has_quality_changes_conflict
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def materialConflict(self) -> bool: return self._has_material_conflict
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def setResolveStrategy(self, key: str, strategy: Optional[str]) -> None: if key in self._result: self._result[key] = strategy
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def setMachineToOverride(self, machine_name: str) -> None: self._override_machine = machine_name
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def closeBackend(self) -> None: """Close the backend: otherwise one could end up with "Slicing...""" Application.getInstance().getBackend().close()
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def setMachineConflict(self, machine_conflict: bool) -> None: if self._has_machine_conflict != machine_conflict: self._has_machine_conflict = machine_conflict self.machineConflictChanged.emit()
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def getResult(self) -> Dict[str, Optional[str]]: if "machine" in self._result and self.updatableMachinesModel.count <= 1: self._result["machine"] = None if "quality_changes" in self._result and not self._has_quality_changes_conflict: self._result["quality_changes"] = None ...
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def show(self) -> None: # Emit signal so the right thread actually shows the view. if threading.current_thread() != threading.main_thread(): self._lock.acquire() # Reset the result self._result = {"machine": self._default_strategy, "quality_changes": s...
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def notifyClosed(self) -> None: """Used to notify the dialog so the lock can be released.""" self._result = {} # The result should be cleared before hide, because after it is released the main thread lock self._visible = False try: self._lock.release() except: ...
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def _onVisibilityChanged(self, visible: bool) -> None: if not visible: try: self._lock.release() except: pass
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def onOkButtonClicked(self) -> None: self._view.hide() self.hide()
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def onCancelButtonClicked(self) -> None: self._result = {} self._view.hide() self.hide()
Ultimaker/Cura
[ 4656, 1806, 4656, 2468, 1402923331 ]
def as_unit(v, axis=1): """Return array of unit vectors parallel to vectors in `v`. Parameters ---------- v : ndarray of float axis : int, optional Axis along which to normalize length. Returns ------- ndarray of float : Unit vector of `v`, i.e. `v` divided by its ...
keiserlab/e3fp
[ 102, 29, 102, 13, 1442343078 ]
def make_transform_matrix(center, y=None, z=None): """Make 4x4 homogenous transformation matrix. Given Nx4 array A where A[:, 4] = 1., the transform matrix M should be used with dot(M, A.T).T. Order of operations is 1. translation, 2. align `y` x `z` plane to yz-plane 3. align `y` to y-axis. Param...
keiserlab/e3fp
[ 102, 29, 102, 13, 1442343078 ]
def transform_array(transform_matrix, a): """Pad an array with 1s, transform, and return with original dimensions. Parameters ---------- transform_matrix : 4x4 array of float 4x4 homogenous transformation matrix a : Nx3 array of float Array of 3-D coordinates. Returns -----...
keiserlab/e3fp
[ 102, 29, 102, 13, 1442343078 ]
def unpad_array(a, axis=1): """Return `a` with row removed along `axis`. Parameters ---------- a : ndarray Array from which to remove row axis : int, optional Axis from which to remove row Returns ------- ndarray Unpadded array. """ if a.ndim == 1: ...
keiserlab/e3fp
[ 102, 29, 102, 13, 1442343078 ]
def calculate_angles(vec_arr, ref, ref_norm=None): """Calculate angles between vectors in `vec_arr` and `ref` vector. If `ref_norm` is not provided, angle ranges between 0 and pi. If it is provided, angle ranges between 0 and 2pi. Note that if `ref_norm` is orthogonal to `vec_arr` and `ref`, then the a...
keiserlab/e3fp
[ 102, 29, 102, 13, 1442343078 ]
def quaternion_to_transform_matrix(quaternion, translation=np.zeros(3)): """Convert quaternion to homogenous 4x4 transform matrix. Parameters ---------- quaternion : 4x1 array of float Quaternion describing rotation after translation. translation : 3x1 array of float, optional Trans...
keiserlab/e3fp
[ 102, 29, 102, 13, 1442343078 ]
def render_nested(self, node): node['been'] = u'here'
ndparker/tdi
[ 8, 2, 8, 2, 1381778054 ]
def test_start_and_stop_one(self): context = SmContext(SmApplication(self.config_dir_override), None, False, False) result = actions.start_one(context, "TEST_ONE", False, True, False, None, port=None) self.assertTrue(result) self.waitForCondition((lambda: len(context.get_service("TEST_O...
hmrc/service-manager
[ 56, 37, 56, 10, 1403617754 ]
def test_dropwizard_from_source(self): sm_application = SmApplication(self.config_dir_override) context = SmContext(sm_application, None, False, False) service_resolver = ServiceResolver(sm_application) servicetostart = "DROPWIZARD_NEXUS_END_TO_END_TEST" actions.start_and_wait( ...
hmrc/service-manager
[ 56, 37, 56, 10, 1403617754 ]
def test_play_from_source(self): sm_application = SmApplication(self.config_dir_override) context = SmContext(sm_application, None, False, False) service_resolver = ServiceResolver(sm_application) servicetostart = "PLAY_NEXUS_END_TO_END_TEST" port = None secondsToWait = ...
hmrc/service-manager
[ 56, 37, 56, 10, 1403617754 ]
def test_play_from_source_default(self): sm_application = SmApplication(self.config_dir_override) context = SmContext(sm_application, None, False, False) service_resolver = ServiceResolver(sm_application) servicetostart = "PLAY_NEXUS_END_TO_END_TEST" port = None secondsT...
hmrc/service-manager
[ 56, 37, 56, 10, 1403617754 ]
def test_successful_play_default_run_from_jar_without_waiting(self): sm_application = SmApplication(self.config_dir_override) context = SmContext(sm_application, None, False, False) service_resolver = ServiceResolver(sm_application) context.kill_everything(True) self.startFakeN...
hmrc/service-manager
[ 56, 37, 56, 10, 1403617754 ]
def test_failing_play_from_jar(self): sm_application = SmApplication(self.config_dir_override) context = SmContext(sm_application, None, False, False) service_resolver = ServiceResolver(sm_application) context.kill_everything(True) self.startFakeNexus() try: ...
hmrc/service-manager
[ 56, 37, 56, 10, 1403617754 ]
def test_assets_server(self): context = SmContext(SmApplication(self.config_dir_override), None, False, False) context.kill_everything(True) self.startFakeArtifactory() actions.start_one( context, "PYTHON_SIMPLE_SERVER_ASSETS_FRONTEND", False, True, False, None, port=None, ...
hmrc/service-manager
[ 56, 37, 56, 10, 1403617754 ]
def set_filename_version(filename, version_number): with open(filename, 'w+') as f: f.write("version = '{}'\n".format(version_number))
Alexis-benoist/eralchemy
[ 1000, 114, 1000, 47, 1430341643 ]
def rm(filename): info('Delete {}'.format(filename)) rmtree(filename, ignore_errors=True)
Alexis-benoist/eralchemy
[ 1000, 114, 1000, 47, 1430341643 ]
def fail(message, *args): print('Error:', message % args, file=sys.stderr) sys.exit(1)
Alexis-benoist/eralchemy
[ 1000, 114, 1000, 47, 1430341643 ]
def git_is_clean(): return Popen(['git', 'diff', '--quiet']).wait() == 0
Alexis-benoist/eralchemy
[ 1000, 114, 1000, 47, 1430341643 ]
def make_git_tag(tag): info('Tagging "%s"', tag) Popen(['git', 'tag', tag]).wait()
Alexis-benoist/eralchemy
[ 1000, 114, 1000, 47, 1430341643 ]
def version_lst_to_str(v): return '.'.join(str(n) for n in v)
Alexis-benoist/eralchemy
[ 1000, 114, 1000, 47, 1430341643 ]
def get_current_version(): with open('eralchemy/version.py') as f: lines = f.readlines() namespace = {} exec(lines[0], namespace) return version_str_to_lst(namespace['version'])
Alexis-benoist/eralchemy
[ 1000, 114, 1000, 47, 1430341643 ]
def get_next_version(major, minor, fix, current_version): if major: return [current_version[0] + 1, 0, 0] if minor: return [current_version[0], current_version[1] + 1, 0] if fix: return [current_version[0], current_version[1], current_version[2] + 1] raise UserWarning()
Alexis-benoist/eralchemy
[ 1000, 114, 1000, 47, 1430341643 ]
def solve_cg(v: GridVariableVector, q0: GridVariable, rtol: float = 1e-6, atol: float = 1e-6, maxiter: Optional[int] = None) -> GridArray: """Conjugate gradient solve for the pressure such that continuity is enforced. Returns a pressure correction `q` such that `...
google/jax-cfd
[ 434, 58, 434, 34, 1616435172 ]
def projection( v: GridVariableVector, solve: Callable = solve_fast_diag,
google/jax-cfd
[ 434, 58, 434, 34, 1616435172 ]
def __virtual__(): """ NAPALM library must be installed for this module to work and run in a (proxy) minion. """ return salt.utils.napalm.virtual(__opts__, __virtualname__, __file__)
saltstack/salt
[ 13089, 5388, 13089, 3074, 1298233016 ]
def _update_config( template_name, template_source=None, template_hash=None, template_hash_name=None, template_user="root", template_group="root", template_mode="755", template_attrs="--------------e----", saltenv=None, template_engine="jinja", skip_verify=False, defaults...
saltstack/salt
[ 13089, 5388, 13089, 3074, 1298233016 ]
def replace_pattern( name, pattern, repl, count=0, flags=8, bufsize=1, append_if_not_found=False, prepend_if_not_found=False, not_found_content=None, search_only=False, show_changes=True, backslash_literal=False, source="running", path=None, test=False, re...
saltstack/salt
[ 13089, 5388, 13089, 3074, 1298233016 ]
def saved( name, source="running", user=None, group=None, mode=None, attrs=None, makedirs=False, dir_mode=None, replace=True, backup="", show_changes=True, create=True, tmp_dir="", tmp_ext="", encoding=None, encoding_errors="strict", allow_empty=False,...
saltstack/salt
[ 13089, 5388, 13089, 3074, 1298233016 ]
def managed( name, template_name=None, template_source=None, template_hash=None, template_hash_name=None, saltenv="base", template_engine="jinja", skip_verify=False, context=None, defaults=None, test=False, commit=True, debug=False, replace=False, commit_in=No...
saltstack/salt
[ 13089, 5388, 13089, 3074, 1298233016 ]
def commit_cancelled(name): """ .. versionadded:: 2019.2.0 Cancel a commit scheduled to be executed via the ``commit_in`` and ``commit_at`` arguments from the :py:func:`net.load_template <salt.modules.napalm_network.load_template>` or :py:func:`net.load_config <salt.modules.napalm_network.load_...
saltstack/salt
[ 13089, 5388, 13089, 3074, 1298233016 ]
def __init__(self, min_clusters=None, max_clusters=None, refinement_options=None, autotune=None, laplacian_type=None, stop_eigenvalue=1e-2, row_wise_renorm=False, custom_dist="cosine", ...
wq2012/SpectralCluster
[ 400, 66, 400, 1, 1547834748 ]
def progress(index, size, for_what='当前进度', step=10): block_size = int(size / step) if index % block_size == 0: crt = int(index / block_size) print('%s ==> [%d / %d]' % (for_what, crt, step))
DannyLee1991/article_cosine_similarity
[ 8, 1, 8, 2, 1504659733 ]
def _log_time(func): # func() def wrapper(*args, **kwargs): print("start") start_time = time.time() result = func() if len(args) == len(kwargs) == 0 else func(*args, **kwargs) end_time = time.time() cost_time = end_time - start_time ...
DannyLee1991/article_cosine_similarity
[ 8, 1, 8, 2, 1504659733 ]
def line(log_str, style='-'): print(style * 12 + str(log_str) + style * 12)
DannyLee1991/article_cosine_similarity
[ 8, 1, 8, 2, 1504659733 ]
def setUp(self): super(TenderLotAwardCheckResourceTest, self).setUp() self.app.authorization = ('Basic', ('auction', '')) response = self.app.get('/tenders/{}/auction'.format(self.tender_id)) auction_bids_data = response.json['data']['bids'] for lot_id in self.initial_lots: ...
openprocurement/openprocurement.tender.belowthreshold
[ 2, 13, 2, 29, 1487334011 ]
def setUp(self): super(TenderAwardComplaintResourceTest, self).setUp() # Create award auth = self.app.authorization self.app.authorization = ('Basic', ('token', '')) response = self.app.post_json('/tenders/{}/awards'.format( self.tender_id), {'data': {'suppliers': [te...
openprocurement/openprocurement.tender.belowthreshold
[ 2, 13, 2, 29, 1487334011 ]
def setUp(self): super(TenderLotAwardComplaintResourceTest, self).setUp() # Create award auth = self.app.authorization self.app.authorization = ('Basic', ('token', '')) bid = self.initial_bids[0] response = self.app.post_json('/tenders/{}/awards'.format( self....
openprocurement/openprocurement.tender.belowthreshold
[ 2, 13, 2, 29, 1487334011 ]
def setUp(self): super(TenderAwardComplaintDocumentResourceTest, self).setUp() # Create award auth = self.app.authorization self.app.authorization = ('Basic', ('token', '')) response = self.app.post_json('/tenders/{}/awards'.format( self.tender_id), {'data': {'supplie...
openprocurement/openprocurement.tender.belowthreshold
[ 2, 13, 2, 29, 1487334011 ]
def setUp(self): super(Tender2LotAwardComplaintDocumentResourceTest, self).setUp() # Create award bid = self.initial_bids[0] auth = self.app.authorization self.app.authorization = ('Basic', ('token', '')) response = self.app.post_json('/tenders/{}/awards'.format( ...
openprocurement/openprocurement.tender.belowthreshold
[ 2, 13, 2, 29, 1487334011 ]
def setUp(self): super(TenderAwardDocumentResourceTest, self).setUp() # Create award auth = self.app.authorization self.app.authorization = ('Basic', ('token', '')) response = self.app.post_json('/tenders/{}/awards'.format( self.tender_id), {'data': {'suppliers': [tes...
openprocurement/openprocurement.tender.belowthreshold
[ 2, 13, 2, 29, 1487334011 ]
def setUp(self): super(Tender2LotAwardDocumentResourceTest, self).setUp() # Create award auth = self.app.authorization self.app.authorization = ('Basic', ('token', '')) bid = self.initial_bids[0] response = self.app.post_json('/tenders/{}/awards'.format( self....
openprocurement/openprocurement.tender.belowthreshold
[ 2, 13, 2, 29, 1487334011 ]
def suite(): suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(Tender2LotAwardComplaintDocumentResourceTest)) suite.addTest(unittest.makeSuite(Tender2LotAwardComplaintResourceTest)) suite.addTest(unittest.makeSuite(Tender2LotAwardDocumentResourceTest)) suite.addTest(unittest.makeSuite(Te...
openprocurement/openprocurement.tender.belowthreshold
[ 2, 13, 2, 29, 1487334011 ]
def __init__(self): super().__init__()
foglamp/FogLAMP
[ 68, 41, 68, 7, 1492706127 ]
def connect(self): pass
foglamp/FogLAMP
[ 68, 41, 68, 7, 1492706127 ]
def disconnect(self): pass
foglamp/FogLAMP
[ 68, 41, 68, 7, 1492706127 ]
def __enter__(self): return self.connect()
foglamp/FogLAMP
[ 68, 41, 68, 7, 1492706127 ]
def __init__(self, core_management_host, core_management_port, svc=None): try: if svc: self.service = svc else: self.connect(core_management_host, core_management_port) self.base_url = '{}:{}'.format(self.service._address, self.service._port) ...
foglamp/FogLAMP
[ 68, 41, 68, 7, 1492706127 ]
def base_url(self): return self.__base_url
foglamp/FogLAMP
[ 68, 41, 68, 7, 1492706127 ]
def base_url(self, url): self.__base_url = url
foglamp/FogLAMP
[ 68, 41, 68, 7, 1492706127 ]
def service(self): return self.__service
foglamp/FogLAMP
[ 68, 41, 68, 7, 1492706127 ]
def service(self, svc): if not isinstance(svc, ServiceRecord): w_msg = 'Storage should be a valid FogLAMP micro-service instance' _LOGGER.warning(w_msg) raise InvalidServiceInstance if not getattr(svc, "_type") == "Storage": w_msg = 'Storage should be a v...
foglamp/FogLAMP
[ 68, 41, 68, 7, 1492706127 ]
def connect(self, core_management_host, core_management_port): svc = self._get_storage_service(host=core_management_host, port=core_management_port) if len(svc) == 0: raise InvalidServiceInstance self.service = ServiceRecord(s_id=svc["id"], s_name=svc["name"], s_type=svc["type"], s_p...
foglamp/FogLAMP
[ 68, 41, 68, 7, 1492706127 ]
def __init__(self, core_mgt_host, core_mgt_port, svc=None): super().__init__(core_management_host=core_mgt_host, core_management_port=core_mgt_port, svc=svc) self.__class__._base_url = self.base_url
foglamp/FogLAMP
[ 68, 41, 68, 7, 1492706127 ]
def createDataSet(): dataSet = [[1, 1, 'yes'], [1, 1, 'yes'], [1, 0, 'no'], [0, 1, 'no'], [0, 1, 'no']] labels = ['no surfacing','flippers'] #change to discrete values return dataSet, labels
onehao/opensource
[ 1, 1, 1, 1, 1414656394 ]
def calcShannonEnt(dataSet): numEntries = len(dataSet) labelCounts = {} for featVec in dataSet: #the the number of unique elements and their occurance currentLabel = featVec[-1] if currentLabel not in labelCounts.keys(): labelCounts[currentLabel] = 0 labelCounts[currentLabel] +...
onehao/opensource
[ 1, 1, 1, 1, 1414656394 ]
def splitDataSet(dataSet, axis, value): retDataSet = [] for featVec in dataSet: if featVec[axis] == value: reducedFeatVec = featVec[:axis] #chop out axis used for splitting reducedFeatVec.extend(featVec[axis+1:]) retDataSet.append(reducedFeatVec) return...
onehao/opensource
[ 1, 1, 1, 1, 1414656394 ]
def chooseBestFeatureToSplit(dataSet): numFeatures = len(dataSet[0]) - 1 #the last column is used for the labels baseEntropy = calcShannonEnt(dataSet) bestInfoGain = 0.0; bestFeature = -1 for i in range(numFeatures): #iterate over all the features featList = [example[i] for exam...
onehao/opensource
[ 1, 1, 1, 1, 1414656394 ]
def majorityCnt(classList): classCount={} for vote in classList: if vote not in classCount.keys(): classCount[vote] = 0 classCount[vote] += 1 sortedClassCount = sorted(classCount.iteritems(), key=operator.itemgetter(1), reverse=True) return sortedClassCount[0][0]
onehao/opensource
[ 1, 1, 1, 1, 1414656394 ]
def createTree(dataSet,labels): classList = [example[-1] for example in dataSet] if classList.count(classList[0]) == len(classList): return classList[0]#stop splitting when all of the classes are equal if len(dataSet[0]) == 1: #stop splitting when there are no more features in dataSet ...
onehao/opensource
[ 1, 1, 1, 1, 1414656394 ]
def classify(inputTree,featLabels,testVec): firstStr = inputTree.keys()[0] secondDict = inputTree[firstStr] featIndex = featLabels.index(firstStr) key = testVec[featIndex] valueOfFeat = secondDict[key] if isinstance(valueOfFeat, dict): classLabel = classify(valueOfFeat, featLabel...
onehao/opensource
[ 1, 1, 1, 1, 1414656394 ]
def storeTree(inputTree,filename): import pickle fw = open(filename,'w') pickle.dump(inputTree,fw) fw.close()
onehao/opensource
[ 1, 1, 1, 1, 1414656394 ]
def Params(cls): p = super().Params() p.Define( 'draw_visualizations', False, 'Boolean for whether to draw ' 'visualizations. This is independent of laser_sampling_rate.') p.ap_metric = waymo_ap_metric.WaymoAPMetrics.Params( waymo_metadata.WaymoMetadata()) p.Define( 'extr...
tensorflow/lingvo
[ 2689, 429, 2689, 115, 1532471428 ]
def ProcessOutputs(self, input_batch, model_outputs): """Produce additional decoder outputs for WaymoOpenDataset. Args: input_batch: A .NestedMap of the inputs to the model. model_outputs: A .NestedMap of the outputs of the model, including:: - per_class_predicted_bboxes: [batch, num_classe...
tensorflow/lingvo
[ 2689, 429, 2689, 115, 1532471428 ]
def raises_exception(exc_class, msg=None): def decorator(func): def wrapper(self, *args, **kwargs): try: func(self, *args, **kwargs) self.fail("expected exception %s wasn't raised" % exc_class.__name__) except exc_class as e: if ...
Ahmad31/Web_Flask_Cassandra
[ 1, 1, 1, 3, 1492520361 ]
def raises_if(test, cond, exc_class, exc_msg=None): try: yield except exc_class as e: test.assertTrue(cond) if exc_msg is None: pass elif exc_msg.startswith('...') and exc_msg != '...': if exc_msg.endswith('...'): test.assertIn(exc_msg[3:-3], s...
Ahmad31/Web_Flask_Cassandra
[ 1, 1, 1, 3, 1492520361 ]
def flatten(x): result = [] for el in x: if hasattr(el, "__iter__") and not isinstance(el, basestring): result.extend(flatten(el)) else: result.append(el) return result
Ahmad31/Web_Flask_Cassandra
[ 1, 1, 1, 3, 1492520361 ]
def __init__(con, database): con.database = database if database and database.provider_name == 'postgres': con.autocommit = True
Ahmad31/Web_Flask_Cassandra
[ 1, 1, 1, 3, 1492520361 ]
def rollback(con): pass
Ahmad31/Web_Flask_Cassandra
[ 1, 1, 1, 3, 1492520361 ]
def __init__(cursor): cursor.description = [] cursor.rowcount = 0
Ahmad31/Web_Flask_Cassandra
[ 1, 1, 1, 3, 1492520361 ]
def fetchone(cursor): return None
Ahmad31/Web_Flask_Cassandra
[ 1, 1, 1, 3, 1492520361 ]
def fetchall(cursor): return []
Ahmad31/Web_Flask_Cassandra
[ 1, 1, 1, 3, 1492520361 ]
def __init__(pool, database): pool.database = database
Ahmad31/Web_Flask_Cassandra
[ 1, 1, 1, 3, 1492520361 ]
def release(pool, con): pass
Ahmad31/Web_Flask_Cassandra
[ 1, 1, 1, 3, 1492520361 ]
def disconnect(pool): pass
Ahmad31/Web_Flask_Cassandra
[ 1, 1, 1, 3, 1492520361 ]
def bind(self, provider_name, *args, **kwargs): if self.real_provider_name is not None: provider_name = self.real_provider_name self.provider_name = provider_name provider_module = import_module('pony.orm.dbproviders.' + provider_name) provider_cls = provider_module.prov...
Ahmad31/Web_Flask_Cassandra
[ 1, 1, 1, 3, 1492520361 ]
def inspect_connection(provider, connection): pass
Ahmad31/Web_Flask_Cassandra
[ 1, 1, 1, 3, 1492520361 ]
def _execute(database, sql, globals, locals, frame_depth): assert False # pragma: no cover
Ahmad31/Web_Flask_Cassandra
[ 1, 1, 1, 3, 1492520361 ]