hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1dfa9182108439bb9c7fd999115465116e39ed0c | 12,828 | py | Python | pytype/tests/py3/test_stdlib.py | souravbadami/pytype | 804fa97e7f9208df2711976085a96f756b3949e6 | [
"Apache-2.0"
] | 1 | 2020-04-20T02:55:21.000Z | 2020-04-20T02:55:21.000Z | pytype/tests/py3/test_stdlib.py | doc22940/pytype | 4772ad6fe89f4df75ae3d08e7374f68074175d4a | [
"Apache-2.0"
] | null | null | null | pytype/tests/py3/test_stdlib.py | doc22940/pytype | 4772ad6fe89f4df75ae3d08e7374f68074175d4a | [
"Apache-2.0"
] | null | null | null | """Tests of selected stdlib functions."""
from pytype.tests import test_base
from pytype.tests import test_utils
class StdLibTestsBasic(test_base.TargetPython3BasicTest,
test_utils.TestCollectionsMixin):
"""Tests for files in typeshed/stdlib."""
def testCollectionsDeque(self):
# This ... | 28.443459 | 82 | 0.595027 |
1dfa970fe0976cc11674f3fd785203bcc13961af | 1,876 | py | Python | tests/test_models.py | Silvrash/firestorm | f87ef82c7a9b3c346047f8eff8989652794c2442 | [
"Apache-2.0"
] | 5 | 2020-01-18T11:44:27.000Z | 2021-07-15T18:54:34.000Z | tests/test_models.py | Silvrash/firestorm | f87ef82c7a9b3c346047f8eff8989652794c2442 | [
"Apache-2.0"
] | null | null | null | tests/test_models.py | Silvrash/firestorm | f87ef82c7a9b3c346047f8eff8989652794c2442 | [
"Apache-2.0"
] | 2 | 2019-11-07T10:02:13.000Z | 2020-03-05T04:31:35.000Z | # Copyright 2019 Benjamin Arko Afrasah
#
# 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... | 31.79661 | 89 | 0.674307 |
1dfaadffd68292a8416247c44728f015befcc6c3 | 1,537 | py | Python | dimm_stats.py | marissakotze/timDIMM | dde00a3bb6ca7c3d9b71e24f9363350a0e2a323f | [
"BSD-3-Clause"
] | 1 | 2021-06-06T15:26:36.000Z | 2021-06-06T15:26:36.000Z | dimm_stats.py | marissakotze/timDIMM | dde00a3bb6ca7c3d9b71e24f9363350a0e2a323f | [
"BSD-3-Clause"
] | null | null | null | dimm_stats.py | marissakotze/timDIMM | dde00a3bb6ca7c3d9b71e24f9363350a0e2a323f | [
"BSD-3-Clause"
] | 3 | 2015-07-29T15:16:35.000Z | 2017-12-01T13:02:36.000Z | #!/usr/bin/env python
import sys
import numpy as np
labels = ["X1", "Y1", "FWHM1", "Flux1", "Back1", "Noise1", "SigXY1", "SNR1",
"Strehl1", "X2", "Y2", "FWHM2", "Flux2", "Back2", "Noise2",
"SigXY2", "SNR2", "Strehl2", "Sep", "Sig_Sep", "ExpTime"]
file = sys.argv[1]
outfile = file.split('.')[0] +... | 32.702128 | 76 | 0.385817 |
1dface1aa5d809a8591e64ad3a99f6ce785b5d63 | 2,087 | py | Python | setup.py | fab4100/pylj | aa539277eae7ee7a35cc68a8cdb5835e9a917070 | [
"MIT"
] | null | null | null | setup.py | fab4100/pylj | aa539277eae7ee7a35cc68a8cdb5835e9a917070 | [
"MIT"
] | null | null | null | setup.py | fab4100/pylj | aa539277eae7ee7a35cc68a8cdb5835e9a917070 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# System imports
from setuptools import setup, Extension, find_packages
from os import path
import io
packages = find_packages()
# versioning
MAJOR = 1
MINOR = 4
MICRO = 0
ISRELEASED = True
VERSION = '%d.%d.%d' % (MAJOR, MINOR, MICRO)
this_directory = path.abspath(path.dirname(__file__))
with... | 34.783333 | 82 | 0.522281 |
1dfb20b2716ed11025726ee2e7ca6ead7e0f2fa6 | 24,777 | py | Python | habitat_baselines/rl/ppo/ppo_trainer.py | Ram81/habitat-imitation-baselines | c6e11c8ebadbf1260e1bed58a5b8dfb7faf6a505 | [
"MIT"
] | null | null | null | habitat_baselines/rl/ppo/ppo_trainer.py | Ram81/habitat-imitation-baselines | c6e11c8ebadbf1260e1bed58a5b8dfb7faf6a505 | [
"MIT"
] | null | null | null | habitat_baselines/rl/ppo/ppo_trainer.py | Ram81/habitat-imitation-baselines | c6e11c8ebadbf1260e1bed58a5b8dfb7faf6a505 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import os
import time
from collections import defaultdict, deque
from typing import Any, DefaultDict, Dict, List, Option... | 35.144681 | 99 | 0.548331 |
1dfb2dfb545c0b9464d9a92c8ac833210e4f0a41 | 252 | py | Python | nagios/test/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | nagios/test/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2019-07-03T02:53:19.000Z | 2019-07-10T14:52:14.000Z | nagios/test/conftest.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:45:42.000Z | 2018-08-15T05:45:42.000Z | # (C) Datadog, Inc. 2018
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
import pytest
@pytest.fixture
def aggregator():
from datadog_checks.stubs import aggregator
aggregator.reset()
return aggregator
| 18 | 59 | 0.738095 |
1dfb4465d46bda5f2520ba1929c904a80830b4bc | 26,229 | py | Python | convnet.py | milesjwinter/DECO-Convnet | e942289e064f47a8b59f766cc0f6c9846c38e85a | [
"MIT"
] | null | null | null | convnet.py | milesjwinter/DECO-Convnet | e942289e064f47a8b59f766cc0f6c9846c38e85a | [
"MIT"
] | null | null | null | convnet.py | milesjwinter/DECO-Convnet | e942289e064f47a8b59f766cc0f6c9846c38e85a | [
"MIT"
] | null | null | null | from __future__ import division, print_function
import os
import numpy as np
import keras
from keras.models import Sequential, load_model
from keras.layers import Conv2D, MaxPooling2D, Cropping2D
from keras.layers import Flatten, Dense, Dropout
from keras.layers.advanced_activations import LeakyReLU
from keras.constrai... | 43.861204 | 102 | 0.588966 |
1dfb679491e44339b06f14e127fc37faf993e608 | 22,179 | py | Python | 1.0.0/hp/_void/dfgui.py | cefect/SOFDA0 | 62c5566d0f388a5fd76a070ceb5ee3e38b0d7463 | [
"MIT"
] | null | null | null | 1.0.0/hp/_void/dfgui.py | cefect/SOFDA0 | 62c5566d0f388a5fd76a070ceb5ee3e38b0d7463 | [
"MIT"
] | null | null | null | 1.0.0/hp/_void/dfgui.py | cefect/SOFDA0 | 62c5566d0f388a5fd76a070ceb5ee3e38b0d7463 | [
"MIT"
] | null | null | null | '''
Created on Aug 4, 2017
@author: cef
'''
#!/usr/bin/env python
# -*- encoding: utf-8
from __future__ import absolute_import, division, print_function
try:
import wx
except ImportError:
import sys
sys.path += [
"/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode",
"/us... | 34.98265 | 119 | 0.602327 |
1dfb7bc15dc9bd994eb407b6cb540ba18d2ae8c8 | 6,299 | py | Python | treedetection/exporter.py | adrian-kuhn/tree-detection | eb7d9444d2dbb7c1c5801bff3f457d1a754cbb9d | [
"MIT"
] | 8 | 2020-03-10T10:22:02.000Z | 2022-02-14T19:17:44.000Z | treedetection/exporter.py | adrian-kuhn/tree-detection | eb7d9444d2dbb7c1c5801bff3f457d1a754cbb9d | [
"MIT"
] | null | null | null | treedetection/exporter.py | adrian-kuhn/tree-detection | eb7d9444d2dbb7c1c5801bff3f457d1a754cbb9d | [
"MIT"
] | 2 | 2020-03-08T18:02:05.000Z | 2021-10-12T01:38:36.000Z | import os
import arcpy
import csv
import logging
import datetime
import glob
from . import settings
log = logging.getLogger()
class TreeExporter:
"""
Generic class to export the result to a ESRI file geo database.
"""
def __init__(self):
self.gdb_name = settings.get("exporter.gdb.name")
... | 40.378205 | 160 | 0.602477 |
1dfb7da7da9af1eb67e4d078e7080c6a5c082960 | 8,880 | py | Python | hashing/scripts/old/figure21b_V2.py | ShuhaoZhangTony/WalnutDB | 9ccc10b23351aa2e6793e0f5c7bd3dd511d7b050 | [
"MIT"
] | null | null | null | hashing/scripts/old/figure21b_V2.py | ShuhaoZhangTony/WalnutDB | 9ccc10b23351aa2e6793e0f5c7bd3dd511d7b050 | [
"MIT"
] | null | null | null | hashing/scripts/old/figure21b_V2.py | ShuhaoZhangTony/WalnutDB | 9ccc10b23351aa2e6793e0f5c7bd3dd511d7b050 | [
"MIT"
] | null | null | null | import csv
import getopt
import os
import sys
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pylab
from matplotlib.font_manager import FontProperties
from matplotlib.ticker import LinearLocator
from numpy import double
OPT_FONT_NAME = 'Helvetica'
TICK_FONT_SIZE = 20
LABEL_FONT_SIZE = 22
L... | 34.6875 | 113 | 0.557658 |
1dfb7f64d2bd52892f7ae4ed8751fb3fa98adf0e | 2,411 | py | Python | tools/add_pr_link_to_jira.py | djzager/assisted-installer-deployment | 0c1d54c3af84dab0f061ed49595311918ce0768e | [
"Apache-2.0"
] | null | null | null | tools/add_pr_link_to_jira.py | djzager/assisted-installer-deployment | 0c1d54c3af84dab0f061ed49595311918ce0768e | [
"Apache-2.0"
] | null | null | null | tools/add_pr_link_to_jira.py | djzager/assisted-installer-deployment | 0c1d54c3af84dab0f061ed49595311918ce0768e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#Adds links on Jira ticket to the given github PR
import argparse
import os
import sys
import jira
import pprint
import netrc
import logging
from urllib.parse import urlparse
JIRA_SERVER = "https://issues.redhat.com/"
logging.basicConfig(level=logging.WARN, format='%(levelname)-10s %(message)... | 28.702381 | 108 | 0.698465 |
1dfb80c44736f8dea22a2e3471ac349756ecdded | 14,671 | py | Python | src/sage/combinat/cartesian_product.py | saraedum/sage-renamed | d2da67b14da2ad766a5906425d60d43a3b3e1270 | [
"BSL-1.0"
] | 1 | 2016-11-04T16:31:48.000Z | 2016-11-04T16:31:48.000Z | src/sage/combinat/cartesian_product.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/cartesian_product.py | rwst/sage | a9d274b9338e6ee24bf35ea8d25875507e51e455 | [
"BSL-1.0"
] | null | null | null | r"""
Cartesian Products
"""
#*****************************************************************************
# Copyright (C) 2007 Mike Hansen <mhansen@gmail.com>,
#
# Distributed under the terms of the GNU General Public License (GPL)
#
# This code is distributed in the hope that it will be useful,
# but WIT... | 35.182254 | 178 | 0.576511 |
1dfbce5047ca98bed57c11f22f718f107bd6ccc1 | 570 | py | Python | demo.py | canuse/ranking | e8e4f5fb52f12586a718922a9d003ddc34c9cc77 | [
"MIT"
] | 5 | 2019-08-28T21:34:47.000Z | 2020-08-31T21:27:33.000Z | demo.py | canuse/ranking | e8e4f5fb52f12586a718922a9d003ddc34c9cc77 | [
"MIT"
] | null | null | null | demo.py | canuse/ranking | e8e4f5fb52f12586a718922a9d003ddc34c9cc77 | [
"MIT"
] | null | null | null | import ranking
if __name__ == "__main__":
a = ranking.ranking([
['a', 'b', 5, 5],
['a', 'c', 5, 3],
['b', 'c', 4, 3],
['a', 'c', 5, 3],
['a', 'd', 5, 1],
['b', 'c', 5, 3],
['b', 'd', 5, 1],
['c', 'd', 3, 1],
['a', 'd', 4, 3],
['d', 'a'... | 21.111111 | 42 | 0.298246 |
1dfbd163f7a69f7720f2fa9849fbfda7a29455dc | 4,415 | py | Python | setup.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | 1 | 2020-03-05T01:19:17.000Z | 2020-03-05T01:19:17.000Z | setup.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | null | null | null | setup.py | fancyerii/voicebook | def82da8577086d0361643a05fec2463006533a9 | [
"Apache-2.0"
] | null | null | null | '''
================================================
VOICEBOOK REPOSITORY
================================================
repository name: voicebook
repository version: 1.0
repository link: https://github.com/jim-schwoebel/voicebook
author: Jim Schwoebel
author contact: js@neurole... | 36.487603 | 121 | 0.6453 |
1dfc45a98c8a990f090f4f63d9296cd6707a92aa | 1,803 | py | Python | examples/lecture18.py | SeattleCentral/ITC110 | b444097b10225396f3f4465c5cfc37ba442df951 | [
"MIT"
] | 12 | 2017-01-05T03:43:10.000Z | 2019-01-18T03:39:09.000Z | examples/lecture18.py | ogarmela/ITC110-1 | b444097b10225396f3f4465c5cfc37ba442df951 | [
"MIT"
] | null | null | null | examples/lecture18.py | ogarmela/ITC110-1 | b444097b10225396f3f4465c5cfc37ba442df951 | [
"MIT"
] | 2 | 2019-02-28T05:13:40.000Z | 2019-11-09T05:06:35.000Z | class Person:
"""
This is a base class representing all people.
"""
def __init__(self, first_name, last_name, hair_color, eye_color):
self.first_name = first_name
self.last_name = last_name
self.hair_color = hair_color
self.eye_color = eye_color
def full_name(self):
... | 25.757143 | 70 | 0.587909 |
1dfc6d4063657984e910d5d459bb35cfa8d52f3b | 1,948 | py | Python | end_to_end_tests/golden-record/my_test_api_client/models/model_with_date_time_property.py | JamesHinshelwood/openapi-python-client | 08bc2acf91d50d4fcdd7f0e50a8b0d3f00a187d9 | [
"MIT"
] | 1 | 2022-02-17T11:45:13.000Z | 2022-02-17T11:45:13.000Z | end_to_end_tests/golden-record/my_test_api_client/models/model_with_date_time_property.py | guioliveirabh/openapi-python-client | d8d9cecffe41c5dc1c43bc667598b90f0d9253ca | [
"MIT"
] | null | null | null | end_to_end_tests/golden-record/my_test_api_client/models/model_with_date_time_property.py | guioliveirabh/openapi-python-client | d8d9cecffe41c5dc1c43bc667598b90f0d9253ca | [
"MIT"
] | null | null | null | import datetime
from typing import Any, Dict, List, Type, TypeVar, Union
import attr
from dateutil.parser import isoparse
from ..types import UNSET, Unset
T = TypeVar("T", bound="ModelWithDateTimeProperty")
@attr.s(auto_attribs=True)
class ModelWithDateTimeProperty:
"""
Attributes:
datetime_ (Union... | 29.074627 | 77 | 0.654517 |
1dfc9668e31177ea81c1e9408d83dc329135924e | 8,893 | py | Python | src/robot/result/xmlelementhandlers.py | bradyarthur/RobotFramework | f45747dfec1095359379ba0088cecd955a83e576 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robot/result/xmlelementhandlers.py | bradyarthur/RobotFramework | f45747dfec1095359379ba0088cecd955a83e576 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robot/result/xmlelementhandlers.py | bradyarthur/RobotFramework | f45747dfec1095359379ba0088cecd955a83e576 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# 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
... | 29.157377 | 81 | 0.615091 |
1dfca0c49816e001cea0cfdb5c3c982c022709c9 | 34,153 | py | Python | atomic_reactor/plugins/pre_fetch_sources.py | ben-alkov/atomic-reactor | be6b626b7d822f77999f245193fefcc00c501ca9 | [
"BSD-3-Clause"
] | null | null | null | atomic_reactor/plugins/pre_fetch_sources.py | ben-alkov/atomic-reactor | be6b626b7d822f77999f245193fefcc00c501ca9 | [
"BSD-3-Clause"
] | 30 | 2020-06-05T17:35:36.000Z | 2022-03-25T19:21:36.000Z | atomic_reactor/plugins/pre_fetch_sources.py | ben-alkov/atomic-reactor | be6b626b7d822f77999f245193fefcc00c501ca9 | [
"BSD-3-Clause"
] | null | null | null | """
Copyright (c) 2019, 2021 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
import os
import shutil
import koji
import tarfile
import yaml
from atomic_reactor.constants import (PLUGIN_FETCH_SOURCES_KEY, PNC_SYS... | 44.239637 | 100 | 0.613475 |
1dfcce3838281834185ee2de438004374005ee4d | 1,442 | py | Python | alipay/aop/api/domain/AnttechBlockchainFinanceRiskWarningAddModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AnttechBlockchainFinanceRiskWarningAddModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AnttechBlockchainFinanceRiskWarningAddModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AnttechBlockchainFinanceRiskWarningAddModel(object):
def __init__(self):
self._out_risk_id = None
self._risk_info = None
@property
def out_risk_id(self):
return s... | 25.75 | 73 | 0.604716 |
1dfcdad5c10db4af76ac1349c8d2f8c83b9b683f | 8,346 | py | Python | ChairAnalyser.py | asmerdov/CS_GO_Sensors_Data_Analysis | 82669ae925258e2d6f29e8c55dfe682c0c1558e2 | [
"MIT"
] | 1 | 2020-11-22T17:20:47.000Z | 2020-11-22T17:20:47.000Z | ChairAnalyser.py | asmerdov/CS_GO_Sensors_Data_Analysis | 82669ae925258e2d6f29e8c55dfe682c0c1558e2 | [
"MIT"
] | null | null | null | ChairAnalyser.py | asmerdov/CS_GO_Sensors_Data_Analysis | 82669ae925258e2d6f29e8c55dfe682c0c1558e2 | [
"MIT"
] | null | null | null | import joblib
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from GeneralAnalyser import GeneralAnalyser
# TODO: add the name because the same analyser can be used for many plots
class ChairAnalyser(GeneralAnalyser):
def __init__(self,
df,
pic_prefix,
... | 42.151515 | 134 | 0.668823 |
1dfcf01f5f4ad71f4730909ddb6340890fcd8b95 | 6,753 | py | Python | qnarre/prep/tokens/pegasus.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/tokens/pegasus.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre/prep/tokens/pegasus.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2022 Quantapix Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 34.106061 | 189 | 0.610099 |
1dfcf7b109d4218527fbf0355484c9120db02e8b | 11,374 | py | Python | eland/tasks.py | mesejo/eland | d1444f8e094ef11ce4fa6713a521245b68a842d7 | [
"Apache-2.0"
] | null | null | null | eland/tasks.py | mesejo/eland | d1444f8e094ef11ce4fa6713a521245b68a842d7 | [
"Apache-2.0"
] | null | null | null | eland/tasks.py | mesejo/eland | d1444f8e094ef11ce4fa6713a521245b68a842d7 | [
"Apache-2.0"
] | null | null | null | # Licensed to Elasticsearch B.V under one or more agreements.
# Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
# See the LICENSE file in the project root for more information
from abc import ABC, abstractmethod
from typing import TYPE_CHECKING, List, Any, Tuple
from eland import SortOrder
f... | 31.949438 | 152 | 0.623703 |
1dfd2aa2cb5f02fc8d53d80c97d7db26a81238e6 | 949 | py | Python | sdks/python/test/test_Version_Diagnostics.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/test/test_Version_Diagnostics.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/test/test_Version_Diagnostics.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
from __future__ import absolute_import
import unittest
import appcente... | 23.725 | 97 | 0.726027 |
1dfd4c48efbc78dca00f06a7943a9fa6cda8ffd8 | 17,097 | py | Python | framework/communication/aiocoap/transports/tcp.py | nidiascampos/smartgreen | d574d90918702ac3bd383ed77d673f871576c5b0 | [
"Apache-2.0"
] | 1 | 2021-02-13T07:42:04.000Z | 2021-02-13T07:42:04.000Z | framework/communication/aiocoap/transports/tcp.py | nidiascampos/smartgreen | d574d90918702ac3bd383ed77d673f871576c5b0 | [
"Apache-2.0"
] | null | null | null | framework/communication/aiocoap/transports/tcp.py | nidiascampos/smartgreen | d574d90918702ac3bd383ed77d673f871576c5b0 | [
"Apache-2.0"
] | null | null | null | # This file is part of the Python aiocoap library project.
#
# Copyright (c) 2012-2014 Maciej Wasilak <http://sixpinetrees.blogspot.com/>,
# 2013-2014 Christian Amsüss <c.amsuess@energyharvesting.at>
#
# aiocoap is free software, this file is published under the MIT license as
# described in the accompany... | 35.034836 | 114 | 0.6073 |
1dfd6e6157407f09430936eb81b72757ac60bc4c | 1,614 | py | Python | noggin/tests/unit/translations/test_translations.py | mohanboddu/noggin | 933d97b1c06db3f37acfeb86c32b45171f4e80b0 | [
"MIT"
] | 1 | 2022-03-20T16:15:00.000Z | 2022-03-20T16:15:00.000Z | noggin/tests/unit/translations/test_translations.py | weblate/noggin | 3a515186bc5000d88efb0c5433c6f6a77f6eba81 | [
"MIT"
] | null | null | null | noggin/tests/unit/translations/test_translations.py | weblate/noggin | 3a515186bc5000d88efb0c5433c6f6a77f6eba81 | [
"MIT"
] | null | null | null | import os
import pytest
from bs4 import BeautifulSoup
from babel.messages.frontend import compile_catalog
import noggin
from noggin.tests.unit.utilities import assert_redirects_with_flash
@pytest.fixture
def compile_catalogs():
cmd = compile_catalog()
cmd.directory = os.path.abspath(os.path.join(noggin.__pa... | 32.938776 | 92 | 0.698265 |
1dfda17343ba529fdbb8493efd0c69159dd587bd | 15,900 | py | Python | alipay/aop/api/domain/ApSummaryBillViewQueryOrder.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/ApSummaryBillViewQueryOrder.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/ApSummaryBillViewQueryOrder.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class ApSummaryBillViewQueryOrder(object):
def __init__(self):
self._arrangement_no = None
self._bill_end_month = None
self._bill_nos = None
self._bill_start_month = Non... | 40.050378 | 97 | 0.628868 |
1dfdb9aefcd99d6425d53b1212b11906eb1a3017 | 97 | py | Python | python/13_regex_and_parsing/06_regexsubstitution.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | null | null | null | python/13_regex_and_parsing/06_regexsubstitution.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | null | null | null | python/13_regex_and_parsing/06_regexsubstitution.py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | 3 | 2021-09-22T11:06:58.000Z | 2022-01-25T09:29:24.000Z | Solution to [Regex Substitution](https://www.hackerrank.com/challenges/re-sub-regex-substitution) | 97 | 97 | 0.824742 |
1dfdbc7e1a79d5fc046a4e34a9b14abfa64c7a6c | 21,288 | py | Python | networks/convlstm_networks/train_src/densnet.py | DiMorten/FCN_ConvLSTM_Crop_Recognition_Generalized | 2749c90fab6c3854c380f6bca945dd4e99c17239 | [
"Apache-2.0"
] | null | null | null | networks/convlstm_networks/train_src/densnet.py | DiMorten/FCN_ConvLSTM_Crop_Recognition_Generalized | 2749c90fab6c3854c380f6bca945dd4e99c17239 | [
"Apache-2.0"
] | null | null | null | networks/convlstm_networks/train_src/densnet.py | DiMorten/FCN_ConvLSTM_Crop_Recognition_Generalized | 2749c90fab6c3854c380f6bca945dd4e99c17239 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""DenseNet models for Keras.
# Reference
- [Densely Connected Convolutional Networks](https://arxiv.org/pdf/1608.06993.pdf)
- [The One Hundred Layers Tiramisu: Fully Convolutional DenseNets for Semantic Segmentation](https://arxiv.org/pdf/1611.09326.pdf)
"""
from __future... | 47.201774 | 137 | 0.638858 |
1dfe138e4afa755b22456705061e5ab18481251d | 1,804 | py | Python | python/test/test_association.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | python/test/test_association.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | 1 | 2021-01-20T00:20:01.000Z | 2021-01-20T00:20:01.000Z | python/test/test_association.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenLattice API
OpenLattice API # noqa: E501
The version of the OpenAPI document: 0.0.1
Contact: support@openlattice.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import openlattice
from openlat... | 27.753846 | 76 | 0.58592 |
1dfe3ab6a4375dc484bf5f3b5449c63b9a1d4c35 | 7,169 | py | Python | gwlfe/Output/Loading/StreamBankEros_1.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | null | null | null | gwlfe/Output/Loading/StreamBankEros_1.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 6 | 2018-07-24T22:46:28.000Z | 2018-07-29T19:13:09.000Z | gwlfe/Output/Loading/StreamBankEros_1.py | mudkipmaster/gwlf-e | 9e058445537dd32d1916f76c4b73ca64261771cd | [
"Apache-2.0"
] | 1 | 2018-07-24T18:22:01.000Z | 2018-07-24T18:22:01.000Z | from numpy import maximum
from numpy import zeros
from gwlfe.BMPs.Stream.SEDFEN import SEDFEN
from gwlfe.BMPs.Stream.SEDFEN import SEDFEN_f
from gwlfe.BMPs.Stream.SEDSTAB import SEDSTAB
from gwlfe.BMPs.Stream.SEDSTAB import SEDSTAB_f
from gwlfe.BMPs.Stream.SURBBANK import SURBBANK
from gwlfe.BMPs.Stream.SURBBANK impor... | 70.284314 | 120 | 0.590877 |
1dfe3e77442fd5c76c64ccd75642fb36539bd515 | 18,910 | py | Python | lib/mplcairo/base.py | QuLogic/mplcairo | b5ff0ba6beb18a30419310750e7fba6edbe9c267 | [
"MIT"
] | null | null | null | lib/mplcairo/base.py | QuLogic/mplcairo | b5ff0ba6beb18a30419310750e7fba6edbe9c267 | [
"MIT"
] | null | null | null | lib/mplcairo/base.py | QuLogic/mplcairo | b5ff0ba6beb18a30419310750e7fba6edbe9c267 | [
"MIT"
] | null | null | null | import codecs
import contextlib
import functools
from functools import partial, partialmethod
import gc
from gzip import GzipFile
import logging
import os
from pathlib import Path
import shutil
from tempfile import TemporaryDirectory
from threading import RLock
import numpy as np
from PIL import Image
from PIL.PngImag... | 41.56044 | 79 | 0.628133 |
1dfe7378b008905e022183c06fbef479379009c6 | 5,440 | py | Python | WebRichPresence_Client/Client.py | nint8835/WebRichPresence_Client | 443bb8508e72b0a26e492393423cefc9ff441f03 | [
"MIT"
] | 2 | 2018-10-07T19:08:31.000Z | 2019-01-28T12:00:13.000Z | WebRichPresence_Client/Client.py | nint8835/WebRichPresence_Client | 443bb8508e72b0a26e492393423cefc9ff441f03 | [
"MIT"
] | null | null | null | WebRichPresence_Client/Client.py | nint8835/WebRichPresence_Client | 443bb8508e72b0a26e492393423cefc9ff441f03 | [
"MIT"
] | null | null | null | import json
import logging
import os
import time
from typing import Dict, Optional, Callable, Type
from pypresence import Presence
from socketIO_client import SocketIO, BaseNamespace
class Client(object):
"""
Main client object for WebRichPresence_Client. Handles all interactions between the API and Discord.... | 33.78882 | 104 | 0.611029 |
1dfe81bfc3b1fd0e17bbe7489a688ee8f848ad6f | 214 | py | Python | dynamics/random.py | bodokaiser/complex-systems | 5e348d9cc382059b316ccc0a391183ba65aa8f3f | [
"Apache-2.0"
] | 2 | 2019-04-22T17:32:33.000Z | 2019-10-03T18:09:01.000Z | dynamics/random.py | bodokaiser/complex-systems | 5e348d9cc382059b316ccc0a391183ba65aa8f3f | [
"Apache-2.0"
] | null | null | null | dynamics/random.py | bodokaiser/complex-systems | 5e348d9cc382059b316ccc0a391183ba65aa8f3f | [
"Apache-2.0"
] | null | null | null | import numba
from random import gauss
@numba.jit(nopython=True)
def autoregression(x0, a, b, N, mu=0, sigma=1):
x = [x0]
for i in range(1, N + 1):
x.append(a + b * x[-1] + gauss(mu, sigma))
return x
| 15.285714 | 47 | 0.607477 |
1dfe861324cbd8ed0b89026dc9cd288ec6725fca | 1,367 | py | Python | old_scripts/grant.py | alkamid/wiktionary | ce242da609a1001ae7462b07da2f6e83f1a7281b | [
"MIT"
] | 3 | 2015-01-06T22:00:22.000Z | 2016-08-14T08:07:32.000Z | old_scripts/grant.py | alkamid/wiktionary | ce242da609a1001ae7462b07da2f6e83f1a7281b | [
"MIT"
] | 56 | 2015-07-12T10:21:38.000Z | 2020-02-23T18:51:01.000Z | old_scripts/grant.py | alkamid/wiktionary | ce242da609a1001ae7462b07da2f6e83f1a7281b | [
"MIT"
] | 2 | 2015-01-06T21:25:06.000Z | 2018-01-17T12:03:17.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
# robienie listy haseł polskich bez wymowy
import sys
#sys.path.append('/home/alkamid/wikt/pywikipedia')
sys.path.append('/home/adam/wikt/pywikipedia')
import codecs
from pywikibot import Category
import pywikibot
from pywikibot import pagegenerators
import re
import math
imp... | 24.854545 | 89 | 0.60278 |
1dfeced6d62e9507e9aec2e9123ee49087201182 | 13,766 | py | Python | game.py | Demiandalou/Gomoku_RL | 3f6578cb87c9daa7145ba78818f2cfdd4ba3fd3d | [
"MIT"
] | null | null | null | game.py | Demiandalou/Gomoku_RL | 3f6578cb87c9daa7145ba78818f2cfdd4ba3fd3d | [
"MIT"
] | null | null | null | game.py | Demiandalou/Gomoku_RL | 3f6578cb87c9daa7145ba78818f2cfdd4ba3fd3d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: Junxiao Song
"""
from __future__ import print_function
import numpy as np
from Forbidden_Moves import forbidden_move
# def double_three(self,curPlayer,noncurPlayer,x,y):
# save_forbidden=
class Board(object):
"""board for the game"""
def __init__(self, **kwargs):
... | 40.369501 | 104 | 0.514529 |
1dfee87961da0261eef38a155a37a63d2548accf | 721 | py | Python | marchena/modules/blogs/urlresolvers.py | samuelmaudo/marchena | e9a522a9be66f7043aa61e316f7e733e8ccf1e32 | [
"BSD-3-Clause"
] | null | null | null | marchena/modules/blogs/urlresolvers.py | samuelmaudo/marchena | e9a522a9be66f7043aa61e316f7e733e8ccf1e32 | [
"BSD-3-Clause"
] | null | null | null | marchena/modules/blogs/urlresolvers.py | samuelmaudo/marchena | e9a522a9be66f7043aa61e316f7e733e8ccf1e32 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding:utf-8 -*-
from __future__ import unicode_literals
from django.core.exceptions import ImproperlyConfigured
from yepes.apps import apps
from yepes.urlresolvers import full_reverse
Blog = apps.get_model('blogs', 'Blog')
class BlogUrlGenerator(object):
url_name = None
def __init__(self, url_nam... | 21.848485 | 57 | 0.614424 |
1dfeea76a94daaf0c21c51bbaade8f97d6c10fe9 | 1,303 | py | Python | predict.py | alessandrozamberletti/stock2image | 18feb2df586109c364e11e7ed64be01915093547 | [
"MIT"
] | 8 | 2018-11-06T21:39:05.000Z | 2022-02-17T08:37:17.000Z | predict.py | alessandrozamberletti/stock2image | 18feb2df586109c364e11e7ed64be01915093547 | [
"MIT"
] | null | null | null | predict.py | alessandrozamberletti/stock2image | 18feb2df586109c364e11e7ed64be01915093547 | [
"MIT"
] | 3 | 2018-10-21T08:41:36.000Z | 2019-03-14T18:17:13.000Z | from sp500forecaster.args import parse_predict_args
from sp500forecaster import log, set_console_logger
from sp500forecaster.stock_data_transformer import StockDataTransformer
from sp500forecaster.forecaster import Forecaster
from sp500forecaster.utils import is_iex_supported, get_ohlcv
import os
def predict(args):
... | 31.02381 | 75 | 0.744436 |
1dfeec9512928d684fd9d1febfa01c517849f4a6 | 1,443 | py | Python | examples/high_p.py | shoemakerdr/analytic_shrinkage | 10beefe7bd7161e09483ddc0641ed370042569e4 | [
"MIT"
] | null | null | null | examples/high_p.py | shoemakerdr/analytic_shrinkage | 10beefe7bd7161e09483ddc0641ed370042569e4 | [
"MIT"
] | null | null | null | examples/high_p.py | shoemakerdr/analytic_shrinkage | 10beefe7bd7161e09483ddc0641ed370042569e4 | [
"MIT"
] | null | null | null | """This code replicates the high dimensional results for the analytic
shrinkage estimator from the working paper called
'Analytical Nonlinear Shrinkage of Large-Dimensional Covariance Matrices'
Ledoit and Wolf 2018
Figure 4
"""
import numpy as np
import nonlinshrink as nls
CONST = 120000
def high_p():
c = np.... | 29.44898 | 73 | 0.533611 |
1dff12be868ef848eaf463c2846191f873d97638 | 31,416 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/operations/_virtual_machine_extensions_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/operations/_virtual_machine_extensions_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2021_11_01/operations/_virtual_machine_extensions_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.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 ... | 43.035616 | 216 | 0.677807 |
1dff158f937e211c25a629cf77af09d9b4f701c6 | 747 | py | Python | office365/entity_collection.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/entity_collection.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/entity_collection.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | from office365.runtime.client_object_collection import ClientObjectCollection
from office365.runtime.resource_path import ResourcePath
class EntityCollection(ClientObjectCollection):
def __getitem__(self, key):
"""
:param key: key is used to address a Entity resource by either an index in collec... | 29.88 | 93 | 0.672021 |
1dff711e48f6f13aee713ce644f63355a181af0d | 38,867 | py | Python | sfepy/solvers/ls.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | sfepy/solvers/ls.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | sfepy/solvers/ls.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import time
import numpy as nm
import warnings
import scipy.sparse as sps
import six
from six.moves import range
warnings.simplefilter('ignore', sps.SparseEfficiencyWarning)
from sfepy.base.base import output, get_default, assert_, try_imports
from sfepy.solvers.solvers import... | 34.983798 | 80 | 0.545038 |
1dffcf7bd0105d398a74e859538dc198d61f7a9f | 25,977 | py | Python | oscar/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/sanitizer.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/sanitizer.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/sanitizer.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, division, unicode_literals
import re
from xml.sax.saxutils import escape, unescape
from pip._vendor.six.moves import urllib_parse as urlparse
from . import base
from ..constants import namespaces, prefixes
__all__ = ["Filter"]
allowed_elements = frozenset((
... | 29.996536 | 155 | 0.495862 |
1dffe1d23a59baac622ff600eda37a5a37374113 | 36,422 | py | Python | python/openlattice/api/linking_api.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | python/openlattice/api/linking_api.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | 1 | 2021-01-20T00:20:01.000Z | 2021-01-20T00:20:01.000Z | python/openlattice/api/linking_api.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenLattice API
OpenLattice API # noqa: E501
The version of the OpenAPI document: 0.0.1
Contact: support@openlattice.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility l... | 44.525672 | 147 | 0.604827 |
380053420f44fc5a1ef25392ab9fb691b6e6413a | 2,586 | py | Python | tests/python/unittest/test_pass_split_pipeline.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/python/unittest/test_pass_split_pipeline.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/python/unittest/test_pass_split_pipeline.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 42 | 2020-08-01T06:41:24.000Z | 2022-01-20T10:33:08.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 31.536585 | 69 | 0.649265 |
380079821e715141e94c9299fbb7ad3570c840ff | 2,269 | py | Python | 0x08-python-more_classes/5-rectangle.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | 0x08-python-more_classes/5-rectangle.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | 0x08-python-more_classes/5-rectangle.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# 5-rectangle.py
"""Defines a Rectangle class.
"""
class Rectangle:
"""Represent a rectangle.
"""
def __init__(self, width=0, height=0):
"""Initialize a new Rectangle.
Args:
width (int): The width of the new rectangle.
height (int): The height of... | 27.011905 | 64 | 0.548259 |
38007e0c5ce54f6b9d4c48f858fcd35c639df62a | 3,616 | py | Python | app/app/settings.py | naokiyama/django-app-api | c8cb363834cd11720e97b7e7c0dc607069afc909 | [
"MIT"
] | null | null | null | app/app/settings.py | naokiyama/django-app-api | c8cb363834cd11720e97b7e7c0dc607069afc909 | [
"MIT"
] | null | null | null | app/app/settings.py | naokiyama/django-app-api | c8cb363834cd11720e97b7e7c0dc607069afc909 | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 3.2.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib imp... | 25.286713 | 91 | 0.691925 |
3800871ff4ab452438d0254257c46b980011d474 | 1,972 | py | Python | robocrys/condense/tests/test_fingerprint.py | hackingmaterials/robocrystallographer | e79e14c6bf9bfffb78a25df1a633f943bf0180ca | [
"BSD-3-Clause-LBNL"
] | 57 | 2018-12-19T15:42:13.000Z | 2022-02-16T15:26:18.000Z | robocrys/condense/tests/test_fingerprint.py | hackingmaterials/robocrystallographer | e79e14c6bf9bfffb78a25df1a633f943bf0180ca | [
"BSD-3-Clause-LBNL"
] | 71 | 2018-12-19T20:56:40.000Z | 2022-01-24T18:05:22.000Z | robocrys/condense/tests/test_fingerprint.py | hackingmaterials/robocrystallographer | e79e14c6bf9bfffb78a25df1a633f943bf0180ca | [
"BSD-3-Clause-LBNL"
] | 15 | 2018-12-19T04:40:54.000Z | 2021-08-23T02:33:01.000Z | from robocrys.condense.fingerprint import (
get_fingerprint_distance,
get_site_fingerprints,
get_structure_fingerprint,
)
from robocrys.tests import RobocrysTest
class TestFingerprint(RobocrysTest):
"""Class to test fingerprint functions."""
def setUp(self):
self.fe = self.get_structure("... | 37.207547 | 79 | 0.689148 |
3800991188178aef88a12e7f8182e8d92b09660e | 2,223 | py | Python | 076 Minimum Window Substring.py | qicst23/LeetCode-pythonSolu | 35064d52f9344494330261cd59da2e8d33f8bfdb | [
"MIT"
] | 1 | 2016-01-31T23:49:58.000Z | 2016-01-31T23:49:58.000Z | 076 Minimum Window Substring.py | qicst23/LeetCode-pythonSolu | 35064d52f9344494330261cd59da2e8d33f8bfdb | [
"MIT"
] | null | null | null | 076 Minimum Window Substring.py | qicst23/LeetCode-pythonSolu | 35064d52f9344494330261cd59da2e8d33f8bfdb | [
"MIT"
] | null | null | null | """
Given a string S and a string T, find the minimum window in S which will contain all the characters in T in complexity
O(n).
For example,
S = "ADOBECODEBANC"
T = "ABC"
Minimum window is "BANC".
Note:
If there is no such window in S that covers all characters in T, return the emtpy string "".
If there... | 37.05 | 119 | 0.563653 |
38009952cb9642f008e016bc5ca1002f9d03741d | 784 | py | Python | sandbox/run_dir.py | Grismar/py7za | 1cfcbd6661e37d6088034b6950b0ef8444747214 | [
"MIT"
] | null | null | null | sandbox/run_dir.py | Grismar/py7za | 1cfcbd6661e37d6088034b6950b0ef8444747214 | [
"MIT"
] | null | null | null | sandbox/run_dir.py | Grismar/py7za | 1cfcbd6661e37d6088034b6950b0ef8444747214 | [
"MIT"
] | null | null | null | from subprocess import Popen, PIPE
from threading import Thread
from queue import Queue, Empty
import ctypes
kernel32 = ctypes.WinDLL('kernel32', use_last_error=True)
kernel32.SetConsoleOutputCP(65001)
def output_reader(proc, q):
for line in iter(proc.stdout.readline, b''):
q.put(line.decode())
def run... | 23.757576 | 67 | 0.595663 |
3800b7a27065258a485019bb032deaae5bc9e4c2 | 6,052 | py | Python | PALM/preprocess.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | 1 | 2022-03-01T02:30:32.000Z | 2022-03-01T02:30:32.000Z | PALM/preprocess.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | null | null | null | PALM/preprocess.py | onlyrico/AliceMind | a6a070b1610e4c4bfe84ee6c4195b2bc4f725ded | [
"Apache-2.0"
] | 1 | 2021-07-10T09:50:47.000Z | 2021-07-10T09:50:47.000Z | import glob
import json
import os
import random
import re
import subprocess
from collections import Counter
from os.path import join as pjoin
import torch
from others.logging import logger
from transformers import BertTokenizer
from transformers import RobertaTokenizer
from others.utils import clean
from prepro.util... | 41.452055 | 117 | 0.681428 |
3800d279c4be722875830279cba509d2be61e810 | 4,009 | py | Python | alipay/aop/api/request/AlipayCommerceAntestTaskstatusQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayCommerceAntestTaskstatusQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayCommerceAntestTaskstatusQueryRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayCommerceAntestTaskstatusQueryModel import AlipayCommerceAntestTaskstatusQueryModel
class AlipayCommerceAntestTaskstatusQueryRe... | 27.648276 | 148 | 0.648042 |
3800e23a3a725307ba7da6900994abdeb40e4867 | 15,250 | py | Python | rsnapsim/SequenceManipMethods.py | MunskyGroup/rSNAPsim | af3e496d5252e1d2e1da061277123233a5d609b4 | [
"MIT"
] | 1 | 2022-01-28T18:17:37.000Z | 2022-01-28T18:17:37.000Z | rsnapsim/SequenceManipMethods.py | MunskyGroup/rSNAPsim | af3e496d5252e1d2e1da061277123233a5d609b4 | [
"MIT"
] | null | null | null | rsnapsim/SequenceManipMethods.py | MunskyGroup/rSNAPsim | af3e496d5252e1d2e1da061277123233a5d609b4 | [
"MIT"
] | 1 | 2020-12-02T06:36:17.000Z | 2020-12-02T06:36:17.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Dec 17 11:35:43 2020
@author: willi
"""
import re
import time
import os
import numpy as np
from . import CodonDictionaries
from . import FileParser
from . import poi as POI
try:
from Bio import SeqIO
from Bio import Entrez
except:
print('BioPython is not install... | 29.554264 | 95 | 0.55141 |
38014496473f4c186aeef5cc05ce2befa7229e5e | 4,201 | py | Python | deepray/base/layers/fwbi.py | fuhailin/DeePray | 35310a7ec5f166aa1cc892e46d144f2fb655b566 | [
"Apache-2.0"
] | 37 | 2020-06-05T14:03:59.000Z | 2021-11-18T06:25:11.000Z | deepray/base/layers/fwbi.py | fuhailin/DeePray | 35310a7ec5f166aa1cc892e46d144f2fb655b566 | [
"Apache-2.0"
] | 2 | 2021-03-12T11:04:21.000Z | 2021-09-13T03:57:08.000Z | deepray/base/layers/fwbi.py | fuhailin/DeePray | 35310a7ec5f166aa1cc892e46d144f2fb655b566 | [
"Apache-2.0"
] | 6 | 2020-06-07T08:14:02.000Z | 2021-11-18T06:25:25.000Z | """
Field-Wise BiInteraction
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import tensorflow as tf
from tensorflow.python.keras import activations
from tensorflow.python.keras import initializers
from tensorflow.python.keras import regularizers
class... | 40.394231 | 98 | 0.647227 |
380154a5ecae6be39e3d46334f19dcbf61d067da | 10,308 | py | Python | frappe/desk/form/load.py | diptigandhi24/frappe | cdbc3191f95464949ac033e65cc267d8af3be2a2 | [
"MIT"
] | 3 | 2021-03-01T08:52:59.000Z | 2021-12-15T10:17:59.000Z | frappe/desk/form/load.py | diptigandhi24/frappe | cdbc3191f95464949ac033e65cc267d8af3be2a2 | [
"MIT"
] | 212 | 2017-08-16T13:03:18.000Z | 2020-10-06T12:26:21.000Z | frappe/desk/form/load.py | diptigandhi24/frappe | cdbc3191f95464949ac033e65cc267d8af3be2a2 | [
"MIT"
] | 14 | 2020-11-04T11:22:44.000Z | 2022-02-01T20:59:37.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe, json
import frappe.utils
import frappe.share
import frappe.defaults
import frappe.desk.form.meta
from frappe.model.utils.user_settings import get_user_settings
from... | 30.678571 | 111 | 0.734284 |
38018ac66737dc31a850a33ade3060aae2f2412d | 3,458 | py | Python | structured_light/shell-scripts/template-structure-dir/generate-proj-x.py | olaals/prosjektoppgave | 048c5c01cf428846c76b1c27abd4c0f451056e03 | [
"MIT"
] | null | null | null | structured_light/shell-scripts/template-structure-dir/generate-proj-x.py | olaals/prosjektoppgave | 048c5c01cf428846c76b1c27abd4c0f451056e03 | [
"MIT"
] | null | null | null | structured_light/shell-scripts/template-structure-dir/generate-proj-x.py | olaals/prosjektoppgave | 048c5c01cf428846c76b1c27abd4c0f451056e03 | [
"MIT"
] | null | null | null | import cv2
import matplotlib.pyplot as plt
import os
import numpy as np
import sys
def get_folder_argument(arg, default):
args = sys.argv
for i in range(len(args)):
if args[i] == arg:
return os.path.join(os.getcwd(), args[i+1])
print("Could not find argument for ", arg)
return os.pa... | 27.228346 | 91 | 0.6631 |
3801a1bdce659516f4ed52603c3b153632e93a7e | 41,336 | py | Python | src/pykeen/nn/emb.py | Rodrigo-A-Pereira/pykeen | 76c5acb707faa524b5951b0d1d85ab1afe806462 | [
"MIT"
] | null | null | null | src/pykeen/nn/emb.py | Rodrigo-A-Pereira/pykeen | 76c5acb707faa524b5951b0d1d85ab1afe806462 | [
"MIT"
] | null | null | null | src/pykeen/nn/emb.py | Rodrigo-A-Pereira/pykeen | 76c5acb707faa524b5951b0d1d85ab1afe806462 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Embedding modules."""
from __future__ import annotations
import functools
import itertools
import logging
import warnings
from abc import ABC, abstractmethod
from dataclasses import dataclass
from typing import Any, Callable, Mapping, Optional, Sequence, Tuple, TypeVar, Union, cast
import... | 37.139263 | 141 | 0.632185 |
3801a6035671c7f2a197ee56c564c8ebbbd5b222 | 3,815 | py | Python | alpacka/agents/callbacks/graph_size_callback.py | shoot-tree-search/sts | 2d9f19a40c7fb1c637dd3bd230942c01f14927e1 | [
"MIT"
] | 2 | 2021-01-03T04:21:56.000Z | 2021-02-12T12:54:58.000Z | alpacka/agents/callbacks/graph_size_callback.py | shoot-tree-search/sts | 2d9f19a40c7fb1c637dd3bd230942c01f14927e1 | [
"MIT"
] | null | null | null | alpacka/agents/callbacks/graph_size_callback.py | shoot-tree-search/sts | 2d9f19a40c7fb1c637dd3bd230942c01f14927e1 | [
"MIT"
] | null | null | null | """Agent callback calculating size of search graph"""
import random
import numpy as np
from alpacka import metric_logging
from alpacka.agents import AgentCallback
class GraphSizeCallback(AgentCallback):
"""Log number of distinct observations encountered during search."""
class _HashableNumpyArray:
... | 37.401961 | 77 | 0.629358 |
3801bb139a8a2b7af5008cc00fbecc0c54c07710 | 28,637 | py | Python | f5_cccl/test/conftest.py | michaeldayreads/f5-cccl | 5aaa584f9fc77742eb9d976954e6dad805e6f4ff | [
"Apache-2.0"
] | null | null | null | f5_cccl/test/conftest.py | michaeldayreads/f5-cccl | 5aaa584f9fc77742eb9d976954e6dad805e6f4ff | [
"Apache-2.0"
] | null | null | null | f5_cccl/test/conftest.py | michaeldayreads/f5-cccl | 5aaa584f9fc77742eb9d976954e6dad805e6f4ff | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2017 F5 Networks 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... | 26.344986 | 79 | 0.594092 |
3801c8bc4bceef617f54882c0e46db4a3c52b47f | 15,010 | py | Python | dusty/run.py | RomanSharapov/dusty | d84a7a87a7df41ea1e6a62301d4981e041e32383 | [
"Apache-2.0"
] | null | null | null | dusty/run.py | RomanSharapov/dusty | d84a7a87a7df41ea1e6a62301d4981e041e32383 | [
"Apache-2.0"
] | null | null | null | dusty/run.py | RomanSharapov/dusty | d84a7a87a7df41ea1e6a62301d4981e041e32383 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 getcarrier.io
#
# 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 t... | 43.507246 | 119 | 0.673618 |
380213556e2bb2c4a9731b97d62247c0ed0bad22 | 2,250 | py | Python | src/server.py | nico989/SVMN | a0d1c7edbd7f4be309d4042f4e5d552c3672694c | [
"MIT"
] | 1 | 2022-03-23T13:28:24.000Z | 2022-03-23T13:28:24.000Z | src/server.py | nico989/SVMN | a0d1c7edbd7f4be309d4042f4e5d552c3672694c | [
"MIT"
] | null | null | null | src/server.py | nico989/SVMN | a0d1c7edbd7f4be309d4042f4e5d552c3672694c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import requests, argparse, re
from flask import Flask, request, jsonify
# Vars
counter = 0
enable = False
# Flask app(s)
app = Flask(__name__)
@app.before_request
def before_request_func():
global enable
# Check URL admin request
admin = re.search(r"\badmin\b", request.url)
... | 19.911504 | 88 | 0.618222 |
380220196b93975a8f9686378ac4d3eb6785e077 | 136 | py | Python | Function Generators/index.py | Sudani-Coder/python | 9c35f04a0521789ba91b7058695139ed074f7796 | [
"MIT"
] | null | null | null | Function Generators/index.py | Sudani-Coder/python | 9c35f04a0521789ba91b7058695139ed074f7796 | [
"MIT"
] | null | null | null | Function Generators/index.py | Sudani-Coder/python | 9c35f04a0521789ba91b7058695139ed074f7796 | [
"MIT"
] | null | null | null | def myGenerator():
yield 1
yield 2
yield 3
yield 4
yield 5
myGen = myGenerator()
for num in myGen:
print(num)
| 11.333333 | 21 | 0.595588 |
38023284e290f219000afe26635a69e5c4d52e61 | 12,337 | py | Python | appengine/findit/services/flake_reporting/test/component_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | appengine/findit/services/flake_reporting/test/component_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 7 | 2022-02-15T01:11:37.000Z | 2022-03-02T12:46:13.000Z | appengine/findit/services/flake_reporting/test/component_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2018 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from datetime import datetime
from datetime import timedelta
import mock
from libs import time_util
from model.flake.detection.flake_occurrence import FlakeO... | 35.863372 | 80 | 0.640026 |
380289d86bd17721bf51ca9e82c7d554cd18644f | 3,729 | py | Python | cmakescript/cmakeformatter_test.py | rpavlik/cmake-multitool | de0aa2c9235495d4230d0fb64a685e2959a9116e | [
"BSL-1.0"
] | 11 | 2015-02-27T09:25:41.000Z | 2020-01-12T19:50:29.000Z | cmakescript/cmakeformatter_test.py | rpavlik/cmake-multitool | de0aa2c9235495d4230d0fb64a685e2959a9116e | [
"BSL-1.0"
] | null | null | null | cmakescript/cmakeformatter_test.py | rpavlik/cmake-multitool | de0aa2c9235495d4230d0fb64a685e2959a9116e | [
"BSL-1.0"
] | 3 | 2016-01-05T10:25:36.000Z | 2018-06-22T09:38:03.000Z | #!/usr/bin/env python
"""
Tests for the cmakescripts.cmakeformatter module
Original Author:
2010 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
http://academic.cleardefinition.com
Iowa State University HCI Graduate Program/VRAC
"""
###
# standard packages
import unittest
import re
import os
import glob
###
#... | 24.532895 | 86 | 0.7321 |
38028f8cbb60ae14eb824b1303bdc895595b9018 | 4,249 | py | Python | tests/python/pants_test/cache/cache_server.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/cache/cache_server.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/cache/cache_server.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import os
import re
import SocketServer
from contextlib import contextmanager
from multip... | 29.713287 | 93 | 0.7237 |
38028ff0084d630eb55a809f386f47acdfbc6809 | 425 | py | Python | mikelint/type_hints.py | mike-fam/mikelint | 4e512039d11e9bbfde18a8cadcbc4608295e663f | [
"MIT"
] | 2 | 2021-04-27T01:13:37.000Z | 2021-05-21T02:28:24.000Z | mikelint/type_hints.py | mike-fam/mikelint | 4e512039d11e9bbfde18a8cadcbc4608295e663f | [
"MIT"
] | 3 | 2021-05-05T10:21:25.000Z | 2021-05-30T12:51:43.000Z | mikelint/type_hints.py | mike-fam/mikelint | 4e512039d11e9bbfde18a8cadcbc4608295e663f | [
"MIT"
] | null | null | null | """
Type hints helpers
"""
from dataclasses import dataclass
from .utils.tree import SyntaxTree
from .utils.violation import BaseViolation
CriteriaConfig = dict[str, list]
Config = dict[str, CriteriaConfig]
AnalyserResults = dict[str, BaseViolation]
CheckOutput = dict[str, AnalyserResults]
LintResults = dict[str... | 17.708333 | 49 | 0.764706 |
3802982afb16ba78d77368da7262000ecf7c741b | 1,967 | py | Python | perm_security/TokenStrategy/TokenHandlerStrategy/TokenHandlerStrategy.py | TheJoeSmo/perm-security | 2fd8ceb4fc72cce5889f55731056665a887399e1 | [
"MIT"
] | null | null | null | perm_security/TokenStrategy/TokenHandlerStrategy/TokenHandlerStrategy.py | TheJoeSmo/perm-security | 2fd8ceb4fc72cce5889f55731056665a887399e1 | [
"MIT"
] | null | null | null | perm_security/TokenStrategy/TokenHandlerStrategy/TokenHandlerStrategy.py | TheJoeSmo/perm-security | 2fd8ceb4fc72cce5889f55731056665a887399e1 | [
"MIT"
] | null | null | null | from typing import Set
from abc import ABC, abstractmethod
from ...Token import Token
from ...MemberAdapter.MemberAdapter import MemberAdapter
class TokenHandlerStrategy(ABC):
"""Maintains an active list of tokens that are in use"""
@abstractmethod
def get_token(self, token_id: int) -> Token:
""... | 25.545455 | 92 | 0.560752 |
38029d57771f001e59b186f5aeb1ea987c9e3a20 | 18,305 | py | Python | syft/generic/frameworks/hook/hook.py | yeggasd/PySyft | cb71c978d1fb545f64daf71ac31ad12583fc0bc2 | [
"Apache-2.0"
] | null | null | null | syft/generic/frameworks/hook/hook.py | yeggasd/PySyft | cb71c978d1fb545f64daf71ac31ad12583fc0bc2 | [
"Apache-2.0"
] | null | null | null | syft/generic/frameworks/hook/hook.py | yeggasd/PySyft | cb71c978d1fb545f64daf71ac31ad12583fc0bc2 | [
"Apache-2.0"
] | null | null | null | from abc import ABC
from abc import abstractmethod
from functools import wraps
import inspect
import re
import types
from typing import List
import syft
from syft.generic.frameworks.hook import hook_args
from syft.generic.pointers.pointer_tensor import PointerTensor
from syft.generic.pointers.multi_pointer import Mult... | 35.61284 | 98 | 0.613384 |
38029e2bbcba7194238f354ee701fb16b9772449 | 26,684 | py | Python | src/ggrc/converters/handlers/handlers.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc/converters/handlers/handlers.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc/converters/handlers/handlers.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Generic handlers for imports and exports."""
import re
from logging import getLogger
from datetime import date
from dateutil.parser import parse
from sqlalchemy import and_
from sqlalchemy import or_
fr... | 31.804529 | 79 | 0.686254 |
3802f344982ed2e99c0b89c50ef05354f9b69582 | 1,271 | py | Python | src/12/how_to_determine_if_a_thread_has_started/example2.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 14 | 2017-05-20T04:06:46.000Z | 2022-01-23T06:48:45.000Z | src/12/how_to_determine_if_a_thread_has_started/example2.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 1 | 2021-06-10T20:17:55.000Z | 2021-06-10T20:17:55.000Z | src/12/how_to_determine_if_a_thread_has_started/example2.py | tuanavu/python-gitbook | 948a05e065b0f40afbfd22f697dff16238163cde | [
"MIT"
] | 15 | 2017-03-29T17:57:33.000Z | 2021-08-24T02:20:08.000Z | import threading
import time
class PeriodicTimer:
def __init__(self, interval):
self._interval = interval
self._flag = 0
self._cv = threading.Condition()
def start(self):
t = threading.Thread(target=self.run)
t.daemon = True
t.start()
def run(self):
... | 23.537037 | 68 | 0.566483 |
3802f6f77255b0bed80980971e933e9f43d8932c | 138 | py | Python | terrascript/data/hashicorp/kubernetes_alpha.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/data/hashicorp/kubernetes_alpha.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/data/hashicorp/kubernetes_alpha.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/data/hashicorp/kubernetes_alpha.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:20:48 UTC)
__all__ = []
| 23 | 73 | 0.768116 |
380302256969f45d350008df7d2c5ecb9271724d | 1,258 | py | Python | tests/test_local_config.py | anosillus/auto_setupper | 185d7597b7a926a23ecaac6ea75ab6c38f2a111a | [
"MIT"
] | null | null | null | tests/test_local_config.py | anosillus/auto_setupper | 185d7597b7a926a23ecaac6ea75ab6c38f2a111a | [
"MIT"
] | null | null | null | tests/test_local_config.py | anosillus/auto_setupper | 185d7597b7a926a23ecaac6ea75ab6c38f2a111a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# vim:fenc=utf-8
# File name: local_config.py
# First Edit: 2020-09-01
# Last Change: 03-Sep-2020.
"""
This scrip is for test
"""
import itertools
import re
from pathlib import Path
from typing import List
def get_csv_file_path(file_path: str = ""):
"""
get_csv_file_path is return cs... | 24.192308 | 77 | 0.620032 |
380313d68ebf0a3ba82caa2a5c2230d9141e2e86 | 3,285 | py | Python | iperf.py | KimJeongChul/py3iperf3 | e8a0bf0e81a172fb818e8d20b15facd3b011a566 | [
"MIT"
] | 3 | 2018-10-16T11:58:51.000Z | 2019-11-13T14:07:19.000Z | iperf.py | KimJeongChul/py3iperf3 | e8a0bf0e81a172fb818e8d20b15facd3b011a566 | [
"MIT"
] | 1 | 2019-09-19T13:27:44.000Z | 2019-09-19T13:27:44.000Z | iperf.py | KimJeongChul/py3iperf3 | e8a0bf0e81a172fb818e8d20b15facd3b011a566 | [
"MIT"
] | 6 | 2019-01-04T07:48:45.000Z | 2022-03-01T08:12:03.000Z | """
A Python native iPerf3 client.
"""
import asyncio
import argparse
import logging
import os
from py3iperf3.utils import setup_logging
from py3iperf3.iperf3_client import Iperf3Client
from py3iperf3.iperf3_api import Iperf3TestProto
from py3iperf3.iperf3_server import Iperf3Server
def run(params):
"""Runt the ... | 33.865979 | 103 | 0.674581 |
3803240c1410cdeada433191b656cf53fdb77188 | 498 | py | Python | example/RunModel/Abaqus_Model_Example/abaqus_model.py | volpatto/UQpy | acbe1d6e655e98917f56b324f019881ea9ccca82 | [
"MIT"
] | null | null | null | example/RunModel/Abaqus_Model_Example/abaqus_model.py | volpatto/UQpy | acbe1d6e655e98917f56b324f019881ea9ccca82 | [
"MIT"
] | null | null | null | example/RunModel/Abaqus_Model_Example/abaqus_model.py | volpatto/UQpy | acbe1d6e655e98917f56b324f019881ea9ccca82 | [
"MIT"
] | null | null | null | import os
import fire
def run_single_element(index):
index = int(index)
input_file_path = os.path.join(os.getcwd(), 'InputFiles', 'single_element_' + str(index) + ".inp")
command1 = ("abaqus job=single_element_simulation_" + str(index) +
" input=" + input_file_path + " cpus=1 interactive... | 23.714286 | 102 | 0.662651 |
3803353deecb33f3c17b8e6f4dbad6862abe0e3a | 1,646 | py | Python | datasets/__init__.py | xinhecuican/tiny-face-tensor-flow | 03287b0d86e7d1332a61c1b22793655e41d01cca | [
"MIT"
] | null | null | null | datasets/__init__.py | xinhecuican/tiny-face-tensor-flow | 03287b0d86e7d1332a61c1b22793655e41d01cca | [
"MIT"
] | null | null | null | datasets/__init__.py | xinhecuican/tiny-face-tensor-flow | 03287b0d86e7d1332a61c1b22793655e41d01cca | [
"MIT"
] | null | null | null | import numpy as np
import os
import os.path as osp
import json
from DataLoaderX import DataLoaderX
from utils.cluster import compute_kmedoids
from .wider_face import WIDERFace
from torch.utils import data
def get_dataloader(datapath, args, num_templates=25, enable_edge=False,
template_file="templa... | 39.190476 | 96 | 0.638518 |
38034f8426a6e5a2138678e9caeae614ef95f824 | 974 | py | Python | setup.py | nowls/apigpio | 5e0a8d2aade59fb6f1edecd88ece2424ea547612 | [
"MIT"
] | null | null | null | setup.py | nowls/apigpio | 5e0a8d2aade59fb6f1edecd88ece2424ea547612 | [
"MIT"
] | null | null | null | setup.py | nowls/apigpio | 5e0a8d2aade59fb6f1edecd88ece2424ea547612 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
with open('README.rst', 'r') as f:
README = f.read()
setup(name='apigpio-nowls',
version='0.0.6',
description='asyncio-based python client for pigpiod',
long_description=README,
classifiers=[
"Development Status :: 3 - Alpha",
... | 30.4375 | 73 | 0.590349 |
380352943750ed2d0d8c0df0d5e6d7051d0ca248 | 34 | py | Python | explorer/__init__.py | bayesimpact/tds-frontend | a4f47e384ef4fe4dc43c30423a1713c2c93dc87f | [
"Apache-2.0"
] | 15 | 2018-05-08T23:54:38.000Z | 2020-03-07T20:46:37.000Z | explorer/__init__.py | akegan/encompass | 85852a91c646c62e8cd05f9c2b0c7cf0079ea7f2 | [
"Apache-2.0"
] | 297 | 2018-02-05T19:04:26.000Z | 2022-02-12T07:52:37.000Z | explorer/__init__.py | bayesimpact/tds | a4f47e384ef4fe4dc43c30423a1713c2c93dc87f | [
"Apache-2.0"
] | 6 | 2018-05-21T19:51:15.000Z | 2019-03-21T19:20:27.000Z | """Files for data exploration."""
| 17 | 33 | 0.676471 |
38035848ec2a23cd42bc4286e4ad1f990ea8887e | 4,913 | py | Python | examples/ModuleTests/004_userManagement.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | 1 | 2022-03-31T14:01:51.000Z | 2022-03-31T14:01:51.000Z | examples/ModuleTests/004_userManagement.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | null | null | null | examples/ModuleTests/004_userManagement.py | dasec/ForTrace | b8187522a2c83fb661e5a1a5f403da8f40a31ead | [
"MIT"
] | 1 | 2022-03-31T14:02:30.000Z | 2022-03-31T14:02:30.000Z | import logging
import time
try:
from fortrace.core.vmm import Vmm
from fortrace.utility.logger_helper import create_logger
from fortrace.core.vmm import GuestListener
from fortrace.core.reporter import Reporter
import fortrace.utility.scenarioHelper as scenH
except ImportError as ie:
print("Imp... | 25.588542 | 87 | 0.720944 |
38037ab202526e64311abec1b67fc3b2bf011224 | 2,806 | py | Python | test/temp/temp_snap_poi2.py | geolovic/topopy | 0ccfc4bfc0364b99489d08a1d4b87582deb08b81 | [
"MIT"
] | 5 | 2020-04-05T18:42:45.000Z | 2022-02-17T11:15:32.000Z | test/temp/temp_snap_poi2.py | geolovic/topopy | 0ccfc4bfc0364b99489d08a1d4b87582deb08b81 | [
"MIT"
] | null | null | null | test/temp/temp_snap_poi2.py | geolovic/topopy | 0ccfc4bfc0364b99489d08a1d4b87582deb08b81 | [
"MIT"
] | 5 | 2019-07-02T11:14:54.000Z | 2021-12-15T08:43:42.000Z | # -*- coding: utf-8 -*-
"""
Editor de Spyder
Este es un archivo temporal
"""
from topopy import Flow
import numpy as np
import matplotlib.pyplot as plt
def snap_points(self, input_points, threshold, kind="channel", remove_duplicates=False):
"""
Snap input points to channel cells or to stream POI
P... | 29.851064 | 94 | 0.614754 |
3803ab61b504767bd1bd2ece284eefeef20c4aa4 | 2,105 | py | Python | sunpy/database/tests/test_caching.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 628 | 2015-01-14T17:34:10.000Z | 2022-03-29T06:07:50.000Z | sunpy/database/tests/test_caching.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 3,983 | 2015-01-03T11:16:21.000Z | 2022-03-31T16:55:38.000Z | sunpy/database/tests/test_caching.py | johan12345/sunpy | 56e1ab0c2c992f99e0fe3e6bff468b731a51228c | [
"BSD-2-Clause"
] | 582 | 2015-01-14T10:09:24.000Z | 2022-03-29T06:07:12.000Z | # Author: Simon Liedtke <liedtke.simon@googlemail.com>
#
# This module was developed with funding provided by
# the Google Summer of Code (2013).
from collections import deque
import pytest
from sunpy.database.caching import BaseCache, LFUCache, LRUCache
def test_custom_cache():
class FIFO(BaseCache):
... | 24.764706 | 64 | 0.563895 |
3803af3e0eebfeb02926841587de54a489987bf0 | 548 | py | Python | leetcode_python/src/algorithms/arrays/find_minimum_in_rotated_sorted_array.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | leetcode_python/src/algorithms/arrays/find_minimum_in_rotated_sorted_array.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | leetcode_python/src/algorithms/arrays/find_minimum_in_rotated_sorted_array.py | attilagyoriid/leetcode_python | 457b1271cf58df8726d3ec35b4ac6d78a33c49a9 | [
"MIT"
] | null | null | null | from typing import List
class FindMinimumInRotatedSortedArray:
def calculate(self, items: List[int]) -> int:
result = items[0]
left, right = 0, len(items) - 1
while left <= right:
if items[left] < items[right]:
return min(result, items[left])
mi... | 23.826087 | 49 | 0.509124 |
3803c8185fb29e1c64d54b3122655e8d50bc2bfb | 4,638 | py | Python | aim/sdk/artifacts/model.py | jamesj-jiao/aim | 452380368f76ff441b2ff3a51029f4ad43a9d902 | [
"MIT"
] | null | null | null | aim/sdk/artifacts/model.py | jamesj-jiao/aim | 452380368f76ff441b2ff3a51029f4ad43a9d902 | [
"MIT"
] | null | null | null | aim/sdk/artifacts/model.py | jamesj-jiao/aim | 452380368f76ff441b2ff3a51029f4ad43a9d902 | [
"MIT"
] | null | null | null | import json
import os
import tempfile
import zipfile
from typing import Any
from aim.engine.utils import is_keras_model, is_pytorch_module, get_module
from aim.sdk.artifacts.artifact import Artifact
from aim.sdk.artifacts.record import Record
class Checkpoint(Artifact):
cat = ('models',)
@staticmethod
d... | 31.337838 | 74 | 0.5511 |
3803e387e9e7335690e8cdca7f1e9439cd44a543 | 5,608 | py | Python | test/memcache/mock_memcached.py | bianhaoyi/neproxy | 9c2c9e32ab84e9a91696c8754ffd2904888347d1 | [
"Apache-2.0"
] | 1 | 2015-03-10T01:52:37.000Z | 2015-03-10T01:52:37.000Z | test/memcache/mock_memcached.py | bianhaoyi/neproxy | 9c2c9e32ab84e9a91696c8754ffd2904888347d1 | [
"Apache-2.0"
] | null | null | null | test/memcache/mock_memcached.py | bianhaoyi/neproxy | 9c2c9e32ab84e9a91696c8754ffd2904888347d1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2012 Mixpanel, 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... | 34.617284 | 89 | 0.57632 |
3803fc5f3942846983fb3073d5508bc9e54dac43 | 665 | py | Python | src/classification_model/frame_updater.py | Haiduongcable/Project-1 | 81929e9d025215ba62ba8d8e69e032a84e57576f | [
"Apache-2.0"
] | null | null | null | src/classification_model/frame_updater.py | Haiduongcable/Project-1 | 81929e9d025215ba62ba8d8e69e032a84e57576f | [
"Apache-2.0"
] | null | null | null | src/classification_model/frame_updater.py | Haiduongcable/Project-1 | 81929e9d025215ba62ba8d8e69e032a84e57576f | [
"Apache-2.0"
] | null | null | null | from multiprocessing import Process, Queue
import threading
import time
class FrameUpdater(Process):
def __init__(self, current_frame, results, stop_dict):
super(FrameUpdater, self).__init__()
self.results = results
self.current_frame = current_frame
self.stop_dict = stop_dict
... | 33.25 | 72 | 0.613534 |
3803ff61b7e70de79f71bc32969f0767e4f8a728 | 12,114 | py | Python | app.py | SadhanaPaladugu/DogProject | 31ea6426c3ab93c3092d71ac657fe95f4add7989 | [
"MIT"
] | null | null | null | app.py | SadhanaPaladugu/DogProject | 31ea6426c3ab93c3092d71ac657fe95f4add7989 | [
"MIT"
] | null | null | null | app.py | SadhanaPaladugu/DogProject | 31ea6426c3ab93c3092d71ac657fe95f4add7989 | [
"MIT"
] | null | null | null |
import os
from sklearn.datasets import load_files
from keras.utils import np_utils
import numpy as np
from glob import glob
from flask import Flask, request, render_template,send_from_directory,send_file
from PIL import Image
from keras.layers import Conv2D, MaxPooling2D, GlobalAveragePooling2D
from keras.layer... | 34.710602 | 138 | 0.683837 |
38040635e6d6ea11e2d9a8253426384aa592f4f8 | 23,019 | py | Python | ForgeUserStats/forgeuserstats/tests/test_model.py | shalithasuranga/allura | 4f7fba13415954d07f602a051ec697329dd3706b | [
"Apache-2.0"
] | 1 | 2019-03-17T04:16:15.000Z | 2019-03-17T04:16:15.000Z | ForgeUserStats/forgeuserstats/tests/test_model.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | ForgeUserStats/forgeuserstats/tests/test_model.py | DalavanCloud/allura | a25329caed9e6d136a1004c33372e0632a16e352 | [
"Apache-2.0"
] | null | null | null | # 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 (t... | 47.559917 | 96 | 0.647856 |
380406aa8ba4e33a5cc7bec298d9b703635ef332 | 436 | py | Python | 58_Length-of-Last-Word.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | 3 | 2018-07-05T05:51:10.000Z | 2019-05-04T08:35:44.000Z | 58_Length-of-Last-Word.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | null | null | null | 58_Length-of-Last-Word.py | Coalin/Daily-LeetCode-Exercise | a064dcdc3a82314be4571d342c4807291a24f69f | [
"MIT"
] | null | null | null | class Solution(object):
def lengthOfLastWord(self, s):
"""
:type s: str
:rtype: int
"""
str = ''
length = 0
if len(s) == 0:
return 0
for i in reversed(s):
if i == ' ' and str != '':
return length
if i... | 21.8 | 38 | 0.360092 |
38040f4a073e518e0b0ade0b5a8c97850d90820b | 305 | py | Python | Example/p3_Alice.py | wac81/AIML_Chinese_python3 | 4f217270e056db2126012c658e14057bd31523fe | [
"MIT"
] | null | null | null | Example/p3_Alice.py | wac81/AIML_Chinese_python3 | 4f217270e056db2126012c658e14057bd31523fe | [
"MIT"
] | null | null | null | Example/p3_Alice.py | wac81/AIML_Chinese_python3 | 4f217270e056db2126012c658e14057bd31523fe | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
@author: yaleimeng@sina.com
@license: (C) Copyright 2017
@desc: python3 版本中文Alice,暂时简单添加空格
@DateTime: Created on 2017/11/15,at 10:20 '''
import Kernel
alice = Kernel.Kernel()
alice.learn("cn-test1.aiml")
while True:
print(alice.respond(input('Alice请您提问...>>')))
| 20.333333 | 52 | 0.662295 |
3804466d18db18f2b85826f00920fc273886b5ba | 62,623 | py | Python | pyxtal/lattice.py | paulsaxe/PyXtal | 203f8711a1978501dec211b1ebb7ebf8253940d2 | [
"MIT"
] | null | null | null | pyxtal/lattice.py | paulsaxe/PyXtal | 203f8711a1978501dec211b1ebb7ebf8253940d2 | [
"MIT"
] | null | null | null | pyxtal/lattice.py | paulsaxe/PyXtal | 203f8711a1978501dec211b1ebb7ebf8253940d2 | [
"MIT"
] | null | null | null | # Standard Libraries
import numpy as np
import random
# PyXtal imports
from pyxtal.msg import printx
from pyxtal.operations import angle, create_matrix
from pyxtal.constants import deg, rad
class Lattice:
"""
Class for storing and generating crystal lattices. Allows for
specification of constraint values.... | 37.453947 | 106 | 0.514156 |
38048e08c29bc1b80cccfe44f6a641c1a6646688 | 300 | py | Python | utils/permissions.py | Ikusaba-san/Tuxedo | b96f8d0e9275b5167bb29813f5142cdaa2a32609 | [
"MIT"
] | null | null | null | utils/permissions.py | Ikusaba-san/Tuxedo | b96f8d0e9275b5167bb29813f5142cdaa2a32609 | [
"MIT"
] | null | null | null | utils/permissions.py | Ikusaba-san/Tuxedo | b96f8d0e9275b5167bb29813f5142cdaa2a32609 | [
"MIT"
] | 1 | 2019-06-30T05:56:48.000Z | 2019-06-30T05:56:48.000Z | from discord.ext import commands
bot = None
def is_owner_check(ctx):
bot = ctx.bot
return str(ctx.message.author.id) in ctx.bot.config.get('OWNERS')
def owner_id_check(bot, _id):
return str(_id) in bot.config.get('OWNERS')
def owner():
return commands.check(is_owner_check)
| 18.75 | 69 | 0.7 |
3804bae71d4b7ec214d987fcd80fccedd840bd5d | 12,147 | py | Python | extra_data/keydata.py | kirienko/EXtra-data | 05de22b55fdc424473127335d2ca6b3a7026ab6d | [
"BSD-3-Clause"
] | null | null | null | extra_data/keydata.py | kirienko/EXtra-data | 05de22b55fdc424473127335d2ca6b3a7026ab6d | [
"BSD-3-Clause"
] | 28 | 2021-01-08T12:03:16.000Z | 2022-03-03T11:04:36.000Z | extra_data/keydata.py | kirienko/EXtra-data | 05de22b55fdc424473127335d2ca6b3a7026ab6d | [
"BSD-3-Clause"
] | null | null | null | from typing import List, Optional
import numpy as np
from .exceptions import TrainIDError
from .file_access import FileAccess
from .read_machinery import contiguous_regions, DataChunk, select_train_ids
class KeyData:
"""Data for one key in one source
Don't create this directly; get it from ``run[source, key... | 35.106936 | 84 | 0.57932 |
3804bb33f4c318734866d3c48bef451bdfd88c09 | 6,807 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/run_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/run_py3.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/models/run_py3.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"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.
# Changes ... | 50.051471 | 405 | 0.678272 |
3804c0ba08859e687f18a2dc9b4f8cf2c3f9cd63 | 10,269 | py | Python | bonneville/modules/lxc.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/modules/lxc.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/modules/lxc.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
Work with linux containers
:depends: lxc package for distribution
'''
# Import python libs
import logging
import tempfile
import os
#import bonneville libs
import bonneville.utils
# Set up logging
log = logging.getLogger(__name__)
# Don't shadow built-in's.
__func_alias__ = {
'list_... | 24.45 | 79 | 0.556724 |
3804c4fd0ece8cbed6e887c0ca320cfb49832fe5 | 687 | py | Python | sdk/resources/azure-mgmt-msi/azure/mgmt/msi/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/resources/azure-mgmt-msi/azure/mgmt/msi/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-msi/azure/mgmt/msi/__init__.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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.
# Changes may ... | 40.411765 | 94 | 0.609898 |
3804fb2e4400a9eeb49e2f0961876bdde1f6fbf8 | 3,301 | py | Python | test/vanilla/low-level/Expected/AcceptanceTests/BodyComplexLowLevel/bodycomplexlowlevel/_auto_rest_complex_test_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/low-level/Expected/AcceptanceTests/BodyComplexLowLevel/bodycomplexlowlevel/_auto_rest_complex_test_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/vanilla/low-level/Expected/AcceptanceTests/BodyComplexLowLevel/bodycomplexlowlevel/_auto_rest_complex_test_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"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.
# Changes may ... | 37.511364 | 105 | 0.654953 |
38051c9f5bcc57f158e2ac0a7cf6f086e9aaae79 | 1,618 | py | Python | bflib/characters/racialclass/bugbear.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | 3 | 2017-10-28T11:28:38.000Z | 2018-09-12T09:47:00.000Z | bflib/characters/racialclass/bugbear.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | bflib/characters/racialclass/bugbear.py | ChrisLR/BasicDungeonRL | b293d40bd9a0d3b7aec41b5e1d58441165997ff1 | [
"MIT"
] | null | null | null | from bflib import dice
from bflib import restrictions
from bflib.characters import specialabilities
from bflib.characters.classes.base import CharacterClass
from bflib.characters.classes.fighter import Fighter
from bflib.characters.classes.level import Level, LevelTable
from bflib.characters.specialabilities.set import... | 35.173913 | 79 | 0.60136 |
38053d1d628e71526abe577988a890a0ac025580 | 5,619 | py | Python | simple_deepqnetwork/dqn_multiagent/dqn_agent.py | SabareeshNikhil/244Bananas | 723966e66c9823527a9dc8b8d066fa2bcb1de70c | [
"MIT"
] | 1 | 2019-04-17T02:02:55.000Z | 2019-04-17T02:02:55.000Z | simple_deepqnetwork/dqn_multiagent/dqn_agent.py | SabareeshNikhil/244Bananas | 723966e66c9823527a9dc8b8d066fa2bcb1de70c | [
"MIT"
] | null | null | null | simple_deepqnetwork/dqn_multiagent/dqn_agent.py | SabareeshNikhil/244Bananas | 723966e66c9823527a9dc8b8d066fa2bcb1de70c | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
import torch.optim as optim
import numpy as np
import random
from collections import namedtuple, deque
from model import QNetwork
from replay_memory import ReplayBuffer
# Determine if CPU or GPU computation should be used
device = torch.device("cuda:0" if torch.cuda.is_av... | 38.486301 | 186 | 0.618437 |
380550ee331df3ca903651493c99006f4bf8a819 | 4,643 | py | Python | report-api/tests/unit/api/test_reports.py | mengdong19/sbc-pay | a5a1d81ae3500457178371fb004fd09194bbb6b7 | [
"Apache-2.0"
] | null | null | null | report-api/tests/unit/api/test_reports.py | mengdong19/sbc-pay | a5a1d81ae3500457178371fb004fd09194bbb6b7 | [
"Apache-2.0"
] | null | null | null | report-api/tests/unit/api/test_reports.py | mengdong19/sbc-pay | a5a1d81ae3500457178371fb004fd09194bbb6b7 | [
"Apache-2.0"
] | null | null | null | # Copyright © 2019 Province of British Columbia
#
# 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 agr... | 36.849206 | 86 | 0.673272 |
38056fa557848f63e5830c120395252a50022cd8 | 19,667 | py | Python | froi/widgets/surfacetreewidget.py | sunshineDrizzle/FreeROI | e2bae1a19835667988e9dbe4a1a88e5b2778d819 | [
"BSD-3-Clause"
] | 13 | 2016-02-12T05:10:23.000Z | 2021-01-13T01:40:12.000Z | froi/widgets/surfacetreewidget.py | sunshineDrizzle/FreeROI | e2bae1a19835667988e9dbe4a1a88e5b2778d819 | [
"BSD-3-Clause"
] | 14 | 2015-05-04T05:56:45.000Z | 2021-01-24T11:49:13.000Z | froi/widgets/surfacetreewidget.py | sunshineDrizzle/FreeROI | e2bae1a19835667988e9dbe4a1a88e5b2778d819 | [
"BSD-3-Clause"
] | 8 | 2016-03-07T06:29:51.000Z | 2017-10-30T13:59:27.000Z | #!/usr/bin/env python
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
import sys
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from treemodel import TreeModel
from froi.utils import *
from froi.core.dataobject import Surface
from froi.core.label... | 40.383984 | 98 | 0.641176 |
3806056f01a73d21faf3de4539c0dd1ada5f96f8 | 86,344 | py | Python | tensorflow/python/training/monitored_session_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/training/monitored_session_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/training/monitored_session_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # pylint: disable=g-bad-file-header
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENS... | 41.038023 | 84 | 0.696505 |
380613423ee872d6a08b7504bca3abb83307e148 | 269 | py | Python | terrascript/mikrotik/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/mikrotik/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/mikrotik/__init__.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/mikrotik/__init__.py
# Automatically generated by tools/makecode.py ()
import warnings
warnings.warn(
"using the 'legacy layout' is deprecated", DeprecationWarning, stacklevel=2
)
import terrascript
class mikrotik(terrascript.Provider):
pass
| 17.933333 | 79 | 0.773234 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.