hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a1f80a558ba7a87ac89b838f3c88c7881e9ecf2 | 2,594 | py | Python | tcconfig/_capabilities.py | phljcb/tcconfig | 78d6adb35f08201bac589d6b16f22b73d4cb951d | [
"MIT"
] | 1 | 2020-07-17T10:00:59.000Z | 2020-07-17T10:00:59.000Z | tcconfig/_capabilities.py | daifeilail/tcconfig | ef85bc4347daf2367a68aa59aa3407789e3a89bf | [
"MIT"
] | null | null | null | tcconfig/_capabilities.py | daifeilail/tcconfig | ef85bc4347daf2367a68aa59aa3407789e3a89bf | [
"MIT"
] | null | null | null | # encoding: utf-8
"""
.. codeauthor:: Tsuyoshi Hombashi <>
"""
from __future__ import absolute_import, unicode_literals
import errno
import os
import re
import sys
import subprocrunner as spr
from ._common import find_bin_path
from ._logger import logger
def get_required_capabilities(command):
required_capab... | 27.305263 | 100 | 0.677718 |
4a1f80c230fa3e7c278925aca58938fc9ca5b898 | 8,197 | py | Python | lib/gui/groupeditor.py | frontinc-ayau/dsce | 39051752f8f2e75f912903b0b07f7ad0aba680d8 | [
"Apache-2.0"
] | null | null | null | lib/gui/groupeditor.py | frontinc-ayau/dsce | 39051752f8f2e75f912903b0b07f7ad0aba680d8 | [
"Apache-2.0"
] | null | null | null | lib/gui/groupeditor.py | frontinc-ayau/dsce | 39051752f8f2e75f912903b0b07f7ad0aba680d8 | [
"Apache-2.0"
] | null | null | null | # This file is part of the DomainSharedContactsEditor (DSCE) application.
#
# DSCE is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.... | 30.700375 | 93 | 0.570575 |
4a1f827820d56563096365b83cc2f945495efd7d | 1,898 | py | Python | image/download/direct_io.py | hybrid-storage-dev/cinder-fs-111t-hybrid-cherry | 86eb7e8b71c26bc39164fa18a9faa1065e4c1fc1 | [
"Apache-2.0"
] | null | null | null | image/download/direct_io.py | hybrid-storage-dev/cinder-fs-111t-hybrid-cherry | 86eb7e8b71c26bc39164fa18a9faa1065e4c1fc1 | [
"Apache-2.0"
] | null | null | null | image/download/direct_io.py | hybrid-storage-dev/cinder-fs-111t-hybrid-cherry | 86eb7e8b71c26bc39164fa18a9faa1065e4c1fc1 | [
"Apache-2.0"
] | null | null | null | import mmap
import os
import time
import hashlib
from cinder.i18n import _
import logging
LOG = logging.getLogger(__name__)
def write(filename, data, chunk_size=1024 * 1024):
"""
Write the data into a file in the way of DirectIO.
filename : destination file name
data : data to write to file... | 31.114754 | 84 | 0.546365 |
4a1f84fe437b343a01966c6b03a7fac26569377f | 234 | py | Python | Chapter10/example1.py | KrisNguyen135/Advanced-Python-Programming-Second-Edition | e5d473e3efc5f6590028cb3f318e1f4aeb0aadd1 | [
"MIT"
] | null | null | null | Chapter10/example1.py | KrisNguyen135/Advanced-Python-Programming-Second-Edition | e5d473e3efc5f6590028cb3f318e1f4aeb0aadd1 | [
"MIT"
] | null | null | null | Chapter10/example1.py | KrisNguyen135/Advanced-Python-Programming-Second-Edition | e5d473e3efc5f6590028cb3f318e1f4aeb0aadd1 | [
"MIT"
] | null | null | null | import cv2
im = cv2.imread('input/ship.jpg')
cv2.imshow('Test', im)
cv2.waitKey(0) # press any key to move forward here
print(im)
print('Type:', type(im))
print('Shape:', im.shape)
print('Top-left pixel:', im[0, 0])
print('Done.')
| 18 | 51 | 0.662393 |
4a1f85e9c8ba56428e8ee4d452fce326b7b7aa5c | 4,604 | py | Python | examples/simpleflight.py | team-204/uas-control | 0820c95fe22af0507df398c71e61a6ca49a5a490 | [
"MIT"
] | 1 | 2019-03-17T12:33:21.000Z | 2019-03-17T12:33:21.000Z | examples/simpleflight.py | team-204/uas-control | 0820c95fe22af0507df398c71e61a6ca49a5a490 | [
"MIT"
] | 4 | 2018-03-12T03:39:37.000Z | 2018-03-27T22:08:13.000Z | examples/simpleflight.py | team-204/uas-control | 0820c95fe22af0507df398c71e61a6ca49a5a490 | [
"MIT"
] | 5 | 2018-02-27T17:55:20.000Z | 2019-03-09T15:36:07.000Z | """Flies the drone in a "+" shape formation.
Uses the ttyO4 connection (UART4) on the beaglebone. Installing the appropriate
service file (also located in examples) allows for this to start on boot. A 1
minute delay exists in order to allow the user to setup the and secure the
device before attempting flight. You bett... | 41.107143 | 98 | 0.686577 |
4a1f85ef49d034a61725fa8e06aceb5a4bb905d7 | 1,203 | py | Python | apps/message/models/models.py | wangyuhuiever/sanic-tailor | 8be2c855a737803a431e87068bada8489930c425 | [
"MIT"
] | null | null | null | apps/message/models/models.py | wangyuhuiever/sanic-tailor | 8be2c855a737803a431e87068bada8489930c425 | [
"MIT"
] | null | null | null | apps/message/models/models.py | wangyuhuiever/sanic-tailor | 8be2c855a737803a431e87068bada8489930c425 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from utils.orm.db import BaseModel, Base
from sqlalchemy import BigInteger, Column, Boolean, ForeignKey, String, DateTime, select
from sqlalchemy.orm import relationship, backref
class Message(BaseModel):
__tablename__ = 'messages'
content_id = Column(BigInteger(), ForeignKey('message... | 33.416667 | 104 | 0.729842 |
4a1f86aa3ea8ecb2df6dabdc8b3aa202f82a647d | 2,062 | py | Python | Additional_File/14_HypeSquadChanger/hypesquadchanger.py | Tominous/Discord-All-Tools-In-One | a2199b2b02242d6b9c07337960754c5c15feac9b | [
"MIT"
] | 1 | 2021-11-13T18:21:06.000Z | 2021-11-13T18:21:06.000Z | Additional_File/14_HypeSquadChanger/hypesquadchanger.py | FriXeee/Discord-All-Tools-In-One | b88ff7d56a8c0921b7c45539683e9d2f696fe03c | [
"MIT"
] | null | null | null | Additional_File/14_HypeSquadChanger/hypesquadchanger.py | FriXeee/Discord-All-Tools-In-One | b88ff7d56a8c0921b7c45539683e9d2f696fe03c | [
"MIT"
] | 1 | 2021-12-01T18:44:25.000Z | 2021-12-01T18:44:25.000Z | import os
import requests
from colorama import Fore
def hypesquadchanger():
os.system('cls')
hypesquadchangertitle()
print(f"""{y}[{b}#{y}]{w} Which house do you want to be part of: \n\n""")
print(f""" {y}[{w}01{y}]{w} Bravery\n""")
print(f""" {y}[{w}02{y}]{w} Brilliance\... | 44.826087 | 170 | 0.520369 |
4a1f874455e07d1580d6b2dc78c884a54c8ce03c | 6,788 | py | Python | tests/forte/data/entry_data_structures_test.py | yishen734/forte | a061dde4e39a8149a73f015c36641af80066f196 | [
"Apache-2.0"
] | 2 | 2021-01-01T12:07:27.000Z | 2021-09-10T03:57:18.000Z | tests/forte/data/entry_data_structures_test.py | ha-lins/forte | 4594f65f41a8dbfc822573d12fb9af58c37a83a4 | [
"Apache-2.0"
] | null | null | null | tests/forte/data/entry_data_structures_test.py | ha-lins/forte | 4594f65f41a8dbfc822573d12fb9af58c37a83a4 | [
"Apache-2.0"
] | null | null | null | import unittest
from dataclasses import dataclass
from typing import Optional, List, Any, Iterator
from forte.data.data_pack import DataPack
from forte.data.multi_pack import MultiPack
from forte.data.ontology import Generics, MultiPackGeneric, Annotation
from forte.data.ontology.core import FList, FDict, MpPointer, P... | 31.137615 | 77 | 0.670301 |
4a1f876131c31beddcdf2d9d4d545800041f8845 | 1,471 | py | Python | www/mooc8.py | Renzhw/python3 | e83bc40325d78e7a64432a4304a18436cc2d0867 | [
"Apache-2.0"
] | null | null | null | www/mooc8.py | Renzhw/python3 | e83bc40325d78e7a64432a4304a18436cc2d0867 | [
"Apache-2.0"
] | null | null | null | www/mooc8.py | Renzhw/python3 | e83bc40325d78e7a64432a4304a18436cc2d0867 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#jiandan-meizitu,并保存至本地
import requests
import os
import re
a = 2426
print('开始爬取煎蛋网美女图片')
allpicurl=[]
def getHTMLText(url):
try:
headers = { "Accept":"text/html,application/xhtml+xml,application/xml;",
"Accept-Encoding":"gzip",
"Accept-Language... | 21.955224 | 135 | 0.605031 |
4a1f88341dcb229e81a53bf0e8d4a6c973e1c5eb | 1,712 | py | Python | model_utils.py | aghie/hpac | 1182b5f8e8378b4a5506f8f68c19fd4c08120f92 | [
"MIT"
] | 5 | 2019-05-21T22:40:06.000Z | 2021-05-27T11:56:32.000Z | model_utils.py | aghie/hpac | 1182b5f8e8378b4a5506f8f68c19fd4c08120f92 | [
"MIT"
] | null | null | null | model_utils.py | aghie/hpac | 1182b5f8e8378b4a5506f8f68c19fd4c08120f92 | [
"MIT"
] | 1 | 2021-10-04T16:31:35.000Z | 2021-10-04T16:31:35.000Z | import codecs
import numpy as np
import random
from collections import Counter
def _read_embedding_file(file_embedding):
if file_embedding is not None:
external_embedding_fp = open(file_embedding,'r')
line = external_embedding_fp.readline()
esize = len(line.split()) -1
... | 27.174603 | 87 | 0.540304 |
4a1f883e3a704a80ad359546bc41dd9a9781ad0d | 14,470 | py | Python | pyfiles/buy.py | Russell-A/course-design | 1a0c5954e5a7ca7835739ce59baf17771e62b74f | [
"MIT"
] | 4 | 2020-06-07T07:45:43.000Z | 2020-07-01T10:53:47.000Z | pyfiles/buy.py | Russell-A/course-design | 1a0c5954e5a7ca7835739ce59baf17771e62b74f | [
"MIT"
] | null | null | null | pyfiles/buy.py | Russell-A/course-design | 1a0c5954e5a7ca7835739ce59baf17771e62b74f | [
"MIT"
] | 3 | 2020-05-18T13:06:47.000Z | 2020-07-02T13:29:45.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'buy.ui'
#
# Created by: PyQt5 UI code generator 5.13.0
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
import jump_buy as jpb
class Ui_main(object):
def setupUi(self, main):
... | 55.229008 | 114 | 0.709468 |
4a1f88919752fee44e79ac3c7ccab21602a42a5e | 181 | py | Python | galaxy_ml/externals/selene_sdk/predict/__init__.py | bgruening/Galaxy-ML-1 | 47514940c7ac39d6ca1d595b58b5d1311b3f3840 | [
"MIT"
] | null | null | null | galaxy_ml/externals/selene_sdk/predict/__init__.py | bgruening/Galaxy-ML-1 | 47514940c7ac39d6ca1d595b58b5d1311b3f3840 | [
"MIT"
] | null | null | null | galaxy_ml/externals/selene_sdk/predict/__init__.py | bgruening/Galaxy-ML-1 | 47514940c7ac39d6ca1d595b58b5d1311b3f3840 | [
"MIT"
] | null | null | null | """
This module contains classes and methods for making and analyzing
predictions with models that have already been trained.
"""
from . import _common, _variant_effect_prediction
| 25.857143 | 65 | 0.80663 |
4a1f889fa6edb6979b8ef28d63f9eab2fb2896e3 | 628 | py | Python | examples/sklearn_model/start_service.py | geffy/ebonite | 2d85eeca44ac1799e743bafe333887712e325060 | [
"Apache-2.0"
] | 1 | 2019-11-27T14:33:45.000Z | 2019-11-27T14:33:45.000Z | examples/sklearn_model/start_service.py | geffy/ebonite | 2d85eeca44ac1799e743bafe333887712e325060 | [
"Apache-2.0"
] | null | null | null | examples/sklearn_model/start_service.py | geffy/ebonite | 2d85eeca44ac1799e743bafe333887712e325060 | [
"Apache-2.0"
] | null | null | null | """This example shows how you can use ebonite to wrap your sklearn model into flask service"""
from ebonite import Ebonite
from ebonite.runtime import run_model_server
def main():
# create local ebonite client. This client stores metadata and artifacts on local fs.
ebnt = Ebonite.local()
model = ebnt.ge... | 33.052632 | 110 | 0.740446 |
4a1f89a826c124af875e9afda090d136dfe629d4 | 739 | py | Python | jsonclasses/validators/min_validator.py | katrina799/jsonclasses | 7648d2c1dbef8a001975013f24e49dd6421099ba | [
"MIT"
] | null | null | null | jsonclasses/validators/min_validator.py | katrina799/jsonclasses | 7648d2c1dbef8a001975013f24e49dd6421099ba | [
"MIT"
] | null | null | null | jsonclasses/validators/min_validator.py | katrina799/jsonclasses | 7648d2c1dbef8a001975013f24e49dd6421099ba | [
"MIT"
] | null | null | null | """module for min validator."""
from typing import Union
from ..exceptions import ValidationException
from .validator import Validator
from ..contexts import ValidatingContext
class MinValidator(Validator):
"""Min validator validates value against min value."""
def __init__(self, min_value: Union[int, float]... | 33.590909 | 141 | 0.664411 |
4a1f8b8544c98cf17015e9a1dad8f06fe3bfabc1 | 3,663 | py | Python | data/data_analysis/others/clf_models.py | mcpeixoto/Sentrade | 55f65508d6b565b99840c9ce5d757185f5027164 | [
"MIT"
] | 4 | 2020-09-28T18:40:47.000Z | 2021-12-01T08:29:29.000Z | data/data_analysis/others/clf_models.py | ZiyouZhang/Sentrade | c88d20a858de6d05649f99230ca2b44f4c76cd3c | [
"MIT"
] | null | null | null | data/data_analysis/others/clf_models.py | ZiyouZhang/Sentrade | c88d20a858de6d05649f99230ca2b44f4c76cd3c | [
"MIT"
] | 2 | 2021-08-10T22:32:52.000Z | 2022-02-03T21:28:47.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
import joblib
from sklearn.neighbors import KNeighborsClassifier
from sklearn.tree import DecisionTreeClassifier
from sklearn.svm import SVC
from sklearn.model_selection import train_test_split
from ... | 45.7875 | 238 | 0.598963 |
4a1f8ba75d0160522791bcc79393f032ce947dbc | 3,780 | py | Python | blog/settings.py | xuzhiguo2000cn/blog | c74d4c7e10212a036bdda22a6bc26e9c62d6d28f | [
"MIT"
] | null | null | null | blog/settings.py | xuzhiguo2000cn/blog | c74d4c7e10212a036bdda22a6bc26e9c62d6d28f | [
"MIT"
] | null | null | null | blog/settings.py | xuzhiguo2000cn/blog | c74d4c7e10212a036bdda22a6bc26e9c62d6d28f | [
"MIT"
] | null | null | null | """
Django settings for blog project.
Generated by 'django-admin startproject' using Django 3.0.6.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"""
import os
# Bu... | 25.714286 | 91 | 0.669577 |
4a1f8cc7da2f4f0dac53ca8c851571620c85ddbe | 1,839 | py | Python | unittests/testdbuploader.py | rj79/lapmaster | edf12f7685df572f6022b50a808651ef5b0404d7 | [
"BSD-3-Clause"
] | null | null | null | unittests/testdbuploader.py | rj79/lapmaster | edf12f7685df572f6022b50a808651ef5b0404d7 | [
"BSD-3-Clause"
] | null | null | null | unittests/testdbuploader.py | rj79/lapmaster | edf12f7685df572f6022b50a808651ef5b0404d7 | [
"BSD-3-Clause"
] | null | null | null | import unittest
import os
from db_utils import Uploader
TEST_FILE_NAME = '/tmp/db_utils_unittest.csv'
class TestFile:
def __init__(self, filename):
self.FileName = filename
with open(self.FileName, 'w'):
pass
def writeline(self, text):
with open(self.FileName, 'a') as f:
... | 28.734375 | 85 | 0.555193 |
4a1f8cf6284aa9f598ab2734a44cc8daa909a1e8 | 347 | py | Python | tests/test_users.py | tyeum/users | cf319fde3e6c07aea7c0130c201897f11a86b761 | [
"MIT"
] | null | null | null | tests/test_users.py | tyeum/users | cf319fde3e6c07aea7c0130c201897f11a86b761 | [
"MIT"
] | null | null | null | tests/test_users.py | tyeum/users | cf319fde3e6c07aea7c0130c201897f11a86b761 | [
"MIT"
] | 1 | 2018-03-03T00:00:11.000Z | 2018-03-03T00:00:11.000Z | from testinfra.utils.ansible_runner import AnsibleRunner
testinfra_hosts = AnsibleRunner('.molecule/ansible_inventory').get_hosts('all')
def test_users(Command, Ansible, Sudo):
with Sudo():
assert Command('''ssh dummy@localhost sudo whoami''').stdout == 'root'
def test_users_prune(Command):
assert ... | 26.692308 | 79 | 0.731988 |
4a1f8e3119348246bb417da1157779315284cb59 | 7,996 | py | Python | tests/integration/scheduler/test_error.py | sypets/salt | 6ceb5fc73875c37b52408c4bef8deb409d836e8a | [
"Apache-2.0"
] | null | null | null | tests/integration/scheduler/test_error.py | sypets/salt | 6ceb5fc73875c37b52408c4bef8deb409d836e8a | [
"Apache-2.0"
] | null | null | null | tests/integration/scheduler/test_error.py | sypets/salt | 6ceb5fc73875c37b52408c4bef8deb409d836e8a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
import copy
import logging
import os
import dateutil.parser as dateutil_parser
# Import Salt Testing libs
from tests.support.case import ModuleCase
from tests.support.mixins import SaltReturnAssertsMixin
from tests.support.mock impor... | 30.753846 | 112 | 0.571411 |
4a1f8ee067914205060958dfd11e3c93e3704414 | 4,189 | py | Python | ucsmsdk/mometa/fabric/FabricFcSan.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 78 | 2015-11-30T14:10:05.000Z | 2022-02-13T00:29:08.000Z | ucsmsdk/mometa/fabric/FabricFcSan.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 113 | 2015-11-20T09:42:46.000Z | 2022-03-16T16:53:29.000Z | ucsmsdk/mometa/fabric/FabricFcSan.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 86 | 2015-12-12T08:22:18.000Z | 2022-01-23T03:56:34.000Z | """This module contains the general information for FabricFcSan ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class FabricFcSanConsts:
ID_A = "A"
ID_B = "B"
ID_NONE = "NONE"
UPLINK_TRUNKING_DISABLED = "disable... | 61.602941 | 310 | 0.650991 |
4a1f8f4e5b555453fc3513a151d40314efa382c4 | 300 | py | Python | src/main.py | SleepL1/IAssistant | adcc786e7beb3c216dfbeed939606954e47f6da2 | [
"MIT"
] | null | null | null | src/main.py | SleepL1/IAssistant | adcc786e7beb3c216dfbeed939606954e47f6da2 | [
"MIT"
] | null | null | null | src/main.py | SleepL1/IAssistant | adcc786e7beb3c216dfbeed939606954e47f6da2 | [
"MIT"
] | null | null | null | from src.assistant import GenericAssistant
import src.handler.intents as intents
import os
mappings = {'exit-program': intents.stop_assistant}
assistant = GenericAssistant(intent_methods=mappings)
assistant.train_model()
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
while True:
assistant.tick()
| 20 | 53 | 0.79 |
4a1f8f5967114900dcc748e1295ca725229d2d18 | 1,024 | py | Python | cloudshell/cli/service/cli.py | test-gh-org-workflow/probable-garbanzo | c6b8a0dbc573a2a0073b5ab7c8619c4d0baf7088 | [
"Apache-2.0"
] | 4 | 2017-01-31T14:05:19.000Z | 2019-04-10T16:35:44.000Z | cloudshell/cli/service/cli.py | test-gh-org-workflow/probable-garbanzo | c6b8a0dbc573a2a0073b5ab7c8619c4d0baf7088 | [
"Apache-2.0"
] | 89 | 2016-05-25T14:17:38.000Z | 2022-03-17T13:09:59.000Z | cloudshell/cli/service/cli.py | test-gh-org-workflow/probable-garbanzo | c6b8a0dbc573a2a0073b5ab7c8619c4d0baf7088 | [
"Apache-2.0"
] | 6 | 2016-07-21T12:24:10.000Z | 2022-02-21T06:33:18.000Z | import logging
from cloudshell.cli.service.session_pool_context_manager import (
SessionPoolContextManager,
)
from cloudshell.cli.service.session_pool_manager import SessionPoolManager
class CLI(object):
def __init__(self, session_pool=SessionPoolManager()):
self._session_pool = session_pool
def... | 35.310345 | 107 | 0.72168 |
4a1f901b8fa17d5dfc200290f90de0b449e36d39 | 16,492 | py | Python | ross/api_report.py | micanica/ross | 7d827093b20088ec3409786da8403edb8e63eaa9 | [
"MIT"
] | 1 | 2019-09-07T17:10:25.000Z | 2019-09-07T17:10:25.000Z | ross/api_report.py | micanica/ross | 7d827093b20088ec3409786da8403edb8e63eaa9 | [
"MIT"
] | null | null | null | ross/api_report.py | micanica/ross | 7d827093b20088ec3409786da8403edb8e63eaa9 | [
"MIT"
] | null | null | null | import numpy as np
from scipy.signal import argrelextrema
from ross.rotor_assembly import Rotor, rotor_example
import ross as rs
import bokeh.palettes as bp
from bokeh.plotting import figure
from bokeh.models import (
ColumnDataSource,
HoverTool,
Span,
Label,
)
# set bokeh palette of ... | 30.484288 | 96 | 0.473805 |
4a1f9028b007109383474eed542386605c635bdf | 305 | py | Python | semester-6/Python Practice/numpyPractice/program36.py | saranshbht/bsc-codes | 7386c09cc986de9c84947f7dea7db3dc42219a35 | [
"MIT"
] | 3 | 2021-03-22T12:07:14.000Z | 2021-08-30T17:28:23.000Z | semester-6/Python Practice/numpyPractice/program36.py | saranshbht/bsc-codes | 7386c09cc986de9c84947f7dea7db3dc42219a35 | [
"MIT"
] | null | null | null | semester-6/Python Practice/numpyPractice/program36.py | saranshbht/bsc-codes | 7386c09cc986de9c84947f7dea7db3dc42219a35 | [
"MIT"
] | null | null | null | import numpy as np
import os
x = np.arange(10)
y = np.arange(11, 20)
print("Original arrays:")
print(x)
print(y)
np.savez('temp_arra.npz', x=x, y=y)
print("Load arrays from the 'temp_arra.npz' file:")
with np.load('temp_arra.npz') as data:
x2 = data['x']
y2 = data['y']
print(x2)
print(y2) | 21.785714 | 51 | 0.639344 |
4a1f934ee1737c76931aed9736f023f76ae2983e | 1,193 | py | Python | pypy/module/cpyext/test/test_misc.py | olliemath/pypy | 8b873bd0b8bf76075aba3d915c260789f26f5788 | [
"Apache-2.0",
"OpenSSL"
] | 1 | 2021-06-02T23:02:09.000Z | 2021-06-02T23:02:09.000Z | pypy/module/cpyext/test/test_misc.py | olliemath/pypy | 8b873bd0b8bf76075aba3d915c260789f26f5788 | [
"Apache-2.0",
"OpenSSL"
] | 1 | 2021-03-30T18:08:41.000Z | 2021-03-30T18:08:41.000Z | pypy/module/cpyext/test/test_misc.py | olliemath/pypy | 8b873bd0b8bf76075aba3d915c260789f26f5788 | [
"Apache-2.0",
"OpenSSL"
] | 1 | 2022-03-30T11:42:37.000Z | 2022-03-30T11:42:37.000Z | from pypy.module.cpyext.test.test_cpyext import AppTestCpythonExtensionBase
class AppTestMisc(AppTestCpythonExtensionBase):
def test_pyos_inputhook(self):
module = self.import_extension('foo', [
("set_pyos_inputhook", "METH_NOARGS",
'''
PyOS_InputHook = ... | 33.138889 | 75 | 0.537301 |
4a1f93eb7d3fbcaeba411249f0ddf0e40a39a7a1 | 7,112 | py | Python | examples/libtest/DictTest.py | takipsizad/pyjs | 54db0ba6747aca744f9f3c3e985a17e913dfb951 | [
"ECL-2.0",
"Apache-2.0"
] | 739 | 2015-01-01T02:05:11.000Z | 2022-03-30T15:26:16.000Z | examples/libtest/DictTest.py | takipsizad/pyjs | 54db0ba6747aca744f9f3c3e985a17e913dfb951 | [
"ECL-2.0",
"Apache-2.0"
] | 33 | 2015-03-25T23:17:04.000Z | 2021-08-19T08:25:22.000Z | examples/libtest/DictTest.py | takipsizad/pyjs | 54db0ba6747aca744f9f3c3e985a17e913dfb951 | [
"ECL-2.0",
"Apache-2.0"
] | 167 | 2015-01-01T22:27:47.000Z | 2022-03-17T13:29:19.000Z | from UnitTest import UnitTest
class Foo:
pass
class DictTest(UnitTest):
def testStringKeys(self):
d = {'a':1, 'b':2, '3':3, 3:4}
self.assertEqual(d['a'], 1)
self.assertEqual(d['b'], 2)
# XXX: the length here is 3 because we have the same keys for "3"
# and 3
... | 28.222222 | 97 | 0.478346 |
4a1f943f930a0e149c07bebc75a8fd7171a9b872 | 1,277 | py | Python | geometry/test_point_in_polygon.py | nulano/osm-map-viewer | 1a4a4f3473cb83ce714fe3de370c7a0e904a5ea9 | [
"Apache-2.0"
] | null | null | null | geometry/test_point_in_polygon.py | nulano/osm-map-viewer | 1a4a4f3473cb83ce714fe3de370c7a0e904a5ea9 | [
"Apache-2.0"
] | null | null | null | geometry/test_point_in_polygon.py | nulano/osm-map-viewer | 1a4a4f3473cb83ce714fe3de370c7a0e904a5ea9 | [
"Apache-2.0"
] | null | null | null | import geometry
print('testing geometry.point_in_polygon')
test_count = 0
correct_tests = 0
failure = None
with open('testdata/point_in.in', 'r') as f:
count = int(f.readline())
for i in range(count):
node_count = int(f.readline())
polygon = []
for j in range(node_count):
x,... | 35.472222 | 93 | 0.550509 |
4a1f94ff3334e29ff50278a5f2cb11491735bd4c | 53,262 | py | Python | tensorflow/python/tpu/tpu_embedding.py | rvinas/tensorflow | 75d8b63cc2253a4e6c413cbd0a4c9d2d87c0a18b | [
"Apache-2.0"
] | 2 | 2019-05-08T10:02:57.000Z | 2019-05-08T10:02:59.000Z | tensorflow/python/tpu/tpu_embedding.py | rvinas/tensorflow | 75d8b63cc2253a4e6c413cbd0a4c9d2d87c0a18b | [
"Apache-2.0"
] | null | null | null | tensorflow/python/tpu/tpu_embedding.py | rvinas/tensorflow | 75d8b63cc2253a4e6c413cbd0a4c9d2d87c0a18b | [
"Apache-2.0"
] | null | null | null | # 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.503422 | 97 | 0.689854 |
4a1f958a5aea262fd68456ecfaf022d37b53f832 | 712 | py | Python | gym/mountaincar_experiment.py | watate/spinningup | f05f04f6319e3972212448ccec080d4cac426884 | [
"MIT"
] | null | null | null | gym/mountaincar_experiment.py | watate/spinningup | f05f04f6319e3972212448ccec080d4cac426884 | [
"MIT"
] | null | null | null | gym/mountaincar_experiment.py | watate/spinningup | f05f04f6319e3972212448ccec080d4cac426884 | [
"MIT"
] | null | null | null | #MountainCarContinuous-v0
from spinup.utils.run_utils import ExperimentGrid
from spinup import td3
import tensorflow as tf
if __name__ == '__main__':
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--cpu', type=int, default=4)
parser.add_argument('--num_runs', type=int, default... | 33.904762 | 61 | 0.672753 |
4a1f967811f2c3083c556c3b73ae13c7505f139e | 2,652 | py | Python | fireworks_thinking.py | Bustedblah/fireworks | b7d8974a965a866e3e4b97f31124c11b14cb71e8 | [
"MIT"
] | 1 | 2020-05-14T01:23:20.000Z | 2020-05-14T01:23:20.000Z | fireworks_thinking.py | Bustedblah/fireworks | b7d8974a965a866e3e4b97f31124c11b14cb71e8 | [
"MIT"
] | null | null | null | fireworks_thinking.py | Bustedblah/fireworks | b7d8974a965a866e3e4b97f31124c11b14cb71e8 | [
"MIT"
] | null | null | null | #!/opt/local/bin/python
visible_cards_in_hands = []
visible_cards_in_discard_deck = []
top_cards_on_board = []
player_hand_knowledge = []
# Start
# Figure out who's turn it is
q = 'MATCH (t:Token {name: "Player_Turn" }), (p:Player) WHERE (t)-[:IS]->(p) RETURN p.name'
results = db.query(q, returns=(str))
active_play... | 34.441558 | 143 | 0.660633 |
4a1f96991975823af2247e2359a8f815952a3e24 | 2,438 | py | Python | RaspCode/motors/movement.py | TamuAlex/RC_TankBot | 58da179f89c97d69a594cedc56a3300c99a00dd0 | [
"Apache-2.0"
] | null | null | null | RaspCode/motors/movement.py | TamuAlex/RC_TankBot | 58da179f89c97d69a594cedc56a3300c99a00dd0 | [
"Apache-2.0"
] | 23 | 2021-11-04T10:50:45.000Z | 2021-12-13T09:28:33.000Z | RaspCode/motors/movement.py | TamuAlex/RC_TankBot | 58da179f89c97d69a594cedc56a3300c99a00dd0 | [
"Apache-2.0"
] | null | null | null | import motors
'''
Authors:
Alejandro Ortega Martinez: alejandro.ormar@gmail.com
Juan Luis Garcia Gonzalez: jgg1009@alu.ubu.es
'''
'''
Wrap class to define functions for moving the motors,
given the desired direction
It uses the motors library to iteract with the motors
at lower level
'''
clas... | 25.663158 | 60 | 0.611157 |
4a1f96b05c411192ba7f31908baaeca076432642 | 1,652 | py | Python | src/common/dynamiccode/dynamiccode.py | catarinaacsilva/security_auction | f0b76ad47ca8cc211fd90712c2090b8e5ff934a5 | [
"MIT"
] | null | null | null | src/common/dynamiccode/dynamiccode.py | catarinaacsilva/security_auction | f0b76ad47ca8cc211fd90712c2090b8e5ff934a5 | [
"MIT"
] | 1 | 2021-06-01T23:30:44.000Z | 2021-06-01T23:30:44.000Z | src/common/dynamiccode/dynamiccode.py | catarinaacsilva/security_auction | f0b76ad47ca8cc211fd90712c2090b8e5ff934a5 | [
"MIT"
] | null | null | null | import sys
import logging
from RestrictedPython import compile_restricted
from RestrictedPython import safe_builtins
logging.basicConfig(level=logging.DEBUG, format='%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger('DC')
logger.setLevel(logging.DEBUG)
class DynamicCode:
@static... | 30.036364 | 103 | 0.592615 |
4a1f96cf491ede58daa20b1d366630a1f73d6d30 | 2,568 | py | Python | data/cirq_new/cirq_program/startCirq_noisy933.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_noisy933.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/cirq_new/cirq_program/startCirq_noisy933.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=4
# total number=24
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
def make_circuit(n: int, input_qubit):
c = cirq.Ci... | 35.178082 | 77 | 0.689642 |
4a1f986dc3ccae0e464c9a708c380174afd1b538 | 43,102 | py | Python | tests/test_views.py | conformist-mw/aldryn-accounts | e4bd60354547945a8e80cc692c0080582dd0d846 | [
"MIT"
] | null | null | null | tests/test_views.py | conformist-mw/aldryn-accounts | e4bd60354547945a8e80cc692c0080582dd0d846 | [
"MIT"
] | 1 | 2019-05-29T03:49:39.000Z | 2019-05-29T09:40:04.000Z | tests/test_views.py | conformist-mw/aldryn-accounts | e4bd60354547945a8e80cc692c0080582dd0d846 | [
"MIT"
] | 6 | 2019-03-05T15:19:26.000Z | 2021-12-16T20:50:21.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
from django.contrib.auth.models import User
from django.contrib.auth import SESSION_KEY
from django.contrib.messages import get_messages
from django.core import mail
from django.test import override_settings
from django.core.urlresolvers... | 40.509398 | 80 | 0.678553 |
4a1f98b51a6a418192f10f5bdd2c9cb22302af3e | 3,362 | py | Python | apis/project_api/project_api/test/test_disagg.py | ucgmsim/gmhazard | d3d90b4c94b3d9605597a3efeccc8523a1e50c0e | [
"MIT"
] | null | null | null | apis/project_api/project_api/test/test_disagg.py | ucgmsim/gmhazard | d3d90b4c94b3d9605597a3efeccc8523a1e50c0e | [
"MIT"
] | 8 | 2021-10-13T02:33:23.000Z | 2022-03-29T21:01:08.000Z | apis/project_api/project_api/test/test_disagg.py | ucgmsim/gmhazard | d3d90b4c94b3d9605597a3efeccc8523a1e50c0e | [
"MIT"
] | null | null | null | import api_utils.test as tu
from project_api import constants
# Disagg Tests
def test_get_disagg_rps(config):
""" Tests the successful get request of a Disagg RP's"""
response = tu.send_test_request(
constants.PROJECT_DISAGG_RPS_ENDPOINT,
{"project_id": config["general"]["project_id"]},
... | 32.326923 | 95 | 0.586853 |
4a1f9995000d679e7011c48c0022acdcb11b5620 | 11,166 | py | Python | Lib/site-packages/numarray/session.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | Lib/site-packages/numarray/session.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | Lib/site-packages/numarray/session.py | raychorn/svn_Python-2.5.1 | 425005b1b489ba44ec0bb989e077297e8953d9be | [
"PSF-2.0"
] | null | null | null | """ This module contains a "session saver" which saves the state of a
numarray session to a file. At a later time, a different Python
process can be started and the saved session can be restored using
load().
The session saver relies on the Python pickle protocol to save and
restore objects. Objects which are not th... | 31.189944 | 87 | 0.612395 |
4a1f99e898a3f59102508fb5718f0ee51613eaee | 1,978 | py | Python | CoreModules/XMLConfigReader.py | QIB-Sheffield/WEASEL | e4dad345fd6f347cfac990708252844a7cbcd025 | [
"Apache-2.0"
] | 2 | 2021-02-10T09:07:15.000Z | 2021-03-16T17:05:24.000Z | CoreModules/XMLConfigReader.py | QIB-Sheffield/WEASEL | e4dad345fd6f347cfac990708252844a7cbcd025 | [
"Apache-2.0"
] | 102 | 2021-01-20T11:14:21.000Z | 2021-12-12T17:34:42.000Z | CoreModules/XMLConfigReader.py | QIB-Sheffield/WEASEL | e4dad345fd6f347cfac990708252844a7cbcd025 | [
"Apache-2.0"
] | 1 | 2021-01-29T09:28:05.000Z | 2021-01-29T09:28:05.000Z | """
Class for reading the Weasel XML configuration file `config.xml`.
"""
import os, sys
import xml.etree.cElementTree as ET
import logging
logger = logging.getLogger(__name__)
class XMLConfigReader:
def __init__(self):
try:
self.hasXMLFileParsedOK = True
self.fullFilePath = os.pa... | 35.321429 | 97 | 0.595551 |
4a1f9b408f068d4c3cf9bdc2d95dc0b3cc3e0496 | 541 | py | Python | Model Evaluation/creating-baseline-classification-model.py | WyckliffeAluga/data-chronicles | 5219fe9cdbafb9fd7be88727483952c4c13f2790 | [
"MIT"
] | null | null | null | Model Evaluation/creating-baseline-classification-model.py | WyckliffeAluga/data-chronicles | 5219fe9cdbafb9fd7be88727483952c4c13f2790 | [
"MIT"
] | null | null | null | Model Evaluation/creating-baseline-classification-model.py | WyckliffeAluga/data-chronicles | 5219fe9cdbafb9fd7be88727483952c4c13f2790 | [
"MIT"
] | 1 | 2021-02-09T12:22:55.000Z | 2021-02-09T12:22:55.000Z |
# load libraries
from sklearn.datasets import load_iris
from sklearn.dummy import DummyClassifier
from sklearn.model_selection import train_test_split
# load data
iris = load_iris()
# create features and target
x , y = iris.data , iris.target
# split data into training and test set
x_train, x_test, y_train, y_test ... | 22.541667 | 72 | 0.781885 |
4a1f9be63440bb5afd887e139848fb34034767a7 | 2,335 | py | Python | test/test_notification_api.py | silencewwt/bitmex-swagger-client | 01403685eeb12eb27d53a0310d3bc7541793aa0f | [
"MIT"
] | 1 | 2018-08-04T15:05:43.000Z | 2018-08-04T15:05:43.000Z | test/test_notification_api.py | silencewwt/bitmex-swagger | 01403685eeb12eb27d53a0310d3bc7541793aa0f | [
"MIT"
] | null | null | null | test/test_notification_api.py | silencewwt/bitmex-swagger | 01403685eeb12eb27d53a0310d3bc7541793aa0f | [
"MIT"
] | null | null | null | # coding: utf-8
"""
BitMEX API
## REST API for the BitMEX Trading Platform [View Changelog](/app/apiChangelog) ---- #### Getting Started Base URI: [https://www.bitmex.com/api/v1](/api/v1) ##### Fetching Data All REST endpoints are documented below. You can try out any query right from this interface. M... | 55.595238 | 1,509 | 0.722056 |
4a1f9f58960abe6a839b4c15e8ef89db2244a5da | 2,898 | py | Python | src/layout/cards/settings/callbacks/colour_selection.py | rayanht/UK-Biobank-Visualisation | d4eb00f194b6452cbd2164d87b433e71ab1783f6 | [
"MIT"
] | 3 | 2021-03-03T20:11:04.000Z | 2021-12-20T12:38:47.000Z | src/layout/cards/settings/callbacks/colour_selection.py | rayanht/UK-Biobank-Visualisation | d4eb00f194b6452cbd2164d87b433e71ab1783f6 | [
"MIT"
] | 16 | 2020-10-28T16:08:47.000Z | 2022-02-13T23:46:09.000Z | src/layout/cards/settings/callbacks/colour_selection.py | rayanht/UK-Biobank-Visualisation | d4eb00f194b6452cbd2164d87b433e71ab1783f6 | [
"MIT"
] | 1 | 2021-01-07T01:43:11.000Z | 2021-01-07T01:43:11.000Z | import dash_html_components as html
from dash.dependencies import Input, Output, State
from src.dash_app import app
from src.graph_data import get_field_type
from src.tree.node_utils import get_field_id, get_option
from src.value_type import ValueType
from .variable_selection import (
get_dropdown_id as get_var_dr... | 34.5 | 85 | 0.669427 |
4a1fa001b5ad304f86b3cbcb717ac1066dbc491f | 3,647 | py | Python | transcode/config/ebml/configelement.py | shersonb/python-transcode | db42e82f019ef4c3b7f59f34587576205e19eb96 | [
"MIT"
] | 1 | 2020-06-25T01:00:15.000Z | 2020-06-25T01:00:15.000Z | transcode/config/ebml/configelement.py | shersonb/python-transcode | db42e82f019ef4c3b7f59f34587576205e19eb96 | [
"MIT"
] | null | null | null | transcode/config/ebml/configelement.py | shersonb/python-transcode | db42e82f019ef4c3b7f59f34587576205e19eb96 | [
"MIT"
] | null | null | null | from ebml.base import EBMLProperty
import ebml.serialization
import pathlib
try:
import lzma
except ImportError:
lzma = None
try:
import bz2
except ImportError:
bz2 = None
try:
import gzip
except ImportError:
gzip = None
from ..obj import Config
from .inputfiles import InputFiles
from .fi... | 30.140496 | 77 | 0.609542 |
4a1fa02186c4c752a3a5ead7c3107b0c801167aa | 1,214 | py | Python | setup.py | faust-streaming/python-rocksdb | e6bf958000e84c684e0625d45207b1003273acc3 | [
"BSD-3-Clause"
] | 7 | 2021-02-01T18:54:20.000Z | 2022-02-01T15:25:21.000Z | setup.py | hipacloud/python-rocksdb | 9190e3edb4818bec020b33a435410fd953b31fb4 | [
"BSD-3-Clause"
] | 2 | 2021-01-22T01:26:17.000Z | 2021-02-06T17:43:29.000Z | setup.py | hipacloud/python-rocksdb | 9190e3edb4818bec020b33a435410fd953b31fb4 | [
"BSD-3-Clause"
] | 1 | 2021-08-29T14:10:00.000Z | 2021-08-29T14:10:00.000Z | import platform
from setuptools import setup
from setuptools import find_packages
from setuptools import Extension
extra_compile_args = [
'-std=c++11',
'-O3',
'-Wall',
'-Wextra',
'-Wconversion',
'-fno-strict-aliasing',
'-fno-rtti',
]
if platform.system() == 'Darwin':
extra_compile_arg... | 25.291667 | 73 | 0.622735 |
4a1fa0b6e2536b0b621ce73d17dcf02373276928 | 49,078 | py | Python | tools/eval_rcnn_afusg.py | jjn037/FusionAttack | 25646543b3008bd7f92760c8b0e6645450e79abf | [
"MIT"
] | null | null | null | tools/eval_rcnn_afusg.py | jjn037/FusionAttack | 25646543b3008bd7f92760c8b0e6645450e79abf | [
"MIT"
] | null | null | null | tools/eval_rcnn_afusg.py | jjn037/FusionAttack | 25646543b3008bd7f92760c8b0e6645450e79abf | [
"MIT"
] | null | null | null | import _init_path
import os
import numpy as np
import torch
from torch.utils.data import DataLoader
import torch.nn.functional as F
from lib.net.point_rcnn import PointRCNN
from lib.net.GAN_model import Generator_fusimg, Generator_fuspts
from lib.net.train_functions import reduce_sum
from lib.datasets.kitti_rcnn_datase... | 46.78551 | 152 | 0.61875 |
4a1fa132fe0c2a60e27d81b52301195cfa6bb332 | 549 | py | Python | tests/test_rrt_star_reeds_shepp.py | yuokamoto/PythonRobotics | 754256d15e074f6091bc6c9b7e8e6499df865fb6 | [
"MIT"
] | 38 | 2019-12-08T12:26:04.000Z | 2022-03-06T11:29:08.000Z | tests/test_rrt_star_reeds_shepp.py | Kashyap95/PythonRobotics | ac066ee6049adc6315a859127344ee5de1e48b30 | [
"MIT"
] | null | null | null | tests/test_rrt_star_reeds_shepp.py | Kashyap95/PythonRobotics | ac066ee6049adc6315a859127344ee5de1e48b30 | [
"MIT"
] | 15 | 2020-02-12T15:57:28.000Z | 2021-08-28T07:39:18.000Z | from unittest import TestCase
import sys
import os
sys.path.append(os.path.dirname(os.path.abspath(__file__))
+ "/../PathPlanning/RRTStarReedsShepp/")
sys.path.append(os.path.dirname(os.path.abspath(__file__))
+ "/../PathPlanning/ReedsSheppPath/")
try:
import rrt_star_reeds_shepp a... | 18.931034 | 58 | 0.652095 |
4a1fa13ee8dfc55fc6958a50a95b410e64e78649 | 17,070 | py | Python | saleor/graphql/checkout/types.py | Herbafill-HFG/saleor | 8206e407407cb711a669a28d0fcb03522e98b755 | [
"CC-BY-4.0"
] | 1 | 2022-02-19T13:27:40.000Z | 2022-02-19T13:27:40.000Z | saleor/graphql/checkout/types.py | Herbafill-HFG/saleor | 8206e407407cb711a669a28d0fcb03522e98b755 | [
"CC-BY-4.0"
] | 1 | 2019-04-05T17:22:52.000Z | 2019-04-05T17:22:52.000Z | saleor/graphql/checkout/types.py | Herbafill-HFG/saleor | 8206e407407cb711a669a28d0fcb03522e98b755 | [
"CC-BY-4.0"
] | 2 | 2021-12-03T16:59:37.000Z | 2022-02-19T13:05:42.000Z | import graphene
from promise import Promise
from ...checkout import calculations, models
from ...checkout.utils import get_valid_shipping_methods_for_checkout
from ...core.exceptions import PermissionDenied
from ...core.permissions import AccountPermissions
from ...core.taxes import zero_taxed_money
from ..account.dat... | 37.516484 | 88 | 0.625425 |
4a1fa18953a2c9c9db15ba5a4ce17065fb8457ef | 1,542 | py | Python | tolqc-api/app/main/resource/__init__.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | tolqc-api/app/main/resource/__init__.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | tolqc-api/app/main/resource/__init__.py | sanger-tol/tolqc | 6ef535a0eb0028c5d9270ff18d95d38c6656cbdd | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Genome Research Ltd.
#
# SPDX-License-Identifier: MIT
from .sex import api_sex # noqa
from .allocation import api_allocation # noqa
from .centre import api_centre # noqa
from .environment import api_environment # noqa
from .library_type import api_library_type # noqa
from .library import... | 41.675676 | 63 | 0.821012 |
4a1fa2c07d1bf8c418115f0c8314dec5b1080f6c | 1,980 | py | Python | pygeneratedata/dim_afd_militia.py | yeyuan-acmis2019/yy-paper2022 | d72e5843ef8253bfab18fac7ed1ea954ff40ad02 | [
"Apache-2.0"
] | null | null | null | pygeneratedata/dim_afd_militia.py | yeyuan-acmis2019/yy-paper2022 | d72e5843ef8253bfab18fac7ed1ea954ff40ad02 | [
"Apache-2.0"
] | null | null | null | pygeneratedata/dim_afd_militia.py | yeyuan-acmis2019/yy-paper2022 | d72e5843ef8253bfab18fac7ed1ea954ff40ad02 | [
"Apache-2.0"
] | null | null | null | from itertools import chain
import pymysql
from faker import Faker
import random
import datetime
from dim_ova_veteran import search_people
fake = Faker('zh_CN')
# 连接MySQL数据库
mysql_conn = pymysql.connect(host="192.168.101.105", user="root", password="123456", db="dim", port=3306,
charset='... | 34.137931 | 108 | 0.687879 |
4a1fa2e32d0698c25e52bdd18741d179b91acd2c | 1,005 | py | Python | configs/textdet/bsnet_fcos/bsnet_fcos_test_cp8_CA_new.py | zzx0226/mmocr | 50354895244339a392b4f1af5a35963883923cca | [
"Apache-2.0"
] | null | null | null | configs/textdet/bsnet_fcos/bsnet_fcos_test_cp8_CA_new.py | zzx0226/mmocr | 50354895244339a392b4f1af5a35963883923cca | [
"Apache-2.0"
] | null | null | null | configs/textdet/bsnet_fcos/bsnet_fcos_test_cp8_CA_new.py | zzx0226/mmocr | 50354895244339a392b4f1af5a35963883923cca | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../../_base_/runtime_10e.py', '../../_base_/schedules/schedule_sgd_1500e.py',
'../../_base_/det_models/bsnet_fcos_r50dcnv2_fpn_cp8_ca_new.py', '../../_base_/det_datasets/ctw1500.py',
'../../_base_/det_pipelines/bsnet_fcos_pipeline_cp8.py'
]
train_list = {{_base_.train_list}}
test_list = {{_base... | 45.681818 | 108 | 0.725373 |
4a1fa4149a77e3848b991cc7fefb1bff2877240b | 6,109 | py | Python | official/nlp/projects/bigbird/recomputing_dropout.py | hjkim-haga/TF-OD-API | 22ac477ff4dfb93fe7a32c94b5f0b1e74330902b | [
"Apache-2.0"
] | 1 | 2021-05-22T12:50:50.000Z | 2021-05-22T12:50:50.000Z | official/nlp/projects/bigbird/recomputing_dropout.py | DemonDamon/mask-detection-based-on-tf2odapi | 192ae544169c1230c21141c033800aa1bd94e9b6 | [
"MIT"
] | null | null | null | official/nlp/projects/bigbird/recomputing_dropout.py | DemonDamon/mask-detection-based-on-tf2odapi | 192ae544169c1230c21141c033800aa1bd94e9b6 | [
"MIT"
] | null | null | null | # Copyright 2021 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... | 38.18125 | 98 | 0.678998 |
4a1fa50fe59043d8a82b775dbbd1541150ceacb4 | 511 | py | Python | exams/migrations/0019_examauthorization_exam_coupon.py | Wassaf-Shahzad/micromasters | b1340a8c233499b1d8d22872a6bc1fe7f49fd323 | [
"BSD-3-Clause"
] | 32 | 2016-03-25T01:03:13.000Z | 2022-01-15T19:35:42.000Z | exams/migrations/0019_examauthorization_exam_coupon.py | Wassaf-Shahzad/micromasters | b1340a8c233499b1d8d22872a6bc1fe7f49fd323 | [
"BSD-3-Clause"
] | 4,858 | 2016-03-03T13:48:30.000Z | 2022-03-29T22:09:51.000Z | exams/migrations/0019_examauthorization_exam_coupon.py | umarmughal824/micromasters | ea92d3bcea9be4601150fc497302ddacc1161622 | [
"BSD-3-Clause"
] | 20 | 2016-08-18T22:07:44.000Z | 2021-11-15T13:35:35.000Z | # Generated by Django 2.2.13 on 2021-02-25 17:53
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('exams', '0018_examruncoupon'),
]
operations = [
migrations.AddField(
model_name='examauthoriza... | 25.55 | 134 | 0.655577 |
4a1fa549de03ba7ad96a8ff2b17153a35182e0ba | 1,918 | py | Python | pipelines/PipelineScRnaseq.py | snsansom/xcell | 910e6c960b6f2cddca05c4d8c49c7d664eb171e6 | [
"MIT"
] | 2 | 2015-11-17T16:36:13.000Z | 2016-07-04T11:22:01.000Z | pipelines/PipelineScRnaseq.py | snsansom/xcell | 910e6c960b6f2cddca05c4d8c49c7d664eb171e6 | [
"MIT"
] | 7 | 2018-05-24T14:10:40.000Z | 2018-12-14T21:01:35.000Z | pipelines/PipelineScRnaseq.py | snsansom/xcell | 910e6c960b6f2cddca05c4d8c49c7d664eb171e6 | [
"MIT"
] | 2 | 2016-10-24T17:47:49.000Z | 2017-09-20T07:53:14.000Z | import sys
import os
import re
import sqlite3
import pandas as pd
import numpy as np
from cgatcore import experiment as E
from cgatcore import pipeline as P
# load options from the config file
PARAMS = P.get_parameters(
["%s/pipeline.yml" % os.path.splitext(__file__)[0],
"../pipeline.yml",
"pipeline.ym... | 30.935484 | 79 | 0.464546 |
4a1fa5a6dd7ea4421c09cc22f423dd244919b848 | 5,782 | py | Python | meta_mb/trainers/svg_trainer.py | iclavera/meta-mb | a1204e573c1415161129403cfb287bf120488fd0 | [
"MIT"
] | 4 | 2021-01-07T08:22:51.000Z | 2021-12-27T10:53:14.000Z | meta_mb/trainers/svg_trainer.py | iclavera/meta-mb | a1204e573c1415161129403cfb287bf120488fd0 | [
"MIT"
] | null | null | null | meta_mb/trainers/svg_trainer.py | iclavera/meta-mb | a1204e573c1415161129403cfb287bf120488fd0 | [
"MIT"
] | null | null | null | import tensorflow as tf
import time
from meta_mb.logger import logger
class Trainer(object):
"""
Performs steps for MAML
Args:
algo (Algo) :
env (Env) :
sampler (Sampler) :
sample_processor (SampleProcessor) :
baseline (Baseline) :
policy (Policy) :
... | 38.805369 | 113 | 0.539087 |
4a1fa5c33b9f09b51527bc9c65baa511c7774358 | 15,408 | py | Python | bootstrap/p1.5.0/src/cluster_info.py | apurwaj2/df-on-k8s | 1aecb0bc293d008c5a2384df32ad434bfcc51caa | [
"Apache-2.0"
] | null | null | null | bootstrap/p1.5.0/src/cluster_info.py | apurwaj2/df-on-k8s | 1aecb0bc293d008c5a2384df32ad434bfcc51caa | [
"Apache-2.0"
] | null | null | null | bootstrap/p1.5.0/src/cluster_info.py | apurwaj2/df-on-k8s | 1aecb0bc293d008c5a2384df32ad434bfcc51caa | [
"Apache-2.0"
] | null | null | null | import json
import os
import sys
import time
from common.mapr_exceptions.ex import MapRException
from common.mapr_logger.log import Log
from common.os_command import OSCommand
class ClusterInfo(object):
SYSTEM = "hpe-system"
SPARK = "hpe-spark-operator"
SPARK_OLD = "spark-operator"
LDAP = "hpe-ldap"
... | 51.704698 | 217 | 0.64486 |
4a1fa5f967656d92eaad346a341f2827035556c7 | 10,728 | py | Python | configs/stylegan2_finetune_config.py | bytedance/Hammer | 388ed20b3d9b34f33f5357d75f8fe5d726782ec8 | [
"MIT"
] | 97 | 2022-02-08T09:00:57.000Z | 2022-03-23T05:33:35.000Z | configs/stylegan2_finetune_config.py | bytedance/Hammer | 388ed20b3d9b34f33f5357d75f8fe5d726782ec8 | [
"MIT"
] | null | null | null | configs/stylegan2_finetune_config.py | bytedance/Hammer | 388ed20b3d9b34f33f5357d75f8fe5d726782ec8 | [
"MIT"
] | 7 | 2022-02-08T15:13:02.000Z | 2022-03-19T19:11:13.000Z | # python3.7
"""Configuration for fine-tuning StyleGAN2."""
from .stylegan2_config import StyleGAN2Config
__all__ = ['StyleGAN2FineTuneConfig']
class StyleGAN2FineTuneConfig(StyleGAN2Config):
"""Defines the configuration for fine-tuning StyleGAN2."""
name = 'stylegan2_finetune'
hint = 'Fine-tune a Style... | 48.324324 | 80 | 0.634135 |
4a1fa72f73e44c4d8ffcf930925bac99abff36b6 | 17,417 | py | Python | dev/Tools/build/waf-1.7.13/waflib/Configure.py | CJoriginal/cjlumberyard | 2e3184a7d8e59ba05e5707371b8cb6fe40b0ca60 | [
"AML"
] | 2 | 2019-05-13T22:21:28.000Z | 2019-05-24T22:52:01.000Z | dev/Tools/build/waf-1.7.13/waflib/Configure.py | CJoriginal/cjlumberyard | 2e3184a7d8e59ba05e5707371b8cb6fe40b0ca60 | [
"AML"
] | null | null | null | dev/Tools/build/waf-1.7.13/waflib/Configure.py | CJoriginal/cjlumberyard | 2e3184a7d8e59ba05e5707371b8cb6fe40b0ca60 | [
"AML"
] | 5 | 2020-08-27T20:44:18.000Z | 2021-08-21T22:54:11.000Z | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2005-2010 (ita)
"""
Configuration system
A :py:class:`waflib.Configure.ConfigurationContext` instance is created when ``waf configure`` is called, it is used to:
* create data dictionaries (ConfigSet instances)
* store the list of modules to import
* hold config... | 28.980033 | 145 | 0.684733 |
4a1fa7cdeab6acca5a17d509a16ae0f01e96a9d2 | 7,206 | py | Python | backend/test_mobile_app_4_28824/settings.py | crowdbotics-apps/test-mobile-app-4-28824 | 05ef5ad9d4b3d54106fda9f874277abd25f83dcf | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/test_mobile_app_4_28824/settings.py | crowdbotics-apps/test-mobile-app-4-28824 | 05ef5ad9d4b3d54106fda9f874277abd25f83dcf | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/test_mobile_app_4_28824/settings.py | crowdbotics-apps/test-mobile-app-4-28824 | 05ef5ad9d4b3d54106fda9f874277abd25f83dcf | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
Django settings for test_mobile_app_4_28824 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"... | 29.056452 | 112 | 0.731474 |
4a1fa8285669d5820828e9a41add44de8202a9ed | 2,616 | py | Python | raiden_contracts/tests/fixtures/contracts.py | weilbith/raiden-contracts | 91dc2e5aae2f36916c88ed3c719d93e29da69b78 | [
"MIT"
] | 49 | 2018-03-18T07:25:46.000Z | 2022-03-11T14:07:18.000Z | raiden_contracts/tests/fixtures/contracts.py | weilbith/raiden-contracts | 91dc2e5aae2f36916c88ed3c719d93e29da69b78 | [
"MIT"
] | 1,378 | 2018-03-13T03:41:06.000Z | 2022-03-28T23:19:12.000Z | raiden_contracts/tests/fixtures/contracts.py | weilbith/raiden-contracts | 91dc2e5aae2f36916c88ed3c719d93e29da69b78 | [
"MIT"
] | 55 | 2018-03-21T14:37:27.000Z | 2022-02-07T10:31:59.000Z | import logging
from typing import Any, Callable, Tuple
import pytest
from eth_tester.exceptions import TransactionFailed
from eth_typing import HexAddress
from web3 import Web3
from web3.contract import Contract
from raiden_contracts.contract_manager import ContractManager
from raiden_contracts.tests.utils.blockchain... | 29.727273 | 99 | 0.69419 |
4a1fa864d82ec0c699213a2f0bfa000a658bdc79 | 76,882 | py | Python | Lib/fontTools/ufoLib/__init__.py | twardoch/fonttools-py27 | 75b852d3f59fc0d03c6e78581530597d4c6368a1 | [
"MIT",
"BSD-3-Clause"
] | 240 | 2021-01-11T14:49:24.000Z | 2022-03-29T22:33:49.000Z | Lib/fontTools/ufoLib/__init__.py | twardoch/fonttools-py27 | 75b852d3f59fc0d03c6e78581530597d4c6368a1 | [
"MIT",
"BSD-3-Clause"
] | 77 | 2021-01-12T20:23:30.000Z | 2022-03-28T12:14:34.000Z | Lib/fontTools/ufoLib/__init__.py | twardoch/fonttools-py27 | 75b852d3f59fc0d03c6e78581530597d4c6368a1 | [
"MIT",
"BSD-3-Clause"
] | 28 | 2021-01-17T05:44:11.000Z | 2022-01-11T19:58:46.000Z | from __future__ import absolute_import, unicode_literals
import sys
import os
from copy import deepcopy
import logging
import zipfile
import enum
from collections import OrderedDict
import fs
import fs.base
import fs.subfs
import fs.errors
import fs.copy
import fs.osfs
import fs.zipfs
import fs.tempfs
import fs.tools
f... | 34.851315 | 193 | 0.733032 |
4a1fa94cecbc7a9a7f261cd1aa95ce7b0ee5507f | 541 | py | Python | eyed/api/common/response.py | ThousandMileEye/Eye | b0eca371fed5e01353ebddf7e4c400927decf0d2 | [
"Apache-2.0"
] | null | null | null | eyed/api/common/response.py | ThousandMileEye/Eye | b0eca371fed5e01353ebddf7e4c400927decf0d2 | [
"Apache-2.0"
] | 55 | 2017-12-21T15:20:36.000Z | 2019-01-20T02:49:41.000Z | eyed/api/common/response.py | ThousandMileEye/Eye | b0eca371fed5e01353ebddf7e4c400927decf0d2 | [
"Apache-2.0"
] | 3 | 2018-05-18T09:02:36.000Z | 2019-12-29T10:27:44.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pyramid.httpexceptions import HTTPFound, HTTPOk
from pyramid.httpexceptions import HTTPNotFound, HTTPBadRequest, HTTPRequestTimeout
#
# リクエスト成功時の処理
#
def OK(value = None):
return HTTPOk(json_body = {
'ok' : True,
'data' : value,
}, headers = [{
'Access-Contro... | 18.033333 | 83 | 0.64695 |
4a1fa9d9058e6215fc09c3c55b9ba8a19b4a5058 | 172 | py | Python | qlib/rl/utils/__init__.py | SunsetWolf/qlib | 89972f6c6f9fa629b4f74093d4ba1e93c9f7a5e5 | [
"MIT"
] | 1 | 2021-12-14T13:48:38.000Z | 2021-12-14T13:48:38.000Z | qlib/rl/utils/__init__.py | SunsetWolf/qlib | 89972f6c6f9fa629b4f74093d4ba1e93c9f7a5e5 | [
"MIT"
] | null | null | null | qlib/rl/utils/__init__.py | SunsetWolf/qlib | 89972f6c6f9fa629b4f74093d4ba1e93c9f7a5e5 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
from .data_queue import *
from .env_wrapper import *
from .finite_env import *
from .log import *
| 21.5 | 38 | 0.755814 |
4a1fa9e9d69e139cc63a7a6370a2bd0c36650de2 | 4,859 | py | Python | hrp/researches/urls.py | ken-mathenge/health_research_portal | e7e5ac8109c002a2d666c27ad076bbe040e00e5f | [
"MIT"
] | 1 | 2020-01-21T10:27:35.000Z | 2020-01-21T10:27:35.000Z | hrp/researches/urls.py | ken-mathenge/health_research_portal | e7e5ac8109c002a2d666c27ad076bbe040e00e5f | [
"MIT"
] | 13 | 2020-03-23T09:25:15.000Z | 2020-07-14T12:41:14.000Z | hrp/researches/urls.py | KennethMathenge/health_research_portal | e7e5ac8109c002a2d666c27ad076bbe040e00e5f | [
"MIT"
] | null | null | null | """Researches app urls."""
from django.urls import path
from . import views
app_name = "researches"
urlpatterns = [
path(
"",
views.Index.as_view(),
name="index",
),
path("signup/", views.SignUp.as_view(), name="signup"),
path(
"discussions/<int:pk>",
views.Disc... | 23.935961 | 79 | 0.557934 |
4a1fac5f696af66179a02751793cc524817901cd | 14,129 | py | Python | markdown/preprocessors.py | jackoalan/Python-Markdown | 77d4150614f39de82d5a63fa47fa15f87e44cb13 | [
"BSD-3-Clause"
] | 1 | 2018-07-15T14:50:44.000Z | 2018-07-15T14:50:44.000Z | pythonlib/markdown/preprocessors.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | null | null | null | pythonlib/markdown/preprocessors.py | Jumpscale/web | 8e8ec2ce01f3105c7647ee8a0c90af09311cbbeb | [
"Apache-2.0"
] | 3 | 2018-10-29T07:39:49.000Z | 2021-07-16T17:45:34.000Z | """
PRE-PROCESSORS
=============================================================================
Preprocessors work on source text before we start doing anything too
complicated.
"""
from __future__ import absolute_import
from __future__ import unicode_literals
from . import util
from . import odict
import re
def b... | 41.312865 | 85 | 0.478378 |
4a1facb5926679b16c68f43b61f6cfa93af97cd3 | 529 | py | Python | mp_sort/virtenv/lib/python3.6/site-packages/transcrypt/development/automated_tests/transcrypt/tuple_assignment/__init__.py | ang-jason/fip_powerx_mini_projects-foxtrot | 37e3671969b516369e2d1c7cab5890b75c489f56 | [
"MIT"
] | 2,200 | 2016-10-12T16:47:13.000Z | 2022-03-30T16:40:35.000Z | mp_sort/virtenv/lib/python3.6/site-packages/transcrypt/development/automated_tests/transcrypt/tuple_assignment/__init__.py | ang-jason/fip_powerx_mini_projects-foxtrot | 37e3671969b516369e2d1c7cab5890b75c489f56 | [
"MIT"
] | 672 | 2016-10-12T16:36:48.000Z | 2022-03-25T00:57:04.000Z | mp_sort/virtenv/lib/python3.6/site-packages/transcrypt/development/automated_tests/transcrypt/tuple_assignment/__init__.py | ang-jason/fip_powerx_mini_projects-foxtrot | 37e3671969b516369e2d1c7cab5890b75c489f56 | [
"MIT"
] | 230 | 2016-10-20T14:31:40.000Z | 2022-03-16T15:57:15.000Z | def run (autoTester):
((a, b), santa, [c, d], e) = ((1, 2), 'santa-claus', {3, 4}, 5)
autoTester.check (a, b, c, d, e, santa)
for i, x in enumerate ((0.5, 1.5, 2.5, 3.5)):
autoTester.check (i, x)
e, pi = 3.14, 2.74
e, pi = pi, e
autoTester.check (e, pi)
def ... | 25.190476 | 68 | 0.408318 |
4a1fad368adb67392f8067b65679f12b09515251 | 1,400 | py | Python | zq/__init__.py | prakhar-zipha/py-service-sdk | dcef97e8080689071b6e1e9aecec654f0ec38562 | [
"MIT"
] | null | null | null | zq/__init__.py | prakhar-zipha/py-service-sdk | dcef97e8080689071b6e1e9aecec654f0ec38562 | [
"MIT"
] | null | null | null | zq/__init__.py | prakhar-zipha/py-service-sdk | dcef97e8080689071b6e1e9aecec654f0ec38562 | [
"MIT"
] | 2 | 2020-09-27T11:23:38.000Z | 2020-12-12T08:20:24.000Z | import yaml
import os
MAX_CONNECTIONS_COUNT = os.environ['MAX_CONNECTIONS_COUNT']
MIN_CONNECTIONS_COUNT = os.environ['MIN_CONNECTIONS_COUNT']
MONGO_HOST = os.environ['MONGO_HOST']
MONGO_PORT =os.environ['MONGO_PORT']
MONGO_USER = os.environ['MONGO_USER']
MONGO_PASS = os.environ['MONGO_PASS']
MONGO_DB= os.environ... | 28.571429 | 59 | 0.709286 |
4a1fad517a24fd3108a3de9af13774a31ebffefa | 14,378 | py | Python | tests/test_io.py | arianpasquali/textacy | b08b1585237154b95e1dfb3e07e830eddb45d1a4 | [
"Apache-2.0"
] | null | null | null | tests/test_io.py | arianpasquali/textacy | b08b1585237154b95e1dfb3e07e830eddb45d1a4 | [
"Apache-2.0"
] | null | null | null | tests/test_io.py | arianpasquali/textacy | b08b1585237154b95e1dfb3e07e830eddb45d1a4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import os
import numpy as np
import pytest
from scipy import sparse as sp
from textacy import cache, compat, io
TEXT = (
"The year was 2081, and everybody was finally equal. "
"They weren't only equal before God and the law. "
... | 41.796512 | 92 | 0.559049 |
4a1faf2932cce5c9474cebd70113268933c1ed23 | 563 | py | Python | monitor/scheduler/scheduler.py | davepuchyr/cosmos-voter | ae33dac3b68389e36db204fd6ab27bf5db8a20ff | [
"MIT"
] | 1 | 2018-09-13T01:27:27.000Z | 2018-09-13T01:27:27.000Z | monitor/scheduler/scheduler.py | davepuchyr/cosmos-voter | ae33dac3b68389e36db204fd6ab27bf5db8a20ff | [
"MIT"
] | null | null | null | monitor/scheduler/scheduler.py | davepuchyr/cosmos-voter | ae33dac3b68389e36db204fd6ab27bf5db8a20ff | [
"MIT"
] | 1 | 2019-03-28T22:44:29.000Z | 2019-03-28T22:44:29.000Z | import time
from apscheduler.schedulers.blocking import BlockingScheduler
from apscheduler.triggers.cron import CronTrigger
# very simple cron scheduler
class Scheduler:
def __init__(self, strategy, cron):
self.strategy = strategy
self.scheduler = BlockingScheduler()
self.cron = cron
... | 25.590909 | 79 | 0.699822 |
4a1faf3ccece404dfd4a5c4292afae36cd9b34d6 | 27,589 | py | Python | src/aioextensions/__init__.py | kamadorueda/aioextensions | 1e4a953c0b0be3d7e98a975177599d34e3f26369 | [
"MIT"
] | 5 | 2020-08-18T02:44:33.000Z | 2021-05-21T16:54:40.000Z | src/aioextensions/__init__.py | fluidattacks/aioextensions | 2ee63716fb4c03a114cd7f24fa6ac3a5843ae325 | [
"MIT"
] | 1 | 2020-11-19T05:24:21.000Z | 2020-11-20T01:47:17.000Z | src/aioextensions/__init__.py | fluidattacks/aioextensions | 2ee63716fb4c03a114cd7f24fa6ac3a5843ae325 | [
"MIT"
] | 1 | 2021-07-27T04:10:57.000Z | 2021-07-27T04:10:57.000Z | """High performance functions to work with the async IO.
[](
https://pypi.org/project/aioextensions)
[](
https://fluid... | 30.586475 | 103 | 0.632716 |
4a1faf70b288692cdf6fc818b0648e5a338d0303 | 6,457 | py | Python | env/Lib/site-packages/plotly/express/trendline_functions/__init__.py | andresgreen-byte/Laboratorio-1--Inversion-de-Capital | 8a4707301d19c3826c31026c4077930bcd6a8182 | [
"MIT"
] | 11,750 | 2015-10-12T07:03:39.000Z | 2022-03-31T20:43:15.000Z | packages/python/plotly/plotly/express/trendline_functions/__init__.py | jiangrongbo/plotly.py | df19fc702b309586cc24e25373b87e8bdbb3ff60 | [
"MIT"
] | 2,951 | 2015-10-12T00:41:25.000Z | 2022-03-31T22:19:26.000Z | packages/python/plotly/plotly/express/trendline_functions/__init__.py | jiangrongbo/plotly.py | df19fc702b309586cc24e25373b87e8bdbb3ff60 | [
"MIT"
] | 2,623 | 2015-10-15T14:40:27.000Z | 2022-03-28T16:05:50.000Z | """
The `trendline_functions` module contains functions which are called by Plotly Express
when the `trendline` argument is used. Valid values for `trendline` are the names of the
functions in this module, and the value of the `trendline_options` argument to PX
functions is passed in as the first argument to these func... | 40.867089 | 98 | 0.666409 |
4a1faf7a532b3c33e75db80860bef559a2a47879 | 1,144 | py | Python | test/Task/Image/ConvertTextureTaskTest.py | paulondc/chilopoda | 046dbb0c1b4ff20ea5f2e1679f8d89f3089b6aa4 | [
"MIT"
] | 2 | 2019-09-24T18:56:27.000Z | 2021-02-07T04:58:49.000Z | test/Task/Image/ConvertTextureTaskTest.py | paulondc/kombi | 046dbb0c1b4ff20ea5f2e1679f8d89f3089b6aa4 | [
"MIT"
] | 20 | 2019-02-16T04:21:13.000Z | 2019-03-09T21:21:21.000Z | test/Task/Image/ConvertTextureTaskTest.py | paulondc/kombi | 046dbb0c1b4ff20ea5f2e1679f8d89f3089b6aa4 | [
"MIT"
] | 3 | 2019-11-15T05:16:32.000Z | 2021-09-28T21:28:29.000Z | import os
import unittest
from ...BaseTestCase import BaseTestCase
from kombi.Task import Task
from kombi.Crawler.Fs import FsCrawler
class ConvertTextureTaskTest(BaseTestCase):
"""
Test ConvertTexture task.
"""
__sourcePath = os.path.join(BaseTestCase.dataTestsDirectory(), "test.png")
__targetPat... | 29.333333 | 80 | 0.673077 |
4a1faf8b27a9beb333fc4db5f84f4180c885ba94 | 3,650 | py | Python | fmfexporter/adapters/polarion/fmf_adapter_polarion.py | rh-messaging-qe/fmfexporter | a2db70bf5d3e89d418063b1890924e6ec7cbeed6 | [
"Apache-2.0"
] | 4 | 2019-02-15T11:44:01.000Z | 2021-08-20T16:46:30.000Z | fmfexporter/adapters/polarion/fmf_adapter_polarion.py | rh-messaging-qe/fmfexporter | a2db70bf5d3e89d418063b1890924e6ec7cbeed6 | [
"Apache-2.0"
] | 14 | 2019-02-14T18:51:04.000Z | 2020-01-16T14:12:45.000Z | fmfexporter/adapters/polarion/fmf_adapter_polarion.py | rh-messaging-qe/fmfexporter | a2db70bf5d3e89d418063b1890924e6ec7cbeed6 | [
"Apache-2.0"
] | 2 | 2019-02-25T10:06:54.000Z | 2019-05-06T20:26:16.000Z | import logging
from fmfexporter.adapters.polarion.args.polarion_args_parser import PolarionArgParser
from fmfexporter import FMFTestCase
from fmfexporter.adapters.polarion.connectors.jira.fmf_jira import FMFJiraPopulator
from fmfexporter.adapters.polarion.polarion_reporter import PolarionReporter
from fmfexporter.adap... | 40.10989 | 117 | 0.677534 |
4a1fb1562bd9da3951ba4ea4b9863e1a82ca3713 | 959 | py | Python | Examples/PVA-water/pva.py | tamaswells/pysimm | 2586679a9eacdf1046baa2312c8f92c9247ac5be | [
"MIT"
] | null | null | null | Examples/PVA-water/pva.py | tamaswells/pysimm | 2586679a9eacdf1046baa2312c8f92c9247ac5be | [
"MIT"
] | null | null | null | Examples/PVA-water/pva.py | tamaswells/pysimm | 2586679a9eacdf1046baa2312c8f92c9247ac5be | [
"MIT"
] | null | null | null | from pysimm import system, lmps, forcefield
from pysimm.apps.random_walk import random_walk
def monomer():
s = system.read_pubchem_smiles('CCO')
f = forcefield.Gaff2()
s.apply_forcefield(f)
c1 = s.particles[2]
c1.linker = 'tail'
c2 = s.particles[3]
c2.linker = 'head'
for b in ... | 25.918919 | 67 | 0.565172 |
4a1fb16660a0734aecad20c392e5c5322302a337 | 14,084 | py | Python | sandbox/settings.py | waltparkman/oscar | 9c34ba3d9f5d9ce591c5e0a9f26c5c83daec3c36 | [
"BSD-3-Clause"
] | null | null | null | sandbox/settings.py | waltparkman/oscar | 9c34ba3d9f5d9ce591c5e0a9f26c5c83daec3c36 | [
"BSD-3-Clause"
] | 9 | 2022-01-01T11:09:59.000Z | 2022-03-01T11:05:48.000Z | sandbox/settings.py | waltparkman/oscar | 9c34ba3d9f5d9ce591c5e0a9f26c5c83daec3c36 | [
"BSD-3-Clause"
] | null | null | null | import os
import environ
import oscar
from oscar.defaults import *
from settings import * # noqa
#DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.postgresql_psycopg2',
# 'NAME': 'oscar_travis',
# 'USER': 'travis',
# 'PASSWORD': '',
# 'HOST': '127.0.0.1',
# 'PO... | 30.684096 | 98 | 0.649176 |
4a1fb1a14912efecafb4c4d771e4255e4e7648b0 | 113 | py | Python | PopulationSampling/simplerandom.py | Ra654/Stats-Calculator | 039ecaba3f8bb3ef69bb29e27f9c32d0fe2096b0 | [
"MIT"
] | null | null | null | PopulationSampling/simplerandom.py | Ra654/Stats-Calculator | 039ecaba3f8bb3ef69bb29e27f9c32d0fe2096b0 | [
"MIT"
] | null | null | null | PopulationSampling/simplerandom.py | Ra654/Stats-Calculator | 039ecaba3f8bb3ef69bb29e27f9c32d0fe2096b0 | [
"MIT"
] | null | null | null | from random import sample
def ran_sample(n):
list1 = [1, 2, 3, 4, 5]
n = sample(list1, 3)
return n
| 14.125 | 27 | 0.584071 |
4a1fb33aa8819cc49de6b304253fb9969d72449b | 3,445 | py | Python | monitor.py | Dexter-Maine/Eeveaem | ba9b551971d64274a7e5dd5ac87f820a96ab5060 | [
"MIT"
] | null | null | null | monitor.py | Dexter-Maine/Eeveaem | ba9b551971d64274a7e5dd5ac87f820a96ab5060 | [
"MIT"
] | null | null | null | monitor.py | Dexter-Maine/Eeveaem | ba9b551971d64274a7e5dd5ac87f820a96ab5060 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# Vivian Ethereum Address Monitor System Example.
import time
import os
from vweb3 import *
balance = web3.eth.getBalance
transactions = web3.eth.getTransactionCount
counter = 0
Menu = True
Monitor = False
address = ''
def _balance(address):
bal = balance(address)
return bal
def... | 35.515464 | 87 | 0.709724 |
4a1fb35f7da6c0748c77929e8499e520e9861c5d | 5,301 | bzl | Python | struct2tensor/struct2tensor.bzl | KendallPark/struct2tensor | 7e42ed9938dfb88aa451f07b943b6308cd758411 | [
"Apache-2.0"
] | null | null | null | struct2tensor/struct2tensor.bzl | KendallPark/struct2tensor | 7e42ed9938dfb88aa451f07b943b6308cd758411 | [
"Apache-2.0"
] | null | null | null | struct2tensor/struct2tensor.bzl | KendallPark/struct2tensor | 7e42ed9938dfb88aa451f07b943b6308cd758411 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 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 agreed to in writing, ... | 28.967213 | 136 | 0.616676 |
4a1fb4cba5386f4d2ddb73e3c7f8c3c575ce5c3e | 317 | py | Python | RealAppAnalysis/test dump/browsers/mozilla/mozilla_performance_analyzer_test.py | benjaminy/Charcoal | a4117a5e373faff839a78afc5183906ae2a81445 | [
"MIT"
] | 4 | 2016-01-16T02:45:24.000Z | 2017-07-19T18:14:18.000Z | RealAppAnalysis/test dump/browsers/mozilla/mozilla_performance_analyzer_test.py | benjaminy/Charcoal | a4117a5e373faff839a78afc5183906ae2a81445 | [
"MIT"
] | null | null | null | RealAppAnalysis/test dump/browsers/mozilla/mozilla_performance_analyzer_test.py | benjaminy/Charcoal | a4117a5e373faff839a78afc5183906ae2a81445 | [
"MIT"
] | null | null | null | import datautil
import os
getKeyManually = False;
trace_profile = datautil.getJSONDataFromFile();
print(trace_profile.keys());
if(getKeyManually):
key = input("Key: ");
datautil.toTxt(trace_profile[key], "out_" + key);
else:
key = "meta"
datautil.toTxt(trace_profile[key], "out_" + key); | 24.384615 | 54 | 0.671924 |
4a1fb66bfc39465cc927b123c4b99501a170fc77 | 7,205 | py | Python | Stage 1/get_metadata.py | diegommezp28/NLP_202110 | 0ffb15245a0b2afb568ddf5a621f29a5d0318d7a | [
"MIT"
] | null | null | null | Stage 1/get_metadata.py | diegommezp28/NLP_202110 | 0ffb15245a0b2afb568ddf5a621f29a5d0318d7a | [
"MIT"
] | null | null | null | Stage 1/get_metadata.py | diegommezp28/NLP_202110 | 0ffb15245a0b2afb568ddf5a621f29a5d0318d7a | [
"MIT"
] | 1 | 2021-05-30T01:09:44.000Z | 2021-05-30T01:09:44.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# /$$$$$$ /$$ /$$ /$$ /$$ /$$$$$$$$
# /$$__ $$| $$$ /$$$| $$$ /$$$|__ $$__/
# | $$ \__/| $$$$ /$$$$| $$$$ /$$$$ | $$
# | $$$$$$ | $$ $$/$$ $$| $$ $$/$$ $$ | $$
# \____ $$| $$ $$$| $$| $$ $$$| $$ | $$
# /$$ \ $$| $$\ $ | $$| $$\ ... | 38.529412 | 222 | 0.559056 |
4a1fb6766ee592caea078ad40016aa4a9a9c8264 | 43 | py | Python | hyperion/deprec/keras1/__init__.py | jsalt2019-diadet/hyperion | 14a11436d62f3c15cd9b1f70bcce3eafbea2f753 | [
"Apache-2.0"
] | 9 | 2019-09-22T05:19:59.000Z | 2022-03-05T18:03:37.000Z | hyperion/deprec/keras1/__init__.py | jsalt2019-diadet/hyperion | 14a11436d62f3c15cd9b1f70bcce3eafbea2f753 | [
"Apache-2.0"
] | null | null | null | hyperion/deprec/keras1/__init__.py | jsalt2019-diadet/hyperion | 14a11436d62f3c15cd9b1f70bcce3eafbea2f753 | [
"Apache-2.0"
] | 4 | 2019-10-10T06:34:05.000Z | 2022-03-05T18:03:56.000Z | from __future__ import absolute_import
| 7.166667 | 38 | 0.813953 |
4a1fb716dc2f911df12cc57dbdb176deeca4d523 | 12,879 | py | Python | manila/share/drivers/zfssa/restclient.py | nidhimittalhada/access_group_repo | 62f3365bc5fb728fcca692a9b3977690fabcd78f | [
"Apache-2.0"
] | 1 | 2020-12-04T02:46:42.000Z | 2020-12-04T02:46:42.000Z | manila/share/drivers/zfssa/restclient.py | nidhimittalhada/access_group_repo | 62f3365bc5fb728fcca692a9b3977690fabcd78f | [
"Apache-2.0"
] | 5 | 2015-08-13T15:17:28.000Z | 2016-08-02T02:55:01.000Z | manila/share/drivers/zfssa/restclient.py | nidhimittalhada/access_group_repo | 62f3365bc5fb728fcca692a9b3977690fabcd78f | [
"Apache-2.0"
] | 3 | 2019-05-03T12:32:47.000Z | 2021-01-30T20:26:19.000Z | # Copyright (c) 2014, Oracle and/or its affiliates. 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
#
# ... | 34.808108 | 79 | 0.57388 |
4a1fb720c221e2a8d606329d400989605fd57c72 | 1,570 | py | Python | st2common/st2common/models/db/timer.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | st2common/st2common/models/db/timer.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | 2 | 2020-03-04T08:33:36.000Z | 2020-03-04T08:34:14.000Z | st2common/st2common/models/db/timer.py | magiceses/st2 | a048ba92a8a1a5d272f277bf8fab0951df903306 | [
"Apache-2.0"
] | null | null | null | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | 37.380952 | 96 | 0.729299 |
4a1fb77e7008dafe265634d583cd39d9cfb89725 | 2,522 | py | Python | Project 3 - ROBDD/main.py | YC-Vertex/VLSI-EDA-Projects | ab3ff2d57d1ad0960c736758182d657d655f8b3e | [
"MIT"
] | 3 | 2020-12-08T18:32:08.000Z | 2021-01-10T16:31:29.000Z | Project 3 - ROBDD/main.py | YC-Vertex/VLSI-EDA-Projects | ab3ff2d57d1ad0960c736758182d657d655f8b3e | [
"MIT"
] | null | null | null | Project 3 - ROBDD/main.py | YC-Vertex/VLSI-EDA-Projects | ab3ff2d57d1ad0960c736758182d657d655f8b3e | [
"MIT"
] | null | null | null | import sys
from prj3_robdd import *
def Project3(argc, argv):
if argc >= 2:
infile = open(argv[1], 'r')
dummy = infile.readline()
count = int(infile.readline())
varSeq = infile.readline().split()
for i in range(len(varSeq)):
varSeq[i] = varSeq[i].strip()
... | 33.626667 | 72 | 0.428628 |
4a1fb8540b6ee96ce02db73703cf678c812de175 | 2,024 | py | Python | 01_02_using_bgd/01_using_bgd.py | rubio/pygame-tutorials | 9e6269f8a4ac7650921bab53daca056e44607a64 | [
"Apache-2.0"
] | null | null | null | 01_02_using_bgd/01_using_bgd.py | rubio/pygame-tutorials | 9e6269f8a4ac7650921bab53daca056e44607a64 | [
"Apache-2.0"
] | null | null | null | 01_02_using_bgd/01_using_bgd.py | rubio/pygame-tutorials | 9e6269f8a4ac7650921bab53daca056e44607a64 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
#
#
#
#
# documentation string of this module
"""
tutorial 01: first blit
"""
# some informational variables
__author__ = "$Author: DR0ID $"
__version__ = "$Revision: 109 $"
__date__ = "$Date: 2007-04-03 18:00:40 +0200 (Di, 03 Apr 2007) $"
__license__ = 'public domain'
__copyright__... | 28.914286 | 75 | 0.626482 |
4a1fb8733a5a35879ef0b9f205ec71fb90e7a8c5 | 10,558 | py | Python | openedx_webhooks/utils.py | stvstnfrd/openedx-webhooks | c12aede9eb87ae67bc3d3c9fb9ebe4879f668ba5 | [
"Apache-2.0"
] | 9 | 2016-12-20T04:18:46.000Z | 2021-09-09T10:50:03.000Z | openedx_webhooks/utils.py | stvstnfrd/openedx-webhooks | c12aede9eb87ae67bc3d3c9fb9ebe4879f668ba5 | [
"Apache-2.0"
] | 119 | 2015-01-20T12:01:28.000Z | 2021-12-17T18:50:46.000Z | openedx_webhooks/utils.py | stvstnfrd/openedx-webhooks | c12aede9eb87ae67bc3d3c9fb9ebe4879f668ba5 | [
"Apache-2.0"
] | 19 | 2015-01-20T11:58:43.000Z | 2021-11-01T09:38:32.000Z | """
Generic utilities.
"""
import functools
import hmac
import os
import sys
import time
from functools import wraps
from hashlib import sha1
from time import sleep as retry_sleep # so that we can patch it for tests.
from typing import Optional
import cachetools.func
import requests
from flask import request, Respo... | 31.236686 | 94 | 0.630328 |
4a1fba55fdffb831af66da830d216353fdb16b0b | 7,236 | py | Python | python_msx_sdk/model/workflow_footer.py | CiscoDevNet/python-msx-sdk | d7e0a08c656504b4f4551d263e67c671a2a04b3f | [
"MIT"
] | null | null | null | python_msx_sdk/model/workflow_footer.py | CiscoDevNet/python-msx-sdk | d7e0a08c656504b4f4551d263e67c671a2a04b3f | [
"MIT"
] | null | null | null | python_msx_sdk/model/workflow_footer.py | CiscoDevNet/python-msx-sdk | d7e0a08c656504b4f4551d263e67c671a2a04b3f | [
"MIT"
] | null | null | null | """
MSX SDK
MSX SDK client. # noqa: E501
The version of the OpenAPI document: 1.0.9
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from python_msx_sdk.model_utils import ( # noqa: F401
ApiTypeError,
ModelComposed,
ModelNormal,
Mod... | 39.758242 | 110 | 0.574489 |
4a1fbb75653d28c99c1feb6fb5a7c8ed0b019980 | 986 | py | Python | home/migrations/0007_ourteam.py | mukesh2505/restoproject | 8336804690026a285cc913fea93959fa5d2c2ae5 | [
"Apache-2.0"
] | null | null | null | home/migrations/0007_ourteam.py | mukesh2505/restoproject | 8336804690026a285cc913fea93959fa5d2c2ae5 | [
"Apache-2.0"
] | null | null | null | home/migrations/0007_ourteam.py | mukesh2505/restoproject | 8336804690026a285cc913fea93959fa5d2c2ae5 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.6 on 2021-02-19 12:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('home', '0006_auto_20210219_1215'),
]
operations = [
migrations.CreateModel(
name='OurTeam',
fields=[
... | 32.866667 | 90 | 0.554767 |
4a1fbcbb53db90c47aae2c0d2eb7e6e701b71677 | 3,531 | py | Python | tests/test_generator.py | GrayUnit/pyqt3wrapper | 4c6b742e1a9055c85b72c3a3f1b904a6f7fa3474 | [
"MIT"
] | null | null | null | tests/test_generator.py | GrayUnit/pyqt3wrapper | 4c6b742e1a9055c85b72c3a3f1b904a6f7fa3474 | [
"MIT"
] | null | null | null | tests/test_generator.py | GrayUnit/pyqt3wrapper | 4c6b742e1a9055c85b72c3a3f1b904a6f7fa3474 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import io
import os
import unittest
import tempfile
import subprocess
from pyqt3wrapper.pyuic_pyqt3wrapper import (IndentPrinter,
pyqt3wrapper_generator)
class IndentPrinterTestCase(unittest.TestCase):
def test_indent(self):
with open(os.... | 37.56383 | 76 | 0.549419 |
4a1fbcd27e942acf73dfb1dc2734ef96cf9077a8 | 38,306 | py | Python | src/sqlfluff/rules/L003.py | kiri1701/sqlfluff | 93d109d87f327037efe6fa30f2f7eea8d44f7e91 | [
"MIT"
] | null | null | null | src/sqlfluff/rules/L003.py | kiri1701/sqlfluff | 93d109d87f327037efe6fa30f2f7eea8d44f7e91 | [
"MIT"
] | null | null | null | src/sqlfluff/rules/L003.py | kiri1701/sqlfluff | 93d109d87f327037efe6fa30f2f7eea8d44f7e91 | [
"MIT"
] | null | null | null | """Implementation of Rule L003."""
import dataclasses
import itertools
from typing import Dict, Iterable, List, Optional, Sequence, Set, Tuple
from sqlfluff.core.parser import WhitespaceSegment
from sqlfluff.core.parser.segments import BaseSegment
from sqlfluff.core.rules.functional import rsp, sp, Segments
from sqlfl... | 37.190291 | 88 | 0.595338 |
4a1fbf1ef1944e406c062f79b5093ef78326e940 | 52,451 | py | Python | rl_coach/agents/agent.py | crr0004/coach | b601441eb594ae7c12e5f3106bc0537f39bbd7b8 | [
"Apache-2.0"
] | null | null | null | rl_coach/agents/agent.py | crr0004/coach | b601441eb594ae7c12e5f3106bc0537f39bbd7b8 | [
"Apache-2.0"
] | null | null | null | rl_coach/agents/agent.py | crr0004/coach | b601441eb594ae7c12e5f3106bc0537f39bbd7b8 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2017 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... | 50.579556 | 141 | 0.672037 |
4a1fc04ff8265fd2357572022865fcefce9b8377 | 7,601 | py | Python | torchmetrics/functional/__init__.py | walidbou6/metrics | 44b049cb57ccbf3904f4db16c818c3cdc566788e | [
"Apache-2.0"
] | 1 | 2022-03-22T08:49:04.000Z | 2022-03-22T08:49:04.000Z | torchmetrics/functional/__init__.py | walidbou6/metrics | 44b049cb57ccbf3904f4db16c818c3cdc566788e | [
"Apache-2.0"
] | null | null | null | torchmetrics/functional/__init__.py | walidbou6/metrics | 44b049cb57ccbf3904f4db16c818c3cdc566788e | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 46.631902 | 110 | 0.837127 |
4a1fc0ac81b1f56a29d803303c0fcd62df854fae | 1,991 | py | Python | src/Testing/ZopeTestCase/__init__.py | lukenowak/Zope | c9002f06a5a94841d2cbf6b51d366d3b7f633297 | [
"ZPL-2.1"
] | 1 | 2018-11-30T12:39:27.000Z | 2018-11-30T12:39:27.000Z | src/Testing/ZopeTestCase/__init__.py | lukenowak/Zope | c9002f06a5a94841d2cbf6b51d366d3b7f633297 | [
"ZPL-2.1"
] | null | null | null | src/Testing/ZopeTestCase/__init__.py | lukenowak/Zope | c9002f06a5a94841d2cbf6b51d366d3b7f633297 | [
"ZPL-2.1"
] | 1 | 2018-11-30T12:39:34.000Z | 2018-11-30T12:39:34.000Z | ##############################################################################
#
# Copyright (c) 2005 Zope Foundation and Contributors.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS I... | 34.929825 | 78 | 0.716223 |
4a1fc0c1db5ff11e4ff9158e332adf615ca3fcac | 1,254 | py | Python | tools/format/formatters/tests/python_test.py | ChrisCummins/format | d42b4dafcd7c4b187311473f1b446e0ca1988b12 | [
"Apache-2.0"
] | null | null | null | tools/format/formatters/tests/python_test.py | ChrisCummins/format | d42b4dafcd7c4b187311473f1b446e0ca1988b12 | [
"Apache-2.0"
] | 12 | 2020-01-12T11:55:03.000Z | 2020-01-17T01:00:23.000Z | tools/format/formatters/tests/python_test.py | ChrisCummins/format | d42b4dafcd7c4b187311473f1b446e0ca1988b12 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Chris Cummins <chrisc.101@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/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 25.08 | 74 | 0.715311 |
4a1fc1ae85dc86f97dc86188b74126e1ddbcd932 | 1,476 | py | Python | src/test/bctest.py | yankpay/yank | 33237ce209d782730b9159d6f138d8c767882044 | [
"MIT"
] | 1 | 2018-02-11T23:14:22.000Z | 2018-02-11T23:14:22.000Z | src/test/bctest.py | yankpay/yank | 33237ce209d782730b9159d6f138d8c767882044 | [
"MIT"
] | 1 | 2018-01-29T09:30:51.000Z | 2020-05-13T13:29:26.000Z | src/test/bctest.py | yankpay/yank | 33237ce209d782730b9159d6f138d8c767882044 | [
"MIT"
] | 7 | 2017-12-23T19:24:36.000Z | 2020-10-24T16:19:59.000Z | # Copyright 2014 BitPay, Inc.
# Distributed under the MIT/X13 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import subprocess
import os
import json
import sys
def bctest(testDir, testObj, exeext):
execprog = testObj['exec'] + exeext
execargs = testObj[... | 26.836364 | 121 | 0.72561 |
4a1fc1c435178907462c3c54be8c5e0e63a7a10b | 7,660 | py | Python | sanic_openapi/openapi.py | matsurihime/fork-sanic-openapi | b0558fa788459983723e80775f3ef06895ae4e82 | [
"MIT"
] | null | null | null | sanic_openapi/openapi.py | matsurihime/fork-sanic-openapi | b0558fa788459983723e80775f3ef06895ae4e82 | [
"MIT"
] | 1 | 2018-05-30T05:09:22.000Z | 2018-05-30T05:09:22.000Z | sanic_openapi/openapi.py | matsurihime/fork-sanic-openapi | b0558fa788459983723e80775f3ef06895ae4e82 | [
"MIT"
] | null | null | null | import re
from itertools import repeat
from sanic.blueprints import Blueprint
from sanic.response import json
from sanic.views import CompositionView
from .doc import excluded_paths, definitions, route_specs, serialize_schema
from .doc import RouteSpec
blueprint = Blueprint('openapi', url_prefix='openapi')
_spec =... | 38.492462 | 107 | 0.511749 |
4a1fc1d6c454a1ab3e77649b72d6ec57730300c5 | 608 | py | Python | tests/conftest.py | pgjones/quart-db | 975351507f4a83678a6b8799dc94b103915afebc | [
"MIT"
] | null | null | null | tests/conftest.py | pgjones/quart-db | 975351507f4a83678a6b8799dc94b103915afebc | [
"MIT"
] | null | null | null | tests/conftest.py | pgjones/quart-db | 975351507f4a83678a6b8799dc94b103915afebc | [
"MIT"
] | null | null | null | import os
from typing import AsyncGenerator
import pytest
from quart import Quart
from quart_db import Connection, QuartDB
from .utils import Options
@pytest.fixture(name="connection")
async def _connection() -> AsyncGenerator[Connection, None]:
db = QuartDB(Quart(__name__), url=os.environ["DATABASE_URL"])
... | 27.636364 | 69 | 0.740132 |
4a1fc1d9a9b10a2738a508c7440bb63a32d4e89c | 12,106 | py | Python | tensorflow/python/kernel_tests/slice_op_test.py | Zwysilence/tensorflow | b55001be83da044bb21d539d433dec6231eaec55 | [
"Apache-2.0"
] | 8 | 2017-03-20T12:04:21.000Z | 2021-06-24T20:34:30.000Z | tensorflow/python/kernel_tests/slice_op_test.py | Zwysilence/tensorflow | b55001be83da044bb21d539d433dec6231eaec55 | [
"Apache-2.0"
] | 1 | 2018-09-04T07:44:56.000Z | 2018-09-04T07:44:56.000Z | tensorflow/python/kernel_tests/slice_op_test.py | Zwysilence/tensorflow | b55001be83da044bb21d539d433dec6231eaec55 | [
"Apache-2.0"
] | 2 | 2017-03-20T12:10:56.000Z | 2017-11-12T00:15:54.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.189274 | 80 | 0.635718 |
4a1fc2ec2bfe78e2876fea693082918fac6ed809 | 4,199 | py | Python | synapse/rest/__init__.py | ewaf1/synapse | 77661ce81a799a375317dff9e4c8696da528984c | [
"Apache-2.0"
] | 2 | 2020-04-30T18:38:02.000Z | 2020-07-08T21:38:28.000Z | synapse/rest/__init__.py | ewaf1/synapse | 77661ce81a799a375317dff9e4c8696da528984c | [
"Apache-2.0"
] | null | null | null | synapse/rest/__init__.py | ewaf1/synapse | 77661ce81a799a375317dff9e4c8696da528984c | [
"Apache-2.0"
] | 2 | 2020-03-03T18:34:52.000Z | 2022-03-31T11:06:18.000Z | # -*- coding: utf-8 -*-
# Copyright 2014-2016 OpenMarket Ltd
# Copyright 2018 New Vector 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... | 33.325397 | 74 | 0.714932 |
4a1fc41a8fccf69b8a044b78cb0ec3a06c82c65f | 2,182 | py | Python | 23-trie/python/0211-add-and-search-word-data-structure-design-3.py | agnes-yang/LeetCode-Solutions-in-Good-Style | acc8661338cc7c1ae067915fb16079a9e3e66847 | [
"Apache-2.0"
] | 461 | 2019-06-27T03:15:28.000Z | 2019-12-17T15:17:42.000Z | 23-trie/python/0211-add-and-search-word-data-structure-design-3.py | dahui888/LeetCode-Solutions-in-Good-Style | acc8661338cc7c1ae067915fb16079a9e3e66847 | [
"Apache-2.0"
] | 62 | 2019-07-09T05:27:33.000Z | 2019-10-12T07:10:48.000Z | 23-trie/python/0211-add-and-search-word-data-structure-design-3.py | dahui888/LeetCode-Solutions-in-Good-Style | acc8661338cc7c1ae067915fb16079a9e3e66847 | [
"Apache-2.0"
] | 47 | 2019-06-27T08:34:18.000Z | 2019-12-17T03:14:46.000Z | class WordDictionary:
class Node:
def __init__(self):
self.is_word = False
self.next = [None for _ in range(26)]
def __init__(self):
"""
Initialize your data structure here.
"""
self.root = WordDictionary.Node()
def addWord(self, word: str) -... | 27.974359 | 125 | 0.531622 |
4a1fc46f8498eb7bcd63851f854c5b9fb8dc1fed | 3,694 | py | Python | tests/schema/product/mutation/product/conftest.py | simonsobs/acondbs | 6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6 | [
"MIT"
] | null | null | null | tests/schema/product/mutation/product/conftest.py | simonsobs/acondbs | 6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6 | [
"MIT"
] | 24 | 2020-04-02T19:29:07.000Z | 2022-03-08T03:05:43.000Z | tests/schema/product/mutation/product/conftest.py | simonsobs/acondbs | 6ca11c2889d827ecdb2b54d0cf3b94b8cdd281e6 | [
"MIT"
] | 1 | 2020-04-08T15:48:28.000Z | 2020-04-08T15:48:28.000Z | import pytest
import datetime
from acondbs.db.sa import sa
from acondbs.models import (
GitHubUser,
GitHubToken,
)
from acondbs import ops
##__________________________________________________________________||
@pytest.fixture
def app(app_empty):
y = app_empty
user1 = GitHubUser(login="user1", git... | 25.30137 | 78 | 0.507851 |
4a1fc4bf12a187e91b9fbba3c919d386004f6a9d | 1,672 | py | Python | extract.py | vndee/offline-CROHME | 0e09cbdbe7e549ee3b7fcb9ef8548906bcf6947d | [
"MIT"
] | 35 | 2019-06-26T09:24:32.000Z | 2022-01-13T07:15:55.000Z | extract.py | vndee/offline-CROHME | 0e09cbdbe7e549ee3b7fcb9ef8548906bcf6947d | [
"MIT"
] | null | null | null | extract.py | vndee/offline-CROHME | 0e09cbdbe7e549ee3b7fcb9ef8548906bcf6947d | [
"MIT"
] | 5 | 2019-07-06T07:20:03.000Z | 2021-09-11T11:27:06.000Z | import shutil
import glob
import os
import inkml2img
from datetime import datetime
dataPath = 'CROHME_labeled_2016/'
dataMergedPath = 'data_merged/'
targetFolder = 'data_processed/'
logger = open('log.txt', 'w+')
def writeLog(message):
logger.write("[" + datetime.now().strftime('%Y-%m-%d %H:%M:%S') + "] " + s... | 31.54717 | 136 | 0.608254 |
4a1fc5c4045de93cfd0a61fd0bea6e1f8a164413 | 12,655 | py | Python | pybind/slxos/v16r_1_00b/overlay/access_list/type/vxlan/extended/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/overlay/access_list/type/vxlan/extended/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | null | null | null | pybind/slxos/v16r_1_00b/overlay/access_list/type/vxlan/extended/__init__.py | shivharis/pybind | 4e1c6d54b9fd722ccec25546ba2413d79ce337e6 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:15:42.000Z | 2021-11-05T22:15:42.000Z |
from operator import attrgetter
import pyangbind.lib.xpathhelper as xpathhelper
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType
from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType
from pyangbind.lib.base import PybindBase
from d... | 77.164634 | 1,233 | 0.724299 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.