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
f70ff6e04f63c81719810ece2a44b944ddc360a2
68,978
py
Python
torch/testing/_internal/common_utils.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
torch/testing/_internal/common_utils.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
torch/testing/_internal/common_utils.py
wenhaopeter/read_pytorch_code
491f989cd918cf08874dd4f671fb7f0142a0bc4f
[ "Intel", "X11" ]
null
null
null
r"""Importing this file must **not** initialize CUDA context. test_distributed relies on this assumption to properly run. This means that when this is imported no CUDA calls shall be made, including torch.cuda.device_count(), etc. torch.testing._internal.common_cuda.py can freely initialize CUDA context when imported....
40.056911
124
0.625243
import sys import os import platform import re import gc import types from functools import partial import inspect import io import argparse import unittest import warnings import random import contextlib import socket import subprocess import time from collections import OrderedDict from contextlib import contextmana...
true
true
f70ff7b5f910ec0e2e5f617995f5bf4ccc679ff6
1,220
py
Python
deep-rl/lib/python2.7/site-packages/OpenGL/GLES2/EXT/robustness.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
3
2019-04-01T11:03:04.000Z
2019-12-31T02:17:15.000Z
deep-rl/lib/python2.7/site-packages/OpenGL/GLES2/EXT/robustness.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
1
2021-02-08T20:34:54.000Z
2021-02-08T20:34:54.000Z
deep-rl/lib/python2.7/site-packages/OpenGL/GLES2/EXT/robustness.py
ShujaKhalid/deep-rl
99c6ba6c3095d1bfdab81bd01395ced96bddd611
[ "MIT" ]
1
2018-06-07T22:31:11.000Z
2018-06-07T22:31:11.000Z
'''OpenGL extension EXT.robustness This module customises the behaviour of the OpenGL.raw.GLES2.EXT.robustness to provide a more Python-friendly API The official definition of this extension is available here: http://www.opengl.org/registry/specs/EXT/robustness.txt ''' from OpenGL import platform, constant, arrays ...
35.882353
73
0.811475
from OpenGL import platform, constant, arrays from OpenGL import extensions, wrapper import ctypes from OpenGL.raw.GLES2 import _types, _glgets from OpenGL.raw.GLES2.EXT.robustness import * from OpenGL.raw.GLES2.EXT.robustness import _EXTENSION_NAME def glInitRobustnessEXT(): from OpenGL import extensions retu...
true
true
f70ff8b39f836eb8b184cb1a2cede38cdd93a78e
6,628
py
Python
tests/orm/nodes/data/test_base.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
180
2019-07-12T07:45:26.000Z
2022-03-22T13:16:57.000Z
tests/orm/nodes/data/test_base.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
2,325
2019-07-04T13:41:44.000Z
2022-03-31T12:17:10.000Z
tests/orm/nodes/data/test_base.py
azadoks/aiida-core
b806b7fef8fc79090deccfe2019b77cb922e0581
[ "MIT", "BSD-3-Clause" ]
88
2019-07-06T01:42:39.000Z
2022-03-18T14:20:09.000Z
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
28.817391
116
0.628093
true
true
f70ff8c17dab8983b21b6b77a9aa402599833f23
2,391
py
Python
lib/python3.8/site-packages/ansible_collections/community/general/tests/integration/targets/inventory_kubevirt/inventory_diff.py
cjsteel/python3-venv-ansible-2.10.5
c95395c4cae844dc66fddde9b4343966f4b2ecd5
[ "Apache-1.1" ]
5
2020-12-16T21:42:09.000Z
2022-03-28T16:04:32.000Z
.ansible/collections/ansible_collections/community/general/tests/integration/targets/inventory_kubevirt/inventory_diff.py
chronicc/proving-ground
3e392122a05fb8383a3700954baebb0df330e9e3
[ "MIT" ]
null
null
null
.ansible/collections/ansible_collections/community/general/tests/integration/targets/inventory_kubevirt/inventory_diff.py
chronicc/proving-ground
3e392122a05fb8383a3700954baebb0df330e9e3
[ "MIT" ]
null
null
null
#!/usr/bin/env python from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import sys def check_hosts(contrib, plugin): contrib_hosts = sorted(contrib['_meta']['hostvars'].keys()) plugin_hosts = sorted(plugin['_meta']['hostvars'].keys()) assert contrib_host...
33.676056
125
0.649101
from __future__ import (absolute_import, division, print_function) __metaclass__ = type import json import sys def check_hosts(contrib, plugin): contrib_hosts = sorted(contrib['_meta']['hostvars'].keys()) plugin_hosts = sorted(plugin['_meta']['hostvars'].keys()) assert contrib_hosts == plugin_hosts ...
true
true
f70ff9f7bc88d87ca48ff19099b4239c3f5439c9
3,679
py
Python
lib/modules/powershell/credentials/mimikatz/extract_tickets.py
RedBulletTooling/Empire
3f4146bf8221ad3d2dcbe8ef4a61dabd66b86e0d
[ "BSD-3-Clause" ]
3
2019-11-30T06:12:45.000Z
2021-06-10T05:35:33.000Z
lib/modules/powershell/credentials/mimikatz/extract_tickets.py
RedBulletTooling/Empire
3f4146bf8221ad3d2dcbe8ef4a61dabd66b86e0d
[ "BSD-3-Clause" ]
20
2020-03-11T03:58:21.000Z
2020-03-12T03:59:38.000Z
lib/modules/powershell/credentials/mimikatz/extract_tickets.py
RedBulletTooling/Empire
3f4146bf8221ad3d2dcbe8ef4a61dabd66b86e0d
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function from builtins import str from builtins import object from lib.common import helpers import threading class Module(object): def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-Mimikatz extract kerberos tickets.', 'Author': [...
34.707547
127
0.594183
from __future__ import print_function from builtins import str from builtins import object from lib.common import helpers import threading class Module(object): def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-Mimikatz extract kerberos tickets.', 'Author': [...
true
true
f70ffa952087ecc203a557dd249439198e434117
31
py
Python
esphome/components/version/__init__.py
OttoWinter/esphomeyaml
6a85259e4d6d1b0a0f819688b8e555efcb99ecb0
[ "MIT" ]
249
2018-04-07T12:04:11.000Z
2019-01-25T01:11:34.000Z
esphome/components/adc/__init__.py
OttoWinter/esphomeyaml
6a85259e4d6d1b0a0f819688b8e555efcb99ecb0
[ "MIT" ]
243
2018-04-11T16:37:11.000Z
2019-01-25T16:50:37.000Z
esphome/components/md5/__init__.py
OttoWinter/esphomeyaml
6a85259e4d6d1b0a0f819688b8e555efcb99ecb0
[ "MIT" ]
40
2018-04-10T05:50:14.000Z
2019-01-25T15:20:36.000Z
CODEOWNERS = ["@esphome/core"]
15.5
30
0.677419
CODEOWNERS = ["@esphome/core"]
true
true
f70ffac8915dec77e469e6bc0f0f06e1bcd32725
1,831
py
Python
s2e_env/utils/repos.py
benquike/s2e-env
3a71fee8f80b3318ad6b971c0bb42b5f60b27d8b
[ "BSD-3-Clause" ]
55
2019-12-20T03:25:14.000Z
2022-01-16T07:19:47.000Z
s2e_env/utils/repos.py
weizhou-chaojixx/s2e-env
ba72dac30a6db65f87fea13f275003791fcf4052
[ "BSD-3-Clause" ]
2
2020-11-02T08:01:00.000Z
2022-03-27T02:59:18.000Z
s2e_env/utils/repos.py
weizhou-chaojixx/s2e-env
ba72dac30a6db65f87fea13f275003791fcf4052
[ "BSD-3-Clause" ]
11
2020-08-06T03:59:45.000Z
2022-02-25T02:31:59.000Z
""" Copyright (c) 2017 Cyberhaven Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sub...
35.211538
78
0.761879
import logging import os import sys from sh import git, ErrorReturnCode from s2e_env import CONSTANTS from s2e_env.command import CommandError logger = logging.getLogger(__name__) def git_clone(git_repo_url, git_repo_dir): try: logger.info('Fetching from %s to %s', git_repo_url, git_repo_dir) ...
true
true
f70ffae33736b36285853cfb6a7d24af8048216a
9,322
py
Python
hardware/matcher.py
jacek-jablonski/hardware
4447a07609b54ff1a0eea0f07c75030e5752afe2
[ "Apache-2.0" ]
null
null
null
hardware/matcher.py
jacek-jablonski/hardware
4447a07609b54ff1a0eea0f07c75030e5752afe2
[ "Apache-2.0" ]
null
null
null
hardware/matcher.py
jacek-jablonski/hardware
4447a07609b54ff1a0eea0f07c75030e5752afe2
[ "Apache-2.0" ]
1
2019-10-05T13:19:25.000Z
2019-10-05T13:19:25.000Z
# # Copyright (C) 2013-2015 eNovance SAS <licensing@enovance.com> # # Author: Frederic Lepied <frederic.lepied@enovance.com> # # 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://ww...
31.281879
78
0.548487
import ipaddress import logging import re import sys LOG = logging.getLogger('hardware.matcher') def _adder(array, index, value): array[index] = value def _appender(array, index, value): try: array[index].append(value) except KeyError: array[index] = [value, ] def _...
true
true
f70ffb5207b57f675a7239f3cd40636f10b65be5
15,741
py
Python
openpeerpower/components/mobile_app/webhook.py
OpenPeerPower/openpeerpower
940a04a88e8f78e2d010dc912ad6905ae363503c
[ "Apache-2.0" ]
null
null
null
openpeerpower/components/mobile_app/webhook.py
OpenPeerPower/openpeerpower
940a04a88e8f78e2d010dc912ad6905ae363503c
[ "Apache-2.0" ]
null
null
null
openpeerpower/components/mobile_app/webhook.py
OpenPeerPower/openpeerpower
940a04a88e8f78e2d010dc912ad6905ae363503c
[ "Apache-2.0" ]
1
2019-04-24T14:10:08.000Z
2019-04-24T14:10:08.000Z
"""Webhook handlers for mobile_app.""" from functools import wraps import logging import secrets from aiohttp.web import HTTPBadRequest, Request, Response, json_response from nacl.secret import SecretBox import voluptuous as vol from openpeerpower.components.binary_sensor import ( DEVICE_CLASSES as BINARY_SENSOR_...
32.12449
88
0.688711
from functools import wraps import logging import secrets from aiohttp.web import HTTPBadRequest, Request, Response, json_response from nacl.secret import SecretBox import voluptuous as vol from openpeerpower.components.binary_sensor import ( DEVICE_CLASSES as BINARY_SENSOR_CLASSES, ) from openpeerpower.component...
true
true
f70ffb5653d4966b0c8c0eb7aea68ce4980e6d72
7,639
py
Python
lc101/school_app/models.py
Khoi938/AWS-SchoolApp
64612718f2cf5e4fc0cd9622fcf51b9224776192
[ "MIT" ]
null
null
null
lc101/school_app/models.py
Khoi938/AWS-SchoolApp
64612718f2cf5e4fc0cd9622fcf51b9224776192
[ "MIT" ]
3
2020-06-05T18:33:38.000Z
2021-06-10T20:22:00.000Z
lc101/school_app/models.py
Khoi938/AWS-SchoolApp
64612718f2cf5e4fc0cd9622fcf51b9224776192
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver #------- Profile, Student, Teacher Model ------- ## TODO Refactor CharField To Text Field Modify HTMl maxlength. WRONG USAGE!!! ALLL WRONG class Profile(models.M...
51.268456
138
0.728629
from django.db import models from django.contrib.auth.models import User from django.db.models.signals import post_save from django.dispatch import receiver elete = models.SET_NULL) street_address = models.CharField(max_length=200, blank=True) city = models.CharField(max_length=100, blank=True) stat...
true
true
f70ffb6cc9871e9b47e543f54c1311f5835fc889
476
py
Python
plotly/validators/scattergeo/marker/colorbar/_y.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
2
2020-03-24T11:41:14.000Z
2021-01-14T07:59:43.000Z
plotly/validators/scattergeo/marker/colorbar/_y.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
null
null
null
plotly/validators/scattergeo/marker/colorbar/_y.py
faezs/plotly.py
6009b5b9c746e5d2a2849ad255a4eb234b551ed7
[ "MIT" ]
4
2019-06-03T14:49:12.000Z
2022-01-06T01:05:12.000Z
import _plotly_utils.basevalidators class YValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name='y', parent_name='scattergeo.marker.colorbar', **kwargs ): super(YValidator, self).__init__( plotly_name=plotly_name, ...
22.666667
63
0.556723
import _plotly_utils.basevalidators class YValidator(_plotly_utils.basevalidators.NumberValidator): def __init__( self, plotly_name='y', parent_name='scattergeo.marker.colorbar', **kwargs ): super(YValidator, self).__init__( plotly_name=plotly_name, ...
true
true
f70ffe3f4ef711992da1362f8030fc7607809690
791
py
Python
ibis/backends/pandas/execution/__init__.py
rtpsw/ibis
d7318fdf87121cd8fadbcf0369a2b217aab3053a
[ "Apache-2.0" ]
1
2022-03-22T10:39:37.000Z
2022-03-22T10:39:37.000Z
ibis/backends/pandas/execution/__init__.py
marlenezw/ibis
14b9baf3e1021e8698e7f0ae3c0ae5747543431c
[ "Apache-2.0" ]
null
null
null
ibis/backends/pandas/execution/__init__.py
marlenezw/ibis
14b9baf3e1021e8698e7f0ae3c0ae5747543431c
[ "Apache-2.0" ]
null
null
null
from ibis.backends.pandas.execution.arrays import * # noqa: F401,F403 from ibis.backends.pandas.execution.decimal import * # noqa: F401,F403 from ibis.backends.pandas.execution.generic import * # noqa: F401,F403 from ibis.backends.pandas.execution.join import * # noqa: F401,F403 from ibis.backends.pandas.execution....
65.916667
75
0.777497
from ibis.backends.pandas.execution.arrays import * from ibis.backends.pandas.execution.decimal import * from ibis.backends.pandas.execution.generic import * from ibis.backends.pandas.execution.join import * from ibis.backends.pandas.execution.maps import * from ibis.backends.pandas.execution.selection import...
true
true
f70ffe665af27588bbe9a0130f4ef97d24df0153
961
py
Python
enex2notion/cli_wkhtmltopdf.py
starplanet/enex2notion
3bd97112e8234b477a3d53c5461ce7a3ac55f7aa
[ "MIT" ]
49
2021-12-12T04:13:24.000Z
2022-03-31T12:58:57.000Z
enex2notion/cli_wkhtmltopdf.py
starplanet/enex2notion
3bd97112e8234b477a3d53c5461ce7a3ac55f7aa
[ "MIT" ]
11
2021-12-03T10:49:54.000Z
2022-03-29T20:00:30.000Z
enex2notion/cli_wkhtmltopdf.py
starplanet/enex2notion
3bd97112e8234b477a3d53c5461ce7a3ac55f7aa
[ "MIT" ]
3
2022-02-04T13:25:21.000Z
2022-03-07T17:54:36.000Z
import logging import os import platform import shutil import sys from pathlib import Path logger = logging.getLogger(__name__) def ensure_wkhtmltopdf(): # pragma: no cover if shutil.which("wkhtmltopdf") is None: if platform.system() == "Windows": wkhtmltopdf_path = _find_wkhtmltopdf_path() ...
30.03125
87
0.667014
import logging import os import platform import shutil import sys from pathlib import Path logger = logging.getLogger(__name__) def ensure_wkhtmltopdf(): if shutil.which("wkhtmltopdf") is None: if platform.system() == "Windows": wkhtmltopdf_path = _find_wkhtmltopdf_path() if wkh...
true
true
f70ffe907544adc81b183974aedfca98b72ac20d
2,936
py
Python
forumdemo/article/views.py
lamdba0602/forumdemo
82c6223d6b6d7fb3bac049e342d3048a5117a2b7
[ "Apache-2.0" ]
null
null
null
forumdemo/article/views.py
lamdba0602/forumdemo
82c6223d6b6d7fb3bac049e342d3048a5117a2b7
[ "Apache-2.0" ]
null
null
null
forumdemo/article/views.py
lamdba0602/forumdemo
82c6223d6b6d7fb3bac049e342d3048a5117a2b7
[ "Apache-2.0" ]
null
null
null
from django.shortcuts import redirect from django.shortcuts import render from django.core.paginator import Paginator from django.contrib.auth.decorators import login_required from article.forms import ArticleForm from article.models import Article from block.models import Block from comment.models import Comment de...
39.146667
97
0.628065
from django.shortcuts import redirect from django.shortcuts import render from django.core.paginator import Paginator from django.contrib.auth.decorators import login_required from article.forms import ArticleForm from article.models import Article from block.models import Block from comment.models import Comment de...
true
true
f70ffef3c196a246295ef81a2cfd74f59b7eae71
7,088
py
Python
ros/src/twist_controller/dbw_node.py
russell13192/CarND-Capstone
1c182de5fb71f021f33518fe54e5ba27748a424d
[ "MIT" ]
1
2019-08-19T20:36:45.000Z
2019-08-19T20:36:45.000Z
ros/src/twist_controller/dbw_node.py
russell13192/CarND-Capstone
1c182de5fb71f021f33518fe54e5ba27748a424d
[ "MIT" ]
null
null
null
ros/src/twist_controller/dbw_node.py
russell13192/CarND-Capstone
1c182de5fb71f021f33518fe54e5ba27748a424d
[ "MIT" ]
3
2019-08-19T20:40:33.000Z
2019-09-22T18:56:50.000Z
#!/usr/bin/env python # import cte_calculator from geometry_msgs.msg import PoseStamped import rospy from std_msgs.msg import Bool from styx_msgs.msg import Lane from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport from geometry_msgs.msg import TwistStamped import math from twist_controller i...
55.375
109
0.616253
from geometry_msgs.msg import PoseStamped import rospy from std_msgs.msg import Bool from styx_msgs.msg import Lane from dbw_mkz_msgs.msg import ThrottleCmd, SteeringCmd, BrakeCmd, SteeringReport from geometry_msgs.msg import TwistStamped import math from twist_controller import Controller class DBWNode(object): ...
true
true
f70fff870565855a3fc51fd9d30f07cd0448c020
36,690
py
Python
opencolorio_config_aces/config/reference/generate/config.py
rdaniels29/OpenColorIO-Config-ACES
ed0d77ad47fd50ad6e71813980d589b2b44cf272
[ "BSD-3-Clause" ]
null
null
null
opencolorio_config_aces/config/reference/generate/config.py
rdaniels29/OpenColorIO-Config-ACES
ed0d77ad47fd50ad6e71813980d589b2b44cf272
[ "BSD-3-Clause" ]
null
null
null
opencolorio_config_aces/config/reference/generate/config.py
rdaniels29/OpenColorIO-Config-ACES
ed0d77ad47fd50ad6e71813980d589b2b44cf272
[ "BSD-3-Clause" ]
null
null
null
# SPDX-License-Identifier: BSD-3-Clause # Copyright Contributors to the OpenColorIO Project. """ *aces-dev* Reference Config Generator ===================================== Defines various objects related to the generation of the *aces-dev* reference *OpenColorIO* config: - :func:`opencolorio_config_aces.generate_c...
31.766234
79
0.634096
import csv import logging import re from collections import defaultdict from datetime import datetime from enum import Flag, auto from pathlib import Path from opencolorio_config_aces.config.generation import ( ConfigData, colorspace_factory, generate_config, look_factory, view_transform_factory) from openc...
true
true
f710006f30293d1e950a819440eba24d7dbe294e
1,359
py
Python
src/kv_classes/lang.py
Mulugruntz/deep_3d_photo
e296343757b5715145d49f283732821ef7915472
[ "MIT" ]
7
2020-07-22T07:35:15.000Z
2021-12-29T13:46:31.000Z
src/kv_classes/lang.py
Mulugruntz/deep_3d_photo
e296343757b5715145d49f283732821ef7915472
[ "MIT" ]
2
2021-04-01T10:39:14.000Z
2021-12-29T14:06:04.000Z
src/kv_classes/lang.py
Mulugruntz/deep_3d_photo
e296343757b5715145d49f283732821ef7915472
[ "MIT" ]
null
null
null
from kivy.lang import Observable import gettext from constants import LOCALE_DIR class Lang(Observable): observers = [] lang = None def __init__(self, defaultlang, transalte=None): super(Lang, self).__init__() self.ugettext = None self.lang = defaultlang self._translate =...
31.604651
82
0.617366
from kivy.lang import Observable import gettext from constants import LOCALE_DIR class Lang(Observable): observers = [] lang = None def __init__(self, defaultlang, transalte=None): super(Lang, self).__init__() self.ugettext = None self.lang = defaultlang self._translate =...
true
true
f710013e8fda200cf47f10c609828756146e2766
7,377
py
Python
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/aio/_container_registry_management_client.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/aio/_container_registry_management_client.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2020_11_01_preview/aio/_container_registry_management_client.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
55.466165
143
0.755456
from typing import Any, Optional, TYPE_CHECKING from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest from azure.mgmt.core import AsyncARMPipelineClient from msrest import Deserializer, Serializer if TYPE_CHECKING: from azure.core.credentials_async import AsyncTokenCredential from...
true
true
f71001c69e6b9033c61079b91a451817bc6a6ed7
3,311
py
Python
Geometry/MTDCommonData/test/testMTDinDD4hep.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
6
2017-09-08T14:12:56.000Z
2022-03-09T23:57:01.000Z
Geometry/MTDCommonData/test/testMTDinDD4hep.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
545
2017-09-19T17:10:19.000Z
2022-03-07T16:55:27.000Z
Geometry/MTDCommonData/test/testMTDinDD4hep.py
SWuchterl/cmssw
769b4a7ef81796579af7d626da6039dfa0347b8e
[ "Apache-2.0" ]
14
2017-10-04T09:47:21.000Z
2019-10-23T18:04:45.000Z
import FWCore.ParameterSet.Config as cms process = cms.Process("CompareGeometryTest") process.source = cms.Source("EmptySource") process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) ) process.MessageLogger = cms.Service( "MessageLogger", statistics = cms.untracked.vstring('c...
38.952941
140
0.534884
import FWCore.ParameterSet.Config as cms process = cms.Process("CompareGeometryTest") process.source = cms.Source("EmptySource") process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1) ) process.MessageLogger = cms.Service( "MessageLogger", statistics = cms.untracked.vstring('c...
true
true
f71002071aa31f475e86d1779639faaa7bdb84e1
2,371
py
Python
tests/digraph/test_depth.py
georgios-ts/retworkx
8efe47c8ffaa2bdf1730ad50ada389bf9ca15229
[ "Apache-2.0" ]
null
null
null
tests/digraph/test_depth.py
georgios-ts/retworkx
8efe47c8ffaa2bdf1730ad50ada389bf9ca15229
[ "Apache-2.0" ]
null
null
null
tests/digraph/test_depth.py
georgios-ts/retworkx
8efe47c8ffaa2bdf1730ad50ada389bf9ca15229
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under th...
32.930556
75
0.6124
import unittest import retworkx class TestLongestPath(unittest.TestCase): def test_linear(self): dag = retworkx.PyDAG() node_a = dag.add_node("a") node_b = dag.add_child(node_a, "b", {}) node_c = dag.add_child(node_b, "c", {}) dag.add_child(node_b, "d", {}) ...
true
true
f710059dee719252061de77a44f95f80a232bbe1
482
py
Python
mmcap/utils/logger.py
hnp0411/mmcaptioning
47bcdee3734cdaaa96a34e927cdec5cc43cab538
[ "Apache-2.0" ]
null
null
null
mmcap/utils/logger.py
hnp0411/mmcaptioning
47bcdee3734cdaaa96a34e927cdec5cc43cab538
[ "Apache-2.0" ]
null
null
null
mmcap/utils/logger.py
hnp0411/mmcaptioning
47bcdee3734cdaaa96a34e927cdec5cc43cab538
[ "Apache-2.0" ]
null
null
null
import logging from mmcv.utils import get_logger def get_root_logger(log_file=None, log_level=logging.INFO): """Get root logger. Args: log_file (str, optional): File path of log. Defaults to None. log_level (int, optional): The level of logger. Defaults to logging.INFO. Retu...
22.952381
77
0.670124
import logging from mmcv.utils import get_logger def get_root_logger(log_file=None, log_level=logging.INFO): logger = get_logger(name='mmcap', log_file=log_file, log_level=log_level) return logger
true
true
f71006b40f042b75b7b313be0ca71bb1ccf5d8ae
191
py
Python
automated/__init__.py
gabrielfern/automated-leda-tasks
b50bb14d118d64ad7361b5eb8bee9cf248bc57cf
[ "MIT" ]
9
2017-07-26T19:10:12.000Z
2018-04-25T02:27:09.000Z
automated/__init__.py
gabrielfern/automated-leda-tasks
b50bb14d118d64ad7361b5eb8bee9cf248bc57cf
[ "MIT" ]
3
2017-08-02T23:32:28.000Z
2018-10-13T00:08:54.000Z
automated/__init__.py
hericlesme/automated-leda-tasks
f0759d310636d281789f05bac7c9c624b75ab0e5
[ "MIT" ]
1
2018-05-24T23:55:31.000Z
2018-05-24T23:55:31.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Gabriel Fernandes <gabrielfernndss@gmail.com> # Héricles Emanuel <hericles.me@gmail.com> if __name__ == '__main__': print('easter_egg!')
21.222222
47
0.680628
if __name__ == '__main__': print('easter_egg!')
true
true
f710076e41e510dc6c2d749b607b512d2e7db9c3
1,706
py
Python
passgen/models.py
diyajaiswal11/HackCorona
dc6f7803a77b7ce6325f8d61f5f4fe54076ea461
[ "MIT" ]
7
2020-04-06T13:00:14.000Z
2021-08-07T04:26:53.000Z
passgen/models.py
diyajaiswal11/HackCorona
dc6f7803a77b7ce6325f8d61f5f4fe54076ea461
[ "MIT" ]
10
2020-04-07T07:07:44.000Z
2022-03-12T00:22:47.000Z
passgen/models.py
diyajaiswal11/HackCorona
dc6f7803a77b7ce6325f8d61f5f4fe54076ea461
[ "MIT" ]
2
2020-04-03T08:36:34.000Z
2021-07-27T19:22:15.000Z
from django.db import models from django.utils import timezone category_choices = ( ("Essential Services Pass", "Essential Services Pass"), ("Emergency Services Pass", "Emergency Services Pass"), ) subcategory_choices = ( ("ATM/Banking", "ATM/Banking"), ("Delivery Worker", "Delivery Worker"), ...
41.609756
78
0.736225
from django.db import models from django.utils import timezone category_choices = ( ("Essential Services Pass", "Essential Services Pass"), ("Emergency Services Pass", "Emergency Services Pass"), ) subcategory_choices = ( ("ATM/Banking", "ATM/Banking"), ("Delivery Worker", "Delivery Worker"), ...
true
true
f71008c40263271753ec152fe0f9a5a57343a4fd
6,627
py
Python
docs/conf.py
scipp/scippnexus
978b3b671355f55f94eb9d79f2ffe5cf793605ba
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
scipp/scippnexus
978b3b671355f55f94eb9d79f2ffe5cf793605ba
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
scipp/scippnexus
978b3b671355f55f94eb9d79f2ffe5cf793605ba
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import doctest from datetime import date import scippnexus html_show_sourcelink = True extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.mathjax', 'sphinx.ext.napoleon', 'sphinx_autodoc_typehi...
31.407583
83
0.673306
import doctest from datetime import date import scippnexus html_show_sourcelink = True extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.doctest', 'sphinx.ext.intersphinx', 'sphinx.ext.mathjax', 'sphinx.ext.napoleon', 'sphinx_autodoc_typehints', 'sphinx_copyb...
true
true
f71008d441773617443f83aa63ba8084f8da41c4
603
py
Python
src/images/migrations/0002_image_thumbnail.py
thesus/bokstaever
e0a5e2614dd222ccd56a8945aba4fd28de85dd31
[ "MIT" ]
null
null
null
src/images/migrations/0002_image_thumbnail.py
thesus/bokstaever
e0a5e2614dd222ccd56a8945aba4fd28de85dd31
[ "MIT" ]
7
2019-11-18T16:11:01.000Z
2019-11-18T16:11:04.000Z
src/images/migrations/0002_image_thumbnail.py
thesus/bokstaever
e0a5e2614dd222ccd56a8945aba4fd28de85dd31
[ "MIT" ]
null
null
null
# Generated by Django 2.2 on 2019-04-18 13:14 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("images", "0001_initial"), ] operations = [ migrations.AddField( model_name="image", n...
23.192308
60
0.543947
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("images", "0001_initial"), ] operations = [ migrations.AddField( model_name="image", name="thumbnail", field=models.For...
true
true
f7100a0d535f79b24ae402b1d9ef106e9e8e0f59
319
py
Python
000989letpy/letpy_064_str_len_20200511.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
000989letpy/letpy_064_str_len_20200511.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
000989letpy/letpy_064_str_len_20200511.py
SafonovMikhail/python_000577
739f764e80f1ca354386f00b8e9db1df8c96531d
[ "Apache-2.0" ]
null
null
null
string = input() string_length = len(string) print(string_length) string = input() if len(string) < 5: print("Ошибка! Введите больше пяти символов!") string = input() if not string: print("Ошибка! Введите хоть что-нибудь!") string = input() if len(string) == 0: print("Ошибка! Введите хоть что-нибудь!")
19.9375
50
0.680251
string = input() string_length = len(string) print(string_length) string = input() if len(string) < 5: print("Ошибка! Введите больше пяти символов!") string = input() if not string: print("Ошибка! Введите хоть что-нибудь!") string = input() if len(string) == 0: print("Ошибка! Введите хоть что-нибудь!")
true
true
f7100c11398d00d664ae324a7f7382af849d2c99
30,853
py
Python
nltk/parse/dependencygraph.py
Geolem/nltk
39b84d97bc857fce4fef185c69b94546b8474551
[ "Apache-2.0" ]
null
null
null
nltk/parse/dependencygraph.py
Geolem/nltk
39b84d97bc857fce4fef185c69b94546b8474551
[ "Apache-2.0" ]
null
null
null
nltk/parse/dependencygraph.py
Geolem/nltk
39b84d97bc857fce4fef185c69b94546b8474551
[ "Apache-2.0" ]
null
null
null
# Natural Language Toolkit: Dependency Grammars # # Copyright (C) 2001-2021 NLTK Project # Author: Jason Narad <jason.narad@gmail.com> # Steven Bird <stevenbird1@gmail.com> (modifications) # # URL: <http://nltk.org/> # For license information, see LICENSE.TXT # """ Tools for reading and writing dependency tree...
39.555128
118
0.454769
from collections import defaultdict from itertools import chain from pprint import pformat import subprocess import warnings from nltk.tree import Tree for tree_str in infile.read().split("\n\n") ] def left_children(self, node_index): children = chain.from_iterable...
true
true
f7100dfc5d3a59776b012e0dd0e3c6e254fd289d
2,169
py
Python
code/torch/models/hypersearch/args.py
siduojiang/BERTVision
9d0d4856300973488ead67e2d06e243bf07447ad
[ "MIT" ]
5
2020-08-06T10:12:08.000Z
2022-03-17T10:38:40.000Z
code/torch/models/hypersearch/args.py
siduojiang/BERTVision
9d0d4856300973488ead67e2d06e243bf07447ad
[ "MIT" ]
9
2020-06-23T16:57:52.000Z
2021-01-17T01:52:45.000Z
code/torch/models/hypersearch/args.py
cbenge509/BERTVision
01519bea0882fa72e86a1b62f2d0d52d22c26dfc
[ "MIT" ]
null
null
null
import os, sys sys.path.append("C:\\BERTVision\\code\\torch") import torch import models.args def get_args(): # retreive the general models.args and attach them here parser = models.args.get_args() # set search specific args parser.add_argument('--model', type=str, ...
37.396552
97
0.467958
import os, sys sys.path.append("C:\\BERTVision\\code\\torch") import torch import models.args def get_args(): parser = models.args.get_args() parser.add_argument('--model', type=str, default='MSR', required=True) parser.add_...
true
true
f7100f39a080309ca2cb603931b8da369057f812
717
py
Python
BOOK/MAIN/05-file-handling/chapter-5-examples/15-display-records.py
kabirsrivastava3/python-practice
f56a4a0764031d3723b0ba4cd1418a1a83b1e4f5
[ "MIT" ]
null
null
null
BOOK/MAIN/05-file-handling/chapter-5-examples/15-display-records.py
kabirsrivastava3/python-practice
f56a4a0764031d3723b0ba4cd1418a1a83b1e4f5
[ "MIT" ]
null
null
null
BOOK/MAIN/05-file-handling/chapter-5-examples/15-display-records.py
kabirsrivastava3/python-practice
f56a4a0764031d3723b0ba4cd1418a1a83b1e4f5
[ "MIT" ]
null
null
null
#display records of students of roll no. 22 and 23. import pickle stu = {} #declare empty dictionary object; it will hold record found = False finObj = open('Stu.dat',"rb") #open binary file in read mode searchKeys = [22,23] #read from the file try: print("File Stu.dat store these records") while True: #it wi...
29.875
88
0.665272
import pickle stu = {} found = False finObj = open('Stu.dat',"rb") searchKeys = [22,23] try: print("File Stu.dat store these records") while True: stu = pickle.load(finObj) if stu['Rollno'] in searchKeys: print(stu) found = True except EOFError: if found == ...
true
true
f7100ff56bd69c1d3a211ca0a9af3fcd0dae54de
1,835
py
Python
client/hipchat/HipChatMonitor.py
xEoDx/eodbot
933d9c1c9c836a5a6091a26bfd4d7eb98f932595
[ "Apache-2.0" ]
null
null
null
client/hipchat/HipChatMonitor.py
xEoDx/eodbot
933d9c1c9c836a5a6091a26bfd4d7eb98f932595
[ "Apache-2.0" ]
5
2020-03-04T21:39:32.000Z
2021-12-09T19:43:28.000Z
client/hipchat/HipChatMonitor.py
xEoDx/eodbot
933d9c1c9c836a5a6091a26bfd4d7eb98f932595
[ "Apache-2.0" ]
null
null
null
from hipchat import HipChatManager import time import configparser _MAX_SLEEP_TIME = 5 _MIN_SLEEP_TIME = 2 _SPAM_EODBOT_URL = 3500 class HipChatMonitor: def __init__(self, eodBotParser): print("Initializing HipChatMonitor with eodBotParser: ",eodBotParser) self.sleepTime = _MIN_SLEEP_TIME self.lastIdChecked = ...
35.288462
149
0.725886
from hipchat import HipChatManager import time import configparser _MAX_SLEEP_TIME = 5 _MIN_SLEEP_TIME = 2 _SPAM_EODBOT_URL = 3500 class HipChatMonitor: def __init__(self, eodBotParser): print("Initializing HipChatMonitor with eodBotParser: ",eodBotParser) self.sleepTime = _MIN_SLEEP_TIME self.lastIdChecked = ...
true
true
f71010536d580e3dc257b139c71119eec3b95907
2,202
py
Python
tulip/transys/__init__.py
miquelramirez/tulip-control
ce54897c242689f45ad33650f157bf1805b35ed6
[ "BSD-3-Clause" ]
1
2020-02-13T14:13:50.000Z
2020-02-13T14:13:50.000Z
tulip/transys/__init__.py
miquelramirez/tulip-control
ce54897c242689f45ad33650f157bf1805b35ed6
[ "BSD-3-Clause" ]
null
null
null
tulip/transys/__init__.py
miquelramirez/tulip-control
ce54897c242689f45ad33650f157bf1805b35ed6
[ "BSD-3-Clause" ]
1
2019-07-09T16:32:39.000Z
2019-07-09T16:32:39.000Z
# Copyright (c) 2013-2014 by California Institute of Technology # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice,...
38.631579
73
0.781108
from __future__ import absolute_import from .mathset import MathSet, SubSet, PowerSet, TypedDict from .labeled_graphs import prepend_with from .transys import ( KripkeStructure, FiniteTransitionSystem, FTS, LabeledGameGraph, tuple2fts, line_labeled_with, cycle_labeled_with ) ...
true
true
f71011ebc8324e6ec4b4d16a31c684a403ca6635
325
py
Python
FindNumberswithEvenNumberofDigits.py
eagletusk/pythonPractice
4ac8d8c2f45072407b8f25514a3e54bddcd38a33
[ "MIT" ]
null
null
null
FindNumberswithEvenNumberofDigits.py
eagletusk/pythonPractice
4ac8d8c2f45072407b8f25514a3e54bddcd38a33
[ "MIT" ]
null
null
null
FindNumberswithEvenNumberofDigits.py
eagletusk/pythonPractice
4ac8d8c2f45072407b8f25514a3e54bddcd38a33
[ "MIT" ]
null
null
null
class Solution: def findNumbers(self, nums: List[int]) -> int: bkt =[] for n in nums: count = str(n).count('')-1 print (str(n), count) if count%2 == 0 : bkt.append(count) count =0 count =0 return len(bkt) ...
27.083333
50
0.412308
class Solution: def findNumbers(self, nums: List[int]) -> int: bkt =[] for n in nums: count = str(n).count('')-1 print (str(n), count) if count%2 == 0 : bkt.append(count) count =0 count =0 return len(bkt) ...
true
true
f710122a35afda1f83e03c6f8b0342dcee505738
12,984
py
Python
tests/rest_api/test_jobs.py
campin11/cvat
085ccce1cfb018d4eea2309d3086f4c8909c2cd3
[ "Intel", "MIT" ]
null
null
null
tests/rest_api/test_jobs.py
campin11/cvat
085ccce1cfb018d4eea2309d3086f4c8909c2cd3
[ "Intel", "MIT" ]
null
null
null
tests/rest_api/test_jobs.py
campin11/cvat
085ccce1cfb018d4eea2309d3086f4c8909c2cd3
[ "Intel", "MIT" ]
null
null
null
# Copyright (C) 2021 Intel Corporation # # SPDX-License-Identifier: MIT from http import HTTPStatus from deepdiff import DeepDiff import pytest from .utils.config import get_method, patch_method def get_job_staff(job, tasks, projects): job_staff = [] job_staff.append(job['assignee']) tid = job['task_id'] ...
41.883871
97
0.614911
from http import HTTPStatus from deepdiff import DeepDiff import pytest from .utils.config import get_method, patch_method def get_job_staff(job, tasks, projects): job_staff = [] job_staff.append(job['assignee']) tid = job['task_id'] job_staff.append(tasks[tid]['owner']) job_staff.append(tasks[...
true
true
f71012b82436e5dd37274c5125768f25f6343cca
371
py
Python
polls/migrations/0002_auto_20200211_1555.py
rpesce/django_tutorial
b0a3c10c1246ec42e9c86c03a7b441ff8be1c495
[ "Apache-2.0" ]
11
2020-03-25T16:03:08.000Z
2022-03-19T17:59:43.000Z
polls/migrations/0002_auto_20200211_1555.py
rpesce/django_tutorial
b0a3c10c1246ec42e9c86c03a7b441ff8be1c495
[ "Apache-2.0" ]
null
null
null
polls/migrations/0002_auto_20200211_1555.py
rpesce/django_tutorial
b0a3c10c1246ec42e9c86c03a7b441ff8be1c495
[ "Apache-2.0" ]
3
2020-08-18T03:34:59.000Z
2022-03-21T13:44:45.000Z
# Generated by Django 3.0.3 on 2020-02-11 20:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('polls', '0001_initial'), ] operations = [ migrations.AlterField( model_name='choice', name='votes', fiel...
19.526316
49
0.58221
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('polls', '0001_initial'), ] operations = [ migrations.AlterField( model_name='choice', name='votes', field=models.IntegerField(default=0), ), ...
true
true
f71013d279ee02e1a4eef74c167f62131c79ae29
1,991
py
Python
evosoro_pymoo/Algorithms/RankAndNoveltySurvival.py
leguiart/MSc_Thesis
22ffc73c75d814856850f26c4586d90896b74cf3
[ "MIT" ]
null
null
null
evosoro_pymoo/Algorithms/RankAndNoveltySurvival.py
leguiart/MSc_Thesis
22ffc73c75d814856850f26c4586d90896b74cf3
[ "MIT" ]
null
null
null
evosoro_pymoo/Algorithms/RankAndNoveltySurvival.py
leguiart/MSc_Thesis
22ffc73c75d814856850f26c4586d90896b74cf3
[ "MIT" ]
null
null
null
import numpy as np from pymoo.core.survival import Survival from pymoo.util.nds.non_dominated_sorting import NonDominatedSorting from pymoo.util.randomized_argsort import randomized_argsort # --------------------------------------------------------------------------------------------------------- # Survival Selection...
35.553571
107
0.57559
import numpy as np from pymoo.core.survival import Survival from pymoo.util.nds.non_dominated_sorting import NonDominatedSorting from pymoo.util.randomized_argsort import randomized_argsort class RankAndNoveltySurvival(Survival): def __init__(self, nds=None) -> None: super().__init__(filter_infeasib...
true
true
f7101568fd06e7609738fb50b7989e279bd9adf1
321
py
Python
tests/resources/functional/test_all.py
IamSaurabh1/taurus
928d44e30e6cd5b979e675bfdce4c1dbeb5d0eff
[ "Apache-2.0" ]
1,743
2015-03-30T20:56:03.000Z
2022-03-31T09:08:37.000Z
tests/resources/functional/test_all.py
IamSaurabh1/taurus
928d44e30e6cd5b979e675bfdce4c1dbeb5d0eff
[ "Apache-2.0" ]
1,159
2015-04-01T08:25:53.000Z
2022-03-29T08:15:31.000Z
tests/resources/functional/test_all.py
IamSaurabh1/taurus
928d44e30e6cd5b979e675bfdce4c1dbeb5d0eff
[ "Apache-2.0" ]
497
2015-03-31T21:05:18.000Z
2022-03-17T12:45:21.000Z
from unittest import TestCase, skipIf class TestAll(TestCase): def test_passing(self): pass def test_erroring(self): raise Exception("Ima broke") def test_failing(self): self.assertEquals(2 + 2 * 2, 8) @skipIf(2 > 1, "Skip everytime") def test_skipped(self): pass...
18.882353
39
0.623053
from unittest import TestCase, skipIf class TestAll(TestCase): def test_passing(self): pass def test_erroring(self): raise Exception("Ima broke") def test_failing(self): self.assertEquals(2 + 2 * 2, 8) @skipIf(2 > 1, "Skip everytime") def test_skipped(self): pass...
true
true
f71015ada55db9be78eab80611c4bfe815bfe940
512
py
Python
regexlib/2021-5-15/python_re_test_file/regexlib_6851.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
1
2022-01-24T14:43:23.000Z
2022-01-24T14:43:23.000Z
regexlib/2021-5-15/python_re_test_file/regexlib_6851.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
regexlib/2021-5-15/python_re_test_file/regexlib_6851.py
yetingli/ReDoS-Benchmarks
f5b5094d835649e957bf3fec6b8bd4f6efdb35fc
[ "MIT" ]
null
null
null
# 6851 # ^[a-zA-Z0-9]+(([_][a-zA-Z0-9])?[a-zA-Z0-9]*)*$ # EXPONENT # nums:4 # EXPONENT AttackString:"a"+"0"*32+"!1 __NQ" import re from time import perf_counter regex = """^[a-zA-Z0-9]+(([_][a-zA-Z0-9])?[a-zA-Z0-9]*)*$""" REGEX = re.compile(regex) for i in range(0, 150000): ATTACK = "a" + "0" * i * 1 + "!1 __NQ" ...
26.947368
60
0.568359
import re from time import perf_counter regex = """^[a-zA-Z0-9]+(([_][a-zA-Z0-9])?[a-zA-Z0-9]*)*$""" REGEX = re.compile(regex) for i in range(0, 150000): ATTACK = "a" + "0" * i * 1 + "!1 __NQ" LEN = len(ATTACK) BEGIN = perf_counter() m = REGEX.search(ATTACK) DURATION = perf_counter() - B...
true
true
f71016e8f4f652bd02e3c9822c374573d6ee503c
844
py
Python
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/discussion/management/commands/create_roles_for_existing.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
3
2021-12-15T04:58:18.000Z
2022-02-06T12:15:37.000Z
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/discussion/management/commands/create_roles_for_existing.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
null
null
null
Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/lms/djangoapps/discussion/management/commands/create_roles_for_existing.py
osoco/better-ways-of-thinking-about-software
83e70d23c873509e22362a09a10d3510e10f6992
[ "MIT" ]
1
2019-01-02T14:38:50.000Z
2019-01-02T14:38:50.000Z
""" This must be run only after seed_permissions_roles.py! Creates default roles for all users currently in the database. Just runs through Enrollments. """ from django.core.management.base import BaseCommand from common.djangoapps.student.models import CourseEnrollment from openedx.core.djangoapps.django_comment_c...
33.76
98
0.716825
from django.core.management.base import BaseCommand from common.djangoapps.student.models import CourseEnrollment from openedx.core.djangoapps.django_comment_common.models import assign_default_role_on_enrollment class Command(BaseCommand): help = 'Seed default permisssions and roles.' def handle(self, ...
true
true
f71017b7f644057a8140806f89c03842a4395186
1,962
py
Python
notebooks/imgaug-playground.py
robertklee/SENG474-DataMining
1996e263fb9a84d62ceab2b2402cbbcaf7a1e2d7
[ "MIT" ]
14
2021-03-09T06:38:39.000Z
2022-03-11T16:21:46.000Z
notebooks/imgaug-playground.py
axjing/PoseEstimate
85b6ff300e18320fe8b40c89d5f22fde51ba588e
[ "MIT" ]
23
2021-03-07T20:50:50.000Z
2022-01-17T04:01:08.000Z
notebooks/imgaug-playground.py
axjing/PoseEstimate
85b6ff300e18320fe8b40c89d5f22fde51ba588e
[ "MIT" ]
9
2021-04-13T16:21:44.000Z
2022-02-23T06:08:30.000Z
import imgaug as ia from imgaug import augmenters as iaa import numpy as np from scipy import misc import imageio import cv2 import imgaug as ia import imgaug.augmenters as iaa from imgaug.augmentables import Keypoint, KeypointsOnImage ia.seed(1) image = ia.quokka(size=(256, 256)) kps = KeypointsOnImage([ Keypo...
27.25
75
0.667686
import imgaug as ia from imgaug import augmenters as iaa import numpy as np from scipy import misc import imageio import cv2 import imgaug as ia import imgaug.augmenters as iaa from imgaug.augmentables import Keypoint, KeypointsOnImage ia.seed(1) image = ia.quokka(size=(256, 256)) kps = KeypointsOnImage([ Keypo...
true
true
f71018380534b07b785f0c1841cc61cff5c72b7b
2,407
py
Python
rllib/env/wrappers/tests/test_moab_wrapper.py
BonsaiAI/ray
941d30f082fe879ea30618af14327c25b5a21a74
[ "Apache-2.0" ]
3
2021-06-22T19:57:41.000Z
2021-06-23T07:16:44.000Z
rllib/env/wrappers/tests/test_moab_wrapper.py
BonsaiAI/ray
941d30f082fe879ea30618af14327c25b5a21a74
[ "Apache-2.0" ]
26
2020-03-14T19:27:37.000Z
2022-03-30T21:45:17.000Z
rllib/env/wrappers/tests/test_moab_wrapper.py
BonsaiAI/ray
941d30f082fe879ea30618af14327c25b5a21a74
[ "Apache-2.0" ]
2
2021-05-05T21:05:16.000Z
2021-06-22T21:16:03.000Z
from typing import Optional import gym import pytest from ray.rllib.env.wrappers.moab_wrapper import _MoabBaseWrapper from ray.tune.registry import ENV_CREATOR, _global_registry @pytest.mark.parametrize("env_name, iterations", [ ("MoabMoveToCenterSim-v0", 10), ...
33.901408
88
0.633153
from typing import Optional import gym import pytest from ray.rllib.env.wrappers.moab_wrapper import _MoabBaseWrapper from ray.tune.registry import ENV_CREATOR, _global_registry @pytest.mark.parametrize("env_name, iterations", [ ("MoabMoveToCenterSim-v0", 10), ...
true
true
f7101a37da6bdc31a3c3985e7b25b86ddef44ed1
29,931
py
Python
code/pyto/tomo/ctf.py
anmartinezs/pyseg_system
5bb07c7901062452a34b73f376057cabc15a13c3
[ "Apache-2.0" ]
12
2020-01-08T01:33:02.000Z
2022-03-16T00:25:34.000Z
code/pyto/tomo/ctf.py
anmartinezs/pyseg_system
5bb07c7901062452a34b73f376057cabc15a13c3
[ "Apache-2.0" ]
8
2019-12-19T19:34:56.000Z
2022-03-10T10:11:28.000Z
code/pyto/tomo/ctf.py
anmartinezs/pyseg_system
5bb07c7901062452a34b73f376057cabc15a13c3
[ "Apache-2.0" ]
2
2022-03-30T13:12:22.000Z
2022-03-30T18:12:10.000Z
""" Functions related to ctf. Currently only few that allow running ctffind from console or notebook. Work in progress. # Author: Vladan Lucic (Max Planck Institute for Biochemistry) # $Id$ """ from __future__ import unicode_literals from __future__ import print_function from __future__ import division from builtins...
39.074413
80
0.558685
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from builtins import zip from builtins import str from builtins import range from builtins import object from past.utils import old_div from past.builtins import basestring __version__ = "$Revision$" import o...
true
true
f7101a83b95d3f574f2be24cf7bb5968d97a4765
3,783
py
Python
examples/bengali/bengali_deepoffense_config.py
TharinduDR/DeepOffense
8715006707ac0272cc534b3d6844ef10367400e9
[ "Apache-2.0" ]
5
2020-05-31T07:40:36.000Z
2022-02-13T19:18:40.000Z
examples/greek/greek_deepoffense_config.py
TharinduDR/DeepOffense
8715006707ac0272cc534b3d6844ef10367400e9
[ "Apache-2.0" ]
null
null
null
examples/greek/greek_deepoffense_config.py
TharinduDR/DeepOffense
8715006707ac0272cc534b3d6844ef10367400e9
[ "Apache-2.0" ]
2
2021-03-25T12:44:04.000Z
2021-03-25T16:50:59.000Z
from multiprocessing import cpu_count TEMP_DIRECTORY = "temp/data" TRAIN_FILE = "train.tsv" TEST_FILE = "test.tsv" DEV_RESULT_FILE = "dev_result.tsv" DEV_EVAL_FILE = 'dev_eval.txt' RESULT_FILE = "result.csv" SUBMISSION_FOLDER = "transformers" SUBMISSION_FILE = "transformers" MODEL_TYPE = "xlmroberta" MODEL_NAME = "xlm...
26.089655
106
0.665609
from multiprocessing import cpu_count TEMP_DIRECTORY = "temp/data" TRAIN_FILE = "train.tsv" TEST_FILE = "test.tsv" DEV_RESULT_FILE = "dev_result.tsv" DEV_EVAL_FILE = 'dev_eval.txt' RESULT_FILE = "result.csv" SUBMISSION_FOLDER = "transformers" SUBMISSION_FILE = "transformers" MODEL_TYPE = "xlmroberta" MODEL_NAME = "xlm...
true
true
f7101a8b865c1f87f28c1270c97bd9246634db2e
69
py
Python
emailtrail/__init__.py
akshaykmr/emailtrail
8298e4b68c70f9b64198f54e4f3baf77d5fe54fa
[ "MIT" ]
11
2020-04-05T07:24:46.000Z
2021-01-10T06:58:00.000Z
emailtrail/__init__.py
akshaykmr/emailtrail
8298e4b68c70f9b64198f54e4f3baf77d5fe54fa
[ "MIT" ]
1
2021-09-09T16:46:18.000Z
2021-09-09T16:46:18.000Z
emailtrail/__init__.py
akshaykmr/emailtrail
8298e4b68c70f9b64198f54e4f3baf77d5fe54fa
[ "MIT" ]
1
2020-10-26T17:50:10.000Z
2020-10-26T17:50:10.000Z
from .module import * # noqa from .models import Trail, Hop # noqa
17.25
37
0.695652
from .module import * from .models import Trail, Hop
true
true
f7101aab8fc3aaf31dfafe13235193eac5d70266
8,534
py
Python
psi/controller/engine.py
bburan/psiexperiment
9b70f7f0b4a4379d8c3fc463e1df272153afd247
[ "MIT" ]
5
2016-05-26T13:46:00.000Z
2020-03-03T13:07:47.000Z
psi/controller/engine.py
bburan/psiexperiment
9b70f7f0b4a4379d8c3fc463e1df272153afd247
[ "MIT" ]
2
2018-04-17T15:06:35.000Z
2019-03-25T18:13:10.000Z
psi/controller/engine.py
bburan/psiexperiment
9b70f7f0b4a4379d8c3fc463e1df272153afd247
[ "MIT" ]
1
2016-05-28T19:36:38.000Z
2016-05-28T19:36:38.000Z
import logging log = logging.getLogger(__name__) import threading import numpy as np from atom.api import (Unicode, Float, Bool, observe, Property, Int, Typed, Long, Value) from enaml.core.api import Declarative, d_ from psi.core.enaml.api import PSIContribution from ..util import copy_declara...
35.707113
80
0.639325
import logging log = logging.getLogger(__name__) import threading import numpy as np from atom.api import (Unicode, Float, Bool, observe, Property, Int, Typed, Long, Value) from enaml.core.api import Declarative, d_ from psi.core.enaml.api import PSIContribution from ..util import copy_declara...
true
true
f7101b9b13578e8edd6324341c1a4a1243423eca
1,967
py
Python
model.py
adinahhh/educated-citizen
057406bbe4b348a88aeeed91bafbf337666d33ce
[ "Unlicense" ]
1
2020-03-06T19:41:59.000Z
2020-03-06T19:41:59.000Z
model.py
adinahhh/ballot-project
057406bbe4b348a88aeeed91bafbf337666d33ce
[ "Unlicense" ]
5
2020-03-24T18:21:24.000Z
2021-08-23T20:39:22.000Z
model.py
adinahhh/ballot-project
057406bbe4b348a88aeeed91bafbf337666d33ce
[ "Unlicense" ]
1
2020-03-27T17:21:25.000Z
2020-03-27T17:21:25.000Z
"""Models for final hackbright project """ from flask import Flask from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() app = Flask(__name__) class Legislator(db.Model): """ Info on current legislators. """ __tablename__ = "current_legislators" legislator_id = db.Column(db.Integer, autoincrement=T...
33.913793
79
0.675648
from flask import Flask from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() app = Flask(__name__) class Legislator(db.Model): __tablename__ = "current_legislators" legislator_id = db.Column(db.Integer, autoincrement=True, primary_key=True) last_name = db.Column(db.String(25), nullable=False) ...
true
true
f7101db4a3c92bf5fa914e5b238683710b1a59e8
827
py
Python
server/clothes_shop/urls.py
Meerkat007/Clothes-Shop-Website-
0f5f113c49b550a593ea50c8d409e9228381a81b
[ "MIT" ]
null
null
null
server/clothes_shop/urls.py
Meerkat007/Clothes-Shop-Website-
0f5f113c49b550a593ea50c8d409e9228381a81b
[ "MIT" ]
null
null
null
server/clothes_shop/urls.py
Meerkat007/Clothes-Shop-Website-
0f5f113c49b550a593ea50c8d409e9228381a81b
[ "MIT" ]
null
null
null
"""clothes_shop URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Clas...
35.956522
79
0.70133
from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url(r'^products/', include('products.urls')), url(r'^admin/', admin.site.urls), ]
true
true
f7101e05d6aa3f6fae0e0f1f853fa0dab34e1ab0
8,060
py
Python
sdk/storage/azure-storage-blob/azure/storage/blob/_deserialize.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/storage/azure-storage-blob/azure/storage/blob/_deserialize.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/storage/azure-storage-blob/azure/storage/blob/_deserialize.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- # pylint: ...
46.057143
138
0.735732
from typing import ( Tuple, Dict, List, TYPE_CHECKING ) try: from urllib.parse import unquote except ImportError: from urllib import unquote from ._models import BlobType, CopyProperties, ContentSettings, LeaseProperties, BlobProperties, ImmutabilityPolicy from ._shared.models import get_enum_va...
true
true
f71020a081e97b8e419611b4ff2a1a7fefc0a0c9
2,253
py
Python
setup.py
SCECcode/ucvm_plotting
0fad66043c81bdc5e616f87020f38177bdae9503
[ "BSD-3-Clause" ]
null
null
null
setup.py
SCECcode/ucvm_plotting
0fad66043c81bdc5e616f87020f38177bdae9503
[ "BSD-3-Clause" ]
4
2021-11-30T08:28:42.000Z
2022-03-07T21:27:14.000Z
setup.py
SCECcode/ucvm_plotting
0fad66043c81bdc5e616f87020f38177bdae9503
[ "BSD-3-Clause" ]
1
2021-06-05T03:28:51.000Z
2021-06-05T03:28:51.000Z
""" @file setup.py @brief Build and install the pycvm @author The SCEC/UCVM Developers - <software@scec.usc.edu> """ from setuptools import setup NAME = "ucvm_plotting" FULLNAME = "ucvm_plotting with pycvm" AUTHOR = "The SCEC/UCVM Developers" AUTHOR_EMAIL = "software@scec.usc.edu" MAINTAINER = AUTHOR MAINTAIN...
33.132353
89
0.717266
from setuptools import setup NAME = "ucvm_plotting" FULLNAME = "ucvm_plotting with pycvm" AUTHOR = "The SCEC/UCVM Developers" AUTHOR_EMAIL = "software@scec.usc.edu" MAINTAINER = AUTHOR MAINTAINER_EMAIL = AUTHOR_EMAIL LICENSE = "Apache 2.0 license" URL = "https://github.com/SCEC/ucvm_plotting" DESCRIPTION = "Python c...
true
true
f71022c75b49c0c56102043edb4100618ba8208a
348
py
Python
models.py
ashelto6/unJumble
cf557668133186e7ea419f6f08ccadef4cad89a1
[ "MIT" ]
null
null
null
models.py
ashelto6/unJumble
cf557668133186e7ea419f6f08ccadef4cad89a1
[ "MIT" ]
7
2021-02-26T07:31:12.000Z
2021-04-25T03:21:35.000Z
models.py
ashelto6/unJumble
cf557668133186e7ea419f6f08ccadef4cad89a1
[ "MIT" ]
null
null
null
from flask_login import UserMixin from . import db #run the creat_all() command to create the database class User(UserMixin, db.Model): id = db.Column(db.Integer, primary_key=True) last_name = db.Column(db.String(100)) first_name = db.Column(db.String(100)) email = db.Column(db.String(100), unique=True) password...
31.636364
51
0.747126
from flask_login import UserMixin from . import db class User(UserMixin, db.Model): id = db.Column(db.Integer, primary_key=True) last_name = db.Column(db.String(100)) first_name = db.Column(db.String(100)) email = db.Column(db.String(100), unique=True) password = db.Column(db.String(100))
true
true
f71022f0eb2883e2876c9b9966ee83e21f069013
6,566
py
Python
cookiecutter_mbam/scan/service.py
tiburona/cookiecutter_mbam
13788774a4c1426c133b3f689f98d8f0c54de9c6
[ "BSD-3-Clause" ]
null
null
null
cookiecutter_mbam/scan/service.py
tiburona/cookiecutter_mbam
13788774a4c1426c133b3f689f98d8f0c54de9c6
[ "BSD-3-Clause" ]
null
null
null
cookiecutter_mbam/scan/service.py
tiburona/cookiecutter_mbam
13788774a4c1426c133b3f689f98d8f0c54de9c6
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Scan service. This module implements uploading a scan file to XNAT and adding a scan to the database. Todo: Maybe the public method should be called add, and that should kick off an upload procedure, rather than the other way around. Todo: do we want to infer file type from extension? Or ...
38.397661
120
0.655955
import os from cookiecutter_mbam.xnat import XNATConnection from cookiecutter_mbam.experiment import Experiment from cookiecutter_mbam.user import User from .models import Scan from .utils import gzip_file from flask import current_app def debug(): assert current_app.debug == False, "Don't panic! You're here by r...
true
true
f710230f2cb958286fd2cd383520343ffe344500
1,403
py
Python
tests/utils/test_phone_numbers.py
Silvian/attendance-processor
b40eacf7fe8ab9473f7a75a8c8e0cc7ac03fb507
[ "MIT" ]
1
2020-10-29T13:07:25.000Z
2020-10-29T13:07:25.000Z
tests/utils/test_phone_numbers.py
Silvian/attendance-processor
b40eacf7fe8ab9473f7a75a8c8e0cc7ac03fb507
[ "MIT" ]
null
null
null
tests/utils/test_phone_numbers.py
Silvian/attendance-processor
b40eacf7fe8ab9473f7a75a8c8e0cc7ac03fb507
[ "MIT" ]
null
null
null
import pytest from utils.phone_numbers import fix_number_formatting, validate_phone_number @pytest.mark.parametrize( "number, expected_result", [ ("7446123456", "07446123456"), # Test number with missing 0 ("07446123456", "07446123456"), # Test number no spaces ("07446 123456", "07...
37.918919
95
0.680684
import pytest from utils.phone_numbers import fix_number_formatting, validate_phone_number @pytest.mark.parametrize( "number, expected_result", [ ("7446123456", "07446123456"), ("07446123456", "07446123456"), ("07446 123456", "07446123456"), ("+447446123456", "+44744612...
true
true
f71023e323fa23d2cf2eaffc7221a695ba60060f
20,092
py
Python
disnake/ext/commands/bot_base.py
MisileLab/disnake
c7f6a61f2fe2a05cb57027486d6f2cd7fe5399fa
[ "MIT" ]
null
null
null
disnake/ext/commands/bot_base.py
MisileLab/disnake
c7f6a61f2fe2a05cb57027486d6f2cd7fe5399fa
[ "MIT" ]
null
null
null
disnake/ext/commands/bot_base.py
MisileLab/disnake
c7f6a61f2fe2a05cb57027486d6f2cd7fe5399fa
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2015-2021 Rapptz Copyright (c) 2021-present Disnake Development Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limi...
33.375415
96
0.616016
from __future__ import annotations import asyncio import collections import collections.abc import inspect import sys import traceback from typing import Any, Callable, List, TYPE_CHECKING, Optional, TypeVar, Type, Union import disnake from .core import GroupMixin from .view import StringView from .context import ...
true
true
f71024eea5e98c7df524c35442bced80a11680cf
2,316
py
Python
dyndns.py
jkeuper/transip_dyndns
4a1d778b72f0a762f97bdaae16192b8216e99cea
[ "MIT" ]
null
null
null
dyndns.py
jkeuper/transip_dyndns
4a1d778b72f0a762f97bdaae16192b8216e99cea
[ "MIT" ]
null
null
null
dyndns.py
jkeuper/transip_dyndns
4a1d778b72f0a762f97bdaae16192b8216e99cea
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import argparse from requests import get from transip_rest_client import TransipRestClient def getOptions(args=sys.argv[1:]): parser = argparse.ArgumentParser(description="DynDNS: Updates a DNS record for a dynamic IP address.") parser.add_argument("-u", "--user", help="Your ...
35.630769
106
0.648964
import sys import argparse from requests import get from transip_rest_client import TransipRestClient def getOptions(args=sys.argv[1:]): parser = argparse.ArgumentParser(description="DynDNS: Updates a DNS record for a dynamic IP address.") parser.add_argument("-u", "--user", help="Your username.", required=T...
true
true
f7102601e30fef5f8d8eff91e5adb145e938c0cf
4,105
py
Python
kivy/tests/test_widget.py
yunus-ceyhan/kivy
ba646bd82c8eb5c505c68d18de52f8f3e6cf199a
[ "MIT" ]
1
2022-02-06T11:20:43.000Z
2022-02-06T11:20:43.000Z
kivy/tests/test_widget.py
yunus-ceyhan/kivy
ba646bd82c8eb5c505c68d18de52f8f3e6cf199a
[ "MIT" ]
null
null
null
kivy/tests/test_widget.py
yunus-ceyhan/kivy
ba646bd82c8eb5c505c68d18de52f8f3e6cf199a
[ "MIT" ]
1
2022-01-19T09:10:47.000Z
2022-01-19T09:10:47.000Z
import unittest from tempfile import mkdtemp from shutil import rmtree class WidgetTestCase(unittest.TestCase): def setUp(self): from kivy.uix.widget import Widget self.cls = Widget self.root = Widget() def test_add_remove_widget(self): root = self.root self.assertEqu...
32.070313
74
0.60268
import unittest from tempfile import mkdtemp from shutil import rmtree class WidgetTestCase(unittest.TestCase): def setUp(self): from kivy.uix.widget import Widget self.cls = Widget self.root = Widget() def test_add_remove_widget(self): root = self.root self.assertEqu...
true
true
f71026672a7680d364cfb68c1f7b6f4ab8b30417
3,152
py
Python
trader/batch/non_fork_worker.py
9600dev/mmr
b08e63b7044f2b2061d8679b216822c82d309c86
[ "Apache-2.0" ]
12
2021-09-22T21:19:23.000Z
2022-01-03T21:38:47.000Z
trader/batch/non_fork_worker.py
9600dev/mmr
b08e63b7044f2b2061d8679b216822c82d309c86
[ "Apache-2.0" ]
null
null
null
trader/batch/non_fork_worker.py
9600dev/mmr
b08e63b7044f2b2061d8679b216822c82d309c86
[ "Apache-2.0" ]
3
2021-09-05T23:26:13.000Z
2022-03-25T01:01:22.000Z
import time import sys import random import datetime import rq import rq.job import rq.compat import rq.worker from rq.defaults import (DEFAULT_LOGGING_FORMAT, DEFAULT_LOGGING_DATE_FORMAT) class NonForkWorker(rq.Worker): def __init__(self, *args, **kwargs): if kwargs.get('default_worker_ttl', None) is N...
33.178947
95
0.611675
import time import sys import random import datetime import rq import rq.job import rq.compat import rq.worker from rq.defaults import (DEFAULT_LOGGING_FORMAT, DEFAULT_LOGGING_DATE_FORMAT) class NonForkWorker(rq.Worker): def __init__(self, *args, **kwargs): if kwargs.get('default_worker_ttl', None) is N...
true
true
f710267bb6eaca71d34daef2c77ac942970d7e2a
2,601
py
Python
setup.py
groupserver/gs.site.change.name
fdf9a6d2ea2b49c98f5fe0f88ba1de06c57ff052
[ "ZPL-2.1" ]
null
null
null
setup.py
groupserver/gs.site.change.name
fdf9a6d2ea2b49c98f5fe0f88ba1de06c57ff052
[ "ZPL-2.1" ]
null
null
null
setup.py
groupserver/gs.site.change.name
fdf9a6d2ea2b49c98f5fe0f88ba1de06c57ff052
[ "ZPL-2.1" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################################ # # Copyright © 2011, 2012, 2013, 2014, 2015 OnlineGroups.net and # Contributors. # # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the Z...
33.346154
76
0.595925
true
true
f71028c1481c1fcee06411fa05f09fe527e33b31
50,356
py
Python
codegen/cpp_codegen.py
ardovm/wxGlade
a4cf8e65bcc6df5f65cf8ca5c49b9a628bf1e8eb
[ "MIT" ]
null
null
null
codegen/cpp_codegen.py
ardovm/wxGlade
a4cf8e65bcc6df5f65cf8ca5c49b9a628bf1e8eb
[ "MIT" ]
null
null
null
codegen/cpp_codegen.py
ardovm/wxGlade
a4cf8e65bcc6df5f65cf8ca5c49b9a628bf1e8eb
[ "MIT" ]
null
null
null
"""\ C++ code generator @copyright: 2002-2007 Alberto Griggio @copyright: 2012-2016 Carsten Grohmann @copyright: 2017-2020 Dietmar Schwertberger @license: MIT (see LICENSE.txt) - THIS PROGRAM COMES WITH NO WARRANTY """ import os.path, re, logging from codegen import BaseLangCodeWriter, BaseSourceFileContent, _repla...
45.243486
120
0.558901
import os.path, re, logging from codegen import BaseLangCodeWriter, BaseSourceFileContent, _replace_tag from codegen import ClassLines as BaseClassLines import config, wcodegen class SourceFileContent(BaseSourceFileContent): rec_block_start = re.compile( r'^(?P<spaces>\s*)' ...
true
true
f710299efd3e51d5e4b2e5cd7c0de74cacf615c7
3,230
py
Python
tests/calendar_models_test.py
C4theBomb/python-calendar-app
6776403f7f2440c6497d9a53be5e8d617a2ee817
[ "MIT" ]
null
null
null
tests/calendar_models_test.py
C4theBomb/python-calendar-app
6776403f7f2440c6497d9a53be5e8d617a2ee817
[ "MIT" ]
null
null
null
tests/calendar_models_test.py
C4theBomb/python-calendar-app
6776403f7f2440c6497d9a53be5e8d617a2ee817
[ "MIT" ]
null
null
null
import sys import os from io import StringIO from datetime import datetime import unittest from unittest.mock import patch sys.path.append(os.path.abspath("./src/")) from calendarApp.models import Event, Calendar class CalendarModelTests(unittest.TestCase): @classmethod def setUpClass(cls): cls.data1...
31.666667
101
0.583901
import sys import os from io import StringIO from datetime import datetime import unittest from unittest.mock import patch sys.path.append(os.path.abspath("./src/")) from calendarApp.models import Event, Calendar class CalendarModelTests(unittest.TestCase): @classmethod def setUpClass(cls): cls.data1...
true
true
f71029e0362daf93beff056b71cb94f06389a620
15,953
py
Python
lib/tpn/visualstudio/templates.py
tpn/tpn
5c0fcc3c4b264dfb95b5029864c6006530150c85
[ "MIT" ]
2
2020-01-08T02:19:18.000Z
2022-01-11T09:06:03.000Z
lib/tpn/visualstudio/templates.py
tpn/tpn
5c0fcc3c4b264dfb95b5029864c6006530150c85
[ "MIT" ]
null
null
null
lib/tpn/visualstudio/templates.py
tpn/tpn
5c0fcc3c4b264dfb95b5029864c6006530150c85
[ "MIT" ]
1
2020-12-30T22:21:14.000Z
2020-12-30T22:21:14.000Z
"""Visual Studio Helper Utils.""" #=============================================================================== # Imports #=============================================================================== import uuid #=============================================================================== # Globals #=========...
50.166667
179
0.692848
import uuid vcxproj_template = """\ <?xml version="1.0" encoding="utf-8"?> <Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <ItemGroup Label="ProjectConfigurations"> <ProjectConfiguration Include="Debug|Win32"> <Configuration>Debug</Conf...
true
true
f71029e3924c8dd93bfee8142465de9c95b5d32c
742
py
Python
setup.py
sshh12/pymeritrade
0bb73922c8c08207cf55b934867cf780559d9871
[ "MIT" ]
1
2020-12-04T20:46:24.000Z
2020-12-04T20:46:24.000Z
setup.py
sshh12/pymeritrade
0bb73922c8c08207cf55b934867cf780559d9871
[ "MIT" ]
null
null
null
setup.py
sshh12/pymeritrade
0bb73922c8c08207cf55b934867cf780559d9871
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r") as fh: long_description = fh.read() with open("requirements.txt") as f: required = f.read().splitlines() setuptools.setup( name="pymeritrade", version="0.1.4", author="Shrivu Shankar", author_email="shrivu1122+pymeritrade@gmail.com", descri...
25.586207
52
0.672507
import setuptools with open("README.md", "r") as fh: long_description = fh.read() with open("requirements.txt") as f: required = f.read().splitlines() setuptools.setup( name="pymeritrade", version="0.1.4", author="Shrivu Shankar", author_email="shrivu1122+pymeritrade@gmail.com", descri...
true
true
f7102a3b2be5c1c5cc7c227eb2f94f35c34f04bc
4,838
py
Python
tests/test_DecodeSerialData.py
ricorx7/rti-python
1316323b782ddb8df357e55404f507a9573e172c
[ "BSD-3-Clause" ]
1
2017-06-10T13:27:44.000Z
2017-06-10T13:27:44.000Z
tests/test_DecodeSerialData.py
ricorx7/rti-python
1316323b782ddb8df357e55404f507a9573e172c
[ "BSD-3-Clause" ]
10
2019-12-28T18:06:18.000Z
2022-03-25T18:48:20.000Z
tests/test_DecodeSerialData.py
ricorx7/rti_python
1316323b782ddb8df357e55404f507a9573e172c
[ "BSD-3-Clause" ]
null
null
null
import threading import socket import sys import getopt from log import logger from Codecs.AdcpCodec import AdcpCodec from Comm.AdcpSerialPortServer import AdcpSerialPortServer class DecodeSerialData: def __init__(self, tcp_port, comm_port, baud): """ Initialize the thread to read the data from ...
32.911565
120
0.564283
import threading import socket import sys import getopt from log import logger from Codecs.AdcpCodec import AdcpCodec from Comm.AdcpSerialPortServer import AdcpSerialPortServer class DecodeSerialData: def __init__(self, tcp_port, comm_port, baud): self.is_alive = True self.raw_serial_socket = No...
true
true
f7102bbbb5e3e0d524fd7b1d3ea685d7b17ed8f4
1,421
py
Python
test/lmp/model/_lstm/conftest.py
a868111817/language-model-playground
814ab9ca7ba7c927de39123fdb7539acd2d0e5cc
[ "Beerware" ]
9
2020-07-31T10:27:28.000Z
2021-12-23T05:58:03.000Z
test/lmp/model/_lstm/conftest.py
Aidenzich/language-model-playground
daecd4e39bbf8128b04aa236ad1d31cd22c3c1d9
[ "Beerware" ]
10
2020-07-28T05:32:52.000Z
2022-03-04T06:36:23.000Z
test/lmp/model/_lstm/conftest.py
Aidenzich/language-model-playground
daecd4e39bbf8128b04aa236ad1d31cd22c3c1d9
[ "Beerware" ]
20
2020-07-08T07:05:39.000Z
2021-09-22T07:20:46.000Z
r"""Setup fixtures for testing :py:class:`lmp.model.LSTMModel`.""" import pytest import torch from lmp.model import LSTMModel from lmp.tknzr import BaseTknzr @pytest.fixture def lstm_model( tknzr: BaseTknzr, d_emb: int, d_hid: int, n_hid_lyr: int, n_pre_hid_lyr: int, ...
22.555556
66
0.581985
import pytest import torch from lmp.model import LSTMModel from lmp.tknzr import BaseTknzr @pytest.fixture def lstm_model( tknzr: BaseTknzr, d_emb: int, d_hid: int, n_hid_lyr: int, n_pre_hid_lyr: int, n_post_hid_lyr: int, p_emb: float, p_hid: float, ) ...
true
true
f7102c3ab6bd0cb874396d2b18df2dc4e19d5326
733
py
Python
backend/databasemodel/alembic/versions/b4eea63fd165_add_cityname_indexes_for_filtering.py
GispoCoding/tarmo
064eead90991fb2836173b647282e044dfa06c5a
[ "MIT" ]
null
null
null
backend/databasemodel/alembic/versions/b4eea63fd165_add_cityname_indexes_for_filtering.py
GispoCoding/tarmo
064eead90991fb2836173b647282e044dfa06c5a
[ "MIT" ]
92
2022-01-27T08:05:09.000Z
2022-03-31T06:54:46.000Z
backend/databasemodel/alembic/versions/b4eea63fd165_add_cityname_indexes_for_filtering.py
GispoCoding/tarmo
064eead90991fb2836173b647282e044dfa06c5a
[ "MIT" ]
null
null
null
"""add cityname indexes for filtering Revision ID: b4eea63fd165 Revises: 850af1d21f5e Create Date: 2022-05-05 17:39:57.826059 """ import os from alembic import op here = os.path.dirname(os.path.realpath(__file__)) # revision identifiers, used by Alembic. revision = "b4eea63fd165" down_revision = "850af1d21f5e" bra...
19.289474
53
0.723056
import os from alembic import op here = os.path.dirname(os.path.realpath(__file__)) revision = "b4eea63fd165" down_revision = "850af1d21f5e" branch_labels = None depends_on = None revision_dir = f"{here}/{revision}" def process_migration(script_name: str): filename = f"{revision_dir}/{script_name}.sql" ...
true
true
f7102cf126adafab6de592904ddaa1d404fe782b
1,011
py
Python
src/sima/metocean/blueprints/extremevalue.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/metocean/blueprints/extremevalue.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/metocean/blueprints/extremevalue.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
# # Generated with ExtremeValueBlueprint from dmt.blueprint import Blueprint from dmt.dimension import Dimension from dmt.attribute import Attribute from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute from sima.sima.blueprints.moao import MOAOBlueprint class ExtremeValu...
50.55
121
0.739862
from dmt.blueprint import Blueprint from dmt.dimension import Dimension from dmt.attribute import Attribute from dmt.enum_attribute import EnumAttribute from dmt.blueprint_attribute import BlueprintAttribute from sima.sima.blueprints.moao import MOAOBlueprint class ExtremeValueBlueprint(MOAOBlueprint): def __in...
true
true
f7102d6826665c4b3d3b3525445b2c5af3a15fd8
2,323
py
Python
code/visualization/ucb.py
hust-cec-2021/ma2bea
196f8de33cc4902bd9cb1fdd5400e41f9c275b55
[ "MIT" ]
null
null
null
code/visualization/ucb.py
hust-cec-2021/ma2bea
196f8de33cc4902bd9cb1fdd5400e41f9c275b55
[ "MIT" ]
1
2021-09-08T13:39:10.000Z
2021-09-09T03:43:06.000Z
code/visualization/ucb.py
hust-cec-2021/ma2bea
196f8de33cc4902bd9cb1fdd5400e41f9c275b55
[ "MIT" ]
null
null
null
import os import argparse import numpy as np import matplotlib.pyplot as plt def get_args(): # create argument parser parser = argparse.ArgumentParser() # parameter for problem parser.add_argument('--seed', type=int, default=1) parser.add_argument('--benchmark_id', type=int, default=0) parser.a...
29.782051
116
0.494189
import os import argparse import numpy as np import matplotlib.pyplot as plt def get_args(): parser = argparse.ArgumentParser() parser.add_argument('--seed', type=int, default=1) parser.add_argument('--benchmark_id', type=int, default=0) parser.add_argument('--rmp', type=float, default=0.3) ...
true
true
f7102d81b029f475ab955aea8189e37c558f7827
2,229
py
Python
dovpn.py
dhminch/dovpn
bcd35679d33608f243ceef23b8581c56cfe59dd8
[ "MIT" ]
null
null
null
dovpn.py
dhminch/dovpn
bcd35679d33608f243ceef23b8581c56cfe59dd8
[ "MIT" ]
null
null
null
dovpn.py
dhminch/dovpn
bcd35679d33608f243ceef23b8581c56cfe59dd8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """Main function for the DOVPN project.""" import argparse import logging import os import yaml import vpnorchestrator def main(): """Main function that sets up script to run. Handles arguments, logging, and configuration before passing of control to the orchestrator object.""" ...
33.268657
91
0.645581
import argparse import logging import os import yaml import vpnorchestrator def main(): parser = argparse.ArgumentParser(description='Manage a DigitalOcean VPN.') parser.add_argument('-c', '--config', default="config.yaml", help='configuration file location') parser.add_ar...
true
true
f7102ec5b68677844155001f87b3bfc7105cb084
12,274
py
Python
chemprop/train/run_training.py
allisontam/chemprop
87ac151c68d8a200d564b064103c4f514e29f6bd
[ "MIT" ]
null
null
null
chemprop/train/run_training.py
allisontam/chemprop
87ac151c68d8a200d564b064103c4f514e29f6bd
[ "MIT" ]
null
null
null
chemprop/train/run_training.py
allisontam/chemprop
87ac151c68d8a200d564b064103c4f514e29f6bd
[ "MIT" ]
1
2020-04-02T13:10:34.000Z
2020-04-02T13:10:34.000Z
from argparse import Namespace import csv from logging import Logger import os from pprint import pformat from typing import List import numpy as np from tensorboardX import SummaryWriter import torch from tqdm import trange import pickle from torch.optim.lr_scheduler import ExponentialLR from .evaluate import evalua...
41.60678
157
0.644533
from argparse import Namespace import csv from logging import Logger import os from pprint import pformat from typing import List import numpy as np from tensorboardX import SummaryWriter import torch from tqdm import trange import pickle from torch.optim.lr_scheduler import ExponentialLR from .evaluate import evalua...
true
true
f7102ed9e03cc66c9c81ee370ec0eb1a82b28ef4
2,753
py
Python
ProgettoLube/WebInspector/venv/Lib/site-packages/skimage/color/tests/test_adapt_rgb.py
Lube-Project/ProgettoLube
cbf33971e2c2e865783ec1a2302625539186a338
[ "MIT" ]
2
2022-03-19T09:45:18.000Z
2022-03-19T15:26:24.000Z
ProgettoLube/WebInspector/venv/Lib/site-packages/skimage/color/tests/test_adapt_rgb.py
Lube-Project/ProgettoLube
cbf33971e2c2e865783ec1a2302625539186a338
[ "MIT" ]
7
2021-06-08T21:46:24.000Z
2022-03-12T00:35:31.000Z
site-packages/skimage/color/tests/test_adapt_rgb.py
Wristlebane/Pyto
901ac307b68486d8289105c159ca702318bea5b0
[ "MIT" ]
1
2020-06-29T15:18:22.000Z
2020-06-29T15:18:22.000Z
from functools import partial import numpy as np from skimage import img_as_float, img_as_uint from skimage import color, data, filters from skimage.color.adapt_rgb import adapt_rgb, each_channel, hsv_value # Down-sample image for quicker testing. COLOR_IMAGE = data.astronaut()[::5, ::6] GRAY_IMAGE = data.camera()[:...
28.978947
79
0.730839
from functools import partial import numpy as np from skimage import img_as_float, img_as_uint from skimage import color, data, filters from skimage.color.adapt_rgb import adapt_rgb, each_channel, hsv_value COLOR_IMAGE = data.astronaut()[::5, ::6] GRAY_IMAGE = data.camera()[::5, ::5] SIGMA = 3 smooth = partial(fil...
true
true
f71030712e51257e43c9ff71be37bc814684e32c
12,983
py
Python
timm/models/pit.py
Animatory/pytorch-image-models
3ace100fcfdab3619dc71307613c42e53fb70221
[ "Apache-2.0" ]
null
null
null
timm/models/pit.py
Animatory/pytorch-image-models
3ace100fcfdab3619dc71307613c42e53fb70221
[ "Apache-2.0" ]
null
null
null
timm/models/pit.py
Animatory/pytorch-image-models
3ace100fcfdab3619dc71307613c42e53fb70221
[ "Apache-2.0" ]
null
null
null
""" Pooling-based Vision Transformer (PiT) in PyTorch A PyTorch implement of Pooling-based Vision Transformers as described in 'Rethinking Spatial Dimensions of Vision Transformers' - https://arxiv.org/abs/2103.16302 This code was adapted from the original version at https://github.com/naver-ai/pit, original copyrigh...
33.722078
122
0.626281
import math import re from functools import partial from typing import Tuple import torch from torch import nn from timm.data import IMAGENET_DEFAULT_MEAN, IMAGENET_DEFAULT_STD from .helpers import build_model_with_cfg from .layers import trunc_normal_, to_2tuple from .registry import register_model from .vision_...
true
true
f710319effdc93f2a10ac83e341c4ebc2f1204fe
37,086
py
Python
shells/backends/aws_tf_backend/src/data_model.py
oleksandr-r-q/CloudShell-Terraform-Shell
8d331cf8eebeae794e4e73a3c70af8064bafa434
[ "Apache-2.0" ]
4
2021-11-26T05:41:05.000Z
2022-03-11T20:01:40.000Z
shells/backends/aws_tf_backend/src/data_model.py
oleksandr-r-q/CloudShell-Terraform-Shell
8d331cf8eebeae794e4e73a3c70af8064bafa434
[ "Apache-2.0" ]
10
2021-07-14T05:19:54.000Z
2021-11-02T05:37:48.000Z
shells/backends/aws_tf_backend/src/data_model.py
oleksandr-r-q/CloudShell-Terraform-Shell
8d331cf8eebeae794e4e73a3c70af8064bafa434
[ "Apache-2.0" ]
1
2021-11-01T07:46:59.000Z
2021-11-01T07:46:59.000Z
from cloudshell.shell.core.driver_context import ResourceCommandContext, AutoLoadDetails, AutoLoadAttribute, \ AutoLoadResource from collections import defaultdict class LegacyUtils(object): def __init__(self): self._datamodel_clss_dict = self.__generate_datamodel_classes_dict() def migrate_autol...
33.1125
251
0.629024
from cloudshell.shell.core.driver_context import ResourceCommandContext, AutoLoadDetails, AutoLoadAttribute, \ AutoLoadResource from collections import defaultdict class LegacyUtils(object): def __init__(self): self._datamodel_clss_dict = self.__generate_datamodel_classes_dict() def migrate_autol...
true
true
f71031a3fd2f8846d71ea867cc54aa76a975b9a1
9,412
py
Python
mmdet/models/necks/m2fpn.py
ningdez/Tianchi_Cancer_303
59e9b6f906e48e7508f455ce29b97d430791fcf5
[ "MIT" ]
2
2020-06-23T14:12:03.000Z
2020-11-13T02:52:30.000Z
mmdet/models/necks/m2fpn.py
ningdez/Tianchi_Cancer_303
59e9b6f906e48e7508f455ce29b97d430791fcf5
[ "MIT" ]
1
2021-11-10T10:42:33.000Z
2021-11-10T10:42:33.000Z
mmdet/models/necks/m2fpn.py
ningdez/Tianchi_Cancer_303
59e9b6f906e48e7508f455ce29b97d430791fcf5
[ "MIT" ]
null
null
null
''' This code is based on pytorch_ssd and RFBNet. Details about the modules: TUM - Thinned U-shaped Module MLFPN - Multi-Level Feature Pyramid Network M2Det - Multi-level Multi-scale single-shot object Detector Author: Qijie Zhao (zhaoqijie@pku.edu.cn) Finished Date: 01/1...
39.881356
145
0.546855
import torch import torch.nn as nn import torch.nn.functional as F from mmcv.cnn import xavier_init import warnings warnings.filterwarnings('ignore') from ..registry import NECKS from ..utils import ConvModule class TUM(nn.Module): def __init__(self, first_level=True, input_planes=128, is_smooth=True, side_channel...
true
true
f710330a49da0167ad8b2a80e0fe83ccfd86d6d1
41
py
Python
src/infrastructure/db/models/__init__.py
oliveirahelena/flask-boilerplate
e614ad65f60d5ae04f94ba8e2f7c00d5821cf41f
[ "MIT" ]
null
null
null
src/infrastructure/db/models/__init__.py
oliveirahelena/flask-boilerplate
e614ad65f60d5ae04f94ba8e2f7c00d5821cf41f
[ "MIT" ]
null
null
null
src/infrastructure/db/models/__init__.py
oliveirahelena/flask-boilerplate
e614ad65f60d5ae04f94ba8e2f7c00d5821cf41f
[ "MIT" ]
null
null
null
from .orm import metadata, start_mappers
20.5
40
0.829268
from .orm import metadata, start_mappers
true
true
f71033e02a6b94c708b484a5a8b6d3a055181306
881
py
Python
test/apis/tensorflow/sound-classifier/predictor.py
wja30/cortex_0.31
522ec6226526dee6b4f8c3ed67bdf2b913d25de3
[ "Apache-2.0" ]
1
2020-09-09T04:04:30.000Z
2020-09-09T04:04:30.000Z
test/apis/tensorflow/sound-classifier/predictor.py
wja30/cortex_0.31
522ec6226526dee6b4f8c3ed67bdf2b913d25de3
[ "Apache-2.0" ]
null
null
null
test/apis/tensorflow/sound-classifier/predictor.py
wja30/cortex_0.31
522ec6226526dee6b4f8c3ed67bdf2b913d25de3
[ "Apache-2.0" ]
null
null
null
from scipy.io.wavfile import read import numpy as np import io import csv class TensorFlowPredictor: def __init__(self, tensorflow_client, config): self.client = tensorflow_client self.class_names = self.class_names_from_csv("class_names.csv") def class_names_from_csv(self, csv_file): ...
31.464286
84
0.648127
from scipy.io.wavfile import read import numpy as np import io import csv class TensorFlowPredictor: def __init__(self, tensorflow_client, config): self.client = tensorflow_client self.class_names = self.class_names_from_csv("class_names.csv") def class_names_from_csv(self, csv_file): ...
true
true
f710345e83902ad2ce3264936bfc7be3a0d99f86
62,597
py
Python
src/tests/run.py
watfordgnf/runtime
301056d6ff8f5ac0dea7fe07a8b450754ad846cb
[ "MIT" ]
1
2020-12-02T16:42:26.000Z
2020-12-02T16:42:26.000Z
src/tests/run.py
watfordgnf/runtime
301056d6ff8f5ac0dea7fe07a8b450754ad846cb
[ "MIT" ]
1
2020-12-02T09:16:02.000Z
2020-12-02T09:16:02.000Z
src/tests/run.py
watfordgnf/runtime
301056d6ff8f5ac0dea7fe07a8b450754ad846cb
[ "MIT" ]
null
null
null
#!/usr/bin/env python # ## Licensed to the .NET Foundation under one or more agreements. ## The .NET Foundation licenses this file to you under the MIT license. # ## # Title: run.py # # Notes: # # Universal script to setup and run the xunit console runner. The script relies # on run.proj and the bash and ...
38.076034
230
0.603336
This requires all tests run on linux x64 to be built by the # same platform and arch. If this is not done, the tests will run correctly; # however, expect failures due to incorrect exclusions in the xunit # wrappers setup at build time. # # Note that for linux targets the native components to the tests are still buil...
true
true
f71034708fa8005df0436c0f212fae7a6821a4c0
1,015
py
Python
sphinx/websupport/__init__.py
hason/sphinx
5cd0f235a891de80b637c20e0d90fd916cc68a86
[ "BSD-2-Clause" ]
null
null
null
sphinx/websupport/__init__.py
hason/sphinx
5cd0f235a891de80b637c20e0d90fd916cc68a86
[ "BSD-2-Clause" ]
null
null
null
sphinx/websupport/__init__.py
hason/sphinx
5cd0f235a891de80b637c20e0d90fd916cc68a86
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ sphinx.websupport ~~~~~~~~~~~~~~~~~ Base Module for web support functions. :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import warnings from sphinx.deprecation import RemovedInSphinx20Warning try: fr...
36.25
95
0.708374
import warnings from sphinx.deprecation import RemovedInSphinx20Warning try: from sphinxcontrib.websupport import WebSupport from sphinxcontrib.websupport import errors from sphinxcontrib.websupport.search import BaseSearch, SEARCH_ADAPTERS from sphinxcontrib.websupport.storage import StorageB...
true
true
f71034b281252754f23f61cc8d343b1177404fdc
5,670
py
Python
faa_computer_admin/src/faa_computer_admin/control.py
njmei/fly-alcohol-assay
a3efc40e5ed5d48ed3a80e4b162e13736b0e04cc
[ "BSD-3-Clause" ]
null
null
null
faa_computer_admin/src/faa_computer_admin/control.py
njmei/fly-alcohol-assay
a3efc40e5ed5d48ed3a80e4b162e13736b0e04cc
[ "BSD-3-Clause" ]
null
null
null
faa_computer_admin/src/faa_computer_admin/control.py
njmei/fly-alcohol-assay
a3efc40e5ed5d48ed3a80e4b162e13736b0e04cc
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python from __future__ import print_function import roslib roslib.load_manifest('faa_computer_admin') import rospy import argparse import subprocess from faa_utilities import FindData from faa_data_processing import TrackingDataProcessor from faa_data_processing import VideoDataProcessor from faa_data_p...
37.8
118
0.65097
from __future__ import print_function import roslib roslib.load_manifest('faa_computer_admin') import rospy import argparse import subprocess from faa_utilities import FindData from faa_data_processing import TrackingDataProcessor from faa_data_processing import VideoDataProcessor from faa_data_processing import Figu...
true
true
f7103744258570afc23a22f07e345f4e747dd4cc
245
py
Python
DDGraphs/__init__.py
lancelotimb/dd-graphs
ff6f6f2efcdf9e3784c465c8977b41543654b4f0
[ "MIT" ]
null
null
null
DDGraphs/__init__.py
lancelotimb/dd-graphs
ff6f6f2efcdf9e3784c465c8977b41543654b4f0
[ "MIT" ]
null
null
null
DDGraphs/__init__.py
lancelotimb/dd-graphs
ff6f6f2efcdf9e3784c465c8977b41543654b4f0
[ "MIT" ]
null
null
null
from .init import init from .draw_timeseries_graph import draw_timeseries_graph from .draw_pie_charts import draw_pie_chart from .draw_top_list import draw_top_list __all__ = ["init", "draw_timeseries_graph", "draw_pie_chart", "draw_top_list"]
35
78
0.832653
from .init import init from .draw_timeseries_graph import draw_timeseries_graph from .draw_pie_charts import draw_pie_chart from .draw_top_list import draw_top_list __all__ = ["init", "draw_timeseries_graph", "draw_pie_chart", "draw_top_list"]
true
true
f710381da3f755d00f1686fe84e2e0bb0f62b4dc
1,215
py
Python
pyIsoDep/tests/read_csv.py
MattKrecicki/PYTHON-ISOTOPIC-DEPLETION-PACKAGE
ccad214de8721aa9b499ef70cd39966f18bceb76
[ "MIT" ]
1
2022-01-04T22:21:18.000Z
2022-01-04T22:21:18.000Z
pyIsoDep/tests/read_csv.py
DanKotlyar/PYTHON-ISOTOPIC-DEPLETION-PACKAGE
d9da8be6eff4ba301f9689ce5c38a5e50856d033
[ "MIT" ]
null
null
null
pyIsoDep/tests/read_csv.py
DanKotlyar/PYTHON-ISOTOPIC-DEPLETION-PACKAGE
d9da8be6eff4ba301f9689ce5c38a5e50856d033
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """read_csv Read the different csv files Created on Mon Oct 11 21:30:00 2021 @author: Dan Kotlyar Last updated on Mon Oct 11 21:45:00 2021 @author: Dan Kotlyar """ import numpy as np import pandas as pd def ReadCsv(csvFile): data = pd.read_csv('bootstrap.csv') ID = np.array(data['...
28.255814
77
0.604115
import numpy as np import pandas as pd def ReadCsv(csvFile): data = pd.read_csv('bootstrap.csv') ID = np.array(data['ZAID'], dtype=int) xsTypes = np.array(data['MT'], dtype=int) xsVals = np.array(data["XS [barns]"], dtype=float) N0 = np.array(data["N0 [atoms/b-cm]"], dtype=float) fullID = ...
true
true
f710383da7cf5e7b2bacdc981bb14cc2aeedc558
6,434
py
Python
components/start_page.py
SrGambiarra/KivyStudioDesigner
7f617b60aef3d5e99865cb559b9b5ee93a1988f5
[ "MIT" ]
3
2022-03-05T21:54:34.000Z
2022-03-15T12:55:45.000Z
components/start_page.py
SrGambiarra/KivyStudioDesigner
7f617b60aef3d5e99865cb559b9b5ee93a1988f5
[ "MIT" ]
2
2022-03-13T04:15:47.000Z
2022-03-30T11:51:41.000Z
components/start_page.py
SrGambiarra/KivyStudioDesigner
7f617b60aef3d5e99865cb559b9b5ee93a1988f5
[ "MIT" ]
null
null
null
__all__ = [ 'DesignerLinkLabel', 'RecentItem', 'RecentFilesBox' 'DesignerStartPage'] from utils.utils import get_designer, get_fs_encoding from kivy.properties import ObjectProperty, StringProperty from kivy.uix.scrollview import ScrollView from kivy.uix.boxlayout import BoxLayout from kivy.lang.builder impor...
27.495726
93
0.594809
__all__ = [ 'DesignerLinkLabel', 'RecentItem', 'RecentFilesBox' 'DesignerStartPage'] from utils.utils import get_designer, get_fs_encoding from kivy.properties import ObjectProperty, StringProperty from kivy.uix.scrollview import ScrollView from kivy.uix.boxlayout import BoxLayout from kivy.lang.builder impor...
true
true
f710388df0a9cbdd89b532dfa9a6713fd5628352
19,496
py
Python
tests/unit_tests/test_tethys_compute/test_models/test_dask/test_DaskJob.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
null
null
null
tests/unit_tests/test_tethys_compute/test_models/test_dask/test_DaskJob.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
1
2018-09-20T21:27:14.000Z
2018-09-20T21:27:14.000Z
tests/unit_tests/test_tethys_compute/test_models/test_dask/test_DaskJob.py
msouff/tethys
45795d1e6561d5db8fddd838f4d1ae1d91dbb837
[ "BSD-2-Clause" ]
null
null
null
from tethys_sdk.testing import TethysTestCase from tethys_compute.models.dask.dask_scheduler import Scheduler, DaskScheduler from tethys_compute.models.dask.dask_job import DaskJob from django.contrib.auth.models import User import dask from unittest import mock import time @dask.delayed def inc(x): return x + 1 ...
36.237918
119
0.671933
from tethys_sdk.testing import TethysTestCase from tethys_compute.models.dask.dask_scheduler import Scheduler, DaskScheduler from tethys_compute.models.dask.dask_job import DaskJob from django.contrib.auth.models import User import dask from unittest import mock import time @dask.delayed def inc(x): return x + 1 ...
true
true
f7103a621ee09bad322a5add73d81308b6b2be8c
6,345
py
Python
tensorflow/python/data/experimental/__init__.py
Sonata-Wang/tensorflow
8bbef0cd77879d05ed69bf30e76087847a8ca4a2
[ "Apache-2.0" ]
6
2019-02-05T22:36:51.000Z
2022-01-14T03:50:57.000Z
tensorflow/python/data/experimental/__init__.py
dipu989/tensorflow
3e21fe5faedab3a8258d344c8ad1cec2612a8aa8
[ "Apache-2.0" ]
1
2019-09-14T04:40:07.000Z
2020-11-18T18:16:17.000Z
tensorflow/python/data/experimental/__init__.py
dipu989/tensorflow
3e21fe5faedab3a8258d344c8ad1cec2612a8aa8
[ "Apache-2.0" ]
8
2016-01-14T13:12:56.000Z
2021-04-09T10:20:53.000Z
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
45.647482
96
0.849173
from __future__ import absolute_import from __future__ import division from __future__ import print_function from tensorflow.python.data.experimental.ops.batching import dense_to_sparse_batch from tensorflow.python.data.experimental.ops.batching import map_and_batch from tensorflow.python.data.experim...
true
true
f7103cf22159d3ede9a65e78e17f06013e656af4
4,661
py
Python
test/dungeons/TestSkullWoods.py
RoflCopter69/MultiWorld-Utilities
545bb8023c7b5be44584bf32bca696c8d7a19213
[ "MIT" ]
null
null
null
test/dungeons/TestSkullWoods.py
RoflCopter69/MultiWorld-Utilities
545bb8023c7b5be44584bf32bca696c8d7a19213
[ "MIT" ]
5
2020-01-18T21:10:46.000Z
2020-01-25T20:58:19.000Z
test/dungeons/TestSkullWoods.py
RoflCopter69/MultiWorld-Utilities
545bb8023c7b5be44584bf32bca696c8d7a19213
[ "MIT" ]
2
2020-01-18T17:36:50.000Z
2020-01-22T16:52:08.000Z
from test.dungeons.TestDungeon import TestDungeon class TestSkullWoods(TestDungeon): def testSkullWoodsFrontAllEntrances(self): self.starting_regions = ['Skull Woods First Section', 'Skull Woods First Section (Left)', 'Skull Woods First Section (Top)'] self.run_tests([ ["Skull Woods -...
47.080808
157
0.548809
from test.dungeons.TestDungeon import TestDungeon class TestSkullWoods(TestDungeon): def testSkullWoodsFrontAllEntrances(self): self.starting_regions = ['Skull Woods First Section', 'Skull Woods First Section (Left)', 'Skull Woods First Section (Top)'] self.run_tests([ ["Skull Woods -...
true
true
f7103e80a8ede0bdc771ecfc4ac8fc26714105f6
42
py
Python
.history/app/models_20210927050146.py
GraceOswal/pitch-perfect
d781c6e0f55c11f2a5e5dceb952f6b2de3c47c3b
[ "MIT" ]
null
null
null
.history/app/models_20210927050146.py
GraceOswal/pitch-perfect
d781c6e0f55c11f2a5e5dceb952f6b2de3c47c3b
[ "MIT" ]
null
null
null
.history/app/models_20210927050146.py
GraceOswal/pitch-perfect
d781c6e0f55c11f2a5e5dceb952f6b2de3c47c3b
[ "MIT" ]
null
null
null
from . import db # connect class user to
14
24
0.714286
from . import db
true
true
f7103ec2d4ba007ff5ea0a410b0557eaa6f6e7f4
1,153
py
Python
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/enums/types/shared_set_status.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
7
2021-02-21T10:39:41.000Z
2021-12-07T07:31:28.000Z
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/enums/types/shared_set_status.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
6
2021-02-02T23:46:11.000Z
2021-11-15T01:46:02.000Z
google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/enums/types/shared_set_status.py
googleapis/googleapis-gen
d84824c78563d59b0e58d5664bfaa430e9ad7e7a
[ "Apache-2.0" ]
4
2021-01-28T23:25:45.000Z
2021-08-30T01:55:16.000Z
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
28.825
74
0.700781
import proto __protobuf__ = proto.module( package='google.ads.googleads.v8.enums', marshal='google.ads.googleads.v8', manifest={ 'SharedSetStatusEnum', }, ) class SharedSetStatusEnum(proto.Message): class SharedSetStatus(proto.Enum): UNSPECIFIED = 0 UNKNO...
true
true
f7103fc1085344a33c3da77ee0da97ece10a9e77
1,420
py
Python
tests/conftest.py
xaviml/z2m_ikea_controller
e612af5a913e8b4784dcaa23ea5319115427d083
[ "MIT" ]
19
2019-11-21T19:51:40.000Z
2020-01-14T09:24:33.000Z
tests/conftest.py
xaviml/z2m_ikea_controller
e612af5a913e8b4784dcaa23ea5319115427d083
[ "MIT" ]
11
2019-11-20T16:43:35.000Z
2020-01-17T16:23:06.000Z
tests/conftest.py
xaviml/z2m_ikea_controller
e612af5a913e8b4784dcaa23ea5319115427d083
[ "MIT" ]
5
2019-12-20T21:31:07.000Z
2020-01-06T18:49:52.000Z
import asyncio from asyncio import Task from typing import Any, Callable import appdaemon.plugins.hass.hassapi as hass import appdaemon.plugins.mqtt.mqttapi as mqtt import pytest from cx_core import Controller from pytest import MonkeyPatch from tests.test_utils import fake_fn async def fake_run_in( self: Contr...
32.272727
80
0.728169
import asyncio from asyncio import Task from typing import Any, Callable import appdaemon.plugins.hass.hassapi as hass import appdaemon.plugins.mqtt.mqttapi as mqtt import pytest from cx_core import Controller from pytest import MonkeyPatch from tests.test_utils import fake_fn async def fake_run_in( self: Contr...
true
true
f7104045e9f92729e7e05787170a633970a9e9c2
921
py
Python
projects/Task019_ADAM/submission/scripts/convert.py
joeranbosma/nnDetection
2ebbf1cdc8a8794c73e325f06fea50632c78ae8c
[ "BSD-3-Clause" ]
242
2021-05-17T12:31:39.000Z
2022-03-31T11:51:29.000Z
projects/Task019_ADAM/submission/scripts/convert.py
joeranbosma/nnDetection
2ebbf1cdc8a8794c73e325f06fea50632c78ae8c
[ "BSD-3-Clause" ]
59
2021-06-02T07:32:10.000Z
2022-03-31T18:45:52.000Z
projects/Task019_ADAM/submission/scripts/convert.py
joeranbosma/nnDetection
2ebbf1cdc8a8794c73e325f06fea50632c78ae8c
[ "BSD-3-Clause" ]
38
2021-05-31T14:01:37.000Z
2022-03-21T08:24:40.000Z
import argparse from pathlib import Path from nndet.io import load_pickle from nndet.core.boxes.ops_np import box_center_np THRESHOLD = 0.5 if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('source', type=Path) args = parser.parse_args() source = args.source pre...
27.088235
94
0.604777
import argparse from pathlib import Path from nndet.io import load_pickle from nndet.core.boxes.ops_np import box_center_np THRESHOLD = 0.5 if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('source', type=Path) args = parser.parse_args() source = args.source pre...
true
true
f710422e65197ad6adf1832fd2c1d64dfa3c8bbc
5,612
py
Python
trainval.py
DoranLyong/DeepFish
3ea3e13653f708d4a8dcb54b990dcc2997edf4e9
[ "MIT" ]
1
2020-12-14T21:30:19.000Z
2020-12-14T21:30:19.000Z
trainval.py
DoranLyong/DeepFish
3ea3e13653f708d4a8dcb54b990dcc2997edf4e9
[ "MIT" ]
null
null
null
trainval.py
DoranLyong/DeepFish
3ea3e13653f708d4a8dcb54b990dcc2997edf4e9
[ "MIT" ]
null
null
null
import torch import numpy as np import argparse import pandas as pd import sys import os from torch import nn from torch.nn import functional as F import tqdm import pprint from src import utils as ut import torchvision from haven import haven_utils as hu from haven import haven_chk as hc from src import datasets, mod...
32.818713
91
0.596044
import torch import numpy as np import argparse import pandas as pd import sys import os from torch import nn from torch.nn import functional as F import tqdm import pprint from src import utils as ut import torchvision from haven import haven_utils as hu from haven import haven_chk as hc from src import datasets, mod...
true
true
f71042b95d0705e8bfa06f237b0c7ba6890bd92a
3,484
py
Python
scripts/gen_ksim_outside_exp.py
ctring/konex
7bf55f68f9ddcba6e2007e9c8049899cdb707d69
[ "MIT" ]
null
null
null
scripts/gen_ksim_outside_exp.py
ctring/konex
7bf55f68f9ddcba6e2007e9c8049899cdb707d69
[ "MIT" ]
null
null
null
scripts/gen_ksim_outside_exp.py
ctring/konex
7bf55f68f9ddcba6e2007e9c8049899cdb707d69
[ "MIT" ]
null
null
null
#!/usr/bin/python ''' Generate a command file for automated kSim experiment with out-of-dataset queries Example: ./gen_ksim_outside_exp.py 10 10 dataset.txt 0.3 experiment.txt results.txt -k 1 3 5 7 -m 7 --seed 23 -n 10 ''' from __future__ import absolute_import from __future__ import division from __future__ imp...
43.55
110
0.602755
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import os import random def pick_random(count, length, min_length=2, n=10): picked = [] for i in range(n): idx = random.randint(0, count - 1) start = random.randint(0...
true
true
f71042eebecd3985f43d5e37331634edf3eff6ca
407
py
Python
pmfp/__main__.py
Python-Tools/pmfp
832273890eec08e84f9c68d03f3316b2c8139133
[ "MIT" ]
4
2017-09-15T03:38:56.000Z
2019-12-16T02:03:14.000Z
pmfp/__main__.py
Python-Tools/pmfp
832273890eec08e84f9c68d03f3316b2c8139133
[ "MIT" ]
1
2021-04-27T10:51:42.000Z
2021-04-27T10:51:42.000Z
pmfp/__main__.py
Python-Tools/pmfp
832273890eec08e84f9c68d03f3316b2c8139133
[ "MIT" ]
null
null
null
#!/usr/bin/env python """PMFP. 一个项目管理脚手架. """ import warnings from .entrypoint import ppm import sys from typing import List from pmfp.entrypoint import ppm from colorama import init init() def main(argv: List[str] = sys.argv[1:]) -> None: """服务启动入口. 设置覆盖顺序`环境变量>命令行参数`>`'-c'指定的配置文件`>`项目启动位置的配置文件`>默认配置. ...
15.074074
56
0.658477
import warnings from .entrypoint import ppm import sys from typing import List from pmfp.entrypoint import ppm from colorama import init init() def main(argv: List[str] = sys.argv[1:]) -> None: ppm(argv) return None if __name__ == "__main__": main(sys.argv[1:])
true
true
f710440ca35c421c0923057216c8cf72bdf47d8b
57,471
py
Python
tests_python/tests_009/test_contract.py
ulrikstrid/tezos
96d4653ba4fb48eccdd0ca309c98254c39396712
[ "MIT" ]
null
null
null
tests_python/tests_009/test_contract.py
ulrikstrid/tezos
96d4653ba4fb48eccdd0ca309c98254c39396712
[ "MIT" ]
null
null
null
tests_python/tests_009/test_contract.py
ulrikstrid/tezos
96d4653ba4fb48eccdd0ca309c98254c39396712
[ "MIT" ]
null
null
null
import os import re import json import itertools from typing import List, Union, Any import pytest from client.client import Client from tools import utils from tools.constants import IDENTITIES from .contract_paths import ( CONTRACT_PATH, ILLTYPED_CONTRACT_PATH, all_contracts, all_legacy_contracts, ) ...
36.746164
80
0.58071
import os import re import json import itertools from typing import List, Union, Any import pytest from client.client import Client from tools import utils from tools.constants import IDENTITIES from .contract_paths import ( CONTRACT_PATH, ILLTYPED_CONTRACT_PATH, all_contracts, all_legacy_contracts, ) ...
true
true
f71044d972aeda32c49abd7d7f83422f3a1eb8f0
5,359
py
Python
PaddleAudio/paddleaudio/features/augment.py
AshburnLee/models
98fa58030f8ce352b3818f43897ac719ccffdffc
[ "Apache-2.0" ]
1
2022-02-13T08:33:52.000Z
2022-02-13T08:33:52.000Z
PaddleAudio/paddleaudio/features/augment.py
AshburnLee/models
98fa58030f8ce352b3818f43897ac719ccffdffc
[ "Apache-2.0" ]
null
null
null
PaddleAudio/paddleaudio/features/augment.py
AshburnLee/models
98fa58030f8ce352b3818f43897ac719ccffdffc
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
31.156977
83
0.631274
from typing import Iterable, List, Optional, Tuple, TypeVar import numpy as np from numpy import ndarray as array from paddleaudio.backends import depth_convert from paddleaudio.utils import ParameterError __all__ = [ 'depth_augment', 'spect_augment', 'random_crop1d', 'random_crop2d', ...
true
true
f71045928932e18081469a28d0e1d162f32eb006
4,059
py
Python
search_service/__init__.py
lukelowery/amundsensearchlibrary
cdaf1e3b75edd55bee8b0c65178863e25b0a479a
[ "Apache-2.0" ]
null
null
null
search_service/__init__.py
lukelowery/amundsensearchlibrary
cdaf1e3b75edd55bee8b0c65178863e25b0a479a
[ "Apache-2.0" ]
null
null
null
search_service/__init__.py
lukelowery/amundsensearchlibrary
cdaf1e3b75edd55bee8b0c65178863e25b0a479a
[ "Apache-2.0" ]
null
null
null
import ast import importlib import os import logging import logging.config import sys from flask import Flask, Blueprint from flask_restful import Api from flask_cors import CORS from typing import Dict, Any # noqa: F401 from flasgger import Swagger from search_service.api.dashboard import SearchDashboardAPI from se...
38.292453
111
0.74033
import ast import importlib import os import logging import logging.config import sys from flask import Flask, Blueprint from flask_restful import Api from flask_cors import CORS from typing import Dict, Any from flasgger import Swagger from search_service.api.dashboard import SearchDashboardAPI from search_service...
true
true
f7104645b4e560e005f0f55e7673f10e687b7f5e
828
py
Python
Sample REST API/SampleProject/urls.py
tanvipenumudy/Cookiecutter_Django_REST-API
f6604d7798ecebf0c432cdf141c24b0c2d85fdf2
[ "MIT" ]
null
null
null
Sample REST API/SampleProject/urls.py
tanvipenumudy/Cookiecutter_Django_REST-API
f6604d7798ecebf0c432cdf141c24b0c2d85fdf2
[ "MIT" ]
null
null
null
Sample REST API/SampleProject/urls.py
tanvipenumudy/Cookiecutter_Django_REST-API
f6604d7798ecebf0c432cdf141c24b0c2d85fdf2
[ "MIT" ]
null
null
null
"""SampleProject URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class...
34.5
77
0.713768
from django.conf.urls import url from django.contrib import admin from MyApp import views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^idealweight/',views.IdealWeight) ]
true
true
f71046c1dc5db319fb44c820336093811da73c30
931
py
Python
algorithm_web/admin/problem.py
KMU-algolab/algorithm
2b734978da78b936244580ed1febe4f9f6cf1aea
[ "MIT" ]
null
null
null
algorithm_web/admin/problem.py
KMU-algolab/algorithm
2b734978da78b936244580ed1febe4f9f6cf1aea
[ "MIT" ]
10
2019-03-15T05:12:23.000Z
2020-05-06T13:05:49.000Z
algorithm_web/admin/problem.py
KMU-algolab/algorithm
2b734978da78b936244580ed1febe4f9f6cf1aea
[ "MIT" ]
null
null
null
from django.contrib import admin from .. import models @admin.register(models.Problem) class ProblemeAdmin(admin.ModelAdmin): """ 문제관리 """ list_display = ['problem_name', 'limit_time', 'limit_memory', 'scoring_type', 'level', 'info', 'is_open', 'checker_code'] class Meta: model = models....
19.808511
125
0.647691
from django.contrib import admin from .. import models @admin.register(models.Problem) class ProblemeAdmin(admin.ModelAdmin): list_display = ['problem_name', 'limit_time', 'limit_memory', 'scoring_type', 'level', 'info', 'is_open', 'checker_code'] class Meta: model = models.Problem @admin.register...
true
true
f710474b36d3e20f8e9a1f23e934f85fb7128046
6,277
py
Python
tests/unit/dsetUtilTest.py
murlock/hsds
9f5fc3cdb64017d07e34eb422eee5398553d213c
[ "Apache-2.0" ]
null
null
null
tests/unit/dsetUtilTest.py
murlock/hsds
9f5fc3cdb64017d07e34eb422eee5398553d213c
[ "Apache-2.0" ]
null
null
null
tests/unit/dsetUtilTest.py
murlock/hsds
9f5fc3cdb64017d07e34eb422eee5398553d213c
[ "Apache-2.0" ]
null
null
null
############################################################################## # Copyright by The HDF Group. # # All rights reserved. # # # # Th...
38.27439
114
0.498487
true
true
f71048378dda0fc6890665ea8932c66d76ee0535
6,037
py
Python
fedot/core/pipelines/tuning/unified.py
bahia14/Fedot_Times_Series_Forecast
995751068733541ba2f546065082709ce0fb63ae
[ "BSD-3-Clause" ]
null
null
null
fedot/core/pipelines/tuning/unified.py
bahia14/Fedot_Times_Series_Forecast
995751068733541ba2f546065082709ce0fb63ae
[ "BSD-3-Clause" ]
null
null
null
fedot/core/pipelines/tuning/unified.py
bahia14/Fedot_Times_Series_Forecast
995751068733541ba2f546065082709ce0fb63ae
[ "BSD-3-Clause" ]
null
null
null
from datetime import timedelta from functools import partial import numpy as np from hyperopt import fmin, space_eval, tpe from fedot.core.data.data_split import train_test_data_setup from fedot.core.log import Log from fedot.core.pipelines.tuning.hyperparams import convert_params, get_node_params from fedot.core.pip...
40.246667
96
0.597813
from datetime import timedelta from functools import partial import numpy as np from hyperopt import fmin, space_eval, tpe from fedot.core.data.data_split import train_test_data_setup from fedot.core.log import Log from fedot.core.pipelines.tuning.hyperparams import convert_params, get_node_params from fedot.core.pip...
true
true
f71048c31984514aba32b993f0eaae5c4531e8fa
97,683
py
Python
theano/tensor/signal/pool.py
zploskey/Theano
9b3f6351d41d9f5e01b198e3de7538d7f032c409
[ "BSD-3-Clause" ]
1
2017-06-30T21:37:52.000Z
2017-06-30T21:37:52.000Z
theano/tensor/signal/pool.py
zploskey/Theano
9b3f6351d41d9f5e01b198e3de7538d7f032c409
[ "BSD-3-Clause" ]
null
null
null
theano/tensor/signal/pool.py
zploskey/Theano
9b3f6351d41d9f5e01b198e3de7538d7f032c409
[ "BSD-3-Clause" ]
1
2020-01-06T20:28:42.000Z
2020-01-06T20:28:42.000Z
""" Ops for downsampling images. Planned: Pool, DownsampleAvg, DownsampleSoftmax. """ from __future__ import absolute_import, print_function, division # This file should move along with conv.py import warnings import itertools import numpy as np from six.moves import xrange import six.moves.builtins as builtins impor...
39.595865
139
0.490106
from __future__ import absolute_import, print_function, division import warnings import itertools import numpy as np from six.moves import xrange import six.moves.builtins as builtins import theano from theano import gof, OpenMPOp, tensor, Variable, Apply from theano.gof import ParamsType, EnumList from theano.gradi...
true
true
f7104a1e09cb5f5864d25354d11d833d0bfc4a7e
1,306
py
Python
app/core/tests/test_admin.py
rodnaskorn/recipe-app-api
a3d16d77ef51ea39d9ac433772de99f29e2fc1cd
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
rodnaskorn/recipe-app-api
a3d16d77ef51ea39d9ac433772de99f29e2fc1cd
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
rodnaskorn/recipe-app-api
a3d16d77ef51ea39d9ac433772de99f29e2fc1cd
[ "MIT" ]
null
null
null
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='admin@test.com', ...
31.095238
68
0.637825
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='admin@test.com', ...
true
true
f7104a21aebf2e2aa07cc55c113bdba2ce69ca83
16,448
py
Python
python/ccxt/tidebit.py
xeddmc/ccxt
9ddd88e6bbc4b2162cf45d331995bb86235d2a59
[ "MIT" ]
1
2021-03-01T17:45:33.000Z
2021-03-01T17:45:33.000Z
python/ccxt/tidebit.py
xeddmc/ccxt
9ddd88e6bbc4b2162cf45d331995bb86235d2a59
[ "MIT" ]
4
2020-09-06T22:46:57.000Z
2021-05-10T08:35:02.000Z
python/ccxt/tidebit.py
xeddmc/ccxt
9ddd88e6bbc4b2162cf45d331995bb86235d2a59
[ "MIT" ]
1
2019-11-08T12:36:13.000Z
2019-11-08T12:36:13.000Z
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import InsufficientFunds from ccxt...
36.632517
155
0.486685
ge import Exchange from ccxt.base.errors import ExchangeError from ccxt.base.errors import InsufficientFunds from ccxt.base.errors import OrderNotFound class tidebit (Exchange): def describe(self): return self.deep_extend(super(tidebit, self).describe(), { 'id': 'tidebit', 'nam...
true
true
f7104af5717a6011d196d1dc4179149301442dfe
803
py
Python
tests/test_gameshow.py
AndrewWasHere/gameshow
70441bff391f7313a1e186f68ee9df7df83c90fa
[ "BSD-3-Clause" ]
null
null
null
tests/test_gameshow.py
AndrewWasHere/gameshow
70441bff391f7313a1e186f68ee9df7df83c90fa
[ "BSD-3-Clause" ]
null
null
null
tests/test_gameshow.py
AndrewWasHere/gameshow
70441bff391f7313a1e186f68ee9df7df83c90fa
[ "BSD-3-Clause" ]
null
null
null
""" Copyright 2016, Andrew Lin All rights reserved. This software is licensed under the BSD 3-Clause License. See LICENSE.txt at the root of the project or https://opensource.org/licenses/BSD-3-Clause """ import pytest from app.gameshow import make_gameshow @pytest.fixture def app(): """The whole gameshow app."...
21.131579
57
0.697385
import pytest from app.gameshow import make_gameshow @pytest.fixture def app(): a = make_gameshow() return a.test_client() def test_scoreboard(app): response = app.get('/') assert response.status_code == 200 assert response.content_type.startswith('text/html') def test_proctor(app): resp...
true
true