hexsha
stringlengths
40
40
size
int64
4
1.02M
ext
stringclasses
8 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
209
max_stars_repo_name
stringlengths
5
121
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
209
max_issues_repo_name
stringlengths
5
121
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
209
max_forks_repo_name
stringlengths
5
121
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
4
1.02M
avg_line_length
float64
1.07
66.1k
max_line_length
int64
4
266k
alphanum_fraction
float64
0.01
1
ae1c314367eda94502f3250be74ea3c895585272
52
py
Python
tutorials/stock-wallet/microservices/wallet/src/commands/__init__.py
bhardwajRahul/minos-python
bad7a280ad92680abdeab01d1214688279cf6316
[ "MIT" ]
247
2022-01-24T14:55:30.000Z
2022-03-25T12:06:17.000Z
tutorials/stock-wallet/microservices/wallet/src/commands/__init__.py
bhardwajRahul/minos-python
bad7a280ad92680abdeab01d1214688279cf6316
[ "MIT" ]
168
2022-01-24T14:54:31.000Z
2022-03-31T09:31:09.000Z
tutorials/stock-wallet/microservices/wallet/src/commands/__init__.py
bhardwajRahul/minos-python
bad7a280ad92680abdeab01d1214688279cf6316
[ "MIT" ]
21
2022-02-06T17:25:58.000Z
2022-03-27T04:50:29.000Z
from .services import ( WalletCommandService, )
13
25
0.730769
91b98f54e60a18955447366f3b8df0621aa0d797
2,432
py
Python
openr/py/openr/utils/tests/serializer_tests.py
jamesbj/openr
878f7e74ec91b9407110e64e6d8a9f9499a335d5
[ "MIT" ]
1
2019-02-26T06:36:29.000Z
2019-02-26T06:36:29.000Z
openr/py/openr/utils/tests/serializer_tests.py
flintfinally/openr
a5abf937f75ca757c9d4c17093c3d89ffbb28e09
[ "MIT" ]
null
null
null
openr/py/openr/utils/tests/serializer_tests.py
flintfinally/openr
a5abf937f75ca757c9d4c17093c3d89ffbb28e09
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # # Copyright (c) 2014-present, Facebook, Inc. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # from __future__ import absolute_import, division, print_function, unicode_literals import random import string import u...
38
84
0.695313
c8903add0c99f574198791b79f48983a3adc5052
1,411
py
Python
molecule/alternative/tests/test_alternative.py
m1cka/ansible-grafana
3cd6f9d3414ef5cf8ed6def8bcad1d654e2cce9e
[ "MIT" ]
447
2017-11-27T18:07:59.000Z
2022-03-28T09:15:42.000Z
molecule/alternative/tests/test_alternative.py
m1cka/ansible-grafana
3cd6f9d3414ef5cf8ed6def8bcad1d654e2cce9e
[ "MIT" ]
232
2017-12-02T20:00:47.000Z
2022-03-30T06:25:37.000Z
molecule/alternative/tests/test_alternative.py
m1cka/ansible-grafana
3cd6f9d3414ef5cf8ed6def8bcad1d654e2cce9e
[ "MIT" ]
294
2017-12-14T22:01:40.000Z
2022-03-31T18:41:19.000Z
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') def test_directories(host): dirs = [ "/etc/grafana", "/var/log/grafana", "/var/lib/grafana", "/var/lib/grafan...
25.196429
71
0.649894
052215bcbd2fb3b15cbab4b53fd49cdd0329c447
3,619
py
Python
torchvision/utils.py
gpleiss/vision
7a975284a88a3c722a92a7962180781df2acfa68
[ "BSD-3-Clause" ]
3
2019-10-29T02:38:55.000Z
2020-12-17T07:54:42.000Z
torchvision/utils.py
fmassa/vision-1
7a975284a88a3c722a92a7962180781df2acfa68
[ "BSD-3-Clause" ]
null
null
null
torchvision/utils.py
fmassa/vision-1
7a975284a88a3c722a92a7962180781df2acfa68
[ "BSD-3-Clause" ]
null
null
null
import torch import math irange = range def make_grid(tensor, nrow=8, padding=2, normalize=False, range=None, scale_each=False): """ Given a 4D mini-batch Tensor of shape (B x C x H x W), or a list of images all of the same size, makes a grid of images normalize=True will shift the ...
37.697917
113
0.605692
3d525a6aae3aa9b7e9040c0ce82aa571165c0b2f
16,260
py
Python
main.py
Eclipi/PaDiM-EfficientNet
738830a11db5bcb725407e9323177d565667a0f9
[ "Apache-2.0" ]
null
null
null
main.py
Eclipi/PaDiM-EfficientNet
738830a11db5bcb725407e9323177d565667a0f9
[ "Apache-2.0" ]
null
null
null
main.py
Eclipi/PaDiM-EfficientNet
738830a11db5bcb725407e9323177d565667a0f9
[ "Apache-2.0" ]
null
null
null
# 1. import module ## utils import random import os from random import sample import numpy as np import pickle import time import sys import copy import argparse import warnings import matplotlib import matplotlib.pyplot as plt from PIL import Image from tqdm import tqdm from collections import OrderedDict from sklearn...
39.95086
151
0.611316
06fec3cb86fc17f43dd3990090d847ea8835629a
9,861
py
Python
PMBANet_TOPO/dataset.py
Alina-Mingchi/TOPO_final
a8983006929b60bda0ed1d2e9a9130427b628431
[ "MIT" ]
null
null
null
PMBANet_TOPO/dataset.py
Alina-Mingchi/TOPO_final
a8983006929b60bda0ed1d2e9a9130427b628431
[ "MIT" ]
null
null
null
PMBANet_TOPO/dataset.py
Alina-Mingchi/TOPO_final
a8983006929b60bda0ed1d2e9a9130427b628431
[ "MIT" ]
null
null
null
import torch.utils.data as data import torch import numpy as np import os from os import listdir from os.path import join from PIL import Image import random from random import randrange def is_image_file(filename): return any(filename.endswith(extension) for extension in [".png", ".jpg", ".jpeg"]) def load_img(...
46.514151
178
0.602981
2d4c8ae85ec8a72c2b240c3bd32e5e9359f4002a
10,543
py
Python
sdk/python/pulumi_azure_nextgen/network/v20180601/connection_monitor.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20180601/connection_monitor.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_nextgen/network/v20180601/connection_monitor.py
test-wiz-sec/pulumi-azure-nextgen
20a695af0d020b34b0f1c336e1b69702755174cc
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
49.266355
1,802
0.67846
314822762e3da09eb0492e6232daa27551cb69d0
1,615
py
Python
dataset/augmentation.py
Creearc/Codenrock-New-Year-ML-Battle
38dc89e45482cf6668cc0abe46f07b9d69db32a2
[ "MIT" ]
1
2022-01-07T16:57:34.000Z
2022-01-07T16:57:34.000Z
dataset/augmentation.py
Creearc/Codenrock-New-Year-ML-Battle
38dc89e45482cf6668cc0abe46f07b9d69db32a2
[ "MIT" ]
null
null
null
dataset/augmentation.py
Creearc/Codenrock-New-Year-ML-Battle
38dc89e45482cf6668cc0abe46f07b9d69db32a2
[ "MIT" ]
null
null
null
import os import cv2 import numpy as np ###################################################################### ''' PARAMETERS ''' ###################################################################### path = 'train' img_shape = (448, 448) split_matrix = (4, 4) ####...
24.846154
71
0.453251
ba6df220730e0dc296eb8bac4db80bf6a043bafb
3,740
py
Python
plenum/test/checkpoints/test_checkpoint_stabilization_after_catchup.py
ken-ebert/indy-plenum
7578798df456d06ffe24f488452fab3f1b3f00f1
[ "Apache-2.0" ]
null
null
null
plenum/test/checkpoints/test_checkpoint_stabilization_after_catchup.py
ken-ebert/indy-plenum
7578798df456d06ffe24f488452fab3f1b3f00f1
[ "Apache-2.0" ]
null
null
null
plenum/test/checkpoints/test_checkpoint_stabilization_after_catchup.py
ken-ebert/indy-plenum
7578798df456d06ffe24f488452fab3f1b3f00f1
[ "Apache-2.0" ]
null
null
null
from plenum.test import waits from plenum.test.helper import sdk_send_random_and_check from plenum.test.node_catchup.helper import waitNodeDataEquality from plenum.test.pool_transactions.helper import sdk_add_new_steward_and_node from plenum.test.test_node import checkNodesConnected CHK_FREQ = 5 LOG_SIZE = 3 * CHK_FRE...
41.555556
80
0.72246
15f26f126f2c6165dd849cf156c3f7af1e2d95bf
292
py
Python
Django/users/urls.py
zarif007/Blog-site
e20e3f73fedbd7acb2f3d22398c36f3dcd4f88b4
[ "MIT" ]
1
2021-03-15T22:28:26.000Z
2021-03-15T22:28:26.000Z
Django/users/urls.py
zarif007/Blog-site
e20e3f73fedbd7acb2f3d22398c36f3dcd4f88b4
[ "MIT" ]
null
null
null
Django/users/urls.py
zarif007/Blog-site
e20e3f73fedbd7acb2f3d22398c36f3dcd4f88b4
[ "MIT" ]
null
null
null
from django.urls import path from .views import CustomUserCreate, BlacklistTokenUpdateView app_name = 'users' urlpatterns = [ path('create/', CustomUserCreate.as_view(), name="create_user"), path('logout/blacklist/', BlacklistTokenUpdateView.as_view(), name='blacklist') ]
26.545455
68
0.732877
fc4f9f615f696fd7084207acf75320326b2d95e4
2,003
py
Python
Ene-Jun-2021/perez-gutierrez-julio-cesar/Examen Extraordinario/Ejercicio-2/triangulo.py
jarmarj/DAS_Sistemas
36c876673e7abae503cc137c3f66585a0e45ed79
[ "MIT" ]
41
2017-09-26T09:36:32.000Z
2022-03-19T18:05:25.000Z
Ene-Jun-2021/perez-gutierrez-julio-cesar/Examen Extraordinario/Ejercicio-2/triangulo.py
jarmarj/DAS_Sistemas
36c876673e7abae503cc137c3f66585a0e45ed79
[ "MIT" ]
67
2017-09-11T05:06:12.000Z
2022-02-14T04:44:04.000Z
Ene-Jun-2021/perez-gutierrez-julio-cesar/Examen Extraordinario/Ejercicio-2/triangulo.py
jarmarj/DAS_Sistemas
36c876673e7abae503cc137c3f66585a0e45ed79
[ "MIT" ]
210
2017-09-01T00:10:08.000Z
2022-03-19T18:05:12.000Z
from abc import ABC, abstractmethod class Triangulo(ABC): def __init__(self, angulo1, angulo2, angulo3, lado1, lado2, lado3): self.angulo1 = angulo1 self.angulo2 = angulo2 self.angulo3 = angulo3 self.lado1 = lado1 self.lado2 = lado2 self.lado3 = lado3 ...
36.418182
105
0.607589
faab1fe2cdc7f651b0aa16e5d9b11d5c4991baac
33,941
py
Python
app_venv/Lib/site-packages/mysql/connector/cursor_cext.py
orlandofv/sianna
f07dd6dbc62a9604f31ab800e482e62f14fba766
[ "MIT" ]
null
null
null
app_venv/Lib/site-packages/mysql/connector/cursor_cext.py
orlandofv/sianna
f07dd6dbc62a9604f31ab800e482e62f14fba766
[ "MIT" ]
null
null
null
app_venv/Lib/site-packages/mysql/connector/cursor_cext.py
orlandofv/sianna
f07dd6dbc62a9604f31ab800e482e62f14fba766
[ "MIT" ]
null
null
null
# Copyright (c) 2014, 2021, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License, version 2.0, as # published by the Free Software Foundation. # # This program is also distributed with certain software (including # ...
32.417383
88
0.576913
c5bd00fff979b3eaa3d11b34d77d95a965f81c41
542
py
Python
garagei/torch/modules/reshape.py
artberryx/LSD
99ee081de2502b4d13c140b474f772db8a5f92fe
[ "MIT" ]
7
2022-02-01T03:02:24.000Z
2022-02-10T12:54:05.000Z
garagei/torch/modules/reshape.py
artberryx/LSD
99ee081de2502b4d13c140b474f772db8a5f92fe
[ "MIT" ]
null
null
null
garagei/torch/modules/reshape.py
artberryx/LSD
99ee081de2502b4d13c140b474f772db8a5f92fe
[ "MIT" ]
2
2022-02-03T03:33:25.000Z
2022-02-10T12:54:07.000Z
import numpy as np import torch from torch import nn class ReshapeModule(nn.Module): def __init__(self, shape): super().__init__() self.shape = shape def forward(self, x): assert np.prod(x.shape[1:]) == np.prod(self.shape) return x.reshape(-1, *self.shape) class ViewModule(nn...
21.68
58
0.607011
3184b705d9f26228049b22da9a076f6d64ebdbd4
225
py
Python
src/dat_analysis/analysis_tools/__init__.py
TimChild/dat_analysis
2902e5cb2f2823a1c7a26faf6b3b6dfeb7633c73
[ "MIT" ]
2
2021-03-07T03:17:13.000Z
2021-03-07T03:17:16.000Z
src/dat_analysis/analysis_tools/__init__.py
TimChild/dat_analysis
2902e5cb2f2823a1c7a26faf6b3b6dfeb7633c73
[ "MIT" ]
1
2021-03-09T00:00:52.000Z
2021-03-09T00:00:52.000Z
src/dat_analysis/analysis_tools/__init__.py
TimChild/dat_analysis
2902e5cb2f2823a1c7a26faf6b3b6dfeb7633c73
[ "MIT" ]
null
null
null
from .csq_mapping import calculate_csq_map, calculate_csq_mapped_avg, setup_csq_dat, csq_map_data from . import entropy from . import general_fitting from .nrg import NrgUtil, NRGParams, nrg_func, NRGData, NRG_func_generator
45
97
0.848889
c1cae7f307a37de6781d271c72c5c68d63533d14
3,258
py
Python
allennlp/modules/scalar_mix.py
cl-tohoku/allennlp
dffb549a3fe613913e97a34772e56a000a6a2860
[ "Apache-2.0" ]
null
null
null
allennlp/modules/scalar_mix.py
cl-tohoku/allennlp
dffb549a3fe613913e97a34772e56a000a6a2860
[ "Apache-2.0" ]
null
null
null
allennlp/modules/scalar_mix.py
cl-tohoku/allennlp
dffb549a3fe613913e97a34772e56a000a6a2860
[ "Apache-2.0" ]
null
null
null
from typing import List import torch from torch.nn import ParameterList, Parameter from allennlp.common.checks import ConfigurationError class ScalarMix(torch.nn.Module): """ Computes a parameterised scalar mixture of N tensors, ``mixture = gamma * sum(s_k * tensor_k)`` where ``s = softmax(w)``, with ``...
45.887324
104
0.606814
7eeddfa1ac02b302b51c4f5aea219b75c58fd1e5
18,827
py
Python
certbot/certbot/_internal/cert_manager.py
lpmitchell/certbot
fe0c0dc3ae6c25c6087e51717a223f38a9b23d2f
[ "Apache-2.0" ]
16,789
2016-05-06T19:49:59.000Z
2022-03-31T20:01:47.000Z
certbot/certbot/_internal/cert_manager.py
nicholascioli/certbot
86406ab63aebf463ca4aa0381a55ddeb91231cd2
[ "Apache-2.0" ]
5,737
2016-05-06T19:26:43.000Z
2022-03-31T20:27:38.000Z
certbot/certbot/_internal/cert_manager.py
nicholascioli/certbot
86406ab63aebf463ca4aa0381a55ddeb91231cd2
[ "Apache-2.0" ]
2,974
2016-05-06T19:51:23.000Z
2022-03-31T21:01:36.000Z
"""Tools for managing certificates.""" import datetime import logging import re import traceback from typing import Any from typing import Callable from typing import Iterable from typing import List from typing import Optional from typing import Tuple from typing import TypeVar from typing import Union import pytz f...
41.745011
99
0.65353
6455f39ce870b33430a7b3c16277cec12f106bf7
69,529
py
Python
Python-3.5.5/Lib/logging/__init__.py
it315/PSPNet-Keras-tensorflow
876448d9c44a8ca475cf0f60f69eb3c72651be87
[ "MIT" ]
10
2018-12-18T18:04:28.000Z
2021-04-23T07:31:13.000Z
Python-3.5.5/Lib/logging/__init__.py
it315/PSPNet-Keras-tensorflow
876448d9c44a8ca475cf0f60f69eb3c72651be87
[ "MIT" ]
5
2021-12-14T20:56:36.000Z
2021-12-20T14:45:34.000Z
Python-3.5.10/Lib/logging/__init__.py
AtriCZE23/POe-full
89be2fda5747e44764a62ba5e358d8c9309fbf0a
[ "MIT", "CNRI-Python-GPL-Compatible", "BSD-3-Clause" ]
3
2019-06-22T14:16:57.000Z
2021-12-29T22:04:42.000Z
# Copyright 2001-2016 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
35.401731
89
0.591077
03f90baae4ff70e1b31d69e4414b67e45ce1f979
64,620
py
Python
discord/abc.py
curiositIy/discord.py
f6a74f74a7aed0879fc086805eae8873e745d0ea
[ "MIT" ]
1
2021-12-21T16:30:30.000Z
2021-12-21T16:30:30.000Z
discord/abc.py
curiositIy/discord.py
f6a74f74a7aed0879fc086805eae8873e745d0ea
[ "MIT" ]
null
null
null
discord/abc.py
curiositIy/discord.py
f6a74f74a7aed0879fc086805eae8873e745d0ea
[ "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...
34.226695
154
0.595946
6855f86f9dbd0042e9b7c5f640f4f0a0337b4b1e
12,116
py
Python
feedparser/api.py
alexreg/feedparser
8a2a71b72d5b1454d456759d6270fa1dd18dfc4f
[ "BSD-2-Clause" ]
1,452
2015-01-06T07:56:10.000Z
2022-03-31T11:20:18.000Z
feedparser/api.py
alexreg/feedparser
8a2a71b72d5b1454d456759d6270fa1dd18dfc4f
[ "BSD-2-Clause" ]
279
2015-02-02T22:32:10.000Z
2022-03-29T21:45:56.000Z
feedparser/api.py
alexreg/feedparser
8a2a71b72d5b1454d456759d6270fa1dd18dfc4f
[ "BSD-2-Clause" ]
325
2015-02-03T21:28:01.000Z
2022-03-24T23:01:41.000Z
# The public API for feedparser # Copyright 2010-2021 Kurt McKee <contactme@kurtmckee.org> # Copyright 2002-2008 Mark Pilgrim # All rights reserved. # # This file is a part of feedparser. # # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following con...
39.855263
124
0.698085
8fa28b82796ff1989b56b27c5b05c4106998d5bb
1,613
py
Python
code/utiy.py
hjl2626/stu_manager
63b44dd0810d9dc324b458667ebd3f939b5ad5d3
[ "Apache-2.0" ]
1
2018-07-29T10:53:41.000Z
2018-07-29T10:53:41.000Z
code/utiy.py
hjl2626/stu_manager
63b44dd0810d9dc324b458667ebd3f939b5ad5d3
[ "Apache-2.0" ]
null
null
null
code/utiy.py
hjl2626/stu_manager
63b44dd0810d9dc324b458667ebd3f939b5ad5d3
[ "Apache-2.0" ]
null
null
null
import random def _get_name(): num = random.randint(2, 3) name = ''.join([chr(random.randint(0x4E00, 0x8377)) for i in range(num)]) if num == 2: return name[0] + ' ' + name[1] return name def _get_id(): return ''.join(random.sample('0123456789', 6)) def _get_sco(): return '%.1f' % ...
28.298246
114
0.50031
e5fa59c737fc8afbd1e405f75796b4a44d8e2d93
503
py
Python
qmla/exploration_strategies/demos/__init__.py
Evan1415/QMLA
4521f7c08456a4494aed7c1b78d8ded5ea40f3d8
[ "MIT" ]
null
null
null
qmla/exploration_strategies/demos/__init__.py
Evan1415/QMLA
4521f7c08456a4494aed7c1b78d8ded5ea40f3d8
[ "MIT" ]
null
null
null
qmla/exploration_strategies/demos/__init__.py
Evan1415/QMLA
4521f7c08456a4494aed7c1b78d8ded5ea40f3d8
[ "MIT" ]
null
null
null
from qmla.exploration_strategies.demos.example import * from qmla.exploration_strategies.demos.analytical import * from qmla.exploration_strategies.demos.demo_lattices import * from qmla.exploration_strategies.demos.learning_probes import * from qmla.exploration_strategies.demos.heuristics import * from qmla.explo...
55.888889
70
0.864811
64f09598975a9b23a6c64953c59d0644495239a1
572
py
Python
setup.py
JohnCrickett/CommandoMaths
278e178762cd8b0cac96fe3fc15a80212cff33c6
[ "MIT" ]
null
null
null
setup.py
JohnCrickett/CommandoMaths
278e178762cd8b0cac96fe3fc15a80212cff33c6
[ "MIT" ]
null
null
null
setup.py
JohnCrickett/CommandoMaths
278e178762cd8b0cac96fe3fc15a80212cff33c6
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name='CommandoMaths', author='John Crickett', author_email='john@trivialbusiness.co.uk', version='0.1.0.dev', packages=find_packages(), package_data={'commandomaths': ['resources/*']}, license='See LICENSE', long_description=open('READM...
26
52
0.618881
6bfa812b2856d854dcc773e9c780bf84d1ced696
1,530
py
Python
neural-tangents/examples/util.py
DarrenZhang01/Neural_Tangents_TensorFlow
2fd360c8b1b8c9106044034f6a8b5c2734db9c3d
[ "Apache-2.0" ]
4
2020-12-25T17:37:13.000Z
2022-01-03T17:00:23.000Z
neural-tangents/examples/util.py
DarrenZhang01/TensorFlow_GSoC
2fd360c8b1b8c9106044034f6a8b5c2734db9c3d
[ "Apache-2.0" ]
33
2020-07-18T18:57:54.000Z
2020-08-17T13:58:46.000Z
neural-tangents/examples/util.py
DarrenZhang01/Neural_Tangents_TensorFlow
2fd360c8b1b8c9106044034f6a8b5c2734db9c3d
[ "Apache-2.0" ]
1
2021-08-16T19:00:06.000Z
2021-08-16T19:00:06.000Z
# 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, ...
39.230769
79
0.677778
1d189508960364e96144da62b95c6b63cb331e62
8,987
py
Python
homeassistant/components/comfoconnect/sensor.py
zcmosz/home-assistant
58b4efe880478f8c66f0bf53e957268667301220
[ "Apache-2.0" ]
1
2021-01-10T05:35:53.000Z
2021-01-10T05:35:53.000Z
homeassistant/components/comfoconnect/sensor.py
zcmosz/home-assistant
58b4efe880478f8c66f0bf53e957268667301220
[ "Apache-2.0" ]
null
null
null
homeassistant/components/comfoconnect/sensor.py
zcmosz/home-assistant
58b4efe880478f8c66f0bf53e957268667301220
[ "Apache-2.0" ]
1
2020-02-24T16:17:42.000Z
2020-02-24T16:17:42.000Z
"""Platform to control a Zehnder ComfoAir Q350/450/600 ventilation unit.""" import logging from pycomfoconnect import ( SENSOR_BYPASS_STATE, SENSOR_DAYS_TO_REPLACE_FILTER, SENSOR_FAN_EXHAUST_DUTY, SENSOR_FAN_EXHAUST_FLOW, SENSOR_FAN_EXHAUST_SPEED, SENSOR_FAN_SUPPLY_DUTY, SENSOR_FAN_SUPPLY_F...
30.464407
80
0.663737
92329787e1f78fa2b395079190e18bf60385017d
26,131
py
Python
anadama2/grid/grid.py
biobakery/anadama2
39f791c8d8588ff92202c115c8e8e7fc25153c93
[ "MIT" ]
4
2020-06-08T22:10:48.000Z
2021-07-27T13:57:43.000Z
anadama2/grid/grid.py
biobakery/anadama2
39f791c8d8588ff92202c115c8e8e7fc25153c93
[ "MIT" ]
null
null
null
anadama2/grid/grid.py
biobakery/anadama2
39f791c8d8588ff92202c115c8e8e7fc25153c93
[ "MIT" ]
1
2020-09-10T08:29:22.000Z
2020-09-10T08:29:22.000Z
# -*- coding: utf-8 -*- import os import sys import threading try: import Queue except ImportError: import queue as Queue import time import tempfile import string import logging import itertools import re import six from .. import runners from .. import picklerunner from ..helpers import format_command fro...
36.444909
152
0.605526
12703fc35cb13a111f4d4a67edef7f21df62d678
2,844
py
Python
src/rubrix/sdk/models/text_classification_record_inputs.py
sakares/rubrix
791ffb29815b5d24f2bbbb0fa422f85f8b30098f
[ "Apache-2.0" ]
null
null
null
src/rubrix/sdk/models/text_classification_record_inputs.py
sakares/rubrix
791ffb29815b5d24f2bbbb0fa422f85f8b30098f
[ "Apache-2.0" ]
null
null
null
src/rubrix/sdk/models/text_classification_record_inputs.py
sakares/rubrix
791ffb29815b5d24f2bbbb0fa422f85f8b30098f
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2021-present, the Recognai S.L. 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 ...
32.318182
87
0.651899
7be89b1878e37a1d27590ceff7093e0168541eab
516
py
Python
ibsng/handler/group/del_group.py
ParspooyeshFanavar/pyibsng
d48bcf4f25e3f23461528bf0ff8870cc3d537444
[ "MIT" ]
6
2018-03-06T10:16:36.000Z
2021-12-05T12:43:10.000Z
ibsng/handler/group/del_group.py
ParspooyeshFanavar/pyibsng
d48bcf4f25e3f23461528bf0ff8870cc3d537444
[ "MIT" ]
3
2018-03-06T10:27:08.000Z
2022-01-02T15:21:27.000Z
ibsng/handler/group/del_group.py
ParspooyeshFanavar/pyibsng
d48bcf4f25e3f23461528bf0ff8870cc3d537444
[ "MIT" ]
3
2018-01-06T16:28:31.000Z
2018-09-17T19:47:19.000Z
"""Delete group API method.""" from ibsng.handler.handler import Handler class delGroup(Handler): """Delete group method class.""" def control(self): """Validate inputs after setup method. :return: None :rtype: None """ self.is_valid(self.group_name, str) def set...
20.64
46
0.591085
a91aace4b4b73696a2072b4c6c0785803cdba80a
3,024
py
Python
PythonCode/ModelPredictorModule.py
janw23/Ballance
f085d2d03c31a8e3be74d4c82300f571cc3cad65
[ "MIT" ]
2
2019-05-16T21:24:24.000Z
2019-05-19T15:24:03.000Z
PythonCode/ModelPredictorModule.py
janw23/Ballance
f085d2d03c31a8e3be74d4c82300f571cc3cad65
[ "MIT" ]
null
null
null
PythonCode/ModelPredictorModule.py
janw23/Ballance
f085d2d03c31a8e3be74d4c82300f571cc3cad65
[ "MIT" ]
null
null
null
import math import MathModule as MM #modul przeiwdywania przyszlej pozycji kulki class ModelPredictor: eta = 0.00001 #stala 'niedokladnosci' obliczen modelDelay = 0.2 #czas opoznienia reakcji rzeczywistego urzadzenia gravity = 9.81 anglePerServoSignal = 7.5 * 0.001 * math.pi / 180 #kat nachylen...
39.789474
111
0.637235
d9fa2107c380e2b8cf924c8b99282e9f1a5ef054
709
py
Python
home/migrations/0018_auto_20210806_1501.py
SoumyaRanjanPatnaik/Health-And-Safety-Dashboard
ad5ba26f280db0f199a0a4598959c0ec0b4d6515
[ "MIT" ]
1
2021-07-17T07:55:48.000Z
2021-07-17T07:55:48.000Z
home/migrations/0018_auto_20210806_1501.py
SoumyaRanjanPatnaik/Health-And-Safety-Dashboard
ad5ba26f280db0f199a0a4598959c0ec0b4d6515
[ "MIT" ]
null
null
null
home/migrations/0018_auto_20210806_1501.py
SoumyaRanjanPatnaik/Health-And-Safety-Dashboard
ad5ba26f280db0f199a0a4598959c0ec0b4d6515
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-08-06 15:01 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('home', '0017_auto_20210806_1420'), ] operations = [ migrations.AddField( model_name='log', ...
26.259259
93
0.610719
8f73d94fd3cdcb5b3078226c573445355eeb58ae
1,026
py
Python
bcs-ui/backend/resources/workloads/statefulset/formatter.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
599
2019-06-25T03:20:46.000Z
2022-03-31T12:14:33.000Z
bcs-ui/backend/resources/workloads/statefulset/formatter.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
537
2019-06-27T06:03:44.000Z
2022-03-31T12:10:01.000Z
bcs-ui/backend/resources/workloads/statefulset/formatter.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
214
2019-06-25T03:26:05.000Z
2022-03-31T07:52:03.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
41.04
115
0.779727
e0406c39fb352e91c6d82c7d9b9c7e3a34e61d8a
8,397
py
Python
train.py
neeleshnegi/chat-bot
1800cc0896ca30f573a3c8baa9719685908c1d5b
[ "MIT" ]
null
null
null
train.py
neeleshnegi/chat-bot
1800cc0896ca30f573a3c8baa9719685908c1d5b
[ "MIT" ]
null
null
null
train.py
neeleshnegi/chat-bot
1800cc0896ca30f573a3c8baa9719685908c1d5b
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf import argparse import time, datetime import os import pickle import sys from utils import TextLoader from model import Model def main(): assert sys.version_info >= (3, 3), \ "Must be run in Python 3.3 or later. You are running {}".format(sys.version) parser = ...
51.20122
107
0.611885
1c97eba874cd83943cd9affa8bb930ddb4922376
14,276
py
Python
tests/unit/fake_data_root/openstack/var/lib/juju/agents/unit-neutron-openvswitch-1/charm/hooks/neutron_ovs_context.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
17
2016-04-17T04:00:56.000Z
2020-08-19T12:03:18.000Z
tests/unit/fake_data_root/openstack/var/lib/juju/agents/unit-neutron-openvswitch-1/charm/hooks/neutron_ovs_context.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
111
2021-10-01T18:18:17.000Z
2022-03-29T12:23:20.000Z
tests/unit/fake_data_root/openstack/var/lib/juju/agents/unit-neutron-openvswitch-1/charm/hooks/neutron_ovs_context.py
KellenRenshaw/hotsos
e3fc51ab7f8af606a5846a3486a7fda23d761583
[ "Apache-2.0" ]
23
2016-03-23T11:12:19.000Z
2021-12-17T18:24:16.000Z
# Copyright 2016 Canonical Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
33.35514
79
0.612006
fb7f9fb3181dee5ddc7af47e73dea54387c79eba
32
py
Python
anjay.py
eechzaan/project
f842f5ceb0e7653c51e410413371a08e3b1b0f62
[ "MIT" ]
null
null
null
anjay.py
eechzaan/project
f842f5ceb0e7653c51e410413371a08e3b1b0f62
[ "MIT" ]
null
null
null
anjay.py
eechzaan/project
f842f5ceb0e7653c51e410413371a08e3b1b0f62
[ "MIT" ]
null
null
null
for i in range(10): print()
6.4
19
0.5625
1919e4dc4a184f40fb2eb92a78e8ef67161a93b0
1,516
py
Python
compilation/threshold-write-image.py
stcastle/shell-detection
cdc49190deae7310db66e56574b6737771821f31
[ "BSD-3-Clause" ]
3
2018-03-01T01:14:21.000Z
2020-04-17T08:49:32.000Z
compilation/threshold-write-image.py
SamTCastle/shell-detection
cdc49190deae7310db66e56574b6737771821f31
[ "BSD-3-Clause" ]
null
null
null
compilation/threshold-write-image.py
SamTCastle/shell-detection
cdc49190deae7310db66e56574b6737771821f31
[ "BSD-3-Clause" ]
null
null
null
''' threshold_write_image.py Experiment with OpenCV for FITS files. http://docs.opencv.org/trunk/doc/py_tutorials/py_tutorials.html Author: S.T. Castle Created: 20150226 ''' import numpy as np import cv2 import os.path def threshold(name, orig_img, blockSize, c): ''' name: original filename of the image ...
30.32
76
0.675462
468200722d3d4631d4cdf89007406ce8f257b074
5,603
py
Python
tensorflow_datasets/question_answering/ai2_arc.py
ChAnYaNG97/datasets
0a45e2ea98716d325fc1c5e5494f2575f3bdb908
[ "Apache-2.0" ]
1
2020-10-11T19:15:49.000Z
2020-10-11T19:15:49.000Z
tensorflow_datasets/question_answering/ai2_arc.py
ChAnYaNG97/datasets
0a45e2ea98716d325fc1c5e5494f2575f3bdb908
[ "Apache-2.0" ]
1
2021-02-23T20:16:05.000Z
2021-02-23T20:16:05.000Z
tensorflow_datasets/question_answering/ai2_arc.py
ChAnYaNG97/datasets
0a45e2ea98716d325fc1c5e5494f2575f3bdb908
[ "Apache-2.0" ]
1
2020-08-03T20:19:12.000Z
2020-08-03T20:19:12.000Z
# coding=utf-8 # Copyright 2020 The TensorFlow Datasets 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 appl...
34.374233
130
0.602177
1b864ad8e87cd52750a6e0ff60f762519a00f3fa
2,499
py
Python
speeches/behaviors/models.py
danesjenovdan/parlaspeeches
5431a167a483d1d67c380417a9d0b85ccec96249
[ "Unlicense" ]
null
null
null
speeches/behaviors/models.py
danesjenovdan/parlaspeeches
5431a167a483d1d67c380417a9d0b85ccec96249
[ "Unlicense" ]
3
2020-02-12T00:33:20.000Z
2021-06-10T20:09:24.000Z
speeches/behaviors/models.py
danesjenovdan/parlaspeeches
5431a167a483d1d67c380417a9d0b85ccec96249
[ "Unlicense" ]
1
2017-08-26T11:24:19.000Z
2017-08-26T11:24:19.000Z
from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.core.exceptions import ValidationError from django.core.validators import RegexValidator from django.db import models from django.utils.translation import ugettext_lazy as _ from model...
27.163043
84
0.685474
7579009cc06014b7ad847f5bf5f07d1a9ad97df6
1,168
py
Python
ddtrace/contrib/dogpile_cache/region.py
mykytarudenko/new-project
e06a912382239739dd3f93b54d545b9506102372
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
ddtrace/contrib/dogpile_cache/region.py
mykytarudenko/new-project
e06a912382239739dd3f93b54d545b9506102372
[ "Apache-2.0", "BSD-3-Clause" ]
9
2021-07-26T01:22:38.000Z
2022-03-21T19:20:53.000Z
ddtrace/contrib/dogpile_cache/region.py
mykytarudenko/new-project
e06a912382239739dd3f93b54d545b9506102372
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
import dogpile from ddtrace.ext import SpanTypes from ...constants import SPAN_MEASURED_KEY from ...pin import Pin def _wrap_get_create(func, instance, args, kwargs): pin = Pin.get_from(dogpile.cache) if not pin or not pin.enabled(): return func(*args, **kwargs) key = args[0] with pin.trace...
33.371429
104
0.683219
b74943a2017281116723e5750d9d310fe7ff23bb
3,078
py
Python
spiders/spider/spider/settings.py
dingzhaohan/deep_research
8d4373e32d75a348368d46eca2dd1b26d8d93c4b
[ "Apache-2.0" ]
2
2020-02-20T01:57:20.000Z
2020-09-12T12:43:46.000Z
spiders/spider/spider/settings.py
dingzhaohan/deep_research
8d4373e32d75a348368d46eca2dd1b26d8d93c4b
[ "Apache-2.0" ]
null
null
null
spiders/spider/spider/settings.py
dingzhaohan/deep_research
8d4373e32d75a348368d46eca2dd1b26d8d93c4b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Scrapy settings for spider project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # https://docs.scrapy.org/en/latest/topics/settings.html # https://docs.scrapy.org/en/latest/topi...
33.824176
103
0.774204
f62487cb8e45be0449175fff4320b71c15ad3da1
3,514
py
Python
libestatecassandra/estate_cassandra.py
mpeuster/estate
4cb94201e8110f09ac72c54e7d282e8c38aee415
[ "Apache-2.0" ]
1
2021-04-28T05:13:30.000Z
2021-04-28T05:13:30.000Z
libestatecassandra/estate_cassandra.py
mpeuster/estate
4cb94201e8110f09ac72c54e7d282e8c38aee415
[ "Apache-2.0" ]
null
null
null
libestatecassandra/estate_cassandra.py
mpeuster/estate
4cb94201e8110f09ac72c54e7d282e8c38aee415
[ "Apache-2.0" ]
null
null
null
""" libestate prototype using cassandra as backend idea: test different consistency models """ from cassandra import ConsistencyLevel from cassandra.cqlengine import columns from cassandra.cqlengine import connection from cassandra.cqlengine import management from cassandra.cqlengine import models from cassandra.cq...
33.788462
99
0.631759
f59e76b7bf9c99da6263ebfe38308b234796e431
420
py
Python
ML_and_DL/loss_fucntion.py
AshfakYeafi/AI_practice_code
3d8a0b9382f5903e840ce59218ebb95ca962ab01
[ "MIT" ]
null
null
null
ML_and_DL/loss_fucntion.py
AshfakYeafi/AI_practice_code
3d8a0b9382f5903e840ce59218ebb95ca962ab01
[ "MIT" ]
null
null
null
ML_and_DL/loss_fucntion.py
AshfakYeafi/AI_practice_code
3d8a0b9382f5903e840ce59218ebb95ca962ab01
[ "MIT" ]
null
null
null
import numpy as np y=np.array([1,0,1,1,1,0,0,1,0,1]) y_predict=np.array([1,1,1,0,1,0,0,1,0,0]) # −(ylog(p)+(1−y)log(1−p)) ellipsis = 1e-15 def log_loss(y,y_predict): ellipsis=1e-15 y_predict = np.array([max(i, ellipsis) for i in y_predict]) y_predict = np.array([min(i, 1 - ellipsis) for i in y_predict]) ...
30
71
0.645238
4eec0382de1df8770e61f26998ee6b937f362553
2,473
py
Python
moderngl_window/context/sdl2/keys.py
DavideRuzza/moderngl-window
e9debc6ed4a1899aa83c0da2320e03b0c2922b80
[ "MIT" ]
142
2019-11-11T23:14:28.000Z
2022-03-29T08:37:03.000Z
moderngl_window/context/sdl2/keys.py
DavideRuzza/moderngl-window
e9debc6ed4a1899aa83c0da2320e03b0c2922b80
[ "MIT" ]
107
2019-10-31T20:31:45.000Z
2022-03-23T15:01:41.000Z
moderngl_window/context/sdl2/keys.py
DavideRuzza/moderngl-window
e9debc6ed4a1899aa83c0da2320e03b0c2922b80
[ "MIT" ]
36
2019-12-12T16:14:10.000Z
2022-01-18T22:58:21.000Z
# flake8: noqa E741 import sdl2 from moderngl_window.context.base import BaseKeys class Keys(BaseKeys): """ Namespace mapping SDL2 specific key constants """ ACTION_PRESS = sdl2.SDL_KEYDOWN ACTION_RELEASE = sdl2.SDL_KEYUP ESCAPE = sdl2.SDLK_ESCAPE SPACE = sdl2.SDLK_SPACE ...
24.009709
50
0.627173
164c03509ca80665fb3bd5a5d50998bd1fd59ebc
522
py
Python
src/core_backend/utils/json_print.py
jhchen3121/wechat_shop
c9d9ad009df1e5bb0eb23ca8d830dd5c15df5328
[ "Apache-2.0" ]
null
null
null
src/core_backend/utils/json_print.py
jhchen3121/wechat_shop
c9d9ad009df1e5bb0eb23ca8d830dd5c15df5328
[ "Apache-2.0" ]
5
2021-01-28T21:18:27.000Z
2022-03-25T19:10:01.000Z
src/core_backend/utils/json_print.py
jhchen3121/wechat_shop
c9d9ad009df1e5bb0eb23ca8d830dd5c15df5328
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals from __future__ import absolute_import import json from core_backend.utils.json import CustomerEncoder from pygments import highlight from pygments.lexers import JsonLexer from pygments.formatters import TerminalFormatter def json_...
32.625
100
0.796935
44e1ab3156b8fe736839b72898a10a169b47b337
2,663
py
Python
kornia/losses/divergence.py
ChristophReich1996/kornia
35f955b46e8015da1cb9faa28c6943ec2b09cc2a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
kornia/losses/divergence.py
ChristophReich1996/kornia
35f955b46e8015da1cb9faa28c6943ec2b09cc2a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
kornia/losses/divergence.py
ChristophReich1996/kornia
35f955b46e8015da1cb9faa28c6943ec2b09cc2a
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
r"""Losses based on the divergence between probability distributions.""" import torch import torch.nn.functional as F def _kl_div_2d(p: torch.Tensor, q: torch.Tensor) -> torch.Tensor: # D_KL(P || Q) batch, chans, height, width = p.shape unsummed_kl = F.kl_div( q.reshape(batch * chans, height * wi...
35.986486
87
0.622231
44ac336ed558349611b5be390683c1fe716d316f
1,032
py
Python
djAidESILV/shopping_cart/models.py
Kulumbaf/AidESILV
04dad828048edffdd3662b24c415edce22fd3ea3
[ "MIT" ]
null
null
null
djAidESILV/shopping_cart/models.py
Kulumbaf/AidESILV
04dad828048edffdd3662b24c415edce22fd3ea3
[ "MIT" ]
null
null
null
djAidESILV/shopping_cart/models.py
Kulumbaf/AidESILV
04dad828048edffdd3662b24c415edce22fd3ea3
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from django.db import models from account.models import UserProfile from products.models import Product class OrderItem(models.Model): product = models.OneToOneField(Product, on_delete=models.SET_NULL, null=True) is_ordered = models.BooleanField(default=False) dat...
31.272727
81
0.737403
9835c10978719609d7260513131261f1b1a0579d
16,506
py
Python
scripts/create_fakes.py
lbanner/osf.io
1898ef0ff8bd91713e94c60e7463b5f81ac62caa
[ "Apache-2.0" ]
null
null
null
scripts/create_fakes.py
lbanner/osf.io
1898ef0ff8bd91713e94c60e7463b5f81ac62caa
[ "Apache-2.0" ]
null
null
null
scripts/create_fakes.py
lbanner/osf.io
1898ef0ff8bd91713e94c60e7463b5f81ac62caa
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Fake data generator. To use: 1. Install fake-factory. pip install fake-factory 2. Create your OSF user account 3. Run the script, passing in your username (email). :: python -m scripts.create_fakes --user fred@cos.io This will create 3 fake public projects, each with 3 fake con...
53.073955
118
0.591058
11ccd1f6ff25eb6ec3298ee5dc66c04fb6232f1c
3,038
py
Python
TemaLib/tema/coverage/dummycoverage.py
tema-tut/tema-tg
9c3f119c8bf5cc565e6a3e8e9e6205037e326d89
[ "MIT" ]
null
null
null
TemaLib/tema/coverage/dummycoverage.py
tema-tut/tema-tg
9c3f119c8bf5cc565e6a3e8e9e6205037e326d89
[ "MIT" ]
null
null
null
TemaLib/tema/coverage/dummycoverage.py
tema-tut/tema-tg
9c3f119c8bf5cc565e6a3e8e9e6205037e326d89
[ "MIT" ]
1
2021-03-27T21:27:32.000Z
2021-03-27T21:27:32.000Z
#!/usr/bin/env python # Copyright (c) 2006-2010 Tampere University of Technology # # 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 rig...
36.60241
98
0.704411
bf23af668967713752b766aaa38ef65787a2a859
2,187
py
Python
backend/test_34087/urls.py
crowdbotics-apps/test-34087
e04f7ebd844388dae45dbf765e988716c3a0aeb5
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/test_34087/urls.py
crowdbotics-apps/test-34087
e04f7ebd844388dae45dbf765e988716c3a0aeb5
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/test_34087/urls.py
crowdbotics-apps/test-34087
e04f7ebd844388dae45dbf765e988716c3a0aeb5
[ "FTL", "AML", "RSA-MD" ]
null
null
null
"""test_34087 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-ba...
34.714286
87
0.709191
58d5048ecfe35af7e845e7b271b9793f82e1e34e
1,996
py
Python
cvpods/layers/swap_align2nat.py
hanqiu-hq/cvpods
597fa669151fdad87c250fa118a9e3a555f4fb5e
[ "Apache-2.0" ]
null
null
null
cvpods/layers/swap_align2nat.py
hanqiu-hq/cvpods
597fa669151fdad87c250fa118a9e3a555f4fb5e
[ "Apache-2.0" ]
null
null
null
cvpods/layers/swap_align2nat.py
hanqiu-hq/cvpods
597fa669151fdad87c250fa118a9e3a555f4fb5e
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved from torch import nn from torch.autograd import Function from torch.autograd.function import once_differentiable from cvpods import _C class _SwapAlign2Nat(Function): @staticmethod def forward(ctx, X, lambda_val, pad_val): ctx.lam...
33.266667
87
0.64479
57fb13d098052cbca253144c458e8a54087f07f8
15,734
py
Python
pyzoo/zoo/ray/raycontext.py
taogeanton2/analytics-zoo
e111f445486d971c6dbc3bfde313cff9842cc163
[ "Apache-2.0" ]
1
2020-05-18T02:37:10.000Z
2020-05-18T02:37:10.000Z
pyzoo/zoo/ray/raycontext.py
taogeanton2/analytics-zoo
e111f445486d971c6dbc3bfde313cff9842cc163
[ "Apache-2.0" ]
null
null
null
pyzoo/zoo/ray/raycontext.py
taogeanton2/analytics-zoo
e111f445486d971c6dbc3bfde313cff9842cc163
[ "Apache-2.0" ]
null
null
null
# # Copyright 2018 Analytics Zoo 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...
43.464088
100
0.60722
fd02b1f55bd7f591a8c2f654b1d53ca75fd4e963
820
py
Python
alipay/aop/api/domain/AlipayOpenXwbtesttomsgapiSyncModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/domain/AlipayOpenXwbtesttomsgapiSyncModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/domain/AlipayOpenXwbtesttomsgapiSyncModel.py
snowxmas/alipay-sdk-python-all
96870ced60facd96c5bce18d19371720cbda3317
[ "Apache-2.0" ]
59
2018-08-27T16:59:26.000Z
2022-03-25T10:08:15.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayOpenXwbtesttomsgapiSyncModel(object): def __init__(self): self._xwb = None @property def xwb(self): return self._xwb @xwb.setter def xwb(self, value): ...
20
57
0.558537
43e7468c37ee21f3be050bab3fc7c2c58568418c
1,844
py
Python
mat.py
arcangelo7/Meta-Analyser-Tool
c6fc6bb1870a10efe39634687b388946dd8bb762
[ "0BSD" ]
null
null
null
mat.py
arcangelo7/Meta-Analyser-Tool
c6fc6bb1870a10efe39634687b388946dd8bb762
[ "0BSD" ]
null
null
null
mat.py
arcangelo7/Meta-Analyser-Tool
c6fc6bb1870a10efe39634687b388946dd8bb762
[ "0BSD" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2019, # Silvio Peroni <silvio.peroni@unibo.it> # # Permission to use, copy, modify, and/or distribute this software for any purpose # with or without fee is hereby granted, provided that the above copyright notice # and this permission notice appear in all copies. # # THE SOFTWAR...
40.977778
87
0.755423
40ee4ed83f923065e39ef73fb28892862e50e4db
1,264
py
Python
quantnode/structures.py
quantnode/quantnode-client
64c849d1f79e1113b7d408a6727284c3ff5b054e
[ "MIT" ]
1
2015-03-07T18:57:11.000Z
2015-03-07T18:57:11.000Z
quantnode/structures.py
quantnode/quantnode-client
64c849d1f79e1113b7d408a6727284c3ff5b054e
[ "MIT" ]
null
null
null
quantnode/structures.py
quantnode/quantnode-client
64c849d1f79e1113b7d408a6727284c3ff5b054e
[ "MIT" ]
null
null
null
class DotDict(dict): """ A 'dotted dictionary' Simple dictionary wrapper that overrides the dot operator with dictionary getter and setter so that instance['value'] is equivalent to instance.value """ def __setattr__(self, k, v): if k[0] == '_' or k in self.__dict__: return s...
29.395349
95
0.528481
77e86dadcc855cf0ba381407dc2772546becf579
2,470
py
Python
interview_qns/linked_list.py
shiram/learning-django-rest
3e6d26212429c423851cef047eea3c7a820e8e58
[ "Apache-2.0" ]
null
null
null
interview_qns/linked_list.py
shiram/learning-django-rest
3e6d26212429c423851cef047eea3c7a820e8e58
[ "Apache-2.0" ]
null
null
null
interview_qns/linked_list.py
shiram/learning-django-rest
3e6d26212429c423851cef047eea3c7a820e8e58
[ "Apache-2.0" ]
null
null
null
class Node: def __init__(self, dataval=None): self.dataval = dataval self.nextval = None class SingleLinkedList: def __init__(self): self.headval = None def traverse(self): printval = self.headval list_string = "" while printval is not None: list...
27.752809
97
0.601215
abdce969985bba575a471cbd06f1f9eaccbc27eb
6,647
py
Python
.pc/hg-updates.diff/Lib/tkinter/test/test_tkinter/test_variables.py
Hadron/python
73137f499ed658169f49273eee46845e3b53e800
[ "PSF-2.0" ]
486
2016-05-28T18:51:54.000Z
2022-03-20T17:30:31.000Z
.pc/hg-updates.diff/Lib/tkinter/test/test_tkinter/test_variables.py
Hadron/python
73137f499ed658169f49273eee46845e3b53e800
[ "PSF-2.0" ]
40
2016-05-29T00:24:56.000Z
2020-07-13T11:56:58.000Z
.pc/hg-updates.diff/Lib/tkinter/test/test_tkinter/test_variables.py
Hadron/python
73137f499ed658169f49273eee46845e3b53e800
[ "PSF-2.0" ]
74
2015-05-29T17:18:53.000Z
2022-01-15T14:06:44.000Z
import unittest from tkinter import (Variable, StringVar, IntVar, DoubleVar, BooleanVar, Tcl, TclError) class Var(Variable): _default = "default" side_effect = False def set(self, value): self.side_effect = True super().set(value) class TestBase(unittest.TestCase)...
31.206573
77
0.606289
8053e20f581178fa1653e5a1574177dd5703ab87
74
py
Python
mlsim/__init__.py
brownsarahm/ml-sim
26c03e65c57a2ffc3784e6e79eaa76100f0bf391
[ "MIT" ]
1
2020-11-18T21:08:17.000Z
2020-11-18T21:08:17.000Z
mlsim/__init__.py
brownsarahm/ml-sim
26c03e65c57a2ffc3784e6e79eaa76100f0bf391
[ "MIT" ]
2
2020-02-11T21:37:03.000Z
2020-07-09T01:10:49.000Z
mlsim/__init__.py
brownsarahm/ml-sim
26c03e65c57a2ffc3784e6e79eaa76100f0bf391
[ "MIT" ]
null
null
null
from . import anomaly from . import bias __all__ = ['bias','anomaly']
9.25
28
0.662162
89c0bf36d7b103b646df6f313f741523feb852e7
634
py
Python
agent0/common/vec_env/__init__.py
zhoubin-me/agent0
1184827077e43dfa63e1f24a004fcc6c3e3d5130
[ "MIT" ]
null
null
null
agent0/common/vec_env/__init__.py
zhoubin-me/agent0
1184827077e43dfa63e1f24a004fcc6c3e3d5130
[ "MIT" ]
null
null
null
agent0/common/vec_env/__init__.py
zhoubin-me/agent0
1184827077e43dfa63e1f24a004fcc6c3e3d5130
[ "MIT" ]
null
null
null
from .dummy_vec_env import DummyVecEnv from .shmem_vec_env import ShmemVecEnv from .subproc_vec_env import SubprocVecEnv from .vec_env import AlreadySteppingError, NotSteppingError, VecEnv, VecEnvWrapper, VecEnvObservationWrapper, \ CloudpickleWrapper from .vec_frame_stack import VecFrameStack from .vec_monitor imp...
57.636364
246
0.829653
465d237f4c57946c16db4d17be14dff3747dbb86
2,978
py
Python
conans/test/functional/deploy_test.py
amatoshka/conan
c2726e8c255adb120b5f7bdee9e3ec0bc90f1d7a
[ "MIT" ]
null
null
null
conans/test/functional/deploy_test.py
amatoshka/conan
c2726e8c255adb120b5f7bdee9e3ec0bc90f1d7a
[ "MIT" ]
2
2018-02-22T21:28:04.000Z
2018-09-28T13:51:47.000Z
conans/test/functional/deploy_test.py
amatoshka/conan
c2726e8c255adb120b5f7bdee9e3ec0bc90f1d7a
[ "MIT" ]
null
null
null
import os import unittest from parameterized.parameterized import parameterized from conans.model.manifest import FileTreeManifest from conans.test.utils.test_files import temp_folder from conans.test.utils.tools import TestClient from conans.util.files import load, mkdir class DeployTest(unittest.TestCase): @p...
37.696203
95
0.572532
a4490577576ace8a7ae9268ce013320822db68f4
3,146
py
Python
build/lib/gains/tests/test_density.py
BeckResearchLab/gains
fa3e008cfd129b1a0411368306eaad0b62309ae0
[ "MIT" ]
7
2018-06-21T16:58:32.000Z
2019-12-11T19:57:37.000Z
build/lib/gains/tests/test_density.py
BeckResearchLab/gains
fa3e008cfd129b1a0411368306eaad0b62309ae0
[ "MIT" ]
5
2018-04-04T16:19:27.000Z
2018-05-23T01:46:18.000Z
build/lib/gains/tests/test_density.py
BeckResearchLab/gains
fa3e008cfd129b1a0411368306eaad0b62309ae0
[ "MIT" ]
2
2018-07-12T05:05:04.000Z
2019-12-03T05:39:45.000Z
from __future__ import absolute_import, division, print_function import gains as genetic from rdkit.Chem import AllChem as Chem from rdkit.ML.Descriptors.MoleculeDescriptors import\ MolecularDescriptorCalculator as calculator import numpy as np import unittest import datetime from math import exp import random cl...
35.75
71
0.630642
a2e21cd55be4823e8cb56fa538e704d8c1c46fbd
69,468
py
Python
python/paddle/fluid/executor.py
mamingjie-China/Paddle
91d2f1e3e6e51142a74a43d0673a8feff056c39b
[ "Apache-2.0" ]
1
2021-12-20T09:44:25.000Z
2021-12-20T09:44:25.000Z
python/paddle/fluid/executor.py
Janayt/Paddle
68c6160e639be38c57a7dd831f7b841b33e92676
[ "Apache-2.0" ]
null
null
null
python/paddle/fluid/executor.py
Janayt/Paddle
68c6160e639be38c57a7dd831f7b841b33e92676
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2018 PaddlePaddle 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 app...
43.121043
128
0.593223
dfa885c2348eb8d5c4c3ee99f858412efa1e82bd
6,251
py
Python
tests/conftest.py
oterrier/openapi-python-client
ca8acdbe34b11584143b78afc130684f0690d5bf
[ "MIT" ]
1
2022-03-02T08:15:26.000Z
2022-03-02T08:15:26.000Z
tests/conftest.py
oterrier/openapi-python-client
ca8acdbe34b11584143b78afc130684f0690d5bf
[ "MIT" ]
null
null
null
tests/conftest.py
oterrier/openapi-python-client
ca8acdbe34b11584143b78afc130684f0690d5bf
[ "MIT" ]
null
null
null
from typing import Any, Callable, Dict import pytest from openapi_python_client.parser.properties import ( AnyProperty, DateProperty, DateTimeProperty, EnumProperty, FileProperty, IntProperty, ListProperty, ModelProperty, Property, StringProperty, UnionProperty, ) @pytest...
28.674312
112
0.681011
32f11132095e12efea852f9cbbc4009e5275c1d6
6,496
py
Python
classes/realsense.py
snavas/PyMote
9ac51251abbc943fcd36fbb58ff5c3031d375c14
[ "MIT" ]
3
2021-01-09T13:51:49.000Z
2022-02-22T20:32:34.000Z
classes/realsense.py
snavas/GECCO
9ac51251abbc943fcd36fbb58ff5c3031d375c14
[ "MIT" ]
11
2020-11-20T11:06:34.000Z
2022-03-12T00:54:17.000Z
classes/realsense.py
snavas/PyMote
9ac51251abbc943fcd36fbb58ff5c3031d375c14
[ "MIT" ]
null
null
null
#from device import Device from classes.device import Device import pyrealsense2 as rs import numpy as np import cv2 class RealSense(Device): #pipeline = rs.pipeline() def getcolorintrinsics(self): return self.color_intr def getdepthintrinsics(self): return self.depth_intr def getiri...
41.909677
124
0.664409
d4425032785310871a42971b84fc330ff517f757
874
py
Python
tests/simple_pages_test.py
EDS435/IS219-Advanced
06f3c358a781d4d41b13716536e20260228a2e29
[ "BSD-3-Clause" ]
1
2022-03-04T16:05:47.000Z
2022-03-04T16:05:47.000Z
tests/simple_pages_test.py
EDS435/IS219-Advanced
06f3c358a781d4d41b13716536e20260228a2e29
[ "BSD-3-Clause" ]
1
2022-03-02T20:18:51.000Z
2022-03-02T20:18:51.000Z
tests/simple_pages_test.py
EDS435/IS219-Advanced
06f3c358a781d4d41b13716536e20260228a2e29
[ "BSD-3-Clause" ]
4
2022-02-23T18:37:17.000Z
2022-02-23T21:17:32.000Z
"""This test the homepage""" def test_request_main_menu_links(client): """This makes the index page""" response = client.get("/") assert response.status_code == 200 assert b'<li><a href="/page/about">About</a></li>' in response.data assert b'<li><a href="/page/welcome">Welcome</a></li>' in response...
31.214286
75
0.683066
804673849be60263f7484601d158a27e8ad2e092
540
py
Python
ectyper/loggingFunctions.py
phac-nml/ecoli_serotyping
52293255ca02dd9631d637265ac7d6a5d7bfbb82
[ "Apache-2.0" ]
19
2017-01-19T18:05:23.000Z
2021-07-26T22:16:42.000Z
ectyper/loggingFunctions.py
phac-nml/ecoli_serotyping
52293255ca02dd9631d637265ac7d6a5d7bfbb82
[ "Apache-2.0" ]
17
2017-07-19T17:26:43.000Z
2022-01-14T19:19:39.000Z
ectyper/loggingFunctions.py
phac-nml/ecoli_serotyping
52293255ca02dd9631d637265ac7d6a5d7bfbb82
[ "Apache-2.0" ]
6
2017-01-19T18:21:17.000Z
2022-03-07T20:46:12.000Z
import logging def create_logger(): """ Create the logger for ectyper :return: The root logger for the program """ log = logging.getLogger('ectyper') formatter = logging.Formatter( '%(asctime)s %(name)-12s %(levelname)-8s %(message)s') log.setLevel(logging.DEBUG) # define a H...
20.769231
77
0.672222
f12c8f5a1f9e57fc3e186b8331f1d0a2a45f18bb
750
py
Python
python/src/leetcode/2020/20.py
ccampo133/coding-challenges
618b51d2d6f6946d3756c68b0008a178d80952ae
[ "MIT" ]
null
null
null
python/src/leetcode/2020/20.py
ccampo133/coding-challenges
618b51d2d6f6946d3756c68b0008a178d80952ae
[ "MIT" ]
null
null
null
python/src/leetcode/2020/20.py
ccampo133/coding-challenges
618b51d2d6f6946d3756c68b0008a178d80952ae
[ "MIT" ]
null
null
null
class Solution: def isValid(self, s: str) -> bool: closed = { ')': '(', '}': '{', ']': '[' } stack = [] for c in s: if c in closed: if len(stack) == 0: return False prev = stack.pop()...
22.058824
38
0.392
4d2b25f9cde689a7c1b019eed38b4011963ea06e
13,845
py
Python
nets-in-progress/8r-1c-srv6-pm/isis8d.py
x-Ultra/rose-srv6-tutorial
fb1a074d0490234eeec20f491bd39ceb91156994
[ "Apache-2.0" ]
8
2020-06-28T15:33:48.000Z
2021-10-15T00:18:49.000Z
nets-in-progress/8r-1c-srv6-pm/isis8d.py
x-Ultra/rose-srv6-tutorial
fb1a074d0490234eeec20f491bd39ceb91156994
[ "Apache-2.0" ]
9
2020-05-12T22:44:06.000Z
2022-01-04T02:11:45.000Z
nets-in-progress/8r-1c-srv6-pm/isis8d.py
x-Ultra/rose-srv6-tutorial
fb1a074d0490234eeec20f491bd39ceb91156994
[ "Apache-2.0" ]
4
2020-06-16T10:32:27.000Z
2021-11-27T14:34:01.000Z
#!/usr/bin/python # pylint: disable=missing-module-docstring # pylint: disable=missing-function-docstring # pylint: disable=missing-class-docstring import os import shutil import sys from argparse import ArgumentParser import python_hosts from dotenv import load_dotenv from mininet.cli import CLI # from mininet.link...
32.964286
84
0.635247
b1f9a4604433639a386c822a7d132a063e8b45cb
9,376
py
Python
xlsxwriter/test/worksheet/test_sparkline11.py
yxwlr995/-Python-Pandas-XlsxWriter
cd28c1b968795b67f3013c49a0e02ffda5898163
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/worksheet/test_sparkline11.py
yxwlr995/-Python-Pandas-XlsxWriter
cd28c1b968795b67f3013c49a0e02ffda5898163
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/worksheet/test_sparkline11.py
yxwlr995/-Python-Pandas-XlsxWriter
cd28c1b968795b67f3013c49a0e02ffda5898163
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest from ..compatibility import StringIO from ..helperfunctions import _xml_to_list from ...worksheet import Worksheet class TestAssembleW...
44.018779
337
0.360602
fbdf99fa9089d23f97064fb031bacc1f156ee4d0
5,784
py
Python
nf_ea_com_bnop_source/b_code/migrations/nf_ea_com_to_bnop/migrators/ea_subtyping_connectors_migrator.py
boro-alpha/nf_ea_com_bnop
21a500bc84304b2709a5a58dbea1d69cfc048f7e
[ "MIT" ]
null
null
null
nf_ea_com_bnop_source/b_code/migrations/nf_ea_com_to_bnop/migrators/ea_subtyping_connectors_migrator.py
boro-alpha/nf_ea_com_bnop
21a500bc84304b2709a5a58dbea1d69cfc048f7e
[ "MIT" ]
null
null
null
nf_ea_com_bnop_source/b_code/migrations/nf_ea_com_to_bnop/migrators/ea_subtyping_connectors_migrator.py
boro-alpha/nf_ea_com_bnop
21a500bc84304b2709a5a58dbea1d69cfc048f7e
[ "MIT" ]
null
null
null
from bnop_source.b_code.bnop_facades import BnopFacades from bnop_source.b_code.core.object_model.bnop_repositories import BnopRepositories from bnop_source.b_code.core.object_model.objects.bnop_objects import BnopObjects from boro_common_source.ckids.boro_object_ckids import BoroObjectCkIds from nf_common_source.code....
42.529412
155
0.763658
e4098159c8d77581a4206fd7e90ebd21515f728a
7,127
py
Python
utils.py
hengshuangliu/Practice-of-JSRG
90a13004d5e7e37bab0ea3f58d53b9250d97adc8
[ "Apache-2.0" ]
null
null
null
utils.py
hengshuangliu/Practice-of-JSRG
90a13004d5e7e37bab0ea3f58d53b9250d97adc8
[ "Apache-2.0" ]
null
null
null
utils.py
hengshuangliu/Practice-of-JSRG
90a13004d5e7e37bab0ea3f58d53b9250d97adc8
[ "Apache-2.0" ]
null
null
null
#! usr/bin/env python """ Created on Fri May 20 09:09:27 2016 merge images and extract a part of them randomly. @author: shuang """ #import tensorflow as tf import numpy as np import os import random import shutil import PIL.Image from cStringIO import StringIO from IPython.display import clear_output, Image, displa...
36.362245
115
0.580609
24f2ea84b32f8d7b9aae3334f00cb8f687cfe5b7
7,521
py
Python
deploy-aks/azext_aks_deploy/dev/aks/up.py
atbagga/cli-extension-aks-up
0e28e4120a2eecac825a3d4fd11539ec922b1895
[ "MIT" ]
null
null
null
deploy-aks/azext_aks_deploy/dev/aks/up.py
atbagga/cli-extension-aks-up
0e28e4120a2eecac825a3d4fd11539ec922b1895
[ "MIT" ]
10
2019-12-19T08:18:59.000Z
2020-01-28T09:54:47.000Z
deploy-aks/azext_aks_deploy/dev/aks/up.py
atbagga/cli-extension-aks-up
0e28e4120a2eecac825a3d4fd11539ec922b1895
[ "MIT" ]
4
2019-12-09T06:03:04.000Z
2020-01-02T10:40:39.000Z
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
49.807947
111
0.653636
c25277d771538e45826dca99de727dec34e39427
1,102
py
Python
stweet/file_reader/read_from_file.py
enginbozaba/stweet-twitter-api
060250e00a01ae53c2ca12954719b5efc918e132
[ "MIT" ]
null
null
null
stweet/file_reader/read_from_file.py
enginbozaba/stweet-twitter-api
060250e00a01ae53c2ca12954719b5efc918e132
[ "MIT" ]
null
null
null
stweet/file_reader/read_from_file.py
enginbozaba/stweet-twitter-api
060250e00a01ae53c2ca12954719b5efc918e132
[ "MIT" ]
null
null
null
"""Methods to read tweets from files.""" import json from typing import List import pandas as pd from ..model.tweet import Tweet def read_from_csv(file_path: str) -> List[Tweet]: """Method to read tweets from csv file.""" df = pd.read_csv(file_path, dtype={ 'quoted_status_id_str': str, 'in_...
33.393939
88
0.702359
fe2db0c6670d327cca552e693aecbce693d02c3e
15,227
py
Python
utils/handle_modes.py
Djack1010/sciba_malwareImg2smali
2bbe1a90b16abdb99a7ac3a3d31cbb84808d8e68
[ "MIT" ]
null
null
null
utils/handle_modes.py
Djack1010/sciba_malwareImg2smali
2bbe1a90b16abdb99a7ac3a3d31cbb84808d8e68
[ "MIT" ]
null
null
null
utils/handle_modes.py
Djack1010/sciba_malwareImg2smali
2bbe1a90b16abdb99a7ac3a3d31cbb84808d8e68
[ "MIT" ]
1
2021-04-21T02:33:20.000Z
2021-04-21T02:33:20.000Z
import tensorflow as tf from utils.generic_utils import print_log import utils.config as config import os import datetime import time from utils.analyzing_data import multiclass_analysis import pickle import cv2 import numpy as np def get_label(file_path): # convert the path to a list of path components parts...
46.42378
120
0.637749
0a2649be8d41ac38c2172f78249af3222274b850
808
py
Python
cpt2wgt.py
kevincao91/Tools
545901c682c20cd06256156dadc75b8e4e7df88c
[ "MIT" ]
null
null
null
cpt2wgt.py
kevincao91/Tools
545901c682c20cd06256156dadc75b8e4e7df88c
[ "MIT" ]
null
null
null
cpt2wgt.py
kevincao91/Tools
545901c682c20cd06256156dadc75b8e4e7df88c
[ "MIT" ]
null
null
null
import pickle import os,sys cptPath=sys.argv[1] wgtPath=cptPath with open(cptPath,'rb') as f: data = pickle.load(f,encoding='latin1') keys = data['blobs'].keys() # needs = ['conv','res','fpn',] not_needs = ['fc1000','momentum'] output_dic={'blobs':{}} print('filtered out:') for key in keys: keep = T...
26.064516
54
0.555693
9b7b6c73bab3ea09a06d02c91d959d9f4990dd59
3,357
py
Python
utils/http_helper.py
BlockVigil/ethvigil-cli
80247260a6b20224f6528edbfee5bdee19baf842
[ "MIT" ]
null
null
null
utils/http_helper.py
BlockVigil/ethvigil-cli
80247260a6b20224f6528edbfee5bdee19baf842
[ "MIT" ]
9
2019-08-06T10:16:04.000Z
2020-07-23T17:16:27.000Z
utils/http_helper.py
BlockVigil/ethvigil-cli
80247260a6b20224f6528edbfee5bdee19baf842
[ "MIT" ]
1
2019-08-07T19:55:58.000Z
2019-08-07T19:55:58.000Z
import tenacity import requests from .exceptions import * import logging ev_logger = logging.getLogger('EVCore') @tenacity.retry( stop=tenacity.stop_after_delay(60), wait=tenacity.wait_random_exponential(multiplier=1, max=60), reraise=True ) def get(url): r = requests.get(url) return r @tenacit...
36.48913
103
0.629729
88c21a27f8a95bdaec77a347bbb4a9982284c536
2,366
py
Python
dependencies/scons-config/build/lib/sconsconfig/packages/libcellml.py
maierbn/opendihu
577650e2f6b36a7306766b0f4176f8124458cbf0
[ "MIT" ]
17
2018-11-25T19:29:34.000Z
2021-09-20T04:46:22.000Z
dependencies/scons-config/build/lib/sconsconfig/packages/libcellml.py
maierbn/opendihu
577650e2f6b36a7306766b0f4176f8124458cbf0
[ "MIT" ]
1
2020-11-12T15:15:58.000Z
2020-12-29T15:29:24.000Z
dependencies/scons-config/build/lib/sconsconfig/packages/libcellml.py
maierbn/opendihu
577650e2f6b36a7306766b0f4176f8124458cbf0
[ "MIT" ]
4
2018-10-17T12:18:10.000Z
2021-05-28T13:24:20.000Z
import sys, os, multiprocessing from .Package import Package class libcellml(Package): def __init__(self, **kwargs): defaults = { 'download_url': 'https://github.com/cellml/libcellml/archive/develop.zip', } defaults.update(kwargs) super(libcellml, self).__init__(**defau...
30.333333
91
0.567202
ef5fff25de33604927224c0ac96fb42363731cec
3,108
py
Python
python/pyserial-3.0/serial/__init__.py
gotnone/hwa
4648cf6072a06552d22cbf6498b35f3e24ce38d5
[ "BSD-3-Clause" ]
25
2015-08-05T12:36:24.000Z
2021-03-26T01:51:58.000Z
python/pyserial-3.0/serial/__init__.py
gotnone/hwa
4648cf6072a06552d22cbf6498b35f3e24ce38d5
[ "BSD-3-Clause" ]
3
2021-06-08T21:06:32.000Z
2022-01-13T02:22:38.000Z
python/pyserial-3.0/serial/__init__.py
gotnone/hwa
4648cf6072a06552d22cbf6498b35f3e24ce38d5
[ "BSD-3-Clause" ]
4
2016-09-18T08:58:35.000Z
2020-07-16T11:43:29.000Z
#!/usr/bin/env python # # This is a wrapper module for different platform implementations # # This file is part of pySerial. https://github.com/pyserial/pyserial # (C) 2001-2015 Chris Liechti <cliechti@gmx.net> # # SPDX-License-Identifier: BSD-3-Clause import importlib import sys from serial.serialutil import * #~...
35.724138
101
0.638996
e358c78ad1e4865876af38c4f113de09d02e9c46
8,923
py
Python
contrib/linearize/linearize-data.py
gaoncoin/gaon
93f94f7d268c0f9abd0b7ef82791945349fcb40c
[ "MIT" ]
null
null
null
contrib/linearize/linearize-data.py
gaoncoin/gaon
93f94f7d268c0f9abd0b7ef82791945349fcb40c
[ "MIT" ]
null
null
null
contrib/linearize/linearize-data.py
gaoncoin/gaon
93f94f7d268c0f9abd0b7ef82791945349fcb40c
[ "MIT" ]
4
2018-02-27T04:30:24.000Z
2018-04-01T14:59:24.000Z
#!/usr/bin/python # # linearize-data.py: Construct a linear, no-fork version of the chain. # # Copyright (c) 2013-2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from __future__ import print_func...
29.160131
108
0.68923
5d601d77d2480cfe7db743c10b4d226218e601aa
9,628
py
Python
ssd.pytorch/eval_coco2.py
transcendentsky/detection_models
185f4bcccd5ab2c2f8edac37c76a9ccc47f73883
[ "Apache-2.0" ]
null
null
null
ssd.pytorch/eval_coco2.py
transcendentsky/detection_models
185f4bcccd5ab2c2f8edac37c76a9ccc47f73883
[ "Apache-2.0" ]
null
null
null
ssd.pytorch/eval_coco2.py
transcendentsky/detection_models
185f4bcccd5ab2c2f8edac37c76a9ccc47f73883
[ "Apache-2.0" ]
null
null
null
"""Adapted from: @longcw faster_rcnn_pytorch: https://github.com/longcw/faster_rcnn_pytorch @rbgirshick py-faster-rcnn https://github.com/rbgirshick/py-faster-rcnn Licensed under The MIT License [see LICENSE for details] """ from __future__ import print_function import torch import torch.nn as nn import to...
34.758123
94
0.590258
782be4731e2a9e3da151a60d04d74ec089c10767
252
py
Python
manage.py
anehx/anonboard-backend
564a1af702054980bb1bb6e6864fe205c4396388
[ "MIT" ]
null
null
null
manage.py
anehx/anonboard-backend
564a1af702054980bb1bb6e6864fe205c4396388
[ "MIT" ]
null
null
null
manage.py
anehx/anonboard-backend
564a1af702054980bb1bb6e6864fe205c4396388
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "anonboard.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
22.909091
73
0.77381
7b20d84941f2f4b436ebe47f1222d3cdb6362270
2,352
py
Python
test/test_app_error.py
smortex/puppetboard
35486e8e49725e48bfb76707f5f1f2d5537eb190
[ "Apache-2.0" ]
null
null
null
test/test_app_error.py
smortex/puppetboard
35486e8e49725e48bfb76707f5f1f2d5537eb190
[ "Apache-2.0" ]
null
null
null
test/test_app_error.py
smortex/puppetboard
35486e8e49725e48bfb76707f5f1f2d5537eb190
[ "Apache-2.0" ]
1
2019-10-30T13:07:20.000Z
2019-10-30T13:07:20.000Z
import pytest from flask import Flask, current_app from puppetboard import app from bs4 import BeautifulSoup @pytest.fixture def mock_puppetdb_environments(mocker): environemnts = [ {'name': 'production'}, {'name': 'staging'} ] return mocker.patch.object(app.puppetdb, 'environments', ...
31.783784
79
0.64966
57847e4fa1b843acc42778fa93c94d98a4690880
5,158
py
Python
powerline/segments/shell.py
elventear/powerline
cddfc364c1bf269f721dfdbd765cde2649a3410d
[ "MIT" ]
3
2016-08-31T23:09:58.000Z
2016-08-31T23:10:00.000Z
powerline/segments/shell.py
elventear/powerline
cddfc364c1bf269f721dfdbd765cde2649a3410d
[ "MIT" ]
null
null
null
powerline/segments/shell.py
elventear/powerline
cddfc364c1bf269f721dfdbd765cde2649a3410d
[ "MIT" ]
1
2015-01-09T21:02:50.000Z
2015-01-09T21:02:50.000Z
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) from powerline.theme import requires_segment_info from powerline.segments import with_docstring from powerline.segments.common.env import CwdSegment from powerline.lib.unicode import out_u @requires_seg...
29.988372
107
0.72722
4df7001d03e7bdc5d8c76b4ef7271f1792d0d534
8,491
py
Python
services/web/server/src/simcore_service_webserver/version_control_handlers_snapshots.py
Surfict/osparc-simcore
1e0b89574ec17ecb089674f9e5daa83d624430c8
[ "MIT" ]
null
null
null
services/web/server/src/simcore_service_webserver/version_control_handlers_snapshots.py
Surfict/osparc-simcore
1e0b89574ec17ecb089674f9e5daa83d624430c8
[ "MIT" ]
16
2021-10-04T20:31:52.000Z
2022-03-14T04:31:25.000Z
services/web/server/src/simcore_service_webserver/version_control_handlers_snapshots.py
Surfict/osparc-simcore
1e0b89574ec17ecb089674f9e5daa83d624430c8
[ "MIT" ]
null
null
null
import logging import warnings from datetime import datetime from typing import List, Optional from uuid import UUID from aiohttp import web from pydantic.decorator import validate_arguments from ._meta import api_version_prefix as vtag from .constants import RQT_USERID_KEY from .login.decorators import login_require...
34.237903
93
0.706866
0523ec4e3ab636964e30ad70ef9e82ff01344a21
35,843
py
Python
dogechia/full_node/full_node_store.py
hagbardcelene/doge-chia
72bdf0a7b20a579fe4645f0cb132955e181e1c44
[ "Apache-2.0" ]
27
2021-07-06T16:33:50.000Z
2022-02-19T21:11:25.000Z
dogechia/full_node/full_node_store.py
hagbardcelene/doge-chia
72bdf0a7b20a579fe4645f0cb132955e181e1c44
[ "Apache-2.0" ]
15
2021-07-07T02:32:59.000Z
2021-10-15T21:19:51.000Z
dogechia/full_node/full_node_store.py
hagbardcelene/doge-chia
72bdf0a7b20a579fe4645f0cb132955e181e1c44
[ "Apache-2.0" ]
12
2021-07-08T15:36:20.000Z
2022-03-15T08:34:01.000Z
import asyncio import dataclasses import logging import time from typing import Dict, List, Optional, Set, Tuple from dogechia.consensus.block_record import BlockRecord from dogechia.consensus.blockchain_interface import BlockchainInterface from dogechia.consensus.constants import ConsensusConstants from dogechia.cons...
45.142317
120
0.623078
88015c354dbf9c10d1c28642a3566eb74433a461
130
py
Python
excelpro3/tfdxls2xlsx/__init__.py
majiashu/data-processing
772dc341657c416cef7046473ed3030efa200e33
[ "MIT" ]
1
2020-07-31T15:13:02.000Z
2020-07-31T15:13:02.000Z
excelpro3/tfdxls2xlsx/__init__.py
majiashu/data-processing
772dc341657c416cef7046473ed3030efa200e33
[ "MIT" ]
null
null
null
excelpro3/tfdxls2xlsx/__init__.py
majiashu/data-processing
772dc341657c416cef7046473ed3030efa200e33
[ "MIT" ]
null
null
null
# -*- encoding: utf-8 -*- """ __init__.py.py Created on 2018/8/28 13:25 Copyright (c) 2018/8/28, @author: 马家树(majstx@163.com) """
18.571429
28
0.630769
c1d6080ec6cd1eec3aa7eb1c13de5ee4bf5f995c
3,434
py
Python
cargonet/visualization/nxplot.py
romnnn/rail-stgcnn
7710e654106fb161301df40dd570dea1767e8256
[ "MIT" ]
2
2020-09-06T04:19:46.000Z
2020-12-06T06:07:01.000Z
cargonet/visualization/nxplot.py
romnnn/rail-stgcnn
7710e654106fb161301df40dd570dea1767e8256
[ "MIT" ]
null
null
null
cargonet/visualization/nxplot.py
romnnn/rail-stgcnn
7710e654106fb161301df40dd570dea1767e8256
[ "MIT" ]
1
2021-05-15T15:37:30.000Z
2021-05-15T15:37:30.000Z
import os import uuid import click import matplotlib.pyplot as plt import networkx as nx import numpy as np from cargonet.preprocessing.graphs.tgraph import TransportGraph from cargonet.visualization.tplot import TransportPlot class NXTransportPlot(TransportPlot): def draw_edges(self, route, pos, **options): ...
32.396226
86
0.571928
7501c78c56b17a9f706af5689768c0324eecd747
3,040
py
Python
source/src/network/GameController/protocols/python/gamestate.py
Dr-MunirShah/black-sheep
e908203d9516e01f90f4ed4c796cf4143d0df0c0
[ "MIT" ]
7
2019-07-25T10:06:31.000Z
2021-02-20T06:00:51.000Z
source/src/network/GameController/protocols/python/gamestate.py
Dr-MunirShah/black-sheep
e908203d9516e01f90f4ed4c796cf4143d0df0c0
[ "MIT" ]
null
null
null
source/src/network/GameController/protocols/python/gamestate.py
Dr-MunirShah/black-sheep
e908203d9516e01f90f4ed4c796cf4143d0df0c0
[ "MIT" ]
1
2019-08-31T23:32:02.000Z
2019-08-31T23:32:02.000Z
#!/usr/bin/env python # -*- coding:utf-8 -*- from construct import Byte, Struct, Enum, Bytes, Const, Array, Renamed, Int16ul Short = Int16ul RobotInfo = "robot_info" / Struct( # define NONE 0 # define PENALTY_HL_KID_BALL_MANIPULATION 1 # define PENALTY_HL_KID_PHYSICAL_CONTACT ...
32.340426
79
0.497368
ca1db0fe4573831b8b98fc26a41a9b078d882fb8
1,182
py
Python
LeetCode/Python3/Array/1002. Find Common Characters.py
WatsonWangZh/CodingPractice
dc057dd6ea2fc2034e14fd73e07e73e6364be2ae
[ "MIT" ]
11
2019-09-01T22:36:00.000Z
2021-11-08T08:57:20.000Z
LeetCode/Python3/Array/1002. Find Common Characters.py
WatsonWangZh/LeetCodePractice
dc057dd6ea2fc2034e14fd73e07e73e6364be2ae
[ "MIT" ]
null
null
null
LeetCode/Python3/Array/1002. Find Common Characters.py
WatsonWangZh/LeetCodePractice
dc057dd6ea2fc2034e14fd73e07e73e6364be2ae
[ "MIT" ]
2
2020-05-27T14:58:52.000Z
2020-05-27T15:04:17.000Z
# Given an array A of strings made only from lowercase letters, # return a list of all characters that show up in all strings within the list (including duplicates). # For example, if a character occurs 3 times in all strings but not 4 times, # you need to include that character three times in the final answer. # Y...
30.307692
103
0.57445
120b541d4cd8f42e931cce2606554831c5966aff
2,005
py
Python
shadho/workers/workqueue.py
Gayan225/shadho
e22d9764749dcd4788974ca614dc57a47e433651
[ "MIT" ]
null
null
null
shadho/workers/workqueue.py
Gayan225/shadho
e22d9764749dcd4788974ca614dc57a47e433651
[ "MIT" ]
null
null
null
shadho/workers/workqueue.py
Gayan225/shadho
e22d9764749dcd4788974ca614dc57a47e433651
[ "MIT" ]
null
null
null
"""Utilities for submitting and starting Work Queue workers. """ import argparse import os import re import subprocess from shadho.configuration import ShadhoConfig def parse_args(args=None): p = argparse.ArgumentParser( description='Start a Work Queue worker and connect to SHADHO.') p.add_argumen...
29.925373
77
0.600998
0ce8057c3d9200b7c0048e9643de2495c77b7dd5
4,614
py
Python
pyvolt/errors.py
Gael-devv/Pyvolt
1d84ba95f1fd3f959a933051c25f8a3e60500c5d
[ "MIT" ]
null
null
null
pyvolt/errors.py
Gael-devv/Pyvolt
1d84ba95f1fd3f959a933051c25f8a3e60500c5d
[ "MIT" ]
null
null
null
pyvolt/errors.py
Gael-devv/Pyvolt
1d84ba95f1fd3f959a933051c25f8a3e60500c5d
[ "MIT" ]
null
null
null
from __future__ import annotations from typing import Dict, List, Optional, TYPE_CHECKING, Any, Tuple, Union if TYPE_CHECKING: from aiohttp import ClientResponse, ClientWebSocketResponse try: from requests import Response _ResponseType = Union[ClientResponse, Response] except ModuleNotFo...
29.767742
95
0.632206
13d62c81e841d667cea7e83e9550a3d422de45fa
637
py
Python
coding/learn_python/object_oriented_programming/tombola.py
yatao91/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
3
2021-05-25T16:58:52.000Z
2022-02-05T09:37:17.000Z
coding/learn_python/object_oriented_programming/tombola.py
yataosu/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
null
null
null
coding/learn_python/object_oriented_programming/tombola.py
yataosu/learning_road
e88dc43de98e35922bfc71c222ec71766851e618
[ "MIT" ]
null
null
null
# -*- coding: UTF-8 -*- import abc class Tombola(abc.ABC): @abc.abstractmethod def load(self, iterable): """从可迭代对象中添加元素""" @abc.abstractmethod def pick(self): """随机删除元素,然后将其返回. 如果实例为空,这个方法应该抛出`LookupError`. """ def loaded(self): """如果至少有一个元素,返回`True`,否则返回...
20.548387
45
0.516484
ead04d226b238debf7ef83525753dc9dda141b68
1,958
py
Python
docs/conf.py
nickelpro/RikerBot
fdf8c96a3c13a4327afcefb650d1ad352ee6552b
[ "Zlib" ]
null
null
null
docs/conf.py
nickelpro/RikerBot
fdf8c96a3c13a4327afcefb650d1ad352ee6552b
[ "Zlib" ]
null
null
null
docs/conf.py
nickelpro/RikerBot
fdf8c96a3c13a4327afcefb650d1ad352ee6552b
[ "Zlib" ]
null
null
null
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
33.758621
79
0.662411
cb211738a6e5490c07bd41b7a03d1b7307d87d7b
8,492
py
Python
hueComposer.py
sabjorn/hueComposer
8b017a57f51eaaedd275f6e00f35d2e6207d5350
[ "MIT" ]
null
null
null
hueComposer.py
sabjorn/hueComposer
8b017a57f51eaaedd275f6e00f35d2e6207d5350
[ "MIT" ]
5
2017-06-21T17:53:18.000Z
2019-03-14T23:27:12.000Z
hueComposer.py
sabjorn/hueComposer
8b017a57f51eaaedd275f6e00f35d2e6207d5350
[ "MIT" ]
null
null
null
#!/usr/bin/python # Copyright (c) 2016 Steven A. Bjornson # 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,...
35.090909
111
0.581371
104378e4da65cb8359cacd020b93716403705524
7,872
py
Python
specification/scripts/spec_tools/validity.py
chrdavis/OpenXR-SDK-Source
304c28c2f534375b2fd2a7d5e43b50ddc76495e6
[ "Apache-2.0" ]
null
null
null
specification/scripts/spec_tools/validity.py
chrdavis/OpenXR-SDK-Source
304c28c2f534375b2fd2a7d5e43b50ddc76495e6
[ "Apache-2.0" ]
null
null
null
specification/scripts/spec_tools/validity.py
chrdavis/OpenXR-SDK-Source
304c28c2f534375b2fd2a7d5e43b50ddc76495e6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 -i # # Copyright (c) 2013-2020 The Khronos Group Inc. # # SPDX-License-Identifier: Apache-2.0 # # 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/...
34.986667
132
0.604294
33857371419783c30d0ac19ec774a569bbdf5c81
93,717
py
Python
cisco-ios-xe/ydk/models/cisco_ios_xe/test/import_tests.py
bopopescu/ACI
dd717bc74739eeed4747b3ea9e36b239580df5e1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cisco-ios-xe/ydk/models/cisco_ios_xe/test/import_tests.py
bopopescu/ACI
dd717bc74739eeed4747b3ea9e36b239580df5e1
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cisco-ios-xe/ydk/models/cisco_ios_xe/test/import_tests.py
bopopescu/ACI
dd717bc74739eeed4747b3ea9e36b239580df5e1
[ "ECL-2.0", "Apache-2.0" ]
1
2020-07-22T04:04:44.000Z
2020-07-22T04:04:44.000Z
import unittest class ImportTest(unittest.TestCase): def test_ATM_FORUM_TC_MIB(self): from ydk.models.cisco_ios_xe.ATM_FORUM_TC_MIB import TruthValue from ydk.models.cisco_ios_xe.ATM_FORUM_TC_MIB import AtmServiceCategory def test_ATM_MIB(self): from ydk.models.cisco_ios_xe.ATM_MIB...
42.386703
115
0.786581
0696290241244bc8df6f492fdd1d863f11e762cb
3,808
py
Python
superset/migrations/versions/18e88e1cc004_making_audit_nullable.py
maartenbreddels/incubator-superset
8fe6f126226c9c03161d50c91d4a948309842217
[ "Apache-2.0" ]
2
2018-03-01T02:23:17.000Z
2019-12-10T08:39:27.000Z
superset/migrations/versions/18e88e1cc004_making_audit_nullable.py
maartenbreddels/incubator-superset
8fe6f126226c9c03161d50c91d4a948309842217
[ "Apache-2.0" ]
9
2018-11-06T23:57:47.000Z
2019-11-27T21:04:16.000Z
superset/migrations/versions/18e88e1cc004_making_audit_nullable.py
maartenbreddels/incubator-superset
8fe6f126226c9c03161d50c91d4a948309842217
[ "Apache-2.0" ]
1
2019-12-25T08:03:34.000Z
2019-12-25T08:03:34.000Z
# -*- coding: utf-8 -*- """making audit nullable Revision ID: 18e88e1cc004 Revises: 430039611635 Create Date: 2016-03-13 21:30:24.833107 """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from alembic import op impo...
30.709677
65
0.563288
5c88ae8b42d22cda84746b137a46d86bfa335390
1,651
py
Python
orchestra/prompts/ask_ordinal.py
enihsyou/LeetCode
230325d1dfd666ee53f304edf74c9c0f60f81d75
[ "MIT" ]
null
null
null
orchestra/prompts/ask_ordinal.py
enihsyou/LeetCode
230325d1dfd666ee53f304edf74c9c0f60f81d75
[ "MIT" ]
null
null
null
orchestra/prompts/ask_ordinal.py
enihsyou/LeetCode
230325d1dfd666ee53f304edf74c9c0f60f81d75
[ "MIT" ]
null
null
null
# coding=utf-8 # promote user for question ordinal. import re import urllib.parse from prompt_toolkit.document import Document from prompt_toolkit.validation import ValidationError, Validator from prompts import AskSession from prompts.leetcode import fetch_problem_graphql async def question(session: AskSession): ...
31.150943
79
0.660812
720a31b57d7b9e30be3da16adcfa7945baae2267
869
py
Python
test/test_error_data.py
apsinha-equinix/controlm-client
f24e0f935c82306074f4e4025cf62c217348dc3f
[ "MIT" ]
1
2021-12-02T08:49:25.000Z
2021-12-02T08:49:25.000Z
test/test_error_data.py
apsinha-equinix/controlm-client
f24e0f935c82306074f4e4025cf62c217348dc3f
[ "MIT" ]
null
null
null
test/test_error_data.py
apsinha-equinix/controlm-client
f24e0f935c82306074f4e4025cf62c217348dc3f
[ "MIT" ]
null
null
null
# coding: utf-8 """ Control-M Services Provides access to BMC Control-M Services # noqa: E501 OpenAPI spec version: 9.18.3 Contact: support@bmc.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import unittest import controlm_clie...
21.195122
79
0.693901
d870bd61c4500ac41e256d112f2a92d76014fb22
1,486
py
Python
test.py
ykotseruba/Ped_Cross_Benchmark
f8ccf3a0a13afd4610d0ce6ad7bf92e934e8cc31
[ "MIT" ]
2
2021-01-04T11:50:58.000Z
2021-01-04T15:31:47.000Z
test.py
ykotseruba/Ped_Cross_Benchmark
f8ccf3a0a13afd4610d0ce6ad7bf92e934e8cc31
[ "MIT" ]
null
null
null
test.py
ykotseruba/Ped_Cross_Benchmark
f8ccf3a0a13afd4610d0ce6ad7bf92e934e8cc31
[ "MIT" ]
null
null
null
from action_predict import action_prediction from pie_data import PIE from jaad_data import JAAD import os import sys import yaml def test_model(saved_files_path=None): with open(os.path.join(saved_files_path, 'configs.yaml'), 'r') as yamlfile: opts = yaml.safe_load(yamlfile) print(opts) model_opt...
38.102564
94
0.70323
5376d53a6cff74c8f3b6b1922837aaa615f75c9c
518
py
Python
tests/core/test_postgre_multiple_statements.py
coverwallet/pysoni
49d3a8acb101436ad0724749572be2ad9d86f3ae
[ "MIT" ]
5
2019-07-08T15:38:06.000Z
2022-03-24T20:36:19.000Z
tests/core/test_postgre_multiple_statements.py
coverwallet/pysoni
49d3a8acb101436ad0724749572be2ad9d86f3ae
[ "MIT" ]
2
2019-07-07T23:26:32.000Z
2020-06-04T07:43:24.000Z
tests/core/test_postgre_multiple_statements.py
coverwallet/pysoni
49d3a8acb101436ad0724749572be2ad9d86f3ae
[ "MIT" ]
1
2019-05-31T09:11:22.000Z
2019-05-31T09:11:22.000Z
import pytest import psycopg2 def test_postgre_multiple_statement_with_psycopg2_api(pysoni_client_connection_with_envvars): excepted_statements = "1" results = pysoni_client_connection_with_envvars.postgre_multiple_statements( ["DROP TABLE IF EXISTS temp", "DROP TABLE IF EXISTS temp_1", ...
28.777778
93
0.704633
e8be0ea22cabad6312e584e5744b1a5bb0fc55c8
50,251
py
Python
sdk/python/pulumi_azure_native/storage/v20210201/storage_account.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/storage/v20210201/storage_account.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/storage/v20210201/storage_account.py
polivbr/pulumi-azure-native
09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from ... import _utilities fro...
55.220879
2,647
0.69133
7ac035c5184b8222ac2167f1647e169bc47c3be7
939
py
Python
server/clean_file_names.py
mmkuznecov/RedListHack
a14efd035e9eaf99e86a3c50a60e493898f060ae
[ "Apache-2.0" ]
null
null
null
server/clean_file_names.py
mmkuznecov/RedListHack
a14efd035e9eaf99e86a3c50a60e493898f060ae
[ "Apache-2.0" ]
null
null
null
server/clean_file_names.py
mmkuznecov/RedListHack
a14efd035e9eaf99e86a3c50a60e493898f060ae
[ "Apache-2.0" ]
null
null
null
from shutil import copyfile from transliterate import translit import re import os def has_cyrillic(text): return bool(re.search('[а-яА-Я]', text)) def clean_file_name(fname): if ' ' in fname or '—' in fname or has_cyrillic(fname): fname = fname.replace(' ', '_') fname = fname.replace('—', '_...
37.56
83
0.608094