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
f74fc587af08f095ad0caf6f8bcedb85c101e6c2
6,478
py
Python
gen_licenses.py
sthagen/laskea
84f30bd139682c9c9db06be1398e637fb24de8d7
[ "MIT" ]
1
2022-02-25T18:17:53.000Z
2022-02-25T18:17:53.000Z
gen_licenses.py
sthagen/laskea
84f30bd139682c9c9db06be1398e637fb24de8d7
[ "MIT" ]
7
2022-03-19T14:01:07.000Z
2022-03-23T07:44:50.000Z
gen_licenses.py
sthagen/laskea
84f30bd139682c9c9db06be1398e637fb24de8d7
[ "MIT" ]
null
null
null
"""Derive the license information and publish in docs.""" import functools import json import pathlib import pkg_resources import string import subprocess # nosec from typing import List, Tuple __all__ = ['dependency_tree_console_text', 'direct_dependencies_table', 'indirect_dependencies_table'] ENCODING = 'utf-8' T...
40.4875
190
0.659463
import functools import json import pathlib import pkg_resources import string import subprocess from typing import List, Tuple __all__ = ['dependency_tree_console_text', 'direct_dependencies_table', 'indirect_dependencies_table'] ENCODING = 'utf-8' TP_PATH = pathlib.Path('docs', 'third-party') TABLE_KEYS = (('Nam...
true
true
f74fc6299b3c1e201c9c1a09855f58be54c48b30
7,481
py
Python
src/datadog_api_client/v1/model/logs_message_remapper.py
rchenzheng/datadog-api-client-python
2e86ac098c6f0c7fdd90ed218224587c0f8eafef
[ "Apache-2.0" ]
null
null
null
src/datadog_api_client/v1/model/logs_message_remapper.py
rchenzheng/datadog-api-client-python
2e86ac098c6f0c7fdd90ed218224587c0f8eafef
[ "Apache-2.0" ]
null
null
null
src/datadog_api_client/v1/model/logs_message_remapper.py
rchenzheng/datadog-api-client-python
2e86ac098c6f0c7fdd90ed218224587c0f8eafef
[ "Apache-2.0" ]
null
null
null
# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. import re # noqa: F401 import sys # noqa: F401 from datadog_api_client.v1.model_uti...
40.437838
155
0.586285
import re import sys from datadog_api_client.v1.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_i...
true
true
f74fc64adccfd23d84a743e15ae2b6014cee947a
5,075
py
Python
wiseguy/loader.py
wsgicabal/wiseguy
a569aae29888036f0444245cbe15f0f18e23728b
[ "MIT" ]
2
2016-09-06T17:11:39.000Z
2019-07-28T19:46:49.000Z
wiseguy/loader.py
wsgicabal/wiseguy
a569aae29888036f0444245cbe15f0f18e23728b
[ "MIT" ]
null
null
null
wiseguy/loader.py
wsgicabal/wiseguy
a569aae29888036f0444245cbe15f0f18e23728b
[ "MIT" ]
null
null
null
import colander from yaml import load from pkg_resources import iter_entry_points from pkg_resources import load_entry_point from wiseguy.schema import NoSchema from wiseguy import WSGIComponent class EPParser(object): EP_GROUP = 'wiseguy.component' PASTE_EP_GROUPS = ('paste.filter_app_factory', 'paste.app_...
35.992908
80
0.571232
import colander from yaml import load from pkg_resources import iter_entry_points from pkg_resources import load_entry_point from wiseguy.schema import NoSchema from wiseguy import WSGIComponent class EPParser(object): EP_GROUP = 'wiseguy.component' PASTE_EP_GROUPS = ('paste.filter_app_factory', 'paste.app_...
true
true
f74fc666c011ca4f73a8ef3463629b7bcee96e80
68
py
Python
dice/__init__.py
jlowe77/Eris-Cogs
2ade8f82db3477527af3cff3b48ebb281e1a6987
[ "Apache-2.0" ]
6
2020-05-13T20:43:53.000Z
2021-06-23T16:10:13.000Z
dice/__init__.py
jlowe77/Eris-Cogs
2ade8f82db3477527af3cff3b48ebb281e1a6987
[ "Apache-2.0" ]
12
2019-04-02T13:29:10.000Z
2020-03-27T18:07:16.000Z
dice/__init__.py
jlowe77/Eris-Cogs
2ade8f82db3477527af3cff3b48ebb281e1a6987
[ "Apache-2.0" ]
9
2020-06-07T21:46:54.000Z
2022-03-01T22:49:02.000Z
from .dice import Dice def setup(bot): bot.add_cog(Dice(bot))
11.333333
26
0.676471
from .dice import Dice def setup(bot): bot.add_cog(Dice(bot))
true
true
f74fc6ab5598a7fd018b0d9aefca7144ce1a4d74
12,985
py
Python
eZmaxApi/model/field_pki_taxassignment_id.py
eZmaxinc/eZmax-SDK-python
5b4d54b69db68aab8ee814a1e26460a0af03784e
[ "MIT" ]
null
null
null
eZmaxApi/model/field_pki_taxassignment_id.py
eZmaxinc/eZmax-SDK-python
5b4d54b69db68aab8ee814a1e26460a0af03784e
[ "MIT" ]
null
null
null
eZmaxApi/model/field_pki_taxassignment_id.py
eZmaxinc/eZmax-SDK-python
5b4d54b69db68aab8ee814a1e26460a0af03784e
[ "MIT" ]
null
null
null
""" eZmax API Definition This API expose all the functionnalities for the eZmax and eZsign applications. # noqa: E501 The version of the OpenAPI document: 1.1.3 Contact: support-api@ezmax.ca Generated by: https://openapi-generator.tech """ import re # noqa: F401 import sys # noqa: F401 from ...
45.721831
425
0.561417
import re import sys from eZmaxApi.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, validate_get_composed_info, OpenApi...
true
true
f74fc6b035940199a7b9518dd7958f38c4ea4cdc
443
py
Python
tests/test_main.py
ChickenProp/gragrapy
9c24719c6fc843df2c506388aa21e64617cccc8d
[ "MIT" ]
1
2017-04-30T18:26:19.000Z
2017-04-30T18:26:19.000Z
tests/test_main.py
ChickenProp/gragrapy
9c24719c6fc843df2c506388aa21e64617cccc8d
[ "MIT" ]
4
2017-06-19T09:44:59.000Z
2017-06-19T09:58:57.000Z
tests/test_main.py
ChickenProp/gragrapy
9c24719c6fc843df2c506388aa21e64617cccc8d
[ "MIT" ]
null
null
null
from __future__ import (absolute_import, print_function, unicode_literals, division) from .context import gragrapy as gg from gragrapy.__main__ import parse_kwargs def test_parse_kwargs(): assert parse_kwargs([]) == {} assert parse_kwargs(['a=b', 'c=d']) == {'a': 'b', 'c': 'd'} ass...
36.916667
67
0.582393
from __future__ import (absolute_import, print_function, unicode_literals, division) from .context import gragrapy as gg from gragrapy.__main__ import parse_kwargs def test_parse_kwargs(): assert parse_kwargs([]) == {} assert parse_kwargs(['a=b', 'c=d']) == {'a': 'b', 'c': 'd'} ass...
true
true
f74fc6b88a13cd77e74b06c64847caa039183959
28,212
py
Python
venv/lib/python2.7/site-packages/werkzeug/testsuite/datastructures.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
21,684
2015-01-01T03:42:20.000Z
2022-03-30T13:32:44.000Z
venv/lib/python2.7/site-packages/werkzeug/testsuite/datastructures.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
4,067
2015-01-01T00:04:51.000Z
2022-03-30T13:42:56.000Z
venv/lib/python2.7/site-packages/werkzeug/testsuite/datastructures.py
Christian-Castro/castro_odoo8
8247fdb20aa39e043b6fa0c4d0af509462ab3e00
[ "Unlicense" ]
1,901
2015-01-01T21:05:59.000Z
2022-03-21T08:14:25.000Z
# -*- coding: utf-8 -*- """ werkzeug.testsuite.datastructures ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the functionality of the provided Werkzeug datastructures. TODO: - FileMultiDict - Immutable types undertested - Split up dict tests :copyright: (c) 2014 by Armin Ronacher....
34.786683
98
0.56476
from __future__ import with_statement import unittest import pickle from contextlib import contextmanager from copy import copy, deepcopy from werkzeug import datastructures from werkzeug._compat import iterkeys, itervalues, iteritems, iterlists, \ iterlistvalues, text_type, PY2 from werkzeug.testsuite import ...
true
true
f74fc6b98b142b0d7da6c6690a3263d082062862
750
py
Python
src/google/appengine/api/namespace_manager/__init__.py
myelin/appengine-python-standard
2a99acd114f7cdd66fbad9bfd185384eef847c84
[ "Apache-2.0" ]
null
null
null
src/google/appengine/api/namespace_manager/__init__.py
myelin/appengine-python-standard
2a99acd114f7cdd66fbad9bfd185384eef847c84
[ "Apache-2.0" ]
null
null
null
src/google/appengine/api/namespace_manager/__init__.py
myelin/appengine-python-standard
2a99acd114f7cdd66fbad9bfd185384eef847c84
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2007 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...
26.785714
74
0.762667
from __future__ import absolute_import from google.appengine.api.namespace_manager.namespace_manager import *
true
true
f74fc7551c162e5ef36009d9446b2082efb26f5f
13,509
py
Python
plugins/modules/panos_ha.py
EverOps/pan-os-ansible
26dcbc09987d6ecc54816c61d4ffcd757242344f
[ "Apache-2.0" ]
130
2020-02-25T14:39:35.000Z
2022-03-31T18:15:11.000Z
plugins/modules/panos_ha.py
EverOps/pan-os-ansible
26dcbc09987d6ecc54816c61d4ffcd757242344f
[ "Apache-2.0" ]
248
2020-02-17T09:25:55.000Z
2022-03-31T17:35:56.000Z
plugins/modules/panos_ha.py
EverOps/pan-os-ansible
26dcbc09987d6ecc54816c61d4ffcd757242344f
[ "Apache-2.0" ]
59
2020-02-20T20:34:10.000Z
2022-02-28T07:48:32.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2019 Palo Alto 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 # #...
29.69011
86
0.62958
from __future__ import absolute_import, division, print_function __metaclass__ = type DOCUMENTATION = """ --- module: panos_ha short_description: Configures High Availability on PAN-OS description: - Configures High Availability on PAN-OS in A/S and A/A modes including all HA interface conf...
true
true
f74fc7f7fc6da277c5a70a5e0c6d0ec49d47f09d
485
py
Python
2021/03/03a.py
befeleme/aoc
dec81ceeffb8746af28eeeb7f925b219f2445079
[ "WTFPL" ]
3
2021-12-07T17:46:48.000Z
2022-02-23T13:33:19.000Z
2021/03/03a.py
befeleme/aoc
dec81ceeffb8746af28eeeb7f925b219f2445079
[ "WTFPL" ]
null
null
null
2021/03/03a.py
befeleme/aoc
dec81ceeffb8746af28eeeb7f925b219f2445079
[ "WTFPL" ]
null
null
null
import fileinput report_numbers = [line.strip() for line in fileinput.input()] gamma = "" epsilon = "" for i in range(len(report_numbers[0])): zeros = 0 ones = 0 for entry in report_numbers: if entry[i] == "0": zeros += 1 else: ones += 1 else: if zeros >...
20.208333
61
0.480412
import fileinput report_numbers = [line.strip() for line in fileinput.input()] gamma = "" epsilon = "" for i in range(len(report_numbers[0])): zeros = 0 ones = 0 for entry in report_numbers: if entry[i] == "0": zeros += 1 else: ones += 1 else: if zeros >...
true
true
f74fc902c9345bf69e96f8d32bde1e1d5a3cf7d0
11,371
py
Python
cinder/tests/unit/db/test_migrations.py
lightsey/cinder
e03d68e42e57a63f8d0f3e177fb4287290612b24
[ "Apache-2.0" ]
3
2015-04-02T21:44:36.000Z
2016-04-29T21:19:04.000Z
cinder/tests/unit/db/test_migrations.py
lightsey/cinder
e03d68e42e57a63f8d0f3e177fb4287290612b24
[ "Apache-2.0" ]
3
2016-04-29T21:45:26.000Z
2016-05-04T19:41:23.000Z
cinder/tests/unit/db/test_migrations.py
lightsey/cinder
e03d68e42e57a63f8d0f3e177fb4287290612b24
[ "Apache-2.0" ]
4
2016-01-27T00:25:52.000Z
2021-03-25T19:54:08.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 # d...
41.652015
79
0.670917
import os import fixtures from migrate.versioning import api as migration_api from migrate.versioning import repository from oslo_db.sqlalchemy import enginefacade from oslo_db.sqlalchemy import test_fixtures from oslo_db.sqlalchemy import test_migrations from oslo_db.sqlalchemy import utils as db_utils f...
true
true
f74fcae2f291b293251dece9f267944766ed4331
5,803
py
Python
src/pip/_internal/resolution/resolvelib/provider.py
honza1a/pip
c74577e18e4fc7cb84f5add93ae156badf299e2e
[ "MIT" ]
1
2021-01-26T12:46:40.000Z
2021-01-26T12:46:40.000Z
src/pip/_internal/resolution/resolvelib/provider.py
honza1a/pip
c74577e18e4fc7cb84f5add93ae156badf299e2e
[ "MIT" ]
null
null
null
src/pip/_internal/resolution/resolvelib/provider.py
honza1a/pip
c74577e18e4fc7cb84f5add93ae156badf299e2e
[ "MIT" ]
null
null
null
from pip._vendor.packaging.specifiers import SpecifierSet from pip._vendor.resolvelib.providers import AbstractProvider from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import Any, Dict, Optional, Sequence, Set, Tuple, Union from pip._internal.req.req_install impor...
41.156028
79
0.667413
from pip._vendor.packaging.specifiers import SpecifierSet from pip._vendor.resolvelib.providers import AbstractProvider from pip._internal.utils.typing import MYPY_CHECK_RUNNING if MYPY_CHECK_RUNNING: from typing import Any, Dict, Optional, Sequence, Set, Tuple, Union from pip._internal.req.req_install impor...
true
true
f74fcb2083f6780f3c5c69d00eed2899776601ec
32,879
py
Python
pytype/tests/test_enums.py
odidev/pytype
7824bbee4809184852a7c5f2faaac6a77f0075d4
[ "Apache-2.0" ]
null
null
null
pytype/tests/test_enums.py
odidev/pytype
7824bbee4809184852a7c5f2faaac6a77f0075d4
[ "Apache-2.0" ]
null
null
null
pytype/tests/test_enums.py
odidev/pytype
7824bbee4809184852a7c5f2faaac6a77f0075d4
[ "Apache-2.0" ]
null
null
null
"""Tests for the enum overlay.""" from pytype import file_utils from pytype.tests import test_base class EnumOverlayTest(test_base.BaseTest): """Tests the overlay.""" def test_can_import_module_members(self): self.Check(""" import enum enum.Enum enum.IntEnum enum.IntFlag enum.F...
26.579628
101
0.552541
from pytype import file_utils from pytype.tests import test_base class EnumOverlayTest(test_base.BaseTest): def test_can_import_module_members(self): self.Check(""" import enum enum.Enum enum.IntEnum enum.IntFlag enum.Flag enum.unique enum.auto """) def test_cr...
true
true
f74fccb2227c73c6ace0cd397b05ef9e30e94188
4,359
py
Python
source/blockchain_backup/bitcoin/models.py
denova-com/blockchain-backup
a445bcbd67bd6485a4969dc1e24d51fbffc43cff
[ "OLDAP-2.6", "OLDAP-2.4" ]
null
null
null
source/blockchain_backup/bitcoin/models.py
denova-com/blockchain-backup
a445bcbd67bd6485a4969dc1e24d51fbffc43cff
[ "OLDAP-2.6", "OLDAP-2.4" ]
null
null
null
source/blockchain_backup/bitcoin/models.py
denova-com/blockchain-backup
a445bcbd67bd6485a4969dc1e24d51fbffc43cff
[ "OLDAP-2.6", "OLDAP-2.4" ]
null
null
null
''' Models for bitcoin core. Copyright 2018-2022 DeNova Last modified: 2022-01-10 ''' from django.core.validators import MaxValueValidator from django.db import models from django.utils.translation import gettext_lazy as _ MAX_LENGTH = 1000 # default max length class HourField(models.PositiveSmallInte...
37.577586
100
0.704519
from django.core.validators import MaxValueValidator from django.db import models from django.utils.translation import gettext_lazy as _ MAX_LENGTH = 1000 class HourField(models.PositiveSmallIntegerField): default_validators = [MaxValueValidator(24, message='Backup schedule must be less t...
true
true
f74fcd1890eb1e7517c8b897c15f3bb36459d51a
12,643
py
Python
speakeasy/windows/fileman.py
mandiant/speakeasy
0981fa3865d9c41371fe7691568ba96cd021b2ad
[ "MIT" ]
121
2021-09-22T01:18:05.000Z
2022-03-31T14:05:08.000Z
speakeasy/windows/fileman.py
mandiant/speakeasy
0981fa3865d9c41371fe7691568ba96cd021b2ad
[ "MIT" ]
12
2021-09-23T20:24:43.000Z
2022-03-06T23:14:35.000Z
speakeasy/windows/fileman.py
mandiant/speakeasy
0981fa3865d9c41371fe7691568ba96cd021b2ad
[ "MIT" ]
26
2021-10-04T12:37:34.000Z
2022-03-30T17:18:53.000Z
# Copyright (C) 2020 FireEye, Inc. All Rights Reserved. import os import io import ntpath import hashlib import fnmatch import shlex import speakeasy.winenv.defs.windows.windows as windefs import speakeasy.winenv.arch as _arch from speakeasy.errors import FileSystemEmuError def normalize_response_path(path): def...
28.799544
85
0.550581
import os import io import ntpath import hashlib import fnmatch import shlex import speakeasy.winenv.defs.windows.windows as windefs import speakeasy.winenv.arch as _arch from speakeasy.errors import FileSystemEmuError def normalize_response_path(path): def _get_speakeasy_root(): return os.path.join(os....
true
true
f74fce4512435ced7376f94527a905aff1f5dbf5
571
py
Python
application/migrations/0010_auto_20200407_1447.py
City-of-Helsinki/events-helsinki-cms
64e4c1ce6cc058fb3783e417560dc244bd753d05
[ "MIT" ]
2
2020-04-20T05:37:28.000Z
2021-02-19T10:33:45.000Z
application/migrations/0010_auto_20200407_1447.py
City-of-Helsinki/events-helsinki-cms
64e4c1ce6cc058fb3783e417560dc244bd753d05
[ "MIT" ]
6
2020-02-12T12:55:37.000Z
2021-03-30T12:56:28.000Z
application/migrations/0010_auto_20200407_1447.py
City-of-Helsinki/events-helsinki-cms
64e4c1ce6cc058fb3783e417560dc244bd753d05
[ "MIT" ]
1
2021-02-18T12:11:18.000Z
2021-02-18T12:11:18.000Z
# Generated by Django 2.2.9 on 2020-04-07 14:47 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('application', '0009_auto_20200407_1208'), ] operations = [ migrations.RemoveField( model_name='collections', name='subtitles...
21.961538
51
0.569177
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('application', '0009_auto_20200407_1208'), ] operations = [ migrations.RemoveField( model_name='collections', name='subtitles_en', ), migrations.RemoveField...
true
true
f74fce5bb0bd5edeec355756843a8e7e8e7d629b
4,701
py
Python
elm_deps_upgrade.py
NoRedInk/elm-ops-tooling
35d88e4903e9be19cfc79b705e4f5a4189e4d467
[ "BSD-3-Clause" ]
89
2016-03-08T05:19:33.000Z
2019-10-17T20:50:16.000Z
elm_deps_upgrade.py
NoRedInk/elm-ops-tooling
35d88e4903e9be19cfc79b705e4f5a4189e4d467
[ "BSD-3-Clause" ]
15
2016-03-19T22:30:14.000Z
2018-10-10T13:35:19.000Z
elm_deps_upgrade.py
NoRedInk/elm-ops-tooling
35d88e4903e9be19cfc79b705e4f5a4189e4d467
[ "BSD-3-Clause" ]
11
2016-03-19T22:20:08.000Z
2018-06-29T15:20:21.000Z
#! /usr/bin/env python from __future__ import print_function import sys import json import requests import struct import argparse def load_all_packages(elm_version, url=None): if url is None: url = "http://package.elm-lang.org/all-packages?elm-package-version=" payload = requests.get("{url}{elm_versi...
28.664634
108
0.610508
from __future__ import print_function import sys import json import requests import struct import argparse def load_all_packages(elm_version, url=None): if url is None: url = "http://package.elm-lang.org/all-packages?elm-package-version=" payload = requests.get("{url}{elm_version}".format( u...
true
true
f74fcf14ed8b92d3bd70c9ab09320b4917d8405b
11,775
py
Python
dashboard/modules/job/tests/test_http_job_server.py
takeshi-yoshimura/ray
cc577c10edbfc8b4248e2776947e1e0d5dbf4585
[ "Apache-2.0" ]
1
2022-03-14T04:24:17.000Z
2022-03-14T04:24:17.000Z
dashboard/modules/job/tests/test_http_job_server.py
takeshi-yoshimura/ray
cc577c10edbfc8b4248e2776947e1e0d5dbf4585
[ "Apache-2.0" ]
21
2022-02-04T21:02:54.000Z
2022-03-26T07:12:56.000Z
dashboard/modules/job/tests/test_http_job_server.py
takeshi-yoshimura/ray
cc577c10edbfc8b4248e2776947e1e0d5dbf4585
[ "Apache-2.0" ]
null
null
null
import logging from pathlib import Path import sys import tempfile from typing import Optional import pytest from unittest.mock import patch import ray from ray.dashboard.modules.job.common import CURRENT_VERSION, JobStatus from ray.dashboard.modules.job.sdk import ( ClusterInfo, JobSubmissionClient, pars...
30.744125
87
0.642633
import logging from pathlib import Path import sys import tempfile from typing import Optional import pytest from unittest.mock import patch import ray from ray.dashboard.modules.job.common import CURRENT_VERSION, JobStatus from ray.dashboard.modules.job.sdk import ( ClusterInfo, JobSubmissionClient, pars...
true
true
f74fd02b7cb681d312624ebd95bcf16d52a8a7b7
33,487
py
Python
libraries/botbuilder-ai/microsoft/botbuilder/ai/language_map.py
matthewshim-ms/botbuilder-python
f3dbce50de01a43afdcf3efdbdca6e0d5c96dc98
[ "MIT" ]
null
null
null
libraries/botbuilder-ai/microsoft/botbuilder/ai/language_map.py
matthewshim-ms/botbuilder-python
f3dbce50de01a43afdcf3efdbdca6e0d5c96dc98
[ "MIT" ]
null
null
null
libraries/botbuilder-ai/microsoft/botbuilder/ai/language_map.py
matthewshim-ms/botbuilder-python
f3dbce50de01a43afdcf3efdbdca6e0d5c96dc98
[ "MIT" ]
null
null
null
# coding=utf-8 #------------------------------------------------------------------------ # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #------------------------------------------------------------------------ ...
61.784133
114
0.569743
class LanguageMap: codes_to_names: dict = {} names_to_codes: dict = {} names_to_names: dict = {} def __init__(self): self.add("ar", "Arabic") self.add("bs-Latn", "Bosnian") self.add("bg", "Bulgarian") self.add("ca", "Catalan") self.add("zh-CHS", "Chinese ...
true
true
f74fd163d0ec0937ff20525c5af4a93ce5511cea
3,423
py
Python
opsgenie_sdk/api/alert/add_details_to_alert_payload_all_of.py
jkinred/opsgenie-python-sdk
69bbd671d2257c6c3ab2f3f113cb62bd1a941c02
[ "Apache-2.0" ]
null
null
null
opsgenie_sdk/api/alert/add_details_to_alert_payload_all_of.py
jkinred/opsgenie-python-sdk
69bbd671d2257c6c3ab2f3f113cb62bd1a941c02
[ "Apache-2.0" ]
null
null
null
opsgenie_sdk/api/alert/add_details_to_alert_payload_all_of.py
jkinred/opsgenie-python-sdk
69bbd671d2257c6c3ab2f3f113cb62bd1a941c02
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Python SDK for Opsgenie REST API Python SDK for Opsgenie REST API # noqa: E501 The version of the OpenAPI document: 2.0.0 Contact: support@opsgenie.com Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class AddDetailsToAle...
29.25641
113
0.583114
import pprint import re import six class AddDetailsToAlertPayloadAllOf(object): openapi_types = { 'details': 'dict(str, str)' } attribute_map = { 'details': 'details' } def __init__(self, details=None): self._details = None self.discriminator = None ...
true
true
f74fd198ce5818eca6b5be8a6eeb83ff85317ae5
4,890
py
Python
src/hackeme/frontend/hackeme_base_parser.py
ThomasBollmeier/hackeme-native
1bd9eac3eb057661045bcc1a612f8fc704f6d809
[ "Apache-2.0" ]
null
null
null
src/hackeme/frontend/hackeme_base_parser.py
ThomasBollmeier/hackeme-native
1bd9eac3eb057661045bcc1a612f8fc704f6d809
[ "Apache-2.0" ]
null
null
null
src/hackeme/frontend/hackeme_base_parser.py
ThomasBollmeier/hackeme-native
1bd9eac3eb057661045bcc1a612f8fc704f6d809
[ "Apache-2.0" ]
null
null
null
from komparse import Parser, Grammar, Sequence, OneOf, \ Optional, OneOrMore, Many class _Grammar(Grammar): def __init__(self): Grammar.__init__(self, case_sensitive=True) self._init_tokens() self._init_rules() def _init_tokens(self): self.add_comment(';', '\n') ...
27.784091
67
0.471984
from komparse import Parser, Grammar, Sequence, OneOf, \ Optional, OneOrMore, Many class _Grammar(Grammar): def __init__(self): Grammar.__init__(self, case_sensitive=True) self._init_tokens() self._init_rules() def _init_tokens(self): self.add_comment(';', '\n') ...
true
true
f74fd221e93f71eb9f5ce4b10c2dfb5c095ff7ef
370
py
Python
pyAitu/models/update/quick_button_selected.py
waihislam/pyAitu
6e7c3bfa7454d6ae91ba998017cf772bb6a25770
[ "Apache-2.0" ]
11
2019-09-26T05:09:20.000Z
2021-05-20T10:45:28.000Z
pyAitu/models/update/quick_button_selected.py
waihislam/pyAitu
6e7c3bfa7454d6ae91ba998017cf772bb6a25770
[ "Apache-2.0" ]
8
2019-10-08T13:41:09.000Z
2020-06-25T11:35:56.000Z
pyAitu/models/update/quick_button_selected.py
waihislam/pyAitu
6e7c3bfa7454d6ae91ba998017cf772bb6a25770
[ "Apache-2.0" ]
4
2020-02-18T09:02:37.000Z
2020-11-25T06:11:05.000Z
from ..peer import Peer class QuickButtonSelected: def __init__(self, json_object): self.update_id = json_object.get("updateId") self.dialog = Peer(json_object.get("dialog")) self.sender = Peer(json_object.get("sender")) self.metadata = json_object.get("metadata") @property ...
26.428571
53
0.662162
from ..peer import Peer class QuickButtonSelected: def __init__(self, json_object): self.update_id = json_object.get("updateId") self.dialog = Peer(json_object.get("dialog")) self.sender = Peer(json_object.get("sender")) self.metadata = json_object.get("metadata") @property ...
true
true
f74fd2bb8451bf78d94384e84621312584437bda
626
py
Python
ccal/check_bam_using_samtools_flagstat.py
kberkey/ccal
92aa8372997dccec2908928f71a11b6c8327d7aa
[ "MIT" ]
null
null
null
ccal/check_bam_using_samtools_flagstat.py
kberkey/ccal
92aa8372997dccec2908928f71a11b6c8327d7aa
[ "MIT" ]
null
null
null
ccal/check_bam_using_samtools_flagstat.py
kberkey/ccal
92aa8372997dccec2908928f71a11b6c8327d7aa
[ "MIT" ]
null
null
null
from os.path import isfile from ._print_and_run_command import _print_and_run_command def check_bam_using_samtools_flagstat(bam_file_path, n_job=1, overwrite=False): flagstat_file_path = "{}.flagstat".format(bam_file_path) if not overwrite and isfile(flagstat_file_path): raise FileExistsError(flag...
25.04
79
0.715655
from os.path import isfile from ._print_and_run_command import _print_and_run_command def check_bam_using_samtools_flagstat(bam_file_path, n_job=1, overwrite=False): flagstat_file_path = "{}.flagstat".format(bam_file_path) if not overwrite and isfile(flagstat_file_path): raise FileExistsError(flag...
true
true
f74fd455bc37a6df3bfa50d788c4b905cabdfc41
111,209
py
Python
dojo/api_v2/views.py
lukzen/django-DefectDojo
9be7b81b39ea72c533655d52141a748f4cdfaedc
[ "BSD-3-Clause" ]
null
null
null
dojo/api_v2/views.py
lukzen/django-DefectDojo
9be7b81b39ea72c533655d52141a748f4cdfaedc
[ "BSD-3-Clause" ]
39
2022-01-13T23:52:59.000Z
2022-03-28T21:22:27.000Z
dojo/api_v2/views.py
lukzen/django-DefectDojo
9be7b81b39ea72c533655d52141a748f4cdfaedc
[ "BSD-3-Clause" ]
null
null
null
from rest_framework.generics import GenericAPIView from drf_spectacular.types import OpenApiTypes from crum import get_current_user from django.http import HttpResponse, Http404 from django.shortcuts import get_object_or_404 from django.utils import timezone from django.core.exceptions import ValidationError from djang...
45.005666
184
0.64787
from rest_framework.generics import GenericAPIView from drf_spectacular.types import OpenApiTypes from crum import get_current_user from django.http import HttpResponse, Http404 from django.shortcuts import get_object_or_404 from django.utils import timezone from django.core.exceptions import ValidationError from djang...
true
true
f74fd49c2d608329bd5e66d688b6f180ee9ea170
3,070
py
Python
tests/h/util/query_test.py
discodavey/h
7bff8478b3a5b936de82ac9fcd89b355f4afd3aa
[ "MIT" ]
1
2018-03-09T02:15:16.000Z
2018-03-09T02:15:16.000Z
tests/h/util/query_test.py
discodavey/h
7bff8478b3a5b936de82ac9fcd89b355f4afd3aa
[ "MIT" ]
16
2018-03-14T21:23:46.000Z
2019-04-29T18:55:28.000Z
tests/h/util/query_test.py
SenseTW/h
dae2dfa8ab064ddb696e5657d48459114b2642d2
[ "MIT" ]
1
2021-03-12T09:45:04.000Z
2021-03-12T09:45:04.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals import string import pytest import sqlalchemy as sa from h._compat import text_type from h.util.query import column_windows meta = sa.MetaData() test_cw = sa.Table( 'test_column_windows', meta, sa.Column('id', sa.Integer, autoincrement=...
32.315789
85
0.614007
from __future__ import unicode_literals import string import pytest import sqlalchemy as sa from h._compat import text_type from h.util.query import column_windows meta = sa.MetaData() test_cw = sa.Table( 'test_column_windows', meta, sa.Column('id', sa.Integer, autoincrement=True, primary_key=True)...
true
true
f74fd9161a8502252a9ba98dc808b2299711b16c
1,133
py
Python
figure-scripts/simple-spherical-grid.py
adcroft/Analyzing-ESM-data-with-python
fc94d8f880d1f389c8f2d7a62b29cb687f3d772d
[ "MIT" ]
null
null
null
figure-scripts/simple-spherical-grid.py
adcroft/Analyzing-ESM-data-with-python
fc94d8f880d1f389c8f2d7a62b29cb687f3d772d
[ "MIT" ]
null
null
null
figure-scripts/simple-spherical-grid.py
adcroft/Analyzing-ESM-data-with-python
fc94d8f880d1f389c8f2d7a62b29cb687f3d772d
[ "MIT" ]
null
null
null
def drw_grid(subplot, projection, lw=1, dlon=30, dlat=30): ax=plt.subplot(subplot, projection=projection) z = numpy.linspace(0,1,128) lon0 = -int(180/dlon)*dlon # Grid lines for lon in range(lon0, 181, dlon): ax.plot(lon+0*z,-89+178*z,'k--',transform=cartopy.crs.PlateCarree(),linewidth=lw) ...
47.208333
90
0.667255
def drw_grid(subplot, projection, lw=1, dlon=30, dlat=30): ax=plt.subplot(subplot, projection=projection) z = numpy.linspace(0,1,128) lon0 = -int(180/dlon)*dlon for lon in range(lon0, 181, dlon): ax.plot(lon+0*z,-89+178*z,'k--',transform=cartopy.crs.PlateCarree(),linewidth=lw) lat0 = -i...
true
true
f74fd96ec0c3d6781a79a4d436e3bd2a552e4e1a
137
py
Python
train_with_your_data/scripts/config_u.py
ciceklab/targeted_brain_tumor_margin_assessment
2cf729019dfc1785992208a69c353a659c9b6448
[ "MIT" ]
1
2021-12-11T20:06:39.000Z
2021-12-11T20:06:39.000Z
train_with_your_data/scripts/config_u.py
ciceklab/targeted_brain_tumor_margin_assessment
2cf729019dfc1785992208a69c353a659c9b6448
[ "MIT" ]
null
null
null
train_with_your_data/scripts/config_u.py
ciceklab/targeted_brain_tumor_margin_assessment
2cf729019dfc1785992208a69c353a659c9b6448
[ "MIT" ]
2
2021-12-15T18:17:17.000Z
2021-12-16T12:08:30.000Z
base = 'path/to/folder/train_with_your_data' #please do not put / at the end lib = "/path/to/the/pyNMR" #please do not put / at the end
34.25
76
0.708029
base = 'path/to/folder/train_with_your_data' lib = "/path/to/the/pyNMR"
true
true
f74fd9c1854683b449f4fa85fce2ea89e7ce26bd
4,987
py
Python
depends/depends_scenegraph_widget.py
mottosso/dependsworkflow
5ed30d2e29d97a1baad1068837fbee54988c8175
[ "BSD-3-Clause" ]
2
2016-02-18T04:26:50.000Z
2017-06-06T13:21:23.000Z
depends/depends_scenegraph_widget.py
mottosso/dependsworkflow
5ed30d2e29d97a1baad1068837fbee54988c8175
[ "BSD-3-Clause" ]
null
null
null
depends/depends_scenegraph_widget.py
mottosso/dependsworkflow
5ed30d2e29d97a1baad1068837fbee54988c8175
[ "BSD-3-Clause" ]
null
null
null
# # Depends # Copyright (C) 2014 by Andrew Gardner & Jonas Unger. All rights reserved. # BSD license (LICENSE.txt for details). # from PySide import QtCore, QtGui import depends_node import depends_data_packet """ A QT graphics widget that displays the state of a given scenegraph. The user can also mouseover a gi...
34.393103
183
0.720273
from PySide import QtCore, QtGui import depends_node import depends_data_packet
true
true
f74fdb05d4fcbe2ed60e99cde689665d7ba186f2
1,878
py
Python
play/flaskTrySecurity2.py
WorldViews/Spirals
7efe2d145298a53c9d79db73b79428efff1e0908
[ "MIT" ]
null
null
null
play/flaskTrySecurity2.py
WorldViews/Spirals
7efe2d145298a53c9d79db73b79428efff1e0908
[ "MIT" ]
2
2021-02-08T20:23:17.000Z
2021-04-30T20:42:00.000Z
play/flaskTrySecurity2.py
WorldViews/Spirals
7efe2d145298a53c9d79db73b79428efff1e0908
[ "MIT" ]
2
2016-05-26T20:24:00.000Z
2019-08-01T03:11:49.000Z
from flask import Flask, render_template from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.security import Security, SQLAlchemyUserDatastore, \ UserMixin, RoleMixin, login_required # Create app app = Flask(__name__) app.config['DEBUG'] = True app.config['SECRET_KEY'] = 'super-secret' app.config['SQLALCHE...
30.786885
76
0.678381
from flask import Flask, render_template from flask.ext.sqlalchemy import SQLAlchemy from flask.ext.security import Security, SQLAlchemyUserDatastore, \ UserMixin, RoleMixin, login_required app = Flask(__name__) app.config['DEBUG'] = True app.config['SECRET_KEY'] = 'super-secret' app.config['SQLALCHEMY_DATABASE_...
true
true
f74fdb4eec276c2c8867a28bacbf2b9c7599cb69
945
py
Python
Maths/src/mmmr.py
joshturge/year12
9775306e0e3b84f1236a076776c34b006cb93246
[ "MIT" ]
null
null
null
Maths/src/mmmr.py
joshturge/year12
9775306e0e3b84f1236a076776c34b006cb93246
[ "MIT" ]
null
null
null
Maths/src/mmmr.py
joshturge/year12
9775306e0e3b84f1236a076776c34b006cb93246
[ "MIT" ]
null
null
null
from math import ceil, floor from collections import Counter def mean(numLS): """ Finds the sum of a list of numbers and divided by the length of the list leaving the mean. """ return sum(numLS) / float(len(numLS)) def median(numLS): """ The middle value of a set of ordered data. """ ...
22.5
57
0.601058
from math import ceil, floor from collections import Counter def mean(numLS): return sum(numLS) / float(len(numLS)) def median(numLS): def medFormula(numLS): return (len(numLS) + 1) / 2 - 1 numLS.sort() if (len(numLS) % 2) == 0: belMed = numLS[int(floor(medFormula(numLS)))] a...
true
true
f74fdc2763f55f3b46a41633bf1657e69f52b78a
1,514
py
Python
setup.py
yhal-nesi/elasticcmd
6039a866357859ddedcd84206cdffb70f9e9ea0e
[ "MIT" ]
null
null
null
setup.py
yhal-nesi/elasticcmd
6039a866357859ddedcd84206cdffb70f9e9ea0e
[ "MIT" ]
null
null
null
setup.py
yhal-nesi/elasticcmd
6039a866357859ddedcd84206cdffb70f9e9ea0e
[ "MIT" ]
null
null
null
#!/usr/bin/env python """The setup script.""" from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ ] setup_requirements = ['pytest-runner', ] test_requiremen...
28.037037
67
0.639366
from setuptools import setup, find_packages with open('README.rst') as readme_file: readme = readme_file.read() with open('HISTORY.rst') as history_file: history = history_file.read() requirements = [ ] setup_requirements = ['pytest-runner', ] test_requirements = ['pytest>=3', ] setup( author="Yuri...
true
true
f74fdcd072f89c47634b870becbf8f4adaaa609d
4,857
py
Python
tests/searching.py
polca/wurst
fc2b0bb39b3cdf2190725e61a03c8e30e8aa08b5
[ "BSD-2-Clause" ]
12
2020-02-04T18:03:17.000Z
2022-03-29T16:29:33.000Z
tests/searching.py
IndEcol/wurst
d2770711435661b77462e57b8c0408eb7d713f47
[ "BSD-2-Clause" ]
21
2017-09-13T09:11:56.000Z
2018-11-13T13:43:51.000Z
tests/searching.py
polca/wurst
fc2b0bb39b3cdf2190725e61a03c8e30e8aa08b5
[ "BSD-2-Clause" ]
5
2020-06-03T23:56:32.000Z
2022-02-12T10:27:58.000Z
from wurst.searching import * from wurst.errors import MultipleResults, NoResults import pytest def test_contains(): func = contains("n", "foo") assert func({"n": "foobar"}) assert not func({"n": "bar"}) def test_equals(): func = equals("n", "foo") assert func({"n": "foo"}) assert not func({...
27.754286
87
0.490838
from wurst.searching import * from wurst.errors import MultipleResults, NoResults import pytest def test_contains(): func = contains("n", "foo") assert func({"n": "foobar"}) assert not func({"n": "bar"}) def test_equals(): func = equals("n", "foo") assert func({"n": "foo"}) assert not func({...
true
true
f74fdcd1575d34177509365f11222f221d7f60e5
87
py
Python
app/whoami.py
nvsmirnov/timekprw
d8118dcf86053da1076f76099ffb4711cb80d28e
[ "MIT" ]
null
null
null
app/whoami.py
nvsmirnov/timekprw
d8118dcf86053da1076f76099ffb4711cb80d28e
[ "MIT" ]
null
null
null
app/whoami.py
nvsmirnov/timekprw
d8118dcf86053da1076f76099ffb4711cb80d28e
[ "MIT" ]
null
null
null
import sys def whoami(depth=1): return f"{sys._getframe(depth).f_code.co_name}()"
17.4
53
0.701149
import sys def whoami(depth=1): return f"{sys._getframe(depth).f_code.co_name}()"
true
true
f74fdd12bdfcffe6285b81785646f57aab4459ff
10,581
py
Python
tests/test_mnist.py
RainingComputers/pykitml
1c3e50cebcdb6c4da63979ef9a812b44d23a4857
[ "MIT" ]
34
2020-03-06T07:53:43.000Z
2022-03-13T06:12:29.000Z
tests/test_mnist.py
RainingComputers/pykitml
1c3e50cebcdb6c4da63979ef9a812b44d23a4857
[ "MIT" ]
6
2021-06-08T22:43:23.000Z
2022-03-08T13:57:33.000Z
tests/test_mnist.py
RainingComputers/pykitml
1c3e50cebcdb6c4da63979ef9a812b44d23a4857
[ "MIT" ]
1
2020-11-30T21:20:32.000Z
2020-11-30T21:20:32.000Z
import sys import os.path import numpy as np import pykitml as pk from pykitml.datasets import mnist from pykitml.testing import pktest_graph, pktest_nograph def test_download(): # Download the mnist data set mnist.get() # Test ran successfully assert True @pktest_graph def test_adagrad(): # Load...
30.492795
92
0.697004
import sys import os.path import numpy as np import pykitml as pk from pykitml.datasets import mnist from pykitml.testing import pktest_graph, pktest_nograph def test_download(): mnist.get() assert True @pktest_graph def test_adagrad(): training_data, training_targets, testing_data, testin...
true
true
f74fdd32358002fb254ae4966ba279c1901e88f8
805
py
Python
src/obfuscapk/obfuscators/new_signature/__init__.py
binaryflesh/Obfuscapk
56404d3149832ac48a337b0463eacfb3cd7f4573
[ "MIT" ]
null
null
null
src/obfuscapk/obfuscators/new_signature/__init__.py
binaryflesh/Obfuscapk
56404d3149832ac48a337b0463eacfb3cd7f4573
[ "MIT" ]
null
null
null
src/obfuscapk/obfuscators/new_signature/__init__.py
binaryflesh/Obfuscapk
56404d3149832ac48a337b0463eacfb3cd7f4573
[ "MIT" ]
null
null
null
#!/usr/bin/env python3.7 import logging from obfuscapk import obfuscator_category from obfuscapk.obfuscation import Obfuscation class NewSignature(obfuscator_category.ITrivialObfuscator): def __init__(self): self.logger = logging.getLogger('{0}.{1}'.format(__name__, self.__class__.__name__)) su...
30.961538
115
0.695652
import logging from obfuscapk import obfuscator_category from obfuscapk.obfuscation import Obfuscation class NewSignature(obfuscator_category.ITrivialObfuscator): def __init__(self): self.logger = logging.getLogger('{0}.{1}'.format(__name__, self.__class__.__name__)) super().__init__() de...
true
true
f74fddb694ed901222d238e1a5e022059ab666d6
27,085
py
Python
xarray/backends/zarr.py
Geektrovert/xarray
6b165b6d76c40f9478d2881c8e8dca8e1ce561d9
[ "Apache-2.0" ]
1
2019-03-02T04:41:10.000Z
2019-03-02T04:41:10.000Z
xarray/backends/zarr.py
Geektrovert/xarray
6b165b6d76c40f9478d2881c8e8dca8e1ce561d9
[ "Apache-2.0" ]
null
null
null
xarray/backends/zarr.py
Geektrovert/xarray
6b165b6d76c40f9478d2881c8e8dca8e1ce561d9
[ "Apache-2.0" ]
null
null
null
import warnings import numpy as np from .. import coding, conventions from ..core import indexing from ..core.pycompat import integer_types from ..core.utils import FrozenDict, HiddenKeyDict from ..core.variable import Variable from .common import AbstractWritableDataStore, BackendArray, _encode_variable_name # need...
37.051984
103
0.615839
import warnings import numpy as np from .. import coding, conventions from ..core import indexing from ..core.pycompat import integer_types from ..core.utils import FrozenDict, HiddenKeyDict from ..core.variable import Variable from .common import AbstractWritableDataStore, BackendArray, _encode_variable_name DIMEN...
true
true
f74fde65603c834066d605347da5bf97d8a66555
1,973
py
Python
face_detector.py
testinground/Proctoring-AI
27b04739fa8f126e3c796ea5e9a21bdfbf48debf
[ "MIT" ]
1
2021-05-28T01:51:57.000Z
2021-05-28T01:51:57.000Z
face_detector.py
testinground/Proctoring-AI
27b04739fa8f126e3c796ea5e9a21bdfbf48debf
[ "MIT" ]
null
null
null
face_detector.py
testinground/Proctoring-AI
27b04739fa8f126e3c796ea5e9a21bdfbf48debf
[ "MIT" ]
1
2021-05-28T01:51:59.000Z
2021-05-28T01:51:59.000Z
# -*- coding: utf-8 -*- """ Created on Wed Jul 29 17:52:00 2020 @author: hp """ import cv2 import numpy as np def get_face_detector(modelFile = "models/res10_300x300_ssd_iter_140000.caffemodel", configFile = "models/deploy.prototxt"): """ Get the face detection caffe model of OpenCV's D...
24.060976
93
0.57628
import cv2 import numpy as np def get_face_detector(modelFile = "models/res10_300x300_ssd_iter_140000.caffemodel", configFile = "models/deploy.prototxt"): modelFile = "models/res10_300x300_ssd_iter_140000.caffemodel" configFile = "models/deploy.prototxt" model = cv2.dnn.readNetFromC...
true
true
f74fdf24392c52f3065699a8d38d1d66a179183c
2,662
py
Python
mainOld.py
tiagodiana/assistente-virtual
4ee14045c53c3ea6c8233fa12e588bbc7442e33b
[ "Apache-2.0" ]
4
2020-01-14T00:07:42.000Z
2020-03-24T02:22:42.000Z
mainOld.py
tiagodiana/assistente-virtual
4ee14045c53c3ea6c8233fa12e588bbc7442e33b
[ "Apache-2.0" ]
null
null
null
mainOld.py
tiagodiana/assistente-virtual
4ee14045c53c3ea6c8233fa12e588bbc7442e33b
[ "Apache-2.0" ]
5
2020-01-13T21:45:39.000Z
2020-04-05T01:18:49.000Z
# Imports library """ from chatterbot import ChatBot """ import pyttsx3 from gtts import gTTS from playsound import playsound import sys import speech_recognition as sr from images.face import reconhecimento_facial class Main(): def __init__(self): self.response = "" self.speech = "" sel...
32.864198
97
0.517656
import pyttsx3 from gtts import gTTS from playsound import playsound import sys import speech_recognition as sr from images.face import reconhecimento_facial class Main(): def __init__(self): self.response = "" self.speech = "" self.r = "" self.nome = "" self.boot = "Seg...
true
true
f74fdfc4a158c54ebc8bc67e6effbff0669e935a
1,489
py
Python
url_shorten_api/core/serializers.py
dorukuzucu/url_shorten
577a602483ddfb61ac49d5c9656ca098630e8d6f
[ "Apache-2.0" ]
null
null
null
url_shorten_api/core/serializers.py
dorukuzucu/url_shorten
577a602483ddfb61ac49d5c9656ca098630e8d6f
[ "Apache-2.0" ]
null
null
null
url_shorten_api/core/serializers.py
dorukuzucu/url_shorten
577a602483ddfb61ac49d5c9656ca098630e8d6f
[ "Apache-2.0" ]
null
null
null
from rest_framework import serializers from django.core.validators import URLValidator from django.core.exceptions import ValidationError from .models import User from .models import ShortenedUrl class RegisterSerializer(serializers.ModelSerializer): class Meta: model = User fields = ("id", "emai...
31.680851
95
0.661518
from rest_framework import serializers from django.core.validators import URLValidator from django.core.exceptions import ValidationError from .models import User from .models import ShortenedUrl class RegisterSerializer(serializers.ModelSerializer): class Meta: model = User fields = ("id", "emai...
true
true
f74fe06e03420d6ef35194d659ff976e0f191060
9,056
py
Python
selfdrive/car/interfaces.py
dermida/openpilot
7aec87896ec53a536af5cec97548b5d66c49fbda
[ "MIT" ]
45
2020-09-10T02:43:34.000Z
2022-03-23T12:12:48.000Z
selfdrive/car/interfaces.py
dermida/openpilot
7aec87896ec53a536af5cec97548b5d66c49fbda
[ "MIT" ]
4
2021-07-17T19:33:13.000Z
2021-12-26T02:51:07.000Z
selfdrive/car/interfaces.py
dermida/openpilot
7aec87896ec53a536af5cec97548b5d66c49fbda
[ "MIT" ]
130
2020-08-19T04:20:02.000Z
2022-03-24T23:05:22.000Z
import os import time from typing import Dict from cereal import car from common.kalman.simple_kalman import KF1D from common.realtime import DT_CTRL from selfdrive.car import gen_empty_fingerprint from selfdrive.config import Conversions as CV from selfdrive.controls.lib.drive_helpers import V_CRUISE_MAX from selfdri...
36.813008
121
0.716321
import os import time from typing import Dict from cereal import car from common.kalman.simple_kalman import KF1D from common.realtime import DT_CTRL from selfdrive.car import gen_empty_fingerprint from selfdrive.config import Conversions as CV from selfdrive.controls.lib.drive_helpers import V_CRUISE_MAX from selfdri...
true
true
f74fe0820239709f52005b0637e9fafb2a40cfa2
325
py
Python
orttraining/orttraining/python/training/optim/__init__.py
mszhanyi/onnxruntime
6f85d3e5c81c919022ac4a77e5a051da8518b15d
[ "MIT" ]
669
2018-12-03T22:00:31.000Z
2019-05-06T19:42:49.000Z
orttraining/orttraining/python/training/optim/__init__.py
mszhanyi/onnxruntime
6f85d3e5c81c919022ac4a77e5a051da8518b15d
[ "MIT" ]
440
2018-12-03T21:09:56.000Z
2019-05-06T20:47:23.000Z
orttraining/orttraining/python/training/optim/__init__.py
mszhanyi/onnxruntime
6f85d3e5c81c919022ac4a77e5a051da8518b15d
[ "MIT" ]
140
2018-12-03T21:15:28.000Z
2019-05-06T18:02:36.000Z
from .config import _OptimizerConfig, AdamConfig, LambConfig, SGDConfig from .lr_scheduler import ( _LRScheduler, ConstantWarmupLRScheduler, CosineWarmupLRScheduler, LinearWarmupLRScheduler, PolyWarmupLRScheduler, ) from .fused_adam import FusedAdam, AdamWMode from .fp16_optimizer import FP16_Optim...
27.083333
71
0.809231
from .config import _OptimizerConfig, AdamConfig, LambConfig, SGDConfig from .lr_scheduler import ( _LRScheduler, ConstantWarmupLRScheduler, CosineWarmupLRScheduler, LinearWarmupLRScheduler, PolyWarmupLRScheduler, ) from .fused_adam import FusedAdam, AdamWMode from .fp16_optimizer import FP16_Optim...
true
true
f74fe0ecc318509c828ce80eb6ffc4595c357892
9,036
py
Python
src/util_io.py
probcomp/hierarchical-irm
042aaea56d66d05c4c54848353696ca60c692581
[ "Apache-2.0" ]
8
2021-08-18T19:53:17.000Z
2022-03-28T20:48:51.000Z
src/util_io.py
probcomp/hierarchical-irm
042aaea56d66d05c4c54848353696ca60c692581
[ "Apache-2.0" ]
null
null
null
src/util_io.py
probcomp/hierarchical-irm
042aaea56d66d05c4c54848353696ca60c692581
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 MIT Probabilistic Computing Project # Apache License, Version 2.0, refer to LICENSE.txt import ast from . import hirm def intify(x): if x.isnumeric(): assert int(x) == float(x) return int(x) return x def load_schema(path): """Load a schema from path.""" signatures = ...
35.159533
89
0.557105
import ast from . import hirm def intify(x): if x.isnumeric(): assert int(x) == float(x) return int(x) return x def load_schema(path): signatures = {} with open(path, 'r') as f: for line in f: parts = line.strip().split(' ') assert 3 <= len(parts) ...
true
true
f74fe11538ce7573308b531b25c175b0abf7d59f
5,791
py
Python
slides/snippets/base_test.py
walkoncross/gsuitedevs-python-samples
c1e6b7a55d2fd514aea8ded640f1509412633d68
[ "Apache-2.0" ]
null
null
null
slides/snippets/base_test.py
walkoncross/gsuitedevs-python-samples
c1e6b7a55d2fd514aea8ded640f1509412633d68
[ "Apache-2.0" ]
null
null
null
slides/snippets/base_test.py
walkoncross/gsuitedevs-python-samples
c1e6b7a55d2fd514aea8ded640f1509412633d68
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
33.091429
82
0.533069
from __future__ import print_function from apiclient import discovery from oauth2client.client import GoogleCredentials from googleapiclient import errors import httplib2 import sys import unittest from pprint import pprint class BaseTest(unittest.TestCase): @classmethod def setUpClass(cls): ...
true
true
f74fe15a4a0d8c510f2014db8ca0a766e5dee8eb
5,149
py
Python
threshold_par.py
heikoschmidt1187/CarND-Advanced-Lane-Lines
671c8d9a08853b4a9c00995a2ace6d25eb478e8f
[ "MIT" ]
null
null
null
threshold_par.py
heikoschmidt1187/CarND-Advanced-Lane-Lines
671c8d9a08853b4a9c00995a2ace6d25eb478e8f
[ "MIT" ]
null
null
null
threshold_par.py
heikoschmidt1187/CarND-Advanced-Lane-Lines
671c8d9a08853b4a9c00995a2ace6d25eb478e8f
[ "MIT" ]
null
null
null
import numpy as np import cv2 import matplotlib.pyplot as plt import matplotlib.image as mpimg import glob def abs_sobel_threshold(img, orientation='x', kernel_size=3, threshold=(0, 255)): """ `orientation` Input for setting the sobel operator gradient orientation (x, y) `kernel_size` Input for kernel size...
31.588957
90
0.657603
import numpy as np import cv2 import matplotlib.pyplot as plt import matplotlib.image as mpimg import glob def abs_sobel_threshold(img, orientation='x', kernel_size=3, threshold=(0, 255)): gray = cv2.GaussianBlur(img, (5, 5), 0) if orientation == 'x': abs_sobel = np.absolute(cv2.Sobel(gray, cv2.C...
true
true
f74fe23e7a8959b6913e44d96f5f7a6cc12b75c3
13,736
py
Python
login_interface.py
mytsx/user-login-interface_with-pyqt5
d174d3bf87e07ae20fef91770d81f9b4ab34b059
[ "Unlicense" ]
3
2021-04-16T09:48:39.000Z
2022-01-16T19:29:49.000Z
login_interface.py
mytsx/user-login-interface_with-pyqt5
d174d3bf87e07ae20fef91770d81f9b4ab34b059
[ "Unlicense" ]
1
2020-06-20T20:43:52.000Z
2020-06-20T20:56:01.000Z
login_interface.py
mytsx/user-login-interface_with-pyqt5
d174d3bf87e07ae20fef91770d81f9b4ab34b059
[ "Unlicense" ]
1
2021-04-22T12:17:54.000Z
2021-04-22T12:17:54.000Z
# Kapatma butonu eklenebilir # dekoratif butonlara işlevsiz butonlara basıldığında basılan buton da dahil diğer butonların renginin random olarak değişmesi # özelliği eklenebilir. (bence sol alta) # değişik olur # qss dosyaların dışarı dan çekilmesi # kullanıcı parola ve kullanıcı adı kontrolü eklenebilir vs....
43.884984
127
0.595952
ources1_rc from PyQt5 import QtCore, QtWidgets from PyQt5.QtGui import QFont import time class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(500, 450) MainWindow.setWindowFlags( Qt...
true
true
f74fe2a1f488371c37837733eff8697ce4ab8864
1,735
py
Python
estacionamientos/models.py
ShadowManu/SAGE
999626669c9a15755ed409e57864851eb27dc2c2
[ "MIT" ]
null
null
null
estacionamientos/models.py
ShadowManu/SAGE
999626669c9a15755ed409e57864851eb27dc2c2
[ "MIT" ]
null
null
null
estacionamientos/models.py
ShadowManu/SAGE
999626669c9a15755ed409e57864851eb27dc2c2
[ "MIT" ]
null
null
null
from django.db import models class Estacionamiento(models.Model): nombre_duenio = models.CharField(max_length=30) nombre_est = models.CharField(max_length=30,unique=True) direccion = models.CharField(max_length=30) telefono1 = models.IntegerField(max_length=11) telefono2 = models.IntegerField(max_l...
32.12963
85
0.697983
from django.db import models class Estacionamiento(models.Model): nombre_duenio = models.CharField(max_length=30) nombre_est = models.CharField(max_length=30,unique=True) direccion = models.CharField(max_length=30) telefono1 = models.IntegerField(max_length=11) telefono2 = models.IntegerField(max_l...
true
true
f74fe3e40fb2d4864f14a0f115dca63d363973b4
1,308
py
Python
examples/function.py
rayattack/supersql
0a592e7f303ac18b8df7bebac226b26f38f6d192
[ "MIT" ]
2
2019-11-04T00:19:30.000Z
2020-10-04T01:24:04.000Z
examples/function.py
rayattack/supersql
0a592e7f303ac18b8df7bebac226b26f38f6d192
[ "MIT" ]
2
2021-03-31T14:07:04.000Z
2021-03-31T14:07:20.000Z
examples/function.py
rayattack/supersql
0a592e7f303ac18b8df7bebac226b26f38f6d192
[ "MIT" ]
2
2021-03-30T21:40:14.000Z
2022-03-17T20:52:25.000Z
from suerpsql import Query, Schema, String class Department(Schema): __tablename__ = 'deaprtments' name = String(25) query = Query( vendor="postgres", host="localhost:5432", port=5432, user="postgres", password="postgres:user:password" ) expected_sql = """ CREATE FUNCTION get_departme...
18.956522
86
0.597859
from suerpsql import Query, Schema, String class Department(Schema): __tablename__ = 'deaprtments' name = String(25) query = Query( vendor="postgres", host="localhost:5432", port=5432, user="postgres", password="postgres:user:password" ) expected_sql = """ CREATE FUNCTION get_departme...
true
true
f74fe4aa0c134a3e7ad5e226c04720636ed01d40
2,271
py
Python
src/python/twitter/common/collections/__init__.py
zhouyijiaren/commons
10df6fb63547baa9047782aa7ad4edf354914b10
[ "Apache-2.0" ]
1,143
2015-01-05T04:19:24.000Z
2019-12-11T12:02:23.000Z
src/python/twitter/common/collections/__init__.py
zhouyijiaren/commons
10df6fb63547baa9047782aa7ad4edf354914b10
[ "Apache-2.0" ]
144
2015-01-06T05:05:07.000Z
2019-12-12T18:02:37.000Z
src/python/twitter/common/collections/__init__.py
zhouyijiaren/commons
10df6fb63547baa9047782aa7ad4edf354914b10
[ "Apache-2.0" ]
426
2015-01-08T08:33:41.000Z
2019-12-09T13:15:40.000Z
# ================================================================================================== # Copyright 2011 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
36.629032
104
0.634963
from sys import version_info from twitter.common.lang import Compatibility if version_info[0] == 2: from .ordereddict import OrderedDict else: from collections import OrderedDict from .orderedset import OrderedSet from .ringbuffer import RingBuffer def maybe_list(value, expected_type=Compatibili...
true
true
f74fe4b32d45deb74a8806ddb075c687b5132719
576
py
Python
meshviewer/web_view_mesh/examples/http_server_two_dirs.py
lassoan/SlicerMorph
d886a98e8710a396e4896f9bd13d0f0e93b300cd
[ "BSD-2-Clause" ]
null
null
null
meshviewer/web_view_mesh/examples/http_server_two_dirs.py
lassoan/SlicerMorph
d886a98e8710a396e4896f9bd13d0f0e93b300cd
[ "BSD-2-Clause" ]
null
null
null
meshviewer/web_view_mesh/examples/http_server_two_dirs.py
lassoan/SlicerMorph
d886a98e8710a396e4896f9bd13d0f0e93b300cd
[ "BSD-2-Clause" ]
1
2020-04-09T07:24:02.000Z
2020-04-09T07:24:02.000Z
from http.server import HTTPServer as BaseHTTPServer, SimpleHTTPRequestHandler server_address = ("", 8000) external_mesh_dir = '/Users/jmw110/data/bunny' external_resource_prefix = '/mesh' class MyRequestHandler(SimpleHTTPRequestHandler): def translate_path(self, path): if self.path.startswith(external_re...
38.4
78
0.770833
from http.server import HTTPServer as BaseHTTPServer, SimpleHTTPRequestHandler server_address = ("", 8000) external_mesh_dir = '/Users/jmw110/data/bunny' external_resource_prefix = '/mesh' class MyRequestHandler(SimpleHTTPRequestHandler): def translate_path(self, path): if self.path.startswith(external_re...
true
true
f74fe516a648730a38a0d7b843f6d4a1e315ab3d
35,311
py
Python
landlab/components/overland_flow/generate_overland_flow_deAlmeida.py
clebouteiller/landlab
e6f47db76ea0814c4c5a24e695bbafb74c722ff7
[ "MIT" ]
1
2022-01-07T02:36:07.000Z
2022-01-07T02:36:07.000Z
landlab/components/overland_flow/generate_overland_flow_deAlmeida.py
clebouteiller/landlab
e6f47db76ea0814c4c5a24e695bbafb74c722ff7
[ "MIT" ]
1
2021-11-11T21:23:46.000Z
2021-11-11T21:23:46.000Z
landlab/components/overland_flow/generate_overland_flow_deAlmeida.py
clebouteiller/landlab
e6f47db76ea0814c4c5a24e695bbafb74c722ff7
[ "MIT" ]
2
2019-08-19T08:58:10.000Z
2022-01-07T02:36:01.000Z
"""Landlab component that simulates overland flow. This component simulates overland flow using the 2-D numerical model of shallow-water flow over topography using the de Almeida et al., 2012 algorithm for storage-cell inundation modeling. .. codeauthor:: Jordan Adams Examples -------- >>> import numpy as np >>> fro...
38.298265
123
0.590892
import numpy as np import scipy.constants from landlab import Component, FieldError from . import _links as links _SEVEN_OVER_THREE = 7.0 / 3.0 def _active_links_at_node(grid, *args): active_links_at_node = grid.links_at_node.copy() active_links_at_node[grid.active_link_dirs_at_node == 0] = -1 active_l...
true
true
f74fe5417173584678e86d4aa6fd352ac06e4027
1,629
py
Python
solum/objects/sqlalchemy/__init__.py
alex/solum
ca61f2844c5187378986c8b1356130b0d8dfa846
[ "Apache-2.0" ]
1
2015-11-08T13:02:17.000Z
2015-11-08T13:02:17.000Z
solum/objects/sqlalchemy/__init__.py
alex/solum
ca61f2844c5187378986c8b1356130b0d8dfa846
[ "Apache-2.0" ]
null
null
null
solum/objects/sqlalchemy/__init__.py
alex/solum
ca61f2844c5187378986c8b1356130b0d8dfa846
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 - Red Hat, 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 in writi...
44.027027
75
0.785758
from solum import objects from solum.objects import operation as abstract_operation from solum.objects import plan as abstract_plan from solum.objects import sensor as abstract_sensor from solum.objects import service as abstract_srvc from solum.objects.sqlalchemy import operation from solum.objects.sqlal...
true
true
f74fe57d4662ded5c5b5758e7ac02636b9cc819a
22,602
py
Python
litex/soc/integration/export.py
fjullien/litex
7f8e2e39f3fa8efd572ef694d50f06dc7fdf9788
[ "ADSL" ]
3
2020-09-22T08:06:25.000Z
2021-12-28T23:09:28.000Z
litex/soc/integration/export.py
fjullien/litex
7f8e2e39f3fa8efd572ef694d50f06dc7fdf9788
[ "ADSL" ]
null
null
null
litex/soc/integration/export.py
fjullien/litex
7f8e2e39f3fa8efd572ef694d50f06dc7fdf9788
[ "ADSL" ]
1
2021-09-26T03:10:27.000Z
2021-09-26T03:10:27.000Z
# # This file is part of LiteX. # # This file is Copyright (c) 2013-2014 Sebastien Bourdeauducq <sb@m-labs.hk> # This file is Copyright (c) 2014-2019 Florent Kermarrec <florent@enjoy-digital.fr> # This file is Copyright (c) 2018 Dolu1990 <charles.papon.90@gmail.com> # This file is Copyright (c) 2019 Gabriel L. Somlo <g...
43.802326
234
0.511769
import os import json import time import datetime import inspect from shutil import which from sysconfig import get_platform from migen import * from litex.soc.interconnect.csr import CSRStatus from litex.build.tools import generated_banner from litex.soc.doc.rst import reflow from litex.soc.doc.m...
true
true
f74fe5adbb7fc43e9521981bd68f654b6f9c2988
400
py
Python
tasks/migrations/0020_auto_20201211_1230.py
mamalmaleki/tasky_community
d9ab3839964d485a71e3d4614dd5452408f0a05e
[ "MIT" ]
null
null
null
tasks/migrations/0020_auto_20201211_1230.py
mamalmaleki/tasky_community
d9ab3839964d485a71e3d4614dd5452408f0a05e
[ "MIT" ]
null
null
null
tasks/migrations/0020_auto_20201211_1230.py
mamalmaleki/tasky_community
d9ab3839964d485a71e3d4614dd5452408f0a05e
[ "MIT" ]
null
null
null
# Generated by Django 3.1.3 on 2020-12-11 12:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tasks', '0019_auto_20201211_1229'), ] operations = [ migrations.AlterField( model_name='task', name='estimate_time',...
21.052632
61
0.605
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('tasks', '0019_auto_20201211_1229'), ] operations = [ migrations.AlterField( model_name='task', name='estimate_time', field=models.IntegerField(blank=Tr...
true
true
f74fe5ee54ed907c9e257801c4923743c995220d
2,312
py
Python
right.py
eLvErDe/smart-man-in-the-middle
0c411a4279a0c21e1645391c469ee2f27744adcc
[ "BSD-2-Clause" ]
1
2018-06-16T21:53:25.000Z
2018-06-16T21:53:25.000Z
right.py
eLvErDe/smart-man-in-the-middle
0c411a4279a0c21e1645391c469ee2f27744adcc
[ "BSD-2-Clause" ]
null
null
null
right.py
eLvErDe/smart-man-in-the-middle
0c411a4279a0c21e1645391c469ee2f27744adcc
[ "BSD-2-Clause" ]
null
null
null
import asyncio class Right(asyncio.Protocol): SEP = b'\n' def __init__(self, logger, loop, left): self.logger = logger self.loop = loop self.left = left self.buffer = bytes() self.transport = None self.w_q = asyncio.Queue() self.peername = (None, None)...
34.507463
144
0.602941
import asyncio class Right(asyncio.Protocol): SEP = b'\n' def __init__(self, logger, loop, left): self.logger = logger self.loop = loop self.left = left self.buffer = bytes() self.transport = None self.w_q = asyncio.Queue() self.peername = (None, None)...
true
true
f74fe60ec2b5def5bda457823d31503855d076e8
4,552
py
Python
mitreattack/navlayers/core/layer.py
pljoel/mitreattack-python
3657035abe94758a218b74fd928db04300341257
[ "Apache-2.0" ]
null
null
null
mitreattack/navlayers/core/layer.py
pljoel/mitreattack-python
3657035abe94758a218b74fd928db04300341257
[ "Apache-2.0" ]
null
null
null
mitreattack/navlayers/core/layer.py
pljoel/mitreattack-python
3657035abe94758a218b74fd928db04300341257
[ "Apache-2.0" ]
null
null
null
import json import traceback from mitreattack.navlayers.core.exceptions import UninitializedLayer, BadType, BadInput, handler from mitreattack.navlayers.core.layerobj import _LayerObj class Layer: def __init__(self, init_data={}, name=None, domain=None, strict=True): """ Initialization - cre...
34.748092
96
0.530097
import json import traceback from mitreattack.navlayers.core.exceptions import UninitializedLayer, BadType, BadInput, handler from mitreattack.navlayers.core.layerobj import _LayerObj class Layer: def __init__(self, init_data={}, name=None, domain=None, strict=True): self.__layer = None self.stri...
true
true
f74fe6723d0dc493d03251776f75de5cfff3b8bd
452
py
Python
lib/python/treadmill/plugins.ref/rest/error_handlers.py
bretttegart/treadmill
812109e31c503a6eddaee2d3f2e1faf2833b6aaf
[ "Apache-2.0" ]
2
2017-10-31T18:48:20.000Z
2018-03-04T20:35:20.000Z
lib/python/treadmill/plugins.ref/rest/error_handlers.py
bretttegart/treadmill
812109e31c503a6eddaee2d3f2e1faf2833b6aaf
[ "Apache-2.0" ]
null
null
null
lib/python/treadmill/plugins.ref/rest/error_handlers.py
bretttegart/treadmill
812109e31c503a6eddaee2d3f2e1faf2833b6aaf
[ "Apache-2.0" ]
null
null
null
"""Plugin for adding external error handlers """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals def init(api): """initialize the error_handlers plugin. @api.errorhandler(<MyError>) def _my_error(err): ...
23.789474
75
0.712389
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals def init(api): del api
true
true
f74fe68e2cf07bb416f98ce860a10fc269f21232
336
py
Python
test/mitmproxy/test_master.py
fedosgad/mitmproxy
7eacc41f3b1079e000cf6b6c19c0f337d6e01177
[ "MIT" ]
null
null
null
test/mitmproxy/test_master.py
fedosgad/mitmproxy
7eacc41f3b1079e000cf6b6c19c0f337d6e01177
[ "MIT" ]
null
null
null
test/mitmproxy/test_master.py
fedosgad/mitmproxy
7eacc41f3b1079e000cf6b6c19c0f337d6e01177
[ "MIT" ]
null
null
null
import asyncio from mitmproxy.test.taddons import RecordingMaster async def err(): raise RuntimeError async def test_exception_handler(): m = RecordingMaster(None) running = asyncio.create_task(m.run()) asyncio.create_task(err()) await m.await_log("Traceback", level="error") m.shutdown() ...
19.764706
50
0.717262
import asyncio from mitmproxy.test.taddons import RecordingMaster async def err(): raise RuntimeError async def test_exception_handler(): m = RecordingMaster(None) running = asyncio.create_task(m.run()) asyncio.create_task(err()) await m.await_log("Traceback", level="error") m.shutdown() ...
true
true
f74fe6bdccaa62dd979e67afe9957d5d569b53d2
353
py
Python
solutions/016/016.py
jwmcgettigan/project-euler-solutions
f06b6551e713619d5fd1359ee2f96fcff61c425b
[ "FTL" ]
1
2020-08-21T00:30:17.000Z
2020-08-21T00:30:17.000Z
solutions/016/016.py
jwmcgettigan/project-euler-solutions
f06b6551e713619d5fd1359ee2f96fcff61c425b
[ "FTL" ]
2
2020-09-18T00:40:01.000Z
2020-09-21T04:13:05.000Z
solutions/016/016.py
jwmcgettigan/project-euler-solutions
f06b6551e713619d5fd1359ee2f96fcff61c425b
[ "FTL" ]
null
null
null
""" Project Euler - Problem Solution 016 Copyright (c) Justin McGettigan. All rights reserved. https://github.com/jwmcgettigan/project-euler-solutions """ def sum_digits(n): s = 0 while n: s, n = s + n % 10, n // 10 return s def power_digit_sum(power): return sum_digits(2**power) if __name__ == "__main__...
20.764706
55
0.694051
def sum_digits(n): s = 0 while n: s, n = s + n % 10, n // 10 return s def power_digit_sum(power): return sum_digits(2**power) if __name__ == "__main__": print(power_digit_sum(1000))
true
true
f74fe820d4712b6ac9188eab469f0c3eedd80626
23,391
py
Python
starlette/routing.py
gdetrez/starlette
5613fa7e126aa0e5a55977611984ca1aaea0c384
[ "BSD-3-Clause" ]
null
null
null
starlette/routing.py
gdetrez/starlette
5613fa7e126aa0e5a55977611984ca1aaea0c384
[ "BSD-3-Clause" ]
null
null
null
starlette/routing.py
gdetrez/starlette
5613fa7e126aa0e5a55977611984ca1aaea0c384
[ "BSD-3-Clause" ]
null
null
null
import asyncio import inspect import re import traceback import typing from enum import Enum from starlette.concurrency import run_in_threadpool from starlette.convertors import CONVERTOR_TYPES, Convertor from starlette.datastructures import URL, Headers, URLPath from starlette.exceptions import HTTPException from sta...
36.434579
88
0.58514
import asyncio import inspect import re import traceback import typing from enum import Enum from starlette.concurrency import run_in_threadpool from starlette.convertors import CONVERTOR_TYPES, Convertor from starlette.datastructures import URL, Headers, URLPath from starlette.exceptions import HTTPException from sta...
true
true
f74fe9399671bb364d0f4fe4cb215acaf041eb6a
1,657
py
Python
lib/mapping.py
MouvementMondial/OccupancyGridSLAM
6473c2c33025933b937a8ed5b04fb1bcb563ebe0
[ "CC-BY-3.0" ]
9
2018-05-27T17:45:53.000Z
2021-12-16T23:58:27.000Z
lib/mapping.py
MouvementMondial/OccupancyGridSLAM
6473c2c33025933b937a8ed5b04fb1bcb563ebe0
[ "CC-BY-3.0" ]
null
null
null
lib/mapping.py
MouvementMondial/OccupancyGridSLAM
6473c2c33025933b937a8ed5b04fb1bcb563ebe0
[ "CC-BY-3.0" ]
5
2018-04-29T10:41:32.000Z
2021-03-23T13:53:48.000Z
# -*- coding: utf-8 -*- """ @author: Thorsten """ import numpy as np from numba import jit import os import sys nb_dir = os.path.split(os.getcwd())[0] if nb_dir not in sys.path: sys.path.append(nb_dir) from lib import bresenham @jit def addMeasurement(grid, x, y, pos_sensor, offset, resolution, l_occupied, l_fr...
28.568966
104
0.590827
import numpy as np from numba import jit import os import sys nb_dir = os.path.split(os.getcwd())[0] if nb_dir not in sys.path: sys.path.append(nb_dir) from lib import bresenham @jit def addMeasurement(grid, x, y, pos_sensor, offset, resolution, l_occupied, l_free, l_min, l_max): for i in range(x.size...
true
true
f74fe9e22d86594c63386f1e4885fa0b37c892f6
9,085
py
Python
tests/test_onset.py
i-aki-y/librosa
a464b336c23a94e00943fc50e936180f503367eb
[ "ISC" ]
4,795
2016-05-12T04:39:33.000Z
2022-03-30T21:34:30.000Z
tests/test_onset.py
i-aki-y/librosa
a464b336c23a94e00943fc50e936180f503367eb
[ "ISC" ]
1,110
2016-05-12T16:56:48.000Z
2022-03-31T19:26:42.000Z
tests/test_onset.py
i-aki-y/librosa
a464b336c23a94e00943fc50e936180f503367eb
[ "ISC" ]
919
2016-05-12T09:17:06.000Z
2022-03-27T07:09:19.000Z
#!/usr/bin/env python # CREATED:2013-03-11 18:14:30 by Brian McFee <brm2132@columbia.edu> # unit tests for librosa.onset from __future__ import print_function import pytest from contextlib2 import nullcontext as dnr # Disable cache import os try: os.environ.pop("LIBROSA_CACHE_DIR") except: pass import war...
27.119403
87
0.669345
from __future__ import print_function import pytest from contextlib2 import nullcontext as dnr import os try: os.environ.pop("LIBROSA_CACHE_DIR") except: pass import warnings import numpy as np import librosa from test_core import srand __EXAMPLE_FILE = os.path.join("tests", "data", "test1_22050.wav...
true
true
f74feabfafd9c13128b102fa793bfa347bf70cdc
1,273
py
Python
src/create-cover-letter.py
benjaminkostiuk/cover-letter-generator
24db88f8d4f766ca35b95234c55e322c03bd6f24
[ "MIT" ]
null
null
null
src/create-cover-letter.py
benjaminkostiuk/cover-letter-generator
24db88f8d4f766ca35b95234c55e322c03bd6f24
[ "MIT" ]
1
2022-02-20T17:01:32.000Z
2022-02-20T17:01:32.000Z
src/create-cover-letter.py
benjaminkostiuk/cover-letter-generator
24db88f8d4f766ca35b95234c55e322c03bd6f24
[ "MIT" ]
null
null
null
import sys from docx import Document from docx2pdf import convert from configuration import Configuration import shutil from pathlib import Path USAGE = "Usage: python3 create-cover-letter.py <FILENAME>" CONFIG_FILE = "config.json" # Ensure the filename argument is passed or print help message if len(sys.a...
28.931818
83
0.738413
import sys from docx import Document from docx2pdf import convert from configuration import Configuration import shutil from pathlib import Path USAGE = "Usage: python3 create-cover-letter.py <FILENAME>" CONFIG_FILE = "config.json" if len(sys.argv) != 2 or sys.argv[1].lower() == 'help': print(USAGE) ...
true
true
f74fec71d9c8afd3222c3eb90aa2848a60f4fd0a
659
py
Python
services/showcase/api/db/migrations/versions/c552235f6967_.py
bcgov/traction
90cec4f1aebccd68eb986cb89dfae5819a07a2ee
[ "Apache-2.0" ]
12
2022-01-29T20:30:03.000Z
2022-03-29T11:46:14.000Z
services/showcase/api/db/migrations/versions/c552235f6967_.py
bcgov/traction
90cec4f1aebccd68eb986cb89dfae5819a07a2ee
[ "Apache-2.0" ]
38
2021-11-22T17:52:50.000Z
2022-03-31T17:52:00.000Z
services/showcase/api/db/migrations/versions/c552235f6967_.py
bcgov/traction
90cec4f1aebccd68eb986cb89dfae5819a07a2ee
[ "Apache-2.0" ]
9
2021-11-22T18:05:48.000Z
2022-03-29T11:25:08.000Z
"""empty message Revision ID: c552235f6967 Revises: ef3c58af741e Create Date: 2022-03-21 14:53:58.715602 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = "c552235f6967" down_revision = "ef3c58af741e" branch_labels = None depends_on = None def upgrade(): # ...
22.724138
79
0.693475
from alembic import op import sqlalchemy as sa revision = "c552235f6967" down_revision = "ef3c58af741e" branch_labels = None depends_on = None def upgrade():
true
true
f74fece5db3268b5429b782f58eb5d207a76c142
3,494
py
Python
odk2stata/dofile/do_file_collection.py
PMA-2020/odk2stata
5178736eeedd4bad93bd35044a57cf071f282b4b
[ "MIT" ]
2
2019-12-04T10:30:04.000Z
2022-03-23T11:07:07.000Z
odk2stata/dofile/do_file_collection.py
PMA-2020/odk2stata
5178736eeedd4bad93bd35044a57cf071f282b4b
[ "MIT" ]
3
2019-10-11T17:28:51.000Z
2022-01-09T06:07:08.000Z
odk2stata/dofile/do_file_collection.py
jkpr/odk2stata
361b88d7fdd5751f16cd3ed5ceb7acdbde3bb82c
[ "MIT" ]
3
2019-07-10T23:33:44.000Z
2021-12-18T06:25:53.000Z
"""A module for the DoFileCollection class.""" from typing import List from .do_file import DoFile from .settings import SettingsManager from ..dataset import DatasetCollection class DoFileCollection: """A class to represent do files coming from the same ODK file. The DoFileCollection class corresponds to t...
36.778947
78
0.650258
from typing import List from .do_file import DoFile from .settings import SettingsManager from ..dataset import DatasetCollection class DoFileCollection: def __init__(self, dataset_collection: DatasetCollection, settings: SettingsManager = None): self.dataset_collection = dataset_collec...
true
true
f74fedb4a08c26f6c0a36e8918a5918e95c4ce09
8,179
py
Python
scripts/pycsw/build/scripts-2.7/pycsw-admin.py
Dan-Eli/FGP_Docs
4486a7052863f3ad9c4eb6dfc3a6c6e117bdabe7
[ "MIT" ]
null
null
null
scripts/pycsw/build/scripts-2.7/pycsw-admin.py
Dan-Eli/FGP_Docs
4486a7052863f3ad9c4eb6dfc3a6c6e117bdabe7
[ "MIT" ]
null
null
null
scripts/pycsw/build/scripts-2.7/pycsw-admin.py
Dan-Eli/FGP_Docs
4486a7052863f3ad9c4eb6dfc3a6c6e117bdabe7
[ "MIT" ]
null
null
null
#!C:\Python27\ArcGIS10.4\python.exe # -*- coding: utf-8 -*- # ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # Angelos Tzotsos <tzotsos@gmail.com> # # Copyright (c) 2015 Tom Kralidis # # Permission is hereby granted, free of charge, ...
28.597902
85
0.674777
from six.moves import configparser from six.moves import input import getopt import sys from pycsw.core import admin, config CONTEXT = config.StaticContext() def usage(): return ''' NAME pycsw-admin.py - pycsw admin utility SYNOPSIS pycsw-admin.py -c <command> -f...
true
true
f74fee0bf10c9f48175ffdc1cd0d0f5ff15d0c06
77
py
Python
test/SIM_trickified/RUN_test/unit_test.py
iamthad/trick
88ac5b5990228e42a653347c9d7a103acea4d137
[ "NASA-1.3" ]
647
2015-05-07T16:08:16.000Z
2022-03-30T02:33:21.000Z
test/SIM_trickified/RUN_test/unit_test.py
tanglemontree/trick
f182c723495185708434e67789457eb29d52ad58
[ "NASA-1.3" ]
995
2015-04-30T19:44:31.000Z
2022-03-31T20:14:44.000Z
test/SIM_trickified/RUN_test/unit_test.py
tanglemontree/trick
f182c723495185708434e67789457eb29d52ad58
[ "NASA-1.3" ]
251
2015-05-15T09:24:34.000Z
2022-03-22T20:39:05.000Z
sandbox.foo.i = 5 assert sandbox.foo.i == 5 foo = trick.Foo() trick.stop(10)
15.4
25
0.675325
sandbox.foo.i = 5 assert sandbox.foo.i == 5 foo = trick.Foo() trick.stop(10)
true
true
f74feebf892b3d4cb066f7d357c7a5b991d04b1c
1,096
py
Python
training code/paviau/rnn/test/logitsmulti.py
littlejgogo/MDCPE-co-training-method-for-hyperspectral-image-classification
b7d367abd97ada77adc45a1120149cf247f9713c
[ "Apache-2.0" ]
4
2018-12-08T08:15:23.000Z
2020-10-07T10:00:22.000Z
training code/paviac/rnn/test/logitsmulti.py
littlejgogo/MDCPE-co-training-method-for-hyperspectral-image-classification
b7d367abd97ada77adc45a1120149cf247f9713c
[ "Apache-2.0" ]
null
null
null
training code/paviac/rnn/test/logitsmulti.py
littlejgogo/MDCPE-co-training-method-for-hyperspectral-image-classification
b7d367abd97ada77adc45a1120149cf247f9713c
[ "Apache-2.0" ]
6
2019-01-11T17:01:49.000Z
2022-02-05T04:48:59.000Z
import tensorflow as tf import cnn_indices data = cnn_indices.read_data_sets() import final_index import numpy as np saver = tf.train.import_meta_graph('/home/asdf/Documents/juyan/paper/salinas/cnn/model/NEW/' 'CNN0507.ckpt.meta') batch_size = data.valid._num_examples with tf.Sessio...
39.142857
92
0.709854
import tensorflow as tf import cnn_indices data = cnn_indices.read_data_sets() import final_index import numpy as np saver = tf.train.import_meta_graph('/home/asdf/Documents/juyan/paper/salinas/cnn/model/NEW/' 'CNN0507.ckpt.meta') batch_size = data.valid._num_examples with tf.Sessio...
true
true
f74feec1017a3651e95da2fa700eed589c3cce3b
21,834
py
Python
dask/dataframe/io/parquet/utils.py
galipremsagar/dask
134182e05009dbb20bd8e59ccf8bf771e5d4399a
[ "BSD-3-Clause" ]
null
null
null
dask/dataframe/io/parquet/utils.py
galipremsagar/dask
134182e05009dbb20bd8e59ccf8bf771e5d4399a
[ "BSD-3-Clause" ]
null
null
null
dask/dataframe/io/parquet/utils.py
galipremsagar/dask
134182e05009dbb20bd8e59ccf8bf771e5d4399a
[ "BSD-3-Clause" ]
null
null
null
import re import pandas as pd from ....core import flatten from ....utils import natural_sort_key class Engine: """ The API necessary to provide a new Parquet reader/writer """ @classmethod def read_metadata( cls, fs, paths, categories=None, index=None, g...
34.990385
88
0.578456
import re import pandas as pd from ....core import flatten from ....utils import natural_sort_key class Engine: @classmethod def read_metadata( cls, fs, paths, categories=None, index=None, gather_statistics=None, filters=None, **kwargs ): ...
true
true
f74fef4d79e04bdd44395d76c66aeb7a752710d9
5,099
py
Python
core/management/commands/populate_db.py
honno/ascii-forever
8364219db115229fa9eb0b059e9c0611dcb689cf
[ "MIT" ]
null
null
null
core/management/commands/populate_db.py
honno/ascii-forever
8364219db115229fa9eb0b059e9c0611dcb689cf
[ "MIT" ]
null
null
null
core/management/commands/populate_db.py
honno/ascii-forever
8364219db115229fa9eb0b059e9c0611dcb689cf
[ "MIT" ]
null
null
null
from datetime import datetime from itertools import zip_longest from pathlib import Path from random import Random import lorem from django.conf import settings from django.contrib.auth.hashers import make_password from django.core.management.base import BaseCommand from django.core.management.base import CommandError...
26.696335
80
0.565993
from datetime import datetime from itertools import zip_longest from pathlib import Path from random import Random import lorem from django.conf import settings from django.contrib.auth.hashers import make_password from django.core.management.base import BaseCommand from django.core.management.base import CommandError...
true
true
f74ff01d7bfa2bb6bd87ca176d98a17131db339b
449
py
Python
neobot.py
saeeidbeygi/NeoBot
46bc3a4dae362e1406775ff683f52e1765b3bf41
[ "Unlicense" ]
null
null
null
neobot.py
saeeidbeygi/NeoBot
46bc3a4dae362e1406775ff683f52e1765b3bf41
[ "Unlicense" ]
null
null
null
neobot.py
saeeidbeygi/NeoBot
46bc3a4dae362e1406775ff683f52e1765b3bf41
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- import functions #import download_function #Listener def listener(messages): for m in messages: cid = m.chat.id if m.content_type == 'text': print ("[" + str(cid) + "]: " + m.text) functions.bot.set_update_listener(listener) ####################################...
23.631579
51
0.599109
import functions def listener(messages): for m in messages: cid = m.chat.id if m.content_type == 'text': print ("[" + str(cid) + "]: " + m.text) functions.bot.set_update_listener(listener)
true
true
f74ff0f945633f5d8177436c97cf4c459cc72ede
2,731
py
Python
year2020/day23/solver.py
Sebaestschjin/advent-of-code
5fd708efa355483fc0ccddf7548b62682662bcc8
[ "MIT" ]
null
null
null
year2020/day23/solver.py
Sebaestschjin/advent-of-code
5fd708efa355483fc0ccddf7548b62682662bcc8
[ "MIT" ]
null
null
null
year2020/day23/solver.py
Sebaestschjin/advent-of-code
5fd708efa355483fc0ccddf7548b62682662bcc8
[ "MIT" ]
null
null
null
import logging from common.my_collections import CircularList class Game: def __init__(self, initial, additional_cups=0): self.cups = CircularList() self.nodes = [None] * (len(initial) + additional_cups + 1) for init in initial: node = self.cups.append(init) self.n...
32.903614
85
0.635665
import logging from common.my_collections import CircularList class Game: def __init__(self, initial, additional_cups=0): self.cups = CircularList() self.nodes = [None] * (len(initial) + additional_cups + 1) for init in initial: node = self.cups.append(init) self.n...
true
true
f74ff139c4ddea5671255302a5f224fd03f0001c
8,320
py
Python
run_tests.py
whot/meson
f89d3642a2972a602dc02e5de014c16cdc1f1663
[ "Apache-2.0" ]
null
null
null
run_tests.py
whot/meson
f89d3642a2972a602dc02e5de014c16cdc1f1663
[ "Apache-2.0" ]
null
null
null
run_tests.py
whot/meson
f89d3642a2972a602dc02e5de014c16cdc1f1663
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2012-2017 The Meson development team # 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...
38.165138
115
0.661178
import os import sys import time import shutil import subprocess import tempfile import platform from mesonbuild import mesonlib from mesonbuild import mesonmain from mesonbuild import mlog from mesonbuild.environment import detect_ninja from io import StringIO from enum import Enum from glob import glo...
true
true
f74ff144696dcc72e259adb153eeeb6c9aa9ce2b
1,277
py
Python
RUN.py
AmandaBoatswain/cv-based-vegetable-yield-monitor-
2e579244caeee13e06009a6cfa66eff661db7308
[ "MIT" ]
6
2021-01-25T01:47:03.000Z
2022-03-02T07:05:03.000Z
RUN.py
AmandaBoatswain/cv-based-vegetable-yield-monitor-
2e579244caeee13e06009a6cfa66eff661db7308
[ "MIT" ]
null
null
null
RUN.py
AmandaBoatswain/cv-based-vegetable-yield-monitor-
2e579244caeee13e06009a6cfa66eff661db7308
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Sep 13 00:33:14 2019 @author: Amanda Development of a Machine Vision Based Yield Monitor for Shallot Onions and Carrot crops Precision Agriculture and Sensor Systems (PASS) Research Group McGill University, Department of Bioresource Engineering RUN.py --- This is ...
26.061224
93
0.732185
from YieldMonitor import YieldMonitor import time import cv2 import argparse import subprocess subprocess.run("activate yield_monitor && 'python RUN.py' ", shell = True) YM = YieldMonitor("conf.json") time.sleep(5) YM.pretty_print("[INFO] RUNNING", "Yield Monitor initialized!") YM.calibrate...
true
true
f74ff235eb050638cb31b0374a2450dda13b37ce
2,969
py
Python
Lib/site-packages/astroid/inference_tip.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/astroid/inference_tip.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/astroid/inference_tip.py
edupyter/EDUPYTER38
396183cea72987506f1ef647c0272a2577c56218
[ "bzip2-1.0.6" ]
null
null
null
# Licensed under the LGPL: https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html # For details: https://github.com/PyCQA/astroid/blob/main/LICENSE # Copyright (c) https://github.com/PyCQA/astroid/blob/main/CONTRIBUTORS.txt """Transform utilities (filters and decorator)""" import typing import wrapt from astroi...
32.988889
88
0.673964
import typing import wrapt from astroid import bases, util from astroid.exceptions import InferenceOverwriteError, UseInferenceDefault from astroid.nodes import NodeNG from astroid.typing import InferFn InferOptions = typing.Union[ NodeNG, bases.Instance, bases.UnboundMethod, typing.Type[util.Uninferable] ]...
true
true
f74ff3d495b4a6537d8617f1c71ed39eaef542ad
1,899
py
Python
plot-data.py
isaiahnixon/python-google-trends
7d8535885bf4e39c0954172bfe0dae1451c8007a
[ "MIT" ]
null
null
null
plot-data.py
isaiahnixon/python-google-trends
7d8535885bf4e39c0954172bfe0dae1451c8007a
[ "MIT" ]
null
null
null
plot-data.py
isaiahnixon/python-google-trends
7d8535885bf4e39c0954172bfe0dae1451c8007a
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import matplotlib.dates as mdates from datetime import datetime as dt import pandas as pd import numpy as np # Load the csv df1 = pd.read_csv('data/aggregate-daily-values.csv') df2 = pd.read_csv('data/aggregate-daily-values-covid-19.csv') df3 = pd.read_csv('data/aggregate-daily-values-...
33.315789
107
0.711954
import matplotlib.pyplot as plt import matplotlib.dates as mdates from datetime import datetime as dt import pandas as pd import numpy as np df1 = pd.read_csv('data/aggregate-daily-values.csv') df2 = pd.read_csv('data/aggregate-daily-values-covid-19.csv') df3 = pd.read_csv('data/aggregate-daily-values-cats.csv') ti...
true
true
f74ff3d840389b1c2b39c5f44fa40edd485ad9e1
776
py
Python
nfv/nfv-vim/nfv_vim/nfvi/_nfvi_identity_plugin.py
SidneyAn/nfv
5f0262a5b6ea4be59f977b9c587c483cbe0e373d
[ "Apache-2.0" ]
2
2020-02-07T19:01:36.000Z
2022-02-23T01:41:46.000Z
nfv/nfv-vim/nfv_vim/nfvi/_nfvi_identity_plugin.py
SidneyAn/nfv
5f0262a5b6ea4be59f977b9c587c483cbe0e373d
[ "Apache-2.0" ]
1
2021-01-14T12:02:25.000Z
2021-01-14T12:02:25.000Z
nfv/nfv-vim/nfv_vim/nfvi/_nfvi_identity_plugin.py
SidneyAn/nfv
5f0262a5b6ea4be59f977b9c587c483cbe0e373d
[ "Apache-2.0" ]
2
2021-01-13T08:39:21.000Z
2022-02-09T00:21:55.000Z
# # Copyright (c) 2015-2016 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # from nfv_common import debug from nfv_common import tasks from nfv_vim.nfvi._nfvi_plugin import NFVIPlugin DLOG = debug.debug_get_logger('nfv_vim.nfvi.nfvi_identity_plugin') class NFVIIdentityPlugin(NFVIPlugin): """ ...
27.714286
75
0.716495
from nfv_common import debug from nfv_common import tasks from nfv_vim.nfvi._nfvi_plugin import NFVIPlugin DLOG = debug.debug_get_logger('nfv_vim.nfvi.nfvi_identity_plugin') class NFVIIdentityPlugin(NFVIPlugin): _version = '1.0.0' _signature = '22b3dbf6-e4ba-441b-8797-fb8a51210a43' _plugin_type = '...
true
true
f74ff481e8010db5eb0b09d8a07a50c4c6f242a3
1,345
py
Python
xsdata/codegen/mixins.py
gramm/xsdata
082c780757c6d76a5c31a6757276ef6912901ed2
[ "MIT" ]
null
null
null
xsdata/codegen/mixins.py
gramm/xsdata
082c780757c6d76a5c31a6757276ef6912901ed2
[ "MIT" ]
null
null
null
xsdata/codegen/mixins.py
gramm/xsdata
082c780757c6d76a5c31a6757276ef6912901ed2
[ "MIT" ]
null
null
null
import abc from typing import Callable from typing import Iterator from typing import List from typing import Optional from xsdata.codegen.models import Class from xsdata.models.config import GeneratorConfig from xsdata.utils.constants import return_true class ContainerInterface(metaclass=abc.ABCMeta): """Wrap a...
29.23913
85
0.698141
import abc from typing import Callable from typing import Iterator from typing import List from typing import Optional from xsdata.codegen.models import Class from xsdata.models.config import GeneratorConfig from xsdata.utils.constants import return_true class ContainerInterface(metaclass=abc.ABCMeta): config: ...
true
true
f74ff4ec3691a51dd5960faea3a0c854ecc62463
29,814
py
Python
eeauditor/auditors/aws/Amazon_EKS_Auditor.py
kbhagi/ElectricEye
31960e1e1cfb75c5d354844ea9e07d5295442823
[ "Apache-2.0" ]
442
2020-03-15T20:56:36.000Z
2022-03-31T22:13:07.000Z
eeauditor/auditors/aws/Amazon_EKS_Auditor.py
kbhagi/ElectricEye
31960e1e1cfb75c5d354844ea9e07d5295442823
[ "Apache-2.0" ]
57
2020-03-15T22:09:56.000Z
2022-03-31T13:17:06.000Z
eeauditor/auditors/aws/Amazon_EKS_Auditor.py
kbhagi/ElectricEye
31960e1e1cfb75c5d354844ea9e07d5295442823
[ "Apache-2.0" ]
59
2020-03-15T21:19:10.000Z
2022-03-31T15:01:31.000Z
#This file is part of ElectricEye. #SPDX-License-Identifier: Apache-2.0 #Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you un...
54.405109
331
0.432884
import boto3 import datetime from check_register import CheckRegister registry = CheckRegister() eks = boto3.client("eks") @registry.register_check("eks") def eks_public_endpoint_access_check(cache: dict, awsAccountId: str, awsRegion: str, awsPartition: str) -> dict: for clusters in ek...
true
true
f74ff5d78ae68c9b02b22489dfe50e3c0b83eedb
11
py
Python
main.py
abdalkareem99/recipe2
4c502b879eff6594813ea07ff8b2caf400034193
[ "MIT" ]
null
null
null
main.py
abdalkareem99/recipe2
4c502b879eff6594813ea07ff8b2caf400034193
[ "MIT" ]
null
null
null
main.py
abdalkareem99/recipe2
4c502b879eff6594813ea07ff8b2caf400034193
[ "MIT" ]
null
null
null
print("sa")
11
11
0.636364
print("sa")
true
true
f74ff60b7dd64ebf7d0753b7e488b0ff7f39557c
11,274
py
Python
src/sage/categories/hopf_algebras_with_basis.py
UCD4IDS/sage
43474c96d533fd396fe29fe0782d44dc7f5164f7
[ "BSL-1.0" ]
1,742
2015-01-04T07:06:13.000Z
2022-03-30T11:32:52.000Z
src/sage/categories/hopf_algebras_with_basis.py
UCD4IDS/sage
43474c96d533fd396fe29fe0782d44dc7f5164f7
[ "BSL-1.0" ]
66
2015-03-19T19:17:24.000Z
2022-03-16T11:59:30.000Z
src/sage/categories/hopf_algebras_with_basis.py
UCD4IDS/sage
43474c96d533fd396fe29fe0782d44dc7f5164f7
[ "BSL-1.0" ]
495
2015-01-10T10:23:18.000Z
2022-03-24T22:06:11.000Z
r""" Hopf algebras with basis """ # **************************************************************************** # Copyright (C) 2008 Teresa Gomez-Diaz (CNRS) <Teresa.Gomez-Diaz@univ-mlv.fr> # Copyright (C) 2008-2011 Nicolas M. Thiery <nthiery at users.sf.net> # # Distributed under the terms of the GNU General Publi...
37.331126
181
0.57575
from sage.categories.category_with_axiom import CategoryWithAxiom_over_base_ring from sage.categories.tensor import TensorProductsCategory from sage.misc.abstract_method import abstract_method from sage.misc.cachefunc import cached_method from sage.misc.lazy_attribute import lazy_attribute from sage.misc.lazy_i...
true
true
f74ff6a8a2e09e65a3e5261a736003675a6d58a3
46,465
py
Python
py-usps/pyusps/ptspodrequest.py
QwadwoNyamekye/purplship-carriers
ce34e3054de246e3d85ddf6928b607193d061ae2
[ "MIT" ]
null
null
null
py-usps/pyusps/ptspodrequest.py
QwadwoNyamekye/purplship-carriers
ce34e3054de246e3d85ddf6928b607193d061ae2
[ "MIT" ]
null
null
null
py-usps/pyusps/ptspodrequest.py
QwadwoNyamekye/purplship-carriers
ce34e3054de246e3d85ddf6928b607193d061ae2
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated Thu Dec 13 17:56:06 2018 by generateDS.py version 2.29.5. # Python 3.6.5 (default, May 19 2018, 11:27:13) [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] # # Command line options: # ('-o', '../python/PTSPodRequest.xsd.py') # # Command line argum...
40.687391
320
0.583041
import sys import re as re_ import base64 import datetime as datetime_ import warnings as warnings_ try: from lxml import etree as etree_ except ImportError: from xml.etree import ElementTree as etree_ Validate_simpletypes_ = True if sys.version_info.major == 2: BaseStrType_ = basestri...
true
true
f74ff6d81ae2c1f393dc90b2b30497b29f73300a
77
py
Python
dodonbotchi/__init__.py
Signaltonsalat/dodonbotchi
f3058e58442a659aa5220b5c2b15f88b45732b33
[ "MIT" ]
1
2018-12-22T04:11:59.000Z
2018-12-22T04:11:59.000Z
dodonbotchi/__init__.py
Signaltonsalat/dodonbotchi
f3058e58442a659aa5220b5c2b15f88b45732b33
[ "MIT" ]
5
2018-04-25T20:14:16.000Z
2018-05-30T21:40:22.000Z
dodonbotchi/__init__.py
Signaltonsalat/dodonbotchi
f3058e58442a659aa5220b5c2b15f88b45732b33
[ "MIT" ]
null
null
null
from . import config from . import mame from . import util from . import exy
15.4
20
0.74026
from . import config from . import mame from . import util from . import exy
true
true
f74ff6fa0da060e2eeb401900595e9afcdef3234
39,504
py
Python
tests/test_mirror.py
minionatwork/sonic-swss
544a45c906a73738c951f373f0b2b9e4133586ee
[ "Apache-2.0" ]
132
2016-03-10T00:48:36.000Z
2022-03-10T14:09:50.000Z
tests/test_mirror.py
minionatwork/sonic-swss
544a45c906a73738c951f373f0b2b9e4133586ee
[ "Apache-2.0" ]
1,644
2016-03-15T19:53:10.000Z
2022-03-31T20:51:06.000Z
tests/test_mirror.py
minionatwork/sonic-swss
544a45c906a73738c951f373f0b2b9e4133586ee
[ "Apache-2.0" ]
432
2016-03-09T18:10:28.000Z
2022-03-30T14:39:15.000Z
# This test suite covers the functionality of mirror feature in SwSS import distro import pytest import time from swsscommon import swsscommon from distutils.version import StrictVersion class TestMirror(object): def setup_db(self, dvs): self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0) sel...
43.03268
140
0.611609
import distro import pytest import time from swsscommon import swsscommon from distutils.version import StrictVersion class TestMirror(object): def setup_db(self, dvs): self.pdb = swsscommon.DBConnector(0, dvs.redis_sock, 0) self.adb = swsscommon.DBConnector(1, dvs.redis_sock, 0) self.cd...
true
true
f74ff7d56768f34457f8ca5757da53d9e7f23e31
557
py
Python
DSA Coding/Sorting Algorithms/bubble_sort.py
ananya5254/WIE-WoC
e5b44fe14ae1975f66b4f56bf612a9e1ebf03502
[ "MIT" ]
null
null
null
DSA Coding/Sorting Algorithms/bubble_sort.py
ananya5254/WIE-WoC
e5b44fe14ae1975f66b4f56bf612a9e1ebf03502
[ "MIT" ]
null
null
null
DSA Coding/Sorting Algorithms/bubble_sort.py
ananya5254/WIE-WoC
e5b44fe14ae1975f66b4f56bf612a9e1ebf03502
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Mar 3 00:20:07 2022 @author: sachi """ # Bubble sort in Python def bubbleSort(array): for i in range(len(array)): for j in range(0, len(array) - i - 1): if array[j] > array[j + 1]: temp = array[j] ...
15.472222
47
0.509874
def bubbleSort(array): for i in range(len(array)): for j in range(0, len(array) - i - 1): if array[j] > array[j + 1]: temp = array[j] array[j] = array[j+1] array[j+1] = temp data = [] n=int(input("Number of elemnts in an array:"...
true
true
f74ff906b3bda32c23eda5e95d0b313c3209cd9a
4,585
py
Python
tests/unit/drivers/test_kv_search_driver.py
slettner/jina
4140961c62359e3acd540a6d88931665c6313824
[ "Apache-2.0" ]
null
null
null
tests/unit/drivers/test_kv_search_driver.py
slettner/jina
4140961c62359e3acd540a6d88931665c6313824
[ "Apache-2.0" ]
null
null
null
tests/unit/drivers/test_kv_search_driver.py
slettner/jina
4140961c62359e3acd540a6d88931665c6313824
[ "Apache-2.0" ]
null
null
null
from typing import Optional, Iterable import numpy as np import pytest from jina import Document, DocumentArray from jina.drivers.search import KVSearchDriver from jina.executors.indexers import BaseKVIndexer from jina.types.ndarray.generic import NdArray class MockIndexer(BaseKVIndexer): def add( self,...
27.45509
86
0.622246
from typing import Optional, Iterable import numpy as np import pytest from jina import Document, DocumentArray from jina.drivers.search import KVSearchDriver from jina.executors.indexers import BaseKVIndexer from jina.types.ndarray.generic import NdArray class MockIndexer(BaseKVIndexer): def add( self,...
true
true
f74ff99a051b6ceeea8d0cba5506b01714e04e98
1,329
py
Python
website/addons/s3/settings/defaults.py
dplorimer/osf
9f3f400f62dc7bde18532949ed35bf1d3f6ec3d6
[ "Apache-2.0" ]
null
null
null
website/addons/s3/settings/defaults.py
dplorimer/osf
9f3f400f62dc7bde18532949ed35bf1d3f6ec3d6
[ "Apache-2.0" ]
13
2020-03-24T15:29:41.000Z
2022-03-11T23:15:28.000Z
website/addons/s3/settings/defaults.py
dplorimer/osf
9f3f400f62dc7bde18532949ed35bf1d3f6ec3d6
[ "Apache-2.0" ]
null
null
null
import json import os from website.settings import parent_dir HERE = os.path.dirname(os.path.abspath(__file__)) STATIC_PATH = os.path.join(parent_dir(HERE), 'static') MAX_RENDER_SIZE = (1024 ** 2) * 3 ALLOWED_ORIGIN = '*' BUCKET_LOCATIONS = {} ENCRYPT_UPLOADS_DEFAULT = True # Load S3 settings used in both front a...
25.075472
66
0.485327
import json import os from website.settings import parent_dir HERE = os.path.dirname(os.path.abspath(__file__)) STATIC_PATH = os.path.join(parent_dir(HERE), 'static') MAX_RENDER_SIZE = (1024 ** 2) * 3 ALLOWED_ORIGIN = '*' BUCKET_LOCATIONS = {} ENCRYPT_UPLOADS_DEFAULT = True with open(os.path.join(STATIC_PATH, 's...
true
true
f74ffabf47e2243bc21aaf0f24786fd1f85fa6ca
1,610
py
Python
attalos/dataset/texttransformer.py
karllab41/attalos
34f5e8da19c4faa886ccddcfc9b32e7d56d86cd7
[ "Apache-2.0" ]
null
null
null
attalos/dataset/texttransformer.py
karllab41/attalos
34f5e8da19c4faa886ccddcfc9b32e7d56d86cd7
[ "Apache-2.0" ]
null
null
null
attalos/dataset/texttransformer.py
karllab41/attalos
34f5e8da19c4faa886ccddcfc9b32e7d56d86cd7
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import gzip from abc import ABCMeta from abc import abstractmethod class TextTransformer(object): __metaclass__ = ABCMeta def __init__(self, dictionary_file=None): if dictionary_f...
24.393939
71
0.632298
from __future__ import absolute_import from __future__ import division from __future__ import print_function import json import gzip from abc import ABCMeta from abc import abstractmethod class TextTransformer(object): __metaclass__ = ABCMeta def __init__(self, dictionary_file=None): if dictionary_f...
true
true
f74ffb3ea09e7818ad7af8af9b042e0bb177323d
7,035
py
Python
twccli/twcc/services/generic.py
TW-NCHC/TWCC-CLI
743be786440ff6f9689c6a10cc2131565e51d391
[ "Apache-2.0" ]
12
2019-04-27T07:45:02.000Z
2020-11-13T08:16:18.000Z
twccli/twcc/services/generic.py
twcc/TWCC-CLI
743be786440ff6f9689c6a10cc2131565e51d391
[ "Apache-2.0" ]
23
2021-03-05T07:53:37.000Z
2022-03-20T03:12:33.000Z
twccli/twcc/services/generic.py
TW-NCHC/TWCC-CLI
743be786440ff6f9689c6a10cc2131565e51d391
[ "Apache-2.0" ]
6
2019-02-27T00:19:11.000Z
2020-11-13T08:16:19.000Z
# -*- coding: utf-8 -*- from __future__ import print_function import os import re import sys import yaml import traceback from twccli.twcc.session import Session2 from twccli.twcc.util import isNone, isDebug, timezone2local, send_ga from twccli.twcc.clidriver import ServiceOperation from twccli.twccli import logger # ...
35.175
142
0.585359
from __future__ import print_function import os import re import sys import yaml import traceback from twccli.twcc.session import Session2 from twccli.twcc.util import isNone, isDebug, timezone2local, send_ga from twccli.twcc.clidriver import ServiceOperation from twccli.twccli import logger class GenericService(o...
true
true
f74ffbad27a03cc59353305e080a530fa5c62b59
793
py
Python
main.py
whatchacallit/summed-server
e77900335ca103bc51cb3a3d3de1557000ed4c1c
[ "MIT" ]
null
null
null
main.py
whatchacallit/summed-server
e77900335ca103bc51cb3a3d3de1557000ed4c1c
[ "MIT" ]
null
null
null
main.py
whatchacallit/summed-server
e77900335ca103bc51cb3a3d3de1557000ed4c1c
[ "MIT" ]
null
null
null
import logging, uvicorn from dotenv import find_dotenv, load_dotenv # # Load environment variables from the '.env' file # Make sure you have your credentials there for local development. # (On Azure, those env vars will be already be set via Application Settings, and we don't override them here) # load_dotenv(find_do...
28.321429
109
0.74401
import logging, uvicorn from dotenv import find_dotenv, load_dotenv # load_dotenv(find_dotenv()) # Standard format for all log messages log = logging.getLogger(__name__) # Imports the API (a FastAPI "app") # FastAPI App and API versions as Sub Applications # see: https://fastapi.tiangolo.com/advanced/sub-applic...
true
true
f74ffcbae23edc4bfe471d96a4ea2b88208919ae
618
py
Python
setup/download.py
hieuhd1/django_bgRemoverML
1b307d581e9638f58cd08c3a5c00c6f278d249f5
[ "Apache-2.0" ]
138
2020-08-03T07:49:17.000Z
2022-03-30T16:01:42.000Z
setup/download.py
hieuhd1/django_bgRemoverML
1b307d581e9638f58cd08c3a5c00c6f278d249f5
[ "Apache-2.0" ]
21
2020-11-13T04:15:01.000Z
2022-01-31T11:16:31.000Z
setup/download.py
hieuhd1/django_bgRemoverML
1b307d581e9638f58cd08c3a5c00c6f278d249f5
[ "Apache-2.0" ]
58
2020-08-06T04:49:13.000Z
2022-03-31T11:44:04.000Z
import gdown url = 'https://drive.google.com/uc?id=1s52ek_4YTDRt_EOkx1FS53u-vJa0c4nu' output = 'basnet.pth' gdown.download(url, output, quiet=False) gdown.cached_download(url, output, postprocess=gdown.extractall) url = 'https://drive.google.com/uc?id=1rbSTGKAE-MTxBYHd-51l2hMOQPT_7EPy' output = 'u2netp.pth' gdown.dow...
36.352941
72
0.79288
import gdown url = 'https://drive.google.com/uc?id=1s52ek_4YTDRt_EOkx1FS53u-vJa0c4nu' output = 'basnet.pth' gdown.download(url, output, quiet=False) gdown.cached_download(url, output, postprocess=gdown.extractall) url = 'https://drive.google.com/uc?id=1rbSTGKAE-MTxBYHd-51l2hMOQPT_7EPy' output = 'u2netp.pth' gdown.dow...
true
true
f74ffd43e2815eccf3dba7e0a2b61a6ee931369b
1,506
py
Python
jax/_src/scipy/stats/chi2.py
mariogeiger/jax
7098088f4eb15cf750398889e4341dbc15cda1b3
[ "Apache-2.0" ]
2
2021-09-27T06:33:20.000Z
2022-01-08T10:03:33.000Z
jax/_src/scipy/stats/chi2.py
mariogeiger/jax
7098088f4eb15cf750398889e4341dbc15cda1b3
[ "Apache-2.0" ]
9
2022-01-03T06:09:33.000Z
2022-03-07T19:31:57.000Z
jax/_src/scipy/stats/chi2.py
mariogeiger/jax
7098088f4eb15cf750398889e4341dbc15cda1b3
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
35.857143
94
0.719788
import scipy.stats as osp_stats from jax import lax from jax._src.lax.lax import _const as _lax_const from jax._src.numpy.util import _wraps from jax._src.numpy.lax_numpy import _promote_args_inexact, where, inf @_wraps(osp_stats.chi2.logpdf, update_doc=False) def logpdf(x, df, loc=0, scale=1): x,...
true
true
f74ffec7d2824e95925f039250a3367ec4b17a13
22
py
Python
main/libxrandr/update.py
RoastVeg/cports
803c7f07af341eb32f791b6ec1f237edb2764bd5
[ "BSD-2-Clause" ]
46
2021-06-10T02:27:32.000Z
2022-03-27T11:33:24.000Z
main/libxrandr/update.py
RoastVeg/cports
803c7f07af341eb32f791b6ec1f237edb2764bd5
[ "BSD-2-Clause" ]
58
2021-07-03T13:58:20.000Z
2022-03-13T16:45:35.000Z
main/libxrandr/update.py
RoastVeg/cports
803c7f07af341eb32f791b6ec1f237edb2764bd5
[ "BSD-2-Clause" ]
6
2021-07-04T10:46:40.000Z
2022-01-09T00:03:59.000Z
pkgname = "libXrandr"
11
21
0.727273
pkgname = "libXrandr"
true
true
f74fff097c48beeb2ea0ff206883398c248c33ba
2,986
py
Python
tests/diff.py
andriyor/mongomock
64cccf51bfb3e15eb65f380bbc65a59d218cf6d3
[ "BSD-3-Clause" ]
null
null
null
tests/diff.py
andriyor/mongomock
64cccf51bfb3e15eb65f380bbc65a59d218cf6d3
[ "BSD-3-Clause" ]
null
null
null
tests/diff.py
andriyor/mongomock
64cccf51bfb3e15eb65f380bbc65a59d218cf6d3
[ "BSD-3-Clause" ]
null
null
null
import datetime import decimal from platform import python_version import re import uuid try: from bson import decimal128, Regex _HAVE_PYMONGO = True except ImportError: _HAVE_PYMONGO = False class _NO_VALUE(object): pass # we don't use NOTHING because it might be returned from various APIs NO_VALU...
27.648148
87
0.603818
import datetime import decimal from platform import python_version import re import uuid try: from bson import decimal128, Regex _HAVE_PYMONGO = True except ImportError: _HAVE_PYMONGO = False class _NO_VALUE(object): pass NO_VALUE = _NO_VALUE() _SUPPORTED_BASE_TYPES = ( float, bool, str, date...
true
true
f74fff10c4c1481a36f336e6246cd48f17a9a083
6,850
py
Python
src/datadog_api_client/v2/model/logs_archive_integration_s3.py
MichaelTROEHLER/datadog-api-client-python
12c46626622fb1277bb1e172753b342c671348bd
[ "Apache-2.0" ]
null
null
null
src/datadog_api_client/v2/model/logs_archive_integration_s3.py
MichaelTROEHLER/datadog-api-client-python
12c46626622fb1277bb1e172753b342c671348bd
[ "Apache-2.0" ]
null
null
null
src/datadog_api_client/v2/model/logs_archive_integration_s3.py
MichaelTROEHLER/datadog-api-client-python
12c46626622fb1277bb1e172753b342c671348bd
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. import re # noqa: F401 import sys # noqa: F401 import nulltype # ...
39.595376
110
0.589635
import re import sys import nulltype from datadog_api_client.v2.model_utils import ( ApiTypeError, ModelComposed, ModelNormal, ModelSimple, cached_property, change_keys_js_to_python, convert_js_args_to_python_args, date, datetime, file_type, none_type, va...
true
true
f74ffff7d7924f85eb7520b2ceff259cd7f75480
6,890
py
Python
EKHFPost.py
shkolnick-kun/kalman_h_infinity_filters
4e76c38d91d5cb44e5f43f675aced4b917a5dbfd
[ "MIT" ]
5
2019-09-28T04:16:00.000Z
2022-03-02T02:49:25.000Z
EKHFPost.py
shkolnick-kun/kalman_h_infinity_filters
4e76c38d91d5cb44e5f43f675aced4b917a5dbfd
[ "MIT" ]
null
null
null
EKHFPost.py
shkolnick-kun/kalman_h_infinity_filters
4e76c38d91d5cb44e5f43f675aced4b917a5dbfd
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # pylint: disable=invalid-name,too-many-instance-attributes, too-many-arguments """ Copyright 2019 Paul A Beltyukov Copyright 2015 Roger R Labbe Jr. FilterPy library. http://github.com/rlabbe/filterpy Documentation at: https://filterpy.readthedocs.org Supporting book at: https://github.com/rl...
35.699482
86
0.579971
from copy import deepcopy import numpy as np from numpy import dot, eye, outer from scipy.stats import chi2 import scipy.linalg as linalg from filterpy.kalman import ExtendedKalmanFilter class ExtendedKalmanHinfFilterPosterior(ExtendedKalmanFilter): def __init__(self, dim_x, dim_z, dim_u=0, alpha = 0.01, eps_mul...
true
true
f75000600d4c573acfba9eb0bc37e3c9ea0a06d9
1,998
py
Python
docs/downloads/code/digitize-graph/digitize-data.py
Ronak1958/blog
b477bda7641970ed1f1438994aa7a084c921b898
[ "MIT" ]
1
2019-09-11T03:30:30.000Z
2019-09-11T03:30:30.000Z
docs/downloads/code/digitize-graph/digitize-data.py
Ronak1958/blog
b477bda7641970ed1f1438994aa7a084c921b898
[ "MIT" ]
null
null
null
docs/downloads/code/digitize-graph/digitize-data.py
Ronak1958/blog
b477bda7641970ed1f1438994aa7a084c921b898
[ "MIT" ]
null
null
null
from pynput import mouse class MyException(Exception):pass X = [] Y = [] NumberOfMouseClicks = 0 print('Click Origin') def on_click(x, y, button, pressed): button = str(button) global NumberOfMouseClicks NumberOfMouseClicks = NumberOfMouseClicks + 1 if NumberOfMouseClicks==1: print('Click To...
24.666667
89
0.584084
from pynput import mouse class MyException(Exception):pass X = [] Y = [] NumberOfMouseClicks = 0 print('Click Origin') def on_click(x, y, button, pressed): button = str(button) global NumberOfMouseClicks NumberOfMouseClicks = NumberOfMouseClicks + 1 if NumberOfMouseClicks==1: print('Click To...
true
true
f75000f23b2731484d65bf093219aef468d93990
355
pyw
Python
books/tech/py/m_lutz-programming_python-4_ed/code/ch_08/02_configuring_widget_appearance_2/main.pyw
ordinary-developer/education
1b1f40dacab873b28ee01dfa33a9bd3ec4cfed58
[ "MIT" ]
null
null
null
books/tech/py/m_lutz-programming_python-4_ed/code/ch_08/02_configuring_widget_appearance_2/main.pyw
ordinary-developer/education
1b1f40dacab873b28ee01dfa33a9bd3ec4cfed58
[ "MIT" ]
null
null
null
books/tech/py/m_lutz-programming_python-4_ed/code/ch_08/02_configuring_widget_appearance_2/main.pyw
ordinary-developer/education
1b1f40dacab873b28ee01dfa33a9bd3ec4cfed58
[ "MIT" ]
null
null
null
from tkinter import * if __name__ == '__main__': widget = Button(text = 'spam', padx = 10, pady = 10) widget.pack(padx = 20, pady = 20) widget.config(cursor = 'gumby') widget.config(bd = 8, relief = RAISED) widget.config(bg = 'dark green', fg = 'white') widget.config(font = ('helvetica', 20, '...
29.583333
63
0.616901
from tkinter import * if __name__ == '__main__': widget = Button(text = 'spam', padx = 10, pady = 10) widget.pack(padx = 20, pady = 20) widget.config(cursor = 'gumby') widget.config(bd = 8, relief = RAISED) widget.config(bg = 'dark green', fg = 'white') widget.config(font = ('helvetica', 20, '...
true
true
f7500265b72fb31311675f6683712ebfbb9d820b
36,815
py
Python
cinder/scheduler/host_manager.py
traghavendra/cinder-train
49af592c61da3216c04f5771b8ebf0927c5ce1c8
[ "Apache-2.0" ]
null
null
null
cinder/scheduler/host_manager.py
traghavendra/cinder-train
49af592c61da3216c04f5771b8ebf0927c5ce1c8
[ "Apache-2.0" ]
28
2017-08-17T14:46:05.000Z
2022-03-29T12:42:12.000Z
cinder/scheduler/host_manager.py
alokchandra11/cinder
121d9f512b4a6d1afe6a690effb7c2b379040a7b
[ "Apache-2.0" ]
3
2017-04-27T16:11:40.000Z
2020-02-12T21:27:00.000Z
# Copyright (c) 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless ...
41.272422
79
0.590113
try: from collections.abc import Mapping except ImportError: from collections import Mapping from oslo_config import cfg from oslo_log import log as logging from oslo_utils import importutils from oslo_utils import strutils from oslo_utils import timeutils from cinder.common import constants...
true
true
f75002cb840885fbe602a596b2cce22874a0dd31
1,443
py
Python
dev/bilibili_user.py
lin-zone/crawler-dev
0102021265e02d6274468d17ddafb21c26da295e
[ "MIT" ]
null
null
null
dev/bilibili_user.py
lin-zone/crawler-dev
0102021265e02d6274468d17ddafb21c26da295e
[ "MIT" ]
null
null
null
dev/bilibili_user.py
lin-zone/crawler-dev
0102021265e02d6274468d17ddafb21c26da295e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ bilibili user ~~~~~~~~~~~~~ 目标网站: www.bilibibli.com 爬虫描述: 爬取 bilibili 用户信息 示例链接: https://space.bilibili.com/33683045/ 接口格式: 示例接口: 用户信息 - https://api.bilibili.com/x/space/acc/info?mid=26019347&jsonp=jsonp 收藏夹 - https://api.bilibili.com/medialist/gateway/base/created?pn=1&ps=10&up_mid...
25.767857
104
0.718642
import scrapy from scrapy.crawler import CrawlerProcess class BilibiliUserSpider(scrapy.Spider): name = 'bilibili_user' allowed_domains = ['space.bilibili.com'] start_urls = ['https://api.bilibili.com/x/space/acc/info?mid=26019347&jsonp=jsonp'] def parse(self, response): pass set...
true
true
f750033608ec7a9542c28f9c701df28648c991a6
2,687
py
Python
wikiquote/langs/fr.py
guilhembn/python-wikiquotes
44c460dd865866affbf08c8a2976763b88aae8c2
[ "MIT" ]
null
null
null
wikiquote/langs/fr.py
guilhembn/python-wikiquotes
44c460dd865866affbf08c8a2976763b88aae8c2
[ "MIT" ]
null
null
null
wikiquote/langs/fr.py
guilhembn/python-wikiquotes
44c460dd865866affbf08c8a2976763b88aae8c2
[ "MIT" ]
null
null
null
from itertools import islice from lxml import etree from urllib import parse MAIN_PAGE = "Wikiquote:Accueil" def extract_quotes(tree, max_quotes): # French wiki uses a "citation" HTML class node_list = tree.xpath('//div[@class="citation"]') quotes = list(islice((span.text_content() ...
35.355263
116
0.565314
from itertools import islice from lxml import etree from urllib import parse MAIN_PAGE = "Wikiquote:Accueil" def extract_quotes(tree, max_quotes): node_list = tree.xpath('//div[@class="citation"]') quotes = list(islice((span.text_content() for span in node_list), ...
true
true