hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
be0bf10b31fef414b421f81e9b0dc7210fd37eed
5,413
py
Python
src/core/utils.py
thetartan/tartan-database
55adcebed4c68c717fbf714d7619da95da6a70db
[ "MIT" ]
7
2016-11-11T06:49:44.000Z
2021-10-13T03:45:46.000Z
src/core/utils.py
kravets-levko/tartan-database
55adcebed4c68c717fbf714d7619da95da6a70db
[ "MIT" ]
null
null
null
src/core/utils.py
kravets-levko/tartan-database
55adcebed4c68c717fbf714d7619da95da6a70db
[ "MIT" ]
1
2018-04-27T08:42:48.000Z
2018-04-27T08:42:48.000Z
import re import random import string from datetime import datetime from PIL import ImageColor from HTMLParser import HTMLParser html = HTMLParser() BOM = '\xEF\xBB\xBF' re_words = re.compile('[a-z]{3,}', re.IGNORECASE) stop_words = ['the', 'for', 'and'] # Two-letter words ignored by regex remap_dictionary = { ...
23.741228
77
0.582856
ffb82f516256cddf4a8400aeaba11f5337783512
2,792
py
Python
pyleecan/Methods/Machine/LamSlot/plot.py
mxgnsr/pyleecan
2b0a04e4ae67c073a91362ab42332908fef53bdd
[ "Apache-2.0" ]
2
2019-06-08T15:04:39.000Z
2020-09-07T13:32:22.000Z
pyleecan/Methods/Machine/LamSlot/plot.py
mxgnsr/pyleecan
2b0a04e4ae67c073a91362ab42332908fef53bdd
[ "Apache-2.0" ]
null
null
null
pyleecan/Methods/Machine/LamSlot/plot.py
mxgnsr/pyleecan
2b0a04e4ae67c073a91362ab42332908fef53bdd
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from matplotlib.patches import Patch from matplotlib.pyplot import axis, legend from ....Functions.init_fig import init_fig from ....definitions import config_dict ROTOR_COLOR = config_dict["PLOT"]["COLOR_DICT"]["ROTOR_COLOR"] STATOR_COLOR = config_dict["PLOT"]["COLOR_DICT"]["STATOR_COLOR"] ...
28.20202
88
0.608883
67679af3da5395d8d373e77f6b8d7ed4304fb553
19,450
py
Python
tests/test_resolver.py
timgates42/pex
bee95d65fcf7ad2beb75a923890de6b47f726b7d
[ "Apache-2.0" ]
null
null
null
tests/test_resolver.py
timgates42/pex
bee95d65fcf7ad2beb75a923890de6b47f726b7d
[ "Apache-2.0" ]
null
null
null
tests/test_resolver.py
timgates42/pex
bee95d65fcf7ad2beb75a923890de6b47f726b7d
[ "Apache-2.0" ]
1
2021-03-08T21:42:57.000Z
2021-03-08T21:42:57.000Z
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). import functools import os import subprocess from collections import defaultdict from textwrap import dedent import pkginfo import pytest from pex.common import safe_copy, safe_mkdtemp, ...
37.047619
104
0.687661
c47f864a8fdf2d1085e6e38323ffa1e7fbdf00e7
4,223
py
Python
aim/db/migration/alembic_migrations/versions/aceb1ac13668_vmm_policy.py
gaurav-dalvi/aci-integration-module
5d31f65f4fca3e0322d6003e7736ca14aa7ec72d
[ "Apache-2.0" ]
7
2017-11-20T12:45:36.000Z
2021-11-14T12:52:48.000Z
aim/db/migration/alembic_migrations/versions/aceb1ac13668_vmm_policy.py
gaurav-dalvi/aci-integration-module
5d31f65f4fca3e0322d6003e7736ca14aa7ec72d
[ "Apache-2.0" ]
92
2016-03-30T04:48:18.000Z
2022-01-19T21:25:27.000Z
aim/db/migration/alembic_migrations/versions/aceb1ac13668_vmm_policy.py
gaurav-dalvi/aci-integration-module
5d31f65f4fca3e0322d6003e7736ca14aa7ec72d
[ "Apache-2.0" ]
11
2017-12-23T15:55:24.000Z
2021-08-03T12:59:33.000Z
# Copyright (c) 2016 Cisco Systems # 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...
38.743119
79
0.630358
5298f60db8615c9179ae2e42b544ffe640694805
1,701
py
Python
src/graphdb_builder/databases/parsers/mutationDsParser.py
enryH/CKG
020e444b42cbb2e3d8c7ebd55e6f4ace5468f2f0
[ "MIT" ]
null
null
null
src/graphdb_builder/databases/parsers/mutationDsParser.py
enryH/CKG
020e444b42cbb2e3d8c7ebd55e6f4ace5468f2f0
[ "MIT" ]
null
null
null
src/graphdb_builder/databases/parsers/mutationDsParser.py
enryH/CKG
020e444b42cbb2e3d8c7ebd55e6f4ace5468f2f0
[ "MIT" ]
null
null
null
import os.path import re from graphdb_builder import builder_utils ############################ # IntAct - MutationDs # ############################ def parser(databases_directory, download=True): relationships = set() config = builder_utils.get_config(config_name="mutationDsConfig.yml", data_type='databa...
37.8
166
0.582011
f693ca3b43336aa0bab22b3d7acc5f12408eb17c
5,398
py
Python
catalog/views.py
rahulblhra/django-lib
380abb9ebb50de7a2fdc4a155ccbd1a7a19a89b5
[ "MIT" ]
null
null
null
catalog/views.py
rahulblhra/django-lib
380abb9ebb50de7a2fdc4a155ccbd1a7a19a89b5
[ "MIT" ]
null
null
null
catalog/views.py
rahulblhra/django-lib
380abb9ebb50de7a2fdc4a155ccbd1a7a19a89b5
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.views import generic # Create your views here. from .models import Book, Author, BookInstance, Genre, Language from django.contrib.auth.mixins import LoginRequiredMixin def index(request): """View function for home page of site.""" # Generate coun...
31.940828
118
0.687662
e5b8afb697e0e5a9606c1cf44a83edadb45ccfb6
7,091
py
Python
kubernetes/client/models/v1beta1_priority_class_list.py
fsduser/python
2b20069ebc05283352fbdc95bbdca2b6133a4175
[ "Apache-2.0" ]
1
2021-10-15T13:05:45.000Z
2021-10-15T13:05:45.000Z
kubernetes/client/models/v1beta1_priority_class_list.py
belajarqywok/python
b15bea16a87ad03136a4627941ac437582ea4657
[ "Apache-2.0" ]
10
2020-10-01T03:15:01.000Z
2022-03-01T03:06:31.000Z
kubernetes/client/models/v1beta1_priority_class_list.py
belajarqywok/python
b15bea16a87ad03136a4627941ac437582ea4657
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: release-1.19 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 import si...
34.42233
312
0.634466
9f055bcf3403a3484ce832e2291600689663f619
261
py
Python
example/generic/get_exchange_currencies.py
bailzx5522/huobi_Python
d87cb11b44304c32da6e57c8ada8d03ee5fdb0e7
[ "Apache-2.0" ]
611
2019-07-10T08:17:50.000Z
2022-03-21T18:56:39.000Z
example/generic/get_exchange_currencies.py
bailzx5522/huobi_Python
d87cb11b44304c32da6e57c8ada8d03ee5fdb0e7
[ "Apache-2.0" ]
105
2019-07-12T03:43:41.000Z
2022-03-30T10:33:06.000Z
example/generic/get_exchange_currencies.py
bailzx5522/huobi_Python
d87cb11b44304c32da6e57c8ada8d03ee5fdb0e7
[ "Apache-2.0" ]
325
2019-07-12T02:46:54.000Z
2022-03-21T18:56:41.000Z
from huobi.client.generic import GenericClient from huobi.utils import * generic_client = GenericClient() list_obj = generic_client.get_exchange_currencies() LogInfo.output("---- Supported currency ----") for currency in list_obj: LogInfo.output(currency)
29
51
0.785441
ad3a5ef10f3d78e8bccb941eca70cdedef814511
16,545
py
Python
qa/rpc-tests/pruning.py
fujicoin/fujicoin-bitcore
bd4219c284e716c2326ba450cc3288ca691cd8b3
[ "MIT" ]
null
null
null
qa/rpc-tests/pruning.py
fujicoin/fujicoin-bitcore
bd4219c284e716c2326ba450cc3288ca691cd8b3
[ "MIT" ]
null
null
null
qa/rpc-tests/pruning.py
fujicoin/fujicoin-bitcore
bd4219c284e716c2326ba450cc3288ca691cd8b3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Fujicoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test pruning code # ******** # WARNING: # This test uses 4GB of disk space. # This test takes 30 min...
48.377193
167
0.585131
22f41111ed44f921ac6df80c28ca5352817c686e
7,145
py
Python
aiida_cp2k/tests/test_bands.py
dev-zero/aiida-cp2k
99ca8bb29570e8b7feb0abd722becc31b4b0589b
[ "MIT" ]
1
2019-05-20T15:48:55.000Z
2019-05-20T15:48:55.000Z
aiida_cp2k/tests/test_bands.py
dev-zero/aiida-cp2k
99ca8bb29570e8b7feb0abd722becc31b4b0589b
[ "MIT" ]
null
null
null
aiida_cp2k/tests/test_bands.py
dev-zero/aiida-cp2k
99ca8bb29570e8b7feb0abd722becc31b4b0589b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################################### # Copyright (c), The AiiDA-CP2K authors. # # SPDX-License-Identifier: MIT # # AiiDA-CP2K is hosted on GitHub at https://github.com/a...
38.831522
88
0.328202
938edce85adaaf2319afbe3acc37976ef875f8fd
248
py
Python
tests/config.py
socialwifi/flask-oauthres
232b3cccdb566fa1e01d76db752607f8d7b015f0
[ "BSD-3-Clause" ]
4
2017-04-27T09:28:19.000Z
2017-09-04T11:07:51.000Z
tests/config.py
riklaunim/flask-oauthres
e17803d6b6f8974feb3b7ea796155456cd587e87
[ "BSD-3-Clause" ]
4
2017-02-28T10:35:25.000Z
2017-10-27T12:26:53.000Z
tests/config.py
riklaunim/flask-oauthres
e17803d6b6f8974feb3b7ea796155456cd587e87
[ "BSD-3-Clause" ]
2
2017-09-04T11:18:44.000Z
2021-04-19T13:15:32.000Z
DEBUG = 1 TESTING = 1 SECRET_KEY = 'development' OAUTH2_RESOURCE_ID = 'resource_helloworld' OAUTH2_CLIENT_ID = 'helloworld_client' OAUTH2_CLIENT_SECRET = 'helloworld_secret' OAUTH2_CHECK_TOKEN_ENDPOINT_URL = 'https://example.com/oauth/check_token'
31
73
0.822581
f3e5f144436ea8d4c90e60df598fd897142fe81a
1,509
py
Python
edexOsgi/com.raytheon.uf.common.dataplugin.gfe/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/ConfigureTextProductsRequest.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
null
null
null
edexOsgi/com.raytheon.uf.common.dataplugin.gfe/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/ConfigureTextProductsRequest.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
null
null
null
edexOsgi/com.raytheon.uf.common.dataplugin.gfe/pythonPackages/dynamicserialize/dstypes/com/raytheon/uf/common/dataplugin/gfe/request/ConfigureTextProductsRequest.py
srcarter3/awips2
37f31f5e88516b9fd576eaa49d43bfb762e1d174
[ "Apache-2.0" ]
1
2021-10-30T00:03:05.000Z
2021-10-30T00:03:05.000Z
## # This software was developed and / or modified by Raytheon Company, # pursuant to Contract DG133W-05-CQ-1067 with the US Government. # # U.S. EXPORT CONTROLLED TECHNICAL DATA # This software product contains export-restricted data whose # export/transfer/disclosure is restricted by U.S. law. Dissemination # to non...
27.436364
69
0.664016
2cd70d58da717b2917f8aedb06093e38b516da1b
2,118
py
Python
watch-site/main.py
Licsber/notice
79ac322bd342b16cad7c389639d08809f1edcfbe
[ "BSD-3-Clause" ]
3
2020-03-19T07:24:53.000Z
2021-08-24T11:56:02.000Z
watch-site/main.py
BrightMoonInner/notice
79ac322bd342b16cad7c389639d08809f1edcfbe
[ "BSD-3-Clause" ]
1
2021-09-02T09:30:35.000Z
2021-09-02T10:02:38.000Z
watch-site/main.py
BrightMoonInner/notice
79ac322bd342b16cad7c389639d08809f1edcfbe
[ "BSD-3-Clause" ]
1
2021-08-24T11:56:08.000Z
2021-08-24T11:56:08.000Z
import time import sys sys.path.append('..') print(len(sys.path), sys.path) import spider import os os.environ['TZ'] = 'Asia/Shanghai' now_time = time.localtime() now_time = time.strftime('%Y-%m-%d', now_time) def get_url_lists(): result = set() njit = spider.get_html('http://www.njit.edu.cn') jwc = s...
23.533333
96
0.55288
01059b84fb0dcaeb1ace5d20a287b28eb807131a
1,390
py
Python
computer_vision/learning-opencv-practical/image-process-100ask/Question_81_90/answers/answer_81.py
magic428/subjects_notes
6930adbb3f445c11ca9d024abb12a53d6aca19e7
[ "MIT" ]
2
2020-03-18T17:13:00.000Z
2020-03-25T02:34:03.000Z
computer_vision/learning-opencv-practical/image-process-100ask/Question_81_90/answers/answer_81.py
magic428/subjects_notes
6930adbb3f445c11ca9d024abb12a53d6aca19e7
[ "MIT" ]
null
null
null
computer_vision/learning-opencv-practical/image-process-100ask/Question_81_90/answers/answer_81.py
magic428/subjects_notes
6930adbb3f445c11ca9d024abb12a53d6aca19e7
[ "MIT" ]
null
null
null
import cv2 import numpy as np import matplotlib.pyplot as plt # Read image img = cv2.imread("thorino.jpg").astype(np.float32) H, W, C = img.shape ## Grayscale gray = 0.2126 * img[..., 2] + 0.7152 * img[..., 1] + 0.0722 * img[..., 0] gray = gray.astype(np.uint8) ## Sobel sobely = np.array(((1, 2, 1), ...
24.385965
113
0.502878
7b17f9a8db53fe361527626f9d6ae15ee2d64422
6,915
py
Python
hw_07/binary_classification_competition_julius.py
coinflip112/ml_101
9e56ffdb99ac241ed396e25d7f7818a58ee5c4de
[ "MIT" ]
null
null
null
hw_07/binary_classification_competition_julius.py
coinflip112/ml_101
9e56ffdb99ac241ed396e25d7f7818a58ee5c4de
[ "MIT" ]
null
null
null
hw_07/binary_classification_competition_julius.py
coinflip112/ml_101
9e56ffdb99ac241ed396e25d7f7818a58ee5c4de
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # dcfac0e3-1ade-11e8-9de3-00505601122b # 7d179d73-3e93-11e9-b0fd-00505601122b import argparse import lzma import pickle import os import urllib.request import sys import numpy as np import pandas as pd from sklearn.pipeline import Pipeline from sklearn.compose import ColumnTransformer from skl...
38.416667
160
0.699349
7dfbce16d05249d3948eb1548a9aa3352d0a59c3
91
py
Python
mgd/__init__.py
KaiyuYue/mgd
a5f98775963be680a18f9c46f00a116f3803c075
[ "MIT" ]
52
2020-08-23T17:44:26.000Z
2022-03-03T14:57:36.000Z
mgd/__init__.py
KaiyuYue/mgd
a5f98775963be680a18f9c46f00a116f3803c075
[ "MIT" ]
6
2020-08-31T16:59:32.000Z
2021-04-08T00:41:39.000Z
mgd/__init__.py
KaiyuYue/mgd
a5f98775963be680a18f9c46f00a116f3803c075
[ "MIT" ]
13
2020-10-03T07:46:41.000Z
2021-12-04T11:50:57.000Z
from .builder import MGDistiller, SMDistiller from .sampler import ExtraDistributedSampler
30.333333
45
0.868132
c6480bd222842cbb92437b21fd4ec30d0e1a6ea0
777
py
Python
examples/download_by_canvas.py
ConnectionMaster/qgis-earthengine-plugin
dfb7cbaeca856e03ca3560bb52454a1c17ce347a
[ "MIT" ]
307
2018-04-28T02:50:27.000Z
2022-03-31T09:39:25.000Z
examples/download_by_canvas.py
ConnectionMaster/qgis-earthengine-plugin
dfb7cbaeca856e03ca3560bb52454a1c17ce347a
[ "MIT" ]
72
2019-09-18T00:03:00.000Z
2022-01-26T17:33:55.000Z
examples/download_by_canvas.py
ConnectionMaster/qgis-earthengine-plugin
dfb7cbaeca856e03ca3560bb52454a1c17ce347a
[ "MIT" ]
95
2018-05-21T04:12:53.000Z
2022-03-24T11:52:46.000Z
import json import ee from ee_plugin import Map from ee_plugin.contrib import palettes dem = ee.Image('JAXA/ALOS/AW3D30/V2_2').select('AVE_DSM') Map.addLayer(dem, { 'min': 0, 'max': 3000 }, 'DEM', True) # MANUAL STEP: use "Create layer from extent" tool and activate the resulting layer # get first feature geometry f...
25.9
83
0.715573
e88ef980d3519bab16964f224fdfc36c655c5477
33,035
bzl
Python
swift/internal/xcode_swift_toolchain.bzl
thomasvl/rules_swift
df90fbbfd669eab91e4bc994aaeb81239daff314
[ "Apache-2.0" ]
null
null
null
swift/internal/xcode_swift_toolchain.bzl
thomasvl/rules_swift
df90fbbfd669eab91e4bc994aaeb81239daff314
[ "Apache-2.0" ]
null
null
null
swift/internal/xcode_swift_toolchain.bzl
thomasvl/rules_swift
df90fbbfd669eab91e4bc994aaeb81239daff314
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The Bazel 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 applicable la...
37.668187
81
0.649372
d654a950a6461927a0b7b28d0a1294305881d915
7,919
py
Python
antarest/study/storage/rawstudy/model/filesystem/matrix/date_serializer.py
AntaresSimulatorTeam/antaREST
d686d2a86a52737c211ae67f3cee591f559909f2
[ "Apache-2.0" ]
2
2020-09-30T11:40:22.000Z
2020-11-09T09:06:30.000Z
antarest/study/storage/rawstudy/model/filesystem/matrix/date_serializer.py
AntaresSimulatorTeam/antaREST
d686d2a86a52737c211ae67f3cee591f559909f2
[ "Apache-2.0" ]
542
2021-01-11T13:23:47.000Z
2022-03-31T15:38:10.000Z
antarest/study/storage/rawstudy/model/filesystem/matrix/date_serializer.py
AntaresSimulatorTeam/antaREST
d686d2a86a52737c211ae67f3cee591f559909f2
[ "Apache-2.0" ]
1
2020-10-01T12:18:15.000Z
2020-10-01T12:18:15.000Z
import re from abc import ABC, abstractmethod from typing import Tuple import pandas as pd # type: ignore class IDateMatrixSerializer(ABC): """ Abstract class to handle date index reading and writing for many time frequency. Used by OutputSeriesMatrix """ _MONTHS = { "JAN": "01", ...
27.688811
84
0.514459
cd02c6b44d90afde98b5a039a4d575e330bb44dd
1,085
py
Python
src/python/pants/backend/codegen/targets/python_thrift_library.py
qma/pants
604f58a366b66bc5cfa83e7250cb8af8130832cf
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/codegen/targets/python_thrift_library.py
qma/pants
604f58a366b66bc5cfa83e7250cb8af8130832cf
[ "Apache-2.0" ]
null
null
null
src/python/pants/backend/codegen/targets/python_thrift_library.py
qma/pants
604f58a366b66bc5cfa83e7250cb8af8130832cf
[ "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, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.p...
40.185185
93
0.727189
e1763039b3a962a43f2fe3a22c05cb32cba596ed
3,339
py
Python
python/paddle/fluid/contrib/slim/tests/test_filter_pruning.py
ysh329/Paddle
50ad9046c9a440564d104eaa354eb9df83a35678
[ "Apache-2.0" ]
3
2019-07-17T09:30:31.000Z
2021-12-27T03:16:55.000Z
python/paddle/fluid/contrib/slim/tests/test_filter_pruning.py
ysh329/Paddle
50ad9046c9a440564d104eaa354eb9df83a35678
[ "Apache-2.0" ]
1
2019-05-26T14:23:24.000Z
2019-05-26T14:23:51.000Z
python/paddle/fluid/contrib/slim/tests/test_filter_pruning.py
ysh329/Paddle
50ad9046c9a440564d104eaa354eb9df83a35678
[ "Apache-2.0" ]
1
2020-02-21T07:40:27.000Z
2020-02-21T07:40:27.000Z
# copyright (c) 2019 paddlepaddle authors. all rights reserved. # # licensed under the apache license, version 2.0 (the "license"); # you may not use this file except in compliance with the license. # you may obtain a copy of the license at # # http://www.apache.org/licenses/license-2.0 # # unless required by app...
37.1
80
0.642108
649340015599110dc517305fe716af9244ba06fe
28,982
py
Python
torchmetrics/metric.py
BeyondTheProof/metrics
8af688daff819a95f4cb3d757ffc919c86072ee9
[ "Apache-2.0" ]
null
null
null
torchmetrics/metric.py
BeyondTheProof/metrics
8af688daff819a95f4cb3d757ffc919c86072ee9
[ "Apache-2.0" ]
null
null
null
torchmetrics/metric.py
BeyondTheProof/metrics
8af688daff819a95f4cb3d757ffc919c86072ee9
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
40.141274
120
0.634049
44e0b9c37210dc3065329b2885e6634223b96c19
4,905
py
Python
tests/integration/aws_interface/test_aws_interface_get_resources.py
Sam-Martin/cloud-wanderer
1879f9bb150054be5bf33fd46a47414b4939529e
[ "MIT" ]
1
2020-12-07T10:37:41.000Z
2020-12-07T10:37:41.000Z
tests/integration/aws_interface/test_aws_interface_get_resources.py
Sam-Martin/cloud-wanderer
1879f9bb150054be5bf33fd46a47414b4939529e
[ "MIT" ]
null
null
null
tests/integration/aws_interface/test_aws_interface_get_resources.py
Sam-Martin/cloud-wanderer
1879f9bb150054be5bf33fd46a47414b4939529e
[ "MIT" ]
null
null
null
from unittest.mock import ANY import pytest from moto import mock_ec2, mock_iam, mock_sts from itertools import islice from cloudwanderer import URN from cloudwanderer.aws_interface.models import AWSResourceTypeFilter from cloudwanderer.exceptions import UnsupportedResourceTypeError, UnsupportedServiceError from ...p...
33.141892
119
0.543119
f63a6b9ec6cbf2b2af6ac99df17208f1acc95033
1,325
py
Python
src/core/tests/test_admin.py
mho85/recipe-app-api
f08759e0fe15d11ecb18298ece6b2b458fdc68c5
[ "MIT" ]
1
2021-03-29T16:51:49.000Z
2021-03-29T16:51:49.000Z
src/core/tests/test_admin.py
mho85/recipe-app-api
f08759e0fe15d11ecb18298ece6b2b458fdc68c5
[ "MIT" ]
null
null
null
src/core/tests/test_admin.py
mho85/recipe-app-api
f08759e0fe15d11ecb18298ece6b2b458fdc68c5
[ "MIT" ]
null
null
null
from django.test import TestCase, Client from django.contrib.auth import get_user_model from django.urls import reverse class AdminSiteTest(TestCase): def setUp(self): self.client = Client() self.admin_user = get_user_model().objects.create_superuser( email='admin@geeglee.net', ...
30.113636
68
0.633208
3b62089f5f92dc54c055e13570951fa4c6bfccf6
2,937
py
Python
cvxpy/atoms/elementwise/kl_div.py
hashstat/cvxpy
20d667ebe8614821fa38e41b1e333257512d9594
[ "ECL-2.0", "Apache-2.0" ]
1
2022-01-19T05:24:56.000Z
2022-01-19T05:24:56.000Z
cvxpy/atoms/elementwise/kl_div.py
hashstat/cvxpy
20d667ebe8614821fa38e41b1e333257512d9594
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
cvxpy/atoms/elementwise/kl_div.py
hashstat/cvxpy
20d667ebe8614821fa38e41b1e333257512d9594
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
""" Copyright 2013 Steven Diamond Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software...
29.969388
97
0.609465
9f723f1f8c610430878b84865b699bc3bd1e3279
5,775
py
Python
tests/test_utils.py
frdwhite24/frewpy
79368c69b918404e4d1ee5c3a7b6a88cee994d2f
[ "MIT" ]
3
2020-10-02T15:49:44.000Z
2021-11-22T15:39:55.000Z
tests/test_utils.py
frdwhite24/frewpy
79368c69b918404e4d1ee5c3a7b6a88cee994d2f
[ "MIT" ]
1
2020-10-02T09:07:04.000Z
2020-10-02T09:07:04.000Z
tests/test_utils.py
frdwhite24/frewpy
79368c69b918404e4d1ee5c3a7b6a88cee994d2f
[ "MIT" ]
2
2021-04-20T14:43:14.000Z
2021-12-09T10:02:55.000Z
import os import pytest from test_config import TEST_DATA from test_fixtures import json_data, json_data_with_results from frewpy.utils import ( _check_frew_path, check_json_path, load_data, model_to_json, get_titles, get_file_history, get_file_version, get_frew_version, get_num_st...
23.962656
77
0.692814
95542c73265ce46eb8c06a668d11c5e4f6e763d0
18,588
py
Python
ucscsdk/mometa/config/ConfigConsumerCatalogue.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
9
2016-12-22T08:39:25.000Z
2019-09-10T15:36:19.000Z
ucscsdk/mometa/config/ConfigConsumerCatalogue.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
10
2017-01-31T06:59:56.000Z
2021-11-09T09:14:37.000Z
ucscsdk/mometa/config/ConfigConsumerCatalogue.py
parag-may4/ucscsdk
2ea762fa070330e3a4e2c21b46b157469555405b
[ "Apache-2.0" ]
13
2016-11-14T07:42:58.000Z
2022-02-10T17:32:05.000Z
"""This module contains the general information for ConfigConsumerCatalogue ManagedObject.""" from ...ucscmo import ManagedObject from ...ucsccoremeta import UcscVersion, MoPropertyMeta, MoMeta from ...ucscmeta import VersionMeta class ConfigConsumerCatalogueConsts(): ADMIN_STATE_ACTIVE = "active" ADMIN_STAT...
87.267606
2,742
0.756563
9faa2f2d2bdcc850e68efa29a07ca56be8a55572
9,338
py
Python
generate_sync_yaml.py
fat8701/sync_image
05feb9919917f2ec1c5e810a89ec627fc5c0f500
[ "MIT" ]
null
null
null
generate_sync_yaml.py
fat8701/sync_image
05feb9919917f2ec1c5e810a89ec627fc5c0f500
[ "MIT" ]
null
null
null
generate_sync_yaml.py
fat8701/sync_image
05feb9919917f2ec1c5e810a89ec627fc5c0f500
[ "MIT" ]
null
null
null
import os import yaml import requests from distutils.version import LooseVersion # 基本配置 BASE_DIR = os.path.dirname(os.path.abspath(__file__)) CONFIG_FILE = os.path.join(BASE_DIR, 'config.yaml') SYNC_FILE = os.path.join(BASE_DIR, 'sync.yaml') CUSTOM_SYNC_FILE = os.path.join(BASE_DIR, 'custom_sync.yaml') def is_exclud...
28.042042
176
0.604519
53ef379f390891534c3f8ed3cb6b926f6a8b65bc
4,732
py
Python
purity_fb/purity_fb_1dot10/models/smtp.py
mabdelhafez/purity_fb_python_client
a9856875b3df43b4302a2e4addd1a6b71f51f5ce
[ "Apache-2.0" ]
null
null
null
purity_fb/purity_fb_1dot10/models/smtp.py
mabdelhafez/purity_fb_python_client
a9856875b3df43b4302a2e4addd1a6b71f51f5ce
[ "Apache-2.0" ]
null
null
null
purity_fb/purity_fb_1dot10/models/smtp.py
mabdelhafez/purity_fb_python_client
a9856875b3df43b4302a2e4addd1a6b71f51f5ce
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Pure Storage FlashBlade REST 1.10 Python SDK Pure Storage FlashBlade REST 1.10 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/). OpenAPI spec version: 1.10 Contact...
26
205
0.556847
fabe1b135cd247fba6d1e0652050f1af1a1975c2
52,839
py
Python
PV_ICE/main.py
NREL/PV_ICE
8ed90857199ede4d66d155f0a193236a5fe07e0b
[ "BSD-3-Clause" ]
12
2021-01-28T13:44:16.000Z
2022-03-20T07:28:48.000Z
PV_ICE/main.py
NREL/PV_ICE
8ed90857199ede4d66d155f0a193236a5fe07e0b
[ "BSD-3-Clause" ]
6
2020-12-22T21:12:54.000Z
2021-09-24T19:50:15.000Z
PV_ICE/main.py
NREL/PV_ICE
8ed90857199ede4d66d155f0a193236a5fe07e0b
[ "BSD-3-Clause" ]
1
2021-03-24T14:34:01.000Z
2021-03-24T14:34:01.000Z
# -*- coding: utf-8 -*- """ Main.py contains the functions to calculate the different quantities of materials in each step of the process. Reffer to the diagram on Package-Overview for the steps considered. Support functions include Weibull functions for reliability and failure; also, functions to modify baseline v...
47.389238
184
0.539147
483f39a3038df58bb4eb40c95d9192d8d2038e45
1,918
py
Python
option.py
hoya012/captum-tutorials-pytorch
ab8cace9a1457a74cadfe6671598237a4d389cc0
[ "MIT" ]
22
2020-10-21T08:03:35.000Z
2022-03-08T16:07:27.000Z
option.py
hoya012/captum-tutorials-pytorch
ab8cace9a1457a74cadfe6671598237a4d389cc0
[ "MIT" ]
2
2021-01-29T11:09:47.000Z
2022-01-06T14:40:41.000Z
option.py
hoya012/captum-tutorials-pytorch
ab8cace9a1457a74cadfe6671598237a4d389cc0
[ "MIT" ]
5
2020-10-22T04:32:07.000Z
2022-01-14T17:09:46.000Z
import argparse def get_args(): parser = argparse.ArgumentParser() # model architecture & checkpoint parser.add_argument('--model', default='ResNet18', choices=('ResNet18', 'ResNet50'), help='optimizer to use (ResNet18 | ResNet50)') parser.add_argument('--norm', default='batchn...
47.95
121
0.679353
287e4996fe6eedecc512558093fb96c80de68774
5,519
py
Python
pretrain/pretrain_tape.py
IC-hub/ProteinLM
58fbf1f674569cf814becf32f71dd0d8f0c592fa
[ "Apache-2.0" ]
59
2021-05-11T03:41:30.000Z
2022-03-02T19:16:18.000Z
pretrain/pretrain_tape.py
YijiaShaw/ProteinLM
fda4f381b4b974721b187cece968dd7bc96a81f4
[ "Apache-2.0" ]
7
2021-05-22T11:17:39.000Z
2022-02-26T01:07:40.000Z
pretrain/pretrain_tape.py
YijiaShaw/ProteinLM
fda4f381b4b974721b187cece968dd7bc96a81f4
[ "Apache-2.0" ]
13
2021-05-06T01:27:17.000Z
2021-09-09T02:23:06.000Z
# coding=utf-8 # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # Copyright (c) 2021, Knowledge Engineering Group (KEG), Tsinghua University # Modified by Jiezhong Qiu # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
33.858896
105
0.69904
fd93fe0901886d30c237997e726a37a9e4ef7a8c
3,343
py
Python
src/olympia/conf/prod/settings.py
petercpg/addons-server
892e442ee61fe2592f19969357ed5d40a9e9fb2e
[ "BSD-3-Clause" ]
3
2020-03-05T18:17:14.000Z
2020-03-09T01:24:38.000Z
src/olympia/conf/prod/settings.py
petercpg/addons-server
892e442ee61fe2592f19969357ed5d40a9e9fb2e
[ "BSD-3-Clause" ]
null
null
null
src/olympia/conf/prod/settings.py
petercpg/addons-server
892e442ee61fe2592f19969357ed5d40a9e9fb2e
[ "BSD-3-Clause" ]
null
null
null
import logging from olympia.lib.settings_base import * # noqa ENGAGE_ROBOTS = True EMAIL_URL = env.email_url('EMAIL_URL') EMAIL_HOST = EMAIL_URL['EMAIL_HOST'] EMAIL_PORT = EMAIL_URL['EMAIL_PORT'] EMAIL_BACKEND = EMAIL_URL['EMAIL_BACKEND'] EMAIL_HOST_USER = EMAIL_URL['EMAIL_HOST_USER'] EMAIL_HOST_PASSWORD = EMAIL_U...
29.584071
92
0.700867
b4ebf73a51caa7bd394a79d2a4acda8884cfa14c
433
py
Python
server/support/multithreadSupport.py
BernardoGO/PUCPyWS
8daecc5205ee00260b7320104e95b84e38ce9fdf
[ "Unlicense", "MIT" ]
12
2015-03-03T00:34:33.000Z
2018-10-03T18:56:43.000Z
server/support/multithreadSupport.py
BernardoGO/PUCPyWS
8daecc5205ee00260b7320104e95b84e38ce9fdf
[ "Unlicense", "MIT" ]
null
null
null
server/support/multithreadSupport.py
BernardoGO/PUCPyWS
8daecc5205ee00260b7320104e95b84e38ce9fdf
[ "Unlicense", "MIT" ]
null
null
null
__author__ = 'bernardogo' import sys if sys.version_info >= (3, 0): from socketserver import ThreadingMixIn from http.server import HTTPServer as http else: from SocketServer import ThreadingMixIn from BaseHTTPServer import HTTPServer as http class ThreadedHTTPServer(ThreadingMixIn, http): """ Th...
30.928571
66
0.750577
986e3de5d3c075dfd552bfec824e5f119844d0e5
2,333
py
Python
tools/SDKTool/libs/customDialog.py
BernhardRiemann/GameAISDK
da24c600e1cdc890739ee274032a17fb9ce75c5c
[ "Apache-2.0" ]
3
2021-03-15T13:53:37.000Z
2021-11-17T10:34:29.000Z
tools/SDKTool/libs/customDialog.py
VenmoTools/GameAISDK
208320760440400d369aa8ab2f2439494195e6bd
[ "Apache-2.0" ]
null
null
null
tools/SDKTool/libs/customDialog.py
VenmoTools/GameAISDK
208320760440400d369aa8ab2f2439494195e6bd
[ "Apache-2.0" ]
1
2021-02-19T12:04:05.000Z
2021-02-19T12:04:05.000Z
''' 自定义的确认弹框,labelimg中的代码 代码链接:https://github.com/tzutalin/labelImg/tree/master/libs ''' try: from PyQt5.QtGui import * from PyQt5.QtCore import * from PyQt5.QtWidgets import * except ImportError: from PyQt4.QtGui import * from PyQt4.QtCore import * from libs.utils import newIcon, labelVal...
30.697368
76
0.625804
ff2cfb7fed92baaed3ef382ee1a5c9ba4c7c6e08
1,973
py
Python
sys/2/common.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2017-12-12T13:58:08.000Z
2017-12-12T13:58:08.000Z
sys/2/common.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
null
null
null
sys/2/common.py
wittrup/crap
a77474588fd54a5a998e24df7b1e6e2ab473ded1
[ "MIT" ]
1
2019-11-03T10:16:35.000Z
2019-11-03T10:16:35.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import json import os.path def is_non_zero_file(fpath): return os.path.isfile(fpath) and os.path.getsize(fpath) > 0 def jsloifex(filename, default={}): # JSON load if exists return json.load(open(filename, encoding='utf-8')) if is_non_zero_file(filename) else ...
34.614035
98
0.563102
04b12243d95ede2c445de8404269efe36067e1b3
1,091
py
Python
Course 01 - Getting Started with Python/Extra Studies/Basics/ex011.py
marcoshsq/python_practical_exercises
77136cd4bc0f34acde3380ffdc5af74f7a960670
[ "MIT" ]
9
2022-03-22T16:45:17.000Z
2022-03-25T20:22:35.000Z
Course 01 - Getting Started with Python/Extra Studies/Basics/ex011.py
marcoshsq/python_practical_exercises
77136cd4bc0f34acde3380ffdc5af74f7a960670
[ "MIT" ]
null
null
null
Course 01 - Getting Started with Python/Extra Studies/Basics/ex011.py
marcoshsq/python_practical_exercises
77136cd4bc0f34acde3380ffdc5af74f7a960670
[ "MIT" ]
3
2022-03-22T17:03:38.000Z
2022-03-29T17:20:55.000Z
# Extra Exercise 010 """Make a program that asks how much you earn per hour and the number of hours worked in the month. Calculate and show the total of your salary in that month, knowing that 11% is deducted for Income Tax, 8% for the INSS and 5% for the union, make a program that gives us: a) gross salary. b) how m...
32.088235
103
0.706691
b7f60eba7ebdbee027fb13c875a97229f228cb47
1,189
py
Python
molecule/resources/tests/test_docker_engine.py
Penbase/ansible-dockerswarm
579f802ec3b97a6a57f1362fdea04006d13b4ee2
[ "MIT" ]
269
2016-07-07T05:03:17.000Z
2022-03-14T13:36:49.000Z
molecule/resources/tests/test_docker_engine.py
Penbase/ansible-dockerswarm
579f802ec3b97a6a57f1362fdea04006d13b4ee2
[ "MIT" ]
77
2016-09-01T17:30:14.000Z
2022-02-21T16:31:26.000Z
molecule/resources/tests/test_docker_engine.py
Penbase/ansible-dockerswarm
579f802ec3b97a6a57f1362fdea04006d13b4ee2
[ "MIT" ]
148
2016-09-07T15:40:13.000Z
2022-03-19T21:49:14.000Z
import os import testinfra.utils.ansible_runner testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner( os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all') debian_os = ['debian', 'ubuntu'] rhel_os = ['redhat', 'centos'] def test_docker_ce_config(host): d = host.file('/etc/docker') assert d....
23.78
70
0.682927
8bebbadb1ff46fbfe8717dedeb3bc62229e18510
1,530
py
Python
Game24/Game24.py
ttkaixin1998/pikachupythongames
609a3a5a2be3f5a187c332c7980bb5bb14548f02
[ "MIT" ]
4,013
2018-06-16T08:00:02.000Z
2022-03-30T11:48:14.000Z
Game24/Game24.py
pigbearcat/Games
b8c47ef1bcce9a9db3f3730c162e6e8e08b508a2
[ "MIT" ]
22
2018-10-18T00:15:50.000Z
2022-01-13T08:16:15.000Z
Game24/Game24.py
pigbearcat/Games
b8c47ef1bcce9a9db3f3730c162e6e8e08b508a2
[ "MIT" ]
2,172
2018-07-20T04:03:14.000Z
2022-03-31T14:18:29.000Z
''' Function: 贪吃蛇小游戏 Author: Charles 微信公众号: Charles的皮卡丘 ''' import cfg import sys import pygame from modules import * '''主函数''' def main(cfg): # 游戏初始化 pygame.init() screen = pygame.display.set_mode(cfg.SCREENSIZE) pygame.display.set_caption('Greedy Snake —— Charles的皮卡丘') clock = pygame...
25.5
141
0.572549
07a63f4272f84ac5fe8af26fd69874c7fef5f393
1,631
py
Python
books/admin.py
tas09009/django-back
7c3f181a6658c771e155393736909f176db878c4
[ "MIT" ]
null
null
null
books/admin.py
tas09009/django-back
7c3f181a6658c771e155393736909f176db878c4
[ "MIT" ]
null
null
null
books/admin.py
tas09009/django-back
7c3f181a6658c771e155393736909f176db878c4
[ "MIT" ]
3
2021-01-27T04:24:51.000Z
2021-03-11T18:56:22.000Z
from django.contrib import admin from django import forms from .models import Book, Category, User, BookCategory, UserHistory class BookAdminForm(forms.ModelForm): class Meta: model = Book fields = '__all__' class CategoryAdminForm(forms.ModelForm): class Meta: model = Cate...
22.342466
67
0.688535
efc226c9378c9caaecd82c5f06ec7863ac94a5ba
515
py
Python
NoSQL/query_dynamodb.py
JSJeong-me/KOSA_BIGDATA_DEEPLEARNONG
5126befee247c33afedcba4ce72d1a000e25a218
[ "MIT" ]
null
null
null
NoSQL/query_dynamodb.py
JSJeong-me/KOSA_BIGDATA_DEEPLEARNONG
5126befee247c33afedcba4ce72d1a000e25a218
[ "MIT" ]
null
null
null
NoSQL/query_dynamodb.py
JSJeong-me/KOSA_BIGDATA_DEEPLEARNONG
5126befee247c33afedcba4ce72d1a000e25a218
[ "MIT" ]
1
2022-02-15T04:41:38.000Z
2022-02-15T04:41:38.000Z
import boto3 from boto3.dynamodb.conditions import Key ID = '' ID_KEY = '' tableName = 'users' dynamodb = boto3.resource('dynamodb', region_name='ap-northeast-1',aws_access_key_id=ID, aws_secret_access_key=ID_KEY) table = dynamodb.Table(tableName) #Get all users with last name of Johnson johnsons = table.scan( ...
21.458333
118
0.743689
1726bd36c4b69ba6d860e101ba10423b487067c5
358
py
Python
balutils/CatalogFeature/Mcal.py
mattkwiecien/balutils
9dcd5419a796e23df671fc4dc22c78cf7e2c61fc
[ "MIT" ]
null
null
null
balutils/CatalogFeature/Mcal.py
mattkwiecien/balutils
9dcd5419a796e23df671fc4dc22c78cf7e2c61fc
[ "MIT" ]
null
null
null
balutils/CatalogFeature/Mcal.py
mattkwiecien/balutils
9dcd5419a796e23df671fc4dc22c78cf7e2c61fc
[ "MIT" ]
null
null
null
from balutils.CatalogFeature import SimpleCatalog # TODO class Mcal(SimpleCatalog): """ Adds Mcal catalog functionality to the catalog. """ def applyTo(self, catalog: Catalog) -> None: # First, call the parent feature method self.parent.applyTo(catalog) # TODO implemen...
25.571429
51
0.659218
fa355f675d1a55b6059fe41eeef13cd72d252397
11,102
py
Python
log_stacker/log_stacker.py
Ron-Chang/LogStacker
abd92842969773949d2b36eeb4313843081339eb
[ "MIT" ]
null
null
null
log_stacker/log_stacker.py
Ron-Chang/LogStacker
abd92842969773949d2b36eeb4313843081339eb
[ "MIT" ]
null
null
null
log_stacker/log_stacker.py
Ron-Chang/LogStacker
abd92842969773949d2b36eeb4313843081339eb
[ "MIT" ]
null
null
null
import logging import os import sys import traceback from datetime import datetime from logging.handlers import TimedRotatingFileHandler class Dyer: _RESETALL = '\x1b[0m' _STYLE = '\x1b[{style}' _FG = '3{fg}' _BG = '4{bg}' class Style: NORMAL = 0 BOLD = 1 DARK = 2 ...
30.924791
122
0.635111
dba119143164a9548ef911a7c26c94512bd82578
746
py
Python
cflearn/constants.py
carefree0910/carefree-learn
2043812afbe9c56f01ec1639961736313ee062ba
[ "MIT" ]
400
2020-07-05T18:55:49.000Z
2022-02-21T02:33:08.000Z
cflearn/constants.py
carefree0910/carefree-learn
2043812afbe9c56f01ec1639961736313ee062ba
[ "MIT" ]
82
2020-08-01T13:29:38.000Z
2021-10-09T07:13:44.000Z
cflearn/constants.py
carefree0910/carefree-learn
2043812afbe9c56f01ec1639961736313ee062ba
[ "MIT" ]
34
2020-07-05T21:15:34.000Z
2021-12-20T08:45:17.000Z
import os from cftool.misc import LoggingMixin INFO_PREFIX = LoggingMixin.info_prefix ERROR_PREFIX = LoggingMixin.error_prefix WARNING_PREFIX = LoggingMixin.warning_prefix TIME_FORMAT = "%Y-%m-%d_%H-%M-%S-%f" LOSS_KEY = "loss" INPUT_KEY = "input" LATENT_KEY = "latent" PREDICTIONS_KEY = "predictions" LABEL_KEY = "la...
24.866667
77
0.772118
cf2fc8a8040abcd62dfc1f824197900b6c56eadd
12,942
py
Python
play.py
wq1977/garamaker
7240dd13687eaf2eced9f12f41f73325e8aceb14
[ "MIT" ]
1
2020-04-03T00:55:15.000Z
2020-04-03T00:55:15.000Z
play.py
wq1977/garamaker
7240dd13687eaf2eced9f12f41f73325e8aceb14
[ "MIT" ]
null
null
null
play.py
wq1977/garamaker
7240dd13687eaf2eced9f12f41f73325e8aceb14
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #!/usr/bin/python import requests,sys,argparse bpm=90 hexuan={} play="吉他" target="" beats=0 record=False totalbeats = 0 debug=False checkGrammar=True hexianSequences = [] needFix={} puhao=1 gangqinDiao=0 format='lily' def parse(path): global bpm,hexuan,play,target,beats,totalbeats,checkGramm...
33.968504
124
0.54922
a2054f9358237c5c3b8b6bf5d9bc9d160c3de369
13,272
py
Python
src/capture/realsense/cameras.py
hobbitsyfeet/3DMeasure
829dbc4e9a1974064ed7baa221c765c3c9123834
[ "MIT" ]
6
2020-01-14T14:37:31.000Z
2021-12-16T19:45:29.000Z
src/capture/realsense/cameras.py
hobbitsyfeet/3DMeasure
829dbc4e9a1974064ed7baa221c765c3c9123834
[ "MIT" ]
null
null
null
src/capture/realsense/cameras.py
hobbitsyfeet/3DMeasure
829dbc4e9a1974064ed7baa221c765c3c9123834
[ "MIT" ]
null
null
null
import pyrealsense2 as rs import numpy as np import cv2 import open3d as o3d import argparse import os from time import strftime #from cv_track import track import zipfile parser = argparse.ArgumentParser() parser.add_argument('--all_filters', type=bool, default=False, help='Enables all post-processing filters to enha...
37.597734
184
0.699367
a4402c0e32a9316b9476f6b4bd1488c2733e1a94
1,557
py
Python
tests/test_commands.py
adamchainz/sentinelhub-py
d7ad283cf9d4bd4c8c1a8b169cdbe37c5bc8208a
[ "MIT" ]
573
2018-01-15T21:44:59.000Z
2022-03-27T22:03:37.000Z
tests/test_commands.py
adamchainz/sentinelhub-py
d7ad283cf9d4bd4c8c1a8b169cdbe37c5bc8208a
[ "MIT" ]
189
2018-01-23T14:35:34.000Z
2022-03-24T15:44:04.000Z
tests/test_commands.py
adamchainz/sentinelhub-py
d7ad283cf9d4bd4c8c1a8b169cdbe37c5bc8208a
[ "MIT" ]
193
2018-01-16T09:31:47.000Z
2022-03-29T07:11:42.000Z
import subprocess import os import pytest from sentinelhub.testing_utils import get_output_folder OUTPUT_FOLDER = get_output_folder(__file__) COMPACT_PRODUCT_ID = 'S2A_MSIL1C_20170414T003551_N0204_R016_T54HVH_20170414T003551' OLD_PRODUCT_ID = 'S2A_OPER_PRD_MSIL1C_PDMC_20160121T043931_R069_V20160103T171947_20160103T1...
47.181818
115
0.763648
8b4aaa573e7cab675b2cce4597f210de697666a3
405
py
Python
cogs/example.py
St0pcha/discord-bot-skeleton-py
d983eac8185c01bc91b4cf4834d57193c83de199
[ "Unlicense" ]
5
2021-04-03T06:59:14.000Z
2021-07-01T15:39:45.000Z
cogs/example.py
St0pcha/discord-bot-skeleton-py
d983eac8185c01bc91b4cf4834d57193c83de199
[ "Unlicense" ]
null
null
null
cogs/example.py
St0pcha/discord-bot-skeleton-py
d983eac8185c01bc91b4cf4834d57193c83de199
[ "Unlicense" ]
null
null
null
import config import discord from discord.ext import commands class CogName(commands.Cog): def __init__(self, bot): self.bot = bot @commands.Cog.listener() # bot event async def on_ready(self): print("Bot is ready!") @commands.command() # bot command async def test(self, ctx): ...
19.285714
40
0.634568
b0f4213bcd86a70f39d63214aa55381440796b68
8,184
py
Python
generate.py
abodacs/hardware-aware-transformers
35d12828fb9e8e7a184adaa4caa187bef3a94be2
[ "MIT" ]
1
2020-11-22T12:33:58.000Z
2020-11-22T12:33:58.000Z
generate.py
abodacs/hardware-aware-transformers
35d12828fb9e8e7a184adaa4caa187bef3a94be2
[ "MIT" ]
null
null
null
generate.py
abodacs/hardware-aware-transformers
35d12828fb9e8e7a184adaa4caa187bef3a94be2
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 -u # Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. """ Translate pre-processed data with a trained model. """ import torch from fairseq import bleu, checkpoint_utils,...
38.603774
122
0.601051
2bd90dadd16534e6a4478d69f3f43025ac7beee2
4,675
py
Python
infra/bots/recipes/perf_canvaskit.py
jonhpark7966/skia
39d16248f5a7d1692cec49847052cf3a5b420ff1
[ "BSD-3-Clause" ]
1
2019-02-12T19:10:24.000Z
2019-02-12T19:10:24.000Z
infra/bots/recipes/perf_canvaskit.py
jonhpark7966/skia
39d16248f5a7d1692cec49847052cf3a5b420ff1
[ "BSD-3-Clause" ]
null
null
null
infra/bots/recipes/perf_canvaskit.py
jonhpark7966/skia
39d16248f5a7d1692cec49847052cf3a5b420ff1
[ "BSD-3-Clause" ]
1
2019-02-14T01:00:16.000Z
2019-02-14T01:00:16.000Z
# Copyright 2018 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. # Recipe which runs the PathKit tests using docker DEPS = [ 'checkout', 'infra', 'recipe_engine/file', 'recipe_engine/path', 'recipe_engine/proper...
32.692308
82
0.620321
6496c8b7f561e604062dd8b44bc0473d4c271d02
10,704
py
Python
tools/dependency/cve_scan.py
terorie/envoy
7e3b483bbb004bf2b8234e3ec2be6ceef254a2f9
[ "Apache-2.0" ]
1
2020-12-28T15:03:17.000Z
2020-12-28T15:03:17.000Z
tools/dependency/cve_scan.py
terorie/envoy
7e3b483bbb004bf2b8234e3ec2be6ceef254a2f9
[ "Apache-2.0" ]
8
2020-12-28T15:16:39.000Z
2021-06-02T03:45:06.000Z
tools/dependency/cve_scan.py
terorie/envoy
7e3b483bbb004bf2b8234e3ec2be6ceef254a2f9
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # Scan for any external dependencies that were last updated before known CVEs # (and near relatives). We also try a fuzzy match on version information. from collections import defaultdict, namedtuple import datetime as dt import gzip import json import re import sys import textwrap import urlli...
36.162162
100
0.703008
bd98f5bc93198dbd9e86cf297b078bc0f005d6ae
5,709
py
Python
train.py
nvvaulin/medical_imaging
ff00fc43ac0edcfb2151478f89e6c82be40af433
[ "Apache-2.0" ]
null
null
null
train.py
nvvaulin/medical_imaging
ff00fc43ac0edcfb2151478f89e6c82be40af433
[ "Apache-2.0" ]
null
null
null
train.py
nvvaulin/medical_imaging
ff00fc43ac0edcfb2151478f89e6c82be40af433
[ "Apache-2.0" ]
null
null
null
from config import ex import pytorch_lightning as pl from pytorch_lightning.callbacks import EarlyStopping import models from utils.existed_checkpoint import ExistedModelCheckpoint import datasets from pytorch_lightning import loggers as pl_loggers from torchvision import transforms from torch.utils.data import DataLoa...
47.181818
195
0.705728
171cef4a7b916f79ebb8f28a5288a314da176bae
938
py
Python
501.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
501.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
501.py
wilbertgeng/LeetCode_exercise
f00c08e0d28ffa88d61d4262c6d1f49f1fa91ebc
[ "MIT" ]
null
null
null
"""501. Find Mode in Binary Search Tree""" # Definition for a binary tree node. # class TreeNode(object): # def __init__(self, val=0, left=None, right=None): # self.val = val # self.left = left # self.right = right class Solution(object): def findMode(self, root): """ :t...
22.333333
55
0.464819
2d41625d6b606d3887aa36d96dda77bf937aa3d7
6,590
py
Python
docs/source/conf.py
stanwood/alexa-skill
cb28475d25c0ce2b78f0569eb7e94b4759cbb1b1
[ "MIT" ]
5
2018-09-28T08:19:48.000Z
2018-10-09T11:46:41.000Z
docs/source/conf.py
stanwood/alexa-skill
cb28475d25c0ce2b78f0569eb7e94b4759cbb1b1
[ "MIT" ]
1
2018-12-27T15:21:55.000Z
2021-05-29T19:47:51.000Z
docs/source/conf.py
stanwood/alexa-skill
cb28475d25c0ce2b78f0569eb7e94b4759cbb1b1
[ "MIT" ]
null
null
null
# The MIT License (MIT) # # Copyright (c) 2018 stanwood GmbH # # 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, m...
32.146341
79
0.673141
f4b5ef14789a6dfd6876207867fb5770ddbb3848
2,239
py
Python
backend/app/model/questionnaires/chain_questionnaire.py
sartography/star-drive
c0f33378d42913c3e677e07f74eb46d7b2b82a0a
[ "MIT" ]
null
null
null
backend/app/model/questionnaires/chain_questionnaire.py
sartography/star-drive
c0f33378d42913c3e677e07f74eb46d7b2b82a0a
[ "MIT" ]
368
2018-12-18T14:43:20.000Z
2022-03-02T02:54:18.000Z
backend/app/model/questionnaires/chain_questionnaire.py
sartography/star-drive
c0f33378d42913c3e677e07f74eb46d7b2b82a0a
[ "MIT" ]
2
2019-10-02T03:06:06.000Z
2020-10-05T16:53:48.000Z
from marshmallow import pre_load from sqlalchemy import func from sqlalchemy.ext.declarative import declared_attr from app import db, ma from app.export_service import ExportService from app.model.questionnaires.chain_session import ChainSessionSchema, ChainSession from app.schema.model_schema import ModelSchema cla...
30.671233
97
0.623493
47ef5220745668ee9dc31fa589c0eb23da7c3bb8
6,157
py
Python
qiskit/circuit/library/standard_gates/y.py
SpinQTech/SpinQKit
2e24826688b2b26cf7efa66fd47f0e7ef883a96c
[ "Apache-2.0" ]
2
2021-12-20T05:19:44.000Z
2021-12-20T05:21:48.000Z
qiskit/circuit/library/standard_gates/y.py
SpinQTech/SpinQKit
2e24826688b2b26cf7efa66fd47f0e7ef883a96c
[ "Apache-2.0" ]
null
null
null
qiskit/circuit/library/standard_gates/y.py
SpinQTech/SpinQKit
2e24826688b2b26cf7efa66fd47f0e7ef883a96c
[ "Apache-2.0" ]
1
2021-12-20T05:20:35.000Z
2021-12-20T05:20:35.000Z
# This code is part of Qiskit. # # (C) Copyright IBM 2017. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or deriv...
30.480198
100
0.520058
6b70333081fc5f7c5e18def4b6e8b0e409c28738
2,639
py
Python
src/main/python/parse/tree_sitter/aw_tree_sitter/ast.py
sarveshbhatnagar/astminer
e240162942aaf6fcd0c54a2396d4a179e85d4a4b
[ "MIT" ]
36
2019-03-27T16:05:33.000Z
2019-11-21T19:58:58.000Z
src/main/python/parse/tree_sitter/aw_tree_sitter/ast.py
vovak/pathminer
5692fa522863b76b0fe2260a075cdba402fe1122
[ "MIT" ]
26
2019-03-11T13:46:18.000Z
2019-11-22T13:58:02.000Z
src/main/python/parse/tree_sitter/aw_tree_sitter/ast.py
vovak/pathminer
5692fa522863b76b0fe2260a075cdba402fe1122
[ "MIT" ]
17
2019-03-12T20:07:55.000Z
2019-11-23T02:50:47.000Z
from tree_sitter import TreeCursor from typing import Optional, TypedDict, List Position = TypedDict("Position", {"l": int, "c": int}) NodeRange = TypedDict("NodeRange", {"start": Position, "end": Position}) NodeAsDict = TypedDict( "NodeAsDict", {"token": Optional[str], "nodeType": str, "range": NodeRange, "childr...
35.186667
106
0.571808
71a7a53a444487ab61b8c7e61e67400244403af0
11,331
py
Python
src/foolscap/appserver/client.py
jaraco/foolscap
845bea550447991b194ef884713a7b3be4b4a6c2
[ "MIT" ]
29
2015-01-05T19:37:27.000Z
2021-03-03T21:59:13.000Z
src/foolscap/appserver/client.py
jaraco/foolscap
845bea550447991b194ef884713a7b3be4b4a6c2
[ "MIT" ]
65
2015-03-01T03:18:03.000Z
2022-03-24T16:00:48.000Z
src/foolscap/appserver/client.py
jaraco/foolscap
845bea550447991b194ef884713a7b3be4b4a6c2
[ "MIT" ]
22
2015-01-28T10:51:46.000Z
2022-01-26T07:56:25.000Z
from __future__ import print_function, unicode_literals import six import os, sys from io import BytesIO from twisted.python import usage from twisted.internet import defer # does "flappserver start" need us to refrain from importing the reactor here? import foolscap from foolscap.api import Tub, Referenceable, fireEv...
37.39604
93
0.64628
f3ba33898891601186655df4f65210004ddb2d04
3,308
py
Python
server/greenlite/settings.py
aoswalt/greenlite-hardware
056ed78829519f49adab60dbcf67878243fe764e
[ "MIT" ]
null
null
null
server/greenlite/settings.py
aoswalt/greenlite-hardware
056ed78829519f49adab60dbcf67878243fe764e
[ "MIT" ]
1
2016-11-01T23:55:07.000Z
2016-11-01T23:55:07.000Z
server/greenlite/settings.py
aoswalt/greenlite-hardware
056ed78829519f49adab60dbcf67878243fe764e
[ "MIT" ]
null
null
null
""" Django settings for greenlite project. Generated by 'django-admin startproject' using Django 1.10. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ import os...
25.251908
91
0.696493
9ef11a7b275548648ca1e7d9d7451ca9d6f3ffd0
809
py
Python
django/urls.py
Sravan996/django
3a982382d5cfe9bfb498534f1effcf58a3771539
[ "MIT" ]
null
null
null
django/urls.py
Sravan996/django
3a982382d5cfe9bfb498534f1effcf58a3771539
[ "MIT" ]
null
null
null
django/urls.py
Sravan996/django
3a982382d5cfe9bfb498534f1effcf58a3771539
[ "MIT" ]
null
null
null
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based ...
33.708333
77
0.70581
6f9b6d22aa9971a64955c32c64852367eb09e181
1,110
py
Python
blog/migrations/0006_auto_20191214_1618.py
vijay-chauhan07/Xtension
288c4d4f57428d07ca06874e9ff1c1844fdb915a
[ "MIT" ]
1
2020-01-12T13:11:19.000Z
2020-01-12T13:11:19.000Z
blog/migrations/0006_auto_20191214_1618.py
vijay-chauhan07/Xtension
288c4d4f57428d07ca06874e9ff1c1844fdb915a
[ "MIT" ]
11
2020-06-05T20:40:43.000Z
2022-03-12T00:17:09.000Z
blog/migrations/0006_auto_20191214_1618.py
vijay-chauhan07/Xtension
288c4d4f57428d07ca06874e9ff1c1844fdb915a
[ "MIT" ]
null
null
null
# Generated by Django 3.0 on 2019-12-14 10:48 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('blog', '0005_auto_20191213...
34.6875
152
0.620721
b0861a770ea55ce870e351f90f978959e4b0f5d2
5,744
py
Python
utils.py
deadrobots/BoVot-17
ac9795f92207dd6b6689cce9a5d588b89985a652
[ "MIT" ]
null
null
null
utils.py
deadrobots/BoVot-17
ac9795f92207dd6b6689cce9a5d588b89985a652
[ "MIT" ]
null
null
null
utils.py
deadrobots/BoVot-17
ac9795f92207dd6b6689cce9a5d588b89985a652
[ "MIT" ]
null
null
null
''' Created on Jan 3, 2016 @author: graysonelias ''' ''' This module provides some of our standard methods. ''' import constants as c from wallaby import ao from wallaby import msleep from wallaby import digital from wallaby import seconds from wallaby import freeze from wallaby import set_servo_position from wallab...
24.236287
122
0.649547
0f6241bea5e71933f241c8b019263601035236d5
55,829
py
Python
sanic/app.py
Lin0818/sanic
0cb342aef4c8cfd8a7287f800dc9a3487b1360ca
[ "MIT" ]
null
null
null
sanic/app.py
Lin0818/sanic
0cb342aef4c8cfd8a7287f800dc9a3487b1360ca
[ "MIT" ]
null
null
null
sanic/app.py
Lin0818/sanic
0cb342aef4c8cfd8a7287f800dc9a3487b1360ca
[ "MIT" ]
null
null
null
from __future__ import annotations import asyncio import logging import logging.config import re import sys from asyncio import ( AbstractEventLoop, CancelledError, Task, ensure_future, get_event_loop, get_running_loop, wait_for, ) from asyncio.futures import Future from collections import...
35.201135
82
0.537946
7b8130579c4b47314b47945a7086d14797f89307
3,745
py
Python
shop/settings2.py
bifnavent/tiendaroxy
232264a3dff710bca2847af167b2ed950c01c183
[ "MIT" ]
null
null
null
shop/settings2.py
bifnavent/tiendaroxy
232264a3dff710bca2847af167b2ed950c01c183
[ "MIT" ]
null
null
null
shop/settings2.py
bifnavent/tiendaroxy
232264a3dff710bca2847af167b2ed950c01c183
[ "MIT" ]
null
null
null
""" Django settings for shop project. Generated by 'django-admin startproject' using Django 3.2. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ from pathlib impo...
24.966667
91
0.71482
e01b7630e7623dc547ffd1b22eb4b55063f8f489
10,630
py
Python
mmdet/exp/yolox/yolox_base_coco.py
jie311/miemiedetection
b0e7a45717fe6c9cf9bf3c0f47d47a2e6c68b1b6
[ "Apache-2.0" ]
65
2021-12-30T03:30:52.000Z
2022-03-25T01:44:32.000Z
mmdet/exp/yolox/yolox_base_coco.py
jie311/miemiedetection
b0e7a45717fe6c9cf9bf3c0f47d47a2e6c68b1b6
[ "Apache-2.0" ]
1
2021-12-31T01:51:35.000Z
2022-01-01T14:42:37.000Z
mmdet/exp/yolox/yolox_base_coco.py
jie311/miemiedetection
b0e7a45717fe6c9cf9bf3c0f47d47a2e6c68b1b6
[ "Apache-2.0" ]
7
2021-12-31T09:25:06.000Z
2022-03-10T01:25:09.000Z
#!/usr/bin/env python3 # -*- coding:utf-8 -*- # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. import os import sys import random import torch import torch.distributed as dist import torch.nn as nn from mmdet.exp.datasets.coco_base import COCOBaseExp class YOLOXExp(COCOBaseExp): def __init__(self): ...
35.198675
121
0.567262
6ce12143a54647c9f0a9f518fdb15a04046c1d39
62,471
py
Python
Tests/test_bytes.py
elfscript/ironpython3
fde41d69ff178e60b33b68752e0ea8ba8f5e45e7
[ "Apache-2.0" ]
null
null
null
Tests/test_bytes.py
elfscript/ironpython3
fde41d69ff178e60b33b68752e0ea8ba8f5e45e7
[ "Apache-2.0" ]
null
null
null
Tests/test_bytes.py
elfscript/ironpython3
fde41d69ff178e60b33b68752e0ea8ba8f5e45e7
[ "Apache-2.0" ]
null
null
null
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. import sys import unittest from iptest import IronPythonTestCase, ip_supported_encodings, is_cli, is_mono, is_o...
43.625
153
0.553585
870195ede500f56ef184fb76a06c2b31374b2ea0
291
py
Python
config.py
azukacchi/twitter_autobase
5a6317f611388efa2668f680fe368b48cfaeb18a
[ "MIT" ]
10
2020-11-02T04:19:34.000Z
2022-03-16T08:09:06.000Z
config.py
azukacchi/twitter_autobase
5a6317f611388efa2668f680fe368b48cfaeb18a
[ "MIT" ]
null
null
null
config.py
azukacchi/twitter_autobase
5a6317f611388efa2668f680fe368b48cfaeb18a
[ "MIT" ]
7
2020-10-01T14:26:44.000Z
2022-01-15T16:17:34.000Z
consumer_key = "YOUR API KEY HERE" consumer_secret = "YOUR API KEY SECRET HERE" access_token = "YOUR ACCESS TOKEN HERE" access_token_secret = "YOUR ACCESS TOKEN SECRET HERE" trigger = "triggerword" timezone = 7 #change this into your timezone. for example if your timezone is GMT+7 you put 7
48.5
93
0.776632
3124e6cf9c542547ded61787be5441d1d53f604a
5,793
py
Python
src/tests/catwalk_tests/test_utils.py
adunmore/triage
51f4e5bb73740378d22de16de4b15c78a1feea7b
[ "MIT" ]
null
null
null
src/tests/catwalk_tests/test_utils.py
adunmore/triage
51f4e5bb73740378d22de16de4b15c78a1feea7b
[ "MIT" ]
null
null
null
src/tests/catwalk_tests/test_utils.py
adunmore/triage
51f4e5bb73740378d22de16de4b15c78a1feea7b
[ "MIT" ]
null
null
null
from triage.component.catwalk.utils import ( filename_friendly_hash, save_experiment_and_get_hash, associate_models_with_experiment, associate_matrices_with_experiment, missing_model_hashes, missing_matrix_uuids, sort_predictions_and_labels, ) from triage.component.results_schema.schema impo...
37.134615
95
0.689625
ef0caff0ae6ff653566417238cad39f602dc2a8d
2,250
py
Python
tensorflow/compiler/xla/python/tpu_driver/client/tpu_client.py
devinlife/tensorflow
1445444c15a396410f25ae91b7d1c19d724e2afc
[ "Apache-2.0" ]
2
2020-09-18T17:14:16.000Z
2021-03-24T11:39:13.000Z
tensorflow/compiler/xla/python/tpu_driver/client/tpu_client.py
devinlife/tensorflow
1445444c15a396410f25ae91b7d1c19d724e2afc
[ "Apache-2.0" ]
5
2021-08-25T16:16:44.000Z
2022-02-10T02:04:51.000Z
tensorflow/compiler/xla/python/tpu_driver/client/tpu_client.py
devinlife/tensorflow
1445444c15a396410f25ae91b7d1c19d724e2afc
[ "Apache-2.0" ]
1
2018-09-05T14:48:36.000Z
2018-09-05T14:48:36.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.473684
96
0.692
26b98da149e26ec4f1e7f6bc829cd5d9580f2b4d
2,793
py
Python
HW2/train_linear_euclidean.py
a0919610611/NCTU-ML-2016
ba5e77868cb942026c56c4e48718feb36022a1e8
[ "MIT" ]
null
null
null
HW2/train_linear_euclidean.py
a0919610611/NCTU-ML-2016
ba5e77868cb942026c56c4e48718feb36022a1e8
[ "MIT" ]
null
null
null
HW2/train_linear_euclidean.py
a0919610611/NCTU-ML-2016
ba5e77868cb942026c56c4e48718feb36022a1e8
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from parse_data import get_data from draw_confusion_matrix import plot_confusion_matrix import matplotlib.pyplot as plt import numpy as np from sklearn.metrics import confusion_matrix, accuracy_score import time from sklearn.neighbors import NearestNeighbors, KNeighborsCla...
45.786885
118
0.693161
4da26c83f6007868d7084e38ba476002fcc9045d
1,830
py
Python
ARIMA2 - Temperature Difference.py
mcvenkat/Python-Programs
2ff66bbd5b07c8e093b11360e1dcac06740a5024
[ "CC0-1.0", "MIT" ]
null
null
null
ARIMA2 - Temperature Difference.py
mcvenkat/Python-Programs
2ff66bbd5b07c8e093b11360e1dcac06740a5024
[ "CC0-1.0", "MIT" ]
5
2020-05-22T14:10:02.000Z
2022-03-25T19:13:05.000Z
ARIMA2 - Temperature Difference.py
mcvenkat/Python-Programs
2ff66bbd5b07c8e093b11360e1dcac06740a5024
[ "CC0-1.0", "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Mar 29 11:24:49 2020 @author: 766810 """ # line plot of time series from pandas import read_csv from matplotlib import pyplot # load dataset series = read_csv('daily-min-temperatures.csv', header=0, index_col=0) # display first few rows print(series.head(20)) #...
27.727273
71
0.718579
ad20698d92e0e6d8f450749e1e10f802c17ab1bb
4,026
py
Python
cripts/services/analysis_result.py
lakiw/cripts
43f62891a3724e1ec60629887d97c421fb302163
[ "MIT" ]
2
2017-04-06T12:26:11.000Z
2018-11-05T19:17:15.000Z
cripts/services/analysis_result.py
lakiw/cripts
43f62891a3724e1ec60629887d97c421fb302163
[ "MIT" ]
9
2016-09-28T10:19:10.000Z
2017-02-24T17:58:43.000Z
cripts/services/analysis_result.py
lakiw/cripts
43f62891a3724e1ec60629887d97c421fb302163
[ "MIT" ]
null
null
null
from django.conf import settings from mongoengine import Document, StringField, ListField, EmbeddedDocument from mongoengine import DynamicEmbeddedDocument, DynamicField, UUIDField from mongoengine import DictField, EmbeddedDocumentField, BooleanField from cripts.core.cripts_mongoengine import CriptsDocument, CriptsSc...
41.081633
87
0.568058
8db1382bcd397928ccc70745510e86baeda6501f
3,692
py
Python
examples/basics/visuals/visual_filters.py
lcampagn/vispy
28c25d6904d697cde9bb4c37909bc3f934621134
[ "BSD-3-Clause" ]
1
2015-12-03T02:03:50.000Z
2015-12-03T02:03:50.000Z
examples/basics/visuals/visual_filters.py
lcampagn/vispy
28c25d6904d697cde9bb4c37909bc3f934621134
[ "BSD-3-Clause" ]
19
2015-06-16T14:33:22.000Z
2015-07-27T21:18:15.000Z
examples/basics/visuals/visual_filters.py
astrofrog/vispy
fa5e2eab9bb3d956f87ae68a56e342913e58a305
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # vispy: gallery 1 # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. """ Demonstration of Line visual with arbitrary transforms. Several Line visuals are displayed that all have the same vertex position information, but diff...
33.87156
76
0.567443
bf85b76d0115ade4102970675205dbcf9f25aef0
208
py
Python
python_practice/9.7test5.py
ccom33/python_practice
9a3551610c46b0bae15542575033e8ed7e967289
[ "MIT" ]
null
null
null
python_practice/9.7test5.py
ccom33/python_practice
9a3551610c46b0bae15542575033e8ed7e967289
[ "MIT" ]
null
null
null
python_practice/9.7test5.py
ccom33/python_practice
9a3551610c46b0bae15542575033e8ed7e967289
[ "MIT" ]
null
null
null
a=5 b= a==5 print(b) member=['아빠투르', '뭐이런놈', 'Haze', 'JorOz'] print(member) 정보=['김선재','수성구 범물동','가리는건없음'] for m in 정보: print(m, '입니다') season = ['봄','여름','가을','겨울'] for m in season: print(m, '계절')
13.866667
40
0.538462
b5bed87824c9c55b4ed9f9dfed97ca0908efafc9
3,245
py
Python
Website/farmacy_django/farmacy_django/settings.py
BedoEbied/Farmacy
4c75b83edeb12389f18f2f10f5dffa7f7c5bcbe9
[ "MIT" ]
1
2021-04-09T08:39:29.000Z
2021-04-09T08:39:29.000Z
Website/farmacy_django/farmacy_django/settings.py
BedoEbied/Farmacy
4c75b83edeb12389f18f2f10f5dffa7f7c5bcbe9
[ "MIT" ]
null
null
null
Website/farmacy_django/farmacy_django/settings.py
BedoEbied/Farmacy
4c75b83edeb12389f18f2f10f5dffa7f7c5bcbe9
[ "MIT" ]
1
2020-01-15T09:58:50.000Z
2020-01-15T09:58:50.000Z
""" Django settings for farmacy_django project. Generated by 'django-admin startproject' using Django 2.2.1. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ impor...
25.753968
91
0.694299
0ab99ecc434d8da90d47d27b80e13d441cef6b73
2,030
py
Python
test/test_utils.py
meuns/galgebra
3fea69ff4c4ca8f8afea083b697ef9d5112824b9
[ "BSD-3-Clause" ]
1
2016-05-08T08:13:10.000Z
2016-05-08T08:13:10.000Z
test/test_utils.py
meuns/galgebra
3fea69ff4c4ca8f8afea083b697ef9d5112824b9
[ "BSD-3-Clause" ]
1
2019-11-21T18:59:22.000Z
2019-11-26T08:37:26.000Z
test/test_utils.py
meuns/galgebra
3fea69ff4c4ca8f8afea083b697ef9d5112824b9
[ "BSD-3-Clause" ]
null
null
null
import unittest from sympy import expand, S, simplify from galgebra.ga import Ga from galgebra.mv import Mv from galgebra.metric import Simp def com(A, B): """ I like free functions... """ return Ga.com(A, B) class TestCase(unittest.TestCase): def assertEqual(self, first, second): """ ...
26.363636
83
0.564532
c910a58901976bc19cc5f2c9173bf89a7dcca98a
1,980
py
Python
src/deep_rlsp/envs/gridworlds/apples_spec.py
HumanCompatibleAI/deep-rlsp
81941693aba2aa9157ca96e96567f4e3cb95fbc3
[ "MIT" ]
24
2021-04-17T21:32:43.000Z
2021-08-07T17:20:15.000Z
src/deep_rlsp/envs/gridworlds/apples_spec.py
HumanCompatibleAI/deep-rlsp
81941693aba2aa9157ca96e96567f4e3cb95fbc3
[ "MIT" ]
null
null
null
src/deep_rlsp/envs/gridworlds/apples_spec.py
HumanCompatibleAI/deep-rlsp
81941693aba2aa9157ca96e96567f4e3cb95fbc3
[ "MIT" ]
7
2021-04-17T21:32:48.000Z
2022-02-09T04:18:39.000Z
import numpy as np from deep_rlsp.envs.gridworlds.apples import ApplesState from deep_rlsp.envs.gridworlds.env import Direction class ApplesSpec(object): def __init__( self, height, width, init_state, apple_regen_probability, bucket_capacity, include_locatio...
28.285714
83
0.529293
2e603b833aa6dbc15dca560203459423f234c7c0
7,695
py
Python
traod/traod/generator.py
illenseer/lpod
d473ada69f60aefbfd9ec70da8f63c56e46a83ea
[ "MIT" ]
1
2020-11-30T00:11:22.000Z
2020-11-30T00:11:22.000Z
traod/traod/generator.py
illenseer/lpod
d473ada69f60aefbfd9ec70da8f63c56e46a83ea
[ "MIT" ]
null
null
null
traod/traod/generator.py
illenseer/lpod
d473ada69f60aefbfd9ec70da8f63c56e46a83ea
[ "MIT" ]
null
null
null
from __future__ import (print_function, division, absolute_import, unicode_literals) def generate_prog(ast, backend, generator, strategy): """ Generate logic program from AST corresponding to backend, generator and strategy. """ if generator == 'split': return gener...
32.605932
80
0.460559
991817c1566c57fa119f8190e6456a711e5cacdb
1,392
py
Python
salt/modules/logmod.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
19
2016-01-29T14:37:52.000Z
2022-03-30T18:08:01.000Z
salt/modules/logmod.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
223
2016-03-02T16:39:41.000Z
2022-03-03T12:26:35.000Z
salt/modules/logmod.py
Noah-Huppert/salt
998c382f5f2c3b4cbf7d96aa6913ada6993909b3
[ "Apache-2.0" ]
64
2016-02-04T19:45:26.000Z
2021-12-15T02:02:31.000Z
# -*- coding: utf-8 -*- """ On-demand logging ================= .. versionadded:: 2017.7.0 The sole purpose of this module is logging messages in the (proxy) minion. It comes very handy when debugging complex Jinja templates, for example: .. code-block:: jinja {%- for var in range(10) %} {%- do salt.log.i...
16.571429
78
0.627874
dba796b98c9310b1e69b650c1f5e09cff86efa7f
1,580
py
Python
nomadgram/images/models.py
nanobeauty/nomadgram
e8792405ec2620d98bef980fd3d5cdfe358d2210
[ "MIT" ]
null
null
null
nomadgram/images/models.py
nanobeauty/nomadgram
e8792405ec2620d98bef980fd3d5cdfe358d2210
[ "MIT" ]
5
2020-06-05T19:24:18.000Z
2021-09-08T00:38:57.000Z
nomadgram/images/models.py
nanobeauty/nomadgram
e8792405ec2620d98bef980fd3d5cdfe358d2210
[ "MIT" ]
null
null
null
from django.db import models from nomadgram.users import models as user_models # Create your models here. class TimeStampedModel(models.Model): created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) class Meta: abstract = True class Image(TimeStamp...
27.241379
109
0.691772
92260ace28a6f880c3173480d92b689fc8220f4f
73,487
py
Python
PythonVirtEnv/Lib/site-packages/plotly/graph_objs/barpolar/marker/_colorbar.py
zuhorski/EPL_Project
2d2417652879cfbe33c44c003ad77b7222590849
[ "MIT" ]
2
2021-07-18T11:39:56.000Z
2021-11-06T17:13:05.000Z
venv/Lib/site-packages/plotly/graph_objs/barpolar/marker/_colorbar.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
null
null
null
venv/Lib/site-packages/plotly/graph_objs/barpolar/marker/_colorbar.py
wakisalvador/constructed-misdirection
74779e9ec640a11bc08d5d1967c85ac4fa44ea5e
[ "Unlicense" ]
null
null
null
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class ColorBar(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "barpolar.marker" _path_str = "barpolar.marker.colorbar" _valid_props = { "bgcolor"...
35.812378
101
0.559378
9e50304d7b012f2b992a20b2ce2dcbebf500c1a5
55,755
py
Python
Multiple_Tic_Tac.py
jberkow713/Multiple-Tic-Tac-Toe
f5dd3630adfd038f472f2752a262b0c276760985
[ "MIT" ]
null
null
null
Multiple_Tic_Tac.py
jberkow713/Multiple-Tic-Tac-Toe
f5dd3630adfd038f472f2752a262b0c276760985
[ "MIT" ]
null
null
null
Multiple_Tic_Tac.py
jberkow713/Multiple-Tic-Tac-Toe
f5dd3630adfd038f472f2752a262b0c276760985
[ "MIT" ]
null
null
null
import turtle import os import math import random from copy import deepcopy import numpy as np global Move_list Move_list = [] # Use https://trinket.io/features/pygame to convert this to an online embedded game, when the # Website is up #Webflow #Setting up initial gameplay variables # sc = turtle.Screen() # sc...
37.294314
166
0.530284
41dfbe3956584c9a6771ab964d2b8eb3651cb011
314
py
Python
tests/integration/test_toggle_mal.py
Cyniikal/labelbox-python
526fb8235c245a3c6161af57c354a47d68385bab
[ "Apache-2.0" ]
null
null
null
tests/integration/test_toggle_mal.py
Cyniikal/labelbox-python
526fb8235c245a3c6161af57c354a47d68385bab
[ "Apache-2.0" ]
null
null
null
tests/integration/test_toggle_mal.py
Cyniikal/labelbox-python
526fb8235c245a3c6161af57c354a47d68385bab
[ "Apache-2.0" ]
null
null
null
def test_enable_model_assisted_labeling(project): response = project.enable_model_assisted_labeling() assert response == True response = project.enable_model_assisted_labeling(True) assert response == True response = project.enable_model_assisted_labeling(False) assert response == False
31.4
60
0.77707
499390dbb2bec4d151e4f2dd3e68482afb7a6098
2,505
py
Python
data/p4VQE/R1/benchmark/startQiskit_QC70.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R1/benchmark/startQiskit_QC70.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/p4VQE/R1/benchmark/startQiskit_QC70.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
# qubit number=3 # total number=9 import numpy as np from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ import networkx as nx from qiskit.visualization import plot_histogram from typing import * from pprint import pprint from math import log2 from collection...
27.228261
118
0.633932
24eb5708cdce7f1dd54f60f0bf7ad51a10095a14
1,018
py
Python
generator/group.py
nikor1337/ironpython_training
022e2c48193fa81c3c3d7530ae0b9d939e50687e
[ "Apache-2.0" ]
null
null
null
generator/group.py
nikor1337/ironpython_training
022e2c48193fa81c3c3d7530ae0b9d939e50687e
[ "Apache-2.0" ]
null
null
null
generator/group.py
nikor1337/ironpython_training
022e2c48193fa81c3c3d7530ae0b9d939e50687e
[ "Apache-2.0" ]
null
null
null
from model.group import Group import random import string import os.path import getopt import sys import time import clr clr.AddReferenceByName('Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c') from Microsoft.Office.Interop import Excel try: opts, args = getopt....
22.622222
124
0.683694
a688b11506e538d6f7785057e584b826bfae76c2
3,864
py
Python
Proyecto1/venv/Lib/site-packages/telegram/inline/inlinequeryresultcachedgif.py
RicardoVinicioJara/LugaresTusisticos
d92264231c471cecbc17a2279bedb3779424147c
[ "CC-BY-3.0" ]
1
2021-12-27T21:37:04.000Z
2021-12-27T21:37:04.000Z
Proyecto1/venv/Lib/site-packages/telegram/inline/inlinequeryresultcachedgif.py
RicardoVinicioJara/LugaresTusisticos
d92264231c471cecbc17a2279bedb3779424147c
[ "CC-BY-3.0" ]
null
null
null
Proyecto1/venv/Lib/site-packages/telegram/inline/inlinequeryresultcachedgif.py
RicardoVinicioJara/LugaresTusisticos
d92264231c471cecbc17a2279bedb3779424147c
[ "CC-BY-3.0" ]
1
2021-05-23T18:37:37.000Z
2021-05-23T18:37:37.000Z
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2020 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
46.554217
99
0.675207
0e7dee919e933524f7e86bde069ad2480a19b446
8,787
py
Python
parse.py
ericsims/LTSpiceJobServer
6a88ffb84aa05c6d61ccd072045bfc6f4b44d39d
[ "MIT" ]
null
null
null
parse.py
ericsims/LTSpiceJobServer
6a88ffb84aa05c6d61ccd072045bfc6f4b44d39d
[ "MIT" ]
null
null
null
parse.py
ericsims/LTSpiceJobServer
6a88ffb84aa05c6d61ccd072045bfc6f4b44d39d
[ "MIT" ]
null
null
null
import subprocess import re from queue import Queue from threading import Thread from time import time import itertools import math import string import random LTSpicePath = 'C:\Program Files\LTC\LTspiceXVII\XVIIx64.exe' file = 'example LTSpice sims/BuckBoost' ##file = 'example LTSpice sims/MonteCarlo' returned_value...
33.033835
115
0.546375
8266960e3ae63b7d7e5bde658ac258b6f46975ad
3,186
py
Python
predict.py
mayyasy/Image-Classifier-AIPND
01a1d24183ea4cab3b673588c2fd39b93f41b2b6
[ "MIT" ]
null
null
null
predict.py
mayyasy/Image-Classifier-AIPND
01a1d24183ea4cab3b673588c2fd39b93f41b2b6
[ "MIT" ]
null
null
null
predict.py
mayyasy/Image-Classifier-AIPND
01a1d24183ea4cab3b673588c2fd39b93f41b2b6
[ "MIT" ]
null
null
null
''' change directory to ImageClassifier sample run 1: python predict.py (filepath 'flowers/test/10/image_07090.jpg' included as default sample test) sample run 2: python predict.py --filepath 'flowers/1/image_06743.jpg' ''' import argparse import torch import torch.nn.functional as F import numpy as np import json im...
31.544554
119
0.670433
69e1daa6493501dbe407a71f15e936c72ecf29cb
3,463
py
Python
test/test_parser.py
poletaevvlad/CubeLang
06f34e7204f4656589eb33c4afe660383704861f
[ "MIT" ]
1
2019-12-04T04:02:11.000Z
2019-12-04T04:02:11.000Z
test/test_parser.py
poletaevvlad/CubeLang
06f34e7204f4656589eb33c4afe660383704861f
[ "MIT" ]
null
null
null
test/test_parser.py
poletaevvlad/CubeLang
06f34e7204f4656589eb33c4afe660383704861f
[ "MIT" ]
null
null
null
import pytest from cubelang.actions import Turn, Action, Rotate, TurningType from cubelang.orientation import Side from cubelang.parser import ParsingError, parse_actions def test_valid_parsing(): actions = list(parse_actions("R L2 U' RU L")) expected_sides = [TurningType.VERTICAL, TurningType.VERTICAL, ...
34.63
84
0.591684
3b5856b56447b12b9626b1dfc887dd74c4dba87c
1,842
py
Python
main.py
Infosecurity-LLC/thehive_incidents_pusher
72120e51bb85776e008485b3849f64732fde0553
[ "Apache-2.0" ]
1
2022-02-04T10:01:02.000Z
2022-02-04T10:01:02.000Z
main.py
Infosecurity-LLC/thehive_incidents_pusher
72120e51bb85776e008485b3849f64732fde0553
[ "Apache-2.0" ]
null
null
null
main.py
Infosecurity-LLC/thehive_incidents_pusher
72120e51bb85776e008485b3849f64732fde0553
[ "Apache-2.0" ]
1
2022-02-04T10:01:03.000Z
2022-02-04T10:01:03.000Z
import logging import os import sys import threading from appmetrics import metrics from socutils import get_settings from modules.app_metrics import register_app_metrics from modules.logging import prepare_logging logger = logging.getLogger('thehive_incidents_pusher') def main(settings_file_path: str = 'data/sett...
34.111111
116
0.722041
b0014f9945929b63e9e3c3c16723979e55b274b7
7,080
py
Python
ainnovation_dcim/service/workflow/workflow_transition_service.py
ltxwanzl/ainnovation_dcim
b065489e2aa69729c0fd5142cf75d8caa7788b31
[ "Apache-2.0" ]
null
null
null
ainnovation_dcim/service/workflow/workflow_transition_service.py
ltxwanzl/ainnovation_dcim
b065489e2aa69729c0fd5142cf75d8caa7788b31
[ "Apache-2.0" ]
null
null
null
ainnovation_dcim/service/workflow/workflow_transition_service.py
ltxwanzl/ainnovation_dcim
b065489e2aa69729c0fd5142cf75d8caa7788b31
[ "Apache-2.0" ]
null
null
null
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage from django.db.models import Q from workflow.models import Transition from service.base_service import BaseService from service.common.log_service import auto_log class WorkflowTransitionService(BaseService): def __init__(self): pas...
45.974026
118
0.646893
75383adf5feb90f79f772a1e7d2241514292829c
2,365
py
Python
backend/bin/test/test_helpers/test_environment_helper.py
anjo-ba/PCAP-Analyzer
ccb13caba9c0c05a7643e63c57575b56ab1233cb
[ "MIT" ]
4
2019-03-29T08:45:36.000Z
2021-11-11T00:49:36.000Z
backend/bin/test/test_helpers/test_environment_helper.py
anjo-ba/PCAP-Analyzer
ccb13caba9c0c05a7643e63c57575b56ab1233cb
[ "MIT" ]
9
2019-04-03T18:10:19.000Z
2020-08-16T12:13:34.000Z
backend/bin/test/test_helpers/test_environment_helper.py
anjo-ba/PCAP-Analyzer
ccb13caba9c0c05a7643e63c57575b56ab1233cb
[ "MIT" ]
4
2019-05-09T15:33:23.000Z
2022-02-06T08:01:23.000Z
import unittest from os import path from unittest.mock import patch from main.helpers.environment_helper import EnvironmentHelper class Process(object): def __init__(self, name) -> None: self.info = {"name": name} class TestEnrivonmentHelperMethods(unittest.TestCase): @classmethod ...
42.232143
104
0.659197
7357c6edf2ea80ce668550750b2eb23f770ce1cc
1,439
py
Python
config.py
maxbbender/flaskee
4b1df9f13ae6302a7b2ab9607b131644cf08f5ea
[ "MIT" ]
null
null
null
config.py
maxbbender/flaskee
4b1df9f13ae6302a7b2ab9607b131644cf08f5ea
[ "MIT" ]
null
null
null
config.py
maxbbender/flaskee
4b1df9f13ae6302a7b2ab9607b131644cf08f5ea
[ "MIT" ]
null
null
null
import os basedir = os.path.abspath(os.path.dirname(__file__)) class Config: SECRET_KEY = os.environ.get('SECRET_KEY') or 'domislove' FLASK_CONFIG = os.environ.get('FLASK_CONFIG') or 'default' @staticmethod def init_app(app): app.logger.handlers = [] # log to syslog import lo...
26.648148
93
0.677554
bc9ac664aab61de645c6938f01d9971fa3f5edef
528
py
Python
python/hw-opencv.py
OGLinuk/ptp
bf498759d9958e4fbf4bda30e2b069efa6b7ff5c
[ "Apache-2.0" ]
1
2022-01-31T04:55:59.000Z
2022-01-31T04:55:59.000Z
python/hw-opencv.py
oglinuk/labs
619f25238cd1631ee3446cb91e46e2376bea6dba
[ "Apache-2.0" ]
null
null
null
python/hw-opencv.py
oglinuk/labs
619f25238cd1631ee3446cb91e46e2376bea6dba
[ "Apache-2.0" ]
1
2018-10-05T01:54:12.000Z
2018-10-05T01:54:12.000Z
import cv2 import numpy as np def main(): cap = cv2.VideoCapture(0) while (True): # Capture frames _, frame = cap.read() # Convert frame color to grayscale gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # Display the video cv2.imshow('Video', gray) # ...
20.307692
54
0.573864
bd5277d7413276941fe40d49b13a2f3cc32eed54
5,271
py
Python
tools/cpu_evaluation_tools.py
TaoweiZhang/MegEngine
bd3c4a05274f69dacca6097d8cbadbb34c7cc2e4
[ "Apache-2.0" ]
1
2022-03-21T03:13:45.000Z
2022-03-21T03:13:45.000Z
tools/cpu_evaluation_tools.py
TaoweiZhang/MegEngine
bd3c4a05274f69dacca6097d8cbadbb34c7cc2e4
[ "Apache-2.0" ]
null
null
null
tools/cpu_evaluation_tools.py
TaoweiZhang/MegEngine
bd3c4a05274f69dacca6097d8cbadbb34c7cc2e4
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTIE...
34.45098
177
0.618668
ad628722cf2f47690e270d919c1b95feaab8dea1
2,336
py
Python
phantomRun.py
benhastings/SeGrid_EC2
b5b6368b269bdd12b567f3e3519261930fa11b87
[ "BSD-3-Clause" ]
null
null
null
phantomRun.py
benhastings/SeGrid_EC2
b5b6368b269bdd12b567f3e3519261930fa11b87
[ "BSD-3-Clause" ]
null
null
null
phantomRun.py
benhastings/SeGrid_EC2
b5b6368b269bdd12b567f3e3519261930fa11b87
[ "BSD-3-Clause" ]
null
null
null
#import subprocess from subprocess import Popen, PIPE import sys import urllib2 import time import csv import random import socket env=sys.argv[1] duration=int(sys.argv[2]) #statsDHost='ec2-54-80-6-76.compute-1.amazonaws.com' statsDHost='statsd.elsst.com' """ Input Data collection/Definition """ PII=[] try: csvRd...
24.589474
137
0.682791
e91a8bfda2f1ee2dad36febba3224984bf0a733d
442
py
Python
picture.py
ysndr/google-hashcode-2019
d31a932aa2a47c4bdec92818d6041905db33d730
[ "MIT" ]
null
null
null
picture.py
ysndr/google-hashcode-2019
d31a932aa2a47c4bdec92818d6041905db33d730
[ "MIT" ]
null
null
null
picture.py
ysndr/google-hashcode-2019
d31a932aa2a47c4bdec92818d6041905db33d730
[ "MIT" ]
null
null
null
class Picture(): def __init__(self, pid, rotation, tags): self.id = pid self.rotation = rotation self.tags = tags def score(self, other): return min( len(self.tags.intersection(other.tags)), len(self.tags.difference(other.tags)), len(other.ta...
26
60
0.552036
e44947709901faa5fbf9002fc6d36abaecd20026
31,146
py
Python
test/IECore/LinkedSceneTest.py
danieldresser/cortex
33f50c097adbc0c6a87259d0be4d7344c3c7026f
[ "BSD-3-Clause" ]
null
null
null
test/IECore/LinkedSceneTest.py
danieldresser/cortex
33f50c097adbc0c6a87259d0be4d7344c3c7026f
[ "BSD-3-Clause" ]
null
null
null
test/IECore/LinkedSceneTest.py
danieldresser/cortex
33f50c097adbc0c6a87259d0be4d7344c3c7026f
[ "BSD-3-Clause" ]
1
2019-11-29T12:34:11.000Z
2019-11-29T12:34:11.000Z
########################################################################## # # Copyright (c) 2013, Image Engine Design 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: # # * Redistribu...
49.674641
164
0.705259
11b72c10f7d0184752cfe02070f68f143cda3cdf
19,989
py
Python
tests/rest/admin/test_event_reports.py
cHAuHaNz/synapse
79bfe966e08a2212cc2fae2b00f5efb2c2185543
[ "Apache-2.0" ]
1
2020-11-04T14:12:27.000Z
2020-11-04T14:12:27.000Z
tests/rest/admin/test_event_reports.py
cHAuHaNz/synapse
79bfe966e08a2212cc2fae2b00f5efb2c2185543
[ "Apache-2.0" ]
null
null
null
tests/rest/admin/test_event_reports.py
cHAuHaNz/synapse
79bfe966e08a2212cc2fae2b00f5efb2c2185543
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Dirk Klimpel # # 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 ...
38.001901
88
0.626344
fe1dd34e6ed33673271bf42f58898744e05e30de
4,799
py
Python
tests/snmp/test_snmp_lldp.py
xwjiang2021/sonic-mgmt
82c446b9fb016eb070af765aa9d9999e55b27342
[ "Apache-2.0" ]
2
2021-11-24T09:33:41.000Z
2021-12-03T09:08:29.000Z
tests/snmp/test_snmp_lldp.py
xwjiang2021/sonic-mgmt
82c446b9fb016eb070af765aa9d9999e55b27342
[ "Apache-2.0" ]
null
null
null
tests/snmp/test_snmp_lldp.py
xwjiang2021/sonic-mgmt
82c446b9fb016eb070af765aa9d9999e55b27342
[ "Apache-2.0" ]
null
null
null
import logging import re import pytest from tests.common.helpers.snmp_helpers import get_snmp_facts pytestmark = [ pytest.mark.topology('any'), pytest.mark.device_type('vs') ] logger = logging.getLogger(__name__) @pytest.fixture(scope="module", autouse="True") def lldp_setup(duthosts, enum_rand_one_per_hwsk...
41.37069
162
0.675974