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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
de757b204e1bc6bdc8f1f9c1dc88993ecfe575ec | 167,685 | py | Python | pysnmp/Nortel-Magellan-Passport-MpaNetworkLinkMIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/Nortel-Magellan-Passport-MpaNetworkLinkMIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/Nortel-Magellan-Passport-MpaNetworkLinkMIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module Nortel-Magellan-Passport-MpaNetworkLinkMIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Nortel-Magellan-Passport-MpaNetworkLinkMIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:18:31 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user ... | 155.986047 | 12,626 | 0.76788 |
353b0c1e82c943061d93ecba5497a39b4509004d | 1,452 | py | Python | tools/com/formatting.py | AnthonyEdvalson/Machina | fefb058591dd7b62817c75277d5ca0eb6dbd8c3a | [
"MIT"
] | null | null | null | tools/com/formatting.py | AnthonyEdvalson/Machina | fefb058591dd7b62817c75277d5ca0eb6dbd8c3a | [
"MIT"
] | null | null | null | tools/com/formatting.py | AnthonyEdvalson/Machina | fefb058591dd7b62817c75277d5ca0eb6dbd8c3a | [
"MIT"
] | null | null | null | import datetime
import json
from enum import Enum
from tools.config.config import Config
def serialize(data, format):
assert format in formats
return formats[format].serialize(data)
def deserialize(data, format):
assert type(data) is bytes
return formats[format].deserialize(data)
... | 20.742857 | 74 | 0.575758 |
5f874ce6bd3b0b6d10926e48dc55b11589860566 | 22,151 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_galleries_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_galleries_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/aio/operations/_galleries_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"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 ... | 47.432548 | 186 | 0.658435 |
03ea3a5960d4c6d4265c24f5daf069f6b0e98cda | 4,747 | py | Python | services/crawler/models/houses.py | Sirius207/HousesAPI | 6f1ef5fcb3fbd70f82b700b84be31daa9c58bda8 | [
"MIT"
] | null | null | null | services/crawler/models/houses.py | Sirius207/HousesAPI | 6f1ef5fcb3fbd70f82b700b84be31daa9c58bda8 | [
"MIT"
] | 6 | 2021-06-05T16:54:41.000Z | 2021-06-22T11:43:50.000Z | services/crawler/models/houses.py | Sirius207/HousesAPI | 6f1ef5fcb3fbd70f82b700b84be31daa9c58bda8 | [
"MIT"
] | 2 | 2021-06-05T16:51:46.000Z | 2021-06-06T05:04:21.000Z | """
Module for houses detailed data parsing
"""
import os
import re
import uuid
from typing import Optional, Tuple
from loguru import logger
from requests_html import HTMLSession
from bs4 import BeautifulSoup
logger.add("house_parse.log", level="DEBUG")
# pylint: disable= R0902
class House:
def __init__(self,... | 28.945122 | 93 | 0.577839 |
8ae2f789a39c7626073b5de77f488f00c416ba0e | 16,663 | py | Python | python/mxnet/gluon/nn/basic_layers.py | yinscapital/incubator-mxnet | 4c0df6249d03841f5eb30e1428aa25fc230fed30 | [
"Apache-2.0"
] | null | null | null | python/mxnet/gluon/nn/basic_layers.py | yinscapital/incubator-mxnet | 4c0df6249d03841f5eb30e1428aa25fc230fed30 | [
"Apache-2.0"
] | null | null | null | python/mxnet/gluon/nn/basic_layers.py | yinscapital/incubator-mxnet | 4c0df6249d03841f5eb30e1428aa25fc230fed30 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 35.989201 | 97 | 0.584709 |
dd82f9bdf963284c4698348df176946417ac0f24 | 312 | py | Python | GearBot/Util/Emoji.py | TheMelvin/Gearbot | 2fd0d6a1fb6750a1cb6c49828c4b9d35acaa544a | [
"MIT"
] | null | null | null | GearBot/Util/Emoji.py | TheMelvin/Gearbot | 2fd0d6a1fb6750a1cb6c49828c4b9d35acaa544a | [
"MIT"
] | null | null | null | GearBot/Util/Emoji.py | TheMelvin/Gearbot | 2fd0d6a1fb6750a1cb6c49828c4b9d35acaa544a | [
"MIT"
] | null | null | null | from discord import utils
from Util import Configuration
emojis = dict()
def on_ready(bot):
for name, eid in Configuration.getMasterConfigVar("EMOJI").items():
emojis[name] = utils.get(bot.emojis, id=eid)
def get_chat_emoji(name):
emoji = emojis[name]
return f"<:{emoji.name}:{emoji.id}>" | 24 | 71 | 0.695513 |
d20e2b854a15dc01d863f36935ffe6dcf1f5c2d1 | 23,304 | py | Python | contrib/for_review/ModifiedBasicPreset/python/IECore/BasicPreset.py | gcodebackups/cortex-vfx | 72fa6c6eb3327fce4faf01361c8fcc2e1e892672 | [
"BSD-3-Clause"
] | 5 | 2016-07-26T06:09:28.000Z | 2022-03-07T03:58:51.000Z | contrib/for_review/ModifiedBasicPreset/python/IECore/BasicPreset.py | turbosun/cortex | 4bdc01a692652cd562f3bfa85f3dae99d07c0b15 | [
"BSD-3-Clause"
] | null | null | null | contrib/for_review/ModifiedBasicPreset/python/IECore/BasicPreset.py | turbosun/cortex | 4bdc01a692652cd562f3bfa85f3dae99d07c0b15 | [
"BSD-3-Clause"
] | 3 | 2015-03-25T18:45:24.000Z | 2020-02-15T15:37:18.000Z | ##########################################################################
#
# Copyright (c) 2010, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistribu... | 33.102273 | 246 | 0.683659 |
de4fc9172da64a238a01d13f72af84acf1ad8d31 | 3,381 | py | Python | archiver/test_delete.py | praekeltfoundation/rasa-postgres-archiver | cba26a87dffb4049b2692f05a6c897983ce30cb5 | [
"BSD-3-Clause"
] | 1 | 2021-05-20T14:05:22.000Z | 2021-05-20T14:05:22.000Z | archiver/test_delete.py | praekeltfoundation/rasa-postgres-archiver | cba26a87dffb4049b2692f05a6c897983ce30cb5 | [
"BSD-3-Clause"
] | 1 | 2020-12-08T13:53:39.000Z | 2020-12-08T13:53:39.000Z | archiver/test_delete.py | praekeltfoundation/rasa-postgres-archiver | cba26a87dffb4049b2692f05a6c897983ce30cb5 | [
"BSD-3-Clause"
] | null | null | null | from datetime import date, datetime, timedelta, timezone
from unittest import TestCase, mock
import boto3
import psycopg2
from moto import mock_s3
from archiver import settings
from archiver.delete import delete_day, delete_events
class TestArchiver(TestCase):
def setUp(self):
self.conn = psycopg2.conne... | 33.475248 | 86 | 0.580893 |
853fc49fdd4da3836c22826b3f9e8e0399efb8fd | 2,328 | py | Python | oneflow/python/nn/modules/floor.py | qqsun8819/oneflow | b61e07b3406cc5c2d71f3d5e8b0f4de9b3fb9e40 | [
"Apache-2.0"
] | 1 | 2021-02-22T00:43:08.000Z | 2021-02-22T00:43:08.000Z | oneflow/python/nn/modules/floor.py | qqsun8819/oneflow | b61e07b3406cc5c2d71f3d5e8b0f4de9b3fb9e40 | [
"Apache-2.0"
] | null | null | null | oneflow/python/nn/modules/floor.py | qqsun8819/oneflow | b61e07b3406cc5c2d71f3d5e8b0f4de9b3fb9e40 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow 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 law or agr... | 26.454545 | 89 | 0.649055 |
f3012181fab0827a0da3c774260996fa251fb358 | 27,435 | py | Python | tests/migrations/test_writer.py | shinshin86/django | 5cc81cd9eb69f5f7a711412c02039b435c393135 | [
"PSF-2.0",
"BSD-3-Clause"
] | 2 | 2017-03-30T06:28:50.000Z | 2017-03-30T06:28:55.000Z | tests/migrations/test_writer.py | Blaahborgh/django | c591bc3ccece1514d6b419826c7fa36ada9d9213 | [
"PSF-2.0",
"BSD-3-Clause"
] | 55 | 2016-02-27T06:02:24.000Z | 2021-11-01T07:53:20.000Z | tests/migrations/test_writer.py | Blaahborgh/django | c591bc3ccece1514d6b419826c7fa36ada9d9213 | [
"PSF-2.0",
"BSD-3-Clause"
] | 2 | 2018-01-08T08:14:29.000Z | 2020-11-04T08:46:29.000Z | import datetime
import decimal
import enum
import functools
import math
import os
import re
import uuid
from unittest import mock
import custom_migration_operations.more_operations
import custom_migration_operations.operations
from django import get_version
from django.conf import settings
from django.core.validators... | 41.255639 | 118 | 0.630326 |
c13ac340d97456ef4b47b3b0d309fac6361177d1 | 4,014 | py | Python | ml_source/src/blocktorch/blocktorch/pipelines/components/estimators/regressors/xgboost_regressor.py | blocktorch/blocktorch | 044aa269813ab22c5fd27f84272e5fb540fc522b | [
"MIT"
] | 1 | 2021-09-23T12:23:02.000Z | 2021-09-23T12:23:02.000Z | ml_source/src/blocktorch/blocktorch/pipelines/components/estimators/regressors/xgboost_regressor.py | blocktorch/blocktorch | 044aa269813ab22c5fd27f84272e5fb540fc522b | [
"MIT"
] | null | null | null | ml_source/src/blocktorch/blocktorch/pipelines/components/estimators/regressors/xgboost_regressor.py | blocktorch/blocktorch | 044aa269813ab22c5fd27f84272e5fb540fc522b | [
"MIT"
] | null | null | null | """XGBoost Regressor."""
from blocktorch.model_family import ModelFamily
from blocktorch.pipelines.components.estimators import Estimator
from blocktorch.problem_types import ProblemTypes
from blocktorch.utils.gen_utils import (
_rename_column_names_to_numeric,
import_or_raise,
)
from blocktorch.utils.woodwork_... | 33.45 | 166 | 0.660937 |
845958315f146c23b78ebb452ed1fba10713f15f | 4,321 | py | Python | ideas/examples/french.py | aroberge/importhooks | 57483ce24d265d391587f6321954f2ed60f04afd | [
"MIT"
] | null | null | null | ideas/examples/french.py | aroberge/importhooks | 57483ce24d265d391587f6321954f2ed60f04afd | [
"MIT"
] | null | null | null | ideas/examples/french.py | aroberge/importhooks | 57483ce24d265d391587f6321954f2ed60f04afd | [
"MIT"
] | null | null | null | """
.. admonition:: Summary
This example demonstrates the how to use a non-standard file
extension (``.pyfr``) as an indication that an import hook must
be used.
It also demonstrates how to use the ``verbose_finder`` configuration option.
French Python
==============
Imagine you are a French beginne... | 25.122093 | 87 | 0.626938 |
9db7e428a203e743e21f290ddc7b7e7ddaab0a28 | 5,324 | py | Python | .history/src/data/data_20191021142701.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | .history/src/data/data_20191021142701.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | .history/src/data/data_20191021142701.py | bkraft4257/kaggle_titanic | f29ea1773773109a867278c001dbd21a9f7b21dd | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from typing import Union
from pathlib import Path
from nameparser import HumanName
class ExtractData:
def __init__(self, filename: Union[str, Path], age_bins = None, drop_columns=None):
# """Extract Training Data from file or Path
# Arguments:
# ... | 29.910112 | 114 | 0.563298 |
c9571a8769a04f15b736b18d1d2ccdba8e3165d7 | 2,459 | py | Python | setup.py | googleinterns/django-csp | 6efaad957e4e22e91d5c29a69d91b0c1f1765546 | [
"BSD-3-Clause"
] | 2 | 2020-05-20T06:15:21.000Z | 2020-05-20T06:15:30.000Z | setup.py | 9mido/django-csp | cbff891cdd4e8718c25bc762147a2c22fa07787e | [
"BSD-3-Clause"
] | null | null | null | setup.py | 9mido/django-csp | cbff891cdd4e8718c25bc762147a2c22fa07787e | [
"BSD-3-Clause"
] | 1 | 2020-06-16T17:18:32.000Z | 2020-06-16T17:18:32.000Z | import sys
import os
import codecs
from setuptools import setup, find_packages
version = '3.6'
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
os.system('python setup.py bdist_wheel upload')
print('You probably want to also tag the version now:')
print(' git tag -a %s -m "ve... | 27.943182 | 71 | 0.616104 |
0ee2f61617158a409d718710f6bb397d8647e36e | 8,689 | py | Python | src/dropbot_chip_qc/ui/execute.py | cfobel/dropbot-chip-qc | e5944b88c0d423163f55a3f49ebf84bb27e229bc | [
"BSD-3-Clause"
] | null | null | null | src/dropbot_chip_qc/ui/execute.py | cfobel/dropbot-chip-qc | e5944b88c0d423163f55a3f49ebf84bb27e229bc | [
"BSD-3-Clause"
] | 5 | 2019-04-02T11:10:45.000Z | 2019-07-17T20:31:18.000Z | src/dropbot_chip_qc/ui/execute.py | cfobel/dropbot-chip-qc | e5944b88c0d423163f55a3f49ebf84bb27e229bc | [
"BSD-3-Clause"
] | null | null | null | # -*- encoding: utf-8 -*-
'''
.. versionadded:: v0.12.0
'''
import functools as ft
import itertools as it
import threading
from dropbot_chip_qc.ui.render import get_summary_dict, render_summary
from logging_helpers import _L, caller_name
import asyncio_helpers as aioh
import dropbot_chip_qc as qc
import dropbot_chip_q... | 41.37619 | 91 | 0.590747 |
5e8d1e88ac4f740facaef1a7f9f3beb0a4e26984 | 985 | py | Python | setup.py | lmacken/binance-chain-python | 483e51394ebc9f9998f5248910ac7b7dff7198f9 | [
"MIT"
] | 22 | 2019-04-27T02:14:52.000Z | 2021-01-04T00:37:41.000Z | setup.py | redquantum/binance-chain-python | 483e51394ebc9f9998f5248910ac7b7dff7198f9 | [
"MIT"
] | 7 | 2019-04-28T20:57:49.000Z | 2021-09-03T03:39:22.000Z | setup.py | redquantum/binance-chain-python | 483e51394ebc9f9998f5248910ac7b7dff7198f9 | [
"MIT"
] | 9 | 2019-04-27T23:43:51.000Z | 2021-04-15T18:09:51.000Z | #!/usr/bin/env python
import setuptools
from distutils.core import setup
setup(
name="binancechain",
version="0.1.6",
description="Unofficial Binance Chain SDK",
author="Luke Macken & Kim Bui",
author_email="",
url="https://github.com/lmacken/binance-chain-python",
packages=["binancechain"... | 25.921053 | 58 | 0.559391 |
54690cd96c2a52d95c26b8e44b65e2b77a6243fe | 116 | py | Python | app/streampush/backend/apps.py | streampush/streampush | c531a8b35b8f0e9b6d56f8760ee78b707eab7830 | [
"MIT"
] | 6 | 2018-09-11T01:36:12.000Z | 2021-12-06T07:12:46.000Z | app/streampush/backend/apps.py | streampush/streampush | c531a8b35b8f0e9b6d56f8760ee78b707eab7830 | [
"MIT"
] | 9 | 2018-09-13T01:28:03.000Z | 2021-03-14T04:01:47.000Z | app/streampush/backend/apps.py | streampush/streampush | c531a8b35b8f0e9b6d56f8760ee78b707eab7830 | [
"MIT"
] | 2 | 2019-02-15T15:03:37.000Z | 2019-07-28T13:05:07.000Z | from django.apps import AppConfig
from backend import configs
class BackendConfig(AppConfig):
name = 'backend'
| 19.333333 | 33 | 0.784483 |
495a63a30f721b605e51851f6673ff2f48fc88ac | 2,525 | py | Python | vue/vue.py | adamlwgriffiths/vue.py | f4256454256ddfe54a8be6dea493d3fc915ef1a2 | [
"MIT"
] | 274 | 2018-07-07T00:57:17.000Z | 2022-03-22T23:49:53.000Z | vue/vue.py | adamlwgriffiths/vue.py | f4256454256ddfe54a8be6dea493d3fc915ef1a2 | [
"MIT"
] | 25 | 2018-11-24T17:19:44.000Z | 2022-03-23T22:30:18.000Z | vue/vue.py | adamlwgriffiths/vue.py | f4256454256ddfe54a8be6dea493d3fc915ef1a2 | [
"MIT"
] | 18 | 2019-07-04T07:18:18.000Z | 2022-03-22T23:49:55.000Z | from browser import window
from .factory import VueComponentFactory, Wrapper, VueDirectiveFactory
from .bridge import Object
from .decorators.directive import DirectiveHook
from .decorators.filters import Filter
class Vue:
@staticmethod
def directive(name, directive=None):
if directive is None and isi... | 27.445652 | 75 | 0.639604 |
2364dd688024c5cf36b133426750963aa49b2cad | 206 | py | Python | gym-foster/gym_foster/__init__.py | c4sgub/counterfactual_RL | 9dbdf53935fbe6f8da45235bc1284fc855740a46 | [
"MIT"
] | null | null | null | gym-foster/gym_foster/__init__.py | c4sgub/counterfactual_RL | 9dbdf53935fbe6f8da45235bc1284fc855740a46 | [
"MIT"
] | null | null | null | gym-foster/gym_foster/__init__.py | c4sgub/counterfactual_RL | 9dbdf53935fbe6f8da45235bc1284fc855740a46 | [
"MIT"
] | null | null | null | from gym.envs.registration import register
register(
id='foster-v0',
entry_point='gym_foster.envs:FosterEnv')
register(
id = 'foster-v1',
entry_point='gym_foster.envs:FosterAEnv'
) | 20.6 | 48 | 0.68932 |
b134f1b1ef20bc5ecf87b296d9401ab15747271b | 269 | py | Python | tests/artificial/transf_Fisher/trend_LinearTrend/cycle_7/ar_/test_artificial_1024_Fisher_LinearTrend_7__20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | tests/artificial/transf_Fisher/trend_LinearTrend/cycle_7/ar_/test_artificial_1024_Fisher_LinearTrend_7__20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | 1 | 2019-11-30T23:39:38.000Z | 2019-12-01T04:34:35.000Z | tests/artificial/transf_Fisher/trend_LinearTrend/cycle_7/ar_/test_artificial_1024_Fisher_LinearTrend_7__20.py | jmabry/pyaf | afbc15a851a2445a7824bf255af612dc429265af | [
"BSD-3-Clause"
] | null | null | null | import pyaf.Bench.TS_datasets as tsds
import pyaf.tests.artificial.process_artificial_dataset as art
art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "LinearTrend", cycle_length = 7, transform = "Fisher", sigma = 0.0, exog_count = 20, ar_order = 0); | 38.428571 | 164 | 0.732342 |
efed7199316416eb3a1e5d4abf004d1a71e1de98 | 13,498 | py | Python | tests/profiling/exporter/test_http.py | AlexandreYang/dd-trace-py | 41508c7c230e7b30d32b942cbf08ccfc9901e3b8 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/profiling/exporter/test_http.py | AlexandreYang/dd-trace-py | 41508c7c230e7b30d32b942cbf08ccfc9901e3b8 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/profiling/exporter/test_http.py | AlexandreYang/dd-trace-py | 41508c7c230e7b30d32b942cbf08ccfc9901e3b8 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- encoding: utf-8 -*-
import collections
import errno
import email.parser
import platform
import socket
import threading
import time
import pytest
from ddtrace import compat
from ddtrace.vendor import six
from ddtrace.vendor.six.moves import BaseHTTPServer
from ddtrace.vendor.six.moves import http_client
import ... | 34.085859 | 109 | 0.661283 |
2fd468c4951b4386762633284c38c71c1695f1b0 | 1,557 | py | Python | config.py | LumaGhost/dispatity-eval-fun | b7104230eeb67780925ca1bec34efb363eb01c55 | [
"MIT"
] | null | null | null | config.py | LumaGhost/dispatity-eval-fun | b7104230eeb67780925ca1bec34efb363eb01c55 | [
"MIT"
] | null | null | null | config.py | LumaGhost/dispatity-eval-fun | b7104230eeb67780925ca1bec34efb363eb01c55 | [
"MIT"
] | null | null | null | import cv2 as cv
import numpy as np
'''
folder should contain entries from the middlebury 2014 dataset
i.e. a collection of folders with the following contents:
img0.png (the left camera image)
img1.png, imgE1.png, imgL1.png (right camera image in different lighting conditions)
disp0.pfm (floating point g... | 39.923077 | 97 | 0.748876 |
b7d943b7f7a4d97ec05bad07a13f4023bc944787 | 1,143 | py | Python | appengine/trooper_o_matic/appengine_module/trooper_o_matic/controller.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | appengine/trooper_o_matic/appengine_module/trooper_o_matic/controller.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | appengine/trooper_o_matic/appengine_module/trooper_o_matic/controller.py | mithro/chromium-infra | d27ac0b230bedae4bc968515b02927cf9e17c2b7 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from google.appengine.ext import ndb
from appengine_module.trooper_o_matic import models
def get_cq_stats(project):
project_key = ndb.Key(models.Pro... | 38.1 | 76 | 0.768154 |
0ea3ee2fb0f96ae0bfec5f2d770f7ab4dbf6b99d | 9,825 | py | Python | onnxmltools/convert/coreml/operator_converters/TreeEnsemble.py | scnakandala/onnxmltools | cf9d14731f125338ff9e751c97f7c4277399599a | [
"MIT"
] | null | null | null | onnxmltools/convert/coreml/operator_converters/TreeEnsemble.py | scnakandala/onnxmltools | cf9d14731f125338ff9e751c97f7c4277399599a | [
"MIT"
] | null | null | null | onnxmltools/convert/coreml/operator_converters/TreeEnsemble.py | scnakandala/onnxmltools | cf9d14731f125338ff9e751c97f7c4277399599a | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from ...c... | 53.983516 | 144 | 0.653435 |
84a401cc6ae80bba7822e1891c3f86868eb4e302 | 1,876 | py | Python | tests/contract_tests/KT1F25MTKpQJF8xJXVCNhweGmsxHtAjCDTFx/test_f25mtk_setFrozen.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 98 | 2019-02-07T16:33:38.000Z | 2022-03-31T15:53:41.000Z | tests/contract_tests/KT1F25MTKpQJF8xJXVCNhweGmsxHtAjCDTFx/test_f25mtk_setFrozen.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 152 | 2019-05-20T16:38:56.000Z | 2022-03-30T14:24:38.000Z | tests/contract_tests/KT1F25MTKpQJF8xJXVCNhweGmsxHtAjCDTFx/test_f25mtk_setFrozen.py | konchunas/pytezos | 65576d18bdf1956fae8ea21241b6c43a38921b83 | [
"MIT"
] | 34 | 2019-07-25T12:03:51.000Z | 2021-11-11T22:23:38.000Z | from unittest import TestCase
from os.path import dirname, join
import json
from pytezos.michelson.program import MichelsonProgram
from pytezos.michelson.types.big_map import big_map_diff_to_lazy_diff
from pytezos.michelson.forge import forge_micheline, unforge_micheline
folder = 'dexter_usdtz_xtz'
entrypoint = 'remo... | 39.083333 | 112 | 0.722281 |
ad17d54e9134594d3fe09c96150896f9026eb57b | 118 | py | Python | exercises/level_1/jinja_templates/with_flask/run.py | eyalle/python_course | acc75fd3c81f69f314099051026c81d80d141a84 | [
"MIT"
] | null | null | null | exercises/level_1/jinja_templates/with_flask/run.py | eyalle/python_course | acc75fd3c81f69f314099051026c81d80d141a84 | [
"MIT"
] | null | null | null | exercises/level_1/jinja_templates/with_flask/run.py | eyalle/python_course | acc75fd3c81f69f314099051026c81d80d141a84 | [
"MIT"
] | null | null | null | from exercises.level_1.jinja_templates.with_flask.app import app
if __name__ == '__main__':
app.run(debug=True)
| 19.666667 | 64 | 0.762712 |
6677eac92b8c0838da6cb90d961a8052bd894a32 | 2,312 | py | Python | venv/Lib/site-packages/win32/test/test_win32gui.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 150 | 2021-11-02T05:31:51.000Z | 2022-03-24T06:22:22.000Z | venv/Lib/site-packages/win32/test/test_win32gui.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 4 | 2021-12-01T11:55:58.000Z | 2022-02-24T16:14:37.000Z | venv/Lib/site-packages/win32/test/test_win32gui.py | ajayiagbebaku/NFL-Model | afcc67a85ca7138c58c3334d45988ada2da158ed | [
"MIT"
] | 33 | 2021-11-03T00:29:41.000Z | 2022-03-15T13:15:56.000Z | # tests for win32gui
import unittest
import win32gui
import pywin32_testutil
import operator
import array
import sys
class TestPyGetString(unittest.TestCase):
def test_get_string(self):
# test invalid addresses cause a ValueError rather than crash!
self.assertRaises(ValueError, win32gui.PyGetStrin... | 35.030303 | 75 | 0.645329 |
aee273744f0c9ab9b52c56544767d51d9913b063 | 3,836 | py | Python | pysnmp-with-texts/HUAWEI-LswSMON-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/HUAWEI-LswSMON-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/HUAWEI-LswSMON-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module HUAWEI-LswSMON-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-LswSMON-MIB
# Produced by pysmi-0.3.4 at Wed May 1 13:46:27 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, ... | 116.242424 | 477 | 0.792492 |
3aa957f779b875d4b1ae2b6b59c3dc06c04ec87c | 3,907 | py | Python | app/recipe/test/test_tags_api.py | trbs/recipe-app-api | b290f72c1c24f247e536eeee300c7e157511a3c2 | [
"MIT"
] | null | null | null | app/recipe/test/test_tags_api.py | trbs/recipe-app-api | b290f72c1c24f247e536eeee300c7e157511a3c2 | [
"MIT"
] | 7 | 2020-03-06T13:41:34.000Z | 2022-02-13T05:23:39.000Z | app/recipe/test/test_tags_api.py | trbs/recipe-app-api | b290f72c1c24f247e536eeee300c7e157511a3c2 | [
"MIT"
] | 1 | 2020-02-04T20:41:43.000Z | 2020-02-04T20:41:43.000Z | from django.contrib.auth import get_user_model
from django.urls import reverse
from django.test import TestCase
from rest_framework import status
from rest_framework.test import APIClient
from core.models import Tag, Recipe
from recipe.serializers import TagSerializer
TAGS_URL = reverse('recipe:tag-list')
class ... | 31.508065 | 71 | 0.638085 |
6c94d08408223ff1d4644956796ed017935a6100 | 420 | py | Python | Lists/2TakingListElemInput.py | palakbaphna/pyprac | 992770d5aed73c632a69b4bb22f471f35d083ee5 | [
"Apache-2.0"
] | null | null | null | Lists/2TakingListElemInput.py | palakbaphna/pyprac | 992770d5aed73c632a69b4bb22f471f35d083ee5 | [
"Apache-2.0"
] | null | null | null | Lists/2TakingListElemInput.py | palakbaphna/pyprac | 992770d5aed73c632a69b4bb22f471f35d083ee5 | [
"Apache-2.0"
] | null | null | null |
a = [0]*int(input("enter the number of elements:"))
# a is defined as an empty list and multiplying it with a number, taking input, we redefine its length at the same time
for i in range(len(a)): # if len is 3, i gets in range 0,1,2
a[i] = int(input())# as len of list is already defined, it will take only those m... | 32.307692 | 119 | 0.680952 |
209d749619c7464d03f7865a62d6534b372e49f4 | 672 | py | Python | ImgVidProcessing/Exercise1/exercise1.py | SystemNinja/MyPythonPrograms | 6bdebb5017994c3431aea769319f702075fff9b9 | [
"MIT"
] | null | null | null | ImgVidProcessing/Exercise1/exercise1.py | SystemNinja/MyPythonPrograms | 6bdebb5017994c3431aea769319f702075fff9b9 | [
"MIT"
] | null | null | null | ImgVidProcessing/Exercise1/exercise1.py | SystemNinja/MyPythonPrograms | 6bdebb5017994c3431aea769319f702075fff9b9 | [
"MIT"
] | null | null | null | """
Reference: https://www.udemy.com/the-python-mega-course/learn/v4/t/lecture/4775490?start=0
"""
import cv2
img1=cv2.imread("Exercise1\galaxy.jpg", 0)
img2=cv2.imread("Exercise1\kangaroos.jpg", 0)
img3=cv2.imread("Exercise1\Lighthouse.jpg", 0)
img4=cv2.imread("Exercise1\MoonSun.jpg", 0)
resize1=cv2.resi... | 33.6 | 91 | 0.745536 |
547391eed26bc4f64979eb4379ff1ba3539eceba | 5,447 | py | Python | testscripts/RDKB/component/RDKB_Logger/TS_RDKBLogger_EnvGetValueFromNum.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/RDKB_Logger/TS_RDKBLogger_EnvGetValueFromNum.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/RDKB_Logger/TS_RDKBLogger_EnvGetValueFromNum.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | ##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2016 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use th... | 40.649254 | 140 | 0.742243 |
54f248f2ada2aa4f15812efd9dced0b198f45754 | 1,607 | py | Python | data-structures/ds-slinklst/python3/linked_list.py | NuclearCactus/FOSSALGO | eb66f3bdcd6c42c66e8fc7110a32ac021596ca66 | [
"MIT"
] | 59 | 2018-09-11T17:40:25.000Z | 2022-03-03T14:40:39.000Z | data-structures/ds-slinklst/python3/linked_list.py | RitvikDayal/FOSSALGO | ae225a5fffbd78d0dff83fd7b178ba47bfd7a769 | [
"MIT"
] | 468 | 2018-08-28T17:04:29.000Z | 2021-12-03T15:16:34.000Z | data-structures/ds-slinklst/python3/linked_list.py | RitvikDayal/FOSSALGO | ae225a5fffbd78d0dff83fd7b178ba47bfd7a769 | [
"MIT"
] | 253 | 2018-08-28T17:08:51.000Z | 2021-11-01T12:30:39.000Z | class Node:
def __init__(self, d, n=None):
self.data = d
self.next = n # developed the Constructor to the Node
class LinkedList:
def __init__(self, r=None):
"""Initializing the Linked list."""
self.root = r
self.size = 0
self.item = 0
def add(self, item):
... | 20.602564 | 62 | 0.511512 |
1654a1ea82e26dafda4ead99ab62e7b057cf1b5d | 11,212 | py | Python | docs/conf_common.py | Mixerito/esp-idf | 20a662936483f44ee9c8d16f3251a5a1191ca6e5 | [
"Apache-2.0"
] | null | null | null | docs/conf_common.py | Mixerito/esp-idf | 20a662936483f44ee9c8d16f3251a5a1191ca6e5 | [
"Apache-2.0"
] | null | null | null | docs/conf_common.py | Mixerito/esp-idf | 20a662936483f44ee9c8d16f3251a5a1191ca6e5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Common (non-language-specific) configuration for Read The Docs & Sphinx
#
# Based on a Read the Docs Template documentation build configuration file,
# created by sphinx-quickstart on Tue Aug 26 14:19:49 2014.
#
# This file is imported from a language-specific conf.py (ie en/conf.py or
# zh_... | 33.975758 | 106 | 0.716821 |
e58fa7e66201fcf0d1b15e399330eef4350fd27d | 1,870 | py | Python | packs/orion/tests/test_action_node_pollnow.py | prajwal222/prajwal | ce1431858a9b54ae2a9546e9afab9f4b722bd210 | [
"Apache-2.0"
] | null | null | null | packs/orion/tests/test_action_node_pollnow.py | prajwal222/prajwal | ce1431858a9b54ae2a9546e9afab9f4b722bd210 | [
"Apache-2.0"
] | 1 | 2022-03-08T17:03:46.000Z | 2022-03-08T17:03:46.000Z | packs/orion/tests/test_action_node_pollnow.py | isabella232/st2contrib | 182af2fb6e26a1d002954b19a5cc7afc73307872 | [
"Apache-2.0"
] | 1 | 2019-07-10T21:23:49.000Z | 2019-07-10T21:23:49.000Z | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 34 | 74 | 0.672193 |
a82c5d1dd4f3fc3cf275987b244f2519012e66cc | 94 | py | Python | feedback/admin.py | zahidtokur/office-hub | 5dd1fd094c6ba78060103f6e8c0992b3e1cb3679 | [
"MIT"
] | null | null | null | feedback/admin.py | zahidtokur/office-hub | 5dd1fd094c6ba78060103f6e8c0992b3e1cb3679 | [
"MIT"
] | null | null | null | feedback/admin.py | zahidtokur/office-hub | 5dd1fd094c6ba78060103f6e8c0992b3e1cb3679 | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Feedback
admin.site.register(Feedback)
| 15.666667 | 32 | 0.819149 |
5888bf8a2ae2dd74afb7e1edf33e84215d7d649e | 197 | py | Python | coloredcoinlib/comparable.py | killerstorm/ngcccbase | 30fd033835ceeecd0eafc3461bf5b4dcfff117de | [
"MIT"
] | 31 | 2015-01-25T01:59:07.000Z | 2022-03-11T02:49:53.000Z | coloredcoinlib/comparable.py | killerstorm/ngcccbase | 30fd033835ceeecd0eafc3461bf5b4dcfff117de | [
"MIT"
] | 5 | 2015-06-16T14:43:49.000Z | 2016-07-19T12:49:16.000Z | coloredcoinlib/comparable.py | jeorgen/ngcccbase | 0a7348d95353598a320e5612166402ba676c8d33 | [
"MIT"
] | 17 | 2015-02-14T15:19:49.000Z | 2019-11-28T19:17:50.000Z | class ComparableMixin:
def __ne__(self, other):
return not (self == other)
def __ge__(self, other):
return not (self < other)
def __le__(self, other):
return not (other < self)
| 19.7 | 30 | 0.649746 |
5bc0f5996c6c8dd2a370993236632533e46da99b | 2,709 | py | Python | GAN/wasserstein_gan/wgan_pytorch.py | eastonhou/generative-models | 02f19ff8f8980afea44ed0a8834bc5e1c4322b4d | [
"Unlicense"
] | 7,386 | 2016-12-15T06:54:40.000Z | 2022-03-31T16:21:47.000Z | GAN/wasserstein_gan/wgan_pytorch.py | milanhzj/generative-models | b930d5fa9e2f69adfd4ea8ec759f38f6ce6da4c2 | [
"Unlicense"
] | 150 | 2017-08-28T14:59:36.000Z | 2022-03-11T23:21:35.000Z | GAN/wasserstein_gan/wgan_pytorch.py | milanhzj/generative-models | b930d5fa9e2f69adfd4ea8ec759f38f6ce6da4c2 | [
"Unlicense"
] | 2,247 | 2017-01-12T04:20:12.000Z | 2022-03-27T00:42:14.000Z | import torch
import torch.nn
import torch.nn.functional as nn
import torch.autograd as autograd
import torch.optim as optim
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
import os
from torch.autograd import Variable
from tensorflow.examples.tutorials.mnist import input_data
... | 23.973451 | 80 | 0.612034 |
d37b717984e5be52c15bfe6ec83ac7ae11e1ca50 | 9,134 | py | Python | tts/model/decoder.py | isadrtdinov/tacotron | 994716c0f731735b0edde57b920549b83bdd89ca | [
"MIT"
] | null | null | null | tts/model/decoder.py | isadrtdinov/tacotron | 994716c0f731735b0edde57b920549b83bdd89ca | [
"MIT"
] | null | null | null | tts/model/decoder.py | isadrtdinov/tacotron | 994716c0f731735b0edde57b920549b83bdd89ca | [
"MIT"
] | null | null | null | import random
import torch
from torch import nn
from .attention import Attention
from .feedforward import PreNet
class Decoder(nn.Module):
def __init__(self, num_mels=80, prenet_dim=256, embed_dim=512,
attention_lstm_dim=1024, decoder_lstm_dim=1024,
attention_dim=128, attention_d... | 46.365482 | 102 | 0.635866 |
b5cc0eec40c500c8039fc741b2b226e66a7f1c56 | 231 | py | Python | marcas/models/atani_marcas.py | pcs2216/modulos_atani | e3c1c5ce979113e043ed020a2d678665fb9412b0 | [
"Apache-2.0"
] | null | null | null | marcas/models/atani_marcas.py | pcs2216/modulos_atani | e3c1c5ce979113e043ed020a2d678665fb9412b0 | [
"Apache-2.0"
] | null | null | null | marcas/models/atani_marcas.py | pcs2216/modulos_atani | e3c1c5ce979113e043ed020a2d678665fb9412b0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from odoo import api, fields, models
class x_Marcas(models.Model):
_name = 'x.model.marcas'
_description = 'Marcas de productos'
x_name = fields.Char(
string='Marca',
)
| 16.5 | 40 | 0.588745 |
41354e71c2e137f6174bae89bec3b6049bf47ed1 | 342 | py | Python | signage/tools/cacheitem.py | whetra/SignagePyQt | 1bad349247f38e858ba1934151c72492b63f03ad | [
"MIT"
] | 1 | 2020-07-03T01:34:33.000Z | 2020-07-03T01:34:33.000Z | signage/tools/cacheitem.py | whetra/SignagePyQt | 1bad349247f38e858ba1934151c72492b63f03ad | [
"MIT"
] | null | null | null | signage/tools/cacheitem.py | whetra/SignagePyQt | 1bad349247f38e858ba1934151c72492b63f03ad | [
"MIT"
] | 1 | 2020-09-30T15:42:51.000Z | 2020-09-30T15:42:51.000Z | from datetime import datetime
from datetime import timedelta
class CacheItem:
def __init__(self, key, value):
self.key = key
self.value = value
self.time = datetime.now()
def is_expired(self, ttl: timedelta):
if ttl is None:
return False
return datetime.no... | 21.375 | 47 | 0.619883 |
cbcfdde538ec9a1d0a179b7292a819e2d09d42d0 | 3,165 | py | Python | fixture/group.py | ManiKarnika/python_automation | 0dc466cabdabc1a861dc3b70865d896047ba0fe7 | [
"Apache-2.0"
] | null | null | null | fixture/group.py | ManiKarnika/python_automation | 0dc466cabdabc1a861dc3b70865d896047ba0fe7 | [
"Apache-2.0"
] | null | null | null | fixture/group.py | ManiKarnika/python_automation | 0dc466cabdabc1a861dc3b70865d896047ba0fe7 | [
"Apache-2.0"
] | null | null | null | from model.group import Group
class GroupHelper:
def __init__(self, app):
self.app = app
def return_to_groups_page(self):
wd = self.app.wd
if not (wd.current_url.endswith("/group.php") and len(wd.find_elements_by_name("new")) > 0):
wd.find_element_by_link_text("groups").c... | 33.670213 | 100 | 0.642654 |
d7c69afe323dfb3df0ab7e156e0e5069175ca573 | 31,259 | py | Python | IJB_evals.py | leondgarse/Keras_insightface | 7bdda6b831065a8418e63a18ba97c457df62a994 | [
"MIT"
] | 123 | 2020-01-17T15:23:03.000Z | 2022-03-29T07:31:11.000Z | IJB_evals.py | leondgarse/Keras_insightface | 7bdda6b831065a8418e63a18ba97c457df62a994 | [
"MIT"
] | 47 | 2020-05-18T10:25:04.000Z | 2022-03-06T10:44:41.000Z | IJB_evals.py | leondgarse/Keras_insightface | 7bdda6b831065a8418e63a18ba97c457df62a994 | [
"MIT"
] | 63 | 2020-04-22T05:43:17.000Z | 2022-03-26T09:40:27.000Z | #!/usr/bin/env python3
import os
import cv2
import numpy as np
import pandas as pd
from tqdm import tqdm
from skimage import transform
from sklearn.preprocessing import normalize
from sklearn.metrics import roc_curve, auc
class Mxnet_model_interf:
def __init__(self, model_file, layer="fc1", image_size=(112, 112))... | 48.463566 | 157 | 0.649349 |
62df7245b6e82259530f69155de1566db688c21e | 3,700 | py | Python | MAX30105.py | coltonweaver/MAX30105-Raspberry-Pi-Python | 5900f58d7d4b08791301a9e27fe8c0d0b9c17247 | [
"MIT"
] | 1 | 2020-12-06T06:09:31.000Z | 2020-12-06T06:09:31.000Z | MAX30105.py | coltonweaver/MAX30105-Raspberry-Pi-Python | 5900f58d7d4b08791301a9e27fe8c0d0b9c17247 | [
"MIT"
] | 1 | 2018-10-22T20:40:41.000Z | 2018-10-22T20:40:41.000Z | MAX30105.py | coltonweaver/MAX30105-Raspberry-Pi-Python-Library | 5900f58d7d4b08791301a9e27fe8c0d0b9c17247 | [
"MIT"
] | null | null | null | from smbus import SMBus
import time
class MAX30105(object):
def __init__(self, bus, address):
self.address = address
self.bus = SMBus(bus)
self._led_mode = None
self._pulse_width_set = None
try:
self.bus.read_byte(self.address)
except:
p... | 35.92233 | 98 | 0.618919 |
52aa62baf56f1dd547fa4c02b085c0a0a1d63490 | 8,089 | py | Python | python/tvm/auto_scheduler/auto_schedule.py | jiuqi-yang/dev-tvm | b04797561a7dac0557bc3a8348a803e67bb577ca | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | python/tvm/auto_scheduler/auto_schedule.py | jiuqi-yang/dev-tvm | b04797561a7dac0557bc3a8348a803e67bb577ca | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | python/tvm/auto_scheduler/auto_schedule.py | jiuqi-yang/dev-tvm | b04797561a7dac0557bc3a8348a803e67bb577ca | [
"Zlib",
"Unlicense",
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 42.130208 | 98 | 0.687724 |
05da8c2f5b175a1756a86155fd5fadaba68f61ba | 1,427 | py | Python | Redump Verifier 1.4.3.py | normalgamer/test | f1b8918ba59661784033ea67c0c77c4c22be4dcd | [
"MIT"
] | null | null | null | Redump Verifier 1.4.3.py | normalgamer/test | f1b8918ba59661784033ea67c0c77c4c22be4dcd | [
"MIT"
] | 1 | 2020-12-19T00:09:18.000Z | 2020-12-19T00:09:18.000Z | Redump Verifier 1.4.3.py | normalgamer/test | f1b8918ba59661784033ea67c0c77c4c22be4dcd | [
"MIT"
] | null | null | null | import os
import hashlib
dats = os.listdir("./dat")
read_size = 1024
hash = hashlib.md5()
gameVerified = False
line_number=0
print(""
+"================== Redump verifier - version 1.4.3 ====================\n"
+"------------------ Github.com/normalgamer --------------------\n"
+"\n... | 25.035088 | 126 | 0.448493 |
f6e89556ee97aa3b42414a068029310f448dc5a0 | 504 | py | Python | Python/challenges/andela/pig_latin.py | Kenneth-Macharia/Learning | 0948dda73d94b25f96fad7e9ff3523782b0a407a | [
"MIT"
] | null | null | null | Python/challenges/andela/pig_latin.py | Kenneth-Macharia/Learning | 0948dda73d94b25f96fad7e9ff3523782b0a407a | [
"MIT"
] | 3 | 2020-07-26T19:17:23.000Z | 2021-01-01T15:39:38.000Z | Python/challenges/andela/pig_latin.py | Kenneth-Macharia/Learning | 0948dda73d94b25f96fad7e9ff3523782b0a407a | [
"MIT"
] | null | null | null | def pig_latin_converter(word):
VOWELS = 'aeiou'
CONSONANTS = 'bcdfghjklmnpqrstvwxyz'
clean_word = word.lower().strip()
if clean_word != '' and word[0] in VOWELS or word[0] in CONSONANTS:
if word[0] in VOWELS:
return f'{word}way'
else:
index = 0
for i... | 26.526316 | 71 | 0.505952 |
f1d21255e0cc971c4dd8cf99530849aee7f1597e | 6,858 | py | Python | django-stdimage/fields.py | gitdaniel228/realtor | 4366d57b064be87b31c8a036b3ed7a99b2036461 | [
"BSD-3-Clause"
] | null | null | null | django-stdimage/fields.py | gitdaniel228/realtor | 4366d57b064be87b31c8a036b3ed7a99b2036461 | [
"BSD-3-Clause"
] | null | null | null | django-stdimage/fields.py | gitdaniel228/realtor | 4366d57b064be87b31c8a036b3ed7a99b2036461 | [
"BSD-3-Clause"
] | null | null | null | from django.db.models.fields.files import ImageField
from django.db.models import signals
from django.conf import settings
from django.core.files.storage import FileSystemStorage
from widgets import DelAdminFileWidget
from forms import StdImageFormField
import os, shutil
class ThumbnailField:
'''
Instances of ... | 43.405063 | 186 | 0.625109 |
60af80496423667f16fd28962ccaf114590ba3a5 | 762 | py | Python | skfem/__init__.py | HadrienNU/scikit-fem | 39d4cff53790725a865b1f2256dd3358c9ca878e | [
"BSD-3-Clause"
] | null | null | null | skfem/__init__.py | HadrienNU/scikit-fem | 39d4cff53790725a865b1f2256dd3358c9ca878e | [
"BSD-3-Clause"
] | null | null | null | skfem/__init__.py | HadrienNU/scikit-fem | 39d4cff53790725a865b1f2256dd3358c9ca878e | [
"BSD-3-Clause"
] | null | null | null | """Support for wildcard import."""
from skfem.mesh import * # noqa
from skfem.assembly import * # noqa
from skfem.mapping import * # noqa
from skfem.element import * # noqa
from skfem.utils import * # noqa
from skfem.assembly import __all__ as all_assembly
from skfem.mesh import __all__ as all_mesh
from skfem.el... | 23.8125 | 59 | 0.692913 |
0594567f6f3e14fa987fbe44bf4bc3ed2ecd1f40 | 22,771 | py | Python | code/trainer.py | Sreerag-ibtl/inference_AttnGan_py3 | 5a172d03f2397b4e541230a36392284f783a9bed | [
"MIT"
] | 1 | 2020-05-15T14:10:42.000Z | 2020-05-15T14:10:42.000Z | code/trainer.py | Sreerag-ibtl/inference_AttnGan_py3 | 5a172d03f2397b4e541230a36392284f783a9bed | [
"MIT"
] | null | null | null | code/trainer.py | Sreerag-ibtl/inference_AttnGan_py3 | 5a172d03f2397b4e541230a36392284f783a9bed | [
"MIT"
] | null | null | null |
from six.moves import range
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
import torch.backends.cudnn as cudnn
from PIL import Image
from miscc.config import cfg
from miscc.utils import mkdir_p
from miscc.utils import build_super_images, build_super_images2
from ... | 43.874759 | 93 | 0.481534 |
09d38588578056e82493c5fb56a2fd0ddfa44f36 | 87,040 | py | Python | cinder/volume/drivers/pure.py | ilay09/cinder | 86f084d42f18bd5971cc7a0df3e6d815543a472d | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/pure.py | ilay09/cinder | 86f084d42f18bd5971cc7a0df3e6d815543a472d | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/pure.py | ilay09/cinder | 86f084d42f18bd5971cc7a0df3e6d815543a472d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Pure Storage, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | 43.260437 | 79 | 0.602344 |
b580393dc45a8b435d8d8deef8e621f629ea62ef | 31,235 | py | Python | python/ccxt/async_support/gdax.py | justinchou/ccxt | c4e87ff857808b0e934b44b7cedd234baec4b942 | [
"MIT"
] | null | null | null | python/ccxt/async_support/gdax.py | justinchou/ccxt | c4e87ff857808b0e934b44b7cedd234baec4b942 | [
"MIT"
] | null | null | null | python/ccxt/async_support/gdax.py | justinchou/ccxt | c4e87ff857808b0e934b44b7cedd234baec4b942 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.async_support.base.exchange import Exchange
import base64
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.bas... | 39.891443 | 266 | 0.520634 |
a1fe9e3bcd932bcfcb990676cf74784e1cee977e | 1,240 | py | Python | src/crate/client/sqlalchemy/tests/__init__.py | mxm/crate-python | de13bf4a04e7c45864ebfdc144dffe1ddb53b88f | [
"Apache-2.0"
] | null | null | null | src/crate/client/sqlalchemy/tests/__init__.py | mxm/crate-python | de13bf4a04e7c45864ebfdc144dffe1ddb53b88f | [
"Apache-2.0"
] | null | null | null | src/crate/client/sqlalchemy/tests/__init__.py | mxm/crate-python | de13bf4a04e7c45864ebfdc144dffe1ddb53b88f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from unittest import TestSuite, makeSuite
from .connection_test import SqlAlchemyConnectionTest
from .dict_test import SqlAlchemyDictTypeTest
from .datetime_test import SqlAlchemyDateAndDateTimeTest
from .compiler_test import SqlAlchemyCompilerTest
from .update_test import SqlAlchemyUpdateTest
... | 38.75 | 67 | 0.824194 |
8dfd6772f87993fdadb333ab313dbd4d485c8b21 | 37,086 | py | Python | Score/ProteomeTools.py | m1258218761/p-score | 6031d0352561ba3b5baa352645c6cfdf560224f2 | [
"MIT"
] | 7 | 2019-09-16T13:14:29.000Z | 2019-09-18T01:47:51.000Z | Score/ProteomeTools.py | m1258218761/p-score | 6031d0352561ba3b5baa352645c6cfdf560224f2 | [
"MIT"
] | null | null | null | Score/ProteomeTools.py | m1258218761/p-score | 6031d0352561ba3b5baa352645c6cfdf560224f2 | [
"MIT"
] | null | null | null | # coding=utf-8
import copy
import math
import torch
import numpy as np
from tqdm import tqdm
from sklearn.metrics import r2_score
from sklearn.metrics.pairwise import cosine_similarity
from Model.data_util import data
from Score.match_ions import MATCH
from Model.Resnet_model import ResNet18
'''
This is for Proteome... | 47.123253 | 129 | 0.463328 |
66ac0d8ab76890c54c147b8f460a78a4317714d9 | 61 | py | Python | tests/__init__.py | mbhall88/npSimulate | 03d9e184428ef36fae19a91b339cff81fcf73d73 | [
"MIT"
] | 14 | 2018-04-08T17:24:38.000Z | 2021-06-19T08:05:37.000Z | tests/__init__.py | mbhall88/npSimulate | 03d9e184428ef36fae19a91b339cff81fcf73d73 | [
"MIT"
] | 2 | 2017-08-25T05:18:15.000Z | 2017-09-18T03:45:55.000Z | tests/__init__.py | mbhall88/taeper | 03d9e184428ef36fae19a91b339cff81fcf73d73 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Unit test package for taeper."""
| 15.25 | 35 | 0.557377 |
a9331ce1dffc4e92f7c53258d0a563baa7ef8d26 | 3,134 | py | Python | bot/utils/functions.py | rqinflow/cloudy-bot | 2f659f6258556f11a91c934c1aeecab35fed945d | [
"MIT"
] | null | null | null | bot/utils/functions.py | rqinflow/cloudy-bot | 2f659f6258556f11a91c934c1aeecab35fed945d | [
"MIT"
] | null | null | null | bot/utils/functions.py | rqinflow/cloudy-bot | 2f659f6258556f11a91c934c1aeecab35fed945d | [
"MIT"
] | null | null | null | import discord
import datetime
from firebase_admin import db
from discord.ext import commands
async def embedAttributes(embed_info, avatar):
content = embed_info.split(" && ")
title = content[0]
description = content[1]
color = content[2]
embed = discord.Embed(title=title, description=description, ... | 46.776119 | 85 | 0.541481 |
047b509e39312ad29f2eaef45da035e84b695157 | 10,822 | py | Python | tests/test_external_list.py | arielmorelli/server_core | b34e3b334c5255bd60df0dc68ed16473e5b43ad7 | [
"Apache-2.0"
] | null | null | null | tests/test_external_list.py | arielmorelli/server_core | b34e3b334c5255bd60df0dc68ed16473e5b43ad7 | [
"Apache-2.0"
] | null | null | null | tests/test_external_list.py | arielmorelli/server_core | b34e3b334c5255bd60df0dc68ed16473e5b43ad7 | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
import datetime
from nose.tools import (
assert_raises,
assert_raises_regexp,
eq_,
set_trace,
)
from . import (
DatabaseTest,
DummyMetadataClient,
)
from ..model import (
DataSource,
Edition,
Identifier,
Subject,
)
from ..external_list import (
CustomListF... | 36.684746 | 108 | 0.641009 |
61a884e9da6ed51c71d5a499675212b55a862ea6 | 4,342 | py | Python | tests/test_unique_entries.py | uk-gov-mirror/ONSdigital.companies-house-big-data-project | be74293b4398976696d07c6b2329d6121c9e5c6a | [
"MIT"
] | null | null | null | tests/test_unique_entries.py | uk-gov-mirror/ONSdigital.companies-house-big-data-project | be74293b4398976696d07c6b2329d6121c9e5c6a | [
"MIT"
] | null | null | null | tests/test_unique_entries.py | uk-gov-mirror/ONSdigital.companies-house-big-data-project | be74293b4398976696d07c6b2329d6121c9e5c6a | [
"MIT"
] | null | null | null | import unittest
import pandas as pd
from pandas.testing import assert_frame_equal
# Custom import
from src.data_processing.xbrl_pd_methods import XbrlSubsets
class TestUniqueEntries(unittest.TestCase):
"""
"""
def test_unique_entries_pos(self):
"""
Positive test case for the unique_entri... | 32.893939 | 111 | 0.461999 |
10027b0aecff7c4351eadeeded63d255041d31d9 | 2,730 | py | Python | src/test/python/apache/aurora/client/hooks/test_hooked_api.py | jeremyvdw/aurora | fa9d83a7ef3a96c522884089a471bbb0bef74c48 | [
"Apache-2.0"
] | 479 | 2015-03-27T22:59:49.000Z | 2022-03-09T08:40:49.000Z | src/test/python/apache/aurora/client/hooks/test_hooked_api.py | jeremyvdw/aurora | fa9d83a7ef3a96c522884089a471bbb0bef74c48 | [
"Apache-2.0"
] | 69 | 2015-05-26T20:06:29.000Z | 2020-01-13T19:18:59.000Z | src/test/python/apache/aurora/client/hooks/test_hooked_api.py | jeremyvdw/aurora | fa9d83a7ef3a96c522884089a471bbb0bef74c48 | [
"Apache-2.0"
] | 226 | 2015-03-27T20:02:59.000Z | 2022-03-09T08:40:53.000Z | #
# 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 ... | 38.450704 | 97 | 0.779487 |
44a876c62b721e016efc9e184218bf9d20f0db24 | 8,205 | py | Python | darts_search_space/imagenet/rlnas/train_supernet/train.py | megvii-model/RLNAS | a7e2ef9debcd06a93b075181a027b806b737b106 | [
"MIT"
] | 17 | 2021-05-17T04:54:17.000Z | 2022-01-23T09:59:02.000Z | darts_search_space/imagenet/rlnas/train_supernet/train.py | megvii-model/RLNAS | a7e2ef9debcd06a93b075181a027b806b737b106 | [
"MIT"
] | 2 | 2021-07-09T05:14:29.000Z | 2022-02-05T10:15:31.000Z | darts_search_space/imagenet/rlnas/train_supernet/train.py | megvii-model/RLNAS | a7e2ef9debcd06a93b075181a027b806b737b106 | [
"MIT"
] | 8 | 2021-05-28T00:04:20.000Z | 2021-10-18T02:41:34.000Z | import os
import sys
import time
import glob
import numpy as np
import torch
from utils import *
import argparse
import torch.nn as nn
import torch.backends.cudnn as cudnn
from torch.autograd import Variable
from config import config
import shutil
import functools
print=functools.partial(print,flush=True)
from super_m... | 41.231156 | 150 | 0.67532 |
9bc4e08dbfca0e7ad238329f7e217ecf9e0e9614 | 5,634 | py | Python | alien_invasion.py | juntaow0/alien_invasion_pygame | fe81afc4865a1bd931f067479af112d46e21db38 | [
"MIT"
] | null | null | null | alien_invasion.py | juntaow0/alien_invasion_pygame | fe81afc4865a1bd931f067479af112d46e21db38 | [
"MIT"
] | null | null | null | alien_invasion.py | juntaow0/alien_invasion_pygame | fe81afc4865a1bd931f067479af112d46e21db38 | [
"MIT"
] | null | null | null | import sys
import pygame
from settings import Settings
from ship import Ship
from bullet import Bullet
from alien import Alien
class AlienInvasion:
"""Overall class to manage game assets and behavior"""
def __init__(self) -> None:
"""initialize the game, and create game resources"""
pygame.ini... | 36.823529 | 103 | 0.621583 |
9ba0d05b44a20f3b492078a3b963f73de6e16227 | 62,929 | py | Python | ietf/utils/draft.py | omunroe-com/ietfdb2 | aeaae292fbd55aca1b6043227ec105e67d73367f | [
"BSD-3-Clause"
] | 2 | 2021-11-20T03:40:56.000Z | 2021-11-20T03:40:59.000Z | ietf/utils/draft.py | omunroe-com/ietfdb2 | aeaae292fbd55aca1b6043227ec105e67d73367f | [
"BSD-3-Clause"
] | null | null | null | ietf/utils/draft.py | omunroe-com/ietfdb2 | aeaae292fbd55aca1b6043227ec105e67d73367f | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# -*- python -*-
from __future__ import unicode_literals
"""
NAME
%(program)s - Extract meta-information from an IETF draft.
SYNOPSIS
%(program)s [OPTIONS] DRAFTLIST_FILE
DESCRIPTION
Extract information about authors' names and email addresses,
intended status and number of pages f... | 44.821225 | 508 | 0.440449 |
f35119ef802c7adcfa01a2cf0cd5eb74e4028f4a | 16,896 | py | Python | landlab/components/pet/potential_evapotranspiration_field.py | AndresQuichimbo/landlab | 39fee962ec962a389ae4522a55a17f53a0d37a6e | [
"MIT"
] | null | null | null | landlab/components/pet/potential_evapotranspiration_field.py | AndresQuichimbo/landlab | 39fee962ec962a389ae4522a55a17f53a0d37a6e | [
"MIT"
] | null | null | null | landlab/components/pet/potential_evapotranspiration_field.py | AndresQuichimbo/landlab | 39fee962ec962a389ae4522a55a17f53a0d37a6e | [
"MIT"
] | null | null | null | import numpy as np
from landlab import Component
_VALID_METHODS = set(["Constant", "PriestleyTaylor", "MeasuredRadiationPT", "Cosine"])
def _assert_method_is_valid(method):
if method not in _VALID_METHODS:
raise ValueError("%s: Invalid method name" % method)
class PotentialEvapotranspiration(Component... | 35.495798 | 99 | 0.583629 |
05dad70634ec11ff88759aa73b73361879c5e7c2 | 437 | py | Python | foppl/runtime.py | Tobias-Kohn/PyFOPPL-2 | 88122db0e689725543512080aab8dff76a6f7e9c | [
"MIT"
] | 4 | 2018-01-22T17:20:48.000Z | 2021-11-06T17:27:46.000Z | pyfo/foppl/runtime.py | bradleygramhansen/pyfo | 559678080f27e7d9f3f194a0c28e9e8bfe71a7f3 | [
"MIT"
] | 8 | 2018-01-22T10:12:12.000Z | 2018-01-30T15:47:37.000Z | pyfo/foppl/runtime.py | bradleygramhansen/pyfo | 559678080f27e7d9f3f194a0c28e9e8bfe71a7f3 | [
"MIT"
] | 4 | 2018-01-25T14:20:08.000Z | 2021-11-06T17:28:03.000Z | #
# This file is part of PyFOPPL, an implementation of a First Order Probabilistic Programming Language in Python.
#
# License: MIT (see LICENSE.txt)
#
# 08. Jan 2018, Tobias Kohn
# 23. Jan 2018, Tobias Kohn
#
__all__ = ['conj']
def conj(seq, *items):
return seq + list(items)
def index(idx):
if type(idx) is i... | 21.85 | 112 | 0.640732 |
823c404de82a7d9f2c591c8005f854da4b81c8b4 | 548 | py | Python | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/laundriemepleaz-33179 | 889c173629d902227cb4596151a7c8182e7b0dcc | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/laundriemepleaz-33179 | 889c173629d902227cb4596151a7c8182e7b0dcc | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/laundriemepleaz-33179 | 889c173629d902227cb4596151a7c8182e7b0dcc | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from django.db import migrations
def create_site(apps, schema_editor):
Site = apps.get_model("sites", "Site")
custom_domain = "laundriemepleaz-33179.botics.co"
site_params = {
"name": "LaundrieMePleaz",
}
if custom_domain:
site_params["domain"] = custom_domain
Site.objects.up... | 21.076923 | 61 | 0.664234 |
5508ad4ed233345c9e7ce2507da9dbe418fc38fd | 1,020 | py | Python | .github/workflows/deployment-scripts/ls_latest_csv.py | COVIDAnalytics/website | 482f29bfd3064af2c0b0c839624eff0800e04623 | [
"MIT"
] | 12 | 2020-04-07T03:30:13.000Z | 2020-09-06T05:45:32.000Z | .github/workflows/deployment-scripts/ls_latest_csv.py | COVIDAnalytics/website | 482f29bfd3064af2c0b0c839624eff0800e04623 | [
"MIT"
] | 58 | 2020-04-06T21:25:34.000Z | 2020-11-19T18:50:06.000Z | .github/workflows/deployment-scripts/ls_latest_csv.py | COVIDAnalytics/website | 482f29bfd3064af2c0b0c839624eff0800e04623 | [
"MIT"
] | 11 | 2020-04-14T11:38:21.000Z | 2021-09-06T13:00:18.000Z | # Usage: lsLatestCSV prefix dir
# Finds the latest CSV in current directory with prefix prefix using
# DELPHI team's dating convention
import os
import sys
import datetime
from datetime import timedelta
prefix = sys.argv[1]
new_dir = sys.argv[2]
os.chdir(new_dir)
print("[*] Looking for latest CSV with prefix: ... | 23.72093 | 71 | 0.668627 |
336037e4cf7fe868e910b1600ec3cd3dcd9517a3 | 3,618 | py | Python | applications/easysvm/scripts/datagen.py | ShankarNara/shogun | 8ab196de16b8d8917e5c84770924c8d0f5a3d17c | [
"BSD-3-Clause"
] | 2,753 | 2015-01-02T11:34:13.000Z | 2022-03-25T07:04:27.000Z | applications/easysvm/scripts/datagen.py | ShankarNara/shogun | 8ab196de16b8d8917e5c84770924c8d0f5a3d17c | [
"BSD-3-Clause"
] | 2,404 | 2015-01-02T19:31:41.000Z | 2022-03-09T10:58:22.000Z | applications/easysvm/scripts/datagen.py | ShankarNara/shogun | 8ab196de16b8d8917e5c84770924c8d0f5a3d17c | [
"BSD-3-Clause"
] | 1,156 | 2015-01-03T01:57:21.000Z | 2022-03-26T01:06:28.000Z | #!/usr/bin/env python
# This software is distributed under BSD 3-clause license (see LICENSE file).
#
# Authors: Soeren Sonnenburg
import sys
import random
from numpy import array
import esvm.parse
import esvm.plots
from esvm.datafuncs import MotifDataDef, fastawrite_sequence, arffwrite_sequence, arffwrite_real
from ... | 40.651685 | 99 | 0.57435 |
a8e1af00d096d8c79749d8fb18305c76ac2beb4e | 602 | py | Python | setup.py | arangaraju/graph-stix | 635d94f81e1651ccba0cea89b8be0fbaf80779dc | [
"MIT"
] | null | null | null | setup.py | arangaraju/graph-stix | 635d94f81e1651ccba0cea89b8be0fbaf80779dc | [
"MIT"
] | null | null | null | setup.py | arangaraju/graph-stix | 635d94f81e1651ccba0cea89b8be0fbaf80779dc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Setup file for graph_stix.
This file was generated with PyScaffold 2.5.6, a tool that easily
puts up a scaffold for your new Python project. Learn more under:
http://pyscaffold.readthedocs.org/
"""
import sys
from setuptools import setup
def setup_pa... | 25.083333 | 73 | 0.677741 |
1b4ea7a04714652f4a0a5f4366ae0ed9537205b8 | 1,806 | py | Python | src/cogent3/parse/gcg.py | StephenRogers1/cogent3 | 1116a0ab14d9c29a560297205546714e2db1896c | [
"BSD-3-Clause"
] | null | null | null | src/cogent3/parse/gcg.py | StephenRogers1/cogent3 | 1116a0ab14d9c29a560297205546714e2db1896c | [
"BSD-3-Clause"
] | null | null | null | src/cogent3/parse/gcg.py | StephenRogers1/cogent3 | 1116a0ab14d9c29a560297205546714e2db1896c | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
__author__ = "Matthew Wakefield"
__copyright__ = "Copyright 2007-2020, The Cogent Project"
__credits__ = ["Matthew Wakefield", "Peter Maxwell", "Gavin Huttley"]
__license__ = "BSD-3"
__version__ = "2020.12.21a"
__maintainer__ = "Matthew Wakefield"
__email__ = "wakefield@wehi.edu.au"
__status__ = ... | 30.610169 | 81 | 0.575305 |
6730afe28e59cf0320435f1d3b58a458c5083e2c | 17,962 | py | Python | train.py | guxd/DialoGPT | 4f042c9682f11e3143c585e75071a9038d00f273 | [
"MIT"
] | null | null | null | train.py | guxd/DialoGPT | 4f042c9682f11e3143c585e75071a9038d00f273 | [
"MIT"
] | null | null | null | train.py | guxd/DialoGPT | 4f042c9682f11e3143c585e75071a9038d00f273 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
'''
* @Desc: train GPT2 from scratch/ fine tuning. Modified based on Huggingface GPT-2 implementation
'''
import json
import os
import sys
import argparse
import logging
import time
import tqdm
import datetime
import torch
from collections i... | 47.518519 | 145 | 0.628939 |
c808c39f8c2de035886e720e5c0740d467a9c928 | 55 | py | Python | Module6/hw/01_hw_sort.py | xm4dn355x/specialist_python3_2nd_lvl | 4ea8c82eb0f32aa92c82914f6599c2c47a2f7032 | [
"MIT"
] | null | null | null | Module6/hw/01_hw_sort.py | xm4dn355x/specialist_python3_2nd_lvl | 4ea8c82eb0f32aa92c82914f6599c2c47a2f7032 | [
"MIT"
] | null | null | null | Module6/hw/01_hw_sort.py | xm4dn355x/specialist_python3_2nd_lvl | 4ea8c82eb0f32aa92c82914f6599c2c47a2f7032 | [
"MIT"
] | null | null | null | # Доделайте все задачи Module-5/practice/02_tasks_sort/ | 55 | 55 | 0.836364 |
8ba91338da044a060e50a457949a76c85e4502e9 | 8,930 | py | Python | tests/test_c_source.py | natgavrilenko/asn1tools | 6d5b5abeacad22b03ff91fcc8301c29ae6c7f5f0 | [
"MIT"
] | null | null | null | tests/test_c_source.py | natgavrilenko/asn1tools | 6d5b5abeacad22b03ff91fcc8301c29ae6c7f5f0 | [
"MIT"
] | null | null | null | tests/test_c_source.py | natgavrilenko/asn1tools | 6d5b5abeacad22b03ff91fcc8301c29ae6c7f5f0 | [
"MIT"
] | null | null | null | import unittest
import asn1tools
CODECS_AND_MODULES = [
('oer', asn1tools.source.c.oer),
('uper', asn1tools.source.c.uper)
]
class Asn1ToolsCSourceTest(unittest.TestCase):
def test_compile_error_unsupported_type(self):
for codec, module in CODECS_AND_MODULES:
foo = asn1tools.compil... | 36.748971 | 85 | 0.538298 |
3b350d74a5ebe04308b93fdaf8ffe824b9c7b3e5 | 35,260 | py | Python | rasa/nlu/components.py | praneethgb/rasa | 5bf227f165d0b041a367d2c0bbf712ebb6a54792 | [
"Apache-2.0"
] | 8 | 2020-09-16T17:22:13.000Z | 2022-02-01T00:11:30.000Z | rasa/nlu/components.py | praneethgb/rasa | 5bf227f165d0b041a367d2c0bbf712ebb6a54792 | [
"Apache-2.0"
] | 216 | 2020-09-20T13:05:58.000Z | 2022-03-28T12:10:24.000Z | rasa/nlu/components.py | praneethgb/rasa | 5bf227f165d0b041a367d2c0bbf712ebb6a54792 | [
"Apache-2.0"
] | 1 | 2022-02-01T18:23:23.000Z | 2022-02-01T18:23:23.000Z | from collections import defaultdict
import itertools
import logging
import typing
from typing import Any, Dict, Hashable, List, Optional, Set, Text, Tuple, Type, Iterable
import rasa.utils.train_utils
from rasa.exceptions import MissingDependencyException
from rasa.nlu.constants import COMPONENT_INDEX
from rasa.shared... | 38.160173 | 88 | 0.653885 |
6b7165eed86970a5217e2147cf9f92d7977a5320 | 9,644 | py | Python | MCTS.py | HenningBuhl/alpha-zero-general | 6cf547ec2e84404254ec7f130e03ba31e18c0655 | [
"MIT"
] | null | null | null | MCTS.py | HenningBuhl/alpha-zero-general | 6cf547ec2e84404254ec7f130e03ba31e18c0655 | [
"MIT"
] | null | null | null | MCTS.py | HenningBuhl/alpha-zero-general | 6cf547ec2e84404254ec7f130e03ba31e18c0655 | [
"MIT"
] | null | null | null | import math
import numpy as np
import time
import itertools
class MCTS():
"""
This class handles the MCTS tree.
"""
def __init__(self, game, nnet, args):
self.game = game
self.nnet = nnet
self.args = args
self.Qsa = {} # stores Q values for s,a (as defined in the ... | 43.053571 | 149 | 0.530382 |
e5df415d47ae5054244e301d153a857b64e2d5ad | 759 | py | Python | gevent/gevent-demo-select.py | all3g/pieces | bc378fd22ddc700891fe7f34ab0d5b341141e434 | [
"CNRI-Python"
] | 34 | 2016-10-31T02:05:24.000Z | 2018-11-08T14:33:13.000Z | gevent/gevent-demo-select.py | join-us/python-programming | bc378fd22ddc700891fe7f34ab0d5b341141e434 | [
"CNRI-Python"
] | 2 | 2017-05-11T03:00:31.000Z | 2017-11-01T23:37:37.000Z | gevent/gevent-demo-select.py | join-us/python-programming | bc378fd22ddc700891fe7f34ab0d5b341141e434 | [
"CNRI-Python"
] | 21 | 2016-08-19T09:05:45.000Z | 2018-11-08T14:33:16.000Z | #!/usr/bin/env python
# -*- coding: utf8 -*-
import time
import gevent
from gevent import select
start = time.time()
tic = lambda: 'at %1.1f seconds' % (time.time() - start)
def gr1():
# Busy waits for a second, but we don't want to stick around...
print('Started Polling: %s' % tic())
select.select([],... | 21.083333 | 72 | 0.59552 |
ba362a8733676f21712d3da607e890bb31858409 | 7,154 | py | Python | bionumpy/file_buffers.py | knutdrand/bionumpy | 2a520ebfce19f346284bd5cf21d6197f6ba801ba | [
"MIT"
] | null | null | null | bionumpy/file_buffers.py | knutdrand/bionumpy | 2a520ebfce19f346284bd5cf21d6197f6ba801ba | [
"MIT"
] | null | null | null | bionumpy/file_buffers.py | knutdrand/bionumpy | 2a520ebfce19f346284bd5cf21d6197f6ba801ba | [
"MIT"
] | 1 | 2022-03-07T21:58:03.000Z | 2022-03-07T21:58:03.000Z | import numpy as np
from npstructures import RaggedArray, RaggedView, RaggedShape, npdataclass
from .encodings import BaseEncoding, QualityEncoding
from .datatypes import SequenceEntry, SequenceEntryWithQuality
from .sequences import Sequences
NEWLINE = 10
class FileBuffer:
_buffer_divisor = 1
COMMENT = 0
... | 31.377193 | 94 | 0.609309 |
0d3520abe5ef46467b75149a6e8f2ee92360d2e2 | 573 | py | Python | Desafio054.py | Baeth/CeV-Python | 7d0952d096b2f945679f4f8fe938754f24c5775b | [
"Unlicense"
] | 2 | 2017-12-14T22:42:41.000Z | 2018-03-28T10:08:02.000Z | Desafio054.py | Baeth/CeV-Python | 7d0952d096b2f945679f4f8fe938754f24c5775b | [
"Unlicense"
] | null | null | null | Desafio054.py | Baeth/CeV-Python | 7d0952d096b2f945679f4f8fe938754f24c5775b | [
"Unlicense"
] | null | null | null | # ler o Nascimento de 5 pessoas e dizer quantas pessoas são maiores e menores de idade.
maior = []
menor = []
for f in range(1, 8):
i = int(input(f'Digite a idade da pessoa n°{f}: '))
if i >= 18:
maior.append(i)
elif 18 > i >= 0: # Comparação para não registrar idades negativas.
menor.append(i)
else:
print('... | 31.833333 | 99 | 0.682373 |
f888771cbd637c0b2fdf66ee7f0c7ef301228e8d | 1,268 | py | Python | qhub/provider/cloud/digital_ocean.py | ericdatakelly/qhub | 3275843543e1388e0d4b45c9bc542f5de10a716f | [
"BSD-3-Clause"
] | null | null | null | qhub/provider/cloud/digital_ocean.py | ericdatakelly/qhub | 3275843543e1388e0d4b45c9bc542f5de10a716f | [
"BSD-3-Clause"
] | null | null | null | qhub/provider/cloud/digital_ocean.py | ericdatakelly/qhub | 3275843543e1388e0d4b45c9bc542f5de10a716f | [
"BSD-3-Clause"
] | null | null | null | import os
import functools
import requests
def digital_ocean_request(url, method="GET", json=None):
BASE_DIGITALOCEAN_URL = "https://api.digitalocean.com/v2/"
for name in {"DIGITALOCEAN_TOKEN"}:
if name not in os.environ:
raise ValueError(
f"Digital Ocean api requests req... | 24.862745 | 104 | 0.684543 |
feb93a8a2091c8434832a18589d3f00bd8afb0e9 | 2,802 | py | Python | test/functional/rpc_invalidateblock.py | puzcoin/SyndicateQT | d49ebc0f0ba554bb41efb377b8c5bbc238677379 | [
"MIT"
] | null | null | null | test/functional/rpc_invalidateblock.py | puzcoin/SyndicateQT | d49ebc0f0ba554bb41efb377b8c5bbc238677379 | [
"MIT"
] | null | null | null | test/functional/rpc_invalidateblock.py | puzcoin/SyndicateQT | d49ebc0f0ba554bb41efb377b8c5bbc238677379 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Syndicate Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the invalidateblock RPC."""
from test_framework.test_framework import SyndicateTestFramework
fr... | 43.107692 | 100 | 0.660243 |
55a460d1d7d9632946bf4e96c822e4a1da3ec90c | 1,587 | py | Python | my_socket.py | Jay54520/python_socket | ce2351a99153beebf9fab546ff00c08f517593f7 | [
"Apache-2.0"
] | 1 | 2019-10-31T09:18:14.000Z | 2019-10-31T09:18:14.000Z | my_socket.py | Jay54520/python_socket | ce2351a99153beebf9fab546ff00c08f517593f7 | [
"Apache-2.0"
] | 9 | 2018-02-14T03:57:59.000Z | 2018-02-20T12:26:16.000Z | my_socket.py | Jay54520/python_socket | ce2351a99153beebf9fab546ff00c08f517593f7 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import socket
from settings import BUFFER_MAXSIZE, MSG_PREFIX_LENGTH
class MySocket:
def __init__(self, sock=None):
if sock is None:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
else:
self.sock = sock
def my_send(self, msg: by... | 28.854545 | 99 | 0.574039 |
600955770c84db523b2733941390c98004e2e0e7 | 572 | py | Python | parlaskupine/admin.py | VesterDe/parlalize | b725fe4b55b95f2ad3505aa70dac2474269ea3da | [
"Unlicense"
] | 1 | 2021-04-19T07:30:06.000Z | 2021-04-19T07:30:06.000Z | parlaskupine/admin.py | VesterDe/parlalize | b725fe4b55b95f2ad3505aa70dac2474269ea3da | [
"Unlicense"
] | null | null | null | parlaskupine/admin.py | VesterDe/parlalize | b725fe4b55b95f2ad3505aa70dac2474269ea3da | [
"Unlicense"
] | null | null | null | from django.contrib import admin
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
from parlaskupine.models import *
# Register your models here.
admin.site.register(Organization)
admin.site.register(PGStatic)
admin.site.register(PercentOFAttendedSession)
admin.site.register(MPOfPg)
admin.site.register(MostMatchi... | 28.6 | 45 | 0.840909 |
c8f76538b6414b7292b5ff39375761f8a0d7135a | 683 | py | Python | Python/MaximumDepthOfBinaryTreeTest.py | TonnyL/Windary | 39f85cdedaaf5b85f7ce842ecef975301fc974cf | [
"MIT"
] | 205 | 2017-11-16T08:38:46.000Z | 2022-03-06T05:50:03.000Z | Python/MaximumDepthOfBinaryTreeTest.py | santosh241/Windary | 39f85cdedaaf5b85f7ce842ecef975301fc974cf | [
"MIT"
] | 3 | 2018-04-10T10:17:52.000Z | 2020-12-11T08:00:09.000Z | Python/MaximumDepthOfBinaryTreeTest.py | santosh241/Windary | 39f85cdedaaf5b85f7ce842ecef975301fc974cf | [
"MIT"
] | 28 | 2018-04-10T06:42:42.000Z | 2021-09-14T14:15:39.000Z | from unittest import TestCase
from MaximumDepthOfBinaryTree import MaximumDepthOfBinaryTree, TreeNode
class TestMaximumDepthOfBinaryTree(TestCase):
def test_maxDepth(self):
m = MaximumDepthOfBinaryTree()
self.assertTrue(m.maxDepth(None) == 0)
node0 = TreeNode(3)
node0.left = Tre... | 28.458333 | 71 | 0.650073 |
3a4d758be4ae086eab4f7710d223f08b34618cbd | 1,033 | py | Python | db/__init__.py | leonardodalinky/warframe-market-recorder | c2bbeb2a8005b5678abc894f561faa42dd75df47 | [
"MIT"
] | null | null | null | db/__init__.py | leonardodalinky/warframe-market-recorder | c2bbeb2a8005b5678abc894f561faa42dd75df47 | [
"MIT"
] | null | null | null | db/__init__.py | leonardodalinky/warframe-market-recorder | c2bbeb2a8005b5678abc894f561faa42dd75df47 | [
"MIT"
] | null | null | null | from dataclasses import dataclass, fields
import os
from dotenv import load_dotenv
from sqlalchemy.orm.decl_api import registry
from sqlalchemy.orm.decl_api import declared_attr
from sqlalchemy import create_engine, Column, Integer
load_dotenv()
@dataclass
class _Base:
__proto_enums__ = []
id: int = Column(... | 26.487179 | 102 | 0.717328 |
52942f969d1986ca7178d3dcab607eca0514ff32 | 659 | py | Python | python/test_2020_04_1.py | wensby/advent-of-code | 50cd7fa2d35674d868a79ac8c75be24a43267e2b | [
"MIT"
] | null | null | null | python/test_2020_04_1.py | wensby/advent-of-code | 50cd7fa2d35674d868a79ac8c75be24a43267e2b | [
"MIT"
] | null | null | null | python/test_2020_04_1.py | wensby/advent-of-code | 50cd7fa2d35674d868a79ac8c75be24a43267e2b | [
"MIT"
] | null | null | null | import importlib
import unittest
solution = importlib.import_module('2020_04_1')
class Test2020Day4Part1(unittest.TestCase):
def test_example1(self):
input = (
'ecl:gry pid:860033327 eyr:2020 hcl:#fffffd\n'
'byr:1937 iyr:2017 cid:147 hgt:183cm\n'
'\n'
'iyr:2013 ecl:amb cid:350 e... | 26.36 | 59 | 0.60091 |
7cf40fbf855a043249e8cd53464f1809488df9de | 4,665 | py | Python | cnns/base_networks/resnet_truncated.py | johnwlambert/dlupi-heteroscedastic-dropou | 057dd079fce7ec8833b818b77fd694c01a1adcbc | [
"MIT"
] | 39 | 2018-04-04T13:29:03.000Z | 2022-03-12T23:57:33.000Z | cnns/base_networks/resnet_truncated.py | johnwlambert/dlupi-heteroscedastic-dropou | 057dd079fce7ec8833b818b77fd694c01a1adcbc | [
"MIT"
] | 5 | 2018-04-30T12:14:38.000Z | 2021-04-26T23:52:18.000Z | cnns/base_networks/resnet_truncated.py | johnwlambert/dlupi-heteroscedastic-dropou | 057dd079fce7ec8833b818b77fd694c01a1adcbc | [
"MIT"
] | 10 | 2018-05-14T09:14:55.000Z | 2021-11-10T00:23:21.000Z | import torch.nn as nn
import math
import torch.utils.model_zoo as model_zoo
# We don't use the model URLs because we are training from scratch.
def conv3x3(in_planes, out_planes, stride=1):
"3x3 convolution with padding"
return nn.Conv2d(in_planes, out_planes, kernel_size=3, stride=stride,
... | 30.490196 | 78 | 0.58328 |
e6bcfc29279791b172c12464e5477f1ae94ba41f | 4,151 | py | Python | macaque/f_sql.py | pbujold/macaqueModules | 3f55ec45f691972e40cc8bd98071b7934ae24349 | [
"MIT"
] | 1 | 2021-08-25T08:45:52.000Z | 2021-08-25T08:45:52.000Z | macaque/f_sql.py | pbujold/macaqueModules | 3f55ec45f691972e40cc8bd98071b7934ae24349 | [
"MIT"
] | null | null | null | macaque/f_sql.py | pbujold/macaqueModules | 3f55ec45f691972e40cc8bd98071b7934ae24349 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
def correct_date(db):
import sqlite3
conn = sqlite3.connect(db)
dfTable = pd.read_sql("SELECT * FROM Trials_Digital", conn)
allDates = dfTable.date
uniques = np.unique(allDates)
index = {}
for unique in uniques:
index[tuple(unique)] = [
i for i,... | 29.027972 | 115 | 0.540352 |
dc2eb7ce7a8eec9195a91eb6002212d80f2f1c36 | 7,584 | py | Python | python/uptune/opentuner/tuningrunmain.py | Hecmay/uptune | 20a1462c772041b8d1b99f326b372284896faaba | [
"BSD-3-Clause"
] | 29 | 2020-06-19T18:07:38.000Z | 2022-01-03T23:06:53.000Z | python/uptune/opentuner/tuningrunmain.py | Hecmay/uptune | 20a1462c772041b8d1b99f326b372284896faaba | [
"BSD-3-Clause"
] | 4 | 2020-07-14T16:20:23.000Z | 2021-05-15T13:56:24.000Z | python/uptune/opentuner/tuningrunmain.py | Hecmay/uptune | 20a1462c772041b8d1b99f326b372284896faaba | [
"BSD-3-Clause"
] | 2 | 2020-06-20T00:43:23.000Z | 2020-12-26T00:38:31.000Z | from __future__ import print_function
# vim: tabstop=2 shiftwidth=2 softtabstop=2 expandtab autoindent smarttab
from builtins import object
import argparse
import copy
import inspect
import logging
import math
import os
import socket
import sys
import time
import uuid
from datetime import datetime
from uptune.opentune... | 33.409692 | 102 | 0.637922 |
798f14f983ba4a3a2579b84968aea5d23db0ffaf | 47,378 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_scale_set_vms_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2019-05-17T21:24:53.000Z | 2020-02-12T11:13:42.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_scale_set_vms_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 15 | 2019-07-12T18:18:04.000Z | 2019-07-25T20:55:51.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2016_03_30/operations/_virtual_machine_scale_set_vms_operations.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2020-05-21T22:51:22.000Z | 2020-05-26T20:53:01.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 49.455115 | 237 | 0.666048 |
c94dabbdff70fb5f5f8c6bd413793010ba08f0ba | 417 | py | Python | webappdjango/wsgi.py | atanbhardwaj/Session_Python_Django | 249bce0e15b45aa9f6b02a5f7722dbafeabd5053 | [
"MIT"
] | null | null | null | webappdjango/wsgi.py | atanbhardwaj/Session_Python_Django | 249bce0e15b45aa9f6b02a5f7722dbafeabd5053 | [
"MIT"
] | null | null | null | webappdjango/wsgi.py | atanbhardwaj/Session_Python_Django | 249bce0e15b45aa9f6b02a5f7722dbafeabd5053 | [
"MIT"
] | null | null | null | """
WSGI config for webappdjango project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdef... | 24.529412 | 79 | 0.760192 |
edf6f5be297b9907de813be43688125ab6edc968 | 3,250 | py | Python | mcrouter/test/McrouterTestCase.py | mbrickn/mcrouter | 9ac4d710723d82cec310f6eaa82eba005858513c | [
"MIT"
] | null | null | null | mcrouter/test/McrouterTestCase.py | mbrickn/mcrouter | 9ac4d710723d82cec310f6eaa82eba005858513c | [
"MIT"
] | null | null | null | mcrouter/test/McrouterTestCase.py | mbrickn/mcrouter | 9ac4d710723d82cec310f6eaa82eba005858513c | [
"MIT"
] | null | null | null | # 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.
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_li... | 34.210526 | 78 | 0.608923 |
e9afc55e1e79e5a78803d4efbe7fe02574d99b6c | 21,207 | py | Python | mbed_flasher/main.py | bridadan/mbed-flasher | 39d27a41926b7a3c8e8c29690cae9bf48583eb1d | [
"Apache-2.0"
] | null | null | null | mbed_flasher/main.py | bridadan/mbed-flasher | 39d27a41926b7a3c8e8c29690cae9bf48583eb1d | [
"Apache-2.0"
] | null | null | null | mbed_flasher/main.py | bridadan/mbed-flasher | 39d27a41926b7a3c8e8c29690cae9bf48583eb1d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
Copyright 2016 ARM Limited
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 ... | 41.994059 | 100 | 0.570613 |
af23df9c6c86292150e4137280ce2c667618ecf8 | 7,633 | py | Python | Inference/InferConsensusGrooming.py | KumarLabJax/MouseGrooming | 811b0382592c5a4010f7bc90468105c4a1ba452f | [
"MIT"
] | 4 | 2021-04-07T11:15:28.000Z | 2021-11-15T16:45:59.000Z | Inference/InferConsensusGrooming.py | KumarLabJax/MouseGrooming | 811b0382592c5a4010f7bc90468105c4a1ba452f | [
"MIT"
] | null | null | null | Inference/InferConsensusGrooming.py | KumarLabJax/MouseGrooming | 811b0382592c5a4010f7bc90468105c4a1ba452f | [
"MIT"
] | null | null | null | import keras
from keras.models import load_model, Model
from keras.layers import Input, concatenate
from keras.layers.core import Reshape
import imageio
import os
import numpy as np
from scipy.misc import imresize
import sys, getopt, re, argparse
import tensorflow as tf
import matplotlib.cm as cm
from time import time
... | 39.345361 | 220 | 0.741124 |
77673f06eb2ca856c42db364dbaa556ab5a6a49f | 8,487 | py | Python | Lib/hashlib.py | idobatter/cpython | c7b03e7b57cedccb77e37f65f9bbcb82050c2bb5 | [
"PSF-2.0"
] | 9 | 2015-11-06T02:38:00.000Z | 2021-11-14T05:34:23.000Z | Lib/hashlib.py | idobatter/cpython | c7b03e7b57cedccb77e37f65f9bbcb82050c2bb5 | [
"PSF-2.0"
] | null | null | null | Lib/hashlib.py | idobatter/cpython | c7b03e7b57cedccb77e37f65f9bbcb82050c2bb5 | [
"PSF-2.0"
] | 2 | 2019-08-03T20:16:15.000Z | 2020-03-20T21:51:40.000Z | #. Copyright (C) 2005-2010 Gregory P. Smith (greg@krypto.org)
# Licensed to PSF under a Contributor Agreement.
#
__doc__ = """hashlib module - A common interface to many hash functions.
new(name, data=b'') - returns a new hash object implementing the
given hash function; initializing the has... | 37.553097 | 83 | 0.641334 |
b55596c9db5f079bbb61ef67c28e4f4ef90a6974 | 1,432 | py | Python | paper/tests/paper_synthetic1_itr.py | ascillitoe/defragTrees | e2284ad79c2017e0d0813d6fc09aec28637774ca | [
"MIT"
] | null | null | null | paper/tests/paper_synthetic1_itr.py | ascillitoe/defragTrees | e2284ad79c2017e0d0813d6fc09aec28637774ca | [
"MIT"
] | null | null | null | paper/tests/paper_synthetic1_itr.py | ascillitoe/defragTrees | e2284ad79c2017e0d0813d6fc09aec28637774ca | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: Satoshi Hara
"""
import sys
import os
sys.path.append(os.path.abspath('./'))
sys.path.append(os.path.abspath('../'))
import numpy as np
import paper_sub_itr
# setting
prefix = 'synthetic1'
seed = 0
num = 1000
dim = 2
trial = 10
# data
b = 0.9
# data
if not os.path.exists('./res... | 23.866667 | 118 | 0.611732 |
8aab8501b015758dc5312fb9ec7ba145778c8c42 | 7,958 | py | Python | apps/package_CalSim.py | pyRobShrk/calsim_toolkit | ca6d63f6a89757f06b53d646da9310ea77446f13 | [
"MIT"
] | 1 | 2020-01-09T22:18:13.000Z | 2020-01-09T22:18:13.000Z | apps/package_CalSim.py | pyRobShrk/calsim_toolkit | ca6d63f6a89757f06b53d646da9310ea77446f13 | [
"MIT"
] | 15 | 2020-01-07T01:05:47.000Z | 2021-06-16T16:12:21.000Z | apps/package_CalSim.py | pyRobShrk/calsim_toolkit | ca6d63f6a89757f06b53d646da9310ea77446f13 | [
"MIT"
] | 3 | 2020-03-06T18:10:09.000Z | 2021-06-16T16:20:16.000Z | """
Summary
-------
The purpose of this module is to create a zip package for a CalSim study.
Notes
-----
1. How to make a file hidden:
https://stackoverflow.com/questions/43441883/how-can-i-make-a-file-hidden-on-windows
"""
# %% Import libraries.
# Import standard libraries.
import os
import shutil
import glob
im... | 34.903509 | 87 | 0.622895 |
7d89b86a8a241e86498b7f86530af632396ac692 | 186 | py | Python | smlb/features/__init__.py | CitrineInformatics/smlb | 28a3689bd36aa8d51031b4faf7e2331bbd8148a9 | [
"Apache-2.0"
] | 6 | 2020-07-27T21:08:55.000Z | 2021-05-04T07:00:29.000Z | smlb/features/__init__.py | CitrineInformatics/smlb | 28a3689bd36aa8d51031b4faf7e2331bbd8148a9 | [
"Apache-2.0"
] | 18 | 2020-09-01T00:47:04.000Z | 2021-09-15T22:16:56.000Z | smlb/features/__init__.py | CitrineInformatics/smlb | 28a3689bd36aa8d51031b4faf7e2331bbd8148a9 | [
"Apache-2.0"
] | 2 | 2020-08-24T21:50:16.000Z | 2020-12-06T05:18:57.000Z | from smlb.features.chemistry_development_kit_molecules import (
ChemistryDevelopmentKitMoleculeFeatures,
)
from smlb.features.matminer_composition import MatminerCompositionFeatures
| 37.2 | 74 | 0.887097 |
bdd5c50f3389f1039b4b3b2bb0245d42331175ec | 1,968 | py | Python | numpy/typing/mypy_plugin.py | alexhenrie/numpy | 662f973ba58563b268d009e67806aa1150ca1cb2 | [
"BSD-3-Clause"
] | 4 | 2021-02-19T19:10:50.000Z | 2021-02-23T13:27:44.000Z | numpy/typing/mypy_plugin.py | alexhenrie/numpy | 662f973ba58563b268d009e67806aa1150ca1cb2 | [
"BSD-3-Clause"
] | 169 | 2020-12-25T07:10:57.000Z | 2022-03-29T22:12:31.000Z | numpy/typing/mypy_plugin.py | alexhenrie/numpy | 662f973ba58563b268d009e67806aa1150ca1cb2 | [
"BSD-3-Clause"
] | null | null | null | """A module containing `numpy`-specific plugins for mypy."""
import typing as t
import numpy as np
try:
import mypy.types
from mypy.types import Type
from mypy.plugin import Plugin, AnalyzeTypeContext
_HookFunc = t.Callable[[AnalyzeTypeContext], Type]
MYPY_EX: t.Optional[ModuleNotFoundError] = No... | 28.114286 | 81 | 0.626524 |
970361b69af566e027101b9098d4da56f00db470 | 3,344 | py | Python | spydrnet/__init__.py | ganeshgore/spydrnet | 22672b8fc7d63461a71077bd20f29df6d38e96f4 | [
"BSD-3-Clause"
] | null | null | null | spydrnet/__init__.py | ganeshgore/spydrnet | 22672b8fc7d63461a71077bd20f29df6d38e96f4 | [
"BSD-3-Clause"
] | null | null | null | spydrnet/__init__.py | ganeshgore/spydrnet | 22672b8fc7d63461a71077bd20f29df6d38e96f4 | [
"BSD-3-Clause"
] | null | null | null | """
SpyDrNet
========
SpyDrNet is an EDA tool for analyzing and transforming netlists.
See https://byuccl.github.io/spydrnet for more details.
"""
import importlib
import pkgutil
import pathlib
import sys
import os
discovered_plugins = {
name: importlib.import_module(name)
for finder, name, ispkg
in pkg... | 30.962963 | 110 | 0.739833 |
d92a5f3ee330cf3deddb4be4d0a7ad5c7e34c048 | 16,641 | py | Python | deep_learning4e.py | netwong/aima-python | 3511e766fe8a45aeefb019c8a5c19636a3b11579 | [
"MIT"
] | 1 | 2020-04-24T17:12:48.000Z | 2020-04-24T17:12:48.000Z | deep_learning4e.py | surajit-techie/aima-python | 04fa465401af1939e076b022a9e10a5437ebefe7 | [
"MIT"
] | null | null | null | deep_learning4e.py | surajit-techie/aima-python | 04fa465401af1939e076b022a9e10a5437ebefe7 | [
"MIT"
] | 1 | 2019-12-09T20:50:14.000Z | 2019-12-09T20:50:14.000Z | """Deep learning. (Chapters 20)"""
import math
import random
import statistics
from keras import optimizers
from keras.layers import Dense, SimpleRNN
from keras.layers.embeddings import Embedding
from keras.models import Sequential
from keras.preprocessing import sequence
from utils4e import (sigmoid, dot_product, s... | 33.961224 | 113 | 0.634397 |
2a873b58cced04a93acdd1f59366a6e65721e1a1 | 3,261 | py | Python | Algorithm.Framework/Portfolio/ConfidenceWeightedPortfolioConstructionModel.py | echoplaza/Lean | 66f32cffe2ddb07532c8160299a7b1b6d67429ee | [
"Apache-2.0"
] | 1 | 2021-02-11T21:13:12.000Z | 2021-02-11T21:13:12.000Z | Algorithm.Framework/Portfolio/ConfidenceWeightedPortfolioConstructionModel.py | echoplaza/Lean | 66f32cffe2ddb07532c8160299a7b1b6d67429ee | [
"Apache-2.0"
] | 1 | 2020-08-25T03:02:47.000Z | 2020-08-25T03:02:47.000Z | Algorithm.Framework/Portfolio/ConfidenceWeightedPortfolioConstructionModel.py | echoplaza/Lean | 66f32cffe2ddb07532c8160299a7b1b6d67429ee | [
"Apache-2.0"
] | null | null | null | # QUANTCONNECT.COM - Democratizing Finance, Empowering Individuals.
# Lean Algorithmic Trading Engine v2.0. Copyright 2014 QuantConnect 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 Licen... | 56.224138 | 131 | 0.736584 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.