hexsha
stringlengths
40
40
size
int64
2
1.05M
ext
stringclasses
9 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
193
max_stars_repo_name
stringlengths
6
109
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
36.6k
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
193
max_issues_repo_name
stringlengths
6
109
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
29.8k
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
193
max_forks_repo_name
stringlengths
6
109
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
11.2k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.05M
avg_line_length
float64
1
404k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
21ba4ce809ee72e403e039d473c35306a6541f9e
4,423
py
Python
run/run_catgan.py
jianqiaoSE/ceGan
096ec435b5d03344bf23e05d3e5e3e97cb4b0be5
[ "MIT" ]
1
2021-12-23T09:17:37.000Z
2021-12-23T09:17:37.000Z
run/run_catgan.py
jianqiaoSE/ceGan
096ec435b5d03344bf23e05d3e5e3e97cb4b0be5
[ "MIT" ]
null
null
null
run/run_catgan.py
jianqiaoSE/ceGan
096ec435b5d03344bf23e05d3e5e3e97cb4b0be5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Author : William # @Project : TextGAN-william # @FileName : run_catgan.py # @Time : Created at 2019-08-04 # @Blog : http://zhiweil.ml/ # @Description : # Copyrights (C) 2018. All Rights Reserved. import sys from subprocess import call import os # Job id and ...
25.274286
107
0.64662
21ba5b5ff544d3eb1af1de791e35a4629d9a70a4
6,267
py
Python
nova/tests/functional/api_sample_tests/test_evacuate.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
null
null
null
nova/tests/functional/api_sample_tests/test_evacuate.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
null
null
null
nova/tests/functional/api_sample_tests/test_evacuate.py
ebalduf/nova-backports
6bf97ec73467de522d34ab7a17ca0e0874baa7f9
[ "Apache-2.0" ]
1
2020-03-01T17:04:57.000Z
2020-03-01T17:04:57.000Z
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
42.632653
78
0.634115
21ba696a6165601e7e4cc696a44f0182ff420e3e
1,584
py
Python
wordlist/blueprints/api/vocabulary.py
robsonpiere/word-list
4bf5be40042daa5d1b7d59a2c1da67af9349ec9e
[ "MIT" ]
null
null
null
wordlist/blueprints/api/vocabulary.py
robsonpiere/word-list
4bf5be40042daa5d1b7d59a2c1da67af9349ec9e
[ "MIT" ]
3
2020-10-25T12:26:57.000Z
2020-10-26T00:04:53.000Z
wordlist/blueprints/api/vocabulary.py
robsonpiere/word-list
4bf5be40042daa5d1b7d59a2c1da67af9349ec9e
[ "MIT" ]
null
null
null
from flask import Blueprint, request, abort from wordlist.words.vocabulary import generate_vocabulary from wordlist.database.mongo import save, connect def register_route(blueprint: Blueprint): blueprint.add_url_rule(rule='/vocabulary', view_func=generate, methods=['POST']) def generate(): form: dict = requ...
27.310345
99
0.647727
21bac98e2f3980a8ec01fa17690958f7e3f811ea
4,014
py
Python
scripts/export_old_db.py
rmed/akamatsu
0dbcd2a67ce865d29fb7d7049e627d322ea8e361
[ "MIT" ]
10
2016-08-03T14:22:23.000Z
2021-03-12T10:49:08.000Z
scripts/export_old_db.py
rmed/akamatsu
0dbcd2a67ce865d29fb7d7049e627d322ea8e361
[ "MIT" ]
27
2017-06-08T20:47:05.000Z
2019-12-20T23:12:18.000Z
scripts/export_old_db.py
rmed/akamatsu
0dbcd2a67ce865d29fb7d7049e627d322ea8e361
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Old database schema export script. Use this script to export Akamatsu 1.x database records to a JSON file which can then be imported by Akamatsu 2.x. Modify database connection accordingly. """ import json import sys import records NEW_ROLES = ('administrator', 'editor', 'blogger') QU...
25.730769
76
0.508719
21bb398e507c9e067e9eb080de08fab5315e8ab4
10,742
py
Python
utils/general.py
tamnguyenvan/crane-lorry-license-plate-recognition
179e4b04929222a6897abc4e65fa8c7fd285998b
[ "MIT" ]
null
null
null
utils/general.py
tamnguyenvan/crane-lorry-license-plate-recognition
179e4b04929222a6897abc4e65fa8c7fd285998b
[ "MIT" ]
null
null
null
utils/general.py
tamnguyenvan/crane-lorry-license-plate-recognition
179e4b04929222a6897abc4e65fa8c7fd285998b
[ "MIT" ]
null
null
null
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ General utils """ import math import time import cv2 import numpy as np def nms(bboxes, scores, thresh): x1 = bboxes[:, 0] y1 = bboxes[:, 1] x2 = bboxes[:, 2] y2 = bboxes[:, 3] areas = (x2 - x1 + 1) * (y2 - y1 + 1) order = scores.argsort()[::-...
38.92029
118
0.55418
21bb3e611d84a2863ed542d82a03af4d3e223283
57,819
py
Python
SCRAPE/Lib/site-packages/psutil/tests/__init__.py
Chinmoy-Prasad-Dutta/scrapy_scraper
09f6abfc3bcf10ee28f486d83b450c89a07e066e
[ "MIT" ]
6
2022-01-04T02:51:33.000Z
2022-01-25T11:36:39.000Z
SCRAPE/Lib/site-packages/psutil/tests/__init__.py
Chinmoy-Prasad-Dutta/scrapy_scraper
09f6abfc3bcf10ee28f486d83b450c89a07e066e
[ "MIT" ]
1
2022-01-27T09:47:12.000Z
2022-02-02T19:36:33.000Z
SCRAPE/Lib/site-packages/psutil/tests/__init__.py
Chinmoy-Prasad-Dutta/scrapy_scraper
09f6abfc3bcf10ee28f486d83b450c89a07e066e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Test utilities. """ from __future__ import print_function import atexit import contextlib import ctypes import errno import ...
32.355344
79
0.573756
21bb75c6d3b7aa7a28e72322b768bdc465ca2285
780
py
Python
src/sino/scom/dman/devicesubscriber.py
hesso-valais/scom
80172c6536ed72b83901af5ea6b42e653a657c4b
[ "MIT" ]
5
2021-01-03T07:58:43.000Z
2021-12-15T23:13:44.000Z
src/sino/scom/dman/devicesubscriber.py
hesso-valais/scom
80172c6536ed72b83901af5ea6b42e653a657c4b
[ "MIT" ]
2
2020-02-12T15:08:08.000Z
2021-12-22T15:10:28.000Z
src/sino/scom/dman/devicesubscriber.py
studer-innotec/scom
80172c6536ed72b83901af5ea6b42e653a657c4b
[ "MIT" ]
1
2021-12-23T22:14:53.000Z
2021-12-23T22:14:53.000Z
# -*- coding: utf-8 -*- # from abc import ABCMeta, abstractmethod from sino.scom.device.scomdevice import ScomDevice class DeviceSubscriber(object): """Subscriber interface to get notified about an SCOM device of interest. """ __metaclass__ = ABCMeta @abstractmethod def on_device_connected(self...
25.16129
103
0.657692
21bb86c8cad2f6cf6419f9ab0a532f29943e5c15
2,334
py
Python
tests/test_parser_kotlin_file.py
mvisat/kopyt
48e59ed4196cb80c5498cca62ecffbcb27e6599b
[ "MIT" ]
2
2021-07-21T10:24:30.000Z
2022-01-11T11:25:25.000Z
tests/test_parser_kotlin_file.py
mvisat/kopyt
48e59ed4196cb80c5498cca62ecffbcb27e6599b
[ "MIT" ]
null
null
null
tests/test_parser_kotlin_file.py
mvisat/kopyt
48e59ed4196cb80c5498cca62ecffbcb27e6599b
[ "MIT" ]
1
2021-07-28T05:47:28.000Z
2021-07-28T05:47:28.000Z
import unittest from kopyt import node from . import TestParserBase class TestParserKotlinFile(TestParserBase): def do_test(self, code: str, test_str: bool = True) -> node.KotlinFile: return super().do_test("parse", code, node.KotlinFile, ...
27.458824
75
0.638389
21bba0ba7a93d8c18f0dbdd62f11f4bc7c75a867
6,737
py
Python
mapproxy/test/system/test_decorate_img.py
kaiCu/mapproxy
9b28f9ca1286e686b8f2188dd52ce56b607427a7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
mapproxy/test/system/test_decorate_img.py
kaiCu/mapproxy
9b28f9ca1286e686b8f2188dd52ce56b607427a7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
mapproxy/test/system/test_decorate_img.py
kaiCu/mapproxy
9b28f9ca1286e686b8f2188dd52ce56b607427a7
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# This file is part of the MapProxy project. # Copyright (C) 2011 Omniscale <http://omniscale.de> # # 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...
35.645503
105
0.592994
21bbfa4936ea4bbb20e75dc0632e7b9b641e7b08
2,116
py
Python
examples/run_dien.py
limingdata/DeepCTR
9569a171f2d1aa400e15175c09fea49cdd7ab5b7
[ "MIT" ]
2
2019-04-10T09:39:33.000Z
2019-04-10T09:39:35.000Z
examples/run_dien.py
xy0210/DeepCTR
9569a171f2d1aa400e15175c09fea49cdd7ab5b7
[ "MIT" ]
null
null
null
examples/run_dien.py
xy0210/DeepCTR
9569a171f2d1aa400e15175c09fea49cdd7ab5b7
[ "MIT" ]
null
null
null
import numpy as np from deepctr.models import DIEN from deepctr.utils import SingleFeat import tensorflow as tf def get_xy_fd(use_neg=False): feature_dim_dict = {"sparse": [SingleFeat('user', 3), SingleFeat( 'gender', 2), SingleFeat('item', 3+1), SingleFeat('item_gender', 2+1)], "dense": [SingleFeat('scor...
45.021277
114
0.596881
21bc00a42cbd3cd5fda0eba653198d4767e9bd8d
28,490
py
Python
gdapi.py
nerdalize/gdapi-python
31d74507d96c8f053a08bda129cc63f96ca60161
[ "MIT" ]
28
2015-09-22T08:22:11.000Z
2020-07-21T02:50:15.000Z
gdapi.py
nerdalize/gdapi-python
31d74507d96c8f053a08bda129cc63f96ca60161
[ "MIT" ]
6
2015-09-22T08:22:00.000Z
2020-08-01T03:46:42.000Z
gdapi.py
nerdalize/gdapi-python
31d74507d96c8f053a08bda129cc63f96ca60161
[ "MIT" ]
20
2015-09-17T15:52:01.000Z
2021-01-23T09:45:55.000Z
#!/usr/bin/env python # PYTHON_ARGCOMPLETE_OK from __future__ import print_function import six import re import requests import collections import hashlib import os import json import time try: import argcomplete except ImportError: pass def _prefix(cmd): prefix = os.path.basename(cmd.replace('-', '_')) ...
32.011236
125
0.543805
21bc0325460fb21898cd7570691cd90febf010bd
1,172
py
Python
alipay/aop/api/response/AlipayCommerceIotDapplyOrderdeviceQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
213
2018-08-27T16:49:32.000Z
2021-12-29T04:34:12.000Z
alipay/aop/api/response/AlipayCommerceIotDapplyOrderdeviceQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
29
2018-09-29T06:43:00.000Z
2021-09-02T03:27:32.000Z
alipay/aop/api/response/AlipayCommerceIotDapplyOrderdeviceQueryResponse.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "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.response.AlipayResponse import AlipayResponse from alipay.aop.api.domain.DeviceApplyOrderDeviceModel import DeviceApplyOrderDeviceModel class AlipayCommerceIotDapplyOrderdeviceQueryResponse(AlipayResponse): def __init__(self): ...
35.515152
120
0.706485
21bc081224ba833538067a21af8452b046231204
7,683
py
Python
homeassistant/components/envisalink.py
mweinelt/home-assistant
cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1
[ "MIT" ]
4
2017-03-22T21:16:45.000Z
2021-06-11T05:08:14.000Z
homeassistant/components/envisalink.py
mweinelt/home-assistant
cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1
[ "MIT" ]
null
null
null
homeassistant/components/envisalink.py
mweinelt/home-assistant
cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1
[ "MIT" ]
4
2016-11-27T01:59:49.000Z
2018-03-11T07:17:25.000Z
""" Support for Envisalink devices. For more details about this component, please refer to the documentation at https://home-assistant.io/components/envisalink/ """ import logging import time import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.const import EVENT_HOMEASSISTA...
35.734884
79
0.656384
21bc0d8b9612ff68a9d3bdd964edaa3560303139
2,915
py
Python
bflib/restrictions/weapons.py
ChrisLR/BasicDungeonRL
b293d40bd9a0d3b7aec41b5e1d58441165997ff1
[ "MIT" ]
3
2017-10-28T11:28:38.000Z
2018-09-12T09:47:00.000Z
bflib/restrictions/weapons.py
ChrisLR/BasicDungeonRL
b293d40bd9a0d3b7aec41b5e1d58441165997ff1
[ "MIT" ]
null
null
null
bflib/restrictions/weapons.py
ChrisLR/BasicDungeonRL
b293d40bd9a0d3b7aec41b5e1d58441165997ff1
[ "MIT" ]
null
null
null
from bflib.keywords.weapons import WeaponWieldKeyword from bflib.items.weapons.base import Weapon from bflib.restrictions.base import Restriction from bflib.sizes import Size class WeaponRestrictionSet(Restriction): __slots__ = ["included", "excluded"] def __init__(self, included=None, excluded=None): ...
29.444444
99
0.596913
21bc12916ed9eeddfd1f7af8ef870c262cf5f439
1,847
py
Python
milestone_reader/milestone_reader/wsgi.py
IQSS/milestone-reader
2fc4c0abe3be3e242ca57a1e703cae7ec242bfd4
[ "MIT" ]
6
2015-01-06T06:55:14.000Z
2021-05-18T18:12:15.000Z
milestone_reader/milestone_reader/wsgi.py
IQSS/milestone-reader
2fc4c0abe3be3e242ca57a1e703cae7ec242bfd4
[ "MIT" ]
3
2015-02-21T19:09:17.000Z
2015-10-21T13:09:47.000Z
milestone_reader/milestone_reader/wsgi.py
IQSS/milestone-reader
2fc4c0abe3be3e242ca57a1e703cae7ec242bfd4
[ "MIT" ]
1
2019-10-26T03:17:49.000Z
2019-10-26T03:17:49.000Z
""" WSGI config for milestone_reader project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLI...
40.152174
87
0.792637
21bc23ce2a0865e447d120880745d1e321e82088
1,244
py
Python
showroompodcast/showroom_stream_spec_factory.py
road-master/showroom-podcast
71221b361cabd40e70aa4e8710292b20398e0ab5
[ "MIT" ]
null
null
null
showroompodcast/showroom_stream_spec_factory.py
road-master/showroom-podcast
71221b361cabd40e70aa4e8710292b20398e0ab5
[ "MIT" ]
1
2021-08-22T07:35:13.000Z
2021-08-22T07:35:13.000Z
showroompodcast/showroom_stream_spec_factory.py
road-master/showroom-podcast
71221b361cabd40e70aa4e8710292b20398e0ab5
[ "MIT" ]
null
null
null
"""Stream spec factory.""" from logging import getLogger from pathlib import Path # noinspection PyPackageRequirements import ffmpeg from asyncffmpeg import StreamSpec from showroompodcast.api.streaming_url import StreamingUrl from showroompodcast.showroom_datetime import ShowroomDatetime ENVIRONMENT_VALIABLE_KEY_AR...
35.542857
87
0.716238
21bc3f7f4d7915b4bd05eeac462b999426a1cc16
49,142
py
Python
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_02_01/aio/operations/_blob_containers_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-09T08:59:13.000Z
2022-03-09T08:59:13.000Z
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_02_01/aio/operations/_blob_containers_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2021_02_01/aio/operations/_blob_containers_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-03-04T06:21:56.000Z
2022-03-04T06:21:56.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
49.043912
455
0.690102
21bc563031d7471118fe4fac82816f7b9ccc51cc
17,677
py
Python
detectia/augment/augmentations.py
kartik4949/detectia
e62165372b2abac63239d540dfa8c3ee0eafd75c
[ "Apache-2.0" ]
3
2021-02-02T10:59:26.000Z
2021-11-20T07:56:29.000Z
detectia/augment/augmentations.py
kartik4949/detectia
e62165372b2abac63239d540dfa8c3ee0eafd75c
[ "Apache-2.0" ]
null
null
null
detectia/augment/augmentations.py
kartik4949/detectia
e62165372b2abac63239d540dfa8c3ee0eafd75c
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Kartik Sharma. 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 o...
32.856877
87
0.549075
21bc77c773a9014714920ac0424cee389c04750f
605
py
Python
cle/backends/elf/relocation/ppc.py
mattrepl/cle
08f5f24d61470da8a99ee0c40f2185397a958313
[ "BSD-2-Clause" ]
2
2019-06-01T23:41:15.000Z
2020-01-21T22:08:50.000Z
cle/backends/elf/relocation/ppc.py
fiberx/cle-fiber
08f5f24d61470da8a99ee0c40f2185397a958313
[ "BSD-2-Clause" ]
null
null
null
cle/backends/elf/relocation/ppc.py
fiberx/cle-fiber
08f5f24d61470da8a99ee0c40f2185397a958313
[ "BSD-2-Clause" ]
null
null
null
import logging from . import generic l = logging.getLogger('cle.backends.elf.relocations.ppc') arch = 'PPC32' class R_PPC_ADDR32(generic.GenericAbsoluteAddendReloc): pass class R_PPC_COPY(generic.GenericCopyReloc): pass class R_PPC_GLOB_DAT(generic.GenericJumpslotReloc): pass class R_PPC_JMP_SLOT(gener...
20.166667
57
0.796694
21bc79972badbd50a047106aab16b7db72c25ff9
1,913
py
Python
tests/clients/test_gcp.py
dblueai/dblue-stores
146866d8477e891dd09145d816a928d5e3ffa65c
[ "MIT" ]
1
2020-01-18T00:30:17.000Z
2020-01-18T00:30:17.000Z
tests/clients/test_gcp.py
dblueai/dblue-stores
146866d8477e891dd09145d816a928d5e3ffa65c
[ "MIT" ]
5
2020-02-27T10:30:55.000Z
2021-06-02T00:49:29.000Z
tests/clients/test_gcp.py
dblueai/dblue-stores
146866d8477e891dd09145d816a928d5e3ffa65c
[ "MIT" ]
1
2020-01-18T00:30:21.000Z
2020-01-18T00:30:21.000Z
from unittest import TestCase import mock from dblue_stores.clients.gcp import GCPClient from dblue_stores.exceptions import DblueStoresException GCS_MODULE = 'dblue_stores.clients.gcp.{}' class TestGCClient(TestCase): @mock.patch(GCS_MODULE.format('google.auth.default')) def test_get_default_gc_credential...
38.26
94
0.734971
21bc8b3f2e6a6252158badf1040340e91b6406a8
3,794
py
Python
model/models/yolo/experimental.py
elviva404/food-detection-yolov5
796a0c1df6e9c9a705dff7782b3f9b213344f11b
[ "MIT" ]
24
2021-08-09T00:47:22.000Z
2022-03-06T09:38:48.000Z
model/models/yolo/experimental.py
elviva404/food-detection-yolov5
796a0c1df6e9c9a705dff7782b3f9b213344f11b
[ "MIT" ]
3
2021-07-19T16:01:37.000Z
2022-03-03T07:09:03.000Z
model/models/yolo/experimental.py
elviva404/food-detection-yolov5
796a0c1df6e9c9a705dff7782b3f9b213344f11b
[ "MIT" ]
8
2021-11-08T12:39:05.000Z
2022-01-30T14:59:37.000Z
# This file contains experimental modules import numpy as np import torch import torch.nn as nn from .common import Conv, DWConv class CrossConv(nn.Module): # Cross Convolution Downsample def __init__(self, c1, c2, k=3, s=1, g=1, e=1.0, shortcut=False): # ch_in, ch_out, kernel, stride, groups, expans...
36.834951
97
0.52952
21bcced772b39e18b3770a90e8c1c8bda7cf13e9
1,908
py
Python
app/spawning.py
FZJ-JSC/jupyter-jsc-orchestrator-image
d9203a202d79d001faf8df50e84fba90df7fcca3
[ "BSD-3-Clause" ]
null
null
null
app/spawning.py
FZJ-JSC/jupyter-jsc-orchestrator-image
d9203a202d79d001faf8df50e84fba90df7fcca3
[ "BSD-3-Clause" ]
null
null
null
app/spawning.py
FZJ-JSC/jupyter-jsc-orchestrator-image
d9203a202d79d001faf8df50e84fba90df7fcca3
[ "BSD-3-Clause" ]
null
null
null
''' Created on May 13, 2019 @author: Tim Kreuzer ''' import json from flask import request from flask_restful import Resource from flask import current_app as app from app import utils_common from app import utils_db # With this class we can change the value of the column "spawning" in the database, for a specifi...
42.4
142
0.599581
21bcdf93241c1b03a8e8646778e16e65745bb381
4,886
py
Python
experiments/sasha/pybullet_testing/vae_awr.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/sasha/pybullet_testing/vae_awr.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/sasha/pybullet_testing/vae_awr.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
""" AWR + SAC from demo experiment """ from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader, EncoderDictToMDPPathLoader from rlkit.demos.source.mdp_path_loader import MDPPathLoader from rlkit.launchers.experiments.ashvin.awr_sac_rl import experiment, process_args import rlkit.misc.hyperparameter...
31.320513
102
0.600287
21bce2f83e2b72f6478fd8c52ff2a078919e4cea
7,541
py
Python
Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
6
2021-07-05T16:09:39.000Z
2022-03-06T22:44:42.000Z
Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
7
2022-03-15T13:25:39.000Z
2022-03-15T13:25:44.000Z
Tools/Scripts/webkitpy/tool/bot/flakytestreporter_unittest.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
44.886905
167
0.742474
21bd4d44780717158f300a49a28b3936338873ad
615
py
Python
source/tests/test_deepest_node.py
adrinamin/algorithm_exercises
8a3c61afe4672aabaeb7a311ea9948165d9d6b10
[ "MIT" ]
null
null
null
source/tests/test_deepest_node.py
adrinamin/algorithm_exercises
8a3c61afe4672aabaeb7a311ea9948165d9d6b10
[ "MIT" ]
null
null
null
source/tests/test_deepest_node.py
adrinamin/algorithm_exercises
8a3c61afe4672aabaeb7a311ea9948165d9d6b10
[ "MIT" ]
null
null
null
import unittest from deepest_node.binaryTree import binaryTree from deepest_node import deepest_node_finder as finder class DeepestNodeTests(unittest.TestCase): def test_deepestNode(self): expectedNodeData = "d" binaryTree = createBinaryTree() resultNode = finder.findDeepestNode(binaryTree)...
27.954545
55
0.704065
21bd7536423625cc9554d8dfb5b6573e82ce8c93
3,823
py
Python
test/test_pml/test_supervised/test_trees.py
ashadhaz/pml
8d9261c8885a82d795c89de23f53ff7d05ef9495
[ "MIT" ]
2
2018-03-21T16:26:16.000Z
2020-10-27T02:45:11.000Z
test/test_pml/test_supervised/test_trees.py
ashadhaz/pml
8d9261c8885a82d795c89de23f53ff7d05ef9495
[ "MIT" ]
null
null
null
test/test_pml/test_supervised/test_trees.py
ashadhaz/pml
8d9261c8885a82d795c89de23f53ff7d05ef9495
[ "MIT" ]
4
2015-02-25T16:19:05.000Z
2021-02-06T06:36:46.000Z
# Copyright (C) 2012 David Rusk # # 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, merge, publish, distr...
34.754545
79
0.663877
21bd989b9547aa426c15cca83338fd7847596012
1,918
py
Python
2019/12_the_n_body_problem_part_1.py
garciparedes/advent-of-code
77fcd55546b114f9017146b3079d4a333dd87091
[ "Apache-2.0" ]
7
2021-06-07T08:27:52.000Z
2022-01-08T03:14:57.000Z
2019/12_the_n_body_problem_part_1.py
garciparedes/advent-of-code
77fcd55546b114f9017146b3079d4a333dd87091
[ "Apache-2.0" ]
null
null
null
2019/12_the_n_body_problem_part_1.py
garciparedes/advent-of-code
77fcd55546b114f9017146b3079d4a333dd87091
[ "Apache-2.0" ]
1
2020-12-01T18:34:59.000Z
2020-12-01T18:34:59.000Z
from __future__ import annotations import re from copy import deepcopy from pathlib import Path from sys import argv from typing import Tuple, Set import itertools as it class Moon(object): def __init__(self, position: Tuple[int, ...]): self.position = list(position) self.velocity = list(0 for _ ...
27.014085
86
0.606882
21bdaebcb6891159ae8d5e90e241faa6b1cf1b06
699
py
Python
setup.py
pzarabadip/thermof
44c33e37aeadce31241a878135b1531757a2b1c4
[ "MIT" ]
null
null
null
setup.py
pzarabadip/thermof
44c33e37aeadce31241a878135b1531757a2b1c4
[ "MIT" ]
11
2017-08-15T22:11:32.000Z
2017-08-22T23:32:17.000Z
setup.py
pzarabadip/thermof
44c33e37aeadce31241a878135b1531757a2b1c4
[ "MIT" ]
1
2017-01-31T19:44:02.000Z
2017-01-31T19:44:02.000Z
from setuptools import setup, find_packages setup( name="thermof", version="0.1.2", description="Investigating thermal conductivity of MOFs using Lammps", author="Kutay B. Sezginel", author_email="kbs37@pitt.edu", url='https://github.com/kbsezginel/thermof', include_package_data=True, ...
27.96
74
0.577969
21bdb2cd1544dabeb108c34623bb3e52939d9542
1,828
py
Python
AlgorithmicTradingAndQuantitativeAnalysis/Examples/22_Visualization.py
enriqueescobar-askida/Kinito.Finance
5308748b64829ac798a858161f9b4a9e5829db44
[ "MIT" ]
2
2020-03-04T11:18:38.000Z
2020-05-10T15:36:42.000Z
AlgorithmicTradingAndQuantitativeAnalysis/Examples/22_Visualization.py
enriqueescobar-askida/Kinito.Finance
5308748b64829ac798a858161f9b4a9e5829db44
[ "MIT" ]
6
2020-03-30T16:42:47.000Z
2021-12-13T20:37:21.000Z
AlgorithmicTradingAndQuantitativeAnalysis/Examples/22_Visualization.py
enriqueescobar-askida/Kinito.Finance
5308748b64829ac798a858161f9b4a9e5829db44
[ "MIT" ]
1
2020-04-14T11:26:16.000Z
2020-04-14T11:26:16.000Z
# sphinx_gallery_thumbnail_number = 10 import numpy as np import matplotlib.pyplot as plt from matplotlib.ticker import FuncFormatter def currency(x, pos): """The two args are the value and tick position""" if x >= 1e6: s = '${:1.1f}M'.format(x*1e-6) else: s = '${:1.0f}K'.format(x*1e-3) ...
31.517241
106
0.684354
21bdc82a53eabab81a343f0c3d94aed328717f4f
17,424
py
Python
salt/cloud/clouds/opennebula.py
skrobul/salt
ef7fb71082cce7a9783e00b9c65062fefae09263
[ "Apache-2.0" ]
1
2018-02-03T17:30:56.000Z
2018-02-03T17:30:56.000Z
salt/cloud/clouds/opennebula.py
skrobul/salt
ef7fb71082cce7a9783e00b9c65062fefae09263
[ "Apache-2.0" ]
null
null
null
salt/cloud/clouds/opennebula.py
skrobul/salt
ef7fb71082cce7a9783e00b9c65062fefae09263
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' OpenNebula Cloud Module ========================== The OpenNebula cloud module is used to control access to an OpenNebula cloud. Use of this module requires the ``xml_rpc``, ``user`` and ``password`` parameter to be set. Set up the cloud configuration at ``/etc/salt/cloud.providers`` or ``...
29.989673
123
0.583907
21bdd1612be305b12205a525ab34d8acc1425185
1,834
py
Python
torchtoolbox/nn/switch_norm.py
sailfish009/torch-toolbox
80dfc22c697b9f323e097de72af04f0e5435d7b4
[ "BSD-3-Clause" ]
null
null
null
torchtoolbox/nn/switch_norm.py
sailfish009/torch-toolbox
80dfc22c697b9f323e097de72af04f0e5435d7b4
[ "BSD-3-Clause" ]
null
null
null
torchtoolbox/nn/switch_norm.py
sailfish009/torch-toolbox
80dfc22c697b9f323e097de72af04f0e5435d7b4
[ "BSD-3-Clause" ]
1
2020-04-20T19:39:23.000Z
2020-04-20T19:39:23.000Z
# -*- coding: utf-8 -*- # @Author : DevinYang(pistonyang@gmail.com) __all__ = ['SwitchNorm2d', 'SwitchNorm3d'] import torch from torch import nn from . import functional as F class _SwitchNorm(nn.Module): """ Avoid to feed 1xCxHxW and NxCx1x1 data to this. """ _version = 2 def __init__(self, num...
32.75
81
0.609597
21bdd1933d02bd4802ba70550a09e68b63a7d0aa
15,844
py
Python
tests/python/pants_test/backend/jvm/tasks/test_jar_publish_integration.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/backend/jvm/tasks/test_jar_publish_integration.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
tests/python/pants_test/backend/jvm/tasks/test_jar_publish_integration.py
ghthor/pants
450de702414f87f563081ddefaefd8a554de07a3
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os import re from pants.base.build_environment import get_buildroot from pants.ut...
49.358255
100
0.61872
21bdf99390c3df665d25199aea9fff225ef4b831
1,004
py
Python
tests/pyrem_tests.py
sgdxbc/PyREM
e162efd5f95d1d335fb96d77cbe047def02c340e
[ "MIT" ]
5
2016-01-20T22:34:41.000Z
2020-12-19T15:24:33.000Z
tests/pyrem_tests.py
sgdxbc/PyREM
e162efd5f95d1d335fb96d77cbe047def02c340e
[ "MIT" ]
12
2015-11-11T23:03:03.000Z
2021-09-28T17:09:53.000Z
tests/pyrem_tests.py
sgdxbc/PyREM
e162efd5f95d1d335fb96d77cbe047def02c340e
[ "MIT" ]
4
2015-12-10T05:14:30.000Z
2021-08-14T02:48:05.000Z
from pyrem.task import Task, TaskStatus class DummyTask(Task): def _start(self): pass def _wait(self): pass def _stop(self): pass class TestDummyTask(object): @classmethod def setup_class(klass): """This method is run once for each class before any tests are run"...
23.904762
78
0.625498
21bdf9c57795c75f7c708c775927a69ff086a360
4,179
py
Python
experiments/vitchyr/goal_distribution/representation_learning/exps_20_08_18/exp1_beta_schedule.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
1
2020-10-23T14:40:09.000Z
2020-10-23T14:40:09.000Z
experiments/vitchyr/goal_distribution/representation_learning/exps_20_08_18/exp1_beta_schedule.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
null
null
null
experiments/vitchyr/goal_distribution/representation_learning/exps_20_08_18/exp1_beta_schedule.py
Asap7772/railrl_evalsawyer
baba8ce634d32a48c7dfe4dc03b123e18e96e0a3
[ "MIT" ]
1
2021-05-27T20:38:45.000Z
2021-05-27T20:38:45.000Z
import rlkit.misc.hyperparameter as hyp from multiworld.envs.pygame import PickAndPlaceEnv from rlkit.launchers.launcher_util import run_experiment from rlkit.torch.sets.vae_launcher import train_set_vae if __name__ == "__main__": variant = dict( env_id='OneObject-PickAndPlace-BigBall-RandomInit-2D-v1', ...
32.905512
148
0.501795
21be4ff7e548c2d7d958defdb4d00d38c48623f6
1,930
py
Python
tests/platonpm/test_dependencies.py
shinnng/platon.py
3197fac3839896290210da04dd0d45f0bdc731ce
[ "MIT" ]
null
null
null
tests/platonpm/test_dependencies.py
shinnng/platon.py
3197fac3839896290210da04dd0d45f0bdc731ce
[ "MIT" ]
null
null
null
tests/platonpm/test_dependencies.py
shinnng/platon.py
3197fac3839896290210da04dd0d45f0bdc731ce
[ "MIT" ]
null
null
null
import pytest from platonpm import ( Package, ) from platonpm.dependencies import ( Dependencies, ) from platonpm.exceptions import ( PlatonPMValidationError, ) from platonpm.validation.package import ( validate_build_dependency, ) @pytest.fixture def dependencies(dummy_ipfs_backend, piper_coin_manif...
27.571429
87
0.749223
21be5a8334fd6581f60c7143a4f654e1836199d0
4,553
py
Python
src/spn/algorithms/SPMN.py
SwarajPawar/SPFlow
ac128935a901359679a098b51ac70ba0f9d7d687
[ "Apache-2.0" ]
2
2021-09-29T19:51:25.000Z
2021-09-29T19:51:27.000Z
src/spn/algorithms/SPMN.py
minimum-LaytonC/SPFlow
6890436c9b9ebd2cac02e9fe8e902f3b82b6abbc
[ "Apache-2.0" ]
null
null
null
src/spn/algorithms/SPMN.py
minimum-LaytonC/SPFlow
6890436c9b9ebd2cac02e9fe8e902f3b82b6abbc
[ "Apache-2.0" ]
1
2022-03-01T20:14:19.000Z
2022-03-01T20:14:19.000Z
""" Created on March 28, 2019 @author: Hari Teja Tatavarti """ from spn.structure.Base import Sum, Product, Max from spn.structure.Base import assign_ids, rebuild_scopes_bottom_up from spn.algorithms.splitting.RDC import get_split_cols_RDC_py from spn.algorithms.splitting.Clustering import get_split_rows_KMeans from ...
27.10119
136
0.657149
21be6b7ec8bd622c324b5a95c732cb8e82d7e56d
14,756
py
Python
tests/python/unittest/test_schedule_bound_inference.py
mingwayzhang/tvm
3b287c4d4e6d83e6fd30db47ffa3d5481a332a63
[ "Apache-2.0" ]
2
2019-07-29T06:26:59.000Z
2019-07-29T06:27:02.000Z
tests/python/unittest/test_schedule_bound_inference.py
mingwayzhang/tvm
3b287c4d4e6d83e6fd30db47ffa3d5481a332a63
[ "Apache-2.0" ]
null
null
null
tests/python/unittest/test_schedule_bound_inference.py
mingwayzhang/tvm
3b287c4d4e6d83e6fd30db47ffa3d5481a332a63
[ "Apache-2.0" ]
1
2019-12-03T13:53:44.000Z
2019-12-03T13:53:44.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
37.262626
124
0.602331
21be7c0ddd43d77ccbbcabcdd3d138823162f004
26,789
py
Python
geocapt/adjust.py
LEOXINGU/lftools
f6ceac276c2872c7bf098f6363b44a07a6e523d8
[ "MIT" ]
19
2021-03-14T11:37:00.000Z
2022-03-31T13:29:57.000Z
geocapt/adjust.py
LEOXINGU/lftools
f6ceac276c2872c7bf098f6363b44a07a6e523d8
[ "MIT" ]
4
2021-04-06T03:57:43.000Z
2022-03-28T22:57:07.000Z
geocapt/adjust.py
LEOXINGU/lftools
f6ceac276c2872c7bf098f6363b44a07a6e523d8
[ "MIT" ]
3
2022-02-12T16:14:17.000Z
2022-03-28T22:18:04.000Z
# -*- coding: utf-8 -*- """ *************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as pub...
36.447619
174
0.542536
21bec281be1bf8feaa79aa0662aad42159c8a678
4,855
py
Python
matflow_formable/main.py
ElliotCN/matflow-formable
92091c98c5bf39005e88794aa47ee6d248d7e67e
[ "MIT" ]
4
2020-07-28T10:53:15.000Z
2020-07-28T11:21:54.000Z
matflow_formable/main.py
ElliotCN/matflow-formable
92091c98c5bf39005e88794aa47ee6d248d7e67e
[ "MIT" ]
3
2020-07-17T11:05:51.000Z
2021-04-11T12:02:54.000Z
matflow_formable/main.py
ElliotCN/matflow-formable
92091c98c5bf39005e88794aa47ee6d248d7e67e
[ "MIT" ]
3
2020-07-28T11:12:11.000Z
2022-02-15T14:41:23.000Z
'`matflow_formable.main.py`' import hickle from matflow.scripting import get_wrapper_script from matflow_formable import input_mapper, output_mapper, sources_mapper @input_mapper(input_file='inputs.hdf5', task='fit_yield_function', method='least_squares') def write_fit_yield_function_param_file(path, yield_function...
31.525974
90
0.680536
21bef033c9566144f43f3034ff1729782bd8f6d1
12,978
py
Python
usecases/extasy_gromacs_lsdmap_adaptive/01_static_gromacs_lsdmap_loop.py
chemlove/radical.ensemblemd
0ec4b127760d2fee88d4eae1768fecec4bdd6b21
[ "MIT" ]
null
null
null
usecases/extasy_gromacs_lsdmap_adaptive/01_static_gromacs_lsdmap_loop.py
chemlove/radical.ensemblemd
0ec4b127760d2fee88d4eae1768fecec4bdd6b21
[ "MIT" ]
null
null
null
usecases/extasy_gromacs_lsdmap_adaptive/01_static_gromacs_lsdmap_loop.py
chemlove/radical.ensemblemd
0ec4b127760d2fee88d4eae1768fecec4bdd6b21
[ "MIT" ]
null
null
null
#!/usr/bin/env python __author__ = "Vivek <vivek.balasubramanian@rutgers.edu>" __copyright__ = "Copyright 2014, http://radical.rutgers.edu" __license__ = "MIT" __use_case_name__ = "'Gromacs + LSDMap' simulation-analysis proof-of-concept (ExTASY)." from radical.ensemblemd import Kernel from radic...
47.538462
220
0.57297
21bef3784925e340d8eef250f13a94f4606b91f8
2,236
py
Python
aries_cloudagent/messaging/issue_credential/v1_0/messages/credential_issue.py
bcdevlucas/aries-cloudagent-python
651a7bbae6f01171373fab642324df1451b0be81
[ "Apache-2.0" ]
null
null
null
aries_cloudagent/messaging/issue_credential/v1_0/messages/credential_issue.py
bcdevlucas/aries-cloudagent-python
651a7bbae6f01171373fab642324df1451b0be81
[ "Apache-2.0" ]
null
null
null
aries_cloudagent/messaging/issue_credential/v1_0/messages/credential_issue.py
bcdevlucas/aries-cloudagent-python
651a7bbae6f01171373fab642324df1451b0be81
[ "Apache-2.0" ]
null
null
null
"""A credential content message.""" from typing import Sequence from marshmallow import fields from ....agent_message import AgentMessage, AgentMessageSchema from ....decorators.attach_decorator import AttachDecorator, AttachDecoratorSchema from ..message_types import ATTACH_DECO_IDS, CREDENTIAL_ISSUE HANDLER_CLA...
27.95
88
0.673077
21bf02c969df126b7c72b9f03a3dd51dcac7f994
130
py
Python
configs/.ycm_extra_conf.py
chameleon-lizard/autorice
9ac5d8acc6a6748bf0985d73cc1911d53ba416e2
[ "MIT" ]
7
2020-03-01T07:34:46.000Z
2021-08-22T15:36:46.000Z
configs/.ycm_extra_conf.py
chameleon-lizard/autorice
9ac5d8acc6a6748bf0985d73cc1911d53ba416e2
[ "MIT" ]
null
null
null
configs/.ycm_extra_conf.py
chameleon-lizard/autorice
9ac5d8acc6a6748bf0985d73cc1911d53ba416e2
[ "MIT" ]
null
null
null
def Settings( **kwargs ): return { 'flags': [ '-x', 'c++', '-Wextra', '-Wall', '-Werror', '-O2', '-Wno-pointer-sign' ], }
26
88
0.476923
21bf0cdd266adb45a96ccac62b42f56b4803c33b
149
py
Python
backend/apps/logins/apps.py
lybbn/django-vue3-lyadmin
df8ed48971eb3e3da977e1fd0467b1230b56afe4
[ "MIT" ]
1
2022-03-01T07:20:36.000Z
2022-03-01T07:20:36.000Z
backend/apps/logins/apps.py
lybbn/django-vue3-lyadmin
df8ed48971eb3e3da977e1fd0467b1230b56afe4
[ "MIT" ]
null
null
null
backend/apps/logins/apps.py
lybbn/django-vue3-lyadmin
df8ed48971eb3e3da977e1fd0467b1230b56afe4
[ "MIT" ]
null
null
null
from django.apps import AppConfig class LoginsConfig(AppConfig): default_auto_field = 'django.db.models.BigAutoField' name = 'apps.logins'
21.285714
56
0.758389
21bf10f68a4d20e71762829a3380f036f082ed49
12,755
py
Python
egs/csj/ASR/tdnn_lstm_ctc/asr_datamodule.py
ntachimori/icefall
867b6fefff286eae9a36abe64443dcb617fddd5a
[ "Apache-2.0" ]
null
null
null
egs/csj/ASR/tdnn_lstm_ctc/asr_datamodule.py
ntachimori/icefall
867b6fefff286eae9a36abe64443dcb617fddd5a
[ "Apache-2.0" ]
null
null
null
egs/csj/ASR/tdnn_lstm_ctc/asr_datamodule.py
ntachimori/icefall
867b6fefff286eae9a36abe64443dcb617fddd5a
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Piotr Żelasko # # See ../../../../LICENSE for clarification regarding multiple 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/lic...
34.19571
91
0.574049
21bf14174bde9f05d0775cf370951f4177670c52
24,264
py
Python
mitmproxy/proxy/protocol/tls.py
takeratta/mitmproxy
569d275d763f499cce9673fcf118dcc8d59d2eeb
[ "MIT" ]
null
null
null
mitmproxy/proxy/protocol/tls.py
takeratta/mitmproxy
569d275d763f499cce9673fcf118dcc8d59d2eeb
[ "MIT" ]
null
null
null
mitmproxy/proxy/protocol/tls.py
takeratta/mitmproxy
569d275d763f499cce9673fcf118dcc8d59d2eeb
[ "MIT" ]
null
null
null
import struct from typing import Optional # noqa from typing import Union import io from kaitaistruct import KaitaiStream from mitmproxy import exceptions from mitmproxy.contrib.kaitaistruct import tls_client_hello from mitmproxy.proxy.protocol import base from mitmproxy.net import check # taken from https://testss...
39.582382
121
0.625412
21bf82f44d1545bbefa4d74ac6b21427ee0ac5e6
3,297
py
Python
lhotse/kaldi.py
popcornell/lhotse
f70255699d05af794d61fdef12413e9f98e6c3a9
[ "Apache-2.0" ]
null
null
null
lhotse/kaldi.py
popcornell/lhotse
f70255699d05af794d61fdef12413e9f98e6c3a9
[ "Apache-2.0" ]
null
null
null
lhotse/kaldi.py
popcornell/lhotse
f70255699d05af794d61fdef12413e9f98e6c3a9
[ "Apache-2.0" ]
1
2021-04-16T21:13:37.000Z
2021-04-16T21:13:37.000Z
from collections import defaultdict from pathlib import Path from typing import Tuple, Optional, Dict from lhotse.audio import RecordingSet, Recording, AudioSource from lhotse.supervision import SupervisionSet, SupervisionSegment from lhotse.utils import Pathlike def load_kaldi_data_dir(path: Pathlike, sampling_rate...
37.044944
115
0.653928
21bfc0c471be12263c192461bbc014d31b5e8da0
11,175
py
Python
data/level/level178.py
levelupai/match3-level-similarity
cc9b28b8741b41bea1273c8bc9b4d265d79a1dca
[ "Apache-2.0" ]
null
null
null
data/level/level178.py
levelupai/match3-level-similarity
cc9b28b8741b41bea1273c8bc9b4d265d79a1dca
[ "Apache-2.0" ]
6
2020-07-04T02:53:08.000Z
2022-03-11T23:53:14.000Z
data/level/level178.py
levelupai/match3-level-similarity
cc9b28b8741b41bea1273c8bc9b4d265d79a1dca
[ "Apache-2.0" ]
3
2019-12-31T11:42:59.000Z
2021-03-28T20:06:13.000Z
data = { 'level_index': 178, 'move_count': 21, 'board_info': { (0, 2): { 'prev': (0, -1), 'next': (0, 1), 'base': (4, 1), 'fall_point': (0, -1) }, (0, 3): { 'prev': (0, -1), 'next': (0, 1), 'base': (5...
22.806122
33
0.198747
21bfc1a56e8d3f1239cafaf0e67917e107f4ddcb
774
py
Python
abc/abc199/c/main.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
2
2022-01-22T07:56:58.000Z
2022-01-24T00:29:37.000Z
abc/abc199/c/main.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
abc/abc199/c/main.py
tonko2/AtCoder
5d617072517881d226d7c8af09cb88684d41af7e
[ "Xnet", "X11", "CECILL-B" ]
null
null
null
import sys import math from collections import defaultdict, deque sys.setrecursionlimit(10 ** 6) stdin = sys.stdin INF = float('inf') ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) ns = lambda: stdin.readline().strip() N = ni() S = list(ns()) Q = ni() flag = 0 for _ in range(Q): t,...
21.5
55
0.431525
21bfc202f694cec5907742bc70ac47175ebc4b0f
3,781
py
Python
setup.py
cotman/zoneminder-slack-bot
2819f5f7152cb92c91253dfd0fb3ee9d8b8647b2
[ "Apache-2.0" ]
null
null
null
setup.py
cotman/zoneminder-slack-bot
2819f5f7152cb92c91253dfd0fb3ee9d8b8647b2
[ "Apache-2.0" ]
null
null
null
setup.py
cotman/zoneminder-slack-bot
2819f5f7152cb92c91253dfd0fb3ee9d8b8647b2
[ "Apache-2.0" ]
null
null
null
# # Copyright 2016 Robert Clark (clark@exiter.com) # # 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 applicab...
36.009524
101
0.678127
21bffd9af681dfc79ed10c34f49e1512628897ca
2,693
py
Python
leetcode/2-medium/4-backtrack/5-wordsearch/word_search.py
ai7/study
be490336dc70ade62a8ff8d7866af7ac52bef4c1
[ "MIT" ]
null
null
null
leetcode/2-medium/4-backtrack/5-wordsearch/word_search.py
ai7/study
be490336dc70ade62a8ff8d7866af7ac52bef4c1
[ "MIT" ]
null
null
null
leetcode/2-medium/4-backtrack/5-wordsearch/word_search.py
ai7/study
be490336dc70ade62a8ff8d7866af7ac52bef4c1
[ "MIT" ]
null
null
null
# https://leetcode.com/explore/interview/card/top-interview-questions-medium/109/backtracking/797/ # https://leetcode.com/problems/word-search/description/ # Word Search # # Given a 2D board and a word, find if the word exists in the grid. # The word can be constructed from letters of sequentially adjacent # cell, whe...
29.593407
98
0.53472
21bfff29fb995a34d1fbf3ca39aa1a27900a2395
1,965
py
Python
src/test/tests/databases/Velodyne.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
226
2018-12-29T01:13:49.000Z
2022-03-30T19:16:31.000Z
src/test/tests/databases/Velodyne.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
5,100
2019-01-14T18:19:25.000Z
2022-03-31T23:08:36.000Z
src/test/tests/databases/Velodyne.py
visit-dav/vis
c08bc6e538ecd7d30ddc6399ec3022b9e062127e
[ "BSD-3-Clause" ]
84
2019-01-24T17:41:50.000Z
2022-03-10T10:01:46.000Z
# ---------------------------------------------------------------------------- # CLASSES: nightly # # Test Case: Velodyne.py # # Tests: mesh - 3D unstructured # # Programmer: Brad Whitlock # Date: Wed Feb 10 14:51:33 PDT 2010 # # Modifications: # # ------------------------------------------------...
24.873418
78
0.598982
21c038792068427a0d47666168a1381295c5bb76
20,267
py
Python
statey/cli/controller.py
cfeenstra67/statey
6d127ed48265e2e072fbb26486458a4b28a333ec
[ "MIT" ]
4
2021-02-16T19:34:38.000Z
2022-01-31T16:44:14.000Z
statey/cli/controller.py
cfeenstra67/statey
6d127ed48265e2e072fbb26486458a4b28a333ec
[ "MIT" ]
null
null
null
statey/cli/controller.py
cfeenstra67/statey
6d127ed48265e2e072fbb26486458a4b28a333ec
[ "MIT" ]
null
null
null
import asyncio import contextlib import dataclasses as dc import importlib import json import logging import os import sys import types from importlib.machinery import SourceFileLoader from typing import Tuple, Optional, Sequence import statey as st from statey.executor import AsyncIOGraphExecutor from statey.cli.insp...
33.499174
88
0.533823
21c03c894541b2acdc433649addde07d11c39ed4
2,195
py
Python
native/tensorflow/tensorflow/lite/testing/op_tests/relu1.py
EfficientAI/efficient_cv
e308f229e4d99da86ad56f87f3a78b2c81f27ca5
[ "MIT" ]
27
2020-02-29T04:13:22.000Z
2022-02-07T21:54:50.000Z
native/tensorflow/tensorflow/lite/testing/op_tests/relu1.py
EfficientAI/efficient_cv
e308f229e4d99da86ad56f87f3a78b2c81f27ca5
[ "MIT" ]
5
2020-06-01T18:50:38.000Z
2021-07-16T07:13:52.000Z
native/tensorflow/tensorflow/lite/testing/op_tests/relu1.py
EfficientAI/efficient_cv
e308f229e4d99da86ad56f87f3a78b2c81f27ca5
[ "MIT" ]
10
2020-12-15T03:55:24.000Z
2021-12-17T23:14:11.000Z
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.909091
80
0.692938
21c083b44ed32c1a0c63295dfadfb3544610e414
2,376
py
Python
contrib/emailfilter.py
mikiec84/trac
d51a7119b9fcb9061d7fe135c7d648fa671555dd
[ "BSD-3-Clause" ]
null
null
null
contrib/emailfilter.py
mikiec84/trac
d51a7119b9fcb9061d7fe135c7d648fa671555dd
[ "BSD-3-Clause" ]
null
null
null
contrib/emailfilter.py
mikiec84/trac
d51a7119b9fcb9061d7fe135c7d648fa671555dd
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2005-2020 Edgewall Software # Copyright (C) 2005 Daniel Lundin <daniel@edgewall.com> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also avai...
27.627907
78
0.696128
21c08f9321a28f272991fdc27e2a9787e486ae05
11,781
py
Python
dpxdt/server/frontend.py
beausmith/dpxdt
1e6b36ec06ed1d41d9ecdbd04753d8b91cb5d9a8
[ "Apache-2.0" ]
null
null
null
dpxdt/server/frontend.py
beausmith/dpxdt
1e6b36ec06ed1d41d9ecdbd04753d8b91cb5d9a8
[ "Apache-2.0" ]
1
2019-05-24T04:47:02.000Z
2019-05-24T04:47:02.000Z
dpxdt/server/frontend.py
beausmith/dpxdt
1e6b36ec06ed1d41d9ecdbd04753d8b91cb5d9a8
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2013 Brett Slatkin # # 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 o...
31.084433
79
0.636873
21c0a9d5b56e7566d42b3754d4bfa2c6692283e8
1,253
py
Python
art/defences/spatial_smoothing_unittest.py
yalechang/adversarial-robustness-toolbox
df4efc86c3ed963c82687b3ab8cd5cdbd5fe5c57
[ "MIT" ]
1
2022-03-02T19:05:12.000Z
2022-03-02T19:05:12.000Z
art/defences/spatial_smoothing_unittest.py
yalechang/adversarial-robustness-toolbox
df4efc86c3ed963c82687b3ab8cd5cdbd5fe5c57
[ "MIT" ]
null
null
null
art/defences/spatial_smoothing_unittest.py
yalechang/adversarial-robustness-toolbox
df4efc86c3ed963c82687b3ab8cd5cdbd5fe5c57
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function, unicode_literals import unittest import numpy as np from art.defences.spatial_smoothing import SpatialSmoothing class TestLocalSpatialSmoothing(unittest.TestCase): def test_ones(self): m, n = 10, 2 x = np.ones((1, m, n, 3)) ...
27.844444
82
0.545092
21c0b18cf16d84c449239f5d708b3f7a85d23e67
4,981
py
Python
sdks/python/appcenter_sdk/models/AADGroup.py
Brantone/appcenter-sdks
eeb063ecf79908b6e341fb00196d2cd9dc8f3262
[ "MIT" ]
null
null
null
sdks/python/appcenter_sdk/models/AADGroup.py
Brantone/appcenter-sdks
eeb063ecf79908b6e341fb00196d2cd9dc8f3262
[ "MIT" ]
6
2019-10-23T06:38:53.000Z
2022-01-22T07:57:58.000Z
sdks/python/appcenter_sdk/models/AADGroup.py
Brantone/appcenter-sdks
eeb063ecf79908b6e341fb00196d2cd9dc8f3262
[ "MIT" ]
2
2019-10-23T06:31:05.000Z
2021-08-21T17:32:47.000Z
# coding: utf-8 """ App Center Client Microsoft Visual Studio App Center API # noqa: E501 OpenAPI spec version: preview Contact: benedetto.abbenanti@gmail.com Project Repository: https://github.com/b3nab/appcenter-sdks """ import pprint import re # noqa: F401 import six class AADGroup(objec...
29.3
98
0.583015
21c0b89a05a52cc03c840d11c54f7aed074b48e8
91,899
py
Python
zproject/backends.py
networksneaker/zulip
fae365f8c7e2d6ee041024a22b6ba5a64cbffe4e
[ "Apache-2.0" ]
null
null
null
zproject/backends.py
networksneaker/zulip
fae365f8c7e2d6ee041024a22b6ba5a64cbffe4e
[ "Apache-2.0" ]
null
null
null
zproject/backends.py
networksneaker/zulip
fae365f8c7e2d6ee041024a22b6ba5a64cbffe4e
[ "Apache-2.0" ]
null
null
null
# Documentation for Zulip's authentication backends is split across a few places: # # * https://zulip.readthedocs.io/en/latest/production/authentication-methods.html and # zproject/prod_settings_template.py have user-level configuration documentation. # * https://zulip.readthedocs.io/en/latest/development/authenticat...
46.018528
136
0.676275
21c0d9c0ef2af9a775bf9b6f53a1c283c00c1c84
4,076
py
Python
msticpy/data/data_query_reader.py
GiuseppeLaurenza/msticpy
37f96126b1e7ed06d3d140e340cdf86d6eee440b
[ "MIT" ]
4
2021-02-02T19:49:54.000Z
2021-12-09T04:04:13.000Z
msticpy/data/data_query_reader.py
GiuseppeLaurenza/msticpy
37f96126b1e7ed06d3d140e340cdf86d6eee440b
[ "MIT" ]
3
2021-05-15T02:16:39.000Z
2022-01-19T13:13:25.000Z
msticpy/data/data_query_reader.py
GiuseppeLaurenza/msticpy
37f96126b1e7ed06d3d140e340cdf86d6eee440b
[ "MIT" ]
2
2021-12-06T21:43:14.000Z
2022-03-11T21:45:03.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # -------------------------------------------------------------------------- """Data qu...
29.751825
81
0.619725
21c0fca4df09f3875c12a96174cef03d6d9c0ae7
794
py
Python
bot/logger.py
LeonErath/eve
6dc1f34fb0e063aa8efeff1e81274d05873d79c8
[ "MIT" ]
8
2018-03-09T12:49:13.000Z
2021-06-25T09:33:31.000Z
bot/logger.py
LeonErath/eve
6dc1f34fb0e063aa8efeff1e81274d05873d79c8
[ "MIT" ]
77
2018-02-20T17:16:33.000Z
2018-10-20T07:57:50.000Z
bot/logger.py
LeonErath/eve
6dc1f34fb0e063aa8efeff1e81274d05873d79c8
[ "MIT" ]
2
2018-08-17T13:17:02.000Z
2018-12-14T05:05:11.000Z
import logging from os import path from sys import stderr # setting up the logger for the entire # determines the format of a log entry formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s') # setting up the file to which the logs are written file_handler = logging.FileHandler('bot.log') # only ...
29.407407
76
0.797229
21c1140c016c903cd260a6349b05eec4a1a04e03
122
py
Python
quiz/questions/admin.py
AJGD/tai_quiz
c2eaedc001178d9c76de5231ca25519ce57822f7
[ "MIT" ]
null
null
null
quiz/questions/admin.py
AJGD/tai_quiz
c2eaedc001178d9c76de5231ca25519ce57822f7
[ "MIT" ]
4
2019-05-30T22:48:33.000Z
2019-06-23T11:38:59.000Z
quiz/questions/admin.py
AJGD/tai_quiz
c2eaedc001178d9c76de5231ca25519ce57822f7
[ "MIT" ]
null
null
null
"""Placeholder for possible models for 'questions' app""" from django.contrib import admin # Register your models here.
20.333333
57
0.762295
21c11f4d4ecae1d0b86ab595c985ad2c90d70640
3,275
py
Python
publicDBInteractions/NCBITaxonomyGetLineage.py
linlifeng/llbio
962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b
[ "MIT" ]
null
null
null
publicDBInteractions/NCBITaxonomyGetLineage.py
linlifeng/llbio
962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b
[ "MIT" ]
null
null
null
publicDBInteractions/NCBITaxonomyGetLineage.py
linlifeng/llbio
962f6abda8e8a576cb0bf4d73d3a5c4ef9b1a04b
[ "MIT" ]
null
null
null
#!/usr/bin/python from Bio import Entrez def getLineageByID(tID): ''' currently search one level up and two level down. could potentially be transformed into recursive function that search until found. ''' import cx_Oracle con = cx_Oracle.connect('bactdev/bactdev@ora2.itw:1521/BACTRACK') #...
29.772727
104
0.567328
21c1309c228d556684ac926d73cee4083336c4ec
2,090
py
Python
projects/migrations/0004_auto_20160510_2300.py
mQuadrics/videplo
a28adea45117e68a5f8fbe9d760122fc8687082d
[ "MIT" ]
null
null
null
projects/migrations/0004_auto_20160510_2300.py
mQuadrics/videplo
a28adea45117e68a5f8fbe9d760122fc8687082d
[ "MIT" ]
null
null
null
projects/migrations/0004_auto_20160510_2300.py
mQuadrics/videplo
a28adea45117e68a5f8fbe9d760122fc8687082d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-10 21:00 from __future__ import unicode_literals import datetime from django.db import migrations, models from django.utils.timezone import utc class Migration(migrations.Migration): dependencies = [ ('projects', '0003_server_project'), ...
38.703704
154
0.616268
21c15bce2e97dfc34a660dabefd84502b59bcae6
4,903
py
Python
external/sbml/bindings/python/test/xml/TestXMLAttributes.py
dchandran/evolvenetworks
072f9e1292552f691a86457ffd16a5743724fb5e
[ "BSD-3-Clause" ]
1
2019-08-22T17:17:41.000Z
2019-08-22T17:17:41.000Z
external/sbml/bindings/python/test/xml/TestXMLAttributes.py
dchandran/evolvenetworks
072f9e1292552f691a86457ffd16a5743724fb5e
[ "BSD-3-Clause" ]
null
null
null
external/sbml/bindings/python/test/xml/TestXMLAttributes.py
dchandran/evolvenetworks
072f9e1292552f691a86457ffd16a5743724fb5e
[ "BSD-3-Clause" ]
null
null
null
# # @file TestXMLAttributes.py # @brief TestXMLAttributes unit tests # # @author Akiya Jouraku (Python conversion) # @author Ben Bornstein # # $Id: TestXMLAttributes.py 10124 2009-08-28 12:04:51Z sarahkeating $ # $HeadURL: https://sbml.svn.sourceforge.net/svnroot/sbml/trunk/libsbml/src/bindings/python/test/xml/...
34.048611
123
0.620233
21c163997c6d3da06daaf14f90f1de5973d81ee3
55,437
py
Python
tests/models/validators/v2_1_2/jsd_09b0f9ce4239ae10.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
tests/models/validators/v2_1_2/jsd_09b0f9ce4239ae10.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
tests/models/validators/v2_1_2/jsd_09b0f9ce4239ae10.py
nonstdout/dnacentersdk
dbbbc4baa5300aa9e5c9193f2ea71438018095f5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """DNA Center Update Device data model. Copyright (c) 2019-2020 Cisco and/or its affiliates. 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...
25.336837
78
0.218013
21c1716562545fe1ea72b2328937cfe963f30d1b
20,021
py
Python
python/abess/bess_base.py
Jiang-Kangkang/abess-test_python_whl_install
48d535bf724d3a79c930741632c2fc5cafc99a06
[ "MIT" ]
272
2021-05-05T03:05:20.000Z
2022-03-28T04:37:36.000Z
python/abess/bess_base.py
Jiang-Kangkang/abess-test_python_whl_install
48d535bf724d3a79c930741632c2fc5cafc99a06
[ "MIT" ]
91
2021-05-16T02:16:47.000Z
2022-03-30T14:46:26.000Z
python/abess/bess_base.py
Jiang-Kangkang/abess-test_python_whl_install
48d535bf724d3a79c930741632c2fc5cafc99a06
[ "MIT" ]
25
2021-04-03T10:15:46.000Z
2022-03-23T13:04:15.000Z
import numbers import numpy as np from scipy.sparse import coo_matrix from sklearn.utils.validation import check_X_y, check_array, check_is_fitted from sklearn.base import BaseEstimator from .cabess import * class bess_base(BaseEstimator): """ Parameters ---------- max_iter : int, optional Max...
40.693089
205
0.544378
21c1a5dca44cb10528a3746312b9185c53e8dee6
5,968
py
Python
google-cloud-sdk/.install/.backup/lib/googlecloudsdk/command_lib/crash_handling.py
KaranToor/MA450
c98b58aeb0994e011df960163541e9379ae7ea06
[ "Apache-2.0" ]
1
2017-11-29T18:52:27.000Z
2017-11-29T18:52:27.000Z
google-cloud-sdk/.install/.backup/lib/googlecloudsdk/command_lib/crash_handling.py
KaranToor/MA450
c98b58aeb0994e011df960163541e9379ae7ea06
[ "Apache-2.0" ]
null
null
null
google-cloud-sdk/.install/.backup/lib/googlecloudsdk/command_lib/crash_handling.py
KaranToor/MA450
c98b58aeb0994e011df960163541e9379ae7ea06
[ "Apache-2.0" ]
1
2020-07-25T12:09:01.000Z
2020-07-25T12:09:01.000Z
# Copyright 2013 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...
35.313609
79
0.720677
21c20f0f7bbad277ab00809c191c3b78e7806756
29,584
py
Python
admin.py
crossin/yuan-xin
1c28ef77671293f5e3d40d663f586753a82bbf8b
[ "MIT" ]
null
null
null
admin.py
crossin/yuan-xin
1c28ef77671293f5e3d40d663f586753a82bbf8b
[ "MIT" ]
null
null
null
admin.py
crossin/yuan-xin
1c28ef77671293f5e3d40d663f586753a82bbf8b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import cgi, os,sys,traceback import wsgiref.handlers ##os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' ##from django.conf import settings ##settings._target = None os.environ['DJANGO_SETTINGS_MODULE'] = 'settings' from django.utils.translation import check_for_language, activate, to_loc...
27.494424
279
0.655185
21c2750d881275f4064ba22b05e0cc03e7d9e6e2
4,734
py
Python
ml-agents/mlagents/trainers/tests/test_demo_loader.py
mattinjersey/ml-agents
7dcf947f541d661cc4a94b0e7758e1b12c6be078
[ "Apache-2.0" ]
1
2020-12-23T06:38:13.000Z
2020-12-23T06:38:13.000Z
ml-agents/mlagents/trainers/tests/test_demo_loader.py
mattinjersey/ml-agents
7dcf947f541d661cc4a94b0e7758e1b12c6be078
[ "Apache-2.0" ]
null
null
null
ml-agents/mlagents/trainers/tests/test_demo_loader.py
mattinjersey/ml-agents
7dcf947f541d661cc4a94b0e7758e1b12c6be078
[ "Apache-2.0" ]
null
null
null
import io import os from unittest import mock import numpy as np import pytest import tempfile from mlagents_envs.communicator_objects.demonstration_meta_pb2 import ( DemonstrationMetaProto, ) from mlagents.trainers.tests.mock_brain import ( create_mock_3dball_behavior_specs, setup_test_behavior_specs, ) f...
35.863636
86
0.693705
21c275777a8166a8a01767ea60ba7deeefa7daec
4,723
py
Python
train_procgen/train_recenter.py
MandiZhao/train-procgen
2c3e1d34aaeab7598cf859e0f9137552a3ce27cb
[ "MIT" ]
null
null
null
train_procgen/train_recenter.py
MandiZhao/train-procgen
2c3e1d34aaeab7598cf859e0f9137552a3ce27cb
[ "MIT" ]
null
null
null
train_procgen/train_recenter.py
MandiZhao/train-procgen
2c3e1d34aaeab7598cf859e0f9137552a3ce27cb
[ "MIT" ]
null
null
null
""" Train an observation-recentered agent $ taskset -c 0-7 python train_procgen/train_recenter.py -id 7 --num_levels 25 """ import os from os.path import join import json import tensorflow as tf # from baselines.ppo2 import ppo2 import recenter_ppo from baselines.common.mpi_util import setup_mpi_gpus from procgen imp...
33.260563
134
0.670125
21c292f881352390eb9c2ff26fff6d42fb0e02e8
1,506
py
Python
pandaharvester/harvestermonitor/dummy_mcore_monitor.py
tsulaiav/harvester
ca3f78348019dd616738f2da7d50e81700a8e6b9
[ "Apache-2.0" ]
11
2017-06-01T10:16:58.000Z
2019-11-22T08:41:36.000Z
pandaharvester/harvestermonitor/dummy_mcore_monitor.py
tsulaiav/harvester
ca3f78348019dd616738f2da7d50e81700a8e6b9
[ "Apache-2.0" ]
34
2016-10-25T19:15:24.000Z
2021-03-05T12:59:04.000Z
pandaharvester/harvestermonitor/dummy_mcore_monitor.py
tsulaiav/harvester
ca3f78348019dd616738f2da7d50e81700a8e6b9
[ "Apache-2.0" ]
17
2016-10-24T13:29:45.000Z
2021-03-23T17:35:27.000Z
import os.path from concurrent.futures import ProcessPoolExecutor as Pool from pandaharvester.harvestercore.work_spec import WorkSpec from pandaharvester.harvestercore.plugin_base import PluginBase from pandaharvester.harvestercore import core_utils # logger baseLogger = core_utils.setup_logger('dummy_mcore_monitor')...
33.466667
89
0.695219
21c2a529d63c1117c8dd36d53a819fa5f5255c05
195
py
Python
two_sum.py
Jorewang/LeetCode_Solutions
0c483a915e2a8b3bfc4bcb4b5a35df3dd0dbe8ba
[ "Apache-2.0" ]
2
2020-06-13T06:37:50.000Z
2020-06-13T06:37:52.000Z
two_sum.py
Jorewang/LeetCode_Solutions
0c483a915e2a8b3bfc4bcb4b5a35df3dd0dbe8ba
[ "Apache-2.0" ]
null
null
null
two_sum.py
Jorewang/LeetCode_Solutions
0c483a915e2a8b3bfc4bcb4b5a35df3dd0dbe8ba
[ "Apache-2.0" ]
null
null
null
def two_sum(nums, target): lookup = {} for i, num in enumerate(nums): if target-num in lookup: return i, lookup[target-num] lookup[num] = i return "fail"
21.666667
40
0.558974
21c2b87cb4fc9a37f121e020debecdfcc29f1bac
4,273
py
Python
oas/python-client/jatdb_client/api/default_api.py
NGenetzky/jatdb
518e0cedca1b61b8a744aef5e02255d8501bf8eb
[ "MIT" ]
null
null
null
oas/python-client/jatdb_client/api/default_api.py
NGenetzky/jatdb
518e0cedca1b61b8a744aef5e02255d8501bf8eb
[ "MIT" ]
null
null
null
oas/python-client/jatdb_client/api/default_api.py
NGenetzky/jatdb
518e0cedca1b61b8a744aef5e02255d8501bf8eb
[ "MIT" ]
null
null
null
# coding: utf-8 """ jatdb JSON API to DB: Fetch JSON from APIs and send to a TinyDB database. # noqa: E501 OpenAPI spec version: 0.0.2 Contact: Nathan@Genetzky.us Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # noqa: F40...
32.371212
106
0.601685
21c2e34e3138be519702b2eda7c90a807b159e6d
14,248
py
Python
parsi_io/modules/parstdex/utils/word_to_value.py
salehmontazeran/parsi.io
4753ddcbf0ab263a9da021ad96772b0123b1989a
[ "Apache-2.0" ]
null
null
null
parsi_io/modules/parstdex/utils/word_to_value.py
salehmontazeran/parsi.io
4753ddcbf0ab263a9da021ad96772b0123b1989a
[ "Apache-2.0" ]
null
null
null
parsi_io/modules/parstdex/utils/word_to_value.py
salehmontazeran/parsi.io
4753ddcbf0ab263a9da021ad96772b0123b1989a
[ "Apache-2.0" ]
null
null
null
import re from parsi_io.modules.parstdex.utils import const class ValueExtractor: SHAMSHI_MONTHS = const.SHAMSHI_MONTHS GHAMARI_MONTHS = const.GHAMARI_MONTHS MILADI_MONTHS = const.MILADI_MONTHS ONES_TEXT = const.ONES_TEXT TENS_TEXT = const.TENS_TEXT TEN_PLUS_TEXT = const.TEN_PLUS_TEXT HUN...
37.007792
158
0.531583
21c2e709582edf56ef94c8d09908a080b10872f2
614
py
Python
134.py
gdmanandamohon/leetcode
a691a4e37ee1fdad69c710e3710c5faf8b0a7d76
[ "MIT" ]
null
null
null
134.py
gdmanandamohon/leetcode
a691a4e37ee1fdad69c710e3710c5faf8b0a7d76
[ "MIT" ]
null
null
null
134.py
gdmanandamohon/leetcode
a691a4e37ee1fdad69c710e3710c5faf8b0a7d76
[ "MIT" ]
null
null
null
''' @author: l4zyc0d3r People who are happy makes other happy. I am gonna finish it slowly but definitely.cdt ''' class Solution: def canCompleteCircuit(self, G: List[int], C: List[int]) -> int: mn, s_idx, l,dif = 1<<29, 0, len(G),0 for i,x in enumerate(G): dif += G[i]-C[i] ...
29.238095
86
0.491857
21c2f9e005819f15748dca5856799bd8870ac27d
2,055
py
Python
ocs_ci/framework/tests/test_main.py
nbalacha/ocs-ci
9c5a5474d62777e868b80894d6b0f3567a7b605d
[ "MIT" ]
null
null
null
ocs_ci/framework/tests/test_main.py
nbalacha/ocs-ci
9c5a5474d62777e868b80894d6b0f3567a7b605d
[ "MIT" ]
null
null
null
ocs_ci/framework/tests/test_main.py
nbalacha/ocs-ci
9c5a5474d62777e868b80894d6b0f3567a7b605d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os import subprocess from pytest import fixture from unittest import mock from ocs_ci.framework import config, main pytest_plugins = [ "pytester", ] class TestEntrypoint(object): @fixture(autouse=True) def reset_config(self): config.reset() def test_help(self)...
28.943662
77
0.567397
21c2fde2c4a1d8e1331a244b2aaf4b02f95062b7
4,021
py
Python
alipay/aop/api/request/AntfortuneStockQualifiedInvestorApplyRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AntfortuneStockQualifiedInvestorApplyRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
alipay/aop/api/request/AntfortuneStockQualifiedInvestorApplyRequest.py
antopen/alipay-sdk-python-all
8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.FileItem import FileItem from alipay.aop.api.constant.ParamConstants import * from alipay.aop.api.domain.AntfortuneStockQualifiedInvestorApplyModel import AntfortuneStockQualifiedInvestorApplyModel class AntfortuneStockQualifiedInvestorA...
27.731034
148
0.649092
21c32013a5af9f66eab4b1ab70aa37a98223e124
16,914
py
Python
stack/assets.py
caktus/aws-web-stacks
31859d5c935653be453f97220f2e53155e23f429
[ "MIT" ]
83
2017-10-06T14:03:31.000Z
2021-11-08T10:32:22.000Z
stack/assets.py
caktus/aws-web-stacks
31859d5c935653be453f97220f2e53155e23f429
[ "MIT" ]
39
2017-09-29T13:43:30.000Z
2022-03-22T20:35:43.000Z
stack/assets.py
caktus/aws-web-stacks
31859d5c935653be453f97220f2e53155e23f429
[ "MIT" ]
19
2017-10-25T18:46:50.000Z
2022-02-13T20:11:54.000Z
from troposphere import ( AWS_REGION, And, Equals, GetAtt, If, Join, Not, NoValue, Output, Ref, Split, iam ) from troposphere.certificatemanager import Certificate, DomainValidationOption from troposphere.cloudfront import ( DefaultCacheBehavior, Distribution, ...
33.360947
135
0.579816
21c3202bc762570a2caee606b08b96d94a88a150
13,660
py
Python
src/sumo/modes/run/solver.py
ratan-lab/sumo
61fd9513ed486f255906ee800d2825a8d89ddfac
[ "MIT" ]
7
2019-11-08T00:31:05.000Z
2021-06-14T13:44:22.000Z
src/sumo/modes/run/solver.py
ratan-lab/sumo
61fd9513ed486f255906ee800d2825a8d89ddfac
[ "MIT" ]
16
2019-09-16T21:38:43.000Z
2021-06-04T16:09:31.000Z
src/sumo/modes/run/solver.py
ratan-lab/sumo
61fd9513ed486f255906ee800d2825a8d89ddfac
[ "MIT" ]
null
null
null
from math import sqrt from numba import njit from random import shuffle, seed from sumo.constants import CLUSTER_METHODS from sumo.network import MultiplexNet from sumo.utils import extract_max_value, extract_spectral, get_logger, check_matrix_symmetry import numpy as np def svdEM(a: np.ndarray, tol=0.001, max_iter=1...
41.7737
120
0.575695
21c32453076c4524ed5e0d761bf8e7a993663425
531
py
Python
trac/timeline/__init__.py
mikiec84/trac
d51a7119b9fcb9061d7fe135c7d648fa671555dd
[ "BSD-3-Clause" ]
null
null
null
trac/timeline/__init__.py
mikiec84/trac
d51a7119b9fcb9061d7fe135c7d648fa671555dd
[ "BSD-3-Clause" ]
null
null
null
trac/timeline/__init__.py
mikiec84/trac
d51a7119b9fcb9061d7fe135c7d648fa671555dd
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2006-2020 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at https://trac.edgewall.org/wiki/TracLicense. # # This software cons...
35.4
67
0.758945
21c3258ce380bf50e02afef59d9da8aa9fa9d84a
10,283
py
Python
tests/network/nano_node/data/http/representatives_online.py
Matoking/siliqua
b943822631ab18dde85e95d1731ebd7ffd7ef14a
[ "CC0-1.0" ]
8
2019-10-31T19:16:08.000Z
2021-12-04T00:09:24.000Z
tests/network/nano_node/data/http/representatives_online.py
Matoking/siliqua
b943822631ab18dde85e95d1731ebd7ffd7ef14a
[ "CC0-1.0" ]
null
null
null
tests/network/nano_node/data/http/representatives_online.py
Matoking/siliqua
b943822631ab18dde85e95d1731ebd7ffd7ef14a
[ "CC0-1.0" ]
1
2019-11-01T19:27:48.000Z
2019-11-01T19:27:48.000Z
from tests.network.nano_node.conftest import HTTPReplay DATA = [ HTTPReplay( {"action": "representatives_online"}, { "representatives": [ "xrb_3tfccg1pfr9k8o548jb6bj9fyyc4mmhnpepounzneobfwuq8won9enactbkk", "xrb_1qgfm1zr84r4d18am1z51xno3tkmxohsnfhzicznedx...
77.315789
83
0.757172
21c37173d9ed6c455dad515d11c266ad6418cb46
5,449
py
Python
tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_rootwrap/daemon.py
foruy/openflow-multiopenstack
74140b041ac25ed83898ff3998e8dcbed35572bb
[ "Apache-2.0" ]
1
2019-09-11T11:56:19.000Z
2019-09-11T11:56:19.000Z
tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_rootwrap/daemon.py
foruy/openflow-multiopenstack
74140b041ac25ed83898ff3998e8dcbed35572bb
[ "Apache-2.0" ]
null
null
null
tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo_rootwrap/daemon.py
foruy/openflow-multiopenstack
74140b041ac25ed83898ff3998e8dcbed35572bb
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2014 Mirantis 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 require...
36.817568
79
0.657919
21c37fc5335dca2224ddd6fd2a2f8b484c25944c
5,836
py
Python
Suction_Caisson/uplift.py
goharShoukat/Selkie_Foundation_Modelling
217d495449fdf10935dcacd99f79e765709800eb
[ "MIT" ]
null
null
null
Suction_Caisson/uplift.py
goharShoukat/Selkie_Foundation_Modelling
217d495449fdf10935dcacd99f79e765709800eb
[ "MIT" ]
null
null
null
Suction_Caisson/uplift.py
goharShoukat/Selkie_Foundation_Modelling
217d495449fdf10935dcacd99f79e765709800eb
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Dec 29 10:35:24 2021 @author: goharshoukat Undrained analysis for uplift (tension on anchor based) This script will sequentially perform several checks on different locations of the caisson to determine if the design passes checks Feeds into the Foun...
42.59854
118
0.550034
21c38bb28be7fd83508ceff7b1f6173451825258
16,840
py
Python
src/simulator/pantheon_trace_parser/tunnel_graph.py
zxxia/RL-CC-Video
916d059ba15fa587c0101470aa608ea8a01b8305
[ "Apache-2.0" ]
null
null
null
src/simulator/pantheon_trace_parser/tunnel_graph.py
zxxia/RL-CC-Video
916d059ba15fa587c0101470aa608ea8a01b8305
[ "Apache-2.0" ]
null
null
null
src/simulator/pantheon_trace_parser/tunnel_graph.py
zxxia/RL-CC-Video
916d059ba15fa587c0101470aa608ea8a01b8305
[ "Apache-2.0" ]
null
null
null
import csv import os import sys import math import itertools from typing import Optional import numpy as np import matplotlib.pyplot as plt class TunnelGraph(object): def __init__(self, tunnel_log, throughput_graph=None, delay_graph=None, ms_per_bin=500): self.tunnel_log = tunnel_log ...
37.339246
106
0.543052
21c3a15f402c783fca7b07aec70cfe88a7e03ff5
1,171
py
Python
contrib/scalajs/src/python/pants/contrib/scalajs/targets/scala_js_library.py
tpasternak/pants
edf5716283d449852309fff1a10dd351dfbf3493
[ "Apache-2.0" ]
1
2021-05-05T18:58:28.000Z
2021-05-05T18:58:28.000Z
contrib/scalajs/src/python/pants/contrib/scalajs/targets/scala_js_library.py
tpasternak/pants
edf5716283d449852309fff1a10dd351dfbf3493
[ "Apache-2.0" ]
null
null
null
contrib/scalajs/src/python/pants/contrib/scalajs/targets/scala_js_library.py
tpasternak/pants
edf5716283d449852309fff1a10dd351dfbf3493
[ "Apache-2.0" ]
3
2020-06-30T08:28:13.000Z
2021-07-28T09:35:57.000Z
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from pants.base.payload import Payload from pants.build_graph.target import Target from pants.contrib.scalajs.targets.scala_js_target import ScalaJSTarget class ScalaJSLibrary(ScalaJSTa...
36.59375
99
0.661827
21c3e422967b779029110e20a280655082152ce2
3,853
py
Python
03_OD_matrix_estimation_cdc16/GLS_Apr_weekday_AM.py
jingzbu/InverseVITraffic
c0d33d91bdd3c014147d58866c1a2b99fb8a9608
[ "MIT" ]
null
null
null
03_OD_matrix_estimation_cdc16/GLS_Apr_weekday_AM.py
jingzbu/InverseVITraffic
c0d33d91bdd3c014147d58866c1a2b99fb8a9608
[ "MIT" ]
null
null
null
03_OD_matrix_estimation_cdc16/GLS_Apr_weekday_AM.py
jingzbu/InverseVITraffic
c0d33d91bdd3c014147d58866c1a2b99fb8a9608
[ "MIT" ]
null
null
null
from util import * # implement GLS method to estimate OD demand matrix def GLS(x, A, L): """ x: sample matrix, each column is a link flow vector sample; 24 * K A: path-link incidence matrix P: logit route choice probability matrix L: dimension of xi ---------------- return: xi ---------...
27.719424
110
0.581884
21c3eac3e39703ead1de176463a3566c3519e789
4,945
py
Python
inverter/dc2colanderavro.py
morpframework/inverter
52f854d310fe196ec7fbce8bc0bebe8837f9bf9c
[ "Apache-2.0" ]
1
2021-06-29T16:36:09.000Z
2021-06-29T16:36:09.000Z
inverter/dc2colanderavro.py
morpframework/inverter
52f854d310fe196ec7fbce8bc0bebe8837f9bf9c
[ "Apache-2.0" ]
null
null
null
inverter/dc2colanderavro.py
morpframework/inverter
52f854d310fe196ec7fbce8bc0bebe8837f9bf9c
[ "Apache-2.0" ]
null
null
null
import dataclasses import json import typing from datetime import date, datetime, timedelta import colander import pytz from .common import dataclass_check_type, dataclass_get_type, is_dataclass_field from .dc2colander import SchemaNode, colander_params from .dc2colander import dataclass_field_to_colander_schemanode ...
29.969697
88
0.636805
21c3eb6a1a71ecf8ad2a031a077a73c7b8356886
3,234
py
Python
flow/template.py
ilumsden/signac-flow
1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607
[ "BSD-3-Clause" ]
null
null
null
flow/template.py
ilumsden/signac-flow
1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607
[ "BSD-3-Clause" ]
null
null
null
flow/template.py
ilumsden/signac-flow
1f1e11ce2fb298a7fe0fd6af2ee3a742ede72607
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2018 The Regents of the University of Michigan # All rights reserved. # This software is licensed under the BSD 3-Clause License. """This module contains the FlowProject module templates. These templates can be initialized via the init() function defined in this module and the main 'flow' command line ...
31.705882
90
0.630798
21c3fbb8e46c82198b8fb07f1148773c36854f92
534
py
Python
tests/test_pitch.py
Carolwanzuu/pitch_app
accd92963cbedb39c53bef5f1851dc11a4ff743a
[ "MIT" ]
null
null
null
tests/test_pitch.py
Carolwanzuu/pitch_app
accd92963cbedb39c53bef5f1851dc11a4ff743a
[ "MIT" ]
null
null
null
tests/test_pitch.py
Carolwanzuu/pitch_app
accd92963cbedb39c53bef5f1851dc11a4ff743a
[ "MIT" ]
null
null
null
import unittest from app.models import Pitch class PitchTest(unittest.TestCase): ''' Test Class to test the behaviour of the Movie class ''' def setUp(self): ''' Set up method that will run before every Test ''' self.new_pitch = Pitch(id=1, title = 'general',pitch_conte...
33.375
192
0.655431
21c40452a1d729bf7092a4783174fc1939e874aa
934
py
Python
code/processing/basan_2015_munging/generate_tidy_data.py
gchure/quantitative_proteome
90d15dd208647332aeb06cf7e16ab71a6b210820
[ "MIT" ]
2
2020-05-18T23:03:10.000Z
2020-10-27T19:31:51.000Z
code/processing/basan_2015_munging/generate_tidy_data.py
gchure/quantitative_proteome
90d15dd208647332aeb06cf7e16ab71a6b210820
[ "MIT" ]
1
2020-07-17T20:50:37.000Z
2020-07-17T20:50:37.000Z
code/processing/basan_2015_munging/generate_tidy_data.py
RPGroup-PBoC/growth_limits
90d15dd208647332aeb06cf7e16ab71a6b210820
[ "MIT" ]
null
null
null
#%% import numpy as np import pandas as pd ############################################## ############################################## # gather DNA mass data in Basan 2015; from SI PDF ############################################## ############################################## # growth rate (hr-1), dna (femtogram ...
33.357143
79
0.498929
21c42c5a8606a2708b2f43d6b0f3c2234b97fe3c
182
py
Python
apps/custom_styles/admin.py
ecds/readux
4eac8b48efef8126f4f2be28b5eb943c85a89c2e
[ "Apache-2.0" ]
18
2017-06-12T09:58:02.000Z
2021-10-01T11:14:34.000Z
apps/custom_styles/admin.py
ecds/readux
4eac8b48efef8126f4f2be28b5eb943c85a89c2e
[ "Apache-2.0" ]
276
2019-04-26T20:13:01.000Z
2022-03-31T10:26:28.000Z
apps/custom_styles/admin.py
ecds/readux
4eac8b48efef8126f4f2be28b5eb943c85a89c2e
[ "Apache-2.0" ]
7
2018-03-13T23:44:26.000Z
2021-09-15T17:54:55.000Z
"""Admin module for custom styles.""" from django.contrib import admin from .models import Style class StyleAdmin(admin.ModelAdmin): pass admin.site.register(Style, StyleAdmin)
22.75
38
0.774725
21c42fb609b722ad06bbbfd13bb235267e4265e7
7,500
py
Python
python/ray/serve/tests/test_failure.py
jody3t/ray-jo
94dc11b6fb2b077ca0a2d4d0d376adfb2002c795
[ "Apache-2.0" ]
null
null
null
python/ray/serve/tests/test_failure.py
jody3t/ray-jo
94dc11b6fb2b077ca0a2d4d0d376adfb2002c795
[ "Apache-2.0" ]
null
null
null
python/ray/serve/tests/test_failure.py
jody3t/ray-jo
94dc11b6fb2b077ca0a2d4d0d376adfb2002c795
[ "Apache-2.0" ]
null
null
null
import os import requests import tempfile import time import ray from ray import serve def request_with_retries(endpoint, timeout=30): start = time.time() while True: try: return requests.get( "http://127.0.0.1:8000" + endpoint, timeout=timeout) except requests.Req...
30.737705
79
0.646667
21c4442c72144f3712acccb608be5b9cf1aa247e
2,256
py
Python
hw3/plot_part1.py
whoiszyc/cs294-112_hws
68f18e002cf99d88fd68241215a428fda5189b60
[ "MIT" ]
102
2019-01-18T09:58:03.000Z
2022-01-28T14:50:42.000Z
hw3/plot_part1.py
whoiszyc/cs294-112_hws
68f18e002cf99d88fd68241215a428fda5189b60
[ "MIT" ]
1
2020-03-10T15:43:22.000Z
2020-03-10T15:43:22.000Z
hw3/plot_part1.py
whoiszyc/cs294-112_hws
68f18e002cf99d88fd68241215a428fda5189b60
[ "MIT" ]
47
2019-01-17T19:40:22.000Z
2022-01-18T08:55:25.000Z
import pandas as pd import os import matplotlib import matplotlib.pyplot as plt import seaborn as sns def read_result(exp_name): path = os.path.join('data', exp_name, 'log.txt') return pd.read_csv(path, sep='\t') def add_plot(data, var_name, label=''): sns.set(style="darkgrid", font_scale=1.5) plt.plo...
28.2
67
0.621011
21c444b6a295c8f54ce1c32d8f9b4311ee8a1c8c
714
py
Python
dapnn/imports.py
joLahann/dapnn
393ee55fe01c654de5fbc96589688ddc92e0dcda
[ "Apache-2.0" ]
null
null
null
dapnn/imports.py
joLahann/dapnn
393ee55fe01c654de5fbc96589688ddc92e0dcda
[ "Apache-2.0" ]
null
null
null
dapnn/imports.py
joLahann/dapnn
393ee55fe01c654de5fbc96589688ddc92e0dcda
[ "Apache-2.0" ]
null
null
null
from nbdev.showdoc import * from nbdev.export import notebook2script import os import re import glob import pandas as pd import numpy as np from random import randrange #from pm4py.objects.log.importer.xes import importer as xes_importer #from pm4py.objects.conversion.log import converter as log_converter from fast...
24.62069
80
0.826331
21c45cd9f548715558b0b2a720c2f37fbe20d316
4,401
py
Python
aiokafkadaemon/worker.py
bobzsj87/aiokafkadaemon
8305fa018fc0c1ff2464f586a5ad43d9411f0ca2
[ "MIT" ]
null
null
null
aiokafkadaemon/worker.py
bobzsj87/aiokafkadaemon
8305fa018fc0c1ff2464f586a5ad43d9411f0ca2
[ "MIT" ]
null
null
null
aiokafkadaemon/worker.py
bobzsj87/aiokafkadaemon
8305fa018fc0c1ff2464f586a5ad43d9411f0ca2
[ "MIT" ]
null
null
null
import asyncio import logging import traceback from aiokafka import AIOKafkaConsumer, AIOKafkaProducer logger = logging.getLogger('aiokafkadaemon') class Worker: def __init__(self, kafka_broker_addr=None, kafka_group_id='', consumer_topic='', producer_topic='', create_consumer=...
34.928571
76
0.58623
21c4834783fe08fcaebccb6b87490710f2aa88e7
2,254
py
Python
src/generic/tf_utils/abstract_network.py
ash567/guess_what
092653695cb2a14cbb12df619b894d983c065a67
[ "Apache-2.0" ]
null
null
null
src/generic/tf_utils/abstract_network.py
ash567/guess_what
092653695cb2a14cbb12df619b894d983c065a67
[ "Apache-2.0" ]
null
null
null
src/generic/tf_utils/abstract_network.py
ash567/guess_what
092653695cb2a14cbb12df619b894d983c065a67
[ "Apache-2.0" ]
null
null
null
import tensorflow as tf import os import json class AbstractNetwork(object): def __init__(self, scope_name, device=''): self.scope_name = scope_name self.device = device def get_parameters(self, finetune=None): return [v for v in tf.trainable_variables() if self.scope_name in v.name] ...
36.354839
116
0.641526
21c4b22af9203f1c62bb8d2e58c1d2dbbf50a76f
9,146
py
Python
statsmodels/genmod/tests/gee_poisson_simulation_check.py
saedsaleh/statsmodels
7df5291f04f406f127242736008f72cb4a579262
[ "BSD-3-Clause" ]
null
null
null
statsmodels/genmod/tests/gee_poisson_simulation_check.py
saedsaleh/statsmodels
7df5291f04f406f127242736008f72cb4a579262
[ "BSD-3-Clause" ]
null
null
null
statsmodels/genmod/tests/gee_poisson_simulation_check.py
saedsaleh/statsmodels
7df5291f04f406f127242736008f72cb4a579262
[ "BSD-3-Clause" ]
null
null
null
""" Assesment of Generalized Estimating Equations using simulation. This script checks Poisson models. See the generated file "gee_poisson_simulation_check.txt" for results. """ from __future__ import print_function import numpy as np from statsmodels.genmod.families import Poisson from .gee_gaussian_simulation_chec...
32.091228
80
0.557949
21c4cfe262072872c334ed894e57fd5f532aae24
281
py
Python
update_documentation.py
costas-basdekis/gcode-documentation-parser
d4d370eae359254ad33caf9896a9c5a4fb03f8aa
[ "MIT" ]
null
null
null
update_documentation.py
costas-basdekis/gcode-documentation-parser
d4d370eae359254ad33caf9896a9c5a4fb03f8aa
[ "MIT" ]
null
null
null
update_documentation.py
costas-basdekis/gcode-documentation-parser
d4d370eae359254ad33caf9896a9c5a4fb03f8aa
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from pathlib import Path if __name__ == '__main__': from gcode_documentation_parser.updater import DocumentationUpdater DocumentationUpdater()\ .update_documentation( output_directory=Path(__file__).parent / "output", )
25.545455
71
0.704626
21c4ec19d01aca1c980d4751fe8e7aeca845dacc
41,027
py
Python
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pool_data_connections_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
1
2022-01-24T08:54:57.000Z
2022-01-24T08:54:57.000Z
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pool_data_connections_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
sdk/synapse/azure-mgmt-synapse/azure/mgmt/synapse/aio/operations/_kusto_pool_data_connections_operations.py
vincenttran-msft/azure-sdk-for-python
348b56f9f03eeb3f7b502eed51daf494ffff874d
[ "MIT" ]
null
null
null
# pylint: disable=too-many-lines # 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) AutoRe...
47.76135
304
0.674678
21c4ec8226203bc77cb202702a26719c2fc56dd7
648
py
Python
Battleships/model/highscore.py
ruslanabdulin1985/TheTask
99e53bd283273a90233b29c8aa7aa4380211263b
[ "MIT" ]
null
null
null
Battleships/model/highscore.py
ruslanabdulin1985/TheTask
99e53bd283273a90233b29c8aa7aa4380211263b
[ "MIT" ]
null
null
null
Battleships/model/highscore.py
ruslanabdulin1985/TheTask
99e53bd283273a90233b29c8aa7aa4380211263b
[ "MIT" ]
null
null
null
""" Module for Highscore class """ from model.player import Player class HighScore: """ Represents high score and list of players """ def __init__(self): self.high_score = 0 self.best_player = None self.list_of_playes = [] def add_player(self, player:Player): """ ...
24
89
0.608025