hexsha stringlengths 40 40 | size int64 2 1.02M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 245 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 245 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 245 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.02M | avg_line_length float64 1 417k | max_line_length int64 1 987k | alphanum_fraction float64 0 1 | content_no_comment stringlengths 0 1.01M | is_comment_constant_removed bool 1
class | is_sharp_comment_removed bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f72a84f3844befc8aa1a322a61d1a30d58921cb7 | 5,638 | py | Python | apps/challenges/tests/test_challenges.py | gene1wood/spark | 071d6da19076ee047530220223d7beab3d31abab | [
"BSD-3-Clause"
] | 3 | 2015-12-09T15:02:03.000Z | 2017-10-05T16:54:14.000Z | apps/challenges/tests/test_challenges.py | gene1wood/spark | 071d6da19076ee047530220223d7beab3d31abab | [
"BSD-3-Clause"
] | 2 | 2019-02-17T17:29:25.000Z | 2019-03-28T03:40:58.000Z | apps/challenges/tests/test_challenges.py | gene1wood/spark | 071d6da19076ee047530220223d7beab3d31abab | [
"BSD-3-Clause"
] | 3 | 2019-03-28T03:41:01.000Z | 2020-04-29T09:47:21.000Z | import logging
from datetime import datetime, timedelta
from spark.tests import TestCase
from nose.tools import eq_
from geo.continents import (AFRICA, ASIA, EUROPE, NORTH_AMERICA, SOUTH_AMERICA,
OCEANIA, ANTARCTICA)
from users.models import User
from stats.models import SharingHistory
f... | 27.773399 | 79 | 0.631075 | import logging
from datetime import datetime, timedelta
from spark.tests import TestCase
from nose.tools import eq_
from geo.continents import (AFRICA, ASIA, EUROPE, NORTH_AMERICA, SOUTH_AMERICA,
OCEANIA, ANTARCTICA)
from users.models import User
from stats.models import SharingHistory
f... | true | true |
f72a8508eb15e1b3e71b5ca8ef252bc825472afa | 15,226 | py | Python | tests/integration-tests/tests/storage/test_ebs.py | eshpc/aws-parallelcluster | 8cc6169a12661ce1c0025c93ebd9019c26e7219e | [
"Apache-2.0"
] | null | null | null | tests/integration-tests/tests/storage/test_ebs.py | eshpc/aws-parallelcluster | 8cc6169a12661ce1c0025c93ebd9019c26e7219e | [
"Apache-2.0"
] | 108 | 2021-10-11T09:12:06.000Z | 2022-03-28T09:28:39.000Z | tests/integration-tests/tests/storage/test_ebs.py | yuleiwan/aws-parallelcluster | aad2a3019ef4ad08d702f5acf41b152b3f7a0b46 | [
"Apache-2.0"
] | null | null | null | # 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 "LICENSE.txt" file acc... | 46.705521 | 120 | 0.732825 | import logging
import boto3
import pytest
import utils
from assertpy import assert_that
from remote_command_executor import RemoteCommandExecutor
from tests.common.schedulers_common import get_scheduler_commands
from tests.storage.kms_key_factory import KMSKeyFactory
from tests.storage.snapshots_factory import EBSSna... | true | true |
f72a864d02a1615e377a438d9b2868959da2187a | 8,179 | py | Python | tensorflow_text/python/ops/bert_tokenizer.py | kornesh/text | f762def9dbb14f8f182936dd25af154af79f366e | [
"Apache-2.0"
] | null | null | null | tensorflow_text/python/ops/bert_tokenizer.py | kornesh/text | f762def9dbb14f8f182936dd25af154af79f366e | [
"Apache-2.0"
] | null | null | null | tensorflow_text/python/ops/bert_tokenizer.py | kornesh/text | f762def9dbb14f8f182936dd25af154af79f366e | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 TF.Text Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 40.093137 | 80 | 0.711334 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import copy
from tensorflow.python.framework import dtypes
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import lookup_ops
from tensorflow.python.ops import string_ops
from tensorflow... | true | true |
f72a86580356f7077caa16bc6708c93567dae160 | 6,746 | py | Python | py_algorithms/data_structures/heap.py | rlishtaba/py-algorithms-playground | ce7cf332483e01d05bcad98921d736c33a33a66c | [
"MIT"
] | 31 | 2017-09-17T06:29:15.000Z | 2022-03-11T14:45:40.000Z | py_algorithms/data_structures/heap.py | MindaugasVaitkus2/py-algorithms | ce7cf332483e01d05bcad98921d736c33a33a66c | [
"MIT"
] | null | null | null | py_algorithms/data_structures/heap.py | MindaugasVaitkus2/py-algorithms | ce7cf332483e01d05bcad98921d736c33a33a66c | [
"MIT"
] | 11 | 2017-11-01T20:33:20.000Z | 2022-02-13T16:54:21.000Z | import sys
from typing import Any
from typing import Callable
from typing import List
from typing import Union
from ..utils import test_iterable
class _HeapNode:
def __init__(self, key: Any, value: Any):
self.key = key
self.value = value
self.degree = 0
self.marked = False
... | 29.982222 | 88 | 0.546991 | import sys
from typing import Any
from typing import Callable
from typing import List
from typing import Union
from ..utils import test_iterable
class _HeapNode:
def __init__(self, key: Any, value: Any):
self.key = key
self.value = value
self.degree = 0
self.marked = False
... | true | true |
f72a885aba97b22f715ae7119075a6a258e3e0a9 | 3,885 | py | Python | func.py | Abner0627/IPRV_Optical-Flow | 85c0650f671ad44c8bbe1d820a761be42cbe56d0 | [
"MIT"
] | null | null | null | func.py | Abner0627/IPRV_Optical-Flow | 85c0650f671ad44c8bbe1d820a761be42cbe56d0 | [
"MIT"
] | null | null | null | func.py | Abner0627/IPRV_Optical-Flow | 85c0650f671ad44c8bbe1d820a761be42cbe56d0 | [
"MIT"
] | null | null | null | import cv2
import os
import numpy as np
import matplotlib.pyplot as plt
# %%
def _pick(L, ty, path):
L_ = [cv2.imread(os.path.join(path, i)) for i in L if i.split('_')[0]==ty]
# 輸入影像
return L_
def _gray(img):
return cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
def _Pos(img, idx):
def on_press(event):
... | 32.107438 | 122 | 0.488288 | import cv2
import os
import numpy as np
import matplotlib.pyplot as plt
def _pick(L, ty, path):
L_ = [cv2.imread(os.path.join(path, i)) for i in L if i.split('_')[0]==ty]
return L_
def _gray(img):
return cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
def _Pos(img, idx):
def on_press(event):
L.appe... | true | true |
f72a8a9e767b0990ec36270d87dafab2e37e3e27 | 276,837 | py | Python | mindspore/ops/operations/nn_ops.py | Rossil2012/mindspore | 8a20b5d784b3fec6d32e058581ec56ec553a06a0 | [
"Apache-2.0"
] | 1 | 2021-04-23T06:35:18.000Z | 2021-04-23T06:35:18.000Z | mindspore/ops/operations/nn_ops.py | nudt-eddie/mindspore | 55372b41fdfae6d2b88d7078971e06d537f6c558 | [
"Apache-2.0"
] | null | null | null | mindspore/ops/operations/nn_ops.py | nudt-eddie/mindspore | 55372b41fdfae6d2b88d7078971e06d537f6c558 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 48.807652 | 120 | 0.628525 |
import math
import operator
from functools import reduce
import numpy as np
from ... import context
from .. import signature as sig
from ..._checkparam import Validator as validator
from ..._checkparam import Rel
from ...common import dtype as mstype
from ..primitive import Primitive, PrimitiveWithInfer, PrimitiveW... | true | true |
f72a8af8ff8184287d32ace234a39d44ce65d605 | 25,935 | py | Python | lib/kb_das_tool/Utils/DASToolUtil.py | n1mus/kb_das_tool | e19f2c68aa24a93eec95a2dcbb6d662d7c088dcc | [
"MIT"
] | null | null | null | lib/kb_das_tool/Utils/DASToolUtil.py | n1mus/kb_das_tool | e19f2c68aa24a93eec95a2dcbb6d662d7c088dcc | [
"MIT"
] | null | null | null | lib/kb_das_tool/Utils/DASToolUtil.py | n1mus/kb_das_tool | e19f2c68aa24a93eec95a2dcbb6d662d7c088dcc | [
"MIT"
] | null | null | null | import errno
import json
import os
import subprocess
import sys
import time
import uuid
import zipfile
import shutil
from Bio import SeqIO
from installed_clients.AssemblyUtilClient import AssemblyUtil
from installed_clients.DataFileUtilClient import DataFileUtil
from installed_clients.KBaseReportClient import KBaseRe... | 44.409247 | 154 | 0.609794 | import errno
import json
import os
import subprocess
import sys
import time
import uuid
import zipfile
import shutil
from Bio import SeqIO
from installed_clients.AssemblyUtilClient import AssemblyUtil
from installed_clients.DataFileUtilClient import DataFileUtil
from installed_clients.KBaseReportClient import KBaseRe... | true | true |
f72a8b1d41dcd8162bc15ea1ac9f0f974c941910 | 801 | py | Python | venv/Scripts/f2py.py | nfuster2017/AmazonWebCrawler | d45e2dec826b5cadd632ed8a94c2c4c127430000 | [
"MIT"
] | 1 | 2019-07-28T05:32:10.000Z | 2019-07-28T05:32:10.000Z | venv/Scripts/f2py.py | nfuster2017/AmazonWebCrawler | d45e2dec826b5cadd632ed8a94c2c4c127430000 | [
"MIT"
] | 4 | 2021-06-08T20:08:26.000Z | 2022-03-11T23:54:16.000Z | venv/Scripts/f2py.py | nfuster2017/AmazonWebCrawler | d45e2dec826b5cadd632ed8a94c2c4c127430000 | [
"MIT"
] | null | null | null | #!D:\School\UMD\INST326\Group Project\venv\Scripts\python.exe
# See http://cens.ioc.ee/projects/f2py2e/
from __future__ import division, print_function
import os
import sys
for mode in ["g3-numpy", "2e-numeric", "2e-numarray", "2e-numpy"]:
try:
i = sys.argv.index("--" + mode)
del sys.argv[i]
... | 27.62069 | 67 | 0.645443 | from __future__ import division, print_function
import os
import sys
for mode in ["g3-numpy", "2e-numeric", "2e-numarray", "2e-numpy"]:
try:
i = sys.argv.index("--" + mode)
del sys.argv[i]
break
except ValueError:
pass
os.environ["NO_SCIPY_IMPORT"] = "f2py"
if mode == "g3-numpy"... | true | true |
f72a8d3c2c03ab88dbb2873eded7eee4dbec4655 | 1,951 | py | Python | testing/exercise/vehicle/test/test_vehicle.py | PetkoAndreev/Python-OOP | 2cc3094940cdf078f0ee60be938e883f843766e4 | [
"MIT"
] | 1 | 2021-05-27T07:59:17.000Z | 2021-05-27T07:59:17.000Z | testing/exercise/vehicle/test/test_vehicle.py | PetkoAndreev/Python-OOP | 2cc3094940cdf078f0ee60be938e883f843766e4 | [
"MIT"
] | null | null | null | testing/exercise/vehicle/test/test_vehicle.py | PetkoAndreev/Python-OOP | 2cc3094940cdf078f0ee60be938e883f843766e4 | [
"MIT"
] | null | null | null | import unittest
from python_oop.testing.exercise.vehicle.project.vehicle import Vehicle
# from project.vehicle import Vehicle
class VehicleTest(unittest.TestCase):
def setUp(self):
self.vehicle = Vehicle(50.0, 300.0)
def test_vehicle__init_method(self):
self.assertEqual(50.0, self.vehicle.fu... | 36.811321 | 128 | 0.708355 | import unittest
from python_oop.testing.exercise.vehicle.project.vehicle import Vehicle
class VehicleTest(unittest.TestCase):
def setUp(self):
self.vehicle = Vehicle(50.0, 300.0)
def test_vehicle__init_method(self):
self.assertEqual(50.0, self.vehicle.fuel)
self.assertEqual(50.0, sel... | true | true |
f72a8f6331ddd325a61a09e43d5a54e5309a6648 | 1,760 | py | Python | examples/ad_manager/v201911/user_service/get_all_users.py | MattCardoso/googleads-python-lib | 62f0db9fdb78a1bcdb1e61c82c609d9f47cb48d8 | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v201911/user_service/get_all_users.py | MattCardoso/googleads-python-lib | 62f0db9fdb78a1bcdb1e61c82c609d9f47cb48d8 | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v201911/user_service/get_all_users.py | MattCardoso/googleads-python-lib | 62f0db9fdb78a1bcdb1e61c82c609d9f47cb48d8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 35.2 | 78 | 0.702841 |
from googleads import ad_manager
def main(client):
user_service = client.GetService('UserService', version='v201911')
statement = ad_manager.StatementBuilder(version='v201911')
while True:
response = user_service.getUsersByStatement(statement.ToStatement())
if 'results' in response and len(re... | true | true |
f72a8ffa64b566ce6eec8c0c16ba2850ac0a95f6 | 2,245 | py | Python | examples/lm1b/main.py | mjsML/fast_flax | d982b59b715524884d08d6ed506ab325e8be1ece | [
"Apache-2.0"
] | null | null | null | examples/lm1b/main.py | mjsML/fast_flax | d982b59b715524884d08d6ed506ab325e8be1ece | [
"Apache-2.0"
] | 1 | 2021-08-16T09:16:55.000Z | 2021-08-16T09:16:55.000Z | examples/lm1b/main.py | mjsML/fast_flax | d982b59b715524884d08d6ed506ab325e8be1ece | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Flax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 34.015152 | 80 | 0.728285 |
from absl import app
from absl import flags
from absl import logging
from clu import platform
import train
import jax
from ml_collections import config_flags
import tensorflow as tf
FLAGS = flags.FLAGS
flags.DEFINE_string('workdir', None, 'Directory to store model data.')
config_flags.DEFINE_config_file(
'conf... | true | true |
f72a91102600de8d03a0b64c5ee35b9767a86fd4 | 4,373 | py | Python | dash_core_components/RangeSlider.py | mako-npm/dash-core-components | 0cbc3d8093c678e59b5b4dfa3aa2637d071a5b33 | [
"MIT"
] | null | null | null | dash_core_components/RangeSlider.py | mako-npm/dash-core-components | 0cbc3d8093c678e59b5b4dfa3aa2637d071a5b33 | [
"MIT"
] | null | null | null | dash_core_components/RangeSlider.py | mako-npm/dash-core-components | 0cbc3d8093c678e59b5b4dfa3aa2637d071a5b33 | [
"MIT"
] | null | null | null | # AUTO GENERATED FILE - DO NOT EDIT
from dash.development.base_component import Component, _explicitize_args
class RangeSlider(Component):
"""A RangeSlider component.
A double slider with two handles.
Used for specifying a range of numerical values.
Keyword arguments:
- id (string; optional)
- marks (optional):... | 59.094595 | 490 | 0.732678 |
from dash.development.base_component import Component, _explicitize_args
class RangeSlider(Component):
@_explicitize_args
def __init__(self, id=Component.UNDEFINED, marks=Component.UNDEFINED, value=Component.UNDEFINED, allowCross=Component.UNDEFINED, className=Component.UNDEFINED, count=Component.UNDEFINED, ... | true | true |
f72a9127d88cdefba5bdb5fb1446f97866851501 | 1,697 | py | Python | model/optimizer.py | keonlee9420/DiffSinger | 2bfcae4a78068c2061eae64ee675959a077aa54b | [
"MIT"
] | 95 | 2021-06-04T02:22:36.000Z | 2022-03-25T03:19:51.000Z | model/optimizer.py | keonlee9420/DiffSinger | 2bfcae4a78068c2061eae64ee675959a077aa54b | [
"MIT"
] | 3 | 2021-06-23T08:57:00.000Z | 2021-10-14T10:44:43.000Z | model/optimizer.py | keonlee9420/DiffSinger | 2bfcae4a78068c2061eae64ee675959a077aa54b | [
"MIT"
] | 15 | 2021-06-04T03:09:12.000Z | 2022-03-30T08:23:05.000Z | import torch
import numpy as np
class ScheduledOptim:
""" A simple wrapper class for learning rate scheduling """
def __init__(self, model, train_config, model_config, current_step):
self._optimizer = torch.optim.Adam(
model.parameters(),
betas=train_config["optimi... | 32.634615 | 73 | 0.592222 | import torch
import numpy as np
class ScheduledOptim:
def __init__(self, model, train_config, model_config, current_step):
self._optimizer = torch.optim.Adam(
model.parameters(),
betas=train_config["optimizer"]["betas"],
eps=train_config["optimizer"]["eps"]... | true | true |
f72a913c6611cb848d4d5714cbbb1562b72dda22 | 14,624 | py | Python | billforward/models/resume_subscription_amendment.py | billforward/bf-python | d2b812329ca3ed1fd94364d7f46f69ad74665596 | [
"Apache-2.0"
] | 2 | 2016-11-23T17:32:37.000Z | 2022-02-24T05:13:20.000Z | billforward/models/resume_subscription_amendment.py | billforward/bf-python | d2b812329ca3ed1fd94364d7f46f69ad74665596 | [
"Apache-2.0"
] | null | null | null | billforward/models/resume_subscription_amendment.py | billforward/bf-python | d2b812329ca3ed1fd94364d7f46f69ad74665596 | [
"Apache-2.0"
] | 1 | 2016-12-30T20:02:48.000Z | 2016-12-30T20:02:48.000Z | # coding: utf-8
"""
BillForward REST API
OpenAPI spec version: 1.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
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... | 34.088578 | 477 | 0.601409 |
from pprint import pformat
from six import iteritems
import re
class ResumeSubscriptionAmendment(object):
def __init__(self, created=None, changed_by=None, updated=None, type=None, id=None, organization_id=None, subscription_id=None, amendment_type=None, actioning_time=None, actioned_time=None, state=None, dele... | true | true |
f72a91979056173940df72257c9632371d082496 | 7,763 | py | Python | zun/objects/container_action.py | hualingson/zun | 4fc4e9e0e0f5478d749215c7ba0679a8502f7737 | [
"Apache-2.0"
] | null | null | null | zun/objects/container_action.py | hualingson/zun | 4fc4e9e0e0f5478d749215c7ba0679a8502f7737 | [
"Apache-2.0"
] | null | null | null | zun/objects/container_action.py | hualingson/zun | 4fc4e9e0e0f5478d749215c7ba0679a8502f7737 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 40.643979 | 79 | 0.637382 |
import traceback
from oslo_log import log as logging
from oslo_utils import timeutils
from oslo_versionedobjects import fields
import six
from zun.db import api as dbapi
from zun.objects import base
LOG = logging.getLogger(__name__)
@base.ZunObjectRegistry.register
class ContainerAction(base.ZunPersistentObject, ... | true | true |
f72a92773a71cfadb3c6851d87b7e65eff09358d | 6,096 | py | Python | BaseExtension.py | heyzec/Inkscape-Extentions | dedfc5e6d567218a397d48133c4cb5a62cd5b09b | [
"MIT"
] | 5 | 2021-07-04T10:28:49.000Z | 2022-02-22T16:48:04.000Z | BaseExtension.py | heyzec/Inkscape-Extentions | dedfc5e6d567218a397d48133c4cb5a62cd5b09b | [
"MIT"
] | null | null | null | BaseExtension.py | heyzec/Inkscape-Extentions | dedfc5e6d567218a397d48133c4cb5a62cd5b09b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# pylint: disable=too-many-ancestors
# standard library
import os
import sys
import re
import argparse
from shutil import copy2
# from subprocess import Popen, PIPE
# import time
# from lxml import etree
# local library
import inkex
from inkex.command import inkscape
from inkex.elements import... | 32.425532 | 103 | 0.58563 |
import os
import sys
import re
import argparse
from shutil import copy2
import inkex
from inkex.command import inkscape
from inkex.elements import _selected as selection
MIN_PYTHON_VERSION = (3, 6) if (sys.version_info.major, sys.version_info.minor) < (3, 6):
inkex.Effect.msg(f"Python {MIN_PYTHON_VERSION[0]}.{... | true | true |
f72a93a6ef5bdbef78fc92eeacc5548f6c09045a | 181 | py | Python | delphi_epidata/_constants.py | lee14257/delphi-epidata-py | ca84147fb75a50b073bab43e77dcb32b52b26f4b | [
"MIT"
] | null | null | null | delphi_epidata/_constants.py | lee14257/delphi-epidata-py | ca84147fb75a50b073bab43e77dcb32b52b26f4b | [
"MIT"
] | null | null | null | delphi_epidata/_constants.py | lee14257/delphi-epidata-py | ca84147fb75a50b073bab43e77dcb32b52b26f4b | [
"MIT"
] | 1 | 2021-12-22T23:56:58.000Z | 2021-12-22T23:56:58.000Z | from typing import Final
__version__: Final = "1.0.0"
HTTP_HEADERS: Final = {"User-Agent": f"delphi_epidata/{__version__}"}
BASE_URL: Final = "https://delphi.cmu.edu/epidata/"
| 18.1 | 69 | 0.712707 | from typing import Final
__version__: Final = "1.0.0"
HTTP_HEADERS: Final = {"User-Agent": f"delphi_epidata/{__version__}"}
BASE_URL: Final = "https://delphi.cmu.edu/epidata/"
| true | true |
f72a948c70be197e27db61e983500bbbb2328e4d | 1,015 | py | Python | plugins/readme/girder_readme/rest.py | JKitok/girder | 317962d155fc9811d25e5f33bd3e849c4ac96645 | [
"Apache-2.0"
] | 395 | 2015-01-12T19:20:13.000Z | 2022-03-30T05:40:40.000Z | plugins/readme/girder_readme/rest.py | JKitok/girder | 317962d155fc9811d25e5f33bd3e849c4ac96645 | [
"Apache-2.0"
] | 2,388 | 2015-01-01T20:09:19.000Z | 2022-03-29T16:49:14.000Z | plugins/readme/girder_readme/rest.py | JKitok/girder | 317962d155fc9811d25e5f33bd3e849c4ac96645 | [
"Apache-2.0"
] | 177 | 2015-01-04T14:47:00.000Z | 2022-03-25T09:01:51.000Z | # -*- coding: utf-8 -*-
import re
import cherrypy
from girder.api import access
from girder.api.describe import Description, autoDescribeRoute
from girder.constants import AccessType, TokenScope
from girder.models.file import File as FileModel
from girder.models.folder import Folder as FolderModel
from girder.models.it... | 32.741935 | 64 | 0.693596 | import re
import cherrypy
from girder.api import access
from girder.api.describe import Description, autoDescribeRoute
from girder.constants import AccessType, TokenScope
from girder.models.file import File as FileModel
from girder.models.folder import Folder as FolderModel
from girder.models.item import Item as ItemMo... | true | true |
f72a950bc8465538bf3a53bd013a276fafc97895 | 28,988 | py | Python | sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py | lynshi/azure-sdk-for-python | 40c530f2e9a6d93025b01cc8f6c94829c7fe95fc | [
"MIT"
] | null | null | null | sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py | lynshi/azure-sdk-for-python | 40c530f2e9a6d93025b01cc8f6c94829c7fe95fc | [
"MIT"
] | null | null | null | sdk/textanalytics/azure-ai-textanalytics/tests/test_analyze.py | lynshi/azure-sdk-for-python | 40c530f2e9a6d93025b01cc8f6c94829c7fe95fc | [
"MIT"
] | null | null | null | # coding=utf-8
# ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import os
import pytest
import platform
import functools
import itertools
import datetime
from azure.core.exceptions import HttpResponseError, ClientAut... | 44.054711 | 146 | 0.630537 |
import os
import pytest
import platform
import functools
import itertools
import datetime
from azure.core.exceptions import HttpResponseError, ClientAuthenticationError
from azure.core.credentials import AzureKeyCredential
from testcase import TextAnalyticsTest, GlobalTextAnalyticsAccountPreparer
from testcase import... | true | true |
f72a95a36cb73e6369f0ae2694d3a4c317a14ec5 | 1,549 | py | Python | package/spack-py-backcall/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | 1 | 2018-07-17T07:45:09.000Z | 2018-07-17T07:45:09.000Z | package/spack-py-backcall/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | package/spack-py-backcall/package.py | ctuning/ck-spack | 307934efce1be2d4f104251275c82fbc70127105 | [
"BSD-3-Clause"
] | null | null | null | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 44.257143 | 78 | 0.68173 | from spack import *
class PyBackcall(PythonPackage):
homepage = "https://github.com/takluyver/backcall"
url = "https://pypi.io/packages/source/b/backcall/backcall-0.1.0.tar.gz"
version('0.1.0', '87ce0c7839808e6a3427d57df6a792e7')
| true | true |
f72a95f93d1a01fdc3492157c0b5fc9e8d191481 | 524 | py | Python | alembic/versions/1c697a5bd34f_addeding_lessons_tau.py | codeforamerica/bizfriendly-api | b3f3b9f83652ec67752d629baaf0bc1d4ec67695 | [
"BSD-Source-Code"
] | 13 | 2015-04-27T14:26:19.000Z | 2021-11-21T16:11:17.000Z | alembic/versions/1c697a5bd34f_addeding_lessons_tau.py | codeforamerica/bizfriendly-api | b3f3b9f83652ec67752d629baaf0bc1d4ec67695 | [
"BSD-Source-Code"
] | 15 | 2015-04-25T22:29:50.000Z | 2016-09-01T16:59:21.000Z | alembic/versions/1c697a5bd34f_addeding_lessons_tau.py | codeforamerica/bizfriendly-api | b3f3b9f83652ec67752d629baaf0bc1d4ec67695 | [
"BSD-Source-Code"
] | 9 | 2015-06-19T19:48:40.000Z | 2021-04-16T10:27:29.000Z | """Addeding lessons taught to user
Revision ID: 1c697a5bd34f
Revises: 23aebf11a765
Create Date: 2014-01-04 13:13:39.599020
"""
# revision identifiers, used by Alembic.
revision = '1c697a5bd34f'
down_revision = '23aebf11a765'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto gener... | 19.407407 | 63 | 0.694656 |
revision = '1c697a5bd34f'
down_revision = '23aebf11a765'
from alembic import op
import sqlalchemy as sa
def upgrade():
pass
def downgrade():
pass
| true | true |
f72a96fc280c4b6ed142ea022c0e6662161e6044 | 378 | py | Python | tests/operator/function_test.py | MingboPeng/queenbee | a7968b0f88833cdfab928ca681057bf245f36ed2 | [
"MIT"
] | null | null | null | tests/operator/function_test.py | MingboPeng/queenbee | a7968b0f88833cdfab928ca681057bf245f36ed2 | [
"MIT"
] | null | null | null | tests/operator/function_test.py | MingboPeng/queenbee | a7968b0f88833cdfab928ca681057bf245f36ed2 | [
"MIT"
] | null | null | null | import yaml
from tests.base.io_test import BaseIOTest
from tests.base.value_error import BaseValueErrorTest
from queenbee.operator.function import Function
ASSET_FOLDER = 'tests/assets/functions'
class TestIO(BaseIOTest):
klass = Function
asset_folder = ASSET_FOLDER
class TestValueError(BaseValueErrorTest... | 18.9 | 53 | 0.793651 | import yaml
from tests.base.io_test import BaseIOTest
from tests.base.value_error import BaseValueErrorTest
from queenbee.operator.function import Function
ASSET_FOLDER = 'tests/assets/functions'
class TestIO(BaseIOTest):
klass = Function
asset_folder = ASSET_FOLDER
class TestValueError(BaseValueErrorTest... | true | true |
f72a99520193f77a04dcbe1808375927c8ee383b | 289 | py | Python | Feature/structure_tensor_eigenvalues.py | Joevaen/Scikit-image_On_CT | e3bf0eeadc50691041b4b7c44a19d07546a85001 | [
"Apache-2.0"
] | null | null | null | Feature/structure_tensor_eigenvalues.py | Joevaen/Scikit-image_On_CT | e3bf0eeadc50691041b4b7c44a19d07546a85001 | [
"Apache-2.0"
] | null | null | null | Feature/structure_tensor_eigenvalues.py | Joevaen/Scikit-image_On_CT | e3bf0eeadc50691041b4b7c44a19d07546a85001 | [
"Apache-2.0"
] | null | null | null | # 计算结构张量的特征值。
from skimage.feature import structure_tensor
from skimage.feature import structure_tensor_eigenvalues
import numpy as np
square = np.zeros((5, 5))
square[2, 2] = 1
A_elems = structure_tensor(square, sigma=0.1, order='rc')
print(structure_tensor_eigenvalues(A_elems)[0])
| 20.642857 | 57 | 0.778547 |
from skimage.feature import structure_tensor
from skimage.feature import structure_tensor_eigenvalues
import numpy as np
square = np.zeros((5, 5))
square[2, 2] = 1
A_elems = structure_tensor(square, sigma=0.1, order='rc')
print(structure_tensor_eigenvalues(A_elems)[0])
| true | true |
f72a99912cc462e12e16df173b954984f4d5d9a7 | 6,184 | py | Python | nomadgram/images/views.py | wayhome25/nomadgram | 54d578e5674a0b35786d6c889b06ba019b648575 | [
"MIT"
] | null | null | null | nomadgram/images/views.py | wayhome25/nomadgram | 54d578e5674a0b35786d6c889b06ba019b648575 | [
"MIT"
] | 11 | 2020-09-05T05:23:03.000Z | 2022-03-11T23:26:18.000Z | nomadgram/images/views.py | wayhome25/nomadgram | 54d578e5674a0b35786d6c889b06ba019b648575 | [
"MIT"
] | 4 | 2017-12-22T05:53:37.000Z | 2020-04-25T03:13:47.000Z | from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from django.db.models import Q
from django.shortcuts import get_object_or_404
from nomadgram.images.models import Comment
from nomadgram.images.models import Image
from nomadgram.images.models impor... | 37.02994 | 109 | 0.687581 | from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from django.db.models import Q
from django.shortcuts import get_object_or_404
from nomadgram.images.models import Comment
from nomadgram.images.models import Image
from nomadgram.images.models impor... | true | true |
f72a99a11e52fd71703f1220515453c9acbbe085 | 552 | py | Python | socialnews/mptt/tests/settings.py | agiliq/django-socialnews | aa4a1a4a0e3279e6c7999071648ba37c71df9d15 | [
"BSD-3-Clause"
] | 30 | 2015-01-18T16:34:03.000Z | 2021-05-23T20:05:54.000Z | socialnews/mptt/tests/settings.py | agiliq/django-socialnews | aa4a1a4a0e3279e6c7999071648ba37c71df9d15 | [
"BSD-3-Clause"
] | null | null | null | socialnews/mptt/tests/settings.py | agiliq/django-socialnews | aa4a1a4a0e3279e6c7999071648ba37c71df9d15 | [
"BSD-3-Clause"
] | 11 | 2015-02-21T10:45:41.000Z | 2021-01-24T21:08:20.000Z | import os
DIRNAME = os.path.dirname(__file__)
DEBUG = True
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = os.path.join(DIRNAME, 'mptt.db')
#DATABASE_ENGINE = 'mysql'
#DATABASE_NAME = 'mptt_test'
#DATABASE_USER = 'root'
#DATABASE_PASSWORD = ''
#DATABASE_HOST = 'localhost'
#DATABASE_PORT = '3306'
#DATAB... | 19.714286 | 49 | 0.684783 | import os
DIRNAME = os.path.dirname(__file__)
DEBUG = True
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = os.path.join(DIRNAME, 'mptt.db')
INSTALLED_APPS = (
'mptt',
'mptt.tests',
)
| true | true |
f72a9a36d3435f37d58e7109c367b25a53d50743 | 541 | py | Python | samples/fan_in_fan_out/HttpStart/__init__.py | sebastianburckhardt/azure-functions-durable-python | 634f70887e415f0ff9e7ee1e2fb3f58f90112772 | [
"MIT"
] | 78 | 2020-03-30T19:05:23.000Z | 2022-03-30T06:55:47.000Z | samples/fan_in_fan_out/HttpStart/__init__.py | sebastianburckhardt/azure-functions-durable-python | 634f70887e415f0ff9e7ee1e2fb3f58f90112772 | [
"MIT"
] | 180 | 2020-04-01T22:25:59.000Z | 2022-03-29T14:23:16.000Z | samples/fan_in_fan_out/HttpStart/__init__.py | sebastianburckhardt/azure-functions-durable-python | 634f70887e415f0ff9e7ee1e2fb3f58f90112772 | [
"MIT"
] | 40 | 2020-03-31T19:52:31.000Z | 2022-02-06T05:52:44.000Z | import logging
import json
import azure.functions as func
import azure.durable_functions as df
async def main(req: func.HttpRequest, starter: str) -> func.HttpResponse:
client = df.DurableOrchestrationClient(starter)
payload: str = json.loads(req.get_body().decode()) # Load JSON post request data
instance... | 38.642857 | 96 | 0.770795 | import logging
import json
import azure.functions as func
import azure.durable_functions as df
async def main(req: func.HttpRequest, starter: str) -> func.HttpResponse:
client = df.DurableOrchestrationClient(starter)
payload: str = json.loads(req.get_body().decode()) instance_id = await client.start_new(r... | true | true |
f72a9a3bdb59d938db776e22dab6ecf91d768216 | 9,420 | py | Python | Ryven/packages/auto_generated/ctypes.test.test_pickling/nodes.py | tfroehlich82/Ryven | cb57c91d13949712844a4410a9302c4a90d28dcd | [
"MIT"
] | 2,872 | 2020-07-01T09:06:34.000Z | 2022-03-31T05:52:32.000Z | Ryven/packages/auto_generated/ctypes.test.test_pickling/nodes.py | dhf327/Ryven | a11e361528d982a9dd3c489dd536f8b05ffd56e1 | [
"MIT"
] | 59 | 2020-06-28T12:50:50.000Z | 2022-03-27T19:07:54.000Z | Ryven/packages/auto_generated/ctypes.test.test_pickling/nodes.py | dhf327/Ryven | a11e361528d982a9dd3c489dd536f8b05ffd56e1 | [
"MIT"
] | 339 | 2020-07-05T04:36:20.000Z | 2022-03-24T07:25:18.000Z |
from NENV import *
import ctypes.test.test_pickling
class NodeBase(Node):
pass
class Array_Node(NodeBase):
"""
"""
title = 'ARRAY'
type_ = 'ctypes.test.test_pickling'
init_inputs = [
NodeInputBP(label='typ'),
NodeInputBP(label='len'),
]
init_outputs = [
... | 25.254692 | 120 | 0.619639 |
from NENV import *
import ctypes.test.test_pickling
class NodeBase(Node):
pass
class Array_Node(NodeBase):
title = 'ARRAY'
type_ = 'ctypes.test.test_pickling'
init_inputs = [
NodeInputBP(label='typ'),
NodeInputBP(label='len'),
]
init_outputs = [
NodeOutputBP(ty... | true | true |
f72a9b400fc3d0e9b4c84e2cd50ded8e71059a28 | 6,080 | py | Python | corehq/apps/smsforms/app.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/smsforms/app.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | corehq/apps/smsforms/app.py | dborowiecki/commcare-hq | f2f4fa67faec09040a98502f5657444075b63f2e | [
"BSD-3-Clause"
] | null | null | null | import re
import uuid
from xml.etree.cElementTree import XML, tostring
from django.conf import settings
from dimagi.utils.parsing import json_format_datetime
from corehq.apps.app_manager.util import get_cloudcare_session_data
from corehq.apps.cloudcare.touchforms_api import CaseSessionDataHelper
from corehq.apps.for... | 40.533333 | 157 | 0.702138 | import re
import uuid
from xml.etree.cElementTree import XML, tostring
from django.conf import settings
from dimagi.utils.parsing import json_format_datetime
from corehq.apps.app_manager.util import get_cloudcare_session_data
from corehq.apps.cloudcare.touchforms_api import CaseSessionDataHelper
from corehq.apps.for... | true | true |
f72a9b93aae1aefa7bf9852e1961a1a1a0e15237 | 667 | py | Python | src/actuariat_python/data/data_population/__init__.py | Pandinosaurus/actuariat_python | 77533a75fcc63a5a7ebca664a19a24c9439670ee | [
"MIT"
] | 5 | 2017-03-13T15:58:40.000Z | 2021-02-03T12:52:58.000Z | src/actuariat_python/data/data_population/__init__.py | Pandinosaurus/actuariat_python | 77533a75fcc63a5a7ebca664a19a24c9439670ee | [
"MIT"
] | 13 | 2015-06-14T22:01:37.000Z | 2021-01-05T13:57:00.000Z | src/actuariat_python/data/data_population/__init__.py | Pandinosaurus/actuariat_python | 77533a75fcc63a5a7ebca664a19a24c9439670ee | [
"MIT"
] | 9 | 2017-01-15T15:06:55.000Z | 2022-01-18T20:42:48.000Z | # -*- coding: utf-8 -*-
"""
@file
@brief Data from INSEE
**Source**
* ``irsocsd2014_G10.xlsx``: ?
* ``fm-fecondite-age-mere.csv``: `INSEE Bilan Démographique 2016 <https://www.insee.fr/fr/statistiques/1892259?sommaire=1912926>`_
* ``pop-totale-france.xlsx``: `INED Population totale
<https://www.ined.fr/fr/tout-savo... | 44.466667 | 130 | 0.724138 | true | true | |
f72a9be347a7824928143bcd46fdc086c947e678 | 18,930 | py | Python | orbital_utilities.py | desertfireballnetwork/DFN_darkflight | f41d2a2b82ce96f380f26acfe278c0afa536b9cd | [
"MIT"
] | 1 | 2020-10-19T15:13:09.000Z | 2020-10-19T15:13:09.000Z | orbital_utilities.py | desertfireballnetwork/DFN_darkflight | f41d2a2b82ce96f380f26acfe278c0afa536b9cd | [
"MIT"
] | null | null | null | orbital_utilities.py | desertfireballnetwork/DFN_darkflight | f41d2a2b82ce96f380f26acfe278c0afa536b9cd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Functions and objects to deal with meteoroids orbits
"""
__author__ = "Hadrien A.R. Devillepoix, Trent Jansen-Sturgeon "
__copyright__ = "Copyright 2016-2017, Desert Fireball Network"
__license__ = "MIT"
__version__ = "1.0"
import numpy as np
from numpy.linalg import norm
import matplotlib.p... | 37.485149 | 118 | 0.592974 |
__author__ = "Hadrien A.R. Devillepoix, Trent Jansen-Sturgeon "
__copyright__ = "Copyright 2016-2017, Desert Fireball Network"
__license__ = "MIT"
__version__ = "1.0"
import numpy as np
from numpy.linalg import norm
import matplotlib.pyplot as plt
from astropy import units as u
from astropy.time import Time
from ast... | true | true |
f72a9c84ade667bf4db98b90f5ec6bc9cc38d9af | 5,205 | py | Python | tests/integration/modules/hosts.py | jeblair/salt | 24bdca62c1d43df198e07e54cbdd0e6397243f37 | [
"Apache-2.0"
] | 1 | 2020-09-06T16:03:14.000Z | 2020-09-06T16:03:14.000Z | tests/integration/modules/hosts.py | jeblair/salt | 24bdca62c1d43df198e07e54cbdd0e6397243f37 | [
"Apache-2.0"
] | null | null | null | tests/integration/modules/hosts.py | jeblair/salt | 24bdca62c1d43df198e07e54cbdd0e6397243f37 | [
"Apache-2.0"
] | null | null | null | '''
Test the hosts module
'''
# Import python libs
import os
import shutil
# Import Salt libs
import integration
HFN = os.path.join(integration.TMP, 'hosts')
class HostsModuleTest(integration.ModuleCase):
'''
Test the hosts module
'''
def __clean_hosts(self):
'''
Clean out the hosts f... | 36.914894 | 116 | 0.599039 | import os
import shutil
import integration
HFN = os.path.join(integration.TMP, 'hosts')
class HostsModuleTest(integration.ModuleCase):
def __clean_hosts(self):
shutil.copyfile(os.path.join(integration.FILES, 'hosts'), HFN)
def __clear_hosts(self):
if os.path.isfile(HFN):
os.remov... | true | true |
f72a9c92bcaf6e4caffd7e1804851dab456f389c | 5,440 | py | Python | vi_engine_s.py | idigitopia/Distributed-VI | 323be8c50862d8dff9cae68313c518080a9df72e | [
"MIT"
] | 6 | 2019-08-18T17:04:36.000Z | 2022-03-26T08:31:22.000Z | vi_engine_s.py | idigitopia/Distributed-VI | 323be8c50862d8dff9cae68313c518080a9df72e | [
"MIT"
] | null | null | null | vi_engine_s.py | idigitopia/Distributed-VI | 323be8c50862d8dff9cae68313c518080a9df72e | [
"MIT"
] | null | null | null | import numpy as np
import ray
ray.shutdown()
ray.init()
# A : Action Space
# S : State Space
@ray.remote
class VI_worker(object):
def __init__(self, list_of_actions, tran_dict, reward_dict, beta, backup_states, true_action_prob=0.8,
unknown_value=0):
self.backup_states = backup_states
... | 34.871795 | 117 | 0.564154 | import numpy as np
import ray
ray.shutdown()
ray.init()
@ray.remote
class VI_worker(object):
def __init__(self, list_of_actions, tran_dict, reward_dict, beta, backup_states, true_action_prob=0.8,
unknown_value=0):
self.backup_states = backup_states
self.list_of_actions = list_of... | true | true |
f72a9cb5225fd598744b0a2b231293e1f98ddf01 | 78 | py | Python | auto/utils/__init__.py | trisongz/autobot | d1c8eb419ec702a7b38877b4c299807d23692c3d | [
"MIT"
] | null | null | null | auto/utils/__init__.py | trisongz/autobot | d1c8eb419ec702a7b38877b4c299807d23692c3d | [
"MIT"
] | null | null | null | auto/utils/__init__.py | trisongz/autobot | d1c8eb419ec702a7b38877b4c299807d23692c3d | [
"MIT"
] | null | null | null | from .average_meter import AverageMeter
from .progress import TrainingProgress | 39 | 39 | 0.884615 | from .average_meter import AverageMeter
from .progress import TrainingProgress | true | true |
f72a9cc5d314217c9ae136b4edba4248c11cdb62 | 658 | py | Python | scripts/issue_terminal.py | gmatteo/awesome-panel | 7eb6965f4b3a7eca08c07561e631e5beb189ffd3 | [
"Apache-2.0"
] | 179 | 2019-12-04T14:54:53.000Z | 2022-03-30T09:08:38.000Z | scripts/issue_terminal.py | hbueno/awesome-panel | fb27bcaf265cef1278cfa0c78799fbbf6c9a6834 | [
"Apache-2.0"
] | 62 | 2019-12-14T16:51:28.000Z | 2022-03-19T18:47:12.000Z | scripts/issue_terminal.py | hbueno/awesome-panel | fb27bcaf265cef1278cfa0c78799fbbf6c9a6834 | [
"Apache-2.0"
] | 35 | 2019-12-08T13:19:53.000Z | 2022-03-25T10:33:02.000Z | import panel as pn
SCRIPT = """
<script src="https://www.unpkg.com/terminal@0.1.4/lib/terminal.js" type="text/javascript"></script>
"""
script_panel = pn.pane.HTML(SCRIPT, width=0, height=0, margin=0, sizing_mode="fixed")
HTML = """
<div id="terminal-1"></div>
<script>
var t1 = new Terminal()
t1.setHei... | 22.689655 | 100 | 0.635258 | import panel as pn
SCRIPT = """
<script src="https://www.unpkg.com/terminal@0.1.4/lib/terminal.js" type="text/javascript"></script>
"""
script_panel = pn.pane.HTML(SCRIPT, width=0, height=0, margin=0, sizing_mode="fixed")
HTML = """
<div id="terminal-1"></div>
<script>
var t1 = new Terminal()
t1.setHei... | true | true |
f72a9e641315711aa7910aa3b6ee493d2ef27967 | 822 | py | Python | server/article_topic/urls.py | cuongw/article-topic | 2022908590ada829c286d3f76a8450b4eb33f709 | [
"MIT"
] | 1 | 2020-10-21T18:16:27.000Z | 2020-10-21T18:16:27.000Z | server/article_topic/urls.py | 103cuong/article-topic | 2022908590ada829c286d3f76a8450b4eb33f709 | [
"MIT"
] | 2 | 2020-01-05T08:00:24.000Z | 2020-01-05T08:00:25.000Z | server/article_topic/urls.py | cuongw/article-topic | 2022908590ada829c286d3f76a8450b4eb33f709 | [
"MIT"
] | 1 | 2020-08-18T09:09:42.000Z | 2020-08-18T09:09:42.000Z | """article_topic URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class... | 35.73913 | 77 | 0.715328 | from django.contrib import admin
from django.urls import path
from topic_detection import views
urlpatterns = [
path('admin/', admin.site.urls),
path('article/', views.index)
]
| true | true |
f72a9ee3f1f72fad4a331be0f301eba5e57a8290 | 17,450 | py | Python | apps/render_mandelbulb_slim.py | yyuting/learning_from_program_trace | e0e4ac9bc2d4069eef64bdc2de64a87a735fa508 | [
"MIT"
] | null | null | null | apps/render_mandelbulb_slim.py | yyuting/learning_from_program_trace | e0e4ac9bc2d4069eef64bdc2de64a87a735fa508 | [
"MIT"
] | null | null | null | apps/render_mandelbulb_slim.py | yyuting/learning_from_program_trace | e0e4ac9bc2d4069eef64bdc2de64a87a735fa508 | [
"MIT"
] | null | null | null | from render_util import *
from render_single import *
import numpy
import skimage
import skimage.io
def mb(p, time):
z = [p[0], p[1], p[2]]
dr = 1.0
t0 = 1.0
cond = True
power = 20.0
for i in range(4):
r = sqrt(z[0] ** 2.0 + z[1] ** 2.0 + z[2] ** 2.0)
#cond *= r <= 2.0
... | 40.962441 | 541 | 0.544413 | from render_util import *
from render_single import *
import numpy
import skimage
import skimage.io
def mb(p, time):
z = [p[0], p[1], p[2]]
dr = 1.0
t0 = 1.0
cond = True
power = 20.0
for i in range(4):
r = sqrt(z[0] ** 2.0 + z[1] ** 2.0 + z[2] ** 2.0)
cond = ... | true | true |
f72a9f3994030f9517b36005ab3842f621032778 | 4,599 | py | Python | aliddns.py | k4nzdroid/ddns-client | d0177c17da145827a8b08800adc21f7f3e196b43 | [
"Apache-2.0"
] | null | null | null | aliddns.py | k4nzdroid/ddns-client | d0177c17da145827a8b08800adc21f7f3e196b43 | [
"Apache-2.0"
] | null | null | null | aliddns.py | k4nzdroid/ddns-client | d0177c17da145827a8b08800adc21f7f3e196b43 | [
"Apache-2.0"
] | null | null | null | from aliyunsdkcore.client import AcsClient
from aliyunsdkcore.acs_exception.exceptions import ClientException
from aliyunsdkcore.acs_exception.exceptions import ServerException
from aliyunsdkalidns.request.v20150109.DescribeSubDomainRecordsRequest import DescribeSubDomainRecordsRequest
from aliyunsdkalidns.request.v201... | 38.974576 | 113 | 0.719069 | from aliyunsdkcore.client import AcsClient
from aliyunsdkcore.acs_exception.exceptions import ClientException
from aliyunsdkcore.acs_exception.exceptions import ServerException
from aliyunsdkalidns.request.v20150109.DescribeSubDomainRecordsRequest import DescribeSubDomainRecordsRequest
from aliyunsdkalidns.request.v201... | true | true |
f72a9f4ec04b375aa26c8218249e75c1e2a2db4d | 3,486 | py | Python | bindings/python/ensmallen/datasets/string/halanaerobiumkushneri.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 5 | 2021-02-17T00:44:45.000Z | 2021-08-09T16:41:47.000Z | bindings/python/ensmallen/datasets/string/halanaerobiumkushneri.py | AnacletoLAB/ensmallen_graph | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 18 | 2021-01-07T16:47:39.000Z | 2021-08-12T21:51:32.000Z | bindings/python/ensmallen/datasets/string/halanaerobiumkushneri.py | AnacletoLAB/ensmallen | b2c1b18fb1e5801712852bcc239f239e03076f09 | [
"MIT"
] | 3 | 2021-01-14T02:20:59.000Z | 2021-08-04T19:09:52.000Z | """
This file offers the methods to automatically retrieve the graph Halanaerobium kushneri.
The graph is automatically retrieved from the STRING repository.
References
---------------------
Please cite the following if you use the data:
```bib
@article{szklarczyk2019string,
title={STRING v11: protein--protein... | 33.2 | 223 | 0.679002 | from typing import Dict
from ..automatic_graph_retrieval import AutomaticallyRetrievedGraph
from ...ensmallen import Graph
def HalanaerobiumKushneri(
directed: bool = False,
preprocess: bool = True,
load_nodes: bool = True,
verbose: int = 2,
cache: bool = True,
cache_path: str = "graphs/stri... | true | true |
f72aa007710dbb5ce8eb5bd9d8566a13f57787d4 | 36,004 | py | Python | tests/i18n/test_extraction.py | MikeAmy/django | 00cb9e13b4cf06ed2be27ee9e7fc18969ae69f7d | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2017-08-30T06:46:16.000Z | 2017-08-30T06:46:16.000Z | tests/i18n/test_extraction.py | MikeAmy/django | 00cb9e13b4cf06ed2be27ee9e7fc18969ae69f7d | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/i18n/test_extraction.py | MikeAmy/django | 00cb9e13b4cf06ed2be27ee9e7fc18969ae69f7d | [
"PSF-2.0",
"BSD-3-Clause"
] | 1 | 2018-07-23T12:13:04.000Z | 2018-07-23T12:13:04.000Z | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
import io
import os
import re
import shutil
import time
import warnings
from unittest import SkipTest, skipUnless
from django.conf import settings
from django.core import management
from django.core.management import execute_from_command_line
from djan... | 45.517067 | 113 | 0.644067 | from __future__ import unicode_literals
import io
import os
import re
import shutil
import time
import warnings
from unittest import SkipTest, skipUnless
from django.conf import settings
from django.core import management
from django.core.management import execute_from_command_line
from django.core.management.base im... | true | true |
f72aa05957ea518052b423c49d9e13775118a954 | 8,920 | py | Python | downstream/UNITER/adapter/src/transformers/adapters/models/gpt2.py | yeonseok-jeong-cm/multimodal_research | bb1140f13f76d4cda6175a072806a0ee0908bd0d | [
"MIT"
] | null | null | null | downstream/UNITER/adapter/src/transformers/adapters/models/gpt2.py | yeonseok-jeong-cm/multimodal_research | bb1140f13f76d4cda6175a072806a0ee0908bd0d | [
"MIT"
] | null | null | null | downstream/UNITER/adapter/src/transformers/adapters/models/gpt2.py | yeonseok-jeong-cm/multimodal_research | bb1140f13f76d4cda6175a072806a0ee0908bd0d | [
"MIT"
] | null | null | null | from typing import Union
import torch
from torch import nn
from ..composition import AdapterCompositionBlock, parse_composition
from ..heads import CausalLMHead, ClassificationHead, MultiLabelClassificationHead
from ..model_mixin import InvertibleAdaptersMixin, ModelAdaptersMixin
from .bert import (
BertEncoderAd... | 40.545455 | 116 | 0.69361 | from typing import Union
import torch
from torch import nn
from ..composition import AdapterCompositionBlock, parse_composition
from ..heads import CausalLMHead, ClassificationHead, MultiLabelClassificationHead
from ..model_mixin import InvertibleAdaptersMixin, ModelAdaptersMixin
from .bert import (
BertEncoderAd... | true | true |
f72aa0e8cc0326318ce5bd49e2a78712241bce3f | 1,562 | py | Python | tests/test_elastic_service.py | occidere/blind-review-parser | 72dd3a3c897d87d79f9303597016801e5fb1c648 | [
"Apache-2.0"
] | 7 | 2021-02-15T16:43:20.000Z | 2021-03-23T17:10:47.000Z | tests/test_elastic_service.py | occidere/blind-review-parser | 72dd3a3c897d87d79f9303597016801e5fb1c648 | [
"Apache-2.0"
] | 8 | 2021-02-16T13:38:40.000Z | 2021-02-16T13:51:35.000Z | tests/test_elastic_service.py | occidere/blind-review-parser | 72dd3a3c897d87d79f9303597016801e5fb1c648 | [
"Apache-2.0"
] | null | null | null | import unittest
from blindreviewparser.parser.blind_review_parser import *
class TestElasticService(unittest.TestCase):
def setUp(self) -> None:
self.es_endpoint = 'http://localhost:9200'
self.elastic_service = ElasticService(self.es_endpoint)
self.sample = Review(
... | 30.038462 | 99 | 0.589629 | import unittest
from blindreviewparser.parser.blind_review_parser import *
class TestElasticService(unittest.TestCase):
def setUp(self) -> None:
self.es_endpoint = 'http://localhost:9200'
self.elastic_service = ElasticService(self.es_endpoint)
self.sample = Review(
... | true | true |
f72aa166383d481c6103f4761816a7c123b14e5f | 2,262 | py | Python | adb/systrace/catapult/devil/devil/android/tools/system_app_test.py | mohanedmoh/TBS | 6aebf52643911fe0dce7d02825eb0f046da1b3b1 | [
"Apache-2.0"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | adb/systrace/catapult/devil/devil/android/tools/system_app_test.py | mohanedmoh/TBS | 6aebf52643911fe0dce7d02825eb0f046da1b3b1 | [
"Apache-2.0"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | adb/systrace/catapult/devil/devil/android/tools/system_app_test.py | mohanedmoh/TBS | 6aebf52643911fe0dce7d02825eb0f046da1b3b1 | [
"Apache-2.0"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env python
# Copyright 2017 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.
import os
import sys
import unittest
if __name__ == '__main__':
sys.path.append(os.path.abspath(
os.path.join(os.path.dirname(... | 32.314286 | 72 | 0.751105 |
import os
import sys
import unittest
if __name__ == '__main__':
sys.path.append(os.path.abspath(
os.path.join(os.path.dirname(__file__), '..', '..', '..')))
from devil import devil_env
from devil.android import device_utils
from devil.android.sdk import adb_wrapper
from devil.android.sdk import version_codes... | true | true |
f72aa18c0f5b6396366947977df0c5e4b9da7877 | 264 | py | Python | tests/hamiltonian/test_exact.py | ymtz03/freqerica | d79e76181a037da5c11b47f8a4e1bf4387a0468f | [
"BSD-2-Clause"
] | 1 | 2020-05-08T15:28:04.000Z | 2020-05-08T15:28:04.000Z | tests/hamiltonian/test_exact.py | ymtz03/freqerica | d79e76181a037da5c11b47f8a4e1bf4387a0468f | [
"BSD-2-Clause"
] | null | null | null | tests/hamiltonian/test_exact.py | ymtz03/freqerica | d79e76181a037da5c11b47f8a4e1bf4387a0468f | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
import freqerica.hamiltonian.exact
class BasicTestSuite(unittest.TestCase):
"""Basic test cases."""
def test_absolute_truth_and_meaning(self):
assert True
if __name__ == '__main__':
unittest.main()
| 16.5 | 46 | 0.689394 |
import unittest
import freqerica.hamiltonian.exact
class BasicTestSuite(unittest.TestCase):
def test_absolute_truth_and_meaning(self):
assert True
if __name__ == '__main__':
unittest.main()
| true | true |
f72aa18da6b39da5e2c7c96f9b56b0327cc9cf0a | 1,301 | py | Python | authapp/forms.py | EvgenDEP1/exam | 0c6faf8986e890bc03f8a407fb3d72b7ccecc1e0 | [
"Apache-2.0"
] | null | null | null | authapp/forms.py | EvgenDEP1/exam | 0c6faf8986e890bc03f8a407fb3d72b7ccecc1e0 | [
"Apache-2.0"
] | null | null | null | authapp/forms.py | EvgenDEP1/exam | 0c6faf8986e890bc03f8a407fb3d72b7ccecc1e0 | [
"Apache-2.0"
] | null | null | null | from django.contrib.auth.forms import AuthenticationForm, UserCreationForm
from django.contrib.auth.models import User
class LoginForm(AuthenticationForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['username'].label = ""
self.fields['password'].labe... | 40.65625 | 80 | 0.629516 | from django.contrib.auth.forms import AuthenticationForm, UserCreationForm
from django.contrib.auth.models import User
class LoginForm(AuthenticationForm):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.fields['username'].label = ""
self.fields['password'].labe... | true | true |
f72aa1cad8297f5101397a1f8105d26c2f65379d | 415 | py | Python | online_quiz/online_quiz/asgi.py | abhinavkavuri/django-trivia | e451ffd85a06ec9c1e1d690c67fdc51601fa6a5c | [
"Apache-2.0"
] | null | null | null | online_quiz/online_quiz/asgi.py | abhinavkavuri/django-trivia | e451ffd85a06ec9c1e1d690c67fdc51601fa6a5c | [
"Apache-2.0"
] | 6 | 2020-06-05T20:37:41.000Z | 2021-09-22T18:27:23.000Z | online_quiz/online_quiz/asgi.py | abhinavkavuri/django-trivia | e451ffd85a06ec9c1e1d690c67fdc51601fa6a5c | [
"Apache-2.0"
] | null | null | null | """
ASGI config for online_quiz project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefa... | 24.411765 | 79 | 0.759036 |
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'online_quiz.settings')
application = get_asgi_application()
| true | true |
f72aa1e7883558de22bc21371e82becfb2c32478 | 1,010 | py | Python | server/routes/prometheus.py | sadiejay/Open-Sentencing-Model | fc83af2f37c9d77035349d1d39cf1cc309837045 | [
"Apache-2.0"
] | 52 | 2019-12-27T03:52:00.000Z | 2022-03-26T18:16:30.000Z | server/routes/prometheus.py | sadiejay/Open-Sentencing-Model | fc83af2f37c9d77035349d1d39cf1cc309837045 | [
"Apache-2.0"
] | 114 | 2019-12-03T04:13:38.000Z | 2020-10-03T18:02:03.000Z | server/routes/prometheus.py | sadiejay/Open-Sentencing-Model | fc83af2f37c9d77035349d1d39cf1cc309837045 | [
"Apache-2.0"
] | 45 | 2019-12-22T08:17:08.000Z | 2022-03-13T09:57:09.000Z |
from server import app
from flask import Response, request
from prometheus_client import generate_latest, Counter
from functools import wraps
# route to display configured Prometheus metrics
# note that you will need to set up custom metric observers for your app
@app.route('/metrics')
def prometheus_metrics():
M... | 31.5625 | 114 | 0.708911 |
from server import app
from flask import Response, request
from prometheus_client import generate_latest, Counter
from functools import wraps
@app.route('/metrics')
def prometheus_metrics():
MIMETYPE = 'text/plain; version=0.0.4; charset=utf-8'
return Response(generate_latest(), mimetype=MIMETYPE)
route_coun... | true | true |
f72aa29a2c3502ea40faf7f916df3b0ead8ebf1a | 1,577 | py | Python | xl2code/parsers/direct_parser.py | youlanhai/ExcelToCode | d160c75b9b7a305f4b3367d85ee0550572869d3e | [
"MIT"
] | 47 | 2017-06-23T07:47:50.000Z | 2022-03-07T22:36:19.000Z | xl2code/parsers/direct_parser.py | twjitm/ExcelToCode | d160c75b9b7a305f4b3367d85ee0550572869d3e | [
"MIT"
] | 1 | 2019-03-12T06:12:50.000Z | 2019-04-03T00:50:01.000Z | xl2code/parsers/direct_parser.py | twjitm/ExcelToCode | d160c75b9b7a305f4b3367d85ee0550572869d3e | [
"MIT"
] | 23 | 2017-05-12T07:46:07.000Z | 2022-01-22T03:19:50.000Z | # -*- coding: utf-8 -*-
import traceback
import xlsconfig
import util
from tps import tp0, convention
from base_parser import ConverterInfo, BaseParser
# 利用Excel表头描述,进行导表,不需要转换器
class DirectParser(BaseParser):
def __init__(self, filename, module, sheet_index=0):
super(DirectParser, self).__init__(filename, module,... | 30.326923 | 87 | 0.733037 | import traceback
import xlsconfig
import util
from tps import tp0, convention
from base_parser import ConverterInfo, BaseParser
class DirectParser(BaseParser):
def __init__(self, filename, module, sheet_index=0):
super(DirectParser, self).__init__(filename, module, sheet_index)
self.field_row_index = xlsconfig.... | true | true |
f72aa4256943cc8676fb4c07209c50e85fa11d40 | 4,050 | py | Python | examples/structural/beam.py | SzymonSzyszko/AeroPy | b061c690e5926fdd834b7c50837c25108e908156 | [
"MIT"
] | 1 | 2020-07-23T00:15:00.000Z | 2020-07-23T00:15:00.000Z | examples/structural/beam.py | SzymonSzyszko/AeroPy | b061c690e5926fdd834b7c50837c25108e908156 | [
"MIT"
] | null | null | null | examples/structural/beam.py | SzymonSzyszko/AeroPy | b061c690e5926fdd834b7c50837c25108e908156 | [
"MIT"
] | null | null | null | from aeropy.geometry.parametric import poly
from aeropy.structural.stable_solution import (structure, mesh_1D, properties,
boundary_conditions)
from aeropy.xfoil_module import output_reader
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import numpy as np
impo... | 36.486486 | 78 | 0.655062 | from aeropy.geometry.parametric import poly
from aeropy.structural.stable_solution import (structure, mesh_1D, properties,
boundary_conditions)
from aeropy.xfoil_module import output_reader
import matplotlib.pyplot as plt
import matplotlib.cm as cm
import numpy as np
impo... | true | true |
f72aa529d44c10ff374c8d1442847033225d002f | 449 | py | Python | examples/subgraphs/create_knn_subgraph.py | gugarosa/opfython | 19b467a92d85c7c26d231efec770645096827b4e | [
"Apache-2.0"
] | 26 | 2018-04-24T20:16:18.000Z | 2022-03-09T14:03:28.000Z | examples/subgraphs/create_knn_subgraph.py | gugarosa/opfython | 19b467a92d85c7c26d231efec770645096827b4e | [
"Apache-2.0"
] | 4 | 2020-12-26T14:57:18.000Z | 2022-03-30T02:34:18.000Z | examples/subgraphs/create_knn_subgraph.py | gugarosa/opfython | 19b467a92d85c7c26d231efec770645096827b4e | [
"Apache-2.0"
] | 16 | 2019-05-20T15:41:56.000Z | 2022-03-23T17:59:53.000Z | import opfython.stream.loader as l
import opfython.stream.parser as p
from opfython.subgraphs import KNNSubgraph
# Defining an input file
input_file = 'data/boat.txt'
# Loading a .txt file to a dataframe
txt = l.load_txt(input_file)
# Parsing a pre-loaded dataframe
X, Y = p.parse_loader(txt)
# Creating a knn-subgra... | 23.631579 | 54 | 0.772829 | import opfython.stream.loader as l
import opfython.stream.parser as p
from opfython.subgraphs import KNNSubgraph
input_file = 'data/boat.txt'
txt = l.load_txt(input_file)
X, Y = p.parse_loader(txt)
g = KNNSubgraph(X, Y)
g = KNNSubgraph(from_file=input_file)
| true | true |
f72aa5fc954c18cf553f3deb747a7fd96e64bef0 | 2,664 | py | Python | ishuhui/controllers/admin.py | Nayak-cyber/flask_ishuhui | 34352da462d4999bc7788c87773001312a213b20 | [
"MIT"
] | 192 | 2017-08-27T13:56:37.000Z | 2022-03-09T00:59:14.000Z | ishuhui/controllers/admin.py | Soumi7/flask_ishuhui | a3444b3679c45d5ba94c5c9a66551207eff1a646 | [
"MIT"
] | null | null | null | ishuhui/controllers/admin.py | Soumi7/flask_ishuhui | a3444b3679c45d5ba94c5c9a66551207eff1a646 | [
"MIT"
] | 54 | 2017-08-28T01:04:04.000Z | 2021-07-07T17:27:50.000Z | from flask import Blueprint, render_template, current_app, session
from flask import abort, jsonify
from flask_login import current_user
import ishuhui.tasks.task as task
from ..models.chapter import Chapter
from ..models.comic import Comic
from ..tasks.celery_task import refresh_chapters_task
bp_admin = Blueprint('a... | 32.487805 | 77 | 0.614489 | from flask import Blueprint, render_template, current_app, session
from flask import abort, jsonify
from flask_login import current_user
import ishuhui.tasks.task as task
from ..models.chapter import Chapter
from ..models.comic import Comic
from ..tasks.celery_task import refresh_chapters_task
bp_admin = Blueprint('a... | true | true |
f72aa61a7732c6e419535219feafdd67e09bdfe5 | 5,711 | py | Python | doors/gatekeeper_app.py | manens/nadine | 4938afa2d2c69ae5ac54f4360b081d10521a0a2f | [
"Apache-2.0"
] | null | null | null | doors/gatekeeper_app.py | manens/nadine | 4938afa2d2c69ae5ac54f4360b081d10521a0a2f | [
"Apache-2.0"
] | null | null | null | doors/gatekeeper_app.py | manens/nadine | 4938afa2d2c69ae5ac54f4360b081d10521a0a2f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import json
import time
import logging
import traceback
from core import Messages, EncryptedConnection, Gatekeeper
from threads import Heartbeat, EventWatcher
class GatekeeperApp(object):
def run(self, config):
try:
logging.info("Starting up Gatekeeper...")
... | 42.93985 | 583 | 0.555244 | import sys
import json
import time
import logging
import traceback
from core import Messages, EncryptedConnection, Gatekeeper
from threads import Heartbeat, EventWatcher
class GatekeeperApp(object):
def run(self, config):
try:
logging.info("Starting up Gatekeeper...")
gatekeeper = ... | true | true |
f72aa63243daf6a11e454d0ec669bad1d564b255 | 4,178 | py | Python | src/dataAnalyze.py | bankrollhunter/DreamTrader | c8f2f9043b0ff11a67146007b6f952fca05a629d | [
"MIT"
] | 32 | 2020-10-16T17:48:04.000Z | 2021-06-16T06:14:31.000Z | src/dataAnalyze.py | bankrollhunter/DreamTrader | c8f2f9043b0ff11a67146007b6f952fca05a629d | [
"MIT"
] | null | null | null | src/dataAnalyze.py | bankrollhunter/DreamTrader | c8f2f9043b0ff11a67146007b6f952fca05a629d | [
"MIT"
] | 19 | 2020-10-16T17:13:27.000Z | 2021-05-26T02:44:56.000Z | from .dataSource import DataSource
from .trend import TrendAnalyze
from jqdatasdk import *
from jqdatasdk.api import get_fundamentals, get_industry_stocks, get_security_info
from jqdatasdk.utils import query
import talib
from datetime import datetime, timedelta
import json
import logging
from sqlalchemy.orm.query impo... | 30.057554 | 105 | 0.533748 | from .dataSource import DataSource
from .trend import TrendAnalyze
from jqdatasdk import *
from jqdatasdk.api import get_fundamentals, get_industry_stocks, get_security_info
from jqdatasdk.utils import query
import talib
from datetime import datetime, timedelta
import json
import logging
from sqlalchemy.orm.query impo... | true | true |
f72aa66497de214ed535e744d03638f19d86133b | 2,551 | py | Python | test/old/Old2/modules/SCF.py | pulsar-chem/BPModule | f8e64e04fdb01947708f098e833600c459c2ff0e | [
"BSD-3-Clause"
] | null | null | null | test/old/Old2/modules/SCF.py | pulsar-chem/BPModule | f8e64e04fdb01947708f098e833600c459c2ff0e | [
"BSD-3-Clause"
] | null | null | null | test/old/Old2/modules/SCF.py | pulsar-chem/BPModule | f8e64e04fdb01947708f098e833600c459c2ff0e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
thispath = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, os.path.join(os.path.dirname(thispath),"helper"))
from MiscFxns import *
from StandardModules import *
def CompareEgy(EgyIn):
return EgyIn+224.912529687124<0.00001
def CompareGrad(GradIn):
Cor... | 33.565789 | 79 | 0.642101 | import os
import sys
thispath = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, os.path.join(os.path.dirname(thispath),"helper"))
from MiscFxns import *
from StandardModules import *
def CompareEgy(EgyIn):
return EgyIn+224.912529687124<0.00001
def CompareGrad(GradIn):
CorrectGrad=[
0.0063... | true | true |
f72aa69c7ec0962f39e0a42210cdf6e5308bb185 | 801 | py | Python | scripts/utils.py | onchere/whack | 0702e46f13855d4efd8dd0cb67af2fddfb84b00c | [
"Apache-2.0"
] | 54 | 2018-10-28T07:18:31.000Z | 2022-03-08T20:30:40.000Z | scripts/utils.py | onchere/whack | 0702e46f13855d4efd8dd0cb67af2fddfb84b00c | [
"Apache-2.0"
] | null | null | null | scripts/utils.py | onchere/whack | 0702e46f13855d4efd8dd0cb67af2fddfb84b00c | [
"Apache-2.0"
] | 5 | 2018-10-28T14:43:53.000Z | 2020-04-26T19:52:58.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2018 Onchere Bironga
#
# 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 re... | 30.807692 | 74 | 0.714107 |
def read(filename):
with open(filename, "r") as f:
return f.read()
def write(filename, contents):
with open(filename, "w+") as f:
f.write(contents)
| true | true |
f72aa75a0f0acb3039551b59174f7f22257880d1 | 31,650 | py | Python | credit_default/app/views.py | sandymule/Credit-Card-Default | c9d67feffa65fb7aad514bd9c1991766e8e2777b | [
"MIT"
] | 1 | 2017-05-20T06:08:05.000Z | 2017-05-20T06:08:05.000Z | credit_default/app/views.py | sandymule/credit-card-default | c9d67feffa65fb7aad514bd9c1991766e8e2777b | [
"MIT"
] | null | null | null | credit_default/app/views.py | sandymule/credit-card-default | c9d67feffa65fb7aad514bd9c1991766e8e2777b | [
"MIT"
] | 2 | 2017-05-20T06:08:25.000Z | 2019-05-18T19:59:31.000Z | import logging
import json
import pandas as pd
from flask import render_template
from flask_wtf import Form
from wtforms import fields
from wtforms.validators import Required
from . import app, estimator, target_names
logger = logging.getLogger('app')
class PredictForm(Form):
"""Fields for Predict"""
# sepa... | 58.938547 | 156 | 0.576461 | import logging
import json
import pandas as pd
from flask import render_template
from flask_wtf import Form
from wtforms import fields
from wtforms.validators import Required
from . import app, estimator, target_names
logger = logging.getLogger('app')
class PredictForm(Form):
Limit_bal = fields.... | true | true |
f72aa7ac988a87f3f873350a9bce3b67813e99a1 | 188 | py | Python | lessons/ObjectOrientedProgramming/IdeFiles/3a_python_package/setup.py | cnegrelli/DSND_Term2 | c69a654a7d492ce895c9b835b6c05e89eef84a1b | [
"MIT"
] | null | null | null | lessons/ObjectOrientedProgramming/IdeFiles/3a_python_package/setup.py | cnegrelli/DSND_Term2 | c69a654a7d492ce895c9b835b6c05e89eef84a1b | [
"MIT"
] | null | null | null | lessons/ObjectOrientedProgramming/IdeFiles/3a_python_package/setup.py | cnegrelli/DSND_Term2 | c69a654a7d492ce895c9b835b6c05e89eef84a1b | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name = 'distributions',
version = '0.2',
description = 'Gaussian distributions',
packages = ['distributions'],
zip_safe = False) | 26.857143 | 45 | 0.648936 | from setuptools import setup
setup(name = 'distributions',
version = '0.2',
description = 'Gaussian distributions',
packages = ['distributions'],
zip_safe = False) | true | true |
f72aa85d1d51fabcb355ee1ffa6f5c5410b545f6 | 27,086 | py | Python | nuitka/tree/ReformulationFunctionStatements.py | augustand/Nuitka | b7b9dd50b60505a309f430ce17cad36fb7d75048 | [
"Apache-2.0"
] | null | null | null | nuitka/tree/ReformulationFunctionStatements.py | augustand/Nuitka | b7b9dd50b60505a309f430ce17cad36fb7d75048 | [
"Apache-2.0"
] | null | null | null | nuitka/tree/ReformulationFunctionStatements.py | augustand/Nuitka | b7b9dd50b60505a309f430ce17cad36fb7d75048 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | 32.283671 | 96 | 0.558554 |
from nuitka.nodes.AssignNodes import (
ExpressionTargetTempVariableRef,
ExpressionTargetVariableRef,
StatementAssignmentVariable,
StatementReleaseVariable
)
from nuitka.nodes.BuiltinIteratorNodes import (
ExpressionBuiltinIter1,
StatementSpecialUnpackCheck
)
from nuitka.nodes.BuiltinNextNodes i... | true | true |
f72aaada40c2662f3b0cfa6fbf29805cd48bed68 | 3,807 | py | Python | argo/workflows/client/models/v1alpha1_metrics.py | jyotishp/argo-client-python | 7dfe27c8bc542a9142efcb0a8f55bb85c915448c | [
"Apache-2.0"
] | 1 | 2021-03-10T23:09:42.000Z | 2021-03-10T23:09:42.000Z | argo/workflows/client/models/v1alpha1_metrics.py | jyotishp/argo-client-python | 7dfe27c8bc542a9142efcb0a8f55bb85c915448c | [
"Apache-2.0"
] | null | null | null | argo/workflows/client/models/v1alpha1_metrics.py | jyotishp/argo-client-python | 7dfe27c8bc542a9142efcb0a8f55bb85c915448c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Argo Server API
You can get examples of requests and responses by using the CLI with `--gloglevel=9`, e.g. `argo list --gloglevel=9` # noqa: E501
The version of the OpenAPI document: v2.11.8
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
... | 30.701613 | 134 | 0.599947 |
import pprint
import re
import six
from argo.workflows.client.configuration import Configuration
class V1alpha1Metrics(object):
openapi_types = {
'prometheus': 'list[V1alpha1Prometheus]'
}
attribute_map = {
'prometheus': 'prometheus'
}
def __init__(self, prometheus=None, l... | true | true |
f72aabfa532e7c390422910aefe539d8af6b71e5 | 4,802 | py | Python | cnn_training.py | xiangzhemeng/epfl-ml2017-project2 | 16345b3e453989dfeba70667773b76362897a782 | [
"MIT"
] | 11 | 2018-12-11T05:59:50.000Z | 2020-09-30T03:01:02.000Z | cnn_training.py | xiangzhemeng/epfl-ml2017-project2 | 16345b3e453989dfeba70667773b76362897a782 | [
"MIT"
] | 1 | 2019-02-28T15:51:26.000Z | 2019-02-28T15:51:26.000Z | cnn_training.py | xiangzhemeng/epfl-ml2017-project2 | 16345b3e453989dfeba70667773b76362897a782 | [
"MIT"
] | 3 | 2018-03-06T07:34:39.000Z | 2018-05-28T03:13:32.000Z | import pandas as pd
import numpy as np
import pickle
from keras.preprocessing.text import Tokenizer
from keras.preprocessing import sequence
from keras.models import Sequential
from keras.layers.embeddings import Embedding
from keras.layers.convolutional import Conv1D
from keras.layers.convolutional import MaxPooling1D... | 37.515625 | 145 | 0.704082 | import pandas as pd
import numpy as np
import pickle
from keras.preprocessing.text import Tokenizer
from keras.preprocessing import sequence
from keras.models import Sequential
from keras.layers.embeddings import Embedding
from keras.layers.convolutional import Conv1D
from keras.layers.convolutional import MaxPooling1D... | true | true |
f72aacfc0d05c9205783f92c37e379035bd0665e | 5,592 | py | Python | Doc/conf.py | whtsky/python | 715a6e5035bb21ac49382772076ec4c630d6e960 | [
"PSF-2.0"
] | 2 | 2018-12-22T08:20:13.000Z | 2020-06-24T02:48:52.000Z | Doc/conf.py | whtsky/python | 715a6e5035bb21ac49382772076ec4c630d6e960 | [
"PSF-2.0"
] | null | null | null | Doc/conf.py | whtsky/python | 715a6e5035bb21ac49382772076ec4c630d6e960 | [
"PSF-2.0"
] | 3 | 2018-03-06T05:12:17.000Z | 2021-04-22T10:01:01.000Z | # -*- coding: utf-8 -*-
#
# Python documentation build configuration file
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleable (module imports are okay, they're removed automatically).
... | 30.557377 | 82 | 0.669886 | # that aren't pickleable (module imports are okay, they're removed automatically).
import sys, os, time
sys.path.append(os.path.abspath('tools/sphinxext'))
# General configuration
# ---------------------
extensions = ['sphinx.ext.refcounting', 'sphinx.ext.coverage',
'sphinx.ext.doctest', 'pyspecific']
... | true | true |
f72aad60b115d3fd47a1a6dd7076ff1a07ca0230 | 140 | py | Python | tests/data/config1.py | seismopy/figcon | 7e5d6ac30ea49bce8a566f9afb7e9e5af081164c | [
"BSD-3-Clause"
] | null | null | null | tests/data/config1.py | seismopy/figcon | 7e5d6ac30ea49bce8a566f9afb7e9e5af081164c | [
"BSD-3-Clause"
] | null | null | null | tests/data/config1.py | seismopy/figcon | 7e5d6ac30ea49bce8a566f9afb7e9e5af081164c | [
"BSD-3-Clause"
] | null | null | null | """
The first config example
"""
from types import SimpleNamespace
agency = 'NSA'
snuffler = SimpleNamespace(phase_map={1: 'P', 2: 'S'})
| 14 | 54 | 0.685714 | from types import SimpleNamespace
agency = 'NSA'
snuffler = SimpleNamespace(phase_map={1: 'P', 2: 'S'})
| true | true |
f72aadc6e09185ea3c69fa953e810a4ae3a1ee00 | 1,277 | py | Python | cc_backend_lib/models/scales.py | prio-data/cc_backend_lib | 7daa3c38d96e9063074367ea0873e39d7544e2b7 | [
"MIT"
] | null | null | null | cc_backend_lib/models/scales.py | prio-data/cc_backend_lib | 7daa3c38d96e9063074367ea0873e39d7544e2b7 | [
"MIT"
] | null | null | null | cc_backend_lib/models/scales.py | prio-data/cc_backend_lib | 7daa3c38d96e9063074367ea0873e39d7544e2b7 | [
"MIT"
] | null | null | null | """
The intensity measurement scale has changed, and might change again
Therefore, I need this module to translate between numeric intensity scores
and casualty numbers
"""
from typing import Optional
from datetime import date
import pydantic
class CasualtyRange(pydantic.BaseModel):
lower: int
upper: Optional[... | 30.404762 | 75 | 0.649961 | from typing import Optional
from datetime import date
import pydantic
class CasualtyRange(pydantic.BaseModel):
lower: int
upper: Optional[int]
text: Optional[str]
@property
def zero(self):
return self.upper == 0
SCALES = {
date(1,1,1):{
0: CasualtyRange(lower=0,upper=1... | true | true |
f72aadee17de447d48becb2d1e2d660cbd57c250 | 3,508 | py | Python | third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 113 | 2015-05-04T09:58:14.000Z | 2022-01-31T19:35:03.000Z | third_party/blink/renderer/build/scripts/core/css/properties/make_css_property_instances.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | #!/usr/bin/env python
# Copyright 2016 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.
import json5_generator
import template_expander
from collections import namedtuple
from core.css import css_properties
class Propert... | 37.319149 | 85 | 0.686431 |
import json5_generator
import template_expander
from collections import namedtuple
from core.css import css_properties
class PropertyClassData(
namedtuple(
'PropertyClassData',
'enum_key,enum_value,property_id,classname,namespace_group,filename'
)):
pass
class CSSProper... | true | true |
f72aae9d51b7f0153c0b16c546eb1ceaa7d6f438 | 777 | py | Python | web/data/migrations/0003_auto_20210108_1000.py | liwan1698/CatchingFire | 74535cba4b6da178eed2857d5db9900604c0c5f7 | [
"MIT"
] | 11 | 2021-02-14T15:56:22.000Z | 2022-03-21T08:26:58.000Z | web/data/migrations/0003_auto_20210108_1000.py | liwan1698/CatchingFire | 74535cba4b6da178eed2857d5db9900604c0c5f7 | [
"MIT"
] | null | null | null | web/data/migrations/0003_auto_20210108_1000.py | liwan1698/CatchingFire | 74535cba4b6da178eed2857d5db9900604c0c5f7 | [
"MIT"
] | 6 | 2021-03-16T14:30:12.000Z | 2022-03-10T14:20:24.000Z | # Generated by Django 3.1.5 on 2021-01-08 10:00
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('data', '0002_remove_classifydata_pending_tag'),
]
operations = [
migrations.CreateModel(
name='ClassifyTag',
fields=... | 29.884615 | 114 | 0.593308 |
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('data', '0002_remove_classifydata_pending_tag'),
]
operations = [
migrations.CreateModel(
name='ClassifyTag',
fields=[
('id', models.AutoField(auto_c... | true | true |
f72aaeb6bcf064edb9fbce86a27a4b372ec8bac8 | 9,321 | py | Python | kernel/protobuf/generated/pearson_model_param_pb2.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 39 | 2021-10-12T01:43:27.000Z | 2022-03-28T04:46:35.000Z | kernel/protobuf/generated/pearson_model_param_pb2.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 6 | 2021-10-14T02:11:47.000Z | 2022-03-23T02:41:50.000Z | kernel/protobuf/generated/pearson_model_param_pb2.py | rinceyuan/WeFe | 8482cb737cb7ba37b2856d184cd42c1bd35a6318 | [
"Apache-2.0"
] | 10 | 2021-10-14T09:36:03.000Z | 2022-02-10T11:05:12.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pearson-model-param.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database ... | 45.247573 | 747 | 0.695848 |
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import symbol_database as _symbol_database
_sym_db = _symbol_database.Default()
DESCRIPTOR = _descriptor.FileDescriptor(
name='pearson-... | true | true |
f72aaed00855b0147da7146ad4481dc9c1de0fae | 7,616 | py | Python | sig.py | IlyaKodua/colorization_with_averaging_ab_channels_test | 425a9f3e8b875b21c76424e892cbf489a9e408cb | [
"MIT"
] | null | null | null | sig.py | IlyaKodua/colorization_with_averaging_ab_channels_test | 425a9f3e8b875b21c76424e892cbf489a9e408cb | [
"MIT"
] | null | null | null | sig.py | IlyaKodua/colorization_with_averaging_ab_channels_test | 425a9f3e8b875b21c76424e892cbf489a9e408cb | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class SIGGRAPHGenerator(nn.Module):
def __init__(self, norm_layer=nn.BatchNorm2d, classes=529):
super(SIGGRAPHGenerator, self).__init__()
# Conv1
model1=[nn.Conv2d(4, 64, kernel_size=3, stride=1, padding=1, bias=True),]
... | 43.028249 | 157 | 0.616334 | import torch
import torch.nn as nn
import torch.nn.functional as F
class SIGGRAPHGenerator(nn.Module):
def __init__(self, norm_layer=nn.BatchNorm2d, classes=529):
super(SIGGRAPHGenerator, self).__init__()
model1=[nn.Conv2d(4, 64, kernel_size=3, stride=1, padding=1, bias=True),]
mod... | true | true |
f72aaf0d1aeed3ebfc53a15203a1be8e842a5f86 | 1,624 | py | Python | landmark_recognition/urls.py | MilanSusa/Landmark-Recognition-Inference-API | e770fd8dce1b7dc39e52950c71e6406352a67123 | [
"MIT"
] | null | null | null | landmark_recognition/urls.py | MilanSusa/Landmark-Recognition-Inference-API | e770fd8dce1b7dc39e52950c71e6406352a67123 | [
"MIT"
] | 11 | 2020-11-13T18:40:49.000Z | 2022-03-12T00:20:31.000Z | landmark_recognition/urls.py | MilanSusa/Landmark-Recognition-Inference-API | e770fd8dce1b7dc39e52950c71e6406352a67123 | [
"MIT"
] | null | null | null | """landmark_recognition URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home'... | 38.666667 | 108 | 0.721675 | from django.conf import settings
from django.conf.urls import url
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import path, include
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
schema_view = get_schema_vie... | true | true |
f72aaf58fab32e715e1c98ff0e845edadd9fd68c | 3,567 | py | Python | examples/ariadne_uvicorn/movies_v4.py | jyoost/neo4j-graphql-py | 14dbd8f133727f89ec8ea79e5475e4a940d4e55f | [
"Apache-2.0"
] | null | null | null | examples/ariadne_uvicorn/movies_v4.py | jyoost/neo4j-graphql-py | 14dbd8f133727f89ec8ea79e5475e4a940d4e55f | [
"Apache-2.0"
] | null | null | null | examples/ariadne_uvicorn/movies_v4.py | jyoost/neo4j-graphql-py | 14dbd8f133727f89ec8ea79e5475e4a940d4e55f | [
"Apache-2.0"
] | null | null | null | import uvicorn
from neo4j import GraphDatabase
from ariadne.asgi import GraphQL
from neo4j_graphql_py import neo4j_graphql
from ariadne import QueryType, make_executable_schema, MutationType, gql
typeDefs = gql('''
directive @cypher(statement: String!) on FIELD_DEFINITION
directive @relation(name:String!, direction:St... | 31.566372 | 166 | 0.702832 | import uvicorn
from neo4j import GraphDatabase
from ariadne.asgi import GraphQL
from neo4j_graphql_py import neo4j_graphql
from ariadne import QueryType, make_executable_schema, MutationType, gql
typeDefs = gql('''
directive @cypher(statement: String!) on FIELD_DEFINITION
directive @relation(name:String!, direction:St... | true | true |
f72ab07a46237929635bd213f93c69e456b0ae1e | 2,868 | py | Python | modules/storage/PrefabS3Scality.py | threefoldtech/jumpscale_prefab9 | 75cb6267618d9087d4a9a7eaad121a14e497f07d | [
"Apache-2.0"
] | null | null | null | modules/storage/PrefabS3Scality.py | threefoldtech/jumpscale_prefab9 | 75cb6267618d9087d4a9a7eaad121a14e497f07d | [
"Apache-2.0"
] | 31 | 2018-07-31T15:40:07.000Z | 2019-02-20T11:07:15.000Z | modules/storage/PrefabS3Scality.py | threefoldtech/jumpscale_prefab | 75cb6267618d9087d4a9a7eaad121a14e497f07d | [
"Apache-2.0"
] | null | null | null | from jumpscale import j
from time import sleep
app = j.tools.prefab._getBaseAppClass()
class PrefabS3Scality(app):
NAME = 's3scality'
def install(self, start=False, storageLocation="/data/", metaLocation="/meta/"):
"""
put backing store on /storage/...
"""
self.prefab.system... | 43.454545 | 107 | 0.658996 | from jumpscale import j
from time import sleep
app = j.tools.prefab._getBaseAppClass()
class PrefabS3Scality(app):
NAME = 's3scality'
def install(self, start=False, storageLocation="/data/", metaLocation="/meta/"):
self.prefab.system.package.mdupdate()
self.prefab.system.package.install('bu... | true | true |
f72ab0a07e44dd8dfddbb6dd81911777030d7752 | 3,238 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_configuration.py | NateLehman/azure-sdk-for-python | 82fcc5a5e9e01c3b7f6ab24fccbafad19149e400 | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_configuration.py | NateLehman/azure-sdk-for-python | 82fcc5a5e9e01c3b7f6ab24fccbafad19149e400 | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/privatelinks/v2020_05_01/_configuration.py | NateLehman/azure-sdk-for-python | 82fcc5a5e9e01c3b7f6ab24fccbafad19149e400 | [
"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 ... | 46.927536 | 125 | 0.693638 |
from typing import Any, TYPE_CHECKING
from azure.core.configuration import Configuration
from azure.core.pipeline import policies
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
from ._version import VERSION
if TYPE_CHECKING:
from azure.core.credentials import Tok... | true | true |
f72ab179dcc3caf0aecde8a069b2cd8ed3626836 | 2,754 | py | Python | src/main/resources/classes/assassin/multihit.py | WynnLab/WynnLab | 9950bc1485fa187394c1b1326fa0b5c6b6a1ac96 | [
"MIT"
] | 2 | 2021-03-17T19:28:36.000Z | 2021-03-26T09:31:22.000Z | src/main/resources/classes/assassin/multihit.py | FauxKiwi/Wynnlab | 9950bc1485fa187394c1b1326fa0b5c6b6a1ac96 | [
"MIT"
] | 5 | 2021-06-08T12:13:40.000Z | 2021-08-09T15:04:23.000Z | src/main/resources/classes/assassin/multihit.py | FauxKiwi/Wynnlab | 9950bc1485fa187394c1b1326fa0b5c6b6a1ac96 | [
"MIT"
] | 4 | 2021-08-09T15:17:23.000Z | 2022-03-05T14:08:26.000Z | from org.bukkit import Particle, Sound
from org.bukkit.potion import PotionEffectType
from com.wynnlab.spells import PySpell
from com.wynnlab.util import BukkitUtils
class Spell(PySpell):
def __init__(self):
self.l = None
self.entities = None
self.shift = False
def init(self):
... | 41.727273 | 187 | 0.576253 | from org.bukkit import Particle, Sound
from org.bukkit.potion import PotionEffectType
from com.wynnlab.spells import PySpell
from com.wynnlab.util import BukkitUtils
class Spell(PySpell):
def __init__(self):
self.l = None
self.entities = None
self.shift = False
def init(self):
... | true | true |
f72ab1a21ac26d83b6dfe2d7a8390897f1a6f645 | 5,138 | py | Python | DSPdu.py | Francisobiagwu/SecureDocumentSharing | d8fe27f3ca4d1b470a8cbe6d3e475226bdb796c1 | [
"MIT"
] | 2 | 2018-06-21T18:06:15.000Z | 2021-08-19T15:27:55.000Z | DSPdu.py | Francisobiagwu/DocumentSharing | d8fe27f3ca4d1b470a8cbe6d3e475226bdb796c1 | [
"MIT"
] | null | null | null | DSPdu.py | Francisobiagwu/DocumentSharing | d8fe27f3ca4d1b470a8cbe6d3e475226bdb796c1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
@author: Francis Obiagwu
@software: SecureDocumentSharing
@file: DSPdu.py
@time: 6/6/18 7:16 PM
"""
import binascii
import struct
from datetime import datetime
from DSCodes import DSCode
class DSPdu:
"""
The DSPdu class is used to create a generic pdu object. The user have the opti... | 30.583333 | 127 | 0.527053 |
import binascii
import struct
from datetime import datetime
from DSCodes import DSCode
class DSPdu:
def __init__( self ):
array = [('MESSAGE_TYPE', '12s'), ('TIMESTAMP', '32s... | true | true |
f72ab2180c0e9b438ab38e4580406e4f2106a777 | 731 | py | Python | main.py | beetrandahiya/project-Zurich | e46584c1e036ec95a9f612d04a3855349568e082 | [
"MIT"
] | null | null | null | main.py | beetrandahiya/project-Zurich | e46584c1e036ec95a9f612d04a3855349568e082 | [
"MIT"
] | null | null | null | main.py | beetrandahiya/project-Zurich | e46584c1e036ec95a9f612d04a3855349568e082 | [
"MIT"
] | null | null | null | import numpy as np
#test inputs
inputs = [1, 2, 3, 2.5]
weights = [[0.2, 0.8, -0.5, 1],
[0.5, -0.91, 0.26, -0.5],
[-0.26, -0.27, 0.17, 0.87]]
biases = [2, 3, 0.5]
def neuron_output(inputs, weights,bias):
return sum(inputs[i] * weights[i] for i in range(len(inputs)))+ bias
#this can also be done with numpy becau... | 22.151515 | 88 | 0.674419 | import numpy as np
inputs = [1, 2, 3, 2.5]
weights = [[0.2, 0.8, -0.5, 1],
[0.5, -0.91, 0.26, -0.5],
[-0.26, -0.27, 0.17, 0.87]]
biases = [2, 3, 0.5]
def neuron_output(inputs, weights,bias):
return sum(inputs[i] * weights[i] for i in range(len(inputs)))+ bias
def neuron_layer_output(inputs, weights, biases):... | true | true |
f72ab2e85de44330df2bccc1d1ebf94901b9c48b | 387 | py | Python | students/K33401/Goncharov_Vladimir/Lr3/hotel/hotel/asgi.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 4 | 2020-09-03T15:41:42.000Z | 2021-12-24T15:28:20.000Z | students/K33401/Goncharov_Vladimir/Lr3/hotel/hotel/asgi.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 48 | 2020-09-13T20:22:42.000Z | 2021-04-30T11:13:30.000Z | students/K33401/Goncharov_Vladimir/Lr3/hotel/hotel/asgi.py | ShubhamKunal/ITMO_ICT_WebDevelopment_2020-2021 | bb91c91a56d21cec2b12ae4cc722eaa652a88420 | [
"MIT"
] | 69 | 2020-09-06T10:32:37.000Z | 2021-11-28T18:13:17.000Z | """
ASGI config for hotel project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTING... | 22.764706 | 78 | 0.782946 |
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'hotel.settings')
application = get_asgi_application()
| true | true |
f72ab3141e4951a0fbf2744f08280c033d6a9acf | 13,023 | py | Python | imgcls/modeling/backbone/mobilenet.py | TuranSKT/detectron2_class | c90e68abbd39afa8c34d83ac760cabf3b5d02868 | [
"MIT"
] | 22 | 2020-06-09T11:06:15.000Z | 2022-03-29T16:24:23.000Z | imgcls/modeling/backbone/mobilenet.py | TuranSKT/detectron2_class | c90e68abbd39afa8c34d83ac760cabf3b5d02868 | [
"MIT"
] | 4 | 2020-07-09T16:39:48.000Z | 2020-11-25T13:34:52.000Z | imgcls/modeling/backbone/mobilenet.py | TuranSKT/detectron2_class | c90e68abbd39afa8c34d83ac760cabf3b5d02868 | [
"MIT"
] | 9 | 2020-06-10T09:55:09.000Z | 2021-08-20T12:55:26.000Z | '''
@Copyright (c) tkianai All Rights Reserved.
@Author : tkianai
@Github : https://github.com/tkianai
@Date : 2020-04-26 14:14:18
@FilePath : /ImageCls.detectron2/imgcls/modeling/backbone/mobilenet.py
@Description :
'''
import torch
import torch.nn as nn
from detectron2.layers imp... | 35.581967 | 95 | 0.543807 |
import torch
import torch.nn as nn
from detectron2.layers import Conv2d, ShapeSpec
from detectron2.modeling.backbone.build import BACKBONE_REGISTRY
from detectron2.modeling.backbone import Backbone
from detectron2.modeling.backbone.fpn import FPN, LastLevelMaxPool, LastLevelP6P7
__all__ = [
'build_mnetv1_backbo... | true | true |
f72ab477380e68f511e89a12fe5e0154052fb2b7 | 854 | py | Python | sleap/io/format/text.py | jens-k/sleap | 4e99ed037f1f7f41d9f15e2efaac638fc7e12b09 | [
"BSD-3-Clause-Clear"
] | null | null | null | sleap/io/format/text.py | jens-k/sleap | 4e99ed037f1f7f41d9f15e2efaac638fc7e12b09 | [
"BSD-3-Clause-Clear"
] | null | null | null | sleap/io/format/text.py | jens-k/sleap | 4e99ed037f1f7f41d9f15e2efaac638fc7e12b09 | [
"BSD-3-Clause-Clear"
] | null | null | null | from .adaptor import Adaptor, SleapObjectType
from .filehandle import FileHandle
class TextAdaptor(Adaptor):
@property
def handles(self):
return SleapObjectType.misc
@property
def default_ext(self):
return "txt"
@property
def all_exts(self):
return ["txt", "log"]
... | 21.35 | 56 | 0.619438 | from .adaptor import Adaptor, SleapObjectType
from .filehandle import FileHandle
class TextAdaptor(Adaptor):
@property
def handles(self):
return SleapObjectType.misc
@property
def default_ext(self):
return "txt"
@property
def all_exts(self):
return ["txt", "log"]
... | true | true |
f72ab504565970994d8e7ad4fc8bc28fa7d14daa | 14,614 | py | Python | tests/unit/anchore_engine/services/policy_engine/policy/test_parameters.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | 1 | 2019-06-27T08:47:48.000Z | 2019-06-27T08:47:48.000Z | tests/unit/anchore_engine/services/policy_engine/policy/test_parameters.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | 4 | 2020-11-07T00:16:02.000Z | 2020-11-08T20:52:06.000Z | tests/unit/anchore_engine/services/policy_engine/policy/test_parameters.py | dspalmer99/anchore-engine | 8c61318be6fec5d767426fa4ccd98472cc85b5cd | [
"Apache-2.0"
] | 1 | 2019-11-23T03:39:28.000Z | 2019-11-23T03:39:28.000Z | import unittest
from anchore_engine.services.policy_engine.engine.policy.params import JsonSchemaValidator, BooleanStringValidator, TypeValidator, CommaDelimitedNumberListValidator, EnumValidator, \
DelimitedEnumStringValidator, IntegerValidator, NameVersionListValidator, PipeDelimitedStringListValidator, CommaDel... | 32.189427 | 258 | 0.531066 | import unittest
from anchore_engine.services.policy_engine.engine.policy.params import JsonSchemaValidator, BooleanStringValidator, TypeValidator, CommaDelimitedNumberListValidator, EnumValidator, \
DelimitedEnumStringValidator, IntegerValidator, NameVersionListValidator, PipeDelimitedStringListValidator, CommaDel... | true | true |
f72ab6805d5b4e650b8e6b745b9ad9b0ed680de0 | 329 | py | Python | clingine/clock.py | avancayetano/clingine | 55e8bd6366aad3ae8e7ac9537fa3ae85efab9ddc | [
"MIT"
] | 12 | 2020-04-10T09:10:29.000Z | 2022-03-12T03:45:08.000Z | clingine/clock.py | avancayetano/clingine | 55e8bd6366aad3ae8e7ac9537fa3ae85efab9ddc | [
"MIT"
] | 6 | 2020-04-11T10:47:01.000Z | 2020-10-19T14:15:55.000Z | clingine/clock.py | avancayetano/clingine | 55e8bd6366aad3ae8e7ac9537fa3ae85efab9ddc | [
"MIT"
] | 1 | 2021-09-04T00:40:34.000Z | 2021-09-04T00:40:34.000Z | import time
class Clock:
def __init__(self):
self.start_time = time.time()
self.current_time = time.time()
def get_time(self):
return time.time() - self.start_time
def get_dt(self):
return time.time() - self.current_time
def update(self):
self.current_time = time.time()
def delay(self, sec):
time.s... | 19.352941 | 40 | 0.702128 | import time
class Clock:
def __init__(self):
self.start_time = time.time()
self.current_time = time.time()
def get_time(self):
return time.time() - self.start_time
def get_dt(self):
return time.time() - self.current_time
def update(self):
self.current_time = time.time()
def delay(self, sec):
time.s... | true | true |
f72ab6e6434d9b5f426cef3c89cc2fec38e25ed5 | 1,703 | py | Python | scripts/maf_covered_regions.py | tweirick/bx-python | f16a57e9f0a133ab4d62aed6fec087b8ce4ec848 | [
"MIT"
] | null | null | null | scripts/maf_covered_regions.py | tweirick/bx-python | f16a57e9f0a133ab4d62aed6fec087b8ce4ec848 | [
"MIT"
] | null | null | null | scripts/maf_covered_regions.py | tweirick/bx-python | f16a57e9f0a133ab4d62aed6fec087b8ce4ec848 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Read a maf file and print the regions covered to a set of bed files (one for
each sequence source referenced in the maf). Only blocks with a positive
percent identity are written out.
TODO: Can this be generalized to be made more useful?
usage: %prog bed_outfile_prefix < maf
"""
from __f... | 28.864407 | 107 | 0.570757 |
from __future__ import division, print_function
import sys
import bx.align.maf
import psyco_full
def block_pid( comp1, comp2 ):
match = 0
total = 0
t1 = comp1.text.lower()
t2 = comp2.text.lower()
for i in range( 0, len(t1) ):
a, b = t1[i], t2[i]
if a == '-' or b == '-':
... | true | true |
f72ab7e4fe69751d46adb928a0232848fd36398f | 4,962 | py | Python | apps/log_extract/handlers/thread.py | yiqiwang-17/bk-log | 7b356fced63b667baea300cfd194ad70a842c3ee | [
"MIT"
] | null | null | null | apps/log_extract/handlers/thread.py | yiqiwang-17/bk-log | 7b356fced63b667baea300cfd194ad70a842c3ee | [
"MIT"
] | null | null | null | apps/log_extract/handlers/thread.py | yiqiwang-17/bk-log | 7b356fced63b667baea300cfd194ad70a842c3ee | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making BK-LOG 蓝鲸日志平台 available.
Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
BK-LOG 蓝鲸日志平台 is licensed under the MIT License.
License for BK-LOG 蓝鲸日志平台:
------------------------------------------------... | 38.169231 | 116 | 0.689238 |
import logging from functools import partial from multiprocessing.pool import ThreadPool as _ThreadPool
from django import db from django.utils import timezone, translation
from apps.utils.local import activate_request, get_request from .local import local
logger = logging.getLogger(__name__)
def run_func_... | true | true |
f72ab8481e4f48f3a7a7d665752d25ae94efa665 | 3,571 | py | Python | basic/string1.py | hmln/google-python-exercises | c9b55063708ea22a99914a3ad14fd2aae54336f2 | [
"Apache-2.0"
] | null | null | null | basic/string1.py | hmln/google-python-exercises | c9b55063708ea22a99914a3ad14fd2aae54336f2 | [
"Apache-2.0"
] | null | null | null | basic/string1.py | hmln/google-python-exercises | c9b55063708ea22a99914a3ad14fd2aae54336f2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python -tt
# Copyright 2010 Google Inc.
# Licensed under the Apache License, Version 2.0
# http://www.apache.org/licenses/LICENSE-2.0
# Google's Python Class
# http://code.google.com/edu/languages/google-python-class/
# Basic string exercises
# Fill in the code for the functions below. main() is already se... | 32.463636 | 80 | 0.659199 |
# http://code.google.com/edu/languages/google-python-class/
# Basic string exercises
# Fill in the code for the functions below. main() is already set up
# to call the functions with a few different inputs,
# printing 'OK' when each function is correct.
# The starter code for each function includes a 'return'
# which... | true | true |
f72ab89546778e858c6dc70b6873b930fa6fde29 | 518 | py | Python | tests/test_config.py | kraeki/openair-jac | 760b1b1be7efebde1146b31cf0a9326a7362a82c | [
"BSD-3-Clause"
] | null | null | null | tests/test_config.py | kraeki/openair-jac | 760b1b1be7efebde1146b31cf0a9326a7362a82c | [
"BSD-3-Clause"
] | null | null | null | tests/test_config.py | kraeki/openair-jac | 760b1b1be7efebde1146b31cf0a9326a7362a82c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Test configs."""
from openair.app import create_app
from openair.settings import DevConfig, ProdConfig
def test_production_config():
"""Production config."""
app = create_app(ProdConfig)
assert app.config['ENV'] == 'prod'
assert app.config['DEBUG'] is False
assert app.co... | 25.9 | 50 | 0.675676 | from openair.app import create_app
from openair.settings import DevConfig, ProdConfig
def test_production_config():
app = create_app(ProdConfig)
assert app.config['ENV'] == 'prod'
assert app.config['DEBUG'] is False
assert app.config['DEBUG_TB_ENABLED'] is False
def test_dev_config():
app = crea... | true | true |
f72ab8a2448743b933326291b648e8d737b17a76 | 142 | py | Python | config/prd.py | by46/camel | b1ac2609bc5d1cd22933c07c9fce7b935f2d9394 | [
"MIT"
] | null | null | null | config/prd.py | by46/camel | b1ac2609bc5d1cd22933c07c9fce7b935f2d9394 | [
"MIT"
] | null | null | null | config/prd.py | by46/camel | b1ac2609bc5d1cd22933c07c9fce7b935f2d9394 | [
"MIT"
] | null | null | null | # PRD environment setting
# Flask-NegLog Settings
LOG_LEVEL = 'debug'
LOG_FILENAME = "/var/camel/error.log"
LOG_ENABLE_CONSOLE = False
| 20.285714 | 38 | 0.739437 |
LOG_LEVEL = 'debug'
LOG_FILENAME = "/var/camel/error.log"
LOG_ENABLE_CONSOLE = False
| true | true |
f72ab9e2e5e78bac6263ebb24b7540ab94fc5895 | 1,304 | py | Python | clean_prediction.py | richardanarfi/Recsys-Challenge-2018-TeamFL | 81e00a2417d530ea1033dcb22fbe29b7ceb12bb2 | [
"Apache-2.0"
] | null | null | null | clean_prediction.py | richardanarfi/Recsys-Challenge-2018-TeamFL | 81e00a2417d530ea1033dcb22fbe29b7ceb12bb2 | [
"Apache-2.0"
] | null | null | null | clean_prediction.py | richardanarfi/Recsys-Challenge-2018-TeamFL | 81e00a2417d530ea1033dcb22fbe29b7ceb12bb2 | [
"Apache-2.0"
] | null | null | null | from gensim.models import Word2Vec
from sklearn.decomposition import PCA
from matplotlib import pyplot
import string
import fnmatch
# define training data
#sentences = open('new_file_sentence.txt', 'r', encoding='utf-8')
path = 'predictions_v11_1500_clean.txt'
output_file = open("predictions_v11_500.txt", "... | 26.612245 | 66 | 0.595859 | from gensim.models import Word2Vec
from sklearn.decomposition import PCA
from matplotlib import pyplot
import string
import fnmatch
path = 'predictions_v11_1500_clean.txt'
output_file = open("predictions_v11_500.txt", "w")
input_texts = ()
with open(path) as f:
lines = f.read().split('\n')
for line ... | true | true |
f72aba22fc109af958a6de438269df6a2c4a6b07 | 1,733 | py | Python | tests/test_data/test_structured.py | el/elizabeth | dc82cd9d2bb230acdb2f1a49bc16b1c3d12077ff | [
"MIT"
] | null | null | null | tests/test_data/test_structured.py | el/elizabeth | dc82cd9d2bb230acdb2f1a49bc16b1c3d12077ff | [
"MIT"
] | null | null | null | tests/test_data/test_structured.py | el/elizabeth | dc82cd9d2bb230acdb2f1a49bc16b1c3d12077ff | [
"MIT"
] | 1 | 2019-12-27T19:34:17.000Z | 2019-12-27T19:34:17.000Z | # -*- coding: utf-8 -*-
import re
import csv
from elizabeth.core.providers import Structured
from unittest import TestCase
from elizabeth.core import interdata as common
from ._patterns import STR_REGEX
class StructuredBaseTest(TestCase):
def setUp(self):
self.structured = Structured('en')
def tear... | 36.104167 | 87 | 0.663589 | import re
import csv
from elizabeth.core.providers import Structured
from unittest import TestCase
from elizabeth.core import interdata as common
from ._patterns import STR_REGEX
class StructuredBaseTest(TestCase):
def setUp(self):
self.structured = Structured('en')
def tearDown(self):
del ... | true | true |
f72aba59680a1148f9878e622e1a32e4cbb7706a | 212 | py | Python | mayan/apps/document_states/managers.py | eshbeata/open-paperless | 6b9ed1f21908116ad2795b3785b2dbd66713d66e | [
"Apache-2.0"
] | 2,743 | 2017-12-18T07:12:30.000Z | 2022-03-27T17:21:25.000Z | mayan/apps/document_states/managers.py | kyper999/mayan-edms | ca7b8301a1f68548e8e718d42a728a500d67286e | [
"Apache-2.0"
] | 15 | 2020-06-06T00:00:48.000Z | 2022-03-12T00:03:54.000Z | mayan/apps/document_states/managers.py | kyper999/mayan-edms | ca7b8301a1f68548e8e718d42a728a500d67286e | [
"Apache-2.0"
] | 257 | 2017-12-18T03:12:58.000Z | 2022-03-25T08:59:10.000Z | from django.db import models
class WorkflowManager(models.Manager):
def launch_for(self, document):
for workflow in document.document_type.workflows.all():
workflow.launch_for(document)
| 26.5 | 63 | 0.726415 | from django.db import models
class WorkflowManager(models.Manager):
def launch_for(self, document):
for workflow in document.document_type.workflows.all():
workflow.launch_for(document)
| true | true |
f72aba799455f6cc85c2295c96a774ff725ab946 | 18,200 | py | Python | tests/onnx/test_onnx_model_export.py | kokoff/mlflow | 062722b172f403e613c41f9bb024b3e1673dfe31 | [
"Apache-2.0"
] | 1 | 2020-08-17T21:50:32.000Z | 2020-08-17T21:50:32.000Z | tests/onnx/test_onnx_model_export.py | kokoff/mlflow | 062722b172f403e613c41f9bb024b3e1673dfe31 | [
"Apache-2.0"
] | null | null | null | tests/onnx/test_onnx_model_export.py | kokoff/mlflow | 062722b172f403e613c41f9bb024b3e1673dfe31 | [
"Apache-2.0"
] | null | null | null | import sys
import os
import pytest
import mock
from keras.models import Sequential
from keras.layers import Dense
import sklearn.datasets as datasets
import pandas as pd
import numpy as np
import yaml
import tensorflow as tf
import mlflow.pyfunc.scoring_server as pyfunc_scoring_server
from mlflow import pyfunc
from m... | 34.469697 | 99 | 0.720879 | import sys
import os
import pytest
import mock
from keras.models import Sequential
from keras.layers import Dense
import sklearn.datasets as datasets
import pandas as pd
import numpy as np
import yaml
import tensorflow as tf
import mlflow.pyfunc.scoring_server as pyfunc_scoring_server
from mlflow import pyfunc
from m... | true | true |
f72ababf067d4c75b7546894366ccba2992a76c1 | 8,329 | py | Python | test/functional/feature_proxy.py | KingricharVD/DSW | 7281f6ed5c102687805d2bca707e675cbce7dd4d | [
"MIT"
] | 3 | 2020-10-02T13:11:53.000Z | 2021-11-06T18:02:32.000Z | test/functional/feature_proxy.py | KingricharVD/DSW | 7281f6ed5c102687805d2bca707e675cbce7dd4d | [
"MIT"
] | 3 | 2020-08-06T17:35:37.000Z | 2021-07-22T01:37:56.000Z | test/functional/feature_proxy.py | KingricharVD/DSW | 7281f6ed5c102687805d2bca707e675cbce7dd4d | [
"MIT"
] | 6 | 2020-10-09T16:42:49.000Z | 2021-07-05T20:57:23.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test bitcoind with different proxy configuration.
Test plan:
- Start nesteggd's with different proxy c... | 41.232673 | 121 | 0.625405 |
import socket
import os
from test_framework.socks5 import Socks5Configuration, Socks5Command, Socks5Server, AddressType
from test_framework.test_framework import PivxTestFramework
from test_framework.util import (
PORT_MIN,
PORT_RANGE,
assert_equal,
)
from test_framework.netutil import test_ipv6_local
RA... | true | true |
f72abb4a157ff48785fee482319d874695a9722b | 10,815 | py | Python | tensorflow/python/training/tracking/resource.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 7 | 2022-03-04T21:14:47.000Z | 2022-03-22T23:07:39.000Z | tensorflow/python/training/tracking/resource.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 1 | 2022-03-08T18:28:46.000Z | 2022-03-08T18:37:20.000Z | tensorflow/python/training/tracking/resource.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 1 | 2022-03-22T00:45:15.000Z | 2022-03-22T00:45:15.000Z | # Copyright 2017 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... | 34.887097 | 85 | 0.713269 |
import contextlib
import copy
import weakref
import six
from tensorflow.python.eager import context
from tensorflow.python.eager import def_function
from tensorflow.python.framework import ops
from tensorflow.python.training.tracking import base
from tensorflow.python.util import tf_contextlib
from tensorflow.python... | true | true |
f72abbd3ee1fb7ddc9a51049416b8d1194ab3660 | 9,235 | py | Python | remove_code/sotas/SSAH-adversarial-attack-main/utils/fid_score.py | JohnZhang000/adaptive-jpeg-compression | f54e4798c01169812958f4d5539a03927dbdc313 | [
"MIT"
] | 9 | 2022-03-15T02:59:32.000Z | 2022-03-26T09:16:44.000Z | remove_code/sotas/SSAH-adversarial-attack-main/utils/fid_score.py | JohnZhang000/adaptive-jpeg-compression | f54e4798c01169812958f4d5539a03927dbdc313 | [
"MIT"
] | 1 | 2022-03-30T02:59:55.000Z | 2022-03-30T02:59:55.000Z | remove_code/sotas/SSAH-adversarial-attack-main/utils/fid_score.py | JohnZhang000/adaptive-jpeg-compression | f54e4798c01169812958f4d5539a03927dbdc313 | [
"MIT"
] | 1 | 2022-03-20T12:19:26.000Z | 2022-03-20T12:19:26.000Z | """Calculates the Frechet Inception Distance (FID) to evalulate GANs
The FID metric calculates the distance between two distributions of images.
Typically, we have summary statistics (mean & covariance matrix) of one
of these distributions, while the 2nd distribution is given by a GAN.
When run as a stand-alone progr... | 35.794574 | 78 | 0.636492 | import os
import pathlib
from argparse import ArgumentDefaultsHelpFormatter, ArgumentParser
from multiprocessing import cpu_count
import numpy as np
import torch
import torchvision.transforms as TF
from PIL import Image
from scipy import linalg
from torch.nn.functional import adaptive_avg_pool2d
try:
from tqdm im... | true | true |
f72abcf519c3d777dae73575160a3505946609c2 | 421 | py | Python | test/command_line/test_plot_Fo_vs_Fc.py | TiankunZhou/dials | bd5c95b73c442cceb1c61b1690fd4562acf4e337 | [
"BSD-3-Clause"
] | 58 | 2015-10-15T09:28:20.000Z | 2022-03-28T20:09:38.000Z | test/command_line/test_plot_Fo_vs_Fc.py | TiankunZhou/dials | bd5c95b73c442cceb1c61b1690fd4562acf4e337 | [
"BSD-3-Clause"
] | 1,741 | 2015-11-24T08:17:02.000Z | 2022-03-31T15:46:42.000Z | test/command_line/test_plot_Fo_vs_Fc.py | TiankunZhou/dials | bd5c95b73c442cceb1c61b1690fd4562acf4e337 | [
"BSD-3-Clause"
] | 45 | 2015-10-14T13:44:16.000Z | 2022-03-22T14:45:56.000Z | import procrunner
def test(dials_data, tmp_path):
mtz_file = dials_data("lysozyme_electron_diffraction").join("refmac_final.mtz")
result = procrunner.run(
["dials.plot_Fo_vs_Fc", "hklin=" + mtz_file.strpath], working_directory=tmp_path
)
assert not result.returncode and not result.stderr
a... | 35.083333 | 88 | 0.719715 | import procrunner
def test(dials_data, tmp_path):
mtz_file = dials_data("lysozyme_electron_diffraction").join("refmac_final.mtz")
result = procrunner.run(
["dials.plot_Fo_vs_Fc", "hklin=" + mtz_file.strpath], working_directory=tmp_path
)
assert not result.returncode and not result.stderr
a... | true | true |
f72ac027d54393cfbc8f4c4a085d814d8add6b01 | 99 | py | Python | algo228/shooter_game.py | voidwalker-so2/vasya228 | cf766ee40341aa46799a461a246fa1f8f24df0ec | [
"BSD-2-Clause"
] | null | null | null | algo228/shooter_game.py | voidwalker-so2/vasya228 | cf766ee40341aa46799a461a246fa1f8f24df0ec | [
"BSD-2-Clause"
] | null | null | null | algo228/shooter_game.py | voidwalker-so2/vasya228 | cf766ee40341aa46799a461a246fa1f8f24df0ec | [
"BSD-2-Clause"
] | null | null | null | #Создай собственный Шутер!
from pygame import *
dfgshfhsdljfvhs
ssdkgvkshdv
sdhvljsdhv
sljgvksjdg
| 12.375 | 26 | 0.848485 |
from pygame import *
dfgshfhsdljfvhs
ssdkgvkshdv
sdhvljsdhv
sljgvksjdg
| true | true |
f72ac04ea85e822cd8063706b8bc88973fb8d216 | 7,842 | py | Python | src/python/pants/backend/jvm/tasks/classpath_util.py | AllClearID/pants | c4fdf00a3bdf9f26f876e85c46909d0729f7132c | [
"Apache-2.0"
] | 1 | 2021-11-11T14:04:24.000Z | 2021-11-11T14:04:24.000Z | src/python/pants/backend/jvm/tasks/classpath_util.py | AllClearID/pants | c4fdf00a3bdf9f26f876e85c46909d0729f7132c | [
"Apache-2.0"
] | 2 | 2016-10-13T21:37:42.000Z | 2018-07-20T20:14:33.000Z | src/python/pants/backend/jvm/tasks/classpath_util.py | AllClearID/pants | c4fdf00a3bdf9f26f876e85c46909d0729f7132c | [
"Apache-2.0"
] | 1 | 2018-03-08T22:21:44.000Z | 2018-03-08T22:21:44.000Z | # 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, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import itertools
imp... | 43.087912 | 97 | 0.733614 |
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import itertools
import os
from collections import OrderedDict
from twitter.common.collections import OrderedSet
from pants.util.contextutil import open_zip
from pa... | true | true |
f72ac0bed67e590b7732695c441a21acb5828469 | 2,176 | py | Python | Slider_Trinkey/Hue_Brightness_Python_Code/Hue_Brightness_Python_code.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | Slider_Trinkey/Hue_Brightness_Python_Code/Hue_Brightness_Python_code.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | Slider_Trinkey/Hue_Brightness_Python_Code/Hue_Brightness_Python_code.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""
Slider Trinkey Hue Brightness Python Example
(Requires Hue and Monitor Brightness CircuitPython example to be running on the Slider Trinkey)
"""
import sys
from phue import Bridge
import serial
from serial.tools i... | 31.085714 | 96 | 0.688879 |
import sys
from phue import Bridge
import serial
from serial.tools import list_ports
LAMP_OR_GROUP_NAME = "Office"
b = Bridge("0.0.0.0")
slider_trinkey_port = None
ports = list_ports.comports(include_links=False)
for p in ports:
if p.pid is not None:
print("Port:", p.device, "-", hex(p.pid), end="\t")
... | true | true |
f72ac1123188353e94ecd664682ea810ce628d26 | 2,748 | py | Python | mira/auth.py | Bl4ck4/mira-1 | 2b907c1a4c09585f0c68223e0435cc7414eab3c5 | [
"MIT"
] | null | null | null | mira/auth.py | Bl4ck4/mira-1 | 2b907c1a4c09585f0c68223e0435cc7414eab3c5 | [
"MIT"
] | null | null | null | mira/auth.py | Bl4ck4/mira-1 | 2b907c1a4c09585f0c68223e0435cc7414eab3c5 | [
"MIT"
] | 1 | 2021-10-02T10:36:21.000Z | 2021-10-02T10:36:21.000Z | """Mira 2020."""
import functools
import requests
from flask import (
Blueprint, flash, g, redirect, render_template, request, session, url_for
)
from werkzeug.security import check_password_hash, generate_password_hash
BLUEPRINT = Blueprint('auth', __name__, url_prefix='/auth')
@BLUEPRINT.route('/login', methods... | 31.953488 | 81 | 0.612445 | import functools
import requests
from flask import (
Blueprint, flash, g, redirect, render_template, request, session, url_for
)
from werkzeug.security import check_password_hash, generate_password_hash
BLUEPRINT = Blueprint('auth', __name__, url_prefix='/auth')
@BLUEPRINT.route('/login', methods = ['GET', 'POST'... | true | true |
f72ac2161ec154a6fbc2d4c0db4116346291b457 | 9,690 | py | Python | homeassistant/components/zha/core/discovery.py | twrecked/core | d3ae8a938cdea9b6e0d443c91c37ac3dbbd459ab | [
"Apache-2.0"
] | 2 | 2021-09-13T21:44:02.000Z | 2021-12-17T21:20:51.000Z | homeassistant/components/zha/core/discovery.py | twrecked/core | d3ae8a938cdea9b6e0d443c91c37ac3dbbd459ab | [
"Apache-2.0"
] | 5 | 2021-02-08T20:55:25.000Z | 2022-03-12T00:51:18.000Z | homeassistant/components/zha/core/discovery.py | twrecked/core | d3ae8a938cdea9b6e0d443c91c37ac3dbbd459ab | [
"Apache-2.0"
] | 2 | 2020-11-04T07:40:01.000Z | 2021-09-13T21:44:03.000Z | """Device discovery functions for Zigbee Home Automation."""
from collections import Counter
import logging
from typing import Callable, List, Tuple
from homeassistant import const as ha_const
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
asyn... | 36.022305 | 88 | 0.637771 |
from collections import Counter
import logging
from typing import Callable, List, Tuple
from homeassistant import const as ha_const
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import (
async_dispatcher_connect,
async_dispatcher_send,
)
from homeassistant.helpers.entity_regist... | true | true |
f72ac2c60476f898867047bfebd012f5f4feae2c | 3,209 | py | Python | autocalibration/lib/python2.7/site-packages/matplotlib/tests/test_units.py | prcalopa/reactable-autocalibration | eb67a5b5ee0e50f1effa773f6f3f934b5fda6fcf | [
"MIT"
] | 5 | 2017-11-15T10:33:42.000Z | 2021-11-16T02:21:31.000Z | matplotlib/tests/test_units.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 2 | 2017-10-28T03:30:26.000Z | 2017-10-28T03:31:00.000Z | matplotlib/tests/test_units.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 6 | 2017-11-30T00:34:20.000Z | 2021-05-20T02:58:02.000Z | from matplotlib.cbook import iterable
import matplotlib.pyplot as plt
from matplotlib.testing.decorators import image_comparison
import matplotlib.units as munits
import numpy as np
try:
# mock in python 3.3+
from unittest.mock import MagicMock
except ImportError:
from mock import MagicMock
# Basic class... | 33.778947 | 78 | 0.644126 | from matplotlib.cbook import iterable
import matplotlib.pyplot as plt
from matplotlib.testing.decorators import image_comparison
import matplotlib.units as munits
import numpy as np
try:
from unittest.mock import MagicMock
except ImportError:
from mock import MagicMock
class Quantity(object):
def __i... | true | true |
f72ac3357d035fb96b484046450f998989af2f98 | 36,873 | py | Python | src/unity/python/turicreate/toolkits/drawing_classifier/drawing_classifier.py | jolinlaw/turicreate | 6b2057dc29533da225d18138e93cc15680eea85d | [
"BSD-3-Clause"
] | null | null | null | src/unity/python/turicreate/toolkits/drawing_classifier/drawing_classifier.py | jolinlaw/turicreate | 6b2057dc29533da225d18138e93cc15680eea85d | [
"BSD-3-Clause"
] | null | null | null | src/unity/python/turicreate/toolkits/drawing_classifier/drawing_classifier.py | jolinlaw/turicreate | 6b2057dc29533da225d18138e93cc15680eea85d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2019 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
import turicreate as _tc
import numpy as _np
import time as _time
from turicreate.t... | 41.901136 | 123 | 0.609389 |
import turicreate as _tc
import numpy as _np
import time as _time
from turicreate.toolkits._model import CustomModel as _CustomModel
from turicreate.toolkits._model import PythonProxy as _PythonProxy
from turicreate.toolkits import evaluation as _evaluation
import turicreate.toolkits._internal_utils as _tkutl
from tur... | true | true |
f72ac42fd9ceac1af5051c46c0355962da805968 | 15,671 | py | Python | restio/model.py | eduardostarling/restio | 66bdb0f86105bf090d7f109da2dd37cbd0096da7 | [
"MIT"
] | 3 | 2019-11-11T14:18:26.000Z | 2020-09-04T20:50:11.000Z | restio/model.py | eduardostarling/restio | 66bdb0f86105bf090d7f109da2dd37cbd0096da7 | [
"MIT"
] | 16 | 2019-11-19T14:39:30.000Z | 2021-06-26T15:08:21.000Z | restio/model.py | eduardostarling/restio | 66bdb0f86105bf090d7f109da2dd37cbd0096da7 | [
"MIT"
] | null | null | null | from __future__ import annotations
from collections.abc import Iterable
from reprlib import Repr
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Set, Tuple, Type
from uuid import UUID, uuid4
from restio.event import EventListener
from restio.fields.base import Field, T_co
from restio.shared imp... | 35.942661 | 88 | 0.639972 | from __future__ import annotations
from collections.abc import Iterable
from reprlib import Repr
from typing import TYPE_CHECKING, Any, Callable, Dict, List, Optional, Set, Tuple, Type
from uuid import UUID, uuid4
from restio.event import EventListener
from restio.fields.base import Field, T_co
from restio.shared imp... | true | true |
f72ac444a8eab9e84fe6a3ecf0f61835271a6e97 | 4,638 | py | Python | opencv3_align_images.py | jaydenmedia/OpenCV3-Python | e0bfed6582447c567f100c507f5a8c59b621dfe1 | [
"MIT"
] | null | null | null | opencv3_align_images.py | jaydenmedia/OpenCV3-Python | e0bfed6582447c567f100c507f5a8c59b621dfe1 | [
"MIT"
] | null | null | null | opencv3_align_images.py | jaydenmedia/OpenCV3-Python | e0bfed6582447c567f100c507f5a8c59b621dfe1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Input data files are available in the "../input/" directory.
# For example, running this (by clicking run or pressing Shift+Enter) will
# list the files in the input directory from subprocess import check_output
#print(check_output(["ls", "../input"]).decode("utf8"))
#ORB is basically a fu... | 32.661972 | 80 | 0.625916 |
import numpy as np import cv2
import os
import csv
import sys
from time import sleep
def im_align_orb(imp1, imp2, nf=10000):
img1 = cv2.imread(imp1, 0)
img2 = cv2.imread(imp2, 0)
h2, w2 = img2.shape[:2]
orb = cv2.ORB_create(nfeatures=nf, WTA_K=2)
kp1, des1 = orb.detectAndCompute(img1, None)... | true | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.