query
stringlengths
9
9.05k
document
stringlengths
10
222k
metadata
dict
negatives
listlengths
30
30
negative_scores
listlengths
30
30
document_score
stringlengths
4
10
document_rank
stringclasses
2 values
Retrieves the CPU speed of the target. If the target does not support CPU frequency detection, this function will return ``0``.
def cpu_speed(self, silent=False): res = self._dll.JLINKARM_MeasureCPUSpeedEx(-1, 1, int(silent)) if res < 0: raise errors.JLinkException(res) return res
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_cpu_speed(self):\n\t\treturn call_sdk_function('PrlSrvCfg_GetCpuSpeed', self.handle)", "def getcpuspeed():\n f = os.popen(\"/opt/vc/bin/vcgencmd get_config arm_freq\")\n cpu = f.read()\n return cpu", "def cpu():\n sin = psutil.cpu_percent()\n return round(sin / 100, 3)", "def cpu(self)...
[ "0.8226004", "0.7692597", "0.7379658", "0.72168684", "0.6925704", "0.6915782", "0.6906379", "0.69059175", "0.6904902", "0.6903355", "0.6839992", "0.6839992", "0.6838566", "0.6821939", "0.6799587", "0.67809063", "0.67809063", "0.67772084", "0.67576104", "0.6749202", "0.6731223...
0.7733664
1
Retrives the reasons that the CPU was halted.
def cpu_halt_reasons(self): buf_size = self.MAX_NUM_MOES buf = (structs.JLinkMOEInfo * buf_size)() num_reasons = self._dll.JLINKARM_GetMOEs(buf, buf_size) if num_reasons < 0: raise errors.JLinkException(num_reasons) return list(buf)[:num_reasons]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def suspension_reasons(self) -> pulumi.Output[Sequence[str]]:\n return pulumi.get(self, \"suspension_reasons\")", "def getReason():", "def suspension_reasons(self) -> Sequence[str]:\n return pulumi.get(self, \"suspension_reasons\")", "def suspension_reason(self) -> pulumi.Output[Sequence[str]]:...
[ "0.64488554", "0.6294509", "0.6130971", "0.61146814", "0.59209734", "0.5912031", "0.5900105", "0.5785372", "0.5701754", "0.56857014", "0.5589703", "0.552154", "0.54810596", "0.5476102", "0.547608", "0.54699117", "0.54451215", "0.5436894", "0.54242265", "0.5395731", "0.5234131...
0.71143895
0
Creates a JTAG clock on TCK.
def jtag_create_clock(self): return self._dll.JLINKARM_Clock()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __init__(self, clock=proctime):\n self._clock = clock", "def start_clock(self):\n pass", "def __init__(self):\n self._clock = pg.time.Clock()", "def clock(self, name: str):\n # [DaCe] Because the contextlib is a \"one-shot\" object\n # which self-destroys itself when ca...
[ "0.58639026", "0.56940013", "0.55723935", "0.5330025", "0.52667135", "0.52072275", "0.5166487", "0.51621956", "0.5127552", "0.5124165", "0.5055682", "0.4999866", "0.4994027", "0.49776497", "0.4967862", "0.4964289", "0.4960948", "0.49480197", "0.49296838", "0.4926739", "0.4912...
0.7271896
0
Reads bytes from code memory.
def code_memory_read(self, addr, num_bytes): buf_size = num_bytes buf = (ctypes.c_uint8 * buf_size)() res = self._dll.JLINKARM_ReadCodeMem(addr, buf_size, buf) if res < 0: raise errors.JLinkException(res) return list(buf)[:res]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_bytes(self) -> bytes:\n t = self.pc\n while self.data[self.pc] != 0:\n self.pc += 1\n result = self.data[t:self.pc]\n self.pc += 1 # jump '\\0'\n return result", "def memory_read(self, addr: str) -> Byte:\n print(f\"memory read {addr}\")\n _pa...
[ "0.6721349", "0.6580694", "0.64050204", "0.6202718", "0.60644597", "0.6061449", "0.59182173", "0.58515435", "0.58471733", "0.5813616", "0.58068395", "0.5801147", "0.5775621", "0.57633287", "0.57340276", "0.572629", "0.572629", "0.5721518", "0.57151216", "0.56962574", "0.56924...
0.7897257
0
Returns the number of memory zones supported by the target.
def num_memory_zones(self): count = self._dll.JLINK_GetMemZones(0, 0) if count < 0: raise errors.JLinkException(count) return count
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def memory_size(self):\n\n return ipset.ipmap_memory_size(self.map)", "def memory_size(self):\n\n return ipset.ipset_memory_size(self.set)", "def memory_zones(self):\n count = self.num_memory_zones()\n if count == 0:\n return list()\n\n buf = (structs.JLinkMemoryZo...
[ "0.650295", "0.62593955", "0.6116191", "0.6049563", "0.6015203", "0.59275997", "0.5890822", "0.5867482", "0.5864816", "0.58637565", "0.5832018", "0.58036137", "0.57929945", "0.57922304", "0.5746929", "0.57427526", "0.5741336", "0.5734595", "0.5714334", "0.5714334", "0.5714334...
0.79332215
0
Gets all memory zones supported by the current target. Some targets support multiple memory zones. This function provides the ability to get a list of all the memory zones to facilate using the memory zone routing functions.
def memory_zones(self): count = self.num_memory_zones() if count == 0: return list() buf = (structs.JLinkMemoryZone * count)() res = self._dll.JLINK_GetMemZones(buf, count) if res < 0: raise errors.JLinkException(res) return list(buf)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_all_zones():\n cf = CloudFlare.CloudFlare(raw=True)\n page_number = 0\n total_pages = 1\n all_zones = []\n while page_number < total_pages:\n page_number += 1\n raw_results = cf.zones.get(params={'per_page':100, 'page':page_number})\n zones = raw_results['result']\n ...
[ "0.6585587", "0.65258205", "0.63066727", "0.6225679", "0.60217327", "0.5960012", "0.5951327", "0.59063154", "0.5888627", "0.5866608", "0.58184415", "0.57988656", "0.5772288", "0.57269365", "0.5702966", "0.5702966", "0.569103", "0.5649603", "0.5636322", "0.56067634", "0.560375...
0.76450336
0
Reads memory from a target system or specific memory zone. The optional ``zone`` specifies a memory zone to access to read from, e.g. ``IDATA``, ``DDATA``, or ``CODE``. The given number of bits, if provided, must be either ``8``, ``16``, or ``32``. If not provided, always reads ``num_units`` bytes.
def memory_read(self, addr, num_units, zone=None, nbits=None): buf_size = num_units buf = None access = 0 if nbits is None: buf = (ctypes.c_uint8 * buf_size)() access = 0 elif nbits == 8: buf = (ctypes.c_uint8 * buf_size)() access ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def memory_read32(self, addr, num_words, zone=None):\n return self.memory_read(addr, num_words, zone=zone, nbits=32)", "def memory_read8(self, addr, num_bytes, zone=None):\n return self.memory_read(addr, num_bytes, zone=zone, nbits=8)", "def read_memory(self, address, size):\n return self.read...
[ "0.55959594", "0.5548519", "0.529175", "0.5206243", "0.51045525", "0.50579405", "0.5047669", "0.5006327", "0.49395436", "0.49395436", "0.4936281", "0.49201882", "0.48311", "0.48111245", "0.4782628", "0.47715864", "0.4771454", "0.47301593", "0.4692918", "0.466784", "0.46409017...
0.729839
0
Reads memory from the target system in units of 16bits.
def memory_read16(self, addr, num_halfwords, zone=None): return self.memory_read(addr, num_halfwords, zone=zone, nbits=16)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def readmem16(self, address):\n return self._readmem(address, 'mem16')", "def read_u16(self) -> int:", "def read_u16(self) -> int:\n ...", "def read_memory(self, address, size):\n return self.read(0, address, size, mem_device=True)", "def read_uint16(self):\n return self.read(BitTyp...
[ "0.76614463", "0.6659939", "0.6645861", "0.6462641", "0.6203454", "0.61603296", "0.60992897", "0.5986934", "0.5961132", "0.59213614", "0.59200966", "0.59097815", "0.5895468", "0.5868265", "0.5828436", "0.57933104", "0.5770383", "0.57504517", "0.5746926", "0.5655456", "0.56382...
0.71168756
1
Reads memory from the target system in units of 32bits.
def memory_read32(self, addr, num_words, zone=None): return self.memory_read(addr, num_words, zone=zone, nbits=32)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def readmem32(self, address):\n return self._readmem(address, 'mem32')", "def memory_read64(self, addr, num_long_words):\n buf_size = num_long_words\n buf = (ctypes.c_ulonglong * buf_size)()\n units_read = self._dll.JLINKARM_ReadMemU64(addr, buf_size, buf, 0)\n if units_read < ...
[ "0.7232878", "0.660309", "0.6542705", "0.63670063", "0.62229675", "0.61640716", "0.6100921", "0.608942", "0.60746664", "0.60729635", "0.60363805", "0.59659874", "0.59498745", "0.59363407", "0.59363407", "0.59363407", "0.59363407", "0.59363407", "0.59363407", "0.59363407", "0....
0.7179057
1
Reads memory from the target system in units of 64bits.
def memory_read64(self, addr, num_long_words): buf_size = num_long_words buf = (ctypes.c_ulonglong * buf_size)() units_read = self._dll.JLINKARM_ReadMemU64(addr, buf_size, buf, 0) if units_read < 0: raise errors.JLinkException(units_read) return buf[:units_read]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_memory(self, address, size):\n return self.read(0, address, size, mem_device=True)", "def memory_read(self, addr: str) -> Byte:\n print(f\"memory read {addr}\")\n _parsed_addr = self._parse_addr(addr)\n if _parsed_addr:\n return _parsed_addr.read(addr)\n data = ...
[ "0.6582661", "0.64407146", "0.6344638", "0.62850386", "0.62440604", "0.6226702", "0.61969525", "0.6159068", "0.6080329", "0.6080329", "0.6080329", "0.6080329", "0.6080329", "0.6080329", "0.6080329", "0.6075824", "0.6071202", "0.6045737", "0.6045737", "0.60231334", "0.6015137"...
0.76429135
0
Writes memory to a target system or specific memory zone. The optional ``zone`` specifies a memory zone to access to write to, e.g. ``IDATA``, ``DDATA``, or ``CODE``. The given number of bits, if provided, must be either ``8``, ``16``, or ``32``.
def memory_write(self, addr, data, zone=None, nbits=None): buf_size = len(data) buf = None access = 0 if nbits is None: # Pack the given data into an array of 8-bit unsigned integers in # order to write it successfully packed_data = map(lambda d: reve...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def memory_write8(self, addr, data, zone=None):\n return self.memory_write(addr, data, zone, 8)", "def memory_write16(self, addr, data, zone=None):\n return self.memory_write(addr, data, zone, 16)", "def write_memory(self, address, value):\n\n self.memory[address] = CPU.MASKS.word_mask(val...
[ "0.60736656", "0.58298844", "0.577207", "0.57022995", "0.56749505", "0.5654126", "0.5547748", "0.5300882", "0.52690846", "0.5265991", "0.5265991", "0.52506566", "0.5238321", "0.5031619", "0.5022423", "0.49999195", "0.49869445", "0.49261105", "0.49022898", "0.48899868", "0.488...
0.7096349
0
Writes long words to memory of a target system.
def memory_write64(self, addr, data, zone=None): words = [] bitmask = 0xFFFFFFFF for long_word in data: words.append(long_word & bitmask) # Last 32-bits words.append((long_word >> 32) & bitmask) # First 32-bits return self.memory_write32(addr, words, zon...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wLong(self, value):\n self.w(struct.pack(self.endian + \"q\", value))", "def write_word_data(self, addr, reg, data):\n raise NotImplementedError()", "def write_mem(self):\n request = 'commands/writemem'\n return self._post(request)", "def transfer_mem_to_target(ava, addr, leng...
[ "0.57535535", "0.5715925", "0.5659743", "0.5571444", "0.5540819", "0.53778243", "0.53606874", "0.53249365", "0.53239673", "0.5234483", "0.5217735", "0.52073115", "0.52044505", "0.5176345", "0.51545554", "0.51403517", "0.51179624", "0.5113367", "0.50691324", "0.5034861", "0.50...
0.6453913
0
Writes into an ARM register.
def register_write(self, reg_index, value): # TODO: rename 'reg_index' to 'register' if isinstance(reg_index, six.string_types): reg_index = self._get_register_index_from_name(reg_index) res = self._dll.JLINKARM_WriteReg(reg_index, value) if res != 0: raise errors...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def do_write_reg(self, arg):\n self._print_func_result(self.phil.write_reg, arg)", "def _write_register(self, reg, value):\n _buf = bytearray([reg, (value >> 8) & 0xFF, value & 0xFF])\n with self.i2c_device as i2c:\n i2c.writeto(self._i2c_addr, _buf)", "def cp15_register_write(self, cr_n, op_...
[ "0.7092703", "0.68693215", "0.6727604", "0.6649479", "0.6534803", "0.6510276", "0.649155", "0.64015025", "0.63905156", "0.6385475", "0.6302209", "0.626992", "0.6269832", "0.6267155", "0.62235206", "0.6151814", "0.6143887", "0.611712", "0.61108744", "0.61108744", "0.61036843",...
0.7118852
0
Writes to multiple CPU registers. Writes the values to the given registers in order. There must be a onetoone correspondence between the values and the registers specified.
def register_write_multiple(self, register_indices, values): # TODO: rename 'register_indices' to 'registers' register_indices = register_indices[:] if len(register_indices) != len(values): raise ValueError('Must be an equal number of registers and values') num_regs = len(re...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write_multiple_holding_registers(self, addr, regs):\r\n return self._arm.write_multiple_holding_registers(addr, regs)", "def i2c_write_to_all_sensors(pi, i2c_multiplexer_handle, i2c_sensor_handle, channel_numbers, reg, data):\n for channel_number in channel_numbers:\n i2c_multiplexer_select_...
[ "0.68611217", "0.65538526", "0.64289683", "0.6134497", "0.6078767", "0.577838", "0.5660889", "0.55480397", "0.5462335", "0.5437791", "0.54071593", "0.5354775", "0.5187918", "0.51793", "0.51560783", "0.51323277", "0.51218945", "0.5086724", "0.50845206", "0.5065716", "0.5040675...
0.74640715
0
Reads a value from an ARM ICE register.
def ice_register_read(self, register_index): return self._dll.JLINKARM_ReadICEReg(register_index)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read(self, register): #good\r\n\t\tcurrentVal = self.i2c.readU8(register)\r\n\t\treturn currentVal", "def read_valve(client, register_number):\n return client.read_coils(register_number, 1).bits[0]", "def do_read_reg(self, arg):\n self._print_func_result(self.phil.read_reg, arg)", "def read(sel...
[ "0.72927755", "0.6842327", "0.63687783", "0.6355871", "0.6342133", "0.6314757", "0.62745464", "0.6181591", "0.6018973", "0.5995241", "0.5993572", "0.59845513", "0.5930867", "0.59077835", "0.5823782", "0.5810909", "0.5801925", "0.5673371", "0.5662353", "0.56561995", "0.5656199...
0.71608263
1
Writes a value to an ARM ICE register.
def ice_register_write(self, register_index, value, delay=False): self._dll.JLINKARM_WriteICEReg(register_index, int(value), int(delay)) return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write(self, register, value): #good\r\n\t\tself.i2c.write8(register, value)", "def write(self, value):\n if self.mode is UNAVAILABLE:\n raise IOError, \"%s can not be used through Firmata\" % self\n if self.mode is INPUT:\n raise IOError, \"%s is set up as an INPUT and ca...
[ "0.7032879", "0.6785217", "0.6616968", "0.6401413", "0.63098747", "0.6221341", "0.6203811", "0.61997193", "0.6146518", "0.61097836", "0.6097566", "0.60913473", "0.60898167", "0.6037129", "0.6034498", "0.60072744", "0.5962956", "0.5920023", "0.5918031", "0.591364", "0.59047025...
0.7539389
0
Returns if the CPU core supports ETM.
def etm_supported(self): res = self._dll.JLINKARM_ETM_IsPresent() if (res == 1): return True # JLINKARM_ETM_IsPresent() only works on ARM 7/9 devices. This # fallback checks if ETM is present by checking the Cortex ROM table # for debugging information for ETM. ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_tev_supported(self, tev):\n return self.get_handler_class().is_tev_supported(tev)", "def EnableWMforTE(self):\r\n\t\treturn self._get_attribute('enableWMforTE')", "def is_eht_on(self):\n raise NotImplementedError", "def is_vtd_supported(self):\n\t\treturn bool(call_sdk_function('PrlSrvCf...
[ "0.6515314", "0.6216453", "0.61827075", "0.616119", "0.5944529", "0.58871007", "0.5862749", "0.5860718", "0.58362234", "0.58073944", "0.5790154", "0.5755107", "0.57482946", "0.57413775", "0.5741062", "0.5668041", "0.5643301", "0.5627071", "0.5607984", "0.55855256", "0.5582155...
0.8014467
0
Reads a value from an ETM register.
def etm_register_read(self, register_index): return self._dll.JLINKARM_ETM_ReadReg(register_index)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read(self, register): #good\r\n\t\tcurrentVal = self.i2c.readU8(register)\r\n\t\treturn currentVal", "def read_register(self, address):\n\n return self.register[address]", "def read(self):\n if self.mode == UNAVAILABLE:\n raise IOError, \"Cannot read pin %s\"% self.__str__()\n ...
[ "0.6703115", "0.6140012", "0.6084043", "0.60469455", "0.59774613", "0.59774613", "0.59707594", "0.59308827", "0.59168863", "0.58820003", "0.5790957", "0.57648337", "0.5755127", "0.57154566", "0.5710692", "0.57080925", "0.5694175", "0.568924", "0.56743246", "0.56518", "0.56346...
0.69897354
0
Writes a value to an ETM register.
def etm_register_write(self, register_index, value, delay=False): self._dll.JLINKARM_ETM_WriteReg(int(register_index), int(value), int(delay)) return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write_value(self, value):\n raise NotImplementedError", "def write_value(self, **kw):\n for reg, val in kw.iteritems():\n #print \"{} = {}\".format(reg, val)\n reg_n, reg_def = self.find_reg(reg)\n if reg_n == None:\n raise ValueError(\"Register {...
[ "0.66242945", "0.63583", "0.6348886", "0.6280796", "0.6200426", "0.61679536", "0.6105021", "0.6105021", "0.6105021", "0.6091859", "0.6057462", "0.6057435", "0.60526776", "0.60040224", "0.59986794", "0.5997084", "0.5996771", "0.59525543", "0.59495705", "0.5936053", "0.5901712"...
0.7391136
0
Reads an Ap/DP register on a CoreSight DAP. Wait responses and special handling are both handled by this method.
def coresight_read(self, reg, ap=True): data = ctypes.c_uint32() ap = 1 if ap else 0 res = self._dll.JLINKARM_CORESIGHT_ReadAPDPReg(reg, ap, ctypes.byref(data)) if res < 0: raise errors.JLinkException(res) return data.value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_register(self, device_id, address):\n register_array = self.read(device_id, address, 1) \n return register_array[0] << 24 | register_array[1] << 16 | register_array[2] << 8 | register_array[3]", "def _read(self, register):\n\n addr, num_bytes = register\n data = response = error = No...
[ "0.5549508", "0.54821646", "0.5394336", "0.524653", "0.5242492", "0.5227723", "0.5170179", "0.51668733", "0.51581615", "0.5112947", "0.51126945", "0.50898176", "0.5067078", "0.5057921", "0.5025098", "0.49969476", "0.49670422", "0.49533263", "0.49427095", "0.4940295", "0.48879...
0.6427987
0
Writes an Ap/DP register on a CoreSight DAP.
def coresight_write(self, reg, data, ap=True): ap = 1 if ap else 0 res = self._dll.JLINKARM_CORESIGHT_WriteAPDPReg(reg, ap, data) if res < 0: raise errors.JLinkException(res) return res
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def write_access_port_register(self, ap_index, addr, data):\n if not self._is_u8(ap_index):\n raise ValueError('The ap_index parameter must be an unsigned 8-bit value.')\n\n if not self._is_u8(addr):\n raise ValueError('The addr parameter must be an unsigned 8-bit value.')\n\n ...
[ "0.5912619", "0.58496004", "0.5589709", "0.55092216", "0.53781193", "0.5313432", "0.5263379", "0.5185087", "0.517481", "0.51665413", "0.5161652", "0.51438034", "0.5139785", "0.5089886", "0.5079097", "0.5064425", "0.50554705", "0.50554705", "0.5040679", "0.5007474", "0.5004851...
0.73050064
0
Enables TRST pin toggling on the JTAG bus on resets. When ``.reset()`` is called, it will also toggle the TRST pin on the JTAG bus.
def enable_reset_pulls_trst(self): self._dll.JLINKARM_ResetPullsTRST(1) return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_trst_pin_high(self):\n self._dll.JLINKARM_SetTRST()", "def set_trst_pin_low(self):\n self._dll.JLINKARM_ClrTRST()", "def enable(self, state=True):\n self.reset_pin = state", "def disable_reset_pulls_trst(self):\n self._dll.JLINKARM_ResetPullsTRST(0)\n return None", ...
[ "0.6643496", "0.651683", "0.6493954", "0.6314662", "0.6197655", "0.58746195", "0.58740515", "0.5842811", "0.58158493", "0.57999027", "0.57712024", "0.56995165", "0.56364906", "0.56346273", "0.56341004", "0.5613967", "0.5530702", "0.5523677", "0.551872", "0.550833", "0.5505580...
0.7203781
0
Disables TRST pin toggling on the JTAG bus on resets. When ``.reset()`` is called, it will not toggle the TRST pin on the JTAG bus.
def disable_reset_pulls_trst(self): self._dll.JLINKARM_ResetPullsTRST(0) return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enable_reset_pulls_trst(self):\n self._dll.JLINKARM_ResetPullsTRST(1)\n return None", "def turn_off(self):\n self._state = False\n if(self._device['type'] == '_DT-PLUG' or self._device['type'] == '_THIMR'):\n self._send_cmd(self._device, 'cmd=ctrl&devices={[' + self._de...
[ "0.7047018", "0.692611", "0.6803388", "0.67659885", "0.6703319", "0.6627184", "0.65967655", "0.6555131", "0.646812", "0.64560336", "0.6427041", "0.6394397", "0.6373158", "0.63679755", "0.63653654", "0.6351496", "0.63447577", "0.63233304", "0.6316743", "0.63153505", "0.6305205...
0.7316073
0
Enables CPU register initialization on resets. When ``.reset()`` is called, it will initialize the CPU registers.
def enable_reset_inits_registers(self): return bool(self._dll.JLINKARM_SetInitRegsOnReset(1))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset():\n for cpu_id in POSSIBLE_CPUS:\n set_cpu(cpu_id, True)", "def disable_reset_inits_registers(self):\n return bool(self._dll.JLINKARM_SetInitRegsOnReset(0))", "def _doEnableRegulation(self):\n self._cmdRegulOn()", "def set_online(rg = None):\n if isinstance(rg, int):\n ...
[ "0.6428399", "0.62071764", "0.59854805", "0.5924997", "0.5819452", "0.58188546", "0.578276", "0.5667287", "0.5523052", "0.54893523", "0.5474449", "0.542688", "0.5421295", "0.5388303", "0.53678936", "0.5363498", "0.5360597", "0.53309214", "0.53162414", "0.5296805", "0.52827674...
0.6735625
0
Disables CPU register initialization on resets. When ``.reset()`` is called, the CPU registers will be read and not initialized.
def disable_reset_inits_registers(self): return bool(self._dll.JLINKARM_SetInitRegsOnReset(0))
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _doDisableRegulation(self):\n self._cmdRegulOff()", "def reset():\n for cpu_id in POSSIBLE_CPUS:\n set_cpu(cpu_id, True)", "def soft_reset():", "def soft_reset() -> None:\n ...", "def disable_reset_pulls_reset(self):\n self._dll.JLINKARM_ResetPullsRESET(0)\n return Non...
[ "0.6841712", "0.6814212", "0.65517795", "0.65425783", "0.6175089", "0.61745465", "0.61726415", "0.6129466", "0.6067253", "0.60615695", "0.6049001", "0.601872", "0.5941996", "0.59338677", "0.5921118", "0.5921118", "0.59077656", "0.5891379", "0.58740896", "0.587297", "0.5855145...
0.71709925
0
Sets the target hardware to little endian.
def set_little_endian(self): res = self._dll.JLINKARM_SetEndian(0) return (res == 1)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_big_endian(self):\n res = self._dll.JLINKARM_SetEndian(1)\n return (res == 0)", "def convertLittleEndian(self):\r\n devId = str(self.deviceId)\r\n if self._littleEndian.get(devId, False):\r\n revFields = []\r\n for field in self.fields:\r\n ...
[ "0.632673", "0.6103867", "0.578732", "0.5716452", "0.53141797", "0.5301042", "0.5286674", "0.5147139", "0.5132347", "0.5131715", "0.5126195", "0.5116104", "0.5093387", "0.5075913", "0.50614595", "0.5023628", "0.5008286", "0.50069404", "0.4998253", "0.49432376", "0.48457864", ...
0.65508795
0
Sets the target hardware to big endian.
def set_big_endian(self): res = self._dll.JLINKARM_SetEndian(1) return (res == 0)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_byte_order(self, byteorder='little'):\n self._byteorder = byteorder", "def i2b_bigendian(number, num_bytes = 0):\n\n # Encoding and decoding from hexa appears to be way faster than manually\n # decoding the buffer in python.\n return a2b_hex('%0*x' % (2 * num_bytes, number))", "def endi...
[ "0.5768854", "0.5642956", "0.5574935", "0.5454092", "0.53507364", "0.5298082", "0.5297055", "0.5235109", "0.52313125", "0.52257013", "0.52223855", "0.51541966", "0.5149698", "0.5007107", "0.49346983", "0.49279207", "0.4923668", "0.49201754", "0.49041224", "0.48813447", "0.487...
0.69307876
0
Sets vector catch bits of the processor. The CPU will jump to a vector if the given vector catch is active, and will enter a debug state. This has the effect of halting the CPU as well, meaning the CPU must be explicitly restarted.
def set_vector_catch(self, flags): res = self._dll.JLINKARM_WriteVectorCatch(flags) if res < 0: raise errors.JLinkException(res) return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set(self, incoming_vector):\n self.vector = incoming_vector", "def set_state_selected(self, v):\n if len(v) == len(self.variables):\n # The vector have compatible dimensions\n i = 0\n for var in self.variables:\n self.fmu.set_real(var.value_refere...
[ "0.588564", "0.5755509", "0.56152534", "0.56096363", "0.53666955", "0.5308586", "0.52973384", "0.5287506", "0.5167567", "0.5147578", "0.514682", "0.5123401", "0.5122357", "0.51042783", "0.50968933", "0.50908905", "0.50757957", "0.5037487", "0.5019027", "0.5010268", "0.5005219...
0.65808046
0
Returns the number of currently active breakpoints.
def num_active_breakpoints(self): return self._dll.JLINKARM_GetNumBPs()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getNumActive(self):\n return self._get_active( )", "def num_active_watchpoints(self):\n return self._dll.JLINKARM_GetNumWPs()", "def number_of_launches(self):\n return self._number_of_launches", "def num_launches(self):\n return len(self.launches)", "def memory_breakpoints(s...
[ "0.68647236", "0.6606399", "0.65112054", "0.6283962", "0.62659574", "0.6215089", "0.6161328", "0.6122804", "0.61183375", "0.60720783", "0.5995464", "0.5945322", "0.5942329", "0.5907465", "0.58732694", "0.5870776", "0.5852851", "0.5849535", "0.5793954", "0.5735826", "0.5728418...
0.80561495
0
Returns the number of available breakpoints of the specified type. If ``arm`` is set, gets the number of available ARM breakpoint units. If ``thumb`` is set, gets the number of available THUMB breakpoint units. If ``ram`` is set, gets the number of available software RAM breakpoint units. If ``flash`` is set, gets the ...
def num_available_breakpoints(self, arm=False, thumb=False, ram=False, flash=False, hw=False): flags = [ enums.JLinkBreakpoint.ARM, enums.JLinkBreakpoint.THUMB, enums.JLinkBreakpoint.SW_RAM, enums.JLinkBreakpoint.SW_FLASH, enums.JLinkBreakpoint.HW ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def num_active_breakpoints(self):\n return self._dll.JLINKARM_GetNumBPs()", "def num_available_watchpoints(self):\n return self._dll.JLINKARM_GetNumWPUnits()", "def num_supported_devices(self):\n return int(self._dll.JLINKARM_DEVICE_GetInfo(-1, 0))", "def get_num_processors(cls,\n ...
[ "0.5355359", "0.4846869", "0.4439025", "0.42197138", "0.4219088", "0.41964072", "0.41819316", "0.41764075", "0.41464764", "0.41256052", "0.40978882", "0.40936813", "0.40629235", "0.40128016", "0.39761856", "0.39731324", "0.39365983", "0.39143765", "0.39051148", "0.3893468", "...
0.73272866
0
Returns the handle of a breakpoint at the given address, if any.
def breakpoint_find(self, addr): return self._dll.JLINKARM_FindBP(addr)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_breakpoint(self, addr: int) -> Optional[Breakpoint]:\n if not self.enabled:\n self.enable()\n\n if not self.can_support_address(addr):\n LOG.error('Breakpoint out of range 0x%X', addr)\n return None\n\n if self.available_breakpoints == 0:\n L...
[ "0.66570383", "0.5932505", "0.58076215", "0.5789958", "0.5729916", "0.56135786", "0.5499389", "0.54528743", "0.53728014", "0.5297297", "0.5268907", "0.518502", "0.5173076", "0.5061293", "0.5021494", "0.5004309", "0.49533403", "0.49505088", "0.49081698", "0.48791727", "0.48284...
0.75778216
0
Sets a breakpoint at the specified address. If ``thumb`` is ``True``, the breakpoint is set in THUMBmode, while if ``arm`` is ``True``, the breakpoint is set in ARMmode, otherwise a normal breakpoint is set.
def breakpoint_set(self, addr, thumb=False, arm=False): flags = enums.JLinkBreakpoint.ANY if thumb: flags = flags | enums.JLinkBreakpoint.THUMB elif arm: flags = flags | enums.JLinkBreakpoint.ARM handle = self._dll.JLINKARM_SetBPEx(int(addr), flags) if h...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hardware_breakpoint_set(self, addr, thumb=False, arm=False):\n flags = enums.JLinkBreakpoint.HW\n\n if thumb:\n flags = flags | enums.JLinkBreakpoint.THUMB\n elif arm:\n flags = flags | enums.JLinkBreakpoint.ARM\n\n handle = self._dll.JLINKARM_SetBPEx(int(addr)...
[ "0.7911063", "0.7900846", "0.5974994", "0.5354973", "0.5245846", "0.5147188", "0.4994222", "0.4952499", "0.4922751", "0.49197242", "0.4876118", "0.4865982", "0.4835593", "0.4833786", "0.47855082", "0.4759521", "0.47247407", "0.47166973", "0.47048205", "0.4695757", "0.4680878"...
0.8250489
0
Sets a software breakpoint at the specified address. If ``thumb`` is ``True``, the breakpoint is set in THUMBmode, while if ``arm`` is ``True``, the breakpoint is set in ARMmode, otherwise a normal breakpoint is set. If ``flash`` is ``True``, the breakpoint is set in flash, otherwise if ``ram`` is ``True``, the breakpo...
def software_breakpoint_set(self, addr, thumb=False, arm=False, flash=False, ram=False): if flash and not ram: flags = enums.JLinkBreakpoint.SW_FLASH elif not flash and ram: flags = enums.JLinkBreakpoint.SW_RAM else: flags = enums.JLinkBreakpoint.SW i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def hardware_breakpoint_set(self, addr, thumb=False, arm=False):\n flags = enums.JLinkBreakpoint.HW\n\n if thumb:\n flags = flags | enums.JLinkBreakpoint.THUMB\n elif arm:\n flags = flags | enums.JLinkBreakpoint.ARM\n\n handle = self._dll.JLINKARM_SetBPEx(int(addr)...
[ "0.72728807", "0.7169965", "0.5727644", "0.54929334", "0.4873804", "0.48706958", "0.48624775", "0.47125134", "0.45705143", "0.45463386", "0.45461154", "0.45066535", "0.44929972", "0.4486714", "0.44753587", "0.44720858", "0.4425859", "0.4406635", "0.43992424", "0.43746188", "0...
0.8245072
0
Sets a hardware breakpoint at the specified address. If ``thumb`` is ``True``, the breakpoint is set in THUMBmode, while if ``arm`` is ``True``, the breakpoint is set in ARMmode, otherwise a normal breakpoint is set.
def hardware_breakpoint_set(self, addr, thumb=False, arm=False): flags = enums.JLinkBreakpoint.HW if thumb: flags = flags | enums.JLinkBreakpoint.THUMB elif arm: flags = flags | enums.JLinkBreakpoint.ARM handle = self._dll.JLINKARM_SetBPEx(int(addr), flags) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def breakpoint_set(self, addr, thumb=False, arm=False):\n flags = enums.JLinkBreakpoint.ANY\n\n if thumb:\n flags = flags | enums.JLinkBreakpoint.THUMB\n elif arm:\n flags = flags | enums.JLinkBreakpoint.ARM\n\n handle = self._dll.JLINKARM_SetBPEx(int(addr), flags)...
[ "0.82137156", "0.81760395", "0.6022088", "0.5062349", "0.5014608", "0.49954847", "0.49634477", "0.49291027", "0.48982385", "0.4859576", "0.48257187", "0.4795536", "0.47926095", "0.4788778", "0.4710881", "0.4692936", "0.46668348", "0.46513638", "0.45446393", "0.44979665", "0.4...
0.83368975
0
Returns the number of currently active watchpoints.
def num_active_watchpoints(self): return self._dll.JLINKARM_GetNumWPs()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getNumActive(self):\n return self._get_active( )", "def num_available_watchpoints(self):\n return self._dll.JLINKARM_GetNumWPUnits()", "def count_current():\n return current.count()", "def numRunningTotal(self):\n activeRuns = sum(run is not None for run in self.__running + self.__cli...
[ "0.70356363", "0.69373614", "0.6885585", "0.6530227", "0.64867383", "0.6481708", "0.63767076", "0.63373053", "0.6336179", "0.6310618", "0.6266817", "0.62354225", "0.62295246", "0.62138057", "0.61786413", "0.61730844", "0.61463946", "0.60659444", "0.60367024", "0.60361654", "0...
0.8069319
0
Returns the number of available watchpoints.
def num_available_watchpoints(self): return self._dll.JLINKARM_GetNumWPUnits()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def num_active_watchpoints(self):\n return self._dll.JLINKARM_GetNumWPs()", "def get_count():\n _check_init()\n return _pypm.CountDevices()", "def num_available(self) -> int:\n return len(self)", "def total_ports(self):\n return len(self.port_extension_map.keys())", "def get_devs_cou...
[ "0.7567594", "0.6804972", "0.6639345", "0.6628959", "0.65302366", "0.650598", "0.6501943", "0.63910866", "0.6370079", "0.62870437", "0.6268347", "0.6215042", "0.6190554", "0.6190554", "0.6190554", "0.6189785", "0.61766165", "0.61457515", "0.61423755", "0.61412746", "0.6133841...
0.7948095
0
Returns information about the specified watchpoint.
def watchpoint_info(self, handle=0, index=-1): if index < 0 and handle == 0: raise ValueError('Handle must be provided if index is not set.') wp = structs.JLinkWatchpointInfo() res = self._dll.JLINKARM_GetWPInfoEx(index, ctypes.byref(wp)) if res < 0: raise errors...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_time_info(self):\n\n raise NotImplementedError", "def info(self):\n return self.current_run.info", "def get_public_timer_details(id):\n\twith postgres, postgres.cursor(cursor_factory=psycopg2.extras.RealDictCursor) as cur:\n\t\tcur.execute(\"select twitchid, title, delta, maxtime, styling...
[ "0.5288633", "0.52061766", "0.5194845", "0.51197994", "0.5077903", "0.5023938", "0.49774984", "0.49735132", "0.4970003", "0.49629822", "0.49261737", "0.49261737", "0.49248314", "0.4921175", "0.49147016", "0.4909535", "0.49038142", "0.48839468", "0.485242", "0.4850275", "0.484...
0.7288868
0
Sets a watchpoint at the given address. This method allows for a watchpoint to be set on an given address or range of addresses. The watchpoint can then be triggered if the data at the given address matches the specified ``data`` or range of data as determined by ``data_mask``, on specific access size events, reads, wr...
def watchpoint_set(self, addr, addr_mask=0x0, data=0x0, data_mask=0x0, access_size=None, read=False, write=False, privileged=False): ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_data(self, addr, value):\n\t\tif addr < 0:\n\t\t\tprint(\"FAIL - negative address\")\n\t\tif addr >= len(self.data):\n\t\t\tself.regs[ addr ] = value\n\t\telse:\n\t\t\tself.data[ addr ] = value", "def set(self, addr, value):\n\n if len(addr) == 4:\n ipset.ipmap_ipv4_set(self.map, addr, ...
[ "0.6131378", "0.61020494", "0.5708645", "0.5516682", "0.54731756", "0.54296947", "0.54079705", "0.53658444", "0.53445214", "0.5325114", "0.5300669", "0.5296494", "0.5230016", "0.5160731", "0.5110615", "0.5108272", "0.51064473", "0.50740623", "0.50721025", "0.5062611", "0.5028...
0.8006237
0
Clears the watchpoint with the specified handle.
def watchpoint_clear(self, handle): return not self._dll.JLINKARM_ClrDataEvent(handle)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def del_handle(self, handle):\n\n self.pool.remove(handle)", "def strace_clear(self, handle):\n data = ctypes.c_int(handle)\n res = self._dll.JLINK_STRACE_Control(enums.JLinkStraceCommand.TRACE_EVENT_CLR, ctypes.byref(data))\n if res < 0:\n raise errors.JLinkException('Fail...
[ "0.6248927", "0.6134606", "0.58395714", "0.56157714", "0.5597939", "0.55212665", "0.5358931", "0.53389496", "0.53217834", "0.53036", "0.53007644", "0.52852225", "0.52852225", "0.5278302", "0.5208684", "0.5208076", "0.5194022", "0.51736706", "0.5170242", "0.513492", "0.5102366...
0.63532555
0
Configures the trace port width for tracing. Note that configuration cannot occur while STRACE is running.
def strace_configure(self, port_width): if port_width not in [1, 2, 4]: raise ValueError('Invalid port width: %s' % str(port_width)) config_string = 'PortWidth=%d' % port_width res = self._dll.JLINK_STRACE_Config(config_string.encode()) if res < 0: raise errors.J...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def port_width(self) -> int:\n pass", "def set_width(self, *args):\n return _ida_hexrays.lvar_t_set_width(self, *args)", "def set_sampwidth(self, sampwidth):\n self._sampwidth = int(sampwidth)", "def set_width(self, value):\n if value not in range(0, 19):\n raise Settin...
[ "0.56108373", "0.5561649", "0.5474787", "0.54565775", "0.53900445", "0.53244764", "0.52934265", "0.5229492", "0.52262616", "0.5191122", "0.5187632", "0.51697195", "0.51198334", "0.51194835", "0.51088935", "0.51073194", "0.50802296", "0.5051384", "0.50142777", "0.5005953", "0....
0.70453405
0
Stops the sampling of STRACE data. Any capturing of STRACE data is automatically stopped when the CPU is halted.
def strace_stop(self): res = self._dll.JLINK_STRACE_Stop() if res < 0: raise errors.JLinkException('Failed to stop STRACE.') return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def stop_recording(self):\n ret = 0\n if self.trace_name is not None:\n logging.debug('Stopping ETW trace')\n command = ['xperf', '-stop', self.trace_name]\n ret = subprocess.call(command, shell=True)\n return ret", "def trace_stop(self):\n cmd = enums...
[ "0.7296261", "0.6905446", "0.68412906", "0.6781526", "0.6619143", "0.6550289", "0.6549774", "0.64711946", "0.6454229", "0.6454229", "0.6454229", "0.6454229", "0.64265275", "0.6426515", "0.6426211", "0.6426211", "0.6426211", "0.6426211", "0.6426211", "0.6426211", "0.6426211", ...
0.69113666
1
Reads and returns a number of instructions captured by STRACE. The number of instructions must be a nonnegative value of at most ``0x10000`` (``65536``).
def strace_read(self, num_instructions): if num_instructions < 0 or num_instructions > 0x10000: raise ValueError('Invalid instruction count.') buf = (ctypes.c_uint32 * num_instructions)() buf_size = num_instructions res = self._dll.JLINK_STRACE_Read(ctypes.byref(buf), buf_si...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def read_stack(self):\n\n result = self.memory.read(0x100 + self.sp)\n self.inc_sp()\n\n return result", "def get_stack_numbers():\n\n print(\"-> start stack count\")\n tstart = time.time()\n proc = sbp.run([\"curl\",\n \"--silent\",\n \"--reque...
[ "0.55059636", "0.5452924", "0.5432328", "0.52066094", "0.5203232", "0.51891667", "0.51845646", "0.51574874", "0.5111512", "0.5107853", "0.50859004", "0.5074597", "0.5052804", "0.504422", "0.5028471", "0.495956", "0.49401176", "0.49117115", "0.4881054", "0.48705152", "0.484619...
0.6570299
0
Sets an event to trigger trace logic when data access is made. Data access corresponds to either a read or write.
def strace_data_access_event(self, operation, address, data, data_mask=None, access_width=4, address_range=0): cmd...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def access(self, value):\n self._access = value", "def writeEvent(self):\n\t\ttry:\n\t\t\tif self.dataFileHnd:\n\t\t\t\tself.dataFileHnd.writeRecord( (self.mdList())+[self.eventData] )\n\t\texcept sqlite3.OperationalError, err:\n\t\t\t# If the db is locked, wait 1 s and try again.\n\t\t\tprint err\n\t\t\t...
[ "0.5943679", "0.56810176", "0.562301", "0.5570702", "0.5392842", "0.536137", "0.53418964", "0.53056663", "0.52853847", "0.52532727", "0.52532727", "0.52532727", "0.52413166", "0.5229197", "0.522784", "0.5208512", "0.51997685", "0.5174352", "0.51738775", "0.5131614", "0.510773...
0.5818223
1
Clears the trace event specified by the given handle.
def strace_clear(self, handle): data = ctypes.c_int(handle) res = self._dll.JLINK_STRACE_Control(enums.JLinkStraceCommand.TRACE_EVENT_CLR, ctypes.byref(data)) if res < 0: raise errors.JLinkException('Failed to clear STRACE event.') return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def cancel_listen_log(self, handle: str) -> None:\n self.logger.debug(\"Canceling listen_log for %s\", self.name)\n await self.AD.logging.cancel_log_callback(self.name, handle)", "def clear(self):\n self.events[get_ident()][0].clear()", "def watchpoint_clear(self, handle):\n r...
[ "0.5847377", "0.5841807", "0.5766414", "0.5558014", "0.5521317", "0.5482951", "0.542024", "0.5380767", "0.5358833", "0.53535414", "0.5263508", "0.524865", "0.52404356", "0.52147174", "0.5135786", "0.51096904", "0.5055153", "0.50205714", "0.5013537", "0.49863973", "0.49727026"...
0.7246619
0
Clears all STRACE events.
def strace_clear_all(self): data = 0 res = self._dll.JLINK_STRACE_Control(enums.JLinkStraceCommand.TRACE_EVENT_CLR_ALL, data) if res < 0: raise errors.JLinkException('Failed to clear all STRACE events.') return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def strace_clear(self, handle):\n data = ctypes.c_int(handle)\n res = self._dll.JLINK_STRACE_Control(enums.JLinkStraceCommand.TRACE_EVENT_CLR, ctypes.byref(data))\n if res < 0:\n raise errors.JLinkException('Failed to clear STRACE event.')\n\n return None", "def _clear(self...
[ "0.68128574", "0.6223022", "0.6110778", "0.5969507", "0.59183097", "0.5814753", "0.5769321", "0.5760465", "0.56920195", "0.5668435", "0.5630419", "0.55782264", "0.55782264", "0.55782264", "0.55782264", "0.55615306", "0.55257744", "0.54698366", "0.54668486", "0.5457822", "0.54...
0.82447684
0
Sets the STRACE buffer size.
def strace_set_buffer_size(self, size): size = ctypes.c_uint32(size) res = self._dll.JLINK_STRACE_Control(enums.JLinkStraceCommand.SET_BUFFER_SIZE, size) if res < 0: raise errors.JLinkException('Failed to set the STRACE buffer size.') return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def trace_set_buffer_capacity(self, size):\n cmd = enums.JLinkTraceCommand.SET_CAPACITY\n data = ctypes.c_uint32(size)\n res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data))\n if (res == 1):\n raise errors.JLinkException('Failed to set trace buffer size.')\n ...
[ "0.6920317", "0.6400012", "0.6176236", "0.60106254", "0.60056466", "0.59818834", "0.5822614", "0.58011776", "0.57681304", "0.57458043", "0.5735189", "0.57015634", "0.56541663", "0.56024206", "0.5548288", "0.54854214", "0.547238", "0.547238", "0.54666924", "0.5460499", "0.5363...
0.8064104
0
Flushes the trace buffer. After this method is called, the trace buffer is empty. This method is best called when the device is reset.
def trace_flush(self): cmd = enums.JLinkTraceCommand.FLUSH res = self._dll.JLINKARM_TRACE_Control(cmd, 0) if (res == 1): raise errors.JLinkException('Failed to flush the trace buffer.') return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def flush_tx_buffer(self):\n pass", "def _flush_buffer(self):\n pass", "def flush(self):\n\n with self:\n _gl.glFlush()", "def flushBuffer():\n\tif settings.dry_run or settings.force_sync == True:\n\t\treturn\n\tif settings.debug:\n\t\tsettings._counters['flush'] += 1\n\t\n\ts...
[ "0.7083509", "0.6995583", "0.67981714", "0.6700382", "0.66695535", "0.65450597", "0.6528711", "0.65057683", "0.6499305", "0.6441013", "0.6425696", "0.6425532", "0.6420656", "0.641265", "0.64023817", "0.64023817", "0.64023817", "0.64023817", "0.6345354", "0.6335331", "0.632668...
0.74916774
0
Retrieves the number of samples in the trace buffer.
def trace_sample_count(self): cmd = enums.JLinkTraceCommand.GET_NUM_SAMPLES data = ctypes.c_uint32(self.trace_max_buffer_capacity()) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to get trace sample count.')...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getNrSamples(self): \r\n return self.numSamples", "def _number_of_samples(self):\n return len(self._raw_data.samples)", "def get_num_samples(self):\n return self._num_samples", "def sample_count(self):\n if self._sample_count:\n return self._sample_count\n ...
[ "0.7890887", "0.78363454", "0.7713788", "0.7562767", "0.7550814", "0.75071865", "0.71548295", "0.70458156", "0.699793", "0.6992127", "0.6951864", "0.6940603", "0.6927937", "0.69226366", "0.6897505", "0.6882042", "0.68308145", "0.6811631", "0.68039465", "0.6729793", "0.6704089...
0.8239586
0
Retrieves the trace buffer's current capacity.
def trace_buffer_capacity(self): cmd = enums.JLinkTraceCommand.GET_CONF_CAPACITY data = ctypes.c_uint32(0) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to get trace buffer size.') return data.value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def trace_min_buffer_capacity(self):\n cmd = enums.JLinkTraceCommand.GET_MIN_CAPACITY\n data = ctypes.c_uint32(0)\n res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data))\n if (res == 1):\n raise errors.JLinkException('Failed to get min trace buffer size.')\n ...
[ "0.771051", "0.7688067", "0.75778353", "0.70868284", "0.70386136", "0.7030021", "0.6869008", "0.6845027", "0.6823405", "0.6793", "0.66108155", "0.6581122", "0.65617603", "0.6551277", "0.651941", "0.64739126", "0.644649", "0.6404226", "0.6350055", "0.6288431", "0.62771875", ...
0.8397912
0
Sets the capacity for the trace buffer.
def trace_set_buffer_capacity(self, size): cmd = enums.JLinkTraceCommand.SET_CAPACITY data = ctypes.c_uint32(size) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to set trace buffer size.') return Non...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def capacity(self, capacity):\n\n self._capacity = capacity", "def __init__(self, capacity):\n self.experiences = RingBuf(capacity)", "def use_buffer(self, buffer_size):\n self.__buffer_size = buffer_size\n if self.__buffer is None:\n self.__buffer = []", "def set_capac...
[ "0.6950556", "0.665901", "0.6350825", "0.6227361", "0.61720806", "0.6138118", "0.6137331", "0.61372405", "0.61253226", "0.60675997", "0.60297185", "0.6005947", "0.5925741", "0.5900816", "0.5830203", "0.5797458", "0.5741606", "0.57298124", "0.5727856", "0.5715343", "0.5715343"...
0.8038555
0
Retrieves the minimum capacity the trace buffer can be configured with.
def trace_min_buffer_capacity(self): cmd = enums.JLinkTraceCommand.GET_MIN_CAPACITY data = ctypes.c_uint32(0) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to get min trace buffer size.') return data...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def trace_buffer_capacity(self):\n cmd = enums.JLinkTraceCommand.GET_CONF_CAPACITY\n data = ctypes.c_uint32(0)\n res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data))\n if (res == 1):\n raise errors.JLinkException('Failed to get trace buffer size.')\n return ...
[ "0.77461416", "0.74179524", "0.6782047", "0.6758807", "0.67446923", "0.67369145", "0.66073316", "0.65513885", "0.6542826", "0.6542826", "0.6542826", "0.64848125", "0.64655745", "0.6422143", "0.6422143", "0.6422143", "0.6422143", "0.6422143", "0.6422143", "0.6422143", "0.64221...
0.85715324
0
Retrieves the maximum size the trace buffer can be configured with.
def trace_max_buffer_capacity(self): cmd = enums.JLinkTraceCommand.GET_MAX_CAPACITY data = ctypes.c_uint32(0) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to get max trace buffer size.') return data...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def max_length(self):\n return self._config.trace_max_length", "def get_max_history_size():\n try:\n size = os.environ[MAX_HISTORY_SIZE_ENVAR]\n except KeyError:\n size = DEFAULT_HISTORY_SIZE\n\n return int(size)", "def maxsize(self):\r\n return self._maxsize", "def maxsi...
[ "0.77120703", "0.7499698", "0.7441316", "0.73520535", "0.7292908", "0.7253501", "0.71020037", "0.70188147", "0.6977144", "0.69589394", "0.6938915", "0.67095035", "0.67061985", "0.66977596", "0.66542995", "0.6627171", "0.66157085", "0.6608532", "0.65814835", "0.657451", "0.656...
0.80594724
0
Sets the format for the trace buffer to use.
def trace_set_format(self, fmt): cmd = enums.JLinkTraceCommand.SET_FORMAT data = ctypes.c_uint32(fmt) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to set trace format.') return None
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def format(self, format):\n\n self._format = format", "def format(self, format):\n\n self._format = format", "def set_formatter(self, formatter):\n self.format = formatter", "def set_format(self, fmt):\n\n if \"{message}\" not in fmt:\n raise ValueError(\"Defining a log...
[ "0.6972139", "0.6972139", "0.68299055", "0.6735436", "0.6694068", "0.6684331", "0.6602846", "0.64559156", "0.6348267", "0.6251015", "0.6100758", "0.6044617", "0.60334295", "0.6023734", "0.5986596", "0.59752744", "0.58938295", "0.58753484", "0.5823512", "0.57472926", "0.574375...
0.7670149
0
Retrieves the current format the trace buffer is using.
def trace_format(self): cmd = enums.JLinkTraceCommand.GET_FORMAT data = ctypes.c_uint32(0) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to get trace format.') return data.value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_format(self):\n return self._format[0]", "def get_format(cls):\n return cls._format", "def get_format(self):\n pass", "def format(self):\n return self[\"format\"]", "def format(self):\n return self[\"format\"]", "def format(self):\n return self.getparam(\...
[ "0.7278209", "0.71236235", "0.694815", "0.6714285", "0.6714285", "0.65274006", "0.65274006", "0.64379835", "0.6338454", "0.61924106", "0.6175373", "0.61167884", "0.61080146", "0.61078227", "0.60834014", "0.60227925", "0.60068744", "0.58873326", "0.5880717", "0.5864496", "0.58...
0.7472392
0
Retrieves a count of the number of available trace regions.
def trace_region_count(self): cmd = enums.JLinkTraceCommand.GET_NUM_REGIONS data = ctypes.c_uint32(0) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(data)) if (res == 1): raise errors.JLinkException('Failed to get trace region count.') return data.value
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def getNumberOfTraces(self) -> int:\n\n if not self.debug:\n self.myFieldFox.write(\"CALC:PAR:COUN?\")\n ret = self.myFieldFox.read()\n else:\n ret = 4\n return ret", "def count(self, trace):\n return len(trace)", "def test_count_reads_in_region_tota...
[ "0.6610172", "0.6549948", "0.6345986", "0.6305908", "0.60852456", "0.6085123", "0.6055033", "0.60008574", "0.5877418", "0.58640087", "0.58535117", "0.58480984", "0.5839381", "0.5820511", "0.58196557", "0.5810047", "0.5803623", "0.58035827", "0.5780707", "0.5735426", "0.572333...
0.84732485
0
Retrieves the properties of a trace region.
def trace_region(self, region_index): cmd = enums.JLinkTraceCommand.GET_REGION_PROPS_EX region = structs.JLinkTraceRegion() region.RegionIndex = int(region_index) res = self._dll.JLINKARM_TRACE_Control(cmd, ctypes.byref(region)) if (res == 1): raise errors.JLinkExcept...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_properties():", "def getProperties():", "def get_properties(self):\n return self.properties", "def readProperties(self):\r\n print('not yet implemented')", "def get_properties(self):\n return self.properties", "def properties_get(self):\n return self._get('properties')", ...
[ "0.616647", "0.58468425", "0.5747861", "0.5704675", "0.5639617", "0.5624171", "0.56044626", "0.5574992", "0.5572842", "0.55527574", "0.5526566", "0.54327834", "0.540428", "0.540428", "0.53850794", "0.53822297", "0.53331864", "0.5330666", "0.53261036", "0.5281814", "0.52782726...
0.6818561
0
Reads data from the trace buffer and returns it.
def trace_read(self, offset, num_items): buf_size = ctypes.c_uint32(num_items) buf = (structs.JLinkTraceData * num_items)() res = self._dll.JLINKARM_TRACE_Read(buf, int(offset), ctypes.byref(buf_size)) if (res == 1): raise errors.JLinkException('Failed to read from trace buff...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _readData(self):\n # Debug. This fn should be called only after checking canRead()\n if not self._canRead():\n raise Exception(\"Trying to read more data than there is.\")\n\n data = self.buffer[:self._expectedByteCount]\n self.buffer = self.buffer[self._expectedByteCount...
[ "0.65608245", "0.65472174", "0.6494285", "0.6446909", "0.64214087", "0.64170736", "0.63404375", "0.63133985", "0.6298168", "0.62870604", "0.6285075", "0.6265165", "0.6133888", "0.61135954", "0.6105196", "0.60824853", "0.60824853", "0.60403675", "0.6001158", "0.5956859", "0.59...
0.6645445
0
Returns whether or not SWO is enabled.
def swo_enabled(self): return self._swo_enabled
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_spow_enabled() -> bool:\n\n return _SPOW_ENABLED", "def sso_enabled(self) -> Optional[pulumi.Input[bool]]:\n return pulumi.get(self, \"sso_enabled\")", "def is_on(self):\n return self._program.get(\"enabled\") is True", "def is_enabled(self):\n return self.sdk.is_enabled", "d...
[ "0.79768133", "0.71558595", "0.71338975", "0.69183356", "0.6888833", "0.6888833", "0.6888833", "0.6888833", "0.6888833", "0.6888833", "0.6856378", "0.6809233", "0.67789936", "0.67789936", "0.67789936", "0.67789936", "0.67789936", "0.67789936", "0.67789936", "0.67789936", "0.6...
0.872539
0
Enables SWO output on the target device. Configures the output protocol, the SWO output speed, and enables any ITM & stimulus ports. This is equivalent to calling ``.swo_start()``.
def swo_enable(self, cpu_speed, swo_speed=9600, port_mask=0x01): if self.swo_enabled(): self.swo_stop() res = self._dll.JLINKARM_SWO_EnableTarget(cpu_speed, swo_speed, enums.JLinkSWOInterface...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def enable_output(self):\n\n self.__rtcconfig = self.__helper.updatebyte(self.__rtcconfig, 7, 1)\n self.__rtcconfig = self.__helper.updatebyte(self.__rtcconfig, 4, 1)\n self.__bus.write_byte_data(\n self.__rtcaddress, self.CONTROL, self.__rtcconfig)\n return", "def swo_star...
[ "0.63976353", "0.63337696", "0.5933786", "0.58872557", "0.58789283", "0.58205724", "0.5778575", "0.5746097", "0.5728807", "0.57080215", "0.57026577", "0.5694266", "0.56766576", "0.5658336", "0.5641077", "0.56345475", "0.5598635", "0.5560024", "0.55540895", "0.55470467", "0.55...
0.68389094
0
Flushes data from the SWO buffer. After this method is called, the flushed part of the SWO buffer is empty. If ``num_bytes`` is not present, flushes all data currently in the SWO buffer.
def swo_flush(self, num_bytes=None): if num_bytes is None: num_bytes = self.swo_num_bytes() buf = ctypes.c_uint32(num_bytes) res = self._dll.JLINKARM_SWO_Control(enums.JLinkSWOCommands.FLUSH, ctypes.byref(buf)) if res < 0: ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def flush(self):\n data = self._wbuf.getvalue()\n if data:\n self._write(data)\n self._len = 0\n self._wbuf = BytesIO()", "def flush(self, _width=-1):\n if _width < 0:\n _width = self._last_width\n self.stream.flush()\n self.stream.write(self...
[ "0.6228696", "0.62218314", "0.59985137", "0.5958193", "0.5785261", "0.5764478", "0.5731432", "0.5729449", "0.5710459", "0.5640176", "0.56241083", "0.5610851", "0.54598415", "0.54259485", "0.53841025", "0.5353912", "0.53519416", "0.5318311", "0.5297716", "0.52641386", "0.52437...
0.73519665
0
Retrieves information about the supported SWO speeds.
def swo_speed_info(self): info = structs.JLinkSWOSpeedInfo() res = self._dll.JLINKARM_SWO_Control(enums.JLinkSWOCommands.GET_SPEED_INFO, ctypes.byref(info)) if res < 0: raise errors.JLinkException(res) return info
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def swo_supported_speeds(self, cpu_speed, num_speeds=3):\n buf_size = num_speeds\n buf = (ctypes.c_uint32 * buf_size)()\n res = self._dll.JLINKARM_SWO_GetCompatibleSpeeds(cpu_speed, 0, buf, buf_size)\n if res < 0:\n raise errors.JLinkException(res)\n\n return list(buf)...
[ "0.743235", "0.716045", "0.7023032", "0.68969095", "0.68793875", "0.68793875", "0.68715847", "0.6847941", "0.68344504", "0.6779045", "0.66722244", "0.66107225", "0.6603054", "0.6551583", "0.6415546", "0.6386053", "0.6382969", "0.63817966", "0.63542986", "0.6345174", "0.634104...
0.831286
0
Retrives the number of bytes in the SWO buffer.
def swo_num_bytes(self): res = self._dll.JLINKARM_SWO_Control(enums.JLinkSWOCommands.GET_NUM_BYTES, 0) if res < 0: raise errors.JLinkException(res) return res
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def size(self):\n return len(self.buffer)", "def get_count(self):\n return unpack(os.read(self.fd, 8))", "def __len__(self):\n if self._buffer is not None:\n if self._header.value_type in b'ZBH':\n return len(self._buffer)\n else:\n retur...
[ "0.7509078", "0.73403776", "0.728405", "0.726863", "0.72662514", "0.725629", "0.725629", "0.7253812", "0.7210619", "0.7210619", "0.7194018", "0.7176008", "0.70381665", "0.7002029", "0.69900626", "0.698916", "0.69462407", "0.6917946", "0.69170696", "0.6875579", "0.68486387", ...
0.81883657
0
Sets the size of the buffer used by the host to collect SWO data.
def swo_set_host_buffer_size(self, buf_size): buf = ctypes.c_uint32(buf_size) res = self._dll.JLINKARM_SWO_Control(enums.JLinkSWOCommands.SET_BUFFERSIZE_HOST, ctypes.byref(buf)) if res < 0: raise errors.JLinkException(res) return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setBufferSize(self, buffer_size):\n DPxSetDinBuffSize(buffer_size)", "def use_buffer(self, buffer_size):\n self.__buffer_size = buffer_size\n if self.__buffer is None:\n self.__buffer = []", "def swo_set_emu_buffer_size(self, buf_size):\n buf = ctypes.c_uint32(buf_siz...
[ "0.68911123", "0.6862172", "0.68354625", "0.6732071", "0.6648644", "0.6638339", "0.65711635", "0.6389723", "0.6266438", "0.61857677", "0.6128519", "0.61245537", "0.6116076", "0.61118543", "0.60990536", "0.60990536", "0.6017399", "0.60141945", "0.60055697", "0.60055697", "0.60...
0.753333
0
Retrives a list of SWO speeds supported by both the target and the connected JLink. The supported speeds are returned in order from highest to lowest.
def swo_supported_speeds(self, cpu_speed, num_speeds=3): buf_size = num_speeds buf = (ctypes.c_uint32 * buf_size)() res = self._dll.JLINKARM_SWO_GetCompatibleSpeeds(cpu_speed, 0, buf, buf_size) if res < 0: raise errors.JLinkException(res) return list(buf)[:res]
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def speed_list(self) -> list:\n wink_supported_speeds = self.wink.fan_speeds()\n supported_speeds = []\n if SPEED_AUTO in wink_supported_speeds:\n supported_speeds.append(SPEED_AUTO)\n if SPEED_LOWEST in wink_supported_speeds:\n supported_speeds.append(SPEED_LOWEST...
[ "0.73838687", "0.7052116", "0.6694917", "0.6404581", "0.6400417", "0.6162541", "0.61208576", "0.60476696", "0.59016836", "0.59016836", "0.5797329", "0.57881665", "0.57740146", "0.5736986", "0.5695876", "0.56665194", "0.5580919", "0.55670124", "0.5551905", "0.55476165", "0.554...
0.7636436
0
Reads data from the SWO buffer. The data read is not automatically removed from the SWO buffer after reading unless ``remove`` is ``True``. Otherwise the callee must explicitly remove the data by calling ``.swo_flush()``.
def swo_read(self, offset, num_bytes, remove=False): buf_size = ctypes.c_uint32(num_bytes) buf = (ctypes.c_uint8 * num_bytes)(0) self._dll.JLINKARM_SWO_Read(buf, offset, ctypes.byref(buf_size)) # After the call, ``buf_size`` has been modified to be the actual # number of bytes ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def sdr_read( Qin, sdr, N_samples, stop_flag ):\n\twhile ( not stop_flag.is_set() ):\n\t\ttry:\n\t\t\tdata_chunk = abs(sdr.read_samples(N_samples)) # get samples \n\t\texcept Exception as e:\n\t\t\tprint(\"\\n*** Error reading RTLSDR - \", e, \" ***\")\n\t\t\tprint(\"Stopping threads...\")\n\t\t\tstop_flag.set(...
[ "0.534376", "0.5317881", "0.5251788", "0.519594", "0.516025", "0.51576304", "0.5138259", "0.5116648", "0.5071101", "0.5039177", "0.5014468", "0.49235007", "0.49235007", "0.4896155", "0.4890796", "0.48892754", "0.48865432", "0.4856261", "0.48489138", "0.4844229", "0.48218587",...
0.74357724
0
Reads the printable data via SWO. This method reads SWO for one stimulus port, which is all printable data.
def swo_read_stimulus(self, port, num_bytes): if port < 0 or port > 31: raise ValueError('Invalid port number: %s' % port) buf_size = num_bytes buf = (ctypes.c_uint8 * buf_size)() bytes_read = self._dll.JLINKARM_SWO_ReadStimulus(port, buf, buf_size) return list(buf)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _read_from_printer(self):\n if self._ser is not None:\n val = self._ser.read(1)\n else:\n val = b'\\xff'\n\n return int.from_bytes(val, byteorder='big', signed=False)", "def read_and_print(serial):\r\n resp = read_buffer(serial)\r\n if resp != \"\":\r\n ...
[ "0.5738603", "0.5585439", "0.54450685", "0.53783053", "0.53393465", "0.52912915", "0.52868503", "0.52743787", "0.52319765", "0.5204636", "0.5200327", "0.516607", "0.51478475", "0.51343673", "0.5132707", "0.5123633", "0.51164335", "0.51086086", "0.5094361", "0.5094361", "0.509...
0.5897763
0
Stops RTT on the JLink and host side.
def rtt_stop(self): self.rtt_control(enums.JLinkRTTCommand.STOP, None)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def stop_rtsp_livestream(self):\n await self.api.stop_rtsp_livestream(self.product_type, self.serial_no)", "def trace_stop(self):\n cmd = enums.JLinkTraceCommand.STOP\n res = self._dll.JLINKARM_TRACE_Control(cmd, 0)\n if (res == 1):\n raise errors.JLinkException('Fail...
[ "0.67770505", "0.6520047", "0.6458501", "0.64579546", "0.6427522", "0.6412516", "0.63770336", "0.63579494", "0.63296074", "0.63012546", "0.6266714", "0.6256433", "0.6211766", "0.6205121", "0.6197554", "0.61740124", "0.6164119", "0.6164119", "0.6153258", "0.6152153", "0.608761...
0.7804298
0
After starting RTT, get the descriptor for an RTT control block.
def rtt_get_buf_descriptor(self, buffer_index, up): desc = structs.JLinkRTTerminalBufDesc() desc.BufferIndex = buffer_index desc.Direction = 0 if up else 1 self.rtt_control(enums.JLinkRTTCommand.GETDESC, desc) return desc
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _get_desc(self):\n return self.__desc", "def get_control(self):\n return self.o.read_register(self.dev_id, CONTROL)", "def get_ptt(self):\n\t\tif self.mode == None: \n\t\t\traise IOError, \"RadioControl is not opened\"\n\t\treturn self.ptt", "def get_description(self):\n\t\treturn call_sdk_function...
[ "0.51828915", "0.51589984", "0.5148673", "0.5111085", "0.50734", "0.50313437", "0.49977776", "0.49016356", "0.47577018", "0.47540224", "0.47480413", "0.47183996", "0.47167715", "0.47065765", "0.46995997", "0.4686992", "0.46703476", "0.4651421", "0.46496764", "0.46447816", "0....
0.54774386
0
After starting RTT, get the current number of up buffers.
def rtt_get_num_up_buffers(self): cmd = enums.JLinkRTTCommand.GETNUMBUF dir = ctypes.c_int(enums.JLinkRTTDirection.UP) return self.rtt_control(cmd, dir)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rtt_get_num_down_buffers(self):\n cmd = enums.JLinkRTTCommand.GETNUMBUF\n dir = ctypes.c_int(enums.JLinkRTTDirection.DOWN)\n return self.rtt_control(cmd, dir)", "def total_buffers_count(self) -> int:\n return int(self._pts / self._duration)", "def total_buffers_count(self) -> in...
[ "0.74135417", "0.64642566", "0.64096886", "0.63482887", "0.63453335", "0.6299739", "0.60569495", "0.60547596", "0.60235727", "0.58380735", "0.5810114", "0.5807625", "0.5792702", "0.57648057", "0.57356197", "0.57328004", "0.57146174", "0.569756", "0.56881547", "0.5670792", "0....
0.8594781
0
After starting RTT, get the current number of down buffers.
def rtt_get_num_down_buffers(self): cmd = enums.JLinkRTTCommand.GETNUMBUF dir = ctypes.c_int(enums.JLinkRTTDirection.DOWN) return self.rtt_control(cmd, dir)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def rtt_get_num_up_buffers(self):\n cmd = enums.JLinkRTTCommand.GETNUMBUF\n dir = ctypes.c_int(enums.JLinkRTTDirection.UP)\n return self.rtt_control(cmd, dir)", "def bufferCnt():\n if(reset == 1):\n bufferCounter.next = 0\n else:\n if(decimationRatio > 0):...
[ "0.8007244", "0.664818", "0.64438826", "0.6393383", "0.63860357", "0.63858676", "0.6301523", "0.62203777", "0.61707145", "0.6081975", "0.60648215", "0.6056651", "0.59080255", "0.59080255", "0.58959013", "0.5858845", "0.58298624", "0.5820211", "0.57831985", "0.57446045", "0.57...
0.84737396
0
After starting RTT, get the status.
def rtt_get_status(self): status = structs.JLinkRTTerminalStatus() res = self.rtt_control(enums.JLinkRTTCommand.GETSTAT, status) return status
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def get_status():", "def remote_status():", "def _get_status(self):\n return self.__status", "def GetStatus(self):\r\n return self.status", "def getStatus():", "def getstatus(self):\n return self.__status", "def get_status(self):\n return self.read_register(259, 0, 3)", "def...
[ "0.73571676", "0.70574486", "0.70134646", "0.68640107", "0.6849386", "0.67568827", "0.671399", "0.66682917", "0.66682917", "0.66682917", "0.66287977", "0.66184705", "0.66145307", "0.65859246", "0.65851915", "0.6526237", "0.6480685", "0.6480685", "0.64416003", "0.64387596", "0...
0.7673149
0
Reads data from the RTT buffer. This method will read at most num_bytes bytes from the specified RTT buffer. The data is automatically removed from the RTT buffer. If there are not num_bytes bytes waiting in the RTT buffer, the entire contents of the RTT buffer will be read.
def rtt_read(self, buffer_index, num_bytes): buf = (ctypes.c_ubyte * num_bytes)() bytes_read = self._dll.JLINK_RTTERMINAL_Read(buffer_index, buf, num_bytes) if bytes_read < 0: raise errors.JLinkRTTException(bytes_read) return list(buf[:bytes_read])
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "async def read(self, num_bytes=0) -> bytes:\n if num_bytes < 1:\n num_bytes = self.in_waiting or 1\n\n return await self._read(num_bytes)", "def read(self, num_bytes_to_read):\n pass", "def read_bytes(self, number_of_bytes):\n\n self.index = -1\n data = self.bu...
[ "0.681049", "0.6557881", "0.6406431", "0.6171479", "0.608534", "0.60714704", "0.6060233", "0.6027395", "0.60082173", "0.59063107", "0.5899066", "0.58320665", "0.581627", "0.58125967", "0.57969856", "0.57892144", "0.575086", "0.5722392", "0.57041216", "0.56944233", "0.5692779"...
0.6953554
0
Issues an RTT Control command. All RTT control is done through a single API call which expects specifically laidout configuration structures.
def rtt_control(self, command, config): config_byref = ctypes.byref(config) if config is not None else None res = self._dll.JLINK_RTTERMINAL_Control(command, config_byref) if res < 0: raise errors.JLinkRTTException(res) return res
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def set_control_commands(self, ref_state, ref_ind):\n super(DummyVehicle, self).set_control_commands(ref_state, ref_ind)\n safety_distance = 20.\n full_stop_distance = 15.\n\n\n self.check_if_overtake_is_finished()\n\n # Only continue from this point if there are some radar sensi...
[ "0.5611382", "0.54495084", "0.5438598", "0.5412512", "0.54030895", "0.5399536", "0.5363509", "0.5285749", "0.52795", "0.5261887", "0.52110565", "0.5189284", "0.5146835", "0.5122465", "0.5069438", "0.50466096", "0.5010881", "0.49524102", "0.49433076", "0.4936501", "0.49313712"...
0.6953869
0
Returns whether target has CP15 coprocessor.
def cp15_present(self): result = False if self._dll.JLINKARM_CP15_IsPresent() != 0: result = True return result
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def is_fcc_on(self):\n raise NotImplementedError", "def has_fcc(self):\n raise NotImplementedError", "def isccp4(self):\n return self.__isccp4", "def isccp4i_info(self):\n return False", "def sstcp_enabled():\n return common.POWER_CAP in SYSTEM_CAPS", "def IsCUDADriverSuffi...
[ "0.65290743", "0.60872287", "0.59870017", "0.59208", "0.58543247", "0.5836446", "0.57576644", "0.5532367", "0.55304456", "0.55212915", "0.54267454", "0.5377088", "0.5345225", "0.53201634", "0.53133345", "0.5268262", "0.52494895", "0.5243372", "0.5236936", "0.52078694", "0.520...
0.7254945
0
create namespace for amq
def _create_namespace(self): self.ocp.new_project(self.namespace)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def createNamespace(self):\r\n raise NotImplementedError('Endpoint can not be used directly.')", "def test_create_net_namespace(self):\n pass", "def xmlrpc_namespace():", "def add_namespace(self, q, ns):\n if ns in self.namespaces: return self.namespaces[ns]\n self.namespaces[ns] ...
[ "0.6772053", "0.6542432", "0.6431664", "0.611138", "0.602998", "0.59950054", "0.5956721", "0.58776087", "0.5831315", "0.58159876", "0.580847", "0.5789692", "0.564449", "0.56151336", "0.5613273", "0.560254", "0.55393445", "0.5522601", "0.55105376", "0.5508322", "0.54539853", ...
0.654827
1
clone the amq repo
def _clone_amq(self): self.dir = tempfile.mkdtemp(prefix='amq_') try: log.info(f'cloning amq in {self.dir}') git_clone_cmd = f'git clone -b {self.branch} {self.repo} ' run( git_clone_cmd, shell=True, cwd=self.dir, ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def checkout_qmk():\n if exists('qmk_firmware'):\n rmtree('qmk_firmware')\n\n if not fetch_source(repo_name(QMK_GIT_URL)):\n git_clone(QMK_GIT_URL, QMK_GIT_BRANCH)", "def clone_repository():\n try:\n ssh = paramiko.SSHClient()\n ssh.set_missing_host_key_policy(paramiko.AutoAd...
[ "0.6601686", "0.65219194", "0.6412728", "0.62902653", "0.62352663", "0.6197792", "0.6189821", "0.61743504", "0.60870564", "0.6032279", "0.60253817", "0.6009575", "0.600506", "0.5996176", "0.5951947", "0.5921803", "0.5900159", "0.58719766", "0.58623374", "0.5855386", "0.585146...
0.8188606
0
Function to setup amqcluster_operator, the file file is pulling from github it will make sure clusteroperator pod is running
def setup_amq_cluster_operator(self): # self.amq_dir = constants.TEMPLATE_DEPLOYMENT_AMQ_CP run(f'oc apply -f {self.amq_dir} -n {self.namespace}', shell=True, check=True, cwd=self.dir) time.sleep(5) # Wait for strimzi-cluster-operator pod to be created if self.is_amq_pod_running...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_amq(self):\n self.setup_amq_cluster_operator()\n self.setup_amq_kafka_persistent()\n self.setup_amq_kafka_connect()\n self.setup_amq_kafka_bridge()\n self.amq_is_setup = True\n return self", "def setup(self, operator_config):\n raise NotImplementedError(...
[ "0.6137812", "0.60269564", "0.59270495", "0.5926425", "0.5862935", "0.58211577", "0.5803093", "0.5800999", "0.5782547", "0.5746737", "0.5737482", "0.56945807", "0.5680466", "0.5674034", "0.56728274", "0.5626872", "0.5620142", "0.5598463", "0.5590324", "0.55310243", "0.5518659...
0.8322934
0
The function checks if provided pod_pattern finds a pod and if the status is running or not
def is_amq_pod_running(self, pod_pattern="cluster-operator"): for pod in TimeoutSampler( 300, 10, get_pod_name_by_pattern, pod_pattern, self.namespace ): try: if pod[0] is not None: amq_pod = pod[0] break except ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def _check_status_messages(ops_test):\n is_running = re.compile(r\"Kubernetes \\S+ running.\")\n expected_running_apps = {\n \"kubernetes-control-plane\",\n \"kubernetes-worker\",\n }\n for app in expected_running_apps:\n for unit in ops_test.model.applications[app].units:\n ...
[ "0.6156226", "0.589625", "0.5841192", "0.5819036", "0.57510763", "0.563905", "0.5630833", "0.5586567", "0.55264443", "0.5460926", "0.54386413", "0.53855145", "0.53575855", "0.53282773", "0.5205478", "0.5169794", "0.5076672", "0.5068823", "0.50654393", "0.5029889", "0.500827",...
0.7474619
0
The function is to setup amqkafkaconnect, the yaml file is pulling from github
def setup_amq_kafka_connect(self): try: kafka_connect = templating.load_yaml(os.path.join(self.dir, self.amq_kafka_connect_yaml)) self.kafka_connect = OCS(**kafka_connect) self.kafka_connect.create() except(CommandFailed, CalledProcessError) as cf: log.err...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def setup_amq_kafka_bridge(self):\n try:\n kafka_bridge = templating.load_yaml(os.path.join(self.dir, self.amq_kafka_bridge_yaml))\n self.kafka_bridge = OCS(**kafka_bridge)\n self.kafka_bridge.create()\n except(CommandFailed, CalledProcessError) as cf:\n lo...
[ "0.6701641", "0.6452031", "0.599274", "0.5903524", "0.587264", "0.58680373", "0.5858421", "0.58221006", "0.577717", "0.57244027", "0.5722073", "0.57168335", "0.5686663", "0.5677332", "0.5649557", "0.5623927", "0.5622046", "0.5614625", "0.556827", "0.5504072", "0.548353", "0...
0.7001188
0
Setup AMQ from local folder, function will call all necessary sub functions to make sure amq installation is complete
def setup_amq(self): self.setup_amq_cluster_operator() self.setup_amq_kafka_persistent() self.setup_amq_kafka_connect() self.setup_amq_kafka_bridge() self.amq_is_setup = True return self
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def perform_setup():\n global credentials, connection, channel\n credentials = pika.PlainCredentials('guest', 'guest') # AUTH via Default guest user on RabbitMQ\n connection = pika.BlockingConnection(pika.ConnectionParameters(\"127.0.0.1\", 5672, '/', credentials)) # Using rabbit-mq container name to acce...
[ "0.6261016", "0.5848374", "0.5846274", "0.5775734", "0.5765345", "0.5757943", "0.5741236", "0.5708523", "0.5605173", "0.54934144", "0.54752", "0.5470472", "0.5467179", "0.54584754", "0.5452826", "0.5433339", "0.54245496", "0.5412119", "0.54026985", "0.5385889", "0.53736764", ...
0.6911775
0
Clean up function, will start to delete from amq cluster operator then amqconnector, persistent, bridge, at the end it will delete the created namespace
def cleanup(self): if self.amq_is_setup: self.kafka_persistent.delete() self.kafka_connect.delete() self.kafka_bridge.delete() run_cmd(f'oc delete -f {self.amq_dir}', shell=True, check=True, cwd=self.dir) run_cmd(f'oc delete -f {self.amq_dir_examples}'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def finalizer():\n for resource_type in pods, pvcs, storageclasses, secrets:\n for resource in resource_type:\n resource.delete()\n resource.ocp.wait_for_delete(resource.name)\n if pools:\n # Delete only the RBD pool\n pools[0].delete()\n...
[ "0.6647365", "0.6614103", "0.6593137", "0.65206265", "0.6454201", "0.64457184", "0.6405693", "0.6399101", "0.6355592", "0.6351038", "0.63320494", "0.63291115", "0.63240856", "0.63240856", "0.63240856", "0.63143414", "0.62822175", "0.62037134", "0.6182019", "0.61771804", "0.61...
0.8089122
0
return dividends (array) mod divisor (double)
def mod(dividends, divisor): output = np.zeros(len(dividends)) for i in tqdm(range(len(dividends))): output[i] = dividends[i] done=False while (not done): if output[i] >= divisor: output[i] -= divisor elif output[i] < 0.: output[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def divisible_by(array, divisor):\n return_list = list()\n for i in array:\n if i % divisor == 0:\n return_list.append(i)\n return return_list", "def getDivisors(n):", "def div(a, x):\n return [a[i]/x for i in range(2)]", "def div(self):\n a = self.nums()\n x = Lib...
[ "0.7268495", "0.69981194", "0.67672634", "0.65012485", "0.64602005", "0.6271394", "0.6270667", "0.62052494", "0.6193089", "0.6164783", "0.6145128", "0.60870326", "0.60866946", "0.60835546", "0.6070176", "0.605215", "0.60451406", "0.60099775", "0.6008519", "0.6007599", "0.6000...
0.7769362
0
Asserts the correct number of keys have been loaded in the dictionary
def test_load_from_file_to_dict_key_length(self): self.assertEqual(len(self.loaded_json_dict), 3)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_has_correct_number_of_keys_and_values(self):\n self.has_correct_number_of_keys_and_values(2, 1)", "def test_has_correct_number_of_keys_and_values(self):\n self.has_correct_number_of_keys_and_values(2, 1)", "def test_load_from_file_to_dict_key_names(self):\n self.assertEqual(list(s...
[ "0.7521144", "0.7521144", "0.71252817", "0.70675474", "0.6965172", "0.68755746", "0.68755746", "0.68224275", "0.6808032", "0.6762078", "0.67450905", "0.6717457", "0.6693988", "0.6691864", "0.66857594", "0.66857594", "0.662442", "0.65816426", "0.6535972", "0.6533439", "0.65153...
0.78252363
0
Retrieves an access token from the specified URL
def get_access_token(self, token_url): # type: (str) -> str payload = { "grant_type" : "client_credentials", "client_id" : self.client_id, "client_secret" : self.client_secret, "scope" : self.client_scope, } headers = { "accept...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def get_access_token_from_url(url):\n #token = str(urlopen(url).read(), 'utf-8')\n token = \"\"\n return token.split('=')[1].split('&')[0]", "def get_token(url, data):\n try:\n resp = requests.post(url, data)\n return resp.json()['access_token']\n except(KeyError, requests.exceptions...
[ "0.80548334", "0.7778105", "0.7723892", "0.7671252", "0.746063", "0.7259209", "0.70471174", "0.69999343", "0.6972693", "0.689077", "0.68411034", "0.68401843", "0.68140674", "0.6807336", "0.679605", "0.6764694", "0.67364657", "0.67307097", "0.66828877", "0.6667345", "0.6659611...
0.7846253
1
Recieves raven_automove msgs, calls talker to update raven sim joint positions
def raven_automove_listener(Raven): th = np.pi / 2 Raven.T = RotX4_N(-3*th) * RotY4_N(-th) Raven.T[0,3] = 0.2 Raven.T[1,3] = 0.0 Raven.T[2,3] = -2.2 rospy.init_node('msg_converter', anonymous=True) rospy.Subscriber("/automove_test", raven_automove, callback, Raven) rospy.spin()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def wemo_process(self, msg):\n if msg[\"content\"][\"command\"] == \"nickname\":\n # print msg\n self.nickname = msg[\"content\"][\"value\"]\n self.controller.sending(\n {\"subject\": \"control\" + \".\" + self.controller.type,\n \"content_type\": \"request\",\n ...
[ "0.5960983", "0.57069784", "0.5615437", "0.5614321", "0.55254257", "0.5524562", "0.5512935", "0.5507458", "0.54885495", "0.54732364", "0.5471656", "0.54473877", "0.54036945", "0.54011154", "0.5399408", "0.5375619", "0.5367923", "0.5358058", "0.5342005", "0.531968", "0.5314277...
0.670563
0
Reset the network, this means create new hidden state. Batch_size has to be different for inference (1) and training (self.batch_size).
def reset(self, batch_size: Optional[int] = 1): self.hidden = self.get_hidden(batch_size)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset_nn(self): # Clear current network\n self.weights = np.zeros((p.num_rovers, self.n_weights))\n self.in_layer = np.zeros((p.num_rovers, self.n_inputs))\n self.hid_layer = np.zeros((p.num_rovers, self.n_nodes))\n self.out_layer = np.zeros((p.num_rovers, self.n_outputs))", "def...
[ "0.7443731", "0.70383805", "0.6995514", "0.6932904", "0.6901452", "0.6827176", "0.6706813", "0.66880304", "0.6676964", "0.66212976", "0.65956175", "0.6578764", "0.6549478", "0.65431416", "0.6520182", "0.6520058", "0.65179294", "0.64985865", "0.6486789", "0.6477914", "0.647546...
0.80477065
0
Reset the network, this means create new hidden state. Batch_size has to be different for inference (1) and training (self.batch_size).
def reset(self, batch_size: Optional[int] = 1): self.hidden = self.get_hidden(batch_size)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def reset_nn(self): # Clear current network\n self.weights = np.zeros((p.num_rovers, self.n_weights))\n self.in_layer = np.zeros((p.num_rovers, self.n_inputs))\n self.hid_layer = np.zeros((p.num_rovers, self.n_nodes))\n self.out_layer = np.zeros((p.num_rovers, self.n_outputs))", "def...
[ "0.7442087", "0.7036395", "0.6992857", "0.69295555", "0.689823", "0.68250304", "0.67034644", "0.6690982", "0.6674522", "0.6617852", "0.6592435", "0.6576428", "0.6550912", "0.65406746", "0.65178597", "0.6517668", "0.65170705", "0.6496124", "0.64839107", "0.6476173", "0.6474896...
0.8047186
1
Takes in a one dimensional array of weights and repeats them to match shape Shape is expected to have the channels as the final dimension.
def repeat_weights(weights, shape): weights_extra = weights.unsqueeze(-1) return weights_extra.expand( weights.shape[0], shape[-1]).reshape(shape)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def asrepeats(self):\n w_int = np.floor(self.weights).astype(int)\n return np.repeat(self.data, w_int, axis=0)", "def cycle_rgb_weights(weights, n):\n slices = [(c % 3, c % 3 + 1) for c in range(n)] # slice a:a+1 to keep dims\n new_weights = torch.cat([\n weights[:, a:b, :, :] for a, ...
[ "0.6672087", "0.65662587", "0.61086744", "0.6061735", "0.593376", "0.5924741", "0.5821838", "0.5821838", "0.5752013", "0.5740862", "0.57109016", "0.57063967", "0.56983244", "0.5653005", "0.56268436", "0.55902416", "0.5578135", "0.55723166", "0.55514884", "0.5545613", "0.55306...
0.80602807
0
Samples a large torch array using indexes, which are x, y arrays Reshapes output to desired_shape
def torch_big_sample(array, indexes, desired_shape): torch_arr = torch.tensor(array, dtype=torch.float32) indexed = torch_arr[[indexes[0], indexes[1]]] return indexed.reshape(desired_shape) #chunked = torch.chunk(indexed, desired_shape[0]) #chunked = [chunk.reshape(desired_shape[1:]) for chunk in ch...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def torch_sample(array, indexes, desired_shape):\n torch_arr = torch.tensor(array, dtype=torch.float32)\n indexed = torch_arr[[indexes[0], indexes[1]]]\n return indexed.reshape(desired_shape)", "def sample(num_dims, num_samples):\n samples = np.random.rand(num_samples, num_dims)\n ### TODO: Update...
[ "0.8017207", "0.6399984", "0.6391425", "0.62886256", "0.6175602", "0.6141711", "0.61365366", "0.6119013", "0.6104678", "0.609199", "0.6084646", "0.60819733", "0.6074303", "0.60700434", "0.6056233", "0.6043682", "0.6009047", "0.5992883", "0.5980593", "0.5945474", "0.5941274", ...
0.8180284
0
Returns a forward warped novel from an input image and disparity_map For each pixel position in the reference view, shift it by the disparity, and assign the value in the reference at that new pixel position to the novel view.
def fw_warp_image( ref_view, disparity_map, ref_pos, novel_pos, dtype=np.uint8, blank=0): size_x, size_y = ref_view.shape[0:2] distance = ref_pos - novel_pos #Initialise an array of blanks novel_view = np.full(ref_view.shape, blank, dtype=dtype) #Create an array of pixel positions grid...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def slow_fw_warp_image(ref_view, disparity_map, ref_pos, novel_pos):\n size_x, size_y = ref_view.shape[0:2]\n distance = ref_pos - novel_pos\n\n novel_view = np.zeros(ref_view.shape, dtype=np.uint8)\n for x in range(size_x):\n for y in range(size_y):\n res = np.repeat(disparity_map[x,...
[ "0.7649722", "0.63507545", "0.56603175", "0.55087197", "0.54281443", "0.5152923", "0.5151577", "0.5142338", "0.5106128", "0.50775826", "0.5062876", "0.50566965", "0.50438756", "0.49814928", "0.4971205", "0.49502224", "0.49028355", "0.48962927", "0.4896202", "0.48780048", "0.4...
0.75195235
1
Returns a forward warped novel from an input image and disparity_map For each pixel position in the reference view, shift it by the disparity, and assign the value in the reference at that new pixel position to the novel view. Has a very large for loop, performance is much slower than fw_warp_image
def slow_fw_warp_image(ref_view, disparity_map, ref_pos, novel_pos): size_x, size_y = ref_view.shape[0:2] distance = ref_pos - novel_pos novel_view = np.zeros(ref_view.shape, dtype=np.uint8) for x in range(size_x): for y in range(size_y): res = np.repeat(disparity_map[x, y], 2, -1) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def fw_warp_image(\n ref_view, disparity_map, ref_pos, novel_pos,\n dtype=np.uint8, blank=0):\n size_x, size_y = ref_view.shape[0:2]\n distance = ref_pos - novel_pos\n\n #Initialise an array of blanks\n novel_view = np.full(ref_view.shape, blank, dtype=dtype)\n\n #Create an array of pixel posi...
[ "0.7871146", "0.6557981", "0.590845", "0.5848753", "0.556677", "0.5555023", "0.53966415", "0.5384732", "0.5334124", "0.53018767", "0.52012485", "0.51532924", "0.5145973", "0.51406515", "0.5120736", "0.50678146", "0.50528896", "0.5051409", "0.50450695", "0.50389236", "0.503862...
0.82180685
0
Saves an array as an image at the save_location using pillow
def save_array_as_image(array, save_location): image = Image.fromarray(array) image.save(save_location) image.close()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def save_img(img: np.ndarray, path: str) -> None:\n\n img_obj = Image.fromarray(img)\n img_obj.save(path)", "def save_array_as_image(arr, filename):\n arr = arr.copy().clip(0, 255).astype('uint8')\n im = Image.fromarray(arr)\n im.save(filename)", "def save_npimg(array: np.ndarray, path: str) -> ...
[ "0.7332789", "0.73029846", "0.7209719", "0.7165053", "0.7107845", "0.68785155", "0.68467116", "0.6779601", "0.6759873", "0.67471975", "0.6730639", "0.6710754", "0.66934115", "0.662847", "0.66220987", "0.66107297", "0.66057", "0.6593635", "0.65773165", "0.65741265", "0.6570185...
0.8270457
0
Creates a new database session.
def create_new_session(): database_engine = create_engine(SQLITE_FILE) DeclarativeBase.metadata.create_all(database_engine) DeclarativeBase.bind = database_engine session = sessionmaker() session.configure(bind=database_engine) return session()
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def create_db_session():\n engine = engine = create_engine('sqlite:///budget.db')\n Base.metadata.bind = engine\n DBSession = sessionmaker(bind=engine)\n session = DBSession()\n return session", "def create_db_session(self, engine):\r\n dbsession = sessionmaker(bind=engine)\r\n sessi...
[ "0.761112", "0.7590925", "0.7517811", "0.7439082", "0.7378206", "0.73240286", "0.73062783", "0.7277067", "0.7276615", "0.7235367", "0.7207532", "0.71814984", "0.7167368", "0.709795", "0.70924395", "0.7018541", "0.7008763", "0.6990825", "0.69532555", "0.693638", "0.6925365", ...
0.8108878
0
Encrypts a string with the included public Key. AString String to Encrypt PK Pycrypto PublicKey to encrypt with. sEncrypted = EncryptAString("This will be encrypted", myPK)
def EncryptAString(AString): key = RSA.importKey(self.public) return key.encrypt(AString, 101)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def encrypt(string,pub):\r\n string = livingDead.utfE(string)\r\n crypto = rsa.encrypt(string, pub)\r\n return crypto", "def encrypt(self, s):\n public_key = serialization.load_pem_public_key(\n self.key.encode('utf-8'),\n backend=default_backend())\n...
[ "0.72111195", "0.69654804", "0.67202634", "0.66579723", "0.648524", "0.64386356", "0.642064", "0.64033777", "0.64020604", "0.6286544", "0.62369066", "0.61830235", "0.61337686", "0.6095893", "0.6072068", "0.6060724", "0.60572493", "0.60374516", "0.59959394", "0.59689426", "0.5...
0.7729223
0
Convert epoch to given format
def epoch_to_format(epoch, format='%Y-%m-%dT%H:%M:%SZ'): return datetime.fromtimestamp(int(epoch[:10]), tz=timezone.utc).strftime(format)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def epoch_to_format(format, epoch):\n\n return datetime.fromtimestamp(int(epoch[:10]), tz=timezone.utc).strftime(format)", "def convert_epoch(aepoch):\n\tprint \"time given: \" + aepoch\n\tepoch = time.strftime(\"%a %d %b %Y %H:%M:%S +0000\", time.gmtime(float(aepoch)))\n\tprint \"converted time: \" + epoch",...
[ "0.79877687", "0.7230145", "0.6836059", "0.67555267", "0.6741767", "0.6651074", "0.6623567", "0.65830654", "0.65136546", "0.63911444", "0.63117427", "0.62356883", "0.6217576", "0.6209741", "0.61718535", "0.6166917", "0.6159766", "0.6153503", "0.6092704", "0.60758805", "0.6020...
0.75732315
1
Tests for showing ride urls
def test_show_ride_resolves(self): url = reverse('showridepage', args=['078508ce-2efc-4316-8987-12b9551be5b4']) self.assertEquals(resolve(url).func, show_ride) # pylint: disable=deprecated-method
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_url_path(self):\n response = self.client.get('/planner/recipes/')\n self.assertEqual(response.status_code, 200)", "def test_url_path(self):\n response = self.client.get('/planner/recipes/1/')\n self.assertEqual(response.status_code, 200)", "def test_view_url_exists_at_desir...
[ "0.65403044", "0.6468176", "0.6430418", "0.63576084", "0.6218334", "0.61727846", "0.6169703", "0.61654395", "0.6158014", "0.61468613", "0.61299556", "0.6121373", "0.6056406", "0.6050875", "0.5988212", "0.59336746", "0.59246355", "0.5907242", "0.5890699", "0.586923", "0.584040...
0.71813774
0
Test optimization of selected terms in CCD equations. This purpose of this test is mostly on the treatment of term in the present of symmetries.
def test_ccd_doubles_terms(parthole_drudge): dr = parthole_drudge p = dr.names a, b, c, d = p.V_dumms[:4] i, j, k, l = p.O_dumms[:4] u = dr.two_body t = IndexedBase('t') dr.set_dbbar_base(t, 2) r = IndexedBase('r') tensor = dr.define_einst( r[a, b, i, j], + t[a, b,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_ccsd_doubles_a_terms(parthole_drudge):\n\n dr = parthole_drudge\n p = dr.names\n\n a, b, c, d = p.V_dumms[:4]\n i, j, k, l = p.O_dumms[:4]\n u = dr.two_body\n t = IndexedBase('t')\n dr.set_dbbar_base(t, 2)\n\n tau = dr.define_einst(\n IndexedBase('tau')[a, b, i, j],\n ...
[ "0.6349373", "0.62729913", "0.6183175", "0.60259867", "0.5812491", "0.5720139", "0.5645726", "0.5471962", "0.5412857", "0.5404476", "0.5367554", "0.53521675", "0.53061885", "0.52882713", "0.52640617", "0.5261492", "0.52584285", "0.52489775", "0.5243219", "0.521975", "0.521384...
0.6428516
0
Test selected terms in CCSD singles equation. The purpose of this test is the capability of recognition of repeated appearance of the same summation intermediates.
def test_ccsd_singles_terms(parthole_drudge): dr = parthole_drudge p = dr.names a, b, c = p.V_dumms[:3] i, j, k = p.O_dumms[:3] u = dr.two_body f = dr.fock t = IndexedBase('t') dr.set_dbbar_base(t, 2) r = IndexedBase('r') tensor = dr.define_einst( r[a, i], t[a,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def test_ccsd_doubles_a_terms(parthole_drudge):\n\n dr = parthole_drudge\n p = dr.names\n\n a, b, c, d = p.V_dumms[:4]\n i, j, k, l = p.O_dumms[:4]\n u = dr.two_body\n t = IndexedBase('t')\n dr.set_dbbar_base(t, 2)\n\n tau = dr.define_einst(\n IndexedBase('tau')[a, b, i, j],\n ...
[ "0.65068924", "0.64170855", "0.595248", "0.57639027", "0.573888", "0.567119", "0.5569753", "0.5550209", "0.54753643", "0.5463756", "0.54519033", "0.54084355", "0.5348508", "0.5344815", "0.5336702", "0.5331246", "0.53284395", "0.52992237", "0.5276623", "0.5207429", "0.519494",...
0.6998851
0
Test discovery of effective T in CCSD energy equation. The purpose of this test is the capability of using locally nonoptimal contractions in the final summation optimization. The equation is not CCSD energy equation exactly.
def test_ccsd_energy(parthole_drudge): dr = parthole_drudge p = dr.names a, b = p.V_dumms[:2] i, j = p.O_dumms[:2] u = dr.two_body t = IndexedBase('t') energy = dr.define_einst( Symbol('e'), u[i, j, a, b] * t[a, b, i, j] * Rational(1, 2) + u[i, j, a, b] * t[a, i] *...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def TestTDDFT():\n prm = '''\n Model\tTDHF\n Method\tMMUT\n dt\t0.02\n MaxIter\t100\n ExDir\t1.0\n EyDir\t1.0\n EzDir\t1.0\n FieldAmplitude\t0.01\n FieldFreq\t0.9202\n ApplyImpulse\t1\n ApplyCw\t\t0\n StatusEvery\t10\n '''\n geom = \"\"\"\n H 0. 0. 0.\n H 0. 0. 0....
[ "0.6257124", "0.6249097", "0.60959816", "0.6052087", "0.59828633", "0.5940388", "0.593532", "0.5892219", "0.5875949", "0.58737594", "0.5854757", "0.58066213", "0.5791783", "0.576784", "0.5752203", "0.5739509", "0.5736543", "0.5717718", "0.5706562", "0.5701623", "0.56921226", ...
0.6842035
0
Push base_repo code to this repo
def push(self, base_repo, branch="master"): base_repo.push_to(self, branch)
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "def __gitPush(self):\n self.vcs.gitPush(self.project.getProjectPath())", "def push_code(repo, branch='gh-pages'):\n return repo.remotes.origin.push(branch)", "def push_base():\n docker('login')\n docker('push %s' % env.base_image_name)", "def push(self):\n origin = self.git_repo.re...
[ "0.688208", "0.6877545", "0.6777488", "0.6650118", "0.66019493", "0.64620435", "0.6431415", "0.62801695", "0.6097867", "0.60862476", "0.6081137", "0.6078799", "0.6040151", "0.6029627", "0.60244936", "0.60135955", "0.5985509", "0.5958235", "0.5933697", "0.58209807", "0.5809721...
0.79155
0