hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
720badc8342a8777d1052bba1e6430c44f634e25 | 1,809 | py | Python | aita/auth.py | ze-lin/AITA | 0f2fe4e630c37fcc566a54621880b78ec67eefa6 | [
"MIT"
] | null | null | null | aita/auth.py | ze-lin/AITA | 0f2fe4e630c37fcc566a54621880b78ec67eefa6 | [
"MIT"
] | null | null | null | aita/auth.py | ze-lin/AITA | 0f2fe4e630c37fcc566a54621880b78ec67eefa6 | [
"MIT"
] | 1 | 2020-12-29T19:45:28.000Z | 2020-12-29T19:45:28.000Z | import datetime, base64, functools
from flask import Blueprint, g, request, session, jsonify, render_template
from aita.db import get_collection
bp = Blueprint('auth', __name__, url_prefix='/auth')
@bp.route('/signup', methods=['POST'])
def sign_up():
MEMBER = get_collection('member')
result = MEMBER.find_o... | 24.780822 | 78 | 0.595909 |
4c0809bfbc5bbe4cc151050f60a215fb3ff072dd | 4,940 | py | Python | library/k8s_v1_component_status_list.py | ansible/ansible-kubernetes-modules- | b5c7a85de6173c2f6141f19a130ff37b1fdafbf6 | [
"Apache-2.0"
] | 91 | 2017-03-23T03:46:43.000Z | 2021-06-03T18:30:03.000Z | library/k8s_v1_component_status_list.py | ansible/ansible-kubernetes-modules- | b5c7a85de6173c2f6141f19a130ff37b1fdafbf6 | [
"Apache-2.0"
] | 28 | 2017-06-02T18:21:13.000Z | 2020-01-29T22:33:05.000Z | library/k8s_v1_component_status_list.py | ansible/ansible-kubernetes-modules- | b5c7a85de6173c2f6141f19a130ff37b1fdafbf6 | [
"Apache-2.0"
] | 40 | 2017-03-23T03:46:45.000Z | 2022-02-01T14:29:21.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
from ansible.module_utils.k8s_common import KubernetesAnsibleModule, KubernetesAnsibleException
DOCUMENTATION = '''
module: k8s_v1_component_status_list
short_description: Kubernetes ComponentStatusList
description:
- Retrieve a list of component_status. List operations provi... | 31.265823 | 100 | 0.652632 |
6a434cb0184d36c03e7163fa656314a95b70e8c3 | 5,183 | py | Python | backend/models.py | telemahos/decaf | b891f937b176bcf0edb0b0d99b8fd1c87eac1996 | [
"Apache-2.0"
] | null | null | null | backend/models.py | telemahos/decaf | b891f937b176bcf0edb0b0d99b8fd1c87eac1996 | [
"Apache-2.0"
] | null | null | null | backend/models.py | telemahos/decaf | b891f937b176bcf0edb0b0d99b8fd1c87eac1996 | [
"Apache-2.0"
] | null | null | null | from sqlalchemy import Column, Boolean, Integer, String, ForeignKey, Date, Float
from sqlalchemy.orm import relationship
from .database import Base
class Notes(Base):
__tablename__ = 'notes'
id = Column(Integer, primary_key=True, index=True)
date = Column(Date, index=True)
title = Column(String, index ... | 35.258503 | 86 | 0.693807 |
93ef979cf96b2d1ec5a23232a6f8671378363248 | 35,277 | py | Python | nova/conductor/manager.py | larsbutler/nova | fb190f30a911658d8b0c4deaf43cbb8c9e35b672 | [
"Apache-2.0"
] | null | null | null | nova/conductor/manager.py | larsbutler/nova | fb190f30a911658d8b0c4deaf43cbb8c9e35b672 | [
"Apache-2.0"
] | null | null | null | nova/conductor/manager.py | larsbutler/nova | fb190f30a911658d8b0c4deaf43cbb8c9e35b672 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 IBM Corp.
#
# 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 agree... | 49.407563 | 79 | 0.587011 |
8efdb885a680cab0421fed10a80c0e09050debcf | 260 | py | Python | manage.py | benstreb/daily-interesting | bac71fa54a1eb4e139d38af4e22fe38a69fee2cb | [
"MIT"
] | null | null | null | manage.py | benstreb/daily-interesting | bac71fa54a1eb4e139d38af4e22fe38a69fee2cb | [
"MIT"
] | null | null | null | manage.py | benstreb/daily-interesting | bac71fa54a1eb4e139d38af4e22fe38a69fee2cb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "daily_interesting.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 23.636364 | 81 | 0.780769 |
5be420ba88ad39038f57b0e6cf80034293984036 | 27,310 | py | Python | examples/slim/nets/resnet_v1_test.py | MohammadChalaki/morph-net | 83addae677195b4beba34a321ccf9c0cd55d5b62 | [
"Apache-2.0"
] | 1,061 | 2019-03-12T20:35:41.000Z | 2022-02-08T00:00:33.000Z | examples/slim/nets/resnet_v1_test.py | MohammadChalaki/morph-net | 83addae677195b4beba34a321ccf9c0cd55d5b62 | [
"Apache-2.0"
] | 67 | 2019-03-16T18:50:59.000Z | 2021-09-03T13:28:42.000Z | examples/slim/nets/resnet_v1_test.py | MohammadChalaki/morph-net | 83addae677195b4beba34a321ccf9c0cd55d5b62 | [
"Apache-2.0"
] | 168 | 2019-03-23T09:36:39.000Z | 2022-01-16T12:19:33.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 43.14376 | 80 | 0.598352 |
4ec77e6966e59b21687824e61f31b4a8a63461da | 17,509 | py | Python | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/pci_device.py | riddopic/config | 59f027fc42e2b34d9609c5fd6ec956b46a480235 | [
"Apache-2.0"
] | 10 | 2020-02-07T18:57:44.000Z | 2021-09-11T10:29:34.000Z | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/pci_device.py | riddopic/config | 59f027fc42e2b34d9609c5fd6ec956b46a480235 | [
"Apache-2.0"
] | 1 | 2021-01-14T12:01:55.000Z | 2021-01-14T12:01:55.000Z | sysinv/sysinv/sysinv/sysinv/api/controllers/v1/pci_device.py | riddopic/config | 59f027fc42e2b34d9609c5fd6ec956b46a480235 | [
"Apache-2.0"
] | 10 | 2020-10-13T08:37:46.000Z | 2022-02-09T00:21:25.000Z | # Copyright (c) 2015-2021 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
import jsonpatch
import pecan
from pecan import rest
import wsme
from wsme import types as wtypes
import wsmeext.pecan as wsme_pecan
from ast import literal_eval
from oslo_log import log
from sysinv._i18n import _
from sysinv... | 39.613122 | 99 | 0.585642 |
ba0aef25b83ff2be9ff3420c49e1946139569ad8 | 1,057 | py | Python | bloodhound_dashboard/bhdashboard/tests/widgets/__init__.py | beebopkim/bloodhound | 1a1d3c88309136229f4b64d9e75e0441a4c590e4 | [
"Apache-2.0"
] | 84 | 2015-01-07T03:42:53.000Z | 2022-01-10T11:57:30.000Z | bloodhound_dashboard/bhdashboard/tests/widgets/__init__.py | beebopkim/bloodhound | 1a1d3c88309136229f4b64d9e75e0441a4c590e4 | [
"Apache-2.0"
] | 1 | 2021-11-04T12:52:03.000Z | 2021-11-04T12:52:03.000Z | bloodhound_dashboard/bhdashboard/tests/widgets/__init__.py | isabella232/bloodhound-1 | c3e31294e68af99d4e040e64fbdf52394344df9e | [
"Apache-2.0"
] | 35 | 2015-01-06T11:30:27.000Z | 2021-11-10T16:34:52.000Z | # -*- coding: UTF-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (t... | 32.030303 | 63 | 0.741722 |
76af767e1c3fc5c5b10da38a714b4be10c297e7f | 712 | py | Python | astropy/wcs/wcsapi/tests/test_low_level_api.py | PriyankaH21/astropy | 159fb9637ce4acdc60329d20517ed3dc7ba79581 | [
"BSD-3-Clause"
] | null | null | null | astropy/wcs/wcsapi/tests/test_low_level_api.py | PriyankaH21/astropy | 159fb9637ce4acdc60329d20517ed3dc7ba79581 | [
"BSD-3-Clause"
] | 1 | 2018-11-14T14:18:55.000Z | 2020-01-21T10:36:05.000Z | astropy/wcs/wcsapi/tests/test_low_level_api.py | PriyankaH21/astropy | 159fb9637ce4acdc60329d20517ed3dc7ba79581 | [
"BSD-3-Clause"
] | null | null | null | from pytest import raises
from ..low_level_api import validate_physical_types
def test_validate_physical_types():
# Check valid cases
validate_physical_types(['pos.eq.ra', 'pos.eq.ra'])
validate_physical_types(['spect.dopplerVeloc.radio', 'custom:spam'])
validate_physical_types(['time', None])
... | 32.363636 | 72 | 0.70927 |
a344fe938d109d99ec93b24717421e2b356a87bc | 399 | py | Python | utils/hardware_controller/wrappers.py | skal1ozz/AI-WordOfWarcraft-Bot | 1d9659e76d1107909d6ca27b573d0dd83a25fce4 | [
"Apache-2.0"
] | null | null | null | utils/hardware_controller/wrappers.py | skal1ozz/AI-WordOfWarcraft-Bot | 1d9659e76d1107909d6ca27b573d0dd83a25fce4 | [
"Apache-2.0"
] | null | null | null | utils/hardware_controller/wrappers.py | skal1ozz/AI-WordOfWarcraft-Bot | 1d9659e76d1107909d6ca27b573d0dd83a25fce4 | [
"Apache-2.0"
] | null | null | null | from .abstract_backend import AbstractBackend
def wrapper_backend_required(fn):
def wr(self, *args, **kwargs):
backend = getattr(self, 'backend', None)
if not isinstance(backend, AbstractBackend):
raise AttributeError('Backend should be a child of '
'Ab... | 33.25 | 64 | 0.626566 |
b9f43c5a9fbd87f85add6feeb941295158bdae9e | 3,162 | py | Python | main/utilities_v2/infrastructure_as_code/build_spec_to_cloud.py | emerginganalytics/cyberarena | 311d179a30017285571f65752eaa91b78c7097aa | [
"MIT"
] | 2 | 2022-01-24T20:15:08.000Z | 2022-01-24T20:15:25.000Z | main/utilities_v2/infrastructure_as_code/build_spec_to_cloud.py | emerginganalytics/cyberarena | 311d179a30017285571f65752eaa91b78c7097aa | [
"MIT"
] | 26 | 2021-12-23T19:37:27.000Z | 2022-03-28T04:03:41.000Z | main/utilities_v2/infrastructure_as_code/build_spec_to_cloud.py | emerginganalytics/cyberarena | 311d179a30017285571f65752eaa91b78c7097aa | [
"MIT"
] | null | null | null | """
Parses yaml according to version 2 of the Cyber Arena specification and stores a build structure in the cloud datastore.
We use marshmallow to perform serializer validation only. We define the required schemas in WorkoutComputeSchema,
WorkoutContainerSchema, ArenaSchema, and perhaps more. New fields in the yaml sh... | 47.19403 | 120 | 0.728969 |
511d9c6371ab4661901f93033472cbc5d8de1ab6 | 13,232 | py | Python | SNPLIB/snplib.py | VasLem/SNPLIB | aea1cb943a7db22faa592a53cf1132561ce50c4e | [
"BSD-3-Clause"
] | 2 | 2019-11-21T04:55:13.000Z | 2021-10-05T18:01:23.000Z | SNPLIB/snplib.py | VasLem/SNPLIB | aea1cb943a7db22faa592a53cf1132561ce50c4e | [
"BSD-3-Clause"
] | null | null | null | SNPLIB/snplib.py | VasLem/SNPLIB | aea1cb943a7db22faa592a53cf1132561ce50c4e | [
"BSD-3-Clause"
] | 1 | 2022-02-17T17:20:24.000Z | 2022-02-17T17:20:24.000Z | """SNPLIB class Module
This module contains the definition of SNPLIB class and some supportive methods.
Example
-------
Notes
-----
"""
import math
import re
import numpy as np
import numpy.linalg as npl
import pandas as pd
from copy import deepcopy
from scipy.stats import t, chi2, f
from multiprocessing import cpu_... | 35.098143 | 117 | 0.593183 |
cfa2898c4fb053e99a06848a322a8c26f5397eb4 | 10,398 | py | Python | watchman/integration/eden/test_eden_pathgen.py | chadaustin/watchman | b01a841f3eca5ebaf5ce4a62e1937c95851f450e | [
"MIT"
] | 9,308 | 2015-01-03T13:33:47.000Z | 2022-03-31T06:45:26.000Z | watchman/integration/eden/test_eden_pathgen.py | 00mjk/watchman | eb22a60e74f04065e24eb51ba1dd1342d66f2ad6 | [
"MIT"
] | 878 | 2015-01-07T15:28:33.000Z | 2022-03-30T09:30:10.000Z | watchman/integration/eden/test_eden_pathgen.py | 00mjk/watchman | eb22a60e74f04065e24eb51ba1dd1342d66f2ad6 | [
"MIT"
] | 932 | 2015-01-05T08:25:00.000Z | 2022-03-25T11:11:42.000Z | # vim:ts=4:sw=4:et:
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
# no unicode literals
from __future__ import absolute_import, division, print_function
import os
import pywatchman
impor... | 35.855172 | 88 | 0.513464 |
4ecf99c3ba68768287b6fb5dda2748645e03c941 | 2,488 | py | Python | utils/deploy/geoapp/makelocalcfg.py | d3m-purdue/geoapp | 9d848688b988ec43cb0fe4f11650bbeb7779220e | [
"Apache-2.0"
] | null | null | null | utils/deploy/geoapp/makelocalcfg.py | d3m-purdue/geoapp | 9d848688b988ec43cb0fe4f11650bbeb7779220e | [
"Apache-2.0"
] | null | null | null | utils/deploy/geoapp/makelocalcfg.py | d3m-purdue/geoapp | 9d848688b988ec43cb0fe4f11650bbeb7779220e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
rootPath = os.environ['KWDEMO_KEY']
data = {
'LIMITED': os.environ.get('LIMITED_DATA', '') == 'true',
'LOCAL': os.environ.get('LIMITED_DATA', '') == 'local',
'FULL': True
}
for key in data:
if data[key] and key != 'FULL':
data['FULL'] = ... | 35.042254 | 191 | 0.65836 |
26cd1b2e58c7eb6ac59ef37eb4b1ce490f4bb9ec | 6,977 | py | Python | assignment/assignment3/python/task1/task1_dev.py | maple1eaf/data_mining_inf553 | fba0c19f46aac5882e103dbe53155e7128a9290f | [
"MIT"
] | 1 | 2021-05-04T05:17:57.000Z | 2021-05-04T05:17:57.000Z | assignment/assignment3/python/task1/task1_dev.py | maple1eaf/data_mining_inf553 | fba0c19f46aac5882e103dbe53155e7128a9290f | [
"MIT"
] | null | null | null | assignment/assignment3/python/task1/task1_dev.py | maple1eaf/data_mining_inf553 | fba0c19f46aac5882e103dbe53155e7128a9290f | [
"MIT"
] | 1 | 2021-09-24T08:17:23.000Z | 2021-09-24T08:17:23.000Z | """
spark-submit task1.py <input_file> <output_file>
spark-submit task1_dev.py "file:///Users/markduan/duan/USC_course/USC_APDS/INF553/homework/hw3/data/train_review.json" "./output/task1_dev_output.json"
"""
import sys
import time
import json
import random
from pyspark import SparkConf, SparkContext
# for run on v... | 26.033582 | 151 | 0.578902 |
8a5628670ca908b9dfde19eaedbbd15b104e061f | 4,752 | py | Python | conpaas-services/src/conpaas/core/clouds/base.py | bopopescu/conpaas-1 | cea3c02f499a729464697de7cf98c2041febc0ab | [
"BSD-3-Clause"
] | 1 | 2015-08-03T03:57:06.000Z | 2015-08-03T03:57:06.000Z | conpaas-services/src/conpaas/core/clouds/base.py | bopopescu/conpaas-1 | cea3c02f499a729464697de7cf98c2041febc0ab | [
"BSD-3-Clause"
] | null | null | null | conpaas-services/src/conpaas/core/clouds/base.py | bopopescu/conpaas-1 | cea3c02f499a729464697de7cf98c2041febc0ab | [
"BSD-3-Clause"
] | 2 | 2017-05-27T09:07:53.000Z | 2020-07-26T03:15:55.000Z | # -*- coding: utf-8 -*-
"""
conpaas.core.clouds.base
========================
ConPaaS core: cloud-independent IaaS code.
:copyright: (C) 2010-2013 by Contrail Consortium.
"""
from conpaas.core.node import ServiceNode
from conpaas.core.log import create_logger
class Cloud:
''' Abstract Cloud '''... | 30.857143 | 79 | 0.608375 |
3f6dba3bcd5c4ebc2983a38da5d37c7a236f7bd0 | 20,531 | py | Python | servers/unity/src/win/tango_pygame.py | arpitgogia/mars_city | 30cacd80487a8c2354bbc15b4fad211ed1cb4f9d | [
"BSD-2-Clause-FreeBSD"
] | 25 | 2016-07-20T04:49:14.000Z | 2021-08-25T09:05:04.000Z | servers/unity/src/win/tango_pygame.py | arpitgogia/mars_city | 30cacd80487a8c2354bbc15b4fad211ed1cb4f9d | [
"BSD-2-Clause-FreeBSD"
] | 16 | 2016-12-27T08:30:27.000Z | 2018-06-18T08:51:44.000Z | servers/unity/src/win/tango_pygame.py | arpitgogia/mars_city | 30cacd80487a8c2354bbc15b4fad211ed1cb4f9d | [
"BSD-2-Clause-FreeBSD"
] | 49 | 2016-07-20T13:08:27.000Z | 2020-06-02T18:26:12.000Z | import argparse
import ctypes
import sys
import PyTango
import numpy
import pygame
from PyTango.server import Device, DeviceMeta, attribute
from pykinect2 import *
from pykinect2 import PyKinectRuntime
from pykinect2 import PyKinectV2
import _ctypes
import threading
import time
KINECT_FPS = 30
if sys.he... | 45.222467 | 130 | 0.612683 |
a9bb58fc9d1e7ccb23d15e8200e8d09450955908 | 8,290 | py | Python | torchvision/models/shufflenetv2.py | ZJUGuoShuai/vision | a9940fe4b2b63bd82a2f853616e00fd0bd112f9a | [
"BSD-3-Clause"
] | 3 | 2021-10-30T10:13:40.000Z | 2021-12-12T10:26:14.000Z | torchvision/models/shufflenetv2.py | ZJUGuoShuai/vision | a9940fe4b2b63bd82a2f853616e00fd0bd112f9a | [
"BSD-3-Clause"
] | null | null | null | torchvision/models/shufflenetv2.py | ZJUGuoShuai/vision | a9940fe4b2b63bd82a2f853616e00fd0bd112f9a | [
"BSD-3-Clause"
] | 1 | 2020-01-10T12:50:14.000Z | 2020-01-10T12:50:14.000Z | from typing import Callable, Any, List
import torch
import torch.nn as nn
from torch import Tensor
from .._internally_replaced_utils import load_state_dict_from_url
__all__ = ["ShuffleNetV2", "shufflenet_v2_x0_5", "shufflenet_v2_x1_0", "shufflenet_v2_x1_5", "shufflenet_v2_x2_0"]
model_urls = {
"shufflenetv2_x0... | 37.511312 | 115 | 0.634741 |
55b6688029abd4e4424759b411ebdffcf832abb5 | 2,189 | py | Python | test.py | e-rus/bumps | 080ff80f939f3edf54a1fdc425e3f333d42ee8c4 | [
"MIT"
] | null | null | null | test.py | e-rus/bumps | 080ff80f939f3edf54a1fdc425e3f333d42ee8c4 | [
"MIT"
] | null | null | null | test.py | e-rus/bumps | 080ff80f939f3edf54a1fdc425e3f333d42ee8c4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Run tests for bumps.
Usage:
./test.py
- run all tests
./test.py --with-coverage
- run all tests with coverage report
"""
import os
import sys
import subprocess
from glob import glob
import nose
from distutils.util import get_platform
platform = '.%s-%s' % (get_platform(), sys.ver... | 25.453488 | 73 | 0.658748 |
b8f8619f73414e37cb8dc6621819db6b442dcfa3 | 18,296 | py | Python | mvlearn/semi_supervised/ctclassifier.py | Gauravsinghal09/mvlearn | 81092120595fadfc3d1f624d0a772594d8bb1578 | [
"Apache-2.0"
] | 1 | 2020-12-29T15:41:29.000Z | 2020-12-29T15:41:29.000Z | mvlearn/semi_supervised/ctclassifier.py | Gauravsinghal09/mvlearn | 81092120595fadfc3d1f624d0a772594d8bb1578 | [
"Apache-2.0"
] | null | null | null | mvlearn/semi_supervised/ctclassifier.py | Gauravsinghal09/mvlearn | 81092120595fadfc3d1f624d0a772594d8bb1578 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 NeuroData (http://neurodata.io)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | 39.346237 | 78 | 0.595267 |
b97a7c6a2fddbc915914b6b5f474484b092b1931 | 4,176 | py | Python | home_portal/kookboek/database.py | Runner-42/HomePortal | 011bc6752e3212c151401139dbfe8d46ead985ad | [
"MIT"
] | null | null | null | home_portal/kookboek/database.py | Runner-42/HomePortal | 011bc6752e3212c151401139dbfe8d46ead985ad | [
"MIT"
] | null | null | null | home_portal/kookboek/database.py | Runner-42/HomePortal | 011bc6752e3212c151401139dbfe8d46ead985ad | [
"MIT"
] | null | null | null | '''Database Models for the Kookboek application'''
from home_portal.extensions import db_kookboek as db
class RecipesIngredients(db.Model):
'''
The RecipiesIngredients class defines the attributes
required to create a many-to-many relationship between recipes
and ingredients.
It also contains the ... | 23.2 | 81 | 0.564416 |
40bc299cc3be7154fb9e60a77b6996d238e91266 | 3,530 | py | Python | __init__.py | slashx57/ipx800 | b6ee9b6f316afb24a3d236bca0d7f4ac6101e10c | [
"MIT"
] | null | null | null | __init__.py | slashx57/ipx800 | b6ee9b6f316afb24a3d236bca0d7f4ac6101e10c | [
"MIT"
] | 1 | 2020-10-27T06:19:58.000Z | 2020-10-27T12:37:41.000Z | __init__.py | slashx57/ipx800 | b6ee9b6f316afb24a3d236bca0d7f4ac6101e10c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 *-*
import sys
import logging
import voluptuous as vol
from threading import Lock
# Import the device class from the component that you want to support
from homeassistant.const import CONF_HOST, CONF_API_KEY, CONF_PORT, CONF_USERNAME, CONF_PASSWORD
import homeassistant.helpers.config_validation as... | 30.695652 | 96 | 0.6983 |
dce594e56d0b644ca22dae7c7059b28d282ec44c | 155 | py | Python | bin/django-admin.py | Ao99/try-django | 645d965c25752e6d0ca1f400c5ee1b719f564802 | [
"MIT"
] | null | null | null | bin/django-admin.py | Ao99/try-django | 645d965c25752e6d0ca1f400c5ee1b719f564802 | [
"MIT"
] | null | null | null | bin/django-admin.py | Ao99/try-django | 645d965c25752e6d0ca1f400c5ee1b719f564802 | [
"MIT"
] | null | null | null | #!/home/ubuntu/environment/TryDjango/bin/python3
from django.core import management
if __name__ == "__main__":
management.execute_from_command_line()
| 25.833333 | 48 | 0.793548 |
83b7e601b7e570eeae9c23f307ddbcc27b2e015c | 172 | py | Python | aiorpc/__init__.py | brglng/aiorpc | 575a898e54e61cd73ec5cf2b48348e70cfaa5b41 | [
"WTFPL"
] | 66 | 2016-10-17T19:16:44.000Z | 2022-02-26T01:10:06.000Z | aiorpc/__init__.py | webclinic017/aiorpc | a46929d70f17a6a98ee8f071012656f57bcd073b | [
"WTFPL"
] | 25 | 2018-05-13T03:14:43.000Z | 2022-03-03T03:29:04.000Z | aiorpc/__init__.py | webclinic017/aiorpc | a46929d70f17a6a98ee8f071012656f57bcd073b | [
"WTFPL"
] | 20 | 2017-09-13T17:04:21.000Z | 2022-02-03T12:26:25.000Z | from aiorpc.client import RPCClient
from aiorpc.server import *
__all__ = ['RPCClient', 'RPCServer', 'register', 'msgpack_init', 'set_timeout', 'serve', 'register_class']
| 34.4 | 106 | 0.744186 |
34775be6ea07f6e8a518f900f4e55f7c07504765 | 7,274 | py | Python | fuji_server/models/formal_metadata.py | FAIRsFAIR/fuji | 71b771ec29b4a4405720b87a32631d05f4543a7b | [
"MIT"
] | null | null | null | fuji_server/models/formal_metadata.py | FAIRsFAIR/fuji | 71b771ec29b4a4405720b87a32631d05f4543a7b | [
"MIT"
] | null | null | null | fuji_server/models/formal_metadata.py | FAIRsFAIR/fuji | 71b771ec29b4a4405720b87a32631d05f4543a7b | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from fuji_server.models.base_model_ import Model
from fuji_server.models.debug import Debug # noqa: F401,E501
from fuji_server.models.fair_result_common import FAIRRes... | 30.691983 | 222 | 0.631152 |
e6ab7102e55dec6cf4044bb3191474f552bd6bb6 | 11,559 | py | Python | solvers/prepare.py | brandhsn/pysat | 95f2dd9760091bf3453ba6c0c7c12172cffefbb7 | [
"MIT"
] | null | null | null | solvers/prepare.py | brandhsn/pysat | 95f2dd9760091bf3453ba6c0c7c12172cffefbb7 | [
"MIT"
] | null | null | null | solvers/prepare.py | brandhsn/pysat | 95f2dd9760091bf3453ba6c0c7c12172cffefbb7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-*- coding:utf-8 -*-
##
## prepare.py
##
## Created on: Jan 23, 2018
## Author: Alexey S. Ignatiev
## E-mail: aignatiev@ciencias.ulisboa.pt
##
#
#==============================================================================
from __future__ import print_function
import datetime
import... | 27.197647 | 101 | 0.487758 |
e1fd4c9ff52e3287262a64e2b108208e3ae67c18 | 158 | py | Python | engine/src/hopeit/server/runtime.py | pcanto-hopeit/hopeit.engine | c17b0438e56940a4d1b2f071cca90ae8b6f70629 | [
"Apache-2.0"
] | 15 | 2020-07-09T17:41:14.000Z | 2021-10-04T20:13:08.000Z | engine/src/hopeit/server/runtime.py | pcanto-hopeit/hopeit.engine | c17b0438e56940a4d1b2f071cca90ae8b6f70629 | [
"Apache-2.0"
] | 48 | 2020-07-10T15:16:17.000Z | 2022-03-03T19:46:46.000Z | engine/src/hopeit/server/runtime.py | pcanto-hopeit/hopeit.engine | c17b0438e56940a4d1b2f071cca90ae8b6f70629 | [
"Apache-2.0"
] | 3 | 2020-07-08T20:12:58.000Z | 2021-01-10T15:57:21.000Z | """
Server runtime: module to keep a reference to current runtime hopeit engine Server object
"""
from hopeit.server.engine import Server
server = Server()
| 19.75 | 89 | 0.765823 |
4a6e4556d2f19e3257d547aa7ffc1b38afd823e3 | 20,742 | py | Python | code_python/3-CameraCalibration/main.py | khanfarhan10/Computer-Vision-2 | 9ed58481e48d95f43464fb34d4da74ee0184bd14 | [
"MIT"
] | 1 | 2022-01-05T23:11:51.000Z | 2022-01-05T23:11:51.000Z | code_python/3-CameraCalibration/main.py | khanfarhan10/Computer-Vision-2 | 9ed58481e48d95f43464fb34d4da74ee0184bd14 | [
"MIT"
] | null | null | null | code_python/3-CameraCalibration/main.py | khanfarhan10/Computer-Vision-2 | 9ed58481e48d95f43464fb34d4da74ee0184bd14 | [
"MIT"
] | 2 | 2021-08-14T13:03:12.000Z | 2021-10-12T08:48:18.000Z | # region Imports
# ------------------------------------------------------------------------------
# Imports
# ------------------------------------------------------------------------------
import os
from typing import Union
from datetime import datetime
from pyrealsense2 import pyreal... | 37.989011 | 104 | 0.543631 |
6765eb37bdbb881a951bde4ad228361e913469b1 | 8,040 | py | Python | docs/conf.py | hassanobeid1994/tr_b_causal_2020 | 1ffaeb7dcefccf5e1f24c459e9a2f140b2a052a5 | [
"MIT"
] | null | null | null | docs/conf.py | hassanobeid1994/tr_b_causal_2020 | 1ffaeb7dcefccf5e1f24c459e9a2f140b2a052a5 | [
"MIT"
] | 89 | 2020-02-10T02:52:11.000Z | 2020-06-23T03:50:27.000Z | docs/conf.py | hassan-obeid/tr_b_causal_2020 | 1ffaeb7dcefccf5e1f24c459e9a2f140b2a052a5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Causal_Inference_Transportation documentation build configuration file, created by
# sphinx-quickstart.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All con... | 31.284047 | 84 | 0.701617 |
074279a742c1ca6ba48653ebaadc8507f7df174a | 190 | py | Python | test/test_cli.py | GochoMugo/remindme | 6cf2f94ce07ead754f1ee5976a7e7d7cbfa1a2e4 | [
"MIT"
] | 17 | 2015-05-02T22:58:07.000Z | 2017-04-17T06:33:43.000Z | test/test_cli.py | GochoMugo/remindme | 6cf2f94ce07ead754f1ee5976a7e7d7cbfa1a2e4 | [
"MIT"
] | 8 | 2015-02-14T16:22:27.000Z | 2016-10-26T13:15:19.000Z | test/test_cli.py | GochoMugo/remindme | 6cf2f94ce07ead754f1ee5976a7e7d7cbfa1a2e4 | [
"MIT"
] | 2 | 2016-02-26T10:47:56.000Z | 2019-10-09T05:49:51.000Z | '''
Tests against remindme's command-line runner
'''
import unittest
from remindme import cli
class Test_Cli(unittest.TestCase):
'''Tests against the Command-line Runner.'''
pass
| 15.833333 | 48 | 0.726316 |
17a66209bd2103b0fa62088d384d34cc7813ef49 | 105 | py | Python | PrototypeSystem/BackEnd/application/settings/prob.py | SEVulDet/SEVulDet | df56196067b249d9550cabd0315413c35c8ff420 | [
"MIT"
] | 1 | 2022-03-15T00:44:57.000Z | 2022-03-15T00:44:57.000Z | PrototypeSystem/BackEnd/application/settings/prob.py | SEVulDet/SEVulDet | df56196067b249d9550cabd0315413c35c8ff420 | [
"MIT"
] | null | null | null | PrototypeSystem/BackEnd/application/settings/prob.py | SEVulDet/SEVulDet | df56196067b249d9550cabd0315413c35c8ff420 | [
"MIT"
] | null | null | null | '''产品上线配置文件'''
from . import Config
class ProductionConfig(Config):
'''生产模式下的配置'''
DEBUG = False | 17.5 | 31 | 0.657143 |
a5c6e7f9a4b968b181604e312d5be8cd90fa3dbf | 30,539 | py | Python | dibs/server.py | phette23/dibs | 85dd630a95a36ded0acd87acb973139a5fd88742 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | dibs/server.py | phette23/dibs | 85dd630a95a36ded0acd87acb973139a5fd88742 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | dibs/server.py | phette23/dibs | 85dd630a95a36ded0acd87acb973139a5fd88742 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | '''
server.py: DIBS server definition.
Copyright
---------
Copyright (c) 2021 by the California Institute of Technology. This code
is open-source software released under a 3-clause BSD license. Please see the
file "LICENSE" for more information.
'''
from beaker.middleware import SessionMiddleware
import bottle
f... | 43.073343 | 93 | 0.62949 |
b87e692a19a88e824687aad7cdb6f012442f4772 | 6,526 | py | Python | misc/mysqlproxy.py | pzure/CyMySQL | a6133a150f58f6752a80a73c74cd3277a6dedcd8 | [
"MIT"
] | 1 | 2018-06-24T07:29:15.000Z | 2018-06-24T07:29:15.000Z | misc/mysqlproxy.py | pzure/CyMySQL | a6133a150f58f6752a80a73c74cd3277a6dedcd8 | [
"MIT"
] | null | null | null | misc/mysqlproxy.py | pzure/CyMySQL | a6133a150f58f6752a80a73c74cd3277a6dedcd8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
##############################################################################
#The MIT License (MIT)
#
#Copyright (c) 2016 Hajime Nakagami
#
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to dea... | 35.086022 | 84 | 0.631168 |
9dadca4e49d91502b41182da4677f0146db48fcf | 2,095 | py | Python | loading_scripts/frames_to_redis.py | cltl/LongTailAnnotation | 3c82873451f870ef1c2481a52f0fb881a7ce8631 | [
"Apache-2.0"
] | 2 | 2019-03-14T08:33:24.000Z | 2021-03-04T14:12:50.000Z | loading_scripts/frames_to_redis.py | cltl/LongTailAnnotation | 3c82873451f870ef1c2481a52f0fb881a7ce8631 | [
"Apache-2.0"
] | null | null | null | loading_scripts/frames_to_redis.py | cltl/LongTailAnnotation | 3c82873451f870ef1c2481a52f0fb881a7ce8631 | [
"Apache-2.0"
] | null | null | null | import json
import redis
import pickle
import sys
import pandas as pd
from collections import defaultdict
fle = 'data/all'
pool = redis.ConnectionPool(host='localhost', port=6379, db=0)
r = redis.Redis(connection_pool=pool)
def build_inc2que():
my_index = defaultdict(set)
subtasks=['1','2','3']
for s in ... | 26.1875 | 70 | 0.639141 |
bc7ee7fb500d08114f80eda3dd3c4e7fc1830729 | 1,545 | py | Python | example/auto-xp-candy.py | nagata-yoshiteru/Switch-Fightstick | 66685ff57c09444675e24c37455107eb529ce98a | [
"MIT"
] | 1 | 2020-04-07T05:12:47.000Z | 2020-04-07T05:12:47.000Z | example/auto-xp-candy.py | nagata-yoshiteru/Switch-Fightstick | 66685ff57c09444675e24c37455107eb529ce98a | [
"MIT"
] | null | null | null | example/auto-xp-candy.py | nagata-yoshiteru/Switch-Fightstick | 66685ff57c09444675e24c37455107eb529ce98a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import serial
from time import sleep
parser = argparse.ArgumentParser()
parser.add_argument('--port', default='COM4')
args = parser.parse_args()
ser = serial.Serial(args.port, 9600)
def send(msg, duration=0):
global ser
try:
ser.write(f'{msg}\r\n'.encode('utf-8')... | 27.105263 | 176 | 0.500324 |
515a94697c11b5b0b9813fd897f55fdb75eb130c | 10,445 | py | Python | msgraph-cli-extensions/v1_0/usersactions_v1_0/azext_usersactions_v1_0/vendored_sdks/usersactions/operations/_users_onenote_section_groups_sections_parent_notebook_sections_operations.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/v1_0/usersactions_v1_0/azext_usersactions_v1_0/vendored_sdks/usersactions/operations/_users_onenote_section_groups_sections_parent_notebook_sections_operations.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"MIT"
] | null | null | null | msgraph-cli-extensions/v1_0/usersactions_v1_0/azext_usersactions_v1_0/vendored_sdks/usersactions/operations/_users_onenote_section_groups_sections_parent_notebook_sections_operations.py | thewahome/msgraph-cli | 33127d9efa23a0e5f5303c93242fbdbb73348671 | [
"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 ... | 53.290816 | 247 | 0.713451 |
4c9ef2f0373d75071f70783cddb2ed019259f174 | 961 | py | Python | tremana/analysis/metrics.py | s-weigand/tremana | 98a8a546c79ce4f248b3955da21374edfdd61dee | [
"Apache-2.0"
] | 1 | 2022-03-07T02:52:25.000Z | 2022-03-07T02:52:25.000Z | tremana/analysis/metrics.py | s-weigand/tremana | 98a8a546c79ce4f248b3955da21374edfdd61dee | [
"Apache-2.0"
] | 9 | 2021-04-26T07:08:27.000Z | 2022-03-28T07:23:31.000Z | tremana/analysis/metrics.py | s-weigand/tremana | 98a8a546c79ce4f248b3955da21374edfdd61dee | [
"Apache-2.0"
] | null | null | null | """Module containing metrics to be calculated on tremor accelerometry data or their FFT."""
import numpy as np
import pandas as pd
def center_of_mass(fft_spectra: pd.DataFrame) -> pd.DataFrame:
r"""Calculate the center of mass of FFT spectra.
.. math::
H_{cm} = \dfrac{1}{N-1} \dfrac{\sum\limits_{i=... | 30.03125 | 98 | 0.648283 |
1011d173207d775882d348d00a438bdb465b58e3 | 2,762 | py | Python | tests/integration/mongodb/test_parties.py | vegaprotocol/social-media-verification | 5e2d23ff5781136de1692c4dc46b4bb02e588e65 | [
"MIT"
] | null | null | null | tests/integration/mongodb/test_parties.py | vegaprotocol/social-media-verification | 5e2d23ff5781136de1692c4dc46b4bb02e588e65 | [
"MIT"
] | 23 | 2021-03-31T10:19:54.000Z | 2021-10-29T23:55:34.000Z | tests/integration/mongodb/test_parties.py | vegaprotocol/social-media-verification | 5e2d23ff5781136de1692c4dc46b4bb02e588e65 | [
"MIT"
] | null | null | null | import pytest
from freezegun import freeze_time
from datetime import datetime, timezone, timedelta
from tools import setup_parties_collection
from services.smv_storage import SMVStorage
START_TIME = datetime(2021, 9, 13, 10, 34, 20, 1000, timezone.utc)
START_TIME_EPOCH = int(START_TIME.timestamp())
PUB_KEY = "cc3a591... | 29.073684 | 79 | 0.678856 |
80476526f7debf041ec2ef845aae6e9249da336a | 4,055 | py | Python | pypy/module/__builtin__/app_inspect.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 333 | 2015-08-08T18:03:38.000Z | 2022-03-22T18:13:12.000Z | pypy/module/__builtin__/app_inspect.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 7 | 2020-02-16T16:49:05.000Z | 2021-11-26T09:00:56.000Z | pypy/module/__builtin__/app_inspect.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 55 | 2015-08-16T02:41:30.000Z | 2022-03-20T20:33:35.000Z | """
Plain Python definition of the builtin functions related to run-time
program introspection.
"""
import sys
from __pypy__ import lookup_special
def _caller_locals():
return sys._getframe(0).f_locals
def vars(*obj):
"""Return a dictionary of all the attributes currently bound in obj. If
called with n... | 33.512397 | 79 | 0.631813 |
1e5f7509809284edb7aa6a8c63753d15a7aa6a66 | 4,110 | py | Python | TRMM/trmm_embrace_diurnal_mean_bit_above_western_ghats.py | peterwilletts24/Python-Scripts | 975d6b2e2923cbde40d2760eb9574acee2e10388 | [
"MIT"
] | 4 | 2017-05-24T09:14:14.000Z | 2019-01-02T19:20:38.000Z | TRMM/trmm_embrace_diurnal_mean_bit_above_western_ghats.py | peterwilletts24/Python-Scripts | 975d6b2e2923cbde40d2760eb9574acee2e10388 | [
"MIT"
] | null | null | null | TRMM/trmm_embrace_diurnal_mean_bit_above_western_ghats.py | peterwilletts24/Python-Scripts | 975d6b2e2923cbde40d2760eb9574acee2e10388 | [
"MIT"
] | 3 | 2017-05-24T09:14:15.000Z | 2020-09-28T08:32:02.000Z | import cPickle as pickle
import numpy as np
from collections import defaultdict
from netCDF4 import Dataset
from scipy.interpolate import griddata
lon_high = 71
lon_low = 67
lat_high= 28
lat_low=20
#lon_high = 116
#lon_low = 30.5
#lat_high= 40
#lat_low=-11.25
pcp_dom, longitude_dom, latitude_dom, time_dom, time_... | 27.4 | 204 | 0.717518 |
1cba168dc84ddb4447727536b922d1d547f11964 | 9,033 | py | Python | pineboolib/application/database/pnsqlsavepoint.py | deavid/pineboo | acc96ab6d5b8bb182990af6dea4bf0986af15549 | [
"MIT"
] | 2 | 2015-09-19T16:54:49.000Z | 2016-09-12T08:06:29.000Z | pineboolib/application/database/pnsqlsavepoint.py | deavid/pineboo | acc96ab6d5b8bb182990af6dea4bf0986af15549 | [
"MIT"
] | 1 | 2017-08-14T17:07:14.000Z | 2017-08-15T00:22:47.000Z | pineboolib/application/database/pnsqlsavepoint.py | deavid/pineboo | acc96ab6d5b8bb182990af6dea4bf0986af15549 | [
"MIT"
] | 9 | 2015-01-15T18:15:42.000Z | 2019-05-05T18:53:00.000Z | # -*- coding: utf-8 -*-
"""
Module for PNSqlSavePoint class.
"""
from pineboolib.core import decorators
from typing import Any, List, Optional, TYPE_CHECKING
if TYPE_CHECKING:
from .pnsqlcursor import PNSqlCursor
from .pnbuffer import PNBuffer
class OpInfo:
"""
OpInfo Class.
Information about a... | 26.335277 | 103 | 0.552972 |
0897edd60213c7028faf51cf5dad4953202a7b41 | 1,535 | py | Python | py2neo/movies/models.py | srlabUsask/py2neo | 80d3cf1ab0b4cfb03b7824fd7a407b33c95a1e8f | [
"Apache-2.0"
] | null | null | null | py2neo/movies/models.py | srlabUsask/py2neo | 80d3cf1ab0b4cfb03b7824fd7a407b33c95a1e8f | [
"Apache-2.0"
] | null | null | null | py2neo/movies/models.py | srlabUsask/py2neo | 80d3cf1ab0b4cfb03b7824fd7a407b33c95a1e8f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright 2011-2020, Nigel Small
#
# 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
#
# Unle... | 27.410714 | 74 | 0.69316 |
6f47c01fcbf94689d771ef38297c286c8c1dc500 | 5,665 | py | Python | test/functional/combine_logs.py | AzusNodes/AZUS | 758d33a9d8d967080e1eeca6947886412523d5cc | [
"MIT"
] | 1 | 2021-05-03T13:39:25.000Z | 2021-05-03T13:39:25.000Z | test/functional/combine_logs.py | AzusNodes/AZUS | 758d33a9d8d967080e1eeca6947886412523d5cc | [
"MIT"
] | null | null | null | test/functional/combine_logs.py | AzusNodes/AZUS | 758d33a9d8d967080e1eeca6947886412523d5cc | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Combine logs from multiple bitcoin nodes as well as the test_framework log.
This streams the combined log output to stdout. Use combine_logs.py > outputfile
to write to an outputfile.
If no argument is provided, the most recent test directory will be used."""
import argparse
from collections... | 37.269737 | 196 | 0.630009 |
bb55ef547b3e5531bbccb478ef7ba69f7dff279f | 48,638 | py | Python | filebeat/tests/system/test_registrar.py | tetianakravchenko/beats | 6aec024e0ab8239791be20885d6d3c58697d18cd | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2022-01-17T17:31:41.000Z | 2022-01-17T17:31:41.000Z | filebeat/tests/system/test_registrar.py | tetianakravchenko/beats | 6aec024e0ab8239791be20885d6d3c58697d18cd | [
"ECL-2.0",
"Apache-2.0"
] | 26 | 2021-11-04T11:17:36.000Z | 2022-02-16T11:55:30.000Z | filebeat/tests/system/test_registrar.py | tetianakravchenko/beats | 6aec024e0ab8239791be20885d6d3c58697d18cd | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2019-08-05T07:42:54.000Z | 2020-09-02T14:23:19.000Z | #!/usr/bin/env python3
"""Test the registrar"""
import os
import platform
import re
import shutil
import stat
import time
import unittest
from filebeat import BaseTest
# Additional tests: to be implemented
# * Check if registrar file can be configured, set config param
# * Check "updating" of registrar file
# * Check... | 35.067051 | 112 | 0.608886 |
7e79f83009a80ea072e910c9f0ed15f6768fb670 | 3,123 | py | Python | tests/functional/test_inc_push.py | kyocum/disdat-luigi | bd6a9733c053ebb114151e47ea18062f34b64000 | [
"Apache-2.0"
] | null | null | null | tests/functional/test_inc_push.py | kyocum/disdat-luigi | bd6a9733c053ebb114151e47ea18062f34b64000 | [
"Apache-2.0"
] | null | null | null | tests/functional/test_inc_push.py | kyocum/disdat-luigi | bd6a9733c053ebb114151e47ea18062f34b64000 | [
"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
# distributed under ... | 26.025 | 74 | 0.679795 |
d6801dc35e6011c2ee6b771c7c451c87014d8446 | 3,435 | py | Python | test/functional/wallet_zapwallettxes.py | limitstory/pyeongtaekcoin | c77889d1ec25759b67fab17180f17eb8f96bbaa1 | [
"MIT"
] | null | null | null | test/functional/wallet_zapwallettxes.py | limitstory/pyeongtaekcoin | c77889d1ec25759b67fab17180f17eb8f96bbaa1 | [
"MIT"
] | null | null | null | test/functional/wallet_zapwallettxes.py | limitstory/pyeongtaekcoin | c77889d1ec25759b67fab17180f17eb8f96bbaa1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2018 The Pyeongtaekcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the zapwallettxes functionality.
- start two pyeongtaekcoind nodes
- create two transactio... | 41.385542 | 112 | 0.710335 |
3e926540f2fcc774497cc0e11061b74ccac7798d | 17,472 | py | Python | tests/model/fvcom_test.py | noaa-ocs-modeling/thyme | 98f036bd49f8f3bcfc13c0593cd887224d971ac5 | [
"BSD-2-Clause"
] | 5 | 2019-07-09T15:18:52.000Z | 2020-06-03T02:57:50.000Z | tests/model/fvcom_test.py | noaa-ocs-modeling/thyme | 98f036bd49f8f3bcfc13c0593cd887224d971ac5 | [
"BSD-2-Clause"
] | null | null | null | tests/model/fvcom_test.py | noaa-ocs-modeling/thyme | 98f036bd49f8f3bcfc13c0593cd887224d971ac5 | [
"BSD-2-Clause"
] | 2 | 2019-10-10T09:54:47.000Z | 2020-05-27T19:11:12.000Z | from collections import namedtuple
import numpy
import pytest
from thyme.model.fvcom import node_to_centroid
from thyme.model.fvcom import vertical_interpolation
VerticalValues = namedtuple(
'VerticalValues',
['u',
'v',
'h',
'zeta',
'siglay_centroid',
'num_nele',
'num_siglay',
... | 53.431193 | 120 | 0.602278 |
23673b1284e13b6568c8357ec84e688351f1cc6c | 3,157 | py | Python | scripts/ms-gui.py | btobab/minesweeper | 0baec6b1535374a436fd878187e556780972de15 | [
"MIT"
] | null | null | null | scripts/ms-gui.py | btobab/minesweeper | 0baec6b1535374a436fd878187e556780972de15 | [
"MIT"
] | null | null | null | scripts/ms-gui.py | btobab/minesweeper | 0baec6b1535374a436fd878187e556780972de15 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""GUI for Mine Sweeper.
Author: Yuhuang Hu
Email : duguyue100@gmail.com
"""
# from __future__ import print_function
import argparse
try:
from PyQt4 import QtGui, QtCore
from PyQt4.QCore import QWidget, QApplication, QGridLayout
except ImportError:
from PyQt5 import QtCore
from ... | 30.95098 | 76 | 0.604371 |
6d79d41c5854a6d242be3d6bb3b5c731a151d80d | 19 | py | Python | __init__.py | spacecoalmen/asteroid_scraper | eea0c1700479e62d08eb60ead547c9ce5e37d7ba | [
"MIT"
] | null | null | null | __init__.py | spacecoalmen/asteroid_scraper | eea0c1700479e62d08eb60ead547c9ce5e37d7ba | [
"MIT"
] | null | null | null | __init__.py | spacecoalmen/asteroid_scraper | eea0c1700479e62d08eb60ead547c9ce5e37d7ba | [
"MIT"
] | null | null | null | __author__ = 'gas'
| 9.5 | 18 | 0.684211 |
af1db83b3edecd1d33a04a34bc5e6c68c79f8391 | 254 | py | Python | manage.py | jessamynsmith/quotations | b2a9b70190756fa261840faea181860b166e253f | [
"MIT"
] | 2 | 2015-05-01T19:44:41.000Z | 2015-07-17T13:52:46.000Z | manage.py | jessamynsmith/quotations | b2a9b70190756fa261840faea181860b166e253f | [
"MIT"
] | 13 | 2019-10-18T17:06:52.000Z | 2022-02-10T07:37:30.000Z | manage.py | jessamynsmith/quotations | b2a9b70190756fa261840faea181860b166e253f | [
"MIT"
] | 3 | 2015-05-06T15:38:30.000Z | 2015-07-26T21:12:32.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "underquoted.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 23.090909 | 75 | 0.775591 |
294648a88995f06643dba79c995c4aa91693ab41 | 469 | py | Python | aether/gallery/views.py | katajakasa/aetherguild4 | a7e294f0cff11e2508751f1013e6648fdc56bb94 | [
"MIT"
] | null | null | null | aether/gallery/views.py | katajakasa/aetherguild4 | a7e294f0cff11e2508751f1013e6648fdc56bb94 | [
"MIT"
] | 1 | 2021-06-10T17:36:11.000Z | 2021-06-10T17:36:11.000Z | aether/gallery/views.py | katajakasa/aetherguild4 | a7e294f0cff11e2508751f1013e6648fdc56bb94 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.core.paginator import Paginator
from django.views.decorators.cache import never_cache
from .models import GalleryGroup
from aether.utils.misc import get_page
@never_cache
def gallery_index(request):
paginator = Paginator(GalleryGroup.objects.order_by('-created_at')... | 29.3125 | 80 | 0.763326 |
7ced7654419825afbac8cdee8b4960f93470ad0d | 148 | py | Python | while_with_break.py | agolla0440/my_python_workbook | 3595037467e89e0950d0c356b2ba087e574e2bd9 | [
"Apache-2.0"
] | null | null | null | while_with_break.py | agolla0440/my_python_workbook | 3595037467e89e0950d0c356b2ba087e574e2bd9 | [
"Apache-2.0"
] | null | null | null | while_with_break.py | agolla0440/my_python_workbook | 3595037467e89e0950d0c356b2ba087e574e2bd9 | [
"Apache-2.0"
] | null | null | null | i = 1
while i < 6:
# print(i)
if i == 2:
i += 1
continue
if i == 5:
break
else:
print(i)
i += 1
| 12.333333 | 16 | 0.337838 |
31317ebb52ea98eaf6c931c267eb860198105e22 | 991 | py | Python | examples/basic/midiout.py | Czaki/python-rtmidi | eb16ab3268b29b94cd2baa6bfc777f5cf5f908ba | [
"MIT"
] | 260 | 2015-06-25T06:44:31.000Z | 2022-02-28T15:44:29.000Z | examples/basic/midiout.py | rwreynolds/python-rtmidi | 04ba3a69da0437b21ca3bb6f359c8ebaf06f3bd2 | [
"MIT"
] | 99 | 2016-02-10T22:19:23.000Z | 2022-03-31T06:22:15.000Z | examples/basic/midiout.py | rwreynolds/python-rtmidi | 04ba3a69da0437b21ca3bb6f359c8ebaf06f3bd2 | [
"MIT"
] | 70 | 2015-06-25T06:57:01.000Z | 2022-03-02T05:25:28.000Z | #!/usr/bin/env python
#
# midiout.py
#
"""Show how to open an output port and send MIDI events."""
from __future__ import print_function
import logging
import sys
import time
from rtmidi.midiutil import open_midioutput
from rtmidi.midiconstants import NOTE_OFF, NOTE_ON
log = logging.getLogger('midiout')
logging.ba... | 23.046512 | 70 | 0.733602 |
e369e53119fa1bf7d97223640a58c642b73a1c32 | 180 | py | Python | config.py | SnoozeTime/kucoin-trade-report | c71be0ad327908abfbbeddf8fbf75f442c63e5af | [
"WTFPL"
] | 2 | 2018-04-16T01:46:35.000Z | 2021-11-11T21:30:30.000Z | config.py | SnoozeTime/kucoin-trade-report | c71be0ad327908abfbbeddf8fbf75f442c63e5af | [
"WTFPL"
] | 1 | 2021-06-01T21:47:23.000Z | 2021-06-01T21:47:23.000Z | config.py | SnoozeTime/kucoin-trade-report | c71be0ad327908abfbbeddf8fbf75f442c63e5af | [
"WTFPL"
] | null | null | null | import os
# Either add KUCOIN_API and KUCOIN_SECRET as environment variable, or write them directly here.
KEY = os.getenv("KUCOIN_API", "")
SECRET = os.getenv("KUCOIN_SECRET", "") | 36 | 95 | 0.75 |
9004c1c26b9635e6e17a2d299ca6437399fcb06d | 2,694 | py | Python | caffe2/python/operator_test/decay_adagrad_test.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 60,067 | 2017-01-18T17:21:31.000Z | 2022-03-31T21:37:45.000Z | caffe2/python/operator_test/decay_adagrad_test.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 66,955 | 2017-01-18T17:21:38.000Z | 2022-03-31T23:56:11.000Z | caffe2/python/operator_test/decay_adagrad_test.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 19,210 | 2017-01-18T17:45:04.000Z | 2022-03-31T23:51:56.000Z | import functools
from hypothesis import given
import hypothesis.strategies as st
import numpy as np
from caffe2.python import core
import caffe2.python.hypothesis_test_util as hu
class TestDecayAdagrad(hu.HypothesisTestCase):
@staticmethod
def ref_decay_adagrad(param, mom1, mom2, grad, LR, ITER,
... | 39.043478 | 131 | 0.612843 |
6ae23ac19b0ec7dfc760086f1f8546debc834f4b | 4,796 | py | Python | 10 On-policy control with approximation/Mountain Car/mountaincar.py | c-boe/Reinforcement-learning | a8cfcf3ff022a31e6f21fe3497c5557443778258 | [
"MIT"
] | 1 | 2021-04-20T00:43:53.000Z | 2021-04-20T00:43:53.000Z | 12 Eligibility Traces/Mountain Car/mountaincar.py | c-boe/Reinforcement-learning | a8cfcf3ff022a31e6f21fe3497c5557443778258 | [
"MIT"
] | null | null | null | 12 Eligibility Traces/Mountain Car/mountaincar.py | c-boe/Reinforcement-learning | a8cfcf3ff022a31e6f21fe3497c5557443778258 | [
"MIT"
] | null | null | null | """
Implementation of mountaincar environment for example 10.1 of "Reinforcement
learning" by Sutton and Barto
"""
import numpy as np
import matplotlib.pyplot as plt
class MountainCar():
"""Mountain car environment from example 10.1 of Sutton and Barto's
"Reinforcement Learning" """
def __init__(self):
... | 24.222222 | 79 | 0.4804 |
d6e8cef0a969e3df068ff5dfa3a19d1acec67b32 | 989 | py | Python | app/app/urls.py | Omar2B/recipe-app-api | 8031bf1e1f0050bac6ad60ceff9615365f1a5720 | [
"MIT"
] | null | null | null | app/app/urls.py | Omar2B/recipe-app-api | 8031bf1e1f0050bac6ad60ceff9615365f1a5720 | [
"MIT"
] | 6 | 2021-03-19T01:47:22.000Z | 2021-09-08T01:54:59.000Z | app/app/urls.py | Omar2B/recipe-app-api | 8031bf1e1f0050bac6ad60ceff9615365f1a5720 | [
"MIT"
] | null | null | null | """app 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')
Class-based vie... | 36.62963 | 77 | 0.715875 |
3e05fc0b3653e4bbdbe636b73a7db05321e3074f | 1,390 | py | Python | SLACKBOT/Api/config.py | edoi777/tokenGL | 0a96c9a75213374527867031fa2ee5c1dd74e96a | [
"MIT"
] | null | null | null | SLACKBOT/Api/config.py | edoi777/tokenGL | 0a96c9a75213374527867031fa2ee5c1dd74e96a | [
"MIT"
] | null | null | null | SLACKBOT/Api/config.py | edoi777/tokenGL | 0a96c9a75213374527867031fa2ee5c1dd74e96a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from tcr.ttypes import ApplicationType
import re
class Config():
LINE_HOST_DOMAIN = 'https://gd2.line.naver.jp'
LINE_OBS_DOMAIN = 'https://obs-sg.line-apps.com'
LINE_TIMELINE_API = 'https://gd2.line.naver.jp/mh/api'
LINE_TIMELINE_MH = ... | 33.902439 | 107 | 0.584892 |
bc35e02e6a58135193f75176bc85a487b2edb75c | 3,099 | py | Python | pandas/tests/plotting/frame/test_frame_groupby.py | CJL89/pandas | 6210077d32a9e9675526ea896e6d1f9189629d4a | [
"BSD-3-Clause"
] | 28,899 | 2016-10-13T03:32:12.000Z | 2022-03-31T21:39:05.000Z | pandas/tests/plotting/frame/test_frame_groupby.py | CJL89/pandas | 6210077d32a9e9675526ea896e6d1f9189629d4a | [
"BSD-3-Clause"
] | 31,004 | 2016-10-12T23:22:27.000Z | 2022-03-31T23:17:38.000Z | pandas/tests/plotting/frame/test_frame_groupby.py | CJL89/pandas | 6210077d32a9e9675526ea896e6d1f9189629d4a | [
"BSD-3-Clause"
] | 15,149 | 2016-10-13T03:21:31.000Z | 2022-03-31T18:46:47.000Z | """ Test cases for DataFrame.plot """
import numpy as np
import pytest
import pandas.util._test_decorators as td
from pandas import DataFrame
import pandas._testing as tm
from pandas.tests.plotting.common import TestPlotBase
pytestmark = pytest.mark.slow
@td.skip_if_no_mpl
class TestDataFramePlotsGroupby(TestPlot... | 33.322581 | 66 | 0.552436 |
03b9f4a1284b7165c1012042f8d132e3a257c65b | 1,015 | py | Python | client_code/utils/__init__.py | hugetim/anvil-extras | ca83f6ada5149514c2affbe1ab081a4ca677c7e0 | [
"MIT"
] | null | null | null | client_code/utils/__init__.py | hugetim/anvil-extras | ca83f6ada5149514c2affbe1ab081a4ca677c7e0 | [
"MIT"
] | null | null | null | client_code/utils/__init__.py | hugetim/anvil-extras | ca83f6ada5149514c2affbe1ab081a4ca677c7e0 | [
"MIT"
] | null | null | null | # SPDX-License-Identifier: MIT
#
# Copyright (c) 2021 The Anvil Extras project team members listed at
# https://github.com/anvilistas/anvil-extras/graphs/contributors
#
# This software is published at https://github.com/anvilistas/anvil-extras
from functools import cache
__version__ = "1.7.1"
def __dir__():
ret... | 26.710526 | 83 | 0.715271 |
fb8850eb046f6cd0ae3d874216809a8c18ddd654 | 9,359 | py | Python | CartPole_HSPGA.py | unc-optimization/ProxHSPGA | 8860ac7acccffcc46eb8e89c2ad4249488c69ad5 | [
"MIT"
] | null | null | null | CartPole_HSPGA.py | unc-optimization/ProxHSPGA | 8860ac7acccffcc46eb8e89c2ad4249488c69ad5 | [
"MIT"
] | null | null | null | CartPole_HSPGA.py | unc-optimization/ProxHSPGA | 8860ac7acccffcc46eb8e89c2ad4249488c69ad5 | [
"MIT"
] | 3 | 2020-03-10T19:08:01.000Z | 2022-01-05T01:49:32.000Z | """@package CartPole_HSPGA
This package implements the HSPGA algorithm for CartPole-v0 environment.
Copyright (c) 2020 Nhan H. Pham, Department of Statistics and Operations Research, University of North Carolina at Chapel Hill
Copyright (c) 2020 Lam M. Nguyen, IBM Research, Thomas J. Watson Research Center
Yorktown ... | 34.921642 | 275 | 0.726573 |
bce15b3a324020907ab870e60a049109e42b132e | 8,566 | py | Python | plugins/tcpsubnet.py | whoISstar/lmp | d16c80d377eb479133eb4441b1a76d99013f5876 | [
"Apache-2.0"
] | null | null | null | plugins/tcpsubnet.py | whoISstar/lmp | d16c80d377eb479133eb4441b1a76d99013f5876 | [
"Apache-2.0"
] | 1 | 2021-11-12T07:53:06.000Z | 2021-11-12T07:53:06.000Z | plugins/tcpsubnet.py | dxlearn/lmp | 2bf9b3e38a72a263bb6b02410a6e7a37fa1855f5 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# @lint-avoid-python-3-compatibility-imports
#
# tcpsubnet Summarize TCP bytes sent to different subnets.
# For Linux, uses BCC, eBPF. Embedded C.
#
# USAGE: tcpsubnet [-h] [-v] [-J] [-f FORMAT] [-i INTERVAL] [subnets]
#
# This uses dynamic tracing of kernel f... | 30.05614 | 84 | 0.618842 |
1a29e8021f43c52bd2436ef9b804215ae2571660 | 107 | py | Python | test_project/tests/admin.py | epanchee/django-autocomplete-light | ebc00e78456aed51cf943890d899a75a6b56400d | [
"MIT"
] | 1 | 2020-09-18T21:35:06.000Z | 2020-09-18T21:35:06.000Z | test_project/tests/admin.py | epanchee/django-autocomplete-light | ebc00e78456aed51cf943890d899a75a6b56400d | [
"MIT"
] | null | null | null | test_project/tests/admin.py | epanchee/django-autocomplete-light | ebc00e78456aed51cf943890d899a75a6b56400d | [
"MIT"
] | 1 | 2020-09-18T21:35:08.000Z | 2020-09-18T21:35:08.000Z | from django.contrib import admin
from django.contrib.auth.models import User
admin.site.unregister(User)
| 17.833333 | 43 | 0.82243 |
12967185a9bff3ff51bfb781411bb007ec0ec512 | 229 | py | Python | rhea/system/memmap/__init__.py | mngr0/rhea | 9ad8d193f7f78f1d192af438568d45fb5a398c8c | [
"MIT"
] | null | null | null | rhea/system/memmap/__init__.py | mngr0/rhea | 9ad8d193f7f78f1d192af438568d45fb5a398c8c | [
"MIT"
] | null | null | null | rhea/system/memmap/__init__.py | mngr0/rhea | 9ad8d193f7f78f1d192af438568d45fb5a398c8c | [
"MIT"
] | null | null | null |
from __future__ import absolute_import
# generic memory-space object
from .memspace import MemorySpace
# register file objects
from .regfile import RegisterBits
from .regfile import Register
from .regfile import RegisterFile
| 19.083333 | 38 | 0.829694 |
ac6d95a06ca58025d8e0b4c59463f6fa7b7ac887 | 3,124 | py | Python | sympy/printing/python.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 603 | 2020-12-23T13:49:32.000Z | 2022-03-31T23:38:03.000Z | sympy/printing/python.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 387 | 2020-12-15T14:54:04.000Z | 2022-03-31T07:00:21.000Z | sympy/printing/python.py | bigfooted/sympy | 1fb2490fa2fa9b476da450f02a25b03c1dc07cf0 | [
"BSD-3-Clause"
] | 35 | 2021-03-26T03:12:04.000Z | 2022-03-23T10:15:10.000Z | import keyword as kw
import sympy
from .repr import ReprPrinter
from .str import StrPrinter
# A list of classes that should be printed using StrPrinter
STRPRINT = ("Add", "Infinity", "Integer", "Mul", "NegativeInfinity",
"Pow", "Zero")
class PythonPrinter(ReprPrinter, StrPrinter):
"""A printer which ... | 35.5 | 80 | 0.620038 |
748d7141f121f1071e4788807d20fc1fe277aa5a | 7,906 | py | Python | sdk/lusid/api/scopes_api.py | finbourne/lusid-sdk-python | d238c5c661908639dab57d026966630448bfb0d6 | [
"MIT"
] | 6 | 2018-06-19T15:50:17.000Z | 2022-03-26T22:53:16.000Z | sdk/lusid/api/scopes_api.py | finbourne/lusid-sdk-python-preview | 6b1ae2c634f4b9a816e070470e9c8e6e06eae0ee | [
"MIT"
] | 98 | 2020-04-15T06:05:43.000Z | 2022-03-01T10:25:25.000Z | sdk/lusid/api/scopes_api.py | finbourne/lusid-sdk-python-preview | 6b1ae2c634f4b9a816e070470e9c8e6e06eae0ee | [
"MIT"
] | 9 | 2019-09-30T11:19:25.000Z | 2021-11-17T19:49:59.000Z | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.3648
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility lib... | 43.679558 | 254 | 0.605742 |
25038f40daf1252fd827d5ec357322e0d21a070f | 184,026 | py | Python | numpy/ma/tests/test_core.py | schaefed/numpy | 6d5a74261d497f9989c823626ec955efe88348ae | [
"BSD-3-Clause"
] | null | null | null | numpy/ma/tests/test_core.py | schaefed/numpy | 6d5a74261d497f9989c823626ec955efe88348ae | [
"BSD-3-Clause"
] | null | null | null | numpy/ma/tests/test_core.py | schaefed/numpy | 6d5a74261d497f9989c823626ec955efe88348ae | [
"BSD-3-Clause"
] | 1 | 2019-08-14T08:08:41.000Z | 2019-08-14T08:08:41.000Z | # pylint: disable-msg=W0400,W0511,W0611,W0612,W0614,R0201,E1102
"""Tests suite for MaskedArray & subclassing.
:author: Pierre Gerard-Marchant
:contact: pierregm_at_uga_dot_edu
"""
from __future__ import division, absolute_import, print_function
__author__ = "Pierre GF Gerard-Marchant"
import warnings
import pickle
i... | 38.124301 | 81 | 0.514324 |
973ffe8f46131dcce1847617099087c3b5f18237 | 1,907 | py | Python | data/diabetes/tpot/fold8/pipeline.py | luisferreira97/autoautoml | 501d2de8b2153748b57e5c8cb247058c587ce29c | [
"MIT"
] | 7 | 2020-05-15T23:10:26.000Z | 2022-01-21T10:36:50.000Z | data/diabetes/tpot/fold8/pipeline.py | luisferreira97/autoautoml | 501d2de8b2153748b57e5c8cb247058c587ce29c | [
"MIT"
] | 13 | 2020-11-13T18:47:51.000Z | 2021-07-24T10:04:57.000Z | data/diabetes/tpot/fold8/pipeline.py | luisferreira97/autoautoml | 501d2de8b2153748b57e5c8cb247058c587ce29c | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.feature_selection import (SelectPercentile, VarianceThreshold,
f_classif)
from sklearn.linear_model import SGDClassifier
from sklearn.model_selection import train_test_split
fro... | 36.673077 | 88 | 0.718406 |
c656421b86cef86c44486c7b55c66e9b54ee4af0 | 845 | py | Python | simulation/bin/collapse_utr_bed.py | LuChenLab/SCAPE | 49c4063f1ec3ac2d72f935b61de4a18c66db754d | [
"MIT"
] | 3 | 2022-03-15T05:22:29.000Z | 2022-03-21T18:32:04.000Z | simulation/bin/collapse_utr_bed.py | LuChenLab/SCAPE | 49c4063f1ec3ac2d72f935b61de4a18c66db754d | [
"MIT"
] | 3 | 2022-02-20T04:43:18.000Z | 2022-03-19T12:19:56.000Z | simulation/bin/collapse_utr_bed.py | LuChenLab/SCAPE | 49c4063f1ec3ac2d72f935b61de4a18c66db754d | [
"MIT"
] | 1 | 2022-03-21T18:32:15.000Z | 2022-03-21T18:32:15.000Z | import sys
from collections import defaultdict
def main(args):
bedin, bedout = args
out_dic = defaultdict(list)
with open(bedin) as fh, open(bedout, 'w') as fo:
for line in fh:
gid = line.strip().split('\t')[-1]
out_dic[gid].extend([line])
for gid, detail in out_dic.items():
detail = list(map(lambda ... | 28.166667 | 62 | 0.592899 |
ff717dbd2769c74a2caa4ff19ef057520a27d1eb | 30,776 | py | Python | src/transformers/models/auto/auto_factory.py | holazzer/transformers | 53191d75ecca21c028077b3227f9ac47379e4690 | [
"Apache-2.0"
] | 28 | 2021-09-15T01:25:00.000Z | 2022-03-01T20:21:28.000Z | src/transformers/models/auto/auto_factory.py | holazzer/transformers | 53191d75ecca21c028077b3227f9ac47379e4690 | [
"Apache-2.0"
] | 1 | 2021-08-09T01:51:17.000Z | 2021-08-09T01:51:17.000Z | src/transformers/models/auto/auto_factory.py | holazzer/transformers | 53191d75ecca21c028077b3227f9ac47379e4690 | [
"Apache-2.0"
] | 1 | 2021-12-02T05:20:55.000Z | 2021-12-02T05:20:55.000Z | # coding=utf-8
# Copyright 2021 The HuggingFace Inc. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 57.525234 | 147 | 0.65824 |
3457fd67ec44990abe89ab83cfdb62ab7e2b32cb | 10,530 | py | Python | GameFiles/Generator.py | ConnerGallimore/Project-Run | 1a65f238412eafd675064b888d365c80a4516fa5 | [
"MIT"
] | 1 | 2021-06-08T21:22:42.000Z | 2021-06-08T21:22:42.000Z | GameFiles/Generator.py | ConnerGallimore/Project-Run | 1a65f238412eafd675064b888d365c80a4516fa5 | [
"MIT"
] | null | null | null | GameFiles/Generator.py | ConnerGallimore/Project-Run | 1a65f238412eafd675064b888d365c80a4516fa5 | [
"MIT"
] | 2 | 2021-06-14T20:41:30.000Z | 2021-06-24T19:18:48.000Z | from ast import Param
import pygame
from GameFiles.Bug import *
from GameFiles.Platform import *
from GameFiles.Currency import *
"""Functions listed here are intended to generate non-player sprites."""
def coin_gen(coins, sprites, screen_width, screen_height):
"""Generate the coin obstacles for the game."""
... | 25.373494 | 93 | 0.439411 |
d1f01811f8688f69e74366e63bb44e1c45178106 | 1,755 | py | Python | authentik/outposts/controllers/k8s/utils.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 15 | 2020-01-05T09:09:57.000Z | 2020-11-28T05:27:39.000Z | authentik/outposts/controllers/k8s/utils.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 302 | 2020-01-21T08:03:59.000Z | 2020-12-04T05:04:57.000Z | authentik/outposts/controllers/k8s/utils.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 3 | 2020-03-04T08:21:59.000Z | 2020-08-01T20:37:18.000Z | """k8s utils"""
from pathlib import Path
from kubernetes.client.models.v1_container_port import V1ContainerPort
from kubernetes.client.models.v1_service_port import V1ServicePort
from kubernetes.config.incluster_config import SERVICE_TOKEN_FILENAME
from authentik.outposts.controllers.k8s.triggers import NeedsRecreate... | 36.5625 | 100 | 0.71567 |
2bfddc7e206a757a3b2fd3e79bb0ee01853d1c11 | 213 | py | Python | boot.py | jfcherng/Sublime-VisualizeZeroWidthChars | 9469b01a13c0c8bfde17ca9627d08ba0ee757d43 | [
"MIT"
] | 2 | 2021-03-27T05:55:22.000Z | 2021-04-01T13:40:24.000Z | boot.py | jfcherng-sublime/ST-VisualizeZeroWidthChars | 9469b01a13c0c8bfde17ca9627d08ba0ee757d43 | [
"MIT"
] | 1 | 2019-08-25T20:08:05.000Z | 2019-08-26T07:02:54.000Z | boot.py | jfcherng/Sublime-VisualizeZeroWidthChars | 9469b01a13c0c8bfde17ca9627d08ba0ee757d43 | [
"MIT"
] | null | null | null | from .plugin import set_up, tear_down
# main plugin classes
from .plugin.sublime_text.VisualizeZeroWidthChars import *
def plugin_loaded() -> None:
set_up()
def plugin_unloaded() -> None:
tear_down()
| 16.384615 | 58 | 0.732394 |
9f33c01ff3f6e61346080a60b314d9f8c5894ece | 2,808 | py | Python | hw/scripts/gen_config.py | ausbin/vortex | 592a8400e2f3323dce398ab36d435752e959e033 | [
"BSD-3-Clause"
] | 9 | 2021-04-19T02:07:14.000Z | 2021-12-13T07:00:37.000Z | hw/scripts/gen_config.py | ausbin/vortex | 592a8400e2f3323dce398ab36d435752e959e033 | [
"BSD-3-Clause"
] | null | null | null | hw/scripts/gen_config.py | ausbin/vortex | 592a8400e2f3323dce398ab36d435752e959e033 | [
"BSD-3-Clause"
] | 4 | 2021-04-08T22:12:45.000Z | 2022-03-25T00:39:01.000Z | #!/usr/bin/env python3
# coding=utf-8
from __future__ import print_function
import os
import os.path as path
import re
import argparse
from datetime import datetime
script_dir = path.dirname(path.realpath(__file__))
defines = {}
for k, v in os.environ.items():
if k.upper().startswith('V_'):
defines[k[2:]... | 27.80198 | 98 | 0.558048 |
686318af8b6e3f2347106a329f11cb755711e6ce | 17,390 | py | Python | testui/support/appium_driver.py | ty-hob/Py-TestUI | 08fa460deafd15f970f39edce1c5060f581449bc | [
"Apache-2.0"
] | 3 | 2020-07-10T06:50:49.000Z | 2022-02-18T02:14:09.000Z | testui/support/appium_driver.py | ty-hob/Py-TestUI | 08fa460deafd15f970f39edce1c5060f581449bc | [
"Apache-2.0"
] | 13 | 2021-02-26T07:49:36.000Z | 2022-03-29T11:32:19.000Z | testui/support/appium_driver.py | ty-hob/Py-TestUI | 08fa460deafd15f970f39edce1c5060f581449bc | [
"Apache-2.0"
] | 3 | 2021-03-23T18:38:21.000Z | 2021-09-16T14:57:57.000Z | import atexit
import os
import subprocess
import threading
from pathlib import Path
from time import sleep
from ppadb.client import Client as AdbClient
from appium.webdriver import Remote
from appium.webdriver.webdriver import WebDriver
from selenium import webdriver
from selenium.webdriver.firefox.firefox_binary impo... | 39.343891 | 132 | 0.635078 |
8e36864d3e1657a4ddc428a2be560e60809ef8ca | 16,642 | py | Python | src/sage/combinat/rigged_configurations/rc_crystal.py | vbraun/sage | 07d6c37d18811e2b377a9689790a7c5e24da16ba | [
"BSL-1.0"
] | 3 | 2016-06-19T14:48:31.000Z | 2022-01-28T08:46:01.000Z | src/sage/combinat/rigged_configurations/rc_crystal.py | vbraun/sage | 07d6c37d18811e2b377a9689790a7c5e24da16ba | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/rigged_configurations/rc_crystal.py | vbraun/sage | 07d6c37d18811e2b377a9689790a7c5e24da16ba | [
"BSL-1.0"
] | 7 | 2021-11-08T10:01:59.000Z | 2022-03-03T11:25:52.000Z | r"""
Crystal of Rigged Configurations
AUTHORS:
- Travis Scrimshaw (2010-09-26): Initial version
We only consider the highest weight crystal structure, not the
Kirillov-Reshetikhin structure, and we extend this to symmetrizable types.
"""
#*****************************************************************************... | 36.575824 | 118 | 0.591636 |
3a22cae9527978ab063610ba622a4ee004e4edf4 | 13,426 | py | Python | nitro/resource/config/lb/lbvserver_transformpolicy_binding.py | HanseMerkur/nitro-python | d03eb11f492a35a2a8b2a140322fbce22d25a8f7 | [
"Apache-2.0"
] | 2 | 2020-08-24T18:04:22.000Z | 2020-08-24T18:04:47.000Z | nitro/resource/config/lb/lbvserver_transformpolicy_binding.py | HanseMerkur/nitro-python | d03eb11f492a35a2a8b2a140322fbce22d25a8f7 | [
"Apache-2.0"
] | null | null | null | nitro/resource/config/lb/lbvserver_transformpolicy_binding.py | HanseMerkur/nitro-python | d03eb11f492a35a2a8b2a140322fbce22d25a8f7 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2008-2015 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 33.733668 | 308 | 0.591986 |
ef5c9936d6df45f2d6f051c3dfbc25a2fcaddc55 | 4,351 | py | Python | python/dazl/_gen/com/daml/ledger/api/v1/command_submission_service_pb2.py | digital-asset/dazl-client | 5d54edaea26d7704cc8d73e5945b37ed2806265b | [
"Apache-2.0"
] | 8 | 2019-09-08T09:41:03.000Z | 2022-02-19T12:54:30.000Z | python/dazl/_gen/com/daml/ledger/api/v1/command_submission_service_pb2.py | digital-asset/dazl-client | 5d54edaea26d7704cc8d73e5945b37ed2806265b | [
"Apache-2.0"
] | 55 | 2019-05-30T23:00:31.000Z | 2022-01-24T01:51:32.000Z | python/dazl/_gen/com/daml/ledger/api/v1/command_submission_service_pb2.py | digital-asset/dazl-client | 5d54edaea26d7704cc8d73e5945b37ed2806265b | [
"Apache-2.0"
] | 9 | 2019-06-30T18:15:27.000Z | 2021-12-03T10:15:27.000Z | # Copyright (c) 2017-2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
# fmt: off
# isort: skip_file
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: com/daml/ledger/api/v1/command_submission_service.proto
... | 41.04717 | 630 | 0.800965 |
597e5efc6b3515a3eac06f4cc85a53396734a11a | 2,154 | py | Python | dia 09 FastAPI/site-packages/prospector/postfilter.py | RamonNicolas/100-Dias-com-Python | b4678b5981415b385528c5fe67c7bb02c8d2f4ca | [
"MIT"
] | null | null | null | dia 09 FastAPI/site-packages/prospector/postfilter.py | RamonNicolas/100-Dias-com-Python | b4678b5981415b385528c5fe67c7bb02c8d2f4ca | [
"MIT"
] | null | null | null | dia 09 FastAPI/site-packages/prospector/postfilter.py | RamonNicolas/100-Dias-com-Python | b4678b5981415b385528c5fe67c7bb02c8d2f4ca | [
"MIT"
] | null | null | null | import os
from prospector.suppression import get_suppressions
def filter_messages(relative_filepaths, root, messages):
"""
This method post-processes all messages output by all tools, in order to filter
out any based on the overall output.
The main aim currently is to use information about messages ... | 37.789474 | 111 | 0.708914 |
0c3aea2e1c3210fdcdf6c48eb2eee848fab50884 | 1,447 | py | Python | python/nltk_service_pb2_grpc.py | Cartmanishere/grpc-python-golang | a07b0509964fe6d4427254e73bc5875abb9cfabc | [
"MIT"
] | 4 | 2019-11-01T11:48:03.000Z | 2021-03-23T17:52:02.000Z | python/nltk_service_pb2_grpc.py | Cartmanishere/grpc-python-golang | a07b0509964fe6d4427254e73bc5875abb9cfabc | [
"MIT"
] | null | null | null | python/nltk_service_pb2_grpc.py | Cartmanishere/grpc-python-golang | a07b0509964fe6d4427254e73bc5875abb9cfabc | [
"MIT"
] | 5 | 2019-11-27T05:38:05.000Z | 2020-07-22T16:59:10.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import nltk_service_pb2 as nltk__service__pb2
class KeywordServiceStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Cha... | 30.787234 | 76 | 0.755356 |
f747a292c1faff5cac56ac5fe3ddced9c9b86c5d | 4,284 | py | Python | Chatbot_Model/Info_Extraction/Entity_Extraction/data.py | chenpocufa/Chatbot_CN | 5e13c129c159143610f4dfc99478d401dd5777e6 | [
"Apache-2.0"
] | 1 | 2019-08-02T06:09:34.000Z | 2019-08-02T06:09:34.000Z | Chatbot_Model/Info_Extraction/Entity_Extraction/data.py | yuxuan2015/Chatbot_CN | 1adf1c01d3eced5f0644102bdec9be22705b6f3f | [
"Apache-2.0"
] | null | null | null | Chatbot_Model/Info_Extraction/Entity_Extraction/data.py | yuxuan2015/Chatbot_CN | 1adf1c01d3eced5f0644102bdec9be22705b6f3f | [
"Apache-2.0"
] | 1 | 2019-06-10T00:36:17.000Z | 2019-06-10T00:36:17.000Z | #-*- coding:utf-8 _*-
"""
@author:charlesXu
@file: data.py
@desc: 构建字向量、词向量
@time: 2018/08/08
"""
import sys, pickle, os, random
import numpy as np
import pdb
## tags, BIO 标注策略 标签矩阵
tag2label = {"O": 0,
"B-PER": 1, "I-PER": 2,
"B-LOC": 3, "I-LOC": 4,
"B-ORG": 5, "I-ORG": 6,
... | 23.8 | 107 | 0.556256 |
2166f30e71f6bd4a6376817e28ff4af3628abab5 | 2,162 | py | Python | env/Lib/site-packages/jeepney/io/tests/test_asyncio.py | iamswayam/DRF-API-Logger | 4acd2ee709df98c2e22d6bd0a97bf9191a0d8e4e | [
"MIT"
] | 1 | 2020-10-20T12:55:21.000Z | 2020-10-20T12:55:21.000Z | env/Lib/site-packages/jeepney/io/tests/test_asyncio.py | iamswayam/DRF-API-Logger | 4acd2ee709df98c2e22d6bd0a97bf9191a0d8e4e | [
"MIT"
] | 29 | 2021-08-17T19:09:23.000Z | 2022-03-29T19:08:23.000Z | env/Lib/site-packages/jeepney/io/tests/test_asyncio.py | iamswayam/DRF-API-Logger | 4acd2ee709df98c2e22d6bd0a97bf9191a0d8e4e | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | import asyncio
import pytest
from jeepney import DBusAddress, new_method_call
from jeepney.bus_messages import message_bus, MatchRule
from jeepney.io.asyncio import (
open_dbus_connection, open_dbus_router, Proxy
)
from .utils import have_session_bus
pytestmark = [
pytest.mark.asyncio,
pytest.mark.skipif... | 27.717949 | 69 | 0.701665 |
1654942c3ce882d710d0e804cfffdfa574d488a5 | 128 | py | Python | __init__.py | Mem-Tech/meme-voice-assistant | 9ec4c6bcd7decb5593095fa53646bc8ff2810ce7 | [
"MIT"
] | 1 | 2021-03-05T21:36:14.000Z | 2021-03-05T21:36:14.000Z | __init__.py | Mem-Tech/meme-voice-assistant | 9ec4c6bcd7decb5593095fa53646bc8ff2810ce7 | [
"MIT"
] | 2 | 2021-04-30T22:09:03.000Z | 2021-04-30T22:11:19.000Z | __init__.py | Mem-Tech/meme-voice-assistant | 9ec4c6bcd7decb5593095fa53646bc8ff2810ce7 | [
"MIT"
] | null | null | null | from .util import KEYWORDS
from .util import KEYWORD_FILE_PATHS
from .util import LIBRARY_PATH
from .util import MODEL_FILE_PATH | 32 | 36 | 0.851563 |
49a317b0295df5a38461bfe7b496daf6b5be3808 | 742 | py | Python | question_bank/populating-next-right-pointers-in-each-node-ii/populating-next-right-pointers-in-each-node-ii.py | yatengLG/leetcode-python | 5d48aecb578c86d69835368fad3d9cc21961c226 | [
"Apache-2.0"
] | 9 | 2020-08-12T10:01:00.000Z | 2022-01-05T04:37:48.000Z | question_bank/populating-next-right-pointers-in-each-node-ii/populating-next-right-pointers-in-each-node-ii.py | yatengLG/leetcode-python | 5d48aecb578c86d69835368fad3d9cc21961c226 | [
"Apache-2.0"
] | 1 | 2021-02-16T10:19:31.000Z | 2021-02-16T10:19:31.000Z | question_bank/populating-next-right-pointers-in-each-node-ii/populating-next-right-pointers-in-each-node-ii.py | yatengLG/leetcode-python | 5d48aecb578c86d69835368fad3d9cc21961c226 | [
"Apache-2.0"
] | 4 | 2020-08-12T10:13:31.000Z | 2021-11-05T01:26:58.000Z | # -*- coding: utf-8 -*-
# @Author : LG
"""
执行用时:60 ms, 在所有 Python3 提交中击败了81.56% 的用户
内存消耗:14.5 MB, 在所有 Python3 提交中击败了54.12% 的用户
解题思路:
先把每层的节点以自左向右的顺序保存,
然后修改next
"""
class Solution:
def connect(self, root: 'Node') -> 'Node':
record = {}
def find(root, h): # 遍历,并保存每层的节点
if root... | 25.586207 | 51 | 0.463612 |
4b020a0db2cde3115d4c68fdace8bf9d66478795 | 34 | py | Python | lemora.py | javaarchive/Lemora | 25414cae68eb744fe1dba589000acb6b45b8f1a0 | [
"MIT"
] | null | null | null | lemora.py | javaarchive/Lemora | 25414cae68eb744fe1dba589000acb6b45b8f1a0 | [
"MIT"
] | null | null | null | lemora.py | javaarchive/Lemora | 25414cae68eb744fe1dba589000acb6b45b8f1a0 | [
"MIT"
] | null | null | null | import SQLiteKV
import EnhancedDB
| 11.333333 | 17 | 0.882353 |
3710a872cbc5ae9bb631f603819d7857aa148476 | 3,894 | py | Python | python_scripts/create_essentialgenes_list.py | Gregory94/LaanLab-SATAY-DataAnalysis | 276cb96d42dfcf4bed16aaaf0786519d96831ed0 | [
"Apache-2.0"
] | 2 | 2020-04-01T14:54:34.000Z | 2020-09-03T11:11:40.000Z | python_scripts/create_essentialgenes_list.py | Gregory94/LaanLab-SATAY-DataAnalysis | 276cb96d42dfcf4bed16aaaf0786519d96831ed0 | [
"Apache-2.0"
] | 39 | 2020-03-22T08:59:11.000Z | 2021-03-23T16:34:25.000Z | python_scripts/create_essentialgenes_list.py | leilaicruz/LaanLab-SATAY-DataAnalysis | 276cb96d42dfcf4bed16aaaf0786519d96831ed0 | [
"Apache-2.0"
] | 2 | 2021-03-31T12:45:44.000Z | 2021-05-20T08:25:34.000Z | # -*- coding: utf-8 -*-
"""
Created on Thu Aug 6 13:41:44 2020
@author: gregoryvanbeek
This python code creates a .txt file that includes all essential genes that are annotated as essential genes in Saccharomyces Cerevisiae.
It gets this information from multiple .txt files and combines all information in one file... | 30.904762 | 141 | 0.681561 |
5bc5d96a5d628d55c5fbc4fd0d6f4c71ff2d248f | 7,631 | py | Python | GDAL_RapidEye_NDVI.py | leandromet/Geoprocessamento---Geoprocessing | 21e72dc6ac51d958a5570c35ea9db6f976c30a03 | [
"MIT"
] | 2 | 2016-05-29T14:46:54.000Z | 2022-03-31T13:05:52.000Z | GDAL_RapidEye_NDVI.py | leandromet/Geoprocessamento---Geoprocessing | 21e72dc6ac51d958a5570c35ea9db6f976c30a03 | [
"MIT"
] | null | null | null | GDAL_RapidEye_NDVI.py | leandromet/Geoprocessamento---Geoprocessing | 21e72dc6ac51d958a5570c35ea9db6f976c30a03 | [
"MIT"
] | 1 | 2016-06-22T12:18:41.000Z | 2016-06-22T12:18:41.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
#-------------------------------------------------------------------------------
# Name: RapidEyeNDVIfromCutRegions
# Purpose: Calculates the NDVI of a defined region based on centroid of features from a shapefile.
#
# Author: leandro.biondo@florestal.go... | 39.133333 | 125 | 0.614205 |
0d521455abf779fed1fe67706e333f40bb5a43dc | 38,189 | py | Python | test/vpp_papi_provider.py | akanouras/vpp | a55a9fc239b5e47487a9489aa5dba9d229502d7e | [
"Apache-2.0"
] | 751 | 2017-07-13T06:16:46.000Z | 2022-03-30T09:14:35.000Z | test/vpp_papi_provider.py | akanouras/vpp | a55a9fc239b5e47487a9489aa5dba9d229502d7e | [
"Apache-2.0"
] | 15 | 2018-03-19T15:20:07.000Z | 2022-03-18T19:48:21.000Z | test/vpp_papi_provider.py | akanouras/vpp | a55a9fc239b5e47487a9489aa5dba9d229502d7e | [
"Apache-2.0"
] | 479 | 2017-07-13T06:17:26.000Z | 2022-03-31T18:20:43.000Z | # NB NB NB NB NB NB NB NB NB NB NB
#
# NOTE: The API binary wrappers in this file are in the process of being
# deprecated. DO NOT ADD NEW WRAPPERS HERE. Call the functions using
# named arguments directly instead.
#
import os
import time
from collections import deque
import queue
from six import moves, iteritems
from... | 36.826422 | 79 | 0.513394 |
83268a3562d671fa42d9905ea25c04cab6227db2 | 16,779 | py | Python | myven/lib/python3.8/site-packages/ansible/modules/cloud/centurylink/clc_group.py | baltham/dne-dna-code | 4a13309a790a670d2f07e635c9264a0c29976c6a | [
"MIT"
] | 1 | 2021-04-02T08:08:39.000Z | 2021-04-02T08:08:39.000Z | myven/lib/python3.8/site-packages/ansible/modules/cloud/centurylink/clc_group.py | baltham/dne-dna-code | 4a13309a790a670d2f07e635c9264a0c29976c6a | [
"MIT"
] | null | null | null | myven/lib/python3.8/site-packages/ansible/modules/cloud/centurylink/clc_group.py | baltham/dne-dna-code | 4a13309a790a670d2f07e635c9264a0c29976c6a | [
"MIT"
] | 1 | 2020-05-03T01:13:16.000Z | 2020-05-03T01:13:16.000Z | #!/usr/bin/python
#
# Copyright (c) 2015 CenturyLink
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['previ... | 32.707602 | 120 | 0.581799 |
2f8426b3618682e3773a391edbc46b450b5d5969 | 10,295 | py | Python | pytest_subprocessor/__init__.py | AnyVisionltd/automation-infra | e94c10224b0711160c9fc361045b8f2cfc9c4ca8 | [
"MIT"
] | 6 | 2021-03-10T14:02:42.000Z | 2021-12-08T20:17:21.000Z | pytest_subprocessor/__init__.py | solganik/automation-infra | 66379f7366eaa52f412a9150a018ea17ddcdf59b | [
"MIT"
] | 5 | 2021-05-10T18:00:07.000Z | 2022-03-12T00:36:54.000Z | pytest_subprocessor/__init__.py | solganik/automation-infra | 66379f7366eaa52f412a9150a018ea17ddcdf59b | [
"MIT"
] | 5 | 2021-03-10T14:02:11.000Z | 2021-07-16T20:58:13.000Z | import copy
import queue
import threading
from plumbum import local
import sys
import uuid
from concurrent.futures.thread import ThreadPoolExecutor
from datetime import datetime
import json
import logging
import os
import subprocess
from concurrent import futures
from json import JSONDecodeError
import pytest
from _p... | 39.293893 | 155 | 0.71763 |
deeaa5004302a879ac7a5a538c4202e680342ce4 | 6,735 | py | Python | models/convolution_lstm.py | yaorong0921/Driver-Intention-Prediction | baeb3e15dc75f113cbf03d58cb0dc66bd6cc8b39 | [
"MIT"
] | 10 | 2020-08-19T11:24:48.000Z | 2022-03-06T11:24:41.000Z | models/convolution_lstm.py | Harlan728/Driver-Intention-Prediction | ec1d435895ab234b2fff5aef7668577773122354 | [
"MIT"
] | 3 | 2021-03-16T03:15:39.000Z | 2022-02-23T22:22:00.000Z | models/convolution_lstm.py | Harlan728/Driver-Intention-Prediction | ec1d435895ab234b2fff5aef7668577773122354 | [
"MIT"
] | 3 | 2021-03-07T20:46:23.000Z | 2022-03-28T14:10:48.000Z | import torch
import torch.nn as nn
from torch.autograd import Variable
class ConvLSTMCell(nn.Module):
def __init__(self, input_channels, hidden_channels, kernel_size):
super(ConvLSTMCell, self).__init__()
assert hidden_channels % 2 == 0
self.input_channels = input_channels
self.h... | 40.329341 | 120 | 0.610245 |
b04bfb7d75c07ec32bfa969a3d0c5ca5465509f6 | 2,741 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/f5networks/f5_modules/tests/unit/mock/procenv.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible_collections/f5networks/f5_modules/tests/unit/mock/procenv.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/f5networks/f5_modules/tests/unit/mock/procenv.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | # (c) 2016, Matt Davis <mdavis@ansible.com>
# (c) 2016, Toshio Kuratomi <tkuratomi@ansible.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of ... | 30.120879 | 105 | 0.711054 |
32fa649c1f69c9f03c3aac81b7234c6d26939624 | 9,426 | py | Python | ansible_navigator/ui_framework/colorize.py | NilashishC/ansible-navigator | 8f6e546ea29308786b89248ac778b7af15f50c4b | [
"Apache-2.0",
"MIT"
] | null | null | null | ansible_navigator/ui_framework/colorize.py | NilashishC/ansible-navigator | 8f6e546ea29308786b89248ac778b7af15f50c4b | [
"Apache-2.0",
"MIT"
] | null | null | null | ansible_navigator/ui_framework/colorize.py | NilashishC/ansible-navigator | 8f6e546ea29308786b89248ac778b7af15f50c4b | [
"Apache-2.0",
"MIT"
] | null | null | null | """ Tokenize and color text
"""
import json
import logging
import os
import re
import colorsys
import curses
import functools
from itertools import chain
from ..tm_tokenize.grammars import Grammars
from ..tm_tokenize.tokenize import tokenize
from .curses_defs import CursesLine
from .curses_defs import CursesLinePart... | 31.525084 | 100 | 0.53745 |
b6390ba1ac14add6f86e4c46067c63e9c74a075a | 493 | py | Python | utils/csv_reader.py | dsc-jnec/mailmerge-pyth | 4fa6f896008cfa28ef0e29b0b9b4e8481b5841e9 | [
"MIT"
] | 1 | 2020-12-09T10:23:24.000Z | 2020-12-09T10:23:24.000Z | utils/csv_reader.py | dsc-jnec/mailmerge-pyth | 4fa6f896008cfa28ef0e29b0b9b4e8481b5841e9 | [
"MIT"
] | 3 | 2020-11-19T06:57:23.000Z | 2020-11-21T13:41:31.000Z | utils/csv_reader.py | dsc-jnec/mailmerge-pyth | 4fa6f896008cfa28ef0e29b0b9b4e8481b5841e9 | [
"MIT"
] | null | null | null | import csv
res={}
def csvread(filename):
with open(filename, 'r') as file:
csv_file = csv.reader(file)
f=0
for row in csv_file:
if(f == 0):
for i in row:
res[i]=[]
f+=1
else:
j = 0
for... | 21.434783 | 46 | 0.409736 |
cc0398182a0e1c70be76cab4f3d7dc82367fd04e | 3,401 | py | Python | python/tvm/rpc/tornado_util.py | mostafaelhoushi/tvm | ae21eddf5f13ffa82d514e8311c87f38bcac559a | [
"Apache-2.0"
] | 1 | 2021-03-07T15:30:16.000Z | 2021-03-07T15:30:16.000Z | python/tvm/rpc/tornado_util.py | mostafaelhoushi/tvm | ae21eddf5f13ffa82d514e8311c87f38bcac559a | [
"Apache-2.0"
] | null | null | null | python/tvm/rpc/tornado_util.py | mostafaelhoushi/tvm | ae21eddf5f13ffa82d514e8311c87f38bcac559a | [
"Apache-2.0"
] | 1 | 2020-02-09T10:42:31.000Z | 2020-02-09T10:42:31.000Z | """Utilities used in tornado."""
import socket
import errno
from tornado import ioloop
class TCPHandler(object):
"""TCP socket handler backed tornado event loop.
Parameters
----------
sock : Socket
The TCP socket, will set it to non-blocking mode.
"""
def __init__(self, sock):
... | 32.084906 | 97 | 0.539547 |
8a898ba7aa8f29a4187d26cc93a0131abe98a036 | 403 | py | Python | wave2.0/division2B/hw2/E_diplomas_in_folders.py | stanislav-kudriavtsev/Yandex-Algorithms-Training | 0ad882e04847f6c2a973716a419befb21aa1df20 | [
"CC0-1.0"
] | null | null | null | wave2.0/division2B/hw2/E_diplomas_in_folders.py | stanislav-kudriavtsev/Yandex-Algorithms-Training | 0ad882e04847f6c2a973716a419befb21aa1df20 | [
"CC0-1.0"
] | null | null | null | wave2.0/division2B/hw2/E_diplomas_in_folders.py | stanislav-kudriavtsev/Yandex-Algorithms-Training | 0ad882e04847f6c2a973716a419befb21aa1df20 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""https://contest.yandex.ru/contest/28738/problems/E/"""
# pylint: disable=invalid-name
if __name__ == "__main__":
folders_total = int(input())
folders = tuple(map(int, input().split()))
summ, maxx = 0, folders[0]
for folder in folders:
summ +=... | 22.388889 | 57 | 0.590571 |
f72ef0d45883357b7389e4970e9395830f94792a | 80 | py | Python | run.py | 5x/ds-ants-geopy-extended | 6017b5da444cc33bde47f0c7cf2cf06a640a354c | [
"MIT"
] | null | null | null | run.py | 5x/ds-ants-geopy-extended | 6017b5da444cc33bde47f0c7cf2cf06a640a354c | [
"MIT"
] | null | null | null | run.py | 5x/ds-ants-geopy-extended | 6017b5da444cc33bde47f0c7cf2cf06a640a354c | [
"MIT"
] | 1 | 2019-12-06T10:20:08.000Z | 2019-12-06T10:20:08.000Z | from ants.ants import demonstrate
if __name__ == '__main__':
demonstrate()
| 16 | 33 | 0.725 |
3093c94958966ef44830ce87bd26e8ddd31e291d | 308 | py | Python | 2017/02day/sol.py | zagura/aoc-2017 | bfd38fb6fbe4211017a306d218b32ecff741e006 | [
"MIT"
] | 2 | 2018-12-09T16:00:09.000Z | 2018-12-09T17:56:15.000Z | 2017/02day/sol.py | zagura/aoc-2017 | bfd38fb6fbe4211017a306d218b32ecff741e006 | [
"MIT"
] | null | null | null | 2017/02day/sol.py | zagura/aoc-2017 | bfd38fb6fbe4211017a306d218b32ecff741e006 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
lines = sys.stdin.readlines()
#print("Read lines finished!")
fullsum = 0
for l in lines:
vals = l.strip().split('\t')
# print(vals)
vals2 = list(map(lambda x: int(x), vals))
# print(vals2)
diff = max(vals2) - min(vals2)
fullsum += diff
print(fullsum)
| 16.210526 | 45 | 0.616883 |
f23857ab9b6ba46fcd36d92f03c30c76aa51d610 | 918 | py | Python | backupCynanBot.py | Omnigazer/CynanBotCommon | 9055a63ffcc5bfb2f95f6934f8fd981088a11d9b | [
"Unlicense"
] | 2 | 2021-02-27T16:45:19.000Z | 2021-05-21T15:57:02.000Z | backupCynanBot.py | Omnigazer/CynanBotCommon | 9055a63ffcc5bfb2f95f6934f8fd981088a11d9b | [
"Unlicense"
] | 1 | 2021-03-03T14:05:16.000Z | 2021-03-03T14:05:16.000Z | backupCynanBot.py | Omnigazer/CynanBotCommon | 9055a63ffcc5bfb2f95f6934f8fd981088a11d9b | [
"Unlicense"
] | 3 | 2021-02-27T16:54:55.000Z | 2021-05-06T14:12:32.000Z | import os
import shutil
import sys
from shutil import SameFileError
def find_files(src):
relevant_files = []
for root, dirs, files in os.walk(src):
relevant_files.extend(os.path.join(root, f) for f in files
if f.endswith(".json") or f.endswith(".sqlite"))
return relevant_f... | 24.810811 | 89 | 0.592593 |
d1fe94ffbd0404de860e527cb144606693004b52 | 834 | py | Python | dcmanager/tests/unit/test_dcmanager.py | starlingx-staging/stx-kingbird | 9869ad4640e76384fa14f031a59134cd439929a8 | [
"Apache-2.0"
] | null | null | null | dcmanager/tests/unit/test_dcmanager.py | starlingx-staging/stx-kingbird | 9869ad4640e76384fa14f031a59134cd439929a8 | [
"Apache-2.0"
] | null | null | null | dcmanager/tests/unit/test_dcmanager.py | starlingx-staging/stx-kingbird | 9869ad4640e76384fa14f031a59134cd439929a8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 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, softw... | 26.903226 | 75 | 0.705036 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.