hexsha
stringlengths
40
40
size
int64
1
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
239
max_stars_repo_name
stringlengths
5
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
239
max_issues_repo_name
stringlengths
5
130
max_issues_repo_head_hexsha
stringlengths
40
78
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
3
239
max_forks_repo_name
stringlengths
5
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
1
1.03M
avg_line_length
float64
1
958k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
7985c2efc483ffeec74433e78f5c3b11dbc0b4e2
785
py
Python
examples/booleans.py
Spectre5/defopt
18e705775e85d2eac64977f363b6b494307eccc7
[ "MIT" ]
null
null
null
examples/booleans.py
Spectre5/defopt
18e705775e85d2eac64977f363b6b494307eccc7
[ "MIT" ]
null
null
null
examples/booleans.py
Spectre5/defopt
18e705775e85d2eac64977f363b6b494307eccc7
[ "MIT" ]
null
null
null
""" Example showing boolean flags in defopt. Optional boolean parameters are automatically converted to ``--name`` and ``--no-name`` flags which take no arguments and store `True` and `False` respectively. Code usage:: >>> main('hello!', upper=False, repeat=True) Command line usage:: $ python booleans.py '...
21.805556
68
0.659873
7985c3046b305036b4c6ea92c2cf32e3469f3a4b
3,450
py
Python
cogs/members.py
ScurySnek2/mm-sim-bot
6b6cb78e45cc641cf1295c2bac870506eecc29ef
[ "MIT" ]
null
null
null
cogs/members.py
ScurySnek2/mm-sim-bot
6b6cb78e45cc641cf1295c2bac870506eecc29ef
[ "MIT" ]
null
null
null
cogs/members.py
ScurySnek2/mm-sim-bot
6b6cb78e45cc641cf1295c2bac870506eecc29ef
[ "MIT" ]
null
null
null
import discord from discord.ext import commands import gspread from oauth2client.service_account import ServiceAccountCredentials from discord.ext.commands.cooldowns import BucketType from discord.ext.commands.errors import CommandInvokeError import collections import re import datetime import aiohttp import ...
38.333333
119
0.530145
7985c401128b2f7c7b5363815e279ec085d21a1a
2,754
py
Python
utils/SSEphem/update_ssephem.py
afeinstein20/ceres
e55150c587782cbecfd45c21ba0ce0023e54c3a9
[ "MIT" ]
35
2016-09-09T04:08:45.000Z
2022-02-16T20:25:49.000Z
utils/SSEphem/update_ssephem.py
afeinstein20/ceres
e55150c587782cbecfd45c21ba0ce0023e54c3a9
[ "MIT" ]
29
2016-09-10T15:30:29.000Z
2021-06-02T14:55:53.000Z
utils/SSEphem/update_ssephem.py
afeinstein20/ceres
e55150c587782cbecfd45c21ba0ce0023e54c3a9
[ "MIT" ]
26
2016-09-09T23:58:15.000Z
2022-02-20T17:50:35.000Z
import os import numpy as np def LeapSecUpdate(): os.system('wget --no-proxy ftp://cddis.gsfc.nasa.gov/pub/products/iers/leapsec.dat') #os.system('wget --no-proxy http://maia.usno.navy.mil/ser7/leapsec.dat') if os.access('leapsec.tab', os.F_OK): os.system('mv leapsec.tab leapsec_old.tab') try: f = open('leapse...
32.785714
96
0.647422
7985c5966c2dbed50cab73b1d885aca6a3f593a9
5,560
py
Python
tools/TF2CaffeModel/TFtrain/densenet.py
chenaili6/FeatherCNN
52cd8c8749ed584461a88b1f04749bb35a48f9a6
[ "Apache-2.0" ]
4
2018-05-14T09:00:33.000Z
2021-05-14T08:11:54.000Z
tools/TF2CaffeModel/TFtrain/densenet.py
nihui/FeatherCNN
2805f371bd8f33ef742cc9523979f29295d926fb
[ "Apache-2.0" ]
null
null
null
tools/TF2CaffeModel/TFtrain/densenet.py
nihui/FeatherCNN
2805f371bd8f33ef742cc9523979f29295d926fb
[ "Apache-2.0" ]
null
null
null
//Tencent is pleased to support the open source community by making FeatherCNN available. //Copyright (C) 2018 THL A29 Limited, a Tencent company. All rights reserved. //Licensed under the BSD 3-Clause License (the "License"); you may not use this file except //in compliance with the License. You may obtain a copy of...
40
118
0.70018
7985c5cb9b0546c338d92722311d2e4496348969
5,751
py
Python
src/petty/server.py
ashcrow/petty
d2b0d196b6cb3accfb0070a795d1b4b5a320f57e
[ "BSD-3-Clause" ]
null
null
null
src/petty/server.py
ashcrow/petty
d2b0d196b6cb3accfb0070a795d1b4b5a320f57e
[ "BSD-3-Clause" ]
null
null
null
src/petty/server.py
ashcrow/petty
d2b0d196b6cb3accfb0070a795d1b4b5a320f57e
[ "BSD-3-Clause" ]
1
2018-03-10T18:27:22.000Z
2018-03-10T18:27:22.000Z
# Copyright 2016, Steve Milner # Distributed under the Modified BSD License. # See LICENSE for the full license text. """ Server code. """ import logging import logging.config import time from concurrent import futures import grpc #: One days worth of seconds. Used during run_forever to sleep. _ONE_DAY_IN_SECONDS =...
37.344156
79
0.606677
7985c5f2d64a9dce89631c2d90147de8979bbd09
498
py
Python
conftest.py
europlanet-gmap/automated-metadata-generation
aa91790e74d33cc3ae0d68dcf0bf860442ba21c7
[ "CC0-1.0" ]
3
2021-05-28T22:15:47.000Z
2021-06-09T17:51:47.000Z
conftest.py
europlanet-gmap/automated-metadata-generation
aa91790e74d33cc3ae0d68dcf0bf860442ba21c7
[ "CC0-1.0" ]
11
2021-04-08T20:02:16.000Z
2021-12-07T13:18:48.000Z
conftest.py
europlanet-gmap/automated-metadata-generation
aa91790e74d33cc3ae0d68dcf0bf860442ba21c7
[ "CC0-1.0" ]
5
2021-09-21T18:59:51.000Z
2022-02-26T09:42:19.000Z
from shutil import copytree import os import pytest @pytest.fixture def datadir(tmpdir, request): ''' Fixture responsible for searching a folder with the same name of test module and, if available, moving all contents to a temporary directory so tests can use them freely. ''' filename = reques...
26.210526
77
0.710843
7985c7470dd9973eba5b00bcdabe6b9d8dd73f54
450
py
Python
recipe/run_test.py
mbargull-feedstocks/pyjnius-feedstock
e4b260dc6349dba92e30e000a9306ff0bbba026a
[ "BSD-3-Clause" ]
2
2018-11-29T21:56:25.000Z
2019-02-10T12:21:48.000Z
recipe/run_test.py
mbargull-feedstocks/pyjnius-feedstock
e4b260dc6349dba92e30e000a9306ff0bbba026a
[ "BSD-3-Clause" ]
32
2018-11-18T18:16:46.000Z
2022-02-08T14:26:29.000Z
recipe/run_test.py
mbargull-feedstocks/pyjnius-feedstock
e4b260dc6349dba92e30e000a9306ff0bbba026a
[ "BSD-3-Clause" ]
10
2018-07-20T15:35:49.000Z
2021-11-21T06:09:21.000Z
import jnius from jnius import autoclass AL = autoclass( 'java.util.ArrayList' ) al = AL() hw = 'Hello World!' for c in hw: al.add( c ) print( al.toString() ) if al.size() != len( hw ): raise RuntimeError('Length of ArrayList and python string are not the same!') for idx, c in enumerate( hw ): if c != al.get( idx...
22.5
78
0.688889
7985c8de78be976cc524415795e060047f0ac39e
2,614
py
Python
tests/test_forces.py
raimis/torchani
19882c6e18174e08423706a536366f89029a740a
[ "MIT" ]
1
2020-08-19T13:42:36.000Z
2020-08-19T13:42:36.000Z
tests/test_forces.py
UnixJunkie/torchani
f2bf5fb16a65c2226f75858bc6603a9f7b029fe4
[ "MIT" ]
null
null
null
tests/test_forces.py
UnixJunkie/torchani
f2bf5fb16a65c2226f75858bc6603a9f7b029fe4
[ "MIT" ]
null
null
null
import torch import torchani import unittest import os import pickle path = os.path.dirname(os.path.realpath(__file__)) N = 97 class TestForce(unittest.TestCase): def setUp(self): self.tolerance = 1e-5 model = torchani.models.ANI1x(model_index=0) self.aev_computer = model.aev_computer ...
38.441176
102
0.596404
7985c977327439bbc5711a57f88205fa45969fec
825
py
Python
examples/run_ga.py
Flyzoor/NiaPy
fec1faee0f215cc3a6c2c967ec77dcbe2cbffa42
[ "MIT" ]
null
null
null
examples/run_ga.py
Flyzoor/NiaPy
fec1faee0f215cc3a6c2c967ec77dcbe2cbffa42
[ "MIT" ]
null
null
null
examples/run_ga.py
Flyzoor/NiaPy
fec1faee0f215cc3a6c2c967ec77dcbe2cbffa42
[ "MIT" ]
null
null
null
# This is temporary fix to import module from parent folder # It will be removed when package is published on PyPI import sys sys.path.append('../') # End of fix import random import logging from NiaPy.algorithms.basic import GeneticAlgorithm logging.basicConfig() logger = logging.getLogger('examples') logger.setLeve...
21.710526
76
0.642424
7985ca04478b2d942128c37648d588a092d07dee
7,407
py
Python
mabel/data/readers/internals/base_inner_reader.py
mabel-dev/mabel
ee1fdfcfe5fb87d2c5ce4f24b4b7113478ba1b8a
[ "Apache-2.0" ]
null
null
null
mabel/data/readers/internals/base_inner_reader.py
mabel-dev/mabel
ee1fdfcfe5fb87d2c5ce4f24b4b7113478ba1b8a
[ "Apache-2.0" ]
287
2021-05-14T21:25:26.000Z
2022-03-30T12:02:51.000Z
mabel/data/readers/internals/base_inner_reader.py
mabel-dev/mabel
ee1fdfcfe5fb87d2c5ce4f24b4b7113478ba1b8a
[ "Apache-2.0" ]
1
2021-04-29T18:18:20.000Z
2021-04-29T18:18:20.000Z
""" Base Inner Reader """ import os import abc import pathlib import datetime from io import IOBase from typing import Iterable, Optional from dateutil import parser from ...formats import json from ....utils import common, paths from ....logging import get_logger from ....errors import MissingDependencyError def zst...
30.991632
124
0.553935
7985ca8559ffbdf1a2a46353250c0a063fe0213f
2,976
py
Python
tests/st/networks/models/bert/src/dataset.py
i4oolish/mindspore
dac3be31d0f2c0a3516200f47af30980e566601b
[ "Apache-2.0" ]
2
2020-08-12T16:14:40.000Z
2020-12-04T03:05:57.000Z
tests/st/networks/models/bert/src/dataset.py
dilingsong/mindspore
4276050f2494cfbf8682560a1647576f859991e8
[ "Apache-2.0" ]
null
null
null
tests/st/networks/models/bert/src/dataset.py
dilingsong/mindspore
4276050f2494cfbf8682560a1647576f859991e8
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
48.786885
107
0.693548
7985cd8c4985e0b2cd9de40acc51924af0df677a
3,342
py
Python
default_pfx.py
Valloric/proton-ge-custom
f244acedd0145b0be03c9c4d504cc7fe0e4adb3d
[ "MIT", "BSD-3-Clause" ]
1
2021-06-18T14:27:24.000Z
2021-06-18T14:27:24.000Z
default_pfx.py
Valloric/proton-ge-custom
f244acedd0145b0be03c9c4d504cc7fe0e4adb3d
[ "MIT", "BSD-3-Clause" ]
null
null
null
default_pfx.py
Valloric/proton-ge-custom
f244acedd0145b0be03c9c4d504cc7fe0e4adb3d
[ "MIT", "BSD-3-Clause" ]
1
2020-12-01T16:14:46.000Z
2020-12-01T16:14:46.000Z
#!/usr/bin/env python3 # usage: default_pfx.py path/to/default_pfx_dir path/to/dist "Helper module for building the default prefix" import os import subprocess def file_is_wine_builtin_dll(path): if not os.path.exists(path): return False try: sfile = open(path, "rb") sfile.seek(0x40)...
32.446602
79
0.586176
7985cdbceacee03ea1f9b334571655c2384f85e7
3,783
py
Python
arachne/utils/data_loader.py
coinse/arachne
e19c86c07d675568f30f12b2130398afe61a5aa4
[ "MIT" ]
null
null
null
arachne/utils/data_loader.py
coinse/arachne
e19c86c07d675568f30f12b2130398afe61a5aa4
[ "MIT" ]
null
null
null
arachne/utils/data_loader.py
coinse/arachne
e19c86c07d675568f30f12b2130398afe61a5aa4
[ "MIT" ]
null
null
null
#!/usr/bin/python '''Loads data as numpy data form''' import torch import torchvision.datasets as dss from torchvision import transforms from torch.utils import data import os import numpy as np from PIL import Image import pandas class CelebAFolder(data.Dataset): """CelebA folder""" def __init__(self, root,...
38.212121
128
0.641026
7985cdd2c1f1b9455537da640a80d684c8683048
857
py
Python
tests/syntax/TryExceptAllNotLast.py
RESP3CT88/Nuitka
0fcc25d9f00c4fc78c79a863c4b7987f573962e1
[ "Apache-2.0" ]
5,421
2018-09-24T08:04:06.000Z
2022-03-31T20:02:37.000Z
tests/syntax/TryExceptAllNotLast.py
RESP3CT88/Nuitka
0fcc25d9f00c4fc78c79a863c4b7987f573962e1
[ "Apache-2.0" ]
1,348
2018-09-22T13:41:00.000Z
2022-03-31T22:33:40.000Z
tests/syntax/TryExceptAllNotLast.py
RESP3CT88/Nuitka
0fcc25d9f00c4fc78c79a863c4b7987f573962e1
[ "Apache-2.0" ]
396
2018-09-28T15:37:03.000Z
2022-03-29T10:52:09.000Z
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com # # Python tests originally created or extracted from other peoples work. The # parts were too small to be protected. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the ...
32.961538
79
0.695449
7985ce1a1ca6950e7840e9b631d167003f7a5ffb
2,788
py
Python
tests/robot/libraries/acl/acl_utils.py
mhalaj1/vpp-agent
6eac586bfd7d893ae74736da966fa0d40919ecc1
[ "Apache-2.0" ]
184
2017-07-18T07:01:15.000Z
2022-03-22T15:08:21.000Z
tests/robot/libraries/acl/acl_utils.py
mhalaj1/vpp-agent
6eac586bfd7d893ae74736da966fa0d40919ecc1
[ "Apache-2.0" ]
724
2017-07-21T10:14:21.000Z
2022-03-13T18:02:20.000Z
tests/robot/libraries/acl/acl_utils.py
mhalaj1/vpp-agent
6eac586bfd7d893ae74736da966fa0d40919ecc1
[ "Apache-2.0" ]
155
2017-07-17T05:42:34.000Z
2022-03-26T02:30:07.000Z
import vpp_api from robot.api import logger def acl_dump(host, username, password, node): # Use max uint32 value to dump all ACLs int_max = 4294967295 data = vpp_api.vpp_api.execute_api( host, username, password, node, "acl_dump", acl_index=int_max) acls = [] for item in data[0]["api_r...
30.637363
77
0.617647
7985ce4be5d9af1c22e2a74b2784664757210c8c
322,821
py
Python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models.py
benbp/azure-sdk-for-python
2329ba03e48098dcdc581898f6434d7c2b13a7b9
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models.py
benbp/azure-sdk-for-python
2329ba03e48098dcdc581898f6434d7c2b13a7b9
[ "MIT" ]
null
null
null
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_06_01/models/_models.py
benbp/azure-sdk-for-python
2329ba03e48098dcdc581898f6434d7c2b13a7b9
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
43.360779
901
0.677493
7985ce4c8f76301a4d5cb454c10ffed9ef48cd1b
494
py
Python
conf/setup-environment.d/updatehub-freescale.py
rafluan/meta-updatehub-freescale
97ffc0126bac630fb532334f62933f4ad3c0deb5
[ "MIT" ]
2
2017-08-09T21:02:11.000Z
2017-08-09T21:07:01.000Z
conf/setup-environment.d/updatehub-freescale.py
rafluan/meta-updatehub-freescale
97ffc0126bac630fb532334f62933f4ad3c0deb5
[ "MIT" ]
2
2019-03-20T19:10:07.000Z
2021-08-31T22:27:16.000Z
conf/setup-environment.d/updatehub-freescale.py
rafluan/meta-updatehub-freescale
97ffc0126bac630fb532334f62933f4ad3c0deb5
[ "MIT" ]
5
2018-02-23T21:12:46.000Z
2018-03-23T19:04:23.000Z
def __after_init_updatehub_freescale(): PLATFORM_ROOT_DIR = os.environ['PLATFORM_ROOT_DIR'] append_layers([ os.path.join(PLATFORM_ROOT_DIR, 'sources', p) for p in [ 'meta-freescale', 'meta-freescale-3rdparty', 'meta-upd...
35.285714
74
0.576923
7985d0a0fad3e86ae91010fa3e73a3dd038dd38c
867
py
Python
cloud/amazon/common/exception_handling.py
Sunchasing/python-common
bc9f11fe4585ef9abca7006c0bf64b11062742fd
[ "Apache-2.0" ]
5
2021-08-15T23:04:25.000Z
2021-09-06T18:32:53.000Z
cloud/amazon/common/exception_handling.py
Sunchasing/python-common
bc9f11fe4585ef9abca7006c0bf64b11062742fd
[ "Apache-2.0" ]
null
null
null
cloud/amazon/common/exception_handling.py
Sunchasing/python-common
bc9f11fe4585ef9abca7006c0bf64b11062742fd
[ "Apache-2.0" ]
1
2022-01-28T13:12:23.000Z
2022-01-28T13:12:23.000Z
from typing import Any, Iterable from types_extensions import const, void, list_type, tuple_type class ExceptionLevels: RAISE: const(int) = 1 WARN: const(int) = 2 SILENT: const(int) = 3 class InvalidArgumentException(Exception): def __init__(self, given_argument: Any, allowed_arguments: Iterable[...
30.964286
115
0.682814
7985d1173773de00a55d7c351bdcabd36c43eb55
5,699
py
Python
config/_base_/models/SROI/faster_rcnn_mydartsnet_nasfpn_sroi.py
automlresearch/autodetector
e959baf589fb329509cd25edcab11c7d22ea5e7e
[ "Apache-2.0" ]
null
null
null
config/_base_/models/SROI/faster_rcnn_mydartsnet_nasfpn_sroi.py
automlresearch/autodetector
e959baf589fb329509cd25edcab11c7d22ea5e7e
[ "Apache-2.0" ]
null
null
null
config/_base_/models/SROI/faster_rcnn_mydartsnet_nasfpn_sroi.py
automlresearch/autodetector
e959baf589fb329509cd25edcab11c7d22ea5e7e
[ "Apache-2.0" ]
1
2021-12-08T08:28:16.000Z
2021-12-08T08:28:16.000Z
model = dict( type='FasterRCNN', pretrained='/media/p/research/experiment/NAS/DARTSImp/PC-DARTS/checkpoints/eval-try-20200617-222258/model_best.pth.tar', # pretrained='/media/p/research/experiment/NAS/DARTSImp/PC-DARTS/checkpoints/eval-try-20200617-222258/checkpoint.pth.tar', # pretrained='/home/p/Docum...
34.125749
126
0.544657
7985d17858d2674775920d46c0aaf96b3a480eb8
456
py
Python
summaries/search_indexes.py
reading-in-the-alps/vfbr
f206bac2ae887a77acce2ad7a2eb8db1ff2eb815
[ "MIT" ]
null
null
null
summaries/search_indexes.py
reading-in-the-alps/vfbr
f206bac2ae887a77acce2ad7a2eb8db1ff2eb815
[ "MIT" ]
15
2019-10-25T08:46:57.000Z
2022-03-07T16:06:47.000Z
summaries/search_indexes.py
reading-in-the-alps/vfbr
f206bac2ae887a77acce2ad7a2eb8db1ff2eb815
[ "MIT" ]
null
null
null
import datetime from haystack import indexes from . models import VfbEntry, InventoryEntry class VfbEntryIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) def get_model(self): return VfbEntry class InventoryEntryIndex(indexes.SearchIndex, ind...
24
66
0.765351
7985d1f1e85e5a08c45598114b7229c681fa83f6
38,486
py
Python
tests/test_multipart.py
strongbugman/aiohttp
f6b9b7b9be03d12e33af6dbd0cccd127146abedb
[ "Apache-2.0" ]
4
2020-10-08T18:50:33.000Z
2021-07-07T10:50:04.000Z
tests/test_multipart.py
strongbugman/aiohttp
f6b9b7b9be03d12e33af6dbd0cccd127146abedb
[ "Apache-2.0" ]
null
null
null
tests/test_multipart.py
strongbugman/aiohttp
f6b9b7b9be03d12e33af6dbd0cccd127146abedb
[ "Apache-2.0" ]
1
2022-03-24T01:37:07.000Z
2022-03-24T01:37:07.000Z
import io import json import zlib from unittest import mock import pytest import aiohttp from aiohttp import payload from aiohttp.hdrs import (CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_TRANSFER_ENCODING, CONTENT_TYPE) from aiohttp.helpers import parse_mimetype from aiohttp.multipart imp...
35.114964
79
0.559788
7985d232821ea136806bcb8518ba6df033af57b2
28,310
py
Python
third_party/tlslite/tests/tlstest.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
third_party/tlslite/tests/tlstest.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
third_party/tlslite/tests/tlstest.py
zealoussnow/chromium
fd8a8914ca0183f0add65ae55f04e287543c7d4a
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
#!/usr/bin/env python # Authors: # Trevor Perrin # Kees Bos - Added tests for XML-RPC # Dimitris Moraitis - Anon ciphersuites # Marcelo Fernandez - Added test for NPN # Martin von Loewis - python 3 port # # See the LICENSE file for legal information regarding use of this file. from __future__ import print_...
35.47619
105
0.633345
7985d3b094882a1d41bffafbd28edcd7bd1fcedd
11,571
py
Python
tools/r3det_dcl/train.py
chisyliu/RotationDetection
6f2bd55a51a6de0bcd0959a85977682511fd440d
[ "Apache-2.0" ]
2
2022-03-05T09:55:49.000Z
2022-03-05T10:12:51.000Z
tools/r3det_dcl/train.py
junhai0428/RotationDetection
4249720ea4dacdd60e696901df8034e5cd0a1843
[ "Apache-2.0" ]
null
null
null
tools/r3det_dcl/train.py
junhai0428/RotationDetection
4249720ea4dacdd60e696901df8034e5cd0a1843
[ "Apache-2.0" ]
null
null
null
# -*- coding:utf-8 -*- # Author: Xue Yang <yangxue-2019-sjtu@sjtu.edu.cn>, <yangxue0827@126.com> # License: Apache-2.0 license # Copyright (c) SJTU. ALL rights reserved. from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import sys import numpy as n...
62.209677
122
0.430473
7985d4a5cf7425d91d3704ad3e647f1ff9c1c269
798
py
Python
v2_with_GUI/menu_view.py
lucasrennok/tic_tac_toe_python
3b7e17c8bb69116427190e5b3a787e625f964e5e
[ "MIT" ]
1
2020-09-01T18:35:02.000Z
2020-09-01T18:35:02.000Z
v2_with_GUI/menu_view.py
lucasrennok/Tic_Tac_Toe
3b7e17c8bb69116427190e5b3a787e625f964e5e
[ "MIT" ]
1
2020-07-14T01:54:12.000Z
2020-07-14T01:54:12.000Z
v2_with_GUI/menu_view.py
lucasrennok/tic_tac_toe_python
3b7e17c8bb69116427190e5b3a787e625f964e5e
[ "MIT" ]
null
null
null
#Imports import PySimpleGUI as sg class MenuScreen: def __init__(self): #layout layout = [ [sg.Text('Tic Tac Toe Game')], [sg.Radio('Offline', 'multiplayer', key='off', default=True), sg.Radio('Online', 'multiplayer', key='on')], [sg.Button('Play')] ] ...
24.181818
119
0.518797
7985d4e8ba84f24bc56183f2bcb93b836ffaf57a
3,777
py
Python
contrib/macdeploy/custom_dsstore.py
zahidaliayub/SportsCash-SCC
d878b9604107a6641d811d680d4bda83920c308e
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
zahidaliayub/SportsCash-SCC
d878b9604107a6641d811d680d4bda83920c308e
[ "MIT" ]
null
null
null
contrib/macdeploy/custom_dsstore.py
zahidaliayub/SportsCash-SCC
d878b9604107a6641d811d680d4bda83920c308e
[ "MIT" ]
3
2018-05-30T01:17:41.000Z
2018-07-17T03:02:49.000Z
#!/usr/bin/env python # Copyright (c) 2013-2016 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 division,print_function,unicode_literals import biplist from ds_store import DSStore...
61.918033
1,817
0.727562
7985d59cef0a3e381c366a6254f5338fc54ac5d2
3,679
py
Python
nsdu/renderer.py
watarinishin/ns-dispatch-utility
3acd0d4d985c3d9eda4e2242da3d32d874ec0e69
[ "MIT" ]
6
2021-11-16T14:45:27.000Z
2022-03-04T17:30:02.000Z
nsdu/renderer.py
watarinishin/ns-dispatch-utility
3acd0d4d985c3d9eda4e2242da3d32d874ec0e69
[ "MIT" ]
null
null
null
nsdu/renderer.py
watarinishin/ns-dispatch-utility
3acd0d4d985c3d9eda4e2242da3d32d874ec0e69
[ "MIT" ]
null
null
null
"""Render dispatches from templates. """ import logging import pathlib import jinja2 from nsdu import info from nsdu import exceptions from nsdu import bb_parser from nsdu import utils logger = logging.getLogger(__name__) class JinjaTemplateLoader(jinja2.BaseLoader): """Load Jinja templates using a callback ...
27.661654
99
0.673281
7985d6bff7ba9e46cc0f850cc6f06cbafd3de292
6,074
py
Python
configs/simulation/CPU2017_MP/6/deepsjeng_imagick_povray_deepsjeng_nab_parest.py
MattDAngeli/Hybrid-eDRAM-PCM-Full-System-Simulator
4ae14eb6d3c13ab8287e792054dadf8c44f064c3
[ "BSD-3-Clause" ]
null
null
null
configs/simulation/CPU2017_MP/6/deepsjeng_imagick_povray_deepsjeng_nab_parest.py
MattDAngeli/Hybrid-eDRAM-PCM-Full-System-Simulator
4ae14eb6d3c13ab8287e792054dadf8c44f064c3
[ "BSD-3-Clause" ]
null
null
null
configs/simulation/CPU2017_MP/6/deepsjeng_imagick_povray_deepsjeng_nab_parest.py
MattDAngeli/Hybrid-eDRAM-PCM-Full-System-Simulator
4ae14eb6d3c13ab8287e792054dadf8c44f064c3
[ "BSD-3-Clause" ]
null
null
null
# import the parser from optparse import OptionParser parser = OptionParser() parser.add_option('--workload_dir', help="workload directory") parser.add_option('--eDRAM_cache_size', help="eDRAM cache size") parser.add_option("-w", action="store_true",\ dest="eDRAM_cache_write_only_mode", ...
36.812121
247
0.71485
7985d78b7af9a499a56a8f95de6a5382ce39f563
7,158
py
Python
p1_navigation/src/dqn_agent.py
JamesMcGuigan/udacity-deep-reinforcement-learning
e093db535fb12dbfb8bc2b5764133e1f52bbbccd
[ "MIT" ]
null
null
null
p1_navigation/src/dqn_agent.py
JamesMcGuigan/udacity-deep-reinforcement-learning
e093db535fb12dbfb8bc2b5764133e1f52bbbccd
[ "MIT" ]
null
null
null
p1_navigation/src/dqn_agent.py
JamesMcGuigan/udacity-deep-reinforcement-learning
e093db535fb12dbfb8bc2b5764133e1f52bbbccd
[ "MIT" ]
null
null
null
import os import random from typing import Tuple import numpy as np import torch import torch.nn.functional as F import torch.optim as optim from src.ReplayBuffer import ReplayBuffer from src.SumTree import SumTreeReplayBuffer from src.model import QNetwork device = torch.device("cuda:0" if torch.cuda.is_available()...
39.32967
121
0.604359
7985d7ebe1249562600f4bea7ffb92b0e36004c8
14,864
py
Python
src/main/python/pybuilder/python_utils.py
IVFSTEST/pybuilder
2006a2da7b1f990d2cc981bebb88870ac9c2725b
[ "Apache-2.0" ]
1
2020-04-17T01:02:10.000Z
2020-04-17T01:02:10.000Z
src/main/python/pybuilder/python_utils.py
IVFSTEST/pybuilder
2006a2da7b1f990d2cc981bebb88870ac9c2725b
[ "Apache-2.0" ]
null
null
null
src/main/python/pybuilder/python_utils.py
IVFSTEST/pybuilder
2006a2da7b1f990d2cc981bebb88870ac9c2725b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2020 PyBuilder 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/l...
30.710744
118
0.635697
7985d9ffa01afeb4312f26a7f9599561a51dd35b
618
py
Python
python97/chapter04/duck_type.py
youaresherlock/PythonPractice
2e22d3fdcb26353cb0d8215c150e84d11bc9a022
[ "Apache-2.0" ]
null
null
null
python97/chapter04/duck_type.py
youaresherlock/PythonPractice
2e22d3fdcb26353cb0d8215c150e84d11bc9a022
[ "Apache-2.0" ]
null
null
null
python97/chapter04/duck_type.py
youaresherlock/PythonPractice
2e22d3fdcb26353cb0d8215c150e84d11bc9a022
[ "Apache-2.0" ]
1
2019-11-05T01:10:15.000Z
2019-11-05T01:10:15.000Z
#!usr/bin/python # -*- coding:utf8 -*- class Cat(object): def say(self): print("I am a cat") class Dog(object): def say(self): print("I am a dog") def __getitem__(self, item): return "bobby" class Duck(object): def say(self): print("I am a duck") # animal = Cat # ani...
17.166667
38
0.593851
7985da03a38c8a5451e0e987699ff89c2464234c
7,627
py
Python
linkedin_v2/linkedin.py
BrendanMartin/python-linkedin-v2
2fa2bfa6d5bb09d42dae3ec29a9373480d6948db
[ "MIT" ]
null
null
null
linkedin_v2/linkedin.py
BrendanMartin/python-linkedin-v2
2fa2bfa6d5bb09d42dae3ec29a9373480d6948db
[ "MIT" ]
null
null
null
linkedin_v2/linkedin.py
BrendanMartin/python-linkedin-v2
2fa2bfa6d5bb09d42dae3ec29a9373480d6948db
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals import contextlib import hashlib import random try: from urllib.parse import quote except ImportError: from urllib import quote import requests from requests_oauthlib import OAuth1 from .models import AccessToken from .utils import enum, to_utf8...
39.723958
100
0.61479
7985da21766dc3e57c4928eb1e8fd3e89ec85dad
1,319
py
Python
example_to_sql/data_generation/compas_data_generation.py
tum-db/mlinspect4sql
863f1a98baff92341722b4fb180008cf9b518b80
[ "Apache-2.0" ]
null
null
null
example_to_sql/data_generation/compas_data_generation.py
tum-db/mlinspect4sql
863f1a98baff92341722b4fb180008cf9b518b80
[ "Apache-2.0" ]
null
null
null
example_to_sql/data_generation/compas_data_generation.py
tum-db/mlinspect4sql
863f1a98baff92341722b4fb180008cf9b518b80
[ "Apache-2.0" ]
null
null
null
import pandas from example_to_sql._benchmark_utility import ROOT_DIR def generate_compas_dataset(sizes): """ As the compas pipeline does not use any joins, the data will just be augmented, by replicating the existing one. """ train_src = pandas.read_csv(ROOT_DIR / r"data_generation/original_csv/compas...
39.969697
116
0.673237
7985daa90e3712deb33240a5b055062f79afb4d6
7,893
py
Python
python/Qt/43.1.MDI.py
seekindark/helloworld
00fe439fdbd98add53f3bec7eac2b1ba1dc817a7
[ "BSD-2-Clause" ]
null
null
null
python/Qt/43.1.MDI.py
seekindark/helloworld
00fe439fdbd98add53f3bec7eac2b1ba1dc817a7
[ "BSD-2-Clause" ]
2
2019-06-24T00:56:52.000Z
2019-06-24T01:28:29.000Z
python/Qt/43.1.MDI.py
seekindark/helloworld
00fe439fdbd98add53f3bec7eac2b1ba1dc817a7
[ "BSD-2-Clause" ]
null
null
null
import sys from PyQt5 import QtCore, QtGui, QtWidgets from PyQt5.QtCore import Qt from PyQt5.QtGui import QFont, QIcon from PyQt5.QtWidgets import (QApplication, QMainWindow, QMenuBar, QMenu, QAction, QActionGroup, QToolBar, QStyle, QToolButton, QMdiArea, ...
33.163866
80
0.620043
7985dbc3fd9303574e57f96e93ff91351b303d6d
8,270
py
Python
scenedetect/video_stream.py
camjac251/PySceneDetect
fa6ff7c8ac88a7ff35c86aa5646e16773a1f471a
[ "BSD-3-Clause" ]
null
null
null
scenedetect/video_stream.py
camjac251/PySceneDetect
fa6ff7c8ac88a7ff35c86aa5646e16773a1f471a
[ "BSD-3-Clause" ]
null
null
null
scenedetect/video_stream.py
camjac251/PySceneDetect
fa6ff7c8ac88a7ff35c86aa5646e16773a1f471a
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # PySceneDetect: Python-Based Video Scene Detector # --------------------------------------------------------------- # [ Site: http://www.scenedetect.scenedetect.com/ ] # [ Docs: http://manual.scenedetect.scenedetect.com/ ] # [ Github: https://github.c...
34.747899
100
0.674607
7985dc05d4cd15e8f8f7715440e7daa557db431b
2,284
py
Python
ceilometer/tests/skip.py
CiscoSystems/ceilometer
a9267fd94e7854afa0720d761fbe75d946e7167d
[ "Apache-2.0" ]
1
2021-11-22T11:00:53.000Z
2021-11-22T11:00:53.000Z
ceilometer/tests/skip.py
CiscoSystems/ceilometer
a9267fd94e7854afa0720d761fbe75d946e7167d
[ "Apache-2.0" ]
null
null
null
ceilometer/tests/skip.py
CiscoSystems/ceilometer
a9267fd94e7854afa0720d761fbe75d946e7167d
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
30.453333
78
0.651926
7985dcbec9672b75282c6fa541dbb149f43f256b
35,270
py
Python
pandas/io/html.py
dycloud-chan/pandas
39ccb352b53e9b5b694c4f7f044774f9c3677e98
[ "BSD-3-Clause" ]
3
2018-04-24T13:31:51.000Z
2019-07-09T07:31:43.000Z
pandas/io/html.py
dycloud-chan/pandas
39ccb352b53e9b5b694c4f7f044774f9c3677e98
[ "BSD-3-Clause" ]
354
2018-05-26T13:28:49.000Z
2022-03-31T01:11:46.000Z
pandas/io/html.py
dycloud-chan/pandas
39ccb352b53e9b5b694c4f7f044774f9c3677e98
[ "BSD-3-Clause" ]
5
2018-04-24T13:31:56.000Z
2021-10-21T05:06:23.000Z
""" :mod:`pandas.io.html` is a module containing functionality for dealing with HTML IO. """ from __future__ import annotations from collections import abc import numbers import re from typing import ( Pattern, Sequence, ) from pandas._typing import ( FilePath, ReadBuffer, ) from pandas.compat._opti...
31.240035
87
0.59776
7985dcc71146b1b33dcd6a098cee6517d8d559d6
1,302
py
Python
settings.py
tillchen/Alien_Invasion
75a71eedd994e03b555c16a3bef382686a783993
[ "MIT" ]
2
2019-05-25T09:29:32.000Z
2020-08-10T07:56:51.000Z
settings.py
tillchen/Alien_Invasion
75a71eedd994e03b555c16a3bef382686a783993
[ "MIT" ]
null
null
null
settings.py
tillchen/Alien_Invasion
75a71eedd994e03b555c16a3bef382686a783993
[ "MIT" ]
1
2021-01-13T03:45:05.000Z
2021-01-13T03:45:05.000Z
# Author: Tianyao (Till) Chen # Email: tillchen417@gmail.com # File: settings.py class Settings: """The class to store all the settings for Alien Invasion.""" def __init__(self): """Initialize the static settings.""" # Screen settings. self.screen_width = 1200 self.screen_height...
30.27907
72
0.611367
7985dd316a632cf9a0d147a33bded8496d408781
1,993
py
Python
src/melange/src/soc/cache/sidebar.py
MatthewWilkes/mw4068-packaging
5c5d50eea89372e967994dac3bd8b06d25b4f0fa
[ "Apache-2.0" ]
null
null
null
src/melange/src/soc/cache/sidebar.py
MatthewWilkes/mw4068-packaging
5c5d50eea89372e967994dac3bd8b06d25b4f0fa
[ "Apache-2.0" ]
null
null
null
src/melange/src/soc/cache/sidebar.py
MatthewWilkes/mw4068-packaging
5c5d50eea89372e967994dac3bd8b06d25b4f0fa
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python2.5 # # Copyright 2009 the Melange 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...
24.604938
74
0.725539
7985de753c7e0d61483470a785b0773deaf45186
3,280
py
Python
certbot/tests/display/util_test.py
vivithemage/certbot
828be0071ea1fd41808b56d3a0024637091198bd
[ "Apache-2.0" ]
16,789
2016-05-06T19:49:59.000Z
2022-03-31T20:01:47.000Z
certbot/tests/display/util_test.py
vivithemage/certbot
828be0071ea1fd41808b56d3a0024637091198bd
[ "Apache-2.0" ]
5,737
2016-05-06T19:26:43.000Z
2022-03-31T20:27:38.000Z
certbot/tests/display/util_test.py
vivithemage/certbot
828be0071ea1fd41808b56d3a0024637091198bd
[ "Apache-2.0" ]
2,974
2016-05-06T19:51:23.000Z
2022-03-31T21:01:36.000Z
"""Test :mod:`certbot.display.util`.""" import io import socket import tempfile import unittest from certbot import errors import certbot.tests.util as test_util try: import mock except ImportError: # pragma: no cover from unittest import mock class NotifyTest(unittest.TestCase): """Tests for certbot.d...
31.84466
96
0.685061
7985deb974ded58cfbcd181abcdab161f84b4fb9
4,793
py
Python
csv_generator/tests/test_views.py
fatboystring/csv_generator
881b41d93aeb496ea6a25c687db3eab3e0eae571
[ "MIT" ]
3
2016-03-22T19:37:00.000Z
2018-05-22T22:14:36.000Z
csv_generator/tests/test_views.py
fatboystring/csv_generator
881b41d93aeb496ea6a25c687db3eab3e0eae571
[ "MIT" ]
2
2016-08-15T10:37:29.000Z
2016-11-24T12:37:40.000Z
csv_generator/tests/test_views.py
fatboystring/csv_generator
881b41d93aeb496ea6a25c687db3eab3e0eae571
[ "MIT" ]
1
2021-06-28T10:30:37.000Z
2021-06-28T10:30:37.000Z
""" Tests the csv_generator views """ from csv_generator.forms import SelectCsvGeneratorForm from csv_generator.models import CsvGenerator from csv_generator.views import CsvExportView from csv_generator.tests.models import TestModel from csv_generator.tests.utils import CsvGeneratorTestCase from django.contrib import ...
38.039683
108
0.667014
7985df8e5b703e8cfebb6792bd313a67db39d74d
2,535
py
Python
sales_centron/models/sale_order.py
masami10/centron_addons
e0fe82965cce285868d84c8ad698634e1478c399
[ "MIT" ]
1
2021-03-03T07:00:14.000Z
2021-03-03T07:00:14.000Z
sales_centron/models/sale_order.py
masami10/centron_addons
e0fe82965cce285868d84c8ad698634e1478c399
[ "MIT" ]
null
null
null
sales_centron/models/sale_order.py
masami10/centron_addons
e0fe82965cce285868d84c8ad698634e1478c399
[ "MIT" ]
1
2020-06-30T03:31:07.000Z
2020-06-30T03:31:07.000Z
# -*- coding: utf-8 -*- from odoo import models, fields, api,SUPERUSER_ID from odoo.exceptions import UserError class SaleOrder(models.Model): _inherit = "sale.order" @api.multi def action_confirm(self): if not (self._uid == SUPERUSER_ID or self.env.user.has_group('sales_centron.group_sale_sales...
42.966102
117
0.617357
7985dff0c5e506706477204594a06a3f9fc96ac3
1,827
py
Python
constants.py
endrikacupaj/LASAGNE
6321ab5161999905b357bd9b67906dcac04b8644
[ "MIT" ]
17
2021-04-06T13:06:17.000Z
2021-12-31T09:29:17.000Z
constants.py
endrikacupaj/LASAGNE
6321ab5161999905b357bd9b67906dcac04b8644
[ "MIT" ]
3
2021-04-28T08:12:15.000Z
2022-01-10T08:08:24.000Z
constants.py
endrikacupaj/LASAGNE
6321ab5161999905b357bd9b67906dcac04b8644
[ "MIT" ]
4
2021-08-16T10:02:31.000Z
2022-03-12T08:00:27.000Z
import os import torch from pathlib import Path from args import get_parser # set root path ROOT_PATH = Path(os.path.dirname(__file__)) # read parser parser = get_parser() args = parser.parse_args() # model name MODEL_NAME = 'LASAGNE' # define device CUDA = 'cuda' CPU = 'cpu' DEVICE = torch.device(CUDA if torch.cud...
21
65
0.729611
7985e11915da7a6f4f75c2149ad83c68ff4e0f52
956
py
Python
tests/plugins/test_qq.py
xcgx/streamlink
b635e0d9d0fe9363817a96ec7d31faefed95cb57
[ "BSD-2-Clause" ]
10
2017-04-10T18:25:41.000Z
2021-09-15T20:14:58.000Z
tests/plugins/test_qq.py
xcgx/streamlink
b635e0d9d0fe9363817a96ec7d31faefed95cb57
[ "BSD-2-Clause" ]
9
2020-04-04T09:49:52.000Z
2020-04-21T01:52:02.000Z
tests/plugins/test_qq.py
xcgx/streamlink
b635e0d9d0fe9363817a96ec7d31faefed95cb57
[ "BSD-2-Clause" ]
4
2017-03-17T12:28:27.000Z
2018-01-11T21:14:32.000Z
from unittest.mock import Mock import pytest from streamlink.plugins.qq import QQ from tests.plugins import PluginCanHandleUrl class TestPluginCanHandleUrlQQ(PluginCanHandleUrl): __plugin__ = QQ should_match = [ "http://live.qq.com/10003715", "http://live.qq.com/10007266", "http://l...
25.837838
60
0.630753
7985e2fdd1c877064161b6e99bc0c134f5faac6e
6,002
py
Python
fakeymacs_extensions/vscode_extensions/config.py
grandvin/fakeymacs
94f519d83d62c52351f3e5b1fc36234dbbbaf5c0
[ "MIT" ]
null
null
null
fakeymacs_extensions/vscode_extensions/config.py
grandvin/fakeymacs
94f519d83d62c52351f3e5b1fc36234dbbbaf5c0
[ "MIT" ]
null
null
null
fakeymacs_extensions/vscode_extensions/config.py
grandvin/fakeymacs
94f519d83d62c52351f3e5b1fc36234dbbbaf5c0
[ "MIT" ]
null
null
null
# -*- mode: python; coding: utf-8-with-signature-dos -*- #################################################################################################### ## VSCode Extension 用のキーの設定を行う #################################################################################################### try: # 設定されているか?...
35.099415
111
0.447517
7985e31c10b80825cb69c1dc0743d76dfebfc0b9
856
py
Python
python/python0/control.py
AlexanderE12345/codeexamples
32a32a2512f781a90d737990462282ed35881607
[ "Apache-2.0" ]
6
2021-06-30T20:53:34.000Z
2022-03-03T04:08:47.000Z
python/python0/control.py
AlexanderE12345/codeexamples
32a32a2512f781a90d737990462282ed35881607
[ "Apache-2.0" ]
null
null
null
python/python0/control.py
AlexanderE12345/codeexamples
32a32a2512f781a90d737990462282ed35881607
[ "Apache-2.0" ]
11
2020-06-23T05:58:26.000Z
2022-01-22T01:26:49.000Z
''' Example of python control structures ''' a = 5 b = int(input("Enter an integer: ")) # If-then-else statment if a < b: print('{} is less than {}'.format(a,b)) elif a > b: print('{} is greater than {}'.format(a,b)) else: print('{} is equal to {}'.format(a,b)) # While loop ii = 0 print("While loop:") w...
20.380952
64
0.567757
7985e3da95d860e0498837b9b8847c49016883b5
1,388
py
Python
data/test/python/2c880c1c28ba4d5294c16825909db23ab08d309fPancakes.py
harshp8l/deep-learning-lang-detection
2a54293181c1c2b1a2b840ddee4d4d80177efb33
[ "MIT" ]
84
2017-10-25T15:49:21.000Z
2021-11-28T21:25:54.000Z
data/test/python/2c880c1c28ba4d5294c16825909db23ab08d309fPancakes.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
5
2018-03-29T11:50:46.000Z
2021-04-26T13:33:18.000Z
data/test/python/2c880c1c28ba4d5294c16825909db23ab08d309fPancakes.py
vassalos/deep-learning-lang-detection
cbb00b3e81bed3a64553f9c6aa6138b2511e544e
[ "MIT" ]
24
2017-11-22T08:31:00.000Z
2022-03-27T01:22:31.000Z
import Queue def flipped(stack): result=[] for i in stack: if i=="-": result.append("+") else: result.append("-") return result input=raw_input() for casenumber in xrange(1,int(input)+1): n=list(raw_input()) ways=[] frontier=Queue.PriorityQueue() hei...
24.350877
54
0.503602
7985e568267a18d766234caa171aaf7fc5a8b317
2,498
py
Python
mininet_topologies/datacenterHARoot.py
Brunner-Kibali/RYU-SDN-Code-Playground
9cc6526fe6264c6993fbc6e576b97c144f96c57f
[ "Apache-2.0" ]
null
null
null
mininet_topologies/datacenterHARoot.py
Brunner-Kibali/RYU-SDN-Code-Playground
9cc6526fe6264c6993fbc6e576b97c144f96c57f
[ "Apache-2.0" ]
null
null
null
mininet_topologies/datacenterHARoot.py
Brunner-Kibali/RYU-SDN-Code-Playground
9cc6526fe6264c6993fbc6e576b97c144f96c57f
[ "Apache-2.0" ]
null
null
null
""" A simple datacenter topology script for Mininet. ,----------------------------. Each root switch connected in ring. [ s1 ]------[ s2 ]--- ... ---[ s# ] |,----------' | Each ToR switch connects to every ||,--------------------------' root switch. [ s1r1 ]=. [ s1...
35.685714
79
0.526821
7985e58a709f48072d8443526fe778ece8609d28
202
py
Python
lab 3/Pattern lab 3/Pattern/untitled2.py
nasim-aust/Pattern-Lab-Work
5300f837c5e66b260f070d772d56c9646366adb6
[ "Apache-2.0" ]
null
null
null
lab 3/Pattern lab 3/Pattern/untitled2.py
nasim-aust/Pattern-Lab-Work
5300f837c5e66b260f070d772d56c9646366adb6
[ "Apache-2.0" ]
null
null
null
lab 3/Pattern lab 3/Pattern/untitled2.py
nasim-aust/Pattern-Lab-Work
5300f837c5e66b260f070d772d56c9646366adb6
[ "Apache-2.0" ]
null
null
null
import numpy as np from matplotlib import pyplot as plt x=np.linspace(0,20,200) y1=np.exp(-0.1*x)*np.sin(x) y2=np.exp(-0.3*x)*np.sin(x) plt.plot(x,y1) plt.plot(x,y2) plt.title('Just Enough!') plt.show()
22.444444
36
0.693069
7985e6847c5fe7e2ea390a7a247a7e31114a92f9
1,153
py
Python
raiden/tests/integration/contracts/test_token.py
Dominik1999/raiden
95a8fa2499da82f3d216b7e8ad035fb4eba992fb
[ "MIT" ]
null
null
null
raiden/tests/integration/contracts/test_token.py
Dominik1999/raiden
95a8fa2499da82f3d216b7e8ad035fb4eba992fb
[ "MIT" ]
null
null
null
raiden/tests/integration/contracts/test_token.py
Dominik1999/raiden
95a8fa2499da82f3d216b7e8ad035fb4eba992fb
[ "MIT" ]
null
null
null
from eth_utils import to_canonical_address, to_checksum_address from raiden.network.proxies import Token from raiden.network.rpc.client import JSONRPCClient from raiden.utils import privatekey_to_address def test_token( deploy_client, token_proxy, private_keys, web3, ): privkey = ...
32.942857
73
0.746748
7985e7612f04e5f3985bd05b8fe284294997a183
1,383
py
Python
aiida/restapi/translator/nodes/data/upf.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
1
2016-09-12T10:51:00.000Z
2016-09-12T10:51:00.000Z
aiida/restapi/translator/nodes/data/upf.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
17
2020-03-11T17:04:05.000Z
2020-05-01T09:34:45.000Z
aiida/restapi/translator/nodes/data/upf.py
louisponet/aiida-core
3214236df66a3792ee57fe38a06c0c3bb65861ab
[ "MIT", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
33.731707
80
0.531453
7985e7bbca19b995c0b52847160d1b0e42ccbaab
31
py
Python
scripts/__init__.py
linuxaddict89/luminos
cd525173bd6766eb109c4409581f6c6273d1c1bd
[ "MIT" ]
null
null
null
scripts/__init__.py
linuxaddict89/luminos
cd525173bd6766eb109c4409581f6c6273d1c1bd
[ "MIT" ]
2
2021-10-03T08:44:45.000Z
2021-10-03T08:49:49.000Z
scripts/__init__.py
linuxaddict89/luminos
cd525173bd6766eb109c4409581f6c6273d1c1bd
[ "MIT" ]
null
null
null
"""Various utility scripts."""
15.5
30
0.677419
7985e91b7378d0b501d007cf8eeccb9ce37159d6
1,103
py
Python
utils/make_request.py
orioks-monitoring/bot
b497ed97f578159669768b073e7a288569a1d675
[ "MIT" ]
3
2022-03-28T08:47:08.000Z
2022-03-31T19:24:48.000Z
utils/make_request.py
orioks-monitoring/bot
b497ed97f578159669768b073e7a288569a1d675
[ "MIT" ]
1
2022-03-30T15:46:10.000Z
2022-03-30T15:46:10.000Z
utils/make_request.py
orioks-monitoring/bot
b497ed97f578159669768b073e7a288569a1d675
[ "MIT" ]
3
2022-03-26T13:48:12.000Z
2022-03-30T15:25:37.000Z
import asyncio import logging import config import db.admins_statistics import aiohttp _sem = asyncio.Semaphore(config.ORIOKS_REQUESTS_SEMAPHORE_VALUE) async def get_request(url: str, session: aiohttp.ClientSession) -> str: async with _sem: # next coroutine(s) will stuck here until the previous is done ...
42.423077
115
0.740707
7985e9eef6b04eedef0d6332a6546ef831025271
10,256
py
Python
PythonHome/Lib/site-packages/setuptools/sandbox.py
zlsun/Wox
da4cecdc84df6cc852fedfee7d28e6f5baf79771
[ "MIT" ]
3
2021-05-14T01:34:01.000Z
2021-05-14T20:55:01.000Z
PythonHome/Lib/site-packages/setuptools/sandbox.py
zlsun/Wox
da4cecdc84df6cc852fedfee7d28e6f5baf79771
[ "MIT" ]
null
null
null
PythonHome/Lib/site-packages/setuptools/sandbox.py
zlsun/Wox
da4cecdc84df6cc852fedfee7d28e6f5baf79771
[ "MIT" ]
null
null
null
import os import sys import tempfile import operator import functools import itertools import re import pkg_resources if os.name == "java": import org.python.modules.posix.PosixModule as _os else: _os = sys.modules[os.name] try: _file = file except NameError: _file = None _open = open from distutils.e...
30.891566
79
0.606767
7985ea80e78feea38d22de873ac49b16577eb983
1,061
py
Python
bsp2obj/pak.py
JakobCh/BSP2OBJ
1567604f86177fd94bd2141c82a3b585d36aae5d
[ "MIT" ]
null
null
null
bsp2obj/pak.py
JakobCh/BSP2OBJ
1567604f86177fd94bd2141c82a3b585d36aae5d
[ "MIT" ]
null
null
null
bsp2obj/pak.py
JakobCh/BSP2OBJ
1567604f86177fd94bd2141c82a3b585d36aae5d
[ "MIT" ]
null
null
null
import struct from ctypes import * class PAK(object): def __init__(self, stream): self.stream = stream header, = struct.unpack("4s", stream.read(4)) #Python3 Bytearray to string convertion if type(header) == type(b""): header = header.decode("utf-8") if(header...
33.15625
95
0.593779
7985eae332610f47f975320f0101a2d8aa799455
2,473
py
Python
magenta/pipelines/chord_pipelines_test.py
undeadinu/magenta
1a5774e429849a3e79d00fc6d152ddd4a2d1ad31
[ "Apache-2.0" ]
null
null
null
magenta/pipelines/chord_pipelines_test.py
undeadinu/magenta
1a5774e429849a3e79d00fc6d152ddd4a2d1ad31
[ "Apache-2.0" ]
null
null
null
magenta/pipelines/chord_pipelines_test.py
undeadinu/magenta
1a5774e429849a3e79d00fc6d152ddd4a2d1ad31
[ "Apache-2.0" ]
null
null
null
# Copyright 2016 Google Inc. 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 applicable law or ag...
37.469697
75
0.727457
7985eb70e6a0bd33c84d51eb3498002048d58536
4,312
py
Python
examples/cluster/plot_adjusted_for_chance_measures.py
MaiRajborirug/scikit-learn
c18d015372f7041099d19c215cd4c36ffd6fe5c5
[ "BSD-3-Clause" ]
50,961
2015-01-01T06:06:31.000Z
2022-03-31T23:40:12.000Z
examples/cluster/plot_adjusted_for_chance_measures.py
MaiRajborirug/scikit-learn
c18d015372f7041099d19c215cd4c36ffd6fe5c5
[ "BSD-3-Clause" ]
17,065
2015-01-01T02:01:58.000Z
2022-03-31T23:48:34.000Z
examples/cluster/plot_adjusted_for_chance_measures.py
MaiRajborirug/scikit-learn
c18d015372f7041099d19c215cd4c36ffd6fe5c5
[ "BSD-3-Clause" ]
26,886
2015-01-01T00:59:27.000Z
2022-03-31T18:03:23.000Z
""" ========================================================== Adjustment for chance in clustering performance evaluation ========================================================== The following plots demonstrate the impact of the number of clusters and number of samples on various clustering performance evaluation me...
31.246377
88
0.70756
7985ebc749cb583c6a149929754f6df4e08adc1a
380
py
Python
loopr/utils/common_utils.py
looprai/loopr-python-sdk
b2eb4eae29dcd0f8054ed19bb08ebf0c9978f6f0
[ "MIT" ]
4
2020-10-22T06:36:01.000Z
2021-01-22T11:59:59.000Z
loopr/utils/common_utils.py
looprai/loopr-python-sdk
b2eb4eae29dcd0f8054ed19bb08ebf0c9978f6f0
[ "MIT" ]
null
null
null
loopr/utils/common_utils.py
looprai/loopr-python-sdk
b2eb4eae29dcd0f8054ed19bb08ebf0c9978f6f0
[ "MIT" ]
null
null
null
import re from datetime import datetime """ Generating slug with name. """ def slug_create(name: str): a = name.lower().replace(" ", "-") return re.sub(r"[^a-zA-Z0-9-_~]", "", a) def encode_dict(field_values: dict): for key, value in field_values.items(): if isinstance(value, datetime): ...
20
44
0.631579
7985ec1fbbe725027173205519dfa66b2a2e875c
566
py
Python
wheat/protocols/introducer_protocol.py
grayfallstown/wheat-blockchain
f391cdd30a0cbcdb2adf4439a25581fd28b42c1f
[ "Apache-2.0" ]
15
2021-07-12T14:27:42.000Z
2022-02-09T04:32:44.000Z
wheat/protocols/introducer_protocol.py
grayfallstown/wheat-blockchain
f391cdd30a0cbcdb2adf4439a25581fd28b42c1f
[ "Apache-2.0" ]
21
2021-07-12T23:25:36.000Z
2021-10-29T23:19:55.000Z
wheat/protocols/introducer_protocol.py
grayfallstown/wheat-blockchain
f391cdd30a0cbcdb2adf4439a25581fd28b42c1f
[ "Apache-2.0" ]
8
2021-07-12T13:15:19.000Z
2022-03-15T08:41:18.000Z
from dataclasses import dataclass from typing import List from wheat.types.peer_info import TimestampedPeerInfo from wheat.util.streamable import Streamable, streamable """ Protocol to introducer Note: When changing this file, also change protocol_message_types.py, and the protocol version in shared_protocol.py """ ...
22.64
116
0.795053
7985ece518472fba7983eb1c848ba2cb8a4554af
428
py
Python
Study/example/binary_search.py
KHJcode/Algorithm-study
fa08d3c752fcb3557fd45fb394157926afc0de4a
[ "MIT" ]
2
2020-05-23T01:55:38.000Z
2020-07-07T15:59:00.000Z
Study/example/binary_search.py
KHJcode/Algorithm-study
fa08d3c752fcb3557fd45fb394157926afc0de4a
[ "MIT" ]
null
null
null
Study/example/binary_search.py
KHJcode/Algorithm-study
fa08d3c752fcb3557fd45fb394157926afc0de4a
[ "MIT" ]
null
null
null
def binarySearch(array, target): start = 0 end = len(array) - 1 while start <= end: midIndex = (end - start) // 2 indexValue = array[midIndex] if indexValue == target: return midIndex elif indexValue < target: start = midIndex + 1 else: end = midIndex - 1 print(midIndex, indexValue) ...
25.176471
51
0.649533
7985ed5d3e79d03f95fa74081458c0afa201f8ef
75,842
py
Python
tests/runner.py
bmeurer/emscripten
59a416cb3f72d746678fc44a4d2626eb6be98151
[ "MIT" ]
null
null
null
tests/runner.py
bmeurer/emscripten
59a416cb3f72d746678fc44a4d2626eb6be98151
[ "MIT" ]
null
null
null
tests/runner.py
bmeurer/emscripten
59a416cb3f72d746678fc44a4d2626eb6be98151
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright 2010 The Emscripten Authors. All rights reserved. # Emscripten is available under two separate licenses, the MIT license and the # University of Illinois/NCSA Open Source License. Both these licenses can be # found in the LICENSE file. """This is the Emscripten test runner. To run ...
35.961119
205
0.645566
7985edbc2a928f81acc6944e1c74d341c4e15538
417
py
Python
dojo/notes/urls.py
mtcolman/django-DefectDojo
76175aca446e077884bdb5e1d8e2a671a0840775
[ "BSD-3-Clause" ]
249
2016-09-06T21:04:40.000Z
2018-01-19T15:59:44.000Z
dojo/notes/urls.py
mtcolman/django-DefectDojo
76175aca446e077884bdb5e1d8e2a671a0840775
[ "BSD-3-Clause" ]
255
2016-09-06T21:36:37.000Z
2018-01-19T19:57:57.000Z
dojo/notes/urls.py
mtcolman/django-DefectDojo
76175aca446e077884bdb5e1d8e2a671a0840775
[ "BSD-3-Clause" ]
152
2016-09-06T21:04:54.000Z
2018-01-18T08:52:24.000Z
from django.conf.urls import url from . import views urlpatterns = [ url(r'^notes/(?P<id>\d+)/delete/(?P<page>[\w-]+)/(?P<objid>\d+)$', views.delete_note, name='delete_note'), url(r'^notes/(?P<id>\d+)/edit/(?P<page>[\w-]+)/(?P<objid>\d+)$', views.edit_note, name='edit_note'), url(r'^notes/(?P<id>\d+)/histo...
46.333333
112
0.573141
7985ee15739c514fb95353a96752c452436c3fdb
2,913
py
Python
roguelike/input_handlers.py
clamytoe/roguelike
6b06eaf76db2ba44751c3941d0d1cc8444c38336
[ "MIT" ]
2
2019-06-13T03:02:41.000Z
2019-06-14T18:35:43.000Z
roguelike/input_handlers.py
clamytoe/roguelike
6b06eaf76db2ba44751c3941d0d1cc8444c38336
[ "MIT" ]
null
null
null
roguelike/input_handlers.py
clamytoe/roguelike
6b06eaf76db2ba44751c3941d0d1cc8444c38336
[ "MIT" ]
null
null
null
import tcod from .game_states import GameStates ESCAPE = {"exit": True} FULL_SCREEN = {"full_screen": True} INVENTORY = {"show_inventory": True} TCOD_KEYS = { tcod.KEY_UP: {"move": (0, -1)}, tcod.KEY_DOWN: {"move": (0, 1)}, tcod.KEY_LEFT: {"move": (-1, 0)}, tcod.KEY_RIGHT: {"move": (1, 0)}, tcod.K...
22.757813
80
0.600755
7985ef29c792e1b8263b0384d1f68ff2557d8880
5,121
py
Python
src/demos/python/irrlicht/demo_IRR_crank_plot.py
lucasw/chrono
e79d8c761c718ecb4c796725cff37026f357da8c
[ "BSD-3-Clause" ]
null
null
null
src/demos/python/irrlicht/demo_IRR_crank_plot.py
lucasw/chrono
e79d8c761c718ecb4c796725cff37026f357da8c
[ "BSD-3-Clause" ]
null
null
null
src/demos/python/irrlicht/demo_IRR_crank_plot.py
lucasw/chrono
e79d8c761c718ecb4c796725cff37026f357da8c
[ "BSD-3-Clause" ]
null
null
null
# ============================================================================= # PROJECT CHRONO - http://projectchrono.org # # Copyright (c) 2019 projectchrono.org # All rights reserved. # # Use of this source code is governed by a BSD-style license that can be found # in the LICENSE file at the top level of the distr...
30.301775
99
0.656903
7985efa0f7c14f6239771375971c057dfa0f5a13
54,983
py
Python
gensrc/script/vectorized/vectorized_functions.py
niexiongchao/starRocks
afecea80e50ee505261fffc3cff5f546ee285475
[ "Zlib", "PSF-2.0", "Apache-2.0" ]
null
null
null
gensrc/script/vectorized/vectorized_functions.py
niexiongchao/starRocks
afecea80e50ee505261fffc3cff5f546ee285475
[ "Zlib", "PSF-2.0", "Apache-2.0" ]
null
null
null
gensrc/script/vectorized/vectorized_functions.py
niexiongchao/starRocks
afecea80e50ee505261fffc3cff5f546ee285475
[ "Zlib", "PSF-2.0", "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # encoding: utf-8 # This file is licensed under the Elastic License 2.0. Copyright 2021-present, StarRocks Limited. # The format is: # <function id> <name>, <return_type>, [<args>], <backend fn>, # With an optional # <prepare fn>, <close fn> # # example: # [1, "add", "TINYINT", ["TINYINT",...
77.223315
182
0.652165
7985efcf937b9b26d32adac9c414a3f5f16fe16a
408
py
Python
IDLE-files/sierpinski.py
arvidl/dynamical-systems-with-applications-using-python
db747f550337a7e7ec4a0851b188dd6e2e816a64
[ "BSD-2-Clause" ]
106
2018-10-10T18:04:02.000Z
2022-03-11T06:32:38.000Z
IDLE-files/sierpinski.py
arvidl/dynamical-systems-with-applications-using-python
db747f550337a7e7ec4a0851b188dd6e2e816a64
[ "BSD-2-Clause" ]
null
null
null
IDLE-files/sierpinski.py
arvidl/dynamical-systems-with-applications-using-python
db747f550337a7e7ec4a0851b188dd6e2e816a64
[ "BSD-2-Clause" ]
54
2018-02-06T09:47:42.000Z
2022-03-25T15:41:43.000Z
# Sierpinski triangle. # Run the Module (or type F5). # Save the file as sierpinski.py. from turtle import * def sierpinski(length, level): speed(0) # Fastest speed. if level==0: return begin_fill() # Fill shape. color('red'sierpinski(200,3)) for i in range(3): sierpinski(length...
21.473684
41
0.612745
7985f0d342cf01a1abcaaa2f2dff0e9bd0f606b0
9,638
py
Python
error_correction/hamming_error_correction.py
LiquidFun/stegowav
89ef0b40c52c834febffeeefba30eccbb0862e29
[ "Apache-2.0" ]
null
null
null
error_correction/hamming_error_correction.py
LiquidFun/stegowav
89ef0b40c52c834febffeeefba30eccbb0862e29
[ "Apache-2.0" ]
null
null
null
error_correction/hamming_error_correction.py
LiquidFun/stegowav
89ef0b40c52c834febffeeefba30eccbb0862e29
[ "Apache-2.0" ]
null
null
null
import numpy as np from error_correction.error_correction_type import ErrorCorrectionType from error_correction.generic_error_correction import GenericErrorCorrection class HammingErrorCorrection(GenericErrorCorrection): def __init__(self): super().__init__(ErrorCorrectionType.HAMMING) @staticmetho...
35.047273
120
0.633119
7985f22c5f679d205b7c13156443e2ec7daf72d2
6,411
py
Python
roccclient/models/response_page_metadata.py
Sage-Bionetworks/rocc-client
85b73afe7d4977094810c0a8094f56ebe7ed3d48
[ "Apache-2.0" ]
null
null
null
roccclient/models/response_page_metadata.py
Sage-Bionetworks/rocc-client
85b73afe7d4977094810c0a8094f56ebe7ed3d48
[ "Apache-2.0" ]
14
2020-12-06T23:54:23.000Z
2021-02-03T18:35:02.000Z
roccclient/models/response_page_metadata.py
Sage-Bionetworks/rocc-client
85b73afe7d4977094810c0a8094f56ebe7ed3d48
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Registry of Open Community Challenge API The OpenAPI specification implemented by the Challenge Registries. # Introduction TBA # noqa: E501 The version of the OpenAPI document: 0.1.4 Contact: thomas.schaffter@sagebionetworks.org Generated by: https://openapi-generator.tech "...
30.674641
125
0.607394
7985f286bb7ee5c19461781472f07095327cd362
2,295
py
Python
passes/idempotent-regions/test/code/hitting_set/gen-branchless-test.py
TUDSSL/WARio
e57fe0857ba3327d42ec0be71b62ed561b7c4b2b
[ "MIT" ]
2
2022-03-14T12:48:18.000Z
2022-03-14T12:48:24.000Z
passes/idempotent-regions/test/code/hitting_set/gen-branchless-test.py
TUDSSL/WARio
e57fe0857ba3327d42ec0be71b62ed561b7c4b2b
[ "MIT" ]
null
null
null
passes/idempotent-regions/test/code/hitting_set/gen-branchless-test.py
TUDSSL/WARio
e57fe0857ba3327d42ec0be71b62ed561b7c4b2b
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys import random import math # Create brachless_X_war_Y_cut.c test cases if len(sys.argv) < 3: print('Create a test case for branchless_X_war_y_cut.c') print('Provide two arguments: X Y') exit(-1) X = int(sys.argv[1]) Y = int(sys.argv[2]) try: Extra = sys.argv[3] except: ...
17.126866
62
0.649237
7985f329bec7e6e7f437699d56233f17512eba6b
7,103
py
Python
torch/autograd/_functions/blas.py
UmaTaru/run
be29e4d41a4de3dee27cd6796801bfe51382d294
[ "MIT" ]
null
null
null
torch/autograd/_functions/blas.py
UmaTaru/run
be29e4d41a4de3dee27cd6796801bfe51382d294
[ "MIT" ]
null
null
null
torch/autograd/_functions/blas.py
UmaTaru/run
be29e4d41a4de3dee27cd6796801bfe51382d294
[ "MIT" ]
null
null
null
import torch from ..function import Function, InplaceFunction # TODO: no need to save all args if the grad w.r.t. some of them is not needed def _get_output(ctx, arg, inplace=False): if inplace: ctx.mark_dirty(arg) return arg else: return arg.new().resize_as_(arg) class Addmm(Inplac...
33.663507
91
0.609038
7985f3fc9100c4a33fcc99265fed2aefd9e54964
1,010
py
Python
test/test_del_group.py
glazkova-a/python_training
051bd16862922413fb05e9d423dc4b0b6db21c29
[ "Apache-2.0" ]
null
null
null
test/test_del_group.py
glazkova-a/python_training
051bd16862922413fb05e9d423dc4b0b6db21c29
[ "Apache-2.0" ]
null
null
null
test/test_del_group.py
glazkova-a/python_training
051bd16862922413fb05e9d423dc4b0b6db21c29
[ "Apache-2.0" ]
null
null
null
from model.group import Group #from random import randrange import random #def test_del_some_group(app): # if app.group.count() == 0: #app.group.create(Group(name="test")) #old_groups = app.group.get_group_list() #index = randrange(len(old_groups)) #app.group.del_group_by_index(index) #new...
33.666667
113
0.69505
7985f55ff6ce3795ffdf378b3bcd1cc7f8d72efc
2,195
py
Python
Utils/pytorchtools.py
GatorSense/Histological_Segmentation
12849fff3d9d58c1fe419b18dba49294db375488
[ "MIT" ]
null
null
null
Utils/pytorchtools.py
GatorSense/Histological_Segmentation
12849fff3d9d58c1fe419b18dba49294db375488
[ "MIT" ]
null
null
null
Utils/pytorchtools.py
GatorSense/Histological_Segmentation
12849fff3d9d58c1fe419b18dba49294db375488
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Jun 22 16:26:25 2021 Code modified from: https://github.com/Bjarten/early-stopping-pytorch @author: jpeeples """ import numpy as np import torch class EarlyStopping: """Early stops the training if validation loss doesn't improve after a given patience.""" def __init__...
39.196429
102
0.585421
7985f5e8be3fe7da4ec2bafa71fc3e63ebed9406
3,013
py
Python
Bio/PDB/PSEA.py
deepaklorkhatri007/biopython
74eb89b8d719d450f406ebe20464e20eefa44f52
[ "BSD-3-Clause" ]
null
null
null
Bio/PDB/PSEA.py
deepaklorkhatri007/biopython
74eb89b8d719d450f406ebe20464e20eefa44f52
[ "BSD-3-Clause" ]
null
null
null
Bio/PDB/PSEA.py
deepaklorkhatri007/biopython
74eb89b8d719d450f406ebe20464e20eefa44f52
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2006, Thomas Hamelryck (thamelry@binf.ku.dk) # # This file is part of the Biopython distribution and governed by your # choice of the "Biopython License Agreement" or the "BSD 3-Clause License". # Please see the LICENSE file that should have been included as part of this # package. """Wrappers for PSEA...
25.319328
80
0.596416
7985f67cc0b2a4a37a9e0b6324de478f2f672c52
4,767
py
Python
evaluate.py
Dog0320/BERT-NLU
c760a09faee141526dbb241040d73d0870118f6d
[ "Apache-2.0" ]
1
2021-04-27T05:23:38.000Z
2021-04-27T05:23:38.000Z
evaluate.py
Dog0320/BERT-NLU
c760a09faee141526dbb241040d73d0870118f6d
[ "Apache-2.0" ]
null
null
null
evaluate.py
Dog0320/BERT-NLU
c760a09faee141526dbb241040d73d0870118f6d
[ "Apache-2.0" ]
null
null
null
import argparse import os import numpy as np import torch from seqeval.metrics import accuracy_score, f1_score, precision_score, recall_score from torch.utils.data import DataLoader from tqdm import tqdm from transformers import BertTokenizer, BertConfig from model import Model from utils.data_utils import NluDataset...
36.113636
91
0.690581
7985f756beb32b088b8c92bc85f429e3c0e29df6
4,603
py
Python
tests/test_audios.py
Desenho2018-1/tatics-framework
46a9ea99eeb46fdc5a048c41fa478cbfaeb1ee85
[ "MIT" ]
4
2018-06-08T00:49:54.000Z
2021-08-06T04:45:04.000Z
tests/test_audios.py
Desenho2018-1/tatics-framework
46a9ea99eeb46fdc5a048c41fa478cbfaeb1ee85
[ "MIT" ]
28
2018-05-29T11:32:53.000Z
2019-10-22T18:30:55.000Z
tests/test_audios.py
rodrigocam/simian
157a7424f28bd0656a4e400817b561ffc987ddd5
[ "MIT" ]
2
2018-06-30T02:46:22.000Z
2020-04-30T15:17:04.000Z
import unittest import pygame from simian.audio.audios import Sound, Music from simian.audio.audio_manager import AudioManager class SoundTest(unittest.TestCase): def setUp(self): self.audio_manager = AudioManager() def test_should_create_sound(self): try: sound = Sound('sound.wa...
28.067073
66
0.620899
7985f79fc087d3bb4a2f633228d0c395d9a36ba7
27,250
py
Python
tensorflow/python/keras/tests/model_subclassing_test.py
jray319/tensorflow
5cdf8f26c806e893e0773ad34e2b59008cc6f8ec
[ "Apache-2.0" ]
1
2020-07-07T00:33:26.000Z
2020-07-07T00:33:26.000Z
tensorflow/python/keras/tests/model_subclassing_test.py
jray319/tensorflow
5cdf8f26c806e893e0773ad34e2b59008cc6f8ec
[ "Apache-2.0" ]
1
2022-02-10T02:02:34.000Z
2022-02-10T02:02:34.000Z
tensorflow/python/keras/tests/model_subclassing_test.py
jray319/tensorflow
5cdf8f26c806e893e0773ad34e2b59008cc6f8ec
[ "Apache-2.0" ]
1
2021-05-13T02:54:49.000Z
2021-05-13T02:54:49.000Z
# Copyright 2018 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...
36.140584
83
0.660404
7985f8da449c7f0994b157810c0987fdfa38439d
79,885
py
Python
lib/rucio/core/request.py
rak108/rucio
882b662a24c75d515080606be635959566b17f14
[ "Apache-2.0" ]
null
null
null
lib/rucio/core/request.py
rak108/rucio
882b662a24c75d515080606be635959566b17f14
[ "Apache-2.0" ]
null
null
null
lib/rucio/core/request.py
rak108/rucio
882b662a24c75d515080606be635959566b17f14
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2013-2021 CERN # # 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 a...
48.651035
246
0.616762
7985f8e0040fc99fd79d7386d69d33ea58ef279a
2,480
py
Python
employee_management/migrations/0001_initial.py
burkepeterson/burke_peterson_portfolio_website
09198de19a7d8ce0908da78db51da4f027d64e0e
[ "MIT" ]
null
null
null
employee_management/migrations/0001_initial.py
burkepeterson/burke_peterson_portfolio_website
09198de19a7d8ce0908da78db51da4f027d64e0e
[ "MIT" ]
6
2020-06-09T23:29:18.000Z
2021-12-13T20:34:55.000Z
employee_management/migrations/0001_initial.py
burkepeterson/burke_peterson_portfolio_website
09198de19a7d8ce0908da78db51da4f027d64e0e
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2020-03-13 04:37 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='Position', fields=[ ...
47.692308
196
0.583065
7985f91483f3c60ceaefd5914d00aacce078743a
757
py
Python
agrirouter/messaging/services/http/outbox.py
DKE-Data/agrirouter-sdk-python
6d6b26606f7d424c62289af56da55acf412772fc
[ "Apache-2.0" ]
null
null
null
agrirouter/messaging/services/http/outbox.py
DKE-Data/agrirouter-sdk-python
6d6b26606f7d424c62289af56da55acf412772fc
[ "Apache-2.0" ]
null
null
null
agrirouter/messaging/services/http/outbox.py
DKE-Data/agrirouter-sdk-python
6d6b26606f7d424c62289af56da55acf412772fc
[ "Apache-2.0" ]
null
null
null
from agrirouter.messaging.clients.http import HttpClient from agrirouter.messaging.exceptions import OutboxException from agrirouter.messaging.result import OutboxResponse class OutboxService: def __init__(self): self.client = HttpClient() def fetch(self, onboarding_response) -> OutboxResponse: ...
34.409091
109
0.726552
7985f9a4302217a4337c566c2a5e29ebaa73548c
7,767
py
Python
bsr/priors.py
ejhigson/bsr
6ec321a76c80106ca4bf8d6821c822c056247d23
[ "MIT" ]
4
2018-09-14T06:19:50.000Z
2018-10-08T05:41:22.000Z
bsr/priors.py
ejhigson/bsr
6ec321a76c80106ca4bf8d6821c822c056247d23
[ "MIT" ]
null
null
null
bsr/priors.py
ejhigson/bsr
6ec321a76c80106ca4bf8d6821c822c056247d23
[ "MIT" ]
1
2020-06-19T20:54:13.000Z
2020-06-19T20:54:13.000Z
#!/usr/bin/env python """Python priors for use with PolyChord. Includes prior settings for the results used in the paper. Most of the functions here build on dyPolyChord's priors functionality. """ import copy import numpy as np import bsr.basis_functions as bf import bsr.neural_networks as nn import dyPolyChord.python...
43.634831
79
0.62714
7985fa2fc49d1dfc1c9aa25b5d63823fe7125f36
1,553
py
Python
scripts/PBRViewportManager/setupMenu.py
AsoboStudio/FlightSim-3dsMax-tools
a94564afdd648d202c2ebcc98f0d7ed6e61528f1
[ "MIT" ]
9
2020-04-28T14:05:15.000Z
2022-03-23T05:56:45.000Z
scripts/PBRViewportManager/setupMenu.py
AsoboStudio/FlightSim-3dsMax-tools
a94564afdd648d202c2ebcc98f0d7ed6e61528f1
[ "MIT" ]
null
null
null
scripts/PBRViewportManager/setupMenu.py
AsoboStudio/FlightSim-3dsMax-tools
a94564afdd648d202c2ebcc98f0d7ed6e61528f1
[ "MIT" ]
2
2021-06-30T02:30:53.000Z
2021-07-23T19:48:56.000Z
import os import sys from pymxs import runtime as rt from maxsdk import menu as sdkmenu from maxsdk.globals import * toolFolder = os.path.dirname(__file__) if toolFolder not in sys.path: sys.path.append(toolFolder) import PBRviewport def installMenu(): sdkmenu.createMacroScript(_func=PBRview...
43.138889
111
0.773986
7985fa523e2cb00fdb94b3b6e52570ba09443543
912
py
Python
sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/backup_request.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2021-09-07T18:36:04.000Z
2021-09-07T18:36:04.000Z
sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/backup_request.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
2
2019-10-02T23:37:38.000Z
2020-10-02T01:17:31.000Z
sdk/storage/azure-mgmt-storagesync/azure/mgmt/storagesync/models/backup_request.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2019-06-17T22:18:23.000Z
2019-06-17T22:18:23.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 ...
31.448276
76
0.585526
7985fc7175d4278f67a610df054a114b417165d8
687
py
Python
models/Test.py
shiquanyang/NS-Dial
0c654b58272475495da568879cf3f175624a9b26
[ "MIT" ]
9
2022-03-14T09:27:32.000Z
2022-03-29T05:00:39.000Z
models/Test.py
shiquanyang/NS-Dial
0c654b58272475495da568879cf3f175624a9b26
[ "MIT" ]
null
null
null
models/Test.py
shiquanyang/NS-Dial
0c654b58272475495da568879cf3f175624a9b26
[ "MIT" ]
1
2022-03-14T02:01:31.000Z
2022-03-14T02:01:31.000Z
from models.ReasonEngine import ReasonEngine import torch if __name__ == "__main__": reason_engine = ReasonEngine(4, 8, 8, 100, 10, 50) # batch_size = 2 query = [[[1,1,1,1,1,1,1,1],[2,2,2,2,2,2,2,2],[3,3,3,3,3,3,3,3]], [[4,4,4,4,4,4,4,4],[5,5,5,5,5,5,5,5],[6,6,6,6,6,6,6,6]]] # query: 2 * 3 *...
49.071429
258
0.512373
7985fe1c72f57c3a1c95e8d7ac805284cf161f12
2,910
py
Python
disqus/api.py
belimawr/django-disqus
b1e3688b6002654c1f37c1bfce55365e305ff5d6
[ "BSD-3-Clause" ]
null
null
null
disqus/api.py
belimawr/django-disqus
b1e3688b6002654c1f37c1bfce55365e305ff5d6
[ "BSD-3-Clause" ]
null
null
null
disqus/api.py
belimawr/django-disqus
b1e3688b6002654c1f37c1bfce55365e305ff5d6
[ "BSD-3-Clause" ]
null
null
null
from urllib import urlencode import urllib2 import json # A custom ProxyHandler for the urllib2 module that will not # auto-detect proxy settings proxy_support = urllib2.ProxyHandler({}) opener = urllib2.build_opener(proxy_support) urllib2.install_opener(opener) class DisqusException(Exception): """Exception rai...
33.448276
77
0.611684
7985fe772829d9e7f6e49f2e91e5cf24f965273b
12,102
py
Python
tests/testZincModels.py
mindsnacks/Zinc
a5f39ca4c4a4894f265f1f2b61d6ea53b8db01f8
[ "MIT" ]
7
2015-01-09T07:15:18.000Z
2022-03-24T14:27:45.000Z
tests/testZincModels.py
mindsnacks/Zinc
a5f39ca4c4a4894f265f1f2b61d6ea53b8db01f8
[ "MIT" ]
5
2018-09-04T22:56:38.000Z
2021-09-01T13:11:23.000Z
tests/testZincModels.py
mindsnacks/Zinc
a5f39ca4c4a4894f265f1f2b61d6ea53b8db01f8
[ "MIT" ]
1
2015-09-22T13:48:25.000Z
2015-09-22T13:48:25.000Z
import os.path from zinc.models import * from zinc.helpers import * from tests import * class ZincIndexTestCase(TempDirTestCase): def test_versions_for_nonexistant_bundle(self): index = ZincIndex() self.assertTrue(len(index.versions_for_bundle("meep")) == 0) def test_add_version_for_bundle...
40.885135
92
0.682614
7985fedb3feee116bdebd33de60f16df509aa65d
2,161
py
Python
conans/test/integration/conan_v2/build_helpers/test_cmake.py
Wonders11/conan
28ec09f6cbf1d7e27ec27393fd7bbc74891e74a8
[ "MIT" ]
6,205
2015-12-01T13:40:05.000Z
2022-03-31T07:30:25.000Z
conans/test/integration/conan_v2/build_helpers/test_cmake.py
Wonders11/conan
28ec09f6cbf1d7e27ec27393fd7bbc74891e74a8
[ "MIT" ]
8,747
2015-12-01T16:28:48.000Z
2022-03-31T23:34:53.000Z
conans/test/integration/conan_v2/build_helpers/test_cmake.py
Mattlk13/conan
005fc53485557b0a570bb71670f2ca9c66082165
[ "MIT" ]
961
2015-12-01T16:56:43.000Z
2022-03-31T13:50:52.000Z
import textwrap from conans.test.utils.conan_v2_tests import ConanV2ModeTestCase class CMakeBuildHelperTestCase(ConanV2ModeTestCase): profile = textwrap.dedent(""" [settings] os = Linux arch = x86_64 build_type = Release compiler=gcc compiler.version=4.9 co...
36.016667
92
0.570106
7985ff51d459503a264b6be161d8467254d831e7
5,108
py
Python
synapseclient/core/retry.py
marcomarasca/synapsePythonClient
a3825abebfee8098392d575d19e4f94c37eadbf2
[ "Apache-2.0" ]
null
null
null
synapseclient/core/retry.py
marcomarasca/synapsePythonClient
a3825abebfee8098392d575d19e4f94c37eadbf2
[ "Apache-2.0" ]
1
2021-04-09T20:10:49.000Z
2021-04-09T20:10:49.000Z
synapseclient/core/retry.py
allaway/synapsePythonClient
c306a4ae924e3b017860009f63c19a8a8d8d2f1f
[ "Apache-2.0" ]
null
null
null
import random import sys import logging from synapseclient.core.logging_setup import DEBUG_LOGGER_NAME, DEFAULT_LOGGER_NAME from synapseclient.core.utils import is_json from synapseclient.core.dozer import doze def with_retry(function, verbose=False, retry_status_codes=[429, 500, 502, 503, 504], retry...
42.214876
120
0.607674
798600075e81552c15b6ec4adc0a2f2782c42015
897
py
Python
esphome/components/sntp/time.py
TheEggi/esphomeyaml
98e8cc1edc7b29891e8100eb484922e5c2d4fc33
[ "MIT" ]
null
null
null
esphome/components/sntp/time.py
TheEggi/esphomeyaml
98e8cc1edc7b29891e8100eb484922e5c2d4fc33
[ "MIT" ]
null
null
null
esphome/components/sntp/time.py
TheEggi/esphomeyaml
98e8cc1edc7b29891e8100eb484922e5c2d4fc33
[ "MIT" ]
null
null
null
from esphome.components import time as time_ import esphome.config_validation as cv import esphome.codegen as cg from esphome.const import CONF_ID, CONF_SERVERS DEPENDENCIES = ['network'] sntp_ns = cg.esphome_ns.namespace('sntp') SNTPComponent = sntp_ns.class_('SNTPComponent', time_.RealTimeClock) DEFAULT_SERVERS =...
29.9
72
0.732441
7986010ef6469339ff1a3c1772f6042001817c4e
7,209
py
Python
homeassistant/components/netatmo/binary_sensor.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
1
2019-03-08T02:19:14.000Z
2019-03-08T02:19:14.000Z
homeassistant/components/netatmo/binary_sensor.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
3
2021-09-08T03:29:36.000Z
2022-03-12T00:59:48.000Z
homeassistant/components/netatmo/binary_sensor.py
shanbs/home-assistant
818776d2b4f11e4f51992dc88bc0a6f9055833b2
[ "Apache-2.0" ]
1
2019-12-18T20:06:33.000Z
2019-12-18T20:06:33.000Z
"""Support for the Netatmo binary sensors.""" import logging import voluptuous as vol from homeassistant.components.binary_sensor import ( BinarySensorDevice, PLATFORM_SCHEMA) from homeassistant.components.netatmo import CameraData from homeassistant.const import CONF_TIMEOUT from homeassistant.helpers import con...
37.546875
77
0.614787
798601482af324aec123d93f87bbca8b21d928a2
6,130
py
Python
boldigger/jamp_hit.py
lokalmatador123/BOLDigger
49888c4e01b32cbdfeff9dcaefe2734933100391
[ "MIT" ]
null
null
null
boldigger/jamp_hit.py
lokalmatador123/BOLDigger
49888c4e01b32cbdfeff9dcaefe2734933100391
[ "MIT" ]
null
null
null
boldigger/jamp_hit.py
lokalmatador123/BOLDigger
49888c4e01b32cbdfeff9dcaefe2734933100391
[ "MIT" ]
null
null
null
import openpyxl, datetime import pandas as pd import PySimpleGUI as sg import numpy as np ## function to return the threshold for an OTU dataframe, returns No Match for No Matches ## also returns a level to group by for later use def get_threshold(df): threshold = df['Similarity'][0] if threshold ==...
38.074534
152
0.593312
7986017d017b7047e3f21ad299a2cb6742df2399
13,950
py
Python
Doc/tools/extensions/pyspecific.py
JustAMan/gilectomy
4315ec3f1d6d4f813cc82ce27a24e7f784dbfc1a
[ "PSF-2.0" ]
486
2016-05-28T18:51:54.000Z
2022-03-20T17:30:31.000Z
Doc/tools/extensions/pyspecific.py
JustAMan/gilectomy
4315ec3f1d6d4f813cc82ce27a24e7f784dbfc1a
[ "PSF-2.0" ]
40
2016-05-29T00:24:56.000Z
2020-07-13T11:56:58.000Z
Doc/tools/extensions/pyspecific.py
JustAMan/gilectomy
4315ec3f1d6d4f813cc82ce27a24e7f784dbfc1a
[ "PSF-2.0" ]
46
2016-05-28T18:52:03.000Z
2021-06-01T07:57:51.000Z
# -*- coding: utf-8 -*- """ pyspecific.py ~~~~~~~~~~~~~ Sphinx extension with Python doc-specific markup. :copyright: 2008-2014 by Georg Brandl. :license: Python license. """ import re import codecs from os import path from time import asctime from pprint import pformat from docutils.io import St...
36.046512
86
0.635484
798602530234b9025ef03d31f907b10c3dafb597
102
py
Python
src/dependencies/database/__init__.py
RazCrimson/Nucleo
af0413bba757deb08426d8b07b69f2d43446d6eb
[ "MIT" ]
1
2022-03-15T05:28:56.000Z
2022-03-15T05:28:56.000Z
src/dependencies/database/__init__.py
RazCrimson/Nucleo
af0413bba757deb08426d8b07b69f2d43446d6eb
[ "MIT" ]
null
null
null
src/dependencies/database/__init__.py
RazCrimson/Nucleo
af0413bba757deb08426d8b07b69f2d43446d6eb
[ "MIT" ]
2
2020-12-17T19:14:37.000Z
2020-12-30T15:28:25.000Z
# from . import database_exceptions from .database import Database from .database_exceptions import *
25.5
35
0.823529
798603492bbd1ccd733401660842ff2f48a2b89e
3,802
py
Python
visual_phenomics_py/parameters.py
SeBassTian23/Visual-Phenomics-Python
1ce9f2fff6bf47a7a4a2c9059eb534348b65b2b6
[ "MIT" ]
null
null
null
visual_phenomics_py/parameters.py
SeBassTian23/Visual-Phenomics-Python
1ce9f2fff6bf47a7a4a2c9059eb534348b65b2b6
[ "MIT" ]
null
null
null
visual_phenomics_py/parameters.py
SeBassTian23/Visual-Phenomics-Python
1ce9f2fff6bf47a7a4a2c9059eb534348b65b2b6
[ "MIT" ]
null
null
null
""" Calculate fluoresence parameters """ def fvfm(fm, f0): """Calculate Fv/Fm Fv/Fm = (fm - f0) / fm :param fm: Fm :param f0: F0 :returns: Fv/Fm (float) """ return (fm - f0) / fm def npq(fm, fmp): """Calculate NPQ NPQ = (fm - fmp) / fmp :param fm: Fm :param fmp: Fm' ...
16.823009
53
0.511047
79860349dd7f9a5d8fc727450bdcb2d97a70ff0b
7,666
py
Python
tools/memory/partition_allocator/compute_internal_fragmentation.py
chromium/chromium
df46e572c3449a4b108d6e02fbe4f6d24cf98381
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
14,668
2015-01-01T01:57:10.000Z
2022-03-31T23:33:32.000Z
tools/memory/partition_allocator/compute_internal_fragmentation.py
chromium/chromium
df46e572c3449a4b108d6e02fbe4f6d24cf98381
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
86
2015-10-21T13:02:42.000Z
2022-03-14T07:50:50.000Z
tools/memory/partition_allocator/compute_internal_fragmentation.py
chromium/chromium
df46e572c3449a4b108d6e02fbe4f6d24cf98381
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
5,941
2015-01-02T11:32:21.000Z
2022-03-31T16:35:46.000Z
#!/usr/bin/env python3 # Copyright 2021 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Parses allocation profiles from a trace and computes the internal fragmentation from PartitionAlloc, given a list of buckets. We co...
36.855769
79
0.684581
7986035c185d86b9caacc5abd63bdcec03b518bc
1,416
py
Python
test/test_partial_shipment.py
klreeher/python-sdk
b7fe922dcfc3bb73fe4149475fa45fdcb04d956a
[ "Apache-2.0" ]
null
null
null
test/test_partial_shipment.py
klreeher/python-sdk
b7fe922dcfc3bb73fe4149475fa45fdcb04d956a
[ "Apache-2.0" ]
null
null
null
test/test_partial_shipment.py
klreeher/python-sdk
b7fe922dcfc3bb73fe4149475fa45fdcb04d956a
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ OrderCloud No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 1.0 Contact: ordercloud@four51.com Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Ve...
26.222222
105
0.722458
798603ac0f35d9e0bea39177bd04e5b9a625c4bb
1,969
py
Python
RSBU.py
Marathon-race/JSRGAN
5723802d923d05231e6c185324e4239dfbabb888
[ "MIT" ]
null
null
null
RSBU.py
Marathon-race/JSRGAN
5723802d923d05231e6c185324e4239dfbabb888
[ "MIT" ]
null
null
null
RSBU.py
Marathon-race/JSRGAN
5723802d923d05231e6c185324e4239dfbabb888
[ "MIT" ]
null
null
null
import torch import torch.nn as nn class RSBU_CW(nn.Module): expansion = 1 def __init__(self, in_channels, out_channels, stride=1): super().__init__() self.shrinkage = Shrinkage(out_channels, gap_size=(1, 1)) #residual function self.residual_function = nn.Sequential( ...
33.948276
115
0.588116
79860485811c63903f12fe1b2eb583abd20dc639
4,374
py
Python
crossref/CrossRefSearch.py
ETspielberg/sdg_query_execution
6e95d4d6e158f72e2aa61c64ba3aac5980b14e5b
[ "MIT" ]
null
null
null
crossref/CrossRefSearch.py
ETspielberg/sdg_query_execution
6e95d4d6e158f72e2aa61c64ba3aac5980b14e5b
[ "MIT" ]
2
2021-03-31T18:47:27.000Z
2021-12-13T19:50:45.000Z
crossref/CrossRefSearch.py
Aurora-Network-Global/sdg_query_execution
74375faa41656adef13ab472c2f4f4b2097a955a
[ "MIT" ]
2
2018-09-21T07:42:17.000Z
2021-08-02T15:58:45.000Z
import re import requests from flask import current_app as app from model.Author import Author class CrossRefSearch: """A class representing the results of querying the crossref search API""" @property def doi(self): return self._doi def __init__(self, reference): with app.app_cont...
37.706897
125
0.474623
7986049a98d0d9f246f3eae0a8a50402953510c9
1,761
py
Python
PiControl/urls.py
parkourben99/PiPool
11ac7afd239ce8fe7a0aeb2115aba47324534de2
[ "MIT" ]
null
null
null
PiControl/urls.py
parkourben99/PiPool
11ac7afd239ce8fe7a0aeb2115aba47324534de2
[ "MIT" ]
null
null
null
PiControl/urls.py
parkourben99/PiPool
11ac7afd239ce8fe7a0aeb2115aba47324534de2
[ "MIT" ]
null
null
null
from django.conf.urls import url from django.contrib import admin from django.contrib.auth import views as auth_views from django.conf.urls.static import static from django.conf import settings from PiControl import views from PiControl.forms import LoginForm urlpatterns = [ url(r'^admin/', admin.site.urls), ...
41.928571
120
0.689949
79860575b111323eba5713bd2c744b9572eeb3be
4,198
py
Python
itupass/models/common.py
itucsdb1739/itucsdb1739
eb5526c51105a5b712c6e89065bfe072534b9a2d
[ "BSD-3-Clause" ]
null
null
null
itupass/models/common.py
itucsdb1739/itucsdb1739
eb5526c51105a5b712c6e89065bfe072534b9a2d
[ "BSD-3-Clause" ]
13
2017-09-27T13:57:20.000Z
2017-12-09T06:01:39.000Z
itupass/models/common.py
itucsdb1739/itucsdb1739
eb5526c51105a5b712c6e89065bfe072534b9a2d
[ "BSD-3-Clause" ]
null
null
null
"""Common Models.""" class Database(object): def __init__(self, connection, database="postgresql"): self.connection = connection if database == "postgresql": self.connection.set_session(autocommit=False) @property def cursor(self): # @TODO Consider using connection poo...
36.504348
86
0.472368
798605a1aa2a269b11d2214793a7251478206f73
2,124
py
Python
homeassistant/components/ambient_station/binary_sensor.py
alindeman/home-assistant
b274b10f3874c196f0db8f9cfa5f47eb756d1f8e
[ "Apache-2.0" ]
4
2019-07-03T22:36:57.000Z
2019-08-10T15:33:25.000Z
homeassistant/components/ambient_station/binary_sensor.py
alindeman/home-assistant
b274b10f3874c196f0db8f9cfa5f47eb756d1f8e
[ "Apache-2.0" ]
7
2019-08-23T05:26:02.000Z
2022-03-11T23:57:18.000Z
homeassistant/components/ambient_station/binary_sensor.py
alindeman/home-assistant
b274b10f3874c196f0db8f9cfa5f47eb756d1f8e
[ "Apache-2.0" ]
1
2018-04-29T02:14:32.000Z
2018-04-29T02:14:32.000Z
"""Support for Ambient Weather Station binary sensors.""" import logging from homeassistant.components.binary_sensor import BinarySensorDevice from homeassistant.const import ATTR_NAME from . import ( SENSOR_TYPES, TYPE_BATT1, TYPE_BATT2, TYPE_BATT3, TYPE_BATT4, TYPE_BATT5, TYPE_BATT6, TYPE_BATT7, TYPE_BATT8,...
37.263158
78
0.6742
7986072fb3b7a3f192cda660a6f31a30dad07e56
9,613
py
Python
sdk/python/pulumi_azure_native/mixedreality/v20210101/spatial_anchors_account.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/mixedreality/v20210101/spatial_anchors_account.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure_native/mixedreality/v20210101/spatial_anchors_account.py
pulumi-bot/pulumi-azure-native
f7b9490b5211544318e455e5cceafe47b628e12c
[ "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...
43.497738
1,129
0.65453