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
f709c1866b436cc5e4023f18c6372832500ce7ae
67
py
Python
pm4py/models/transition_system/__init__.py
edugonza/pm4py-source
b5ae5ea40799155d6540692f94be0444c16fd9d3
[ "Apache-2.0" ]
null
null
null
pm4py/models/transition_system/__init__.py
edugonza/pm4py-source
b5ae5ea40799155d6540692f94be0444c16fd9d3
[ "Apache-2.0" ]
null
null
null
pm4py/models/transition_system/__init__.py
edugonza/pm4py-source
b5ae5ea40799155d6540692f94be0444c16fd9d3
[ "Apache-2.0" ]
null
null
null
from pm4py.models.transition_system import transition_system, utils
67
67
0.895522
from pm4py.models.transition_system import transition_system, utils
true
true
f709c266be7704361d822d91c5e72c7e402bb726
5,797
py
Python
spyder/plugins/editor/utils/debugger.py
seryj/spyder
acea4f501c1a04d57b02e5e817708a69b503f430
[ "MIT" ]
null
null
null
spyder/plugins/editor/utils/debugger.py
seryj/spyder
acea4f501c1a04d57b02e5e817708a69b503f430
[ "MIT" ]
null
null
null
spyder/plugins/editor/utils/debugger.py
seryj/spyder
acea4f501c1a04d57b02e5e817708a69b503f430
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ Contains the text debugger manager. """ import os.path as osp from qtpy.QtWidgets import QInputDialog, QLineEdit from spyder.config.main import CONF from spyder...
34.921687
77
0.621701
import os.path as osp from qtpy.QtWidgets import QInputDialog, QLineEdit from spyder.config.main import CONF from spyder.config.base import _ from spyder.py3compat import to_text_string from spyder.api.manager import Manager from spyder.plugins.editor.utils.editor import BlockUserData def _load_all_breakpoint...
true
true
f709c3d8c452141544904aa3206512fef48698f7
1,900
py
Python
openstack/tests/unit/clustering/v1/test_profile_type.py
NeCTAR-RC/openstacksdk
60a24f6c4717a1f9a0e545c9a07e68afaedc5a27
[ "Apache-2.0" ]
null
null
null
openstack/tests/unit/clustering/v1/test_profile_type.py
NeCTAR-RC/openstacksdk
60a24f6c4717a1f9a0e545c9a07e68afaedc5a27
[ "Apache-2.0" ]
null
null
null
openstack/tests/unit/clustering/v1/test_profile_type.py
NeCTAR-RC/openstacksdk
60a24f6c4717a1f9a0e545c9a07e68afaedc5a27
[ "Apache-2.0" ]
1
2020-07-21T02:18:23.000Z
2020-07-21T02:18:23.000Z
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
31.666667
75
0.659474
import mock from openstack.tests.unit import base from openstack.clustering.v1 import profile_type FAKE = { 'name': 'FAKE_PROFILE_TYPE', 'schema': { 'foo': 'bar' }, 'support_status': { '1.0': [{ 'status': 'supported', 'since': '2016.10', }] ...
true
true
f709c576d0c06e1b8e9c1dba47fe5262c19309d7
2,468
py
Python
examples/test_dump_kws_two_targets.py
sriiora/tcf
e607ce04f97dbb4910d94428c0600a6a7145a825
[ "Apache-2.0" ]
24
2018-08-21T18:04:48.000Z
2022-02-07T22:50:06.000Z
examples/test_dump_kws_two_targets.py
sriiora/tcf
e607ce04f97dbb4910d94428c0600a6a7145a825
[ "Apache-2.0" ]
16
2018-08-21T18:03:52.000Z
2022-03-01T17:15:42.000Z
examples/test_dump_kws_two_targets.py
sriiora/tcf
e607ce04f97dbb4910d94428c0600a6a7145a825
[ "Apache-2.0" ]
29
2018-08-22T19:40:59.000Z
2021-12-21T11:13:23.000Z
#! /usr/bin/python3 # # Copyright (c) 2017 Intel Corporation # # SPDX-License-Identifier: Apache-2.0 # # pylint: disable = missing-docstring """Testcase using two targets -------------------------- Note n this case the target group names are listing two targets and each target obejct has different values. .. literali...
35.257143
122
0.616288
import pprint import tcfl.tc @tcfl.tc.target() @tcfl.tc.target() @tcfl.tc.tags(build_only = True, ignore_example = True) class _test(tcfl.tc.tc_c): def build(self, target, target1): self.report_info("Keywords for testcase:\n%s" % pprint.pformat(self.kws), ...
true
true
f709c6ae72b126c7b0f1d53b851327f9981b2de1
29,835
py
Python
python/pulumi_eks/managed_node_group.py
fitzoh/pulumi-eks
865ccf14cdf6bec706e443c8fda44f85f388c9e1
[ "Apache-2.0" ]
8
2018-09-27T21:31:46.000Z
2018-12-01T02:33:18.000Z
python/pulumi_eks/managed_node_group.py
fitzoh/pulumi-eks
865ccf14cdf6bec706e443c8fda44f85f388c9e1
[ "Apache-2.0" ]
21
2018-08-23T16:47:29.000Z
2018-12-02T03:07:22.000Z
python/pulumi_eks/managed_node_group.py
fitzoh/pulumi-eks
865ccf14cdf6bec706e443c8fda44f85f388c9e1
[ "Apache-2.0" ]
6
2018-09-05T16:21:21.000Z
2018-10-26T23:11:00.000Z
# coding=utf-8 # *** WARNING: this file was generated by pulumi-gen-eks. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities from ._inputs i...
55.147874
308
0.668108
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from . import _utilities from ._inputs import * from .vpc_cni import VpcCni import pulumi_aws import pulumi_kubernetes __all__ = ['ManagedNodeGroupArgs', 'ManagedNodeGroup'] @pulumi.input_type ...
true
true
f709c7766e0bf952395f474d0c6055d6f4fbf99a
37,773
py
Python
venv/Lib/site-packages/reportlab/graphics/renderSVG.py
lsmiley/esstools-adminlte-3
ec3a7334be0ab05e9d336e397d6edb881131b932
[ "MIT" ]
55
2019-09-21T02:45:18.000Z
2021-12-10T13:38:51.000Z
venv/Lib/site-packages/reportlab/graphics/renderSVG.py
rashikbuksh/Optimal-Transportation-System
18c6d5341c6d3ecbb1c8fcfba8e46ca2ba493882
[ "MIT" ]
4
2019-09-26T03:16:50.000Z
2021-12-10T13:40:49.000Z
venv/Lib/site-packages/reportlab/graphics/renderSVG.py
rashikbuksh/Optimal-Transportation-System
18c6d5341c6d3ecbb1c8fcfba8e46ca2ba493882
[ "MIT" ]
26
2019-09-25T03:54:30.000Z
2022-03-21T14:03:12.000Z
__doc__="""An experimental SVG renderer for the ReportLab graphics framework. This will create SVG code from the ReportLab Graphics API (RLG). To read existing SVG code and convert it into ReportLab graphics objects download the svglib module here: http://python.net/~gherman/#svglib """ import math, types, sys, os...
38.821172
139
0.575252
__doc__="""An experimental SVG renderer for the ReportLab graphics framework. This will create SVG code from the ReportLab Graphics API (RLG). To read existing SVG code and convert it into ReportLab graphics objects download the svglib module here: http://python.net/~gherman/#svglib """ import math, types, sys, os...
true
true
f709c78660219ac4debdf4bfe4edf56a0cc485d8
6,193
py
Python
pyqtgraph/configfile.py
Tillsten/pyqtgraph
0045863165fe526988c58cf4f8232ae2d261a5ee
[ "MIT" ]
5
2019-03-08T05:30:20.000Z
2021-05-15T07:33:50.000Z
pyqtgraph/configfile.py
Tillsten/pyqtgraph
0045863165fe526988c58cf4f8232ae2d261a5ee
[ "MIT" ]
1
2019-01-14T09:00:21.000Z
2019-01-14T09:00:21.000Z
pyqtgraph/configfile.py
Tillsten/pyqtgraph
0045863165fe526988c58cf4f8232ae2d261a5ee
[ "MIT" ]
1
2022-02-01T12:45:29.000Z
2022-02-01T12:45:29.000Z
# -*- coding: utf-8 -*- """ configfile.py - Human-readable text configuration file library Copyright 2010 Luke Campagnola Distributed under MIT/X11 license. See license.txt for more infomation. Used for reading and writing dictionary objects to a python-like configuration file format. Data structures may be nested a...
30.507389
131
0.501211
import re, os, sys from .pgcollections import OrderedDict GLOBAL_PATH = None from . import units from .python2_3 import asUnicode class ParseError(Exception): def __init__(self, message, lineNum, line, fileName=None): self.lineNum = lineNum self.line = line self.fileName = fileN...
true
true
f709c91120596c3ea3b45b02c68538a4ccfbd7ce
7,723
py
Python
tempest/api/compute/volumes/test_volumes_list.py
ssameerr/tempest
e413f28661c2aab3f8da8d005db1fa5c59cc6b68
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/volumes/test_volumes_list.py
ssameerr/tempest
e413f28661c2aab3f8da8d005db1fa5c59cc6b68
[ "Apache-2.0" ]
null
null
null
tempest/api/compute/volumes/test_volumes_list.py
ssameerr/tempest
e413f28661c2aab3f8da8d005db1fa5c59cc6b68
[ "Apache-2.0" ]
2
2015-04-30T08:46:29.000Z
2020-03-01T17:05:23.000Z
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
45.698225
79
0.604299
from tempest.api.compute import base from tempest.common.utils import data_utils from tempest.common import waiters from tempest import config from tempest import test CONF = config.CONF class VolumesTestJSON(base.BaseV2ComputeTest): @classmethod def skip_checks(cls):...
true
true
f709ca6f7784c7430429a65498dd7dcee60b9751
468
py
Python
src/providers/__init__.py
abdellatifLabr/social-media-stocks-tracker
b54f1db488d8b26e292ec025d1af7f8d4b5a94da
[ "MIT" ]
null
null
null
src/providers/__init__.py
abdellatifLabr/social-media-stocks-tracker
b54f1db488d8b26e292ec025d1af7f8d4b5a94da
[ "MIT" ]
null
null
null
src/providers/__init__.py
abdellatifLabr/social-media-stocks-tracker
b54f1db488d8b26e292ec025d1af7f8d4b5a94da
[ "MIT" ]
null
null
null
import os from importlib import import_module def get_providers(): for provider_file in os.listdir(os.path.dirname(os.path.abspath(__file__))): if provider_file[0] != '$': continue provider = provider_file.replace('.py', '') yield import_module(f'{__package__}.{provider}') d...
27.529412
80
0.67094
import os from importlib import import_module def get_providers(): for provider_file in os.listdir(os.path.dirname(os.path.abspath(__file__))): if provider_file[0] != '$': continue provider = provider_file.replace('.py', '') yield import_module(f'{__package__}.{provider}') d...
true
true
f709cc9fb30c63d9a152a36daa62b63547568b39
6,798
py
Python
userbot/modules/updater.py
badwordking/import
612b6c386a23a925fa44384c93f8fecc7160bee4
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/updater.py
badwordking/import
612b6c386a23a925fa44384c93f8fecc7160bee4
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/modules/updater.py
badwordking/import
612b6c386a23a925fa44384c93f8fecc7160bee4
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
# Copyright (C) 2019 The Raphielscape Company LLC. # # Licensed under the Raphielscape Public License, Version 1.c (the "License"); # you may not use this file except in compliance with the License. # """ This module updates the userbot based on Upstream revision """ from os import remove, execle, path, makedirs, gete...
35.041237
106
0.598117
from os import remove, execle, path, makedirs, getenv from shutil import rmtree import asyncio import sys from git import Repo from git.exc import GitCommandError, InvalidGitRepositoryError, NoSuchPathError from userbot import CMD_HELP, bot, HEROKU_APIKEY, HEROKU_APPNAME, UPSTREAM_REPO_URL from userbot.events i...
true
true
f709cf5255d5c1ff9141ddd1b67349a4b9fdd3fb
8,536
pyw
Python
venv/Lib/site-packages/PyQt4/examples/widgets/imageviewer.pyw
prateekfxtd/ns_Startup
095a62b3a8c7bf0ff7b767355d57d993bbd2423d
[ "MIT" ]
1
2022-03-16T02:10:30.000Z
2022-03-16T02:10:30.000Z
venv/Lib/site-packages/PyQt4/examples/widgets/imageviewer.pyw
prateekfxtd/ns_Startup
095a62b3a8c7bf0ff7b767355d57d993bbd2423d
[ "MIT" ]
null
null
null
venv/Lib/site-packages/PyQt4/examples/widgets/imageviewer.pyw
prateekfxtd/ns_Startup
095a62b3a8c7bf0ff7b767355d57d993bbd2423d
[ "MIT" ]
2
2019-05-28T11:58:59.000Z
2020-09-23T17:21:19.000Z
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
39.702326
82
0.641167
u.addAction(self.openAct) self.fileMenu.addAction(self.printAct) self.fileMenu.addSeparator() self.fileMenu.addAction(self.exitAct) self.viewMenu = QtGui.QMenu("&View", self) self.viewMenu.addAction(self.zoomInAct) self.viewMenu.addAction(self.zoomOutAct) self...
true
true
f709cf7002dd1d680b4a2838c2421fcebabdf110
7,746
py
Python
hackathon/annotation_compare_viz.py
cns-iu/ccf-research
e029c8985a249c1caec925e95f5286c505c706ea
[ "MIT" ]
1
2020-09-09T13:45:44.000Z
2020-09-09T13:45:44.000Z
hackathon/annotation_compare_viz.py
cns-iu/ccf-research
e029c8985a249c1caec925e95f5286c505c706ea
[ "MIT" ]
null
null
null
hackathon/annotation_compare_viz.py
cns-iu/ccf-research
e029c8985a249c1caec925e95f5286c505c706ea
[ "MIT" ]
4
2020-08-14T19:31:56.000Z
2021-09-07T04:11:45.000Z
import json from re import split import shutil import os import sys import numpy as np from PIL import Image, ImageDraw, ImageFont from skimage import io from shapely.geometry import Polygon Image.MAX_IMAGE_PIXELS = None def make_dir(path): if not os.path.exists(path): os.makedirs(path) else: ...
33.102564
99
0.560676
import json from re import split import shutil import os import sys import numpy as np from PIL import Image, ImageDraw, ImageFont from skimage import io from shapely.geometry import Polygon Image.MAX_IMAGE_PIXELS = None def make_dir(path): if not os.path.exists(path): os.makedirs(path) else: ...
true
true
f709cf992b68de68927df65d68d163fcd1f06b58
3,861
py
Python
mmdet/models/relation_heads/imp_head.py
yizhe-ang/MMSceneGraph
d4daec3d7930d6fe1efe75b9c0a265c8be0b70ba
[ "MIT" ]
24
2021-10-14T03:28:28.000Z
2022-03-29T09:30:04.000Z
mmdet/models/relation_heads/imp_head.py
yizhe-ang/MMSceneGraph
d4daec3d7930d6fe1efe75b9c0a265c8be0b70ba
[ "MIT" ]
4
2021-12-14T15:04:49.000Z
2022-02-19T09:54:42.000Z
mmdet/models/relation_heads/imp_head.py
yizhe-ang/MMSceneGraph
d4daec3d7930d6fe1efe75b9c0a265c8be0b70ba
[ "MIT" ]
4
2021-10-31T11:23:06.000Z
2021-12-17T06:38:50.000Z
# --------------------------------------------------------------- # imp_head.py # Set-up time: 2020/5/21 下午11:22 # Copyright (c) 2020 ICT # Licensed under The MIT License [see LICENSE for details] # Written by Kenneth-Wong (Wenbin-Wang) @ VIPL.ICT # Contact: wenbin.wang@vipl.ict.ac.cn [OR] nkwangwenbin@gmail.com ...
43.382022
108
0.597255
from ..registry import HEADS import torch from .relation_head import RelationHead from .approaches import IMPContext from mmdet.core import bbox2roi @HEADS.register_module class IMPHead(RelationHead): def __init__(self, **kwargs): super(IMPHead, self).__init__(**kwargs) self...
true
true
f709d0352b5fa74dda5922641a0d9109bce49efe
423
py
Python
PlantEmissionController/PlantEmissionController/asgi.py
sania-dsouza/NRChallenge_Controller
d1dcb665aa7394ec49d89ecda3c49dc09b89f9d6
[ "MIT" ]
null
null
null
PlantEmissionController/PlantEmissionController/asgi.py
sania-dsouza/NRChallenge_Controller
d1dcb665aa7394ec49d89ecda3c49dc09b89f9d6
[ "MIT" ]
null
null
null
PlantEmissionController/PlantEmissionController/asgi.py
sania-dsouza/NRChallenge_Controller
d1dcb665aa7394ec49d89ecda3c49dc09b89f9d6
[ "MIT" ]
null
null
null
""" ASGI config for PlantEmissionController project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefau...
24.882353
83
0.801418
import os from django.core.asgi import get_asgi_application os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'PlantEmissionController.settings') application = get_asgi_application()
true
true
f709d34b2d10d8875740a51747de847183d6995e
13,048
py
Python
src/models/ast_models.py
jvel07/ast
600e7cf952ec59ac9cc1bb3170d3da7578e1f384
[ "BSD-3-Clause" ]
null
null
null
src/models/ast_models.py
jvel07/ast
600e7cf952ec59ac9cc1bb3170d3da7578e1f384
[ "BSD-3-Clause" ]
null
null
null
src/models/ast_models.py
jvel07/ast
600e7cf952ec59ac9cc1bb3170d3da7578e1f384
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # @Time : 6/10/21 5:04 PM # @Author : Yuan Gong # @Affiliation : Massachusetts Institute of Technology # @Email : yuangong@mit.edu # @File : ast_models.py import os os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"] = "0,1,2,3" import torch import torch...
56.978166
191
0.610132
import os os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID" os.environ["CUDA_VISIBLE_DEVICES"] = "0,1,2,3" import torch import torch.nn as nn from torch.cuda.amp import autocast import wget os.environ['TORCH_HOME'] = '../../pretrained_models' import timm from timm.models.layers import to_2tuple, trunc_normal_ ...
true
true
f709d36bd178f40879376ac199984275f9458cc3
1,113
py
Python
bin/create_trace_graphviz.py
AlexJew/CityEnergyAnalyst
6eb372c79e5100a2d0abce78561ae368fb409cd1
[ "MIT" ]
1
2018-08-16T14:34:23.000Z
2018-08-16T14:34:23.000Z
bin/create_trace_graphviz.py
AlexJew/CityEnergyAnalyst
6eb372c79e5100a2d0abce78561ae368fb409cd1
[ "MIT" ]
null
null
null
bin/create_trace_graphviz.py
AlexJew/CityEnergyAnalyst
6eb372c79e5100a2d0abce78561ae368fb409cd1
[ "MIT" ]
null
null
null
""" Read in the output from the trace-inputlocator script and create a GraphViz file. Pass as input the path to the yaml output of the trace-inputlocator script via config file. The output is written to the trace-inputlocator location. WHY? because the trace-inputlocator only has the GraphViz output of the last call ...
35.903226
118
0.745732
from __future__ import print_function import yaml import cea.config from cea.tests.trace_inputlocator import create_graphviz_output def main(config): with open(config.trace_inputlocator.yaml_output_file, 'r') as f: yaml_data = yaml.load(f) trace_data = [] for script in yaml_data.keys(): f...
true
true
f709d40f1b6482aa8186bd0b9c536a20d11a426e
11,220
py
Python
rest_api/build/lib/rest_api/workflow/main.py
hidura/sawtooth-blockmed
d0e047972557315489de1b308a84f477da6f993d
[ "Apache-2.0" ]
3
2020-06-03T23:09:27.000Z
2021-05-15T22:21:21.000Z
rest_api/rest_api/workflow/main.py
hidura/sawtooth-blockmed
d0e047972557315489de1b308a84f477da6f993d
[ "Apache-2.0" ]
6
2020-07-21T00:03:29.000Z
2021-09-28T03:30:02.000Z
rest_api/rest_api/workflow/main.py
hidura/sawtooth-blockmed
d0e047972557315489de1b308a84f477da6f993d
[ "Apache-2.0" ]
1
2020-06-26T03:50:50.000Z
2020-06-26T03:50:50.000Z
# Copyright 2017 Intel Corporation # # 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 wri...
41.25
106
0.712923
import argparse import asyncio import logging import os from signal import signal, SIGINT import sys from sanic import Sanic from sawtooth_signing import create_context from sawtooth_signing import ParseError from sawtooth_signing import CryptoFactory from zmq.asyncio import ZMQEventLoop from rest...
true
true
f709d444e910f6f32e57c5407aa2e7a31cbc3d3d
6,676
py
Python
util/security/test/test_jwtutil.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
2,027
2019-11-12T18:05:48.000Z
2022-03-31T22:25:04.000Z
util/security/test/test_jwtutil.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
496
2019-11-12T18:13:37.000Z
2022-03-31T10:43:45.000Z
util/security/test/test_jwtutil.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
249
2019-11-12T18:02:27.000Z
2022-03-22T12:19:19.000Z
import time import pytest import jwt from cryptography.hazmat.primitives.asymmetric import rsa from cryptography.hazmat.primitives import serialization from authlib.jose import jwk from util.security.jwtutil import ( decode, exp_max_s_option, jwk_dict_to_public_key, InvalidTokenError, InvalidAlgo...
27.933054
100
0.560815
import time import pytest import jwt from cryptography.hazmat.primitives.asymmetric import rsa from cryptography.hazmat.primitives import serialization from authlib.jose import jwk from util.security.jwtutil import ( decode, exp_max_s_option, jwk_dict_to_public_key, InvalidTokenError, InvalidAlgo...
true
true
f709d502b186aa12fa05d2db0b3fe245571830c7
4,145
py
Python
mas_cache/models.py
blochberger/mas-cache
f7f507365220cd6a3628de1266a510a750121f0c
[ "0BSD" ]
1
2020-04-24T09:02:53.000Z
2020-04-24T09:02:53.000Z
mas_cache/models.py
blochberger/mas-cache
f7f507365220cd6a3628de1266a510a750121f0c
[ "0BSD" ]
null
null
null
mas_cache/models.py
blochberger/mas-cache
f7f507365220cd6a3628de1266a510a750121f0c
[ "0BSD" ]
null
null
null
from typing import Any, Dict, Optional from django.contrib.postgres.fields import JSONField from django.core.validators import RegexValidator from django.db import models from django.utils.timezone import datetime from django.utils.translation import gettext_lazy as _ from core.fields import IntegerChoicesField # V...
23.027778
77
0.7269
from typing import Any, Dict, Optional from django.contrib.postgres.fields import JSONField from django.core.validators import RegexValidator from django.db import models from django.utils.timezone import datetime from django.utils.translation import gettext_lazy as _ from core.fields import IntegerChoicesField ...
true
true
f709d58d517711bebc218d0488e153bc0a08ffde
443
py
Python
switches/migrations/0002_auto_20161227_1515.py
schatten/django-migration-workflow
91e6def9cf54e36c3b9cba6d7c28b63f945ca954
[ "MIT" ]
null
null
null
switches/migrations/0002_auto_20161227_1515.py
schatten/django-migration-workflow
91e6def9cf54e36c3b9cba6d7c28b63f945ca954
[ "MIT" ]
null
null
null
switches/migrations/0002_auto_20161227_1515.py
schatten/django-migration-workflow
91e6def9cf54e36c3b9cba6d7c28b63f945ca954
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2016-12-27 15:15 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('switches', '0001_initial'), ] operations = [ migrations.AlterField( ...
21.095238
50
0.609481
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('switches', '0001_initial'), ] operations = [ migrations.AlterField( model_name='farfaraway', name='last', fiel...
true
true
f709d6c3320473f055bd3d81082bcccaa89dcb9b
5,733
py
Python
ticketer/ticketer/middlewares.py
chiselko6/ticketer
9d9af440e75452478ba99cba659fca4d1ef4c12b
[ "MIT" ]
null
null
null
ticketer/ticketer/middlewares.py
chiselko6/ticketer
9d9af440e75452478ba99cba659fca4d1ef4c12b
[ "MIT" ]
null
null
null
ticketer/ticketer/middlewares.py
chiselko6/ticketer
9d9af440e75452478ba99cba659fca4d1ef4c12b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Define here the models for your spider middleware # # See documentation in: # https://docs.scrapy.org/en/latest/topics/spider-middleware.html from typing import Iterable from scrapy import signals from .items import TransportInfo, SeatInfo from .settings import MOCKED_DATA_PATH class Tic...
33.331395
94
0.652189
from typing import Iterable from scrapy import signals from .items import TransportInfo, SeatInfo from .settings import MOCKED_DATA_PATH class TicketerSpiderMiddleware(object): @classmethod def from_crawler(cls, crawler): s = cls() crawler.signals.connect(s.sp...
true
true
f709d75432845ad140645213ccef7f5b9231db73
1,026
py
Python
marvelous/dates.py
rkuykendall/marvelous
7c362643c7327b8fffab941e04fe43dcc7e2d2f9
[ "MIT" ]
14
2016-07-13T19:48:35.000Z
2021-11-01T01:47:04.000Z
marvelous/dates.py
rkuykendall/marvelous
7c362643c7327b8fffab941e04fe43dcc7e2d2f9
[ "MIT" ]
19
2016-10-31T21:55:18.000Z
2021-10-31T21:50:37.000Z
marvelous/dates.py
rkuykendall/marvelous
7c362643c7327b8fffab941e04fe43dcc7e2d2f9
[ "MIT" ]
6
2016-07-21T19:09:33.000Z
2021-05-16T12:36:47.000Z
from marshmallow import INCLUDE, Schema, fields, post_load, pre_load class Dates: def __init__(self, on_sale=None, foc=None, unlimited=None, **kwargs): self.on_sale = on_sale self.foc = foc self.unlimited = unlimited self.unknown = kwargs class DatesSchema(Schema): onsaleDate...
29.314286
75
0.609162
from marshmallow import INCLUDE, Schema, fields, post_load, pre_load class Dates: def __init__(self, on_sale=None, foc=None, unlimited=None, **kwargs): self.on_sale = on_sale self.foc = foc self.unlimited = unlimited self.unknown = kwargs class DatesSchema(Schema): onsaleDate...
true
true
f709d768543bcd6310dd9e2b12e5531a81c54d69
15
py
Python
text_store/filters.py
digirati-co-uk/drf-text-store
ca29cfc4522d0f718e0419f956705b845e77dae4
[ "MIT" ]
null
null
null
text_store/filters.py
digirati-co-uk/drf-text-store
ca29cfc4522d0f718e0419f956705b845e77dae4
[ "MIT" ]
null
null
null
text_store/filters.py
digirati-co-uk/drf-text-store
ca29cfc4522d0f718e0419f956705b845e77dae4
[ "MIT" ]
null
null
null
# Placeholder
7.5
14
0.733333
true
true
f709d7a5951382a166dd35184fa8a0d66be3aabe
280
py
Python
opm/external/sentiment.py
Open-Prose-Metrics/open_prose_metrics_app-core
9df65edfe9ee9af0a0731c3f2e21ea25bced250c
[ "MIT" ]
null
null
null
opm/external/sentiment.py
Open-Prose-Metrics/open_prose_metrics_app-core
9df65edfe9ee9af0a0731c3f2e21ea25bced250c
[ "MIT" ]
4
2021-04-30T21:38:10.000Z
2022-01-13T03:32:33.000Z
opm/external/sentiment.py
Open-Prose-Metrics/open_prose_metrics_app-core
9df65edfe9ee9af0a0731c3f2e21ea25bced250c
[ "MIT" ]
1
2021-03-21T14:08:28.000Z
2021-03-21T14:08:28.000Z
#external tools: textgain import requests import json def sentiment_result(text): URL = 'http://text-processing.com/api/sentiment/' raw_text = text r = requests.post(URL, data = {'text':raw_text}) sentiment = json.loads(r.text).get('label') return sentiment
23.333333
53
0.692857
import requests import json def sentiment_result(text): URL = 'http://text-processing.com/api/sentiment/' raw_text = text r = requests.post(URL, data = {'text':raw_text}) sentiment = json.loads(r.text).get('label') return sentiment
true
true
f709d7d9a6c3f3c9af884ebe9c62a536e3dfa929
597
py
Python
verification_rules/common/__init__.py
adrianmkng/watchmen
4be15ad64a5d54d4f546ca8c139fa41fd42dd6aa
[ "Apache-2.0" ]
190
2017-12-13T05:01:42.000Z
2021-11-15T23:35:54.000Z
verification_rules/common/__init__.py
adrianmkng/watchmen
4be15ad64a5d54d4f546ca8c139fa41fd42dd6aa
[ "Apache-2.0" ]
2
2018-08-31T04:53:03.000Z
2018-11-14T00:13:49.000Z
verification_rules/common/__init__.py
adrianmkng/watchmen
4be15ad64a5d54d4f546ca8c139fa41fd42dd6aa
[ "Apache-2.0" ]
22
2017-12-13T04:36:46.000Z
2021-07-29T07:37:41.000Z
# Copyright 2017 Insurance Australia Group Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ag...
39.8
74
0.768844
true
true
f709d89cfc1fad043efd50cf5039f023c148e8cd
419
py
Python
eventmanager/categories/migrations/0002_category_category_image.py
ralcabes/EventManager
dd73b2387228b4508d27974a8eeb222d5ffeecdc
[ "MIT" ]
4
2019-01-06T16:58:20.000Z
2019-04-08T10:20:46.000Z
eventmanager/categories/migrations/0002_category_category_image.py
ralcabes/EventManager
dd73b2387228b4508d27974a8eeb222d5ffeecdc
[ "MIT" ]
297
2018-11-14T13:59:19.000Z
2022-03-11T23:33:28.000Z
eventmanager/categories/migrations/0002_category_category_image.py
ralcabes/EventManager
dd73b2387228b4508d27974a8eeb222d5ffeecdc
[ "MIT" ]
1
2019-04-22T15:17:32.000Z
2019-04-22T15:17:32.000Z
# Generated by Django 2.1.5 on 2019-02-01 08:51 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('categories', '0001_initial'), ] operations = [ migrations.AddField( model_name='category', name='category_image', ...
22.052632
83
0.610979
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('categories', '0001_initial'), ] operations = [ migrations.AddField( model_name='category', name='category_image', field=models.ImageField(blank=True, n...
true
true
f709d8e6fdd3da9cbade87b9b8ef4c5d23380806
1,121
py
Python
payment/urls.py
skyydq/GreaterWMS
e14014a73b36ec0f0df03712a229b0931cb388fb
[ "Apache-2.0" ]
null
null
null
payment/urls.py
skyydq/GreaterWMS
e14014a73b36ec0f0df03712a229b0931cb388fb
[ "Apache-2.0" ]
null
null
null
payment/urls.py
skyydq/GreaterWMS
e14014a73b36ec0f0df03712a229b0931cb388fb
[ "Apache-2.0" ]
1
2021-07-01T03:05:21.000Z
2021-07-01T03:05:21.000Z
"""singosgu URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/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-base...
36.16129
123
0.706512
from django.urls import path, re_path from django.conf import settings from django.conf.urls.static import static from . import views urlpatterns = [ path(r'freight/', views.TransportationFeeListViewSet.as_view({"get": "list", "post": "create"}), name="transportationfee"), re_path(r'^freight/(?P<pk>\d+)/$', views.Tra...
true
true
f709d94bfb6b20dabb81896e00c628fa1b92786d
4,040
py
Python
pyfesom/fesom2gdal.py
pgierz/pyfesom
6bff7c9a10a080ccb0e089cde0cd0005cd13644d
[ "MIT" ]
null
null
null
pyfesom/fesom2gdal.py
pgierz/pyfesom
6bff7c9a10a080ccb0e089cde0cd0005cd13644d
[ "MIT" ]
null
null
null
pyfesom/fesom2gdal.py
pgierz/pyfesom
6bff7c9a10a080ccb0e089cde0cd0005cd13644d
[ "MIT" ]
null
null
null
# Save the geometry (triangles, verticies) of a FESOM grid to a gdal dataset # Author: R. Rietbroek # Date 17 May 2019 # Currently this save the surface nodes only # Improvements are possible # * Optionally store the 3D surfaces # * add info on e.g. bathymetry the nodes # * import osgeo,ogr as ogr import osgeo.osr as...
38.113208
149
0.690347
import osgeo,ogr as ogr import osgeo.osr as osr def fesom2gdal(mesh,outputname,gdaldriver='GPKG'): driver = ogr.GetDriverByName(gdaldriver) data_source = driver.CreateDataSource(outputname) srs = osr.SpatialReference() srs.ImportFromEPSG(4326) vertlayer = data_source.CreateLay...
true
true
f709d99e36430fd0fbf77d273f9236d04f2c7a44
4,175
py
Python
settings.py
proffalken/edison
5bfa941f8876cb8698cd8009c4514bc03d24c109
[ "BSD-3-Clause" ]
3
2015-11-05T07:29:00.000Z
2021-06-17T23:44:17.000Z
settings.py
proffalken/edison
5bfa941f8876cb8698cd8009c4514bc03d24c109
[ "BSD-3-Clause" ]
1
2016-05-04T10:54:48.000Z
2016-05-04T10:54:56.000Z
settings.py
proffalken/edison
5bfa941f8876cb8698cd8009c4514bc03d24c109
[ "BSD-3-Clause" ]
null
null
null
# This file is part of the Edison Project. # Please refer to the LICENSE document that was supplied with this software for information on how it can be used. # Django settings for Edison project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) # Django Debug Toolbar set...
35.683761
114
0.734371
DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ) INTERNAL_IPS = ('127.0.0.1','192.168.1.56','192.168.3.57') DEBUG_TOOLBAR_PANELS = ( 'debug_toolbar.panels.version.VersionDebugPanel', 'debug_toolbar.panels.timer.TimerDebugPanel', 'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel', '...
true
true
f709d9ab7f9abe834c26068d509b0d3e3b154b68
9,223
py
Python
tests/test_morse.py
amandalynnes/morse-code-bits
88d1f66404824c0d882c59811324996d4b2baf6b
[ "MIT" ]
null
null
null
tests/test_morse.py
amandalynnes/morse-code-bits
88d1f66404824c0d882c59811324996d4b2baf6b
[ "MIT" ]
null
null
null
tests/test_morse.py
amandalynnes/morse-code-bits
88d1f66404824c0d882c59811324996d4b2baf6b
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # flake8: noqa """ Unit tests for Morse Code: Bits Students should not modify this file. """ __author__ = 'madarp' import sys import unittest import importlib import subprocess # suppress __pycache__ and .pyc files sys.dont_write_bytecode = True # Kenzie devs: change t...
54.252941
654
0.70682
__author__ = 'madarp' import sys import unittest import importlib import subprocess sys.dont_write_bytecode = True PKG_NAME = 'morse' morse_hey_jude = '.... . -.-- .--- ..- -.. .' morse_quick_fox = '- .... . --.- ..- .. -.-. -.- -... .-. --- .-- -. ..-. --- -..- .--- ..- -- .--. ... --- ...- . ....
true
true
f709d9bb17cf6263074bdfc8c1b3ba2b28108867
9,762
py
Python
cloudkitty/dataframe.py
wanghuiict/cloudkitty
11ff713042eb0354f497f7051130630c46860735
[ "Apache-2.0" ]
97
2015-10-18T02:53:17.000Z
2022-03-07T05:15:39.000Z
cloudkitty/dataframe.py
shanafang9/cloudkitty
911c90569ccb09ecf0d7aa11a5a707c8ebda09cf
[ "Apache-2.0" ]
1
2022-01-20T16:35:22.000Z
2022-01-20T16:35:22.000Z
cloudkitty/dataframe.py
shanafang9/cloudkitty
911c90569ccb09ecf0d7aa11a5a707c8ebda09cf
[ "Apache-2.0" ]
54
2015-10-27T10:55:02.000Z
2022-02-18T08:23:19.000Z
# Copyright 2019 Objectif Libre # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
34.864286
79
0.571809
import collections import datetime import decimal import functools import voluptuous from werkzeug import datastructures from cloudkitty.utils import json from cloudkitty.utils import tz as tzutils from cloudkitty.utils import validation as vutils DATAPOINT_SCHEMA = voluptuous.Schema({ voluptuo...
true
true
f709da8f28d7264755b7b14dc5e8586d8b1e7424
2,523
py
Python
src/collective/solr/browser/controlpanel.py
IMIO/collective.solr
844219eb3968b34d2b83a7bd5f59340d676d149e
[ "ZPL-1.1" ]
null
null
null
src/collective/solr/browser/controlpanel.py
IMIO/collective.solr
844219eb3968b34d2b83a7bd5f59340d676d149e
[ "ZPL-1.1" ]
null
null
null
src/collective/solr/browser/controlpanel.py
IMIO/collective.solr
844219eb3968b34d2b83a7bd5f59340d676d149e
[ "ZPL-1.1" ]
null
null
null
# -*- coding: utf-8 -*- from plone.app.registry.browser import controlpanel from plone.protect.interfaces import IDisableCSRFProtection from collective.solr.interfaces import ISolrSchema, _ from plone.restapi.controlpanels import RegistryConfigletPanel from Products.CMFPlone.utils import safe_unicode from Products.Five...
37.656716
77
0.70432
from plone.app.registry.browser import controlpanel from plone.protect.interfaces import IDisableCSRFProtection from collective.solr.interfaces import ISolrSchema, _ from plone.restapi.controlpanels import RegistryConfigletPanel from Products.CMFPlone.utils import safe_unicode from Products.Five.browser.pagetemplatefi...
true
true
f709dac114e4abf7ce428aa013816678149fbf10
19
py
Python
btd6_memory_info/generated/SteamNative/Platform/Linux32/linux32.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
btd6_memory_info/generated/SteamNative/Platform/Linux32/linux32.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
btd6_memory_info/generated/SteamNative/Platform/Linux32/linux32.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
class Linux32: pass
19
19
0.842105
class Linux32: pass
true
true
f709db49836f0a337d880632a4ab2b1e17e82610
1,896
py
Python
hooks/hook-pygame.py
tappi287/rf2_video_settings
6ae73c63f48e6d515a9efb653f236dea0494d9f1
[ "MIT" ]
8
2020-12-09T17:34:40.000Z
2022-02-21T10:15:09.000Z
hooks/hook-pygame.py
tappi287/rf2_video_settings
6ae73c63f48e6d515a9efb653f236dea0494d9f1
[ "MIT" ]
11
2021-02-27T00:21:47.000Z
2022-02-25T14:41:56.000Z
hooks/hook-pygame.py
tappi287/rf2_video_settings
6ae73c63f48e6d515a9efb653f236dea0494d9f1
[ "MIT" ]
2
2021-06-28T21:11:53.000Z
2022-02-06T17:20:18.000Z
""" binaries hook for pygame seems to be required for pygame 2.0 Windows. Otherwise some essential DLLs will not be transfered to the exe. And also put hooks for datas, resources that pygame uses, to work correctly with pyinstaller """ import os import platform from pygame import __file__ as pygame_main_file # Get...
33.857143
118
0.701477
import os import platform from pygame import __file__ as pygame_main_file pygame_folder = os.path.dirname(os.path.abspath(pygame_main_file)) # datas is the variable that pyinstaller looks for while processing hooks datas = [] # exclude some unneeded binaries exclude_bin = ('libFLAC-8', 'libfreetype-6', 'libjpeg-9...
true
true
f709dc15484ea8df0fa2f57cf6db9d359d0459e7
3,324
py
Python
covid/scraper/scraper/spiders/chem_archive.py
IanVermes/covid-timeseries
9ba0fe8bfb031b4cf39fe879e2ee2b4c57acfb6d
[ "MIT" ]
null
null
null
covid/scraper/scraper/spiders/chem_archive.py
IanVermes/covid-timeseries
9ba0fe8bfb031b4cf39fe879e2ee2b4c57acfb6d
[ "MIT" ]
null
null
null
covid/scraper/scraper/spiders/chem_archive.py
IanVermes/covid-timeseries
9ba0fe8bfb031b4cf39fe879e2ee2b4c57acfb6d
[ "MIT" ]
null
null
null
import scrapy import json import datetime POSTED_DATE_FORMAT = "%Y-%m-%d" # BOOKMARK is cursor that tracks just how far back we should scrape each time BOOKMARK = datetime.datetime( year=2020, month=1, day=1 ) # TODO factor bookmark into its own logic class ChemRXIVSpider(scrapy.Spider): name = "chemrxiv" ...
33.575758
160
0.651625
import scrapy import json import datetime POSTED_DATE_FORMAT = "%Y-%m-%d" BOOKMARK = datetime.datetime( year=2020, month=1, day=1 ) class ChemRXIVSpider(scrapy.Spider): name = "chemrxiv" start_urls = [ "https://chemrxiv.org/api/institutions/259/items?types=&licenses=&orderBy=published_date&or...
true
true
f709dd6cd4a7b3bebd5b0ef0464275cfb26ad043
407
py
Python
managair_server/asgi.py
ClairBerlin/managair
44af9f73039ecdb7dd959dacda5470a103795ac3
[ "BSD-3-Clause" ]
4
2020-11-22T17:07:14.000Z
2020-11-26T07:53:08.000Z
managair_server/asgi.py
ClairBerlin/managair
44af9f73039ecdb7dd959dacda5470a103795ac3
[ "BSD-3-Clause" ]
18
2020-12-04T07:48:13.000Z
2022-01-26T18:09:33.000Z
managair_server/asgi.py
ClairBerlin/managair
44af9f73039ecdb7dd959dacda5470a103795ac3
[ "BSD-3-Clause" ]
1
2021-01-15T10:41:33.000Z
2021-01-15T10:41:33.000Z
""" ASGI config for managair_server project. It exposes the ASGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/ """ import os from django.core.asgi import get_asgi_application os.environ.setdefault("DJAN...
23.941176
78
0.793612
import os from django.core.asgi import get_asgi_application os.environ.setdefault("DJANGO_SETTINGS_MODULE", "managair_server.settings") application = get_asgi_application()
true
true
f709ddc3dbd9c527b7a989ae3912f0fba65d1fdc
17,847
py
Python
selfdrive/thermald/thermald.py
doudoune144/openpilot-1
61b8df815ff47c9cf013b0a40fd86357629595d9
[ "MIT" ]
null
null
null
selfdrive/thermald/thermald.py
doudoune144/openpilot-1
61b8df815ff47c9cf013b0a40fd86357629595d9
[ "MIT" ]
null
null
null
selfdrive/thermald/thermald.py
doudoune144/openpilot-1
61b8df815ff47c9cf013b0a40fd86357629595d9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import datetime import os import time from pathlib import Path from typing import Dict, Optional, Tuple from collections import namedtuple, OrderedDict import psutil from smbus2 import SMBus import cereal.messaging as messaging from cereal import log from common.filter_simple import FirstOrderF...
39.74833
159
0.724884
import datetime import os import time from pathlib import Path from typing import Dict, Optional, Tuple from collections import namedtuple, OrderedDict import psutil from smbus2 import SMBus import cereal.messaging as messaging from cereal import log from common.filter_simple import FirstOrderFilter from common.nump...
true
true
f709dee36890489202122bfddea93ac90a757167
788
py
Python
utils.py
zhaohengyin/irgail_example
89f7661b5ab08bdf79686eaf8933ad7b5badced4
[ "MIT" ]
1
2021-11-01T16:39:38.000Z
2021-11-01T16:39:38.000Z
utils.py
zhaohengyin/irgail_example
89f7661b5ab08bdf79686eaf8933ad7b5badced4
[ "MIT" ]
null
null
null
utils.py
zhaohengyin/irgail_example
89f7661b5ab08bdf79686eaf8933ad7b5badced4
[ "MIT" ]
1
2022-03-31T08:41:24.000Z
2022-03-31T08:41:24.000Z
from tqdm import tqdm import numpy as np import torch import torch.nn as nn def build_mlp(input_dim, output_dim, hidden_units=[64, 64], hidden_activation=nn.Tanh(), output_activation=None): layers = [] units = input_dim for next_units in hidden_units: layers.append(nn.Linear(units, ne...
32.833333
113
0.694162
from tqdm import tqdm import numpy as np import torch import torch.nn as nn def build_mlp(input_dim, output_dim, hidden_units=[64, 64], hidden_activation=nn.Tanh(), output_activation=None): layers = [] units = input_dim for next_units in hidden_units: layers.append(nn.Linear(units, ne...
true
true
f709dee74479c981102c7a864b5177e2cac5f198
3,167
py
Python
aiida_sirius/calculations/md.py
simonpintarelli/aiida-sirius
5dc968cc4a98a5d0b018f54c4c7023b2a2682795
[ "MIT" ]
null
null
null
aiida_sirius/calculations/md.py
simonpintarelli/aiida-sirius
5dc968cc4a98a5d0b018f54c4c7023b2a2682795
[ "MIT" ]
null
null
null
aiida_sirius/calculations/md.py
simonpintarelli/aiida-sirius
5dc968cc4a98a5d0b018f54c4c7023b2a2682795
[ "MIT" ]
null
null
null
from .scf_base import SiriusBaseCalculation, make_sirius_json from aiida.plugins import DataFactory from aiida.common import datastructures import tempfile import json import yaml import six SiriusMDParameters = DataFactory('sirius.md') SinglefileData = DataFactory('singlefile') ArrayData = DataFactory('array') List =...
43.383562
117
0.696558
from .scf_base import SiriusBaseCalculation, make_sirius_json from aiida.plugins import DataFactory from aiida.common import datastructures import tempfile import json import yaml import six SiriusMDParameters = DataFactory('sirius.md') SinglefileData = DataFactory('singlefile') ArrayData = DataFactory('array') List =...
true
true
f709e0169cf531779c077a3169173978a2d4127b
14,174
py
Python
homeassistant/components/sensor/netatmo.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
3
2019-01-31T13:41:37.000Z
2020-05-20T14:22:18.000Z
homeassistant/components/sensor/netatmo.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
5
2021-02-08T20:32:11.000Z
2022-01-13T01:19:23.000Z
homeassistant/components/sensor/netatmo.py
dauden1184/home-assistant
f4c6d389b77d0efa86644e76604eaea5d21abdb5
[ "Apache-2.0" ]
1
2021-05-31T08:13:56.000Z
2021-05-31T08:13:56.000Z
""" Support for the NetAtmo Weather Service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.netatmo/ """ import logging from time import time import threading import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA f...
39.703081
78
0.546494
import logging from time import time import threading import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( TEMP_CELSIUS, DEVICE_CLASS_HUMIDITY, DEVICE_CLASS_TEMPERATURE, STATE_UNKNOWN) from homeassistant.helpers.entity import Entity import home...
true
true
f709e2dc077fbe724912bba68ee39dfd98f80d1e
30,132
py
Python
main.py
AswinR12/Minecraft
aff05fedf918a9500a597e89a26be62277ad717d
[ "MIT" ]
null
null
null
main.py
AswinR12/Minecraft
aff05fedf918a9500a597e89a26be62277ad717d
[ "MIT" ]
null
null
null
main.py
AswinR12/Minecraft
aff05fedf918a9500a597e89a26be62277ad717d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from __future__ import division import sys import math import random import time from collections import deque from pyglet import image from pyglet.gl import * from pyglet.graphics import TextureGroup from pyglet.window import key, mouse TICKS_PER_SEC = 60 # Size of sectors used to ease block...
33.331858
80
0.551374
from __future__ import division import sys import math import random import time from collections import deque from pyglet import image from pyglet.gl import * from pyglet.graphics import TextureGroup from pyglet.window import key, mouse TICKS_PER_SEC = 60 SECTOR_SIZE = 16 WALKING_SPEED = 5 FLYING_SPEED = 15 GR...
true
true
f709e44133af35e725e4b68ac6b7a629db5beee6
2,755
py
Python
gameoflife.py
zvolsky/game-of-live
b890a7a242eb77e40827a491f6dae35db8e76791
[ "MIT" ]
null
null
null
gameoflife.py
zvolsky/game-of-live
b890a7a242eb77e40827a491f6dae35db8e76791
[ "MIT" ]
null
null
null
gameoflife.py
zvolsky/game-of-live
b890a7a242eb77e40827a491f6dae35db8e76791
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys def get_next_one(wint): """ returns next generation as list of rows where each row contain string of 0|1 characters :param wint array of integers 0|1 older generation :retval next_one list of rows next generation """ ne...
28.697917
95
0.561525
import sys def get_next_one(wint): next_one = [] rows = len(wint) cols = len(wint[0]) def fixed_i(i): if 0 <= i < rows: return i return i % rows def fixed_j(j): if 0 <= j < cols: return j return divmod(j, cols)[1] def neigh...
true
true
f709e4c35e93001402d4351c8505981f77b535e5
562
py
Python
senior project/code and resources/setup.py
amiel445566/my-tetris
e738d791b685dbf6356e252450d366c747205087
[ "MIT" ]
null
null
null
senior project/code and resources/setup.py
amiel445566/my-tetris
e738d791b685dbf6356e252450d366c747205087
[ "MIT" ]
null
null
null
senior project/code and resources/setup.py
amiel445566/my-tetris
e738d791b685dbf6356e252450d366c747205087
[ "MIT" ]
null
null
null
import sys from cx_Freeze import setup, Executable # Dependencies are automatically detected, but it might need fine tuning. build_exe_options = {"optimize": 2, "packages": ["dbm"], "include_files": ["image(s)", "font(s)", "db", "README.txt"] } setup( na...
37.466667
100
0.581851
import sys from cx_Freeze import setup, Executable build_exe_options = {"optimize": 2, "packages": ["dbm"], "include_files": ["image(s)", "font(s)", "db", "README.txt"] } setup( name = "Tetris Code", version = "3.6", options = {"build_ex...
true
true
f709e537d90b2efbc045e695c664188d4d468ba0
6,501
py
Python
reprounzip/reprounzip/unpackers/common/packages.py
BinalModi/reprozip
0edec88ab63cb1b724af291579a74a654d0bbe07
[ "BSD-3-Clause" ]
null
null
null
reprounzip/reprounzip/unpackers/common/packages.py
BinalModi/reprozip
0edec88ab63cb1b724af291579a74a654d0bbe07
[ "BSD-3-Clause" ]
null
null
null
reprounzip/reprounzip/unpackers/common/packages.py
BinalModi/reprozip
0edec88ab63cb1b724af291579a74a654d0bbe07
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2014-2017 New York University # This file is part of ReproZip which is released under the Revised BSD License # See file LICENSE for full license details. """Utility functions dealing with package managers. """ from __future__ import division, print_function, unicode_literals import logging import pl...
34.579787
79
0.565913
from __future__ import division, print_function, unicode_literals import logging import platform import subprocess from reprounzip.unpackers.common.misc import UsageError from reprounzip.utils import itervalues logger = logging.getLogger('reprounzip') THIS_DISTRIBUTION = platform.linux_distribution()[0].lowe...
true
true
f709e682d5539283db2e19111debac252c2cc9d9
32,992
py
Python
kubernetes_asyncio/client/models/extensions_v1beta1_pod_security_policy_spec.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/extensions_v1beta1_pod_security_policy_spec.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
kubernetes_asyncio/client/models/extensions_v1beta1_pod_security_policy_spec.py
aK0nshin/kubernetes_asyncio
aef9edcc1f8671a5b1bba9f4684bde890176b19c
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 OpenAPI spec version: v1.14.7 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import six class Extensions...
45.506207
586
0.710839
import pprint import re import six class ExtensionsV1beta1PodSecurityPolicySpec(object): openapi_types = { 'allow_privilege_escalation': 'bool', 'allowed_csi_drivers': 'list[ExtensionsV1beta1AllowedCSIDriver]', 'allowed_capabilities': 'list[str]', 'allowed_flex_volumes': 'l...
true
true
f709e710939fad538b4dab0bbc8c4fbe215db882
34,421
py
Python
python/cuml/feature_extraction/_vectorizers.py
siddheshmhatre/cuml
ed0e58c6b3ebfc17b944cdad7c04cd4af8860736
[ "Apache-2.0" ]
2,743
2018-10-11T17:28:58.000Z
2022-03-31T19:20:50.000Z
python/cuml/feature_extraction/_vectorizers.py
siddheshmhatre/cuml
ed0e58c6b3ebfc17b944cdad7c04cd4af8860736
[ "Apache-2.0" ]
4,280
2018-10-11T22:29:57.000Z
2022-03-31T22:02:44.000Z
python/cuml/feature_extraction/_vectorizers.py
siddheshmhatre/cuml
ed0e58c6b3ebfc17b944cdad7c04cd4af8860736
[ "Apache-2.0" ]
454
2018-10-11T17:40:56.000Z
2022-03-25T17:07:09.000Z
# Copyright (c) 2020-2021, NVIDIA CORPORATION. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
37.051668
79
0.604863
from cudf import Series from cuml.common.exceptions import NotFittedError from cuml.feature_extraction._stop_words import ENGLISH_STOP_WORDS from cuml.common.sparsefuncs import csr_row_normalize_l1, csr_row_normalize_l2 from cuml.common.sparsefuncs import create_csr_matrix_from_count_df from functools im...
true
true
f709e7d57692258edd0459ea50391cace46e9b24
2,825
py
Python
chillow/service/ai/search_tree_pathfinding_ai.py
jonashellmann/informaticup21-team-chillow
f2e519af0a5d9a9368d62556703cfb1066ebb58f
[ "MIT" ]
3
2021-01-17T23:32:07.000Z
2022-01-30T14:49:16.000Z
chillow/service/ai/search_tree_pathfinding_ai.py
jonashellmann/informaticup21-team-chillow
f2e519af0a5d9a9368d62556703cfb1066ebb58f
[ "MIT" ]
2
2021-01-17T13:37:56.000Z
2021-04-14T12:28:49.000Z
chillow/service/ai/search_tree_pathfinding_ai.py
jonashellmann/informaticup21-team-chillow
f2e519af0a5d9a9368d62556703cfb1066ebb58f
[ "MIT" ]
2
2021-04-02T14:53:38.000Z
2021-04-20T11:10:17.000Z
from multiprocessing import Value from random import choice from chillow.service.ai.pathfinding_ai import PathfindingAI from chillow.service.ai.search_tree_ai import SearchTreeAI from chillow.model.action import Action from chillow.model.game import Game from chillow.model.player import Player from chillow.service.gam...
47.881356
117
0.695575
from multiprocessing import Value from random import choice from chillow.service.ai.pathfinding_ai import PathfindingAI from chillow.service.ai.search_tree_ai import SearchTreeAI from chillow.model.action import Action from chillow.model.game import Game from chillow.model.player import Player from chillow.service.gam...
true
true
f709e817f4713e92e5114cefb9a40115888b3a18
16,977
py
Python
kivy/tests/common.py
Galland/kivy
95a6bf279883d706f645e4629c16d5ee1038f0ec
[ "MIT" ]
1
2019-10-04T00:27:02.000Z
2019-10-04T00:27:02.000Z
kivy/tests/common.py
Galland/kivy
95a6bf279883d706f645e4629c16d5ee1038f0ec
[ "MIT" ]
1
2019-10-08T02:06:27.000Z
2019-10-08T02:06:27.000Z
kivy/tests/common.py
Galland/kivy
95a6bf279883d706f645e4629c16d5ee1038f0ec
[ "MIT" ]
null
null
null
''' This is a extended unittest module for Kivy, to make unittests based on graphics with an OpenGL context. The idea is to render a Widget tree, and after 1, 2 or more frames, a screenshot will be made and be compared to the original one. If no screenshot exists for the current test, the very first one will be used. ...
34.646939
79
0.569594
__all__ = ('GraphicUnitTest', 'UnitTestTouch', 'UTMotionEvent', 'async_run') import unittest import logging import pytest import sys import os import threading from kivy.graphics.cgl import cgl_get_backend_name from kivy.input.motionevent import MotionEvent log = logging.getLogger('unittest') _base = object if 'moc...
true
true
f709e8cded7e066c6f95bc28fa79965b97ba66d5
160
py
Python
minecraft_remapper/__init__.py
Nearata/minecraft-remapper
502a26f3f90c926554976b1f2ad0a82b236c7a96
[ "MIT" ]
1
2021-01-24T22:05:51.000Z
2021-01-24T22:05:51.000Z
minecraft_remapper/__init__.py
Nearata/minecraft-remapper
502a26f3f90c926554976b1f2ad0a82b236c7a96
[ "MIT" ]
4
2021-01-24T22:11:24.000Z
2021-08-15T21:16:53.000Z
minecraft_remapper/__init__.py
Nearata/minecraft-remapper
502a26f3f90c926554976b1f2ad0a82b236c7a96
[ "MIT" ]
null
null
null
"""A Minecraft remapper for already deobfuscated forge mod source code.""" __version__ = "1.1.0" from minecraft_remapper.remapper import Remapper as Remapper
26.666667
74
0.7875
__version__ = "1.1.0" from minecraft_remapper.remapper import Remapper as Remapper
true
true
f709e9abdda917983a56be8d0236370b06343eef
1,997
py
Python
bluebottle/payments_vitepay/migrations/0001_initial.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
10
2015-05-28T18:26:40.000Z
2021-09-06T10:07:03.000Z
bluebottle/payments_vitepay/migrations/0001_initial.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
762
2015-01-15T10:00:59.000Z
2022-03-31T15:35:14.000Z
bluebottle/payments_vitepay/migrations/0001_initial.py
terrameijar/bluebottle
b4f5ba9c4f03e678fdd36091b29240307ea69ffd
[ "BSD-3-Clause" ]
9
2015-02-20T13:19:30.000Z
2022-03-08T14:09:17.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-10-13 15:51 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('payments', '0002_auto_20160718_2345'), ...
44.377778
194
0.597897
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('payments', '0002_auto_20160718_2345'), ] operations = [ migrations.CreateModel( n...
true
true
f709eb1b5af037f2a9c13eb283c75382944620af
4,757
py
Python
datamart/joiners/join_feature/feature_factory.py
juancroldan/datamart
9ec3b99f36192f812edd74ad2262bebccc22bc66
[ "MIT" ]
7
2018-10-02T01:32:23.000Z
2020-10-08T00:42:35.000Z
datamart/joiners/join_feature/feature_factory.py
juancroldan/datamart
9ec3b99f36192f812edd74ad2262bebccc22bc66
[ "MIT" ]
47
2018-10-02T05:41:13.000Z
2021-02-02T21:50:31.000Z
datamart/joiners/join_feature/feature_factory.py
juancroldan/datamart
9ec3b99f36192f812edd74ad2262bebccc22bc66
[ "MIT" ]
19
2018-10-01T22:27:20.000Z
2019-02-28T18:59:53.000Z
from datamart.joiners.join_feature.feature_classes import * from functools import reduce import numpy as np class FeatureFactory: subclasses = { (DistributeType.CATEGORICAL, DataType.NUMBER): CategoricalNumberFeature, (DistributeType.CATEGORICAL, DataType.STRING): CategoricalStringFeature, ...
42.473214
114
0.646206
from datamart.joiners.join_feature.feature_classes import * from functools import reduce import numpy as np class FeatureFactory: subclasses = { (DistributeType.CATEGORICAL, DataType.NUMBER): CategoricalNumberFeature, (DistributeType.CATEGORICAL, DataType.STRING): CategoricalStringFeature, ...
true
true
f709ef1c8a4102a6552cd1ecd42a1eb6b329f1f3
2,517
py
Python
nodeeditor/node_editor_widget.py
icnmtrx/econ_helper
76a2a49a17f87acf9b9f4e0142f86e544a9cc52b
[ "MIT" ]
null
null
null
nodeeditor/node_editor_widget.py
icnmtrx/econ_helper
76a2a49a17f87acf9b9f4e0142f86e544a9cc52b
[ "MIT" ]
null
null
null
nodeeditor/node_editor_widget.py
icnmtrx/econ_helper
76a2a49a17f87acf9b9f4e0142f86e544a9cc52b
[ "MIT" ]
null
null
null
import logging import os from PyQt5.QtCore import * from PyQt5.QtWidgets import * from nodeeditor.node_edge import Edge, EDGE_TYPE_BEZIER from nodeeditor.node_graphics_view import QDMGraphicsView from nodeeditor.node_node import Node from nodeeditor.node_scene import Scene, InvalidFile class NodeEditorWidget(QWidge...
27.358696
94
0.657132
import logging import os from PyQt5.QtCore import * from PyQt5.QtWidgets import * from nodeeditor.node_edge import Edge, EDGE_TYPE_BEZIER from nodeeditor.node_graphics_view import QDMGraphicsView from nodeeditor.node_node import Node from nodeeditor.node_scene import Scene, InvalidFile class NodeEditorWidget(QWidge...
true
true
f709f0b169aac9dac69ec255c444a85bce05cb86
1,001
py
Python
test/test_v1alpha1_data_volume_source_pvc.py
gabriel-samfira/client-python
c2e184c3cad6797af35b0160a36ffcbba77284a7
[ "Apache-2.0" ]
null
null
null
test/test_v1alpha1_data_volume_source_pvc.py
gabriel-samfira/client-python
c2e184c3cad6797af35b0160a36ffcbba77284a7
[ "Apache-2.0" ]
null
null
null
test/test_v1alpha1_data_volume_source_pvc.py
gabriel-samfira/client-python
c2e184c3cad6797af35b0160a36ffcbba77284a7
[ "Apache-2.0" ]
1
2020-12-10T03:16:05.000Z
2020-12-10T03:16:05.000Z
# coding: utf-8 """ KubeVirt API This is KubeVirt API an add-on for Kubernetes. OpenAPI spec version: 1.0.0 Contact: kubevirt-dev@googlegroups.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys import unittest i...
22.244444
94
0.726274
from __future__ import absolute_import import os import sys import unittest import kubevirt from kubevirt.rest import ApiException from kubevirt.models.v1alpha1_data_volume_source_pvc import V1alpha1DataVolumeSourcePVC class TestV1alpha1DataVolumeSourcePVC(unittest.TestCase): def setUp(self): pass ...
true
true
f709f3a1db36a7690e2301e6bb78d5b399a49454
3,453
py
Python
foundations/docker/localhost/kind/yugabyte-demo/cluster/build/yugabyte/_vendir/upstream/stable/yugabyte/generate_kubeconfig.py
aegershman/deployments
c2093ea6824fea6ef18198f9420ca36a1f3ec1af
[ "Apache-2.0" ]
2
2020-02-20T05:56:41.000Z
2020-04-26T17:29:51.000Z
foundations/docker/localhost/kind/yugabyte-demo/cluster/build/yugabyte/_vendir/upstream/stable/yugabyte/generate_kubeconfig.py
aegershman/deployments
c2093ea6824fea6ef18198f9420ca36a1f3ec1af
[ "Apache-2.0" ]
39
2019-11-02T19:35:56.000Z
2021-10-14T20:16:38.000Z
foundations/docker/localhost/kind/yugabyte-demo/cluster/build/yugabyte/_vendir/upstream/stable/yugabyte/generate_kubeconfig.py
aegershman/deployments
c2093ea6824fea6ef18198f9420ca36a1f3ec1af
[ "Apache-2.0" ]
1
2020-06-22T23:00:32.000Z
2020-06-22T23:00:32.000Z
#!/usr/bin/python # Copyright (c) YugaByte, Inc. # This script would generate a kubeconfig for the given servie account # by fetching the cluster information and also add the service account # token for the authentication purpose. import argparse from subprocess import check_output import json import base64 import te...
41.60241
92
0.643498
import argparse from subprocess import check_output import json import base64 import tempfile def run_command(command_args, namespace=None, as_json=True): command = ['kubectl'] if namespace: command.extend(['--namespace', namespace]) command.extend(command_args) if as_json: comm...
true
true
f709f44fde235e8c6f38256a50cbfb476ceee8e9
373
py
Python
JDjangoDemo/docs/migrations/0003_auto_20201028_1758.py
JIYANG-PLUS/JDjango
57cbb13b2b4c07f34d546c0c637c22f60c1e692a
[ "MIT" ]
3
2020-12-28T05:09:02.000Z
2021-06-23T10:02:03.000Z
JDjangoDemo/docs/migrations/0003_auto_20201028_1758.py
JIYANG-PLUS/JDjango
57cbb13b2b4c07f34d546c0c637c22f60c1e692a
[ "MIT" ]
null
null
null
JDjangoDemo/docs/migrations/0003_auto_20201028_1758.py
JIYANG-PLUS/JDjango
57cbb13b2b4c07f34d546c0c637c22f60c1e692a
[ "MIT" ]
null
null
null
# Generated by Django 3.0.8 on 2020-10-28 17:58 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('docs', '0002_article_version'), ] operations = [ migrations.AlterModelOptions( name='article', options={'verbose_name': '插件内...
20.722222
76
0.603217
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('docs', '0002_article_version'), ] operations = [ migrations.AlterModelOptions( name='article', options={'verbose_name': '插件内容', 'verbose_name_plural': '插件内容'}, ), ...
true
true
f709f4a438cc8457611aa5475ad0795c5fb0526b
1,333
py
Python
src/adorn/exception/configuration_error.py
pyadorn/adorn
a34a9a20c1a80c7bdbee0fa641c2bd17e20e60e6
[ "Apache-2.0" ]
3
2021-12-11T03:52:57.000Z
2022-03-22T20:42:56.000Z
src/adorn/exception/configuration_error.py
pyadorn/adorn
a34a9a20c1a80c7bdbee0fa641c2bd17e20e60e6
[ "Apache-2.0" ]
12
2021-12-31T19:22:09.000Z
2022-03-21T03:49:13.000Z
src/adorn/exception/configuration_error.py
pyadorn/adorn
a34a9a20c1a80c7bdbee0fa641c2bd17e20e60e6
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Jacob Baumbach # # 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 writin...
35.078947
74
0.711928
class ConfigurationError(Exception): def __init__(self, message: str): super().__init__() self.message = message def __str__(self): return self.message
true
true
f709f56e4962f1057d045039872862b374050ce3
8,637
py
Python
carla/PythonAPI/examples/tutorial4.py
kyuhoJeong11/GrewRL
a514698df8d38df34de0bd1667d99927f0aa3885
[ "MIT" ]
null
null
null
carla/PythonAPI/examples/tutorial4.py
kyuhoJeong11/GrewRL
a514698df8d38df34de0bd1667d99927f0aa3885
[ "MIT" ]
null
null
null
carla/PythonAPI/examples/tutorial4.py
kyuhoJeong11/GrewRL
a514698df8d38df34de0bd1667d99927f0aa3885
[ "MIT" ]
null
null
null
import glob import os import sys import random import time import numpy as np import cv2 import math from collections import deque from keras.applications.xception import Xception from keras.layers import Dense, GlobalAveragePooling2D from keras.optimizers import Adam from keras.models import Model ''' Carla 패키지가 사용하는...
30.956989
171
0.631817
import glob import os import sys import random import time import numpy as np import cv2 import math from collections import deque from keras.applications.xception import Xception from keras.layers import Dense, GlobalAveragePooling2D from keras.optimizers import Adam from keras.models import Model try: sys.path.a...
true
true
f709f6674727313dfa9736c9f5cd0079095048e2
1,907
py
Python
from_cpython/Lib/email/errors.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
from_cpython/Lib/email/errors.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
from_cpython/Lib/email/errors.py
aisk/pyston
ac69cfef0621dbc8901175e84fa2b5cb5781a646
[ "BSD-2-Clause", "Apache-2.0" ]
null
null
null
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """email package exception classes.""" class MessageError(Exception): """Base class for errors in the email package.""" class MessageParseError(MessageError): """Base class for message parsing erro...
31.262295
94
0.745674
class MessageError(Exception): class MessageParseError(MessageError): class HeaderParseError(MessageParseError): class BoundaryError(MessageParseError): # We could make it so that it only inherits one of the base classes, but I'd rather that class CharsetError(MessageError): class Message...
true
true
f709f773e6761ca5effc91050a215dab991ab27e
588
py
Python
graphql/utils/tests/test_quoted_or_list.py
ThanksBoomerang/graphql-core-legacy
6e2fbccdec655ce9122b84d3808c14242c4e6b96
[ "MIT" ]
8
2020-03-23T21:34:02.000Z
2021-11-12T11:27:45.000Z
graphql/utils/tests/test_quoted_or_list.py
ThanksBoomerang/graphql-core-legacy
6e2fbccdec655ce9122b84d3808c14242c4e6b96
[ "MIT" ]
17
2020-03-14T22:22:29.000Z
2022-03-16T19:26:37.000Z
graphql/utils/tests/test_quoted_or_list.py
ThanksBoomerang/graphql-core-legacy
6e2fbccdec655ce9122b84d3808c14242c4e6b96
[ "MIT" ]
17
2020-03-23T12:06:23.000Z
2022-02-13T05:33:32.000Z
from pytest import raises from ..quoted_or_list import quoted_or_list def test_does_not_accept_an_empty_list(): with raises(StopIteration): quoted_or_list([]) def test_returns_single_quoted_item(): assert quoted_or_list(["A"]) == '"A"' def test_returns_two_item_list(): assert quoted_or_list([...
23.52
88
0.646259
from pytest import raises from ..quoted_or_list import quoted_or_list def test_does_not_accept_an_empty_list(): with raises(StopIteration): quoted_or_list([]) def test_returns_single_quoted_item(): assert quoted_or_list(["A"]) == '"A"' def test_returns_two_item_list(): assert quoted_or_list([...
true
true
f709f7c3584cc274e7b71885cfd3023498cacb9b
4,418
py
Python
profiles_api/views.py
MatheusAbdias/proj-rest-api
5401d6c2bc96f9f30f646a7969cdc2a65cb0de3c
[ "MIT" ]
1
2022-02-20T23:16:19.000Z
2022-02-20T23:16:19.000Z
profiles_api/views.py
MatheusAbdias/proj-rest-api
5401d6c2bc96f9f30f646a7969cdc2a65cb0de3c
[ "MIT" ]
null
null
null
profiles_api/views.py
MatheusAbdias/proj-rest-api
5401d6c2bc96f9f30f646a7969cdc2a65cb0de3c
[ "MIT" ]
null
null
null
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework import viewsets from rest_framework.authentication import TokenAuthentication from rest_framework import filters from rest_framework.authtoken.views import ObtainAuthToken from r...
35.918699
80
0.661838
from rest_framework.views import APIView from rest_framework.response import Response from rest_framework import status from rest_framework import viewsets from rest_framework.authentication import TokenAuthentication from rest_framework import filters from rest_framework.authtoken.views import ObtainAuthToken from r...
true
true
f709f855c6208fa8f7d480a10f080584e7ee9b14
2,022
py
Python
tests/gold_tests/shutdown/emergency.test.py
nozomi1773/trafficserver
2ee141137545a84584d8047eee70b171b5254c40
[ "Apache-2.0" ]
null
null
null
tests/gold_tests/shutdown/emergency.test.py
nozomi1773/trafficserver
2ee141137545a84584d8047eee70b171b5254c40
[ "Apache-2.0" ]
null
null
null
tests/gold_tests/shutdown/emergency.test.py
nozomi1773/trafficserver
2ee141137545a84584d8047eee70b171b5254c40
[ "Apache-2.0" ]
null
null
null
''' ''' # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License");...
38.884615
131
0.755193
import os Test.Summary = 'Test TSEmergency API' Test.ContinueOnFail = True ts = Test.MakeATSProcess('ts') Test.testName = 'Emergency Shutdown Test' ts.Disk.records_config.update({ 'proxy.config.exec_thread.autoconfig': 0, 'proxy.config.exec_thread.autoconfig.scale': 1.5, 'proxy.config....
true
true
f709f87c4beb8fa85bcf5d596823ca75307a6393
29,244
py
Python
test/test_fnetout.py
vanderhe/fortnet-python
118237f0ce750852d973b213161fc04623fd7f82
[ "BSD-2-Clause" ]
null
null
null
test/test_fnetout.py
vanderhe/fortnet-python
118237f0ce750852d973b213161fc04623fd7f82
[ "BSD-2-Clause" ]
1
2022-03-11T15:21:56.000Z
2022-03-11T15:33:46.000Z
test/test_fnetout.py
vanderhe/fortnet-python
118237f0ce750852d973b213161fc04623fd7f82
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/env python3 #------------------------------------------------------------------------------# # fortnet-python: Python Tools for the Fortnet Software Package # # Copyright (C) 2021 - 2022 T. W. van der Heide # # ...
45.622465
80
0.610792
import os import pytest import numpy as np from common import compare_fnetout_references REFPATH = os.path.join(os.getcwd(), 'test', 'references', 'Fnetout') def test_predict_atomic(): fname = 'predict_atomic.hdf5' ref = {} ref['mode'] = 'predict' ref['ndatapoints'] = 5 ref['nglobaltarge...
true
true
f709f98cce7a40c942eef0665a243189284ff7ed
5,240
py
Python
bumblebee/buzzes/api/serializers/buzz_serializers.py
sthasam2/bumblebee-backend
22057399f34cdc1edb0ef04e622c97df46532de3
[ "Linux-OpenIB" ]
null
null
null
bumblebee/buzzes/api/serializers/buzz_serializers.py
sthasam2/bumblebee-backend
22057399f34cdc1edb0ef04e622c97df46532de3
[ "Linux-OpenIB" ]
null
null
null
bumblebee/buzzes/api/serializers/buzz_serializers.py
sthasam2/bumblebee-backend
22057399f34cdc1edb0ef04e622c97df46532de3
[ "Linux-OpenIB" ]
null
null
null
from rest_framework import serializers from bumblebee.buzzes.api.serializers.interaction_serializers import ( BuzzInteractionsSerializer, ) from bumblebee.buzzes.models import Buzz, BuzzImage from bumblebee.core.exceptions import UnknownModelFieldsError from .user_serializers import BuzzUserSerializer ##########...
29.111111
103
0.608206
from rest_framework import serializers from bumblebee.buzzes.api.serializers.interaction_serializers import ( BuzzInteractionsSerializer, ) from bumblebee.buzzes.models import Buzz, BuzzImage from bumblebee.core.exceptions import UnknownModelFieldsError from .user_serializers import BuzzUserSerializer "l...
true
true
f709f9ddbd9a5f676f6351489bf105cf4c645a2a
2,382
py
Python
gazoo_device/tests/functional_tests/device_power_test_suite.py
isabella232/gazoo-device
0e1e276d72333e713b47152815708b9c74c45409
[ "Apache-2.0" ]
null
null
null
gazoo_device/tests/functional_tests/device_power_test_suite.py
isabella232/gazoo-device
0e1e276d72333e713b47152815708b9c74c45409
[ "Apache-2.0" ]
1
2021-06-24T19:20:50.000Z
2021-06-24T19:20:50.000Z
gazoo_device/tests/functional_tests/device_power_test_suite.py
isabella232/gazoo-device
0e1e276d72333e713b47152815708b9c74c45409
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36.090909
76
0.695634
from typing import Type from gazoo_device.tests.functional_tests.utils import gdm_test_base import retry class DevicePowerTestSuite(gdm_test_base.GDMTestBase): @classmethod def is_applicable_to(cls, device_type: str, device_class: Type[gdm_test_base.DeviceType], ...
true
true
f709fa3e67ee8095268931a28d7f66ac738f26b7
1,023
py
Python
books/PRML/PRML-master-Python/prml/nn/optimizer/ada_delta.py
iamfaith/DeepLearning
80ce429d0e9e448cf84e7d51129ef4e0077048a2
[ "Apache-2.0" ]
7,581
2018-04-26T04:29:30.000Z
2022-03-31T15:35:39.000Z
books/PRML/PRML-master-Python/prml/nn/optimizer/ada_delta.py
lizhenchen2019/DeepLearning
467c73e2d0435f0a05255e5b5e00454260d01f27
[ "Apache-2.0" ]
8
2019-05-22T02:27:35.000Z
2022-03-03T03:53:05.000Z
books/PRML/PRML-master-Python/prml/nn/optimizer/ada_delta.py
lizhenchen2019/DeepLearning
467c73e2d0435f0a05255e5b5e00454260d01f27
[ "Apache-2.0" ]
2,340
2018-04-26T04:28:11.000Z
2022-03-31T02:28:25.000Z
import numpy as np from prml.nn.optimizer.optimizer import Optimizer class AdaDelta(Optimizer): """ AdaDelta optimizer """ def __init__(self, parameter, rho=0.95, epsilon=1e-8): super().__init__(parameter, None) self.rho = rho self.epsilon = epsilon self.mean_squared_d...
31.96875
98
0.57087
import numpy as np from prml.nn.optimizer.optimizer import Optimizer class AdaDelta(Optimizer): def __init__(self, parameter, rho=0.95, epsilon=1e-8): super().__init__(parameter, None) self.rho = rho self.epsilon = epsilon self.mean_squared_deriv = [] self.mean_squared_upd...
true
true
f709fba769a5a08997b1bd7938d44d6037a9f1df
8,111
py
Python
cloudmersive_barcode_api_client/configuration.py
Cloudmersive/Cloudmersive.APIClient.Python.Barcode
e584de80304ebddbcce99ee6ff42196d46486421
[ "Apache-2.0" ]
1
2018-06-24T04:50:28.000Z
2018-06-24T04:50:28.000Z
cloudmersive_barcode_api_client/configuration.py
Cloudmersive/Cloudmersive.APIClient.Python.Barcode
e584de80304ebddbcce99ee6ff42196d46486421
[ "Apache-2.0" ]
1
2019-02-25T18:23:23.000Z
2019-02-25T18:23:23.000Z
cloudmersive_barcode_api_client/configuration.py
Cloudmersive/Cloudmersive.APIClient.Python.Barcode
e584de80304ebddbcce99ee6ff42196d46486421
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ barcodeapi Barcode APIs let you generate barcode images, and recognize values from images of barcodes. # noqa: E501 OpenAPI spec version: v1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import copy import logg...
32.059289
109
0.604981
from __future__ import absolute_import import copy import logging import multiprocessing import sys import urllib3 import six from six.moves import http_client as httplib class Configuration(object): _default = None def __init__(self): if self._default: for key in self._default.__d...
true
true
f709fd08e353fb40d7b89a80816394ef307e0dcb
2,633
py
Python
bilby_pipe/job_creation/nodes/generation_node.py
Samanwaya1301/tidal-heating-bilby-pipe
b495d4f3ffe3ef61a46ce5b87c826e10b087e2e1
[ "MIT" ]
4
2019-02-28T00:54:28.000Z
2021-08-24T14:52:16.000Z
bilby_pipe/job_creation/nodes/generation_node.py
Samanwaya1301/tidal-heating-bilby-pipe
b495d4f3ffe3ef61a46ce5b87c826e10b087e2e1
[ "MIT" ]
2
2020-10-05T02:11:03.000Z
2021-02-19T06:31:42.000Z
bilby_pipe/job_creation/nodes/generation_node.py
Samanwaya1301/tidal-heating-bilby-pipe
b495d4f3ffe3ef61a46ce5b87c826e10b087e2e1
[ "MIT" ]
3
2020-08-26T09:45:54.000Z
2021-07-07T09:24:52.000Z
from ...utils import DataDump, logger from ..node import Node class GenerationNode(Node): def __init__(self, inputs, trigger_time, idx, dag, parent=None): """ Node for data generation jobs Parameters: ----------- inputs: bilby_pipe.main.MainInput The user-defin...
31.345238
86
0.616787
from ...utils import DataDump, logger from ..node import Node class GenerationNode(Node): def __init__(self, inputs, trigger_time, idx, dag, parent=None): super().__init__(inputs) self.inputs = inputs self.trigger_time = trigger_time self.idx = idx self.dag = dag s...
true
true
f709fdad8e04c0a5e71d2d9204dc5fa6943d9a3d
536
py
Python
append_to_array_with_comp.py
tsuyukimakoto/chore_python_sequence_performance
d984675f7af4d47b256b341f123b07f8827d95ed
[ "MIT" ]
null
null
null
append_to_array_with_comp.py
tsuyukimakoto/chore_python_sequence_performance
d984675f7af4d47b256b341f123b07f8827d95ed
[ "MIT" ]
null
null
null
append_to_array_with_comp.py
tsuyukimakoto/chore_python_sequence_performance
d984675f7af4d47b256b341f123b07f8827d95ed
[ "MIT" ]
null
null
null
from array import array from random import randint import sys @profile def create_data(): return array('i', [randint(1, 10000000) for i in range(100000)]) def proc(): cnt = 0 data = create_data() for i in range(100000): if randint(1, 10000000) in data: cnt += 1 if __name__ == '_...
21.44
81
0.623134
from array import array from random import randint import sys @profile def create_data(): return array('i', [randint(1, 10000000) for i in range(100000)]) def proc(): cnt = 0 data = create_data() for i in range(100000): if randint(1, 10000000) in data: cnt += 1 if __name__ == '_...
true
true
f709fe65c70fa2031de7bd284fbe943cd20a10e6
5,293
py
Python
applied_python/applied_python/lib/python2.7/site-packages/pylint/test/unittest_pyreverse_inspector.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
null
null
null
applied_python/applied_python/lib/python2.7/site-packages/pylint/test/unittest_pyreverse_inspector.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
1
2016-03-22T13:36:30.000Z
2016-03-22T13:36:30.000Z
applied_python/applied_python/lib/python2.7/site-packages/pylint/test/unittest_pyreverse_inspector.py
mith1979/ansible_automation
013dfa67c6d91720b787fadb21de574b6e023a26
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2003-2015 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free Software # Foundation; either version 2 of the Lic...
38.635036
87
0.643869
import os import unittest import astroid from astroid import nodes from astroid import bases from astroid import manager from astroid import test_utils from pylint.pyreverse import inspector from unittest_pyreverse_writer import get_project MANAGER = manager.AstroidManager() def astroid_wrapper(func,...
true
true
f709ff1bce098437679e5a803075ed18ece003f9
31,264
py
Python
Source/Python/UPT/Library/String.py
Mokwang/basetools
c190b1ccb9f388bec7d19a7cc281aeabb94b8d75
[ "BSD-2-Clause" ]
8
2015-05-04T22:34:40.000Z
2021-07-07T06:10:40.000Z
Source/Python/UPT/Library/String.py
Mokwang/basetools
c190b1ccb9f388bec7d19a7cc281aeabb94b8d75
[ "BSD-2-Clause" ]
null
null
null
Source/Python/UPT/Library/String.py
Mokwang/basetools
c190b1ccb9f388bec7d19a7cc281aeabb94b8d75
[ "BSD-2-Clause" ]
8
2015-06-29T13:37:05.000Z
2021-03-22T16:05:16.000Z
## @file # This file is used to define common string related functions used in parsing # process # # Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which a...
32.364389
121
0.576766
import re import os.path from string import strip import Logger.Log as Logger import Library.DataType as DataType from Logger.ToolError import FORMAT_INVALID from Logger.ToolError import PARSER_ERROR from Logger import StringTable as ST gMACRO_PATTERN = re.compile("\$\(([_A-Z][_A-Z0-9]*)\)", re.UNIC...
true
true
f709ff30745f048a9069257f0e215166f25c956b
1,509
py
Python
msdsl/assignment.py
sgherbst/msdsl
e38d5ecdb88b3574bda62f22a4f91ce3e4173d12
[ "MIT" ]
15
2019-05-14T10:12:23.000Z
2022-03-29T15:29:52.000Z
msdsl/assignment.py
sgherbst/msdsl
e38d5ecdb88b3574bda62f22a4f91ce3e4173d12
[ "MIT" ]
19
2020-01-22T21:44:33.000Z
2021-06-05T02:10:41.000Z
msdsl/assignment.py
sgherbst/msdsl
e38d5ecdb88b3574bda62f22a4f91ce3e4173d12
[ "MIT" ]
5
2019-10-21T09:53:17.000Z
2021-08-10T17:32:20.000Z
from msdsl.expr.expr import ModelExpr from msdsl.expr.signals import Signal, DigitalSignal, AnalogSignal from msdsl.expr.format import RealFormat from msdsl.expr.table import Table class Assignment: def __init__(self, signal: Signal, expr: ModelExpr, check_format=True): self.signal = signal ...
33.533333
83
0.636183
from msdsl.expr.expr import ModelExpr from msdsl.expr.signals import Signal, DigitalSignal, AnalogSignal from msdsl.expr.format import RealFormat from msdsl.expr.table import Table class Assignment: def __init__(self, signal: Signal, expr: ModelExpr, check_format=True): self.signal = signal ...
true
true
f709ffc9a9096e68c6eafa3940ad5daafbe4f454
15,511
py
Python
deerlab/utils/utils.py
laenan8466/DeerLab
94f1942da1b506e0661a8e7e4901bb5ba6d69143
[ "MIT" ]
null
null
null
deerlab/utils/utils.py
laenan8466/DeerLab
94f1942da1b506e0661a8e7e4901bb5ba6d69143
[ "MIT" ]
null
null
null
deerlab/utils/utils.py
laenan8466/DeerLab
94f1942da1b506e0661a8e7e4901bb5ba6d69143
[ "MIT" ]
null
null
null
import warnings import numpy as np import cmath as math import scipy as scp import scipy.optimize as opt from types import FunctionType def parse_multidatasets(V,K,weights,precondition=False): #=============================================================================== # Identify if the sig...
33.143162
197
0.479402
import warnings import numpy as np import cmath as math import scipy as scp import scipy.optimize as opt from types import FunctionType def parse_multidatasets(V,K,weights,precondition=False): if type(V) is not list: if V.size == np.atleast_1d(weights).size: ...
true
true
f709ffd40dd8a38cba8ea8ba1325e17e8c739d17
11,448
py
Python
Lib/test/support/socket_helper.py
chexca/cpython
cfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa
[ "CNRI-Python-GPL-Compatible" ]
1,318
2019-07-11T10:34:39.000Z
2022-03-29T15:05:19.000Z
Lib/test/support/socket_helper.py
chexca/cpython
cfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa
[ "CNRI-Python-GPL-Compatible" ]
387
2020-12-15T14:54:04.000Z
2022-03-31T07:00:21.000Z
Lib/test/support/socket_helper.py
chexca/cpython
cfc6ce4d40f2f01314b7e283fb972a7bb3ed3faa
[ "CNRI-Python-GPL-Compatible" ]
66
2019-11-11T15:33:12.000Z
2022-03-01T07:55:55.000Z
import contextlib import errno import socket import unittest import sys from .. import support HOST = "localhost" HOSTv4 = "127.0.0.1" HOSTv6 = "::1" def find_unused_port(family=socket.AF_INET, socktype=socket.SOCK_STREAM): """Returns an unused port that should be suitable for binding. This is achieved by...
42.4
89
0.65898
import contextlib import errno import socket import unittest import sys from .. import support HOST = "localhost" HOSTv4 = "127.0.0.1" HOSTv6 = "::1" def find_unused_port(family=socket.AF_INET, socktype=socket.SOCK_STREAM): with socket.socket(family, socktype) as tempsock: port = bind_port(tempsock) ...
true
true
f70a000037d4adeeded177205c3e2f23a6c16f71
421
py
Python
jassen/django/project/blog/migrations/0003_auto_20180507_0734.py
cabilangan112/intern-drf-blog
b2d6c7a4af1316b2c7ce38547bd9df99b4f3e8b9
[ "MIT" ]
null
null
null
jassen/django/project/blog/migrations/0003_auto_20180507_0734.py
cabilangan112/intern-drf-blog
b2d6c7a4af1316b2c7ce38547bd9df99b4f3e8b9
[ "MIT" ]
null
null
null
jassen/django/project/blog/migrations/0003_auto_20180507_0734.py
cabilangan112/intern-drf-blog
b2d6c7a4af1316b2c7ce38547bd9df99b4f3e8b9
[ "MIT" ]
null
null
null
# Generated by Django 2.0.4 on 2018-05-07 07:34 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0002_auto_20180507_0653'), ] operations = [ migrations.AlterField( model_name='post', name='banner_photo', ...
22.157895
84
0.612827
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('blog', '0002_auto_20180507_0653'), ] operations = [ migrations.AlterField( model_name='post', name='banner_photo', field=models.ImageField(upload_to='s...
true
true
f70a00bd04dc577a9c2437547c31ffdaa0260ef1
5,394
py
Python
ibmsecurity/isam/aac/server_connections/ws.py
sandermey/ibmsecurity
92ba7828260e96a6a323f4ac3830bfa43ee8dd7e
[ "Apache-2.0" ]
null
null
null
ibmsecurity/isam/aac/server_connections/ws.py
sandermey/ibmsecurity
92ba7828260e96a6a323f4ac3830bfa43ee8dd7e
[ "Apache-2.0" ]
null
null
null
ibmsecurity/isam/aac/server_connections/ws.py
sandermey/ibmsecurity
92ba7828260e96a6a323f4ac3830bfa43ee8dd7e
[ "Apache-2.0" ]
null
null
null
import logging import ibmsecurity.utilities.tools logger = logging.getLogger(__name__) def get_all(isamAppliance, check_mode=False, force=False): """ Retrieving a list of all Web Service connections """ return isamAppliance.invoke_get("Retrieving a list of all Web Service connections", ...
33.092025
143
0.643493
import logging import ibmsecurity.utilities.tools logger = logging.getLogger(__name__) def get_all(isamAppliance, check_mode=False, force=False): return isamAppliance.invoke_get("Retrieving a list of all Web Service connections", "/mga/server_connections/ws/v1") def get(isam...
true
true
f70a02f2e0f7ececb1a48f2b6248fe11c810141e
3,714
py
Python
imix/data/infocomp/ocrvqa_infocpler.py
linxi1158/iMIX
af87a17275f02c94932bb2e29f132a84db812002
[ "Apache-2.0" ]
23
2021-06-26T08:45:19.000Z
2022-03-02T02:13:33.000Z
imix/data/infocomp/ocrvqa_infocpler.py
XChuanLee/iMIX
99898de97ef8b45462ca1d6bf2542e423a73d769
[ "Apache-2.0" ]
null
null
null
imix/data/infocomp/ocrvqa_infocpler.py
XChuanLee/iMIX
99898de97ef8b45462ca1d6bf2542e423a73d769
[ "Apache-2.0" ]
9
2021-06-10T02:36:20.000Z
2021-11-09T02:18:16.000Z
import torch from ..utils.stream import ItemFeature from .base_infocpler import BaseInfoCpler class OCRVQAInfoCpler(BaseInfoCpler): def __init__(self, cfg): super().__init__(cfg) def complete_info(self, item_feature: ItemFeature): tokens = self.tokenizer.tokenize(item_feature.question.strip...
53.826087
117
0.716478
import torch from ..utils.stream import ItemFeature from .base_infocpler import BaseInfoCpler class OCRVQAInfoCpler(BaseInfoCpler): def __init__(self, cfg): super().__init__(cfg) def complete_info(self, item_feature: ItemFeature): tokens = self.tokenizer.tokenize(item_feature.question.strip...
true
true
f70a030b4c2a7491dbc7609927869cf77e179697
445
py
Python
scripts/item/consume_2434762.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
54
2019-04-16T23:24:48.000Z
2021-12-18T11:41:50.000Z
scripts/item/consume_2434762.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
3
2019-05-19T15:19:41.000Z
2020-04-27T16:29:16.000Z
scripts/item/consume_2434762.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
49
2020-11-25T23:29:16.000Z
2022-03-26T16:20:24.000Z
# Mini Black Heaven Mount Coupon | (2434762) if sm.getSkillByItem() == 0:# Check whether item has an vehicleID stored, 0 if false. sm.chat("An Error occurred whilst trying to find the mount.") elif sm.hasSkill(sm.getSkillByItem()): sm.chat("You already have the 'Mini Black Heaven' mount.") else: sm.consu...
40.454545
86
0.707865
if sm.getSkillByItem() == 0: sm.chat("An Error occurred whilst trying to find the mount.") elif sm.hasSkill(sm.getSkillByItem()): sm.chat("You already have the 'Mini Black Heaven' mount.") else: sm.consumeItem() sm.giveSkill(sm.getSkillByItem()) sm.chat("Successfully added the 'Mini Black Heaven' m...
true
true
f70a03d30736dd708147341c7dadfe0b222da100
618
py
Python
xgboost_ames_housing/test/conftest.py
qq2016/kubeflow_learning
930706686108f997aab42ccf2fe455dcf09a4afc
[ "Apache-2.0" ]
1,165
2018-03-01T01:47:14.000Z
2022-03-31T08:35:00.000Z
xgboost_ames_housing/test/conftest.py
arki1/examples
c93b792d67c8c52bc91d4ccf5fbaead4e2324331
[ "Apache-2.0" ]
929
2018-02-04T18:20:16.000Z
2022-03-31T18:20:43.000Z
xgboost_ames_housing/test/conftest.py
arki1/examples
c93b792d67c8c52bc91d4ccf5fbaead4e2324331
[ "Apache-2.0" ]
687
2018-02-01T21:35:30.000Z
2022-03-29T07:47:47.000Z
import pytest def pytest_addoption(parser): parser.addoption( "--master", action="store", default="", help="IP address of GKE master") parser.addoption( "--namespace", action="store", default="", help="namespace of server") parser.addoption( "--service", action="store", default="", help...
24.72
78
0.697411
import pytest def pytest_addoption(parser): parser.addoption( "--master", action="store", default="", help="IP address of GKE master") parser.addoption( "--namespace", action="store", default="", help="namespace of server") parser.addoption( "--service", action="store", default="", help...
true
true
f70a051a93048684b0e2b78eec14871d90d388e0
13,037
py
Python
lte/gateway/python/integ_tests/s1aptests/test_attach_service_with_multi_pdns_and_bearers_mt_data.py
saurabhsoni88/magma
4236c9d8edb7bd203707ff7e861b1f7c12fb84c7
[ "BSD-3-Clause" ]
1
2021-08-04T16:40:05.000Z
2021-08-04T16:40:05.000Z
lte/gateway/python/integ_tests/s1aptests/test_attach_service_with_multi_pdns_and_bearers_mt_data.py
saurabhsoni88/magma
4236c9d8edb7bd203707ff7e861b1f7c12fb84c7
[ "BSD-3-Clause" ]
112
2020-09-03T06:41:43.000Z
2022-03-31T12:07:08.000Z
lte/gateway/python/integ_tests/s1aptests/test_attach_service_with_multi_pdns_and_bearers_mt_data.py
kkahrs/magma
73e666627dc28e0c492feab7321bb7d6dd433b09
[ "BSD-3-Clause" ]
1
2021-05-26T03:41:46.000Z
2021-05-26T03:41:46.000Z
""" Copyright 2020 The Magma Authors. This source code is licensed under the BSD-style license found in the LICENSE file in the root directory of this source tree. Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES O...
34.217848
79
0.571527
import unittest import time import gpp_types import s1ap_types import s1ap_wrapper from integ_tests.s1aptests.s1ap_utils import SessionManagerUtil import ipaddress from lte.protos.policydb_pb2 import FlowMatch class TestAttachServiceWithMultiPdnsAndBearersMtData(unittest.TestCase): def setUp(self): self...
true
true
f70a05c6a865eba6a06188b0d8d211a463686254
420
py
Python
xonsh/parser.py
caputomarcos/xonsh
9ca29d8f2aad9f026af23b83fb7263d0fb702b1a
[ "BSD-2-Clause-FreeBSD" ]
7,986
2015-11-07T11:59:21.000Z
2022-03-27T17:20:49.000Z
xonsh/parser.py
caputomarcos/xonsh
9ca29d8f2aad9f026af23b83fb7263d0fb702b1a
[ "BSD-2-Clause-FreeBSD" ]
161
2016-05-09T09:53:48.000Z
2022-02-22T04:18:59.000Z
xonsh/parser.py
caputomarcos/xonsh
9ca29d8f2aad9f026af23b83fb7263d0fb702b1a
[ "BSD-2-Clause-FreeBSD" ]
539
2016-04-05T05:39:58.000Z
2022-03-23T20:47:52.000Z
# -*- coding: utf-8 -*- """Implements the xonsh parser.""" from xonsh.lazyasd import lazyobject from xonsh.platform import PYTHON_VERSION_INFO @lazyobject def Parser(): if PYTHON_VERSION_INFO > (3, 6): from xonsh.parsers.v36 import Parser as p elif PYTHON_VERSION_INFO > (3, 5): from xonsh.pars...
26.25
49
0.685714
from xonsh.lazyasd import lazyobject from xonsh.platform import PYTHON_VERSION_INFO @lazyobject def Parser(): if PYTHON_VERSION_INFO > (3, 6): from xonsh.parsers.v36 import Parser as p elif PYTHON_VERSION_INFO > (3, 5): from xonsh.parsers.v35 import Parser as p else: from xonsh.pa...
true
true
f70a066635c0d20ddf6993ebb8b958bc79edcc42
619
py
Python
01-Lists_as_stacks_and_queues/balanced_parentheses.py
nmoskova/Python-advanced
007f496e868aa151e39d79446b055e76ffb2db95
[ "MIT" ]
null
null
null
01-Lists_as_stacks_and_queues/balanced_parentheses.py
nmoskova/Python-advanced
007f496e868aa151e39d79446b055e76ffb2db95
[ "MIT" ]
null
null
null
01-Lists_as_stacks_and_queues/balanced_parentheses.py
nmoskova/Python-advanced
007f496e868aa151e39d79446b055e76ffb2db95
[ "MIT" ]
null
null
null
parentheses = input() stack_opening_brackets = [] pairs = { '(': ')', '{': '}', '[': ']' } balanced = True for el in parentheses: if el in "({[": stack_opening_brackets.append(el) else: if len(stack_opening_brackets) > 0: opening_bracket = stack_opening_brackets.pop() ...
19.34375
58
0.537964
parentheses = input() stack_opening_brackets = [] pairs = { '(': ')', '{': '}', '[': ']' } balanced = True for el in parentheses: if el in "({[": stack_opening_brackets.append(el) else: if len(stack_opening_brackets) > 0: opening_bracket = stack_opening_brackets.pop() ...
true
true
f70a06c82a572505b28b82a34b5eb08e9de1b593
1,121
py
Python
VOTA_Control/VOTAScopeHW/daq_do/daq_do_hw.py
fullerene12/VOTA
3a5cfc1e210ac7ea274537a8d189b54660416599
[ "MIT" ]
null
null
null
VOTA_Control/VOTAScopeHW/daq_do/daq_do_hw.py
fullerene12/VOTA
3a5cfc1e210ac7ea274537a8d189b54660416599
[ "MIT" ]
null
null
null
VOTA_Control/VOTAScopeHW/daq_do/daq_do_hw.py
fullerene12/VOTA
3a5cfc1e210ac7ea274537a8d189b54660416599
[ "MIT" ]
1
2021-08-01T22:39:18.000Z
2021-08-01T22:39:18.000Z
''' Created on Aug 9, 2017 @author: Hao Wu ''' from ScopeFoundry import HardwareComponent from .daq_do_dev import DAQSimpleDOTask from PyDAQmx import * import numpy as np import time class DAQdoHW(HardwareComponent): ''' Hardware Component Class for receiving AI input for breathing, licking etc ''' ...
23.354167
78
0.613738
from ScopeFoundry import HardwareComponent from .daq_do_dev import DAQSimpleDOTask from PyDAQmx import * import numpy as np import time class DAQdoHW(HardwareComponent): name='daq_do' def setup(self,channels='Dev2/port0/line2'): self.settings.New(name='channels',initial=channels,dtype=str,ro=Fal...
true
true
f70a06d2005dcef3d0954fa546eda9fa99fac2cb
4,394
py
Python
tests/test_malquery.py
kra-ts/falconpy
c7c4ed93cb3b56cdfd86757f573fde57e4ccf857
[ "Unlicense" ]
null
null
null
tests/test_malquery.py
kra-ts/falconpy
c7c4ed93cb3b56cdfd86757f573fde57e4ccf857
[ "Unlicense" ]
null
null
null
tests/test_malquery.py
kra-ts/falconpy
c7c4ed93cb3b56cdfd86757f573fde57e4ccf857
[ "Unlicense" ]
null
null
null
# test_malquery.py # This class tests the malquery service class import os import sys import pytest # Authentication via test_authorization.py from tests import test_authorization as Authorization # Import our sibling src folder into the path sys.path.append(os.path.abspath('src')) # Classes to test - manually imported...
48.285714
94
0.382795
import os import sys import pytest from tests import test_authorization as Authorization sys.path.append(os.path.abspath('src')) from falconpy import MalQuery auth = Authorization.TestAuthorization() config = auth.getConfigObject() falcon = MalQuery(auth_object=config) AllowedResponses = [200, 400, 404, 429] ...
true
true
f70a08c0ccb36b65a873e4524fb5358bf0678621
2,908
py
Python
results/8112a5333cb1bb472ee14fa5342f6422/pyfile.py
CatrionaMarr/OnlineMCMCTest
92899d082c1bdfc2d61128ced453ac59812ae03a
[ "MIT" ]
null
null
null
results/8112a5333cb1bb472ee14fa5342f6422/pyfile.py
CatrionaMarr/OnlineMCMCTest
92899d082c1bdfc2d61128ced453ac59812ae03a
[ "MIT" ]
null
null
null
results/8112a5333cb1bb472ee14fa5342f6422/pyfile.py
CatrionaMarr/OnlineMCMCTest
92899d082c1bdfc2d61128ced453ac59812ae03a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # import required packages import emcee import numpy as np from numpy import exp, log # import model function from separate file from mymodel import mymodel # import post-processing function from theonlinemcmc package from theonlinemcmc import * # initialise error code value errval = 0 # defi...
21.540741
128
0.670564
import emcee import numpy as np from numpy import exp, log from mymodel import mymodel from theonlinemcmc import * errval = 0 def lnprob(theta, x, sigma_gauss, data): lp = lnprior(theta) if not np.isfinite(lp): return -np.inf return lp + lnlike(theta, x, sigma_gauss, data) def lnprior(theta): ...
true
true
f70a0908b0719bf6610dc731089facdb963866e2
597
py
Python
scoreboard.py
MdGhulamAzadAnsari/Turtle-Crossing-Game
24c45e048c3ab994638a3b77f904c602070eda87
[ "MIT" ]
1
2021-12-17T15:29:59.000Z
2021-12-17T15:29:59.000Z
scoreboard.py
MdGhulamAzadAnsari/Turtle-Crossing-Game
24c45e048c3ab994638a3b77f904c602070eda87
[ "MIT" ]
null
null
null
scoreboard.py
MdGhulamAzadAnsari/Turtle-Crossing-Game
24c45e048c3ab994638a3b77f904c602070eda87
[ "MIT" ]
null
null
null
from turtle import Turtle FONT = ("Courier", 20, "normal") class Scoreboard(Turtle): def __init__(self): super().__init__() self.hideturtle() self.penup() self.level = 1 self.goto(x=-230, y=260) self.update_scoreboard() def update_scoreboard(self): sel...
22.961538
69
0.586265
from turtle import Turtle FONT = ("Courier", 20, "normal") class Scoreboard(Turtle): def __init__(self): super().__init__() self.hideturtle() self.penup() self.level = 1 self.goto(x=-230, y=260) self.update_scoreboard() def update_scoreboard(self): sel...
true
true
f70a09258b593b19b6aa36de6f5f883ef6e7bdbe
529
py
Python
zSPA/zSPA/spa/views.py
hawwestin/MSR.DjangoByExample
b1649ccb92e9d557c09f27c15fc779de64282fcb
[ "MIT" ]
1
2021-02-08T20:29:06.000Z
2021-02-08T20:29:06.000Z
zSPA/zSPA/spa/views.py
hawwestin/MSR.DjangoByExample
b1649ccb92e9d557c09f27c15fc779de64282fcb
[ "MIT" ]
13
2021-06-09T17:28:23.000Z
2022-03-12T00:54:20.000Z
zSPA/zSPA/spa/views.py
hawwestin/MSR.DjangoByExample
b1649ccb92e9d557c09f27c15fc779de64282fcb
[ "MIT" ]
null
null
null
from django.shortcuts import render from decouple import config from .models import Images # Create your views here. def index(request, **kwargs): """ Render single page application and provide context data. :param request: :param kwargs: :return: """ context = { 'images': Images...
23
60
0.654064
from django.shortcuts import render from decouple import config from .models import Images def index(request, **kwargs): context = { 'images': Images.objects.filter(is_active=True), 'googleForm': config('googleForm', default=''), 'googleMaps': config('googleMaps', default=''), } ...
true
true
f70a097f52bce624bb2820b41fa155ec232643eb
2,720
py
Python
var/spack/repos/builtin/packages/sparskit/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
11
2015-10-04T02:17:46.000Z
2018-02-07T18:23:00.000Z
var/spack/repos/builtin/packages/sparskit/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
22
2017-08-01T22:45:10.000Z
2022-03-10T07:46:31.000Z
var/spack/repos/builtin/packages/sparskit/package.py
player1537-forks/spack
822b7632222ec5a91dc7b7cda5fc0e08715bd47c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
4
2016-06-10T17:57:39.000Z
2018-09-11T04:59:38.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) import os from spack import * class Sparskit(MakefilePackage): """SPARSKIT: A basic tool-kit for sparse matrix comp...
34.871795
103
0.609926
import os from spack import * class Sparskit(MakefilePackage): homepage = "https://www-users.cse.umn.edu/~saad/software/SPARSKIT/" version('develop', sha256='ecdd0a9968d6b45153a328710a42fe87600f0bba0e3c53896090b8ae1c113b7a', url='http://www-users.cs.umn.edu/~saad/software/SPARSKIT/SPARSKIT...
true
true
f70a0a2cf88801ad20816738947597123b97a106
3,932
py
Python
pygments/lexers/verification.py
KMilhan/pygments
5120e9943d137f7aa1d33499b79d5ebd5c9f775d
[ "BSD-2-Clause" ]
1,198
2015-01-02T12:08:49.000Z
2021-10-07T02:46:59.000Z
pygments/lexers/verification.py
KMilhan/pygments
5120e9943d137f7aa1d33499b79d5ebd5c9f775d
[ "BSD-2-Clause" ]
249
2015-01-22T13:31:12.000Z
2021-05-01T08:01:22.000Z
pygments/lexers/verification.py
KMilhan/pygments
5120e9943d137f7aa1d33499b79d5ebd5c9f775d
[ "BSD-2-Clause" ]
118
2015-01-16T19:13:15.000Z
2021-07-21T15:09:15.000Z
# -*- coding: utf-8 -*- """ pygments.lexers.verification ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for Intermediate Verification Languages (IVLs). :copyright: Copyright 2006-2019 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, include...
34.191304
92
0.444049
from pygments.lexer import RegexLexer, include, words from pygments.token import Comment, Operator, Keyword, Name, Number, \ Punctuation, Text, Generic __all__ = ['BoogieLexer', 'SilverLexer'] class BoogieLexer(RegexLexer): name = 'Boogie' aliases = ['boogie'] filenames = ['*.bpl'] tokens = { ...
true
true
f70a0b08e0b1f2114d4fef8c6ff7995adeceb92d
1,319
py
Python
DownloadSECFilingsExample.py
sdincer11/DownloadSECFilings
be7738bf9062d3e5c28aa3acb8209d868d846953
[ "Apache-2.0" ]
null
null
null
DownloadSECFilingsExample.py
sdincer11/DownloadSECFilings
be7738bf9062d3e5c28aa3acb8209d868d846953
[ "Apache-2.0" ]
null
null
null
DownloadSECFilingsExample.py
sdincer11/DownloadSECFilings
be7738bf9062d3e5c28aa3acb8209d868d846953
[ "Apache-2.0" ]
null
null
null
from DownloadSECFilings import * # SEC EDGAR system saves all the URL links for each filing under quarterly folders. These files storing # the URL information are called "master" files. # 1) You need to call for the "createMasterFile" function if you want to keep the master file updated. # createMasterFile generates ...
69.421053
115
0.738438
from DownloadSECFilings import * createMasterFile('C:/path to your folder where you want to download the filings to', 2000, 2001) downloadSECFilings('C:/path to your folder where you want to download the filings to', formTypesList=['10-K'], dateStart=20000101, ...
true
true
f70a0bca3d6810cc9945ef26f760662ef36c5232
339
py
Python
happy_kids.py
anudeep586/Codechef_hackerrank_codeforces1
39a536d6ad6d670e0bce2ba8657cf5715b0037e0
[ "0BSD" ]
null
null
null
happy_kids.py
anudeep586/Codechef_hackerrank_codeforces1
39a536d6ad6d670e0bce2ba8657cf5715b0037e0
[ "0BSD" ]
null
null
null
happy_kids.py
anudeep586/Codechef_hackerrank_codeforces1
39a536d6ad6d670e0bce2ba8657cf5715b0037e0
[ "0BSD" ]
null
null
null
try: tests=int(input()) z=[] for _ in range(tests): n,x=[int(xi) for xi in input().split(" ")] arr=list(map(int,input().rstrip().split())) m=max(arr)-min(arr) if m>x: z.append("NO") else: z.append("YES") for x in z: prin...
22.6
52
0.439528
try: tests=int(input()) z=[] for _ in range(tests): n,x=[int(xi) for xi in input().split(" ")] arr=list(map(int,input().rstrip().split())) m=max(arr)-min(arr) if m>x: z.append("NO") else: z.append("YES") for x in z: prin...
true
true
f70a0bd231c19af2ab9ae0085efc1a97b5a73b9f
100
py
Python
object_oriented_design/deck_of_cards/suite.py
bpatel28/practice_python
358c3ce1ca59d80711df07e6509af14e9c784f60
[ "MIT" ]
1
2021-10-13T07:33:25.000Z
2021-10-13T07:33:25.000Z
object_oriented_design/deck_of_cards/suite.py
bpatel28/practice_python
358c3ce1ca59d80711df07e6509af14e9c784f60
[ "MIT" ]
null
null
null
object_oriented_design/deck_of_cards/suite.py
bpatel28/practice_python
358c3ce1ca59d80711df07e6509af14e9c784f60
[ "MIT" ]
null
null
null
from enum import Enum class Suite(Enum): Diamond = 1 Heart = 2 Club = 3 Spade = 4
11.111111
21
0.57
from enum import Enum class Suite(Enum): Diamond = 1 Heart = 2 Club = 3 Spade = 4
true
true
f70a0c6d4c741fe95e6abbe3c262e8e24fbf85c3
1,902
py
Python
quapy/method/non_aggregative.py
valgur/QuaPy
6b1ba4886a1d64b086829306cbba689cdcfd60e8
[ "BSD-3-Clause" ]
null
null
null
quapy/method/non_aggregative.py
valgur/QuaPy
6b1ba4886a1d64b086829306cbba689cdcfd60e8
[ "BSD-3-Clause" ]
null
null
null
quapy/method/non_aggregative.py
valgur/QuaPy
6b1ba4886a1d64b086829306cbba689cdcfd60e8
[ "BSD-3-Clause" ]
null
null
null
from quapy.data import LabelledCollection from .base import BaseQuantifier class MaximumLikelihoodPrevalenceEstimation(BaseQuantifier): """ The `Maximum Likelihood Prevalence Estimation` (MLPE) method is a lazy method that assumes there is no prior probability shift between training and test instances (pu...
30.190476
116
0.655626
from quapy.data import LabelledCollection from .base import BaseQuantifier class MaximumLikelihoodPrevalenceEstimation(BaseQuantifier): def __init__(self): self._classes_ = None def fit(self, data: LabelledCollection): self._classes_ = data.classes_ self.estimated_prevalence = data.p...
true
true
f70a0cb3b2ed71901741e067150e72927820d222
31,386
py
Python
testslide/strict_mock.py
deathowl/TestSlide
22958af9d487caa9bbc309405106591a48716ad5
[ "MIT" ]
48
2021-01-06T15:11:09.000Z
2022-03-09T22:52:25.000Z
testslide/strict_mock.py
deathowl/TestSlide
22958af9d487caa9bbc309405106591a48716ad5
[ "MIT" ]
63
2021-01-06T15:04:49.000Z
2022-03-30T22:12:24.000Z
testslide/strict_mock.py
deathowl/TestSlide
22958af9d487caa9bbc309405106591a48716ad5
[ "MIT" ]
33
2021-03-03T19:55:14.000Z
2022-03-29T21:49:30.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import copy import dis import inspect import os.path from types import FrameType from typing import ( TYPE_CHECKING, Any, Callable,...
37.05549
104
0.567419
import copy import dis import inspect import os.path from types import FrameType from typing import ( TYPE_CHECKING, Any, Callable, Dict, List, Optional, Type, Union, get_type_hints, ) import testslide.lib import testslide.mock_callable if TYPE_CHECKING: from testslide...
true
true
f70a0ce72f008baa85734794ad2293305ba995a2
3,653
py
Python
mmhid/datasets/builder.py
zjutcv/mmhid
faeaf4fb5c634037c6e482f63ef73e7f2144c7b5
[ "Apache-2.0" ]
1
2021-11-26T07:41:39.000Z
2021-11-26T07:41:39.000Z
mmhid/datasets/builder.py
zjutcv/mmhid
faeaf4fb5c634037c6e482f63ef73e7f2144c7b5
[ "Apache-2.0" ]
null
null
null
mmhid/datasets/builder.py
zjutcv/mmhid
faeaf4fb5c634037c6e482f63ef73e7f2144c7b5
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import copy import platform import random from functools import partial import numpy as np from mmcv.parallel import collate from mmcv.runner import get_dist_info from mmcv.utils import Registry, build_from_cfg from torch.utils.data import DataLoader from .samplers impo...
31.491379
79
0.662743
import copy import platform import random from functools import partial import numpy as np from mmcv.parallel import collate from mmcv.runner import get_dist_info from mmcv.utils import Registry, build_from_cfg from torch.utils.data import DataLoader from .samplers import DistributedGroupSampler, DistributedSampler,...
true
true
f70a0d2a2029fd539f60c8d2b5e2c5f1548616f4
9,653
py
Python
bases_2021_1S/Grupo 01/Parser/ui/PantallaPrincipal.py
dadu0699/tytus
e1920f6932c840859e3e79eb8756a1d3da88bd77
[ "MIT" ]
35
2020-12-07T03:11:43.000Z
2021-04-15T17:38:16.000Z
bases_2021_1S/Grupo 01/Parser/ui/PantallaPrincipal.py
dadu0699/tytus
e1920f6932c840859e3e79eb8756a1d3da88bd77
[ "MIT" ]
47
2020-12-09T01:29:09.000Z
2021-01-13T05:37:50.000Z
bases_2021_1S/Grupo 01/Parser/ui/PantallaPrincipal.py
dadu0699/tytus
e1920f6932c840859e3e79eb8756a1d3da88bd77
[ "MIT" ]
556
2020-12-07T03:13:31.000Z
2021-06-17T17:41:10.000Z
from sys import path from os.path import dirname as dir import webbrowser import os path.append(dir(path[0])) from tkinter import ttk import tkinter as tk from tkinter import * from ui.Pantalla_TS import * from ui.Pantalla_AST import * from ui.Pantalla_Error import * import tkinter.messagebox from analizer import inter...
36.984674
87
0.530716
from sys import path from os.path import dirname as dir import webbrowser import os path.append(dir(path[0])) from tkinter import ttk import tkinter as tk from tkinter import * from ui.Pantalla_TS import * from ui.Pantalla_AST import * from ui.Pantalla_Error import * import tkinter.messagebox from analizer import inter...
true
true
f70a0dbd0faf4dc6a673ed3d6bd04f9fe282784e
12,251
py
Python
jupyterhub_config.py
victor-moreno/jupyterhub-deploy-docker-VM
002af508122d0f1919c704f719acd3d837174d4b
[ "BSD-3-Clause" ]
3
2021-11-15T12:54:24.000Z
2022-02-07T07:45:24.000Z
jupyterhub_config.py
victor-moreno/jupyterhub-deploy-docker-VM
002af508122d0f1919c704f719acd3d837174d4b
[ "BSD-3-Clause" ]
1
2022-01-10T21:01:31.000Z
2022-03-15T03:48:13.000Z
jupyterhub_config.py
victor-moreno/jupyterhub-deploy-docker-VM
002af508122d0f1919c704f719acd3d837174d4b
[ "BSD-3-Clause" ]
1
2022-02-08T20:05:45.000Z
2022-02-08T20:05:45.000Z
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. # Configuration file for JupyterHub import os # pre-spawn settings NB_UID = 65534 NB_GID = 65534 CUDA = 'cuda' in os.environ['HOSTNODE'] c = get_config() # read users/teams & images import os, yaml with open('...
31.656331
125
0.671455
import os NB_UID = 65534 NB_GID = 65534 CUDA = 'cuda' in os.environ['HOSTNODE'] c = get_config() import os, yaml with open('/srv/jupyterhub/config.yaml', 'r') as cfgfile: cfg = yaml.load(cfgfile, Loader=yaml.FullLoader) team_map = cfg['users'] ers = list(team_map.keys()) c.Authenticator.admin_users...
true
true
f70a0e8a1e36c7d6b49ffd219b5fb6ca1c543c6b
14,575
py
Python
Packs/DeprecatedContent/Integrations/Cymon/Cymon.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/DeprecatedContent/Integrations/Cymon/Cymon.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/DeprecatedContent/Integrations/Cymon/Cymon.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' import requests import os # disable insecure warnings requests.packages.urllib3.disable_warnings() if not demisto.params().get('useProxy', False): del os.environ['HTTP_PROXY'] del os.environ['H...
31.344086
124
0.535232
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import requests import os requests.packages.urllib3.disable_warnings() if not demisto.params().get('useProxy', False): del os.environ['HTTP_PROXY'] del os.environ['HTTPS_PROXY'] del os.environ['http_proxy...
true
true
f70a0f884ad3dff842c3597cedd90838041493d7
1,991
py
Python
src/compas_blender/artists/robotmodelartist.py
XingxinHE/compas
d2901dbbacdaf4694e5adae78ba8f093f10532bf
[ "MIT" ]
null
null
null
src/compas_blender/artists/robotmodelartist.py
XingxinHE/compas
d2901dbbacdaf4694e5adae78ba8f093f10532bf
[ "MIT" ]
null
null
null
src/compas_blender/artists/robotmodelartist.py
XingxinHE/compas
d2901dbbacdaf4694e5adae78ba8f093f10532bf
[ "MIT" ]
null
null
null
import bpy import mathutils import compas_blender from compas.robots.base_artist import BaseRobotModelArtist __all__ = [ 'RobotModelArtist', ] class RobotModelArtist(BaseRobotModelArtist): """Visualizer for robot models inside a Blender environment. Parameters ---------- model : :class:`compas....
33.183333
135
0.675038
import bpy import mathutils import compas_blender from compas.robots.base_artist import BaseRobotModelArtist __all__ = [ 'RobotModelArtist', ] class RobotModelArtist(BaseRobotModelArtist): def __init__(self, model, collection=None): self.collection = collection super(RobotModelArtist, self)...
true
true
f70a10aff0b277358ad768846f92507929b5b0b0
18,696
py
Python
venv/Lib/site-packages/skimage/transform/tests/test_radon_transform.py
amelliaaas/tugastkc4
f442382c72379e911f3780543b95345a3b1c9407
[ "Apache-2.0" ]
4
2021-10-20T12:39:09.000Z
2022-02-26T15:02:08.000Z
venv/Lib/site-packages/skimage/transform/tests/test_radon_transform.py
amelliaaas/tugastkc4
f442382c72379e911f3780543b95345a3b1c9407
[ "Apache-2.0" ]
null
null
null
venv/Lib/site-packages/skimage/transform/tests/test_radon_transform.py
amelliaaas/tugastkc4
f442382c72379e911f3780543b95345a3b1c9407
[ "Apache-2.0" ]
20
2021-11-07T13:55:56.000Z
2021-12-02T10:54:01.000Z
import itertools import pytest import numpy as np from skimage.data import shepp_logan_phantom from skimage.transform import radon, iradon, iradon_sart, rescale from skimage._shared.utils import convert_to_float from skimage._shared import testing from skimage._shared.testing import test_parallel from skimage._shared...
37.846154
80
0.65153
import itertools import pytest import numpy as np from skimage.data import shepp_logan_phantom from skimage.transform import radon, iradon, iradon_sart, rescale from skimage._shared.utils import convert_to_float from skimage._shared import testing from skimage._shared.testing import test_parallel from skimage._shared...
true
true
f70a10d191655957dfeebe15ba978c3fba9a7a51
9,739
py
Python
qiskit/basicplotter.py
NickyBar/QIP
11747b40beb38d41faa297fb2b53f28c6519c753
[ "Apache-2.0" ]
1
2017-07-12T02:04:53.000Z
2017-07-12T02:04:53.000Z
qiskit/basicplotter.py
NickyBar/QIP
11747b40beb38d41faa297fb2b53f28c6519c753
[ "Apache-2.0" ]
null
null
null
qiskit/basicplotter.py
NickyBar/QIP
11747b40beb38d41faa297fb2b53f28c6519c753
[ "Apache-2.0" ]
6
2018-05-27T10:52:02.000Z
2021-04-02T19:20:11.000Z
# -*- coding: utf-8 -*- # Copyright 2017 IBM RESEARCH. 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 requ...
35.286232
79
0.591745
from mpl_toolkits.mplot3d import proj3d import matplotlib.pyplot as plt from matplotlib.patches import FancyArrowPatch import numpy as np from collections import Counter from functools import reduce def plot_histogram(data, number_to_keep=None): if number_to_keep is not None: data_temp = ...
true
true