hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a263c5a019460be71ed70498727084ba6412b83 | 14,809 | py | Python | pytorch3d/loss/point_mesh_distance.py | martinruenz/pytorch3d | 7f1e63aed1252ba8145d4a66ce2272331d60cdae | [
"BSD-3-Clause"
] | 3 | 2022-03-09T08:12:54.000Z | 2022-03-10T01:57:03.000Z | pytorch3d/loss/point_mesh_distance.py | martinruenz/pytorch3d | 7f1e63aed1252ba8145d4a66ce2272331d60cdae | [
"BSD-3-Clause"
] | null | null | null | pytorch3d/loss/point_mesh_distance.py | martinruenz/pytorch3d | 7f1e63aed1252ba8145d4a66ce2272331d60cdae | [
"BSD-3-Clause"
] | 1 | 2020-05-25T07:19:08.000Z | 2020-05-25T07:19:08.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All rights reserved.
from pytorch3d import _C
from pytorch3d.structures import Meshes, Pointclouds
from torch.autograd import Function
from torch.autograd.function import once_differentiable
"""
This file defines distances between meshes and pointclouds.
The functio... | 41.365922 | 87 | 0.661557 |
4a263d1def8a5daa7e1fcce18ee873e7e8903f9a | 992 | py | Python | cloudscraper/exceptions/reCaptcha_exceptions.py | oczkers/cloudscraper | a8c0bdd999d89a6192d0e31fb6b1d42a7bc397d1 | [
"MIT"
] | null | null | null | cloudscraper/exceptions/reCaptcha_exceptions.py | oczkers/cloudscraper | a8c0bdd999d89a6192d0e31fb6b1d42a7bc397d1 | [
"MIT"
] | null | null | null | cloudscraper/exceptions/reCaptcha_exceptions.py | oczkers/cloudscraper | a8c0bdd999d89a6192d0e31fb6b1d42a7bc397d1 | [
"MIT"
] | 1 | 2021-01-21T21:15:03.000Z | 2021-01-21T21:15:03.000Z | # ------------------------------------------------------------------------------- #
class reCaptcha_Service_Unavailable(Exception):
"""
Raise error for external services that cannot be reached
"""
class reCaptcha_Error_From_API(Exception):
"""
Raise error for error from API response.
"""
c... | 19.84 | 83 | 0.627016 |
4a263f00940393e9cde7ab76f36920e289c2bf05 | 9,672 | py | Python | pa_elasticsearch/coupler.py | ncc-tools/pa-elasticsearch-coupler | 0e6fcb8e851eb72c1eb9c91ff55551fa817d02a2 | [
"Apache-2.0"
] | 1 | 2018-10-24T11:13:06.000Z | 2018-10-24T11:13:06.000Z | pa_elasticsearch/coupler.py | ncc-tools/pa-elasticsearch-coupler | 0e6fcb8e851eb72c1eb9c91ff55551fa817d02a2 | [
"Apache-2.0"
] | 5 | 2017-01-31T11:22:11.000Z | 2021-06-01T22:15:58.000Z | pa_elasticsearch/coupler.py | ncc-tools/pa-elasticsearch-coupler | 0e6fcb8e851eb72c1eb9c91ff55551fa817d02a2 | [
"Apache-2.0"
] | 2 | 2017-02-15T11:38:41.000Z | 2017-03-17T12:33:06.000Z | """
Reads NCC Performance Analyser data and indexes it in ElasticSearch
"""
# Copyright 2017 NCC Group plc
#
# 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.a... | 41.87013 | 99 | 0.593052 |
4a263f1ebb2a68fa4a07da6e8729d9321de25b34 | 331 | py | Python | server/com/pi_error.py | JoeEmp/pi_web_file_system | e252660c7b8f2d26853a43860da0a7fdd062e505 | [
"MIT"
] | null | null | null | server/com/pi_error.py | JoeEmp/pi_web_file_system | e252660c7b8f2d26853a43860da0a7fdd062e505 | [
"MIT"
] | null | null | null | server/com/pi_error.py | JoeEmp/pi_web_file_system | e252660c7b8f2d26853a43860da0a7fdd062e505 | [
"MIT"
] | null | null | null | PARAMETERS_ERROR = {'code':-1,'msg':'参数错误'}
UNKNOW_ERROR = {'code':-1,'msg':'未知错误,请联系管理员'}
LOCAL_FAIL_ERROR = {'code':-1,'msg':'接口不存在'}
LOGIN_ERROR = {'code':2,'msg':'请重新登录'}
class pi_exception(BaseException):
def __init__(self, reason, *args, **kwargs):
self.reason = reason
super().__init__(*args... | 33.1 | 48 | 0.637462 |
4a263f368ee4b948d4e4142ca90756042c6207bc | 3,140 | py | Python | libs/cherrypy/test/test_etags.py | scambra/HTPC-Manager | 1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d | [
"MIT"
] | 422 | 2015-01-08T14:08:08.000Z | 2022-02-07T11:47:37.000Z | libs/cherrypy/test/test_etags.py | scambra/HTPC-Manager | 1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d | [
"MIT"
] | 581 | 2015-01-01T08:07:16.000Z | 2022-02-23T11:44:37.000Z | libs/cherrypy/test/test_etags.py | scambra/HTPC-Manager | 1a1440db84ae1b6e7a2610c7f3bd5b6adf0aab1d | [
"MIT"
] | 115 | 2015-01-08T14:41:00.000Z | 2022-02-13T12:31:17.000Z | import cherrypy
from cherrypy._cpcompat import ntou
from cherrypy.test import helper
class ETagTest(helper.CPWebCase):
def setup_server():
class Root:
def resource(self):
return "Oh wah ta goo Siam."
resource.exposed = True
def fail(self, code):
... | 36.941176 | 77 | 0.567834 |
4a263f48177cad001b782106805379e0a7660863 | 794 | py | Python | sktime/transformers/panel/tests/test_ColumnConcatenator.py | bmurdata/sktime | fb079e76e3f3dfbb849fb805e53f09adec6cdf79 | [
"BSD-3-Clause"
] | 1 | 2021-01-10T06:32:00.000Z | 2021-01-10T06:32:00.000Z | sktime/transformers/panel/tests/test_ColumnConcatenator.py | bmurdata/sktime | fb079e76e3f3dfbb849fb805e53f09adec6cdf79 | [
"BSD-3-Clause"
] | null | null | null | sktime/transformers/panel/tests/test_ColumnConcatenator.py | bmurdata/sktime | fb079e76e3f3dfbb849fb805e53f09adec6cdf79 | [
"BSD-3-Clause"
] | 1 | 2021-07-08T07:07:42.000Z | 2021-07-08T07:07:42.000Z | # -*- coding: utf-8 -*-
import numpy as np
from sktime.datasets import load_basic_motions
from sktime.transformers.panel.compose import ColumnConcatenator
def test_TimeSeriesConcatenator():
X, y = load_basic_motions(split="train", return_X_y=True)
# check that loaded dataframe is multivariate
assert X.sh... | 29.407407 | 64 | 0.68136 |
4a2640ffb6816cce3e52ecf3d2fab28e4c548ed7 | 2,126 | py | Python | pymoo/algorithms/unsga3.py | temaurer/pymoo | 1a2f3e0944ef7094df7518623e3ce23f94a39a39 | [
"Apache-2.0"
] | null | null | null | pymoo/algorithms/unsga3.py | temaurer/pymoo | 1a2f3e0944ef7094df7518623e3ce23f94a39a39 | [
"Apache-2.0"
] | null | null | null | pymoo/algorithms/unsga3.py | temaurer/pymoo | 1a2f3e0944ef7094df7518623e3ce23f94a39a39 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from pymoo.algorithms.nsga3 import NSGA3
from pymoo.docs import parse_doc_string
from pymoo.operators.selection.tournament_selection import TournamentSelection, compare
from pymoo.rand import random
# =================================================================================================... | 33.746032 | 111 | 0.484008 |
4a26414645635a8ce0cc76352220ca72317bce5d | 452 | py | Python | Day X/main.py | edgorman/advent-of-code | 374fee72dd853c60851231a672498ab2732889cf | [
"MIT"
] | null | null | null | Day X/main.py | edgorman/advent-of-code | 374fee72dd853c60851231a672498ab2732889cf | [
"MIT"
] | null | null | null | Day X/main.py | edgorman/advent-of-code | 374fee72dd853c60851231a672498ab2732889cf | [
"MIT"
] | null | null | null | import os
def part_one(entries):
pass
def part_two(entries):
pass
if __name__ == "__main__":
# Get input from txt file
with open(os.getcwd() + '\\YEAR\\Day X\\input.txt', 'r') as file_obj:
file_input = file_obj.readlines()
# Clean input
entries = []
for entry in file_input:
... | 18.833333 | 73 | 0.606195 |
4a2641593a3279a2c829ccbecf1a373b4904e32e | 9,266 | py | Python | manage/discovery_manager.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | manage/discovery_manager.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | manage/discovery_manager.py | korenlev/calipso-cvim | 39278a5cf09c40b26a8a143ccc0c8d437961abc2 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
# Copyright (c) 2017-2020 Koren Lev (Cisco Systems), #
# Yaron Yogev (Cisco Systems), Ilia Abashin (Cisco Systems) and others #
# #
... | 52.948571 | 107 | 0.567883 |
4a26422f650cf13ee7d4e8d2228b50ec49876fb8 | 7,162 | py | Python | examples/simultaneous_translation/models/convtransformer_simul_trans.py | Shiguang-Guo/fairseq | c9d3df5679d0829cda8fc3c818b6cab52b78dc37 | [
"MIT"
] | 16,259 | 2018-05-02T02:31:30.000Z | 2022-03-31T21:50:23.000Z | examples/simultaneous_translation/models/convtransformer_simul_trans.py | Shiguang-Guo/fairseq | c9d3df5679d0829cda8fc3c818b6cab52b78dc37 | [
"MIT"
] | 3,863 | 2018-05-02T13:42:39.000Z | 2022-03-31T19:03:32.000Z | examples/simultaneous_translation/models/convtransformer_simul_trans.py | Shiguang-Guo/fairseq | c9d3df5679d0829cda8fc3c818b6cab52b78dc37 | [
"MIT"
] | 4,796 | 2018-05-02T07:55:51.000Z | 2022-03-31T14:46:45.000Z | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
from fairseq import checkpoint_uti... | 34.936585 | 123 | 0.655124 |
4a2642ac791e570cccaeb0e5c00164ad6a11f7a6 | 1,268 | py | Python | src/data/remove_spam.py | tamarakatic/sentiment-analysis-in-amazon-reviews | 4b12b9136e2809fd581d3cc730cd872b7a0b2e27 | [
"MIT"
] | 9 | 2018-09-18T07:19:03.000Z | 2021-01-15T06:22:30.000Z | src/data/remove_spam.py | tamarakatic/sentiment-analysis-in-amazon-reviews | 4b12b9136e2809fd581d3cc730cd872b7a0b2e27 | [
"MIT"
] | 1 | 2020-04-19T15:20:14.000Z | 2020-04-25T02:53:43.000Z | src/data/remove_spam.py | tamarakatic/sentiment-analysis-in-amazon-reviews | 4b12b9136e2809fd581d3cc730cd872b7a0b2e27 | [
"MIT"
] | 3 | 2019-01-28T05:59:47.000Z | 2020-05-27T14:03:51.000Z | #!/usr/bin/env python3
import sys
import multiprocessing
import pandas as pd
import dask.dataframe as dd
from langdetect import detect
from dask.multiprocessing import get
from timeit import default_timer as timer
CPU_CORES = multiprocessing.cpu_count()
def detect_language(review, lang="en"):
try:
ret... | 23.054545 | 76 | 0.667192 |
4a2643af68e625a02271ab509d06de8a5a8ce165 | 385 | py | Python | horaizon/data_generator.py | mertensu/horaizon | ac0d39fca6a1e6953e8e4bb8aafc71af05d945ba | [
"MIT"
] | null | null | null | horaizon/data_generator.py | mertensu/horaizon | ac0d39fca6a1e6953e8e4bb8aafc71af05d945ba | [
"MIT"
] | null | null | null | horaizon/data_generator.py | mertensu/horaizon | ac0d39fca6a1e6953e8e4bb8aafc71af05d945ba | [
"MIT"
] | null | null | null | import numpy as np
import torch
from torch.utils.data import Dataset
class DataGenerator(Dataset):
def __init__(self, data_frame, q):
self.data = data_frame.values
self.q = q
def __len__(self):
return self.data.shape[0] - self.q
def __getitem__(self, index):
return torch.... | 24.0625 | 85 | 0.667532 |
4a2643db60228d3c87f1eeb59234bec353c70804 | 1,422 | py | Python | honda_dashboard/components.py | todstoychev/dashboard | 7f582c4f48511866db96475e4cfdb36f5a10eb31 | [
"BSD-2-Clause"
] | null | null | null | honda_dashboard/components.py | todstoychev/dashboard | 7f582c4f48511866db96475e4cfdb36f5a10eb31 | [
"BSD-2-Clause"
] | null | null | null | honda_dashboard/components.py | todstoychev/dashboard | 7f582c4f48511866db96475e4cfdb36f5a10eb31 | [
"BSD-2-Clause"
] | null | null | null | import os
from PyQt5.QtCore import Qt
from PyQt5.QtGui import QFont
from PyQt5.QtWidgets import QMainWindow, QWidget, QGridLayout, QLabel, QVBoxLayout
from honda_dashboard.config import Config
class DashboardWindow(QMainWindow):
def __init__(self, cfg: Config):
super().__init__()
self.__config... | 26.333333 | 105 | 0.636428 |
4a2643e55cfb8a87a76ed196b01b5994115d62b4 | 114 | py | Python | app/back/mongo/data/collect/metas/model.py | jgphilpott/polyplot | c46861174ee5881dadffbfb2278d555462523547 | [
"MIT"
] | 5 | 2021-05-17T14:17:14.000Z | 2021-12-14T12:54:32.000Z | app/back/mongo/data/collect/metas/model.py | jgphilpott/iGraph | 2a91ba57e4950856a83d3a109753f8f2badee829 | [
"MIT"
] | 8 | 2020-02-09T02:48:41.000Z | 2021-05-16T04:57:02.000Z | app/back/mongo/data/collect/metas/model.py | jgphilpott/iGraph | 2a91ba57e4950856a83d3a109753f8f2badee829 | [
"MIT"
] | 2 | 2016-09-12T03:48:16.000Z | 2019-05-04T14:15:19.000Z | class Meta():
def __init__(self, meta):
self.code = meta["code"]
self.value = meta["value"]
| 16.285714 | 34 | 0.54386 |
4a2643fbf94b7b96fdc691562a698cd996a25bd0 | 4,206 | py | Python | threat_connect/komand_threat_connect/actions/bulk_indicator_download/schema.py | xhennessy-r7/insightconnect-plugins | 59268051313d67735b5dd3a30222eccb92aca8e9 | [
"MIT"
] | null | null | null | threat_connect/komand_threat_connect/actions/bulk_indicator_download/schema.py | xhennessy-r7/insightconnect-plugins | 59268051313d67735b5dd3a30222eccb92aca8e9 | [
"MIT"
] | null | null | null | threat_connect/komand_threat_connect/actions/bulk_indicator_download/schema.py | xhennessy-r7/insightconnect-plugins | 59268051313d67735b5dd3a30222eccb92aca8e9 | [
"MIT"
] | null | null | null | # GENERATED BY KOMAND SDK - DO NOT EDIT
import komand
import json
class Input:
ATTRIBUTE = "attribute"
CONFIDENCE = "confidence"
DATE_ADDED = "date_added"
LAST_MODIFIED = "last_modified"
OWNER = "owner"
RATING = "rating"
TAG = "tag"
THREAT_ASSESS_CONFIDENCE = "threat_assess_confidence"... | 22.491979 | 57 | 0.485259 |
4a264492b62d81d1e87b97d2fe50d971235adcad | 11,114 | py | Python | src/foremast/s3/s3apps.py | dnava13/foremast | 53acb17631b43b6e0adc87366faa0e7e2066e6c3 | [
"Apache-2.0"
] | null | null | null | src/foremast/s3/s3apps.py | dnava13/foremast | 53acb17631b43b6e0adc87366faa0e7e2066e6c3 | [
"Apache-2.0"
] | null | null | null | src/foremast/s3/s3apps.py | dnava13/foremast | 53acb17631b43b6e0adc87366faa0e7e2066e6c3 | [
"Apache-2.0"
] | null | null | null | # Foremast - Pipeline Tooling
#
# Copyright 2018 Gogo, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | 44.814516 | 118 | 0.61517 |
4a2645096ab98e8af315d9ed1e98a43542f1e15f | 6,377 | py | Python | plot_1D.py | cclauss/loss-landscape | 35a4c9bcabdefdcaf1e3d7266da878205bfca2a0 | [
"MIT"
] | 3 | 2020-12-17T19:17:20.000Z | 2021-08-17T12:00:18.000Z | plot_1D.py | cclauss/loss-landscape | 35a4c9bcabdefdcaf1e3d7266da878205bfca2a0 | [
"MIT"
] | null | null | null | plot_1D.py | cclauss/loss-landscape | 35a4c9bcabdefdcaf1e3d7266da878205bfca2a0 | [
"MIT"
] | null | null | null | """
1D plotting routines
"""
from matplotlib import pyplot as pp
import h5py
import argparse
import numpy as np
import os
def plot_1d_loss_err(surf_file, xmin=-1.0, xmax=1.0, loss_max=5, log=False, show=False):
print('------------------------------------------------------------------')
print('plot_1d_loss... | 37.075581 | 108 | 0.591971 |
4a26460f1709eee1e790412938d9a269e95414b1 | 15,553 | py | Python | CryostatGUI/Keithley/Keithley6221_ControlClient.py | Cryostat-GUI/Cryostat-GUI | 9b538ecaef4f1c0758907b9ee32d79ffd6793867 | [
"MIT"
] | 2 | 2018-11-23T15:59:19.000Z | 2019-01-28T20:18:58.000Z | CryostatGUI/Keithley/Keithley6221_ControlClient.py | Cryostat-GUI/Cryostat-GUI | 9b538ecaef4f1c0758907b9ee32d79ffd6793867 | [
"MIT"
] | 54 | 2018-10-16T20:03:32.000Z | 2021-11-09T09:07:03.000Z | CryostatGUI/Keithley/Keithley6221_ControlClient.py | Cryostat-GUI/Cryostat-GUI | 9b538ecaef4f1c0758907b9ee32d79ffd6793867 | [
"MIT"
] | 9 | 2018-11-04T17:37:30.000Z | 2021-05-03T21:15:33.000Z | """Module containing a class to run a Keithley 6221 Current Source in a pyqt5 application
Classes:
Keithley6221_ControlClient: a class for interfacing with a Keithley 6221 Current Source
inherits from AbstractLoopThreadClient
"""
import sys
import os
sys.path.append(os.path.dirname(os.path.dirname(os.... | 38.120098 | 135 | 0.535009 |
4a26471cdff861e5213b0af1231d84b299d25ecc | 4,482 | py | Python | doc/sphinx/source/conf.py | JarryShaw/jspcap | 9d4c980598e3c5e0af864044976f91b9b96e2e3e | [
"BSD-3-Clause"
] | 3 | 2018-01-21T15:22:21.000Z | 2018-06-22T01:27:59.000Z | doc/sphinx/source/conf.py | JarryShaw/jspcap | 9d4c980598e3c5e0af864044976f91b9b96e2e3e | [
"BSD-3-Clause"
] | null | null | null | doc/sphinx/source/conf.py | JarryShaw/jspcap | 9d4c980598e3c5e0af864044976f91b9b96e2e3e | [
"BSD-3-Clause"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 33.447761 | 131 | 0.692994 |
4a2647a927ddb3c65afb470e140ef45219d4f29d | 568 | py | Python | contrib/coinkit/coinkit/__init__.py | gwangjin2/gwangcoin-core | 588e357e13c385906729d9078b796dd740745445 | [
"MIT"
] | 2 | 2017-12-12T23:20:33.000Z | 2021-04-15T23:10:38.000Z | contrib/coinkit/coinkit/__init__.py | gwangjin2/gwangcoin-core | 588e357e13c385906729d9078b796dd740745445 | [
"MIT"
] | null | null | null | contrib/coinkit/coinkit/__init__.py | gwangjin2/gwangcoin-core | 588e357e13c385906729d9078b796dd740745445 | [
"MIT"
] | 3 | 2016-04-03T18:45:17.000Z | 2021-04-15T23:30:04.000Z | # -*- coding: utf-8 -*-
"""
Coinkit
~~~~~
:copyright: (c) 2014 by Halfmoon Labs
:license: MIT, see LICENSE for more details.
"""
__version__ = '0.4.2'
from .entropy import random_secret_exponent
from .passphrase import random_256bit_passphrase, random_160bit_passphrase
from .b58check import b58check_... | 29.894737 | 74 | 0.764085 |
4a264819af5d3d20cbe8e6b03c43852a5b07cafd | 599 | py | Python | googleapiclient/version.py | abhi-hash256/google-api-python-client | 9c24f44980a43b4d467532f0ac05fa6a04c53758 | [
"Apache-2.0"
] | 1 | 2022-03-21T16:06:04.000Z | 2022-03-21T16:06:04.000Z | googleapiclient/version.py | hermann-wenninger/google-api-python-client | 9c24f44980a43b4d467532f0ac05fa6a04c53758 | [
"Apache-2.0"
] | null | null | null | googleapiclient/version.py | hermann-wenninger/google-api-python-client | 9c24f44980a43b4d467532f0ac05fa6a04c53758 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | 37.4375 | 74 | 0.75626 |
4a2649322c9803f3d4a93af2f1c3a69f141e58de | 2,535 | py | Python | examples/ping.py | awesome-security/impacket | 240e760ab543f11c913d11b1bfca26be28ed1c91 | [
"Apache-1.1"
] | 106 | 2019-03-04T21:31:47.000Z | 2021-08-13T01:51:31.000Z | examples/ping.py | awesome-security/impacket | 240e760ab543f11c913d11b1bfca26be28ed1c91 | [
"Apache-1.1"
] | null | null | null | examples/ping.py | awesome-security/impacket | 240e760ab543f11c913d11b1bfca26be28ed1c91 | [
"Apache-1.1"
] | 21 | 2019-06-13T22:57:52.000Z | 2021-12-18T11:39:01.000Z | #!/usr/bin/env python
# SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved.
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# Simple ICMP ping.
#
# This implementation of ping use... | 28.806818 | 108 | 0.729783 |
4a26493b80cd43970fd57f6d34cb57328a1c4da6 | 888 | py | Python | test/test_patch_apply.py | vishwas1234567/tensorflow-determinism | ed01f5f34951aa113fb5907570ba6df98ebf9d8a | [
"Apache-2.0"
] | null | null | null | test/test_patch_apply.py | vishwas1234567/tensorflow-determinism | ed01f5f34951aa113fb5907570ba6df98ebf9d8a | [
"Apache-2.0"
] | null | null | null | test/test_patch_apply.py | vishwas1234567/tensorflow-determinism | ed01f5f34951aa113fb5907570ba6df98ebf9d8a | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 NVIDIA Corporation. 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 l... | 32.888889 | 74 | 0.71509 |
4a26495153891cc7fe22bfc89542a395b4db312b | 1,728 | py | Python | pidal/lib/snowflake.py | pi-plan/pidal | bfd1b9c4de87bc92565acbcff108270265757e39 | [
"BSD-3-Clause"
] | 6 | 2021-02-05T04:21:00.000Z | 2021-11-29T06:46:21.000Z | pidal/lib/snowflake.py | pi-plan/pidal | bfd1b9c4de87bc92565acbcff108270265757e39 | [
"BSD-3-Clause"
] | 1 | 2021-11-30T06:08:53.000Z | 2021-11-30T06:08:53.000Z | pidal/lib/snowflake.py | pi-plan/pidal | bfd1b9c4de87bc92565acbcff108270265757e39 | [
"BSD-3-Clause"
] | null | null | null | import time
import logging
from typing import Generator
log = logging.getLogger(__name__)
twepoch = 1609430400000
worker_id_bits = 5
data_center_id_bits = 5
max_worker_id = -1 ^ (-1 << worker_id_bits)
max_data_center_id = -1 ^ (-1 << data_center_id_bits)
sequence_bits = 12
worker_id_shift = sequence_bits
data_cent... | 26.181818 | 79 | 0.632523 |
4a264a2a68426f09fc7e7cac5dc0cf2dc55bdfa6 | 437 | py | Python | AP1/calculadora.py | GiovannaPazello/Projetos-em-Python | 3cf7edbdf2a2350605a775389f7fe2cc7fe8032e | [
"MIT"
] | null | null | null | AP1/calculadora.py | GiovannaPazello/Projetos-em-Python | 3cf7edbdf2a2350605a775389f7fe2cc7fe8032e | [
"MIT"
] | null | null | null | AP1/calculadora.py | GiovannaPazello/Projetos-em-Python | 3cf7edbdf2a2350605a775389f7fe2cc7fe8032e | [
"MIT"
] | null | null | null | print('Calculadora')
nro1 = int(input("Digite o primeiro número: "))
nro2 = int(input("Digite o segundo número: "))
print("Menu")
print("1 - somar")
print("2 - subtrair")
print("3 - multiplicar")
print("4 - divisao")
operacao = int(input("Digite a opcao que deseja: "))
if operacao == 1:
soma = nro1 + nro2
pri... | 25.705882 | 52 | 0.640732 |
4a264af03807760c35bfb1e63787ac28bcc9f51f | 4,556 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/_paged_models.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/_paged_models.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 226 | 2019-07-24T07:57:21.000Z | 2019-10-15T01:07:24.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2018_02_01_preview/models/_paged_models.py | iscai-msft/azure-sdk-for-python | 83715b95c41e519d5be7f1180195e2fba136fc0f | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.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 ... | 34.515152 | 165 | 0.624451 |
4a264b41d715f0e83f4446389d82e552b97bc536 | 2,084 | py | Python | src/games/mcts/MctsNode.py | flegac/power4 | f178dd225f4b859d4292b134b6651bf119a45c30 | [
"Apache-2.0"
] | null | null | null | src/games/mcts/MctsNode.py | flegac/power4 | f178dd225f4b859d4292b134b6651bf119a45c30 | [
"Apache-2.0"
] | null | null | null | src/games/mcts/MctsNode.py | flegac/power4 | f178dd225f4b859d4292b134b6651bf119a45c30 | [
"Apache-2.0"
] | null | null | null | from math import sqrt, log2
from src.games.state.State import State
class MctsNode:
def __init__(self, state: State, parent=None) -> None:
self.parent = parent
self.depth = parent.depth + 1 if parent else 0
self.state = state
self.score = 0
self.games = 0
self._ch... | 36.561404 | 106 | 0.551344 |
4a264ca58a0b075a92fef7b1bb2b1863de5f730a | 1,526 | py | Python | predict.py | ArasAzimi/ai2r | 060a95f2091b3c93c17cce4c65da46e0aa792849 | [
"MIT"
] | 5 | 2018-12-18T02:14:38.000Z | 2021-09-09T01:19:22.000Z | predict.py | ArasAzimi/ai2r | 060a95f2091b3c93c17cce4c65da46e0aa792849 | [
"MIT"
] | 1 | 2019-01-14T01:57:21.000Z | 2019-01-14T01:57:21.000Z | predict.py | ArasAzimi/ai2r | 060a95f2091b3c93c17cce4c65da46e0aa792849 | [
"MIT"
] | null | null | null | from src.predict import Predict
def main():
import cv2
import argparse
import os
# construct the argument parser and parse the arguments
ap = argparse.ArgumentParser()
ap.add_argument("-i", "--image", required=True, help="path to input image")
args = vars(ap.parse_args())
image = args["image"]
out_dir = 'ou... | 28.259259 | 90 | 0.686763 |
4a264cc6ff1c1126add8710c99179801f212c6cf | 15,576 | py | Python | src/sparseml/pytorch/optim/modifier_quantization.py | natuan/sparseml | 299fbf87ab31a642f363dde4d403acdc38d96bc4 | [
"Apache-2.0"
] | 1 | 2021-06-03T09:16:09.000Z | 2021-06-03T09:16:09.000Z | src/sparseml/pytorch/optim/modifier_quantization.py | natuan/sparseml | 299fbf87ab31a642f363dde4d403acdc38d96bc4 | [
"Apache-2.0"
] | null | null | null | src/sparseml/pytorch/optim/modifier_quantization.py | natuan/sparseml | 299fbf87ab31a642f363dde4d403acdc38d96bc4 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 - present / Neuralmagic, 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 b... | 40.352332 | 88 | 0.657935 |
4a264d7376edb50f9a137afdcee090824e6397da | 2,496 | py | Python | moocng/decorators.py | OpenMOOC/moocng | 1e3dafb84aa1838c881df0c9bcca069e47c7f52d | [
"Apache-2.0"
] | 36 | 2015-01-10T06:00:36.000Z | 2020-03-19T10:06:59.000Z | moocng/decorators.py | OpenMOOC/moocng | 1e3dafb84aa1838c881df0c9bcca069e47c7f52d | [
"Apache-2.0"
] | 3 | 2015-10-01T17:59:32.000Z | 2018-09-04T03:32:17.000Z | moocng/decorators.py | OpenMOOC/moocng | 1e3dafb84aa1838c881df0c9bcca069e47c7f52d | [
"Apache-2.0"
] | 17 | 2015-01-13T03:46:58.000Z | 2020-07-05T06:29:51.000Z | # -*- coding: utf-8 -*-
# Copyright 2012-2013 UNED
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 43.034483 | 89 | 0.692708 |
4a264fb00faf3418a333ea50aa3e6ba3019b7a1b | 2,602 | py | Python | src/dynamic-route-agent/dra/introspect_service.py | khappucino/global-traffic-management | 81a80ae86c9119066c92df0727554cb5b61f9899 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/dynamic-route-agent/dra/introspect_service.py | khappucino/global-traffic-management | 81a80ae86c9119066c92df0727554cb5b61f9899 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/dynamic-route-agent/dra/introspect_service.py | khappucino/global-traffic-management | 81a80ae86c9119066c92df0727554cb5b61f9899 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2018 Nordstrom, Inc.
#
# 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 w... | 39.424242 | 106 | 0.642198 |
4a26507f0088ee524235e93e4e971112fb3d2911 | 600 | py | Python | api/filters.py | amirh-moshfeghi/kudo_cards | 65167e1d09051bc6172e07b01c40ea2765b5a277 | [
"Linux-OpenIB"
] | null | null | null | api/filters.py | amirh-moshfeghi/kudo_cards | 65167e1d09051bc6172e07b01c40ea2765b5a277 | [
"Linux-OpenIB"
] | null | null | null | api/filters.py | amirh-moshfeghi/kudo_cards | 65167e1d09051bc6172e07b01c40ea2765b5a277 | [
"Linux-OpenIB"
] | null | null | null | from django_filters import rest_framework as filters
from .models import Kudo
# We create filters for each field we want to be able to filter on
class KudoFilter(filters.FilterSet):
title = filters.CharFilter(lookup_expr='icontains')
year = filters.NumberFilter()
year__gt = filters.NumberFilter(field_name... | 37.5 | 76 | 0.726667 |
4a26515272d21dfbb96b944f42a77d9f57f5b8cf | 1,790 | py | Python | var/spack/repos/builtin/packages/libspatialite/package.py | klevzoff/spack | 396936d24173254ecf4148bc460702185e4c99e5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-10T13:47:48.000Z | 2019-04-17T13:05:17.000Z | var/spack/repos/builtin/packages/libspatialite/package.py | klevzoff/spack | 396936d24173254ecf4148bc460702185e4c99e5 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 17 | 2019-03-21T15:54:00.000Z | 2022-03-29T19:34:28.000Z | var/spack/repos/builtin/packages/libspatialite/package.py | Kerilk/spack | e027942b55407a4a5fe323b93d8e57200c873a43 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2018-04-06T09:04:11.000Z | 2020-01-24T12:52:12.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack import *
class Libspatialite(AutotoolsPackage):
"""SpatiaLite is an open source library intende... | 41.627907 | 111 | 0.718994 |
4a2651957a34fe8f8f4c453104b8270818a266ee | 13,026 | py | Python | official/cv/yolov3_resnet18/src/dataset.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/yolov3_resnet18/src/dataset.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/yolov3_resnet18/src/dataset.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 41.75 | 119 | 0.578689 |
4a2651e26a1ed7e60e02b74322d46aeb196b03c2 | 7,084 | py | Python | examples/heat-source-mpi.py | jlevine18/mirgecom | e044197cf1535a2e9742b7d97b91be4eba98db2c | [
"MIT"
] | null | null | null | examples/heat-source-mpi.py | jlevine18/mirgecom | e044197cf1535a2e9742b7d97b91be4eba98db2c | [
"MIT"
] | 1 | 2021-08-11T16:21:21.000Z | 2021-08-11T16:21:21.000Z | examples/heat-source-mpi.py | dshtey2/mirgecom | 5089accba9f7954ca426ee5b3bd97c511e4f6861 | [
"MIT"
] | null | null | null | """Demonstrate heat source example."""
__copyright__ = "Copyright (C) 2020 University of Illinois Board of Trustees"
__license__ = """
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 rest... | 32.347032 | 83 | 0.669819 |
4a26525ac2a0772d60cb0154c6a730eb29336e96 | 10,931 | py | Python | im2txt/tf_cider.py | wangheda/ImageCaption-UnderFitting | ca98807d3a35a40a35446678d7e7b43242767a63 | [
"Apache-2.0"
] | 8 | 2018-05-08T12:29:56.000Z | 2021-04-07T03:11:32.000Z | im2txt/tf_cider.py | wangheda/ImageCaption-UnderFitting | ca98807d3a35a40a35446678d7e7b43242767a63 | [
"Apache-2.0"
] | null | null | null | im2txt/tf_cider.py | wangheda/ImageCaption-UnderFitting | ca98807d3a35a40a35446678d7e7b43242767a63 | [
"Apache-2.0"
] | 4 | 2017-12-22T02:10:38.000Z | 2021-04-07T03:12:24.000Z |
import json
import tensorflow as tf
import numpy as np
import sys
tf.flags.DEFINE_integer("max_vocab_size", 10000,
"Don't change this.")
tf.flags.DEFINE_string("document_frequency_file",
"data/document_frequency.json",
"File containing the documen... | 41.249057 | 128 | 0.609642 |
4a26531c58e3c1e3bfa11d76a73cdb07d28faaba | 3,485 | py | Python | Avengers_Of_GitHub/settings.py | AnubhavMadhav/Avengers-Of-GitHub | eb26a9aa65a60a8742ec2ee20ff4bbe3c9863fbb | [
"MIT"
] | 36 | 2020-05-16T18:35:16.000Z | 2022-02-22T03:53:09.000Z | Avengers_Of_GitHub/settings.py | AnubhavMadhav/Avengers-Of-GitHub | eb26a9aa65a60a8742ec2ee20ff4bbe3c9863fbb | [
"MIT"
] | 8 | 2020-05-17T15:44:56.000Z | 2021-09-22T19:01:28.000Z | Avengers_Of_GitHub/settings.py | AnubhavMadhav/Avengers-Of-GitHub | eb26a9aa65a60a8742ec2ee20ff4bbe3c9863fbb | [
"MIT"
] | 3 | 2020-05-30T07:41:18.000Z | 2020-06-11T19:54:32.000Z | """
Django settings for Avengers_Of_GitHub project.
Generated by 'django-admin startproject' using Django 3.0.5.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
i... | 27.65873 | 91 | 0.706169 |
4a265386a07d05cd00051869e3144095195fe9e7 | 7,053 | py | Python | libcxx/utils/generate_header_tests.py | LaudateCorpus1/llvm-project | ff2e0f0c1112558b3f30d8afec7c9882c33c79e3 | [
"Apache-2.0"
] | null | null | null | libcxx/utils/generate_header_tests.py | LaudateCorpus1/llvm-project | ff2e0f0c1112558b3f30d8afec7c9882c33c79e3 | [
"Apache-2.0"
] | null | null | null | libcxx/utils/generate_header_tests.py | LaudateCorpus1/llvm-project | ff2e0f0c1112558b3f30d8afec7c9882c33c79e3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import glob
import os
import posixpath
import re
def get_libcxx_paths():
utils_path = os.path.dirname(os.path.abspath(__file__))
script_name = os.path.basename(__file__)
assert os.path.exists(utils_path)
src_root = os.path.dirname(utils_path)
include_path = os.path.join(src_... | 33.112676 | 111 | 0.667801 |
4a2653b2cf9c33c3287bc94bf19ad5a02463974c | 5,677 | py | Python | tests/eval_tests.py | andybalaam/cell | 03d0670f9ebd513a983b9327108a84f2eff8ee75 | [
"MIT"
] | 118 | 2016-10-17T09:04:42.000Z | 2021-12-31T03:00:55.000Z | tests/eval_tests.py | JoeyCluett/cell | a3203731e0c63a55955509e843fb99e38cf7cc7c | [
"MIT"
] | 4 | 2019-01-23T09:59:43.000Z | 2020-11-02T11:00:38.000Z | tests/eval_tests.py | JoeyCluett/cell | a3203731e0c63a55955509e843fb99e38cf7cc7c | [
"MIT"
] | 21 | 2016-06-05T08:05:53.000Z | 2022-01-29T10:08:47.000Z |
from tests.util.asserts import assert_that, assert_fails, equals
from tests.util.test import test
from pycell.lexer import lex
from pycell.parser import parse
from pycell.eval_ import eval_expr, eval_list
from pycell.env import Env
# --- Utils ---
def evald(inp, env=None):
if env is None:
env = Env()
... | 23.753138 | 96 | 0.55399 |
4a2653d0b031f53616bdf84842787f011d448ecd | 1,273 | py | Python | MF.py | ahsanabbas123/Recommender-System | 68804e68fbcadaaa909cbde4a27ee7176390a0f3 | [
"MIT"
] | null | null | null | MF.py | ahsanabbas123/Recommender-System | 68804e68fbcadaaa909cbde4a27ee7176390a0f3 | [
"MIT"
] | null | null | null | MF.py | ahsanabbas123/Recommender-System | 68804e68fbcadaaa909cbde4a27ee7176390a0f3 | [
"MIT"
] | 1 | 2020-12-08T09:45:06.000Z | 2020-12-08T09:45:06.000Z | # Import libraries
import numpy as np
import pandas as pd
import argparse
import os
# Getting the required packages from the Surprise library
# Surprise is a Python scikit for building and analyzing recommender systems that deal with explicit rating data
from surprise import SVD
from surprise import Dataset
from surp... | 28.288889 | 112 | 0.760408 |
4a2653d2722a04c49242fb9ccb0891803970fd9c | 595 | py | Python | leetcode/palindromic_substrings/palindromic_substrings.py | sagasu/python-algorithms | d630777a3f17823165e4d72ab780ede7b10df752 | [
"MIT"
] | null | null | null | leetcode/palindromic_substrings/palindromic_substrings.py | sagasu/python-algorithms | d630777a3f17823165e4d72ab780ede7b10df752 | [
"MIT"
] | null | null | null | leetcode/palindromic_substrings/palindromic_substrings.py | sagasu/python-algorithms | d630777a3f17823165e4d72ab780ede7b10df752 | [
"MIT"
] | null | null | null | class Solution:
def countSubstrings(self, s: str) -> int:
N = len(s)
count = 0
for mid in range(N):
left = mid
right = mid
while left >= 0 and right < N and s[left] == s[right]:
left -= 1
right += 1
count +... | 24.791667 | 70 | 0.363025 |
4a26540de67574abfbab30598d70643d06e036d9 | 1,169 | py | Python | public/models.py | Andrew-Chen-Wang/django-stripe-subscription | bb6031cda032784858bb484771f9a1da35b54169 | [
"MIT"
] | 1 | 2020-02-13T15:52:52.000Z | 2020-02-13T15:52:52.000Z | public/models.py | Andrew-Chen-Wang/django-stripe-subscription | bb6031cda032784858bb484771f9a1da35b54169 | [
"MIT"
] | 6 | 2020-06-05T20:52:33.000Z | 2021-09-22T18:30:41.000Z | public/models.py | Andrew-Chen-Wang/django-stripe-subscription | bb6031cda032784858bb484771f9a1da35b54169 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.conf import settings
class Profile(models.Model):
"""
Extra information that isn't accessed as much as the User model.
This example code uses the Client + Server integration method because
we want to remember a custom... | 33.4 | 80 | 0.74337 |
4a2654c6cb76d1ae1393640d5762e3c97193e700 | 84 | py | Python | djangobench/benchmarks/query_in_bulk/settings.py | smithdc1/djangobench | 912dc536db706fb73d24a53d10d1739a0824d2c1 | [
"BSD-3-Clause"
] | 92 | 2015-02-07T11:03:45.000Z | 2022-03-23T10:51:06.000Z | djangobench/benchmarks/query_in_bulk/settings.py | smithdc1/djangobench | 912dc536db706fb73d24a53d10d1739a0824d2c1 | [
"BSD-3-Clause"
] | 19 | 2015-03-22T14:30:03.000Z | 2022-03-24T22:43:24.000Z | djangobench/benchmarks/query_in_bulk/settings.py | smithdc1/djangobench | 912dc536db706fb73d24a53d10d1739a0824d2c1 | [
"BSD-3-Clause"
] | 25 | 2015-01-22T19:53:25.000Z | 2022-03-20T11:15:54.000Z | from djangobench.base_settings import * # NOQA
INSTALLED_APPS = ['query_in_bulk']
| 21 | 47 | 0.77381 |
4a2654daab98f63dbfff863fb8e989f78f42543b | 1,418 | py | Python | app/recipe/serializers.py | EliasOPrado/recipe-app-api | 4ae20e7cb3195fa742fc6d2934f3fd5100e3c062 | [
"MIT"
] | null | null | null | app/recipe/serializers.py | EliasOPrado/recipe-app-api | 4ae20e7cb3195fa742fc6d2934f3fd5100e3c062 | [
"MIT"
] | null | null | null | app/recipe/serializers.py | EliasOPrado/recipe-app-api | 4ae20e7cb3195fa742fc6d2934f3fd5100e3c062 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from core.models import Tag, Ingredient, Recipe
class TagSerializer(serializers.ModelSerializer):
""" Serializer for tag objects """
class Meta:
model = Tag
fields = ['id', 'name']
read_only_fields = ['id']
class IngredientSerializer(serializer... | 27.269231 | 88 | 0.655148 |
4a26556d94198daa7c73bc05e74dd06a0f620615 | 2,866 | py | Python | var/spack/repos/builtin/packages/r-brms/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1 | 2021-11-04T17:08:15.000Z | 2021-11-04T17:08:15.000Z | var/spack/repos/builtin/packages/r-brms/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 23 | 2021-01-25T15:13:45.000Z | 2022-03-28T20:19:04.000Z | var/spack/repos/builtin/packages/r-brms/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 7 | 2018-09-13T18:04:56.000Z | 2020-03-18T20:52:06.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RBrms(RPackage):
"""Bayesian Regression Models using 'Stan':
Fit Bayesian generalized... | 52.109091 | 96 | 0.682484 |
4a2655cf14da7dc7a481f8ede62a301d3d9ccbbd | 55,807 | py | Python | addons/osfstorage/tests/test_views.py | kounoAkihiro/SV-COS-osf.io | 0a9a68bbf9cf254d2e900d49b20d8a8e6e359c21 | [
"Apache-2.0"
] | null | null | null | addons/osfstorage/tests/test_views.py | kounoAkihiro/SV-COS-osf.io | 0a9a68bbf9cf254d2e900d49b20d8a8e6e359c21 | [
"Apache-2.0"
] | 16 | 2020-03-24T16:30:32.000Z | 2022-03-03T22:39:45.000Z | addons/osfstorage/tests/test_views.py | kounoAkihiro/SV-COS-osf.io | 0a9a68bbf9cf254d2e900d49b20d8a8e6e359c21 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
from __future__ import unicode_literals
import json
import mock
import datetime
import pytest
import responses
from nose.tools import * # noqa
from dateutil.parser import parse as parse_datetime
from website import settings
from addons.osfstorage.models import OsfStorageFileNode, OsfStorageFolder
... | 37.479516 | 118 | 0.627807 |
4a2656b804a5ca954a770e7a6addf69d2637b32b | 1,070 | py | Python | examples/rules/TaskHasTag.py | tonipamies/ansible-lint | 7c82e774dbecf1cdd0757fc3ca774849534b29bc | [
"MIT"
] | null | null | null | examples/rules/TaskHasTag.py | tonipamies/ansible-lint | 7c82e774dbecf1cdd0757fc3ca774849534b29bc | [
"MIT"
] | null | null | null | examples/rules/TaskHasTag.py | tonipamies/ansible-lint | 7c82e774dbecf1cdd0757fc3ca774849534b29bc | [
"MIT"
] | null | null | null | """Example implementation of a rule requiring tasks to have tags set."""
from ansiblelint.rules import AnsibleLintRule
class TaskHasTag(AnsibleLintRule):
"""Tasks must have tag."""
id = 'EXAMPLE001'
shortdesc = 'Tasks must have tag'
description = 'Tasks must have tag'
tags = ['productivity', 'tag... | 28.157895 | 72 | 0.592523 |
4a2656bd124c3f265419f37400b3f4026fddddd6 | 1,763 | py | Python | qiskit_metal/tests/test_gui_basic.py | rupeshknn/qiskit-metal | 94d2cd1ecac4b42828bca855adedcea5a6afe3b2 | [
"Apache-2.0"
] | null | null | null | qiskit_metal/tests/test_gui_basic.py | rupeshknn/qiskit-metal | 94d2cd1ecac4b42828bca855adedcea5a6afe3b2 | [
"Apache-2.0"
] | null | null | null | qiskit_metal/tests/test_gui_basic.py | rupeshknn/qiskit-metal | 94d2cd1ecac4b42828bca855adedcea5a6afe3b2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2021.
#
# 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... | 25.550725 | 77 | 0.654566 |
4a2656d17fbf208077789e571a4e3ebe62ff8bd5 | 2,238 | py | Python | languages/python3/dash/app.py | jcnaud/snippet | 10db24e2a648af29c51f6bc3a083ffe86e11ae5c | [
"Apache-2.0"
] | 5 | 2018-01-18T10:08:50.000Z | 2020-05-01T04:18:02.000Z | languages/python3/dash/app.py | jcnaud/snippet | 10db24e2a648af29c51f6bc3a083ffe86e11ae5c | [
"Apache-2.0"
] | null | null | null | languages/python3/dash/app.py | jcnaud/snippet | 10db24e2a648af29c51f6bc3a083ffe86e11ae5c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import dash
import dash_core_components as dcc
import dash_html_components as html
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
app.layout = html.Div(children=[
html.H1(children='Hello Dash'),
html... | 25.431818 | 83 | 0.471403 |
4a2657a3ec4be89c1f254a3781efc76635d6c2af | 42,430 | py | Python | extra/unused/pxfuncs.py | whyjz/CARST | 875c915e835b0e09a7eccb58833719bbfc85b635 | [
"MIT"
] | 10 | 2018-01-02T18:03:07.000Z | 2022-01-25T05:36:21.000Z | extra/unused/pxfuncs.py | whyjz/CARST | 875c915e835b0e09a7eccb58833719bbfc85b635 | [
"MIT"
] | 1 | 2020-04-14T16:57:15.000Z | 2020-05-15T16:10:17.000Z | extra/unused/pxfuncs.py | whyjz/CARST | 875c915e835b0e09a7eccb58833719bbfc85b635 | [
"MIT"
] | 4 | 2016-08-12T15:06:48.000Z | 2019-11-27T05:33:50.000Z | #!/usr/bin/python
# Author: Andrew Kenneth Melkonian
# All rights reserved
#import calendar;
#import fileinput;
from makeAzo import *;
import math;
import numpy;
import os;
#from pxfuncs import *;
import pylab;
import re;
import scipy;
import shutil;
import subprocess;
#import sys;
#import time;
def adjustPhase... | 29.485754 | 245 | 0.615107 |
4a265858cb387fa7e2cf4e16153a25cf47610f0c | 1,896 | py | Python | tests/components/homekit/test_type_triggers.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 7 | 2019-08-15T13:36:58.000Z | 2020-03-18T10:46:29.000Z | tests/components/homekit/test_type_triggers.py | basicpail/core | 5cc54618c5af3f75c08314bf2375cc7ac40d2b7e | [
"Apache-2.0"
] | 100 | 2020-06-17T22:22:41.000Z | 2022-03-31T06:24:19.000Z | tests/components/homekit/test_type_triggers.py | winning1120xx/home-assistant | 53d4c0ce2d374b5e97bbdc37742656c27adf8eea | [
"Apache-2.0"
] | 11 | 2020-12-16T13:48:14.000Z | 2022-02-01T00:28:05.000Z | """Test different accessory types: Triggers (Programmable Switches)."""
from unittest.mock import MagicMock
from homeassistant.components.homekit.type_triggers import DeviceTriggerAccessory
from homeassistant.const import STATE_OFF, STATE_ON
from homeassistant.setup import async_setup_component
from tests.common imp... | 32.689655 | 90 | 0.75 |
4a2658eee845a1c3ee9848750128da0c11abf7f7 | 459 | py | Python | venv/Scripts/easy_install-3.7-script.py | derysudrajat/Translate | 7ee7c62d10268166033bcf5c7c6254dcd4c7c055 | [
"MIT"
] | null | null | null | venv/Scripts/easy_install-3.7-script.py | derysudrajat/Translate | 7ee7c62d10268166033bcf5c7c6254dcd4c7c055 | [
"MIT"
] | null | null | null | venv/Scripts/easy_install-3.7-script.py | derysudrajat/Translate | 7ee7c62d10268166033bcf5c7c6254dcd4c7c055 | [
"MIT"
] | null | null | null | #!C:\Users\ASUS\PycharmProjects\Translate\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install-3.7'
__requires__ = 'setuptools==39.1.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.py... | 35.307692 | 87 | 0.694989 |
4a265a09a4ecaf80eed578a082070b3972e744e8 | 7,384 | py | Python | thothlibrary/mutation.py | dqprogramming/thoth-client | 616a2286efd562d580568b9d80e439343c19e1fb | [
"MIT"
] | 3 | 2021-07-27T17:46:32.000Z | 2021-10-12T15:46:43.000Z | thothlibrary/mutation.py | dqprogramming/thoth-client | 616a2286efd562d580568b9d80e439343c19e1fb | [
"MIT"
] | null | null | null | thothlibrary/mutation.py | dqprogramming/thoth-client | 616a2286efd562d580568b9d80e439343c19e1fb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
GraphQL client for Thoth
(c) Open Book Publishers, February 2020
This programme is free software; you may redistribute and/or modify
it under the terms of the Apache License v2.0.
"""
import json
import urllib
from .errors import ThothError
class ThothMutation():
"""GraphQL mutation ... | 32.672566 | 79 | 0.463841 |
4a265a8a40f890ccf8bc0958235d99156edec773 | 2,972 | py | Python | siam_tracker/benchmarks/data/vot.py | microsoft/PySiamTracking | a82dabeaa42a7816dbd8e823da7b7e92ebb622ce | [
"MIT"
] | 28 | 2020-03-18T04:41:21.000Z | 2022-02-24T16:44:01.000Z | siam_tracker/benchmarks/data/vot.py | HengFan2010/PySiamTracking | a82dabeaa42a7816dbd8e823da7b7e92ebb622ce | [
"MIT"
] | 1 | 2020-04-05T15:23:22.000Z | 2020-04-07T16:23:12.000Z | siam_tracker/benchmarks/data/vot.py | HengFan2010/PySiamTracking | a82dabeaa42a7816dbd8e823da7b7e92ebb622ce | [
"MIT"
] | 11 | 2020-03-19T00:30:06.000Z | 2021-11-10T08:22:35.000Z | import os
import numpy as np
from .base_data import Dataset, Sequence
from ..utils import read_file
from ..builder import BENCHMARKS
@BENCHMARKS.register_module
class VOT(Dataset):
def __init__(self,
name='vot',
vot_root='data/benchmark/vot17/',
zip_mode=False)... | 37.620253 | 105 | 0.5821 |
4a265dbfbb52ff2693eeef28547374a23730396c | 2,495 | py | Python | backend/api/python_http_client/test/test_api_report_run_metrics_request.py | FrancisLfg/pipelines | b0466cb9626407f125bf7ce2c9de37991e654a6d | [
"Apache-2.0"
] | null | null | null | backend/api/python_http_client/test/test_api_report_run_metrics_request.py | FrancisLfg/pipelines | b0466cb9626407f125bf7ce2c9de37991e654a6d | [
"Apache-2.0"
] | null | null | null | backend/api/python_http_client/test/test_api_report_run_metrics_request.py | FrancisLfg/pipelines | b0466cb9626407f125bf7ce2c9de37991e654a6d | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 33.266667 | 138 | 0.676954 |
4a265f4c5a64df6d722eef18391454eae2ad69a1 | 5,031 | py | Python | tests/test_packages/test_skills_integration/test_coin_price.py | bryanchriswhite/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | 1 | 2022-01-23T22:28:43.000Z | 2022-01-23T22:28:43.000Z | tests/test_packages/test_skills_integration/test_coin_price.py | salman6049/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | null | null | null | tests/test_packages/test_skills_integration/test_coin_price.py | salman6049/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the ... | 39.304688 | 114 | 0.636255 |
4a266002989791867cf4545fe65b05f759b2a16f | 1,873 | py | Python | venv/Lib/site-packages/pyrogram/raw/base/payment_charge.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 5 | 2021-09-11T22:01:15.000Z | 2022-03-16T21:33:42.000Z | backend/pyrogram/raw/base/payment_charge.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | null | null | null | backend/pyrogram/raw/base/payment_charge.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | 3 | 2022-01-18T11:06:22.000Z | 2022-02-26T13:39:28.000Z | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 37.46 | 92 | 0.641217 |
4a266023c87aaa921a04897001c3cc745dd37909 | 21,376 | py | Python | tests/integration/package/test_package_command_zip.py | westonsteimel/aws-sam-cli | eeb462e50b41b408da3b8c7df618f5a0e3a4f3dc | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | tests/integration/package/test_package_command_zip.py | westonsteimel/aws-sam-cli | eeb462e50b41b408da3b8c7df618f5a0e3a4f3dc | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | tests/integration/package/test_package_command_zip.py | westonsteimel/aws-sam-cli | eeb462e50b41b408da3b8c7df618f5a0e3a4f3dc | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | import os
import pathlib
import re
from subprocess import Popen, PIPE, TimeoutExpired
import tempfile
from unittest import skipIf
from parameterized import parameterized, param
from samcli.lib.utils.hash import dir_checksum, file_checksum
from samcli.lib.warnings.sam_cli_warning import CodeDeployWarning
from .package... | 38.865455 | 123 | 0.591832 |
4a2660d1dd5fedffca147810343fcd4ed3e4e03c | 4,897 | py | Python | program_slicing/graph/convert/cdg.py | acheshkov/program_slicing | 124d2dcf6c9c2cd8e505b96f4f47f3ea98f0a260 | [
"MIT"
] | 5 | 2021-11-06T04:35:17.000Z | 2022-03-21T09:11:54.000Z | program_slicing/graph/convert/cdg.py | acheshkov/program_slicing | 124d2dcf6c9c2cd8e505b96f4f47f3ea98f0a260 | [
"MIT"
] | 19 | 2021-11-15T14:42:56.000Z | 2022-02-01T14:30:34.000Z | program_slicing/graph/convert/cdg.py | acheshkov/program_slicing | 124d2dcf6c9c2cd8e505b96f4f47f3ea98f0a260 | [
"MIT"
] | null | null | null | __licence__ = 'MIT'
__author__ = 'kuyaki'
__credits__ = ['kuyaki']
__maintainer__ = 'kuyaki'
__date__ = '2021/04/01'
from typing import Dict, List
from program_slicing.graph.cdg import ControlDependenceGraph
from program_slicing.graph.cfg import ControlFlowGraph
from program_slicing.graph.ddg import DataDependenceGra... | 39.813008 | 120 | 0.700837 |
4a266106cdb808a33ff7ef5ee9224b147c18711e | 1,615 | py | Python | tests/conftest.py | adamkusmirek/mkdocs-static-i18n | c8be7dd86a7b0b951414e18b93b2a7b7ea439373 | [
"MIT"
] | null | null | null | tests/conftest.py | adamkusmirek/mkdocs-static-i18n | c8be7dd86a7b0b951414e18b93b2a7b7ea439373 | [
"MIT"
] | null | null | null | tests/conftest.py | adamkusmirek/mkdocs-static-i18n | c8be7dd86a7b0b951414e18b93b2a7b7ea439373 | [
"MIT"
] | null | null | null | import tempfile
import pytest
from mkdocs.config.base import load_config
@pytest.fixture
def config_base():
with tempfile.TemporaryDirectory(prefix="mkdocs_tests_") as site_dir:
return load_config(
"tests/mkdocs_base.yml", docs_dir="../docs/", site_dir=site_dir
)
@pytest.fixture
def... | 27.372881 | 86 | 0.668111 |
4a2661efb470c1729b1b26483256e864f7e0395f | 12,169 | py | Python | utils/utils.py | andreasmarxer/keras-yolo3 | b56bf38c830c6a57a299335aa2192fe845830264 | [
"MIT"
] | null | null | null | utils/utils.py | andreasmarxer/keras-yolo3 | b56bf38c830c6a57a299335aa2192fe845830264 | [
"MIT"
] | null | null | null | utils/utils.py | andreasmarxer/keras-yolo3 | b56bf38c830c6a57a299335aa2192fe845830264 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import os
from .bbox import BoundBox, bbox_iou
from scipy.special import expit
def _sigmoid(x):
return expit(x)
def makedirs(path):
try:
os.makedirs(path)
except OSError:
if not os.path.isdir(path):
raise
def evaluate(model,
generator... | 36.434132 | 135 | 0.599638 |
4a2663218fac23d533f18bddaa5a4264609e9b6c | 22,805 | py | Python | networkx/readwrite/tests/test_gexf.py | ibraheem-moosa/networkx | fe8ac9f2d9c66e0337e11688078fdaccc90052cd | [
"BSD-3-Clause"
] | 1 | 2020-08-20T03:02:00.000Z | 2020-08-20T03:02:00.000Z | networkx/readwrite/tests/test_gexf.py | hugs314/networkx | 7b4168bdb09275a2ed860b01b9dbb77a151d85c6 | [
"BSD-3-Clause"
] | null | null | null | networkx/readwrite/tests/test_gexf.py | hugs314/networkx | 7b4168bdb09275a2ed860b01b9dbb77a151d85c6 | [
"BSD-3-Clause"
] | null | null | null | import io
import sys
import time
import pytest
import networkx as nx
class TestGEXF:
@classmethod
def setup_class(cls):
_ = pytest.importorskip("xml.etree.ElementTree")
cls.simple_directed_data = """<?xml version="1.0" encoding="UTF-8"?>
<gexf xmlns="http://www.gexf.net/1.2draft" version="1.... | 34.658055 | 85 | 0.545056 |
4a26648869af28ec0b7f28ff31ae30b04775baa5 | 259 | py | Python | Chapter05/datetimes_01.py | vabyte/Modern-Python-Standard-Library-Cookbook | 4f53e3ab7b61aca1cca9343e7421e170280cd5b5 | [
"MIT"
] | 84 | 2018-08-09T09:30:03.000Z | 2022-01-04T23:20:38.000Z | Chapter05/datetimes_01.py | jiro74/Modern-Python-Standard-Library-Cookbook | 4f53e3ab7b61aca1cca9343e7421e170280cd5b5 | [
"MIT"
] | 1 | 2019-11-04T18:57:40.000Z | 2020-09-07T08:52:25.000Z | Chapter05/datetimes_01.py | jiro74/Modern-Python-Standard-Library-Cookbook | 4f53e3ab7b61aca1cca9343e7421e170280cd5b5 | [
"MIT"
] | 33 | 2018-09-26T11:05:55.000Z | 2022-03-15T10:31:10.000Z | import datetime
def now():
return datetime.datetime.utcnow().replace(tzinfo=datetime.timezone.utc)
def astimezone(d, offset):
return d.astimezone(datetime.timezone(datetime.timedelta(hours=offset)))
d = now()
print(d)
d = astimezone(d, 1)
print(d)
| 19.923077 | 76 | 0.733591 |
4a2665379ab538120810c72d37bc108e504ce264 | 23,263 | py | Python | sympy/printing/fcode.py | GayanSandaruwan/sympy | 7b127bdf71a36d85216315f80c1b54d22b060818 | [
"BSD-3-Clause"
] | null | null | null | sympy/printing/fcode.py | GayanSandaruwan/sympy | 7b127bdf71a36d85216315f80c1b54d22b060818 | [
"BSD-3-Clause"
] | null | null | null | sympy/printing/fcode.py | GayanSandaruwan/sympy | 7b127bdf71a36d85216315f80c1b54d22b060818 | [
"BSD-3-Clause"
] | 1 | 2020-01-01T19:49:22.000Z | 2020-01-01T19:49:22.000Z | """
Fortran code printer
The FCodePrinter converts single sympy expressions into single Fortran
expressions, using the functions defined in the Fortran 77 standard where
possible. Some useful pointers to Fortran can be found on wikipedia:
http://en.wikipedia.org/wiki/Fortran
Most of the code below is based on the "P... | 37.042994 | 108 | 0.549155 |
4a2665b628fbe584f2a8e7ced912de880d01d0f4 | 8,512 | py | Python | program/object-detection-tensorrt-loadgen-py/tensorrt_detect_loadgen.py | dsavenko/ck-mlperf | 55ab3d2ed4cd0e11fb3103f76429a6ebec3ea788 | [
"BSD-3-Clause"
] | 35 | 2018-09-20T10:21:43.000Z | 2021-07-28T15:01:48.000Z | program/object-detection-tensorrt-loadgen-py/tensorrt_detect_loadgen.py | dsavenko/ck-mlperf | 55ab3d2ed4cd0e11fb3103f76429a6ebec3ea788 | [
"BSD-3-Clause"
] | 25 | 2018-12-14T07:48:03.000Z | 2021-05-01T13:35:31.000Z | program/object-detection-tensorrt-loadgen-py/tensorrt_detect_loadgen.py | dsavenko/ck-mlperf | 55ab3d2ed4cd0e11fb3103f76429a6ebec3ea788 | [
"BSD-3-Clause"
] | 14 | 2018-12-13T18:57:11.000Z | 2021-04-27T14:32:51.000Z | #!/usr/bin/env python3
import array
import numpy as np
import os
import sys
import time
from coco_helper import (load_image_by_index_and_normalize, image_filenames, original_w_h,
class_labels, num_classes, bg_class_offset, class_map,
MODEL_DATA_LAYOUT, MODEL_USE_DLA, BATCH_SIZE,
MODEL_IMAGE_CHANNELS, MODE... | 40.923077 | 168 | 0.683153 |
4a2665f145842f18f5531d92dce8b3114a3f788c | 37,026 | py | Python | dependency_miner/ltminer.py | AshwiniJogbhat/dependency-miner-pm4py | 2b05781dd30d7462adce5dbd30cac5b6365e43fa | [
"MIT"
] | null | null | null | dependency_miner/ltminer.py | AshwiniJogbhat/dependency-miner-pm4py | 2b05781dd30d7462adce5dbd30cac5b6365e43fa | [
"MIT"
] | null | null | null | dependency_miner/ltminer.py | AshwiniJogbhat/dependency-miner-pm4py | 2b05781dd30d7462adce5dbd30cac5b6365e43fa | [
"MIT"
] | null | null | null | import copy
import os
from os import listdir
from os.path import isfile, join
import dependency_miner.settings as settings
#import Miner.to_petri_net_bordered as discover_net
#from Miner.helper_functions import *
from pm4py.objects.log.importer.xes import importer as xes_importer
import pm4py.objects.process_tree as p... | 36.732143 | 328 | 0.590747 |
4a26663ae2d365a402e0ba02ec71cf6f10d75768 | 3,587 | py | Python | samples/main_menu_simple.py | Werxzy/ursina | c897ab329e5c5489ac4073a3b4a26ed162f771c6 | [
"MIT"
] | 2 | 2018-01-27T14:25:22.000Z | 2018-05-17T20:06:04.000Z | samples/main_menu_simple.py | pokepetter/pandaeditor | 7c47279f7492ad2b70c6310600fd8a40a10848fb | [
"MIT"
] | null | null | null | samples/main_menu_simple.py | pokepetter/pandaeditor | 7c47279f7492ad2b70c6310600fd8a40a10848fb | [
"MIT"
] | null | null | null | from ursina import *
# Main Menu Example, or it can be any kind of menu, like Inventory, Quest journal, etc.
# Created by Doctor
# 09 Feb 21
# Edited version by @jasonheller on 07 Apr 22
# Class of game menu
class MenuMenu(Entity):
def __init__(self, **kwargs):
super().__init__(parent=camera.ui, ignore_p... | 36.979381 | 116 | 0.620574 |
4a26663cdd82019c971f03bf313d8b7fc4852002 | 3,390 | py | Python | app/auth/forms.py | gzxultra/FlaskLoginManagement | 0a36a36fa1322e91a35735280bb119c94d016592 | [
"MIT"
] | null | null | null | app/auth/forms.py | gzxultra/FlaskLoginManagement | 0a36a36fa1322e91a35735280bb119c94d016592 | [
"MIT"
] | null | null | null | app/auth/forms.py | gzxultra/FlaskLoginManagement | 0a36a36fa1322e91a35735280bb119c94d016592 | [
"MIT"
] | null | null | null | from flask_wtf import Form
from wtforms import StringField, PasswordField, BooleanField, SubmitField
from wtforms.validators import DataRequired, Length, Email, Regexp, EqualTo
from wtforms import ValidationError
from wtforms.fields import RadioField, SelectField
from ..models import User
class LoginMethodForm(Form):... | 44.025974 | 94 | 0.651327 |
4a26665270fd70e722a05d2a74779dd8e5474cde | 455 | py | Python | src/evaluation.py | skeptycal/twde-datalab | ba2038e0e9d9f05b53e2723bc18f93fdb73f462a | [
"Apache-2.0"
] | 53 | 2017-12-12T17:18:13.000Z | 2020-02-10T10:21:24.000Z | src/evaluation.py | thoughtworks/twde-datalab | 00702081a41ac0868d518eeea95a165c19ccd24e | [
"Apache-2.0"
] | 27 | 2017-12-08T10:11:57.000Z | 2018-09-03T11:36:47.000Z | src/evaluation.py | skeptycal/twde-datalab | ba2038e0e9d9f05b53e2723bc18f93fdb73f462a | [
"Apache-2.0"
] | 14 | 2018-01-28T10:41:39.000Z | 2020-01-08T19:56:48.000Z | import numpy as np
import pandas as pd
def nwrmsle(predictions, targets, weights):
predictions = np.array([x if x > 0 else 0 for x in list(predictions)])
targetsf = targets.astype(float)
targetsf = np.array([x if x > 0 else 0 for x in list(targetsf)])
weights = 1 + 0.25 * weights
log_square_err... | 30.333333 | 77 | 0.668132 |
4a26667a776374657bc0715ab94124e21b7b5228 | 5,768 | py | Python | __dump__/_x_segslice.py | fakegit/mo-han-toolbox | 9d5bbc1fe7f12040715d3a0d3f320a1ad617aed8 | [
"MIT"
] | 24 | 2019-12-08T03:56:32.000Z | 2021-10-02T13:26:37.000Z | __dump__/_x_segslice.py | fakegit/mo-han-toolbox | 9d5bbc1fe7f12040715d3a0d3f320a1ad617aed8 | [
"MIT"
] | 2 | 2020-04-27T14:20:01.000Z | 2020-07-17T06:05:33.000Z | __dump__/_x_segslice.py | fakegit/mo-han-toolbox | 9d5bbc1fe7f12040715d3a0d3f320a1ad617aed8 | [
"MIT"
] | 10 | 2019-08-06T01:11:28.000Z | 2021-07-19T08:45:11.000Z | #!/usr/bin/env python3
# encoding=utf8
class Formatter:
def __init__(self, fmt_func=lambda x: x, mark=None):
self._fmt_func = fmt_func
self._mark = mark
def __call__(self, *args, **kwargs):
return self._fmt_func(*args, **kwargs)
def __hash__(self):
return hash(self._fmt_f... | 27.730769 | 119 | 0.509362 |
4a2666a7a4c10964001e6425d84360da643336ef | 1,435 | py | Python | ibis/sql/sqlite/api.py | hjoo/ibis | 72ece317337fb7d329337f20db930845a669ce85 | [
"Apache-2.0"
] | 5 | 2018-04-26T17:42:14.000Z | 2020-10-14T19:02:59.000Z | ibis/sql/sqlite/api.py | hjoo/ibis | 72ece317337fb7d329337f20db930845a669ce85 | [
"Apache-2.0"
] | 12 | 2018-04-07T03:13:34.000Z | 2020-07-13T15:45:34.000Z | ibis/sql/sqlite/api.py | ian-r-rose/ibis | c2323b8dfd7b56db821426513c379de38203b332 | [
"Apache-2.0"
] | 1 | 2020-10-01T18:48:01.000Z | 2020-10-01T18:48:01.000Z | # Copyright 2015 Cloudera Inc.
#
# 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, so... | 31.195652 | 76 | 0.725436 |
4a2667126470fba36ed8973ffd0e62fe87264e5e | 23,575 | py | Python | gui/kivy/uix/dialogs/installwizard.py | recryptproject/recrypt-electrum | 4898f1b2b265b4a5980893471a3ed40c92e44193 | [
"MIT"
] | null | null | null | gui/kivy/uix/dialogs/installwizard.py | recryptproject/recrypt-electrum | 4898f1b2b265b4a5980893471a3ed40c92e44193 | [
"MIT"
] | null | null | null | gui/kivy/uix/dialogs/installwizard.py | recryptproject/recrypt-electrum | 4898f1b2b265b4a5980893471a3ed40c92e44193 | [
"MIT"
] | null | null | null |
from functools import partial
import threading
from kivy.app import App
from kivy.clock import Clock
from kivy.lang import Builder
from kivy.properties import ObjectProperty, StringProperty, OptionProperty
from kivy.core.window import Window
from kivy.uix.button import Button
from kivy.utils import platform
from kivy... | 28.541162 | 125 | 0.562587 |
4a266847a6ed732b2115cd32026c7f35425a7d06 | 4,921 | py | Python | faceTk.py | snaily16/FaceFilters | 466e27041e53549d81ded3f8e099e5a1a696e6e9 | [
"MIT"
] | null | null | null | faceTk.py | snaily16/FaceFilters | 466e27041e53549d81ded3f8e099e5a1a696e6e9 | [
"MIT"
] | null | null | null | faceTk.py | snaily16/FaceFilters | 466e27041e53549d81ded3f8e099e5a1a696e6e9 | [
"MIT"
] | null | null | null | from tkinter import *
import cv2
import threading
import datetime
import os
import time
from PIL import Image, ImageTk
from FaceFilters import FaceFilters
class GUIFace:
def __init__(self, vs, fc, outPath):
self.vs = vs
self.fc = fc
self.outPath = outPath
self.frame = None
self.thread = None
self.stopEven... | 37.853846 | 145 | 0.687462 |
4a26685139d38367e6c8767a7d77fd703eacef36 | 917 | py | Python | Preprocessing/Zhang_psf/src/blackboxrepairers/calculators.py | maliha93/Fairness-Analysis-Code | acf13c6e7993704fc627249fe4ada44d8b616264 | [
"MIT"
] | null | null | null | Preprocessing/Zhang_psf/src/blackboxrepairers/calculators.py | maliha93/Fairness-Analysis-Code | acf13c6e7993704fc627249fe4ada44d8b616264 | [
"MIT"
] | null | null | null | Preprocessing/Zhang_psf/src/blackboxrepairers/calculators.py | maliha93/Fairness-Analysis-Code | acf13c6e7993704fc627249fe4ada44d8b616264 | [
"MIT"
] | null | null | null | from copy import deepcopy
def get_median(values):
"""
Given an unsorted list of numeric values, return median value (as a float).
Note that in the case of even-length lists of values, we apply the value to
the left of the center to be the median (such that the median can only be
a value from the list of valu... | 26.2 | 82 | 0.697928 |
4a266a2d8174cd3d49aebe2e67aa92ba5bdb69af | 1,966 | py | Python | test/unit/mysql_class/fetch_global_var.py | deepcoder42/mysql-lib | d3d2459e0476fdbc4465e1d9389612e58d36fb25 | [
"MIT"
] | 1 | 2022-03-23T04:53:19.000Z | 2022-03-23T04:53:19.000Z | test/unit/mysql_class/fetch_global_var.py | deepcoder42/mysql-lib | d3d2459e0476fdbc4465e1d9389612e58d36fb25 | [
"MIT"
] | null | null | null | test/unit/mysql_class/fetch_global_var.py | deepcoder42/mysql-lib | d3d2459e0476fdbc4465e1d9389612e58d36fb25 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Classification (U)
"""Program: fetch_global_var.py
Description: Unit testing of fetch_global_var in mysql_class.py.
Usage:
test/unit/mysql_class/fetch_global_var.py
Arguments:
"""
# Libraries and Global Variables
# Standard
import sys
import os
if sys.version_info < (2,... | 16.661017 | 78 | 0.620549 |
4a266a4aa2f2e727fa4178292e36bee6e400ea04 | 2,653 | py | Python | gdal/swig/python/samples/classify.py | jpapadakis/gdal | f07aa15fd65af36b04291303cc6834c87f662814 | [
"MIT"
] | 3,100 | 2015-01-02T10:33:40.000Z | 2022-03-31T02:06:51.000Z | gdal/swig/python/samples/classify.py | jpapadakis/gdal | f07aa15fd65af36b04291303cc6834c87f662814 | [
"MIT"
] | 3,496 | 2015-01-06T16:53:30.000Z | 2022-03-31T20:18:51.000Z | gdal/swig/python/samples/classify.py | jpapadakis/gdal | f07aa15fd65af36b04291303cc6834c87f662814 | [
"MIT"
] | 2,036 | 2015-01-08T20:22:12.000Z | 2022-03-31T10:24:08.000Z | #!/usr/bin/env python3
# ******************************************************************************
#
# Project: GDAL
# Purpose: Example doing range based classification
# Author: Frank Warmerdam, warmerdam@pobox.com
#
# ******************************************************************************
# Copyri... | 34.454545 | 80 | 0.634376 |
4a266b65476d12f075878e9efbfbcf37fcb76ba4 | 2,722 | py | Python | mangopi/metasite.py | BFTeck/mangopi | 8598c8b35c38f9bf2a0880c93af5c1d3ae5728be | [
"MIT"
] | 24 | 2015-01-03T00:47:06.000Z | 2020-11-27T14:58:32.000Z | mangopi/metasite.py | BFTeck/mangopi | 8598c8b35c38f9bf2a0880c93af5c1d3ae5728be | [
"MIT"
] | 4 | 2015-03-14T14:00:21.000Z | 2020-12-30T07:15:20.000Z | mangopi/metasite.py | BFTeck/mangopi | 8598c8b35c38f9bf2a0880c93af5c1d3ae5728be | [
"MIT"
] | 5 | 2015-02-04T00:44:08.000Z | 2018-08-13T21:59:47.000Z | from collections import OrderedDict
from underscore import _
from mangopi.helper.decorators import memoize
from mangopi.helper.util import Util
class MetaSite(object):
def __init__(self, modules=[], options={}):
self.modules = modules
self.options = options
@memoize
def series(self, nam... | 28.652632 | 95 | 0.490816 |
4a266b93125f2d17c5864a04e94f97e47e3221dd | 234 | py | Python | unet_ce_hard_per_im_c13_1.py | pykao/BraTS2018-tumor-segmentation | 6c81ab670f7bd035312f7ccd729776c5c05c47a3 | [
"MIT"
] | 86 | 2018-09-07T08:45:19.000Z | 2022-03-26T18:26:24.000Z | unet_ce_hard_per_im_c13_1.py | pykao/BraTS2018-tumor-segmentation | 6c81ab670f7bd035312f7ccd729776c5c05c47a3 | [
"MIT"
] | 5 | 2018-09-16T07:59:47.000Z | 2020-12-16T07:20:26.000Z | unet_ce_hard_per_im_c13_1.py | pykao/BraTS2018-tumor-segmentation | 6c81ab670f7bd035312f7ccd729776c5c05c47a3 | [
"MIT"
] | 27 | 2018-09-11T05:08:40.000Z | 2021-12-22T16:02:35.000Z | from subprocess import call
model = 'unet_ce_hard_per_im_c13'
seeds = ['_s5042', '_s6437', '_s7859', '_s8074', '_s9829']
for seed in seeds:
cfg_name = model+seed
call(['python', 'train_unet.py', '--gpu', '3', '--cfg', cfg_name])
| 23.4 | 67 | 0.662393 |
4a266c4d635d789ab00624c41443d2e3e227ce7e | 12,165 | py | Python | heat/tests/test_neutron_autoscaling.py | redhat-openstack/heat | 6b9be0a868b857e942c1cc90594d0f3a0d0725d0 | [
"Apache-2.0"
] | null | null | null | heat/tests/test_neutron_autoscaling.py | redhat-openstack/heat | 6b9be0a868b857e942c1cc90594d0f3a0d0725d0 | [
"Apache-2.0"
] | null | null | null | heat/tests/test_neutron_autoscaling.py | redhat-openstack/heat | 6b9be0a868b857e942c1cc90594d0f3a0d0725d0 | [
"Apache-2.0"
] | null | null | null | #
# 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
# ... | 34.461756 | 78 | 0.563337 |
4a266c62f676ba2c74b510484819887db52cc18c | 1,275 | py | Python | code/ch_1-DATA_STRUCTURES_AND_ALGORITHMS/16-filtering_sequence_elements/main.py | ordinary-developer/book_python_cookbook_3_ed_d_beazley_b_k_jones | 677c2bcd12c2223e731908114ae081bcbc32077d | [
"MIT"
] | 1 | 2017-05-04T08:23:46.000Z | 2017-05-04T08:23:46.000Z | code/ch_1-DATA_STRUCTURES_AND_ALGORITHMS/16-filtering_sequence_elements/main.py | ordinary-developer/book_python_cookbook_3_ed_d_beazley_b_k_jones | 677c2bcd12c2223e731908114ae081bcbc32077d | [
"MIT"
] | null | null | null | code/ch_1-DATA_STRUCTURES_AND_ALGORITHMS/16-filtering_sequence_elements/main.py | ordinary-developer/book_python_cookbook_3_ed_d_beazley_b_k_jones | 677c2bcd12c2223e731908114ae081bcbc32077d | [
"MIT"
] | null | null | null | def example_1():
mylist = [1, 4, -5, 10, -7, 2, 3, -1]
print([n for n in mylist if n > 0])
print([n for n in mylist if n < 0])
def example_2():
mylist = [1, 4, -5, 10, -7, 2, 3, -1]
positive_numbers = (n for n in mylist if n > 0)
for number in positive_numbers:
print(number)
def exa... | 20.238095 | 51 | 0.522353 |
4a266dc46c2aee6f2a4c5e07b7a52309177bdfeb | 2,082 | py | Python | mars/tensor/expressions/arithmetic/rint.py | ChenQuan/mars | 46fc9747e99210cebfabfc2d85bcc8272440d1a3 | [
"Apache-2.0"
] | null | null | null | mars/tensor/expressions/arithmetic/rint.py | ChenQuan/mars | 46fc9747e99210cebfabfc2d85bcc8272440d1a3 | [
"Apache-2.0"
] | null | null | null | mars/tensor/expressions/arithmetic/rint.py | ChenQuan/mars | 46fc9747e99210cebfabfc2d85bcc8272440d1a3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2018 Alibaba Group Holding Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-... | 30.617647 | 79 | 0.664745 |
4a266e5b985ff54396048cf5cfc3a53340147958 | 598 | py | Python | apps/02-guess-number-app/you_try/program.py | alexjj/python-jumpstart-course-demos | 962bd8cbe412a385158fc74fb7529825c2b01471 | [
"MIT"
] | null | null | null | apps/02-guess-number-app/you_try/program.py | alexjj/python-jumpstart-course-demos | 962bd8cbe412a385158fc74fb7529825c2b01471 | [
"MIT"
] | null | null | null | apps/02-guess-number-app/you_try/program.py | alexjj/python-jumpstart-course-demos | 962bd8cbe412a385158fc74fb7529825c2b01471 | [
"MIT"
] | null | null | null | import random
print('-' * 32)
print(' Guess a number game')
print('-' * 32)
print()
the_number = random.randint(0, 100)
guess: int = -1
name = input('What is your name? ')
while guess != the_number:
guess_text = input('Guess a number between 0 and 100: ')
guess = int(guess_text)
if guess < the_numbe... | 24.916667 | 79 | 0.620401 |
4a266f9e74db7e4bff4939db449806378bbd77de | 4,687 | py | Python | basic_samples/SDS/Python/SDSPy/Python3/Dataview.py | hanhossain/OCS-Samples | 6f0f7878e6d9bccc32b6d663446678e070859d14 | [
"Apache-2.0"
] | null | null | null | basic_samples/SDS/Python/SDSPy/Python3/Dataview.py | hanhossain/OCS-Samples | 6f0f7878e6d9bccc32b6d663446678e070859d14 | [
"Apache-2.0"
] | null | null | null | basic_samples/SDS/Python/SDSPy/Python3/Dataview.py | hanhossain/OCS-Samples | 6f0f7878e6d9bccc32b6d663446678e070859d14 | [
"Apache-2.0"
] | null | null | null | # Dataview.py
#
# Copyright (C) 2018 OSIsoft, LLC. All rights reserved.
#
# THIS SOFTWARE CONTAINS CONFIDENTIAL INFORMATION AND TRADE SECRETS OF
# OSIsoft, LLC. USE, DISCLOSURE, OR REPRODUCTION IS PROHIBITED WITHOUT
# THE PRIOR EXPRESS WRITTEN PERMISSION OF OSIsoft, LLC.
#
# RESTRICTED RIGHTS LEGEND
# Use, duplication... | 28.406061 | 93 | 0.632814 |
4a26708b266dcd2768cef363b9ab044bf3cc0cb4 | 9,174 | py | Python | sdk/python/pulumi_azure/kusto/database_principal.py | davidobrien1985/pulumi-azure | 811beeea473bd798d77354521266a87a2fac5888 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/kusto/database_principal.py | davidobrien1985/pulumi-azure | 811beeea473bd798d77354521266a87a2fac5888 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure/kusto/database_principal.py | davidobrien1985/pulumi-azure | 811beeea473bd798d77354521266a87a2fac5888 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class Databa... | 55.939024 | 234 | 0.686178 |
4a2670cc49b03f95d2155dc6e7e0b5d4ba67dad7 | 4,925 | py | Python | models/seq2seq-pytorch/run.py | heyLinsir/cotk | 95f2b671779adfe8fb46e82b18e368867a5899bd | [
"Apache-2.0"
] | null | null | null | models/seq2seq-pytorch/run.py | heyLinsir/cotk | 95f2b671779adfe8fb46e82b18e368867a5899bd | [
"Apache-2.0"
] | null | null | null | models/seq2seq-pytorch/run.py | heyLinsir/cotk | 95f2b671779adfe8fb46e82b18e368867a5899bd | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
def run(*argv):
import argparse
import time
from utils import Storage
parser = argparse.ArgumentParser(description='A seq2seq model with GRU encoder and decoder. Attention, beamsearch,\
dropout and batchnorm is supported.')
args = Storage()
parser.add_argument('--name', type=str, default=None... | 40.368852 | 121 | 0.73665 |
4a2670f2929357b84c72362e5a993a84e853da18 | 2,304 | py | Python | config/urls.py | Michaelwwgo/V2X_Project | d26f476329dd7f6083e9275e01e2748d38918afc | [
"MIT"
] | 1 | 2021-02-03T08:15:59.000Z | 2021-02-03T08:15:59.000Z | config/urls.py | Michaelwwgo/V2X_Project | d26f476329dd7f6083e9275e01e2748d38918afc | [
"MIT"
] | null | null | null | config/urls.py | Michaelwwgo/V2X_Project | d26f476329dd7f6083e9275e01e2748d38918afc | [
"MIT"
] | null | null | null | from django.conf import settings
from django.urls import include, path
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
from django.views import defaults as default_views
from rest_framework_jwt.views import obtain_jwt_token
urlpatterns = [
p... | 30.315789 | 85 | 0.613715 |
4a26715dfd6c73c52f1d9e51f3c67b812864b3d1 | 1,796 | py | Python | JuckPae.py | AINukeHere/SCBot-DiscordBot | 821997f19dd0affc3a65aa56f23696496803dd13 | [
"MIT"
] | null | null | null | JuckPae.py | AINukeHere/SCBot-DiscordBot | 821997f19dd0affc3a65aa56f23696496803dd13 | [
"MIT"
] | null | null | null | JuckPae.py | AINukeHere/SCBot-DiscordBot | 821997f19dd0affc3a65aa56f23696496803dd13 | [
"MIT"
] | null | null | null | CommentDict={
'기사단장':[],
'버서커':[],
'아크메이지':[],
'배틀메이지':[],
'스나이퍼':[],
'트랩퍼':[],
'클레릭':[],
'프리스트':[],
'레인저':[],
'런처':[],
'닌자':[],
'어쌔신':[],
'발로그':[],
'디아블로':[],
'메카니즘마스터':[],
'폭발물제조사':[],
'소울브레이커':[],
'대지도자':[],
'버프빌더':[],
'모스트빌더':[],
'네... | 22.45 | 78 | 0.508352 |
4a2672176ed1084bb34cac9a25db1646bc262584 | 3,534 | py | Python | find_best_sampled_weight_rec.py | gugarosa/synthetic_rbms | a86c323e165a893810ac5bf79213f603ed86a8b3 | [
"MIT"
] | null | null | null | find_best_sampled_weight_rec.py | gugarosa/synthetic_rbms | a86c323e165a893810ac5bf79213f603ed86a8b3 | [
"MIT"
] | null | null | null | find_best_sampled_weight_rec.py | gugarosa/synthetic_rbms | a86c323e165a893810ac5bf79213f603ed86a8b3 | [
"MIT"
] | null | null | null | import argparse
import numpy as np
import torch
import utils.stream as s
def get_arguments():
"""Gets arguments from the command line.
Returns:
A parser with the input arguments.
"""
# Creates the ArgumentParser
parser = argparse.ArgumentParser(
usage='Finds the best sampled w... | 32.722222 | 128 | 0.680249 |
4a26725c918112afe7a3713fbc27417d2030184f | 5,331 | py | Python | core/match.py | yycho0108/monovo | 9f2b5cf15f97e467c8e6e94ee16bb785ed6c7edd | [
"MIT"
] | null | null | null | core/match.py | yycho0108/monovo | 9f2b5cf15f97e467c8e6e94ee16bb785ed6c7edd | [
"MIT"
] | null | null | null | core/match.py | yycho0108/monovo | 9f2b5cf15f97e467c8e6e94ee16bb785ed6c7edd | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from utils import vmath as M
import viz as V
import time
class Matcher(object):
PRESET_HARD=dict(
lowe=0.75,
maxd=32.0,
cross=True,
fold=True
)
PRESET_SOFT=dict(
lowe=1.0,
maxd=128.0,
c... | 30.994186 | 91 | 0.516789 |
4a26738fff337115f0b116b5960b1cff27985620 | 6,920 | py | Python | tfx/orchestration/beam/beam_dag_runner.py | jkim1014/tfx-async | efb007cc8fb884f600b3f7ad2b43268058015ce7 | [
"Apache-2.0"
] | null | null | null | tfx/orchestration/beam/beam_dag_runner.py | jkim1014/tfx-async | efb007cc8fb884f600b3f7ad2b43268058015ce7 | [
"Apache-2.0"
] | null | null | null | tfx/orchestration/beam/beam_dag_runner.py | jkim1014/tfx-async | efb007cc8fb884f600b3f7ad2b43268058015ce7 | [
"Apache-2.0"
] | null | null | null | # Lint as: python2, python3
# Copyright 2019 Google LLC. 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 req... | 41.437126 | 80 | 0.717775 |
4a2674c51c61c1c312a453f374bf295b0c814999 | 14,995 | py | Python | synapse/models/telco.py | vishalbelsare/synapse | c0f0d318cc5d3098b3a8d80222e2b0b1d19c5740 | [
"Apache-2.0"
] | null | null | null | synapse/models/telco.py | vishalbelsare/synapse | c0f0d318cc5d3098b3a8d80222e2b0b1d19c5740 | [
"Apache-2.0"
] | null | null | null | synapse/models/telco.py | vishalbelsare/synapse | c0f0d318cc5d3098b3a8d80222e2b0b1d19c5740 | [
"Apache-2.0"
] | null | null | null | import logging
import synapse.exc as s_exc
import synapse.lib.types as s_types
import synapse.lib.module as s_module
import synapse.lookup.phonenum as s_l_phone
logger = logging.getLogger(__name__)
def digits(text):
return ''.join([c for c in text if c.isdigit()])
def chop_imei(imei):
valu = int(imei)
... | 38.350384 | 113 | 0.377659 |
4a267c471e4fa52ecdee9fea097a03087cd2bd55 | 85 | py | Python | preprocessing/exported_midi_chord_recognition/mir/extractors/__init__.py | Dsqvival/hierarchical-structure-analysis | 8ef0b47db1687c97b5a8cd8794b9a344fb1ee13c | [
"MIT"
] | 39 | 2020-12-22T17:55:05.000Z | 2022-03-27T07:03:19.000Z | preprocessing/exported_midi_chord_recognition/mir/extractors/__init__.py | Dsqvival/hierarchical-structure-analysis | 8ef0b47db1687c97b5a8cd8794b9a344fb1ee13c | [
"MIT"
] | 3 | 2021-06-28T16:32:11.000Z | 2021-12-27T10:58:34.000Z | preprocessing/exported_midi_chord_recognition/mir/extractors/__init__.py | Dsqvival/hierarchical-structure-analysis | 8ef0b47db1687c97b5a8cd8794b9a344fb1ee13c | [
"MIT"
] | 4 | 2021-01-03T03:13:26.000Z | 2022-03-04T07:40:51.000Z | from mir.extractors.extractor_base import ExtractorBase
__all__ =['ExtractorBase'] | 28.333333 | 56 | 0.823529 |
4a267c62c9002f9e03b7cea838c7e2e54df31f46 | 6,243 | py | Python | custom_components/aarlo/pyaarlo/cfg.py | PysX/home-assistant-conf | 614c5a67314b6c7b8af4237a918a437b79ab460d | [
"MIT"
] | 28 | 2019-05-31T12:30:15.000Z | 2022-03-10T18:54:57.000Z | custom_components/aarlo/pyaarlo/cfg.py | PysX/home-assistant-conf | 614c5a67314b6c7b8af4237a918a437b79ab460d | [
"MIT"
] | 5 | 2020-08-14T17:43:48.000Z | 2021-01-08T21:12:45.000Z | custom_components/aarlo/pyaarlo/cfg.py | PysX/home-assistant-config | 614c5a67314b6c7b8af4237a918a437b79ab460d | [
"MIT"
] | 2 | 2021-03-31T08:27:19.000Z | 2021-04-30T15:13:24.000Z | from .constant import (
DEFAULT_AUTH_HOST,
DEFAULT_HOST,
PRELOAD_DAYS,
TFA_CONSOLE_SOURCE,
TFA_DEFAULT_HOST,
TFA_DELAY,
TFA_EMAIL_TYPE,
TFA_RETRIES,
)
class ArloCfg(object):
"""Helper class to get at Arlo configuration options.
I got sick of adding in variables each time the c... | 23.91954 | 97 | 0.61605 |
4a267cfa2e8ea502f12a011cbbfc79a9efc48c35 | 711 | py | Python | algorithms/warmup/birthday_cake_candles/harisonmg_submission.py | mazaosoko/hackerrank | d9db66a5812ab68e88953c88c511242484af4990 | [
"MIT"
] | null | null | null | algorithms/warmup/birthday_cake_candles/harisonmg_submission.py | mazaosoko/hackerrank | d9db66a5812ab68e88953c88c511242484af4990 | [
"MIT"
] | null | null | null | algorithms/warmup/birthday_cake_candles/harisonmg_submission.py | mazaosoko/hackerrank | d9db66a5812ab68e88953c88c511242484af4990 | [
"MIT"
] | 1 | 2020-11-18T19:23:05.000Z | 2020-11-18T19:23:05.000Z | #!/bin/python3
import math
import os
import random
import re
import sys
#
# Complete the 'birthdayCakeCandles' function below.
#
# The function is expected to return an INTEGER.
# The function accepts INTEGER_ARRAY candles as parameter.
#
def birthdayCakeCandles(candles):
height_tallest = max(can... | 20.911765 | 59 | 0.673699 |
4a267ddccf08306e119b672f733dadffec5ea494 | 731 | py | Python | boost_adaptbx/tests/tst_std_pair.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | boost_adaptbx/tests/tst_std_pair.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | boost_adaptbx/tests/tst_std_pair.py | rimmartin/cctbx_project | 644090f9432d9afc22cfb542fc3ab78ca8e15e5d | [
"BSD-3-Clause-LBNL"
] | null | null | null | from __future__ import division
import boost.std_pair
from libtbx.test_utils import Exception_expected
def run():
boost.std_pair.exercise(( 1, 2)) == ( 2, 1.)
boost.std_pair.exercise((-2, 4)) == (-4, 2.)
try:
boost.std_pair.exercise(1)
except Exception, err:
assert err.__class__.__name__ == 'ArgumentE... | 21.5 | 52 | 0.689466 |
4a267de3faec4d4240d12b0faffd88895be6f6ac | 3,640 | py | Python | dataset.py | sbharadwajj/point-based-method | 2f778cdb4e4ed218bff4aa33e57be2d5d993a77b | [
"Apache-2.0"
] | null | null | null | dataset.py | sbharadwajj/point-based-method | 2f778cdb4e4ed218bff4aa33e57be2d5d993a77b | [
"Apache-2.0"
] | null | null | null | dataset.py | sbharadwajj/point-based-method | 2f778cdb4e4ed218bff4aa33e57be2d5d993a77b | [
"Apache-2.0"
] | null | null | null | # import open3d as o3d
import torch
import numpy as np
import torch.utils.data as data
import torchvision.transforms as transforms
import os
import random
from utils.data_utils import load_h5, pad_cloudN, augment_cloud
#from utils import *
class Kitti360(data.Dataset):
def __init__(self, dataset_path... | 38.315789 | 113 | 0.595879 |
4a267f00a1f84b70c230aadc8d2c6a2f0af55bb6 | 2,054 | py | Python | homeassistant/components/rpi_gpio/switch.py | SimonCardaire/core | 1ea3f824da6afd9adee030d5b6bccfb2cc73d46d | [
"Apache-2.0"
] | null | null | null | homeassistant/components/rpi_gpio/switch.py | SimonCardaire/core | 1ea3f824da6afd9adee030d5b6bccfb2cc73d46d | [
"Apache-2.0"
] | null | null | null | homeassistant/components/rpi_gpio/switch.py | SimonCardaire/core | 1ea3f824da6afd9adee030d5b6bccfb2cc73d46d | [
"Apache-2.0"
] | null | null | null | """Allows to configure a switch using RPi GPIO."""
from homeassistant.components import rpi_gpio
from homeassistant.components.rpi_gpio.const import (
CONF_SWITCH,
CONF_SWITCH_INVERT_LOGIC,
CONF_SWITCH_PORTS,
DOMAIN,
PLATFORMS,
)
from homeassistant.const import DEVICE_DEFAULT_NAME
from homeassistan... | 30.205882 | 73 | 0.685005 |
4a267f31c413612a25d20abe2648bcb99eb23053 | 1,149 | py | Python | preprocess.py | devinaarvind/tensorflow-efe | 7b3001ca6f885d6c94b198d24560e2004bbd356e | [
"MIT"
] | 13 | 2017-07-28T17:30:04.000Z | 2021-03-13T01:43:18.000Z | preprocess.py | devinaarvind/tensorflow-efe | 7b3001ca6f885d6c94b198d24560e2004bbd356e | [
"MIT"
] | 3 | 2017-12-05T14:52:59.000Z | 2018-03-02T09:56:14.000Z | preprocess.py | devinaarvind/tensorflow-efe | 7b3001ca6f885d6c94b198d24560e2004bbd356e | [
"MIT"
] | 7 | 2018-05-27T02:55:13.000Z | 2019-07-16T11:12:59.000Z | import pandas as pd
from optparse import OptionParser
import config
from utils import data_utils
def preprocess(data_name):
dataset = data_utils.DataSet(config.DATASET[data_name])
df_train, df_valid, df_test = dataset.load_raw_data()
df_all = pd.concat([df_train, df_valid, df_test], ignore_index=True)
... | 28.725 | 86 | 0.704091 |
4a2680a821dfa87a84b5c5766d0017e9633b53a3 | 1,096 | py | Python | user/migrations/0001_initial.py | superior-prog/DevBlog | 5c82e60f0360c0bad243d67d924d1ed591f9fb4b | [
"MIT"
] | null | null | null | user/migrations/0001_initial.py | superior-prog/DevBlog | 5c82e60f0360c0bad243d67d924d1ed591f9fb4b | [
"MIT"
] | null | null | null | user/migrations/0001_initial.py | superior-prog/DevBlog | 5c82e60f0360c0bad243d67d924d1ed591f9fb4b | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2020-12-10 16:31
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.AutoField(aut... | 34.25 | 114 | 0.569343 |
4a26811698f183ef7486aa6beb68a2ab131fd039 | 3,524 | py | Python | imaging/src/radiomics_utils.py | bhuwanupadhyay/machine-learning-pipelines-for-multimodal-health-data | 19cb8faa3d2c10c5ffd13fbd1c5219d8e9fd7f10 | [
"MIT-0"
] | 7 | 2021-06-02T13:47:44.000Z | 2022-02-11T17:13:47.000Z | imaging/src/radiomics_utils.py | bhuwanupadhyay/machine-learning-pipelines-for-multimodal-health-data | 19cb8faa3d2c10c5ffd13fbd1c5219d8e9fd7f10 | [
"MIT-0"
] | 2 | 2021-12-13T16:36:47.000Z | 2022-02-17T18:52:55.000Z | imaging/src/radiomics_utils.py | bhuwanupadhyay/machine-learning-pipelines-for-multimodal-health-data | 19cb8faa3d2c10c5ffd13fbd1c5219d8e9fd7f10 | [
"MIT-0"
] | 8 | 2021-06-10T18:54:31.000Z | 2022-02-23T16:00:40.000Z | import pandas as pd
import time
import numpy as np
from radiomics import featureextractor
import boto3
import sagemaker
from sagemaker.session import Session
from sagemaker.feature_store.feature_group import FeatureGroup
from sagemaker import get_execution_role
sagemaker_session = sagemaker.Session()
region = sagemake... | 36.329897 | 112 | 0.719069 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.