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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
c090c97dc7083884e69dd8d931bd7aefb93e4fc4 | 4,820 | py | Python | doc/conf.py | govinda18/panel | d2b70d9a0a4433d427c627e70328d0bc8621d78b | [
"BSD-3-Clause"
] | 2 | 2018-08-23T16:50:40.000Z | 2018-08-23T20:01:45.000Z | doc/conf.py | pyviz/pyviz_panels | 120019e4318ac51bc2b9d0a1b2eb2239c8a0c9ad | [
"BSD-3-Clause"
] | null | null | null | doc/conf.py | pyviz/pyviz_panels | 120019e4318ac51bc2b9d0a1b2eb2239c8a0c9ad | [
"BSD-3-Clause"
] | null | null | null | import os
import param
param.parameterized.docstring_signature = False
param.parameterized.docstring_describe_params = False
from nbsite.shared_conf import *
project = 'Panel'
authors = 'Panel contributors'
copyright_years['start_year'] = '2019'
copyright = copyright_fmt.format(**copyright_years)
description = 'Hig... | 33.241379 | 107 | 0.543361 |
3d8230364de5a5339ad1c1d930165c1926921753 | 2,738 | py | Python | examples/adspygoogle/dfp/v201203/run_delivery_report.py | krux/adspygoogle | 6505a71122f45fe3e675f27f2c29f67a1768069b | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | examples/adspygoogle/dfp/v201203/run_delivery_report.py | krux/adspygoogle | 6505a71122f45fe3e675f27f2c29f67a1768069b | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | examples/adspygoogle/dfp/v201203/run_delivery_report.py | krux/adspygoogle | 6505a71122f45fe3e675f27f2c29f67a1768069b | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 32.987952 | 80 | 0.678963 |
ad2cb87e75de55a4d4045da63da972ed4802ef30 | 7,268 | py | Python | common/intcode_computer.py | pviafore/AdventOfCode2019 | 71a01068a624826b85293d8b98fecf388d9c5a4c | [
"MIT"
] | 1 | 2019-12-01T16:26:10.000Z | 2019-12-01T16:26:10.000Z | common/intcode_computer.py | pviafore/AdventOfCode2019 | 71a01068a624826b85293d8b98fecf388d9c5a4c | [
"MIT"
] | null | null | null | common/intcode_computer.py | pviafore/AdventOfCode2019 | 71a01068a624826b85293d8b98fecf388d9c5a4c | [
"MIT"
] | 1 | 2021-12-09T09:55:45.000Z | 2021-12-09T09:55:45.000Z | from dataclasses import dataclass, field
from enum import IntEnum, unique
from typing import Callable, List, Tuple
@unique
class OpCode(IntEnum):
ADD = 1
MULTIPLY = 2
INPUT = 3
OUTPUT = 4
JUMP_TRUE = 5
JUMP_FALSE = 6
LESS_THAN = 7
EQUALS = 8
SET_RELATIVE_VALUE = 9
STOP = 99
@un... | 38.86631 | 93 | 0.644882 |
43fdb379d2c0dd5d0ebccf14b6119535fc7db050 | 2,482 | py | Python | python/ray/serve/examples/doc/tutorial_sklearn.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 21,382 | 2016-09-26T23:12:52.000Z | 2022-03-31T21:47:45.000Z | python/ray/serve/examples/doc/tutorial_sklearn.py | 77loopin/ray | 9322f6aab53f4ca5baf5a3573e1ffde12feae519 | [
"Apache-2.0"
] | 19,689 | 2016-09-17T08:21:25.000Z | 2022-03-31T23:59:30.000Z | python/ray/serve/examples/doc/tutorial_sklearn.py | gramhagen/ray | c18caa4db36d466718bdbcb2229aa0b2dc03da1f | [
"Apache-2.0"
] | 4,114 | 2016-09-23T18:54:01.000Z | 2022-03-31T15:07:32.000Z | # yapf: disable
import ray
# __doc_import_begin__
from ray import serve
import pickle
import json
import numpy as np
import requests
import os
import tempfile
from sklearn.datasets import load_iris
from sklearn.ensemble import GradientBoostingClassifier
from sklearn.metrics import mean_squared_error
# __doc_import_en... | 25.854167 | 70 | 0.704271 |
9f70f7f5b43fbcbb828c5dda9479b02d31c753f8 | 1,258 | py | Python | senlin_tempest_plugin/tests/api/profile_types/test_profile_type_operation_list.py | openstack/senlin-tempest-plugin | f71166b2c6619746ac24614ed151e4befdb1f495 | [
"Apache-2.0"
] | 7 | 2017-10-31T13:31:20.000Z | 2020-01-08T02:36:37.000Z | senlin_tempest_plugin/tests/api/profile_types/test_profile_type_operation_list.py | openstack/senlin-tempest-plugin | f71166b2c6619746ac24614ed151e4befdb1f495 | [
"Apache-2.0"
] | null | null | null | senlin_tempest_plugin/tests/api/profile_types/test_profile_type_operation_list.py | openstack/senlin-tempest-plugin | f71166b2c6619746ac24614ed151e4befdb1f495 | [
"Apache-2.0"
] | 1 | 2018-01-10T20:36:55.000Z | 2018-01-10T20:36:55.000Z | # 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
# distributed under t... | 40.580645 | 75 | 0.746423 |
a673d56311a5803ea4c73ac51f199397833121ba | 626 | py | Python | Lab06_GUI/exercise-40.py | rodrigoc-silva/Python-course | 327b20738a4b383510faddc0ec26a54be1bbd717 | [
"MIT"
] | null | null | null | Lab06_GUI/exercise-40.py | rodrigoc-silva/Python-course | 327b20738a4b383510faddc0ec26a54be1bbd717 | [
"MIT"
] | null | null | null | Lab06_GUI/exercise-40.py | rodrigoc-silva/Python-course | 327b20738a4b383510faddc0ec26a54be1bbd717 | [
"MIT"
] | null | null | null |
#this program displays two labels with text
import tkinter
class MyGUI:
def __init__(self):
#create the main window widget
self.main_window = tkinter.Tk()
#create two label widgets
self.label1 = tkinter.Label(self.main_window,
text='Hello World!')
... | 25.04 | 59 | 0.576677 |
5ca29672ab6e3fb4761edfe155484584c4f9ad78 | 2,936 | py | Python | data_inspection/compare_fs_vols_to_medstudents.py | rsjones94/data_inspection | b3f57c3eea1b800e629ff79c3f9922daf64f7b8f | [
"MIT"
] | null | null | null | data_inspection/compare_fs_vols_to_medstudents.py | rsjones94/data_inspection | b3f57c3eea1b800e629ff79c3f9922daf64f7b8f | [
"MIT"
] | null | null | null | data_inspection/compare_fs_vols_to_medstudents.py | rsjones94/data_inspection | b3f57c3eea1b800e629ff79c3f9922daf64f7b8f | [
"MIT"
] | null | null | null |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 26 16:34:40 2020
@author: skyjones
"""
import os
import re
import shutil
import pandas as pd
from glob import glob
import nibabel as nib
import numpy as np
import matplotlib.pyplot as plt
from scipy import stats
from sklearn.ensemble import Isola... | 28.230769 | 168 | 0.722071 |
1d0b821e2871e66e31028a1081267770ff3529cd | 12,462 | py | Python | test/functional/smartfees.py | wolfoxonly/ofic | dea8f4aa577999947e1c8f969af60a03e13cae00 | [
"MIT"
] | null | null | null | test/functional/smartfees.py | wolfoxonly/ofic | dea8f4aa577999947e1c8f969af60a03e13cae00 | [
"MIT"
] | null | null | null | test/functional/smartfees.py | wolfoxonly/ofic | dea8f4aa577999947e1c8f969af60a03e13cae00 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The OFIChain Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test fee estimation code."""
from test_framework.test_framework import OFIChainTestFramework
from tes... | 47.38403 | 113 | 0.646285 |
fc3d833cfffbbfae4933a9a0cb543e68e9efd08a | 2,651 | py | Python | superset/db_engine_specs/drill.py | arpith-kp/superset | 42ff4fc19a34144b31cef82b341871dff34f37d2 | [
"Apache-2.0"
] | 44 | 2021-04-14T10:53:36.000Z | 2021-09-11T00:29:50.000Z | superset/db_engine_specs/drill.py | arpith-kp/superset | 42ff4fc19a34144b31cef82b341871dff34f37d2 | [
"Apache-2.0"
] | 77 | 2020-02-02T07:54:13.000Z | 2022-03-23T18:22:04.000Z | superset/db_engine_specs/drill.py | arpith-kp/superset | 42ff4fc19a34144b31cef82b341871dff34f37d2 | [
"Apache-2.0"
] | 11 | 2021-06-09T08:30:57.000Z | 2021-11-30T03:16:14.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 37.871429 | 85 | 0.666164 |
8e8474294f82309532a6bc1b18467c807c589d15 | 1,002 | py | Python | pydashie/samplers/omni_versions.py | rfloriano/store-dash | cdd18c433769fdb6f5ed5fc69569838d61d1568a | [
"MIT"
] | null | null | null | pydashie/samplers/omni_versions.py | rfloriano/store-dash | cdd18c433769fdb6f5ed5fc69569838d61d1568a | [
"MIT"
] | null | null | null | pydashie/samplers/omni_versions.py | rfloriano/store-dash | cdd18c433769fdb6f5ed5fc69569838d61d1568a | [
"MIT"
] | null | null | null | from pydashie.dashie_sampler import DashieSampler
import requests
from requests.exceptions import ConnectionError
class OmniVersions(DashieSampler):
def __init__(self, *args, **kwargs):
self.api_url = 'http://api.store.backstage.globoi.com/api/applications/list/'
DashieSampler.__init__(self, *arg... | 31.3125 | 85 | 0.56986 |
96cdbb90e144b73f4ab912f354ce0fe04b5ce4bd | 6,305 | py | Python | Fw/Python/src/fprime/fbuild/settings.py | LeStarch/lgtm-fprime | 904b0311fe647745b29075d44259d1dc1f4284ae | [
"Apache-2.0"
] | null | null | null | Fw/Python/src/fprime/fbuild/settings.py | LeStarch/lgtm-fprime | 904b0311fe647745b29075d44259d1dc1f4284ae | [
"Apache-2.0"
] | null | null | null | Fw/Python/src/fprime/fbuild/settings.py | LeStarch/lgtm-fprime | 904b0311fe647745b29075d44259d1dc1f4284ae | [
"Apache-2.0"
] | null | null | null | """
fprime.fbuild.settings:
An implementation used to pull settings into the fprime build. This version uses INI files in order to load the
settings from the settings.default file that is part of the F prime deployment directory.
@author mstarch
"""
import configparser # Written after PY2 eol
import os
class IniS... | 37.754491 | 123 | 0.617288 |
59aac5b1dbed0e666e44a5eadaf55105263d73d3 | 1,150 | py | Python | exercise2/server_interm_layer.py | jdiegoh3/distributed_computing | 33088e741d35590d5699e8ecd9a35ff12b65f7f8 | [
"MIT"
] | null | null | null | exercise2/server_interm_layer.py | jdiegoh3/distributed_computing | 33088e741d35590d5699e8ecd9a35ff12b65f7f8 | [
"MIT"
] | null | null | null | exercise2/server_interm_layer.py | jdiegoh3/distributed_computing | 33088e741d35590d5699e8ecd9a35ff12b65f7f8 | [
"MIT"
] | null | null | null | import socketserver
import socket
import protocol_utils as protocolUtils
class MessageHandler(socketserver.BaseRequestHandler):
def handle(self):
protocol_instance = protocolUtils.MessageHandler(self.request.recv(1024))
array_operands = protocol_instance.message_loads()
server_propietys =... | 30.263158 | 115 | 0.672174 |
03445defcc6fbcebce2f6d83369c3bb289bb2830 | 1,796 | py | Python | docs/tools/translate/translate.py | namikhnenko/ClickHouse | 70a962f1a725c00596303e1587154e3c88f6bbd4 | [
"Apache-2.0"
] | null | null | null | docs/tools/translate/translate.py | namikhnenko/ClickHouse | 70a962f1a725c00596303e1587154e3c88f6bbd4 | [
"Apache-2.0"
] | null | null | null | docs/tools/translate/translate.py | namikhnenko/ClickHouse | 70a962f1a725c00596303e1587154e3c88f6bbd4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import os
import random
import sys
import time
import urllib.parse
import googletrans
import requests
import yaml
import typograph_ru
translator = googletrans.Translator()
target_language = os.environ.get('TARGET_LANGUAGE', 'ru')
is_yandex = os.environ.get('YANDEX') is not None
def transl... | 28.0625 | 120 | 0.616927 |
ab20832674d396b015f3e98c73cad02be5662263 | 4,727 | py | Python | mcquic/train/valueTuners.py | xiaosu-zhu/McQuic | 0c8396a50cddbba243bfe0896d6fff2b83f69771 | [
"Apache-2.0"
] | 27 | 2022-03-10T04:15:48.000Z | 2022-03-31T03:20:21.000Z | mcquic/train/valueTuners.py | xiaosu-zhu/McQuic | 0c8396a50cddbba243bfe0896d6fff2b83f69771 | [
"Apache-2.0"
] | 1 | 2022-03-31T12:05:30.000Z | 2022-03-31T12:05:30.000Z | mcquic/train/valueTuners.py | xiaosu-zhu/McQuic | 0c8396a50cddbba243bfe0896d6fff2b83f69771 | [
"Apache-2.0"
] | 2 | 2022-03-19T08:41:03.000Z | 2022-03-28T14:11:41.000Z | import math
from mcquic.utils import ValueTunerRegistry
from mcquic.baseClass import ValueTuner
@ValueTunerRegistry.register
class CyclicValue(ValueTuner):
def __init__(self, initValue: float = 2e-2, gamma: float = 1.0, cyclicInterval: int = 400, boostInterval: int = 3, zeroOutRatio: float = 1./3.):
super... | 39.722689 | 173 | 0.650307 |
d5593002c9eafaa128e0b85bd75cd2559780502f | 28,156 | py | Python | Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Atom/Scripts/Python/DCC_Materials/maya_materials_export.py | whywhywhyw/o3de | 8e09f66799d4c8f188d45861d821e8656a554cb1 | [
"Apache-2.0",
"MIT"
] | 1 | 2022-01-21T03:51:42.000Z | 2022-01-21T03:51:42.000Z | Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Atom/Scripts/Python/DCC_Materials/maya_materials_export.py | whywhywhyw/o3de | 8e09f66799d4c8f188d45861d821e8656a554cb1 | [
"Apache-2.0",
"MIT"
] | null | null | null | Gems/AtomLyIntegration/TechnicalArt/DccScriptingInterface/SDK/Atom/Scripts/Python/DCC_Materials/maya_materials_export.py | whywhywhyw/o3de | 8e09f66799d4c8f188d45861d821e8656a554cb1 | [
"Apache-2.0",
"MIT"
] | null | null | null | """
Copyright (c) Contributors to the Open 3D Engine Project.
For complete copyright and license terms please see the LICENSE at the root of this distribution.
SPDX-License-Identifier: Apache-2.0 OR MIT
"""
# -------------------------------------------------------------------------
"""
Usage
=====
Put usage instructi... | 45.0496 | 133 | 0.666607 |
c554da27dd7c0cf590140616736da7e2055ca5b3 | 1,347 | py | Python | hikyuu/examples/Turtle_SG.py | scanfyu/hikyuu | 55265de4d8d4773391f2dcd1211acec9fe901f53 | [
"MIT"
] | 1,283 | 2016-04-06T16:06:46.000Z | 2022-03-31T06:37:53.000Z | hikyuu/examples/Turtle_SG.py | scanfyu/hikyuu | 55265de4d8d4773391f2dcd1211acec9fe901f53 | [
"MIT"
] | 47 | 2017-08-12T10:37:03.000Z | 2022-03-28T13:22:21.000Z | hikyuu/examples/Turtle_SG.py | scanfyu/hikyuu | 55265de4d8d4773391f2dcd1211acec9fe901f53 | [
"MIT"
] | 416 | 2017-05-15T05:28:26.000Z | 2022-03-22T07:44:15.000Z | #!/usr/bin/python
# -*- coding: utf8 -*-
# cp936
#===============================================================================
# Aothor: fasiondog
# History: 20160407, Added by fasiondog
#===============================================================================
from hikyuu.trade_sys.signal import SignalBase
... | 28.0625 | 80 | 0.484781 |
97063f1ef8401aeca78a4a6d6aa3c10731366ad6 | 10,990 | py | Python | Chapter02/gan.py | jpgacrama/Generative-Adversarial-Networks-Projects | e0849466a984a185a7e289a5f9ed2c8daa240906 | [
"MIT"
] | null | null | null | Chapter02/gan.py | jpgacrama/Generative-Adversarial-Networks-Projects | e0849466a984a185a7e289a5f9ed2c8daa240906 | [
"MIT"
] | null | null | null | Chapter02/gan.py | jpgacrama/Generative-Adversarial-Networks-Projects | e0849466a984a185a7e289a5f9ed2c8daa240906 | [
"MIT"
] | null | null | null | # Complete Generator Adversarial Network which I typed
import os
import time
import tensorflow as tf
from tensorflow.keras.optimizers import Adam
import scipy.io as io
import numpy as np
import scipy.ndimage as nd
import matplotlib.pyplot as plt
from os import system, name
from tensorflow.keras.backend import shape
... | 39.11032 | 136 | 0.648408 |
5c3044f50a6b89cb50b0a4c301af508c31841a05 | 314 | py | Python | Python/Problems/Particles/task.py | victoroliveros/Hyperskill | bd0f81d7479fc210e4b3e36e993bf93f1815b239 | [
"MIT"
] | 4 | 2020-08-07T06:24:00.000Z | 2021-01-23T14:40:35.000Z | Python/Problems/Particles/task.py | victoroliveros/Hyperskill | bd0f81d7479fc210e4b3e36e993bf93f1815b239 | [
"MIT"
] | null | null | null | Python/Problems/Particles/task.py | victoroliveros/Hyperskill | bd0f81d7479fc210e4b3e36e993bf93f1815b239 | [
"MIT"
] | 1 | 2020-09-20T11:48:16.000Z | 2020-09-20T11:48:16.000Z | spin = input()
charge = input()
if spin == "1/2":
if charge == "-1/3":
print(" Strange Quark")
if charge == "2/3":
print("Charm Quark")
if charge == "-1":
print("Electron Lepton")
if charge == "0":
print("Neutrino Lepton")
if spin == "1":
print("Photon Boson")
| 20.933333 | 32 | 0.506369 |
5c617752b59de328d2b24c4bab62c72c57b2eaf6 | 17 | py | Python | data/studio21_generated/introductory/3906/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/3906/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | data/studio21_generated/introductory/3906/starter_code.py | vijaykumawat256/Prompt-Summarization | 614f5911e2acd2933440d909de2b4f86653dc214 | [
"Apache-2.0"
] | null | null | null | def total(arr):
| 8.5 | 15 | 0.647059 |
13f06fcb73614393116dc4b88d9c81b99b50b2e5 | 96,804 | py | Python | python/ccxt/async_support/bitmart.py | dgdiginex/ccxt | cccd590576cbf48d26cf9e3f65cc54fdd466a139 | [
"MIT"
] | null | null | null | python/ccxt/async_support/bitmart.py | dgdiginex/ccxt | cccd590576cbf48d26cf9e3f65cc54fdd466a139 | [
"MIT"
] | null | null | null | python/ccxt/async_support/bitmart.py | dgdiginex/ccxt | cccd590576cbf48d26cf9e3f65cc54fdd466a139 | [
"MIT"
] | 2 | 2020-10-13T03:24:08.000Z | 2020-10-15T06:25:07.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
# -----------------------------------------------------------------------------
try... | 43.04313 | 521 | 0.449527 |
33b07755902f23cfa8dab6fc82251ed14c3d2d59 | 56,213 | py | Python | wradlib/ipol.py | egouden/wradlib | daac35ff24c774183ca0fa63f28a85fb1e4c84f2 | [
"MIT"
] | null | null | null | wradlib/ipol.py | egouden/wradlib | daac35ff24c774183ca0fa63f28a85fb1e4c84f2 | [
"MIT"
] | null | null | null | wradlib/ipol.py | egouden/wradlib | daac35ff24c774183ca0fa63f28a85fb1e4c84f2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2011-2020, wradlib developers.
# Distributed under the MIT License. See LICENSE.txt for more info.
"""
Interpolation
^^^^^^^^^^^^^
Interpolation allows to transfer data from one set of locations to another.
This includes for example:
- interpolating the data from a polar grid to... | 33.460119 | 108 | 0.595805 |
6bde08dc87c981ac91263835a60ec3c93a4a7da2 | 17,749 | py | Python | test/test_utils/__init__.py | ajaykarpur/deep-learning-containers | 45cd6bb9a00814dd252d9daaf486c142da1a479b | [
"Apache-2.0"
] | null | null | null | test/test_utils/__init__.py | ajaykarpur/deep-learning-containers | 45cd6bb9a00814dd252d9daaf486c142da1a479b | [
"Apache-2.0"
] | null | null | null | test/test_utils/__init__.py | ajaykarpur/deep-learning-containers | 45cd6bb9a00814dd252d9daaf486c142da1a479b | [
"Apache-2.0"
] | null | null | null | import json
import os
import re
import subprocess
import time
import logging
import sys
import pytest
import boto3
from botocore.exceptions import ClientError
from invoke import run
from invoke.context import Context
from retrying import retry
LOGGER = logging.getLogger(__name__)
LOGGER.setLevel(logging.INFO)
LOGGER... | 39.975225 | 131 | 0.68956 |
c6aa91df9a460d331468e92b17e24bcab9a05462 | 7,289 | py | Python | run.py | Anabella1109/Password-Lock | 3b4dcad6b64d8392504e68e28bb98c8f318def66 | [
"Unlicense"
] | null | null | null | run.py | Anabella1109/Password-Lock | 3b4dcad6b64d8392504e68e28bb98c8f318def66 | [
"Unlicense"
] | null | null | null | run.py | Anabella1109/Password-Lock | 3b4dcad6b64d8392504e68e28bb98c8f318def66 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python3.6
from passwordlock import User
from passwordlock_1 import Credentials
import random
import string
def create_user(names,username,Email,pw):
'''
Function to create new user
'''
new_user= User(names,username,Email,pw)
return new_user
def save_user(user):
'''
Function ... | 30.497908 | 179 | 0.558238 |
29dc04729c316708502238bab662ed20e3d0fbfe | 10,863 | py | Python | pycollo/quadrature.py | NoNotCar/pycollo | 5c5c425788acb9decdbcb70253aeb5a482b31c55 | [
"MIT"
] | 3 | 2021-09-07T13:55:27.000Z | 2022-02-11T12:28:30.000Z | pycollo/quadrature.py | NoNotCar/pycollo | 5c5c425788acb9decdbcb70253aeb5a482b31c55 | [
"MIT"
] | 6 | 2021-06-16T20:18:38.000Z | 2022-02-14T17:03:21.000Z | pycollo/quadrature.py | NoNotCar/pycollo | 5c5c425788acb9decdbcb70253aeb5a482b31c55 | [
"MIT"
] | 3 | 2021-10-02T23:19:21.000Z | 2022-02-12T06:05:31.000Z | """Computation of quadrature points and weights for different schemes.
Attributes
----------
DEFAULT_COLLOCATION_POINTS_MAX : int
Constant default limitation on the maximum number of collocation points
per mesh section that a user can specify. The value of 20 has been chosen
as above this the algorithms th... | 40.084871 | 137 | 0.592562 |
562c8e27a2210e1655d1015212a9505e229c4fef | 962 | py | Python | ExtractedFrame.py | the-alex-b/Football-Tracking | 3f1a03970566df649050e67cda69b26b41f10e41 | [
"BSD-2-Clause"
] | 11 | 2020-03-19T12:58:09.000Z | 2021-03-04T00:00:16.000Z | ExtractedFrame.py | the-alex-b/Football-Tracking | 3f1a03970566df649050e67cda69b26b41f10e41 | [
"BSD-2-Clause"
] | 1 | 2020-06-18T23:25:57.000Z | 2020-06-19T16:40:16.000Z | ExtractedFrame.py | the-alex-b/Football-Tracking | 3f1a03970566df649050e67cda69b26b41f10e41 | [
"BSD-2-Clause"
] | null | null | null | import numpy as np
class ExtractedFrame():
'''
This class contains all data that is extracted from a frame,
'''
def __init__(self, frame_number, extracted_homography, feet, detections, yolo_detections):
self.frame_number = frame_number
self.homography = extracted_homography
... | 37 | 114 | 0.649688 |
10352d5832cfe13e8c3904ff8097c988e3a4e71b | 2,647 | py | Python | examples/dfp/v201411/report_service/run_delivery_report.py | cmm08/googleads-python-lib | 97743df32eff92cf00cb8beaddcda42dfa0a37f4 | [
"Apache-2.0"
] | 1 | 2018-09-06T18:50:58.000Z | 2018-09-06T18:50:58.000Z | examples/dfp/v201411/report_service/run_delivery_report.py | cmm08/googleads-python-lib | 97743df32eff92cf00cb8beaddcda42dfa0a37f4 | [
"Apache-2.0"
] | null | null | null | examples/dfp/v201411/report_service/run_delivery_report.py | cmm08/googleads-python-lib | 97743df32eff92cf00cb8beaddcda42dfa0a37f4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 31.511905 | 78 | 0.684926 |
ec58ccfc21b8ebb87d538e99aa6103a42f9626b5 | 14,018 | py | Python | src/dns-resolver/azext_dnsresolver/tests/latest/test_dns_resolver_commands.py | Caoxuyang/azure-cli-extensions | d2011261f29033cb31a1064256727d87049ab423 | [
"MIT"
] | null | null | null | src/dns-resolver/azext_dnsresolver/tests/latest/test_dns_resolver_commands.py | Caoxuyang/azure-cli-extensions | d2011261f29033cb31a1064256727d87049ab423 | [
"MIT"
] | 9 | 2022-03-25T19:35:49.000Z | 2022-03-31T06:09:47.000Z | src/dns-resolver/azext_dnsresolver/tests/latest/test_dns_resolver_commands.py | Caoxuyang/azure-cli-extensions | d2011261f29033cb31a1064256727d87049ab423 | [
"MIT"
] | 1 | 2022-02-14T21:43:29.000Z | 2022-02-14T21:43:29.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 53.708812 | 197 | 0.590098 |
ca82d42ffa604a847f335024c6eaee99050fb008 | 33,367 | py | Python | tensorflow/python/training/basic_session_run_hooks.py | jhabikal21/tensorflow | 98d20962172301385aae694141801a375debd2bc | [
"Apache-2.0"
] | null | null | null | tensorflow/python/training/basic_session_run_hooks.py | jhabikal21/tensorflow | 98d20962172301385aae694141801a375debd2bc | [
"Apache-2.0"
] | null | null | null | tensorflow/python/training/basic_session_run_hooks.py | jhabikal21/tensorflow | 98d20962172301385aae694141801a375debd2bc | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.707371 | 114 | 0.701951 |
8e3ec3b012a0c8aba523cc81975dd36d058d6d14 | 6,447 | py | Python | iotconnect/monitors/ioniqev/commands.py | hokus15/IOTConnect | 73de3bf57e4bb693f015ceb960f8dcba63edbf2f | [
"Apache-2.0"
] | 8 | 2020-09-23T13:24:51.000Z | 2021-12-31T11:37:15.000Z | iotconnect/monitors/ioniqev/commands.py | hokus15/IOTConnect | 73de3bf57e4bb693f015ceb960f8dcba63edbf2f | [
"Apache-2.0"
] | 2 | 2020-12-12T20:30:16.000Z | 2021-02-12T19:45:11.000Z | iotconnect/monitors/ioniqev/commands.py | hokus15/IOTConnect | 73de3bf57e4bb693f015ceb960f8dcba63edbf2f | [
"Apache-2.0"
] | 4 | 2021-07-28T13:02:56.000Z | 2021-12-30T15:10:48.000Z | from obd import OBDCommand
from obd.protocols import ECU
from obd.decoders import raw_string
from .decoders import bms_2101, cell_voltages, bms_2105, odometer, vin
from .decoders import vmcu_2101, vmcu_2102, tpms, external_temperature
# flake8: noqa E501
ext_commands = {
# nam... | 111.155172 | 208 | 0.505506 |
e8fd7e622c07e3921e0b456e8a585469e46a77c4 | 29,230 | py | Python | conans/client/manager.py | rukgar/conan | 02e0e1718da20d67348761fe24a39110f70b1664 | [
"MIT"
] | null | null | null | conans/client/manager.py | rukgar/conan | 02e0e1718da20d67348761fe24a39110f70b1664 | [
"MIT"
] | null | null | null | conans/client/manager.py | rukgar/conan | 02e0e1718da20d67348761fe24a39110f70b1664 | [
"MIT"
] | null | null | null | import fnmatch
import os
from collections import Counter
from conans.client import packager
from conans.client.build_requires import BuildRequires
from conans.client.client_cache import ClientCache
from conans.client.cmd.export import cmd_export, _execute_export
from conans.client.deps_builder import DepsGraphBuilder
... | 48.879599 | 113 | 0.656312 |
d5dda79ba7ca8b5ad1bf8fc80fa037491d1afcf5 | 2,024 | py | Python | code/newton.py | MarkusLohmayer/master-thesis-code | b107d1b582064daf9ad4414e1c9f332ef0be8660 | [
"MIT"
] | 1 | 2020-11-14T15:56:07.000Z | 2020-11-14T15:56:07.000Z | code/newton.py | MarkusLohmayer/master-thesis-code | b107d1b582064daf9ad4414e1c9f332ef0be8660 | [
"MIT"
] | null | null | null | code/newton.py | MarkusLohmayer/master-thesis-code | b107d1b582064daf9ad4414e1c9f332ef0be8660 | [
"MIT"
] | null | null | null | """Newton-Raphson scheme"""
import numpy
class DidNotConvergeError(Exception):
pass
def newton_raphson(
unknowns,
residuals,
compute_residuals,
jacobian,
compute_jacobian,
tol=1e-10,
iterations=500,
logger=None
):
"""Solves a (nonlinear) system of N equations `residuals(unkn... | 29.333333 | 76 | 0.658103 |
a675bccc46a4f2b6e54af275c068b933f012d6bd | 2,037 | py | Python | Code/odooerp/odoo-8.0/openerp/addons/stock_dropshipping/__openerp__.py | zhupangithub/WEBERP | 714512082ec5c6db07cbf6af0238ceefe2d2c1a5 | [
"MIT"
] | 1 | 2019-12-29T11:53:56.000Z | 2019-12-29T11:53:56.000Z | odoo/addons/stock_dropshipping/__openerp__.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | null | null | null | odoo/addons/stock_dropshipping/__openerp__.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | 3 | 2020-10-08T14:42:10.000Z | 2022-01-28T14:12:29.000Z | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014 OpenERP S.A. (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... | 36.375 | 78 | 0.632793 |
0aad9b956851cbd87df2631605789dbbd42684d4 | 1,657 | py | Python | color_see.py | Amenoimi/Simple_OCR | fdf51e2cddadb753f46fa713034d21ba68427617 | [
"Apache-2.0"
] | null | null | null | color_see.py | Amenoimi/Simple_OCR | fdf51e2cddadb753f46fa713034d21ba68427617 | [
"Apache-2.0"
] | null | null | null | color_see.py | Amenoimi/Simple_OCR | fdf51e2cddadb753f46fa713034d21ba68427617 | [
"Apache-2.0"
] | null | null | null |
from PIL import Image
import numpy as np
import cv2
class color_see():
def pick_color(self,event,x,y,flags,param):
if event == cv2.EVENT_LBUTTONDOWN:
self.pixel = self.frame[y,x]
#you might want to adjust the ranges(+-10, etc):
self.upper = np.array([ self.pixel[0] + 20, self.pixel[1] + 20, ... | 29.070175 | 97 | 0.611949 |
3c57c7fe2206f40abd16cd0a0f9567dfe27ffe49 | 5,362 | py | Python | webhook/server.py | Manasvi070902/pod-4.1.0-portfolio | 8a91157bd26e27174c90b83742a54348207f7532 | [
"MIT"
] | 5 | 2021-10-04T11:33:39.000Z | 2021-11-15T12:31:01.000Z | webhook/server.py | Manasvi070902/pod-4.1.0-portfolio | 8a91157bd26e27174c90b83742a54348207f7532 | [
"MIT"
] | 49 | 2021-10-01T16:24:57.000Z | 2021-10-11T16:32:14.000Z | webhook/server.py | Manasvi070902/pod-4.1.0-portfolio | 8a91157bd26e27174c90b83742a54348207f7532 | [
"MIT"
] | 14 | 2021-10-04T11:33:47.000Z | 2021-11-12T06:37:25.000Z | from flask import Flask, request, jsonify, make_response
import requests
app = Flask(__name__)
@app.route('/') # this is the home page route
def hello_world(
): # this is the home page function that generates the page code
return "Hello world!"
calendly_links = {
"Aman Raj": "https://calendly.com/api/booking/e... | 51.066667 | 241 | 0.740955 |
77d5e0161eab556b596eca90b80b8c473cb5835f | 2,668 | py | Python | warcfilter.py | ArchiveTeam/warctozip | d36bbbaa529d146b5b25252edbcc8f966528d8aa | [
"MIT"
] | 5 | 2016-03-13T01:57:09.000Z | 2021-10-02T00:22:10.000Z | warcfilter.py | ArchiveTeam/warctozip | d36bbbaa529d146b5b25252edbcc8f966528d8aa | [
"MIT"
] | 1 | 2021-10-31T05:15:54.000Z | 2021-10-31T05:15:54.000Z | warcfilter.py | ArchiveTeam/warctozip | d36bbbaa529d146b5b25252edbcc8f966528d8aa | [
"MIT"
] | 2 | 2016-05-19T12:38:35.000Z | 2016-11-27T20:01:24.000Z | #!/usr/bin/env python
"""warcfilter - prints warcs in that match regexp, by default searches all headers"""
import os
import sys
import re
from optparse import OptionParser
from hanzo.warctools import ArchiveRecord
parser = OptionParser(usage="%prog [options] pattern warc warc warc")
parser.add_option("-l", "--li... | 32.144578 | 126 | 0.617316 |
e1860d0335d51b01a16e7b59c4f8824669beab14 | 6,525 | py | Python | ProgrammingAssignments/pyretic/pyretic/vendor/ryu/ryu/ofproto/oxm_fields.py | Mahdi-Asaly/Coursera-SDN-Assignments | aac5d62f40c5283e296a0f87b7ec2de8986a8efc | [
"Intel"
] | null | null | null | ProgrammingAssignments/pyretic/pyretic/vendor/ryu/ryu/ofproto/oxm_fields.py | Mahdi-Asaly/Coursera-SDN-Assignments | aac5d62f40c5283e296a0f87b7ec2de8986a8efc | [
"Intel"
] | null | null | null | ProgrammingAssignments/pyretic/pyretic/vendor/ryu/ryu/ofproto/oxm_fields.py | Mahdi-Asaly/Coursera-SDN-Assignments | aac5d62f40c5283e296a0f87b7ec2de8986a8efc | [
"Intel"
] | null | null | null | # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2013 YAMAMOTO Takashi <yamamoto at valinux co jp>
#
# 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:... | 27.1875 | 78 | 0.615326 |
b6a3011802c41d0dd27f73369bd70716299116e4 | 1,794 | py | Python | cscs-checks/tools/profiling_and_debugging/nvprof.py | sebkelle1/reframe | 7f4b0ff1e00cbecc820779a3fe8470b7a633a0de | [
"BSD-3-Clause"
] | null | null | null | cscs-checks/tools/profiling_and_debugging/nvprof.py | sebkelle1/reframe | 7f4b0ff1e00cbecc820779a3fe8470b7a633a0de | [
"BSD-3-Clause"
] | 3 | 2022-02-01T08:03:57.000Z | 2022-03-01T08:06:51.000Z | cscs-checks/tools/profiling_and_debugging/nvprof.py | sebkelle1/reframe | 7f4b0ff1e00cbecc820779a3fe8470b7a633a0de | [
"BSD-3-Clause"
] | null | null | null | import reframe as rfm
import reframe.utility.sanity as sn
@rfm.required_version('>=2.14')
@rfm.simple_test
class NvprofCheck(rfm.RegressionTest):
def __init__(self):
super().__init__()
self.descr = 'Checks the nvprof tool'
self.valid_systems = ['daint:gpu', 'dom:gpu', 'kesch:cn', 'tiger:gp... | 39 | 78 | 0.585284 |
153ee52bee74dbedb4487d94f1e3574a7f770cfb | 7,119 | py | Python | geonode/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/basecommand.py | gem/FaultedEarth-Client | ae1e90adb12aa3d9a80eb6f8c5858c4f4b1918e7 | [
"BSD-3-Clause"
] | 2 | 2017-07-14T06:55:03.000Z | 2021-06-03T19:54:37.000Z | geonode/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/basecommand.py | gem/FaultedEarth-Client | ae1e90adb12aa3d9a80eb6f8c5858c4f4b1918e7 | [
"BSD-3-Clause"
] | 1 | 2016-04-19T13:03:17.000Z | 2016-04-19T13:03:17.000Z | geonode/lib/python2.7/site-packages/pip-1.0.2-py2.7.egg/pip/basecommand.py | gem/FaultedEarth-Client | ae1e90adb12aa3d9a80eb6f8c5858c4f4b1918e7 | [
"BSD-3-Clause"
] | null | null | null | """Base Command class, and related routines"""
import os
import socket
import sys
import traceback
import time
from pip import commands
from pip.log import logger
from pip.baseparser import parser, ConfigOptionParser, UpdatingDefaultsHelpFormatter
from pip.download import urlopen
from pip.exceptions import BadCommand... | 34.558252 | 92 | 0.599382 |
23a2e9e211d20ef6d3e51e2b846592a502c83b3f | 1,101 | py | Python | virtman/drivers/dmsetup.py | vmthunder/virtman | af81ee1eeab96094b716253ad93bda8630bc219d | [
"Apache-2.0"
] | 6 | 2015-02-09T23:39:58.000Z | 2021-05-17T22:18:57.000Z | virtman/drivers/dmsetup.py | vmthunder/virtman | af81ee1eeab96094b716253ad93bda8630bc219d | [
"Apache-2.0"
] | 1 | 2015-05-04T03:41:49.000Z | 2015-05-04T03:41:49.000Z | virtman/drivers/dmsetup.py | vmthunder/virtman | af81ee1eeab96094b716253ad93bda8630bc219d | [
"Apache-2.0"
] | 1 | 2016-08-12T07:00:01.000Z | 2016-08-12T07:00:01.000Z | from pydm import dmsetup
from pydm.blockdev import Blockdev
from virtman.utils import singleton
from virtman.utils import rootwrap
class DmExecutor(dmsetup.Dmsetup):
def __init__(self):
dmsetup.Dmsetup.__init__(self, root_helper=rootwrap.root_helper())
dm = DmExecutor()
prefix = dm.mapdev_prefix
def ... | 23.934783 | 74 | 0.716621 |
78dd8bf2d745021384c30dbcdcc92bd73fbe68a7 | 4,047 | py | Python | spotify_report.py | kevingoldsmith/spotify-extract | 54853c40476405edc43cdcf3224a1384e03c2323 | [
"MIT"
] | null | null | null | spotify_report.py | kevingoldsmith/spotify-extract | 54853c40476405edc43cdcf3224a1384e03c2323 | [
"MIT"
] | 1 | 2021-06-02T03:16:18.000Z | 2021-06-02T03:16:18.000Z | spotify_report.py | kevingoldsmith/spotify-extract | 54853c40476405edc43cdcf3224a1384e03c2323 | [
"MIT"
] | null | null | null | import argparse
from collections import Counter
from datetime import date, datetime, timedelta
import json
import os
from etlutils import datafiles
from etlutils.date import datetime_from_zulutime_string
def get_played_tracks(timespan):
today = date.today()
if timespan == 'year':
start_day = date(toda... | 34.887931 | 154 | 0.672844 |
3671bd60b73028de69e2cc1cca2ecc9da2526320 | 456 | py | Python | utils/path_m2M.py | niasw/EBLtool | 3b96cef71b8621ed7075e43e5cdbbae6f0338d25 | [
"MIT"
] | 1 | 2020-07-15T16:09:27.000Z | 2020-07-15T16:09:27.000Z | utils/path_m2M.py | niasw/EBLtool | 3b96cef71b8621ed7075e43e5cdbbae6f0338d25 | [
"MIT"
] | null | null | null | utils/path_m2M.py | niasw/EBLtool | 3b96cef71b8621ed7075e43e5cdbbae6f0338d25 | [
"MIT"
] | null | null | null | # demo to convert m to M in svg path
s='151.52288,577.5905 72.73098,-54.54824 68.69037,113.13709 -90.91373,72.73098 -111.116773,-20.20305 -12.121831,-80.81221 54.548234,8.08122 4.04061,-66.67006';
a=s.split(' ');
b=[it.split(',') for it in a];
c=[[float(it[0]),float(it[1])] for it in b];
d=[];
t=[0.,0.];
for it in c:
... | 28.5 | 159 | 0.583333 |
bd72d4b33b437fbf389a7c3140c1bc964accff6a | 9,617 | py | Python | parser.py | H-Yin/ProxyHub | 3d0170d0f078c3bdd0f6b15ad3093c908580bb87 | [
"MIT"
] | null | null | null | parser.py | H-Yin/ProxyHub | 3d0170d0f078c3bdd0f6b15ad3093c908580bb87 | [
"MIT"
] | null | null | null | parser.py | H-Yin/ProxyHub | 3d0170d0f078c3bdd0f6b15ad3093c908580bb87 | [
"MIT"
] | null | null | null | #!/opt/anaconda3/bin/python
#-*- coding=utf-8 -*-
##################################################################
# File : parser.py
# Author : H.Yin
# Email : csustyinhao@gmail.com
# Created : 2019-04-17 22:29:52(+0800)
# Modified : 2020-05-17 01:13:08(+0800)
# GitHub : https://... | 41.274678 | 122 | 0.495893 |
565e3405eb873dbad0ef79012635b9a960937ab4 | 2,706 | py | Python | setup.py | LaudateCorpus1/python-billingbudgets | 93a52a9060968a95956f9ec5b7cd7a2ed0fcfce7 | [
"Apache-2.0"
] | 7 | 2019-12-12T21:42:54.000Z | 2022-03-31T04:19:36.000Z | setup.py | LaudateCorpus1/python-billingbudgets | 93a52a9060968a95956f9ec5b7cd7a2ed0fcfce7 | [
"Apache-2.0"
] | 56 | 2020-02-11T13:23:57.000Z | 2022-03-07T16:25:19.000Z | setup.py | LaudateCorpus1/python-billingbudgets | 93a52a9060968a95956f9ec5b7cd7a2ed0fcfce7 | [
"Apache-2.0"
] | 10 | 2019-12-10T01:13:52.000Z | 2022-01-29T08:07:46.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 31.103448 | 74 | 0.687361 |
d90b602c8b90a17a7d8874b69fb912fd02d4e033 | 461 | py | Python | ccal/_get_target_grid_indices.py | kberkey/ccal | 92aa8372997dccec2908928f71a11b6c8327d7aa | [
"MIT"
] | 9 | 2017-10-09T16:54:58.000Z | 2018-12-14T19:49:03.000Z | ccal/_get_target_grid_indices.py | kberkey/ccal | 92aa8372997dccec2908928f71a11b6c8327d7aa | [
"MIT"
] | 8 | 2017-03-11T04:43:04.000Z | 2018-12-10T09:47:14.000Z | ccal/_get_target_grid_indices.py | kberkey/ccal | 92aa8372997dccec2908928f71a11b6c8327d7aa | [
"MIT"
] | 4 | 2017-03-10T19:12:28.000Z | 2022-01-02T21:11:40.000Z | from numpy import apply_along_axis, linspace, meshgrid
def _get_target_grid_indices(nd_array, function):
return tuple(
meshgrid_.astype(int).ravel()
for meshgrid_ in meshgrid(
*(
linspace(0, nd_array.shape[i] - 1, nd_array.shape[i])
for i in range(nd_ar... | 28.8125 | 74 | 0.581345 |
2f71582561acfcab2fb91fa9888094b14700e60e | 4,258 | py | Python | .ycm_extra_conf.py | krafczyk/AOC_2017 | 9261cd859636d324c4fe0bfa426ee43917f4f705 | [
"MIT"
] | null | null | null | .ycm_extra_conf.py | krafczyk/AOC_2017 | 9261cd859636d324c4fe0bfa426ee43917f4f705 | [
"MIT"
] | null | null | null | .ycm_extra_conf.py | krafczyk/AOC_2017 | 9261cd859636d324c4fe0bfa426ee43917f4f705 | [
"MIT"
] | null | null | null | # Copyright (C) 2014 Google Inc.
#
# This file is part of ycmd.
#
# ycmd is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ycmd is di... | 34.33871 | 100 | 0.709488 |
e2d60d4b471188309fd8eb5f39e1ced21ad5d77f | 3,312 | py | Python | custom_components/smarteqconnect/api.py | ReneNulschDE/ha-smart-eq-connect | 12b59d65cd793f78f5dcf7e591bdcc27f969fe1e | [
"MIT"
] | 3 | 2021-11-15T09:41:39.000Z | 2021-12-05T18:58:59.000Z | custom_components/smarteqconnect/api.py | ReneNulschDE/ha-smart-eq-connect | 12b59d65cd793f78f5dcf7e591bdcc27f969fe1e | [
"MIT"
] | null | null | null | custom_components/smarteqconnect/api.py | ReneNulschDE/ha-smart-eq-connect | 12b59d65cd793f78f5dcf7e591bdcc27f969fe1e | [
"MIT"
] | 2 | 2021-11-29T07:09:38.000Z | 2021-12-27T13:05:26.000Z | """Define an object to interact with the REST API."""
import asyncio
import json
import logging
import uuid
from typing import Optional
from aiohttp import ClientSession, ClientTimeout
from aiohttp.client_exceptions import ClientError
from .const import (
REST_API_BASE,
DEVICE_USER_AGENT,
LOGIN_APP_ID_EU... | 32.792079 | 128 | 0.634964 |
93926b7f5a20593b70b4d33fb70619a1f94ad985 | 17,629 | py | Python | python_modules/dagster/dagster/core/host_representation/handle.py | keypointt/dagster | 45683a29cbe2429d4e538254fac9498198f53879 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/host_representation/handle.py | keypointt/dagster | 45683a29cbe2429d4e538254fac9498198f53879 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster/core/host_representation/handle.py | keypointt/dagster | 45683a29cbe2429d4e538254fac9498198f53879 | [
"Apache-2.0"
] | null | null | null | import sys
import threading
from abc import ABC, abstractmethod, abstractproperty
from collections import namedtuple
from dagster import check
from dagster.api.get_server_id import sync_get_server_id
from dagster.api.list_repositories import sync_list_repositories_grpc
from dagster.api.snapshot_repository import sync_... | 32.646296 | 106 | 0.659028 |
bb43e2936c64433c37f5203ec2a8e835f5f688af | 8,301 | py | Python | nasbench/lib/training_time.py | vinodganesan/nasbench_tf2.0 | cc1fb06ef6721bbf811adee6d0ccde2f25d3f817 | [
"Apache-2.0"
] | 1 | 2020-07-06T10:40:13.000Z | 2020-07-06T10:40:13.000Z | nasbench/lib/training_time.py | vinodganesan/nasbench_tf2.0 | cc1fb06ef6721bbf811adee6d0ccde2f25d3f817 | [
"Apache-2.0"
] | null | null | null | nasbench/lib/training_time.py | vinodganesan/nasbench_tf2.0 | cc1fb06ef6721bbf811adee6d0ccde2f25d3f817 | [
"Apache-2.0"
] | 1 | 2021-04-02T00:01:20.000Z | 2021-04-02T00:01:20.000Z | # Copyright 2019 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 35.474359 | 81 | 0.713047 |
c37f0b3e16e8bac1ecdb6fe06a61d5212e9f9ac5 | 245 | py | Python | sound.py | Anees-baig/PATIENT-MONITORING-BY-EMOTIONAL-INTELLIGENCE | c3d49c011e5fe739ff0d37d9a92e59b5b5b3790f | [
"MIT"
] | null | null | null | sound.py | Anees-baig/PATIENT-MONITORING-BY-EMOTIONAL-INTELLIGENCE | c3d49c011e5fe739ff0d37d9a92e59b5b5b3790f | [
"MIT"
] | null | null | null | sound.py | Anees-baig/PATIENT-MONITORING-BY-EMOTIONAL-INTELLIGENCE | c3d49c011e5fe739ff0d37d9a92e59b5b5b3790f | [
"MIT"
] | null | null | null | import winsound
winsound.PlaySound("SystemExit", winsound.SND_ALIAS)
# Probably play Windows default sound, if any is registered (because
# "*" probably isn't the registered name of any sound).
winsound.PlaySound("*", winsound.SND_ALIAS)
| 35 | 69 | 0.759184 |
45c66c1175e8ac49b7ad1f1334ffc75db8d71cf6 | 995 | py | Python | movieStats/urls.py | ANKRAJG/movieStats | bb3a2c670cb4ccd41265c5368c3d83e422b84832 | [
"BSD-3-Clause"
] | null | null | null | movieStats/urls.py | ANKRAJG/movieStats | bb3a2c670cb4ccd41265c5368c3d83e422b84832 | [
"BSD-3-Clause"
] | null | null | null | movieStats/urls.py | ANKRAJG/movieStats | bb3a2c670cb4ccd41265c5368c3d83e422b84832 | [
"BSD-3-Clause"
] | null | null | null | """movieStats URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | 36.851852 | 77 | 0.714573 |
df7058fd606ba5c96a7206f14ad35a6a93a0cd12 | 729 | py | Python | core/management/commands/force_save.py | honno/ascii-forever | 8364219db115229fa9eb0b059e9c0611dcb689cf | [
"MIT"
] | null | null | null | core/management/commands/force_save.py | honno/ascii-forever | 8364219db115229fa9eb0b059e9c0611dcb689cf | [
"MIT"
] | null | null | null | core/management/commands/force_save.py | honno/ascii-forever | 8364219db115229fa9eb0b059e9c0611dcb689cf | [
"MIT"
] | null | null | null | from django.core.management.base import BaseCommand
from django.core.management.base import CommandError
import core.models
models = [getattr(core.models, name) for name in core.models.__all__]
class Command(BaseCommand):
help = "Triggers save method for a model's objects"
def add_arguments(self, parser):
... | 29.16 | 72 | 0.639232 |
fc9a1d6faa3f9bb639733f952cee79011a4ebcbd | 13,035 | py | Python | src/wshop/apps/dashboard/catalogue/forms.py | vituocgia/wshop-core | 5f6d1ec9e9158f13aab136c5bd901c41e69a1dba | [
"BSD-3-Clause"
] | null | null | null | src/wshop/apps/dashboard/catalogue/forms.py | vituocgia/wshop-core | 5f6d1ec9e9158f13aab136c5bd901c41e69a1dba | [
"BSD-3-Clause"
] | null | null | null | src/wshop/apps/dashboard/catalogue/forms.py | vituocgia/wshop-core | 5f6d1ec9e9158f13aab136c5bd901c41e69a1dba | [
"BSD-3-Clause"
] | null | null | null | from django import forms
from django.core import exceptions
from django.utils.translation import ugettext_lazy as _
from treebeard.forms import movenodeform_factory
from wshop.core.loading import get_class, get_model
from wshop.core.utils import slugify
from wshop.forms.widgets import DateTimePickerInput, ImageInput
... | 34.39314 | 84 | 0.644265 |
383839095393422207546d0acb4292b36e453bc9 | 831 | py | Python | lino_xl/lib/meetings/choicelists.py | khchine5/xl | b1634937a9ce87af1e948eb712b934b11f221d9d | [
"BSD-2-Clause"
] | 1 | 2018-01-12T14:09:48.000Z | 2018-01-12T14:09:48.000Z | lino_xl/lib/meetings/choicelists.py | khchine5/xl | b1634937a9ce87af1e948eb712b934b11f221d9d | [
"BSD-2-Clause"
] | 1 | 2019-09-10T05:03:47.000Z | 2019-09-10T05:03:47.000Z | lino_xl/lib/meetings/choicelists.py | khchine5/xl | b1634937a9ce87af1e948eb712b934b11f221d9d | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: UTF-8 -*-
# Copyright 2017 Luc Saffre
# License: BSD (see file COPYING for details)
from __future__ import unicode_literals
from __future__ import print_function
"""
Choicelists for this plugin.
"""
import logging
logger = logging.getLogger(__name__)
from django.db import models
from django.utils.tr... | 22.459459 | 62 | 0.725632 |
48344bbe0b0fe0972ddf9e6a475f4fb1b8c6994c | 2,246 | py | Python | openpeerpower/scripts/__init__.py | pcaston/Open-Peer-Power | 81805d455c548e0f86b0f7fedc793b588b2afdfd | [
"Apache-2.0"
] | null | null | null | openpeerpower/scripts/__init__.py | pcaston/Open-Peer-Power | 81805d455c548e0f86b0f7fedc793b588b2afdfd | [
"Apache-2.0"
] | null | null | null | openpeerpower/scripts/__init__.py | pcaston/Open-Peer-Power | 81805d455c548e0f86b0f7fedc793b588b2afdfd | [
"Apache-2.0"
] | 1 | 2019-04-24T14:10:08.000Z | 2019-04-24T14:10:08.000Z | """Open Peer Power command line scripts."""
import argparse
import asyncio
import importlib
import logging
import os
import sys
from typing import List, Optional, Sequence, Text
from openpeerpower.bootstrap import async_mount_local_lib_path
from openpeerpower.config import get_default_config_dir
from openpeerpower.req... | 29.946667 | 84 | 0.673642 |
736a06b7fe4e6d40d8913f89f22af0512936248f | 2,413 | py | Python | app/rooms/examples/eg004_add_forms_to_room/controller.py | olegliubimov/code-examples-python | 7af8c58138a9dd0f3b0be12eff1768ae23e449d3 | [
"MIT"
] | 21 | 2020-05-13T21:08:44.000Z | 2022-02-18T01:32:16.000Z | app/rooms/examples/eg004_add_forms_to_room/controller.py | olegliubimov/code-examples-python | 7af8c58138a9dd0f3b0be12eff1768ae23e449d3 | [
"MIT"
] | 8 | 2020-11-23T09:28:04.000Z | 2022-02-02T12:04:08.000Z | app/rooms/examples/eg004_add_forms_to_room/controller.py | olegliubimov/code-examples-python | 7af8c58138a9dd0f3b0be12eff1768ae23e449d3 | [
"MIT"
] | 26 | 2020-05-12T22:20:01.000Z | 2022-03-09T10:57:27.000Z | from docusign_rooms import FormForAdd, FormLibrariesApi, RoomsApi
from flask import session, request
from ...utils import create_rooms_api_client
class Eg004Controller:
@staticmethod
def get_args():
"""Get required session and request arguments"""
return {
"account_id": session["d... | 34.471429 | 93 | 0.640282 |
1153f85816b9fe93fa2eea1afe3b82bf7e706892 | 5,483 | py | Python | train.py | HongleiXie/demo-CVAE | 7d5c40735e099d6720200dc436a30fb197f849dd | [
"MIT"
] | 7 | 2020-08-07T05:58:50.000Z | 2022-03-12T21:52:29.000Z | train.py | HongleiXie/demo-CVAE | 7d5c40735e099d6720200dc436a30fb197f849dd | [
"MIT"
] | null | null | null | train.py | HongleiXie/demo-CVAE | 7d5c40735e099d6720200dc436a30fb197f849dd | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
import datetime
import argparse
from model import CVAE
train_size = 60000
test_size = 10000
# num_examples_to_generate = 16
current_time = datetime.datetime.now().strftime("%Y%m%d-%H%M%S")
train_log_dir = 'logs/gradient_tape/' + current_time +... | 35.603896 | 94 | 0.67919 |
5571aea177bce715785a11829b4c3a3f4af1f5d7 | 407 | py | Python | va_explorer/users/migrations/0006_add_user_uuid.py | VA-Explorer/va_explorer | e43cfbff0ce5209c12134b7ac4ce439db6fc87a2 | [
"Apache-2.0"
] | null | null | null | va_explorer/users/migrations/0006_add_user_uuid.py | VA-Explorer/va_explorer | e43cfbff0ce5209c12134b7ac4ce439db6fc87a2 | [
"Apache-2.0"
] | 125 | 2020-10-07T12:00:15.000Z | 2022-03-31T21:29:21.000Z | va_explorer/users/migrations/0006_add_user_uuid.py | VA-Explorer/va_explorer | e43cfbff0ce5209c12134b7ac4ce439db6fc87a2 | [
"Apache-2.0"
] | 2 | 2020-10-29T16:08:42.000Z | 2020-12-08T19:03:41.000Z | # Generated by Django 3.1.5 on 2021-05-28 14:12
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
dependencies = [
('users', '0005_merge_20210210_0136'),
]
operations = [
migrations.AddField(
model_name='user',
name='uuid... | 20.35 | 66 | 0.604423 |
a3e81d116d72c668966f67a2b087ae746ae3d42b | 4,941 | py | Python | test/functional/p2p_node_network_limited.py | pbitmonkey/bitmonkey-debug | f48bab02e88b1fcf445c59380e6fda018d86f462 | [
"MIT"
] | null | null | null | test/functional/p2p_node_network_limited.py | pbitmonkey/bitmonkey-debug | f48bab02e88b1fcf445c59380e6fda018d86f462 | [
"MIT"
] | null | null | null | test/functional/p2p_node_network_limited.py | pbitmonkey/bitmonkey-debug | f48bab02e88b1fcf445c59380e6fda018d86f462 | [
"MIT"
] | 1 | 2020-11-04T06:59:13.000Z | 2020-11-04T06:59:13.000Z | #!/usr/bin/env python3
# Copyright (c) 2017-2019 The bitmonkey Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Tests NODE_NETWORK_LIMITED.
Tests that a node configured with -prune=550 signals NODE_NETWORK_LIMITE... | 40.834711 | 121 | 0.693989 |
22949b9ee1d3d243e0b1de42592895256e8663f7 | 9,914 | bzl | Python | build_defs.bzl | sssooonnnggg/flatbuffers | 0e60cf1ce20803fe202006b15e752f72039f8e9e | [
"Apache-2.0"
] | null | null | null | build_defs.bzl | sssooonnnggg/flatbuffers | 0e60cf1ce20803fe202006b15e752f72039f8e9e | [
"Apache-2.0"
] | null | null | null | build_defs.bzl | sssooonnnggg/flatbuffers | 0e60cf1ce20803fe202006b15e752f72039f8e9e | [
"Apache-2.0"
] | null | null | null | # Description:
# BUILD rules for generating flatbuffer files in various languages.
"""
Rules for building C++ flatbuffers with Bazel.
"""
load("@rules_cc//cc:defs.bzl", "cc_library")
flatc_path = "@com_github_google_flatbuffers//:flatc"
DEFAULT_INCLUDE_PATHS = [
"./",
"$(GENDIR)",
"$(BINDIR)",
"$(... | 38.726563 | 122 | 0.632842 |
f53c2b6bbc86d5dcc0c4321bb5cb54a4fbe74449 | 645 | py | Python | revvviews/apps/main/migrations/0003_auto_20200715_1405.py | trucktar/revvviews | 3a14a4cc8064fde787c7d88ce5bc0a132145ec91 | [
"MIT"
] | null | null | null | revvviews/apps/main/migrations/0003_auto_20200715_1405.py | trucktar/revvviews | 3a14a4cc8064fde787c7d88ce5bc0a132145ec91 | [
"MIT"
] | 11 | 2021-03-30T14:20:00.000Z | 2022-03-12T00:47:29.000Z | revvviews/apps/main/migrations/0003_auto_20200715_1405.py | trucktar/revvviews | 3a14a4cc8064fde787c7d88ce5bc0a132145ec91 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2020-07-15 11:05
import cloudinary.models
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('main', '0002_auto_20200712_1821'),
]
operations = [
migrations.AlterField(
model_name='profile',
na... | 25.8 | 95 | 0.623256 |
cc777a2bad1a7895a54b8d6b334c8af2b2db9f1b | 1,385 | py | Python | simplepytorch/datasets/pickled_dicts.py | adgaudio/simplepytorch | cac4b8b938972f4cfa7fafbca5c330ef4f687563 | [
"MIT"
] | 2 | 2020-02-20T17:01:20.000Z | 2020-05-17T17:28:13.000Z | simplepytorch/datasets/pickled_dicts.py | adgaudio/simplepytorch | cac4b8b938972f4cfa7fafbca5c330ef4f687563 | [
"MIT"
] | null | null | null | simplepytorch/datasets/pickled_dicts.py | adgaudio/simplepytorch | cac4b8b938972f4cfa7fafbca5c330ef4f687563 | [
"MIT"
] | 1 | 2020-05-17T17:28:17.000Z | 2020-05-17T17:28:17.000Z | import torch
import glob
import os.path as P
import pickle
class PickledDicts(torch.utils.data.Dataset):
"""Load a directory of pickled python dictionaries.
Each dict must have at least an "image" key.
"""
def __init__(self, base_dir, img_transform, getitem_transform):
self.base_dir = base_di... | 25.648148 | 67 | 0.622383 |
01d9496117e9e04e812438a184ec60ef40744930 | 138 | py | Python | Tool/qrcode/picture_qrcode.py | wuhongnpm/Gardenia | a07b34ddfff8c058b5bfc9ee5832e59c86e7e276 | [
"MIT"
] | 1 | 2019-05-01T08:03:06.000Z | 2019-05-01T08:03:06.000Z | basic/Tool/qrcode/picture_qrcode.py | wuhongnpm/Python | 1b0d576c8c04db6214b627bbe5530643b1f85da0 | [
"MIT"
] | null | null | null | basic/Tool/qrcode/picture_qrcode.py | wuhongnpm/Python | 1b0d576c8c04db6214b627bbe5530643b1f85da0 | [
"MIT"
] | null | null | null | from MyQR import myqr
myqr.run(
words= 'http://soapeye.top/',
picture='./a.png',
colorized=True,
save_name='webpng.png',
) | 19.714286 | 33 | 0.623188 |
5e8c20e07a556d71377610da48d356f2ed09f23d | 712 | py | Python | jsk_recognition/jsk_pcl_ros/scripts/marker_appender.py | VT-ASIM-LAB/autoware.ai | 211dff3bee2d2782cb10444272c5d98d1f30d33a | [
"Apache-2.0"
] | null | null | null | jsk_recognition/jsk_pcl_ros/scripts/marker_appender.py | VT-ASIM-LAB/autoware.ai | 211dff3bee2d2782cb10444272c5d98d1f30d33a | [
"Apache-2.0"
] | null | null | null | jsk_recognition/jsk_pcl_ros/scripts/marker_appender.py | VT-ASIM-LAB/autoware.ai | 211dff3bee2d2782cb10444272c5d98d1f30d33a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import rospy
PKG='jsk_pcl_ros'
import imp
try:
imp.find_module(PKG)
except:
import roslib;roslib.load_manifest(PKG)
from visualization_msgs.msg import Marker, MarkerArray
marker_array = None
def callback(msg):
global marker_array, marker_array_pub
if not marker_array:
marker_ar... | 22.25 | 79 | 0.758427 |
976b91040e27771b04e82d8a066df86cb32627de | 89 | py | Python | src/izi/apps/dashboard/shipping/__init__.py | izi-core/izi-core | 21176be2d41f0cf54ca954f294209c585f643dba | [
"BSD-3-Clause"
] | null | null | null | src/izi/apps/dashboard/shipping/__init__.py | izi-core/izi-core | 21176be2d41f0cf54ca954f294209c585f643dba | [
"BSD-3-Clause"
] | null | null | null | src/izi/apps/dashboard/shipping/__init__.py | izi-core/izi-core | 21176be2d41f0cf54ca954f294209c585f643dba | [
"BSD-3-Clause"
] | null | null | null | default_app_config = (
'izi.apps.dashboard.shipping.config.ShippingDashboardConfig')
| 29.666667 | 65 | 0.797753 |
05504ddb72ef881452eba16830e7b8c284bd0f31 | 1,137 | py | Python | src/UrlParserWorker.py | GAO23/Pytube-GUI | c6b60f0f6930ea9e6c55b0f2351bd04763647c4b | [
"MIT"
] | 9 | 2020-03-01T12:25:46.000Z | 2021-03-06T16:56:19.000Z | src/UrlParserWorker.py | GAO23/Pytube-GUI | c6b60f0f6930ea9e6c55b0f2351bd04763647c4b | [
"MIT"
] | null | null | null | src/UrlParserWorker.py | GAO23/Pytube-GUI | c6b60f0f6930ea9e6c55b0f2351bd04763647c4b | [
"MIT"
] | 3 | 2020-08-27T18:09:31.000Z | 2021-04-20T08:17:32.000Z | from PyQt5.QtCore import QObject, pyqtSignal
import threading
class ParserWorker(QObject):
finished = pyqtSignal()
# app in this case is the DownloaderGUI.MainWindow and arg1 is the QListWidgetItem, and the arg2 is the url passed from the url line edit
def __init__(self, arg1, arg2, main_window):
... | 40.607143 | 141 | 0.669305 |
9760b78520d8fde3350f894c025a5a328241d07a | 799 | py | Python | list_task.py | mixNIK999/hw1 | 97faa04c6454e5a3a3417e1d13ef97c42dbc7b58 | [
"Unlicense"
] | null | null | null | list_task.py | mixNIK999/hw1 | 97faa04c6454e5a3a3417e1d13ef97c42dbc7b58 | [
"Unlicense"
] | null | null | null | list_task.py | mixNIK999/hw1 | 97faa04c6454e5a3a3417e1d13ef97c42dbc7b58 | [
"Unlicense"
] | null | null | null |
# Remove equal adjacent elements
#
# Example input: [1, 2, 2, 3]
# Example output: [1, 2, 3]
def remove_adjacent(lst):
return [x for i, x in enumerate(lst) if i < 1 or lst[i - 1] != x]
# Merge two sorted lists in one sorted list in linear time
#
# Example input: [2, 4, 6], [1, 3, 5]
# Example output: [1, 2, 3, ... | 22.828571 | 69 | 0.536921 |
8a87891c8219527c656816b71dc334ec1fe3af9f | 58,033 | py | Python | app.py | IFB-ElixirFr/FAIR-checker | 0984461fb265ddb14e01c9b8ef461c6e1e495f54 | [
"MIT"
] | null | null | null | app.py | IFB-ElixirFr/FAIR-checker | 0984461fb265ddb14e01c9b8ef461c6e1e495f54 | [
"MIT"
] | 48 | 2022-02-02T16:09:36.000Z | 2022-03-31T15:23:15.000Z | app.py | IFB-ElixirFr/FAIR-checker | 0984461fb265ddb14e01c9b8ef461c6e1e495f54 | [
"MIT"
] | null | null | null | from asyncio.log import logger
from unittest import result
import eventlet
from numpy import broadcast
# from https://github.com/eventlet/eventlet/issues/670
eventlet.monkey_patch(select=False)
import sys
from flask import (
Flask,
request,
render_template,
session,
send_file,
send_from_direct... | 38.483422 | 458 | 0.620992 |
95151f0ec6cf4cd86a0c88b09a750a36a8d968ed | 1,727 | py | Python | tests/unit/anonymizer/test_min.py | aleph-research/diff-priv-laplace-python | 74233931a0edc1503c332d731d9aa2784ec04189 | [
"MIT"
] | 6 | 2020-04-13T01:09:38.000Z | 2020-11-11T08:01:18.000Z | tests/unit/anonymizer/test_min.py | aleph-research/diff-priv-laplace-python | 74233931a0edc1503c332d731d9aa2784ec04189 | [
"MIT"
] | null | null | null | tests/unit/anonymizer/test_min.py | aleph-research/diff-priv-laplace-python | 74233931a0edc1503c332d731d9aa2784ec04189 | [
"MIT"
] | null | null | null | import unittest
import numpy as np
from diffpriv_laplace.anonymizer.min import DiffPrivMinAnonymizer
class TestDiffPrivMinAnonymizer(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def set_seed(self):
np.random.seed(31337)
def test_global_sensitivity_gette... | 31.4 | 71 | 0.675738 |
b64cebb7a6aca64f95671e751cee0639a64a8eed | 7,510 | py | Python | dashboard_loader/dashboard_loader/loader_utils/graph.py | data61/Openboard | aaf7ef49e05c0771094efc6be811c6ae88055252 | [
"Apache-2.0"
] | 2 | 2017-08-29T23:05:51.000Z | 2019-04-02T21:11:35.000Z | dashboard_loader/dashboard_loader/loader_utils/graph.py | data61/Openboard | aaf7ef49e05c0771094efc6be811c6ae88055252 | [
"Apache-2.0"
] | 1 | 2019-04-02T21:11:26.000Z | 2019-04-03T15:12:57.000Z | dashboard_loader/dashboard_loader/loader_utils/graph.py | data61/Openboard | aaf7ef49e05c0771094efc6be811c6ae88055252 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015,2016 NICTA
#
# 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... | 50.743243 | 148 | 0.686285 |
017b2de42233d6fdc7a2c5eedfa312315b41a7e8 | 684 | py | Python | 19.py | henry-tujia/LeetCode | 887da5bfae6fe317393fec552b8062a048aa8bc9 | [
"Apache-2.0"
] | null | null | null | 19.py | henry-tujia/LeetCode | 887da5bfae6fe317393fec552b8062a048aa8bc9 | [
"Apache-2.0"
] | null | null | null | 19.py | henry-tujia/LeetCode | 887da5bfae6fe317393fec552b8062a048aa8bc9 | [
"Apache-2.0"
] | null | null | null | # Definition for singly-linked list.
class ListNode(object):
def __init__(self, val=0, next=None):
self.val = val
self.next = next
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, val=0, next=None):
# self.val = val
# self.next = next
class So... | 25.333333 | 67 | 0.580409 |
2ed9eb61ec1d7988968821833e2450b32d9e4ed6 | 6,026 | py | Python | cvpack/torch_modeling/engine/engine.py | zju3dv/SMAP | 9fbcbe4ee2cd6f6d6d6a4e5a05a637629cb5b2e1 | [
"Apache-2.0"
] | 209 | 2020-08-05T08:53:17.000Z | 2022-03-28T07:13:10.000Z | cvpack/torch_modeling/engine/engine.py | liangheming/SMAP | 3e07b78c401bea73de5beb0c942fc0ba6a32ba77 | [
"Apache-2.0"
] | 50 | 2020-08-26T12:27:39.000Z | 2022-03-28T08:43:17.000Z | cvpack/torch_modeling/engine/engine.py | liangheming/SMAP | 3e07b78c401bea73de5beb0c942fc0ba6a32ba77 | [
"Apache-2.0"
] | 34 | 2020-08-26T06:04:07.000Z | 2022-01-28T09:43:25.000Z | # encoding: utf-8
import os
import os.path as osp
import time
import argparse
import torch
import torch.distributed as dist
from collections import OrderedDict
from cvpack.utils.pyt_utils import (
parse_torch_devices, extant_file, link_file, ensure_dir)
from cvpack.utils.logger import get_logger
from .checkpoin... | 33.10989 | 84 | 0.605045 |
181c4129755b613fb32d0bd11da151857951ce4d | 23,233 | py | Python | src/mypy_zope/plugin.py | clokep/mypy-zope | 1b6ec81e64ca10844afcf53291a5754153fd930a | [
"MIT"
] | null | null | null | src/mypy_zope/plugin.py | clokep/mypy-zope | 1b6ec81e64ca10844afcf53291a5754153fd930a | [
"MIT"
] | null | null | null | src/mypy_zope/plugin.py | clokep/mypy-zope | 1b6ec81e64ca10844afcf53291a5754153fd930a | [
"MIT"
] | null | null | null | import sys
from typing import List, Dict, Any, Callable, Optional, Tuple, Sequence, Union
from typing import Type as PyType
from typing import cast
from mypy.types import (
Type,
Instance,
CallableType,
UnionType,
NoneTyp,
AnyType,
TypeOfAny,
PartialType,
FunctionLike,
)
from mypy.c... | 36.819334 | 88 | 0.592218 |
4146a1d8b60338a8b2ff6331128dfb6acfae4f9b | 158 | py | Python | meiduo_mall/meiduo_mall/apps/verifications/apps.py | potato-csh/meiduo_project | e0cf444fa7e16fd5768a05334ccfe3f741984000 | [
"MIT"
] | 1 | 2021-04-18T07:00:12.000Z | 2021-04-18T07:00:12.000Z | meiduo_mall/meiduo_mall/apps/verifications/apps.py | potato-csh/meiduo_project | e0cf444fa7e16fd5768a05334ccfe3f741984000 | [
"MIT"
] | null | null | null | meiduo_mall/meiduo_mall/apps/verifications/apps.py | potato-csh/meiduo_project | e0cf444fa7e16fd5768a05334ccfe3f741984000 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class VerificationsConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'verifications'
| 22.571429 | 56 | 0.778481 |
e32a1ffae01e146bf0193a35eb820b6b67a8795f | 1,103 | py | Python | moi/moi/urls.py | Ecotrust/F2S-MOI | aeb38942d6539c50f252ea3ff6fbff07aabc5088 | [
"Apache-2.0"
] | null | null | null | moi/moi/urls.py | Ecotrust/F2S-MOI | aeb38942d6539c50f252ea3ff6fbff07aabc5088 | [
"Apache-2.0"
] | 33 | 2015-05-06T00:47:20.000Z | 2016-11-08T21:13:44.000Z | moi/moi/urls.py | Ecotrust/F2S-MOI | aeb38942d6539c50f252ea3ff6fbff07aabc5088 | [
"Apache-2.0"
] | null | null | null | from django.conf.urls import include, url
from django.conf import settings
from django.contrib import admin
from wagtail.wagtailadmin import urls as wagtailadmin_urls
from wagtail.wagtaildocs import urls as wagtaildocs_urls
from wagtail.wagtailcore import urls as wagtail_urls
from wagtail.wagtailsearch.signal_handlers... | 33.424242 | 80 | 0.771532 |
b11c27876a99cebbc6752ff450a0189a8ba147ce | 5,572 | py | Python | panko-6.0.0/panko/api/controllers/v2/utils.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | null | null | null | panko-6.0.0/panko/api/controllers/v2/utils.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | panko-6.0.0/panko/api/controllers/v2/utils.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | #
# Copyright 2012 New Dream Network, LLC (DreamHost)
# Copyright 2013 IBM Corp.
# Copyright 2013 eNovance <licensing@enovance.com>
# Copyright Ericsson AB 2013. All rights reserved
# Copyright 2014 Hewlett-Packard Company
# Copyright 2015 Huawei Technologies Co., Ltd.
#
# Licensed under the Apache License, Version 2.0... | 39.239437 | 79 | 0.642139 |
162112d219dc40a1c8e63e0f91fcaf1b58957a2e | 26,393 | py | Python | oauth2_provider/oauth2_validators.py | scaredcat/django-oauth-toolkit | 6b2f5f81f74e1f0cf0e81a02d5fd497c4b671139 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-09-25T04:53:29.000Z | 2020-09-25T04:53:29.000Z | oauth2_provider/oauth2_validators.py | scnerd/django-oauth-toolkit | 34b1a8ae0b997c5de3e8723e11ead1480c8778f8 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2022-02-20T23:18:25.000Z | 2022-02-20T23:18:25.000Z | oauth2_provider/oauth2_validators.py | scnerd/django-oauth-toolkit | 34b1a8ae0b997c5de3e8723e11ead1480c8778f8 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | import base64
import binascii
import logging
from collections import OrderedDict
from datetime import datetime, timedelta
from urllib.parse import unquote_plus
import requests
from django.conf import settings
from django.contrib.auth import authenticate, get_user_model
from django.core.exceptions import ObjectDoesNotE... | 40.66718 | 109 | 0.633426 |
a8b28ab118d7fc5ddf10f506de322833d79f23d4 | 796 | py | Python | Ham/_django-web-app/hmart/hmart/urls.py | IsaacKhan/retailer_enterprise | c4bfd63d23e75b3d5370448e478eda88ab80a661 | [
"MIT"
] | null | null | null | Ham/_django-web-app/hmart/hmart/urls.py | IsaacKhan/retailer_enterprise | c4bfd63d23e75b3d5370448e478eda88ab80a661 | [
"MIT"
] | null | null | null | Ham/_django-web-app/hmart/hmart/urls.py | IsaacKhan/retailer_enterprise | c4bfd63d23e75b3d5370448e478eda88ab80a661 | [
"MIT"
] | null | null | null | """hmart URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/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 v... | 34.608696 | 77 | 0.702261 |
9acb18fb45134e2008c6d7dae712baba6d8cdfd3 | 6,220 | py | Python | code/baseline.py | BishengLi0327/Topology-Restoration-Based-on-GNN | 99ede7abbab1ce06f094d79ad18e58f30fc7fc4b | [
"MIT"
] | 1 | 2022-01-17T06:41:04.000Z | 2022-01-17T06:41:04.000Z | code/baseline.py | BishengLi0327/Topology-Restoration-Based-on-GNN | 99ede7abbab1ce06f094d79ad18e58f30fc7fc4b | [
"MIT"
] | null | null | null | code/baseline.py | BishengLi0327/Topology-Restoration-Based-on-GNN | 99ede7abbab1ce06f094d79ad18e58f30fc7fc4b | [
"MIT"
] | null | null | null | import numpy as np
import random
import os
from sklearn.metrics import roc_auc_score
from torch_geometric.data import Data
from torch_geometric.utils import add_self_loops, train_test_split_edges, negative_sampling
from tensorboardX import SummaryWriter
import argparse
from data_process import load_huawei... | 41.744966 | 116 | 0.661093 |
86465bb0fd14793adc1f06782f9682d28094f381 | 3,465 | py | Python | arguments.py | panargirakis/hindsight-experience-replay | 58d92dd2c83b8e63ea8c64bcd9197689d0fdea33 | [
"MIT"
] | null | null | null | arguments.py | panargirakis/hindsight-experience-replay | 58d92dd2c83b8e63ea8c64bcd9197689d0fdea33 | [
"MIT"
] | null | null | null | arguments.py | panargirakis/hindsight-experience-replay | 58d92dd2c83b8e63ea8c64bcd9197689d0fdea33 | [
"MIT"
] | null | null | null | import argparse
"""
Here are the param for the training
"""
def get_args():
parser = argparse.ArgumentParser()
# the environment setting
parser.add_argument('--env1-name', type=str, default='FetchPickAndPlace-v1', help='the first environment name')
parser.add_argument('--env2-name', type=str, default... | 66.634615 | 115 | 0.709668 |
50b44a7d7b746b09315624276c1665c8c4182b6b | 4,617 | py | Python | graph-measures/features_algorithms/accelerated_graph_features/src/accelerated_graph_features/graph_converter.py | Unknown-Data/QGCN | e074ada31c13b6de6eabba2b2ebce90e88fdfdbf | [
"MIT"
] | 3 | 2021-04-21T16:06:51.000Z | 2022-03-31T12:09:01.000Z | graph-measures/features_algorithms/accelerated_graph_features/src/accelerated_graph_features/graph_converter.py | Unknown-Data/QGCN | e074ada31c13b6de6eabba2b2ebce90e88fdfdbf | [
"MIT"
] | 1 | 2021-02-04T07:48:16.000Z | 2021-02-24T23:01:41.000Z | graph-measures/features_algorithms/accelerated_graph_features/src/accelerated_graph_features/graph_converter.py | Unknown-Data/QGCN | e074ada31c13b6de6eabba2b2ebce90e88fdfdbf | [
"MIT"
] | null | null | null | import networkx as nx
def convert_graph_to_db_format(input_graph: nx.Graph, with_weights=False, cast_to_directed=False):
"""Converts a given graph into a DB format, which consists of two or three lists
1. **Index list:** a list where the i-th position contains the index of the beginning of the li... | 39.127119 | 179 | 0.633961 |
fce3e60406df51b1132bf1e2574cbb581fa5efd3 | 464 | py | Python | src/tests/task_print.py | santiagxf/jobtools | e7c96296b80a0536b4b2c02cf6d8039b4abaa50f | [
"MIT"
] | null | null | null | src/tests/task_print.py | santiagxf/jobtools | e7c96296b80a0536b4b2c02cf6d8039b4abaa50f | [
"MIT"
] | null | null | null | src/tests/task_print.py | santiagxf/jobtools | e7c96296b80a0536b4b2c02cf6d8039b4abaa50f | [
"MIT"
] | null | null | null | from types import SimpleNamespace
from typing import List
import jobtools
from types import SimpleNamespace
def mytask(name: str, params: SimpleNamespace) -> int:
sum = params.value1 + params.value2
sum_in_dict = params.to_dict()['group1']['value1'] + params.to_dict()['group1']['value2']
assert sum == sum... | 27.294118 | 93 | 0.702586 |
3be8d3e830de3cb2b327044ac5ebf7c91007fd8e | 8,316 | py | Python | sleap/message.py | hectorcarrion/sleap | 1150c2d0b64543e07d4b2429ea245a5afaa07cee | [
"BSD-3-Clause-Clear"
] | 156 | 2020-05-01T18:43:43.000Z | 2022-03-25T10:31:18.000Z | sleap/message.py | oeway/sleap | 1eb06f81eb8f0bc1beedd1c3dd10902f8ff9e724 | [
"BSD-3-Clause-Clear"
] | 299 | 2020-04-20T16:37:52.000Z | 2022-03-31T23:54:48.000Z | sleap/message.py | oeway/sleap | 1eb06f81eb8f0bc1beedd1c3dd10902f8ff9e724 | [
"BSD-3-Clause-Clear"
] | 41 | 2020-05-14T15:25:21.000Z | 2022-03-25T12:44:54.000Z | """
Module with classes for sending and receiving messages between processes.
These use ZMQ pub/sub sockets.
Most of the time you'll want the PairedSender and PairedReceiver.
These support a "handshake" to confirm connection. Without an initial
handshake there's a good chance early messages will be dropped.
Each mes... | 31.5 | 88 | 0.627946 |
bf1426cc246d0cdc2ad79bead2b24ce8ac61c2e6 | 1,041 | py | Python | asynchronous_qiwi/call/API/QIWIWallet/webhook_api/register_hook.py | LexLuthorReal/asynchronous_qiwi | 5847a8d4008493656e973e5283888a4e57234962 | [
"MIT"
] | 3 | 2021-05-20T02:36:30.000Z | 2021-11-28T16:00:15.000Z | asynchronous_qiwi/call/API/QIWIWallet/webhook_api/register_hook.py | LexLuthorReal/asynchronous_qiwi | 5847a8d4008493656e973e5283888a4e57234962 | [
"MIT"
] | null | null | null | asynchronous_qiwi/call/API/QIWIWallet/webhook_api/register_hook.py | LexLuthorReal/asynchronous_qiwi | 5847a8d4008493656e973e5283888a4e57234962 | [
"MIT"
] | 1 | 2021-11-28T16:00:20.000Z | 2021-11-28T16:00:20.000Z | from .....data.URL import QIWIWalletURLS
from .....connector.aiohttp_connector import Connector
from .....data_types.connector.request_type import PUT
from .....data_types.QIWIWallet import HookType, NotifyType
class RegistrationHookAPI:
@classmethod
async def register_hook(cls, wallet_api_key: str, hook_typ... | 43.375 | 118 | 0.637848 |
fce720b8e33b1b124461e5755b0bb97ed74588e6 | 6,818 | py | Python | tests/histogram_match_tests.py | planetlabs/color_balance | 82f45e8f88386e145983c103e68cdfd70d168404 | [
"Apache-2.0"
] | 25 | 2015-01-06T17:56:38.000Z | 2021-04-15T20:03:15.000Z | tests/histogram_match_tests.py | planetlabs/color_balance | 82f45e8f88386e145983c103e68cdfd70d168404 | [
"Apache-2.0"
] | 7 | 2015-01-02T20:21:39.000Z | 2022-03-23T14:52:28.000Z | tests/histogram_match_tests.py | planetlabs/color_balance | 82f45e8f88386e145983c103e68cdfd70d168404 | [
"Apache-2.0"
] | 6 | 2015-01-06T17:56:42.000Z | 2019-02-01T10:59:43.000Z | """
Copyright 2014 Planet Labs, 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, softwa... | 35.510417 | 103 | 0.611176 |
c09b3546ecb5ac7548bb93d2d2d3260b893e2ce0 | 458 | py | Python | python/ql/test/library-tests/PointsTo/metaclass/test.py | vadi2/codeql | a806a4f08696d241ab295a286999251b56a6860c | [
"MIT"
] | 4,036 | 2020-04-29T00:09:57.000Z | 2022-03-31T14:16:38.000Z | python/ql/test/library-tests/PointsTo/metaclass/test.py | vadi2/codeql | a806a4f08696d241ab295a286999251b56a6860c | [
"MIT"
] | 2,970 | 2020-04-28T17:24:18.000Z | 2022-03-31T22:40:46.000Z | python/ql/test/library-tests/PointsTo/metaclass/test.py | ScriptBox99/github-codeql | 2ecf0d3264db8fb4904b2056964da469372a235c | [
"MIT"
] | 794 | 2020-04-29T00:28:25.000Z | 2022-03-30T08:21:46.000Z | import six
class Meta1(type):
pass
class Meta2(type):
pass
@six.add_metaclass(Meta1)
class C1(object):
pass
@six.add_metaclass(Meta2)
class C2(object):
pass
#No explicit metaclass
class C3(object):
pass
#Multiple non-conflicting metaclasses:
class C4(C2, object):
pass
#Metaclass conflict
... | 12.378378 | 38 | 0.709607 |
a4efd9a0aa8d2b336330d35a0a195ba5420531bd | 760 | py | Python | olddefconfig.py | rossburton/Kconfiglib | 424d0d38e7be15c52fae761a0a98028c4e13212d | [
"ISC"
] | null | null | null | olddefconfig.py | rossburton/Kconfiglib | 424d0d38e7be15c52fae761a0a98028c4e13212d | [
"ISC"
] | null | null | null | olddefconfig.py | rossburton/Kconfiglib | 424d0d38e7be15c52fae761a0a98028c4e13212d | [
"ISC"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2018-2019, Ulf Magnusson
# SPDX-License-Identifier: ISC
"""
Updates an old .config file or creates a new one, by filling in default values
for all new symbols. This is the same as picking the default selection for all
symbols in oldconfig, or entering the menuconfig interface and... | 26.206897 | 78 | 0.751316 |
2118bb7dd50b506bfc7cde963cb6d08d6b5a0b53 | 4,273 | py | Python | server/SA/calculate_emotion.py | evmiguel/threeflows | 2389a419a66c28eb7d401013bdb76acac2029484 | [
"MIT"
] | 7 | 2019-06-13T13:23:40.000Z | 2022-02-06T17:34:26.000Z | server/SA/calculate_emotion.py | evmiguel/threeflows | 2389a419a66c28eb7d401013bdb76acac2029484 | [
"MIT"
] | 352 | 2016-06-14T20:24:57.000Z | 2022-03-08T22:48:53.000Z | server/SA/calculate_emotion.py | evmiguel/threeflows | 2389a419a66c28eb7d401013bdb76acac2029484 | [
"MIT"
] | 10 | 2016-06-15T22:36:55.000Z | 2022-02-06T17:34:37.000Z | # server.py
#from flask import Flask, render_template, request
import sys
#sys.path.append('/usr/local/lib/python3.7/site-packages')
#from flask_cors import CORS
#import re
import tensorflow as tf
from keras.models import Sequential
from keras.layers import Dense
from keras.models import model_from_json
from sklearn.sv... | 31.651852 | 89 | 0.731336 |
5564af60bb3fa7ed03ebc7868f4da06177433a35 | 1,802 | py | Python | flow/models.py | aaalgo/paperworks | ea26a86469a878bcd4cb4ed3f5303ec37d21d733 | [
"BSD-2-Clause"
] | 14 | 2018-02-11T00:11:11.000Z | 2018-08-21T12:16:02.000Z | flow/models.py | aaalgo/paperworks | ea26a86469a878bcd4cb4ed3f5303ec37d21d733 | [
"BSD-2-Clause"
] | 1 | 2018-06-29T00:57:18.000Z | 2018-07-10T20:09:28.000Z | flow/models.py | aaalgo/paperworks | ea26a86469a878bcd4cb4ed3f5303ec37d21d733 | [
"BSD-2-Clause"
] | 2 | 2018-02-16T18:16:10.000Z | 2018-07-06T05:29:54.000Z | from django.db import models
import numpy as np
import os
import cv2
from params import *
class Page (models.Model):
done = models.BooleanField(default = False)
pass
class Image (models.Model):
path = models.CharField(max_length=2500)
page = models.ForeignKey(Page, on_delete=models.SET_NULL, null=True... | 31.614035 | 75 | 0.676471 |
d93c3e7b993b4f1f40000a5375b39676ddc51f7e | 6,738 | py | Python | dvc/machine/__init__.py | steph-en-m/dvc | 13238e97168007cb5ba21966368457776274b9ca | [
"Apache-2.0"
] | 1 | 2022-03-16T13:27:40.000Z | 2022-03-16T13:27:40.000Z | dvc/machine/__init__.py | steph-en-m/dvc | 13238e97168007cb5ba21966368457776274b9ca | [
"Apache-2.0"
] | 41 | 2021-11-16T15:38:50.000Z | 2022-03-30T10:32:14.000Z | dvc/machine/__init__.py | steph-en-m/dvc | 13238e97168007cb5ba21966368457776274b9ca | [
"Apache-2.0"
] | null | null | null | import logging
import os
from typing import (
TYPE_CHECKING,
Any,
Dict,
Iterable,
Iterator,
Mapping,
Optional,
Tuple,
Type,
)
from dvc.exceptions import DvcException
from dvc.types import StrPath
if TYPE_CHECKING:
from dvc.repo import Repo
from .backend.base import BaseMac... | 29.946667 | 78 | 0.610864 |
fa6cb427dae9296f75332ed2d9ae225d1a2e6042 | 1,518 | py | Python | Problems/isPerm.py | HKuz/Test_Code | 798efc9fc668ef021736a6d9699ef4713cf8b718 | [
"MIT"
] | 1 | 2020-06-14T20:10:04.000Z | 2020-06-14T20:10:04.000Z | Problems/isPerm.py | makramjandar/Test_Code | 798efc9fc668ef021736a6d9699ef4713cf8b718 | [
"MIT"
] | null | null | null | Problems/isPerm.py | makramjandar/Test_Code | 798efc9fc668ef021736a6d9699ef4713cf8b718 | [
"MIT"
] | 1 | 2019-12-09T12:48:05.000Z | 2019-12-09T12:48:05.000Z | #!/usr/local/bin/python3
def main():
# Test suite
tests = [
[None, 'foo', False],
['', 'foo', False],
['Nib', 'bin', False],
['act', 'cat', True],
['a ct', 'ca t', True]
]
for item in tests:
temp_result = is_permutation(item[0], item[1])
if temp... | 23.353846 | 135 | 0.550725 |
69d5b8387c0779084c7726a35828b12507b73b5a | 2,391 | py | Python | setup.py | kvoss/optobench | 8747056545d215fe625e4000f53ba67f7f30617f | [
"BSD-3-Clause"
] | null | null | null | setup.py | kvoss/optobench | 8747056545d215fe625e4000f53ba67f7f30617f | [
"BSD-3-Clause"
] | 22 | 2021-06-08T23:37:42.000Z | 2022-02-19T15:43:30.000Z | setup.py | kvoss/optobench | 8747056545d215fe625e4000f53ba67f7f30617f | [
"BSD-3-Clause"
] | null | null | null | # import sysconfig
from distutils.core import setup, Extension
try:
import numpy as np
numpy_include_dir = np.get_include()
except ImportError:
numpy_include_dir = '/usr/lib/python3/dist-packages/numpy/core/include'
# extra_compile_args = sysconfig.get_config_var('CXXFLAGS').split()
extra_compile_args = [... | 29.8875 | 75 | 0.704726 |
2a471ecad822f0039f81d518509814c6db3dad93 | 1,072 | py | Python | Problemset/reverse-nodes-in-k-group/reverse-nodes-in-k-group.py | KivenCkl/LeetCode | fcc97c66f8154a5d20c2aca86120cb37b9d2d83d | [
"MIT"
] | 7 | 2019-05-08T03:41:05.000Z | 2020-12-22T12:39:43.000Z | Problemset/reverse-nodes-in-k-group/reverse-nodes-in-k-group.py | Yuziquan/LeetCode | 303fc1c8af847f783c4020bd731b28b72ed92a35 | [
"MIT"
] | 1 | 2021-07-19T03:48:35.000Z | 2021-07-19T03:48:35.000Z | Problemset/reverse-nodes-in-k-group/reverse-nodes-in-k-group.py | Yuziquan/LeetCode | 303fc1c8af847f783c4020bd731b28b72ed92a35 | [
"MIT"
] | 7 | 2019-05-10T20:43:20.000Z | 2021-02-22T03:47:35.000Z |
# @Title: K 个一组翻转链表 (Reverse Nodes in k-Group)
# @Author: KivenC
# @Date: 2019-01-27 22:17:52
# @Runtime: 104 ms
# @Memory: 7.6 MB
# Definition for singly-linked list.
# class ListNode:
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution:
def reverseKGroup(self, head, k)... | 24.363636 | 55 | 0.469216 |
117143092fa8a5060eaf0fe8d3e3d6dc23ee1d2c | 1,213 | py | Python | jlab_aiidatree/rest.py | chrisjsewell/jupyterlab_server | 333c0d35a86a449a7f143c8829b851329f81ec7e | [
"BSD-3-Clause"
] | null | null | null | jlab_aiidatree/rest.py | chrisjsewell/jupyterlab_server | 333c0d35a86a449a7f143c8829b851329f81ec7e | [
"BSD-3-Clause"
] | 5 | 2021-05-14T11:57:26.000Z | 2021-05-14T12:40:56.000Z | jlab_aiidatree/rest.py | chrisjsewell/jupyterlab_server | 333c0d35a86a449a7f143c8829b851329f81ec7e | [
"BSD-3-Clause"
] | null | null | null | import tornado
from jupyter_server.base.handlers import APIHandler
from jupyter_server.utils import url_path_join
from . import aiida_server
from .utils import clean_reason
class QueryBuilderEndpoint(APIHandler):
@tornado.web.authenticated
def post(self):
input_data = self.get_json_body() or {}
... | 26.955556 | 84 | 0.651278 |
923878dde3a887f79ddad2ac354b6dda6be83af2 | 6,657 | py | Python | WIN_NetAdapterConfiguration/OS_gathering/files/extracting.py | exastro-playbook-collection/OS-Windows2019 | 79c4f13e75ae1d4380d30f503f04ffb4dcf52ecf | [
"Apache-2.0"
] | null | null | null | WIN_NetAdapterConfiguration/OS_gathering/files/extracting.py | exastro-playbook-collection/OS-Windows2019 | 79c4f13e75ae1d4380d30f503f04ffb4dcf52ecf | [
"Apache-2.0"
] | null | null | null | WIN_NetAdapterConfiguration/OS_gathering/files/extracting.py | exastro-playbook-collection/OS-Windows2019 | 79c4f13e75ae1d4380d30f503f04ffb4dcf52ecf | [
"Apache-2.0"
] | 1 | 2021-09-29T05:39:41.000Z | 2021-09-29T05:39:41.000Z | import re
import json
import sys
import os
args = sys.argv
if (len(args) < 2):
sys.exit(1)
path = args[1]
if(path[-1:] == "/"):
path = path[:-1]
result_filedata_list = []
interface_info = {}
target_filepath_list = []
target_filepath_list.append('/1/stdout.txt')
target_filepath_list.append('/3/stdout.txt')
... | 44.086093 | 89 | 0.515848 |
84a6bc7636e0a5afd1dc92cefb4d981d735d157d | 2,443 | py | Python | test/functional/rpc_getblockfilter.py | bitcorub/bitrub | 28711e4e8ebdee144a1437ece07afcf792a7cf60 | [
"MIT"
] | 1 | 2019-12-09T18:33:47.000Z | 2019-12-09T18:33:47.000Z | test/functional/rpc_getblockfilter.py | bitcorub/bitrub | 28711e4e8ebdee144a1437ece07afcf792a7cf60 | [
"MIT"
] | null | null | null | test/functional/rpc_getblockfilter.py | bitcorub/bitrub | 28711e4e8ebdee144a1437ece07afcf792a7cf60 | [
"MIT"
] | 1 | 2019-12-12T20:05:36.000Z | 2019-12-12T20:05:36.000Z | #!/usr/bin/env python3
# Copyright (c) 2018 The BitRub Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the getblockfilter RPC."""
from test_framework.test_framework import BitRubTestFramework
from test_fram... | 40.716667 | 112 | 0.694228 |
ce3a25c36139fe583663dea227a6ce5dba2c1f98 | 1,221 | py | Python | firebot/modules/__init__.py | vikas04599/Fire-X | 527d57c29785f36e1b07aa739f3ac7c969cc916c | [
"MIT"
] | 20 | 2021-08-16T18:49:49.000Z | 2022-02-23T08:35:57.000Z | firebot/modules/__init__.py | vikas04599/Fire-X | 527d57c29785f36e1b07aa739f3ac7c969cc916c | [
"MIT"
] | null | null | null | firebot/modules/__init__.py | vikas04599/Fire-X | 527d57c29785f36e1b07aa739f3ac7c969cc916c | [
"MIT"
] | 93 | 2021-08-16T19:16:20.000Z | 2022-03-31T02:02:06.000Z | from var import Var
from firebot.Configs import Config
from firebot.utils import fire_on_cmd
issudousing = Config.SUDO_USERS
islogokay = Config.PRIVATE_GROUP_ID
isdbfine = Var.DB_URI
isherokuokay = Var.HEROKU_APP_NAME
gdriveisshit = Config.AUTH_TOKEN_DATA
wttrapi = Config.OPEN_WEATHER_MAP_APPID
rmbg = Config.REM_BG_AP... | 19.380952 | 39 | 0.660934 |
321670dce6fbd16700f68aa2d8faa4facaa593ba | 5,721 | py | Python | pysc2/lib/protocol.py | zeuseyera/pysc2 | df837baa43afd486d9f70a83c64bf12ff1962781 | [
"Apache-2.0"
] | 21 | 2018-12-27T05:04:49.000Z | 2021-05-20T16:20:32.000Z | pysc2/lib/protocol.py | zeuseyera/pysc2 | df837baa43afd486d9f70a83c64bf12ff1962781 | [
"Apache-2.0"
] | 1 | 2021-12-08T04:09:49.000Z | 2021-12-08T04:09:49.000Z | pysc2/lib/protocol.py | zeuseyera/pysc2 | df837baa43afd486d9f70a83c64bf12ff1962781 | [
"Apache-2.0"
] | 13 | 2019-01-02T08:35:45.000Z | 2021-02-23T20:55:02.000Z | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 32.505682 | 82 | 0.682923 |
a4466537edfa8c690b7d12f9cd48dc4dc5498b0d | 52,960 | py | Python | tensorflow/python/util/nest.py | lewjae/tensorflow | c9d522e2b93d11325d8900eb802176f112604235 | [
"Apache-2.0"
] | 1 | 2019-10-20T15:20:52.000Z | 2019-10-20T15:20:52.000Z | tensorflow/python/util/nest.py | wabreu/tensorflow | 2a62c0dd367813cf3967d6ddb8445d8b35c90003 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/util/nest.py | wabreu/tensorflow | 2a62c0dd367813cf3967d6ddb8445d8b35c90003 | [
"Apache-2.0"
] | 1 | 2021-02-06T12:37:08.000Z | 2021-02-06T12:37:08.000Z | # Copyright 2016 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.640719 | 105 | 0.68176 |
967a14f7ff24b5ed8d1f2c464b1f8843b6b1b309 | 7,416 | py | Python | sappho/collide.py | jpoikela/sappho | 58f72b6d04c1d0ec511026473f4475eed15c9bd5 | [
"MIT"
] | 7 | 2016-08-19T23:31:02.000Z | 2017-03-30T11:58:42.000Z | sappho/collide.py | jpoikela/sappho | 58f72b6d04c1d0ec511026473f4475eed15c9bd5 | [
"MIT"
] | 45 | 2016-07-26T19:48:09.000Z | 2016-12-10T22:50:14.000Z | sappho/collide.py | lily-seabreeze/sappho | 58f72b6d04c1d0ec511026473f4475eed15c9bd5 | [
"MIT"
] | 1 | 2018-11-29T14:16:59.000Z | 2018-11-29T14:16:59.000Z | """Handle generic pygame collision.
Maybe this shouldn't ever move a sprite, but always return
a coordinate and any sprites it collides with.
"""
import pygame
# TODO: this is pretty unnecessary now...
def collides_rect(sprite, sprite_group):
"""
Boilerplate for checking rectangular collision of provided
... | 32.96 | 174 | 0.665858 |
2dd981c007253f174bc530140c679323f00d6aa0 | 5,080 | py | Python | tempest/tests/lib/services/compute/test_services_client.py | dommgifer/repo | 2e3b9c4f92c4d1b63cd3e3d8ec4824f6bfc37bc2 | [
"Apache-2.0"
] | null | null | null | tempest/tests/lib/services/compute/test_services_client.py | dommgifer/repo | 2e3b9c4f92c4d1b63cd3e3d8ec4824f6bfc37bc2 | [
"Apache-2.0"
] | null | null | null | tempest/tests/lib/services/compute/test_services_client.py | dommgifer/repo | 2e3b9c4f92c4d1b63cd3e3d8ec4824f6bfc37bc2 | [
"Apache-2.0"
] | 5 | 2016-06-24T20:03:52.000Z | 2020-02-05T10:14:54.000Z | # Copyright 2015 NEC 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 ... | 34.557823 | 78 | 0.657087 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.