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
1c2d43d9981510e3c8607abd268d861aeaaffa26
2,810
py
Python
experiments/experiment_osp.py
Weilando/bachelor_playground
e1455029384f05a48ea5d792f76aa5d232fc1ddc
[ "Apache-2.0" ]
1
2020-11-09T12:00:59.000Z
2020-11-09T12:00:59.000Z
experiments/experiment_osp.py
Weilando/bachelor_playground
e1455029384f05a48ea5d792f76aa5d232fc1ddc
[ "Apache-2.0" ]
null
null
null
experiments/experiment_osp.py
Weilando/bachelor_playground
e1455029384f05a48ea5d792f76aa5d232fc1ddc
[ "Apache-2.0" ]
null
null
null
import time from data.plotter_evaluation import format_time from experiments.experiment_pruning import ExperimentPruning from training.logger import log_from_medium def mimic_next_prune_rate(curr_prune_rate, prune_rate_specs): """ Mimic the next pruning-rate from the current pruning-rate and the rate from specs....
49.298246
118
0.640569
import time from data.plotter_evaluation import format_time from experiments.experiment_pruning import ExperimentPruning from training.logger import log_from_medium def mimic_next_prune_rate(curr_prune_rate, prune_rate_specs): return curr_prune_rate + (1 - curr_prune_rate) * prune_rate_specs class ExperimentOS...
true
true
1c2d44e00de29baa2689ef37a37ade0f8bcb32b2
1,821
py
Python
target/classes/META-INF/resources/scripts/viewer/X/lib/selenium/selenium/webdriver/support/abstract_event_listener.py
chocobearz/xnat-image-viewer-plugin
99b0aa2fd04e0390a3df920fa1c8b5569cdeb5ec
[ "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
target/classes/META-INF/resources/scripts/viewer/X/lib/selenium/selenium/webdriver/support/abstract_event_listener.py
chocobearz/xnat-image-viewer-plugin
99b0aa2fd04e0390a3df920fa1c8b5569cdeb5ec
[ "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
target/classes/META-INF/resources/scripts/viewer/X/lib/selenium/selenium/webdriver/support/abstract_event_listener.py
chocobearz/xnat-image-viewer-plugin
99b0aa2fd04e0390a3df920fa1c8b5569cdeb5ec
[ "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
#!/usr/bin/python # # Copyright 2011 Software Freedom Conservancy. # # 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 ap...
30.35
74
0.686985
class AbstractEventListener(object): def before_navigate_to(self, url, driver): pass def after_navigate_to(self, url, driver): pass def before_navigate_back(self, driver): pass def after_navigate_back(self, driver): pass def before_navigate_forwa...
true
true
1c2d4689af2e5bc73f7c8f72466004ca1d1424f4
1,781
py
Python
tests/test_schematics_converters_discriminated_model.py
iterait/apistrap
e83460fa97f13a95a928971b0d2defe0ac611911
[ "MIT" ]
6
2018-09-06T18:32:48.000Z
2021-05-28T01:03:32.000Z
tests/test_schematics_converters_discriminated_model.py
iterait/apistrap
e83460fa97f13a95a928971b0d2defe0ac611911
[ "MIT" ]
53
2018-09-06T16:16:53.000Z
2021-05-19T14:36:58.000Z
tests/test_schematics_converters_discriminated_model.py
iterait/apistrap
e83460fa97f13a95a928971b0d2defe0ac611911
[ "MIT" ]
null
null
null
import pytest from schematics import Model from schematics.types import FloatType, StringType, UnionType from apistrap.flask import FlaskApistrap from apistrap.schematics_converters import schematics_model_to_schema_object from apistrap.types import DiscriminatedModelType @pytest.fixture(scope="function") def apistr...
31.803571
105
0.705222
import pytest from schematics import Model from schematics.types import FloatType, StringType, UnionType from apistrap.flask import FlaskApistrap from apistrap.schematics_converters import schematics_model_to_schema_object from apistrap.types import DiscriminatedModelType @pytest.fixture(scope="function") def apistr...
true
true
1c2d46b3128160103dd0892ca055304a1dbd98eb
11,858
py
Python
Gui_qt/mainwindow.py
2rintf/noob-face-comparison
000413f1a3cd837960196f7069a894bd272aa14b
[ "MIT" ]
null
null
null
Gui_qt/mainwindow.py
2rintf/noob-face-comparison
000413f1a3cd837960196f7069a894bd272aa14b
[ "MIT" ]
null
null
null
Gui_qt/mainwindow.py
2rintf/noob-face-comparison
000413f1a3cd837960196f7069a894bd272aa14b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mainwindow.ui' # # Created by: PyQt5 UI code generator 5.14.1 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): Mai...
51.112069
108
0.705262
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1200, 657) self.centralWidget = QtWidgets.QWidget(MainWindow) self.centralWidget.setObjectName("centralWidget") ...
true
true
1c2d47cf4218a38866687d183e6810ef6e53819e
14,235
py
Python
playground/position-sizing/balancer-and-plot/strategies/emacounter/__init__.py
ysdede/jesse_strategies
ade9f4ba42cec11207c766d267b9d8feb8bce648
[ "CC0-1.0" ]
38
2021-09-18T15:33:28.000Z
2022-02-21T17:29:08.000Z
playground/position-sizing/balancer-and-plot/strategies/emacounter/__init__.py
ysdede/jesse_strategies
ade9f4ba42cec11207c766d267b9d8feb8bce648
[ "CC0-1.0" ]
4
2022-01-02T14:46:12.000Z
2022-02-16T18:39:41.000Z
playground/position-sizing/balancer-and-plot/strategies/emacounter/__init__.py
ysdede/jesse_strategies
ade9f4ba42cec11207c766d267b9d8feb8bce648
[ "CC0-1.0" ]
11
2021-10-19T06:21:43.000Z
2022-02-21T17:29:10.000Z
import jesse.helpers as jh import jesse.indicators as ta from jesse import utils from jesse.services.selectors import get_all_trading_routes from jesse.strategies import Strategy, cached class emacounter(Strategy): def __init__(self): super().__init__() self.losecount = 0 self.wincount = ...
41.26087
141
0.559185
import jesse.helpers as jh import jesse.indicators as ta from jesse import utils from jesse.services.selectors import get_all_trading_routes from jesse.strategies import Strategy, cached class emacounter(Strategy): def __init__(self): super().__init__() self.losecount = 0 self.wincount = ...
true
true
1c2d482eb71e3a0e323f3d5430c5cd8c7e0544cb
5,308
py
Python
doc/scripts/docgen.py
oplatek/Theano
09605e7cae876e15c5502c4edaba6a9644c50c11
[ "BSD-3-Clause" ]
null
null
null
doc/scripts/docgen.py
oplatek/Theano
09605e7cae876e15c5502c4edaba6a9644c50c11
[ "BSD-3-Clause" ]
null
null
null
doc/scripts/docgen.py
oplatek/Theano
09605e7cae876e15c5502c4edaba6a9644c50c11
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function import sys import os import shutil import inspect from epydoc import docintrospecter from epydoc.apidoc import RoutineDoc def Op_to_RoutineDoc(op, routine_doc, module_name=None): routine_doc.specialize_to(RoutineDoc) #NB: this code is lifted from epydoc/docintrospecter...
32.765432
79
0.586473
from __future__ import print_function import sys import os import shutil import inspect from epydoc import docintrospecter from epydoc.apidoc import RoutineDoc def Op_to_RoutineDoc(op, routine_doc, module_name=None): routine_doc.specialize_to(RoutineDoc) assert hasattr(op, 'perform') r...
true
true
1c2d491ba44c6f8c9d5e1f7ca72bfa5aabb3751e
487
py
Python
kakunin.py
cabbagerice/word-chain
5d2978df61a7136f502b1b601213e97454103e1e
[ "BSD-2-Clause" ]
null
null
null
kakunin.py
cabbagerice/word-chain
5d2978df61a7136f502b1b601213e97454103e1e
[ "BSD-2-Clause" ]
6
2019-07-28T20:34:58.000Z
2021-05-10T06:53:05.000Z
kakunin.py
cabbagerice/word-chain
5d2978df61a7136f502b1b601213e97454103e1e
[ "BSD-2-Clause" ]
null
null
null
import firebase_admin from firebase_admin import credentials from firebase_admin import db from numpy import random as unko import math #認証ファイルPATH certificate_json_path='secret.json' #DBとアプリへの認証 if (not len(firebase_admin._apps)): cred = credentials.Certificate(certificate_json_path) default_app = firebase_admin....
30.4375
82
0.788501
import firebase_admin from firebase_admin import credentials from firebase_admin import db from numpy import random as unko import math certificate_json_path='secret.json' if (not len(firebase_admin._apps)): cred = credentials.Certificate(certificate_json_path) default_app = firebase_admin.initialize_app(cred, {...
true
true
1c2d4973b6be2f4d7e183113ece566f002b580c9
117,653
py
Python
zerver/tests/test_message_edit.py
mathewstars/zulip
da269302e2f334a71a4b43f0c9e5e504f856382f
[ "Apache-2.0" ]
1
2022-01-23T14:59:32.000Z
2022-01-23T14:59:32.000Z
zerver/tests/test_message_edit.py
mathewstars/zulip
da269302e2f334a71a4b43f0c9e5e504f856382f
[ "Apache-2.0" ]
null
null
null
zerver/tests/test_message_edit.py
mathewstars/zulip
da269302e2f334a71a4b43f0c9e5e504f856382f
[ "Apache-2.0" ]
null
null
null
import datetime from operator import itemgetter from typing import Any, Dict, List, Optional, Tuple, Union from unittest import mock import orjson from django.db import IntegrityError from django.http import HttpResponse from django.utils.timezone import now as timezone_now from zerver.actions.message_edit import ( ...
40.640069
110
0.617902
import datetime from operator import itemgetter from typing import Any, Dict, List, Optional, Tuple, Union from unittest import mock import orjson from django.db import IntegrityError from django.http import HttpResponse from django.utils.timezone import now as timezone_now from zerver.actions.message_edit import ( ...
true
true
1c2d4ad2832851c2f372570d135f6d01dac4482d
285
py
Python
Zad_ChainOfResponsibility/Application.py
Paarzivall/Wzorce-Projektowe
aa4136f140ad02c0fc0de45709b5a01ca42b417f
[ "MIT" ]
null
null
null
Zad_ChainOfResponsibility/Application.py
Paarzivall/Wzorce-Projektowe
aa4136f140ad02c0fc0de45709b5a01ca42b417f
[ "MIT" ]
null
null
null
Zad_ChainOfResponsibility/Application.py
Paarzivall/Wzorce-Projektowe
aa4136f140ad02c0fc0de45709b5a01ca42b417f
[ "MIT" ]
null
null
null
from Handler import Handler class Application(Handler): def __init__(self, successor=None): self._successor = successor def HandleHelp(self): self.ShowHelp() def ShowHelp(self): print("anApplication: Potrafie obsluzyc zadanie, wyswietlam pomoc")
23.75
75
0.694737
from Handler import Handler class Application(Handler): def __init__(self, successor=None): self._successor = successor def HandleHelp(self): self.ShowHelp() def ShowHelp(self): print("anApplication: Potrafie obsluzyc zadanie, wyswietlam pomoc")
true
true
1c2d4afe34500cdb857f2d349ee215e5b65d61c3
1,870
py
Python
python/src/nnabla/backward_function/global_average_pooling.py
daniel-falk/nnabla
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
[ "Apache-2.0" ]
2,792
2017-06-26T13:05:44.000Z
2022-03-28T07:55:26.000Z
python/src/nnabla/backward_function/global_average_pooling.py
daniel-falk/nnabla
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
[ "Apache-2.0" ]
138
2017-06-27T07:04:44.000Z
2022-02-28T01:37:15.000Z
python/src/nnabla/backward_function/global_average_pooling.py
daniel-falk/nnabla
3fe132ea52dc10521cc029a5d6ba8f565cf65ccf
[ "Apache-2.0" ]
380
2017-06-26T13:23:52.000Z
2022-03-25T16:51:30.000Z
# Copyright 2019,2020,2021 Sony Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
31.166667
86
0.730481
import nnabla as nn import nnabla.function as _F import nnabla.functions as F from .backward_function import UnaryDataGrad class GlobalAveragePoolingDataGrad(UnaryDataGrad): def __init__(self, ctx): super(GlobalAveragePoolingDataGrad, self).__init__(ctx) self._func = _F.GlobalAver...
true
true
1c2d4bb203154168c741a10cbee8e7df483c0846
1,315
py
Python
sdk/python/pulumi_kubernetes/core/v1/PodTemplateList.py
rosskevin/pulumi-kubernetes
e4fa04b13a20929c879aca1bbe58fb5a95d16f7c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/core/v1/PodTemplateList.py
rosskevin/pulumi-kubernetes
e4fa04b13a20929c879aca1bbe58fb5a95d16f7c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_kubernetes/core/v1/PodTemplateList.py
rosskevin/pulumi-kubernetes
e4fa04b13a20929c879aca1bbe58fb5a95d16f7c
[ "Apache-2.0" ]
null
null
null
import pulumi import pulumi.runtime from ... import tables class PodTemplateList(pulumi.CustomResource): """ PodTemplateList is a list of PodTemplates. """ def __init__(self, __name__, __opts__=None, items=None, metadata=None): if not __name__: raise TypeError('Missing resource nam...
34.605263
89
0.656274
import pulumi import pulumi.runtime from ... import tables class PodTemplateList(pulumi.CustomResource): def __init__(self, __name__, __opts__=None, items=None, metadata=None): if not __name__: raise TypeError('Missing resource name argument (for URN creation)') if not isinstance(__nam...
true
true
1c2d4bbb9696658238315a913f60295083292da6
2,835
py
Python
tests/test_serialized_schema.py
TheBigSasha/OpenTimelineIO
0d857086cbb4fc39c1303947c61318aa6e523ea5
[ "Apache-2.0" ]
5
2018-07-27T03:52:26.000Z
2021-04-02T04:10:15.000Z
tests/test_serialized_schema.py
TheBigSasha/OpenTimelineIO
0d857086cbb4fc39c1303947c61318aa6e523ea5
[ "Apache-2.0" ]
1
2019-06-20T04:02:54.000Z
2019-06-20T04:02:54.000Z
tests/test_serialized_schema.py
TheBigSasha/OpenTimelineIO
0d857086cbb4fc39c1303947c61318aa6e523ea5
[ "Apache-2.0" ]
1
2019-11-15T21:20:24.000Z
2019-11-15T21:20:24.000Z
# # Copyright Contributors to the OpenTimelineIO project # # Licensed under the Apache License, Version 2.0 (the "Apache License") # with the following modification; you may not use this file except in # compliance with the Apache License and the following modification to it: # Section 6. Trademarks. is deleted and rep...
36.346154
81
0.687478
import unittest import os from opentimelineio.console import ( autogen_serialized_datamodel as asd, autogen_plugin_documentation as apd, ) class SerializedSchemaTester(unittest.TestCase): def test_serialized_schema(self): pt = os.path.dirname(os.path.dirname(__file__)) ...
true
true
1c2d4be972df48e5af1c18035a305472b31301cf
1,044
py
Python
kubernetes/test/test_extensions_v1beta1_scale_spec.py
Prahladk09/python-1
2dfb3035535e4be52ba549f1ff47acbe573b73f6
[ "Apache-2.0" ]
1
2020-04-13T09:54:21.000Z
2020-04-13T09:54:21.000Z
kubernetes/test/test_extensions_v1beta1_scale_spec.py
Prahladk09/python-1
2dfb3035535e4be52ba549f1ff47acbe573b73f6
[ "Apache-2.0" ]
1
2019-08-15T14:27:17.000Z
2019-08-15T14:28:07.000Z
kubernetes/test/test_extensions_v1beta1_scale_spec.py
Prahladk09/python-1
2dfb3035535e4be52ba549f1ff47acbe573b73f6
[ "Apache-2.0" ]
2
2020-08-05T03:06:48.000Z
2020-08-05T16:08:21.000Z
# coding: utf-8 """ Kubernetes No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: v1.14.4 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import os import sys i...
23.2
105
0.731801
from __future__ import absolute_import import os import sys import unittest import kubernetes.client from kubernetes.client.rest import ApiException from kubernetes.client.models.extensions_v1beta1_scale_spec import ExtensionsV1beta1ScaleSpec class TestExtensionsV1beta1ScaleSpec(unittest.TestCase): def set...
true
true
1c2d4c95596e5691e3248bce1aafe05d87bda59a
646
py
Python
integration_tests/emukit/bayesian_optimization/test_single_objective_bayesian_optimization.py
alexgessner/emukit
355e26bb30edd772a81af2a1267c569d7f446d42
[ "Apache-2.0" ]
1
2019-07-02T15:37:47.000Z
2019-07-02T15:37:47.000Z
integration_tests/emukit/bayesian_optimization/test_single_objective_bayesian_optimization.py
Tony-Chiong/emukit
a068c8d5e06b2ae8b038f67bf2e4f66c4d91651a
[ "Apache-2.0" ]
null
null
null
integration_tests/emukit/bayesian_optimization/test_single_objective_bayesian_optimization.py
Tony-Chiong/emukit
a068c8d5e06b2ae8b038f67bf2e4f66c4d91651a
[ "Apache-2.0" ]
1
2020-01-12T19:50:44.000Z
2020-01-12T19:50:44.000Z
import numpy as np from emukit.core.continuous_parameter import ContinuousParameter from emukit.examples.gp_bayesian_optimization.single_objective_bayesian_optimization import GPBayesianOptimization def f(x): return x**2 def test_loop(): n_iterations = 5 x_init = np.random.rand(5, 1) y_init = np.r...
28.086957
114
0.733746
import numpy as np from emukit.core.continuous_parameter import ContinuousParameter from emukit.examples.gp_bayesian_optimization.single_objective_bayesian_optimization import GPBayesianOptimization def f(x): return x**2 def test_loop(): n_iterations = 5 x_init = np.random.rand(5, 1) y_init = np.r...
true
true
1c2d4cdd0cc7aa83fa162d48e7f635a182fda07e
6,917
py
Python
yolo2/models/layers.py
weihao94/keras-YOLOv3-model-set
7b54809d5f5513a41a191289625612d71056e3ec
[ "MIT" ]
null
null
null
yolo2/models/layers.py
weihao94/keras-YOLOv3-model-set
7b54809d5f5513a41a191289625612d71056e3ec
[ "MIT" ]
null
null
null
yolo2/models/layers.py
weihao94/keras-YOLOv3-model-set
7b54809d5f5513a41a191289625612d71056e3ec
[ "MIT" ]
2
2020-10-29T19:04:12.000Z
2021-01-26T10:10:14.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Common layer definition for YOLOv2 models building """ from functools import wraps, reduce, partial import tensorflow.keras.backend as K from tensorflow.keras.layers import Conv2D, DepthwiseConv2D, MaxPooling2D, Concatenate, Lambda from tensorflow.keras.layers import ...
41.668675
115
0.714038
from functools import wraps, reduce, partial import tensorflow.keras.backend as K from tensorflow.keras.layers import Conv2D, DepthwiseConv2D, MaxPooling2D, Concatenate, Lambda from tensorflow.keras.layers import LeakyReLU from tensorflow.keras.layers import BatchNormalization from tensorflow.keras.regularizers impo...
true
true
1c2d4d55b91d987a3493e6c2b7aeb2884a7eaead
10,559
py
Python
scripts/get_assessor_data.py
mxndrwgrdnr/evictions
bf59bfe98903c2aa839daf7597951dc36cdecaad
[ "BSD-2-Clause" ]
null
null
null
scripts/get_assessor_data.py
mxndrwgrdnr/evictions
bf59bfe98903c2aa839daf7597951dc36cdecaad
[ "BSD-2-Clause" ]
null
null
null
scripts/get_assessor_data.py
mxndrwgrdnr/evictions
bf59bfe98903c2aa839daf7597951dc36cdecaad
[ "BSD-2-Clause" ]
1
2022-02-25T04:05:36.000Z
2022-02-25T04:05:36.000Z
####################################################### # script to compile and standardize raw assessor data # ####################################################### import pandas as pd from tqdm import tqdm from geopy.geocoders import Nominatim from geopy.extra.rate_limiter import RateLimiter import numpy as np im...
58.661111
139
0.604603
asr['PROPLOC'].str[5:9].str.lstrip('0') asr['house_1'] = asr['house_1'].str.replace('\D', '') asr.loc[asr['house_1'] == '', 'house_1'] = -999 asr['house_2'] = asr['house_2'].str.replace('\D', '') asr = asr[asr['house_2'] != ''] asr = asr[~asr['PROPLOC'].str.contains('SITUS TO BE ASSIGNED')] asr['street_name'] = asr...
true
true
1c2d4d7e2a26aa1b6391e594352eacfd5da3f760
2,909
py
Python
test_estimator_suite.py
brandonckelly/bck_stats
b5a126f2e8d062232cb2b58962e61fc49d277529
[ "MIT" ]
16
2015-03-25T18:22:35.000Z
2020-12-08T07:33:10.000Z
test_estimator_suite.py
brandonckelly/bck_stats
b5a126f2e8d062232cb2b58962e61fc49d277529
[ "MIT" ]
1
2018-05-02T07:01:24.000Z
2018-06-18T15:05:32.000Z
test_estimator_suite.py
brandonckelly/bck_stats
b5a126f2e8d062232cb2b58962e61fc49d277529
[ "MIT" ]
8
2015-04-13T13:02:53.000Z
2020-05-29T21:09:00.000Z
__author__ = 'brandonkelly' import numpy as np import matplotlib.pyplot as plt from sklearn_estimator_suite import ClassificationSuite from sklearn.datasets import make_classification from sklearn.cross_validation import train_test_split from sklearn.metrics import accuracy_score n_samples = 2000 n_classes = 3 X, y =...
29.09
85
0.742867
__author__ = 'brandonkelly' import numpy as np import matplotlib.pyplot as plt from sklearn_estimator_suite import ClassificationSuite from sklearn.datasets import make_classification from sklearn.cross_validation import train_test_split from sklearn.metrics import accuracy_score n_samples = 2000 n_classes = 3 X, y =...
false
true
1c2d4f926783201230f56490a274139aceff1fa9
5,294
py
Python
azure/multiapi/storage/v2016_05_31/blob/_download_chunking.py
xolve/azure-multiapi-storage-python
47509479427c879f18c554e451e838453d47c2bd
[ "MIT" ]
3
2019-02-21T20:46:26.000Z
2021-06-22T15:35:52.000Z
azure/storage/blob/_download_chunking.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
11
2017-10-05T18:20:40.000Z
2020-10-10T09:20:19.000Z
azure/storage/blob/_download_chunking.py
EnjoyLifeFund/Debian_py36_packages
1985d4c73fabd5f08f54b922e73a9306e09c77a5
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
15
2017-10-02T18:48:20.000Z
2022-03-03T14:03:49.000Z
#------------------------------------------------------------------------- # Copyright (c) Microsoft. 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.apa...
38.362319
91
0.646959
 import threading from time import sleep from azure.common import ( AzureHttpError, ) from .._error import _ERROR_NO_SINGLE_THREAD_CHUNKING def _download_blob_chunks(blob_service, container_name, blob_name, snapshot, download_size, block_size, progress, start_range, end_ran...
false
true
1c2d50214ff393c69f09f4c26e3e39a5615ac21d
4,425
py
Python
tests/data/parser_data.py
arniebarni/rhasspy_weather
6a9df72adad3e5dafa7962c2be37c824dc04137b
[ "MIT" ]
5
2020-03-29T01:00:30.000Z
2022-02-06T20:00:00.000Z
tests/data/parser_data.py
arniebarni/rhasspy_weather
6a9df72adad3e5dafa7962c2be37c824dc04137b
[ "MIT" ]
12
2020-04-02T15:09:05.000Z
2021-10-11T00:44:21.000Z
tests/data/parser_data.py
arniebarni/rhasspy_weather
6a9df72adad3e5dafa7962c2be37c824dc04137b
[ "MIT" ]
5
2020-03-25T08:33:02.000Z
2021-05-18T08:47:41.000Z
import argparse from rhasspyhermes.intent import Intent, Slot from rhasspyhermes.nlu import NluIntent rhasspy_intent = { "request_weather_full_day": '{"entities": [{"end": 25, "entity": "when_day", "raw_end": 25, "raw_start": 20, "raw_value": "heute", ' '"start": 20, "value...
86.764706
233
0.515254
import argparse from rhasspyhermes.intent import Intent, Slot from rhasspyhermes.nlu import NluIntent rhasspy_intent = { "request_weather_full_day": '{"entities": [{"end": 25, "entity": "when_day", "raw_end": 25, "raw_start": 20, "raw_value": "heute", ' '"start": 20, "value...
true
true
1c2d503b6b0ab6dedf0afdc302bf880aaefa0cf3
10,017
py
Python
tests/test_model.py
nicolasramy/optimove-client
d492ddaa7b20493c1077308a2404994730f8c6cc
[ "MIT" ]
3
2016-08-10T14:14:54.000Z
2016-09-01T05:48:03.000Z
tests/test_model.py
nicolasramy/optimove-client
d492ddaa7b20493c1077308a2404994730f8c6cc
[ "MIT" ]
6
2016-08-23T13:03:29.000Z
2018-02-08T17:01:59.000Z
tests/test_model.py
nicolasramy/optimove-client
d492ddaa7b20493c1077308a2404994730f8c6cc
[ "MIT" ]
3
2016-09-01T09:58:26.000Z
2019-10-16T13:27:58.000Z
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals import json import unittest from six.moves.urllib.parse import parse_qs, urlparse from optimove.client import Client from optimove.constants import DEFAULT_URL import responses from tests.constants import HEADERS from tests.helpers impo...
33.059406
108
0.578616
from __future__ import absolute_import, unicode_literals import json import unittest from six.moves.urllib.parse import parse_qs, urlparse from optimove.client import Client from optimove.constants import DEFAULT_URL import responses from tests.constants import HEADERS from tests.helpers import login_callback, toke...
true
true
1c2d514493460328193b72d99aa045afae9eace2
1,192
py
Python
deploy/probers/postmark_api_probe.py
d0sadata/studio
ec3b805c0b546fe8884d446152eead90bea4174d
[ "MIT" ]
60
2018-03-29T23:33:29.000Z
2022-03-19T12:10:56.000Z
deploy/probers/postmark_api_probe.py
d0sadata/studio
ec3b805c0b546fe8884d446152eead90bea4174d
[ "MIT" ]
2,260
2018-03-02T23:14:49.000Z
2022-03-29T20:57:21.000Z
deploy/probers/postmark_api_probe.py
d0sadata/studio
ec3b805c0b546fe8884d446152eead90bea4174d
[ "MIT" ]
86
2018-03-19T21:26:35.000Z
2022-03-28T10:09:17.000Z
#!/usr/bin/env python import requests from base import BaseProbe POSTMARK_SERVICE_STATUS_URL = "https://status.postmarkapp.com/api/1.0/services" # (See here for API details: https://status.postmarkapp.com/api) ALL_POSSIBLE_STATUSES = ['UP', 'MAINTENANCE', 'DELAY', 'DEGRADED', 'DOWN'] PASSING_POSTMARK_STATUSES = { ...
29.8
112
0.630872
import requests from base import BaseProbe POSTMARK_SERVICE_STATUS_URL = "https://status.postmarkapp.com/api/1.0/services" ALL_POSSIBLE_STATUSES = ['UP', 'MAINTENANCE', 'DELAY', 'DEGRADED', 'DOWN'] PASSING_POSTMARK_STATUSES = { '/services/smtp': ['UP', 'MAINTENANCE'], '/services/api': ALL_POSSIBLE_STATUSES...
true
true
1c2d51e5bab3f453fb62111623bcdc152a930b61
4,551
py
Python
reference plug-in/_rsgTmp069_Form.py
GCaptainNemo/ABAQUS-FML-impact-plugin
8f18ba231b9f64ee43c0217f1d9e488d0df9963b
[ "MIT" ]
null
null
null
reference plug-in/_rsgTmp069_Form.py
GCaptainNemo/ABAQUS-FML-impact-plugin
8f18ba231b9f64ee43c0217f1d9e488d0df9963b
[ "MIT" ]
null
null
null
reference plug-in/_rsgTmp069_Form.py
GCaptainNemo/ABAQUS-FML-impact-plugin
8f18ba231b9f64ee43c0217f1d9e488d0df9963b
[ "MIT" ]
null
null
null
from abaqusGui import * from abaqusConstants import ALL import osutils, os ########################################################################### # Class definition ########################################################################### class _rsgTmp069_Form(AFXForm): #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~...
45.51
127
0.564052
from abaqusGui import * from abaqusConstants import ALL import osutils, os
true
true
1c2d521f423e63631e5d234cf7221103c532ad42
111
py
Python
utilities/generators/null_generator.py
gioele8/AI-soccer-highlights
756b6b6f332cedbfbc5a3540d0c6d7aa50219e51
[ "MIT" ]
null
null
null
utilities/generators/null_generator.py
gioele8/AI-soccer-highlights
756b6b6f332cedbfbc5a3540d0c6d7aa50219e51
[ "MIT" ]
null
null
null
utilities/generators/null_generator.py
gioele8/AI-soccer-highlights
756b6b6f332cedbfbc5a3540d0c6d7aa50219e51
[ "MIT" ]
null
null
null
class NullGenerator: def __init__(self): pass def generate(self, video): return video
15.857143
30
0.612613
class NullGenerator: def __init__(self): pass def generate(self, video): return video
true
true
1c2d5252031ca9f832d73527b31abcd0d8f9fda6
28,574
py
Python
src/dnc/azext_dnc/vendored_sdks/dnc/models/_models.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
207
2017-11-29T06:59:41.000Z
2022-03-31T10:00:53.000Z
src/dnc/azext_dnc/vendored_sdks/dnc/models/_models.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
4,061
2017-10-27T23:19:56.000Z
2022-03-31T23:18:30.000Z
src/dnc/azext_dnc/vendored_sdks/dnc/models/_models.py
haroonf/azure-cli-extensions
61c044d34c224372f186934fa7c9313f1cd3a525
[ "MIT" ]
802
2017-10-11T17:36:26.000Z
2022-03-31T22:24:32.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
33.380841
165
0.623189
from azure.core.exceptions import HttpResponseError import msrest.serialization class ControllerDetails(msrest.serialization.Model): _attribute_map = { 'id': {'key': 'id', 'type': 'str'}, } def __init__( self, **kwargs ): super(ControllerDetails, self).__init_...
true
true
1c2d528294ca63b0f78f6e625d55e5b6098b4ec2
5,605
py
Python
support/closure-library/closure/bin/build/depstree.py
joe-greenawalt/skulpt
1db078e2f6d453403287233254b012bf31960ef4
[ "MIT" ]
2
2021-01-10T16:19:38.000Z
2021-06-14T22:09:59.000Z
support/closure-library/closure/bin/build/depstree.py
csev/skulpt
9aa25b7dbf29f23ee8d3140d01a6f4353d12e66f
[ "MIT" ]
null
null
null
support/closure-library/closure/bin/build/depstree.py
csev/skulpt
9aa25b7dbf29f23ee8d3140d01a6f4353d12e66f
[ "MIT" ]
1
2015-06-28T18:58:22.000Z
2015-06-28T18:58:22.000Z
# Copyright 2009 The Closure Library Authors. All Rights Reserved. """Class to represent a full Closure Library dependency tree. Offers a queryable tree of dependencies of a given set of sources. The tree will also do logical validation to prevent duplicate provides and circular dependencies. """ class DepsTree...
32.028571
80
0.710259
class DepsTree(object): def __init__(self, sources): self._sources = sources self._provides_map = dict() for source in sources: for provide in source.provides: if provide in self._provides_map: raise MultipleProvideError( provide, [self._provides_map[pr...
true
true
1c2d5367feaf6d35c6324d2dcee1a16f4eb96b0e
57,762
py
Python
utils/datasets.py
Royzon/YOLOV4_MCMOT
cd4c8b1b60f9cf809579609caa29d408432845ba
[ "MIT" ]
94
2020-08-10T13:37:23.000Z
2022-03-03T10:08:53.000Z
utils/datasets.py
Royzon/YOLOV4_MCMOT
cd4c8b1b60f9cf809579609caa29d408432845ba
[ "MIT" ]
18
2020-09-30T09:55:10.000Z
2021-11-22T19:52:20.000Z
utils/datasets.py
Royzon/YOLOV4_MCMOT
cd4c8b1b60f9cf809579609caa29d408432845ba
[ "MIT" ]
30
2020-09-23T02:39:07.000Z
2021-12-30T09:58:47.000Z
# encoding=utf-8 import glob import math import os import random import shutil import time from collections import defaultdict from pathlib import Path from threading import Thread import cv2 import numpy as np import torch from PIL import Image, ExifTags from torch.utils.data import Dataset from tqdm import tqdm fr...
40.224234
238
0.511686
import glob import math import os import random import shutil import time from collections import defaultdict from pathlib import Path from threading import Thread import cv2 import numpy as np import torch from PIL import Image, ExifTags from torch.utils.data import Dataset from tqdm import tqdm from utils.utils i...
true
true
1c2d536e0514934471c9643923e3132b4e8f0682
1,322
py
Python
app/core/tests/test_admin.py
muminfarooq190/recipe-api
270d89df9d39e5903245734b18acaaee505d94d0
[ "MIT" ]
1
2021-05-17T06:58:33.000Z
2021-05-17T06:58:33.000Z
app/core/tests/test_admin.py
muminfarooq190/recipe-api
270d89df9d39e5903245734b18acaaee505d94d0
[ "MIT" ]
null
null
null
app/core/tests/test_admin.py
muminfarooq190/recipe-api
270d89df9d39e5903245734b18acaaee505d94d0
[ "MIT" ]
null
null
null
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='muminfarooq586@gmail.com'...
32.243902
70
0.641452
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTests(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='muminfarooq586@gmail.com'...
true
true
1c2d53f021fcc0f127524587c762f40d3b18bb0c
336
py
Python
ABC_D/ABC137_D.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
ABC_D/ABC137_D.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
ABC_D/ABC137_D.py
ryosuke0825/atcoder_python
185cdbe7db44ecca1aaf357858d16d31ce515ddb
[ "MIT" ]
null
null
null
import heapq N, M = map(int, input().split()) AB = [[] for i in range(10**5+1)] for i in range(N): A, B = map(int, input().split()) AB[A].append(-B) hq = [] heapq.heapify(hq) ans = 0 for i in range(1, M+1): for b in AB[i]: heapq.heappush(hq, b) if len(hq) > 0: ans += -heapq.heappop(...
15.272727
36
0.529762
import heapq N, M = map(int, input().split()) AB = [[] for i in range(10**5+1)] for i in range(N): A, B = map(int, input().split()) AB[A].append(-B) hq = [] heapq.heapify(hq) ans = 0 for i in range(1, M+1): for b in AB[i]: heapq.heappush(hq, b) if len(hq) > 0: ans += -heapq.heappop(...
true
true
1c2d544a237d9edbef6ba35f669d795612a30701
6,647
py
Python
cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchBase.py
mkinsner/llvm
589d48844edb12cd357b3024248b93d64b6760bf
[ "Apache-2.0" ]
2,338
2018-06-19T17:34:51.000Z
2022-03-31T11:00:37.000Z
cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchBase.py
mkinsner/llvm
589d48844edb12cd357b3024248b93d64b6760bf
[ "Apache-2.0" ]
3,740
2019-01-23T15:36:48.000Z
2022-03-31T22:01:13.000Z
cross-project-tests/debuginfo-tests/dexter/dex/command/commands/DexExpectWatchBase.py
mkinsner/llvm
589d48844edb12cd357b3024248b93d64b6760bf
[ "Apache-2.0" ]
500
2019-01-23T07:49:22.000Z
2022-03-30T02:59:37.000Z
# DExTer : Debugging Experience Tester # ~~~~~~ ~ ~~ ~ ~~ # # Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception """DexExpectWatch base class, holds logic...
35.92973
105
0.597563
import abc import difflib import os from collections import namedtuple from dex.command.CommandBase import CommandBase, StepExpectInfo from dex.command.StepValueInfo import StepValueInfo class DexExpectWatchBase(CommandBase): def __init__(self, *args, **kwargs): if len(args) < 2: rai...
true
true
1c2d549baa7b01f366b099fa732274bb92dcb368
1,265
py
Python
examples/basic_experiment.py
drammock/expyfun
b92bf5291318ee4cb1692e7bcb9757a422f48304
[ "BSD-3-Clause" ]
7
2015-09-27T23:54:07.000Z
2022-01-17T01:12:12.000Z
examples/basic_experiment.py
drammock/expyfun
b92bf5291318ee4cb1692e7bcb9757a422f48304
[ "BSD-3-Clause" ]
218
2015-02-17T20:29:31.000Z
2022-02-28T20:55:24.000Z
examples/basic_experiment.py
drammock/expyfun
b92bf5291318ee4cb1692e7bcb9757a422f48304
[ "BSD-3-Clause" ]
19
2015-02-19T18:43:43.000Z
2021-11-12T23:13:12.000Z
""" =========================== Run a very basic experiment =========================== This example demonstrates an (almost) minimum working example of the ExperimentController class. """ # Author: Eric Larson <larson.eric.d@gmail.com> # # License: BSD (3-clause) import numpy as np from expyfun import ExperimentCon...
28.75
79
0.657708
import numpy as np from expyfun import ExperimentController, analyze, building_doc from expyfun.visual import FixationDot print(__doc__) fs = 24414. dur = 1.0 tone = np.sin(2 * np.pi * 1000 * np.arange(int(fs * dur)) / float(fs)) tone *= 0.01 * np.sqrt(2) max_wait = 1. if not building_doc else 0. with Expe...
true
true
1c2d5502a9ba19cd4fb107246ec66b3d8905832b
26,575
py
Python
pytorch_lightning/trainer/data_loading.py
MaximumEntropy/pytorch-lightning
d8c501b22bc2c02a4bedb8b686daa5f904d6cf23
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/trainer/data_loading.py
MaximumEntropy/pytorch-lightning
d8c501b22bc2c02a4bedb8b686daa5f904d6cf23
[ "Apache-2.0" ]
null
null
null
pytorch_lightning/trainer/data_loading.py
MaximumEntropy/pytorch-lightning
d8c501b22bc2c02a4bedb8b686daa5f904d6cf23
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
49.672897
119
0.654939
import inspect import multiprocessing import os from abc import ABC from copy import deepcopy from functools import partial from typing import Any, Callable, Dict, List, Optional, Tuple, Union from torch.utils.data import BatchSampler, DataLoader, RandomSampler, Sampler, SequentialSampler from torch.utils...
true
true
1c2d551991c207d885140cc9edd7b12e8dc576cb
111
py
Python
src/init/init.py
zhengruohuang/toddler
0d7bde9aaf1fab8fed5f37973eeda9eaa100bd7a
[ "BSD-2-Clause" ]
80
2016-03-27T04:26:57.000Z
2021-12-24T08:27:55.000Z
src/init/init.py
zhengruohuang/toddler
0d7bde9aaf1fab8fed5f37973eeda9eaa100bd7a
[ "BSD-2-Clause" ]
1
2016-12-08T18:08:20.000Z
2018-02-23T02:51:35.000Z
src/init/init.py
zhengruohuang/toddler
0d7bde9aaf1fab8fed5f37973eeda9eaa100bd7a
[ "BSD-2-Clause" ]
11
2017-05-09T01:42:07.000Z
2020-02-13T13:56:36.000Z
print('hello world line 1') print('hello world line 2') print('hello world line 3') print('hello world line 4')
27.75
27
0.720721
print('hello world line 1') print('hello world line 2') print('hello world line 3') print('hello world line 4')
true
true
1c2d57ae90b266553dcd84e80e7c0e9c44ac6eb5
3,615
py
Python
selfdrive/controls/lib/lane_planner.py
egreen-park/crwusiz
da528ebea9945f5a2a0a286467bb1c349aa7472f
[ "MIT" ]
null
null
null
selfdrive/controls/lib/lane_planner.py
egreen-park/crwusiz
da528ebea9945f5a2a0a286467bb1c349aa7472f
[ "MIT" ]
null
null
null
selfdrive/controls/lib/lane_planner.py
egreen-park/crwusiz
da528ebea9945f5a2a0a286467bb1c349aa7472f
[ "MIT" ]
null
null
null
from common.numpy_fast import interp import numpy as np from selfdrive.hardware import EON, TICI from cereal import log TRAJECTORY_SIZE = 33 # camera offset is meters from center car to camera if EON: CAMERA_OFFSET = 0.10 PATH_OFFSET = 0.0 elif TICI: CAMERA_OFFSET = -0.04 PATH_OFFSET = -0.04 else: CAMERA_OF...
37.268041
109
0.684371
from common.numpy_fast import interp import numpy as np from selfdrive.hardware import EON, TICI from cereal import log TRAJECTORY_SIZE = 33 if EON: CAMERA_OFFSET = 0.10 PATH_OFFSET = 0.0 elif TICI: CAMERA_OFFSET = -0.04 PATH_OFFSET = -0.04 else: CAMERA_OFFSET = 0.0 PATH_OFFSET = 0.0 class LanePlanner:...
true
true
1c2d5983cf93611a62edd17dcf520c868260654e
3,865
py
Python
tests/model_fields/test_decimalfield.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/model_fields/test_decimalfield.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
tests/model_fields/test_decimalfield.py
Yoann-Vie/esgi-hearthstone
115d03426c7e8e80d89883b78ac72114c29bed12
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
import unittest from decimal import Decimal from django.core import validators from django.core.exceptions import ValidationError from django.db import connection, models from django.test import TestCase from .models import BigD, Foo class DecimalFieldTests(TestCase): def test_to_python(self): ...
42.944444
110
0.662096
import unittest from decimal import Decimal from django.core import validators from django.core.exceptions import ValidationError from django.db import connection, models from django.test import TestCase from .models import BigD, Foo class DecimalFieldTests(TestCase): def test_to_python(self): ...
true
true
1c2d5c01ca1dab4d07f601f9c346d1cf713a4ed6
4,689
py
Python
yt_dlp/extractor/keezmovies.py
YuanHsing/yt-dlp
38d86f4d45cf2b764f79141c602356fbb426a4b6
[ "Unlicense" ]
1
2021-12-13T14:12:47.000Z
2021-12-13T14:12:47.000Z
yt_dlp/extractor/keezmovies.py
YuanHsing/yt-dlp
38d86f4d45cf2b764f79141c602356fbb426a4b6
[ "Unlicense" ]
null
null
null
yt_dlp/extractor/keezmovies.py
YuanHsing/yt-dlp
38d86f4d45cf2b764f79141c602356fbb426a4b6
[ "Unlicense" ]
null
null
null
import re from .common import InfoExtractor from ..aes import aes_decrypt_text from ..compat import compat_urllib_parse_unquote from ..utils import ( determine_ext, ExtractorError, format_field, int_or_none, str_to_int, strip_or_none, url_or_none, ) class KeezMoviesIE(InfoExtractor): ...
35.255639
121
0.538494
import re from .common import InfoExtractor from ..aes import aes_decrypt_text from ..compat import compat_urllib_parse_unquote from ..utils import ( determine_ext, ExtractorError, format_field, int_or_none, str_to_int, strip_or_none, url_or_none, ) class KeezMoviesIE(InfoExtractor): ...
true
true
1c2d5c38ccc321103a599f13db5a9dd96360f17f
42,056
py
Python
mathics/builtin/algebra.py
Carreau/Mathics
1706e994ae3db29ccbe7fad53d933ea5389c3be5
[ "Apache-2.0" ]
1
2021-04-11T10:49:46.000Z
2021-04-11T10:49:46.000Z
mathics/builtin/algebra.py
jhbadger/Mathics
395f307e758a84247b891f887368d70202b33254
[ "Apache-2.0" ]
null
null
null
mathics/builtin/algebra.py
jhbadger/Mathics
395f307e758a84247b891f887368d70202b33254
[ "Apache-2.0" ]
1
2018-12-21T08:04:18.000Z
2018-12-21T08:04:18.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import from mathics.builtin.base import Builtin from mathics.core.expression import Expression, Integer, Symbol, Atom, Number from mathics.core.convert import from_sympy, sympy_symbol_prefix import s...
31.957447
249
0.510771
from __future__ import unicode_literals from __future__ import absolute_import from mathics.builtin.base import Builtin from mathics.core.expression import Expression, Integer, Symbol, Atom, Number from mathics.core.convert import from_sympy, sympy_symbol_prefix import sympy import mpmath from six.moves import ran...
true
true
1c2d5c434953c3acf443a11ab1783bd53f70c57f
8,240
py
Python
src/api/bkuser_core/tests/profiles/test_utils.py
Canway-shiisa/bk-user
a049e80d12082960828015742cea4b041f4af796
[ "MIT" ]
null
null
null
src/api/bkuser_core/tests/profiles/test_utils.py
Canway-shiisa/bk-user
a049e80d12082960828015742cea4b041f4af796
[ "MIT" ]
null
null
null
src/api/bkuser_core/tests/profiles/test_utils.py
Canway-shiisa/bk-user
a049e80d12082960828015742cea4b041f4af796
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) 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 compliance with the Lic...
34.767932
115
0.589563
from unittest.mock import patch import pytest from django.contrib.auth.hashers import check_password from bkuser_core.audit.utils import create_profile_log from bkuser_core.categories.models import ProfileCategory from bkuser_core.profiles.exceptions import CountryISOCodeNotMatch, UsernameWithDomainFormatError from ...
true
true
1c2d5c50b871c13ddcd65e2482ce8e7c74851477
971
py
Python
pos_qr_show/__manifest__.py
mosadiqit/pos-addons
6cac2b7d227bddbec5f9d0c69859e626f2e9dc73
[ "MIT" ]
null
null
null
pos_qr_show/__manifest__.py
mosadiqit/pos-addons
6cac2b7d227bddbec5f9d0c69859e626f2e9dc73
[ "MIT" ]
null
null
null
pos_qr_show/__manifest__.py
mosadiqit/pos-addons
6cac2b7d227bddbec5f9d0c69859e626f2e9dc73
[ "MIT" ]
3
2021-06-15T05:45:42.000Z
2021-07-27T12:28:53.000Z
# Copyright 2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev> # License MIT (https://opensource.org/licenses/MIT). { "name": """POS QR Showing in POS""", "summary": """Show QR for qr-based payment systems in POS or Customer Screen""", "category": "Hidden", # "live_test_url": "", "image...
33.482759
84
0.601442
{ "name": """POS QR Showing in POS""", "summary": """Show QR for qr-based payment systems in POS or Customer Screen""", "category": "Hidden", "images": [], "version": "12.0.1.0.0", "application": False, "author": "IT-Projects LLC, Ivan Yelizariev", "support": "apps@itpp.dev", ...
true
true
1c2d5cca901cfaa7506bca632cd6a7ed50bd307d
807
py
Python
amino/__init__.py
Alert-Aigul/Amino.py
34b578e34e8a6ee6e50e3c3b2ad8bcda6b83f266
[ "MIT" ]
null
null
null
amino/__init__.py
Alert-Aigul/Amino.py
34b578e34e8a6ee6e50e3c3b2ad8bcda6b83f266
[ "MIT" ]
null
null
null
amino/__init__.py
Alert-Aigul/Amino.py
34b578e34e8a6ee6e50e3c3b2ad8bcda6b83f266
[ "MIT" ]
null
null
null
__title__ = "Amino.py" __author__ = "Slimakoi" __license__ = "MIT" __copyright__ = "Copyright 2020-2022 Slimakoi" __version__ = "3.0.4" from .acm import ACM from .client import Client from .sub_client import SubClient from .socket import Callbacks, SocketHandler from .async_acm import AsyncACM from .async_client impo...
31.038462
121
0.788104
__title__ = "Amino.py" __author__ = "Slimakoi" __license__ = "MIT" __copyright__ = "Copyright 2020-2022 Slimakoi" __version__ = "3.0.4" from .acm import ACM from .client import Client from .sub_client import SubClient from .socket import Callbacks, SocketHandler from .async_acm import AsyncACM from .async_client impo...
true
true
1c2d5cd0da5bfba84bb4e52446a57f4113914fc8
1,636
py
Python
dimod/__init__.py
hsadeghidw/dimod
c6b4adc18c22f39fd5a79e6775bbcab84b1a5489
[ "Apache-2.0" ]
null
null
null
dimod/__init__.py
hsadeghidw/dimod
c6b4adc18c22f39fd5a79e6775bbcab84b1a5489
[ "Apache-2.0" ]
null
null
null
dimod/__init__.py
hsadeghidw/dimod
c6b4adc18c22f39fd5a79e6775bbcab84b1a5489
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 D-Wave Systems Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
25.169231
90
0.78423
__version__ = '0.10.6' from dimod.bqm import * from dimod.constrained import * import dimod.constrained from dimod.core import * import dimod.core from dimod.reference import * import dimod.reference from dimod.roof_duality import fix_variables from dimod.binary import * import dimod.binary from d...
true
true
1c2d5e9d7c8be473f77b25e53bd2c0cedbdbf59f
1,490
py
Python
bnn_mcmc_examples/examples/mlp/noisy_xor/setting2/optim/sgd/benchmark_run.py
papamarkou/bnn_mcmc_examples
7bb4ecfb33db4c30a8e61e31f528bda0efb24e3d
[ "MIT" ]
1
2021-09-09T15:55:37.000Z
2021-09-09T15:55:37.000Z
bnn_mcmc_examples/examples/mlp/noisy_xor/setting2/optim/sgd/benchmark_run.py
kushagragpt99/bnn_mcmc_examples
297cdb1e74335860989bebdb4ff6f6322b6adc06
[ "MIT" ]
null
null
null
bnn_mcmc_examples/examples/mlp/noisy_xor/setting2/optim/sgd/benchmark_run.py
kushagragpt99/bnn_mcmc_examples
297cdb1e74335860989bebdb4ff6f6322b6adc06
[ "MIT" ]
1
2021-10-05T06:38:57.000Z
2021-10-05T06:38:57.000Z
# %% Import packages from sklearn.metrics import accuracy_score from torch.optim import SGD from bnn_mcmc_examples.examples.mlp.noisy_xor.setting2.model import model from bnn_mcmc_examples.examples.mlp.noisy_xor.setting2.optim.constants import ( num_epochs, num_solutions, verbose, verbose_step ) from bnn_mcmc_exa...
33.863636
116
0.797315
from sklearn.metrics import accuracy_score from torch.optim import SGD from bnn_mcmc_examples.examples.mlp.noisy_xor.setting2.model import model from bnn_mcmc_examples.examples.mlp.noisy_xor.setting2.optim.constants import ( num_epochs, num_solutions, verbose, verbose_step ) from bnn_mcmc_examples.examples.mlp.n...
true
true
1c2d5eaaf1132afd1bc8c11e078a763b26d068d6
8,594
py
Python
sktime/forecasting/online_learning/_prediction_weighted_ensembler.py
BINAYKUMAR943/sktime
f02f656de86da420b1c14e58dc60194261969eb3
[ "BSD-3-Clause" ]
2
2020-12-25T08:08:38.000Z
2021-04-07T08:00:56.000Z
sktime/forecasting/online_learning/_prediction_weighted_ensembler.py
afzal442/sktime
294429e7f2ac5824171bb61ad075e0af0055cb02
[ "BSD-3-Clause" ]
1
2021-05-15T16:24:02.000Z
2021-05-16T05:25:31.000Z
sktime/forecasting/online_learning/_prediction_weighted_ensembler.py
afzal442/sktime
294429e7f2ac5824171bb61ad075e0af0055cb02
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # !/usr/bin/env python3 -u # copyright: sktime developers, BSD-3-Clause License (see LICENSE file) """Implements online algorithms for prediction weighted ensembles.""" import numpy as np from scipy.optimize import bisect from scipy.optimize import nnls class _PredictionWeightedEnsembler: ...
30.692857
85
0.60647
import numpy as np from scipy.optimize import bisect from scipy.optimize import nnls class _PredictionWeightedEnsembler: _tags = { "univariate-only": True, "requires-fh-in-fit": False, "handles-missing-data": False, } def __init__(self, n_estimators=10, loss_func=None): ...
true
true
1c2d5f2c9df3da18ac55ae059c716cda6d52e5df
1,184
py
Python
IPython/core/ipapi.py
tinyclues/ipython
71e32606b0242772b81c9be0d40751ba47d95f2c
[ "BSD-3-Clause-Clear" ]
1
2016-05-26T10:57:18.000Z
2016-05-26T10:57:18.000Z
IPython/core/ipapi.py
adgaudio/ipython
a924f50c0f7b84127391f1c396326258c2b303e2
[ "BSD-3-Clause-Clear" ]
null
null
null
IPython/core/ipapi.py
adgaudio/ipython
a924f50c0f7b84127391f1c396326258c2b303e2
[ "BSD-3-Clause-Clear" ]
null
null
null
# encoding: utf-8 """ This module is *completely* deprecated and should no longer be used for any purpose. Currently, we have a few parts of the core that have not been componentized and thus, still rely on this module. When everything has been made into a component, this module will be sent to deathrow. """ #------...
39.466667
78
0.451014
def get(): from IPython.core.interactiveshell import InteractiveShell return InteractiveShell.instance()
true
true
1c2d5f30fd5127aa23a56b3d35a865db7e43e244
341
py
Python
accounts/models.py
achuthvarghese/django_realtime_chat
922bd1971c7c0102f007581967e6aecf40171e48
[ "MIT" ]
null
null
null
accounts/models.py
achuthvarghese/django_realtime_chat
922bd1971c7c0102f007581967e6aecf40171e48
[ "MIT" ]
null
null
null
accounts/models.py
achuthvarghese/django_realtime_chat
922bd1971c7c0102f007581967e6aecf40171e48
[ "MIT" ]
1
2021-10-02T06:52:09.000Z
2021-10-02T06:52:09.000Z
import uuid from django.contrib.auth.models import AbstractUser from django.db import models from django.utils.translation import gettext_lazy as _ class User(AbstractUser): id = models.UUIDField( _("ID"), primary_key=True, default=uuid.uuid4, editable=False, unique=True ) class Meta: db...
22.733333
82
0.72434
import uuid from django.contrib.auth.models import AbstractUser from django.db import models from django.utils.translation import gettext_lazy as _ class User(AbstractUser): id = models.UUIDField( _("ID"), primary_key=True, default=uuid.uuid4, editable=False, unique=True ) class Meta: db...
true
true
1c2d5fae9fad5ca0b344ef8deeb0cc04d429eea1
854
py
Python
python/boxBlur/boxBlur.py
coingraham/codefights
d3845852562bee2669c3743d605cc8d2cd03c63d
[ "MIT" ]
null
null
null
python/boxBlur/boxBlur.py
coingraham/codefights
d3845852562bee2669c3743d605cc8d2cd03c63d
[ "MIT" ]
null
null
null
python/boxBlur/boxBlur.py
coingraham/codefights
d3845852562bee2669c3743d605cc8d2cd03c63d
[ "MIT" ]
null
null
null
def boxBlur(image): blur = [[0 for x in range(len(image[0]) - 2)] for y in range(len(image) - 2)] for i in range(1, len(image) - 1): for j in range(1, len(image[i]) - 1): blur_number = (image[i - 1][j - 1] + image[i - 1][j] + imag...
32.846154
81
0.316159
def boxBlur(image): blur = [[0 for x in range(len(image[0]) - 2)] for y in range(len(image) - 2)] for i in range(1, len(image) - 1): for j in range(1, len(image[i]) - 1): blur_number = (image[i - 1][j - 1] + image[i - 1][j] + imag...
false
true
1c2d5fe47862d14ed04c6b7a8abb128338c70732
8,005
py
Python
formulario.py
AtlasGold/Formulario-Abro
f7afb4c6b192c58c6862ef557b15b95cd3205832
[ "MIT" ]
null
null
null
formulario.py
AtlasGold/Formulario-Abro
f7afb4c6b192c58c6862ef557b15b95cd3205832
[ "MIT" ]
null
null
null
formulario.py
AtlasGold/Formulario-Abro
f7afb4c6b192c58c6862ef557b15b95cd3205832
[ "MIT" ]
null
null
null
from logging import exception from PIL import Image from os import write import streamlit as st from streamlit.type_util import Key import os #from conexão.conexao import cnxn,cursor #trocar o nome da pagina e o icone st.set_page_config(page_title = "Abro - Odontologia Especializada", page_icon=":smiley:") #re...
41.910995
889
0.690319
from logging import exception from PIL import Image from os import write import streamlit as st from streamlit.type_util import Key import os st.set_page_config(page_title = "Abro - Odontologia Especializada", page_icon=":smiley:") hide_st_style = """ <style> #MainMenu {visibility: ...
true
true
1c2d5ff1aa83ff5041a74b069d2d258e7e229a6d
2,267
py
Python
reid/insightface/model.py
amirassov/topcoder-facial-marathon
37f6828a589717d0004dd84d51eb7bc6a1b310fd
[ "MIT" ]
11
2019-08-19T11:49:11.000Z
2021-05-21T06:00:08.000Z
reid/insightface/model.py
amirassov/topcoder-facial-marathon
37f6828a589717d0004dd84d51eb7bc6a1b310fd
[ "MIT" ]
null
null
null
reid/insightface/model.py
amirassov/topcoder-facial-marathon
37f6828a589717d0004dd84d51eb7bc6a1b310fd
[ "MIT" ]
3
2019-10-09T09:20:56.000Z
2020-08-28T02:39:01.000Z
import cv2 import numpy as np import mxnet as mx from sklearn.preprocessing import normalize from reid.insightface.mtcnn import MtcnnDetector from reid.insightface.utils import preprocess def get_embedder(ctx, image_size, model_prefix: str, layer): sym, arg_params, aux_params = mx.model.load_checkpoint(model_pre...
36.564516
88
0.664314
import cv2 import numpy as np import mxnet as mx from sklearn.preprocessing import normalize from reid.insightface.mtcnn import MtcnnDetector from reid.insightface.utils import preprocess def get_embedder(ctx, image_size, model_prefix: str, layer): sym, arg_params, aux_params = mx.model.load_checkpoint(model_pre...
true
true
1c2d60629e50286a1c1d72d99a70b5b0dfbf9049
9,690
py
Python
fastai2/text/learner.py
moritzschwyzer/fastai2
3aa40a4e736ffac50b17359a399aef40ac11fcca
[ "Apache-2.0" ]
null
null
null
fastai2/text/learner.py
moritzschwyzer/fastai2
3aa40a4e736ffac50b17359a399aef40ac11fcca
[ "Apache-2.0" ]
null
null
null
fastai2/text/learner.py
moritzschwyzer/fastai2
3aa40a4e736ffac50b17359a399aef40ac11fcca
[ "Apache-2.0" ]
null
null
null
# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/37_text.learner.ipynb (unless otherwise specified). __all__ = ['match_embeds', 'load_ignore_keys', 'TextLearner', 'decode_spec_tokens', 'LMLearner', 'language_model_learner', 'text_classifier_learner'] # Cell from ..basics import * from .core import * from .d...
44.861111
123
0.642724
__all__ = ['match_embeds', 'load_ignore_keys', 'TextLearner', 'decode_spec_tokens', 'LMLearner', 'language_model_learner', 'text_classifier_learner'] from ..basics import * from .core import * from .data import * from .models.core import * from .models.awdlstm import * from ..callback.rnn import * def ...
true
true
1c2d6121c44378aca199f3bf7aee582ad8f74fb8
3,912
py
Python
modules/finance/arrival_and_billing/code/list_arrival_and_billing.py
xuhuiliang-maybe/ace_office
07fae18676a193206802e8fb9aa32a805b1da24c
[ "Apache-2.0" ]
1
2018-11-27T08:08:07.000Z
2018-11-27T08:08:07.000Z
modules/finance/arrival_and_billing/code/list_arrival_and_billing.py
xuhuiliang-maybe/ace_office
07fae18676a193206802e8fb9aa32a805b1da24c
[ "Apache-2.0" ]
null
null
null
modules/finance/arrival_and_billing/code/list_arrival_and_billing.py
xuhuiliang-maybe/ace_office
07fae18676a193206802e8fb9aa32a805b1da24c
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import permission_required from django.views.generic import ListView from modules.finance.arrival_and_billing.models import * from modules.share_module.formater import * from modules.share_module.permissionMixi...
32.6
112
0.77684
from django.contrib.auth.decorators import login_required from django.contrib.auth.decorators import permission_required from django.views.generic import ListView from modules.finance.arrival_and_billing.models import * from modules.share_module.formater import * from modules.share_module.permissionMixin import class...
true
true
1c2d61cbe1d6786da71786c3d16234d6959e6428
2,633
py
Python
ppr-api/test_data/create_test_data.py
pwei1018/ppr
1fdd2f1ad33217045404d7b872d9fad41a4c7da6
[ "Apache-2.0" ]
null
null
null
ppr-api/test_data/create_test_data.py
pwei1018/ppr
1fdd2f1ad33217045404d7b872d9fad41a4c7da6
[ "Apache-2.0" ]
null
null
null
ppr-api/test_data/create_test_data.py
pwei1018/ppr
1fdd2f1ad33217045404d7b872d9fad41a4c7da6
[ "Apache-2.0" ]
null
null
null
# Copyright © 2019 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
34.644737
96
0.631599
import os from sqlalchemy.sql import text from ppr_api import create_app from ppr_api.models import db def execute_script(session, file_name): print('Executing SQL statements in file ' + file_name) with open(file_name, 'r') as sql_file: sql_command = '' for line in sql...
true
true
1c2d62d5d2f34e2b1d7c27b8e207a5bd7ecb9ea2
1,030
py
Python
isi_sdk_7_2/test/test_auth_access_access_item_relevant_ace.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_7_2/test/test_auth_access_access_item_relevant_ace.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_7_2/test/test_auth_access_access_item_relevant_ace.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 2 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import isi_sdk_7_2 from isi...
25.121951
121
0.741748
from __future__ import absolute_import import unittest import isi_sdk_7_2 from isi_sdk_7_2.models.auth_access_access_item_relevant_ace import AuthAccessAccessItemRelevantAce from isi_sdk_7_2.rest import ApiException class TestAuthAccessAccessItemRelevantAce(unittest.TestCase): def setUp(self): pa...
true
true
1c2d6449897c82aec7ff4cc6d62161ab56b18cad
2,977
py
Python
run_mypy.py
paper42/meson
f67994476da4bdc5389c558989809df48a172c6e
[ "Apache-2.0" ]
2
2021-12-06T21:07:39.000Z
2021-12-06T21:20:39.000Z
run_mypy.py
eli-schwartz/meson
40343fae9fb0acae6509753a5879bf4964276053
[ "Apache-2.0" ]
1
2021-09-03T18:10:25.000Z
2021-09-03T18:10:25.000Z
run_mypy.py
eli-schwartz/meson
40343fae9fb0acae6509753a5879bf4964276053
[ "Apache-2.0" ]
3
2021-01-08T08:54:47.000Z
2021-03-16T11:55:20.000Z
#!/usr/bin/env python3 from pathlib import Path import argparse import os import subprocess import sys import typing as T from mesonbuild.mesonlib import version_compare modules = [ # fully typed submodules # 'mesonbuild/ast', 'mesonbuild/cmake', 'mesonbuild/compilers', 'mesonbuild/dependencies',...
27.82243
108
0.665771
from pathlib import Path import argparse import os import subprocess import sys import typing as T from mesonbuild.mesonlib import version_compare modules = [ 'mesonbuild/cmake', 'mesonbuild/compilers', 'mesonbuild/dependencies', 'mesonbuild/interpreter/primitives', 'mesonbuild/interpr...
true
true
1c2d6457bac7b4ad1cd1f39f5199fcc8637c5ec7
3,679
py
Python
modules/dials/precommitbx/nagger.py
jorgediazjr/dials-dev20191018
77d66c719b5746f37af51ad593e2941ed6fbba17
[ "BSD-3-Clause" ]
null
null
null
modules/dials/precommitbx/nagger.py
jorgediazjr/dials-dev20191018
77d66c719b5746f37af51ad593e2941ed6fbba17
[ "BSD-3-Clause" ]
null
null
null
modules/dials/precommitbx/nagger.py
jorgediazjr/dials-dev20191018
77d66c719b5746f37af51ad593e2941ed6fbba17
[ "BSD-3-Clause" ]
1
2020-02-04T15:39:06.000Z
2020-02-04T15:39:06.000Z
from __future__ import absolute_import, division, print_function import os import sys try: import stat except ImportError: stat = None def nag(): """ Check if pre-commits should be installed for this repository. If they are not and should be then annoy the developer. To be called in libtbx_r...
35.718447
87
0.65371
from __future__ import absolute_import, division, print_function import os import sys try: import stat except ImportError: stat = None def nag(): if os.name == "nt" or not stat: return try: raise Exception() except Exception: frame = sys.exc_info()[2].tb_frame...
true
true
1c2d65b943ba706213e2cc73d096a3a4131c6d90
6,035
py
Python
influxdump/bin/influxdump.py
gams/influxdump
a17690e72529ef6d5d378089a7d05f8ed2591877
[ "Apache-2.0" ]
4
2017-05-25T12:22:07.000Z
2021-09-04T04:37:55.000Z
influxdump/bin/influxdump.py
gams/influxdump
a17690e72529ef6d5d378089a7d05f8ed2591877
[ "Apache-2.0" ]
16
2018-01-18T05:20:44.000Z
2021-04-30T05:14:20.000Z
influxdump/bin/influxdump.py
gams/influxdump
a17690e72529ef6d5d378089a7d05f8ed2591877
[ "Apache-2.0" ]
2
2017-11-15T09:21:11.000Z
2019-09-14T08:09:40.000Z
# -*- coding: utf-8 -*- import argparse import getpass import json import sys from influxdump.data import dump_data, load_file, load_folder from influxdump.db import get_client from influxdump.exceptions import TypecastError CHUNKSIZE = 50000 def get_args(): parser = argparse.ArgumentParser(description='influx...
32.798913
79
0.556089
import argparse import getpass import json import sys from influxdump.data import dump_data, load_file, load_folder from influxdump.db import get_client from influxdump.exceptions import TypecastError CHUNKSIZE = 50000 def get_args(): parser = argparse.ArgumentParser(description='influxDB data backup tool') ...
true
true
1c2d6640df87b3db1e71e52a5923727b2b0ee65f
46,334
py
Python
Messages.py
accept8605/OOT-Rando-with-working-Navi
84616d081efdc6989acd534676d2400d2bd68f23
[ "MIT" ]
null
null
null
Messages.py
accept8605/OOT-Rando-with-working-Navi
84616d081efdc6989acd534676d2400d2bd68f23
[ "MIT" ]
null
null
null
Messages.py
accept8605/OOT-Rando-with-working-Navi
84616d081efdc6989acd534676d2400d2bd68f23
[ "MIT" ]
null
null
null
# text details: https://wiki.cloudmodding.com/oot/Text_Format import random TABLE_START = 0xB849EC TEXT_START = 0x92D000 TABLE_SIZE_LIMIT = 0x43A8 ENG_TEXT_SIZE_LIMIT = 0x38130 JPN_TEXT_SIZE_LIMIT = 0x3A150 # name of type, followed by number of additional bytes to read, follwed by a function that prints the code C...
52.892694
200
0.66053
import random TABLE_START = 0xB849EC TEXT_START = 0x92D000 TABLE_SIZE_LIMIT = 0x43A8 ENG_TEXT_SIZE_LIMIT = 0x38130 JPN_TEXT_SIZE_LIMIT = 0x3A150 CONTROL_CODES = { 0x00: ('pad', 0, lambda _: '<pad>' ), 0x01: ('line-break', 0, lambda _: '\n' ), 0x02: ('end', 0, lambda _: '' ), 0x04: ('box-break', 0...
true
true
1c2d66ca6f72fce91804ef705bf0a12dad3f4c66
11,297
py
Python
postprocess/contours_image_cdb_extract.py
cinemascienceworkflows/2021-06_E4S-Tutorial
bf97fb65bce73b4f59e2cd26e969c01370fea62c
[ "BSD-3-Clause" ]
null
null
null
postprocess/contours_image_cdb_extract.py
cinemascienceworkflows/2021-06_E4S-Tutorial
bf97fb65bce73b4f59e2cd26e969c01370fea62c
[ "BSD-3-Clause" ]
null
null
null
postprocess/contours_image_cdb_extract.py
cinemascienceworkflows/2021-06_E4S-Tutorial
bf97fb65bce73b4f59e2cd26e969c01370fea62c
[ "BSD-3-Clause" ]
null
null
null
# state file generated using paraview version 5.9.0 #### import the simple module from the paraview from paraview.simple import * import glob import os def create_cinema_csv( db, datadir ): files = sorted(glob.glob(db + "/RenderView*")) cur_image = 0 with open(db + "/data.csv", "w") as f: f.write(...
47.070833
184
0.653713
iew*")) cur_image = 0 with open(db + "/data.csv", "w") as f: f.write("time,FILE\n") for infile in files: path, file_name = os.path.split(infile) print(file_name) f.write(str(cur_image) + "," + file_name + "\n") cur_image = cur_image + 1 def par...
true
true
1c2d68cb6473308dfc2af807e1b06014c9ca446c
47,587
py
Python
astropy/modeling/fitting.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
astropy/modeling/fitting.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
astropy/modeling/fitting.py
EnjoyLifeFund/macHighSierra-py36-pkgs
5668b5785296b314ea1321057420bcd077dba9ea
[ "BSD-3-Clause", "BSD-2-Clause", "MIT" ]
null
null
null
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module implements classes (called Fitters) which combine optimization algorithms (typically from `scipy.optimize`) with statistic functions to perform fitting. Fitters are implemented as callable classes. In addition to the data to fit, the ``__c...
37.293887
157
0.589195
from __future__ import (absolute_import, unicode_literals, division, print_function) import abc import inspect import operator import warnings from functools import reduce, wraps import numpy as np from .utils import poly_map_domain, _combine_equivalency_dict from ..units import Quantity ...
true
true
1c2d692655e59256487700286bbf76b05f2cdd07
2,116
py
Python
examples/albert/utils.py
hivemind-debug/debug
c5b756a6a48532a43cd080d4b3e02e7dd023e317
[ "MIT" ]
null
null
null
examples/albert/utils.py
hivemind-debug/debug
c5b756a6a48532a43cd080d4b3e02e7dd023e317
[ "MIT" ]
null
null
null
examples/albert/utils.py
hivemind-debug/debug
c5b756a6a48532a43cd080d4b3e02e7dd023e317
[ "MIT" ]
null
null
null
from typing import Dict, List, Tuple from multiaddr import Multiaddr from pydantic import BaseModel, StrictFloat, confloat, conint from hivemind import choose_ip_address from hivemind.dht.crypto import RSASignatureValidator from hivemind.dht.schema import BytesWithPublicKey, SchemaValidator from hivemind.dht.validati...
36.482759
105
0.734877
from typing import Dict, List, Tuple from multiaddr import Multiaddr from pydantic import BaseModel, StrictFloat, confloat, conint from hivemind import choose_ip_address from hivemind.dht.crypto import RSASignatureValidator from hivemind.dht.schema import BytesWithPublicKey, SchemaValidator from hivemind.dht.validati...
true
true
1c2d6a5ab20c4467dfe13585058f9cff624d91c4
1,048
py
Python
users/urls.py
utk-dev/Storyteller
4c15daada1948698a5169275e544e714b836a404
[ "MIT" ]
3
2020-11-02T09:13:47.000Z
2020-11-07T06:02:10.000Z
users/urls.py
utk-dev/Storyteller
4c15daada1948698a5169275e544e714b836a404
[ "MIT" ]
null
null
null
users/urls.py
utk-dev/Storyteller
4c15daada1948698a5169275e544e714b836a404
[ "MIT" ]
null
null
null
from django.urls import path from .views import * app_name = 'users' urlpatterns = [ path('signup/', signup_view, name='signup-view'), path('login/', login_view, name='login-view'), path('logout/', logout_view, name='logout-view'), path('settings/', settings_view, name='settings-view'), path('sett...
52.4
101
0.708969
from django.urls import path from .views import * app_name = 'users' urlpatterns = [ path('signup/', signup_view, name='signup-view'), path('login/', login_view, name='login-view'), path('logout/', logout_view, name='logout-view'), path('settings/', settings_view, name='settings-view'), path('sett...
true
true
1c2d6a93b212bc20997528b53f8a81e1cf96b964
436
py
Python
python/ctci-big-o.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
21
2015-02-09T18:08:38.000Z
2021-11-08T15:00:48.000Z
python/ctci-big-o.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
7
2020-04-12T23:00:19.000Z
2021-01-30T23:44:24.000Z
python/ctci-big-o.py
gajubadge11/hackerrank-3
132a5019b7ed21507bb95b5063fa66c446b0eff7
[ "MIT" ]
27
2015-07-22T18:08:12.000Z
2022-02-28T19:50:26.000Z
import math def is_prime(test_case): if test_case == 1: return False for factor in range(2, math.ceil(math.sqrt(test_case) + 1)): if test_case != factor and test_case % factor == 0: return False return True NUM_CASES = int(input().strip()) for _ in range(NUM_CASES): test_...
21.8
64
0.603211
import math def is_prime(test_case): if test_case == 1: return False for factor in range(2, math.ceil(math.sqrt(test_case) + 1)): if test_case != factor and test_case % factor == 0: return False return True NUM_CASES = int(input().strip()) for _ in range(NUM_CASES): test_...
true
true
1c2d6a9405b277d357d1ad3e17d00230b246d383
1,551
py
Python
graphgym/models/register.py
tigerneil/GraphGym
77f1e7acb4d08b6647b2cf1d147d86b736ac25e2
[ "MIT" ]
7
2021-03-23T08:10:25.000Z
2022-01-10T05:51:38.000Z
graphgym/models/register.py
batermj/GraphGym
05f749900ef07029a127dc36e74e43f4d0eb1a06
[ "MIT" ]
null
null
null
graphgym/models/register.py
batermj/GraphGym
05f749900ef07029a127dc36e74e43f4d0eb1a06
[ "MIT" ]
2
2020-11-23T21:42:59.000Z
2021-03-10T11:43:27.000Z
import torch import torch.nn as nn def register(key, module, module_dict): if key in module_dict: raise KeyError('Key {} is already pre-defined.'.format(key)) else: module_dict[key] = module act_dict = {} def register_act(key, module): register(key, module, act_dict) node_encoder_dict =...
23.5
68
0.727917
import torch import torch.nn as nn def register(key, module, module_dict): if key in module_dict: raise KeyError('Key {} is already pre-defined.'.format(key)) else: module_dict[key] = module act_dict = {} def register_act(key, module): register(key, module, act_dict) node_encoder_dict =...
true
true
1c2d6b04c3cbbef99c9d3c2801c0377fb7de6248
10,117
py
Python
MeerK40t.py
Sophist-UK/meerk40t
abbbd19796a0d50d90ca553106ac738f618dc19b
[ "MIT" ]
null
null
null
MeerK40t.py
Sophist-UK/meerk40t
abbbd19796a0d50d90ca553106ac738f618dc19b
[ "MIT" ]
null
null
null
MeerK40t.py
Sophist-UK/meerk40t
abbbd19796a0d50d90ca553106ac738f618dc19b
[ "MIT" ]
null
null
null
import argparse import sys from Console import Console from DefaultModules import * from GrblDevice import GrblDevice from LhystudiosDevice import LhystudiosDevice from MoshiboardDevice import MoshiboardDevice from RasterScripts import RasterScripts from RuidaDevice import RuidaDevice from LaserServer import...
39.213178
125
0.583869
import argparse import sys from Console import Console from DefaultModules import * from GrblDevice import GrblDevice from LhystudiosDevice import LhystudiosDevice from MoshiboardDevice import MoshiboardDevice from RasterScripts import RasterScripts from RuidaDevice import RuidaDevice from LaserServer import...
true
true
1c2d6b20355c1a024ee4a79bffc236f44ba72659
5,027
py
Python
pytest_localserver/https.py
kianmeng/pytest-localserver
387eb4a9e2b9a0e116685fd0ed2ace7dd710bb5b
[ "MIT" ]
null
null
null
pytest_localserver/https.py
kianmeng/pytest-localserver
387eb4a9e2b9a0e116685fd0ed2ace7dd710bb5b
[ "MIT" ]
2
2021-09-14T09:06:20.000Z
2021-09-14T17:23:07.000Z
pytest_localserver/https.py
kianmeng/pytest-localserver
387eb4a9e2b9a0e116685fd0ed2ace7dd710bb5b
[ "MIT" ]
null
null
null
# Copyright (C) 2010-2013 Sebastian Rahlf and others (see AUTHORS). # # This program is release under the MIT license. You can find the full text of # the license in the LICENSE file. import os.path from pytest_localserver.http import ContentServer #: default server certificate DEFAULT_CERTIFICATE = os.path.join( ...
32.642857
127
0.623632
import os.path from pytest_localserver.http import ContentServer DEFAULT_CERTIFICATE = os.path.join( os.path.abspath(os.path.dirname(__file__)), 'server.pem') class SecureContentServer (ContentServer): def __init__(self, host='localhost', port=0, key=DEFAULT_CERTIFICATE, cert=DEFAUL...
true
true
1c2d6b234b979e190d0b0b73d6e00747ee6c7c5a
1,319
py
Python
tests/empty_test.py
pkking/waaagh_system
1587a2df863136bb2acb275427300c8e4fda977d
[ "Apache-2.0" ]
null
null
null
tests/empty_test.py
pkking/waaagh_system
1587a2df863136bb2acb275427300c8e4fda977d
[ "Apache-2.0" ]
null
null
null
tests/empty_test.py
pkking/waaagh_system
1587a2df863136bb2acb275427300c8e4fda977d
[ "Apache-2.0" ]
null
null
null
import pytest import json @pytest.mark.usefixtures("db") class TestEmptyResources: def test_empty_post(self): # all the resources should return 404 res = self.app.get('/posts') assert res.status_code == 404 assert 'not any Post exist' in json.loads(res.data.decode('utf-8'))['message...
42.548387
94
0.627748
import pytest import json @pytest.mark.usefixtures("db") class TestEmptyResources: def test_empty_post(self): res = self.app.get('/posts') assert res.status_code == 404 assert 'not any Post exist' in json.loads(res.data.decode('utf-8'))['message'] res = self.app.get('/posts...
true
true
1c2d6b8f79b45992ad7532202bda3be14726f0b1
3,588
py
Python
ic_engine.py
cattech-lab/cantera_examples
13e969b2a767bed5bb0d79adf86187cd9fbd090d
[ "MIT" ]
4
2020-11-27T03:11:07.000Z
2022-02-17T17:09:23.000Z
ic_engine.py
Ohlagrange/cantera_examples
13e969b2a767bed5bb0d79adf86187cd9fbd090d
[ "MIT" ]
null
null
null
ic_engine.py
Ohlagrange/cantera_examples
13e969b2a767bed5bb0d79adf86187cd9fbd090d
[ "MIT" ]
3
2020-11-27T03:11:13.000Z
2022-01-07T13:39:07.000Z
""" Simulation of a internal combustion engine. """ import cantera as ct import numpy as np import csv #------------------------------------------------------ # Input Parameters rpm = 600.0 # engine speed [rpm] bore = 82.55 # bore diameter [mm] stroke = 114.3 # stroke [mm] cratio = 10.0 # compression ratio [-] con...
26
133
0.628763
import cantera as ct import numpy as np import csv rpm = 600.0 bore = 82.55 stroke = 114.3 cratio = 10.0 conrod = 200.0 T_ini = 350.0 p_ini = 1.0e5 phi = 0.33 T_out = 300.0 p_out = 1.0e5 c_out = 'O2:1.0, N2:3.76' reaction_mechanism = 'reduced_247.cti' ca_start = -144.0 ca_end = 180.0 ca_step =...
true
true
1c2d6bee2051e16a5c40b582fca8a67a0f1ad392
427
py
Python
env/Lib/site-packages/plotly/validators/funnel/marker/colorbar/title/_text.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
11,750
2015-10-12T07:03:39.000Z
2022-03-31T20:43:15.000Z
venv/Lib/site-packages/plotly/validators/funnel/marker/colorbar/title/_text.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,951
2015-10-12T00:41:25.000Z
2022-03-31T22:19:26.000Z
venv/Lib/site-packages/plotly/validators/funnel/marker/colorbar/title/_text.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
2,623
2015-10-15T14:40:27.000Z
2022-03-28T16:05:50.000Z
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="text", parent_name="funnel.marker.colorbar.title", **kwargs ): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_na...
30.5
86
0.65808
import _plotly_utils.basevalidators class TextValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name="text", parent_name="funnel.marker.colorbar.title", **kwargs ): super(TextValidator, self).__init__( plotly_name=plotly_name, parent_na...
true
true
1c2d6bf4b65b0ba7d0375701da6177517aa5921f
16,031
py
Python
tests/custom_cluster/test_breakpad.py
survivorli/Impala
495397101e5807c701df71ea288f4815d69c2c8a
[ "Apache-2.0" ]
1,523
2015-01-01T03:42:24.000Z
2022-02-06T22:24:04.000Z
tests/custom_cluster/test_breakpad.py
survivorli/Impala
495397101e5807c701df71ea288f4815d69c2c8a
[ "Apache-2.0" ]
10
2015-01-09T06:46:05.000Z
2022-03-29T21:57:57.000Z
tests/custom_cluster/test_breakpad.py
survivorli/Impala
495397101e5807c701df71ea288f4815d69c2c8a
[ "Apache-2.0" ]
647
2015-01-02T04:01:40.000Z
2022-03-30T15:57:35.000Z
# 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...
42.076115
89
0.733392
import glob import os import psutil import pytest import shutil import tempfile import time from resource import setrlimit, RLIMIT_CORE, RLIM_INFINITY from signal import SIGSEGV, SIGKILL, SIGUSR1, SIGTERM from subprocess import CalledProcessError from tests.common.custom_cluster_test_suite import Cust...
false
true
1c2d6ce1b5a4e74a3fcafcdee6cf905f17b70757
10,336
py
Python
core/platform/email/mailgun_email_services_test.py
anubhavsinha98/oppia
9a64ea2e91d2f471ce22bd39da77b43dccd5b51f
[ "Apache-2.0" ]
1
2019-08-31T17:06:41.000Z
2019-08-31T17:06:41.000Z
core/platform/email/mailgun_email_services_test.py
anubhavsinha98/oppia
9a64ea2e91d2f471ce22bd39da77b43dccd5b51f
[ "Apache-2.0" ]
null
null
null
core/platform/email/mailgun_email_services_test.py
anubhavsinha98/oppia
9a64ea2e91d2f471ce22bd39da77b43dccd5b51f
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
47.196347
80
0.654605
from __future__ import absolute_import from core.platform.email import mailgun_email_services from core.tests import test_utils import feconf import python_utils class EmailTests(test_utils.GenericTestBase): def test_post_to_mailgun(self): swapped_urlopen = lambda x: x swapped_...
true
true
1c2d6d5e6c094413dfde7eaea42872c1563a08c2
2,332
py
Python
openmdao/core/tests/test_reconf_parallel_group.py
onodip/OpenMDAO
96a99806fb3a547b881d2ad3da2733bca9978567
[ "Apache-2.0" ]
null
null
null
openmdao/core/tests/test_reconf_parallel_group.py
onodip/OpenMDAO
96a99806fb3a547b881d2ad3da2733bca9978567
[ "Apache-2.0" ]
null
null
null
openmdao/core/tests/test_reconf_parallel_group.py
onodip/OpenMDAO
96a99806fb3a547b881d2ad3da2733bca9978567
[ "Apache-2.0" ]
null
null
null
from __future__ import division import numpy as np import unittest from openmdao.api import Problem, Group, IndepVarComp, ExplicitComponent, ExecComp from openmdao.api import NewtonSolver, PETScKrylov, NonlinearBlockGS, LinearBlockGS from openmdao.utils.assert_utils import assert_rel_error try: from openmdao.para...
31.513514
89
0.62307
from __future__ import division import numpy as np import unittest from openmdao.api import Problem, Group, IndepVarComp, ExplicitComponent, ExecComp from openmdao.api import NewtonSolver, PETScKrylov, NonlinearBlockGS, LinearBlockGS from openmdao.utils.assert_utils import assert_rel_error try: from openmdao.para...
true
true
1c2d6d80e0bf81021a0b116517fff0995fc983a1
77,921
py
Python
src/quart/app.py
Dunkledore/quart
803c8678b083895f4ece35fccb6aca56e189ee0a
[ "MIT" ]
null
null
null
src/quart/app.py
Dunkledore/quart
803c8678b083895f4ece35fccb6aca56e189ee0a
[ "MIT" ]
null
null
null
src/quart/app.py
Dunkledore/quart
803c8678b083895f4ece35fccb6aca56e189ee0a
[ "MIT" ]
null
null
null
from __future__ import annotations import asyncio import signal import sys import warnings from collections import defaultdict, OrderedDict from datetime import timedelta from itertools import chain from logging import Logger from pathlib import Path from types import TracebackType from typing import ( Any, An...
36.68597
100
0.619743
from __future__ import annotations import asyncio import signal import sys import warnings from collections import defaultdict, OrderedDict from datetime import timedelta from itertools import chain from logging import Logger from pathlib import Path from types import TracebackType from typing import ( Any, An...
true
true
1c2d6e01456bf2346f5ad723a642aa5a13a6b14a
7,769
py
Python
epic_barcoder/epic_barcoder.py
manutamminen/epic_barcoder
a9055539fe89fb77bb9661926da1da80691b775d
[ "MIT" ]
null
null
null
epic_barcoder/epic_barcoder.py
manutamminen/epic_barcoder
a9055539fe89fb77bb9661926da1da80691b775d
[ "MIT" ]
null
null
null
epic_barcoder/epic_barcoder.py
manutamminen/epic_barcoder
a9055539fe89fb77bb9661926da1da80691b775d
[ "MIT" ]
null
null
null
import os import subprocess import string import random import time from collections import defaultdict, Counter import epride as ep bridges_dict = {"16S": "GWATTACCGCGGCKGCTGCATCTTCTCCAAATGGGTCATGATC", "18S": "AAGAACGGCCATGCACCACCACATCTTCTCCAAATGGGTCATGATC", "narG2": "ACCGACATGCCGWTSC...
33.487069
141
0.61179
import os import subprocess import string import random import time from collections import defaultdict, Counter import epride as ep bridges_dict = {"16S": "GWATTACCGCGGCKGCTGCATCTTCTCCAAATGGGTCATGATC", "18S": "AAGAACGGCCATGCACCACCACATCTTCTCCAAATGGGTCATGATC", "narG2": "ACCGACATGCCGWTSC...
true
true
1c2d6e28c1806da22d3fad7024f4b9259a7a8ef1
80
py
Python
src/waldur_mastermind/notifications/__init__.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
26
2017-10-18T13:49:58.000Z
2021-09-19T04:44:09.000Z
src/waldur_mastermind/notifications/__init__.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
14
2018-12-10T14:14:51.000Z
2021-06-07T10:33:39.000Z
src/waldur_mastermind/notifications/__init__.py
geant-multicloud/MCMS-mastermind
81333180f5e56a0bc88d7dad448505448e01f24e
[ "MIT" ]
32
2017-09-24T03:10:45.000Z
2021-10-16T16:41:09.000Z
default_app_config = 'waldur_mastermind.notifications.apps.NotificationsConfig'
40
79
0.8875
default_app_config = 'waldur_mastermind.notifications.apps.NotificationsConfig'
true
true
1c2d6eef7384ad3b951f6a4a2afb394083967c06
12,194
py
Python
aiida/cmdline/commands/cmd_code.py
sponce24/aiida-core
a31fdbf1a458c76cc30886a3c296ee859c0d3833
[ "BSD-2-Clause", "MIT" ]
null
null
null
aiida/cmdline/commands/cmd_code.py
sponce24/aiida-core
a31fdbf1a458c76cc30886a3c296ee859c0d3833
[ "BSD-2-Clause", "MIT" ]
null
null
null
aiida/cmdline/commands/cmd_code.py
sponce24/aiida-core
a31fdbf1a458c76cc30886a3c296ee859c0d3833
[ "BSD-2-Clause", "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
35.55102
111
0.660243
)) @verdi_code.command() @arguments.CODE() @arguments.LABEL() @with_dbenv() def relabel(code, label): old_label = code.full_label try: code.relabel(label) except InputValidationError as exception: echo.echo_critical('invalid code name: {}'.format(exception)) else: echo.echo_s...
true
true
1c2d703cd9d7ce09514fa83cfca5a0cf5bcf78b9
6,002
py
Python
discord/stage_instance.py
mrvillage/discord.py
15a09772c292a9fc76ba4125c76bdf7cec08fd2e
[ "MIT" ]
3
2021-08-28T04:55:11.000Z
2022-01-26T03:22:08.000Z
discord/stage_instance.py
mrvillage/discord.py2
15a09772c292a9fc76ba4125c76bdf7cec08fd2e
[ "MIT" ]
null
null
null
discord/stage_instance.py
mrvillage/discord.py2
15a09772c292a9fc76ba4125c76bdf7cec08fd2e
[ "MIT" ]
null
null
null
""" The MIT License (MIT) Copyright (c) 2015-present Rapptz Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg...
31.756614
117
0.645452
from __future__ import annotations from typing import TYPE_CHECKING, Optional from .enums import StagePrivacyLevel, try_enum from .errors import InvalidArgument from .mixins import Hashable from .utils import MISSING, cached_slot_property __all__ = ("StageInstance",) if TYPE_CHECKING: from .channel import Stag...
true
true
1c2d704e3aa0894611a77b676b4ac217652f620d
795
py
Python
ex072.py
BrunosVieira88/Python
7dc105a62ede0b33d25c5864e892637ca71f2beb
[ "MIT" ]
null
null
null
ex072.py
BrunosVieira88/Python
7dc105a62ede0b33d25c5864e892637ca71f2beb
[ "MIT" ]
null
null
null
ex072.py
BrunosVieira88/Python
7dc105a62ede0b33d25c5864e892637ca71f2beb
[ "MIT" ]
null
null
null
print(""" Exercício Python 072: Crie um programa que tenha uma dupla totalmente preenchida com uma contagem por extenso, de zero até vinte. Seu programa deverá ler um número pelo teclado (entre 0 e 20) e mostrá-lo por extenso. """) zero = ('zero','um','dois','Tres','quatro','cinco','seis','sete','oito','nove','dez','...
33.125
130
0.615094
print(""" Exercício Python 072: Crie um programa que tenha uma dupla totalmente preenchida com uma contagem por extenso, de zero até vinte. Seu programa deverá ler um número pelo teclado (entre 0 e 20) e mostrá-lo por extenso. """) zero = ('zero','um','dois','Tres','quatro','cinco','seis','sete','oito','nove','dez','...
true
true
1c2d707a1b5ddad68ed53067b735ef86194014f0
1,319
py
Python
code/python/FactSetOwnership/v1/fds/sdk/FactSetOwnership/models/__init__.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
6
2022-02-07T16:34:18.000Z
2022-03-30T08:04:57.000Z
code/python/FactSetOwnership/v1/fds/sdk/FactSetOwnership/models/__init__.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
2
2022-02-07T05:25:57.000Z
2022-03-07T14:18:04.000Z
code/python/FactSetOwnership/v1/fds/sdk/FactSetOwnership/models/__init__.py
factset/enterprise-sdk
3fd4d1360756c515c9737a0c9a992c7451d7de7e
[ "Apache-2.0" ]
null
null
null
# flake8: noqa # import all models into this package # if you have many models here with many references from one model to another this may # raise a RecursionError # to avoid this, import only the models that you directly need like: # from from fds.sdk.FactSetOwnership.model.pet import Pet # or import this package, b...
54.958333
92
0.859742
from fds.sdk.FactSetOwnership.model.asset_type import AssetType from fds.sdk.FactSetOwnership.model.error_response import ErrorResponse from fds.sdk.FactSetOwnership.model.error_response_sub_errors import ErrorResponseSubErrors from fds.sdk.FactSetOwnership.model.fund_holding import FundHolding from fds.sdk....
true
true
1c2d709fffae9e0e4b0c66df3aca50c6e32acd0d
2,906
py
Python
notebooks/model_v2_small.py
deKeijzer/SRON-DCGAN
1ead827ebf549917435e6bc9ddd2d4d5951aa205
[ "MIT" ]
null
null
null
notebooks/model_v2_small.py
deKeijzer/SRON-DCGAN
1ead827ebf549917435e6bc9ddd2d4d5951aa205
[ "MIT" ]
null
null
null
notebooks/model_v2_small.py
deKeijzer/SRON-DCGAN
1ead827ebf549917435e6bc9ddd2d4d5951aa205
[ "MIT" ]
null
null
null
# General imports from __future__ import print_function #%matplotlib inline import argparse import os import random import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data import torchvision.datasets as dset import torchvision....
29.958763
101
0.5468
from __future__ import print_function import argparse import os import random import torch import torch.nn as nn import torch.nn.parallel import torch.backends.cudnn as cudnn import torch.optim as optim import torch.utils.data import torchvision.datasets as dset import torchvision.transforms as transforms import torc...
true
true
1c2d715d7003a6f5ae48af76c2dbf46d9fd72999
577
py
Python
Components/student/urls.py
iamTanTan/E-Learning_Lab_Spring_2021
e426ba982cc5044510eb1d8b80b377cb0bd5407a
[ "MIT" ]
2
2021-01-29T22:35:28.000Z
2021-05-13T23:35:54.000Z
Components/student/urls.py
iamTanTan/E-Learning_Lab_Spring_2021
e426ba982cc5044510eb1d8b80b377cb0bd5407a
[ "MIT" ]
8
2021-03-19T11:24:23.000Z
2022-03-12T00:57:13.000Z
Components/student/urls.py
iamTanTan/E-Learning_Lab_Spring_2021
e426ba982cc5044510eb1d8b80b377cb0bd5407a
[ "MIT" ]
1
2021-09-11T15:00:09.000Z
2021-09-11T15:00:09.000Z
from django.urls import path from . import views urlpatterns = [ path("<id_field>/", views.class_index, name="class_index"), path("<id_field>/<int:pk>/", views.class_detail, name="class_detail"), path("welcome/<id_field>", views.welcome_page, name="welcome_page"), path("reading_material/<id_field>", vi...
48.083333
89
0.694974
from django.urls import path from . import views urlpatterns = [ path("<id_field>/", views.class_index, name="class_index"), path("<id_field>/<int:pk>/", views.class_detail, name="class_detail"), path("welcome/<id_field>", views.welcome_page, name="welcome_page"), path("reading_material/<id_field>", vi...
true
true
1c2d7239b1e15d3d0f200c27c24ade50540899cb
1,215
py
Python
mcsrvstats/exceptions/exceptions.py
Darkflame72/mc-server-stats
991020d3bac9aa453fd38546ef3eab914ce250fa
[ "MIT" ]
1
2021-11-24T02:02:34.000Z
2021-11-24T02:02:34.000Z
mcsrvstats/exceptions/exceptions.py
Darkflame72/mc-server-stats
991020d3bac9aa453fd38546ef3eab914ce250fa
[ "MIT" ]
22
2020-08-26T05:12:46.000Z
2021-12-20T15:20:45.000Z
mcsrvstats/exceptions/exceptions.py
Obsidion-dev/mc-server-stats
991020d3bac9aa453fd38546ef3eab914ce250fa
[ "MIT" ]
2
2020-10-31T05:54:56.000Z
2021-02-15T03:11:32.000Z
"""All exceptions for mcsrvstats.""" from typing import Optional class ApiError(Exception): """Raised when a error occurs on the api side.""" def __init__(self, error: str, source: Optional[str] = "unknown source") -> None: """Error raised when api is not succesful. Args: error (...
27
86
0.588477
from typing import Optional class ApiError(Exception): def __init__(self, error: str, source: Optional[str] = "unknown source") -> None: self.message = f"The {source}API had {error}" super().__init__(self.message) def __str__(self) -> str: return self.message class PlayerNotFoundEr...
true
true
1c2d72a65ac2c4d2503dd453f46284e22f26e76e
1,033
py
Python
src/images.py
rafalou38/mangafetch
6bd313f9b9cfb2ea729e49d382a4085c9aaf094e
[ "MIT" ]
1
2021-03-17T07:56:14.000Z
2021-03-17T07:56:14.000Z
src/images.py
rafalou38/mangafetch
6bd313f9b9cfb2ea729e49d382a4085c9aaf094e
[ "MIT" ]
null
null
null
src/images.py
rafalou38/mangafetch
6bd313f9b9cfb2ea729e49d382a4085c9aaf094e
[ "MIT" ]
null
null
null
import PIL.Image import numpy import os def tile(image_path): try: ratio = 1.4 image = PIL.Image.open(image_path) image = numpy.array(image) height = image.shape[1] * ratio if image.shape[1] * 2 < image.shape[0]: # width = image.shape[0] images = []...
25.825
64
0.463698
import PIL.Image import numpy import os def tile(image_path): try: ratio = 1.4 image = PIL.Image.open(image_path) image = numpy.array(image) height = image.shape[1] * ratio if image.shape[1] * 2 < image.shape[0]: images = [] y = 0 ...
true
true
1c2d72d2c42ef715c70ebbdd79ac19337179888d
469
py
Python
data/scripts/templates/object/draft_schematic/furniture/shared_furniture_chair_loveseat_cheap.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/draft_schematic/furniture/shared_furniture_chair_loveseat_cheap.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/draft_schematic/furniture/shared_furniture_chair_loveseat_cheap.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/draft_schematic/furniture/shared_furniture_chair_loveseat_cheap.iff" resul...
27.588235
95
0.739872
true
true
1c2d7458d6d470582126afdc26881299806f1051
3,454
py
Python
forecasting.py
caegomezji/FORDAT
450dca5a9b0c059429421b773be3e7d54367fdcf
[ "MIT" ]
1
2021-08-28T22:42:11.000Z
2021-08-28T22:42:11.000Z
forecasting.py
caegomezji/FORDAT
450dca5a9b0c059429421b773be3e7d54367fdcf
[ "MIT" ]
null
null
null
forecasting.py
caegomezji/FORDAT
450dca5a9b0c059429421b773be3e7d54367fdcf
[ "MIT" ]
1
2021-08-14T00:58:54.000Z
2021-08-14T00:58:54.000Z
# ARIMA example from statsmodels.tsa.arima.model import ARIMA import numpy as np from statsmodels.tools.eval_measures import rmse import pmdarima as pm from fbprophet import Prophet from time import time import matplotlib.pyplot as plt import pandas as pd import math def BIC(y_real, y_model): n = len(y_real) k...
30.566372
95
0.631152
from statsmodels.tsa.arima.model import ARIMA import numpy as np from statsmodels.tools.eval_measures import rmse import pmdarima as pm from fbprophet import Prophet from time import time import matplotlib.pyplot as plt import pandas as pd import math def BIC(y_real, y_model): n = len(y_real) k = 2 resid ...
true
true
1c2d74c185631f60c1aead669312563eb156e198
1,883
py
Python
package/spack-probconsrna/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
1
2018-07-17T07:45:09.000Z
2018-07-17T07:45:09.000Z
package/spack-probconsrna/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
package/spack-probconsrna/package.py
ctuning/ck-spack
307934efce1be2d4f104251275c82fbc70127105
[ "BSD-3-Clause" ]
null
null
null
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
41.844444
78
0.669145
true
true
1c2d751d07cda34dd2dbbc3db31438df60aa5cd1
6,209
py
Python
tests/many_to_one_null/tests.py
geelweb/django
59afe61a970dd60df388e7cda9041ef3c0e770cb
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-10-21T02:20:06.000Z
2020-10-21T02:20:06.000Z
tests/many_to_one_null/tests.py
geelweb/django
59afe61a970dd60df388e7cda9041ef3c0e770cb
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-07-02T21:10:44.000Z
2020-07-02T21:11:21.000Z
tests/many_to_one_null/tests.py
geelweb/django
59afe61a970dd60df388e7cda9041ef3c0e770cb
[ "PSF-2.0", "BSD-3-Clause" ]
1
2020-08-11T18:46:32.000Z
2020-08-11T18:46:32.000Z
from __future__ import unicode_literals from django.test import TestCase from .models import Article, Car, Driver, Reporter class ManyToOneNullTests(TestCase): def setUp(self): # Create a Reporter. self.r = Reporter(name='John Smith') self.r.save() # Create an Article. se...
44.669065
109
0.645515
from __future__ import unicode_literals from django.test import TestCase from .models import Article, Car, Driver, Reporter class ManyToOneNullTests(TestCase): def setUp(self): self.r = Reporter(name='John Smith') self.r.save() self.a = Article(headline="First", reporte...
true
true
1c2d762e5e744e5c8b75430425321b19fcc833b9
247
py
Python
python/testData/inspections/PyUnboundLocalVariableInspection/OrPatternAlternativesDefineDifferentNames.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
python/testData/inspections/PyUnboundLocalVariableInspection/OrPatternAlternativesDefineDifferentNames.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
python/testData/inspections/PyUnboundLocalVariableInspection/OrPatternAlternativesDefineDifferentNames.py
06needhamt/intellij-community
63d7b8030e4fdefeb4760e511e289f7e6b3a5c5b
[ "Apache-2.0" ]
null
null
null
def func(x): match x: case [1, y] | [2, z]: print(<warning descr="Local variable 'y' might be referenced before assignment">y</warning>, <warning descr="Local variable 'z' might be referenced before assignment">z</warning>)
61.75
191
0.651822
def func(x): match x: case [1, y] | [2, z]: print(<warning descr="Local variable 'y' might be referenced before assignment">y</warning>, <warning descr="Local variable 'z' might be referenced before assignment">z</warning>)
false
true
1c2d775a3f9fcb6acb760af0a42a51e9c6b4dd17
5,227
py
Python
retweetcascade/rt_cascade_friendships.py
guglielmocola/RetweetCascade
f96319d0107473715104acceb2ff0925d35dd9e3
[ "MIT" ]
null
null
null
retweetcascade/rt_cascade_friendships.py
guglielmocola/RetweetCascade
f96319d0107473715104acceb2ff0925d35dd9e3
[ "MIT" ]
null
null
null
retweetcascade/rt_cascade_friendships.py
guglielmocola/RetweetCascade
f96319d0107473715104acceb2ff0925d35dd9e3
[ "MIT" ]
null
null
null
import pandas as pd from retweetcascade.utility_functions import __convert_to_pandas_list_tw, __explode_dict def rt_cascade_friendships(retweets, followers, friends, **kwargs): """Estimate the retweet cascade based on friendship among retweeters. A retweeter X is linked to the root R (original tweet's author)...
46.256637
111
0.712646
import pandas as pd from retweetcascade.utility_functions import __convert_to_pandas_list_tw, __explode_dict def rt_cascade_friendships(retweets, followers, friends, **kwargs): verbose = False if 'verbose' in kwargs: verbose = kwargs['verbose'] root_id = retweets[0]['retweeted_status']...
true
true
1c2d776b3b17a239f417bf3ed5c557c97f983b74
459
py
Python
src/playerMemory.py
koleberd/goaldependency
b4572758c405c90b33408497429531db82f5d22b
[ "FTL", "CNRI-Python", "CECILL-B", "AAL" ]
1
2018-01-10T21:41:27.000Z
2018-01-10T21:41:27.000Z
src/playerMemory.py
koleberd/goaldependency
b4572758c405c90b33408497429531db82f5d22b
[ "FTL", "CNRI-Python", "CECILL-B", "AAL" ]
null
null
null
src/playerMemory.py
koleberd/goaldependency
b4572758c405c90b33408497429531db82f5d22b
[ "FTL", "CNRI-Python", "CECILL-B", "AAL" ]
null
null
null
### #contains structures used to track the user's path, world snapshots, and things used for rollbacks as well as extra metrics. ### class PlayerMemory: def __init__(self,target=None): self.target = target self.metrics = {'distance traveled':0,'path':[]} self.prev_at = None self.cu...
30.6
124
0.668845
## class PlayerMemory: def __init__(self,target=None): self.target = target self.metrics = {'distance traveled':0,'path':[]} self.prev_at = None self.curr_at = None self.prev_at_parent = None self.prev_at_parent_parent = None self.prev_at_parent_parent_paren...
true
true
1c2d78c536fcf3aa392b79dcf9e8d2ce5bdd8790
2,552
py
Python
ps3api/memutils.py
iMoD1998/PS3API
ba64e6f5c1ed56746309d50c66c906c15045a254
[ "MIT" ]
8
2021-12-30T15:20:36.000Z
2022-03-27T12:22:23.000Z
ps3api/memutils.py
iMoD1998/PS3API
ba64e6f5c1ed56746309d50c66c906c15045a254
[ "MIT" ]
null
null
null
ps3api/memutils.py
iMoD1998/PS3API
ba64e6f5c1ed56746309d50c66c906c15045a254
[ "MIT" ]
null
null
null
import struct ''' Byte Conversions ''' PackInt8BE = struct.Struct('>B').pack PackInt16BE = struct.Struct('>H').pack PackInt32BE = struct.Struct('>L').pack PackInt64BE = struct.Struct('>Q').pack PackFloatBE = struct.Struct('>f').pack PackDoubleBE = struct.Struct('>d').pack UnpackInt8BE = struct.Struct('>B').un...
34.486486
126
0.744122
import struct PackInt8BE = struct.Struct('>B').pack PackInt16BE = struct.Struct('>H').pack PackInt32BE = struct.Struct('>L').pack PackInt64BE = struct.Struct('>Q').pack PackFloatBE = struct.Struct('>f').pack PackDoubleBE = struct.Struct('>d').pack UnpackInt8BE = struct.Struct('>B').unpack UnpackInt16BE = str...
true
true
1c2d7924a444c24c2db6abc56e45ac2e5724a4cd
11,136
py
Python
examples/legacy/seq2seq/seq2seq_trainer.py
dctelus/transformers
6786cbc4b14ebff0ac59c768cadd109391db9a08
[ "Apache-2.0" ]
1
2019-10-01T17:42:02.000Z
2019-10-01T17:42:02.000Z
examples/legacy/seq2seq/seq2seq_trainer.py
dctelus/transformers
6786cbc4b14ebff0ac59c768cadd109391db9a08
[ "Apache-2.0" ]
1
2022-03-23T19:49:13.000Z
2022-03-23T19:49:13.000Z
examples/legacy/seq2seq/seq2seq_trainer.py
dctelus/transformers
6786cbc4b14ebff0ac59c768cadd109391db9a08
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The HuggingFace Team. 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 applicabl...
42.996139
154
0.646911
from typing import Any, Dict, List, Optional, Tuple, Union import torch from torch import nn from torch.utils.data import DistributedSampler, RandomSampler from transformers import PreTrainedModel, Trainer, logging from transformers.integrations import is_fairscale_available from transformers.models.fsm...
true
true
1c2d796a09140eeb79105576d8d176108f33b282
398
py
Python
app/server/migrations/0010_document_priority.py
gong-io/doccano
f649ad39cb7795152253034a4937b0acdd377ee5
[ "MIT" ]
7
2019-05-20T18:41:25.000Z
2021-06-12T14:20:21.000Z
app/server/migrations/0010_document_priority.py
gong-io/doccano
f649ad39cb7795152253034a4937b0acdd377ee5
[ "MIT" ]
2
2019-02-26T18:55:30.000Z
2019-02-28T19:56:38.000Z
app/server/migrations/0010_document_priority.py
gong-io/doccano
f649ad39cb7795152253034a4937b0acdd377ee5
[ "MIT" ]
5
2019-05-30T15:56:29.000Z
2020-08-25T06:58:02.000Z
# Generated by Django 2.1.5 on 2019-03-01 20:55 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('server', '0009_project_use_machine_model_sort'), ] operations = [ migrations.AddField( model_name='document', name='...
20.947368
58
0.610553
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('server', '0009_project_use_machine_model_sort'), ] operations = [ migrations.AddField( model_name='document', name='priority', field=models.IntegerFiel...
true
true
1c2d7b1ff5a18e98fb6b0f6e6fb196d5e2f0e367
7,777
py
Python
doc/examples/2_seismics/plot_03_rays_layered_and_gradient_models.py
baender/gimli
eb9a2204669cf11209b9577472f61ac70217a191
[ "Apache-2.0" ]
224
2015-02-20T21:36:24.000Z
2022-03-30T07:27:43.000Z
doc/examples/2_seismics/plot_03_rays_layered_and_gradient_models.py
baender/gimli
eb9a2204669cf11209b9577472f61ac70217a191
[ "Apache-2.0" ]
341
2015-05-21T14:39:51.000Z
2022-03-31T01:54:07.000Z
doc/examples/2_seismics/plot_03_rays_layered_and_gradient_models.py
baender/gimli
eb9a2204669cf11209b9577472f61ac70217a191
[ "Apache-2.0" ]
107
2015-01-24T14:40:21.000Z
2022-02-25T12:12:13.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Raypaths in layered and gradient models ======================================= This example performs raytracing for a two-layer and a vertical gradient model and compares the resulting traveltimes to existing analytical solutions. An approximation of the raypath is fo...
36.341121
83
0.586087
from math import asin, tan import matplotlib.pyplot as plt import numpy as np import pygimli as pg import pygimli.meshtools as mt from pygimli.viewer.mpl import drawMesh from pygimli.physics import TravelTimeManager
true
true
1c2d7c15637ab69c0e6f2dd5b70dcc76319886ba
1,303
py
Python
osf_tests/test_reviewable.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
628
2015-01-15T04:33:22.000Z
2022-03-30T06:40:10.000Z
osf_tests/test_reviewable.py
gaybro8777/osf.io
30408511510a40bc393565817b343ef5fd76ab14
[ "Apache-2.0" ]
4,712
2015-01-02T01:41:53.000Z
2022-03-30T14:18:40.000Z
osf_tests/test_reviewable.py
Johnetordoff/osf.io
de10bf249c46cede04c78f7e6f7e352c69e6e6b5
[ "Apache-2.0" ]
371
2015-01-12T16:14:08.000Z
2022-03-31T18:58:29.000Z
import mock import pytest from osf.models import Preprint from osf.utils.workflows import DefaultStates from osf_tests.factories import PreprintFactory, AuthUserFactory @pytest.mark.django_db class TestReviewable: @mock.patch('website.identifiers.utils.request_identifiers') def test_state_changes(self, _): ...
38.323529
99
0.743668
import mock import pytest from osf.models import Preprint from osf.utils.workflows import DefaultStates from osf_tests.factories import PreprintFactory, AuthUserFactory @pytest.mark.django_db class TestReviewable: @mock.patch('website.identifiers.utils.request_identifiers') def test_state_changes(self, _): ...
true
true
1c2d7dbc7e352df0cd2a244450e5537e8a1ce9c5
7,229
py
Python
tools/run_tests/xds_k8s_test_driver/framework/infrastructure/gcp/network_security.py
echo80313/grpc
93cdc8b77e7b3fe4a3afec1c9c7e29b3f02ec3cf
[ "Apache-2.0" ]
null
null
null
tools/run_tests/xds_k8s_test_driver/framework/infrastructure/gcp/network_security.py
echo80313/grpc
93cdc8b77e7b3fe4a3afec1c9c7e29b3f02ec3cf
[ "Apache-2.0" ]
4
2022-02-27T18:59:37.000Z
2022-02-27T18:59:53.000Z
tools/run_tests/xds_k8s_test_driver/framework/infrastructure/gcp/network_security.py
echo80313/grpc
93cdc8b77e7b3fe4a3afec1c9c7e29b3f02ec3cf
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 gRPC 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 applicable law or agreed to in writing...
36.510101
94
0.669664
import abc import dataclasses import logging from typing import Any, Dict from google.rpc import code_pb2 import tenacity from framework.infrastructure import gcp logger = logging.getLogger(__name__) GcpResource = gcp.compute.ComputeV1.GcpResource @dataclasses.dataclass(frozen=True) class ServerTls...
true
true
1c2d7df8770200cff1fd47c54db9a07605cd4716
25,342
py
Python
libs/cherrypy/_cpdispatch.py
scambra/HTPC-Manager
1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d
[ "MIT" ]
674
2015-11-06T04:22:47.000Z
2022-02-26T17:31:43.000Z
libs/cherrypy/_cpdispatch.py
scambra/HTPC-Manager
1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d
[ "MIT" ]
713
2015-11-06T10:48:58.000Z
2018-11-27T16:32:18.000Z
libs/cherrypy/_cpdispatch.py
scambra/HTPC-Manager
1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d
[ "MIT" ]
115
2015-01-08T14:41:00.000Z
2022-02-13T12:31:17.000Z
"""CherryPy dispatchers. A 'dispatcher' is the object which looks up the 'page handler' callable and collects config for the current request based on the path_info, other request attributes, and the application architecture. The core calls the dispatcher as early as possible, passing it a 'path_info' argument. The de...
36.887918
82
0.603899
import string import sys import types try: classtype = (type, types.ClassType) except AttributeError: classtype = type import cherrypy from cherrypy._cpcompat import set class PageHandler(object): def __init__(self, callable, *args, **kwargs): self.callable = callable self.args = args ...
true
true
1c2d7f1488771765549ad48122870b4d39690ad8
8,999
py
Python
talos/tools/project.py
royl88/talos
7a803f3e9a3dcf1d16ed6e9cd798a7a401de8cb8
[ "Apache-2.0" ]
1
2021-05-08T09:00:35.000Z
2021-05-08T09:00:35.000Z
talos/tools/project.py
royl88/talos
7a803f3e9a3dcf1d16ed6e9cd798a7a401de8cb8
[ "Apache-2.0" ]
null
null
null
talos/tools/project.py
royl88/talos
7a803f3e9a3dcf1d16ed6e9cd798a7a401de8cb8
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 import os import os.path import platform import re import shutil import sys from mako.template import Template import six if six.PY2: reload(sys) if platform.system() == 'Linux': sys.setdefaultencoding('UTF-8') else: sys.setdefaultencoding('GBK') else: raw_input = inpu...
37.495833
111
0.670741
import os import os.path import platform import re import shutil import sys from mako.template import Template import six if six.PY2: reload(sys) if platform.system() == 'Linux': sys.setdefaultencoding('UTF-8') else: sys.setdefaultencoding('GBK') else: raw_input = input def mkdir(...
true
true
1c2d7fc265e46bbef8d4b3b094cfce762bc3d29a
872
py
Python
setup.py
Evgeneus/solo-learn
36782b829736d0216511f8d066631610b52e8663
[ "MIT" ]
null
null
null
setup.py
Evgeneus/solo-learn
36782b829736d0216511f8d066631610b52e8663
[ "MIT" ]
null
null
null
setup.py
Evgeneus/solo-learn
36782b829736d0216511f8d066631610b52e8663
[ "MIT" ]
null
null
null
from setuptools import find_packages, setup with open("requirements.txt") as f: requirements = [p.strip() for p in f.readlines()] KW = ["artificial intelligence", "deep learning", "unsupervised learning", "contrastive learning"] setup( name="solo", packages=find_packages(exclude=["bash_files"]), vers...
32.296296
98
0.676606
from setuptools import find_packages, setup with open("requirements.txt") as f: requirements = [p.strip() for p in f.readlines()] KW = ["artificial intelligence", "deep learning", "unsupervised learning", "contrastive learning"] setup( name="solo", packages=find_packages(exclude=["bash_files"]), vers...
true
true
1c2d8143e4ac5173be0ac5a9ed07de0c0e298b80
1,700
py
Python
experiments/sampleE/complete_inference.py
neptunes5thmoon/simpleference
96c74187bd3d83f6f1e910e72e56f45d6cc8d5d9
[ "MIT" ]
2
2019-10-13T12:10:00.000Z
2021-10-09T11:49:43.000Z
experiments/sampleE/complete_inference.py
neptunes5thmoon/simpleference
96c74187bd3d83f6f1e910e72e56f45d6cc8d5d9
[ "MIT" ]
null
null
null
experiments/sampleE/complete_inference.py
neptunes5thmoon/simpleference
96c74187bd3d83f6f1e910e72e56f45d6cc8d5d9
[ "MIT" ]
1
2018-05-08T14:10:59.000Z
2018-05-08T14:10:59.000Z
from __future__ import print_function import sys import os from concurrent.futures import ProcessPoolExecutor from subprocess import call from simpleference.inference.util import get_offset_lists sys.path.append('/groups/saalfeld/home/papec/Work/my_projects/z5/bld/python') import z5py def single_inference(gpu, itera...
32.075472
98
0.663529
from __future__ import print_function import sys import os from concurrent.futures import ProcessPoolExecutor from subprocess import call from simpleference.inference.util import get_offset_lists sys.path.append('/groups/saalfeld/home/papec/Work/my_projects/z5/bld/python') import z5py def single_inference(gpu, itera...
true
true
1c2d81675eee247acf8c0c5871d81e85a66bcfe2
31,548
py
Python
pyblp/configurations/integration.py
rebekahanne/pyblp
fe41991c5ec457bb5cfc1bf4d5788d18660a3de2
[ "MIT" ]
1
2021-01-25T01:25:45.000Z
2021-01-25T01:25:45.000Z
pyblp/configurations/integration.py
rebekahanne/pyblp
fe41991c5ec457bb5cfc1bf4d5788d18660a3de2
[ "MIT" ]
null
null
null
pyblp/configurations/integration.py
rebekahanne/pyblp
fe41991c5ec457bb5cfc1bf4d5788d18660a3de2
[ "MIT" ]
null
null
null
"""Construction of nodes and weights for integration.""" import functools import itertools from typing import Iterable, List, Optional, Tuple import numpy as np import scipy.special import scipy.stats from ..utilities.basics import Array, Options, StringRepresentation, format_options class Integration(StringRepres...
54.487047
119
0.66188
import functools import itertools from typing import Iterable, List, Optional, Tuple import numpy as np import scipy.special import scipy.stats from ..utilities.basics import Array, Options, StringRepresentation, format_options class Integration(StringRepresentation): _size: int _seed: Optional[int] _...
true
true
1c2d827baba29302aa7dd11c4233696b7db2ff29
1,549
py
Python
examples/pcrl_example.py
GuoJingyao/cornac
e7529990ec1dfa586c4af3de98e4b3e00a786578
[ "Apache-2.0" ]
null
null
null
examples/pcrl_example.py
GuoJingyao/cornac
e7529990ec1dfa586c4af3de98e4b3e00a786578
[ "Apache-2.0" ]
null
null
null
examples/pcrl_example.py
GuoJingyao/cornac
e7529990ec1dfa586c4af3de98e4b3e00a786578
[ "Apache-2.0" ]
null
null
null
""" Fit to and evaluate PCRL [1] on the Office Amazon dataset. [1] Salah, Aghiles, and Hady W. Lauw. Probabilistic Collaborative Representation Learning\ for Personalized Item Recommendation. In UAI 2018. @author: Aghiles Salah <asalah@smu.edu.sg> """ from cornac.data import GraphModule from cornac.eval_methods i...
30.372549
95
0.657844
from cornac.data import GraphModule from cornac.eval_methods import RatioSplit from cornac.experiment import Experiment from cornac import metrics from cornac.models import PCRL from cornac.datasets import amazon_office as office ratings = office.load_rating() contexts = office.load_context() item_graph_module = Gr...
true
true
1c2d8398405119af5984541e83c831bd2125df6b
3,948
py
Python
ax/modelbridge/transforms/centered_unit_x.py
Balandat/Ax
6c7556165291a5329744b5075d5f95d2dec18938
[ "MIT" ]
null
null
null
ax/modelbridge/transforms/centered_unit_x.py
Balandat/Ax
6c7556165291a5329744b5075d5f95d2dec18938
[ "MIT" ]
null
null
null
ax/modelbridge/transforms/centered_unit_x.py
Balandat/Ax
6c7556165291a5329744b5075d5f95d2dec18938
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import TYPE_CHECKING, Dict, List, Optional, Tuple from ax.core.observation import ObservationData, Observa...
44.359551
88
0.645897
from typing import TYPE_CHECKING, Dict, List, Optional, Tuple from ax.core.observation import ObservationData, ObservationFeatures from ax.core.parameter import ParameterType, RangeParameter from ax.core.search_space import SearchSpace from ax.core.types import TConfig from ax.modelbridge.transforms.base import ...
true
true