hexsha
stringlengths
40
40
size
int64
10
805k
ext
stringclasses
6 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
176
max_stars_repo_name
stringlengths
7
114
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
176
max_issues_repo_name
stringlengths
7
114
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
48.5k
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
176
max_forks_repo_name
stringlengths
7
114
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
10
805k
avg_line_length
float64
5.53
11k
max_line_length
int64
10
129k
alphanum_fraction
float64
0.13
0.93
content_no_comment
stringlengths
0
449k
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
f71a3d3679c710701747a7487f1d3ca7742c6324
1,437
py
Python
destruction/render.py
tcdude/destruction
44d24cee4f73e841e600a814e7b3c659a1a5c98c
[ "MIT" ]
null
null
null
destruction/render.py
tcdude/destruction
44d24cee4f73e841e600a814e7b3c659a1a5c98c
[ "MIT" ]
null
null
null
destruction/render.py
tcdude/destruction
44d24cee4f73e841e600a814e7b3c659a1a5c98c
[ "MIT" ]
null
null
null
""" MIT License Copyright (c) 2019 tcdude Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distri...
37.815789
78
0.767571
import sdl2.ext class HWRenderer(sdl2.ext.TextureSpriteRenderSystem): def __init__(self, window): super(HWRenderer, self).__init__(window) self.renderer = self.sdlrenderer def render(self, components, **kwargs): self._renderer.clear() super(HWRenderer, self).render(components...
true
true
f71a3d5dbbec7288cff475d0741e98fb99b63c84
1,001
py
Python
integration-tests/environment.py
oazmon/sceptre-template-fetcher
ff40fea4dcdb7b785b90b70426758475a8d09634
[ "Apache-2.0" ]
null
null
null
integration-tests/environment.py
oazmon/sceptre-template-fetcher
ff40fea4dcdb7b785b90b70426758475a8d09634
[ "Apache-2.0" ]
null
null
null
integration-tests/environment.py
oazmon/sceptre-template-fetcher
ff40fea4dcdb7b785b90b70426758475a8d09634
[ "Apache-2.0" ]
null
null
null
import os import uuid import yaml from sceptre_template_fetcher.cli import setup_logging def before_all(context): if context.config.wip: setup_logging(True) context.uuid = uuid.uuid1().hex context.project_code = "sceptre-integration-tests-{0}".format( context.uuid ) context.scept...
23.27907
73
0.7003
import os import uuid import yaml from sceptre_template_fetcher.cli import setup_logging def before_all(context): if context.config.wip: setup_logging(True) context.uuid = uuid.uuid1().hex context.project_code = "sceptre-integration-tests-{0}".format( context.uuid ) context.scept...
true
true
f71a3d9d71d9308eee9e5caacf5594010124ebf4
17,425
py
Python
openstack_dashboard/dashboards/project/networks/workflows.py
ameoba/horizon
ff9e367c98a8bb79f10914abffaaa04b0a461819
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/networks/workflows.py
ameoba/horizon
ff9e367c98a8bb79f10914abffaaa04b0a461819
[ "Apache-2.0" ]
null
null
null
openstack_dashboard/dashboards/project/networks/workflows.py
ameoba/horizon
ff9e367c98a8bb79f10914abffaaa04b0a461819
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 NEC 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 #...
41.587112
99
0.570502
import logging from django.conf import settings import netaddr from django.conf import settings from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from horizon import exceptions from horizon import forms from horizon import messages from horizon....
true
true
f71a3eaeece4ab1511448b596d52d6ce7165fb16
34
py
Python
06_01_name_conflict.py
simonmonk/prog_pico_ed1
36e70f88ea7dc73e75399cd390d1cc2023843971
[ "MIT" ]
6
2021-05-08T13:19:33.000Z
2022-03-20T08:29:44.000Z
06_01_name_conflict.py
simonmonk/prog_pico_ed1
36e70f88ea7dc73e75399cd390d1cc2023843971
[ "MIT" ]
1
2021-03-05T20:27:15.000Z
2021-11-17T09:07:43.000Z
06_01_name_conflict.py
simonmonk/prog_pico_ed1
36e70f88ea7dc73e75399cd390d1cc2023843971
[ "MIT" ]
2
2021-07-02T15:19:37.000Z
2021-10-06T00:53:25.000Z
def print(): pass print()
8.5
12
0.5
def print(): pass print()
true
true
f71a3ebfc7a88a941fd26cb5f19083ae093e7d3f
18,115
py
Python
src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/test_locks.py
aag09/azurecli
30c98a75c36c02a657f1753ff5c48502dc7f7933
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/test_locks.py
aag09/azurecli
30c98a75c36c02a657f1753ff5c48502dc7f7933
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-resource/azure/cli/command_modules/resource/tests/test_locks.py
aag09/azurecli
30c98a75c36c02a657f1753ff5c48502dc7f7933
[ "MIT" ]
1
2017-12-28T04:51:44.000Z
2017-12-28T04:51:44.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
51.463068
120
0.613525
from time import sleep import unittest from azure.cli.testsdk import ScenarioTest, JMESPathCheck, ResourceGroupPreparer, record_only from azure.cli.command_modules.resource.custom import _parse_lock_id class ResourceLockTests(ScenarioTest): def test_list_locks(self): self.cmd('az lock list')...
true
true
f71a3fac624255159a6714f8e472afdd01de6526
1,342
py
Python
molsysmt/form/openmm_Topology/to_openmm_System.py
uibcdf/MolModSAKs
02263fb710693f0c41817f1a318459b35fd5462a
[ "MIT" ]
null
null
null
molsysmt/form/openmm_Topology/to_openmm_System.py
uibcdf/MolModSAKs
02263fb710693f0c41817f1a318459b35fd5462a
[ "MIT" ]
null
null
null
molsysmt/form/openmm_Topology/to_openmm_System.py
uibcdf/MolModSAKs
02263fb710693f0c41817f1a318459b35fd5462a
[ "MIT" ]
null
null
null
from molsysmt._private.exceptions import * from molsysmt._private.digestion import * from .is_openmm_Topology import is_openmm_Topology def to_openmm_System(item, atom_indices='all', forcefield=None, parameters=None, check=True): if check: try: is_openmm_Topology(item) except: ...
34.410256
99
0.727273
from molsysmt._private.exceptions import * from molsysmt._private.digestion import * from .is_openmm_Topology import is_openmm_Topology def to_openmm_System(item, atom_indices='all', forcefield=None, parameters=None, check=True): if check: try: is_openmm_Topology(item) except: ...
true
true
f71a3fafd60fd3e85163023cfc3f27d9dfd7b309
1,273
py
Python
python/app.py
webbhm/GBE_T
77302ecc57c6997bd646a5a789ec5d55bdc1b8d8
[ "MIT" ]
null
null
null
python/app.py
webbhm/GBE_T
77302ecc57c6997bd646a5a789ec5d55bdc1b8d8
[ "MIT" ]
null
null
null
python/app.py
webbhm/GBE_T
77302ecc57c6997bd646a5a789ec5d55bdc1b8d8
[ "MIT" ]
1
2021-07-30T15:54:29.000Z
2021-07-30T15:54:29.000Z
from flask import Flask, render_template, request from datetime import datetime from ChartHelper import ChartHelper from werkzeug.middleware.proxy_fix import ProxyFix app = Flask(__name__) # app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_host=1) @app.route("/") def index(): return render_template('index.html',...
27.673913
83
0.711705
from flask import Flask, render_template, request from datetime import datetime from ChartHelper import ChartHelper from werkzeug.middleware.proxy_fix import ProxyFix app = Flask(__name__) app.wsgi_app = ProxyFix(app.wsgi_app, x_for=1, x_host=1) @app.route("/") def index(): return render_template('index.html', ...
true
true
f71a408dbfa7813e062114f0338906e60d2e2f3e
15,336
py
Python
viz/renderer.py
AK391/stylegan_xl
9854d3d0e96eccaad10cab22379c018e1e031cf0
[ "MIT" ]
214
2022-02-02T02:24:57.000Z
2022-03-31T18:39:55.000Z
viz/renderer.py
AK391/stylegan_xl
9854d3d0e96eccaad10cab22379c018e1e031cf0
[ "MIT" ]
8
2022-02-03T11:21:10.000Z
2022-03-31T23:26:24.000Z
viz/renderer.py
AK391/stylegan_xl
9854d3d0e96eccaad10cab22379c018e1e031cf0
[ "MIT" ]
2
2022-03-08T08:05:55.000Z
2022-03-31T23:01:58.000Z
# Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # NVIDIA CORPORATION and its licensors retain all intellectual property # and proprietary rights in and to this software, related documentation # and any modifications thereto. Any use, reproduction, disclosure or # distribution of this sof...
40.46438
164
0.555099
import sys import copy import traceback import numpy as np import torch import torch.fft import torch.nn import matplotlib.cm import dnnlib from torch_utils.ops import upfirdn2d import legacy class CapturedException(Exception): def __init__(self, msg=None): if msg is None: _type, val...
true
true
f71a41378868c94ddf49eb311aa584b642394977
1,307
py
Python
parse.py
itsmehemant123/twitter-hydration
543ef7019f3c34e281acc08ae45f24c0407939f6
[ "MIT" ]
1
2018-05-05T04:40:01.000Z
2018-05-05T04:40:01.000Z
parse.py
itsmehemant123/twitter-hydration
543ef7019f3c34e281acc08ae45f24c0407939f6
[ "MIT" ]
null
null
null
parse.py
itsmehemant123/twitter-hydration
543ef7019f3c34e281acc08ae45f24c0407939f6
[ "MIT" ]
null
null
null
import os import json import time import logging from connectors.mongodb.mongohandle import MongoHandle from twarc import Twarc logging.basicConfig(level=logging.INFO) with open('./config/config.json') as data_file: config = json.load(data_file) logging.info('Finished parsing config.') handle = MongoHandle(conf...
31.878049
86
0.701607
import os import json import time import logging from connectors.mongodb.mongohandle import MongoHandle from twarc import Twarc logging.basicConfig(level=logging.INFO) with open('./config/config.json') as data_file: config = json.load(data_file) logging.info('Finished parsing config.') handle = MongoHandle(conf...
true
true
f71a414dc127cdf908b1db847cc87bf66e249e05
515
py
Python
nkrsiSystem/configDefault.py
Kanciarzek/NkrsiSystem
ee3d19b1419ee64ccef05051a3892663e7d71625
[ "MIT" ]
null
null
null
nkrsiSystem/configDefault.py
Kanciarzek/NkrsiSystem
ee3d19b1419ee64ccef05051a3892663e7d71625
[ "MIT" ]
null
null
null
nkrsiSystem/configDefault.py
Kanciarzek/NkrsiSystem
ee3d19b1419ee64ccef05051a3892663e7d71625
[ "MIT" ]
null
null
null
import os DEBUG_MODE = True SECRET_KEY = 'secret' # Database config DB_USER = 'postgres' DB_NAME = 'postgres' DB_PASSWORD = '' DB_HOST = os.environ.get('POSTGRES_HOST', 'localhost') DB_PORT = os.environ.get('POSTGRES_PORT', 5432) # Slack config SLACK_TOKEN = 'token' SLACK_API_INVITE_URL = 'https://slack.com/api/user...
18.392857
65
0.728155
import os DEBUG_MODE = True SECRET_KEY = 'secret' DB_USER = 'postgres' DB_NAME = 'postgres' DB_PASSWORD = '' DB_HOST = os.environ.get('POSTGRES_HOST', 'localhost') DB_PORT = os.environ.get('POSTGRES_PORT', 5432) SLACK_TOKEN = 'token' SLACK_API_INVITE_URL = 'https://slack.com/api/users.admin.invite' EMAIL_HOST = ...
true
true
f71a41f2f041e11ccff687d63b1853750bc8274a
1,270
py
Python
scripts/05_modules/snap/snap_enable_snapping_3d_point_r14.py
mgoldshteyn/cinema4d_py_sdk_extended
b6c67f1dbae182c09ccbcc1df51f0e7ea4816074
[ "Apache-2.0" ]
null
null
null
scripts/05_modules/snap/snap_enable_snapping_3d_point_r14.py
mgoldshteyn/cinema4d_py_sdk_extended
b6c67f1dbae182c09ccbcc1df51f0e7ea4816074
[ "Apache-2.0" ]
null
null
null
scripts/05_modules/snap/snap_enable_snapping_3d_point_r14.py
mgoldshteyn/cinema4d_py_sdk_extended
b6c67f1dbae182c09ccbcc1df51f0e7ea4816074
[ "Apache-2.0" ]
null
null
null
""" Copyright: MAXON Computer GmbH Description: - Enables the snap if it's not already the case. - Sets it to 3D Type and also to Point mode. Class/method highlighted: - c4d.modules.snap - c4d.modules.snap.IsSnapEnabled() - c4d.modules.snap.GetSnapSettings() - c4d.modules.snap.SetSnapSettings(...
26.458333
92
0.693701
import c4d def main(): res = c4d.modules.snap.IsSnapEnabled(doc) if not res: c4d.modules.snap.EnableSnap(True, doc) print("Snap Enabled:", c4d.modules.snap.IsSnapEnabled(doc)) settings = c4d.modules.snap.GetSnapSettings(doc) settings[c4d.SNAP_SETTINGS_MODE] = ...
true
true
f71a4257afb79b3e6037c8b3e3e9cc6b87d2a7dc
212
py
Python
analise/urls.py
IgorAlmeeida/coronaDataScience
f3b7fb4601870882483cc6ef913c6dcee83432da
[ "MIT" ]
null
null
null
analise/urls.py
IgorAlmeeida/coronaDataScience
f3b7fb4601870882483cc6ef913c6dcee83432da
[ "MIT" ]
null
null
null
analise/urls.py
IgorAlmeeida/coronaDataScience
f3b7fb4601870882483cc6ef913c6dcee83432da
[ "MIT" ]
null
null
null
from django.contrib import admin from django.urls import path from .views import home, infoDiaEstado urlpatterns = [ path('', home), path('info_dia_estado', infoDiaEstado, name="dataInfoDiaEstado"), ]
19.272727
69
0.735849
from django.contrib import admin from django.urls import path from .views import home, infoDiaEstado urlpatterns = [ path('', home), path('info_dia_estado', infoDiaEstado, name="dataInfoDiaEstado"), ]
true
true
f71a428d471b125b47b81715ffe4cf49f8639526
15,466
py
Python
package/tests/test_domain_services/test_vpc.py
DYeag/AWS-Shell
b5318e72373b1a948ac6aced1c0bb4566d5ae46f
[ "0BSD" ]
3
2016-08-22T07:14:56.000Z
2018-03-16T07:31:44.000Z
package/tests/test_domain_services/test_vpc.py
DYeag/AWS-Shell
b5318e72373b1a948ac6aced1c0bb4566d5ae46f
[ "0BSD" ]
470
2016-03-24T13:38:08.000Z
2022-02-05T01:14:05.000Z
package/tests/test_domain_services/test_vpc.py
DYeag/AWS-Shell
b5318e72373b1a948ac6aced1c0bb4566d5ae46f
[ "0BSD" ]
9
2016-06-20T11:41:54.000Z
2020-11-21T00:42:45.000Z
from unittest import TestCase from mock import Mock, call from cloudshell.cp.aws.domain.services.ec2.vpc import VPCService from cloudshell.cp.aws.domain.services.waiters.vpc_peering import VpcPeeringConnectionWaiter class TestVPCService(TestCase): def setUp(self): self.tag_service = Mock() self....
47.009119
136
0.652916
from unittest import TestCase from mock import Mock, call from cloudshell.cp.aws.domain.services.ec2.vpc import VPCService from cloudshell.cp.aws.domain.services.waiters.vpc_peering import VpcPeeringConnectionWaiter class TestVPCService(TestCase): def setUp(self): self.tag_service = Mock() self....
true
true
f71a432e88d1054b78e97329d6efffbbe65f95b6
8,264
py
Python
wagtail/wagtailsnippets/views/snippets.py
markosamuli/wagtail
5158ee7aad594d3d9b8b7cd14c139094080466fb
[ "BSD-3-Clause" ]
null
null
null
wagtail/wagtailsnippets/views/snippets.py
markosamuli/wagtail
5158ee7aad594d3d9b8b7cd14c139094080466fb
[ "BSD-3-Clause" ]
null
null
null
wagtail/wagtailsnippets/views/snippets.py
markosamuli/wagtail
5158ee7aad594d3d9b8b7cd14c139094080466fb
[ "BSD-3-Clause" ]
null
null
null
from django.apps import apps from django.core.urlresolvers import reverse from django.http import Http404 from django.shortcuts import get_object_or_404, redirect, render from django.utils.text import capfirst from django.utils.translation import ugettext as _ from wagtail.utils.pagination import paginate from wagtail...
34.290456
101
0.666142
from django.apps import apps from django.core.urlresolvers import reverse from django.http import Http404 from django.shortcuts import get_object_or_404, redirect, render from django.utils.text import capfirst from django.utils.translation import ugettext as _ from wagtail.utils.pagination import paginate from wagtail...
true
true
f71a43557442ce97907f082e75eb667688ce3597
664
py
Python
manage.py
bastoune57/gokiting_back_end
f3edcbeede292713349b28f2390b5d57e1420f8e
[ "MIT" ]
null
null
null
manage.py
bastoune57/gokiting_back_end
f3edcbeede292713349b28f2390b5d57e1420f8e
[ "MIT" ]
null
null
null
manage.py
bastoune57/gokiting_back_end
f3edcbeede292713349b28f2390b5d57e1420f8e
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gokiting.settings') try: from django.core.management import execute_from_command_line except Imp...
28.869565
73
0.679217
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'gokiting.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
f71a4417980584c697fd59995b017ae74c4d8707
210
py
Python
visualisation/core/__init__.py
dashings/CAMVIS
fb7e4e5d885ae227140f7ab40b5f47e730ec249b
[ "MIT" ]
213
2018-12-20T12:09:07.000Z
2022-03-21T10:09:58.000Z
visualisation/core/__init__.py
dashings/CAMVIS
fb7e4e5d885ae227140f7ab40b5f47e730ec249b
[ "MIT" ]
3
2020-07-16T05:11:25.000Z
2022-03-16T13:59:07.000Z
visualisation/core/__init__.py
dashings/CAMVIS
fb7e4e5d885ae227140f7ab40b5f47e730ec249b
[ "MIT" ]
41
2019-03-06T12:01:24.000Z
2022-03-09T07:55:56.000Z
from .SaliencyMap import SaliencyMap from .DeepDream import DeepDream from .GradCam import GradCam from .Weights import Weights from .Base import Base from .ClassActivationMapping import ClassActivationMapping
30
58
0.857143
from .SaliencyMap import SaliencyMap from .DeepDream import DeepDream from .GradCam import GradCam from .Weights import Weights from .Base import Base from .ClassActivationMapping import ClassActivationMapping
true
true
f71a45fb15de192f5a1129710b39b955da52f151
13,147
py
Python
tests/query_test/test_observability.py
twmarshall/impala
bdd904922a220c37326928ac674779acaef5f6fa
[ "Apache-2.0" ]
null
null
null
tests/query_test/test_observability.py
twmarshall/impala
bdd904922a220c37326928ac674779acaef5f6fa
[ "Apache-2.0" ]
null
null
null
tests/query_test/test_observability.py
twmarshall/impala
bdd904922a220c37326928ac674779acaef5f6fa
[ "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"); you may not u...
47.634058
90
0.716818
from tests.common.impala_cluster import ImpalaCluster from tests.common.impala_test_suite import ImpalaTestSuite from tests.common.skip import SkipIfS3, SkipIfADLS, SkipIfIsilon, SkipIfLocal from tests.util.filesystem_utils import IS_EC import logging import pytest import re import time class TestObse...
true
true
f71a466907a327211f69a6d078aeba3666c44465
3,067
py
Python
GPA-Spider/config.py
xsx-123/awesome-sdu-scripts
bc371fda9d4d2a616f82c9a44b7d1d6eddb2c6eb
[ "MIT" ]
21
2021-06-01T09:54:20.000Z
2022-03-11T16:50:42.000Z
GPA-Spider/config.py
xsx-123/awesome-sdu-scripts
bc371fda9d4d2a616f82c9a44b7d1d6eddb2c6eb
[ "MIT" ]
1
2019-08-16T05:30:19.000Z
2019-08-16T05:30:19.000Z
GPA-Spider/config.py
xsx-123/awesome-sdu-scripts
bc371fda9d4d2a616f82c9a44b7d1d6eddb2c6eb
[ "MIT" ]
8
2021-07-21T03:11:40.000Z
2021-12-03T08:25:19.000Z
# -*- coding: utf-8 -*- #!/usr/bin/env python # Copyright 2018 ZhangT. All Rights Reserved. # Author: ZhangT # Author-Github: github.com/zhangt2333 # config.py 2018/2/10 21:49 # 包含一些通用常量和工具函数 HEADERS = {"Host": "bkjws.sdu.edu.cn", "Connection": "keep-alive", "Accept": "*/*", ...
45.776119
137
0.635474
HEADERS = {"Host": "bkjws.sdu.edu.cn", "Connection": "keep-alive", "Accept": "*/*", "Origin": "http://bkjws.sdu.edu.cn", "X-Requested-With": "XMLHttpRequest", "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) ...
true
true
f71a467939d4c660726511d6392456a49b013fa9
384
py
Python
sandbox/team_members/pudumula/ros/gazebo_ws_1/build/rrbot_description/catkin_generated/pkg.installspace.context.pc.py
Project-Heisenberg/quantum
f3ad8f4693007e45e80a88f928273adcfdc8529d
[ "Apache-2.0" ]
1
2017-04-23T14:23:54.000Z
2017-04-23T14:23:54.000Z
sandbox/team_members/pudumula/ros/gazebo_ws_1/build/rrbot_description/catkin_generated/pkg.installspace.context.pc.py
Project-Heisenberg/quantum
f3ad8f4693007e45e80a88f928273adcfdc8529d
[ "Apache-2.0" ]
13
2016-03-25T05:15:17.000Z
2018-05-30T15:53:12.000Z
sandbox/team_members/pudumula/ros/gazebo_ws_1/build/rrbot_description/catkin_generated/pkg.installspace.context.pc.py
Project-Heisenberg/quantum
f3ad8f4693007e45e80a88f928273adcfdc8529d
[ "Apache-2.0" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "rrbot_description" PROJECT_SPACE_DIR ...
42.666667
68
0.710938
CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else [] PROJECT_CATKIN_DEPENDS = "".replace(';', ' ') PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else [] PROJECT_NAME = "rrbot_description" PROJECT_SPACE_DIR = "/home/neo/ros/gazebo_ws_1/install" PROJECT_VERSION = ...
true
true
f71a46e6e4364c2e9a02fba2afe9a37df835f18f
2,165
py
Python
azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/azure_firewall_network_rule_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/azure_firewall_network_rule_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
azure-mgmt-network/azure/mgmt/network/v2018_11_01/models/azure_firewall_network_rule_py3.py
JonathanGailliez/azure-sdk-for-python
f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
43.3
174
0.647575
from msrest.serialization import Model class AzureFirewallNetworkRule(Model): _attribute_map = { 'name': {'key': 'name', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, 'protocols': {'key': 'protocols', 'type': '[str]'}, 'source_addresses': {'key':...
true
true
f71a47042dc21875d17453ebc714d5444f63f220
1,718
py
Python
docker/demultiplexing/demuxlet/generate_zarr.py
jggatter/cumulus
1dfd9dfce5a44ff867859db6f24a356f72c6ccdd
[ "BSD-3-Clause" ]
null
null
null
docker/demultiplexing/demuxlet/generate_zarr.py
jggatter/cumulus
1dfd9dfce5a44ff867859db6f24a356f72c6ccdd
[ "BSD-3-Clause" ]
null
null
null
docker/demultiplexing/demuxlet/generate_zarr.py
jggatter/cumulus
1dfd9dfce5a44ff867859db6f24a356f72c6ccdd
[ "BSD-3-Clause" ]
null
null
null
import argparse import pegasusio as pio import pandas as pd parser = argparse.ArgumentParser(description='Merge demuxlet result with gene-count matrix.') parser.add_argument('demux_res', metavar = 'demux_result.best', help = 'Demuxlet demultiplexing results.') parser.add_argument('raw_mat', metavar = 'raw_feature_bc_...
47.722222
158
0.689173
import argparse import pegasusio as pio import pandas as pd parser = argparse.ArgumentParser(description='Merge demuxlet result with gene-count matrix.') parser.add_argument('demux_res', metavar = 'demux_result.best', help = 'Demuxlet demultiplexing results.') parser.add_argument('raw_mat', metavar = 'raw_feature_bc_...
true
true
f71a4726a2407751112c37ace25b054f8f423083
152
py
Python
tests/model_control/detailed/transf_BoxCox/model_control_one_enabled_BoxCox_MovingAverage_BestCycle_AR.py
shaido987/pyaf
b9afd089557bed6b90b246d3712c481ae26a1957
[ "BSD-3-Clause" ]
377
2016-10-13T20:52:44.000Z
2022-03-29T18:04:14.000Z
tests/model_control/detailed/transf_BoxCox/model_control_one_enabled_BoxCox_MovingAverage_BestCycle_AR.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
160
2016-10-13T16:11:53.000Z
2022-03-28T04:21:34.000Z
tests/model_control/detailed/transf_BoxCox/model_control_one_enabled_BoxCox_MovingAverage_BestCycle_AR.py
ysdede/pyaf
b5541b8249d5a1cfdc01f27fdfd99b6580ed680b
[ "BSD-3-Clause" ]
63
2017-03-09T14:51:18.000Z
2022-03-27T20:52:57.000Z
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['BoxCox'] , ['MovingAverage'] , ['BestCycle'] , ['AR'] );
38
79
0.743421
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['BoxCox'] , ['MovingAverage'] , ['BestCycle'] , ['AR'] );
true
true
f71a48ee730e59aec180da887d03b93c9e9a6c0f
40,848
py
Python
gym_miniworld/miniworld.py
HuangHaoyu1997/gym-miniworld
77dc24bf1b1ca8c2cfefadfe3e35a0deb2d08a1a
[ "Apache-2.0" ]
null
null
null
gym_miniworld/miniworld.py
HuangHaoyu1997/gym-miniworld
77dc24bf1b1ca8c2cfefadfe3e35a0deb2d08a1a
[ "Apache-2.0" ]
null
null
null
gym_miniworld/miniworld.py
HuangHaoyu1997/gym-miniworld
77dc24bf1b1ca8c2cfefadfe3e35a0deb2d08a1a
[ "Apache-2.0" ]
null
null
null
import math from enum import IntEnum import numpy as np import gym from gym import spaces from .random import * from .opengl import * from .objmesh import * from .entity import * from .math import * from .params import * # Default wall height for room DEFAULT_WALL_HEIGHT=2.74 # Texture size/density in texels/meter TE...
28.665263
102
0.548815
import math from enum import IntEnum import numpy as np import gym from gym import spaces from .random import * from .opengl import * from .objmesh import * from .entity import * from .math import * from .params import * DEFAULT_WALL_HEIGHT=2.74 TEX_DENSITY = 512 def gen_texcs_wall( tex, min_x, min_y, ...
true
true
f71a4919671cb710595a953343f020b773680367
163
py
Python
polls/admin.py
egemen61/excell
654b51d7cb0cb3384b7a8b714a2e21b44fcb7afc
[ "BSD-3-Clause" ]
253
2017-09-15T10:01:58.000Z
2022-03-27T00:19:49.000Z
polls/admin.py
egemen61/excell
654b51d7cb0cb3384b7a8b714a2e21b44fcb7afc
[ "BSD-3-Clause" ]
35
2017-10-26T09:16:30.000Z
2022-01-20T19:57:19.000Z
polls/admin.py
egemen61/excell
654b51d7cb0cb3384b7a8b714a2e21b44fcb7afc
[ "BSD-3-Clause" ]
64
2017-10-20T15:42:05.000Z
2022-02-10T02:25:22.000Z
from django.contrib import admin from polls.models import Question, Choice # Register your models here. admin.site.register(Question) admin.site.register(Choice)
23.285714
41
0.815951
from django.contrib import admin from polls.models import Question, Choice admin.site.register(Question) admin.site.register(Choice)
true
true
f71a4b05579a18c573ff27b6ef2507849421cf07
43,124
py
Python
src/transformers/configuration_utils.py
arfon/transformers
bbd0901805292901e8df05bf7be87d2e43a7ae1b
[ "Apache-2.0" ]
2
2021-12-25T10:04:17.000Z
2022-03-13T05:37:13.000Z
src/transformers/configuration_utils.py
arfon/transformers
bbd0901805292901e8df05bf7be87d2e43a7ae1b
[ "Apache-2.0" ]
9
2021-06-08T22:35:33.000Z
2021-10-04T08:53:44.000Z
src/transformers/configuration_utils.py
arfon/transformers
bbd0901805292901e8df05bf7be87d2e43a7ae1b
[ "Apache-2.0" ]
1
2020-06-26T08:13:16.000Z
2020-06-26T08:13:16.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
54.0401
210
0.649082
import copy import json import os import warnings from typing import Any, Dict, Tuple, Union from . import __version__ from .file_utils import ( CONFIG_NAME, PushToHubMixin, cached_path, copy_func, hf_bucket_url, is_offline_mode, is_remote_url, is_torch_available, ) fro...
true
true
f71a4b33d3f34e4911b2fce2af6caffbdfbb62bf
1,326
py
Python
Assessments/count-contained-permutations.py
SaumyaRai2010/algoexpert-data-structures-algorithms
bcafd8d7798661bf86c2d6234221d764c68fc19f
[ "MIT" ]
2
2021-08-17T14:13:01.000Z
2021-08-17T14:13:16.000Z
Assessments/count-contained-permutations.py
SaumyaRai2010/algoexpert-data-structures-algorithms
bcafd8d7798661bf86c2d6234221d764c68fc19f
[ "MIT" ]
null
null
null
Assessments/count-contained-permutations.py
SaumyaRai2010/algoexpert-data-structures-algorithms
bcafd8d7798661bf86c2d6234221d764c68fc19f
[ "MIT" ]
null
null
null
# COUNT CONTAINED PERMUTATIONS # O(M * U + N) time and O(U) space, where M -> length of big string, # U -> number of unique characters in small string, N -> length # of small string. # U is actually a constant since it can't be greater than 26. and # M > N, so M will dissolve N # So, modified complexities: # O(M) ti...
26
68
0.684766
# M > N, so M will dissolve N # So, modified complexities: # O(M) time and O(1) space, M -> length of big string def countContainedPermutations(bigString, smallString): # Write your code here. smallCount, bigCount = {}, {} for letter in smallString: if letter not in smallCount: smallCount[letter] =...
false
true
f71a4c3038f108011a235c4b7bce53875e9cbabb
173
py
Python
sentence-embedding/python-lib/dku_language_model/__init__.py
RedaAffane/dataiku-contrib
d409ddc25d31570972a14abb19a84ac101afc6cc
[ "Apache-2.0" ]
1
2020-10-11T14:53:53.000Z
2020-10-11T14:53:53.000Z
sentence-embedding/python-lib/dku_language_model/__init__.py
RedaAffane/dataiku-contrib
d409ddc25d31570972a14abb19a84ac101afc6cc
[ "Apache-2.0" ]
10
2020-04-24T13:14:42.000Z
2022-02-10T01:07:28.000Z
python-lib/dku_language_model/__init__.py
dataiku/dss-plugin-nlp-embedding
7805151307210e2be15d844728be4ace2d381f13
[ "Apache-2.0" ]
null
null
null
from dku_language_model.context_independent_language_model import FasttextModel, Word2vecModel, GloveModel from dku_language_model.contextual_language_model import ElmoModel
86.5
106
0.924855
from dku_language_model.context_independent_language_model import FasttextModel, Word2vecModel, GloveModel from dku_language_model.contextual_language_model import ElmoModel
true
true
f71a4cd9e12534305a660dab19c40de08f3f20a3
6,545
py
Python
loldib/getratings/models/NA/na_syndra/na_syndra_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_syndra/na_syndra_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_syndra/na_syndra_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
from getratings.models.ratings import Ratings class NA_Syndra_Jng_Aatrox(Ratings): pass class NA_Syndra_Jng_Ahri(Ratings): pass class NA_Syndra_Jng_Akali(Ratings): pass class NA_Syndra_Jng_Alistar(Ratings): pass class NA_Syndra_Jng_Amumu(Ratings): pass class NA_Syndra_Jng_Anivia(Ratings): ...
15.695444
46
0.766692
from getratings.models.ratings import Ratings class NA_Syndra_Jng_Aatrox(Ratings): pass class NA_Syndra_Jng_Ahri(Ratings): pass class NA_Syndra_Jng_Akali(Ratings): pass class NA_Syndra_Jng_Alistar(Ratings): pass class NA_Syndra_Jng_Amumu(Ratings): pass class NA_Syndra_Jng_Anivia(Ratings): ...
true
true
f71a4d115d47444e362a89b60f0c30a6669b0ce0
606
py
Python
setup.py
donno2048/BS
ef6539a75770031da5838d1ecdeb83e49e63cf7e
[ "MIT" ]
null
null
null
setup.py
donno2048/BS
ef6539a75770031da5838d1ecdeb83e49e63cf7e
[ "MIT" ]
null
null
null
setup.py
donno2048/BS
ef6539a75770031da5838d1ecdeb83e49e63cf7e
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name='backboard', version='1.0.3', description='Background noises for your keyboard typing', long_description=open('README.md').read(), long_description_content_type="text/markdown", url='https://github.com/donno2048/BS', packages=find_packa...
37.875
89
0.684818
from setuptools import setup, find_packages setup( name='backboard', version='1.0.3', description='Background noises for your keyboard typing', long_description=open('README.md').read(), long_description_content_type="text/markdown", url='https://github.com/donno2048/BS', packages=find_packa...
true
true
f71a4d41c019c5c22fe4a775dccecbf2510b5ece
7,159
py
Python
flash/image/classification/integrations/baal/loop.py
twsl/lightning-flash
9927853ac23551b444dbe969e287879c69be4094
[ "Apache-2.0" ]
null
null
null
flash/image/classification/integrations/baal/loop.py
twsl/lightning-flash
9927853ac23551b444dbe969e287879c69be4094
[ "Apache-2.0" ]
null
null
null
flash/image/classification/integrations/baal/loop.py
twsl/lightning-flash
9927853ac23551b444dbe969e287879c69be4094
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
42.613095
116
0.70778
from copy import deepcopy from typing import Any, Dict, Optional import torch from pytorch_lightning.loops import Loop from pytorch_lightning.loops.fit_loop import FitLoop from pytorch_lightning.trainer.connectors.data_connector import _PatchDataLoader from pytorch_lightning.trainer.progress import Progre...
true
true
f71a4e72b400b79bef2912f5ab1fa11a4cf0e50a
15,580
py
Python
GUI_functions/build_asp.py
AntonAlbertovich/Eusocial-Cluster-Utility
fef4f583b6151bb40e54d6825d65d668581c2121
[ "MIT" ]
2
2019-03-22T15:08:31.000Z
2019-03-23T20:10:40.000Z
GUI_functions/build_asp.py
AntonAlbertovich/Eusocial-Cluster-Utility
fef4f583b6151bb40e54d6825d65d668581c2121
[ "MIT" ]
1
2019-03-23T20:08:12.000Z
2019-03-23T20:08:12.000Z
GUI_functions/build_asp.py
AntonAlbertovich/Eusocial-Cluster-Utility
fef4f583b6151bb40e54d6825d65d668581c2121
[ "MIT" ]
1
2019-03-23T19:56:07.000Z
2019-03-23T19:56:07.000Z
import pickle # This is the script which builds a ASP model intended to be solved with clingo. # This program has been test on Ubuntu 18.04 and CentOS 7. # Using Clingo 5.3.0 installed via Conda # Parsing the output of this program will require clyngor-with-clingo which may be installed via pip. if __name__ == "__main...
52.635135
196
0.60706
import pickle if __name__ == "__main__": input_file= open("GUI_functions/Cluster_details.bin", "rb") all_macs= list(pickle.load(input_file)) input_file.close() input_file= open("GUI_functions/Tasks_details.bin", "rb") all_jobs= list(pickle.load(input_file)) input_file.close()...
true
true
f71a4eddc4f441ac7f58d13143c891e1a2b0e540
5,556
py
Python
datasets/dataloader_infer.py
Nitin-Mane/dense-ulearn-vos
9e39d359a53a2343522ce5820fdf27223a4ffcb4
[ "Apache-2.0" ]
157
2021-11-11T13:45:48.000Z
2022-03-14T03:06:09.000Z
datasets/dataloader_infer.py
Nitin-Mane/dense-ulearn-vos
9e39d359a53a2343522ce5820fdf27223a4ffcb4
[ "Apache-2.0" ]
11
2021-11-20T11:53:47.000Z
2022-03-30T01:51:56.000Z
datasets/dataloader_infer.py
Nitin-Mane/dense-ulearn-vos
9e39d359a53a2343522ce5820fdf27223a4ffcb4
[ "Apache-2.0" ]
16
2021-11-12T09:19:45.000Z
2022-03-16T10:32:39.000Z
""" Copyright (c) 2021 TU Darmstadt Author: Nikita Araslanov <nikita.araslanov@tu-darmstadt.de> License: Apache License 2.0 """ import os import torch from PIL import Image import numpy as np import torchvision.transforms as tf from .dataloader_base import DLBase class DataSeg(DLBase): def __init__(self, cfg...
33.071429
89
0.533837
import os import torch from PIL import Image import numpy as np import torchvision.transforms as tf from .dataloader_base import DLBase class DataSeg(DLBase): def __init__(self, cfg, split, ignore_labels=[], \ root=os.path.expanduser('./data'), renorm=False): super(DataSeg, self).__...
true
true
f71a4f157fbcfd39a6a5a1e24d4913bdf4df7d2c
6,777
py
Python
etna/analysis/eda_utils.py
Carlosbogo/etna
b6210f0e79ee92aa9ae8ff4fcfb267be9fb7cc94
[ "Apache-2.0" ]
null
null
null
etna/analysis/eda_utils.py
Carlosbogo/etna
b6210f0e79ee92aa9ae8ff4fcfb267be9fb7cc94
[ "Apache-2.0" ]
null
null
null
etna/analysis/eda_utils.py
Carlosbogo/etna
b6210f0e79ee92aa9ae8ff4fcfb267be9fb7cc94
[ "Apache-2.0" ]
null
null
null
import math import warnings from itertools import combinations from typing import TYPE_CHECKING from typing import Optional from typing import Sequence import matplotlib.pyplot as plt import numpy as np import seaborn as sns import statsmodels.api as sm from matplotlib.ticker import MaxNLocator from statsmodels.graphi...
34.576531
119
0.649255
import math import warnings from itertools import combinations from typing import TYPE_CHECKING from typing import Optional from typing import Sequence import matplotlib.pyplot as plt import numpy as np import seaborn as sns import statsmodels.api as sm from matplotlib.ticker import MaxNLocator from statsmodels.graphi...
true
true
f71a5114748409f8688b38305fe77035a3f0228a
2,251
py
Python
18_Working with Dates and Times in Python/03_Time Zones and Daylight Saving/05_What time did the bike leave.py
mohd-faizy/DataScience-With-Python
13ebb10cf9083343056d5b782957241de1d595f9
[ "MIT" ]
5
2021-02-03T14:36:58.000Z
2022-01-01T10:29:26.000Z
18_Working with Dates and Times in Python/03_Time Zones and Daylight Saving/05_What time did the bike leave.py
mohd-faizy/DataScience-With-Python
13ebb10cf9083343056d5b782957241de1d595f9
[ "MIT" ]
null
null
null
18_Working with Dates and Times in Python/03_Time Zones and Daylight Saving/05_What time did the bike leave.py
mohd-faizy/DataScience-With-Python
13ebb10cf9083343056d5b782957241de1d595f9
[ "MIT" ]
3
2021-02-08T00:31:16.000Z
2022-03-17T13:52:32.000Z
''' 05 - What time did the bike leave? (Global edition) When you need to move a datetime from one timezone into another, use .astimezone() and tz. Often you will be moving things into UTC, but for fun let's try moving things from 'America/New_York' into a few different time zones. -----------------------------...
27.120482
73
0.581519
uk = tz.gettz('Europe/London') local = onebike_datetimes[0]['start'] notlocal = local.astimezone(uk) print(local.isoformat()) print(notlocal.isoformat()) ist = tz.gettz('Asia/Kolkata') local = onebike_datetimes[0]['start'] notlocal = local.astimezone(ist) print(local.isoformat()) print(notlocal.isoforma...
true
true
f71a5174d2bf23ea7be1f3e9c5de988669aecc72
7,805
py
Python
src/tools/scripts/lofreq2_cluster.py
joshwkearney/lofreq
8966e95044875ec9068d2ea4d1cf72ed96d92781
[ "MIT" ]
74
2015-01-02T19:18:01.000Z
2022-02-25T04:16:18.000Z
src/tools/scripts/lofreq2_cluster.py
joshwkearney/lofreq
8966e95044875ec9068d2ea4d1cf72ed96d92781
[ "MIT" ]
125
2015-01-06T07:25:30.000Z
2022-03-15T12:56:23.000Z
src/tools/scripts/lofreq2_cluster.py
joshwkearney/lofreq
8966e95044875ec9068d2ea4d1cf72ed96d92781
[ "MIT" ]
31
2015-01-14T00:41:14.000Z
2022-02-16T14:45:13.000Z
#!/usr/bin/env python """Cluster SNVs based on SNV freqs confidence interval """ __author__ = "Andreas Wilm, Niranjan Nagarajan" __email__ = "wilma@gis.a-star.edu.sg" __copyright__ = "2013,2014 Genome Institute of Singapore" __license__ = "The MIT License" # --- standard library imports # import sys import logging...
30.251938
100
0.557207
__author__ = "Andreas Wilm, Niranjan Nagarajan" __email__ = "wilma@gis.a-star.edu.sg" __copyright__ = "2013,2014 Genome Institute of Singapore" __license__ = "The MIT License" import sys import logging import os import argparse from math import sqrt from collections import namedtuple from itertools import group...
true
true
f71a51a2c95b6595d277af331364047551e8377e
608
py
Python
problems/number-complement.py
sailikhithk/tech-interview-prep
e833764cf98915d56118bddfa0e01871c58de75e
[ "Apache-2.0" ]
null
null
null
problems/number-complement.py
sailikhithk/tech-interview-prep
e833764cf98915d56118bddfa0e01871c58de75e
[ "Apache-2.0" ]
null
null
null
problems/number-complement.py
sailikhithk/tech-interview-prep
e833764cf98915d56118bddfa0e01871c58de75e
[ "Apache-2.0" ]
null
null
null
""" First, we convert the num to its birary. ``` >>> bin(5) >>> '0b101' ``` Second, we need to return the base10 of binary's the complement. Complement is easy `'101' => '010'`. Turn to base10: ``` '010' => 0*pow(2, 2) + 1*pow(2, 1) + 0*pow(2, 0) '11011' => 1*pow(2, 4) + 1*pow(2, 3) + 0*pow(2, 2) + 1*pow(2, 1) + 1*pow...
23.384615
78
0.555921
class Solution(object): def findComplement(self, num): b = bin(num)[2:] opt = 0 for i, c in enumerate(reversed(b)): if c=='0': opt+=pow(2, i) return opt
true
true
f71a52383480c16caea8e9d42551045766340f5e
251
py
Python
jacoren/__version__.py
kuszaj/jacoren
42344982248ed688da8f3d9383ca4ae63f542cf3
[ "MIT" ]
1
2018-02-27T08:54:40.000Z
2018-02-27T08:54:40.000Z
jacoren/__version__.py
kuszaj/jacoren
42344982248ed688da8f3d9383ca4ae63f542cf3
[ "MIT" ]
null
null
null
jacoren/__version__.py
kuszaj/jacoren
42344982248ed688da8f3d9383ca4ae63f542cf3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Package info.""" __version__ = '0.1.0' __title__ = 'jacoren' __description__ = '' __author__ = 'Piotr Kuszaj' __author_email__ = 'peterkuszaj@gmail.com' __license__ = 'MIT' __all__ = ('platform', 'cpu', 'memory', 'disks')
20.916667
48
0.657371
__version__ = '0.1.0' __title__ = 'jacoren' __description__ = '' __author__ = 'Piotr Kuszaj' __author_email__ = 'peterkuszaj@gmail.com' __license__ = 'MIT' __all__ = ('platform', 'cpu', 'memory', 'disks')
true
true
f71a5241dff474c819eaebc8af456389f5a76087
4,386
py
Python
tests/unit/test_task.py
lekshmimallika-aot/business-schemas
d95b43f1d04e29fd9bab101789c277db54123d9b
[ "Apache-2.0" ]
2
2020-02-05T21:36:27.000Z
2021-08-28T23:56:52.000Z
tests/unit/test_task.py
lekshmimallika-aot/business-schemas
d95b43f1d04e29fd9bab101789c277db54123d9b
[ "Apache-2.0" ]
13
2020-03-25T17:28:11.000Z
2022-03-30T20:06:04.000Z
tests/unit/test_task.py
lekshmimallika-aot/business-schemas
d95b43f1d04e29fd9bab101789c277db54123d9b
[ "Apache-2.0" ]
19
2020-01-31T23:11:47.000Z
2022-03-30T18:08:15.000Z
# Copyright © 2019 Province of British Columbia # # 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...
27.4125
79
0.512312
from registry_schemas import validate from registry_schemas.example_data import FILING_HEADER, UNMANAGED def test_valid_task_todo(): task = { 'task': { 'todo': { 'business': { 'cacheId': 1, 'foundingDate': '2007-04-08T00:00:...
true
true
f71a524f93d7cd5915ce95bc5b60b531dbf7e8cf
18,115
py
Python
scons-local/SCons/Tool/GettextCommon.py
bibleuspro/scons
625d446ae8996ff1b3d660c44e2827fc832cf12b
[ "MIT" ]
1
2017-02-10T00:26:44.000Z
2017-02-10T00:26:44.000Z
scons-local/SCons/Tool/GettextCommon.py
bibleuspro/scons
625d446ae8996ff1b3d660c44e2827fc832cf12b
[ "MIT" ]
null
null
null
scons-local/SCons/Tool/GettextCommon.py
bibleuspro/scons
625d446ae8996ff1b3d660c44e2827fc832cf12b
[ "MIT" ]
null
null
null
"""SCons.Tool.GettextCommon module Used by several tools of `gettext` toolset. """ # Copyright (c) 2001 - 2014 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software withou...
42.030162
96
0.599558
__revision__ = "src/engine/SCons/Tool/GettextCommon.py 2014/07/05 09:42:21 garyo" import SCons.Warnings import re
true
true
f71a5321b655a69d95438bc4946e72b3c1c4abfa
5,314
py
Python
scilab2py/utils.py
blink1073/scilab2py
d487828a7087890ce1e035a7c09c4819ff8276c4
[ "MIT" ]
8
2015-10-16T23:28:16.000Z
2020-06-19T18:49:18.000Z
scilab2py/utils.py
blink1073/scilab2py
d487828a7087890ce1e035a7c09c4819ff8276c4
[ "MIT" ]
8
2015-06-25T20:57:56.000Z
2020-04-03T22:33:16.000Z
scilab2py/utils.py
blink1073/scilab2py
d487828a7087890ce1e035a7c09c4819ff8276c4
[ "MIT" ]
6
2015-04-21T12:23:44.000Z
2021-10-01T00:08:47.000Z
""" .. module:: utils :synopsis: Miscellaneous helper constructs .. moduleauthor:: Steven Silvester <steven.silvester@ieee.org> """ import os import inspect import dis import tempfile import sys from .compat import PY2 def _remove_temp_files(dirname): """ Remove the created mat files in ...
26.974619
75
0.585058
import os import inspect import dis import tempfile import sys from .compat import PY2 def _remove_temp_files(dirname): import os import glob for fname in glob.glob(os.path.join(dirname, 'tmp*.mat')): try: os.remove(fname) except OSError: pass ...
true
true
f71a539e1bc739d74244c33e61ec48175b1a0e68
182
py
Python
yatube/yatube/urls.py
Cooke64/hw02_community
10005d05e0142ec9e68b3578d239b6e3da66c0a3
[ "BSD-3-Clause" ]
null
null
null
yatube/yatube/urls.py
Cooke64/hw02_community
10005d05e0142ec9e68b3578d239b6e3da66c0a3
[ "BSD-3-Clause" ]
null
null
null
yatube/yatube/urls.py
Cooke64/hw02_community
10005d05e0142ec9e68b3578d239b6e3da66c0a3
[ "BSD-3-Clause" ]
null
null
null
from django.contrib import admin from django.urls import include, path urlpatterns = [ path('', include('posts.urls', namespace='post')), path('admin/', admin.site.urls), ]
22.75
54
0.686813
from django.contrib import admin from django.urls import include, path urlpatterns = [ path('', include('posts.urls', namespace='post')), path('admin/', admin.site.urls), ]
true
true
f71a53b58b0c817babbdccd697976cfe68604cef
182
py
Python
Chapter 4/4-5.py
lzhang1/BeginningPygame
c239925041a6fa361386f65316ef4bea12c3b482
[ "MIT" ]
43
2015-09-20T02:05:48.000Z
2022-03-01T22:00:43.000Z
Chapter 4/4-5.py
lzhang1/BeginningPygame
c239925041a6fa361386f65316ef4bea12c3b482
[ "MIT" ]
null
null
null
Chapter 4/4-5.py
lzhang1/BeginningPygame
c239925041a6fa361386f65316ef4bea12c3b482
[ "MIT" ]
40
2015-05-19T06:51:13.000Z
2022-03-27T18:11:16.000Z
def lerp(value1, value2, factor): return value1+(value2-value1)*factor print(lerp(100, 200, 0.)) print(lerp(100, 200, 1.)) print(lerp(100, 200, .5)) print(lerp(100, 200, .25))
22.75
40
0.659341
def lerp(value1, value2, factor): return value1+(value2-value1)*factor print(lerp(100, 200, 0.)) print(lerp(100, 200, 1.)) print(lerp(100, 200, .5)) print(lerp(100, 200, .25))
true
true
f71a53e8b0bfef59cec65a1838904cf9ebf97f18
3,838
py
Python
paasta_tools/metrics/metrics_lib.py
xcorail/paasta
3f132c73b45fcf0afc31ddb889205ecd9394d4bb
[ "Apache-2.0" ]
null
null
null
paasta_tools/metrics/metrics_lib.py
xcorail/paasta
3f132c73b45fcf0afc31ddb889205ecd9394d4bb
[ "Apache-2.0" ]
4
2021-02-08T20:42:08.000Z
2021-06-02T00:51:04.000Z
paasta_tools/metrics/metrics_lib.py
eric-erki/An-open-distributed-platform-as-a-service
6769c5601685deb1017910ab8d09109e8e998892
[ "Apache-2.0" ]
null
null
null
import logging import time from abc import ABC from abc import abstractmethod from typing import Any from typing import Callable from typing import Dict from typing import Optional from typing import Type from typing import Union from typing_extensions import Protocol from paasta_tools.utils import load_system_paasta...
29.075758
104
0.683689
import logging import time from abc import ABC from abc import abstractmethod from typing import Any from typing import Callable from typing import Dict from typing import Optional from typing import Type from typing import Union from typing_extensions import Protocol from paasta_tools.utils import load_system_paasta...
true
true
f71a540bc5690d18d0e43343992b3cd169988b23
3,516
py
Python
DDQN.py
TimoleonLatinopoulos/MortalKombatOpenAI
59dc89d1f50dd74690859e5e1fa18701a5246382
[ "MIT" ]
1
2020-08-12T08:16:06.000Z
2020-08-12T08:16:06.000Z
DDQN.py
TimoleonLatinopoulos/MortalKombatOpenAI
59dc89d1f50dd74690859e5e1fa18701a5246382
[ "MIT" ]
null
null
null
DDQN.py
TimoleonLatinopoulos/MortalKombatOpenAI
59dc89d1f50dd74690859e5e1fa18701a5246382
[ "MIT" ]
null
null
null
import tensorflow as tf from keras.activations import relu from keras.initializers import VarianceScaling from keras.layers import Dense, Conv2D, Flatten from keras.losses import logcosh class DDQN: """ Implements a Dueling Dual Deep Q-Network based on the frames of the Retro Environment """ def __init__(sel...
43.95
119
0.674346
import tensorflow as tf from keras.activations import relu from keras.initializers import VarianceScaling from keras.layers import Dense, Conv2D, Flatten from keras.losses import logcosh class DDQN: def __init__(self, n_actions, frame_height=63, frame_width=113, stacked_frames=4, learning_rate=0.00001): ...
true
true
f71a5820fe472212056e6d6abaa0d96203b1f555
939
py
Python
pglast/enums/pg_class.py
fentik/pglast
c4652b3a6098faf26fa8d3a8fd054f23acd72f9c
[ "PostgreSQL" ]
1
2021-08-20T10:09:59.000Z
2021-08-20T10:09:59.000Z
pglast/enums/pg_class.py
fentik/pglast
c4652b3a6098faf26fa8d3a8fd054f23acd72f9c
[ "PostgreSQL" ]
null
null
null
pglast/enums/pg_class.py
fentik/pglast
c4652b3a6098faf26fa8d3a8fd054f23acd72f9c
[ "PostgreSQL" ]
null
null
null
# -*- coding: utf-8 -*- # :Project: pglast -- DO NOT EDIT: automatically extracted from pg_class.h @ 13-2.0.6-0-ga248206 # :Author: Lele Gaifax <lele@metapensiero.it> # :License: GNU General Public License version 3 or later # :Copyright: © 2017-2021 Lele Gaifax # from enum import Enum, IntEnum, IntFlag, auto ...
17.388889
98
0.713525
from enum import Enum, IntEnum, IntFlag, auto try: from enum import StrEnum except ImportError: class StrEnum(str, Enum): pass 'r' RELKIND_INDEX = 'i' RELKIND_SEQUENCE = 'S' RELKIND_TOASTVALUE = 't' RELKIND_VIEW = 'v' RELKIND_MATVIEW = 'm' RELKIND_COMPOSITE_TYPE = 'c' RELKIND_FOR...
true
true
f71a5952c0b0537a3a97b410e481a15d260c9393
7,086
py
Python
d3rlpy/models/torch/encoders.py
meokz/d3rlpy
40504e2d8b424547558ab82786c523e8f4626a82
[ "MIT" ]
2
2021-04-21T08:19:29.000Z
2021-05-17T09:08:06.000Z
d3rlpy/models/torch/encoders.py
meokz/d3rlpy
40504e2d8b424547558ab82786c523e8f4626a82
[ "MIT" ]
null
null
null
d3rlpy/models/torch/encoders.py
meokz/d3rlpy
40504e2d8b424547558ab82786c523e8f4626a82
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F def _create_activation(activation_type): if activation_type == 'relu': return torch.relu elif activation_type == 'swish': return lambda x: x * torch.sigmoid(x) raise ValueError('invalid activation_type.') def create_encod...
34.565854
75
0.540785
import torch import torch.nn as nn import torch.nn.functional as F def _create_activation(activation_type): if activation_type == 'relu': return torch.relu elif activation_type == 'swish': return lambda x: x * torch.sigmoid(x) raise ValueError('invalid activation_type.') def create_encod...
true
true
f71a5d40d4f7e3452efff0eee8f88d7ba699febc
1,600
py
Python
status.py
Drakulix/plugin.program.steam.streaming
ce2bc62e68dee7ebc249a075bd57e05586834702
[ "MIT" ]
4
2016-06-19T18:23:09.000Z
2019-02-08T18:00:20.000Z
status.py
Drakulix/plugin.program.steam.streaming
ce2bc62e68dee7ebc249a075bd57e05586834702
[ "MIT" ]
null
null
null
status.py
Drakulix/plugin.program.steam.streaming
ce2bc62e68dee7ebc249a075bd57e05586834702
[ "MIT" ]
null
null
null
import xbmc import xbmcgui import sys import urllib import utils from stream_api import app_state class Updater(object): installed = False percent = 0 title1 = "" def update(self, app): if app["state"] == 0 or app["state"] == 2 or app["state"] == 258 or app["state"] == 1282 or app["state"] ...
32.653061
171
0.605
import xbmc import xbmcgui import sys import urllib import utils from stream_api import app_state class Updater(object): installed = False percent = 0 title1 = "" def update(self, app): if app["state"] == 0 or app["state"] == 2 or app["state"] == 258 or app["state"] == 1282 or app["state"] ...
false
true
f71a5d5dd300e03985a3ca77a605a2e70ab1f462
121,589
py
Python
tests/git_cl_test.py
2youyou2/depot_tools
8b94108e684872a89f7108f51ba74f01220d64fa
[ "BSD-3-Clause" ]
7
2018-09-26T11:10:40.000Z
2020-12-19T13:32:12.000Z
tests/git_cl_test.py
2youyou2/depot_tools
8b94108e684872a89f7108f51ba74f01220d64fa
[ "BSD-3-Clause" ]
null
null
null
tests/git_cl_test.py
2youyou2/depot_tools
8b94108e684872a89f7108f51ba74f01220d64fa
[ "BSD-3-Clause" ]
4
2020-03-27T07:49:45.000Z
2020-11-17T02:46:42.000Z
#!/usr/bin/env python # Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for git_cl.py.""" import contextlib import datetime import json import logging import os import StringIO import sys ...
38.759643
80
0.577042
import contextlib import datetime import json import logging import os import StringIO import sys import tempfile import unittest import urlparse sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from testing_support.auto_stub import TestCase import metrics metrics.DISABLE_METRIC...
true
true
f71a5da87d38b68176352916c419991c5e418c42
15,214
py
Python
treebuilder/partptr/train.py
NLP-Discourse-SoochowU/TDDiscourseParser
2f9c7cef85c564c47b368ee4935caf1fad7c598d
[ "Apache-2.0" ]
9
2020-11-24T01:16:01.000Z
2022-01-26T09:37:00.000Z
treebuilder/partptr/train.py
NLP-Discourse-SoochowU/TDDiscourseParser
2f9c7cef85c564c47b368ee4935caf1fad7c598d
[ "Apache-2.0" ]
2
2020-11-29T17:49:49.000Z
2021-05-20T02:53:25.000Z
treebuilder/partptr/train.py
NLP-Discourse-SoochowU/TDDiscourseParser
2f9c7cef85c564c47b368ee4935caf1fad7c598d
[ "Apache-2.0" ]
1
2022-01-26T11:00:33.000Z
2022-01-26T11:00:33.000Z
# coding: UTF-8 import argparse import logging import random import torch import copy import numpy as np from dataset import CDTB from collections import Counter from itertools import chain from structure.vocab import Vocab, Label from structure.nodes import node_type_filter, EDU, Relation, Sentence, TEXT f...
46.95679
121
0.63481
import argparse import logging import random import torch import copy import numpy as np from dataset import CDTB from collections import Counter from itertools import chain from structure.vocab import Vocab, Label from structure.nodes import node_type_filter, EDU, Relation, Sentence, TEXT from treebuilder....
true
true
f71a5e69e97dfd4fa78fe7475a89e51f71597592
2,911
py
Python
migrations/env.py
kvshravan/sample-platform
f3cf050d21df9d8e4b3746a5a32d273d839c4898
[ "0BSD" ]
null
null
null
migrations/env.py
kvshravan/sample-platform
f3cf050d21df9d8e4b3746a5a32d273d839c4898
[ "0BSD" ]
null
null
null
migrations/env.py
kvshravan/sample-platform
f3cf050d21df9d8e4b3746a5a32d273d839c4898
[ "0BSD" ]
null
null
null
from __future__ import with_statement import logging from logging.config import fileConfig from alembic import context # add your model's MetaData object here # for 'autogenerate' support # from myapp import mymodel # target_metadata = mymodel.Base.metadata from flask import current_app from sqlalchemy import engine_...
30.642105
77
0.710752
from __future__ import with_statement import logging from logging.config import fileConfig from alembic import context # for 'autogenerate' support # from myapp import mymodel # target_metadata = mymodel.Base.metadata from flask import current_app from sqlalchemy import engine_from_config, pool # this is the Alembi...
true
true
f71a5edef5f756dd35102d293503bdea8a7fd387
973
py
Python
v1/blacklist.py
benjaveri/phonescreen
dd34df8e2f66c59032089f751223e651fd263cac
[ "BSD-3-Clause" ]
1
2020-05-30T23:24:55.000Z
2020-05-30T23:24:55.000Z
v1/blacklist.py
benjaveri/phonescreen
dd34df8e2f66c59032089f751223e651fd263cac
[ "BSD-3-Clause" ]
null
null
null
v1/blacklist.py
benjaveri/phonescreen
dd34df8e2f66c59032089f751223e651fd263cac
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python2 # BSD 3-Clause License -> see /LICENSE # Copyright (c) 2017-2020 by Ben de Waal, All rights reserved. # import sys from v1.interfaces import * # blacklist.py [del|delete|remove] [number] PRIMARY = "blacklist" SECONDARY = "whitelist" REMOVE = (len(sys.argv) > 2) and sys.argv[1] in ["del","delet...
33.551724
130
0.642343
import sys from v1.interfaces import * PRIMARY = "blacklist" SECONDARY = "whitelist" REMOVE = (len(sys.argv) > 2) and sys.argv[1] in ["del","delete","remove"] NUMBER = (sys.argv[2] if REMOVE else sys.argv[1]) if len(sys.argv) > 1 else None db = Database("numbers.sqlite") if NUMBER: with db as conn: ...
false
true
f71a5f10643eea16f3e9e3317d0eb53ee89dcc29
4,484
py
Python
setup.py
btcdrak/mitmproxy
cacee3871c6a9f0be7127f3c790e09a1daaf8490
[ "MIT" ]
1
2018-03-31T17:16:07.000Z
2018-03-31T17:16:07.000Z
setup.py
btcdrak/mitmproxy
cacee3871c6a9f0be7127f3c790e09a1daaf8490
[ "MIT" ]
null
null
null
setup.py
btcdrak/mitmproxy
cacee3871c6a9f0be7127f3c790e09a1daaf8490
[ "MIT" ]
4
2018-04-18T13:17:01.000Z
2021-02-21T17:08:33.000Z
from setuptools import setup, find_packages from codecs import open import os from netlib import version # Based on https://github.com/pypa/sampleproject/blob/master/setup.py # and https://python-packaging-user-guide.readthedocs.org/ here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'RE...
35.587302
125
0.533898
from setuptools import setup, find_packages from codecs import open import os from netlib import version here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.rst'), encoding='utf-8') as f: long_description = f.read() setup( name="mitmproxy", version=version.VERSION, ...
true
true
f71a5f3662e8e2e441c743a6c1f62a562f34d623
2,570
py
Python
homeassistant/components/fibaro/binary_sensor.py
VirtualL/home-assistant
301829d02be8d865ab46c8901ac046d060849320
[ "Apache-2.0" ]
2
2017-10-26T19:43:55.000Z
2017-12-30T23:29:00.000Z
homeassistant/components/fibaro/binary_sensor.py
VirtualL/home-assistant
301829d02be8d865ab46c8901ac046d060849320
[ "Apache-2.0" ]
3
2021-09-08T03:34:57.000Z
2022-03-12T00:59:48.000Z
homeassistant/components/fibaro/binary_sensor.py
VirtualL/home-assistant
301829d02be8d865ab46c8901ac046d060849320
[ "Apache-2.0" ]
1
2019-06-19T07:43:11.000Z
2019-06-19T07:43:11.000Z
"""Support for Fibaro binary sensors.""" import logging from homeassistant.components.binary_sensor import ( ENTITY_ID_FORMAT, BinarySensorDevice) from homeassistant.const import CONF_DEVICE_CLASS, CONF_ICON from . import FIBARO_DEVICES, FibaroDevice DEPENDENCIES = ['fibaro'] _LOGGER = logging.getLogger(__name_...
32.948718
73
0.643191
import logging from homeassistant.components.binary_sensor import ( ENTITY_ID_FORMAT, BinarySensorDevice) from homeassistant.const import CONF_DEVICE_CLASS, CONF_ICON from . import FIBARO_DEVICES, FibaroDevice DEPENDENCIES = ['fibaro'] _LOGGER = logging.getLogger(__name__) SENSOR_TYPES = { 'com.fibaro.floo...
true
true
f71a5f6bde441477b83381af68fd302a858044d3
338
py
Python
fixture_packages/no_mp/setup.py
DuncanBetts/morepath
acad10489b051df9c512f6735a9338854745a599
[ "BSD-3-Clause" ]
null
null
null
fixture_packages/no_mp/setup.py
DuncanBetts/morepath
acad10489b051df9c512f6735a9338854745a599
[ "BSD-3-Clause" ]
null
null
null
fixture_packages/no_mp/setup.py
DuncanBetts/morepath
acad10489b051df9c512f6735a9338854745a599
[ "BSD-3-Clause" ]
null
null
null
import os from setuptools import setup, find_packages setup(name='no_mp', version = '0.1.dev0', description="No Mp Test Fixture", author="Martijn Faassen", author_email="faassen@startifact.com", license="BSD", packages=find_packages(), zip_safe=False, install_requires=[ ...
22.533333
44
0.62426
import os from setuptools import setup, find_packages setup(name='no_mp', version = '0.1.dev0', description="No Mp Test Fixture", author="Martijn Faassen", author_email="faassen@startifact.com", license="BSD", packages=find_packages(), zip_safe=False, install_requires=[ ...
true
true
f71a60c2e83e89f0d85d50940ea141974ce4e00d
5,431
py
Python
homeassistant/components/geo_rss_events/sensor.py
VirtualL/home-assistant
301829d02be8d865ab46c8901ac046d060849320
[ "Apache-2.0" ]
null
null
null
homeassistant/components/geo_rss_events/sensor.py
VirtualL/home-assistant
301829d02be8d865ab46c8901ac046d060849320
[ "Apache-2.0" ]
3
2021-09-08T03:34:57.000Z
2022-03-12T00:59:48.000Z
homeassistant/components/geo_rss_events/sensor.py
VirtualL/home-assistant
301829d02be8d865ab46c8901ac046d060849320
[ "Apache-2.0" ]
null
null
null
""" Generic GeoRSS events service. Retrieves current events (typically incidents or alerts) in GeoRSS format, and shows information on events filtered by distance to the HA instance's location and grouped by category. For more details about this platform, please refer to the documentation at https://home-assistant.io...
35.730263
79
0.645369
import logging from datetime import timedelta import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_UNIT_OF_MEASUREMENT, CONF_NAME, CONF_LATITUDE, CONF_LONGITUDE, CONF_RADIUS, CONF_URL) f...
true
true
f71a60d6ac54cd0f6a8035a072455dd7fe920d40
3,670
py
Python
akshare/stock/stock_rank_forecast.py
J-Z-Z/akshare
0a9ca71b381a272e2f56211e455ff2493dfed17a
[ "MIT" ]
721
2021-09-21T12:10:33.000Z
2022-03-31T09:47:01.000Z
akshare/stock/stock_rank_forecast.py
J-Z-Z/akshare
0a9ca71b381a272e2f56211e455ff2493dfed17a
[ "MIT" ]
135
2021-09-21T12:07:54.000Z
2022-03-31T14:15:36.000Z
akshare/stock/stock_rank_forecast.py
J-Z-Z/akshare
0a9ca71b381a272e2f56211e455ff2493dfed17a
[ "MIT" ]
234
2021-09-21T12:16:27.000Z
2022-03-31T09:47:04.000Z
#!/usr/bin/env python # -*- coding:utf-8 -*- """ Date: 2021/9/12 18:29 Desc: 巨潮资讯-数据中心-评级预测-投资评级 http://webapi.cninfo.com.cn/#/thematicStatistics?name=%E6%8A%95%E8%B5%84%E8%AF%84%E7%BA%A7 """ import time from py_mini_racer import py_mini_racer import requests import pandas as pd js_str = """ function mcode(input) ...
33.063063
139
0.495368
import time from py_mini_racer import py_mini_racer import requests import pandas as pd js_str = """ function mcode(input) { var keyStr = "ABCDEFGHIJKLMNOP" + "QRSTUVWXYZabcdef" + "ghijklmnopqrstuv" + "wxyz0123456789+/" + "="; var output = ""; var chr1, chr...
true
true
f71a61f85926c5c06fd0a3030685cd6256d6daab
7,369
py
Python
coremltools/converters/mil/mil/passes/conv_scale_fusion.py
LaudateCorpus1/coremltools
777a4460d6823e5e91dea4fa3eacb0b11c7d5dfc
[ "BSD-3-Clause" ]
null
null
null
coremltools/converters/mil/mil/passes/conv_scale_fusion.py
LaudateCorpus1/coremltools
777a4460d6823e5e91dea4fa3eacb0b11c7d5dfc
[ "BSD-3-Clause" ]
null
null
null
coremltools/converters/mil/mil/passes/conv_scale_fusion.py
LaudateCorpus1/coremltools
777a4460d6823e5e91dea4fa3eacb0b11c7d5dfc
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2021, Apple Inc. All rights reserved. # # Use of this source code is governed by a BSD-3-clause license that can be # found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause import numpy as np from coremltools.converters.mil.mil.passes.pass_registry import register_pass fro...
36.122549
140
0.627086
import numpy as np from coremltools.converters.mil.mil.passes.pass_registry import register_pass from coremltools.converters.mil.mil.passes.graph_pass import AbstractGraphPass from coremltools.converters.mil.mil import Builder as mb def _try_to_transform(conv_op, scale_op, block): if scale_op.x.val is...
true
true
f71a6261577109f2928b029f3952cbc9f28b4dcc
997
py
Python
kubernetes/test/test_v1_ceph_fs_volume_source.py
scele/kubernetes-client-python
9e982cbdb5f19dc1a3935a75bdd92288f3b807fb
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_ceph_fs_volume_source.py
scele/kubernetes-client-python
9e982cbdb5f19dc1a3935a75bdd92288f3b807fb
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_v1_ceph_fs_volume_source.py
scele/kubernetes-client-python
9e982cbdb5f19dc1a3935a75bdd92288f3b807fb
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.8.2 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys im...
22.155556
105
0.719157
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.v1_ceph_fs_volume_source import V1CephFSVolumeSource class TestV1CephFSVolumeSource(unittest.TestCase): def setUp(self): ...
true
true
f71a62b2ff79265703f83e0534fed29f3684b334
14,167
py
Python
notebooks/39.1-BDP-unbiased-clustering.py
zeou1/maggot_models
4e1b518c2981ab1ca9607099c3813e8429d94ca4
[ "BSD-3-Clause" ]
null
null
null
notebooks/39.1-BDP-unbiased-clustering.py
zeou1/maggot_models
4e1b518c2981ab1ca9607099c3813e8429d94ca4
[ "BSD-3-Clause" ]
null
null
null
notebooks/39.1-BDP-unbiased-clustering.py
zeou1/maggot_models
4e1b518c2981ab1ca9607099c3813e8429d94ca4
[ "BSD-3-Clause" ]
null
null
null
# %% [markdown] # # Imports import json import os import warnings from operator import itemgetter from pathlib import Path import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from joblib import Parallel, delayed from joblib.parallel import Parallel, delayed from sklearn.metrics...
29.150206
88
0.673678
son import os import warnings from operator import itemgetter from pathlib import Path import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns from joblib import Parallel, delayed from joblib.parallel import Parallel, delayed from sklearn.metrics import adjusted_rand_score import ...
true
true
f71a6368df82f8cba23fa6c4aacdc3254b4af1ca
702
py
Python
Cklib/Filter.py
kamphaus/HPCGrunner
1885ee87bf02bab51cc71d560d86217c79c5f46b
[ "MIT" ]
null
null
null
Cklib/Filter.py
kamphaus/HPCGrunner
1885ee87bf02bab51cc71d560d86217c79c5f46b
[ "MIT" ]
null
null
null
Cklib/Filter.py
kamphaus/HPCGrunner
1885ee87bf02bab51cc71d560d86217c79c5f46b
[ "MIT" ]
null
null
null
import copy def filterRemaining(remaining, environment): returned = copy.copy(remaining) for i in range(len(returned)-1, -1, -1): r = returned[i] if any(not(r[e]==environment[e]) for e in environment if e in r): del returned[i] else: runs = copy.copy(r['runs']) ...
30.521739
73
0.474359
import copy def filterRemaining(remaining, environment): returned = copy.copy(remaining) for i in range(len(returned)-1, -1, -1): r = returned[i] if any(not(r[e]==environment[e]) for e in environment if e in r): del returned[i] else: runs = copy.copy(r['runs']) ...
true
true
f71a637927490a1a25d4576addd9a32c1d6e1ce3
2,617
py
Python
acregnet/data.py
luoyi1hao/ACRN_Chest_X-ray_IA
b2ecaf88e6b1bb59101fd2d611bf9d1e6716367a
[ "MIT" ]
1
2021-09-23T10:37:53.000Z
2021-09-23T10:37:53.000Z
acregnet/data.py
luoyi1hao/ACRN_Chest_X-ray_IA
b2ecaf88e6b1bb59101fd2d611bf9d1e6716367a
[ "MIT" ]
null
null
null
acregnet/data.py
luoyi1hao/ACRN_Chest_X-ray_IA
b2ecaf88e6b1bb59101fd2d611bf9d1e6716367a
[ "MIT" ]
null
null
null
import os import numpy as np from sklearn.model_selection import train_test_split import cv2 class DataHandler(object): def _load_data(im_fnames, add_channel_dim=True): im0 = cv2.imread(im_fnames[0], 0) im_batch = np.zeros((len(im_fnames),) + im0.shape) im_batch[0] = im0 for i, fn...
34.893333
76
0.610623
import os import numpy as np from sklearn.model_selection import train_test_split import cv2 class DataHandler(object): def _load_data(im_fnames, add_channel_dim=True): im0 = cv2.imread(im_fnames[0], 0) im_batch = np.zeros((len(im_fnames),) + im0.shape) im_batch[0] = im0 for i, fn...
true
true
f71a63e9f0ba5a8f65374e8816ee7e58d28c35bf
4,706
py
Python
gatenlp/processing/annotator.py
gitter-badger/python-gatenlp
bfed863b404cfd62c98a6cb08ad287c3b4b6ccae
[ "Apache-2.0" ]
null
null
null
gatenlp/processing/annotator.py
gitter-badger/python-gatenlp
bfed863b404cfd62c98a6cb08ad287c3b4b6ccae
[ "Apache-2.0" ]
null
null
null
gatenlp/processing/annotator.py
gitter-badger/python-gatenlp
bfed863b404cfd62c98a6cb08ad287c3b4b6ccae
[ "Apache-2.0" ]
null
null
null
""" Module with the base class and supporting functions for all annotators. Any callable that can be called by passing a document can be used as an annotator, but the base class "Annotator" defined in here is designed to allow for a more flexible approach to do things. """ from abc import ABC, abstractmethod __pdoc__ ...
41.280702
116
0.679558
from abc import ABC, abstractmethod __pdoc__ = {"Annotator.__call__": True} class Annotator(ABC): @abstractmethod def __call__(self, doc, **kwargs): raise Exception("This method must be implemented!") def pipe(self, documents, **kwargs): for el in documents: if el is not Non...
true
true
f71a650b60dea15af020b9d6037cca6aa1d1b85d
3,943
py
Python
muti_thread.py
fanlushuai/jd-assistant
ac9fce2cc87d2a6702743c28d4a3eeb3ee99f9ac
[ "MIT" ]
2
2021-01-13T00:16:30.000Z
2021-01-31T01:34:57.000Z
muti_thread.py
fanlushuai/jd-assistant
ac9fce2cc87d2a6702743c28d4a3eeb3ee99f9ac
[ "MIT" ]
null
null
null
muti_thread.py
fanlushuai/jd-assistant
ac9fce2cc87d2a6702743c28d4a3eeb3ee99f9ac
[ "MIT" ]
1
2020-12-16T12:10:06.000Z
2020-12-16T12:10:06.000Z
import functools import queue import random import time from concurrent.futures import ThreadPoolExecutor from itertools import repeat from log import logger shut_down_pool_queue = queue.Queue() # sys_thread_pool = ThreadPoolExecutor(max_workers=2) def shutdown_listener(): for _ in repeat(None): t_poo...
29.425373
88
0.609942
import functools import queue import random import time from concurrent.futures import ThreadPoolExecutor from itertools import repeat from log import logger shut_down_pool_queue = queue.Queue() def shutdown_listener(): for _ in repeat(None): t_pool = shut_down_pool_queue.get() t_pool.shutdow...
true
true
f71a66863303bb27d7b14ce461ffa23d7ac9b033
534
py
Python
web_api/api/migrations/0103_gateway_mqtt_password.py
IoT-BA/project_noe-backend
4b63b4604dd9f3d53a1bdb6ad8e6ad20fe53ebd9
[ "MIT" ]
2
2017-02-27T07:41:18.000Z
2017-03-05T22:13:39.000Z
web_api/api/migrations/0103_gateway_mqtt_password.py
IoT-BA/lorawan-sk-backend
4b63b4604dd9f3d53a1bdb6ad8e6ad20fe53ebd9
[ "MIT" ]
null
null
null
web_api/api/migrations/0103_gateway_mqtt_password.py
IoT-BA/lorawan-sk-backend
4b63b4604dd9f3d53a1bdb6ad8e6ad20fe53ebd9
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-01-22 09:20 from __future__ import unicode_literals import api.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0102_auto_20170121_2038'), ] operations = [ migration...
24.272727
116
0.651685
from __future__ import unicode_literals import api.models from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0102_auto_20170121_2038'), ] operations = [ migrations.AddField( model_name='gateway', name='mqtt...
true
true
f71a677c5c16ac76e38db599d0a5eac2507bf63b
747
py
Python
ScriptEngine/app.py
daizhaolin/scriptengine
eb3aee0381193d5550d31b59574ca60a4706cb25
[ "BSD-3-Clause" ]
null
null
null
ScriptEngine/app.py
daizhaolin/scriptengine
eb3aee0381193d5550d31b59574ca60a4706cb25
[ "BSD-3-Clause" ]
null
null
null
ScriptEngine/app.py
daizhaolin/scriptengine
eb3aee0381193d5550d31b59574ca60a4706cb25
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: UTF-8 -*- ''' Created on 2020-03-08 @author: daizhaolin ''' from .config import Config from .helper import cached_property from .logging import create_logger class ScriptEngine(object): def __init__(self): self.name = __name__ self.config = Config({ 'DEBUG': False ...
19.153846
48
0.630522
from .config import Config from .helper import cached_property from .logging import create_logger class ScriptEngine(object): def __init__(self): self.name = __name__ self.config = Config({ 'DEBUG': False }) self.extensions = dict() self.controller_queue = ...
true
true
f71a679ff4b8d5cbe23ab5310c5a07b000075f19
8,622
py
Python
examples/tutorials/advanced/websockets-example-MNIST-parallel/run_websocket_client.py
theoptips/PySyft
4b68c3c6fbe0c18cdf87dfe6ddc3c2071a71f1cc
[ "Apache-2.0" ]
1
2019-07-14T01:18:34.000Z
2019-07-14T01:18:34.000Z
examples/tutorials/advanced/websockets-example-MNIST-parallel/run_websocket_client.py
theoptips/PySyft
4b68c3c6fbe0c18cdf87dfe6ddc3c2071a71f1cc
[ "Apache-2.0" ]
null
null
null
examples/tutorials/advanced/websockets-example-MNIST-parallel/run_websocket_client.py
theoptips/PySyft
4b68c3c6fbe0c18cdf87dfe6ddc3c2071a71f1cc
[ "Apache-2.0" ]
1
2021-02-12T12:11:44.000Z
2021-02-12T12:11:44.000Z
import torch import torch.nn as nn import torch.nn.functional as F from torchvision import transforms, datasets import logging import argparse import sys import asyncio import numpy as np import syft as sy from syft import workers from syft.frameworks.torch.federated import utils logger = logging.getLogger(__name__)...
33.034483
106
0.63164
import torch import torch.nn as nn import torch.nn.functional as F from torchvision import transforms, datasets import logging import argparse import sys import asyncio import numpy as np import syft as sy from syft import workers from syft.frameworks.torch.federated import utils logger = logging.getLogger(__name__)...
true
true
f71a67e87a44037f0e910996ddb201d1c1d0ca36
373
py
Python
Lib/site-packages/spyder/plugins/layout/__init__.py
hirorin-demon/hirorin-streamlit
03fbb6f03ec94f909d451e708a3b30b177607695
[ "0BSD" ]
1
2021-06-20T14:52:40.000Z
2021-06-20T14:52:40.000Z
spyder/plugins/layout/__init__.py
Pancakerr/spyder
34a9878bba97f427fbdd7b4a6d77ac0651327565
[ "MIT" ]
1
2020-11-02T21:11:19.000Z
2020-11-02T21:11:19.000Z
spyder/plugins/layout/__init__.py
Pancakerr/spyder
34a9878bba97f427fbdd7b4a6d77ac0651327565
[ "MIT" ]
1
2020-06-14T07:03:50.000Z
2020-06-14T07:03:50.000Z
# -*- coding: utf-8 -*- # # Copyright © Spyder Project Contributors # Licensed under the terms of the MIT License # (see spyder/__init__.py for details) """ spyder.plugins.layout ===================== Layout plugin. """ from spyder.plugins.layout.plugin import Layout # The following statement is required to be able...
20.722222
74
0.699732
from spyder.plugins.layout.plugin import Layout PLUGIN_CLASSES = [Layout]
true
true
f71a685556aab5e675c6c3f4e360e0b1d91795d0
5,029
py
Python
nezzle/graphics/arrows/basearrow.py
dwgoon/nezzle
c69d111ae5e57ee2a7db85e14299c23d3b98a6d5
[ "MIT" ]
2
2021-10-06T08:54:02.000Z
2021-10-06T16:17:18.000Z
nezzle/graphics/arrows/basearrow.py
dwgoon/nezzle
c69d111ae5e57ee2a7db85e14299c23d3b98a6d5
[ "MIT" ]
null
null
null
nezzle/graphics/arrows/basearrow.py
dwgoon/nezzle
c69d111ae5e57ee2a7db85e14299c23d3b98a6d5
[ "MIT" ]
null
null
null
from qtpy.QtCore import QPointF from nezzle.utils import TriggerDict class BaseArrow(object): ITEM_TYPE = 'BASE_HEAD' DEFAULT_OFFSET = 4 def __init__(self, width, height, offset): self._attr = TriggerDict() self._attr['ITEM_TYPE'] = self.ITEM_TYPE self._offset = offset ...
26.329843
95
0.611652
from qtpy.QtCore import QPointF from nezzle.utils import TriggerDict class BaseArrow(object): ITEM_TYPE = 'BASE_HEAD' DEFAULT_OFFSET = 4 def __init__(self, width, height, offset): self._attr = TriggerDict() self._attr['ITEM_TYPE'] = self.ITEM_TYPE self._offset = offset ...
true
true
f71a69117f18301e660b95414a5b6b4799351cfc
14,078
py
Python
glance/tests/functional/test_api.py
ilay09/glance
60814cb577401c121d5d786980b3b801be5f4e9e
[ "Apache-2.0" ]
null
null
null
glance/tests/functional/test_api.py
ilay09/glance
60814cb577401c121d5d786980b3b801be5f4e9e
[ "Apache-2.0" ]
null
null
null
glance/tests/functional/test_api.py
ilay09/glance
60814cb577401c121d5d786980b3b801be5f4e9e
[ "Apache-2.0" ]
null
null
null
# 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...
38.359673
78
0.533954
import httplib2 from oslo_serialization import jsonutils from six.moves import http_client from glance.tests import functional class TestApiVersions(functional.FunctionalTest): def test_version_configurations(self): self.start_servers(**self.__dict__.copy()) url = 'htt...
true
true
f71a691a5ad95f1250cb884753aea776f113110d
7,737
py
Python
interface.py
Owiti-Charles/Password-Locker
3e2a0fd883d033fe784af387b52d7360a1157d34
[ "MIT" ]
3
2019-08-31T08:48:15.000Z
2021-12-14T08:21:05.000Z
interface.py
Owiti-Charles/Password-Locker
3e2a0fd883d033fe784af387b52d7360a1157d34
[ "MIT" ]
null
null
null
interface.py
Owiti-Charles/Password-Locker
3e2a0fd883d033fe784af387b52d7360a1157d34
[ "MIT" ]
24
2020-03-09T10:42:17.000Z
2022-02-20T19:25:56.000Z
#!/usr/bin/env python3.6 from passlock import User, Credentials def function(): print(" ____ _____ _ ") print(" | _ \ / ____|| | ") print(" | |_) ) ____ ___ ___ /...
39.676923
217
0.569342
from passlock import User, Credentials def function(): print(" ____ _____ _ ") print(" | _ \ / ____|| | ") print(" | |_) ) ____ ___ ___ / ____ | |__ _____ _...
true
true
f71a697a4e4fb47cb796149291e6b50fd45b68f7
2,233
py
Python
v1.0.0.test/toontown/toon/NPCForceAcknowledge.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
4
2019-07-01T15:46:43.000Z
2021-07-23T16:26:48.000Z
v1.0.0.test/toontown/toon/NPCForceAcknowledge.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
1
2019-06-29T03:40:05.000Z
2021-06-13T01:15:16.000Z
v1.0.0.test/toontown/toon/NPCForceAcknowledge.py
TTOFFLINE-LEAK/ttoffline
bb0e91704a755d34983e94288d50288e46b68380
[ "MIT" ]
4
2019-07-28T21:18:46.000Z
2021-02-25T06:37:25.000Z
from panda3d.core import * from toontown.toontowngui import TTDialog from toontown.toonbase import TTLocalizer from direct.gui import DirectLabel from toontown.quest import Quests class NPCForceAcknowledge: def __init__(self, doneEvent): self.doneEvent = doneEvent self.dialog = None return...
42.942308
164
0.617555
from panda3d.core import * from toontown.toontowngui import TTDialog from toontown.toonbase import TTLocalizer from direct.gui import DirectLabel from toontown.quest import Quests class NPCForceAcknowledge: def __init__(self, doneEvent): self.doneEvent = doneEvent self.dialog = None return...
true
true
f71a6b6d7ebfa629b63064b6a06dfb7bca79a040
2,157
py
Python
htmltreediff/edit_script_runner.py
nomadicfm/htmltreediff
02a27b2339d5a9a96902eed5d12bca1b755bb109
[ "BSD-3-Clause" ]
3
2015-04-04T20:35:17.000Z
2021-08-06T16:51:09.000Z
htmltreediff/edit_script_runner.py
tex/htmltreediff
ce5a94edd0cfb05ed5130aaed3f06c63668df127
[ "BSD-3-Clause" ]
14
2015-01-15T16:03:14.000Z
2020-03-23T16:29:02.000Z
htmltreediff/edit_script_runner.py
tex/htmltreediff
ce5a94edd0cfb05ed5130aaed3f06c63668df127
[ "BSD-3-Clause" ]
2
2017-05-16T04:17:46.000Z
2018-04-30T20:05:32.000Z
from xml.dom import Node from htmltreediff.util import ( get_child, get_location, remove_node, insert_or_append, ) class EditScriptRunner(object): def __init__(self, dom, edit_script): self.dom = dom self.edit_script = edit_script self.del_nodes = [] self.ins_nodes...
30.814286
69
0.601298
from xml.dom import Node from htmltreediff.util import ( get_child, get_location, remove_node, insert_or_append, ) class EditScriptRunner(object): def __init__(self, dom, edit_script): self.dom = dom self.edit_script = edit_script self.del_nodes = [] self.ins_nodes...
true
true
f71a6bcaeb8ae82f35824738ce05e63e951e4767
4,632
py
Python
archives/src/episode7/he_is_back.py
NovelBox/sherlock-no-adventure
9fe59ade8446d5c27e7bd390de9de42e26fc63a1
[ "MIT" ]
null
null
null
archives/src/episode7/he_is_back.py
NovelBox/sherlock-no-adventure
9fe59ade8446d5c27e7bd390de9de42e26fc63a1
[ "MIT" ]
null
null
null
archives/src/episode7/he_is_back.py
NovelBox/sherlock-no-adventure
9fe59ade8446d5c27e7bd390de9de42e26fc63a1
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ''' Episode 7-3 ''' import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) sys.path.append('storybuilder') from storybuilder.builder.world import World # DEFINE TITLE = "英雄の帰還" # NOTE: outlines ABSTRACT = """ 変身して$sherlockたちを追い詰める$jake。しかし$sherlockの機転で工場に穴を開け、...
44.970874
91
0.655009
import os import sys sys.path.append(os.path.join(os.path.dirname(__file__), '../..')) sys.path.append('storybuilder') from storybuilder.builder.world import World TITLE = "英雄の帰還" ABSTRACT = """ 変身して$sherlockたちを追い詰める$jake。しかし$sherlockの機転で工場に穴を開け、日光を浴びせかけることで$jakeは皮膚から大量に出血し、爆発した。 その爆音を聞いて$limeたちが駆けつける。$maryが身を挺し...
true
true
f71a6d9110d6e2d9754fc6dd198852e4d0c18cb8
14,416
py
Python
tmapi/models/topic_map.py
ajenhl/django-tmapi
02f009e1b508218cf330ca7748c3a1dd110f3e8d
[ "Apache-2.0" ]
2
2015-03-22T03:23:36.000Z
2017-01-08T10:57:18.000Z
tmapi/models/topic_map.py
ajenhl/django-tmapi
02f009e1b508218cf330ca7748c3a1dd110f3e8d
[ "Apache-2.0" ]
null
null
null
tmapi/models/topic_map.py
ajenhl/django-tmapi
02f009e1b508218cf330ca7748c3a1dd110f3e8d
[ "Apache-2.0" ]
1
2020-12-28T04:40:34.000Z
2020-12-28T04:40:34.000Z
# Copyright 2011 Jamie Norrish (jamie@artefact.org.nz) # # 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...
34.821256
77
0.629231
from django.contrib.sites.models import Site from django.db import models from tmapi.exceptions import ModelConstraintException, \ UnsupportedOperationException from tmapi.indices.literal_index import LiteralIndex from tmapi.indices.scoped_index import ScopedIndex from tmapi.indices.type_instance_ind...
true
true
f71a6db30e3de5c2849fe9a5b19812ba331899e0
2,275
py
Python
python-sdk/tutorials/automl-with-azureml/forecasting-recipes-univariate/forecasting_script.py
Ali-ry/azureml-examples
817ae89d2766dcafd70937a22cb3a80f100a2906
[ "MIT" ]
null
null
null
python-sdk/tutorials/automl-with-azureml/forecasting-recipes-univariate/forecasting_script.py
Ali-ry/azureml-examples
817ae89d2766dcafd70937a22cb3a80f100a2906
[ "MIT" ]
null
null
null
python-sdk/tutorials/automl-with-azureml/forecasting-recipes-univariate/forecasting_script.py
Ali-ry/azureml-examples
817ae89d2766dcafd70937a22cb3a80f100a2906
[ "MIT" ]
null
null
null
""" This is the script that is executed on the compute instance. It relies on the model.pkl file which is uploaded along with this script to the compute instance. """ import argparse from azureml.core import Dataset, Run from azureml.automl.core.shared.constants import TimeSeriesInternal from sklearn.external...
32.042254
78
0.744176
import argparse from azureml.core import Dataset, Run from azureml.automl.core.shared.constants import TimeSeriesInternal from sklearn.externals import joblib parser = argparse.ArgumentParser() parser.add_argument( "--target_column_name", type=str, dest="target_column_name", help="Target Co...
true
true
f71a6e91a09965fe94395d5877040ab4bd936107
4,760
py
Python
matching/matching.py
nielsbril/best
8a902293605f1bee1abf3ca66ae3708706658772
[ "MIT" ]
21
2019-07-02T05:54:22.000Z
2021-04-07T13:52:50.000Z
matching/matching.py
nielsbril/best
8a902293605f1bee1abf3ca66ae3708706658772
[ "MIT" ]
55
2019-07-03T18:59:26.000Z
2020-12-15T08:10:00.000Z
matching/matching.py
nielsbril/best
8a902293605f1bee1abf3ca66ae3708706658772
[ "MIT" ]
9
2019-09-10T13:38:46.000Z
2021-09-01T08:02:42.000Z
import pandas as pd import argparse import logging import sys import json def get_best_logger(log_file, verbose): # Setup logger - (Python logger breaks PEP8 by default) logger = logging.getLogger(__name__) if verbose: logger.setLevel('DEBUG') # file_handler logs to file, stream_handler to con...
36.060606
124
0.640336
import pandas as pd import argparse import logging import sys import json def get_best_logger(log_file, verbose): logger = logging.getLogger(__name__) if verbose: logger.setLevel('DEBUG') file_handler = logging.FileHandler(log_file) stream_handler = logging.StreamHandler() f...
true
true
f71a6f98576f957a645a7ce60612e5c8ac44efe1
3,987
py
Python
islykill2/parser.py
sindrig/islykill2
2ad9e0d249637d7bb03a3535f4e054f3570427b2
[ "MIT" ]
1
2019-08-24T23:59:32.000Z
2019-08-24T23:59:32.000Z
islykill2/parser.py
sindrig/islykill2
2ad9e0d249637d7bb03a3535f4e054f3570427b2
[ "MIT" ]
null
null
null
islykill2/parser.py
sindrig/islykill2
2ad9e0d249637d7bb03a3535f4e054f3570427b2
[ "MIT" ]
1
2021-06-25T11:15:23.000Z
2021-06-25T11:15:23.000Z
import os import traceback import base64 import datetime import logging from xml.etree.ElementTree import XML from signxml import xmldsig __all__ = ['AuthenticationError', 'parse_saml'] def decode_response(resp): return base64.b64decode(resp.encode('utf8')) # Getters def get_xmldoc(xmlstring): return XM...
28.683453
79
0.658641
import os import traceback import base64 import datetime import logging from xml.etree.ElementTree import XML from signxml import xmldsig __all__ = ['AuthenticationError', 'parse_saml'] def decode_response(resp): return base64.b64decode(resp.encode('utf8')) def get_xmldoc(xmlstring): return XML(xmlstri...
true
true
f71a703f2090876a8e79cf5a51d2bb5e3344842c
153,793
py
Python
spyke/sort.py
spyke/spyke
20934521de9c557924911cf6190690ac1c6f8e80
[ "CNRI-Python" ]
22
2015-06-01T03:31:00.000Z
2022-03-18T09:12:28.000Z
spyke/sort.py
spyke/spyke
20934521de9c557924911cf6190690ac1c6f8e80
[ "CNRI-Python" ]
3
2017-03-24T19:16:02.000Z
2021-01-27T14:34:30.000Z
spyke/sort.py
spyke/spyke
20934521de9c557924911cf6190690ac1c6f8e80
[ "CNRI-Python" ]
6
2015-07-10T15:28:08.000Z
2022-03-17T19:30:45.000Z
"""Spike sorting classes and window""" from __future__ import division from __future__ import print_function __authors__ = ['Martin Spacek', 'Reza Lotun'] import os import sys import time import datetime from copy import copy import operator import random import shutil import hashlib import multiprocessing as mp fr...
47.437693
98
0.600495
from __future__ import division from __future__ import print_function __authors__ = ['Martin Spacek', 'Reza Lotun'] import os import sys import time import datetime from copy import copy import operator import random import shutil import hashlib import multiprocessing as mp from PyQt4 import QtCore, QtGui from PyQt...
true
true
f71a7085403e8ce0a19e0672e598aeec15a4a023
899
py
Python
examples/show_debug.py
Matuiss2/python-sc2
dd93215d8b09b7ddacfd5c3cc4e9f43641d3f953
[ "MIT" ]
2
2019-01-23T19:11:53.000Z
2019-04-05T17:45:49.000Z
examples/show_debug.py
Matuiss2/python-sc2
dd93215d8b09b7ddacfd5c3cc4e9f43641d3f953
[ "MIT" ]
null
null
null
examples/show_debug.py
Matuiss2/python-sc2
dd93215d8b09b7ddacfd5c3cc4e9f43641d3f953
[ "MIT" ]
1
2019-04-24T13:31:20.000Z
2019-04-24T13:31:20.000Z
import sc2 from sc2 import run_game, maps, Race, Difficulty from sc2.player import Bot, Computer class MyBot(sc2.BotAI): async def on_step(self, iteration): for structure in self.structures: self._client.debug_text_world( "\n".join([ f"{structure.type_id.name...
31
79
0.558398
import sc2 from sc2 import run_game, maps, Race, Difficulty from sc2.player import Bot, Computer class MyBot(sc2.BotAI): async def on_step(self, iteration): for structure in self.structures: self._client.debug_text_world( "\n".join([ f"{structure.type_id.name...
true
true
f71a7119f0a598c0a33db2eb55c1805b7e234b08
21,798
py
Python
archive/reuUpdated.py
emmettmeinzer/hmwgen
cd47733b5a34a6a3a9b56026eb5e73069e398033
[ "MIT" ]
null
null
null
archive/reuUpdated.py
emmettmeinzer/hmwgen
cd47733b5a34a6a3a9b56026eb5e73069e398033
[ "MIT" ]
null
null
null
archive/reuUpdated.py
emmettmeinzer/hmwgen
cd47733b5a34a6a3a9b56026eb5e73069e398033
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Nov 11 13:41:14 2019 @author: Emmett & Binyang """ from pprint import pprint import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from nltk.tokenize.punkt import PunktSentenceTokenizer, PunktTrainer ##Let’s first build a...
38.376761
189
0.708551
from pprint import pprint import pandas as pd import numpy as np import matplotlib.pyplot as plt import seaborn as sns from nltk.tokenize.punkt import PunktSentenceTokenizer, PunktTrainer text += gutenberg.raw(file_id) print (len(text)) = "" for ele in s: str1 += el...
true
true
f71a71c02c39541a49fbe5ad95d204ca99999495
1,129
py
Python
migrations/versions/0076_add_intl_flag_to_provider.py
cds-snc/notifier-api
90b385ec49efbaee7e607516fc7d9f08991af813
[ "MIT" ]
41
2019-11-28T16:58:41.000Z
2022-01-28T21:11:16.000Z
migrations/versions/0076_add_intl_flag_to_provider.py
cds-snc/notification-api
b1c1064f291eb860b494c3fa65ac256ad70bf47c
[ "MIT" ]
1,083
2019-07-08T12:57:24.000Z
2022-03-08T18:53:40.000Z
migrations/versions/0076_add_intl_flag_to_provider.py
cds-snc/notifier-api
90b385ec49efbaee7e607516fc7d9f08991af813
[ "MIT" ]
9
2020-01-24T19:56:43.000Z
2022-01-27T21:36:53.000Z
"""empty message Revision ID: 0076_add_intl_flag_to_provider Revises: 0075_create_rates_table Create Date: 2017-04-25 09:44:13.194164 """ # revision identifiers, used by Alembic. revision = "0076_add_intl_flag_to_provider" down_revision = "0075_create_rates_table" import sqlalchemy as sa from alembic import op de...
25.659091
104
0.675819
revision = "0076_add_intl_flag_to_provider" down_revision = "0075_create_rates_table" import sqlalchemy as sa from alembic import op def upgrade(): op.add_column( "provider_details", sa.Column( "supports_international", sa.Boolean(), nullable=False, ...
true
true
f71a721c1a9432964c02aa7cb35a51f05080d90d
1,983
py
Python
openbb_terminal/cryptocurrency/onchain/whale_alert_view.py
joshuabuildsthings/GamestonkTerminal
385d12803ae1725a22b0a440c3b88bffa974edcd
[ "MIT" ]
255
2022-03-29T16:43:51.000Z
2022-03-31T23:57:08.000Z
openbb_terminal/cryptocurrency/onchain/whale_alert_view.py
joshuabuildsthings/GamestonkTerminal
385d12803ae1725a22b0a440c3b88bffa974edcd
[ "MIT" ]
14
2022-03-29T14:20:33.000Z
2022-03-31T23:39:20.000Z
openbb_terminal/cryptocurrency/onchain/whale_alert_view.py
joshuabuildsthings/GamestonkTerminal
385d12803ae1725a22b0a440c3b88bffa974edcd
[ "MIT" ]
24
2022-03-29T15:28:56.000Z
2022-03-31T23:54:15.000Z
"""Whale Alert view""" __docformat__ = "numpy" import logging import os from openbb_terminal.cryptocurrency.onchain import whale_alert_model from openbb_terminal.decorators import check_api_key from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import ( export_data, lambda_...
25.101266
101
0.660111
__docformat__ = "numpy" import logging import os from openbb_terminal.cryptocurrency.onchain import whale_alert_model from openbb_terminal.decorators import check_api_key from openbb_terminal.decorators import log_start_end from openbb_terminal.helper_funcs import ( export_data, lambda_long_number_format, ...
true
true
f71a7324585ada53dbc92d0b00bc1d9b2653e2ad
78,121
py
Python
deepspeed/runtime/engine.py
LatencyTDH/DeepSpeed
eecef309cb12528cfa78d932a6f073afb43847e5
[ "MIT" ]
1
2021-04-21T01:14:32.000Z
2021-04-21T01:14:32.000Z
deepspeed/runtime/engine.py
LatencyTDH/DeepSpeed
eecef309cb12528cfa78d932a6f073afb43847e5
[ "MIT" ]
null
null
null
deepspeed/runtime/engine.py
LatencyTDH/DeepSpeed
eecef309cb12528cfa78d932a6f073afb43847e5
[ "MIT" ]
null
null
null
''' Copyright 2019 The Microsoft DeepSpeed Team ''' import os import stat import torch import warnings import hashlib import torch.distributed as dist from collections import OrderedDict from shutil import copyfile from torch.nn.modules import Module from torch.distributed.distributed_c10d import _get_global_rank fro...
42.735777
227
0.624493
import os import stat import torch import warnings import hashlib import torch.distributed as dist from collections import OrderedDict from shutil import copyfile from torch.nn.modules import Module from torch.distributed.distributed_c10d import _get_global_rank from tensorboardX import SummaryWriter from deepspeed....
true
true
f71a744b58bcf58f5653e87192017fca4a93e074
580
py
Python
code/py/test_statsrecorder.py
notmatthancock/notmatthancock.github.io
abcd91cc7c2653c5243fe96ba2fd681ec03930bb
[ "MIT" ]
null
null
null
code/py/test_statsrecorder.py
notmatthancock/notmatthancock.github.io
abcd91cc7c2653c5243fe96ba2fd681ec03930bb
[ "MIT" ]
null
null
null
code/py/test_statsrecorder.py
notmatthancock/notmatthancock.github.io
abcd91cc7c2653c5243fe96ba2fd681ec03930bb
[ "MIT" ]
null
null
null
import numpy as np import statsrecorder as sr rs = np.random.RandomState(323) mystats = sr.StatsRecorder() # Hold all observations in "data" to check for correctness. ndims = 42 data = np.empty((0, ndims)) for i in range(1000): nobserv = rs.randint(10,101) newdata = rs.randn(nobserv, ndims) data = np.vs...
25.217391
62
0.705172
import numpy as np import statsrecorder as sr rs = np.random.RandomState(323) mystats = sr.StatsRecorder() ndims = 42 data = np.empty((0, ndims)) for i in range(1000): nobserv = rs.randint(10,101) newdata = rs.randn(nobserv, ndims) data = np.vstack((data, newdata)) mystats.update(newdata) ...
true
true
f71a746bad402ab1d91d173ac40a919ce1f67c52
40,695
py
Python
sscanss/ui/dialogs/insert.py
samtygier-stfc/SScanSS-2
0df2160c32fdc533f7d391735bd55d524e253f4d
[ "BSD-3-Clause" ]
null
null
null
sscanss/ui/dialogs/insert.py
samtygier-stfc/SScanSS-2
0df2160c32fdc533f7d391735bd55d524e253f4d
[ "BSD-3-Clause" ]
null
null
null
sscanss/ui/dialogs/insert.py
samtygier-stfc/SScanSS-2
0df2160c32fdc533f7d391735bd55d524e253f4d
[ "BSD-3-Clause" ]
null
null
null
import numpy as np from PyQt5 import QtCore, QtGui, QtWidgets from sscanss.config import path_for, settings from sscanss.core.math import Plane, Matrix33, Vector3, clamp, map_range, trunc, VECTOR_EPS from sscanss.core.geometry import mesh_plane_intersection from sscanss.core.util import Primitives, DockFlag, StrainComp...
44.966851
115
0.672589
import numpy as np from PyQt5 import QtCore, QtGui, QtWidgets from sscanss.config import path_for, settings from sscanss.core.math import Plane, Matrix33, Vector3, clamp, map_range, trunc, VECTOR_EPS from sscanss.core.geometry import mesh_plane_intersection from sscanss.core.util import Primitives, DockFlag, StrainComp...
true
true
f71a74d3749d44e5926e7af02f116135904cbcf5
3,574
py
Python
src/vacuum/webserver.py
nesyamun/vacuum
e58c24e4ff9f88d674e75b17a96c705d88189422
[ "MIT" ]
2
2021-03-15T15:44:23.000Z
2021-04-08T20:58:24.000Z
src/vacuum/webserver.py
nesyamun/vacuum
e58c24e4ff9f88d674e75b17a96c705d88189422
[ "MIT" ]
null
null
null
src/vacuum/webserver.py
nesyamun/vacuum
e58c24e4ff9f88d674e75b17a96c705d88189422
[ "MIT" ]
3
2021-03-15T15:44:37.000Z
2022-03-05T03:44:23.000Z
from asyncio import AbstractEventLoop, Task, get_event_loop from dataclasses import asdict from datetime import datetime from functools import wraps from typing import Callable, Optional, Tuple from quart import Quart, request from werkzeug.exceptions import HTTPException from .config import config from .logger impor...
25.528571
81
0.592334
from asyncio import AbstractEventLoop, Task, get_event_loop from dataclasses import asdict from datetime import datetime from functools import wraps from typing import Callable, Optional, Tuple from quart import Quart, request from werkzeug.exceptions import HTTPException from .config import config from .logger impor...
true
true
f71a75c9c5f86132584053248cbb481ec3e2449c
6,138
py
Python
poetry/console/config/application_config.py
michielboekhoff/poetry
92b1e61c45f13868ffab663fa3e9be2e26e8c368
[ "MIT" ]
null
null
null
poetry/console/config/application_config.py
michielboekhoff/poetry
92b1e61c45f13868ffab663fa3e9be2e26e8c368
[ "MIT" ]
null
null
null
poetry/console/config/application_config.py
michielboekhoff/poetry
92b1e61c45f13868ffab663fa3e9be2e26e8c368
[ "MIT" ]
null
null
null
import logging from cleo.config import ApplicationConfig as BaseApplicationConfig from clikit.api.event import PRE_HANDLE from clikit.api.event import PreHandleEvent from clikit.api.formatter import Style from clikit.api.io import Input from clikit.api.io import InputStream from clikit.api.io import Output from clikit...
34.677966
86
0.655914
import logging from cleo.config import ApplicationConfig as BaseApplicationConfig from clikit.api.event import PRE_HANDLE from clikit.api.event import PreHandleEvent from clikit.api.formatter import Style from clikit.api.io import Input from clikit.api.io import InputStream from clikit.api.io import Output from clikit...
true
true
f71a76296b3a7b1e16734137964be646122469c5
8,766
py
Python
userbot/__init__.py
PratikGoswamiPM/OpenUserBot
1ba7845522a5d5619d2705421a303aa82ce35abb
[ "Naumen", "Condor-1.1", "MS-PL" ]
1
2021-07-18T06:57:28.000Z
2021-07-18T06:57:28.000Z
userbot/__init__.py
PratikGoswamiPM/OpenUserBot
1ba7845522a5d5619d2705421a303aa82ce35abb
[ "Naumen", "Condor-1.1", "MS-PL" ]
null
null
null
userbot/__init__.py
PratikGoswamiPM/OpenUserBot
1ba7845522a5d5619d2705421a303aa82ce35abb
[ "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. # # thanks to penn5 for bug fixing """ Userbot initialization. """ import os from sys import version_info from logging ...
31.876364
143
0.722222
import os from sys import version_info from logging import basicConfig, getLogger, INFO, DEBUG from distutils.util import strtobool as sb from pymongo import MongoClient from redis import StrictRedis from pylast import LastFMNetwork, md5 from pySmartDL import SmartDL from dotenv import load_dotenv from requests...
true
true
f71a763946c4caf38418e8a819b9202fc549a816
15,744
py
Python
superset/connectors/druid/views.py
whelan9453/incubator-superset
4e3cea45a5136a28442eea50fddc6cf423a9ddd5
[ "Apache-2.0" ]
null
null
null
superset/connectors/druid/views.py
whelan9453/incubator-superset
4e3cea45a5136a28442eea50fddc6cf423a9ddd5
[ "Apache-2.0" ]
2
2019-11-11T11:16:32.000Z
2019-12-13T07:12:09.000Z
superset/connectors/druid/views.py
whelan9453/incubator-superset
4e3cea45a5136a28442eea50fddc6cf423a9ddd5
[ "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"); you may not u...
34.151844
85
0.624111
import json import logging from datetime import datetime from flask import flash, Markup, redirect from flask_appbuilder import CompactCRUDMixin, expose from flask_appbuilder.fieldwidgets import Select2Widget from flask_appbuilder.models.sqla.interface import SQLAInterface from flask_appbuilder.securi...
true
true
f71a774da43e92d9a5b2ea6f28b39201e558710f
2,045
py
Python
speech_recognition.py
pmaen/biopython
b6cafe09b3670762d0768cbf2df36fb21b4bd5af
[ "MIT" ]
1
2020-12-24T13:06:31.000Z
2020-12-24T13:06:31.000Z
speech_recognition.py
pmaen/biopython
b6cafe09b3670762d0768cbf2df36fb21b4bd5af
[ "MIT" ]
null
null
null
speech_recognition.py
pmaen/biopython
b6cafe09b3670762d0768cbf2df36fb21b4bd5af
[ "MIT" ]
null
null
null
import os.path import speech_recognition as sr import moviepy.editor as mp from pydub import AudioSegment from pydub.utils import make_chunks import time import glob import re import math from pathlib import Path import soundfile as sf lang = input("Please choose the language for voice recognition by language code. (d...
31.953125
101
0.681174
import os.path import speech_recognition as sr import moviepy.editor as mp from pydub import AudioSegment from pydub.utils import make_chunks import time import glob import re import math from pathlib import Path import soundfile as sf lang = input("Please choose the language for voice recognition by language code. (d...
true
true
f71a77a49def227a97ac06d0cce2532e8e039b8f
2,042
py
Python
code/game/goldspinner.py
LordZagreus/LodeRunner
68aab36be47cabe31e52f3ee43520bdafcdf3c95
[ "MIT" ]
1
2017-10-31T22:26:22.000Z
2017-10-31T22:26:22.000Z
code/game/goldspinner.py
team-sparrow/LodeRunner
68aab36be47cabe31e52f3ee43520bdafcdf3c95
[ "MIT" ]
2
2019-07-05T03:17:18.000Z
2019-07-08T16:15:29.000Z
code/game/goldspinner.py
team-sparrow/LodeRunner
68aab36be47cabe31e52f3ee43520bdafcdf3c95
[ "MIT" ]
1
2020-10-15T09:03:20.000Z
2020-10-15T09:03:20.000Z
import math from particle import Particle #from glfunctions import draw_sprite from code.constants.common import GOLD_SPINNER_LIFESPAN, TILE_WIDTH, TILE_HEIGHT from code.controllers.intervalcontroller import IntervalController class GoldSpinner(Particle): def __init__(self, x, y, dest_x, dest_y): Par...
31.90625
229
0.639079
import math from particle import Particle from code.constants.common import GOLD_SPINNER_LIFESPAN, TILE_WIDTH, TILE_HEIGHT from code.controllers.intervalcontroller import IntervalController class GoldSpinner(Particle): def __init__(self, x, y, dest_x, dest_y): Particle.__init__(self, x, y, 0, 0, 0) ...
true
true
f71a77c1632e053843e6fa96b6402b20781b54ae
561
py
Python
audiovisual/indico_audiovisual/blueprint.py
pferreir/indico-plugins-cern
0fc2eb6b1aa3c3083a813477886a6632f148a4d9
[ "MIT" ]
null
null
null
audiovisual/indico_audiovisual/blueprint.py
pferreir/indico-plugins-cern
0fc2eb6b1aa3c3083a813477886a6632f148a4d9
[ "MIT" ]
null
null
null
audiovisual/indico_audiovisual/blueprint.py
pferreir/indico-plugins-cern
0fc2eb6b1aa3c3083a813477886a6632f148a4d9
[ "MIT" ]
null
null
null
# This file is part of the CERN Indico plugins. # Copyright (C) 2014 - 2019 CERN # # The CERN Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; see # the LICENSE file for more details. from __future__ import unicode_literals from indico.core.plugins i...
33
93
0.798574
from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_audiovisual.controllers import RHRequestList blueprint = IndicoPluginBlueprint('audiovisual', __name__, url_prefix='/service/audiovisual') blueprint.add_url_rule('/', 'request_list', RHRequestList)
true
true
f71a787e6cf602bff2ff9c173e3363f87c7e53c4
42,908
py
Python
ForgeSVN/forgesvn/tests/model/test_repository.py
rohankumardubey/allura
9c490a051ca912d28b81ce656441d6fed100cb24
[ "Apache-2.0" ]
113
2015-03-25T10:33:37.000Z
2022-02-16T20:55:06.000Z
ForgeSVN/forgesvn/tests/model/test_repository.py
rohankumardubey/allura
9c490a051ca912d28b81ce656441d6fed100cb24
[ "Apache-2.0" ]
4
2017-08-04T16:19:07.000Z
2020-06-08T19:01:33.000Z
ForgeSVN/forgesvn/tests/model/test_repository.py
rohankumardubey/allura
9c490a051ca912d28b81ce656441d6fed100cb24
[ "Apache-2.0" ]
36
2015-08-14T16:27:39.000Z
2022-02-16T20:54:35.000Z
# coding: utf-8 # 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...
37.837743
119
0.53969
from __future__ import unicode_literals from __future__ import print_function from __future__ import absolute_import import os import shutil import unittest from unittest import skipUnless import pkg_resources from itertools import count, product from datetime import datetime from zipfile import ZipF...
true
true
f71a788ec1af6202640b3afb171e260ba38421a6
18,525
py
Python
lib/spack/spack/cmd/install.py
padamson/spack
d3f67a48552691b4846ccc4a10f76740b154090c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
lib/spack/spack/cmd/install.py
padamson/spack
d3f67a48552691b4846ccc4a10f76740b154090c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
11
2021-03-15T09:26:41.000Z
2022-02-28T15:08:23.000Z
lib/spack/spack/cmd/install.py
padamson/spack
d3f67a48552691b4846ccc4a10f76740b154090c
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2021 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 argparse import os import shutil import sys import textwrap import llnl.util.filesystem as fs import llnl.util.tty...
39.33121
80
0.601404
import argparse import os import shutil import sys import textwrap import llnl.util.filesystem as fs import llnl.util.tty as tty import spack.build_environment import spack.cmd import spack.cmd.common.arguments as arguments import spack.environment as ev import spack.fetch_strategy import spack.monitor import sp...
true
true
f71a797ad5205b8689b1860ffa5202d4a2793de5
4,727
py
Python
serene_index/tests/test_make_solr_document.py
NICTA/serene-etl
1d446012c0d08a95b8fbbbe8237735320a2fe2a4
[ "Apache-2.0" ]
null
null
null
serene_index/tests/test_make_solr_document.py
NICTA/serene-etl
1d446012c0d08a95b8fbbbe8237735320a2fe2a4
[ "Apache-2.0" ]
null
null
null
serene_index/tests/test_make_solr_document.py
NICTA/serene-etl
1d446012c0d08a95b8fbbbe8237735320a2fe2a4
[ "Apache-2.0" ]
null
null
null
from unittest import TestCase import importlib import ast import json import logging from ConfigParser import ConfigParser from io import StringIO from mock import patch #ignore pycountry debug logging quiet = logging.getLogger('pycountry.db') quiet.setLevel(logging.ERROR) class TestMake_solr_document(TestCase): ...
43.768519
142
0.606727
from unittest import TestCase import importlib import ast import json import logging from ConfigParser import ConfigParser from io import StringIO from mock import patch quiet = logging.getLogger('pycountry.db') quiet.setLevel(logging.ERROR) class TestMake_solr_document(TestCase): record = { "src_fil...
false
true
f71a7a522882e618e8873734efaa5c00541a1526
2,196
py
Python
onnx/backend/test/case/node/batchnorm.py
cnheider/onnx
8e9c7d57f7c5aa6f6eb7ee7abb0ba2a243781933
[ "MIT" ]
137
2020-04-28T12:28:32.000Z
2022-03-18T10:48:25.000Z
onnx/backend/test/case/node/batchnorm.py
cnheider/onnx
8e9c7d57f7c5aa6f6eb7ee7abb0ba2a243781933
[ "MIT" ]
24
2020-05-06T08:06:42.000Z
2021-12-31T07:46:13.000Z
Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/onnx-tensorrt/third_party/onnx/onnx/backend/test/case/node/batchnorm.py
lablup/training_results_v0.7
f5bb59aa0f8b18b602763abe47d1d24d0d54b197
[ "Apache-2.0" ]
51
2019-07-12T05:10:25.000Z
2021-07-28T16:19:06.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np # type: ignore import onnx from ..base import Base from . import expect class BatchNormalization(Base): @staticmethod def export(): # typ...
34.857143
86
0.551002
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np import onnx from ..base import Base from . import expect class BatchNormalization(Base): @staticmethod def export(): def _batch...
true
true
f71a7adb1bcafed077beb9dfb10755cea07d0e0b
1,239
py
Python
examples/example.py
Mizux/cmake-pybind11
d3b89746546734990eae5a86532674bf3462a2f3
[ "Apache-2.0" ]
null
null
null
examples/example.py
Mizux/cmake-pybind11
d3b89746546734990eae5a86532674bf3462a2f3
[ "Apache-2.0" ]
null
null
null
examples/example.py
Mizux/cmake-pybind11
d3b89746546734990eae5a86532674bf3462a2f3
[ "Apache-2.0" ]
null
null
null
import cmakepybind11 from cmakepybind11.foo import pyFoo from cmakepybind11.bar import pyBar from cmakepybind11.foobar import pyFooBar print(f'version: {cmakepybind11.__version__}') # foo print(f'Foo: {dir(pyFoo.Foo)}') pyFoo.free_function(2147483647) # max int pyFoo.free_function(2147483647+1) # max int + 1 f = py...
21.736842
50
0.736885
import cmakepybind11 from cmakepybind11.foo import pyFoo from cmakepybind11.bar import pyBar from cmakepybind11.foobar import pyFooBar print(f'version: {cmakepybind11.__version__}') print(f'Foo: {dir(pyFoo.Foo)}') pyFoo.free_function(2147483647) pyFoo.free_function(2147483647+1) f = pyFoo.Foo() print(f'class Foo...
true
true
f71a7b8e9aca170c7b5bfc6407b13285000df309
19,338
py
Python
.history/implementations/pixelda/pixelda_20190101224024.py
Napkin-DL/PyTorch-GAN
4668fb434a74a4e4771631944e4abfb0ec1c8795
[ "MIT" ]
null
null
null
.history/implementations/pixelda/pixelda_20190101224024.py
Napkin-DL/PyTorch-GAN
4668fb434a74a4e4771631944e4abfb0ec1c8795
[ "MIT" ]
null
null
null
.history/implementations/pixelda/pixelda_20190101224024.py
Napkin-DL/PyTorch-GAN
4668fb434a74a4e4771631944e4abfb0ec1c8795
[ "MIT" ]
null
null
null
import argparse import os import numpy as np import math import itertools import torchvision.transforms as transforms from torchvision.utils import save_image from torch.utils.data import DataLoader from torchvision import datasets from torch.autograd import Variable from mnistm import MNISTM import torch.nn as nn ...
37.917647
145
0.631554
import argparse import os import numpy as np import math import itertools import torchvision.transforms as transforms from torchvision.utils import save_image from torch.utils.data import DataLoader from torchvision import datasets from torch.autograd import Variable from mnistm import MNISTM import torch.nn as nn ...
true
true
f71a7bc3530cae6fe552775aa2d6f0317c406877
481
py
Python
ocean_utils/http_requests/requests_session.py
oceanprotocol/common-utils-py
f577f4762841496584e114baaec0d476e73c700e
[ "Apache-2.0" ]
1
2020-12-02T13:49:43.000Z
2020-12-02T13:49:43.000Z
common_utils_py/http_requests/requests_session.py
nevermined-io/common-utils-py
4a02843d4f4771935b6f057badac844fef6f6f13
[ "Apache-2.0" ]
2
2021-08-24T13:14:47.000Z
2021-12-01T17:06:29.000Z
common_utils_py/http_requests/requests_session.py
nevermined-io/common-utils-py
4a02843d4f4771935b6f057badac844fef6f6f13
[ "Apache-2.0" ]
null
null
null
import requests from requests.adapters import HTTPAdapter def get_requests_session(): """ Set connection pool maxsize and block value to avoid `connection pool full` warnings. :return: requests session """ session = requests.sessions.Session() session.mount('http://', HTTPAdapter(pool_connect...
32.066667
97
0.738046
import requests from requests.adapters import HTTPAdapter def get_requests_session(): session = requests.sessions.Session() session.mount('http://', HTTPAdapter(pool_connections=25, pool_maxsize=25, pool_block=True)) session.mount('https://', HTTPAdapter(pool_connections=25, pool_maxsize=25, pool_block=Tr...
true
true
f71a7d056b1aa807f43b720faed6745239c9c75f
1,872
py
Python
app.py
ssvfx41/tk-houdini-geometrynode
03454d3c6773b0a48531ab24ace60928f11c4a4e
[ "MIT" ]
null
null
null
app.py
ssvfx41/tk-houdini-geometrynode
03454d3c6773b0a48531ab24ace60928f11c4a4e
[ "MIT" ]
null
null
null
app.py
ssvfx41/tk-houdini-geometrynode
03454d3c6773b0a48531ab24ace60928f11c4a4e
[ "MIT" ]
null
null
null
# Copyright (c) 2015 Pixomondo # # CONFIDENTIAL AND PROPRIETARY # # This work is provided "AS IS" and subject to the MIT License included in this # distribution package. See LICENSE. # By accessing, using, copying or modifying this work you indicate your # agreement to the MIT License. All rights # not expressly grante...
33.428571
81
0.6875
import sgtk class GeometryOutputNode(sgtk.platform.Application): def init_app(self): module = self.import_module("tk_houdini_geometrynode") self.handler = module.ToolkitGeometryNodeHandler(self) def convert_to_geometry_nodes(self): self.handler.convert_sg_to_geometry_nodes(...
true
true