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
1c32a8a2a1ea62504b0b0a48f589f3eb0e8f8376
222
py
Python
generalapiwrapper/test_SteamworksWrapper.py
ECorpron/APIWrapper
8fddd5ba9256c56d529faca09fd7e09fcd6a844e
[ "CC0-1.0" ]
null
null
null
generalapiwrapper/test_SteamworksWrapper.py
ECorpron/APIWrapper
8fddd5ba9256c56d529faca09fd7e09fcd6a844e
[ "CC0-1.0" ]
null
null
null
generalapiwrapper/test_SteamworksWrapper.py
ECorpron/APIWrapper
8fddd5ba9256c56d529faca09fd7e09fcd6a844e
[ "CC0-1.0" ]
null
null
null
# As mentioned in TestAPIWrapper, I am not familiar with testing api calls # so this is something that I would like to add in the future. class TestSteamworksWrapper(): def testGetGameAchievements(self): pass
31.714286
74
0.752252
class TestSteamworksWrapper(): def testGetGameAchievements(self): pass
true
true
1c32aa6e6005e89cd1da77d33f4d806ef0817224
1,058
py
Python
tests/integration/installation_and_upgrade/test_data_consistancy.py
AlexTalker/integrated-manager-for-lustre
251099e5c776f3c1898af50bb7cc77924c7cf7c7
[ "MIT" ]
1
2021-02-08T16:59:14.000Z
2021-02-08T16:59:14.000Z
tests/integration/installation_and_upgrade/test_data_consistancy.py
AlexTalker/integrated-manager-for-lustre
251099e5c776f3c1898af50bb7cc77924c7cf7c7
[ "MIT" ]
null
null
null
tests/integration/installation_and_upgrade/test_data_consistancy.py
AlexTalker/integrated-manager-for-lustre
251099e5c776f3c1898af50bb7cc77924c7cf7c7
[ "MIT" ]
null
null
null
from tests.integration.installation_and_upgrade.test_installation_and_upgrade import TestInstallationAndUpgrade class TestAllEndPoints(TestInstallationAndUpgrade): def test_access_all_data_all_endpoints(self): """ Fetch all the data from all the end points """ # Some end points just can't be fetc...
39.185185
111
0.620983
from tests.integration.installation_and_upgrade.test_installation_and_upgrade import TestInstallationAndUpgrade class TestAllEndPoints(TestInstallationAndUpgrade): def test_access_all_data_all_endpoints(self): end_point_exceptions = [ "/api/help/", "/api/test_host/", ...
true
true
1c32ab045b8962e787b6429790061fb8695b5e7f
82,515
py
Python
tests/expressions/tests.py
coppfimm/django
915ac165763cad3fc6a4aff9bc42ac8607b46c4d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
tests/expressions/tests.py
coppfimm/django
915ac165763cad3fc6a4aff9bc42ac8607b46c4d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
tests/expressions/tests.py
coppfimm/django
915ac165763cad3fc6a4aff9bc42ac8607b46c4d
[ "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
null
null
null
import datetime import pickle import unittest import uuid from collections import namedtuple from copy import deepcopy from decimal import Decimal from unittest import mock from django.core.exceptions import FieldError from django.db import DatabaseError, NotSupportedError, connection from django.db.models import ( ...
42.402364
116
0.620408
import datetime import pickle import unittest import uuid from collections import namedtuple from copy import deepcopy from decimal import Decimal from unittest import mock from django.core.exceptions import FieldError from django.db import DatabaseError, NotSupportedError, connection from django.db.models import ( ...
true
true
1c32ab08df1cc376afa30d41b2722e1062722afb
1,248
py
Python
ampel/aux/SimpleTagFilter.py
mafn/Ampel-core
744acbf36f0a2ceae7230ceab1350236c1501b57
[ "BSD-3-Clause" ]
null
null
null
ampel/aux/SimpleTagFilter.py
mafn/Ampel-core
744acbf36f0a2ceae7230ceab1350236c1501b57
[ "BSD-3-Clause" ]
null
null
null
ampel/aux/SimpleTagFilter.py
mafn/Ampel-core
744acbf36f0a2ceae7230ceab1350236c1501b57
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: Ampel-core/ampel/aux/SimpleTagFilter.py # License: BSD-3-Clause # Author: Jakob van Santen <jakob.van.santen@desy.de> # Date: 06.12.2021 # Last Modified Date: 06.12.2021 # Last Modified By: Jakob van Santen ...
35.657143
75
0.647436
from ampel.types import Tag from ampel.abstract.AbsApplicable import AbsApplicable from ampel.content.DataPoint import DataPoint class SimpleTagFilter(AbsApplicable): require: None | list[Tag] = None forbid: None | list[Tag] = None def __init__(self, **kwargs): super().__init_...
true
true
1c32ab8dde7a37d392ee659a6ea689faa12727e2
39
py
Python
twistedchecker/test/__init__.py
twisted/twistedchecker
4a69f3f7d80f2f42d915bc128d4257a2e15804e4
[ "MIT" ]
10
2015-01-06T14:59:50.000Z
2021-01-10T19:06:16.000Z
twistedchecker/test/__init__.py
twisted/twistedchecker
4a69f3f7d80f2f42d915bc128d4257a2e15804e4
[ "MIT" ]
76
2015-02-07T13:00:22.000Z
2020-04-14T02:10:37.000Z
twistedchecker/test/__init__.py
twisted/twistedchecker
4a69f3f7d80f2f42d915bc128d4257a2e15804e4
[ "MIT" ]
11
2015-05-24T15:55:49.000Z
2017-10-15T11:34:35.000Z
""" Unit Tests for TwistedChecker. """
9.75
30
0.666667
true
true
1c32abaa628bec8a0c59f08ddbef8035e36be06a
517
py
Python
tests/test_ipfs_add.py
mathiasfrohlich/blockfrost-python
4b391a711683732c47fa9183532f14c189b75124
[ "Apache-2.0" ]
1
2022-01-17T14:26:05.000Z
2022-01-17T14:26:05.000Z
tests/test_ipfs_add.py
mathiasfrohlich/blockfrost-python
4b391a711683732c47fa9183532f14c189b75124
[ "Apache-2.0" ]
null
null
null
tests/test_ipfs_add.py
mathiasfrohlich/blockfrost-python
4b391a711683732c47fa9183532f14c189b75124
[ "Apache-2.0" ]
null
null
null
from blockfrost import BlockFrostIPFS, ApiError from blockfrost.ipfs.add import IPFSObjectResponse file_path = "README.md" def test_add(requests_mock): ipfs = BlockFrostIPFS() mock_data = { "name": file_path, "ipfs_hash": "QmZbHqiCxKEVX7QfijzJTkZiSi3WEVTcvANgNAWzDYgZDr", "size": 12529...
30.411765
75
0.727273
from blockfrost import BlockFrostIPFS, ApiError from blockfrost.ipfs.add import IPFSObjectResponse file_path = "README.md" def test_add(requests_mock): ipfs = BlockFrostIPFS() mock_data = { "name": file_path, "ipfs_hash": "QmZbHqiCxKEVX7QfijzJTkZiSi3WEVTcvANgNAWzDYgZDr", "size": 12529...
true
true
1c32acc88d168bc376ec29f2eae66ac341eab896
18,510
py
Python
stacker/blueprints/base.py
scrthq/stacker
3cdfbd543f82d6805435ac9fa2655bf31e436cc4
[ "BSD-2-Clause" ]
1
2018-07-17T11:23:47.000Z
2018-07-17T11:23:47.000Z
stacker/blueprints/base.py
scrthq/stacker
3cdfbd543f82d6805435ac9fa2655bf31e436cc4
[ "BSD-2-Clause" ]
2
2019-02-05T21:36:05.000Z
2019-02-08T22:16:42.000Z
stacker/blueprints/base.py
scrthq/stacker
3cdfbd543f82d6805435ac9fa2655bf31e436cc4
[ "BSD-2-Clause" ]
1
2020-02-29T04:49:11.000Z
2020-02-29T04:49:11.000Z
from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import str from past.builtins import basestring from builtins import object import copy import hashlib import logging import string from stacker.util import read_value_from_path from stacker.variab...
33.053571
107
0.622474
from __future__ import print_function from __future__ import division from __future__ import absolute_import from builtins import str from past.builtins import basestring from builtins import object import copy import hashlib import logging import string from stacker.util import read_value_from_path from stacker.variab...
true
true
1c32ad1b4981abe93c3f66a5517ee15f7662ec65
407
py
Python
Part_3_advanced/m03_date_and_time/date_construct/homework_1_start/main.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_3_advanced/m03_date_and_time/date_construct/homework_1_start/main.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_3_advanced/m03_date_and_time/date_construct/homework_1_start/main.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
from new_movies import movies_ranking from new_movies.random_data_utility import random_generator def run_example(): some_movies = random_generator.generate_random_movies(movies_number=15) movies_ranking.print_top_movies(some_movies) # movies_ranking.print_top_movies(some_movies, limit=12) # movies_ra...
29.071429
75
0.805897
from new_movies import movies_ranking from new_movies.random_data_utility import random_generator def run_example(): some_movies = random_generator.generate_random_movies(movies_number=15) movies_ranking.print_top_movies(some_movies) if __name__ == "__main__": run_example()
true
true
1c32ad3d236fe6ddd50443cf1f6b99698ac7bdc6
2,958
py
Python
test/loader/loader.py
ameserole/Naumachia
dc13c33c5fcf053c74dfce8351a696d28857fd9d
[ "MIT" ]
null
null
null
test/loader/loader.py
ameserole/Naumachia
dc13c33c5fcf053c74dfce8351a696d28857fd9d
[ "MIT" ]
null
null
null
test/loader/loader.py
ameserole/Naumachia
dc13c33c5fcf053c74dfce8351a696d28857fd9d
[ "MIT" ]
null
null
null
from urllib.parse import urljoin from db import Db import requests import os import re import json import logging import random import string import redis import yaml testcn_pattern = r'test[a-zA-Z]{32}' script_dir = os.path.dirname(os.path.realpath(__file__)) REGISTRAR_URL = os.environ.get('REGISTRAR_URL', 'http://l...
34.395349
113
0.644016
from urllib.parse import urljoin from db import Db import requests import os import re import json import logging import random import string import redis import yaml testcn_pattern = r'test[a-zA-Z]{32}' script_dir = os.path.dirname(os.path.realpath(__file__)) REGISTRAR_URL = os.environ.get('REGISTRAR_URL', 'http://l...
true
true
1c32ae12ebcc78a1b009081906dc246c710134e2
5,914
py
Python
tests/pytests/unit/modules/virt/conftest.py
dirkmueller/salt
f9558f82307a81d29b083c1ba3d713d0bb239354
[ "Apache-2.0" ]
null
null
null
tests/pytests/unit/modules/virt/conftest.py
dirkmueller/salt
f9558f82307a81d29b083c1ba3d713d0bb239354
[ "Apache-2.0" ]
null
null
null
tests/pytests/unit/modules/virt/conftest.py
dirkmueller/salt
f9558f82307a81d29b083c1ba3d713d0bb239354
[ "Apache-2.0" ]
null
null
null
import pytest import salt.modules.config as config import salt.modules.virt as virt from salt._compat import ElementTree as ET from tests.support.mock import MagicMock class LibvirtMock(MagicMock): # pylint: disable=too-many-ancestors """ Libvirt library mock """ class virDomain(MagicMock): ...
30.802083
84
0.611769
import pytest import salt.modules.config as config import salt.modules.virt as virt from salt._compat import ElementTree as ET from tests.support.mock import MagicMock class LibvirtMock(MagicMock): class virDomain(MagicMock): class libvirtError(Exception): def __init__(self, msg): sup...
true
true
1c32b056b0adb053ca4604c722481eb2fb2b6a1e
2,233
py
Python
tests/slice_test.py
yohplala/vaex
ca7927a19d259576ca0403ee207a597aaef6adc2
[ "MIT" ]
1
2020-11-27T08:49:18.000Z
2020-11-27T08:49:18.000Z
tests/slice_test.py
yohplala/vaex
ca7927a19d259576ca0403ee207a597aaef6adc2
[ "MIT" ]
null
null
null
tests/slice_test.py
yohplala/vaex
ca7927a19d259576ca0403ee207a597aaef6adc2
[ "MIT" ]
null
null
null
import pytest from common import * def test_slice_expression(df): assert df.x[:2].tolist() == df[:2].x.tolist() assert df.x[2:6].tolist() == df[2:6].x.tolist() assert df.x[-3:].tolist() == df[-3:].x.tolist() # we don't support non 1 steps # assert df.x[::-3].tolist() == df[::-3].x.tolist() def t...
29
87
0.622929
import pytest from common import * def test_slice_expression(df): assert df.x[:2].tolist() == df[:2].x.tolist() assert df.x[2:6].tolist() == df[2:6].x.tolist() assert df.x[-3:].tolist() == df[-3:].x.tolist() # assert df.x[::-3].tolist() == df[::-3].x.tolist() def test_slice_against_numpy(df): ...
true
true
1c32b07e30bd3542e714624d35aa16df31270ecc
1,790
py
Python
Iris_Deploy.py
DanielCalimayor/DS-Unit-3-Sprint-3-Productization-and-Cloud
d1479de0badb674daf9cbb8b5f738d214de831ed
[ "MIT" ]
null
null
null
Iris_Deploy.py
DanielCalimayor/DS-Unit-3-Sprint-3-Productization-and-Cloud
d1479de0badb674daf9cbb8b5f738d214de831ed
[ "MIT" ]
null
null
null
Iris_Deploy.py
DanielCalimayor/DS-Unit-3-Sprint-3-Productization-and-Cloud
d1479de0badb674daf9cbb8b5f738d214de831ed
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[ ]: #pip install pickle-mixin # In[1]: #import the basics but important libraries import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns #Sklearn Preprocessing from sklearn.preprocessing import LabelEncoder from sklearn.model_selec...
10.170455
138
0.672626
import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import train_test_split from sklearn.metrics import accuracy_score, classification_report from sklearn.tree import DecisionTreeClassifie...
true
true
1c32b0c57831827048b8dbacc63ac057b4af9b30
17,326
py
Python
homeassistant/components/mqtt/light/schema_json.py
boojew/home-assistant
697c331903f8a440a4ce324a4fb0788351dc86c3
[ "Apache-2.0" ]
1
2019-05-19T08:05:02.000Z
2019-05-19T08:05:02.000Z
homeassistant/components/mqtt/light/schema_json.py
boojew/home-assistant
697c331903f8a440a4ce324a4fb0788351dc86c3
[ "Apache-2.0" ]
6
2021-02-08T21:02:40.000Z
2022-03-12T00:52:16.000Z
homeassistant/components/mqtt/light/schema_json.py
boojew/home-assistant
697c331903f8a440a4ce324a4fb0788351dc86c3
[ "Apache-2.0" ]
null
null
null
""" Support for MQTT JSON lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.mqtt_json/ """ import json import logging import voluptuous as vol from homeassistant.components import mqtt from homeassistant.components.light import ( ATTR_BR...
36.246862
79
0.616588
import json import logging import voluptuous as vol from homeassistant.components import mqtt from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_EFFECT, ATTR_FLASH, ATTR_HS_COLOR, ATTR_TRANSITION, ATTR_WHITE_VALUE, FLASH_LONG, FLASH_SHORT, SUPPORT_BRIGHTNESS, SUPPORT_COLOR...
true
true
1c32b184f46700426a11d5fd1157683e7e2958c8
5,913
py
Python
tfx/extensions/google_cloud_ai_platform/tuner/executor_test.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
null
null
null
tfx/extensions/google_cloud_ai_platform/tuner/executor_test.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
null
null
null
tfx/extensions/google_cloud_ai_platform/tuner/executor_test.py
avelez93/tfx
75fbb6a7d50e99138609be3ca4c3a204a13a2195
[ "Apache-2.0" ]
1
2020-12-13T22:07:53.000Z
2020-12-13T22:07:53.000Z
# Copyright 2020 Google LLC. 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 a...
38.647059
100
0.70066
import copy import os from typing import Any, Dict from unittest import mock import tensorflow as tf from tfx.extensions.google_cloud_ai_platform import constants from tfx.extensions.google_cloud_ai_platform.trainer import executor as ai_platform_trainer_executor from tfx.extensions.google_cloud_ai_platf...
true
true
1c32b1ab805272c3b7c8593a9b1c385e93812605
8,377
py
Python
homeassistant/components/enigma2/media_player.py
learn-home-automation/core
c5d8792c3487e9b418b1e7d623bf59e7dbddd6b7
[ "Apache-2.0" ]
22,481
2020-03-02T13:09:59.000Z
2022-03-31T23:34:28.000Z
homeassistant/components/enigma2/media_player.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
31,101
2020-03-02T13:00:16.000Z
2022-03-31T23:57:36.000Z
homeassistant/components/enigma2/media_player.py
jagadeeshvenkatesh/core
1bd982668449815fee2105478569f8e4b5670add
[ "Apache-2.0" ]
11,411
2020-03-02T14:19:20.000Z
2022-03-31T22:46:07.000Z
"""Support for Enigma2 media players.""" from openwebif.api import CreateDevice import voluptuous as vol from homeassistant.components.media_player import MediaPlayerEntity from homeassistant.components.media_player.const import ( MEDIA_TYPE_TVSHOW, SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PREVIOUS_T...
30.797794
85
0.676256
from openwebif.api import CreateDevice import voluptuous as vol from homeassistant.components.media_player import MediaPlayerEntity from homeassistant.components.media_player.const import ( MEDIA_TYPE_TVSHOW, SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PREVIOUS_TRACK, SUPPORT_SELECT_SOURCE, SUPP...
true
true
1c32b21103d9965df8d0584bef0eb83f78080ed7
2,581
py
Python
cuda/onegram_rrnn.py
dodgejesse/rational-recurrences
4d126903399cc4a86734733d037a9bb7c5dda93d
[ "MIT" ]
7
2019-09-09T06:25:20.000Z
2020-03-21T13:53:43.000Z
cuda/onegram_rrnn.py
dodgejesse/rational-recurrences
4d126903399cc4a86734733d037a9bb7c5dda93d
[ "MIT" ]
1
2020-12-13T14:26:03.000Z
2020-12-13T14:26:03.000Z
cuda/onegram_rrnn.py
dodgejesse/rational-recurrences
4d126903399cc4a86734733d037a9bb7c5dda93d
[ "MIT" ]
1
2019-11-24T12:47:21.000Z
2019-11-24T12:47:21.000Z
ONEGRAM_RRNN = """ extern "C" { __global__ void rrnn_fwd( const float * __restrict__ u, const float * __restrict__ c1_init, const int len, const int batch, const int dim, const int k, floa...
29.329545
82
0.43859
ONEGRAM_RRNN = """ extern "C" { __global__ void rrnn_fwd( const float * __restrict__ u, const float * __restrict__ c1_init, const int len, const int batch, const int dim, const int k, floa...
true
true
1c32b265d90b33b936a3b38914a3e461f1359324
20,144
py
Python
src/provisioning/models.py
litedesk/litedesk-webserver-provision
1576b9d3e5e2e64d1136d276767c2710cfb1938f
[ "Apache-2.0" ]
1
2016-01-18T08:19:22.000Z
2016-01-18T08:19:22.000Z
src/provisioning/models.py
litedesk/litedesk-webserver-provision
1576b9d3e5e2e64d1136d276767c2710cfb1938f
[ "Apache-2.0" ]
null
null
null
src/provisioning/models.py
litedesk/litedesk-webserver-provision
1576b9d3e5e2e64d1136d276767c2710cfb1938f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2014, Deutsche Telekom AG - Laboratories (T-Labs) # # 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...
33.131579
90
0.633191
import os import logging import datetime from urlparse import urlparse from autoslug import AutoSlugField from django.conf import settings from django.core.mail import send_mail from django.db import models from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttyp...
false
true
1c32b2826520d61f621a1b187296b68c17e23093
659
py
Python
src/brouwers/conf/travis.py
modelbrouwers/modelbrouwers
e0ba4819bf726d6144c0a648fdd4731cdc098a52
[ "MIT" ]
6
2015-03-03T13:23:07.000Z
2021-12-19T18:12:41.000Z
src/brouwers/conf/travis.py
modelbrouwers/modelbrouwers
e0ba4819bf726d6144c0a648fdd4731cdc098a52
[ "MIT" ]
95
2015-02-07T00:55:39.000Z
2022-02-08T20:22:05.000Z
src/brouwers/conf/travis.py
modelbrouwers/modelbrouwers
e0ba4819bf726d6144c0a648fdd4731cdc098a52
[ "MIT" ]
2
2016-03-22T16:53:26.000Z
2019-02-09T22:46:04.000Z
import os os.environ.setdefault("SECRET_KEY", "travis-key") os.environ.setdefault("IS_HTTPS", "no") os.environ.setdefault("DB_NAME", "brouwers") os.environ.setdefault("DB_USER", "postgres") os.environ.setdefault("DB_PASSWORD", "") from .base import * # noqa isort:skip # Secrets DATABASES["mysql"] = {"ENGINE": "dja...
22.724138
81
0.734446
import os os.environ.setdefault("SECRET_KEY", "travis-key") os.environ.setdefault("IS_HTTPS", "no") os.environ.setdefault("DB_NAME", "brouwers") os.environ.setdefault("DB_USER", "postgres") os.environ.setdefault("DB_PASSWORD", "") from .base import * DATABASES["mysql"] = {"ENGINE": "django.db.backends.sqlite3", ...
true
true
1c32b43e4c148db4b606236f42a2f2577905a7e2
6,359
py
Python
aioarangodb/client.py
ckdanny/aioarangodb
432ac3701c1ca32bed2021ef510c724cd543f39f
[ "MIT" ]
17
2020-06-11T20:26:41.000Z
2021-04-03T19:07:57.000Z
aioarangodb/client.py
ckdanny/aioarangodb
432ac3701c1ca32bed2021ef510c724cd543f39f
[ "MIT" ]
5
2021-06-24T13:31:16.000Z
2022-03-09T11:28:04.000Z
aioarangodb/client.py
ckdanny/aioarangodb
432ac3701c1ca32bed2021ef510c724cd543f39f
[ "MIT" ]
4
2020-09-12T11:52:41.000Z
2021-04-21T19:30:00.000Z
from __future__ import absolute_import, unicode_literals import json from six import string_types __all__ = ['ArangoClient'] from .connection import ( BasicConnection, JWTConnection, JWTSuperuserConnection ) from .database import StandardDatabase from .exceptions import ServerConnectionError from .http ...
36.130682
79
0.611731
from __future__ import absolute_import, unicode_literals import json from six import string_types __all__ = ['ArangoClient'] from .connection import ( BasicConnection, JWTConnection, JWTSuperuserConnection ) from .database import StandardDatabase from .exceptions import ServerConnectionError from .http ...
true
true
1c32b4965cd39a3830378f9064a6396f12e4d4ac
2,114
py
Python
saspy/__init__.py
metllord/saspy
324dd76c5769355f4130186c99b5e907350ca205
[ "Apache-2.0" ]
1
2020-05-28T17:30:46.000Z
2020-05-28T17:30:46.000Z
saspy/__init__.py
metllord/saspy
324dd76c5769355f4130186c99b5e907350ca205
[ "Apache-2.0" ]
null
null
null
saspy/__init__.py
metllord/saspy
324dd76c5769355f4130186c99b5e907350ca205
[ "Apache-2.0" ]
null
null
null
# # Copyright SAS Institute # # 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 in writing...
30.2
102
0.703879
from __future__ import absolute_import from __future__ import division from __future__ import print_function from saspy.version import __version__ from saspy.sasbase import SASsession, SASconfig, list_configs from saspy.sasdata import SASdata from saspy.sasexceptions import SASIONotSupportedError, SASC...
true
true
1c32b619b21812aea2744ec4477398c202b9057c
3,920
py
Python
gym_gvgai/envs/gvgai_env.py
joeljosephjin/gvgai-rl
57281629c313abb43312950b22d043a3d67639cf
[ "Apache-2.0" ]
null
null
null
gym_gvgai/envs/gvgai_env.py
joeljosephjin/gvgai-rl
57281629c313abb43312950b22d043a3d67639cf
[ "Apache-2.0" ]
null
null
null
gym_gvgai/envs/gvgai_env.py
joeljosephjin/gvgai-rl
57281629c313abb43312950b22d043a3d67639cf
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Simulate VGDL Games """ import sys from os import path import numpy as np dir = path.dirname(__file__) gvgai_path = path.join(dir, "gvgai", "clients", "GVGAI-PythonClient", "src", "utils") sys.path.append(gvgai_path) import gym from gym import error, spaces, utils im...
30.866142
158
0.557143
import sys from os import path import numpy as np dir = path.dirname(__file__) gvgai_path = path.join(dir, "gvgai", "clients", "GVGAI-PythonClient", "src", "utils") sys.path.append(gvgai_path) import gym from gym import error, spaces, utils import ClientCommGYM as gvgai class GVGAI_Env(gym.Env): def __init__...
true
true
1c32b63182e3843d4781fc4ffb7434839531e4cc
1,011
py
Python
openproblems/tasks/_batch_integration/batch_integration_graph/metrics/ari.py
scottgigante-immunai/openproblems
d093c1a2f21715d98e07ec760eff2c8f50c68373
[ "MIT" ]
null
null
null
openproblems/tasks/_batch_integration/batch_integration_graph/metrics/ari.py
scottgigante-immunai/openproblems
d093c1a2f21715d98e07ec760eff2c8f50c68373
[ "MIT" ]
null
null
null
openproblems/tasks/_batch_integration/batch_integration_graph/metrics/ari.py
scottgigante-immunai/openproblems
d093c1a2f21715d98e07ec760eff2c8f50c68373
[ "MIT" ]
null
null
null
from .....tools.decorators import metric """ The Rand index compares the overlap of two clusterings; it considers both correct clustering overlaps while also counting correct disagreements between two clusterings. Similar to NMI, we compared the cell-type labels with the NMI-optimized Louvain clustering computed on th...
30.636364
81
0.726014
from .....tools.decorators import metric @metric( metric_name="ARI", maximize=True, image="openproblems-python-batch-integration", ) def ari(adata): from scib.metrics import ari from scib.metrics.clustering import opt_louvain opt_louvain( adata, label_key="labels", ...
true
true
1c32b6bda5245b70134b39bad44d9245efa72c04
5,608
py
Python
examples/indoor.py
cnheider/MinkowskiEngine
ae6db31203ba012df2f695576e2d3819d49bf2d7
[ "MIT" ]
null
null
null
examples/indoor.py
cnheider/MinkowskiEngine
ae6db31203ba012df2f695576e2d3819d49bf2d7
[ "MIT" ]
null
null
null
examples/indoor.py
cnheider/MinkowskiEngine
ae6db31203ba012df2f695576e2d3819d49bf2d7
[ "MIT" ]
1
2022-02-27T10:44:31.000Z
2022-02-27T10:44:31.000Z
# Copyright (c) Chris Choy (chrischoy@ai.stanford.edu). # # 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 # use, copy, modify, ...
35.719745
97
0.637839
# Networks", CVPR'19 (https://arxiv.org/abs/1904.08755) if you use any part # of the code. import os import argparse import numpy as np from urllib.request import urlretrieve try: import open3d as o3d except ImportError: raise ImportError('Please install open3d with `pip install open3d`.') ...
true
true
1c32b6fc1860b7fe41b96112f2204db29b88735e
3,434
py
Python
dataset/transform.py
AcodeC/video
5d4497621cba764dc51ae22b10e1196c6e9e28bc
[ "MIT" ]
23
2018-12-14T12:45:19.000Z
2022-03-13T07:31:46.000Z
dataset/transform.py
AcodeC/video
5d4497621cba764dc51ae22b10e1196c6e9e28bc
[ "MIT" ]
3
2018-12-18T19:07:11.000Z
2019-01-16T16:41:55.000Z
dataset/transform.py
AcodeC/video
5d4497621cba764dc51ae22b10e1196c6e9e28bc
[ "MIT" ]
8
2018-12-20T12:41:59.000Z
2020-11-09T11:12:06.000Z
import math import re import string import numpy as np import torch class UniformSample: def __init__(self, n_sample): self.n_sample = n_sample def __call__(self, frames): n_frames = len(frames) if n_frames < self.n_sample: return frames sample_indices = [ int(i)...
23.682759
93
0.62551
import math import re import string import numpy as np import torch class UniformSample: def __init__(self, n_sample): self.n_sample = n_sample def __call__(self, frames): n_frames = len(frames) if n_frames < self.n_sample: return frames sample_indices = [ int(i)...
true
true
1c32b763016a1c8a4b6126d8abb45c71d372978f
10,551
py
Python
infrastructure-provisioning/src/general/scripts/gcp/deeplearning_configure.py
ofuks/DLab
460804a2559843d099936fe40373093f9bf9edcb
[ "Apache-2.0" ]
null
null
null
infrastructure-provisioning/src/general/scripts/gcp/deeplearning_configure.py
ofuks/DLab
460804a2559843d099936fe40373093f9bf9edcb
[ "Apache-2.0" ]
null
null
null
infrastructure-provisioning/src/general/scripts/gcp/deeplearning_configure.py
ofuks/DLab
460804a2559843d099936fe40373093f9bf9edcb
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM SYSTEMS INC # # 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 # #...
50.725962
130
0.604019
import logging import json import sys from dlab.fab import * from dlab.meta_lib import * from dlab.actions_lib import * import os if __name__ == "__main__": local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['edge_user_name'], ...
true
true
1c32b79b708f112bdff89c86039028c44360ec78
14,446
py
Python
scripts/constants/constants.py
sriramkswamy/kobuki-multi-agent-network
976157ca701be63018cd13538431c2adafbe7f9a
[ "MIT" ]
null
null
null
scripts/constants/constants.py
sriramkswamy/kobuki-multi-agent-network
976157ca701be63018cd13538431c2adafbe7f9a
[ "MIT" ]
null
null
null
scripts/constants/constants.py
sriramkswamy/kobuki-multi-agent-network
976157ca701be63018cd13538431c2adafbe7f9a
[ "MIT" ]
null
null
null
import os import sys import inspect from math import pi # folder containing the output data EXPTS_BASE_DATA_FOLDER = (os.path.realpath( os.path.abspath( os.path.split( os.path.dirname(inspect.getfile(inspect.currentframe())))[0]))) EXPTS_BASE_DATA_FOLDER = os.path.join(EXPTS_BASE_DATA_FOLDER, '...
62.808696
124
0.74775
import os import sys import inspect from math import pi EXPTS_BASE_DATA_FOLDER = (os.path.realpath( os.path.abspath( os.path.split( os.path.dirname(inspect.getfile(inspect.currentframe())))[0]))) EXPTS_BASE_DATA_FOLDER = os.path.join(EXPTS_BASE_DATA_FOLDER, 'data', 'expts', '') EXPTS_BASE_PL...
true
true
1c32b7b845744e864bc1c3f8c00f02adb11330da
53
py
Python
inac8hr/imports.py
th-bunratta/8hr.insomniac
5173500a1ad7197096d513b38258aa65b035fcf3
[ "BSD-3-Clause" ]
null
null
null
inac8hr/imports.py
th-bunratta/8hr.insomniac
5173500a1ad7197096d513b38258aa65b035fcf3
[ "BSD-3-Clause" ]
null
null
null
inac8hr/imports.py
th-bunratta/8hr.insomniac
5173500a1ad7197096d513b38258aa65b035fcf3
[ "BSD-3-Clause" ]
null
null
null
from inac8hr.wrappers.inac8hr_arcade.sprite import *
26.5
52
0.849057
from inac8hr.wrappers.inac8hr_arcade.sprite import *
true
true
1c32b7f4e2e8580bc12dc9ae384db0c41e48d3c3
4,270
py
Python
utm2wgs.py
Kevo89/UTM2LatLong
79d1063da3f2ae1e7a9aae43b58021b01ff2a855
[ "MIT" ]
4
2017-03-09T22:19:31.000Z
2020-02-19T16:23:17.000Z
utm2wgs.py
Kevo89/UTM2LatLong
79d1063da3f2ae1e7a9aae43b58021b01ff2a855
[ "MIT" ]
null
null
null
utm2wgs.py
Kevo89/UTM2LatLong
79d1063da3f2ae1e7a9aae43b58021b01ff2a855
[ "MIT" ]
1
2019-08-09T00:32:48.000Z
2019-08-09T00:32:48.000Z
#---------------------------- # UTM to WGS84 Converter # # Python Version # #---------------------------- # Adapted from Node-coordinator Project (https://github.com/beatgammit/node-coordinator) # # Original and this version released under MIT License (Provided below as per licensing) # # Copyright (c) 2...
44.947368
257
0.65644
import math def utmToLatLong(utmNorthing, utmEasting, utmZone): eastingOffset = 500000.0 northingOffset = 10000000.0 k0 = 0.9996 equatorialRadius = 6378137.0 eccSquared = 0.006694380023 eccPrimeSquared = eccSquared / (1 - eccSquared) e1 = (1 - math.sqrt(1 -...
false
true
1c32b8911fad87127d03edfe8e86d02ba78a3fe0
9,218
py
Python
aries_cloudagent/config/argparse.py
Patrik-Stas/aries-cloudagent-python
28f4b59b11db72568084070e4e6c1576c298f03d
[ "Apache-2.0" ]
null
null
null
aries_cloudagent/config/argparse.py
Patrik-Stas/aries-cloudagent-python
28f4b59b11db72568084070e4e6c1576c298f03d
[ "Apache-2.0" ]
null
null
null
aries_cloudagent/config/argparse.py
Patrik-Stas/aries-cloudagent-python
28f4b59b11db72568084070e4e6c1576c298f03d
[ "Apache-2.0" ]
null
null
null
"""Command line option parsing.""" import os import argparse from typing import Sequence PARSER = argparse.ArgumentParser(description="Runs an Aries Cloud Agent.") PARSER.add_argument( "-it", "--inbound-transport", dest="inbound_transports", type=str, action="append", nargs=3, required=...
26.039548
86
0.669993
import os import argparse from typing import Sequence PARSER = argparse.ArgumentParser(description="Runs an Aries Cloud Agent.") PARSER.add_argument( "-it", "--inbound-transport", dest="inbound_transports", type=str, action="append", nargs=3, required=True, metavar=("<module>", "<ho...
true
true
1c32b8a716fff04e983de872a823ae7a7301c97c
198
py
Python
molo/surveys/admin_urls.py
praekelt/molo.surveys
c86d231f7cee669eb1c91db49ec05cf711984e30
[ "BSD-3-Clause" ]
null
null
null
molo/surveys/admin_urls.py
praekelt/molo.surveys
c86d231f7cee669eb1c91db49ec05cf711984e30
[ "BSD-3-Clause" ]
88
2016-06-14T18:36:18.000Z
2018-09-21T07:33:58.000Z
molo/surveys/admin_urls.py
praekeltfoundation/molo.surveys
c86d231f7cee669eb1c91db49ec05cf711984e30
[ "BSD-3-Clause" ]
1
2017-10-02T09:27:45.000Z
2017-10-02T09:27:45.000Z
from django.conf.urls import url from molo.surveys.views import index urlpatterns = [ # re-route to overwritten index view, originally in wagtailsurveys url(r'^$', index, name='index'), ]
22
70
0.717172
from django.conf.urls import url from molo.surveys.views import index urlpatterns = [ url(r'^$', index, name='index'), ]
true
true
1c32b909397498ff4375230c5fafdb28c659683a
2,030
py
Python
source/services/giphy.py
skonik/vk-cat-bot
8002e6974da1f2dc2dcb81b51cfefb75879f2d24
[ "MIT" ]
null
null
null
source/services/giphy.py
skonik/vk-cat-bot
8002e6974da1f2dc2dcb81b51cfefb75879f2d24
[ "MIT" ]
1
2021-06-02T00:16:03.000Z
2021-06-02T00:16:03.000Z
source/services/giphy.py
skonik/vk-cat-bot
8002e6974da1f2dc2dcb81b51cfefb75879f2d24
[ "MIT" ]
null
null
null
import io import re import json import aiohttp class GiphyMethodsMeta(type): GIPHY_API_METHODS_URL = 'https://api.giphy.com/v1/' allowed_methods = re.compile(r'gifs') def __new__(cls, name, bases, dct): for attr_name, attr_value in dct.items(): if cls.allowed_methods.match(attr_name)...
32.741935
97
0.614778
import io import re import json import aiohttp class GiphyMethodsMeta(type): GIPHY_API_METHODS_URL = 'https://api.giphy.com/v1/' allowed_methods = re.compile(r'gifs') def __new__(cls, name, bases, dct): for attr_name, attr_value in dct.items(): if cls.allowed_methods.match(attr_name)...
true
true
1c32b9172303fb54d84a0f56fa397803ccc87d99
238
py
Python
Mundo 1-Fundamentos/PythonExercicios/ex023.py
JotaPeGabriel/curso-em-video-python3
141a9bec8acd7513c10768494fee5c86282dfa75
[ "MIT" ]
null
null
null
Mundo 1-Fundamentos/PythonExercicios/ex023.py
JotaPeGabriel/curso-em-video-python3
141a9bec8acd7513c10768494fee5c86282dfa75
[ "MIT" ]
null
null
null
Mundo 1-Fundamentos/PythonExercicios/ex023.py
JotaPeGabriel/curso-em-video-python3
141a9bec8acd7513c10768494fee5c86282dfa75
[ "MIT" ]
null
null
null
num = int(input("Digite um numero de 0 a 9999: ")) uni = num // 1 % 10 dez = num // 10 % 10 cen = num // 100 % 10 mil = num // 1000 % 10 print(f'''O numero digitado foi: {num} Unidade: {uni} dezena: {dez} Centena: {cen} Milhar: {mil}''')
21.636364
50
0.588235
num = int(input("Digite um numero de 0 a 9999: ")) uni = num // 1 % 10 dez = num // 10 % 10 cen = num // 100 % 10 mil = num // 1000 % 10 print(f'''O numero digitado foi: {num} Unidade: {uni} dezena: {dez} Centena: {cen} Milhar: {mil}''')
true
true
1c32ba4303f378b2390b94e61729cf0bc77089a1
2,058
py
Python
scripts/mask-alignment.py
albernsrya/spheres-augur-build
fdc7866aa73c07508e2e4811f5b74b385736ad79
[ "Apache-2.0" ]
1
2021-07-03T14:05:19.000Z
2021-07-03T14:05:19.000Z
scripts/mask-alignment.py
albernsrya/spheres-augur-build
fdc7866aa73c07508e2e4811f5b74b385736ad79
[ "Apache-2.0" ]
null
null
null
scripts/mask-alignment.py
albernsrya/spheres-augur-build
fdc7866aa73c07508e2e4811f5b74b385736ad79
[ "Apache-2.0" ]
null
null
null
""" Mask initial bases from alignment FASTA """ import argparse import Bio import Bio.SeqIO from Bio.Seq import Seq def mask_terminal_gaps(seq): L = len(seq) seq_trimmed = seq.lstrip('-') left_gaps = L - len(seq_trimmed) seq_trimmed = seq_trimmed.rstrip('-') right_gaps = L - len(seq_trimmed) - left...
38.830189
144
0.650632
import argparse import Bio import Bio.SeqIO from Bio.Seq import Seq def mask_terminal_gaps(seq): L = len(seq) seq_trimmed = seq.lstrip('-') left_gaps = L - len(seq_trimmed) seq_trimmed = seq_trimmed.rstrip('-') right_gaps = L - len(seq_trimmed) - left_gaps return "N"*left_gaps + seq_trimmed + "...
true
true
1c32ba78dc18ff3d51a570448d94b7e738fa37ea
358
py
Python
Rotating donut.py
Mario263/Hacktoberfest_2021
57965f48d3b19d25d2c0b75525eab4c4dce0157a
[ "MIT" ]
16
2021-10-15T08:41:52.000Z
2022-01-02T11:14:30.000Z
Rotating donut.py
Mario263/Hacktoberfest_2021
57965f48d3b19d25d2c0b75525eab4c4dce0157a
[ "MIT" ]
5
2021-10-17T06:04:41.000Z
2021-10-30T16:45:40.000Z
Rotating donut.py
Mario263/Hacktoberfest_2021
57965f48d3b19d25d2c0b75525eab4c4dce0157a
[ "MIT" ]
43
2021-10-15T14:03:48.000Z
2022-03-09T21:32:46.000Z
from vpython import * canvas(background= color.purple) donut = ring(radius=0.5, thickness=0.25, color=vector(400, 100, 1)) chocolate = ring(radius=0.55, thickness=0.25, color=vector(0.4, 0.2, 0)) rad = 0 while True: rate(10) donut.pos = vector(3*cos(rad), sin(rad), 0) chocolate.pos = vector(3*cos(ra...
35.8
73
0.639665
from vpython import * canvas(background= color.purple) donut = ring(radius=0.5, thickness=0.25, color=vector(400, 100, 1)) chocolate = ring(radius=0.55, thickness=0.25, color=vector(0.4, 0.2, 0)) rad = 0 while True: rate(10) donut.pos = vector(3*cos(rad), sin(rad), 0) chocolate.pos = vector(3*cos(ra...
true
true
1c32bb2bde13ef8d4136b6393918978e0551a9c2
277
py
Python
fdap/utils/loggeradapter.py
miniyus/AutomaticPosting-Python
0627066e60d5cd474ed858e1567bcf6b5b1d9336
[ "MIT" ]
null
null
null
fdap/utils/loggeradapter.py
miniyus/AutomaticPosting-Python
0627066e60d5cd474ed858e1567bcf6b5b1d9336
[ "MIT" ]
1
2021-11-06T02:30:37.000Z
2021-11-06T02:30:37.000Z
fdap/utils/loggeradapter.py
miniyus/AutomaticPosting-Python
0627066e60d5cd474ed858e1567bcf6b5b1d9336
[ "MIT" ]
null
null
null
import logging class LoggerAdapter(logging.LoggerAdapter): def __init__(self, prefix, logger): super(LoggerAdapter, self).__init__(logger, {}) self.prefix = prefix def process(self, msg, kwargs): return '[%s] %s' % (self.prefix, msg), kwargs
25.181818
55
0.649819
import logging class LoggerAdapter(logging.LoggerAdapter): def __init__(self, prefix, logger): super(LoggerAdapter, self).__init__(logger, {}) self.prefix = prefix def process(self, msg, kwargs): return '[%s] %s' % (self.prefix, msg), kwargs
true
true
1c32bb5567a439d03bdb2f1993bc61fd4e88448f
1,128
py
Python
oneflow/python/framework/generator.py
wanghongsheng01/oneflow_cambricon
187faaa2cb9ba995080ba22499b6219c2d36f0ac
[ "Apache-2.0" ]
null
null
null
oneflow/python/framework/generator.py
wanghongsheng01/oneflow_cambricon
187faaa2cb9ba995080ba22499b6219c2d36f0ac
[ "Apache-2.0" ]
null
null
null
oneflow/python/framework/generator.py
wanghongsheng01/oneflow_cambricon
187faaa2cb9ba995080ba22499b6219c2d36f0ac
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow Authors. 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 agr...
32.228571
72
0.779255
from __future__ import absolute_import import oneflow import oneflow._oneflow_internal from oneflow.python.oneflow_export import oneflow_export @oneflow_export("Generator") def MakeGenerator(device=None, seed=None): if device is None: device = "auto" if seed is None: return oneflow._oneflow_in...
true
true
1c32bc14a129f0ae18754f98f17e46ae45610067
12,868
py
Python
models/lights.py
elena-chiculita/PieShine
288f526902906e2dbf6463c214edaa1c608302dc
[ "MIT" ]
null
null
null
models/lights.py
elena-chiculita/PieShine
288f526902906e2dbf6463c214edaa1c608302dc
[ "MIT" ]
1
2016-12-10T04:06:17.000Z
2016-12-10T22:46:04.000Z
models/lights.py
elena-chiculita/PieShine
288f526902906e2dbf6463c214edaa1c608302dc
[ "MIT" ]
null
null
null
import time from models.utils.comms import Comms from models.utils.userobj import UserObj from models.utils.callableobj import CallableObj from models.utils.testobj import TestObj from models.utils.color import Gamut REFRESH_TIMEOUT = 5 # Associate a model id with a gamut. ModelsGamut = { 'LCT001': 'B', 'LCT...
33.336788
136
0.578178
import time from models.utils.comms import Comms from models.utils.userobj import UserObj from models.utils.callableobj import CallableObj from models.utils.testobj import TestObj from models.utils.color import Gamut REFRESH_TIMEOUT = 5 ModelsGamut = { 'LCT001': 'B', 'LCT002': 'B', 'LCT003': 'B', 'L...
true
true
1c32bc3560154a4414ff7fb012ff5c5d11236aac
3,673
py
Python
FluentPython/concurrency_with_asyncio/flag2_asyncio.py
xu6148152/Binea_Python_Project
d943eb5f4685d08f080b372dcf1a7cbd5d63efed
[ "MIT" ]
null
null
null
FluentPython/concurrency_with_asyncio/flag2_asyncio.py
xu6148152/Binea_Python_Project
d943eb5f4685d08f080b372dcf1a7cbd5d63efed
[ "MIT" ]
null
null
null
FluentPython/concurrency_with_asyncio/flag2_asyncio.py
xu6148152/Binea_Python_Project
d943eb5f4685d08f080b372dcf1a7cbd5d63efed
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- encoding: utf-8 -*- import asyncio import collections import aiohttp from aiohttp import web import tqdm from concurrency_futures.flags2_common import main, HTTPStatus, Result, save_flag # default set low to avoid errors from remote site, such as # 503 - Service Temporarily Unavailable D...
29.620968
117
0.642254
import asyncio import collections import aiohttp from aiohttp import web import tqdm from concurrency_futures.flags2_common import main, HTTPStatus, Result, save_flag DEFAULT_CONCUR_REQ = 5 MAX_CONCUR_REQ = 1000 class FetchError(Exception): def __init__(self, country_code): self.country_code = coun...
true
true
1c32bcec0553e370ac4baffa77df6bcc9051b48b
397
py
Python
tests/test_binomial.py
fau-klue/pandas-association-measures
80625936d8c25afc81810a5c82b2b7fff66a375c
[ "MIT" ]
5
2020-07-30T08:17:53.000Z
2021-12-09T09:00:03.000Z
tests/test_binomial.py
fau-klue/pandas-association-measures
80625936d8c25afc81810a5c82b2b7fff66a375c
[ "MIT" ]
11
2019-04-14T21:28:25.000Z
2021-12-07T10:35:49.000Z
tests/test_binomial.py
fau-klue/pandas-association-measures
80625936d8c25afc81810a5c82b2b7fff66a375c
[ "MIT" ]
null
null
null
import pytest from association_measures import binomial as bi @pytest.mark.binomial def test_choose(): assert bi.choose(9, 3) == 84 assert bi.choose(5, 2) == 10 assert bi.choose(2, 2) == 1 assert bi.choose(0, 0) == 1 assert bi.choose(-3, 5) == 0 assert bi.choose(-2, -2) == 0 assert bi.ch...
23.352941
58
0.629723
import pytest from association_measures import binomial as bi @pytest.mark.binomial def test_choose(): assert bi.choose(9, 3) == 84 assert bi.choose(5, 2) == 10 assert bi.choose(2, 2) == 1 assert bi.choose(0, 0) == 1 assert bi.choose(-3, 5) == 0 assert bi.choose(-2, -2) == 0 assert bi.ch...
true
true
1c32be0998b0394d9fa7382a2b7e68a4e0aa3b72
2,962
py
Python
src/ktop/widget_dashboard.py
deathbeds/ktop
b9ff55af75980526337ea1903bda83ccf1bf2f1e
[ "BSD-3-Clause" ]
null
null
null
src/ktop/widget_dashboard.py
deathbeds/ktop
b9ff55af75980526337ea1903bda83ccf1bf2f1e
[ "BSD-3-Clause" ]
1
2018-01-19T17:11:40.000Z
2018-01-19T17:11:40.000Z
src/ktop/widget_dashboard.py
deathbeds/ktop
b9ff55af75980526337ea1903bda83ccf1bf2f1e
[ "BSD-3-Clause" ]
null
null
null
import traitlets as T import ipywidgets as W class DefaultKernelView(W.VBox): """ Show a kernel """ def __init__(self, *args, **kwargs): kernel = kwargs.pop("kernel") super(DefaultKernelView, self).__init__(*args, **kwargs) progress = W.FloatProgress(min=0.0, max=1.0) wid...
27.425926
73
0.497974
import traitlets as T import ipywidgets as W class DefaultKernelView(W.VBox): def __init__(self, *args, **kwargs): kernel = kwargs.pop("kernel") super(DefaultKernelView, self).__init__(*args, **kwargs) progress = W.FloatProgress(min=0.0, max=1.0) widgets = W.VBox() shutdo...
true
true
1c32bef877f7c9cf27ab6520cf26b17fc8852996
5,118
py
Python
zodiac_circle_v2.2.py
DCRHallum/Zodiac-Circle
9a121f982bd2a813e4fa8aee725b7949703f2564
[ "CC0-1.0" ]
null
null
null
zodiac_circle_v2.2.py
DCRHallum/Zodiac-Circle
9a121f982bd2a813e4fa8aee725b7949703f2564
[ "CC0-1.0" ]
null
null
null
zodiac_circle_v2.2.py
DCRHallum/Zodiac-Circle
9a121f982bd2a813e4fa8aee725b7949703f2564
[ "CC0-1.0" ]
null
null
null
zodiac_signs = ['aries','taurus','gemini','cancer','leo','virgo','libra','scorpio','sagittarius','capricorn','aquarius','pisces'] fin_zodiac_signs = ['Aries','Taurus','Gemini','Cancer','Leo','Virgo','Libra','Scorpio','Sagittarius','Capricorn','Aquarius','Pisces'] houses = ['Mars','Venus','Mercury','The Moon','The Sun...
33.45098
175
0.655334
zodiac_signs = ['aries','taurus','gemini','cancer','leo','virgo','libra','scorpio','sagittarius','capricorn','aquarius','pisces'] fin_zodiac_signs = ['Aries','Taurus','Gemini','Cancer','Leo','Virgo','Libra','Scorpio','Sagittarius','Capricorn','Aquarius','Pisces'] houses = ['Mars','Venus','Mercury','The Moon','The Sun...
true
true
1c32c03775f8c3d36f64ba55ad12508fc9bcf5e2
4,699
py
Python
createaddr.py
xcbtrader/multi-btc-address-create
7904b30dfe9457cd669bd113e28fb74ec1be3350
[ "MIT" ]
null
null
null
createaddr.py
xcbtrader/multi-btc-address-create
7904b30dfe9457cd669bd113e28fb74ec1be3350
[ "MIT" ]
null
null
null
createaddr.py
xcbtrader/multi-btc-address-create
7904b30dfe9457cd669bd113e28fb74ec1be3350
[ "MIT" ]
null
null
null
__author__ = 'deunido' #!/usr/bin/env python # -*- coding: utf-8 -*- from bitcoin import * from tkinter import * from tkinter import ttk, font import sys import requests import json class Aplicacion(): def __init__(self): self.raiz = Tk() self.raiz.geometry("700x305") self.raiz.resizable(width=F...
34.807407
216
0.662269
__author__ = 'deunido' from bitcoin import * from tkinter import * from tkinter import ttk, font import sys import requests import json class Aplicacion(): def __init__(self): self.raiz = Tk() self.raiz.geometry("700x305") self.raiz.resizable(width=False, height=False) self.raiz.title("Multi...
true
true
1c32c2c431f709326d664e14c7f2c6b0b119b490
1,031
py
Python
detect_mask_and_ocr.py
isomorphicdude/Highlighted-Text-OCR
07557bf77172b5e411f83352d8c4a6ba1b46fe6a
[ "MIT" ]
null
null
null
detect_mask_and_ocr.py
isomorphicdude/Highlighted-Text-OCR
07557bf77172b5e411f83352d8c4a6ba1b46fe6a
[ "MIT" ]
null
null
null
detect_mask_and_ocr.py
isomorphicdude/Highlighted-Text-OCR
07557bf77172b5e411f83352d8c4a6ba1b46fe6a
[ "MIT" ]
null
null
null
import cv2 import numpy as np import torch import easyocr # Reading the image img = cv2.imread('image.jpg') #define kernel size kernel = np.ones((7,7),np.uint8) # convert to hsv colorspace hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) # lower bound and upper bound for Green color # lower_bound =...
25.146341
55
0.694471
import cv2 import numpy as np import torch import easyocr img = cv2.imread('image.jpg') kernel = np.ones((7,7),np.uint8) hsv = cv2.cvtColor(img, cv2.COLOR_BGR2HSV) lower_bound = np.array([20, 80, 80]) upper_bound = np.array([30, 255, 255]) mask = cv2.inRange(hsv, lower_bound, upper...
true
true
1c32c3186b313f3e843531f74356fcc5f1147f9b
45,071
py
Python
pkgs/conf-pkg/src/genie/libs/conf/l2vpn/iosxr/bridge_domain.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
94
2018-04-30T20:29:15.000Z
2022-03-29T13:40:31.000Z
pkgs/conf-pkg/src/genie/libs/conf/l2vpn/iosxr/bridge_domain.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
67
2018-12-06T21:08:09.000Z
2022-03-29T18:00:46.000Z
pkgs/conf-pkg/src/genie/libs/conf/l2vpn/iosxr/bridge_domain.py
miott/genielibs
6464642cdd67aa2367bdbb12561af4bb060e5e62
[ "Apache-2.0" ]
49
2018-06-29T18:59:03.000Z
2022-03-10T02:07:59.000Z
from abc import ABC import warnings import contextlib from genie.conf.base.attributes import UnsupportedAttributeWarning,\ AttributesHelper from genie.conf.base.cli import CliConfigBuilder from genie.conf.base.config import CliConfig from genie.libs.conf.interface import BviInterface from genie.libs.conf.l2vpn.p...
85.039623
191
0.609305
from abc import ABC import warnings import contextlib from genie.conf.base.attributes import UnsupportedAttributeWarning,\ AttributesHelper from genie.conf.base.cli import CliConfigBuilder from genie.conf.base.config import CliConfig from genie.libs.conf.interface import BviInterface from genie.libs.conf.l2vpn.p...
true
true
1c32c430911cda1f536110a33edb83aad3b2f3d6
64,678
py
Python
python/pyspark/pandas/internal.py
amwufiv/spark
b50d4507f52315d5f6d75c617e845248a1c828a9
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
7
2015-02-05T10:57:54.000Z
2022-01-12T08:52:54.000Z
python/pyspark/pandas/internal.py
amwufiv/spark
b50d4507f52315d5f6d75c617e845248a1c828a9
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
27
2021-04-14T16:44:15.000Z
2022-03-13T00:35:17.000Z
python/pyspark/pandas/internal.py
amwufiv/spark
b50d4507f52315d5f6d75c617e845248a1c828a9
[ "BSD-2-Clause", "Apache-2.0", "CC0-1.0", "MIT", "MIT-0", "ECL-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
6
2022-01-24T20:07:59.000Z
2022-01-25T16:11:34.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 us...
40.172671
106
0.581434
import re from typing import Any, Dict, List, Optional, Sequence, Tuple, Union, TYPE_CHECKING, cast import numpy as np import pandas as pd from pandas.api.types import CategoricalDtype from pyspark._globals import _NoValue, _NoValueType from pyspark.sql import functions as F, Column, DataFrame as Sp...
true
true
1c32c4bd87d48b8ecbc4afc1533f653fe99d2f0f
3,387
py
Python
exot/util/analysers.py
ETHZ-TEC/exot_eengine
7b7ce6cb949e1b0a02e716b03f2f9af751713b29
[ "BSD-3-Clause" ]
null
null
null
exot/util/analysers.py
ETHZ-TEC/exot_eengine
7b7ce6cb949e1b0a02e716b03f2f9af751713b29
[ "BSD-3-Clause" ]
null
null
null
exot/util/analysers.py
ETHZ-TEC/exot_eengine
7b7ce6cb949e1b0a02e716b03f2f9af751713b29
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2015-2020, Swiss Federal Institute of Technology (ETH Zurich) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright...
40.807229
92
0.679658
import numpy as np import pandas as pd from exot.util.attributedict import LabelMapping def all_labels_in_dataset(experiment, sort_str=False, **kwargs): for key in ["phase", "labelcolumn", "io"]: if key not in kwargs.keys(): raise ValueError(f"key {key} not specifi...
true
true
1c32c5bf3ef61e16be2fe366d916eb5e61b98c5c
7,985
py
Python
docs/conf.py
tony/sphinx-argparse
dcf53c8092e87e375388f8691a28254fbbd7ac24
[ "MIT" ]
null
null
null
docs/conf.py
tony/sphinx-argparse
dcf53c8092e87e375388f8691a28254fbbd7ac24
[ "MIT" ]
null
null
null
docs/conf.py
tony/sphinx-argparse
dcf53c8092e87e375388f8691a28254fbbd7ac24
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # sphinx-argparse documentation build configuration file, created by # sphinx-quickstart on Thu Jan 31 15:13:43 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file....
32.45935
100
0.717721
import sys, os sys.path.insert(0, os.path.abspath('..')) extensions = ['sphinx.ext.autodoc', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.viewcode'] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'sphinx-argparse' copyright = u'2013, A...
true
true
1c32c6c2808bf6c3550db9b366434945d7d62c09
3,371
py
Python
kin.py
yuri-almeid/Snackin-Assistant
750aa6c0b29a810ee5d3fb85a24ccc5a384e25b0
[ "Apache-2.0" ]
1
2021-06-12T13:43:39.000Z
2021-06-12T13:43:39.000Z
kin.py
yuri-almeid/Snackin-Assistant
750aa6c0b29a810ee5d3fb85a24ccc5a384e25b0
[ "Apache-2.0" ]
null
null
null
kin.py
yuri-almeid/Snackin-Assistant
750aa6c0b29a810ee5d3fb85a24ccc5a384e25b0
[ "Apache-2.0" ]
null
null
null
## Importando Módulos from ibm_watson import TextToSpeechV1 # Biblioteca IBM Watson para TTS from ibm_cloud_sdk_core.authenticators import IAMAuthenticator # Biblioteca IBM Watson para autenticação da API from datetime import datetime # módulo de tempo from datetime import date # Módulo de tempo (data) import random i...
29.831858
113
0.613171
ort TextToSpeechV1 from ibm_cloud_sdk_core.authenticators import IAMAuthenticator from datetime import datetime from datetime import date import random import os def IBM_auth(): print(" >>> Iniciando autenticação do IBM Watson...") print() CQk5et-VDTSpApnG9dDG2e' url = 'https://api.us-south.text-to-spee...
true
true
1c32c6ccaac73c2b146765c6a92a1e99e7b49e0f
4,484
py
Python
windcraft/text.py
marchdf/windcraft
9334864171f10c7a2fa1f0da71938551cc45465a
[ "Apache-2.0" ]
null
null
null
windcraft/text.py
marchdf/windcraft
9334864171f10c7a2fa1f0da71938551cc45465a
[ "Apache-2.0" ]
2
2018-03-12T23:41:26.000Z
2018-03-16T16:19:28.000Z
windcraft/text.py
marchdf/windcraft
9334864171f10c7a2fa1f0da71938551cc45465a
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 National Renewable Energy Laboratory. This software # is released under the license detailed in the file, LICENSE, which # is located in the top-level directory structure. # ======================================================================== # # Imports # # =======================================...
41.906542
86
0.48595
import pygame import windcraft.colors as colors import windcraft.fonts as fonts class Text(): def __init__(self): self.colors = colors.Colors() self.fonts = fonts.Fonts() self.yoffset = 0.03 * pygame.display.get_surface().get_height() def display(self, screen, num_turbi...
true
true
1c32c6ed3176ab052d74abbd5c969a01cd06cee4
10,605
py
Python
test/test_provider_notification_subscriptions_api.py
vericred/vericred-python
be45691c821a595c3d77a561b2ca33049b1239b4
[ "Apache-2.0" ]
3
2016-08-10T23:39:11.000Z
2021-08-25T02:39:39.000Z
test/test_provider_notification_subscriptions_api.py
vericred/vericred-python
be45691c821a595c3d77a561b2ca33049b1239b4
[ "Apache-2.0" ]
2
2016-05-27T12:44:08.000Z
2016-08-24T18:19:36.000Z
test/test_provider_notification_subscriptions_api.py
vericred/vericred-python
be45691c821a595c3d77a561b2ca33049b1239b4
[ "Apache-2.0" ]
4
2016-05-27T08:18:14.000Z
2021-08-25T02:41:18.000Z
# coding: utf-8 """ Vericred API Vericred's API allows you to search for Health Plans that a specific doctor accepts. ## Getting Started Visit our [Developer Portal](https://developers.vericred.com) to create an account. Once you have created an account, you can create one Application for Production and an...
39.570896
228
0.671759
from __future__ import absolute_import import os import sys import unittest import vericred_client from vericred_client.rest import ApiException from vericred_client.apis.provider_notification_subscriptions_api import ProviderNotificationSubscriptionsApi class TestProviderNotificationSubscriptionsApi(unittest.Te...
true
true
1c32c7f89a9fed5d1178980ccfdbc998795f0171
1,592
py
Python
lib/surface/ml_engine/jobs/describe.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
null
null
null
lib/surface/ml_engine/jobs/describe.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
null
null
null
lib/surface/ml_engine/jobs/describe.py
bopopescu/Google-Cloud-SDK-1
c4683bacb2f6192d8a816932e438a0493085469b
[ "Apache-2.0" ]
1
2020-07-24T20:13:29.000Z
2020-07-24T20:13:29.000Z
# Copyright 2016 Google Inc. 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 ag...
33.87234
74
0.759422
from googlecloudsdk.api_lib.ml_engine import jobs from googlecloudsdk.calliope import base from googlecloudsdk.command_lib.ml_engine import flags from googlecloudsdk.command_lib.ml_engine import jobs_util from googlecloudsdk.core import log def _AddDescribeArgs(parser): flags.JOB_NAME.AddToParser(pars...
true
true
1c32c88929975fdde3db41aa931defc525144752
4,526
py
Python
phyutil/phyapp/common/tornado/auth/crowd.py
frib-high-level-controls/phyhlc
6486607e3aa0212054a12e9f2ad1a3ef15542f48
[ "BSD-3-Clause" ]
1
2018-03-22T15:18:54.000Z
2018-03-22T15:18:54.000Z
phyutil/phyapp/common/tornado/auth/crowd.py
frib-high-level-controls/phyhlc
6486607e3aa0212054a12e9f2ad1a3ef15542f48
[ "BSD-3-Clause" ]
null
null
null
phyutil/phyapp/common/tornado/auth/crowd.py
frib-high-level-controls/phyhlc
6486607e3aa0212054a12e9f2ad1a3ef15542f48
[ "BSD-3-Clause" ]
null
null
null
# encoding: UTF-8 # # Copyright (c) 2015, Facility for Rare Isotope Beams # # """ Implements authentication support using the Atlassian Crowd service RESTful API. .. moduleauthor:: Dylan Maxwell <maxwelld@frib.msu.edu> """ from __future__ import absolute_import from __future__ import division from __future__ import ...
32.561151
88
0.659744
from __future__ import absolute_import from __future__ import division from __future__ import print_function import time import logging from tornado.gen import coroutine from tornado.gen import Return from tornado.httputil import HTTPHeaders from tornado.httpclient import HTTPError from tornado.httpclient impo...
true
true
1c32c8e2b728f4959affb9559606f07c687dac76
1,656
py
Python
cyrax/events.py
piranha/cyrax
fd1c0473f0c69631339b2a5476933b00f604c643
[ "0BSD" ]
10
2015-12-18T22:39:02.000Z
2021-03-03T15:11:05.000Z
cyrax/events.py
piranha/cyrax
fd1c0473f0c69631339b2a5476933b00f604c643
[ "0BSD" ]
9
2016-01-01T09:28:13.000Z
2019-12-17T09:39:15.000Z
cyrax/events.py
piranha/cyrax
fd1c0473f0c69631339b2a5476933b00f604c643
[ "0BSD" ]
9
2015-12-31T23:18:07.000Z
2020-08-10T10:56:46.000Z
# -*- coding: utf-8 -*- """ cyrax.events ~~~~~~~~~~~~~~~ :copyright: 2007-2008 by Armin Ronacher as glashammer.utils.events :copyright: 2009 by Alexander Solovyov :license: MIT """ import logging from collections import deque try: from sys import intern except ImportError: pass logger ...
25.476923
79
0.610507
import logging from collections import deque try: from sys import intern except ImportError: pass logger = logging.getLogger(__name__) class EventManager(object): def __init__(self): self._listeners = {} self._last_listener = 0 def connect(self, event, callback, prepend=False)...
true
true
1c32c949f32cd734de31efaf4aa3e2b1f1b83a1c
5,754
py
Python
qlib/data/base.py
minkefusiji/qlib
5ee2d9496b2ffb261b2ec077b1aac88298938040
[ "MIT" ]
2
2021-11-09T05:12:36.000Z
2021-11-09T05:12:40.000Z
qlib/data/base.py
GuBuChang/qlib
7b15682c637106d4da0801e942d889c5615ebb70
[ "MIT" ]
null
null
null
qlib/data/base.py
GuBuChang/qlib
7b15682c637106d4da0801e942d889c5615ebb70
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from __future__ import division from __future__ import print_function import abc import pandas as pd from ..log import get_module_logger class Expression(abc.ABC): """Expression base class""" def __str__(self): return type(s...
24.381356
100
0.607404
from __future__ import division from __future__ import print_function import abc import pandas as pd from ..log import get_module_logger class Expression(abc.ABC): def __str__(self): return type(self).__name__ def __repr__(self): return str(self) def __gt__(self, other): f...
true
true
1c32c97738a15cff439f8342b36199b82ae5409a
3,902
py
Python
kmip/tests/unit/core/test_policy.py
vbnmmnbv/PyKMIP
4617ae528006178c466fe3945a477f568b596940
[ "Apache-2.0" ]
12
2016-09-14T21:59:10.000Z
2020-03-11T07:37:25.000Z
kmip/tests/unit/core/test_policy.py
vbnmmnbv/PyKMIP
4617ae528006178c466fe3945a477f568b596940
[ "Apache-2.0" ]
null
null
null
kmip/tests/unit/core/test_policy.py
vbnmmnbv/PyKMIP
4617ae528006178c466fe3945a477f568b596940
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2016 The Johns Hopkins University/Applied Physics Laboratory # 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/LICEN...
29.78626
76
0.59021
import shutil import tempfile import testtools from kmip.core import enums from kmip.core import policy class TestPolicy(testtools.TestCase): def setUp(self): super(TestPolicy, self).setUp() self.temp_dir = tempfile.mkdtemp() self.addCleanup(shutil.rmtree, self.temp_dir) ...
true
true
1c32ca2f342192aa11548e66287cc2d2ff6b0c83
10,104
py
Python
pyHeatTransfer/conduction.py
OSUmageed/pyHeatTransfer
b1db8ca7594a657826a1ccfb38a4e4eb102cce55
[ "MIT" ]
3
2017-07-30T19:01:21.000Z
2021-06-03T23:28:16.000Z
pyHeatTransfer/conduction.py
OSUmageed/pyHeatTransfer
b1db8ca7594a657826a1ccfb38a4e4eb102cce55
[ "MIT" ]
null
null
null
pyHeatTransfer/conduction.py
OSUmageed/pyHeatTransfer
b1db8ca7594a657826a1ccfb38a4e4eb102cce55
[ "MIT" ]
1
2020-06-28T08:28:59.000Z
2020-06-28T08:28:59.000Z
#I suppose the idea is that it gets these values from somewhere and takes off. #Regardless of where those values come from. import os import os.path as op import sys import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import CoolProp.CoolProp as cp import collections import time imp...
29.630499
140
0.538104
import os import os.path as op import sys import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import CoolProp.CoolProp as cp import collections import time import random from deco import concurrent, synchronized sourcepath = op.abspath(op.dirname(__file__)) gitpath = op.dirname...
true
true
1c32ca3aa49e20ae7571a8f8bceee4c37493a328
6,188
py
Python
model/DynamicPricing.py
pranavsb/RL_smart_grid
b23b407d3c873171d9a2af6d5a0104a7bcadc6cd
[ "MIT" ]
8
2019-09-06T08:05:23.000Z
2022-03-24T23:40:55.000Z
model/DynamicPricing.py
pranavsb/RL_smart_grid
b23b407d3c873171d9a2af6d5a0104a7bcadc6cd
[ "MIT" ]
1
2020-10-30T13:00:49.000Z
2021-01-28T04:18:34.000Z
model/DynamicPricing.py
pranavsb/RL_smart_grid
b23b407d3c873171d9a2af6d5a0104a7bcadc6cd
[ "MIT" ]
3
2020-09-12T16:21:44.000Z
2020-11-05T20:33:34.000Z
from Environment import Environment from QTableAgent import QTableAgent import time, os import numpy as np import pickle from Utils import get_battery_reward_factor SOURCE_DEMAND_STATE = 'demand' SOURCE_SMART_LOADS = True SOURCE_LEARNING_RATE = 0.03 SOURCE_DISCOUNT_FACTOR = 0.95 SOURCE_NUM_LOADS = 10 SOURCE_MODE = 'va...
40.444444
173
0.627182
from Environment import Environment from QTableAgent import QTableAgent import time, os import numpy as np import pickle from Utils import get_battery_reward_factor SOURCE_DEMAND_STATE = 'demand' SOURCE_SMART_LOADS = True SOURCE_LEARNING_RATE = 0.03 SOURCE_DISCOUNT_FACTOR = 0.95 SOURCE_NUM_LOADS = 10 SOURCE_MODE = 'va...
true
true
1c32cb7103a6a39e5bcb355a0f36e5866914d3b6
298,432
py
Python
src/oci/os_management/os_management_client.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
3
2020-09-10T22:09:45.000Z
2021-12-24T17:00:07.000Z
src/oci/os_management/os_management_client.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/os_management/os_management_client.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
48.336897
262
0.647632
from __future__ import absolute_import from oci._vendor import requests from oci._vendor import six from oci import retry, circuit_breaker from oci.base_client import BaseClient from oci.config import get_config_value_or_default, validate_config from oci.signer import Signer from oci.util import Sentinel, get...
true
true
1c32cbf02d8a965ded2df7baac755640a4f074e0
2,501
py
Python
kornia/contrib/max_blur_pool.py
IEM-Computer-Vision/kornia
f98bd9a2158a6e59cda076d55d476acf13f4e0af
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
kornia/contrib/max_blur_pool.py
IEM-Computer-Vision/kornia
f98bd9a2158a6e59cda076d55d476acf13f4e0af
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
kornia/contrib/max_blur_pool.py
IEM-Computer-Vision/kornia
f98bd9a2158a6e59cda076d55d476acf13f4e0af
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from typing import Tuple import torch import torch.nn as nn import torch.nn.functional as F from kornia.geometry.transform.pyramid import pyrdown __all__ = [ "max_blur_pool2d", "MaxBlurPool2d", ] def _compute_zero_padding(kernel_size: Tuple[int, int]) -> Tuple[int, int]: """Computes zero padding tuple....
31.658228
100
0.62615
from typing import Tuple import torch import torch.nn as nn import torch.nn.functional as F from kornia.geometry.transform.pyramid import pyrdown __all__ = [ "max_blur_pool2d", "MaxBlurPool2d", ] def _compute_zero_padding(kernel_size: Tuple[int, int]) -> Tuple[int, int]: padding = [(k - 1) // 2 for k i...
true
true
1c32cc54145a5ead761dc49d1c6ae9962191bca9
502
py
Python
python/tuples.py
Shaimyst/toy-problems
3ed20f7cba90504f0711f58c387d30db23be858b
[ "MIT" ]
null
null
null
python/tuples.py
Shaimyst/toy-problems
3ed20f7cba90504f0711f58c387d30db23be858b
[ "MIT" ]
null
null
null
python/tuples.py
Shaimyst/toy-problems
3ed20f7cba90504f0711f58c387d30db23be858b
[ "MIT" ]
null
null
null
# Task # Given an integer, 'n', and 'n' space-separated integers as input, create a tuple, 't', # of those integers. Then compute and print the result of hash(t). # Sample Input 0 # 2 # 1 2 # Sample Output 0 # 3713081631934410656 if __name__ == '__main__': n = int(raw_input()) integer_list = map(int, raw_i...
22.818182
88
0.661355
if __name__ == '__main__': n = int(raw_input()) integer_list = map(int, raw_input().split()) my_tuple = tuple(integer_list) print(hash(my_tuple))
true
true
1c32cdf46dce0ec761ecdb963bbacea91f05c4a1
1,395
py
Python
python-opcua/timetable_parser.py
ssriblo/ionic-smarthome-test-1
060bc247e0b8295d6cd869d90b364756515cfc19
[ "MIT" ]
1
2020-12-18T15:18:19.000Z
2020-12-18T15:18:19.000Z
python-opcua/timetable_parser.py
ssriblo/ionic-smarthome-test-1
060bc247e0b8295d6cd869d90b364756515cfc19
[ "MIT" ]
42
2020-08-20T04:01:12.000Z
2021-01-09T18:50:21.000Z
python-opcua/timetable_parser.py
ssriblo/ionic-smarthome-test-1
060bc247e0b8295d6cd869d90b364756515cfc19
[ "MIT" ]
null
null
null
import numpy as np import sys import json class DataParserTT(object): def __init__(self): pass # Let convert from string to json: # def timetableParser(self, str): # ob = self.obj a = [None]*16 print(f"\n\nstr type", type(str), str) # магическим образом э...
31
123
0.424373
import numpy as np import sys import json class DataParserTT(object): def __init__(self): pass def timetableParser(self, str): a = [None]*16 print(f"\n\nstr type", type(str), str) ob = json.loads(str) try: if (ob['mode'] == "TimeTable"):...
true
true
1c32cebad503494afaeb02a6817eeb5b18bd9cd8
12,464
py
Python
src/gluonts/model/deepvar_hierarchical/_network.py
Xiaoxiong-Liu/gluon-ts
097c492769258dd70b7f223f826b17b0051ceee9
[ "Apache-2.0" ]
2,648
2019-06-03T17:18:27.000Z
2022-03-31T08:29:22.000Z
src/gluonts/model/deepvar_hierarchical/_network.py
Xiaoxiong-Liu/gluon-ts
097c492769258dd70b7f223f826b17b0051ceee9
[ "Apache-2.0" ]
1,220
2019-06-04T09:00:14.000Z
2022-03-31T10:45:43.000Z
src/gluonts/model/deepvar_hierarchical/_network.py
Xiaoxiong-Liu/gluon-ts
097c492769258dd70b7f223f826b17b0051ceee9
[ "Apache-2.0" ]
595
2019-06-04T01:04:31.000Z
2022-03-30T10:40:26.000Z
# Copyright 2018 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "license...
33.326203
120
0.634467
from typing import List, Optional from itertools import product import mxnet as mx import numpy as np from gluonts.core.component import validated from gluonts.mx import Tensor from gluonts.mx.distribution import Distribution, DistributionOutput from gluonts.mx.distribution import EmpiricalDistributio...
true
true
1c32ced5986b513b59820c9d7855cb384387ef16
6,208
py
Python
simpleai/search/models.py
kod3r/simpleai
989f7ae3e1d770b34aa41611243635fd6109aff8
[ "MIT" ]
1
2019-04-19T23:05:28.000Z
2019-04-19T23:05:28.000Z
simpleai/search/models.py
kod3r/simpleai
989f7ae3e1d770b34aa41611243635fd6109aff8
[ "MIT" ]
null
null
null
simpleai/search/models.py
kod3r/simpleai
989f7ae3e1d770b34aa41611243635fd6109aff8
[ "MIT" ]
null
null
null
# coding=utf-8 class SearchProblem(object): '''Abstract base class to represent and manipulate the search space of a problem. In this class, the search space is meant to be represented implicitly as a graph. Each state corresponds with a problem state (ie, a valid configuration) ...
35.073446
79
0.598099
class SearchProblem(object): def __init__(self, initial_state): self.initial_state = initial_state def actions(self, state): raise NotImplementedError def result(self, state, action): raise NotImplementedError def cost(self, state, action, state2): return 1 de...
true
true
1c32cf13fb47d925ee945cb67723304bbf17b044
2,298
py
Python
tp_screening/tests/test_subject_screeing_form.py
MoffatMore/tp-screening
20a98ba6fc57118968e507bdf5861cbdcada1848
[ "MIT" ]
null
null
null
tp_screening/tests/test_subject_screeing_form.py
MoffatMore/tp-screening
20a98ba6fc57118968e507bdf5861cbdcada1848
[ "MIT" ]
null
null
null
tp_screening/tests/test_subject_screeing_form.py
MoffatMore/tp-screening
20a98ba6fc57118968e507bdf5861cbdcada1848
[ "MIT" ]
null
null
null
''' Created on Jun 22, 2018 @author: moffat ''' from django.test import TestCase, tag from edc_constants.constants import YES, FEMALE, NO, NOT_APPLICABLE from ..forms import SubjectScreeningForm from edc_base.utils import get_utcnow from copy import copy @tag('TestSubjectForm') class TestSubjectScreeningForm(TestCa...
31.916667
67
0.622715
from django.test import TestCase, tag from edc_constants.constants import YES, FEMALE, NO, NOT_APPLICABLE from ..forms import SubjectScreeningForm from edc_base.utils import get_utcnow from copy import copy @tag('TestSubjectForm') class TestSubjectScreeningForm(TestCase): def setUp(self): self.screening...
true
true
1c32d0dbb302a6369ad6d5b15600eda528f552aa
38,427
py
Python
atlassian/bamboo.py
ezchi/atlassian-python-api
721a4895348fc410b4781f2c1af01b6ddf80b9c5
[ "Apache-2.0" ]
null
null
null
atlassian/bamboo.py
ezchi/atlassian-python-api
721a4895348fc410b4781f2c1af01b6ddf80b9c5
[ "Apache-2.0" ]
null
null
null
atlassian/bamboo.py
ezchi/atlassian-python-api
721a4895348fc410b4781f2c1af01b6ddf80b9c5
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 import logging from requests.exceptions import HTTPError from .rest_client import AtlassianRestAPI log = logging.getLogger(__name__) class Bamboo(AtlassianRestAPI): """Private methods""" def _get_generator( self, path, elements_key="results", element_key="res...
35.449262
120
0.601608
import logging from requests.exceptions import HTTPError from .rest_client import AtlassianRestAPI log = logging.getLogger(__name__) class Bamboo(AtlassianRestAPI): def _get_generator( self, path, elements_key="results", element_key="result", data=None, flags=N...
true
true
1c32d4d28c537a81e998d99b7abbb9c41bd7fce6
13,439
py
Python
pdkb/test/aamas.py
QuMuLab/PDKB-Planning
61a96c006b606aa051b2c7c9b5bfc9b6473d2a4d
[ "MIT" ]
11
2020-05-11T15:32:49.000Z
2021-09-14T17:49:48.000Z
pdkb/test/aamas.py
QuMuLab/PDKB-Planning
61a96c006b606aa051b2c7c9b5bfc9b6473d2a4d
[ "MIT" ]
1
2020-04-22T13:16:49.000Z
2020-04-22T13:16:49.000Z
pdkb/test/aamas.py
QuMuLab/PDKB-Planning
61a96c006b606aa051b2c7c9b5bfc9b6473d2a4d
[ "MIT" ]
4
2020-04-16T08:51:17.000Z
2021-09-14T17:51:50.000Z
import sys, random, time from pdkb.kd45 import * from pdkb.indexed_kd45 import * from pdkb.pinf import * from pdkb.rml import * from pdkb.test.utils import random_pdkb, random_rml, write_file, append_file TYPE = 'normal' NUM_PDKBS = 10 QUERIES_PER_PDKB = 10 if 'small' == TYPE: AGENTS = (2,3) DEPTH = (2,3) ...
36.22372
193
0.564328
import sys, random, time from pdkb.kd45 import * from pdkb.indexed_kd45 import * from pdkb.pinf import * from pdkb.rml import * from pdkb.test.utils import random_pdkb, random_rml, write_file, append_file TYPE = 'normal' NUM_PDKBS = 10 QUERIES_PER_PDKB = 10 if 'small' == TYPE: AGENTS = (2,3) DEPTH = (2,3) ...
true
true
1c32d51cb8737141a11db3eef28fed93d17034df
20,597
py
Python
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/rfc3918ipmcminmaxlat_26e8ac413e1c57bed7d65373af19d55d.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
20
2019-05-07T01:59:14.000Z
2022-02-11T05:24:47.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/rfc3918ipmcminmaxlat_26e8ac413e1c57bed7d65373af19d55d.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
60
2019-04-03T18:59:35.000Z
2022-02-22T12:05:05.000Z
ixnetwork_restpy/testplatform/sessions/ixnetwork/quicktest/rfc3918ipmcminmaxlat_26e8ac413e1c57bed7d65373af19d55d.py
OpenIxia/ixnetwork_restpy
f628db450573a104f327cf3c737ca25586e067ae
[ "MIT" ]
13
2019-05-20T10:48:31.000Z
2021-10-06T07:45:44.000Z
# MIT LICENSE # # Copyright 1997 - 2020 by IXIA Keysight # # 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 use, copy, modify,...
43.362105
193
0.646793
from ixnetwork_restpy.base import Base from ixnetwork_restpy.files import Files from typing import List, Any, Union class Rfc3918ipmcMinMaxLat(Base): __slots__ = () _SDM_NAME = 'rfc3918ipmcMinMaxLat' _SDM_ATT_MAP = { 'ForceApplyQTConfig': 'forceApplyQTConfig', 'InputP...
true
true
1c32d61fcb9418e9dcc63acc39db3553e81a2963
12,641
py
Python
models/main.py
PKUxxz/simp-detr
c83846b1b6fc0e396e268dcfef278e162cf231c5
[ "Apache-2.0" ]
null
null
null
models/main.py
PKUxxz/simp-detr
c83846b1b6fc0e396e268dcfef278e162cf231c5
[ "Apache-2.0" ]
null
null
null
models/main.py
PKUxxz/simp-detr
c83846b1b6fc0e396e268dcfef278e162cf231c5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import argparse import datetime import json import random import sys import time from pathlib import Path import numpy as np import torch from torch.utils.data import DataLoader, DistributedSampler sys.path.append("../../../lib") import datasets i...
46.304029
119
0.624159
import argparse import datetime import json import random import sys import time from pathlib import Path import numpy as np import torch from torch.utils.data import DataLoader, DistributedSampler sys.path.append("../../../lib") import datasets import util.misc as utils from datasets import build_dataset, get_coco_...
true
true
1c32d66bea5628ee2e303da88010cebf2114cd34
5,646
py
Python
tests/test_rdscluster.py
agiza/cloud-custodian
9592d0f700970e05e89574280cfe0e1479c95228
[ "Apache-2.0" ]
null
null
null
tests/test_rdscluster.py
agiza/cloud-custodian
9592d0f700970e05e89574280cfe0e1479c95228
[ "Apache-2.0" ]
null
null
null
tests/test_rdscluster.py
agiza/cloud-custodian
9592d0f700970e05e89574280cfe0e1479c95228
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Capital One Services, LLC # # 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 in...
38.148649
90
0.591038
from common import BaseTest from c7n.executor import MainThreadExecutor from c7n.resources import rdscluster class RDSClusterTest(BaseTest): def test_rdscluster_simple(self): session_factory = self.replay_flight_data('test_rdscluster_simple') p = self.load_policy({ 'name...
true
true
1c32d68f3c087086e1183822232971de969a5f6a
1,359
py
Python
_bin/java2smali.py
HongxuChen/dotfiles
4a51a74ae3345273514faccf40a47e1a39048049
[ "MIT" ]
13
2015-09-11T14:53:06.000Z
2021-12-19T23:07:06.000Z
_bin/java2smali.py
HongxuChen/dotfiles
4a51a74ae3345273514faccf40a47e1a39048049
[ "MIT" ]
5
2015-03-18T17:08:01.000Z
2020-01-07T08:51:47.000Z
_bin/java2smali.py
HongxuChen/dotfiles
4a51a74ae3345273514faccf40a47e1a39048049
[ "MIT" ]
4
2016-12-27T14:52:19.000Z
2019-05-16T07:07:53.000Z
#!/usr/bin/env python3 from __future__ import print_function import os import shutil import subprocess version = "1.6" name = "_java2smali" dex_type = "apk" def require(cond, msg): if not cond: raise Exception(msg) def run(cmd): print("=> {}".format(cmd)) subprocess.call(cmd.split()) def ...
21.234375
74
0.629139
from __future__ import print_function import os import shutil import subprocess version = "1.6" name = "_java2smali" dex_type = "apk" def require(cond, msg): if not cond: raise Exception(msg) def run(cmd): print("=> {}".format(cmd)) subprocess.call(cmd.split()) def java2jar(d): java_...
true
true
1c32d71d45f237e8444736f93738b7e89ba16125
1,225
py
Python
setup.py
dreamkeep/hbp-neuromorphic-client
e4268321e12d6bb0da600ed977d088317b7c47d9
[ "Apache-2.0" ]
1
2019-12-24T04:29:11.000Z
2019-12-24T04:29:11.000Z
setup.py
dreamkeep/hbp-neuromorphic-client
e4268321e12d6bb0da600ed977d088317b7c47d9
[ "Apache-2.0" ]
null
null
null
setup.py
dreamkeep/hbp-neuromorphic-client
e4268321e12d6bb0da600ed977d088317b7c47d9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from distutils.core import setup long_description = open("README.md").read() setup( name="hbp_neuromorphic_platform", version='0.7.2', packages=['nmpi'], install_requires=['requests',], author="Andrew P. Davison and Domenico Guarino", author_email...
36.029412
94
0.638367
from distutils.core import setup long_description = open("README.md").read() setup( name="hbp_neuromorphic_platform", version='0.7.2', packages=['nmpi'], install_requires=['requests',], author="Andrew P. Davison and Domenico Guarino", author_email="andrew.davison@unic.cnrs-gif.fr", desc...
true
true
1c32d7a8998db158d1459d6bbf46c622488c673c
1,185
py
Python
setup.py
woolfson-group/array_sensing
ae9e0c7d9137e4034d183ebc920b7ee6352ebc93
[ "MIT" ]
null
null
null
setup.py
woolfson-group/array_sensing
ae9e0c7d9137e4034d183ebc920b7ee6352ebc93
[ "MIT" ]
null
null
null
setup.py
woolfson-group/array_sensing
ae9e0c7d9137e4034d183ebc920b7ee6352ebc93
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open('README.md', 'r') as f: long_description = f.read() setup( name='array_sensing', packages=find_packages(), version='0.1.0', description=('BADASS_ML: A package to parse the input data and run ML ' 'on fluorescence data collecte...
40.862069
79
0.611814
from setuptools import setup, find_packages with open('README.md', 'r') as f: long_description = f.read() setup( name='array_sensing', packages=find_packages(), version='0.1.0', description=('BADASS_ML: A package to parse the input data and run ML ' 'on fluorescence data collecte...
true
true
1c32d7f72ce35c184dd89232c5ca0cace531ab3f
1,034
py
Python
efilter_tests/unit/protocols/applicative.py
Onager/dotty
b145131499be0c4b755fc2e2ac19be11a50bce6a
[ "Apache-2.0" ]
54
2015-08-02T14:26:50.000Z
2021-10-21T02:44:25.000Z
efilter_tests/unit/protocols/applicative.py
Onager/dotty
b145131499be0c4b755fc2e2ac19be11a50bce6a
[ "Apache-2.0" ]
23
2015-11-27T10:08:58.000Z
2017-09-27T08:54:56.000Z
efilter_tests/unit/protocols/applicative.py
Onager/dotty
b145131499be0c4b755fc2e2ac19be11a50bce6a
[ "Apache-2.0" ]
16
2015-08-14T10:11:20.000Z
2021-10-21T02:44:18.000Z
# EFILTER Forensic Query Language # # Copyright 2015 Google Inc. 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 # # Un...
27.945946
74
0.752418
__author__ = "Adam Sindelar <adamsh@google.com>" import unittest from efilter_tests import mocks from efilter.protocols import applicative class ApplicativeTest(unittest.TestCase): def testApplyingFunction(self): result = applicative.apply(mocks.MockFunction(), [10], dict(y=20)) ...
true
true
1c32d80c636c7007f06dbb384a20862f86d2b290
8,945
py
Python
tests/test_segmentation.py
goitom/eemeter
bb05d5b776546858f8f3a8d3a95bec202728d9f0
[ "Apache-2.0" ]
null
null
null
tests/test_segmentation.py
goitom/eemeter
bb05d5b776546858f8f3a8d3a95bec202728d9f0
[ "Apache-2.0" ]
null
null
null
tests/test_segmentation.py
goitom/eemeter
bb05d5b776546858f8f3a8d3a95bec202728d9f0
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright 2018 Open Energy Efficiency, Inc. 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/LICE...
32.060932
85
0.651202
import json import numpy as np import pandas as pd import pytest from eemeter.segmentation import ( CalTRACKSegmentModel, SegmentedModel, segment_time_series, iterate_segmented_dataset, ) @pytest.fixture def index_8760(): return pd.date_range("2017-01-01", periods=365 * 24, freq="H", tz="UTC") ...
true
true
1c32d8431f0489ef556ac058fc71283341a5757d
64
py
Python
setup.py
ken2403/schnettriple
28df9c89648f07524b563c0b9b58d93d9264869c
[ "MIT" ]
null
null
null
setup.py
ken2403/schnettriple
28df9c89648f07524b563c0b9b58d93d9264869c
[ "MIT" ]
null
null
null
setup.py
ken2403/schnettriple
28df9c89648f07524b563c0b9b58d93d9264869c
[ "MIT" ]
null
null
null
import setuptools # argumet is in setup.cfg setuptools.setup()
12.8
25
0.78125
import setuptools setuptools.setup()
true
true
1c32d8bc34e95480e3ea1a50f32460e724aa0965
36,950
py
Python
src/models/model.py
CrafterKolyan/IRNet-1
72df5c876f368ae4a1b594e7a740ff966dbbd3ba
[ "MIT" ]
223
2019-11-11T09:06:51.000Z
2022-03-17T06:55:56.000Z
src/models/model.py
KevinQian97/Semantic-Error-Correction
0cbad02e4a6c8638af12c14856df84d143f9299d
[ "Apache-2.0" ]
50
2019-11-17T08:08:09.000Z
2022-02-13T08:54:02.000Z
src/models/model.py
KevinQian97/Semantic-Error-Correction
0cbad02e4a6c8638af12c14856df84d143f9299d
[ "Apache-2.0" ]
86
2019-11-11T09:07:50.000Z
2022-02-14T07:41:33.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. # -*- coding: utf-8 -*- """ # @Time : 2019/5/25 # @Author : Jiaqi&Zecheng # @File : model.py # @Software: PyCharm """ import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.utils...
48.300654
140
0.532476
import numpy as np import torch import torch.nn as nn import torch.nn.functional as F import torch.nn.utils from torch.autograd import Variable from src.beam import Beams, ActionInfo from src.dataset import Batch from src.models import nn_utils from src.models.basic_model import BasicModel from src.mod...
true
true
1c32dbb26c5581a55894974e838f48581581ce9e
20,395
py
Python
cnns/foolbox/foolbox_2_3_0/attacks/hop_skip_jump_attack.py
anonymous-user-commits/perturb-net
66fc7c4a1234fa34b92bcc85751f0a6e23d80a23
[ "MIT" ]
12
2021-07-27T07:18:24.000Z
2022-03-09T13:52:20.000Z
cnns/foolbox/foolbox_2_3_0/attacks/hop_skip_jump_attack.py
anonymous-user-commits/perturb-net
66fc7c4a1234fa34b92bcc85751f0a6e23d80a23
[ "MIT" ]
2
2021-08-03T09:21:33.000Z
2021-12-29T14:25:30.000Z
cnns/foolbox/foolbox_2_3_0/attacks/hop_skip_jump_attack.py
anonymous-user-commits/perturb-net
66fc7c4a1234fa34b92bcc85751f0a6e23d80a23
[ "MIT" ]
3
2021-11-18T14:46:40.000Z
2022-01-03T15:47:23.000Z
import warnings import time import sys from .base import Attack from .base import generator_decorator from ..distances import MSE, Linf from ..criteria import Misclassification import numpy as np import math from warnings import warn import logging class HopSkipJumpAttack(Attack): """A powerful adversarial attac...
37.559853
102
0.54783
import warnings import time import sys from .base import Attack from .base import generator_decorator from ..distances import MSE, Linf from ..criteria import Misclassification import numpy as np import math from warnings import warn import logging class HopSkipJumpAttack(Attack): @generator_decorator def a...
true
true
1c32dd699853256f1e8ca3c43d488c9561e77f45
374
py
Python
Exe13_Dias_da_semana.py
lucaslk122/Exercicios_Python_estutura_decisao
51a9699c5d85aa6cfb163d891c56e804a7255634
[ "MIT" ]
null
null
null
Exe13_Dias_da_semana.py
lucaslk122/Exercicios_Python_estutura_decisao
51a9699c5d85aa6cfb163d891c56e804a7255634
[ "MIT" ]
null
null
null
Exe13_Dias_da_semana.py
lucaslk122/Exercicios_Python_estutura_decisao
51a9699c5d85aa6cfb163d891c56e804a7255634
[ "MIT" ]
null
null
null
print("Digite um numero inteiro, de 1 a 7 que retornarei qual dia da semana é") dia = int(input()) if dia == 1: print("Domingo") elif dia == 2: print("Segunda") elif dia == 3: print("Terça") elif dia == 4: print("Quarta") elif dia == 5: print("Quinta") elif dia == 6: print("Sexta") elif dia == ...
20.777778
79
0.593583
print("Digite um numero inteiro, de 1 a 7 que retornarei qual dia da semana é") dia = int(input()) if dia == 1: print("Domingo") elif dia == 2: print("Segunda") elif dia == 3: print("Terça") elif dia == 4: print("Quarta") elif dia == 5: print("Quinta") elif dia == 6: print("Sexta") elif dia == ...
true
true
1c32dd85b8535f53247c6abf36aeeb797e6fcb1c
10,005
py
Python
mealpy/bio_based/VCS.py
Alhassan20/mealpy
7ed365c5c495ad1c1e066662c90159b3d5e9b8e3
[ "MIT" ]
162
2020-08-31T10:13:06.000Z
2022-03-31T09:38:19.000Z
mealpy/bio_based/VCS.py
Alhassan20/mealpy
7ed365c5c495ad1c1e066662c90159b3d5e9b8e3
[ "MIT" ]
51
2020-09-13T10:46:31.000Z
2022-03-30T06:12:08.000Z
mealpy/bio_based/VCS.py
Alhassan20/mealpy
7ed365c5c495ad1c1e066662c90159b3d5e9b8e3
[ "MIT" ]
58
2020-09-12T13:29:18.000Z
2022-03-31T09:38:21.000Z
#!/usr/bin/env python # ------------------------------------------------------------------------------------------------------% # Created by "Thieu Nguyen" at 22:07, 11/04/2020 % # ...
51.572165
148
0.53963
from numpy import sum, log1p, array, mean, prod, abs, where from numpy.random import uniform, normal, choice from copy import deepcopy from mealpy.optimizer import Root class BaseVCS(Root): def __init__(self, obj_func=None, lb=None, ub=None, verbose=True, epoch=750, pop_size=100, lamda=0.5, xichma=0.3, ...
true
true
1c32de006462a0aee12320703b3287e24affe290
2,477
py
Python
sdk/python/pulumi_azure_nextgen/kusto/v20190121/list_database_principals.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/kusto/v20190121/list_database_principals.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/kusto/v20190121/list_database_principals.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
35.898551
152
0.69237
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'ListDatabasePrincipalsResult', 'AwaitableListDatabasePrincipalsResult', 'list_database_principals', ] @pulumi.output_typ...
true
true
1c32de7addcb2901a9b6caafd9376cc644a4b77e
3,229
py
Python
PythonBaseDemo/GraphicInterfaceProgrammin/11.8/manipulate_tag.py
CypHelp/TestNewWorldDemo
ee6f73df05756f191c1c56250fa290461fdd1b9a
[ "Apache-2.0" ]
null
null
null
PythonBaseDemo/GraphicInterfaceProgrammin/11.8/manipulate_tag.py
CypHelp/TestNewWorldDemo
ee6f73df05756f191c1c56250fa290461fdd1b9a
[ "Apache-2.0" ]
null
null
null
PythonBaseDemo/GraphicInterfaceProgrammin/11.8/manipulate_tag.py
CypHelp/TestNewWorldDemo
ee6f73df05756f191c1c56250fa290461fdd1b9a
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 ######################################################################### # 网站: <a href="http://www.crazyit.org">疯狂Java联盟</a> # # author yeeku.H.lee kongyeeku@163.com # # # # version 1.0 ...
42.486842
85
0.453081
true
true
1c32deb9492bfcf889a68577e3dc4879fd4a245c
566
py
Python
consul/consul_rce_poc.py
JnuSimba/vulhub
d5491ee0b39dab4f92829ef35d99be9ad25500c5
[ "MIT" ]
3
2020-12-16T14:35:17.000Z
2020-12-22T03:15:50.000Z
consul/consul_rce_poc.py
JnuSimba/vulhub
d5491ee0b39dab4f92829ef35d99be9ad25500c5
[ "MIT" ]
null
null
null
consul/consul_rce_poc.py
JnuSimba/vulhub
d5491ee0b39dab4f92829ef35d99be9ad25500c5
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- import requests data = { "ID": "http", "Name": "http", "Address": "127.0.0.1", "Port": 80, "check": { #"script": "sh -i >& /dev/tcp/119.1.1.28/8080 0>&1", # bash may not exist # 某些镜像 /dev/tcp 目录不存在会导致失败 # docker 里面可以...
31.444444
83
0.515901
import requests data = { "ID": "http", "Name": "http", "Address": "127.0.0.1", "Port": 80, "check": { "script":"touch /tmp/simba.txt", "interval": "10s" } } result = requests.put("http://127.0.0.1:1998/v1/agent/service...
false
true
1c32deff61557b7a2ba4518c3ad36f40f29a3a21
964
py
Python
kubernetes/test/test_v1_replica_set_list.py
Scalr/kubernetes-client-python
07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38
[ "Apache-2.0" ]
3
2019-05-19T05:05:37.000Z
2020-03-20T04:56:20.000Z
kubernetes/test/test_v1_replica_set_list.py
Scalr/kubernetes-client-python
07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_replica_set_list.py
Scalr/kubernetes-client-python
07442bdb76f0876ec96c0b0da6f9c4b06d7e5e38
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.13.5 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
21.422222
105
0.709544
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1_replica_set_list import V1ReplicaSetList class TestV1ReplicaSetList(unittest.TestCase): def setUp(self): pass de...
true
true
1c32dfb7d010be6550570f6a03b005a2b2b34c94
536
py
Python
apidocs/search_es.py
kleag/external-knowledge-codegen
9b6562a549d4bad755fa99a3bee15521fac59e97
[ "Apache-2.0" ]
null
null
null
apidocs/search_es.py
kleag/external-knowledge-codegen
9b6562a549d4bad755fa99a3bee15521fac59e97
[ "Apache-2.0" ]
null
null
null
apidocs/search_es.py
kleag/external-knowledge-codegen
9b6562a549d4bad755fa99a3bee15521fac59e97
[ "Apache-2.0" ]
null
null
null
import json import pprint import sys from elasticsearch import Elasticsearch def get_top_k(query, k=5): results = es.search(index='python-code', params={"q": query})['hits']['hits'][:k] for doc in results: print("Score: ", doc['_score']) print("Docstring: ", doc['_source']['intent']) p...
26.8
85
0.602612
import json import pprint import sys from elasticsearch import Elasticsearch def get_top_k(query, k=5): results = es.search(index='python-code', params={"q": query})['hits']['hits'][:k] for doc in results: print("Score: ", doc['_score']) print("Docstring: ", doc['_source']['intent']) p...
true
true
1c32e058405e630fce30abbd6463173e1df2acbe
16,138
py
Python
optimus/helpers/constants.py
liRONCO11/optimus
0ca0567267300397c7ba711483c46f94ac265e55
[ "Apache-2.0" ]
null
null
null
optimus/helpers/constants.py
liRONCO11/optimus
0ca0567267300397c7ba711483c46f94ac265e55
[ "Apache-2.0" ]
null
null
null
optimus/helpers/constants.py
liRONCO11/optimus
0ca0567267300397c7ba711483c46f94ac265e55
[ "Apache-2.0" ]
null
null
null
from enum import Enum from optimus.helpers.logger import logger # Python to PySpark reference # # type(None): NullType, # bool: BooleanType, # int: LongType, # float: DoubleType, # str: StringType, # bytearray: BinaryType, # decimal.Decimal: DecimalType, # datetime.date: DateType, # datetime.datetime: TimestampType,...
27.680961
119
0.468212
from enum import Enum from optimus.helpers.logger import logger class Actions(Enum): PROFILER_DTYPE = "profiler_dtype" MATCH = "match" LOWER = "lower" UPPER = "upper" PROPER = "proper" PAD = "pad" TRIM = "trim" REVERSE = "reverse" REMOVE_ACCENTS = "remove" ...
true
true
1c32e11606263dcf39250cd485f75133e0df204e
931
py
Python
surveyapp/app/app/database.py
danielSilva21/interlinker-service-augmenter
54b6ab3b9f2c21fd4779a03839842534544b9f9b
[ "MIT" ]
null
null
null
surveyapp/app/app/database.py
danielSilva21/interlinker-service-augmenter
54b6ab3b9f2c21fd4779a03839842534544b9f9b
[ "MIT" ]
null
null
null
surveyapp/app/app/database.py
danielSilva21/interlinker-service-augmenter
54b6ab3b9f2c21fd4779a03839842534544b9f9b
[ "MIT" ]
null
null
null
import logging from motor.motor_asyncio import AsyncIOMotorClient, AsyncIOMotorCollection from app.config import settings import os MAX_CONNECTIONS_COUNT = int(os.getenv("MAX_CONNECTIONS_COUNT", 10)) MIN_CONNECTIONS_COUNT = int(os.getenv("MIN_CONNECTIONS_COUNT", 10)) class DataBase: client: AsyncIOMotorClient = N...
33.25
74
0.728249
import logging from motor.motor_asyncio import AsyncIOMotorClient, AsyncIOMotorCollection from app.config import settings import os MAX_CONNECTIONS_COUNT = int(os.getenv("MAX_CONNECTIONS_COUNT", 10)) MIN_CONNECTIONS_COUNT = int(os.getenv("MIN_CONNECTIONS_COUNT", 10)) class DataBase: client: AsyncIOMotorClient = N...
true
true
1c32e27a764119e0c51f69ff7e5bfdd210ef0fc7
4,886
py
Python
rlpyt/samplers/collectors.py
tristandeleu/rlpyt
22eccb4e2b33d3c52947a27b6d300b575e36a3ea
[ "MIT" ]
1
2021-04-24T16:42:18.000Z
2021-04-24T16:42:18.000Z
rlpyt/samplers/collectors.py
tristandeleu/rlpyt
22eccb4e2b33d3c52947a27b6d300b575e36a3ea
[ "MIT" ]
null
null
null
rlpyt/samplers/collectors.py
tristandeleu/rlpyt
22eccb4e2b33d3c52947a27b6d300b575e36a3ea
[ "MIT" ]
null
null
null
import numpy as np from rlpyt.agents.base import AgentInputs from rlpyt.utils.buffer import buffer_from_example, torchify_buffer, numpify_buffer from rlpyt.utils.logging import logger class BaseCollector: """Class that steps environments, possibly in worker process.""" def __init__( self, ...
36.192593
85
0.586779
import numpy as np from rlpyt.agents.base import AgentInputs from rlpyt.utils.buffer import buffer_from_example, torchify_buffer, numpify_buffer from rlpyt.utils.logging import logger class BaseCollector: def __init__( self, rank, envs, samples_np, ba...
true
true
1c32e4313ba1e38678b13425e96ab2875bc04622
1,760
py
Python
graphrole/graph/interface/__init__.py
dkaslovsky/GraphRole
5336a9c3c42f8f89565686ed44e321ce6cce1a69
[ "MIT" ]
60
2019-03-07T15:15:49.000Z
2022-03-25T19:21:18.000Z
graphrole/graph/interface/__init__.py
dkaslovsky/GraphRole
5336a9c3c42f8f89565686ed44e321ce6cce1a69
[ "MIT" ]
5
2020-08-24T08:51:40.000Z
2021-12-08T06:50:47.000Z
graphrole/graph/interface/__init__.py
dkaslovsky/GraphRole
5336a9c3c42f8f89565686ed44e321ce6cce1a69
[ "MIT" ]
17
2019-08-02T04:15:50.000Z
2022-03-16T21:32:23.000Z
from typing import List, TypeVar from graphrole.graph.interface.base import BaseGraphInterface from graphrole.graph.interface.networkx import NetworkxInterface # IgraphInterface should not be imported if igraph is not installed try: from graphrole.graph.interface.igraph import IgraphInterface except ImportError: ...
32.592593
76
0.725568
from typing import List, TypeVar from graphrole.graph.interface.base import BaseGraphInterface from graphrole.graph.interface.networkx import NetworkxInterface try: from graphrole.graph.interface.igraph import IgraphInterface except ImportError: pass INTERFACES = { 'networkx': NetworkxInterface, ...
true
true
1c32e5600b4003e9f85a4060cae7a7cc3ab0c06e
43
py
Python
Ejercicio2.0.py
acasasaez/Warm-up
9b97ee8d7d4a1c6e0b577b392c5fd62d5e1727f3
[ "Apache-2.0" ]
null
null
null
Ejercicio2.0.py
acasasaez/Warm-up
9b97ee8d7d4a1c6e0b577b392c5fd62d5e1727f3
[ "Apache-2.0" ]
null
null
null
Ejercicio2.0.py
acasasaez/Warm-up
9b97ee8d7d4a1c6e0b577b392c5fd62d5e1727f3
[ "Apache-2.0" ]
null
null
null
print (chr(27)+ "[0;32;40m" + "Hola Mundo")
43
43
0.581395
print (chr(27)+ "[0;32;40m" + "Hola Mundo")
true
true
1c32e56a8b489e0337bcce9ebcb6a97161fef89f
518
py
Python
plotly/validators/layout/slider/_templateitemname.py
gnestor/plotly.py
a8ae062795ddbf9867b8578fe6d9e244948c15ff
[ "MIT" ]
12
2020-04-18T18:10:22.000Z
2021-12-06T10:11:15.000Z
plotly/validators/layout/slider/_templateitemname.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
27
2020-04-28T21:23:12.000Z
2021-06-25T15:36:38.000Z
plotly/validators/layout/slider/_templateitemname.py
Vesauza/plotly.py
e53e626d59495d440341751f60aeff73ff365c28
[ "MIT" ]
6
2020-04-18T23:07:08.000Z
2021-11-18T07:53:06.000Z
import _plotly_utils.basevalidators class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='templateitemname', parent_name='layout.slider', **kwargs ): super(TemplateitemnameValidator, self).__init__( ...
27.263158
78
0.627413
import _plotly_utils.basevalidators class TemplateitemnameValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='templateitemname', parent_name='layout.slider', **kwargs ): super(TemplateitemnameValidator, self).__init__( ...
true
true
1c32e6ea491d0cdacd28a51303b5f5cb694e4266
11,781
py
Python
landsat/landsat.py
willemarcel/landsat-util
5804331f4f3d757312931c2ede5714cf7407f60c
[ "CC0-1.0" ]
1
2017-02-17T13:27:09.000Z
2017-02-17T13:27:09.000Z
landsat/landsat.py
willemarcel/landsat-util
5804331f4f3d757312931c2ede5714cf7407f60c
[ "CC0-1.0" ]
null
null
null
landsat/landsat.py
willemarcel/landsat-util
5804331f4f3d757312931c2ede5714cf7407f60c
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python # USGS Landsat Imagery Util # # # Author: developmentseed # Contributer: scisco, KAPPS- # # License: CC0 1.0 Universal from __future__ import print_function import sys import subprocess import argparse import textwrap import json from dateutil.parser import parse from gs_helper import GsHelper...
39.800676
87
0.482811
from __future__ import print_function import sys import subprocess import argparse import textwrap import json from dateutil.parser import parse from gs_helper import GsHelper from clipper_helper import Clipper from search_helper import Search from general_helper import reformat_date from image_helper impor...
true
true
1c32e6f4423ee74d820255630e8ed91535e91b01
2,986
py
Python
tools/ad_map_access_qgis/ad_map_access_qgis/MapSnappingTest.py
woojinjjang/map-1
d12bb410f03d078a995130b4e671746ace8b6287
[ "MIT" ]
61
2019-12-19T20:57:24.000Z
2022-03-29T15:20:51.000Z
tools/ad_map_access_qgis/ad_map_access_qgis/MapSnappingTest.py
woojinjjang/map-1
d12bb410f03d078a995130b4e671746ace8b6287
[ "MIT" ]
54
2020-04-05T05:32:47.000Z
2022-03-15T18:42:33.000Z
tools/ad_map_access_qgis/ad_map_access_qgis/MapSnappingTest.py
woojinjjang/map-1
d12bb410f03d078a995130b4e671746ace8b6287
[ "MIT" ]
31
2019-12-20T07:37:39.000Z
2022-03-16T13:06:16.000Z
# ----------------- BEGIN LICENSE BLOCK --------------------------------- # # Copyright (C) 2018-2021 Intel Corporation # # SPDX-License-Identifier: MIT # # ----------------- END LICENSE BLOCK ----------------------------------- "..." import ad_map_access as ad import Globs from qgis.gui import QgsMapToolEmitPoint from...
35.547619
202
0.543202
import ad_map_access as ad import Globs from qgis.gui import QgsMapToolEmitPoint from qgis.core import QgsField from PyQt5.QtCore import QVariant import qgis.PyQt.QtCore from .QGISLayer import WGS84PointLayer class MapSnappingTest(QgsMapToolEmitPoint): TITLE = "Map-Snapped" SYMBOL = "diamond" COLO...
true
true
1c32e7e594a8a0d9fba4cbb31dabf80383c02ce9
1,190
py
Python
py/py_0183_maximum_product_of_parts.py
lcsm29/project-euler
fab794ece5aa7a11fc7c2177f26250f40a5b1447
[ "MIT" ]
null
null
null
py/py_0183_maximum_product_of_parts.py
lcsm29/project-euler
fab794ece5aa7a11fc7c2177f26250f40a5b1447
[ "MIT" ]
null
null
null
py/py_0183_maximum_product_of_parts.py
lcsm29/project-euler
fab794ece5aa7a11fc7c2177f26250f40a5b1447
[ "MIT" ]
null
null
null
# Solution of; # Project Euler Problem 183: Maximum product of parts # https://projecteuler.net/problem=183 # # Let N be a positive integer and let N be split into k equal parts, r = N/k, # so that N = r + r + . . . + r. Let P be the product of these parts, P = r × # r × . . . × r = rk. For example, if 11 is split i...
38.387097
79
0.633613
import timed def dummy(n): pass if __name__ == '__main__': n = 1000 i = 10000 prob_id = 183 timed.caller(dummy, n, i, prob_id)
true
true
1c32e9360606b10ab00f8696f91f0d35e73a7e74
7,471
py
Python
fastr/DrivenExtraction.py
remydecoupes/covid19-tweets-mood-tetis
beb3553f7c080f283751d2be14990475008bd82d
[ "CECILL-B" ]
null
null
null
fastr/DrivenExtraction.py
remydecoupes/covid19-tweets-mood-tetis
beb3553f7c080f283751d2be14990475008bd82d
[ "CECILL-B" ]
null
null
null
fastr/DrivenExtraction.py
remydecoupes/covid19-tweets-mood-tetis
beb3553f7c080f283751d2be14990475008bd82d
[ "CECILL-B" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue May 9 14:07:38 2017 For: UMR TETIS RESEARCH UNIT Author: Gaurav_Shrivastava """ import os import sys import numpy as np import pandas as pd import nltk import re import matplotlib as plt import json from collections import defaultdict from nltk.stem.porter impor...
29.070039
119
0.681435
import os import sys import numpy as np import pandas as pd import nltk import re import matplotlib as plt import json from collections import defaultdict from nltk.stem.porter import PorterStemmer from nltk.corpus import stopwords from nltk.corpus import wordnet as wn import argparse def is_noun(tag): ...
true
true
1c32e9a0925ed2999d02030f82708738ca6d9199
22,061
py
Python
language/install.py
ritabt/legion
62d9a513bb85050995b1837d132faddce9c1a8a4
[ "Apache-2.0" ]
null
null
null
language/install.py
ritabt/legion
62d9a513bb85050995b1837d132faddce9c1a8a4
[ "Apache-2.0" ]
null
null
null
language/install.py
ritabt/legion
62d9a513bb85050995b1837d132faddce9c1a8a4
[ "Apache-2.0" ]
1
2021-01-07T22:07:18.000Z
2021-01-07T22:07:18.000Z
#!/usr/bin/env python # Copyright 2020 Stanford University # # 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 applicabl...
43.427165
127
0.627351
from __future__ import print_function import argparse, json, multiprocessing, os, platform, shutil, subprocess, sys _version = sys.version_info.major if _version == 2: _input = raw_input elif _version == 3: _input = input else: raise Exception('Incompatible Python version') make_ex...
true
true
1c32ea71e1a82052c0748ab501146930d51a83c6
820
py
Python
city_scrapers/spiders/cuya_archives_advisory.py
PaulR-Docs/city-scrapers-cle
00f5db64b64e1ea0ddfa3b7f53d1f5db26c1042d
[ "MIT" ]
14
2019-10-18T15:33:43.000Z
2021-12-17T17:15:36.000Z
city_scrapers/spiders/cuya_archives_advisory.py
PaulR-Docs/city-scrapers-cle
00f5db64b64e1ea0ddfa3b7f53d1f5db26c1042d
[ "MIT" ]
35
2020-01-16T15:56:46.000Z
2022-03-19T18:41:42.000Z
city_scrapers/spiders/cuya_archives_advisory.py
PaulR-Docs/city-scrapers-cle
00f5db64b64e1ea0ddfa3b7f53d1f5db26c1042d
[ "MIT" ]
13
2019-09-16T18:44:45.000Z
2022-02-22T20:59:26.000Z
from city_scrapers_core.constants import ADVISORY_COMMITTEE from city_scrapers_core.spiders import CityScrapersSpider from city_scrapers.mixins import CuyaCountyMixin class CuyaArchivesAdvisorySpider(CuyaCountyMixin, CityScrapersSpider): name = "cuya_archives_advisory" agency = "Cuyahoga County Archives Advi...
37.272727
88
0.729268
from city_scrapers_core.constants import ADVISORY_COMMITTEE from city_scrapers_core.spiders import CityScrapersSpider from city_scrapers.mixins import CuyaCountyMixin class CuyaArchivesAdvisorySpider(CuyaCountyMixin, CityScrapersSpider): name = "cuya_archives_advisory" agency = "Cuyahoga County Archives Advi...
true
true
1c32ec154452a68a67e0bffdbf3555ccbf090d30
12,694
py
Python
src/bin/feature_extract.py
patrickltobing/shallow-wavenet
a7348805825e47a24e3ad0e759cecfe85284ba9f
[ "Apache-2.0" ]
19
2020-02-28T06:25:26.000Z
2021-04-22T06:28:16.000Z
src/bin/feature_extract.py
patrickltobing/shallow-wavenet
a7348805825e47a24e3ad0e759cecfe85284ba9f
[ "Apache-2.0" ]
null
null
null
src/bin/feature_extract.py
patrickltobing/shallow-wavenet
a7348805825e47a24e3ad0e759cecfe85284ba9f
[ "Apache-2.0" ]
1
2020-05-03T10:54:59.000Z
2020-05-03T10:54:59.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2019 Patrick Lumban Tobing (Nagoya University) # based on PyTorch implementation for WaveNet vocoder by Tomoki Hayashi (Nagoya University) # Apache 2.0 (http://www.apache.org/licenses/LICENSE-2.0) from __future__ import division from __future__ import print_...
34.778082
109
0.606507
from __future__ import division from __future__ import print_function import argparse import multiprocessing as mp import os import sys from distutils.util import strtobool import logging import numpy as np from numpy.matlib import repmat from scipy.interpolate import interp1d from scipy.signal import firwin ...
true
true
1c32ec50134f1af67e3fc4a70e2f7a93960bbedc
1,162
py
Python
probs/prob38.py
mattrid93/ProjectEuler
3e1cf1bad9581e526b37d17e20b5fe8af837c1c6
[ "MIT" ]
null
null
null
probs/prob38.py
mattrid93/ProjectEuler
3e1cf1bad9581e526b37d17e20b5fe8af837c1c6
[ "MIT" ]
null
null
null
probs/prob38.py
mattrid93/ProjectEuler
3e1cf1bad9581e526b37d17e20b5fe8af837c1c6
[ "MIT" ]
null
null
null
"""Problem 38: Pandigital multiples""" import unittest def is_pandigital(n): """Tests if n is a 1-9 pandigital""" if len(str(n)) != 9: return False if "0" in str(n): return False return len(str(n)) == len(set(str(n))) def multiply_by_1_m(n): """Returns concatenated product of n wit...
27.023256
71
0.635972
import unittest def is_pandigital(n): if len(str(n)) != 9: return False if "0" in str(n): return False return len(str(n)) == len(set(str(n))) def multiply_by_1_m(n): conc_product = "" i = 1 while len(conc_product) < 9: conc_product += str(n*i) i += 1 return ...
true
true
1c32ece427ef557825a544911d926880964c2989
1,052
py
Python
Desafios/Mundo 2/ex065.py
lucasllimati/CursoEmVideo
01d75626baf8b82f141d62f681e55a9bda0099fd
[ "MIT" ]
null
null
null
Desafios/Mundo 2/ex065.py
lucasllimati/CursoEmVideo
01d75626baf8b82f141d62f681e55a9bda0099fd
[ "MIT" ]
null
null
null
Desafios/Mundo 2/ex065.py
lucasllimati/CursoEmVideo
01d75626baf8b82f141d62f681e55a9bda0099fd
[ "MIT" ]
null
null
null
# 65 # Crie um programa que leia vários números inteiros pelo teclado. No final da execução, mostre a média entre todos os valores e qual foi o maior e o menor valores lidos. O programa deve perguntar ao usuário se ele quer ou não continuar a digitar valores. # Description # continuar ~> user response 'do you want to ...
30.057143
254
0.615019
resp = 'S' cont = 0 soma = 0 maior = 0 menor = 0 media = 0 while resp in 'Ss': num = int(input('Digite um número: ')) soma += num cont += 1 if cont == 1: maior = num menor = num else: if maior < num: maior = num if menor > num: ...
true
true
1c32ed6ae2c9c4365fc5b168442472f647ec0389
2,778
py
Python
wkz/file_helper/gpx_parser.py
Anyesh/workoutizer
5cfdef5d08f63d59d6d7d7922540566f6500753b
[ "MIT" ]
1
2021-09-11T16:09:27.000Z
2021-09-11T16:09:27.000Z
wkz/file_helper/gpx_parser.py
MakhmudovMurod/workoutizer
1509b711b43875c5f01d62ddbc182b0ee5e23dd2
[ "MIT" ]
null
null
null
wkz/file_helper/gpx_parser.py
MakhmudovMurod/workoutizer
1509b711b43875c5f01d62ddbc182b0ee5e23dd2
[ "MIT" ]
null
null
null
import logging import gpxpy import gpxpy.gpx from wkz.file_helper.parser import Parser from wkz.gis.geo import get_total_distance_of_trace log = logging.getLogger(__name__) class GPXParser(Parser): def __init__(self, path_to_file: str, md5sum: str): super(GPXParser, self).__init__(path_to_file, md5sum)...
36.552632
89
0.605832
import logging import gpxpy import gpxpy.gpx from wkz.file_helper.parser import Parser from wkz.gis.geo import get_total_distance_of_trace log = logging.getLogger(__name__) class GPXParser(Parser): def __init__(self, path_to_file: str, md5sum: str): super(GPXParser, self).__init__(path_to_file, md5sum)...
true
true