hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
⌀
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
⌀
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
⌀
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
⌀
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
⌀
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
⌀
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
⌀
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
⌀
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
⌀
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f77a5d2d2248967027842023a4506c7e966f3731
13,450
py
Python
test/functional/bumpfee.py
RossClelland/uscbuild
db77df86e94ba4362040d5bedf1c71e5b4f01654
[ "MIT" ]
null
null
null
test/functional/bumpfee.py
RossClelland/uscbuild
db77df86e94ba4362040d5bedf1c71e5b4f01654
[ "MIT" ]
null
null
null
test/functional/bumpfee.py
RossClelland/uscbuild
db77df86e94ba4362040d5bedf1c71e5b4f01654
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016 The Uscoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the bumpfee RPC. Verifies that the bumpfee RPC creates replacement transactions successfully when its p...
44.833333
119
0.725799
from segwit import send_to_witness from test_framework.test_framework import UscoinTestFramework from test_framework import blocktools from test_framework.mininode import CTransaction from test_framework.util import * import io BIP125_SEQUENCE_NUMBER = 0xfffffffd WALLET_PASSPHRASE = "test" WALLET_PASSPHRASE_TIMEOUT...
true
true
f77a5d9aa2c3d04d3700f6ee0f839ae488defa78
2,802
py
Python
airflow/providers/apache/kylin/hooks/kylin.py
yang040840219/airflow
c73d9e09cc650374e975ba287e9ed8ea59cde51a
[ "Apache-2.0" ]
2
2020-10-23T18:55:03.000Z
2021-07-13T04:45:49.000Z
airflow/providers/apache/kylin/hooks/kylin.py
yang040840219/airflow
c73d9e09cc650374e975ba287e9ed8ea59cde51a
[ "Apache-2.0" ]
14
2019-12-03T02:54:42.000Z
2020-02-27T16:08:10.000Z
airflow/providers/apache/kylin/hooks/kylin.py
yang040840219/airflow
c73d9e09cc650374e975ba287e9ed8ea59cde51a
[ "Apache-2.0" ]
2
2020-10-23T18:55:05.000Z
2022-02-16T21:53:10.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
32.206897
91
0.650607
from typing import Optional from kylinpy import exceptions, kylinpy from airflow.exceptions import AirflowException from airflow.hooks.base_hook import BaseHook class KylinHook(BaseHook): def __init__( self, kylin_conn_id: str = 'kylin_default', project: Optional[str] = None, d...
true
true
f77a5da53d3f97367a81093979c3438a07be4cad
16,133
py
Python
tutorials/dist/1_node_classification.py
iTakeshi/dgl
25c9221b835b775f40983c844e482a1242095756
[ "Apache-2.0" ]
1
2022-02-09T17:01:14.000Z
2022-02-09T17:01:14.000Z
tutorials/dist/1_node_classification.py
iTakeshi/dgl
25c9221b835b775f40983c844e482a1242095756
[ "Apache-2.0" ]
null
null
null
tutorials/dist/1_node_classification.py
iTakeshi/dgl
25c9221b835b775f40983c844e482a1242095756
[ "Apache-2.0" ]
null
null
null
''' Distributed Node Classification =============================== In this tutorial, we will walk through the steps of performing distributed GNN training for a node classification task. To understand distributed GNN training, you need to read the tutorial of multi-GPU training first. This tutorial is developed on to...
36.91762
299
0.705015
true
true
f77a5e8e7be49c0a5b881e22fe4401b5a36f221e
6,963
py
Python
src/blackd/__init__.py
snsnlou2/black
b55fb821e795bc45903e6f7b89e8857ddb5a94f8
[ "MIT" ]
28
2018-09-23T16:01:51.000Z
2022-03-27T18:20:08.000Z
src/blackd/__init__.py
snsnlou2/black
b55fb821e795bc45903e6f7b89e8857ddb5a94f8
[ "MIT" ]
22
2018-10-10T11:49:07.000Z
2022-03-28T02:16:07.000Z
src/blackd/__init__.py
snsnlou2/black
b55fb821e795bc45903e6f7b89e8857ddb5a94f8
[ "MIT" ]
10
2020-09-29T21:52:36.000Z
2021-09-29T01:02:11.000Z
import asyncio import logging import sys from concurrent.futures import Executor, ProcessPoolExecutor from datetime import datetime from functools import partial from multiprocessing import freeze_support from typing import Set, Tuple try: from aiohttp import web import aiohttp_cors except ImportError as ie: ...
33.800971
88
0.613098
import asyncio import logging import sys from concurrent.futures import Executor, ProcessPoolExecutor from datetime import datetime from functools import partial from multiprocessing import freeze_support from typing import Set, Tuple try: from aiohttp import web import aiohttp_cors except ImportError as ie: ...
true
true
f77a5ecbc311d7b36707435d32b11d0e64742709
15,174
py
Python
src/sst/elements/prospero/tests/testsuite_default_prospero.py
jvorob/sst-elements
665cac532f9995328d52fea10b9a24141a697d57
[ "BSD-3-Clause" ]
8
2021-12-28T07:50:35.000Z
2022-03-25T15:20:25.000Z
src/sst/elements/prospero/tests/testsuite_default_prospero.py
jvorob/sst-elements
665cac532f9995328d52fea10b9a24141a697d57
[ "BSD-3-Clause" ]
null
null
null
src/sst/elements/prospero/tests/testsuite_default_prospero.py
jvorob/sst-elements
665cac532f9995328d52fea10b9a24141a697d57
[ "BSD-3-Clause" ]
2
2021-12-14T05:53:49.000Z
2022-03-22T03:06:05.000Z
# -*- coding: utf-8 -*- from sst_unittest import * from sst_unittest_support import * import os import glob USE_PIN_TRACES = True USE_TAR_TRACES = False WITH_DRAMSIM = True NO_DRAMSIM = False ################################################################################ # Code to support a single instance module i...
50.41196
173
0.686635
from sst_unittest import * from sst_unittest_support import * import os import glob USE_PIN_TRACES = True USE_TAR_TRACES = False WITH_DRAMSIM = True NO_DRAMSIM = False module_init = 0 module_sema = threading.Semaphore() def initializeTestModule_SingleInstance(class_inst): global module_init global module_s...
true
true
f77a5eda3b74f20d6afa426e47aff4de537538d5
1,991
py
Python
tests/tests/test_middleware.py
peopledoc/django-pipeline
59865e1387a2b785a3948244639d1827fd4f2c99
[ "MIT" ]
null
null
null
tests/tests/test_middleware.py
peopledoc/django-pipeline
59865e1387a2b785a3948244639d1827fd4f2c99
[ "MIT" ]
null
null
null
tests/tests/test_middleware.py
peopledoc/django-pipeline
59865e1387a2b785a3948244639d1827fd4f2c99
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import TestCase from django.conf import settings from django.core.urlresolvers import reverse from tests.utils import pipeline_settings class MiddlewareTest(TestCase): def test_middleware_off(self): response = self.client.g...
36.87037
66
0.672024
from __future__ import unicode_literals from django.test import TestCase from django.conf import settings from django.core.urlresolvers import reverse from tests.utils import pipeline_settings class MiddlewareTest(TestCase): def test_middleware_off(self): response = self.client.get(reverse('admin:index'...
true
true
f77a5f05f6217a087bcf8731dfd4f5e202549b0c
7,477
py
Python
homeassistant/components/demo.py
adolfoeliazat/voidhomecontrol
6d733253811c553912e46e24debec818b28b0688
[ "Apache-2.0" ]
1
2021-08-06T09:54:39.000Z
2021-08-06T09:54:39.000Z
homeassistant/components/demo.py
adolfoeliazat/voidhomecontrol
6d733253811c553912e46e24debec818b28b0688
[ "Apache-2.0" ]
null
null
null
homeassistant/components/demo.py
adolfoeliazat/voidhomecontrol
6d733253811c553912e46e24debec818b28b0688
[ "Apache-2.0" ]
1
2020-08-26T20:54:14.000Z
2020-08-26T20:54:14.000Z
""" Set up the demo environment that mimics interaction with devices. For more details about this component, please refer to the documentation https://home-assistant.io/components/demo/ """ import asyncio import time import homeassistant.bootstrap as bootstrap import homeassistant.core as ha import homeassistant.load...
33.986364
78
0.576836
import asyncio import time import homeassistant.bootstrap as bootstrap import homeassistant.core as ha import homeassistant.loader as loader from homeassistant.const import ATTR_ENTITY_ID, CONF_PLATFORM DEPENDENCIES = ['conversation', 'introduction', 'zone'] DOMAIN = 'demo' COMPONENTS_WITH_DEMO_PLATFORM = [ 'ala...
true
true
f77a5f5ce3c31f59769e327328f2f5b97e9e6330
694
py
Python
client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetExperimentRunByNameResponse.py
stefan-petrov-toptal/modeldb
a8a9b9da6ed964c91351230b2f0d2703c75794de
[ "Apache-2.0" ]
835
2017-02-08T20:14:24.000Z
2020-03-12T17:37:49.000Z
client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetExperimentRunByNameResponse.py
stefan-petrov-toptal/modeldb
a8a9b9da6ed964c91351230b2f0d2703c75794de
[ "Apache-2.0" ]
651
2019-04-18T12:55:07.000Z
2022-03-31T23:45:09.000Z
client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetExperimentRunByNameResponse.py
stefan-petrov-toptal/modeldb
a8a9b9da6ed964c91351230b2f0d2703c75794de
[ "Apache-2.0" ]
170
2017-02-13T14:49:22.000Z
2020-02-19T17:59:12.000Z
# THIS FILE IS AUTO-GENERATED. DO NOT EDIT from verta._swagger.base_type import BaseType class ModeldbGetExperimentRunByNameResponse(BaseType): def __init__(self, experiment_run=None): required = { "experiment_run": False, } self.experiment_run = experiment_run for k, v in required.items(): ...
27.76
63
0.716138
from verta._swagger.base_type import BaseType class ModeldbGetExperimentRunByNameResponse(BaseType): def __init__(self, experiment_run=None): required = { "experiment_run": False, } self.experiment_run = experiment_run for k, v in required.items(): if self[k] is None and v: raise...
true
true
f77a6109f19061132e6adb2d9ac4d35d81db918a
13,647
py
Python
tests/test_views.py
sflems/django-rest-friendship
c096372e65b1282859ccfb0db2b7d1058631ffa0
[ "ISC" ]
1
2022-01-26T05:46:21.000Z
2022-01-26T05:46:21.000Z
tests/test_views.py
sflems/django-rest-friendship
c096372e65b1282859ccfb0db2b7d1058631ffa0
[ "ISC" ]
null
null
null
tests/test_views.py
sflems/django-rest-friendship
c096372e65b1282859ccfb0db2b7d1058631ffa0
[ "ISC" ]
null
null
null
import pytest from rest_framework.test import APIClient from friendship.models import Friend, FriendshipRequest from .factories import UserFactory, User # from tests.serializers import UserTestSerializer # Add tests for serializers and settings import. @pytest.mark.django_db(transaction=True) def test_create_friend_r...
27.348697
89
0.670477
import pytest from rest_framework.test import APIClient from friendship.models import Friend, FriendshipRequest from .factories import UserFactory, User @pytest.mark.django_db(transaction=True) def test_create_friend_request_without_message(): user1 = UserFactory() user2 = UserFactory() client = API...
true
true
f77a611af61e4a1430bfb855ccb5f49f7b69cc20
6,602
py
Python
arc/settings.py
amarkpayne/ARC
fcc3bc0050f50a81c02192f72aaa31ea47d29818
[ "MIT" ]
null
null
null
arc/settings.py
amarkpayne/ARC
fcc3bc0050f50a81c02192f72aaa31ea47d29818
[ "MIT" ]
null
null
null
arc/settings.py
amarkpayne/ARC
fcc3bc0050f50a81c02192f72aaa31ea47d29818
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # encoding: utf-8 """ ARC's settings """ import os import string ################################################################## # If ARC communication with remote servers is desired, complete the following server dictionary. # Instructions for RSA key generation can be found here: # https...
44.013333
158
0.57422
import os import string servers = { 'server1': { 'cluster_soft': 'OGE', 'address': 'server1.host.edu', 'un': '<username>', 'key': 'path_to_rsa_key', }, 'server2': { 'cluster_soft': 'Slurm', 'address': 'server2.host.edu', 'un': '<username>', ...
true
true
f77a61c0bbaf3f9664954d4c13fafb0a6d07c847
6,619
py
Python
infosec/crypto/hash-length-extension/Parlour-PlaidCTF-2014_exploit.py
sweetporkbones/scratchpad
e5865c5cdec78f7a66d032c77919848773c991fb
[ "BSD-2-Clause" ]
9
2016-03-26T13:00:34.000Z
2021-12-09T05:29:06.000Z
infosec/crypto/hash-length-extension/Parlour-PlaidCTF-2014_exploit.py
sweetporkbones/scratchpad
e5865c5cdec78f7a66d032c77919848773c991fb
[ "BSD-2-Clause" ]
null
null
null
infosec/crypto/hash-length-extension/Parlour-PlaidCTF-2014_exploit.py
sweetporkbones/scratchpad
e5865c5cdec78f7a66d032c77919848773c991fb
[ "BSD-2-Clause" ]
4
2017-04-06T22:03:42.000Z
2020-07-06T20:44:10.000Z
#!/usr/bin/env python2 """ = Hash length extension attacks == Challenge === Challenge facts Must have 0 result = int(md5(self.nonce + self.user_nonces[-1]).hexdigest(),16)&((2<<(self.odds-1))-1) * Faut que le hash & odds == 0 * odds donne `2**input - 1` * nonce is 16 bytes * user_nonce max length 1024 * large...
31.075117
101
0.65871
from binascii import unhexlify from pwn import * import re import sys from pymd5 import _decode, _encode, md5, md5_compress, padding def set_odds(value): r.sendline('1') r.recvuntil(": ") r.sendline(str(value)) r.recvrepeat(0.2) def set_bet(value): r.sendline('2') r.recvuntil(": ") p...
true
true
f77a6356bda0cabc6f2f451b3e476859d324227f
5,119
py
Python
linked_list/positionalList.py
uoshvis/py-data-structures-and-algorithms
5baf8e8701eb69391baadeb05dd20644ea02a587
[ "MIT" ]
null
null
null
linked_list/positionalList.py
uoshvis/py-data-structures-and-algorithms
5baf8e8701eb69391baadeb05dd20644ea02a587
[ "MIT" ]
null
null
null
linked_list/positionalList.py
uoshvis/py-data-structures-and-algorithms
5baf8e8701eb69391baadeb05dd20644ea02a587
[ "MIT" ]
null
null
null
class _DoublyLinkedBase: class _Node: __slots__ = '_element', '_prev', '_next' def __init__(self, element, prev, next): self._element = element self._prev = prev self._next = next def __init__(self): self._header = self._Node(None, None, None) ...
31.598765
85
0.563391
class _DoublyLinkedBase: class _Node: __slots__ = '_element', '_prev', '_next' def __init__(self, element, prev, next): self._element = element self._prev = prev self._next = next def __init__(self): self._header = self._Node(None, None, None) ...
true
true
f77a63bbe4b0cf0a57ade9c33205cd731f0f8210
2,599
py
Python
python/akg/ops/math/floor.py
KnowingNothing/akg-test
114d8626b824b9a31af50a482afc07ab7121862b
[ "Apache-2.0" ]
1
2020-08-31T02:43:43.000Z
2020-08-31T02:43:43.000Z
python/akg/ops/math/floor.py
KnowingNothing/akg-test
114d8626b824b9a31af50a482afc07ab7121862b
[ "Apache-2.0" ]
null
null
null
python/akg/ops/math/floor.py
KnowingNothing/akg-test
114d8626b824b9a31af50a482afc07ab7121862b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 # Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
37.666667
80
0.639861
from akg import tvm import akg from akg.utils import validation_check as vc_util from akg.utils import kernel_exec as utils @vc_util.check_input_type(akg.tvm.tensor.Tensor) def floor(data): vc_util.ops_dtype_check(data.dtype, vc_util.DtypeForDavinci.ALL_FLOAT) shape = [x.value for x in data.shape] vc_uti...
true
true
f77a6501f2487cc2d9fff3cb16859608301cff8b
6,398
py
Python
rest_framework_json_api/parsers.py
jimbofreedman/django-rest-framework-json-api
aa5d4478aff21a853a81ffff7124ea608d655118
[ "BSD-2-Clause" ]
null
null
null
rest_framework_json_api/parsers.py
jimbofreedman/django-rest-framework-json-api
aa5d4478aff21a853a81ffff7124ea608d655118
[ "BSD-2-Clause" ]
null
null
null
rest_framework_json_api/parsers.py
jimbofreedman/django-rest-framework-json-api
aa5d4478aff21a853a81ffff7124ea608d655118
[ "BSD-2-Clause" ]
null
null
null
""" Parsers """ from rest_framework import parsers from rest_framework.exceptions import ParseError from rest_framework_json_api import exceptions, renderers from rest_framework_json_api.utils import get_resource_name, undo_format_field_names class JSONParser(parsers.JSONParser): """ Similar to `JSONRenderer...
37.857988
97
0.559706
from rest_framework import parsers from rest_framework.exceptions import ParseError from rest_framework_json_api import exceptions, renderers from rest_framework_json_api.utils import get_resource_name, undo_format_field_names class JSONParser(parsers.JSONParser): media_type = "application/vnd.api+json" ren...
true
true
f77a66820b21edd9501c8c5123c24f15c99eccef
2,542
py
Python
smarts/core/provider.py
jerryzhao173985/SMARTS
c8473049b4b52ad3eb29f7c7eb93753c2d70df55
[ "MIT" ]
null
null
null
smarts/core/provider.py
jerryzhao173985/SMARTS
c8473049b4b52ad3eb29f7c7eb93753c2d70df55
[ "MIT" ]
null
null
null
smarts/core/provider.py
jerryzhao173985/SMARTS
c8473049b4b52ad3eb29f7c7eb93753c2d70df55
[ "MIT" ]
null
null
null
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to us...
36.84058
79
0.731707
from dataclasses import dataclass, field from typing import List import numpy as np from .coordinates import BoundingBox, Pose from .vehicle import VehicleState @dataclass class ProviderTrafficLight: lane_in: str lane_via: str lane_out: str state: str @dataclass class ProviderTLS: tls_id: str ...
true
true
f77a66a64050fa18d1525369f92f075d137797ea
8,145
py
Python
pyxelate/universe.py
eddddddy/Pyxelate
9c7656c35fc8fda497fa496b6758c395716507aa
[ "MIT" ]
null
null
null
pyxelate/universe.py
eddddddy/Pyxelate
9c7656c35fc8fda497fa496b6758c395716507aa
[ "MIT" ]
null
null
null
pyxelate/universe.py
eddddddy/Pyxelate
9c7656c35fc8fda497fa496b6758c395716507aa
[ "MIT" ]
null
null
null
from copy import copy from typing import List, Tuple, Union, Iterator, Iterable import numpy as np class Size: def __init__(self, size: Union[int, None]): """ Create a Size object with the given size. If the size passed in is None, then it is treated as infinite :param size: ...
38.601896
131
0.589319
from copy import copy from typing import List, Tuple, Union, Iterator, Iterable import numpy as np class Size: def __init__(self, size: Union[int, None]): self.size = size def is_infinite(self) -> bool: return self.size is None class Rule: def __init__(self, window: np.ndarray, cente...
true
true
f77a66ab52be80125956c13c62dd4f978e729429
341
py
Python
sitecrashed/core/migrations/0003_auto_20200629_2102.py
gabrielloliveira/sitecrashed
7e15a93d45b87e129ea984015e0c8bd3c5da88ad
[ "MIT" ]
null
null
null
sitecrashed/core/migrations/0003_auto_20200629_2102.py
gabrielloliveira/sitecrashed
7e15a93d45b87e129ea984015e0c8bd3c5da88ad
[ "MIT" ]
4
2021-03-30T13:57:09.000Z
2021-09-22T19:20:51.000Z
sitecrashed/core/migrations/0003_auto_20200629_2102.py
gabrielloliveira/sitecrashed
7e15a93d45b87e129ea984015e0c8bd3c5da88ad
[ "MIT" ]
null
null
null
# Generated by Django 3.0.7 on 2020-06-30 00:02 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0002_site_owner'), ] operations = [ migrations.AlterModelOptions( name='event', options={'ordering': ('-created_at',...
18.944444
51
0.577713
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0002_site_owner'), ] operations = [ migrations.AlterModelOptions( name='event', options={'ordering': ('-created_at',)}, ), ]
true
true
f77a67314568d95fd93d41359c9690dd534bdb11
644
py
Python
spacy/lang/ro/examples.py
xraycat123/spaCy
386cec1979e430d1524f5f7beda93db1625ede8f
[ "MIT" ]
88
2018-05-06T17:28:23.000Z
2022-03-06T20:19:16.000Z
spacy/lang/ro/examples.py
xraycat123/spaCy
386cec1979e430d1524f5f7beda93db1625ede8f
[ "MIT" ]
12
2018-07-19T15:11:57.000Z
2021-08-05T11:58:29.000Z
spacy/lang/ro/examples.py
xraycat123/spaCy
386cec1979e430d1524f5f7beda93db1625ede8f
[ "MIT" ]
10
2018-07-28T22:43:04.000Z
2020-11-22T22:58:21.000Z
# coding: utf8 from __future__ import unicode_literals """ Example sentences to test spaCy and its language models. >>> from spacy.lang.ro import Romanian >>> from spacy.lang.ro.examples import sentences >>> nlp = Romanian() >>> docs = nlp.pipe(sentences) """ sentences = [ "Apple plănuiește să cumpere o compan...
26.833333
95
0.717391
from __future__ import unicode_literals sentences = [ "Apple plănuiește să cumpere o companie britanică pentru un miliard de dolari", "Municipalitatea din San Francisco ia în calcul interzicerea roboților curieri pe trotuar", "Londra este un oraș mare în Regatul Unit", "Unde ești?", "Cine este p...
true
true
f77a683cab8f19b1ee2bc111dcadda288e7a8ae8
340
py
Python
Python3/0532-K-diff-Pairs-in-an-Array/soln-1.py
wyaadarsh/LeetCode-Solutions
3719f5cb059eefd66b83eb8ae990652f4b7fd124
[ "MIT" ]
5
2020-07-24T17:48:59.000Z
2020-12-21T05:56:00.000Z
Python3/0532-K-diff-Pairs-in-an-Array/soln-1.py
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
null
null
null
Python3/0532-K-diff-Pairs-in-an-Array/soln-1.py
zhangyaqi1989/LeetCode-Solutions
2655a1ffc8678ad1de6c24295071308a18c5dc6e
[ "MIT" ]
2
2020-07-24T17:49:01.000Z
2020-08-31T19:57:35.000Z
class Solution: def findPairs(self, nums: List[int], k: int) -> int: if k < 0: return 0 counter = collections.Counter(nums) cnt = 0 for num in counter: if (k != 0 and counter[num] and counter[num + k]) or (k == 0 and counter[num] > 1): cnt += 1...
30.909091
95
0.494118
class Solution: def findPairs(self, nums: List[int], k: int) -> int: if k < 0: return 0 counter = collections.Counter(nums) cnt = 0 for num in counter: if (k != 0 and counter[num] and counter[num + k]) or (k == 0 and counter[num] > 1): cnt += 1...
true
true
f77a68ecedf74bc5192fbc475848f6b1a1234315
3,138
py
Python
youtube_dl/extractor/cracked.py
hackarada/youtube-dl
2ba46715a41fe074eab2221170b2ac78fab93fad
[ "Unlicense" ]
66,635
2019-03-10T21:34:18.000Z
2022-03-31T23:50:31.000Z
youtube_dl/extractor/cracked.py
hackarada/youtube-dl
2ba46715a41fe074eab2221170b2ac78fab93fad
[ "Unlicense" ]
10,936
2019-03-10T21:35:47.000Z
2022-03-31T23:46:52.000Z
youtube_dl/extractor/cracked.py
hackarada/youtube-dl
2ba46715a41fe074eab2221170b2ac78fab93fad
[ "Unlicense" ]
15,194
2019-03-10T21:09:27.000Z
2022-03-31T22:13:49.000Z
from __future__ import unicode_literals import re from .common import InfoExtractor from .youtube import YoutubeIE from ..utils import ( parse_iso8601, str_to_int, ) class CrackedIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?cracked\.com/video_(?P<id>\d+)_[\da-z-]+\.html' _TESTS = [{ ...
34.483516
111
0.546526
from __future__ import unicode_literals import re from .common import InfoExtractor from .youtube import YoutubeIE from ..utils import ( parse_iso8601, str_to_int, ) class CrackedIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?cracked\.com/video_(?P<id>\d+)_[\da-z-]+\.html' _TESTS = [{ ...
true
true
f77a69c2e5e6fba5c3c11d59daf8949f1ec58fb4
1,259
py
Python
setup.py
tethysapp/Water-Data-Explorer
42d64fd081a217abd99ae38f60a23360faa4b535
[ "BSD-3-Clause" ]
null
null
null
setup.py
tethysapp/Water-Data-Explorer
42d64fd081a217abd99ae38f60a23360faa4b535
[ "BSD-3-Clause" ]
null
null
null
setup.py
tethysapp/Water-Data-Explorer
42d64fd081a217abd99ae38f60a23360faa4b535
[ "BSD-3-Clause" ]
null
null
null
from setuptools import setup, find_namespace_packages from setup_helper import find_resource_files # -- Apps Definition -- # app_package = 'water_data_explorer' release_package = 'tethysapp-' + app_package # -- Python Dependencies -- # dependencies = [] # -- Get Resource File -- # resource_files = find_resource_file...
37.029412
109
0.731533
from setuptools import setup, find_namespace_packages from setup_helper import find_resource_files app_package = 'water_data_explorer' release_package = 'tethysapp-' + app_package dependencies = [] resource_files = find_resource_files('tethysapp/' + app_package + '/templates', 'tethysapp/' + app_package) resource_fi...
true
true
f77a6a10c8c829ccb6ec70301b9391b50e70521f
545
py
Python
src/medius/rtpackets/servertokenmessage.py
Metroynome/robo
78c389decce98d0d1e4e4e02ccbfcba7b465209c
[ "MIT" ]
8
2021-07-14T16:55:04.000Z
2022-03-07T22:03:03.000Z
src/medius/rtpackets/servertokenmessage.py
Metroynome/robo
78c389decce98d0d1e4e4e02ccbfcba7b465209c
[ "MIT" ]
22
2021-07-13T02:17:00.000Z
2022-02-13T03:26:52.000Z
src/medius/rtpackets/servertokenmessage.py
Metroynome/robo
78c389decce98d0d1e4e4e02ccbfcba7b465209c
[ "MIT" ]
5
2021-07-30T05:49:09.000Z
2022-02-14T18:02:07.000Z
from utils import utils class ServerTokenMessageSerializer: data_dict = [ {'name': 'rtid', 'n_bytes': 1, 'cast': None}, {'name': 'len', 'n_bytes': 2, 'cast': utils.bytes_to_int_little} ] def serialize(self, data: bytes): raise Exception('Unimplemented Handler: ServerTokenMessageSe...
30.277778
78
0.691743
from utils import utils class ServerTokenMessageSerializer: data_dict = [ {'name': 'rtid', 'n_bytes': 1, 'cast': None}, {'name': 'len', 'n_bytes': 2, 'cast': utils.bytes_to_int_little} ] def serialize(self, data: bytes): raise Exception('Unimplemented Handler: ServerTokenMessageSe...
true
true
f77a6a1b03c86a08edba9df383fdc716381e1718
11,313
py
Python
letshelp-certbot/letshelp_certbot/apache.py
mabayhan/certbot
2d3159848448e47ccae438e8bc35a0257762549c
[ "Apache-2.0" ]
1
2019-01-20T08:17:47.000Z
2019-01-20T08:17:47.000Z
letshelp-certbot/letshelp_certbot/apache.py
mabayhan/certbot
2d3159848448e47ccae438e8bc35a0257762549c
[ "Apache-2.0" ]
null
null
null
letshelp-certbot/letshelp_certbot/apache.py
mabayhan/certbot
2d3159848448e47ccae438e8bc35a0257762549c
[ "Apache-2.0" ]
1
2020-04-09T18:24:51.000Z
2020-04-09T18:24:51.000Z
#!/usr/bin/env python """Certbot Apache configuration submission script""" from __future__ import print_function import argparse import atexit import os import re import shutil import subprocess import sys import tarfile import tempfile import textwrap import six _DESCRIPTION = """ Let's Help is a simple script you...
36.259615
79
0.629188
from __future__ import print_function import argparse import atexit import os import re import shutil import subprocess import sys import tarfile import tempfile import textwrap import six _DESCRIPTION = """ Let's Help is a simple script you can run to help out the Certbot project. Since Certbot will support automa...
true
true
f77a6a4b222b7acd433e0ec988ee94d1e816bcf0
397
py
Python
ticketdesk/ticketdesk/wsgi.py
baz1nga/help-desk
a968de2293af803f69afdb3b4ed45dfdfd0f4011
[ "MIT" ]
null
null
null
ticketdesk/ticketdesk/wsgi.py
baz1nga/help-desk
a968de2293af803f69afdb3b4ed45dfdfd0f4011
[ "MIT" ]
5
2021-04-08T20:27:54.000Z
2021-12-13T20:24:27.000Z
ticketdesk/ticketdesk/wsgi.py
baz1nga/help-desk
a968de2293af803f69afdb3b4ed45dfdfd0f4011
[ "MIT" ]
null
null
null
""" WSGI config for ticketdesk project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SE...
23.352941
78
0.788413
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'ticketdesk.settings') application = get_wsgi_application()
true
true
f77a6a4d4bfab1b60d9513be64107aeacf4c7658
353
py
Python
tools/hexedit.py
mrT4ntr4/Stegall
b914cbe9a82530309be5ad8ea5a6a8651cf9b7a1
[ "MIT" ]
15
2019-02-22T10:01:37.000Z
2022-02-23T01:57:32.000Z
tools/hexedit.py
mrT4ntr4/Stegall
b914cbe9a82530309be5ad8ea5a6a8651cf9b7a1
[ "MIT" ]
null
null
null
tools/hexedit.py
mrT4ntr4/Stegall
b914cbe9a82530309be5ad8ea5a6a8651cf9b7a1
[ "MIT" ]
6
2019-02-22T08:26:14.000Z
2021-08-02T03:48:32.000Z
#!/usr/bin/python import subprocess as sb import sys import os import stegall as stg prog = 'hexcurse' def launch(arg2): if os.path.isfile(arg2): os.system(prog +' ' +arg2) else: stg.io_error() exit() def hedit(arg2): try : launch(arg2) except OSError as e: if e.errno == os.errno.ENOENT: stg.p...
14.12
32
0.668555
import subprocess as sb import sys import os import stegall as stg prog = 'hexcurse' def launch(arg2): if os.path.isfile(arg2): os.system(prog +' ' +arg2) else: stg.io_error() exit() def hedit(arg2): try : launch(arg2) except OSError as e: if e.errno == os.errno.ENOENT: stg.prog_install(prog) ...
true
true
f77a6b63863a8898f813b991a67e271f8b80fe83
7,549
py
Python
kedro/io/hdf_dataset.py
PedroAbreuQB/kedro
a38552a0266d4ad7b823f1640e98aefa6175fd33
[ "Apache-2.0" ]
null
null
null
kedro/io/hdf_dataset.py
PedroAbreuQB/kedro
a38552a0266d4ad7b823f1640e98aefa6175fd33
[ "Apache-2.0" ]
null
null
null
kedro/io/hdf_dataset.py
PedroAbreuQB/kedro
a38552a0266d4ad7b823f1640e98aefa6175fd33
[ "Apache-2.0" ]
null
null
null
# Copyright 2018-2019 QuantumBlack Visual Analytics Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # THE SOFTWARE IS PROVIDED "AS IS"...
38.319797
91
0.637303
from copy import deepcopy from pathlib import PurePosixPath from typing import Any, Dict import fsspec import pandas as pd from kedro.io.core import ( AbstractVersionedDataSet, DataSetError, Version, get_filepath_str, get_protocol_and_path, ) HDFSTORE_DRIVER = "H5FD_CORE" class HDFDataSet(Abst...
true
true
f77a6bd5b1ad50a4c6bb06936e415ae9af295dd1
2,667
py
Python
venv/Lib/site-packages/pandas/io/excel/_pyxlsb.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
603
2020-12-23T13:49:32.000Z
2022-03-31T23:38:03.000Z
venv/Lib/site-packages/pandas/io/excel/_pyxlsb.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
387
2020-12-15T14:54:04.000Z
2022-03-31T07:00:21.000Z
venv/Lib/site-packages/pandas/io/excel/_pyxlsb.py
EkremBayar/bayar
aad1a32044da671d0b4f11908416044753360b39
[ "MIT" ]
35
2021-03-26T03:12:04.000Z
2022-03-23T10:15:10.000Z
from typing import List from pandas._typing import FilePathOrBuffer, Scalar, StorageOptions from pandas.compat._optional import import_optional_dependency from pandas.io.excel._base import BaseExcelReader class PyxlsbReader(BaseExcelReader): def __init__( self, filepath_or_buffer: FilePathOrBuff...
34.192308
86
0.655418
from typing import List from pandas._typing import FilePathOrBuffer, Scalar, StorageOptions from pandas.compat._optional import import_optional_dependency from pandas.io.excel._base import BaseExcelReader class PyxlsbReader(BaseExcelReader): def __init__( self, filepath_or_buffer: FilePathOrBuff...
true
true
f77a6c357c69517e657f239fd13051ba88832336
1,113
py
Python
tests/s3/test_s3_bucket_object_finder.py
BigNerd/justmltools
97133380f2675596fdd9c87d9bc570ccd5fc20b9
[ "MIT" ]
null
null
null
tests/s3/test_s3_bucket_object_finder.py
BigNerd/justmltools
97133380f2675596fdd9c87d9bc570ccd5fc20b9
[ "MIT" ]
3
2021-09-17T06:42:03.000Z
2021-09-17T06:42:04.000Z
tests/s3/test_s3_bucket_object_finder.py
BigNerd/justmltools
97133380f2675596fdd9c87d9bc570ccd5fc20b9
[ "MIT" ]
1
2020-06-24T15:17:59.000Z
2020-06-24T15:17:59.000Z
from unittest import TestCase from unittest.mock import MagicMock, patch class TestS3BucketObjectFinder(TestCase): @patch('boto3.client') @patch('justmltools.s3.aws_credentials.AwsCredentials', autospec=True) def test_get_matching_s3_objects( self, aws_credentials_mock: MagicMock, ...
34.78125
79
0.71788
from unittest import TestCase from unittest.mock import MagicMock, patch class TestS3BucketObjectFinder(TestCase): @patch('boto3.client') @patch('justmltools.s3.aws_credentials.AwsCredentials', autospec=True) def test_get_matching_s3_objects( self, aws_credentials_mock: MagicMock, ...
true
true
f77a6c4c7b2b747498f4c80250663d6bab0b8088
50,721
py
Python
venv/lib/python3.8/site-packages/docplex/cp/solver/solver.py
OscarJHernandez/qc_portfolio_optimization
30f0e27689ad6bf37fb87880c2813a5b9858608d
[ "Apache-2.0" ]
15
2020-06-29T08:33:39.000Z
2022-02-12T00:28:51.000Z
venv/lib/python3.8/site-packages/docplex/cp/solver/solver.py
OscarJHernandez/qc_mentorship_project
30f0e27689ad6bf37fb87880c2813a5b9858608d
[ "Apache-2.0" ]
4
2020-11-27T09:34:13.000Z
2021-04-30T21:13:41.000Z
venv/lib/python3.8/site-packages/docplex/cp/solver/solver.py
OscarJHernandez/qc_mentorship_project
30f0e27689ad6bf37fb87880c2813a5b9858608d
[ "Apache-2.0" ]
11
2020-06-29T08:40:24.000Z
2022-02-24T17:39:16.000Z
# -------------------------------------------------------------------------- # Source file provided under Apache License, Version 2.0, January 2004, # http://www.apache.org/licenses/ # (c) Copyright IBM Corp. 2015, 2016, 2017, 2018 # -------------------------------------------------------------------------- # Author: O...
38.366868
143
0.624219
import docplex.cp.config as config from docplex.cp.cpo.cpo_compiler import CpoCompiler from docplex.cp.solution import * from docplex.cp.solver.solver_listener import CpoSolverListener from docplex.cp.solver.cpo_callback import CpoCallback import time, importlib, inspect import threading import time import traceback...
true
true
f77a6d4f8f54f52621edb90d38a9197d39a2075b
1,450
py
Python
release/stubs.min/Autodesk/Revit/DB/__init___parts/ElementIntersectsElementFilter.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/Autodesk/Revit/DB/__init___parts/ElementIntersectsElementFilter.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
release/stubs.min/Autodesk/Revit/DB/__init___parts/ElementIntersectsElementFilter.py
YKato521/ironpython-stubs
b1f7c580de48528490b3ee5791b04898be95a9ae
[ "MIT" ]
null
null
null
class ElementIntersectsElementFilter(ElementIntersectsFilter, IDisposable): """ A filter to find elements that intersect the solid geometry of a given element. ElementIntersectsElementFilter(element: Element,inverted: bool) ElementIntersectsElementFilter(element: Element) """ def Dispose(se...
27.884615
221
0.64069
class ElementIntersectsElementFilter(ElementIntersectsFilter, IDisposable): def Dispose(self): pass def GetElement(self): pass def ReleaseUnmanagedResources(self, *args): pass def __enter__(self, *args): pass def __exit__(self, *args): pass...
true
true
f77a6eeb33fffab7901648b6ff146ea822c6e007
1,007
py
Python
geoloc_data/urls.py
Fritzip/splitted-nz
405089440350c4808144d5ed711606513efcdefb
[ "Apache-2.0" ]
null
null
null
geoloc_data/urls.py
Fritzip/splitted-nz
405089440350c4808144d5ed711606513efcdefb
[ "Apache-2.0" ]
3
2019-11-16T08:10:48.000Z
2020-03-14T23:14:41.000Z
geoloc_data/urls.py
Fritzip/splitted-nz
405089440350c4808144d5ed711606513efcdefb
[ "Apache-2.0" ]
null
null
null
from django.conf.urls import url from django.urls import path from django.views.generic import TemplateView from . import views from .models import GPXTrack app_name = 'geoloc_data' urlpatterns = [ # city detail view #url(r'^city/(?P<pk>[0-9]+)$', views.SpotsDetailView.as_view(), name='city-detail'), # u...
43.782609
184
0.706058
from django.conf.urls import url from django.urls import path from django.views.generic import TemplateView from . import views from .models import GPXTrack app_name = 'geoloc_data' urlpatterns = [ path('map/', TemplateView.as_view(template_name='geoloc_data/map.html'), name='map'), path('<s...
true
true
f77a6f98954e9da69ef7aab164761a6defbd7309
202,319
py
Python
pysnmp/ENGENIUS-MESH-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
11
2021-02-02T16:27:16.000Z
2021-08-31T06:22:49.000Z
pysnmp/ENGENIUS-MESH-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
75
2021-02-24T17:30:31.000Z
2021-12-08T00:01:18.000Z
pysnmp/ENGENIUS-MESH-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module ENGENIUS-MESH-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/ENGENIUS-MESH-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 18:48:33 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Ma...
140.110111
10,621
0.767041
ObjectIdentifier, Integer, OctetString = mibBuilder.importSymbols("ASN1", "ObjectIdentifier", "Integer", "OctetString") NamedValues, = mibBuilder.importSymbols("ASN1-ENUMERATION", "NamedValues") SingleValueConstraint, ValueRangeConstraint, ConstraintsIntersection, ValueSizeConstraint, ConstraintsUnion = mibBuilder.impo...
true
true
f77a71a9d2e4760e8ea08300e8bda9c2eaa5ea28
5,720
py
Python
plugin/plugins/sharepoint_2013/src/plugin/threshold.py
crazy-canux/xPlugin_Monitoring
4a66d26f9d2982609489eaa0f57d6afb16aca37c
[ "Apache-2.0" ]
2
2015-12-17T04:00:30.000Z
2015-12-22T11:49:01.000Z
plugin/plugins/sharepoint_2013/src/plugin/threshold.py
crazy-canux/xPlugin_Monitoring
4a66d26f9d2982609489eaa0f57d6afb16aca37c
[ "Apache-2.0" ]
null
null
null
plugin/plugins/sharepoint_2013/src/plugin/threshold.py
crazy-canux/xPlugin_Monitoring
4a66d26f9d2982609489eaa0f57d6afb16aca37c
[ "Apache-2.0" ]
1
2017-02-20T22:57:17.000Z
2017-02-20T22:57:17.000Z
# -*- coding: utf-8 -*- # Copyright (C) Canux CHENG <canuxcheng@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without limitation # the rights to ...
40.567376
94
0.547028
import logging from monitoring.nagios.plugin import argument from .base import PluginBase import re from decimal import Decimal, localcontext logger = logging.getLogger('plugin.threshold') class PluginXMLThreshold(PluginBase): def main(self): xml = self.fetch_xml_table() pattern = re.compil...
true
true
f77a71e11ef27ef6e8613d5e735b2c033a844dc8
592
py
Python
data/multicols/ligand.py
smoitra87/mrfs
49c1de4f98b655cc296bf9c3a9b0e99e1e721056
[ "Apache-2.0" ]
null
null
null
data/multicols/ligand.py
smoitra87/mrfs
49c1de4f98b655cc296bf9c3a9b0e99e1e721056
[ "Apache-2.0" ]
null
null
null
data/multicols/ligand.py
smoitra87/mrfs
49c1de4f98b655cc296bf9c3a9b0e99e1e721056
[ "Apache-2.0" ]
null
null
null
from pymol import cmd def ligandNeighbors(prot, chain, ligand): print ligand # set some string names for temporary objects/selections tmpObj = cmd.get_unused_name("_tmp") tmpObj2 = cmd.get_unused_name("_bla") # operate on a new object & turn off the original sel = "{} and chain {}".format(prot...
26.909091
83
0.662162
from pymol import cmd def ligandNeighbors(prot, chain, ligand): print ligand tmpObj = cmd.get_unused_name("_tmp") tmpObj2 = cmd.get_unused_name("_bla") sel = "{} and chain {}".format(prot, chain) cmd.create(tmpObj, sel) cmd.disable(sel) cmd.select(tmpObj2, "( resn {} around 10 ) a...
false
true
f77a723277ceacca8c482feabc513be138aeef2e
3,916
py
Python
firmware/audio_agc.py
mfkiwl/OpenXcvr
9bea6efd03cd246f16982f0fadafed684ac5ce1c
[ "MIT" ]
14
2020-02-16T15:36:31.000Z
2022-03-27T02:24:40.000Z
firmware/audio_agc.py
mfkiwl/OpenXcvr
9bea6efd03cd246f16982f0fadafed684ac5ce1c
[ "MIT" ]
1
2020-11-23T16:16:33.000Z
2020-11-23T16:16:33.000Z
firmware/audio_agc.py
mfkiwl/OpenXcvr
9bea6efd03cd246f16982f0fadafed684ac5ce1c
[ "MIT" ]
4
2021-03-29T16:55:03.000Z
2022-01-23T16:43:59.000Z
from baremetal import * from math import log, pi from matplotlib import pyplot as plt import numpy as np import sys from math import log, ceil from settings import Settings from measure_magnitude import measure_magnitude from calculate_gain import calculate_gain from slow_barrel_shifter import slow_barrel_shifter def...
32.907563
110
0.623085
from baremetal import * from math import log, pi from matplotlib import pyplot as plt import numpy as np import sys from math import log, ceil from settings import Settings from measure_magnitude import measure_magnitude from calculate_gain import calculate_gain from slow_barrel_shifter import slow_barrel_shifter def...
true
true
f77a725bf32e3bffa6aec5f6a14fedfda9cb922a
849
py
Python
tests/form_tests.py
dizzydes/incubator-superset
5f09fddf3de72736c58be0b01184df223a6f8cf7
[ "Apache-2.0" ]
null
null
null
tests/form_tests.py
dizzydes/incubator-superset
5f09fddf3de72736c58be0b01184df223a6f8cf7
[ "Apache-2.0" ]
1
2020-05-11T13:50:12.000Z
2020-05-11T13:50:12.000Z
tests/form_tests.py
dizzydes/incubator-superset
5f09fddf3de72736c58be0b01184df223a6f8cf7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from wtforms.form import Form from superset.forms import ( CommaSeparatedListField, filter_not_empty_values) from tests.base_tests import SupersetTestCase class FormTestCase(SupersetTestCase): def test_comma_separated_list_field(self): field = CommaSeparatedListField().bind(F...
35.375
77
0.702002
from wtforms.form import Form from superset.forms import ( CommaSeparatedListField, filter_not_empty_values) from tests.base_tests import SupersetTestCase class FormTestCase(SupersetTestCase): def test_comma_separated_list_field(self): field = CommaSeparatedListField().bind(Form(), 'foo') fi...
true
true
f77a73da0ac6e5b36f98fcd9cf966daa525a622c
7,559
py
Python
sintel/resources/datarun.py
signals-dev/sintel
e1b296d356854323d4582c074fa90c25adfd6573
[ "MIT" ]
2
2020-11-13T05:52:56.000Z
2021-05-04T07:29:43.000Z
sintel/resources/datarun.py
signals-dev/sintel
e1b296d356854323d4582c074fa90c25adfd6573
[ "MIT" ]
null
null
null
sintel/resources/datarun.py
signals-dev/sintel
e1b296d356854323d4582c074fa90c25adfd6573
[ "MIT" ]
null
null
null
import logging from bson import ObjectId from flask_restful import Resource, reqparse from sintel.db import DBExplorer, schema from sintel.resources.auth_utils import requires_auth from sintel.resources.computing.utils.layout import tsne from sintel.resources.experiment import validate_experiment_id LOGGER = logging...
30.35743
83
0.58394
import logging from bson import ObjectId from flask_restful import Resource, reqparse from sintel.db import DBExplorer, schema from sintel.resources.auth_utils import requires_auth from sintel.resources.computing.utils.layout import tsne from sintel.resources.experiment import validate_experiment_id LOGGER = logging...
true
true
f77a74006e71056fde81832dd90b067b17750e92
6,833
py
Python
tests/components/deconz/test_services.py
lkollar/home-assistant
f4f7c25f744c0678b12acb2cc905894cca9f46ef
[ "Apache-2.0" ]
2
2017-08-29T15:40:44.000Z
2017-08-30T21:40:12.000Z
tests/components/deconz/test_services.py
lkollar/home-assistant
f4f7c25f744c0678b12acb2cc905894cca9f46ef
[ "Apache-2.0" ]
3
2021-09-08T03:25:06.000Z
2022-03-12T00:58:54.000Z
tests/components/deconz/test_services.py
lkollar/home-assistant
f4f7c25f744c0678b12acb2cc905894cca9f46ef
[ "Apache-2.0" ]
6
2019-12-01T19:06:52.000Z
2020-09-17T00:57:06.000Z
"""deCONZ service tests.""" from asynctest import Mock, patch import pytest import voluptuous as vol from homeassistant.components import deconz from homeassistant.components.deconz.const import CONF_BRIDGEID from .test_gateway import BRIDGEID, setup_deconz_integration GROUP = { "1": { "id": "Group 1 id...
34.165
87
0.66574
from asynctest import Mock, patch import pytest import voluptuous as vol from homeassistant.components import deconz from homeassistant.components.deconz.const import CONF_BRIDGEID from .test_gateway import BRIDGEID, setup_deconz_integration GROUP = { "1": { "id": "Group 1 id", "name": "Group 1 ...
true
true
f77a74d79c0e8324cc62760c64a6a48863aa43e2
2,221
py
Python
src/zenml/integrations/plotly/visualizers/pipeline_lineage_visualizer.py
LocalLegend517/zenml
0f9639a7a1014d893885263647bbe3b9b1a36d5f
[ "Apache-2.0" ]
1
2022-01-04T15:12:38.000Z
2022-01-04T15:12:38.000Z
src/zenml/integrations/plotly/visualizers/pipeline_lineage_visualizer.py
LocalLegend517/zenml
0f9639a7a1014d893885263647bbe3b9b1a36d5f
[ "Apache-2.0" ]
null
null
null
src/zenml/integrations/plotly/visualizers/pipeline_lineage_visualizer.py
LocalLegend517/zenml
0f9639a7a1014d893885263647bbe3b9b1a36d5f
[ "Apache-2.0" ]
null
null
null
# Copyright (c) ZenML GmbH 2021. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
31.728571
81
0.647456
from abc import abstractmethod from typing import Any import pandas as pd import plotly.express as px from plotly.graph_objs import Figure from zenml.logger import get_logger from zenml.post_execution import PipelineView from zenml.visualizers import BasePipelineVisualizer logger = get_logger(__name__) class Pip...
true
true
f77a75232a125a67faee14f658185e19aaae6eac
1,424
py
Python
patch/cosmos/scripts/kit_scripts/gen_app_config_files.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
75
2020-07-20T20:54:00.000Z
2022-03-09T09:18:37.000Z
patch/cosmos/scripts/kit_scripts/gen_app_config_files.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
3
2020-09-13T00:46:49.000Z
2021-07-06T16:18:22.000Z
patch/cosmos/scripts/kit_scripts/gen_app_config_files.py
cypher-me/HAS-Qualifier-Challenges
bb795303716155dad4a930880a58fecb5d9b50c5
[ "MIT" ]
14
2020-07-22T16:34:51.000Z
2021-09-13T12:19:59.000Z
#!/usr/bin/env python #======================================================================================== # File: gen_app_config_files.py # Author: Jose F Martinez/GSFC # Date: 2016-06-29 # # Modification History: # Date | Author | Description # --------------------------- # 06/29/16 | Jose F Martine...
30.956522
89
0.497191
import os, sys, app_utils, app_settings, app_setup import app_config_files app_settings.parse_configs() app_settings.print_configs() print "" # Call the module's init() to grab configuration values app_config_files.inits() app_setup.inits() g_Apps = [] g_Apps.extend(app_settings.get_apps()) for itm in g_Apps: ...
false
true
f77a7535f60a80da28ee0a729bb614e21a458f18
424
py
Python
setup.py
whiletruelearn/rrcf
6645d9fc1177912ee925588e1a50242cdb85b002
[ "MIT" ]
null
null
null
setup.py
whiletruelearn/rrcf
6645d9fc1177912ee925588e1a50242cdb85b002
[ "MIT" ]
null
null
null
setup.py
whiletruelearn/rrcf
6645d9fc1177912ee925588e1a50242cdb85b002
[ "MIT" ]
null
null
null
#!/usr/bin/env python from setuptools import setup setup(name='rrcf', version='0.4.1', description='Robust random cut forest for anomaly detection', author='Matt Bartos, Abhiram Mullapudi, Sara Troutman', author_email='mdbartos@umich.edu, abhiramm@umich.edu, stroutm@umich.edu', url='http...
26.5
79
0.634434
from setuptools import setup setup(name='rrcf', version='0.4.1', description='Robust random cut forest for anomaly detection', author='Matt Bartos, Abhiram Mullapudi, Sara Troutman', author_email='mdbartos@umich.edu, abhiramm@umich.edu, stroutm@umich.edu', url='http://open-storm.org', ...
true
true
f77a756e9aacbe4b663a8849fe7bab0e614521e0
2,823
py
Python
financialmodelingprep/calendars.py
Porter97/financialmodelingprep-python
fd1c14ac8ab36c34842dcc915c399ad4ed72ce2c
[ "MIT" ]
null
null
null
financialmodelingprep/calendars.py
Porter97/financialmodelingprep-python
fd1c14ac8ab36c34842dcc915c399ad4ed72ce2c
[ "MIT" ]
null
null
null
financialmodelingprep/calendars.py
Porter97/financialmodelingprep-python
fd1c14ac8ab36c34842dcc915c399ad4ed72ce2c
[ "MIT" ]
null
null
null
from financialmodelingprep.decorator import get_json_data BASE_URL = 'https://financialmodelingprep.com' class calendars(): BASE_URL = 'https://financialmodelingprep.com' API_KEY = '' def __init__(self, API_KEY): self.API = API_KEY @get_json_data def earning_calendar(self): ''' ...
38.148649
162
0.65108
from financialmodelingprep.decorator import get_json_data BASE_URL = 'https://financialmodelingprep.com' class calendars(): BASE_URL = 'https://financialmodelingprep.com' API_KEY = '' def __init__(self, API_KEY): self.API = API_KEY @get_json_data def earning_calendar(self): retur...
true
true
f77a7591457b8cfd18952860b179227e6dd6c334
822
py
Python
di/core/assignment/base.py
dlski/python-di
04dcdf58f3cf820e2d2ba5086e4e89822ae1f409
[ "MIT" ]
8
2021-02-05T16:17:31.000Z
2022-03-03T00:01:33.000Z
di/core/assignment/base.py
dlski/python-di
04dcdf58f3cf820e2d2ba5086e4e89822ae1f409
[ "MIT" ]
null
null
null
di/core/assignment/base.py
dlski/python-di
04dcdf58f3cf820e2d2ba5086e4e89822ae1f409
[ "MIT" ]
null
null
null
from dataclasses import dataclass from typing import Iterable, Optional, Sequence, Set from di.core.element import Dependency, Value class Matcher: def iterate(self, dependency: Dependency, values: Set[Value]) -> Iterable[Value]: raise NotImplementedError class ValuesMapper: def map(self, objects: ...
21.631579
85
0.733577
from dataclasses import dataclass from typing import Iterable, Optional, Sequence, Set from di.core.element import Dependency, Value class Matcher: def iterate(self, dependency: Dependency, values: Set[Value]) -> Iterable[Value]: raise NotImplementedError class ValuesMapper: def map(self, objects: ...
true
true
f77a775d1504163e019d66bec4e7dec0d2634f69
4,792
py
Python
models/encoder_layers.py
Pakleung/Mixup-TransUnet
d7d0ae264589cd46db8f5da1135e786f065c372d
[ "Unlicense" ]
null
null
null
models/encoder_layers.py
Pakleung/Mixup-TransUnet
d7d0ae264589cd46db8f5da1135e786f065c372d
[ "Unlicense" ]
null
null
null
models/encoder_layers.py
Pakleung/Mixup-TransUnet
d7d0ae264589cd46db8f5da1135e786f065c372d
[ "Unlicense" ]
null
null
null
import tensorflow as tf import tensorflow_addons as tfa tfk = tf.keras tfkl = tfk.layers tfm = tf.math class AddPositionEmbs(tfkl.Layer): """Adds (optionally learned) positional embeddings to the inputs.""" def __init__(self, trainable=True, **kwargs): super().__init__(trainable=trainable, **kwargs)...
34.724638
105
0.580968
import tensorflow as tf import tensorflow_addons as tfa tfk = tf.keras tfkl = tfk.layers tfm = tf.math class AddPositionEmbs(tfkl.Layer): def __init__(self, trainable=True, **kwargs): super().__init__(trainable=trainable, **kwargs) self.trainable = trainable def build(self, input_shape): ...
true
true
f77a777d480651c02ebfc96da38b97019c244d11
3,684
py
Python
makehuman-master/makehuman/plugins/9_export_bvh/__init__.py
Radiian-Arts-Main/Radiian-Arts-BioSource
51e08da0b3171fe96badc68780fd0f3381d49738
[ "MIT" ]
1
2022-03-12T03:52:55.000Z
2022-03-12T03:52:55.000Z
makehuman-master/makehuman/plugins/9_export_bvh/__init__.py
Phantori/Radiian-Arts-BioSource
51e08da0b3171fe96badc68780fd0f3381d49738
[ "MIT" ]
null
null
null
makehuman-master/makehuman/plugins/9_export_bvh/__init__.py
Phantori/Radiian-Arts-BioSource
51e08da0b3171fe96badc68780fd0f3381d49738
[ "MIT" ]
3
2020-05-10T16:11:23.000Z
2021-05-30T02:11:28.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ **Project Name:** MakeHuman **Product Home Page:** http://www.makehumancommunity.org/ **Github Code Home Page:** https://github.com/makehumancommunity/ **Authors:** Thomas Larsson, Jonas Hauquier **Copyright(c):** MakeHuman Team 2001-2019 *...
31.487179
90
0.62975
import bvh from export import Exporter, ExportConfig import log from core import G import os class BvhConfig(ExportConfig): def __init__(self): ExportConfig.__init__(self) self.useRelPaths = True class ExporterBVH(Exporter): def __init__(self): Exporter.__init__(self) sel...
true
true
f77a78457ba19f0d60a2b53134064361313483a3
661
py
Python
configs/distill_single/resnet50_resnext101_retinanet.py
duzhixing/mmdetection
839517cb98aa0d1926d9e1eb512d273c8905546a
[ "Apache-2.0" ]
null
null
null
configs/distill_single/resnet50_resnext101_retinanet.py
duzhixing/mmdetection
839517cb98aa0d1926d9e1eb512d273c8905546a
[ "Apache-2.0" ]
null
null
null
configs/distill_single/resnet50_resnext101_retinanet.py
duzhixing/mmdetection
839517cb98aa0d1926d9e1eb512d273c8905546a
[ "Apache-2.0" ]
null
null
null
_base_ = [ '../retinanet/retinanet_r50_fpn_2x_coco.py' ] model = dict( type='Distilling_Single', distill = dict( teacher_cfg='./configs/retinanet/retinanet_x101_64x4d_fpn_1x_coco.py', teacher_model_path='/lustre/S/duzhixing/workspace/model/retinanet_x101_64x4d_fpn_2x_coco_20200131-bca068ab...
21.322581
120
0.618759
_base_ = [ '../retinanet/retinanet_r50_fpn_2x_coco.py' ] model = dict( type='Distilling_Single', distill = dict( teacher_cfg='./configs/retinanet/retinanet_x101_64x4d_fpn_1x_coco.py', teacher_model_path='/lustre/S/duzhixing/workspace/model/retinanet_x101_64x4d_fpn_2x_coco_20200131-bca068ab...
true
true
f77a785b952580e708c6b49a3b60a2018f171da8
43,608
py
Python
subcmds/sync.py
dingzhengkai/android-tools-repo
e37aa5f331aa39776d5db1a1f816b66496f60e0c
[ "Apache-2.0" ]
1
2019-12-25T06:03:25.000Z
2019-12-25T06:03:25.000Z
subcmds/sync.py
dingzhengkai/android-tools-repo
e37aa5f331aa39776d5db1a1f816b66496f60e0c
[ "Apache-2.0" ]
null
null
null
subcmds/sync.py
dingzhengkai/android-tools-repo
e37aa5f331aa39776d5db1a1f816b66496f60e0c
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless re...
35.281553
95
0.630618
from __future__ import print_function import json import netrc from optparse import SUPPRESS_HELP import os import re import socket import subprocess import sys import tempfile import time from pyversion import is_python3 if is_python3(): import http.cookiejar as cookielib import urllib.error import urllib.pars...
true
true
f77a789ff1f844dc50401a9b86ea5559d9143c31
1,047
py
Python
example/agent.py
edu-ai/aivle-gym
ff7c67ed6c09d47338a0f8d42744648d14535838
[ "BSD-3-Clause" ]
null
null
null
example/agent.py
edu-ai/aivle-gym
ff7c67ed6c09d47338a0f8d42744648d14535838
[ "BSD-3-Clause" ]
null
null
null
example/agent.py
edu-ai/aivle-gym
ff7c67ed6c09d47338a0f8d42744648d14535838
[ "BSD-3-Clause" ]
null
null
null
import logging import time import gym from aivle_gym.agent_env import AgentEnv from judge import CartPoleEnvSerializer class CartPoleAgentEnv(AgentEnv): def __init__(self, port): base_env = gym.make("CartPole-v0") super().__init__( CartPoleEnvSerializer(), base_env.action...
24.928571
81
0.592168
import logging import time import gym from aivle_gym.agent_env import AgentEnv from judge import CartPoleEnvSerializer class CartPoleAgentEnv(AgentEnv): def __init__(self, port): base_env = gym.make("CartPole-v0") super().__init__( CartPoleEnvSerializer(), base_env.action...
true
true
f77a78b8c4c49dc90ae67aa7882618de00fa53c8
24,482
py
Python
pandas/tests/strings/test_strings.py
rainwoodman/pandas
671cf86a78e931a9c98ad72571ec65cd3c35d8a7
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/strings/test_strings.py
rainwoodman/pandas
671cf86a78e931a9c98ad72571ec65cd3c35d8a7
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
pandas/tests/strings/test_strings.py
rainwoodman/pandas
671cf86a78e931a9c98ad72571ec65cd3c35d8a7
[ "PSF-2.0", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "ECL-2.0", "BSD-3-Clause" ]
null
null
null
from datetime import ( datetime, timedelta, ) import numpy as np import pytest from pandas import ( DataFrame, Index, MultiIndex, Series, isna, ) import pandas._testing as tm def assert_series_or_index_equal(left, right): if isinstance(left, Series): tm.assert_series_equal(le...
33.814917
88
0.639163
from datetime import ( datetime, timedelta, ) import numpy as np import pytest from pandas import ( DataFrame, Index, MultiIndex, Series, isna, ) import pandas._testing as tm def assert_series_or_index_equal(left, right): if isinstance(left, Series): tm.assert_series_equal(le...
true
true
f77a7900433538891e5dde271fc0a4afe20423f2
6,094
py
Python
Python/pywarpx/PGroup.py
levinem/WarpX
c00a218cc25fdac80cd932ac8bf10fdb2cfc58d8
[ "BSD-3-Clause-LBNL" ]
null
null
null
Python/pywarpx/PGroup.py
levinem/WarpX
c00a218cc25fdac80cd932ac8bf10fdb2cfc58d8
[ "BSD-3-Clause-LBNL" ]
1
2020-01-23T21:54:51.000Z
2020-01-23T21:54:51.000Z
Python/pywarpx/PGroup.py
gtrichardson/WarpX
86f690e672578fb51e70493824026f3c372d5540
[ "BSD-3-Clause-LBNL" ]
null
null
null
import numpy as np from . import _libwarpx class PGroup(object): """Implements a class that has the same API as a warp ParticleGroup instance. """ def __init__(self, igroup, ispecie, level=0): self.igroup = igroup self.ispecie = ispecie self.level = level self.ns = 1 # Numb...
35.225434
124
0.630128
import numpy as np from . import _libwarpx class PGroup(object): def __init__(self, igroup, ispecie, level=0): self.igroup = igroup self.ispecie = ispecie self.level = level self.ns = 1 self.gallot() def name(self): return 'WarpXParticleGroup' def gallot(...
true
true
f77a79061209fa5dfd98028b2027ffe9a4b8dae9
299
py
Python
Service_Transcoding/example_celeryconfig.py
crim-ca/Service_Transcoding
30b293ae2e964de4d5a86a361008ef141f7b6433
[ "Apache-2.0" ]
null
null
null
Service_Transcoding/example_celeryconfig.py
crim-ca/Service_Transcoding
30b293ae2e964de4d5a86a361008ef141f7b6433
[ "Apache-2.0" ]
null
null
null
Service_Transcoding/example_celeryconfig.py
crim-ca/Service_Transcoding
30b293ae2e964de4d5a86a361008ef141f7b6433
[ "Apache-2.0" ]
null
null
null
""" Configuration values for transition process. """ BROKER_URL = 'amqp://localhost//' CELERY_RESULT_BACKEND = 'amqp://' CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' CELERY_ACCEPT_CONTENT = ['json'] CELERYD_PREFETCH_MULTIPLIER = 1 CELERY_TASK_RESULT_EXPIRES = 7200 # 2 Hours
23
44
0.769231
BROKER_URL = 'amqp://localhost//' CELERY_RESULT_BACKEND = 'amqp://' CELERY_TASK_SERIALIZER = 'json' CELERY_RESULT_SERIALIZER = 'json' CELERY_ACCEPT_CONTENT = ['json'] CELERYD_PREFETCH_MULTIPLIER = 1 CELERY_TASK_RESULT_EXPIRES = 7200
true
true
f77a79aac1c6255cc690c211fb7aabc578c33c39
291
py
Python
pre-processing-source/time_filter/epoch_remove.py
PranavKhadpe/Detecting-usefulness-of-Yelp-Reviews
7a176ee01b5b1a1494321177d08dc3be0a04f589
[ "MIT" ]
4
2017-11-30T12:37:43.000Z
2018-09-06T08:48:52.000Z
pre-processing-source/time_filter/epoch_remove.py
PranavKhadpe/Detecting-usefulness-of-Yelp-Reviews
7a176ee01b5b1a1494321177d08dc3be0a04f589
[ "MIT" ]
null
null
null
pre-processing-source/time_filter/epoch_remove.py
PranavKhadpe/Detecting-usefulness-of-Yelp-Reviews
7a176ee01b5b1a1494321177d08dc3be0a04f589
[ "MIT" ]
1
2018-09-06T10:54:44.000Z
2018-09-06T10:54:44.000Z
from datetime import datetime import pandas as pd import numpy as np import json df = pd.read_csv('/home/josh/python/SNLP/src/truncate_data/epoch_rev.json') df = df[df.epoch_time < 1483142400.0] df = df[df.epoch_time > 1419984000.0] with open('epoch_fil.json', 'w+') as f: f.write(out)
26.454545
75
0.735395
from datetime import datetime import pandas as pd import numpy as np import json df = pd.read_csv('/home/josh/python/SNLP/src/truncate_data/epoch_rev.json') df = df[df.epoch_time < 1483142400.0] df = df[df.epoch_time > 1419984000.0] with open('epoch_fil.json', 'w+') as f: f.write(out)
true
true
f77a79c26a849fd35e7feae1b895f383d50f230b
1,239
py
Python
var/spack/repos/builtin/packages/r-statnet-common/package.py
varioustoxins/spack
cab0e4cb240f34891a6d753f3393e512f9a99e9a
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/r-statnet-common/package.py
varioustoxins/spack
cab0e4cb240f34891a6d753f3393e512f9a99e9a
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
6
2022-01-08T08:41:11.000Z
2022-03-14T19:28:07.000Z
var/spack/repos/builtin/packages/r-statnet-common/package.py
foeroyingur/spack
5300cbbb2e569190015c72d0970d25425ea38647
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RStatnetCommon(RPackage): """Common R Scripts and Utilities Used by the Statnet Project So...
45.888889
95
0.732042
from spack import * class RStatnetCommon(RPackage): homepage = "https://www.statnet.org" url = "https://cloud.r-project.org/src/contrib/statnet.common_3.3.0.tar.gz" list_url = "https://cloud.r-project.org/src/contrib/Archive/statnet.common" version('4.4.1', sha256='4ecf2b84718d7fb60f196215b4cf...
true
true
f77a7a7885d1ced913276ff55a133321598784d8
9,297
py
Python
test/unittests/test_gradient_double.py
IMTtugraz/PyQMRI
158ac75e0a86374f3eb907467660f96233260009
[ "Apache-2.0" ]
18
2019-08-09T18:42:33.000Z
2022-03-22T07:56:48.000Z
test/unittests/test_gradient_double.py
IMTtugraz/PyQMRI
158ac75e0a86374f3eb907467660f96233260009
[ "Apache-2.0" ]
4
2020-10-05T15:56:58.000Z
2021-08-19T11:51:54.000Z
test/unittests/test_gradient_double.py
IMTtugraz/PyQMRI
158ac75e0a86374f3eb907467660f96233260009
[ "Apache-2.0" ]
5
2020-04-21T17:28:58.000Z
2020-12-05T21:44:50.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Aug 12 11:26:41 2019 @author: omaier """ import pyqmri try: import unittest2 as unittest except ImportError: import unittest from pyqmri._helper_fun import CLProgram as Program from pkg_resources import resource_filename import pyopencl.array a...
32.393728
78
0.53329
import pyqmri try: import unittest2 as unittest except ImportError: import unittest from pyqmri._helper_fun import CLProgram as Program from pkg_resources import resource_filename import pyopencl.array as clarray import numpy as np DTYPE = np.complex128 DTYPE_real = np.float64 RTOL=1e-12 ATOL=1e-14 class tmp...
true
true
f77a7c5f84144a2a43a7998efd7437b9d0a71841
4,624
py
Python
atomicswap/redeem.py
y-chan/atomicswap-qt
5bab6d301177aaf7487236597f75efb1172e6450
[ "MIT" ]
14
2020-01-12T07:43:31.000Z
2020-09-10T23:50:53.000Z
atomicswap/redeem.py
atomicswap-network/atomicswap-qt
4379deda0840ca305d8cc20b0337a7d3517eb6a3
[ "MIT" ]
12
2020-01-12T10:33:58.000Z
2020-02-06T04:35:27.000Z
atomicswap/redeem.py
atomicswap-network/atomicswap-qt
4379deda0840ca305d8cc20b0337a7d3517eb6a3
[ "MIT" ]
4
2020-01-28T03:17:32.000Z
2021-08-09T22:14:40.000Z
# Copyright (c) 2015-2020 The Decred developers # Copyright (c) 2019-2020 The atomicswap-qt developers # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including witho...
46.707071
111
0.738106
from .address import b58_address_to_hash160, hash160_to_b58_address, hash160 from .coind import Coind from .contract import (estimate_redeem_serialize_size, fee_for_serialize_size, create_sig, is_dust_output, verify, redeem_p2sh_contract, calc_fee_per_kb) from .transaction import atomic_swap_ext...
true
true
f77a7c79833edd8603ebc4a34d20833ad4769c8b
237
py
Python
BigChat/Contact/urls.py
diannakan1998/BigChat
a87b2682c137c7de40288d68612c2ee15d47bcee
[ "MIT" ]
null
null
null
BigChat/Contact/urls.py
diannakan1998/BigChat
a87b2682c137c7de40288d68612c2ee15d47bcee
[ "MIT" ]
2
2020-02-11T23:35:33.000Z
2020-06-05T19:36:53.000Z
BigChat/Contact/urls.py
diannakan1998/BigChat
a87b2682c137c7de40288d68612c2ee15d47bcee
[ "MIT" ]
null
null
null
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('Contacts/', views.Contacts.as_view(), name='contact'), path('Profile/', views.profile.as_view(), name='profile'), ]
26.333333
64
0.662447
from django.urls import path from . import views urlpatterns = [ path('', views.index, name='index'), path('Contacts/', views.Contacts.as_view(), name='contact'), path('Profile/', views.profile.as_view(), name='profile'), ]
true
true
f77a7caebccc5a6a6332c5449090d82dfd5c5fad
2,257
py
Python
grr/client/grr_response_client/unprivileged/windows/sandbox_test.py
cclauss/grr
266ecb18caa52bda950dade205e510bc3149d6f9
[ "Apache-2.0" ]
null
null
null
grr/client/grr_response_client/unprivileged/windows/sandbox_test.py
cclauss/grr
266ecb18caa52bda950dade205e510bc3149d6f9
[ "Apache-2.0" ]
null
null
null
grr/client/grr_response_client/unprivileged/windows/sandbox_test.py
cclauss/grr
266ecb18caa52bda950dade205e510bc3149d6f9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import concurrent.futures import os import subprocess import sys from absl import flags from absl.testing import absltest from grr_response_client.unprivileged.windows import process_test from grr_response_client.unprivileged.windows import sandbox flags.DEFINE_bool( "set_inheritance", ...
27.864198
89
0.695614
import concurrent.futures import os import subprocess import sys from absl import flags from absl.testing import absltest from grr_response_client.unprivileged.windows import process_test from grr_response_client.unprivileged.windows import sandbox flags.DEFINE_bool( "set_inheritance", default=True, help...
true
true
f77a7e41120a37ce5a2f05432c49db923c877116
1,486
py
Python
simpleh5/tests/test_simpleh5_search_util.py
ssolari/simpleh5
0c82395f5144634221419ff347db23ef4d34cd04
[ "MIT" ]
null
null
null
simpleh5/tests/test_simpleh5_search_util.py
ssolari/simpleh5
0c82395f5144634221419ff347db23ef4d34cd04
[ "MIT" ]
null
null
null
simpleh5/tests/test_simpleh5_search_util.py
ssolari/simpleh5
0c82395f5144634221419ff347db23ef4d34cd04
[ "MIT" ]
null
null
null
import unittest import os from simpleh5.utilities.search_utilities import _build_search_string class TestBuildString(unittest.TestCase): def test_string_single(self): query = ['strs', '==', 'abc'] match_string, uservars = _build_search_string(query) self.assertEqual(match_string, "(n0=...
30.326531
89
0.560565
import unittest import os from simpleh5.utilities.search_utilities import _build_search_string class TestBuildString(unittest.TestCase): def test_string_single(self): query = ['strs', '==', 'abc'] match_string, uservars = _build_search_string(query) self.assertEqual(match_string, "(n0=...
true
true
f77a7edd37394d668a112c8b6bcdcc010bba6b58
76
py
Python
scripts/startup.py
hxxdraw/Telegram-RDT
de6f7e0c06cf51529f23509314d9d4251fcff476
[ "0BSD" ]
null
null
null
scripts/startup.py
hxxdraw/Telegram-RDT
de6f7e0c06cf51529f23509314d9d4251fcff476
[ "0BSD" ]
1
2022-01-10T20:06:51.000Z
2022-01-10T20:06:51.000Z
scripts/startup.py
hxxdraw/Telegram-RDT
de6f7e0c06cf51529f23509314d9d4251fcff476
[ "0BSD" ]
null
null
null
""" Script. Use it to add an application to the system startup (WINDOWS) """
19
60
0.710526
true
true
f77a7f771ff9bdd142efcde90f845ca8a27c85ef
18,266
py
Python
vermouth/gmx/rtp.py
fgrunewald/vermouth-martinize
8b9b78207833b41b93ca3628730169a16b5f8410
[ "Apache-2.0" ]
null
null
null
vermouth/gmx/rtp.py
fgrunewald/vermouth-martinize
8b9b78207833b41b93ca3628730169a16b5f8410
[ "Apache-2.0" ]
null
null
null
vermouth/gmx/rtp.py
fgrunewald/vermouth-martinize
8b9b78207833b41b93ca3628730169a16b5f8410
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 University of Groningen # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
35.059501
82
0.640699
import collections import itertools import networkx as nx from ..molecule import Block, Link, Interaction from .. import utils __all__ = ['read_rtp'] RTP_SUBSECTIONS = ('atoms', 'bonds', 'angles', 'dihedrals', 'impropers', 'cmap', 'exclusions', '_bondedtypes') _BondedTypes =...
true
true
f77a7fb2872a1f953f5d2459d8cde4f3ba43e264
5,606
py
Python
tests/test_endpoints_async_methods.py
jekel/sanic-jwt
4f6ab07376ad90011d40e205feacae8219359d6f
[ "MIT" ]
226
2017-09-05T08:23:58.000Z
2022-03-28T09:23:47.000Z
tests/test_endpoints_async_methods.py
jekel/sanic-jwt
4f6ab07376ad90011d40e205feacae8219359d6f
[ "MIT" ]
179
2017-09-27T08:33:16.000Z
2022-01-28T20:35:23.000Z
tests/test_endpoints_async_methods.py
jekel/sanic-jwt
4f6ab07376ad90011d40e205feacae8219359d6f
[ "MIT" ]
45
2017-10-14T10:26:46.000Z
2022-02-04T15:01:20.000Z
import binascii import os import pytest from sanic import Sanic from sanic.response import json from sanic_jwt import exceptions, Initialize from sanic_jwt.decorators import protected class User(object): def __init__(self, id, username, password): self.id = id self.username = username se...
30.302703
79
0.620942
import binascii import os import pytest from sanic import Sanic from sanic.response import json from sanic_jwt import exceptions, Initialize from sanic_jwt.decorators import protected class User(object): def __init__(self, id, username, password): self.id = id self.username = username se...
true
true
f77a7ff8c635848d95412c6adb6d8e090502c2ad
2,024
py
Python
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GL/EXT/secondary_color.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GL/EXT/secondary_color.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/GL/EXT/secondary_color.py
JE-Chen/je_old_repo
a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5
[ "MIT" ]
null
null
null
'''OpenGL extension EXT.secondary_color This module customises the behaviour of the OpenGL.raw.GL.EXT.secondary_color to provide a more Python-friendly API Overview (from the spec) This extension allows specifying the RGB components of the secondary color used in the Color Sum stage, instead of using t...
35.508772
90
0.785573
from OpenGL import platform, constant, arrays from OpenGL import extensions, wrapper import ctypes from OpenGL.raw.GL import _types, _glgets from OpenGL.raw.GL.EXT.secondary_color import * from OpenGL.raw.GL.EXT.secondary_color import _EXTENSION_NAME def glInitSecondaryColorEXT(): from OpenGL import extens...
true
true
f77a81ab0a3f70e2be92b98014c4c5c1a70f5c84
6,475
py
Python
project/fastreid/modeling/backbones/mobilenet.py
Challyfilio/NAIC2021
11b38a920dcc902f9b798dc43ae360062862e6e4
[ "MIT" ]
null
null
null
project/fastreid/modeling/backbones/mobilenet.py
Challyfilio/NAIC2021
11b38a920dcc902f9b798dc43ae360062862e6e4
[ "MIT" ]
null
null
null
project/fastreid/modeling/backbones/mobilenet.py
Challyfilio/NAIC2021
11b38a920dcc902f9b798dc43ae360062862e6e4
[ "MIT" ]
null
null
null
""" Creates a MobileNetV2 Model as defined in: Mark Sandler, Andrew Howard, Menglong Zhu, Andrey Zhmoginov, Liang-Chieh Chen. (2018). MobileNetV2: Inverted Residuals and Linear Bottlenecks arXiv preprint arXiv:1801.04381. import from https://github.com/tonylins/pytorch-mobilenet-v2 """ import logging import math impor...
33.035714
120
0.584402
import logging import math import torch import torch.nn as nn from project.fastreid.layers import get_norm from project.fastreid.utils.checkpoint import get_missing_parameters_message, get_unexpected_parameters_message from .build import BACKBONE_REGISTRY logger = logging.getLogger(__name__) def _make_divisible(v,...
true
true
f77a8223284f747f47bb6a754e7eb5d2bdc716ab
4,738
py
Python
bilibili/video_analysis.py
DANancy/Web-Scraper-Starter
bfde0c67dd004bd065f084b57040ed644bfab2fd
[ "MIT" ]
1
2020-04-26T05:27:55.000Z
2020-04-26T05:27:55.000Z
bilibili/video_analysis.py
DANancy/Web-Scraper-Starter
bfde0c67dd004bd065f084b57040ed644bfab2fd
[ "MIT" ]
null
null
null
bilibili/video_analysis.py
DANancy/Web-Scraper-Starter
bfde0c67dd004bd065f084b57040ed644bfab2fd
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # -*- coding: utf-8 -*- # env libs import os from dotenv import load_dotenv from pathlib import Path # dash libs import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import plotly.graph_objs as pgo # pydata stack import...
29.246914
105
0.529126
import os from dotenv import load_dotenv from pathlib import Path import dash import dash_core_components as dcc import dash_html_components as html from dash.dependencies import Input, Output import plotly.graph_objs as pgo import pandas as pd import pymongo env_path = Path('..') / '.env' load_dotenv(dotenv_path=e...
true
true
f77a82254f4dab593dc59b0f1ed186d6a23f4850
6,652
py
Python
selfdrive/manager/manager.py
hikee9123Org/op4
5abe3ef76f895032774f80033ffffe8d4f30d819
[ "MIT" ]
null
null
null
selfdrive/manager/manager.py
hikee9123Org/op4
5abe3ef76f895032774f80033ffffe8d4f30d819
[ "MIT" ]
null
null
null
selfdrive/manager/manager.py
hikee9123Org/op4
5abe3ef76f895032774f80033ffffe8d4f30d819
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import datetime import os import signal import subprocess import sys import traceback from multiprocessing import Process import cereal.messaging as messaging import selfdrive.crash as crash from common.basedir import BASEDIR from common.params import Params, ParamKeyType from common.text_window...
28.067511
101
0.697835
import datetime import os import signal import subprocess import sys import traceback from multiprocessing import Process import cereal.messaging as messaging import selfdrive.crash as crash from common.basedir import BASEDIR from common.params import Params, ParamKeyType from common.text_window import TextWindow from...
true
true
f77a827f178fbb3b1507ff264608ea892a9bdc6d
163
py
Python
1 Create1DVector/CreateVector.py
sadamarif/Basic-50-ML
4b30228cb2a30c85864683c685205c1cc8a84461
[ "MIT" ]
null
null
null
1 Create1DVector/CreateVector.py
sadamarif/Basic-50-ML
4b30228cb2a30c85864683c685205c1cc8a84461
[ "MIT" ]
null
null
null
1 Create1DVector/CreateVector.py
sadamarif/Basic-50-ML
4b30228cb2a30c85864683c685205c1cc8a84461
[ "MIT" ]
null
null
null
# Load library import numpy as np # Create a vector as a row vector_row = np.array([1, 2, 3]) # Create a vector as a column vector_column = np.array([[1],[2],[3]])
27.166667
39
0.674847
import numpy as np vector_row = np.array([1, 2, 3]) vector_column = np.array([[1],[2],[3]])
true
true
f77a83a48cf911cae13e3f9a43a4d6615f838e65
1,012
py
Python
tweets/generators.py
lesspointless/Shakal-NG
eee491af94527228735c2bca7644605effd74b37
[ "MIT" ]
null
null
null
tweets/generators.py
lesspointless/Shakal-NG
eee491af94527228735c2bca7644605effd74b37
[ "MIT" ]
null
null
null
tweets/generators.py
lesspointless/Shakal-NG
eee491af94527228735c2bca7644605effd74b37
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.conf import settings from django_autoslugfield.utils import unique_slugify from django_sample_generator import fields, generator from .models import Tweet from accounts.models import User from common_utils import generator_fields as extra_gen...
28.111111
81
0.790514
from __future__ import unicode_literals from django.conf import settings from django_autoslugfield.utils import unique_slugify from django_sample_generator import fields, generator from .models import Tweet from accounts.models import User from common_utils import generator_fields as extra_generator_fields class Tw...
true
true
f77a83a8990e930c58f8d14bb0d7b693d3ac407e
262
py
Python
tests/artificial/transf_None/trend_PolyTrend/cycle_7/ar_12/test_artificial_1024_None_PolyTrend_7_12_100.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/artificial/transf_None/trend_PolyTrend/cycle_7/ar_12/test_artificial_1024_None_PolyTrend_7_12_100.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/artificial/transf_None/trend_PolyTrend/cycle_7/ar_12/test_artificial_1024_None_PolyTrend_7_12_100.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 7, transform = "None", sigma = 0.0, exog_count = 100, ar_order = 12);
37.428571
162
0.729008
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "PolyTrend", cycle_length = 7, transform = "None", sigma = 0.0, exog_count = 100, ar_order = 12);
true
true
f77a842ee4d7197a78cc59e881e51b39f180f73b
2,276
py
Python
openpeerpower/components/lutron_caseta/binary_sensor.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
1
2021-07-08T20:09:55.000Z
2021-07-08T20:09:55.000Z
openpeerpower/components/lutron_caseta/binary_sensor.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
47
2021-02-21T23:43:07.000Z
2022-03-31T06:07:10.000Z
openpeerpower/components/lutron_caseta/binary_sensor.py
OpenPeerPower/core
f673dfac9f2d0c48fa30af37b0a99df9dd6640ee
[ "Apache-2.0" ]
null
null
null
"""Support for Lutron Caseta Occupancy/Vacancy Sensors.""" from pylutron_caseta import OCCUPANCY_GROUP_OCCUPIED from openpeerpower.components.binary_sensor import ( DEVICE_CLASS_OCCUPANCY, BinarySensorEntity, ) from . import DOMAIN as CASETA_DOMAIN, LutronCasetaDevice from .const import BRIDGE_DEVICE, BRIDGE_...
30.346667
78
0.702548
from pylutron_caseta import OCCUPANCY_GROUP_OCCUPIED from openpeerpower.components.binary_sensor import ( DEVICE_CLASS_OCCUPANCY, BinarySensorEntity, ) from . import DOMAIN as CASETA_DOMAIN, LutronCasetaDevice from .const import BRIDGE_DEVICE, BRIDGE_LEAP async def async_setup_entry(opp, config_entry, async...
true
true
f77a84db567b0c607da86e6b23debc5754414fd9
3,124
py
Python
gui/widgets/timeline.py
abraker95/ultimate_osu_analyzer
bea58c997d13c3f461ccbe682f52799f0f88fdea
[ "MIT" ]
23
2019-02-27T06:20:15.000Z
2022-03-31T22:54:11.000Z
gui/widgets/timeline.py
abraker95/ultimate_osu_analyzer
bea58c997d13c3f461ccbe682f52799f0f88fdea
[ "MIT" ]
38
2019-03-03T17:35:39.000Z
2021-08-23T20:43:34.000Z
gui/widgets/timeline.py
abraker95/ultimate_osu_analyzer
bea58c997d13c3f461ccbe682f52799f0f88fdea
[ "MIT" ]
4
2020-03-30T20:43:14.000Z
2022-03-06T19:40:15.000Z
from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph from gui.objects.graph.hitobject_plot import HitobjectPlot from gui.objects.graph.line_plot import LinePlot from misc.callback import callback from analysis.osu.std.map_data import StdMapData from generic.switcher import Switcher class Timeline(pyqtgraph.PlotW...
30.930693
162
0.644686
from pyqtgraph.Qt import QtGui, QtCore import pyqtgraph from gui.objects.graph.hitobject_plot import HitobjectPlot from gui.objects.graph.line_plot import LinePlot from misc.callback import callback from analysis.osu.std.map_data import StdMapData from generic.switcher import Switcher class Timeline(pyqtgraph.PlotW...
true
true
f77a8524e7bd156d0aa3911ba3a2e7cd4a930ab7
9,644
py
Python
dqn/dqn_torch.py
threewisemonkeys-as/myrl
3e67072591027bd3314f4c85cf32ddcf547c7840
[ "MIT" ]
2
2021-07-20T03:54:28.000Z
2021-08-11T11:22:07.000Z
dqn/dqn_torch.py
threewisemonkeys-as/myrl
3e67072591027bd3314f4c85cf32ddcf547c7840
[ "MIT" ]
null
null
null
dqn/dqn_torch.py
threewisemonkeys-as/myrl
3e67072591027bd3314f4c85cf32ddcf547c7840
[ "MIT" ]
null
null
null
# Deep Q Network in pytorch # Atharv Sonwane <atharvs.twm@gmail.com> # References - # https://www.cs.toronto.edu/~vmnih/docs/dqn.pdf import copy import random import time from collections import deque, namedtuple from itertools import count import matplotlib.pyplot as plt import numpy as np import torch import torch...
33.838596
111
0.575176
import copy import random import time from collections import deque, namedtuple from itertools import count import matplotlib.pyplot as plt import numpy as np import torch import torch.nn as nn device = torch.device("cuda" if torch.cuda.is_available() else "cpu") dtype = torch.double TIMESTEPS = 5000 BATCH_SIZE = ...
true
true
f77a8612452311d6222f3543d8eb164624ef96fd
1,099
py
Python
classifEvaluationFunctions.py
a18shasa/a18shasa
a6bcabac61e53b92893112f4e5361faa16547bc1
[ "MIT" ]
1
2020-08-13T11:46:55.000Z
2020-08-13T11:46:55.000Z
classifEvaluationFunctions.py
a18shasa/a18shasa
a6bcabac61e53b92893112f4e5361faa16547bc1
[ "MIT" ]
null
null
null
classifEvaluationFunctions.py
a18shasa/a18shasa
a6bcabac61e53b92893112f4e5361faa16547bc1
[ "MIT" ]
null
null
null
from sklearn.metrics import accuracy_score, precision_score, f1_score, recall_score, confusion_matrix import pandas as pd def getClassification_scores(true_classes, predicted_classes): acc = accuracy_score(true_classes, predicted_classes) prec = precision_score(true_classes, predicted_classes,average="macro") ...
31.4
101
0.706096
from sklearn.metrics import accuracy_score, precision_score, f1_score, recall_score, confusion_matrix import pandas as pd def getClassification_scores(true_classes, predicted_classes): acc = accuracy_score(true_classes, predicted_classes) prec = precision_score(true_classes, predicted_classes,average="macro") ...
true
true
f77a865f6e1b1fa1c6267242d5ebd6da997cf094
2,571
py
Python
upconvert/core/annotation.py
lehaianh1986/schematic-file-converter
ed67274511a5b0e1b378e4e0fd3943ec8a189f43
[ "Apache-2.0" ]
29
2016-05-19T02:04:51.000Z
2021-09-16T06:25:59.000Z
upconvert/core/annotation.py
84ace/schematic-file-converter
a5975a521d842396605c05a9f197bfe088906bb4
[ "Apache-2.0" ]
null
null
null
upconvert/core/annotation.py
84ace/schematic-file-converter
a5975a521d842396605c05a9f197bfe088906bb4
[ "Apache-2.0" ]
24
2016-05-19T02:05:00.000Z
2022-01-14T18:20:01.000Z
#!/usr/bin/env python2 """ The annotation class """ # upconverty - A universal hardware design file format converter using # Format: upverter.com/resources/open-json-format/ # Development: github.com/upverter/schematic-file-converter # # Copyright 2011 Upverter, Inc. # # Licensed under the Apache License, Versi...
30.975904
131
0.616492
from upconvert.core.shape import Point class Annotation: def __init__(self, value, x, y, rotation, visible, layer='default', flip_horizontal=False, label=None): self.value = value self.x = x self.y = y self.flip_horizontal = flip_horizontal self.label = label se...
true
true
f77a8767970b8f13d94ade11a1de4ea59a0f5887
3,587
py
Python
fhir/resources/DSTU2/tests/test_paymentreconciliation.py
mmabey/fhir.resources
cc73718e9762c04726cd7de240c8f2dd5313cbe1
[ "BSD-3-Clause" ]
null
null
null
fhir/resources/DSTU2/tests/test_paymentreconciliation.py
mmabey/fhir.resources
cc73718e9762c04726cd7de240c8f2dd5313cbe1
[ "BSD-3-Clause" ]
null
null
null
fhir/resources/DSTU2/tests/test_paymentreconciliation.py
mmabey/fhir.resources
cc73718e9762c04726cd7de240c8f2dd5313cbe1
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 1.0.2.7202 on 2019-05-14. # 2019, SMART Health IT. import io import json import os import unittest from . import paymentreconciliation from .fhirdate import FHIRDate class PaymentReconciliationTests(unittest.TestCase): def instantiate_from...
46.584416
87
0.672707
import io import json import os import unittest from . import paymentreconciliation from .fhirdate import FHIRDate class PaymentReconciliationTests(unittest.TestCase): def instantiate_from(self, filename): datadir = os.environ.get("FHIR_UNITTEST_DATADIR") or "" with io.open(os.path.join(datadir...
true
true
f77a879f076e8523f420a23009cf95fa4d027d1a
7,371
py
Python
heron/tools/cli/src/python/main.py
zhengyangtean/CG4001_Heron_ElasticBolt
e471593c265088996d485e2dd11c9f2484876568
[ "Apache-2.0" ]
1
2017-11-06T08:23:43.000Z
2017-11-06T08:23:43.000Z
heron/tools/cli/src/python/main.py
zhengyangtean/CG4001_Heron_ElasticBolt
e471593c265088996d485e2dd11c9f2484876568
[ "Apache-2.0" ]
null
null
null
heron/tools/cli/src/python/main.py
zhengyangtean/CG4001_Heron_ElasticBolt
e471593c265088996d485e2dd11c9f2484876568
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Twitter. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
29.366534
83
0.683082
''' main.py ''' import argparse import atexit import getpass import os import shutil import sys import time import traceback import heron.common.src.python.utils.log as log import heron.tools.common.src.python.utils.config as config import heron.tools.cli.src.python.help as cli_help import heron.tools.cli.src.python....
false
true
f77a883348aa297f2b2e79e18b81a7a095e74cbb
16,812
py
Python
external_process_poc/twist_runtime.py
twistlock/lambda-persistency-poc
3788c3e2ecae98b7b3176e89cddaeca5df33c220
[ "MIT" ]
18
2019-09-02T18:02:53.000Z
2022-03-15T19:16:22.000Z
external_process_poc/twist_runtime.py
twistlock/lambda-persistency-poc
3788c3e2ecae98b7b3176e89cddaeca5df33c220
[ "MIT" ]
1
2021-02-24T11:49:50.000Z
2021-03-01T11:39:32.000Z
external_process_poc/twist_runtime.py
twistlock/lambda-persistency-poc
3788c3e2ecae98b7b3176e89cddaeca5df33c220
[ "MIT" ]
8
2020-05-17T12:10:54.000Z
2022-03-15T20:38:37.000Z
#!/usr/bin/env python3 """ *twist_runtime.py* Most of it is copied from the Lambda python3.7 runtime (bootstrap.py) The section at the bottom contains the modifications. """ import json import logging import os import site import sys import time import traceback import warnings sys.path.insert(0, "/var/runtime") # F...
34.592593
148
0.677552
import json import logging import os import site import sys import time import traceback import warnings sys.path.insert(0, "/var/runtime") from lambda_runtime_client import LambdaRuntimeClient from lambda_runtime_exception import FaultException from lambda_runtime_marshaller import to_json with warnings.catch_war...
true
true
f77a8898d9bbd8fd87baec9bfaf72ac1cd71789e
2,292
py
Python
text_cleaner.py
NCAR/lmod_webapp
4ca0ff77887884286081cf52966faf7fb1161b7b
[ "MIT" ]
null
null
null
text_cleaner.py
NCAR/lmod_webapp
4ca0ff77887884286081cf52966faf7fb1161b7b
[ "MIT" ]
null
null
null
text_cleaner.py
NCAR/lmod_webapp
4ca0ff77887884286081cf52966faf7fb1161b7b
[ "MIT" ]
null
null
null
# Thomas Hilton Johnson III # text_cleaner.py # Utilizing regex to clean out unnecessary parts of the text # Reference: https://stackabuse.com/using-regex-for-text-manipulation-in-python/ # Reference: https://stackoverflow.com/questions/11469228/python-replace-and-overwrite-instead-of-appending/11469328 # Not necessary...
76.4
177
0.773997
import re def dash_cleaner(input_file): target_file = open(input_file, "r")n target_content = target_file.read() target_file.close() processed_content = re.sub(r"([\-\-]+) | ([\-\-]+)","",target_content) target_file = open(input_file, "w") target_file.write(processed_content) target_file.close(...
false
true
f77a895f720f285a9b9a0cbade6dcecd6d19cfeb
748
py
Python
personal_env/lib/python3.8/site-packages/toml/__init__.py
jestinmwilson/personal-website
6e47a7f33ed3b1ca5c1d42c89c5380d22992ed74
[ "MIT" ]
null
null
null
personal_env/lib/python3.8/site-packages/toml/__init__.py
jestinmwilson/personal-website
6e47a7f33ed3b1ca5c1d42c89c5380d22992ed74
[ "MIT" ]
null
null
null
personal_env/lib/python3.8/site-packages/toml/__init__.py
jestinmwilson/personal-website
6e47a7f33ed3b1ca5c1d42c89c5380d22992ed74
[ "MIT" ]
null
null
null
"""Python module which parses and emits TOML. Released under the MIT license. """ from toml import encoder from toml import decoder __version__ = "0.10.2" _spec_ = "0.5.0" load = decoder.load loads = decoder.loads TomlDecoder = decoder.TomlDecoder TomlDecodeError = decoder.TomlDecodeError TomlPreserv...
28.769231
70
0.812834
from toml import encoder from toml import decoder __version__ = "0.10.2" _spec_ = "0.5.0" load = decoder.load loads = decoder.loads TomlDecoder = decoder.TomlDecoder TomlDecodeError = decoder.TomlDecodeError TomlPreserveCommentDecoder = decoder.TomlPreserveCommentDecoder dump = encoder.dump dumps = en...
true
true
f77a8981ce9fde63f297fd523621c5f78bea8cec
4,896
py
Python
tests/unit/drivers/test_rankingevaluation_driver.py
NickCwh/jina
d3dec7b82d6301bce72a82ad6a41dddc944ead0b
[ "Apache-2.0" ]
1
2020-11-14T09:54:09.000Z
2020-11-14T09:54:09.000Z
tests/unit/drivers/test_rankingevaluation_driver.py
NickCwh/jina
d3dec7b82d6301bce72a82ad6a41dddc944ead0b
[ "Apache-2.0" ]
null
null
null
tests/unit/drivers/test_rankingevaluation_driver.py
NickCwh/jina
d3dec7b82d6301bce72a82ad6a41dddc944ead0b
[ "Apache-2.0" ]
null
null
null
import pytest from jina.drivers.evaluate import RankEvaluateDriver from jina.drivers.helper import DocGroundtruthPair from jina.executors.evaluators.rank.precision import PrecisionEvaluator from jina.proto import jina_pb2 class SimpleRankEvaluateDriver(RankEvaluateDriver): def __init__(self, field: str, *args, ...
32.64
94
0.680556
import pytest from jina.drivers.evaluate import RankEvaluateDriver from jina.drivers.helper import DocGroundtruthPair from jina.executors.evaluators.rank.precision import PrecisionEvaluator from jina.proto import jina_pb2 class SimpleRankEvaluateDriver(RankEvaluateDriver): def __init__(self, field: str, *args, ...
true
true
f77a89b57769731dceeabb0cb4e213d47cd6e257
5,439
py
Python
botorch/optim/initializers.py
cnheider/botorch
1d90aaff64b2f1e1f49bcac233b45ba18427f6fd
[ "MIT" ]
null
null
null
botorch/optim/initializers.py
cnheider/botorch
1d90aaff64b2f1e1f49bcac233b45ba18427f6fd
[ "MIT" ]
null
null
null
botorch/optim/initializers.py
cnheider/botorch
1d90aaff64b2f1e1f49bcac233b45ba18427f6fd
[ "MIT" ]
1
2020-04-24T14:32:14.000Z
2020-04-24T14:32:14.000Z
#!/usr/bin/env python3 import typing # noqa F401 import warnings import torch from torch import Tensor from ..exceptions.warnings import BadInitialCandidatesWarning def initialize_q_batch(X: Tensor, Y: Tensor, n: int, eta: float = 1.0) -> Tensor: r"""Heuristic for selecting initial conditions for candidate ge...
39.70073
86
0.64203
import typing import warnings import torch from torch import Tensor from ..exceptions.warnings import BadInitialCandidatesWarning def initialize_q_batch(X: Tensor, Y: Tensor, n: int, eta: float = 1.0) -> Tensor: n_samples = X.shape[0] if n > n_samples: raise RuntimeError( f"n ({n}) can...
true
true
f77a8a909e4d2bc96cefc27e45b1ce1ffd25606e
8,442
py
Python
chemicals/miscdata.py
daar/chemicals
df3be046055055b99ae762e7a4b852a63134fc82
[ "MIT" ]
null
null
null
chemicals/miscdata.py
daar/chemicals
df3be046055055b99ae762e7a4b852a63134fc82
[ "MIT" ]
null
null
null
chemicals/miscdata.py
daar/chemicals
df3be046055055b99ae762e7a4b852a63134fc82
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Chemical Engineering Design Library (ChEDL). Utilities for process modeling. Copyright (C) 2016, 2017, 2018, 2019, 2020 Caleb Bell <Caleb.Andrew.Bell@gmail.com> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (t...
40.586538
151
0.66489
__all__ = ['lookup_VDI_tabular_data'] import os from chemicals.utils import mark_numba_incompatible from chemicals.utils import PY37, source_path, os_path_join, can_load_data from chemicals.data_reader import register_df_source, data_source folder = os_path_join(source_path, 'Misc') register_df_source(folder, 'Phy...
true
true
f77a8c93026ba3bc74cf5767ccd7b8cb4a9c8b3c
5,786
py
Python
troveclient/users.py
citrix-openstack-build/python-troveclient
4a82591c79b622757dc2e6f1c89a65ca4064f9d3
[ "Apache-2.0" ]
null
null
null
troveclient/users.py
citrix-openstack-build/python-troveclient
4a82591c79b622757dc2e6f1c89a65ca4064f9d3
[ "Apache-2.0" ]
null
null
null
troveclient/users.py
citrix-openstack-build/python-troveclient
4a82591c79b622757dc2e6f1c89a65ca4064f9d3
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
39.094595
78
0.630833
from troveclient import base from troveclient import databases from troveclient.common import check_for_exceptions from troveclient.common import limit_url from troveclient.common import Paginated from troveclient.common import quote_user_host import urlparse class User(base.Resource): def __repr__(self): ...
true
true
f77a8d54f99d6798ab491e6085eb515da20a5b38
37,381
py
Python
tests/cupy_tests/math_tests/test_sumprod.py
srijan-deepsource/cupy
f7c3d579b76b5f815fa8f4a0ddc79ef9ca2d3b02
[ "MIT" ]
null
null
null
tests/cupy_tests/math_tests/test_sumprod.py
srijan-deepsource/cupy
f7c3d579b76b5f815fa8f4a0ddc79ef9ca2d3b02
[ "MIT" ]
null
null
null
tests/cupy_tests/math_tests/test_sumprod.py
srijan-deepsource/cupy
f7c3d579b76b5f815fa8f4a0ddc79ef9ca2d3b02
[ "MIT" ]
null
null
null
import unittest import math import numpy import pytest import cupy import cupy.core._accelerator as _acc from cupy.core import _cub_reduction from cupy import testing @testing.gpu class TestSumprod(unittest.TestCase): def tearDown(self): # Free huge memory for slow test cupy.get_default_memory_...
36.433723
79
0.614751
import unittest import math import numpy import pytest import cupy import cupy.core._accelerator as _acc from cupy.core import _cub_reduction from cupy import testing @testing.gpu class TestSumprod(unittest.TestCase): def tearDown(self): cupy.get_default_memory_pool().free_all_blocks() ...
true
true
f77a8d7ec616434d7caaa232a9781ef0a051f28b
18,903
py
Python
{{cookiecutter.project_slug}}/{{cookiecutter.app_name}}/utils/paths.py
mhavel/cookiecutter-python3-quickstart
c1d29b4b8dbdc2a53d67699c3e8c0bde786697cf
[ "MIT" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.app_name}}/utils/paths.py
mhavel/cookiecutter-python3-quickstart
c1d29b4b8dbdc2a53d67699c3e8c0bde786697cf
[ "MIT" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.app_name}}/utils/paths.py
mhavel/cookiecutter-python3-quickstart
c1d29b4b8dbdc2a53d67699c3e8c0bde786697cf
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # coding: utf-8 """ Tools to work with Path str / instances. """ import os from typing import Union from pathlib import Path import logging import shutil from hashlib import sha1 import uuid import re from fnmatch import fnmatch import operator from functools import reduce PTYPE = getattr(re,...
33.998201
121
0.574829
import os from typing import Union from pathlib import Path import logging import shutil from hashlib import sha1 import uuid import re from fnmatch import fnmatch import operator from functools import reduce PTYPE = getattr(re, 'Pattern', getattr(re, '_pattern_type', None)) if PTYPE is None: PTYPE = type(...
true
true
f77a8db1837ddaeaa6f29cc09d88d913fd8d8bbc
16,044
py
Python
ps3/src/cartpole/cartpole.py
Ziggareto/cs229
10b03b68b24d252dad3e3437561976d9509ebdd0
[ "MIT" ]
null
null
null
ps3/src/cartpole/cartpole.py
Ziggareto/cs229
10b03b68b24d252dad3e3437561976d9509ebdd0
[ "MIT" ]
null
null
null
ps3/src/cartpole/cartpole.py
Ziggareto/cs229
10b03b68b24d252dad3e3437561976d9509ebdd0
[ "MIT" ]
null
null
null
""" CS 229 Machine Learning Question: Reinforcement Learning - The Inverted Pendulum """ from __future__ import division, print_function import matplotlib matplotlib.use('TkAgg') from env import CartPole, Physics import matplotlib.pyplot as plt import numpy as np from scipy.signal import lfilter """ Parts of the code...
40.824427
172
0.704936
from __future__ import division, print_function import matplotlib matplotlib.use('TkAgg') from env import CartPole, Physics import matplotlib.pyplot as plt import numpy as np from scipy.signal import lfilter def initialize_mdp_data(num_states): transition_counts = np.zeros((num_states, num_states, 2)) transi...
true
true
f77a8db901f278dcd9f9016a682db442b47c9653
1,246
py
Python
ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_client.py
kennyballou/ambari
8985bcf11296d540a861a8634c17d6b9b1accd5a
[ "Apache-2.0" ]
5
2018-06-03T05:19:40.000Z
2021-04-16T17:10:49.000Z
ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_client.py
kennyballou/ambari
8985bcf11296d540a861a8634c17d6b9b1accd5a
[ "Apache-2.0" ]
null
null
null
ambari-server/src/main/resources/stacks/PHD/3.0.0.0/services/OOZIE/package/scripts/oozie_client.py
kennyballou/ambari
8985bcf11296d540a861a8634c17d6b9b1accd5a
[ "Apache-2.0" ]
6
2019-05-07T13:24:39.000Z
2021-02-15T14:12:37.000Z
#!/usr/bin/env python """ Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License");...
28.318182
72
0.75923
import sys from resource_management import * from oozie import oozie from oozie_service import oozie_service class OozieClient(Script): def install(self, env): self.install_packages(env) self.configure(env) def configure(self, env): import params env.set_params(params) oozie(i...
true
true
f77a8dde9f7157e78e81609613eddee5fd630fab
260
py
Python
Leetcode/89. Gray Code/solution2.py
asanoviskhak/Outtalent
c500e8ad498f76d57eb87a9776a04af7bdda913d
[ "MIT" ]
51
2020-07-12T21:27:47.000Z
2022-02-11T19:25:36.000Z
Leetcode/89. Gray Code/solution2.py
CrazySquirrel/Outtalent
8a10b23335d8e9f080e5c39715b38bcc2916ff00
[ "MIT" ]
null
null
null
Leetcode/89. Gray Code/solution2.py
CrazySquirrel/Outtalent
8a10b23335d8e9f080e5c39715b38bcc2916ff00
[ "MIT" ]
32
2020-07-27T13:54:24.000Z
2021-12-25T18:12:50.000Z
class Solution: def grayCode(self, n: int) -> List[int]: if n == 0: return [0] if n == 1: return [0, 1] res = self.grayCode(n - 1) for i in range(len(res) - 1, -1, -1): res.append((2 ** (n - 1)) + res[i]) return res
32.5
81
0.476923
class Solution: def grayCode(self, n: int) -> List[int]: if n == 0: return [0] if n == 1: return [0, 1] res = self.grayCode(n - 1) for i in range(len(res) - 1, -1, -1): res.append((2 ** (n - 1)) + res[i]) return res
true
true
f77a8e4ee325f80db5275a1ad56fe17cf55c0e59
9,008
py
Python
subcommand.py
augushong/depot_tools
a39e2d318b04122c783a6b6e30ae90e9a04e7929
[ "BSD-3-Clause" ]
4
2022-03-21T15:21:13.000Z
2022-03-23T16:31:20.000Z
subcommand.py
augushong/depot_tools
a39e2d318b04122c783a6b6e30ae90e9a04e7929
[ "BSD-3-Clause" ]
null
null
null
subcommand.py
augushong/depot_tools
a39e2d318b04122c783a6b6e30ae90e9a04e7929
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Manages subcommands in a script. Each subcommand should look like this: @usage('[pet name]') def CMDpet(parser, args): '''Prints a pet. Many...
34.381679
80
0.658637
import difflib import sys import textwrap def usage(more): def hook(fn): fn.usage_more = more return fn return hook def epilog(text): def hook(fn): fn.epilog = text return fn return hook def CMDhelp(parser, args): if not any(i in ('-h', '--help') for i in args): args = args + [...
true
true
f77a9128ed1f3ceeae7306f2afd3fe6107879e6d
4,950
py
Python
codes/TD3/agent.py
johnjim0816/rl-tutorials
5d271a43e7b24e9b0d982636d44159e25d4ae30e
[ "MIT" ]
33
2021-11-09T03:14:49.000Z
2022-03-29T03:31:04.000Z
codes/TD3/agent.py
johnjim0816/rl-tutorials
5d271a43e7b24e9b0d982636d44159e25d4ae30e
[ "MIT" ]
3
2021-11-16T08:52:00.000Z
2022-02-25T09:09:37.000Z
codes/TD3/agent.py
johnjim0816/rl-tutorials
5d271a43e7b24e9b0d982636d44159e25d4ae30e
[ "MIT" ]
11
2021-11-01T15:36:25.000Z
2022-03-29T03:06:45.000Z
#!/usr/bin/env python # coding=utf-8 ''' Author: JiangJi Email: johnjim0816@gmail.com Date: 2021-12-22 10:40:05 LastEditor: JiangJi LastEditTime: 2021-12-22 10:43:55 Discription: ''' import copy import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from TD3.memory import ReplayBuffer c...
27.808989
93
0.710505
import copy import numpy as np import torch import torch.nn as nn import torch.nn.functional as F from TD3.memory import ReplayBuffer class Actor(nn.Module): def __init__(self, input_dim, output_dim, max_action): super(Actor, self).__init__() self.l1 = nn.Linear(input_dim, 256) self.l2 = nn.Linear(256, 256) ...
true
true
f77a927eeabf52b5e71fac5b765671b7094184c3
8,948
py
Python
python/tvm/contrib/debugger/debug_runtime.py
mingwayzhang/tvm
3b287c4d4e6d83e6fd30db47ffa3d5481a332a63
[ "Apache-2.0" ]
286
2020-06-23T06:40:44.000Z
2022-03-30T01:27:49.000Z
python/tvm/contrib/debugger/debug_runtime.py
mingwayzhang/tvm
3b287c4d4e6d83e6fd30db47ffa3d5481a332a63
[ "Apache-2.0" ]
10
2020-07-31T03:26:59.000Z
2021-12-27T15:00:54.000Z
python/tvm/contrib/debugger/debug_runtime.py
mingwayzhang/tvm
3b287c4d4e6d83e6fd30db47ffa3d5481a332a63
[ "Apache-2.0" ]
42
2020-08-01T06:41:24.000Z
2022-01-20T10:33:08.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
34.415385
87
0.635226
import os import tempfile import shutil from tvm._ffi.base import string_types from tvm._ffi.function import get_global_func from tvm.contrib import graph_runtime from tvm.ndarray import array from tvm.rpc import base as rpc_base from . import debug_result _DUMP_ROOT_PREFIX = "tvmdbg_" _DUMP_PATH_PREFIX = "_tvmdbg_" ...
true
true
f77a9309025a97030a298b301d0d16d99d034e03
2,033
py
Python
wirehome.logical_devices.socket/1.0.0/script.py
pf56/Wirehome.Packages
d9cdfd4bed06763b552c3c4071cc75910f24e9e3
[ "Apache-2.0" ]
null
null
null
wirehome.logical_devices.socket/1.0.0/script.py
pf56/Wirehome.Packages
d9cdfd4bed06763b552c3c4071cc75910f24e9e3
[ "Apache-2.0" ]
null
null
null
wirehome.logical_devices.socket/1.0.0/script.py
pf56/Wirehome.Packages
d9cdfd4bed06763b552c3c4071cc75910f24e9e3
[ "Apache-2.0" ]
null
null
null
config = {} def process_logic_message(message): type = message.get("type", None) if type == "initialize": return __initialize__(message) elif type == "turn_off": return __set_state__("off") elif type == "turn_on": return __set_state__("on") elif type == "toggle": i...
26.402597
145
0.643876
config = {} def process_logic_message(message): type = message.get("type", None) if type == "initialize": return __initialize__(message) elif type == "turn_off": return __set_state__("off") elif type == "turn_on": return __set_state__("on") elif type == "toggle": i...
true
true
f77a931549d002ed6dd5283a004c78cd57a7cd3b
21,124
py
Python
bw_plex/audfprint/audfprint_match.py
Hellowlol/bw_plex
86768d6ee89ee1c08d2f6e6468976e4c51135915
[ "MIT" ]
371
2018-01-01T17:07:06.000Z
2022-03-30T01:52:28.000Z
bw_plex/audfprint/audfprint_match.py
Hellowlol/bw_plex
86768d6ee89ee1c08d2f6e6468976e4c51135915
[ "MIT" ]
144
2018-01-01T22:36:36.000Z
2022-01-31T19:26:55.000Z
bw_plex/audfprint/audfprint_match.py
Hellowlol/bw_plex
86768d6ee89ee1c08d2f6e6468976e4c51135915
[ "MIT" ]
44
2018-01-02T07:58:45.000Z
2021-11-30T10:53:52.000Z
# coding=utf-8 """ audfprint_match.py Fingerprint matching code for audfprint 2014-05-26 Dan Ellis dpwe@ee.columbia.edu """ from __future__ import division, print_function import os import time import psutil import matplotlib.pyplot as plt import librosa import numpy as np import scipy.signal from . import audfprin...
44.008333
106
0.557423
from __future__ import division, print_function import os import time import psutil import matplotlib.pyplot as plt import librosa import numpy as np import scipy.signal from . import audfprint_analyze from . import audio_read def process_info(): rss = usrtime = 0 p = psutil.Process(os.getpid()) if os....
true
true
f77a938fcbab00acd40be67d904aefa43b336e6a
4,390
py
Python
es2csv_cli.py
AndreyMarchuk/es2csv
7750b092ad43c732c9917473264906411372951a
[ "Apache-2.0" ]
null
null
null
es2csv_cli.py
AndreyMarchuk/es2csv
7750b092ad43c732c9917473264906411372951a
[ "Apache-2.0" ]
null
null
null
es2csv_cli.py
AndreyMarchuk/es2csv
7750b092ad43c732c9917473264906411372951a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ title: A CLI tool for exporting data from Elasticsearch into a CSV file. description: Command line utility, written in Python, for querying Elasticsearch in Lucene query syntax or Query DSL syntax and exporting result as documents into a CSV file. usage: es2csv -q '*' -...
73.166667
184
0.651025
import sys import argparse import es2csv __version__ = '5.5.2.post3' def main(): p = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter) p.add_argument('-q', '--query', dest='query', type=str, required=True, help='Query string in Lucene syntax.') p.add_argum...
true
true
f77a93b3fd5f81e51c776a22fa72233fd4bdb7f3
4,718
py
Python
benchmark/startQiskit_QC1911.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_QC1911.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
benchmark/startQiskit_QC1911.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=5 # total number=55 import cirq import qiskit from qiskit import IBMQ from qiskit.providers.ibmq import least_busy from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from ma...
33.225352
165
0.623569
import cirq import qiskit from qiskit import IBMQ from qiskit.providers.ibmq import least_busy from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister from qiskit import BasicAer, execute, transpile from pprint import pprint from qiskit.test.mock import FakeVigo from math import log2,floor, sqrt, pi impo...
true
true
f77a94079a20effaf4243cfa044f63fd5966111f
12,044
py
Python
examples/async_ssl_calculator_client.py
p4l1ly/pycapnp
73e83c91ee907fa1df7b3b3ab945a581238e755b
[ "BSD-2-Clause" ]
null
null
null
examples/async_ssl_calculator_client.py
p4l1ly/pycapnp
73e83c91ee907fa1df7b3b3ab945a581238e755b
[ "BSD-2-Clause" ]
null
null
null
examples/async_ssl_calculator_client.py
p4l1ly/pycapnp
73e83c91ee907fa1df7b3b3ab945a581238e755b
[ "BSD-2-Clause" ]
5
2021-08-20T11:56:36.000Z
2021-08-25T06:32:23.000Z
#!/usr/bin/env python3 import argparse import asyncio import os import socket import ssl import capnp import calculator_capnp this_dir = os.path.dirname(os.path.abspath(__file__)) class PowerFunction(calculator_capnp.Calculator.Function.Server): '''An implementation of the Function interface wrapping pow(). ...
34.022599
111
0.675357
import argparse import asyncio import os import socket import ssl import capnp import calculator_capnp this_dir = os.path.dirname(os.path.abspath(__file__)) class PowerFunction(calculator_capnp.Calculator.Function.Server): def call(self, params, **kwargs): return pow(params[0], params[1]) async d...
true
true
f77a942fa0c8c432112ec9ff4fed633324e1d209
1,389
py
Python
ui/webapp.py
DIVYA-19/haystack
d9f011da9a7a4eb4423f16b783b55fb034fd5c12
[ "Apache-2.0" ]
1
2021-02-08T14:28:02.000Z
2021-02-08T14:28:02.000Z
ui/webapp.py
DIVYA-19/haystack
d9f011da9a7a4eb4423f16b783b55fb034fd5c12
[ "Apache-2.0" ]
null
null
null
ui/webapp.py
DIVYA-19/haystack
d9f011da9a7a4eb4423f16b783b55fb034fd5c12
[ "Apache-2.0" ]
null
null
null
import streamlit as st from utils import retrieve_doc from annotated_text import annotated_text def annotate_answer(answer,context): start_idx = context.find(answer) end_idx = start_idx+len(answer) annotated_text(context[:start_idx],(answer,"ANSWER","#8ef"),context[end_idx:]) st.write("# Haystack De...
49.607143
113
0.704104
import streamlit as st from utils import retrieve_doc from annotated_text import annotated_text def annotate_answer(answer,context): start_idx = context.find(answer) end_idx = start_idx+len(answer) annotated_text(context[:start_idx],(answer,"ANSWER","#8ef"),context[end_idx:]) st.write("# Haystack De...
true
true
f77a94332935663aa6261bc4df5318112ea559bc
3,727
py
Python
src/kalman.py
rafcy/HarpyTM
e91d0b7cce4a21eada642d12e2d0604ace0c179f
[ "MIT" ]
18
2021-03-26T11:12:02.000Z
2021-11-18T02:55:03.000Z
src/kalman.py
rafcy/HarpyTM
e91d0b7cce4a21eada642d12e2d0604ace0c179f
[ "MIT" ]
null
null
null
src/kalman.py
rafcy/HarpyTM
e91d0b7cce4a21eada642d12e2d0604ace0c179f
[ "MIT" ]
6
2021-03-26T13:25:58.000Z
2021-05-08T01:09:16.000Z
import numpy as np from numpy.linalg import inv # Kalman Filter Class class KalmanFilter: """ Simple Kalman filter """ def __init__(self, XY, B=np.array([0]), M=np.array([0])): stateMatrix = np.zeros((4, 1), np.float32) # [x, y, delta_x, delta_y] if XY != 0: stateMatrix = ...
35.160377
112
0.515696
import numpy as np from numpy.linalg import inv class KalmanFilter: def __init__(self, XY, B=np.array([0]), M=np.array([0])): stateMatrix = np.zeros((4, 1), np.float32) if XY != 0: stateMatrix = np.array([[XY[0]], [XY[1]], [0], [0]], np.float32) estimateCovariance ...
true
true
f77a94f16899ef7160895312f14e5bcd07f9dc2f
5,494
py
Python
V2RaycSpider1225/src/BusinessLogicLayer/cluster/cook.py
QIN2DIM/V2RayCloudSpider
d52297aa7a37e4793b2291cddbed722006505a98
[ "MIT" ]
891
2020-06-03T00:02:31.000Z
2022-03-30T05:05:08.000Z
V2RaycSpider1225/src/BusinessLogicLayer/cluster/cook.py
pgy2022/V2RayCloudSpider
5c40dc5a76d08173dd1b361ae83bcb42f6a5b166
[ "MIT" ]
48
2020-09-24T18:47:29.000Z
2022-03-26T15:50:28.000Z
V2RaycSpider1225/src/BusinessLogicLayer/cluster/cook.py
pgy2022/V2RayCloudSpider
5c40dc5a76d08173dd1b361ae83bcb42f6a5b166
[ "MIT" ]
200
2020-09-14T01:16:38.000Z
2022-03-23T03:01:10.000Z
# TODO :demand:用于补充某种类型的链接,将抽象机场信息实例化 # 1. 遍历所有"可用"机场实例 # 2. 审核授权 # if 该机场不具备该类型链接的采集权限,剔除。 # elif 该机场同时具备其他类型的采集权限,权限收缩(改写),实例入队。 # else 该机场仅具备该类型任务的采集权限,实例入队。 __all__ = ["ActionShunt", "devil_king_armed", "reset_task"] from src.BusinessCentralLayer.setting import CRAWLER_SEQUENCE, CHROMEDRIVER_PATH from .maste...
31.94186
87
0.571897
__all__ = ["ActionShunt", "devil_king_armed", "reset_task"] from src.BusinessCentralLayer.setting import CRAWLER_SEQUENCE, CHROMEDRIVER_PATH from .master import ActionMasterGeneral from .slavers import __entropy__ class ActionShunt: def __init__(self, class_, silence=True, beat_sync=True): self.class_ = ...
true
true
f77a95b992694ac2587b23f9b14da2cba36b63cc
7,582
py
Python
ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
likenamehaojie/Apache-Ambari-ZH
5973025bd694cdbb4b49fb4c4e0d774782811ff6
[ "Apache-2.0" ]
1,664
2015-01-03T09:35:21.000Z
2022-03-31T04:55:24.000Z
ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
likenamehaojie/Apache-Ambari-ZH
5973025bd694cdbb4b49fb4c4e0d774782811ff6
[ "Apache-2.0" ]
3,018
2015-02-19T20:16:10.000Z
2021-11-13T20:47:48.000Z
ambari-server/src/test/python/custom_actions/test_ru_execute_tasks.py
likenamehaojie/Apache-Ambari-ZH
5973025bd694cdbb4b49fb4c4e0d774782811ff6
[ "Apache-2.0" ]
1,673
2015-01-06T14:14:42.000Z
2022-03-31T07:22:30.000Z
# !/usr/bin/env python ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"...
41.659341
161
0.761277
import os import json from ambari_commons.os_family_impl import OsFamilyFuncImpl, OsFamilyImpl from mock.mock import patch from mock.mock import MagicMock from stacks.utils.RMFTestCase import * from only_for_platform import not_for_platform, only_for_platform, os_distro_value, PLATFORM_WINDOWS from resource_manage...
true
true
f77a971e1ec9a0fe5cd214aaeeac2ddb6ce8b195
319
py
Python
src/models/__init__.py
sjakati98/CodeSearchNet
5ec30b2a8aaa586cc5c9bcc08d165ee8bf6a88c1
[ "MIT" ]
3
2019-12-22T17:45:28.000Z
2019-12-26T05:31:11.000Z
src/models/__init__.py
sjakati98/CodeSearchNet
5ec30b2a8aaa586cc5c9bcc08d165ee8bf6a88c1
[ "MIT" ]
5
2019-11-03T22:09:40.000Z
2019-12-10T04:52:42.000Z
src/models/__init__.py
sjakati98/CodeSearchNet
5ec30b2a8aaa586cc5c9bcc08d165ee8bf6a88c1
[ "MIT" ]
null
null
null
from .model import Model from .nbow_model import NeuralBoWModel from .rnn_model import RNNModel from .self_att_model import SelfAttentionModel from .conv_model import ConvolutionalModel from .conv_self_att_model import ConvSelfAttentionModel from .elmo_model import ElmoModel from .cbow_model import ContinuousBoWModel
35.444444
55
0.874608
from .model import Model from .nbow_model import NeuralBoWModel from .rnn_model import RNNModel from .self_att_model import SelfAttentionModel from .conv_model import ConvolutionalModel from .conv_self_att_model import ConvSelfAttentionModel from .elmo_model import ElmoModel from .cbow_model import ContinuousBoWModel
true
true