hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79508ef0a1803755e122c9c087115570ad3b8146 | 4,236 | py | Python | autosklearn/pipeline/components/feature_preprocessing/liblinear_svc_preprocessor.py | FelixNeutatz/auto-sklearn | b5d141603332041475ed746aa1640334f5561aea | [
"BSD-3-Clause"
] | 2 | 2020-02-22T15:00:49.000Z | 2020-06-28T08:20:19.000Z | autosklearn/pipeline/components/feature_preprocessing/liblinear_svc_preprocessor.py | FelixNeutatz/auto-sklearn | b5d141603332041475ed746aa1640334f5561aea | [
"BSD-3-Clause"
] | null | null | null | autosklearn/pipeline/components/feature_preprocessing/liblinear_svc_preprocessor.py | FelixNeutatz/auto-sklearn | b5d141603332041475ed746aa1640334f5561aea | [
"BSD-3-Clause"
] | null | null | null | from ConfigSpace.configuration_space import ConfigurationSpace
from ConfigSpace.hyperparameters import UniformFloatHyperparameter, \
CategoricalHyperparameter, Constant
from ConfigSpace.forbidden import ForbiddenEqualsClause, \
ForbiddenAndConjunction
from autosklearn.pipeline.components.base import AutoSklear... | 41.940594 | 89 | 0.602927 |
79508f1b47d46c1b8e2ea3b1a415c1c3131e0cc8 | 7,207 | py | Python | acme/examples/http01_example.py | RConn12/certbot | 34b568f36648dd5c4103c3a444e81b5662e6be81 | [
"Apache-2.0"
] | 4 | 2020-04-04T19:08:35.000Z | 2020-07-03T04:57:18.000Z | acme/examples/http01_example.py | RConn12/certbot | 34b568f36648dd5c4103c3a444e81b5662e6be81 | [
"Apache-2.0"
] | null | null | null | acme/examples/http01_example.py | RConn12/certbot | 34b568f36648dd5c4103c3a444e81b5662e6be81 | [
"Apache-2.0"
] | 1 | 2019-12-29T16:34:20.000Z | 2019-12-29T16:34:20.000Z | """Example ACME-V2 API for HTTP-01 challenge.
Brief:
This a complete usage example of the python-acme API.
Limitations of this example:
- Works for only one Domain name
- Performs only HTTP-01 challenge
- Uses ACME-v2
Workflow:
(Account creation)
- Create account key
- Register account and a... | 29.904564 | 78 | 0.690301 |
7950906957146e5ba74b6d0bf78825decdfc67c5 | 981 | py | Python | cranserver/contrib/s3.py | darshandoshi95/cran-server | 6b1e13dee9c19d8898eb57368a159c77e70d9430 | [
"BSD-3-Clause"
] | null | null | null | cranserver/contrib/s3.py | darshandoshi95/cran-server | 6b1e13dee9c19d8898eb57368a159c77e70d9430 | [
"BSD-3-Clause"
] | null | null | null | cranserver/contrib/s3.py | darshandoshi95/cran-server | 6b1e13dee9c19d8898eb57368a159c77e70d9430 | [
"BSD-3-Clause"
] | null | null | null | import os
import io
from contextlib import contextmanager
import boto3
import botocore
from lib.storage import Storage
from lib.package import Package
class S3Storage(Storage):
def __init__(self, bucket_loc=None):
s3 = boto3.resource('s3')
self._bucket_loc = bucket_loc or os.getenv('DEFAULT_BUCK... | 22.295455 | 68 | 0.641182 |
79509095eed237e4537999be8cf321333998faa1 | 1,988 | py | Python | gammapy/utils/scripts_test.py | Jaleleddine/gammapy | de9195df40fa5bbf8840cda4e7cd5e8cc5eaadbb | [
"BSD-3-Clause"
] | 1 | 2021-02-02T21:35:27.000Z | 2021-02-02T21:35:27.000Z | gammapy/utils/scripts_test.py | kabartay/gammapy | 015206d2418b1d254f1c9d3ea819ab0c5ece99e9 | [
"BSD-3-Clause"
] | 1 | 2017-02-22T23:12:30.000Z | 2017-02-22T23:12:30.000Z | gammapy/utils/scripts_test.py | kabartay/gammapy | 015206d2418b1d254f1c9d3ea819ab0c5ece99e9 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Test if Jupyter notebooks work."""
import logging
import os
import subprocess
import sys
from pathlib import Path
import pkg_resources
import yaml
log = logging.getLogger(__name__)
def get_scripts():
"""Read `scripts.yaml` info."""
path = Pat... | 25.487179 | 80 | 0.611167 |
795090bc4ec0f2eb40098715a83b48e641cc7214 | 13,297 | py | Python | oci_tools/training_tools.py | AnykeyNL/oci-tools | bcf24b26693a123b988f645210e6726f3897b81b | [
"Apache-2.0"
] | 1 | 2019-06-27T04:17:37.000Z | 2019-06-27T04:17:37.000Z | oci_tools/training_tools.py | AnykeyNL/oci-tools | bcf24b26693a123b988f645210e6726f3897b81b | [
"Apache-2.0"
] | null | null | null | oci_tools/training_tools.py | AnykeyNL/oci-tools | bcf24b26693a123b988f645210e6726f3897b81b | [
"Apache-2.0"
] | 1 | 2021-11-22T19:39:24.000Z | 2021-11-22T19:39:24.000Z |
from pprint import pformat
from .oci_resources import *
from oci_tools import RESOURCE as R
from oci_tools import REGIONS
from oci.exceptions import ServiceError
compute_client: oci.core.ComputeClient = None
network_client: oci.core.VirtualNetworkClient = None
bv_client: oci.core.BlockstorageClient = None
identity... | 38.20977 | 122 | 0.665789 |
795090e85980208bf055c01fd07b218b0bb658e2 | 2,520 | py | Python | atoman/rendering/renderers/vectorRenderer.py | chrisdjscott/Atoman | e87ac31bbdcf53bb8f3efdfb109787d604890394 | [
"MIT"
] | 9 | 2015-11-23T12:13:34.000Z | 2021-11-18T05:23:35.000Z | atoman/rendering/renderers/vectorRenderer.py | chrisdjscott/Atoman | e87ac31bbdcf53bb8f3efdfb109787d604890394 | [
"MIT"
] | 1 | 2017-07-17T20:27:50.000Z | 2017-07-23T05:27:15.000Z | atoman/rendering/renderers/vectorRenderer.py | chrisdjscott/Atoman | e87ac31bbdcf53bb8f3efdfb109787d604890394 | [
"MIT"
] | 4 | 2015-11-23T12:13:37.000Z | 2017-05-03T08:24:19.000Z |
"""
Module for rendering vectors
"""
from __future__ import absolute_import
from __future__ import unicode_literals
import logging
import vtk
from . import baseRenderer
from .. import utils
class VectorRenderer(baseRenderer.BaseRenderer):
"""
Render vectors as arrows
"""
def __init__(self):
... | 31.898734 | 109 | 0.661905 |
79509106752ebadaddc25fee8b0b63bef681a60a | 633 | py | Python | examples/flow.py | jennranta/pyreaclib | bd9210153b0c01c7ce230b43b88f0a5a1e198c0f | [
"BSD-3-Clause"
] | null | null | null | examples/flow.py | jennranta/pyreaclib | bd9210153b0c01c7ce230b43b88f0a5a1e198c0f | [
"BSD-3-Clause"
] | null | null | null | examples/flow.py | jennranta/pyreaclib | bd9210153b0c01c7ce230b43b88f0a5a1e198c0f | [
"BSD-3-Clause"
] | null | null | null | import pyreaclib
from pyreaclib.networks import RateCollection, PythonNetwork, Composition
files = ["c12-pg-n13-ls09",
"c13-pg-n14-nacr",
"n13--c13-wc12",
"n13-pg-o14-lg06",
"n14-pg-o15-im05",
"n15-pa-c12-nacr",
"o14--n14-wc12",
"o15--n15-wc12"]
rc = Rate... | 21.1 | 73 | 0.603476 |
79509328ba589824c90315faab9844df456aa3fa | 1,459 | py | Python | pennylane/templates/subroutines/hardware_efficient.py | pearcandy/pennylane | dfa35989cd0798496e41999a197bcf0eb26185df | [
"Apache-2.0"
] | null | null | null | pennylane/templates/subroutines/hardware_efficient.py | pearcandy/pennylane | dfa35989cd0798496e41999a197bcf0eb26185df | [
"Apache-2.0"
] | null | null | null | pennylane/templates/subroutines/hardware_efficient.py | pearcandy/pennylane | dfa35989cd0798496e41999a197bcf0eb26185df | [
"Apache-2.0"
] | null | null | null | '''
hardware_efficient.py
This code is distributed under the constitution of GNU-GPL.
(c) PearCandy
... | 45.59375 | 81 | 0.374914 |
7950940db8021dbf1930f2916d2a228372755416 | 1,363 | py | Python | behavioral/command.py | codingbeautifully/python-patterns | 5e83c2a085a51019486cc3d167dd6b09ad56770f | [
"Apache-2.0"
] | null | null | null | behavioral/command.py | codingbeautifully/python-patterns | 5e83c2a085a51019486cc3d167dd6b09ad56770f | [
"Apache-2.0"
] | null | null | null | behavioral/command.py | codingbeautifully/python-patterns | 5e83c2a085a51019486cc3d167dd6b09ad56770f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import os
from os.path import lexists
class MoveFileCommand(object):
def __init__(self, src, dest):
self.src = src
self.dest = dest
def execute(self):
self.rename(self.src, self.dest)
def undo(se... | 23.5 | 63 | 0.614087 |
795094429795236c798d5d6665a308e2e881f295 | 17,707 | py | Python | pyvoltha/adapters/extensions/omci/tasks/omci_get_request.py | willkurk/pyvoltha | 5be22260ea8d5a1c68bb20222e000f74c0727ef0 | [
"Apache-2.0"
] | null | null | null | pyvoltha/adapters/extensions/omci/tasks/omci_get_request.py | willkurk/pyvoltha | 5be22260ea8d5a1c68bb20222e000f74c0727ef0 | [
"Apache-2.0"
] | null | null | null | pyvoltha/adapters/extensions/omci/tasks/omci_get_request.py | willkurk/pyvoltha | 5be22260ea8d5a1c68bb20222e000f74c0727ef0 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2018 the original author or 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... | 42.978155 | 111 | 0.578811 |
795094965c54054960cb03fe472aac8ad3a82726 | 6,078 | py | Python | ckan/model/meta.py | kata-csc/ckan | 53c89b904a773bead8a40c1ef300e90d9d9eda5a | [
"Apache-2.0"
] | 1 | 2019-12-17T02:16:55.000Z | 2019-12-17T02:16:55.000Z | ckan/model/meta.py | kata-csc/ckan | 53c89b904a773bead8a40c1ef300e90d9d9eda5a | [
"Apache-2.0"
] | null | null | null | ckan/model/meta.py | kata-csc/ckan | 53c89b904a773bead8a40c1ef300e90d9d9eda5a | [
"Apache-2.0"
] | null | null | null | import datetime
from paste.deploy.converters import asbool
from pylons import config
"""SQLAlchemy Metadata and Session object"""
from sqlalchemy import MetaData, and_
import sqlalchemy.orm as orm
from sqlalchemy.orm.session import SessionExtension
import extension
import ckan.lib.activity_streams_session_extension a... | 36.39521 | 89 | 0.610069 |
795094e972c8e0aead85ba374073892da9d18eeb | 5,714 | py | Python | tests/functional/test_ec2.py | doc-E-brown/botocore | 6be520a4eeed731652d34a2bcb484fabc1c7c860 | [
"Apache-2.0"
] | 2 | 2019-08-30T17:35:50.000Z | 2020-06-29T21:32:33.000Z | tests/functional/test_ec2.py | doc-E-brown/botocore | 6be520a4eeed731652d34a2bcb484fabc1c7c860 | [
"Apache-2.0"
] | 5 | 2021-07-20T11:21:21.000Z | 2022-02-04T13:54:11.000Z | tests/functional/test_ec2.py | doc-E-brown/botocore | 6be520a4eeed731652d34a2bcb484fabc1c7c860 | [
"Apache-2.0"
] | 18 | 2021-02-24T12:41:44.000Z | 2022-03-03T15:07:54.000Z | # Copyright 2016 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" file accompa... | 42.014706 | 79 | 0.650508 |
795095b487efdfc4cdf95863e2f22eedec9c1e77 | 80 | py | Python | dataformat-json-jackson/src/test/resources/org/camunda/spin/python/json/tree/JsonTreeJsonPathPythonTest.shouldFailReadingString.py | ingorichtsmeier/camunda-spin | f6f929cb4b49f5be3c06fcecf03008fec9fe25c1 | [
"Apache-2.0"
] | 27 | 2015-02-15T22:01:39.000Z | 2022-03-02T05:41:29.000Z | dataformat-json-jackson/src/test/resources/org/camunda/spin/python/json/tree/JsonTreeJsonPathPythonTest.shouldFailReadingString.py | ingorichtsmeier/camunda-spin | f6f929cb4b49f5be3c06fcecf03008fec9fe25c1 | [
"Apache-2.0"
] | 101 | 2015-06-05T06:53:56.000Z | 2022-02-28T19:32:44.000Z | dataformat-json-jackson/src/test/resources/org/camunda/spin/python/json/tree/JsonTreeJsonPathPythonTest.shouldFailReadingString.py | ingorichtsmeier/camunda-spin | f6f929cb4b49f5be3c06fcecf03008fec9fe25c1 | [
"Apache-2.0"
] | 25 | 2015-05-26T21:28:42.000Z | 2021-07-06T10:04:01.000Z | jsonNode = S(input, "application/json")
jsonNode.jsonPath('$.id').stringValue() | 26.666667 | 39 | 0.725 |
795095f02af881044ceff5a596af3d14cea16855 | 364 | py | Python | src/utils/definitions.py | LucasFidon/TRABIT_BraTS2021 | 5e950f57a8580356b0b4037477c5069113f3cf31 | [
"BSD-3-Clause"
] | 5 | 2022-01-04T01:27:18.000Z | 2022-02-10T13:43:01.000Z | src/utils/definitions.py | LucasFidon/TRABIT_BraTS2021 | 5e950f57a8580356b0b4037477c5069113f3cf31 | [
"BSD-3-Clause"
] | null | null | null | src/utils/definitions.py | LucasFidon/TRABIT_BraTS2021 | 5e950f57a8580356b0b4037477c5069113f3cf31 | [
"BSD-3-Clause"
] | 2 | 2022-01-03T10:20:08.000Z | 2022-01-19T05:54:19.000Z | """
@brief Please, put all the user specific hyperparameters and paths here.
"""
# PATHS
SAVE_DIR = './runs'
# Folder where to save persistent dataset.
# I recommend to have it in \tmp, other wise you can get the error:
# OSError: [Errno 18] Invalid cross-device link
CACHE_DIR = '/tmp/monai_cache_dir'
# POST PROCESS... | 26 | 73 | 0.733516 |
7950960cf3c120d80a0faed7509e91ca326c8c53 | 572 | py | Python | examples/classification.py | HelloChatterbox/little_questions | 04bee86244b42fdaed9f8d010c2f83037ad753f6 | [
"MIT"
] | null | null | null | examples/classification.py | HelloChatterbox/little_questions | 04bee86244b42fdaed9f8d010c2f83037ad753f6 | [
"MIT"
] | null | null | null | examples/classification.py | HelloChatterbox/little_questions | 04bee86244b42fdaed9f8d010c2f83037ad753f6 | [
"MIT"
] | null | null | null | from little_questions.classifiers import QuestionClassifier
from little_questions.classifiers import MainQuestionClassifier
from little_questions.classifiers import SentenceClassifier
classifier = QuestionClassifier()
question = "who made you"
preds = classifier.predict([question])
assert preds[0] == "HUM:ind"
classi... | 30.105263 | 63 | 0.793706 |
7950979eb8e44cd810a1423a6116062df85f6449 | 2,860 | py | Python | data/load_data.py | iamrishab/LPRNet_Pytorch | b5f4b4c159d5c80b9b9e81a8eed65f4b4d79f96b | [
"Apache-2.0"
] | null | null | null | data/load_data.py | iamrishab/LPRNet_Pytorch | b5f4b4c159d5c80b9b9e81a8eed65f4b4d79f96b | [
"Apache-2.0"
] | null | null | null | data/load_data.py | iamrishab/LPRNet_Pytorch | b5f4b4c159d5c80b9b9e81a8eed65f4b4d79f96b | [
"Apache-2.0"
] | null | null | null | from torch.utils.data import *
from imutils import paths
import numpy as np
import random
import cv2
import os
# CHARS = ['京', '沪', '津', '渝', '冀', '晋', '蒙', '辽', '吉', '黑',
# '苏', '浙', '皖', '闽', '赣', '鲁', '豫', '鄂', '湘', '粤',
# '桂', '琼', '川', '贵', '云', '藏', '陕', '甘', '青', '宁',
# '新',
# ... | 33.647059 | 86 | 0.47972 |
7950998a4d99541f8db83776e0b7d9a0b4224885 | 2,805 | py | Python | data.py | levtelyatnikov/SVM-from-scratch | 4107776925ac72431c3e56345da35d28e9ee4c68 | [
"MIT"
] | 2 | 2022-01-09T13:48:17.000Z | 2022-01-27T09:34:17.000Z | data.py | CopurOnur/SVM_from_scratch | c0faa68c0352eb65cde0d12fd5fc543bc985f5a0 | [
"MIT"
] | null | null | null | data.py | CopurOnur/SVM_from_scratch | c0faa68c0352eb65cde0d12fd5fc543bc985f5a0 | [
"MIT"
] | null | null | null | import os
import numpy as np
import gzip
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
"""
@author: Diego
"""
"""
this is the code you need to run to import data.
You may have to change line 36 selecting the correct path.
"""
def load_mnist(path, kind='train'... | 34.62963 | 104 | 0.618182 |
795099b5b68375bf83b1e291c61e0d797f596176 | 3,917 | py | Python | macke/llvm_wrapper.py | aheroine/use-macke | 2a8fafa79f80711f068f97d30f8ca83ff3b32ea0 | [
"Apache-2.0"
] | 2 | 2019-07-21T15:19:48.000Z | 2019-07-21T15:23:06.000Z | macke/llvm_wrapper.py | aheroine/use-macke | 2a8fafa79f80711f068f97d30f8ca83ff3b32ea0 | [
"Apache-2.0"
] | null | null | null | macke/llvm_wrapper.py | aheroine/use-macke | 2a8fafa79f80711f068f97d30f8ca83ff3b32ea0 | [
"Apache-2.0"
] | null | null | null | """
Functions, that wraps all llvm actions and transformation into python functions
"""
import json
import subprocess
from .config import LIBMACKEOPT, LLVMOPT
def __run_subprocess(popenargs):
"""
Starts a subprocess with popenargs and returns it output
"""
return subprocess.check_output(popenargs)
... | 29.014815 | 79 | 0.684708 |
79509abad52e3f2a05f8334edb6c99a531e66097 | 4,610 | py | Python | Occlusion_Sensitivity/occlusion_sensitivity.py | rao208/explainable_ai | 515343696b55f4fa466daca4991d68aae6e12fd2 | [
"Unlicense",
"MIT"
] | 4 | 2020-11-14T00:17:14.000Z | 2022-03-03T14:47:54.000Z | Occlusion_Sensitivity/occlusion_sensitivity.py | rao208/explainable_ai | 515343696b55f4fa466daca4991d68aae6e12fd2 | [
"Unlicense",
"MIT"
] | null | null | null | Occlusion_Sensitivity/occlusion_sensitivity.py | rao208/explainable_ai | 515343696b55f4fa466daca4991d68aae6e12fd2 | [
"Unlicense",
"MIT"
] | 1 | 2022-02-17T09:42:58.000Z | 2022-02-17T09:42:58.000Z | """
Created on Fri Aug 7 03:14:52 2020
@author: Vanditha Rao
Highly inspired from https://github.com/sicara/tf-explain
This script allows the user to implement occlusion sensitivity. Image file can
be of any format.
This script requires that tensorflow and OpenCV be installed within the python
environment... | 30.733333 | 102 | 0.529501 |
79509ae0de663c69b13b3aa40296a01c2a31c785 | 5,077 | py | Python | chase/simulation.py | Motwg/WolfAndSheep-2019 | d6c50660368661fddf88dc860caac7236a791beb | [
"MIT"
] | null | null | null | chase/simulation.py | Motwg/WolfAndSheep-2019 | d6c50660368661fddf88dc860caac7236a791beb | [
"MIT"
] | null | null | null | chase/simulation.py | Motwg/WolfAndSheep-2019 | d6c50660368661fddf88dc860caac7236a791beb | [
"MIT"
] | null | null | null | import csv
import json
import logging
import math
import random as ran
def distance(point1, point2):
logging.debug("Args: {0}".format(locals()))
if type(point1) != type(point2):
logging.warning("Types of given arguments are different: {0} != {1}".format(point1, point2))
logging.debug("Returns: {0}... | 32.33758 | 104 | 0.554855 |
79509c6f1909659ede6b699a6f1464b72b4bb78c | 1,103 | py | Python | openaerostruct/aerodynamics/tests/test_rotational_velocity.py | eytanadler/OpenAeroStruct | a4f482c2bd09a504d378f144da95cc91053b9f3b | [
"Apache-2.0"
] | 114 | 2017-04-06T15:24:19.000Z | 2022-03-21T09:57:43.000Z | openaerostruct/aerodynamics/tests/test_rotational_velocity.py | eytanadler/OpenAeroStruct | a4f482c2bd09a504d378f144da95cc91053b9f3b | [
"Apache-2.0"
] | 322 | 2017-04-07T01:40:03.000Z | 2022-03-17T21:50:52.000Z | openaerostruct/aerodynamics/tests/test_rotational_velocity.py | eytanadler/OpenAeroStruct | a4f482c2bd09a504d378f144da95cc91053b9f3b | [
"Apache-2.0"
] | 83 | 2017-04-06T16:53:26.000Z | 2022-03-19T19:34:05.000Z | import unittest
import numpy as np
import openmdao.api as om
from openmdao.utils.assert_utils import assert_check_partials
from openaerostruct.aerodynamics.rotational_velocity import RotationalVelocity
from openaerostruct.utils.testing import run_test, get_default_surfaces
class Test(unittest.TestCase):
def te... | 26.902439 | 80 | 0.69447 |
79509d003de81579d1644f88d577920bfb76c9a7 | 21,777 | py | Python | tefla/core/learning_ss.py | subex/Tefla | 34f8fd0e2f2ee02aa73c6289753e08a95cc41880 | [
"MIT"
] | 40 | 2017-09-10T17:11:17.000Z | 2022-02-01T17:40:53.000Z | tefla/core/learning_ss.py | openAGI/tefla | 7dc7648198ef7a6884a3d5081836152515c1aebc | [
"MIT"
] | 21 | 2018-06-21T09:58:04.000Z | 2022-03-11T23:11:37.000Z | tefla/core/learning_ss.py | subex/Tefla | 34f8fd0e2f2ee02aa73c6289753e08a95cc41880 | [
"MIT"
] | 11 | 2017-10-13T13:10:02.000Z | 2020-08-17T07:07:53.000Z | # -------------------------------------------------------------------#
# Written by Mrinal Haloi
# Contact: mrinal.haloi11@gmail.com
# Copyright 2017, Mrinal Haloi
# -------------------------------------------------------------------#
from __future__ import division, print_function, absolute_import
import os
import ti... | 47.548035 | 101 | 0.675575 |
79509d54d7a58ca9fbded46d6b2e383a874989cd | 2,521 | py | Python | networkx/algorithms/tests/test_distance_regular.py | theaverageguy/networkx | b2b74b3ba028ef3788f796aa64b037c8ea446539 | [
"BSD-3-Clause"
] | null | null | null | networkx/algorithms/tests/test_distance_regular.py | theaverageguy/networkx | b2b74b3ba028ef3788f796aa64b037c8ea446539 | [
"BSD-3-Clause"
] | null | null | null | networkx/algorithms/tests/test_distance_regular.py | theaverageguy/networkx | b2b74b3ba028ef3788f796aa64b037c8ea446539 | [
"BSD-3-Clause"
] | 2 | 2016-09-04T10:59:12.000Z | 2020-02-17T07:43:04.000Z | from nose.tools import assert_equal
from nose.tools import assert_false
from nose.tools import assert_true
import networkx as nx
from networkx import is_strongly_regular
class TestDistanceRegular(object):
def test_is_distance_regular(self):
assert_true(nx.is_distance_regular(nx.icosahedral_graph()))
... | 34.534247 | 77 | 0.666402 |
79509d6ecedc910ee2cd0dab7fca4ac3060c8027 | 43 | py | Python | paintedlife/patterns.py | AbigailMcGovern/paintedlife | 7d178f9311da738f5ab3c3cc789b212cd192526f | [
"BSD-3-Clause"
] | 7 | 2020-12-06T15:46:57.000Z | 2022-01-10T07:29:32.000Z | paintedlife/patterns.py | AbigailMcGovern/paintedlife | 7d178f9311da738f5ab3c3cc789b212cd192526f | [
"BSD-3-Clause"
] | 1 | 2020-12-11T16:28:58.000Z | 2020-12-15T23:23:33.000Z | paintedlife/patterns.py | AbigailMcGovern/paintedlife | 7d178f9311da738f5ab3c3cc789b212cd192526f | [
"BSD-3-Clause"
] | 1 | 2020-12-06T15:46:41.000Z | 2020-12-06T15:46:41.000Z | #import numpy as np
# library of patterns
| 10.75 | 21 | 0.744186 |
79509e0da59087724c7ad32862f4a10871238e6b | 4,518 | py | Python | anchorgql/runlocal.py | vybenetwork/anchorgql | d8a8a3fa332e0076f20061689951645c0dae1642 | [
"MIT"
] | 1 | 2022-02-20T22:05:26.000Z | 2022-02-20T22:05:26.000Z | anchorgql/runlocal.py | vybenetwork/anchorgql | d8a8a3fa332e0076f20061689951645c0dae1642 | [
"MIT"
] | null | null | null | anchorgql/runlocal.py | vybenetwork/anchorgql | d8a8a3fa332e0076f20061689951645c0dae1642 | [
"MIT"
] | null | null | null | import json
import subprocess
import asyncio
from solana.rpc.async_api import AsyncClient
from solana.publickey import PublicKey
from anchorpy import Program, Provider, Wallet
class bcolors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKCYAN = '\033[96m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
F... | 36.144 | 132 | 0.588092 |
79509f9a9888958dd7bdbfb28f7f58a5b83cb280 | 5,784 | py | Python | cmaes/solver_cma.py | mcmips/osim-rl | 610b95cf0c4484f1acecd31187736b0113dcfb73 | [
"MIT"
] | 867 | 2017-01-21T20:53:36.000Z | 2022-03-20T09:47:08.000Z | cmaes/solver_cma.py | mcmips/osim-rl | 610b95cf0c4484f1acecd31187736b0113dcfb73 | [
"MIT"
] | 197 | 2017-01-22T21:27:36.000Z | 2022-01-10T16:18:35.000Z | cmaes/solver_cma.py | mcmips/osim-rl | 610b95cf0c4484f1acecd31187736b0113dcfb73 | [
"MIT"
] | 277 | 2017-02-01T18:42:18.000Z | 2022-03-23T11:30:31.000Z | # Copyright (c) 2015, Disney Research
# All rights reserved.
#
# Author(s): Sehoon Ha <sehoon.ha@disneyresearch.com>
# Disney Research Robotics Group
#
# adapted by Seungmoon Song <seungmoon.song@gmail.com>
from __future__ import division # '/' always means non-truncating division
from cmaes.solver import Solver
impo... | 31.955801 | 75 | 0.529737 |
7950a08760ea20c4d125ff75975becb9ed5efaa3 | 2,096 | py | Python | plugins/hw_wallet/plugin.py | Durendal/electrum-rby | 0dadd13467d44bcc7128f0dec0fa1aeff8d22576 | [
"MIT"
] | null | null | null | plugins/hw_wallet/plugin.py | Durendal/electrum-rby | 0dadd13467d44bcc7128f0dec0fa1aeff8d22576 | [
"MIT"
] | 1 | 2021-11-15T17:47:29.000Z | 2021-11-15T17:47:29.000Z | plugins/hw_wallet/plugin.py | Durendal/electrum-rby | 0dadd13467d44bcc7128f0dec0fa1aeff8d22576 | [
"MIT"
] | 1 | 2017-11-13T23:19:46.000Z | 2017-11-13T23:19:46.000Z | #!/usr/bin/env python2
# -*- mode: python -*-
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2016 The Electrum developers
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without... | 38.814815 | 73 | 0.739504 |
7950a101c93e726b033e2b08c35d6b12c017e302 | 239 | py | Python | admin/admin_goods/serializers.py | Tomtao626/dailyfresh | 337e29ded8f9be438d69c97ce86954e58672bd62 | [
"Apache-2.0"
] | null | null | null | admin/admin_goods/serializers.py | Tomtao626/dailyfresh | 337e29ded8f9be438d69c97ce86954e58672bd62 | [
"Apache-2.0"
] | null | null | null | admin/admin_goods/serializers.py | Tomtao626/dailyfresh | 337e29ded8f9be438d69c97ce86954e58672bd62 | [
"Apache-2.0"
] | null | null | null | from apps.goods.models import GoodsType
from rest_framework import serializers
class GoodsTypeSerializer(serializers.HyperlinkedModelSerializer):
class Meta:
model = GoodsType
fields = ['id', 'name', 'logo', 'image']
| 26.555556 | 66 | 0.728033 |
7950a11b90561ea96e7e153e1e052747b81d84bf | 1,210 | py | Python | Cut.py | MingjunMa/PixEditor | 1d32c06e1689e1ed7e8bd0f9d30e50bed4e24562 | [
"MIT"
] | 7 | 2020-05-21T03:44:25.000Z | 2021-11-19T04:44:13.000Z | Cut.py | MingjunMa/PixEditor | 1d32c06e1689e1ed7e8bd0f9d30e50bed4e24562 | [
"MIT"
] | 5 | 2021-02-02T22:44:40.000Z | 2022-03-12T00:31:15.000Z | Cut.py | MingjunMa/PixEditor | 1d32c06e1689e1ed7e8bd0f9d30e50bed4e24562 | [
"MIT"
] | 1 | 2020-05-21T03:59:49.000Z | 2020-05-21T03:59:49.000Z | import cv2
global img
global point1, point2
def on_mouse(event, x, y, flags, param):
global img, point1, point2, path
img2 = img.copy()
if event == cv2.EVENT_LBUTTONDOWN: # 左键点击
point1 = (x, y)
cv2.circle(img2, point1, 10, (0, 255, 0), 5)
cv2.imshow('image', img2)
... | 30.25 | 86 | 0.572727 |
7950a17c304b9ac0035e17e045389155e5d1da27 | 2,269 | py | Python | src/Filtering/AnisotropicSmoothing/ComputeGradientAnisotropicDiffusion/Code.py | kian-weimer/ITKSphinxExamples | ff614cbba28831d1bf2a0cfaa5a2f1949a627c1b | [
"Apache-2.0"
] | 34 | 2015-01-26T19:38:36.000Z | 2021-02-04T02:15:41.000Z | src/Filtering/AnisotropicSmoothing/ComputeGradientAnisotropicDiffusion/Code.py | kian-weimer/ITKSphinxExamples | ff614cbba28831d1bf2a0cfaa5a2f1949a627c1b | [
"Apache-2.0"
] | 142 | 2016-01-22T15:59:25.000Z | 2021-03-17T15:11:19.000Z | src/Filtering/AnisotropicSmoothing/ComputeGradientAnisotropicDiffusion/Code.py | kian-weimer/ITKSphinxExamples | ff614cbba28831d1bf2a0cfaa5a2f1949a627c1b | [
"Apache-2.0"
] | 32 | 2015-01-26T19:38:41.000Z | 2021-03-17T15:28:14.000Z | #!/usr/bin/env python
# Copyright NumFOCUS
#
# 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.txt
#
# Unless required by applicable law or ... | 36.015873 | 88 | 0.827237 |
7950a32d1c5ead779c35f2687033c45650fe6a98 | 1,247 | py | Python | pynws/backports/enum.py | lymanepp/pynws | 92eff6484f680217d90acca3f5711d71dbf0ab3e | [
"MIT"
] | 1 | 2022-02-04T19:55:00.000Z | 2022-02-04T19:55:00.000Z | pynws/backports/enum.py | lymanepp/pynws | 92eff6484f680217d90acca3f5711d71dbf0ab3e | [
"MIT"
] | null | null | null | pynws/backports/enum.py | lymanepp/pynws | 92eff6484f680217d90acca3f5711d71dbf0ab3e | [
"MIT"
] | null | null | null | """Python 3.11 Enum backports from https://github.com/home-assistant/core/tree/dev/homeassistant/backports"""
from __future__ import annotations
from enum import Enum
from typing import Any, List, TypeVar
_StrEnumT = TypeVar("_StrEnumT", bound="StrEnum")
class StrEnum(str, Enum):
"""Partial backport of Python 3... | 34.638889 | 112 | 0.647153 |
7950a3350f66ff4c97a3cb183018065649d9e327 | 2,834 | py | Python | user_mgmt/cache.py | WIPACrepo/keycloak-rest-services | 2661b0db2dd320bdb8eefc62c805188bec52ecc7 | [
"MIT"
] | 1 | 2021-09-23T14:39:36.000Z | 2021-09-23T14:39:36.000Z | user_mgmt/cache.py | WIPACrepo/keycloak-rest-services | 2661b0db2dd320bdb8eefc62c805188bec52ecc7 | [
"MIT"
] | 38 | 2020-08-31T22:53:09.000Z | 2022-03-28T20:55:39.000Z | user_mgmt/cache.py | WIPACrepo/keycloak-rest-services | 2661b0db2dd320bdb8eefc62c805188bec52ecc7 | [
"MIT"
] | null | null | null | import logging
from cachetools import TTLCache
from krs.groups import list_groups, group_info, group_info_by_id, get_group_membership_by_id
from krs.institutions import list_insts
logger = logging.getLogger('cache')
class KeycloakGroupCache:
"""
A TTL cache for Keycloak group requests.
Args:
... | 39.915493 | 92 | 0.664785 |
7950a3c74e3f614799b2f8aebbdb2781074127af | 3,037 | py | Python | with_redis.py | tistaharahap/oauth1-provider | c7059bce68734744d0aa3b83ecb218865a5c1341 | [
"MIT"
] | 1 | 2017-06-26T07:36:03.000Z | 2017-06-26T07:36:03.000Z | with_redis.py | tistaharahap/oauth1-provider | c7059bce68734744d0aa3b83ecb218865a5c1341 | [
"MIT"
] | null | null | null | with_redis.py | tistaharahap/oauth1-provider | c7059bce68734744d0aa3b83ecb218865a5c1341 | [
"MIT"
] | null | null | null | from flask import Flask, jsonify
from oauth1.authorize import Oauth1
from oauth1.errors.oauth import Oauth1Errors
from oauth1.store.nosql import Oauth1StoreRedis
from oauth1.store.base import Oauth1StoreBase
BASE_URL = "http://localhost:5000/"
app = Flask(__name__)
app.debug = True
app.config['SQLALCHEMY_DATABASE_URI'... | 34.123596 | 117 | 0.680606 |
7950a53d9d1421fee329f8e92a5976df13a6df80 | 1,543 | py | Python | pyqtgraph/widgets/PathButton.py | cycomanic/pyqtgraph | 108b115aa56c5fc8fd7a398f26e705b8f8717c0f | [
"MIT"
] | 5 | 2019-03-08T05:30:20.000Z | 2021-05-15T07:33:50.000Z | pyqtgraph/widgets/PathButton.py | cycomanic/pyqtgraph | 108b115aa56c5fc8fd7a398f26e705b8f8717c0f | [
"MIT"
] | 1 | 2019-01-14T09:00:21.000Z | 2019-01-14T09:00:21.000Z | pyqtgraph/widgets/PathButton.py | cycomanic/pyqtgraph | 108b115aa56c5fc8fd7a398f26e705b8f8717c0f | [
"MIT"
] | 1 | 2022-02-01T12:45:29.000Z | 2022-02-01T12:45:29.000Z | from pyqtgraph.Qt import QtGui, QtCore
import pyqtgraph as pg
__all__ = ['PathButton']
class PathButton(QtGui.QPushButton):
"""Simple PushButton extension which paints a QPainterPath on its face"""
def __init__(self, parent=None, path=None, pen='default', brush=None, size=(30,30)):
QtGui.QPushButton._... | 30.86 | 106 | 0.567725 |
7950a63a417d930e02f64bdebf0c972cc30a67c2 | 732 | py | Python | Server/Tornado/TornadoBoilerplate/app.py | dltech-xyz/PythonSkillTree | 88fad516b22811205a49b6438d48a6535e8a5441 | [
"Apache-2.0"
] | 26 | 2016-07-11T00:54:39.000Z | 2022-01-11T13:41:47.000Z | Server/Tornado/TornadoBoilerplate/app.py | w4n9H/PythonSkillTree | 88fad516b22811205a49b6438d48a6535e8a5441 | [
"Apache-2.0"
] | null | null | null | Server/Tornado/TornadoBoilerplate/app.py | w4n9H/PythonSkillTree | 88fad516b22811205a49b6438d48a6535e8a5441 | [
"Apache-2.0"
] | 7 | 2016-07-14T08:02:37.000Z | 2020-06-28T15:27:21.000Z | # !/usr/bin/env python
# -*- coding: utf-8 -*-
"""
@author: mango
@contact: w4n9@sina.com
@create: 16/6/30
hail hydra!
"""
__author__ = "mango"
__version__ = "0.1"
import tornado.httpserver
import tornado.ioloop
import tornado.web
from tornado.options import options
from settings import settings
from urls import u... | 19.263158 | 72 | 0.728142 |
7950a6b1fa492222496f13336452232a22ff54cc | 28,975 | py | Python | tests/python/pants_test/backend/jvm/tasks/test_classpath_products.py | AllClearID/pants | c4fdf00a3bdf9f26f876e85c46909d0729f7132c | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/jvm/tasks/test_classpath_products.py | AllClearID/pants | c4fdf00a3bdf9f26f876e85c46909d0729f7132c | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/backend/jvm/tasks/test_classpath_products.py | AllClearID/pants | c4fdf00a3bdf9f26f876e85c46909d0729f7132c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from pant... | 49.785223 | 123 | 0.640483 |
7950a6ee7e394183068e5dc2c19ec6a1a8d8971d | 6,134 | py | Python | tests/utils/test_amazon_s3.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 50 | 2019-09-13T10:32:29.000Z | 2022-02-14T16:52:53.000Z | tests/utils/test_amazon_s3.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 31 | 2019-09-03T11:06:03.000Z | 2021-08-20T14:57:09.000Z | tests/utils/test_amazon_s3.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | 9 | 2019-09-16T03:25:15.000Z | 2021-05-11T10:28:25.000Z | import pytest
from sciwing.utils.amazon_s3 import S3Util
import sciwing.constants as constants
import os
import json
import pathlib
import shutil
PATHS = constants.PATHS
AWS_CRED_DIR = PATHS["AWS_CRED_DIR"]
TESTS_DIR = PATHS["TESTS_DIR"]
OUTPUT_DIR = PATHS["OUTPUT_DIR"]
WING_NUS_AWS_CREDENTIALS = os.path.join(AWS_CRE... | 34.460674 | 84 | 0.696446 |
7950a7beb6c5fb6d22193b4238d4a4d4fd0767d3 | 1,866 | py | Python | scripts/create_access_key.py | sinofseven/fukuoka-de-longi-bot-prepare | daf1e43e73ac033b45081401570c9f73ef66d953 | [
"MIT"
] | null | null | null | scripts/create_access_key.py | sinofseven/fukuoka-de-longi-bot-prepare | daf1e43e73ac033b45081401570c9f73ef66d953 | [
"MIT"
] | null | null | null | scripts/create_access_key.py | sinofseven/fukuoka-de-longi-bot-prepare | daf1e43e73ac033b45081401570c9f73ef66d953 | [
"MIT"
] | null | null | null | import sys
from typing import List, Tuple
from configparser import ConfigParser
import boto3
from botocore.client import BaseClient
from prompt_toolkit.shortcuts import confirm
def main():
iam = boto3.client("iam")
cfn = boto3.client("cloudformation")
username = get_username(cfn)
print(f"\nusername:... | 28.707692 | 84 | 0.683816 |
7950a7fa49d0ba65c17b8498a4ea38d25ebe8a10 | 44,644 | py | Python | modin/engines/ray/generic/io.py | xrmx/modin | 7f19fa2200993a0b8f009b6b603afb4a4022cec8 | [
"Apache-2.0"
] | null | null | null | modin/engines/ray/generic/io.py | xrmx/modin | 7f19fa2200993a0b8f009b6b603afb4a4022cec8 | [
"Apache-2.0"
] | null | null | null | modin/engines/ray/generic/io.py | xrmx/modin | 7f19fa2200993a0b8f009b6b603afb4a4022cec8 | [
"Apache-2.0"
] | null | null | null | import pandas
from pandas.io.common import _infer_compression
from pandas.io.parsers import _validate_usecols_arg
from pandas.core.dtypes.cast import find_common_type
import inspect
import os
import py
import re
import sys
import numpy as np
import math
import warnings
from modin.error_message import ErrorMessage
fro... | 39.75423 | 119 | 0.575419 |
7950a8741b8bef3d39272a917e918066f9f79f05 | 1,694 | py | Python | chrome/content/papermachines/processors/geoparser_heatmap.py | papermachines/papermachines | 6afcde40621bbe6a0554647a27101af83e5f61cf | [
"BSD-2-Clause"
] | 134 | 2015-01-04T11:29:04.000Z | 2022-03-30T22:39:51.000Z | chrome/content/papermachines/processors/geoparser_heatmap.py | wisliyao/papermachines | 6afcde40621bbe6a0554647a27101af83e5f61cf | [
"BSD-2-Clause"
] | 20 | 2015-02-06T18:42:31.000Z | 2021-11-07T05:19:03.000Z | chrome/content/papermachines/processors/geoparser_heatmap.py | wisliyao/papermachines | 6afcde40621bbe6a0554647a27101af83e5f61cf | [
"BSD-2-Clause"
] | 16 | 2015-02-14T18:46:58.000Z | 2020-07-24T02:38:11.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os
import json
import csv
import re
import shutil
import logging
import traceback
import base64
import time
import codecs
import cPickle as pickle
import geoparser
class GeoparserHeatmap(geoparser.Geoparser):
"""
Export geoparsing results
"""
... | 24.911765 | 65 | 0.584416 |
7950a8ac76721ef327db2ad2c89e1b7064f6e458 | 192 | py | Python | thirvu_soft/thirvu_soft/report/script_salary_slip/script_salary_slip.py | carefulkarthik/Query-report | 0677a063fc8a89bba5836ee72e9b95b24ca4c8ae | [
"MIT"
] | null | null | null | thirvu_soft/thirvu_soft/report/script_salary_slip/script_salary_slip.py | carefulkarthik/Query-report | 0677a063fc8a89bba5836ee72e9b95b24ca4c8ae | [
"MIT"
] | null | null | null | thirvu_soft/thirvu_soft/report/script_salary_slip/script_salary_slip.py | carefulkarthik/Query-report | 0677a063fc8a89bba5836ee72e9b95b24ca4c8ae | [
"MIT"
] | null | null | null | # Copyright (c) 2013, Navin S R and contributors
# For license information, please see license.txt
# import frappe
def execute(filters=None):
columns, data = [], []
return columns, data
| 17.454545 | 49 | 0.713542 |
7950a906fdf79d3732fc7102dec4659068aadf12 | 7,820 | py | Python | vitrage-4.3.1/vitrage/tests/unit/datasources/zabbix/test_zabbix_transformer.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | null | null | null | vitrage-4.3.1/vitrage/tests/unit/datasources/zabbix/test_zabbix_transformer.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | vitrage-4.3.1/vitrage/tests/unit/datasources/zabbix/test_zabbix_transformer.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 2 | 2020-03-15T01:24:15.000Z | 2020-07-22T20:34:26.000Z | # Copyright 2016 - Nokia
#
# 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, sof... | 41.818182 | 79 | 0.696803 |
7950a94a92238ba8e71ccf2fb285a833d8661854 | 3,120 | py | Python | util/chplenv/chpl_llvm.py | e-kayrakli/chapel | 41cc7d7897f56d5de7684fb98effc17fd12af399 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | util/chplenv/chpl_llvm.py | e-kayrakli/chapel | 41cc7d7897f56d5de7684fb98effc17fd12af399 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | util/chplenv/chpl_llvm.py | e-kayrakli/chapel | 41cc7d7897f56d5de7684fb98effc17fd12af399 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-03-05T19:48:04.000Z | 2020-03-05T19:48:04.000Z | #!/usr/bin/env python3
import optparse
import os
import sys
import chpl_bin_subdir, chpl_arch, chpl_compiler, chpl_platform, overrides
from chpl_home_utils import get_chpl_third_party
from utils import memoize, run_command
@memoize
def get_uniq_cfg_path_for(llvm_val):
if llvm_val == "llvm":
# put platform-a... | 30.891089 | 79 | 0.633654 |
7950aa8187be140078faf4cde91f12725541459b | 14,468 | py | Python | house-rocket.py | rsoliveirac/projeto-insights-houses | ca76a6a76bf280ca1e0c3e3777f24cf6a9dae302 | [
"MIT"
] | null | null | null | house-rocket.py | rsoliveirac/projeto-insights-houses | ca76a6a76bf280ca1e0c3e3777f24cf6a9dae302 | [
"MIT"
] | null | null | null | house-rocket.py | rsoliveirac/projeto-insights-houses | ca76a6a76bf280ca1e0c3e3777f24cf6a9dae302 | [
"MIT"
] | 7 | 2021-06-19T17:52:16.000Z | 2022-02-11T01:00:09.000Z | import pandas as pd
import streamlit as st
import folium
import numpy as np
from streamlit_folium import folium_static
import plotly.express as px
st.set_page_config(layout='wide')
@st.cache(allow_output_mutation=True)
def get_data(path):
data = pd.read_csv(path)
return data
def remove_duplicates (df):
... | 43.70997 | 146 | 0.501659 |
7950aadb09524bb838ee684f97bfc15550c83952 | 13,972 | py | Python | Lmap.py | retr0-13/LMap | c0832882b48abc33283e598f374df48f0c28b63e | [
"Apache-2.0"
] | 55 | 2021-11-05T06:25:36.000Z | 2022-03-11T02:59:25.000Z | Lmap.py | retr0-13/LMap | c0832882b48abc33283e598f374df48f0c28b63e | [
"Apache-2.0"
] | 3 | 2021-11-08T02:44:00.000Z | 2022-01-18T12:01:18.000Z | Lmap.py | retr0-13/LMap | c0832882b48abc33283e598f374df48f0c28b63e | [
"Apache-2.0"
] | 11 | 2021-11-05T06:25:42.000Z | 2022-01-18T07:03:07.000Z | from ipaddress import ip_address,ip_network
import asyncio
import re
from lxml import etree
import argparse
import json
from configparser import ConfigParser
from pathlib import Path
import sys
from rich.progress import Progress
from rich.console import Console
from httpx import AsyncClient
from prettytable... | 43.256966 | 176 | 0.559619 |
7950ab2423979c854385909718e1f4a09cee0749 | 25,962 | py | Python | src/vocola2/_vocola_main.py | dougransom/Vocola2 | a2b986031fd4c6c306a47f6e1fdf252d5643e16c | [
"MIT"
] | 1 | 2021-01-10T21:56:49.000Z | 2021-01-10T21:56:49.000Z | src/vocola2/_vocola_main.py | dougransom/Vocola2 | a2b986031fd4c6c306a47f6e1fdf252d5643e16c | [
"MIT"
] | null | null | null | src/vocola2/_vocola_main.py | dougransom/Vocola2 | a2b986031fd4c6c306a47f6e1fdf252d5643e16c | [
"MIT"
] | null | null | null | # -*- coding: latin-1 -*-
"""_vocola_main.py - Natlink support for Vocola
Contains:
- "Built-in" voice commands
- Autoloading of changed command files
Copyright (c) 2002-2012 by Rick Mohr.
Portions Copyright (c) 2012-2015 by Hewlett-Packard Development Company, L.P.
Permission is hereby granted, free of char... | 37.680697 | 141 | 0.613859 |
7950abb7b9f23e279f6600b2851f35a52b19d78e | 1,526 | py | Python | var/spack/repos/builtin/packages/py-torch-scatter/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 9 | 2018-04-18T07:51:40.000Z | 2021-09-10T03:56:57.000Z | var/spack/repos/builtin/packages/py-torch-scatter/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 907 | 2018-04-18T11:17:57.000Z | 2022-03-31T13:20:25.000Z | var/spack/repos/builtin/packages/py-torch-scatter/package.py | robertodr/spack | 9b809e01b47d48f01b3d257912fe1b752943cd3d | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 29 | 2018-11-05T16:14:23.000Z | 2022-02-03T16:07:09.000Z | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyTorchScatter(PythonPackage):
"""This package consists of a small extension library of
... | 38.15 | 95 | 0.653997 |
7950ac4541048cb6c3f23f7039f94ca71dfd0d3f | 5,768 | py | Python | dqn/exercise/dqn_agent.py | primeMover2011/deep-reinforcement-learning | a8314b01da15e47c230a3246e5109d49c6618162 | [
"MIT"
] | 4,317 | 2018-07-06T18:50:33.000Z | 2022-03-31T19:24:33.000Z | dqn/exercise/dqn_agent.py | primeMover2011/deep-reinforcement-learning | a8314b01da15e47c230a3246e5109d49c6618162 | [
"MIT"
] | 41 | 2018-07-08T00:07:26.000Z | 2022-03-17T22:42:19.000Z | dqn/exercise/dqn_agent.py | primeMover2011/deep-reinforcement-learning | a8314b01da15e47c230a3246e5109d49c6618162 | [
"MIT"
] | 2,366 | 2018-07-06T18:57:22.000Z | 2022-03-28T00:37:00.000Z | import numpy as np
import random
from collections import namedtuple, deque
from model import QNetwork
import torch
import torch.nn.functional as F
import torch.optim as optim
BUFFER_SIZE = int(1e5) # replay buffer size
BATCH_SIZE = 64 # minibatch size
GAMMA = 0.99 # discount factor
TAU = 1e-3 ... | 39.506849 | 127 | 0.619972 |
7950ac845cd9e8ebf8a055d52e2bd0820c427c43 | 2,346 | py | Python | tests/test_encoder.py | aditya-agrawal-30502/vformer | e1f4950f980238442ff1dc39a8f0791e4fbc9dac | [
"MIT"
] | 90 | 2021-09-08T10:21:19.000Z | 2022-03-26T18:11:47.000Z | tests/test_encoder.py | aditya-agrawal-30502/vformer | e1f4950f980238442ff1dc39a8f0791e4fbc9dac | [
"MIT"
] | 72 | 2021-09-09T06:54:50.000Z | 2022-03-31T09:23:31.000Z | tests/test_encoder.py | aditya-agrawal-30502/vformer | e1f4950f980238442ff1dc39a8f0791e4fbc9dac | [
"MIT"
] | 21 | 2021-09-09T05:56:03.000Z | 2022-03-20T08:22:09.000Z | import torch
import torch.nn as nn
from vformer.functional import PatchMerging
from vformer.utils import ENCODER_REGISTRY
encoder_modules = ENCODER_REGISTRY.get_list()
def test_VanillaEncoder():
test_tensor = torch.randn(2, 65, 1024)
encoder = ENCODER_REGISTRY.get("VanillaEncoder")(
embedding_dim=1... | 24.694737 | 81 | 0.635124 |
7950acf140dd62d26b45926e473622df452b3584 | 2,304 | py | Python | docs/conf.py | open-molecular-dynamics/moldyn | 95a8be53981a2159a75e82c7321136bebc674bc8 | [
"MIT"
] | 2 | 2019-07-15T08:36:50.000Z | 2019-08-11T11:47:30.000Z | docs/conf.py | open-molecular-dynamics/moldyn | 95a8be53981a2159a75e82c7321136bebc674bc8 | [
"MIT"
] | 1 | 2020-01-13T15:35:35.000Z | 2020-01-13T15:35:35.000Z | docs/conf.py | open-molecular-dynamics/moldyn | 95a8be53981a2159a75e82c7321136bebc674bc8 | [
"MIT"
] | 1 | 2019-07-15T08:34:29.000Z | 2019-07-15T08:34:29.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or module... | 33.391304 | 79 | 0.666233 |
7950aef8e563296cfef82bdc75513e37e374aa8a | 4,276 | py | Python | web/run.py | GitOnUp/docker-sendanywhere | d360d0dafa0affeed64a1baa9740c8af3ec0ad24 | [
"Apache-2.0"
] | 54 | 2017-01-08T17:21:49.000Z | 2021-11-02T08:46:07.000Z | web/run.py | GitOnUp/docker-sendanywhere | d360d0dafa0affeed64a1baa9740c8af3ec0ad24 | [
"Apache-2.0"
] | 22 | 2017-03-28T06:03:14.000Z | 2021-07-28T05:43:55.000Z | web/run.py | GitOnUp/docker-sendanywhere | d360d0dafa0affeed64a1baa9740c8af3ec0ad24 | [
"Apache-2.0"
] | 21 | 2017-01-26T21:12:09.000Z | 2022-01-31T21:34:59.000Z | #!/usr/bin/env python
import os
import time
import sys
import subprocess
import signal
def run_with_reloader(main_func, extra_files=None, interval=1):
"""Run the given function in an independent python interpreter."""
def find_files(directory="./"):
for root, dirs, files in os.walk(directory):
... | 30.326241 | 78 | 0.550047 |
7950af2f1be6ecb75f785dc592c2cdc8a365745c | 955 | py | Python | app/nettools.py | gunawanw9/haproxy-wi | 3b60d556b430dad7bd0c56bdfe73c3422ebf05bf | [
"Apache-2.0"
] | 862 | 2018-04-10T03:53:03.000Z | 2021-05-01T02:05:44.000Z | app/nettools.py | gunawanw9/haproxy-wi | 3b60d556b430dad7bd0c56bdfe73c3422ebf05bf | [
"Apache-2.0"
] | 250 | 2018-04-19T02:59:34.000Z | 2021-04-30T19:08:15.000Z | app/nettools.py | gunawanw9/haproxy-wi | 3b60d556b430dad7bd0c56bdfe73c3422ebf05bf | [
"Apache-2.0"
] | 184 | 2018-02-10T09:33:38.000Z | 2021-04-29T14:38:47.000Z | #!/usr/bin/env python3
import funct
from jinja2 import Environment, FileSystemLoader
env = Environment(loader=FileSystemLoader('templates/'), autoescape=True)
template = env.get_template('nettools.html')
form = funct.form
print('Content-type: text/html\n')
funct.check_login()
try:
user, user_id, role, token, serv... | 38.2 | 87 | 0.521466 |
7950afcbcb4a965d2df17761430dd12d4e82773b | 13,365 | py | Python | analysis/synthetic_analyses.py | jmschrei/discern | 50b6f03d070604479c160569cca9ef7f031ff38d | [
"MIT"
] | 1 | 2020-04-18T09:53:58.000Z | 2020-04-18T09:53:58.000Z | analysis/synthetic_analyses.py | jmschrei/discern | 50b6f03d070604479c160569cca9ef7f031ff38d | [
"MIT"
] | null | null | null | analysis/synthetic_analyses.py | jmschrei/discern | 50b6f03d070604479c160569cca9ef7f031ff38d | [
"MIT"
] | null | null | null | # synthetic_analyses.py
# Contact: Jacob Schreiber
# jmschr@cs.washington.edu
'''
These tests will show the difference between DISCERN, ANOVA, and LNS
on pairs of synthetic Bayesian networks. You can build your own Bayesian
networks by hand (three examples shown below) and then use the barchart
and score_netw... | 33.92132 | 130 | 0.683427 |
7950b0481568299c93326abc368bfe9d394d108d | 208 | py | Python | Calculator/Addition.py | mkm99/TeamProject_StatsCalculator | 81085c1af47f38d3e49b43d667e312016c44ad10 | [
"MIT"
] | null | null | null | Calculator/Addition.py | mkm99/TeamProject_StatsCalculator | 81085c1af47f38d3e49b43d667e312016c44ad10 | [
"MIT"
] | 7 | 2020-03-03T21:37:57.000Z | 2020-03-06T04:11:42.000Z | Calculator/Addition.py | mkm99/TeamProject_StatsCalculator | 81085c1af47f38d3e49b43d667e312016c44ad10 | [
"MIT"
] | null | null | null | def addition(augend, addend):
if isinstance(augend, str) or isinstance(addend, str):
return "Trying to use strings in calculator"
solution = float(augend) + float(addend)
return solution
| 29.714286 | 58 | 0.697115 |
7950b1fa97a0f69114306e4e54adc78f6b4ad32a | 5,616 | py | Python | qa/rpc-tests/rpcbind_test.py | fflo/lemoncoin | 1d45a3821afacf24d07827b64712d31f28b75730 | [
"MIT"
] | null | null | null | qa/rpc-tests/rpcbind_test.py | fflo/lemoncoin | 1d45a3821afacf24d07827b64712d31f28b75730 | [
"MIT"
] | null | null | null | qa/rpc-tests/rpcbind_test.py | fflo/lemoncoin | 1d45a3821afacf24d07827b64712d31f28b75730 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# Copyright (c) 2014 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 for -rpcbind, as well as -rpcallowip and -rpcconnect
# Add python-bitcoinrpc to module search path:
im... | 36.705882 | 110 | 0.643162 |
7950b240074ba1d6f45b0225e5a467a473327c4f | 4,568 | py | Python | packages/core/minos-microservice-aggregate/tests/test_aggregate/test_value_objects.py | bhardwajRahul/minos-python | bad7a280ad92680abdeab01d1214688279cf6316 | [
"MIT"
] | 247 | 2022-01-24T14:55:30.000Z | 2022-03-25T12:06:17.000Z | packages/core/minos-microservice-aggregate/tests/test_aggregate/test_value_objects.py | bhardwajRahul/minos-python | bad7a280ad92680abdeab01d1214688279cf6316 | [
"MIT"
] | 168 | 2022-01-24T14:54:31.000Z | 2022-03-31T09:31:09.000Z | packages/core/minos-microservice-aggregate/tests/test_aggregate/test_value_objects.py | bhardwajRahul/minos-python | bad7a280ad92680abdeab01d1214688279cf6316 | [
"MIT"
] | 21 | 2022-02-06T17:25:58.000Z | 2022-03-27T04:50:29.000Z | import unittest
from unittest import (
TestCase,
)
from minos.aggregate import (
Action,
IncrementalSetDiff,
IncrementalSetDiffEntry,
ValueObject,
ValueObjectException,
ValueObjectSet,
)
class _Location(ValueObject):
street: str
class TestValueObject(TestCase):
def setUp(self) -... | 31.287671 | 106 | 0.688266 |
7950b3418afefb3445094edac4459310abe6fa27 | 1,368 | py | Python | third_party/android_deps/libs/com_android_support_support_fragment/3pp/fetch.py | Ron423c/chromium | 2edf7b980065b648f8b2a6e52193d83832fe36b7 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 575 | 2015-06-18T23:58:20.000Z | 2022-03-23T09:32:39.000Z | third_party/android_deps/libs/com_android_support_support_fragment/3pp/fetch.py | Ron423c/chromium | 2edf7b980065b648f8b2a6e52193d83832fe36b7 | [
"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/android_deps/libs/com_android_support_support_fragment/3pp/fetch.py | DamieFC/chromium | 54ce2d3c77723697efd22cfdb02aea38f9dfa25c | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 52 | 2015-07-14T10:40:50.000Z | 2022-03-15T01:11:49.000Z | #!/usr/bin/env python
# Copyright 2021 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.
# This is generated, do not edit. Update BuildConfigGenerator.groovy and
# 3ppFetch.template instead.
from __future__ import print_fun... | 24 | 110 | 0.682018 |
7950b4ad09cee3054bc74da5c7de12d5f4671065 | 557 | py | Python | StudentManager/migrations/0015_pastoral.py | franklinwagbara/Brookstone-Pastoral-Management-System | a8a4cd66fbb7284e3cd61539bc313100ebd14f94 | [
"MIT"
] | null | null | null | StudentManager/migrations/0015_pastoral.py | franklinwagbara/Brookstone-Pastoral-Management-System | a8a4cd66fbb7284e3cd61539bc313100ebd14f94 | [
"MIT"
] | null | null | null | StudentManager/migrations/0015_pastoral.py | franklinwagbara/Brookstone-Pastoral-Management-System | a8a4cd66fbb7284e3cd61539bc313100ebd14f94 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2020-09-22 13:27
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('StudentManager', '0014_account_admin_gate_schooladmin'),
]
operations = [
migrations.CreateModel(
name='Pastoral',
f... | 26.52381 | 114 | 0.601436 |
7950b4bd2297f719a8873258df1db5e24ea0e550 | 3,391 | py | Python | examples/pytorch/mvgrl/graph/model.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | 9,516 | 2018-12-08T22:11:31.000Z | 2022-03-31T13:04:33.000Z | examples/pytorch/mvgrl/graph/model.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | 2,494 | 2018-12-08T22:43:00.000Z | 2022-03-31T21:16:27.000Z | examples/pytorch/mvgrl/graph/model.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | 2,529 | 2018-12-08T22:56:14.000Z | 2022-03-31T13:07:41.000Z | import torch as th
import torch.nn as nn
from dgl.nn.pytorch import GraphConv
from dgl.nn.pytorch.glob import SumPooling
from utils import local_global_loss_
class MLP(nn.Module):
def __init__(self, in_dim, out_dim):
super(MLP, self).__init__()
self.fcs = nn.Sequential(
nn.Linear(in_d... | 30.00885 | 107 | 0.625479 |
7950b4d7ed869497fa643f261414612e3dc91cb6 | 2,298 | py | Python | casim/params.py | pdebuyl/cancer_sim | 305492d5108e1fb50783e4f13ddf2e1cf5b08976 | [
"MIT"
] | 1 | 2022-02-16T03:34:44.000Z | 2022-02-16T03:34:44.000Z | casim/params.py | pdebuyl/cancer_sim | 305492d5108e1fb50783e4f13ddf2e1cf5b08976 | [
"MIT"
] | 12 | 2020-03-16T20:59:21.000Z | 2020-09-18T08:41:09.000Z | casim/params.py | pdebuyl/cancer_sim | 305492d5108e1fb50783e4f13ddf2e1cf5b08976 | [
"MIT"
] | 3 | 2020-09-16T12:41:19.000Z | 2021-03-11T23:19:24.000Z | ################################################################################
# #
# Commented casim parameter input file. #
# Valid settings are indicated in parentheses at the end of each comment line... | 37.064516 | 88 | 0.604439 |
7950b4eb88a800dcad8fbf66345ca3b869bac832 | 2,699 | py | Python | setup.py | bevy/Opentok-Python-SDK | f7b821160752d2383120c08f34b4c7ad66ddb161 | [
"MIT"
] | null | null | null | setup.py | bevy/Opentok-Python-SDK | f7b821160752d2383120c08f34b4c7ad66ddb161 | [
"MIT"
] | null | null | null | setup.py | bevy/Opentok-Python-SDK | f7b821160752d2383120c08f34b4c7ad66ddb161 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
import codecs
import os
import re
import sys
here = os.path.abspath(os.path.dirname(__file__))
# Read the version number from a source file.
# Why read it, and not import?
# see https://groups.google.com/d/topic/pypa-dev/0PkjVpcxTzQ/discussion
def find_version(*file_paths):... | 31.752941 | 86 | 0.641349 |
7950b50b42519a90bf0e992592f1bc57b3e6006e | 16,839 | py | Python | magenta/music/encoder_decoder_test.py | veskoch/magenta | 74f16be4341925341617699dffdbddadd747acad | [
"Apache-2.0"
] | 51 | 2016-11-06T16:48:47.000Z | 2021-11-12T08:59:58.000Z | magenta/music/encoder_decoder_test.py | veskoch/magenta | 74f16be4341925341617699dffdbddadd747acad | [
"Apache-2.0"
] | 1 | 2022-02-11T19:01:43.000Z | 2022-02-11T19:01:56.000Z | magenta/music/encoder_decoder_test.py | veskoch/magenta | 74f16be4341925341617699dffdbddadd747acad | [
"Apache-2.0"
] | 16 | 2016-11-10T06:31:02.000Z | 2020-01-22T12:07:28.000Z | # 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 required by applicable law or ag... | 42.203008 | 80 | 0.6441 |
7950b53c7afbbd2a4bb5dec48381e76e9ac2ed8e | 179 | py | Python | django_blog/my-venv/Scripts/django-admin.py | mghendi/Portfolio | 65534e600770803deb603ba5ffb0a5ef70f0db4e | [
"MIT"
] | null | null | null | django_blog/my-venv/Scripts/django-admin.py | mghendi/Portfolio | 65534e600770803deb603ba5ffb0a5ef70f0db4e | [
"MIT"
] | null | null | null | django_blog/my-venv/Scripts/django-admin.py | mghendi/Portfolio | 65534e600770803deb603ba5ffb0a5ef70f0db4e | [
"MIT"
] | null | null | null | #!c:\users\sammy\documents\github\django_blog\my-venv\scripts\python.exe
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 29.833333 | 72 | 0.793296 |
7950b60fa910fb7245ae3031e2a1cbf20c171085 | 4,086 | py | Python | anchore_engine/services/policy_engine/api/models/trigger_param_spec.py | Talanor/anchore-engine | 5e809db1eb681f89670655c5bf9933eba50cf403 | [
"Apache-2.0"
] | null | null | null | anchore_engine/services/policy_engine/api/models/trigger_param_spec.py | Talanor/anchore-engine | 5e809db1eb681f89670655c5bf9933eba50cf403 | [
"Apache-2.0"
] | null | null | null | anchore_engine/services/policy_engine/api/models/trigger_param_spec.py | Talanor/anchore-engine | 5e809db1eb681f89670655c5bf9933eba50cf403 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from .base_model_ import Model
from datetime import date, datetime
from typing import List, Dict
from ..util import deserialize_model
class TriggerParamSpec(Model):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not ... | 27.422819 | 134 | 0.613803 |
7950b84644fa8f6474b387fd2ee7d0671afa8aae | 170 | py | Python | configmng/__init__.py | christian-oreilly/configmng | 8e0e18d5e39d1bab2fcac4b32ee7b855c28f2f14 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | configmng/__init__.py | christian-oreilly/configmng | 8e0e18d5e39d1bab2fcac4b32ee7b855c28f2f14 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | configmng/__init__.py | christian-oreilly/configmng | 8e0e18d5e39d1bab2fcac4b32ee7b855c28f2f14 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | from .config import Config, ConfigArg
from .configmng import ConfigMng
from .configlevel import ConfigLevel
from .schema import Schema
from .provenance import ConfigProv
| 28.333333 | 37 | 0.841176 |
7950ba19ba672b146edf755184bc33ddb9b716f8 | 2,899 | py | Python | tests/unit/config/test_config_experimental.py | drohde/deepr | 672772ea3ce9cf391f9f8efc7ae9c9d438957817 | [
"Apache-2.0"
] | null | null | null | tests/unit/config/test_config_experimental.py | drohde/deepr | 672772ea3ce9cf391f9f8efc7ae9c9d438957817 | [
"Apache-2.0"
] | null | null | null | tests/unit/config/test_config_experimental.py | drohde/deepr | 672772ea3ce9cf391f9f8efc7ae9c9d438957817 | [
"Apache-2.0"
] | null | null | null | """Tests for config.deepr_experimental"""
from dataclasses import dataclass
import pytest
import deepr as dpr
@dataclass
class A:
x: int = 1
y: float = 1.0
z: bool = True
@dataclass
class B:
a: A
b: str = "b"
class C(A):
def __init__(self, b: str = "b", **kwargs):
super().__init... | 27.349057 | 106 | 0.461538 |
7950bb6bb89edfcc06f32fc35e6501774beff9c3 | 1,230 | py | Python | tests/test_celery_task_view.py | LaudateCorpus1/squest | 98304f20c1d966fb3678d348ffd7c5be438bb6be | [
"Apache-2.0"
] | null | null | null | tests/test_celery_task_view.py | LaudateCorpus1/squest | 98304f20c1d966fb3678d348ffd7c5be438bb6be | [
"Apache-2.0"
] | null | null | null | tests/test_celery_task_view.py | LaudateCorpus1/squest | 98304f20c1d966fb3678d348ffd7c5be438bb6be | [
"Apache-2.0"
] | 1 | 2022-03-24T03:37:12.000Z | 2022-03-24T03:37:12.000Z | from django_celery_results.models import TaskResult
from rest_framework import status
from rest_framework.reverse import reverse
from tests.test_service_catalog.base import BaseTest
class TestCeleryTaskAPIViews(BaseTest):
def setUp(self):
super(TestCeleryTaskAPIViews, self).setUp()
test_task = ... | 37.272727 | 74 | 0.730081 |
7950bbbfa87e5809c6036d892c97c56404c7425f | 571 | py | Python | badlinkfinder/utilities.py | jonchun/badlinkfinder | f61c42eaad7bdebea639df69da58954924c38c20 | [
"MIT"
] | 1 | 2021-11-09T10:16:42.000Z | 2021-11-09T10:16:42.000Z | badlinkfinder/utilities.py | jonchun/badlinkfinder | f61c42eaad7bdebea639df69da58954924c38c20 | [
"MIT"
] | null | null | null | badlinkfinder/utilities.py | jonchun/badlinkfinder | f61c42eaad7bdebea639df69da58954924c38c20 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
import logging
from url_normalize import url_normalize
def normalize_url(url):
normalized_url = url_normalize(url).split('#')[0]
return normalized_url
"""
Convert string to log level. Borrowed from Fail2Ban.
https://github.com/fail2ban/fail2ban/blob/1b4ba602bac38a067b5... | 24.826087 | 107 | 0.725044 |
7950bc0f59c2f0f351e1bd2c316829cceb81f4bc | 9,730 | py | Python | tests/chainer_tests/functions_tests/pooling_tests/test_max_pooling_nd.py | mingxiaoh/chainer_for_rebase | 8c5ba24bf81d648402d388dac1df7591b2557712 | [
"MIT"
] | 1 | 2020-05-28T10:07:25.000Z | 2020-05-28T10:07:25.000Z | tests/chainer_tests/functions_tests/pooling_tests/test_max_pooling_nd.py | mingxiaoh/chainer_for_rebase | 8c5ba24bf81d648402d388dac1df7591b2557712 | [
"MIT"
] | null | null | null | tests/chainer_tests/functions_tests/pooling_tests/test_max_pooling_nd.py | mingxiaoh/chainer_for_rebase | 8c5ba24bf81d648402d388dac1df7591b2557712 | [
"MIT"
] | null | null | null | import unittest
import functools
import math
import mock
import numpy
from operator import mul
import six
import chainer
from chainer import cuda
from chainer import functions
from chainer import gradient_check
from chainer import testing
from chainer.testing import attr
from chainer.testing import condition
from cha... | 36.578947 | 79 | 0.616958 |
7950bd95802edd8bc47d29c9132f5220091e6a4e | 842 | py | Python | day05/mysql_study/My_select3.py | zhangyage/Python-oldboy | a95c1b465929e2be641e425fcb5e15b366800831 | [
"Apache-2.0"
] | 1 | 2020-06-04T08:44:09.000Z | 2020-06-04T08:44:09.000Z | day05/mysql_study/My_select3.py | zhangyage/Python-oldboy | a95c1b465929e2be641e425fcb5e15b366800831 | [
"Apache-2.0"
] | null | null | null | day05/mysql_study/My_select3.py | zhangyage/Python-oldboy | a95c1b465929e2be641e425fcb5e15b366800831 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
'''
mysql查询操作
fetchall()和fetchone()比较
fetchall() #获取所有的数据
fetchone() #只获取一条数据
cur.scroll(0,mode='absolute') #绝对定位,可以定位指针的位置结合yeild学习 0代表的是开头
cur.scroll(-1,mode='relative') #相对定位,-1是将指针退回一个,
'''
import MySQLdb
conn = MySQLdb.connect(host='192.168.75.133',user='zh... | 24.057143 | 93 | 0.675772 |
7950bdb27156d2f304e63d35cd13d7536264cae9 | 5,445 | py | Python | htdocs/frost/frost_ts.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | 1 | 2019-10-07T17:01:24.000Z | 2019-10-07T17:01:24.000Z | htdocs/frost/frost_ts.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | htdocs/frost/frost_ts.py | trentford/iem | 7264d24f2d79a3cd69251a09758e6531233a732f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Generate some line charts from ISU Frost Model Output"""
import sys
import os
import cgi
import datetime
import numpy as np
import pytz
import matplotlib.dates as mdates
from pyiem.util import ncopen, ssw
from pyiem.plot.use_agg import plt
from pyiem.datatypes import temperature
def get_late... | 33.819876 | 79 | 0.567493 |
7950bdd72000a2182d05a16051f6f99a6bb8217c | 531 | py | Python | lib/galaxy/app_unittest_utils/celery_helper.py | pvanheus/galaxy | 48403b0e45b71c4b0ce7a1e22d65a0a7cdb79574 | [
"CC-BY-3.0"
] | 3 | 2016-09-15T21:04:56.000Z | 2019-04-21T02:48:25.000Z | lib/galaxy/app_unittest_utils/celery_helper.py | pvanheus/galaxy | 48403b0e45b71c4b0ce7a1e22d65a0a7cdb79574 | [
"CC-BY-3.0"
] | 209 | 2015-06-17T16:15:20.000Z | 2022-03-21T15:23:07.000Z | lib/galaxy/app_unittest_utils/celery_helper.py | pvanheus/galaxy | 48403b0e45b71c4b0ce7a1e22d65a0a7cdb79574 | [
"CC-BY-3.0"
] | 7 | 2016-07-10T16:44:30.000Z | 2020-08-30T19:25:51.000Z | from functools import wraps
def rebind_container_to_task(app):
import galaxy.app
galaxy.app.app = app
from galaxy.celery import tasks
def magic_bind_dynamic(func):
return wraps(func)(app.magic_partial(func, shared=None))
for task in tasks.CELERY_TASKS:
task_fn = getattr(tasks, ta... | 29.5 | 64 | 0.683616 |
7950be1316d8e0fdc8291317a9d598d3ee667577 | 1,495 | py | Python | ooobuild/dyn/reflection/x_singleton_type_description.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/reflection/x_singleton_type_description.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | ooobuild/dyn/reflection/x_singleton_type_description.py | Amourspirit/ooo_uno_tmpl | 64e0c86fd68f24794acc22d63d8d32ae05dd12b8 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2022 :Barry-Thomas-Paul: Moss
#
# 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 applicab... | 40.405405 | 116 | 0.789298 |
7950bf2b33692324216754b29e8bd1b8b9c7fae0 | 460 | py | Python | eventmap/eventmap/urls.py | alexdzehil/learn_python_project | 197d223c4383bee521903752f59235aec52dc5e7 | [
"MIT"
] | null | null | null | eventmap/eventmap/urls.py | alexdzehil/learn_python_project | 197d223c4383bee521903752f59235aec52dc5e7 | [
"MIT"
] | null | null | null | eventmap/eventmap/urls.py | alexdzehil/learn_python_project | 197d223c4383bee521903752f59235aec52dc5e7 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
path('admin/', admin.site.urls),
path('', include('events.urls', namespace='events')),
path('accounts/', include('accounts.urls', namespace='a... | 28.75 | 76 | 0.728261 |
7950bfe3fefcd96f742e6d0af946609098c3c9a5 | 18,486 | py | Python | pooch/_version.py | santis19/pooch | ef9fb2dd79a2dde8a93d8ce1c6e473def512a705 | [
"BSD-3-Clause"
] | null | null | null | pooch/_version.py | santis19/pooch | ef9fb2dd79a2dde8a93d8ce1c6e473def512a705 | [
"BSD-3-Clause"
] | null | null | null | pooch/_version.py | santis19/pooch | ef9fb2dd79a2dde8a93d8ce1c6e473def512a705 | [
"BSD-3-Clause"
] | null | null | null | # pylint: skip-file
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# t... | 33.129032 | 88 | 0.583955 |
7950c047b2c2857c6acfd01961aab2f0cd526ac5 | 424 | py | Python | Numpy/arrays.py | Fernal73/LearnPython3 | 5288017c0dbf95633b84f1e6324f00dec6982d36 | [
"MIT"
] | 1 | 2021-12-17T11:03:13.000Z | 2021-12-17T11:03:13.000Z | Numpy/arrays.py | Fernal73/LearnPython3 | 5288017c0dbf95633b84f1e6324f00dec6982d36 | [
"MIT"
] | 1 | 2020-02-05T00:14:43.000Z | 2020-02-06T09:22:49.000Z | Numpy/arrays.py | Fernal73/LearnPython3 | 5288017c0dbf95633b84f1e6324f00dec6982d36 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
a = np.arange(1,16,dtype=int).reshape(3,5).T
print(a)
b = a[1:4:2]
print(b)
a = a.T
b = a[:,1:4:2]
print(b)
a = np.arange(25).reshape(5, 5)
b = np.array([1., 5, 10, 15, 20])
print(a,b)
c = a / b[:, np.newaxis]
print(c)
a = np.random.rand(10,3)
print(a)... | 16.96 | 44 | 0.558962 |
7950c07037b2782786bde5afd988850ce01b37e9 | 5,078 | py | Python | dvc/fs/azure.py | meierale/dvc | 67b42ebe4f9474d71a2d5b195014046775a08401 | [
"Apache-2.0"
] | 1 | 2021-07-20T05:33:18.000Z | 2021-07-20T05:33:18.000Z | dvc/fs/azure.py | meierale/dvc | 67b42ebe4f9474d71a2d5b195014046775a08401 | [
"Apache-2.0"
] | null | null | null | dvc/fs/azure.py | meierale/dvc | 67b42ebe4f9474d71a2d5b195014046775a08401 | [
"Apache-2.0"
] | 1 | 2021-08-05T07:15:30.000Z | 2021-08-05T07:15:30.000Z | import logging
import os
import threading
from fsspec.asyn import fsspec_loop
from fsspec.utils import infer_storage_options
from funcy import cached_property, memoize, wrap_prop
from dvc.exceptions import DvcException
from dvc.path_info import CloudURLInfo
from dvc.scheme import Schemes
from dvc.utils import format_... | 33.853333 | 79 | 0.618157 |
7950c0eeb49041ab8b71decbeb240076f498a55a | 463 | py | Python | spanish_content/migrations/0011_eduprogram_video.py | RachellCalhoun/lightandleadership | c7880c8760d82842ab2626d17124d5df13f9d9d8 | [
"Apache-2.0"
] | 1 | 2016-02-03T07:49:44.000Z | 2016-02-03T07:49:44.000Z | spanish_content/migrations/0011_eduprogram_video.py | RachellCalhoun/lightandleadership | c7880c8760d82842ab2626d17124d5df13f9d9d8 | [
"Apache-2.0"
] | 6 | 2016-02-03T07:57:48.000Z | 2019-08-15T20:29:59.000Z | spanish_content/migrations/0011_eduprogram_video.py | RachellCalhoun/lightandleadership | c7880c8760d82842ab2626d17124d5df13f9d9d8 | [
"Apache-2.0"
] | 1 | 2016-02-02T09:21:56.000Z | 2016-02-02T09:21:56.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-03-11 22:25
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('spanish_content', '0010_auto_20170304_1848'),
]
operations = [
migrations.A... | 22.047619 | 55 | 0.62635 |
7950c1cf133fcd04abd2bdd50be8c38299d5315b | 3,538 | py | Python | salt/modules/system_profiler.py | 0xf10e/salt | fb16449a1ce4ddfc86de07f1e61709fe982f1e78 | [
"Apache-2.0"
] | null | null | null | salt/modules/system_profiler.py | 0xf10e/salt | fb16449a1ce4ddfc86de07f1e61709fe982f1e78 | [
"Apache-2.0"
] | null | null | null | salt/modules/system_profiler.py | 0xf10e/salt | fb16449a1ce4ddfc86de07f1e61709fe982f1e78 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
System Profiler Module
Interface with Mac OSX's command-line System Profiler utility to get
information about package receipts and installed applications.
.. versionadded:: 2015.2.0
'''
import plistlib
import subprocess
import salt.utils
PROFILER_BINARY = '/usr/sbin/system_profiler'
d... | 26.207407 | 101 | 0.594404 |
7950c2423e674d7034b7e0562c94cbb676814f0e | 2,507 | py | Python | compose/cli/docker_client.py | mattjbray/compose | f65f89ad8c26684a314d9099fe35bcea07dbe5dc | [
"Apache-2.0"
] | null | null | null | compose/cli/docker_client.py | mattjbray/compose | f65f89ad8c26684a314d9099fe35bcea07dbe5dc | [
"Apache-2.0"
] | null | null | null | compose/cli/docker_client.py | mattjbray/compose | f65f89ad8c26684a314d9099fe35bcea07dbe5dc | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import unicode_literals
import logging
from docker import Client
from docker.errors import TLSParameterError
from docker.tls import TLSConfig
from docker.utils import kwargs_from_env
from ..const import HTTP_TIMEOUT
from ..const import IS_WINDOWS_PLATFORM
from .... | 30.950617 | 82 | 0.682489 |
7950c2ccaa68fdd52ee4e298b1f507ef4df382ea | 18,601 | py | Python | nova/tests/unit/compute/test_shelve.py | TMaddox/nova | e5c169d15528a8e2eadb8eca668ea0d183cf8648 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/compute/test_shelve.py | TMaddox/nova | e5c169d15528a8e2eadb8eca668ea0d183cf8648 | [
"Apache-2.0"
] | 1 | 2019-01-02T01:30:35.000Z | 2019-01-02T01:38:02.000Z | nova/tests/unit/compute/test_shelve.py | TMaddox/nova | e5c169d15528a8e2eadb8eca668ea0d183cf8648 | [
"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... | 44.393795 | 79 | 0.63889 |
7950c2fdf695598e3a01256b55f471bbfc592368 | 28,739 | py | Python | tests/unit/states/test_postgres.py | l2ol33rt/salt | ff68bbd9f4bda992a3e039822fb32f141e94347c | [
"Apache-2.0"
] | 1 | 2022-02-09T06:40:14.000Z | 2022-02-09T06:40:14.000Z | tests/unit/states/test_postgres.py | l2ol33rt/salt | ff68bbd9f4bda992a3e039822fb32f141e94347c | [
"Apache-2.0"
] | null | null | null | tests/unit/states/test_postgres.py | l2ol33rt/salt | ff68bbd9f4bda992a3e039822fb32f141e94347c | [
"Apache-2.0"
] | 4 | 2020-11-04T06:28:05.000Z | 2022-02-09T10:54:49.000Z | # -*- coding: utf-8 -*-
# Import python libs
from __future__ import absolute_import
# Import Salt Testing libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import skipIf, TestCase
from tests.support.mock import NO_MOCK, NO_MOCK_REASON, Mock, MagicMock, patch
# Import salt libs
impor... | 49.126496 | 102 | 0.40318 |
7950c30ec39845cf18c8282b04dc3fec7067dc18 | 4,525 | py | Python | tests/utils.py | shagunsodhani/xplogger | 46107543cee9a6708d9337090b53dc88e2bfd890 | [
"MIT"
] | 6 | 2021-03-26T22:13:39.000Z | 2021-09-20T09:47:18.000Z | tests/utils.py | shagunsodhani/xplogger | 46107543cee9a6708d9337090b53dc88e2bfd890 | [
"MIT"
] | 3 | 2021-04-27T23:09:13.000Z | 2021-05-29T20:31:16.000Z | tests/utils.py | shagunsodhani/xplogger | 46107543cee9a6708d9337090b53dc88e2bfd890 | [
"MIT"
] | null | null | null | import numpy as np
import xplogger.logbook
from xplogger.types import ConfigType
def make_logbook_config(logger_dir: str) -> ConfigType:
return xplogger.logbook.make_config(
logger_dir=logger_dir,
wandb_config=None,
tensorboard_config=None,
mlflow_config=None,
)
def make_log... | 29.00641 | 106 | 0.509834 |
7950c32b515c7b8fd08e278330c938546e3a3d10 | 269 | py | Python | feder/letters/formsets.py | dzemeuksis/feder | 32ef7793af6256d4ecada61505c7baf334b34419 | [
"MIT"
] | 16 | 2015-08-11T17:20:26.000Z | 2022-02-11T20:15:41.000Z | feder/letters/formsets.py | dzemeuksis/feder | 32ef7793af6256d4ecada61505c7baf334b34419 | [
"MIT"
] | 534 | 2015-08-04T00:10:54.000Z | 2022-03-17T10:44:47.000Z | feder/letters/formsets.py | dzemeuksis/feder | 32ef7793af6256d4ecada61505c7baf334b34419 | [
"MIT"
] | 10 | 2017-08-30T13:34:32.000Z | 2022-02-18T13:00:35.000Z | from atom.ext.crispy_forms.forms import BaseTableFormSet
from extra_views import InlineFormSet
from feder.letters.models import Attachment
class AttachmentInline(InlineFormSet):
model = Attachment
formset_class = BaseTableFormSet
fields = ["attachment"]
| 24.454545 | 56 | 0.802974 |
7950c3a932b54b90f410e26330f6112829c77f1b | 1,491 | py | Python | refinery/units/formats/office/xtdoc.py | bronxc/refinery | 9448facf48a0008f27861dd1a5ee8f5218e6bb86 | [
"BSD-3-Clause"
] | null | null | null | refinery/units/formats/office/xtdoc.py | bronxc/refinery | 9448facf48a0008f27861dd1a5ee8f5218e6bb86 | [
"BSD-3-Clause"
] | null | null | null | refinery/units/formats/office/xtdoc.py | bronxc/refinery | 9448facf48a0008f27861dd1a5ee8f5218e6bb86 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from typing import Optional
from refinery.units.formats import PathExtractorUnit, UnpackResult
from refinery.units.formats.archive.xtzip import xtzip
from refinery.lib.structures import MemoryFile
class xtdoc(PathExtractorUnit):
"""
Extract files from an OLE doc... | 33.133333 | 76 | 0.564722 |
7950c3b0ed7bd0737bf9402fcc42117531ff16f5 | 4,171 | py | Python | scripts/Util.py | mkrizmancic/qlearn_baxter | 0498315212cacb40334cbb97a858c6ba317f52a3 | [
"MIT"
] | 4 | 2017-11-11T18:16:22.000Z | 2018-11-08T13:31:09.000Z | scripts/Util.py | mkrizmancic/qlearn_baxter | 0498315212cacb40334cbb97a858c6ba317f52a3 | [
"MIT"
] | null | null | null | scripts/Util.py | mkrizmancic/qlearn_baxter | 0498315212cacb40334cbb97a858c6ba317f52a3 | [
"MIT"
] | 2 | 2019-09-04T12:28:58.000Z | 2021-09-27T13:02:48.000Z | """
This module is used for utility and helper functions used elsewhere in the program.
Functions:
get_pick_height: Returns the height from which to pick the disk.
get_place_height: Returns the height where to place the disk.
index2state: Converts state indexes to tuples.
printGame: Visualizes m... | 30.896296 | 97 | 0.592184 |
7950c46552a79afa6bd9bd68ed138d1324b84305 | 48,741 | py | Python | scvi/model/_totalvi.py | Semih-Kurt/scvi-tools | 1bea2af8cc99e11d55a6925f09d978de5f6994fb | [
"BSD-3-Clause"
] | null | null | null | scvi/model/_totalvi.py | Semih-Kurt/scvi-tools | 1bea2af8cc99e11d55a6925f09d978de5f6994fb | [
"BSD-3-Clause"
] | null | null | null | scvi/model/_totalvi.py | Semih-Kurt/scvi-tools | 1bea2af8cc99e11d55a6925f09d978de5f6994fb | [
"BSD-3-Clause"
] | null | null | null | import logging
import warnings
from collections.abc import Iterable as IterableClass
from functools import partial
from typing import Dict, Iterable, List, Optional, Sequence, Tuple, TypeVar, Union
import numpy as np
import pandas as pd
import torch
from anndata import AnnData
from scvi import REGISTRY_KEYS
from scvi... | 39.466397 | 132 | 0.603311 |
7950c4f957285b61671a169327c06f57bf87a302 | 1,086 | py | Python | scripts/migrate_promed_ids.py | ecohealthalliance/portfolio-manager | dae8e9354a2dec80c5f2c4b9d85a7fa7d192a51f | [
"Apache-2.0"
] | null | null | null | scripts/migrate_promed_ids.py | ecohealthalliance/portfolio-manager | dae8e9354a2dec80c5f2c4b9d85a7fa7d192a51f | [
"Apache-2.0"
] | null | null | null | scripts/migrate_promed_ids.py | ecohealthalliance/portfolio-manager | dae8e9354a2dec80c5f2c4b9d85a7fa7d192a51f | [
"Apache-2.0"
] | null | null | null | import argparse
import pymongo
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('-port', help='mongodb port', default=27017)
parser.add_argument('-db', help='mongodb db', default='meteor')
args = parser.parse_args()
db = pymongo.Connection('localhost', int(args.po... | 35.032258 | 89 | 0.633517 |
7950c55ee4b348f8adf2913952b20caf3497f38d | 6,747 | py | Python | tools/train_utils/train_utils.py | Bilal-A-Qureshi/OpenPCDet | 633c6026e56fc3fb2112f2a9f7ce08a21619e78f | [
"Apache-2.0"
] | null | null | null | tools/train_utils/train_utils.py | Bilal-A-Qureshi/OpenPCDet | 633c6026e56fc3fb2112f2a9f7ce08a21619e78f | [
"Apache-2.0"
] | null | null | null | tools/train_utils/train_utils.py | Bilal-A-Qureshi/OpenPCDet | 633c6026e56fc3fb2112f2a9f7ce08a21619e78f | [
"Apache-2.0"
] | null | null | null | import glob
import os
import torch
import tqdm
import time
from torch.nn.utils import clip_grad_norm_
from pcdet.utils import common_utils, commu_utils
def train_one_epoch(cur_epoch,model, optimizer, train_loader, model_func, lr_scheduler, accumulated_iter, optim_cfg,
rank, tbar, total_it_each_ep... | 39 | 132 | 0.641915 |
7950c56b3b62693f974cbcc5ab8686f30fa42cbe | 10,884 | py | Python | loopy/codegen/result.py | benSepanski/loopy | 5db582d579eb65ce58b93e2c53feb1d48404cf2d | [
"MIT"
] | null | null | null | loopy/codegen/result.py | benSepanski/loopy | 5db582d579eb65ce58b93e2c53feb1d48404cf2d | [
"MIT"
] | null | null | null | loopy/codegen/result.py | benSepanski/loopy | 5db582d579eb65ce58b93e2c53feb1d48404cf2d | [
"MIT"
] | null | null | null | from __future__ import division, absolute_import
__copyright__ = "Copyright (C) 2016 Andreas Kloeckner"
__license__ = """
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, incl... | 33.489231 | 84 | 0.630099 |
7950c5d229922e5a3130d40ad166807b1b1e793e | 25,099 | py | Python | shed/tests/test_simple.py | st3107/shed-streaming | c632fc465d7e11fe0155fbc3e8add1965615dd51 | [
"BSD-3-Clause"
] | 4 | 2017-09-20T16:26:34.000Z | 2020-03-24T15:51:28.000Z | shed/tests/test_simple.py | st3107/shed-streaming | c632fc465d7e11fe0155fbc3e8add1965615dd51 | [
"BSD-3-Clause"
] | 172 | 2017-07-25T21:36:12.000Z | 2022-02-25T16:05:36.000Z | shed/tests/test_simple.py | st3107/shed-streaming | c632fc465d7e11fe0155fbc3e8add1965615dd51 | [
"BSD-3-Clause"
] | 6 | 2017-08-08T12:39:18.000Z | 2021-03-29T22:28:47.000Z | import operator as op
import time
import uuid
import networkx as nx
import numpy as np
import pytest
from bluesky.plan_stubs import checkpoint, abs_set, trigger_and_read
from bluesky.plans import scan, count
from shed import (
SimpleFromEventStream as FromEventStream,
SimpleToEventStream as ToEventStream,
... | 27.611661 | 79 | 0.538229 |
7950c5ecbb2b96efd47c2c67c6807f7824ea1012 | 350 | py | Python | src/data/save_npy.py | paristsai/jdata | bb8839d7f7a4a10f3ebcdd8f4d1ce2fa29562868 | [
"BSD-3-Clause"
] | 3 | 2019-12-05T12:04:05.000Z | 2020-09-27T15:54:02.000Z | src/data/save_npy.py | paristsai/jdata | bb8839d7f7a4a10f3ebcdd8f4d1ce2fa29562868 | [
"BSD-3-Clause"
] | 3 | 2020-03-24T16:24:54.000Z | 2021-04-30T20:38:32.000Z | src/data/save_npy.py | paristsai/jdata | bb8839d7f7a4a10f3ebcdd8f4d1ce2fa29562868 | [
"BSD-3-Clause"
] | 1 | 2020-11-06T12:02:37.000Z | 2020-11-06T12:02:37.000Z | import numpy as np
import pandas as pd
from .. import DATA_DIR
def main():
interim_path = DATA_DIR.joinpath("interim")
df = pd.read_csv("{0}/All_Action.csv".format(interim_path))
np.save("{0}/All_Action.npy".format(interim_path), df.values)
print("{0}/All_Action.npy".format(interim_path))
if __nam... | 20.588235 | 65 | 0.685714 |
7950c66d4ac999889e47b6a2d0dd10c1e6ab339f | 988 | py | Python | lib/procedures/__init__.py | shashank3959/NAS-Projects | 2c0577231a52375de5ebd7a588750899a8c7bf1c | [
"MIT"
] | 923 | 2020-01-11T06:36:53.000Z | 2022-03-31T00:26:57.000Z | lib/procedures/__init__.py | shashank3959/NAS-Projects | 2c0577231a52375de5ebd7a588750899a8c7bf1c | [
"MIT"
] | 25 | 2020-02-27T08:35:46.000Z | 2022-01-25T08:54:19.000Z | lib/procedures/__init__.py | shashank3959/NAS-Projects | 2c0577231a52375de5ebd7a588750899a8c7bf1c | [
"MIT"
] | 262 | 2020-01-02T02:19:40.000Z | 2022-03-23T04:56:16.000Z | ##################################################
# Copyright (c) Xuanyi Dong [GitHub D-X-Y], 2019 #
##################################################
from .starts import prepare_seed, prepare_logger, get_machine_info, save_checkpoint, copy_checkpoint
from .optimizers import get_optim_scheduler
def get_procedure... | 42.956522 | 104 | 0.638664 |
7950c6a58edb9315a8cc2c844ca7c29e06741e17 | 3,468 | py | Python | atomate/vasp/workflows/tests/test_insertion_workflow.py | fraricci/atomate | ac8997888d79730a697aa166d5bcd516a7222d01 | [
"BSD-3-Clause-LBNL"
] | null | null | null | atomate/vasp/workflows/tests/test_insertion_workflow.py | fraricci/atomate | ac8997888d79730a697aa166d5bcd516a7222d01 | [
"BSD-3-Clause-LBNL"
] | null | null | null | atomate/vasp/workflows/tests/test_insertion_workflow.py | fraricci/atomate | ac8997888d79730a697aa166d5bcd516a7222d01 | [
"BSD-3-Clause-LBNL"
] | null | null | null | import os
from pathlib import Path
from fireworks.core.fworker import FWorker
from fireworks.core.rocket_launcher import rapidfire
from pymatgen.analysis.structure_matcher import StructureMatcher
from pymatgen.core import Structure
from atomate.utils.testing import AtomateTest
from atomate.vasp.powerups import add_mo... | 32.716981 | 84 | 0.589677 |
7950c78654d47be41b7b2de9651955303c8e996a | 6,082 | py | Python | markdown_generator/pubsFromBib.py | yal054/yal054 | 9571edd48a08ba4eed2114fa2da5b8cfdd01cb6a | [
"MIT"
] | 4 | 2022-01-07T04:01:02.000Z | 2022-01-17T06:04:59.000Z | markdown_generator/pubsFromBib.py | yal054/yal054.github.io | 9571edd48a08ba4eed2114fa2da5b8cfdd01cb6a | [
"MIT"
] | null | null | null | markdown_generator/pubsFromBib.py | yal054/yal054.github.io | 9571edd48a08ba4eed2114fa2da5b8cfdd01cb6a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Publications markdown generator for academicpages
#
# Takes a set of bibtex of publications and converts them for use with [academicpages.github.io](academicpages.github.io). This is an interactive Jupyter notebook ([see more info here](http://jupyter-notebook-beginner-guide.... | 37.776398 | 273 | 0.522525 |
7950c8abffdf651641ee1e67d40958089d53c6ea | 12,335 | py | Python | opsgenie_swagger/models/pingdom_v2_integration.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | null | null | null | opsgenie_swagger/models/pingdom_v2_integration.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | null | null | null | opsgenie_swagger/models/pingdom_v2_integration.py | Logicworks/opsgenie-python-sdk | 244c4c40ddcc25e70df5ba4425ab8d7c8da59c18 | [
"Apache-2.0"
] | 1 | 2020-11-07T11:27:13.000Z | 2020-11-07T11:27:13.000Z | # coding: utf-8
"""
OpsGenie REST API
OpsGenie OpenAPI Specification # noqa: E501
OpenAPI spec version: 2.0.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from opsgenie_swagger.models.integration import Integration # ... | 38.789308 | 265 | 0.681232 |
7950c906c06a92f8d60f92c22ba73aecc73fdf56 | 4,704 | py | Python | mantichora/main.py | alphatwirl/mantichora | f1d15090b5e5a55c3553cd1692d7097178e10599 | [
"BSD-3-Clause"
] | 13 | 2019-07-30T08:30:44.000Z | 2021-02-11T22:25:29.000Z | mantichora/main.py | alphatwirl/mantichora | f1d15090b5e5a55c3553cd1692d7097178e10599 | [
"BSD-3-Clause"
] | 5 | 2019-03-13T11:11:32.000Z | 2021-05-31T21:56:10.000Z | mantichora/main.py | alphatwirl/mantichora | f1d15090b5e5a55c3553cd1692d7097178e10599 | [
"BSD-3-Clause"
] | 1 | 2021-04-20T11:09:07.000Z | 2021-04-20T11:09:07.000Z | # Tai Sakuma <tai.sakuma@gmail.com>
import functools
from .hubmp import MultiprocessingHub, mp_start_method_default
from .hubthreading import ThreadingHub
##__________________________________________________________________||
class mantichora:
"""A simple interface to multiprocessing and threading
https://gi... | 30.348387 | 133 | 0.617772 |
7950ca26f64be74e307cae891bf9e5c8cfb8892b | 1,817 | py | Python | akaocr/tools/train_recog.py | qai-research/Efficient_Text_Detection | e5cfe51148cc4fbf4c4f3afede040e4ebd624e8b | [
"MIT"
] | 2 | 2021-04-28T04:13:09.000Z | 2021-06-05T04:11:11.000Z | akaocr/tools/train_recog.py | qai-research/Efficient_Text_Detection | e5cfe51148cc4fbf4c4f3afede040e4ebd624e8b | [
"MIT"
] | 2 | 2021-05-06T13:49:52.000Z | 2021-05-14T08:45:13.000Z | akaocr/tools/train_recog.py | qai-research/Efficient_Text_Detection | e5cfe51148cc4fbf4c4f3afede040e4ebd624e8b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
_____________________________________________________________________________
Created By : Nguyen Huu Kim - Kimnh3
Created Date: Mar 31, 2021 6:31pm GMT+0700
Project : AkaOCR core
_____________________________________________________________________________
This file contain code for train... | 37.081633 | 120 | 0.764997 |
7950cad0aba338a20fa6a2472a1de11213f1c4d7 | 1,031 | py | Python | py/py_0733_ascending_subsequences.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | py/py_0733_ascending_subsequences.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | py/py_0733_ascending_subsequences.py | lcsm29/project-euler | fab794ece5aa7a11fc7c2177f26250f40a5b1447 | [
"MIT"
] | null | null | null | # Solution of;
# Project Euler Problem 733: Ascending subsequences
# https://projecteuler.net/problem=733
#
# Let $a_i$ be the sequence defined by $a_i=153^i \bmod 10\,000\,019$ for $i
# \ge 1$. The first terms of $a_i$ are:$153, 23409, 3581577, 7980255, 976697,
# 9434375, \dots$Consider the subsequences consisting ... | 35.551724 | 78 | 0.685742 |
7950ccac069280e3929efd1c7f46727119645f31 | 4,826 | py | Python | ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/historyserver.py | Syndra/Ambari-source | 717526b2bf3636622212b14de0d3d298a20c7370 | [
"Apache-2.0"
] | 5 | 2017-07-20T11:15:10.000Z | 2020-04-16T15:42:55.000Z | ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/historyserver.py | Syndra/Ambari-source | 717526b2bf3636622212b14de0d3d298a20c7370 | [
"Apache-2.0"
] | 8 | 2020-06-18T17:31:19.000Z | 2022-03-02T08:32:03.000Z | ambari-server/src/main/resources/common-services/YARN/2.1.0.2.0/package/scripts/historyserver.py | Syndra/Ambari-source | 717526b2bf3636622212b14de0d3d298a20c7370 | [
"Apache-2.0"
] | 12 | 2017-05-17T09:48:01.000Z | 2021-08-05T19:01:25.000Z | """
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this ... | 37.123077 | 114 | 0.779113 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.