hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
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
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
a3153a767e4fae2ec5fa88a9d97f1d0ae0b5c7fe
2,657
bzl
Python
iree/lit_test.bzl
rsuderman/iree
fa5faf0a254db3311dafacc70c383a7469376095
[ "Apache-2.0" ]
1
2020-08-16T17:38:49.000Z
2020-08-16T17:38:49.000Z
iree/lit_test.bzl
rsuderman/iree
fa5faf0a254db3311dafacc70c383a7469376095
[ "Apache-2.0" ]
null
null
null
iree/lit_test.bzl
rsuderman/iree
fa5faf0a254db3311dafacc70c383a7469376095
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
32.012048
87
0.614603
9f1f13c5c0bde4da98520b7508fbb0851295a4a0
3,991
py
Python
pykeyvi/tests/dictionary/near_test.py
ssherko/keyvi
b8e57e6207244cc570e0d7d3970015aa1faf4254
[ "Apache-2.0" ]
null
null
null
pykeyvi/tests/dictionary/near_test.py
ssherko/keyvi
b8e57e6207244cc570e0d7d3970015aa1faf4254
[ "Apache-2.0" ]
null
null
null
pykeyvi/tests/dictionary/near_test.py
ssherko/keyvi
b8e57e6207244cc570e0d7d3970015aa1faf4254
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Usage: py.test tests import contextlib import os import pykeyvi import sys import os root = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(root, "../")) from test_tools import tmp_dictionary def test_near(): c=pykeyvi.JsonDictionaryCompiler() c.Add("zahna...
40.72449
98
0.59985
7c39bcc595854e43391b207e30ba90c61471a59a
55,582
py
Python
qiskit/visualization/matplotlib.py
errvnd/qiskit-terra
c9c6d46cae3e48f06f4513be9dc0de3a49128424
[ "Apache-2.0" ]
1
2021-10-13T14:37:54.000Z
2021-10-13T14:37:54.000Z
qiskit/visualization/matplotlib.py
errvnd/qiskit-terra
c9c6d46cae3e48f06f4513be9dc0de3a49128424
[ "Apache-2.0" ]
null
null
null
qiskit/visualization/matplotlib.py
errvnd/qiskit-terra
c9c6d46cae3e48f06f4513be9dc0de3a49128424
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # This code is part of Qiskit. # # (C) Copyright IBM 2017, 2018. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any...
38.305996
96
0.481469
f239e48af19b0b4c8b2d209d28288fe113f831c3
6,242
py
Python
pcraster/pcraster-4.2.0/pcraster-4.2.0/source/python_modelling_framework/UnitTests/mcFrameworkTest.py
quanpands/wflow
b454a55e4a63556eaac3fbabd97f8a0b80901e5a
[ "MIT" ]
null
null
null
pcraster/pcraster-4.2.0/pcraster-4.2.0/source/python_modelling_framework/UnitTests/mcFrameworkTest.py
quanpands/wflow
b454a55e4a63556eaac3fbabd97f8a0b80901e5a
[ "MIT" ]
null
null
null
pcraster/pcraster-4.2.0/pcraster-4.2.0/source/python_modelling_framework/UnitTests/mcFrameworkTest.py
quanpands/wflow
b454a55e4a63556eaac3fbabd97f8a0b80901e5a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import shutil import sys import unittest import pcraster import pcraster.framework.staticFramework as sf import pcraster.framework.dynamicFramework as df import pcraster.framework.mcFramework as mf import pcraster.framework.frameworkBase as fb import staticTestMod...
34.677778
128
0.698814
6142ae84f188a502365735bbc29a065066d34ba8
2,587
py
Python
nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py
sebastientourbier/nipype
99c5904176481520c5bf42a501aae1a12184e672
[ "Apache-2.0" ]
2
2019-01-25T18:20:51.000Z
2019-07-30T20:51:51.000Z
nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py
sebastientourbier/nipype
99c5904176481520c5bf42a501aae1a12184e672
[ "Apache-2.0" ]
null
null
null
nipype/interfaces/freesurfer/tests/test_auto_ApplyVolTransform.py
sebastientourbier/nipype
99c5904176481520c5bf42a501aae1a12184e672
[ "Apache-2.0" ]
2
2018-01-25T19:48:17.000Z
2019-01-25T18:20:52.000Z
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from __future__ import unicode_literals from ..preprocess import ApplyVolTransform def test_ApplyVolTransform_inputs(): input_map = dict(args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), fs_target=dict(argstr='--fstarg...
28.744444
78
0.624662
9bc9e03090bc77aea963849a08e0e19015ed4864
39,139
py
Python
cvpods/export/shared.py
lxtGH/BorderDet
ff425172a35a25e733d0facd79c2fd6f378052b0
[ "Apache-2.0" ]
null
null
null
cvpods/export/shared.py
lxtGH/BorderDet
ff425172a35a25e733d0facd79c2fd6f378052b0
[ "Apache-2.0" ]
null
null
null
cvpods/export/shared.py
lxtGH/BorderDet
ff425172a35a25e733d0facd79c2fd6f378052b0
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved import collections import contextlib import copy import functools import logging import mock import numpy as np import os from typing import Any, Callable, Dict, List, Optional, Tuple, Union import caffe2.python.utils as putils import torch import ...
36.888784
88
0.620966
b6707dd93b49b6d0e1205564f681e12cc5118345
1,532
py
Python
CodeArena/security.py
SaberSz/WeByte
3f88d572990b8342d2f28065fbb1d092449bf0ea
[ "MIT" ]
null
null
null
CodeArena/security.py
SaberSz/WeByte
3f88d572990b8342d2f28065fbb1d092449bf0ea
[ "MIT" ]
null
null
null
CodeArena/security.py
SaberSz/WeByte
3f88d572990b8342d2f28065fbb1d092449bf0ea
[ "MIT" ]
null
null
null
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from CodeArena import app, mail import re from flask_mail import Message ts = Serializer(app.config["SECRET_KEY"], 86400) def send_mail(email, subject, html): # token = ts.dumps({'user_id': email}).decode('utf-8') msg = Message(subject, ...
26.413793
140
0.574413
ec47c81206535d89cc5fb1443bd160b651c22ab0
2,573
py
Python
src/flaskz/utils/_response.py
taozh1982/flaskz
daf900027bd0bf83e19ba963c3d218072d0ebc1e
[ "MIT" ]
null
null
null
src/flaskz/utils/_response.py
taozh1982/flaskz
daf900027bd0bf83e19ba963c3d218072d0ebc1e
[ "MIT" ]
null
null
null
src/flaskz/utils/_response.py
taozh1982/flaskz
daf900027bd0bf83e19ba963c3d218072d0ebc1e
[ "MIT" ]
null
null
null
from flask import current_app from ._app import get_app_config __all__ = ['create_response', 'get_status_msg', 'ResponseManager'] def create_response(success, data, data_wrapped=False): """ Create the response json result. :param success: :param data: :param data_wrapped: :retur...
24.740385
100
0.620288
e6cffe0e3990a44d8d9029f334da45322a349d1c
26,927
py
Python
src/sage/rings/polynomial/flatten.py
Ivo-Maffei/DistanceRegular
d4dedd5c3e7da73111168fcce60d1f180fe24019
[ "BSL-1.0" ]
1
2020-05-19T22:34:03.000Z
2020-05-19T22:34:03.000Z
src/sage/rings/polynomial/flatten.py
Ivo-Maffei/DistanceRegular
d4dedd5c3e7da73111168fcce60d1f180fe24019
[ "BSL-1.0" ]
null
null
null
src/sage/rings/polynomial/flatten.py
Ivo-Maffei/DistanceRegular
d4dedd5c3e7da73111168fcce60d1f180fe24019
[ "BSL-1.0" ]
3
2020-03-29T17:13:36.000Z
2021-05-03T18:11:28.000Z
# -*- coding: utf-8 -*- r""" Class to flatten polynomial rings over polynomial ring For example ``QQ['a','b'],['x','y']`` flattens to ``QQ['a','b','x','y']``. EXAMPLES:: sage: R = QQ['x']['y']['s','t']['X'] sage: from sage.rings.polynomial.flatten import FlatteningMorphism sage: phi = FlatteningMorphism...
40.010401
179
0.556467
222e8c9ab0252751f658071380aa8b99e1d16b91
3,707
py
Python
ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HIVE/package/scripts/hive.py
zyclove/ambari
1032f0f54cb7b312b9a3b37570cd840f4e1e89d4
[ "Apache-2.0" ]
null
null
null
ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HIVE/package/scripts/hive.py
zyclove/ambari
1032f0f54cb7b312b9a3b37570cd840f4e1e89d4
[ "Apache-2.0" ]
null
null
null
ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HIVE/package/scripts/hive.py
zyclove/ambari
1032f0f54cb7b312b9a3b37570cd840f4e1e89d4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python2 """ 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"); yo...
29.895161
103
0.680874
6c1bd0ab62fdcea31c29b3e371f8324ec23eff69
1,631
py
Python
openquake.hazardlib/openquake/hazardlib/tests/gsim/fukushima_tanaka_1990_test.py
rainzhop/ConvNetQuake
a3e6de3f7992eac72f1b9883fec36b8c7fdefd48
[ "MIT" ]
null
null
null
openquake.hazardlib/openquake/hazardlib/tests/gsim/fukushima_tanaka_1990_test.py
rainzhop/ConvNetQuake
a3e6de3f7992eac72f1b9883fec36b8c7fdefd48
[ "MIT" ]
null
null
null
openquake.hazardlib/openquake/hazardlib/tests/gsim/fukushima_tanaka_1990_test.py
rainzhop/ConvNetQuake
a3e6de3f7992eac72f1b9883fec36b8c7fdefd48
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2013-2016 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
33.979167
74
0.729614
be8fea2350d5384086a66a475230b6cc337b8889
7,019
py
Python
src/config/vnc_openstack/vnc_openstack/tests/test_vnc_plugin_db.py
Mirantis/contrail-controller
6a8ce71bde9f30e14241027dc89fcd9ca6ac0673
[ "Apache-2.0" ]
3
2019-01-11T06:16:40.000Z
2021-02-24T23:48:21.000Z
src/config/vnc_openstack/vnc_openstack/tests/test_vnc_plugin_db.py
Mirantis/contrail-controller
6a8ce71bde9f30e14241027dc89fcd9ca6ac0673
[ "Apache-2.0" ]
null
null
null
src/config/vnc_openstack/vnc_openstack/tests/test_vnc_plugin_db.py
Mirantis/contrail-controller
6a8ce71bde9f30e14241027dc89fcd9ca6ac0673
[ "Apache-2.0" ]
2
2019-02-06T12:52:00.000Z
2019-04-11T23:19:28.000Z
import unittest import uuid from flexmock import flexmock import fake_neutron from vnc_openstack import neutron_plugin_db as db class MockDbInterface(db.DBInterface): def __init__(self): class MockConnection(object): def wait(self): return self._connected_to_api_server ...
38.994444
87
0.564895
4fb25145601df643b411f3f209217332d8839ac0
545
py
Python
code_all/day17/exercise02.py
testcg/python
4db4bd5d0e44af807d2df80cf8c8980b40cc03c4
[ "MIT" ]
null
null
null
code_all/day17/exercise02.py
testcg/python
4db4bd5d0e44af807d2df80cf8c8980b40cc03c4
[ "MIT" ]
null
null
null
code_all/day17/exercise02.py
testcg/python
4db4bd5d0e44af807d2df80cf8c8980b40cc03c4
[ "MIT" ]
null
null
null
""" 练习2. 定义函数,在列表中找出所有数字 [43,"悟空",True,56,"八戒",87.5,98] """ # 适用性 # 函数有一个结果使用return # 函数有多个结果使用yield def get_number1(list_number): result = [] for item in list_number: if type(item) in (int, float): result.append(item) return result def get_number2(list_number): for item ...
18.166667
45
0.609174
493f73ba9f6eb5c961d5c737636e858f26997227
73
py
Python
benchmarks/benchmarks/__init__.py
Ennosigaeon/scipy
2d872f7cf2098031b9be863ec25e366a550b229c
[ "BSD-3-Clause" ]
9,095
2015-01-02T18:24:23.000Z
2022-03-31T20:35:31.000Z
benchmarks/benchmarks/__init__.py
Ennosigaeon/scipy
2d872f7cf2098031b9be863ec25e366a550b229c
[ "BSD-3-Clause" ]
11,500
2015-01-01T01:15:30.000Z
2022-03-31T23:07:35.000Z
benchmarks/benchmarks/__init__.py
Ennosigaeon/scipy
2d872f7cf2098031b9be863ec25e366a550b229c
[ "BSD-3-Clause" ]
5,838
2015-01-05T11:56:42.000Z
2022-03-31T23:21:19.000Z
import numpy as np import random np.random.seed(1234) random.seed(1234)
12.166667
20
0.780822
a72573e54f44f9e83ac2254e225bfb3660686da5
967
py
Python
exercicios2/ex062j.py
LuanGermano/Mundo-2-Curso-em-Video-Python
8e860beb1d3b31f1c5ac369767d32b353935b8b0
[ "MIT" ]
null
null
null
exercicios2/ex062j.py
LuanGermano/Mundo-2-Curso-em-Video-Python
8e860beb1d3b31f1c5ac369767d32b353935b8b0
[ "MIT" ]
null
null
null
exercicios2/ex062j.py
LuanGermano/Mundo-2-Curso-em-Video-Python
8e860beb1d3b31f1c5ac369767d32b353935b8b0
[ "MIT" ]
null
null
null
termo = int(input('Digite o Termo da PA: ')) razao = int(input('Digite a razão: ')) ulti = int(input('Qual o termo da PA para ser mostrado: ')) # valor de entrada dos termos pra PA. while ulti != 0: resp = "n/a" while resp not in 'SsNn': # acontecimento pra resp errado resp = str(input('Vc gostaria de...
43.954545
167
0.563599
eae9f565ee9e731f72609a3c0a8ec66dc0792ab3
958
py
Python
src/RealmServer.py
Ekkoz/DofusProxy
00369a73dc30f613d900348cb013de377fad2c7f
[ "MIT" ]
null
null
null
src/RealmServer.py
Ekkoz/DofusProxy
00369a73dc30f613d900348cb013de377fad2c7f
[ "MIT" ]
null
null
null
src/RealmServer.py
Ekkoz/DofusProxy
00369a73dc30f613d900348cb013de377fad2c7f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import socket from src.RealmLocalClient import RealmLocalClient from src.Logger import Logger class RealmServer: def __init__(self): self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) ...
29.030303
79
0.587683
19550defe2e955d4f23de0292b622327edad4a30
211
py
Python
test/manualAreplTests/longStrings.py
manuth/LiveCode
4f55e4cf4bf1b230407caf29bd5b7cd263d292ea
[ "MIT" ]
203
2018-02-12T00:51:47.000Z
2022-03-14T17:28:26.000Z
test/manualAreplTests/longStrings.py
manuth/LiveCode
4f55e4cf4bf1b230407caf29bd5b7cd263d292ea
[ "MIT" ]
404
2018-01-17T03:50:36.000Z
2022-03-24T23:46:06.000Z
test/manualAreplTests/longStrings.py
manuth/LiveCode
4f55e4cf4bf1b230407caf29bd5b7cd263d292ea
[ "MIT" ]
21
2018-07-17T05:55:28.000Z
2022-02-21T08:25:45.000Z
x = "fe\nfa" y = "fafafafaf \nfafafa\nfaffafafafaffafafafaffafafafaffafafafaffafafafaffafafafaffafafafaf\nfafafafaffafafafaf" # first string should show \n # second string should only go multiline when expanded
42.2
112
0.834123
15a5980f8ba9ebdfa87313cfcab3932b365f2d48
1,497
py
Python
rlgym/utils/common_values.py
pizzalord22/rocket-league-gym
c07d237643fdb1264a04147fc9a556bcb786a816
[ "Apache-2.0" ]
63
2021-03-07T00:00:09.000Z
2022-03-27T16:11:26.000Z
rlgym_compat/common_values.py
VirxEC/rlgym-compat
db7b0a41492dcbb1aaa2dbfa5385dae3b9e10558
[ "Apache-2.0" ]
21
2021-03-12T16:02:30.000Z
2022-03-29T01:59:32.000Z
rlgym_compat/common_values.py
VirxEC/rlgym-compat
db7b0a41492dcbb1aaa2dbfa5385dae3b9e10558
[ "Apache-2.0" ]
23
2021-03-12T16:04:35.000Z
2022-03-28T15:49:24.000Z
SIDE_WALL_X = 4096 # +/- BACK_WALL_Y = 5120 # +/- CEILING_Z = 2044 BACK_NET_Y = 6000 # +/- GOAL_HEIGHT = 642.775 ORANGE_GOAL_CENTER = (0, BACK_WALL_Y, GOAL_HEIGHT / 2) BLUE_GOAL_CENTER = (0, -BACK_WALL_Y, GOAL_HEIGHT / 2) # Often more useful than center ORANGE_GOAL_BACK = (0, BACK_NET_Y, GOAL_HEIGHT / 2) BLUE_GOA...
24.145161
54
0.537742
5d1e5c990fed71e7555b03d4bd2c4a4c7425548e
5,345
py
Python
test/test_package_identification_python.py
esteve/colcon-core
c11ce9cb27482dac85f05b50b3cd2c1b459ae6b3
[ "Apache-2.0" ]
null
null
null
test/test_package_identification_python.py
esteve/colcon-core
c11ce9cb27482dac85f05b50b3cd2c1b459ae6b3
[ "Apache-2.0" ]
13
2020-04-02T21:11:56.000Z
2022-01-27T05:47:30.000Z
test/test_package_identification_python.py
esteve/colcon-core
c11ce9cb27482dac85f05b50b3cd2c1b459ae6b3
[ "Apache-2.0" ]
null
null
null
# Copyright 2016-2018 Dirk Thomas # Licensed under the Apache License, Version 2.0 from pathlib import Path from tempfile import TemporaryDirectory from colcon_core.package_augmentation.python \ import create_dependency_descriptor from colcon_core.package_augmentation.python \ import PythonPackageAugmentation...
35.633333
79
0.635547
2ea6de1cec12fec6e7a6e31bcc5825edb87dbe64
7,174
py
Python
raisimGym/helper/env_helper.py
Pala-hmd/drl_mi_quadcopter
62836ebd78ec4df7af2309f0a8457023dd78daa0
[ "BSD-3-Clause-Clear" ]
null
null
null
raisimGym/helper/env_helper.py
Pala-hmd/drl_mi_quadcopter
62836ebd78ec4df7af2309f0a8457023dd78daa0
[ "BSD-3-Clause-Clear" ]
null
null
null
raisimGym/helper/env_helper.py
Pala-hmd/drl_mi_quadcopter
62836ebd78ec4df7af2309f0a8457023dd78daa0
[ "BSD-3-Clause-Clear" ]
null
null
null
import torch import numpy as np import os import ntpath from shutil import copyfile from raisimGymTorch.env.RaisimGymVecEnv import RunningMeanStd class helper: def __init__(self, env, num_obs, normalize_ob=True, update_mean=True, scale_action=True, clip_action=False, scale_obs_rms=False): ...
48.802721
134
0.627265
d61076db57af678bdbcb76125eb263995408f600
2,947
py
Python
PrePorcessor/Preprocessor.py
Skyho1d/covid
f21b0c30be1144f667e69d582f968abe6b4e360f
[ "Apache-2.0" ]
12
2020-03-23T18:26:45.000Z
2021-03-19T08:40:57.000Z
PrePorcessor/Preprocessor.py
Skyho1d/covid
f21b0c30be1144f667e69d582f968abe6b4e360f
[ "Apache-2.0" ]
2
2021-05-21T16:18:56.000Z
2022-02-10T01:16:50.000Z
PrePorcessor/Preprocessor.py
Skyho1d/covid
f21b0c30be1144f667e69d582f968abe6b4e360f
[ "Apache-2.0" ]
3
2020-03-24T13:23:57.000Z
2020-04-07T12:18:59.000Z
import cv2 import numpy as np class SimplePreprocessor: def __init__(self, width, height, inter=cv2.INTER_AREA): self.width = width self.height = height self.inter = inter def preprocess(self, input_image): try: # if in train time with 100 epoch and size 50 get bad...
39.824324
151
0.519172
b98b76b89b983f67fd15ae383803f47a76dcc15a
2,219
py
Python
tests/integration_tests/data_steward/utils/sandbox_test.py
lrwb-aou/curation
e80447e56d269dc2c9c8bc79e78218d4b0dc504c
[ "MIT" ]
16
2017-06-30T20:05:05.000Z
2022-03-08T21:03:19.000Z
tests/integration_tests/data_steward/utils/sandbox_test.py
lrwb-aou/curation
e80447e56d269dc2c9c8bc79e78218d4b0dc504c
[ "MIT" ]
342
2017-06-23T21:37:40.000Z
2022-03-30T16:44:16.000Z
tests/integration_tests/data_steward/utils/sandbox_test.py
lrwb-aou/curation
e80447e56d269dc2c9c8bc79e78218d4b0dc504c
[ "MIT" ]
33
2017-07-01T00:12:20.000Z
2022-01-26T18:06:53.000Z
# Python imports import os import unittest import app_identity # Project Imports from utils import sandbox from utils.bq import get_client class SandboxTest(unittest.TestCase): @classmethod def setUpClass(cls): print('**************************************************************') print(cls...
38.258621
80
0.621902
e721be15faf05bd74e4b3ab092e7c5295fc04a4f
10,070
py
Python
src/oci/opsi/models/summarize_host_insight_resource_statistics_aggregation_collection.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/opsi/models/summarize_host_insight_resource_statistics_aggregation_collection.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/opsi/models/summarize_host_insight_resource_statistics_aggregation_collection.py
Manny27nyc/oci-python-sdk
de60b04e07a99826254f7255e992f41772902df7
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
42.133891
245
0.719762
327a50741387f3a31cef74d7811b9450a135ab2d
253
py
Python
benefactor_challenge/benefactor_challenge/doctype/company/company.py
IRANKUND/Benefactor-challenge
78c364fcd9e776f50319e2de4eaf269d64a6508f
[ "MIT" ]
null
null
null
benefactor_challenge/benefactor_challenge/doctype/company/company.py
IRANKUND/Benefactor-challenge
78c364fcd9e776f50319e2de4eaf269d64a6508f
[ "MIT" ]
null
null
null
benefactor_challenge/benefactor_challenge/doctype/company/company.py
IRANKUND/Benefactor-challenge
78c364fcd9e776f50319e2de4eaf269d64a6508f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2021, patrick and contributors # For license information, please see license.txt from __future__ import unicode_literals # import frappe from frappe.model.document import Document class company(Document): pass
23
49
0.770751
5b58bb9c22522b79d92f3dde69f41f830a00ff52
100
py
Python
Django_UCSD/Registration/apps.py
yotohoshi/UCSDweb_design
eb6e9b61b78b33456c083bb3cb910b00fd527665
[ "MIT" ]
null
null
null
Django_UCSD/Registration/apps.py
yotohoshi/UCSDweb_design
eb6e9b61b78b33456c083bb3cb910b00fd527665
[ "MIT" ]
null
null
null
Django_UCSD/Registration/apps.py
yotohoshi/UCSDweb_design
eb6e9b61b78b33456c083bb3cb910b00fd527665
[ "MIT" ]
null
null
null
from django.apps import AppConfig class RegistrationConfig(AppConfig): name = 'Registration'
14.285714
36
0.77
179a869460810b07be8b67bc8f5f0c55b7cd87ba
1,859
py
Python
ch10/1003_replace_nested_conditional_with_guard_clauses.py
twotwo/refactoring-python
d329601b963c80bf1c16cd36b39048cbed3e2e06
[ "MIT" ]
null
null
null
ch10/1003_replace_nested_conditional_with_guard_clauses.py
twotwo/refactoring-python
d329601b963c80bf1c16cd36b39048cbed3e2e06
[ "MIT" ]
null
null
null
ch10/1003_replace_nested_conditional_with_guard_clauses.py
twotwo/refactoring-python
d329601b963c80bf1c16cd36b39048cbed3e2e06
[ "MIT" ]
null
null
null
""" 1003_replace_nested_conditional_with_guard_clauses.py 范例 将条件反转 我们常常可以将条件表达式反转,从而实现以卫语句取代嵌套条件表达式 """ from dataclasses import dataclass @dataclass class Instrument: capital: int income: int duration: int interest_rate: float adjustment_factor: float def adjusted_capital(instrument): resu...
29.983871
106
0.723507
f8e0e7d8c1df0d0f8d57a2f6a72a793547108e5c
9,250
py
Python
utils/rule_dir_stats.py
deperrone/content
caaff27f01a1d6c15da461f9fafe26090e8fdd18
[ "BSD-3-Clause" ]
1,138
2018-09-05T06:31:44.000Z
2022-03-31T03:38:24.000Z
utils/rule_dir_stats.py
deperrone/content
caaff27f01a1d6c15da461f9fafe26090e8fdd18
[ "BSD-3-Clause" ]
4,743
2018-09-04T15:14:04.000Z
2022-03-31T23:17:57.000Z
utils/rule_dir_stats.py
deperrone/content
caaff27f01a1d6c15da461f9fafe26090e8fdd18
[ "BSD-3-Clause" ]
400
2018-09-08T20:08:49.000Z
2022-03-30T20:54:32.000Z
#!/usr/bin/env python from __future__ import print_function import argparse import os import sys import json import pprint import ssg.build_yaml import ssg.build_remediations import ssg.products import ssg.rule_dir_stats as rds import ssg.rules import ssg.yaml SSG_ROOT = os.path.abspath(os.path.join(os.path.dirna...
38.381743
146
0.672757
8c0e9505cc0cfa2d29f4ef967d8337efddcb2383
8,154
py
Python
src/custom_oauth.py
EOEPCA/um-user-profile
790487a50fc7d3bca70c2444a6b3b1567574812c
[ "Apache-2.0" ]
1
2020-06-30T14:46:36.000Z
2020-06-30T14:46:36.000Z
src/custom_oauth.py
EOEPCA/um-user-profile
790487a50fc7d3bca70c2444a6b3b1567574812c
[ "Apache-2.0" ]
2
2022-02-28T16:32:44.000Z
2022-03-08T10:16:12.000Z
src/custom_oauth.py
EOEPCA/um-user-profile
790487a50fc7d3bca70c2444a6b3b1567574812c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 import requests import base64 import json from eoepca_scim import * import logging import WellKnownHandler as wkh from base64 import b64encode import generic from jwkest.jws import JWS from jwkest.jwk import SYMKey, KEYS from jwkest.jwk import RSAKey, import_rsa_key_from_file, load_jwks_from_url, imp...
44.075676
183
0.636988
5e33179e1ee8472c9d87f0b0be89a0da6157ac06
202
py
Python
Chapter16/parse_web_page.py
add54/ADMIN_SYS_PYTHON
5a6d9705537c8663c8f7b0f45d29ccc87b6096e7
[ "MIT" ]
116
2018-12-21T01:05:47.000Z
2022-03-23T21:41:41.000Z
Chapter16/parse_web_page.py
add54/ADMIN_SYS_PYTHON
5a6d9705537c8663c8f7b0f45d29ccc87b6096e7
[ "MIT" ]
2
2021-03-31T19:36:19.000Z
2021-06-10T22:29:26.000Z
Chapter16/parse_web_page.py
add54/ADMIN_SYS_PYTHON
5a6d9705537c8663c8f7b0f45d29ccc87b6096e7
[ "MIT" ]
147
2018-12-19T14:10:32.000Z
2022-03-20T11:03:20.000Z
import requests from bs4 import BeautifulSoup page_result = requests.get('https://www.imdb.com/news/top?ref_=nv_nw_tp') parse_obj = BeautifulSoup(page_result.content, 'html.parser') print(parse_obj)
22.444444
73
0.792079
0b3247284309293fb1ec2674ecea0cacc053bce8
1,648
py
Python
etabotsite/etabotapp/TMSlib/Atlassian_API.py
aradnaev/pmp
2043c61d3b8bd21e49b5b07a4aa85d833d9531e8
[ "Apache-2.0" ]
3
2018-07-05T00:04:59.000Z
2021-03-08T03:04:44.000Z
etabotsite/etabotapp/TMSlib/Atlassian_API.py
aradnaev/pmp
2043c61d3b8bd21e49b5b07a4aa85d833d9531e8
[ "Apache-2.0" ]
20
2020-01-25T03:58:30.000Z
2022-03-02T01:05:52.000Z
etabotsite/etabotapp/TMSlib/Atlassian_API.py
aradnaev/pmp
2043c61d3b8bd21e49b5b07a4aa85d833d9531e8
[ "Apache-2.0" ]
4
2020-04-08T00:00:49.000Z
2021-03-08T03:24:04.000Z
"""Atlassian API helper functions.""" import requests ATLASSIAN_CLOUD_BASE = "https://api.atlassian.com/" ATLASSIAN_CLOUD_PROFILE = ATLASSIAN_CLOUD_BASE + "me" class AtlassianAPI: def __init__(self, token): self.token = token self.accessible_resources_api = \ "https://api.atlassian....
37.454545
261
0.615898
d58572d41159dac6085595d61d9686ef1499e0ac
3,780
py
Python
manga_py/info.py
theincognito-inc/manga-dl
899905bafb6c6891815b58cce41eaff32a682570
[ "MIT" ]
1
2020-11-19T00:40:49.000Z
2020-11-19T00:40:49.000Z
manga_py/info.py
eduhoribe/manga-py
fe7eb2e08532b3c75b4f7ac8cc4132f0e7a65eb4
[ "MIT" ]
null
null
null
manga_py/info.py
eduhoribe/manga-py
fe7eb2e08532b3c75b4f7ac8cc4132f0e7a65eb4
[ "MIT" ]
null
null
null
from argparse import Namespace from datetime import datetime from sys import argv from typing import Union from manga_py import meta class Info: __doc__ = """ --print-json argument helper { 'site': 'https://example.org/kumo-desu-ga-nani-ka', 'downloader': [ 'https://manga...
30
86
0.504497
5409225d71dd1fbf8c41038ff40017a37f3e3829
849
py
Python
api/migrations/0002_auto_20170528_0513.py
sai29/friendster
f89bb0c27a29b7fc35c3c3746ccb2a51fabe2286
[ "MIT" ]
null
null
null
api/migrations/0002_auto_20170528_0513.py
sai29/friendster
f89bb0c27a29b7fc35c3c3746ccb2a51fabe2286
[ "MIT" ]
null
null
null
api/migrations/0002_auto_20170528_0513.py
sai29/friendster
f89bb0c27a29b7fc35c3c3746ccb2a51fabe2286
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-05-28 05:13 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('api', '0001_initial'), ...
30.321429
135
0.665489
7c5526a277bd1072974067fd8a3778cf68f355ac
1,119
py
Python
server/djangoapp/urls.py
mrmicrosoft/agfzb-CloudAppDevelopment_Capstone
2b0de5544284e139ccbc4a9448333a47a373012b
[ "Apache-2.0" ]
null
null
null
server/djangoapp/urls.py
mrmicrosoft/agfzb-CloudAppDevelopment_Capstone
2b0de5544284e139ccbc4a9448333a47a373012b
[ "Apache-2.0" ]
null
null
null
server/djangoapp/urls.py
mrmicrosoft/agfzb-CloudAppDevelopment_Capstone
2b0de5544284e139ccbc4a9448333a47a373012b
[ "Apache-2.0" ]
null
null
null
from django.urls import path from django.conf.urls.static import static from django.conf import settings from . import views app_name = 'djangoapp' urlpatterns = [ # route is a string contains a URL pattern # view refers to the view function # name the URL # path for about view path(route='about/'...
31.083333
85
0.696157
5a496b32d0e4868e4154248907bba47b02fc5ce6
8,281
py
Python
HuggingFace-TSE/model.py
ywu94/Code-Notes
8c4e9cbfe86163d39608ddce63e550e0e9797a8e
[ "MIT" ]
2
2020-09-11T10:40:43.000Z
2020-10-08T04:02:26.000Z
HuggingFace-TSE/model.py
ywu94/Code-Notes
8c4e9cbfe86163d39608ddce63e550e0e9797a8e
[ "MIT" ]
null
null
null
HuggingFace-TSE/model.py
ywu94/Code-Notes
8c4e9cbfe86163d39608ddce63e550e0e9797a8e
[ "MIT" ]
null
null
null
import os import re import pickle import argparse from collections import namedtuple import numpy as np import torch from torch import nn import torch.nn.functional as F import transformers from transformers import BertModel, BertConfig import pytorch_lightning as pl from pytorch_lightning.callbacks import ModelCh...
37.640909
134
0.739162
7789071087f5b7eb8939df0561a5923c41565fb6
2,933
py
Python
backend/api/controller/user/add.py
Vedant1202/sepsis
ed73d897192e561d1742109e642af72f6f26cfdf
[ "MIT" ]
null
null
null
backend/api/controller/user/add.py
Vedant1202/sepsis
ed73d897192e561d1742109e642af72f6f26cfdf
[ "MIT" ]
2
2020-01-28T23:16:01.000Z
2020-09-26T00:36:53.000Z
backend/api/controller/user/add.py
Vedant1202/sepsis
ed73d897192e561d1742109e642af72f6f26cfdf
[ "MIT" ]
null
null
null
# import pymysql from app import app from db import mysql import json from flask import jsonify from flask import flash, request from werkzeug.security import generate_password_hash, check_password_hash from flask_cors import CORS import time from utils.utils import not_found, create_session, calculate_age from utils.u...
43.776119
223
0.638595
5940d83d11f0b5c764f8c71360c8ec2217c61215
1,299
py
Python
setup.py
milonoir/yaml_rulz
ee8e3f4d2892aa636832970dddc044d0ca86c691
[ "MIT" ]
1
2017-07-14T16:43:10.000Z
2017-07-14T16:43:10.000Z
setup.py
milonoir/yaml_rulz
ee8e3f4d2892aa636832970dddc044d0ca86c691
[ "MIT" ]
4
2016-09-13T15:14:51.000Z
2017-05-22T10:57:20.000Z
setup.py
milonoir/yaml_rulz
ee8e3f4d2892aa636832970dddc044d0ca86c691
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from setuptools import setup setup( name="yaml_rulz", version="0.0.1", description="A YAML validator", license="MIT", author="Milan Boleradszki", author_email="bmilan1985@gmail.com", maintainer="Milan Boleradszki", maintainer_email="bmilan1985@gmail.com", u...
30.928571
56
0.582756
33688a71047f4c9d50f5025064846e0ee5d3648e
1,248
py
Python
jax/scipy/stats/expon.py
ecreager/jax
948def817fd7cc2ee7a988b5142401a580b1bbd3
[ "ECL-2.0", "Apache-2.0" ]
2
2021-06-13T20:51:49.000Z
2021-06-14T02:37:06.000Z
jax/scipy/stats/expon.py
ecreager/jax
948def817fd7cc2ee7a988b5142401a580b1bbd3
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
jax/scipy/stats/expon.py
ecreager/jax
948def817fd7cc2ee7a988b5142401a580b1bbd3
[ "ECL-2.0", "Apache-2.0" ]
1
2019-03-14T10:07:22.000Z
2019-03-14T10:07:22.000Z
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.72973
75
0.754808
875502dc3c94c25d89245ccb6fb17b332d505c04
4,147
py
Python
PythonCodes/ParallExtraction/ExtractPlanarTimeProfileData.py
Nicolucas/C-Scripts
2608df5c2e635ad16f422877ff440af69f98f960
[ "MIT" ]
null
null
null
PythonCodes/ParallExtraction/ExtractPlanarTimeProfileData.py
Nicolucas/C-Scripts
2608df5c2e635ad16f422877ff440af69f98f960
[ "MIT" ]
null
null
null
PythonCodes/ParallExtraction/ExtractPlanarTimeProfileData.py
Nicolucas/C-Scripts
2608df5c2e635ad16f422877ff440af69f98f960
[ "MIT" ]
null
null
null
import os, time, sys import numpy as np from scipy.interpolate import RectBivariateSpline import multiprocessing as mp sys.path.insert(0,"/import/freenas-m-03-geodynamics/jhayek/petsc-3.12.5/lib/petsc/bin/") sys.path.insert(0,"/import/freenas-m-03-geodynamics/jhayek/TEAR/se2wave/utils/python") sys.path.insert(0,"/impo...
43.197917
173
0.729684
63edbc5bd31d84cd2460550e259f1f92174e1406
4,636
py
Python
resources/lib/addon.py
dagwieers/plugin.video.fosdem
d2f7758159eb040b85dd4dccac009f10f519ca28
[ "MIT" ]
null
null
null
resources/lib/addon.py
dagwieers/plugin.video.fosdem
d2f7758159eb040b85dd4dccac009f10f519ca28
[ "MIT" ]
null
null
null
resources/lib/addon.py
dagwieers/plugin.video.fosdem
d2f7758159eb040b85dd4dccac009f10f519ca28
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, unicode_literals from datetime import datetime, timedelta import routing from xbmcgui import Dialog, ListItem from xbmcplugin import addDirectoryItem, endOfDirectory, getSetting, setContent, setResolvedUrl from fosdem import fetch_xml, contain...
31.324324
121
0.599439
5c67fe8590f9b572f4ddf87ff786be8ef2f7947e
5,583
py
Python
main.py
dasfreak/npm-most-dependend-upon
bf08308209f91d7f99aa9ee39f19a9ea4d2bb017
[ "MIT" ]
null
null
null
main.py
dasfreak/npm-most-dependend-upon
bf08308209f91d7f99aa9ee39f19a9ea4d2bb017
[ "MIT" ]
null
null
null
main.py
dasfreak/npm-most-dependend-upon
bf08308209f91d7f99aa9ee39f19a9ea4d2bb017
[ "MIT" ]
1
2021-10-11T05:37:08.000Z
2021-10-11T05:37:08.000Z
import json import logging import argparse import asciitree parser = argparse.ArgumentParser( description='Calculate the most-depended upon packages on npm.', formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--loglevel', choices=['DEBUG', 'INFO', 'WARNING', 'ERR...
35.113208
131
0.626545
e8ad09050a796be7b85d8f5675f71c5906b20b59
2,213
py
Python
DecisionTree.py
denizgurzihin/Decision_Tree
7be1697a36113f44164b6d26701f85ab175738b9
[ "MIT" ]
null
null
null
DecisionTree.py
denizgurzihin/Decision_Tree
7be1697a36113f44164b6d26701f85ab175738b9
[ "MIT" ]
null
null
null
DecisionTree.py
denizgurzihin/Decision_Tree
7be1697a36113f44164b6d26701f85ab175738b9
[ "MIT" ]
null
null
null
import pandas as pd from sklearn.tree import DecisionTreeClassifier # Import Decision Tree Classifier from sklearn.model_selection import train_test_split # Import train_test_split function from sklearn.metrics import * from time import time col_names = ['att1', 'att2', 'att3', 'att4', 'att5', 'att6', 'att7', 'att8', ...
40.981481
155
0.724356
67579fa4053d78e49a909fd2e7dd83d67942a610
162
py
Python
Python_Programing_Excercise/Day_1/Anagram_string.py
Ena-Sharma/Meraki_Solution
1bfff62f6aeb69354712d0b5a9e46ddacff357f5
[ "MIT" ]
null
null
null
Python_Programing_Excercise/Day_1/Anagram_string.py
Ena-Sharma/Meraki_Solution
1bfff62f6aeb69354712d0b5a9e46ddacff357f5
[ "MIT" ]
null
null
null
Python_Programing_Excercise/Day_1/Anagram_string.py
Ena-Sharma/Meraki_Solution
1bfff62f6aeb69354712d0b5a9e46ddacff357f5
[ "MIT" ]
null
null
null
''' Apko koi 2 words input me milenge apke program me apko yeh batana ha ki dono Anagram hai ya nhi Eg: Input-1: pears Input-1: spear Output: Nhi hai '''
16.2
95
0.691358
c6e77a460575a94cd0666bcb6b839ae22b1994f7
1,613
py
Python
Other/tm1 rest api stress test.py
DJHig/TM1py-samples
da4050380447472a02e2a107a2c5be79ac284d0a
[ "MIT" ]
1
2019-05-30T10:10:20.000Z
2019-05-30T10:10:20.000Z
Other/tm1 rest api stress test.py
DJHig/TM1py-samples
da4050380447472a02e2a107a2c5be79ac284d0a
[ "MIT" ]
null
null
null
Other/tm1 rest api stress test.py
DJHig/TM1py-samples
da4050380447472a02e2a107a2c5be79ac284d0a
[ "MIT" ]
1
2017-09-01T03:35:18.000Z
2017-09-01T03:35:18.000Z
""" Do REST API operations in parallel. Can be handy when troubleshooting REST API bugs. """ import configparser config = configparser.ConfigParser() config.read('..\config.ini') import asyncio cube = "General Ledger" view = "Default" from TM1py.Services import TM1Service # define functions def get_server_name(tm1)...
31.019231
104
0.704278
65e93ac8ca514e52a29ee9ad5eb8cb5c21ce92b4
15,372
py
Python
tests/util/test_short_client_token.py
NYPL-Simplified/library-registry
adf1d24872459fd21f8e41f22c22a56a4558b6aa
[ "Apache-2.0" ]
null
null
null
tests/util/test_short_client_token.py
NYPL-Simplified/library-registry
adf1d24872459fd21f8e41f22c22a56a4558b6aa
[ "Apache-2.0" ]
null
null
null
tests/util/test_short_client_token.py
NYPL-Simplified/library-registry
adf1d24872459fd21f8e41f22c22a56a4558b6aa
[ "Apache-2.0" ]
null
null
null
from datetime import datetime, timedelta import pytest from library_registry.util.short_client_token import ( ShortClientTokenDecoder, ShortClientTokenEncoder, ShortClientTokenTool, ) from library_registry.model import DelegatedPatronIdentifier TEST_NODE_VALUE = 114740953091845 SCT_TESTLIB_SHORT_NAME = '...
48.188088
120
0.674668
e94f73239f13af66f4ed628974b1683cbaac2c1c
13,006
py
Python
tests/components/doorbird/test_config_flow.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
6
2017-08-02T19:26:39.000Z
2020-03-14T22:47:41.000Z
tests/components/doorbird/test_config_flow.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
58
2020-08-03T07:33:02.000Z
2022-03-31T06:02:05.000Z
tests/components/doorbird/test_config_flow.py
tbarbette/core
8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c
[ "Apache-2.0" ]
14
2018-08-19T16:28:26.000Z
2021-09-02T18:26:53.000Z
"""Test the DoorBird config flow.""" from unittest.mock import MagicMock, patch import urllib from homeassistant import config_entries, data_entry_flow, setup from homeassistant.components.doorbird import CONF_CUSTOM_URL, CONF_TOKEN from homeassistant.components.doorbird.const import CONF_EVENTS, DOMAIN from homeassis...
35.438692
87
0.664924
797c93a728304d926ba6e3a81a8ab8956466548f
1,551
py
Python
tests/test_fast_bernoulli.py
altosaar/deep-exponential-families-gluon
80d69b54081f622c0012bb181aa6d8ab9a740f15
[ "MIT" ]
19
2017-10-17T01:04:23.000Z
2021-11-14T20:50:56.000Z
tests/test_fast_bernoulli.py
afcarl/deep-exponential-families-gluon
80d69b54081f622c0012bb181aa6d8ab9a740f15
[ "MIT" ]
null
null
null
tests/test_fast_bernoulli.py
afcarl/deep-exponential-families-gluon
80d69b54081f622c0012bb181aa6d8ab9a740f15
[ "MIT" ]
1
2018-07-05T21:17:34.000Z
2018-07-05T21:17:34.000Z
import numpy as np import time import distributions import scipy.stats import scipy.special import mxnet as mx from mxnet import nd mx.random.seed(13343) np.random.seed(2324) def test_bernoulli_sampling(): n_samples = 10000 K = 10 # num factors C = 2 # num classes # latent variable is of size [n_samples, ...
32.3125
77
0.702772
bbeb677e5f2be509ccaaf2043fc03e2b85b88762
9,579
py
Python
docs/source/conf.py
spidezad/google_screener_data_extract
8efe14e73918808182d8745ef38c38f1ac686f6e
[ "BSD-3-Clause" ]
28
2015-09-27T21:11:23.000Z
2021-05-17T06:33:20.000Z
docs/source/conf.py
spidezad/google_screener_data_extract
8efe14e73918808182d8745ef38c38f1ac686f6e
[ "BSD-3-Clause" ]
1
2015-10-18T23:11:03.000Z
2018-03-27T05:58:10.000Z
docs/source/conf.py
spidezad/google_screener_data_extract
8efe14e73918808182d8745ef38c38f1ac686f6e
[ "BSD-3-Clause" ]
24
2016-01-14T09:53:48.000Z
2018-05-17T02:00:56.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # google_screener_data_extract documentation build configuration file, created by # cookiecutter pipproject # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # auto...
33.031034
98
0.723875
21250894db6b98dd1265573165d5299f694f5633
2,123
py
Python
clinica/pipelines/t1_freesurfer_longitudinal/t1_freesurfer_template_cli.py
Chengwei94/clinica
0e9d837baf9064a626198422b2a70fe120f227f0
[ "MIT" ]
null
null
null
clinica/pipelines/t1_freesurfer_longitudinal/t1_freesurfer_template_cli.py
Chengwei94/clinica
0e9d837baf9064a626198422b2a70fe120f227f0
[ "MIT" ]
null
null
null
clinica/pipelines/t1_freesurfer_longitudinal/t1_freesurfer_template_cli.py
Chengwei94/clinica
0e9d837baf9064a626198422b2a70fe120f227f0
[ "MIT" ]
null
null
null
# coding: utf8 import clinica.engine as ce class T1FreeSurferTemplateCLI(ce.CmdParser): def define_name(self): """Define the sub-command name to run this pipeline.""" self._name = "t1-freesurfer-template" def define_description(self): """Define a description of this pipeline.""" ...
36.603448
111
0.663212
76841d0854cc0bf4fac1998414c9cecf0d563966
70
py
Python
src/rpi_ati_net_ft/__init__.py
rpiRobotics/rpi_ati_net_ft
fdf202d5c2d66dff4ef92f7ed6eb6a9f3121d911
[ "BSD-3-Clause" ]
4
2018-05-25T13:07:06.000Z
2022-01-05T21:26:55.000Z
src/rpi_ati_net_ft/__init__.py
rpiRobotics/rpi_ati_net_ft
fdf202d5c2d66dff4ef92f7ed6eb6a9f3121d911
[ "BSD-3-Clause" ]
1
2018-01-08T23:44:17.000Z
2018-01-08T23:44:17.000Z
src/rpi_ati_net_ft/__init__.py
rpiRobotics/rpi_ati_net_ft
fdf202d5c2d66dff4ef92f7ed6eb6a9f3121d911
[ "BSD-3-Clause" ]
1
2020-11-20T07:09:34.000Z
2020-11-20T07:09:34.000Z
from __future__ import absolute_import from .rpi_ati_net_ft import *
17.5
38
0.842857
aa56ab57123d686c1cb0904c2f788f7abf049bdb
5,197
py
Python
imagetagger/imagetagger/images/models.py
plieningerweb/imagetagger
89c49ef557fa8b4f1f3fd9f2cd58988ce88afee2
[ "MIT" ]
1
2019-05-06T11:14:39.000Z
2019-05-06T11:14:39.000Z
imagetagger/imagetagger/images/models.py
plieningerweb/imagetagger
89c49ef557fa8b4f1f3fd9f2cd58988ce88afee2
[ "MIT" ]
null
null
null
imagetagger/imagetagger/images/models.py
plieningerweb/imagetagger
89c49ef557fa8b4f1f3fd9f2cd58988ce88afee2
[ "MIT" ]
null
null
null
from typing import Set from django.conf import settings from django.contrib.auth import get_user_model from django.db import models import os from imagetagger.users.models import Team class Image(models.Model): image_set = models.ForeignKey( 'ImageSet', on_delete=models.CASCADE, related_name='images') ...
33.314103
155
0.548393
6661e92eb1d4b470603b9d5fd7b0f819450f6492
444
py
Python
save_restore_model/variable/save_model.py
zlpmichelle/crackingtensorflow
66c3517b60c3793ef06f904e5d58e4d044628182
[ "Apache-2.0" ]
3
2017-10-19T23:41:26.000Z
2019-10-22T08:59:35.000Z
save_restore_model/variable/save_model.py
zlpmichelle/crackingtensorflow
66c3517b60c3793ef06f904e5d58e4d044628182
[ "Apache-2.0" ]
null
null
null
save_restore_model/variable/save_model.py
zlpmichelle/crackingtensorflow
66c3517b60c3793ef06f904e5d58e4d044628182
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' 比如,我们需要保存的模型是参数v1和v2,那么只需要使用下列的保存代码save_model.py。 ''' import tensorflow as tf v1 = tf.Variable(1.1, name="v1") v2 = tf.Variable(1.2, name="v2") init = tf.initialize_all_variables() saver = tf.train.Saver() with tf.Session() as sess: sess.run(init) print v2.ev...
23.368421
55
0.682432
e06047655833312df2eb44152e844af391358d61
3,926
py
Python
flo/commands/run.py
deanmalmgren/flo
40ba3ce29a03cecb74bf809e40061e5e5c9d6a6b
[ "MIT" ]
15
2015-03-26T07:45:24.000Z
2019-09-09T13:07:29.000Z
flo/commands/run.py
deanmalmgren/flo
40ba3ce29a03cecb74bf809e40061e5e5c9d6a6b
[ "MIT" ]
3
2015-09-16T09:33:30.000Z
2016-08-24T06:39:56.000Z
flo/commands/run.py
deanmalmgren/flo
40ba3ce29a03cecb74bf809e40061e5e5c9d6a6b
[ "MIT" ]
4
2016-07-07T18:32:56.000Z
2020-06-19T07:24:11.000Z
import os import sys from ..exceptions import ShellError, CommandLineException from ..notify import notify from .base import BaseCommand class Command(BaseCommand): help_text = "Run the task workflow." def manipulate_task_graph(self, task_id, start_at, skip, only): # --only is a synonym for setting...
36.018349
77
0.582527
2649f77dede4b0aa6ee3d9bd86310fc408a6cbe6
23,917
py
Python
alpaca_backtrader_api/alpacastore.py
axey733/alpaca-backtrader-api
9e7ff0f61c92832b93a0a83ca97505c3637c3272
[ "Apache-2.0" ]
null
null
null
alpaca_backtrader_api/alpacastore.py
axey733/alpaca-backtrader-api
9e7ff0f61c92832b93a0a83ca97505c3637c3272
[ "Apache-2.0" ]
null
null
null
alpaca_backtrader_api/alpacastore.py
axey733/alpaca-backtrader-api
9e7ff0f61c92832b93a0a83ca97505c3637c3272
[ "Apache-2.0" ]
null
null
null
from __future__ import (absolute_import, division, print_function, unicode_literals) import collections from datetime import datetime, timedelta from dateutil.parser import parse as date_parse import time as _time import threading import asyncio import alpaca_trade_api as tradeapi import pytz ...
33.264256
79
0.53878
d0d780dcb52f90157dda753776d638447530e2fd
27,845
py
Python
test/unit/test_jinja.py
vogt4nick/dbt
1bd82d4914fd80fcc6fe17140e46554ad677eab0
[ "Apache-2.0" ]
null
null
null
test/unit/test_jinja.py
vogt4nick/dbt
1bd82d4914fd80fcc6fe17140e46554ad677eab0
[ "Apache-2.0" ]
null
null
null
test/unit/test_jinja.py
vogt4nick/dbt
1bd82d4914fd80fcc6fe17140e46554ad677eab0
[ "Apache-2.0" ]
null
null
null
from contextlib import contextmanager import pytest import unittest import yaml from dbt.clients.jinja import get_rendered from dbt.clients.jinja import get_template from dbt.clients.jinja import extract_toplevel_blocks from dbt.exceptions import CompilationException, JinjaRenderingException @contextmanager def retu...
35.561941
170
0.560783
cfc419de9bb47e9ef4174692fcb76c99137bacb8
1,208
py
Python
analysis/visualize.py
metaShen/AlphaPose
662a72e4831778f97d3845273c63782d4b5236af
[ "Apache-2.0" ]
1
2021-05-13T04:50:54.000Z
2021-05-13T04:50:54.000Z
analysis/visualize.py
metaShen/AlphaPose
662a72e4831778f97d3845273c63782d4b5236af
[ "Apache-2.0" ]
5
2021-03-19T01:46:35.000Z
2022-03-11T23:52:41.000Z
analysis/visualize.py
metaStor/AlphaPose
662a72e4831778f97d3845273c63782d4b5236af
[ "Apache-2.0" ]
null
null
null
import json from pyecharts import Line, Overlap path1 = r'/home/meta/software/AlphaPose/examples/demo/res1/video1.json' path2 = r'/home/meta/software/AlphaPose/examples/demo/res2/video2.json' path3 = r'/home/meta/software/AlphaPose/examples/demo/res3/video3.json' def read(path): with open(path, 'r') as f: ...
30.2
84
0.683775
ed02e47668fb3b7187e6d1e016038e9c519eca30
2,469
py
Python
pytorchtools.py
jeffreyng99/early-stopping-pytorch
2e54511f24386310fd66aac737e14fa45305c618
[ "MIT" ]
null
null
null
pytorchtools.py
jeffreyng99/early-stopping-pytorch
2e54511f24386310fd66aac737e14fa45305c618
[ "MIT" ]
null
null
null
pytorchtools.py
jeffreyng99/early-stopping-pytorch
2e54511f24386310fd66aac737e14fa45305c618
[ "MIT" ]
null
null
null
import numpy as np import torch class EarlyStopping: """Early stops the training if validation loss doesn't improve after a given patience.""" def __init__(self, patience=7, verbose=False, delta=0, general_checkpoint=False): """ Args: patience (int): How long to wait after last time...
42.568966
111
0.581612
bc90f80c2efb6b79c8ffaadf69b3f5187ccc4c7f
263
py
Python
02-python-oo/aula-05/exemplos/sync.py
opensanca/trilha-python
9ffadd266e22a920a3c1acfdbc6a5a4645fce9d6
[ "MIT" ]
47
2016-05-19T22:37:18.000Z
2022-02-22T02:34:18.000Z
02-python-oo/aula-05/exemplos/sync.py
opensanca/trilha-python
9ffadd266e22a920a3c1acfdbc6a5a4645fce9d6
[ "MIT" ]
21
2016-05-20T12:35:25.000Z
2016-07-26T00:23:33.000Z
02-python-oo/aula-05/exemplos/sync.py
lamenezes/python-intro
9ffadd266e22a920a3c1acfdbc6a5a4645fce9d6
[ "MIT" ]
25
2016-05-19T22:52:32.000Z
2022-01-08T15:15:36.000Z
import requests if __name__ == '__main__': import sys verbose = '-v' in sys.argv for _ in range(25): response = requests.get('http://httpbin.org/get') print(response.status_code) if verbose: print(response.text)
20.230769
57
0.596958
28beb6760d11514fe41d5c6c4b65e5f1772b84f8
5,482
py
Python
tensorflow/python/keras/initializers.py
elielhojman/tensorflow
163aae337c875efce2518c3cd0fecb61968fe408
[ "Apache-2.0" ]
4
2019-04-12T00:49:38.000Z
2020-06-12T07:12:00.000Z
tensorflow/python/keras/initializers.py
elielhojman/tensorflow
163aae337c875efce2518c3cd0fecb61968fe408
[ "Apache-2.0" ]
1
2020-11-25T21:29:56.000Z
2021-06-11T05:31:49.000Z
tensorflow/python/keras/initializers.py
elielhojman/tensorflow
163aae337c875efce2518c3cd0fecb61968fe408
[ "Apache-2.0" ]
4
2019-11-11T13:46:27.000Z
2020-03-14T05:36:53.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
31.325714
87
0.743889
4cfc4c8c2894bc07ca1129483810a186a5d4a6d5
62,592
py
Python
run_list.py
DocOneMedical/bioasq-biobert
ac0383f223a5968443c38b877207011588503de0
[ "Apache-2.0" ]
null
null
null
run_list.py
DocOneMedical/bioasq-biobert
ac0383f223a5968443c38b877207011588503de0
[ "Apache-2.0" ]
null
null
null
run_list.py
DocOneMedical/bioasq-biobert
ac0383f223a5968443c38b877207011588503de0
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2018 The Google AI Language Team 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 applic...
41.589369
133
0.591609
fcf21f8f3fc8572f606036cd40396b86c4bf2acd
305
py
Python
bookapi/api/schemas/user.py
Fersubair40/bookapi
587b512edfad3e05fe648719c6ac176027a630f4
[ "MIT" ]
null
null
null
bookapi/api/schemas/user.py
Fersubair40/bookapi
587b512edfad3e05fe648719c6ac176027a630f4
[ "MIT" ]
null
null
null
bookapi/api/schemas/user.py
Fersubair40/bookapi
587b512edfad3e05fe648719c6ac176027a630f4
[ "MIT" ]
null
null
null
from bookapi.models import User from bookapi.extensions import ma, db class UserSchema(ma.SQLAlchemyAutoSchema): id = ma.Int(dump_only=True) password = ma.String(load_only=True, required=True) class Meta: model = User sqla_session = db.session load_instance = True
21.785714
55
0.695082
93ab8e22b6bfb1396dfedc141a2d800d19ff8828
10,300
py
Python
pictures/substorms/sea_onset_comparison.py
jhaiduce/defense_slides_www
55ca9ea5ebd3bf8f91d5211cc87eb5a24e79c688
[ "Apache-2.0" ]
null
null
null
pictures/substorms/sea_onset_comparison.py
jhaiduce/defense_slides_www
55ca9ea5ebd3bf8f91d5211cc87eb5a24e79c688
[ "Apache-2.0" ]
null
null
null
pictures/substorms/sea_onset_comparison.py
jhaiduce/defense_slides_www
55ca9ea5ebd3bf8f91d5211cc87eb5a24e79c688
[ "Apache-2.0" ]
null
null
null
import matplotlib matplotlib.use('agg') from substorm_utils.signature_lists import get_model_signature_lists, get_obs_signature_lists from substorm_utils.bin_listings import find_convolution_onsets, find_substorms_convolution from datetime import datetime, timedelta from substorm_utils.forecast_stats import dump_stats ...
35.153584
166
0.645922
0494f10d01c7dd99ca42a6d12dd2a718f1b2c832
5,032
py
Python
src/olympia/amo/tests/test_sitemap.py
anik31/addons-server
cecb61da98d6e830fb45a2b1d61b41e72812137e
[ "BSD-3-Clause" ]
null
null
null
src/olympia/amo/tests/test_sitemap.py
anik31/addons-server
cecb61da98d6e830fb45a2b1d61b41e72812137e
[ "BSD-3-Clause" ]
null
null
null
src/olympia/amo/tests/test_sitemap.py
anik31/addons-server
cecb61da98d6e830fb45a2b1d61b41e72812137e
[ "BSD-3-Clause" ]
null
null
null
import datetime import os from collections import namedtuple from unittest import mock from django.conf import settings from django.urls import reverse from olympia import amo from olympia.amo.sitemap import ( AddonSitemap, AMOSitemap, build_sitemap, CollectionSitemap, get_sitemap_path, get_si...
32.675325
86
0.632154
a4b215a0383aa17cd7f9cd39d310d6009c08966e
211
py
Python
scripts/item/consume_2434545.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
54
2019-04-16T23:24:48.000Z
2021-12-18T11:41:50.000Z
scripts/item/consume_2434545.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
3
2019-05-19T15:19:41.000Z
2020-04-27T16:29:16.000Z
scripts/item/consume_2434545.py
G00dBye/YYMS
1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb
[ "MIT" ]
49
2020-11-25T23:29:16.000Z
2022-03-26T16:20:24.000Z
# Created by MechAviv # Hayato Damage Skin | (2434545) if sm.addDamageSkin(2434545): sm.chat("'Hayato Damage Skin' Damage Skin has been added to your account's damage skin collection.") sm.consumeItem()
42.2
105
0.734597
a99ea7569f5a4ca153ceef5a6033d88dbc09e0ec
1,240
py
Python
apps/terreno/views.py
charles7aponteunillanos/sifos
7c7804cb26da3f82ab591d7668b5b0d43b7f805b
[ "MIT" ]
null
null
null
apps/terreno/views.py
charles7aponteunillanos/sifos
7c7804cb26da3f82ab591d7668b5b0d43b7f805b
[ "MIT" ]
null
null
null
apps/terreno/views.py
charles7aponteunillanos/sifos
7c7804cb26da3f82ab591d7668b5b0d43b7f805b
[ "MIT" ]
null
null
null
from django.shortcuts import render, redirect from django.http import HttpResponse, HttpResponseRedirect # Create your views here. from apps.terreno.models import Poligono def index(request): obj = Poligono.objects.all() obj_nombre = Poligono.nombre obj_coordenadas_puntos = Poligono.coordenadas_puntos ...
31.794872
58
0.707258
122d1ae4507bb90f9735ddccd1cea6cd731df161
3,743
py
Python
PythonClient/airsim/pedestrian.py
tobhil98/MastersProject-AirSim
e4576a84919a4a4baa57473e68a7a65dafcdbc30
[ "MIT" ]
null
null
null
PythonClient/airsim/pedestrian.py
tobhil98/MastersProject-AirSim
e4576a84919a4a4baa57473e68a7a65dafcdbc30
[ "MIT" ]
null
null
null
PythonClient/airsim/pedestrian.py
tobhil98/MastersProject-AirSim
e4576a84919a4a4baa57473e68a7a65dafcdbc30
[ "MIT" ]
null
null
null
import msgpackrpc #install as admin: pip install msgpack-rpc-python import numpy as np #pip install numpy import msgpack from .utils import * from .types import * class PedestrianClient: def __init__(self, ip = "", port = 41452, timeout_value = 3600): if (ip == ""): ip = "127.0.0.1" se...
34.981308
146
0.636121
6e101776847cc1924d732c80249616f63eade00e
900
py
Python
pythonAlgorithm/dp/LongestPalindromicSubsequence.py
Sky-zzt/lintcodePractice
d6436b296c5865d85e55c8ad4fcdbb0165d4ebb1
[ "MIT" ]
1
2020-09-15T07:58:55.000Z
2020-09-15T07:58:55.000Z
pythonAlgorithm/dp/LongestPalindromicSubsequence.py
Sky-zzt/lintcodePractice
d6436b296c5865d85e55c8ad4fcdbb0165d4ebb1
[ "MIT" ]
null
null
null
pythonAlgorithm/dp/LongestPalindromicSubsequence.py
Sky-zzt/lintcodePractice
d6436b296c5865d85e55c8ad4fcdbb0165d4ebb1
[ "MIT" ]
null
null
null
class Solution: """ @param s: the maximum length of s is 1000 @return: the longest palindromic subsequence's length """ ''' 设f[i][j]为S[i..j]的最长回文子串的长度 注意 f[i][j]是指i-j的回文串长度,不是指i-j是回文串 ''' def longestPalindromeSubseq(self, s): # write your code here l = len(s) ...
27.272727
63
0.432222
f1daaccac1e1558695b49167349232325a1c42b4
5,199
py
Python
stlapp/views/project.py
SahalaProject/stl_simple
9fde58c5987dbf97687a95953282e20b8c117b24
[ "MIT" ]
null
null
null
stlapp/views/project.py
SahalaProject/stl_simple
9fde58c5987dbf97687a95953282e20b8c117b24
[ "MIT" ]
null
null
null
stlapp/views/project.py
SahalaProject/stl_simple
9fde58c5987dbf97687a95953282e20b8c117b24
[ "MIT" ]
null
null
null
from django.core.exceptions import ObjectDoesNotExist from django.utils.decorators import method_decorator from rest_framework.views import APIView from rest_framework.viewsets import GenericViewSet from stlapp import models, serializers from STL import pagination from rest_framework.response import Response from stlap...
35.367347
114
0.633583
69ece29089d6dc4e529d3285eeb10fed2048b6eb
12,839
py
Python
tests/interpreters/test_python.py
jiehuan/m2cgen
e0e628bdd0453a8b11f3607bb3a0be60924f515f
[ "MIT" ]
2,161
2019-01-13T02:37:56.000Z
2022-03-30T13:24:09.000Z
tests/interpreters/test_python.py
jiehuan/m2cgen
e0e628bdd0453a8b11f3607bb3a0be60924f515f
[ "MIT" ]
380
2019-01-17T15:59:29.000Z
2022-03-31T20:59:20.000Z
tests/interpreters/test_python.py
jiehuan/m2cgen
e0e628bdd0453a8b11f3607bb3a0be60924f515f
[ "MIT" ]
201
2019-02-13T19:06:44.000Z
2022-03-12T09:45:46.000Z
import pytest from m2cgen import ast from m2cgen.interpreters import PythonInterpreter from tests.utils import assert_code_equal def test_if_expr(): expr = ast.IfExpr( ast.CompExpr(ast.NumVal(1), ast.FeatureRef(0), ast.CompOpType.EQ), ast.NumVal(2), ast.NumVal(3)) expected_code = ""...
24.833656
99
0.586962
c3a82459471dc869057c03114ed773a0b015c608
3,285
py
Python
hippynn/layers/pairs/analysis.py
tautomer/hippynn
df4504a5ea4680cfc61f490984dcddeac7ed99ee
[ "BSD-3-Clause" ]
21
2021-11-17T00:56:35.000Z
2022-03-22T05:57:11.000Z
hippynn/layers/pairs/analysis.py
tautomer/hippynn
df4504a5ea4680cfc61f490984dcddeac7ed99ee
[ "BSD-3-Clause" ]
4
2021-12-17T16:16:53.000Z
2022-03-16T23:50:38.000Z
hippynn/layers/pairs/analysis.py
tautomer/hippynn
df4504a5ea4680cfc61f490984dcddeac7ed99ee
[ "BSD-3-Clause" ]
6
2021-11-30T21:09:31.000Z
2022-03-18T07:07:32.000Z
""" Modules for analyzing pair-valued data """ import torch class RDFBins(torch.nn.Module): def __init__(self, bins, species_set): super().__init__() if bins is None: raise TypeError("Bins must not be None!") bins = torch.as_tensor(bins) species_set = torch.as_tensor(sp...
42.115385
115
0.690715
cbf6e8f4cd6b47661d58d562e10061005b71d760
2,764
py
Python
examples/poleval_ner/train.py
sdadas/yast
f9cd471ae3c915acb8111dd85a53acc72348c355
[ "Apache-2.0" ]
2
2018-12-18T03:12:13.000Z
2018-12-31T18:03:27.000Z
examples/poleval_ner/train.py
sdadas/yast
f9cd471ae3c915acb8111dd85a53acc72348c355
[ "Apache-2.0" ]
6
2020-01-28T21:59:18.000Z
2022-02-09T23:29:00.000Z
examples/poleval_ner/train.py
sdadas/yast
f9cd471ae3c915acb8111dd85a53acc72348c355
[ "Apache-2.0" ]
1
2020-07-07T18:25:15.000Z
2020-07-07T18:25:15.000Z
import argparse import os from typing import List from dataset import DataSet from feature.base import OneHotFeature, Feature from feature.casing import CasingFeature from feature.chars import CharsFeature, CharCNNFeature from feature.elmo import ELMoEmbeddingFeature from feature.fstlexicon import FSTFeature from mode...
46.847458
109
0.710203
c7826df739aa1b0a96eacf322f958e0b11a3bbf9
1,121
py
Python
auth-api/src/auth_api/schemas/suspension_reason_code.py
karthik-aot/sbc-auth
f24028040fda67d4f10ae9b608b8832c15d2a8ad
[ "Apache-2.0" ]
null
null
null
auth-api/src/auth_api/schemas/suspension_reason_code.py
karthik-aot/sbc-auth
f24028040fda67d4f10ae9b608b8832c15d2a8ad
[ "Apache-2.0" ]
null
null
null
auth-api/src/auth_api/schemas/suspension_reason_code.py
karthik-aot/sbc-auth
f24028040fda67d4f10ae9b608b8832c15d2a8ad
[ "Apache-2.0" ]
1
2019-07-25T18:20:41.000Z
2019-07-25T18:20:41.000Z
# Copyright © 2019 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
40.035714
107
0.764496
76cef1311627f42e7217a0181c1df77854d00703
8,311
py
Python
tests/io/test_parquet_local.py
yhzqb/kedro
619d7f0ccb51895d3bb43d30e3dee9d4d0cebcab
[ "Apache-2.0" ]
1
2021-11-19T05:36:47.000Z
2021-11-19T05:36:47.000Z
tests/io/test_parquet_local.py
yhzqb/kedro
619d7f0ccb51895d3bb43d30e3dee9d4d0cebcab
[ "Apache-2.0" ]
null
null
null
tests/io/test_parquet_local.py
yhzqb/kedro
619d7f0ccb51895d3bb43d30e3dee9d4d0cebcab
[ "Apache-2.0" ]
1
2021-11-19T05:36:49.000Z
2021-11-19T05:36:49.000Z
# Copyright 2018-2019 QuantumBlack Visual Analytics Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # THE SOFTWARE IS PROVIDED "AS IS"...
38.299539
87
0.694862
39976539502be29b0dc4668a3a8f5004bdc28fe6
28,460
py
Python
e7cataTradeBot.py
svzhukov/angelica-the-bot
c4923a9f58b2b4eadf009b9844b87bbd2c8e885f
[ "MIT" ]
null
null
null
e7cataTradeBot.py
svzhukov/angelica-the-bot
c4923a9f58b2b4eadf009b9844b87bbd2c8e885f
[ "MIT" ]
null
null
null
e7cataTradeBot.py
svzhukov/angelica-the-bot
c4923a9f58b2b4eadf009b9844b87bbd2c8e885f
[ "MIT" ]
null
null
null
from __future__ import annotations import json import uuid import os import random import boto3 import discord import jsonpickle import configparser import traceback import inspect import sys from enum import IntEnum from typing import List from typing import Optional from typing import Union from discord.ext import ...
37.105606
141
0.640267
fe71767979c726aae4185a4c29b2db6cd9b9277e
2,829
py
Python
preprocessing.py
luizcartolano2/ann-option-pricing
94875b624987c0476feced496e67c4fa42a27767
[ "MIT" ]
1
2021-10-02T02:32:27.000Z
2021-10-02T02:32:27.000Z
preprocessing.py
luizcartolano2/ann-option-pricing
94875b624987c0476feced496e67c4fa42a27767
[ "MIT" ]
2
2020-09-18T03:04:20.000Z
2020-09-18T03:09:58.000Z
preprocessing.py
luizcartolano2/ann-option-pricing
94875b624987c0476feced496e67c4fa42a27767
[ "MIT" ]
null
null
null
import pandas as pd import numpy as np from impliedVolatility.ImpliedVolatility import ImpliedVolatility # read DataFrames with available info about options df_contracts = pd.read_csv('data-source/contracts.csv', usecols=['commodity', 'contract', 'expiry_date']) df_fut = pd.read_csv('data-source/und-fut.csv', usecols=...
47.949153
142
0.75327
f9d2e8d72798f0787f611c6795991625a3685857
6,406
py
Python
src/tutorial_scenarios/userMovement/main.py
vyk1/YAFS
514f8362c90923fa28f871fcf179b755a9315c47
[ "MIT" ]
null
null
null
src/tutorial_scenarios/userMovement/main.py
vyk1/YAFS
514f8362c90923fa28f871fcf179b755a9315c47
[ "MIT" ]
null
null
null
src/tutorial_scenarios/userMovement/main.py
vyk1/YAFS
514f8362c90923fa28f871fcf179b755a9315c47
[ "MIT" ]
null
null
null
""" In this simulation, the users moves in different nodes. There are linked to another nodes. @author: Isaac Lera """ import os import time import json import random import logging.config import networkx as nx from pathlib import Path from yafs.core import Sim from yafs.application import create_application...
33.715789
155
0.646113
a25aa06c9c0e5a5371f420a7ced973e39b0d38af
3,271
py
Python
scripts/books_database.py
scianand/Programming-With-Databases
4b4363be91f066f2852d78ae2a9240731c46f3b9
[ "Apache-2.0" ]
null
null
null
scripts/books_database.py
scianand/Programming-With-Databases
4b4363be91f066f2852d78ae2a9240731c46f3b9
[ "Apache-2.0" ]
null
null
null
scripts/books_database.py
scianand/Programming-With-Databases
4b4363be91f066f2852d78ae2a9240731c46f3b9
[ "Apache-2.0" ]
null
null
null
""" SQL Alchemy ORM example: schema creation and access both user: postgres password: postgres """ from sqlalchemy import create_engine, Column, Integer, String, ForeignKey from sqlalchemy.orm import sessionmaker, relationship from sqlalchemy.ext.declarative import declarative_base # connect to the database engine =...
30.858491
94
0.674411
c741406d9837b164561a6db2eba6d6678dc8826c
1,268
py
Python
getNearestClusterAccuracy.py
arjish/meta-meta-classification
3e1df26a486094bd9cb394ff99d3c29b587b66c3
[ "MIT" ]
3
2021-07-30T23:58:35.000Z
2021-11-11T02:05:58.000Z
getNearestClusterAccuracy.py
arjish/meta-meta-classification
3e1df26a486094bd9cb394ff99d3c29b587b66c3
[ "MIT" ]
null
null
null
getNearestClusterAccuracy.py
arjish/meta-meta-classification
3e1df26a486094bd9cb394ff99d3c29b587b66c3
[ "MIT" ]
1
2021-09-13T10:12:16.000Z
2021-09-13T10:12:16.000Z
import os import numpy as np import argparse parser = argparse.ArgumentParser() parser.add_argument('data_path', metavar='DATA', help='path to data') parser.add_argument('-n', '--n_clusters', default=16, type=int, help='# of models (default=16)') parser.add_argument('-p', '--pkl_file', default='filelist', typ...
31.7
88
0.711356
85a5e232a356a236b8ef07e31d9cb5f5202e7a22
538
py
Python
spokes_deepsense_app/config/desktop.py
karantkiruba/spokes_deepsense_app
90b23fec05866965da8b5a096d0f2084cb3ee4c5
[ "MIT" ]
null
null
null
spokes_deepsense_app/config/desktop.py
karantkiruba/spokes_deepsense_app
90b23fec05866965da8b5a096d0f2084cb3ee4c5
[ "MIT" ]
null
null
null
spokes_deepsense_app/config/desktop.py
karantkiruba/spokes_deepsense_app
90b23fec05866965da8b5a096d0f2084cb3ee4c5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from frappe import _ def get_data(): return [ { "module_name": "Spokes Deepsense App", "color": "default", "icon": "default", "type": "module", "label": _("Spokes Deepsense App") }, { "module_name": "Reports",...
23.391304
65
0.459108
b7dae768eae9b436605c893c21bd37c1da83bd56
3,763
py
Python
model-experiments/token-based-similarity-classification/src/PostProcessor/MapAtR.py
yingkitw/Project_CodeNet
565ac79043d240c70e5bb9fdfbf5eccdec4e0bc3
[ "Apache-2.0" ]
1,156
2021-05-11T08:37:00.000Z
2022-03-31T11:28:51.000Z
model-experiments/token-based-similarity-classification/src/PostProcessor/MapAtR.py
yingkitw/Project_CodeNet
565ac79043d240c70e5bb9fdfbf5eccdec4e0bc3
[ "Apache-2.0" ]
29
2021-05-11T18:54:49.000Z
2022-03-11T15:26:35.000Z
model-experiments/token-based-similarity-classification/src/PostProcessor/MapAtR.py
yingkitw/Project_CodeNet
565ac79043d240c70e5bb9fdfbf5eccdec4e0bc3
[ "Apache-2.0" ]
149
2021-05-11T10:38:24.000Z
2022-03-21T04:52:28.000Z
""" Program for computing MAP at R metric using matrix of predicted similarity strength for all sample pairs Input data are expected to be in the form of two pickled files: - problem_indices.pcl -- specifies indices of tested problem for each similarity test experiment - s...
39.197917
90
0.610949
2b70563c55726013ccb81ff2c26481883d3666e3
47,553
py
Python
octavia_dashboard/api/rest/lbaasv2.py
TomEros/octavia-dashboard
7fb4bac2e835699b0b386336a9f09aeda67a5996
[ "Apache-2.0" ]
null
null
null
octavia_dashboard/api/rest/lbaasv2.py
TomEros/octavia-dashboard
7fb4bac2e835699b0b386336a9f09aeda67a5996
[ "Apache-2.0" ]
null
null
null
octavia_dashboard/api/rest/lbaasv2.py
TomEros/octavia-dashboard
7fb4bac2e835699b0b386336a9f09aeda67a5996
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 IBM Corp. # # 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, sof...
33.347125
86
0.644229
97dc00bae8d02e8f139b5f6677d017e9fef4491a
1,994
py
Python
application.py
amfox/af_sbs
327a0a68731e905818b24aaf4efb35cfd0d29637
[ "MIT" ]
null
null
null
application.py
amfox/af_sbs
327a0a68731e905818b24aaf4efb35cfd0d29637
[ "MIT" ]
null
null
null
application.py
amfox/af_sbs
327a0a68731e905818b24aaf4efb35cfd0d29637
[ "MIT" ]
null
null
null
# coding=utf-8 import os import tornado from apscheduler.events import EVENT_JOB_EXECUTED, EVENT_JOB_ERROR, EVENT_JOB_ADDED from apscheduler.schedulers.tornado import TornadoScheduler from handler.AddJobHandler import AddJobHandler from handler.BackUIHandler import BackUIHandler from handler.DebugHandler import DebugHa...
39.098039
106
0.713641
dca618e4aee2a10126bee1646d0196d38f716d03
4,114
py
Python
hello.py
julencastro37/PianoPython
1e72d375f9f5f94c6f4fcad1892df574befe9d8b
[ "CC0-1.0" ]
null
null
null
hello.py
julencastro37/PianoPython
1e72d375f9f5f94c6f4fcad1892df574befe9d8b
[ "CC0-1.0" ]
null
null
null
hello.py
julencastro37/PianoPython
1e72d375f9f5f94c6f4fcad1892df574befe9d8b
[ "CC0-1.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from tkinter import * from tkinter import ttk # La clase 'Aplicacion' ha crecido. En el ejemplo se incluyen # nuevos widgets en el método constructor __init__(): Uno de # ellos es el botón 'Info' que cuando sea presionado llamará # al método 'verinfo' para mostrar infor...
35.773913
64
0.56174
8a8e5d9aed1cf923d116e0e4e0c589b14041b24f
4,642
py
Python
mmedit/models/mattors/indexnet.py
Jian137/mmediting-1
e1ac6c93441ec96696d0b530f040b91b809015b6
[ "Apache-2.0" ]
1,884
2020-07-09T18:53:43.000Z
2022-03-31T12:06:18.000Z
mmedit/models/mattors/indexnet.py
Jian137/mmediting-1
e1ac6c93441ec96696d0b530f040b91b809015b6
[ "Apache-2.0" ]
622
2020-07-09T18:52:27.000Z
2022-03-31T14:41:09.000Z
mmedit/models/mattors/indexnet.py
Jian137/mmediting-1
e1ac6c93441ec96696d0b530f040b91b809015b6
[ "Apache-2.0" ]
361
2020-07-09T19:21:47.000Z
2022-03-31T09:58:27.000Z
# Copyright (c) OpenMMLab. All rights reserved. import torch from mmcv.runner import auto_fp16 from ..builder import build_loss from ..registry import MODELS from .base_mattor import BaseMattor from .utils import get_unknown_tensor @MODELS.register_module() class IndexNet(BaseMattor): """IndexNet matting model. ...
40.017241
79
0.596726
10c4c08fa6ec45f89c60c38f06511319a9ac77cc
1,617
py
Python
example/test_clustering.py
anandbhoraskar/img2vec
5ae18d32fa54c46dd10bc01c0d340143283296da
[ "MIT" ]
1
2020-05-09T09:11:36.000Z
2020-05-09T09:11:36.000Z
example/test_clustering.py
anandbhoraskar/img2vec
5ae18d32fa54c46dd10bc01c0d340143283296da
[ "MIT" ]
null
null
null
example/test_clustering.py
anandbhoraskar/img2vec
5ae18d32fa54c46dd10bc01c0d340143283296da
[ "MIT" ]
null
null
null
import sys import os from shutil import copyfile sys.path.append("../img2vec_pytorch") # Adds higher directory to python modules path. from img_to_vec import Img2Vec from PIL import Image import numpy as np from sklearn.cluster import KMeans from sklearn.decomposition import PCA input_path = './test_images' files = ...
28.875
86
0.709957
d9f3cdcbfe85fbd33bca90cf16c29336075d942c
2,701
py
Python
final_benchmark.py
Freeha-S/Algorithm
61d08de9b7ac2899d29ba7ba8a29730923e1f193
[ "MIT" ]
null
null
null
final_benchmark.py
Freeha-S/Algorithm
61d08de9b7ac2899d29ba7ba8a29730923e1f193
[ "MIT" ]
null
null
null
final_benchmark.py
Freeha-S/Algorithm
61d08de9b7ac2899d29ba7ba8a29730923e1f193
[ "MIT" ]
null
null
null
import numpy as np from numpy.random import randint from time import time from sorting import insertion_sort, merge_sort, quick_sort,selection_sort,radix_sort,radix_Sort from numpy import mean import pandas as pd import matplotlib.pyplot as plt import math """ def random_array(ArraySize): numpy.random.seed(0) te...
39.144928
134
0.681229
d04936ca4503fae4eacfff41230f9dc60eebde16
9,239
py
Python
sopel/tools/time.py
HumorBaby/sopel
c78d85197538ac4d74389ce1ebe48a67c9c55978
[ "EFL-2.0" ]
1
2019-01-14T13:05:24.000Z
2019-01-14T13:05:24.000Z
sopel/tools/time.py
HumorBaby/sopel
c78d85197538ac4d74389ce1ebe48a67c9c55978
[ "EFL-2.0" ]
null
null
null
sopel/tools/time.py
HumorBaby/sopel
c78d85197538ac4d74389ce1ebe48a67c9c55978
[ "EFL-2.0" ]
null
null
null
# coding=utf-8 """Tools for getting and displaying the time.""" from __future__ import unicode_literals, absolute_import, print_function, division import datetime import pytz def validate_timezone(zone): """Return an IETF timezone from the given IETF zone or common abbreviation. :param str zone: in a stric...
34.864151
105
0.630696
92e8475d0f77a10ea2fe8c9ea35b307b176af0b5
3,808
py
Python
frameit/frame.py
biggorilla-gh/frameit
9cae56b4089fff6c955f8b86c699aa402a1390ac
[ "Apache-2.0" ]
3
2018-12-29T01:10:37.000Z
2020-06-12T09:45:11.000Z
frameit/frame.py
biggorilla-gh/frameit
9cae56b4089fff6c955f8b86c699aa402a1390ac
[ "Apache-2.0" ]
null
null
null
frameit/frame.py
biggorilla-gh/frameit
9cae56b4089fff6c955f8b86c699aa402a1390ac
[ "Apache-2.0" ]
null
null
null
import json from frameit.models import Model from frameit.utterance import Utterance from frameit.frameattr import FrameAttribute class Frame(object): def __init__(self, name, lang='en'): self.name = name self.utterances = set() self.models = [] self.weights = [] self.sum_...
31.471074
83
0.555147
db7cf28eb48f844ce7d2fe90fec5cf468e6eb4ad
2,100
py
Python
gan_training/eval.py
MiaoyunZhao/GANTransferLimitedData
5545bc37a1d7d4f28a9c3588aaa12a616bbddd88
[ "MIT" ]
41
2020-06-10T03:49:35.000Z
2022-03-24T02:06:38.000Z
gan_training/eval.py
nianweijie/GANTransferLimitedData
5545bc37a1d7d4f28a9c3588aaa12a616bbddd88
[ "MIT" ]
5
2020-11-16T23:50:17.000Z
2021-05-13T09:43:49.000Z
gan_training/eval.py
nianweijie/GANTransferLimitedData
5545bc37a1d7d4f28a9c3588aaa12a616bbddd88
[ "MIT" ]
6
2020-11-08T16:14:07.000Z
2022-03-11T14:31:44.000Z
import torch from gan_training.metrics import inception_score from gan_training.metrics.fid_score import calculate_fid_given_images import numpy as np class Evaluator(object): def __init__(self, generator, zdist, ydist, batch_size=64, inception_nsamples=10000, device=None, fid_real_samples=None, ...
35
78
0.608571
73e018fc8c400db9ac968f1f816273190fdf58b3
7,125
py
Python
rfvision/datasets/pipelines/imvotenet_pipeline.py
tycoer/rfvision-1
db6e28746d8251d1f394544c32b9e0af388d9964
[ "Apache-2.0" ]
6
2021-09-25T03:53:06.000Z
2022-02-19T03:25:11.000Z
rfvision/datasets/pipelines/imvotenet_pipeline.py
tycoer/rfvision-1
db6e28746d8251d1f394544c32b9e0af388d9964
[ "Apache-2.0" ]
1
2021-07-21T13:14:54.000Z
2021-07-21T13:14:54.000Z
rfvision/datasets/pipelines/imvotenet_pipeline.py
tycoer/rfvision-1
db6e28746d8251d1f394544c32b9e0af388d9964
[ "Apache-2.0" ]
2
2021-07-16T03:25:04.000Z
2021-11-22T06:04:01.000Z
import numpy as np import rflib import os from rfvision.datasets.builder import PIPELINES import torch @PIPELINES.register_module() class LoadImVote: def __init__(self, data_root, class_names, max_imvote_per_pixel=3, ): self.dat...
43.981481
132
0.597754
3b9a07adc0a77609caff823a3149f8be00f3f357
256
py
Python
django_summernote/__init__.py
yuong1979/django-summernote
cf9b2d838310211738162c2acbc7b9145d3970b2
[ "MIT" ]
null
null
null
django_summernote/__init__.py
yuong1979/django-summernote
cf9b2d838310211738162c2acbc7b9145d3970b2
[ "MIT" ]
null
null
null
django_summernote/__init__.py
yuong1979/django-summernote
cf9b2d838310211738162c2acbc7b9145d3970b2
[ "MIT" ]
null
null
null
version_info = (0, 8, 8, 6) __version__ = version = '.'.join(map(str, version_info)) __project__ = PROJECT = 'django-summernote' __author__ = AUTHOR = "django-summernote contributors" default_app_config = 'django_summernote.apps.DjangoSummernoteConfig'
28.444444
68
0.761719
534411eb83793cc72583dc3ab8c9c887d49831f1
4,699
py
Python
tests/examples/minlplib/cvxnonsep_psig20r.py
ouyang-w-19/decogo
52546480e49776251d4d27856e18a46f40c824a1
[ "MIT" ]
2
2021-07-03T13:19:10.000Z
2022-02-06T10:48:13.000Z
tests/examples/minlplib/cvxnonsep_psig20r.py
ouyang-w-19/decogo
52546480e49776251d4d27856e18a46f40c824a1
[ "MIT" ]
1
2021-07-04T14:52:14.000Z
2021-07-15T10:17:11.000Z
tests/examples/minlplib/cvxnonsep_psig20r.py
ouyang-w-19/decogo
52546480e49776251d4d27856e18a46f40c824a1
[ "MIT" ]
null
null
null
# MINLP written by GAMS Convert at 04/21/18 13:51:24 # # Equation counts # Total E G L N X C B # 23 1 0 22 0 0 0 0 # # Variable counts # x b i s1s s2s sc ...
40.86087
119
0.606299
564c46c7d039fb692ab48b4d826556ad55ff1b69
11,157
py
Python
src/se3_distributions/bbTrans/testGaussianMMBounds.py
Mostafa-Mansour/se3_distributions
3c1c2c754e9102a031ae6ff14b703cee0163c413
[ "MIT" ]
1
2021-09-19T18:35:42.000Z
2021-09-19T18:35:42.000Z
src/se3_distributions/bbTrans/testGaussianMMBounds.py
Mostafa-Mansour/se3_distributions
3c1c2c754e9102a031ae6ff14b703cee0163c413
[ "MIT" ]
null
null
null
src/se3_distributions/bbTrans/testGaussianMMBounds.py
Mostafa-Mansour/se3_distributions
3c1c2c754e9102a031ae6ff14b703cee0163c413
[ "MIT" ]
3
2021-11-07T12:51:20.000Z
2022-01-07T10:37:07.000Z
import numpy as np from scipy.linalg import det, solve, inv class Box(object): def __init__(self, ld, ru): self.ld = ld self.ru = ru self.lu = np.array([self.ld[0],self.ru[1]]) self.rd = np.array([self.ru[0],self.ld[1]]) def Inside(self, x): return (self.ld <= x).all() and (x <= self.ru).all()...
30.072776
73
0.536883
4a72a740a1149e1e10f7195dee83162c941bddf1
7,050
py
Python
fruitbat/catalogue.py
abatten/frbz
ca350a3a65aaf6033efe094fbf23f8a319a65fb7
[ "BSD-3-Clause" ]
17
2019-02-22T02:56:52.000Z
2022-03-10T01:10:09.000Z
fruitbat/catalogue.py
abatten/frbz
ca350a3a65aaf6033efe094fbf23f8a319a65fb7
[ "BSD-3-Clause" ]
22
2019-02-21T12:15:56.000Z
2021-12-15T03:56:16.000Z
fruitbat/catalogue.py
abatten/frbz
ca350a3a65aaf6033efe094fbf23f8a319a65fb7
[ "BSD-3-Clause" ]
8
2019-02-19T05:52:59.000Z
2021-10-05T01:58:24.000Z
import os import pandas as pd from e13tools import docstring_substitute from fruitbat import Frb, methods, cosmologies __all__ = ["create_analysis_catalogue", "create_methods_catalogue", "read_frb_row"] @docstring_substitute(meth=methods.available_methods(), cosmo=cosmologies.avail...
36.340206
77
0.553333
95275cc4abf6b56c5be577d3b581fe04fa4bab96
31,656
py
Python
sdk/python/pulumi_docker/docker.py
stevesloka/pulumi-docker
6628c2dfab8ab3b6293da0b8f6befd143d19bd47
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_docker/docker.py
stevesloka/pulumi-docker
6628c2dfab8ab3b6293da0b8f6befd143d19bd47
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_docker/docker.py
stevesloka/pulumi-docker
6628c2dfab8ab3b6293da0b8f6befd143d19bd47
[ "Apache-2.0" ]
null
null
null
# Copyright 2016-2020, Pulumi Corporation. # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http:#www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
43.723757
140
0.693676
a262e53287691d4dc9c18021db1dbcf6251a0122
7,393
py
Python
pytest_lambda/impl.py
theY4Kman/pytest-lambda
a64de8e9d57176878756686ac128aa93a9e88290
[ "MIT" ]
10
2018-07-31T14:57:23.000Z
2021-05-24T12:45:51.000Z
pytest_lambda/impl.py
theY4Kman/pytest-lambda
a64de8e9d57176878756686ac128aa93a9e88290
[ "MIT" ]
3
2019-01-16T00:41:42.000Z
2020-11-02T21:50:25.000Z
pytest_lambda/impl.py
theY4Kman/pytest-lambda
a64de8e9d57176878756686ac128aa93a9e88290
[ "MIT" ]
3
2019-01-16T00:41:47.000Z
2021-05-01T09:50:36.000Z
import functools from types import ModuleType from typing import Callable, Union import pytest import wrapt _IDENTITY_LAMBDA_FORMAT = ''' {name} = lambda {argnames}: ({argnames}) ''' def create_identity_lambda(name, *argnames): source = _IDENTITY_LAMBDA_FORMAT.format(name=name, argnames=', '.join(argnames)) ...
36.063415
110
0.670634
cfcefddf77738011e14575bd5f93ddda875a540d
1,359
py
Python
tests/types/test_permissions.py
nyejon/strawberry
664fde292fe2186c3e33e8cae79964b866fa5822
[ "MIT" ]
1
2021-05-26T18:31:11.000Z
2021-05-26T18:31:11.000Z
tests/types/test_permissions.py
nyejon/strawberry
664fde292fe2186c3e33e8cae79964b866fa5822
[ "MIT" ]
43
2021-07-05T22:51:03.000Z
2022-03-29T10:44:58.000Z
tests/types/test_permissions.py
nyejon/strawberry
664fde292fe2186c3e33e8cae79964b866fa5822
[ "MIT" ]
null
null
null
from typing import Any import strawberry from strawberry.permission import BasePermission from strawberry.types import Info def test_permission_classes_basic_fields(): class IsAuthenticated(BasePermission): message = "User is not authenticated" def has_permission(self, source: Any, info: Info, *...
28.3125
76
0.698308
a37b848c0be19172fa620388c5d545c3873183ec
28,298
py
Python
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_sensitivity_labels_operations.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
1
2021-09-07T18:39:05.000Z
2021-09-07T18:39:05.000Z
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_sensitivity_labels_operations.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
null
null
null
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_sql_pool_sensitivity_labels_operations.py
xolve/azure-sdk-for-python
9f5baa19c392f77f811d936ee43450e4ea524002
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.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 ...
44.634069
321
0.667326
3bc5c4e73118ba83cf7c40222f661c592921978e
420
py
Python
setup.py
franaguila/DSCI_524-square-python
93a79472a72fc957100b1945949b2443aed1bdac
[ "MIT" ]
null
null
null
setup.py
franaguila/DSCI_524-square-python
93a79472a72fc957100b1945949b2443aed1bdac
[ "MIT" ]
null
null
null
setup.py
franaguila/DSCI_524-square-python
93a79472a72fc957100b1945949b2443aed1bdac
[ "MIT" ]
null
null
null
from distutils.core import setup setup( name='square', version='0.1.0', author='Fran Aguila', author_email='francescaaguila@gmail.com', packages=['square'], scripts=['square/utils.py'], url='https://github.com/franguila/DSCI_524-square-python', license='LICENSE.txt', description='Ge...
26.25
62
0.666667
d71461e7cfae43e7ea103a8bb19d4fe04483cce9
2,254
py
Python
ceph_deploy/tests/parser/test_config.py
SUSE/ceph-deploy-to-be-deleted
a7a540668fcd23eea6b9e8d079ae60f32e5426e3
[ "MIT" ]
1
2020-07-29T15:09:23.000Z
2020-07-29T15:09:23.000Z
ceph_deploy/tests/parser/test_config.py
SUSE/ceph-deploy-to-be-deleted
a7a540668fcd23eea6b9e8d079ae60f32e5426e3
[ "MIT" ]
null
null
null
ceph_deploy/tests/parser/test_config.py
SUSE/ceph-deploy-to-be-deleted
a7a540668fcd23eea6b9e8d079ae60f32e5426e3
[ "MIT" ]
null
null
null
import pytest from ceph_deploy.cli import get_parser SUBCMDS_WITH_ARGS = ['push', 'pull'] class TestParserConfig(object): def setup(self): self.parser = get_parser() def test_config_help(self, capsys): with pytest.raises(SystemExit): self.parser.parse_args('config --help'.split...
36.354839
72
0.657054
c8c2897679cce1d9021d9eeace5671ce7765ae92
1,679
py
Python
packettcp.py
sekharkaredla/cnlab
8e1ef9a904dea5260f6b6cf968508a2847f9f15c
[ "MIT" ]
null
null
null
packettcp.py
sekharkaredla/cnlab
8e1ef9a904dea5260f6b6cf968508a2847f9f15c
[ "MIT" ]
null
null
null
packettcp.py
sekharkaredla/cnlab
8e1ef9a904dea5260f6b6cf968508a2847f9f15c
[ "MIT" ]
2
2018-04-16T13:25:12.000Z
2018-04-16T14:49:38.000Z
#Packet sniffer in python for Linux #Sniffs only incoming TCP packet import socket, sys from struct import * #create an INET, STREAMing socket try: s = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_TCP) except socket.error , msg: print 'Socket could not be created. Error Code : ' + str(msg[0...
33.58
208
0.671233