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
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f70f24eb6dbeb6161cf2786c9b1c55687bbbf46f
3,707
py
Python
lux_ai/lux_gym/multi_subtask.py
mrzhuzhe/Kaggle_Lux_AI_2021
f00954d328467ce24f5535d3878d305c6d1f3acb
[ "MIT" ]
44
2021-12-13T22:49:26.000Z
2022-03-22T03:31:34.000Z
lux_ai/lux_gym/multi_subtask.py
L16H7/Kaggle_Lux_AI_2021
08b795e71e78c768d28c648290a15d58ca718776
[ "MIT" ]
1
2022-03-10T04:05:04.000Z
2022-03-10T04:05:04.000Z
lux_ai/lux_gym/multi_subtask.py
L16H7/Kaggle_Lux_AI_2021
08b795e71e78c768d28c648290a15d58ca718776
[ "MIT" ]
10
2021-12-13T21:23:57.000Z
2022-02-03T09:50:27.000Z
from abc import ABC, abstractmethod import numpy as np import random from typing import Callable, Dict, Optional, Tuple, Sequence from .reward_spaces import Subtask from ..lux.game import Game class SubtaskSampler(ABC): def __init__(self, subtask_constructors: Sequence[Callable[..., Subtask]]): self.subt...
40.736264
107
0.688427
from abc import ABC, abstractmethod import numpy as np import random from typing import Callable, Dict, Optional, Tuple, Sequence from .reward_spaces import Subtask from ..lux.game import Game class SubtaskSampler(ABC): def __init__(self, subtask_constructors: Sequence[Callable[..., Subtask]]): self.subt...
true
true
f70f256cd59a3311b34f386e6564bde3e61f621a
41,982
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/aio/operations/_public_ip_addresses_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/aio/operations/_public_ip_addresses_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_10_01/aio/operations/_public_ip_addresses_operations.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
50.949029
395
0.673027
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar, Union import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure....
true
true
f70f25c06081abbe813159ebbb0ac18fae2c2425
23,673
py
Python
grr/server/grr_response_server/gui/selenium_tests/hunt_create_test.py
acidburn0zzz/grr
44e1a5b1630e8101610faaaebe15b19b5ad30cb1
[ "Apache-2.0" ]
1
2019-08-28T23:48:20.000Z
2019-08-28T23:48:20.000Z
grr/server/grr_response_server/gui/selenium_tests/hunt_create_test.py
AjitNair2/grr
2a2ea891b3927775872904cdd402a18e7bb3d143
[ "Apache-2.0" ]
2
2022-01-15T03:18:12.000Z
2022-02-13T22:02:43.000Z
grr/server/grr_response_server/gui/selenium_tests/hunt_create_test.py
acidburn0zzz/grr
44e1a5b1630e8101610faaaebe15b19b5ad30cb1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """Test of "New Hunt" wizard.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from absl import app from selenium.webdriver.common import keys from grr_response_core.lib import rdfvalue from grr_response_core.lib.rdfvalues import p...
39.719799
80
0.669032
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals from absl import app from selenium.webdriver.common import keys from grr_response_core.lib import rdfvalue from grr_response_core.lib.rdfvalues import paths as rdf_paths from grr_response_server import data...
true
true
f70f26a0d985579cf884d6fe98e9714972271079
9,486
py
Python
gcloud/datastore/batch.py
scrapinghub/gcloud-python
1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29
[ "Apache-2.0" ]
null
null
null
gcloud/datastore/batch.py
scrapinghub/gcloud-python
1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29
[ "Apache-2.0" ]
null
null
null
gcloud/datastore/batch.py
scrapinghub/gcloud-python
1ec6d636ebf2c4d618aca6b2485fbbfa5f0fde29
[ "Apache-2.0" ]
2
2017-07-30T16:18:23.000Z
2020-10-14T11:24:18.000Z
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
35.931818
84
0.650538
from gcloud.datastore import helpers from gcloud.datastore.key import _dataset_ids_equal from gcloud.datastore._generated import datastore_pb2 as _datastore_pb2 class Batch(object): _id = None def __init__(self, client): self._client = client self._commit_request = _datastor...
true
true
f70f27ed025a93603507b3a8a8661a661342efc9
5,888
py
Python
interkamen_career/modules/mechanics_economic.py
Acetonen/Interkamen_career
75cc0a5832b7c1e303967cc337bb001e3383eb9e
[ "MIT" ]
null
null
null
interkamen_career/modules/mechanics_economic.py
Acetonen/Interkamen_career
75cc0a5832b7c1e303967cc337bb001e3383eb9e
[ "MIT" ]
null
null
null
interkamen_career/modules/mechanics_economic.py
Acetonen/Interkamen_career
75cc0a5832b7c1e303967cc337bb001e3383eb9e
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Visualise statistic by machine economic.""" from __future__ import annotations import pandas as pd from matplotlib import pyplot as plt from typing import Dict from .mechanic_report import MechReports from .administration.logger_cfg import Logs from .support_modules.custom_exceptions impor...
32.351648
78
0.589504
from __future__ import annotations import pandas as pd from matplotlib import pyplot as plt from typing import Dict from .mechanic_report import MechReports from .administration.logger_cfg import Logs from .support_modules.custom_exceptions import MainMenu from .support_modules.standart_functions import ( Basi...
true
true
f70f2913154b4f910fa56969655595ca01f7413a
3,464
py
Python
multiagent/scenarios/simple_speaker_listener.py
robbycostales/multiagent-particle-envs
22a00b18e13b629a206a8ffc8d8319d06dd5d7b0
[ "MIT" ]
null
null
null
multiagent/scenarios/simple_speaker_listener.py
robbycostales/multiagent-particle-envs
22a00b18e13b629a206a8ffc8d8319d06dd5d7b0
[ "MIT" ]
null
null
null
multiagent/scenarios/simple_speaker_listener.py
robbycostales/multiagent-particle-envs
22a00b18e13b629a206a8ffc8d8319d06dd5d7b0
[ "MIT" ]
null
null
null
import numpy as np from multiagent.core import World, Agent, Landmark from multiagent.scenario import BaseScenario class Scenario(BaseScenario): def make_world(self, dim_c=3): world = World() # set any world properties first world.dim_c = dim_c num_landmarks = 3 # add agents...
37.652174
98
0.601905
import numpy as np from multiagent.core import World, Agent, Landmark from multiagent.scenario import BaseScenario class Scenario(BaseScenario): def make_world(self, dim_c=3): world = World() world.dim_c = dim_c num_landmarks = 3 world.agents = [Agent() for i in ra...
true
true
f70f295307fb04fa6988031adb26ba2c95760a41
14,052
py
Python
nicos_mlz/sans1/gui/monitorwidgets.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_mlz/sans1/gui/monitorwidgets.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
nicos_mlz/sans1/gui/monitorwidgets.py
jkrueger1/nicos
5f4ce66c312dedd78995f9d91e8a6e3c891b262b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
null
null
null
# -*- coding: utf-8 -*- # ***************************************************************************** # NICOS, the Networked Instrument Control System of the MLZ # Copyright (c) 2009-2022 by the NICOS contributors (see AUTHORS) # # This program is free software; you can redistribute it and/or modify it under # the t...
38.604396
95
0.570951
from nicos.core.status import BUSY, DISABLED, ERROR, NOTREACHED, OK, UNKNOWN, \ WARN from nicos.guisupport.qt import QBrush, QColor, QLineF, QPainter, QPen, \ QRectF, QSize, Qt, QTextOption, QWidget from nicos.guisupport.widget import NicosWidget, PropDef _magenta = QBrush(QColor('#A1...
true
true
f70f29ce05e826594240a5a93ef2677dfb4bec9b
5,738
py
Python
cloudmarker/manager.py
nishitm/cloudmarker
98f9d228abe3cf01fb4a6d631d31aadec47e759a
[ "MIT" ]
null
null
null
cloudmarker/manager.py
nishitm/cloudmarker
98f9d228abe3cf01fb4a6d631d31aadec47e759a
[ "MIT" ]
null
null
null
cloudmarker/manager.py
nishitm/cloudmarker
98f9d228abe3cf01fb4a6d631d31aadec47e759a
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Manager of worker subprocesses. This module invokes the worker subprocesses that perform the cloud security monitoring tasks. Each worker subprocess wraps around a cloud, store, event, or alert plugin and executes the plugin in a separate subprocess. """ import logging.config import multip...
32.235955
78
0.600732
import logging.config import multiprocessing as mp import time import schedule from cloudmarker import util, workers _log = logging.getLogger(__name__) def main(): args = util.parse_cli() config = util.load_config(args.config) logging.config.dictConfig(config['logger']) if args.fo...
true
true
f70f2a201509a04db04816c2ba900f5ce7cb680b
447
py
Python
tests/utils/test_retriever.py
duketemon/pyuplift
33daa0768ff333387cb8223ebfaedaffa57de335
[ "MIT" ]
26
2019-02-24T07:41:59.000Z
2022-01-03T05:07:26.000Z
tests/utils/test_retriever.py
duketemon/pyuplift
33daa0768ff333387cb8223ebfaedaffa57de335
[ "MIT" ]
8
2019-03-17T07:57:16.000Z
2019-08-02T19:55:49.000Z
tests/utils/test_retriever.py
duketemon/pyuplift
33daa0768ff333387cb8223ebfaedaffa57de335
[ "MIT" ]
4
2019-07-17T12:36:37.000Z
2020-07-16T11:36:35.000Z
import os import shutil import pytest from pyuplift.utils import retrieve_from_gz data_home = os.path.join(os.sep.join(__file__.split(os.sep)[:-1]), 'data') def test_retrieve_from_gz(): output_path = os.path.join(data_home, 'test.test') archive_path = output_path + '.gz' retrieve_from_gz(archive_path, o...
24.833333
74
0.700224
import os import shutil import pytest from pyuplift.utils import retrieve_from_gz data_home = os.path.join(os.sep.join(__file__.split(os.sep)[:-1]), 'data') def test_retrieve_from_gz(): output_path = os.path.join(data_home, 'test.test') archive_path = output_path + '.gz' retrieve_from_gz(archive_path, o...
true
true
f70f2adaa945474149079545ea89047b44947487
10,636
py
Python
carla_python_api_recorder.py
t27/carla-scenic-data-collector
3f38fa0e23a9f0ed85726292c5703c8505330870
[ "MIT" ]
1
2022-03-30T07:30:51.000Z
2022-03-30T07:30:51.000Z
carla_python_api_recorder.py
t27/carla-scenic-data-collector
3f38fa0e23a9f0ed85726292c5703c8505330870
[ "MIT" ]
1
2021-03-15T03:48:28.000Z
2021-03-15T03:48:28.000Z
carla_python_api_recorder.py
t27/carla-scenic-data-collector
3f38fa0e23a9f0ed85726292c5703c8505330870
[ "MIT" ]
5
2021-03-14T22:19:53.000Z
2021-11-11T15:28:05.000Z
# Recorder that records agent states as dataframes and also stores a carla recording, in synchronous mode #!/usr/bin/env python # Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de # Barcelona (UAB). # # This work is licensed under the terms of the MIT license. # For a copy, see <https://...
32.036145
105
0.615269
import glob import os import sys import pandas as pd from tqdm import tqdm import math CARLA_VERSION = "0.9.11" try: if CARLA_VERSION == "0.9.9": sys.path.append("./libs/carla-0.9.9-py3.7-linux-x86_64.egg") elif CARLA_VERSION == "0.9.11": sys.path.append("./libs/carla-0.9.11-py...
true
true
f70f2c01e48108b120549634668375635de05a9a
1,236
py
Python
Project Files/app/models/Lead.py
s3llsw0rd/demo_ajax_db_search
00a7e470f094f2941733abc529994d0be575c749
[ "Unlicense" ]
null
null
null
Project Files/app/models/Lead.py
s3llsw0rd/demo_ajax_db_search
00a7e470f094f2941733abc529994d0be575c749
[ "Unlicense" ]
null
null
null
Project Files/app/models/Lead.py
s3llsw0rd/demo_ajax_db_search
00a7e470f094f2941733abc529994d0be575c749
[ "Unlicense" ]
null
null
null
from system.core.model import Model from flask import jsonify class Lead(Model): def __init__(self): super(Lead, self).__init__() def get_leads(self, name, early, late, page, sort, order): query = 'SELECT * FROM leads' data = {} prev = False if name != '': query += ' WHERE CONCAT(first_name, " ", last...
26.869565
76
0.60356
from system.core.model import Model from flask import jsonify class Lead(Model): def __init__(self): super(Lead, self).__init__() def get_leads(self, name, early, late, page, sort, order): query = 'SELECT * FROM leads' data = {} prev = False if name != '': query += ' WHERE CONCAT(first_name, " ", last...
true
true
f70f2c2710810b2f835f58ec1ad1d0d901f82c75
3,566
py
Python
harmony/harmony_checker/views.py
ecxia/harmony-checker
78b198fa091bd8175a8ad8f233053b34654c3a09
[ "MIT" ]
null
null
null
harmony/harmony_checker/views.py
ecxia/harmony-checker
78b198fa091bd8175a8ad8f233053b34654c3a09
[ "MIT" ]
null
null
null
harmony/harmony_checker/views.py
ecxia/harmony-checker
78b198fa091bd8175a8ad8f233053b34654c3a09
[ "MIT" ]
null
null
null
from django.conf import settings from django.contrib.auth import get_user, views as auth_views from django.contrib.auth.decorators import login_required from django.core.files import File from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render, get_object_or_404 from django.urls i...
34.288462
104
0.652271
from django.conf import settings from django.contrib.auth import get_user, views as auth_views from django.contrib.auth.decorators import login_required from django.core.files import File from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render, get_object_or_404 from django.urls i...
true
true
f70f2cf6ecbeb0ea1040a6f84e5170d04a4bfaa5
736
py
Python
test/test_to_json.py
testinggg-art/Cyberbrain
e38c74c174e23aa386d005b03f09b30aa1b3a0ae
[ "MIT" ]
null
null
null
test/test_to_json.py
testinggg-art/Cyberbrain
e38c74c174e23aa386d005b03f09b30aa1b3a0ae
[ "MIT" ]
null
null
null
test/test_to_json.py
testinggg-art/Cyberbrain
e38c74c174e23aa386d005b03f09b30aa1b3a0ae
[ "MIT" ]
null
null
null
import re def test_repr(tracer, rpc_stub): class A: pass tracer.start() match = re.match("foo", "foobar") a = A() tracer.stop() from utils import return_GetFrame frame_proto = return_GetFrame(rpc_stub, "test_repr") binding_match_event = frame_proto.events[0] assert ( ...
24.533333
87
0.626359
import re def test_repr(tracer, rpc_stub): class A: pass tracer.start() match = re.match("foo", "foobar") a = A() tracer.stop() from utils import return_GetFrame frame_proto = return_GetFrame(rpc_stub, "test_repr") binding_match_event = frame_proto.events[0] assert ( ...
true
true
f70f2d49a80dc28577e28b248c5d806981f90827
50,619
py
Python
spectrochempy/core/dataset/nddataset.py
dcambie/spectrochempy
e376082d66be7a4c528b7d83be076d77534e39bd
[ "CECILL-B" ]
null
null
null
spectrochempy/core/dataset/nddataset.py
dcambie/spectrochempy
e376082d66be7a4c528b7d83be076d77534e39bd
[ "CECILL-B" ]
null
null
null
spectrochempy/core/dataset/nddataset.py
dcambie/spectrochempy
e376082d66be7a4c528b7d83be076d77534e39bd
[ "CECILL-B" ]
null
null
null
# -*- coding: utf-8 -*- # # ====================================================================================================================== # Copyright (©) 2015-2019 LCS # Laboratoire Catalyse et Spectrochimie, Caen, France. # CeCILL-B FREE SOFTWARE LICENSE AGREEMENT # See full LICENSE agreement in the root dir...
40.398244
120
0.481776
__all__ = ['NDDataset'] import textwrap import warnings import sys import numpy as np from traitlets import HasTraits, Instance, Bool, Float, validate, default, Dict, Union from traittypes import Array from spectrochempy.core.project.baseproject import AbstractProject from spectrochempy.core.dataset.ndarra...
true
true
f70f2e57c996f7c9bfa084739916de3701ff157b
4,564
py
Python
kensu/client/models/process_lineage.py
vidma/kensu-py
aae1e04373f03c988d55772fde6563de3ca9f375
[ "Apache-2.0" ]
16
2021-04-28T13:22:41.000Z
2022-03-02T10:45:19.000Z
kensu/client/models/process_lineage.py
vidma/kensu-py
aae1e04373f03c988d55772fde6563de3ca9f375
[ "Apache-2.0" ]
12
2021-05-17T08:06:42.000Z
2022-02-28T22:43:04.000Z
kensu/client/models/process_lineage.py
vidma/kensu-py
aae1e04373f03c988d55772fde6563de3ca9f375
[ "Apache-2.0" ]
5
2021-04-27T15:02:16.000Z
2021-10-15T16:07:21.000Z
# coding: utf-8 """ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: beta Generated by: https://github.com/swagger-api/swagger-codegen.git """ from pprint import pformat from six import iteritems class ProcessLineag...
25.355556
105
0.548861
from pprint import pformat from six import iteritems class ProcessLineage(object): swagger_types = { 'name': 'str', 'operation_logic': 'str', 'pk': 'ProcessLineagePK' } attribute_map = { 'name': 'name', 'operation_logic': 'operationLogic', 'pk': 'pk'...
true
true
f70f2eb5e2fcbf95fe6be450017498f13c7cccf9
14,369
py
Python
year_2018/day_15.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
1
2020-04-12T16:14:29.000Z
2020-04-12T16:14:29.000Z
year_2018/day_15.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
null
null
null
year_2018/day_15.py
gchazot/aoc
1926114b1060a927be3f87732ba0a399afd98ae4
[ "MIT" ]
null
null
null
import collections import itertools import math import unittest import aoc_utils.geometry from aoc_utils import char_map, data class TestCoordinatesUtils(unittest.TestCase): def test_solve_tie(self): self.assertEqual(None, solve_tie([])) self.assertEqual((12, 34), solve_tie([(12, 34)])) s...
33.184758
98
0.538799
import collections import itertools import math import unittest import aoc_utils.geometry from aoc_utils import char_map, data class TestCoordinatesUtils(unittest.TestCase): def test_solve_tie(self): self.assertEqual(None, solve_tie([])) self.assertEqual((12, 34), solve_tie([(12, 34)])) s...
true
true
f70f2f001c4560b8e119ed16ee80328954ef2789
1,133
py
Python
app/__init__.py
tailorv/pitchapp
892bae820f60f810a37059ec2513780781845fae
[ "Unlicense" ]
null
null
null
app/__init__.py
tailorv/pitchapp
892bae820f60f810a37059ec2513780781845fae
[ "Unlicense" ]
null
null
null
app/__init__.py
tailorv/pitchapp
892bae820f60f810a37059ec2513780781845fae
[ "Unlicense" ]
null
null
null
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_uploads import UploadSet, configure_uploads, IMAGES from flask_mail import Mail from flask_bootstrap import Bootstrap from config import config_options db = SQLAlchemy() login_manager = LoginManager() login_...
27.634146
72
0.767873
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_login import LoginManager from flask_uploads import UploadSet, configure_uploads, IMAGES from flask_mail import Mail from flask_bootstrap import Bootstrap from config import config_options db = SQLAlchemy() login_manager = LoginManager() login_...
true
true
f70f2f9abb45df82814e56f9b8abfc7d851be613
3,740
py
Python
osf/models/__init__.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
628
2015-01-15T04:33:22.000Z
2022-03-30T06:40:10.000Z
osf/models/__init__.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
4,712
2015-01-02T01:41:53.000Z
2022-03-30T14:18:40.000Z
osf/models/__init__.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
371
2015-01-12T16:14:08.000Z
2022-03-31T18:58:29.000Z
from osf.models.metaschema import RegistrationSchemaBlock, RegistrationSchema, FileMetadataSchema # noqa from osf.models.base import Guid, BlackListGuid # noqa from osf.models.user import OSFUser, Email # noqa from osf.models.contributor import Contributor, RecentlyAddedContributor, PreprintContributor, DraftRegistr...
64.482759
150
0.82861
from osf.models.metaschema import RegistrationSchemaBlock, RegistrationSchema, FileMetadataSchema from osf.models.base import Guid, BlackListGuid from osf.models.user import OSFUser, Email from osf.models.contributor import Contributor, RecentlyAddedContributor, PreprintContributor, DraftRegistrationContributor ...
true
true
f70f2faea328f7cea269e5d6f994b8b853dc0094
12,669
py
Python
cogs/twitter.py
tuna2134/rt-backend-1
71c48f56f21720b05a76dc0cdbdcb18a80d16afb
[ "BSD-4-Clause" ]
null
null
null
cogs/twitter.py
tuna2134/rt-backend-1
71c48f56f21720b05a76dc0cdbdcb18a80d16afb
[ "BSD-4-Clause" ]
null
null
null
cogs/twitter.py
tuna2134/rt-backend-1
71c48f56f21720b05a76dc0cdbdcb18a80d16afb
[ "BSD-4-Clause" ]
null
null
null
# RT - Twitter from typing import TYPE_CHECKING, Union, Dict, Tuple, List from discord.ext import commands import discord from tweepy.asynchronous import AsyncStream from tweepy import API, OAuthHandler from tweepy.errors import NotFound from tweepy.models import Status from jishaku.functools import executor_functi...
34.056452
155
0.535559
from typing import TYPE_CHECKING, Union, Dict, Tuple, List from discord.ext import commands import discord from tweepy.asynchronous import AsyncStream from tweepy import API, OAuthHandler from tweepy.errors import NotFound from tweepy.models import Status from jishaku.functools import executor_function from asynci...
true
true
f70f30b292a9125f52cf94cdfafc942140fe13d7
8,341
py
Python
test/test_all.py
egils-consulting/WikibaseIntegrator
461ef958f94e18c74122ee276e8e183d16a816e1
[ "MIT" ]
2
2020-07-11T23:29:35.000Z
2020-08-08T06:12:15.000Z
test/test_all.py
egils-consulting/WikibaseIntegrator
461ef958f94e18c74122ee276e8e183d16a816e1
[ "MIT" ]
3
2020-02-03T21:42:36.000Z
2020-08-09T00:05:09.000Z
test/test_all.py
Mystou/WikibaseIntegrator
33858e04ce242e9d2aa6ab458b48eaefb35fd1b1
[ "MIT" ]
null
null
null
import copy import pprint import unittest import requests from wikibaseintegrator import wbi_core, wbi_fastrun, wbi_functions, wbi_datatype from wikibaseintegrator.wbi_core import MWApiError __author__ = 'Sebastian Burgstaller-Muehlbacher' __license__ = 'AGPLv3' class TestMediawikiApiCall(unittest.TestCase): d...
39.530806
169
0.650042
import copy import pprint import unittest import requests from wikibaseintegrator import wbi_core, wbi_fastrun, wbi_functions, wbi_datatype from wikibaseintegrator.wbi_core import MWApiError __author__ = 'Sebastian Burgstaller-Muehlbacher' __license__ = 'AGPLv3' class TestMediawikiApiCall(unittest.TestCase): d...
true
true
f70f31d09bf0f21bb87ebb9f084519abac916626
19,238
py
Python
lib/global_utils.py
bicepjai/Deep-Survey-on-Text-Classification
d935f0d4fc09213644d0291a0d64873912b2e331
[ "MIT" ]
197
2017-10-29T14:35:50.000Z
2022-02-08T10:22:41.000Z
lib/global_utils.py
zhaohongbao/Deep-Survey-Text-Classification
d935f0d4fc09213644d0291a0d64873912b2e331
[ "MIT" ]
1
2018-09-14T16:46:06.000Z
2018-09-21T16:03:36.000Z
lib/global_utils.py
zhaohongbao/Deep-Survey-Text-Classification
d935f0d4fc09213644d0291a0d64873912b2e331
[ "MIT" ]
71
2018-01-25T10:59:12.000Z
2021-02-10T16:02:28.000Z
import sys import os import re import collections import itertools import bcolz import pickle import numpy as np import pandas as pd import gc import random import smart_open import h5py import csv import tensorflow as tf import gensim import datetime as dt from tqdm import tqdm_notebook as tqdm # import multiproce...
39.261224
198
0.596684
import sys import os import re import collections import itertools import bcolz import pickle import numpy as np import pandas as pd import gc import random import smart_open import h5py import csv import tensorflow as tf import gensim import datetime as dt from tqdm import tqdm_notebook as tqdm def _instanc...
true
true
f70f31e6aadbc7b104ba4e54290b9266aae9e56b
4,090
py
Python
YoutubeDownloader.py
rpant1728/Youtube-Downloader
6e64ecdf520c748dc5019cf07107d0622597971f
[ "MIT" ]
null
null
null
YoutubeDownloader.py
rpant1728/Youtube-Downloader
6e64ecdf520c748dc5019cf07107d0622597971f
[ "MIT" ]
null
null
null
YoutubeDownloader.py
rpant1728/Youtube-Downloader
6e64ecdf520c748dc5019cf07107d0622597971f
[ "MIT" ]
null
null
null
import sys, re, os, selenium, time, argparse from time import sleep from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.firefox.options import Options from selenium.webdriver.common.by import By from urllib.request import urlopen, urlretrieve class YoutubeDownloader(object): def __...
39.708738
142
0.582885
import sys, re, os, selenium, time, argparse from time import sleep from bs4 import BeautifulSoup from selenium import webdriver from selenium.webdriver.firefox.options import Options from selenium.webdriver.common.by import By from urllib.request import urlopen, urlretrieve class YoutubeDownloader(object): def __...
true
true
f70f32553a67b014ff81b6d4f591997937121e03
2,407
py
Python
rs/Database/mackinac/test/test_reconstruct.py
stevenirby/RetSynth
89cd62221959fd2dc2952c30de6ecbe2d511479a
[ "BSD-2-Clause" ]
3
2018-08-24T23:45:11.000Z
2021-09-08T19:57:22.000Z
rs/Database/mackinac/test/test_reconstruct.py
stevenirby/RetSynth
89cd62221959fd2dc2952c30de6ecbe2d511479a
[ "BSD-2-Clause" ]
1
2019-10-11T12:08:25.000Z
2019-10-14T16:36:14.000Z
rs/Database/mackinac/test/test_reconstruct.py
stevenirby/RetSynth
89cd62221959fd2dc2952c30de6ecbe2d511479a
[ "BSD-2-Clause" ]
2
2021-08-21T19:52:43.000Z
2021-09-25T12:39:03.000Z
import pytest from os.path import join import mackinac @pytest.mark.fixtures('download_data') class TestReconstruct: def test_reconstruct_features(self, universal_folder, bacteria_folder, b_theta_features, b_theta_summary, b_theta_id): template = mackinac.create_template...
41.5
103
0.630245
import pytest from os.path import join import mackinac @pytest.mark.fixtures('download_data') class TestReconstruct: def test_reconstruct_features(self, universal_folder, bacteria_folder, b_theta_features, b_theta_summary, b_theta_id): template = mackinac.create_template...
true
true
f70f32820aaba13f43601a29ab5f2eaee2d8740b
2,016
py
Python
tests/mock/spi_checks_lsbmode.py
nazeer22/mraa
0a12c5a0177f9fa8e7c4c564e70a65c4a0bb81af
[ "MIT" ]
3
2017-04-21T02:26:06.000Z
2017-12-27T01:37:35.000Z
tests/mock/spi_checks_lsbmode.py
nazeer22/mraa
0a12c5a0177f9fa8e7c4c564e70a65c4a0bb81af
[ "MIT" ]
1
2018-11-01T14:54:06.000Z
2018-11-01T14:54:06.000Z
tests/mock/spi_checks_lsbmode.py
nazeer22/mraa
0a12c5a0177f9fa8e7c4c564e70a65c4a0bb81af
[ "MIT" ]
3
2019-04-20T07:24:48.000Z
2020-11-05T00:27:43.000Z
#!/usr/bin/env python # Author: Alex Tereschenko <alext.mkrs@gmail.com> # Copyright (c) 2016 Alex Tereschenko. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, includin...
36
83
0.731151
import mraa as m import unittest as u from spi_checks_shared import * class SpiChecksLsbmode(u.TestCase): def setUp(self): self.spi = m.Spi(MRAA_SPI_BUS_NUM) def tearDown(self): del self.spi def test_spi_set_lsbmode_false(self): TEST_LSBMODE = False self.assertEqual(sel...
true
true
f70f333c177f5f6e3822f30ebcfacbfd14cf1385
115
py
Python
modules/2.79/bpy/types/ThemeSpaceListGeneric.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/ThemeSpaceListGeneric.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/ThemeSpaceListGeneric.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
class ThemeSpaceListGeneric: list = None list_text = None list_text_hi = None list_title = None
12.777778
28
0.669565
class ThemeSpaceListGeneric: list = None list_text = None list_text_hi = None list_title = None
true
true
f70f3389abfeefcf28c6e221bd594d807d6b386b
1,810
py
Python
mirage/core/loader.py
epablosensei/mirage
3c0d2fb0f0e570356e7126c999e83e0256920420
[ "MIT" ]
null
null
null
mirage/core/loader.py
epablosensei/mirage
3c0d2fb0f0e570356e7126c999e83e0256920420
[ "MIT" ]
null
null
null
mirage/core/loader.py
epablosensei/mirage
3c0d2fb0f0e570356e7126c999e83e0256920420
[ "MIT" ]
1
2020-06-08T15:50:31.000Z
2020-06-08T15:50:31.000Z
from mirage.libs import io class Loader: ''' This class permits to dynamically load the modules. ''' def __init__(self): ''' This constructor generates the modules list. ''' import mirage.modules as modules self.modulesList = {} for moduleName,module in modules.__modules__.items(): current = module#...
26.617647
102
0.691713
from mirage.libs import io class Loader: def __init__(self): import mirage.modules as modules self.modulesList = {} for moduleName,module in modules.__modules__.items(): current = module moduleClass = getattr(current,moduleName) self.modulesList[moduleName] = moduleClass def getModulesNames(self): ...
true
true
f70f33d05cc3dc8df24f43cf22b1baf7ccc96e5c
427
py
Python
terraform/modules/ecs/files/find_task_def.py
readevalprint/sift
3015a2f704816a687a7c0f1974b873d7cda43444
[ "Apache-2.0" ]
1
2020-02-04T04:28:09.000Z
2020-02-04T04:28:09.000Z
terraform/modules/ecs/files/find_task_def.py
readevalprint/sift
3015a2f704816a687a7c0f1974b873d7cda43444
[ "Apache-2.0" ]
3
2020-06-05T17:34:59.000Z
2021-06-10T22:45:45.000Z
terraform/modules/ecs/files/find_task_def.py
readevalprint/sift
3015a2f704816a687a7c0f1974b873d7cda43444
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import boto3 import json import sys client = boto3.client('ecs') data = json.load(sys.stdin) family_prefix = data['family_prefix'] task_def = client.list_task_definitions(familyPrefix=family_prefix, status="ACTIVE", sort="DESC", maxResults=1) task_arn =...
23.722222
83
0.676815
import boto3 import json import sys client = boto3.client('ecs') data = json.load(sys.stdin) family_prefix = data['family_prefix'] task_def = client.list_task_definitions(familyPrefix=family_prefix, status="ACTIVE", sort="DESC", maxResults=1) task_arn = task_def["taskDefini...
true
true
f70f34aa6054d5c7cfa28a06d14022ed6f21afe4
3,447
py
Python
src/loader/load_opportunity_dataset.py
Sensors-in-Paradise/OpportunityML
a123b4842de45f735d517be6bcd96ca35171db91
[ "MIT" ]
1
2022-03-25T16:00:36.000Z
2022-03-25T16:00:36.000Z
src/loader/load_opportunity_dataset.py
Sensors-in-Paradise/OpportunityML
a123b4842de45f735d517be6bcd96ca35171db91
[ "MIT" ]
1
2022-03-28T13:50:28.000Z
2022-03-28T13:50:28.000Z
src/loader/load_opportunity_dataset.py
Sensors-in-Paradise/OpportunityML
a123b4842de45f735d517be6bcd96ca35171db91
[ "MIT" ]
null
null
null
import itertools import os import numpy as np import pandas as pd from utils.Recording import Recording import utils.settings as settings def load_opportunity_dataset(opportunity_dataset_path: str) -> "list[Recording]": """ Returns a list of Recordings from the opportunity dataset """ print("Will re...
32.828571
160
0.596171
import itertools import os import numpy as np import pandas as pd from utils.Recording import Recording import utils.settings as settings def load_opportunity_dataset(opportunity_dataset_path: str) -> "list[Recording]": print("Will read the opportunity dataset") opportunity_dataset_path += "/dataset" su...
true
true
f70f36f9beef6000a030d08e92f17bdd06f49fa2
5,002
py
Python
sdk/python/pulumi_azure_nextgen/recoveryservices/v20190513/get_protected_item.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/recoveryservices/v20190513/get_protected_item.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/recoveryservices/v20190513/get_protected_item.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
34.979021
151
0.638545
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetProtectedItemResult', 'AwaitableGetProtectedItemResult', 'get_protected_item', ] @pulumi.output_type class GetProtect...
true
true
f70f378ef04c13ea6496cf8ff11091ce7230a8c8
262
py
Python
Part_2_intermediate/mod_2/lesson_7/ex_1_cls/main.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_2_intermediate/mod_2/lesson_7/ex_1_cls/main.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
Part_2_intermediate/mod_2/lesson_7/ex_1_cls/main.py
Mikma03/InfoShareacademy_Python_Courses
3df1008c8c92831bebf1625f960f25b39d6987e6
[ "MIT" ]
null
null
null
from estudent.school import School def run_example(): school = School.create_school_with_students("Hogwart") print(school) print(f"W szkole może być maksymalnie {school.MAX_STUDENTS_NUMBER} uczniów") if __name__ == '__main__': run_example()
20.153846
80
0.736641
from estudent.school import School def run_example(): school = School.create_school_with_students("Hogwart") print(school) print(f"W szkole może być maksymalnie {school.MAX_STUDENTS_NUMBER} uczniów") if __name__ == '__main__': run_example()
true
true
f70f38918d4f1074b2011fa76e4171317554d533
3,855
py
Python
HD_BET/utils.py
evertdeman/HD-BET
817a50d2fe9b8663646cc74652cb50e26f343a3b
[ "Apache-2.0" ]
115
2019-01-31T15:58:13.000Z
2022-03-31T18:59:07.000Z
HD_BET/utils.py
evertdeman/HD-BET
817a50d2fe9b8663646cc74652cb50e26f343a3b
[ "Apache-2.0" ]
25
2019-02-05T16:12:28.000Z
2022-03-23T06:12:09.000Z
HD_BET/utils.py
evertdeman/HD-BET
817a50d2fe9b8663646cc74652cb50e26f343a3b
[ "Apache-2.0" ]
40
2019-01-31T16:08:25.000Z
2022-03-25T06:45:06.000Z
from urllib.request import urlopen import torch from torch import nn import numpy as np from skimage.morphology import label import os from HD_BET.paths import folder_with_parameter_files def get_params_fname(fold): return os.path.join(folder_with_parameter_files, "%d.model" % fold) def maybe_download_parameter...
33.521739
114
0.659144
from urllib.request import urlopen import torch from torch import nn import numpy as np from skimage.morphology import label import os from HD_BET.paths import folder_with_parameter_files def get_params_fname(fold): return os.path.join(folder_with_parameter_files, "%d.model" % fold) def maybe_download_parameter...
true
true
f70f3a764a276710af7c757c3c63f045ee99d167
5,677
py
Python
automationassets/automationassets.py
ben-garside/python_emulated_assets
9df700db8f29579e9135a6107b3a7b490c4a68ce
[ "MIT" ]
9
2018-02-05T18:44:34.000Z
2021-08-25T12:20:05.000Z
automationassets/automationassets.py
ben-garside/python_emulated_assets
9df700db8f29579e9135a6107b3a7b490c4a68ce
[ "MIT" ]
2
2018-02-12T23:45:19.000Z
2018-09-25T19:48:23.000Z
automationassets/automationassets.py
ben-garside/python_emulated_assets
9df700db8f29579e9135a6107b3a7b490c4a68ce
[ "MIT" ]
13
2018-02-08T22:55:17.000Z
2022-03-14T21:36:10.000Z
""" Azure Automation assets module to be used with Azure Automation during offline development """ #!/usr/bin/env python2 # ---------------------------------------------------------------------------------- # # MIT License # Permission is hereby granted, free of charge, to any person obtaining a copy # of this softwar...
38.358108
98
0.692443
_KEY_NAME = "Name" _KEY_VALUE = "Value" _KEY_USERNAME = "Username" _KEY_PASSWORD = "Password" _KEY_CERTPATH = "CertPath" _KEY_CONNECTION_FIELDS = "ValueFields" _KEY_VARIABLE = "Variable" _KEY_CERTIFICATE = "Certificate" _KEY_CREDENTIAL = "Credential" _KEY_CONNECTION = "Connection" def _get_...
true
true
f70f3b45752881894252cff7a788451d568e330f
889
py
Python
backoffice/transactions/migrations/0008_auto_20210323_1912.py
AlejandroUPC/pythonmicroservices
9d42bd6dfd9847ad4a8e6029e808de927292c251
[ "MIT" ]
null
null
null
backoffice/transactions/migrations/0008_auto_20210323_1912.py
AlejandroUPC/pythonmicroservices
9d42bd6dfd9847ad4a8e6029e808de927292c251
[ "MIT" ]
null
null
null
backoffice/transactions/migrations/0008_auto_20210323_1912.py
AlejandroUPC/pythonmicroservices
9d42bd6dfd9847ad4a8e6029e808de927292c251
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-03-23 19:12 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('transactions', '0007_auto_20210323_1910'), ] operations = [ migrations.AlterField( model_name='customer', name='cust...
30.655172
103
0.629921
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('transactions', '0007_auto_20210323_1910'), ] operations = [ migrations.AlterField( model_name='customer', name='customer_id', field=models.BigIntegerFi...
true
true
f70f3ba8a6408ce64c89b41a346b915bd784f0d9
1,759
py
Python
lists/gaz50k/map.py
openregister/local-authority-data
68f499152ba799feae602e67c6e30ae0914f2230
[ "MIT" ]
8
2016-07-05T14:46:48.000Z
2018-11-07T17:31:33.000Z
lists/gaz50k/map.py
psd/local-authority-data
68f499152ba799feae602e67c6e30ae0914f2230
[ "MIT" ]
10
2016-10-04T15:58:14.000Z
2018-04-30T11:39:00.000Z
lists/gaz50k/map.py
psd/local-authority-data
68f499152ba799feae602e67c6e30ae0914f2230
[ "MIT" ]
5
2016-06-03T13:02:21.000Z
2021-04-11T08:27:38.000Z
#!/usr/bin/env python3 import sys import csv """ Field Name Full name Format Example 1 SEQ Sequence number Int (6) 86415 2 KM_REF Kilometre reference Char (6) ST5265 3 DEF_NAM Definitive name Char (60) Felton 4 ...
39.977273
73
0.489483
import sys import csv county = {} for row in csv.reader(sys.stdin, delimiter=':', quoting=csv.QUOTE_NONE): county[row[11]] = { 'gaz50k': row[11], 'county': row[12], 'name': row[13], } fields = [ 'gaz50k', 'county', 'name' ] print("\t".join(fields)) for code in county: print("\...
true
true
f70f3bf39f608a55e8c1b01d43760cd70a34aa3d
3,014
py
Python
setup.py
Legogris/electrum-zcl
fcffa73f944c1ee8f89b0a40f3dabc5c5bbfd4ec
[ "MIT" ]
null
null
null
setup.py
Legogris/electrum-zcl
fcffa73f944c1ee8f89b0a40f3dabc5c5bbfd4ec
[ "MIT" ]
null
null
null
setup.py
Legogris/electrum-zcl
fcffa73f944c1ee8f89b0a40f3dabc5c5bbfd4ec
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # python setup.py sdist --format=zip,gztar from setuptools import setup import os import sys import platform import imp import argparse version = imp.load_source('version', 'lib/version.py') def readhere(path): here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(...
30.14
80
0.626742
from setuptools import setup import os import sys import platform import imp import argparse version = imp.load_source('version', 'lib/version.py') def readhere(path): here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, path), 'r') as fd: return fd.read() def readreqs...
true
true
f70f3ec667d100f339d203021a68fd599082e6c4
4,607
py
Python
Neural_Network_Tensorflow.py
mdhasan8/Machine-Learning-in-Python
d66607d3003e8279e35cf176851f506aa833a9fe
[ "MIT" ]
null
null
null
Neural_Network_Tensorflow.py
mdhasan8/Machine-Learning-in-Python
d66607d3003e8279e35cf176851f506aa833a9fe
[ "MIT" ]
null
null
null
Neural_Network_Tensorflow.py
mdhasan8/Machine-Learning-in-Python
d66607d3003e8279e35cf176851f506aa833a9fe
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sat Dec 16 22:30:11 2020 @author: Easin """ from __future__ import absolute_import, division, print_function import tensorflow as tf from tensorflow.keras import Model, layers import numpy as np import matplotlib.pyplot as plt # MNIST dataset parameters. num_class...
33.875
90
0.676362
from __future__ import absolute_import, division, print_function import tensorflow as tf from tensorflow.keras import Model, layers import numpy as np import matplotlib.pyplot as plt num_classes = 10 num_features = 784 learning_rate = 0.1 training_steps = 2000 batch_size = 256 display_step = 100 ...
true
true
f70f3ec9882d3b23e9f039de32639f2defccb7a5
18,141
py
Python
python/ELASTICSEARCH_IN_VPC_ONLY/ELASTICSEARCH_IN_VPC_ONLY.py
docebo/aws-config-rules
75f92bcad644bd71f19bbc15cf99e6d6de6b8227
[ "CC0-1.0" ]
1,295
2016-03-01T23:06:33.000Z
2022-03-31T07:17:53.000Z
python/ELASTICSEARCH_IN_VPC_ONLY/ELASTICSEARCH_IN_VPC_ONLY.py
tied/aws-config-rules
7c66e109c1225111d2ab8d1811d6e80dea0affcb
[ "CC0-1.0" ]
287
2016-03-01T19:51:43.000Z
2022-01-06T04:59:55.000Z
python/ELASTICSEARCH_IN_VPC_ONLY/ELASTICSEARCH_IN_VPC_ONLY.py
tied/aws-config-rules
7c66e109c1225111d2ab8d1811d6e80dea0affcb
[ "CC0-1.0" ]
744
2016-03-01T18:33:00.000Z
2022-03-31T18:46:44.000Z
# Copyright 2017-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may # not use this file except in compliance with the License. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fi...
43.295943
178
0.72179
import json import sys import time import datetime import boto3 import botocore try: import liblogging except ImportError: pass pend(es_domain['DomainName']) while es_domains_names_only: time.sleep(PAUSE_TO_AVOID_THROTTLE_SECONDS) domain_details = es_client.describe_elasticsear...
true
true
f70f3ed795d311d796b3c5c3ebf880041a890b8c
3,232
py
Python
fuse_examples/tests/test_classification_knight.py
alexgo1/fuse-med-ml
928375828ff321d2bf7b2084389e34e1db0682e9
[ "Apache-2.0" ]
null
null
null
fuse_examples/tests/test_classification_knight.py
alexgo1/fuse-med-ml
928375828ff321d2bf7b2084389e34e1db0682e9
[ "Apache-2.0" ]
null
null
null
fuse_examples/tests/test_classification_knight.py
alexgo1/fuse-med-ml
928375828ff321d2bf7b2084389e34e1db0682e9
[ "Apache-2.0" ]
null
null
null
""" (C) Copyright 2021 IBM Corp. 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 d...
43.675676
173
0.740718
import pathlib import shutil import tempfile import unittest import os from fuse.utils.file_io.file_io import create_dir import wget from fuse_examples.classification.knight.eval.eval import eval from fuse_examples.classification.knight.make_targets_file import make_targets_file import fuse_examples.classification.kn...
true
true
f70f40aab05c3c3b88ea6a9589c157f02f828ff7
5,922
py
Python
libs/DatabaseConnection.py
hackerthinktank/RootTheBox
59d1ee0088b95214702efc47be437b6e770b50a2
[ "Apache-2.0" ]
2
2021-05-18T12:20:27.000Z
2021-05-18T13:33:58.000Z
libs/DatabaseConnection.py
hackerthinktank/RootTheBox
59d1ee0088b95214702efc47be437b6e770b50a2
[ "Apache-2.0" ]
null
null
null
libs/DatabaseConnection.py
hackerthinktank/RootTheBox
59d1ee0088b95214702efc47be437b6e770b50a2
[ "Apache-2.0" ]
1
2021-05-18T12:20:29.000Z
2021-05-18T12:20:29.000Z
# -*- coding: utf-8 -*- """ Created on Sep 20, 2012 @author: moloch Copyright 2012 Root the Box 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/licen...
33.083799
144
0.599797
import os import logging import sys import getpass import codecs from builtins import object from libs.ConsoleColors import * try: from urllib.parse import quote, quote_plus except ImportError: from urllib import quote, quote_plus from sqlalchemy import create_engine from tornado.options import options ...
true
true
f70f41653ba4836a1f0e9437fabd0b3d59b9213c
2,625
py
Python
schedules/tests/test_forms.py
mennonitengemeinde/church_site
ae9ef5f0f78811cecd734705339511dc0efb8340
[ "MIT" ]
null
null
null
schedules/tests/test_forms.py
mennonitengemeinde/church_site
ae9ef5f0f78811cecd734705339511dc0efb8340
[ "MIT" ]
44
2020-05-13T20:15:26.000Z
2022-03-04T02:58:58.000Z
schedules/tests/test_forms.py
mennonitengemeinde/church_site
ae9ef5f0f78811cecd734705339511dc0efb8340
[ "MIT" ]
4
2020-06-05T17:59:52.000Z
2021-02-06T19:09:43.000Z
from datetime import timedelta from django.contrib.auth import get_user_model from django.utils import timezone from churches.models import Church from schedules.forms import EventForm, AttendantAdminForm, AttendantForm from schedules.models import Event, Attendant from schedules.tests._setup import EventSetupTestCas...
39.179104
101
0.664381
from datetime import timedelta from django.contrib.auth import get_user_model from django.utils import timezone from churches.models import Church from schedules.forms import EventForm, AttendantAdminForm, AttendantForm from schedules.models import Event, Attendant from schedules.tests._setup import EventSetupTestCas...
true
true
f70f422ca39290a91d8641eadeef0839ff5a9c19
3,128
py
Python
aizynthfinder/mcts/config.py
robertburbidgedata/aizynthfinder
c05be3ce2eb3773dbdd2c52345f49543ca5b5b1e
[ "MIT" ]
null
null
null
aizynthfinder/mcts/config.py
robertburbidgedata/aizynthfinder
c05be3ce2eb3773dbdd2c52345f49543ca5b5b1e
[ "MIT" ]
null
null
null
aizynthfinder/mcts/config.py
robertburbidgedata/aizynthfinder
c05be3ce2eb3773dbdd2c52345f49543ca5b5b1e
[ "MIT" ]
null
null
null
""" Module containing a class for encapsulating the settings of the tree search """ import os import yaml from aizynthfinder.utils.logging import logger from aizynthfinder.utils.paths import data_path from aizynthfinder.mcts.policy import Policy from aizynthfinder.mcts.stock import Stock, MongoDbInchiKeyQuery class...
35.545455
83
0.656969
import os import yaml from aizynthfinder.utils.logging import logger from aizynthfinder.utils.paths import data_path from aizynthfinder.mcts.policy import Policy from aizynthfinder.mcts.stock import Stock, MongoDbInchiKeyQuery class Configuration: def __init__(self): self._properties = {} filen...
true
true
f70f42676fb42ff2e24a3774a95fa3284dddc61f
9,770
py
Python
hata/ext/command_utils/bases.py
Multiface24111/hata
cd28f9ef158e347363669cc8d1d49db0ff41aba0
[ "0BSD" ]
173
2019-06-14T20:25:00.000Z
2022-03-21T19:36:10.000Z
hata/ext/command_utils/bases.py
Tari-dev/hata
a5c3199c845858f997af3b0b2c18770fdc691897
[ "0BSD" ]
52
2020-01-03T17:05:14.000Z
2022-03-31T11:39:50.000Z
hata/ext/command_utils/bases.py
Tari-dev/hata
a5c3199c845858f997af3b0b2c18770fdc691897
[ "0BSD" ]
47
2019-11-09T08:46:45.000Z
2022-03-31T14:33:34.000Z
__all__ = ('GUI_STATE_CANCELLED', 'GUI_STATE_CANCELLING', 'GUI_STATE_READY', 'GUI_STATE_SWITCHING_CTX', 'GUI_STATE_SWITCHING_PAGE', 'PaginationBase') from ...backend.futures import Task, CancelledError from ...discord.core import KOKORO from ...discord.exceptions import DiscordException, ERROR_CODES GUI_STATE_REA...
37.148289
117
0.487513
__all__ = ('GUI_STATE_CANCELLED', 'GUI_STATE_CANCELLING', 'GUI_STATE_READY', 'GUI_STATE_SWITCHING_CTX', 'GUI_STATE_SWITCHING_PAGE', 'PaginationBase') from ...backend.futures import Task, CancelledError from ...discord.core import KOKORO from ...discord.exceptions import DiscordException, ERROR_CODES GUI_STATE_REA...
true
true
f70f42c642bcd5f1c7503962ab9976885292a0cd
277
py
Python
tests/test_0242.py
delirious-lettuce/LeetCode
4fbf2627f86cbaf1054c3df59bb9ffe72096d405
[ "MIT" ]
3
2018-02-14T23:50:07.000Z
2022-01-20T11:34:42.000Z
tests/test_0242.py
delirious-lettuce/LeetCode
4fbf2627f86cbaf1054c3df59bb9ffe72096d405
[ "MIT" ]
null
null
null
tests/test_0242.py
delirious-lettuce/LeetCode
4fbf2627f86cbaf1054c3df59bb9ffe72096d405
[ "MIT" ]
null
null
null
import pytest from problems.problem_0242 import Solution @pytest.mark.parametrize('test_input, expected', ( (('anagram', 'nagaram'), True), (('rat', 'car'), False), )) def test_is_anagram(test_input, expected): assert Solution.isAnagram(*test_input) == expected
23.083333
54
0.703971
import pytest from problems.problem_0242 import Solution @pytest.mark.parametrize('test_input, expected', ( (('anagram', 'nagaram'), True), (('rat', 'car'), False), )) def test_is_anagram(test_input, expected): assert Solution.isAnagram(*test_input) == expected
true
true
f70f42d0b880c0ab80731f4f8d628378224e54c4
7,587
py
Python
oneflow/python/test/ops/test_binary_elementwise_ops.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
1
2021-04-14T03:19:35.000Z
2021-04-14T03:19:35.000Z
oneflow/python/test/ops/test_binary_elementwise_ops.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
1
2021-06-16T08:37:50.000Z
2021-06-16T08:37:50.000Z
oneflow/python/test/ops/test_binary_elementwise_ops.py
wanghongsheng01/framework_enflame
debf613e05e3f5ea8084c3e79b60d0dd9e349526
[ "Apache-2.0" ]
null
null
null
""" Copyright 2020 The OneFlow Authors. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agr...
32.012658
84
0.596283
import unittest import os import numpy as np import tensorflow as tf import oneflow as flow from collections import OrderedDict import oneflow.typing as oft import test_global_storage from test_util import ( GenArgDict, GenArgList, type_name_to_flow_type, type_name_to_np_type, ) gpus = tf.config.exper...
true
true
f70f42d336559c1f4e453214becd60439e47c812
1,534
py
Python
samples/generated_samples/dialogflow_generated_dialogflowcx_v3_deployments_list_deployments_async.py
nicain/python-dialogflow-cx
2292ff540aea24c3c831a5ffe1604c2c022ccb82
[ "Apache-2.0" ]
null
null
null
samples/generated_samples/dialogflow_generated_dialogflowcx_v3_deployments_list_deployments_async.py
nicain/python-dialogflow-cx
2292ff540aea24c3c831a5ffe1604c2c022ccb82
[ "Apache-2.0" ]
null
null
null
samples/generated_samples/dialogflow_generated_dialogflowcx_v3_deployments_list_deployments_async.py
nicain/python-dialogflow-cx
2292ff540aea24c3c831a5ffe1604c2c022ccb82
[ "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...
34.088889
85
0.769231
from google.cloud import dialogflowcx_v3 async def sample_list_deployments(): client = dialogflowcx_v3.DeploymentsAsyncClient() request = dialogflowcx_v3.ListDeploymentsRequest( parent="parent_value", ) page_result = client.list_deployments(request=re...
true
true
f70f44300f3740ebdbf6b9adc5ad84b625f4771e
9,080
py
Python
core/domain/rte_component_registry_test.py
Panda2498/oppia
fccfd7e89c6904c244deaccdee80cc5658f2520a
[ "Apache-2.0" ]
1
2021-12-09T10:37:09.000Z
2021-12-09T10:37:09.000Z
core/domain/rte_component_registry_test.py
Panda2498/oppia
fccfd7e89c6904c244deaccdee80cc5658f2520a
[ "Apache-2.0" ]
1
2020-01-26T14:02:43.000Z
2020-01-26T14:02:43.000Z
core/domain/rte_component_registry_test.py
ryanboris/oppia
bc39e54e00d53ea2f00bca906fe02162d0c422ac
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2014 The Oppia Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
44.07767
95
0.651432
import os import re import string import struct from core.domain import obj_services from core.domain import rte_component_registry from core.tests import test_utils import feconf import schema_utils import schema_utils_test import utils IGNORED_FILE_SUFFIXES = ['.pyc', '.DS_Store'] RTE_THUMBNAIL_HE...
true
true
f70f444915b3432c8906c8cf40a5ebbacc9d4f46
15,039
py
Python
wo/cli/plugins/info.py
cdk-comp/WordOps
d1f0ccc7202d43c90ee7640f7acd4b7c3c158ee1
[ "MIT" ]
null
null
null
wo/cli/plugins/info.py
cdk-comp/WordOps
d1f0ccc7202d43c90ee7640f7acd4b7c3c158ee1
[ "MIT" ]
null
null
null
wo/cli/plugins/info.py
cdk-comp/WordOps
d1f0ccc7202d43c90ee7640f7acd4b7c3c158ee1
[ "MIT" ]
2
2021-01-02T07:49:51.000Z
2022-03-26T15:58:50.000Z
"""WOInfo Plugin for WordOps""" from cement.core.controller import CementBaseController, expose from cement.core import handler, hook from wo.core.variables import WOVariables from pynginxconfig import NginxConfig from wo.core.aptget import WOAptGet from wo.core.shellexec import WOShellExec from wo.core.logging import...
51.858621
252
0.583416
from cement.core.controller import CementBaseController, expose from cement.core import handler, hook from wo.core.variables import WOVariables from pynginxconfig import NginxConfig from wo.core.aptget import WOAptGet from wo.core.shellexec import WOShellExec from wo.core.logging import Log import os import configpars...
true
true
f70f445b5ea4447aaf2b1b379dd71f3f6cb58149
1,874
py
Python
setup.py
aalcock/ledtheatre
6de1193c13b930f8650280d9153713055a1eef7e
[ "MIT" ]
2
2018-01-29T19:56:02.000Z
2018-02-05T16:29:03.000Z
setup.py
aalcock/ledtheatre
6de1193c13b930f8650280d9153713055a1eef7e
[ "MIT" ]
null
null
null
setup.py
aalcock/ledtheatre
6de1193c13b930f8650280d9153713055a1eef7e
[ "MIT" ]
null
null
null
# ledtheatre is Licensed under the MIT License # Copyright 2017 Andrew Alcock # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # ...
39.87234
80
0.704376
from setuptools import setup def readme(): with open('README.rst') as f: return f.read() setup(name='ledtheatre', version='0.1.3', description='Control LED lights on the Adafruit PCA9685 PWM card', long_description=readme(), classifiers=[ 'Development...
true
true
f70f45557504faf15ed7f0658f2ee3c35b2a0eb7
63
py
Python
built-in/TensorFlow/Research/cv/image_classification/Cars_for_TensorFlow/automl/vega/search_space/networks/pytorch/roi_extractors/__init__.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
12
2020-12-13T08:34:24.000Z
2022-03-20T15:17:17.000Z
built-in/TensorFlow/Research/cv/image_classification/Cars_for_TensorFlow/automl/vega/search_space/networks/pytorch/roi_extractors/__init__.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
3
2021-03-31T20:15:40.000Z
2022-02-09T23:50:46.000Z
built-in/TensorFlow/Research/cv/image_classification/Darts_for_TensorFlow/automl/vega/search_space/networks/pytorch/roi_extractors/__init__.py
Huawei-Ascend/modelzoo
df51ed9c1d6dbde1deef63f2a037a369f8554406
[ "Apache-2.0" ]
2
2021-07-10T12:40:46.000Z
2021-12-17T07:55:15.000Z
from .single_level import * from .multi_roi_extractor import *
21
34
0.809524
from .single_level import * from .multi_roi_extractor import *
true
true
f70f457996a102881d83cdcf904a912167be83c4
207
py
Python
transmission_bot/cfg.py
brunojhovany/Telegram-bot-torrent
8de3b212648b23ef038dbf3b7434d1148a392783
[ "MIT" ]
null
null
null
transmission_bot/cfg.py
brunojhovany/Telegram-bot-torrent
8de3b212648b23ef038dbf3b7434d1148a392783
[ "MIT" ]
null
null
null
transmission_bot/cfg.py
brunojhovany/Telegram-bot-torrent
8de3b212648b23ef038dbf3b7434d1148a392783
[ "MIT" ]
null
null
null
from decouple import config ADDRESS = config("ADDRESS") PORT = config("PORT") TS_USER = config("TS_USER") PASSWORD = config("PASSWORD") TOKEN = config("TOKEN") PERSISTENCE_FILE = config("PERSISTENCE_FILE")
23
45
0.743961
from decouple import config ADDRESS = config("ADDRESS") PORT = config("PORT") TS_USER = config("TS_USER") PASSWORD = config("PASSWORD") TOKEN = config("TOKEN") PERSISTENCE_FILE = config("PERSISTENCE_FILE")
true
true
f70f48c501100e45d4611665ec2ffdc842a3c49f
1,704
py
Python
nnvm/tvm/topi/tests/python/test_topi_relu.py
rah9eu/p3
530628be7b7a8dd3e6199c3bebebdbf104005e5f
[ "Apache-2.0" ]
22
2019-02-20T12:42:20.000Z
2021-12-25T06:09:46.000Z
nnvm/tvm/topi/tests/python/test_topi_relu.py
rah9eu/p3
530628be7b7a8dd3e6199c3bebebdbf104005e5f
[ "Apache-2.0" ]
4
2019-04-01T07:36:04.000Z
2022-03-24T03:11:26.000Z
nnvm/tvm/topi/tests/python/test_topi_relu.py
rah9eu/p3
530628be7b7a8dd3e6199c3bebebdbf104005e5f
[ "Apache-2.0" ]
7
2019-03-20T16:04:37.000Z
2021-04-28T18:40:11.000Z
"""Test code for relu activation""" import os import numpy as np import tvm import topi from topi.util import get_const_tuple def verify_relu(m, n): A = tvm.placeholder((m, n), name='A') B = topi.nn.relu(A) a_np = np.random.uniform(size=get_const_tuple(A.shape)).astype(A.dtype) b_np = a_np * (a_np > 0...
29.37931
80
0.616784
import os import numpy as np import tvm import topi from topi.util import get_const_tuple def verify_relu(m, n): A = tvm.placeholder((m, n), name='A') B = topi.nn.relu(A) a_np = np.random.uniform(size=get_const_tuple(A.shape)).astype(A.dtype) b_np = a_np * (a_np > 0) def check_device(device): ...
true
true
f70f495f7639c90049b126928377ce133e1f4381
1,578
py
Python
inst/python/rpytools/test.py
bjungbogati/reticulate
e650515a8418ce7732bf89132b0c7a3dc29a7383
[ "Apache-2.0" ]
1
2018-10-21T18:41:05.000Z
2018-10-21T18:41:05.000Z
inst/python/rpytools/test.py
bjungbogati/reticulate
e650515a8418ce7732bf89132b0c7a3dc29a7383
[ "Apache-2.0" ]
35
2019-08-20T16:59:55.000Z
2022-02-12T19:22:46.000Z
inst/python/rpytools/test.py
bjungbogati/reticulate
e650515a8418ce7732bf89132b0c7a3dc29a7383
[ "Apache-2.0" ]
1
2020-02-14T02:54:52.000Z
2020-02-14T02:54:52.000Z
import threading import sys is_py2 = sys.version[0] == '2' if is_py2: import Queue as queue else: import queue as queue def isScalar(x): return not isinstance(x, (list, tuple)) def isList(x): return isinstance(x, (list)) def asString(x): return str(x) def makeDict(): return {'a': 1.0, 'c': 3.0, 'b': ...
16.268041
56
0.647655
import threading import sys is_py2 = sys.version[0] == '2' if is_py2: import Queue as queue else: import queue as queue def isScalar(x): return not isinstance(x, (list, tuple)) def isList(x): return isinstance(x, (list)) def asString(x): return str(x) def makeDict(): return {'a': 1.0, 'c': 3.0, 'b': ...
true
true
f70f499b3938d65a8dec688ff8e18592b5f6b4c1
32,683
py
Python
python/ray/data/dataset_pipeline.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
22
2018-05-08T05:52:34.000Z
2020-04-01T10:09:55.000Z
python/ray/data/dataset_pipeline.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
51
2018-05-17T05:55:28.000Z
2020-03-18T06:49:49.000Z
python/ray/data/dataset_pipeline.py
mgelbart/ray
4cec2286572e368a4bd64aae467751a384eff62d
[ "Apache-2.0" ]
10
2018-04-27T10:50:59.000Z
2020-02-24T02:41:43.000Z
import inspect import itertools import logging import time from typing import ( Any, Callable, List, Iterator, Iterable, Generic, Union, Optional, TYPE_CHECKING, ) import ray from ray.data.context import DatasetContext from ray.data.dataset import Dataset, T, U from ray.data.impl.pi...
37.055556
88
0.572775
import inspect import itertools import logging import time from typing import ( Any, Callable, List, Iterator, Iterable, Generic, Union, Optional, TYPE_CHECKING, ) import ray from ray.data.context import DatasetContext from ray.data.dataset import Dataset, T, U from ray.data.impl.pi...
true
true
f70f4a4cadff4f4dbb2f9dedfaac54e51efae86e
2,329
py
Python
alipay/aop/api/domain/AlipayEcoMycarMaintainServiceproductUpdateModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayEcoMycarMaintainServiceproductUpdateModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/domain/AlipayEcoMycarMaintainServiceproductUpdateModel.py
articuly/alipay-sdk-python-all
0259cd28eca0f219b97dac7f41c2458441d5e7a6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import simplejson as json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.MaitainShopProduct import MaitainShopProduct class AlipayEcoMycarMaintainServiceproductUpdateModel(object): def __init__(self): self._operation_type = N...
31.053333
79
0.640618
import simplejson as json from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.MaitainShopProduct import MaitainShopProduct class AlipayEcoMycarMaintainServiceproductUpdateModel(object): def __init__(self): self._operation_type = None self._out_product_id = None ...
true
true
f70f4a707f33e1e9b61bd480f17e84e9551a9632
6,795
py
Python
lazy/io/pathz/_flavours.py
trisongz/lazycls
701bad1a358ed3bb136347d0c5eb81de3201f6a3
[ "MIT" ]
2
2021-12-02T00:13:16.000Z
2022-02-26T11:18:33.000Z
lazy/io/pathz/_flavours.py
trisongz/lazycls
701bad1a358ed3bb136347d0c5eb81de3201f6a3
[ "MIT" ]
null
null
null
lazy/io/pathz/_flavours.py
trisongz/lazycls
701bad1a358ed3bb136347d0c5eb81de3201f6a3
[ "MIT" ]
null
null
null
from __future__ import annotations from pathlib import _PosixFlavour, _WindowsFlavour from typing import Optional, Callable, Awaitable, Dict, List, TYPE_CHECKING from errno import EINVAL import os import sys from aiopath.wrap import func_to_async_func as wrap_async try: from pathlib import _getfinalpathname _a...
37.75
96
0.569536
from __future__ import annotations from pathlib import _PosixFlavour, _WindowsFlavour from typing import Optional, Callable, Awaitable, Dict, List, TYPE_CHECKING from errno import EINVAL import os import sys from aiopath.wrap import func_to_async_func as wrap_async try: from pathlib import _getfinalpathname _a...
true
true
f70f4a9ec79445bf614842937d279938a47f9b30
2,796
py
Python
pocovidnet/scripts/eval_vid_classifier.py
983632847/covid19_pocus_ultrasound
3625e95bbf189926dbd12966ef59ee71ed10e453
[ "MIT" ]
1
2020-11-24T07:40:40.000Z
2020-11-24T07:40:40.000Z
pocovidnet/scripts/eval_vid_classifier.py
983632847/covid19_pocus_ultrasound
3625e95bbf189926dbd12966ef59ee71ed10e453
[ "MIT" ]
null
null
null
pocovidnet/scripts/eval_vid_classifier.py
983632847/covid19_pocus_ultrasound
3625e95bbf189926dbd12966ef59ee71ed10e453
[ "MIT" ]
null
null
null
import argparse import json import os import pickle import numpy as np from pocovidnet.evaluate_genesis import GenesisEvaluator from pocovidnet.evaluate_video import VideoEvaluator from tensorflow.keras import backend as K from pocovidnet.videoto3d import Videoto3D def main(): parser = argparse.ArgumentParser(des...
34.518519
77
0.594063
import argparse import json import os import pickle import numpy as np from pocovidnet.evaluate_genesis import GenesisEvaluator from pocovidnet.evaluate_video import VideoEvaluator from tensorflow.keras import backend as K from pocovidnet.videoto3d import Videoto3D def main(): parser = argparse.ArgumentParser(des...
true
true
f70f4aaaa09628c56d20528c22d3cd194f64d284
542
py
Python
atlas/skills/serializers.py
Kayra/atlas
63db74fd66c8f8a874c5352248ea7b6fc4dc0c6f
[ "BSD-3-Clause" ]
1
2015-12-16T06:20:14.000Z
2015-12-16T06:20:14.000Z
atlas/skills/serializers.py
Kayra/atlas
63db74fd66c8f8a874c5352248ea7b6fc4dc0c6f
[ "BSD-3-Clause" ]
null
null
null
atlas/skills/serializers.py
Kayra/atlas
63db74fd66c8f8a874c5352248ea7b6fc4dc0c6f
[ "BSD-3-Clause" ]
null
null
null
from rest_framework import serializers from .models import Skill, Task, Days class SkillSerializer(serializers.ModelSerializer): class Meta: model = Skill fields = ('name', 'user') class TaskSerializer(serializers.ModelSerializer): class Meta: model = Task fields = ('name', ...
24.636364
103
0.662362
from rest_framework import serializers from .models import Skill, Task, Days class SkillSerializer(serializers.ModelSerializer): class Meta: model = Skill fields = ('name', 'user') class TaskSerializer(serializers.ModelSerializer): class Meta: model = Task fields = ('name', ...
true
true
f70f4b9ac58896fac91046fbf000439679cf8a27
1,211
py
Python
test/functional/rpc_named_arguments.py
wizz13150/gapcoin-core
424b36ac0f232583e51bbef0ba87f4b1a53fde70
[ "MIT" ]
2
2020-11-07T01:18:24.000Z
2021-04-25T15:49:28.000Z
test/functional/rpc_named_arguments.py
wizz13150/gapcoin-core
424b36ac0f232583e51bbef0ba87f4b1a53fde70
[ "MIT" ]
2
2021-03-27T14:19:47.000Z
2021-04-30T12:57:11.000Z
test/functional/rpc_named_arguments.py
wizz13150/gapcoin-core
424b36ac0f232583e51bbef0ba87f4b1a53fde70
[ "MIT" ]
3
2021-02-03T14:39:29.000Z
2022-01-05T11:56:21.000Z
#!/usr/bin/env python3 # Copyright (c) 2016-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 using named arguments for RPCs.""" from test_framework.test_framework import AltcoinTestFramework...
34.6
101
0.679604
from test_framework.test_framework import AltcoinTestFramework from test_framework.util import ( assert_equal, assert_raises_rpc_error, ) class NamedArgumentTest(AltcoinTestFramework): def set_test_params(self): self.num_nodes = 1 def run_test(self): node = self.nodes[0] h...
true
true
f70f4b9c17d9141ff1eea0eec43d47d91b593441
14,098
py
Python
test/geometry/transform/crop/test_crop2d.py
pworinger/kornia
a8bddbc5412694d778b1a7338e0d001910bb8024
[ "ECL-2.0", "Apache-2.0" ]
1
2021-06-25T18:10:22.000Z
2021-06-25T18:10:22.000Z
test/geometry/transform/crop/test_crop2d.py
pworinger/kornia
a8bddbc5412694d778b1a7338e0d001910bb8024
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
test/geometry/transform/crop/test_crop2d.py
pworinger/kornia
a8bddbc5412694d778b1a7338e0d001910bb8024
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
from typing import Tuple import pytest import kornia as kornia import kornia.testing as utils # test utils import torch from torch.testing import assert_allclose from torch.autograd import gradcheck class TestBoundingBoxInferring: def test_bounding_boxes_dim_inferring(self, device, dtype): boxes = tor...
30.849015
94
0.452901
from typing import Tuple import pytest import kornia as kornia import kornia.testing as utils import torch from torch.testing import assert_allclose from torch.autograd import gradcheck class TestBoundingBoxInferring: def test_bounding_boxes_dim_inferring(self, device, dtype): boxes = torch.tensor([[...
true
true
f70f4bcb38a6805d80e29b9d93b8b14c0b0a2adf
782
py
Python
Dynamic Programming/213. House Robber II.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
138
2020-02-08T05:25:26.000Z
2021-11-04T11:59:28.000Z
Dynamic Programming/213. House Robber II.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
null
null
null
Dynamic Programming/213. House Robber II.py
beckswu/Leetcode
480e8dc276b1f65961166d66efa5497d7ff0bdfd
[ "MIT" ]
24
2021-01-02T07:18:43.000Z
2022-03-20T08:17:54.000Z
class Solution: def rob(self, nums): """ :type nums: List[int] :rtype: int """ if(len(nums)==1): return nums[0] # 1的时候不work 两个dp,一个从第一位开始,一个从倒数第二位结束 last, now = 0, 0 last1, now1 = 0, 0 for i, n in enumerate(nums): if i<len(nums...
28.962963
78
0.446292
class Solution: def rob(self, nums): if(len(nums)==1): return nums[0] last, now = 0, 0 last1, now1 = 0, 0 for i, n in enumerate(nums): if i<len(nums)-1: last, now = now, max(n+last,now) print(now, last) if i>0: ...
true
true
f70f4bf8220077d2a182387cb01ae41173d9d9fa
1,026
py
Python
awacs/aps.py
mtrspringer/awacs
a5d2fe37c2a468a977536c4d6e66dda7da69717f
[ "BSD-2-Clause" ]
null
null
null
awacs/aps.py
mtrspringer/awacs
a5d2fe37c2a468a977536c4d6e66dda7da69717f
[ "BSD-2-Clause" ]
19
2020-11-30T06:43:54.000Z
2022-02-21T09:02:54.000Z
awacs/aps.py
mtrspringer/awacs
a5d2fe37c2a468a977536c4d6e66dda7da69717f
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from aws import Action as BaseAction from aws import BaseARN service_name = 'Amazon Managed Service for Prometheus' prefix = 'aps' class Action(BaseAction): def __init__(self, action=None): ...
28.5
70
0.725146
from aws import Action as BaseAction from aws import BaseARN service_name = 'Amazon Managed Service for Prometheus' prefix = 'aps' class Action(BaseAction): def __init__(self, action=None): sup = super(Action, self) sup.__init__(prefix, action) class ARN(BaseARN): def __init__(self, re...
true
true
f70f4cea7dfe68ebcc562953c631258be61fcee2
7,789
py
Python
kerasify.py
anmalara/kerasify
a32a2715d379ad58ef318b545acbaa6ea5983cda
[ "MIT" ]
185
2016-11-08T11:45:35.000Z
2022-03-30T12:53:30.000Z
kerasify.py
anmalara/kerasify
a32a2715d379ad58ef318b545acbaa6ea5983cda
[ "MIT" ]
12
2016-12-25T00:25:52.000Z
2021-05-07T04:02:26.000Z
kerasify.py
Krypton0001/KerasToCpp
01924c857ee46d7c0380a3d3ceac9ff8de6c8bf4
[ "MIT" ]
61
2016-11-16T19:15:34.000Z
2021-11-05T19:33:59.000Z
import numpy as np import struct LAYER_DENSE = 1 LAYER_CONVOLUTION2D = 2 LAYER_FLATTEN = 3 LAYER_ELU = 4 LAYER_ACTIVATION = 5 LAYER_MAXPOOLING2D = 6 LAYER_LSTM = 7 LAYER_EMBEDDING = 8 ACTIVATION_LINEAR = 1 ACTIVATION_RELU = 2 ACTIVATION_SOFTPLUS = 3 ACTIVATION_SIGMOID = 4 ACTIVATION_TANH = 5 ACTIVATION_HARD_SIGMOID =...
35.894009
92
0.5147
import numpy as np import struct LAYER_DENSE = 1 LAYER_CONVOLUTION2D = 2 LAYER_FLATTEN = 3 LAYER_ELU = 4 LAYER_ACTIVATION = 5 LAYER_MAXPOOLING2D = 6 LAYER_LSTM = 7 LAYER_EMBEDDING = 8 ACTIVATION_LINEAR = 1 ACTIVATION_RELU = 2 ACTIVATION_SOFTPLUS = 3 ACTIVATION_SIGMOID = 4 ACTIVATION_TANH = 5 ACTIVATION_HARD_SIGMOID =...
true
true
f70f4d074c2ce70c7edb9ce44b7c84467d1ab3f9
1,084
py
Python
aiodata/db/connection.py
jan-mue/aiodata
f1016d98520c8785e5c0c3db0485f04fa34257ce
[ "MIT" ]
null
null
null
aiodata/db/connection.py
jan-mue/aiodata
f1016d98520c8785e5c0c3db0485f04fa34257ce
[ "MIT" ]
null
null
null
aiodata/db/connection.py
jan-mue/aiodata
f1016d98520c8785e5c0c3db0485f04fa34257ce
[ "MIT" ]
null
null
null
import sqlalchemy from functools import partial async def create_engine(*args, **kwargs): engine = sqlalchemy.create_engine(*args, **kwargs) if engine.driver == "psycopg2": import asyncpg p = await asyncpg.create_pool(str(engine.url)) elif engine.driver == "pyodbc": imp...
28.526316
77
0.619926
import sqlalchemy from functools import partial async def create_engine(*args, **kwargs): engine = sqlalchemy.create_engine(*args, **kwargs) if engine.driver == "psycopg2": import asyncpg p = await asyncpg.create_pool(str(engine.url)) elif engine.driver == "pyodbc": imp...
true
true
f70f4e13a5bf144e945fcaa58230dc35850c07e2
1,273
py
Python
example-timeboard.py
hmain/cfn-datadog
7c7bbcc63e6490e7c0d3ffcf07a546b71d222950
[ "Apache-2.0" ]
11
2018-01-15T15:00:53.000Z
2019-08-07T01:44:59.000Z
example-timeboard.py
hmain/cfn-datadog
7c7bbcc63e6490e7c0d3ffcf07a546b71d222950
[ "Apache-2.0" ]
3
2018-01-31T11:40:58.000Z
2018-08-10T13:52:14.000Z
example-timeboard.py
hmain/cfn-datadog
7c7bbcc63e6490e7c0d3ffcf07a546b71d222950
[ "Apache-2.0" ]
6
2018-01-16T12:38:11.000Z
2019-04-18T11:33:09.000Z
from cfn_datadog import Timeboard, Graph, TemplateVariable, Definition, Request from troposphere import Parameter, Template, Join, ImportValue, Sub t = Template() datadog_lambda_stackname = t.add_parameter(Parameter( "DatadogLambdaStackname", Type="String", Description="Stack name of cfn-datadog" )) time...
26.520833
88
0.616654
from cfn_datadog import Timeboard, Graph, TemplateVariable, Definition, Request from troposphere import Parameter, Template, Join, ImportValue, Sub t = Template() datadog_lambda_stackname = t.add_parameter(Parameter( "DatadogLambdaStackname", Type="String", Description="Stack name of cfn-datadog" )) time...
true
true
f70f4e7e24e09490ba7a9712796660d2ae2860e2
17,884
py
Python
vivisect/qt/memory.py
bat-serjo/vivisect
f60934a2c8c51c7acdba52a65756e717a108a440
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
vivisect/qt/memory.py
bat-serjo/vivisect
f60934a2c8c51c7acdba52a65756e717a108a440
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
vivisect/qt/memory.py
bat-serjo/vivisect
f60934a2c8c51c7acdba52a65756e717a108a440
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import logging from PyQt5.QtWidgets import * import envi.qt.memory as e_mem_qt import envi.qt.memcanvas as e_mem_canvas import vqt.hotkeys as vq_hotkey import vivisect.base as viv_base import vivisect.renderers as viv_rend import vivisect.qt.views as viv_q_views import vivisect.qt.ctxmenu as viv_q_ctxmenu from vqt...
33.679849
118
0.61323
import logging from PyQt5.QtWidgets import * import envi.qt.memory as e_mem_qt import envi.qt.memcanvas as e_mem_canvas import vqt.hotkeys as vq_hotkey import vivisect.base as viv_base import vivisect.renderers as viv_rend import vivisect.qt.views as viv_q_views import vivisect.qt.ctxmenu as viv_q_ctxmenu from vqt...
true
true
f70f4f9a2f8e77773f4d700170933be3c3cb6593
1,970
py
Python
python_modules/dagster/dagster/core/execution/context/step.py
jake-billings/dagster
7a1548a1f246c48189f3d8109e831b744bceb7d4
[ "Apache-2.0" ]
1
2019-07-15T17:34:04.000Z
2019-07-15T17:34:04.000Z
python_modules/dagster/dagster/core/execution/context/step.py
jake-billings/dagster
7a1548a1f246c48189f3d8109e831b744bceb7d4
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/execution/context/step.py
jake-billings/dagster
7a1548a1f246c48189f3d8109e831b744bceb7d4
[ "Apache-2.0" ]
null
null
null
from dagster import check from .system import SystemStepExecutionContext class StepExecutionContext(object): __slots__ = ['_system_step_execution_context', '_legacy_context'] def __init__(self, system_step_execution_context): self._system_step_execution_context = check.inst_param( system...
28.142857
92
0.716751
from dagster import check from .system import SystemStepExecutionContext class StepExecutionContext(object): __slots__ = ['_system_step_execution_context', '_legacy_context'] def __init__(self, system_step_execution_context): self._system_step_execution_context = check.inst_param( system...
true
true
f70f4fab1f7787b020a92ba4a182e8dd17836149
746
py
Python
setup.py
yanoshi/yootto
27b48777d922de53d98a05011864804bf6c74883
[ "MIT" ]
5
2021-01-11T10:59:39.000Z
2021-03-22T07:07:45.000Z
setup.py
yanoshi/yootto
27b48777d922de53d98a05011864804bf6c74883
[ "MIT" ]
4
2021-01-11T07:03:50.000Z
2021-08-13T18:13:16.000Z
setup.py
yanoshi/yootto
27b48777d922de53d98a05011864804bf6c74883
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages with open('requirements.txt') as requirements_file: install_requirements = requirements_file.read().splitlines() setup( name="yootto", version="0.1.5", description="yootto(ヨーッと) is tiny YouTube Music unofficial uploader", author="yanoshi", author_email...
29.84
73
0.647453
from setuptools import setup, find_packages with open('requirements.txt') as requirements_file: install_requirements = requirements_file.read().splitlines() setup( name="yootto", version="0.1.5", description="yootto(ヨーッと) is tiny YouTube Music unofficial uploader", author="yanoshi", author_email...
true
true
f70f5032fb844be87e596edfc4407fe50215388c
14,322
py
Python
synapse/events/utils.py
ricco386/synapse
0d464935f1771d966ab388d803349c7a2bf45ad9
[ "Apache-2.0" ]
null
null
null
synapse/events/utils.py
ricco386/synapse
0d464935f1771d966ab388d803349c7a2bf45ad9
[ "Apache-2.0" ]
null
null
null
synapse/events/utils.py
ricco386/synapse
0d464935f1771d966ab388d803349c7a2bf45ad9
[ "Apache-2.0" ]
2
2020-03-03T18:34:52.000Z
2022-03-31T11:06:18.000Z
# -*- coding: utf-8 -*- # Copyright 2014-2016 OpenMarket Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
31.134783
86
0.624633
import collections import re from typing import Mapping, Union from six import string_types from frozendict import frozendict from twisted.internet import defer from synapse.api.constants import EventTypes, RelationTypes from synapse.util.async_helpers import yieldable_gather_results from . import Ev...
true
true
f70f504cbb9797914e75e4bb397d591ff5e8ca28
3,224
py
Python
src/sentry/tagstore/v2/models/grouptagvalue.py
apragacz/sf-sentry
2fdd6c1195c29a1d401d1cd538c22ea68556699a
[ "BSD-3-Clause" ]
1
2018-03-05T15:40:12.000Z
2018-03-05T15:40:12.000Z
src/sentry/tagstore/v2/models/grouptagvalue.py
pkaminski/sentry
27e948283e27d93ca5192ca7b580830e092c25c7
[ "BSD-3-Clause" ]
1
2018-08-22T16:49:48.000Z
2018-08-22T16:49:48.000Z
src/sentry/tagstore/v2/models/grouptagvalue.py
pkaminski/sentry
27e948283e27d93ca5192ca7b580830e092c25c7
[ "BSD-3-Clause" ]
1
2018-07-02T09:46:44.000Z
2018-07-02T09:46:44.000Z
""" sentry.tagstore.v2.models.grouptagvalue ~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2017 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import six from django.db import models, router, transaction, DataError from djan...
31.300971
82
0.623759
from __future__ import absolute_import import six from django.db import models, router, transaction, DataError from django.utils import timezone from sentry.api.serializers import Serializer, register from sentry.db.models import ( Model, BoundedPositiveIntegerField, BaseManager, FlexibleForeignKey, sane_repr ) ...
true
true
f70f507eef49a7c8fbcf5752023ba89d96e7f5af
30,399
py
Python
robotframework-ls/src/robotframework_ls/impl/libspec_manager.py
emanlove/robotframework-lsp
b0d8862d24e3bc1b72d8ce9412a671571520e7d9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
robotframework-ls/src/robotframework_ls/impl/libspec_manager.py
emanlove/robotframework-lsp
b0d8862d24e3bc1b72d8ce9412a671571520e7d9
[ "ECL-2.0", "Apache-2.0" ]
1
2021-09-30T15:40:29.000Z
2021-09-30T15:40:29.000Z
robotframework-ls/src/robotframework_ls/impl/libspec_manager.py
emanlove/robotframework-lsp
b0d8862d24e3bc1b72d8ce9412a671571520e7d9
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import os import sys from robotframework_ls.constants import NULL from robocode_ls_core.robotframework_log import get_logger log = get_logger(__name__) def _normfile(filename): return os.path.abspath(os.path.normpath(os.path.normcase(filename))) def _get_libspec_mutex_name(libspec_filename): from robocode_...
37.437192
107
0.596467
import os import sys from robotframework_ls.constants import NULL from robocode_ls_core.robotframework_log import get_logger log = get_logger(__name__) def _normfile(filename): return os.path.abspath(os.path.normpath(os.path.normcase(filename))) def _get_libspec_mutex_name(libspec_filename): from robocode_...
true
true
f70f508210f2ed61f04a9924a27265ba20a3c8c0
965
py
Python
019_removeNthNodeFromListEnd.py
stuti-rastogi/leetcode-python-solutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
4
2018-07-24T08:36:42.000Z
2019-08-25T17:48:47.000Z
019_removeNthNodeFromListEnd.py
stuti-rastogi/leetcodesolutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
null
null
null
019_removeNthNodeFromListEnd.py
stuti-rastogi/leetcodesolutions
73593fe642a06a83cde974ba5e6de3a7b396ec84
[ "MIT" ]
null
null
null
# Definition for singly-linked list. # class ListNode: # def __init__(self, val=0, next=None): # self.val = val # self.next = next class Solution: def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode: if not head or not head.next: return None # make this st...
29.242424
97
0.554404
class Solution: def removeNthFromEnd(self, head: ListNode, n: int) -> ListNode: if not head or not head.next: return None first = head count = 0 while first and count <= n: first = first.next count += 1 ...
true
true
f70f51695161b773142bb7af5d30320d1eec9d9a
85
py
Python
api/tacticalrmm/apiv3/apps.py
infinite8co/tacticalrmm
bd7ce5417ec672552ec3cba325318795ccde972e
[ "MIT" ]
903
2019-10-22T22:56:42.000Z
2022-03-18T14:15:54.000Z
api/tacticalrmm/apiv3/apps.py
infinite8co/tacticalrmm
bd7ce5417ec672552ec3cba325318795ccde972e
[ "MIT" ]
720
2019-12-07T08:11:26.000Z
2022-03-17T21:47:04.000Z
api/tacticalrmm/apiv3/apps.py
infinite8co/tacticalrmm
bd7ce5417ec672552ec3cba325318795ccde972e
[ "MIT" ]
231
2020-02-11T14:14:21.000Z
2022-03-16T21:23:10.000Z
from django.apps import AppConfig class Apiv3Config(AppConfig): name = "apiv3"
14.166667
33
0.741176
from django.apps import AppConfig class Apiv3Config(AppConfig): name = "apiv3"
true
true
f70f520361f1a11ee403835f6c6ca6e6e2b12a75
1,452
py
Python
samples/generated_samples/logging_v2_generated_config_service_v2_update_settings_sync.py
MtkN1/google-cloud-logging-patch
05a2f747ad9b233fa3b9890c7369a50d86cabba6
[ "Apache-2.0" ]
null
null
null
samples/generated_samples/logging_v2_generated_config_service_v2_update_settings_sync.py
MtkN1/google-cloud-logging-patch
05a2f747ad9b233fa3b9890c7369a50d86cabba6
[ "Apache-2.0" ]
null
null
null
samples/generated_samples/logging_v2_generated_config_service_v2_update_settings_sync.py
MtkN1/google-cloud-logging-patch
05a2f747ad9b233fa3b9890c7369a50d86cabba6
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2022 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...
31.565217
85
0.759642
from google.cloud import logging_v2 def sample_update_settings(): client = logging_v2.ConfigServiceV2Client() request = logging_v2.UpdateSettingsRequest( name="name_value", ) response = client.update_settings(request=request) print(response)...
true
true
f70f5392d9696765d55f2f1e0e641681b6ef353f
16,489
py
Python
geoviews/operation/projection.py
GonzalezDiazJ/pyviz_geoviews_clone
cac9afd1bc0d25313c84ea617300bbe40207d044
[ "BSD-3-Clause" ]
null
null
null
geoviews/operation/projection.py
GonzalezDiazJ/pyviz_geoviews_clone
cac9afd1bc0d25313c84ea617300bbe40207d044
[ "BSD-3-Clause" ]
null
null
null
geoviews/operation/projection.py
GonzalezDiazJ/pyviz_geoviews_clone
cac9afd1bc0d25313c84ea617300bbe40207d044
[ "BSD-3-Clause" ]
null
null
null
import param import numpy as np from cartopy import crs as ccrs from cartopy.img_transform import warp_array, _determine_bounds from holoviews.core.util import cartesian_product, get_param_values from holoviews.operation import Operation from shapely.geometry import Polygon, LineString, MultiPolygon, MultiLineString ...
39.73253
108
0.572321
import param import numpy as np from cartopy import crs as ccrs from cartopy.img_transform import warp_array, _determine_bounds from holoviews.core.util import cartesian_product, get_param_values from holoviews.operation import Operation from shapely.geometry import Polygon, LineString, MultiPolygon, MultiLineString ...
true
true
f70f53d11f6bad5ff3c69ec373295103fd57b32c
1,832
py
Python
end_to_end_tests/golden-record/my_test_api_client/api/default/get_common_parameters.py
kmray/openapi-python-client
19dd9d8c2407e9f01d73bdb833d8dedf428d897c
[ "MIT" ]
172
2020-02-15T20:14:16.000Z
2021-06-09T07:09:15.000Z
end_to_end_tests/golden-record/my_test_api_client/api/default/get_common_parameters.py
kmray/openapi-python-client
19dd9d8c2407e9f01d73bdb833d8dedf428d897c
[ "MIT" ]
410
2020-02-15T19:39:29.000Z
2021-06-09T19:28:57.000Z
end_to_end_tests/golden-record/my_test_api_client/api/default/get_common_parameters.py
kmray/openapi-python-client
19dd9d8c2407e9f01d73bdb833d8dedf428d897c
[ "MIT" ]
38
2020-04-12T09:36:27.000Z
2021-06-11T08:57:07.000Z
from typing import Any, Dict, Union import httpx from ...client import Client from ...types import UNSET, Response, Unset def _get_kwargs( *, client: Client, common: Union[Unset, None, str] = UNSET, ) -> Dict[str, Any]: url = "{}/common_parameters".format(client.base_url) headers: Dict[str, Any...
20.355556
82
0.593341
from typing import Any, Dict, Union import httpx from ...client import Client from ...types import UNSET, Response, Unset def _get_kwargs( *, client: Client, common: Union[Unset, None, str] = UNSET, ) -> Dict[str, Any]: url = "{}/common_parameters".format(client.base_url) headers: Dict[str, Any...
true
true
f70f54a84673a8794196351079055e57ac2e5bdf
3,370
py
Python
tests/conftest.py
ilko222/test_python
e77c3979bd9cef425716b8f26d2cdd4491b7ae17
[ "MIT" ]
null
null
null
tests/conftest.py
ilko222/test_python
e77c3979bd9cef425716b8f26d2cdd4491b7ae17
[ "MIT" ]
null
null
null
tests/conftest.py
ilko222/test_python
e77c3979bd9cef425716b8f26d2cdd4491b7ae17
[ "MIT" ]
null
null
null
import pytest import allure from _pytest.nodes import Item from _pytest.runner import CallInfo from selene.core.exceptions import TimeoutException from selene.support.shared import browser @pytest.fixture(scope='function', autouse=True) def browser_management(): """ Here, before yield, goes all "setup" co...
34.040404
93
0.660831
import pytest import allure from _pytest.nodes import Item from _pytest.runner import CallInfo from selene.core.exceptions import TimeoutException from selene.support.shared import browser @pytest.fixture(scope='function', autouse=True) def browser_management(): # An example of selene hook_wait_fai...
true
true
f70f54d4dd5967223a8d1a1372d9ffeaa51b56df
5,539
py
Python
public_talks/2016_02_26_columbia/get_tweets.py
kylepjohnson/ipython_notebooks
7f77ec06a70169cc479a6f912b4888789bf28ac4
[ "MIT" ]
9
2016-08-10T09:03:09.000Z
2021-01-06T21:34:20.000Z
public_talks/2016_02_26_columbia/get_tweets.py
kylepjohnson/ipython
7f77ec06a70169cc479a6f912b4888789bf28ac4
[ "MIT" ]
null
null
null
public_talks/2016_02_26_columbia/get_tweets.py
kylepjohnson/ipython
7f77ec06a70169cc479a6f912b4888789bf28ac4
[ "MIT" ]
3
2018-10-07T01:56:22.000Z
2021-01-06T21:33:28.000Z
#!/usr/bin/python # -*- coding: utf_8 -*- """Access and query Twitter's API with the simplistic twitter package (`pip install twitter`). """ from __future__ import print_function from __future__ import unicode_literals import csv import os import time from twitter import OAuth from twitter import Twitter def setup...
36.682119
104
0.596498
from __future__ import print_function from __future__ import unicode_literals import csv import os import time from twitter import OAuth from twitter import Twitter def setup_twitter(config_file='config.py'): config = {} execfile(config_file, config) twitter_obj = Twitter(auth=OAuth(config["access_k...
true
true
f70f54f0630586e54171415610e5bf23d7c87168
26,276
py
Python
q2_feature_table/plugin_setup.py
cguccione/q2-feature-table
90b75bb4848371bd640fe7c4baf14bc448d597c9
[ "BSD-3-Clause" ]
null
null
null
q2_feature_table/plugin_setup.py
cguccione/q2-feature-table
90b75bb4848371bd640fe7c4baf14bc448d597c9
[ "BSD-3-Clause" ]
null
null
null
q2_feature_table/plugin_setup.py
cguccione/q2-feature-table
90b75bb4848371bd640fe7c4baf14bc448d597c9
[ "BSD-3-Clause" ]
null
null
null
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2022, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
45.460208
79
0.614439
from qiime2.plugin import (Plugin, Int, Float, Range, Metadata, Str, Bool, Choices, MetadataColumn, Categorical, List, Citations, TypeMatch, TypeMap) import q2_feature_table from q2_types.feature_table import ( FeatureTable, Frequency, RelativeFrequency...
true
true
f70f557616fe80f5978c4f28c24fbbe3bf2fa1a3
2,795
py
Python
resampling/foundations_for_inference/gender_discrimination.py
necromuralist/resampling
0b48a51cb5f8e21a3f52508ecc74f12fa03d9b25
[ "MIT" ]
null
null
null
resampling/foundations_for_inference/gender_discrimination.py
necromuralist/resampling
0b48a51cb5f8e21a3f52508ecc74f12fa03d9b25
[ "MIT" ]
null
null
null
resampling/foundations_for_inference/gender_discrimination.py
necromuralist/resampling
0b48a51cb5f8e21a3f52508ecc74f12fa03d9b25
[ "MIT" ]
null
null
null
# pandas standard library import sys # third-party import pandas import matplotlib import matplotlib.pyplot as plot matplotlib.style.use('ggplot') GENDER_COUNT = 24 MALES_PROMOTED = 21 FEMALES_PROMOTED = 14 GENDER_DIFFERENCE = MALES_PROMOTED - FEMALES_PROMOTED FEMALES_NOT_PROMOTED = GENDER_COUNT - FEMALES_PROMOTED ...
39.928571
102
0.572093
import sys import pandas import matplotlib import matplotlib.pyplot as plot matplotlib.style.use('ggplot') GENDER_COUNT = 24 MALES_PROMOTED = 21 FEMALES_PROMOTED = 14 GENDER_DIFFERENCE = MALES_PROMOTED - FEMALES_PROMOTED FEMALES_NOT_PROMOTED = GENDER_COUNT - FEMALES_PROMOTED MALES_NOT_PROMOTED = GENDER_COUNT - MA...
true
true
f70f56d578d8a75e9fea3ab56d50aba5f5fd47bd
10,462
py
Python
utils/manipulator.py
hugeinteger/InterFaceGAN
59e75c0b4dcdbcea693b31ff11cf239c39e14ed1
[ "MIT" ]
null
null
null
utils/manipulator.py
hugeinteger/InterFaceGAN
59e75c0b4dcdbcea693b31ff11cf239c39e14ed1
[ "MIT" ]
null
null
null
utils/manipulator.py
hugeinteger/InterFaceGAN
59e75c0b4dcdbcea693b31ff11cf239c39e14ed1
[ "MIT" ]
null
null
null
# python3.7 """Utility functions for latent codes manipulation.""" import numpy as np from sklearn import svm from .logger import setup_logger __all__ = ['train_boundary', 'project_boundary', 'linear_interpolate'] def train_boundary(latent_codes, scores, chosen_num_or_ratio=0....
42.877049
80
0.688014
import numpy as np from sklearn import svm from .logger import setup_logger __all__ = ['train_boundary', 'project_boundary', 'linear_interpolate'] def train_boundary(latent_codes, scores, chosen_num_or_ratio=0.02, split_ratio=0.7, invalid...
true
true
f70f5789ebf11040a90ecc0c05c6851ad4bc8bd0
1,240
py
Python
setup.py
sliderSun/scrapy-djangoitem
f68e60806d6d0175b88943adcac78e002f17a43c
[ "BSD-3-Clause" ]
509
2015-08-11T23:04:42.000Z
2022-02-16T01:33:55.000Z
setup.py
sliderSun/scrapy-djangoitem
f68e60806d6d0175b88943adcac78e002f17a43c
[ "BSD-3-Clause" ]
19
2015-08-06T04:06:28.000Z
2021-09-28T00:38:50.000Z
setup.py
sliderSun/scrapy-djangoitem
f68e60806d6d0175b88943adcac78e002f17a43c
[ "BSD-3-Clause" ]
107
2015-09-03T20:21:56.000Z
2021-09-28T14:20:49.000Z
from setuptools import setup, find_packages setup( name='scrapy-djangoitem', version='1.1.1', url='https://github.com/scrapy-plugins/scrapy-djangoitem', description='Scrapy extension to write scraped items using Django models', long_description=open('README.rst').read(), author='Scrapy develop...
34.444444
78
0.607258
from setuptools import setup, find_packages setup( name='scrapy-djangoitem', version='1.1.1', url='https://github.com/scrapy-plugins/scrapy-djangoitem', description='Scrapy extension to write scraped items using Django models', long_description=open('README.rst').read(), author='Scrapy develop...
true
true
f70f59f0cd48a2f126ee48d3a32435225abc914a
1,310
py
Python
tests/subtractions/test_utils.py
ReeceHoffmann/virtool
f9befad060fe16fa29fb80124e674ac5a9c4f538
[ "MIT" ]
39
2016-10-31T23:28:59.000Z
2022-01-15T00:00:42.000Z
tests/subtractions/test_utils.py
ReeceHoffmann/virtool
f9befad060fe16fa29fb80124e674ac5a9c4f538
[ "MIT" ]
1,690
2017-02-07T23:39:48.000Z
2022-03-31T22:30:44.000Z
tests/subtractions/test_utils.py
ReeceHoffmann/virtool
f9befad060fe16fa29fb80124e674ac5a9c4f538
[ "MIT" ]
25
2017-02-08T18:25:31.000Z
2021-09-20T22:55:25.000Z
import os import pytest from virtool.subtractions.utils import ( check_subtraction_file_type, get_subtraction_files, join_subtraction_path, rename_bowtie_files, ) def test_join_subtraction_path(tmp_path, config): assert join_subtraction_path(config, "bar") == tmp_path / "subtractions" / "bar" ...
27.87234
84
0.710687
import os import pytest from virtool.subtractions.utils import ( check_subtraction_file_type, get_subtraction_files, join_subtraction_path, rename_bowtie_files, ) def test_join_subtraction_path(tmp_path, config): assert join_subtraction_path(config, "bar") == tmp_path / "subtractions" / "bar" ...
true
true
f70f5aa44820a47f32419ad9f28bef8a4d2813ba
23,039
py
Python
reVX/least_cost_xmission/least_cost_xmission.py
NREL/reVX
4d62eb2c003c3b53b959f7a58bdc342d18098884
[ "BSD-3-Clause" ]
7
2020-04-06T00:29:55.000Z
2022-01-23T20:00:14.000Z
reVX/least_cost_xmission/least_cost_xmission.py
NREL/reVX
4d62eb2c003c3b53b959f7a58bdc342d18098884
[ "BSD-3-Clause" ]
67
2020-02-28T20:15:35.000Z
2022-03-31T21:34:52.000Z
reVX/least_cost_xmission/least_cost_xmission.py
NREL/reVX
4d62eb2c003c3b53b959f7a58bdc342d18098884
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Module to compute least cost xmission paths, distances, and costs one or more SC points """ from concurrent.futures import as_completed import geopandas as gpd import json import logging import numpy as np import os import pandas as pd from pyproj.crs import CRS import rasterio from scipy.sp...
39.11545
79
0.570164
from concurrent.futures import as_completed import geopandas as gpd import json import logging import numpy as np import os import pandas as pd from pyproj.crs import CRS import rasterio from scipy.spatial import cKDTree from shapely.geometry import Point import time from reV.handlers.exclusions import ExclusionLayer...
true
true
f70f5b4ab3752fa1ced9abdd8789bbb663073dde
5,427
py
Python
site-packages/oslo_service/_options.py
hariza17/freezer_libraries
e0bd890eba5e7438976fb3b4d66c41c128bab790
[ "PSF-2.0" ]
null
null
null
site-packages/oslo_service/_options.py
hariza17/freezer_libraries
e0bd890eba5e7438976fb3b4d66c41c128bab790
[ "PSF-2.0" ]
null
null
null
site-packages/oslo_service/_options.py
hariza17/freezer_libraries
e0bd890eba5e7438976fb3b4d66c41c128bab790
[ "PSF-2.0" ]
null
null
null
# Copyright 2015 Mirantis Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
45.605042
79
0.585775
from oslo_config import cfg help_for_backdoor_port = ( "Acceptable values are 0, <port>, and <start>:<end>, where 0 results " "in listening on a random tcp port number; <port> results in listening " "on the specified port number (and not enabling backdoor if that port " "is in use); and ...
true
true
f70f5cd57a1fd153f57517e918891d2f039f7ddc
425
py
Python
interpriters/__init__.py
yakumo-saki/smart_to_zabbix
04dd1debe0c831b4ec94962884543c989ad57730
[ "MIT" ]
null
null
null
interpriters/__init__.py
yakumo-saki/smart_to_zabbix
04dd1debe0c831b4ec94962884543c989ad57730
[ "MIT" ]
23
2021-08-30T14:59:27.000Z
2021-11-05T16:51:08.000Z
interpriters/__init__.py
yakumo-saki/smart_to_zabbix
04dd1debe0c831b4ec94962884543c989ad57730
[ "MIT" ]
null
null
null
from interpriters.smart.IntelX25Interpriter import IntelX25Interpriter from interpriters.smart.SmartBasicInterpriter import SmartBasicInterpriter from interpriters.smart.SanDiskInterpriter import SmartSanDiskInterpriter from interpriters.nvme.NvmeBasicInterpriter import NvmeBasicInterpriter SPECIAL_INTERPRITERS = [Sm...
53.125
74
0.884706
from interpriters.smart.IntelX25Interpriter import IntelX25Interpriter from interpriters.smart.SmartBasicInterpriter import SmartBasicInterpriter from interpriters.smart.SanDiskInterpriter import SmartSanDiskInterpriter from interpriters.nvme.NvmeBasicInterpriter import NvmeBasicInterpriter SPECIAL_INTERPRITERS = [Sm...
true
true
f70f5e7eb40489e986f62438a0124259082259d8
24,487
py
Python
morgana/GUIs/fluo.py
Nikoula86/organoidSegment
b5d00256c15302ccd76b8b7a412852750476504b
[ "MIT" ]
8
2021-09-08T10:49:53.000Z
2022-02-25T13:28:03.000Z
morgana/GUIs/fluo.py
Nikoula86/organoidSegment
b5d00256c15302ccd76b8b7a412852750476504b
[ "MIT" ]
null
null
null
morgana/GUIs/fluo.py
Nikoula86/organoidSegment
b5d00256c15302ccd76b8b7a412852750476504b
[ "MIT" ]
1
2021-11-24T08:10:41.000Z
2021-11-24T08:10:41.000Z
from PyQt5.QtWidgets import (QApplication, QComboBox, QGridLayout, QGroupBox, QLabel, QPushButton, QFileDialog, QMessageBox, QWidget, QSizePolicy, QCheckBox) from matplotlib.backends.backend_qt5agg import FigureCanvas from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar impo...
43.883513
156
0.548822
from PyQt5.QtWidgets import (QApplication, QComboBox, QGridLayout, QGroupBox, QLabel, QPushButton, QFileDialog, QMessageBox, QWidget, QSizePolicy, QCheckBox) from matplotlib.backends.backend_qt5agg import FigureCanvas from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar impo...
true
true
f70f5ed7f55124b815811b8e5f3e9fd3b4c6d9bc
28
py
Python
rpxdock/rosetta/__init__.py
willsheffler/tcdock
c7b8614221f4a94750054bfe5dfb12298e8d05b8
[ "Apache-2.0" ]
6
2020-09-08T09:31:52.000Z
2022-03-29T09:53:30.000Z
rpxdock/rosetta/__init__.py
willsheffler/tcdock
c7b8614221f4a94750054bfe5dfb12298e8d05b8
[ "Apache-2.0" ]
9
2020-04-13T21:11:50.000Z
2022-03-09T00:57:37.000Z
rpxdock/rosetta/__init__.py
willsheffler/tcdock
c7b8614221f4a94750054bfe5dfb12298e8d05b8
[ "Apache-2.0" ]
3
2020-04-13T20:04:20.000Z
2021-12-16T22:43:50.000Z
from .rosetta_util import *
14
27
0.785714
from .rosetta_util import *
true
true
f70f5fe84e1700532cb04c37da25039ecfc01520
1,202
py
Python
tests/test_graph.py
shawnbrown/toron
3a89273b5afbda17baf973f654a0947f6667ef4e
[ "Apache-2.0" ]
1
2015-08-15T18:28:16.000Z
2015-08-15T18:28:16.000Z
tests/test_graph.py
shawnbrown/gpn
70b9933277a66e884cced3f5fbc795e0e0cd2b9f
[ "Apache-2.0" ]
null
null
null
tests/test_graph.py
shawnbrown/gpn
70b9933277a66e884cced3f5fbc795e0e0cd2b9f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- try: from StringIO import StringIO except ImportError: from io import StringIO # New stdlib location in 3.0 from . import _unittest as unittest from .common import TempDirTestCase from toron.graph import Graph from toron._gpn_node import Node from toron import IN_MEMORY class TestIn...
30.820513
78
0.694676
try: from StringIO import StringIO except ImportError: from io import StringIO from . import _unittest as unittest from .common import TempDirTestCase from toron.graph import Graph from toron._gpn_node import Node from toron import IN_MEMORY class TestInstantiation(TempDirTestCase): def setUp(self): ...
true
true
f70f60c0f5ef6d0d238412ab8c0bcbba577b180c
3,261
py
Python
tensorflow/python/kernel_tests/softplus_op_test.py
AlexChrisF/udacity
b7f85a74058fc63ccb7601c418450ab934ef5953
[ "Apache-2.0" ]
65
2016-09-26T01:30:40.000Z
2021-08-11T17:00:41.000Z
tensorflow/python/kernel_tests/softplus_op_test.py
AlexChrisF/udacity
b7f85a74058fc63ccb7601c418450ab934ef5953
[ "Apache-2.0" ]
7
2017-07-13T09:40:59.000Z
2019-04-08T22:46:51.000Z
tensorflow/python/kernel_tests/softplus_op_test.py
AlexChrisF/udacity
b7f85a74058fc63ccb7601c418450ab934ef5953
[ "Apache-2.0" ]
38
2017-04-28T04:15:48.000Z
2019-09-28T05:11:46.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
35.835165
80
0.623735
from __future__ import absolute_import from __future__ import division from __future__ import print_function import numpy as np from tensorflow.python.framework import constant_op from tensorflow.python.ops import gradient_checker from tensorflow.python.ops import nn_ops import tensorflow.python.ops.nn...
true
true
f70f620578b48f44b3909f01dd65ebfbea4e404e
1,774
py
Python
rezip.py
costerwi/rezip
c5386b96d8ed81a91b191b019ba48cf8377be578
[ "Apache-2.0" ]
35
2016-09-03T12:15:15.000Z
2022-03-14T11:04:33.000Z
rezip.py
costerwi/rezip
c5386b96d8ed81a91b191b019ba48cf8377be578
[ "Apache-2.0" ]
4
2017-02-08T07:25:42.000Z
2019-06-07T01:58:27.000Z
rezip.py
costerwi/rezip
c5386b96d8ed81a91b191b019ba48cf8377be578
[ "Apache-2.0" ]
7
2017-01-25T13:48:12.000Z
2020-09-19T23:35:44.000Z
#!/usr/bin/env python """Read zip format file from stdin and write new zip to stdout. With the --store option the output will be an uncompressed zip. Uncompressed files are stored more efficiently in Git. https://github.com/costerwi/rezip """ import sys import io from zipfile import * import argparse parser = argpa...
35.48
78
0.683202
import sys import io from zipfile import * import argparse parser = argparse.ArgumentParser(description=__doc__) parser.add_argument("--store", help="Store data to stdout zip without compression", action="store_true") parser.add_argument("-d", "--deterministic", help="Remove any file metadat...
true
true
f70f62b25660fe1a403bdc5ec0c24fed82b48c60
1,202
py
Python
domonic/webapi/dragndrop.py
byteface/domonic
971c2ae6ce2253e302873d40fd5b6e46a8f9ca95
[ "MIT" ]
94
2020-07-12T12:02:07.000Z
2022-03-25T03:04:57.000Z
domonic/webapi/dragndrop.py
byteface/domonic
971c2ae6ce2253e302873d40fd5b6e46a8f9ca95
[ "MIT" ]
41
2021-06-02T10:51:58.000Z
2022-02-21T09:58:43.000Z
domonic/webapi/dragndrop.py
byteface/domonic
971c2ae6ce2253e302873d40fd5b6e46a8f9ca95
[ "MIT" ]
17
2021-06-10T00:34:27.000Z
2022-02-21T09:47:30.000Z
""" domonic.webapi.dragndrop ==================================== https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API """ from domonic.events import DragEvent class DataTransfer: def __init__(self): self.data = {} self.types = [] self.files = [] se...
20.724138
75
0.56406
from domonic.events import DragEvent class DataTransfer: def __init__(self): self.data = {} self.types = [] self.files = [] self.items = [] self.dropEffect = "" self.effectAllowed = "" def clearData(self, type): self.data[type] = "" self.types...
true
true
f70f62fe541c2c1b6d4e273273e528bf2f968458
3,533
py
Python
gfwanalysis/routes/api/v1/whrc_biomass_router.py
archelogos/gfw-umd-gee
b1f5492f798a775eee24517bccbc10da513663f6
[ "MIT" ]
5
2017-11-01T21:13:19.000Z
2022-03-03T09:26:19.000Z
gfwanalysis/routes/api/v1/whrc_biomass_router.py
gfw-api/gfw-umd-gee
b1f5492f798a775eee24517bccbc10da513663f6
[ "MIT" ]
11
2018-01-22T09:05:23.000Z
2019-09-20T11:55:57.000Z
gfwanalysis/routes/api/v1/whrc_biomass_router.py
gfw-api/gfw-umd-gee
b1f5492f798a775eee24517bccbc10da513663f6
[ "MIT" ]
3
2020-07-10T13:30:58.000Z
2020-10-14T07:43:12.000Z
"""API ROUTER""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging from flask import jsonify, Blueprint from gfwanalysis.errors import WHRCBiomassError from gfwanalysis.middleware import get_geo_by_hash, get_geo_by_use, get_geo_by_wdpa, \ ...
37.585106
115
0.731956
from __future__ import absolute_import from __future__ import division from __future__ import print_function import logging from flask import jsonify, Blueprint from gfwanalysis.errors import WHRCBiomassError from gfwanalysis.middleware import get_geo_by_hash, get_geo_by_use, get_geo_by_wdpa, \ get_geo_by_natio...
true
true
f70f63a933620850da4b7b78a47ed2fd877b2fba
9,951
py
Python
BayCatEncoder/code.py
libinruan/hierarchical_bayesian_target_encoder
7510028a8ad1dea308802c4ca3d3a05533a9c89b
[ "MIT" ]
1
2021-11-28T19:05:55.000Z
2021-11-28T19:05:55.000Z
BayCatEncoder/code.py
libinruan/hierarchical_bayesian_target_encoder
7510028a8ad1dea308802c4ca3d3a05533a9c89b
[ "MIT" ]
null
null
null
BayCatEncoder/code.py
libinruan/hierarchical_bayesian_target_encoder
7510028a8ad1dea308802c4ca3d3a05533a9c89b
[ "MIT" ]
1
2021-11-28T19:07:01.000Z
2021-11-28T19:07:01.000Z
#%% import numpy as np import pandas as pd import time from sklearn.base import BaseEstimator, TransformerMixin from collections import defaultdict from sklearn.model_selection import KFold, StratifiedKFold class Timer: def __enter__(self): self.start=time.time() return self def __exit__(...
44.226667
274
0.553613
import numpy as np import pandas as pd import time from sklearn.base import BaseEstimator, TransformerMixin from collections import defaultdict from sklearn.model_selection import KFold, StratifiedKFold class Timer: def __enter__(self): self.start=time.time() return self def __exit__(sel...
true
true
f70f64b1c0e459c2b611f15e5ff01ad74993ec1e
1,318
py
Python
commands/ports.py
retr0-13/routeros-scanner
9a834d3459aa4621db33dab32a50d6c297bda059
[ "MIT" ]
1
2022-03-17T00:19:41.000Z
2022-03-17T00:19:41.000Z
commands/ports.py
retr0-13/routeros-scanner
9a834d3459aa4621db33dab32a50d6c297bda059
[ "MIT" ]
null
null
null
commands/ports.py
retr0-13/routeros-scanner
9a834d3459aa4621db33dab32a50d6c297bda059
[ "MIT" ]
1
2022-03-22T10:47:12.000Z
2022-03-22T10:47:12.000Z
# Copyright (c) Microsoft Corporation. # Licensed under the MIT License. from commands.basecommand import BaseCommand class Ports(BaseCommand): def __init__(self): self.__name__ = 'Ports' def run_ssh(self, sshc): res = self._ssh_data_with_header(sshc, '/ip service print detail') sus_...
28.652174
118
0.560698
from commands.basecommand import BaseCommand class Ports(BaseCommand): def __init__(self): self.__name__ = 'Ports' def run_ssh(self, sshc): res = self._ssh_data_with_header(sshc, '/ip service print detail') sus_dns, recommendation = self.check_results_ssh(res) return {'raw...
true
true
f70f675e28b12cb449e04ec8328c32afe56f38dc
1,876
py
Python
exercicios_resolvidos3/exercicios3/capitulo 09/exercicio-09-35.py
tiagosm1/Python_Nilo_Ney
b5380dcc8fcf64e9c047ebc353585caba3d7b397
[ "MIT" ]
null
null
null
exercicios_resolvidos3/exercicios3/capitulo 09/exercicio-09-35.py
tiagosm1/Python_Nilo_Ney
b5380dcc8fcf64e9c047ebc353585caba3d7b397
[ "MIT" ]
null
null
null
exercicios_resolvidos3/exercicios3/capitulo 09/exercicio-09-35.py
tiagosm1/Python_Nilo_Ney
b5380dcc8fcf64e9c047ebc353585caba3d7b397
[ "MIT" ]
null
null
null
############################################################################## # Parte do livro Introdução à Programação com Python # Autor: Nilo Ney Coutinho Menezes # Editora Novatec (c) 2010-2020 # Primeira edição - Novembro/2010 - ISBN 978-85-7522-250-8 # Segunda edição - Junho/2014 - ISBN 978-85-7522-408-3 # Terce...
29.3125
94
0.623134
true
true
f70f67632a3e49c17b9d54c76405c03ad7b33836
2,341
py
Python
bomber.py
SashaSarzh/InstagramDirectBomber
050f601860d6d1bd094cd209fba86a8f02ffc2b0
[ "Unlicense" ]
5
2020-10-13T13:16:43.000Z
2021-12-10T08:20:44.000Z
bomber.py
SashaSarzh/InstagramDirectBomber
050f601860d6d1bd094cd209fba86a8f02ffc2b0
[ "Unlicense" ]
1
2021-12-10T09:05:56.000Z
2021-12-10T09:05:56.000Z
bomber.py
SashaSarzh/InstagramDirectBomber
050f601860d6d1bd094cd209fba86a8f02ffc2b0
[ "Unlicense" ]
3
2020-10-13T16:03:57.000Z
2021-12-28T06:34:35.000Z
from InstagramAPI import InstagramAPI from colorama import Fore, Back, Style import getpass import sys import webbrowser import time import requests import json print(Fore.GREEN + """ ░░███╗░░███╗░░██╗░██████╗████████╗░░██╗██╗██████╗░░█████╗░███╗░░░███╗██████╗░██████╗░██████╗░ ░████║░░████╗░██║██╔════╝...
28.204819
125
0.470739
from InstagramAPI import InstagramAPI from colorama import Fore, Back, Style import getpass import sys import webbrowser import time import requests import json print(Fore.GREEN + """ ░░███╗░░███╗░░██╗░██████╗████████╗░░██╗██╗██████╗░░█████╗░███╗░░░███╗██████╗░██████╗░██████╗░ ░████║░░████╗░██║██╔════╝...
true
true
f70f68ac77916fe59476135cbaa77a1fc88fd642
17,623
py
Python
exports_and_stats.py
UB-Dortmund/mms
39dbb4bee68ee951ee0a5324c684b86a76d0ab6d
[ "Unlicense" ]
null
null
null
exports_and_stats.py
UB-Dortmund/mms
39dbb4bee68ee951ee0a5324c684b86a76d0ab6d
[ "Unlicense" ]
null
null
null
exports_and_stats.py
UB-Dortmund/mms
39dbb4bee68ee951ee0a5324c684b86a76d0ab6d
[ "Unlicense" ]
null
null
null
# The MIT License # # Copyright 2015-2017 University Library Bochum <bibliogaphie-ub@rub.de> and UB Dortmund <api.ub@tu-dortmund.de>. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software wit...
35.74645
130
0.511037
from __future__ import (absolute_import, division, print_function, unicode_literals) import logging import re from logging.handlers import RotatingFileHandler from bs4 import BeautifulSoup import requests import simplejson as json from flask import Flask, request, jsonify, url_for from flask im...
true
true
f70f69db064aa00e8a22d18234f4e4bfb925c067
5,053
py
Python
tools/harness-automation/autothreadharness/harness_controller.py
ltaoti/openthread
b24192267d56c9a175739d8b2a285bc4b701deaf
[ "BSD-3-Clause" ]
3
2018-06-20T11:13:33.000Z
2020-12-08T15:15:10.000Z
tools/harness-automation/autothreadharness/harness_controller.py
ltaoti/openthread
b24192267d56c9a175739d8b2a285bc4b701deaf
[ "BSD-3-Clause" ]
2
2017-03-23T07:47:54.000Z
2017-08-21T03:12:31.000Z
tools/harness-automation/autothreadharness/harness_controller.py
ltaoti/openthread
b24192267d56c9a175739d8b2a285bc4b701deaf
[ "BSD-3-Clause" ]
3
2017-08-29T01:31:57.000Z
2020-05-07T22:56:52.000Z
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # 1. Redistributions of source code must retain the above copyright # notic...
36.883212
115
0.622798
import ConfigParser import logging import os import subprocess import time from autothreadharness import settings logger = logging.getLogger(__name__) HARNESS_SVN_VERSION_R44 = 1471 def _try_kill(proc): logger.info('Try kill process') times = 1 while proc.poll() is None: ...
true
true
f70f6bcb10f8446af8069e8b93a6ae0bef8dac89
4,415
py
Python
dragonchain/lib/dao/smart_contract_dao.py
cheeseandcereal/dragonchain
34d34e344b887c2a0eeb591ede2015cc2506a323
[ "Apache-2.0" ]
null
null
null
dragonchain/lib/dao/smart_contract_dao.py
cheeseandcereal/dragonchain
34d34e344b887c2a0eeb591ede2015cc2506a323
[ "Apache-2.0" ]
null
null
null
dragonchain/lib/dao/smart_contract_dao.py
cheeseandcereal/dragonchain
34d34e344b887c2a0eeb591ede2015cc2506a323
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Dragonchain, Inc. # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and replaced with: # 6. Tr...
43.284314
146
0.755379
from typing import List, Optional, Dict from dragonchain import logger from dragonchain import exceptions from dragonchain.lib.dto import smart_contract_model from dragonchain.lib.interfaces import storage from dragonchain.lib.database import redisearch from dragonchain.lib import faas FOLDER = "SMA...
true
true
f70f6c1aeecb37a118fbcfe765ce6106f98b5a2d
3,643
py
Python
paddle_quantum/QAOA/example/main.py
xinwang1/Quantum
0f56e36e9e6111547547ae1b6cd5df307b41c1ac
[ "Apache-2.0" ]
null
null
null
paddle_quantum/QAOA/example/main.py
xinwang1/Quantum
0f56e36e9e6111547547ae1b6cd5df307b41c1ac
[ "Apache-2.0" ]
null
null
null
paddle_quantum/QAOA/example/main.py
xinwang1/Quantum
0f56e36e9e6111547547ae1b6cd5df307b41c1ac
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 Institute for Quantum Computing, Baidu Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
32.526786
113
0.681581
from paddle import fluid import os import numpy as np import matplotlib.pyplot as plt import networkx as nx from paddle_quantum.utils import pauli_str_to_matrix from paddle_quantum.QAOA.Paddle_QAOA import Paddle_QAOA from paddle_quantum.QAOA.QAOA_Prefunc import generate_graph, H_generator def main(N=...
true
true