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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b086f50d2a4785aa6c2ea39852da5ee54603a80b | 2,886 | py | Python | COMET/misc_plugins/PlotScripts/analysis_scripts/Analysis_template.py | dallaval5u/COMET | 8c5793faafe2797dd4100507aa0fe1e71cf9f6c0 | [
"MIT"
] | null | null | null | COMET/misc_plugins/PlotScripts/analysis_scripts/Analysis_template.py | dallaval5u/COMET | 8c5793faafe2797dd4100507aa0fe1e71cf9f6c0 | [
"MIT"
] | null | null | null | COMET/misc_plugins/PlotScripts/analysis_scripts/Analysis_template.py | dallaval5u/COMET | 8c5793faafe2797dd4100507aa0fe1e71cf9f6c0 | [
"MIT"
] | null | null | null | """Simply plots all data as curve plots"""
"""This script is just a template out of which you can build your own analysis"""
import logging
import holoviews as hv
from forge.tools import customize_plot, holoplot, convert_to_df, config_layout
from forge.tools import twiny, relabelPlot
from forge.tools import plot_all... | 33.172414 | 88 | 0.595981 |
08d8eb3740c883b6a90ccd1ee5577841b6d37249 | 372 | py | Python | src/at/utils/_vendor/yaml/configobjwalker.py | alextremblay/si-utils | 1377ffd9dbefe63ac51efcca638fb583b2c89628 | [
"MIT"
] | null | null | null | src/at/utils/_vendor/yaml/configobjwalker.py | alextremblay/si-utils | 1377ffd9dbefe63ac51efcca638fb583b2c89628 | [
"MIT"
] | null | null | null | src/at/utils/_vendor/yaml/configobjwalker.py | alextremblay/si-utils | 1377ffd9dbefe63ac51efcca638fb583b2c89628 | [
"MIT"
] | null | null | null | # coding: utf-8
import warnings
from .util import configobj_walker as new_configobj_walker
from typing import TYPE_CHECKING
if TYPE_CHECKING: # MYPY
from typing import Any # NOQA
def configobj_walker(cfg):
# type: (Any) -> Any
warnings.warn('configobj_walker has moved to ruamel.yaml.util, please upda... | 23.25 | 92 | 0.752688 |
517c3d156cdff7b78cd520bce22c714c8e734cf2 | 447 | py | Python | fabfile.py | giovannicode/giovanniblog | 411c06c4caad00ad59348dd18a9b7a8f1ceea739 | [
"BSD-3-Clause"
] | null | null | null | fabfile.py | giovannicode/giovanniblog | 411c06c4caad00ad59348dd18a9b7a8f1ceea739 | [
"BSD-3-Clause"
] | null | null | null | fabfile.py | giovannicode/giovanniblog | 411c06c4caad00ad59348dd18a9b7a8f1ceea739 | [
"BSD-3-Clause"
] | null | null | null | from fabric.api import local, env, cd, run
from fabric.context_managers import lcd
env.hosts =['45.55.216.113']
env.user = "root"
def provision_server():
local("ansible-playbook -u root provisioning/production.yml")
def push_code():
local("git push production master")
def restart_gunicorn():
local("ans... | 20.318182 | 65 | 0.718121 |
7f9c4716ee2c011508de5ce7165f0842d0f74b82 | 2,437 | py | Python | model-optimizer/extensions/ops/space_to_depth_test.py | JOCh1958/openvino | 070201feeec5550b7cf8ec5a0ffd72dc879750be | [
"Apache-2.0"
] | 1 | 2021-04-06T03:32:12.000Z | 2021-04-06T03:32:12.000Z | model-optimizer/extensions/ops/space_to_depth_test.py | JOCh1958/openvino | 070201feeec5550b7cf8ec5a0ffd72dc879750be | [
"Apache-2.0"
] | 28 | 2021-09-24T09:29:02.000Z | 2022-03-28T13:20:46.000Z | model-optimizer/extensions/ops/space_to_depth_test.py | JOCh1958/openvino | 070201feeec5550b7cf8ec5a0ffd72dc879750be | [
"Apache-2.0"
] | 1 | 2020-08-30T11:48:03.000Z | 2020-08-30T11:48:03.000Z | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import unittest
import numpy as np
from extensions.ops.space_to_depth import SpaceToDepth
from mo.graph.graph import Node
from mo.utils.error import Error
from mo.utils.unittest.graph import build_graph
nodes = {
'in_data_node': {'v... | 39.95082 | 92 | 0.655724 |
a8c3850a7181624a05e6fb3dd518769ab6c435dc | 2,404 | py | Python | tools/caffe2_converter.py | lxtGH/cvpods-1 | fb61b6a63dfa65b21a782a4fc7e15a88ce018c51 | [
"Apache-2.0"
] | 81 | 2020-11-16T00:31:19.000Z | 2022-03-16T02:49:45.000Z | tools/caffe2_converter.py | wondervictor/cvpods | 614a975e5425bbaeb66bbd1ffca552d633ba89ca | [
"Apache-2.0"
] | 7 | 2020-11-25T13:30:17.000Z | 2021-09-16T03:38:45.000Z | tools/caffe2_converter.py | wondervictor/cvpods | 614a975e5425bbaeb66bbd1ffca552d633ba89ca | [
"Apache-2.0"
] | 8 | 2020-12-09T11:18:40.000Z | 2021-07-26T06:05:50.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
import argparse
import os
from cvpods.checkpoint import DetectionCheckpointer
from cvpods.config import get_cfg
from cvpods.data import build_detection_test_loader
from cvpods.evaluation import COCOEvaluator, inference_on_dataset, print_csv_format... | 37.5625 | 96 | 0.735441 |
c6367b94598b85e8fdb0ae227a7e9e006ca8a24c | 2,306 | py | Python | shift_cipher.py | gautam-pala/Information_Security_encryption-decryption-algorithms | 5c10b5c799b46c02b2fc3a409ff13eef4b1bcb20 | [
"MIT"
] | null | null | null | shift_cipher.py | gautam-pala/Information_Security_encryption-decryption-algorithms | 5c10b5c799b46c02b2fc3a409ff13eef4b1bcb20 | [
"MIT"
] | null | null | null | shift_cipher.py | gautam-pala/Information_Security_encryption-decryption-algorithms | 5c10b5c799b46c02b2fc3a409ff13eef4b1bcb20 | [
"MIT"
] | null | null | null | def enc(key):
f= open("plain_text.txt","r")
f2 = open("encr_text.txt","w")
for line in f:
for char in line:
ch = chr((ord(char)+key)%256)
f2.write(ch)
def dec(key):
f= open("plain_text.txt","w")
f2 = open("encr_text.txt","r")
for line in f2:
for char in line:
ch = chr((ord(char)-key)%256)
f.writ... | 20.589286 | 128 | 0.534692 |
f0c1ba4eaf40c6ae3aed4e13d877a7bc9314b75e | 132 | py | Python | start.py | Expert68/course_select_primary | 7d8489228a1ea90f1a0782a828ebceb8cd47c83d | [
"MIT"
] | null | null | null | start.py | Expert68/course_select_primary | 7d8489228a1ea90f1a0782a828ebceb8cd47c83d | [
"MIT"
] | null | null | null | start.py | Expert68/course_select_primary | 7d8489228a1ea90f1a0782a828ebceb8cd47c83d | [
"MIT"
] | null | null | null | import os,sys
from core import src
path = os.path.dirname(__file__)
sys.path.append(path)
if __name__ == '__main__':
src.run() | 16.5 | 32 | 0.712121 |
e5620586fc83fdeb102ff04ea74c7099e5cd31e5 | 2,378 | py | Python | torchio/transforms/augmentation/intensity/random_blur.py | maartenterpstra/torchio | bdf84665d1b596e8d6af835e85c06c6b33a41a02 | [
"MIT"
] | 1 | 2021-05-18T09:36:35.000Z | 2021-05-18T09:36:35.000Z | torchio/transforms/augmentation/intensity/random_blur.py | maartenterpstra/torchio | bdf84665d1b596e8d6af835e85c06c6b33a41a02 | [
"MIT"
] | null | null | null | torchio/transforms/augmentation/intensity/random_blur.py | maartenterpstra/torchio | bdf84665d1b596e8d6af835e85c06c6b33a41a02 | [
"MIT"
] | 1 | 2020-06-08T10:09:59.000Z | 2020-06-08T10:09:59.000Z | from typing import Union, Tuple, Optional
import torch
import numpy as np
import SimpleITK as sitk
from ....utils import nib_to_sitk, sitk_to_nib
from ....torchio import DATA, AFFINE, TypeData
from ....data.subject import Subject
from .. import RandomTransform
class RandomBlur(RandomTransform):
r"""Blur an image ... | 37.15625 | 79 | 0.615223 |
8dc05ab0e25259c9dcf462b23d4e8d8490f67c0c | 1,021 | py | Python | aiida_lammps/calculations/lammps/potentials/__init__.py | zaidurrehman/aiida-lammps | e00d5501778c918b4333747398d4ae4df46fd3eb | [
"MIT"
] | null | null | null | aiida_lammps/calculations/lammps/potentials/__init__.py | zaidurrehman/aiida-lammps | e00d5501778c918b4333747398d4ae4df46fd3eb | [
"MIT"
] | null | null | null | aiida_lammps/calculations/lammps/potentials/__init__.py | zaidurrehman/aiida-lammps | e00d5501778c918b4333747398d4ae4df46fd3eb | [
"MIT"
] | null | null | null | import importlib
class LammpsPotential:
def __init__(self,
potential_data,
structure,
potential_filename='None'):
self._names = [site.name for site in structure.kinds]
self._type = potential_data.dict.pair_style
self._data = potential_dat... | 36.464286 | 108 | 0.60431 |
aade7c9aa5788b7aabd89eea0a53c91e2baf4c47 | 397 | py | Python | setup.py | tetsuzawa/psychometrics | cd8bef49a42d814c2ee8f3c66663de0c80c7aec5 | [
"MIT"
] | null | null | null | setup.py | tetsuzawa/psychometrics | cd8bef49a42d814c2ee8f3c66663de0c80c7aec5 | [
"MIT"
] | null | null | null | setup.py | tetsuzawa/psychometrics | cd8bef49a42d814c2ee8f3c66663de0c80c7aec5 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name="psychometrics",
version="0.1.2",
description="psychometrics is a library for psychological measurement experiment",
packages=["psychometrics"],
install_requires=open("requirements.txt").read().splitlines(),
author="Tetsu Takizawa",
author_email="tet... | 30.538462 | 86 | 0.722922 |
4e98fe92c3c3385afd17dbd3830023edf015c3bf | 4,249 | py | Python | ggd/list_files.py | mikecormier/ggd-cli | ecda29961947c2f8c7b9a3d0eb008fbbb332b0c2 | [
"MIT"
] | null | null | null | ggd/list_files.py | mikecormier/ggd-cli | ecda29961947c2f8c7b9a3d0eb008fbbb332b0c2 | [
"MIT"
] | null | null | null | ggd/list_files.py | mikecormier/ggd-cli | ecda29961947c2f8c7b9a3d0eb008fbbb332b0c2 | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------------------------------------
## Import Statements
#-------------------------------------------------------------------------------------------------------------
from __future__ import print_function
import sys
import os
import glob
from .... | 48.284091 | 165 | 0.583667 |
598da744f2f708532dbec21d510cc78cd36c5d2d | 4,516 | py | Python | AuthenticationSvc/tests.py | andres0sorio/AODS4AWork | 429aa737cdf459aa242f4dc4c234f2aad13b563f | [
"MIT"
] | 1 | 2021-05-30T06:38:57.000Z | 2021-05-30T06:38:57.000Z | AuthenticationSvc/tests.py | andres0sorio/AODS4AWork | 429aa737cdf459aa242f4dc4c234f2aad13b563f | [
"MIT"
] | null | null | null | AuthenticationSvc/tests.py | andres0sorio/AODS4AWork | 429aa737cdf459aa242f4dc4c234f2aad13b563f | [
"MIT"
] | null | null | null | import unittest
import sqlite3
import jwt
from sqlite3 import Error
from src.AuthServices import AuthServices
from src.Utilities import *
from src.Configuration import Configuration
class MyTestCase(unittest.TestCase):
def test_sqlite_connection(self):
con = None
try:
con = sqlite3.... | 27.041916 | 110 | 0.566652 |
29a672eed30292813dda16333d4b568b1d79cca6 | 19,724 | py | Python | tensorflow/python/keras/applications/mobilenet.py | deepmedia/tensorflow | ac8aad5c55838566a26ed6725c966d399319c831 | [
"Apache-2.0"
] | 78 | 2020-08-04T12:36:25.000Z | 2022-03-25T04:23:40.000Z | tensorflow/python/keras/applications/mobilenet.py | deepmedia/tensorflow | ac8aad5c55838566a26ed6725c966d399319c831 | [
"Apache-2.0"
] | 10 | 2021-08-03T08:42:38.000Z | 2022-01-03T03:29:12.000Z | tensorflow/python/keras/applications/mobilenet.py | deepmedia/tensorflow | ac8aad5c55838566a26ed6725c966d399319c831 | [
"Apache-2.0"
] | 28 | 2020-02-10T07:03:06.000Z | 2022-01-12T11:19:20.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 43.065502 | 80 | 0.653975 |
fa4f5c17f4725f0baa2b441b1ff1209cf5bf2572 | 30,181 | py | Python | tests/__init__.py | andrejromanov/dd-trace-py | 661011e891d4699006614b1a238096d7140cc55c | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/__init__.py | andrejromanov/dd-trace-py | 661011e891d4699006614b1a238096d7140cc55c | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2021-01-27T04:53:24.000Z | 2021-01-27T04:53:24.000Z | tests/__init__.py | andrejromanov/dd-trace-py | 661011e891d4699006614b1a238096d7140cc55c | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | import contextlib
from contextlib import contextmanager
import inspect
import os
import sys
from typing import List
import pytest
import ddtrace
from ddtrace import Span
from ddtrace import Tracer
from ddtrace.compat import httplib
from ddtrace.compat import parse
from ddtrace.compat import to_unicode
from ddtrace.co... | 33.056955 | 111 | 0.602432 |
109513a8acd274852d44f18cf4db2e39d90faaaa | 223 | py | Python | src/flask_fastapi/constants.py | ironslob/flask-fastapi | 488be6211f0d9a4c1531eecc43f390c3f405c316 | [
"MIT"
] | 3 | 2021-05-25T19:00:21.000Z | 2021-07-05T07:48:13.000Z | src/flask_fastapi/constants.py | ironslob/flask-fastapi | 488be6211f0d9a4c1531eecc43f390c3f405c316 | [
"MIT"
] | null | null | null | src/flask_fastapi/constants.py | ironslob/flask-fastapi | 488be6211f0d9a4c1531eecc43f390c3f405c316 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from enum import Enum
import logging
logger = logging.getLogger(__name__)
class HttpMethod(str, Enum):
GET = "GET"
POST = "POST"
PUT = "PUT"
DELETE = "DELETE"
PATCH = "PATCH"
| 14.866667 | 36 | 0.605381 |
7ec0c5d57f6e645c06ada7673aa14b6f7fbbac97 | 3,602 | py | Python | chainer/functions/array/transpose_sequence.py | takaaki82/chainer | ce2d5511d4d6b2089fbe19a0d764ee27817873aa | [
"MIT"
] | null | null | null | chainer/functions/array/transpose_sequence.py | takaaki82/chainer | ce2d5511d4d6b2089fbe19a0d764ee27817873aa | [
"MIT"
] | 2 | 2018-01-09T23:05:30.000Z | 2018-01-19T01:19:34.000Z | chainer/functions/array/transpose_sequence.py | bkvogel/chainer | 894cd5d008f11eccdf6e1d7106f5b8bfff9ce005 | [
"MIT"
] | null | null | null | import numpy
from chainer import backend
from chainer.backends import cuda
from chainer import function_node
from chainer.utils import type_check
def _transpose(xs, length):
if length == 0:
return ()
xp = backend.get_array_module(*xs)
lengths = numpy.empty(length, dtype='i')
end = length
... | 29.768595 | 78 | 0.537202 |
207a5be8d5853183a4614be8a64a5163fe5975fa | 7,277 | py | Python | huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/model/create_extract_task_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | 1 | 2021-11-03T07:54:50.000Z | 2021-11-03T07:54:50.000Z | huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/model/create_extract_task_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/model/create_extract_task_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
from huaweicloudsdkcore.sdk_response import SdkResponse
class CreateExtractTaskResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map ... | 27.052045 | 137 | 0.595575 |
60cb2006ab04b762daf052c3f78eedc5fbfae34b | 7,804 | py | Python | darling_ansible/python_venv/lib/python3.7/site-packages/oci/core/models/create_dhcp_details.py | revnav/sandbox | f9c8422233d093b76821686b6c249417502cf61d | [
"Apache-2.0"
] | null | null | null | darling_ansible/python_venv/lib/python3.7/site-packages/oci/core/models/create_dhcp_details.py | revnav/sandbox | f9c8422233d093b76821686b6c249417502cf61d | [
"Apache-2.0"
] | null | null | null | darling_ansible/python_venv/lib/python3.7/site-packages/oci/core/models/create_dhcp_details.py | revnav/sandbox | f9c8422233d093b76821686b6c249417502cf61d | [
"Apache-2.0"
] | 1 | 2020-06-25T03:12:58.000Z | 2020-06-25T03:12:58.000Z | # coding: utf-8
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 31.723577 | 245 | 0.636981 |
440eadf592f4cebea20f57cf9850530d733033ea | 1,731 | py | Python | udplog/kafka.py | ralphm/udplog | 04fa2045f0eb23dfd73be704ac7713384c6860d7 | [
"MIT"
] | null | null | null | udplog/kafka.py | ralphm/udplog | 04fa2045f0eb23dfd73be704ac7713384c6860d7 | [
"MIT"
] | 1 | 2018-02-27T20:09:35.000Z | 2018-02-27T20:09:35.000Z | udplog/kafka.py | ralphm/udplog | 04fa2045f0eb23dfd73be704ac7713384c6860d7 | [
"MIT"
] | 1 | 2016-10-11T12:27:33.000Z | 2016-10-11T12:27:33.000Z | # Copyright (c) Rackspace US, Inc.
# See LICENSE for details.
"""
Kafka support.
This provides a Twisted based publisher to a topic in a Kafka cluster.
"""
from __future__ import division, absolute_import
import socket
from kafka import KafkaClient, SimpleProducer
import simplejson
from twisted.application import s... | 27.47619 | 70 | 0.685153 |
84450ffd43bc1cf5105d769e2159d65e0e103107 | 3,819 | py | Python | meta-iotqa/lib/baserunner/util/tag.py | kraj/intel-iot-refkit | 04cd5afec0c41deeb5e1a48b43a0a31e708295c1 | [
"MIT"
] | 36 | 2017-02-20T04:04:28.000Z | 2022-02-17T05:36:33.000Z | meta-iotqa/lib/baserunner/util/tag.py | kraj/intel-iot-refkit | 04cd5afec0c41deeb5e1a48b43a0a31e708295c1 | [
"MIT"
] | 284 | 2017-02-06T08:51:52.000Z | 2021-11-03T16:52:16.000Z | meta-iotqa/lib/baserunner/util/tag.py | kraj/intel-iot-refkit | 04cd5afec0c41deeb5e1a48b43a0a31e708295c1 | [
"MIT"
] | 65 | 2017-02-03T12:36:16.000Z | 2021-02-18T11:00:46.000Z | #!/usr/bin/env python
# Copyright (C) 2013 Intel Corporation
#
# Released under the MIT license (see COPYING.MIT)
# Tag filter module used by testrunner
# This provides tag based filtering function for test case set.
"""Tag Filter Module"""
import unittest
TAG_PREFIX = "tag__"
def tag(*args, **kwargs):
"""tag de... | 30.552 | 68 | 0.577376 |
360aa0416af56df881a2d528332647dba80fdc07 | 1,394 | py | Python | clients/kratos/python/test/test_settings_profile_form_config.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | 77 | 2020-02-14T17:27:36.000Z | 2022-03-25T08:44:52.000Z | clients/kratos/python/test/test_settings_profile_form_config.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | 125 | 2020-02-07T21:45:52.000Z | 2022-03-31T12:54:24.000Z | clients/kratos/python/test/test_settings_profile_form_config.py | russelg/sdk | 2515b35981784319bd7d58fcf0b5ab85b501b62f | [
"Apache-2.0"
] | 44 | 2020-01-31T22:05:47.000Z | 2022-03-09T14:41:22.000Z | """
Ory Kratos API
Documentation for all public and administrative Ory Kratos APIs. Public and administrative APIs are exposed on different ports. Public APIs can face the public internet without any protection while administrative APIs should never be exposed without prior authorization. To protect the admini... | 34 | 446 | 0.758967 |
836d4240a7b2188736f8aecf23705df75e1f6b6e | 1,449 | py | Python | Reinforcement/contents/gym_game/run_MountainCar.py | Robin970822/tensorflow-learning | 3c4be417c7a4ae7756045b54ca3a0b6c1d5c1f2e | [
"Apache-2.0"
] | 2 | 2018-04-26T07:52:56.000Z | 2019-11-28T06:09:39.000Z | Reinforcement/contents/gym_game/run_MountainCar.py | Robin970822/tensorflow-learning | 3c4be417c7a4ae7756045b54ca3a0b6c1d5c1f2e | [
"Apache-2.0"
] | null | null | null | Reinforcement/contents/gym_game/run_MountainCar.py | Robin970822/tensorflow-learning | 3c4be417c7a4ae7756045b54ca3a0b6c1d5c1f2e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Wed Jan 17 15:05:56 2018
@author: hanxy
"""
import gym
from rl_brain import DeepQNetwork
env = gym.make('MountainCar-v0')
env = env.unwrapped
print env.action_space
print env.observation_space
print env.observation_space.high
print env.observation_space.l... | 23.370968 | 115 | 0.602484 |
a89e62cf65b3e73d2e0a35eef48098dd0fa91215 | 25,568 | py | Python | dl_l8s2_uv/satreaders/s2image.py | csaybar/DL-L8S2-UV | 2063648016c40070a7750e313c3d4c9af83da344 | [
"MIT"
] | 13 | 2021-04-29T10:26:25.000Z | 2022-03-18T14:06:35.000Z | dl_l8s2_uv/satreaders/s2image.py | csaybar/DL-L8S2-UV | 2063648016c40070a7750e313c3d4c9af83da344 | [
"MIT"
] | 1 | 2022-02-20T23:02:45.000Z | 2022-02-20T23:02:48.000Z | dl_l8s2_uv/satreaders/s2image.py | csaybar/DL-L8S2-UV | 2063648016c40070a7750e313c3d4c9af83da344 | [
"MIT"
] | 4 | 2021-03-11T12:08:55.000Z | 2022-01-13T10:24:07.000Z | """
Class and functions for reading S2 images.
https://sentinel.esa.int/web/sentinel/user-guides/sentinel-2-msi/document-library
"""
from rasterio import windows, warp, features, coords
from rasterio.warp import reproject, Resampling
from shapely.geometry import Polygon, MultiPolygon
from lxml.etree import parse
impo... | 43.043771 | 130 | 0.571026 |
80029b5db53fc2379eb9b1f33fca941e2525deb4 | 1,757 | py | Python | src/narviexe/Build.py | sspiff/narvi | aa56529f15be197422b23a6804040ab6d7255162 | [
"BSD-3-Clause"
] | null | null | null | src/narviexe/Build.py | sspiff/narvi | aa56529f15be197422b23a6804040ab6d7255162 | [
"BSD-3-Clause"
] | null | null | null | src/narviexe/Build.py | sspiff/narvi | aa56529f15be197422b23a6804040ab6d7255162 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2014, Brian Boylston
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list... | 46.236842 | 80 | 0.766079 |
6fff842b7b0d3bf0e79b5b5c645bdc89a3fae8b5 | 855 | py | Python | demo_colorkey01.py | svdmaar/pygame_demos | 8fb599134ba9db7c833a53fdc152ef0784f6c4b9 | [
"MIT"
] | null | null | null | demo_colorkey01.py | svdmaar/pygame_demos | 8fb599134ba9db7c833a53fdc152ef0784f6c4b9 | [
"MIT"
] | null | null | null | demo_colorkey01.py | svdmaar/pygame_demos | 8fb599134ba9db7c833a53fdc152ef0784f6c4b9 | [
"MIT"
] | null | null | null | import Demo
import pygame
# https://www.pygame.org/docs/ref/surface.html#pygame.Surface.convert
# https://www.pygame.org/docs/ref/image.html#pygame.image.load
# https://www.pygame.org/docs/ref/surface.html#pygame.Surface.copy
class Demo_Colorkey01(Demo.Demo):
def setup(self, screen):
super().setup(screen)
... | 31.666667 | 69 | 0.666667 |
1e7849ec61d53dea40fee292e6d9bb41658a7b0c | 4,878 | py | Python | nginxfmt.py | zhangxinhang/FormatNginxConf | ce17edbe27cfc636cd2066bff08158b5007108cb | [
"Apache-2.0"
] | null | null | null | nginxfmt.py | zhangxinhang/FormatNginxConf | ce17edbe27cfc636cd2066bff08158b5007108cb | [
"Apache-2.0"
] | null | null | null | nginxfmt.py | zhangxinhang/FormatNginxConf | ce17edbe27cfc636cd2066bff08158b5007108cb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Script formats nginx configuration file."""
import argparse
import codecs
import re
__author__ = "Michał Słomkowski"
__license__ = "Apache 2.0"
INDENTATION = ' ' * 4
def strip_line(single_line):
"""Strips the line and replaces neighbouring whitespaces with si... | 33.183673 | 119 | 0.645346 |
32c03e4466242a75132c0e0ecbbfe6bfbf012631 | 1,210 | py | Python | invenio_drafts_resources/serializers/json.py | zzacharo/invenio-drafts-resources | 0845d55d03009b8ea5a6936a82eb0146e5ddce4d | [
"MIT"
] | null | null | null | invenio_drafts_resources/serializers/json.py | zzacharo/invenio-drafts-resources | 0845d55d03009b8ea5a6936a82eb0146e5ddce4d | [
"MIT"
] | null | null | null | invenio_drafts_resources/serializers/json.py | zzacharo/invenio-drafts-resources | 0845d55d03009b8ea5a6936a82eb0146e5ddce4d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CERN.
# Copyright (C) 2020 Northwestern University.
#
# Invenio-Drafts-Resources is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
"""JSON serializer for Draft."""
import pytz
from inveni... | 30.25 | 75 | 0.670248 |
0970b9ad7614a84f468d83f8de90de992c7f521f | 1,110 | py | Python | setup.py | tabac/cprofilev | dd9ee42ef8e68d08dbdde88ddce854aac55ef934 | [
"MIT"
] | null | null | null | setup.py | tabac/cprofilev | dd9ee42ef8e68d08dbdde88ddce854aac55ef934 | [
"MIT"
] | null | null | null | setup.py | tabac/cprofilev | dd9ee42ef8e68d08dbdde88ddce854aac55ef934 | [
"MIT"
] | 1 | 2019-09-15T12:56:29.000Z | 2019-09-15T12:56:29.000Z | from setuptools import setup
import sys
if sys.version_info < (2,5):
raise NotImplementedError(
"Sorry, you need at least Python 2.5 to use cprofilev.")
VERSION = '1.0.4'
__doc__ = """\
An easier way to use cProfile.
Outputs a simpler html view of profiled stats.
Able to show stats while the code is st... | 24.130435 | 64 | 0.636937 |
1226153f3c1386a15303248a94e52b15ad505625 | 3,792 | py | Python | pint/testsuite/__init__.py | tiagocoutinho/pint | 91d798d1523d22e3d3c470799e6bb6eed2f761e2 | [
"BSD-3-Clause"
] | 1 | 2015-10-16T13:46:04.000Z | 2015-10-16T13:46:04.000Z | pint/testsuite/__init__.py | tiagocoutinho/pint | 91d798d1523d22e3d3c470799e6bb6eed2f761e2 | [
"BSD-3-Clause"
] | null | null | null | pint/testsuite/__init__.py | tiagocoutinho/pint | 91d798d1523d22e3d3c470799e6bb6eed2f761e2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import division, unicode_literals, print_function, absolute_import
import os
import sys
import logging
if sys.version_info < (2, 7):
import unittest2 as unittest
else:
import unittest
try:
import numpy as np
HAS_NUMPY = True
ndarray = np.ndarray
NUMPY_... | 32.135593 | 108 | 0.618935 |
f001fc1330c9f75262dd7a9133ec8a7196d7c625 | 1,091 | py | Python | exercise/venv/lib/python3.7/site-packages/sqreen/frameworks/async_utils.py | assuzzanne/my-sqreen | 81ae0eab417a1dbc0ae6b1778ebfdd71591c3c5b | [
"MIT"
] | null | null | null | exercise/venv/lib/python3.7/site-packages/sqreen/frameworks/async_utils.py | assuzzanne/my-sqreen | 81ae0eab417a1dbc0ae6b1778ebfdd71591c3c5b | [
"MIT"
] | 1 | 2021-06-02T00:27:34.000Z | 2021-06-02T00:27:34.000Z | exercise/venv/lib/python3.7/site-packages/sqreen/frameworks/async_utils.py | assuzzanne/notifications-dispatcher-api | 81ae0eab417a1dbc0ae6b1778ebfdd71591c3c5b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2016, 2017, 2018, 2019 Sqreen. All rights reserved.
# Please refer to our terms for more information:
#
# https://www.sqreen.io/terms.html
#
"""Utility functions for asyncio."""
import asyncio
import threading
# Dedicated event loop for calling coroutines in a synchronous c... | 25.97619 | 76 | 0.688359 |
fc5306f3ad55aea7af4570014d0671d20f2d4eb4 | 15,593 | py | Python | main_agentverbq_verbmlp.py | thilinicooray/mac-network-pytorch | 0e4bf3f7f301570b652490f697758361c866f3c1 | [
"MIT"
] | null | null | null | main_agentverbq_verbmlp.py | thilinicooray/mac-network-pytorch | 0e4bf3f7f301570b652490f697758361c866f3c1 | [
"MIT"
] | null | null | null | main_agentverbq_verbmlp.py | thilinicooray/mac-network-pytorch | 0e4bf3f7f301570b652490f697758361c866f3c1 | [
"MIT"
] | null | null | null | import torch
from imsitu_encoder_sameverbq import imsitu_encoder
from imsitu_loader import imsitu_loader_agentverbq
from imsitu_scorer_updated import imsitu_scorer
import json
import model_agentverbq_verbmlp
import os
import utils
import torchvision as tv
#from torchviz import make_dot
#from graphviz import Digraph
... | 41.470745 | 180 | 0.590008 |
8d1801693e6898ae5fd4b6a49b28c8a6240d6726 | 19,019 | py | Python | models/fixed_environment.py | gizatt/scene_generation | cd978b4fe8ac58983894db3fb93d625c85578dd6 | [
"MIT"
] | 5 | 2018-11-27T18:46:01.000Z | 2020-09-06T19:59:12.000Z | models/fixed_environment.py | gizatt/scene_generation | cd978b4fe8ac58983894db3fb93d625c85578dd6 | [
"MIT"
] | null | null | null | models/fixed_environment.py | gizatt/scene_generation | cd978b4fe8ac58983894db3fb93d625c85578dd6 | [
"MIT"
] | null | null | null | from copy import deepcopy
from collections import namedtuple
import datetime
import io
import matplotlib
import matplotlib.patches as patches
import matplotlib.pyplot as plt
# Must be before torch.
import pydrake
import numpy as np
import scipy as sp
import scipy.stats
import time
from tensorboardX import SummaryWrite... | 42.264444 | 136 | 0.633524 |
76c9889c1ee5b5dc0364f78ee186e9ab8f8947f4 | 1,305 | py | Python | authors/apps/articles/pagination.py | C3real-kill3r/binary-jungle-backend | 5333138fbce901e75accf5487b10990979afa571 | [
"MIT"
] | null | null | null | authors/apps/articles/pagination.py | C3real-kill3r/binary-jungle-backend | 5333138fbce901e75accf5487b10990979afa571 | [
"MIT"
] | 8 | 2020-02-12T03:04:07.000Z | 2022-03-12T00:07:31.000Z | authors/apps/articles/pagination.py | C3real-kill3r/binary-jungle-backend | 5333138fbce901e75accf5487b10990979afa571 | [
"MIT"
] | null | null | null | from rest_framework.pagination import PageNumberPagination
from rest_framework.response import Response
class StandardResultsSetPagination(PageNumberPagination):
"""
A page number style that supports page numbers as
query params
`example usage`
http://localhost:8000/api/articles/?page=3
http:/... | 33.461538 | 82 | 0.682759 |
d0fc97fc479735111620dab362f545213a2e20e5 | 3,899 | py | Python | test/component/test_smarthue.py | ThomasDevoogdt/SmartHue | a2f32507d8b8b5e30ef8b2565d89df1291f09f8f | [
"MIT"
] | 1 | 2021-06-28T18:12:04.000Z | 2021-06-28T18:12:04.000Z | test/component/test_smarthue.py | ThomasDevoogdt/SmartHue | a2f32507d8b8b5e30ef8b2565d89df1291f09f8f | [
"MIT"
] | null | null | null | test/component/test_smarthue.py | ThomasDevoogdt/SmartHue | a2f32507d8b8b5e30ef8b2565d89df1291f09f8f | [
"MIT"
] | null | null | null | import os
import sys
import json
import logging
import pytest
repo_name = "SmartHue"
sys.path.append("{}{}/".format(os.path.abspath(__file__).split(repo_name)[0], repo_name))
from smartHuePy.helpers.helpers import *
logging.basicConfig(filename='test.log', filemode='w', level=logging.DEBUG)
devices_config_path = "%s/... | 33.324786 | 103 | 0.680174 |
deb6b5cb2934d64ac9b77dbe462f1d19edabd271 | 15,826 | py | Python | shadowsocks/shell.py | javanodejs/shadowsocks | 2b4ab1a0faa75eb2b408f566c9943d5270f70d60 | [
"Apache-2.0"
] | null | null | null | shadowsocks/shell.py | javanodejs/shadowsocks | 2b4ab1a0faa75eb2b408f566c9943d5270f70d60 | [
"Apache-2.0"
] | null | null | null | shadowsocks/shell.py | javanodejs/shadowsocks | 2b4ab1a0faa75eb2b408f566c9943d5270f70d60 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 clowwindy
#
# 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... | 35.484305 | 102 | 0.54916 |
578e5f4fa2c1ae73afbd0220ad28fb545150eb1a | 812 | py | Python | regiongrowing.py | srinivas-narayan/SimpleITKProject | 210385f028a9f55242f5a7102fdbf9971d832177 | [
"Apache-2.0"
] | null | null | null | regiongrowing.py | srinivas-narayan/SimpleITKProject | 210385f028a9f55242f5a7102fdbf9971d832177 | [
"Apache-2.0"
] | null | null | null | regiongrowing.py | srinivas-narayan/SimpleITKProject | 210385f028a9f55242f5a7102fdbf9971d832177 | [
"Apache-2.0"
] | null | null | null | import SimpleITK as sitk
import numpy as np
image = sitk.ReadImage('data/MR/subject101_ed.nii')
labels = sitk.ReadImage('data/MR/subject101_ed_label.nii')
labels = sitk.GetArrayFromImage(labels)
#help(sitk.IsolatedWatershed)
region = sitk.ConfidenceConnected(image, [[70, 134, 139]], multiplier=2)
region_data = sitk.G... | 29 | 72 | 0.779557 |
e191ed688ae5b1ae460ca5917cb1e4be506dd8c6 | 492 | py | Python | packages/python/plotly/plotly/validators/icicle/marker/line/_width.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/icicle/marker/line/_width.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/icicle/marker/line/_width.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class WidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="width", parent_name="icicle.marker.line", **kwargs):
super(WidthValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 35.142857 | 88 | 0.642276 |
a4344c6a0cc4dc77a0e28cc727512863bd4087bc | 5,313 | py | Python | python3.4Smartforest/lib/python3.4/site-packages/django/db/backends/oracle/schema.py | letouriste001/SmartForest_2.0 | 109b78bf1e8c8404800f377ab969395ccbb617be | [
"MIT"
] | null | null | null | python3.4Smartforest/lib/python3.4/site-packages/django/db/backends/oracle/schema.py | letouriste001/SmartForest_2.0 | 109b78bf1e8c8404800f377ab969395ccbb617be | [
"MIT"
] | null | null | null | python3.4Smartforest/lib/python3.4/site-packages/django/db/backends/oracle/schema.py | letouriste001/SmartForest_2.0 | 109b78bf1e8c8404800f377ab969395ccbb617be | [
"MIT"
] | null | null | null | import binascii
import copy
import datetime
import re
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
from django.db.utils import DatabaseError
from django.utils import six
from django.utils.text import force_text
class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
sql_create_column = "ALT... | 5,313 | 5,313 | 0.624882 |
48a332e4aa568f9efab1cbba4a497dc12ab2343c | 136 | py | Python | setup.py | mhucka/tsi-v2 | 58003ca7ab3146be2091008093840fe09c653927 | [
"RSA-MD"
] | null | null | null | setup.py | mhucka/tsi-v2 | 58003ca7ab3146be2091008093840fe09c653927 | [
"RSA-MD"
] | null | null | null | setup.py | mhucka/tsi-v2 | 58003ca7ab3146be2091008093840fe09c653927 | [
"RSA-MD"
] | null | null | null | from setuptools import setup
setup(
name = 'tsi-v2',
packages = ['.', 'tsi-v2'],
package_data = {'.' : ['README.md']},
)
| 17 | 41 | 0.529412 |
1bbe0b0c363bfad45c30daa53cbcf9468892375e | 16,502 | py | Python | zhmccli/_cmd_capacitygroup.py | zhmcclient/python-zhmccli | 48d80a9566f1f61775ab983c0d9198754848972e | [
"Apache-2.0"
] | 7 | 2019-05-14T10:03:39.000Z | 2022-02-22T08:57:29.000Z | zhmccli/_cmd_capacitygroup.py | zhmcclient/python-zhmccli | 48d80a9566f1f61775ab983c0d9198754848972e | [
"Apache-2.0"
] | 257 | 2017-09-21T09:11:46.000Z | 2022-03-31T13:59:01.000Z | zhmccli/_cmd_capacitygroup.py | zhmcclient/python-zhmccli | 48d80a9566f1f61775ab983c0d9198754848972e | [
"Apache-2.0"
] | 4 | 2018-11-27T14:49:49.000Z | 2021-02-20T04:59:40.000Z | # Copyright 2021 IBM Corp. 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 agre... | 37.419501 | 80 | 0.686341 |
c226c52c07ba141bd484b6340c412dead14d197a | 6,360 | py | Python | WebBrickLibs/coherence/upnp/core/soap_service.py | AndyThirtover/wb_gateway | 69f9c870369085f4440033201e2fb263a463a523 | [
"BSD-3-Clause"
] | null | null | null | WebBrickLibs/coherence/upnp/core/soap_service.py | AndyThirtover/wb_gateway | 69f9c870369085f4440033201e2fb263a463a523 | [
"BSD-3-Clause"
] | null | null | null | WebBrickLibs/coherence/upnp/core/soap_service.py | AndyThirtover/wb_gateway | 69f9c870369085f4440033201e2fb263a463a523 | [
"BSD-3-Clause"
] | null | null | null | # Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright 2007 - Frank Scholz <coherence@beebits.net>
from twisted.web import server, resource
from twisted.python import failure
from twisted.internet import defer
from coherence import log, SERVER_ID
from coherence.extern.et impor... | 34.945055 | 104 | 0.592767 |
57e5a1e9f444a2f24e0748696649f7d55bcd586d | 447 | py | Python | Python - Desafios e Execercios resolvidos/008.py | RamonesQ/Projetos | 25f6077102df3580ca5a6d37b860aa2cd0d2487d | [
"MIT"
] | null | null | null | Python - Desafios e Execercios resolvidos/008.py | RamonesQ/Projetos | 25f6077102df3580ca5a6d37b860aa2cd0d2487d | [
"MIT"
] | null | null | null | Python - Desafios e Execercios resolvidos/008.py | RamonesQ/Projetos | 25f6077102df3580ca5a6d37b860aa2cd0d2487d | [
"MIT"
] | null | null | null | valor = float(input("Digite o valor em metros: "))
print(f"{valor} metros equivalem a \n{valor/1000} quilômetros; \n{valor/100} hectômetros; \n{valor/10} decâmetros; \n{valor*10} decímetros; \n{(valor*100)} centímetros; \n{(valor*1000)} milímetros.")
# m = float(input('Uma distância em Metros: '))
# print('A medida ... | 63.857143 | 199 | 0.639821 |
4487e5f7ce721fa59136396024496229f6e355c2 | 807 | py | Python | app/views.py | jezzlucena/django-opp-trans | 05e8b2b91a6c46cd800837ae2b683ec043243742 | [
"MIT"
] | 1 | 2021-03-03T02:22:11.000Z | 2021-03-03T02:22:11.000Z | app/views.py | jezzlucena/django-opp-trans | 05e8b2b91a6c46cd800837ae2b683ec043243742 | [
"MIT"
] | null | null | null | app/views.py | jezzlucena/django-opp-trans | 05e8b2b91a6c46cd800837ae2b683ec043243742 | [
"MIT"
] | null | null | null | import logging
import os
from django.conf import settings
from django.http import HttpResponse
from django.shortcuts import render
from django.views.decorators.csrf import csrf_exempt
def index(request):
return render(request, "index.html", {})
def frontend(request):
try:
with open(os.path.join(sett... | 31.038462 | 84 | 0.654275 |
d8512de86a486a5e4083e716b20b1527111a8a7a | 6,858 | py | Python | clients/keto/python/ory_keto_client/model/do_ory_access_control_policies_allow_forbidden.py | simoneromano96/sdk | a6113d0daefbbb803790297e4b242d4c7cbbcb22 | [
"Apache-2.0"
] | null | null | null | clients/keto/python/ory_keto_client/model/do_ory_access_control_policies_allow_forbidden.py | simoneromano96/sdk | a6113d0daefbbb803790297e4b242d4c7cbbcb22 | [
"Apache-2.0"
] | null | null | null | clients/keto/python/ory_keto_client/model/do_ory_access_control_policies_allow_forbidden.py | simoneromano96/sdk | a6113d0daefbbb803790297e4b242d4c7cbbcb22 | [
"Apache-2.0"
] | null | null | null | """
ORY Keto
A cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs. # noqa: E501
The version of the OpenAPI document: v0.0.0
Contact: hi@ory.sh
Generated by: https://openapi-generator.tech
"""
import re # ... | 39.188571 | 161 | 0.594634 |
b3c1c15f96c0852cb6d963403b81d8941c73d18c | 2,890 | py | Python | test/functional/mempool_resurrect_test.py | caapisas88/lukcore | 08180eb199c61f6f6c26e13fb0f2a0463f7606a7 | [
"MIT"
] | null | null | null | test/functional/mempool_resurrect_test.py | caapisas88/lukcore | 08180eb199c61f6f6c26e13fb0f2a0463f7606a7 | [
"MIT"
] | null | null | null | test/functional/mempool_resurrect_test.py | caapisas88/lukcore | 08180eb199c61f6f6c26e13fb0f2a0463f7606a7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2016 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 resurrection of mined transactions when the blockchain is re-organized."""
from test_framework.te... | 41.884058 | 105 | 0.658824 |
aec645c2ca97ee9b1f3e5bf172ebbc35b986428e | 242 | py | Python | stringreplace.py | learningandgrowing/Data-structures-problems | 444a6dad145c9571c0f0989f7049074cf4d1b17b | [
"MIT"
] | null | null | null | stringreplace.py | learningandgrowing/Data-structures-problems | 444a6dad145c9571c0f0989f7049074cf4d1b17b | [
"MIT"
] | null | null | null | stringreplace.py | learningandgrowing/Data-structures-problems | 444a6dad145c9571c0f0989f7049074cf4d1b17b | [
"MIT"
] | null | null | null | def replacechar(s, a,b):
if len(s) == 0:
return s
smalloutput = replacechar(s[1:],a,b)
if s[0]==a:
return b + smalloutput
else:
return s[0]+ smalloutput
s = "acdckc"
print(replacechar(s, 'c', 'x')) | 22 | 40 | 0.533058 |
a1e8c8464cecd66a047183c286758f5d3ad2672b | 149 | py | Python | leetCode/algorithms/easy/concatenation_of_array.py | ferhatelmas/algo | a7149c7a605708bc01a5cd30bf5455644cefd04d | [
"WTFPL"
] | 25 | 2015-01-21T16:39:18.000Z | 2021-05-24T07:01:24.000Z | leetCode/algorithms/easy/concatenation_of_array.py | ferhatelmas/algo | a7149c7a605708bc01a5cd30bf5455644cefd04d | [
"WTFPL"
] | 2 | 2020-09-30T19:39:36.000Z | 2020-10-01T17:15:16.000Z | leetCode/algorithms/easy/concatenation_of_array.py | ferhatelmas/algo | a7149c7a605708bc01a5cd30bf5455644cefd04d | [
"WTFPL"
] | 15 | 2015-01-21T16:39:27.000Z | 2020-10-01T17:00:22.000Z | from typing import List
class Solution:
def getConcatenation(self, nums: List[int]) -> List[int]:
nums[0:0] = nums
return nums
| 18.625 | 61 | 0.630872 |
8c7c7aa9e22221168e4fa7e0b76c3733c5d8f9f5 | 3,858 | py | Python | purity_fb/purity_fb_1dot1/models/pure_object.py | mabdelhafez/purity_fb_python_client | a9856875b3df43b4302a2e4addd1a6b71f51f5ce | [
"Apache-2.0"
] | null | null | null | purity_fb/purity_fb_1dot1/models/pure_object.py | mabdelhafez/purity_fb_python_client | a9856875b3df43b4302a2e4addd1a6b71f51f5ce | [
"Apache-2.0"
] | null | null | null | purity_fb/purity_fb_1dot1/models/pure_object.py | mabdelhafez/purity_fb_python_client | a9856875b3df43b4302a2e4addd1a6b71f51f5ce | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Pure Storage FlashBlade REST 1.1 Python SDK
Pure Storage FlashBlade REST 1.1 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/).
OpenAPI spec version: 1.1
Contact: i... | 25.051948 | 204 | 0.539917 |
d26520c3406d33335baf188ef72dbac4edbecb87 | 23,028 | py | Python | asposepdfcloud/models/combo_box_field.py | kaferi/aspose-pdf-cloud-python | 48f70742fec1e41644ec0b658db3f174ba845304 | [
"MIT"
] | 7 | 2018-06-11T17:44:44.000Z | 2022-02-08T05:52:48.000Z | asposepdfcloud/models/combo_box_field.py | kaferi/aspose-pdf-cloud-python | 48f70742fec1e41644ec0b658db3f174ba845304 | [
"MIT"
] | 1 | 2021-03-20T22:16:15.000Z | 2021-06-27T15:11:52.000Z | asposepdfcloud/models/combo_box_field.py | kaferi/aspose-pdf-cloud-python | 48f70742fec1e41644ec0b658db3f174ba845304 | [
"MIT"
] | 4 | 2018-04-18T19:41:12.000Z | 2021-06-21T13:12:24.000Z | # coding: utf-8
"""
Aspose.PDF Cloud API Reference
Copyright (c) 2021 Aspose.PDF Cloud
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the r... | 27.28436 | 435 | 0.595058 |
40e81109898e0efe932684679d6fed2a893b5852 | 14,370 | py | Python | Assignment4/mypython/lib/python2.7/site-packages/sklearn/svm/tests/test_sparse.py | haniamatera/cds-visual_new | 91c52cb607c839e6b23881aca047bda7c9888b29 | [
"MIT"
] | 1 | 2019-09-26T01:31:26.000Z | 2019-09-26T01:31:26.000Z | SVMToCoreML/venv/Lib/site-packages/sklearn/svm/tests/test_sparse.py | blueXstar597/HandwritingRecognition | a0864297247108e4a1b55100c71122510cecaa36 | [
"MIT"
] | 5 | 2020-06-05T22:37:24.000Z | 2022-03-11T23:57:37.000Z | SVMToCoreML/venv/Lib/site-packages/sklearn/svm/tests/test_sparse.py | blueXstar597/HandwritingRecognition | a0864297247108e4a1b55100c71122510cecaa36 | [
"MIT"
] | null | null | null | import pytest
import numpy as np
from numpy.testing import (assert_array_almost_equal, assert_array_equal,
assert_equal)
from scipy import sparse
from sklearn import datasets, svm, linear_model, base
from sklearn.datasets import make_classification, load_digits, make_blobs
from sklearn.svm.... | 39.478022 | 79 | 0.649548 |
a95f08f58e500d75a8be6fea811cfbd323f6feb8 | 37,446 | py | Python | tests/test_server_config.py | hamzakaya/edgedb | ac63f4e1413c2b5b19f5f9ec17d6d7b9c7107f36 | [
"Apache-2.0"
] | null | null | null | tests/test_server_config.py | hamzakaya/edgedb | ac63f4e1413c2b5b19f5f9ec17d6d7b9c7107f36 | [
"Apache-2.0"
] | null | null | null | tests/test_server_config.py | hamzakaya/edgedb | ac63f4e1413c2b5b19f5f9ec17d6d7b9c7107f36 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2019-present MagicStack Inc. and the EdgeDB 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... | 31.101329 | 79 | 0.481814 |
777f2aa0b4852b8ce42e7faba578c82fdf47fc51 | 52,288 | py | Python | openprocurement/bot/identification/tests/test_edr_handler.py | JrooTJunior/openprocurement.bot.identification | a15ece020fcc912ff2d5fdee9aa4899136a68075 | [
"Apache-2.0"
] | null | null | null | openprocurement/bot/identification/tests/test_edr_handler.py | JrooTJunior/openprocurement.bot.identification | a15ece020fcc912ff2d5fdee9aa4899136a68075 | [
"Apache-2.0"
] | 102 | 2017-03-14T11:01:30.000Z | 2018-01-26T06:38:51.000Z | openprocurement/bot/identification/tests/test_edr_handler.py | JrooTJunior/openprocurement.bot.identification | a15ece020fcc912ff2d5fdee9aa4899136a68075 | [
"Apache-2.0"
] | 4 | 2017-03-14T08:37:36.000Z | 2018-06-22T09:01:34.000Z | # -*- coding: utf-8 -*-
from gevent import monkey
from openprocurement.bot.identification.databridge.caching import Db
monkey.patch_all()
import uuid
import gevent
import datetime
import requests_mock
import random
from gevent.queue import Queue
from gevent.hub import LoopExit
from mock import patch, MagicMock
from ... | 68.439791 | 120 | 0.571164 |
f451680f63213de28ffec7a38d47c55441bd6b2d | 559 | py | Python | app/models/oauth/token.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 11 | 2015-04-23T21:57:56.000Z | 2019-04-28T12:48:58.000Z | app/models/oauth/token.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 1 | 2016-10-05T14:10:58.000Z | 2016-10-05T14:12:23.000Z | app/models/oauth/token.py | tch1bo/viaduct | bfd37b0a8408b2dd66fb01138163b80ce97699ff | [
"MIT"
] | 3 | 2016-10-05T14:00:42.000Z | 2019-01-16T14:33:43.000Z | import time
from authlib.flask.oauth2 import sqla
from app import db
class OAuthToken(db.Model, sqla.OAuth2TokenMixin):
__tablename__ = 'oauth_token'
id = db.Column(db.Integer, primary_key=True)
user = db.relationship('User')
user_id = db.Column(db.Integer, db.ForeignKey('user.id'))
def is_ac... | 25.409091 | 63 | 0.694097 |
d360ebf277254d84dbb2dc538217af5adea2c208 | 5,182 | py | Python | pychron/lasers/tasks/panes/chromium.py | aelamspychron/pychron | ad87c22b0817c739c7823a24585053041ee339d5 | [
"Apache-2.0"
] | 1 | 2019-02-27T21:57:44.000Z | 2019-02-27T21:57:44.000Z | pychron/lasers/tasks/panes/chromium.py | aelamspychron/pychron | ad87c22b0817c739c7823a24585053041ee339d5 | [
"Apache-2.0"
] | 20 | 2020-09-09T20:58:39.000Z | 2021-10-05T17:48:37.000Z | pychron/lasers/tasks/panes/chromium.py | AGESLDEO/pychron | 1a81e05d9fba43b797f335ceff6837c016633bcf | [
"Apache-2.0"
] | null | null | null | # ===============================================================================
# Copyright 2013 Jake Ross
#
# 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/licens... | 54.547368 | 120 | 0.528174 |
a187231496dc22ea2f5f1af62dc0b9cee6d457d5 | 1,573 | py | Python | pcat2py/class/21196dc8-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | pcat2py/class/21196dc8-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | pcat2py/class/21196dc8-5cc5-11e4-af55-00155d01fe08.py | phnomcobra/PCAT2PY | 937c3b365cdc5ac69b78f59070be0a21bdb53db0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
################################################################################
# 21196dc8-5cc5-11e4-af55-00155d01fe08
#
# Justin Dierking
# justindierking@hardbitsolutions.com
# phnomcobra@gmail.com
#
# 10/24/2014 Original Construction
################################################################... | 41.394737 | 168 | 0.626828 |
85840dc9b2bd06086f8b148d29425331df8eaad9 | 11,374 | py | Python | tensorflow_gan/python/contrib_utils.py | marbiru/gan | c5aa09b0a104f530aea09073cf795d2b3b582218 | [
"Apache-2.0"
] | null | null | null | tensorflow_gan/python/contrib_utils.py | marbiru/gan | c5aa09b0a104f530aea09073cf795d2b3b582218 | [
"Apache-2.0"
] | null | null | null | tensorflow_gan/python/contrib_utils.py | marbiru/gan | c5aa09b0a104f530aea09073cf795d2b3b582218 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The TensorFlow GAN 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 applicabl... | 34.053892 | 80 | 0.710744 |
7a2a3d1c533ef660ff8a479c8a6023ea04caad0e | 1,123 | py | Python | oscar/lib/python2.7/site-packages/treebeard/tests/conftest.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/treebeard/tests/conftest.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/treebeard/tests/conftest.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """
Py.test configuration file
Maik says: There's some magic in here that I don't fully understand. Normally, one would
use pytest-django to run the tests, which takes care of all the Django-related testcase
set up and tear down. But that doesn't work because the current tests attempt to access the
database not ... | 32.085714 | 92 | 0.762244 |
ac19b415b5342f6b3e71eafd15ccc2276efa5862 | 207 | py | Python | tests/models/test_random_nas_model.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | 1 | 2022-01-17T00:34:14.000Z | 2022-01-17T00:34:14.000Z | tests/models/test_random_nas_model.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | null | null | null | tests/models/test_random_nas_model.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | null | null | null | import hydra
from omegaconf import OmegaConf
if __name__ == '__main__':
cfg = OmegaConf.load('../../configs/model/random_model.yaml')
nas_net = hydra.utils.instantiate(cfg, _recursive_=False)
| 29.571429 | 66 | 0.714976 |
930ea2dd6d30440e5ddc7bdb93b642d734a35403 | 13,716 | py | Python | document_library/south_migrations/0016_auto__add_field_documenttitle_meta_description.py | bitlabstudio/django-document-library | 0427687bf601f188e55e6a311af8d8ce34c08432 | [
"MIT"
] | 6 | 2016-11-27T13:16:08.000Z | 2021-07-14T02:38:00.000Z | document_library/south_migrations/0016_auto__add_field_documenttitle_meta_description.py | bitlabstudio/django-document-library | 0427687bf601f188e55e6a311af8d8ce34c08432 | [
"MIT"
] | 1 | 2017-09-20T22:31:24.000Z | 2020-12-08T17:00:58.000Z | document_library/south_migrations/0016_auto__add_field_documenttitle_meta_description.py | bitlabstudio/django-document-library | 0427687bf601f188e55e6a311af8d8ce34c08432 | [
"MIT"
] | 3 | 2017-01-11T05:37:40.000Z | 2021-01-09T12:12:23.000Z | # flake8: noqa
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
try:
from django.contrib.auth import get_user_model
except ImportError: # Django < 1.5
from django.contrib.auth.models import User
else:
User = get_user_model()
... | 76.2 | 193 | 0.576407 |
ffdc3b47a0aed966d41adef53d607b3175e656a9 | 44,672 | py | Python | events/input_events.py | mtasa-typescript/mtasa-wiki-dump | edea1746850fb6c99d6155d1d7891e2cceb33a5c | [
"MIT"
] | null | null | null | events/input_events.py | mtasa-typescript/mtasa-wiki-dump | edea1746850fb6c99d6155d1d7891e2cceb33a5c | [
"MIT"
] | 1 | 2021-02-24T21:50:18.000Z | 2021-02-24T21:50:18.000Z | events/input_events.py | mtasa-typescript/mtasa-wiki-dump | edea1746850fb6c99d6155d1d7891e2cceb33a5c | [
"MIT"
] | null | null | null | # Autogenerated file. ANY CHANGES WILL BE OVERWRITTEN
from to_python.core.types import FunctionType, \
FunctionArgument, \
FunctionArgumentValues, \
FunctionReturnTypes, \
FunctionSignature, \
FunctionDoc, \
EventData, \
CompoundEventData
DUMP_PARTIAL = [
CompoundEventData(
serv... | 40.759124 | 466 | 0.346056 |
52b3618731197ff3f9fe6d6a989efcfc143ef2bc | 644 | py | Python | donations/serializers/donations_images.py | bgildson/tem_doacao_api | 2c3443f504b26ec3954f89dcebfcce9d29a38448 | [
"MIT"
] | null | null | null | donations/serializers/donations_images.py | bgildson/tem_doacao_api | 2c3443f504b26ec3954f89dcebfcce9d29a38448 | [
"MIT"
] | 10 | 2021-03-19T04:38:08.000Z | 2022-03-12T00:13:07.000Z | donations/serializers/donations_images.py | bgildson/tem_doacao_api | 2c3443f504b26ec3954f89dcebfcce9d29a38448 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from ..models import Donation, DonationImage
class DonationImageSerializer(serializers.ModelSerializer):
image = serializers.ImageField(required=True, allow_null=False)
donation_id = serializers.PrimaryKeyRelatedField(source='donation',
... | 32.2 | 85 | 0.565217 |
f36578ba7b6b6bdb8ad6de3687931f8db5125d22 | 4,867 | py | Python | other_stuff/DeepGomoku/GomokuTreeSearch.py | Project-Ellie/tutorials | 9090cc7669d3e59889b15139724e662ce11be1ee | [
"Apache-2.0"
] | 1 | 2019-02-17T12:39:58.000Z | 2019-02-17T12:39:58.000Z | other_stuff/DeepGomoku/GomokuTreeSearch.py | Project-Ellie/tutorials | 9090cc7669d3e59889b15139724e662ce11be1ee | [
"Apache-2.0"
] | 5 | 2020-01-28T22:33:04.000Z | 2021-11-10T19:45:24.000Z | other_stuff/DeepGomoku/GomokuTreeSearch.py | Project-Ellie/tutorials | 9090cc7669d3e59889b15139724e662ce11be1ee | [
"Apache-2.0"
] | null | null | null | from __future__ import (division, print_function, absolute_import)
import numpy as np
from operator import itemgetter
from RLTools import (State, Action, QFunction, VFunction, Policy, Actor)
class Move(Action):
def __init__(self, pos):
self.pos = pos
def __repr__(self):
return "(%s, %s)" % (ch... | 32.446667 | 87 | 0.577769 |
ca6a4ae1d70c7235521c57bc7467a949926109ab | 7,801 | py | Python | pyleecan/Methods/Slot/SlotW25/plot_schematics.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | null | null | null | pyleecan/Methods/Slot/SlotW25/plot_schematics.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | null | null | null | pyleecan/Methods/Slot/SlotW25/plot_schematics.py | IrakozeFD/pyleecan | 5a93bd98755d880176c1ce8ac90f36ca1b907055 | [
"Apache-2.0"
] | null | null | null | import matplotlib.pyplot as plt
from numpy import pi, exp
from ....Classes.Arc1 import Arc1
from ....Classes.LamSlot import LamSlot
from ....Classes.Segment import Segment
from ....definitions import config_dict
from ....Functions.Plot import (
ARROW_COLOR,
ARROW_WIDTH,
MAIN_LINE_COLOR,
MAIN_LINE_STYLE... | 30.956349 | 99 | 0.493142 |
b37c442a362655b5fbb2f72d7f1201591cd7d501 | 974 | py | Python | gallery/models.py | Joan-w/gallery | 640a4a1bf727acac37ff1b5b3f7907325a2e3d97 | [
"Unlicense"
] | null | null | null | gallery/models.py | Joan-w/gallery | 640a4a1bf727acac37ff1b5b3f7907325a2e3d97 | [
"Unlicense"
] | null | null | null | gallery/models.py | Joan-w/gallery | 640a4a1bf727acac37ff1b5b3f7907325a2e3d97 | [
"Unlicense"
] | null | null | null | from django.db import models
# Create your models here.
class Galleryimage(models.Model):
image = models.ImageField(upload_to='images/')
title = models.CharField(max_length=80)
summary = models.CharField(max_length=160)
def __str__(self):
return self.title
def save_image(self):
se... | 24.974359 | 64 | 0.676591 |
d148bd2e256025c3dec5f2226c9f0c468ec9b0d0 | 1,404 | py | Python | setup.py | stautonico/keymapviz | ee7e58a266ee7c2286d82803c1e379276581f712 | [
"MIT"
] | 70 | 2018-07-17T04:14:38.000Z | 2022-03-09T12:20:35.000Z | setup.py | stautonico/keymapviz | ee7e58a266ee7c2286d82803c1e379276581f712 | [
"MIT"
] | 29 | 2019-04-22T14:05:39.000Z | 2022-02-27T15:22:49.000Z | setup.py | stautonico/keymapviz | ee7e58a266ee7c2286d82803c1e379276581f712 | [
"MIT"
] | 23 | 2018-04-15T13:41:47.000Z | 2022-03-29T19:35:44.000Z | from setuptools import setup, find_packages
from os import path, chdir
from io import open
from glob import glob
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
def search_json_files():
chdir('keymapviz')
files = glo... | 27 | 68 | 0.638889 |
d332e03bd6ea8a0218facba653be2819be76b998 | 3,960 | py | Python | tests/test_listen_attend_spell_with_multi_head.py | SoYoungCho/openspeech-1 | 12eb432ea869288e097a5836236a6b658c40bb1b | [
"Apache-2.0",
"MIT"
] | 1 | 2022-02-16T09:02:43.000Z | 2022-02-16T09:02:43.000Z | tests/test_listen_attend_spell_with_multi_head.py | SoYoungCho/openspeech-1 | 12eb432ea869288e097a5836236a6b658c40bb1b | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/test_listen_attend_spell_with_multi_head.py | SoYoungCho/openspeech-1 | 12eb432ea869288e097a5836236a6b658c40bb1b | [
"Apache-2.0",
"MIT"
] | null | null | null | import unittest
import torch
import logging
from openspeech.models import ListenAttendSpellWithMultiHeadModel, ListenAttendSpellWithMultiHeadConfigs
from openspeech.vocabs.ksponspeech.character import KsponSpeechCharacterVocabulary
from openspeech.utils import (
DUMMY_INPUTS,
DUMMY_INPUT_LENGTHS,
DUMMY_TAR... | 36 | 107 | 0.691919 |
1d6d3ebee2c117a5b676cd37dc3f428d5e1e78d7 | 2,833 | py | Python | PyFlowPackages/PyFlowFreeCAD/Nodes/FreeCAD_Placement.py | awgrover/NodeEditor | 7e1826b1f80879f7eb5f35857582b5e13212a80a | [
"MIT"
] | 53 | 2019-07-17T17:42:13.000Z | 2022-02-07T20:19:48.000Z | PyFlowPackages/PyFlowFreeCAD/Nodes/FreeCAD_Placement.py | awgrover/NodeEditor | 7e1826b1f80879f7eb5f35857582b5e13212a80a | [
"MIT"
] | 13 | 2019-07-10T11:15:34.000Z | 2020-12-31T05:03:48.000Z | PyFlowPackages/PyFlowFreeCAD/Nodes/FreeCAD_Placement.py | awgrover/NodeEditor | 7e1826b1f80879f7eb5f35857582b5e13212a80a | [
"MIT"
] | 12 | 2019-07-10T11:03:39.000Z | 2022-02-15T11:58:14.000Z | '''
Placement of a FreeCAD object
'''
from PyFlow.Core import NodeBase
from PyFlow.Core.Common import *
from FreeCAD import Vector
import FreeCAD
import Part
from nodeeditor.say import *
from PyFlow.Packages.PyFlowFreeCAD.Nodes.FreeCAD_Base import timer, FreeCadNodeBase, FreeCadNodeBase2
# example shape
def crea... | 25.070796 | 108 | 0.666078 |
d387442ea7600a77bed9d03606f0349dd62d6ef5 | 964 | py | Python | kubernetes/test/test_v1_replica_set_list.py | reymont/python | 02a3a31c630c305527b328af49724f348fbdae15 | [
"Apache-2.0"
] | 1 | 2018-10-20T19:37:57.000Z | 2018-10-20T19:37:57.000Z | kubernetes/test/test_v1_replica_set_list.py | reymont/python | 02a3a31c630c305527b328af49724f348fbdae15 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_replica_set_list.py | reymont/python | 02a3a31c630c305527b328af49724f348fbdae15 | [
"Apache-2.0"
] | 2 | 2018-07-27T19:39:34.000Z | 2020-12-25T02:48:27.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.11.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 21.422222 | 105 | 0.709544 |
cb835ed393f01861d404708b65777a8c3a63240c | 26 | py | Python | constants.py | chintak/fast-hair-segmentation | 51a6994818bfe57620c45143c4eee363c517ad3d | [
"Apache-2.0"
] | 21 | 2017-12-13T07:34:32.000Z | 2021-06-01T19:50:31.000Z | constants.py | chintak/fast-hair-segmentation | 51a6994818bfe57620c45143c4eee363c517ad3d | [
"Apache-2.0"
] | 1 | 2017-12-07T08:33:32.000Z | 2017-12-07T08:33:32.000Z | constants.py | chintak/fast-hair-segmentation | 51a6994818bfe57620c45143c4eee363c517ad3d | [
"Apache-2.0"
] | 2 | 2018-06-05T07:35:34.000Z | 2018-07-13T18:03:05.000Z | HAIR, FACE, BKG = 0, 1, 2
| 13 | 25 | 0.538462 |
0e4c56e8b0a8be4bcd4477e1325ef4eb561df3f2 | 26,830 | py | Python | topics_frequent/array.py | shieric1412/pyLeetCode.github.io | 90161046fa9dfc54d2a1135a6d143e0d1f186b45 | [
"MIT"
] | null | null | null | topics_frequent/array.py | shieric1412/pyLeetCode.github.io | 90161046fa9dfc54d2a1135a6d143e0d1f186b45 | [
"MIT"
] | null | null | null | topics_frequent/array.py | shieric1412/pyLeetCode.github.io | 90161046fa9dfc54d2a1135a6d143e0d1f186b45 | [
"MIT"
] | null | null | null | from utilities.node import ListNode
from utilities.tree import TreeNode
from collections import deque, defaultdict
import heapq
class container_with_most_water_11:
def maxArea(self, height):
if height is None or len(height) == 0:
return 0
left = 0
right = len(height) ... | 29.290393 | 128 | 0.42691 |
72121bf5ce825ca5a7066f6e9ef3f22edf7b9b9a | 2,523 | py | Python | src/icolos/core/workflow_steps/gromacs/genion.py | CMargreitter/Icolos | fd7b664ce177df875fefa910dc4d5c574b521cb3 | [
"Apache-2.0"
] | 11 | 2022-01-30T14:36:13.000Z | 2022-03-22T09:40:57.000Z | src/icolos/core/workflow_steps/gromacs/genion.py | CMargreitter/Icolos | fd7b664ce177df875fefa910dc4d5c574b521cb3 | [
"Apache-2.0"
] | 2 | 2022-03-23T07:56:49.000Z | 2022-03-24T12:01:42.000Z | src/icolos/core/workflow_steps/gromacs/genion.py | CMargreitter/Icolos | fd7b664ce177df875fefa910dc4d5c574b521cb3 | [
"Apache-2.0"
] | 8 | 2022-01-28T10:32:31.000Z | 2022-03-22T09:40:59.000Z | from icolos.utils.enums.step_enums import StepBaseEnum, StepGromacsEnum
from icolos.utils.enums.program_parameters import GromacsEnum
from icolos.core.workflow_steps.gromacs.base import StepGromacsBase
from icolos.utils.execute_external.gromacs import GromacsExecutor
from pydantic import BaseModel
from icolos.core.work... | 35.041667 | 88 | 0.631391 |
47eaec3ef1b9f59ba95aa28c93836772a2dd05a5 | 2,789 | py | Python | lib/bbro/database.py | federico123579/BigBrother | 9b61dcf8fd84b6491690ae83bf695bc2b64b17b3 | [
"MIT"
] | 29 | 2017-03-14T11:48:54.000Z | 2022-02-22T02:01:25.000Z | lib/bbro/database.py | federico123579/BigBrother | 9b61dcf8fd84b6491690ae83bf695bc2b64b17b3 | [
"MIT"
] | null | null | null | lib/bbro/database.py | federico123579/BigBrother | 9b61dcf8fd84b6491690ae83bf695bc2b64b17b3 | [
"MIT"
] | 10 | 2017-07-16T18:58:05.000Z | 2021-09-27T23:45:24.000Z | #!/usr/bin/env python
# BigBrother
# Copyright 2017, Federico Lolli aka Mr.Robot
# :todo:
# add db manipulation database
import sqlite3 as lite
from core.globals import vars
import sys
class DBHandler(object):
def __init__(self):
try:
self.con = lite.connect(vars.db_path)
... | 32.811765 | 125 | 0.602008 |
fce9e3de59f0be367dccc4cb25fc4b06abe90a08 | 1,456 | py | Python | _38_imdbGRU.py | CICATA/TensorflowCertificationStudy | af5482c0591daffb02471a78c69d7e0e146791bd | [
"Apache-2.0"
] | null | null | null | _38_imdbGRU.py | CICATA/TensorflowCertificationStudy | af5482c0591daffb02471a78c69d7e0e146791bd | [
"Apache-2.0"
] | null | null | null | _38_imdbGRU.py | CICATA/TensorflowCertificationStudy | af5482c0591daffb02471a78c69d7e0e146791bd | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
import tensorflow_datasets as tfds
import tensorflow as tf
import matplotlib.pyplot as plt
# Get the data
dataset, info = tfds.load('imdb_reviews/subwords8k', with_info=True, as_supervised=True)
train_dataset, test_dataset = dataset['tr... | 30.333333 | 106 | 0.764423 |
662a221442e3b4d5a4043bd93702635cc7922389 | 5,267 | py | Python | bitmovin_api_sdk/encoding/filters/filters_api.py | hofmannben/bitmovin-api-sdk-python | 71aae5cd8a31aa0ad54ca07a6f546a624e8686a9 | [
"MIT"
] | null | null | null | bitmovin_api_sdk/encoding/filters/filters_api.py | hofmannben/bitmovin-api-sdk-python | 71aae5cd8a31aa0ad54ca07a6f546a624e8686a9 | [
"MIT"
] | 1 | 2020-07-06T07:13:43.000Z | 2020-07-06T07:13:43.000Z | bitmovin_api_sdk/encoding/filters/filters_api.py | hofmannben/bitmovin-api-sdk-python | 71aae5cd8a31aa0ad54ca07a6f546a624e8686a9 | [
"MIT"
] | 1 | 2020-07-06T07:07:26.000Z | 2020-07-06T07:07:26.000Z | # coding: utf-8
from __future__ import absolute_import
from bitmovin_api_sdk.common import BaseApi, BitmovinApiLoggerBase
from bitmovin_api_sdk.common.poscheck import poscheck_except
from bitmovin_api_sdk.models.filter import Filter
from bitmovin_api_sdk.models.response_envelope import ResponseEnvelope
from bitmovin_... | 32.512346 | 112 | 0.658819 |
033d78022c86f744f7562a1820abeb9775697ae4 | 1,653 | py | Python | examples/docs_snippets/docs_snippets/overview/repositories_workspaces/lazy_repository_definition.py | chasleslr/dagster | 88907f9473fb8e7a9b1af9a0a8b349d42f4b8153 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets/overview/repositories_workspaces/lazy_repository_definition.py | chasleslr/dagster | 88907f9473fb8e7a9b1af9a0a8b349d42f4b8153 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets/overview/repositories_workspaces/lazy_repository_definition.py | chasleslr/dagster | 88907f9473fb8e7a9b1af9a0a8b349d42f4b8153 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=unused-argument
import datetime
from dagster import InputDefinition, daily_schedule, lambda_solid, pipeline, repository
@lambda_solid
def return_one():
return 1
@lambda_solid
def return_two():
return 2
@lambda_solid(input_defs=[InputDefinition("left"), InputDefinition("right")])
def ad... | 23.28169 | 87 | 0.719298 |
008ac8917d79a33ee05e04c0343bd0d08e62b672 | 1,336 | py | Python | venv/lib/python3.8/site-packages/vsts/service_hooks/v4_1/models/formatted_event_message.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/service_hooks/v4_1/models/formatted_event_message.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | null | null | null | venv/lib/python3.8/site-packages/vsts/service_hooks/v4_1/models/formatted_event_message.py | amcclead7336/Enterprise_Data_Science_Final | ccdc0aa08d4726bf82d71c11a1cc0c63eb301a28 | [
"Unlicense",
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------------------... | 39.294118 | 95 | 0.503743 |
cde4ecee42ca37c8fce37d7d0cf52bcb4df873f4 | 4,892 | py | Python | blimpy/utils.py | alimony/blimpy | cb09964708f9de708a731656455d120312591217 | [
"BSD-3-Clause"
] | null | null | null | blimpy/utils.py | alimony/blimpy | cb09964708f9de708a731656455d120312591217 | [
"BSD-3-Clause"
] | null | null | null | blimpy/utils.py | alimony/blimpy | cb09964708f9de708a731656455d120312591217 | [
"BSD-3-Clause"
] | null | null | null | """
# utils.py
useful helper functions for common data manipulation tasks
"""
import numpy as np
def db(x, offset=0):
""" Convert linear to dB """
return 10 * np.log10(x + offset)
def lin(x):
""" Convert dB to linear """
return 10.0 ** (x / 10.0)
def closest(xarr, val):
""" Return the index of... | 31.159236 | 104 | 0.597711 |
dd6606f38058139b6646c2ec0112331070e896a9 | 22,700 | py | Python | nvtabular/loader/backend.py | thibaultcharrin/NVTabular | f2f11d8184b3c9777ce5549f3d3ac1f83ec4a438 | [
"Apache-2.0"
] | 124 | 2021-10-08T19:59:52.000Z | 2022-03-27T22:13:26.000Z | nvtabular/loader/backend.py | thibaultcharrin/NVTabular | f2f11d8184b3c9777ce5549f3d3ac1f83ec4a438 | [
"Apache-2.0"
] | 325 | 2021-10-08T19:58:49.000Z | 2022-03-31T21:27:39.000Z | nvtabular/loader/backend.py | mikemckiernan/NVTabular | efb93340653c4a69b1c3a60c88a82116d7906148 | [
"Apache-2.0"
] | 26 | 2021-10-13T21:43:22.000Z | 2022-03-29T14:33:58.000Z | #
# Copyright (c) 2021, NVIDIA CORPORATION.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 35.804416 | 98 | 0.588987 |
2592a17fe2ad1eaaa14b1e3ac996af774aac8b56 | 13,219 | py | Python | first-neural-network/Your_first_neural_network.py | fanlu/cn-deep-learning | 59de0a9ca08bccce2b6d6f9d0e0b5a79dca2cf6d | [
"MIT"
] | null | null | null | first-neural-network/Your_first_neural_network.py | fanlu/cn-deep-learning | 59de0a9ca08bccce2b6d6f9d0e0b5a79dca2cf6d | [
"MIT"
] | null | null | null | first-neural-network/Your_first_neural_network.py | fanlu/cn-deep-learning | 59de0a9ca08bccce2b6d6f9d0e0b5a79dca2cf6d | [
"MIT"
] | null | null | null |
# coding: utf-8
# # 你的第一个神经网络
#
# 在此项目中,你将构建你的第一个神经网络,并用该网络预测每日自行车租客人数。我们提供了一些代码,但是需要你来实现神经网络(大部分内容)。提交此项目后,欢迎进一步探索该数据和模型。
# In[2]:
get_ipython().magic('matplotlib inline')
get_ipython().magic("config InlineBackend.figure_format = 'retina'")
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
... | 33.808184 | 215 | 0.658673 |
fd623c7adbf5eb5e9567156c419cde2fbaedd889 | 1,659 | py | Python | mainmenu.py | wska/Queue-system-with-SQL-DB | 7646e1b92561b1e7d7876142fc61eea9a70f8481 | [
"MIT"
] | null | null | null | mainmenu.py | wska/Queue-system-with-SQL-DB | 7646e1b92561b1e7d7876142fc61eea9a70f8481 | [
"MIT"
] | null | null | null | mainmenu.py | wska/Queue-system-with-SQL-DB | 7646e1b92561b1e7d7876142fc61eea9a70f8481 | [
"MIT"
] | null | null | null | #Python 2.7.0
#William Skagerstrom, Teodor Karlgren
from Tkinter import Tk, Text, TOP, BOTH, X, N, LEFT
from Tkinter import *
from ttk import Frame, Label, Entry
from ttk import *
from doctorForm import *
from nurseForm import *
from queuePicker import *
#from main import *
import psycopg2
class Menu(Frame):
def... | 26.758065 | 95 | 0.661844 |
0979c5224c4a2c367fc5227585d46cf4ac5ee29b | 3,798 | py | Python | skype/analyzeSkypeApp.py | kalink0/useful_scripts | fd2e3af91e9d1fed877ac7bf9e6614c9f22216ca | [
"CC0-1.0"
] | 3 | 2019-09-08T14:07:13.000Z | 2021-06-12T15:33:12.000Z | skype/analyzeSkypeApp.py | kalink0/useful_scripts | fd2e3af91e9d1fed877ac7bf9e6614c9f22216ca | [
"CC0-1.0"
] | null | null | null | skype/analyzeSkypeApp.py | kalink0/useful_scripts | fd2e3af91e9d1fed877ac7bf9e6614c9f22216ca | [
"CC0-1.0"
] | 2 | 2019-09-08T14:07:15.000Z | 2021-06-12T15:33:19.000Z | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
# AUTHOR: kalink0
# MAIL: kalinko@be-binary.de
# CREATION DATE: 2019/07/09
#
# LICENSE: CC0-1.0
#
# SOURCE: https://github.com/kalink0/useful_scripts
#
# TITLE: analyzeSkyp... | 35.166667 | 93 | 0.666667 |
a477e191b92d6ef71d08548d090689cad02796cc | 219 | py | Python | akaneko/sfw.py | RaphielHS/akaneko-wrapper | dead4fcd7dfa6bc9d076e9db5caa923a84e7e192 | [
"MIT"
] | null | null | null | akaneko/sfw.py | RaphielHS/akaneko-wrapper | dead4fcd7dfa6bc9d076e9db5caa923a84e7e192 | [
"MIT"
] | 3 | 2021-05-04T23:22:38.000Z | 2021-07-12T09:03:15.000Z | akaneko/sfw.py | RaphielHS/akaneko-wrapper | dead4fcd7dfa6bc9d076e9db5caa923a84e7e192 | [
"MIT"
] | 1 | 2022-01-16T08:10:47.000Z | 2022-01-16T08:10:47.000Z | from .req import get
def neko():
return get("neko")
def foxgirl():
return get("sfwfoxes")
def wallpapers():
return get('wallpapers')
def mobileWallpapers():
return get("mobileWallpapers") | 16.846154 | 34 | 0.634703 |
5e48ce1049a400e53ff708b11af29471702ac060 | 1,662 | py | Python | container.py | bowmanjd/elm-builder-ia32 | b2433d7a21a57f4b5b5eb162688cd9f573308344 | [
"Apache-2.0"
] | 1 | 2019-01-17T19:21:30.000Z | 2019-01-17T19:21:30.000Z | container.py | bowmanjd/elm-builder | b2433d7a21a57f4b5b5eb162688cd9f573308344 | [
"Apache-2.0"
] | null | null | null | container.py | bowmanjd/elm-builder | b2433d7a21a57f4b5b5eb162688cd9f573308344 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3.7
import subprocess
import sys
import fire
arches = {"i386": "i386/", "x86_64": ""}
class Container:
def __init__(self, name, repo="bowmanjd"):
self.docker_exe = ["docker"]
if not sys.platform == "win32":
self.docker_exe.insert(0, "sudo")
self.location = f... | 29.157895 | 78 | 0.518051 |
6fe4afd7061adade07e56c3aef4b3629e7da272c | 1,973 | py | Python | kivy/adapters/models.py | sirpercival/kivy | 29ef854a200e6764aae60ea29324379c69d271a3 | [
"MIT"
] | 2 | 2015-10-26T12:35:37.000Z | 2020-11-26T12:06:09.000Z | kivy/adapters/models.py | sirpercival/kivy | 29ef854a200e6764aae60ea29324379c69d271a3 | [
"MIT"
] | null | null | null | kivy/adapters/models.py | sirpercival/kivy | 29ef854a200e6764aae60ea29324379c69d271a3 | [
"MIT"
] | 3 | 2015-07-18T11:03:59.000Z | 2018-03-17T01:32:42.000Z | '''
SelectableDataItem
==================
.. versionadded:: 1.5
.. warning::
This code is still experimental, and its API is subject to change in a
future version.
Data Models
-----------
Kivy is open about the type of data used in applications built with
the system. However, base classes are sometimes nee... | 29.014706 | 78 | 0.725291 |
a95a84f6daa428f0bf12463c79a2085477232d15 | 606 | py | Python | 0395 Linked List Delete Last Occurrence of Value.py | ansabgillani/binarysearchcomproblems | 12fe8632f8cbb5058c91a55bae53afa813a3247e | [
"MIT"
] | 1 | 2020-12-29T21:17:26.000Z | 2020-12-29T21:17:26.000Z | 0395 Linked List Delete Last Occurrence of Value.py | ansabgillani/binarysearchcomproblems | 12fe8632f8cbb5058c91a55bae53afa813a3247e | [
"MIT"
] | null | null | null | 0395 Linked List Delete Last Occurrence of Value.py | ansabgillani/binarysearchcomproblems | 12fe8632f8cbb5058c91a55bae53afa813a3247e | [
"MIT"
] | 4 | 2021-09-09T17:42:43.000Z | 2022-03-18T04:54:03.000Z | # class LLNode:
# def __init__(self, val, next=None):
# self.val = val
# self.next = next
class Solution:
def solve(self, node, target):
if not node: return None
head = node
delete_prev = None
delete = None
prev = None
while node:
... | 23.307692 | 43 | 0.5033 |
8981ed60d62815b34f4926d39894a0e170f10429 | 16,357 | py | Python | core/storage/email/gae_models_test.py | bhupenb/oppia | 814a53c2c836efa5c082497c7da0b6623b240e2c | [
"Apache-2.0"
] | null | null | null | core/storage/email/gae_models_test.py | bhupenb/oppia | 814a53c2c836efa5c082497c7da0b6623b240e2c | [
"Apache-2.0"
] | null | null | null | core/storage/email/gae_models_test.py | bhupenb/oppia | 814a53c2c836efa5c082497c7da0b6623b240e2c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | 42.048843 | 80 | 0.67494 |
be286c162cc6a2ebb4720be9bd6c8ab3a9496221 | 828 | py | Python | Ago-Dic-2020/gonzalez-cardenas-jesus-antonio/Practica 7/B_Container/fetch.py | bryanbalderas/DAS_Sistemas | 1e31f088c0de7134471025a5730b0abfc19d936e | [
"MIT"
] | 41 | 2017-09-26T09:36:32.000Z | 2022-03-19T18:05:25.000Z | Ago-Dic-2020/gonzalez-cardenas-jesus-antonio/Practica 7/B_Container/fetch.py | bryanbalderas/DAS_Sistemas | 1e31f088c0de7134471025a5730b0abfc19d936e | [
"MIT"
] | 67 | 2017-09-11T05:06:12.000Z | 2022-02-14T04:44:04.000Z | Ago-Dic-2020/gonzalez-cardenas-jesus-antonio/Practica 7/B_Container/fetch.py | bryanbalderas/DAS_Sistemas | 1e31f088c0de7134471025a5730b0abfc19d936e | [
"MIT"
] | 210 | 2017-09-01T00:10:08.000Z | 2022-03-19T18:05:12.000Z | import requests
import pprint
import json
import pymongo
api_url = 'https://pipl.ir/v1/getPerson'
client = pymongo.MongoClient("mongodb://mongo:27017/")
db = client["persons"]
def get_some_data():
r= requests.get(api_url)
data = r.content
actual_json = json.loads(data)
return actual_json
def insert_s... | 21.230769 | 54 | 0.673913 |
25017634b306d3a8d7e6b0668bac14b73a9c32ad | 2,084 | py | Python | hw_asr/datasets/utils.py | art591/dla_asr | 1719a133e6ce1961fb7ad9e4b74f22ec4354320e | [
"MIT"
] | null | null | null | hw_asr/datasets/utils.py | art591/dla_asr | 1719a133e6ce1961fb7ad9e4b74f22ec4354320e | [
"MIT"
] | null | null | null | hw_asr/datasets/utils.py | art591/dla_asr | 1719a133e6ce1961fb7ad9e4b74f22ec4354320e | [
"MIT"
] | null | null | null | from operator import xor
from torch.utils.data import DataLoader, ConcatDataset
import hw_asr.augmentations
import hw_asr.batch_sampler as batch_sampler_module
import hw_asr.datasets
from hw_asr.base.base_text_encoder import BaseTextEncoder
from hw_asr.collate_fn.collate import collate_fn
from hw_asr.utils.parse_conf... | 36.561404 | 91 | 0.643954 |
fcaeacb825a32e041d9dca73c155f9c22fe096bb | 6,777 | py | Python | versions/V1.4/Components/py_traceTheContour.py | qifwa493/Camera_surface_area | ebac18bd01ba7c615be63626aeb30bd9e07f53bb | [
"MIT"
] | null | null | null | versions/V1.4/Components/py_traceTheContour.py | qifwa493/Camera_surface_area | ebac18bd01ba7c615be63626aeb30bd9e07f53bb | [
"MIT"
] | null | null | null | versions/V1.4/Components/py_traceTheContour.py | qifwa493/Camera_surface_area | ebac18bd01ba7c615be63626aeb30bd9e07f53bb | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Functions for tracing the contour are provided in this file
import cv2
import numpy as np
# This is the search pattern of the neighbor points
neighbors = np.array([[-1, 0], [0, 1], [1, 0], [0, -1],
[-1, -1], [-1, 1], [1, -1], [1, 1]], dtype=np.int8)
# Check if the p... | 39.17341 | 108 | 0.564409 |
a1642ce5e770ebeb37f84e6d412c5991c0a8b15e | 2,866 | py | Python | extra/data_handling/wormfile.py | 2019paper/Symbolic-Melody-Identification | b114456bcf52d182d7c3ccf7fd617c95ce64ffce | [
"MIT"
] | 5 | 2019-10-11T03:50:06.000Z | 2022-01-10T03:21:11.000Z | extra/data_handling/wormfile.py | 2019paper/Symbolic-Melody-Identification | b114456bcf52d182d7c3ccf7fd617c95ce64ffce | [
"MIT"
] | 1 | 2020-11-30T04:24:02.000Z | 2020-12-21T16:39:59.000Z | extra/data_handling/wormfile.py | 2019paper/Symbolic-Melody-Identification | b114456bcf52d182d7c3ccf7fd617c95ce64ffce | [
"MIT"
] | 2 | 2020-09-09T08:29:38.000Z | 2021-03-22T14:46:29.000Z | import numpy as np
import re
from collections import OrderedDict
class WormFile:
VERSION = '1.05'
attr_types = {
'WORM Version': str,
'AudioFile': str,
'Composer': str,
'Piece': str,
'Key': str,
'Indication': str,
'Performer': st... | 27.295238 | 92 | 0.481507 |
207d0e74289213ccc6e498f5ce5953488cbbce50 | 1,378 | py | Python | Hyperparamter_Optimization/src/grid_search.py | oke-aditya/Machine_Learning | 3dd40ae2b9cba1890e7060448e75c14194b27775 | [
"MIT"
] | 15 | 2019-11-16T11:09:24.000Z | 2022-01-09T01:58:03.000Z | Hyperparamter_Optimization/src/grid_search.py | oke-aditya/Machine_Learning | 3dd40ae2b9cba1890e7060448e75c14194b27775 | [
"MIT"
] | 1 | 2021-11-10T19:46:00.000Z | 2021-11-10T19:46:00.000Z | Hyperparamter_Optimization/src/grid_search.py | oke-aditya/Machine_Learning | 3dd40ae2b9cba1890e7060448e75c14194b27775 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from sklearn import ensemble
from sklearn import metrics
from sklearn import model_selection
from sklearn import decomposition
from sklearn import pipeline
from sklearn import preprocessing
if __name__ == "__main__":
df = pd.read_csv("../data/train.csv")
X = df.drop(["p... | 28.708333 | 129 | 0.650218 |
31bafdb483a4d52e0f9e5764f66dd0fc5cfda4a2 | 16,034 | py | Python | homeassistant/components/onewire/sensor.py | jansauer/home-assistant-core | bba770b411beae6c96d679903cff190ee13c9545 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/onewire/sensor.py | jansauer/home-assistant-core | bba770b411beae6c96d679903cff190ee13c9545 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/onewire/sensor.py | jansauer/home-assistant-core | bba770b411beae6c96d679903cff190ee13c9545 | [
"Apache-2.0"
] | null | null | null | """Support for 1-Wire environment sensors."""
from glob import glob
import logging
import os
from typing import Any, Dict, Optional
from pi1wire import InvalidCRCException, Pi1Wire, UnsupportResponseException
from pyownet import protocol
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SC... | 37.375291 | 131 | 0.614569 |
cad80ee054bdb0660a208d5f1025631cac880b8f | 4,563 | py | Python | app/api/v1/questions/routes.py | Adoniswalker/StackOverflow-lite | 3679d1e8bf23aca73338e0fa9ff51de63ba85f7d | [
"MIT"
] | 16 | 2018-08-11T13:07:07.000Z | 2021-04-06T00:44:34.000Z | app/api/v1/questions/routes.py | PeterCHK/stackoverflow-lite | 1d3e46bce494235d608fbec68925ee88b3b83513 | [
"MIT"
] | 13 | 2018-08-14T12:48:38.000Z | 2021-06-01T22:31:53.000Z | app/api/v1/questions/routes.py | PeterCHK/stackoverflow-lite | 1d3e46bce494235d608fbec68925ee88b3b83513 | [
"MIT"
] | 14 | 2018-08-10T11:05:13.000Z | 2021-12-24T13:10:41.000Z | from flask import Blueprint, request, make_response, jsonify, session
from flask.views import MethodView
from app.questions.models import Question
from ....utils import jwt_required
question_blueprint = Blueprint('questions', __name__)
class CreateQuestionAPIView(MethodView):
"""
Create API Resource
"""
... | 30.624161 | 86 | 0.599606 |
657f8c8259a66b6a1b10c225c4ddc38c766d91f4 | 18,517 | py | Python | dali/python/nvidia/dali/types.py | PawelA/DALI | 3a4fc3373b119075e81a55eeb5dcc92e1ab1315a | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-05-20T18:49:34.000Z | 2019-05-20T18:49:34.000Z | dali/python/nvidia/dali/types.py | PawelA/DALI | 3a4fc3373b119075e81a55eeb5dcc92e1ab1315a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | dali/python/nvidia/dali/types.py | PawelA/DALI | 3a4fc3373b119075e81a55eeb5dcc92e1ab1315a | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-04-07T16:23:50.000Z | 2021-04-07T16:23:50.000Z | # Copyright (c) 2017-2018, NVIDIA CORPORATION. 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 a... | 36.667327 | 107 | 0.653292 |
3150ff732fdee55495f5e099f26d7d6f55c10360 | 2,199 | py | Python | src/abaqus/Material/Plastic/Swelling/Swelling.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | 7 | 2022-01-21T09:15:45.000Z | 2022-02-15T09:31:58.000Z | src/abaqus/Material/Plastic/Swelling/Swelling.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | src/abaqus/Material/Plastic/Swelling/Swelling.py | Haiiliin/PyAbaqus | f20db6ebea19b73059fe875a53be370253381078 | [
"MIT"
] | null | null | null | from abaqusConstants import *
from ...Ratios import Ratios
class Swelling:
"""The Swelling object specifies time-dependent volumetric swelling for a material.
Notes
-----
This object can be accessed by:
.. code-block:: python
import material
mdb.models[name].material... | 27.4875 | 105 | 0.589814 |
f9472bf4a9bca5fc1441e5e2fc62f859e027f34c | 12,917 | py | Python | src/Application/PythonScriptModule/pymodules_old/localscene/localscene.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | null | null | null | src/Application/PythonScriptModule/pymodules_old/localscene/localscene.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | null | null | null | src/Application/PythonScriptModule/pymodules_old/localscene/localscene.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | null | null | null |
"""
Loads scene files to be locally in naali, currently all scene related files need to be copied to naali specific media folders by hand
"""
import rexviewer as r
from circuits import Component
from PythonQt.QtUiTools import QUiLoader
from PythonQt.QtCore import QFile
import window
import loader
import dotsceneman... | 36.283708 | 143 | 0.619881 |
6d37b9eeb279e5f93fa7736da9654ce31a478c90 | 899 | py | Python | env/bin/rst2xetex.py | bopopescu/smart_contracts7 | 40a487cb3843e86ab5e4cb50b1aafa2095f648cd | [
"Apache-2.0"
] | null | null | null | env/bin/rst2xetex.py | bopopescu/smart_contracts7 | 40a487cb3843e86ab5e4cb50b1aafa2095f648cd | [
"Apache-2.0"
] | null | null | null | env/bin/rst2xetex.py | bopopescu/smart_contracts7 | 40a487cb3843e86ab5e4cb50b1aafa2095f648cd | [
"Apache-2.0"
] | 1 | 2020-07-24T17:53:25.000Z | 2020-07-24T17:53:25.000Z | #!/Users/sana/Documents/PySonar/env/bin/python
# $Id: rst2xetex.py 7847 2015-03-17 17:30:47Z milde $
# Author: Guenter Milde
# Copyright: This module has been placed in the public domain.
"""
A minimal front end to the Docutils Publisher, producing Lua/XeLaTeX code.
"""
try:
import locale
locale.setlocale(lo... | 32.107143 | 77 | 0.675195 |
a1fc21e2518d2ebfc1435b4d5b7746c243c5b335 | 555 | py | Python | src/jackdaw/Session.py | miicck/jackdaw | d849408ed2cb9e43f17cb0e44aa52ed5fac77ba6 | [
"MIT"
] | null | null | null | src/jackdaw/Session.py | miicck/jackdaw | d849408ed2cb9e43f17cb0e44aa52ed5fac77ba6 | [
"MIT"
] | null | null | null | src/jackdaw/Session.py | miicck/jackdaw | d849408ed2cb9e43f17cb0e44aa52ed5fac77ba6 | [
"MIT"
] | null | null | null | _close_methods = []
def session_close_method(close_method: callable) -> callable:
"""
A method that will be automatically
called when the session closes.
:param close_method: Method to call on session close.
:return: The decorated method that will be called on session close.
"""
_close_met... | 25.227273 | 71 | 0.691892 |
3fe896426a7ae5b4b15b0520522002e6fb0dc1b0 | 44,967 | py | Python | tensorflow/contrib/tpu/python/tpu/tpu_embedding.py | wenming2014/tensorflow | a102a6a71844e194f3946f6318768c5367f1f16b | [
"Apache-2.0"
] | 52 | 2018-11-12T06:39:35.000Z | 2022-03-08T05:31:27.000Z | tensorflow/contrib/tpu/python/tpu/tpu_embedding.py | wenming2014/tensorflow | a102a6a71844e194f3946f6318768c5367f1f16b | [
"Apache-2.0"
] | 2 | 2018-12-04T08:35:40.000Z | 2020-10-22T16:17:39.000Z | tensorflow/contrib/tpu/python/tpu/tpu_embedding.py | wenming2014/tensorflow | a102a6a71844e194f3946f6318768c5367f1f16b | [
"Apache-2.0"
] | 17 | 2019-03-11T01:17:16.000Z | 2022-02-21T00:44:47.000Z | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.36535 | 92 | 0.695443 |
81f983b5726376957726bd27b750bb7023eecc8b | 2,591 | py | Python | web/openerp/release.py | diogocs1/comps | 63df07f6cf21c41e4527c06e2d0499f23f4322e7 | [
"Apache-2.0"
] | 1 | 2019-12-29T11:53:56.000Z | 2019-12-29T11:53:56.000Z | odoo/openerp/release.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | null | null | null | odoo/openerp/release.py | tuanquanghpvn/odoo8-tutorial | 52d25f1ca5f233c431cb9d3b24b79c3b4fb5127e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | 45.45614 | 117 | 0.652644 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.