hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2a354ef0049096388bccc6314647ad7b75db7cfa | 3,711 | py | Python | lit_nlp/examples/datasets/classification.py | dearbornlavern/lit | 80f4f771a93ebd6c294f29d827f3993bc830958b | [
"Apache-2.0"
] | 2 | 2020-08-14T23:06:31.000Z | 2020-08-15T15:51:24.000Z | lit_nlp/examples/datasets/classification.py | joytianya/lit | 437df8d5907efe6c1ebb10ef2a161d2749aa3522 | [
"Apache-2.0"
] | 3 | 2022-02-13T20:17:36.000Z | 2022-02-27T10:16:12.000Z | lit_nlp/examples/datasets/classification.py | joytianya/lit | 437df8d5907efe6c1ebb10ef2a161d2749aa3522 | [
"Apache-2.0"
] | 1 | 2020-08-14T23:06:34.000Z | 2020-08-14T23:06:34.000Z | # Lint as: python3
"""Text classification datasets, including single- and two-sentence tasks."""
from lit_nlp.api import dataset as lit_dataset
from lit_nlp.api import types as lit_types
import pandas as pd
import tensorflow_datasets as tfds
class MNLIDataFromTSV(lit_dataset.Dataset):
"""MultiNLI dataset, from T... | 33.736364 | 80 | 0.63972 |
802e5c7ac671cbfea1b2fc5ff733016ecf9f6af4 | 177 | py | Python | monkeys-and-frogs-on-fire/triple_vision/networking/__init__.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 15 | 2020-04-17T12:02:14.000Z | 2022-03-16T03:01:34.000Z | monkeys-and-frogs-on-fire/triple_vision/networking/__init__.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 49 | 2020-04-18T21:14:57.000Z | 2022-01-13T03:05:09.000Z | monkeys-and-frogs-on-fire/triple_vision/networking/__init__.py | markjoshua12/game-jam-2020 | 846dd052d649a609ab7a52ac0f4dcbeb71781c3b | [
"MIT"
] | 55 | 2020-04-17T12:01:11.000Z | 2021-12-28T10:14:02.000Z | from triple_vision.networking.client import Client
from triple_vision.networking.utils import get_status
client = Client()
client.connect()
__all__ = ('client', 'get_status')
| 22.125 | 53 | 0.79661 |
a9cd0c061667b64f670a9b038b225e3ad0a95dfb | 2,887 | py | Python | pymatflow/scripts/chg-vasp.py | DeqiTang/pymatflow | bd8776feb40ecef0e6704ee898d9f42ded3b0186 | [
"MIT"
] | 6 | 2020-03-06T16:13:08.000Z | 2022-03-09T07:53:34.000Z | pymatflow/scripts/chg-vasp.py | DeqiTang/pymatflow | bd8776feb40ecef0e6704ee898d9f42ded3b0186 | [
"MIT"
] | 1 | 2021-10-02T02:23:08.000Z | 2021-11-08T13:29:37.000Z | pymatflow/scripts/chg-vasp.py | DeqiTang/pymatflow | bd8776feb40ecef0e6704ee898d9f42ded3b0186 | [
"MIT"
] | 1 | 2021-07-10T16:28:14.000Z | 2021-07-10T16:28:14.000Z | #!/usr/bin/env python
import argparse
from pymatflow.cmd.structflow import read_structure
from pymatflow.cmd.structflow import write_structure
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-i", "--input", type=str, required=True,
help="input vasp *CHG* file")
... | 40.661972 | 168 | 0.518878 |
8cec5abd03ef35b396baeef5b729ac3a33a5f954 | 78,915 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/aio/operations/_resources_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 1 | 2021-09-07T18:35:49.000Z | 2021-09-07T18:35:49.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/aio/operations/_resources_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_10_01/aio/operations/_resources_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 1 | 2019-04-05T18:17:43.000Z | 2019-04-05T18:17:43.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 ... | 51.645942 | 223 | 0.668263 |
2edde6dd9980e1a4f55f38d350b64b93c75b8811 | 6,229 | py | Python | thrift/compiler/test/fixtures/merge_from/gen-py/foo/ttypes.py | donsbot/fbthrift | 11e343118082583eb4326d51ff19c343c61ed3cb | [
"Apache-2.0"
] | null | null | null | thrift/compiler/test/fixtures/merge_from/gen-py/foo/ttypes.py | donsbot/fbthrift | 11e343118082583eb4326d51ff19c343c61ed3cb | [
"Apache-2.0"
] | null | null | null | thrift/compiler/test/fixtures/merge_from/gen-py/foo/ttypes.py | donsbot/fbthrift | 11e343118082583eb4326d51ff19c343c61ed3cb | [
"Apache-2.0"
] | null | null | null | #
# Autogenerated by Thrift
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
# @generated
#
from __future__ import absolute_import
import sys
from thrift.util.Recursive import fix_spec
from thrift.Thrift import TType, TMessageType, TPriority, TRequestContext, TProcessorEventHandler, TServerInterfa... | 27.200873 | 339 | 0.692085 |
2cbf7aafcc915fd7c875a71d6c861587f3d29c4e | 2,337 | py | Python | main.py | Liquidibrium/http-server | 73abc39123d38ac2461155595b44733b1621078a | [
"MIT"
] | null | null | null | main.py | Liquidibrium/http-server | 73abc39123d38ac2461155595b44733b1621078a | [
"MIT"
] | null | null | null | main.py | Liquidibrium/http-server | 73abc39123d38ac2461155595b44733b1621078a | [
"MIT"
] | null | null | null | import socket
import threading
import traceback
import RequestHandler
import data
server_sockets = []
# server creates class insance HTTP Request Handler,
# which handles clinet request and sends apropriate response
# if error is occure client_socket will be closed
def handle_http_request(client_socket, address):
... | 31.581081 | 79 | 0.68635 |
a270ff067de794a5f16c7e0a4cb0a0134d25d7c6 | 2,278 | py | Python | test/tests/function_instancemethod.py | kevinxucs/pyston | bdb87c1706ac74a0d15d9bc2bae53798678a5f14 | [
"Apache-2.0"
] | 1 | 2015-11-06T03:39:51.000Z | 2015-11-06T03:39:51.000Z | test/tests/function_instancemethod.py | kevinxucs/pyston | bdb87c1706ac74a0d15d9bc2bae53798678a5f14 | [
"Apache-2.0"
] | null | null | null | test/tests/function_instancemethod.py | kevinxucs/pyston | bdb87c1706ac74a0d15d9bc2bae53798678a5f14 | [
"Apache-2.0"
] | null | null | null | # TODO test all of this with getclsattr
# TODO should make an ics test
class C(object):
def f():
pass
def g():
print 'running g'
print C.f == C.f
print C.f is C.f
print C().f == C().f
print C().f is C().f
#### Check the types of stuff
print type(C.f) # instancemethod
print type(C().f) # instancemet... | 18.983333 | 82 | 0.671642 |
aeac46a6a80b31750c80612641dca8e1a4337462 | 22,169 | py | Python | bokeh/document/events.py | charliezhan/bokeh | 5b8263cd5281494326d2fcd57745a69a1c2e6d93 | [
"BSD-3-Clause"
] | 1 | 2020-02-06T05:27:53.000Z | 2020-02-06T05:27:53.000Z | bokeh/document/events.py | charliezhan/bokeh | 5b8263cd5281494326d2fcd57745a69a1c2e6d93 | [
"BSD-3-Clause"
] | null | null | null | bokeh/document/events.py | charliezhan/bokeh | 5b8263cd5281494326d2fcd57745a69a1c2e6d93 | [
"BSD-3-Clause"
] | null | null | null | ''' Provide events that represent various changes to Bokeh Documents.
These events are used internally to signal changes to Documents. For
information about user-facing (e.g. UI or tool) events, see the reference
for :ref:`bokeh.events`.
'''
from __future__ import absolute_import
class DocumentChangedEvent(object):
... | 33.387048 | 98 | 0.582706 |
88a0f91690258375a27829200682bdc2f2876182 | 1,660 | py | Python | stubs.min/Autodesk/Revit/DB/__init___parts/FamilySizeTableColumn.py | ricardyn/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | 1 | 2021-02-02T13:39:16.000Z | 2021-02-02T13:39:16.000Z | stubs.min/Autodesk/Revit/DB/__init___parts/FamilySizeTableColumn.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | stubs.min/Autodesk/Revit/DB/__init___parts/FamilySizeTableColumn.py | hdm-dt-fb/ironpython-stubs | 4d2b405eda3ceed186e8adca55dd97c332c6f49d | [
"MIT"
] | null | null | null | class FamilySizeTableColumn(object,IDisposable):
""" Contains column information for a FamilySizeTable. """
def Dispose(self):
""" Dispose(self: FamilySizeTableColumn) """
pass
def ReleaseUnmanagedResources(self,*args):
""" ReleaseUnmanagedResources(self: FamilySizeTableColumn,disposing: bool) """
pas... | 33.2 | 215 | 0.7 |
a9daa88b0487f5f83128befeadda27149a2cdd0b | 22,378 | py | Python | application/third_party/webplugin/wsgi/webplugin_example.py | ucielp/clusters_web | 40affe91f94200bfbac0fd9197474f9cbb648abf | [
"MIT"
] | null | null | null | application/third_party/webplugin/wsgi/webplugin_example.py | ucielp/clusters_web | 40affe91f94200bfbac0fd9197474f9cbb648abf | [
"MIT"
] | null | null | null | application/third_party/webplugin/wsgi/webplugin_example.py | ucielp/clusters_web | 40affe91f94200bfbac0fd9197474f9cbb648abf | [
"MIT"
] | null | null | null | import sys
import re
from string import strip
#sys.path.insert(0, "/home/services/software/ete3-webplugin/")
sys.path.insert(0, "/home/jhuerta/_Devel/ete/ete31-beta/")
from ete3 import WebTreeApplication # Required to use the webplugin
from ete3 import PhyloTree, TreeStyle, faces # Required by my custom
... | 40.103943 | 176 | 0.616186 |
07d5550ef52c653f84cf878720a7ac5016c42b06 | 368 | py | Python | .history/ClassFiles/DataStructures/Set_20210101141417.py | minefarmer/Comprehensive-Python | f97b9b83ec328fc4e4815607e6a65de90bb8de66 | [
"Unlicense"
] | null | null | null | .history/ClassFiles/DataStructures/Set_20210101141417.py | minefarmer/Comprehensive-Python | f97b9b83ec328fc4e4815607e6a65de90bb8de66 | [
"Unlicense"
] | null | null | null | .history/ClassFiles/DataStructures/Set_20210101141417.py | minefarmer/Comprehensive-Python | f97b9b83ec328fc4e4815607e6a65de90bb8de66 | [
"Unlicense"
] | null | null | null | ''' SETS
A set is a collection of values.
Values in a set are not ordered.
Values in a set are not indexed.
How to create a Set with a comstructor() # 18
'''
fruits = {"grapes", "apples", "berries"}
for x in fruits:
print(x) # apples
# grapes
# berries
animals = set((... | 19.368421 | 62 | 0.581522 |
12d4c3cfe8a4d1b66778ca542339d91cb3a1cfb8 | 2,262 | py | Python | e-learning/educa/students/views.py | EssaAlshammri/django-by-example | d1a1cba9308d4f19bbb1228dbd191ad5540b2c78 | [
"MIT"
] | 3 | 2017-04-25T10:19:02.000Z | 2017-06-07T12:50:30.000Z | e-learning/educa/students/views.py | EssaAlshammri/django-by-example | d1a1cba9308d4f19bbb1228dbd191ad5540b2c78 | [
"MIT"
] | null | null | null | e-learning/educa/students/views.py | EssaAlshammri/django-by-example | d1a1cba9308d4f19bbb1228dbd191ad5540b2c78 | [
"MIT"
] | null | null | null | from django.contrib.auth import authenticate, login
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.mixins import LoginRequiredMixin
from django.core.urlresolvers import reverse_lazy
from django.views.generic.detail import DetailView
from django.views.generic.edit import CreateView, Form... | 34.272727 | 79 | 0.72458 |
41da5c0267b07eb97a622001272301fe1dad7c06 | 12,022 | py | Python | tests/components/vizio/test_config_flow.py | shexbeer/home-assistant | 883b8f21ce74120c28890bde64f1175723be11c7 | [
"Apache-2.0"
] | 1 | 2021-03-17T10:03:42.000Z | 2021-03-17T10:03:42.000Z | tests/components/vizio/test_config_flow.py | shexbeer/home-assistant | 883b8f21ce74120c28890bde64f1175723be11c7 | [
"Apache-2.0"
] | null | null | null | tests/components/vizio/test_config_flow.py | shexbeer/home-assistant | 883b8f21ce74120c28890bde64f1175723be11c7 | [
"Apache-2.0"
] | null | null | null | """Tests for Vizio config flow."""
import pytest
import voluptuous as vol
from homeassistant import data_entry_flow
from homeassistant.components.media_player import DEVICE_CLASS_SPEAKER, DEVICE_CLASS_TV
from homeassistant.components.vizio.const import (
CONF_VOLUME_STEP,
DEFAULT_NAME,
DEFAULT_VOLUME_STEP,... | 33.960452 | 118 | 0.719514 |
c3b1d5f29e7d4d47ed12b259e9cf3080d6a7c1c6 | 4,943 | py | Python | logging_loki/emitter.py | BlackSmith/python-logging-loki | 45fa383cd2dea38970514a2db7ac0bd4cb2ebb19 | [
"MIT"
] | null | null | null | logging_loki/emitter.py | BlackSmith/python-logging-loki | 45fa383cd2dea38970514a2db7ac0bd4cb2ebb19 | [
"MIT"
] | null | null | null | logging_loki/emitter.py | BlackSmith/python-logging-loki | 45fa383cd2dea38970514a2db7ac0bd4cb2ebb19 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import abc
import copy
import functools
import logging
import time
from logging.config import ConvertingDict
from typing import Any
from typing import Dict
from typing import Optional
from typing import Tuple
import requests
import rfc3339
from logging_loki import const
BasicAuth = Optional[... | 34.326389 | 110 | 0.630791 |
f9485a21eaf87b887c01d593396b4861f80225a8 | 1,494 | py | Python | 05.Popular reading blog rankings and cache speed/mysite/views.py | ReverseScale/DjangoProject | b82fffdef5084f616f9de86516254d6398ba08e8 | [
"MIT"
] | 1 | 2019-02-20T02:33:25.000Z | 2019-02-20T02:33:25.000Z | 05.Popular reading blog rankings and cache speed/mysite/views.py | ReverseScale/DjangoProject | b82fffdef5084f616f9de86516254d6398ba08e8 | [
"MIT"
] | null | null | null | 05.Popular reading blog rankings and cache speed/mysite/views.py | ReverseScale/DjangoProject | b82fffdef5084f616f9de86516254d6398ba08e8 | [
"MIT"
] | null | null | null | import datetime
from django.shortcuts import render_to_response
from django.contrib.contenttypes.models import ContentType
from django.utils import timezone
from django.db.models import Sum
from django.core.cache import cache
from read_statistics.utils import get_seven_days_read_data, get_today_hot_data, get_yesterday_... | 40.378378 | 102 | 0.742972 |
eb7872548f809875e9fdcfc9dbef5e904d71c431 | 69,229 | py | Python | meraki_v1/api/networks.py | zabrewer/dashboard-api-python | bc21b6852e3167dcdf79585928a963efebb9d0ee | [
"MIT"
] | null | null | null | meraki_v1/api/networks.py | zabrewer/dashboard-api-python | bc21b6852e3167dcdf79585928a963efebb9d0ee | [
"MIT"
] | null | null | null | meraki_v1/api/networks.py | zabrewer/dashboard-api-python | bc21b6852e3167dcdf79585928a963efebb9d0ee | [
"MIT"
] | null | null | null | class Networks(object):
def __init__(self, session):
super(Networks, self).__init__()
self._session = session
def getNetwork(self, networkId: str):
"""
**Return a network**
https://developer.cisco.com/docs/meraki-api-v1/#!get-network
- networkId (string)... | 46.776351 | 746 | 0.639674 |
5428c5d36d16dcb676f00d2321bb87f48c3fd307 | 8,500 | py | Python | tests/conftest.py | mabudz/pyam | ac64c7194c36b796ae473cae47c2917d3848e5bb | [
"Apache-2.0"
] | 1 | 2018-08-16T11:59:42.000Z | 2018-08-16T11:59:42.000Z | tests/conftest.py | shaohuizhang/pyam | 2dffec07ce86b2f3fb8133ac369fa3c172589064 | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | shaohuizhang/pyam | 2dffec07ce86b2f3fb8133ac369fa3c172589064 | [
"Apache-2.0"
] | 1 | 2022-03-11T12:19:51.000Z | 2022-03-11T12:19:51.000Z | # has to go first for environment setup reasons
import matplotlib
matplotlib.use("agg")
from pathlib import Path
import os
from requests.exceptions import ConnectionError
import pytest
import numpy as np
import pandas as pd
from datetime import datetime
from pyam import IamDataFrame, META_IDX, IAMC_IDX, iiasa
# ve... | 31.365314 | 83 | 0.618353 |
2e2b5df8db24a52abdcad1aac6b76d938a854d70 | 3,284 | py | Python | qiskit/qasm/node/id.py | romainfd/qiskit-terra | b5285ccc5cb1d17b7c73402833f2750b93652426 | [
"Apache-2.0"
] | 2 | 2020-12-26T21:12:30.000Z | 2021-05-18T12:53:42.000Z | qiskit/qasm/node/id.py | romainfd/qiskit-terra | b5285ccc5cb1d17b7c73402833f2750b93652426 | [
"Apache-2.0"
] | null | null | null | qiskit/qasm/node/id.py | romainfd/qiskit-terra | b5285ccc5cb1d17b7c73402833f2750b93652426 | [
"Apache-2.0"
] | 1 | 2020-07-13T17:56:46.000Z | 2020-07-13T17:56:46.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 38.635294 | 93 | 0.579781 |
816ffdc9a69bcc89914e4d93307131bea7fe088a | 2,782 | py | Python | libs/mpl/preprocessed/preprocess.py | Abce/boost | 2d7491a27211aa5defab113f8e2d657c3d85ca93 | [
"BSL-1.0"
] | 85 | 2015-02-08T20:36:17.000Z | 2021-11-14T20:38:31.000Z | libs/boost/libs/mpl/preprocessed/preprocess.py | flingone/frameworks_base_cmds_remoted | 4509d9f0468137ed7fd8d100179160d167e7d943 | [
"Apache-2.0"
] | 9 | 2015-01-28T16:33:19.000Z | 2020-04-12T23:03:28.000Z | libs/boost/libs/mpl/preprocessed/preprocess.py | flingone/frameworks_base_cmds_remoted | 4509d9f0468137ed7fd8d100179160d167e7d943 | [
"Apache-2.0"
] | 27 | 2015-01-28T16:33:30.000Z | 2021-08-12T05:04:39.000Z |
# Copyright Aleksey Gurtovoy 2001-2004
#
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
#
# See http://www.boost.org/libs/mpl for documentation.
# $Id$
# $Date$
# $Revision$
import pp
import shut... | 31.258427 | 110 | 0.575845 |
ef4b37943913d5aa2e80531f319847517cb450ab | 739 | py | Python | th2_common/schema/exception/router_error.py | ConnectDIY/th2-common-py | 977758a68d6a7db91ee38c36667e90bf663f14ef | [
"Apache-2.0"
] | null | null | null | th2_common/schema/exception/router_error.py | ConnectDIY/th2-common-py | 977758a68d6a7db91ee38c36667e90bf663f14ef | [
"Apache-2.0"
] | 18 | 2020-11-23T12:11:31.000Z | 2022-03-29T06:13:19.000Z | th2_common/schema/exception/router_error.py | ConnectDIY/th2-common-py | 977758a68d6a7db91ee38c36667e90bf663f14ef | [
"Apache-2.0"
] | 1 | 2021-01-20T11:21:57.000Z | 2021-01-20T11:21:57.000Z | # Copyright 2020-2020 Exactpro (Exactpro Systems 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... | 36.95 | 76 | 0.726658 |
75e3f0678349749443791f268f33a0abb6d21e5a | 9,340 | py | Python | convert.py | stephenxp04/keras-yolo3-object-web-deploy | 7c1e0a7b02c044a724d29778b73c0ad0b7586c67 | [
"MIT"
] | 2 | 2019-04-11T11:46:25.000Z | 2020-12-30T11:11:48.000Z | convert.py | stephenxp04/keras-yolo3-object-web-deploy | 7c1e0a7b02c044a724d29778b73c0ad0b7586c67 | [
"MIT"
] | null | null | null | convert.py | stephenxp04/keras-yolo3-object-web-deploy | 7c1e0a7b02c044a724d29778b73c0ad0b7586c67 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
"""
Reads Darknet config and weights and creates Keras model with TF backend.
"""
import argparse
import configparser
import io
import os
from collections import defaultdict
import numpy as np
from keras import backend as K
from keras.layers import (Conv2D, Input, ZeroPadding2D, Add,
... | 38.595041 | 81 | 0.595931 |
065ce952ff66ba988df8395a38d120bb1f84338c | 4,064 | py | Python | tutorial/app.py | p-ivanchik/Werkzeug-docs-cn | 18875d9f025e5ca6fce7e8ec443f9b9e28f474bc | [
"BSD-2-Clause"
] | 24 | 2015-05-27T02:57:05.000Z | 2020-03-19T03:33:11.000Z | tutorial/app.py | p-ivanchik/Werkzeug-docs-cn | 18875d9f025e5ca6fce7e8ec443f9b9e28f474bc | [
"BSD-2-Clause"
] | null | null | null | tutorial/app.py | p-ivanchik/Werkzeug-docs-cn | 18875d9f025e5ca6fce7e8ec443f9b9e28f474bc | [
"BSD-2-Clause"
] | 14 | 2015-10-14T18:19:41.000Z | 2021-08-19T16:16:32.000Z | import os
import redis
import urlparse
from werkzeug.wrappers import Request, Response
from werkzeug.routing import Map, Rule
from werkzeug.exceptions import HTTPException, NotFound
from werkzeug.wsgi import SharedDataMiddleware
from werkzeug.utils import redirect
from jinja2 import Environment, FileSystemLoader
def ... | 35.034483 | 76 | 0.633612 |
478aac80e6408702468aa10ab4e4b819e0f8777c | 313 | py | Python | app/user/urls.py | sorwarduet/recipe-app-api | ab13680369a693e5bf9d864328384f5781722cc2 | [
"MIT"
] | null | null | null | app/user/urls.py | sorwarduet/recipe-app-api | ab13680369a693e5bf9d864328384f5781722cc2 | [
"MIT"
] | null | null | null | app/user/urls.py | sorwarduet/recipe-app-api | ab13680369a693e5bf9d864328384f5781722cc2 | [
"MIT"
] | null | null | null |
from django.urls import path
from .views import CreateUserView, CreateUserToken, ManageUserView
app_name = 'user'
urlpatterns = [
path('create/', CreateUserView.as_view(), name='create'),
path('token/', CreateUserToken.as_view(), name='token'),
path('me/', ManageUserView.as_view(), name='me'),
]
| 24.076923 | 66 | 0.699681 |
ae661d7c7f6a7e2867e0f43b1d1a611775bc6cd6 | 24,638 | py | Python | ambari-agent/src/test/python/ambari_agent/TestRecoveryManager.py | emcvipr/ambari | 045e0d2ac94b8b81819d2efbfd7e1bddc67a7756 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-05-06T06:24:04.000Z | 2021-05-06T06:24:04.000Z | ambari-agent/src/test/python/ambari_agent/TestRecoveryManager.py | emcvipr/ambari | 045e0d2ac94b8b81819d2efbfd7e1bddc67a7756 | [
"Apache-2.0",
"MIT"
] | null | null | null | ambari-agent/src/test/python/ambari_agent/TestRecoveryManager.py | emcvipr/ambari | 045e0d2ac94b8b81819d2efbfd7e1bddc67a7756 | [
"Apache-2.0",
"MIT"
] | 3 | 2017-10-31T11:42:31.000Z | 2021-04-26T07:17:53.000Z | #!/usr/bin/env python
'''
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")... | 36.339233 | 112 | 0.679357 |
7673fa56162b73fe08884294d454dc83f0b5560c | 119 | py | Python | 02_excel_is_dead_long_live_pandas/src/_solutions/tab_data02.py | hello-world-academy/beiersdorf_05-06-2019 | 79b244ae21fa2815bf429653ccf6b51ddc468901 | [
"MIT"
] | null | null | null | 02_excel_is_dead_long_live_pandas/src/_solutions/tab_data02.py | hello-world-academy/beiersdorf_05-06-2019 | 79b244ae21fa2815bf429653ccf6b51ddc468901 | [
"MIT"
] | null | null | null | 02_excel_is_dead_long_live_pandas/src/_solutions/tab_data02.py | hello-world-academy/beiersdorf_05-06-2019 | 79b244ae21fa2815bf429653ccf6b51ddc468901 | [
"MIT"
] | null | null | null | pop.columns
pop.location_name.nunique()
pop.location_name.sample(10)
pop.sex_name.unique()
pop.age_group_name.unique()
| 19.833333 | 28 | 0.815126 |
944c45da790d745ea220ef7c7c6763d545423feb | 4,329 | py | Python | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/download_slowlog_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-dds/huaweicloudsdkdds/v3/model/download_slowlog_response.py | wuchen-huawei/huaweicloud-sdk-python-v3 | 3683d703f4320edb2b8516f36f16d485cff08fc2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/download_slowlog_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 DownloadSlowlogResponse(SdkResponse):
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (d... | 26.236364 | 94 | 0.560869 |
eb5493ac3694986b0673db4dc9ec0439e8080e77 | 5,118 | py | Python | torch_pitch_shift/main.py | ilaria-manco/torch-pitch-shift | 1e534ec8a385cbbd5f1f0b203c4835c08ea6eae6 | [
"MIT"
] | null | null | null | torch_pitch_shift/main.py | ilaria-manco/torch-pitch-shift | 1e534ec8a385cbbd5f1f0b203c4835c08ea6eae6 | [
"MIT"
] | null | null | null | torch_pitch_shift/main.py | ilaria-manco/torch-pitch-shift | 1e534ec8a385cbbd5f1f0b203c4835c08ea6eae6 | [
"MIT"
] | null | null | null | from collections import Counter
from fractions import Fraction
from functools import reduce
from itertools import chain, count, islice, repeat
from typing import Union, Callable, List, Optional
from torch.nn.functional import pad
import torch
import torchaudio.transforms as T
from primePy import primes
from math import... | 30.646707 | 120 | 0.623877 |
076895866604830f7d19970ebf55e12f087c728b | 47,608 | py | Python | lib/matplotlib/__init__.py | chebee7i/matplotlib | ebde05f5c1579c2ca28dab2a11ae5a674e4aac2f | [
"MIT",
"BSD-3-Clause"
] | null | null | null | lib/matplotlib/__init__.py | chebee7i/matplotlib | ebde05f5c1579c2ca28dab2a11ae5a674e4aac2f | [
"MIT",
"BSD-3-Clause"
] | null | null | null | lib/matplotlib/__init__.py | chebee7i/matplotlib | ebde05f5c1579c2ca28dab2a11ae5a674e4aac2f | [
"MIT",
"BSD-3-Clause"
] | null | null | null | """
This is an object-oriented plotting library.
A procedural interface is provided by the companion pyplot module,
which may be imported directly, e.g.::
import matplotlib.pyplot as plt
or using ipython::
ipython
at your terminal, followed by::
In [1]: %matplotlib
In [2]: import matplotlib.pyplot... | 32.080863 | 99 | 0.612733 |
c817c725b1d8605eeb9b7b3faf979c8a9e1060b8 | 67,987 | py | Python | test/unit/common/test_utils.py | ericwanghp/swift | 71a20d04ccac24b37b23fba87063e74e802c08fc | [
"Apache-2.0"
] | 1 | 2021-04-18T15:23:18.000Z | 2021-04-18T15:23:18.000Z | test/unit/common/test_utils.py | Triv90/SwiftUml | 98fa5adfe5664dbb4f328ba2a1789a63c7550eed | [
"Apache-2.0"
] | null | null | null | test/unit/common/test_utils.py | Triv90/SwiftUml | 98fa5adfe5664dbb4f328ba2a1789a63c7550eed | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010-2012 OpenStack, LLC.
#
# 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 ... | 42.412352 | 79 | 0.574419 |
c3359d2e3ec0f1b3afc3a7e77ff54cf0f7cfb6bd | 4,725 | py | Python | metadataproxy/settings.py | ystarikovich/metadataproxy | 258c9320c4b4455f0a8a54e22ea0c01f455a8d31 | [
"Apache-2.0"
] | null | null | null | metadataproxy/settings.py | ystarikovich/metadataproxy | 258c9320c4b4455f0a8a54e22ea0c01f455a8d31 | [
"Apache-2.0"
] | null | null | null | metadataproxy/settings.py | ystarikovich/metadataproxy | 258c9320c4b4455f0a8a54e22ea0c01f455a8d31 | [
"Apache-2.0"
] | null | null | null | import json
from os import getenv
def bool_env(var_name, default=False):
"""
Get an environment variable coerced to a boolean value.
Example:
Bash:
$ export SOME_VAL=True
settings.py:
SOME_VAL = bool_env('SOME_VAL', False)
Arguments:
var_name: The name o... | 41.447368 | 89 | 0.732063 |
4879085ecf897f57cf2e9abe4220090920a6c3bb | 1,027 | py | Python | lib/bx/seq/fasta_tests.py | mr-c/bx-python | 0b2b766eee008d1f7a2814be4ddd2c5dc3787537 | [
"MIT"
] | 122 | 2015-07-01T12:00:22.000Z | 2022-03-02T09:27:35.000Z | lib/bx/seq/fasta_tests.py | mr-c/bx-python | 0b2b766eee008d1f7a2814be4ddd2c5dc3787537 | [
"MIT"
] | 64 | 2015-11-06T21:03:18.000Z | 2022-03-24T00:55:27.000Z | lib/bx/seq/fasta_tests.py | mr-c/bx-python | 0b2b766eee008d1f7a2814be4ddd2c5dc3787537 | [
"MIT"
] | 60 | 2015-10-05T19:19:36.000Z | 2021-11-19T20:53:54.000Z | """
Tests for `bx.seq.fasta`.
"""
import unittest
from . import fasta
test_fa = "test_data/seq_tests/test.fa"
# Same sequence data as stored in test.fa
valid_seq = "TGGAGGCATTTGTGATTCAATAGATGCAGAAAGAAACCTTCCTAGAGCTG" \
+ "GCGTTCTCTAACTAAAAGTGGAAAGTTCTGAGGAATGAGGACTGTTATAA" \
+ "ATCCCACCCCACACCGCACCTTCTCCAG... | 28.527778 | 66 | 0.752678 |
e61c9a932f2c9dc7a40dc1e396fe8ef7c0d1ef78 | 3,908 | py | Python | keras-mnist-3.0.py | EitlerPereira/keras-mnist-workshop | 98803e19115e57373a749b2a89a4783544346430 | [
"Apache-2.0"
] | 18 | 2017-07-28T14:35:14.000Z | 2020-03-03T12:37:49.000Z | keras-mnist-3.0.py | EitlerPereira/keras-mnist-workshop | 98803e19115e57373a749b2a89a4783544346430 | [
"Apache-2.0"
] | null | null | null | keras-mnist-3.0.py | EitlerPereira/keras-mnist-workshop | 98803e19115e57373a749b2a89a4783544346430 | [
"Apache-2.0"
] | 11 | 2017-07-28T02:12:03.000Z | 2020-02-19T16:31:53.000Z | # encoding: UTF-8
# Copyright 2017 Udacity.com
# Authored by Daniel Rodrigues Loureiro (drlschilling@gmail.com)
# 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/license... | 41.574468 | 105 | 0.771238 |
4d374ded1592f9dc8a8e5d70f84058f70ab0a8f4 | 503 | py | Python | Programs/oopsBasics/course.py | LuciKritZ/python | ed5500f5aad3cb15354ca5ebf71748029fc6ae77 | [
"MIT"
] | null | null | null | Programs/oopsBasics/course.py | LuciKritZ/python | ed5500f5aad3cb15354ca5ebf71748029fc6ae77 | [
"MIT"
] | null | null | null | Programs/oopsBasics/course.py | LuciKritZ/python | ed5500f5aad3cb15354ca5ebf71748029fc6ae77 | [
"MIT"
] | null | null | null | class Course:
# Parameterized Constructor
def __init__(self, name, ratings):
self.name = name
self.ratings = ratings
def average(self):
numberOfRatings = len(self.ratings)
average = sum(self.ratings)/numberOfRatings
print("Average ratings for ", self.name, "is", ... | 25.15 | 63 | 0.638171 |
8a4601483ae6a02ea6df1934e7b5b759263eeec8 | 15,018 | py | Python | stellapy/data/read_netcdf.py | SStroteich/stella-1 | 104556a07b9736e7c28e6f1bf2f799384732f38b | [
"MIT"
] | 4 | 2021-12-15T08:23:45.000Z | 2022-02-18T15:14:42.000Z | stellapy/data/read_netcdf.py | SStroteich/stella-1 | 104556a07b9736e7c28e6f1bf2f799384732f38b | [
"MIT"
] | 37 | 2021-07-05T16:41:33.000Z | 2022-03-21T15:58:05.000Z | stellapy/data/read_netcdf.py | SStroteich/stella-1 | 104556a07b9736e7c28e6f1bf2f799384732f38b | [
"MIT"
] | 7 | 2021-07-05T15:35:55.000Z | 2022-03-09T09:23:42.000Z |
# TODO: To save memory, save only unique time and z axis in dictionaries and use references
import numpy as np
import h5py, copy, os
from scipy.io import netcdf as scnetcdf
#===========================================
# READ THE NETCDF FILE
#===========================================
def read_netcdf(netcdf_file, ... | 46.93125 | 116 | 0.616061 |
d731a0311325b0ab264e1ef585d33f0ea4907e44 | 4,589 | py | Python | test/test_workflow.py | ewebed/biggerquery | 7892cf394444fc44a731da44ffbf0a029343c3c8 | [
"Apache-2.0"
] | null | null | null | test/test_workflow.py | ewebed/biggerquery | 7892cf394444fc44a731da44ffbf0a029343c3c8 | [
"Apache-2.0"
] | null | null | null | test/test_workflow.py | ewebed/biggerquery | 7892cf394444fc44a731da44ffbf0a029343c3c8 | [
"Apache-2.0"
] | null | null | null | from collections import OrderedDict
import mock
from unittest import TestCase
from bigflow.workflow import Workflow, Definition, InvalidJobGraph, WorkflowJob
class WorkflowTestCase(TestCase):
def test_should_run_jobs(self):
# given
definition = [mock.Mock() for i in range(100)]
workflow ... | 29.416667 | 121 | 0.449553 |
c755d79d6284afc9a634f756312bb6cd2c26e9fe | 20,038 | py | Python | Simulation_decimal_patch.py | jecki/CoopSim | 65756b0a98d894e5a10c63431bb119a0b9c3e363 | [
"MIT"
] | 4 | 2015-09-06T18:48:36.000Z | 2021-04-13T00:38:06.000Z | Simulation_decimal_patch.py | jecki/CoopSim | 65756b0a98d894e5a10c63431bb119a0b9c3e363 | [
"MIT"
] | null | null | null | Simulation_decimal_patch.py | jecki/CoopSim | 65756b0a98d894e5a10c63431bb119a0b9c3e363 | [
"MIT"
] | null | null | null | # simulation setup and simulation objects
from __future__ import generators # retain python 2.2 compatibility
from decimal import *
import copy, re
from PyPlotter import Gfx, Colors
from PopulationDynamics import Dynamics
import PrisonersDilemma as PD
from PopulationDynamics.Compatibility import *
from Logging import ... | 45.130631 | 82 | 0.541122 |
2ab56a94f77d9485e44199c70332478423553a6b | 3,638 | py | Python | setup.py | edaa-org/pyEDAA.OutputFilter | ca602c9992b40df7bd117968c0dc333a4f16d255 | [
"Apache-2.0"
] | 1 | 2021-12-30T02:49:43.000Z | 2021-12-30T02:49:43.000Z | setup.py | edaa-org/pyEDAA.OutputFilter | ca602c9992b40df7bd117968c0dc333a4f16d255 | [
"Apache-2.0"
] | null | null | null | setup.py | edaa-org/pyEDAA.OutputFilter | ca602c9992b40df7bd117968c0dc333a4f16d255 | [
"Apache-2.0"
] | null | null | null | # =============================================================================
# _____ ____ _ _
# _ __ _ _| ____| _ \ / \ / \
# | '_ \| | | | _| | | | |/ _ \ / _ \
# | |_) | |_| | |___| |_| / ___ \ / ___ \
# | .__/ \__, |_____|____/_/ \_\/_/ \_\
# |_| |___/
# =======... | 37.122449 | 125 | 0.644035 |
1f94b165ac1e7f09bc90473e2b3a03319b2cc8d4 | 15,723 | py | Python | src/live_EEG_CNN_180403.py | gumpy-bci/gumpy-online-hybrid-bci | 2a773edba9c5053f77eb5d631f3459cbaadd5b9b | [
"MIT"
] | 3 | 2019-01-12T02:50:40.000Z | 2019-07-20T07:31:29.000Z | src/live_EEG_CNN_180403.py | gumpy-bci/gumpy-online-hybrid-bci | 2a773edba9c5053f77eb5d631f3459cbaadd5b9b | [
"MIT"
] | 1 | 2018-08-13T19:13:18.000Z | 2018-08-13T19:13:18.000Z | src/live_EEG_CNN_180403.py | gumpy-bci/gumpy-online-hybrid-bci | 2a773edba9c5053f77eb5d631f3459cbaadd5b9b | [
"MIT"
] | 3 | 2018-08-10T14:20:29.000Z | 2021-05-25T02:02:34.000Z | # Jonas Braun, jonas.braun@tum.de
# MSNE Research Internship Hybrid BCI
# 03.03´4.2018
# class used for live EEG with a CNN for classification based on CNN-py by Sai Lam Loo
from __future__ import print_function
import sys
sys.path.append('..\..')
import numpy as np
import gumpy
from gumpy.data.nst_eeg... | 43.675 | 159 | 0.592953 |
91a335832bcc23221e9e0daab27f4cf9deb7da8d | 21,804 | py | Python | tornado/platform/twisted.py | LumbaJack/tornado | fbe23251e87c9984a370518fd7ccf1ca0bb56df1 | [
"Apache-2.0"
] | 1 | 2016-04-27T12:00:48.000Z | 2016-04-27T12:00:48.000Z | tornado/platform/twisted.py | LumbaJack/Ordered-Tornado | fbe23251e87c9984a370518fd7ccf1ca0bb56df1 | [
"Apache-2.0"
] | null | null | null | tornado/platform/twisted.py | LumbaJack/Ordered-Tornado | fbe23251e87c9984a370518fd7ccf1ca0bb56df1 | [
"Apache-2.0"
] | null | null | null | # Author: Ovidiu Predescu
# Date: July 2011
#
# 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 ... | 37.271795 | 132 | 0.624473 |
8121b9391015d04f246360c17d0f71629f6e52cc | 5,138 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/aio/operations/_express_route_service_providers_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/aio/operations/_express_route_service_providers_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_04_01/aio/operations/_express_route_service_providers_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.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 ... | 47.137615 | 135 | 0.66991 |
a5b1b685157999ae5776007b76ddcffa58a7c9ee | 1,494 | py | Python | tests/materialPoints_xml.py | kinnder/processPlanning | bb50a5e26545d68de88516178435b922e44cf4e8 | [
"MIT"
] | null | null | null | tests/materialPoints_xml.py | kinnder/processPlanning | bb50a5e26545d68de88516178435b922e44cf4e8 | [
"MIT"
] | null | null | null | tests/materialPoints_xml.py | kinnder/processPlanning | bb50a5e26545d68de88516178435b922e44cf4e8 | [
"MIT"
] | null | null | null | from subprocess import check_output
application: str = 'application-0.2.0.jar'
task_domain: str = 'materialPoints'
file_format: str = 'xml'
task_description_file: str = task_domain + '_td.' + file_format
system_transformation_file: str = task_domain + '_st.' + file_format
node_network_file: str = task_domain + '_nn... | 26.210526 | 68 | 0.583668 |
cbca641476202134ffb62a43d51ca43b1b56bb8b | 5,069 | py | Python | controllers/designer.py | rhullcsa/RunestoneServer | db1ad6078f855a058e735bdbc6c1f130f1a34ee7 | [
"MIT"
] | null | null | null | controllers/designer.py | rhullcsa/RunestoneServer | db1ad6078f855a058e735bdbc6c1f130f1a34ee7 | [
"MIT"
] | null | null | null | controllers/designer.py | rhullcsa/RunestoneServer | db1ad6078f855a058e735bdbc6c1f130f1a34ee7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
from os import path
import random
import datetime
import logging
logger = logging.getLogger(settings.logger)
logger.setLevel(settings.log_level)
admin_logger(logger)
################################################... | 35.447552 | 135 | 0.591241 |
2faab18c5e9c205b059c990eaa37293abfbd4acb | 2,100 | py | Python | socialregistration/models.py | leopd/django-socialregistration | cec489cfbd44094a99a8fc00cc5a703fbdc2474a | [
"MIT"
] | 1 | 2020-03-08T19:31:57.000Z | 2020-03-08T19:31:57.000Z | socialregistration/models.py | leopd/django-socialregistration | cec489cfbd44094a99a8fc00cc5a703fbdc2474a | [
"MIT"
] | null | null | null | socialregistration/models.py | leopd/django-socialregistration | cec489cfbd44094a99a8fc00cc5a703fbdc2474a | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth import authenticate
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
class FacebookProfile(models.Model):
user = models.ForeignKey(User)
site = models.ForeignKey(Site, default=Site.objects.get_current)
uid = mod... | 34.42623 | 85 | 0.71381 |
26c27af8f3ea9532c0cdeb6fdf2b190a9112ccd6 | 22,174 | py | Python | phovea_server/range.py | phovea/phovea_server | f83879f58669ff4d554efcb727b1c6fd0185041a | [
"BSD-3-Clause"
] | 3 | 2018-06-08T01:28:56.000Z | 2020-01-10T14:17:34.000Z | phovea_server/range.py | phovea/phovea_server | f83879f58669ff4d554efcb727b1c6fd0185041a | [
"BSD-3-Clause"
] | 88 | 2016-11-06T08:28:21.000Z | 2022-03-22T07:18:59.000Z | phovea_server/range.py | phovea/phovea_server | f83879f58669ff4d554efcb727b1c6fd0185041a | [
"BSD-3-Clause"
] | 6 | 2017-06-06T20:43:00.000Z | 2020-02-13T18:23:46.000Z | ###############################################################################
# Caleydo - Visualization for Molecular Biology - http://caleydo.org
# Copyright (c) The Caleydo Team. All rights reserved.
# Licensed under the new BSD license, available at http://caleydo.org/license
######################################... | 25.169126 | 112 | 0.607378 |
0a905290948958fdcaaf9f29b6e404a3f295b22f | 60,328 | py | Python | wwr_ui/randomizer_window.py | TeknoAnonymous/wwrando-multiworld | 11ad6d10996b74b0d8ed661e6fa31d80b39aba68 | [
"MIT"
] | null | null | null | wwr_ui/randomizer_window.py | TeknoAnonymous/wwrando-multiworld | 11ad6d10996b74b0d8ed661e6fa31d80b39aba68 | [
"MIT"
] | null | null | null | wwr_ui/randomizer_window.py | TeknoAnonymous/wwrando-multiworld | 11ad6d10996b74b0d8ed661e6fa31d80b39aba68 | [
"MIT"
] | null | null | null | from PySide6.QtGui import *
from PySide6.QtCore import *
from PySide6.QtWidgets import *
from wwr_ui.ui_randomizer_window import Ui_MainWindow
from wwr_ui.options import OPTIONS, NON_PERMALINK_OPTIONS, HIDDEN_OPTIONS, POTENTIALLY_UNBEATABLE_OPTIONS
from wwr_ui.update_checker import check_for_updates, LATEST_RELEASE_DO... | 40.407234 | 269 | 0.7104 |
a85f30668dda392629e51da821a6aea550b63fe2 | 26,110 | py | Python | couchdbkit/designer/fs.py | gelnior/couchdbkit | 8277d6ffd00553ae0b0b2368636460d40f8d8225 | [
"MIT"
] | null | null | null | couchdbkit/designer/fs.py | gelnior/couchdbkit | 8277d6ffd00553ae0b0b2368636460d40f8d8225 | [
"MIT"
] | null | null | null | couchdbkit/designer/fs.py | gelnior/couchdbkit | 8277d6ffd00553ae0b0b2368636460d40f8d8225 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -
#
# This file is part of couchdbkit released under the MIT license.
# See the NOTICE for more information.
import base64
import copy
from hashlib import md5
import logging
import mimetypes
import os
import os.path
import re
from .. import client
from ..exceptions import ResourceNotFound, Design... | 37.140825 | 93 | 0.490578 |
954c87400d2067376056253351a50270720c2684 | 17,710 | py | Python | 20211206/solveMDP_richLow.py | dongxulee/lifeCycleRefine | 6ca9670dea50150aabe31f86578323cec0ab018c | [
"MIT"
] | null | null | null | 20211206/solveMDP_richLow.py | dongxulee/lifeCycleRefine | 6ca9670dea50150aabe31f86578323cec0ab018c | [
"MIT"
] | null | null | null | 20211206/solveMDP_richLow.py | dongxulee/lifeCycleRefine | 6ca9670dea50150aabe31f86578323cec0ab018c | [
"MIT"
] | null | null | null | import numpy as np
import jax.numpy as jnp
from jax.numpy import interp
from jax import jit, partial, random, vmap
from tqdm import tqdm
import pandas as pd
import warnings
import os.path
warnings.filterwarnings("ignore")
np.printoptions(precision=2)
AgentType = ["richLow"]
Beta_r = [0.01, 0.02, 0.03, 0.04, 0.05, 0.0... | 37.84188 | 144 | 0.469622 |
830b3207dce050cf0b9ed9117c77c880e5e1a023 | 627 | py | Python | src/manage.py | leksuss/glassdb | 247777f5023df9ff92971ddf6315f0257610ece8 | [
"MIT"
] | null | null | null | src/manage.py | leksuss/glassdb | 247777f5023df9ff92971ddf6315f0257610ece8 | [
"MIT"
] | null | null | null | src/manage.py | leksuss/glassdb | 247777f5023df9ff92971ddf6315f0257610ece8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'djanger.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Import... | 28.5 | 73 | 0.682616 |
52446f5104613ca175484baf5d2ad224316a509d | 13,995 | py | Python | stackexchange2json.py | nad2000/Stackexchange-Parsing | e9e8687e92b9ee99e65986f657d04eceef56c098 | [
"Apache-2.0"
] | null | null | null | stackexchange2json.py | nad2000/Stackexchange-Parsing | e9e8687e92b9ee99e65986f657d04eceef56c098 | [
"Apache-2.0"
] | null | null | null | stackexchange2json.py | nad2000/Stackexchange-Parsing | e9e8687e92b9ee99e65986f657d04eceef56c098 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -------------------------------------------------------------------------
# Name: stackexchange.py
#
# Author: Radomirs Cirskis
#
# Created: 2016-07-06
# Licence: WTFPL
# -------------------------------------------------------------------------
## NB! on MS Windows set UTF-8 for the c... | 33.968447 | 162 | 0.522186 |
284b986d2faee4c10a6ad81b77a2539e9961ecc9 | 12,781 | py | Python | easy_command_sdk/model/container/workload_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | easy_command_sdk/model/container/workload_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | easy_command_sdk/model/container/workload_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: workload.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf im... | 58.360731 | 1,562 | 0.773179 |
a21f64b01fd96e84aa0b203b59d041d6383ab4cd | 4,793 | py | Python | fiases/room.py | u4097/elasticsearch-fias | d03e16492af2f39a7cc59723aa2af8d04998ecfd | [
"MIT"
] | 3 | 2020-02-14T06:20:14.000Z | 2022-01-10T12:40:13.000Z | fiases/room.py | u4097/elasticsearch-fias | d03e16492af2f39a7cc59723aa2af8d04998ecfd | [
"MIT"
] | null | null | null | fiases/room.py | u4097/elasticsearch-fias | d03e16492af2f39a7cc59723aa2af8d04998ecfd | [
"MIT"
] | 1 | 2020-02-14T06:28:29.000Z | 2020-02-14T06:28:29.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from tqdm import tqdm
from lxml import etree
from pathlib import Path
from fiases.fias_data import ES
from xml.dom import pulldom
from xml.dom.pulldom import parse
from elasticsearch.helpers import parallel_bulk
from elasticsearch.client import IndicesClient
# Local modul... | 29.404908 | 75 | 0.473816 |
a5c0edd25b90df4f9730e0cd2b7abc8b5372295e | 5,454 | py | Python | tests/test_cell_metadata.py | broadinstitute/scp-ingest-service | 1a63a27061b53a5f7909c72d59808f9af71456a6 | [
"BSD-3-Clause"
] | null | null | null | tests/test_cell_metadata.py | broadinstitute/scp-ingest-service | 1a63a27061b53a5f7909c72d59808f9af71456a6 | [
"BSD-3-Clause"
] | null | null | null | tests/test_cell_metadata.py | broadinstitute/scp-ingest-service | 1a63a27061b53a5f7909c72d59808f9af71456a6 | [
"BSD-3-Clause"
] | null | null | null | import sys
import unittest
import json
from mock_data.annotation.metadata.convention.valid_array_v2_1_2 import (
valid_array_v2_1_2_models,
)
sys.path.append("../ingest")
from cell_metadata import CellMetadata
from validation.validate_metadata import collect_jsonschema_errors
from ingest_pipeline import IngestPip... | 40.4 | 92 | 0.657682 |
86b560f8af4aa77b581d1af06d7fe48f629ee09a | 1,472 | py | Python | tests/embedding/metric/test_distortion_metrics.py | microsoft/topologic | d3a2155a42469ccb16de178f47bec81b0476fdc8 | [
"MIT"
] | 24 | 2020-02-10T23:51:06.000Z | 2021-11-17T02:34:47.000Z | tests/embedding/metric/test_distortion_metrics.py | microsoft/topologic | d3a2155a42469ccb16de178f47bec81b0476fdc8 | [
"MIT"
] | 26 | 2020-02-11T18:37:33.000Z | 2020-11-11T00:14:41.000Z | tests/embedding/metric/test_distortion_metrics.py | microsoft/topologic | d3a2155a42469ccb16de178f47bec81b0476fdc8 | [
"MIT"
] | 6 | 2020-07-31T11:05:36.000Z | 2021-11-10T08:18:52.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import unittest
import topologic as tc
import networkx as nx
import numpy as np
class TestDistortionMetrics(unittest.TestCase):
def test_mean_average_precision_calculated_correctly(self):
graph = nx.Graph()
graph... | 39.783784 | 106 | 0.699728 |
fdfe71973c08d2d01521f7c161c30d193b839104 | 365 | py | Python | django/testapp/tests.py | xyshal/django-site-template | 2b9af032b19dd85acbe65dbbba90a43402cf4d88 | [
"MIT"
] | null | null | null | django/testapp/tests.py | xyshal/django-site-template | 2b9af032b19dd85acbe65dbbba90a43402cf4d88 | [
"MIT"
] | null | null | null | django/testapp/tests.py | xyshal/django-site-template | 2b9af032b19dd85acbe65dbbba90a43402cf4d88 | [
"MIT"
] | null | null | null | from django.test import TestCase
from testapp.models import TestModel
class TestCase(TestCase):
def setUp(self):
TestModel.objects.create(address="123 Fake St", state="AK", zip_code=99701)
def test_f(self):
record = TestModel.objects.get(address="123 Fake St", state="AK", zip_code=99701)
... | 30.416667 | 89 | 0.709589 |
0cfa70e1483ba08d37d4dfb1b04fbf1ee94b9563 | 821 | py | Python | aalh_iit_transportation_003/cleanup-description-pipes.py | johndewees/iitmigration | 4dadfbecda719d6e7d60af076a231aedec3c862f | [
"Unlicense"
] | null | null | null | aalh_iit_transportation_003/cleanup-description-pipes.py | johndewees/iitmigration | 4dadfbecda719d6e7d60af076a231aedec3c862f | [
"Unlicense"
] | null | null | null | aalh_iit_transportation_003/cleanup-description-pipes.py | johndewees/iitmigration | 4dadfbecda719d6e7d60af076a231aedec3c862f | [
"Unlicense"
] | null | null | null | from openpyxl import load_workbook
filename = 'aalh_iit_transportation_003.xlsx'
wb = load_workbook(filename)
ws = wb['Metadata Template']
minimumcol = 8
maximumcol = 8
minimumrow = 7
maximumrow = 515
iterationrow = 7
targetcol = 13
titlecol = 2
desccol = 8
for row in ws.iter_rows(min_row=minimumrow... | 28.310345 | 105 | 0.651644 |
faaefca06b3edebf1066341dfb8d5490daed2698 | 20,045 | py | Python | django/db/backends/mysql/base.py | aptivate/django-old | 33b2a85150658fc7c2207ac2f5fd6f89739773e4 | [
"BSD-3-Clause"
] | 50 | 2015-01-13T10:01:41.000Z | 2021-10-15T01:44:43.000Z | django/db/backends/mysql/base.py | akaariai/django-old | 45b80c420d6655ec5b86bea3b3c17b4adaa61291 | [
"BSD-3-Clause"
] | 20 | 2015-04-20T12:09:12.000Z | 2022-03-12T01:25:04.000Z | django/db/backends/mysql/base.py | akaariai/django-old | 45b80c420d6655ec5b86bea3b3c17b4adaa61291 | [
"BSD-3-Clause"
] | 24 | 2015-07-22T08:08:54.000Z | 2021-12-28T06:56:09.000Z | """
MySQL database backend for Django.
Requires MySQLdb: http://sourceforge.net/projects/mysql-python
"""
import datetime
import re
import sys
import warnings
try:
import MySQLdb as Database
except ImportError, e:
from django.core.exceptions import ImproperlyConfigured
raise ImproperlyConfigured("Error l... | 43.015021 | 127 | 0.648192 |
cbe12781fd76d848319803aa579d95af7648f78e | 589 | py | Python | setup_SDN_MultipleTrial.py | anagamori/python-code | ce19ca30f177726b48b30ea1b02c0c73ba5d5d3f | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | setup_SDN_MultipleTrial.py | anagamori/python-code | ce19ca30f177726b48b30ea1b02c0c73ba5d5d3f | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | setup_SDN_MultipleTrial.py | anagamori/python-code | ce19ca30f177726b48b30ea1b02c0c73ba5d5d3f | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Mon Mar 12 14:25:34 2018
@author: akira
"""
from distutils.core import setup
from Cython.Build import cythonize
from distutils.extension import Extension
from Cython.Distutils import build_ext
ext_modules=[ Extension("SDN_MultipleTrial",
["S... | 24.541667 | 62 | 0.657046 |
7dbab738011594e934c7125ffb58a3a00b46416c | 5,244 | py | Python | tests/st/ops/gpu/test_batch_matmul.py | dongkcs/mindspore | cd7df6dbf463ff3128e9181e9d0c779cecb81320 | [
"Apache-2.0"
] | 55 | 2020-12-17T10:26:06.000Z | 2022-03-28T07:18:26.000Z | tests/st/ops/gpu/test_batch_matmul.py | dilingsong/mindspore | 4276050f2494cfbf8682560a1647576f859991e8 | [
"Apache-2.0"
] | 1 | 2020-12-29T06:46:38.000Z | 2020-12-29T06:46:38.000Z | tests/st/ops/gpu/test_batch_matmul.py | dilingsong/mindspore | 4276050f2494cfbf8682560a1647576f859991e8 | [
"Apache-2.0"
] | 14 | 2021-01-29T02:39:47.000Z | 2022-03-23T05:00:26.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 36.671329 | 82 | 0.581808 |
27b9165c3b68f9905b094806a82e0d24e4a5fa99 | 5,000 | py | Python | UniExplore/base/views/register.py | MichaelHills01/group-software-project-1 | 20847c062f7b4221bfb483eca28cb09a7a646a2b | [
"MIT"
] | 1 | 2022-03-09T17:16:00.000Z | 2022-03-09T17:16:00.000Z | UniExplore/base/views/register.py | MichaelHills01/group-software-project-1 | 20847c062f7b4221bfb483eca28cb09a7a646a2b | [
"MIT"
] | 60 | 2022-02-20T22:23:13.000Z | 2022-03-23T16:37:45.000Z | UniExplore/base/views/register.py | MichaelHills01/group-software-project-1 | 20847c062f7b4221bfb483eca28cb09a7a646a2b | [
"MIT"
] | 16 | 2022-02-19T13:10:04.000Z | 2022-03-23T12:21:21.000Z | from ..forms import UserRegisterForm
from ..models import Profile
from django.contrib import messages
from django.contrib.auth import login
from django.shortcuts import render, redirect
from django.contrib.auth.models import User
from django.conf import settings
from django.contrib.auth.models import Group
from django.... | 40.983607 | 123 | 0.5768 |
905b24ebf5da133ee222eaf584eafef81c80320d | 1,467 | py | Python | tests/cp2/test_cp2_cincoffset.py | capt-hb/cheritest | d3b3637a81a0005ee7272eca0f33a9f9911fdb32 | [
"Apache-2.0"
] | null | null | null | tests/cp2/test_cp2_cincoffset.py | capt-hb/cheritest | d3b3637a81a0005ee7272eca0f33a9f9911fdb32 | [
"Apache-2.0"
] | 2 | 2020-06-02T13:44:55.000Z | 2020-06-02T14:06:29.000Z | tests/cp2/test_cp2_cincoffset.py | capt-hb/cheritest | d3b3637a81a0005ee7272eca0f33a9f9911fdb32 | [
"Apache-2.0"
] | null | null | null | #-
# Copyright (c) 2014 Michael Roe
# All rights reserved.
#
# This software was developed by SRI International and the University of
# Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237
# ("CTSRD"), as part of the DARPA CRASH research programme.
#
# @BERI_LICENSE_HEADER_START@
#
# Licensed to BER... | 39.648649 | 85 | 0.768234 |
b4d68d2c77ec995ceb10914a4452bad0c0884791 | 1,724 | py | Python | src/detect_face_haarcascade.py | pourabkarchaudhuri/face-detection | 84e41af458ed9c891d712c4a2294472003cedb4f | [
"MIT"
] | 1 | 2020-07-26T00:30:20.000Z | 2020-07-26T00:30:20.000Z | src/detect_face_haarcascade.py | pourabkarchaudhuri/face-detection | 84e41af458ed9c891d712c4a2294472003cedb4f | [
"MIT"
] | null | null | null | src/detect_face_haarcascade.py | pourabkarchaudhuri/face-detection | 84e41af458ed9c891d712c4a2294472003cedb4f | [
"MIT"
] | null | null | null | import cv2
import sys
import time
import os
# cascPath = sys.argv[1]
def main():
print('Loading HaarCascade Classifier:')
# print(os.path.join(os.getcwd(), '../haarcascade/haarcascade_frontalface_default.xml'))
classifier_path = os.path.join(os.getcwd(), '../haarcascade/haarcascade_frontalface_default.xml'... | 31.345455 | 147 | 0.638631 |
64d0ce939925e2322ef1db095ebaafb1a5c0c880 | 201 | py | Python | config.py | ilhamr0f11/Sub-Mux-IR-Bot | 6cba0e94d61f399fe5ac9e1ec1dcd72a33037785 | [
"MIT"
] | 1 | 2021-10-22T01:20:03.000Z | 2021-10-22T01:20:03.000Z | config.py | ilhamr0f11/Sub-Mux-IR-Bot | 6cba0e94d61f399fe5ac9e1ec1dcd72a33037785 | [
"MIT"
] | null | null | null | config.py | ilhamr0f11/Sub-Mux-IR-Bot | 6cba0e94d61f399fe5ac9e1ec1dcd72a33037785 | [
"MIT"
] | null | null | null |
import os
class Config:
BOT_TOKEN = os.environ.get('BOT_TOKEN', None)
APP_ID = os.environ.get('APP_ID', None)
API_HASH = os.environ.get('API_HASH', None)
DOWNLOAD_DIR = 'downloads'
| 18.272727 | 49 | 0.666667 |
277872faf1f9991e780c29b0f2cea181268b33a8 | 749 | py | Python | publisher.py | alivcor/presill | 43dd5d0d4d64050763e05a81c27debb0808daf6a | [
"Apache-2.0"
] | null | null | null | publisher.py | alivcor/presill | 43dd5d0d4d64050763e05a81c27debb0808daf6a | [
"Apache-2.0"
] | null | null | null | publisher.py | alivcor/presill | 43dd5d0d4d64050763e05a81c27debb0808daf6a | [
"Apache-2.0"
] | null | null | null | # Import package
import paho.mqtt.client as mqtt
# Define Variables
MQTT_HOST = "iot.eclipse.org"
MQTT_PORT = 1883
MQTT_KEEPALIVE_INTERVAL = 5
MQTT_TOPIC = "SampleTopic"
MQTT_MSG = "Hello MQTT"
# Define on_connect event Handler
def on_connect(mosq, obj, rc):
print "Connected to MQTT Broker"
# Define on_publish... | 20.243243 | 60 | 0.773031 |
3183972046e2cf18c05e9647f24ef8117c302410 | 32,990 | py | Python | venv/Lib/site-packages/skimage/draw/draw.py | amelliaaas/tugastkc4 | f442382c72379e911f3780543b95345a3b1c9407 | [
"Apache-2.0"
] | 4 | 2021-10-20T12:39:09.000Z | 2022-02-26T15:02:08.000Z | venv/Lib/site-packages/skimage/draw/draw.py | amelliaaas/tugastkc4 | f442382c72379e911f3780543b95345a3b1c9407 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/skimage/draw/draw.py | amelliaaas/tugastkc4 | f442382c72379e911f3780543b95345a3b1c9407 | [
"Apache-2.0"
] | 20 | 2021-11-07T13:55:56.000Z | 2021-12-02T10:54:01.000Z | import warnings
import numpy as np
from .._shared._geometry import polygon_clip
from ._draw import (_coords_inside_image, _line, _line_aa,
_polygon, _ellipse_perimeter,
_circle_perimeter, _circle_perimeter_aa,
_bezier_curve)
def _ellipse_in_shape(shape, cen... | 34.762908 | 81 | 0.525856 |
b69e397a87a2e88bb5c0082f549c6356fc4e27bc | 22,739 | py | Python | House Rocket Company/House_Rocket.py | IgorQueiroz32/curso_meigaron_pyhton_ao_ds | 91e7b8336065dc841f620847997156bad6fed35e | [
"MIT"
] | null | null | null | House Rocket Company/House_Rocket.py | IgorQueiroz32/curso_meigaron_pyhton_ao_ds | 91e7b8336065dc841f620847997156bad6fed35e | [
"MIT"
] | null | null | null | House Rocket Company/House_Rocket.py | IgorQueiroz32/curso_meigaron_pyhton_ao_ds | 91e7b8336065dc841f620847997156bad6fed35e | [
"MIT"
] | null | null | null | import pandas as pd
import streamlit as st
import plotly.express as px
st.set_page_config(layout='wide')# deixa a tabela no site maior, mais larga
# read data
@st.cache(allow_output_mutation=True) # funcao q permite ler os dados da memoria virtual
def get_data(path):
data = pd.read_csv(path)
... | 45.844758 | 323 | 0.642421 |
591200edf7d402038cebd0f5047ca001d97fec9a | 17,884 | py | Python | tests/python/pants_test/reporting/test_reporting_integration.py | MEDIARITHMICS/pants | 8b2ad3263b73686832dab0bfffe44b9b1a1adbb3 | [
"Apache-2.0"
] | 1 | 2020-06-13T22:01:39.000Z | 2020-06-13T22:01:39.000Z | tests/python/pants_test/reporting/test_reporting_integration.py | MEDIARITHMICS/pants | 8b2ad3263b73686832dab0bfffe44b9b1a1adbb3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/reporting/test_reporting_integration.py | MEDIARITHMICS/pants | 8b2ad3263b73686832dab0bfffe44b9b1a1adbb3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import json
import re
import unittest
from collections import defaultdict
from http.server import BaseHTTPRequestHandler
from pathlib import Path
import psutil
from pants.testutil.pants_... | 40.188764 | 131 | 0.618206 |
df2ecb44eb0d7f2e2f4753d3a8f74bd4124f6e3c | 452 | py | Python | venv/Scripts/easy_install-script.py | SeoMooseong/python_chetbot | f817d538f5286b582152c8f46dc94304401808cf | [
"MIT"
] | null | null | null | venv/Scripts/easy_install-script.py | SeoMooseong/python_chetbot | f817d538f5286b582152c8f46dc94304401808cf | [
"MIT"
] | null | null | null | venv/Scripts/easy_install-script.py | SeoMooseong/python_chetbot | f817d538f5286b582152c8f46dc94304401808cf | [
"MIT"
] | null | null | null | #!C:\Users\student\PycharmProjects\chatbot\venv\Scripts\python.exe
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install'
__requires__ = 'setuptools==39.1.0'
import re
import sys
from pkg_resources import load_entry_point
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw?|... | 34.769231 | 83 | 0.699115 |
4ddf1bdb0336755c7a7ea439684932edb90ed4f8 | 806 | py | Python | dynamic_systems/identification/foptd.py | eddardd/CrossDomainFaultDetection | 83dd24727a8b35cda2549b40166beaf740e14c98 | [
"MIT"
] | 3 | 2021-08-30T11:41:36.000Z | 2021-12-22T10:45:25.000Z | dynamic_systems/identification/foptd.py | eddardd/CrossDomainFaultDiagnosis | 83dd24727a8b35cda2549b40166beaf740e14c98 | [
"MIT"
] | 1 | 2021-02-26T06:02:33.000Z | 2021-02-26T06:02:33.000Z | dynamic_systems/identification/foptd.py | eddardd/CrossDomainFaultDetection | 83dd24727a8b35cda2549b40166beaf740e14c98 | [
"MIT"
] | 2 | 2021-06-03T11:46:20.000Z | 2022-03-25T09:16:03.000Z | import numpy as np
class FOPTD:
def __init__(self):
self.alpha = None
self.fitted = False
def __phi(self, i, t, y, dt):
vec = np.zeros([1, 3])
vec[0, 0] = sum(y[:i]) * dt
vec[0, 1] = t[i]
vec[0, 2] = -1
return vec
def fit(self, t, y):
dt =... | 26 | 86 | 0.48139 |
bc771984d5a501d29279afd40d28fe6e9a7e48f3 | 455 | py | Python | test/functional/test_framework/beerchainconfig.py | beerchainproject/beerchain | 85a2701aff25358bbf2da6651d407a8d63ea2be8 | [
"MIT"
] | null | null | null | test/functional/test_framework/beerchainconfig.py | beerchainproject/beerchain | 85a2701aff25358bbf2da6651d407a8d63ea2be8 | [
"MIT"
] | null | null | null | test/functional/test_framework/beerchainconfig.py | beerchainproject/beerchain | 85a2701aff25358bbf2da6651d407a8d63ea2be8 | [
"MIT"
] | 2 | 2020-09-15T08:11:39.000Z | 2021-03-22T21:56:28.000Z | COINBASE_MATURITY = 500
INITIAL_BLOCK_REWARD = 20000
INITIAL_HASH_UTXO_ROOT = 0x21b463e3b52f6201c0ad6c991be0485b6ef8c092e64583ffa655cc1b171fe856
INITIAL_HASH_STATE_ROOT = 0x9514771014c9ae803d8cea2731b2063e83de44802b40dce2d06acd02d0ff65e9
MAX_BLOCK_BASE_SIZE = 2000000
BEERCHAIN_MIN_GAS_PRICE = 40
BEERCHAIN_MIN_GAS_PRICE... | 37.916667 | 92 | 0.896703 |
96a7877f6984b25be0e4d080f42e2e73a6769593 | 8,911 | py | Python | sdk/python/pulumi_azure_native/aad/v20210501/get_ou_container.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/aad/v20210501/get_ou_container.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/aad/v20210501/get_ou_container.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 35.361111 | 272 | 0.639883 |
58046e8d0e44a6890164e8c10b1473341d105c4a | 1,516 | py | Python | q6.py | cs-fullstack-2019-fall/codeassessment2-jordondoug2019 | 3e92507663bf76652919d4dd1e92790197bcfc97 | [
"Apache-2.0"
] | null | null | null | q6.py | cs-fullstack-2019-fall/codeassessment2-jordondoug2019 | 3e92507663bf76652919d4dd1e92790197bcfc97 | [
"Apache-2.0"
] | null | null | null | q6.py | cs-fullstack-2019-fall/codeassessment2-jordondoug2019 | 3e92507663bf76652919d4dd1e92790197bcfc97 | [
"Apache-2.0"
] | null | null | null | # ### Problem 6
# Create a class called ClubMember
# Each club member has a name and a role
# Create ClubMember instances for the following people:
# ```
# Alfred - Club President
# Troy - Club Vice President
# Albert - Club Secretary
# Bob - Club Treasurer
# ```
# Add each member instance to a new club_members list... | 31.583333 | 181 | 0.69591 |
72be10d8c9289cdac4e160883cf46b158421b48b | 11,177 | py | Python | st2api/st2api/controllers/v1/aliasexecution.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | null | null | null | st2api/st2api/controllers/v1/aliasexecution.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | 15 | 2021-02-11T22:58:54.000Z | 2021-08-06T18:03:47.000Z | st2api/st2api/controllers/v1/aliasexecution.py | kkkanil/st2 | 07cd195d7a6e177a37dd019e5c9ab8329259d0fa | [
"Apache-2.0"
] | 1 | 2021-07-10T15:02:29.000Z | 2021-07-10T15:02:29.000Z | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 42.660305 | 99 | 0.635501 |
0143ad70717d20ad015f62f56c24d5dc26acfa93 | 2,199 | py | Python | aydin/it/test/test_classic_saveload.py | royerloic/aydin | f9c61a24030891d008c318b250da5faec69fcd7d | [
"BSD-3-Clause"
] | null | null | null | aydin/it/test/test_classic_saveload.py | royerloic/aydin | f9c61a24030891d008c318b250da5faec69fcd7d | [
"BSD-3-Clause"
] | null | null | null | aydin/it/test/test_classic_saveload.py | royerloic/aydin | f9c61a24030891d008c318b250da5faec69fcd7d | [
"BSD-3-Clause"
] | null | null | null | import time
from os.path import join
import numpy
import pytest
from skimage.data import camera
from skimage.metrics import peak_signal_noise_ratio as psnr
from skimage.metrics import structural_similarity as ssim
from aydin.io.datasets import normalise, add_noise
from aydin.io.folders import get_temp_folder
from aydi... | 26.493976 | 100 | 0.744429 |
cf3d1f36d1734149e051952b484523a39541b79a | 1,417 | py | Python | server/util.py | markbirds/Anime-Recommendation-System | cef5b21ff2feb17a165fc23bcdd314b1880c2cd6 | [
"MIT"
] | null | null | null | server/util.py | markbirds/Anime-Recommendation-System | cef5b21ff2feb17a165fc23bcdd314b1880c2cd6 | [
"MIT"
] | null | null | null | server/util.py | markbirds/Anime-Recommendation-System | cef5b21ff2feb17a165fc23bcdd314b1880c2cd6 | [
"MIT"
] | 1 | 2020-12-31T04:31:25.000Z | 2020-12-31T04:31:25.000Z | from scipy.sparse import load_npz
import pandas as pd
import pickle
import json
anime_list = pd.read_pickle('server/files/anime_list.pickle')
csr_rating_matrix = load_npz('server/files/csr_rating_matrix.npz')
with open('server/files/rating_matrix_anime_id.json') as f:
anime_id = json.load(f)
with open('server/fil... | 44.28125 | 205 | 0.757234 |
3da678df57de9772574a067cbc90568e67c7f9fd | 3,254 | py | Python | python/phonenumbers/data/region_MM.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 2 | 2019-03-30T02:12:54.000Z | 2021-03-08T18:59:40.000Z | python/phonenumbers/data/region_MM.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | null | null | null | python/phonenumbers/data/region_MM.py | Eyepea/python-phonenumbers | 0336e191fda80a21ed5c19d5e029ad8c70f620ee | [
"Apache-2.0"
] | 1 | 2018-11-10T03:47:34.000Z | 2018-11-10T03:47:34.000Z | """Auto-generated file, do not edit by hand. MM metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_MM = PhoneMetadata(id='MM', country_code=95, international_prefix='00',
general_desc=PhoneNumberDesc(national_number_pattern='[14578]\\d{5,7}|[26]\\d{5,8}|9(?:[258]|3\... | 125.153846 | 569 | 0.656423 |
67454b8467fb827bec805e27d6033c911135736a | 2,400 | py | Python | tests/modules/test_GUIScreen.py | IamSaurabh1/taurus | 928d44e30e6cd5b979e675bfdce4c1dbeb5d0eff | [
"Apache-2.0"
] | 1 | 2021-09-15T05:27:22.000Z | 2021-09-15T05:27:22.000Z | tests/modules/test_GUIScreen.py | IamSaurabh1/taurus | 928d44e30e6cd5b979e675bfdce4c1dbeb5d0eff | [
"Apache-2.0"
] | null | null | null | tests/modules/test_GUIScreen.py | IamSaurabh1/taurus | 928d44e30e6cd5b979e675bfdce4c1dbeb5d0eff | [
"Apache-2.0"
] | null | null | null | import time
from urwid.canvas import Canvas
from bzt import ManualShutdown
from bzt.modules.console import TaurusConsole
from bzt.utils import is_linux
from tests import BZTestCase
from bzt.modules.screen import GUIScreen as Screen
class TestCanvas(Canvas):
def __init__(self, value):
super(TestCanvas, ... | 27.906977 | 80 | 0.590417 |
70f48d97f38fb4dc3bd7b28fad387b7f00dd97bf | 4,729 | py | Python | openstack_dashboard/dashboards/admin/hypervisors/compute/tables.py | TechBK/horizon-dev | db426842116af515f00b9e7c887f4f3f9f28298c | [
"Apache-2.0"
] | 1 | 2017-12-07T05:21:58.000Z | 2017-12-07T05:21:58.000Z | openstack_dashboard/dashboards/admin/hypervisors/compute/tables.py | tmrts/horizon | c502d69290218c6ec9399ba40a9bccb3f8bc64ae | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/hypervisors/compute/tables.py | tmrts/horizon | c502d69290218c6ec9399ba40a9bccb3f8bc64ae | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under th... | 31.526667 | 76 | 0.654895 |
7f9211bf01feb605297461318706425773071651 | 7,568 | py | Python | dm/netdev.py | DentonGentry/gfiber-catawampus | b01e4444f3c7f12b1af7837203b37060fd443bb7 | [
"Apache-2.0"
] | 2 | 2017-10-03T16:06:29.000Z | 2020-09-08T13:03:13.000Z | dm/netdev.py | DentonGentry/gfiber-catawampus | b01e4444f3c7f12b1af7837203b37060fd443bb7 | [
"Apache-2.0"
] | null | null | null | dm/netdev.py | DentonGentry/gfiber-catawampus | b01e4444f3c7f12b1af7837203b37060fd443bb7 | [
"Apache-2.0"
] | 1 | 2017-05-07T17:39:02.000Z | 2017-05-07T17:39:02.000Z | #!/usr/bin/python
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 30.889796 | 79 | 0.685254 |
e379549aa63e5685bcba083be9e1ba79bb1952a8 | 111 | py | Python | ncsnv2/runners/__init__.py | jmyoon1/adp | 497e2d40a699b220a6662187865dbaa2ac6f2d62 | [
"MIT"
] | 5 | 2021-06-15T16:09:57.000Z | 2021-12-26T14:06:13.000Z | ncsnv2/runners/__init__.py | jmyoon1/adp | 497e2d40a699b220a6662187865dbaa2ac6f2d62 | [
"MIT"
] | 2 | 2021-08-19T06:19:00.000Z | 2021-08-19T06:27:21.000Z | ncsnv2/runners/__init__.py | jmyoon1/adp | 497e2d40a699b220a6662187865dbaa2ac6f2d62 | [
"MIT"
] | 1 | 2022-02-23T13:17:40.000Z | 2022-02-23T13:17:40.000Z |
# For generating models
#from runners.ncsn_runner import *
# For adp
from ncsnv2.runners.ncsn_runner import *
| 18.5 | 40 | 0.783784 |
11151ef7666dcaec889aa6e610e2442d73e2ccf0 | 356 | py | Python | frappe/www/error.py | ssuda777/frappe | d3f3df2ce15154aecc1d9d6d07d947e72c2e8c6e | [
"MIT"
] | 1 | 2021-12-18T18:37:29.000Z | 2021-12-18T18:37:29.000Z | frappe/www/error.py | JMBodz/frappe | eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d | [
"MIT"
] | 3 | 2021-02-27T11:50:14.000Z | 2021-05-03T06:48:49.000Z | frappe/www/error.py | JMBodz/frappe | eb218a06d1cbfc3a8f1cc00ba8dac2c927d2f71d | [
"MIT"
] | 2 | 2021-09-02T09:51:55.000Z | 2021-09-07T04:55:42.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
import frappe
no_cache = 1
def get_context(context):
if frappe.flags.in_migrate: return
context.http_status_code = 500
print(frappe.get_traceback().encode("utf-8"))
return {"error": frappe.get_traceback().replace(... | 27.384615 | 84 | 0.716292 |
ca70d0198aa288b34300e6e693008383859e69d3 | 2,755 | py | Python | src/cms/contacts/tests.py | UniversitaDellaCalabria/uniCMS | b0af4e1a767867f0a9b3c135a5c84587e713cb71 | [
"Apache-2.0"
] | 6 | 2021-01-26T17:22:53.000Z | 2022-02-15T10:09:03.000Z | src/cms/contacts/tests.py | UniversitaDellaCalabria/uniCMS | b0af4e1a767867f0a9b3c135a5c84587e713cb71 | [
"Apache-2.0"
] | 5 | 2020-12-24T14:29:23.000Z | 2021-08-10T10:32:18.000Z | src/cms/contacts/tests.py | UniversitaDellaCalabria/uniCMS | b0af4e1a767867f0a9b3c135a5c84587e713cb71 | [
"Apache-2.0"
] | 2 | 2020-12-24T14:13:39.000Z | 2020-12-30T16:48:52.000Z | import logging
from django.test import TestCase
from . models import Contact, ContactInfo, ContactInfoLocalization, ContactLocalization
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
class ContactUnitTest(TestCase):
def setUp(cls):
pass
@classmethod
def create_contact(cl... | 30.955056 | 87 | 0.528494 |
6327e265d8c1e66b93e37d63d430874b3e147d05 | 1,058 | py | Python | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/tests/series/test_validate.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 18 | 2018-02-23T11:28:54.000Z | 2021-09-23T08:19:54.000Z | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/tests/series/test_validate.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 2 | 2021-02-08T20:19:17.000Z | 2021-04-30T20:32:52.000Z | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/tests/series/test_validate.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 12 | 2017-05-23T06:01:12.000Z | 2021-08-16T05:09:46.000Z | import pytest
from pandas.core.series import Series
class TestSeriesValidate(object):
"""Tests for error handling related to data types of method arguments."""
s = Series([1, 2, 3, 4, 5])
def test_validate_bool_args(self):
# Tests for error handling related to boolean arguments.
invalid_v... | 31.117647 | 77 | 0.603025 |
a9850ec6a6cb50f259990398c7c6201c7a3cb78f | 594 | py | Python | asgi_webdav/docker.py | hansnow/asgi-webdav | 5a353a25182ea75372d1f2d004d52707729bb3c2 | [
"MIT"
] | 1 | 2021-05-16T04:58:08.000Z | 2021-05-16T04:58:08.000Z | asgi_webdav/docker.py | liuwentao/asgi-webdav | 5a353a25182ea75372d1f2d004d52707729bb3c2 | [
"MIT"
] | null | null | null | asgi_webdav/docker.py | liuwentao/asgi-webdav | 5a353a25182ea75372d1f2d004d52707729bb3c2 | [
"MIT"
] | null | null | null | from asgi_webdav.config import create_config_from_file
from asgi_webdav.webdav import WebDAV
from asgi_webdav.middleware.http_basic_and_digest_auth import (
HTTPAuthMiddleware,
)
# init config
config = create_config_from_file()
# create ASGI app
app = WebDAV(config, in_docker=True)
# config auth
app = HTTPAuthMi... | 24.75 | 81 | 0.80303 |
4c9f192da9c73ec6ee2e242728ba500dac62bb46 | 6,691 | py | Python | tests/test_client_0_1.py | abkfenris/gage-client | 8a7600b553ab9e2ede8cb8bab7ce654186143536 | [
"MIT"
] | null | null | null | tests/test_client_0_1.py | abkfenris/gage-client | 8a7600b553ab9e2ede8cb8bab7ce654186143536 | [
"MIT"
] | 8 | 2015-03-14T22:58:23.000Z | 2015-04-25T22:51:31.000Z | tests/test_client_0_1.py | abkfenris/gage-client | 8a7600b553ab9e2ede8cb8bab7ce654186143536 | [
"MIT"
] | null | null | null | import unittest
import json
import responses
import requests
from itsdangerous import JSONWebSignatureSerializer, BadSignature
from datetime import datetime as dt
from gage_client import Client
from gage_client.client import Client_0_1, AuthenticationError, SendError
password = 'password'
url_stub = 'http://riverflo.... | 31.413146 | 84 | 0.621581 |
909c8c8e1cce75459690cff135b1da7ad6a90d71 | 2,048 | py | Python | tests/test_generic.py | MuckHub/browser-history | 467dafce7caf32668f69199edc4e4018c8403bba | [
"Apache-2.0"
] | 2 | 2020-12-13T05:53:37.000Z | 2020-12-22T00:40:09.000Z | tests/test_generic.py | MuckHub/browser-history | 467dafce7caf32668f69199edc4e4018c8403bba | [
"Apache-2.0"
] | 27 | 2021-05-10T09:52:18.000Z | 2022-03-28T15:10:56.000Z | tests/test_generic.py | MuckHub/browser-history | 467dafce7caf32668f69199edc4e4018c8403bba | [
"Apache-2.0"
] | 1 | 2022-02-10T10:16:20.000Z | 2022-02-10T10:16:20.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable=protected-access
"""test for generic module."""
from datetime import datetime
import pytest
from browser_history import generic
def test_outputs_init():
"""test Outputs init"""
obj = generic.Outputs("history")
assert not obj.histories
as... | 27.306667 | 75 | 0.468262 |
1eb8963d5d3222460bd283feb2a1079f839188d0 | 15,512 | py | Python | thyme/cmds/show.py | yuanliuus/thyme-blockchain | 9ea5cddc78f601fcbe77101d74147cf8190e423d | [
"Apache-2.0"
] | 6 | 2021-06-30T13:03:47.000Z | 2021-07-10T12:46:37.000Z | thyme/cmds/show.py | yuanliuus/thyme-blockchain | 9ea5cddc78f601fcbe77101d74147cf8190e423d | [
"Apache-2.0"
] | 8 | 2021-07-01T15:45:09.000Z | 2021-09-08T04:30:46.000Z | thyme/cmds/show.py | yuanliuus/thyme-blockchain | 9ea5cddc78f601fcbe77101d74147cf8190e423d | [
"Apache-2.0"
] | 11 | 2021-07-03T17:30:57.000Z | 2022-03-15T08:47:03.000Z | from typing import Any
import click
async def show_async(
rpc_port: int,
state: bool,
show_connections: bool,
exit_node: bool,
add_connection: str,
remove_connection: str,
block_header_hash_by_height: str,
block_by_header_hash: str,
) -> None:
import aiohttp
import time
im... | 46.304478 | 119 | 0.537906 |
d8edba85e575ced3f05e1350a4a75acad981a28d | 4,292 | py | Python | river/dummy.py | brcharron/creme | 25290780f6bba0eb030215194e81b120d0219389 | [
"BSD-3-Clause"
] | 1 | 2020-12-04T18:56:19.000Z | 2020-12-04T18:56:19.000Z | river/dummy.py | brcharron/creme | 25290780f6bba0eb030215194e81b120d0219389 | [
"BSD-3-Clause"
] | null | null | null | river/dummy.py | brcharron/creme | 25290780f6bba0eb030215194e81b120d0219389 | [
"BSD-3-Clause"
] | null | null | null | """Dummy estimators.
This module is here for testing purposes, as well as providing baseline performances.
"""
import collections
from river import base
from river import stats
__all__ = ['NoChangeClassifier', 'PriorClassifier', 'StatisticRegressor']
class NoChangeClassifier(base.Classifier):
"""Dummy classi... | 23.712707 | 103 | 0.595527 |
9ce07efd66c173ebb5f038c2b930ae83e69ca9f9 | 1,539 | py | Python | cirq-rigetti/cirq_rigetti/_qcs_api_client_decorator.py | LLcat1217/Cirq | b88069f7b01457e592ad69d6b413642ef11a56b8 | [
"Apache-2.0"
] | 1 | 2021-04-29T15:30:32.000Z | 2021-04-29T15:30:32.000Z | cirq-rigetti/cirq_rigetti/_qcs_api_client_decorator.py | bradyb/Cirq | 610b0d4ea3a7862169610797266734c844ddcc1f | [
"Apache-2.0"
] | 4 | 2022-01-16T14:12:15.000Z | 2022-02-24T03:58:46.000Z | cirq-rigetti/cirq_rigetti/_qcs_api_client_decorator.py | bradyb/Cirq | 610b0d4ea3a7862169610797266734c844ddcc1f | [
"Apache-2.0"
] | 2 | 2021-09-22T11:16:46.000Z | 2021-09-23T12:55:22.000Z | # Copyright 2021 The Cirq Developers
#
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 34.2 | 74 | 0.709552 |
3882233212d020bf9f97dab7bbe223d9a58900b0 | 1,103 | py | Python | main.py | mayan5/pythonchallenge | 36b6578a523a4e89f0801a1a62227a44b1e2b89b | [
"RSA-MD"
] | null | null | null | main.py | mayan5/pythonchallenge | 36b6578a523a4e89f0801a1a62227a44b1e2b89b | [
"RSA-MD"
] | null | null | null | main.py | mayan5/pythonchallenge | 36b6578a523a4e89f0801a1a62227a44b1e2b89b | [
"RSA-MD"
] | null | null | null | import os
import csv
#setting up the file path
polling = os.path.join("election_data.csv")
total_votes = 0.00
candidates = {}
#this dictionary is going to be {candidate : votes}}
winner = ""
winner_percent = 0
with open(polling) as csvfile:
csvreader = csv.reader(csvfile, delimiter=",")
... | 22.510204 | 72 | 0.564823 |
c2a002ab2ebf400a82a69029a32f86d9c4bab8ff | 1,083 | py | Python | stage/configuration/test_field_merger_processor.py | Sentienz/datacollector-tests | ca27988351dc3366488098b5db6c85a8be2f7b85 | [
"Apache-2.0"
] | null | null | null | stage/configuration/test_field_merger_processor.py | Sentienz/datacollector-tests | ca27988351dc3366488098b5db6c85a8be2f7b85 | [
"Apache-2.0"
] | 1 | 2019-04-24T11:06:38.000Z | 2019-04-24T11:06:38.000Z | stage/configuration/test_field_merger_processor.py | anubandhan/datacollector-tests | 301c024c66d68353735256b262b681dd05ba16cc | [
"Apache-2.0"
] | 2 | 2019-05-24T06:34:37.000Z | 2020-03-30T11:48:18.000Z | import pytest
from streamsets.testframework.decorators import stub
@stub
def test_fields_to_merge(sdc_builder, sdc_executor):
pass
@stub
@pytest.mark.parametrize('stage_attributes', [{'on_record_error': 'DISCARD'},
{'on_record_error': 'STOP_PIPELINE'},
... | 26.414634 | 103 | 0.680517 |
a2ff2a928370aaec7555382b9d77908b5b490c06 | 701 | py | Python | Teste.py | PedroHAlvesS/Ativar-Eventos-Chase--gc- | 207ac044097aa0f0fb4981bb274916b2b9bc5fb4 | [
"MIT"
] | null | null | null | Teste.py | PedroHAlvesS/Ativar-Eventos-Chase--gc- | 207ac044097aa0f0fb4981bb274916b2b9bc5fb4 | [
"MIT"
] | null | null | null | Teste.py | PedroHAlvesS/Ativar-Eventos-Chase--gc- | 207ac044097aa0f0fb4981bb274916b2b9bc5fb4 | [
"MIT"
] | null | null | null | import arquivo
# arquivos dos eventos
eclipse = ["InitEclipseTimeEvent.lua", "EventMonster.stg", "InitClientContents.lua", "InitEclipseCollect.lua", "InitEclipsePlot.lua"]
arqlista = [eclipse]
for nome in arqlista:
arquivo.arquivoExiste(nome)
# ativar o evento
# menu dos eventos
while True:
menu = input("Deseja... | 38.944444 | 133 | 0.666191 |
87aa745ca79020f6661bdf1e8ed9e1a0a5d1cb40 | 6,693 | py | Python | new_system/send_recieve.py | TakenokoEmpire/mypj | fcc56c1113c88d6611b60d0855d6c79df7add7fb | [
"MIT"
] | null | null | null | new_system/send_recieve.py | TakenokoEmpire/mypj | fcc56c1113c88d6611b60d0855d6c79df7add7fb | [
"MIT"
] | null | null | null | new_system/send_recieve.py | TakenokoEmpire/mypj | fcc56c1113c88d6611b60d0855d6c79df7add7fb | [
"MIT"
] | null | null | null | import requests
from typing import Dict, Optional
# URL = "https://damp-earth-70561.herokuapp.com"
# player_id_D = "d2b8e778-20f3-4744-920b-6eb67eacc901"
# player_id_D2 = "6a9bbf53-df31-4e02-a585-e2173085606e"
# headers={"Content-Type": "application/json"}
session = requests.Session()
class SendReceive():
def _... | 38.912791 | 329 | 0.582101 |
7b5388d8dbfd57802b9172b7df70b27b4902b499 | 6,803 | py | Python | src/datadog_api_client/v1/model/slo_correction_update_request.py | rchenzheng/datadog-api-client-python | 2e86ac098c6f0c7fdd90ed218224587c0f8eafef | [
"Apache-2.0"
] | null | null | null | src/datadog_api_client/v1/model/slo_correction_update_request.py | rchenzheng/datadog-api-client-python | 2e86ac098c6f0c7fdd90ed218224587c0f8eafef | [
"Apache-2.0"
] | null | null | null | src/datadog_api_client/v1/model/slo_correction_update_request.py | rchenzheng/datadog-api-client-python | 2e86ac098c6f0c7fdd90ed218224587c0f8eafef | [
"Apache-2.0"
] | null | null | null | # Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.
import re # noqa: F401
import sys # noqa: F401
from datadog_api_client.v1.model_uti... | 39.783626 | 108 | 0.591798 |
efa34bedb054cfaa02db7bc266ac6e0eecd4dc49 | 1,355 | py | Python | app/utc_time.py | coder8jedi/ReminderBot | f493b3e6debc8fb4771ec84c1b40dc056cbd8500 | [
"Apache-2.0"
] | 3 | 2021-08-03T07:05:09.000Z | 2022-03-10T09:35:44.000Z | app/utc_time.py | coder8jedi/ReminderBot | f493b3e6debc8fb4771ec84c1b40dc056cbd8500 | [
"Apache-2.0"
] | null | null | null | app/utc_time.py | coder8jedi/ReminderBot | f493b3e6debc8fb4771ec84c1b40dc056cbd8500 | [
"Apache-2.0"
] | null | null | null | import math
def time_operation(local_time: str, utc_code: str, monday: bool, tuesday: bool, wednesday: bool, thursday: bool,
friday: bool, saturday: bool, sunday: bool):
days = [monday, tuesday, wednesday, thursday, friday, saturday, sunday]
t = ''
for y in days:
t += st... | 30.111111 | 113 | 0.508487 |
1e4e008b923844a3f1a55a5b12ebf9939d021a6f | 671 | py | Python | examples/math/general_purpose.py | gugarosa/opfython | 19b467a92d85c7c26d231efec770645096827b4e | [
"Apache-2.0"
] | 26 | 2018-04-24T20:16:18.000Z | 2022-03-09T14:03:28.000Z | examples/math/general_purpose.py | gugarosa/opfython | 19b467a92d85c7c26d231efec770645096827b4e | [
"Apache-2.0"
] | 4 | 2020-12-26T14:57:18.000Z | 2022-03-30T02:34:18.000Z | examples/math/general_purpose.py | gugarosa/opfython | 19b467a92d85c7c26d231efec770645096827b4e | [
"Apache-2.0"
] | 16 | 2019-05-20T15:41:56.000Z | 2022-03-23T17:59:53.000Z | import numpy as np
import opfython.math.general as g
# Defining array, labels and predictions
array = np.asarray([1.5, 2, 0.5, 1.25, 1.75, 3])
labels = [0, 0, 0, 1, 1, 1, 2]
preds = [0, 0, 1, 1, 0, 1, 2]
# Normalizing the array
norm_array = g.normalize(array)
print(norm_array)
# Calculating the confusion matrix
c_m... | 23.137931 | 59 | 0.743666 |
959e6e1bc9dc2eb1a6b57ce00464d2c4815f88c4 | 23,866 | py | Python | models/official/mask_rcnn/mask_rcnn_model.py | lionsky123/tpu | f4468c3b2e9a0214a40ac80a76a9cf5ff237d030 | [
"Apache-2.0"
] | 2 | 2020-08-06T10:27:56.000Z | 2020-08-06T10:36:50.000Z | models/official/mask_rcnn/mask_rcnn_model.py | lionsky123/tpu | f4468c3b2e9a0214a40ac80a76a9cf5ff237d030 | [
"Apache-2.0"
] | null | null | null | models/official/mask_rcnn/mask_rcnn_model.py | lionsky123/tpu | f4468c3b2e9a0214a40ac80a76a9cf5ff237d030 | [
"Apache-2.0"
] | 2 | 2019-07-03T20:53:03.000Z | 2021-09-18T08:18:32.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.043624 | 174 | 0.678371 |
c11b07c2b9e6d1b54af5425890f45537e948da5c | 971 | py | Python | setup.py | Daulbaev/adversarial-library | 6f979a511ad78908374cd55855a9e2c5a874be7d | [
"BSD-3-Clause"
] | 55 | 2020-11-25T10:47:48.000Z | 2022-03-21T12:11:31.000Z | setup.py | Daulbaev/adversarial-library | 6f979a511ad78908374cd55855a9e2c5a874be7d | [
"BSD-3-Clause"
] | 4 | 2021-03-10T19:25:31.000Z | 2021-08-06T00:10:49.000Z | setup.py | Daulbaev/adversarial-library | 6f979a511ad78908374cd55855a9e2c5a874be7d | [
"BSD-3-Clause"
] | 8 | 2020-11-26T08:42:04.000Z | 2022-01-13T02:55:47.000Z | import os
from distutils.core import setup
from setuptools import find_packages
setup_path = os.path.abspath(os.path.dirname(__file__))
setup(name='adv_lib',
version='0.1',
url='https://github.com/jeromerony/adversarial-library',
maintainer='Jerome Rony',
maintainer_email='jerome.rony@gmail.c... | 31.322581 | 72 | 0.61586 |
87a9b57f06a293deb0cb08fb00c5a8a908f6d5e0 | 964 | py | Python | tests/hooks/test_configure_app_hook.py | briancappello/flask-unchained | bff296b5c808f5b1db10f7dddb81054600545749 | [
"MIT"
] | 69 | 2018-10-10T01:59:11.000Z | 2022-03-29T17:29:30.000Z | tests/hooks/test_configure_app_hook.py | briancappello/flask-unchained | bff296b5c808f5b1db10f7dddb81054600545749 | [
"MIT"
] | 18 | 2018-11-17T12:42:02.000Z | 2021-05-22T18:45:27.000Z | tests/hooks/test_configure_app_hook.py | briancappello/flask-unchained | bff296b5c808f5b1db10f7dddb81054600545749 | [
"MIT"
] | 7 | 2018-10-12T16:20:25.000Z | 2021-10-06T12:18:21.000Z | import pytest
from flask_unchained.constants import DEV
from flask_unchained.hooks.configure_app_hook import ConfigureAppHook
from flask_unchained.unchained import Unchained
from .._bundles.myapp import MyAppBundle
from .._bundles.empty_bundle import EmptyBundle
from .._bundles.vendor_bundle import VendorBundle
@py... | 34.428571 | 88 | 0.735477 |
0adcadd1e2728b1dea0e5cb7fc8f3218b6b66b93 | 61 | py | Python | tests/__init__.py | ibejohn818/sshtun | bdbc8f7de9ec7c54daffaaf0e60e23eb8f24988a | [
"MIT"
] | null | null | null | tests/__init__.py | ibejohn818/sshtun | bdbc8f7de9ec7c54daffaaf0e60e23eb8f24988a | [
"MIT"
] | null | null | null | tests/__init__.py | ibejohn818/sshtun | bdbc8f7de9ec7c54daffaaf0e60e23eb8f24988a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Unit test package for sshtun."""
| 15.25 | 35 | 0.557377 |
6f2ff7b5eb4102a7e855a059c12968c93e93fe87 | 526 | py | Python | core/migrations/0022_auto_20161214_1702.py | rafaelbantu/timtec | 86c51b7440a044704ed33c3e752a6cf6b15ceae3 | [
"BSD-3-Clause"
] | 21 | 2015-09-23T14:07:16.000Z | 2022-02-18T01:35:18.000Z | core/migrations/0022_auto_20161214_1702.py | rafaelbantu/timtec | 86c51b7440a044704ed33c3e752a6cf6b15ceae3 | [
"BSD-3-Clause"
] | 178 | 2016-05-10T16:16:19.000Z | 2021-12-15T20:21:21.000Z | core/migrations/0022_auto_20161214_1702.py | rafaelbantu/timtec | 86c51b7440a044704ed33c3e752a6cf6b15ceae3 | [
"BSD-3-Clause"
] | 18 | 2015-10-23T13:28:17.000Z | 2021-09-22T13:08:28.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('core', '0020_professormessage_users_that_read'),
]
operations = [
migrations.AlterField(
... | 25.047619 | 111 | 0.671103 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.