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
f734ea9b8bb5e64eb1c72b0e9195f75e0147dfe3
2,673
py
Python
benchmark.py
lucas-sio-rosa/bigquery-benchmark
b37e029fffcb516818efa74e338d95293549499c
[ "WTFPL" ]
null
null
null
benchmark.py
lucas-sio-rosa/bigquery-benchmark
b37e029fffcb516818efa74e338d95293549499c
[ "WTFPL" ]
null
null
null
benchmark.py
lucas-sio-rosa/bigquery-benchmark
b37e029fffcb516818efa74e338d95293549499c
[ "WTFPL" ]
null
null
null
from concurrent.futures import ThreadPoolExecutor, as_completed from google.cloud import bigquery as bq from datetime import datetime as dt import argparse import json import logging import time if __name__ == "__main__": start_time = time.time() threads = [] results = [] parser = argparse.Argum...
41.765625
144
0.693603
from concurrent.futures import ThreadPoolExecutor, as_completed from google.cloud import bigquery as bq from datetime import datetime as dt import argparse import json import logging import time if __name__ == "__main__": start_time = time.time() threads = [] results = [] parser = argparse.Argum...
true
true
f734eaa92f6550c0ce4abd1c44bdd7c44006debf
1,640
py
Python
python/oneflow/test/modules/test_TripletMarginLoss.py
butterluo/oneflow
cf2ce575d80f89642b71bee2248e69b09213007d
[ "Apache-2.0" ]
null
null
null
python/oneflow/test/modules/test_TripletMarginLoss.py
butterluo/oneflow
cf2ce575d80f89642b71bee2248e69b09213007d
[ "Apache-2.0" ]
null
null
null
python/oneflow/test/modules/test_TripletMarginLoss.py
butterluo/oneflow
cf2ce575d80f89642b71bee2248e69b09213007d
[ "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.8
72
0.702439
import unittest from collections import OrderedDict import numpy as np from test_util import GenArgList from oneflow.test_utils.automated_test_util import * import oneflow as flow @flow.unittest.skip_unless_1n1d() class TestTripletMarginLoss(flow.unittest.TestCase): @autotest(n=10) def test_triplet_marginlo...
true
true
f734ece49fb38670af0abb06b808cf1656a36159
55,538
py
Python
python/graphvite/application/application.py
adrenadine33/graphvite
34fc203f96ff13095073c605ecfcae32213e7f6a
[ "Apache-2.0" ]
null
null
null
python/graphvite/application/application.py
adrenadine33/graphvite
34fc203f96ff13095073c605ecfcae32213e7f6a
[ "Apache-2.0" ]
null
null
null
python/graphvite/application/application.py
adrenadine33/graphvite
34fc203f96ff13095073c605ecfcae32213e7f6a
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 MilaGraph. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
39.783668
121
0.586355
from __future__ import print_function, absolute_import, unicode_literals, division import os import re import pickle import logging import multiprocessing from collections import defaultdict from future.builtins import str, map, range from easydict import EasyDict import numpy as np from .. import lib, cfg, auto fr...
true
true
f734ed8bac4aef42dc6a6161d52892cad0940c1e
5,894
py
Python
atlas/measure_baseclass.py
USC-NSL/ripe-atlas
9c512b0660923779031ec62909bc13bccace5890
[ "MIT" ]
4
2015-09-17T18:22:36.000Z
2016-03-11T21:00:57.000Z
atlas/measure_baseclass.py
USC-NSL/ripe-atlas
9c512b0660923779031ec62909bc13bccace5890
[ "MIT" ]
null
null
null
atlas/measure_baseclass.py
USC-NSL/ripe-atlas
9c512b0660923779031ec62909bc13bccace5890
[ "MIT" ]
null
null
null
#!/usr/bin/python import json import sys import traceback import os import requests import argparse SLEEP_TIME = 60*5 debug = False key_loc = '~/.atlas/auth' class MeasurementBase(object): def __init__(self, target, key, probe_list=None, sess=None): self.target = target self.description ...
34.069364
150
0.619444
import json import sys import traceback import os import requests import argparse SLEEP_TIME = 60*5 debug = False key_loc = '~/.atlas/auth' class MeasurementBase(object): def __init__(self, target, key, probe_list=None, sess=None): self.target = target self.description = '' self....
true
true
f734edb79c58022e50f9363b5ab9395deb5cbc15
138,531
py
Python
nova/tests/api/openstack/compute/plugins/v3/test_servers.py
vmthunder/nova
baf05caab705c5778348d9f275dc541747b7c2de
[ "Apache-2.0" ]
null
null
null
nova/tests/api/openstack/compute/plugins/v3/test_servers.py
vmthunder/nova
baf05caab705c5778348d9f275dc541747b7c2de
[ "Apache-2.0" ]
null
null
null
nova/tests/api/openstack/compute/plugins/v3/test_servers.py
vmthunder/nova
baf05caab705c5778348d9f275dc541747b7c2de
[ "Apache-2.0" ]
null
null
null
# Copyright 2010-2011 OpenStack Foundation # Copyright 2011 Piston Cloud Computing, 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...
41.663459
79
0.585652
import base64 import contextlib import copy import datetime import uuid import iso8601 import mock import mox from oslo.config import cfg from oslo.utils import timeutils import six.moves.urllib.parse as urlparse import testtools import webob from nova.api.openstack import compute from nova.api.openstack.compute imp...
true
true
f734f159910ff4649f30f99b0dfdab7ad3c0bb6c
744
py
Python
2019/Python/day02/part2.py
tymscar/Advent-Of-Code
cd7b96b0253191e236bd704b0d8b5540fb3e8ef6
[ "MIT" ]
4
2019-12-08T08:20:53.000Z
2021-12-17T12:04:11.000Z
2019/Python/day02/part2.py
tymscar/AdventOfCode2018
9742ddb6bbbc917062baad87d6b6de75375f1ae8
[ "MIT" ]
null
null
null
2019/Python/day02/part2.py
tymscar/AdventOfCode2018
9742ddb6bbbc917062baad87d6b6de75375f1ae8
[ "MIT" ]
4
2020-12-11T22:10:24.000Z
2021-12-25T22:39:05.000Z
import math file = open('input.txt','r') for line in file: initialMemory = line.split(',') bruteforce = -1 result = 0 while result != 19690720: memory = initialMemory.copy() bruteforce = bruteforce + 1 opcode = 0 pc = 0 memory[1] = int(bruteforce/100) memory[2] = int(bruteforce%100) while True: ...
17.302326
81
0.63172
import math file = open('input.txt','r') for line in file: initialMemory = line.split(',') bruteforce = -1 result = 0 while result != 19690720: memory = initialMemory.copy() bruteforce = bruteforce + 1 opcode = 0 pc = 0 memory[1] = int(bruteforce/100) memory[2] = int(bruteforce%100) while True: ...
true
true
f734f40c8b6fc327694f4ecc097b36a67858d578
998
py
Python
Python/unique-word-abbreviation.py
bssrdf/LeetCode-5
746df5cff523361145a74d9d429dc541a7b99910
[ "MIT" ]
68
2018-01-13T07:15:37.000Z
2022-02-20T12:58:24.000Z
Python/unique-word-abbreviation.py
bssrdf/LeetCode-5
746df5cff523361145a74d9d429dc541a7b99910
[ "MIT" ]
null
null
null
Python/unique-word-abbreviation.py
bssrdf/LeetCode-5
746df5cff523361145a74d9d429dc541a7b99910
[ "MIT" ]
63
2017-04-10T03:38:25.000Z
2022-03-17T23:24:51.000Z
# Time: ctor: O(n), n is number of words in the dictionary. # lookup: O(1) # Space: O(k), k is number of unique words. class ValidWordAbbr(object): def __init__(self, dictionary): """ initialize your data structure here. :type dictionary: List[str] """ self.lookup...
26.972973
68
0.578156
class ValidWordAbbr(object): def __init__(self, dictionary): self.lookup_ = collections.defaultdict(set) for word in dictionary: abbr = self.abbreviation(word) self.lookup_[abbr].add(word) def isUnique(self, word): abbr = self.abbreviation(word) ...
true
true
f734f41506c92e5b58aa8af5f798f467d21f6f9e
1,345
py
Python
tests/distributed/test_workspaces/test_nonblocking.py
vishalbelsare/jina
ae72cc5ce1f7e7f4c662e72e96ea21dddc28bf43
[ "Apache-2.0" ]
15,179
2020-04-28T10:23:56.000Z
2022-03-31T14:35:25.000Z
tests/distributed/test_workspaces/test_nonblocking.py
manavshah123/jina
f18b04eb82d18a3c554e2892bbae4b95fc0cb13e
[ "Apache-2.0" ]
3,912
2020-04-28T13:01:29.000Z
2022-03-31T14:36:46.000Z
tests/distributed/test_workspaces/test_nonblocking.py
manavshah123/jina
f18b04eb82d18a3c554e2892bbae4b95fc0cb13e
[ "Apache-2.0" ]
1,955
2020-04-28T10:50:49.000Z
2022-03-31T12:28:34.000Z
import os import pytest import asyncio from jina import __default_host__ from daemon.clients import AsyncJinaDClient cur_dir = os.path.dirname(os.path.abspath(__file__)) CLOUD_HOST = 'localhost:8000' # consider it as the staged version success = 0 failure = 0 client = AsyncJinaDClient(host=__default_host__, port=...
26.9
83
0.704833
import os import pytest import asyncio from jina import __default_host__ from daemon.clients import AsyncJinaDClient cur_dir = os.path.dirname(os.path.abspath(__file__)) CLOUD_HOST = 'localhost:8000' success = 0 failure = 0 client = AsyncJinaDClient(host=__default_host__, port=8000) async def get_alive(): g...
true
true
f734f4c59aaf5760f233bff98b0f4f64a6485f4a
3,922
py
Python
core/controllers/beam_jobs.py
tonadev/oppia
ba55bb58763ed01c21017e3c34b72e25302f3bd8
[ "Apache-2.0" ]
null
null
null
core/controllers/beam_jobs.py
tonadev/oppia
ba55bb58763ed01c21017e3c34b72e25302f3bd8
[ "Apache-2.0" ]
null
null
null
core/controllers/beam_jobs.py
tonadev/oppia
ba55bb58763ed01c21017e3c34b72e25302f3bd8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2021 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...
32.413223
79
0.610658
from __future__ import absolute_import from __future__ import unicode_literals from core.controllers import acl_decorators from core.controllers import base from core.domain import beam_job_services import feconf from typing import Any, Dict class BeamJobHandler(base.BaseHandler): GET_HANDLER_ERROR_RETURN_TY...
true
true
f734f51521e82853a72828b8b24473e38736128d
736
py
Python
core/migrations/0008_auto_20210426_0828.py
honno/ascii-forever
8364219db115229fa9eb0b059e9c0611dcb689cf
[ "MIT" ]
null
null
null
core/migrations/0008_auto_20210426_0828.py
honno/ascii-forever
8364219db115229fa9eb0b059e9c0611dcb689cf
[ "MIT" ]
null
null
null
core/migrations/0008_auto_20210426_0828.py
honno/ascii-forever
8364219db115229fa9eb0b059e9c0611dcb689cf
[ "MIT" ]
null
null
null
# Generated by Django 3.1.7 on 2021-04-26 08:28 import uuid from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [ ("core", "0007_art_thumb_render_squashed_0008_art_uuid"), ] operations = [ migrations.AlterField( ...
24.533333
91
0.585598
import uuid from django.db import migrations from django.db import models class Migration(migrations.Migration): dependencies = [ ("core", "0007_art_thumb_render_squashed_0008_art_uuid"), ] operations = [ migrations.AlterField( model_name="art", name="thumb_rend...
true
true
f734f5164fe1306a6e83df0cf7c8142a2d2b6ab5
4,266
py
Python
nativepython/tests/alternative_compilation_test.py
mjwoolf/nativepython
3f469f6d3c8c0f03cb9f51eb2a851d68310c7f90
[ "Apache-2.0" ]
null
null
null
nativepython/tests/alternative_compilation_test.py
mjwoolf/nativepython
3f469f6d3c8c0f03cb9f51eb2a851d68310c7f90
[ "Apache-2.0" ]
null
null
null
nativepython/tests/alternative_compilation_test.py
mjwoolf/nativepython
3f469f6d3c8c0f03cb9f51eb2a851d68310c7f90
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Braxton Mckee # # 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 t...
28.065789
76
0.545945
from typed_python import * import typed_python._types as _types from nativepython.runtime import Runtime import unittest import time def Compiled(f): f = Function(f) return Runtime.singleton().compile(f) class TestAlternativeCompilation(unittest.TestCase): def test_simple_alternative_passing(self): ...
true
true
f734f6c742d13b78096f4a33478f826a3c320dcd
1,175
py
Python
tests/utest/test_thresholds.py
wagnerd/robotframework-robocop
a52d5843e953544da61e26df3521b219ccfc344c
[ "Apache-2.0" ]
2
2021-12-22T01:50:52.000Z
2022-01-05T06:32:27.000Z
tests/utest/test_thresholds.py
wagnerd/robotframework-robocop
a52d5843e953544da61e26df3521b219ccfc344c
[ "Apache-2.0" ]
null
null
null
tests/utest/test_thresholds.py
wagnerd/robotframework-robocop
a52d5843e953544da61e26df3521b219ccfc344c
[ "Apache-2.0" ]
1
2021-06-30T11:01:51.000Z
2021-06-30T11:01:51.000Z
import pytest from robocop.rules import RuleSeverity, Rule def get_severity_enum(value): for sev in RuleSeverity: if sev.value == value: return sev return RuleSeverity.INFO def get_message_with_id_sev(rule_id, sev): for char in RuleSeverity: rule_id = rule_id.replace(char.val...
30.921053
98
0.629787
import pytest from robocop.rules import RuleSeverity, Rule def get_severity_enum(value): for sev in RuleSeverity: if sev.value == value: return sev return RuleSeverity.INFO def get_message_with_id_sev(rule_id, sev): for char in RuleSeverity: rule_id = rule_id.replace(char.val...
true
true
f734f7bd14892873b678912da3d43da15dc8efca
654
py
Python
deliravision/torch/models/backbones/__init__.py
delira-dev/vision_torch
d944aa67d319bd63a2add5cb89e8308413943de6
[ "BSD-2-Clause" ]
4
2019-08-03T09:56:50.000Z
2019-09-05T09:32:06.000Z
deliravision/torch/models/backbones/__init__.py
delira-dev/vision_torch
d944aa67d319bd63a2add5cb89e8308413943de6
[ "BSD-2-Clause" ]
23
2019-08-03T14:16:47.000Z
2019-10-22T10:15:10.000Z
deliravision/torch/models/backbones/__init__.py
delira-dev/vision_torch
d944aa67d319bd63a2add5cb89e8308413943de6
[ "BSD-2-Clause" ]
null
null
null
__all__ = [] from .resnet import ResNetTorch from .vgg import VGGTorch from .alexnet import AlexNetTorch from .squeezenet import SqueezeNetTorch from .densenet import DenseNetTorch from .mobilenet import MobileNetV2Torch from .resnext import ResNeXtTorch from .seblocks import SEBasicBlockTorch, SEBottleneckTorch, \ ...
24.222222
61
0.743119
__all__ = [] from .resnet import ResNetTorch from .vgg import VGGTorch from .alexnet import AlexNetTorch from .squeezenet import SqueezeNetTorch from .densenet import DenseNetTorch from .mobilenet import MobileNetV2Torch from .resnext import ResNeXtTorch from .seblocks import SEBasicBlockTorch, SEBottleneckTorch, \ ...
true
true
f734f824d58a2eac60206f7d5648be51ce1cd66b
1,018
py
Python
app/models/user.py
qtdemo1/ibm-ops
29f3d4ba406a1c39a007468977784d6c39f056bb
[ "Apache-2.0" ]
1
2021-09-14T18:40:33.000Z
2021-09-14T18:40:33.000Z
app/models/user.py
qtdemo1/ibm-ops
29f3d4ba406a1c39a007468977784d6c39f056bb
[ "Apache-2.0" ]
7
2021-04-23T13:41:39.000Z
2021-08-12T09:33:10.000Z
app/models/user.py
qtdemo1/ibm-ops
29f3d4ba406a1c39a007468977784d6c39f056bb
[ "Apache-2.0" ]
5
2020-12-10T14:27:23.000Z
2022-03-29T08:44:22.000Z
#!/usr/bin/env python3 # # Copyright 2020 IBM # 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 t...
36.357143
97
0.752456
import sqlalchemy as sql import app.db.base_class as base_class class User(base_class.Base): id = sql.Column('id', sql.Integer, nullable=False, unique=True, index=True, primary_key=True) username = sql.Column(sql.NCHAR(32), nullable=False, index=True, unique=True) hashed_password = sql.Column(sql.S...
true
true
f734f8778bf4b8e5ff157ae685a7c022d954b83a
1,502
py
Python
heat/engine/clients/os/aodh.py
noironetworks/heat
7cdadf1155f4d94cf8f967635b98e4012a7acfb7
[ "Apache-2.0" ]
1
2018-07-04T07:59:26.000Z
2018-07-04T07:59:26.000Z
heat/engine/clients/os/aodh.py
noironetworks/heat
7cdadf1155f4d94cf8f967635b98e4012a7acfb7
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
heat/engine/clients/os/aodh.py
noironetworks/heat
7cdadf1155f4d94cf8f967635b98e4012a7acfb7
[ "Apache-2.0" ]
3
2018-07-19T17:43:37.000Z
2019-11-15T22:13:30.000Z
# # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
30.04
78
0.699734
from aodhclient import client as ac from aodhclient import exceptions from heat.engine.clients import client_plugin CLIENT_NAME = 'aodh' class AodhClientPlugin(client_plugin.ClientPlugin): exceptions_module = exceptions service_types = [ALARMING] = ['alarming'] supported_versions = [V2] = ['2'] ...
true
true
f734f997599f10b45b5a2ef8338f9a454cceefe8
28,143
py
Python
sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py
dmarx/azure-sdk-for-python
86ac35b947c0ed3d5edb1cac03f5ad20a34a6fda
[ "MIT" ]
1
2021-09-07T18:43:20.000Z
2021-09-07T18:43:20.000Z
sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py
dmarx/azure-sdk-for-python
86ac35b947c0ed3d5edb1cac03f5ad20a34a6fda
[ "MIT" ]
2
2021-11-03T06:10:36.000Z
2021-12-01T06:29:39.000Z
sdk/textanalytics/azure-ai-textanalytics/tests/test_recognize_pii_entities_async.py
msyyc/azure-sdk-for-python
e2dba75181f8b4336ae57e75aa391322c12c3123
[ "MIT" ]
null
null
null
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import os import pytest import platform import functools from azure.core.exceptions import HttpResponseError, ClientAuthenticationError from azure.core.c...
45.318841
152
0.656291
import os import pytest import platform import functools from azure.core.exceptions import HttpResponseError, ClientAuthenticationError from azure.core.credentials import AzureKeyCredential from asynctestcase import AsyncTextAnalyticsTest from testcase import GlobalTextAnalyticsAccountPreparer from testcase import Tex...
true
true
f734fad6c40629440b9272bed1e078ca97ba0134
2,276
py
Python
lingvo/core/test_utils_test.py
zhoudoufu/lingvo
bd0f89809942fd0508ff43bd4b6bca1b598220cb
[ "Apache-2.0" ]
null
null
null
lingvo/core/test_utils_test.py
zhoudoufu/lingvo
bd0f89809942fd0508ff43bd4b6bca1b598220cb
[ "Apache-2.0" ]
null
null
null
lingvo/core/test_utils_test.py
zhoudoufu/lingvo
bd0f89809942fd0508ff43bd4b6bca1b598220cb
[ "Apache-2.0" ]
null
null
null
# Lint as: python2, python3 # Copyright 2018 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 # ...
39.241379
80
0.696397
from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf from lingvo.core import test_utils class TestUtilsTest(test_utils.TestCase): def testReplaceGoldenSingleFloat(self): old_line = ' CompareToGoldenSingleFloat(self, 1.489712...
true
true
f734fb6ee9073916872738ef1d419bf8d564a7d0
3,161
py
Python
tests/agents/test_agent_interface.py
garaytc/reinforcement
e6af258bf2ac3b45c20e0ed3d2f58ca7bc2b232f
[ "Apache-2.0" ]
12
2020-05-19T18:58:55.000Z
2021-02-21T20:26:46.000Z
tests/agents/test_agent_interface.py
garaytc/reinforcement
e6af258bf2ac3b45c20e0ed3d2f58ca7bc2b232f
[ "Apache-2.0" ]
39
2020-05-19T18:41:42.000Z
2021-01-16T08:31:06.000Z
tests/agents/test_agent_interface.py
garaytc/reinforcement
e6af258bf2ac3b45c20e0ed3d2f58ca7bc2b232f
[ "Apache-2.0" ]
2
2020-05-19T15:15:04.000Z
2020-05-21T08:45:59.000Z
import pytest import torch from gym.spaces import Discrete, MultiDiscrete, MultiBinary, Dict, Tuple, Box from blobrl.agents import AgentInterface class MOCKAgentInterface(AgentInterface): def __init__(self, observation_space, action_space, device): super().__init__(observation_space, action_space, device...
30.68932
105
0.548561
import pytest import torch from gym.spaces import Discrete, MultiDiscrete, MultiBinary, Dict, Tuple, Box from blobrl.agents import AgentInterface class MOCKAgentInterface(AgentInterface): def __init__(self, observation_space, action_space, device): super().__init__(observation_space, action_space, device...
true
true
f734fc94c2982f19f46721f2e95b37368f72bc2d
385
py
Python
apps/wsgi.py
reimibeta/django-store-item-models
0be5fad0df0b3ebc7283fc6369f0e769a4743987
[ "Apache-2.0" ]
null
null
null
apps/wsgi.py
reimibeta/django-store-item-models
0be5fad0df0b3ebc7283fc6369f0e769a4743987
[ "Apache-2.0" ]
35
2020-10-24T22:14:41.000Z
2022-03-07T10:20:25.000Z
apps/wsgi.py
reimibeta/django-store-item-models
0be5fad0df0b3ebc7283fc6369f0e769a4743987
[ "Apache-2.0" ]
null
null
null
""" WSGI config for apps project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS...
22.647059
78
0.781818
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'apps.settings') application = get_wsgi_application()
true
true
f734fd0b04be2065e704ed64eb67bd4f6f83c3c6
1,745
py
Python
oleander/google.py
honzajavorek/oleander
d4a0dc4c2da1cf2394a5a1b206e5398ad6900bee
[ "ISC" ]
null
null
null
oleander/google.py
honzajavorek/oleander
d4a0dc4c2da1cf2394a5a1b206e5398ad6900bee
[ "ISC" ]
null
null
null
oleander/google.py
honzajavorek/oleander
d4a0dc4c2da1cf2394a5a1b206e5398ad6900bee
[ "ISC" ]
null
null
null
# -*- coding: utf-8 -*- from flask import url_for, request, session from oleander import app from gdata.client import Unauthorized as UnauthorizedError from gdata.gauth import OAuth2Token, Error as ConnectionError, token_to_blob, token_from_blob from gdata.contacts.client import ContactsClient from gdata.calendar.cli...
31.160714
93
0.731232
from flask import url_for, request, session from oleander import app from gdata.client import Unauthorized as UnauthorizedError from gdata.gauth import OAuth2Token, Error as ConnectionError, token_to_blob, token_from_blob from gdata.contacts.client import ContactsClient from gdata.calendar.client import CalendarClien...
true
true
f734fd169d9fe2785174d14db380bf2f369d6039
25,499
py
Python
tests/schemas/test_openapi.py
mrtaalebi/django-rest-framework
d22daf4e05bc670f4ff96d97da5d2a9cf83df6c1
[ "BSD-3-Clause" ]
4
2019-02-11T13:01:34.000Z
2020-10-22T08:39:57.000Z
tests/schemas/test_openapi.py
mrtaalebi/django-rest-framework
d22daf4e05bc670f4ff96d97da5d2a9cf83df6c1
[ "BSD-3-Clause" ]
null
null
null
tests/schemas/test_openapi.py
mrtaalebi/django-rest-framework
d22daf4e05bc670f4ff96d97da5d2a9cf83df6c1
[ "BSD-3-Clause" ]
2
2020-04-24T01:54:08.000Z
2020-06-05T18:37:03.000Z
import pytest from django.conf.urls import url from django.test import RequestFactory, TestCase, override_settings from django.utils.translation import gettext_lazy as _ from rest_framework import filters, generics, pagination, routers, serializers from rest_framework.compat import uritemplate from rest_framework.pars...
34.135207
119
0.553512
import pytest from django.conf.urls import url from django.test import RequestFactory, TestCase, override_settings from django.utils.translation import gettext_lazy as _ from rest_framework import filters, generics, pagination, routers, serializers from rest_framework.compat import uritemplate from rest_framework.pars...
true
true
f734fe34b1e61e45b4b8a3552db35388a603ad0c
376
py
Python
trackme/utils/messages/auth_messages.py
j4l13n/trackMe
aab64060dfed7147a4604b80fe861f990d95a161
[ "MIT" ]
null
null
null
trackme/utils/messages/auth_messages.py
j4l13n/trackMe
aab64060dfed7147a4604b80fe861f990d95a161
[ "MIT" ]
7
2020-08-10T08:20:20.000Z
2020-08-18T07:58:22.000Z
trackme/utils/messages/auth_messages.py
j4l13n/trackMe
aab64060dfed7147a4604b80fe861f990d95a161
[ "MIT" ]
null
null
null
AUTH_SUCCESS_RESPONSES = { "register_success": "You have successfully registered to TrackMe", "login_success": "User logged in successfully" } AUTH_ERROR_RESPONSES = { "register_error": "Something went wrong while creating an account: {}", "invalid_credentials": "Incorrect email or password", "not_...
34.181818
75
0.728723
AUTH_SUCCESS_RESPONSES = { "register_success": "You have successfully registered to TrackMe", "login_success": "User logged in successfully" } AUTH_ERROR_RESPONSES = { "register_error": "Something went wrong while creating an account: {}", "invalid_credentials": "Incorrect email or password", "not_...
true
true
f734fe7fd58f4a3a26a042d8b339ae8dbff991e2
12,657
py
Python
pandas/tests/series/test_alter_axes.py
ivary43/pandas
46adc5b1c2aacb312d72729af72bc0ad600917c0
[ "BSD-3-Clause" ]
1
2020-04-26T17:14:25.000Z
2020-04-26T17:14:25.000Z
pandas/tests/series/test_alter_axes.py
ivary43/pandas
46adc5b1c2aacb312d72729af72bc0ad600917c0
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/series/test_alter_axes.py
ivary43/pandas
46adc5b1c2aacb312d72729af72bc0ad600917c0
[ "BSD-3-Clause" ]
1
2020-01-02T14:28:17.000Z
2020-01-02T14:28:17.000Z
from datetime import datetime import numpy as np import pytest from pandas import DataFrame, Index, MultiIndex, RangeIndex, Series import pandas.util.testing as tm class TestSeriesAlterAxes: def test_setindex(self, string_series): # wrong type msg = (r"Index\(\.\.\.\) must be called with a coll...
36.900875
79
0.555187
from datetime import datetime import numpy as np import pytest from pandas import DataFrame, Index, MultiIndex, RangeIndex, Series import pandas.util.testing as tm class TestSeriesAlterAxes: def test_setindex(self, string_series): msg = (r"Index\(\.\.\.\) must be called with a collection of som...
true
true
f734fee836f525ac79f83d059794cdc10b43ae4a
6,835
py
Python
beagle/transformers/darpa_tc_transformer.py
limkokhian/beagle
791e83db94e5a8ab1965b155bb79d32bb259d2b3
[ "MIT" ]
1,139
2019-03-24T09:09:05.000Z
2022-03-27T14:54:38.000Z
beagle/transformers/darpa_tc_transformer.py
limkokhian/beagle
791e83db94e5a8ab1965b155bb79d32bb259d2b3
[ "MIT" ]
78
2019-03-24T16:56:06.000Z
2022-02-27T21:31:38.000Z
beagle/transformers/darpa_tc_transformer.py
limkokhian/beagle
791e83db94e5a8ab1965b155bb79d32bb259d2b3
[ "MIT" ]
149
2019-03-24T16:44:45.000Z
2022-03-11T12:20:51.000Z
from typing import List, Optional, Tuple, Union from beagle.common import logger, split_path, split_reg_path from beagle.nodes import File, Process, RegistryKey, IPAddress from beagle.transformers.base_transformer import Transformer # Custom Node classes to use the UUID in TC class TCProcess(Process): key_fields...
34.004975
96
0.597952
from typing import List, Optional, Tuple, Union from beagle.common import logger, split_path, split_reg_path from beagle.nodes import File, Process, RegistryKey, IPAddress from beagle.transformers.base_transformer import Transformer class TCProcess(Process): key_fields: List[str] = ["uuid"] uuid: Optional[st...
true
true
f73500cf450e08e25d97f5cb04a26cfa720754d1
2,897
py
Python
rest_framework_tracking/admin.py
Movemeback/drf-api-tracking
3730907eee448917f766aa1d85402e85ed775d0c
[ "0BSD" ]
null
null
null
rest_framework_tracking/admin.py
Movemeback/drf-api-tracking
3730907eee448917f766aa1d85402e85ed775d0c
[ "0BSD" ]
null
null
null
rest_framework_tracking/admin.py
Movemeback/drf-api-tracking
3730907eee448917f766aa1d85402e85ed775d0c
[ "0BSD" ]
null
null
null
import datetime from django.contrib import admin from django.db.models import Count from django.db.models.functions import TruncDay from django.urls import path from django.http import JsonResponse from .app_settings import app_settings from .models import APIRequestLog class APIRequestLogAdmin(admin.ModelAdmin): ...
28.97
85
0.594408
import datetime from django.contrib import admin from django.db.models import Count from django.db.models.functions import TruncDay from django.urls import path from django.http import JsonResponse from .app_settings import app_settings from .models import APIRequestLog class APIRequestLogAdmin(admin.ModelAdmin): ...
true
true
f73500ecce8a3e73abd3291d623dc2f348a5e473
47,456
py
Python
python/GafferArnoldTest/ArnoldRenderTest.py
Tuftux/gaffer
5acaf7cbfadbae841dc06854121ca85dcc5c338c
[ "BSD-3-Clause" ]
31
2017-07-10T10:02:07.000Z
2022-02-08T13:54:14.000Z
python/GafferArnoldTest/ArnoldRenderTest.py
Tuftux/gaffer
5acaf7cbfadbae841dc06854121ca85dcc5c338c
[ "BSD-3-Clause" ]
null
null
null
python/GafferArnoldTest/ArnoldRenderTest.py
Tuftux/gaffer
5acaf7cbfadbae841dc06854121ca85dcc5c338c
[ "BSD-3-Clause" ]
3
2017-11-04T15:30:11.000Z
2018-09-25T18:36:11.000Z
########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that ...
36.364751
141
0.682506
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, import os import inspect import unittest import subprocess32 as subprocess import threading import arnold import imath import six import IECore import IECoreImage import IECoreScene import IECoreArnold import Gaffer import GafferTest impor...
true
true
f73501752e6c23eaebdfdfc652c07fdc952f82a3
1,049
py
Python
tools/generateData_sensor_malfunction.py
Hemankita/refarch-kc-container-ms
c2e85eacabe8a194782835b04f3410c2d7956a9b
[ "Apache-2.0" ]
null
null
null
tools/generateData_sensor_malfunction.py
Hemankita/refarch-kc-container-ms
c2e85eacabe8a194782835b04f3410c2d7956a9b
[ "Apache-2.0" ]
null
null
null
tools/generateData_sensor_malfunction.py
Hemankita/refarch-kc-container-ms
c2e85eacabe8a194782835b04f3410c2d7956a9b
[ "Apache-2.0" ]
null
null
null
import csv import json from random import gauss import random import datetime import numpy as np import sys import pandas as pd df = pd.DataFrame(columns=['Timestamp', 'ID', 'Temperature(celsius)', 'Target_Temperature(celsius)', 'Amp', 'CumulativePowerConsumption', 'ContentType', 'Humidity', 'CO2', 'Time_Door_Open', ...
31.787879
190
0.650143
import csv import json from random import gauss import random import datetime import numpy as np import sys import pandas as pd df = pd.DataFrame(columns=['Timestamp', 'ID', 'Temperature(celsius)', 'Target_Temperature(celsius)', 'Amp', 'CumulativePowerConsumption', 'ContentType', 'Humidity', 'CO2', 'Time_Door_Open', ...
true
true
f73502a0b1963176fdafca20bee31f09321e6c49
542
py
Python
blogengine/manage.py
forgoty/django-blog
2d4c2353d3614be04f06bdb3b713c8339f7e00b5
[ "MIT" ]
null
null
null
blogengine/manage.py
forgoty/django-blog
2d4c2353d3614be04f06bdb3b713c8339f7e00b5
[ "MIT" ]
null
null
null
blogengine/manage.py
forgoty/django-blog
2d4c2353d3614be04f06bdb3b713c8339f7e00b5
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'blogengine.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. A...
33.875
74
0.688192
import os import sys if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'blogengine.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's insta...
true
true
f73503258b60efbb2ff116d604275c8ed287bfee
269
py
Python
helpers/cols.py
ijlyttle/reactivity-demo-dash
93260437a78c257c43cf8ddedefea3acbff4eb66
[ "MIT" ]
null
null
null
helpers/cols.py
ijlyttle/reactivity-demo-dash
93260437a78c257c43cf8ddedefea3acbff4eb66
[ "MIT" ]
1
2022-02-16T10:58:32.000Z
2022-02-19T17:58:17.000Z
helpers/cols.py
ijlyttle/reactivity-demo-dash
93260437a78c257c43cf8ddedefea3acbff4eb66
[ "MIT" ]
null
null
null
import pandas as pd def cols_choice (df, include): return df.select_dtypes(include=include).columns.to_list() def cols_header (data_records): if (len(data_records) == 0): return [] return [{'name': v, 'id': v} for v in data_records[0].keys()]
22.416667
65
0.650558
import pandas as pd def cols_choice (df, include): return df.select_dtypes(include=include).columns.to_list() def cols_header (data_records): if (len(data_records) == 0): return [] return [{'name': v, 'id': v} for v in data_records[0].keys()]
true
true
f7350478178bbe07092ac6792210521df315bc7f
303
py
Python
coding_intereview/1015. Smallest Integer Divisible by K.py
purusharthmalik/Python-Bootcamp
2ed1cf886d1081de200b0fdd4cb4e28008c7e3d1
[ "MIT" ]
2
2020-10-03T16:38:10.000Z
2021-06-03T11:01:59.000Z
coding_intereview/1015. Smallest Integer Divisible by K.py
purusharthmalik/Python-Bootcamp
2ed1cf886d1081de200b0fdd4cb4e28008c7e3d1
[ "MIT" ]
null
null
null
coding_intereview/1015. Smallest Integer Divisible by K.py
purusharthmalik/Python-Bootcamp
2ed1cf886d1081de200b0fdd4cb4e28008c7e3d1
[ "MIT" ]
1
2020-10-03T16:38:02.000Z
2020-10-03T16:38:02.000Z
class Solution: def smallestRepunitDivByK(self, k: int) -> int: if k % 2 == 0 or k % 5 == 0: return -1 if k == 1: return 1 count = 1 n = 1 while (n % k > 0): n = (n % k) * 10 + 1 count += 1 return count
23.307692
51
0.379538
class Solution: def smallestRepunitDivByK(self, k: int) -> int: if k % 2 == 0 or k % 5 == 0: return -1 if k == 1: return 1 count = 1 n = 1 while (n % k > 0): n = (n % k) * 10 + 1 count += 1 return count
true
true
f73505c7a1c27e7bd446ee7783c3f5f7ec32f268
449
py
Python
leetcode/0278_first_bad_version.py
jacquerie/leetcode
a05e6b832eb0e0740aaff7b2eb3109038ad404bf
[ "MIT" ]
3
2018-05-10T09:56:49.000Z
2020-11-07T18:09:42.000Z
leetcode/0278_first_bad_version.py
jacquerie/leetcode
a05e6b832eb0e0740aaff7b2eb3109038ad404bf
[ "MIT" ]
null
null
null
leetcode/0278_first_bad_version.py
jacquerie/leetcode
a05e6b832eb0e0740aaff7b2eb3109038ad404bf
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- def isBadVersion(n): return n >= 3 class Solution: def firstBadVersion(self, n): first, last = 1, n while first <= last: mid = (first + last) // 2 if isBadVersion(mid): last = mid - 1 else: first = m...
17.269231
43
0.494432
def isBadVersion(n): return n >= 3 class Solution: def firstBadVersion(self, n): first, last = 1, n while first <= last: mid = (first + last) // 2 if isBadVersion(mid): last = mid - 1 else: first = mid + 1 return f...
true
true
f735073dd8e4cb97b818e6d3e74a9803c651d4c0
473
py
Python
animal-classifier/__init__.py
xvinay28x/cat_dog_classifier_library
4d56f90f9d3e91051dba71dcdea78930c4ac0e52
[ "MIT" ]
1
2021-05-20T16:44:47.000Z
2021-05-20T16:44:47.000Z
animal-classifier/__init__.py
xvinay28x/cat_dog_classifier_library
4d56f90f9d3e91051dba71dcdea78930c4ac0e52
[ "MIT" ]
null
null
null
animal-classifier/__init__.py
xvinay28x/cat_dog_classifier_library
4d56f90f9d3e91051dba71dcdea78930c4ac0e52
[ "MIT" ]
null
null
null
from tensorflow import keras def classify(path): model = keras.models.load_model("Cat_Dog_Classification.h5") load_image = keras.preprocessing.image.load_image(path,target_size=(200,200)) image_array = keras.preprocessing.image.img_to_array(load_image) reshape_array = image_array.reshape(1,200,200,3) ...
33.785714
81
0.72093
from tensorflow import keras def classify(path): model = keras.models.load_model("Cat_Dog_Classification.h5") load_image = keras.preprocessing.image.load_image(path,target_size=(200,200)) image_array = keras.preprocessing.image.img_to_array(load_image) reshape_array = image_array.reshape(1,200,200,3) ...
true
true
f7350a516a0b79650e657142a36947cc0f4ff3df
558
py
Python
drfstripe/templatetags/payments_tags.py
brandon-fox/django-rest-framework-stripe
883c1c82e64c67d5379460b5f6d2ce79b89b7e85
[ "MIT" ]
null
null
null
drfstripe/templatetags/payments_tags.py
brandon-fox/django-rest-framework-stripe
883c1c82e64c67d5379460b5f6d2ce79b89b7e85
[ "MIT" ]
null
null
null
drfstripe/templatetags/payments_tags.py
brandon-fox/django-rest-framework-stripe
883c1c82e64c67d5379460b5f6d2ce79b89b7e85
[ "MIT" ]
null
null
null
from django import template from ..forms import PlanForm register = template.Library() @register.inclusion_tag("drfstripe/_change_plan_form.html", takes_context=True) def change_plan_form(context): context.update({ "form": PlanForm(initial={ "plan": context["request"].user.customer.current_...
22.32
79
0.700717
from django import template from ..forms import PlanForm register = template.Library() @register.inclusion_tag("drfstripe/_change_plan_form.html", takes_context=True) def change_plan_form(context): context.update({ "form": PlanForm(initial={ "plan": context["request"].user.customer.current_...
true
true
f7350b3ed0632219aec9672fa33d4b3ba534f8ec
299
py
Python
tf_euler/python/euler_ops/type_ops.py
lixusign/euler
c8ce1968367aec2807cc542fcdb5958e3b1b9295
[ "Apache-2.0" ]
1
2019-09-18T02:18:06.000Z
2019-09-18T02:18:06.000Z
tf_euler/python/euler_ops/type_ops.py
DingXiye/euler
c45225119c5b991ca953174f06c2f223562f34c9
[ "Apache-2.0" ]
null
null
null
tf_euler/python/euler_ops/type_ops.py
DingXiye/euler
c45225119c5b991ca953174f06c2f223562f34c9
[ "Apache-2.0" ]
1
2020-09-18T13:37:08.000Z
2020-09-18T13:37:08.000Z
# Copyright 2018 Alibaba Inc. All Rights Conserved from __future__ import absolute_import from __future__ import division from __future__ import print_function import ctypes import os import tensorflow as tf from tf_euler.python.euler_ops import base get_node_type = base._LIB_OP.get_node_type
19.933333
50
0.842809
from __future__ import absolute_import from __future__ import division from __future__ import print_function import ctypes import os import tensorflow as tf from tf_euler.python.euler_ops import base get_node_type = base._LIB_OP.get_node_type
true
true
f7350b819bf2183789b58144d7ef8095f9e3572e
940
py
Python
test/io/testxyzwriter.py
alvarovm/cclib
18a87de7fcb15c4133e1fd21939401672438ebb7
[ "BSD-3-Clause" ]
null
null
null
test/io/testxyzwriter.py
alvarovm/cclib
18a87de7fcb15c4133e1fd21939401672438ebb7
[ "BSD-3-Clause" ]
null
null
null
test/io/testxyzwriter.py
alvarovm/cclib
18a87de7fcb15c4133e1fd21939401672438ebb7
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2016, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Unit tests for writer xyzwriter module.""" import os import unittest import cclib __filedir__ = os.path.dirname(__f...
24.736842
85
0.678723
import os import unittest import cclib __filedir__ = os.path.dirname(__file__) __filepath__ = os.path.realpath(__filedir__) __datadir__ = os.path.join(__filepath__, "..", "..") class XYZTest(unittest.TestCase): def setUp(self): self.XYZ = cclib.io.XYZ def test_init(self): fpath = os.pat...
true
true
f7350bcea3057e9df338ed9f0dbbcc6dfb9d9b74
388
py
Python
featurewiz/__version__.py
hercules261188/featurewiz
b52ab472a76b87440fd2482f315e14c71b4061df
[ "Apache-2.0" ]
1
2021-12-15T17:11:24.000Z
2021-12-15T17:11:24.000Z
featurewiz/__version__.py
hercules261188/featurewiz
b52ab472a76b87440fd2482f315e14c71b4061df
[ "Apache-2.0" ]
null
null
null
featurewiz/__version__.py
hercules261188/featurewiz
b52ab472a76b87440fd2482f315e14c71b4061df
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Specifies the version of the featurewiz package.""" __title__ = "featurewiz" __author__ = "Ram Seshadri" __description__ = "Advanced Feature Engineering and Feature Selection for any data set, any size" __url__ = "https://github.com/Auto_ViML/featurewiz.git" __version__ = "0.0.51" __...
35.272727
98
0.721649
__title__ = "featurewiz" __author__ = "Ram Seshadri" __description__ = "Advanced Feature Engineering and Feature Selection for any data set, any size" __url__ = "https://github.com/Auto_ViML/featurewiz.git" __version__ = "0.0.51" __license__ = "Apache License 2.0" __copyright__ = "2020-21 Google"
true
true
f7350c06e31b0bd40b501e7b2cb33f083a294241
3,426
py
Python
st2reactor/st2reactor/sensor/base.py
saucetray/st2
8f507d6c8d9483c8371e386fe2b7998596856fd7
[ "Apache-2.0" ]
2
2021-08-04T01:04:06.000Z
2021-08-04T01:04:08.000Z
st2reactor/st2reactor/sensor/base.py
saucetray/st2
8f507d6c8d9483c8371e386fe2b7998596856fd7
[ "Apache-2.0" ]
1
2022-03-31T03:53:22.000Z
2022-03-31T03:53:22.000Z
st2reactor/st2reactor/sensor/base.py
saucetray/st2
8f507d6c8d9483c8371e386fe2b7998596856fd7
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Extreme Networks, 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 agreed to i...
24.297872
90
0.626678
from __future__ import absolute_import import abc import six from st2common.util import concurrency __all__ = [ 'Sensor', 'PollingSensor' ] @six.add_metaclass(abc.ABCMeta) class BaseSensor(object): def __init__(self, sensor_service, config=None): self._sensor_service = sensor_service ...
true
true
f7350c2587fbe9b2c791461b60f362d4107f7172
1,470
py
Python
config.py
crazynayan/tpf2
3552163a1dab7cd5e371d752a2651e73e8cd8e1e
[ "MIT" ]
null
null
null
config.py
crazynayan/tpf2
3552163a1dab7cd5e371d752a2651e73e8cd8e1e
[ "MIT" ]
2
2021-03-23T02:46:31.000Z
2021-08-04T07:39:45.000Z
config.py
crazynayan/tpf2
3552163a1dab7cd5e371d752a2651e73e8cd8e1e
[ "MIT" ]
null
null
null
import os from base64 import b64encode from socket import gethostname, gethostbyname class Config: SECRET_KEY = os.environ.get("SECRET_KEY") or b64encode(os.urandom(24)).decode() SERVER_URL = os.environ.get("SERVER_URL") or f"http://{gethostbyname(gethostname())}:8000" CI_SECURITY = True if os.environ.get...
38.684211
118
0.538776
import os from base64 import b64encode from socket import gethostname, gethostbyname class Config: SECRET_KEY = os.environ.get("SECRET_KEY") or b64encode(os.urandom(24)).decode() SERVER_URL = os.environ.get("SERVER_URL") or f"http://{gethostbyname(gethostname())}:8000" CI_SECURITY = True if os.environ.get...
true
true
f7350d119267fcf4c70bb61c659559abce247fcd
4,441
py
Python
FastStyleTransfer/utils.py
ericlearning/style-transfer
f387515b4ffe441c4677400a65b9e7fdb50c979f
[ "MIT" ]
1
2019-05-29T03:34:37.000Z
2019-05-29T03:34:37.000Z
FastStyleTransfer/utils.py
ericlearning/style-transfer
f387515b4ffe441c4677400a65b9e7fdb50c979f
[ "MIT" ]
null
null
null
FastStyleTransfer/utils.py
ericlearning/style-transfer
f387515b4ffe441c4677400a65b9e7fdb50c979f
[ "MIT" ]
null
null
null
import os import glob import torch import pandas as pd import seaborn as sn import torch.nn as nn import torch.optim as optim import matplotlib.pyplot as plt from torch.optim.lr_scheduler import _LRScheduler from sklearn.metrics import confusion_matrix from PIL import Image def set_lr(optimizer, lrs): if(len(lrs) == ...
27.41358
91
0.72236
import os import glob import torch import pandas as pd import seaborn as sn import torch.nn as nn import torch.optim as optim import matplotlib.pyplot as plt from torch.optim.lr_scheduler import _LRScheduler from sklearn.metrics import confusion_matrix from PIL import Image def set_lr(optimizer, lrs): if(len(lrs) == ...
true
true
f7350d55eb323216182562c19c57df83c0186aa7
12,830
py
Python
proteome_count/search_proteome.py
ProteinsWebTeam/interpro-pfam-curation-tools
41df7e4ad390ace8c68f137e582b6bd2bfe4b23a
[ "MIT" ]
null
null
null
proteome_count/search_proteome.py
ProteinsWebTeam/interpro-pfam-curation-tools
41df7e4ad390ace8c68f137e582b6bd2bfe4b23a
[ "MIT" ]
null
null
null
proteome_count/search_proteome.py
ProteinsWebTeam/interpro-pfam-curation-tools
41df7e4ad390ace8c68f137e582b6bd2bfe4b23a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ @author T. Paysan-Lafosse @brief This script searches unintegrated proteins for a given organism or taxid in InterPro signatures, if they are not found in signatures, they are clustered based on UniRef clusters @arguments [-u USER]: database user [-p PASSWORD]: database...
40.345912
171
0.60304
import argparse import os import sys from pathlib import Path import requests from utils import proteome class protein_pipeline(proteome): def __init__(self): super().__init__() self.uniref50 = dict() self.clusters = dict() def get_integrated(self, protein_list): print("Se...
true
true
f7350ddc02325562c929b5462b8300547041db9d
1,789
py
Python
scraper_test.py
svennickel/itunes-app-scraper
14b857bd40a237825cb6bd93be388e6bcd083c01
[ "MIT" ]
10
2020-08-12T06:47:04.000Z
2021-12-04T03:06:19.000Z
scraper_test.py
svennickel/itunes-app-scraper
14b857bd40a237825cb6bd93be388e6bcd083c01
[ "MIT" ]
5
2020-11-19T07:53:19.000Z
2022-03-16T15:06:37.000Z
scraper_test.py
iaine/itunes-app-scraper
de60c8c0b369e78d4c87a0cb11284b2ef576c090
[ "MIT" ]
11
2020-08-12T06:47:31.000Z
2022-03-19T23:36:18.000Z
from itunes_app_scraper.scraper import AppStoreScraper from itunes_app_scraper.util import AppStoreException, AppStoreCollections, AppStoreCategories, AppStoreUtils import json import pytest import os def test_term_no_exception(): scraper = AppStoreScraper() results = scraper.get_app_ids_for_query("mindful", ...
34.403846
109
0.731694
from itunes_app_scraper.scraper import AppStoreScraper from itunes_app_scraper.util import AppStoreException, AppStoreCollections, AppStoreCategories, AppStoreUtils import json import pytest import os def test_term_no_exception(): scraper = AppStoreScraper() results = scraper.get_app_ids_for_query("mindful", ...
true
true
f7350e589e89dd1abef4cd35a2f99c754386137d
4,190
py
Python
tests/DatastoreTests.py
erasmospunk/pychohistory
71b2bd35578fea9bb6603c017a41c036644b3d85
[ "MIT" ]
1
2015-02-12T02:05:20.000Z
2015-02-12T02:05:20.000Z
tests/DatastoreTests.py
erasmospunk/pychohistory
71b2bd35578fea9bb6603c017a41c036644b3d85
[ "MIT" ]
null
null
null
tests/DatastoreTests.py
erasmospunk/pychohistory
71b2bd35578fea9bb6603c017a41c036644b3d85
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import datetime import logging import unittest import os import shutil from modules import Datastore, GoogSuggestMe __author__ = 'Giannis Dzegoutanis' TEMP_FOLDER = u'tmp' TEST_DATABASE = u'testdatastore.tmp' TEST_QUERY = u'test' module_name = u'test_modu...
32.230769
88
0.670883
from datetime import datetime import logging import unittest import os import shutil from modules import Datastore, GoogSuggestMe __author__ = 'Giannis Dzegoutanis' TEMP_FOLDER = u'tmp' TEST_DATABASE = u'testdatastore.tmp' TEST_QUERY = u'test' module_name = u'test_module' module_signature = (module_name, ...
true
true
f7350e66a3ad1c6722e41a833fd5c41b04536a0d
31
py
Python
fcsgg/__init__.py
liuhengyue/fcsgg
826c6e194270461a66ca5d048cb67f1ccf7ef387
[ "MIT" ]
9
2022-01-17T03:27:46.000Z
2022-03-26T09:35:59.000Z
fcsgg/__init__.py
liuhengyue/fcsgg
826c6e194270461a66ca5d048cb67f1ccf7ef387
[ "MIT" ]
3
2022-01-26T03:28:18.000Z
2022-02-03T04:19:29.000Z
fcsgg/__init__.py
liuhengyue/fcsgg
826c6e194270461a66ca5d048cb67f1ccf7ef387
[ "MIT" ]
null
null
null
from .modeling import meta_arch
31
31
0.870968
from .modeling import meta_arch
true
true
f7350e908e65de4d2b166767ea22ffebc316a256
670
py
Python
p007.py
pbgnz/project-euler
8ab4549101f7a3ac2a478eb6193b2b67920c8102
[ "MIT" ]
null
null
null
p007.py
pbgnz/project-euler
8ab4549101f7a3ac2a478eb6193b2b67920c8102
[ "MIT" ]
1
2021-04-13T12:47:07.000Z
2021-04-14T20:27:04.000Z
p007.py
escobot/project-euler
8ab4549101f7a3ac2a478eb6193b2b67920c8102
[ "MIT" ]
null
null
null
# 10001st prime # Problem 7 # By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, # we can see that the 6th prime is 13. # What is the 10 001st prime number? # as of solving this challenge the largest prime number known is 24,862,048 def is_prime(n): i = 2 while i*i <= n: if n % i == 0: ...
18.611111
75
0.570149
def is_prime(n): i = 2 while i*i <= n: if n % i == 0: return False i = i + 1 return True def solution(nth): count = 1 prime = 0 while prime != nth: count = count + 1 if is_prime(count): prime = prime + 1 return count def main(): ...
true
true
f7350f87740d3150f4219cff8545678e6ec86cf2
537
py
Python
randoms_products/main.py
pechuga22/services-kiero
73ab9ac847fdbf3970e40d3d15098be38af924ca
[ "MIT" ]
null
null
null
randoms_products/main.py
pechuga22/services-kiero
73ab9ac847fdbf3970e40d3d15098be38af924ca
[ "MIT" ]
null
null
null
randoms_products/main.py
pechuga22/services-kiero
73ab9ac847fdbf3970e40d3d15098be38af924ca
[ "MIT" ]
null
null
null
from flask import Flask, json import pyodbc conn = pyodbc.connect('DRIVER={PostgreSQL Unicode};SERVER=10.4.28.183;DATABASE=postgres;UID=postgres;PWD=developer2020') app = Flask(__name__) def random_products(conn): cnxn = conn.cursor() cnxn.execute('select categoryid, name from categories c where parentid is...
21.48
120
0.692737
from flask import Flask, json import pyodbc conn = pyodbc.connect('DRIVER={PostgreSQL Unicode};SERVER=10.4.28.183;DATABASE=postgres;UID=postgres;PWD=developer2020') app = Flask(__name__) def random_products(conn): cnxn = conn.cursor() cnxn.execute('select categoryid, name from categories c where parentid is...
true
true
f7350f891078f1e15ec28d2c4dc4c9392e366653
125
py
Python
libalgopy/common/enums/algorithm_type.py
PotapenkoOleg/libalgopy
ac625c0f874918c1967218c302c6fcb200db0271
[ "MIT" ]
null
null
null
libalgopy/common/enums/algorithm_type.py
PotapenkoOleg/libalgopy
ac625c0f874918c1967218c302c6fcb200db0271
[ "MIT" ]
null
null
null
libalgopy/common/enums/algorithm_type.py
PotapenkoOleg/libalgopy
ac625c0f874918c1967218c302c6fcb200db0271
[ "MIT" ]
null
null
null
from enum import Enum class AlgorithmType(Enum): ITERATIVE = 1 RECURSIVE = 2 if __name__ == '__main__': pass
11.363636
26
0.656
from enum import Enum class AlgorithmType(Enum): ITERATIVE = 1 RECURSIVE = 2 if __name__ == '__main__': pass
true
true
f7350f8b72cb5a0b0bbab3f89585cc7c5b06e0fb
8,012
py
Python
configs/dcn/cascade_mask_rcnn_dconv_c3-c5_r50_fpn_1x.py
mrsempress/mmdetection
cb650560c97a2fe56a9b369a1abc8ec17e06583a
[ "Apache-2.0" ]
null
null
null
configs/dcn/cascade_mask_rcnn_dconv_c3-c5_r50_fpn_1x.py
mrsempress/mmdetection
cb650560c97a2fe56a9b369a1abc8ec17e06583a
[ "Apache-2.0" ]
null
null
null
configs/dcn/cascade_mask_rcnn_dconv_c3-c5_r50_fpn_1x.py
mrsempress/mmdetection
cb650560c97a2fe56a9b369a1abc8ec17e06583a
[ "Apache-2.0" ]
null
null
null
# model settings model = dict( type='CascadeRCNN', num_stages=3, pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, style='pytorch', dcn=dict( type='DCN'...
31.920319
78
0.552047
model = dict( type='CascadeRCNN', num_stages=3, pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, out_indices=(0, 1, 2, 3), frozen_stages=1, style='pytorch', dcn=dict( type='DCN', deformable_grou...
true
true
f735108b6b0b94d4460d9293d1b15b476e83e94e
4,419
py
Python
Complement.py
Eltoney/Boolean-Algebra
0607f7efb69c82fdf9508c101e05202cfc7a1a21
[ "MIT" ]
1
2020-02-29T22:03:09.000Z
2020-02-29T22:03:09.000Z
Complement.py
Eltoney/Boolean-Algebra
0607f7efb69c82fdf9508c101e05202cfc7a1a21
[ "MIT" ]
null
null
null
Complement.py
Eltoney/Boolean-Algebra
0607f7efb69c82fdf9508c101e05202cfc7a1a21
[ "MIT" ]
null
null
null
def comp_9th(n): """takes a decimal number (n) in string fomat returns the 9's complement of the number""" n=str(n) result=[] for digit in n: a=str(9-int(digit)) result.append(a) return "".join(result) def comp_1st(n): """takes a binary number (n) in string fomat ...
30.475862
76
0.577959
def comp_9th(n): n=str(n) result=[] for digit in n: a=str(9-int(digit)) result.append(a) return "".join(result) def comp_1st(n): n=str(n) result=[] for digit in n: a=str(1-int(digit)) result.append(a) return "".join(result) def comp_2nd(n): n=str(n) ...
true
true
f73510985a441443661c53bc3bebf97b0cc9972d
5,249
py
Python
scripts/maintenance/make_i18n_dict.py
anisayari/pywikibot
af470904ce62cedae63d285ca15146e9168a0ee6
[ "MIT" ]
3
2019-02-14T13:59:34.000Z
2021-11-08T09:23:03.000Z
scripts/maintenance/make_i18n_dict.py
anisayari/pywikibot
af470904ce62cedae63d285ca15146e9168a0ee6
[ "MIT" ]
null
null
null
scripts/maintenance/make_i18n_dict.py
anisayari/pywikibot
af470904ce62cedae63d285ca15146e9168a0ee6
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ Generate a i18n file from a given script. run IDLE at topmost level: >>> import pwb >>> from scripts.maintenance.make_i18n_dict import i18nBot >>> bot = i18nBot('<scriptname>', '<msg dict>') >>> bot.run() If you have more than one message dictionary, give all these names...
32.602484
80
0.536293
from __future__ import absolute_import, print_function, unicode_literals import codecs import json import os from pywikibot import config class i18nBot(object): def __init__(self, script, *args, **kwargs): modules = script.split('.') self.scriptname = modules[0] self.script = __import...
true
true
f7351112411b3e19d17758b77c9516a3e645b2f5
1,454
py
Python
app/views.py
rdelfin/zork-cortana
b1c8671502edb17417e79b0b9c6ee132b7769707
[ "Apache-2.0" ]
null
null
null
app/views.py
rdelfin/zork-cortana
b1c8671502edb17417e79b0b9c6ee132b7769707
[ "Apache-2.0" ]
null
null
null
app/views.py
rdelfin/zork-cortana
b1c8671502edb17417e79b0b9c6ee132b7769707
[ "Apache-2.0" ]
null
null
null
from flask import render_template, send_from_directory, request, jsonify from app import app import hashlib, uuid import game from app import __config__ as config def compare_password(password, correct_hash): """ Compares password with hash """ hashed_password = hashlib.sha512(password).hexdigest() ...
30.93617
85
0.670564
from flask import render_template, send_from_directory, request, jsonify from app import app import hashlib, uuid import game from app import __config__ as config def compare_password(password, correct_hash): hashed_password = hashlib.sha512(password).hexdigest() return hashed_password == correct_hash @app...
true
true
f73511cdee490faea5847952fef23d5660145c4b
3,756
py
Python
project/app.py
civicmapper/flush-the-toilet
94eea064156cff2729bb76da40484870f341e087
[ "MIT" ]
null
null
null
project/app.py
civicmapper/flush-the-toilet
94eea064156cff2729bb76da40484870f341e087
[ "MIT" ]
14
2018-09-06T20:03:17.000Z
2022-02-12T02:55:44.000Z
project/app.py
civicmapper/flush-the-toilet
94eea064156cff2729bb76da40484870f341e087
[ "MIT" ]
4
2018-04-10T18:44:36.000Z
2019-08-14T19:16:49.000Z
#----------------------------------------------------------------------------# # APP CONFIGURATION #----------------------------------------------------------------------------# # standard library imports import os import logging from logging import Formatter, FileHandler import json # dependencies import requests fr...
30.536585
88
0.563099
import os import logging from logging import Formatter, FileHandler import json import requests from flask import Flask, render_template, request, make_response, session, jsonify app = Flask(__name__) app.config.from_pyfile('config.py') def get_ags_token(url,username,password,client,referer,session,token_name): ...
true
true
f735125056ef23768727c335713c992eb7fdb73d
666
py
Python
algorithms-implementation/07-next-permutation.py
palash24/algorithms-and-data-structures
164be7d1a501a21af808673888964bbab36243a1
[ "MIT" ]
23
2018-11-06T03:54:00.000Z
2022-03-14T13:30:40.000Z
algorithms-implementation/07-next-permutation.py
palash24/algorithms-and-data-structures
164be7d1a501a21af808673888964bbab36243a1
[ "MIT" ]
null
null
null
algorithms-implementation/07-next-permutation.py
palash24/algorithms-and-data-structures
164be7d1a501a21af808673888964bbab36243a1
[ "MIT" ]
5
2019-05-24T16:56:45.000Z
2022-03-10T17:29:10.000Z
# Next permutation def nextPermutation(self, n: int) -> int: digits = list(str(n)) i, j = len(digits)-2, len(digits)-1 # Find the first digit that is smaller than the digit next to it while i >= 0 and digits[i] >= digits[i+1]: i -= 1 # If not found, then all digits are in descending or...
27.75
73
0.576577
def nextPermutation(self, n: int) -> int: digits = list(str(n)) i, j = len(digits)-2, len(digits)-1 while i >= 0 and digits[i] >= digits[i+1]: i -= 1 if i == -1: return -1 while digits[j] <= digits[i]: j -= 1 digits[i], digits[j] = digits[j], digits[i] ...
true
true
f735125479877e8418887aaff7cdd661b3e358a6
1,385
py
Python
awwards/migrations/0002_projects.py
RonaldKiprotich/Awwards-clone
ba5182a174c741c62c621f739653ef964d6d9a95
[ "MIT" ]
null
null
null
awwards/migrations/0002_projects.py
RonaldKiprotich/Awwards-clone
ba5182a174c741c62c621f739653ef964d6d9a95
[ "MIT" ]
null
null
null
awwards/migrations/0002_projects.py
RonaldKiprotich/Awwards-clone
ba5182a174c741c62c621f739653ef964d6d9a95
[ "MIT" ]
null
null
null
# Generated by Django 3.1.3 on 2020-11-28 15:05 import cloudinary.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(setting...
38.472222
146
0.615884
import cloudinary.models from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('awwards', '0001_in...
true
true
f735140f1db1f3e9d4edfbb49f834603e20cc8dc
2,097
py
Python
server/api/socket/room.py
hktrpg/PlanarAlly
ec2db6d53a619a9629e40f1ed755b2ef97f128bd
[ "MIT" ]
null
null
null
server/api/socket/room.py
hktrpg/PlanarAlly
ec2db6d53a619a9629e40f1ed755b2ef97f128bd
[ "MIT" ]
1
2020-11-28T05:00:28.000Z
2020-11-28T05:00:28.000Z
server/api/socket/room.py
tom-vanbraband-sonarsource/PlanarAlly
2a0c457148f344d2669f50958bcb7c53a49ee600
[ "MIT" ]
null
null
null
import uuid import auth from api.socket.constants import GAME_NS from app import app, sio from models import PlayerRoom from models.role import Role from state.game import game_state from utils import logger @sio.on("Room.Info.InviteCode.Refresh", namespace=GAME_NS) @auth.login_required(app, sio) async def refresh_i...
28.337838
85
0.688126
import uuid import auth from api.socket.constants import GAME_NS from app import app, sio from models import PlayerRoom from models.role import Role from state.game import game_state from utils import logger @sio.on("Room.Info.InviteCode.Refresh", namespace=GAME_NS) @auth.login_required(app, sio) async def refresh_i...
true
true
f7351474b7727c1e9c5ecc3ec37ae3ed1a4c6fc3
1,003
py
Python
coral/metrics/rolling.py
coralproject/atoll
2b62b37d3a320480264c4a0242532aad99c338ec
[ "Apache-2.0" ]
12
2016-01-09T17:47:05.000Z
2022-02-09T18:09:41.000Z
coral/metrics/rolling.py
coralproject/atoll
2b62b37d3a320480264c4a0242532aad99c338ec
[ "Apache-2.0" ]
16
2016-01-05T15:49:31.000Z
2016-08-04T20:59:15.000Z
coral/metrics/rolling.py
coralproject/atoll
2b62b37d3a320480264c4a0242532aad99c338ec
[ "Apache-2.0" ]
1
2016-04-06T16:00:32.000Z
2016-04-06T16:00:32.000Z
def extract_history(input): """extract the past metrics""" prev = input['prev'] prev['prev'] = True return input['_id'], prev def extract_update(input): """extract the update data, from which we compute new metrics""" update = input['update'] update['_id'] = input['_id'] return update ...
24.463415
68
0.582253
def extract_history(input): prev = input['prev'] prev['prev'] = True return input['_id'], prev def extract_update(input): update = input['update'] update['_id'] = input['_id'] return update def rolling_score(d1, d2, alpha=0.5): if 'prev' in d1 and d1['prev']: prev, update = ...
true
true
f73516171c98e7efa8128a56815f237e9da700a4
358
py
Python
tag.py
shimayu22/ImageCodeGeneration
9d9d06349818c9a2f65c31c9c28c454e48fae827
[ "MIT" ]
null
null
null
tag.py
shimayu22/ImageCodeGeneration
9d9d06349818c9a2f65c31c9c28c454e48fae827
[ "MIT" ]
null
null
null
tag.py
shimayu22/ImageCodeGeneration
9d9d06349818c9a2f65c31c9c28c454e48fae827
[ "MIT" ]
null
null
null
import pyperclip while True: print("input URL(end:n)") photo_url = input(">> ") if photo_url == "n": break paste_code = "<span itemtype=\"http://schema.org/Photograph\" itemscope=\"itemscope\"><img class=\"magnifiable\" src=\"{}\" itemprop=\"image\"></span>".format(photo_url) pyperclip.c...
25.571429
173
0.634078
import pyperclip while True: print("input URL(end:n)") photo_url = input(">> ") if photo_url == "n": break paste_code = "<span itemtype=\"http://schema.org/Photograph\" itemscope=\"itemscope\"><img class=\"magnifiable\" src=\"{}\" itemprop=\"image\"></span>".format(photo_url) pyperclip.c...
true
true
f7351619d814e5f964a3f9f454c3fbb1599c76d1
9,744
py
Python
tests/__init__.py
murali-chevuri/cachetools
ab9e8af0d506759332a2d1a5ae9d36feae844fda
[ "MIT" ]
null
null
null
tests/__init__.py
murali-chevuri/cachetools
ab9e8af0d506759332a2d1a5ae9d36feae844fda
[ "MIT" ]
null
null
null
tests/__init__.py
murali-chevuri/cachetools
ab9e8af0d506759332a2d1a5ae9d36feae844fda
[ "MIT" ]
null
null
null
import unittest class CacheTestMixin: Cache = None def test_defaults(self): cache = self.Cache(maxsize=1) self.assertEqual(0, len(cache)) self.assertEqual(1, cache.maxsize) self.assertEqual(0, cache.currsize) self.assertEqual(1, cache.getsizeof(None)) self.ass...
32.158416
74
0.589491
import unittest class CacheTestMixin: Cache = None def test_defaults(self): cache = self.Cache(maxsize=1) self.assertEqual(0, len(cache)) self.assertEqual(1, cache.maxsize) self.assertEqual(0, cache.currsize) self.assertEqual(1, cache.getsizeof(None)) self.ass...
true
true
f735177289b7dc8e9e0f4ca915f735688faed056
2,039
py
Python
cpp/src/experiments/generate_csv.py
chathurawidanage/cylon
ac61b7a50880138fe67de21adee208016a94979a
[ "Apache-2.0" ]
null
null
null
cpp/src/experiments/generate_csv.py
chathurawidanage/cylon
ac61b7a50880138fe67de21adee208016a94979a
[ "Apache-2.0" ]
null
null
null
cpp/src/experiments/generate_csv.py
chathurawidanage/cylon
ac61b7a50880138fe67de21adee208016a94979a
[ "Apache-2.0" ]
null
null
null
## # 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 # distributed under the...
39.980392
98
0.672388
import numpy as np import pandas as pd import argparse parser = argparse.ArgumentParser(description='generate random data') parser.add_argument('-o', dest='output', type=str, help='output file', default='/tmp/csv.csv') parser.add_argument('-r', dest='rows', type=int, help='number of rows', default=10) parser.add_argu...
true
true
f73517992385749a8a4ce2a60897e50b2bd2fdc3
4,189
py
Python
bibclean/utils/doi_tools.py
Svdvoort/BibClean
0d891d0dc0d0b335afdf3a09f4df6103d1e96215
[ "MIT" ]
null
null
null
bibclean/utils/doi_tools.py
Svdvoort/BibClean
0d891d0dc0d0b335afdf3a09f4df6103d1e96215
[ "MIT" ]
218
2020-11-20T08:20:01.000Z
2022-03-28T19:21:18.000Z
bibclean/utils/doi_tools.py
Svdvoort/BibClean
0d891d0dc0d0b335afdf3a09f4df6103d1e96215
[ "MIT" ]
null
null
null
import bibclean.utils.cleaning as cleaner import bibclean.utils.formatting as formatter import bibclean.config.constants as constants from bibtexparser.customization import splitname from Levenshtein import distance as levenshtein_distance import requests from crossref.restful import Works, Etiquette import bibclean.cr...
34.056911
91
0.664598
import bibclean.utils.cleaning as cleaner import bibclean.utils.formatting as formatter import bibclean.config.constants as constants from bibtexparser.customization import splitname from Levenshtein import distance as levenshtein_distance import requests from crossref.restful import Works, Etiquette import bibclean.cr...
true
true
f735181a126708262e7d44866f853497400b4e62
5,248
py
Python
reid/utils/evaluation_metrics/retrieval.py
ZoRoronoa/Camera-Aware-Proxy
352f900bbae330f18c2bfe2b3f2516fb4e31adea
[ "Apache-2.0" ]
37
2021-02-05T11:49:17.000Z
2022-03-13T15:42:40.000Z
reid/utils/evaluation_metrics/retrieval.py
ZoRoronoa/Camera-Aware-Proxy
352f900bbae330f18c2bfe2b3f2516fb4e31adea
[ "Apache-2.0" ]
7
2021-03-30T01:33:40.000Z
2022-03-24T07:54:33.000Z
reid/utils/evaluation_metrics/retrieval.py
ZoRoronoa/Camera-Aware-Proxy
352f900bbae330f18c2bfe2b3f2516fb4e31adea
[ "Apache-2.0" ]
9
2021-03-06T02:43:55.000Z
2022-03-26T07:32:19.000Z
import numpy as np from sklearn import metrics as sk_metrics import torch class PersonReIDMAP: ''' Compute Rank@k and mean Average Precision (mAP) scores Used for Person ReID Test on MarKet and Duke ''' def __init__(self, query_feature, query_cam, query_label, gallery_feature, gallery_cam, gal...
34.754967
123
0.59032
import numpy as np from sklearn import metrics as sk_metrics import torch class PersonReIDMAP: def __init__(self, query_feature, query_cam, query_label, gallery_feature, gallery_cam, gallery_label, dist): self.query_feature = query_feature self.query_cam = query_cam self.query_label = que...
true
true
f73518b051d1cc9646ebc5039c4ebb6aa6cbfa1f
2,550
py
Python
demo/voice/main.py
fatash89/atom
12846c8a3f936ae6c83e7e7b1d2dbb896e63fe66
[ "Apache-2.0" ]
64
2019-04-01T20:32:07.000Z
2021-11-24T17:12:03.000Z
demo/voice/main.py
elementary-robotics/atom
36aea078c0e029f03e7b9b4768729a683fb32a88
[ "Apache-2.0" ]
291
2019-04-01T22:54:31.000Z
2022-03-31T21:48:47.000Z
demo/voice/main.py
fatash89/atom
12846c8a3f936ae6c83e7e7b1d2dbb896e63fe66
[ "Apache-2.0" ]
5
2019-06-27T22:42:54.000Z
2022-02-01T23:00:37.000Z
# atombot.py import time from atom import Element PUBLISH_FREQUENCY = 100 TIME_FOR_WAVEFORM = 5 if __name__ == "__main__": element = Element("voice_demo") # Wait for the record element to start up and launch the VNC. # this can and should be fixed with a heartbeat! time.sleep(10) # Start the...
30.722892
82
0.512549
import time from atom import Element PUBLISH_FREQUENCY = 100 TIME_FOR_WAVEFORM = 5 if __name__ == "__main__": element = Element("voice_demo") time.sleep(10) data = { "name": "example", "t": TIME_FOR_WAVEFORM, "perm": False, "e": "waveform", "s": "ser...
true
true
f73518eb606b9fa6212405aa5f35e08518d35b0a
3,468
py
Python
tests/test_geointerface.py
tfardet/Shapely
462de3aa7a8bbd80408762a2d5aaf84b04476e4d
[ "BSD-3-Clause" ]
189
2021-12-10T17:43:54.000Z
2022-03-30T22:03:02.000Z
tests/test_geointerface.py
tfardet/Shapely
462de3aa7a8bbd80408762a2d5aaf84b04476e4d
[ "BSD-3-Clause" ]
133
2021-12-10T16:28:25.000Z
2022-03-31T21:22:58.000Z
tests/test_geointerface.py
tfardet/Shapely
462de3aa7a8bbd80408762a2d5aaf84b04476e4d
[ "BSD-3-Clause" ]
19
2021-12-17T14:42:17.000Z
2022-03-15T08:25:02.000Z
from . import unittest, shapely20_deprecated import pytest from shapely.geometry import shape from shapely.geometry.multipoint import MultiPoint from shapely.geometry.linestring import LineString from shapely.geometry.multilinestring import MultiLineString from shapely.geometry.polygon import LinearRing, Polygon from...
34.68
79
0.542388
from . import unittest, shapely20_deprecated import pytest from shapely.geometry import shape from shapely.geometry.multipoint import MultiPoint from shapely.geometry.linestring import LineString from shapely.geometry.multilinestring import MultiLineString from shapely.geometry.polygon import LinearRing, Polygon from...
true
true
f7351a8ea86926ad65c06a83f4fd64019da7bcb8
1,300
py
Python
stackhpc_monasca_agent_plugins/detection/nvidia.py
stackhpc/monasca-agent-plugins
55687c0337e060d67feb76497d943842f720efb2
[ "Apache-2.0" ]
2
2018-08-16T12:37:37.000Z
2021-03-02T13:59:57.000Z
stackhpc_monasca_agent_plugins/detection/nvidia.py
stackhpc/monasca-agent-plugins
55687c0337e060d67feb76497d943842f720efb2
[ "Apache-2.0" ]
9
2018-01-05T13:57:22.000Z
2021-09-11T04:32:24.000Z
stackhpc_monasca_agent_plugins/detection/nvidia.py
stackhpc/monasca-agent-plugins
55687c0337e060d67feb76497d943842f720efb2
[ "Apache-2.0" ]
3
2020-06-17T16:05:10.000Z
2021-09-15T14:28:36.000Z
# Copyright (c) 2018 StackHPC 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 applicable law or agreed to in wr...
31.707317
75
0.686154
import logging import subprocess import monasca_setup.agent_config import monasca_setup.detection LOG = logging.getLogger(__name__) class NvidiaDetect(monasca_setup.detection.Plugin): def _detect(self): self.available = False if 'nvidia' not in subprocess.check_output( ["lshw",...
true
true
f7351c8dea221062879ca07266ee91556e630dd2
26
py
Python
__init__.py
nipunnmalhotra/nipunn_IQR
24a08cf00a41cd938a7c9a31c781efc8ce9359ed
[ "MIT" ]
null
null
null
__init__.py
nipunnmalhotra/nipunn_IQR
24a08cf00a41cd938a7c9a31c781efc8ce9359ed
[ "MIT" ]
null
null
null
__init__.py
nipunnmalhotra/nipunn_IQR
24a08cf00a41cd938a7c9a31c781efc8ce9359ed
[ "MIT" ]
null
null
null
import nipunn_IQR.outliers
26
26
0.923077
import nipunn_IQR.outliers
true
true
f7351cf30e51503e4f8f41dd8d9d62a6f16bb53b
190
py
Python
test.py
amysudarat/KaggleProject
319b6644cb7c45674c0b2fc69ab23c317b64d644
[ "MIT" ]
null
null
null
test.py
amysudarat/KaggleProject
319b6644cb7c45674c0b2fc69ab23c317b64d644
[ "MIT" ]
null
null
null
test.py
amysudarat/KaggleProject
319b6644cb7c45674c0b2fc69ab23c317b64d644
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- print("Hello Mikel") print("test") print("working on amy branch") print(" Hello this is mikel. SO i created a branche and i want to be sure i did the right thing")
23.75
97
0.678947
print("Hello Mikel") print("test") print("working on amy branch") print(" Hello this is mikel. SO i created a branche and i want to be sure i did the right thing")
true
true
f7351ed173149466d0046eb2e9cd4948e1478441
3,936
py
Python
src/rewriter/gen_reading_correction_data.py
dancerj/mozc
a5a4927c1f709d2ff0c681585c746f73a434e4c9
[ "BSD-3-Clause" ]
null
null
null
src/rewriter/gen_reading_correction_data.py
dancerj/mozc
a5a4927c1f709d2ff0c681585c746f73a434e4c9
[ "BSD-3-Clause" ]
1
2021-06-30T14:59:51.000Z
2021-06-30T15:31:56.000Z
src/rewriter/gen_reading_correction_data.py
dancerj/mozc
a5a4927c1f709d2ff0c681585c746f73a434e4c9
[ "BSD-3-Clause" ]
1
2022-03-25T09:01:39.000Z
2022-03-25T09:01:39.000Z
# -*- coding: utf-8 -*- # Copyright 2010-2020, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this...
41.431579
80
0.741362
__author__ = "komatsu" import codecs import optparse from build_tools import code_generator_util from build_tools import serialized_string_array_builder def ParseOptions(): parser = optparse.OptionParser() parser.add_option('--input', dest='input', help='Input TSV file path.') parser.add_option('--output_va...
true
true
f7351ed7ac47d418a33066370b5990a5269a73b7
7,904
py
Python
install/gcp/upgrade_tools/db_migrator.py
mitsuo0114/forseti-security
a21dc6b7a7420a60f02c1a4bdfbab9e101291dd2
[ "Apache-2.0" ]
null
null
null
install/gcp/upgrade_tools/db_migrator.py
mitsuo0114/forseti-security
a21dc6b7a7420a60f02c1a4bdfbab9e101291dd2
[ "Apache-2.0" ]
null
null
null
install/gcp/upgrade_tools/db_migrator.py
mitsuo0114/forseti-security
a21dc6b7a7420a60f02c1a4bdfbab9e101291dd2
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The Forseti Security 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 a...
35.443946
77
0.660552
from __future__ import print_function import sys import migrate.changeset from sqlalchemy.exc import OperationalError import google.cloud.forseti.services.scanner.dao as scanner_dao import google.cloud.forseti.services.inventory.storage as inventory_dao import google.cloud.forseti.services.dao as general_dao fro...
true
true
f735201175d7dcb58bf35d7c25432ef8c050f9e7
3,825
py
Python
core_pe/photo.py
astrofrog/dupeguru
d0a3f081dab21ea3d2fc69830c9e71a18078c150
[ "BSD-3-Clause" ]
1
2017-01-03T05:50:39.000Z
2017-01-03T05:50:39.000Z
core_pe/photo.py
astrofrog/dupeguru
d0a3f081dab21ea3d2fc69830c9e71a18078c150
[ "BSD-3-Clause" ]
null
null
null
core_pe/photo.py
astrofrog/dupeguru
d0a3f081dab21ea3d2fc69830c9e71a18078c150
[ "BSD-3-Clause" ]
null
null
null
# Created By: Virgil Dupras # Created On: 2011-05-29 # Copyright 2013 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "BSD" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.hardcoded.net/licens...
37.5
88
0.613072
import logging from hscommon.util import get_file_ext, format_size from core.app import format_timestamp, format_perc, format_dupe_count from core import fs from . import exif def format_dimensions(dimensions): return '%d x %d' % (dimensions[0], dimensions[1]) def get_delta_dimensions(value, ref_value): ret...
true
true
f735204ab267854d8c7a3281bc5ce292b2f1e8d0
836
py
Python
compiled/python/imports_circular_b.py
smarek/ci_targets
c5edee7b0901fd8e7f75f85245ea4209b38e0cb3
[ "MIT" ]
4
2017-04-08T12:55:11.000Z
2020-12-05T21:09:31.000Z
compiled/python/imports_circular_b.py
smarek/ci_targets
c5edee7b0901fd8e7f75f85245ea4209b38e0cb3
[ "MIT" ]
7
2018-04-23T01:30:33.000Z
2020-10-30T23:56:14.000Z
compiled/python/imports_circular_b.py
smarek/ci_targets
c5edee7b0901fd8e7f75f85245ea4209b38e0cb3
[ "MIT" ]
6
2017-04-08T11:41:14.000Z
2020-10-30T22:47:31.000Z
# This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild from pkg_resources import parse_version import kaitaistruct from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO if parse_version(kaitaistruct.__version__) < parse_version('0.9'): raise Exception("Incompati...
32.153846
132
0.722488
from pkg_resources import parse_version import kaitaistruct from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO if parse_version(kaitaistruct.__version__) < parse_version('0.9'): raise Exception("Incompatible Kaitai Struct Python API: 0.9 or later is required, but you have %s" % (kaitaistruct.__version_...
true
true
f735215a5b29bb7037ea5253477ebe9aadee4cd9
879
py
Python
server/migrations/versions/3bed7b8d8720_shares_relation.py
momikey/liblio
c7ad4fd8d72369358863b90e34f3ed89ddef753c
[ "MIT" ]
null
null
null
server/migrations/versions/3bed7b8d8720_shares_relation.py
momikey/liblio
c7ad4fd8d72369358863b90e34f3ed89ddef753c
[ "MIT" ]
null
null
null
server/migrations/versions/3bed7b8d8720_shares_relation.py
momikey/liblio
c7ad4fd8d72369358863b90e34f3ed89ddef753c
[ "MIT" ]
null
null
null
"""Shares relation Revision ID: 3bed7b8d8720 Revises: b86d7b60fbef Create Date: 2019-09-30 10:21:56.725664 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '3bed7b8d8720' down_revision = 'b86d7b60fbef' branch_labels = None depends_on = None def upgrade(): ...
25.114286
65
0.675768
from alembic import op import sqlalchemy as sa revision = '3bed7b8d8720' down_revision = 'b86d7b60fbef' branch_labels = None depends_on = None def upgrade(): op.create_table('shares', sa.Column('user_id', sa.Integer(), nullable=False), sa.Column('post_id', sa.Integer(), nullable=False), sa.Forei...
true
true
f735219bdf8e165d01f8912a1bab3856ce66114f
23,430
py
Python
fast_scroller/h5data.py
miketrumpis/lfp_scroller
ce4dbf85bb4d31f2eacfb5d68a5049499637722c
[ "BSD-3-Clause" ]
null
null
null
fast_scroller/h5data.py
miketrumpis/lfp_scroller
ce4dbf85bb4d31f2eacfb5d68a5049499637722c
[ "BSD-3-Clause" ]
6
2021-10-08T17:27:46.000Z
2021-12-14T16:29:44.000Z
fast_scroller/h5data.py
miketrumpis/lfp_scroller
ce4dbf85bb4d31f2eacfb5d68a5049499637722c
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from scipy.linalg import LinAlgError from scipy.signal import lfilter, lfilter_zi, hilbert from scipy.interpolate import interp1d import h5py from tqdm import tqdm from ecogdata.util import input_as_2d from ecogdata.util import nextpow2 def h5mean(array, axis, rowmask=(), start=0, stop=None): "...
37.368421
117
0.590568
import numpy as np from scipy.linalg import LinAlgError from scipy.signal import lfilter, lfilter_zi, hilbert from scipy.interpolate import interp1d import h5py from tqdm import tqdm from ecogdata.util import input_as_2d from ecogdata.util import nextpow2 def h5mean(array, axis, rowmask=(), start=0, stop=None): ...
true
true
f73522a2af911d1515d12f72fa0d2667a186b3b9
1,251
py
Python
cyberhead/modules/brokers/coinbase/Coinbase.py
fakecoinbase/TheCyberHeadslashCyberHead
aac5bdaeab75d7ed42cb9aa3e316b3af55d68817
[ "Unlicense" ]
4
2019-10-25T05:37:32.000Z
2019-10-25T07:20:44.000Z
cyberhead/modules/brokers/coinbase/Coinbase.py
Seburath/CyberHead
b1c5d8c157ff5bb976778ff5f7901d82e41d7d3e
[ "Unlicense" ]
9
2021-03-11T02:56:42.000Z
2022-03-12T00:43:13.000Z
cyberhead/modules/brokers/coinbase/Coinbase.py
Seburath/CyberHead
b1c5d8c157ff5bb976778ff5f7901d82e41d7d3e
[ "Unlicense" ]
1
2020-11-23T09:37:25.000Z
2020-11-23T09:37:25.000Z
import cbpro import pandas as pd from base64 import b64encode class Coinbase: def __init__(self, API_KEY, API_SECRET, API_PASS, ENV_URL="https://api-public.sandbox.pro.coinbase.com"): self.API_KEY = API_KEY self.API_SECRET = API_SECRET self.API_PASS = API_PASS self.ENV_URL = ENV_URL self.client = cbpro.Auth...
27.8
109
0.741807
import cbpro import pandas as pd from base64 import b64encode class Coinbase: def __init__(self, API_KEY, API_SECRET, API_PASS, ENV_URL="https://api-public.sandbox.pro.coinbase.com"): self.API_KEY = API_KEY self.API_SECRET = API_SECRET self.API_PASS = API_PASS self.ENV_URL = ENV_URL self.client = cbpro.Auth...
true
true
f73523b2b99ace61784f26d0fe49a2259344d2d3
636
py
Python
setup.py
ilfrich/frappy-py-mongo-content-store
aec7d72f2b1759ade7881abb69358b49cdc8aa02
[ "Apache-2.0" ]
null
null
null
setup.py
ilfrich/frappy-py-mongo-content-store
aec7d72f2b1759ade7881abb69358b49cdc8aa02
[ "Apache-2.0" ]
null
null
null
setup.py
ilfrich/frappy-py-mongo-content-store
aec7d72f2b1759ade7881abb69358b49cdc8aa02
[ "Apache-2.0" ]
null
null
null
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup(name="frappymongocontent", version="1.0.0", description="Store Implementation for Content in MongoDB", long_description=long_description, long_description_content_type="text/markdown", ...
26.5
69
0.622642
from setuptools import setup with open("README.md", "r") as fh: long_description = fh.read() setup(name="frappymongocontent", version="1.0.0", description="Store Implementation for Content in MongoDB", long_description=long_description, long_description_content_type="text/markdown", ...
true
true
f73523dae23b1abc06f1abc0e7276a52c1a0a20e
4,681
py
Python
Track1.2/configs/recognition/csn/csn_loveu2_train.py
VisualAnalysisOfHumans/LOVEU_TRACK1_TOP3_SUBMISSION
6f4d1c7e6883d6b0664fcd04265f437247afab54
[ "MIT" ]
1
2021-06-25T06:43:29.000Z
2021-06-25T06:43:29.000Z
Track1.2/configs/recognition/csn/csn_loveu2_train.py
VisualAnalysisOfHumans/LOVEU_TRACK1_TOP3_SUBMISSION
6f4d1c7e6883d6b0664fcd04265f437247afab54
[ "MIT" ]
1
2022-01-11T02:35:57.000Z
2022-01-11T02:35:57.000Z
Track1.2/configs/recognition/csn/csn_loveu2_train.py
VisualAnalysisOfHumans/LOVEU_TRACK1_TOP3_SUBMISSION
6f4d1c7e6883d6b0664fcd04265f437247afab54
[ "MIT" ]
1
2022-01-12T01:55:52.000Z
2022-01-12T01:55:52.000Z
# model settings model = dict( type='Recognizer3D', backbone=dict( type='ResNet3dCSN', pretrained2d=False, pretrained= # noqa: E251 '/home/notebook/data/personal/mmaction2_task1/data/ircsn_from_scratch_r152_ig65m_20200807-771c4135.pth', # noqa: E501 depth=152, w...
35.732824
126
0.674001
model = dict( type='Recognizer3D', backbone=dict( type='ResNet3dCSN', pretrained2d=False, pretrained= '/home/notebook/data/personal/mmaction2_task1/data/ircsn_from_scratch_r152_ig65m_20200807-771c4135.pth', depth=152, with_pool2=False, bottleneck_mode='i...
true
true
f7352415b74aec839494235d20723e8458558e4f
1,367
py
Python
sdk/python/pulumi_kubernetes/rbac/v1/ClusterRoleList.py
rosskevin/pulumi-kubernetes
e4fa04b13a20929c879aca1bbe58fb5a95d16f7c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/rbac/v1/ClusterRoleList.py
rosskevin/pulumi-kubernetes
e4fa04b13a20929c879aca1bbe58fb5a95d16f7c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/rbac/v1/ClusterRoleList.py
rosskevin/pulumi-kubernetes
e4fa04b13a20929c879aca1bbe58fb5a95d16f7c
[ "Apache-2.0" ]
null
null
null
import pulumi import pulumi.runtime from ... import tables class ClusterRoleList(pulumi.CustomResource): """ ClusterRoleList is a collection of ClusterRoles """ def __init__(self, __name__, __opts__=None, items=None, metadata=None): if not __name__: raise TypeError('Missing resourc...
35.973684
89
0.66496
import pulumi import pulumi.runtime from ... import tables class ClusterRoleList(pulumi.CustomResource): def __init__(self, __name__, __opts__=None, items=None, metadata=None): if not __name__: raise TypeError('Missing resource name argument (for URN creation)') if not isinstance(__nam...
true
true
f7352607be115758a5676f711cf159ffb55b1c11
18,174
py
Python
3rd_check/surgery/penalty.py
jdlaubrie/shell-elem
f87cb9ca9179533d3a645a494e7ef4d39666ddc6
[ "MIT" ]
null
null
null
3rd_check/surgery/penalty.py
jdlaubrie/shell-elem
f87cb9ca9179533d3a645a494e7ef4d39666ddc6
[ "MIT" ]
null
null
null
3rd_check/surgery/penalty.py
jdlaubrie/shell-elem
f87cb9ca9179533d3a645a494e7ef4d39666ddc6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import numpy as np import pandas as pd import matplotlib.pyplot as plt NbrOfNodes = 35 keygnra = ' TIME: GANDRA STEP: 80.000 FRAME: 1.000' keystent = ' TIME: STENT STEP: 1.000 FRAME: 1.000' keygnrb = ' TIME: GANDRB STEP: 100.000 FRAME: 1.000' # File for gain...
50.483333
119
0.614009
import numpy as np import pandas as pd import matplotlib.pyplot as plt NbrOfNodes = 35 keygnra = ' TIME: GANDRA STEP: 80.000 FRAME: 1.000' keystent = ' TIME: STENT STEP: 1.000 FRAME: 1.000' keygnrb = ' TIME: GANDRB STEP: 100.000 FRAME: 1.000' file_g01 = open('surgery_p7.rsn', 'r') gain01...
true
true
f735262f54850ed34027a73490ed6d900391ebd5
4,659
py
Python
conans/client/generators/qmake.py
ytimenkov/conan
89eb275b9696b308aaaa1fbfaa0f8cdab284a764
[ "MIT" ]
3
2016-11-11T01:09:44.000Z
2017-07-19T13:30:17.000Z
conans/client/generators/qmake.py
ytimenkov/conan
89eb275b9696b308aaaa1fbfaa0f8cdab284a764
[ "MIT" ]
6
2017-06-14T11:40:15.000Z
2020-05-23T01:43:28.000Z
conans/client/generators/qmake.py
ytimenkov/conan
89eb275b9696b308aaaa1fbfaa0f8cdab284a764
[ "MIT" ]
2
2017-11-29T14:05:22.000Z
2018-09-19T12:43:33.000Z
from conans.model import Generator from conans.paths import BUILD_INFO_QMAKE class DepsCppQmake(object): def __init__(self, cpp_info): def multiline(field): return " \\\n ".join('"%s"' % p.replace("\\", "/") for p in field) self.include_paths = multiline(cpp_info.include_paths) ...
43.542056
92
0.608714
from conans.model import Generator from conans.paths import BUILD_INFO_QMAKE class DepsCppQmake(object): def __init__(self, cpp_info): def multiline(field): return " \\\n ".join('"%s"' % p.replace("\\", "/") for p in field) self.include_paths = multiline(cpp_info.include_paths) ...
true
true
f7352703ed42ee6015d5ca30e57234884d399073
1,652
py
Python
test/testAnonymizationExecutor.py
AutoDash/AutoDash
3924795a04159f80ea3b65b2172747babd15f35f
[ "Apache-2.0" ]
3
2020-02-12T01:24:46.000Z
2020-02-13T00:50:46.000Z
test/testAnonymizationExecutor.py
AutoDash/AutoDash
3924795a04159f80ea3b65b2172747babd15f35f
[ "Apache-2.0" ]
32
2020-02-20T10:20:56.000Z
2022-02-10T01:42:46.000Z
test/testAnonymizationExecutor.py
AutoDash/AutoDash
3924795a04159f80ea3b65b2172747babd15f35f
[ "Apache-2.0" ]
1
2020-02-22T02:47:19.000Z
2020-02-22T02:47:19.000Z
#!/usr/bin/env python3 import unittest import os import shutil from src.data.VideoItem import VideoItem from src.data.MetaDataItem import MetaDataItem from src.executor.FaceBlurrer import FaceBlurrer from numpy.testing import assert_array_equal, assert_raises class TestAnonymizationExecutor(unittest.TestCase): TE...
33.04
103
0.70339
import unittest import os import shutil from src.data.VideoItem import VideoItem from src.data.MetaDataItem import MetaDataItem from src.executor.FaceBlurrer import FaceBlurrer from numpy.testing import assert_array_equal, assert_raises class TestAnonymizationExecutor(unittest.TestCase): TEST_DIR = os.path.join(o...
true
true
f7352712da6d0702be5a451230eec61bfb5112aa
238
py
Python
backend/backend/orders/admin.py
PrzemyslawSalek/9eats
b748ba2166a065c8d04e043069a1ddf5641322ca
[ "MIT" ]
null
null
null
backend/backend/orders/admin.py
PrzemyslawSalek/9eats
b748ba2166a065c8d04e043069a1ddf5641322ca
[ "MIT" ]
null
null
null
backend/backend/orders/admin.py
PrzemyslawSalek/9eats
b748ba2166a065c8d04e043069a1ddf5641322ca
[ "MIT" ]
null
null
null
from django.contrib import admin from .models import Order class TodoAdmin(admin.ModelAdmin): list_display = ('dishes', 'paid', 'completed', 'timestamp', 'user') # Register your models here. admin.site.register(Order, TodoAdmin)
19.833333
71
0.735294
from django.contrib import admin from .models import Order class TodoAdmin(admin.ModelAdmin): list_display = ('dishes', 'paid', 'completed', 'timestamp', 'user') admin.site.register(Order, TodoAdmin)
true
true
f7352926b65d269a72935135f220dd69066912a0
9,509
py
Python
src/appengine/server.py
bonomali/clusterfuzz
39e0583148b1810cbbe18f48d7a4ee63489f4c84
[ "Apache-2.0" ]
2
2019-03-10T14:40:17.000Z
2021-11-17T10:51:31.000Z
src/appengine/server.py
M31MOTH/clusterfuzz
a614d2e09238f11ae578337e10dfeaba38dcae76
[ "Apache-2.0" ]
12
2020-11-13T18:58:31.000Z
2022-03-21T22:19:55.000Z
src/appengine/server.py
gaybro8777/clusterfuzz
fb053896ee5b5f1468479e75223c07b4281a72d3
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
41.70614
80
0.7495
import urllib import webapp2 from webapp2_extras import routes from base import utils from config import local_config from handlers import base_handler from handlers import bots from handlers import commit_range from handlers import configuration from handlers import corpora from handlers import coverage_report from h...
true
true
f7352bfdb50c0cc0b1af31b8dcc6b5ece3b6e577
2,581
py
Python
supervisord/tests/test_supervisord_integration.py
vbarbaresi/integrations-core
ab26ab1cd6c28a97c1ad1177093a93659658c7aa
[ "BSD-3-Clause" ]
663
2016-08-23T05:23:45.000Z
2022-03-29T00:37:23.000Z
supervisord/tests/test_supervisord_integration.py
vbarbaresi/integrations-core
ab26ab1cd6c28a97c1ad1177093a93659658c7aa
[ "BSD-3-Clause" ]
6,642
2016-06-09T16:29:20.000Z
2022-03-31T22:24:09.000Z
supervisord/tests/test_supervisord_integration.py
vbarbaresi/integrations-core
ab26ab1cd6c28a97c1ad1177093a93659658c7aa
[ "BSD-3-Clause" ]
1,222
2017-01-27T15:51:38.000Z
2022-03-31T18:17:51.000Z
# (C) Datadog, Inc. 2018-present # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from time import sleep import pytest from .common import PROCESSES, PROCESSES_BY_STATE_BY_ITERATION, STATUSES, SUPERVISOR_VERSION # Mark all tests in this file as integration tests pytestmark = [pytest...
35.356164
118
0.69353
from time import sleep import pytest from .common import PROCESSES, PROCESSES_BY_STATE_BY_ITERATION, STATUSES, SUPERVISOR_VERSION pytestmark = [pytest.mark.integration, pytest.mark.usefixtures("dd_environment")] def test_check(aggregator, check, instance): instance_tags = ["supervisord_server:travis"] fo...
true
true
f7352c714da27beb77f9d60af9f18596852f5dc3
4,781
py
Python
tensor2tensor/models/video/sv2p_params.py
kpe/tensor2tensor
453c473030c354a3d9a4c27b12bcec8942334bf4
[ "Apache-2.0" ]
34
2018-12-19T01:00:57.000Z
2021-03-26T09:36:37.000Z
tensor2tensor/models/video/sv2p_params.py
kpe/tensor2tensor
453c473030c354a3d9a4c27b12bcec8942334bf4
[ "Apache-2.0" ]
11
2018-12-25T03:37:59.000Z
2021-08-25T14:43:58.000Z
tensor2tensor/models/video/sv2p_params.py
kpe/tensor2tensor
453c473030c354a3d9a4c27b12bcec8942334bf4
[ "Apache-2.0" ]
9
2018-12-27T08:00:44.000Z
2020-06-08T03:05:14.000Z
# coding=utf-8 # Copyright 2019 The Tensor2Tensor Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
31.453947
80
0.776825
from __future__ import division from __future__ import print_function from tensor2tensor.layers import modalities from tensor2tensor.models.video import basic_stochastic from tensor2tensor.utils import registry @registry.register_hparams def next_frame_sv2p(): hparams = basic_stochastic.next_frame_basic_stochast...
true
true
f7352ca98740e2ca42cce07e2ff806ab32c5e176
7,486
py
Python
scripts/wine/wine_explain.py
NRuf77/proset
101d491e05c2423faddca31029232982f46d8831
[ "MIT" ]
null
null
null
scripts/wine/wine_explain.py
NRuf77/proset
101d491e05c2423faddca31029232982f46d8831
[ "MIT" ]
null
null
null
scripts/wine/wine_explain.py
NRuf77/proset
101d491e05c2423faddca31029232982f46d8831
[ "MIT" ]
null
null
null
"""Explain proset classifier trained on wine classification data. Copyright by Nikolaus Ruf Released under the MIT license - see LICENSE file for details """ from copy import deepcopy import gzip import os import pickle import matplotlib.pyplot as plt import numpy as np import shap import proset.util...
34.027273
113
0.706118
from copy import deepcopy import gzip import os import pickle import matplotlib.pyplot as plt import numpy as np import shap import proset.utility as utility print("* Apply user settings") input_path = "scripts/results" output_path = "scripts/reports" input_files = [ "wine_2d_05_model.gz", ...
true
true
f7352cb393e14e541884e6c60236d4f8a7073061
123
py
Python
fsleyes/__main__.py
pauldmccarthy/fsleyes
453a6b91ec7763c39195814d635257e3766acf83
[ "Apache-2.0" ]
12
2018-05-05T01:36:25.000Z
2021-09-23T20:44:08.000Z
fsleyes/__main__.py
pauldmccarthy/fsleyes
453a6b91ec7763c39195814d635257e3766acf83
[ "Apache-2.0" ]
97
2018-05-05T02:17:23.000Z
2022-03-29T14:58:42.000Z
fsleyes/__main__.py
pauldmccarthy/fsleyes
453a6b91ec7763c39195814d635257e3766acf83
[ "Apache-2.0" ]
6
2017-12-09T09:02:00.000Z
2021-03-05T18:55:13.000Z
#!/usr/bin/env python if __name__ == '__main__': import sys import fsleyes.main as main sys.exit(main.main())
17.571429
31
0.650407
if __name__ == '__main__': import sys import fsleyes.main as main sys.exit(main.main())
true
true
f7352d278824bf95db50a16c3dea7eab65426af5
1,051
py
Python
main/views.py
tamirmatok/Beyond-07-team-1
3bd7de8916574b28b9f96fc99526de7c4e27eaa2
[ "MIT" ]
1
2022-03-03T12:03:17.000Z
2022-03-03T12:03:17.000Z
main/views.py
tamirmatok/Beyond-07-team-1
3bd7de8916574b28b9f96fc99526de7c4e27eaa2
[ "MIT" ]
38
2022-03-07T14:14:48.000Z
2022-03-31T18:37:52.000Z
main/views.py
tamirmatok/Beyond-07-team-1
3bd7de8916574b28b9f96fc99526de7c4e27eaa2
[ "MIT" ]
5
2022-02-28T18:55:09.000Z
2022-03-06T08:04:40.000Z
from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.shortcuts import redirect from django.contrib.auth import logout from dogowner.models import DogOwner from daycare.models import DayCare from dogowner.views import dog_owner_home from daycare.views import daycare_...
23.886364
60
0.766889
from django.shortcuts import render from django.contrib.auth.decorators import login_required from django.shortcuts import redirect from django.contrib.auth import logout from dogowner.models import DogOwner from daycare.models import DayCare from dogowner.views import dog_owner_home from daycare.views import daycare_...
true
true
f7352d51b446a770f9a814b7005c5afb8d25c8c5
662
py
Python
src/sentry/incidents/receivers.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
null
null
null
src/sentry/incidents/receivers.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
null
null
null
src/sentry/incidents/receivers.py
learninto/sentry
4f9f564841498b3af49c1677d6b61f3e47b01923
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from sentry.incidents.models import IncidentSuspectCommit from sentry.signals import release_commits_updated @release_commits_updated.connect(weak=False) def handle_release_commits_updated(removed_commit_ids, added_commit_ids, **kwargs): from sentry.incidents.tasks import c...
36.777778
97
0.796073
from __future__ import absolute_import from sentry.incidents.models import IncidentSuspectCommit from sentry.signals import release_commits_updated @release_commits_updated.connect(weak=False) def handle_release_commits_updated(removed_commit_ids, added_commit_ids, **kwargs): from sentry.incidents.tasks import c...
true
true
f7352e39399f7e40e21e71af52bbc0cedb18c9f5
513
py
Python
pt/pt.py
Mic92/tracedumpd
a84eac58106f1f1d7a82f5dee2a327861e763e4e
[ "MIT" ]
1
2021-03-22T18:04:53.000Z
2021-03-22T18:04:53.000Z
pt/pt.py
Mic92/tracedump
a84eac58106f1f1d7a82f5dee2a327861e763e4e
[ "MIT" ]
null
null
null
pt/pt.py
Mic92/tracedump
a84eac58106f1f1d7a82f5dee2a327861e763e4e
[ "MIT" ]
null
null
null
import glob from pathlib import Path from cffi import FFI with open(Path(__file__).resolve().parent.joinpath("ffi.h")) as f: header = f.read() ffibuilder = FFI() ffibuilder.cdef(header) ffibuilder.set_source( "tracedump._pt", None, sources=glob.glob("*.cpp"), extra_comp...
23.318182
82
0.621832
import glob from pathlib import Path from cffi import FFI with open(Path(__file__).resolve().parent.joinpath("ffi.h")) as f: header = f.read() ffibuilder = FFI() ffibuilder.cdef(header) ffibuilder.set_source( "tracedump._pt", None, sources=glob.glob("*.cpp"), extra_comp...
true
true
f7352e5c3be18f665058f5b27e82e15014db3389
2,589
py
Python
tests/integration/models/test_plot.py
daledali/bokeh
c4f0debe7bd230d7e1aa8500716e8e997c04f528
[ "BSD-3-Clause" ]
1
2020-01-19T03:17:18.000Z
2020-01-19T03:17:18.000Z
tests/integration/models/test_plot.py
daledali/bokeh
c4f0debe7bd230d7e1aa8500716e8e997c04f528
[ "BSD-3-Clause" ]
1
2021-05-12T10:14:45.000Z
2021-05-12T10:14:45.000Z
tests/integration/models/test_plot.py
daledali/bokeh
c4f0debe7bd230d7e1aa8500716e8e997c04f528
[ "BSD-3-Clause" ]
1
2020-01-21T12:03:58.000Z
2020-01-21T12:03:58.000Z
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
35.465753
115
0.471611
import pytest ; pytest import time from bokeh.layouts import column from bokeh.models import Button, Plot, Range1d pytest_plugins = ( "bokeh._testing.plugins.project", ) @pytest.mark.integration @pytest.mark.selenium class Test_Plot(object): def test_inner_dims_trigger_on_dynamic_add(self, bokeh_server_...
true
true
f7352e5ed2807ab869f2492e923a8d360d62077b
1,923
py
Python
src/pygaps/api.py
pauliacomi/pyGAPS
c4d45b710e171c937471686437e382e05aec4ed5
[ "MIT" ]
35
2018-01-24T14:59:08.000Z
2022-03-10T02:47:58.000Z
src/pygaps/api.py
pauliacomi/pyGAPS
c4d45b710e171c937471686437e382e05aec4ed5
[ "MIT" ]
29
2018-01-06T12:08:08.000Z
2022-03-11T20:26:53.000Z
src/pygaps/api.py
pauliacomi/pyGAPS
c4d45b710e171c937471686437e382e05aec4ed5
[ "MIT" ]
20
2019-06-12T19:20:29.000Z
2022-03-02T09:57:02.000Z
# pylint: disable=W0614,W0611,W0622 # flake8: noqa # isort:skip_file # Parsing from .parsing.csv import isotherm_from_csv from .parsing.csv import isotherm_to_csv from .parsing.bel_dat import isotherm_from_bel from .parsing.excel import isotherm_from_xl from .parsing.excel import isotherm_to_xl from .parsing.isodb imp...
40.0625
71
0.870515
from .parsing.csv import isotherm_from_csv from .parsing.csv import isotherm_to_csv from .parsing.bel_dat import isotherm_from_bel from .parsing.excel import isotherm_from_xl from .parsing.excel import isotherm_to_xl from .parsing.isodb import isotherm_from_isodb from .parsing.json import isotherm_from_json from .pars...
true
true
f7352ebe72ee0f35ca69d07b451a58729d256f7a
341
py
Python
tests/test_api.py
mactov/dbclient
563d077967fbc383e6c7c4cc6c92ec07b750db56
[ "MIT" ]
null
null
null
tests/test_api.py
mactov/dbclient
563d077967fbc383e6c7c4cc6c92ec07b750db56
[ "MIT" ]
null
null
null
tests/test_api.py
mactov/dbclient
563d077967fbc383e6c7c4cc6c92ec07b750db56
[ "MIT" ]
null
null
null
import sys import json from urllib.request import urlopen # sys.path.append('../') # from api import * SERVER_URL = 'http://localhost:5000/' def test_get_servers(): url = SERVER_URL + 'servers' response = urlopen(url).read() assert response.decode("utf-8") == json.dumps([{"server": "localhost"}, {"serve...
26.230769
104
0.665689
import sys import json from urllib.request import urlopen SERVER_URL = 'http://localhost:5000/' def test_get_servers(): url = SERVER_URL + 'servers' response = urlopen(url).read() assert response.decode("utf-8") == json.dumps([{"server": "localhost"}, {"server": "db.ultech.fr"}])
true
true
f7353011ba3d02275f936e272ca49b67bdebd94d
1,567
py
Python
src/deeply/datasets/colonoscopy/cvc_clinic_db.py
achillesrasquinha/deeply
fd1ce32da130591fc92df8df89e07f1497b2b902
[ "MIT" ]
2
2021-10-05T16:37:30.000Z
2021-10-11T21:31:43.000Z
src/deeply/datasets/colonoscopy/cvc_clinic_db.py
achillesrasquinha/deeply
fd1ce32da130591fc92df8df89e07f1497b2b902
[ "MIT" ]
null
null
null
src/deeply/datasets/colonoscopy/cvc_clinic_db.py
achillesrasquinha/deeply
fd1ce32da130591fc92df8df89e07f1497b2b902
[ "MIT" ]
1
2021-07-16T02:23:37.000Z
2021-07-16T02:23:37.000Z
from deeply.datasets.util import image_mask from tensorflow_datasets.core import ( Version, GeneratorBasedBuilder ) _DATASET_HOMEPAGE = "https://polyp.grand-challenge.org/CVCClinicDB/" _DATASET_KAGGLE = "achillesrasquinha/cvcclinicdb" _DATASET_DESCRIPTION = """ CVC-ClinicDB is a database of frames ext...
41.236842
290
0.698787
from deeply.datasets.util import image_mask from tensorflow_datasets.core import ( Version, GeneratorBasedBuilder ) _DATASET_HOMEPAGE = "https://polyp.grand-challenge.org/CVCClinicDB/" _DATASET_KAGGLE = "achillesrasquinha/cvcclinicdb" _DATASET_DESCRIPTION = """ CVC-ClinicDB is a database of frames ext...
true
true
f7353179c26a30dba2f3619c510d8718c113c632
1,818
py
Python
openstates/openstates-master/openstates/vt/events.py
Jgorsick/Advocacy_Angular
8906af3ba729b2303880f319d52bce0d6595764c
[ "CC-BY-4.0" ]
null
null
null
openstates/openstates-master/openstates/vt/events.py
Jgorsick/Advocacy_Angular
8906af3ba729b2303880f319d52bce0d6595764c
[ "CC-BY-4.0" ]
null
null
null
openstates/openstates-master/openstates/vt/events.py
Jgorsick/Advocacy_Angular
8906af3ba729b2303880f319d52bce0d6595764c
[ "CC-BY-4.0" ]
null
null
null
import datetime import json from billy.scrape.events import Event, EventScraper class VTEventScraper(EventScraper): jurisdiction = 'vt' def scrape(self, session, chambers): year_slug = session[5: ] url = 'http://legislature.vermont.gov/committee/loadAllMeetings/{}'.\ format(y...
34.961538
90
0.451595
import datetime import json from billy.scrape.events import Event, EventScraper class VTEventScraper(EventScraper): jurisdiction = 'vt' def scrape(self, session, chambers): year_slug = session[5: ] url = 'http://legislature.vermont.gov/committee/loadAllMeetings/{}'.\ format(y...
true
true
f735342134d7488b304766946a5de2b5f09621a4
3,373
py
Python
inscrawler/browser.py
ckyeungac/instagram-crawler
0e6a96665074b18a67a311592b9a6acc88419a02
[ "MIT" ]
null
null
null
inscrawler/browser.py
ckyeungac/instagram-crawler
0e6a96665074b18a67a311592b9a6acc88419a02
[ "MIT" ]
null
null
null
inscrawler/browser.py
ckyeungac/instagram-crawler
0e6a96665074b18a67a311592b9a6acc88419a02
[ "MIT" ]
null
null
null
import os from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import TimeoutException from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as ...
32.432692
88
0.653721
import os from selenium import webdriver from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions import TimeoutException from selenium.webdriver.chrome.options import Options from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as ...
true
true
f73534a1c859d9f63f8135ec14770d5c8d99854e
26,217
py
Python
python_modules/dagster/dagster_tests/core_tests/definitions_tests/test_composition.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
4,606
2018-06-21T17:45:20.000Z
2022-03-31T23:39:42.000Z
python_modules/dagster/dagster_tests/core_tests/definitions_tests/test_composition.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
6,221
2018-06-12T04:36:01.000Z
2022-03-31T21:43:05.000Z
python_modules/dagster/dagster_tests/core_tests/definitions_tests/test_composition.py
rpatil524/dagster
6f918d94cbd543ab752ab484a65e3a40fd441716
[ "Apache-2.0" ]
619
2018-08-22T22:43:09.000Z
2022-03-31T22:48:06.000Z
import pytest from dagster import ( DependencyDefinition, InputDefinition, Int, Nothing, Output, OutputDefinition, PipelineDefinition, SolidDefinition, composite_solid, execute_pipeline, lambda_solid, pipeline, solid, ) from dagster.core.definitions.decorators.hook im...
26.269539
109
0.634283
import pytest from dagster import ( DependencyDefinition, InputDefinition, Int, Nothing, Output, OutputDefinition, PipelineDefinition, SolidDefinition, composite_solid, execute_pipeline, lambda_solid, pipeline, solid, ) from dagster.core.definitions.decorators.hook im...
true
true
f73534df9f2ba66521a9f589baa13f113875fad2
5,388
py
Python
python/GafferSceneUI/StandardAttributesUI.py
ivanimanishi/gaffer
7cfd79d2f20c25ed1d680730de9d6a2ee356dd4c
[ "BSD-3-Clause" ]
1
2019-08-02T16:49:59.000Z
2019-08-02T16:49:59.000Z
python/GafferSceneUI/StandardAttributesUI.py
rkoschmitzky/gaffer
ec6262ae1292767bdeb9520d1447d65a4a511884
[ "BSD-3-Clause" ]
2
2017-08-23T21:35:45.000Z
2018-01-29T08:59:33.000Z
python/GafferSceneUI/StandardAttributesUI.py
rkoschmitzky/gaffer
ec6262ae1292767bdeb9520d1447d65a4a511884
[ "BSD-3-Clause" ]
null
null
null
########################################################################## # # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
27.773196
94
0.677988
# IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, import Gaffer import GafferUI import GafferScene def __attributesSummary( plug ) : info = [] if plug["visibility"]["enabled"].getValue() : info.append( "Visible" if plug["visibility"]["value"].getValue() else "Invisible" ) if plug["dou...
true
true
f73536fcb4da1724c15b621e8988c68c0fcb521b
584
py
Python
tests/mongodb/iaas_classic_queries/__init__.py
ericmharris/gc3-query
0bf5226130aafbb1974aeb96d93ee1996833e87d
[ "MIT" ]
null
null
null
tests/mongodb/iaas_classic_queries/__init__.py
ericmharris/gc3-query
0bf5226130aafbb1974aeb96d93ee1996833e87d
[ "MIT" ]
null
null
null
tests/mongodb/iaas_classic_queries/__init__.py
ericmharris/gc3-query
0bf5226130aafbb1974aeb96d93ee1996833e87d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ gc3-query.__init__.py [9/13/2018 4:01 PM] ~~~~~~~~~~~~~~~~ <DESCR SHORT> <DESCR> """ ################################################################################ ## Standard Library Imports import sys, os ###########################################################################...
24.333333
80
0.390411
import sys, os from dataclasses import dataclass from gc3_query.lib import * _debug, _info, _warning, _error, _critical = get_logging(name=__name__)
true
true
f73538c9403eee04afb92dcc25ce6047daa55b6c
401
py
Python
juniorPython/wsgi.py
CatOnDrugs/junior-test
7809d4726b7b39d5c0a69addc56aaf1e81d26bd7
[ "MIT" ]
null
null
null
juniorPython/wsgi.py
CatOnDrugs/junior-test
7809d4726b7b39d5c0a69addc56aaf1e81d26bd7
[ "MIT" ]
null
null
null
juniorPython/wsgi.py
CatOnDrugs/junior-test
7809d4726b7b39d5c0a69addc56aaf1e81d26bd7
[ "MIT" ]
null
null
null
""" WSGI config for juniorPython project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_...
23.588235
78
0.790524
import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'juniorPython.settings') application = get_wsgi_application()
true
true
f73538f392b87985cef5c7a55ef0b6d5f0b2f365
3,837
py
Python
slackbot.py
nathants/py-slackbot
bc119e64ad1ca2fd74e128379f40e968f74f1f68
[ "MIT" ]
1
2018-06-05T20:22:37.000Z
2018-06-05T20:22:37.000Z
slackbot.py
nathants/slackbot
bc119e64ad1ca2fd74e128379f40e968f74f1f68
[ "MIT" ]
null
null
null
slackbot.py
nathants/slackbot
bc119e64ad1ca2fd74e128379f40e968f74f1f68
[ "MIT" ]
null
null
null
import json import inspect import requests import os import boto3 from urllib import parse ASYNC = 'async' token = None slash_handlers = [] event_handlers = [] def slash(command, conditional=lambda text: True): def fn(f): slash_handlers.append([conditional, command, f, None]) return f return f...
39.153061
124
0.565807
import json import inspect import requests import os import boto3 from urllib import parse ASYNC = 'async' token = None slash_handlers = [] event_handlers = [] def slash(command, conditional=lambda text: True): def fn(f): slash_handlers.append([conditional, command, f, None]) return f return f...
true
true
f7353949672667f55d93782fdb8c769b8e8a0a9f
1,825
py
Python
1058 Minimize Rounding Error to Meet Target.py
krishna13052001/LeetCode
cd6ec626bea61f0bd9e8493622074f9e69a7a1c3
[ "MIT" ]
872
2015-06-15T12:02:41.000Z
2022-03-30T08:44:35.000Z
1058 Minimize Rounding Error to Meet Target.py
nadeemshaikh-github/LeetCode
3fb14aeea62a960442e47dfde9f964c7ffce32be
[ "MIT" ]
8
2015-06-21T15:11:59.000Z
2022-02-01T11:22:34.000Z
1058 Minimize Rounding Error to Meet Target.py
nadeemshaikh-github/LeetCode
3fb14aeea62a960442e47dfde9f964c7ffce32be
[ "MIT" ]
328
2015-06-28T03:10:35.000Z
2022-03-29T11:05:28.000Z
#!/usr/bin/python3 """ Given an array of prices [p1,p2...,pn] and a target, round each price pi to Roundi(pi) so that the rounded array [Round1(p1),Round2(p2)...,Roundn(pn)] sums to the given target. Each operation Roundi(pi) could be either Floor(pi) or Ceil(pi). Return the string "-1" if the rounded array is impossi...
26.449275
80
0.595068
from typing import List import math class Solution: def minimizeError(self, prices: List[str], target: int) -> str: A = list(map(float, prices)) f_sum = sum(map(math.floor, A)) c_sum = sum(map(math.ceil, A)) if not f_sum <= target <= c_sum: return "-1" errors =...
true
true
f735397fbd14352f66bbaf093f10830ab1a84343
568
py
Python
it/structures/python2/default_naming-default/upper_camel.py
reproto/reproto
92f0a4b258095bc2f8a394d0bd44209e3a599c4f
[ "Apache-2.0", "MIT" ]
108
2017-07-19T02:07:52.000Z
2022-02-27T04:46:43.000Z
it/structures/python2/default_naming-default/upper_camel.py
reproto/reproto
92f0a4b258095bc2f8a394d0bd44209e3a599c4f
[ "Apache-2.0", "MIT" ]
42
2017-11-21T14:21:40.000Z
2022-02-26T02:40:38.000Z
it/structures/python2/default_naming-default/upper_camel.py
reproto/reproto
92f0a4b258095bc2f8a394d0bd44209e3a599c4f
[ "Apache-2.0", "MIT" ]
9
2017-05-26T00:36:23.000Z
2020-07-26T10:58:20.000Z
class Value: def __init__(self, _foo_bar): self._foo_bar = _foo_bar @property def foo_bar(self): return self._foo_bar @staticmethod def decode(data): f_foo_bar = data["FooBar"] if not isinstance(f_foo_bar, unicode): raise Exception("not a string") return Value(f_foo_bar) def e...
18.322581
55
0.65669
class Value: def __init__(self, _foo_bar): self._foo_bar = _foo_bar @property def foo_bar(self): return self._foo_bar @staticmethod def decode(data): f_foo_bar = data["FooBar"] if not isinstance(f_foo_bar, unicode): raise Exception("not a string") return Value(f_foo_bar) def e...
true
true