hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5158fa476d500280071fd98277d8c194d877355a | 4,330 | py | Python | final_project.py | jetboom1/workshop1 | 9f3d33876e6c2592386fca4f8df6659606059901 | [
"CC0-1.0"
] | null | null | null | final_project.py | jetboom1/workshop1 | 9f3d33876e6c2592386fca4f8df6659606059901 | [
"CC0-1.0"
] | null | null | null | final_project.py | jetboom1/workshop1 | 9f3d33876e6c2592386fca4f8df6659606059901 | [
"CC0-1.0"
] | 1 | 2021-12-15T08:44:41.000Z | 2021-12-15T08:44:41.000Z | from idlelib.multicall import r
def read_csv(path_file):
"""
:param path_file: path to csv file
:return: list of lists, consists of 5 elements:
0 - name of task
1 - plasce
2 - teammates
3 - deadline
4 - priority
>>> 1 == 1
True
"""
all_list = []
with... | 30.27972 | 101 | 0.546882 |
a028b6fb41a464d2260076a9b0771dd1e9f8a72a | 5,276 | py | Python | MIT-6.006/01-PeakFinding/ps1/peak.py | ashirwadsangwan/Python | b4e570bb31783178d241b9f2a7145343d830b698 | [
"MIT"
] | null | null | null | MIT-6.006/01-PeakFinding/ps1/peak.py | ashirwadsangwan/Python | b4e570bb31783178d241b9f2a7145343d830b698 | [
"MIT"
] | null | null | null | MIT-6.006/01-PeakFinding/ps1/peak.py | ashirwadsangwan/Python | b4e570bb31783178d241b9f2a7145343d830b698 | [
"MIT"
] | 1 | 2022-02-22T16:08:43.000Z | 2022-02-22T16:08:43.000Z | import trace
################################################################################
########################### Class for Peak Problems ############################
################################################################################
class PeakProblem(object):
"""
A class representing a... | 29.80791 | 80 | 0.530136 |
5168c2f4d07d8a8dc2631dcdd6edfcca3eb821f0 | 156 | py | Python | test.py | aseemxandr/repo1 | 4e1b7c1e42e61c0ec348d73effeb819ec940f5d1 | [
"MIT"
] | null | null | null | test.py | aseemxandr/repo1 | 4e1b7c1e42e61c0ec348d73effeb819ec940f5d1 | [
"MIT"
] | null | null | null | test.py | aseemxandr/repo1 | 4e1b7c1e42e61c0ec348d73effeb819ec940f5d1 | [
"MIT"
] | null | null | null | class main:
x = 'aseem'
def func1(self):
self.x += 'something'
print('x=', self.x)
if __name__ == '__main__':
main().func1()
| 14.181818 | 29 | 0.50641 |
7acef55594eaaf92ab862d9b54f84fdccc5f265f | 25,083 | py | Python | salt/modules/rpmbuild_pkgbuild.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | null | null | null | salt/modules/rpmbuild_pkgbuild.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | 1 | 2017-07-10T21:44:39.000Z | 2017-07-10T21:44:39.000Z | salt/modules/rpmbuild_pkgbuild.py | markgras/salt | d66cd3c935533c63870b83228b978ce43e0ef70d | [
"Apache-2.0"
] | null | null | null | """
RPM Package builder system
.. versionadded:: 2015.8.0
This system allows for all of the components to build rpms safely in chrooted
environments. This also provides a function to generate yum repositories
This module implements the pkgbuild interface
"""
import errno
import functools
import logging
import os
i... | 33.178571 | 106 | 0.593948 |
b20671d98ccf682d00dbae959a1dea5d3856055a | 213 | py | Python | Mean/calMean.py | Neiva07/Algorithms | cc2b22d1f69f0af7b91a8326550e759abfba79c8 | [
"MIT"
] | 199 | 2019-12-01T01:23:34.000Z | 2022-02-28T10:30:40.000Z | Mean/calMean.py | Neiva07/Algorithms | cc2b22d1f69f0af7b91a8326550e759abfba79c8 | [
"MIT"
] | 35 | 2020-06-08T17:59:22.000Z | 2021-11-11T04:00:29.000Z | Mean/calMean.py | Neiva07/Algorithms | cc2b22d1f69f0af7b91a8326550e759abfba79c8 | [
"MIT"
] | 106 | 2020-02-05T01:28:19.000Z | 2022-03-11T05:38:54.000Z | def calMean(array):
mean = 0
for i in range(len(array)):
mean = mean + array[i]
mean = mean/float(len(array))
return mean
if __name__ == "__main__":
array = [1,2,3,4]
mean = calMean(array)
print (mean)
| 17.75 | 30 | 0.638498 |
56e7a8ba6c61ede75655db3a33853c41ff6c5222 | 1,072 | py | Python | var/spack/repos/builtin/packages/py-griddataformats/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 3 | 2021-09-29T02:14:40.000Z | 2022-01-27T20:50:36.000Z | var/spack/repos/builtin/packages/py-griddataformats/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2022-02-28T11:30:18.000Z | 2022-03-23T19:34:56.000Z | var/spack/repos/builtin/packages/py-griddataformats/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 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 PyGriddataformats(PythonPackage):
"""The gridDataFormats package provides classes to unify... | 41.230769 | 95 | 0.747201 |
aec964e58f67ad5360f33c72ae2fe6ed99fe9afa | 1,076 | py | Python | tests/nlpzero/common/test_util.py | ftnext/nlp-zero | 5bb010d1eed58cc75924aebc47b8b771bc9e203e | [
"MIT"
] | null | null | null | tests/nlpzero/common/test_util.py | ftnext/nlp-zero | 5bb010d1eed58cc75924aebc47b8b771bc9e203e | [
"MIT"
] | 1 | 2020-09-08T10:33:40.000Z | 2020-09-08T10:52:46.000Z | tests/nlpzero/common/test_util.py | ftnext/nlp-zero | 5bb010d1eed58cc75924aebc47b8b771bc9e203e | [
"MIT"
] | null | null | null | from unittest import TestCase
import numpy as np
from nlpzero.common import util
class PreprocessTestCase(TestCase):
def test_return_numpy_array_as_corpus(self):
text = "You say goodbye and I say hello."
expected = np.array([0, 1, 2, 3, 4, 1, 5, 6])
actual, _, _ = util.preprocess(text)
... | 28.315789 | 63 | 0.531599 |
7c2e287cb8251ebf11dbb922e50012ce4e01b692 | 8,456 | py | Python | options/base_options.py | Huage001/Artistic-Video-Partial-Conv-Depth-Loss | c990b8bcc88ce0655f3ac78b526324b1ff5deb41 | [
"BSD-3-Clause"
] | 9 | 2020-10-14T03:32:51.000Z | 2022-01-14T20:38:05.000Z | options/base_options.py | Huage001/Artistic-Video-Partial-Conv-Depth-Loss | c990b8bcc88ce0655f3ac78b526324b1ff5deb41 | [
"BSD-3-Clause"
] | 1 | 2021-03-03T20:15:42.000Z | 2021-08-07T12:29:22.000Z | options/base_options.py | Huage001/Artistic-Video-Partial-Conv-Depth-Loss | c990b8bcc88ce0655f3ac78b526324b1ff5deb41 | [
"BSD-3-Clause"
] | 2 | 2020-09-02T00:58:29.000Z | 2020-11-25T16:41:51.000Z | import argparse
import os
from util import util
import torch
import models
import data
class BaseOptions():
"""This class defines options used during both training and test time.
It also implements several helper functions such as parsing, printing, and saving the options.
It also gathers additional opti... | 58.722222 | 235 | 0.661897 |
7755438c11804a09332e06897a8e996432ecc858 | 3,142 | py | Python | sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_entities.py | abhahn/azure-sdk-for-python | 09521dfb517e0859ec961cae006fb728d787b565 | [
"MIT"
] | 2 | 2019-08-23T21:14:00.000Z | 2021-09-07T18:32:34.000Z | sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_entities.py | rakshith91/azure-sdk-for-python | 3c4f2575d31260fa1bda870b04e34c082ac5702b | [
"MIT"
] | null | null | null | sdk/textanalytics/azure-ai-textanalytics/samples/sample_analyze_healthcare_entities.py | rakshith91/azure-sdk-for-python | 3c4f2575d31260fa1bda870b04e34c082ac5702b | [
"MIT"
] | null | null | null | # coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------... | 40.282051 | 100 | 0.606938 |
3efffbafaeceaded5a9d81932a7b7410f958c107 | 6,749 | py | Python | official/transformer/utils/tokenizer_test.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | 1 | 2021-05-17T01:42:29.000Z | 2021-05-17T01:42:29.000Z | official/transformer/utils/tokenizer_test.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | null | null | null | official/transformer/utils/tokenizer_test.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 36.679348 | 83 | 0.63076 |
e0c01a90365b4453ca612d0098c2f7c97bca6a0f | 3,582 | py | Python | PaddleRec/ctr/deepfm/data/preprocess.py | JianzhouZhan/models | 85d08586f388c194c12f8ffa842ab0648d525dc2 | [
"Apache-2.0"
] | null | null | null | PaddleRec/ctr/deepfm/data/preprocess.py | JianzhouZhan/models | 85d08586f388c194c12f8ffa842ab0648d525dc2 | [
"Apache-2.0"
] | null | null | null | PaddleRec/ctr/deepfm/data/preprocess.py | JianzhouZhan/models | 85d08586f388c194c12f8ffa842ab0648d525dc2 | [
"Apache-2.0"
] | 1 | 2020-06-10T07:46:25.000Z | 2020-06-10T07:46:25.000Z | import os
import numpy
from collections import Counter
import shutil
import pickle
def get_raw_data():
if not os.path.isdir('raw_data'):
os.mkdir('raw_data')
fin = open('train.txt', 'r')
fout = open('raw_data/part-0', 'w')
for line_idx, line in enumerate(fin):
if line_idx % 200000 == ... | 31.982143 | 80 | 0.563372 |
38c3c53873ba311585900575c4c5addb130c7abf | 2,393 | py | Python | BST/largest_smaller_bst_key.py | SebastianOpiyo/algorithms | 3fd00dca4631e8515af89d86de290cad2e029843 | [
"MIT"
] | 6 | 2022-01-06T13:51:11.000Z | 2022-01-06T15:25:23.000Z | BST/largest_smaller_bst_key.py | SebastianOpiyo/Algorithms-tuts | ebf2f595a8cf018fd42a40c759922184a4696952 | [
"MIT"
] | null | null | null | BST/largest_smaller_bst_key.py | SebastianOpiyo/Algorithms-tuts | ebf2f595a8cf018fd42a40c759922184a4696952 | [
"MIT"
] | null | null | null | #!/bin/python3
# Author: Sebastian Opiyo
# Date Created: August 26, 2020
# Date Modified: August 26, 2020
# Description: bst challenge, Python3 Version.
"""
Problem: Given an int value, find smaller values of it from the bst,
from the smaller values, find the largest. If non exists, return -1
algo:
- start from root ... | 26.01087 | 79 | 0.640201 |
2f80f76da1b3c0717d98e5b2c58f53e1529b1b2e | 711 | py | Python | pf_modeler/app/controller.py | Kitware/pf-simulation-modeler | e2129570d149991f73aaabdb8a261f7dda296f92 | [
"BSD-3-Clause"
] | null | null | null | pf_modeler/app/controller.py | Kitware/pf-simulation-modeler | e2129570d149991f73aaabdb8a261f7dda296f92 | [
"BSD-3-Clause"
] | 1 | 2022-02-07T22:04:36.000Z | 2022-02-07T22:04:36.000Z | pf_modeler/app/controller.py | Kitware/pf-simulation-modeler | e2129570d149991f73aaabdb8a261f7dda296f92 | [
"BSD-3-Clause"
] | null | null | null | r"""
Bind methods to the trame controller
"""
from pf_modeler.app.engine.simput import KeyDatabase
from trame import controller as ctrl
from . import engine
from . import ui
def bind_instances():
ctrl.ui_set_key_database()
def bind_methods():
ctrl.simput_save = KeyDatabase().save
ctrl.validate_run = en... | 19.75 | 68 | 0.724332 |
932556662c61245a5bd217eb3fa418f9c1431d8d | 71,956 | py | Python | tests/chainer_tests/test_link.py | Evanc123/chainer | 929af7189b1271683200aa9b0ba6da2dd3dee110 | [
"MIT"
] | null | null | null | tests/chainer_tests/test_link.py | Evanc123/chainer | 929af7189b1271683200aa9b0ba6da2dd3dee110 | [
"MIT"
] | null | null | null | tests/chainer_tests/test_link.py | Evanc123/chainer | 929af7189b1271683200aa9b0ba6da2dd3dee110 | [
"MIT"
] | null | null | null | import copy
import unittest
import warnings
import mock
import numpy
import chainer
from chainer.backends import cuda
from chainer.backends import intel64
from chainer import initializers
from chainer import testing
from chainer.testing import attr
class TestLink(unittest.TestCase):
def setUp(self):
x_... | 38.665234 | 79 | 0.6053 |
225ecef8113c50e2dc003b79b4b73e233b2fa579 | 1,729 | py | Python | cv2/file.py | NNDEV1/CV2Stuff | fc31a51cdd816e313351f0d83ffb0c7339e73ef3 | [
"MIT"
] | 3 | 2021-01-09T23:55:34.000Z | 2021-08-15T22:04:34.000Z | cv2/file.py | NNDEV1/CV2Stuff | fc31a51cdd816e313351f0d83ffb0c7339e73ef3 | [
"MIT"
] | null | null | null | cv2/file.py | NNDEV1/CV2Stuff | fc31a51cdd816e313351f0d83ffb0c7339e73ef3 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
###################################
widthImg=540
heightImg =640
#####################################
cap = cv2.VideoCapture(0)
cap.set(10,150)
def preProcessing(img):
imgGray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
imgBlur = cv2.GaussianBlur(imgGray,(5,5),1)
imgCanny = cv... | 28.816667 | 86 | 0.614228 |
190c12b23432b6b102b09c682c468d30f51e80af | 3,291 | py | Python | CPAC/GUI/interface/pages/mdmr.py | Lawreros/C-PAC | ce26ba9a38cbd401cd405150eeed23b805007724 | [
"BSD-3-Clause"
] | null | null | null | CPAC/GUI/interface/pages/mdmr.py | Lawreros/C-PAC | ce26ba9a38cbd401cd405150eeed23b805007724 | [
"BSD-3-Clause"
] | null | null | null | CPAC/GUI/interface/pages/mdmr.py | Lawreros/C-PAC | ce26ba9a38cbd401cd405150eeed23b805007724 | [
"BSD-3-Clause"
] | null | null | null | import wx
import wx.html
from ..utils.generic_class import GenericClass
from ..utils.constants import control, dtype
import os
import pkg_resources as p
class MDMRSettings(wx.ScrolledWindow):
def __init__(self, parent, counter = 0):
wx.ScrolledWindow.__init__(self, parent)
self.counter... | 41.1375 | 100 | 0.488909 |
c74ecca7e483a94c7461c0e8edbe04da0d3c08c0 | 8,875 | py | Python | azext_iot/sdk/dps/operations/registration_state_operations.py | srinivasaraogattupalli/azure-iot-cli-extension | 9885dd528fe363f5c118f3b735ad22fd4e1a86f4 | [
"MIT"
] | null | null | null | azext_iot/sdk/dps/operations/registration_state_operations.py | srinivasaraogattupalli/azure-iot-cli-extension | 9885dd528fe363f5c118f3b735ad22fd4e1a86f4 | [
"MIT"
] | null | null | null | azext_iot/sdk/dps/operations/registration_state_operations.py | srinivasaraogattupalli/azure-iot-cli-extension | 9885dd528fe363f5c118f3b735ad22fd4e1a86f4 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
impor... | 43.719212 | 155 | 0.673239 |
dd752578edce92b22d8d7ac060ad279da50c3740 | 10,359 | py | Python | geneticml/algorithms.py | albarsil/geneticml | 27f4eb7b73343493c6e5cac1d3f7500b0d819880 | [
"MIT"
] | 7 | 2021-12-07T21:36:00.000Z | 2021-12-25T02:01:59.000Z | geneticml/algorithms.py | albarsil/geneticml | 27f4eb7b73343493c6e5cac1d3f7500b0d819880 | [
"MIT"
] | 3 | 2021-12-08T20:50:26.000Z | 2022-02-17T11:28:06.000Z | geneticml/algorithms.py | albarsil/geneticml | 27f4eb7b73343493c6e5cac1d3f7500b0d819880 | [
"MIT"
] | 1 | 2021-12-07T21:08:20.000Z | 2021-12-07T21:08:20.000Z | from typing import Callable, Tuple
class DataLoader(object):
"""
A data loader object to create an abstraction for data points and targets
"""
def __init__(self, data, target):
"""
Create a class instance
Parameters:
data (?): The X data
data (?): The ... | 27.624 | 192 | 0.602761 |
8f8f502757836f4a9093100bfff38839bf46a9d2 | 5,200 | py | Python | src/clients/ctm_api_client/models/request_parameters_wrapper_em_default_request_parameters_why_job_parameter.py | IceT-M/ctm-python-client | 0ef1d8a3c9a27a01c088be1cdf5d177d25912bac | [
"BSD-3-Clause"
] | 5 | 2021-12-01T18:40:00.000Z | 2022-03-04T10:51:44.000Z | src/clients/ctm_api_client/models/request_parameters_wrapper_em_default_request_parameters_why_job_parameter.py | IceT-M/ctm-python-client | 0ef1d8a3c9a27a01c088be1cdf5d177d25912bac | [
"BSD-3-Clause"
] | 3 | 2022-02-21T20:08:32.000Z | 2022-03-16T17:41:03.000Z | src/clients/ctm_api_client/models/request_parameters_wrapper_em_default_request_parameters_why_job_parameter.py | IceT-M/ctm-python-client | 0ef1d8a3c9a27a01c088be1cdf5d177d25912bac | [
"BSD-3-Clause"
] | 7 | 2021-12-01T11:59:16.000Z | 2022-03-01T18:16:40.000Z | # coding: utf-8
"""
Control-M Services
Provides access to BMC Control-M Services # noqa: E501
OpenAPI spec version: 9.20.215
Contact: customer_support@bmc.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from clients.ct... | 32.5 | 138 | 0.637692 |
47d32c68c2b3db25dccb399c0eea2b403951fd3b | 5,023 | py | Python | snipy/sympy_helpers.py | navdeeprana/snipy | 55a5286a17d1c471d147e9ed7cbe06945c3eef02 | [
"MIT"
] | null | null | null | snipy/sympy_helpers.py | navdeeprana/snipy | 55a5286a17d1c471d147e9ed7cbe06945c3eef02 | [
"MIT"
] | null | null | null | snipy/sympy_helpers.py | navdeeprana/snipy | 55a5286a17d1c471d147e9ed7cbe06945c3eef02 | [
"MIT"
] | null | null | null | """
A Printer which converts an expression into its LaTeX equivalent.
"""
from sympy.core.function import _coeff_isneg, AppliedUndef
# sympy.printing imports
from sympy.printing.conventions import requires_partial
from sympy.printing.precedence import PRECEDENCE
from sympy.printing.latex import LatexPrinter, accepte... | 35.878571 | 80 | 0.497511 |
7d30169cbef6793d867c59971075417462db8f41 | 4,632 | py | Python | erlterm/types.py | fycheung/python-erlterm | 4f6dcb3ad4997f503d42640b840dd50d337deaf0 | [
"BSD-3-Clause"
] | null | null | null | erlterm/types.py | fycheung/python-erlterm | 4f6dcb3ad4997f503d42640b840dd50d337deaf0 | [
"BSD-3-Clause"
] | null | null | null | erlterm/types.py | fycheung/python-erlterm | 4f6dcb3ad4997f503d42640b840dd50d337deaf0 | [
"BSD-3-Clause"
] | null | null | null |
__all__ = ['Atom', 'Binary', 'Tuple', 'Maps', 'ErlString',
'Reference', 'Port', 'PID', 'Export', 'List']
class Atom(str):
def __str__(self):
return super(Atom, self).__str__()
def is_simple_atom(self):
if not (self[0] >= 'a' and self[0] <= 'z'):
return False
... | 31.297297 | 165 | 0.558722 |
865a7944fb1ed7f14cdbb8498fd7083a049c7960 | 389 | py | Python | test/categories/test_language.py | Augilar/qual-id | 32c5d961fc4784a108deedde97f4632420ec6392 | [
"MIT"
] | null | null | null | test/categories/test_language.py | Augilar/qual-id | 32c5d961fc4784a108deedde97f4632420ec6392 | [
"MIT"
] | null | null | null | test/categories/test_language.py | Augilar/qual-id | 32c5d961fc4784a108deedde97f4632420ec6392 | [
"MIT"
] | null | null | null | import unittest
from qual_id.categories.language import Language
from test.utils.category_helper import CategoryHelper
class TestLanguage(unittest.TestCase):
def setUp(self):
self.language = Language()
def test__get_values__is_valid(self):
self.assertTrue(CategoryHelper.get_values_is_valid(self.language)... | 24.3125 | 70 | 0.784062 |
605f9e4e3027693e11e2300b7fb4834364da7164 | 394 | py | Python | src/deep_rlsp/model/gridworlds_feature_space.py | HumanCompatibleAI/deep-rlsp | 81941693aba2aa9157ca96e96567f4e3cb95fbc3 | [
"MIT"
] | 24 | 2021-04-17T21:32:43.000Z | 2021-08-07T17:20:15.000Z | src/deep_rlsp/model/gridworlds_feature_space.py | HumanCompatibleAI/deep-rlsp | 81941693aba2aa9157ca96e96567f4e3cb95fbc3 | [
"MIT"
] | null | null | null | src/deep_rlsp/model/gridworlds_feature_space.py | HumanCompatibleAI/deep-rlsp | 81941693aba2aa9157ca96e96567f4e3cb95fbc3 | [
"MIT"
] | 7 | 2021-04-17T21:32:48.000Z | 2022-02-09T04:18:39.000Z | class GridworldsFeatureSpace:
def __init__(self, env):
self.env = env
s = self.env.init_state
f = self.env.s_to_f(s)
assert len(f.shape) == 1
self.state_size = f.shape[0]
def encoder(self, obs):
s = self.env.obs_to_s(obs)
f = self.env.s_to_f(s)
re... | 24.625 | 36 | 0.573604 |
cdfa1c727d142e61721c01869b5592b271cdebb1 | 22,402 | py | Python | lib/tool_shed/util/shed_util_common.py | rhpvorderman/galaxy | 178015f8eff0b0c7a59c0d6756658f6428222837 | [
"CC-BY-3.0"
] | 47 | 2015-10-21T23:30:30.000Z | 2022-03-09T06:51:32.000Z | lib/tool_shed/util/shed_util_common.py | rhpvorderman/galaxy | 178015f8eff0b0c7a59c0d6756658f6428222837 | [
"CC-BY-3.0"
] | 78 | 2019-01-18T08:12:49.000Z | 2022-03-13T08:56:41.000Z | lib/tool_shed/util/shed_util_common.py | rhpvorderman/galaxy | 178015f8eff0b0c7a59c0d6756658f6428222837 | [
"CC-BY-3.0"
] | 35 | 2015-10-30T13:09:40.000Z | 2021-05-03T23:17:46.000Z | import json
import logging
import os
import socket
import string
import sqlalchemy.orm.exc
from sqlalchemy import and_, false, true
import galaxy.tool_util.deps.requirements
from galaxy import util
from galaxy.tool_shed.util.shed_util_common import (
can_eliminate_repository_dependency,
can_eliminate_tool_dep... | 44.536779 | 146 | 0.63847 |
b9698bb0bd7b0202b91cb77c1a9b33550397f8c1 | 4,602 | py | Python | tests/test_dependency_loop.py | hunter-packages/fruit | 71d9ada48f7bf1749ce2889250955404582a7c6b | [
"Apache-2.0"
] | 1 | 2018-08-29T11:10:35.000Z | 2018-08-29T11:10:35.000Z | tests/test_dependency_loop.py | hunter-packages/fruit | 71d9ada48f7bf1749ce2889250955404582a7c6b | [
"Apache-2.0"
] | 1 | 2018-08-29T11:29:53.000Z | 2018-08-29T11:29:53.000Z | tests/test_dependency_loop.py | hunter-packages/fruit | 71d9ada48f7bf1749ce2889250955404582a7c6b | [
"Apache-2.0"
] | 2 | 2020-10-01T04:19:30.000Z | 2021-07-01T07:50:22.000Z | #!/usr/bin/env python3
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 31.306122 | 121 | 0.61734 |
2ed3ebc3d967b37b2d87d680c31a7fde1e7ef1e8 | 1,159 | py | Python | distributions/Generaldistribution.py | AmanMander123/probabilitydistributionspackage | a5fc5d6c0d5c3b35268bb4b0dcabb4e472a79812 | [
"Unlicense"
] | null | null | null | distributions/Generaldistribution.py | AmanMander123/probabilitydistributionspackage | a5fc5d6c0d5c3b35268bb4b0dcabb4e472a79812 | [
"Unlicense"
] | null | null | null | distributions/Generaldistribution.py | AmanMander123/probabilitydistributionspackage | a5fc5d6c0d5c3b35268bb4b0dcabb4e472a79812 | [
"Unlicense"
] | null | null | null | class Distribution:
def __init__(self, mu, sigma=1):
"""
Distribution class used for calculating and visualizing a probability
distribution
Attributes:
mean (float): representing the mean value of the distribution
stdev (float): representing the standard d... | 30.5 | 77 | 0.57377 |
776ca466b98a07ca51a88e537064fd2c298450a3 | 1,556 | py | Python | src/env/data/imunizacaograph.py | caiobarretta/TPEL6 | 97decd3310efb7ba613702a4a8b43b6ce664b57f | [
"Apache-2.0"
] | null | null | null | src/env/data/imunizacaograph.py | caiobarretta/TPEL6 | 97decd3310efb7ba613702a4a8b43b6ce664b57f | [
"Apache-2.0"
] | null | null | null | src/env/data/imunizacaograph.py | caiobarretta/TPEL6 | 97decd3310efb7ba613702a4a8b43b6ce664b57f | [
"Apache-2.0"
] | null | null | null | from data.helpers.datahelper import lista_dados_anos
from helpers import listhelper
from data.helpers import dataextractionhelper, csvhelper
from models.graph import Graph
"""função que monta o modelo gráfico"""
def build(UF):
serie_x = lista_dados_anos()
title = "Imunização X Mortalidade Tardia" # Título do... | 57.62963 | 142 | 0.813625 |
af8742c426f75572f6cc4e09b5bbab22eb6cbd44 | 5,056 | py | Python | iotronic/api/hooks.py | Zakaria-Ben/iotronic | 646cd053366d4e5cd3c675eb537cda8348761abd | [
"Apache-2.0"
] | 3 | 2016-05-13T16:00:19.000Z | 2021-07-18T12:01:08.000Z | iotronic/api/hooks.py | Zakaria-Ben/iotronic | 646cd053366d4e5cd3c675eb537cda8348761abd | [
"Apache-2.0"
] | null | null | null | iotronic/api/hooks.py | Zakaria-Ben/iotronic | 646cd053366d4e5cd3c675eb537cda8348761abd | [
"Apache-2.0"
] | 1 | 2015-07-23T15:40:05.000Z | 2015-07-23T15:40:05.000Z | # -*- encoding: utf-8 -*-
#
# Copyright © 2012 New Dream Network, LLC (DreamHost)
#
# 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
#
# Unles... | 34.630137 | 79 | 0.6786 |
4427f8e3c5b00cdaf23b86c33710416ae9b1a54f | 409 | py | Python | Data Structures and Algorithms/Edabit Algo Solutions/EASY PROBLEMS/SquareEveryDigit.py | akkik04/Python-DataStructures-and-Algorithms | 8db63173218e5a9205dbb325935c71fec93b695c | [
"MIT"
] | 1 | 2022-01-22T18:19:07.000Z | 2022-01-22T18:19:07.000Z | Data Structures and Algorithms/Edabit Algo Solutions/EASY PROBLEMS/SquareEveryDigit.py | akkik04/Python-DataStructures-and-Algorithms | 8db63173218e5a9205dbb325935c71fec93b695c | [
"MIT"
] | null | null | null | Data Structures and Algorithms/Edabit Algo Solutions/EASY PROBLEMS/SquareEveryDigit.py | akkik04/Python-DataStructures-and-Algorithms | 8db63173218e5a9205dbb325935c71fec93b695c | [
"MIT"
] | null | null | null | # SQUARE EVERY DIGIT EDABIT SOLUTION:
def square_digits(n):
# creating a string to add the squares into.
l = " "
# creating a for-loop to iterate for the string version of 'n'.
for i in str(n):
# code to add the string version of the square into the created string.
l += st... | 25.5625 | 80 | 0.613692 |
53a12fcad7e56b266b67fd42db4fce1b3858da18 | 18,557 | py | Python | gluon/packages/dal/pydal/adapters/google.py | jessicadelrio/HandyHouse | 058e8981da850790c84f990fd2a3bbcf9aa695cc | [
"BSD-3-Clause"
] | 2 | 2019-10-18T23:04:22.000Z | 2019-10-24T04:03:10.000Z | gluon/packages/dal/pydal/adapters/google.py | jessicadelrio/HandyHouse | 058e8981da850790c84f990fd2a3bbcf9aa695cc | [
"BSD-3-Clause"
] | 1 | 2021-06-01T22:32:25.000Z | 2021-06-01T22:32:25.000Z | gluon/packages/dal/pydal/adapters/google.py | jessicadelrio/HandyHouse | 058e8981da850790c84f990fd2a3bbcf9aa695cc | [
"BSD-3-Clause"
] | 3 | 2018-12-08T23:59:17.000Z | 2019-02-13T23:04:38.000Z | import os
import re
from .._compat import pjoin
from .._globals import THREAD_LOCAL
from .._gae import gae, ndb, rdbms, namespace_manager, classobj, NDBPolyModel
from ..migrator import InDBMigrator
from ..helpers.classes import FakeDriver, SQLCustomType, SQLALL, Reference
from ..helpers.gae import NDBDecimalProperty
fr... | 40.253796 | 100 | 0.592014 |
c9a0c593acbe1e50fa9ff62c2bddaab17c3b197f | 52,110 | py | Python | kuber/v1_20/rbac_v1alpha1.py | datalayer-externals/kuber | 4d577950ce7d1be2b882fbe66827dc3d7e67b350 | [
"MIT"
] | 1 | 2019-06-11T04:57:34.000Z | 2019-06-11T04:57:34.000Z | kuber/v1_20/rbac_v1alpha1.py | datalayer-externals/kuber | 4d577950ce7d1be2b882fbe66827dc3d7e67b350 | [
"MIT"
] | 1 | 2019-05-05T22:08:13.000Z | 2019-05-06T11:43:32.000Z | kuber/v1_20/rbac_v1alpha1.py | datalayer-externals/kuber | 4d577950ce7d1be2b882fbe66827dc3d7e67b350 | [
"MIT"
] | 2 | 2021-05-08T14:47:56.000Z | 2021-10-15T21:47:04.000Z | import typing # noqa: F401
from kubernetes import client # noqa: F401
from kuber import kube_api as _kube_api # noqa: F401
from kuber import definitions as _kuber_definitions # noqa: F401
from kuber import _types # noqa: F401
from kuber.v1_20.meta_v1 import LabelSelector # noqa: F401
from kuber.v1_20.meta_v1 im... | 30.779681 | 88 | 0.566878 |
a8f7e211b9b0dfb88b31b0c8ecb7c6e746972713 | 2,488 | py | Python | doc/conf.py | teapot9/fand | 1bfcbf92ad8536b926d3f6076574437ea55c7406 | [
"MIT"
] | null | null | null | doc/conf.py | teapot9/fand | 1bfcbf92ad8536b926d3f6076574437ea55c7406 | [
"MIT"
] | null | null | null | doc/conf.py | teapot9/fand | 1bfcbf92ad8536b926d3f6076574437ea55c7406 | [
"MIT"
] | 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... | 30.716049 | 79 | 0.672428 |
be3bc65b5d5cf3e638f1af9d2bcf78dd185877bb | 1,866 | py | Python | test/hummingbot/connector/connector/uniswap/test_uniswap_in_flight_order.py | pecuniafinance/hummingbot | 2cbb19c187a429d3e6000dc938617ca2a1f9f357 | [
"Apache-2.0"
] | 1 | 2022-03-10T17:24:38.000Z | 2022-03-10T17:24:38.000Z | test/hummingbot/connector/connector/uniswap/test_uniswap_in_flight_order.py | pecuniafinance/hummingbot | 2cbb19c187a429d3e6000dc938617ca2a1f9f357 | [
"Apache-2.0"
] | null | null | null | test/hummingbot/connector/connector/uniswap/test_uniswap_in_flight_order.py | pecuniafinance/hummingbot | 2cbb19c187a429d3e6000dc938617ca2a1f9f357 | [
"Apache-2.0"
] | null | null | null | from decimal import Decimal
from unittest import TestCase
from hummingbot.connector.connector.uniswap.uniswap_in_flight_order import UniswapInFlightOrder
from hummingbot.core.event.events import OrderType, TradeType
class UniswapInFlightOrderTests(TestCase):
def test_deserialize_order_from_json(self):
j... | 43.395349 | 95 | 0.673098 |
4c533fca9a82a1f31cb7842ca1006ed423d1fe60 | 125 | py | Python | HomeAutomation/thingUtils.py | huvermann/MyPiHomeAutomation | dcda589e82456bb34d3bbbfdcb45ec1066f3d2f8 | [
"MIT"
] | null | null | null | HomeAutomation/thingUtils.py | huvermann/MyPiHomeAutomation | dcda589e82456bb34d3bbbfdcb45ec1066f3d2f8 | [
"MIT"
] | null | null | null | HomeAutomation/thingUtils.py | huvermann/MyPiHomeAutomation | dcda589e82456bb34d3bbbfdcb45ec1066f3d2f8 | [
"MIT"
] | null | null | null | import platform
def is_windows():
"""Returns true if current platform is windows"""
return any(platform.win32_ver()) | 25 | 53 | 0.72 |
b7d79805286b3686af8384046ec7bfac7369f0c8 | 3,446 | py | Python | semantic_segmentation/src/models/decoders/segmentor_head.py | no-name-xiaosheng/PaddleViT | 50226a3be5095b3727d3c62d2eab23ef1e9612ec | [
"Apache-2.0"
] | 2 | 2021-11-23T02:01:52.000Z | 2021-11-23T02:02:03.000Z | semantic_segmentation/src/models/decoders/segmentor_head.py | Dongsheng-Bi/PaddleViT | c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7 | [
"Apache-2.0"
] | null | null | null | semantic_segmentation/src/models/decoders/segmentor_head.py | Dongsheng-Bi/PaddleViT | c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7 | [
"Apache-2.0"
] | null | null | null | import copy
import paddle
import paddle.nn as nn
from src.models.backbones.vit import EncoderLayer
class MaskTransformer(nn.Layer):
"""
Segmenter decoder use transformer as decoder for segmentation,
performs better than the linear layer.
the decoder has the same embedding dimensions as the encoder
... | 37.868132 | 99 | 0.616657 |
eafc9eb874c1690ab6ac6f680820f7174f5f0450 | 34,647 | py | Python | dask/optimization.py | jsargsyan/dask | 71113eacbf83437f59984d053c10e52f6ce97f70 | [
"BSD-3-Clause"
] | null | null | null | dask/optimization.py | jsargsyan/dask | 71113eacbf83437f59984d053c10e52f6ce97f70 | [
"BSD-3-Clause"
] | null | null | null | dask/optimization.py | jsargsyan/dask | 71113eacbf83437f59984d053c10e52f6ce97f70 | [
"BSD-3-Clause"
] | null | null | null | import math
import numbers
import re
from . import config, core
from .core import (
istask,
get_dependencies,
subs,
toposort,
flatten,
reverse_dict,
ishashable,
)
from .utils_test import add, inc # noqa: F401
def cull(dsk, keys):
""" Return new dask with only the tasks required to ca... | 34.821106 | 114 | 0.504171 |
dbd01bcd38875e8543c252b30231bed40ac62f05 | 1,549 | py | Python | PhotoBooth.py | alan412/GeekPi | 4333ac19efdd230ae2ff8367a3b6f23639250462 | [
"MIT"
] | null | null | null | PhotoBooth.py | alan412/GeekPi | 4333ac19efdd230ae2ff8367a3b6f23639250462 | [
"MIT"
] | null | null | null | PhotoBooth.py | alan412/GeekPi | 4333ac19efdd230ae2ff8367a3b6f23639250462 | [
"MIT"
] | null | null | null | from datetime import date
import calendar
import tweet
import RPi.GPIO as GPIO
import time
from picamera import PiCamera, Color
message = " 2016 FLL Razorback \
447: It's All Geek to Me's pit"
GPIO.setmode(GPIO.BCM)
GPIO.setup(21, GPIO.IN, pull_up_down=GPIO.PUD_UP)
camera = PiCamera()
ca... | 26.254237 | 93 | 0.657844 |
7147b1a9a2fcf02eabcf9a18f7e35de6db8ccbb7 | 12,985 | py | Python | experiments/thesis/framework/evaluation.py | mtanti/mtanti-phd | d915b6f96f1bae1a7f517eb1dbd9d4a88ca56576 | [
"MIT"
] | 6 | 2019-05-20T06:48:37.000Z | 2021-01-03T05:43:47.000Z | experiments/thesis/framework/evaluation.py | mtanti/mtanti-phd | d915b6f96f1bae1a7f517eb1dbd9d4a88ca56576 | [
"MIT"
] | 1 | 2019-01-17T03:17:10.000Z | 2019-02-23T17:31:41.000Z | experiments/thesis/framework/evaluation.py | mtanti/mtanti-phd | d915b6f96f1bae1a7f517eb1dbd9d4a88ca56576 | [
"MIT"
] | null | null | null | import sys
import numpy as np
import nltk
import collections
import json
from . import config
sys.path.append(config.mscoco_eval_dir)
from pycocotools.coco import COCO
from pycocoevalcap.eval import COCOEvalCap
from pycocoevalcap.meteor.meteor import Meteor
from pycocoevalcap.cider.cider import Cider
from pycocoevalc... | 48.815789 | 281 | 0.56881 |
793c18c80259c896db46c0faf9b9642b77bf5222 | 18,547 | py | Python | osctiny/tests/test_packages.py | bbrunner/osc-tiny | 3a9e320745e593a7cefdab96ac4e98b8008256b1 | [
"MIT"
] | null | null | null | osctiny/tests/test_packages.py | bbrunner/osc-tiny | 3a9e320745e593a7cefdab96ac4e98b8008256b1 | [
"MIT"
] | null | null | null | osctiny/tests/test_packages.py | bbrunner/osc-tiny | 3a9e320745e593a7cefdab96ac4e98b8008256b1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from io import StringIO, BytesIO, IOBase
import re
from unittest import skip
from six import text_type
import responses
from .base import OscTest, CallbackFactory
from ..utils.errors import OscError
class TestPackage(OscTest):
@responses.activate
... | 39.046316 | 192 | 0.498086 |
6b71abf068fe6022ea118032c97e0789f39a7f0a | 4,901 | py | Python | external-deps/spyder-kernels/spyder_kernels/customize/umr.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 7,956 | 2015-02-17T01:19:09.000Z | 2022-03-31T21:52:15.000Z | external-deps/spyder-kernels/spyder_kernels/customize/umr.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 16,326 | 2015-02-16T23:15:21.000Z | 2022-03-31T23:34:34.000Z | external-deps/spyder-kernels/spyder_kernels/customize/umr.py | Earthman100/spyder | 949ce0f9100a69504c70a5678e8589a05aee7d38 | [
"MIT"
] | 1,918 | 2015-02-20T19:26:26.000Z | 2022-03-31T19:03:25.000Z | # Copyright (c) 2009- Spyder Kernels Contributors
#
# Licensed under the terms of the MIT License
# (see spyder_kernels/__init__.py for details)
"""User module reloader."""
import os
import sys
from spyder_kernels.customize.utils import path_is_library
from spyder_kernels.py3compat import PY2, _print
class UserMod... | 34.272727 | 78 | 0.582942 |
e4a27f995ac49ea85b027d0747f65ced66639cb8 | 263 | py | Python | myapp/models.py | purveshmakode24/django-react | 4e75e73646c7debe18b85422c8db6d148d1390c7 | [
"MIT"
] | 1 | 2020-06-02T19:23:59.000Z | 2020-06-02T19:23:59.000Z | myapp/models.py | purveshmakode24/django-react | 4e75e73646c7debe18b85422c8db6d148d1390c7 | [
"MIT"
] | 3 | 2021-03-30T13:08:41.000Z | 2021-09-22T18:56:16.000Z | myapp/models.py | purveshmakode24/django-react | 4e75e73646c7debe18b85422c8db6d148d1390c7 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Post(models.Model):
name = models.CharField(max_length=100)
email = models.EmailField()
message = models.CharField(max_length=300)
created_at = models.DateTimeField(auto_now_add=True) | 29.222222 | 56 | 0.749049 |
866118ea8c8a639f4d41f9fa1c66cc8f77cf8e29 | 27 | py | Python | test_python_import_issue/pacx/j.py | zengmeng1094/test-python | 79aa30789c2bb8700f660a4d6b13f06960e169e5 | [
"MIT"
] | null | null | null | test_python_import_issue/pacx/j.py | zengmeng1094/test-python | 79aa30789c2bb8700f660a4d6b13f06960e169e5 | [
"MIT"
] | null | null | null | test_python_import_issue/pacx/j.py | zengmeng1094/test-python | 79aa30789c2bb8700f660a4d6b13f06960e169e5 | [
"MIT"
] | null | null | null | def add():
print('add') | 13.5 | 16 | 0.518519 |
e0041febc8bb3f9a03b4863266a8bbf3bf713fc3 | 2,501 | py | Python | dateparser/data/date_translation_data/bem.py | bazingarj/dateparser | 48c4563fb7f6ce685fbd6d27e9e83257521d2203 | [
"BSD-3-Clause"
] | 8 | 2019-11-15T21:00:15.000Z | 2021-12-21T22:09:42.000Z | dateparser/data/date_translation_data/bem.py | bazingarj/dateparser | 48c4563fb7f6ce685fbd6d27e9e83257521d2203 | [
"BSD-3-Clause"
] | 9 | 2020-06-05T21:28:57.000Z | 2022-02-12T12:30:39.000Z | dateparser/data/date_translation_data/bem.py | bazingarj/dateparser | 48c4563fb7f6ce685fbd6d27e9e83257521d2203 | [
"BSD-3-Clause"
] | 21 | 2019-03-11T04:25:23.000Z | 2022-02-03T08:54:33.000Z | # -*- coding: utf-8 -*-
info = {
"name": "bem",
"date_order": "DMY",
"january": [
"januari",
"jan"
],
"february": [
"februari",
"feb"
],
"march": [
"machi",
"mac"
],
"april": [
"epreo",
"epr"
],
"may": [
... | 15.438272 | 26 | 0.279488 |
902ffcf72797c47cda953d92bb77b974566d2344 | 11,550 | py | Python | maple_debugger/m_bp_cmds.py | lvyitian/maple_engine | d423c2b205bcc6d977bd91689493dc7237258fae | [
"MulanPSL-1.0"
] | null | null | null | maple_debugger/m_bp_cmds.py | lvyitian/maple_engine | d423c2b205bcc6d977bd91689493dc7237258fae | [
"MulanPSL-1.0"
] | null | null | null | maple_debugger/m_bp_cmds.py | lvyitian/maple_engine | d423c2b205bcc6d977bd91689493dc7237258fae | [
"MulanPSL-1.0"
] | null | null | null | #
# Copyright (C) [2020] Futurewei Technologies, Inc. All rights reverved.
#
# Licensed under the Mulan Permissive Software License v2.
# You can use this software according to the terms and conditions of the MulanPSL - 2.0.
# You may obtain a copy of MulanPSL - 2.0 at:
#
# https://opensource.org/licenses/MulanPSL-2.... | 37.62215 | 157 | 0.574026 |
a828be016c49fb394892ae757da10ccf856de148 | 9,523 | py | Python | code/utils/config.py | btaille/sincere | dd1c34916ddcdc5ceb2799d64b17e80cdf1a5b31 | [
"Apache-2.0"
] | 12 | 2020-10-22T13:04:36.000Z | 2021-12-30T10:34:28.000Z | code/utils/config.py | btaille/sincere | dd1c34916ddcdc5ceb2799d64b17e80cdf1a5b31 | [
"Apache-2.0"
] | null | null | null | code/utils/config.py | btaille/sincere | dd1c34916ddcdc5ceb2799d64b17e80cdf1a5b31 | [
"Apache-2.0"
] | 2 | 2020-11-27T12:23:22.000Z | 2021-11-16T09:17:06.000Z | import os
import torch
import json
import argparse
from global_vars import RUN_DIR
from global_vars import EMBEDDINGS_DIR
def config_from_args(arg_list=None):
""" Argument Parser """
parser = argparse.ArgumentParser()
# Parameter in json to reload an already define config
parser.add_argument("-pf",... | 38.711382 | 120 | 0.618503 |
418b2826a094e669a767200d31a70e96d8d26d65 | 2,332 | py | Python | src/robot/htmldata/testdata/create_jsdata.py | userzimmermann/robotframework | 7aa16338ce2120cb082605cf548c0794956ec901 | [
"Apache-2.0"
] | 7 | 2015-02-25T10:55:02.000Z | 2015-11-04T03:20:05.000Z | src/robot/htmldata/testdata/create_jsdata.py | userzimmermann/robotframework | 7aa16338ce2120cb082605cf548c0794956ec901 | [
"Apache-2.0"
] | 12 | 2015-02-24T17:00:06.000Z | 2015-07-31T08:32:07.000Z | src/robot/htmldata/testdata/create_jsdata.py | userzimmermann/robotframework | 7aa16338ce2120cb082605cf548c0794956ec901 | [
"Apache-2.0"
] | 2 | 2015-12-15T11:00:35.000Z | 2018-02-24T18:11:24.000Z | #!/usr/bin/env python
from __future__ import print_function
from os.path import abspath, dirname, normpath, join
import os
import sys
BASEDIR = dirname(abspath(__file__))
LOG = normpath(join(BASEDIR, '..', 'log.html'))
TESTDATA = join(BASEDIR, 'dir.suite')
OUTPUT = join(BASEDIR, 'output.xml')
TARGET = join(BASEDIR, ... | 35.876923 | 83 | 0.55789 |
3d4bbb5b1e72fe6ae57a3b8ad643dbccdf5ab233 | 23,702 | py | Python | docmaker/_version.py | HurricaneLabs/docmaker | 4c1ce0c967ddca0a6113225c2041cfe0770bc93e | [
"MIT"
] | null | null | null | docmaker/_version.py | HurricaneLabs/docmaker | 4c1ce0c967ddca0a6113225c2041cfe0770bc93e | [
"MIT"
] | null | null | null | docmaker/_version.py | HurricaneLabs/docmaker | 4c1ce0c967ddca0a6113225c2041cfe0770bc93e | [
"MIT"
] | null | null | null |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 35.966616 | 84 | 0.586026 |
5586452b459eecf3a6cbdeda8aef62b421379512 | 1,732 | py | Python | web/service/github/api/v3/miscellaneous/Licenses.py | trysrv/GitHub.Upload.UserRegister.Update.SshKey.201704081527 | b0a40f95b39ea2bb243715702eecbe5d04d12e99 | [
"CC0-1.0"
] | null | null | null | web/service/github/api/v3/miscellaneous/Licenses.py | trysrv/GitHub.Upload.UserRegister.Update.SshKey.201704081527 | b0a40f95b39ea2bb243715702eecbe5d04d12e99 | [
"CC0-1.0"
] | null | null | null | web/service/github/api/v3/miscellaneous/Licenses.py | trysrv/GitHub.Upload.UserRegister.Update.SshKey.201704081527 | b0a40f95b39ea2bb243715702eecbe5d04d12e99 | [
"CC0-1.0"
] | null | null | null | #!python3
#encoding:utf-8
import time
import pytz
import requests
import json
import datetime
class Licenses:
def __init__(self, reqp, response):
self.__reqp = reqp
self.__response = response
"""
全ライセンス情報を取得する。
使用してみると一部ライセンスしか取得できない。CC0は取得できなかった。
@return {array} ライセンス情報
"""
... | 32.074074 | 80 | 0.624711 |
bf0022dede92b488824831401ba8f6727d12acf4 | 408 | py | Python | Configuration/Geometry/python/GeometryExtended2015FlatPlus05Percent_cff.py | gputtley/cmssw | c1ef8454804e4ebea8b65f59c4a952a6c94fde3b | [
"Apache-2.0"
] | 2 | 2020-05-09T16:03:43.000Z | 2020-05-09T16:03:50.000Z | Configuration/Geometry/python/GeometryExtended2015FlatPlus05Percent_cff.py | gputtley/cmssw | c1ef8454804e4ebea8b65f59c4a952a6c94fde3b | [
"Apache-2.0"
] | 8 | 2020-03-20T23:18:36.000Z | 2020-05-27T11:00:06.000Z | Configuration/Geometry/python/GeometryExtended2015FlatPlus05Percent_cff.py | gputtley/cmssw | c1ef8454804e4ebea8b65f59c4a952a6c94fde3b | [
"Apache-2.0"
] | 3 | 2017-06-07T15:22:28.000Z | 2019-02-28T20:48:30.000Z | import FWCore.ParameterSet.Config as cms
#
# Geometry master configuration
#
# Ideal geometry, needed for simulation
from Geometry.CMSCommonData.cmsExtendedGeometry2015FlatPlus05PercentXML_cfi import *
from Geometry.TrackerNumberingBuilder.trackerNumberingGeometry_cfi import *
from Geometry.EcalCommonData.ecalSimulati... | 37.090909 | 84 | 0.872549 |
38c7598218effc764bbbce6f722ef15e3debe03c | 2,152 | py | Python | HLS/nngen/tests/onnx_matrix_conv2d/test_onnx_matrix_conv2d_leaky_relu_int8_3x3_stride1.py | kmichikura/aiedge_contest | 909d08049d81f9da56e6f0b92df68065ed8da19d | [
"MIT"
] | 7 | 2020-06-08T13:36:13.000Z | 2021-12-24T06:55:30.000Z | HLS/nngen/tests/onnx_matrix_conv2d/test_onnx_matrix_conv2d_leaky_relu_int8_3x3_stride1.py | kmichikura/aiedge_contest | 909d08049d81f9da56e6f0b92df68065ed8da19d | [
"MIT"
] | null | null | null | HLS/nngen/tests/onnx_matrix_conv2d/test_onnx_matrix_conv2d_leaky_relu_int8_3x3_stride1.py | kmichikura/aiedge_contest | 909d08049d81f9da56e6f0b92df68065ed8da19d | [
"MIT"
] | 1 | 2021-03-12T03:51:56.000Z | 2021-03-12T03:51:56.000Z | from __future__ import absolute_import
from __future__ import print_function
import os
import sys
# the next line can be removed after installation
sys.path.insert(0, os.path.dirname(os.path.dirname(
os.path.dirname(os.path.abspath(__file__)))))
import nngen as ng
import veriloggen
import onnx_matrix_conv2d
a... | 31.647059 | 102 | 0.538569 |
1c9b0124105916bff12afc7c9f8cf6840d38f1bf | 686 | py | Python | app/hooks/enforcement.py | BrettPowell/real-time-enforcer | a1f7a7436975c16e74e6b5396312271ccb3b8ec5 | [
"Apache-2.0"
] | 11 | 2019-04-12T21:23:49.000Z | 2020-09-02T11:16:49.000Z | app/hooks/enforcement.py | BrettPowell/real-time-enforcer | a1f7a7436975c16e74e6b5396312271ccb3b8ec5 | [
"Apache-2.0"
] | 18 | 2019-04-09T16:23:03.000Z | 2021-04-26T14:25:17.000Z | app/hooks/enforcement.py | forseti-security/forseti-policy-enforcer | 11eca7e7012759be2730297ef362708695885da7 | [
"Apache-2.0"
] | 11 | 2019-05-08T09:08:08.000Z | 2021-04-26T19:23:24.000Z | # Copyright 2020 The Forseti Real Time Enforcer 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 requ... | 40.352941 | 77 | 0.771137 |
1add6757e659b7548c67df6b828cfcbb545d9e95 | 409 | py | Python | mojezeby/asgi.py | pythonsway/mojezebypl-tools | 710cc8ca704855b6ffbe8f7e8febac64a9d53708 | [
"MIT"
] | null | null | null | mojezeby/asgi.py | pythonsway/mojezebypl-tools | 710cc8ca704855b6ffbe8f7e8febac64a9d53708 | [
"MIT"
] | null | null | null | mojezeby/asgi.py | pythonsway/mojezebypl-tools | 710cc8ca704855b6ffbe8f7e8febac64a9d53708 | [
"MIT"
] | null | null | null | """
ASGI config for mojezeby project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault... | 24.058824 | 79 | 0.755501 |
f47ed9e53aae3fdc9ba0c72b4913df27eee8f784 | 385 | py | Python | MOCC/src/configurations/Get-Descendant/src/DescendantHelper.py | arpitgogia/mars_city | 30cacd80487a8c2354bbc15b4fad211ed1cb4f9d | [
"BSD-2-Clause-FreeBSD"
] | 25 | 2016-07-20T04:49:14.000Z | 2021-08-25T09:05:04.000Z | MOCC/src/configurations/Get-Descendant/src/DescendantHelper.py | arpitgogia/mars_city | 30cacd80487a8c2354bbc15b4fad211ed1cb4f9d | [
"BSD-2-Clause-FreeBSD"
] | 16 | 2016-12-27T08:30:27.000Z | 2018-06-18T08:51:44.000Z | MOCC/src/configurations/Get-Descendant/src/DescendantHelper.py | arpitgogia/mars_city | 30cacd80487a8c2354bbc15b4fad211ed1cb4f9d | [
"BSD-2-Clause-FreeBSD"
] | 49 | 2016-07-20T13:08:27.000Z | 2020-06-02T18:26:12.000Z | #!/usr/bin/env python
from __future__ import division, print_function
def getDescendants(device_id, dev_names):
devices = []
for dev in dev_names:
if dev == device_id:
pass
else:
devices.append(dev)
descendants = []
for dev in devices:
if device_id in ... | 19.25 | 47 | 0.605195 |
3491d64f19b951d9158137c64a61f17e3ff616ef | 5,178 | py | Python | lib/python3.8/site-packages/ansible_collections/community/network/plugins/modules/panos_set.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | lib/python3.8/site-packages/ansible_collections/community/network/plugins/modules/panos_set.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | lib/python3.8/site-packages/ansible_collections/community/network/plugins/modules/panos_set.py | cjsteel/python3-venv-ansible-2.10.5 | c95395c4cae844dc66fddde9b4343966f4b2ecd5 | [
"Apache-1.1"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Ansible module to manage PaloAltoNetworks Firewall
# (c) 2018, Jasper Mackenzie <jasper.mackenzie@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publis... | 31.005988 | 113 | 0.675164 |
54b1c995455bd815ff9ed53723e6a62841ba2571 | 2,831 | py | Python | code/prepare_for_lamda.py | liwenran/OpenCausal | 0522b838562d65fdf3bf3ccdb6b7a986c7c675bb | [
"MIT"
] | 2 | 2020-10-12T08:55:53.000Z | 2022-02-04T01:08:15.000Z | code/prepare_for_lamda.py | liwenran/OpenCausal | 0522b838562d65fdf3bf3ccdb6b7a986c7c675bb | [
"MIT"
] | 1 | 2021-10-06T02:50:24.000Z | 2021-10-06T02:50:24.000Z | code/prepare_for_lamda.py | liwenran/OpenCausal | 0522b838562d65fdf3bf3ccdb6b7a986c7c675bb | [
"MIT"
] | 3 | 2020-05-09T02:43:52.000Z | 2021-07-17T23:33:27.000Z | import os,sys,gzip
import numpy as np
def tissue_index_info():
donorsID = open('GTEx_WGS_635Ind_PASSQC_donorID.txt').readline().strip().split('\t')[9:]
file = open('donors_for_lamda.txt')
samplesID = {}
for line in file:
line = line.strip().split('\t')
samplesID[line[0]]=line[3]
fil... | 25.972477 | 92 | 0.671141 |
a8d6b2c5b63b6edaf946a68410789ea5a8695425 | 4,680 | py | Python | lastfmtimeline/TimelineData.py | D3r3k23/LastFmTimeline | 3843539c2787d5e85d8ac4509783e05bf19b9787 | [
"MIT"
] | 2 | 2020-12-17T07:10:54.000Z | 2022-02-10T04:42:21.000Z | lastfmtimeline/TimelineData.py | D3r3k23/LastFmTimeline | 3843539c2787d5e85d8ac4509783e05bf19b9787 | [
"MIT"
] | null | null | null | lastfmtimeline/TimelineData.py | D3r3k23/LastFmTimeline | 3843539c2787d5e85d8ac4509783e05bf19b9787 | [
"MIT"
] | null | null | null | """
TimelineData.data:
{
item1: {
chart1: playcount
chart2: playcount
...
}
item2: {
chart1: playcount
chart2: playcount
...
}
...
}
TimelineData.ranking:
{
item1: {
chart1: rank
chart2: rank
...
}
item2: {
chart1: rank
chart2: rank
...
}
...
}
"""
from c... | 30 | 138 | 0.609402 |
75351f257dca0c084875a82177fbde1c75efe557 | 4,214 | py | Python | Tests/test_binary.py | jugmac00/Pyjion | 62038c73f1d622099ced04aeddbc5bc11c2756df | [
"MIT"
] | null | null | null | Tests/test_binary.py | jugmac00/Pyjion | 62038c73f1d622099ced04aeddbc5bc11c2756df | [
"MIT"
] | null | null | null | Tests/test_binary.py | jugmac00/Pyjion | 62038c73f1d622099ced04aeddbc5bc11c2756df | [
"MIT"
] | null | null | null | import gc
import sys
import unittest
import pyjion
class BinaryOperationTestCase(unittest.TestCase):
def setUp(self) -> None:
pyjion.enable()
pyjion.disable_pgc()
def tearDown(self) -> None:
pyjion.disable()
gc.collect()
def test_addition(self):
a = 987654
... | 30.536232 | 62 | 0.607024 |
fdae204697aab3cb1feae4dedcb14abc9d6c966c | 744 | py | Python | test/fs/integration/ide_write/test.py | paulyc/IncludeOS | 5c82bad4a22838bc2219fbadef57d94f006b4760 | [
"Apache-2.0"
] | null | null | null | test/fs/integration/ide_write/test.py | paulyc/IncludeOS | 5c82bad4a22838bc2219fbadef57d94f006b4760 | [
"Apache-2.0"
] | null | null | null | test/fs/integration/ide_write/test.py | paulyc/IncludeOS | 5c82bad4a22838bc2219fbadef57d94f006b4760 | [
"Apache-2.0"
] | 1 | 2021-06-16T22:48:53.000Z | 2021-06-16T22:48:53.000Z | #! /usr/bin/env python
import sys
import os
import subprocess
import subprocess32
thread_timeout = 30
includeos_src = os.environ.get('INCLUDEOS_SRC',
os.path.realpath(os.path.join(os.getcwd(), os.path.dirname(__file__))).split('/test')[0])
sys.path.insert(0,includeos_src)
from vmrunner... | 24.8 | 120 | 0.708333 |
d355d34f90650cdbafc8c377a24c9e99fed0d6c7 | 1,733 | py | Python | radar.py | Jean1dev/FlightRadar | 5652ebb7edb245be1d2607faa64632e05b457700 | [
"MIT"
] | null | null | null | radar.py | Jean1dev/FlightRadar | 5652ebb7edb245be1d2607faa64632e05b457700 | [
"MIT"
] | null | null | null | radar.py | Jean1dev/FlightRadar | 5652ebb7edb245be1d2607faa64632e05b457700 | [
"MIT"
] | null | null | null | from Tkinter import *
import math
#master = Tk()
class radar(Frame):
def __init__(self,master,size=200,dot='blue',**kw):
Frame.__init__(self,master,width=size,height=size)
self.master = master
self.configure(**kw)
self._c = Canvas(self,width=self['width'],height=self['height'],bg=... | 27.951613 | 83 | 0.619158 |
19b40411b5504c722cc3a9c7da4ae06ac582bcd5 | 2,806 | py | Python | deprecated/gui/src/widgets/util/navigation.py | magnusoy/Sparkie | 428b716a50cd0c274670971ee007e82571a04a80 | [
"MIT"
] | 15 | 2020-03-07T12:25:50.000Z | 2021-11-27T03:13:47.000Z | gui/src/widgets/util/navigation.py | magnusoy/Sparkie | 428b716a50cd0c274670971ee007e82571a04a80 | [
"MIT"
] | null | null | null | gui/src/widgets/util/navigation.py | magnusoy/Sparkie | 428b716a50cd0c274670971ee007e82571a04a80 | [
"MIT"
] | 9 | 2020-04-08T04:37:34.000Z | 2021-11-27T03:13:50.000Z | # #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This module ...
__author__ = "Magnus Kvendseth Øye"
__copyright__ = "Copyright 2019, Sparkie Quadruped Robot"
__credits__ = ["Magnus Kvendseth Øye", "Petter Drønnen", "Vegard Solheim"]
__version__ = "1.0.0"
__license__ = "MIT"
__maintainer__ = "Magnus Kvendseth Øye... | 25.053571 | 75 | 0.575196 |
ac64af3e2eb707ed4debd35bc8501994dcfb7b58 | 15,977 | py | Python | tests/test_auth.py | uwcirg/true_nth_usa_portal | e2434731aed86f1c43f15d428dde8ffc28ac7e5f | [
"BSD-3-Clause"
] | 3 | 2017-01-15T10:11:57.000Z | 2018-10-02T23:46:44.000Z | tests/test_auth.py | uwcirg/true_nth_usa_portal | e2434731aed86f1c43f15d428dde8ffc28ac7e5f | [
"BSD-3-Clause"
] | 876 | 2016-04-04T20:45:11.000Z | 2019-02-28T00:10:36.000Z | tests/test_auth.py | uwcirg/truenth-portal | 459a0d157982f010175c50b9cccd860a61790370 | [
"BSD-3-Clause"
] | 9 | 2016-04-13T01:18:55.000Z | 2018-09-19T20:44:23.000Z | """Unit test module for auth"""
from collections import namedtuple
import datetime
from flask import url_for
from flask_webtest import SessionScope
import pytest
from werkzeug.exceptions import Unauthorized
from portal.extensions import db
from portal.models.auth import AuthProvider, Token, create_service_token
from ... | 33.078675 | 78 | 0.724229 |
0749ac94162bc8d4bd64c79998b547d6c474de6e | 1,994 | py | Python | lite/tests/unittest_py/op/common/test_elementwise_mul_op_base.py | laiou/Paddle-Lite | a99080a48186ec7df546d77d39db58d84d1dda3e | [
"Apache-2.0"
] | null | null | null | lite/tests/unittest_py/op/common/test_elementwise_mul_op_base.py | laiou/Paddle-Lite | a99080a48186ec7df546d77d39db58d84d1dda3e | [
"Apache-2.0"
] | null | null | null | lite/tests/unittest_py/op/common/test_elementwise_mul_op_base.py | laiou/Paddle-Lite | a99080a48186ec7df546d77d39db58d84d1dda3e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 38.346154 | 125 | 0.706118 |
b97e86f7d4d2ecfc050be3707bfed4b37d296bbc | 14,504 | py | Python | automol/tests/test_instab.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | null | null | null | automol/tests/test_instab.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | null | null | null | automol/tests/test_instab.py | sjklipp/automol | ba87f4443ebe2ceb5929d4269c4be93fd28f68ca | [
"Apache-2.0"
] | 7 | 2019-12-18T20:11:06.000Z | 2020-10-14T08:54:16.000Z | """
test automol.rotor
"""
import automol
# CH2OOH
ZMA1 = (
('C', (None, None, None), (None, None, None),
(None, None, None)),
('O', (0, None, None), ('R1', None, None),
(2.638561158117497, None, None)),
('H', (0, 1, None), ('R2', 'A2', None),
(2.0966833415410435, 1.9181232230723193, N... | 41.919075 | 79 | 0.60866 |
dff9a0312ae88b1272174022746fac3ffb46839e | 6,084 | py | Python | wimp/xsec/InelasticCS.py | lopez86/WimpSim | 096cf9f3e3e3d8e4552418a9f4f690593d099160 | [
"MIT"
] | 2 | 2020-09-25T10:48:24.000Z | 2020-12-29T19:56:04.000Z | wimp/xsec/InelasticCS.py | lopez86/WimpSim | 096cf9f3e3e3d8e4552418a9f4f690593d099160 | [
"MIT"
] | 1 | 2017-06-12T01:12:15.000Z | 2017-06-17T06:33:16.000Z | wimp/xsec/InelasticCS.py | lopez86/PyWIMPs | 096cf9f3e3e3d8e4552418a9f4f690593d099160 | [
"MIT"
] | null | null | null | """ InelasticCrossSection.py
Basic inelastic cross section model: Isotropic in center of mass frame
with a small mass splitting between two dark matter states
"""
__author__ = "Jeremy P. Lopez"
__date__ = "June 2017"
__copyright__ = "(c) 2017, Jeremy P. Lopez"
from . import CrossSection
from .. import units
... | 28.429907 | 70 | 0.58021 |
12cb697a67a23ba7055053727a670cf472a39dc0 | 2,480 | py | Python | docs/blueprints/make_blueprints_table.py | Niehaus/kytos | 9e220e7207dfe292dddb20dc7296f53fe467213d | [
"MIT"
] | null | null | null | docs/blueprints/make_blueprints_table.py | Niehaus/kytos | 9e220e7207dfe292dddb20dc7296f53fe467213d | [
"MIT"
] | null | null | null | docs/blueprints/make_blueprints_table.py | Niehaus/kytos | 9e220e7207dfe292dddb20dc7296f53fe467213d | [
"MIT"
] | null | null | null | import re
import os
import glob
def create_table(directory):
# Create the table header and cells
table_header = ''
table_cell = ''
bps_rst = []
bps_titles = []
bps_status = []
max_len_title = -1
max_len_status = -1
max_len_bps = -1
for fp in glob.glob(f'{dire... | 37.014925 | 129 | 0.55 |
37f956f62af149e1c8f42c81d2432237e90dc6bc | 3,958 | py | Python | Scrapy_zzuliacgn/pipelines.py | DeSireFire/zzuliacgnSyders | 0e4d6b9663771d8ddc65598bae58a5b4b8c22e88 | [
"MIT"
] | 2 | 2019-03-23T16:05:16.000Z | 2021-04-19T02:14:09.000Z | Scrapy_zzuliacgn/pipelines.py | DeSireFire/zzuliacgnSyders | 0e4d6b9663771d8ddc65598bae58a5b4b8c22e88 | [
"MIT"
] | null | null | null | Scrapy_zzuliacgn/pipelines.py | DeSireFire/zzuliacgnSyders | 0e4d6b9663771d8ddc65598bae58a5b4b8c22e88 | [
"MIT"
] | 1 | 2020-10-11T15:33:31.000Z | 2020-10-11T15:33:31.000Z | # -*- coding: utf-8 -*-
import json,pymysql
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
class mysqlPipeline(object):
pass
# class mysqlPipeline(object):
# def __init__(self, host, databa... | 38.057692 | 178 | 0.549267 |
da8572896cebc29eca9e2fc4afbc56ea07c7a22d | 1,099 | py | Python | mfcauto/event_emitter.py | asperities/mfcauto.py | 275f4e7e09af3c869c8a746f85e0b40f5dfe791a | [
"MIT"
] | 2 | 2020-08-16T03:09:50.000Z | 2021-08-30T00:40:23.000Z | mfcauto/event_emitter.py | asperities/mfcauto.py | 275f4e7e09af3c869c8a746f85e0b40f5dfe791a | [
"MIT"
] | null | null | null | mfcauto/event_emitter.py | asperities/mfcauto.py | 275f4e7e09af3c869c8a746f85e0b40f5dfe791a | [
"MIT"
] | 11 | 2018-06-10T08:17:20.000Z | 2021-09-28T05:11:42.000Z | class EventEmitter:
"""Rudimentary EventEmitter class that somewhat mimics the NodeJS EventEmitter class"""
def __init__(self):
self.listeners = dict()
def add_listener(self, event, func):
"""Adds func as a listener for event"""
self.listeners.setdefault(event, set()).add(func)... | 43.96 | 92 | 0.617834 |
9a4de2afdce8e894646a3ab8151827a925a12ec4 | 9,031 | py | Python | mapgen.py | ghlmtz/airline-sim | 5899e0390aaa5792e0bc6b1673ad2f0b3dd11d1d | [
"MIT"
] | null | null | null | mapgen.py | ghlmtz/airline-sim | 5899e0390aaa5792e0bc6b1673ad2f0b3dd11d1d | [
"MIT"
] | null | null | null | mapgen.py | ghlmtz/airline-sim | 5899e0390aaa5792e0bc6b1673ad2f0b3dd11d1d | [
"MIT"
] | null | null | null | import random
import math
import noise
import json
from multiprocessing import Pool
from enums import *
from util import *
from fileio import *
import ginit as g
from time import process_time
class TileGroup:
def __init__(self):
self.tiles = []
self.towns = []
self.area = 0
class Tile:
def __init__(self,x,... | 26.176812 | 155 | 0.685971 |
c7e0610f1fe147a583541a20e0c5410cfe81c1c0 | 67 | py | Python | pages/themes/basicIOFormatedStrings/examples/tmp.py | WWWCourses/ProgressBG-Python-UniCredit-Slides | 87539aa2f73738370ac8df865cf3a1adac447391 | [
"MIT"
] | null | null | null | pages/themes/basicIOFormatedStrings/examples/tmp.py | WWWCourses/ProgressBG-Python-UniCredit-Slides | 87539aa2f73738370ac8df865cf3a1adac447391 | [
"MIT"
] | null | null | null | pages/themes/basicIOFormatedStrings/examples/tmp.py | WWWCourses/ProgressBG-Python-UniCredit-Slides | 87539aa2f73738370ac8df865cf3a1adac447391 | [
"MIT"
] | null | null | null | print('|Jhoh\'s pub|')
print('|line1\nline2|')
print('|abc\t123|')
| 16.75 | 23 | 0.61194 |
ee19f0e82dcbc510f54843419f121334c5ab2734 | 4,277 | py | Python | huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/keystone_show_security_compliance_by_option_request.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 64 | 2020-06-12T07:05:07.000Z | 2022-03-30T03:32:50.000Z | huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/keystone_show_security_compliance_by_option_request.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 11 | 2020-07-06T07:56:54.000Z | 2022-01-11T11:14:40.000Z | huaweicloud-sdk-iam/huaweicloudsdkiam/v3/model/keystone_show_security_compliance_by_option_request.py | huaweicloud/huaweicloud-sdk-python-v3 | 7a6270390fcbf192b3882bf763e7016e6026ef78 | [
"Apache-2.0"
] | 24 | 2020-06-08T11:42:13.000Z | 2022-03-04T06:44:08.000Z | # coding: utf-8
import re
import six
from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization
class KeystoneShowSecurityComplianceByOptionRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
at... | 30.55 | 131 | 0.610942 |
4de4225bbfda6ae17c3617448b324227f9d9a081 | 165 | py | Python | posts/admin.py | yyyyyyyan/esquer.dev | eb43dc3a8e2db2bba42f3d487c721a69d55ff361 | [
"MIT"
] | 9 | 2020-03-02T17:31:07.000Z | 2022-01-03T03:36:02.000Z | posts/admin.py | yyyyyyyan/esquer.dev | eb43dc3a8e2db2bba42f3d487c721a69d55ff361 | [
"MIT"
] | 6 | 2021-04-03T21:45:57.000Z | 2022-02-10T08:13:13.000Z | posts/admin.py | yyyyyyyan/esquer.dev | eb43dc3a8e2db2bba42f3d487c721a69d55ff361 | [
"MIT"
] | 1 | 2020-06-08T10:53:35.000Z | 2020-06-08T10:53:35.000Z | from django.contrib import admin
from .models import Post
@admin.register(Post)
class PostAdmin(admin.ModelAdmin):
prepopulated_fields = {"slug": ("title",)}
| 18.333333 | 46 | 0.739394 |
e495b11f078ea1d71d002df6d172c2f7397bb08e | 15,082 | py | Python | pyscf/prop/polarizability/uhf.py | azag0/pyscf | 1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b | [
"Apache-2.0"
] | 2 | 2021-06-30T22:33:35.000Z | 2021-11-22T18:02:36.000Z | pyscf/prop/polarizability/uhf.py | azag0/pyscf | 1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b | [
"Apache-2.0"
] | null | null | null | pyscf/prop/polarizability/uhf.py | azag0/pyscf | 1e3e27b61b3cfd22c9679d2c9851c13b3ebc5a1b | [
"Apache-2.0"
] | 2 | 2021-09-16T23:37:42.000Z | 2021-10-14T23:00:39.000Z | #!/usr/bin/env python
# Copyright 2014-2019 The PySCF Developers. 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
#
# U... | 36.606796 | 88 | 0.59276 |
6c9922ec6e84367876ea19738168bd429db0fb77 | 2,618 | py | Python | flexget/plugins/cli/perf_tests.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/plugins/cli/perf_tests.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | flexget/plugins/cli/perf_tests.py | sillygreen89/Flexget | 60f24ab0dda7b94c87ba43451921c50c3cef391f | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, division, absolute_import
from builtins import * # pylint: disable=unused-import, redefined-builtin
import logging
from flexget import options
from flexget.event import event
from flexget.logger import console
from flexget.manager import Session
log = logging.getLogger('perf... | 32.725 | 105 | 0.668449 |
24d3f632b5aeb8356d9dfaaca8ceb0bf8dc6197e | 3,591 | py | Python | recognition/vpl/dataset.py | qaz734913414/insightface | 4101fe608ca1d38604a23d53f32314ce8a28fe79 | [
"MIT"
] | 12,377 | 2017-12-04T02:46:57.000Z | 2022-03-31T16:48:31.000Z | recognition/vpl/dataset.py | qaz734913414/insightface | 4101fe608ca1d38604a23d53f32314ce8a28fe79 | [
"MIT"
] | 1,851 | 2017-12-05T05:41:23.000Z | 2022-03-30T13:06:22.000Z | recognition/vpl/dataset.py | qaz734913414/insightface | 4101fe608ca1d38604a23d53f32314ce8a28fe79 | [
"MIT"
] | 4,198 | 2017-12-05T02:57:19.000Z | 2022-03-30T10:29:37.000Z | import numbers
import os
import queue as Queue
import threading
import mxnet as mx
import numpy as np
import torch
from torch.utils.data import DataLoader, Dataset
from torchvision import transforms
class BackgroundGenerator(threading.Thread):
def __init__(self, generator, local_rank, max_prefetch=6):
su... | 31.5 | 82 | 0.601504 |
a1b323e37910e437217b7d8c64189731e175698a | 1,579 | py | Python | setup.py | parth115/APIv3-python-library | cba7cb905d8b2206ee51b051eee63bbe3fb68522 | [
"MIT"
] | null | null | null | setup.py | parth115/APIv3-python-library | cba7cb905d8b2206ee51b051eee63bbe3fb68522 | [
"MIT"
] | null | null | null | setup.py | parth115/APIv3-python-library | cba7cb905d8b2206ee51b051eee63bbe3fb68522 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
SendinBlue API
SendinBlue provide a RESTFul API that can be used with any languages. With this API, you will be able to : - Manage your campaigns and get the statistics - Manage your contacts - Send transactional Emails and SMS - and much more... You can download our wrappers at h... | 40.487179 | 806 | 0.662445 |
a9c5b6f235a1505928c031aceb1974d233d6d52b | 16,924 | py | Python | tensorflow/compiler/tests/depthwise_conv_op_test.py | fraudies/tensorflow | a42423e302b71893bbd24aa896869941013c07fb | [
"Apache-2.0"
] | null | null | null | tensorflow/compiler/tests/depthwise_conv_op_test.py | fraudies/tensorflow | a42423e302b71893bbd24aa896869941013c07fb | [
"Apache-2.0"
] | null | null | null | tensorflow/compiler/tests/depthwise_conv_op_test.py | fraudies/tensorflow | a42423e302b71893bbd24aa896869941013c07fb | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 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.821176 | 80 | 0.598026 |
ad988ecf19daa7983d1674c821908aaf4ae2419f | 937 | py | Python | django_mock_rest/admin.py | mverleg/django_mock_rest | dd6468c1d966353dc2a2fed77b299261ceb76a14 | [
"BSD-3-Clause"
] | 1 | 2018-09-26T19:33:36.000Z | 2018-09-26T19:33:36.000Z | django_mock_rest/admin.py | mverleg/django_mock_rest | dd6468c1d966353dc2a2fed77b299261ceb76a14 | [
"BSD-3-Clause"
] | 12 | 2018-09-25T19:38:37.000Z | 2018-09-26T19:29:48.000Z | django_mock_rest/admin.py | mverleg/django_mock_rest | dd6468c1d966353dc2a2fed77b299261ceb76a14 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from django import forms
from django_mock_rest.models import Endpoint, Response
class ResponseInline(admin.StackedInline):
model = Response
fields = ('weight', 'status', 'data',)
extra = 1
class EndpointAdminForm(forms.ModelForm):
def clean(self):
path = self.cleaned_data['pa... | 24.657895 | 86 | 0.715048 |
98184ca11a82e915a672af7d8462f036fcd1521b | 2,790 | py | Python | recog_with_components/train.py | hushukai/Chinese-ancient-book-recognition-HSK | de5b6474dc4346524d95b405223c721aae5b500b | [
"Apache-2.0"
] | 2 | 2020-04-12T08:33:50.000Z | 2020-07-03T09:15:56.000Z | recog_with_components/train.py | hushukai/Chinese-ancient-book-recognition-HSK | de5b6474dc4346524d95b405223c721aae5b500b | [
"Apache-2.0"
] | null | null | null | recog_with_components/train.py | hushukai/Chinese-ancient-book-recognition-HSK | de5b6474dc4346524d95b405223c721aae5b500b | [
"Apache-2.0"
] | 4 | 2020-07-03T09:15:58.000Z | 2020-07-17T09:24:08.000Z | # -*- coding: utf-8 -*-
# Author: hushukai
import os
import tensorflow as tf
from tensorflow.keras import backend as K
from .model import work_net, compile, add_metrics
from .callback import tf_config, get_callbacks
from .data_pipeline import data_generator
from config import CHAR_IMG_SIZE
from config import CHAR_RE... | 38.219178 | 124 | 0.63871 |
d0dbcf5b116ca8ebbe3a8081cb95667540f76dde | 2,026 | py | Python | single_tech_samples/databricks/sample4_ci_cd/notebook_jobs/tests/main_notebook_sql_test.py | swbabberz/modern-data-warehouse-dataops | 9ea71cfcc1e6df9b6c850c115169817105c6242e | [
"MIT"
] | null | null | null | single_tech_samples/databricks/sample4_ci_cd/notebook_jobs/tests/main_notebook_sql_test.py | swbabberz/modern-data-warehouse-dataops | 9ea71cfcc1e6df9b6c850c115169817105c6242e | [
"MIT"
] | null | null | null | single_tech_samples/databricks/sample4_ci_cd/notebook_jobs/tests/main_notebook_sql_test.py | swbabberz/modern-data-warehouse-dataops | 9ea71cfcc1e6df9b6c850c115169817105c6242e | [
"MIT"
] | null | null | null | # Databricks notebook source
# MAGIC %pip install nutter
# COMMAND ----------
from runtime.nutterfixture import NutterFixture, tag
class Test1Fixture(NutterFixture):
total = 0
first_year = 0
# Arrange All
def before_all(self):
sqlContext.sql('CREATE TABLE US_POPULATION (date STRING,... | 34.338983 | 110 | 0.652024 |
36dcc8358fa00c4c4f9465a1b396aeea445cdfd8 | 1,101 | py | Python | web2py-appliances-master/CustomerRelationshipManagement/models/plugin_tagging.py | wantsomechocolate/WantsomeBeanstalk | 8c8a0a80490d04ea52661a3114fd3db8de65a01e | [
"BSD-3-Clause"
] | null | null | null | web2py-appliances-master/CustomerRelationshipManagement/models/plugin_tagging.py | wantsomechocolate/WantsomeBeanstalk | 8c8a0a80490d04ea52661a3114fd3db8de65a01e | [
"BSD-3-Clause"
] | null | null | null | web2py-appliances-master/CustomerRelationshipManagement/models/plugin_tagging.py | wantsomechocolate/WantsomeBeanstalk | 8c8a0a80490d04ea52661a3114fd3db8de65a01e | [
"BSD-3-Clause"
] | null | null | null | if not 'db' in globals():
raise HTTP(500,"plugin _tagging requires 'db' and 'auth'")
db.define_table('plugin_tagging_tag',
Field('name'),
Field('counter','integer',default=0,writable=False),
Field('created_by',db.auth_user,writable=False,readable=False),
Field('created_on','datetime',default=reques... | 32.382353 | 89 | 0.713896 |
6488cbed190c4d98404cc8ad370a7ff3a80c83bb | 5,293 | py | Python | ecosante/api/blueprint.py | betagouv/recosante-api | 4560b2cf2ff4dc19597792fe15a3805f6259201d | [
"MIT"
] | 3 | 2021-09-24T14:07:51.000Z | 2021-12-14T13:48:34.000Z | ecosante/api/blueprint.py | betagouv/recosante-api | 4560b2cf2ff4dc19597792fe15a3805f6259201d | [
"MIT"
] | 187 | 2021-03-25T16:43:49.000Z | 2022-03-23T14:40:31.000Z | ecosante/api/blueprint.py | betagouv/recosante-api | 4560b2cf2ff4dc19597792fe15a3805f6259201d | [
"MIT"
] | null | null | null | from datetime import date
import json
from indice_pollution.history.models.commune import Commune
from indice_pollution.history.models.episode_pollution import EpisodePollution
from sqlalchemy.orm import joinedload
from ecosante.extensions import rebar, db
from .schemas import ResponseSchema, QuerySchema
from indice_po... | 35.763514 | 179 | 0.614396 |
6df860dbf291877fbef0bd5d9cb03ede7caa99c1 | 3,486 | py | Python | ClientsManagementSystemDjangoPlugin/ClientsManagementSystem/settings.py | CiganOliviu/ClientsManagementSystemDjangoPlugin | 58b628f8f4eed1ccf86bb4d4150456dad54795b9 | [
"MIT"
] | 1 | 2021-04-02T16:45:52.000Z | 2021-04-02T16:45:52.000Z | ClientsManagementSystem/ClientsManagementSystem/settings.py | CiganOliviu/ClientsManagementSystem | 6271dd007e549fd0369c4df7c017980b915a91b5 | [
"MIT"
] | null | null | null | ClientsManagementSystem/ClientsManagementSystem/settings.py | CiganOliviu/ClientsManagementSystem | 6271dd007e549fd0369c4df7c017980b915a91b5 | [
"MIT"
] | null | null | null | """
Django settings for ClientsManagementSystem project.
Generated by 'django-admin startproject' using Django 3.0.8.
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/
"... | 25.26087 | 91 | 0.703672 |
e17d6ea3cf8d4d0783995651eac52a24758645b3 | 581 | py | Python | fermat_v1.py | Filipe-Barbos/Teste | 105831ddf2767ec16f7e9f4f4f11fdcd3d6512b0 | [
"Apache-2.0"
] | null | null | null | fermat_v1.py | Filipe-Barbos/Teste | 105831ddf2767ec16f7e9f4f4f11fdcd3d6512b0 | [
"Apache-2.0"
] | null | null | null | fermat_v1.py | Filipe-Barbos/Teste | 105831ddf2767ec16f7e9f4f4f11fdcd3d6512b0 | [
"Apache-2.0"
] | null | null | null | # Rodar script online
# https://trinket.io/features/python3
a = int(input('Digite um número qualquer: '))
p = int(input('Digite um número primo: '))
result = 0
if (a % p) == 0:
print('Primeira Fórmula')
result = ((a**p) - a) / p
if (((a**p) - a) % p) == 0:
print(result)
print('a e p são congruentes')
else:
... | 20.75 | 46 | 0.595525 |
00b79303a21e9550b76e676ebaa0ae105f19f0d1 | 2,424 | py | Python | src/main/python/infra_buddy/deploy/s3_deploy.py | AlienVault-Engineering/infra-buddry | 841fea588720ca755a60c19cccfdf49adfcb6976 | [
"Apache-2.0"
] | 3 | 2018-03-31T09:09:40.000Z | 2021-11-08T10:26:46.000Z | src/main/python/infra_buddy/deploy/s3_deploy.py | AlienVault-Engineering/infra-buddry | 841fea588720ca755a60c19cccfdf49adfcb6976 | [
"Apache-2.0"
] | 2 | 2021-05-21T04:17:02.000Z | 2021-06-01T18:49:26.000Z | src/main/python/infra_buddy/deploy/s3_deploy.py | AlienVault-Engineering/infra-buddry | 841fea588720ca755a60c19cccfdf49adfcb6976 | [
"Apache-2.0"
] | 3 | 2020-10-12T23:00:58.000Z | 2021-07-29T19:03:50.000Z | import os
import tempfile
from infra_buddy.aws import s3 as s3util
from infra_buddy.aws.cloudformation import CloudFormationBuddy
from infra_buddy.aws.s3 import S3Buddy
from infra_buddy.deploy.deploy import Deploy
from infra_buddy.utility import print_utility
class S3Deploy(Deploy):
def __init__(self, artifact_i... | 41.793103 | 119 | 0.642739 |
e5f1c382c1ab9bf483a5ce3be285cb31c3009ab5 | 7,187 | py | Python | visualize/generate_figures.py | dojitza/ddnn | adbe5c20f2f6b2c3d875af8b651cce22138928ff | [
"Unlicense"
] | 110 | 2017-09-07T03:29:34.000Z | 2022-03-28T12:41:00.000Z | visualize/generate_figures.py | dojitza/ddnn | adbe5c20f2f6b2c3d875af8b651cce22138928ff | [
"Unlicense"
] | 9 | 2017-10-11T12:12:44.000Z | 2021-04-02T01:40:49.000Z | visualize/generate_figures.py | dojitza/ddnn | adbe5c20f2f6b2c3d875af8b651cce22138928ff | [
"Unlicense"
] | 58 | 2017-07-30T12:48:40.000Z | 2022-03-07T01:18:24.000Z | import os
import matplotlib
matplotlib.rcParams['font.size'] = 20.0
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
def align_y_axis(ax1, ax2, minresax1, minresax2, ticks):
""" Sets tick marks of twinx axes to line up with 7 total tick marks
ax1 and ax2 are matplotlib axes
... | 32.817352 | 99 | 0.623348 |
8b809e575d515181faebec13d218fb10e7048cd3 | 839 | py | Python | stage/forms.py | hasithsen/sayit | c4de556a4f8cc2f7585b553046285dc6ac0107f4 | [
"MIT"
] | null | null | null | stage/forms.py | hasithsen/sayit | c4de556a4f8cc2f7585b553046285dc6ac0107f4 | [
"MIT"
] | null | null | null | stage/forms.py | hasithsen/sayit | c4de556a4f8cc2f7585b553046285dc6ac0107f4 | [
"MIT"
] | null | null | null | from django.forms import ModelForm, TextInput, Textarea
from .models import Message
class MessageCreateForm(ModelForm):
class Meta:
model = Message
fields = ['content', 'sender', 'receiver']
# initial = {'content': 'Your say here'}
widgets = {
'sender': TextInput(attrs={'placeholder': 'Enter n... | 33.56 | 84 | 0.638856 |
890f6db3fc0da3506da6dfad282dafe0ea772c0f | 73 | py | Python | logical_backup/__init__.py | ammesonb/logical-backup | 0d52c5a05c7d3eaa267c79799582e4a607b9c35f | [
"MIT"
] | null | null | null | logical_backup/__init__.py | ammesonb/logical-backup | 0d52c5a05c7d3eaa267c79799582e4a607b9c35f | [
"MIT"
] | 36 | 2020-06-06T13:40:19.000Z | 2021-06-14T14:02:04.000Z | logical_backup/__init__.py | ammesonb/logical-backup | 0d52c5a05c7d3eaa267c79799582e4a607b9c35f | [
"MIT"
] | null | null | null | """
Wrapper for files
"""
__all__ = ["main", "db", "library", "utility"]
| 14.6 | 46 | 0.575342 |
4ecb2803844b9c8091db742a8971b6ac92badd52 | 1,764 | py | Python | main/main.py | salamander-mh/PyQrCode | 76749b49402b570d7b8b1cfa2bb947db3cb2fa11 | [
"MIT"
] | 2 | 2020-04-15T09:07:05.000Z | 2020-12-30T02:24:54.000Z | main/main.py | salamander-mh/PyQrCode | 76749b49402b570d7b8b1cfa2bb947db3cb2fa11 | [
"MIT"
] | 1 | 2020-04-27T03:06:19.000Z | 2020-04-27T03:06:19.000Z | main/main.py | salamander-mh/PyQrCode | 76749b49402b570d7b8b1cfa2bb947db3cb2fa11 | [
"MIT"
] | 1 | 2020-05-14T02:17:52.000Z | 2020-05-14T02:17:52.000Z | from pyzbar import pyzbar
import cv2
from typing import Callable
import time
import numpy as np
from fastapi import FastAPI, File, UploadFile
from fastapi.exceptions import RequestValidationError
from fastapi.responses import JSONResponse, HTMLResponse
from fastapi.staticfiles import StaticFiles
from pydantic import Ba... | 27.138462 | 77 | 0.671202 |
43a66e0d4848430d37cecb21387fa89ddac71ea8 | 1,949 | py | Python | models/create_message_response.py | ajrice6713/bw-messaging-emulator | d1be4976e2486ec91b419597afc8411c78ebfda7 | [
"MIT"
] | null | null | null | models/create_message_response.py | ajrice6713/bw-messaging-emulator | d1be4976e2486ec91b419597afc8411c78ebfda7 | [
"MIT"
] | null | null | null | models/create_message_response.py | ajrice6713/bw-messaging-emulator | d1be4976e2486ec91b419597afc8411c78ebfda7 | [
"MIT"
] | null | null | null | import datetime
import json
import random
import string
from typing import Dict
from sms_counter import SMSCounter
class CreateMessageResponse:
def __init__(self, request):
self.id = self.generate_id()
self.owner = request['from']
self.applicationId = request['applicationId']
sel... | 30.936508 | 91 | 0.578758 |
2dda361fbb59e09ae5d91c88e2d90f0d5c8b11e6 | 8,052 | py | Python | Methods/RL/run_deepaffinity.py | wengelearning/Drug-Combo-Generator | 82f9f9adb22de6e8e8f0a198708a1c277d72c802 | [
"Apache-2.0"
] | 24 | 2020-03-29T00:06:52.000Z | 2022-03-14T02:01:29.000Z | Methods/RL/run_deepaffinity.py | wengelearning/Drug-Combo-Generator | 82f9f9adb22de6e8e8f0a198708a1c277d72c802 | [
"Apache-2.0"
] | 4 | 2020-09-26T00:51:42.000Z | 2022-02-10T01:50:04.000Z | Methods/RL/run_deepaffinity.py | Shen-Lab/Drug-Combo-Generator | 82f9f9adb22de6e8e8f0a198708a1c277d72c802 | [
"Apache-2.0"
] | 10 | 2020-03-29T04:12:52.000Z | 2021-11-05T02:32:15.000Z | #!/usr/bin/env python3
from mpi4py import MPI
from baselines.common import set_global_seeds
from baselines import logger
from tensorboardX import SummaryWriter
import os
import tensorflow as tf
import gym
from gym_molecule.envs.molecule import GraphEnv,get_disease_name_info
def train(args,seed,writer=Non... | 56.307692 | 481 | 0.710755 |
e60973576ab5ffbe97cdc0acc96e226ea03db28d | 211 | py | Python | python/pygimli/solver/__init__.py | mjziebarth/gimli | 196ac4d6dd67e0326cccc44a87b367f64051e490 | [
"Apache-2.0"
] | 3 | 2021-07-10T00:56:59.000Z | 2022-02-17T12:43:38.000Z | python/pygimli/solver/__init__.py | ivek1312/gimli | 5fafebb7c96dd0e04e2616df402fa27a01609d63 | [
"Apache-2.0"
] | null | null | null | python/pygimli/solver/__init__.py | ivek1312/gimli | 5fafebb7c96dd0e04e2616df402fa27a01609d63 | [
"Apache-2.0"
] | 1 | 2022-03-29T04:28:40.000Z | 2022-03-29T04:28:40.000Z | # -*- coding: utf-8 -*-
"""General physics independent solver interface."""
from .green import greenDiffusion1D
from .solver import *
from .solverFiniteVolume import *
__all__ = []
class WorkSpace:
pass
| 16.230769 | 51 | 0.7109 |
8c23a2b92e26212ef1a9b32f3123d6e0f9857007 | 39,093 | py | Python | SapGuiLibrary/SapGuiLibrary.py | jduncan8142/robotframework-sapguilibrary | 006fbf4be69e9fcd35c334751dfb07c8e4a1447d | [
"Apache-2.0"
] | null | null | null | SapGuiLibrary/SapGuiLibrary.py | jduncan8142/robotframework-sapguilibrary | 006fbf4be69e9fcd35c334751dfb07c8e4a1447d | [
"Apache-2.0"
] | null | null | null | SapGuiLibrary/SapGuiLibrary.py | jduncan8142/robotframework-sapguilibrary | 006fbf4be69e9fcd35c334751dfb07c8e4a1447d | [
"Apache-2.0"
] | null | null | null | import pythoncom
import win32com.client
import time
from pythoncom import com_error
import robot.libraries.Screenshot as screenshot
import os
from robot.api import logger
import datetime
class SapGuiLibrary:
"""The SapGuiLibrary is a library that enables users to create tests for the Sap Gui application
The ... | 48.623134 | 132 | 0.570844 |
2f3dfc935e0431e2aa6395e00b948ff4f3fa6083 | 7,384 | py | Python | synthetic_linear_programming/calc.py | PredOptwithSoftConstraint/PredOptwithSoftConstraint | c0ec41a8c2c48034851cf04cd848013ceba1dd40 | [
"MIT"
] | 7 | 2021-12-12T15:23:28.000Z | 2022-01-15T23:24:02.000Z | synthetic_linear_programming/calc.py | PredOptwithSoftConstraint/PredOptwithSoftConstraint | c0ec41a8c2c48034851cf04cd848013ceba1dd40 | [
"MIT"
] | null | null | null | synthetic_linear_programming/calc.py | PredOptwithSoftConstraint/PredOptwithSoftConstraint | c0ec41a8c2c48034851cf04cd848013ceba1dd40 | [
"MIT"
] | 3 | 2021-12-23T01:02:59.000Z | 2022-01-14T02:12:40.000Z | import numpy as np
from config import get_K, device, CLIP
import gurobipy
from scipy.optimize import minimize, LinearConstraint
from util import merge_constraints
import torch
from torch.optim import SGD
from torch.autograd import Variable
import gurobipy as gp
from gurobipy import GRB
import torch.nn as nn
import cvxp... | 52.368794 | 210 | 0.615926 |
44f2c4b8222181748eb033d82628f72e3fa1906d | 708 | py | Python | 2017/170304/bowling/main.py | emmenezes/CodingDojo | 50468e29ea9c724a4dc1196c8374125c5b1cfc20 | [
"Beerware"
] | 11 | 2017-06-30T00:33:14.000Z | 2019-04-18T01:16:13.000Z | 2017/170304/bowling/main.py | emmenezes/CodingDojo | 50468e29ea9c724a4dc1196c8374125c5b1cfc20 | [
"Beerware"
] | 7 | 2017-10-29T20:05:01.000Z | 2018-07-06T20:18:51.000Z | 2017/170304/bowling/main.py | emmenezes/CodingDojo | 50468e29ea9c724a4dc1196c8374125c5b1cfc20 | [
"Beerware"
] | 5 | 2019-10-23T22:49:55.000Z | 2021-01-11T01:39:58.000Z | class Frames:
def jogada(self, play):
return play
def verifica_par(self, play):
qtd = len(play)
resto_divisao = qtd % 2
if resto_divisao == 0:
return True
else:
return False
def aglutinarJogadas(self, lista1):
resultado = []
p... | 26.222222 | 45 | 0.490113 |
a4c685bfaef6f28982d1d32fab08e1ddf2987ffa | 1,042 | py | Python | app/core/migrations/0004_recipe.py | gabrielmdc/receipe-app-api | c07d5cb776e5498212e8b3a3ce8dd96e4eeaf260 | [
"MIT"
] | null | null | null | app/core/migrations/0004_recipe.py | gabrielmdc/receipe-app-api | c07d5cb776e5498212e8b3a3ce8dd96e4eeaf260 | [
"MIT"
] | null | null | null | app/core/migrations/0004_recipe.py | gabrielmdc/receipe-app-api | c07d5cb776e5498212e8b3a3ce8dd96e4eeaf260 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.3 on 2020-02-14 13:52
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0003_ingredient'),
]
operations = [
migrations.CreateModel(
... | 35.931034 | 118 | 0.603647 |
5d7b07467702346aacc6ba59ef3c734490312039 | 4,780 | py | Python | noise_robust_cobras/cobras_logger.py | jonassoenen/noise_robust_cobras | 0e5823dbba0263c3ccb3c2afb4267f2f542fc568 | [
"Apache-2.0"
] | 2 | 2020-07-30T15:09:53.000Z | 2020-07-31T06:33:36.000Z | noise_robust_cobras/cobras_logger.py | magicalJohn/noise_robust_cobras | 0e5823dbba0263c3ccb3c2afb4267f2f542fc568 | [
"Apache-2.0"
] | null | null | null | noise_robust_cobras/cobras_logger.py | magicalJohn/noise_robust_cobras | 0e5823dbba0263c3ccb3c2afb4267f2f542fc568 | [
"Apache-2.0"
] | 1 | 2021-12-12T11:11:25.000Z | 2021-12-12T11:11:25.000Z | import copy
import time
from typing import List
import numpy as np
from noise_robust_cobras.noise_robust.datastructures.constraint import Constraint
class NopLogger(object):
def nop(*args, **kw):
pass
def __getattr__(self, _):
return self.nop
class ClusteringLogger:
def __init__(self)... | 29.875 | 84 | 0.580753 |
06779124819b644bb0af761a2c522aca9a15466b | 9,064 | py | Python | Master_Mind.py | cmoradev/MesterMind_cenfotec | 233fd17a5cb3bf1b5246286581caed95819ad43d | [
"MIT"
] | null | null | null | Master_Mind.py | cmoradev/MesterMind_cenfotec | 233fd17a5cb3bf1b5246286581caed95819ad43d | [
"MIT"
] | null | null | null | Master_Mind.py | cmoradev/MesterMind_cenfotec | 233fd17a5cb3bf1b5246286581caed95819ad43d | [
"MIT"
] | null | null | null |
from turtle import *
from random import *
import pickle
import os.path
#Declaracion de listas a usar
#Generacion de colores random
colors = ["r","y","g","b","o","p"]
lista = []
codebreaker = []
#Si declaraba lista vacia a la hora de comparar, error decia que guess estaba fuera de rango
guess = ["-","-","-","-"]
#Var... | 32.487455 | 149 | 0.519417 |
5ff31c66b30af3cdb9d0c3627d8f257b88075828 | 32,894 | py | Python | exchangelib/protocol.py | lmverity/exchangelib | 15002565dfea30705c74b256b3a601f95e2afb00 | [
"BSD-2-Clause"
] | null | null | null | exchangelib/protocol.py | lmverity/exchangelib | 15002565dfea30705c74b256b3a601f95e2afb00 | [
"BSD-2-Clause"
] | null | null | null | exchangelib/protocol.py | lmverity/exchangelib | 15002565dfea30705c74b256b3a601f95e2afb00 | [
"BSD-2-Clause"
] | null | null | null | """
A protocol is an endpoint for EWS service connections. It contains all necessary information to make HTTPS connections.
Protocols should be accessed through an Account, and are either created from a default Configuration or autodiscovered
when creating an Account.
"""
import datetime
import logging
import os
from ... | 44.937158 | 120 | 0.6593 |
b386573f9a94749510ac020913318a3df0f0abb6 | 88 | py | Python | Unet_Mobile/test.py | Ice833/Semantic-Segmentation | 23d23f6da3b34884c044a2253d65a1e4097adb2d | [
"MIT"
] | 1 | 2020-12-16T08:29:13.000Z | 2020-12-16T08:29:13.000Z | Unet_Mobile/test.py | Ice833/Semantic-Segmentation | 23d23f6da3b34884c044a2253d65a1e4097adb2d | [
"MIT"
] | null | null | null | Unet_Mobile/test.py | Ice833/Semantic-Segmentation | 23d23f6da3b34884c044a2253d65a1e4097adb2d | [
"MIT"
] | null | null | null | from nets.unet import mobilenet_unet
model = mobilenet_unet(2,416,416)
model.summary() | 29.333333 | 37 | 0.795455 |
527f4c396bf697f9dbcd22d80234ac10ff6c2d68 | 8,618 | py | Python | skmob/core/tests/test_trajectorydataframe.py | FilippoSimini/scikit-mobility | d34270a478db5822d400c925d41aed7bfffce75b | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 489 | 2019-05-05T07:47:35.000Z | 2022-03-31T10:36:00.000Z | skmob/core/tests/test_trajectorydataframe.py | FilippoSimini/scikit-mobility | d34270a478db5822d400c925d41aed7bfffce75b | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 204 | 2019-05-02T22:51:05.000Z | 2022-03-19T17:14:29.000Z | skmob/core/tests/test_trajectorydataframe.py | FilippoSimini/scikit-mobility | d34270a478db5822d400c925d41aed7bfffce75b | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 119 | 2019-05-28T19:51:29.000Z | 2022-03-23T03:43:00.000Z | import numpy as np
import pandas as pd
import geopandas as gpd
from datetime import datetime
from operator import itemgetter
from ...utils import constants
from ...utils.constants import UID, DATETIME, LATITUDE, LONGITUDE, GEOLIFE_SAMPLE
from ...core.trajectorydataframe import TrajDataFrame
from ...core.flowdataframe i... | 48.689266 | 112 | 0.569274 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.