hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794f3b6767a7884ddb0641a9e96d5abeb932d3b7 | 1,320 | py | Python | CadVlan/manage.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 17 | 2015-05-19T20:03:45.000Z | 2022-03-24T06:19:47.000Z | CadVlan/manage.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 41 | 2015-01-27T18:36:07.000Z | 2021-06-10T20:34:03.000Z | CadVlan/manage.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 19 | 2016-09-12T07:35:42.000Z | 2022-01-28T23:46:11.000Z | # -*- coding:utf-8 -*-
# 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 "Lic... | 38.823529 | 203 | 0.751515 |
794f3bb1a554d6189ce477a8af7cd89806f561c1 | 8,992 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/aio/operations/_available_service_aliases_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/aio/operations/_available_service_aliases_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/aio/operations/_available_service_aliases_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 48.085561 | 204 | 0.655916 |
794f3cf569829887ba32360a4dc7737bff1519e8 | 7,698 | py | Python | auto_ks/kalman_smoother.py | opendoor-labs/auto_ks | e60bcc639ee7ee312fdb6c2d0b907e10dec09d49 | [
"Apache-2.0"
] | 35 | 2019-10-19T00:30:05.000Z | 2022-03-31T23:32:05.000Z | auto_ks/kalman_smoother.py | opendoor-labs/auto_ks | e60bcc639ee7ee312fdb6c2d0b907e10dec09d49 | [
"Apache-2.0"
] | 4 | 2019-10-23T10:20:15.000Z | 2021-01-20T13:10:40.000Z | auto_ks/kalman_smoother.py | opendoor-labs/auto_ks | e60bcc639ee7ee312fdb6c2d0b907e10dec09d49 | [
"Apache-2.0"
] | 8 | 2020-01-09T09:19:29.000Z | 2022-01-19T05:09:05.000Z | import numpy as np
import numpy.random as npr
from scipy import sparse
from scipy.sparse import linalg as splinalg
import IPython as ipy
import time
import numbers
class KalmanSmootherParameters:
def __init__(self, A, W_neg_sqrt, C, V_neg_sqrt):
self.A = A
self.W_neg_sqrt = W_neg_sqrt
self.... | 35.311927 | 140 | 0.607301 |
794f3d622fb1c021f919cc62e483a6cb3f8f0b9a | 4,981 | py | Python | VART/samples/inception_v1_mt_py/inception_v1.py | qianglin-xlnx/Vitis-AI | ae1e8f9db31a1980e0b7bb86baeb898c4fe0da26 | [
"Apache-2.0"
] | 3 | 2020-10-29T15:00:30.000Z | 2021-10-21T08:09:34.000Z | VART/samples/inception_v1_mt_py/inception_v1.py | qianglin-xlnx/Vitis-AI | ae1e8f9db31a1980e0b7bb86baeb898c4fe0da26 | [
"Apache-2.0"
] | 20 | 2020-10-31T03:19:03.000Z | 2020-11-02T18:59:49.000Z | VART/samples/inception_v1_mt_py/inception_v1.py | qianglin-xlnx/Vitis-AI | ae1e8f9db31a1980e0b7bb86baeb898c4fe0da26 | [
"Apache-2.0"
] | 9 | 2020-10-14T02:04:10.000Z | 2020-12-01T08:23:02.000Z | '''
Copyright 2019 Xilinx 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, software
di... | 27.983146 | 137 | 0.647661 |
794f3d8c7116926d9e4ac307ceae237fc72886a3 | 11,841 | py | Python | packages/pytea/pytest/benchmarks/transformers/missing_idx/src/transformers/tokenization_camembert.py | lego0901/pytea | 8ede650def2e68f4610ba816451d8b9e28f09f76 | [
"MIT"
] | 96 | 2021-06-16T09:06:52.000Z | 2022-03-26T09:56:32.000Z | packages/pytea/pytest/benchmarks/transformers/missing_idx/src/transformers/tokenization_camembert.py | lego0901/pytea | 8ede650def2e68f4610ba816451d8b9e28f09f76 | [
"MIT"
] | 16 | 2021-07-01T05:34:48.000Z | 2022-03-28T09:40:15.000Z | packages/pytea/pytest/benchmarks/transformers/missing_idx/src/transformers/tokenization_camembert.py | lego0901/pytea | 8ede650def2e68f4610ba816451d8b9e28f09f76 | [
"MIT"
] | 24 | 2021-06-19T15:58:31.000Z | 2022-03-14T09:17:19.000Z | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://ww... | 43.533088 | 119 | 0.648763 |
794f3d96a93aa8a49c8bbc2f2459859cea86e987 | 2,030 | py | Python | p2p/agent_manager.py | fipu-lab/p2p_bn | f2c67766f030de28fed82b11188f391d338bbe12 | [
"MIT"
] | null | null | null | p2p/agent_manager.py | fipu-lab/p2p_bn | f2c67766f030de28fed82b11188f391d338bbe12 | [
"MIT"
] | null | null | null | p2p/agent_manager.py | fipu-lab/p2p_bn | f2c67766f030de28fed82b11188f391d338bbe12 | [
"MIT"
] | null | null | null | from p2p.p2p_utils import *
import time
def init_agents(agent_class, train_clients, val_clients, test_clients, batch_size, model_pars=None, agent_pars=None):
start_time = time.time()
model_default = {"model_v": 1, "lr": 0.001, "decay": 0, "default_weights": False}
model_pars = model_default if model_pars ... | 38.301887 | 117 | 0.620197 |
794f3dfdb8c420519c9f289ce116f2ff1ebba48f | 76,587 | py | Python | flopy/utils/reference.py | ConnectedSystems/flopy | cf3334437be74ba780c12ff2aa2b69f3ffbf8644 | [
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | flopy/utils/reference.py | ConnectedSystems/flopy | cf3334437be74ba780c12ff2aa2b69f3ffbf8644 | [
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | flopy/utils/reference.py | ConnectedSystems/flopy | cf3334437be74ba780c12ff2aa2b69f3ffbf8644 | [
"CC0-1.0",
"BSD-3-Clause"
] | null | null | null | """
Module spatial referencing for flopy model objects
"""
import json
import numpy as np
import os
import warnings
from collections import OrderedDict
class SpatialReference(object):
"""
a class to locate a structured model grid in x-y space
Parameters
----------
delr : num... | 35.147774 | 100 | 0.508298 |
794f3f0658eb1e6d2431528fbba0d21c691d55b1 | 20,910 | py | Python | matrix.py | olivercalder/linear-algebra | 3435373912968018810622bbf032dad87c1f8072 | [
"MIT"
] | 1 | 2019-04-19T15:06:45.000Z | 2019-04-19T15:06:45.000Z | matrix.py | olivercalder/linear-algebra | 3435373912968018810622bbf032dad87c1f8072 | [
"MIT"
] | null | null | null | matrix.py | olivercalder/linear-algebra | 3435373912968018810622bbf032dad87c1f8072 | [
"MIT"
] | null | null | null | class Matrix:
def __init__(self, matrix=None, width=None):
if matrix == None:
self.empty()
elif width != None:
height = matrix
self.empty(height, width)
else:
self.height = len(matrix)
self.width = len(matrix[0])
self.m... | 31.826484 | 162 | 0.504687 |
794f3f660ee63d027a31a77a117e65b069e9068b | 4,336 | py | Python | segmenters/nlp/NLTKSentencizer/tests/test_nltksentencizer.py | Harshdeep1996/jina-hub | 880ff719715b89969860c70219d26a931a031d10 | [
"Apache-2.0"
] | 106 | 2020-04-28T10:24:08.000Z | 2022-03-15T02:30:27.000Z | segmenters/nlp/NLTKSentencizer/tests/test_nltksentencizer.py | mezig351/jina-hub | 3ced90575467ebb4bc070ed43a189271370b4e70 | [
"Apache-2.0"
] | 6,808 | 2020-05-01T04:13:43.000Z | 2021-06-23T08:04:02.000Z | segmenters/nlp/NLTKSentencizer/tests/test_nltksentencizer.py | mezig351/jina-hub | 3ced90575467ebb4bc070ed43a189271370b4e70 | [
"Apache-2.0"
] | 86 | 2020-04-29T09:50:29.000Z | 2022-01-25T05:42:44.000Z | import numpy as np
import pytest
from .. import NLTKSentencizer
@pytest.mark.parametrize(
'language, expected_len, expected_first_chunk, expected_second_chunk, text',
[
(
None,
2,
'Today is a good day.',
"Can't wait for tomorrow!",
"Today is... | 33.099237 | 101 | 0.586024 |
794f405b8ad86de7e275da375758a8fb4948ec86 | 15,146 | py | Python | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/subTLVs/subTLVs_/adjacency_sid/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 64 | 2016-10-20T15:47:18.000Z | 2021-11-11T11:57:32.000Z | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/subTLVs/subTLVs_/adjacency_sid/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 126 | 2016-10-05T10:36:14.000Z | 2019-05-15T08:43:23.000Z | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/isis/levels/level/link_state_database/lsp/tlvs/tlv/mt_isn/neighbors/neighbor/subTLVs/subTLVs_/adjacency_sid/__init__.py | ckishimo/napalm-yang | 8f2bd907bd3afcde3c2f8e985192de74748baf6c | [
"Apache-2.0"
] | 63 | 2016-11-07T15:23:08.000Z | 2021-09-22T14:41:16.000Z | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | 37.865 | 517 | 0.573749 |
794f410ae5b6548f0ba8abcfe70bc7987ce3495b | 6,149 | py | Python | test/test_s3.py | cmc333333/parsons | 50804a3627117797570f1e9233c9bbad583f7831 | [
"Apache-2.0"
] | null | null | null | test/test_s3.py | cmc333333/parsons | 50804a3627117797570f1e9233c9bbad583f7831 | [
"Apache-2.0"
] | 2 | 2021-11-24T19:39:57.000Z | 2022-01-03T23:03:35.000Z | test/test_s3.py | cmc333333/parsons | 50804a3627117797570f1e9233c9bbad583f7831 | [
"Apache-2.0"
] | null | null | null | import unittest
import os
from datetime import datetime
import pytz
from parsons.aws.s3 import S3
from parsons.etl.table import Table
import urllib
import time
from test.utils import assert_matching_tables
# Requires a s3 credentials stored in aws config or env variable
# to run properly.
@unittest.skipIf(not os.env... | 34.740113 | 91 | 0.658156 |
794f418fce6662d759ec12f1f20937ecf883c31a | 11,096 | py | Python | BB/bbObjects/bbInventory.py | Morgenkroete/GOF2BountyBot | b4fe3d765b764ab169284ce0869a810825013389 | [
"MIT"
] | 6 | 2020-06-09T16:36:52.000Z | 2021-02-02T17:53:44.000Z | BB/bbObjects/bbInventory.py | Morgenkroete/GOF2BountyBot | b4fe3d765b764ab169284ce0869a810825013389 | [
"MIT"
] | 138 | 2020-08-02T11:20:34.000Z | 2020-12-15T15:55:11.000Z | BB/bbObjects/bbInventory.py | Morgenkroete/GOF2BountyBot | b4fe3d765b764ab169284ce0869a810825013389 | [
"MIT"
] | 6 | 2020-07-05T05:32:16.000Z | 2020-11-01T21:58:31.000Z | from __future__ import annotations
from . import bbInventoryListing
from ..baseClasses import bbSerializable
class bbInventory(bbSerializable.bbSerializable):
"""A database of bbInventoryListings.
Aside from the use of bbInventoryListing for the purpose of item quantities, this class is type unaware.
:var... | 41.871698 | 186 | 0.636626 |
794f41f95922746903a16356f5f30c648cf9d11d | 225 | py | Python | main.py | Rodrigo-Oliveira1211/Projeto_Email | bed2a0bc73dce51182be11ee158008a32c33666f | [
"MIT"
] | null | null | null | main.py | Rodrigo-Oliveira1211/Projeto_Email | bed2a0bc73dce51182be11ee158008a32c33666f | [
"MIT"
] | null | null | null | main.py | Rodrigo-Oliveira1211/Projeto_Email | bed2a0bc73dce51182be11ee158008a32c33666f | [
"MIT"
] | null | null | null | from enviar_arquivo import EmailBot
if __name__ == "__main__":
login = open("Arquivos/login.txt", "r").readlines()
email = login[0]
senha = login[1]
enviar = EmailBot(email, senha)
enviar.enviar_email() | 22.5 | 55 | 0.662222 |
794f4208a8c86ae8d0d8fc3873b1e3e29df80066 | 121 | py | Python | src/nrnpython/examples/test1.py | niltonlk/nrn | 464541abbf72fe58de77b16bf0e1df425a280b89 | [
"BSD-3-Clause"
] | 203 | 2018-05-03T11:02:11.000Z | 2022-03-31T14:18:31.000Z | src/nrnpython/examples/test1.py | niltonlk/nrn | 464541abbf72fe58de77b16bf0e1df425a280b89 | [
"BSD-3-Clause"
] | 1,228 | 2018-04-25T09:00:48.000Z | 2022-03-31T21:42:21.000Z | src/nrnpython/examples/test1.py | niltonlk/nrn | 464541abbf72fe58de77b16bf0e1df425a280b89 | [
"BSD-3-Clause"
] | 134 | 2018-04-23T09:14:13.000Z | 2022-03-16T08:57:11.000Z | from neuron import h
pc = h.ParallelContext()
print "NEURON thinks I am %d of %d\n" % (pc.id(), pc.nhost())
pc.done()
| 15.125 | 61 | 0.636364 |
794f42857a502f22d3907a4f71fafdce07e24a0a | 17,826 | py | Python | adaptive/tests/test_learners.py | jhoofwijk/adaptive | ebb4879abcfba57de2808a1df5c01db8a1508a5d | [
"BSD-3-Clause"
] | null | null | null | adaptive/tests/test_learners.py | jhoofwijk/adaptive | ebb4879abcfba57de2808a1df5c01db8a1508a5d | [
"BSD-3-Clause"
] | null | null | null | adaptive/tests/test_learners.py | jhoofwijk/adaptive | ebb4879abcfba57de2808a1df5c01db8a1508a5d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import collections
import functools as ft
import inspect
import itertools as it
import math
import operator
import os
import random
import shutil
import tempfile
import numpy as np
import pytest
import scipy.spatial
import adaptive
from adaptive.learner import (AverageLearner, BalancingLearne... | 32.469945 | 95 | 0.670537 |
794f43cc67b41fed1de2140a1f5017c1325c610d | 2,035 | py | Python | nilmtk/stats/tests/test_dropoutrate.py | nilmtkMridul/nilmtk | b4eede4f2e8f55c0f072cc08da1b47d433c07445 | [
"Apache-2.0"
] | 1 | 2021-11-04T05:10:58.000Z | 2021-11-04T05:10:58.000Z | nilmtk/stats/tests/test_dropoutrate.py | nilmtkMridul/nilmtk | b4eede4f2e8f55c0f072cc08da1b47d433c07445 | [
"Apache-2.0"
] | null | null | null | nilmtk/stats/tests/test_dropoutrate.py | nilmtkMridul/nilmtk | b4eede4f2e8f55c0f072cc08da1b47d433c07445 | [
"Apache-2.0"
] | 1 | 2019-10-12T16:02:05.000Z | 2019-10-12T16:02:05.000Z | #!/usr/bin/python
from __future__ import print_function, division
import unittest
from os.path import join
import numpy as np
import pandas as pd
from datetime import timedelta
from .. import DropoutRate
from ..goodsectionsresults import GoodSectionsResults
from ..totalenergy import _energy_for_power_series
from ... im... | 35.086207 | 99 | 0.697789 |
794f4573fec2e5ea20db0d30f81b27e4466cd9ab | 29,683 | py | Python | BaseTools/Source/Python/Common/StringUtils.py | changeworld/mu_basecore | 1a883ec85d8d2f49663c76e1a1bc5068333f5508 | [
"BSD-2-Clause"
] | null | null | null | BaseTools/Source/Python/Common/StringUtils.py | changeworld/mu_basecore | 1a883ec85d8d2f49663c76e1a1bc5068333f5508 | [
"BSD-2-Clause"
] | null | null | null | BaseTools/Source/Python/Common/StringUtils.py | changeworld/mu_basecore | 1a883ec85d8d2f49663c76e1a1bc5068333f5508 | [
"BSD-2-Clause"
] | 1 | 2021-11-01T19:33:11.000Z | 2021-11-01T19:33:11.000Z | ## @file
# This file is used to define common string related functions used in parsing process
#
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accomp... | 33.923429 | 136 | 0.610215 |
794f4641bd91757768993b249a3e6594c0e0a49c | 74 | py | Python | linkable/__init__.py | meyt/linkable-py | 13b2e523fd8e0ed36affac49bb8ad89361fc25c7 | [
"MIT"
] | 1 | 2019-05-19T20:24:30.000Z | 2019-05-19T20:24:30.000Z | linkable/__init__.py | meyt/linkable-py | 13b2e523fd8e0ed36affac49bb8ad89361fc25c7 | [
"MIT"
] | null | null | null | linkable/__init__.py | meyt/linkable-py | 13b2e523fd8e0ed36affac49bb8ad89361fc25c7 | [
"MIT"
] | null | null | null | from linkable.parser import Linkable, LinkableList
__version__ = '0.2.3'
| 18.5 | 50 | 0.783784 |
794f46d7e595933fb12cb60ac72ef59b4e3ba224 | 525 | py | Python | main.py | waltatgit/Machine-Learning-Engineering-with-MLflow | 42887869d9528356572c104392122cac5cdbf62c | [
"MIT"
] | null | null | null | main.py | waltatgit/Machine-Learning-Engineering-with-MLflow | 42887869d9528356572c104392122cac5cdbf62c | [
"MIT"
] | null | null | null | main.py | waltatgit/Machine-Learning-Engineering-with-MLflow | 42887869d9528356572c104392122cac5cdbf62c | [
"MIT"
] | null | null | null | # This is a sample Python script.
# Press Ctrl+R to execute it or replace it with your code.
# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings.
def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
print(f'Hi, {name}') # Press Met... | 30.882353 | 98 | 0.721905 |
794f46df8528b081606db63b52d6af494f941adc | 4,007 | py | Python | cifar/dyresA_resnet.py | Nyquixt/DyConv | 255193068424aaa83352bee258d34cb8b32b6ee6 | [
"MIT"
] | null | null | null | cifar/dyresA_resnet.py | Nyquixt/DyConv | 255193068424aaa83352bee258d34cb8b32b6ee6 | [
"MIT"
] | null | null | null | cifar/dyresA_resnet.py | Nyquixt/DyConv | 255193068424aaa83352bee258d34cb8b32b6ee6 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from convs.dyres_conv import *
from convs.condconv import *
__all__ = ['DyResA_ResNet18']
class DyRes_BasicBlock(nn.Module):
expansion = 1
def __init__(self, in_channels, channels, stride=1, num_experts=3):
super().__init__()
... | 38.528846 | 118 | 0.622411 |
794f479582ad2fefd4b4453660611cf4f1a3c977 | 2,991 | py | Python | startup/gui/shaderPresets.py | pier-robot/gaffer | 9267f2ba3822b14430d8a283c745261110b0f570 | [
"BSD-3-Clause"
] | null | null | null | startup/gui/shaderPresets.py | pier-robot/gaffer | 9267f2ba3822b14430d8a283c745261110b0f570 | [
"BSD-3-Clause"
] | null | null | null | startup/gui/shaderPresets.py | pier-robot/gaffer | 9267f2ba3822b14430d8a283c745261110b0f570 | [
"BSD-3-Clause"
] | null | null | null | ##########################################################################
#
# Copyright (c) 2018, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... | 33.606742 | 94 | 0.684052 |
794f48799abfcef4d38226162cee134ac47219e4 | 256,774 | py | Python | tensorflow/python/framework/ops.py | anonymous-313/tensorflow | b82785818b6b020d62340eaaece32b9c75858185 | [
"Apache-2.0"
] | 4 | 2021-02-04T16:54:54.000Z | 2021-03-02T18:04:54.000Z | tensorflow/python/framework/ops.py | anonymous-313/tensorflow | b82785818b6b020d62340eaaece32b9c75858185 | [
"Apache-2.0"
] | 1 | 2021-03-30T21:23:47.000Z | 2021-03-30T21:23:47.000Z | tensorflow/python/framework/ops.py | anonymous-313/tensorflow | b82785818b6b020d62340eaaece32b9c75858185 | [
"Apache-2.0"
] | 1 | 2019-09-27T09:03:41.000Z | 2019-09-27T09:03:41.000Z | # 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... | 36.483944 | 115 | 0.691861 |
794f48a34f55e1df7c3762c67f0be95dbf110835 | 1,775 | py | Python | lambdata_johanaluna/tryme2.py | johanaluna/lambdata | 342ffd027de3a7a68ce52164df568f502b65d77f | [
"MIT"
] | null | null | null | lambdata_johanaluna/tryme2.py | johanaluna/lambdata | 342ffd027de3a7a68ce52164df568f502b65d77f | [
"MIT"
] | 4 | 2020-03-24T17:49:32.000Z | 2021-06-02T00:34:44.000Z | lambdata_johanaluna/tryme2.py | johanaluna/lambdata | 342ffd027de3a7a68ce52164df568f502b65d77f | [
"MIT"
] | null | null | null | # Import libraries
import pandas
import numpy
from sklearn.model_selection import train_test_split
class Check_Data():
def __init__(self, df, name_column_target):
self.df = df
self.name_column_target = name_column_target
# function to check the null in a data frame and report how many nulls i... | 34.803922 | 93 | 0.664225 |
794f4925fc1bac4b3af3f99eae619dbaddd23e54 | 2,771 | py | Python | CIM15/IEC61970/Informative/InfERPSupport/ErpLedgerBudget.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 58 | 2015-04-22T10:41:03.000Z | 2022-03-29T16:04:34.000Z | CIM15/IEC61970/Informative/InfERPSupport/ErpLedgerBudget.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 12 | 2015-08-26T03:57:23.000Z | 2020-12-11T20:14:42.000Z | CIM15/IEC61970/Informative/InfERPSupport/ErpLedgerBudget.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 35 | 2015-01-10T12:21:03.000Z | 2020-09-09T08:18:16.000Z | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | 42.630769 | 387 | 0.737279 |
794f4941c5fe873992a6fadb5737d3b685608dad | 2,607 | py | Python | tools/installer/cefpython3.__init__.py | simon-graham/cefpython | cce4e3606a1bf1030133ebefc17bccad8099e7b5 | [
"CNRI-Python",
"RSA-MD",
"Linux-OpenIB"
] | 1 | 2020-12-30T18:54:28.000Z | 2020-12-30T18:54:28.000Z | tools/installer/cefpython3.__init__.py | simon-graham/cefpython | cce4e3606a1bf1030133ebefc17bccad8099e7b5 | [
"CNRI-Python",
"RSA-MD",
"Linux-OpenIB"
] | null | null | null | tools/installer/cefpython3.__init__.py | simon-graham/cefpython | cce4e3606a1bf1030133ebefc17bccad8099e7b5 | [
"CNRI-Python",
"RSA-MD",
"Linux-OpenIB"
] | 1 | 2020-11-21T07:15:14.000Z | 2020-11-21T07:15:14.000Z | # Copyright (c) 2013 CEF Python, see the Authors file.
# All rights reserved. Licensed under BSD 3-clause license.
# Project website: https://github.com/cztomczak/cefpython
# NOTE: Template variables like {{VERSION}} are replaced with actual
# values when make_installer.py tool generates this package
# ins... | 38.338235 | 71 | 0.749137 |
794f4b81b5d9f432459235c580eb422a006c4147 | 4,858 | py | Python | tests/processors/tests.py | mgedmin/raven-python | 6d487a8298dd5340c701b7195eb65ce4ed113f1f | [
"BSD-3-Clause"
] | null | null | null | tests/processors/tests.py | mgedmin/raven-python | 6d487a8298dd5340c701b7195eb65ce4ed113f1f | [
"BSD-3-Clause"
] | null | null | null | tests/processors/tests.py | mgedmin/raven-python | 6d487a8298dd5340c701b7195eb65ce4ed113f1f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from mock import Mock
from raven.utils.testutils import TestCase
from raven.processors import SanitizePasswordsProcessor, \
RemovePostDataProcessor, RemoveStackLocalsProcessor
VARS = {
'foo': 'bar',
'password': 'hello',
'the_secret': 'hello',
'a_password_here': 'hello',
... | 32.386667 | 95 | 0.595101 |
794f4cbe53333ba69d06e91cf05fbac54b794393 | 533 | py | Python | app/models.py | Kaundu/News-Highlight | 37f7d81059f684c958938b00de9b2cfd40c30dd8 | [
"Unlicense"
] | null | null | null | app/models.py | Kaundu/News-Highlight | 37f7d81059f684c958938b00de9b2cfd40c30dd8 | [
"Unlicense"
] | 1 | 2020-06-13T08:18:27.000Z | 2020-06-13T08:18:27.000Z | app/models.py | Tellvinch/newsalert | bbd2d6a27d9f5961814e52b09e3bc3543b026fac | [
"MIT"
] | null | null | null | # File for models/classes
class Article:
def __init__(self, id, author, title, description, url, image, date):
self.id = id
self.author = author
self.title = title
self.description = description
self.url = url
self.image = image
self.date = date
class News... | 25.380952 | 73 | 0.581614 |
794f4db925d05389f2f5e79bf1b6d0de0c9a9b49 | 4,973 | py | Python | titanic/training/train.py | memasanz/02_MLOpsPython | 23fa96a70a58ad6a25642b20486e94080a5ea580 | [
"MIT"
] | 1 | 2022-03-28T17:31:02.000Z | 2022-03-28T17:31:02.000Z | titanic/training/train.py | memasanz/02_MLOpsPython | 23fa96a70a58ad6a25642b20486e94080a5ea580 | [
"MIT"
] | null | null | null | titanic/training/train.py | memasanz/02_MLOpsPython | 23fa96a70a58ad6a25642b20486e94080a5ea580 | [
"MIT"
] | null | null | null | """
Copyright (C) Microsoft Corporation. All rights reserved.
Microsoft Corporation (“Microsoft”) grants you a nonexclusive, perpetual,
royalty-free right to use, copy, and modify the software code provided by us
("Software Code"). You may not sublicense the Software Code or any use of it
(except to your affiliates... | 36.837037 | 138 | 0.68892 |
794f4dfe9d5e7877d5c526ec8cc8377bfc2c94f6 | 2,702 | py | Python | builders/frontend_builder.py | willook/semantic-segmentation-zoo | 7b756629ce83fab3db4d91bc2513bb555fb28bb4 | [
"Apache-2.0"
] | 1 | 2019-09-20T14:29:16.000Z | 2019-09-20T14:29:16.000Z | builders/frontend_builder.py | willook/semantic-segmentation-zoo | 7b756629ce83fab3db4d91bc2513bb555fb28bb4 | [
"Apache-2.0"
] | null | null | null | builders/frontend_builder.py | willook/semantic-segmentation-zoo | 7b756629ce83fab3db4d91bc2513bb555fb28bb4 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
from tensorflow.contrib import slim
from frontends import resnet_v2
from frontends import mobilenet_v2
from frontends import inception_v4
import os
def build_frontend(inputs, frontend, is_training=True, pretrained_dir="models"):
if frontend == 'ResNet50':
with slim.arg_scope(resne... | 71.105263 | 193 | 0.749815 |
794f4f9e0faa7f87a8237afdb26dd2f7e4898e6c | 3,691 | py | Python | lambda/py/lambda_upload/ask_sdk_model/interfaces/audioplayer/clear_queue_directive.py | frivas/alexa-mixed-polly | bf0fde9005a66f3d6f0193799eacef934d166de7 | [
"W3C"
] | null | null | null | lambda/py/lambda_upload/ask_sdk_model/interfaces/audioplayer/clear_queue_directive.py | frivas/alexa-mixed-polly | bf0fde9005a66f3d6f0193799eacef934d166de7 | [
"W3C"
] | null | null | null | lambda/py/lambda_upload/ask_sdk_model/interfaces/audioplayer/clear_queue_directive.py | frivas/alexa-mixed-polly | bf0fde9005a66f3d6f0193799eacef934d166de7 | [
"W3C"
] | null | null | null | # coding: utf-8
#
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "lice... | 32.955357 | 106 | 0.613113 |
794f4fa0db94d108dcdcbbee05456a60c4e43f7e | 1,522 | py | Python | pro_near/dsl_bball.py | myracheng/pronear | a92e97cd860900f3c535a72a1b867d8f5ad096ab | [
"Apache-2.0"
] | null | null | null | pro_near/dsl_bball.py | myracheng/pronear | a92e97cd860900f3c535a72a1b867d8f5ad096ab | [
"Apache-2.0"
] | null | null | null | pro_near/dsl_bball.py | myracheng/pronear | a92e97cd860900f3c535a72a1b867d8f5ad096ab | [
"Apache-2.0"
] | null | null | null | import dsl
DSL_DICT = {
('list', 'list') : [dsl.MapFunction, dsl.MapPrefixesFunction, dsl.SimpleITE],
('list', 'atom') : [dsl.FoldFunction, dsl.running_averages.RunningAverageLast5Function, dsl.SimpleITE,
dsl.running_averages.RunningAverageWindow13Function,
dsl... | 47.5625 | 114 | 0.606439 |
794f4fc847867791a413224615d64df971ac4d81 | 3,643 | py | Python | utils/test/run-until-faulted.py | nathawes/swift-lldb | 3cbf7470e0f9191ec1fc1c69ce8048c1dc64ec77 | [
"Apache-2.0"
] | 427 | 2018-05-29T14:21:02.000Z | 2022-03-16T03:17:54.000Z | utils/test/run-until-faulted.py | DalavanCloud/lldb | e913eaf2468290fb94c767d474d611b41a84dd69 | [
"Apache-2.0"
] | 25 | 2018-07-23T08:34:15.000Z | 2021-11-05T07:13:36.000Z | utils/test/run-until-faulted.py | DalavanCloud/lldb | e913eaf2468290fb94c767d474d611b41a84dd69 | [
"Apache-2.0"
] | 52 | 2018-07-19T19:57:32.000Z | 2022-03-11T16:05:38.000Z | #!/usr/bin/env python
"""
Run a program via lldb until it fails.
The lldb executable is located via your PATH env variable, if not specified.
"""
import os
import sys
from optparse import OptionParser
def is_exe(fpath):
"""Check whether fpath is an executable."""
return os.path.isfile(fpath) and os.access(f... | 27.80916 | 82 | 0.581938 |
794f50617f0951c2a9af58bdc0c1373c3d9d953f | 10,788 | py | Python | keepluggable/image_actions.py | nandoflorestan/keepluggable | 046ad73befcf6b08ca8f8baf090989b9dd48cedc | [
"MIT"
] | 1 | 2016-12-17T14:25:28.000Z | 2016-12-17T14:25:28.000Z | keepluggable/image_actions.py | nandoflorestan/keepluggable | 046ad73befcf6b08ca8f8baf090989b9dd48cedc | [
"MIT"
] | null | null | null | keepluggable/image_actions.py | nandoflorestan/keepluggable | 046ad73befcf6b08ca8f8baf090989b9dd48cedc | [
"MIT"
] | 2 | 2015-07-08T13:07:47.000Z | 2016-08-16T10:32:50.000Z | """An Action class that deals with images."""
from copy import copy
from io import BytesIO
from typing import Any, BinaryIO, Dict, List, Union
# import imghdr # imghdr.what(file)
from kerno.pydantic import Pydantic, ReqStr
from pydantic import PositiveInt, validator
from PIL import Image, ExifTags
from keepluggable... | 35.370492 | 79 | 0.606136 |
794f51823b9aa22d680a31448d0fb03810ce4eec | 944 | py | Python | test/test_region_summary.py | NVE/python-varsom-avalanche-client | c7787bf070d8ea91efd3a2a9e7782eedd4961528 | [
"MIT"
] | null | null | null | test/test_region_summary.py | NVE/python-varsom-avalanche-client | c7787bf070d8ea91efd3a2a9e7782eedd4961528 | [
"MIT"
] | null | null | null | test/test_region_summary.py | NVE/python-varsom-avalanche-client | c7787bf070d8ea91efd3a2a9e7782eedd4961528 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Snøskredvarsel API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v5.0.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
im... | 23.6 | 119 | 0.713983 |
794f5224402772f77868c4a17498fce0885e5385 | 3,786 | py | Python | capture/noworkflow/now/utils/cross_version.py | raffaelfoidl/noworkflow | aa4ca189df24fec6c7abd32bcca6a097b21fdf31 | [
"MIT"
] | 108 | 2015-02-04T14:16:51.000Z | 2022-03-06T13:52:45.000Z | capture/noworkflow/now/utils/cross_version.py | raffaelfoidl/noworkflow | aa4ca189df24fec6c7abd32bcca6a097b21fdf31 | [
"MIT"
] | 92 | 2015-01-19T14:58:06.000Z | 2021-04-19T17:28:50.000Z | capture/noworkflow/now/utils/cross_version.py | raffaelfoidl/noworkflow | aa4ca189df24fec6c7abd32bcca6a097b21fdf31 | [
"MIT"
] | 31 | 2015-03-03T23:53:59.000Z | 2021-11-11T04:23:44.000Z | # Copyright (c) 2016 Universidade Federal Fluminense (UFF)
# Copyright (c) 2016 Polytechnic Institute of New York University.
# This file is part of noWorkflow.
# Please, consult the license terms in the LICENSE file.
# Do not add from __future__ imports here
"""Provide support for both Python 2 and Python 3"""
impor... | 47.924051 | 154 | 0.544638 |
794f5243f54f0804ec162bec691a557c23883c30 | 773 | py | Python | shared/charge_controller_tcp_driver/exemple_driver.py | EDF-Lab/EDF | 3ab2d9e1820dfb713bbd54c91ba72d7d32d998f9 | [
"MIT"
] | 16 | 2022-02-11T14:49:04.000Z | 2022-03-30T07:33:45.000Z | shared/charge_controller_tcp_driver/exemple_driver.py | EDF-Lab/EDF | 3ab2d9e1820dfb713bbd54c91ba72d7d32d998f9 | [
"MIT"
] | 1 | 2022-02-16T15:23:50.000Z | 2022-02-21T15:30:21.000Z | shared/charge_controller_tcp_driver/exemple_driver.py | EDF-Lab/EDF | 3ab2d9e1820dfb713bbd54c91ba72d7d32d998f9 | [
"MIT"
] | 1 | 2022-03-24T10:52:28.000Z | 2022-03-24T10:52:28.000Z |
import sys
sys.path.append("..")
import time
from charge_controller_tcp_driver.charge_controller_tcp_client_helper import *
if __name__ == '__main__':
helper = ChargeControllerTCPClientHelper("169.254.43.3", 12500)
time.sleep(3)
helper.set_pwm(100)
print("PWM:", helper.get_pwm())
#time.sleep(10)... | 24.15625 | 78 | 0.648124 |
794f524b73ae6229ac647da7e98bc64ee31d4e67 | 16,617 | py | Python | tenable/sc/audit_files.py | csanders-git/pyTenable | dea25ba02b049bfe3a8cd151c155c3ccf9b2a285 | [
"MIT"
] | null | null | null | tenable/sc/audit_files.py | csanders-git/pyTenable | dea25ba02b049bfe3a8cd151c155c3ccf9b2a285 | [
"MIT"
] | null | null | null | tenable/sc/audit_files.py | csanders-git/pyTenable | dea25ba02b049bfe3a8cd151c155c3ccf9b2a285 | [
"MIT"
] | null | null | null | '''
audit_files
===========
The following methods allow for interaction into the Tenable.sc
:sc-api:`Audit File <AuditFile.html>` API and the
:sc-api:`Audit File Template <AuditFile-Template.html>` API. These items are
typically seen under the **Scans: Audit Files** section of Tenable.sc.
Methods available on ``sc.a... | 37.851936 | 115 | 0.56719 |
794f5349f2ed8c33b2b08d10c63098365b926d72 | 1,961 | py | Python | config/settings/local.py | jvosk/repork | ca49095ec4b13c0b60eb909fa3349b093f8a3479 | [
"BSD-3-Clause"
] | null | null | null | config/settings/local.py | jvosk/repork | ca49095ec4b13c0b60eb909fa3349b093f8a3479 | [
"BSD-3-Clause"
] | null | null | null | config/settings/local.py | jvosk/repork | ca49095ec4b13c0b60eb909fa3349b093f8a3479 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Local settings
- Run in Debug mode
- Use console backend for emails
- Add Django Debug Toolbar
- Add django-extensions as app
'''
from .common import * # noqa
# DEBUG
# ------------------------------------------------------------------------------
DEBUG = env.bool('DJANGO_DEBUG', default... | 31.126984 | 110 | 0.498725 |
794f548b0df22fff167b16cbf8237dd07f240c48 | 14,861 | py | Python | cinder/tests/unit/volume/drivers/dell_emc/powermax/powermax_fake_objects.py | cloudification-io/cinder | 23d76e01f2b4f3771b57fb287084a4884238b827 | [
"Apache-2.0"
] | 571 | 2015-01-01T17:47:26.000Z | 2022-03-23T07:46:36.000Z | cinder/tests/unit/volume/drivers/dell_emc/powermax/powermax_fake_objects.py | dFarui/cinder | b2922384054ddbd46e071fd07372a75a21d7f85d | [
"Apache-2.0"
] | 37 | 2015-01-22T23:27:04.000Z | 2021-02-05T16:38:48.000Z | cinder/tests/unit/volume/drivers/dell_emc/powermax/powermax_fake_objects.py | dFarui/cinder | b2922384054ddbd46e071fd07372a75a21d7f85d | [
"Apache-2.0"
] | 841 | 2015-01-04T17:17:11.000Z | 2022-03-31T12:06:51.000Z | # Copyright (c) 2020 Dell Inc. or its subsidiaries.
# 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
#
# ... | 35.21564 | 78 | 0.594913 |
794f54c684b625e922499ef475abfc5d24d42d20 | 1,351 | py | Python | personal_env/lib/python3.8/site-packages/pylint/message/message.py | jestinmwilson/personal-website | 6e47a7f33ed3b1ca5c1d42c89c5380d22992ed74 | [
"MIT"
] | null | null | null | personal_env/lib/python3.8/site-packages/pylint/message/message.py | jestinmwilson/personal-website | 6e47a7f33ed3b1ca5c1d42c89c5380d22992ed74 | [
"MIT"
] | null | null | null | personal_env/lib/python3.8/site-packages/pylint/message/message.py | jestinmwilson/personal-website | 6e47a7f33ed3b1ca5c1d42c89c5380d22992ed74 | [
"MIT"
] | null | null | null | # Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/COPYING
import collections
from pylint.constants import MSG_TYPES
_MsgBase = collections.namedtuple(
"_MsgBase",
[
"msg_id",
"symbol",
... | 25.980769 | 81 | 0.551443 |
794f552bf82dc1da604c4109ebc4006f221c0870 | 7,116 | py | Python | services/users/project/tests/test_users.py | bill-door/testdriven-app | 26c6718388980415c8fb4110a9b143925798e135 | [
"MIT"
] | null | null | null | services/users/project/tests/test_users.py | bill-door/testdriven-app | 26c6718388980415c8fb4110a9b143925798e135 | [
"MIT"
] | null | null | null | services/users/project/tests/test_users.py | bill-door/testdriven-app | 26c6718388980415c8fb4110a9b143925798e135 | [
"MIT"
] | null | null | null | # services/users/project/tests/test_users.py
import json
import unittest
from project import db
from project.api.models import User
from project.tests.base import BaseTestCase
def add_user(username, email):
user = User(username=username, email=email)
db.session.add(user)
db.session.commit()
return ... | 38.673913 | 79 | 0.562395 |
794f5568a6c628b0f85c2b8c44b922a9578dc2c4 | 171 | py | Python | apps/course/admin.py | capy-pl/nccu-grade-system | db7107d56e45d535eed92b47c06e0d5c06f983a2 | [
"Apache-2.0"
] | 2 | 2019-01-14T17:20:06.000Z | 2019-05-06T03:26:23.000Z | apps/course/admin.py | capy-pl/nccu-grade-system | db7107d56e45d535eed92b47c06e0d5c06f983a2 | [
"Apache-2.0"
] | 4 | 2018-12-25T15:06:35.000Z | 2019-01-05T08:02:36.000Z | apps/course/admin.py | capy-pl/nccu-grade-system | db7107d56e45d535eed92b47c06e0d5c06f983a2 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import Course, ScoringSubject
# Register your models here.
admin.site.register(Course)
admin.site.register(ScoringSubject)
| 21.375 | 42 | 0.818713 |
794f5645192b1e66b26e1161e9f6c20fca6166c7 | 1,012 | py | Python | system/main.py | IsakLundstrom/D0020E_UWB_Nav_DR3 | f5dccdbccd8a4d91b5e666c81da3d656270193f1 | [
"MIT"
] | null | null | null | system/main.py | IsakLundstrom/D0020E_UWB_Nav_DR3 | f5dccdbccd8a4d91b5e666c81da3d656270193f1 | [
"MIT"
] | null | null | null | system/main.py | IsakLundstrom/D0020E_UWB_Nav_DR3 | f5dccdbccd8a4d91b5e666c81da3d656270193f1 | [
"MIT"
] | null | null | null | import threading
from webpage.server import startServer
from fallHandler import FallHandler
from sessionHandler import SessionHandler
from globalVariables import GlobalVariables
from webpage.changeConfig import ChangeConfig
import time
if __name__ == '__main__':
globalVariables = GlobalVariables() # Here we set u... | 42.166667 | 95 | 0.772727 |
794f56ddd6b6d822b3f0d4de8aeb4a33a95af2a6 | 6,509 | py | Python | plugins/modules/cmci_create.py | sophiegreen/ibm_zos_cics | a0d14af4f60d80a7262ae557f64e67b429115daa | [
"Apache-2.0"
] | null | null | null | plugins/modules/cmci_create.py | sophiegreen/ibm_zos_cics | a0d14af4f60d80a7262ae557f64e67b429115daa | [
"Apache-2.0"
] | null | null | null | plugins/modules/cmci_create.py | sophiegreen/ibm_zos_cics | a0d14af4f60d80a7262ae557f64e67b429115daa | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) IBM Corporation 2020
# Apache License, Version 2.0 (see https://opensource.org/licenses/Apache-2.0)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
module: cmci_create
short_description: Create CI... | 29.188341 | 122 | 0.681364 |
794f5799d2729df8c8746e7da3f0ba2cdcca8e4f | 2,629 | py | Python | output.py | nadhirxz/athan-parser | 3ebb99d27e592e87e098dfb8582f328a8d0e0bc2 | [
"MIT"
] | 1 | 2022-01-09T23:48:18.000Z | 2022-01-09T23:48:18.000Z | output.py | nadhirxz/athan-parser | 3ebb99d27e592e87e098dfb8582f328a8d0e0bc2 | [
"MIT"
] | null | null | null | output.py | nadhirxz/athan-parser | 3ebb99d27e592e87e098dfb8582f328a8d0e0bc2 | [
"MIT"
] | null | null | null | import os
import json
import re
places = ['alger', 'adrar', 'djelfa']
p = {
'alger': ['Oran', 'Mostaganem', 'Relizane', 'Chlef', 'Ain Defla', 'Tipaza', 'Medea', 'Blida', 'Boumerdes', 'Bouira', 'Dellys', 'Tizi Ouzou', 'Msila', 'Bordj Bou Arreridj', 'Setif', 'Jijel', 'Mila', 'Constantine', 'Skikda', 'Oum El Bouaghi... | 44.559322 | 296 | 0.580068 |
794f581387e59c130c0476e0f8f180cbae813724 | 2,351 | py | Python | patterns.py | IvanBrasilico/cli_talker | 9932196e414e7875da592851a761e3f7a47550f6 | [
"MIT"
] | null | null | null | patterns.py | IvanBrasilico/cli_talker | 9932196e414e7875da592851a761e3f7a47550f6 | [
"MIT"
] | 1 | 2021-06-01T21:56:20.000Z | 2021-06-01T21:56:20.000Z | patterns.py | IvanBrasilico/cli_talker | 9932196e414e7875da592851a761e3f7a47550f6 | [
"MIT"
] | null | null | null | '''Configuration of the routes, or vocabulary of the bot'''
from botteryapp import ch, ih
from bottery.conf.patterns import Pattern, DefaultPattern
from bottery.views import pong
from cli_talker.views import (flask_restless_view, help_text,
say_help, tec_view)
from sql_alchemy_view.views i... | 30.532468 | 74 | 0.72097 |
794f5836003dd96679ba8b1149171cc6beb284cd | 4,640 | py | Python | openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/gs_ctl/Opengauss_Function_Tools_gs_ctl_Case0020.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/gs_ctl/Opengauss_Function_Tools_gs_ctl_Case0020.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/TOOLS/INTERNAL_TOOLS/gs_ctl/Opengauss_Function_Tools_gs_ctl_Case0020.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... | 34.887218 | 84 | 0.552586 |
794f590b10d08e388ddb53ac66cdc81e4c1dd22b | 15,188 | py | Python | youtube_dl_gui/optionsmanager.py | Sofronio/youtube-dl-gui | cf1d7d682e941473028b182cea6ea8d8dc5ed779 | [
"Unlicense"
] | null | null | null | youtube_dl_gui/optionsmanager.py | Sofronio/youtube-dl-gui | cf1d7d682e941473028b182cea6ea8d8dc5ed779 | [
"Unlicense"
] | null | null | null | youtube_dl_gui/optionsmanager.py | Sofronio/youtube-dl-gui | cf1d7d682e941473028b182cea6ea8d8dc5ed779 | [
"Unlicense"
] | 1 | 2021-09-19T22:54:37.000Z | 2021-09-19T22:54:37.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""Youtubedlg module to handle settings. """
from __future__ import unicode_literals
import json
import os.path
from .utils import (
os_path_expanduser,
os_path_exists,
encode_tuple,
decode_tuple,
check_path
)
from .formats import (
OUTPUT_FORM... | 37.316953 | 97 | 0.587569 |
794f590d5629674748248822b96e97f8ef152cf0 | 3,687 | py | Python | services/movies_admin/movies/models.py | svvladimir-ru/ugc_sprint_1 | 7ae4f9094f34981057f6c80d38bd96df6c96d2db | [
"MIT"
] | null | null | null | services/movies_admin/movies/models.py | svvladimir-ru/ugc_sprint_1 | 7ae4f9094f34981057f6c80d38bd96df6c96d2db | [
"MIT"
] | null | null | null | services/movies_admin/movies/models.py | svvladimir-ru/ugc_sprint_1 | 7ae4f9094f34981057f6c80d38bd96df6c96d2db | [
"MIT"
] | null | null | null | import uuid
from django.core.validators import MaxValueValidator as Max
from django.core.validators import MinValueValidator as Min
from django.db import models
from django.utils.translation import gettext_lazy as _
from model_utils.models import TimeStampedModel
class Person(TimeStampedModel):
id = models.UUIDF... | 36.87 | 96 | 0.684296 |
794f595e5ccf5a7592de1fdf9e49f6356ecaa5c6 | 2,248 | py | Python | example_nn.py | aaskov/nsp | e0926a618f0b47d7d34a45c5c2bc3a32dcfa24c1 | [
"MIT"
] | null | null | null | example_nn.py | aaskov/nsp | e0926a618f0b47d7d34a45c5c2bc3a32dcfa24c1 | [
"MIT"
] | null | null | null | example_nn.py | aaskov/nsp | e0926a618f0b47d7d34a45c5c2bc3a32dcfa24c1 | [
"MIT"
] | 1 | 2018-07-26T06:51:33.000Z | 2018-07-26T06:51:33.000Z | # -*- coding: utf-8 -*-
"""
Neural network - nsp
"""
from __future__ import division
import numpy as np
import matplotlib.pyplot as plt
from nn.main import NeuralNetwork
from data.data_sunspot import get_sunspot, data_split
#%%
if __name__ == "__main__":
print 'This file contains the Neural Network e... | 30.794521 | 212 | 0.639235 |
794f59e48507e6002311e54e8ae31f3ad1bf4647 | 8,655 | py | Python | python/paddle/fluid/tests/unittests/test_imperative_selected_rows_to_lod_tensor.py | jiansowa/Paddle | 488152a6d076eac91ef0921ff6e16c65777f814d | [
"Apache-2.0"
] | 8 | 2019-06-16T12:36:11.000Z | 2021-03-05T05:33:21.000Z | python/paddle/fluid/tests/unittests/test_imperative_selected_rows_to_lod_tensor.py | wozna/Paddle | 0ecf441af14d554c85f69a206e3e3a9bdd86fb13 | [
"Apache-2.0"
] | 1 | 2020-09-10T09:05:52.000Z | 2020-09-10T09:06:22.000Z | python/paddle/fluid/tests/unittests/test_imperative_selected_rows_to_lod_tensor.py | wozna/Paddle | 0ecf441af14d554c85f69a206e3e3a9bdd86fb13 | [
"Apache-2.0"
] | 25 | 2019-12-07T02:14:14.000Z | 2021-12-30T06:16:30.000Z | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 41.811594 | 79 | 0.531947 |
794f5a0a760f60c895a4b9297568e03fe569dd19 | 7,258 | py | Python | chainer/testing/unary_math_function_test.py | mingxiaoh/chainer-v3 | 815ff00f5eaf7944d6e8a75662ff64a2fe046a4d | [
"BSD-3-Clause"
] | 7 | 2017-05-08T07:02:40.000Z | 2018-12-02T18:35:39.000Z | chainer/testing/unary_math_function_test.py | mingxiaoh/chainer-v3 | 815ff00f5eaf7944d6e8a75662ff64a2fe046a4d | [
"BSD-3-Clause"
] | null | null | null | chainer/testing/unary_math_function_test.py | mingxiaoh/chainer-v3 | 815ff00f5eaf7944d6e8a75662ff64a2fe046a4d | [
"BSD-3-Clause"
] | null | null | null | import numpy
import unittest
import chainer
from chainer import cuda
from chainer.testing import attr
from chainer.testing import condition
def _make_data_default(shape, dtype):
x = numpy.random.uniform(-1, 1, shape).astype(dtype)
gy = numpy.random.uniform(-1, 1, shape).astype(dtype)
return x, gy
def u... | 37.412371 | 79 | 0.615734 |
794f5aa4efde48ff4a13bcdc55726a6be0c1fc61 | 330 | py | Python | torchcv/transforms/__init__.py | WynMew/torchcv | 4bcbfc9a26f7d44eaebb4375234e4f2954dde3fd | [
"MIT"
] | 74 | 2018-03-31T04:06:55.000Z | 2021-09-10T08:23:07.000Z | torchcv/transforms/__init__.py | WynMew/torchcv | 4bcbfc9a26f7d44eaebb4375234e4f2954dde3fd | [
"MIT"
] | 5 | 2018-04-01T06:13:17.000Z | 2019-04-15T12:34:11.000Z | torchcv/transforms/__init__.py | WynMew/torchcv | 4bcbfc9a26f7d44eaebb4375234e4f2954dde3fd | [
"MIT"
] | 15 | 2018-04-01T05:12:15.000Z | 2022-03-07T07:59:18.000Z | from torchcv.transforms.resize import resize
from torchcv.transforms.random_flip import random_flip
from torchcv.transforms.random_crop import random_crop
from torchcv.transforms.random_paste import random_paste
from torchcv.transforms.scale_jitter import scale_jitter
from torchcv.transforms.random_distort import rando... | 47.142857 | 60 | 0.890909 |
794f5d83e2aab4be98d3145b7d9e21ab87018fe4 | 2,372 | py | Python | ironic_python_agent/cmd/agent.py | steveb/ironic-python-agent | 85b3afd863aec09940b44da9ed89d7cfcbf66e82 | [
"Apache-2.0"
] | 1 | 2021-02-27T02:48:50.000Z | 2021-02-27T02:48:50.000Z | ironic_python_agent/cmd/agent.py | steveb/ironic-python-agent | 85b3afd863aec09940b44da9ed89d7cfcbf66e82 | [
"Apache-2.0"
] | null | null | null | ironic_python_agent/cmd/agent.py | steveb/ironic-python-agent | 85b3afd863aec09940b44da9ed89d7cfcbf66e82 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Rackspace, 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... | 37.0625 | 78 | 0.642074 |
794f600b6f765840dbb8222dd28f4d1a21d729d4 | 7,684 | py | Python | game.py | lestatzzz/Gomoku-python | 3871d38489fc297ca5d37de18d21d553b8f38897 | [
"MIT"
] | null | null | null | game.py | lestatzzz/Gomoku-python | 3871d38489fc297ca5d37de18d21d553b8f38897 | [
"MIT"
] | null | null | null | game.py | lestatzzz/Gomoku-python | 3871d38489fc297ca5d37de18d21d553b8f38897 | [
"MIT"
] | null | null | null | import os
import time
AI_USE_CPP = False
if not AI_USE_CPP: # 是否用C++版的AI脚本
from ai import AI1Step
else:
import example
class Gomoku:
def __init__(self):
self.g_map = [[0 for y in range(15)] for x in range(15)] # 当前的棋盘
self.cur_step = 0 # 步数
self.max_search_steps = 3 # 最远搜索2回... | 38.039604 | 177 | 0.440916 |
794f62257315f49527ad6d33136d9da247ce1237 | 2,744 | py | Python | medical_data_visualizer.py | jmacdonald2010/medical-data-visualizer-FFCDAP | d985f5f597d096e6b315d85f100d08b06ee235ff | [
"MIT"
] | null | null | null | medical_data_visualizer.py | jmacdonald2010/medical-data-visualizer-FFCDAP | d985f5f597d096e6b315d85f100d08b06ee235ff | [
"MIT"
] | null | null | null | medical_data_visualizer.py | jmacdonald2010/medical-data-visualizer-FFCDAP | d985f5f597d096e6b315d85f100d08b06ee235ff | [
"MIT"
] | null | null | null | import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import numpy as np
# Import data
df = pd.read_csv('medical_examination.csv')
# Add 'overweight' column
df['overweight'] = df.apply(lambda x: 1 if (x.weight / (np.square(x.height / 100))) > 25 else 0, axis=1)
# Normalize data by making 0 always... | 33.060241 | 170 | 0.655612 |
794f625feae1cef4cb125b21e8290b35fd27d5f0 | 474 | py | Python | LinearCongruentialGenerator.py | Xzya/CodeAbbeySolutions | 0a37eb246c24c1d74a6ff6c2ccf525444c5e787a | [
"MIT"
] | 2 | 2021-07-25T13:41:48.000Z | 2022-03-02T21:07:39.000Z | LinearCongruentialGenerator.py | Xzya/CodeAbbeySolutions | 0a37eb246c24c1d74a6ff6c2ccf525444c5e787a | [
"MIT"
] | null | null | null | LinearCongruentialGenerator.py | Xzya/CodeAbbeySolutions | 0a37eb246c24c1d74a6ff6c2ccf525444c5e787a | [
"MIT"
] | 5 | 2015-10-29T16:11:43.000Z | 2022-03-13T12:50:32.000Z | #input
# 13
# 1261 169 10 6 8
# 131 63712 69 22 11
# 1803 8 3338 2682 23
# 167 3 76 22 19
# 163 411240 55099 35664 13
# 901 9 5 1 22
# 89 9912 40838 35944 21
# 25 4 39548 3869 6
# 197 9620 2323 998 5
# 1079 9 247168 165345 9
# 563 34 15988 2408 23
# 67 98 3914 594 22
# 155 88032 224866 1635 17
lines = int(input())
fo... | 18.96 | 54 | 0.601266 |
794f62e60a4b3a5db18eaea8c2a48c6247a9dab5 | 982 | py | Python | var/spack/repos/builtin/packages/py-qtpy/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-10T13:47:48.000Z | 2019-04-17T13:05:17.000Z | var/spack/repos/builtin/packages/py-qtpy/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 17 | 2019-03-21T15:54:00.000Z | 2022-03-29T19:34:28.000Z | var/spack/repos/builtin/packages/py-qtpy/package.py | kkauder/spack | 6ae8d5c380c1f42094b05d38be26b03650aafb39 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2021-04-07T18:27:09.000Z | 2022-03-31T22:52:38.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyQtpy(PythonPackage):
"""QtPy: Abtraction layer for PyQt5/PyQt4/PySide/PySide2"""
ho... | 33.862069 | 95 | 0.696538 |
794f62ff63e6d26ed970bec168f4c34d6f8495ea | 2,592 | py | Python | qqbot/core/util/logging.py | SuperKuroko/botpy | 8e9a69ebe4d52a9a84b25047595925525495f402 | [
"MIT"
] | 1 | 2022-03-30T13:04:32.000Z | 2022-03-30T13:04:32.000Z | qqbot/core/util/logging.py | SuperKuroko/botpy | 8e9a69ebe4d52a9a84b25047595925525495f402 | [
"MIT"
] | null | null | null | qqbot/core/util/logging.py | SuperKuroko/botpy | 8e9a69ebe4d52a9a84b25047595925525495f402 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
import os
import platform
from logging import FileHandler
from logging.handlers import TimedRotatingFileHandler
LOG_COLORS_CONFIG = {
"DEBUG": "cyan",
"INFO": "green",
"WARNING": "yellow",
"ERROR": "red",
"CRITICAL": "red",
}
def _getLevel():
level = lo... | 29.454545 | 116 | 0.567515 |
794f633966582982660eae0dc6068cbd6c3e6336 | 3,840 | py | Python | similarity/preprocessing.py | jtraviesor/alfred-tf-trainer | 9747d24bef418415a31abfe0c9982d2f1d9d8298 | [
"MIT"
] | 3 | 2017-11-18T11:41:46.000Z | 2020-02-13T19:22:28.000Z | similarity/preprocessing.py | jtraviesor/alfred-tf-trainer | 9747d24bef418415a31abfe0c9982d2f1d9d8298 | [
"MIT"
] | 4 | 2017-09-01T05:28:49.000Z | 2017-11-20T05:27:49.000Z | similarity/preprocessing.py | jtraviesor/alfred-tf-trainer | 9747d24bef418415a31abfe0c9982d2f1d9d8298 | [
"MIT"
] | 1 | 2018-06-08T03:55:32.000Z | 2018-06-08T03:55:32.000Z | from tensorflow.python.platform import gfile
from tensorflow.contrib.learn.python.learn.preprocessing.text import CategoricalVocabulary
import re
import numpy as np
try:
import cPickle as pickle
except ImportError:
import pickle
TOKENIZER_RE = re.compile(r"[A-Z]{2,}(?![a-z])|[A-Z][a-z]+(?=[A-Z])|[\'\w\-]+",
... | 31.219512 | 90 | 0.678385 |
794f63f25f3c37d975513fb60aa53d4ac1cebc54 | 3,929 | py | Python | ask-sdk-model/ask_sdk_model/interfaces/conversations/api_request.py | Signal-Kinetics/alexa-apis-for-python | abb8d3dce18a5510c48b215406ed36c024f01495 | [
"Apache-2.0"
] | null | null | null | ask-sdk-model/ask_sdk_model/interfaces/conversations/api_request.py | Signal-Kinetics/alexa-apis-for-python | abb8d3dce18a5510c48b215406ed36c024f01495 | [
"Apache-2.0"
] | null | null | null | ask-sdk-model/ask_sdk_model/interfaces/conversations/api_request.py | Signal-Kinetics/alexa-apis-for-python | abb8d3dce18a5510c48b215406ed36c024f01495 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "lice... | 31.685484 | 100 | 0.587681 |
794f63fbafc7d945ebe5e640513dfbf5ed6b9c05 | 9,512 | py | Python | qpth/qp.py | zhangdongkun98/qpth | 255dd55596685f2eff3db584bb44c4dfdbba1f28 | [
"Apache-2.0"
] | 553 | 2017-03-02T06:31:14.000Z | 2022-03-10T06:58:36.000Z | qpth/qp.py | zhangdongkun98/qpth | 255dd55596685f2eff3db584bb44c4dfdbba1f28 | [
"Apache-2.0"
] | 43 | 2017-03-03T00:38:08.000Z | 2022-01-30T11:44:17.000Z | qpth/qp.py | zhangdongkun98/qpth | 255dd55596685f2eff3db584bb44c4dfdbba1f28 | [
"Apache-2.0"
] | 87 | 2017-03-02T11:24:34.000Z | 2022-03-11T11:28:35.000Z | import torch
from torch.autograd import Function
from .util import bger, expandParam, extract_nBatch
from . import solvers
from .solvers.pdipm import batch as pdipm_b
from .solvers.pdipm import spbatch as pdipm_spb
# from .solvers.pdipm import single as pdipm_s
from enum import Enum
class QPSolvers(Enum):
PDIPM... | 37.596838 | 84 | 0.512721 |
794f6435b4f8d18b1f13b0c83a85c68696eccaa1 | 1,009 | py | Python | azure/mgmt/network/v2015_06_15/models/application_gateway_paged.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/network/v2015_06_15/models/application_gateway_paged.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/network/v2015_06_15/models/application_gateway_paged.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"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.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# C... | 36.035714 | 146 | 0.5778 |
794f64ec9967e891aa907fe16dcab26b13146243 | 1,479 | py | Python | airflow/migrations/versions/b247b1e3d1ed_add_queued_by_job_id_to_ti.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 15,947 | 2019-01-05T13:51:02.000Z | 2022-03-31T23:33:16.000Z | airflow/migrations/versions/b247b1e3d1ed_add_queued_by_job_id_to_ti.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 14,603 | 2019-01-05T09:43:19.000Z | 2022-03-31T23:11:59.000Z | airflow/migrations/versions/b247b1e3d1ed_add_queued_by_job_id_to_ti.py | ChaseKnowlden/airflow | 6b71eac1997a7c0db3b8e3aed6b4e65d01871440 | [
"Apache-2.0"
] | 8,429 | 2019-01-05T19:45:47.000Z | 2022-03-31T22:13:01.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... | 31.468085 | 87 | 0.749831 |
794f6538fed2d639a29939eead7d574094d94555 | 1,483 | py | Python | google/ads/googleads/v9/errors/types/resource_count_limit_exceeded_error.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v9/errors/types/resource_count_limit_exceeded_error.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v9/errors/types/resource_count_limit_exceeded_error.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 29.66 | 74 | 0.703304 |
794f6546113983a17df4517da4bfb5c024bbd621 | 14,050 | py | Python | homeassistant/util/color.py | mdonoughe/home-assistant | d9805160bc787146bff0c434fdcab995716f0f8c | [
"Apache-2.0"
] | 2 | 2020-02-20T18:47:55.000Z | 2021-11-09T11:33:28.000Z | homeassistant/util/color.py | mdonoughe/home-assistant | d9805160bc787146bff0c434fdcab995716f0f8c | [
"Apache-2.0"
] | 1 | 2021-02-08T20:56:06.000Z | 2021-02-08T20:56:06.000Z | homeassistant/util/color.py | diophung/home-assistant | a5aa1118937702ca8bec050614ee52dc14f8466b | [
"Apache-2.0"
] | 1 | 2020-11-21T09:37:47.000Z | 2020-11-21T09:37:47.000Z | """Color util methods."""
import logging
import math
import colorsys
from typing import Tuple
_LOGGER = logging.getLogger(__name__)
# Official CSS3 colors from w3.org:
# https://www.w3.org/TR/2010/PR-css3-color-20101028/#html4
# names do not have spaces in them so that we can compare against
# requests more easily (... | 31.715576 | 79 | 0.575943 |
794f66f98437dbdef2a2e1b9f1ffa5042390d1c4 | 490 | py | Python | pyro/contrib/bnn/utils.py | futurewarning/pyro | 005032f10099188fea86f63b6baa46a27867983f | [
"Apache-2.0"
] | 4,959 | 2017-11-03T14:39:17.000Z | 2019-02-04T16:14:30.000Z | pyro/contrib/bnn/utils.py | futurewarning/pyro | 005032f10099188fea86f63b6baa46a27867983f | [
"Apache-2.0"
] | 985 | 2017-11-03T14:27:56.000Z | 2019-02-02T18:52:54.000Z | pyro/contrib/bnn/utils.py | futurewarning/pyro | 005032f10099188fea86f63b6baa46a27867983f | [
"Apache-2.0"
] | 564 | 2017-11-03T15:05:55.000Z | 2019-01-31T14:02:29.000Z | # Copyright (c) 2017-2019 Uber Technologies, Inc.
# SPDX-License-Identifier: Apache-2.0
import math
import torch
def xavier_uniform(D_in, D_out):
scale = math.sqrt(6.0 / float(D_in + D_out))
noise = torch.rand(D_in, D_out)
return 2.0 * scale * noise - scale
def adjoin_ones_vector(x):
return torch.... | 23.333333 | 78 | 0.657143 |
794f677087ca003f851b8efbc538e42b502f7601 | 2,767 | py | Python | src/enamlnative/widgets/web_view.py | codelv/enaml-native | 04c3a015bcd649f374c5ecd98fcddba5e4fbdbdc | [
"MIT"
] | 237 | 2017-09-15T19:31:45.000Z | 2022-03-17T04:22:20.000Z | src/enamlnative/widgets/web_view.py | codelv/enaml-native | 04c3a015bcd649f374c5ecd98fcddba5e4fbdbdc | [
"MIT"
] | 74 | 2017-09-06T20:16:41.000Z | 2022-03-05T13:34:35.000Z | src/enamlnative/widgets/web_view.py | codelv/enaml-native | 04c3a015bcd649f374c5ecd98fcddba5e4fbdbdc | [
"MIT"
] | 22 | 2017-09-15T19:32:11.000Z | 2022-03-17T18:33:39.000Z | """
Copyright (c) 2017, Jairus Martin.
Distributed under the terms of the MIT License.
The full license is in the file LICENSE, distributed with this software.
Created on May 20, 2017
@author: jrm
"""
from atom.api import (
Typed, ForwardTyped, Unicode, Int, Event, Bool, observe, set_default
)
from enaml.core.... | 23.853448 | 79 | 0.597037 |
794f6957d4cfbd4736cc14dc8600aa278833bbde | 38,488 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/operations/_disks_operations.py | dubiety/azure-sdk-for-python | 62ffa839f5d753594cf0fe63668f454a9d87a346 | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/operations/_disks_operations.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_09_30/aio/operations/_disks_operations.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRe... | 45.067916 | 292 | 0.65384 |
794f6a07caed6eaa8277a08a7191e640b8efc7e8 | 11,770 | py | Python | teamcat_service/docker_build/target/one_step_build/teamcat/model_managers/ci_model_manager.py | zhangyin2088/Teamcat | be9be8d7c1e58c8d2d22ab78d25783d9aee4de71 | [
"Apache-2.0"
] | 6 | 2018-11-26T08:42:52.000Z | 2020-06-01T08:33:48.000Z | teamcat_service/docker_build/target/one_step_build/teamcat/model_managers/ci_model_manager.py | zhangyin2088/Teamcat | be9be8d7c1e58c8d2d22ab78d25783d9aee4de71 | [
"Apache-2.0"
] | null | null | null | teamcat_service/docker_build/target/one_step_build/teamcat/model_managers/ci_model_manager.py | zhangyin2088/Teamcat | be9be8d7c1e58c8d2d22ab78d25783d9aee4de71 | [
"Apache-2.0"
] | 1 | 2019-01-22T06:45:36.000Z | 2019-01-22T06:45:36.000Z | # coding=utf-8
'''
Created on 2015-10-22
@author: zhangtiande
'''
from gatesidelib.common.simplelogger import SimpleLogger
from model_managers.model_manager import ModelManager
from gatesidelib.mongodb_helper import MongodbHelper
from doraemon.settings import MONGODB
class CIPluginManager(ModelManager):
'''
... | 27.564403 | 115 | 0.63322 |
794f6a608f5a188274ed5445cad3de3af4ab9d5d | 1,081 | py | Python | src/preprocessing/component.py | AmeyKamat/MEERA | 30635b68995a9ce17024a76eb1b23cc1c300404f | [
"MIT"
] | 20 | 2019-01-30T17:03:50.000Z | 2021-07-06T06:09:29.000Z | src/preprocessing/component.py | arpit006/MEERA | 30635b68995a9ce17024a76eb1b23cc1c300404f | [
"MIT"
] | 22 | 2019-03-13T04:52:07.000Z | 2020-07-17T07:25:44.000Z | src/preprocessing/component.py | arpit006/MEERA | 30635b68995a9ce17024a76eb1b23cc1c300404f | [
"MIT"
] | 1 | 2020-07-18T18:52:39.000Z | 2020-07-18T18:52:39.000Z | import sys
from circuits import Component, handler
from events import EntitiesPreprocessedEvent
from preprocessing.location import LocationPreprocessor
from preprocessing.date import DatePreprocessor
class PreprocessingComponent(Component):
prepocessors = {
"location": LocationPreprocessor(),
"s... | 32.757576 | 66 | 0.666975 |
794f6ad69945b287dadeb965ee6ae8278a2a8feb | 522 | py | Python | 500. Keyboard Row/main.py | Competitive-Programmers-Community/LeetCode | 841fdee805b1a626e9f1cd0e12398d25054638af | [
"MIT"
] | 2 | 2019-10-05T09:48:20.000Z | 2019-10-05T15:40:01.000Z | 500. Keyboard Row/main.py | Competitive-Programmers-Community/LeetCode | 841fdee805b1a626e9f1cd0e12398d25054638af | [
"MIT"
] | null | null | null | 500. Keyboard Row/main.py | Competitive-Programmers-Community/LeetCode | 841fdee805b1a626e9f1cd0e12398d25054638af | [
"MIT"
] | 3 | 2020-09-27T05:48:30.000Z | 2021-08-13T10:07:08.000Z | class Solution:
def findWords(self, words):
"""
:type words: List[str]
:rtype: List[str]
"""
row1="qwertyuiop"
row2="asdfghjkl"
row3="zxcvbnm"
res=[]
for word in words:
if set(word.lower()).issubset(set(... | 24.857143 | 135 | 0.43295 |
794f6d5013c29aee3e8b6cdecb7a32806653e287 | 2,464 | py | Python | pitop/robotics/pan_tilt_controller.py | pi-top/pi-top-Python-SDK | 6c83cc5f612d77f86f8d391c7f2924a28f7b1232 | [
"Apache-2.0"
] | 28 | 2020-11-24T08:02:58.000Z | 2022-02-27T18:37:33.000Z | pitop/robotics/pan_tilt_controller.py | pi-top/pi-top-Python-SDK | 6c83cc5f612d77f86f8d391c7f2924a28f7b1232 | [
"Apache-2.0"
] | 263 | 2020-11-10T14:35:10.000Z | 2022-03-31T12:35:13.000Z | pitop/robotics/pan_tilt_controller.py | pi-top/pi-top-Python-SDK | 6c83cc5f612d77f86f8d391c7f2924a28f7b1232 | [
"Apache-2.0"
] | 1 | 2022-01-31T22:48:35.000Z | 2022-01-31T22:48:35.000Z | from pitop.core.mixins import Recreatable, Stateful
from pitop.pma import ServoMotor
from pitop.robotics.two_servo_assembly_calibrator import TwoServoAssemblyCalibrator
from .pan_tilt_object_tracker import PanTiltObjectTracker
class PanTiltController(Stateful, Recreatable):
CALIBRATION_FILE_NAME = "pan_tilt.conf... | 36.776119 | 137 | 0.663149 |
794f6d9ee8de41e41610b5af1f4a8a655b8bcbd1 | 105 | py | Python | tests/settings_alphanumeric.py | pavanv/django-tastypie | b4ffc642aa56d25d3c577ccae0a03c820b71c4bc | [
"BSD-3-Clause"
] | 1,570 | 2015-02-03T10:19:33.000Z | 2022-03-29T10:34:18.000Z | tests/settings_alphanumeric.py | pavanv/django-tastypie | b4ffc642aa56d25d3c577ccae0a03c820b71c4bc | [
"BSD-3-Clause"
] | 587 | 2015-02-06T13:59:23.000Z | 2022-03-09T22:56:30.000Z | tests/settings_alphanumeric.py | pavanv/django-tastypie | b4ffc642aa56d25d3c577ccae0a03c820b71c4bc | [
"BSD-3-Clause"
] | 492 | 2015-02-07T06:18:36.000Z | 2022-03-29T19:06:44.000Z | from settings import * # noqa
INSTALLED_APPS.append('alphanumeric')
ROOT_URLCONF = 'alphanumeric.urls'
| 21 | 37 | 0.780952 |
794f6de8a88fde80596f5459b402fde3c4ae2765 | 14,152 | py | Python | scripts/nowcommons.py | ZabeMath/pywikibot | 856a197c53efcb80b16475a8d203a4ecd79eee2f | [
"MIT"
] | 326 | 2017-11-21T07:04:19.000Z | 2022-03-26T01:25:44.000Z | scripts/nowcommons.py | ZabeMath/pywikibot | 856a197c53efcb80b16475a8d203a4ecd79eee2f | [
"MIT"
] | 17 | 2017-12-20T13:41:32.000Z | 2022-02-16T16:42:41.000Z | scripts/nowcommons.py | ZabeMath/pywikibot | 856a197c53efcb80b16475a8d203a4ecd79eee2f | [
"MIT"
] | 147 | 2017-11-22T19:13:40.000Z | 2022-03-29T04:47:07.000Z | #!/usr/bin/python
r"""
Script to delete files that are also present on Wikimedia Commons.
Do not run this script on Wikimedia Commons itself. It works based on
a given array of templates defined below.
Files are downloaded and compared. If the files match, it can be deleted on
the source wiki. If multiple versions of... | 35.557789 | 79 | 0.491874 |
794f6e085e0d2efdeeb7e3780d90ebf40eae3007 | 287 | py | Python | pandas/read_excel/read_excel.py | ybdesire/machinelearning | 0224746332e1085336e0b02e0ca3b11d74bd9a91 | [
"MIT"
] | 30 | 2017-02-28T13:52:58.000Z | 2022-03-24T10:28:43.000Z | pandas/read_excel/read_excel.py | ybdesire/machinelearning | 0224746332e1085336e0b02e0ca3b11d74bd9a91 | [
"MIT"
] | null | null | null | pandas/read_excel/read_excel.py | ybdesire/machinelearning | 0224746332e1085336e0b02e0ca3b11d74bd9a91 | [
"MIT"
] | 17 | 2017-03-03T12:38:04.000Z | 2022-03-11T01:53:20.000Z | import pandas as pd
xl = pd.ExcelFile("test.xlsx")
print('sheet_names: {0}'.format(xl.sheet_names))
df = xl.parse("details")
for index, row in df.iterrows():
name = row['name']
age = row['age']
country = row['country']
print('{0},{1}'.format(country, name))
| 23.916667 | 49 | 0.602787 |
794f6e40c816e49068e37754a9f08e64174c7dc9 | 4,470 | py | Python | proxypool/storages/redis.py | lixinjiang/ProxyPool | b39461f11ce0bdb81b0898fb7ce10075b4526d1f | [
"MIT"
] | 5 | 2020-06-18T02:17:41.000Z | 2021-07-19T01:52:41.000Z | proxypool/storages/redis.py | lixinjiang/ProxyPool | b39461f11ce0bdb81b0898fb7ce10075b4526d1f | [
"MIT"
] | 2 | 2021-03-31T19:54:55.000Z | 2021-12-13T20:42:21.000Z | proxypool/storages/redis.py | lixinjiang/ProxyPool | b39461f11ce0bdb81b0898fb7ce10075b4526d1f | [
"MIT"
] | 2 | 2020-10-30T03:25:23.000Z | 2020-11-10T07:18:05.000Z | import redis
from proxypool.exceptions import PoolEmptyException
from proxypool.schemas.proxy import Proxy
from proxypool.setting import REDIS_HOST, REDIS_PORT, REDIS_PASSWORD, REDIS_KEY, PROXY_SCORE_MAX, PROXY_SCORE_MIN, \
PROXY_SCORE_INIT
from random import choice
from typing import List
from loguru import logger... | 34.651163 | 116 | 0.616779 |
794f6e4f45c23592c7919c7e04e2727ddd8f0ac7 | 2,021 | py | Python | elfi/methods/model_selection.py | diadochos/elfi | f2932297d686403950f7f55a290cd25af10dbda6 | [
"BSD-3-Clause"
] | 166 | 2017-03-05T17:10:38.000Z | 2022-03-31T21:25:04.000Z | elfi/methods/model_selection.py | diadochos/elfi | f2932297d686403950f7f55a290cd25af10dbda6 | [
"BSD-3-Clause"
] | 78 | 2017-04-05T11:46:23.000Z | 2022-03-28T13:11:44.000Z | elfi/methods/model_selection.py | diadochos/elfi | f2932297d686403950f7f55a290cd25af10dbda6 | [
"BSD-3-Clause"
] | 56 | 2017-03-19T17:51:57.000Z | 2022-03-16T13:17:52.000Z | """This module contains methods for model comparison and selection."""
import numpy as np
def compare_models(sample_objs, model_priors=None):
"""Find posterior probabilities for different models.
The algorithm requires elfi.Sample objects from prerun inference methods. For example the
output from elfi.R... | 33.683333 | 96 | 0.696685 |
794f6f01f6cbd549e9fb5becaeb56b65065e8aca | 35 | py | Python | jss28_bayesian/__init__.py | JessikaSmith/jss28_bayesian | 8574afd0c470238cb6eb37f41ecb0810fd25900d | [
"MIT"
] | null | null | null | jss28_bayesian/__init__.py | JessikaSmith/jss28_bayesian | 8574afd0c470238cb6eb37f41ecb0810fd25900d | [
"MIT"
] | null | null | null | jss28_bayesian/__init__.py | JessikaSmith/jss28_bayesian | 8574afd0c470238cb6eb37f41ecb0810fd25900d | [
"MIT"
] | null | null | null | __author__ = 'Maria Khodorchenko'
| 11.666667 | 33 | 0.771429 |
794f6ff8385738738276f497206cde3ca049343f | 2,601 | py | Python | tests/flytekit/common/workflows/python.py | flytehub/flytekit | f8f53567594069b29fcd3f99abd1da71a5ef0e22 | [
"Apache-2.0"
] | 1 | 2019-10-22T05:22:16.000Z | 2019-10-22T05:22:16.000Z | tests/flytekit/common/workflows/python.py | chixcode/flytekit | f901aee721847c6264d44079d4fa31a75b8876e1 | [
"Apache-2.0"
] | null | null | null | tests/flytekit/common/workflows/python.py | chixcode/flytekit | f901aee721847c6264d44079d4fa31a75b8876e1 | [
"Apache-2.0"
] | 1 | 2019-08-28T22:27:07.000Z | 2019-08-28T22:27:07.000Z | from __future__ import absolute_import, division, print_function
from flytekit.sdk.tasks import python_task, inputs, outputs
from flytekit.sdk.types import Types
from flytekit.sdk.workflow import workflow_class, Input
@inputs(value_to_print=Types.Integer)
@outputs(out=Types.Integer)
@python_task(cache_version='1')
d... | 37.695652 | 104 | 0.750096 |
794f7080617ec15885663935832c5c7f8aadd875 | 2,193 | py | Python | pre_commit_hooks/debug_statement_hook.py | christhekeele/pre-commit-hooks | 2f7e22dc211ddec22670778553b91850a4ba8c1f | [
"MIT"
] | 3 | 2021-08-23T04:25:59.000Z | 2022-01-24T08:37:46.000Z | pre_commit_hooks/debug_statement_hook.py | christhekeele/pre-commit-hooks | 2f7e22dc211ddec22670778553b91850a4ba8c1f | [
"MIT"
] | null | null | null | pre_commit_hooks/debug_statement_hook.py | christhekeele/pre-commit-hooks | 2f7e22dc211ddec22670778553b91850a4ba8c1f | [
"MIT"
] | 4 | 2021-06-03T09:56:50.000Z | 2022-03-17T09:48:29.000Z | import argparse
import ast
import traceback
from typing import List
from typing import NamedTuple
from typing import Optional
from typing import Sequence
DEBUG_STATEMENTS = {
'ipdb',
'pdb',
'pudb',
'pydevd_pycharm',
'q',
'rdb',
'rpdb',
'wdb',
}
class Debug(NamedTuple):
line: int
... | 25.8 | 79 | 0.619699 |
794f7086d05f39de6a372febd4011422f9203511 | 22,732 | py | Python | examples/seismic/tti/operators.py | rwalkerlewis/devito | 262364e5f2855ad01a281d517d400704b7667420 | [
"MIT"
] | null | null | null | examples/seismic/tti/operators.py | rwalkerlewis/devito | 262364e5f2855ad01a281d517d400704b7667420 | [
"MIT"
] | null | null | null | examples/seismic/tti/operators.py | rwalkerlewis/devito | 262364e5f2855ad01a281d517d400704b7667420 | [
"MIT"
] | null | null | null | from sympy import cos, sin
from devito import Eq, Operator, TimeFunction
from examples.seismic import PointSource, Receiver
from devito.finite_differences import centered, first_derivative, right, transpose
def second_order_stencil(model, u, v, H0, Hz):
"""
Creates the stencil corresponding to the second ord... | 41.786765 | 88 | 0.606766 |
794f70bac321604a36c97e4b1909026ae9ff0306 | 2,966 | py | Python | tests/TestDotRenderer.py | DaveTCode/tradingsim | 4e7fe5389d9af9a0a34ca23b9e42e7e366a71966 | [
"MIT"
] | null | null | null | tests/TestDotRenderer.py | DaveTCode/tradingsim | 4e7fe5389d9af9a0a34ca23b9e42e7e366a71966 | [
"MIT"
] | null | null | null | tests/TestDotRenderer.py | DaveTCode/tradingsim | 4e7fe5389d9af9a0a34ca23b9e42e7e366a71966 | [
"MIT"
] | null | null | null | import pygame
import unittest
from tradingsim.renderers.dotrenderer import DotRenderer
class DotRendererTests(unittest.TestCase):
def setUp(self):
"""
Renderer uses font objects so need to set this up.
"""
pygame.init()
pygame.font.init()
def test_agent_to_window... | 41.194444 | 79 | 0.686784 |
794f714fc23d533712b4baa6dc27c03d9b9ed2d5 | 5,137 | py | Python | env/lib/python3.5/site-packages/importlib_metadata/tests/test_api.py | ekwoodrich/dvr-ip-client | 429fb07a2b06cc505fdd9350148266a6b4e23e64 | [
"MIT"
] | 33 | 2019-08-04T01:48:11.000Z | 2022-03-20T13:53:42.000Z | env/lib/python3.5/site-packages/importlib_metadata/tests/test_api.py | ekwoodrich/python-dvrip | 429fb07a2b06cc505fdd9350148266a6b4e23e64 | [
"MIT"
] | 8 | 2020-06-05T21:36:23.000Z | 2022-02-12T12:24:00.000Z | flask/lib/python3.6/site-packages/importlib_metadata/tests/test_api.py | JOFLIX/grapevines | 34576e01184570d79cc140b42ffb71d322132da6 | [
"MIT",
"Unlicense"
] | 12 | 2019-08-12T07:59:38.000Z | 2022-03-24T08:09:40.000Z | import re
import textwrap
import unittest
import itertools
from . import fixtures
from .. import (
Distribution, PackageNotFoundError, __version__, distribution,
entry_points, files, metadata, requires, version,
)
try:
from collections.abc import Iterator
except ImportError:
from collections impor... | 30.760479 | 75 | 0.606774 |
794f7165169c3eb45394cd6ad4a486b54173f1ad | 746 | py | Python | facebook_client.py | mjalkio/parallel-python-tutorial | 86e77cb6b1e0e21aa2b09270c249e232761f78e5 | [
"MIT"
] | null | null | null | facebook_client.py | mjalkio/parallel-python-tutorial | 86e77cb6b1e0e21aa2b09270c249e232761f78e5 | [
"MIT"
] | null | null | null | facebook_client.py | mjalkio/parallel-python-tutorial | 86e77cb6b1e0e21aa2b09270c249e232761f78e5 | [
"MIT"
] | null | null | null | """Super thin wrapper of Facebook API."""
import facebook
class FacebookClient:
"""Simple class to get basic information on Facebook Pages."""
def __init__(self, access_token):
"""Initialize GraphAPI object."""
self.graph = facebook.GraphAPI(access_token=access_token,
... | 33.909091 | 68 | 0.634048 |
794f717cf1765059b308678699d61edb7eba2692 | 2,194 | py | Python | larousse_api/larousse.py | Hugo291/larousse_api | ceda426c31ddeda02e7b539be1c23b540d149f25 | [
"MIT"
] | 8 | 2020-08-05T08:00:57.000Z | 2021-11-21T20:00:05.000Z | larousse_api/larousse.py | Hugo291/larousse_api | ceda426c31ddeda02e7b539be1c23b540d149f25 | [
"MIT"
] | 10 | 2021-01-27T04:51:52.000Z | 2021-07-14T04:53:47.000Z | larousse_api/larousse.py | Hugo291/larousse_api | ceda426c31ddeda02e7b539be1c23b540d149f25 | [
"MIT"
] | null | null | null | import requests
import re
import unicodedata
from bs4 import BeautifulSoup
class Larousse:
def __init__(self, word):
self.word = word
self.soup = self.__get_content()
def get_definitions(self):
"""
:return: A list containing all definitions of word
"""
for ul... | 35.387097 | 93 | 0.542388 |
794f71d95c3909734ba3a9489824fffb4d144bd4 | 52,715 | py | Python | test/functional/test_framework/messages.py | MrCryptoBeast/WWW | 857e860df0aa1bc7fde2ee6f5918ff32933beeb3 | [
"MIT"
] | null | null | null | test/functional/test_framework/messages.py | MrCryptoBeast/WWW | 857e860df0aa1bc7fde2ee6f5918ff32933beeb3 | [
"MIT"
] | null | null | null | test/functional/test_framework/messages.py | MrCryptoBeast/WWW | 857e860df0aa1bc7fde2ee6f5918ff32933beeb3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2020 The worldwideweb Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""worldwi... | 29.012108 | 262 | 0.606393 |
794f72033515bda9a872b501a2d26543281fba5e | 20,968 | py | Python | app/grandchallenge/components/backends/amazon_ecs.py | kaczmarj/grand-challenge.org | 8dc8a2170e51072354f7e94f2a22578805a67b94 | [
"Apache-2.0"
] | null | null | null | app/grandchallenge/components/backends/amazon_ecs.py | kaczmarj/grand-challenge.org | 8dc8a2170e51072354f7e94f2a22578805a67b94 | [
"Apache-2.0"
] | null | null | null | app/grandchallenge/components/backends/amazon_ecs.py | kaczmarj/grand-challenge.org | 8dc8a2170e51072354f7e94f2a22578805a67b94 | [
"Apache-2.0"
] | null | null | null | import json
import logging
import shutil
from datetime import datetime, timezone
from enum import Enum
from json import JSONDecodeError
from pathlib import Path
from time import sleep
import boto3
from dateutil.parser import isoparse
from django.conf import settings
from django.core.exceptions import ValidationError
f... | 34.038961 | 86 | 0.571442 |
794f72365df299a5f1f73181a71ac52f05e426f2 | 39,685 | py | Python | tensorflow/python/data/experimental/kernel_tests/parse_example_dataset_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 56 | 2018-06-21T13:47:23.000Z | 2020-05-13T09:31:47.000Z | tensorflow/python/data/experimental/kernel_tests/parse_example_dataset_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 6 | 2022-01-15T07:17:47.000Z | 2022-02-14T15:28:22.000Z | tensorflow/python/data/experimental/kernel_tests/parse_example_dataset_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 15 | 2018-09-06T14:18:32.000Z | 2020-05-14T06:35:30.000Z | # 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... | 36.142987 | 86 | 0.54789 |
794f72ae7f02726ce125a5446a10239ebef117ff | 1,351 | py | Python | polyglot/__main__.py | AustEcon/polyglot | e3511db0c1bda8fcfce91b466fe55bdb8e3aebc1 | [
"MIT"
] | 21 | 2019-05-04T14:06:26.000Z | 2022-01-17T15:46:22.000Z | polyglot/__main__.py | AustEcon/polyglot | e3511db0c1bda8fcfce91b466fe55bdb8e3aebc1 | [
"MIT"
] | 16 | 2019-07-11T08:57:20.000Z | 2021-04-15T08:07:30.000Z | polyglot/__main__.py | AustEcon/polyglot | e3511db0c1bda8fcfce91b466fe55bdb8e3aebc1 | [
"MIT"
] | 4 | 2019-06-16T14:27:30.000Z | 2020-03-02T02:40:59.000Z | #!/usr/bin/env python3
import argparse
import getpass
import sys
import bitsv
import polyglot
def set_network(args):
if args.testnet:
network = 'test'
elif args.scalingtestnet:
network = 'stn'
else:
network = 'main'
return network
def get_wif_securely():
wif = ""
whi... | 27.571429 | 95 | 0.640266 |
794f730e9e21e68e8b372be61db423b436c97e6c | 1,666 | py | Python | quartz/cli.py | vladcalin/eventer | f0b62a969714ea09c50191f770265a4a7d1a7bec | [
"MIT"
] | 3 | 2017-05-29T18:55:35.000Z | 2019-08-31T04:45:36.000Z | quartz/cli.py | vladcalin/eventer | f0b62a969714ea09c50191f770265a4a7d1a7bec | [
"MIT"
] | 1 | 2017-05-29T18:59:47.000Z | 2017-05-30T05:59:35.000Z | quartz/cli.py | vladcalin/eventer | f0b62a969714ea09c50191f770265a4a7d1a7bec | [
"MIT"
] | 4 | 2017-03-19T13:49:46.000Z | 2020-07-14T08:58:20.000Z | import json
import sys
import os.path
import click
from quartz.service import QuartzService
from quartz.models import set_db_parameters
from quartz import __version__
BANNER = """
_
__ _ _ _ __ _ _ __| |_ ____
/ _` | | | |/ _` | '__| __|_ /
| (_| | |_| ... | 25.242424 | 102 | 0.615846 |
794f75a843b84d9747bc675f38c5af061962112f | 1,245 | py | Python | src/model/logreg.py | nutcrtnk/PGRA | 4991f591ff7593a9149cc10a484682a834230979 | [
"MIT"
] | 3 | 2021-11-30T08:16:03.000Z | 2022-03-06T07:30:58.000Z | src/model/logreg.py | nutcrtnk/PGRA | 4991f591ff7593a9149cc10a484682a834230979 | [
"MIT"
] | null | null | null | src/model/logreg.py | nutcrtnk/PGRA | 4991f591ff7593a9149cc10a484682a834230979 | [
"MIT"
] | null | null | null | import os
import torch
import torch.nn as nn
import torch.nn.functional as F
if not os.environ.get("RAND", False):
torch.manual_seed(0)
torch.cuda.manual_seed_all(0)
torch.backends.cudnn.deterministic = True
torch.backends.cudnn.benchmark = False
else:
print('random seed')
class LogReg(nn.Module):... | 30.365854 | 70 | 0.585542 |
794f76467ffbfb486500d47e5fd77706baa04454 | 4,364 | py | Python | src/Python/Unittests/test_trimesh_circulator_halfedge_loop.py | rzoller/OpenMesh | f84bca0b26c61eab5f9335b2191962ca8545c5f6 | [
"BSD-3-Clause"
] | 19 | 2020-08-13T05:15:09.000Z | 2022-03-31T14:51:29.000Z | src/Python/Unittests/test_trimesh_circulator_halfedge_loop.py | ccopsey/OpenMesh | 93e6e626c3f282bf4275521c33cd8da1ca559c7d | [
"BSD-3-Clause"
] | 2 | 2020-09-08T07:03:04.000Z | 2021-08-04T05:43:27.000Z | src/Python/Unittests/test_trimesh_circulator_halfedge_loop.py | ccopsey/OpenMesh | 93e6e626c3f282bf4275521c33cd8da1ca559c7d | [
"BSD-3-Clause"
] | 10 | 2020-08-06T02:37:46.000Z | 2021-07-01T09:12:06.000Z | import unittest
import openmesh
class TrimeshCirculatorHalfedgeLoop(unittest.TestCase):
def setUp(self):
self.mesh = openmesh.TriMesh()
self.vhandle = []
def test_halfedge_loop_with_face(self):
# Add some vertices
self.vhandle.append(self.mesh.add_vertex(openmesh.Vec3d(0, ... | 33.060606 | 86 | 0.562786 |
794f7723978fed23c3a7212f122001b560aa8ae2 | 9,247 | py | Python | docs/conf.py | nestauk/gtr | 5a7fe88c8429fa78199fb2da42123a7079a5f8ab | [
"Apache-2.0"
] | 6 | 2016-06-08T11:41:45.000Z | 2018-09-12T09:54:08.000Z | docs/conf.py | nestauk/gtr | 5a7fe88c8429fa78199fb2da42123a7079a5f8ab | [
"Apache-2.0"
] | 2 | 2018-02-14T19:34:57.000Z | 2018-02-14T19:46:02.000Z | docs/conf.py | nestauk/gtr | 5a7fe88c8429fa78199fb2da42123a7079a5f8ab | [
"Apache-2.0"
] | 2 | 2017-11-07T15:38:39.000Z | 2018-02-14T19:10:36.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# gtr documentation build configuration file, created by
# sphinx-quickstart on Fri Feb 5 22:19:07 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autoge... | 31.886207 | 79 | 0.714069 |
794f77725dc21644ec0f4a67ea4967fba9d6bac5 | 8,445 | py | Python | src/dials/algorithms/scaling/scaling_options.py | PrinceWalnut/dials | 13bbd3be1e3869a58b4eb2aa2717a4fcf33278f2 | [
"BSD-3-Clause"
] | null | null | null | src/dials/algorithms/scaling/scaling_options.py | PrinceWalnut/dials | 13bbd3be1e3869a58b4eb2aa2717a4fcf33278f2 | [
"BSD-3-Clause"
] | null | null | null | src/dials/algorithms/scaling/scaling_options.py | PrinceWalnut/dials | 13bbd3be1e3869a58b4eb2aa2717a4fcf33278f2 | [
"BSD-3-Clause"
] | null | null | null | """
Phil scope of options for scaling.
"""
from __future__ import annotations
import iotbx.phil
phil_scope = iotbx.phil.parse(
"""
anomalous = False
.type = bool
.help = "Separate anomalous pairs in scaling and error model optimisation."
.expert_level=0
overwrite_existing_models = False
.type... | 40.023697 | 84 | 0.62984 |
794f77bb8a46a3cd97ed1b4fa50c2ae5248034c0 | 968 | py | Python | ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/OOZIE/package/scripts/status_params.py | zyclove/ambari | 1032f0f54cb7b312b9a3b37570cd840f4e1e89d4 | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/OOZIE/package/scripts/status_params.py | zyclove/ambari | 1032f0f54cb7b312b9a3b37570cd840f4e1e89d4 | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/stacks/BIGTOP/0.8/services/OOZIE/package/scripts/status_params.py | zyclove/ambari | 1032f0f54cb7b312b9a3b37570cd840f4e1e89d4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python2
"""
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"); yo... | 35.851852 | 72 | 0.785124 |
794f77e64b56eba98fbbde667443476db5ec975b | 14,843 | py | Python | SLING/src/relation_linking_core/metadata_generator/amr_graph_to_triples.py | nandana/kbqa-relation-linking | 6d541341519eea56efe0ec87b18f0ba93604f778 | [
"Apache-2.0"
] | null | null | null | SLING/src/relation_linking_core/metadata_generator/amr_graph_to_triples.py | nandana/kbqa-relation-linking | 6d541341519eea56efe0ec87b18f0ba93604f778 | [
"Apache-2.0"
] | null | null | null | SLING/src/relation_linking_core/metadata_generator/amr_graph_to_triples.py | nandana/kbqa-relation-linking | 6d541341519eea56efe0ec87b18f0ba93604f778 | [
"Apache-2.0"
] | null | null | null | import calendar
import re
from itertools import combinations
from nltk.stem import WordNetLemmatizer
class AMR2Triples:
lemmatizer = WordNetLemmatizer()
op_pattern = re.compile("op([0-9]+)")
ARG_REGEX = re.compile("ARG([0-9]+)")
propbank_pattern = re.compile("([a-z0-9]+_)*(([a-z]+)-)+(\d\d)")
non... | 45.530675 | 154 | 0.562151 |
794f77ef84ce2603d19d801a3d8d1496a21e1bb4 | 1,220 | py | Python | grr/server/grr_response_server/gui/selenium_tests/api_docs_test.py | 4ndygu/grr | cfc725b5ee3a2626ac4cdae7fb14471612da4522 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/gui/selenium_tests/api_docs_test.py | 4ndygu/grr | cfc725b5ee3a2626ac4cdae7fb14471612da4522 | [
"Apache-2.0"
] | null | null | null | grr/server/grr_response_server/gui/selenium_tests/api_docs_test.py | 4ndygu/grr | cfc725b5ee3a2626ac4cdae7fb14471612da4522 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Tests for API docs view."""
from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from grr_response_core.lib import flags
from grr_response_server.gui import gui_test_lib
from grr.test_lib import test_lib
class TestAPIDocs(gui_test_li... | 27.111111 | 78 | 0.631967 |
794f7880452e2667f2df298ce1264571ae40b630 | 3,666 | py | Python | pyxiv-dl/__main__.py | reymarkus/pyxiv-dl-reborn | d89ce952a2f85fcb298f535e5391b5d504465cd1 | [
"MIT"
] | null | null | null | pyxiv-dl/__main__.py | reymarkus/pyxiv-dl-reborn | d89ce952a2f85fcb298f535e5391b5d504465cd1 | [
"MIT"
] | null | null | null | pyxiv-dl/__main__.py | reymarkus/pyxiv-dl-reborn | d89ce952a2f85fcb298f535e5391b5d504465cd1 | [
"MIT"
] | null | null | null | """pyxiv-dl main script
This is the main script that executes the main pyxiv-dl argument parser.
"""
import argparse, sys, textwrap
from webcrawler import PixivWebCrawler
from pyxivhelpers import *
# constants
"""Script version"""
PYXIVDL_VERSION = "0.5.2"
"""Main function for accepting download args"""
def main()... | 30.04918 | 118 | 0.627932 |
794f78d35e6334cc9a4abcbc981e57122bfb22ef | 1,552 | py | Python | model-optimizer/extensions/front/tf/matmul_ext.py | tdp2110/dldt | 87f321c5365ed813e849ea0ed987354ef2c39743 | [
"Apache-2.0"
] | null | null | null | model-optimizer/extensions/front/tf/matmul_ext.py | tdp2110/dldt | 87f321c5365ed813e849ea0ed987354ef2c39743 | [
"Apache-2.0"
] | null | null | null | model-optimizer/extensions/front/tf/matmul_ext.py | tdp2110/dldt | 87f321c5365ed813e849ea0ed987354ef2c39743 | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2019 Intel Corporation
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 wri... | 37.853659 | 107 | 0.654639 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.