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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f80d6cfc9d6899a7d8d19cdce431e127bfa9fb08 | 8,311 | py | Python | datacube_ows/update_ranges.py | GispoCoding/datacube-ows | 4ffe14ccf9f382bff8f4a33fc54729d3e18b670e | [
"Apache-2.0"
] | null | null | null | datacube_ows/update_ranges.py | GispoCoding/datacube-ows | 4ffe14ccf9f382bff8f4a33fc54729d3e18b670e | [
"Apache-2.0"
] | null | null | null | datacube_ows/update_ranges.py | GispoCoding/datacube-ows | 4ffe14ccf9f382bff8f4a33fc54729d3e18b670e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import re
import os
import pkg_resources
from datacube_ows import __version__
from datacube_ows.product_ranges import get_sqlconn, add_ranges
from datacube import Datacube
import psycopg2
from psycopg2.sql import SQL
import sqlalchemy
from datacube_ows.ows_configuration import get_config
import ... | 40.940887 | 166 | 0.596318 |
da3087bebd9583b30a16731fcd684d2b6322397d | 3,935 | py | Python | modin/engines/base/io/text/json_reader.py | fexolm/modin | 292b8efe266a86c1a8b28893922917ecef7b813f | [
"Apache-2.0"
] | 1 | 2020-04-08T17:26:53.000Z | 2020-04-08T17:26:53.000Z | modin/engines/base/io/text/json_reader.py | fexolm/modin | 292b8efe266a86c1a8b28893922917ecef7b813f | [
"Apache-2.0"
] | 1 | 2020-11-05T13:32:08.000Z | 2020-11-05T13:32:08.000Z | modin/engines/base/io/text/json_reader.py | fexolm/modin | 292b8efe266a86c1a8b28893922917ecef7b813f | [
"Apache-2.0"
] | null | null | null | # Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "License"); you may not u... | 41.861702 | 88 | 0.635578 |
f0171b0b739bc44d4e81ec0bf5b79bfd17ac1e71 | 15,756 | py | Python | electrumpersonalserver/bitcoin/transaction.py | Groestlcoin/electrum-personal-server | 16c50d1fff23c56dd66b70b4158cd7db4d0bc880 | [
"MIT"
] | null | null | null | electrumpersonalserver/bitcoin/transaction.py | Groestlcoin/electrum-personal-server | 16c50d1fff23c56dd66b70b4158cd7db4d0bc880 | [
"MIT"
] | null | null | null | electrumpersonalserver/bitcoin/transaction.py | Groestlcoin/electrum-personal-server | 16c50d1fff23c56dd66b70b4158cd7db4d0bc880 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import binascii, re, json, copy, sys
from electrumpersonalserver.bitcoin.main import *
from _functools import reduce
### Hex to bin converter and vice versa for objects
def json_is_base(obj, base):
if not is_python2 and isinstance(obj, bytes):
return False
alpha = get_code_string(b... | 32.089613 | 97 | 0.574765 |
cc8d3e603fe1a82a9804fdfe2b4b30bc28abfce1 | 1,105 | py | Python | BasicOperations/00_Python/py2str.py | UpSea/midProjects | ed6086e74f68b1b89f725abe0b270e67cf8993a8 | [
"MIT"
] | 1 | 2018-07-02T13:54:49.000Z | 2018-07-02T13:54:49.000Z | BasicOperations/00_Python/py2str.py | UpSea/midProjects | ed6086e74f68b1b89f725abe0b270e67cf8993a8 | [
"MIT"
] | null | null | null | BasicOperations/00_Python/py2str.py | UpSea/midProjects | ed6086e74f68b1b89f725abe0b270e67cf8993a8 | [
"MIT"
] | 3 | 2016-05-28T15:13:02.000Z | 2021-04-10T06:04:25.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
-------------------------------------------------------------------------------
Function:
銆愭暣鐞嗐€慞ython涓瓧绗︾紪鐮佺殑鎬荤粨鍜屽姣旓細Python 2.x鐨剆tr鍜寀nicode vs Python 3.x鐨刡ytes鍜宻tr
http://www.crifan.com/summary_python_string_encoding_decoding_difference_and_comparation_python_2_x_str_uni... | 46.041667 | 253 | 0.582805 |
43d6a2f59fcf2496b9d2cf8a94aa13f11827d460 | 566 | py | Python | packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_type.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_type.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/scattercarpet/marker/gradient/_type.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class TypeValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="type", parent_name="scattercarpet.marker.gradient", **kwargs
):
super(TypeValidator, self).__init__(
plotly_name=plotly_name,
pare... | 35.375 | 87 | 0.636042 |
b3b139c100b4de2343d312295dc9932832deef9e | 326 | py | Python | simple_snmp.py | mj8mj4/Python-class | 9a002b6392bad5c9563b7cda64bf44fed2c2acfd | [
"Apache-2.0"
] | null | null | null | simple_snmp.py | mj8mj4/Python-class | 9a002b6392bad5c9563b7cda64bf44fed2c2acfd | [
"Apache-2.0"
] | null | null | null | simple_snmp.py | mj8mj4/Python-class | 9a002b6392bad5c9563b7cda64bf44fed2c2acfd | [
"Apache-2.0"
] | null | null | null |
import snmp_helper
#from snmp_helper import snmp_get_oid, snmp_extract
COMMUNITY_STRING = 'galileo'
SNMP_PORT = 161
IP = '50.242.94.227'
OID = '1.3.6.1.2.1.1.1.0'
a_device = (IP, COMMUNITY_STRING, SNMP_PORT)
snmp_data =snmp_helper.snmp_get_oid(a_device, oid=OID)
output =snmp_helper.snmp_extract(snmp_data)
print o... | 20.375 | 54 | 0.769939 |
723a94c3ae700994d57a78e1e2ec5cc9db181869 | 399 | py | Python | src/py220_supplemental/lessons/lesson07/class_content/async.py | UWPCE-Python-Course-2-Materials/supplementary_files | d3155b09a92d9660099da0f331663f472a9289eb | [
"MIT"
] | 10 | 2020-06-28T05:38:32.000Z | 2022-01-27T13:48:51.000Z | src/py220_supplemental/lessons/lesson07/class_content/async.py | UWPCE-Python-Course-2-Materials/supplementary_files | d3155b09a92d9660099da0f331663f472a9289eb | [
"MIT"
] | null | null | null | src/py220_supplemental/lessons/lesson07/class_content/async.py | UWPCE-Python-Course-2-Materials/supplementary_files | d3155b09a92d9660099da0f331663f472a9289eb | [
"MIT"
] | 5 | 2020-09-24T20:14:36.000Z | 2021-11-07T22:47:23.000Z | import asyncio
async def say(what, when):
await asyncio.sleep(when)
print(what)
async def stop_after(loop, when):
await asyncio.sleep(when)
loop.stop()
loop = asyncio.get_event_loop()
loop.create_task(say('first hello', 2))
loop.create_task(say('second hello', 1))
loop.create_task(say('third hello... | 17.347826 | 40 | 0.711779 |
f72e2be002132a3159a33734ff15192f64760aea | 801 | py | Python | scripts/mrep.py | akikuno/rosalind | 7015dc63e493d870e5789e99f2ee523a9b1f5ab9 | [
"MIT"
] | null | null | null | scripts/mrep.py | akikuno/rosalind | 7015dc63e493d870e5789e99f2ee523a9b1f5ab9 | [
"MIT"
] | null | null | null | scripts/mrep.py | akikuno/rosalind | 7015dc63e493d870e5789e99f2ee523a9b1f5ab9 | [
"MIT"
] | null | null | null | # https://rosalind.info/problems/mrep/
def fmtfa(fasta: list):
prev = True
header = []
seq = []
for f in fasta:
if ">" in f:
header.append(f[1:])
prev = True
elif prev:
seq.append(f)
prev = False
else:
seq[-1] += f
... | 18.627907 | 52 | 0.451935 |
b7eb5a049be9bde507954873a438dbb2fa16fd5b | 8,770 | py | Python | samuilivanov23-internet_shop_templates/internet_shop/shop/custom_views/customer_views.py | samuilivanov23/training-projects | 9791f359da9589524231c9c9d4d97f2bfbde71f3 | [
"Apache-2.0"
] | null | null | null | samuilivanov23-internet_shop_templates/internet_shop/shop/custom_views/customer_views.py | samuilivanov23/training-projects | 9791f359da9589524231c9c9d4d97f2bfbde71f3 | [
"Apache-2.0"
] | null | null | null | samuilivanov23-internet_shop_templates/internet_shop/shop/custom_views/customer_views.py | samuilivanov23/training-projects | 9791f359da9589524231c9c9d4d97f2bfbde71f3 | [
"Apache-2.0"
] | null | null | null | from django.shortcuts import render
from django.http import HttpResponse, Http404, HttpResponseRedirect
from django.template import loader
from internet_shop.dbconfig import onlineShop_dbname, onlineShop_dbuser, onlineShop_dbpassword
from internet_shop.conf import salt, sender_email, sender_password, server_email, serv... | 43.415842 | 153 | 0.534322 |
837c144467703f6a4a853e23f0736f27e2b5fc62 | 145,363 | py | Python | tensorflow/python/ops/control_flow_ops.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/ops/control_flow_ops.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/ops/control_flow_ops.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.898314 | 113 | 0.692439 |
f86ef9f80bc3017d192ccbcf1588f25b2a1ce06f | 1,861 | py | Python | test_licenses.py | elunna/muffin | 1d5179148ef00ce3c1c63891c06c47efe9a7429e | [
"Apache-2.0"
] | null | null | null | test_licenses.py | elunna/muffin | 1d5179148ef00ce3c1c63891c06c47efe9a7429e | [
"Apache-2.0"
] | null | null | null | test_licenses.py | elunna/muffin | 1d5179148ef00ce3c1c63891c06c47efe9a7429e | [
"Apache-2.0"
] | null | null | null | """ Tests for the licenses module"""
from . import licenses
def test_get_MIT():
expected = licenses.MIT_TEXT
firstline = licenses.get('MIT').split('\n')[0]
assert firstline == expected
def test_get_GNU():
expected = licenses.GNU_TEXT
firstline = licenses.get('GNU').split('\n')[0]
assert fir... | 25.847222 | 73 | 0.657711 |
f19a052551942fdbc5a1c0b77079cc51c44fe5ea | 56,511 | py | Python | venv/Lib/site-packages/sqlalchemy/orm/attributes.py | sunausti/mywebdemo | 884bcf3b68e0063dcb08c602f0dc784753ec8a87 | [
"Apache-2.0"
] | 1 | 2021-11-11T08:52:09.000Z | 2021-11-11T08:52:09.000Z | venv/Lib/site-packages/sqlalchemy/orm/attributes.py | sunausti/mywebdemo | 884bcf3b68e0063dcb08c602f0dc784753ec8a87 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/sqlalchemy/orm/attributes.py | sunausti/mywebdemo | 884bcf3b68e0063dcb08c602f0dc784753ec8a87 | [
"Apache-2.0"
] | null | null | null | # orm/attributes.py
# Copyright (C) 2005-2017 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Defines instrumentation for class attributes and their interaction
with instanc... | 35.341463 | 78 | 0.612429 |
14c6bd24a51c3b1ac80cef2aeabfe7d9bea5f3c6 | 8,395 | py | Python | src/ui/ui_about_dlg.py | hlooman/polis-masternode-tool | 94fd2c7fa53db81ae8cfdb767808046958532869 | [
"MIT"
] | 3 | 2019-10-16T02:17:09.000Z | 2020-07-27T16:50:43.000Z | src/ui/ui_about_dlg.py | hlooman/polis-masternode-tool | 94fd2c7fa53db81ae8cfdb767808046958532869 | [
"MIT"
] | null | null | null | src/ui/ui_about_dlg.py | hlooman/polis-masternode-tool | 94fd2c7fa53db81ae8cfdb767808046958532869 | [
"MIT"
] | 1 | 2019-10-21T11:59:27.000Z | 2019-10-21T11:59:27.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/Users/blogin/PycharmProjects/PMT-git/src/ui/ui_about_dlg.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_AboutDlg(object):
... | 77.018349 | 642 | 0.711018 |
bcb9bbde24139c5a6998b5611b6d828a826c4b5e | 3,654 | py | Python | tornado/test/util.py | DengJackNo1/tornado | 895a4fa69817c24fbf6ada6c5fb07351c6e91cd5 | [
"Apache-2.0"
] | 15,056 | 2015-01-01T03:08:16.000Z | 2022-03-31T14:44:56.000Z | tornado/test/util.py | DengJackNo1/tornado | 895a4fa69817c24fbf6ada6c5fb07351c6e91cd5 | [
"Apache-2.0"
] | 1,645 | 2015-01-05T08:15:32.000Z | 2022-03-24T20:30:10.000Z | tornado/test/util.py | DengJackNo1/tornado | 895a4fa69817c24fbf6ada6c5fb07351c6e91cd5 | [
"Apache-2.0"
] | 5,098 | 2015-01-02T15:43:36.000Z | 2022-03-30T06:04:43.000Z | import contextlib
import os
import platform
import socket
import sys
import textwrap
import typing # noqa: F401
import unittest
import warnings
from tornado.testing import bind_unused_port
skipIfNonUnix = unittest.skipIf(
os.name != "posix" or sys.platform == "cygwin", "non-unix platform"
)
# travis-ci.org runs... | 31.773913 | 88 | 0.706349 |
2c9ee6b9f0cb3ef4719f4230048ca13c5c71502e | 397 | py | Python | psycellium/wsgi.py | kyleaquino/psycellium | 743be474e5dfa3b880ef0fc27e5d837a9c3de841 | [
"MIT"
] | null | null | null | psycellium/wsgi.py | kyleaquino/psycellium | 743be474e5dfa3b880ef0fc27e5d837a9c3de841 | [
"MIT"
] | 4 | 2018-11-24T19:55:59.000Z | 2021-06-10T21:06:31.000Z | psycellium/wsgi.py | kyleaquino/psycellium | 743be474e5dfa3b880ef0fc27e5d837a9c3de841 | [
"MIT"
] | 1 | 2019-01-08T12:59:15.000Z | 2019-01-08T12:59:15.000Z | """
WSGI config for psycellium 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.setdefault('DJANGO_SE... | 23.352941 | 78 | 0.788413 |
5481ed104a007e8c16cfbc17bd9bcf9170a045c4 | 3,406 | py | Python | corehq/apps/ivr/migrations/0001_initial.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2020-05-05T13:10:01.000Z | 2020-05-05T13:10:01.000Z | corehq/apps/ivr/migrations/0001_initial.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2019-12-09T14:00:14.000Z | 2019-12-09T14:00:14.000Z | corehq/apps/ivr/migrations/0001_initial.py | MaciejChoromanski/commcare-hq | fd7f65362d56d73b75a2c20d2afeabbc70876867 | [
"BSD-3-Clause"
] | 5 | 2015-11-30T13:12:45.000Z | 2019-07-01T19:27:07.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import absolute_import
from django.db import models, migrations
import django.db.models.deletion
import dimagi.utils.couch.migration
class Migration(migrations.Migration):
dependencies = [
('sms', '0012_add_lastreadmessage_e... | 56.766667 | 142 | 0.627422 |
d3c2b871e098e0202f3332725bb1845bbc2ae082 | 99 | py | Python | pcep/part2_summary_test/ts26.py | gliverm/devnet-study-group | 28aecef8207cfeb8f10dc375c22e5ec953d6762b | [
"MIT"
] | 1 | 2020-07-30T15:23:55.000Z | 2020-07-30T15:23:55.000Z | pcep/part2_summary_test/ts26.py | gliverm/devnet-study-group | 28aecef8207cfeb8f10dc375c22e5ec953d6762b | [
"MIT"
] | null | null | null | pcep/part2_summary_test/ts26.py | gliverm/devnet-study-group | 28aecef8207cfeb8f10dc375c22e5ec953d6762b | [
"MIT"
] | null | null | null | class A:
pass
class B(A):
pass
class C(B):
pass
print(issubclass(A,C))
# Prints False | 9.9 | 22 | 0.606061 |
d871ad6aa2fd726a08faa9c0fb92f3493ba808ef | 1,924 | py | Python | evm/opcode.py | theresume/py-evm | c7f982e9832ea91312f456cfdd5be7c867853d0b | [
"MIT"
] | null | null | null | evm/opcode.py | theresume/py-evm | c7f982e9832ea91312f456cfdd5be7c867853d0b | [
"MIT"
] | 4 | 2018-12-07T21:32:48.000Z | 2019-02-22T15:25:01.000Z | evm/opcode.py | theresume/py-evm | c7f982e9832ea91312f456cfdd5be7c867853d0b | [
"MIT"
] | null | null | null | import functools
import logging
from abc import (
ABCMeta,
abstractmethod
)
from evm.utils.datatypes import Configurable
class Opcode(Configurable, metaclass=ABCMeta):
mnemonic = None # type: str
gas_cost = None # type: int
def __init__(self):
if self.mnemonic is None:
rai... | 27.884058 | 90 | 0.590437 |
8ae170fef70b5740bd8252c72afff49590299984 | 3,795 | py | Python | model-optimizer/extensions/middle/TF_lstm_cell_to_generic.py | anton-potapov/openvino | 84119afe9a8c965e0a0cd920fff53aee67b05108 | [
"Apache-2.0"
] | 2 | 2021-02-26T15:46:19.000Z | 2021-05-16T20:48:13.000Z | model-optimizer/extensions/middle/TF_lstm_cell_to_generic.py | anton-potapov/openvino | 84119afe9a8c965e0a0cd920fff53aee67b05108 | [
"Apache-2.0"
] | 30 | 2020-11-13T11:44:07.000Z | 2022-02-21T13:03:16.000Z | model-optimizer/extensions/middle/TF_lstm_cell_to_generic.py | mmakridi/openvino | 769bb7709597c14debdaa356dd60c5a78bdfa97e | [
"Apache-2.0"
] | 3 | 2021-03-09T08:27:29.000Z | 2021-04-07T04:58:54.000Z | """
Copyright (C) 2018-2020 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to i... | 36.142857 | 110 | 0.657181 |
ad6b5dcd150122854cf2fad918e0a6922436ce3e | 1,406 | py | Python | image_swap_pb2_grpc.py | yonycherkos/faceSwap | 15863fc55a4919b3ba6020313f2e40c58ced7c5d | [
"MIT"
] | 2 | 2019-07-23T11:23:30.000Z | 2022-01-28T15:26:46.000Z | Service/image_swap_pb2_grpc.py | bethelhall/swap_faces | 2d9acbc4420dbf01e562b9ee74261a8127dcc209 | [
"MIT"
] | null | null | null | Service/image_swap_pb2_grpc.py | bethelhall/swap_faces | 2d9acbc4420dbf01e562b9ee74261a8127dcc209 | [
"MIT"
] | 2 | 2019-09-24T11:32:57.000Z | 2019-10-20T10:32:07.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import image_swap_pb2 as image__swap__pb2
class FaceSwapStub(object):
# missing associated documentation comment in .proto file
pass
def __init__(self, channel):
"""Constructor.
Args:
channel: A grpc.Channel.
... | 29.914894 | 78 | 0.748222 |
5f0a0c13f8585701572bab5162ff36c52c854838 | 12,560 | py | Python | leasing/tests/api/test_create_invoice.py | suutari-ai/mvj | c39dbc692afcb3b26366783414c2d5a88a57b25a | [
"MIT"
] | 1 | 2021-01-12T08:14:10.000Z | 2021-01-12T08:14:10.000Z | leasing/tests/api/test_create_invoice.py | suutari-ai/mvj | c39dbc692afcb3b26366783414c2d5a88a57b25a | [
"MIT"
] | 249 | 2017-04-18T14:00:13.000Z | 2022-03-30T12:18:03.000Z | leasing/tests/api/test_create_invoice.py | suutari-ai/mvj | c39dbc692afcb3b26366783414c2d5a88a57b25a | [
"MIT"
] | 7 | 2017-04-18T08:43:54.000Z | 2021-07-28T07:29:30.000Z | import datetime
import json
from decimal import Decimal
import pytest
from django.core.serializers.json import DjangoJSONEncoder
from django.urls import reverse
from django.utils import timezone
from leasing.enums import ContactType, InvoiceState, TenantContactType
from leasing.models import Invoice
@pytest.mark.dj... | 29.345794 | 87 | 0.661385 |
45a1d01de991db1f3c078db5c2a68149a65d0023 | 28,450 | py | Python | hello.py | DevrisOfStar/SW | 27fffb10d7a853875d8bd5a2579af9331be371ef | [
"MIT"
] | null | null | null | hello.py | DevrisOfStar/SW | 27fffb10d7a853875d8bd5a2579af9331be371ef | [
"MIT"
] | null | null | null | hello.py | DevrisOfStar/SW | 27fffb10d7a853875d8bd5a2579af9331be371ef | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import string
reload(sys)
sys.setdefaultencoding('utf8')
from flask import Flask, request, url_for, redirect, session, flash
from flask import render_template
from flaskext.mysql import MySQL
app = Flask(__name__)
app.secret_key = '#ekd@aA/3g... | 37.044271 | 145 | 0.587979 |
b81dd09a120d1436b828f668dc2a3de26e92a670 | 605 | py | Python | answers/sakshi/Day 7/question2.py | arc03/30-DaysOfCode-March-2021 | 6d6e11bf70280a578113f163352fa4fa8408baf6 | [
"MIT"
] | 22 | 2021-03-16T14:07:47.000Z | 2021-08-13T08:52:50.000Z | answers/sakshi/Day 7/question2.py | arc03/30-DaysOfCode-March-2021 | 6d6e11bf70280a578113f163352fa4fa8408baf6 | [
"MIT"
] | 174 | 2021-03-16T21:16:40.000Z | 2021-06-12T05:19:51.000Z | answers/sakshi/Day 7/question2.py | arc03/30-DaysOfCode-March-2021 | 6d6e11bf70280a578113f163352fa4fa8408baf6 | [
"MIT"
] | 135 | 2021-03-16T16:47:12.000Z | 2021-06-27T14:22:38.000Z | #Day 7
# question2
def GoodTriplets(arr,a,b,c):
count=0
for i in range(len(arr)):
for j in range(i+1,len(arr)):
for k in range(j+1,len(arr)):
if abs(arr[i]-arr[j])<=a and abs(arr[j]-arr[k])<=b and abs(arr[i]-arr[k])<=c:
count+=1
print (count)
print("... | 21.607143 | 93 | 0.560331 |
be9c6bcaf2daabb4a35c0ffbe5f9d826fbc0511f | 1,352 | py | Python | examples/bi_dimensional.py | bjodah/pykinsol | d9a6c82cc118491b526b0efa9cf80418e461f1d3 | [
"BSD-2-Clause"
] | 6 | 2016-01-11T13:40:53.000Z | 2021-01-21T18:47:35.000Z | examples/bi_dimensional.py | bjodah/pykinsol | d9a6c82cc118491b526b0efa9cf80418e461f1d3 | [
"BSD-2-Clause"
] | 2 | 2016-04-19T19:21:24.000Z | 2018-04-03T08:01:48.000Z | examples/bi_dimensional.py | bjodah/pykinsol | d9a6c82cc118491b526b0efa9cf80418e461f1d3 | [
"BSD-2-Clause"
] | 1 | 2019-05-02T14:17:20.000Z | 2019-05-02T14:17:20.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import numpy as np
from pykinsol import solve
def f_cb(x, fout):
fout[0] = x[0] + (x[0] - x[1])**3/2 - 1
fout[1] = x[1] + (x[1] - x[0])**3/2
def j_cb(x, Jout, fx):
Jout[0, 0] = 1 + 3/2 * (x[0] - x[1])**2
Jout[0, 1] = -3/2 * (x[0] - x[1])**2
Jout[1,... | 24.581818 | 76 | 0.517751 |
b74772a510fc4224f6b6f04c09e8d480621cefbf | 2,555 | py | Python | tests/test_observable/py3_start.py | Affirm/RxPY | 7c23939ea497761c85b382257f9f0954998ab91e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/test_observable/py3_start.py | Affirm/RxPY | 7c23939ea497761c85b382257f9f0954998ab91e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/test_observable/py3_start.py | Affirm/RxPY | 7c23939ea497761c85b382257f9f0954998ab91e | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import unittest
import rx
asyncio = rx.config['asyncio']
Future = rx.config['Future']
from rx import Observable
from rx.testing import TestScheduler, ReactiveTest
on_next = ReactiveTest.on_next
on_completed = ReactiveTest.on_completed
on_error = ReactiveTest.on_error
subscribe = ReactiveTest.subscribe
subscribed = Re... | 23.657407 | 56 | 0.565558 |
d21cde3715cbcdb81a0d3ec04ec193bfca8991e5 | 7,691 | py | Python | exercises/perform_model_selection.py | noamwino/IML.HUJI | 0b1b6f333a16200fa7717af1be12e5f38694b74c | [
"MIT"
] | null | null | null | exercises/perform_model_selection.py | noamwino/IML.HUJI | 0b1b6f333a16200fa7717af1be12e5f38694b74c | [
"MIT"
] | null | null | null | exercises/perform_model_selection.py | noamwino/IML.HUJI | 0b1b6f333a16200fa7717af1be12e5f38694b74c | [
"MIT"
] | null | null | null | from __future__ import annotations
import numpy as np
import pandas as pd
from sklearn import datasets
from IMLearn.metrics import mean_square_error
from IMLearn.utils import split_train_test
from IMLearn.model_selection import cross_validate
from IMLearn.learners.regressors import PolynomialFitting, LinearRegression, ... | 44.715116 | 114 | 0.695878 |
cbf115b90da463332f39a7b438e6e3a536d2e9ca | 10,242 | py | Python | easy_flow_sdk/model/ops_automation/job_details_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | easy_flow_sdk/model/ops_automation/job_details_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | easy_flow_sdk/model/ops_automation/job_details_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: job_details.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... | 47.637209 | 1,052 | 0.755419 |
b1b6ee7ac1e9444dfeb0f9ae16390fa5c3d01778 | 6,633 | py | Python | hypercorn/__main__.py | ampstat/hypercorn | 6b1e1689cddfcf9e19a63bb701d6b37a5e9f9acd | [
"MIT"
] | null | null | null | hypercorn/__main__.py | ampstat/hypercorn | 6b1e1689cddfcf9e19a63bb701d6b37a5e9f9acd | [
"MIT"
] | null | null | null | hypercorn/__main__.py | ampstat/hypercorn | 6b1e1689cddfcf9e19a63bb701d6b37a5e9f9acd | [
"MIT"
] | null | null | null | import argparse
import ssl
import sys
import warnings
from typing import List, Optional
from .config import Config
from .run import run
sentinel = object()
def _load_config(config_path: Optional[str]) -> Config:
if config_path is None:
return Config()
elif config_path.startswith("python:"):
... | 34.015385 | 100 | 0.631087 |
d287d5543beab0514df4e6e4ceb7d7d636de6d60 | 5,824 | py | Python | filtersPyCharm/src/CustomLibraries/ClassParticleFilter.py | filRocha/arcaboucoTrabalhosAutonomosCOPPE | b0eaf319ed2fad8853e450330d71bed60671713f | [
"MIT"
] | 1 | 2019-02-02T00:50:19.000Z | 2019-02-02T00:50:19.000Z | filtersPyCharm/src/CustomLibraries/ClassParticleFilter.py | filRocha/arcaboucoTrabalhosAutonomosCOPPE | b0eaf319ed2fad8853e450330d71bed60671713f | [
"MIT"
] | null | null | null | filtersPyCharm/src/CustomLibraries/ClassParticleFilter.py | filRocha/arcaboucoTrabalhosAutonomosCOPPE | b0eaf319ed2fad8853e450330d71bed60671713f | [
"MIT"
] | null | null | null | import numpy as np
# class definition
class ParticleFilter:
# class constructor
def __init__(self, M = None):
# system covariance
self.cov_x = np.array([[0.03], [0.03], [0.005], [0.005]])
# measurement covariance
self.cov_z = np.array([[0.05], [0.05], [0.05]])
# part... | 27.088372 | 114 | 0.54842 |
3c49247d1809dd8e833d0f973a9be626f48b711e | 2,039 | py | Python | src/tflib/midi.py | xi-studio/anime | 9e3dc680195d2c53063f605d720b0a4f6b80d5cd | [
"MIT"
] | null | null | null | src/tflib/midi.py | xi-studio/anime | 9e3dc680195d2c53063f605d720b0a4f6b80d5cd | [
"MIT"
] | null | null | null | src/tflib/midi.py | xi-studio/anime | 9e3dc680195d2c53063f605d720b0a4f6b80d5cd | [
"MIT"
] | null | null | null | import numpy
import os
import urllib
import gzip
import cPickle as pickle
def mnist_generator(data, batch_size, n_labelled, limit=None):
images, targets = data
rng_state = numpy.random.get_state()
numpy.random.shuffle(images)
numpy.random.set_state(rng_state)
numpy.random.shuffle(targets)
if ... | 31.369231 | 105 | 0.654733 |
d3ba5309bf6cfcb2778c1427f512936c3a4335a4 | 3,544 | py | Python | test/integration/ggrc_workflows/test_workflow_revisions.py | zidarsk8/ggrc-core | 2509c989eddf434249d3bef50c21e08dbf56c1a4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-01-03T02:49:23.000Z | 2018-01-03T02:49:23.000Z | test/integration/ggrc_workflows/test_workflow_revisions.py | zidarsk8/ggrc-core | 2509c989eddf434249d3bef50c21e08dbf56c1a4 | [
"ECL-2.0",
"Apache-2.0"
] | 6 | 2015-04-25T13:15:15.000Z | 2019-03-21T22:38:01.000Z | test/integration/ggrc_workflows/test_workflow_revisions.py | zidarsk8/ggrc-core | 2509c989eddf434249d3bef50c21e08dbf56c1a4 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# pylint: disable=missing-docstring
from freezegun import freeze_time
from mock import patch
from ggrc.models import Revision, Event
from ggrc_workflows import start_recurring_cycles
from integration.ggrc_... | 35.79798 | 78 | 0.615406 |
f44006d1309540c1a515b64305ee4903dc5463c0 | 15,746 | py | Python | tests/unit/core/test_deploy_export.py | ericharper/NeMo | 27ffcfbf45192cea679f889effd4ed42a208f373 | [
"Apache-2.0"
] | 1 | 2021-03-10T20:13:51.000Z | 2021-03-10T20:13:51.000Z | tests/unit/core/test_deploy_export.py | ericharper/NeMo | 27ffcfbf45192cea679f889effd4ed42a208f373 | [
"Apache-2.0"
] | null | null | null | tests/unit/core/test_deploy_export.py | ericharper/NeMo | 27ffcfbf45192cea679f889effd4ed42a208f373 | [
"Apache-2.0"
] | null | null | null | # ! /usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2020 NVIDIA. 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
#... | 42.672087 | 118 | 0.601994 |
f3b44b51f6938e82e02fa3dbc60f2ed6f7173ad4 | 3,437 | py | Python | test/test_rewrite_sql.py | jwelch92/tql | b1ad577e9d4011adde40b4e14a8f265d1ef5a595 | [
"MIT"
] | 1 | 2018-11-15T05:21:24.000Z | 2018-11-15T05:21:24.000Z | test/test_rewrite_sql.py | jwelch92/tql | b1ad577e9d4011adde40b4e14a8f265d1ef5a595 | [
"MIT"
] | 1 | 2018-11-16T00:19:40.000Z | 2018-11-16T00:19:40.000Z | test/test_rewrite_sql.py | jwelch92/tql | b1ad577e9d4011adde40b4e14a8f265d1ef5a595 | [
"MIT"
] | 1 | 2018-11-15T05:21:25.000Z | 2018-11-15T05:21:25.000Z | from unittest import TestCase, skip
from tql.sql import rewrite_sql
from tql.utils import expand_path_and_exists
class TestRewriteSql(TestCase):
def test_rewrite_dquotes(self):
sql = """SELECT * FROM @"./data/remap.csv" WHERE frm = 'y';"""
table_remap = {}
sql, map = rewrite_sql([sql], t... | 39.965116 | 147 | 0.59034 |
158bbbac8737417b811ccfb36193a2f71eaeb0d8 | 11 | py | Python | test/main.py | kvvisvesh/ltelearn | 87bac16c762c3e0ea01f8eb1ec16421affdc4e41 | [
"Apache-2.0"
] | null | null | null | test/main.py | kvvisvesh/ltelearn | 87bac16c762c3e0ea01f8eb1ec16421affdc4e41 | [
"Apache-2.0"
] | null | null | null | test/main.py | kvvisvesh/ltelearn | 87bac16c762c3e0ea01f8eb1ec16421affdc4e41 | [
"Apache-2.0"
] | null | null | null | #feature 1
| 5.5 | 10 | 0.727273 |
e2ad569ead08c3dba950847d4068867190db8d05 | 8,593 | py | Python | stable_baseline_test/gym_modified_pendulum.py | charles-blouin/Servorobots | c5839f96462a6fab9cfe6440a78cf545d29f933c | [
"MIT"
] | 2 | 2019-02-28T20:25:40.000Z | 2021-03-12T03:22:01.000Z | stable_baseline_test/gym_modified_pendulum.py | charles-blouin/Servorobots | c5839f96462a6fab9cfe6440a78cf545d29f933c | [
"MIT"
] | null | null | null | stable_baseline_test/gym_modified_pendulum.py | charles-blouin/Servorobots | c5839f96462a6fab9cfe6440a78cf545d29f933c | [
"MIT"
] | 1 | 2019-01-23T17:58:55.000Z | 2019-01-23T17:58:55.000Z | """
Classic cart-pole system implemented by Rich Sutton et al.
Copied from http://incompleteideas.net/sutton/book/code/pole.c
permalink: https://perma.cc/C9ZM-652R
"""
import math
import gym
from gym import spaces, logger
from gym.utils import seeding
import numpy as np
import servorobots.tools.utils as utils
class ... | 39.599078 | 245 | 0.605958 |
256317ab3fe429e8faef2ac6b7f2307ed35dc4a5 | 4,334 | py | Python | openshift/test/test_v1_deployment_trigger_image_change_params.py | flaper87/openshift-restclient-python | 13d5d86ca89035b9f596032e7a34f3cc33bf8f18 | [
"Apache-2.0"
] | null | null | null | openshift/test/test_v1_deployment_trigger_image_change_params.py | flaper87/openshift-restclient-python | 13d5d86ca89035b9f596032e7a34f3cc33bf8f18 | [
"Apache-2.0"
] | null | null | null | openshift/test/test_v1_deployment_trigger_image_change_params.py | flaper87/openshift-restclient-python | 13d5d86ca89035b9f596032e7a34f3cc33bf8f18 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenShift API (with Kubernetes)
OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is... | 100.790698 | 3,380 | 0.797185 |
cca7f8f1ff219f008071bdd8014521efad171c1b | 27,064 | py | Python | models/two_tier/two_tier32k.py | ruohoruotsi/sampleRNN_ICLR2017 | 8a6d8216bd031e897bb9fbb4c7e703c514633c43 | [
"MIT"
] | 55 | 2017-12-08T09:34:45.000Z | 2021-09-01T06:59:45.000Z | models/two_tier/two_tier32k.py | ruohoruotsi/sampleRNN_ICLR2017 | 8a6d8216bd031e897bb9fbb4c7e703c514633c43 | [
"MIT"
] | null | null | null | models/two_tier/two_tier32k.py | ruohoruotsi/sampleRNN_ICLR2017 | 8a6d8216bd031e897bb9fbb4c7e703c514633c43 | [
"MIT"
] | 14 | 2017-10-13T04:00:52.000Z | 2021-07-17T17:47:31.000Z | """
RNN Audio Generation Model
Two-tier model, Quantized input
For more info:
$ python two_tier.py -h
How-to-run example:
sampleRNN$ pwd
/u/mehris/sampleRNN
sampleRNN$ \
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python -u \
models/two_tier/two_tier.py --exp AXIS1 --n_frames 12 --frame_size 10 \
--weight_n... | 36.972678 | 167 | 0.618423 |
6edb58870fa109d78893aea5562bed876d009849 | 9,232 | py | Python | stereomag/loader.py | MandyMY/stereo-magnification | c18fa484484597dfa653f317459a503d9bf8d933 | [
"Apache-2.0"
] | null | null | null | stereomag/loader.py | MandyMY/stereo-magnification | c18fa484484597dfa653f317459a503d9bf8d933 | [
"Apache-2.0"
] | null | null | null | stereomag/loader.py | MandyMY/stereo-magnification | c18fa484484597dfa653f317459a503d9bf8d933 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018 Google 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 ag... | 39.965368 | 95 | 0.708514 |
94c9a559fdc1ec63007242b6ef7c42ad878b47cf | 377 | py | Python | src_rnn_kfac/static.py | icdm2021submission/Continual-Neural-Network-Model-Retraining | 7a84f211c7750b862fa5e31293d22d4d0dabed23 | [
"MIT"
] | null | null | null | src_rnn_kfac/static.py | icdm2021submission/Continual-Neural-Network-Model-Retraining | 7a84f211c7750b862fa5e31293d22d4d0dabed23 | [
"MIT"
] | null | null | null | src_rnn_kfac/static.py | icdm2021submission/Continual-Neural-Network-Model-Retraining | 7a84f211c7750b862fa5e31293d22d4d0dabed23 | [
"MIT"
] | null | null | null |
loss_fns = ['retrain_regu_mas', 'retrain_regu_mine', 'retrain_regu_minen', 'retrain_regu_fisher', 'retrain_regu_fishern',\
'retrain', 'retrain_regu', 'retrain_regu_selfless']#'retrain_regu_mine3', 'cnn'
model_log_map = {'fishern': 'EWCN', 'mine': 'Arms', 'minen': 'ArmsN', 'regu': 'RetrainRegu', \
'fisher': 'EWC', '... | 47.125 | 122 | 0.692308 |
51c998d5201ca1b3c7f6d2a8c2e6cb07035d9cce | 20,384 | py | Python | inventory/inventory/inventory/db/sqlalchemy/migrate_repo/versions/001_init.py | xe1gyq/metal | 25a21d840d4b846c5aacd054b266cdcb6db799e5 | [
"Apache-2.0"
] | null | null | null | inventory/inventory/inventory/db/sqlalchemy/migrate_repo/versions/001_init.py | xe1gyq/metal | 25a21d840d4b846c5aacd054b266cdcb6db799e5 | [
"Apache-2.0"
] | null | null | null | inventory/inventory/inventory/db/sqlalchemy/migrate_repo/versions/001_init.py | xe1gyq/metal | 25a21d840d4b846c5aacd054b266cdcb6db799e5 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2018 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
from sqlalchemy import Column, MetaData, String, Table, UniqueConstraint
from sqlalchemy import Boolean, Integer, Enum, Text, ForeignKey, DateTime
ENGINE = 'InnoDB'
CHARSET = 'utf8'
def upgrade(migrate_engine):
meta = Meta... | 33.636964 | 78 | 0.5573 |
3c1ef0556d78a72faade9ec40251ebc70d813dd0 | 595 | py | Python | backend_rest/users/migrations/0002_auto_20200418_2242.py | ezrankayamba/twiga_distribution | ac4fd3d4f6b111e734a932398be564c863582be2 | [
"MIT"
] | null | null | null | backend_rest/users/migrations/0002_auto_20200418_2242.py | ezrankayamba/twiga_distribution | ac4fd3d4f6b111e734a932398be564c863582be2 | [
"MIT"
] | 16 | 2020-03-23T13:24:11.000Z | 2022-03-12T00:17:58.000Z | backend_rest/users/migrations/0002_auto_20200418_2242.py | ezrankayamba/twiga_distribution | ac4fd3d4f6b111e734a932398be564c863582be2 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.2 on 2020-04-18 19:42
from django.db import migrations
import multiselectfield.db.fields
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='role',
name='... | 29.75 | 244 | 0.642017 |
885d8b6d0fda4584b495288da96059e85620d7ea | 145 | py | Python | upylab/upylab_3.10.py | piousteph/mooc_python | b7446c8a8317e2ae5e87a9ce27fd107f20333765 | [
"MIT"
] | null | null | null | upylab/upylab_3.10.py | piousteph/mooc_python | b7446c8a8317e2ae5e87a9ce27fd107f20333765 | [
"MIT"
] | null | null | null | upylab/upylab_3.10.py | piousteph/mooc_python | b7446c8a8317e2ae5e87a9ce27fd107f20333765 | [
"MIT"
] | null | null | null | i = 0
total = 0
nbentree = 0
while i != -1:
i = int(input())
if i != -1:
total += i
nbentree += 1
print(total/nbentree) | 13.181818 | 21 | 0.482759 |
99baefde93f79f08da0506c0524af95e8bdddf12 | 67,299 | py | Python | asyncpg/connection.py | elprans/asyncpg | 946e2bd440a530d78a864eec6859cbc82d28b4d7 | [
"Apache-2.0"
] | 2 | 2019-09-10T23:26:02.000Z | 2021-07-07T14:04:37.000Z | asyncpg/connection.py | elprans/asyncpg | 946e2bd440a530d78a864eec6859cbc82d28b4d7 | [
"Apache-2.0"
] | null | null | null | asyncpg/connection.py | elprans/asyncpg | 946e2bd440a530d78a864eec6859cbc82d28b4d7 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2016-present the asyncpg authors and contributors
# <see AUTHORS file>
#
# This module is part of asyncpg and is released under
# the Apache 2.0 License: http://www.apache.org/licenses/LICENSE-2.0
import asyncio
import asyncpg
import collections
import collections.abc
import itertools
import struct
im... | 36.436925 | 79 | 0.572267 |
f2543fd1bd197a680d0810b39158e31f01bc54c9 | 5,003 | py | Python | exapi/response_handlers/hitbtc/trading/handler.py | astsu-dev/exapi | 1ef39ccdd77e9ddb60ec6eaa16a2cc26e1ac3e12 | [
"MIT"
] | null | null | null | exapi/response_handlers/hitbtc/trading/handler.py | astsu-dev/exapi | 1ef39ccdd77e9ddb60ec6eaa16a2cc26e1ac3e12 | [
"MIT"
] | null | null | null | exapi/response_handlers/hitbtc/trading/handler.py | astsu-dev/exapi | 1ef39ccdd77e9ddb60ec6eaa16a2cc26e1ac3e12 | [
"MIT"
] | null | null | null | """Has hitbtc trading response handler interface."""
from typing import Optional
from exapi.response_handlers.hitbtc.base import HitbtcBaseResponseHandler
from exapi.models_mappers.hitbtc.trading import IHitbtcTradingModelsMapper
from exapi.models.hitbtc import (HitbtcOrderModel, HitbtcOrders,
... | 31.664557 | 85 | 0.603238 |
ddc5a3920805864267b9980ce5a98fcca13234db | 649 | py | Python | ecobee-poly.py | jimboca/udi-poly-ecobee | 3bfe551e4aae9e430c943a7fbb51db710071bb6d | [
"MIT"
] | null | null | null | ecobee-poly.py | jimboca/udi-poly-ecobee | 3bfe551e4aae9e430c943a7fbb51db710071bb6d | [
"MIT"
] | 1 | 2022-01-22T19:07:19.000Z | 2022-01-23T20:04:46.000Z | ecobee-poly.py | jimboca/udi-poly-ecobee | 3bfe551e4aae9e430c943a7fbb51db710071bb6d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
from udi_interface import Interface,LOGGER
import sys
""" Grab My Controller Node """
from nodes import Controller
if __name__ == "__main__":
try:
polyglot = Interface([])
polyglot.start()
polyglot.updateProfile()
polyglot.setCustomParamsDoc()
Contr... | 28.217391 | 77 | 0.657935 |
217cd61e4800d9a9196f0661164b9ed2d3535df2 | 4,647 | py | Python | src/Selenium2Library/keywords/_waiting.py | tanggai/robotframework_selenium2library | c702cfad4584f54a08a73f8366e769d2304bf1ee | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2015-09-11T03:24:48.000Z | 2018-08-08T11:59:54.000Z | src/Selenium2Library/keywords/_waiting.py | tanggai/robotframework_selenium2library | c702cfad4584f54a08a73f8366e769d2304bf1ee | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/Selenium2Library/keywords/_waiting.py | tanggai/robotframework_selenium2library | c702cfad4584f54a08a73f8366e769d2304bf1ee | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2016-09-29T03:53:13.000Z | 2021-11-09T02:35:37.000Z | import time
import robot
from keywordgroup import KeywordGroup
class _WaitingKeywords(KeywordGroup):
# Public
def wait_for_condition(self, condition, timeout=None, error=None):
"""Waits until the given `condition` is true or `timeout` expires.
The `condition` can be arbitrary Java... | 42.633028 | 134 | 0.641704 |
c1ceecdf2f5b1b0389b5d337063f80605bcbb324 | 1,511 | py | Python | test_mod.py | lianzhibin/Image-Captioning-master | ba9ccdde0735f2a49aff34cd523186f5d8731291 | [
"MIT"
] | null | null | null | test_mod.py | lianzhibin/Image-Captioning-master | ba9ccdde0735f2a49aff34cd523186f5d8731291 | [
"MIT"
] | null | null | null | test_mod.py | lianzhibin/Image-Captioning-master | ba9ccdde0735f2a49aff34cd523186f5d8731291 | [
"MIT"
] | null | null | null | import pickle
import SceneDesc as desc
from keras.preprocessing import sequence
import nltk
import numpy as np
def process_caption(sd, caption):
tokens = caption.split()
tokens = tokens[1:]
terminate_id = tokens.index('<end>')
tokens = tokens[:terminate_id]
return " ".join([word for word in tokens]... | 39.763158 | 100 | 0.669755 |
0043a4d697da3b5e9716c27948206466a652793d | 4,230 | py | Python | oblib/tests/test_taxonomy_misc.py | cwhanse/pyoblib | 55b7e07671b5fdc994e69de3f488c4df2aff8716 | [
"Apache-2.0"
] | null | null | null | oblib/tests/test_taxonomy_misc.py | cwhanse/pyoblib | 55b7e07671b5fdc994e69de3f488c4df2aff8716 | [
"Apache-2.0"
] | null | null | null | oblib/tests/test_taxonomy_misc.py | cwhanse/pyoblib | 55b7e07671b5fdc994e69de3f488c4df2aff8716 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 SunSpec Alliance
# 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,... | 54.230769 | 120 | 0.751773 |
780204435081604a09f629fecae3f32b9d3152d6 | 10,622 | py | Python | scenedetect/video_splitter.py | 953250587/PySD | 7f73f1f8210da96f4ad9be087656291235e7b89f | [
"MIT",
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | scenedetect/video_splitter.py | 953250587/PySD | 7f73f1f8210da96f4ad9be087656291235e7b89f | [
"MIT",
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | scenedetect/video_splitter.py | 953250587/PySD | 7f73f1f8210da96f4ad9be087656291235e7b89f | [
"MIT",
"BSD-3-Clause-Clear",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# PySceneDetect: Python-Based Video Scene Detector
# ---------------------------------------------------------------
# [ Site: http://www.bcastell.com/projects/pyscenedetect/ ]
# [ Github: https://github.com/Breakthrough/PySceneDetect/ ]
# [ Documentation: http://py... | 41.170543 | 96 | 0.646206 |
0ec89b5c5a4b965270376e835c3f74ac6858f40d | 1,525 | py | Python | video_test.py | ifurusato/letterbox-robot | 2d50002144dd40402ed1991788a3c1216bd5f0ce | [
"MIT"
] | null | null | null | video_test.py | ifurusato/letterbox-robot | 2d50002144dd40402ed1991788a3c1216bd5f0ce | [
"MIT"
] | null | null | null | video_test.py | ifurusato/letterbox-robot | 2d50002144dd40402ed1991788a3c1216bd5f0ce | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2020 by Murray Altheim. All rights reserved. This file is part of
# the Robot Operating System project and is released under the "Apache Licence,
# Version 2.0". Please see the LICENSE file included as part of this package.
#
# author: Murray Altheim
# crea... | 28.240741 | 114 | 0.60918 |
06dd368b6a3e25a4b59dc2399d3f4a215f7fa6c2 | 1,162 | py | Python | homeassistant/components/traccar/const.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 30,023 | 2016-04-13T10:17:53.000Z | 2020-03-02T12:56:31.000Z | homeassistant/components/traccar/const.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 31,101 | 2020-03-02T13:00:16.000Z | 2022-03-31T23:57:36.000Z | homeassistant/components/traccar/const.py | jagadeeshvenkatesh/core | 1bd982668449815fee2105478569f8e4b5670add | [
"Apache-2.0"
] | 11,956 | 2016-04-13T18:42:31.000Z | 2020-03-02T09:32:12.000Z | """Constants for Traccar integration."""
DOMAIN = "traccar"
CONF_MAX_ACCURACY = "max_accuracy"
CONF_SKIP_ACCURACY_ON = "skip_accuracy_filter_on"
ATTR_ACCURACY = "accuracy"
ATTR_ADDRESS = "address"
ATTR_ALTITUDE = "altitude"
ATTR_BATTERY = "batt"
ATTR_BEARING = "bearing"
ATTR_CATEGORY = "category"
ATTR_GEOFENCE = "ge... | 28.341463 | 49 | 0.806368 |
139de720c8d6e9086249e94d7fb11207730a8dcb | 11,728 | py | Python | custom_components/tuya_v2/light.py | tbratfisch/tuya-home-assistant | 2805792d599b68de8ed101a96c48f2b89452362d | [
"MIT"
] | 136 | 2019-06-27T08:11:47.000Z | 2022-03-11T12:26:53.000Z | custom_components/tuya_v2/light.py | tbratfisch/tuya-home-assistant | 2805792d599b68de8ed101a96c48f2b89452362d | [
"MIT"
] | 5 | 2020-05-30T00:19:22.000Z | 2022-03-25T18:49:47.000Z | custom_components/tuya_v2/light.py | tbratfisch/tuya-home-assistant | 2805792d599b68de8ed101a96c48f2b89452362d | [
"MIT"
] | 63 | 2019-07-15T21:11:58.000Z | 2022-03-13T09:43:24.000Z | #!/usr/bin/env python3
"""Support for the Tuya lights."""
import json
import logging
from typing import Any, Dict, List, Tuple
from tuya_iot import TuyaDevice, TuyaDeviceManager
from homeassistant.components.light import (
ATTR_BRIGHTNESS,
ATTR_COLOR_TEMP,
ATTR_HS_COLOR,
DOMAIN as DEVICE_DOMAIN,
... | 33.223796 | 98 | 0.597544 |
2dd8532cbbf5a448b8b37cfdff0ad5d883c011da | 364 | py | Python | iHOLDR/algorithms/__init__.py | eric-vader/iHOLDR | e9d379dca358c0401ee9cc5e1a16c3b45b0612ce | [
"Apache-2.0"
] | null | null | null | iHOLDR/algorithms/__init__.py | eric-vader/iHOLDR | e9d379dca358c0401ee9cc5e1a16c3b45b0612ce | [
"Apache-2.0"
] | null | null | null | iHOLDR/algorithms/__init__.py | eric-vader/iHOLDR | e9d379dca358c0401ee9cc5e1a16c3b45b0612ce | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
__all__ = ["PyTorchAlexanderGP", "PyTorchGP", "GeorgeGP", "GPyGP", "SklearnGP", "GPflowGP"]
from algorithms.gpytorchGP import PyTorchAlexanderGP
from algorithms.gpytorchGP import PyTorchGP
from algorithms.george import GeorgeGP
from algorithms.sklearn import SklearnGP
from algorithms.gpy import ... | 40.444444 | 91 | 0.821429 |
ccfa574a90a33d8d7b0569518779c5ba0d2805e1 | 5,208 | py | Python | eventstore_grpc/streams/subscribe.py | jmshnds/eventstore_grpc | cf6a5978bcdf5bb725a569b7373ce15ee4babb25 | [
"MIT"
] | 6 | 2021-02-04T15:48:28.000Z | 2021-12-26T03:04:26.000Z | eventstore_grpc/streams/subscribe.py | jmshnds/eventstore_grpc | cf6a5978bcdf5bb725a569b7373ce15ee4babb25 | [
"MIT"
] | 1 | 2021-04-14T00:06:25.000Z | 2021-04-14T07:28:34.000Z | eventstore_grpc/streams/subscribe.py | jmshnds/eventstore_grpc | cf6a5978bcdf5bb725a569b7373ce15ee4babb25 | [
"MIT"
] | 1 | 2021-04-14T17:22:54.000Z | 2021-04-14T17:22:54.000Z | """Non-persistent stream subscription operations."""
from typing import Iterable, Union, Dict
from eventstore_grpc.proto import streams_pb2, streams_pb2_grpc, shared_pb2
from eventstore_grpc import constants
def get_stream_subscription_request(
stream: str,
from_revision: Union[str, int] = constants.START,
... | 42.688525 | 101 | 0.722158 |
773262f13a104c837699fc1545156022d59270fb | 3,254 | py | Python | jenkins/clean_metadata.py | jpbetz/test-infra | 8272c557733c4ff13eaca515cb61523bf0fc91cd | [
"Apache-2.0"
] | 3 | 2020-04-10T14:14:11.000Z | 2021-06-09T08:39:22.000Z | jenkins/clean_metadata.py | jpbetz/test-infra | 8272c557733c4ff13eaca515cb61523bf0fc91cd | [
"Apache-2.0"
] | null | null | null | jenkins/clean_metadata.py | jpbetz/test-infra | 8272c557733c4ff13eaca515cb61523bf0fc91cd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2016 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 30.12963 | 80 | 0.645667 |
a4ac13d1caa0f15c00dd4a1c0fedcf9279a242dc | 2,465 | py | Python | psdbFourPartsShowGt.py | someoneAlready/ohem | b7552ceb8ed1e9768e0d522258caa64b79834b54 | [
"BSD-2-Clause"
] | 1 | 2017-01-24T20:41:52.000Z | 2017-01-24T20:41:52.000Z | psdbFourPartsShowGt.py | cgangEE/ohem | b7552ceb8ed1e9768e0d522258caa64b79834b54 | [
"BSD-2-Clause"
] | null | null | null | psdbFourPartsShowGt.py | cgangEE/ohem | b7552ceb8ed1e9768e0d522258caa64b79834b54 | [
"BSD-2-Clause"
] | 1 | 2020-10-09T07:49:03.000Z | 2020-10-09T07:49:03.000Z | #!/usr/bin/python
import matplotlib
matplotlib.use('Agg')
import tools._init_paths
import cPickle
import os
from fast_rcnn.config import cfg
import numpy as np
from datasets.factory import get_imdb
import matplotlib.pyplot as plt
import cv2
import random
matplotlib.rcParams.update({'figure.max_open_warning':0})
def... | 28.011364 | 88 | 0.517241 |
b36e170c7edc44414f3cf01a9590d734c73b44c1 | 119 | py | Python | core/__init__.py | shivam-desai/OneNineIT491 | 2ea7748ed697ed9b7a8465740470723fb275dfd9 | [
"MIT"
] | null | null | null | core/__init__.py | shivam-desai/OneNineIT491 | 2ea7748ed697ed9b7a8465740470723fb275dfd9 | [
"MIT"
] | null | null | null | core/__init__.py | shivam-desai/OneNineIT491 | 2ea7748ed697ed9b7a8465740470723fb275dfd9 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""
import pymysql
pymysql.install_as_MySQLdb()
| 14.875 | 39 | 0.672269 |
1f42ccfbc0f75c8c5b082f3945f6101af5fc93a4 | 661 | py | Python | src/foremast/awslambda/api_gateway_event/__init__.py | dnava013/foremast | 9849821b5bb3cd67b438c5adeaa0e42f86e9eaf8 | [
"Apache-2.0"
] | 157 | 2016-09-12T16:24:14.000Z | 2018-06-02T15:40:38.000Z | src/foremast/awslambda/api_gateway_event/__init__.py | dnava013/foremast | 9849821b5bb3cd67b438c5adeaa0e42f86e9eaf8 | [
"Apache-2.0"
] | 206 | 2016-09-12T16:41:31.000Z | 2018-06-04T21:50:29.000Z | src/foremast/awslambda/api_gateway_event/__init__.py | dnava013/foremast | 9849821b5bb3cd67b438c5adeaa0e42f86e9eaf8 | [
"Apache-2.0"
] | 34 | 2016-09-12T16:37:57.000Z | 2018-06-04T18:37:52.000Z | # Foremast - Pipeline Tooling
#
# Copyright 2018 Gogo, 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... | 36.722222 | 76 | 0.73525 |
6f11f41babf17d0eede7aca3d96475d12a0fd216 | 3,107 | py | Python | src/song.py | pupunu/Rytmipeli | 67fe5bdcdaef4e17ecbc9df12138c79315f038e0 | [
"MIT"
] | 1 | 2021-05-16T22:41:55.000Z | 2021-05-16T22:41:55.000Z | src/song.py | pupunu/ot-harjoitutyo | 67fe5bdcdaef4e17ecbc9df12138c79315f038e0 | [
"MIT"
] | null | null | null | src/song.py | pupunu/ot-harjoitutyo | 67fe5bdcdaef4e17ecbc9df12138c79315f038e0 | [
"MIT"
] | null | null | null | from os import listdir
class Song:
'''Luokka, jonka avulla biisien tiedostonimet, nimet,
askeleet ja musiikkitiedostot löytyvät ohjelmalle helposti
Attributes:
name: biisin nimi
filename: biisin tiedot sisältävän tiedoston
tiedostonimi
audiofile: biisin musiikkiti... | 29.037383 | 85 | 0.540393 |
9835aed3aca31396576f81aee7d8f0d26f2c4630 | 1,652 | py | Python | nekpy/dask/subgraph.py | maxhutch/nek_dask | 10520c80f4d55dc8ff34776633d9088cb46086d2 | [
"MIT"
] | null | null | null | nekpy/dask/subgraph.py | maxhutch/nek_dask | 10520c80f4d55dc8ff34776633d9088cb46086d2 | [
"MIT"
] | null | null | null | nekpy/dask/subgraph.py | maxhutch/nek_dask | 10520c80f4d55dc8ff34776633d9088cb46086d2 | [
"MIT"
] | null | null | null | from copy import deepcopy
from .tasks import prepare, update_config, run, analyze, prepare_
from dask.base import tokenize
from dask.delayed import delayed
from math import ceil
from ..config import config as cfg
nekmpi_path = cfg.nekmpi
load_path = cfg.load
def series(base_in, tusr, job_step = 0, job_time = 0.):... | 29.5 | 77 | 0.57385 |
9152f516ae4575e17720acbfd2530dd436646ac9 | 975 | py | Python | tweets/migrations/0001_initial.py | BattleWoLFz99/Twitchain | 6f12aa932488063619482f0ffc1658064151e091 | [
"MIT"
] | null | null | null | tweets/migrations/0001_initial.py | BattleWoLFz99/Twitchain | 6f12aa932488063619482f0ffc1658064151e091 | [
"MIT"
] | 1 | 2021-05-27T11:03:53.000Z | 2021-05-27T11:03:53.000Z | tweets/migrations/0001_initial.py | BattleWoLFz99/Twitchain | 6f12aa932488063619482f0ffc1658064151e091 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.3 on 2021-05-30 19:47
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 31.451613 | 130 | 0.598974 |
1a4324d2dde06579fc2fd6e992a7c00eb9371eff | 4,927 | py | Python | infrastructure-provisioning/src/general/scripts/aws/common_stop_notebook.py | ofuks/DLab | 460804a2559843d099936fe40373093f9bf9edcb | [
"Apache-2.0"
] | null | null | null | infrastructure-provisioning/src/general/scripts/aws/common_stop_notebook.py | ofuks/DLab | 460804a2559843d099936fe40373093f9bf9edcb | [
"Apache-2.0"
] | null | null | null | infrastructure-provisioning/src/general/scripts/aws/common_stop_notebook.py | ofuks/DLab | 460804a2559843d099936fe40373093f9bf9edcb | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# *****************************************************************************
#
# Copyright (c) 2016, EPAM SYSTEMS INC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#... | 40.385246 | 117 | 0.619444 |
1bfc3e1e767711df9d36d5d9349ca6168a78a424 | 672 | py | Python | src/settings.py | nhydock/ftmp3 | d947ef2d109b9c4df6bf7b70e20e9d2bb74e41d0 | [
"Apache-2.0"
] | 5 | 2016-09-01T14:10:18.000Z | 2016-09-03T10:06:26.000Z | src/settings.py | lunared/ftmp3 | d947ef2d109b9c4df6bf7b70e20e9d2bb74e41d0 | [
"Apache-2.0"
] | 15 | 2017-02-14T18:27:26.000Z | 2018-01-25T15:50:01.000Z | src/settings.py | nhydock/ftmp3 | d947ef2d109b9c4df6bf7b70e20e9d2bb74e41d0 | [
"Apache-2.0"
] | 2 | 2021-05-16T11:34:31.000Z | 2022-03-31T04:50:01.000Z | import re
import os
# Root directory that we scan for music from
# Do not change this unless you're not using the docker-compose
# It is preferred you use just change the volume mapping on the docker-compose.yml
MUSIC_DIRECTORY = os.environ.get("FTMP3_MUSIC", r"/media/Music/")
# Tells flask to serve the mp3 files
# Ty... | 35.368421 | 82 | 0.77381 |
aa521452f051eb70d21da9b6553cbfefb4ecd4b9 | 862 | py | Python | 2020/2/puzzle2a.py | TimothyDJones/advent-of-code | 06253b61e4ccfed4a07a7a9bcf1a0e515f3f09b4 | [
"MIT"
] | null | null | null | 2020/2/puzzle2a.py | TimothyDJones/advent-of-code | 06253b61e4ccfed4a07a7a9bcf1a0e515f3f09b4 | [
"MIT"
] | null | null | null | 2020/2/puzzle2a.py | TimothyDJones/advent-of-code | 06253b61e4ccfed4a07a7a9bcf1a0e515f3f09b4 | [
"MIT"
] | null | null | null | # puzzle2a.py
def main():
valid_password_count = 0
input_file = open("input.txt", "r")
lines = input_file.readlines()
for line in lines:
if check_password(parse_line(line)):
valid_password_count += 1
print("Valid passwords: " + str(valid_password_count))
def check_pa... | 23.944444 | 87 | 0.588167 |
72afe46f9148d6d02947854667084d0893fe8188 | 994 | py | Python | Cura/Uranium/tests/Bindings/TestToolModel.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | Cura/Uranium/tests/Bindings/TestToolModel.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | Cura/Uranium/tests/Bindings/TestToolModel.py | TIAO-JI-FU/3d-printing-with-moveo-1 | 100ecfd1208fe1890f8bada946145d716b2298eb | [
"MIT"
] | null | null | null | import pytest
from unittest.mock import patch, mock_open, MagicMock
from UM.Qt.Bindings.ToolModel import ToolModel
controller = MagicMock()
@pytest.fixture
def tool_model():
mocked_application = MagicMock()
mocked_application.getController = MagicMock(return_value = controller)
with patch("UM.Applicati... | 32.064516 | 103 | 0.758551 |
57b2ef16681d20fc830908072f4698c03343a141 | 1,159 | py | Python | gdm/users/models.py | Deonstudios/GDM | ad6c8182d3e70a6c4d1490f452b2c16e12dc85d8 | [
"Apache-2.0"
] | null | null | null | gdm/users/models.py | Deonstudios/GDM | ad6c8182d3e70a6c4d1490f452b2c16e12dc85d8 | [
"Apache-2.0"
] | null | null | null | gdm/users/models.py | Deonstudios/GDM | ad6c8182d3e70a6c4d1490f452b2c16e12dc85d8 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
from django.db.models.signals import post_save
from django.dispatch import receiver
class Profile(models.Model):
"""Basically we are hooking the
... | 32.194444 | 70 | 0.756687 |
a129196692f69b31a3e02d56b0ef015143193301 | 428 | py | Python | setup.py | z33ky/schedsi | 3affe28a3e1d2001c639d7c0423cb105d1991590 | [
"CC0-1.0"
] | 1 | 2017-08-03T12:58:53.000Z | 2017-08-03T12:58:53.000Z | setup.py | z33ky/schedsi | 3affe28a3e1d2001c639d7c0423cb105d1991590 | [
"CC0-1.0"
] | null | null | null | setup.py | z33ky/schedsi | 3affe28a3e1d2001c639d7c0423cb105d1991590 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
import setuptools
setuptools.setup(
name="schedsi",
version="0.4.0dev",
description="Primitive scheduling simulator",
author="Alexander 'z33ky' Hirsch",
author_email="1zeeky@gmail.com",
license="CC0",
packages=["schedsi"],
entry_points={
'console_scripts'... | 21.4 | 49 | 0.598131 |
1905662a96a84aeac0b63d4db4529284a56ee41f | 21,942 | py | Python | projects/transformerdesigner/power/Machine.py | holla2040/valvestudio.com | ee4031613390cea26cd00e121cfc63218f0eacd2 | [
"MIT"
] | 4 | 2018-11-04T03:04:14.000Z | 2020-08-20T12:51:53.000Z | projects/transformerdesigner/power/Machine.py | holla2040/valvestudio.com | ee4031613390cea26cd00e121cfc63218f0eacd2 | [
"MIT"
] | null | null | null | projects/transformerdesigner/power/Machine.py | holla2040/valvestudio.com | ee4031613390cea26cd00e121cfc63218f0eacd2 | [
"MIT"
] | 3 | 2016-09-06T03:08:06.000Z | 2017-10-24T09:01:12.000Z | #!/usr/bin/env python
# grbl v1.1 docs
# https://github.com/gnea/grbl/blob/master/doc/markdown
# G10 P0 L20 X0
# G10 P0 L20 Y0
X=0
TURNS=1
LABEL=2
BUFFERTHRES=13
import time,sys,os,csv
try:
import serial
except ImportError:
pass
try:
import termios
except ImportError:
pass
class Machine():
... | 32.700447 | 235 | 0.441983 |
6f7b590c2e68f77dff5a9bfb2164a609aa55ee29 | 3,012 | py | Python | osf/migrations/0217_auto_20200901_1344.py | gaybro8777/osf.io | 30408511510a40bc393565817b343ef5fd76ab14 | [
"Apache-2.0"
] | 628 | 2015-01-15T04:33:22.000Z | 2022-03-30T06:40:10.000Z | osf/migrations/0217_auto_20200901_1344.py | gaybro8777/osf.io | 30408511510a40bc393565817b343ef5fd76ab14 | [
"Apache-2.0"
] | 4,712 | 2015-01-02T01:41:53.000Z | 2022-03-30T14:18:40.000Z | osf/migrations/0217_auto_20200901_1344.py | Johnetordoff/osf.io | de10bf249c46cede04c78f7e6f7e352c69e6e6b5 | [
"Apache-2.0"
] | 371 | 2015-01-12T16:14:08.000Z | 2022-03-31T18:58:29.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2020-09-01 13:44
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
import osf.models.base
class Migration(migrations.Migration):... | 54.763636 | 392 | 0.636454 |
361ab30f2746e6e9756c1aeb41eb64a911b583d3 | 1,317 | py | Python | setup.py | iwoca/django-deep-collector | 1775d7938be38535c52c7aace7fabe62527cbfb4 | [
"BSD-3-Clause"
] | 27 | 2015-04-28T15:45:11.000Z | 2021-06-21T09:53:06.000Z | setup.py | iwoca/django-deep-collector | 1775d7938be38535c52c7aace7fabe62527cbfb4 | [
"BSD-3-Clause"
] | 21 | 2015-07-28T12:36:23.000Z | 2022-03-20T23:53:53.000Z | setup.py | iwoca/django-deep-collector | 1775d7938be38535c52c7aace7fabe62527cbfb4 | [
"BSD-3-Clause"
] | 13 | 2015-05-21T11:27:26.000Z | 2021-03-31T07:42:26.000Z |
import os
from setuptools import setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-deep-collector',
version='... | 33.769231 | 78 | 0.623386 |
8d0e28c67a1ba6a72f7a9f718e26da19917a08c2 | 35,163 | py | Python | kik_unofficial/client.py | mikehawk1337/tomers | c76a537440f50ff28ea9c2afdc422199fca3dd22 | [
"MIT"
] | 1 | 2020-08-27T13:58:35.000Z | 2020-08-27T13:58:35.000Z | kik_unofficial/client.py | bluemods/kik-bot-api-unofficial | 776759143f83907fd77eacea3e0f0e0621b2b099 | [
"MIT"
] | null | null | null | kik_unofficial/client.py | bluemods/kik-bot-api-unofficial | 776759143f83907fd77eacea3e0f0e0621b2b099 | [
"MIT"
] | null | null | null | import asyncio
import logging
import sys
import time
from threading import Thread, Event
from typing import Union, List, Tuple
from asyncio import Transport, Protocol
from bs4 import BeautifulSoup
import kik_unofficial.callbacks as callbacks
import kik_unofficial.datatypes.exceptions as exceptions
import kik_unofficia... | 45.607004 | 134 | 0.660239 |
624227094f226bdaebf212112186830fe7c747e0 | 11,248 | py | Python | syncedclock_rtc.py | dave2/micropython-ntpd | 92180fab43c706518002707f30457d884e50369b | [
"Apache-2.0"
] | 1 | 2019-05-11T01:31:48.000Z | 2019-05-11T01:31:48.000Z | syncedclock_rtc.py | dave2/micropython-ntpd | 92180fab43c706518002707f30457d884e50369b | [
"Apache-2.0"
] | null | null | null | syncedclock_rtc.py | dave2/micropython-ntpd | 92180fab43c706518002707f30457d884e50369b | [
"Apache-2.0"
] | null | null | null | # A synchronised clock using STM32 as the clock source
# Copyright 2018 David Zanetti
#
# 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
#
# U... | 43.596899 | 104 | 0.560544 |
b3497c9aaa98ae860cc2b12569415770e4844906 | 2,955 | py | Python | tests/ws/test_handlers.py | bcdev/eocdb-server | 027078f2b022a06b3a417d76d273514a72f8cac7 | [
"MIT"
] | null | null | null | tests/ws/test_handlers.py | bcdev/eocdb-server | 027078f2b022a06b3a417d76d273514a72f8cac7 | [
"MIT"
] | 1 | 2019-05-08T07:53:13.000Z | 2019-05-08T07:53:13.000Z | tests/ws/test_handlers.py | bcdev/ocdb-server | 027078f2b022a06b3a417d76d273514a72f8cac7 | [
"MIT"
] | null | null | null | import json
import unittest
from tornado.testing import AsyncHTTPTestCase
from eocdb.ws.app import new_application
from tests.helpers import new_test_service_context
# For usage of the tornado.testing.AsyncHTTPTestCase see http://www.tornadoweb.org/en/stable/testing.html
class HandlersTest(AsyncHTTPTestCase):
d... | 46.171875 | 105 | 0.546531 |
908b835b7d10b8235dddf43bb06c885f23da3465 | 6,228 | py | Python | SBaaS_quantification/stage01_quantification_QCs_io.py | dmccloskey/SBaaS_quantification | b2a9c7a9a0d318f22ff20e311f94c213852ba914 | [
"MIT"
] | null | null | null | SBaaS_quantification/stage01_quantification_QCs_io.py | dmccloskey/SBaaS_quantification | b2a9c7a9a0d318f22ff20e311f94c213852ba914 | [
"MIT"
] | null | null | null | SBaaS_quantification/stage01_quantification_QCs_io.py | dmccloskey/SBaaS_quantification | b2a9c7a9a0d318f22ff20e311f94c213852ba914 | [
"MIT"
] | null | null | null | from .stage01_quantification_QCs_query import stage01_quantification_QCs_query
from .lims_quantitationMethod_query import lims_quantitationMethod_query
from .stage01_quantification_MQResultsTable_query import stage01_quantification_MQResultsTable_query
# Resources
from io_utilities.base_importData import base_importDa... | 52.336134 | 112 | 0.553308 |
2d004beda1c3e4ef8f98bea3ba630485134857dd | 9,096 | py | Python | src/di_replication/repl_dispatch_files/repl_dispatch_files.py | thhapke/sdi_replication | f23e48d60c0d76603eec5071ea57d0646a44389e | [
"MIT"
] | 2 | 2020-08-31T16:40:56.000Z | 2020-09-30T10:40:06.000Z | src/di_replication/repl_dispatch_files/repl_dispatch_files.py | thhapke/sdi_replication | f23e48d60c0d76603eec5071ea57d0646a44389e | [
"MIT"
] | null | null | null | src/di_replication/repl_dispatch_files/repl_dispatch_files.py | thhapke/sdi_replication | f23e48d60c0d76603eec5071ea57d0646a44389e | [
"MIT"
] | null | null | null | import io
import os
import time
import subprocess
import sdi_utils.gensolution as gs
import sdi_utils.set_logging as slog
import sdi_utils.textfield_parser as tfp
import sdi_utils.tprogress as tp
try:
api
except NameError:
class api:
queue = list()
class Message:
def __init__(s... | 38.542373 | 125 | 0.573329 |
db9410ec5f1e7e9c594ed5a57f1b036466ac99d1 | 14,101 | py | Python | vueSuit/vueAdmin/templatetags/vueAdmin_sets.py | Ryuchen/django-vue-su | 28c08a157cd243b475673ca7486aedb1719759ea | [
"BSD-3-Clause"
] | 23 | 2019-08-16T07:53:51.000Z | 2021-06-15T14:50:19.000Z | vueSuit/vueAdmin/templatetags/vueAdmin_sets.py | Ryuchen/django-vue-su | 28c08a157cd243b475673ca7486aedb1719759ea | [
"BSD-3-Clause"
] | null | null | null | vueSuit/vueAdmin/templatetags/vueAdmin_sets.py | Ryuchen/django-vue-su | 28c08a157cd243b475673ca7486aedb1719759ea | [
"BSD-3-Clause"
] | 3 | 2019-11-14T08:04:32.000Z | 2021-02-18T07:05:02.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ==================================================
# @Time : 2019-08-04 00:29
# @Author : ryuchen
# @File : vuetags.py
# @Desc :
# ==================================================
import os
import json
import datetime
from django import template
from django.conf import... | 32.869464 | 110 | 0.595915 |
dd5fb12330f1b459731207df14168c286950ebc2 | 4,210 | py | Python | runner.py | jamekuma/IGNN | c075556b7251c18b097cb9756234d902c9c3a4f2 | [
"MIT"
] | null | null | null | runner.py | jamekuma/IGNN | c075556b7251c18b097cb9756234d902c9c3a4f2 | [
"MIT"
] | null | null | null | runner.py | jamekuma/IGNN | c075556b7251c18b097cb9756234d902c9c3a4f2 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Developed by Shangchen Zhou <shangchenzhou@gmail.com>
import matplotlib
import os
# Fix problem: no $DISPLAY environment variable
matplotlib.use('Agg')
from argparse import ArgumentParser
from pprint import pprint
from config import cfg
from core.build import bulid_net
... | 46.777778 | 177 | 0.683848 |
c6f7e5c57698ce1ce0e82ce1db285405756260c1 | 2,630 | py | Python | aiida/backends/tests/cmdline/commands/test_comment.py | iriberri/aiida_core | c4a1ec5dac92ee62c59d39ca580bde449f3abf73 | [
"BSD-2-Clause"
] | null | null | null | aiida/backends/tests/cmdline/commands/test_comment.py | iriberri/aiida_core | c4a1ec5dac92ee62c59d39ca580bde449f3abf73 | [
"BSD-2-Clause"
] | null | null | null | aiida/backends/tests/cmdline/commands/test_comment.py | iriberri/aiida_core | c4a1ec5dac92ee62c59d39ca580bde449f3abf73 | [
"BSD-2-Clause"
] | 1 | 2018-12-21T11:10:09.000Z | 2018-12-21T11:10:09.000Z | # -*- coding: utf-8 -*-
from click.testing import CliRunner
from aiida.backends.testbase import AiidaTestCase
COMMENT = u'Well I never...'
class TestVerdiUserCommand(AiidaTestCase):
def setUp(self):
self.cli_runner = CliRunner()
def test_comment_show_simple(self):
""" test simply calling t... | 31.686747 | 111 | 0.643346 |
4af6cdd1040d8981507e41e115b9b6cb9e7fdc13 | 499 | py | Python | wildlifecompliance/migrations/0387_temporarydocument_input_name.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 1 | 2020-12-07T17:12:40.000Z | 2020-12-07T17:12:40.000Z | wildlifecompliance/migrations/0387_temporarydocument_input_name.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 14 | 2020-01-08T08:08:26.000Z | 2021-03-19T22:59:46.000Z | wildlifecompliance/migrations/0387_temporarydocument_input_name.py | preranaandure/wildlifecompliance | bc19575f7bccf7e19adadbbaf5d3eda1d1aee4b5 | [
"Apache-2.0"
] | 15 | 2020-01-08T08:02:28.000Z | 2021-11-03T06:48:32.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2020-01-17 07:18
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('wildlifecompliance', '0386_auto_20200117_1418'),
]
operations = [
migration... | 23.761905 | 74 | 0.641283 |
08e9777bab7fe013c22cdb9720b40234ec9f5965 | 1,019 | py | Python | 74. Search a 2D Matrix.py | TilokSaha/LeetCode-Solution | 891910fb6b4c92de74ae361313bd65570bf85fc7 | [
"MIT"
] | null | null | null | 74. Search a 2D Matrix.py | TilokSaha/LeetCode-Solution | 891910fb6b4c92de74ae361313bd65570bf85fc7 | [
"MIT"
] | null | null | null | 74. Search a 2D Matrix.py | TilokSaha/LeetCode-Solution | 891910fb6b4c92de74ae361313bd65570bf85fc7 | [
"MIT"
] | null | null | null | class Solution:
def searchMatrix(self, matrix: List[List[int]], target: int) -> bool:
# for i in matrix:
# if target in i:
# return True # <--------- if the target is present in any of the row then we return True
# return False
if not matrix or not m... | 46.318182 | 110 | 0.482826 |
a81be5fea358c930dd12df22d158558c17e0c5a8 | 10,836 | py | Python | iotbx/pdb/fetch.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | 2 | 2021-03-18T12:31:57.000Z | 2022-03-14T06:27:06.000Z | iotbx/pdb/fetch.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | null | null | null | iotbx/pdb/fetch.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | 1 | 2021-03-26T12:52:30.000Z | 2021-03-26T12:52:30.000Z | # TODO other PDB sites?
#
# See RCSB documentation at:
# http://www.rcsb.org/pdb/static.do?p=download/http/index.html
#
# File format Compression Example URL
# PDB uncompressed https://www.rcsb.org/pdb/files/2vz8.pdb
# CIF uncompressed https://www.rcsb.org/pdb/files/2vz8.cif
# XML uncompressed https://www.rcsb.or... | 37.756098 | 122 | 0.641842 |
b63af165011ce590acc95306da4944e0384b6f38 | 2,334 | py | Python | optimization/smarttuning/tests/test_configuration.py | adalrsjr1/smart-tuning | d8cb9f4ba41e7c068eda75b0fb581dcc8f329064 | [
"MIT"
] | 1 | 2021-10-04T18:02:55.000Z | 2021-10-04T18:02:55.000Z | optimization/smarttuning/tests/test_configuration.py | adalrsjr1/smart-tuning | d8cb9f4ba41e7c068eda75b0fb581dcc8f329064 | [
"MIT"
] | null | null | null | optimization/smarttuning/tests/test_configuration.py | adalrsjr1/smart-tuning | d8cb9f4ba41e7c068eda75b0fb581dcc8f329064 | [
"MIT"
] | null | null | null | import unittest
from unittest import TestCase
from unittest.mock import Mock, MagicMock
from models.configuration import Configuration, EmptyConfiguration
from sampler import Metric
from smarttuning2.test_planner.mock_searchspace import MockSearchSpace, MockTrial
class TestConfiguration(TestCase):
def test_insta... | 31.972603 | 85 | 0.636675 |
8eb846201a82bcc966cba3e013171083381d996f | 12,807 | py | Python | src/python/grpcio_tests/tests_aio/unit/server_interceptor_test.py | YuanzhongZheng/grpc | cd58f4cd8db82d1272648b414ec041cdbd96e4f4 | [
"Apache-2.0"
] | 2 | 2021-07-13T09:16:08.000Z | 2021-11-17T11:07:13.000Z | src/python/grpcio_tests/tests_aio/unit/server_interceptor_test.py | YuanzhongZheng/grpc | cd58f4cd8db82d1272648b414ec041cdbd96e4f4 | [
"Apache-2.0"
] | 11 | 2019-10-15T23:03:57.000Z | 2020-06-14T16:10:12.000Z | src/python/grpcio_tests/tests_aio/unit/server_interceptor_test.py | YuanzhongZheng/grpc | cd58f4cd8db82d1272648b414ec041cdbd96e4f4 | [
"Apache-2.0"
] | 7 | 2021-08-05T11:40:30.000Z | 2022-01-31T11:22:08.000Z | # Copyright 2020 The gRPC Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 38.459459 | 87 | 0.656438 |
f526f484b291ec18f13537f8d8ee3e188ef1768a | 64,582 | py | Python | tools/third_party/pytest/src/_pytest/fixtures.py | meyerweb/wpt | f04261533819893c71289614c03434c06856c13e | [
"BSD-3-Clause"
] | 2,479 | 2018-05-28T14:51:29.000Z | 2022-03-30T14:41:18.000Z | tools/third_party/pytest/src/_pytest/fixtures.py | meyerweb/wpt | f04261533819893c71289614c03434c06856c13e | [
"BSD-3-Clause"
] | 7,642 | 2018-05-28T09:38:03.000Z | 2022-03-31T20:55:48.000Z | tools/third_party/pytest/src/_pytest/fixtures.py | meyerweb/wpt | f04261533819893c71289614c03434c06856c13e | [
"BSD-3-Clause"
] | 1,303 | 2018-05-29T14:50:02.000Z | 2022-03-30T17:30:42.000Z | import functools
import inspect
import os
import sys
import warnings
from collections import defaultdict
from collections import deque
from types import TracebackType
from typing import Any
from typing import Callable
from typing import cast
from typing import Dict
from typing import Generator
from typing import Generi... | 38.718225 | 118 | 0.623889 |
f6c63c081105f9d4aeaca27d3d92127d2a18e9bf | 2,118 | py | Python | setup.py | bale-go/katrain | 2bcfb8d8ffe98d61a48a51f889b480d00b22907a | [
"MIT"
] | null | null | null | setup.py | bale-go/katrain | 2bcfb8d8ffe98d61a48a51f889b480d00b22907a | [
"MIT"
] | null | null | null | setup.py | bale-go/katrain | 2bcfb8d8ffe98d61a48a51f889b480d00b22907a | [
"MIT"
] | null | null | null | import re
import os
from setuptools import find_packages, setup
package_data = {"": ["*.json", "*.kv","*.wav"], "katrain": [], "tests": []}
packages = find_packages(exclude=["tests"])
version = re.search('^VERSION\s*=\s*"(.*)"', open("katrain/core/constants.py").read(), re.M).group(1)
def include_data_files(directo... | 33.09375 | 101 | 0.646837 |
d355bd6205a1e83ca04804a3eb7cfb2f6a94e98e | 78,886 | py | Python | tensorflow/python/tpu/tensor_tracer.py | minai2020/tensorflow | a6b4474186c906c09cd29b1a7d4d0af714c261e4 | [
"Apache-2.0"
] | 4 | 2020-04-19T11:30:20.000Z | 2020-07-02T07:13:15.000Z | tensorflow/python/tpu/tensor_tracer.py | minai2020/tensorflow | a6b4474186c906c09cd29b1a7d4d0af714c261e4 | [
"Apache-2.0"
] | 8 | 2019-03-13T23:13:47.000Z | 2020-01-31T21:08:21.000Z | tensorflow/python/tpu/tensor_tracer.py | minai2020/tensorflow | a6b4474186c906c09cd29b1a7d4d0af714c261e4 | [
"Apache-2.0"
] | 2 | 2019-03-19T03:52:56.000Z | 2019-07-09T05:09:13.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... | 42.618044 | 115 | 0.67988 |
40f20cbcd32b2e629c7e42f4c550c43b1c1f7204 | 12,653 | py | Python | ironic/tests/unit/drivers/third_party_driver_mocks.py | pyrrrat/moved-ironic | 93331da82ef13490ccf08f8f9c370e81ca176a41 | [
"Apache-2.0"
] | null | null | null | ironic/tests/unit/drivers/third_party_driver_mocks.py | pyrrrat/moved-ironic | 93331da82ef13490ccf08f8f9c370e81ca176a41 | [
"Apache-2.0"
] | null | null | null | ironic/tests/unit/drivers/third_party_driver_mocks.py | pyrrrat/moved-ironic | 93331da82ef13490ccf08f8f9c370e81ca176a41 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Hewlett-Packard Development Company, L.P.
# 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... | 43.332192 | 78 | 0.744408 |
ab8f096e83c0e0a2ee0e3846547baed7d426e7a5 | 54,889 | py | Python | sympy/diffgeom/diffgeom.py | pbeltran/sympy-1 | 94f92b36731c2bebe6de1037c063c2a258a8a399 | [
"BSD-3-Clause"
] | 1 | 2015-12-28T08:19:43.000Z | 2015-12-28T08:19:43.000Z | sympy/diffgeom/diffgeom.py | pbeltran/sympy-1 | 94f92b36731c2bebe6de1037c063c2a258a8a399 | [
"BSD-3-Clause"
] | null | null | null | sympy/diffgeom/diffgeom.py | pbeltran/sympy-1 | 94f92b36731c2bebe6de1037c063c2a258a8a399 | [
"BSD-3-Clause"
] | null | null | null | from sympy.matrices import Matrix
from sympy.core import Basic, Expr, Dummy, Function, sympify, diff, Pow, Mul, Add
from sympy.core.numbers import Zero
from sympy.solvers import solve
from sympy.functions import factorial
from sympy.simplify import simplify
from sympy.core.compatibility import reduce, permutations
from... | 34.916667 | 122 | 0.604693 |
07b2b1313c22dad2147a1db37e701a075616a9fe | 318 | py | Python | lista_ex2.py/exercicio12.py | robinson-1985/mentoria_exercises | 8359cead6ee5351851b04cb45f252e3881b79117 | [
"MIT"
] | null | null | null | lista_ex2.py/exercicio12.py | robinson-1985/mentoria_exercises | 8359cead6ee5351851b04cb45f252e3881b79117 | [
"MIT"
] | null | null | null | lista_ex2.py/exercicio12.py | robinson-1985/mentoria_exercises | 8359cead6ee5351851b04cb45f252e3881b79117 | [
"MIT"
] | null | null | null | ''' 12. Faça um programa que receba dois números maiores que zero, calcule e mostre um
elevado ao outro. '''
numero1 = int(input('Digite um número maior que zero: '))
numero2 = int(input('Digite outro número maior que zero: '))
numero_elevado = numero1 ** numero2
print('O número elevado será: ', numero_elevado)
| 26.5 | 86 | 0.72327 |
54ca9e074e2b45d6a5ddbb6d2326ef21382b2b20 | 1,535 | py | Python | py/ClientProject/.idea/util/UtilityGcs.py | Justyer/Secret | 164ea9c777832772ee6115c21999d97f521c6adb | [
"MIT"
] | null | null | null | py/ClientProject/.idea/util/UtilityGcs.py | Justyer/Secret | 164ea9c777832772ee6115c21999d97f521c6adb | [
"MIT"
] | null | null | null | py/ClientProject/.idea/util/UtilityGcs.py | Justyer/Secret | 164ea9c777832772ee6115c21999d97f521c6adb | [
"MIT"
] | null | null | null | # coding:utf-8
import hashlib
from urllib.parse import quote, quote_plus
import requests
# 根据地址信息获取百度坐标
class GcsConverUtil:
baiduhost = 'http://api.map.baidu.com'
baiduapi = '/geocoder/v2/'
# ak = 'UDKyoUAtLfCmXs2erIy9lvWG'
# sk = 'jFY4BD5G756MLgOmRFpnfeg1YPghlfnN'
ak = '3a345e5b8b56a... | 37.439024 | 116 | 0.588925 |
0d13317e206b40e5d63fe885e932ae88dfd5e871 | 4,057 | py | Python | yolov3_ultralytics/detect.py | minhduc0711/labelImg | 5030721bb6a59424bfed1d7c09b56e01d08662a1 | [
"MIT"
] | null | null | null | yolov3_ultralytics/detect.py | minhduc0711/labelImg | 5030721bb6a59424bfed1d7c09b56e01d08662a1 | [
"MIT"
] | null | null | null | yolov3_ultralytics/detect.py | minhduc0711/labelImg | 5030721bb6a59424bfed1d7c09b56e01d08662a1 | [
"MIT"
] | null | null | null | import random
import time
from pathlib import Path
import os
import numpy as np
import torch
import cv2
import imutils
import streamlit as st
import matplotlib.pyplot as plt
from .models import Darknet, load_darknet_weights
from .utils.parse_config import parse_data_cfg
from .utils.utils import load_classes, non_max_... | 33.254098 | 129 | 0.602909 |
6319995d4e985ac2ef11ead7eb876d0a238a3f62 | 16,070 | py | Python | env/Lib/site-packages/pip/_internal/cmdoptions.py | DPNT-Sourcecode/CHK-dxpc01 | 48aac17a76fab3229bd710351e1baa1461ab77f5 | [
"Apache-2.0"
] | 937 | 2019-05-08T08:46:25.000Z | 2022-03-31T12:56:07.000Z | env/Lib/site-packages/pip/_internal/cmdoptions.py | DPNT-Sourcecode/CHK-dxpc01 | 48aac17a76fab3229bd710351e1baa1461ab77f5 | [
"Apache-2.0"
] | 88 | 2020-03-09T01:20:59.000Z | 2021-11-15T17:49:34.000Z | env/Lib/site-packages/pip/_internal/cmdoptions.py | DPNT-Sourcecode/CHK-dxpc01 | 48aac17a76fab3229bd710351e1baa1461ab77f5 | [
"Apache-2.0"
] | 354 | 2019-05-10T02:15:26.000Z | 2022-03-30T05:52:57.000Z | """
shared options and groups
The principle here is to define options once, but *not* instantiate them
globally. One reason being that options with action='append' can carry state
between parses. pip parses general options twice internally, and shouldn't
pass on state. To be consistent, all options will follow this de... | 26.344262 | 79 | 0.618046 |
526e55de3762c45d02774497142cb24924a98354 | 7,100 | py | Python | tests/tests_geomstats/test_product_manifold.py | tfunatomi/geomstats | a5651680f98dea95c1f82a48af1a6dccf3e26bd1 | [
"MIT"
] | 2 | 2020-01-23T04:01:02.000Z | 2020-08-18T19:20:27.000Z | tests/tests_geomstats/test_product_manifold.py | tfunatomi/geomstats | a5651680f98dea95c1f82a48af1a6dccf3e26bd1 | [
"MIT"
] | null | null | null | tests/tests_geomstats/test_product_manifold.py | tfunatomi/geomstats | a5651680f98dea95c1f82a48af1a6dccf3e26bd1 | [
"MIT"
] | null | null | null | """Unit tests for ProductManifold."""
import tests.helper as helper
import geomstats.backend as gs
import geomstats.tests
from geomstats.geometry.euclidean import Euclidean
from geomstats.geometry.hyperboloid import Hyperboloid
from geomstats.geometry.hypersphere import Hypersphere
from geomstats.geometry.minkowski i... | 39.010989 | 78 | 0.680141 |
92cb42709c60e65cd9cb6692f2a84987b0be0f73 | 2,953 | py | Python | mmtbx/ligands/xtal_screens.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 155 | 2016-11-23T12:52:16.000Z | 2022-03-31T15:35:44.000Z | mmtbx/ligands/xtal_screens.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 590 | 2016-12-10T11:31:18.000Z | 2022-03-30T23:10:09.000Z | mmtbx/ligands/xtal_screens.py | dperl-sol/cctbx_project | b9e390221a2bc4fd00b9122e97c3b79c632c6664 | [
"BSD-3-Clause-LBNL"
] | 115 | 2016-11-15T08:17:28.000Z | 2022-02-09T15:30:14.000Z | # -*- coding: utf-8; py-indent-offset: 2 -*-
from __future__ import absolute_import, division, print_function
from libtbx import slots_getstate_setstate
import os.path
xtal_params_str = """
screen = None
.type = str
.help = ...
screen_number = None
.type = int
.help = ...
"""
class server(object):
def __in... | 28.95098 | 75 | 0.64172 |
6ce99d799106b1bd231e474f16871bef4ca234b6 | 1,867 | py | Python | tensorflow/python/data/experimental/kernel_tests/optimization/filter_with_random_uniform_fusion_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 848 | 2019-12-03T00:16:17.000Z | 2022-03-31T22:53:17.000Z | tensorflow/python/data/experimental/kernel_tests/optimization/filter_with_random_uniform_fusion_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 656 | 2019-12-03T00:48:46.000Z | 2022-03-31T18:41:54.000Z | tensorflow/python/data/experimental/kernel_tests/optimization/filter_with_random_uniform_fusion_test.py | abhaikollara/tensorflow | 4f96df3659696990cb34d0ad07dc67843c4225a9 | [
"Apache-2.0"
] | 506 | 2019-12-03T00:46:26.000Z | 2022-03-30T10:34:56.000Z | # Copyright 2019 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... | 39.723404 | 80 | 0.76165 |
b54469d9d6afa634e589b18a894e3b28a943bd81 | 3,837 | py | Python | python/paddle_fl/mpc/examples/model_encryption/predict/train_and_encrypt_model.py | barrierye/PaddleFL | eff6ef28491fa2011686ca3daa4f680e5ef83deb | [
"Apache-2.0"
] | 379 | 2019-09-27T14:26:42.000Z | 2022-03-29T14:28:12.000Z | python/paddle_fl/mpc/examples/model_encryption/predict/train_and_encrypt_model.py | Sprate/PaddleFL | 583691acd5db0a7ca331cc9a72415017b18669b8 | [
"Apache-2.0"
] | 132 | 2019-10-16T03:22:03.000Z | 2022-03-23T08:54:29.000Z | python/paddle_fl/mpc/examples/model_encryption/predict/train_and_encrypt_model.py | Sprate/PaddleFL | 583691acd5db0a7ca331cc9a72415017b18669b8 | [
"Apache-2.0"
] | 106 | 2019-09-27T12:47:18.000Z | 2022-03-29T09:07:25.000Z | # Copyright (c) 2020 PaddlePaddle 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 appli... | 40.389474 | 96 | 0.65546 |
21e67b942e79b87dd325f9cd6b4f46f57912bc8d | 7,303 | py | Python | data/passiv_de_nps/passivization_corpus_proc.py | mawilson1234/multilingual-transformations | 1e7abc158158d9cd09e6d68ed51eb16801494ab4 | [
"MIT"
] | null | null | null | data/passiv_de_nps/passivization_corpus_proc.py | mawilson1234/multilingual-transformations | 1e7abc158158d9cd09e6d68ed51eb16801494ab4 | [
"MIT"
] | null | null | null | data/passiv_de_nps/passivization_corpus_proc.py | mawilson1234/multilingual-transformations | 1e7abc158158d9cd09e6d68ed51eb16801494ab4 | [
"MIT"
] | null | null | null | import random
import argparse
from collections import Counter
parser = argparse.ArgumentParser()
parser.add_argument('--train_size', help='Size for the training set', type=int, default=100000)
parser.add_argument('--dev_size', help='Size for the dev set', type=int, default=1000)
parser.add_argument('--test_size', help... | 23.482315 | 112 | 0.621936 |
51ce571c670090a8cd3bfe8c337ce64c5ab704ae | 1,184 | py | Python | python_modules/libraries/dagster-aws/setup.py | sd2k/dagster | d15542e2be374a0c35f2b1623c1fff98f002c605 | [
"Apache-2.0"
] | 1 | 2021-05-13T08:42:14.000Z | 2021-05-13T08:42:14.000Z | python_modules/libraries/dagster-aws/setup.py | sd2k/dagster | d15542e2be374a0c35f2b1623c1fff98f002c605 | [
"Apache-2.0"
] | null | null | null | python_modules/libraries/dagster-aws/setup.py | sd2k/dagster | d15542e2be374a0c35f2b1623c1fff98f002c605 | [
"Apache-2.0"
] | null | null | null | from setuptools import find_packages, setup
def get_version():
version = {}
with open("dagster_aws/version.py") as fp:
exec(fp.read(), version) # pylint: disable=W0122
return version["__version__"]
if __name__ == "__main__":
setup(
name="dagster-aws",
version=get_version(),... | 34.823529 | 101 | 0.61402 |
a180c86e95187939252c038c345aabd3926a570d | 41,253 | py | Python | uuv_control/uuv_trajectory_control/src/uuv_control_interfaces/dp_controller_base1.py | Xiaoran807/uuv_simulator | 5273de462a83f4a86e1478d94146ceef08fe9f7d | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | uuv_control/uuv_trajectory_control/src/uuv_control_interfaces/dp_controller_base1.py | Xiaoran807/uuv_simulator | 5273de462a83f4a86e1478d94146ceef08fe9f7d | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | uuv_control/uuv_trajectory_control/src/uuv_control_interfaces/dp_controller_base1.py | Xiaoran807/uuv_simulator | 5273de462a83f4a86e1478d94146ceef08fe9f7d | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2016-2019 The UUV Simulator Authors.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 38.518207 | 179 | 0.645238 |
613c4360ffa99e452bc03e080d3521de94c60d04 | 2,272 | py | Python | openstack/orchestration/v1/stack_files.py | wangrui1121/huaweicloud-sdk-python | 240abe00288760115d1791012d4e3c4592d77ad1 | [
"Apache-2.0"
] | 43 | 2018-12-19T08:39:15.000Z | 2021-07-21T02:45:43.000Z | openstack/orchestration/v1/stack_files.py | wangrui1121/huaweicloud-sdk-python | 240abe00288760115d1791012d4e3c4592d77ad1 | [
"Apache-2.0"
] | 11 | 2019-03-17T13:28:56.000Z | 2020-09-23T23:57:50.000Z | openstack/orchestration/v1/stack_files.py | wangrui1121/huaweicloud-sdk-python | 240abe00288760115d1791012d4e3c4592d77ad1 | [
"Apache-2.0"
] | 47 | 2018-12-19T05:14:25.000Z | 2022-03-19T15:28:30.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 t... | 39.859649 | 108 | 0.705986 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.