hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c30c09f1bd3070f07f121e14a73ab704dad99b4
106
py
Python
achievements/admin.py
peterkrauz/rpg-achievements-django
c65ec12237b2bee9f12d259fedd5f18934ff6c96
[ "Apache-2.0" ]
1
2021-08-31T10:52:55.000Z
2021-08-31T10:52:55.000Z
achievements/admin.py
peterkrauz/rpg-achievements-django
c65ec12237b2bee9f12d259fedd5f18934ff6c96
[ "Apache-2.0" ]
null
null
null
achievements/admin.py
peterkrauz/rpg-achievements-django
c65ec12237b2bee9f12d259fedd5f18934ff6c96
[ "Apache-2.0" ]
null
null
null
from django.contrib import admin from achievements import models admin.site.register(models.Achievement)
21.2
39
0.849057
from django.contrib import admin from achievements import models admin.site.register(models.Achievement)
true
true
1c30c1d5178a357b7d1909bcc019a7c6fe827b55
1,929
py
Python
Exareme-Docker/src/exareme/exareme-tools/madis/src/functions/vtable/coltypes.py
tchamabe1979/exareme
462983e4feec7808e1fd447d02901502588a8879
[ "MIT" ]
null
null
null
Exareme-Docker/src/exareme/exareme-tools/madis/src/functions/vtable/coltypes.py
tchamabe1979/exareme
462983e4feec7808e1fd447d02901502588a8879
[ "MIT" ]
null
null
null
Exareme-Docker/src/exareme/exareme-tools/madis/src/functions/vtable/coltypes.py
tchamabe1979/exareme
462983e4feec7808e1fd447d02901502588a8879
[ "MIT" ]
null
null
null
""" .. function:: coltypes(query:None) Returns the input query results column names and types. :Returned table schema: - *column* text Column name of input query *schema* - *type* text Type of column Examples: >>> sql("coltypes select 5 as vt") column | type ------------- vt ...
22.172414
138
0.572836
import functions import vtbase registered = True class ColTypes(vtbase.VT): def VTiter(self, *parsedArgs, **envars): largs, dictargs = self.full_parse(parsedArgs) if 'query' not in dictargs: raise functions.OperatorError(__name__.rsplit('.')[-1], "No query argument ") quer...
true
true
1c30c39d0a2412a67147274fef0892a00df998f4
215
py
Python
codes/prob_distribution/__init__.py
NCEPU-Sunrise/2021-MachineLearningGroup
d47a73fa1627f0452ed9e39aacf72e925d25ee73
[ "MIT" ]
3
2021-11-02T06:07:24.000Z
2022-03-14T07:44:24.000Z
codes/prob_distribution/__init__.py
NCEPU-Sunrise/2021-MachineLearningGroup
d47a73fa1627f0452ed9e39aacf72e925d25ee73
[ "MIT" ]
null
null
null
codes/prob_distribution/__init__.py
NCEPU-Sunrise/2021-MachineLearningGroup
d47a73fa1627f0452ed9e39aacf72e925d25ee73
[ "MIT" ]
1
2022-01-29T09:09:58.000Z
2022-01-29T09:09:58.000Z
from prob_distribution.random_variable import RandomVariable from prob_distribution.gaussian import Gaussian from prob_distribution.gamma import Gamma __all__ = [ "RandomVariable", "Gaussian", "Gamma" ]
23.888889
60
0.790698
from prob_distribution.random_variable import RandomVariable from prob_distribution.gaussian import Gaussian from prob_distribution.gamma import Gamma __all__ = [ "RandomVariable", "Gaussian", "Gamma" ]
true
true
1c30c40d48654013e2d57634b5b6cb49869d591b
5,343
py
Python
Core/third_party/JavaScriptCore/inspector/scripts/codegen/objc_generator_templates.py
InfiniteSynthesis/lynx-native
022e277ee6767f5b668269a17b1679072cf7c3d6
[ "MIT" ]
677
2017-09-23T16:03:12.000Z
2022-03-26T08:32:10.000Z
Core/third_party/JavaScriptCore/inspector/scripts/codegen/objc_generator_templates.py
InfiniteSynthesis/lynx-native
022e277ee6767f5b668269a17b1679072cf7c3d6
[ "MIT" ]
9
2020-04-18T18:47:18.000Z
2020-04-18T18:52:41.000Z
Core/third_party/JavaScriptCore/inspector/scripts/codegen/objc_generator_templates.py
InfiniteSynthesis/lynx-native
022e277ee6767f5b668269a17b1679072cf7c3d6
[ "MIT" ]
92
2017-09-21T14:21:27.000Z
2022-03-25T13:29:42.000Z
#!/usr/bin/env python # # Copyright (c) 2014 Apple Inc. All rights reserved. # Copyright (c) 2014 University of Washington. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of ...
34.25
219
0.740408
class ObjCGeneratorTemplates: HeaderPrelude = ( """#import <Foundation/Foundation.h> ${includes} """) HeaderPostlude = ( """""") TypeConversionsHeaderPrelude = ( """${includes} namespace Inspector {""") TypeConversionsHeaderPostlude = ( """} // namespac...
true
true
1c30c4259da911f2e2560a7b7b56346dcdfdf1da
137
py
Python
venv/Lib/site-packages/pybrain3/optimization/distributionbased/__init__.py
ishatserka/MachineLearningAndDataAnalysisCoursera
e82e772df2f4aec162cb34ac6127df10d14a625a
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pybrain3/optimization/distributionbased/__init__.py
ishatserka/MachineLearningAndDataAnalysisCoursera
e82e772df2f4aec162cb34ac6127df10d14a625a
[ "MIT" ]
null
null
null
venv/Lib/site-packages/pybrain3/optimization/distributionbased/__init__.py
ishatserka/MachineLearningAndDataAnalysisCoursera
e82e772df2f4aec162cb34ac6127df10d14a625a
[ "MIT" ]
null
null
null
from .cmaes import CMAES from .fem import FEM from .nes import ExactNES, OriginalNES from .ves import VanillaGradientEvolutionStrategies
27.4
51
0.839416
from .cmaes import CMAES from .fem import FEM from .nes import ExactNES, OriginalNES from .ves import VanillaGradientEvolutionStrategies
true
true
1c30c42e1fe0ce6adebca7ac36e11be2a614f315
749
py
Python
src/my_blog/urls.py
lahhrachmoh/blog-django-ar
07f3716a742ced2b30bc2bc64a316e57eabf3322
[ "bzip2-1.0.6" ]
1
2020-01-03T07:27:11.000Z
2020-01-03T07:27:11.000Z
src/my_blog/urls.py
notme20n/blog-django-ar
6b84b6d2d7e7ade2b55b4cff89d9685740c05696
[ "bzip2-1.0.6" ]
null
null
null
src/my_blog/urls.py
notme20n/blog-django-ar
6b84b6d2d7e7ade2b55b4cff89d9685740c05696
[ "bzip2-1.0.6" ]
null
null
null
"""my_blog URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based...
34.045455
77
0.708945
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
1c30c4c66c173dd9ac779d41c7e082d5889ea704
2,264
py
Python
bcs-ui/backend/templatesets/legacy_apps/configuration/migrations/0023_auto_20180312_1623.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
599
2019-06-25T03:20:46.000Z
2022-03-31T12:14:33.000Z
bcs-ui/backend/templatesets/legacy_apps/configuration/migrations/0023_auto_20180312_1623.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
537
2019-06-27T06:03:44.000Z
2022-03-31T12:10:01.000Z
bcs-ui/backend/templatesets/legacy_apps/configuration/migrations/0023_auto_20180312_1623.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
214
2019-06-25T03:26:05.000Z
2022-03-31T07:52:03.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
38.372881
119
0.659011
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('configuration', '0023_auto_20180313_1614'), ] operations = [ migrations.AddField( model_name='k8sdaemonset', name='deploy_...
true
true
1c30c533c03ae5855c6d2ffabbad7757bb3636a2
3,817
py
Python
backend/apps/volontulo/urls.py
ponycalypsenow/volontulo
8f7886aa3c8ea5ec0ca84711a089bea60fb69598
[ "MIT" ]
null
null
null
backend/apps/volontulo/urls.py
ponycalypsenow/volontulo
8f7886aa3c8ea5ec0ca84711a089bea60fb69598
[ "MIT" ]
null
null
null
backend/apps/volontulo/urls.py
ponycalypsenow/volontulo
8f7886aa3c8ea5ec0ca84711a089bea60fb69598
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ .. module:: urls """ from django.conf.urls import include from django.conf.urls import url from rest_framework.routers import DefaultRouter from apps.volontulo import views from apps.volontulo.views import api as api_views from apps.volontulo.views import auth as auth_views from apps.volo...
26.143836
78
0.595756
from django.conf.urls import include from django.conf.urls import url from rest_framework.routers import DefaultRouter from apps.volontulo import views from apps.volontulo.views import api as api_views from apps.volontulo.views import auth as auth_views from apps.volontulo.views import offers as offers_views from a...
true
true
1c30c5701d062fcba7906b54785f7821211aeeed
4,450
py
Python
via_httplib.py
arunskurian/delphixpy-examples
c4716edbd22fb238ceed23e989b6e6abd82ac8fc
[ "Apache-2.0" ]
null
null
null
via_httplib.py
arunskurian/delphixpy-examples
c4716edbd22fb238ceed23e989b6e6abd82ac8fc
[ "Apache-2.0" ]
null
null
null
via_httplib.py
arunskurian/delphixpy-examples
c4716edbd22fb238ceed23e989b6e6abd82ac8fc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright (c) 2018 by Delphix. All rights reserved. # from __future__ import print_function import argparse import httplib import json import os import sys import urllib from argparse import RawTextHelpFormatter SCRIPT_DESCRIPTION = """ Connect to Delphix engine to run some queries using th...
26.331361
105
0.642022
from __future__ import print_function import argparse import httplib import json import os import sys import urllib from argparse import RawTextHelpFormatter SCRIPT_DESCRIPTION = """ Connect to Delphix engine to run some queries using the http lib library """ dlpx_host = "" dlpx_user = "" dlpx_password = "" dl...
true
true
1c30c6b3fbfdced0506206ae79b1ef597bfa332b
74,059
py
Python
tensorflow/python/keras/engine/network.py
ajweiss/tensorflow
2f4d4da52f0c488417d7e917edaf1b7569b5e408
[ "Apache-2.0" ]
1
2019-06-20T05:02:56.000Z
2019-06-20T05:02:56.000Z
tensorflow/python/keras/engine/network.py
ajweiss/tensorflow
2f4d4da52f0c488417d7e917edaf1b7569b5e408
[ "Apache-2.0" ]
null
null
null
tensorflow/python/keras/engine/network.py
ajweiss/tensorflow
2f4d4da52f0c488417d7e917edaf1b7569b5e408
[ "Apache-2.0" ]
1
2018-12-20T02:55:55.000Z
2018-12-20T02:55:55.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.498133
120
0.657003
from __future__ import absolute_import from __future__ import division from __future__ import print_function import copy import json import os import weakref import numpy as np from six.moves import zip from tensorflow.python import pywrap_tensorflow from tensorflow.python.eager import context from ...
true
true
1c30c6c00be1a292b934adcc7875e2235faffb9a
3,284
py
Python
datasets/opinosis/opinosis.py
TheophileBlard/nlp
2e0a8639a79b1abc848cff5c669094d40bba0f63
[ "Apache-2.0" ]
3
2020-05-19T05:15:12.000Z
2020-10-03T11:44:42.000Z
datasets/opinosis/opinosis.py
TheophileBlard/nlp
2e0a8639a79b1abc848cff5c669094d40bba0f63
[ "Apache-2.0" ]
null
null
null
datasets/opinosis/opinosis.py
TheophileBlard/nlp
2e0a8639a79b1abc848cff5c669094d40bba0f63
[ "Apache-2.0" ]
1
2020-12-08T10:36:30.000Z
2020-12-08T10:36:30.000Z
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets Authors and the HuggingFace NLP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE...
36.898876
108
0.680268
from __future__ import absolute_import, division, print_function import os import nlp _CITATION = """ @inproceedings{ganesan2010opinosis, title={Opinosis: a graph-based approach to abstractive summarization of highly redundant opinions}, author={Ganesan, Kavita and Zhai, ChengXiang and Han, Jia...
true
true
1c30c7d369896fdc6c8fc398774ad3c385a319f1
7,060
py
Python
bokeh_app/scripts/functions/timeseries_stats.py
goodteamname/spino
aa8c6cfa9f94a639c306d85ca6df2483108fda37
[ "MIT" ]
null
null
null
bokeh_app/scripts/functions/timeseries_stats.py
goodteamname/spino
aa8c6cfa9f94a639c306d85ca6df2483108fda37
[ "MIT" ]
9
2020-10-26T10:57:00.000Z
2020-11-01T14:48:21.000Z
bokeh_app/scripts/functions/timeseries_stats.py
goodteamname/spino
aa8c6cfa9f94a639c306d85ca6df2483108fda37
[ "MIT" ]
1
2020-10-26T10:41:31.000Z
2020-10-26T10:41:31.000Z
import pandas as pd import numpy as np def remove_trend(ts, N): """Remove a best fitting polynomial of degree N from time series data. Uses numpy methods polyfit to find the coefficients of a degree N polynomial of best fit (least squares resiuduals) and polyeval to construct the polynomial over the ...
33.779904
78
0.686261
import pandas as pd import numpy as np def remove_trend(ts, N): headers = ['time'] data = [ts.time] for col in np.delete(ts.columns.values, 0): fit = np.polyval(np.polyfit(ts.time, ts[col], deg=N), ts.time) detrended = ts[col]-fit headers.append('detrended_' + col) he...
true
true
1c30c929aee456110941c26a22c61ae409b4009f
1,222
py
Python
components/collector/src/model/responses.py
kargaranamir/quality-time
1c427c61bee9d31c3526f0a01be2218a7e167c23
[ "Apache-2.0" ]
33
2016-01-20T07:35:48.000Z
2022-03-14T09:20:51.000Z
components/collector/src/model/responses.py
kargaranamir/quality-time
1c427c61bee9d31c3526f0a01be2218a7e167c23
[ "Apache-2.0" ]
2,410
2016-01-22T18:13:01.000Z
2022-03-31T16:57:34.000Z
components/collector/src/model/responses.py
kargaranamir/quality-time
1c427c61bee9d31c3526f0a01be2218a7e167c23
[ "Apache-2.0" ]
21
2016-01-16T11:49:23.000Z
2022-01-14T21:53:22.000Z
"""Source responses model class.""" from collector_utilities.type import URL, ErrorMessage, Response, Responses class SourceResponses: """Class the hold the source responses, and associated information such as api_url and connection error, if any.""" def __init__( self, *, responses: Responses = Non...
31.333333
119
0.661211
from collector_utilities.type import URL, ErrorMessage, Response, Responses class SourceResponses: def __init__( self, *, responses: Responses = None, api_url: URL = None, connection_error: ErrorMessage = None ) -> None: self.__responses: Responses = responses or [] self.api_url = ap...
true
true
1c30c930d3da81291cc51c6f2ac44d96eab4f155
2,745
py
Python
tests/agent_test.py
sld/dp-agent
02729887f8db3c99ac2c6a3e5e7be7fa6849a1ba
[ "Apache-2.0" ]
null
null
null
tests/agent_test.py
sld/dp-agent
02729887f8db3c99ac2c6a3e5e7be7fa6849a1ba
[ "Apache-2.0" ]
null
null
null
tests/agent_test.py
sld/dp-agent
02729887f8db3c99ac2c6a3e5e7be7fa6849a1ba
[ "Apache-2.0" ]
null
null
null
from datetime import datetime import uuid from core.agent import Agent from core.state_manager import StateManager from core.skill_manager import SkillManager from core.rest_caller import RestCaller from core.service import Service from core.postprocessor import DefaultPostprocessor from core.response_selector import ...
45
102
0.764663
from datetime import datetime import uuid from core.agent import Agent from core.state_manager import StateManager from core.skill_manager import SkillManager from core.rest_caller import RestCaller from core.service import Service from core.postprocessor import DefaultPostprocessor from core.response_selector import ...
true
true
1c30cafa647ace6204c6ba2ef558a148026b503f
314
py
Python
osipkd/views/ak/__init__.py
aagusti/o-sipkd
6c61fddb87fa6f4be18cac851bb44949019b8f3e
[ "MIT" ]
null
null
null
osipkd/views/ak/__init__.py
aagusti/o-sipkd
6c61fddb87fa6f4be18cac851bb44949019b8f3e
[ "MIT" ]
null
null
null
osipkd/views/ak/__init__.py
aagusti/o-sipkd
6c61fddb87fa6f4be18cac851bb44949019b8f3e
[ "MIT" ]
null
null
null
from pyramid.view import ( view_config, ) from pyramid.httpexceptions import ( HTTPFound, ) from osipkd.models import App ######## # APP Home # ######## @view_config(route_name='ak', renderer='templates/home.pt', permission='read') def view_app(request): return dict(project='o-SIPKD')
22.428571
78
0.652866
from pyramid.view import ( view_config, ) from pyramid.httpexceptions import ( HTTPFound, ) from osipkd.models import App .pt', permission='read') def view_app(request): return dict(project='o-SIPKD')
true
true
1c30cbc30ba9e277f19e4cb4f681d179c47f1969
9,464
py
Python
doc/generate_logos.py
iamabhishek0/sympy
c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd
[ "BSD-3-Clause" ]
2
2019-02-05T19:20:24.000Z
2019-04-23T13:24:38.000Z
doc/generate_logos.py
iamabhishek0/sympy
c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd
[ "BSD-3-Clause" ]
2
2017-06-29T14:11:05.000Z
2022-01-24T09:28:04.000Z
doc/generate_logos.py
iamabhishek0/sympy
c461bd1ff9d178d1012b04fd0bf37ee3abb02cdd
[ "BSD-3-Clause" ]
1
2016-11-25T13:40:28.000Z
2016-11-25T13:40:28.000Z
#!/usr/bin/env python """ This script creates logos of different formats from the source "sympy.svg" Requirements: rsvg-convert - for converting to *.png format (librsvg2-bin deb package) imagemagick - for converting to *.ico favicon format """ from argparse import ArgumentParser i...
33.921147
79
0.614434
from argparse import ArgumentParser import xml.dom.minidom import os.path import logging import subprocess import sys default_source_dir = os.path.join(os.path.dirname(__file__), "src/logo") default_source_svg = "sympy.svg" default_output_dir = os.path.join(os.path.dirname(__file__), "_build/logo") svg_sizes = {...
true
true
1c30cc41e761b0f6e63c07e7049e39088af4064f
7,920
py
Python
QNetwork/tests/test_channels.py
SwamyDev/q_network
4f1866f8d06e4f206b4ada5e86396a4da26f28f7
[ "MIT" ]
null
null
null
QNetwork/tests/test_channels.py
SwamyDev/q_network
4f1866f8d06e4f206b4ada5e86396a4da26f28f7
[ "MIT" ]
null
null
null
QNetwork/tests/test_channels.py
SwamyDev/q_network
4f1866f8d06e4f206b4ada5e86396a4da26f28f7
[ "MIT" ]
2
2019-12-04T08:47:40.000Z
2021-07-22T16:22:27.000Z
import unittest from collections import deque from QNetwork.q_network_channels import QState, QChannel, CAChannel class QConnectionSpy: def __init__(self, qubit_factory): self.qubit_factory = qubit_factory self.receiver = '' self.qubits = [] self.epr_values = deque() def send...
32.863071
109
0.644571
import unittest from collections import deque from QNetwork.q_network_channels import QState, QChannel, CAChannel class QConnectionSpy: def __init__(self, qubit_factory): self.qubit_factory = qubit_factory self.receiver = '' self.qubits = [] self.epr_values = deque() def send...
true
true
1c30cc794aaf76d3edfc94d11fca65f4b979f80a
2,010
py
Python
aliyun-python-sdk-mse/aliyunsdkmse/request/v20190531/GetEngineNamepaceRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-mse/aliyunsdkmse/request/v20190531/GetEngineNamepaceRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
null
null
null
aliyun-python-sdk-mse/aliyunsdkmse/request/v20190531/GetEngineNamepaceRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "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...
37.222222
76
0.755224
from aliyunsdkcore.request import RpcRequest from aliyunsdkmse.endpoint import endpoint_data class GetEngineNamepaceRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'mse', '2019-05-31', 'GetEngineNamepace','mse') self.set_method('POST') if hasattr(self, "endpoint_map"): ...
true
true
1c30ccc97252a100898b0b1f1d747dd1cc917e59
1,026
py
Python
samples/tutorial-5.py
Richard-L-Johnson/pyalgotrader
ad2bcc6b25c06c66eee4a8d522ce844504d8ec62
[ "Apache-2.0" ]
3,719
2015-01-06T09:00:02.000Z
2022-03-31T20:55:01.000Z
samples/tutorial-5.py
Richard-L-Johnson/pyalgotrader
ad2bcc6b25c06c66eee4a8d522ce844504d8ec62
[ "Apache-2.0" ]
122
2015-01-01T17:06:22.000Z
2022-03-22T13:33:38.000Z
samples/tutorial-5.py
Richard-L-Johnson/pyalgotrader
ad2bcc6b25c06c66eee4a8d522ce844504d8ec62
[ "Apache-2.0" ]
1,428
2015-01-01T17:07:38.000Z
2022-03-31T10:02:37.000Z
from pyalgotrade import plotter from pyalgotrade.barfeed import quandlfeed from pyalgotrade.stratanalyzer import returns import sma_crossover # Load the bar feed from the CSV file feed = quandlfeed.Feed() feed.addBarsFromCSV("orcl", "WIKI-ORCL-2000-quandl.csv") # Evaluate the strategy with the feed's bars. myStrategy...
34.2
96
0.789474
from pyalgotrade import plotter from pyalgotrade.barfeed import quandlfeed from pyalgotrade.stratanalyzer import returns import sma_crossover feed = quandlfeed.Feed() feed.addBarsFromCSV("orcl", "WIKI-ORCL-2000-quandl.csv") myStrategy = sma_crossover.SMACrossOver(feed, "orcl", 20) # Attach a returns analyzers to t...
true
true
1c30ccfd8fc32263190dc25308ca7b6c7621657c
4,928
py
Python
src/oci/apigateway/models/header_validation_request_policy.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/apigateway/models/header_validation_request_policy.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/apigateway/models/header_validation_request_policy.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
36.503704
245
0.683442
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class HeaderValidationRequestPolicy(object): VALIDATION_MODE_ENFORCING = "ENFORCING" VALIDATION_MODE_P...
true
true
1c30cdb56ec9c8a721b9245384ea415dc675cf89
794
py
Python
networking-calico/networking_calico/tests/base.py
mikestephen/calico
6c512191c05097dbfacbd18fb23d1ebff18961fd
[ "Apache-2.0" ]
3,973
2015-07-29T21:13:46.000Z
2022-03-31T09:27:38.000Z
networking-calico/networking_calico/tests/base.py
mikestephen/calico
6c512191c05097dbfacbd18fb23d1ebff18961fd
[ "Apache-2.0" ]
4,584
2015-07-29T08:47:22.000Z
2022-03-31T22:54:26.000Z
networking-calico/networking_calico/tests/base.py
mikestephen/calico
6c512191c05097dbfacbd18fb23d1ebff18961fd
[ "Apache-2.0" ]
1,066
2015-07-30T06:29:18.000Z
2022-03-31T20:01:47.000Z
# -*- coding: utf-8 -*- # Copyright 2010-2011 OpenStack Foundation # Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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 # # htt...
33.083333
75
0.746851
from oslotest import base class TestCase(base.BaseTestCase):
true
true
1c30ceb82379c701d0aaa19e1746cd120433bc66
443
py
Python
src/utils/common_utils.py
ralfeger/language-identification
80c79423389207f197911d7b0eb78143f25f44b6
[ "BSD-2-Clause" ]
16
2021-06-23T15:24:04.000Z
2022-03-23T21:13:31.000Z
src/utils/common_utils.py
ralfeger/language-identification
80c79423389207f197911d7b0eb78143f25f44b6
[ "BSD-2-Clause" ]
null
null
null
src/utils/common_utils.py
ralfeger/language-identification
80c79423389207f197911d7b0eb78143f25f44b6
[ "BSD-2-Clause" ]
2
2021-06-24T08:49:26.000Z
2022-03-31T12:13:58.000Z
""" :author: Paul Bethge (bethge@zkm.de) 2021 :License: This package is published under Simplified BSD License. """ class Range(object): def __init__(self, start, end): self.start = start self.end = end def __eq__(self, other): return self.start <= other <= self.end def __contains__(self, item): return s...
17.038462
55
0.68623
class Range(object): def __init__(self, start, end): self.start = start self.end = end def __eq__(self, other): return self.start <= other <= self.end def __contains__(self, item): return self.__eq__(item) def __iter__(self): yield self def __str__(self): return '{0} - {1}'.format(self.start, self...
true
true
1c30d12919e16a90c13fc069273b0a89cf0622d4
4,363
py
Python
sympy/physics/quantum/anticommutator.py
JDTrujillo18/sympy
ef47677483b2f29d0b8e6a0eb45de72b2e34477d
[ "BSD-3-Clause" ]
4
2018-07-04T17:20:12.000Z
2019-07-14T18:07:25.000Z
sympy/physics/quantum/anticommutator.py
JDTrujillo18/sympy
ef47677483b2f29d0b8e6a0eb45de72b2e34477d
[ "BSD-3-Clause" ]
null
null
null
sympy/physics/quantum/anticommutator.py
JDTrujillo18/sympy
ef47677483b2f29d0b8e6a0eb45de72b2e34477d
[ "BSD-3-Clause" ]
1
2018-09-03T03:02:06.000Z
2018-09-03T03:02:06.000Z
"""The anti-commutator: ``{A,B} = A*B + B*A``.""" from __future__ import print_function, division from sympy import S, Expr, Mul, Integer from sympy.core.compatibility import u from sympy.printing.pretty.stringpict import prettyForm from sympy.physics.quantum.operator import Operator from sympy.physics.quantum.dagge...
29.883562
83
0.555123
from __future__ import print_function, division from sympy import S, Expr, Mul, Integer from sympy.core.compatibility import u from sympy.printing.pretty.stringpict import prettyForm from sympy.physics.quantum.operator import Operator from sympy.physics.quantum.dagger import Dagger __all__ = [ 'AntiCommutator' ...
true
true
1c30d3b7bec1460ddc836be1f6b85d6be46858d7
3,854
py
Python
ucscentralsdk/mometa/adaptor/AdaptorProtocolProfile.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
ucscentralsdk/mometa/adaptor/AdaptorProtocolProfile.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
ucscentralsdk/mometa/adaptor/AdaptorProtocolProfile.py
ragupta-git/ucscentralsdk
2678008b5fb6b0fafafec388d0874147e95a1086
[ "Apache-2.0" ]
null
null
null
"""This module contains the general information for AdaptorProtocolProfile ManagedObject.""" from ...ucscentralmo import ManagedObject from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta from ...ucscentralmeta import VersionMeta class AdaptorProtocolProfileConsts(): BOOT_TO_TARGET_FALSE =...
55.057143
269
0.676959
from ...ucscentralmo import ManagedObject from ...ucscentralcoremeta import UcsCentralVersion, MoPropertyMeta, MoMeta from ...ucscentralmeta import VersionMeta class AdaptorProtocolProfileConsts(): BOOT_TO_TARGET_FALSE = "false" BOOT_TO_TARGET_NO = "no" BOOT_TO_TARGET_TRUE = "true" BOOT_TO_TARGET_YES...
true
true
1c30d5a3a6d78db19f14f05f1216dea4dd85ef53
1,802
py
Python
day19/puzzle2.py
soerenbnoergaard/adventofcode2020
eaaf0b670ab581cf993167fa19023fe965cc2eb4
[ "MIT" ]
null
null
null
day19/puzzle2.py
soerenbnoergaard/adventofcode2020
eaaf0b670ab581cf993167fa19023fe965cc2eb4
[ "MIT" ]
null
null
null
day19/puzzle2.py
soerenbnoergaard/adventofcode2020
eaaf0b670ab581cf993167fa19023fe965cc2eb4
[ "MIT" ]
null
null
null
import re from copy import deepcopy from pprint import pprint # INFILE = "test_input1.txt" INFILE = "test_input2.txt" # INFILE = "puzzle_input.txt" def main(): rules, messages = parse(INFILE) rules = update(rules) print(f"{len(rules)=}") print(f"{len(messages)=}") pattern = expand(rules, "0") ...
24.684932
77
0.532186
import re from copy import deepcopy from pprint import pprint INFILE = "test_input2.txt" def main(): rules, messages = parse(INFILE) rules = update(rules) print(f"{len(rules)=}") print(f"{len(messages)=}") pattern = expand(rules, "0") print(pattern) num_match = 0 for message in mess...
true
true
1c30d64ed9596a121fb2b5a5b2d877f00c35273d
1,433
py
Python
users/migrations/0002_auto_20190824_1213.py
ispmor/space_reservation_system
459843c94bad82110a532db6e16d1075bc88f39b
[ "MIT" ]
null
null
null
users/migrations/0002_auto_20190824_1213.py
ispmor/space_reservation_system
459843c94bad82110a532db6e16d1075bc88f39b
[ "MIT" ]
23
2019-07-27T10:21:17.000Z
2022-02-10T08:39:12.000Z
users/migrations/0002_auto_20190824_1213.py
ispmor/space_reservation_system
459843c94bad82110a532db6e16d1075bc88f39b
[ "MIT" ]
1
2019-05-19T21:37:40.000Z
2019-05-19T21:37:40.000Z
# Generated by Django 2.2 on 2019-08-24 12:13 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AddField( model_name='customuser', name='archived', f...
32.568182
173
0.566643
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0001_initial'), ] operations = [ migrations.AddField( model_name='customuser', name='archived', field=models.BooleanField(blank=True, default=...
true
true
1c30da24056b0d1729d11e38cf1ff35b66700d17
1,481
py
Python
xlsxwriter/test/comparison/test_chart_data_labels02.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
2
2019-07-25T06:08:09.000Z
2019-11-01T02:33:56.000Z
xlsxwriter/test/comparison/test_chart_data_labels02.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
13
2019-07-14T00:29:05.000Z
2019-11-26T06:16:46.000Z
xlsxwriter/test/comparison/test_chart_data_labels02.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
24.683333
79
0.538825
true
true
1c30db6ad13e9d9f75d9cca786f0767d98239ed3
10,186
py
Python
models/base_model.py
santisy/pytorch-CycleGAN-and-pix2pix
0d78a3c34bea14316dba852724919fb3e75d1575
[ "BSD-3-Clause" ]
null
null
null
models/base_model.py
santisy/pytorch-CycleGAN-and-pix2pix
0d78a3c34bea14316dba852724919fb3e75d1575
[ "BSD-3-Clause" ]
null
null
null
models/base_model.py
santisy/pytorch-CycleGAN-and-pix2pix
0d78a3c34bea14316dba852724919fb3e75d1575
[ "BSD-3-Clause" ]
null
null
null
import os import torch from collections import OrderedDict from abc import ABCMeta, abstractmethod from . import networks class BaseModel(object): """This class is an abstract base class (ABC) for models. To create a subclass, you need to implement the following five functions: -- <__init__>: ...
45.070796
260
0.603181
import os import torch from collections import OrderedDict from abc import ABCMeta, abstractmethod from . import networks class BaseModel(object): __metaclass__ = ABCMeta def __init__(self, opt): self.opt = opt self.gpu_ids = opt.gpu_ids self.isTrain = opt.isTrain self.device ...
true
true
1c30db80a8a237b9c9b138d81fccccaf69511952
8,641
py
Python
homework/hw03/hw03.py
zltshadow/CS61A-2019-summer
0f5dd0be5f51927364aec1bc974526837328b695
[ "MIT" ]
3
2021-11-21T06:09:39.000Z
2022-03-12T08:05:27.000Z
homework/hw03/hw03.py
zltshadow/CS61A-2019-summer
0f5dd0be5f51927364aec1bc974526837328b695
[ "MIT" ]
null
null
null
homework/hw03/hw03.py
zltshadow/CS61A-2019-summer
0f5dd0be5f51927364aec1bc974526837328b695
[ "MIT" ]
null
null
null
HW_SOURCE_FILE = 'hw03.py' ######### # Trees # ######### def tree(label, branches=[]): """Construct a tree with the given label value and a list of branches.""" for branch in branches: assert is_tree(branch), 'branches must be trees' return [label] + list(branches) def label(tree): """Return ...
25.79403
210
0.550168
HW_SOURCE_FILE = 'hw03.py' ert is_tree(branch), 'branches must be trees' return [label] + list(branches) def label(tree): return tree[0] def branches(tree): return tree[1:] def is_tree(tree): if type(tree) != list or len(tree) < 1: return False for branch in branches(tree): if no...
true
true
1c30db9fc9464f74ad0004cc9f87dc057c9d0c09
2,410
py
Python
pdc/apps/common/models.py
hluk/product-definition-center
af79f73c30fa5f5709ba03d584b7a49b83166b81
[ "MIT" ]
18
2015-12-15T17:56:18.000Z
2021-04-10T13:49:48.000Z
pdc/apps/common/models.py
hluk/product-definition-center
af79f73c30fa5f5709ba03d584b7a49b83166b81
[ "MIT" ]
303
2015-11-18T07:37:06.000Z
2021-05-26T12:34:01.000Z
pdc/apps/common/models.py
hluk/product-definition-center
af79f73c30fa5f5709ba03d584b7a49b83166b81
[ "MIT" ]
27
2015-11-19T20:33:54.000Z
2021-03-25T08:15:28.000Z
# -*- coding: utf-8 -*- # # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # from django.db import models from pdc.apps.common.validators import validate_sigkey def get_cached_id(cls, cache_field, value, create=False): """cached `value` to database `id`""...
27.386364
100
0.610373
from django.db import models from pdc.apps.common.validators import validate_sigkey def get_cached_id(cls, cache_field, value, create=False): if not value: return None result = cls.CACHE.get(value, None) if result is None: if create: obj, _ = cls.objects.get_or_create(...
true
true
1c30dc5664d75ff7cfa74ca426b709badd9afac5
3,518
py
Python
platon/providers/auto.py
shinnng/platon.py
3197fac3839896290210da04dd0d45f0bdc731ce
[ "MIT" ]
null
null
null
platon/providers/auto.py
shinnng/platon.py
3197fac3839896290210da04dd0d45f0bdc731ce
[ "MIT" ]
null
null
null
platon/providers/auto.py
shinnng/platon.py
3197fac3839896290210da04dd0d45f0bdc731ce
[ "MIT" ]
null
null
null
import os from typing import ( Any, Callable, Dict, Optional, Sequence, Tuple, Type, Union, ) from urllib.parse import ( urlparse, ) from platon_typing import ( URI, ) from platon.exceptions import ( CannotHandleRequest, ) from platon.providers import ( BaseProvider, ...
27.700787
95
0.627061
import os from typing import ( Any, Callable, Dict, Optional, Sequence, Tuple, Type, Union, ) from urllib.parse import ( urlparse, ) from platon_typing import ( URI, ) from platon.exceptions import ( CannotHandleRequest, ) from platon.providers import ( BaseProvider, ...
true
true
1c30dd5d18fbc8e97d48bcb238cc760143ff089b
2,907
py
Python
docker/package/fedora.py
phanngt/tezos-packaging
ca804b53709c61fc5c959e02dafb69ccafddc26e
[ "Apache-2.0", "MIT" ]
null
null
null
docker/package/fedora.py
phanngt/tezos-packaging
ca804b53709c61fc5c959e02dafb69ccafddc26e
[ "Apache-2.0", "MIT" ]
null
null
null
docker/package/fedora.py
phanngt/tezos-packaging
ca804b53709c61fc5c959e02dafb69ccafddc26e
[ "Apache-2.0", "MIT" ]
null
null
null
# SPDX-FileCopyrightText: 2021 TQ Tezos <https://tqtezos.com/> # # SPDX-License-Identifier: LicenseRef-MIT-TQ import os, shutil, subprocess from typing import List from .model import AbstractPackage from .systemd import print_service_file def build_fedora_package( pkg: AbstractPackage, build_deps: List[str]...
36.797468
81
0.616099
import os, shutil, subprocess from typing import List from .model import AbstractPackage from .systemd import print_service_file def build_fedora_package( pkg: AbstractPackage, build_deps: List[str], run_deps: List[str], is_source: bool, ): dir = f"{pkg.name}-{pkg.meta.version}" cwd = os....
true
true
1c30dde957ec6ec2c8428b4859b69bf5c1bf83fb
73
py
Python
acousticsim/representations/mhec.py
JoFrhwld/python-acoustic-similarity
50f71835532010b2fedf14b0ca3a52d88a9ab380
[ "MIT" ]
5
2018-01-15T22:06:20.000Z
2022-02-21T07:02:40.000Z
acousticsim/representations/mhec.py
JoFrhwld/python-acoustic-similarity
50f71835532010b2fedf14b0ca3a52d88a9ab380
[ "MIT" ]
null
null
null
acousticsim/representations/mhec.py
JoFrhwld/python-acoustic-similarity
50f71835532010b2fedf14b0ca3a52d88a9ab380
[ "MIT" ]
2
2019-11-28T17:06:27.000Z
2019-12-05T22:57:28.000Z
from .base import Representation class Mhec(Representation): pass
10.428571
32
0.753425
from .base import Representation class Mhec(Representation): pass
true
true
1c30de6cbe077d2400e83fda34939b783042b201
3,421
py
Python
filter.py
bradyt/beancount-docs
73342599a9cbd8b0b7b89d5abf453fd87d322ea4
[ "MIT" ]
1
2020-07-27T00:47:41.000Z
2020-07-27T00:47:41.000Z
filter.py
bradyt/beancount-docs
73342599a9cbd8b0b7b89d5abf453fd87d322ea4
[ "MIT" ]
null
null
null
filter.py
bradyt/beancount-docs
73342599a9cbd8b0b7b89d5abf453fd87d322ea4
[ "MIT" ]
null
null
null
import json import logging import re from panflute import ( run_filter, stringify, BlockQuote, CodeBlock, Header, Image, LineBreak, Link, ListItem, Para, Space, Str, ) import requests from constants import GOOGLE_DOC_URL_REGEXP logging.basicConfig( filename='filter...
27.58871
71
0.563286
import json import logging import re from panflute import ( run_filter, stringify, BlockQuote, CodeBlock, Header, Image, LineBreak, Link, ListItem, Para, Space, Str, ) import requests from constants import GOOGLE_DOC_URL_REGEXP logging.basicConfig( filename='filter...
true
true
1c30de918e38e7d8958d2723841d2f47446e452b
9,245
py
Python
homeassistant/components/homekit/__init__.py
raymondelooff/home-assistant
a9a8cbbd100b4ca5c7f90210fb37da37bc634923
[ "Apache-2.0" ]
3
2019-01-31T13:41:37.000Z
2020-05-20T14:22:18.000Z
homeassistant/components/homekit/__init__.py
raymondelooff/home-assistant
a9a8cbbd100b4ca5c7f90210fb37da37bc634923
[ "Apache-2.0" ]
null
null
null
homeassistant/components/homekit/__init__.py
raymondelooff/home-assistant
a9a8cbbd100b4ca5c7f90210fb37da37bc634923
[ "Apache-2.0" ]
1
2020-11-04T07:35:32.000Z
2020-11-04T07:35:32.000Z
"""Support for Apple HomeKit. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/homekit/ """ import ipaddress import logging from zlib import adler32 import voluptuous as vol from homeassistant.components import cover from homeassistant.const import ( ...
34.36803
79
0.657869
import ipaddress import logging from zlib import adler32 import voluptuous as vol from homeassistant.components import cover from homeassistant.const import ( ATTR_DEVICE_CLASS, ATTR_SUPPORTED_FEATURES, ATTR_UNIT_OF_MEASUREMENT, CONF_IP_ADDRESS, CONF_NAME, CONF_PORT, CONF_TYPE, DEVICE_CLASS_HUMIDITY, DEVI...
true
true
1c30dee81d76fdf562d3cb39bff9a6d0dd08a5da
1,834
py
Python
bibcat/ingesters/rels_ext.py
KnowledgeLinks/bibcat
ed530401290865dcfefb2ae661a8880e52876a48
[ "MIT" ]
4
2018-02-13T20:36:29.000Z
2019-09-26T14:38:25.000Z
bibcat/ingesters/rels_ext.py
KnowledgeLinks/rdfw-bibcat
ed530401290865dcfefb2ae661a8880e52876a48
[ "MIT" ]
11
2017-10-27T17:44:46.000Z
2018-08-15T17:27:25.000Z
bibcat/ingesters/rels_ext.py
KnowledgeLinks/rdfw-bibcat
ed530401290865dcfefb2ae661a8880e52876a48
[ "MIT" ]
1
2017-01-23T19:52:01.000Z
2017-01-23T19:52:01.000Z
"""Fedora 3.x RELS-EXTseries to BIBFRAME 2.0 ingester This ingester is not intended to generated fully formed BF RDF but supplement existing ingesters like MODS and DC. The RELS-EXT ingester adds additional properties and classes to existing BF entities. """ __author__ = "Jeremy Nelson, Mike Stabile" import rdflib ...
38.208333
86
0.638495
__author__ = "Jeremy Nelson, Mike Stabile" import rdflib from bibcat.rml.processor import XMLProcessor BF = rdflib.Namespace("http://id.loc.gov/ontologies/bibframe/") class RELSEXTIngester(XMLProcessor): def __init__(self, **kwargs): rules = ["rels-ext.ttl"] if "rules_ttl" in kwargs: ...
true
true
1c30df9102b886dcf6539d61d83a51e700bd9743
13,174
py
Python
innexia/innexiaBot/modules/disable.py
MikeOwino/curly-garbanzo
37027800724cb80c4035eac421421a7ceb1062a6
[ "MIT" ]
null
null
null
innexia/innexiaBot/modules/disable.py
MikeOwino/curly-garbanzo
37027800724cb80c4035eac421421a7ceb1062a6
[ "MIT" ]
null
null
null
innexia/innexiaBot/modules/disable.py
MikeOwino/curly-garbanzo
37027800724cb80c4035eac421421a7ceb1062a6
[ "MIT" ]
null
null
null
import importlib from typing import Union from future.utils import string_types from innexiaBot import dispatcher from innexiaBot.modules.helper_funcs.handlers import CMD_STARTERS, SpamChecker from innexiaBot.modules.helper_funcs.misc import is_module_loaded from telegram import ParseMode, Update from telegram.ext imp...
36.901961
88
0.571201
import importlib from typing import Union from future.utils import string_types from innexiaBot import dispatcher from innexiaBot.modules.helper_funcs.handlers import CMD_STARTERS, SpamChecker from innexiaBot.modules.helper_funcs.misc import is_module_loaded from telegram import ParseMode, Update from telegram.ext imp...
true
true
1c30dfad8ff52390322775828193a9dbef30f255
7,614
py
Python
tests/st/ops/ascend/test_gru_op.py
httpsgithu/mindspore
c29d6bb764e233b427319cb89ba79e420f1e2c64
[ "Apache-2.0" ]
1
2022-02-23T09:13:43.000Z
2022-02-23T09:13:43.000Z
tests/st/ops/ascend/test_gru_op.py
949144093/mindspore
c29d6bb764e233b427319cb89ba79e420f1e2c64
[ "Apache-2.0" ]
null
null
null
tests/st/ops/ascend/test_gru_op.py
949144093/mindspore
c29d6bb764e233b427319cb89ba79e420f1e2c64
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
41.606557
115
0.695692
import math import pytest import numpy as np from mindspore import context from mindspore import nn from mindspore import Tensor from mindspore.common.parameter import ParameterTuple from mindspore.common.parameter import Parameter from mindspore.ops import composite as c class GradOfAllInputsAndParams...
true
true
1c30dfddcaffa3a606e4b35353e48e34e5244bde
5,051
py
Python
setup.py
joeddav/datasets
f955fa2d4785a1cea381a7999e0c5d0c0314046b
[ "Apache-2.0" ]
null
null
null
setup.py
joeddav/datasets
f955fa2d4785a1cea381a7999e0c5d0c0314046b
[ "Apache-2.0" ]
null
null
null
setup.py
joeddav/datasets
f955fa2d4785a1cea381a7999e0c5d0c0314046b
[ "Apache-2.0" ]
null
null
null
# Lint as: python3 """ HuggingFace/Datasets is an open library of NLP datasets. Note: VERSION needs to be formatted following the MAJOR.MINOR.PATCH convention (we need to follow this convention to be able to retrieve versioned scripts) Simple check list for release from AllenNLP repo: https://github.com/allena...
30.98773
119
0.681251
import datetime import itertools import os import sys from setuptools import find_packages from setuptools import setup DOCLINES = __doc__.split('\n') REQUIRED_PKGS = [ 'numpy>=1.17', 'pyarrow>=0.17.1', 'dill', 'pandas', 'requests>=2.19.0', "tqdm >= 4.27", ...
true
true
1c30e01cd95229d02d5dc863333ad64d5d70e705
18,025
py
Python
data/user_input/plots/structural/plotStructuralFrequencyResponseInput.py
open-pulse/OpenPulse
ef49cd1ff672821c4b57729c0ef9f4ff5a83eadf
[ "MIT" ]
23
2020-01-14T12:49:11.000Z
2021-11-10T05:19:29.000Z
data/user_input/plots/structural/plotStructuralFrequencyResponseInput.py
open-pulse/OpenPulse
ef49cd1ff672821c4b57729c0ef9f4ff5a83eadf
[ "MIT" ]
101
2020-01-23T19:29:00.000Z
2022-03-15T17:56:23.000Z
data/user_input/plots/structural/plotStructuralFrequencyResponseInput.py
open-pulse/OpenPulse
ef49cd1ff672821c4b57729c0ef9f4ff5a83eadf
[ "MIT" ]
3
2020-01-14T12:49:26.000Z
2022-01-13T02:06:53.000Z
from PyQt5.QtWidgets import QLineEdit, QDialog, QFileDialog, QWidget, QTreeWidget, QToolButton, QRadioButton, QMessageBox, QTreeWidgetItem, QTabWidget, QLabel, QCheckBox, QPushButton, QSpinBox from os.path import basename from PyQt5.QtGui import QIcon from PyQt5.QtGui import QColor, QBrush from PyQt5.QtCore import Qt f...
46.099744
192
0.650818
from PyQt5.QtWidgets import QLineEdit, QDialog, QFileDialog, QWidget, QTreeWidget, QToolButton, QRadioButton, QMessageBox, QTreeWidgetItem, QTabWidget, QLabel, QCheckBox, QPushButton, QSpinBox from os.path import basename from PyQt5.QtGui import QIcon from PyQt5.QtGui import QColor, QBrush from PyQt5.QtCore import Qt f...
true
true
1c30e0935d54d1c3ba212343db4032e9c8553c20
3,342
py
Python
fill-gaps/fill_gaps.py
DOUGLASMENDES/Python-Scripts
00021ede5e894a0e2fb43a33129bf1d9dc0c492d
[ "MIT" ]
307
2019-05-17T21:34:12.000Z
2022-03-28T20:03:44.000Z
fill-gaps/fill_gaps.py
DOUGLASMENDES/Python-Scripts
00021ede5e894a0e2fb43a33129bf1d9dc0c492d
[ "MIT" ]
8
2021-03-19T00:47:41.000Z
2022-03-11T23:47:47.000Z
fill-gaps/fill_gaps.py
DOUGLASMENDES/Python-Scripts
00021ede5e894a0e2fb43a33129bf1d9dc0c492d
[ "MIT" ]
78
2019-05-23T00:51:28.000Z
2022-02-01T21:25:24.000Z
#! python3 # fill_gaps.py # Author: Kene Udeh # Source: Automate the Boring stuff with python Ch. 9 Project import os import re import shutil def getFilesWithPrefix(folderPath, prefix): """get all files with a certain prefix Args: folderPath (str): path to folder to search Returns: """ fi...
35.935484
121
0.59994
import os import re import shutil def getFilesWithPrefix(folderPath, prefix): fileRegex = re.compile(prefix+'(\d{1,})(.\w+)') fileList = sorted( [file for file in os.listdir(folderPath) if fileRegex.match(file)] ) return fileList def fillGaps(folderPath, prefix): fileList = getFilesWithPrefix(fol...
true
true
1c30e09656038523faf619660703ee1e184e6ac6
760
py
Python
henon_heiles_system.py
cosmo-jana/numerics-physics-stuff
f5fb35c00c84ca713877e20c1d8186e76883cd28
[ "MIT" ]
1
2020-10-16T16:35:35.000Z
2020-10-16T16:35:35.000Z
henon_heiles_system.py
cosmo-jana/numerics-physics-stuff
f5fb35c00c84ca713877e20c1d8186e76883cd28
[ "MIT" ]
null
null
null
henon_heiles_system.py
cosmo-jana/numerics-physics-stuff
f5fb35c00c84ca713877e20c1d8186e76883cd28
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from scipy.integrate import solve_ivp def henon_heiles_rhs(t, s): x, y, px, py = s Fx = - x - 2*x*y Fy = - y - (x**2 - y**2) return px, py, Fx, Fy def henon_heiles_system(initial_pos, initial_vel, time_span=100, num_samples=1000): sol = so...
29.230769
72
0.619737
import numpy as np import matplotlib.pyplot as plt from scipy.integrate import solve_ivp def henon_heiles_rhs(t, s): x, y, px, py = s Fx = - x - 2*x*y Fy = - y - (x**2 - y**2) return px, py, Fx, Fy def henon_heiles_system(initial_pos, initial_vel, time_span=100, num_samples=1000): sol = so...
true
true
1c30e21627c98fd595cb22f185b4fa349ea23a12
1,581
py
Python
data/sampler.py
alexchungio/RetinaNet-Pytorch
2eea76171407f050d03fd0313b6920421e4a3015
[ "MIT" ]
null
null
null
data/sampler.py
alexchungio/RetinaNet-Pytorch
2eea76171407f050d03fd0313b6920421e4a3015
[ "MIT" ]
null
null
null
data/sampler.py
alexchungio/RetinaNet-Pytorch
2eea76171407f050d03fd0313b6920421e4a3015
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- #------------------------------------------------------ # @ File : sampler.py # @ Description: # @ Author : Alex Chung # @ Contact : yonganzhong@outlook.com # @ License : Copyright (c) 2017-2018 # @ Time : 2020/11/18 下午4:11 # @ Software : PyCharm #...
31.62
126
0.596458
import random import torchvision from torch.utils.data.sampler import Sampler class AspectRatioBasedSampler(Sampler): def __init__(self, data_source, batch_size, drop_last): super(AspectRatioBasedSampler, self).__init__(data_source) self.data_source = data_source self.batch_si...
true
true
1c30e253a241cb0b82efac76e34724ae80cfe19e
201
py
Python
aging/parameters.py
freefeynman123/Aging
12633abc709b376dcd61d6e4f78a8a4343a0550c
[ "MIT" ]
1
2022-03-15T06:33:56.000Z
2022-03-15T06:33:56.000Z
aging/parameters.py
freefeynman123/Aging
12633abc709b376dcd61d6e4f78a8a4343a0550c
[ "MIT" ]
null
null
null
aging/parameters.py
freefeynman123/Aging
12633abc709b376dcd61d6e4f78a8a4343a0550c
[ "MIT" ]
null
null
null
#Parameters for neural net training n_channels = 3 n_encode = 64 n_z = 50 n_l = 10 n_generator = 64 batch_size = 32 image_size = 128 n_discriminator = 16 n_age = int(n_z / n_l) n_gender = int(n_z / 2)
16.75
35
0.721393
n_channels = 3 n_encode = 64 n_z = 50 n_l = 10 n_generator = 64 batch_size = 32 image_size = 128 n_discriminator = 16 n_age = int(n_z / n_l) n_gender = int(n_z / 2)
true
true
1c30e2bf5386b9f44a24a53b906de5908797f9f0
282
py
Python
leaker/pattern/__init__.py
anonleakerdev/LEAKER
bea8623021b3eb0b4fb450f2cdd1b48834d7c196
[ "MIT" ]
8
2021-08-30T04:55:21.000Z
2022-03-20T16:14:33.000Z
leaker/pattern/__init__.py
anonleakerdev/LEAKER
bea8623021b3eb0b4fb450f2cdd1b48834d7c196
[ "MIT" ]
1
2021-08-09T09:22:00.000Z
2021-08-09T09:22:00.000Z
leaker/pattern/__init__.py
anonleakerdev/LEAKER
bea8623021b3eb0b4fb450f2cdd1b48834d7c196
[ "MIT" ]
null
null
null
from .identity import ResponseIdentity from .length import ResponseLength from .volume import TotalVolume, Volume from .cooccurrence import CoOccurrence from .rank import Rank __all__ = [ 'ResponseIdentity', 'ResponseLength', 'TotalVolume', 'Volume', 'CoOccurrence', 'Rank', ]
28.2
90
0.776596
from .identity import ResponseIdentity from .length import ResponseLength from .volume import TotalVolume, Volume from .cooccurrence import CoOccurrence from .rank import Rank __all__ = [ 'ResponseIdentity', 'ResponseLength', 'TotalVolume', 'Volume', 'CoOccurrence', 'Rank', ]
true
true
1c30e3878bd84fbf53f92f80754641a0c21a4ed6
4,130
py
Python
scylla/web/server.py
kirinse/scylla
e0fbe07d155856a5f76db600320b3d5bf0a53eaf
[ "Apache-2.0" ]
null
null
null
scylla/web/server.py
kirinse/scylla
e0fbe07d155856a5f76db600320b3d5bf0a53eaf
[ "Apache-2.0" ]
null
null
null
scylla/web/server.py
kirinse/scylla
e0fbe07d155856a5f76db600320b3d5bf0a53eaf
[ "Apache-2.0" ]
null
null
null
import math import os from playhouse.shortcuts import model_to_dict from sanic import Sanic from sanic.request import Request from sanic.response import json from sanic_cors import CORS from scylla.database import ProxyIP from scylla.loggings import logger app = Sanic() CORS(app) base_path = os.path.abspath(os.pat...
28.287671
118
0.597337
import math import os from playhouse.shortcuts import model_to_dict from sanic import Sanic from sanic.request import Request from sanic.response import json from sanic_cors import CORS from scylla.database import ProxyIP from scylla.loggings import logger app = Sanic() CORS(app) base_path = os.path.abspath(os.pat...
true
true
1c30e3fac6b958925d4489b37cd3a3d7fea02f79
2,971
py
Python
tests/system/gapic/v1/test_system_speech_v1.py
busunkim96/python-speech
4214630c3318e6c9bc0a5156e20344956faf7d52
[ "Apache-2.0" ]
1
2019-03-26T21:44:51.000Z
2019-03-26T21:44:51.000Z
tests/system/gapic/v1/test_system_speech_v1.py
busunkim96/python-speech
4214630c3318e6c9bc0a5156e20344956faf7d52
[ "Apache-2.0" ]
40
2019-07-16T10:04:48.000Z
2020-01-20T09:04:59.000Z
tests/system/gapic/v1/test_system_speech_v1.py
busunkim96/python-speech
4214630c3318e6c9bc0a5156e20344956faf7d52
[ "Apache-2.0" ]
2
2019-07-18T00:05:31.000Z
2019-11-27T14:17:22.000Z
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
31.273684
85
0.656345
import os import io import requests from google.cloud import speech_v1 class TestSystemSpeech(object): def test_recognize(self): try: BUCKET = os.environ["GOOGLE_CLOUD_TESTS_SPEECH_BUCKET"] except KeyError: BUCKET = "cloud-samples-tests" client = sp...
true
true
1c30e43b5090c72c5287a606bc577e1e6dc801ae
9,643
py
Python
zeus/trainer/utils.py
TianQi-777/xingtian
9b1678ad6ff12f00c2826a7ec7f42d5350b83b31
[ "MIT" ]
240
2020-08-15T15:11:49.000Z
2022-03-28T07:26:23.000Z
zeus/trainer/utils.py
TianQi-777/xingtian
9b1678ad6ff12f00c2826a7ec7f42d5350b83b31
[ "MIT" ]
20
2020-08-29T06:18:21.000Z
2022-03-21T04:35:57.000Z
zeus/trainer/utils.py
TianQi-777/xingtian
9b1678ad6ff12f00c2826a7ec7f42d5350b83b31
[ "MIT" ]
69
2020-08-15T15:41:53.000Z
2022-03-16T08:27:47.000Z
# -*- coding:utf-8 -*- # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved. # This program is free software; you can redistribute it and/or modify # it under the terms of the MIT License. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the ...
31.825083
93
0.604895
import os import socket import subprocess import sys import logging import signal import psutil from collections import OrderedDict from enum import Enum from zeus.common import FileOps from zeus.common.task_ops import TaskOps class WorkerTypes(Enum): TRAINER = 1 EVALUATOR = 2 HOST_EVALUATOR = ...
true
true
1c30e5d2a024fe414aefea9a5499608d015137fb
2,170
py
Python
dojo/unittests/tools/test_gitlab_container_scan_parser.py
axelpavageau/django-DefectDojo
00b425742b783ada0f432241c2812ac1257feb73
[ "BSD-3-Clause" ]
1,772
2018-01-22T23:32:15.000Z
2022-03-31T14:49:33.000Z
dojo/unittests/tools/test_gitlab_container_scan_parser.py
axelpavageau/django-DefectDojo
00b425742b783ada0f432241c2812ac1257feb73
[ "BSD-3-Clause" ]
3,461
2018-01-20T19:12:28.000Z
2022-03-31T17:14:39.000Z
dojo/unittests/tools/test_gitlab_container_scan_parser.py
axelpavageau/django-DefectDojo
00b425742b783ada0f432241c2812ac1257feb73
[ "BSD-3-Clause" ]
1,173
2018-01-23T07:10:23.000Z
2022-03-31T14:40:43.000Z
from datetime import datetime from django.test import TestCase from dojo.tools.gitlab_container_scan.parser import GitlabContainerScanParser from dojo.models import Test class TestGitlabContainerScanParser(TestCase): def test_gitlab_container_scan_parser_with_no_vuln_has_no_findings(self): testfile = ope...
49.318182
110
0.723041
from datetime import datetime from django.test import TestCase from dojo.tools.gitlab_container_scan.parser import GitlabContainerScanParser from dojo.models import Test class TestGitlabContainerScanParser(TestCase): def test_gitlab_container_scan_parser_with_no_vuln_has_no_findings(self): testfile = ope...
true
true
1c30e5f7e5e604f4ff88dcce7fe6bc1c438a2bdc
4,841
py
Python
c7n/filters/config.py
ncerny/cloud-custodian
c43831604534a2bbc9e2a01187354b77a9b44bdc
[ "Apache-2.0" ]
null
null
null
c7n/filters/config.py
ncerny/cloud-custodian
c43831604534a2bbc9e2a01187354b77a9b44bdc
[ "Apache-2.0" ]
1
2021-04-30T21:13:50.000Z
2021-04-30T21:13:50.000Z
c7n/filters/config.py
ncerny/cloud-custodian
c43831604534a2bbc9e2a01187354b77a9b44bdc
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
36.674242
81
0.600496
from c7n.filters import ValueFilter from c7n.manager import resources from c7n.utils import local_session, type_schema from .core import Filter class ConfigCompliance(Filter): permissions = ('config:DescribeComplianceByConfigRule',) schema = type_schema( 'config-compliance', requ...
true
true
1c30e600c88e0eeb37f6a6620136608b6174d39e
1,912
py
Python
proxy/get_proxy_url_test.py
Iuiu1234/pipelines
1e032f550ce23cd40bfb6827b995248537b07d08
[ "Apache-2.0" ]
2,860
2018-05-24T04:55:01.000Z
2022-03-31T13:49:56.000Z
proxy/get_proxy_url_test.py
Iuiu1234/pipelines
1e032f550ce23cd40bfb6827b995248537b07d08
[ "Apache-2.0" ]
7,331
2018-05-16T09:03:26.000Z
2022-03-31T23:22:04.000Z
proxy/get_proxy_url_test.py
Iuiu1234/pipelines
1e032f550ce23cd40bfb6827b995248537b07d08
[ "Apache-2.0" ]
1,359
2018-05-15T11:05:41.000Z
2022-03-31T09:42:09.000Z
#!/usr/bin/env python3 # Copyright 2019 The Kubeflow Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
32.965517
74
0.654812
import json import unittest from get_proxy_url import urls_for_zone url_map_json = """ { "us": ["https://datalab-us-west1.cloud.google.com"], "us-west1": ["https://datalab-us-west1.cloud.google.com"], "us-west2": ["https://datalab-us-west2.cloud.google.com"], "us-east1": ["h...
true
true
1c30e601b7cf6ed33ca78c41bcb799c5c3a262b3
4,900
py
Python
nixgateway/api.py
scardine/py-nixgateway
36baf34a528fe88893c65b444e847da4ac8df2ab
[ "MIT" ]
1
2020-03-27T22:19:26.000Z
2020-03-27T22:19:26.000Z
nixgateway/api.py
scardine/py-nixgateway
36baf34a528fe88893c65b444e847da4ac8df2ab
[ "MIT" ]
null
null
null
nixgateway/api.py
scardine/py-nixgateway
36baf34a528fe88893c65b444e847da4ac8df2ab
[ "MIT" ]
null
null
null
# coding=utf-8 import json from uuid import uuid4 import requests import time from jose import jwt import base64 class CardPayments(object): def __init__(self, gateway): self._gateway = gateway def __call__(self, payment_token=None): params = {} if payment_token is not None: ...
30.81761
119
0.553878
import json from uuid import uuid4 import requests import time from jose import jwt import base64 class CardPayments(object): def __init__(self, gateway): self._gateway = gateway def __call__(self, payment_token=None): params = {} if payment_token is not None: if isinsta...
true
true
1c30e60f844a1b19335bc02f270791149df2208c
3,339
py
Python
Graphs/graphrepresentation.py
buntyke/technical_interview_udacity
7973197d2349c0c2b06982758952cf03db8ab964
[ "MIT" ]
null
null
null
Graphs/graphrepresentation.py
buntyke/technical_interview_udacity
7973197d2349c0c2b06982758952cf03db8ab964
[ "MIT" ]
null
null
null
Graphs/graphrepresentation.py
buntyke/technical_interview_udacity
7973197d2349c0c2b06982758952cf03db8ab964
[ "MIT" ]
1
2018-11-07T17:18:37.000Z
2018-11-07T17:18:37.000Z
class Node(object): def __init__(self, value): self.value = value self.edges = [] class Edge(object): def __init__(self, value, node_from, node_to): self.value = value self.node_from = node_from self.node_to = node_to class Graph(object): def __init__(self, nodes=[N...
34.42268
105
0.589398
class Node(object): def __init__(self, value): self.value = value self.edges = [] class Edge(object): def __init__(self, value, node_from, node_to): self.value = value self.node_from = node_from self.node_to = node_to class Graph(object): def __init__(self, nodes=[N...
false
true
1c30e66289b203c7bb8621212a6b627a6ffe918c
1,350
py
Python
features.py
rebecca0323/Predicting-Migraines-IAIF
5e4a31ca437b89c622fb5ed3ab8535728686ec2c
[ "MIT" ]
null
null
null
features.py
rebecca0323/Predicting-Migraines-IAIF
5e4a31ca437b89c622fb5ed3ab8535728686ec2c
[ "MIT" ]
null
null
null
features.py
rebecca0323/Predicting-Migraines-IAIF
5e4a31ca437b89c622fb5ed3ab8535728686ec2c
[ "MIT" ]
null
null
null
features = ["total_triggers", "rest", "medicine", "headache_day", "menstruation", "stress", "less_sleep", "fatigue", "emotional_changes", "weather_temp", "noise", "odors", "drinking", "irregular_meals", "other", "other.1", "excess_sleep", "exercise", "no_exercise", "ovulation", "sunlight", "improper_lighting", "overea...
79.411765
129
0.705926
features = ["total_triggers", "rest", "medicine", "headache_day", "menstruation", "stress", "less_sleep", "fatigue", "emotional_changes", "weather_temp", "noise", "odors", "drinking", "irregular_meals", "other", "other.1", "excess_sleep", "exercise", "no_exercise", "ovulation", "sunlight", "improper_lighting", "overea...
true
true
1c30e6e17a75c53fe0a3fc3d4d6bdc8e9ab1cef3
3,860
py
Python
src/silx/math/setup.py
tifuchs/silx
4b8b9e58ecd6fd4ca0ae80f2e74b956b26bcc3f7
[ "CC0-1.0", "MIT" ]
94
2016-03-04T17:25:53.000Z
2022-03-18T18:05:23.000Z
src/silx/math/setup.py
tifuchs/silx
4b8b9e58ecd6fd4ca0ae80f2e74b956b26bcc3f7
[ "CC0-1.0", "MIT" ]
2,841
2016-01-21T09:06:49.000Z
2022-03-18T14:53:56.000Z
src/silx/math/setup.py
t20100/silx
035cb286dd46f3f0cb3f819a3cfb6ce253c9933b
[ "CC0-1.0", "MIT" ]
71
2015-09-30T08:35:35.000Z
2022-03-16T07:16:28.000Z
# coding: utf-8 # /*########################################################################## # Copyright (C) 2016-2021 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to dea...
38.6
80
0.547668
true
true
1c30e73790fb26a531f799aac05afbdede366545
869
py
Python
week-2/stepik-1.7.1.py
bhavin-ch/bioinformatics
f2844bea3a2e1125b0d71b65b00c6b9e7975921a
[ "MIT" ]
null
null
null
week-2/stepik-1.7.1.py
bhavin-ch/bioinformatics
f2844bea3a2e1125b0d71b65b00c6b9e7975921a
[ "MIT" ]
null
null
null
week-2/stepik-1.7.1.py
bhavin-ch/bioinformatics
f2844bea3a2e1125b0d71b65b00c6b9e7975921a
[ "MIT" ]
null
null
null
# from dataset_3014_4.txt TEXT = 'CCAGTCAATG' D = 1 swap_map = { 'A': 'TCG', 'T': 'CGA', 'C': 'GAT', 'G': 'ATC' } def remove_duplicates(somelist): return list(set(somelist)) def single_letter_neighborhood(pattern, i): return [pattern[:i] + x + pattern[i+1:] for x in swap_map[pattern[i]]] de...
24.828571
74
0.659379
TEXT = 'CCAGTCAATG' D = 1 swap_map = { 'A': 'TCG', 'T': 'CGA', 'C': 'GAT', 'G': 'ATC' } def remove_duplicates(somelist): return list(set(somelist)) def single_letter_neighborhood(pattern, i): return [pattern[:i] + x + pattern[i+1:] for x in swap_map[pattern[i]]] def one_neighborhood(patter...
true
true
1c30e815a54eefb9e55589706529f73c8d13b3ef
184
py
Python
2020 Leetcode Challenges/12 December Leetcode Challenge 2020/15 square_of_sorted_array.py
FazeelUsmani/Leetcode
aff4c119178f132c28a39506ffaa75606e0a861b
[ "MIT" ]
7
2020-12-01T14:27:57.000Z
2022-02-12T09:17:22.000Z
2020 Leetcode Challenges/12 December Leetcode Challenge 2020/15 square_of_sorted_array.py
FazeelUsmani/Leetcode
aff4c119178f132c28a39506ffaa75606e0a861b
[ "MIT" ]
4
2020-11-12T17:49:22.000Z
2021-09-06T07:46:37.000Z
2020 Leetcode Challenges/12 December Leetcode Challenge 2020/15 square_of_sorted_array.py
FazeelUsmani/Leetcode
aff4c119178f132c28a39506ffaa75606e0a861b
[ "MIT" ]
6
2021-05-21T03:49:22.000Z
2022-01-20T20:36:53.000Z
class Solution: def sortedSquares(self, nums: List[int]) -> List[int]: ans = [x**2 for x in nums] ans.sort() return ans
18.4
58
0.445652
class Solution: def sortedSquares(self, nums: List[int]) -> List[int]: ans = [x**2 for x in nums] ans.sort() return ans
true
true
1c30e890d496295ecad1fd637cc6ae2760c657e2
1,501
py
Python
sensuspy/data_retrieval.py
hakansakarya/sensuspy
6b48cd04cbb48e14ae740c9fb4da14c9715f6159
[ "MIT" ]
1
2018-02-19T14:57:07.000Z
2018-02-19T14:57:07.000Z
sensuspy/data_retrieval.py
hakansakarya/sensuspy
6b48cd04cbb48e14ae740c9fb4da14c9715f6159
[ "MIT" ]
null
null
null
sensuspy/data_retrieval.py
hakansakarya/sensuspy
6b48cd04cbb48e14ae740c9fb4da14c9715f6159
[ "MIT" ]
null
null
null
__author__ = "Sait Hakan Sakarya" __email__ = "shs5fh@virginia.edu" import os import glob import gzip import struct def sync_from_aws(s3_path, local_path, profile = "default", aws_client_path = "/usr/local/bin/aws", delete = False, decompress_files = True): """Synchronizes data from Amazon S3 to a local path usi...
27.290909
141
0.584277
__author__ = "Sait Hakan Sakarya" __email__ = "shs5fh@virginia.edu" import os import glob import gzip import struct def sync_from_aws(s3_path, local_path, profile = "default", aws_client_path = "/usr/local/bin/aws", delete = False, decompress_files = True): aws_args = "s3 --profile " + profile + " sync " + s3_p...
true
true
1c30e979a316677653e10a7d840b2373d881b549
1,925
py
Python
src/modules/loss.py
ab3llini/BlindLess
46c50fb2748b9d372044d00b901f0cde91946684
[ "MIT" ]
1
2022-03-19T09:19:12.000Z
2022-03-19T09:19:12.000Z
src/modules/loss.py
ab3llini/BlindLess
46c50fb2748b9d372044d00b901f0cde91946684
[ "MIT" ]
1
2020-02-06T18:26:07.000Z
2020-02-06T18:26:07.000Z
src/modules/loss.py
ab3llini/BlindLess
46c50fb2748b9d372044d00b901f0cde91946684
[ "MIT" ]
null
null
null
from torch.nn import CrossEntropyLoss class GPT2Loss(CrossEntropyLoss): def __init__(self, pad_token_id): super(GPT2Loss, self).__init__(ignore_index=pad_token_id) def forward(self, output, labels): """ Loss function for gpt2 :param output: :param labels: :retu...
31.048387
75
0.619221
from torch.nn import CrossEntropyLoss class GPT2Loss(CrossEntropyLoss): def __init__(self, pad_token_id): super(GPT2Loss, self).__init__(ignore_index=pad_token_id) def forward(self, output, labels): output = output[..., :-1, :].contiguous().view(-1, output.size(-1)) ...
true
true
1c30ea2453568d127247c6ab672daa42e273563a
1,657
py
Python
src/api/server.py
Avik32223/gala-iam-api
2e9f852d016be651e90e21cd5693a10048e487e0
[ "MIT" ]
null
null
null
src/api/server.py
Avik32223/gala-iam-api
2e9f852d016be651e90e21cd5693a10048e487e0
[ "MIT" ]
null
null
null
src/api/server.py
Avik32223/gala-iam-api
2e9f852d016be651e90e21cd5693a10048e487e0
[ "MIT" ]
null
null
null
import os from fastapi import Depends, FastAPI from pymongo import MongoClient from starlette.requests import Request from starlette.responses import Response from db import Database from routes import permissions, roles, service_accounts, groups, users, resources, resource_actions from utils import get_db MONGO_DB_...
38.534884
99
0.756186
import os from fastapi import Depends, FastAPI from pymongo import MongoClient from starlette.requests import Request from starlette.responses import Response from db import Database from routes import permissions, roles, service_accounts, groups, users, resources, resource_actions from utils import get_db MONGO_DB_...
true
true
1c30ea54a706b7feb4d3cf2542d1c8102ab009e6
9,490
py
Python
pygame_menu/examples/game_selector.py
notrurs/pygame-menu
159853d856d5b25e813389b8ebf541c79771c8ed
[ "MIT" ]
null
null
null
pygame_menu/examples/game_selector.py
notrurs/pygame-menu
159853d856d5b25e813389b8ebf541c79771c8ed
[ "MIT" ]
null
null
null
pygame_menu/examples/game_selector.py
notrurs/pygame-menu
159853d856d5b25e813389b8ebf541c79771c8ed
[ "MIT" ]
null
null
null
# coding=utf-8 """ pygame-menu https://github.com/ppizarror/pygame-menu EXAMPLE - GAME SELECTOR Game with 3 difficulty options. License: ------------------------------------------------------------------------------- The MIT License (MIT) Copyright 2017-2020 Pablo Pizarro R. @ppizarror Permission is hereby granted, ...
32.169492
94
0.541728
import sys sys.path.insert(0, '../../') import os import pygame import pygame_menu from random import randrange ABOUT = ['pygame-menu {0}'.format(pygame_menu.__version__), 'Author: @{0}'.format(pygame_menu.__author__), '', 'Email: {0}'.format(pygame_menu.__email__)] DIFFICULTY = [...
true
true
1c30eaae883f48dd77f10f36bc40d36b1f5eb484
1,327
py
Python
remove_copies.py
bazitur/C6H6
490b1e93b4b33d0f14c8a3e3c0f7c012caefdb90
[ "BSD-3-Clause" ]
null
null
null
remove_copies.py
bazitur/C6H6
490b1e93b4b33d0f14c8a3e3c0f7c012caefdb90
[ "BSD-3-Clause" ]
null
null
null
remove_copies.py
bazitur/C6H6
490b1e93b4b33d0f14c8a3e3c0f7c012caefdb90
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function from rdkit import Chem from rdkit import DataStructs from rdkit.Chem.Fingerprints import FingerprintMols from glob import glob filenames = sorted(glob("./MOLs/*")) canonical_SMILES = [Chem.MolToSmiles(Chem.MolFromMolFile(fn)) for fn in filenames] def f7(seq): seen = set() ...
28.847826
83
0.66315
from __future__ import print_function from rdkit import Chem from rdkit import DataStructs from rdkit.Chem.Fingerprints import FingerprintMols from glob import glob filenames = sorted(glob("./MOLs/*")) canonical_SMILES = [Chem.MolToSmiles(Chem.MolFromMolFile(fn)) for fn in filenames] def f7(seq): seen = set() ...
true
true
1c30ebe459262437a52d7dd2fbbc288b940c35a0
4,989
py
Python
lsml/initializer/provided/ball.py
sandeepdas05/lsm-crack-width
38460e514d48f3424bb8d3bd58cb3eb330153e64
[ "BSD-3-Clause" ]
24
2020-01-30T15:53:33.000Z
2022-01-15T09:46:24.000Z
lsml/initializer/provided/ball.py
sandeepdas05/lsm-crack-width
38460e514d48f3424bb8d3bd58cb3eb330153e64
[ "BSD-3-Clause" ]
null
null
null
lsml/initializer/provided/ball.py
sandeepdas05/lsm-crack-width
38460e514d48f3424bb8d3bd58cb3eb330153e64
[ "BSD-3-Clause" ]
13
2019-12-05T08:32:11.000Z
2022-03-20T03:12:03.000Z
import numpy from lsml.initializer.initializer_base import InitializerBase class BallInitializer(InitializerBase): """ Initialize the zero level set to a ball of fixed radius """ def __init__(self, radius=10, location=None): self.radius = radius self.location = location def initialize(s...
32.187097
74
0.60453
import numpy from lsml.initializer.initializer_base import InitializerBase class BallInitializer(InitializerBase): def __init__(self, radius=10, location=None): self.radius = radius self.location = location def initialize(self, img, dx, seed): if self.location is not None and len(s...
true
true
1c30ef844dfb9dcf5038a828087fc023dda43779
28,342
py
Python
neo/rawio/spike2rawio.py
deeptimittal12/python-neo
7409f47b5debd4d2a75bbf0e77ac10562446c97a
[ "BSD-3-Clause" ]
1
2020-06-08T14:00:03.000Z
2020-06-08T14:00:03.000Z
neo/rawio/spike2rawio.py
deeptimittal12/python-neo
7409f47b5debd4d2a75bbf0e77ac10562446c97a
[ "BSD-3-Clause" ]
null
null
null
neo/rawio/spike2rawio.py
deeptimittal12/python-neo
7409f47b5debd4d2a75bbf0e77ac10562446c97a
[ "BSD-3-Clause" ]
null
null
null
""" Classe for reading data in CED spike2 files (.smr). This code is based on: - sonpy, written by Antonio Gonzalez <Antonio.Gonzalez@cantab.net> Disponible here :: http://www.neuro.ki.se/broberger/ and sonpy come from : - SON Library 2.0 for MATLAB, written by Malcolm Lidierth at King's College London....
41.557185
99
0.551196
from .baserawio import (BaseRawIO, _signal_channel_dtype, _unit_channel_dtype, _event_channel_dtype) import numpy as np from collections import OrderedDict class Spike2RawIO(BaseRawIO): extensions = ['smr'] rawmode = 'one-file' def __init__(self, filename='', take_ideal_samplin...
true
true
1c30efc2e301eafc41a2529b8e09e246ac929142
35,180
py
Python
cea/interfaces/arcgis/arcgishelper.py
pajotca/CityEnergyAnalyst
f3d0a08f7b5f5967961bf831625544a95c7702f0
[ "MIT" ]
null
null
null
cea/interfaces/arcgis/arcgishelper.py
pajotca/CityEnergyAnalyst
f3d0a08f7b5f5967961bf831625544a95c7702f0
[ "MIT" ]
null
null
null
cea/interfaces/arcgis/arcgishelper.py
pajotca/CityEnergyAnalyst
f3d0a08f7b5f5967961bf831625544a95c7702f0
[ "MIT" ]
null
null
null
""" A library module with helper functions for creating the City Energy Analyst python toolbox for ArcGIS. """ import os import subprocess import tempfile import cea.config import cea.scripts import cea.inputlocator from cea.interfaces.arcgis.modules import arcpy __author__ = "Daren Thomas" __copyright__ = "Copyright ...
44.19598
116
0.664895
import os import subprocess import tempfile import cea.config import cea.scripts import cea.inputlocator from cea.interfaces.arcgis.modules import arcpy __author__ = "Daren Thomas" __copyright__ = "Copyright 2016, Architecture and Building Systems - ETH Zurich" __credits__ = ["Daren Thomas", "Martin Mosteiro Romero", ...
true
true
1c30eff3d6b315eb97ba893c46a6df5a2ea50cf2
1,169
py
Python
setup.py
Doridian/rd60xx
7169dafd52be7e2949bc784b354eb874a7113a88
[ "Apache-2.0" ]
null
null
null
setup.py
Doridian/rd60xx
7169dafd52be7e2949bc784b354eb874a7113a88
[ "Apache-2.0" ]
null
null
null
setup.py
Doridian/rd60xx
7169dafd52be7e2949bc784b354eb874a7113a88
[ "Apache-2.0" ]
null
null
null
# You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the ...
33.4
84
0.661249
import setuptools import rd60xx with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="rd60xx", version=rd60xx.__version__, author="Doridian", author_email="git@doridian.net", description="Python bindings for RD60XX", long_description=long_descri...
true
true
1c30f086ddaa3ce0069a4fde03bdec80c98185d2
691
wsgi
Python
app/deploy/vagrant.wsgi
Shikha2410/redi-dropper-client
18c3a63b55af26e7192365bacd43a824b340d036
[ "BSD-3-Clause" ]
2
2015-04-08T12:26:32.000Z
2015-08-19T05:00:20.000Z
app/deploy/vagrant.wsgi
Shikha2410/redi-dropper-client
18c3a63b55af26e7192365bacd43a824b340d036
[ "BSD-3-Clause" ]
60
2015-05-04T19:01:39.000Z
2017-07-11T19:29:41.000Z
app/deploy/vagrant.wsgi
Shikha2410/redi-dropper-client
18c3a63b55af26e7192365bacd43a824b340d036
[ "BSD-3-Clause" ]
12
2015-04-07T17:52:05.000Z
2017-08-04T13:21:02.000Z
#!/usr/bin/env python """ Goal: Implement wsgi helper for deployment on Apache @authors: Andrei Sura <sura.andrei@gmail.com> """ import sys import os import logging logging.basicConfig(stream=sys.stderr) print("Using interpreter: {}".format(sys.version)) # @TODO: Read from the environment app_home = '/var/www/dr...
23.033333
63
0.768452
import sys import os import logging logging.basicConfig(stream=sys.stderr) print("Using interpreter: {}".format(sys.version)) app_home = '/var/www/dropper/app' print("Adding application path: {}".format(app_home)) sys.path.insert(0, app_home) from redidropper.main import app as application, mail from redidropper...
true
true
1c30f2235843f4941607a366bec62ecd24201161
2,086
py
Python
data/cirq_new/cirq_program/startCirq_Class387.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_Class387.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_Class387.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=17 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np #thatsNoCode def make_circuit(n: int, input_qubit): c = cirq.Ci...
30.676471
80
0.671141
import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np def make_circuit(n: int, input_qubit): c = cirq.Circuit() c.append(cirq.H.on(input_qubit[0])) c.append(cirq.H.on(input_qubit[1])) c.append(cirq.H.on(input_qubit[1])) ...
true
true
1c30f2c417e819203efce167aefd2285c2d89384
13,440
py
Python
layers/categorical_encoding/linear_encoding.py
shawntan/CategoricalNF
2f92c60f840bf78616c89dc498288e85b00a1587
[ "MIT" ]
null
null
null
layers/categorical_encoding/linear_encoding.py
shawntan/CategoricalNF
2f92c60f840bf78616c89dc498288e85b00a1587
[ "MIT" ]
null
null
null
layers/categorical_encoding/linear_encoding.py
shawntan/CategoricalNF
2f92c60f840bf78616c89dc498288e85b00a1587
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F import sys import numpy as np sys.path.append("../../") from general.mutils import get_param_val, one_hot from layers.flows.flow_layer import FlowLayer from layers.flows.permutation_layers import InvertibleConv from layers.flows.activation_normalizati...
49.051095
146
0.626116
import torch import torch.nn as nn import torch.nn.functional as F import sys import numpy as np sys.path.append("../../") from general.mutils import get_param_val, one_hot from layers.flows.flow_layer import FlowLayer from layers.flows.permutation_layers import InvertibleConv from layers.flows.activation_normalizati...
true
true
1c30f35555b72e0cd7a0c742accfe8de41d46f31
1,921
py
Python
test_add_delete_group.py
rata-mahata/my_training
c8be1db95798382b9aeffa5e793ed66d58c34a25
[ "Apache-2.0" ]
null
null
null
test_add_delete_group.py
rata-mahata/my_training
c8be1db95798382b9aeffa5e793ed66d58c34a25
[ "Apache-2.0" ]
null
null
null
test_add_delete_group.py
rata-mahata/my_training
c8be1db95798382b9aeffa5e793ed66d58c34a25
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from selenium.webdriver.firefox.webdriver import WebDriver from selenium.webdriver.common.action_chains import ActionChains import time, unittest def is_alert_present(wd): try: wd.switch_to_alert().text return True except: return False class test_add_delete_grou...
38.42
78
0.667361
from selenium.webdriver.firefox.webdriver import WebDriver from selenium.webdriver.common.action_chains import ActionChains import time, unittest def is_alert_present(wd): try: wd.switch_to_alert().text return True except: return False class test_add_delete_group(unittest.TestCase): ...
true
true
1c30f362fea1a85f6147a0b976a0bf91d9d78695
7,754
py
Python
research/cv/retinanet_resnet152/src/backbone.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
research/cv/retinanet_resnet152/src/backbone.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
research/cv/retinanet_resnet152/src/backbone.py
mindspore-ai/models
9127b128e2961fd698977e918861dadfad00a44c
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
34.008772
111
0.536497
import mindspore.nn as nn from mindspore.ops import operations as P def _bn(channel): return nn.BatchNorm2d(channel, eps=1e-5, momentum=0.97, gamma_init=1, beta_init=0, moving_mean_init=0, moving_var_init=1) class ConvBNReLU(nn.Cell): def __init__(self, in_planes, ...
true
true
1c30f3c64f210a9940e133049ddd8550621c9c93
2,745
py
Python
sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/__init__.py
casperlehmann/azure-sdk-for-python
d57163e25c82e4f53a0a11e6bd777726ce5f3d88
[ "MIT" ]
null
null
null
sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/__init__.py
casperlehmann/azure-sdk-for-python
d57163e25c82e4f53a0a11e6bd777726ce5f3d88
[ "MIT" ]
null
null
null
sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/__init__.py
casperlehmann/azure-sdk-for-python
d57163e25c82e4f53a0a11e6bd777726ce5f3d88
[ "MIT" ]
null
null
null
# ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ from collections import namedtuple try: import urllib.parse as parse except ImportError: # pylint:disable=import-error import urlparse as parse # type: ign...
33.888889
114
0.68561
from collections import namedtuple try: import urllib.parse as parse except ImportError: import urlparse as parse from .challenge_auth_policy import ChallengeAuthPolicy, ChallengeAuthPolicyBase from .client_base import KeyVaultClientBase from .http_challenge import HttpChallenge from . import http_...
true
true
1c30f3d256230cc47ffc4c0e2e70824ce109d9c2
2,825
py
Python
pyexcel_io/database/importers/django.py
pyexcel/pyexcel-io
b66ccfc062b756e4068db484d21da6d9317c49b5
[ "BSD-3-Clause" ]
52
2016-06-15T17:11:23.000Z
2022-02-07T12:44:07.000Z
pyexcel_io/database/importers/django.py
pyexcel/pyexcel-io
b66ccfc062b756e4068db484d21da6d9317c49b5
[ "BSD-3-Clause" ]
100
2015-12-28T17:58:50.000Z
2022-01-29T19:48:39.000Z
pyexcel_io/database/importers/django.py
pyexcel/pyexcel-io
b66ccfc062b756e4068db484d21da6d9317c49b5
[ "BSD-3-Clause" ]
20
2016-05-09T16:44:36.000Z
2021-09-27T11:54:00.000Z
""" pyexcel_io.database.django ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The lower level handler for django import and export :copyright: (c) 2014-2020 by Onni Software Ltd. :license: New BSD License, see LICENSE for more details """ import logging import pyexcel_io.constants as constants from pyexcel_io.ut...
31.388889
75
0.60354
import logging import pyexcel_io.constants as constants from pyexcel_io.utils import is_empty_array, swap_empty_string_for_none from pyexcel_io.plugin_api import IWriter, ISheetWriter log = logging.getLogger(__name__) class DjangoModelWriter(ISheetWriter): def __init__(self, importer, adapter, batch_size=None,...
true
true
1c30f3dbd78aeb08af65d22b400118b11cf43cf1
2,916
py
Python
ci/release-info.py
rmourey26/jormungandr
e5d13409b931a58aee3ea72a5729a99f068b6043
[ "Apache-2.0", "MIT" ]
6
2021-08-30T00:49:12.000Z
2022-01-27T07:07:53.000Z
ci/release-info.py
rmourey26/jormungandr
e5d13409b931a58aee3ea72a5729a99f068b6043
[ "Apache-2.0", "MIT" ]
38
2022-01-25T22:27:40.000Z
2022-03-31T22:38:50.000Z
ci/release-info.py
rmourey26/jormungandr
e5d13409b931a58aee3ea72a5729a99f068b6043
[ "Apache-2.0", "MIT" ]
3
2021-05-20T08:26:00.000Z
2022-03-27T22:31:36.000Z
import json import os import re import sys from datetime import date from subprocess import Popen, PIPE def check_version(crate): # Checks package version for matching with the current tag reference if ref is not None and ref != "refs/tags/v" + str(crate[0]): return 0 else: return 1 def ...
29.16
95
0.631344
import json import os import re import sys from datetime import date from subprocess import Popen, PIPE def check_version(crate): if ref is not None and ref != "refs/tags/v" + str(crate[0]): return 0 else: return 1 def print_error(crate, match): if not match: print( ...
true
true
1c30f490906a28914cb02aeeab0fd2025e6e0b92
1,461
py
Python
auraxium/models/_item.py
leonhard-s/auraxium
8a1b7fb6e6e1b11334d69875df032ccc6da330bf
[ "MIT" ]
23
2018-12-04T12:47:11.000Z
2022-02-08T05:46:21.000Z
auraxium/models/_item.py
brhumphe/auraxium
8a1b7fb6e6e1b11334d69875df032ccc6da330bf
[ "MIT" ]
50
2020-04-15T10:55:30.000Z
2022-02-20T11:14:01.000Z
auraxium/models/_item.py
brhumphe/auraxium
8a1b7fb6e6e1b11334d69875df032ccc6da330bf
[ "MIT" ]
6
2018-12-02T11:55:03.000Z
2020-10-06T05:15:36.000Z
"""Data classes for :mod:`auraxium.ps2._item`.""" from typing import Optional from .base import ImageData, RESTPayload from ..types import LocaleData __all__ = [ 'ItemCategoryData', 'ItemData', 'ItemTypeData' ] # pylint: disable=too-few-public-methods class ItemCategoryData(RESTPayload): """Data c...
24.762712
68
0.704997
from typing import Optional from .base import ImageData, RESTPayload from ..types import LocaleData __all__ = [ 'ItemCategoryData', 'ItemData', 'ItemTypeData' ] class ItemCategoryData(RESTPayload): item_category_id: int name: LocaleData class ItemData(RESTPayload, ImageData): item_id:...
true
true
1c30f535a6b24afcc447a580a6aaeb27f51c6db0
2,230
py
Python
python/kwiver/vital/tests/alg/simple_keyframe_selection.py
mwoehlke-kitware/kwiver
614a488bd2b7fe551ac75eec979766d882709791
[ "BSD-3-Clause" ]
176
2015-07-31T23:33:37.000Z
2022-03-21T23:42:44.000Z
python/kwiver/vital/tests/alg/simple_keyframe_selection.py
mwoehlke-kitware/kwiver
614a488bd2b7fe551ac75eec979766d882709791
[ "BSD-3-Clause" ]
1,276
2015-05-03T01:21:27.000Z
2022-03-31T15:32:20.000Z
python/kwiver/vital/tests/alg/simple_keyframe_selection.py
mwoehlke-kitware/kwiver
614a488bd2b7fe551ac75eec979766d882709791
[ "BSD-3-Clause" ]
85
2015-01-25T05:13:38.000Z
2022-01-14T14:59:37.000Z
# ckwg +29 # Copyright 2020 by Kitware, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditi...
43.72549
87
0.783408
from kwiver.vital.algo import KeyframeSelection from kwiver.vital.tests.py_helpers import CommonConfigurationMixin class SimpleKeyframeSelection(CommonConfigurationMixin, KeyframeSelection): def __init__(self): KeyframeSelection.__init__(self) def __vital_algorithm_register__(...
true
true
1c30f638814e86df729906a7032b2b43419736a3
2,726
py
Python
TUI/Inst/APOGEE/FPIShutterWdg.py
ApachePointObservatory/stui
cfaaa9bcec9da9ac21bad1b9a2c7db2a739ffc97
[ "BSD-3-Clause" ]
2
2019-05-07T04:33:57.000Z
2021-12-16T19:54:02.000Z
TUI/Inst/APOGEE/FPIShutterWdg.py
ApachePointObservatory/stui
cfaaa9bcec9da9ac21bad1b9a2c7db2a739ffc97
[ "BSD-3-Clause" ]
5
2018-05-29T20:14:50.000Z
2020-02-17T21:58:30.000Z
TUI/Inst/APOGEE/FPIShutterWdg.py
ApachePointObservatory/stui
cfaaa9bcec9da9ac21bad1b9a2c7db2a739ffc97
[ "BSD-3-Clause" ]
2
2019-10-18T22:02:54.000Z
2020-09-26T04:20:26.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # # @Author: José Sánchez-Gallego (gallegoj@uw.edu) # @Date: 2022-01-06 # @Filename: FPIShutterWdg.py # @License: BSD 3-clause (http://www.opensource.org/licenses/BSD-3-Clause) import RO.Constants import RO.Wdg import TUI.Models import BaseDeviceWdg class FPIShutterWdg(B...
30.288889
83
0.589875
import RO.Constants import RO.Wdg import TUI.Models import BaseDeviceWdg class FPIShutterWdg(BaseDeviceWdg.BaseDeviceWdg): _ShutterCat = "shutter" def __init__(self, gridder, statusBar, colSpan=3, helpURL=None): BaseDeviceWdg.BaseDeviceWdg.__init__(self, master = gridder._master...
true
true
1c30f674afd407aa801be24a1c4cef789273b52d
1,771
py
Python
learn_python/learn_appium/sample-code-master/sample-code/examples/python/selendroid_simple.py
yehonadav/yonadav_tutorials
e797fdaeaea4c5d85392f724442645afb9391f15
[ "Apache-2.0" ]
2
2019-08-04T17:30:53.000Z
2020-09-21T08:39:55.000Z
learn_python/learn_appium/sample-code-master/sample-code/examples/python/selendroid_simple.py
yehonadav/yonadav_tutorials
e797fdaeaea4c5d85392f724442645afb9391f15
[ "Apache-2.0" ]
5
2019-10-31T14:55:58.000Z
2022-02-26T04:06:39.000Z
learn_python/learn_appium/sample-code-master/sample-code/examples/python/selendroid_simple.py
yehonadav/yonadav_tutorials
e797fdaeaea4c5d85392f724442645afb9391f15
[ "Apache-2.0" ]
null
null
null
import os from time import sleep import unittest from desired_capabilities import desired_caps from appium import webdriver # Returns abs path relative to this file and not cwd PATH = lambda p: os.path.abspath( os.path.join(os.path.dirname(__file__), p) ) # think times can be useful e.g. when testing with an emul...
31.070175
84
0.679277
import os from time import sleep import unittest from desired_capabilities import desired_caps from appium import webdriver PATH = lambda p: os.path.abspath( os.path.join(os.path.dirname(__file__), p) ) THINK_TIME = 5. class SimpleSalendroidTests(unittest.TestCase): def setUp(self): desired_caps['a...
true
true
1c30f693215ca49da098ac8098c3d7d8b4a6c0b8
226
py
Python
gitlab/datadog_checks/gitlab/__init__.py
seants/integrations-core
1e5548915fc24f1bbd095e845f0940c22992b09c
[ "BSD-3-Clause" ]
4
2021-06-21T19:21:49.000Z
2021-06-23T21:21:55.000Z
gitlab/datadog_checks/gitlab/__init__.py
seants/integrations-core
1e5548915fc24f1bbd095e845f0940c22992b09c
[ "BSD-3-Clause" ]
1
2018-08-15T05:50:17.000Z
2018-08-15T05:50:17.000Z
gitlab/datadog_checks/gitlab/__init__.py
seants/integrations-core
1e5548915fc24f1bbd095e845f0940c22992b09c
[ "BSD-3-Clause" ]
1
2018-08-15T05:45:42.000Z
2018-08-15T05:45:42.000Z
# (C) Datadog, Inc. 2018 # All rights reserved # Licensed under a 3-clause BSD style license (see LICENSE) from .__about__ import __version__ from .gitlab import GitlabCheck __all__ = [ '__version__', 'GitlabCheck' ]
20.545455
59
0.725664
from .__about__ import __version__ from .gitlab import GitlabCheck __all__ = [ '__version__', 'GitlabCheck' ]
true
true
1c30f7d3b3d6ffbeaaf7141bb889427fcedfee0f
9,853
py
Python
faker/providers/color/color.py
mgorny/faker
b1176e01bf4d7f1aef408a4bb96a9e46188cc113
[ "MIT" ]
12,077
2015-01-01T18:30:07.000Z
2022-03-31T23:22:01.000Z
faker/providers/color/color.py
mgorny/faker
b1176e01bf4d7f1aef408a4bb96a9e46188cc113
[ "MIT" ]
1,306
2015-01-03T05:18:55.000Z
2022-03-31T02:43:04.000Z
faker/providers/color/color.py
mgorny/faker
b1176e01bf4d7f1aef408a4bb96a9e46188cc113
[ "MIT" ]
1,855
2015-01-08T14:20:10.000Z
2022-03-25T17:23:32.000Z
"""Internal module for human-friendly color generation. .. important:: End users of this library should not use anything in this module. Code adapted from: - https://github.com/davidmerfield/randomColor (CC0) - https://github.com/kevinwuhoo/randomcolor-py (MIT License) Additional reference from: - https://en.wi...
33.4
105
0.534761
import colorsys import math import random import sys from typing import TYPE_CHECKING, Dict, Hashable, Optional, Sequence, Tuple if TYPE_CHECKING: from ...factory import Generator from ...typing import HueType COLOR_MAP: Dict[str, Dict[str, Sequence[Tuple[int, int]]]] = { 'monochrome': { 'hue_range...
true
true
1c30f8108c8a95cb3ca7cc63b5f21bad097144b7
14,217
py
Python
sparse/_utils.py
sayandip18/sparse
08daaad8edc59e7a7c432a97ae4f9321622e1bd3
[ "BSD-3-Clause" ]
1
2022-02-22T08:16:13.000Z
2022-02-22T08:16:13.000Z
sparse/_utils.py
sayandip18/sparse
08daaad8edc59e7a7c432a97ae4f9321622e1bd3
[ "BSD-3-Clause" ]
null
null
null
sparse/_utils.py
sayandip18/sparse
08daaad8edc59e7a7c432a97ae4f9321622e1bd3
[ "BSD-3-Clause" ]
null
null
null
import functools from collections.abc import Iterable from numbers import Integral from functools import reduce import operator import numpy as np def assert_eq(x, y, check_nnz=True, compare_dtype=True, **kwargs): from ._coo import COO assert x.shape == y.shape if compare_dtype: assert x.dtype ...
28.490982
104
0.600267
import functools from collections.abc import Iterable from numbers import Integral from functools import reduce import operator import numpy as np def assert_eq(x, y, check_nnz=True, compare_dtype=True, **kwargs): from ._coo import COO assert x.shape == y.shape if compare_dtype: assert x.dtype ...
true
true
1c30f8330d16ce09de8703219e810dba9626d74e
5,751
py
Python
framework/EntityFactoryBase.py
FlanFlanagan/raven
bd7fca18af94376a28e2144ba1da72c01c8d343c
[ "Apache-2.0" ]
159
2017-03-24T21:07:06.000Z
2022-03-20T13:44:40.000Z
framework/EntityFactoryBase.py
FlanFlanagan/raven
bd7fca18af94376a28e2144ba1da72c01c8d343c
[ "Apache-2.0" ]
1,667
2017-03-27T14:41:22.000Z
2022-03-31T19:50:06.000Z
framework/EntityFactoryBase.py
wanghy-anl/raven
ef1372364a2776385931763f2b28fdf2930c77b9
[ "Apache-2.0" ]
95
2017-03-24T21:05:03.000Z
2022-03-08T17:30:22.000Z
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
35.720497
120
0.656581
from BaseClasses import MessageUser from BaseClasses import InputDataUser import PluginManager from utils import utils class EntityFactory(MessageUser): alse): super().__init__() self.name = name self.needsRunInfo = needsRunInfo self.ret...
true
true
1c30fbdf19846be0cef6d27e989602bf22870419
3,440
py
Python
minitests/roi_harness/create_design_json.py
garvitgupta08/prjxray
dd5fb6d9d54526c3338ef745874d9a4f92066dca
[ "ISC" ]
1
2020-02-28T20:54:46.000Z
2020-02-28T20:54:46.000Z
minitests/roi_harness/create_design_json.py
garvitgupta08/prjxray
dd5fb6d9d54526c3338ef745874d9a4f92066dca
[ "ISC" ]
null
null
null
minitests/roi_harness/create_design_json.py
garvitgupta08/prjxray
dd5fb6d9d54526c3338ef745874d9a4f92066dca
[ "ISC" ]
null
null
null
import xjson import csv import argparse import sys import fasm from prjxray.db import Database from prjxray.roi import Roi from prjxray.util import get_db_root, get_part from prjxray.xjson import extract_numbers def set_port_wires(ports, name, pin, wires_outside_roi): for port in ports: if name == port['n...
28.429752
82
0.602035
import xjson import csv import argparse import sys import fasm from prjxray.db import Database from prjxray.roi import Roi from prjxray.util import get_db_root, get_part from prjxray.xjson import extract_numbers def set_port_wires(ports, name, pin, wires_outside_roi): for port in ports: if name == port['n...
true
true
1c30fbf78a4054a0a941ef7d5b9fefd5478362a1
58
py
Python
pyforchange/__init__.py
PythonForChange/pyforchange
2cc5afef227ac68147e291e447c57924586a0b12
[ "MIT" ]
1
2021-06-07T02:10:41.000Z
2021-06-07T02:10:41.000Z
pyforchange/__init__.py
PythonForChange/pyforchange
2cc5afef227ac68147e291e447c57924586a0b12
[ "MIT" ]
null
null
null
pyforchange/__init__.py
PythonForChange/pyforchange
2cc5afef227ac68147e291e447c57924586a0b12
[ "MIT" ]
null
null
null
_author="eanorambuena" _author_email="eanorambuena@uc.cl"
19.333333
34
0.827586
_author="eanorambuena" _author_email="eanorambuena@uc.cl"
true
true
1c30fcad0ee72b5267c870a9bf812ed7d53bea43
3,603
py
Python
jupyter_client/restarter.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
4
2018-01-19T17:15:06.000Z
2018-01-24T00:06:42.000Z
Python/PythonProgrammingLanguage/Encapsulation/encap_env/lib/python3.5/site-packages/jupyter_client/restarter.py
nitin-cherian/LifeLongLearning
84084792058358365162c645742c70064a2d5fd6
[ "MIT" ]
10
2017-07-13T00:24:03.000Z
2017-07-17T07:39:03.000Z
Python/PythonProgrammingLanguage/Encapsulation/encap_env/lib/python3.5/site-packages/jupyter_client/restarter.py
nitin-cherian/LifeLongLearning
84084792058358365162c645742c70064a2d5fd6
[ "MIT" ]
7
2017-08-01T04:02:07.000Z
2018-10-06T21:07:20.000Z
"""A basic kernel monitor with autorestarting. This watches a kernel's state using KernelManager.is_alive and auto restarts the kernel if it dies. It is an incomplete base class, and must be subclassed. """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from tra...
32.169643
104
0.610047
from traitlets.config.configurable import LoggingConfigurable from traitlets import ( Instance, Float, Dict, Bool, Integer, ) class KernelRestarter(LoggingConfigurable): kernel_manager = Instance('jupyter_client.KernelManager') debug = Bool(False, config=True, help="""Whether to include ever...
true
true
1c30fd8f4d7f0364b9ddc979fc4ad6b7d537d4d4
702
py
Python
cms/management/commands/subcommands/moderator.py
ScholzVolkmer/django-cms-old
5641181e793ed3c833dd310fc3cc49c3660e548d
[ "BSD-3-Clause" ]
2
2016-02-19T04:19:22.000Z
2016-02-19T04:19:36.000Z
cms/management/commands/subcommands/moderator.py
ScholzVolkmer/django-cms-old
5641181e793ed3c833dd310fc3cc49c3660e548d
[ "BSD-3-Clause" ]
9
2015-06-25T10:31:12.000Z
2022-03-12T00:41:22.000Z
cms/management/commands/subcommands/moderator.py
ScholzVolkmer/django-cms-old
5641181e793ed3c833dd310fc3cc49c3660e548d
[ "BSD-3-Clause" ]
1
2017-08-22T07:00:30.000Z
2017-08-22T07:00:30.000Z
# -*- coding: utf-8 -*- from cms.management.commands.subcommands.base import SubcommandsCommand from cms.models.pagemodel import Page from django.conf import settings from django.core.management.base import NoArgsCommand class ModeratorOnCommand(NoArgsCommand): help = 'Turn moderation on, run AFTER setting CMS_MO...
31.909091
97
0.725071
from cms.management.commands.subcommands.base import SubcommandsCommand from cms.models.pagemodel import Page from django.conf import settings from django.core.management.base import NoArgsCommand class ModeratorOnCommand(NoArgsCommand): help = 'Turn moderation on, run AFTER setting CMS_MODERATOR = True' ...
true
true
1c30fde49808c196063e3ba6407c8641ef87d4e2
707
py
Python
scripts/examples/03-Drawing/image_drawing.py
jibonaronno/OpenMV-openmv
ec7bca0a3d0407f632d86b57ac2bdc6dc84f0252
[ "MIT" ]
null
null
null
scripts/examples/03-Drawing/image_drawing.py
jibonaronno/OpenMV-openmv
ec7bca0a3d0407f632d86b57ac2bdc6dc84f0252
[ "MIT" ]
null
null
null
scripts/examples/03-Drawing/image_drawing.py
jibonaronno/OpenMV-openmv
ec7bca0a3d0407f632d86b57ac2bdc6dc84f0252
[ "MIT" ]
11
2020-06-03T10:12:28.000Z
2020-06-05T16:02:40.000Z
# Draw Image Example # # This example shows off how to draw images in the frame buffer. import sensor, image, time, pyb sensor.reset() sensor.set_pixformat(sensor.RGB565) # or GRAYSCALE... sensor.set_framesize(sensor.QVGA) # or QQVGA... sensor.skip_frames(time = 2000) clock = time.clock() while(True): clock.tick...
27.192308
64
0.688826
import sensor, image, time, pyb sensor.reset() sensor.set_pixformat(sensor.RGB565) sensor.set_framesize(sensor.QVGA) sensor.skip_frames(time = 2000) clock = time.clock() while(True): clock.tick() img = sensor.snapshot() w = img.width() h = img.height() # drawing the image we're current...
true
true
1c30fe2ea5211d35c57ed54d7987a71f8ff2dfc4
3,561
py
Python
fin_model_course/plbuild/sources/document/pr1_python_retirement.py
whoopnip/fin-model-course
e6c5ae313bba601c4aca0f334818b61cc0393118
[ "MIT" ]
5
2020-08-29T15:28:39.000Z
2021-12-01T16:53:25.000Z
fin_model_course/plbuild/sources/document/pr1_python_retirement.py
whoopnip/fin-model-course
e6c5ae313bba601c4aca0f334818b61cc0393118
[ "MIT" ]
16
2020-02-26T16:03:47.000Z
2021-06-15T15:17:37.000Z
fin_model_course/plbuild/sources/document/pr1_python_retirement.py
whoopnip/fin-model-course
e6c5ae313bba601c4aca0f334818b61cc0393118
[ "MIT" ]
3
2021-01-22T19:38:36.000Z
2021-09-28T08:14:00.000Z
import os import pyexlatex as pl import pyexlatex.table as lt import pyexlatex.presentation as lp import pyexlatex.graphics as lg import pyexlatex.layouts as ll from jinja2 import FileSystemLoader import plbuild from plbuild.paths import images_path AUTHORS = ['Nick DeRobertis'] DOCUMENT_CLASS = pl.Document OUTPUT_...
37.484211
120
0.430778
import os import pyexlatex as pl import pyexlatex.table as lt import pyexlatex.presentation as lp import pyexlatex.graphics as lg import pyexlatex.layouts as ll from jinja2 import FileSystemLoader import plbuild from plbuild.paths import images_path AUTHORS = ['Nick DeRobertis'] DOCUMENT_CLASS = pl.Document OUTPUT_...
true
true
1c30fe9d6f70cc8afacf2f87398deda280b3f4bf
1,742
py
Python
engine/mainhandler.py
still-learning-ev/MALDY-PyWebView
8bb28c5aa19fead585fd1ca73f42f20d5c18bd26
[ "bzip2-1.0.6" ]
null
null
null
engine/mainhandler.py
still-learning-ev/MALDY-PyWebView
8bb28c5aa19fead585fd1ca73f42f20d5c18bd26
[ "bzip2-1.0.6" ]
null
null
null
engine/mainhandler.py
still-learning-ev/MALDY-PyWebView
8bb28c5aa19fead585fd1ca73f42f20d5c18bd26
[ "bzip2-1.0.6" ]
null
null
null
import threading import time import sys import random import webview from static.statictrain import retrain_model_new from static.staticanalysis import Analyse class Api: def __init__(self): self.cancel_analysis_flag = False def start_analysis_static(self, path_to_file, retrain_model): time...
33.5
127
0.591848
import threading import time import sys import random import webview from static.statictrain import retrain_model_new from static.staticanalysis import Analyse class Api: def __init__(self): self.cancel_analysis_flag = False def start_analysis_static(self, path_to_file, retrain_model): time...
true
true
1c30fedb23f1e78f2bb10f06977d6db533047678
1,354
py
Python
guidos-gorgeous-lasagna/lasagna.py
pmareke/exercism-python
69ad20555f52f921efed0e03c1f2d52dc44c3e38
[ "MIT" ]
null
null
null
guidos-gorgeous-lasagna/lasagna.py
pmareke/exercism-python
69ad20555f52f921efed0e03c1f2d52dc44c3e38
[ "MIT" ]
null
null
null
guidos-gorgeous-lasagna/lasagna.py
pmareke/exercism-python
69ad20555f52f921efed0e03c1f2d52dc44c3e38
[ "MIT" ]
null
null
null
"""This module helps guido make gorgeous lasagna.""" EXPECTED_BAKE_TIME = 40 PREPARATION_TIME = 2 def bake_time_remaining(elapsed_bake_time): """Calculate the bake time remaining. :param elapsed_bake_time: int baking time already elapsed. :return: int remaining bake time derived from 'EXPECTED_BAKE_TIME'...
34.717949
78
0.760709
EXPECTED_BAKE_TIME = 40 PREPARATION_TIME = 2 def bake_time_remaining(elapsed_bake_time): return EXPECTED_BAKE_TIME - elapsed_bake_time def preparation_time_in_minutes(number_of_layers): return number_of_layers * PREPARATION_TIME def elapsed_time_in_minutes(number_of_layers, elapsed_bake_time): return p...
true
true
1c30ffe32724163c4b8b9b923c3014d66f4c6376
1,111
py
Python
grr/server/grr_response_server/gui/api_plugins/artifact_regression_test.py
nkrios/grr
399e078ed522bf0555a2666fb086aa7809d54971
[ "Apache-2.0" ]
null
null
null
grr/server/grr_response_server/gui/api_plugins/artifact_regression_test.py
nkrios/grr
399e078ed522bf0555a2666fb086aa7809d54971
[ "Apache-2.0" ]
null
null
null
grr/server/grr_response_server/gui/api_plugins/artifact_regression_test.py
nkrios/grr
399e078ed522bf0555a2666fb086aa7809d54971
[ "Apache-2.0" ]
1
2020-07-09T01:08:48.000Z
2020-07-09T01:08:48.000Z
#!/usr/bin/env python """This modules contains regression tests for artifact API handler.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import os from absl import app from grr_response_core import config from grr_response_server import artifact_reg...
27.775
75
0.782178
from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import os from absl import app from grr_response_core import config from grr_response_server import artifact_registry from grr_response_server.gui import api_regression_test_lib from grr_response_server.g...
true
true
1c310103a1e0547f12c69317ab7424a6eab8a83d
1,956
py
Python
samcli/commands/_utils/custom_options/option_nargs.py
paoptu023/aws-sam-cli
e382d603f739e9694d64f622daa228ccfe4581f4
[ "Apache-2.0" ]
1
2019-05-01T08:27:35.000Z
2019-05-01T08:27:35.000Z
samcli/commands/_utils/custom_options/option_nargs.py
paoptu023/aws-sam-cli
e382d603f739e9694d64f622daa228ccfe4581f4
[ "Apache-2.0" ]
3
2020-01-27T05:20:12.000Z
2020-10-03T01:01:11.000Z
samcli/commands/_utils/custom_options/option_nargs.py
paoptu023/aws-sam-cli
e382d603f739e9694d64f622daa228ccfe4581f4
[ "Apache-2.0" ]
1
2021-11-29T19:10:17.000Z
2021-11-29T19:10:17.000Z
""" Custom Click options for multiple arguments """ import click class OptionNargs(click.Option): """ A custom option class that allows parsing for multiple arguments for an option, when the number of arguments for an option are unknown. """ def __init__(self, *args, **kwargs): self.narg...
38.352941
109
0.615542
import click class OptionNargs(click.Option): def __init__(self, *args, **kwargs): self.nargs = kwargs.pop("nargs", -1) super(OptionNargs, self).__init__(*args, **kwargs) self._previous_parser_process = None self._nargs_parser = None def add_to_parser(self, parser, ctx): ...
true
true
1c31012d800b8a1a952a13d5164a62616ccee0a4
25,641
py
Python
BoysHalfwayHouse.bundle/Contents/Code/__init__.py
vinroy89/PGMA-Modernized
9ff53942b5078b8cd771b96725a62af4046eff93
[ "MIT" ]
null
null
null
BoysHalfwayHouse.bundle/Contents/Code/__init__.py
vinroy89/PGMA-Modernized
9ff53942b5078b8cd771b96725a62af4046eff93
[ "MIT" ]
null
null
null
BoysHalfwayHouse.bundle/Contents/Code/__init__.py
vinroy89/PGMA-Modernized
9ff53942b5078b8cd771b96725a62af4046eff93
[ "MIT" ]
null
null
null
#!/usr/bin/env python # pylint: disable=line-too-long # pylint: disable=W0702, W0703, C0103, C0410 # encoding=utf8 ''' # BoysHalfwayHouse (IAFD) Version History --------------- Date Version ...
49.5
162
0.518155
''' # BoysHalfwayHouse (IAFD) Version History --------------- Date Version Modification 22 Dec 2019 2019.12.22.1 Corrected scrapping of collections 14 Aug 2020 2...
false
true
1c310267a3bc86262c3bd0369457cef6eb63ab33
1,630
py
Python
src/pyjams/color/__init__.py
mcuntz/pyjams
1393c68a9e21a1e7b88291229120641fdaddc998
[ "MIT" ]
2
2021-11-06T10:44:37.000Z
2022-03-10T18:13:00.000Z
src/pyjams/color/__init__.py
mcuntz/pyjams
1393c68a9e21a1e7b88291229120641fdaddc998
[ "MIT" ]
null
null
null
src/pyjams/color/__init__.py
mcuntz/pyjams
1393c68a9e21a1e7b88291229120641fdaddc998
[ "MIT" ]
null
null
null
""" Collection of color palettes and continuous color maps :copyright: Copyright 2021- Matthias Cuntz, see AUTHORS.md for details. :license: MIT License, see LICENSE for details. Subpackages =========== .. autosummary:: brewer_palettes mathematica_palettes ncl_palettes oregon_palettes pyjams_palettes ...
33.958333
73
0.753988
from .brewer_palettes import brewer_sequential, brewer_diverging from .brewer_palettes import brewer_qualitative from .mathematica_palettes import mathematica_rainbow from .ncl_palettes import ncl_large, ncl_small, ncl_meteo_swiss from .oregon_palettes import oregon_sequential, oregon_diverging from .oregon_palettes i...
true
true
1c3102ca10278ae7d1eec5a32bee7dcb0bfd6a56
1,338
py
Python
playmate/settings.py
Gulats/playmate
c01b060aa0fd3ceea5082ffbee6b105a3cedc7dc
[ "MIT" ]
null
null
null
playmate/settings.py
Gulats/playmate
c01b060aa0fd3ceea5082ffbee6b105a3cedc7dc
[ "MIT" ]
null
null
null
playmate/settings.py
Gulats/playmate
c01b060aa0fd3ceea5082ffbee6b105a3cedc7dc
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- BASE_URL = 'https://play.google.com/store/apps' SUGGESTION_URL = 'https://market.android.com/suggest/SuggRequest' SEARCH_URL = 'https://play.google.com/store/search' SEARCH_PAGINATED_URL = 'https://play.google.com/store/apps/collection/search_results_cluster_apps?gsr={gsr}&authuser=0' CONCURRE...
29.086957
119
0.707025
BASE_URL = 'https://play.google.com/store/apps' SUGGESTION_URL = 'https://market.android.com/suggest/SuggRequest' SEARCH_URL = 'https://play.google.com/store/search' SEARCH_PAGINATED_URL = 'https://play.google.com/store/apps/collection/search_results_cluster_apps?gsr={gsr}&authuser=0' CONCURRENT_REQUESTS = 10 USER_A...
true
true
1c31032cb9f282847da8a1d8e2f19671ca1f4b4d
3,127
py
Python
other/make_sublime_syntax.py
mechatroner/sublime_rainbow_csv
09fa51886258ce2b634296aea452ff90d0f40255
[ "MIT" ]
76
2018-01-31T12:34:06.000Z
2022-03-16T12:27:21.000Z
other/make_sublime_syntax.py
mechatroner/sublime_rainbow_csv
09fa51886258ce2b634296aea452ff90d0f40255
[ "MIT" ]
32
2018-01-31T20:06:35.000Z
2022-02-05T19:24:08.000Z
other/make_sublime_syntax.py
mechatroner/sublime_rainbow_csv
09fa51886258ce2b634296aea452ff90d0f40255
[ "MIT" ]
8
2018-06-01T13:57:46.000Z
2021-07-07T06:21:19.000Z
#!/usr/bin/env python import sys import os import argparse import random import re parent_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) sys.path.insert(0, parent_dir) import auto_syntax def name_normalize(delim): if delim == '<': return 'less-than' if delim == '>': ret...
30.960396
99
0.641829
import sys import os import argparse import random import re parent_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) sys.path.insert(0, parent_dir) import auto_syntax def name_normalize(delim): if delim == '<': return 'less-than' if delim == '>': return 'greater-than' ...
true
true
1c310357ee22e48c9836eca6dbad144ce5e88526
1,076
py
Python
atest/run.py
fthmko/ScreenCapLibrary
ab32ceab06fdd7a9c4f3782936c0fa85b562b54a
[ "ECL-2.0", "Apache-2.0" ]
1
2022-03-31T20:34:14.000Z
2022-03-31T20:34:14.000Z
atest/run.py
fthmko/ScreenCapLibrary
ab32ceab06fdd7a9c4f3782936c0fa85b562b54a
[ "ECL-2.0", "Apache-2.0" ]
1
2022-03-28T23:35:51.000Z
2022-03-28T23:35:51.000Z
atest/run.py
fthmko/ScreenCapLibrary
ab32ceab06fdd7a9c4f3782936c0fa85b562b54a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """usage: python atest/run.py <test_suite_path>" Examples: Running all the tests with Robot: python atest/run.py atest Robot results are found in path 'atest/results/' """ import sys from os.path import abspath, dirname, join from robot import run_cli, rebot from robotstatuscheck...
23.911111
70
0.644981
import sys from os.path import abspath, dirname, join from robot import run_cli, rebot from robotstatuschecker import process_output CURDIR = dirname(abspath(__file__)) OUTPUT_DIR = join(CURDIR, 'results') sys.path.append(join(CURDIR, '..', 'src')) COMMON_OPTS = ('--log', 'NONE', '--report', 'NONE') def atests(...
true
true
1c31067c3e8a0b1c06501fb3f52532e80bf6652d
5,814
py
Python
neo4j/exceptions.py
krisgeus/neo4j-python-driver
bdf6631702a4552253ab616055c47f9ab90c5d7a
[ "Apache-2.0" ]
null
null
null
neo4j/exceptions.py
krisgeus/neo4j-python-driver
bdf6631702a4552253ab616055c47f9ab90c5d7a
[ "Apache-2.0" ]
null
null
null
neo4j/exceptions.py
krisgeus/neo4j-python-driver
bdf6631702a4552253ab616055c47f9ab90c5d7a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright (c) 2002-2020 "Neo4j," # Neo4j Sweden AB [http://neo4j.com] # # This file is part of Neo4j. # # 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 L...
27.04186
107
0.691778
class ProtocolError(Exception): class ServiceUnavailable(Exception): class IncompleteCommitError(Exception): class SecurityError(Exception): class CypherError(Exception): message = None code = None classification = None category = None title = None metadata = None...
true
true
1c3108951246f94df36ef26bb60584b60b79cd04
372
py
Python
mmdet/models/utils/__init__.py
escapist2019/AugFPN
ffc7e5e2ec367a77d43b072968050951ca6406b6
[ "Apache-2.0" ]
144
2019-12-12T02:34:59.000Z
2022-03-21T09:13:54.000Z
mmdet/models/utils/__init__.py
wyf-1996/AugFPN
cceb9be892767ba77db48fa1e36280c54a565fe1
[ "Apache-2.0" ]
18
2020-01-08T12:16:57.000Z
2021-12-11T03:35:59.000Z
mmdet/models/utils/__init__.py
wyf-1996/AugFPN
cceb9be892767ba77db48fa1e36280c54a565fe1
[ "Apache-2.0" ]
44
2020-05-18T13:25:50.000Z
2022-03-04T11:28:17.000Z
from .conv_module import ConvModule from .norm import build_norm_layer from .weight_init import (xavier_init, normal_init, uniform_init, kaiming_init, bias_init_with_prob) from .scale import Scale __all__ = [ 'ConvModule', 'build_norm_layer', 'xavier_init', 'normal_init', 'uniform_init...
37.2
79
0.725806
from .conv_module import ConvModule from .norm import build_norm_layer from .weight_init import (xavier_init, normal_init, uniform_init, kaiming_init, bias_init_with_prob) from .scale import Scale __all__ = [ 'ConvModule', 'build_norm_layer', 'xavier_init', 'normal_init', 'uniform_init...
true
true
1c3108b1c505938bec71c8dbd25a9875d1220307
8,618
py
Python
di/_utils/task.py
adriangb/di
f277bb7189c8e8bde41170afb3181e6600b06be8
[ "MIT" ]
57
2021-09-28T00:48:08.000Z
2022-03-16T16:50:39.000Z
di/_utils/task.py
adriangb/di
f277bb7189c8e8bde41170afb3181e6600b06be8
[ "MIT" ]
59
2021-09-25T00:06:22.000Z
2022-03-31T15:49:36.000Z
di/_utils/task.py
adriangb/di
f277bb7189c8e8bde41170afb3181e6600b06be8
[ "MIT" ]
3
2021-12-31T10:03:03.000Z
2021-12-31T16:07:54.000Z
from __future__ import annotations import contextlib from contextlib import AsyncExitStack, ExitStack from typing import ( Any, Callable, Dict, Iterable, List, Mapping, NamedTuple, Tuple, TypeVar, Union, ) from di._utils.inspect import ( is_async_gen_callable, is_corout...
37.469565
94
0.649107
from __future__ import annotations import contextlib from contextlib import AsyncExitStack, ExitStack from typing import ( Any, Callable, Dict, Iterable, List, Mapping, NamedTuple, Tuple, TypeVar, Union, ) from di._utils.inspect import ( is_async_gen_callable, is_corout...
true
true