body_hash
stringlengths
64
64
body
stringlengths
23
109k
docstring
stringlengths
1
57k
path
stringlengths
4
198
name
stringlengths
1
115
repository_name
stringlengths
7
111
repository_stars
float64
0
191k
lang
stringclasses
1 value
body_without_docstring
stringlengths
14
108k
unified
stringlengths
45
133k
01418ee1b9b26d43152879e0b1d901e68d16d625fd50f92f1234b2deedcf0951
def _getResourceRecords(self, structure): "\n Given a DnsResourceRecordArray() structure, return a list of Resource \n Records as (dnstype, dnsclass, ttl, fqdn, adata) tuples. If a parser\n is available for the dnsclass, the 'rdata' field will be further parsed \n into its components (a...
Given a DnsResourceRecordArray() structure, return a list of Resource Records as (dnstype, dnsclass, ttl, fqdn, adata) tuples. If a parser is available for the dnsclass, the 'rdata' field will be further parsed into its components (as a tuple if necessary).
vstruct/defs/dns.py
_getResourceRecords
TomSomerville/vivisect
716
python
def _getResourceRecords(self, structure): "\n Given a DnsResourceRecordArray() structure, return a list of Resource \n Records as (dnstype, dnsclass, ttl, fqdn, adata) tuples. If a parser\n is available for the dnsclass, the 'rdata' field will be further parsed \n into its components (a...
def _getResourceRecords(self, structure): "\n Given a DnsResourceRecordArray() structure, return a list of Resource \n Records as (dnstype, dnsclass, ttl, fqdn, adata) tuples. If a parser\n is available for the dnsclass, the 'rdata' field will be further parsed \n into its components (a...
4da492fd644f90ff3335d634a91939f95f37f40d971161788748987277e7cdef
def getAnswerRecords(self): "\n Return a list of Answer records as (rrtype, dnsclass, ttl, fqdn,\n rdata) tuples. If a parser is available for the dnsclass, the \n 'rdata' field will be further parsed into its components (as a\n tuple if necessary).\n " if (not self._cache_ar...
Return a list of Answer records as (rrtype, dnsclass, ttl, fqdn, rdata) tuples. If a parser is available for the dnsclass, the 'rdata' field will be further parsed into its components (as a tuple if necessary).
vstruct/defs/dns.py
getAnswerRecords
TomSomerville/vivisect
716
python
def getAnswerRecords(self): "\n Return a list of Answer records as (rrtype, dnsclass, ttl, fqdn,\n rdata) tuples. If a parser is available for the dnsclass, the \n 'rdata' field will be further parsed into its components (as a\n tuple if necessary).\n " if (not self._cache_ar...
def getAnswerRecords(self): "\n Return a list of Answer records as (rrtype, dnsclass, ttl, fqdn,\n rdata) tuples. If a parser is available for the dnsclass, the \n 'rdata' field will be further parsed into its components (as a\n tuple if necessary).\n " if (not self._cache_ar...
4b7fd80d25ddb097fc48ae24b024fd3ff6476b8d6896b9e49ef3b75fff230f16
def getAuthorityRecords(self): "\n Return a list of Authority records as (rrtype, dnsclass, ttl, \n fqdn, rdata) tuples. If a parser is available for the dnsclass, \n the 'rdata' field will be further parsed into its components \n (as a tuple if necessary).\n " return self._g...
Return a list of Authority records as (rrtype, dnsclass, ttl, fqdn, rdata) tuples. If a parser is available for the dnsclass, the 'rdata' field will be further parsed into its components (as a tuple if necessary).
vstruct/defs/dns.py
getAuthorityRecords
TomSomerville/vivisect
716
python
def getAuthorityRecords(self): "\n Return a list of Authority records as (rrtype, dnsclass, ttl, \n fqdn, rdata) tuples. If a parser is available for the dnsclass, \n the 'rdata' field will be further parsed into its components \n (as a tuple if necessary).\n " return self._g...
def getAuthorityRecords(self): "\n Return a list of Authority records as (rrtype, dnsclass, ttl, \n fqdn, rdata) tuples. If a parser is available for the dnsclass, \n the 'rdata' field will be further parsed into its components \n (as a tuple if necessary).\n " return self._g...
88d4e9d5abbb1631324758a137df2b224d8d09baac0f1ab562a7f079325c1e10
def getAdditionalRecords(self): "\n Return a list of Additional records as (rrtype, dnsclass, ttl, \n fqdn, rdata) tuples. If a parser is available for the dnsclass, \n the 'rdata' field will be further parsed into its components (as \n a tuple if necessary).\n " return self....
Return a list of Additional records as (rrtype, dnsclass, ttl, fqdn, rdata) tuples. If a parser is available for the dnsclass, the 'rdata' field will be further parsed into its components (as a tuple if necessary).
vstruct/defs/dns.py
getAdditionalRecords
TomSomerville/vivisect
716
python
def getAdditionalRecords(self): "\n Return a list of Additional records as (rrtype, dnsclass, ttl, \n fqdn, rdata) tuples. If a parser is available for the dnsclass, \n the 'rdata' field will be further parsed into its components (as \n a tuple if necessary).\n " return self....
def getAdditionalRecords(self): "\n Return a list of Additional records as (rrtype, dnsclass, ttl, \n fqdn, rdata) tuples. If a parser is available for the dnsclass, \n the 'rdata' field will be further parsed into its components (as \n a tuple if necessary).\n " return self....
7b42e8db28848b6ccb7e7c7a32216dafbb1078535b441fd29630f5f43cfa93f9
def getDnsNames(self): '\n Return a list of the DNS names in the message.\n ' fqdns = set() for (ofs, indent, fname, fobj) in self.vsGetPrintInfo(): if (fobj.vsGetTypeName() == 'DnsName'): fqdns.add(self.getDnsName(*fobj.getTypeVal())) return list(fqdns)
Return a list of the DNS names in the message.
vstruct/defs/dns.py
getDnsNames
TomSomerville/vivisect
716
python
def getDnsNames(self): '\n \n ' fqdns = set() for (ofs, indent, fname, fobj) in self.vsGetPrintInfo(): if (fobj.vsGetTypeName() == 'DnsName'): fqdns.add(self.getDnsName(*fobj.getTypeVal())) return list(fqdns)
def getDnsNames(self): '\n \n ' fqdns = set() for (ofs, indent, fname, fobj) in self.vsGetPrintInfo(): if (fobj.vsGetTypeName() == 'DnsName'): fqdns.add(self.getDnsName(*fobj.getTypeVal())) return list(fqdns)<|docstring|>Return a list of the DNS names in the message.<|e...
53695de49d94fa5106ee0dbb7fd197e4e156aec62ea975391f505929b23174b3
def getIPv4Integers(self): '\n Return a list of the IPv4 addresses in the message.\n ' ips = set() for (ofs, indent, fname, fobj) in self.vsGetPrintInfo(): if (fobj.vsGetTypeName() == 'IPv4Address'): ips.add(fobj._vs_value) return list(ips)
Return a list of the IPv4 addresses in the message.
vstruct/defs/dns.py
getIPv4Integers
TomSomerville/vivisect
716
python
def getIPv4Integers(self): '\n \n ' ips = set() for (ofs, indent, fname, fobj) in self.vsGetPrintInfo(): if (fobj.vsGetTypeName() == 'IPv4Address'): ips.add(fobj._vs_value) return list(ips)
def getIPv4Integers(self): '\n \n ' ips = set() for (ofs, indent, fname, fobj) in self.vsGetPrintInfo(): if (fobj.vsGetTypeName() == 'IPv4Address'): ips.add(fobj._vs_value) return list(ips)<|docstring|>Return a list of the IPv4 addresses in the message.<|endoftext|>
b6f7b6db6b9337315c5ec04edfc5079e5a5bdc2f5fffb3443ab53f4816f05421
def getEmailAddresses(self): '\n Return a list of the email addresses which are encoded as DNS names\n in the message (they are decoded back to email addresses here).\n ' emails = set() for (ofs, indent, fname, fobj) in self.vsGetPrintInfo(): if (fobj.vsGetTypeName() == 'DnsMail...
Return a list of the email addresses which are encoded as DNS names in the message (they are decoded back to email addresses here).
vstruct/defs/dns.py
getEmailAddresses
TomSomerville/vivisect
716
python
def getEmailAddresses(self): '\n Return a list of the email addresses which are encoded as DNS names\n in the message (they are decoded back to email addresses here).\n ' emails = set() for (ofs, indent, fname, fobj) in self.vsGetPrintInfo(): if (fobj.vsGetTypeName() == 'DnsMail...
def getEmailAddresses(self): '\n Return a list of the email addresses which are encoded as DNS names\n in the message (they are decoded back to email addresses here).\n ' emails = set() for (ofs, indent, fname, fobj) in self.vsGetPrintInfo(): if (fobj.vsGetTypeName() == 'DnsMail...
9f54401031e28551fd1f8d6cc78b7746107d04ec0e34b9dcd71a0a31d68886e9
def test_base_dataset(config): 'Test to create `baseDataset`.\n ' cfg = config cfg.dataset.pop('transforms') dataset = BaseDataset(**cfg.dataset)
Test to create `baseDataset`.
test/data/test_dataset.py
test_base_dataset
Min-Sheng/template
6
python
def test_base_dataset(config): '\n ' cfg = config cfg.dataset.pop('transforms') dataset = BaseDataset(**cfg.dataset)
def test_base_dataset(config): '\n ' cfg = config cfg.dataset.pop('transforms') dataset = BaseDataset(**cfg.dataset)<|docstring|>Test to create `baseDataset`.<|endoftext|>
9efb57b93bee2279755b4f3df8dcadbfffc0ad0b19e99e9950acb9af03fd1b5a
def test_my_dataset(config, dummy_input): 'Test to create the derived dataset.\n ' cfg = config (image, label) = dummy_input(image_size=(10, 32, 32, 3), label_size=(10, 32, 32, 1)) dataset = MyDataset(image, label, **cfg.dataset)
Test to create the derived dataset.
test/data/test_dataset.py
test_my_dataset
Min-Sheng/template
6
python
def test_my_dataset(config, dummy_input): '\n ' cfg = config (image, label) = dummy_input(image_size=(10, 32, 32, 3), label_size=(10, 32, 32, 1)) dataset = MyDataset(image, label, **cfg.dataset)
def test_my_dataset(config, dummy_input): '\n ' cfg = config (image, label) = dummy_input(image_size=(10, 32, 32, 3), label_size=(10, 32, 32, 1)) dataset = MyDataset(image, label, **cfg.dataset)<|docstring|>Test to create the derived dataset.<|endoftext|>
f00db4a58b97b5f093637db098fa95b521661a327ccaa9ed38f5d30c509dfe8b
def test_data_loader(config, dummy_input): 'Test to create the dataloader and yield a batch of data.\n ' cfg = config (image, label) = dummy_input(image_size=(10, 32, 32, 3), label_size=(10, 32, 32, 1)) dataset = MyDataset(image, label, **cfg.dataset) dataloader = Dataloader(dataset, **cfg.datalo...
Test to create the dataloader and yield a batch of data.
test/data/test_dataset.py
test_data_loader
Min-Sheng/template
6
python
def test_data_loader(config, dummy_input): '\n ' cfg = config (image, label) = dummy_input(image_size=(10, 32, 32, 3), label_size=(10, 32, 32, 1)) dataset = MyDataset(image, label, **cfg.dataset) dataloader = Dataloader(dataset, **cfg.dataloader) for batch in dataloader: assert (batch...
def test_data_loader(config, dummy_input): '\n ' cfg = config (image, label) = dummy_input(image_size=(10, 32, 32, 3), label_size=(10, 32, 32, 1)) dataset = MyDataset(image, label, **cfg.dataset) dataloader = Dataloader(dataset, **cfg.dataloader) for batch in dataloader: assert (batch...
0f9fdce3bdc8581b43fe2b09885ad25421b7abcabd5d67f6c4dd8f6db398a5d6
def __init__(self, hostname=ssh_config.HOST, port=ssh_config.PORT, username=ssh_config.USER, password=ssh_config.PASSWORD): '\n\n :param hostname: 想连接的主机地址\n :param port: ssh服务所监听的端口号\n :param username: 想连接的主机用户名\n :param password: 想连接的主机密码\n for example:\n ssh = SSHCon...
:param hostname: 想连接的主机地址 :param port: ssh服务所监听的端口号 :param username: 想连接的主机用户名 :param password: 想连接的主机密码 for example: ssh = SSHConnect() stdin, stdout, stderr = ssh.exec_command("ls") print(stdout)
common/connect_ssh.py
__init__
yhj2013/AAT_FrameWork
5
python
def __init__(self, hostname=ssh_config.HOST, port=ssh_config.PORT, username=ssh_config.USER, password=ssh_config.PASSWORD): '\n\n :param hostname: 想连接的主机地址\n :param port: ssh服务所监听的端口号\n :param username: 想连接的主机用户名\n :param password: 想连接的主机密码\n for example:\n ssh = SSHCon...
def __init__(self, hostname=ssh_config.HOST, port=ssh_config.PORT, username=ssh_config.USER, password=ssh_config.PASSWORD): '\n\n :param hostname: 想连接的主机地址\n :param port: ssh服务所监听的端口号\n :param username: 想连接的主机用户名\n :param password: 想连接的主机密码\n for example:\n ssh = SSHCon...
4b2a5c4a821abc16e1499aa9451a299e2e329085c946b895bccd5699408d4087
def exec_command(self, command): '\n\n :param command: 执行的\n :return: stdin: 标准输入, stdout: 标准输出, stderr: 错误输出\n ' if isinstance(command, str): (stdin, stdout, stderr) = self.ssh.exec_command(command) return (stdin, stdout, stderr)
:param command: 执行的 :return: stdin: 标准输入, stdout: 标准输出, stderr: 错误输出
common/connect_ssh.py
exec_command
yhj2013/AAT_FrameWork
5
python
def exec_command(self, command): '\n\n :param command: 执行的\n :return: stdin: 标准输入, stdout: 标准输出, stderr: 错误输出\n ' if isinstance(command, str): (stdin, stdout, stderr) = self.ssh.exec_command(command) return (stdin, stdout, stderr)
def exec_command(self, command): '\n\n :param command: 执行的\n :return: stdin: 标准输入, stdout: 标准输出, stderr: 错误输出\n ' if isinstance(command, str): (stdin, stdout, stderr) = self.ssh.exec_command(command) return (stdin, stdout, stderr)<|docstring|>:param command: 执行的 :return: std...
65022dee06bd8d05553e3b62ba8092d68c48a1cc00acb1072b40a4c2e03c6f31
def polyfitThermalConductivity(self, power=2): "\n Calculates the coefficients of a polynomial fit for thermalConductivity.\n Based on data from http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf\n Fits a polynomial to the data set and returns the coefficients.\n\n Parame...
Calculates the coefficients of a polynomial fit for thermalConductivity. Based on data from http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf Fits a polynomial to the data set and returns the coefficients. Parameters ---------- power : int, optional power of the polynomial fit equation Returns --...
armi/materials/inconelX750.py
polyfitThermalConductivity
DennisYelizarov/armi
162
python
def polyfitThermalConductivity(self, power=2): "\n Calculates the coefficients of a polynomial fit for thermalConductivity.\n Based on data from http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf\n Fits a polynomial to the data set and returns the coefficients.\n\n Parame...
def polyfitThermalConductivity(self, power=2): "\n Calculates the coefficients of a polynomial fit for thermalConductivity.\n Based on data from http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf\n Fits a polynomial to the data set and returns the coefficients.\n\n Parame...
578a64f03e0778ea0556b6ec72408f8b93ba35733db6ebb3b0361e6dfca09a80
def thermalConductivity(self, Tk=None, Tc=None): '\n Returns the thermal conductivity of InconelX750.\n\n Parameters\n ----------\n Tk : float, optional\n Temperature in Kelvin.\n Tc : float, optional\n Temperature in degrees Celsius.\n\n Returns\n ...
Returns the thermal conductivity of InconelX750. Parameters ---------- Tk : float, optional Temperature in Kelvin. Tc : float, optional Temperature in degrees Celsius. Returns ------- thermalCond : float thermal conductivity in W/m/C
armi/materials/inconelX750.py
thermalConductivity
DennisYelizarov/armi
162
python
def thermalConductivity(self, Tk=None, Tc=None): '\n Returns the thermal conductivity of InconelX750.\n\n Parameters\n ----------\n Tk : float, optional\n Temperature in Kelvin.\n Tc : float, optional\n Temperature in degrees Celsius.\n\n Returns\n ...
def thermalConductivity(self, Tk=None, Tc=None): '\n Returns the thermal conductivity of InconelX750.\n\n Parameters\n ----------\n Tk : float, optional\n Temperature in Kelvin.\n Tc : float, optional\n Temperature in degrees Celsius.\n\n Returns\n ...
9ade7042d18ce8d169baa027b0f5650f50c8401c11578067aaff18653802c52f
def polyfitHeatCapacity(self, power=3): "\n Calculates the coefficients of a polynomial fit for heatCapacity.\n Based on data from http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf\n Fits a polynomial to the data set and returns the coefficients.\n\n Parameters\n ...
Calculates the coefficients of a polynomial fit for heatCapacity. Based on data from http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf Fits a polynomial to the data set and returns the coefficients. Parameters ---------- power : int, optional power of the polynomial fit equation Returns ------- l...
armi/materials/inconelX750.py
polyfitHeatCapacity
DennisYelizarov/armi
162
python
def polyfitHeatCapacity(self, power=3): "\n Calculates the coefficients of a polynomial fit for heatCapacity.\n Based on data from http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf\n Fits a polynomial to the data set and returns the coefficients.\n\n Parameters\n ...
def polyfitHeatCapacity(self, power=3): "\n Calculates the coefficients of a polynomial fit for heatCapacity.\n Based on data from http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf\n Fits a polynomial to the data set and returns the coefficients.\n\n Parameters\n ...
1fb56b878b5f28d364b71c065c34093cf02c48b35041fd1c09320fa9e4fe342b
def heatCapacity(self, Tk=None, Tc=None): '\n Returns the specific heat capacity of InconelX750.\n\n Parameters\n ----------\n Tk : float, optional\n Temperature in Kelvin.\n Tc : float, optional\n Temperature in degrees Celsius.\n\n Returns\n -...
Returns the specific heat capacity of InconelX750. Parameters ---------- Tk : float, optional Temperature in Kelvin. Tc : float, optional Temperature in degrees Celsius. Returns ------- heatCapacity : float heat capacity in J/kg/C
armi/materials/inconelX750.py
heatCapacity
DennisYelizarov/armi
162
python
def heatCapacity(self, Tk=None, Tc=None): '\n Returns the specific heat capacity of InconelX750.\n\n Parameters\n ----------\n Tk : float, optional\n Temperature in Kelvin.\n Tc : float, optional\n Temperature in degrees Celsius.\n\n Returns\n -...
def heatCapacity(self, Tk=None, Tc=None): '\n Returns the specific heat capacity of InconelX750.\n\n Parameters\n ----------\n Tk : float, optional\n Temperature in Kelvin.\n Tc : float, optional\n Temperature in degrees Celsius.\n\n Returns\n -...
d00b3be826233374ba59caf62c8ce3b95029e841539528d01a208fe97d0b8176
def polyfitLinearExpansionPercent(self, power=2): "\n Calculates the coefficients of a polynomial fit for linearExpansionPercent.\n Based on data from http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf\n\n Uses mean CTE values to find percent thermal strain values. Fits a polyno...
Calculates the coefficients of a polynomial fit for linearExpansionPercent. Based on data from http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf Uses mean CTE values to find percent thermal strain values. Fits a polynomial to the data set and returns the coefficients. Parameters ---------- power : in...
armi/materials/inconelX750.py
polyfitLinearExpansionPercent
DennisYelizarov/armi
162
python
def polyfitLinearExpansionPercent(self, power=2): "\n Calculates the coefficients of a polynomial fit for linearExpansionPercent.\n Based on data from http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf\n\n Uses mean CTE values to find percent thermal strain values. Fits a polyno...
def polyfitLinearExpansionPercent(self, power=2): "\n Calculates the coefficients of a polynomial fit for linearExpansionPercent.\n Based on data from http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf\n\n Uses mean CTE values to find percent thermal strain values. Fits a polyno...
5c7c2bd84fa3e0fa78d6e076c1daa9c7949d1fc922626ee2d1ba0d8d67a28779
def linearExpansionPercent(self, Tk=None, Tc=None): '\n Returns percent linear expansion of InconelX750.\n\n Parameters\n ----------\n Tk : float\n temperature in (K)\n Tc : float\n Temperature in (C)\n\n Returns\n -------\n linExpPercent...
Returns percent linear expansion of InconelX750. Parameters ---------- Tk : float temperature in (K) Tc : float Temperature in (C) Returns ------- linExpPercent in %-m/m/C
armi/materials/inconelX750.py
linearExpansionPercent
DennisYelizarov/armi
162
python
def linearExpansionPercent(self, Tk=None, Tc=None): '\n Returns percent linear expansion of InconelX750.\n\n Parameters\n ----------\n Tk : float\n temperature in (K)\n Tc : float\n Temperature in (C)\n\n Returns\n -------\n linExpPercent...
def linearExpansionPercent(self, Tk=None, Tc=None): '\n Returns percent linear expansion of InconelX750.\n\n Parameters\n ----------\n Tk : float\n temperature in (K)\n Tc : float\n Temperature in (C)\n\n Returns\n -------\n linExpPercent...
c250de0c30b590c9e1fed4fb6e84dcc21c88e505c8939f94195b6c3939afd01e
def linearExpansion(self, Tk=None, Tc=None): '\n From http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf\n\n Using the correlation for linearExpansionPercent, the 2nd order polynomial is divided by 100 to convert\n from percent strain to strain, then differentiated with respect ...
From http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf Using the correlation for linearExpansionPercent, the 2nd order polynomial is divided by 100 to convert from percent strain to strain, then differentiated with respect to temperature to find the correlation for instantaneous linear expansion. i.e...
armi/materials/inconelX750.py
linearExpansion
DennisYelizarov/armi
162
python
def linearExpansion(self, Tk=None, Tc=None): '\n From http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf\n\n Using the correlation for linearExpansionPercent, the 2nd order polynomial is divided by 100 to convert\n from percent strain to strain, then differentiated with respect ...
def linearExpansion(self, Tk=None, Tc=None): '\n From http://www.specialmetals.com/documents/Inconel%20alloy%20X-750.pdf\n\n Using the correlation for linearExpansionPercent, the 2nd order polynomial is divided by 100 to convert\n from percent strain to strain, then differentiated with respect ...
a27f9ca7feca8b6bd4d0d045a05c2dd7a372b4bc1aff55efa5758e7f31905779
def make_celery(): '\n Create celery tasks.\n :return: celery object\n ' celery = Celery(app.import_name, broker=Config.REDISTOGO_URL, include=CELERY_TASK_LIST) celery.conf.update(app.config) TaskBase = celery.Task class ContextTask(TaskBase): abstract = True def __call__(...
Create celery tasks. :return: celery object
app/__init__.py
make_celery
aabramos/backend-coding-challenge
0
python
def make_celery(): '\n Create celery tasks.\n :return: celery object\n ' celery = Celery(app.import_name, broker=Config.REDISTOGO_URL, include=CELERY_TASK_LIST) celery.conf.update(app.config) TaskBase = celery.Task class ContextTask(TaskBase): abstract = True def __call__(...
def make_celery(): '\n Create celery tasks.\n :return: celery object\n ' celery = Celery(app.import_name, broker=Config.REDISTOGO_URL, include=CELERY_TASK_LIST) celery.conf.update(app.config) TaskBase = celery.Task class ContextTask(TaskBase): abstract = True def __call__(...
58dac787a828a1082431ef4cd347b554f2f89726859bd6d10d03bf982484aef0
def background_thread(): '\n The websocket is maintained in the background, and this\n function outputs a table for the client every two seconds\n :return: None.\n ' with app.test_request_context(): while True: socketio.sleep(2) translations = Translation.query.with_e...
The websocket is maintained in the background, and this function outputs a table for the client every two seconds :return: None.
app/__init__.py
background_thread
aabramos/backend-coding-challenge
0
python
def background_thread(): '\n The websocket is maintained in the background, and this\n function outputs a table for the client every two seconds\n :return: None.\n ' with app.test_request_context(): while True: socketio.sleep(2) translations = Translation.query.with_e...
def background_thread(): '\n The websocket is maintained in the background, and this\n function outputs a table for the client every two seconds\n :return: None.\n ' with app.test_request_context(): while True: socketio.sleep(2) translations = Translation.query.with_e...
1d3cec5e37fd449f7fcee9a24d063208223db954aeb16f1faf28ea8026f6c2c7
def _calcular_tfs(self): 'Método que cálcula o TF de uma palavra\n Calculo do TF de uma palavra: qtd da palavra no texto/total de palavras no texto.\n ' for palavra in self.palavras: tf = (float(self.texto.count(palavra)) / float(self.total_palavras)) self.tf_palavras[palavra] =...
Método que cálcula o TF de uma palavra Calculo do TF de uma palavra: qtd da palavra no texto/total de palavras no texto.
summarizer.py
_calcular_tfs
DouglasHSS/AdvancedTopicsInAI
0
python
def _calcular_tfs(self): 'Método que cálcula o TF de uma palavra\n Calculo do TF de uma palavra: qtd da palavra no texto/total de palavras no texto.\n ' for palavra in self.palavras: tf = (float(self.texto.count(palavra)) / float(self.total_palavras)) self.tf_palavras[palavra] =...
def _calcular_tfs(self): 'Método que cálcula o TF de uma palavra\n Calculo do TF de uma palavra: qtd da palavra no texto/total de palavras no texto.\n ' for palavra in self.palavras: tf = (float(self.texto.count(palavra)) / float(self.total_palavras)) self.tf_palavras[palavra] =...
7021d8ca36ffc3db5c3d2071c0559856daaa16b1e3410c676a8e0ca55bd42f99
def _calcular_idfs(self): 'Método que cálcula o IDF de uma palavra\n ' for palavra in self.palavras: ocorrencias = sum([1 for sentenca in self.sentencas if (palavra in sentenca)]) if (ocorrencias > 0): idf = log((float((self.total_sentencas + 1)) / float(ocorrencias))) ...
Método que cálcula o IDF de uma palavra
summarizer.py
_calcular_idfs
DouglasHSS/AdvancedTopicsInAI
0
python
def _calcular_idfs(self): '\n ' for palavra in self.palavras: ocorrencias = sum([1 for sentenca in self.sentencas if (palavra in sentenca)]) if (ocorrencias > 0): idf = log((float((self.total_sentencas + 1)) / float(ocorrencias))) self.idf_palavras[palavra] = idf
def _calcular_idfs(self): '\n ' for palavra in self.palavras: ocorrencias = sum([1 for sentenca in self.sentencas if (palavra in sentenca)]) if (ocorrencias > 0): idf = log((float((self.total_sentencas + 1)) / float(ocorrencias))) self.idf_palavras[palavra] = idf<|...
2cdf41d7908f2f5423cce0e25321b065c4db761184cc79750eed9efe556102ea
def check_target_configuration(): '\n Checking target database configuration\n :return:\n ' parser.get_database_configuration(mode.Client.TARGET)
Checking target database configuration :return:
db_sync_tool/utility/system.py
check_target_configuration
jackd248/t3-db-sync
3
python
def check_target_configuration(): '\n Checking target database configuration\n :return:\n ' parser.get_database_configuration(mode.Client.TARGET)
def check_target_configuration(): '\n Checking target database configuration\n :return:\n ' parser.get_database_configuration(mode.Client.TARGET)<|docstring|>Checking target database configuration :return:<|endoftext|>
f1f654736673696de66d8d4b08d0b0c6368d667c4c73c80ee7587a154fec1c11
def get_configuration(host_config, args={}): '\n Checking configuration information by file or dictionary\n :param host_config: Dictionary\n :param args: Dictionary\n :return:\n ' global config config[mode.Client.TARGET] = {} config[mode.Client.ORIGIN] = {} if host_config: if ...
Checking configuration information by file or dictionary :param host_config: Dictionary :param args: Dictionary :return:
db_sync_tool/utility/system.py
get_configuration
jackd248/t3-db-sync
3
python
def get_configuration(host_config, args={}): '\n Checking configuration information by file or dictionary\n :param host_config: Dictionary\n :param args: Dictionary\n :return:\n ' global config config[mode.Client.TARGET] = {} config[mode.Client.ORIGIN] = {} if host_config: if ...
def get_configuration(host_config, args={}): '\n Checking configuration information by file or dictionary\n :param host_config: Dictionary\n :param args: Dictionary\n :return:\n ' global config config[mode.Client.TARGET] = {} config[mode.Client.ORIGIN] = {} if host_config: if ...
15b7c348663f3827d7012fccec0b0183496877cf18b3beb526bd25eb0c382547
def build_config(args): '\n ADding the provided arguments\n :param args:\n :return:\n ' if ((args is None) or (not args)): return {} if (not (args.type is None)): config['type'] = args.type if (not (args.tables is None)): config['tables'] = args.tables if (not (ar...
ADding the provided arguments :param args: :return:
db_sync_tool/utility/system.py
build_config
jackd248/t3-db-sync
3
python
def build_config(args): '\n ADding the provided arguments\n :param args:\n :return:\n ' if ((args is None) or (not args)): return {} if (not (args.type is None)): config['type'] = args.type if (not (args.tables is None)): config['tables'] = args.tables if (not (ar...
def build_config(args): '\n ADding the provided arguments\n :param args:\n :return:\n ' if ((args is None) or (not args)): return {} if (not (args.type is None)): config['type'] = args.type if (not (args.tables is None)): config['tables'] = args.tables if (not (ar...
17551d33b4804015ffb9e7a7abb8c5ceb64f01a7035bfee98862927fa383aa94
def check_options(): '\n Checking configuration provided file\n :return:\n ' global config if ('dump_dir' in config[mode.Client.ORIGIN]): config['default_origin_dump_dir'] = False if ('dump_dir' in config[mode.Client.TARGET]): config['default_target_dump_dir'] = False if ('c...
Checking configuration provided file :return:
db_sync_tool/utility/system.py
check_options
jackd248/t3-db-sync
3
python
def check_options(): '\n Checking configuration provided file\n :return:\n ' global config if ('dump_dir' in config[mode.Client.ORIGIN]): config['default_origin_dump_dir'] = False if ('dump_dir' in config[mode.Client.TARGET]): config['default_target_dump_dir'] = False if ('c...
def check_options(): '\n Checking configuration provided file\n :return:\n ' global config if ('dump_dir' in config[mode.Client.ORIGIN]): config['default_origin_dump_dir'] = False if ('dump_dir' in config[mode.Client.TARGET]): config['default_target_dump_dir'] = False if ('c...
04db59b01ad55f563016825818451e651885b4a861543987974b55cddd9454de
def check_authorizations(): '\n Checking authorization for clients\n :return:\n ' check_authorization(mode.Client.ORIGIN) check_authorization(mode.Client.TARGET)
Checking authorization for clients :return:
db_sync_tool/utility/system.py
check_authorizations
jackd248/t3-db-sync
3
python
def check_authorizations(): '\n Checking authorization for clients\n :return:\n ' check_authorization(mode.Client.ORIGIN) check_authorization(mode.Client.TARGET)
def check_authorizations(): '\n Checking authorization for clients\n :return:\n ' check_authorization(mode.Client.ORIGIN) check_authorization(mode.Client.TARGET)<|docstring|>Checking authorization for clients :return:<|endoftext|>
a6da0fa3eb359e4b85042152fa6d38dad140a2a6bd9b2e7e4153ea71036809e7
def check_authorization(client): '\n Checking arguments and fill options array\n :param client: String\n :return:\n ' if mode.is_remote(client): if (((mode.get_sync_mode() == mode.SyncMode.DUMP_REMOTE) and (client == mode.Client.TARGET)) or ((mode.get_sync_mode() == mode.SyncMode.DUMP_LOCAL)...
Checking arguments and fill options array :param client: String :return:
db_sync_tool/utility/system.py
check_authorization
jackd248/t3-db-sync
3
python
def check_authorization(client): '\n Checking arguments and fill options array\n :param client: String\n :return:\n ' if mode.is_remote(client): if (((mode.get_sync_mode() == mode.SyncMode.DUMP_REMOTE) and (client == mode.Client.TARGET)) or ((mode.get_sync_mode() == mode.SyncMode.DUMP_LOCAL)...
def check_authorization(client): '\n Checking arguments and fill options array\n :param client: String\n :return:\n ' if mode.is_remote(client): if (((mode.get_sync_mode() == mode.SyncMode.DUMP_REMOTE) and (client == mode.Client.TARGET)) or ((mode.get_sync_mode() == mode.SyncMode.DUMP_LOCAL)...
72ed032195850f33a8cd1fd268ff25d548dad6d497209caa038247a2ff8d3e2a
def get_password_by_user(client): '\n Getting password by user input\n :param client: String\n :return: String password\n ' _password = getpass.getpass(output.message(output.Subject.INFO, (('SSH password ' + helper.get_ssh_host_name(client, True)) + ': '), False)) while (_password.strip() == '')...
Getting password by user input :param client: String :return: String password
db_sync_tool/utility/system.py
get_password_by_user
jackd248/t3-db-sync
3
python
def get_password_by_user(client): '\n Getting password by user input\n :param client: String\n :return: String password\n ' _password = getpass.getpass(output.message(output.Subject.INFO, (('SSH password ' + helper.get_ssh_host_name(client, True)) + ': '), False)) while (_password.strip() == ): ...
def get_password_by_user(client): '\n Getting password by user input\n :param client: String\n :return: String password\n ' _password = getpass.getpass(output.message(output.Subject.INFO, (('SSH password ' + helper.get_ssh_host_name(client, True)) + ': '), False)) while (_password.strip() == ): ...
89484bc382fc29660d5a77ab386cb908a0bd98ac02857dd0756459cbe0d1dcef
def check_args_options(config_file=None, verbose=False, yes=False, mute=False, dry_run=False, import_file=None, dump_name=None, keep_dump=None, host_file=None, clear=False, force_password=False, use_rsync=False, use_rsync_options=None, reverse=False): '\n Checking arguments and fill options array\n :param con...
Checking arguments and fill options array :param config_file: :param verbose: :param yes: :param mute: :param dry_run: :param import_file: :param dump_name: :param keep_dump: :param host_file: :param clear: :param force_password: :param use_rsync: :param use_rsync_options: :param reverse: :return:
db_sync_tool/utility/system.py
check_args_options
jackd248/t3-db-sync
3
python
def check_args_options(config_file=None, verbose=False, yes=False, mute=False, dry_run=False, import_file=None, dump_name=None, keep_dump=None, host_file=None, clear=False, force_password=False, use_rsync=False, use_rsync_options=None, reverse=False): '\n Checking arguments and fill options array\n :param con...
def check_args_options(config_file=None, verbose=False, yes=False, mute=False, dry_run=False, import_file=None, dump_name=None, keep_dump=None, host_file=None, clear=False, force_password=False, use_rsync=False, use_rsync_options=None, reverse=False): '\n Checking arguments and fill options array\n :param con...
63324792007507240c12b884df380a3129b1eb51fcbdb6d702ff3f335fe5d80d
def reverse_hosts(): '\n Checking authorization for clients\n :return:\n ' if config['reverse']: _origin = config[mode.Client.ORIGIN] _target = config[mode.Client.TARGET] config[mode.Client.ORIGIN] = _target config[mode.Client.TARGET] = _origin output.message(out...
Checking authorization for clients :return:
db_sync_tool/utility/system.py
reverse_hosts
jackd248/t3-db-sync
3
python
def reverse_hosts(): '\n Checking authorization for clients\n :return:\n ' if config['reverse']: _origin = config[mode.Client.ORIGIN] _target = config[mode.Client.TARGET] config[mode.Client.ORIGIN] = _target config[mode.Client.TARGET] = _origin output.message(out...
def reverse_hosts(): '\n Checking authorization for clients\n :return:\n ' if config['reverse']: _origin = config[mode.Client.ORIGIN] _target = config[mode.Client.TARGET] config[mode.Client.ORIGIN] = _target config[mode.Client.TARGET] = _origin output.message(out...
c292770623712b0c286237978bb7c8d3dc0ec0d9a42b07d579ae876f4beca627
def link_configuration_with_hosts(): '\n Merging the hosts definition with the given configuration file\n @ToDo Simplify function\n :return:\n ' if ((('link' in config[mode.Client.ORIGIN]) or ('link' in config[mode.Client.TARGET])) and (config['link_hosts'] == '')): _host = (str(config[mode....
Merging the hosts definition with the given configuration file @ToDo Simplify function :return:
db_sync_tool/utility/system.py
link_configuration_with_hosts
jackd248/t3-db-sync
3
python
def link_configuration_with_hosts(): '\n Merging the hosts definition with the given configuration file\n @ToDo Simplify function\n :return:\n ' if ((('link' in config[mode.Client.ORIGIN]) or ('link' in config[mode.Client.TARGET])) and (config['link_hosts'] == )): _host = (str(config[mode.Cl...
def link_configuration_with_hosts(): '\n Merging the hosts definition with the given configuration file\n @ToDo Simplify function\n :return:\n ' if ((('link' in config[mode.Client.ORIGIN]) or ('link' in config[mode.Client.TARGET])) and (config['link_hosts'] == )): _host = (str(config[mode.Cl...
498ea4e099a25a3da302868fc7aa5eeb225fa30c48f2878e3d1f9a814e9848cc
def _validate_query(query: dict) -> dict: 'Validate a query dictionary.' if (not isinstance(query, dict)): raise TypeError('Query must me a dictionary.') return query
Validate a query dictionary.
scivision/catalog/catalog.py
_validate_query
Alex-Gregory-1/scivision
0
python
def _validate_query(query: dict) -> dict: if (not isinstance(query, dict)): raise TypeError('Query must me a dictionary.') return query
def _validate_query(query: dict) -> dict: if (not isinstance(query, dict)): raise TypeError('Query must me a dictionary.') return query<|docstring|>Validate a query dictionary.<|endoftext|>
2486ca91a8fc68deef54a7fb8cd0a5e614f2617bf4bd5584a209325223baac7d
@koala def query(query: Dict[(str, str)]) -> list: 'Search the catalog using the query.\n\n Parameters\n ----------\n query : dict\n A dictionary describing the search query as key value pairs.\n\n Returns\n -------\n result : list\n A list of catalog entries matching the search requ...
Search the catalog using the query. Parameters ---------- query : dict A dictionary describing the search query as key value pairs. Returns ------- result : list A list of catalog entries matching the search requirements.
scivision/catalog/catalog.py
query
Alex-Gregory-1/scivision
0
python
@koala def query(query: Dict[(str, str)]) -> list: 'Search the catalog using the query.\n\n Parameters\n ----------\n query : dict\n A dictionary describing the search query as key value pairs.\n\n Returns\n -------\n result : list\n A list of catalog entries matching the search requ...
@koala def query(query: Dict[(str, str)]) -> list: 'Search the catalog using the query.\n\n Parameters\n ----------\n query : dict\n A dictionary describing the search query as key value pairs.\n\n Returns\n -------\n result : list\n A list of catalog entries matching the search requ...
f8db951ed835964f89b6bc01f7155662608012dbf53497afb4ac9a89e8065edb
def _query(self, query: Dict[(str, str)]) -> list: 'Query the Pandas dataframe.' queries = [f"{k} == '{v}'" for (k, v) in query.items()] query_str = ' & '.join(queries) result = self._database.query(query_str) return result.to_dict('records')
Query the Pandas dataframe.
scivision/catalog/catalog.py
_query
Alex-Gregory-1/scivision
0
python
def _query(self, query: Dict[(str, str)]) -> list: queries = [f"{k} == '{v}'" for (k, v) in query.items()] query_str = ' & '.join(queries) result = self._database.query(query_str) return result.to_dict('records')
def _query(self, query: Dict[(str, str)]) -> list: queries = [f"{k} == '{v}'" for (k, v) in query.items()] query_str = ' & '.join(queries) result = self._database.query(query_str) return result.to_dict('records')<|docstring|>Query the Pandas dataframe.<|endoftext|>
d2ea73f085733ebe0d10da29121ebee91d88fe4caae38f980c1e966f119d8195
@property def keys(self) -> List[str]: 'Return the query keys.' return self._database.columns.tolist()
Return the query keys.
scivision/catalog/catalog.py
keys
Alex-Gregory-1/scivision
0
python
@property def keys(self) -> List[str]: return self._database.columns.tolist()
@property def keys(self) -> List[str]: return self._database.columns.tolist()<|docstring|>Return the query keys.<|endoftext|>
62c626f2c09df01a990cc6b609e78b6e8cdd6bbcbaaed08b99d8d588e880b84d
def values(self, key: str) -> List[str]: 'Return the unique values for a query key.' if (key not in self.keys): raise ValueError(f'Key {key} not found.') values = self._database[key].tolist() return list(set(values))
Return the unique values for a query key.
scivision/catalog/catalog.py
values
Alex-Gregory-1/scivision
0
python
def values(self, key: str) -> List[str]: if (key not in self.keys): raise ValueError(f'Key {key} not found.') values = self._database[key].tolist() return list(set(values))
def values(self, key: str) -> List[str]: if (key not in self.keys): raise ValueError(f'Key {key} not found.') values = self._database[key].tolist() return list(set(values))<|docstring|>Return the unique values for a query key.<|endoftext|>
a70ad9203502a9742b7556feb0ca75d35a73a608722c33d7ab97666a09494ba7
def _write_to_device(self, command, value): 'Write command and data value to the device.' with self._device: self._device.write(bytes([(command & 255), (value & 255)]))
Write command and data value to the device.
code/cedargrove_ad5245.py
_write_to_device
CedarGroveStudios/AD9833_ADSR_FeatherWing
1
python
def _write_to_device(self, command, value): with self._device: self._device.write(bytes([(command & 255), (value & 255)]))
def _write_to_device(self, command, value): with self._device: self._device.write(bytes([(command & 255), (value & 255)]))<|docstring|>Write command and data value to the device.<|endoftext|>
8e7773a39329a866324bf7d2717f059612754cadab4636821a81a5e3dc85a486
def _read_from_device(self): 'Reads the contents of the data register.' with self._device: self._device.readinto(self._BUFFER) return self._BUFFER
Reads the contents of the data register.
code/cedargrove_ad5245.py
_read_from_device
CedarGroveStudios/AD9833_ADSR_FeatherWing
1
python
def _read_from_device(self): with self._device: self._device.readinto(self._BUFFER) return self._BUFFER
def _read_from_device(self): with self._device: self._device.readinto(self._BUFFER) return self._BUFFER<|docstring|>Reads the contents of the data register.<|endoftext|>
952f2e29c0afd54facb83263bab0d235a2ab0173a86af3328808c2959962559e
@property def wiper(self): "The raw value of the potentionmeter's wiper.\n :param wiper_value: The raw wiper value from 0 to 255.\n " return self._wiper
The raw value of the potentionmeter's wiper. :param wiper_value: The raw wiper value from 0 to 255.
code/cedargrove_ad5245.py
wiper
CedarGroveStudios/AD9833_ADSR_FeatherWing
1
python
@property def wiper(self): "The raw value of the potentionmeter's wiper.\n :param wiper_value: The raw wiper value from 0 to 255.\n " return self._wiper
@property def wiper(self): "The raw value of the potentionmeter's wiper.\n :param wiper_value: The raw wiper value from 0 to 255.\n " return self._wiper<|docstring|>The raw value of the potentionmeter's wiper. :param wiper_value: The raw wiper value from 0 to 255.<|endoftext|>
4fad6cb9d1551a95e5c255599d11d6601c992a77be661e45f444b69075a72041
@property def normalized_wiper(self): "The normalized value of the potentionmeter's wiper.\n :param normalized_wiper_value: The normalized wiper value from 0.0 to 1.0.\n " return self._normalized_wiper
The normalized value of the potentionmeter's wiper. :param normalized_wiper_value: The normalized wiper value from 0.0 to 1.0.
code/cedargrove_ad5245.py
normalized_wiper
CedarGroveStudios/AD9833_ADSR_FeatherWing
1
python
@property def normalized_wiper(self): "The normalized value of the potentionmeter's wiper.\n :param normalized_wiper_value: The normalized wiper value from 0.0 to 1.0.\n " return self._normalized_wiper
@property def normalized_wiper(self): "The normalized value of the potentionmeter's wiper.\n :param normalized_wiper_value: The normalized wiper value from 0.0 to 1.0.\n " return self._normalized_wiper<|docstring|>The normalized value of the potentionmeter's wiper. :param normalized_wiper_valu...
67f01f0aedd2dd7dc5bdfae891d360125ea4a296d3af64d31d966d8eaaec6172
@property def default_wiper(self): "The default value of the potentionmeter's wiper.\n :param wiper_value: The raw wiper value from 0 to 255.\n " return self._default_wiper
The default value of the potentionmeter's wiper. :param wiper_value: The raw wiper value from 0 to 255.
code/cedargrove_ad5245.py
default_wiper
CedarGroveStudios/AD9833_ADSR_FeatherWing
1
python
@property def default_wiper(self): "The default value of the potentionmeter's wiper.\n :param wiper_value: The raw wiper value from 0 to 255.\n " return self._default_wiper
@property def default_wiper(self): "The default value of the potentionmeter's wiper.\n :param wiper_value: The raw wiper value from 0 to 255.\n " return self._default_wiper<|docstring|>The default value of the potentionmeter's wiper. :param wiper_value: The raw wiper value from 0 to 255.<|endo...
b228552e8719e4604c03b0c08b62c911f2889c24bf58c7cb2219dc2f9e1d4b9e
def set_default(self, default): "A dummy helper to maintain UI compatibility digital\n potentiometers with EEROM capability (dS3502). The AD5245's\n wiper value will be set to 0 unless the default value is\n set explicitly during or after class instantiation." self._default_wipe...
A dummy helper to maintain UI compatibility digital potentiometers with EEROM capability (dS3502). The AD5245's wiper value will be set to 0 unless the default value is set explicitly during or after class instantiation.
code/cedargrove_ad5245.py
set_default
CedarGroveStudios/AD9833_ADSR_FeatherWing
1
python
def set_default(self, default): "A dummy helper to maintain UI compatibility digital\n potentiometers with EEROM capability (dS3502). The AD5245's\n wiper value will be set to 0 unless the default value is\n set explicitly during or after class instantiation." self._default_wipe...
def set_default(self, default): "A dummy helper to maintain UI compatibility digital\n potentiometers with EEROM capability (dS3502). The AD5245's\n wiper value will be set to 0 unless the default value is\n set explicitly during or after class instantiation." self._default_wipe...
c9547b2bbb840d8577e924101d092a9caafeae6e3c45e8f0616db62602a40e45
def shutdown(self): 'Connects the W to the B terminal and open circuits the A terminal.\n The contents of the wiper register are not changed.' self._write_to_device(32, 0)
Connects the W to the B terminal and open circuits the A terminal. The contents of the wiper register are not changed.
code/cedargrove_ad5245.py
shutdown
CedarGroveStudios/AD9833_ADSR_FeatherWing
1
python
def shutdown(self): 'Connects the W to the B terminal and open circuits the A terminal.\n The contents of the wiper register are not changed.' self._write_to_device(32, 0)
def shutdown(self): 'Connects the W to the B terminal and open circuits the A terminal.\n The contents of the wiper register are not changed.' self._write_to_device(32, 0)<|docstring|>Connects the W to the B terminal and open circuits the A terminal. The contents of the wiper register are not changed...
31434209e593ea995c3437d175ff4d3727d84f276963867ccb596b0dc3d7bf5f
def on_tick() -> None: '\n OnTick callback.\n ' global demo_window demo_window.handle_messages()
OnTick callback.
examples/ui_demo.py
on_tick
X-EcutiOnner/Bourgeon
20
python
def on_tick() -> None: '\n \n ' global demo_window demo_window.handle_messages()
def on_tick() -> None: '\n \n ' global demo_window demo_window.handle_messages()<|docstring|>OnTick callback.<|endoftext|>
053629f0e38b4243bd208af9118d54bc08dca65677c7b9e0cf790802013183ad
def chunks(l, n=25): 'Yield successive n-sized chunks from l.' for i in range(0, len(l), n): (yield l[i:(i + n)])
Yield successive n-sized chunks from l.
ryan/util.py
chunks
ryanlee/project
0
python
def chunks(l, n=25): for i in range(0, len(l), n): (yield l[i:(i + n)])
def chunks(l, n=25): for i in range(0, len(l), n): (yield l[i:(i + n)])<|docstring|>Yield successive n-sized chunks from l.<|endoftext|>
a2c56b7ddb06f9d3445f2059c907d86398a8bf1b50edc5f3d6cb2c812de2714b
def deflatten(self, flat_sch) -> Schedule: ' <ndarray(c*5,)> -> Sch ' return flat_sch.reshape(len(self.schedule_param.sections), 5)
<ndarray(c*5,)> -> Sch
core/models/ScheduleOperator.py
deflatten
AluBhorta/UCSPy-Engine
6
python
def deflatten(self, flat_sch) -> Schedule: ' ' return flat_sch.reshape(len(self.schedule_param.sections), 5)
def deflatten(self, flat_sch) -> Schedule: ' ' return flat_sch.reshape(len(self.schedule_param.sections), 5)<|docstring|><ndarray(c*5,)> -> Sch<|endoftext|>
72db7c3ba4fbb7416da2b8b11cef0c1c15a0da076512020175643b4feace6579
def numrepr_to_sch(self, numrepr) -> Schedule: ' <ndarray(n,5)> -> <Sch> ' return Schedule(classes=[Class(Section(self.schedule_param.get_course(i[0]), i[1]), self.schedule_param.get_instructor(i[2]), self.schedule_param.get_room(i[3]), self.schedule_param.get_timeslot(i[4])) for i in numrepr])
<ndarray(n,5)> -> <Sch>
core/models/ScheduleOperator.py
numrepr_to_sch
AluBhorta/UCSPy-Engine
6
python
def numrepr_to_sch(self, numrepr) -> Schedule: ' ' return Schedule(classes=[Class(Section(self.schedule_param.get_course(i[0]), i[1]), self.schedule_param.get_instructor(i[2]), self.schedule_param.get_room(i[3]), self.schedule_param.get_timeslot(i[4])) for i in numrepr])
def numrepr_to_sch(self, numrepr) -> Schedule: ' ' return Schedule(classes=[Class(Section(self.schedule_param.get_course(i[0]), i[1]), self.schedule_param.get_instructor(i[2]), self.schedule_param.get_room(i[3]), self.schedule_param.get_timeslot(i[4])) for i in numrepr])<|docstring|><ndarray(n,5)> -> <Sch><|en...
785309c5a65a3ae2cc60bcf4c84339f441e3941a0b659f7ee66db3724df58d3e
@abstractmethod def _build_db(self): 'Build the necessary DB elements'
Build the necessary DB elements
covid19/pgconnectors/pgconnector.py
_build_db
clambin/covid19mon
0
python
@abstractmethod def _build_db(self):
@abstractmethod def _build_db(self): <|docstring|>Build the necessary DB elements<|endoftext|>
c151a375626a138d708d52d5278297ac05bdaec743f5c8d85159f309c3567a21
@abstractmethod def _drop_db(self): 'Remove the necessary DB elements'
Remove the necessary DB elements
covid19/pgconnectors/pgconnector.py
_drop_db
clambin/covid19mon
0
python
@abstractmethod def _drop_db(self):
@abstractmethod def _drop_db(self): <|docstring|>Remove the necessary DB elements<|endoftext|>
10c3ed375d971a706cfae3218a0e8bf2f0fe85765b19aab92c654c58c242dbd3
@pytest.mark.usefixtures('f2003_create') def test_zero_size_array_constructor(): ' Test that we can parse a valid, zero-size array constructor. ' fcode = 'integer ::' ast = Fortran2003.Ac_Spec(fcode) assert isinstance(ast, Fortran2003.Ac_Spec) assert isinstance(ast.children[0], Fortran2003.Intrinsic...
Test that we can parse a valid, zero-size array constructor.
src/fparser/two/tests/fortran2003/test_array_constructor_spec_r466.py
test_zero_size_array_constructor
reuterbal/fparser
33
python
@pytest.mark.usefixtures('f2003_create') def test_zero_size_array_constructor(): ' ' fcode = 'integer ::' ast = Fortran2003.Ac_Spec(fcode) assert isinstance(ast, Fortran2003.Ac_Spec) assert isinstance(ast.children[0], Fortran2003.Intrinsic_Type_Spec)
@pytest.mark.usefixtures('f2003_create') def test_zero_size_array_constructor(): ' ' fcode = 'integer ::' ast = Fortran2003.Ac_Spec(fcode) assert isinstance(ast, Fortran2003.Ac_Spec) assert isinstance(ast.children[0], Fortran2003.Intrinsic_Type_Spec)<|docstring|>Test that we can parse a valid, zero...
e447663ab753096168df21202aadeeb2c757f0b65e237d946f27ef6c4e2142f6
def test_int_literals_array_constructor(): ' Test when a simple list of integer literals is provided as the\n content of the constructor. ' fcode = '1, 2, 3' ast = Fortran2003.Ac_Spec(fcode) assert isinstance(ast, Fortran2003.Ac_Value_List)
Test when a simple list of integer literals is provided as the content of the constructor.
src/fparser/two/tests/fortran2003/test_array_constructor_spec_r466.py
test_int_literals_array_constructor
reuterbal/fparser
33
python
def test_int_literals_array_constructor(): ' Test when a simple list of integer literals is provided as the\n content of the constructor. ' fcode = '1, 2, 3' ast = Fortran2003.Ac_Spec(fcode) assert isinstance(ast, Fortran2003.Ac_Value_List)
def test_int_literals_array_constructor(): ' Test when a simple list of integer literals is provided as the\n content of the constructor. ' fcode = '1, 2, 3' ast = Fortran2003.Ac_Spec(fcode) assert isinstance(ast, Fortran2003.Ac_Value_List)<|docstring|>Test when a simple list of integer literals is p...
b5de4de8447a343af8a924ff9e8f07d84438ce959392aaafd44fe66618c053af
def test_expr_list_array_constructor(): ' Test when the provided content consists of expressions. ' fcode = 'ACOS(-1.0), SIN(1.0), 1.0+3.0' ast = Fortran2003.Ac_Spec(fcode) assert isinstance(ast, Fortran2003.Ac_Value_List)
Test when the provided content consists of expressions.
src/fparser/two/tests/fortran2003/test_array_constructor_spec_r466.py
test_expr_list_array_constructor
reuterbal/fparser
33
python
def test_expr_list_array_constructor(): ' ' fcode = 'ACOS(-1.0), SIN(1.0), 1.0+3.0' ast = Fortran2003.Ac_Spec(fcode) assert isinstance(ast, Fortran2003.Ac_Value_List)
def test_expr_list_array_constructor(): ' ' fcode = 'ACOS(-1.0), SIN(1.0), 1.0+3.0' ast = Fortran2003.Ac_Spec(fcode) assert isinstance(ast, Fortran2003.Ac_Value_List)<|docstring|>Test when the provided content consists of expressions.<|endoftext|>
45f524a70fb5567e1f22351aa47761836a7d81012bb01e8a447d5fd7987ab0a1
@pytest.mark.usefixtures('f2003_create') def test_array_spec_char_len(): ' Test with a specifier that specifies a length type parameter. ' fcode = "CHARACTER(LEN=7) :: 'Takata', 'Tanaka', 'Hayashi'" ast = Fortran2003.Ac_Spec(fcode) assert isinstance(ast, Fortran2003.Ac_Spec) assert isinstance(ast.ch...
Test with a specifier that specifies a length type parameter.
src/fparser/two/tests/fortran2003/test_array_constructor_spec_r466.py
test_array_spec_char_len
reuterbal/fparser
33
python
@pytest.mark.usefixtures('f2003_create') def test_array_spec_char_len(): ' ' fcode = "CHARACTER(LEN=7) :: 'Takata', 'Tanaka', 'Hayashi'" ast = Fortran2003.Ac_Spec(fcode) assert isinstance(ast, Fortran2003.Ac_Spec) assert isinstance(ast.children[0], Fortran2003.Intrinsic_Type_Spec) assert ("CHAR...
@pytest.mark.usefixtures('f2003_create') def test_array_spec_char_len(): ' ' fcode = "CHARACTER(LEN=7) :: 'Takata', 'Tanaka', 'Hayashi'" ast = Fortran2003.Ac_Spec(fcode) assert isinstance(ast, Fortran2003.Ac_Spec) assert isinstance(ast.children[0], Fortran2003.Intrinsic_Type_Spec) assert ("CHAR...
44e626b01332b3e6d7e298494e6d083890f3e97adf6b449948da756c0aafe367
@pytest.mark.usefixtures('f2003_create') def test_array_spec_no_match(): ' Check that incorrect content is not matched. ' fcode = 'call hello()' with pytest.raises(NoMatchError): Fortran2003.Ac_Spec(fcode)
Check that incorrect content is not matched.
src/fparser/two/tests/fortran2003/test_array_constructor_spec_r466.py
test_array_spec_no_match
reuterbal/fparser
33
python
@pytest.mark.usefixtures('f2003_create') def test_array_spec_no_match(): ' ' fcode = 'call hello()' with pytest.raises(NoMatchError): Fortran2003.Ac_Spec(fcode)
@pytest.mark.usefixtures('f2003_create') def test_array_spec_no_match(): ' ' fcode = 'call hello()' with pytest.raises(NoMatchError): Fortran2003.Ac_Spec(fcode)<|docstring|>Check that incorrect content is not matched.<|endoftext|>
2eea20f3e08cad18fd63e532eedb612b3fc267b7eb5c3bfb36da8a89d796aa1b
def get(self): 'Get all users' response_object = {'status': 'success', 'data': {'users': [user.to_json() for user in User.query.all()]}} return (response_object, 200)
Get all users
services/users/project/api/users.py
get
Kayt/ClosingBrace-Microservices
0
python
def get(self): response_object = {'status': 'success', 'data': {'users': [user.to_json() for user in User.query.all()]}} return (response_object, 200)
def get(self): response_object = {'status': 'success', 'data': {'users': [user.to_json() for user in User.query.all()]}} return (response_object, 200)<|docstring|>Get all users<|endoftext|>
68ac82c352cc90468b6f179cb7b1bbf9ef0150f65364051089c5109033b46ba9
def get(self, user_id): 'Get single user details' response_object = {'status': 'fail', 'message': 'User does not exist'} try: user = User.query.filter_by(id=int(user_id)).first() if (not user): return (response_object, 404) else: response_object = {'status': '...
Get single user details
services/users/project/api/users.py
get
Kayt/ClosingBrace-Microservices
0
python
def get(self, user_id): response_object = {'status': 'fail', 'message': 'User does not exist'} try: user = User.query.filter_by(id=int(user_id)).first() if (not user): return (response_object, 404) else: response_object = {'status': 'success', 'data': {'id': ...
def get(self, user_id): response_object = {'status': 'fail', 'message': 'User does not exist'} try: user = User.query.filter_by(id=int(user_id)).first() if (not user): return (response_object, 404) else: response_object = {'status': 'success', 'data': {'id': ...
dd20128b1cdb9b9e27591b40165f17f6bb9edc189423ecc66b475d80c4dce3a6
def login(request, template_name='registration/login.html', redirect_field_name=REDIRECT_FIELD_NAME): 'Displays the login form and handles the login action.' redirect_to = request.REQUEST.get(redirect_field_name, '') if (request.method == 'POST'): form = AuthenticationForm(data=request.POST) ...
Displays the login form and handles the login action.
wbcms/utils/views.py
login
westurner/wbcms
0
python
def login(request, template_name='registration/login.html', redirect_field_name=REDIRECT_FIELD_NAME): redirect_to = request.REQUEST.get(redirect_field_name, ) if (request.method == 'POST'): form = AuthenticationForm(data=request.POST) if form.is_valid(): if ((not redirect_to) or...
def login(request, template_name='registration/login.html', redirect_field_name=REDIRECT_FIELD_NAME): redirect_to = request.REQUEST.get(redirect_field_name, ) if (request.method == 'POST'): form = AuthenticationForm(data=request.POST) if form.is_valid(): if ((not redirect_to) or...
5ee074b85cb7b9028ac28f2c5c03764a6fef618f2e0c5202e46eabfe10c07eeb
def init_pretrained_weights(model, model_url): "Initializes model with pretrained weights.\n\n Layers that don't match with pretrained layers in name or size are kept unchanged.\n " pretrain_dict = model_zoo.load_url(model_url) model_dict = model.state_dict() pretrain_dict = {k: v for (k, v) in pr...
Initializes model with pretrained weights. Layers that don't match with pretrained layers in name or size are kept unchanged.
torchreid/models/resnet_ibn_a_hgnn.py
init_pretrained_weights
lujiaxuan0520/NAIC-ReID-2020-contest
1
python
def init_pretrained_weights(model, model_url): "Initializes model with pretrained weights.\n\n Layers that don't match with pretrained layers in name or size are kept unchanged.\n " pretrain_dict = model_zoo.load_url(model_url) model_dict = model.state_dict() pretrain_dict = {k: v for (k, v) in pr...
def init_pretrained_weights(model, model_url): "Initializes model with pretrained weights.\n\n Layers that don't match with pretrained layers in name or size are kept unchanged.\n " pretrain_dict = model_zoo.load_url(model_url) model_dict = model.state_dict() pretrain_dict = {k: v for (k, v) in pr...
f14d8313d41f9c884ca82ed70c82a1f606dd340d93de1764f623131ee65e89b5
def resnet50_ibn_a(last_stride, pretrained=False, **kwargs): 'Constructs a ResNet-50 model.\n Args:\n pretrained (bool): If True, returns a model pre-trained on ImageNet\n ' model = ResNet_IBN(last_stride, Bottleneck_IBN, [3, 4, 6, 3], **kwargs) if pretrained: model.load_state_dict(mode...
Constructs a ResNet-50 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
torchreid/models/resnet_ibn_a_hgnn.py
resnet50_ibn_a
lujiaxuan0520/NAIC-ReID-2020-contest
1
python
def resnet50_ibn_a(last_stride, pretrained=False, **kwargs): 'Constructs a ResNet-50 model.\n Args:\n pretrained (bool): If True, returns a model pre-trained on ImageNet\n ' model = ResNet_IBN(last_stride, Bottleneck_IBN, [3, 4, 6, 3], **kwargs) if pretrained: model.load_state_dict(mode...
def resnet50_ibn_a(last_stride, pretrained=False, **kwargs): 'Constructs a ResNet-50 model.\n Args:\n pretrained (bool): If True, returns a model pre-trained on ImageNet\n ' model = ResNet_IBN(last_stride, Bottleneck_IBN, [3, 4, 6, 3], **kwargs) if pretrained: model.load_state_dict(mode...
7bfa471273ede2e5c404110251ae444b32d34dfe9d317da76e3e29ca7a62d8f4
def resnet101_ibn_a(num_classes, isFinal=False, global_branch=False, pretrained=False, **kwargs): 'Constructs a ResNet-101 model.\n Args:\n pretrained (bool): If True, returns a model pre-trained on ImageNet\n ' model = ResNet_IBN_HGNN(num_classes=num_classes, block=Bottleneck_IBN, layers=[3, 4, 23...
Constructs a ResNet-101 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
torchreid/models/resnet_ibn_a_hgnn.py
resnet101_ibn_a
lujiaxuan0520/NAIC-ReID-2020-contest
1
python
def resnet101_ibn_a(num_classes, isFinal=False, global_branch=False, pretrained=False, **kwargs): 'Constructs a ResNet-101 model.\n Args:\n pretrained (bool): If True, returns a model pre-trained on ImageNet\n ' model = ResNet_IBN_HGNN(num_classes=num_classes, block=Bottleneck_IBN, layers=[3, 4, 23...
def resnet101_ibn_a(num_classes, isFinal=False, global_branch=False, pretrained=False, **kwargs): 'Constructs a ResNet-101 model.\n Args:\n pretrained (bool): If True, returns a model pre-trained on ImageNet\n ' model = ResNet_IBN_HGNN(num_classes=num_classes, block=Bottleneck_IBN, layers=[3, 4, 23...
e2c59c61055da7c554cf67a61acf32baa4baf3529b116d2e593b368f72c8fb1e
def resnet152_ibn_a(last_stride, pretrained=False, **kwargs): 'Constructs a ResNet-152 model.\n Args:\n pretrained (bool): If True, returns a model pre-trained on ImageNet\n ' model = ResNet_IBN(last_stride, Bottleneck_IBN, [3, 8, 36, 3], **kwargs) if pretrained: model.load_state_dict(m...
Constructs a ResNet-152 model. Args: pretrained (bool): If True, returns a model pre-trained on ImageNet
torchreid/models/resnet_ibn_a_hgnn.py
resnet152_ibn_a
lujiaxuan0520/NAIC-ReID-2020-contest
1
python
def resnet152_ibn_a(last_stride, pretrained=False, **kwargs): 'Constructs a ResNet-152 model.\n Args:\n pretrained (bool): If True, returns a model pre-trained on ImageNet\n ' model = ResNet_IBN(last_stride, Bottleneck_IBN, [3, 8, 36, 3], **kwargs) if pretrained: model.load_state_dict(m...
def resnet152_ibn_a(last_stride, pretrained=False, **kwargs): 'Constructs a ResNet-152 model.\n Args:\n pretrained (bool): If True, returns a model pre-trained on ImageNet\n ' model = ResNet_IBN(last_stride, Bottleneck_IBN, [3, 8, 36, 3], **kwargs) if pretrained: model.load_state_dict(m...
aa768a838a3c735985623323d5ab191874bc15dcdd986140f53707e95ee249c1
def _attention_op(self, feat): '\n do attention fusion\n :param feat: (batch, seq_len, num_split, c)\n :return: feat: (batch, num_split, c)\n ' att = F.normalize(feat.norm(p=2, dim=2, keepdim=True), p=1, dim=1) f = feat.mul(att).sum(dim=1) return f
do attention fusion :param feat: (batch, seq_len, num_split, c) :return: feat: (batch, num_split, c)
torchreid/models/resnet_ibn_a_hgnn.py
_attention_op
lujiaxuan0520/NAIC-ReID-2020-contest
1
python
def _attention_op(self, feat): '\n do attention fusion\n :param feat: (batch, seq_len, num_split, c)\n :return: feat: (batch, num_split, c)\n ' att = F.normalize(feat.norm(p=2, dim=2, keepdim=True), p=1, dim=1) f = feat.mul(att).sum(dim=1) return f
def _attention_op(self, feat): '\n do attention fusion\n :param feat: (batch, seq_len, num_split, c)\n :return: feat: (batch, num_split, c)\n ' att = F.normalize(feat.norm(p=2, dim=2, keepdim=True), p=1, dim=1) f = feat.mul(att).sum(dim=1) return f<|docstring|>do attention fu...
edb5c76a197235d684c67309a38b8fb7dec9073bb957bf2361b2f2268582d0f8
def _learn_attention_op(self, feat): '\n do attention fusion, with the weight learned\n :param feat: (batch, seq_len, num_split, c)\n :return: feat: (batch, num_split, c)\n ' f = feat.mul(self.attention_weight) f = f.sum(dim=1) return f
do attention fusion, with the weight learned :param feat: (batch, seq_len, num_split, c) :return: feat: (batch, num_split, c)
torchreid/models/resnet_ibn_a_hgnn.py
_learn_attention_op
lujiaxuan0520/NAIC-ReID-2020-contest
1
python
def _learn_attention_op(self, feat): '\n do attention fusion, with the weight learned\n :param feat: (batch, seq_len, num_split, c)\n :return: feat: (batch, num_split, c)\n ' f = feat.mul(self.attention_weight) f = f.sum(dim=1) return f
def _learn_attention_op(self, feat): '\n do attention fusion, with the weight learned\n :param feat: (batch, seq_len, num_split, c)\n :return: feat: (batch, num_split, c)\n ' f = feat.mul(self.attention_weight) f = f.sum(dim=1) return f<|docstring|>do attention fusion, with t...
7c3ab6fde11ad6878df7ed329e9a23682663890ab1ee9ee97e5e9afd0a8bae9c
def __init__(self, hass, device, sensor_data, parameter): 'Initialize the Centrometarl Boiler Sensor.' self.hass = hass self.web_boiler_client = hass.data[DOMAIN][device.username][WEB_BOILER_CLIENT] self.web_boiler_system = hass.data[DOMAIN][device.username][WEB_BOILER_SYSTEM] self.parameter = param...
Initialize the Centrometarl Boiler Sensor.
custom_components/centrometal_boiler/sensors/WebBoilerGenericSensor.py
__init__
9a4gl/hass-peltec
2
python
def __init__(self, hass, device, sensor_data, parameter): self.hass = hass self.web_boiler_client = hass.data[DOMAIN][device.username][WEB_BOILER_CLIENT] self.web_boiler_system = hass.data[DOMAIN][device.username][WEB_BOILER_SYSTEM] self.parameter = parameter self.device = device self._unit...
def __init__(self, hass, device, sensor_data, parameter): self.hass = hass self.web_boiler_client = hass.data[DOMAIN][device.username][WEB_BOILER_CLIENT] self.web_boiler_system = hass.data[DOMAIN][device.username][WEB_BOILER_SYSTEM] self.parameter = parameter self.device = device self._unit...
7a723a4664d7d38f9f257df1adfcc1a4146245bdd914942ca4b189179f89c5f1
async def async_added_to_hass(self): 'Subscribe to sensor events.' self.added_to_hass = True self.async_schedule_update_ha_state(False) self.parameter.set_update_callback(self.update_callback, 'generic')
Subscribe to sensor events.
custom_components/centrometal_boiler/sensors/WebBoilerGenericSensor.py
async_added_to_hass
9a4gl/hass-peltec
2
python
async def async_added_to_hass(self): self.added_to_hass = True self.async_schedule_update_ha_state(False) self.parameter.set_update_callback(self.update_callback, 'generic')
async def async_added_to_hass(self): self.added_to_hass = True self.async_schedule_update_ha_state(False) self.parameter.set_update_callback(self.update_callback, 'generic')<|docstring|>Subscribe to sensor events.<|endoftext|>
43d68a020068e5cc6e859d932feb652ea932b61b111b0327f8e6b8c1b4be9fdc
@property def should_poll(self) -> bool: 'No polling needed for a sensor.' return False
No polling needed for a sensor.
custom_components/centrometal_boiler/sensors/WebBoilerGenericSensor.py
should_poll
9a4gl/hass-peltec
2
python
@property def should_poll(self) -> bool: return False
@property def should_poll(self) -> bool: return False<|docstring|>No polling needed for a sensor.<|endoftext|>
4cc5f154ef2afd186977f8245faaf6e0bc0cadff4de50077959227a10ad563d7
async def update_callback(self, parameter): 'Call update for Home Assistant when the parameter is updated.' self.async_write_ha_state()
Call update for Home Assistant when the parameter is updated.
custom_components/centrometal_boiler/sensors/WebBoilerGenericSensor.py
update_callback
9a4gl/hass-peltec
2
python
async def update_callback(self, parameter): self.async_write_ha_state()
async def update_callback(self, parameter): self.async_write_ha_state()<|docstring|>Call update for Home Assistant when the parameter is updated.<|endoftext|>
959514ff3ad36bfa3d9e493ec80719a74614a7e62c186c5799451855e3d3f810
@property def name(self): 'Return the name of the device.' return self._name
Return the name of the device.
custom_components/centrometal_boiler/sensors/WebBoilerGenericSensor.py
name
9a4gl/hass-peltec
2
python
@property def name(self): return self._name
@property def name(self): return self._name<|docstring|>Return the name of the device.<|endoftext|>
855c584131a3df52ee8c47f2b359b9d9ec09cb3b437ff32024745b23fbedeece
@property def unique_id(self) -> str: 'Return a unique ID.' return self._unique_id
Return a unique ID.
custom_components/centrometal_boiler/sensors/WebBoilerGenericSensor.py
unique_id
9a4gl/hass-peltec
2
python
@property def unique_id(self) -> str: return self._unique_id
@property def unique_id(self) -> str: return self._unique_id<|docstring|>Return a unique ID.<|endoftext|>
1978fa32e16ae93df38c43cdc440475bca9f9db8bb639d7cd507ee7b31059757
@property def icon(self): 'Return the icon to use in the frontend.' return self._icon
Return the icon to use in the frontend.
custom_components/centrometal_boiler/sensors/WebBoilerGenericSensor.py
icon
9a4gl/hass-peltec
2
python
@property def icon(self): return self._icon
@property def icon(self): return self._icon<|docstring|>Return the icon to use in the frontend.<|endoftext|>
e01e91b76c41f993481667c2292d78e1a2ef81b7c9d5677c629af879c56edb34
@property def unit_of_measurement(self): 'Return the unit of measurement of this entity, if any.' return self._unit
Return the unit of measurement of this entity, if any.
custom_components/centrometal_boiler/sensors/WebBoilerGenericSensor.py
unit_of_measurement
9a4gl/hass-peltec
2
python
@property def unit_of_measurement(self): return self._unit
@property def unit_of_measurement(self): return self._unit<|docstring|>Return the unit of measurement of this entity, if any.<|endoftext|>
f8f1764239a98784ffd055f3382389240d30180290c77999caa53b6817454a93
@property def native_unit_of_measurement(self): 'Return the unit this state is expressed in.' return self._unit
Return the unit this state is expressed in.
custom_components/centrometal_boiler/sensors/WebBoilerGenericSensor.py
native_unit_of_measurement
9a4gl/hass-peltec
2
python
@property def native_unit_of_measurement(self): return self._unit
@property def native_unit_of_measurement(self): return self._unit<|docstring|>Return the unit this state is expressed in.<|endoftext|>
21c14481cb9f48072081a91d46c5f38c7be188aa32b8037ff5d10179c8d460c3
@property def device_class(self): 'Return the device class of this entity.' return self._device_class
Return the device class of this entity.
custom_components/centrometal_boiler/sensors/WebBoilerGenericSensor.py
device_class
9a4gl/hass-peltec
2
python
@property def device_class(self): return self._device_class
@property def device_class(self): return self._device_class<|docstring|>Return the device class of this entity.<|endoftext|>
ee0d6158cc6ed60837358fafb0b654ad79beaa601f37bfca72e2c1c4d5b46fc3
@property def native_value(self): 'Return the value of the sensor.' return self.parameter['value']
Return the value of the sensor.
custom_components/centrometal_boiler/sensors/WebBoilerGenericSensor.py
native_value
9a4gl/hass-peltec
2
python
@property def native_value(self): return self.parameter['value']
@property def native_value(self): return self.parameter['value']<|docstring|>Return the value of the sensor.<|endoftext|>
d68fa059210e3949fcf64b7ec166e941e68984afc92d7259e481811002429bb6
@property def available(self): 'Return the availablity of the sensor.' return self.web_boiler_client.is_websocket_connected()
Return the availablity of the sensor.
custom_components/centrometal_boiler/sensors/WebBoilerGenericSensor.py
available
9a4gl/hass-peltec
2
python
@property def available(self): return self.web_boiler_client.is_websocket_connected()
@property def available(self): return self.web_boiler_client.is_websocket_connected()<|docstring|>Return the availablity of the sensor.<|endoftext|>
ad463ee3c84398c9aea9f58e701f06607491c3ba2ade924011ea633a0c302ed4
@property def extra_state_attributes(self): 'Return the state attributes of the sensor.' attributes = {} if ('timestamp' in self.parameter): last_updated = format_time(self.hass, int(self.parameter['timestamp'])) for (key, description) in self._attributes.items(): parameter = sel...
Return the state attributes of the sensor.
custom_components/centrometal_boiler/sensors/WebBoilerGenericSensor.py
extra_state_attributes
9a4gl/hass-peltec
2
python
@property def extra_state_attributes(self): attributes = {} if ('timestamp' in self.parameter): last_updated = format_time(self.hass, int(self.parameter['timestamp'])) for (key, description) in self._attributes.items(): parameter = self.device.get_parameter(key) attr...
@property def extra_state_attributes(self): attributes = {} if ('timestamp' in self.parameter): last_updated = format_time(self.hass, int(self.parameter['timestamp'])) for (key, description) in self._attributes.items(): parameter = self.device.get_parameter(key) attr...
5a62eac40d50865c470f1a2be1b53a6805f3587a67d0fc99417658ad2b16cbbd
def __init__(__self__, *, end_ip_address: pulumi.Input[str], start_ip_address: pulumi.Input[str], synapse_workspace_id: pulumi.Input[str], name: Optional[pulumi.Input[str]]=None): '\n The set of arguments for constructing a FirewallRule resource.\n :param pulumi.Input[str] end_ip_address: The ending I...
The set of arguments for constructing a FirewallRule resource. :param pulumi.Input[str] end_ip_address: The ending IP address to allow through the firewall for this rule. :param pulumi.Input[str] start_ip_address: The starting IP address to allow through the firewall for this rule. :param pulumi.Input[str] synapse_work...
sdk/python/pulumi_azure/synapse/firewall_rule.py
__init__
henriktao/pulumi-azure
109
python
def __init__(__self__, *, end_ip_address: pulumi.Input[str], start_ip_address: pulumi.Input[str], synapse_workspace_id: pulumi.Input[str], name: Optional[pulumi.Input[str]]=None): '\n The set of arguments for constructing a FirewallRule resource.\n :param pulumi.Input[str] end_ip_address: The ending I...
def __init__(__self__, *, end_ip_address: pulumi.Input[str], start_ip_address: pulumi.Input[str], synapse_workspace_id: pulumi.Input[str], name: Optional[pulumi.Input[str]]=None): '\n The set of arguments for constructing a FirewallRule resource.\n :param pulumi.Input[str] end_ip_address: The ending I...
d5634ada3879e097a799e913a7cbf7d72c5ba1ae968f86a0c470533a89226cbb
@property @pulumi.getter(name='endIpAddress') def end_ip_address(self) -> pulumi.Input[str]: '\n The ending IP address to allow through the firewall for this rule.\n ' return pulumi.get(self, 'end_ip_address')
The ending IP address to allow through the firewall for this rule.
sdk/python/pulumi_azure/synapse/firewall_rule.py
end_ip_address
henriktao/pulumi-azure
109
python
@property @pulumi.getter(name='endIpAddress') def end_ip_address(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'end_ip_address')
@property @pulumi.getter(name='endIpAddress') def end_ip_address(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'end_ip_address')<|docstring|>The ending IP address to allow through the firewall for this rule.<|endoftext|>
f4f85911b5dab44e95d6952ed9e24d86b086f77d474c08f7a7e15a7c740f511b
@property @pulumi.getter(name='startIpAddress') def start_ip_address(self) -> pulumi.Input[str]: '\n The starting IP address to allow through the firewall for this rule.\n ' return pulumi.get(self, 'start_ip_address')
The starting IP address to allow through the firewall for this rule.
sdk/python/pulumi_azure/synapse/firewall_rule.py
start_ip_address
henriktao/pulumi-azure
109
python
@property @pulumi.getter(name='startIpAddress') def start_ip_address(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'start_ip_address')
@property @pulumi.getter(name='startIpAddress') def start_ip_address(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'start_ip_address')<|docstring|>The starting IP address to allow through the firewall for this rule.<|endoftext|>
8ae20ced7fe954bcd2efba30f0b1ded559a4ecc1f3e9da4b15b4402ef9473e37
@property @pulumi.getter(name='synapseWorkspaceId') def synapse_workspace_id(self) -> pulumi.Input[str]: '\n The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'synapse_workspace_id')
The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/synapse/firewall_rule.py
synapse_workspace_id
henriktao/pulumi-azure
109
python
@property @pulumi.getter(name='synapseWorkspaceId') def synapse_workspace_id(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'synapse_workspace_id')
@property @pulumi.getter(name='synapseWorkspaceId') def synapse_workspace_id(self) -> pulumi.Input[str]: '\n \n ' return pulumi.get(self, 'synapse_workspace_id')<|docstring|>The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created.<|en...
42beab7c1671cfa736de4f5f8715450cb1ac13aa487b8b66d2235265604e17c4
@property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: '\n The Name of the firewall rule. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'name')
The Name of the firewall rule. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/synapse/firewall_rule.py
name
henriktao/pulumi-azure
109
python
@property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'name')
@property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'name')<|docstring|>The Name of the firewall rule. Changing this forces a new resource to be created.<|endoftext|>
cee8fcd8ca50ac2f1873e4d001c2a167fcafa82b9402e349df77c804b16f54b0
def __init__(__self__, *, end_ip_address: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, start_ip_address: Optional[pulumi.Input[str]]=None, synapse_workspace_id: Optional[pulumi.Input[str]]=None): '\n Input properties used for looking up and filtering FirewallRule resources.\n ...
Input properties used for looking up and filtering FirewallRule resources. :param pulumi.Input[str] end_ip_address: The ending IP address to allow through the firewall for this rule. :param pulumi.Input[str] name: The Name of the firewall rule. Changing this forces a new resource to be created. :param pulumi.Input[str]...
sdk/python/pulumi_azure/synapse/firewall_rule.py
__init__
henriktao/pulumi-azure
109
python
def __init__(__self__, *, end_ip_address: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, start_ip_address: Optional[pulumi.Input[str]]=None, synapse_workspace_id: Optional[pulumi.Input[str]]=None): '\n Input properties used for looking up and filtering FirewallRule resources.\n ...
def __init__(__self__, *, end_ip_address: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, start_ip_address: Optional[pulumi.Input[str]]=None, synapse_workspace_id: Optional[pulumi.Input[str]]=None): '\n Input properties used for looking up and filtering FirewallRule resources.\n ...
b2e56a927f32c131e5bc8dc233436c51881fdc1241b728a662a927663a39865c
@property @pulumi.getter(name='endIpAddress') def end_ip_address(self) -> Optional[pulumi.Input[str]]: '\n The ending IP address to allow through the firewall for this rule.\n ' return pulumi.get(self, 'end_ip_address')
The ending IP address to allow through the firewall for this rule.
sdk/python/pulumi_azure/synapse/firewall_rule.py
end_ip_address
henriktao/pulumi-azure
109
python
@property @pulumi.getter(name='endIpAddress') def end_ip_address(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'end_ip_address')
@property @pulumi.getter(name='endIpAddress') def end_ip_address(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'end_ip_address')<|docstring|>The ending IP address to allow through the firewall for this rule.<|endoftext|>
42beab7c1671cfa736de4f5f8715450cb1ac13aa487b8b66d2235265604e17c4
@property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: '\n The Name of the firewall rule. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'name')
The Name of the firewall rule. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/synapse/firewall_rule.py
name
henriktao/pulumi-azure
109
python
@property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'name')
@property @pulumi.getter def name(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'name')<|docstring|>The Name of the firewall rule. Changing this forces a new resource to be created.<|endoftext|>
2d83f9f8c97a40d3cedb0525e0afae33529bbb94c7406538d96322dcb56dc708
@property @pulumi.getter(name='startIpAddress') def start_ip_address(self) -> Optional[pulumi.Input[str]]: '\n The starting IP address to allow through the firewall for this rule.\n ' return pulumi.get(self, 'start_ip_address')
The starting IP address to allow through the firewall for this rule.
sdk/python/pulumi_azure/synapse/firewall_rule.py
start_ip_address
henriktao/pulumi-azure
109
python
@property @pulumi.getter(name='startIpAddress') def start_ip_address(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'start_ip_address')
@property @pulumi.getter(name='startIpAddress') def start_ip_address(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'start_ip_address')<|docstring|>The starting IP address to allow through the firewall for this rule.<|endoftext|>
c0fd6e1e5475290f66f311f6be5bbde96222a526e6a7901f3c46a8626e03da0b
@property @pulumi.getter(name='synapseWorkspaceId') def synapse_workspace_id(self) -> Optional[pulumi.Input[str]]: '\n The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'synapse_workspace_id')
The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/synapse/firewall_rule.py
synapse_workspace_id
henriktao/pulumi-azure
109
python
@property @pulumi.getter(name='synapseWorkspaceId') def synapse_workspace_id(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'synapse_workspace_id')
@property @pulumi.getter(name='synapseWorkspaceId') def synapse_workspace_id(self) -> Optional[pulumi.Input[str]]: '\n \n ' return pulumi.get(self, 'synapse_workspace_id')<|docstring|>The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be cr...
6f5dc3162a3b3ba0100cdc8a330247d14a6dc015682ca2634607f28fd63677e2
@overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, end_ip_address: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, start_ip_address: Optional[pulumi.Input[str]]=None, synapse_workspace_id: Optional[pulumi.Input[str]]=None, __props__=None): '\n...
Allows you to Manages a Synapse Firewall Rule. ## Example Usage ```python import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe") example_account = azure.storage.Account("exampleAccount", resource_group_name=example_resource_gro...
sdk/python/pulumi_azure/synapse/firewall_rule.py
__init__
henriktao/pulumi-azure
109
python
@overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, end_ip_address: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, start_ip_address: Optional[pulumi.Input[str]]=None, synapse_workspace_id: Optional[pulumi.Input[str]]=None, __props__=None): '\n...
@overload def __init__(__self__, resource_name: str, opts: Optional[pulumi.ResourceOptions]=None, end_ip_address: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, start_ip_address: Optional[pulumi.Input[str]]=None, synapse_workspace_id: Optional[pulumi.Input[str]]=None, __props__=None): '\n...
cc2af0cd9767e3ee3ce890a14b57bf544ce09d3c4aa5dbc29cbe0dace37de2c7
@overload def __init__(__self__, resource_name: str, args: FirewallRuleArgs, opts: Optional[pulumi.ResourceOptions]=None): '\n Allows you to Manages a Synapse Firewall Rule.\n\n ## Example Usage\n\n ```python\n import pulumi\n import pulumi_azure as azure\n\n example_resour...
Allows you to Manages a Synapse Firewall Rule. ## Example Usage ```python import pulumi import pulumi_azure as azure example_resource_group = azure.core.ResourceGroup("exampleResourceGroup", location="West Europe") example_account = azure.storage.Account("exampleAccount", resource_group_name=example_resource_gro...
sdk/python/pulumi_azure/synapse/firewall_rule.py
__init__
henriktao/pulumi-azure
109
python
@overload def __init__(__self__, resource_name: str, args: FirewallRuleArgs, opts: Optional[pulumi.ResourceOptions]=None): '\n Allows you to Manages a Synapse Firewall Rule.\n\n ## Example Usage\n\n ```python\n import pulumi\n import pulumi_azure as azure\n\n example_resour...
@overload def __init__(__self__, resource_name: str, args: FirewallRuleArgs, opts: Optional[pulumi.ResourceOptions]=None): '\n Allows you to Manages a Synapse Firewall Rule.\n\n ## Example Usage\n\n ```python\n import pulumi\n import pulumi_azure as azure\n\n example_resour...
cd626ae456890ede7733f0308d6b5b418df641740ffdb965c6769bd144d81db6
@staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None, end_ip_address: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, start_ip_address: Optional[pulumi.Input[str]]=None, synapse_workspace_id: Optional[pulumi.Input[str]]=None) -> 'Firewall...
Get an existing FirewallRule resource's state with the given name, id, and optional extra properties used to qualify the lookup. :param str resource_name: The unique name of the resulting resource. :param pulumi.Input[str] id: The unique provider ID of the resource to lookup. :param pulumi.ResourceOptions opts: Option...
sdk/python/pulumi_azure/synapse/firewall_rule.py
get
henriktao/pulumi-azure
109
python
@staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None, end_ip_address: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, start_ip_address: Optional[pulumi.Input[str]]=None, synapse_workspace_id: Optional[pulumi.Input[str]]=None) -> 'Firewall...
@staticmethod def get(resource_name: str, id: pulumi.Input[str], opts: Optional[pulumi.ResourceOptions]=None, end_ip_address: Optional[pulumi.Input[str]]=None, name: Optional[pulumi.Input[str]]=None, start_ip_address: Optional[pulumi.Input[str]]=None, synapse_workspace_id: Optional[pulumi.Input[str]]=None) -> 'Firewall...
07b17ab18a2cc51a6a4ccc60a292ebd885a9223b301593a0775b590b21f7af1e
@property @pulumi.getter(name='endIpAddress') def end_ip_address(self) -> pulumi.Output[str]: '\n The ending IP address to allow through the firewall for this rule.\n ' return pulumi.get(self, 'end_ip_address')
The ending IP address to allow through the firewall for this rule.
sdk/python/pulumi_azure/synapse/firewall_rule.py
end_ip_address
henriktao/pulumi-azure
109
python
@property @pulumi.getter(name='endIpAddress') def end_ip_address(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'end_ip_address')
@property @pulumi.getter(name='endIpAddress') def end_ip_address(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'end_ip_address')<|docstring|>The ending IP address to allow through the firewall for this rule.<|endoftext|>
38fec59d157ad95b064833f07f4e9f0f0b4cb01e504dca8ebeb0c41e090258bf
@property @pulumi.getter def name(self) -> pulumi.Output[str]: '\n The Name of the firewall rule. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'name')
The Name of the firewall rule. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/synapse/firewall_rule.py
name
henriktao/pulumi-azure
109
python
@property @pulumi.getter def name(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'name')
@property @pulumi.getter def name(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'name')<|docstring|>The Name of the firewall rule. Changing this forces a new resource to be created.<|endoftext|>
15d596442030962c535a3a1a6ce788bbd16eb07822fdd76cf9cac3a80f9c07ee
@property @pulumi.getter(name='startIpAddress') def start_ip_address(self) -> pulumi.Output[str]: '\n The starting IP address to allow through the firewall for this rule.\n ' return pulumi.get(self, 'start_ip_address')
The starting IP address to allow through the firewall for this rule.
sdk/python/pulumi_azure/synapse/firewall_rule.py
start_ip_address
henriktao/pulumi-azure
109
python
@property @pulumi.getter(name='startIpAddress') def start_ip_address(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'start_ip_address')
@property @pulumi.getter(name='startIpAddress') def start_ip_address(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'start_ip_address')<|docstring|>The starting IP address to allow through the firewall for this rule.<|endoftext|>
be3c48b2b7b398db1a5f56e2be4e542074da47d17d5ca24fbf0a7d58dfdae890
@property @pulumi.getter(name='synapseWorkspaceId') def synapse_workspace_id(self) -> pulumi.Output[str]: '\n The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created.\n ' return pulumi.get(self, 'synapse_workspace_id')
The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created.
sdk/python/pulumi_azure/synapse/firewall_rule.py
synapse_workspace_id
henriktao/pulumi-azure
109
python
@property @pulumi.getter(name='synapseWorkspaceId') def synapse_workspace_id(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'synapse_workspace_id')
@property @pulumi.getter(name='synapseWorkspaceId') def synapse_workspace_id(self) -> pulumi.Output[str]: '\n \n ' return pulumi.get(self, 'synapse_workspace_id')<|docstring|>The ID of the Synapse Workspace on which to create the Firewall Rule. Changing this forces a new resource to be created.<|e...
2639b4668bbd838b9072f5adf458ab634e0e494ca2dad9c69cdbfe4dbc736247
@pytest.fixture(scope='module') def configuration(): 'Create a system db, system and configuration.' db = SystemDB(filename='file:seamm_db?mode=memory&cache=shared') system = db.create_system(name='default') configuration = system.create_configuration(name='default') (yield configuration) db.clo...
Create a system db, system and configuration.
tests/test_formats.py
configuration
paulsaxe/read_structure_step
0
python
@pytest.fixture(scope='module') def configuration(): db = SystemDB(filename='file:seamm_db?mode=memory&cache=shared') system = db.create_system(name='default') configuration = system.create_configuration(name='default') (yield configuration) db.close() try: del db except: ...
@pytest.fixture(scope='module') def configuration(): db = SystemDB(filename='file:seamm_db?mode=memory&cache=shared') system = db.create_system(name='default') configuration = system.create_configuration(name='default') (yield configuration) db.close() try: del db except: ...
5d4e6c488ba30d4df39ac1e6a5dc14503e15162d7bc32a410546c946d73faba0
def prefilter_boxes(keypoints, skip_threshold=0.0): '\n Create dict with boxes stored by its label.\n\n Parameters\n ----------\n keypoints: np.array\n keypoints.\n skip_threshold: float \n threshold for skipping keypoints with low confedences.\n \n Returns\n -------\n new_k...
Create dict with boxes stored by its label. Parameters ---------- keypoints: np.array keypoints. skip_threshold: float threshold for skipping keypoints with low confedences. Returns ------- new_keypoints: dict dict with keypoints stored by its label.
contextnet/utils/utils.py
prefilter_boxes
ushakovegor/ContextNetwork
0
python
def prefilter_boxes(keypoints, skip_threshold=0.0): '\n Create dict with boxes stored by its label.\n\n Parameters\n ----------\n keypoints: np.array\n keypoints.\n skip_threshold: float \n threshold for skipping keypoints with low confedences.\n \n Returns\n -------\n new_k...
def prefilter_boxes(keypoints, skip_threshold=0.0): '\n Create dict with boxes stored by its label.\n\n Parameters\n ----------\n keypoints: np.array\n keypoints.\n skip_threshold: float \n threshold for skipping keypoints with low confedences.\n \n Returns\n -------\n new_k...
edbb456a14f54e577ad2fe2246e0a216f311547e534f12be83209f66d37ce277
def get_weighted_box(points, conf_type='avg'): '\n Create weighted box for set of boxes.\n\n Parameters\n ----------\n points: np.array\n one keypoint.\n conf_type: str\n the type of confidence.\n\n Returns\n -------\n box: np.array\n new keypoint.\n ' box = np.ze...
Create weighted box for set of boxes. Parameters ---------- points: np.array one keypoint. conf_type: str the type of confidence. Returns ------- box: np.array new keypoint.
contextnet/utils/utils.py
get_weighted_box
ushakovegor/ContextNetwork
0
python
def get_weighted_box(points, conf_type='avg'): '\n Create weighted box for set of boxes.\n\n Parameters\n ----------\n points: np.array\n one keypoint.\n conf_type: str\n the type of confidence.\n\n Returns\n -------\n box: np.array\n new keypoint.\n ' box = np.ze...
def get_weighted_box(points, conf_type='avg'): '\n Create weighted box for set of boxes.\n\n Parameters\n ----------\n points: np.array\n one keypoint.\n conf_type: str\n the type of confidence.\n\n Returns\n -------\n box: np.array\n new keypoint.\n ' box = np.ze...
7279056eaf700b49b5470fccff5103696ec6b562542c2798eccb3801f2c501e8
def find_matching_box(points, new_point, similarity, match_sim): '\n Compute similarity score between new points and all points to find most similar.\n\n Parameters\n ----------\n points: list\n The list of points for measering similarity.\n new_point: np.array\n The point which is want...
Compute similarity score between new points and all points to find most similar. Parameters ---------- points: list The list of points for measering similarity. new_point: np.array The point which is wanted to match with one from points. similarity: func Similarity function. match_sim: float threshold...
contextnet/utils/utils.py
find_matching_box
ushakovegor/ContextNetwork
0
python
def find_matching_box(points, new_point, similarity, match_sim): '\n Compute similarity score between new points and all points to find most similar.\n\n Parameters\n ----------\n points: list\n The list of points for measering similarity.\n new_point: np.array\n The point which is want...
def find_matching_box(points, new_point, similarity, match_sim): '\n Compute similarity score between new points and all points to find most similar.\n\n Parameters\n ----------\n points: list\n The list of points for measering similarity.\n new_point: np.array\n The point which is want...
9fccf409fb5d6b610407428d13996837b9c243dd658876e74b06ffdc89c083d2
def WBF(keypoints, similarity, threshold, skip_threshold=0.0, conf_type='avg'): '\n Weighted Boxes Fusion method for matching keypoints.\n\n Parameters\n ----------\n keypoints: np.array\n input keypoints.\n similarity: func\n the function to measure similariry between keypoints.\n t...
Weighted Boxes Fusion method for matching keypoints. Parameters ---------- keypoints: np.array input keypoints. similarity: func the function to measure similariry between keypoints. threshold: float threshold for similarity. skip_threshold: float the threshold to skip keypoints with low confidence. co...
contextnet/utils/utils.py
WBF
ushakovegor/ContextNetwork
0
python
def WBF(keypoints, similarity, threshold, skip_threshold=0.0, conf_type='avg'): '\n Weighted Boxes Fusion method for matching keypoints.\n\n Parameters\n ----------\n keypoints: np.array\n input keypoints.\n similarity: func\n the function to measure similariry between keypoints.\n t...
def WBF(keypoints, similarity, threshold, skip_threshold=0.0, conf_type='avg'): '\n Weighted Boxes Fusion method for matching keypoints.\n\n Parameters\n ----------\n keypoints: np.array\n input keypoints.\n similarity: func\n the function to measure similariry between keypoints.\n t...