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
f715b08addca895d652922233042ac6fcca2b312
2,145
py
Python
src/data/datasets/BAIR/BAIR.py
msc5/junior-iw
d356e015fcd3a3be638097a1acc02d5dea4751aa
[ "MIT" ]
null
null
null
src/data/datasets/BAIR/BAIR.py
msc5/junior-iw
d356e015fcd3a3be638097a1acc02d5dea4751aa
[ "MIT" ]
null
null
null
src/data/datasets/BAIR/BAIR.py
msc5/junior-iw
d356e015fcd3a3be638097a1acc02d5dea4751aa
[ "MIT" ]
null
null
null
import os import io import numpy as np from PIL import Image import torch from torchvision.transforms import ToTensor class BAIR (object): """Data Handler that loads robot pushing data.""" def __init__(self, data_root, train=True, seq_len=20, image_size=64): self.root_dir = data_root if tra...
31.086957
73
0.577622
import os import io import numpy as np from PIL import Image import torch from torchvision.transforms import ToTensor class BAIR (object): def __init__(self, data_root, train=True, seq_len=20, image_size=64): self.root_dir = data_root if train: self.data_dir = '%s/processed_data/tra...
true
true
f715b1d7e1b1de8a5b80b9a37cf2b264b49119e2
620
py
Python
third_party/seasocks/scripts/gen_embedded.py
hansonl02/frc-robot-code
4b120c917a7709df9f010c9089a87c320bab3a16
[ "MIT" ]
61
2017-01-22T04:38:32.000Z
2022-03-07T00:04:37.000Z
third_party/seasocks/scripts/gen_embedded.py
hansonl02/frc-robot-code
4b120c917a7709df9f010c9089a87c320bab3a16
[ "MIT" ]
3
2018-06-28T05:34:57.000Z
2019-01-16T15:46:22.000Z
third_party/seasocks/scripts/gen_embedded.py
hansonl02/frc-robot-code
4b120c917a7709df9f010c9089a87c320bab3a16
[ "MIT" ]
17
2017-05-12T15:32:03.000Z
2021-12-09T12:49:38.000Z
#!/usr/bin/env python import os, os.path, sys print """ #include "internal/Embedded.h" #include <string> #include <unordered_map> namespace { std::unordered_map<std::string, EmbeddedContent> embedded = { """ for f in sys.argv[1:]: bytes = open(f, 'rb').read() print '{"/%s", {' % os.path.basename(f) print '"' +...
17.222222
69
0.620968
import os, os.path, sys print """ #include "internal/Embedded.h" #include <string> #include <unordered_map> namespace { std::unordered_map<std::string, EmbeddedContent> embedded = { """ for f in sys.argv[1:]: bytes = open(f, 'rb').read() print '{"/%s", {' % os.path.basename(f) print '"' + "".join(['\\x%02x' % ...
false
true
f715b222c54a26cf324ab888f732b9102ea604a6
20,214
py
Python
tools/nni_cmd/config_schema.py
skyser2003/nni
b946888fadacdb761e4c3a79bd869284af1da3b3
[ "MIT" ]
1
2021-03-27T10:42:42.000Z
2021-03-27T10:42:42.000Z
tools/nni_cmd/config_schema.py
lswzjuer/nni
e9cba778257804a2a1a6002687835233a779d7af
[ "MIT" ]
null
null
null
tools/nni_cmd/config_schema.py
lswzjuer/nni
e9cba778257804a2a1a6002687835233a779d7af
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. import os from schema import Schema, And, Optional, Regex, Or from .constants import SCHEMA_TYPE_ERROR, SCHEMA_RANGE_ERROR, SCHEMA_PATH_ERROR def setType(key, valueType): '''check key type''' return And(valueType, error=SCHEMA_TYPE_ERRO...
50.283582
137
0.597754
import os from schema import Schema, And, Optional, Regex, Or from .constants import SCHEMA_TYPE_ERROR, SCHEMA_RANGE_ERROR, SCHEMA_PATH_ERROR def setType(key, valueType): return And(valueType, error=SCHEMA_TYPE_ERROR % (key, valueType.__name__)) def setChoice(key, *args): return And(lambda n: n in args, err...
true
true
f715b265bb35aeb0434d5be280c4ded3ce5cd7ce
4,313
py
Python
src/camps/migrations/0001_initial.py
pwelzel/bornhack-website
af794e6a2fba06e09626259c7768feb30ff394be
[ "BSD-3-Clause" ]
null
null
null
src/camps/migrations/0001_initial.py
pwelzel/bornhack-website
af794e6a2fba06e09626259c7768feb30ff394be
[ "BSD-3-Clause" ]
null
null
null
src/camps/migrations/0001_initial.py
pwelzel/bornhack-website
af794e6a2fba06e09626259c7768feb30ff394be
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from django.db import models, migrations import uuid from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Ca...
54.594937
210
0.592395
from django.db import models, migrations import uuid from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Camp', fields=...
true
true
f715b282dadb18b6d8c46e9e216062f47e9fa8c4
2,215
py
Python
tests/models/symbol/ddc_log_data_returned_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
5
2016-08-23T17:52:22.000Z
2019-05-16T08:45:30.000Z
tests/models/symbol/ddc_log_data_returned_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
2
2016-11-10T05:30:21.000Z
2019-04-05T15:03:37.000Z
tests/models/symbol/ddc_log_data_returned_test.py
NetApp/santricity-webapi-pythonsdk
1d3df4a00561192f4cdcdd1890f4d27547ed2de2
[ "BSD-3-Clause-Clear" ]
7
2016-08-25T16:11:44.000Z
2021-02-22T05:31:25.000Z
#!/usr/bin/env python # coding: utf-8 """ The Clear BSD License Copyright (c) – 2016, NetApp, Inc. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions...
58.289474
845
0.776975
import unittest from netapp.santricity.models.symbol.ddc_log_data_returned import DdcLogDataReturned class DdcLogDataReturnedTest(unittest.TestCase): def test_ddc_log_data_returned(self): ddc_log_data_returned_obj = DdcLogDataReturned() self.assertNotEqual(ddc_log_data_ret...
true
true
f715b31b59adb44a6d805b23169c7a059551b417
4,970
py
Python
ravager/bot/helpers/abort_upload_handler.py
CoolFool/Ravager
3d647115689dc23a160255221aaa493f879406a5
[ "MIT" ]
null
null
null
ravager/bot/helpers/abort_upload_handler.py
CoolFool/Ravager
3d647115689dc23a160255221aaa493f879406a5
[ "MIT" ]
1
2022-03-15T06:55:48.000Z
2022-03-15T15:38:20.000Z
ravager/bot/helpers/abort_upload_handler.py
CoolFool/Ravager
3d647115689dc23a160255221aaa493f879406a5
[ "MIT" ]
2
2022-02-09T21:30:57.000Z
2022-03-15T06:19:57.000Z
from ravager.services.google.helpers import uploader from ravager.database.helpers.structs import OpsDataStruct from ravager.database.tasks import Tasks from ravager.celery_tasks.tasks import app from ravager.services.aria.download import Download from telegram.ext import CallbackQueryHandler import logging logger = l...
46.886792
117
0.61328
from ravager.services.google.helpers import uploader from ravager.database.helpers.structs import OpsDataStruct from ravager.database.tasks import Tasks from ravager.celery_tasks.tasks import app from ravager.services.aria.download import Download from telegram.ext import CallbackQueryHandler import logging logger = l...
true
true
f715b360e88e246929f30fa6b56a22448fc5ee17
228,126
py
Python
cinder/volume/manager.py
sapcc/cinder
9444ae7d2c7cfe2c277ff661ec9ef27a4f013f91
[ "Apache-2.0" ]
null
null
null
cinder/volume/manager.py
sapcc/cinder
9444ae7d2c7cfe2c277ff661ec9ef27a4f013f91
[ "Apache-2.0" ]
28
2017-08-17T14:46:05.000Z
2022-03-29T12:42:12.000Z
cinder/volume/manager.py
sapcc/cinder
9444ae7d2c7cfe2c277ff661ec9ef27a4f013f91
[ "Apache-2.0" ]
3
2017-04-27T16:11:40.000Z
2020-02-12T21:27:00.000Z
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
45.209275
79
0.554365
import requests import time from castellan import key_manager from oslo_config import cfg from oslo_log import log as logging import oslo_messaging as messaging from oslo_serialization import jsonutils from oslo_service import periodic_task from oslo_utils import excutils from oslo_utils import importutils from osl...
true
true
f715b36d352614e7311fe752bba62a9ff28b7113
769
py
Python
misc/splitpstack.py
csutherl/support-helpers
179ea920e2a04bda47cb583c85cc0163fd7ab4d3
[ "Apache-2.0" ]
6
2015-01-21T20:22:42.000Z
2015-09-14T16:40:37.000Z
misc/splitpstack.py
csutherl/support-helpers
179ea920e2a04bda47cb583c85cc0163fd7ab4d3
[ "Apache-2.0" ]
null
null
null
misc/splitpstack.py
csutherl/support-helpers
179ea920e2a04bda47cb583c85cc0163fd7ab4d3
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import sys def helpexit(): print './splitpstack.py <filename>' exit(1) if __name__=='__main__': if len(sys.argv) != 2: helpexit() else: try: currentDate = None f = open(sys.argv[1], 'r') currentFile = None for line...
25.633333
76
0.456437
import sys def helpexit(): print './splitpstack.py <filename>' exit(1) if __name__=='__main__': if len(sys.argv) != 2: helpexit() else: try: currentDate = None f = open(sys.argv[1], 'r') currentFile = None for line in f: ...
false
true
f715b378abaeeb7ac3904a1e1b60d24e706d5389
1,803
py
Python
tensorflow_federated/python/core/impl/executor_stacks/executor_stack_bindings_test.py
zhihansh/federated-oss
38cfcb05702ff7297db76d3ccb5f5afef53ca09b
[ "Apache-2.0" ]
1,918
2019-02-22T21:17:28.000Z
2022-03-30T14:49:53.000Z
tensorflow_federated/python/core/impl/executor_stacks/executor_stack_bindings_test.py
zhihansh/federated-oss
38cfcb05702ff7297db76d3ccb5f5afef53ca09b
[ "Apache-2.0" ]
999
2019-02-22T21:47:44.000Z
2022-03-31T11:06:42.000Z
tensorflow_federated/python/core/impl/executor_stacks/executor_stack_bindings_test.py
zhihansh/federated-oss
38cfcb05702ff7297db76d3ccb5f5afef53ca09b
[ "Apache-2.0" ]
498
2019-02-22T21:17:56.000Z
2022-03-29T02:54:15.000Z
# Copyright 2021, The TensorFlow Federated Authors. # # 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 o...
39.195652
89
0.749307
from absl.testing import absltest from absl.testing import parameterized import numpy as np from pybind11_abseil import status as absl_status from tensorflow_federated.python.core.impl.executor_stacks import executor_stack_bindings from tensorflow_federated.python.core.impl.executors import executor_bindings from ten...
true
true
f715b38795d175d33576ab05dea9a3fe41688f13
1,863
py
Python
samples/snippets/detect/label-products.py
glaswasser/python-vision
706c314a86b8f35c313bb3e907ae84317dca1a0b
[ "Apache-2.0" ]
null
null
null
samples/snippets/detect/label-products.py
glaswasser/python-vision
706c314a86b8f35c313bb3e907ae84317dca1a0b
[ "Apache-2.0" ]
null
null
null
samples/snippets/detect/label-products.py
glaswasser/python-vision
706c314a86b8f35c313bb3e907ae84317dca1a0b
[ "Apache-2.0" ]
null
null
null
from detect import (detect_logos, detect_text) import pandas as pd import re import os #from __future__ import print_function from google.cloud import vision images_path = "C:\\Users\\heinz\\Yagora GmbH\\Ievgen Kyrda - Crawler\\images\\foodnewsgermany_images/" file_names = os.listdir(os.path.dirname(images_path)) f...
26.239437
102
0.688137
from detect import (detect_logos, detect_text) import pandas as pd import re import os from google.cloud import vision images_path = "C:\\Users\\heinz\\Yagora GmbH\\Ievgen Kyrda - Crawler\\images\\foodnewsgermany_images/" file_names = os.listdir(os.path.dirname(images_path)) file_paths = [images_path + f for f in f...
true
true
f715b443834e4ea4db5d450ce663e81845d95977
749
py
Python
Python/total-appeal-of-a-string.py
Priyansh2/LeetCode-Solutions
d613da1881ec2416ccbe15f20b8000e36ddf1291
[ "MIT" ]
4
2018-10-11T17:50:56.000Z
2018-10-11T21:16:44.000Z
Python/total-appeal-of-a-string.py
Priyansh2/LeetCode-Solutions
d613da1881ec2416ccbe15f20b8000e36ddf1291
[ "MIT" ]
null
null
null
Python/total-appeal-of-a-string.py
Priyansh2/LeetCode-Solutions
d613da1881ec2416ccbe15f20b8000e36ddf1291
[ "MIT" ]
4
2018-10-11T18:50:32.000Z
2018-10-12T00:04:09.000Z
# Time: O(n) # Space: O(26) # combinatorics class Solution(object): def appealSum(self, s): """ :type s: str :rtype: int """ result = curr = 0 lookup = [-1]*26 for i, c in enumerate(s): result += (i-lookup[ord(c)-ord('a')])*(len(s)-i) ...
20.805556
60
0.445928
class Solution(object): def appealSum(self, s): result = curr = 0 lookup = [-1]*26 for i, c in enumerate(s): result += (i-lookup[ord(c)-ord('a')])*(len(s)-i) lookup[ord(c)-ord('a')] = i return result class Solution2(object): def appealSum(self, s): ...
true
true
f715b4574d66756d1158d3deb81d9fa1b677cc30
3,454
py
Python
huaweicloud-sdk-gaussdbfornosql/huaweicloudsdkgaussdbfornosql/v3/model/batch_tag_action_request_body.py
NQLoong/huaweicloud-sdk-python-v3
677944a0b722147c6e105c53df9110724d64152a
[ "Apache-2.0" ]
1
2021-11-03T07:54:50.000Z
2021-11-03T07:54:50.000Z
huaweicloud-sdk-gaussdbfornosql/huaweicloudsdkgaussdbfornosql/v3/model/batch_tag_action_request_body.py
mawenbo-huawei/huaweicloud-sdk-python-v3
677944a0b722147c6e105c53df9110724d64152a
[ "Apache-2.0" ]
null
null
null
huaweicloud-sdk-gaussdbfornosql/huaweicloudsdkgaussdbfornosql/v3/model/batch_tag_action_request_body.py
mawenbo-huawei/huaweicloud-sdk-python-v3
677944a0b722147c6e105c53df9110724d64152a
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import pprint import re import six class BatchTagActionRequestBody: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key is attribute name and th...
25.397059
76
0.54806
import pprint import re import six class BatchTagActionRequestBody: sensitive_list = [] openapi_types = { 'action': 'str', 'tags': 'list[BatchTagActionTagOption]' } attribute_map = { 'action': 'action', 'tags': 'tags' } def __init__(self, action=None,...
true
true
f715b4c57e072ac7d2f65d981630ad2bb277941f
5,616
py
Python
src/assisted_test_infra/test_infra/controllers/node_controllers/node_controller.py
nirarg/assisted-test-infra
e07c43501c1d9bfaa1aee3aea49f1ef359faee07
[ "Apache-2.0" ]
null
null
null
src/assisted_test_infra/test_infra/controllers/node_controllers/node_controller.py
nirarg/assisted-test-infra
e07c43501c1d9bfaa1aee3aea49f1ef359faee07
[ "Apache-2.0" ]
248
2020-11-09T06:47:39.000Z
2022-03-28T06:02:39.000Z
src/assisted_test_infra/test_infra/controllers/node_controllers/node_controller.py
nirarg/assisted-test-infra
e07c43501c1d9bfaa1aee3aea49f1ef359faee07
[ "Apache-2.0" ]
null
null
null
from abc import ABC, abstractmethod from typing import Any, Callable, List, Optional, SupportsAbs, Tuple, TypeVar import libvirt from assisted_test_infra.test_infra import BaseEntityConfig from assisted_test_infra.test_infra.controllers.node_controllers.disk import Disk from assisted_test_infra.test_infra.controllers...
26.742857
116
0.667379
from abc import ABC, abstractmethod from typing import Any, Callable, List, Optional, SupportsAbs, Tuple, TypeVar import libvirt from assisted_test_infra.test_infra import BaseEntityConfig from assisted_test_infra.test_infra.controllers.node_controllers.disk import Disk from assisted_test_infra.test_infra.controllers...
true
true
f715b57902684613288421b8c0d1be2ab344f1cf
2,747
py
Python
taxtea/checks.py
lowercase-app/django-taxtea
aa8184c1aceb67ecf34eda2e48184e810616f59f
[ "MIT" ]
13
2020-07-20T17:35:32.000Z
2021-09-25T02:11:44.000Z
taxtea/checks.py
lowercase-app/django-taxtea
aa8184c1aceb67ecf34eda2e48184e810616f59f
[ "MIT" ]
51
2020-07-22T13:56:09.000Z
2022-02-05T06:04:36.000Z
taxtea/checks.py
lowercase-app/django-taxtea
aa8184c1aceb67ecf34eda2e48184e810616f59f
[ "MIT" ]
null
null
null
from typing import List from django.apps.config import AppConfig from django.core.checks import CheckMessage, Critical, Tags, register @register(Tags.compatibility) def check_USPS_api_auth(app_configs: AppConfig = None, **kwargs) -> List[CheckMessage]: """ check_USPS_api_auth: Checks if the user has ...
30.186813
87
0.67419
from typing import List from django.apps.config import AppConfig from django.core.checks import CheckMessage, Critical, Tags, register @register(Tags.compatibility) def check_USPS_api_auth(app_configs: AppConfig = None, **kwargs) -> List[CheckMessage]: from . import settings as tax_settings messages = [] ...
true
true
f715b7500a857c259eab2aab6854485671e9f369
6,405
py
Python
lakshmi/cache.py
sarvjeets/lakshmi
8cd6e47f23a61c5b8c967f9fdc756df296f1e0d5
[ "MIT" ]
59
2021-09-07T05:19:30.000Z
2022-02-24T18:29:49.000Z
lakshmi/cache.py
sarvjeets/lakshmi
8cd6e47f23a61c5b8c967f9fdc756df296f1e0d5
[ "MIT" ]
4
2021-08-01T18:32:51.000Z
2022-02-26T19:14:37.000Z
lakshmi/cache.py
sarvjeets/lakshmi
8cd6e47f23a61c5b8c967f9fdc756df296f1e0d5
[ "MIT" ]
3
2021-08-01T04:35:07.000Z
2022-03-23T21:48:51.000Z
""" This class is used to cache return value of functions on disk for a specified number of days. This is used by lakshmi.assets module to cache name/ asset value (i.e the slow functions). For examples on how to use this class, please see the tests (tests/test_cache.py file). Currently, this module can only be used on...
32.025
79
0.684465
import functools import pickle from abc import ABC, abstractmethod from datetime import datetime from hashlib import md5 from pathlib import Path class Cacheable(ABC): @abstractmethod def cache_key(self): pass def get_file_age(file): return (datetime.today() - datetime.fromtimestam...
true
true
f715b7a5eadb8af7edda0af1e5732c76618605bb
951
py
Python
tests/test_basic.py
mustafamerttunali/Tensorflow-Training-GUI
ededb2dbfeefeac7ea6bf2986090ebcdf6905f45
[ "MIT" ]
84
2019-12-28T15:05:46.000Z
2020-12-01T15:10:56.000Z
tests/test_basic.py
mustafakisacik/Deep-Learning-Training-GUI
1992185fd18e768f30c5bb5edd08ea709be97b09
[ "MIT" ]
6
2019-12-28T02:18:08.000Z
2020-11-13T17:40:14.000Z
tests/test_basic.py
mustafakisacik/Deep-Learning-Training-GUI
1992185fd18e768f30c5bb5edd08ea709be97b09
[ "MIT" ]
23
2019-12-29T19:14:23.000Z
2020-12-07T09:43:52.000Z
import os import numpy as np from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense from multiprocessing import Process def startTensorboard(logdir): # Start tensorboard with system call os.system("tensorboard --logdir {}".format(logdir)) def fitModel(): # Create your m...
28.818182
60
0.684543
import os import numpy as np from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense from multiprocessing import Process def startTensorboard(logdir): os.system("tensorboard --logdir {}".format(logdir)) def fitModel(): model = Sequential() model.add(Dense(32, act...
true
true
f715b9d364ffce61b2e55ddeebf9ea8f7ff852a8
1,094
py
Python
tests/contrib/hooks/test_nomad_hook.py
YotpoLtd/incubator-airflow
86bd47db6084b23f4eb4b4c1dfc7f0293e4308e2
[ "MIT", "BSD-3-Clause", "BSD-2-Clause", "Apache-2.0" ]
1
2021-07-27T15:47:56.000Z
2021-07-27T15:47:56.000Z
tests/contrib/hooks/test_nomad_hook.py
YotpoLtd/incubator-airflow
86bd47db6084b23f4eb4b4c1dfc7f0293e4308e2
[ "MIT", "BSD-3-Clause", "BSD-2-Clause", "Apache-2.0" ]
null
null
null
tests/contrib/hooks/test_nomad_hook.py
YotpoLtd/incubator-airflow
86bd47db6084b23f4eb4b4c1dfc7f0293e4308e2
[ "MIT", "BSD-3-Clause", "BSD-2-Clause", "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # 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, software ...
30.388889
74
0.756856
import unittest from mock import patch from airflow import configuration from airflow.contrib.hooks.nomad_hook import NomadHook class TestNomadHook(unittest.TestCase): def setUp(self): configuration.load_test_config() @patch("airflow.contrib.hooks.nomad_hook.NomadHook.get_nomad_client") def te...
true
true
f715bb669761fdc7d43cef478f02a3c2769d3f57
1,243
py
Python
scripts/suse/yum/plugins/yumnotify.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
2
2020-11-02T22:08:26.000Z
2020-11-14T13:44:46.000Z
scripts/suse/yum/plugins/yumnotify.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
4
2021-02-06T14:30:48.000Z
2021-12-13T20:50:10.000Z
scripts/suse/yum/plugins/yumnotify.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
2
2020-11-04T06:32:02.000Z
2020-11-06T11:01:18.000Z
# Copyright (c) 2016 SUSE Linux LLC # All Rights Reserved. # # Author: Bo Maryniuk <bo@suse.de> import hashlib import os from yum import config from yum.plugins import TYPE_CORE CK_PATH = "/var/cache/salt/minion/rpmdb.cookie" RPM_PATH = "/var/lib/rpm/Packages" requires_api_version = "2.5" plugin_type = TYPE_CORE ...
21.067797
87
0.618665
import hashlib import os from yum import config from yum.plugins import TYPE_CORE CK_PATH = "/var/cache/salt/minion/rpmdb.cookie" RPM_PATH = "/var/lib/rpm/Packages" requires_api_version = "2.5" plugin_type = TYPE_CORE def _get_mtime(): return os.path.exists(RPM_PATH) and int(os.path.getmtime(RPM_PATH)) or 0 ...
true
true
f715bca80298b84ce5bd4435a0da66ffc75de251
19,652
py
Python
Bloxorz.py
ilkercankaya/Bloxorz
212e8f051329f4f7392e336b9a99d5c4ae78c019
[ "MIT" ]
null
null
null
Bloxorz.py
ilkercankaya/Bloxorz
212e8f051329f4f7392e336b9a99d5c4ae78c019
[ "MIT" ]
null
null
null
Bloxorz.py
ilkercankaya/Bloxorz
212e8f051329f4f7392e336b9a99d5c4ae78c019
[ "MIT" ]
null
null
null
# 0 is for perpendicular mode # 1 is for flat mode # 0 is for X-Axis config # 1 is for Y-Axis mode from copy import deepcopy class Block: def __init__(self, givenboard, mode, config, positionfirstbox, positionsecondbox): # Copy Board self.board = givenboard # Fill the Board with Block ...
48.403941
112
0.520507
from copy import deepcopy class Block: def __init__(self, givenboard, mode, config, positionfirstbox, positionsecondbox): self.board = givenboard self.board.field[positionfirstbox[0]][positionfirstbox[1]] = 2 if positionsecondbox != []: self.board.field[positions...
true
true
f715bcdc38ebdc27ec473e15774bc7f195755daa
5,704
py
Python
asposewordscloud/models/bookmark_data.py
rizwanniazigroupdocs/aspose-words-cloud-python
b943384a1e3c0710cc84df74119e6edf7356037e
[ "MIT" ]
null
null
null
asposewordscloud/models/bookmark_data.py
rizwanniazigroupdocs/aspose-words-cloud-python
b943384a1e3c0710cc84df74119e6edf7356037e
[ "MIT" ]
null
null
null
asposewordscloud/models/bookmark_data.py
rizwanniazigroupdocs/aspose-words-cloud-python
b943384a1e3c0710cc84df74119e6edf7356037e
[ "MIT" ]
null
null
null
# coding: utf-8 # ----------------------------------------------------------------------------------- # <copyright company="Aspose" file="bookmark_data.py"> # Copyright (c) 2020 Aspose.Words for Cloud # </copyright> # <summary> # Permission is hereby granted, free of charge, to any person obtaining a copy # of thi...
32.409091
85
0.558555
import pprint import re import six import json class BookmarkData(object): swagger_types = { 'name': 'str', 'text': 'str' } attribute_map = { 'name': 'Name', 'text': 'Text' } def __init__(self, name=None, text=None): self._name = None self._te...
true
true
f715bcfb6bc96e73744dd0a50b070cfdd7c67ca2
1,316
py
Python
torch_glow/tests/nodes/adaptive_avg_pool2d_test.py
YonginKwon/glow
7d316d028e1792534416755bf80af422adccdaa9
[ "Apache-2.0" ]
2
2020-03-23T21:04:00.000Z
2020-04-02T22:49:49.000Z
torch_glow/tests/nodes/adaptive_avg_pool2d_test.py
YonginKwon/glow
7d316d028e1792534416755bf80af422adccdaa9
[ "Apache-2.0" ]
1
2020-01-06T09:14:32.000Z
2020-01-06T09:14:32.000Z
torch_glow/tests/nodes/adaptive_avg_pool2d_test.py
YonginKwon/glow
7d316d028e1792534416755bf80af422adccdaa9
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import, division, print_function, unicode_literals import torch import torch.nn.functional as F from tests.utils import jitVsGlow import unittest class TestAdaptiveAvgPool2d(unittest.TestCase): def test_adaptive_avg_pool2d_basic(self): """Basic test of PyTorch adaptive_av...
30.604651
82
0.668693
from __future__ import absolute_import, division, print_function, unicode_literals import torch import torch.nn.functional as F from tests.utils import jitVsGlow import unittest class TestAdaptiveAvgPool2d(unittest.TestCase): def test_adaptive_avg_pool2d_basic(self): def test_f(inputs): ret...
true
true
f715bdd5034a351c309d1a984393c7e6094f054e
274
py
Python
apigw/typo.py
theztd/flaskapp-prom
e1f5137c319175fe8fc1db0ede8eec020cd2f008
[ "BSD-2-Clause" ]
2
2021-02-27T21:08:00.000Z
2021-05-12T13:55:38.000Z
apigw/typo.py
theztd/flaskapp-prom
e1f5137c319175fe8fc1db0ede8eec020cd2f008
[ "BSD-2-Clause" ]
null
null
null
apigw/typo.py
theztd/flaskapp-prom
e1f5137c319175fe8fc1db0ede8eec020cd2f008
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 def ret_string(name: str) -> str: print(type(name)) return f"Hi {name}" for n in ["Karel", "Pepa", 18, "Lucie"]: try: print(type(n)) print(ret_string(n)) except TypeError as err: print(n) print(err)
17.125
40
0.547445
def ret_string(name: str) -> str: print(type(name)) return f"Hi {name}" for n in ["Karel", "Pepa", 18, "Lucie"]: try: print(type(n)) print(ret_string(n)) except TypeError as err: print(n) print(err)
true
true
f715bdeeabab1bf9416cdf699d275a46c2adb6d6
270
py
Python
wafw00f/plugins/knownsec.py
aqyoung/scan-wafw00f
a95a94253f138d5ef791232ef4d8371de41622b6
[ "BSD-3-Clause" ]
1
2019-08-01T11:19:55.000Z
2019-08-01T11:19:55.000Z
wafw00f/plugins/knownsec.py
aqyoung/scan-wafw00f
a95a94253f138d5ef791232ef4d8371de41622b6
[ "BSD-3-Clause" ]
null
null
null
wafw00f/plugins/knownsec.py
aqyoung/scan-wafw00f
a95a94253f138d5ef791232ef4d8371de41622b6
[ "BSD-3-Clause" ]
2
2017-12-27T15:56:15.000Z
2017-12-27T20:03:09.000Z
#!/usr/bin/env python NAME = 'KS-WAF (KnownSec)' def is_waf(self): for attack in self.attacks: r = attack(self) if r is None: return _, page = r if b'/ks-waf-error.png' in page: return True return False
18
40
0.525926
NAME = 'KS-WAF (KnownSec)' def is_waf(self): for attack in self.attacks: r = attack(self) if r is None: return _, page = r if b'/ks-waf-error.png' in page: return True return False
true
true
f715be36cb847900ba0b72075d63650894204e29
16,357
py
Python
google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc_asyncio.py
googleapis/python-bigquery-storage
acc92249013f1b31fdac2aa4bf5a6864730d7422
[ "Apache-2.0" ]
44
2020-02-12T21:28:37.000Z
2022-03-31T06:16:30.000Z
google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc_asyncio.py
googleapis/python-bigquery-storage
acc92249013f1b31fdac2aa4bf5a6864730d7422
[ "Apache-2.0" ]
178
2020-02-05T10:49:45.000Z
2022-03-31T01:48:44.000Z
google/cloud/bigquery_storage_v1beta2/services/big_query_read/transports/grpc_asyncio.py
googleapis/python-bigquery-storage
acc92249013f1b31fdac2aa4bf5a6864730d7422
[ "Apache-2.0" ]
23
2020-02-05T23:12:15.000Z
2022-02-24T08:33:14.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google 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...
45.310249
88
0.645656
import warnings from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union from google.api_core import gapic_v1 from google.api_core import grpc_helpers_async from google.auth import credentials as ga_credentials from google.auth.transport.grpc import SslCredentials import packaging.version im...
true
true
f715bec4b32bc353255f534021aae397a4a5e309
5,398
py
Python
repair/evaluate.py
h4iku/repairSStuBs
0caa6269801d13f4743e6b2c8d34c01057f3b4b7
[ "MIT" ]
2
2021-07-16T04:30:10.000Z
2022-01-05T01:33:42.000Z
repair/evaluate.py
h4iku/repairSStuBs
0caa6269801d13f4743e6b2c8d34c01057f3b4b7
[ "MIT" ]
1
2021-06-17T06:57:49.000Z
2021-06-18T00:13:14.000Z
repair/evaluate.py
h4iku/repairSStuBs
0caa6269801d13f4743e6b2c8d34c01057f3b4b7
[ "MIT" ]
1
2021-05-27T05:50:17.000Z
2021-05-27T05:50:17.000Z
import csv import difflib import shutil from collections import defaultdict from statistics import mean from pytablewriter import MarkdownTableWriter from tqdm import tqdm from utils.config import CORRECT_PATCHES, INPUT, REPAIR_OUTPUT, REPAIR_RESULT class Result: def __init__(self, buggy_file_line_dir, comparis...
35.051948
80
0.626343
import csv import difflib import shutil from collections import defaultdict from statistics import mean from pytablewriter import MarkdownTableWriter from tqdm import tqdm from utils.config import CORRECT_PATCHES, INPUT, REPAIR_OUTPUT, REPAIR_RESULT class Result: def __init__(self, buggy_file_line_dir, comparis...
true
true
f715bf4feddced17be81d083c4130de44ac9c701
1,692
py
Python
multiple-images/images/migrations/0001_initial.py
mp5maker/django
a2d38e2e9973e755afce1bd0ccb17e58f3db7e33
[ "MIT" ]
null
null
null
multiple-images/images/migrations/0001_initial.py
mp5maker/django
a2d38e2e9973e755afce1bd0ccb17e58f3db7e33
[ "MIT" ]
13
2020-02-12T00:14:20.000Z
2022-02-10T08:46:42.000Z
multiple-images/images/migrations/0001_initial.py
mp5maker/django
a2d38e2e9973e755afce1bd0ccb17e58f3db7e33
[ "MIT" ]
null
null
null
# Generated by Django 2.2.2 on 2019-06-13 17:37 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Description', fields=[ ...
36
144
0.536643
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Description', fields=[ ('id', models.AutoField(auto_create...
true
true
f715bf76749dbe6664dac3361f0fd6ab0369fb12
1,123
py
Python
websauna/tests/core/test_views.py
stevepiercy/websauna
2886b86f7920d75900c634958779d61aa73f011b
[ "CNRI-Python" ]
286
2016-01-17T05:44:02.000Z
2022-02-07T20:28:49.000Z
websauna/tests/core/test_views.py
stevepiercy/websauna
2886b86f7920d75900c634958779d61aa73f011b
[ "CNRI-Python" ]
203
2016-03-15T02:00:53.000Z
2021-09-27T10:48:49.000Z
websauna/tests/core/test_views.py
ooduor/websauna
2e78cd87eda305fbbb1080d386b8cf96537360e5
[ "CNRI-Python" ]
71
2016-01-17T11:04:26.000Z
2021-08-24T08:04:31.000Z
# Standard Library import os import pytest # Websauna from websauna.system import Initializer from websauna.system.core.route import add_template_only_view from websauna.tests.fixtures import get_app from websauna.tests.webserver import customized_web_server HERE = os.path.abspath(os.path.dirname(__file__)) def e...
26.738095
70
0.743544
import os import pytest from websauna.system import Initializer from websauna.system.core.route import add_template_only_view from websauna.tests.fixtures import get_app from websauna.tests.webserver import customized_web_server HERE = os.path.abspath(os.path.dirname(__file__)) def extra_init(init: Initializer): ...
true
true
f715c03152794cffe7e9e530cbda79e5552a407d
591
bzl
Python
Examples/ReactNativeKakaoExample/android/app/build_defs.bzl
namdq97/react-native-kakao-login
603d4f75c912ecdefcfbc2bb7ace02b530a06083
[ "MIT" ]
46
2017-05-14T13:01:24.000Z
2022-01-19T00:35:23.000Z
Examples/ReactNativeKakaoExample/android/app/build_defs.bzl
namdq97/react-native-kakao-login
603d4f75c912ecdefcfbc2bb7ace02b530a06083
[ "MIT" ]
12
2018-01-12T08:00:27.000Z
2019-08-11T03:07:47.000Z
Examples/ReactNativeKakaoExample/android/app/build_defs.bzl
namdq97/react-native-kakao-login
603d4f75c912ecdefcfbc2bb7ace02b530a06083
[ "MIT" ]
16
2017-05-14T13:29:53.000Z
2020-11-26T04:01:46.000Z
"""Helper definitions to glob .aar and .jar targets""" def create_aar_targets(aarfiles): for aarfile in aarfiles: name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] lib_deps.append(":" + name) android_prebuilt_aar( name = name, aar = aarfile, ...
34.764706
81
0.57868
def create_aar_targets(aarfiles): for aarfile in aarfiles: name = "aars__" + aarfile[aarfile.rindex("/") + 1:aarfile.rindex(".aar")] lib_deps.append(":" + name) android_prebuilt_aar( name = name, aar = aarfile, ) def create_jar_targets(jarfiles): for jarfi...
true
true
f715c0b803bbc30d25555211d20acb2cc3914485
21
py
Python
prm/__init__.py
fz420/prm
19d8b27a679d6f9e669e019a563c3433025ba0c6
[ "MIT" ]
null
null
null
prm/__init__.py
fz420/prm
19d8b27a679d6f9e669e019a563c3433025ba0c6
[ "MIT" ]
3
2021-03-05T06:42:18.000Z
2021-04-30T03:34:30.000Z
prm/__init__.py
fz420/prm
19d8b27a679d6f9e669e019a563c3433025ba0c6
[ "MIT" ]
2
2021-04-23T03:19:57.000Z
2021-04-23T03:49:55.000Z
from .prm import main
21
21
0.809524
from .prm import main
true
true
f715c0cdf7d479cb571c7245fd89a407280d6b17
5,913
py
Python
src/visualisation/arrow.py
sdat2/seager19
9c3acbc5332da787de1eda2600a82490ff20fa11
[ "MIT" ]
5
2021-04-08T19:03:52.000Z
2021-12-17T14:22:49.000Z
src/visualisation/arrow.py
sdat2/seager19
9c3acbc5332da787de1eda2600a82490ff20fa11
[ "MIT" ]
25
2021-04-08T13:53:11.000Z
2022-03-17T19:45:15.000Z
src/visualisation/arrow.py
sdat2/seager19
9c3acbc5332da787de1eda2600a82490ff20fa11
[ "MIT" ]
null
null
null
"""Arrow plots for mechanism.""" import os from src.plot_utils import ps_defaults from src.constants import FIGURE_PATH from typing import Optional import matplotlib.pyplot as plt def plot_arrow_plot(save_path: Optional[str] = None, show_plots: bool = False) -> None: """ Plot the arrow plot to show that I hav...
25.161702
88
0.498393
import os from src.plot_utils import ps_defaults from src.constants import FIGURE_PATH from typing import Optional import matplotlib.pyplot as plt def plot_arrow_plot(save_path: Optional[str] = None, show_plots: bool = False) -> None: ps_defaults(use_tex=False) color_d = { "EEEE": "blue", "EE...
true
true
f715c25e8a6baf9dd30e5de343c4575f046db6a9
11,450
py
Python
elite/route.py
mEDI-S/mEDI_s-Elite-Tools
c6927c79358a3781bdf9da0db82c8c7d46f70dc6
[ "BSD-3-Clause" ]
15
2015-08-30T01:53:10.000Z
2021-02-19T21:35:07.000Z
elite/route.py
mEDI-S/mEDI_s-Elite-Tools
c6927c79358a3781bdf9da0db82c8c7d46f70dc6
[ "BSD-3-Clause" ]
2
2018-02-21T22:13:37.000Z
2021-03-06T16:48:26.000Z
elite/route.py
mEDI-S/mEDI_s-Elite-Tools
c6927c79358a3781bdf9da0db82c8c7d46f70dc6
[ "BSD-3-Clause" ]
7
2015-11-22T15:25:07.000Z
2020-05-23T01:29:40.000Z
# -*- coding: UTF8 ''' Created on 13.07.2015 @author: mEDI ''' from elite.system import system as elitesystem #from elite.rares import rares as eliterares # from elite.route import route as eliteroute class route(object): ''' classdocs ''' #__slots__ = ["bla"] #bla =1 ...
38.294314
230
0.585415
from elite.system import system as elitesystem class route(object): maxHops = None maxJumpDistance = None maxDeep = None systemID = None _before = None initSystem = None possibleSystems = [] _raresInSystem = None _availableSystemList = None _s...
true
true
f715c277513bc3a3aa82c20df1b2e8276d462a27
9,895
py
Python
pcdsdevices/tests/test_ccm.py
vespos/pcdsdevices
7c4728df62ea58b6491d1cb36bb39d27d6dd9fca
[ "BSD-3-Clause-LBNL" ]
3
2019-06-17T20:08:54.000Z
2022-01-11T17:55:21.000Z
pcdsdevices/tests/test_ccm.py
vespos/pcdsdevices
7c4728df62ea58b6491d1cb36bb39d27d6dd9fca
[ "BSD-3-Clause-LBNL" ]
757
2017-12-21T23:16:41.000Z
2022-03-31T22:56:06.000Z
pcdsdevices/tests/test_ccm.py
vespos/pcdsdevices
7c4728df62ea58b6491d1cb36bb39d27d6dd9fca
[ "BSD-3-Clause-LBNL" ]
38
2018-01-26T00:01:35.000Z
2022-02-17T00:48:55.000Z
import logging import time import numpy as np import pytest from ophyd.sim import fake_device_cache, make_fake_device from .. import ccm from ..sim import FastMotor logger = logging.getLogger(__name__) SAMPLE_ALIO = 4.575 # Current value as of writing this file SAMPLE_THETA = 1.2 # Modest angle SAMPLE_WAVELENGTH...
33.316498
78
0.700455
import logging import time import numpy as np import pytest from ophyd.sim import fake_device_cache, make_fake_device from .. import ccm from ..sim import FastMotor logger = logging.getLogger(__name__) SAMPLE_ALIO = 4.575 SAMPLE_THETA = 1.2 SAMPLE_WAVELENGTH = 1.5 def test_theta_alio_inversion(): logger.d...
true
true
f715c27add3916da3a4ba06ed5e3227bf392db8f
4,303
py
Python
spectree/models.py
loonateam/spectree
71b2d34993e01b36a8de18c2a3d6856d0c9e45c3
[ "Apache-2.0" ]
183
2019-12-29T00:37:09.000Z
2022-03-15T20:37:53.000Z
spectree/models.py
0b01001001/spectree
35f17fe9694031a335223111d7fb38175d7e6e25
[ "Apache-2.0" ]
102
2019-12-13T09:10:53.000Z
2022-03-15T06:21:29.000Z
spectree/models.py
loonateam/spectree
71b2d34993e01b36a8de18c2a3d6856d0c9e45c3
[ "Apache-2.0" ]
51
2020-01-06T21:06:07.000Z
2022-03-19T16:10:58.000Z
import re from enum import Enum from typing import Any, Dict, Sequence from pydantic import BaseModel, Field, root_validator, validator # OpenAPI names validation regexp OpenAPI_NAME_RE = re.compile(r"^[A-Za-z0-9-._]+") class ExternalDocs(BaseModel): description: str = "" url: str class Tag(BaseModel): ...
25.163743
97
0.614455
import re from enum import Enum from typing import Any, Dict, Sequence from pydantic import BaseModel, Field, root_validator, validator OpenAPI_NAME_RE = re.compile(r"^[A-Za-z0-9-._]+") class ExternalDocs(BaseModel): description: str = "" url: str class Tag(BaseModel): name: str description: str ...
true
true
f715c2f9b4de2c046a801fa47e5dbf73f975953d
820
py
Python
phone_iso3166/network.py
foxkirov/phone-iso3166
8419091e906c439f9362690d7d2d02186098e5c4
[ "MIT" ]
19
2017-03-28T10:35:22.000Z
2022-03-14T04:39:03.000Z
phone_iso3166/network.py
foxkirov/phone-iso3166
8419091e906c439f9362690d7d2d02186098e5c4
[ "MIT" ]
17
2016-11-11T11:50:57.000Z
2021-06-22T09:32:17.000Z
phone_iso3166/network.py
foxkirov/phone-iso3166
8419091e906c439f9362690d7d2d02186098e5c4
[ "MIT" ]
5
2015-09-28T18:25:38.000Z
2021-07-05T11:57:58.000Z
from .e212_names import operators, countries from .errors import InvalidNetwork, InvalidCountry def network(mcc, mnc): ''' Returns a tuple (country, network_name), with country specified as ISO-3166-1 alpha-2 code. ''' mcc = int(mcc) mnc = int(mnc) try: return operators[mcc][mnc] ...
28.275862
75
0.636585
from .e212_names import operators, countries from .errors import InvalidNetwork, InvalidCountry def network(mcc, mnc): mcc = int(mcc) mnc = int(mnc) try: return operators[mcc][mnc] except: raise InvalidNetwork('Invalid MCC {} MNC {}'.format(mcc, mnc)) def country_networks(country): ...
true
true
f715c364022f5d19e2b6087341499850fd3d9b4c
501
py
Python
polidoro_terminal/__init__.py
heitorpolidoro/py-terminal
3ef04d12aa48ef6d214598df34ddf932518f4614
[ "MIT" ]
null
null
null
polidoro_terminal/__init__.py
heitorpolidoro/py-terminal
3ef04d12aa48ef6d214598df34ddf932518f4614
[ "MIT" ]
null
null
null
polidoro_terminal/__init__.py
heitorpolidoro/py-terminal
3ef04d12aa48ef6d214598df34ddf932518f4614
[ "MIT" ]
null
null
null
from polidoro_terminal.size import size, columns, rows from polidoro_terminal.manipulation import erase_lines, up_lines, clear_to_end_of_line from polidoro_terminal import cursor from polidoro_terminal.color import Color from polidoro_terminal.format import Format from polidoro_terminal.question import question NAME =...
38.538462
107
0.784431
from polidoro_terminal.size import size, columns, rows from polidoro_terminal.manipulation import erase_lines, up_lines, clear_to_end_of_line from polidoro_terminal import cursor from polidoro_terminal.color import Color from polidoro_terminal.format import Format from polidoro_terminal.question import question NAME =...
true
true
f715c4281d345e69ba8d6ddbc7b628af0ce8c87e
2,792
py
Python
plugins/stream.py
Morgawr/test-masterlinker-repo
0666403b7092f5ba434e1b8dbf3484ccb0cbe773
[ "MIT" ]
null
null
null
plugins/stream.py
Morgawr/test-masterlinker-repo
0666403b7092f5ba434e1b8dbf3484ccb0cbe773
[ "MIT" ]
null
null
null
plugins/stream.py
Morgawr/test-masterlinker-repo
0666403b7092f5ba434e1b8dbf3484ccb0cbe773
[ "MIT" ]
null
null
null
#simple example of how a plugin should look like #this plugin simply makes the bot responde with a simple string to every message received. import time import threading import simplejson import urllib2 def set_interval(func, sec): def func_wrapper(): set_interval(func, sec) func() t = threadin...
42.30303
591
0.606017
import time import threading import simplejson import urllib2 def set_interval(func, sec): def func_wrapper(): set_interval(func, sec) func() t = threading.Timer(sec, func_wrapper) t.start() return t class streamer(): def __init__(self, api_url, name, link): self.api_url =...
false
true
f715c430f48dcf933c9fde5179a7cfbfd6339883
8,381
py
Python
hubspot/crm/deals/models/batch_response_simple_public_object.py
cclauss/hubspot-api-python
7c60c0f572b98c73e1f1816bf5981396a42735f6
[ "Apache-2.0" ]
null
null
null
hubspot/crm/deals/models/batch_response_simple_public_object.py
cclauss/hubspot-api-python
7c60c0f572b98c73e1f1816bf5981396a42735f6
[ "Apache-2.0" ]
null
null
null
hubspot/crm/deals/models/batch_response_simple_public_object.py
cclauss/hubspot-api-python
7c60c0f572b98c73e1f1816bf5981396a42735f6
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Deals No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v3 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six from hubspot...
32.111111
162
0.624866
import pprint import re import six from hubspot.crm.deals.configuration import Configuration class BatchResponseSimplePublicObject(object): openapi_types = { 'status': 'str', 'results': 'list[SimplePublicObject]', 'requested_at': 'datetime', 'started_at': 'datetime', ...
true
true
f715c44f3f9b2781b37fa1bf5d47e32a81a7c1be
8,332
py
Python
SimPEG/electromagnetics/analytics/FDEM.py
ElliotCheung/simpeg
ce5bde154179ca63798a62a12787a7ec3535472c
[ "MIT" ]
1
2022-02-18T16:31:27.000Z
2022-02-18T16:31:27.000Z
SimPEG/electromagnetics/analytics/FDEM.py
ElliotCheung/simpeg
ce5bde154179ca63798a62a12787a7ec3535472c
[ "MIT" ]
null
null
null
SimPEG/electromagnetics/analytics/FDEM.py
ElliotCheung/simpeg
ce5bde154179ca63798a62a12787a7ec3535472c
[ "MIT" ]
null
null
null
from __future__ import division import numpy as np from scipy.constants import mu_0, pi, epsilon_0 from scipy.special import erf from SimPEG import utils import warnings def hzAnalyticDipoleF(r, freq, sigma, secondary=True, mu=mu_0): """ The analytical expression is given in Equation 4.56 in Ward and Hohmann,...
30.079422
84
0.491959
from __future__ import division import numpy as np from scipy.constants import mu_0, pi, epsilon_0 from scipy.special import erf from SimPEG import utils import warnings def hzAnalyticDipoleF(r, freq, sigma, secondary=True, mu=mu_0): r = np.abs(r) k = np.sqrt(-1j * 2.0 * np.pi * freq * mu * sigma) m = 1 ...
true
true
f715c4faf3c9fe1f421e85c3edcd776dc7e1569d
5,188
py
Python
test/functional/nulldummy.py
chx381/platopia
563c616db768f813aa4482d39d8ed1d8aacaad4f
[ "MIT" ]
5
2018-07-21T15:58:30.000Z
2019-04-25T01:45:36.000Z
test/functional/nulldummy.py
chx381/platopia
563c616db768f813aa4482d39d8ed1d8aacaad4f
[ "MIT" ]
null
null
null
test/functional/nulldummy.py
chx381/platopia
563c616db768f813aa4482d39d8ed1d8aacaad4f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from t...
40.53125
125
0.644372
from test_framework.test_framework import BitcoinTestFramework from test_framework.util import * from test_framework.mininode import CTransaction, NetworkThread from test_framework.blocktools import create_coinbase, create_block from test_framework.script import CScript from io import BytesIO import time NUL...
true
true
f715c501c1f5d7c019455fce3fc6397536a093ce
288
py
Python
universal/items.py
universalscraper/universal-spider
0b6d82ee0c749cf32dcf501e6d84f518ee2e8437
[ "MIT" ]
2
2017-01-14T20:09:24.000Z
2019-09-23T09:26:23.000Z
universal/items.py
scraperize/universal-spider
0b6d82ee0c749cf32dcf501e6d84f518ee2e8437
[ "MIT" ]
null
null
null
universal/items.py
scraperize/universal-spider
0b6d82ee0c749cf32dcf501e6d84f518ee2e8437
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class UniversalItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass
19.2
51
0.6875
import scrapy class UniversalItem(scrapy.Item): pass
true
true
f715c602904311d44b8bf950698fcd77ad53a6a8
3,800
py
Python
img2pose/utils/renderer.py
jiacheng1gujiaxin/poseface
316924e224477f881240712a13a925bdd27adf4c
[ "MIT" ]
null
null
null
img2pose/utils/renderer.py
jiacheng1gujiaxin/poseface
316924e224477f881240712a13a925bdd27adf4c
[ "MIT" ]
null
null
null
img2pose/utils/renderer.py
jiacheng1gujiaxin/poseface
316924e224477f881240712a13a925bdd27adf4c
[ "MIT" ]
null
null
null
import cv2 import numpy as np from Sim3DR import RenderPipeline from .pose_operations import plot_3d_landmark def _to_ctype(arr): if not arr.flags.c_contiguous: return arr.copy(order="C") return arr def get_colors(img, ver): h, w, _ = img.shape ver[0, :] = np.minimum(np.maximum(ver[0, :], 0...
31.666667
81
0.517105
import cv2 import numpy as np from Sim3DR import RenderPipeline from .pose_operations import plot_3d_landmark def _to_ctype(arr): if not arr.flags.c_contiguous: return arr.copy(order="C") return arr def get_colors(img, ver): h, w, _ = img.shape ver[0, :] = np.minimum(np.maximum(ver[0, :], 0...
true
true
f715c633d888342e2bcb33e9b3f302a45f208031
6,067
py
Python
servers/Thot/schema.py
DiegoCorrea/bottleOfMessages
1281d3f82ce4d44a31e426aa8862c3c9b294cf03
[ "MIT" ]
null
null
null
servers/Thot/schema.py
DiegoCorrea/bottleOfMessages
1281d3f82ce4d44a31e426aa8862c3c9b294cf03
[ "MIT" ]
null
null
null
servers/Thot/schema.py
DiegoCorrea/bottleOfMessages
1281d3f82ce4d44a31e426aa8862c3c9b294cf03
[ "MIT" ]
null
null
null
import sqlite3 import sys import os import inspect from time import gmtime, strftime from config.server import APP_DB_PATH, SERVER_DB_PATH, WHO_AM_I sys.path.append('..') # conectando... conn = sqlite3.connect( os.path.dirname( os.path.abspath( inspect.getfile( inspect.currentf...
23.885827
73
0.606725
import sqlite3 import sys import os import inspect from time import gmtime, strftime from config.server import APP_DB_PATH, SERVER_DB_PATH, WHO_AM_I sys.path.append('..') conn = sqlite3.connect( os.path.dirname( os.path.abspath( inspect.getfile( inspect.currentframe() ...
true
true
f715c70e4981ec385e1f2070cf75f75007655155
293
py
Python
sololearn/NewDriverLicense/DL.py
SneakyWizards/HackerRankSolutions
daf494e7775bb0de5afcfdcfd45aa73e6a950e0e
[ "RSA-MD" ]
3
2020-01-08T18:33:11.000Z
2022-02-08T00:38:26.000Z
sololearn/NewDriverLicense/DL.py
SneakyWizards/HackerRankSolutions
daf494e7775bb0de5afcfdcfd45aa73e6a950e0e
[ "RSA-MD" ]
null
null
null
sololearn/NewDriverLicense/DL.py
SneakyWizards/HackerRankSolutions
daf494e7775bb0de5afcfdcfd45aa73e6a950e0e
[ "RSA-MD" ]
4
2020-08-08T22:02:23.000Z
2022-02-07T17:40:15.000Z
#!/usr/bin/python name = input() num_agents = int(input()) drivers = input().split() drivers.append(name) drivers.sort() index = drivers.index(name) + 1 if num_agents > index: num_agents = index rem = index % num_agents div = index // num_agents time = (rem + div) * 20 print(time)
14.65
31
0.665529
name = input() num_agents = int(input()) drivers = input().split() drivers.append(name) drivers.sort() index = drivers.index(name) + 1 if num_agents > index: num_agents = index rem = index % num_agents div = index // num_agents time = (rem + div) * 20 print(time)
true
true
f715c76c0e7bc0f285f65f27afbb7bee42da3afb
805
py
Python
server/urls.py
w769076810/myhome
38e39b15c84f8c60fe3f02b46053a8971e081b9a
[ "MIT" ]
null
null
null
server/urls.py
w769076810/myhome
38e39b15c84f8c60fe3f02b46053a8971e081b9a
[ "MIT" ]
null
null
null
server/urls.py
w769076810/myhome
38e39b15c84f8c60fe3f02b46053a8971e081b9a
[ "MIT" ]
null
null
null
"""server URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
33.541667
77
0.70559
from django.contrib import admin from django.urls import path from server import views urlpatterns = [ path('test/', views.test) ]
true
true
f715c84088f7c8d2c89e008f545880f78639ed19
17,970
py
Python
ansible/lib/ansible/modules/extras/storage/netapp/netapp_e_volume_copy.py
kiv-box/redis
966a0c3f0a51282cd173b42a6e249d23f4e89dec
[ "Apache-2.0" ]
null
null
null
ansible/lib/ansible/modules/extras/storage/netapp/netapp_e_volume_copy.py
kiv-box/redis
966a0c3f0a51282cd173b42a6e249d23f4e89dec
[ "Apache-2.0" ]
null
null
null
ansible/lib/ansible/modules/extras/storage/netapp/netapp_e_volume_copy.py
kiv-box/redis
966a0c3f0a51282cd173b42a6e249d23f4e89dec
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # (c) 2016, NetApp, Inc # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version....
40.840909
145
0.617641
DOCUMENTATION = """ --- module: netapp_e_volume_copy short_description: Create volume copy pairs description: - Create and delete snapshots images on volume groups for NetApp E-series storage arrays. version_added: '2.2' author: Kevin Hulquest (@hulquest) options: api_username: required: true d...
true
true
f715ca8ab55b1a3d741b6e97e2473b7911154537
708
py
Python
scripts/basic_support/robot_patrol_test.py
liminglong/micros_mars_task_alloc
9b216e5494dbff6abd7b4c74eb72fc35eb392ca3
[ "BSD-3-Clause" ]
4
2016-06-15T02:44:43.000Z
2021-12-20T15:43:32.000Z
scripts/basic_support/robot_patrol_test.py
liminglong/micros_mars_task_alloc
9b216e5494dbff6abd7b4c74eb72fc35eb392ca3
[ "BSD-3-Clause" ]
null
null
null
scripts/basic_support/robot_patrol_test.py
liminglong/micros_mars_task_alloc
9b216e5494dbff6abd7b4c74eb72fc35eb392ca3
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python __author__ = 'Minglong Li' #import sys #sys.path.append("~/catkin_ws/src/multi_robot_patrol/scripts/basic_support") from robot_patrol_area_0 import RobotPatrolArea0 from robot_patrol_area_1 import RobotPatrolArea1 from robot_patrol_area_2 import RobotPatrolArea2 from motivational_behavior impor...
28.32
85
0.80226
__author__ = 'Minglong Li' from robot_patrol_area_0 import RobotPatrolArea0 from robot_patrol_area_1 import RobotPatrolArea1 from robot_patrol_area_2 import RobotPatrolArea2 from motivational_behavior import MotivationalBehavior from switch import Switch from std_msgs.msg import Bool ob2 = RobotPatrolArea1() ob3 = ...
true
true
f715cb4c8e53b868f96f37ece94c476794cd5b19
17,826
py
Python
sphero_res_learner_1D.py
koro/smp_sphero
614f4958816b565c7950ea0c6e6249864fbf2efe
[ "MIT" ]
1
2020-12-13T13:02:55.000Z
2020-12-13T13:02:55.000Z
sphero_res_learner_1D.py
koro/smp_sphero
614f4958816b565c7950ea0c6e6249864fbf2efe
[ "MIT" ]
null
null
null
sphero_res_learner_1D.py
koro/smp_sphero
614f4958816b565c7950ea0c6e6249864fbf2efe
[ "MIT" ]
null
null
null
#!/usr/bin/env python """self-organizing behaviour: smp / inverse model learning for sphero, 1-dimensional""" import rospy import signal import time, sys, argparse, os from std_msgs.msg import Float32, Float32MultiArray, ColorRGBA from sensor_msgs.msg import Imu from nav_msgs.msg import Odometry from geometry_msgs.ms...
42.954217
140
0.521542
"""self-organizing behaviour: smp / inverse model learning for sphero, 1-dimensional""" import rospy import signal import time, sys, argparse, os from std_msgs.msg import Float32, Float32MultiArray, ColorRGBA from sensor_msgs.msg import Imu from nav_msgs.msg import Odometry from geometry_msgs.msg import Twist, Quater...
false
true
f715cb6225840f9ec494e8f8b22c82e88df7a2f3
45,794
py
Python
flair.py
MustafaElshani/flair
ea058f3cc056e92b6f8a9ec7f7790dd6bed5766c
[ "BSD-3-Clause" ]
null
null
null
flair.py
MustafaElshani/flair
ea058f3cc056e92b6f8a9ec7f7790dd6bed5766c
[ "BSD-3-Clause" ]
null
null
null
flair.py
MustafaElshani/flair
ea058f3cc056e92b6f8a9ec7f7790dd6bed5766c
[ "BSD-3-Clause" ]
null
null
null
""" ADT, CMS """ import sys, argparse, subprocess, os, tempfile, glob def align(): parser = argparse.ArgumentParser(description='flair-align parse options', \ usage='python flair.py align -g genome.fa -r <reads.fq>|<reads.fa> [options]') parser.add_argument('align') required = parser.add_argument_group('required...
50.769401
129
0.694414
import sys, argparse, subprocess, os, tempfile, glob def align(): parser = argparse.ArgumentParser(description='flair-align parse options', \ usage='python flair.py align -g genome.fa -r <reads.fq>|<reads.fa> [options]') parser.add_argument('align') required = parser.add_argument_group('required named arguments'...
true
true
f715cc97d4d920ab1b7a4b331266075d9ff64558
5,266
py
Python
zprime_search/python/PlotHistogram.py
cdragoiu/particle_physics
1814ea2f072ccfbf1412397b19a3b5dad7ddb639
[ "MIT" ]
null
null
null
zprime_search/python/PlotHistogram.py
cdragoiu/particle_physics
1814ea2f072ccfbf1412397b19a3b5dad7ddb639
[ "MIT" ]
null
null
null
zprime_search/python/PlotHistogram.py
cdragoiu/particle_physics
1814ea2f072ccfbf1412397b19a3b5dad7ddb639
[ "MIT" ]
null
null
null
import ROOT, sys, uuid from PlotStyle import * from SharedData import * # plot histograms ---------------------------------------------------------------------------------- def Plot(data, mcs, drawP, tag): canvas = ROOT.TCanvas(str(uuid.uuid4()), '', 440, 100, GetW(), GetH()) SetCanvas(canvas) if 'x' in dr...
41.140625
100
0.588872
import ROOT, sys, uuid from PlotStyle import * from SharedData import * def Plot(data, mcs, drawP, tag): canvas = ROOT.TCanvas(str(uuid.uuid4()), '', 440, 100, GetW(), GetH()) SetCanvas(canvas) if 'x' in drawP.log: canvas.SetLogx() if 'y' in drawP.log: canvas.SetLogy() legend = ROOT...
false
true
f715cce6602d941edd23731c966b3365ce9f1f13
1,536
py
Python
polling_stations/apps/data_collection/management/commands/import_hertsmere.py
chris48s/UK-Polling-Stations
4742b527dae94f0276d35c80460837be743b7d17
[ "BSD-3-Clause" ]
null
null
null
polling_stations/apps/data_collection/management/commands/import_hertsmere.py
chris48s/UK-Polling-Stations
4742b527dae94f0276d35c80460837be743b7d17
[ "BSD-3-Clause" ]
null
null
null
polling_stations/apps/data_collection/management/commands/import_hertsmere.py
chris48s/UK-Polling-Stations
4742b527dae94f0276d35c80460837be743b7d17
[ "BSD-3-Clause" ]
null
null
null
from data_collection.management.commands import BaseShpStationsShpDistrictsImporter class Command(BaseShpStationsShpDistrictsImporter): council_id = 'E07000098' srid = 27700 districts_srid = 27700 districts_name = 'PollingDistricts' stations_name = 'PollingStations.shp' elections = [ 'l...
34.133333
83
0.570313
from data_collection.management.commands import BaseShpStationsShpDistrictsImporter class Command(BaseShpStationsShpDistrictsImporter): council_id = 'E07000098' srid = 27700 districts_srid = 27700 districts_name = 'PollingDistricts' stations_name = 'PollingStations.shp' elections = [ 'l...
true
true
f715cd43b332d5cf3dd6ecd996c97808734feaac
1,497
py
Python
superset/db_engine_specs/gsheets.py
ayuanty/superset
132a8ef2cb55fa6692ea31d5c278f102d6c2886b
[ "Apache-2.0" ]
1
2022-01-03T08:36:11.000Z
2022-01-03T08:36:11.000Z
superset/db_engine_specs/gsheets.py
ayuanty/superset
132a8ef2cb55fa6692ea31d5c278f102d6c2886b
[ "Apache-2.0" ]
63
2021-06-12T18:25:14.000Z
2022-03-21T07:57:02.000Z
superset/db_engine_specs/gsheets.py
ayuanty/superset
132a8ef2cb55fa6692ea31d5c278f102d6c2886b
[ "Apache-2.0" ]
1
2021-10-01T20:16:18.000Z
2021-10-01T20:16:18.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
36.512195
70
0.741483
from typing import Optional from sqlalchemy.engine.url import URL from superset import security_manager from superset.db_engine_specs.sqlite import SqliteEngineSpec class GSheetsEngineSpec(SqliteEngineSpec): engine = "gsheets" engine_name = "Google Sheets" allows_joins = False allows_subqueries = T...
true
true
f715cd46be73951aea27a4ea4d8cd743000fd4dd
1,164
py
Python
test/functional/p2p_mempool.py
Pirontechv/Bitchain
7ca7b6a8090f221d6982b09891c19ca5b7ace1d0
[ "MIT" ]
1
2020-03-13T14:59:52.000Z
2020-03-13T14:59:52.000Z
test/functional/p2p_mempool.py
Pirontechv/Bitchain
7ca7b6a8090f221d6982b09891c19ca5b7ace1d0
[ "MIT" ]
null
null
null
test/functional/p2p_mempool.py
Pirontechv/Bitchain
7ca7b6a8090f221d6982b09891c19ca5b7ace1d0
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2015-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test p2p mempool message. Test that nodes are disconnected if they send mempool messages when bloom fi...
32.333333
73
0.717354
from test_framework.mininode import * from test_framework.test_framework import BitchainTestFramework from test_framework.util import * class P2PMempoolTests(BitchainTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 1 self.extra_args = [["-peerbloomf...
true
true
f715ce83ac789168b60816ea12ee97e12d21dee1
5,162
py
Python
tinyquery/repeated_util.py
graingert/tinyquery
f26940a2ad240911e278ef7c82e3f14e0f4c5e4e
[ "MIT" ]
104
2015-02-21T22:54:15.000Z
2022-03-21T11:08:02.000Z
tinyquery/repeated_util.py
graingert/tinyquery
f26940a2ad240911e278ef7c82e3f14e0f4c5e4e
[ "MIT" ]
14
2018-01-30T16:32:09.000Z
2022-03-02T12:57:11.000Z
tinyquery/repeated_util.py
graingert/tinyquery
f26940a2ad240911e278ef7c82e3f14e0f4c5e4e
[ "MIT" ]
28
2015-09-16T22:42:44.000Z
2022-01-15T11:51:45.000Z
"""Helper functions for dealing with repeated fields. It comes up in a few places that we need to flatten or unflatten repeated columns when using them in conjunction with other repeated or scalar fields. These functions allow us to flatten into non-repeated columns to apply various operations and then unflatten back ...
38.522388
79
0.678419
from __future__ import absolute_import from tinyquery import tq_modes def rebuild_column_values(repetitions, values, result): if len(repetitions) == 0: return result curr_repetition = repetitions[0] curr_values = normalize_repeated_null(values[:max(curr_repetition, 1)]) return re...
true
true
f715ceb943279ec375261a9adc1d7aa35db8622f
12,515
py
Python
imputena/simple_imputation/linear_regression.py
macarro/imputena
3a94ae1419a2af0d9707b20546ee078929ce99e8
[ "MIT" ]
6
2020-04-27T21:21:47.000Z
2022-03-30T03:02:54.000Z
imputena/simple_imputation/linear_regression.py
macarro/imputena
3a94ae1419a2af0d9707b20546ee078929ce99e8
[ "MIT" ]
1
2021-07-01T18:49:27.000Z
2021-07-01T18:49:27.000Z
imputena/simple_imputation/linear_regression.py
macarro/imputena
3a94ae1419a2af0d9707b20546ee078929ce99e8
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from sklearn import linear_model import logging def linear_regression( data=None, dependent=None, predictors=None, regressions='available', noise=False, inplace=False): """Performs simple or multiple linear regression imputation on the data. First, the re...
46.180812
79
0.696524
import pandas as pd import numpy as np from sklearn import linear_model import logging def linear_regression( data=None, dependent=None, predictors=None, regressions='available', noise=False, inplace=False): if not isinstance(data, pd.DataFrame): raise TypeError('The data has to be a D...
true
true
f715d03e6e3bce6f65c548086393381517fcc295
143
py
Python
packages/pyolite-kernel/py/piplite/piplite/__init__.py
luzpaz/jupyterlite
4b9d9419918a4ac53bb45b78a3d44d0ca2cd9665
[ "BSD-3-Clause" ]
null
null
null
packages/pyolite-kernel/py/piplite/piplite/__init__.py
luzpaz/jupyterlite
4b9d9419918a4ac53bb45b78a3d44d0ca2cd9665
[ "BSD-3-Clause" ]
null
null
null
packages/pyolite-kernel/py/piplite/piplite/__init__.py
luzpaz/jupyterlite
4b9d9419918a4ac53bb45b78a3d44d0ca2cd9665
[ "BSD-3-Clause" ]
null
null
null
"""A configurable Python package backed by Pyodide's micropip""" from .piplite import install __version__ = "0.1.0a23" __all__ = ["install"]
20.428571
64
0.734266
from .piplite import install __version__ = "0.1.0a23" __all__ = ["install"]
true
true
f715d0e64ba7e66d2862699c039894e7931be245
7,609
py
Python
custom_components/jlrincontrol/services.py
stefferber/homeassistant-jlrincontrol
d11d931e097cc011047b1ad128f9a4340822117c
[ "MIT" ]
27
2020-04-16T06:47:41.000Z
2022-01-06T01:55:54.000Z
custom_components/jlrincontrol/services.py
stefferber/homeassistant-jlrincontrol
d11d931e097cc011047b1ad128f9a4340822117c
[ "MIT" ]
40
2020-04-16T07:13:08.000Z
2022-02-08T21:27:49.000Z
custom_components/jlrincontrol/services.py
stefferber/homeassistant-jlrincontrol
d11d931e097cc011047b1ad128f9a4340822117c
[ "MIT" ]
15
2020-04-16T07:09:19.000Z
2022-03-02T07:06:49.000Z
import inspect import logging import asyncio from urllib import error from functools import partial from .const import DOMAIN, JLR_DATA from .util import convert_temp_value _LOGGER = logging.getLogger(__name__) class JLRService: def __init__(self, hass, config_entry, vin): self.hass = hass self....
37.29902
76
0.490078
import inspect import logging import asyncio from urllib import error from functools import partial from .const import DOMAIN, JLR_DATA from .util import convert_temp_value _LOGGER = logging.getLogger(__name__) class JLRService: def __init__(self, hass, config_entry, vin): self.hass = hass self....
true
true
f715d167d46ffec6d0102269f517067c5bcb0733
821
py
Python
ch08_dash_standard_components/table_handmade_stylecell.py
Ethan0621/plotly-dash-dev
abe478824db1ee511a2d92f88e5dad49f5d6e27e
[ "MIT" ]
21
2020-10-02T08:17:33.000Z
2022-03-22T06:10:17.000Z
ch08_dash_standard_components/table_handmade_stylecell.py
Ethan0621/plotly-dash-dev
abe478824db1ee511a2d92f88e5dad49f5d6e27e
[ "MIT" ]
4
2019-07-18T04:43:31.000Z
2021-10-31T10:30:25.000Z
ch08_dash_standard_components/table_handmade_stylecell.py
Ethan0621/plotly-dash-dev
abe478824db1ee511a2d92f88e5dad49f5d6e27e
[ "MIT" ]
12
2019-07-23T05:36:57.000Z
2021-07-11T08:57:47.000Z
import dash import dash_table app = dash.Dash(__name__) app.layout = dash_table.DataTable( fill_width=False, columns=[ {"name": "number", "id": "number"}, {"name": "region", "id": "area"}, {"name": "tsuyu-iri", "id": "tsuyu-iri"}, ], data=[ {"number": 0, "area": "okinaw...
31.576923
69
0.527406
import dash import dash_table app = dash.Dash(__name__) app.layout = dash_table.DataTable( fill_width=False, columns=[ {"name": "number", "id": "number"}, {"name": "region", "id": "area"}, {"name": "tsuyu-iri", "id": "tsuyu-iri"}, ], data=[ {"number": 0, "area": "okinaw...
true
true
f715d1f15c0f57ec6888a0eaa987c5954b2e0137
12,603
py
Python
ForgeActivity/forgeactivity/main.py
isabella232/allura
04f14f15a9a9364e18c61f68acdaa241a470186b
[ "Apache-2.0" ]
113
2015-03-25T10:33:37.000Z
2022-02-16T20:55:06.000Z
ForgeActivity/forgeactivity/main.py
apache/allura
6184203235ac6f83c943fae7fd3fef54678f9ed7
[ "Apache-2.0" ]
4
2017-08-04T16:19:07.000Z
2020-06-08T19:01:33.000Z
ForgeActivity/forgeactivity/main.py
isabella232/allura
04f14f15a9a9364e18c61f68acdaa241a470186b
[ "Apache-2.0" ]
36
2015-08-14T16:27:39.000Z
2022-02-16T20:54:35.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 (t...
38.42378
111
0.611521
from __future__ import unicode_literals from __future__ import absolute_import import logging import calendar from datetime import timedelta from itertools import islice from bson import ObjectId from ming.orm import session from tg import tmpl_context as c, app_globals as g from tg import request, response from tg i...
true
true
f715d278f72818778ed7a4eac29242b89126d982
1,827
py
Python
setup/authorization.py
LenoxFro/spotify-save-discover-weekly
1fecd101ad21a96dbb8fef6b402358386e0e5687
[ "MIT" ]
8
2021-03-31T22:05:56.000Z
2022-01-01T22:42:59.000Z
setup/authorization.py
LenoxFro/spotify-save-discover-weekly
1fecd101ad21a96dbb8fef6b402358386e0e5687
[ "MIT" ]
null
null
null
setup/authorization.py
LenoxFro/spotify-save-discover-weekly
1fecd101ad21a96dbb8fef6b402358386e0e5687
[ "MIT" ]
10
2021-03-31T22:11:58.000Z
2022-03-31T10:55:36.000Z
import urllib.parse from urllib.parse import parse_qs from dotenv import load_dotenv, find_dotenv import requests import base64 import os load_dotenv(find_dotenv()) CLIENT_ID = os.environ.get("CLIENT_ID") CLIENT_SECRET = os.environ.get("CLIENT_SECRET") REDIRECT_URI = os.environ.get("REDIRECT_URI") OAUTH_AUTHORIZE_URL...
34.471698
124
0.712644
import urllib.parse from urllib.parse import parse_qs from dotenv import load_dotenv, find_dotenv import requests import base64 import os load_dotenv(find_dotenv()) CLIENT_ID = os.environ.get("CLIENT_ID") CLIENT_SECRET = os.environ.get("CLIENT_SECRET") REDIRECT_URI = os.environ.get("REDIRECT_URI") OAUTH_AUTHORIZE_URL...
true
true
f715d3e1902988bafee7ba1ae8d7e9743ffae740
1,362
py
Python
abt/cli/add.py
kamikat/a2torrent
543cea17f81c0cebfcb14a72b7c4d78fcbd9599e
[ "MIT" ]
5
2017-06-18T03:30:54.000Z
2019-02-28T16:36:16.000Z
abt/cli/add.py
kamikat/a2torrent
543cea17f81c0cebfcb14a72b7c4d78fcbd9599e
[ "MIT" ]
1
2017-12-11T06:54:13.000Z
2017-12-18T15:20:36.000Z
abt/cli/add.py
kamikat/a2torrent
543cea17f81c0cebfcb14a72b7c4d78fcbd9599e
[ "MIT" ]
1
2017-12-11T07:06:13.000Z
2017-12-11T07:06:13.000Z
#!/usr/bin/env python2 """ Add BitTorrent download task """ import argparse import abt.cli as cli import abt.rpc_client as client import base64 import os import tempfile if __name__ == '__main__': parser = argparse.ArgumentParser(prog=cli.progname, description=__doc__.strip()) parser.add_argument('torrent', ...
33.219512
121
0.669604
""" Add BitTorrent download task """ import argparse import abt.cli as cli import abt.rpc_client as client import base64 import os import tempfile if __name__ == '__main__': parser = argparse.ArgumentParser(prog=cli.progname, description=__doc__.strip()) parser.add_argument('torrent', nargs='?', action='stor...
false
true
f715d41a7338077da2b9062cb81f2988564db3d0
4,328
py
Python
gouda/bot.py
fxcqz/gouda3
079bcb52f6357dc7704ec845d916f961a18d59cd
[ "MIT" ]
null
null
null
gouda/bot.py
fxcqz/gouda3
079bcb52f6357dc7704ec845d916f961a18d59cd
[ "MIT" ]
10
2016-03-22T11:52:19.000Z
2016-03-27T16:19:06.000Z
gouda/bot.py
fxcqz/gouda3
079bcb52f6357dc7704ec845d916f961a18d59cd
[ "MIT" ]
null
null
null
from collections import OrderedDict import importlib from peewee import SqliteDatabase from .settings import Settings DATABASE = SqliteDatabase("gouda.db") class Gouda(object): def __init__(self): self.settings = Settings("config/config.json") self.name = self.settings.core['nick'] # use...
37.634783
94
0.501848
from collections import OrderedDict import importlib from peewee import SqliteDatabase from .settings import Settings DATABASE = SqliteDatabase("gouda.db") class Gouda(object): def __init__(self): self.settings = Settings("config/config.json") self.name = self.settings.core['nick'] ...
true
true
f715d44ead41064419d591910c9d8e9251cb95b1
4,635
py
Python
3 experiments_confidence/batch/e2 (experiment and chance scores) (cpj).py
nmningmei/metacognition
734082e247cc7fc9d277563e2676e10692617a3f
[ "MIT" ]
3
2019-07-09T15:37:46.000Z
2019-07-17T16:28:02.000Z
3 experiments_confidence/batch/e2 (experiment and chance scores) (cpj).py
nmningmei/metacognition
734082e247cc7fc9d277563e2676e10692617a3f
[ "MIT" ]
null
null
null
3 experiments_confidence/batch/e2 (experiment and chance scores) (cpj).py
nmningmei/metacognition
734082e247cc7fc9d277563e2676e10692617a3f
[ "MIT" ]
null
null
null
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Mon Nov 12 16:07:58 2018 @author: nmei in exp2 (e2) there were 3 possible awareness ratings ( (e.g. 1- no experience, 2 brief glimpse 3 almost clear or clear perception) BUT if can make a binary classification by focussing on 1 and 2 which are the majority...
31.965517
159
0.408846
if __name__ == '__main__': import os import pandas as pd import numpy as np import utils dir_saving = 'results_e2' if not os.path.exists(dir_saving): os.mkdir(dir_saving) try: df1 = pd.read_csv('e2.csv').iloc[:,1:] except: df1 = pd.rea...
true
true
f715d5acbe3a069259390dee428b7666dca26c08
9,706
py
Python
src/intermediate_representation/sem_utils.py
ckosten/ValueNet4SPARQL
de320a2f0e1a4c5a6c0e5cc79057dda9901046e8
[ "Apache-2.0" ]
null
null
null
src/intermediate_representation/sem_utils.py
ckosten/ValueNet4SPARQL
de320a2f0e1a4c5a6c0e5cc79057dda9901046e8
[ "Apache-2.0" ]
null
null
null
src/intermediate_representation/sem_utils.py
ckosten/ValueNet4SPARQL
de320a2f0e1a4c5a6c0e5cc79057dda9901046e8
[ "Apache-2.0" ]
1
2021-09-23T13:02:45.000Z
2021-09-23T13:02:45.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT license. # -*- coding: utf-8 -*- """ # @Time : 2019/5/27 # @Author : Jiaqi&Zecheng # @File : sem_utils.py # @Software: PyCharm """ import os import json import re as regex import spacy from nltk.stem import WordNetLemmatizer wordnet_lemmatizer =...
46.888889
117
0.474861
import os import json import re as regex import spacy from nltk.stem import WordNetLemmatizer wordnet_lemmatizer = WordNetLemmatizer() nlp = spacy.load('en_core_web_sm', disable=['parser', 'ner']) def partial_match(query, table_name): query = [token.lemma_ for token in nlp(query)] table_name = [nlp(token)...
true
true
f715d67eef0245ded35fcb508560db29166544bc
518
py
Python
components/driver/test_apps/i2s_test_apps/i2s/pytest_i2s.py
fbucafusco/esp-idf
c2ccc383dae2a47c2c2dc8c7ad78175a3fd11361
[ "Apache-2.0" ]
null
null
null
components/driver/test_apps/i2s_test_apps/i2s/pytest_i2s.py
fbucafusco/esp-idf
c2ccc383dae2a47c2c2dc8c7ad78175a3fd11361
[ "Apache-2.0" ]
null
null
null
components/driver/test_apps/i2s_test_apps/i2s/pytest_i2s.py
fbucafusco/esp-idf
c2ccc383dae2a47c2c2dc8c7ad78175a3fd11361
[ "Apache-2.0" ]
null
null
null
# SPDX-FileCopyrightText: 2022 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: Apache-2.0 import pytest from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32s2 @pytest.mark.esp32c3 @pytest.mark.esp32s3 @pytest.mark.generic @pytest.mark.parametrize( 'config', [ 'iram_saf...
20.72
66
0.696911
import pytest from pytest_embedded import Dut @pytest.mark.esp32 @pytest.mark.esp32s2 @pytest.mark.esp32c3 @pytest.mark.esp32s3 @pytest.mark.generic @pytest.mark.parametrize( 'config', [ 'iram_safe', 'release', ], indirect=True, ) def test_i2s(dut: Dut) -> None: dut.expect_exact('...
true
true
f715d6d5b4734d75244b4bcd84df7da47ab5fd20
5,939
py
Python
coresupdate.py
danitxu79/Retroarch_Cores_Update_from_Retropie_Menu
2841b12b0d29b08e71e0ddbbd148e5cf84cad3ce
[ "MIT" ]
null
null
null
coresupdate.py
danitxu79/Retroarch_Cores_Update_from_Retropie_Menu
2841b12b0d29b08e71e0ddbbd148e5cf84cad3ce
[ "MIT" ]
null
null
null
coresupdate.py
danitxu79/Retroarch_Cores_Update_from_Retropie_Menu
2841b12b0d29b08e71e0ddbbd148e5cf84cad3ce
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # user's retroarch configuration file retroconfig = '/opt/retropie/configs/all/retroarch.cfg' # current buildbot url retrourl = 'https://buildbot.libretro.com' import argparse import configparser import os import os.path as pth import platform import shutil import sys import tempfile import ti...
30.613402
135
0.602795
retroconfig = '/opt/retropie/configs/all/retroarch.cfg' # current buildbot url retrourl = 'https://buildbot.libretro.com' import argparse import configparser import os import os.path as pth import platform import shutil import sys import tempfile import time import urllib.request import zipfile # parse arguments pa...
true
true
f715d7a31a5df246928567994bae099da3cac6a5
7,559
py
Python
webStorm-APICloud/python_tools/Lib/SimpleHTTPServer.py
zzr925028429/androidyianyan
8967fdba92473e8e65ee222515dfc54cdae5bb0b
[ "MIT" ]
81
2017-03-13T08:24:01.000Z
2021-04-02T09:48:38.000Z
Macros/Python/SimpleHTTPServer.py
rec/DMXIS
540baa59df6f4ae39990e5888f90b95caa362279
[ "Artistic-2.0" ]
6
2017-04-30T08:36:55.000Z
2017-09-22T01:37:28.000Z
Macros/Python/SimpleHTTPServer.py
rec/DMXIS
540baa59df6f4ae39990e5888f90b95caa362279
[ "Artistic-2.0" ]
41
2017-03-18T14:11:58.000Z
2021-04-14T05:06:09.000Z
"""Simple HTTP Server. This module builds on BaseHTTPServer by implementing the standard GET and HEAD requests in a fairly straightforward manner. """ __version__ = "0.6" __all__ = ["SimpleHTTPRequestHandler"] import os import posixpath import BaseHTTPServer import urllib import cgi import shutil...
34.515982
83
0.582484
__version__ = "0.6" __all__ = ["SimpleHTTPRequestHandler"] import os import posixpath import BaseHTTPServer import urllib import cgi import shutil import mimetypes try: from cStringIO import StringIO except ImportError: from StringIO import StringIO class SimpleHTTPRequestHandler(BaseHT...
true
true
f715d813ac5ceeef5aa1cbcaa572ba4bc2637be9
182
py
Python
reduction/test/plot_algol_h_alpha_line.py
christianwbrock/algol-reduction
5e85734d9e9e31985ead3ce40e67535418351010
[ "BSD-3-Clause" ]
null
null
null
reduction/test/plot_algol_h_alpha_line.py
christianwbrock/algol-reduction
5e85734d9e9e31985ead3ce40e67535418351010
[ "BSD-3-Clause" ]
null
null
null
reduction/test/plot_algol_h_alpha_line.py
christianwbrock/algol-reduction
5e85734d9e9e31985ead3ce40e67535418351010
[ "BSD-3-Clause" ]
null
null
null
import matplotlib.pyplot as plt from reduction.algol_h_alpha_line_model import AlgolHAlphaModel if __name__ == '__main__': AlgolHAlphaModel().plot(plt.axes()) plt.show()
18.2
63
0.758242
import matplotlib.pyplot as plt from reduction.algol_h_alpha_line_model import AlgolHAlphaModel if __name__ == '__main__': AlgolHAlphaModel().plot(plt.axes()) plt.show()
true
true
f715d8a0e2bc4f9037250784399021a44f9b5b67
2,019
py
Python
h2o-py/tests/testdir_algos/glm/pyunit_link_correct_default_largeGLM.py
ChristosChristofidis/h2o-3
2a926c0950a98eff5a4c06aeaf0373e17176ecd8
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/testdir_algos/glm/pyunit_link_correct_default_largeGLM.py
ChristosChristofidis/h2o-3
2a926c0950a98eff5a4c06aeaf0373e17176ecd8
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/testdir_algos/glm/pyunit_link_correct_default_largeGLM.py
ChristosChristofidis/h2o-3
2a926c0950a98eff5a4c06aeaf0373e17176ecd8
[ "Apache-2.0" ]
1
2020-12-18T19:20:02.000Z
2020-12-18T19:20:02.000Z
import sys sys.path.insert(1, "../../../") import h2o def link_correct_default(ip,port): # Connect to h2o h2o.init(ip,port) print("Reading in original prostate data.") h2o_data = h2o.upload_file(path=h2o.locate("smalldata/prostate/prostate.csv.zip")) print("Compare models with link unspecified and canonical lin...
51.769231
113
0.752353
import sys sys.path.insert(1, "../../../") import h2o def link_correct_default(ip,port): h2o.init(ip,port) print("Reading in original prostate data.") h2o_data = h2o.upload_file(path=h2o.locate("smalldata/prostate/prostate.csv.zip")) print("Compare models with link unspecified and canonical link specified.") p...
true
true
f715d969b2e39092279936585118b9960ebb2227
204
py
Python
sigbox/__init__.py
ok65/sigbox
eacec88ccdc3929e19d92d54ef3c52dda54e5856
[ "WTFPL" ]
null
null
null
sigbox/__init__.py
ok65/sigbox
eacec88ccdc3929e19d92d54ef3c52dda54e5856
[ "WTFPL" ]
null
null
null
sigbox/__init__.py
ok65/sigbox
eacec88ccdc3929e19d92d54ef3c52dda54e5856
[ "WTFPL" ]
null
null
null
from sigbox.signal_decorator import SignalDecorator from sigbox.signal_box import SignalBox, SignalBoxClass from sigbox.sigbox import SigBox __all__ = [SignalBox, SignalDecorator, SignalBoxClass, SigBox]
40.8
62
0.857843
from sigbox.signal_decorator import SignalDecorator from sigbox.signal_box import SignalBox, SignalBoxClass from sigbox.sigbox import SigBox __all__ = [SignalBox, SignalDecorator, SignalBoxClass, SigBox]
true
true
f715d9a77e0c016a8984da9e96656403d08f49b6
3,270
py
Python
aliyun-python-sdk-cbn/aliyunsdkcbn/request/v20170912/UpdateTransitRouterVbrAttachmentAttributeRequest.py
leafcoder/aliyun-openapi-python-sdk
26b441ab37a5cda804de475fd5284bab699443f1
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-cbn/aliyunsdkcbn/request/v20170912/UpdateTransitRouterVbrAttachmentAttributeRequest.py
leafcoder/aliyun-openapi-python-sdk
26b441ab37a5cda804de475fd5284bab699443f1
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-cbn/aliyunsdkcbn/request/v20170912/UpdateTransitRouterVbrAttachmentAttributeRequest.py
leafcoder/aliyun-openapi-python-sdk
26b441ab37a5cda804de475fd5284bab699443f1
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
38.023256
100
0.795107
from aliyunsdkcore.request import RpcRequest from aliyunsdkcbn.endpoint import endpoint_data class UpdateTransitRouterVbrAttachmentAttributeRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Cbn', '2017-09-12', 'UpdateTransitRouterVbrAttachmentAttribute','cbn') self.set_method('POST') if has...
true
true
f715d9aaf4f384ba12cc7069add8806d2f40e71b
552
py
Python
446.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
446.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
446.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
"""446. Arithmetic Slices II - Subsequence""" class Solution(object): def numberOfArithmeticSlices(self, A): """ :type A: List[int] :rtype: int """ dp = [collections.defaultdict(int) for _ in range(len(A))] total = 0 for i in range(len(A)): for j ...
14.153846
66
0.405797
class Solution(object): def numberOfArithmeticSlices(self, A): dp = [collections.defaultdict(int) for _ in range(len(A))] total = 0 for i in range(len(A)): for j in range(i): k = A[i] - A[j] dp[i][k] += 1 if k in dp[j]: ...
true
true
f715d9f86be99e54b40e4f20ec32ccf74e3c5ae7
1,497
py
Python
ci/fireci/fireci/gradle.py
Elke26/firebase-android-sdk
47d41b9dc17cd95a7799f672f5cc14f1747642ec
[ "Apache-2.0" ]
1
2021-01-30T19:52:32.000Z
2021-01-30T19:52:32.000Z
ci/fireci/fireci/gradle.py
Elke26/firebase-android-sdk
47d41b9dc17cd95a7799f672f5cc14f1747642ec
[ "Apache-2.0" ]
1
2019-03-01T19:54:34.000Z
2019-03-01T19:58:03.000Z
ci/fireci/fireci/gradle.py
samtstern/firebase-android-sdk
ef399052f99019feb294746447e2bd8a5a6e81a4
[ "Apache-2.0" ]
1
2021-01-02T20:23:09.000Z
2021-01-02T20:23:09.000Z
# Copyright 2018 Google 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 writing, ...
29.94
87
0.716099
import logging import os import subprocess import sys from . import stats _logger = logging.getLogger('fireci.gradle') ADB_INSTALL_TIMEOUT = '5' def P(name, value): return '-P{}={}'.format(name, value) @stats.measure_call('gradle') def run(*args, gradle_opts='', workdir=None): new_env = dict(os.environ) i...
true
true
f715da382fe2b6fe6c5bc405301456843f05fbef
34,975
py
Python
cmf/models/cmfsm.py
lidongyv/Explicit-Context-Mapping-for-Stereo-Matching
9b2e63982daf5629045de0bf0694d8ccb111b2f1
[ "Apache-2.0" ]
1
2020-12-31T02:40:49.000Z
2020-12-31T02:40:49.000Z
cmf/models/cmfsm.py
lidongyv/Explicit-Context-Mapping-for-Stereo-Matching
9b2e63982daf5629045de0bf0694d8ccb111b2f1
[ "Apache-2.0" ]
null
null
null
cmf/models/cmfsm.py
lidongyv/Explicit-Context-Mapping-for-Stereo-Matching
9b2e63982daf5629045de0bf0694d8ccb111b2f1
[ "Apache-2.0" ]
1
2020-12-31T02:40:49.000Z
2020-12-31T02:40:49.000Z
# -*- coding: utf-8 -*- # @Author: yulidong # @Date: 2018-07-17 10:44:43 # @Last Modified by: yulidong # @Last Modified time: 2019-03-01 14:12:35 # -*- coding: utf-8 -*- # @Author: lidong # @Date: 2018-03-20 18:01:52 # @Last Modified by: yulidong # @Last Modified time: 2018-07-16 22:16:14 import time import tor...
44.897304
185
0.587277
import time import torch import numpy as np import torch.nn as nn import math from math import ceil from torch.autograd import Variable from torch.nn.functional import cosine_similarity as cosine_s from cmf import caffe_pb2 from cmf.models.utils import * rsn_specs = { 'scene': { 'n_classes': 9, ...
true
true
f715da8614fe069c6b1f18f8b31418a56d1297bc
2,432
py
Python
kornia/augmentation/_3d/base.py
dichen-cd/kornia
dcd1c5e17cf4d2ae2db1f438c53245bba0afd93f
[ "ECL-2.0", "Apache-2.0" ]
1
2022-02-10T02:02:06.000Z
2022-02-10T02:02:06.000Z
kornia/augmentation/_3d/base.py
dichen-cd/kornia
dcd1c5e17cf4d2ae2db1f438c53245bba0afd93f
[ "ECL-2.0", "Apache-2.0" ]
14
2021-09-26T11:07:56.000Z
2022-03-20T11:11:15.000Z
kornia/augmentation/_3d/base.py
dichen-cd/kornia
dcd1c5e17cf4d2ae2db1f438c53245bba0afd93f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import torch import kornia from kornia.augmentation.base import TensorWithTransformMat, _AugmentationBase from kornia.augmentation.utils import _transform_input3d, _validate_input_dtype class AugmentationBase3D(_AugmentationBase): r"""AugmentationBase3D base class for customized augmentation implementations. ...
50.666667
116
0.665707
import torch import kornia from kornia.augmentation.base import TensorWithTransformMat, _AugmentationBase from kornia.augmentation.utils import _transform_input3d, _validate_input_dtype class AugmentationBase3D(_AugmentationBase): def __check_batching__(self, input: TensorWithTransformMat): if isinstanc...
true
true
f715dbd84fff6809be6f2c5c95ceb8898c2ac604
2,563
gyp
Python
binding.gyp
sumeetkakkar/node-krb5
3c13021b3fcd3be239d3c731455154910f4d03b6
[ "BSD-3-Clause" ]
null
null
null
binding.gyp
sumeetkakkar/node-krb5
3c13021b3fcd3be239d3c731455154910f4d03b6
[ "BSD-3-Clause" ]
null
null
null
binding.gyp
sumeetkakkar/node-krb5
3c13021b3fcd3be239d3c731455154910f4d03b6
[ "BSD-3-Clause" ]
1
2019-08-29T18:45:47.000Z
2019-08-29T18:45:47.000Z
{ "targets": [{ "target_name": "krb5", "sources": [ "./src/module.cc", "./src/krb5_bind.cc", "./src/gss_bind.cc", "./src/base64.cc" ], 'cflags!': ['-fno-exceptions'], 'cflags_cc!': ['-fno-exceptions'], 'include_dirs': ["...
36.614286
98
0.285603
{ "targets": [{ "target_name": "krb5", "sources": [ "./src/module.cc", "./src/krb5_bind.cc", "./src/gss_bind.cc", "./src/base64.cc" ], 'cflags!': ['-fno-exceptions'], 'cflags_cc!': ['-fno-exceptions'], 'include_dirs': ["...
true
true
f715dc50ff4886ddbbcf5f5817f1d0e1a2b60106
461
py
Python
jdxapi/routes/__init__.py
jobdataexchange/jdx-api
7815a6463de56423c3b4196648607c4ebe56828c
[ "Apache-2.0" ]
null
null
null
jdxapi/routes/__init__.py
jobdataexchange/jdx-api
7815a6463de56423c3b4196648607c4ebe56828c
[ "Apache-2.0" ]
9
2019-12-26T17:39:58.000Z
2022-01-13T01:59:49.000Z
jdxapi/routes/__init__.py
jobdataexchange/jdx-api
7815a6463de56423c3b4196648607c4ebe56828c
[ "Apache-2.0" ]
null
null
null
from jdxapi.routes.health import * from jdxapi.routes.upload_job_description_file import * from jdxapi.routes.upload_job_description_context import * from jdxapi.routes.framework_recommendations import * from jdxapi.routes.framework_selections import * from jdxapi.routes.generate_job_schema_plus import * from jdxapi.ro...
41.909091
58
0.848156
from jdxapi.routes.health import * from jdxapi.routes.upload_job_description_file import * from jdxapi.routes.upload_job_description_context import * from jdxapi.routes.framework_recommendations import * from jdxapi.routes.framework_selections import * from jdxapi.routes.generate_job_schema_plus import * from jdxapi.ro...
true
true
f715deb9771158a547fcbbc301e8725ecd0fded2
3,896
py
Python
Python/PyParsing/node_utils.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
115
2015-03-23T13:34:42.000Z
2022-03-21T00:27:21.000Z
Python/PyParsing/node_utils.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
56
2015-02-25T15:04:26.000Z
2022-01-03T07:42:48.000Z
Python/PyParsing/node_utils.py
Gjacquenot/training-material
16b29962bf5683f97a1072d961dd9f31e7468b8d
[ "CC-BY-4.0" ]
59
2015-11-26T11:44:51.000Z
2022-03-21T00:27:22.000Z
#!/usr/bin/env python '''module containing various functions for working with trees and nodes''' from node_parser import NodeParser import unittest def depth(node): '''compute the depth of the given tree''' if node is None: return 0 elif node.is_leaf(): return 1 else: return 1...
28.647059
74
0.566992
from node_parser import NodeParser import unittest def depth(node): if node is None: return 0 elif node.is_leaf(): return 1 else: return 1 + max(list(map(depth, node.children()))) def depth_first_iterator(node): if node is not None: node_stack = [(node, -1)] ...
true
true
f715df136e0602e32db3dc820ce6e68ce0ad5f80
1,342
py
Python
LeetCodeSolver/pythonSolutions/from1to100/Solution74.py
ZeromaXHe/Learning-Platform
ec75c2dbd472a568d1cd482450cc471295659c62
[ "Apache-2.0" ]
null
null
null
LeetCodeSolver/pythonSolutions/from1to100/Solution74.py
ZeromaXHe/Learning-Platform
ec75c2dbd472a568d1cd482450cc471295659c62
[ "Apache-2.0" ]
null
null
null
LeetCodeSolver/pythonSolutions/from1to100/Solution74.py
ZeromaXHe/Learning-Platform
ec75c2dbd472a568d1cd482450cc471295659c62
[ "Apache-2.0" ]
null
null
null
from typing import List class Solution: """ 74.搜索二维矩阵 | 难度:中等 | 标签:数组、二分查找 编写一个高效的算法来判断 m x n 矩阵中,是否存在一个目标值。该矩阵具有如下特性: <p> 每行中的整数从左到右按升序排列。 每行的第一个整数大于前一行的最后一个整数。 <p> 示例 1: 输入:matrix = [[1,3,5,7],[10,11,16,20],[23,30,34,60]], target = 3 输出:true <p> 示例 2: 输入:matrix = ...
25.807692
73
0.508197
from typing import List class Solution: def searchMatrix(self, matrix: List[List[int]], target: int) -> bool: x = 0 y = len(matrix[0]) - 1 while x < len(matrix) and y >= 0: if matrix[x][y] == target: return True elif matrix[x...
true
true
f715e0177b8228f28f6e785e8abfae78e9cd6435
10,435
py
Python
google/ads/googleads/v9/services/services/customer_customizer_service/transports/grpc.py
JakobSteixner/google-ads-python
df2b802cc7e78295a4ece21cc7ef3787cd35dab0
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v9/services/services/customer_customizer_service/transports/grpc.py
JakobSteixner/google-ads-python
df2b802cc7e78295a4ece21cc7ef3787cd35dab0
[ "Apache-2.0" ]
null
null
null
google/ads/googleads/v9/services/services/customer_customizer_service/transports/grpc.py
JakobSteixner/google-ads-python
df2b802cc7e78295a4ece21cc7ef3787cd35dab0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google 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...
41.74
112
0.628079
import warnings from typing import Callable, Dict, Optional, Sequence, Tuple from google.api_core import grpc_helpers from google.api_core import gapic_v1 import google.auth from google.auth import credentials as ga_credentials from google.auth.transport.grpc import SslCredentials import grpc from google.ads.goo...
true
true
f715e02ee65c789c8ebe66b9da527060e685ba50
475
py
Python
examples/sw.py
khirotaka/testbed
e32384a3267d5282fb9f2df22597dfa7fb9aa17d
[ "MIT" ]
null
null
null
examples/sw.py
khirotaka/testbed
e32384a3267d5282fb9f2df22597dfa7fb9aa17d
[ "MIT" ]
2
2020-08-09T06:26:51.000Z
2020-08-10T01:08:28.000Z
examples/sw.py
khirotaka/testbed
e32384a3267d5282fb9f2df22597dfa7fb9aa17d
[ "MIT" ]
null
null
null
import time import numpy as np from testbed._rust import sliding_window x = np.random.randn(5000, 5) s = time.time() rustout = sliding_window(x, 100, 1) print("=" * 50) print("Rust Speed: ", time.time() - s) print(rustout.shape) def sw(array, ws, over): sl = len(array) return [array[i:i+ws] for i in ran...
17.592593
57
0.633684
import time import numpy as np from testbed._rust import sliding_window x = np.random.randn(5000, 5) s = time.time() rustout = sliding_window(x, 100, 1) print("=" * 50) print("Rust Speed: ", time.time() - s) print(rustout.shape) def sw(array, ws, over): sl = len(array) return [array[i:i+ws] for i in ran...
true
true
f715e0b6071694faa85c51616ffa6eb6433f5b4c
357
py
Python
DMOJ/DMOPC/DMOPC_19_C5P3_Captivating_Construction_Challenge.py
Togohogo1/pg
ee3c36acde47769c66ee13a227762ee677591375
[ "MIT" ]
null
null
null
DMOJ/DMOPC/DMOPC_19_C5P3_Captivating_Construction_Challenge.py
Togohogo1/pg
ee3c36acde47769c66ee13a227762ee677591375
[ "MIT" ]
1
2021-10-14T18:26:56.000Z
2021-10-14T18:26:56.000Z
DMOJ/DMOPC/DMOPC_19_C5P3_Captivating_Construction_Challenge.py
Togohogo1/pg
ee3c36acde47769c66ee13a227762ee677591375
[ "MIT" ]
1
2021-08-06T03:39:55.000Z
2021-08-06T03:39:55.000Z
def gcd(m, n): if n == 0: return m return gcd(n, m%n) ans = 0 H, V = map(int, input().split()) for x in range(H): for y in range(1, V): mx, my = y//gcd(x, y), x//gcd(x, y) xx, yy = mx+x, my+y while xx <= H and yy <= V: ans += (H-xx) * (V-yy) xx +=...
16.227273
43
0.40056
def gcd(m, n): if n == 0: return m return gcd(n, m%n) ans = 0 H, V = map(int, input().split()) for x in range(H): for y in range(1, V): mx, my = y//gcd(x, y), x//gcd(x, y) xx, yy = mx+x, my+y while xx <= H and yy <= V: ans += (H-xx) * (V-yy) xx +=...
true
true
f715e0ba86825ddedbad3acbdb1a48496d9dfaa8
1,368
py
Python
fetch_cast_html.py
nmaswood/tv_scraping
91573df0ca9512ac1744cddc8635f681d8ed596a
[ "Apache-2.0" ]
null
null
null
fetch_cast_html.py
nmaswood/tv_scraping
91573df0ca9512ac1744cddc8635f681d8ed596a
[ "Apache-2.0" ]
null
null
null
fetch_cast_html.py
nmaswood/tv_scraping
91573df0ca9512ac1744cddc8635f681d8ed596a
[ "Apache-2.0" ]
null
null
null
from urllib.request import FancyURLopener from bs4 import BeautifulSoup from random import choice import csv from time import sleep from urllib.parse import quote,unquote import json user_agents = [ 'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11', 'Opera/9.25 (Windows NT 5....
31.090909
110
0.646199
from urllib.request import FancyURLopener from bs4 import BeautifulSoup from random import choice import csv from time import sleep from urllib.parse import quote,unquote import json user_agents = [ 'Mozilla/5.0 (Windows; U; Windows NT 5.1; it; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11', 'Opera/9.25 (Windows NT 5....
true
true
f715e119c6f7e84008328d68567e938b4668623f
696
py
Python
informacoes_emails.py
katianaz/GiftHelper
1fbff4e7902c25950a5f50f04f0b2c834842ccbe
[ "MIT" ]
null
null
null
informacoes_emails.py
katianaz/GiftHelper
1fbff4e7902c25950a5f50f04f0b2c834842ccbe
[ "MIT" ]
null
null
null
informacoes_emails.py
katianaz/GiftHelper
1fbff4e7902c25950a5f50f04f0b2c834842ccbe
[ "MIT" ]
1
2021-03-18T22:44:43.000Z
2021-03-18T22:44:43.000Z
import pontuacao_categorias import pandas as pd nomes = [] nomes_presenteados = [] enderecos_emails = [] for p in range(len(pontuacao_categorias.tabela.index)): nomes.append(pontuacao_categorias.tabela['3'][p]) nomes_presenteados.append(pontuacao_categorias.tabela['4'][p]) enderecos_emails.appen...
33.142857
89
0.686782
import pontuacao_categorias import pandas as pd nomes = [] nomes_presenteados = [] enderecos_emails = [] for p in range(len(pontuacao_categorias.tabela.index)): nomes.append(pontuacao_categorias.tabela['3'][p]) nomes_presenteados.append(pontuacao_categorias.tabela['4'][p]) enderecos_emails.appen...
true
true
f715e2b4af325720c565d744e3e3558d6ec968b2
11,243
py
Python
bookworm/annotation/annotation_gui.py
mush42/bookworm
a4bdd89363137a89a1bed1e9e072de4fb55576fd
[ "MIT" ]
18
2019-07-19T22:12:15.000Z
2020-08-26T17:45:19.000Z
bookworm/annotation/annotation_gui.py
mush42/bookworm
a4bdd89363137a89a1bed1e9e072de4fb55576fd
[ "MIT" ]
44
2019-07-15T10:17:00.000Z
2020-07-26T11:22:53.000Z
bookworm/annotation/annotation_gui.py
mush42/bookworm
a4bdd89363137a89a1bed1e9e072de4fb55576fd
[ "MIT" ]
9
2019-09-03T13:13:31.000Z
2020-08-25T13:55:27.000Z
# coding: utf-8 import wx from enum import IntEnum from bookworm import speech from bookworm.gui.settings import SettingsPanel from bookworm.structured_text import TextRange from bookworm.logger import logger from .annotator import Bookmarker, NoteTaker, Quoter from .annotation_dialogs import ( BookmarksViewer, ...
37.228477
88
0.592102
import wx from enum import IntEnum from bookworm import speech from bookworm.gui.settings import SettingsPanel from bookworm.structured_text import TextRange from bookworm.logger import logger from .annotator import Bookmarker, NoteTaker, Quoter from .annotation_dialogs import ( BookmarksViewer, CommentsDialog...
true
true
f715e2db12bbd9d23ff08edf3785830ee8d31ab7
3,291
py
Python
orders/models.py
pmaigutyak/mp-shop
14ea67f71fd91a282d2070414924708214fc6464
[ "0BSD" ]
2
2018-03-14T11:32:36.000Z
2021-09-25T14:31:36.000Z
orders/models.py
pmaigutyak/mp-shop
14ea67f71fd91a282d2070414924708214fc6464
[ "0BSD" ]
null
null
null
orders/models.py
pmaigutyak/mp-shop
14ea67f71fd91a282d2070414924708214fc6464
[ "0BSD" ]
null
null
null
from django.apps import apps from django.db import models from django.conf import settings from django.utils.crypto import get_random_string from django.utils.translation import ugettext_lazy as _ from exchange.models import format_printable_price, MultiCurrencyPrice from delivery.models import DeliveryMethodField f...
25.710938
76
0.673959
from django.apps import apps from django.db import models from django.conf import settings from django.utils.crypto import get_random_string from django.utils.translation import ugettext_lazy as _ from exchange.models import format_printable_price, MultiCurrencyPrice from delivery.models import DeliveryMethodField f...
true
true
f715e307959616301e030cf3bce9da95242c350f
2,917
py
Python
sklearn/linear_model/__init__.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
3
2019-11-18T13:47:42.000Z
2021-08-22T23:37:47.000Z
sklearn/linear_model/__init__.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
12
2021-03-06T23:42:46.000Z
2021-04-04T00:10:42.000Z
sklearn/linear_model/__init__.py
emarkou/scikit-learn
d73822f84f2832dcc25f0ff58769f60871a78025
[ "BSD-3-Clause" ]
2
2017-06-27T12:40:35.000Z
2021-08-22T23:37:35.000Z
""" The :mod:`sklearn.linear_model` module implements a variety of linear models. """ # See http://scikit-learn.sourceforge.net/modules/sgd.html and # http://scikit-learn.sourceforge.net/modules/linear_model.html for # complete documentation. from ._base import LinearRegression from ._bayes import BayesianRidge, ARDR...
35.573171
78
0.618101
from ._base import LinearRegression from ._bayes import BayesianRidge, ARDRegression from ._least_angle import (Lars, LassoLars, lars_path, lars_path_gram, LarsCV, LassoLarsCV, LassoLarsIC) from ._coordinate_descent import (Lasso, ElasticNet, LassoCV, ElasticNetCV, ...
true
true
f715e36e362ae80301e03af5d3ad4b2ac4a51e76
239
py
Python
examples/pull_inbox_delivery_reports_ex.py
ubidreams/infobip-api-python-client
3e585bf00565627bd7da46a2c8f10b860faaeb8b
[ "Apache-2.0" ]
null
null
null
examples/pull_inbox_delivery_reports_ex.py
ubidreams/infobip-api-python-client
3e585bf00565627bd7da46a2c8f10b860faaeb8b
[ "Apache-2.0" ]
null
null
null
examples/pull_inbox_delivery_reports_ex.py
ubidreams/infobip-api-python-client
3e585bf00565627bd7da46a2c8f10b860faaeb8b
[ "Apache-2.0" ]
null
null
null
from infobip.clients import get_received_messages from __init__ import configuration get_delivery_reports_client = get_received_messages(configuration) response = get_delivery_reports_client.execute({"limit": 1}) print(unicode(response))
34.142857
66
0.857741
from infobip.clients import get_received_messages from __init__ import configuration get_delivery_reports_client = get_received_messages(configuration) response = get_delivery_reports_client.execute({"limit": 1}) print(unicode(response))
true
true
f715e3a8e11c572f5bb1831dd2bd65643e2aa549
1,558
py
Python
tests/test_image.py
juliamarc/mal-tier-list-bbcode-gen
3b14d1982883bea6c0b5cf3ba1de5360c2d71abc
[ "MIT" ]
null
null
null
tests/test_image.py
juliamarc/mal-tier-list-bbcode-gen
3b14d1982883bea6c0b5cf3ba1de5360c2d71abc
[ "MIT" ]
null
null
null
tests/test_image.py
juliamarc/mal-tier-list-bbcode-gen
3b14d1982883bea6c0b5cf3ba1de5360c2d71abc
[ "MIT" ]
null
null
null
import pytest import mal_tier_list_bbcode_gen.exceptions as exceptions from mal_tier_list_bbcode_gen.image import Image def test_source_direct_url(): image_url = 'example.com/test.png' image = Image('direct URL', image_url) assert image.image_url == image_url def test_source_google_drive_file_id(): ...
30.54902
70
0.70154
import pytest import mal_tier_list_bbcode_gen.exceptions as exceptions from mal_tier_list_bbcode_gen.image import Image def test_source_direct_url(): image_url = 'example.com/test.png' image = Image('direct URL', image_url) assert image.image_url == image_url def test_source_google_drive_file_id(): ...
true
true
f715e48b813407c0bd9d7f1f42d77633e8197d1d
5,342
py
Python
isi_sdk/models/mapping_identity_target_create_params.py
robzim/isilon_sdk_python
3c2efcae7002f8ad25c0cfcb42a53b4d83e826d7
[ "MIT" ]
null
null
null
isi_sdk/models/mapping_identity_target_create_params.py
robzim/isilon_sdk_python
3c2efcae7002f8ad25c0cfcb42a53b4d83e826d7
[ "MIT" ]
null
null
null
isi_sdk/models/mapping_identity_target_create_params.py
robzim/isilon_sdk_python
3c2efcae7002f8ad25c0cfcb42a53b4d83e826d7
[ "MIT" ]
null
null
null
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 3 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from isi_sdk_8_0.models.group_mem...
29.677778
116
0.586484
import pprint import re import six from isi_sdk_8_0.models.group_member import GroupMember class MappingIdentityTargetCreateParams(object): swagger_types = { 'on_disk': 'bool', 'target': 'GroupMember', 'type': 'str' } attribute_map = { 'on_disk': 'on_disk', ...
true
true
f715e4b9d03d838a2a6581b960aa71928211ff89
855
py
Python
slrp/expressions.py
thomasmatecki/parsley
0c51e9c37759fbc1c723519619952248c83e4642
[ "MIT" ]
null
null
null
slrp/expressions.py
thomasmatecki/parsley
0c51e9c37759fbc1c723519619952248c83e4642
[ "MIT" ]
2
2020-03-24T18:30:15.000Z
2020-03-31T10:57:37.000Z
slrp/expressions.py
thomasmatecki/parsley
0c51e9c37759fbc1c723519619952248c83e4642
[ "MIT" ]
null
null
null
""" Expression for matching. """ import re from abc import ABC from typing import Callable, Text, Tuple from slrp.combos import Combinable class RegExpr(Combinable): """ Regular expression matcher. """ def __init__(self, pattern): self.pattern = pattern def match(self, expr): _m...
21.923077
88
0.615205
import re from abc import ABC from typing import Callable, Text, Tuple from slrp.combos import Combinable class RegExpr(Combinable): def __init__(self, pattern): self.pattern = pattern def match(self, expr): _match = re.match(self.pattern, expr) if _match: fr, to = _matc...
true
true
f715e4c13f0a448d661aadd39ef081eb09b73466
410
py
Python
examples/example_sparsifier_graph.py
tfgraph/tfgraph
19ae968b3060275c631dc601757646abaf1f58a1
[ "Apache-2.0" ]
4
2017-07-23T13:48:35.000Z
2021-12-03T18:11:50.000Z
examples/example_sparsifier_graph.py
tfgraph/tfgraph
19ae968b3060275c631dc601757646abaf1f58a1
[ "Apache-2.0" ]
21
2017-07-23T13:15:20.000Z
2020-09-28T02:13:11.000Z
examples/example_sparsifier_graph.py
tfgraph/tfgraph
19ae968b3060275c631dc601757646abaf1f58a1
[ "Apache-2.0" ]
1
2017-07-28T10:28:04.000Z
2017-07-28T10:28:04.000Z
#!/usr/bin/python3 import tensorflow as tf import tfgraph def main(): with tf.Session() as sess: g: tfgraph.Graph = tfgraph.GraphConstructor.unweighted_random(sess, "G", 10, 85) g_sparse: tfgraph.Graph = tfgraph.GraphConstructor.as_sparsifier(sess, g, 0.75) print(g) print(g.m) print(g_sparse)...
17.826087
84
0.673171
import tensorflow as tf import tfgraph def main(): with tf.Session() as sess: g: tfgraph.Graph = tfgraph.GraphConstructor.unweighted_random(sess, "G", 10, 85) g_sparse: tfgraph.Graph = tfgraph.GraphConstructor.as_sparsifier(sess, g, 0.75) print(g) print(g.m) print(g_sparse) print(g_sparse...
true
true
f715e4d2616e966f17915d11d03e9988858f4587
1,195
py
Python
shanapy/test/test_interpolater.py
ZhiyLiu/shanapy
cbcdd87f4aaa1102d5b93c9488fbcee6e28da2a6
[ "MIT" ]
3
2021-11-21T23:14:50.000Z
2022-02-12T04:32:52.000Z
shanapy/test/test_interpolater.py
ZhiyLiu/shanapy
cbcdd87f4aaa1102d5b93c9488fbcee6e28da2a6
[ "MIT" ]
null
null
null
shanapy/test/test_interpolater.py
ZhiyLiu/shanapy
cbcdd87f4aaa1102d5b93c9488fbcee6e28da2a6
[ "MIT" ]
null
null
null
import vtk from shanapy.models.sreps import Initializer, Interpolater import pyvista as pv ## Read the input surface mesh (produced by SPHARM-PDM) reader = vtk.vtkPolyDataReader() reader.SetFileName('data/example_hippocampus.vtk') reader.Update() input_mesh = reader.GetOutput() ## Initialize an s-rep for the input me...
33.194444
92
0.787448
import vtk from shanapy.models.sreps import Initializer, Interpolater import pyvista as pv reader = vtk.vtkPolyDataReader() reader.SetFileName('data/example_hippocampus.vtk') reader.Update() input_mesh = reader.GetOutput() initializer = Initializer() srep = initializer.fit(input_mesh) num_crest_pt = 24 num_samples_o...
true
true
f715e52c53f3d913beec9dd47456ed969e6769b5
2,052
py
Python
flywheel_cli/importers/slurp_scan.py
amitvakula/python-cli
0bdbd39c40cdb3fe4dbd3b0cb38abbce94242dac
[ "MIT" ]
null
null
null
flywheel_cli/importers/slurp_scan.py
amitvakula/python-cli
0bdbd39c40cdb3fe4dbd3b0cb38abbce94242dac
[ "MIT" ]
null
null
null
flywheel_cli/importers/slurp_scan.py
amitvakula/python-cli
0bdbd39c40cdb3fe4dbd3b0cb38abbce94242dac
[ "MIT" ]
null
null
null
"""Provides a scanner that will group files together under a common prefix""" import copy from .abstract_scanner import AbstractScanner class SlurpScanner(AbstractScanner): """SlurpScanner groups files together by a common prefix. This works by looking at the first slash (or if there is no slash, the first ...
33.096774
96
0.634016
import copy from .abstract_scanner import AbstractScanner class SlurpScanner(AbstractScanner): def __init__(self, config): super(SlurpScanner, self).__init__(config) def discover(self, walker, context, container_factory, path_prefix=None, audit_log=None): files = list(sorted(walker.f...
true
true
f715e6fb9ac52b17d3d805190df8d63c65156cf6
5,008
py
Python
contrib/seeds/generate-seeds.py
BakedInside/beanscore
daa9b2ddbfd3305881749bda7f32146738154260
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
BakedInside/beanscore
daa9b2ddbfd3305881749bda7f32146738154260
[ "MIT" ]
null
null
null
contrib/seeds/generate-seeds.py
BakedInside/beanscore
daa9b2ddbfd3305881749bda7f32146738154260
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2021 The Beans Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Script to generate list of seed nodes for chainparams.cpp. This script expects two text files in the di...
29.988024
91
0.568091
from base64 import b32decode from enum import Enum import struct import sys import os import re class BIP155Network(Enum): IPV4 = 1 IPV6 = 2 TORV2 = 3 TORV3 = 4 I2P = 5 CJDNS = 6 def name_to_bip155(addr): if addr.endswith('.onion'): vchAddr = b32decode(addr[0:-6], True) if...
true
true
f715e76b2533da62db85b11847c06082ebf9c1c8
565
py
Python
PDF_Copy_Paster/scripts/pdfcp.py
cooperbeaman/cogs18pdfcpfinalproject
ade7cf46534e8817b327f1c35ebf617cc977d872
[ "CNRI-Python", "Adobe-2006", "Adobe-Glyph" ]
null
null
null
PDF_Copy_Paster/scripts/pdfcp.py
cooperbeaman/cogs18pdfcpfinalproject
ade7cf46534e8817b327f1c35ebf617cc977d872
[ "CNRI-Python", "Adobe-2006", "Adobe-Glyph" ]
null
null
null
PDF_Copy_Paster/scripts/pdfcp.py
cooperbeaman/cogs18pdfcpfinalproject
ade7cf46534e8817b327f1c35ebf617cc977d872
[ "CNRI-Python", "Adobe-2006", "Adobe-Glyph" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # In[3]: """Script runs pdf copy paste tool through command prompt. Automatically monitors and updates clipboard contents. """ # Allows importing functions from functions.py in my_module folder import sys sys.path.append('../') # Imports functions from my_module folder from ...
25.681818
72
0.762832
import sys sys.path.append('../') from my_module.functions import * run()
true
true
f715e77d6fe49e1cc89dddd041c453a19b1ba4b5
2,779
py
Python
library/Kernel_based_Regressions.py
SushantKuchankar/Machine_Learning_library
3e0421141e607e5099fce6c84b63948165e75aa0
[ "MIT" ]
null
null
null
library/Kernel_based_Regressions.py
SushantKuchankar/Machine_Learning_library
3e0421141e607e5099fce6c84b63948165e75aa0
[ "MIT" ]
null
null
null
library/Kernel_based_Regressions.py
SushantKuchankar/Machine_Learning_library
3e0421141e607e5099fce6c84b63948165e75aa0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @author: Sushant """ import numpy as np import scipy ######################################## Least Square Linear Regression #################################### def LinearRegression(data,labels): numdata = int( np.size(data,0) ) b1 = np.hstack(( data,np.ones((numdat...
34.308642
109
0.543721
""" @author: Sushant """ import numpy as np import scipy def LinearRegression(data,labels): numdata = int( np.size(data,0) ) b1 = np.hstack(( data,np.ones((numdata,1)) ) ) XXT = np.matmul(b1.T,b1) invXXT = np.linalg.pinv(XXT) b2 = np.matmul(b1.T,labels) w = np.matmul(invXXT,b...
false
true
f715e9d439ec161b580dbb638b66c76fe3d21b3d
2,166
py
Python
tests/mantid_data_helper.py
scipp/scipp-ci-mantid
29164f633096c4eeb0a8579b72165c96315113f8
[ "Apache-2.0" ]
null
null
null
tests/mantid_data_helper.py
scipp/scipp-ci-mantid
29164f633096c4eeb0a8579b72165c96315113f8
[ "Apache-2.0" ]
null
null
null
tests/mantid_data_helper.py
scipp/scipp-ci-mantid
29164f633096c4eeb0a8579b72165c96315113f8
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: GPL-3.0-or-later # Copyright (c) 2019 Scipp contributors (https://github.com/scipp) # @author Dimitar Tasev import os import hashlib import sys import subprocess as sp def download_file(source, destination): command = "wget -O {} {}".format(destination, source) status = sp.run(comma...
35.508197
78
0.5988
import os import hashlib import sys import subprocess as sp def download_file(source, destination): command = "wget -O {} {}".format(destination, source) status = sp.run(command, shell=True).returncode if status != 0: raise RuntimeError("Can't load {} to {}.".format(source, destination)) class Ma...
true
true
f715eb646ed9af649d8f5a29c1d0d68ce7a3e4b3
571
py
Python
setup.py
TomKealy/causal-forest
04f3aeb1ac5547a78b96eca9bdb51b61f9e940f4
[ "MIT" ]
null
null
null
setup.py
TomKealy/causal-forest
04f3aeb1ac5547a78b96eca9bdb51b61f9e940f4
[ "MIT" ]
null
null
null
setup.py
TomKealy/causal-forest
04f3aeb1ac5547a78b96eca9bdb51b61f9e940f4
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Setup file for cforest. Use setup.cfg to configure your project. This file was generated with PyScaffold 3.2.3. PyScaffold helps you to put up the scaffold of your new Python project. Learn more under: https://pyscaffold.org/ """ import sys from pkg_resources import Ver...
23.791667
75
0.702277
import sys from pkg_resources import VersionConflict, require from setuptools import setup try: require('setuptools>=38.3') except VersionConflict: print("Error: version of setuptools is too old (<38.3)!") sys.exit(1) if __name__ == "__main__": setup(use_pyscaffold=True)
true
true
f715ec4a046a358ebcab33b297f3acf0d66c97dd
9,457
py
Python
venv/lib/python3.8/site-packages/vsts/task_agent/v4_0/models/task_group.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/task_agent/v4_0/models/task_group.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
null
null
null
venv/lib/python3.8/site-packages/vsts/task_agent/v4_0/models/task_group.py
amcclead7336/Enterprise_Data_Science_Final
ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28
[ "Unlicense", "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # -----------------------------------------------------------------...
56.628743
973
0.649466
from .task_definition import TaskDefinition class TaskGroup(TaskDefinition): _attribute_map = { 'agent_execution': {'key': 'agentExecution', 'type': 'TaskExecution'}, 'author': {'key': 'author', 'type': 'str'}, 'category': {'key': 'category', 'type': 'str'}, 'contents_u...
true
true
f715ec73403c11a6f9f9c12405d55dc8c40d491d
2,782
py
Python
rpbp/analysis/profile_construction/visualize_metagene_profile_bayes_factor.py
HeyLifeHD/rp-bp
9c59b1bc0267400747477467c45f96364d5528e1
[ "MIT" ]
6
2016-05-16T18:52:41.000Z
2021-12-31T06:27:29.000Z
rpbp/analysis/profile_construction/visualize_metagene_profile_bayes_factor.py
HeyLifeHD/rp-bp
9c59b1bc0267400747477467c45f96364d5528e1
[ "MIT" ]
110
2016-06-22T13:24:39.000Z
2022-02-07T09:29:14.000Z
rpbp/analysis/profile_construction/visualize_metagene_profile_bayes_factor.py
HeyLifeHD/rp-bp
9c59b1bc0267400747477467c45f96364d5528e1
[ "MIT" ]
5
2017-05-22T12:21:51.000Z
2022-02-06T10:32:56.000Z
#! /usr/bin/env python3 import matplotlib matplotlib.use('agg') import argparse import matplotlib.pyplot as plt import numpy as np import pandas as pd import logging default_title = "Metagene profile Bayes' factors" default_xlabel = "Offset, relative to translation \ninitiation site" default_ylabel = "Bayes' factor"...
34.345679
104
0.691948
import matplotlib matplotlib.use('agg') import argparse import matplotlib.pyplot as plt import numpy as np import pandas as pd import logging default_title = "Metagene profile Bayes' factors" default_xlabel = "Offset, relative to translation \ninitiation site" default_ylabel = "Bayes' factor" default_font_size = 15 ...
true
true