hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2de3c42fc9e32e80320e697f257728993dfb767a | 1,358 | py | Python | myutils/twisted_utils.py | AnotherKamila/sdn-loadbalancer | 34fa80d05d9751aaec42490a7e3883267ea6ebfc | [
"MIT"
] | 6 | 2019-04-28T15:27:09.000Z | 2021-05-24T10:43:44.000Z | myutils/twisted_utils.py | AnotherKamila/sdn-loadbalancer | 34fa80d05d9751aaec42490a7e3883267ea6ebfc | [
"MIT"
] | null | null | null | myutils/twisted_utils.py | AnotherKamila/sdn-loadbalancer | 34fa80d05d9751aaec42490a7e3883267ea6ebfc | [
"MIT"
] | 1 | 2019-11-12T07:34:50.000Z | 2019-11-12T07:34:50.000Z | import functools
from twisted.internet import defer, task
from twisted.protocols import basic
import os
def print_method_call(f):
@functools.wraps(f)
@defer.inlineCallbacks
def wrapped(ctx, *args, **kwargs):
name = '<'+ctx.name+'>' if hasattr(ctx, 'name') else ''
sargs = ', '.join('{}'.form... | 28.291667 | 76 | 0.595729 |
2de3d16f77afeae828e12ef95457e85d05bc90ef | 3,992 | py | Python | alipay/aop/api/request/AlipayOpenMiniPlanOperateOfflineRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayOpenMiniPlanOperateOfflineRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayOpenMiniPlanOperateOfflineRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayOpenMiniPlanOperateOfflineModel import AlipayOpenMiniPlanOperateOfflineModel
class AlipayOpenMiniPlanOperateOfflineRequest(obj... | 27.531034 | 148 | 0.646293 |
2de3f141be2465fd0b9efa2c91dc9c195f8a770a | 5,975 | py | Python | visual_kinematics/RobotSerial.py | joosm/visual_kinematics | 23b99cfddb6c3415e398aef3029169a6cea3deab | [
"MIT"
] | 15 | 2020-07-08T08:10:58.000Z | 2022-03-17T05:58:06.000Z | visual_kinematics/RobotSerial.py | joosm/visual_kinematics | 23b99cfddb6c3415e398aef3029169a6cea3deab | [
"MIT"
] | 2 | 2021-03-10T18:35:49.000Z | 2021-07-07T03:45:12.000Z | visual_kinematics/RobotSerial.py | joosm/visual_kinematics | 23b99cfddb6c3415e398aef3029169a6cea3deab | [
"MIT"
] | 8 | 2020-07-08T08:11:16.000Z | 2022-03-17T05:57:53.000Z | from visual_kinematics.Robot import *
from visual_kinematics.utility import simplify_angles
import logging
class RobotSerial(Robot):
# ==================
# dh_params [n, 4]
# | d | a | alpha | theta |
# | x | x | x | x |
# | x | x | x | x |
# | ... | ...... | 42.985612 | 130 | 0.500586 |
2de41d7cc9215728b1be9e299fe6d7a5cc9a934a | 3,743 | py | Python | Rannan_configs/splunk_apps_indexes/apps_configs.tgz_fixed/splunk_app_db_connect/bin/dbx2/jre_validator.py | mhassan2/datafabric_splunk | b4a1ba77ad7e1ab84d22cb40da6ff12e6bf16d1e | [
"Apache-2.0"
] | 14 | 2017-12-21T00:17:04.000Z | 2020-07-15T19:00:31.000Z | Rannan_configs/splunk_apps_indexes/apps_configs.tgz_fixed/splunk_app_db_connect/bin/dbx2/jre_validator.py | mhassan2/datafabric_splunk | b4a1ba77ad7e1ab84d22cb40da6ff12e6bf16d1e | [
"Apache-2.0"
] | null | null | null | Rannan_configs/splunk_apps_indexes/apps_configs.tgz_fixed/splunk_app_db_connect/bin/dbx2/jre_validator.py | mhassan2/datafabric_splunk | b4a1ba77ad7e1ab84d22cb40da6ff12e6bf16d1e | [
"Apache-2.0"
] | 5 | 2018-01-18T17:34:48.000Z | 2019-03-27T09:32:05.000Z | #! /usr/bin/env python
import os
from dbx_logger import logger
import threading
import subprocess
import traceback
import shlex
import C
class Command(object):
"""
Enables to run subprocess commands in a different thread with TIMEOUT option.
Based on jcollado's solution:
http://stackoverflow.com/quest... | 31.991453 | 118 | 0.588832 |
2de420c9dfa30a3a8a0baf82eaa8d6f5a580bd3c | 6,162 | py | Python | extrac_contour.py | alperd411/tumor_extraction | 7bbee625322ba8a54ae26de22250b996c07f5fc5 | [
"MIT"
] | null | null | null | extrac_contour.py | alperd411/tumor_extraction | 7bbee625322ba8a54ae26de22250b996c07f5fc5 | [
"MIT"
] | null | null | null | extrac_contour.py | alperd411/tumor_extraction | 7bbee625322ba8a54ae26de22250b996c07f5fc5 | [
"MIT"
] | null | null | null | import operator
import os
import warnings
import vtk
import numpy as np
import pydicom
from dicom_contour.contour import coord2pixels, get_contour_dict, plot2dcontour, fill_contour
from vtk.util import numpy_support
import pyvista as py
import sys
import tkinter as tk
from tkinter import *
from tkinter impo... | 29.768116 | 110 | 0.640863 |
2de429ad46b0f5d87dfba008486c3ca80349d000 | 84,128 | py | Python | common/leap/osx/Leap.py | yaatehr/ChordShed | 5b04fd086792898bf41dd9a88f4ab1b1656a3f9e | [
"MIT"
] | null | null | null | common/leap/osx/Leap.py | yaatehr/ChordShed | 5b04fd086792898bf41dd9a88f4ab1b1656a3f9e | [
"MIT"
] | null | null | null | common/leap/osx/Leap.py | yaatehr/ChordShed | 5b04fd086792898bf41dd9a88f4ab1b1656a3f9e | [
"MIT"
] | null | null | null | # This file was automatically generated by SWIG (http://www.swig.org).
# Version 2.0.9
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
from os.path import ... | 55.021583 | 108 | 0.769268 |
2de460931acfd5b05b4a1e1886a74173e0e9f876 | 6,290 | py | Python | hubspot3/test/test_keywords.py | kevin2357/hubspot3 | 488f6ff4195034317d99431439087443bca1469f | [
"MIT"
] | 1 | 2019-02-25T01:09:51.000Z | 2019-02-25T01:09:51.000Z | hubspot3/test/test_keywords.py | kevin2357/hubspot3 | 488f6ff4195034317d99431439087443bca1469f | [
"MIT"
] | null | null | null | hubspot3/test/test_keywords.py | kevin2357/hubspot3 | 488f6ff4195034317d99431439087443bca1469f | [
"MIT"
] | null | null | null | # coding: utf-8
import unittest
import uuid
import json
from nose.plugins.attrib import attr
from . import helper
from hubspot3.keywords import KeywordsClient
class KeywordsClientTest(unittest.TestCase):
""" Unit tests for the HubSpot Keyword API Python client.
This file contains some unittest tests for the... | 35.536723 | 99 | 0.629571 |
2de46be0a4ead5011004bd1db5458a3344632cba | 9,200 | py | Python | wdreconcile/sitelink.py | rpatil524/openrefine-wikibase | bfdbcf3dccc586c6a4fc5103162d7cfe0f69c15b | [
"MIT"
] | null | null | null | wdreconcile/sitelink.py | rpatil524/openrefine-wikibase | bfdbcf3dccc586c6a4fc5103162d7cfe0f69c15b | [
"MIT"
] | null | null | null | wdreconcile/sitelink.py | rpatil524/openrefine-wikibase | bfdbcf3dccc586c6a4fc5103162d7cfe0f69c15b | [
"MIT"
] | null | null | null |
import re
import requests
from urllib.parse import quote_plus, unquote_plus
from collections import defaultdict
from .sparqlwikidata import sparql_wikidata
from .utils import to_q
from config import redis_key_prefix, mediawiki_api_endpoint
class SitelinkFetcher(object):
"""
Fetches Qids by sitelinks.
"""... | 34.980989 | 133 | 0.575109 |
2de4bda1dd46f92324200477bddffa37b38e7eee | 1,041 | py | Python | attic/tests/post-deployment/tests/bugs/test_skb1.py | ska-telescope/skampi | cd2f95bd56594888c8d0c3476824b438dfcfcf71 | [
"BSD-3-Clause"
] | null | null | null | attic/tests/post-deployment/tests/bugs/test_skb1.py | ska-telescope/skampi | cd2f95bd56594888c8d0c3476824b438dfcfcf71 | [
"BSD-3-Clause"
] | 3 | 2019-10-25T13:38:56.000Z | 2022-03-30T09:13:33.000Z | attic/tests/post-deployment/tests/bugs/test_skb1.py | ska-telescope/skampi | cd2f95bd56594888c8d0c3476824b438dfcfcf71 | [
"BSD-3-Clause"
] | 2 | 2019-11-04T09:59:06.000Z | 2020-05-07T11:05:42.000Z | # When the MVP is deployed using Kubernetes ingress controller implemented by Traefik,
# TLS certificates are not served correctly. This results in https and secure
# websockets not being enabled. This test case is to verify this bug.
# To test using local ip address, assign local ip to env variable 'IP_FOR_INGRESS_TES... | 35.896552 | 87 | 0.700288 |
2de4e5002fda20d5fd0439bc20ccf37f2d07cc67 | 12,707 | py | Python | indy-tests/test_scenarios/test_scenario_07.py | NgoAnhKhoi/indy-testcase | 1f85d2b7e77a5bb9637379286d7f7f142c2c626e | [
"MIT"
] | null | null | null | indy-tests/test_scenarios/test_scenario_07.py | NgoAnhKhoi/indy-testcase | 1f85d2b7e77a5bb9637379286d7f7f142c2c626e | [
"MIT"
] | null | null | null | indy-tests/test_scenarios/test_scenario_07.py | NgoAnhKhoi/indy-testcase | 1f85d2b7e77a5bb9637379286d7f7f142c2c626e | [
"MIT"
] | null | null | null | '''
Created on Nov 13, 2017
@author: khoi.ngo
'''
# /usr/bin/env python3.6
import sys
import asyncio
import json
import os.path
import logging.handlers
# import shutil
import time
import random
from indy import signus, wallet, pool, ledger
from indy.error import IndyError
import abc
sys.path.append(os.path.join(os.pat... | 47.770677 | 155 | 0.651373 |
2de4f532cbb593ddd8a84916d8572aeb4c4900ca | 1,837 | py | Python | sktime/utils/_testing/series_as_features.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 2 | 2020-10-05T12:17:41.000Z | 2020-10-19T08:57:50.000Z | sktime/utils/_testing/series_as_features.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 2 | 2020-04-20T12:26:42.000Z | 2020-04-22T17:09:14.000Z | sktime/utils/_testing/series_as_features.py | brettkoonce/sktime | 6336247bad0dac8692aa4b911c267f401dea4163 | [
"BSD-3-Clause"
] | 1 | 2022-02-14T18:19:01.000Z | 2022-02-14T18:19:01.000Z | #!/usr/bin/env python3 -u
# coding: utf-8
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
__author__ = ["Markus Löning"]
__all__ = [
"make_classification_problem",
"make_regression_problem",
]
import numpy as np
import pandas as pd
from sklearn.utils.validation import check_random_stat... | 33.4 | 74 | 0.598258 |
2de50a1ab29d50f7b2999dd8ba20a51ad0b1db82 | 1,458 | py | Python | tests/test_NYCArtsFinder.py | QMSS-G5072-2020/Final_Project_cw3210 | 67b11457be7db7a65fd670cd38e576c1bac98f54 | [
"MIT"
] | 1 | 2021-01-18T22:20:03.000Z | 2021-01-18T22:20:03.000Z | tests/test_NYCArtsFinder.py | ChengweiWang3210/PythonPkg_FindingArtsEventsInNYC | 67b11457be7db7a65fd670cd38e576c1bac98f54 | [
"MIT"
] | 1 | 2020-12-18T21:37:54.000Z | 2020-12-27T01:46:32.000Z | tests/test_NYCArtsFinder.py | ChengweiWang3210/PythonPkg_FindingArtsEventsInNYC | 67b11457be7db7a65fd670cd38e576c1bac98f54 | [
"MIT"
] | 1 | 2021-01-18T22:16:04.000Z | 2021-01-18T22:16:04.000Z | from nycartsfinder.__init__ import __version__
from nycartsfinder.main import EventsNearMe
import folium
# check for the package version
def test_version():
assert __version__ == '0.3.0'
# check for the situation when user type in address outside of NYC
def test_notNYC_address():
notNYC_address = "Texas"
... | 39.405405 | 109 | 0.729081 |
2de51099f9855f658c28b2bfb6d17bad18fbe580 | 7,575 | py | Python | cinder/tests/functional/test_group_replication.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/tests/functional/test_group_replication.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | cinder/tests/functional/test_group_replication.py | mail2nsrajesh/cinder | a688b872bec6d1abd4dcd852bdb8e8a921369d2e | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2017 Dell Inc. or its subsidiaries.
# 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
#
# ... | 44.558824 | 79 | 0.645941 |
2de5148cf3cc3085f09b98f8d0df959ac8e055e7 | 7,402 | py | Python | bigml/tests/test_43_linear.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | 1 | 2021-08-30T20:18:38.000Z | 2021-08-30T20:18:38.000Z | bigml/tests/test_43_linear.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | null | null | null | bigml/tests/test_43_linear.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | 1 | 2021-08-30T20:18:40.000Z | 2021-08-30T20:18:40.000Z | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2019 BigML
#
# 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 b... | 50.69863 | 231 | 0.6301 |
2de54995ce56c6d403225b4150b96cd7554a5e8e | 6,223 | py | Python | python/openlattice/models/search_constraints.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | python/openlattice/models/search_constraints.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | 1 | 2021-01-20T00:20:01.000Z | 2021-01-20T00:20:01.000Z | python/openlattice/models/search_constraints.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenLattice API
OpenLattice API # noqa: E501
The version of the OpenAPI document: 0.0.1
Contact: support@openlattice.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from openlattice.configuration import Configuration
... | 27.535398 | 145 | 0.591515 |
2de54d5eef3d898ee97f0a50ace6ac6377376f13 | 519 | py | Python | arch/utils.py | ashaw596/squeezenas | bdb279854bbed6cc7790a3d0faafb4f7c6c5f01e | [
"MIT"
] | 65 | 2019-09-03T06:12:56.000Z | 2021-09-07T11:52:29.000Z | arch/utils.py | ashaw596/squeezenas | bdb279854bbed6cc7790a3d0faafb4f7c6c5f01e | [
"MIT"
] | 9 | 2019-09-05T02:28:31.000Z | 2020-09-18T10:39:03.000Z | arch/utils.py | ashaw596/squeezenas | bdb279854bbed6cc7790a3d0faafb4f7c6c5f01e | [
"MIT"
] | 10 | 2019-10-01T21:42:29.000Z | 2021-01-11T18:30:32.000Z | import torch
from torch import nn
class Flatten(nn.Module):
def forward(self, input: torch.Tensor):
return input.view(input.size(0), -1)
def conv3x3_bn(c_in, c_out, stride):
return nn.Sequential(
nn.Conv2d(c_in, c_out, 3, stride, 1, bias=False),
nn.BatchNorm2d(c_out),
nn.ReLU... | 21.625 | 57 | 0.624277 |
2de55f2715ae86f43066fd2fa3bef5e2f91c12b6 | 21,428 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/operations/runs_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/operations/runs_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_04_01/operations/runs_operations.py | xiafu-msft/azure-sdk-for-python | 4d9560cfd519ee60667f3cc2f5295a58c18625db | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 47.512195 | 199 | 0.665764 |
2de570693bfde88e67a7a5fb08aec97aad8a61ca | 1,572 | py | Python | recipeProject/core/tests/test_admin.py | Mazziitoozz/Django_REST_recipe_api | b248342aed1bda5d4d39a17509dcd11962fecf10 | [
"MIT"
] | null | null | null | recipeProject/core/tests/test_admin.py | Mazziitoozz/Django_REST_recipe_api | b248342aed1bda5d4d39a17509dcd11962fecf10 | [
"MIT"
] | null | null | null | recipeProject/core/tests/test_admin.py | Mazziitoozz/Django_REST_recipe_api | b248342aed1bda5d4d39a17509dcd11962fecf10 | [
"MIT"
] | null | null | null | from django.test import TestCase,Client
from django.contrib.auth import get_user_model
from django.urls import reverse
class AdminSiteTest(TestCase):
def setUp(self):
self.client = Client()
self.admin_user = get_user_model().objects.create_superuser(
email='admin@londonappdec.com',
... | 38.341463 | 142 | 0.657761 |
2de5910a6f75682b24fd6889ef6834bcaef0eb13 | 5,057 | py | Python | sdk/schemaregistry/azure-schemaregistry/tests/perfstress_tests/_test_base.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/schemaregistry/azure-schemaregistry/tests/perfstress_tests/_test_base.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/schemaregistry/azure-schemaregistry/tests/perfstress_tests/_test_base.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 37.738806 | 103 | 0.631402 |
2de5919310e551ddb2903be5e0e470c402fcf16d | 11,970 | py | Python | cosmotech_api/model/connector_parameter_group.py | Cosmo-Tech/cosmotech-api-python-client | 49ef58784605da8dd6b290cab15b363671991d8e | [
"MIT"
] | null | null | null | cosmotech_api/model/connector_parameter_group.py | Cosmo-Tech/cosmotech-api-python-client | 49ef58784605da8dd6b290cab15b363671991d8e | [
"MIT"
] | null | null | null | cosmotech_api/model/connector_parameter_group.py | Cosmo-Tech/cosmotech-api-python-client | 49ef58784605da8dd6b290cab15b363671991d8e | [
"MIT"
] | null | null | null | """
Cosmo Tech Plaform API
Cosmo Tech Platform API # noqa: E501
The version of the OpenAPI document: 0.0.11-SNAPSHOT
Contact: platform@cosmotech.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from cosmotech_api.model_utils import ( # noqa... | 42.597865 | 121 | 0.573601 |
2de59472ffa7c5e0d8c8f76d22b36e6df0cb99b5 | 237 | py | Python | examples/docs_snippets/docs_snippets_tests/concepts_tests/assets_tests/test_io_managers_prod_local.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets_tests/concepts_tests/assets_tests/test_io_managers_prod_local.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets_tests/concepts_tests/assets_tests/test_io_managers_prod_local.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | 1 | 2019-09-11T03:02:27.000Z | 2019-09-11T03:02:27.000Z | from docs_snippets.concepts.assets.asset_io_manager_prod_local import (
local_asset_group,
prod_asset_group,
)
def test_asset_groups():
assert len(local_asset_group.assets) == 2
assert len(prod_asset_group.assets) == 2
| 23.7 | 71 | 0.767932 |
2de5b4e5648e3b7a82af69434f0f8c2edc491444 | 2,527 | py | Python | ciphers/morse_code_implementation.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | ciphers/morse_code_implementation.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | ciphers/morse_code_implementation.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | 1 | 2020-06-26T09:46:17.000Z | 2020-06-26T09:46:17.000Z | '''THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OT... | 20.055556 | 74 | 0.456668 |
2de5e559af563cc2e5e3d66eeb1fa949b2cb6caa | 1,074 | py | Python | alipay/aop/api/response/AlipayCommerceOperationItemListQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/response/AlipayCommerceOperationItemListQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/response/AlipayCommerceOperationItemListQueryResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
from alipay.aop.api.domain.ItemPrizeInfo import ItemPrizeInfo
class AlipayCommerceOperationItemListQueryResponse(AlipayResponse):
def __init__(self):
super(AlipayCommerceOperationI... | 32.545455 | 117 | 0.679702 |
2de5e7b93b4517fd2d388ccc3868fd9ce0b00dbb | 2,372 | py | Python | kraken/lib/default_specs.py | eighttails/kraken | 6e3b7d6e86d673acf5633e6e23292cb82f1a114e | [
"Apache-2.0"
] | null | null | null | kraken/lib/default_specs.py | eighttails/kraken | 6e3b7d6e86d673acf5633e6e23292cb82f1a114e | [
"Apache-2.0"
] | null | null | null | kraken/lib/default_specs.py | eighttails/kraken | 6e3b7d6e86d673acf5633e6e23292cb82f1a114e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright 2020 Benjamin Kiessling
#
# 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 ... | 43.127273 | 156 | 0.458263 |
2de5e9b6e3adf91ccd0e190b7273190b9881ecc2 | 63 | py | Python | src/robots/resources/__init__.py | severin-lemaignan/pyrobots | d5dd3bd54375e85802de7225556ad519b8b4e89d | [
"0BSD"
] | 11 | 2017-03-06T17:19:59.000Z | 2021-11-04T07:45:33.000Z | src/robots/resources/__init__.py | severin-lemaignan/pyrobots | d5dd3bd54375e85802de7225556ad519b8b4e89d | [
"0BSD"
] | 2 | 2018-08-18T12:43:47.000Z | 2019-04-23T13:03:26.000Z | src/robots/resources/__init__.py | severin-lemaignan/pyrobots | d5dd3bd54375e85802de7225556ad519b8b4e89d | [
"0BSD"
] | 3 | 2018-04-24T10:25:53.000Z | 2021-08-25T04:34:35.000Z | # coding=utf-8
from .resources import *
from .lock import lock
| 15.75 | 24 | 0.746032 |
2de6049a88b68564f54c77cdcbe1081c66539eaa | 8,918 | py | Python | remade/fits/fit_Bayesian.py | ChristianMichelsen/REMADE | f1068dcc8030ae42b6bee48772b596359853a837 | [
"MIT"
] | 1 | 2021-06-14T15:28:06.000Z | 2021-06-14T15:28:06.000Z | remade/fits/fit_Bayesian.py | ChristianMichelsen/REMADE | f1068dcc8030ae42b6bee48772b596359853a837 | [
"MIT"
] | null | null | null | remade/fits/fit_Bayesian.py | ChristianMichelsen/REMADE | f1068dcc8030ae42b6bee48772b596359853a837 | [
"MIT"
] | null | null | null | import jax
import jax.numpy as jnp
from jax.random import PRNGKey as Key
from joblib import delayed, Parallel
import numpy as np
import numpyro
from numpyro import distributions as dist
from numpyro.infer import log_likelihood, MCMC, NUTS, Predictive
import pandas as pd
from scipy.special import logsumexp
from remade.... | 29.432343 | 89 | 0.683449 |
2de61871b5b88bc1a86f07c5ec6f5997d2f3d8ad | 1,261 | py | Python | nova/cmd/scheduler.py | windskyer/nova | df485344dfd0f9e927e51273a3aaa71d948f2980 | [
"Apache-2.0"
] | null | null | null | nova/cmd/scheduler.py | windskyer/nova | df485344dfd0f9e927e51273a3aaa71d948f2980 | [
"Apache-2.0"
] | null | null | null | nova/cmd/scheduler.py | windskyer/nova | df485344dfd0f9e927e51273a3aaa71d948f2980 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# 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 ... | 30.02381 | 78 | 0.720063 |
2de636c6e6ba8b01e5adfe5785788fa85df2a476 | 8,104 | py | Python | pyggif.py | samar-khanna/cs224w-project | 50b255f87fe395cb8b638ec599825af2d1fc172b | [
"MIT"
] | 2 | 2022-03-06T17:14:12.000Z | 2022-03-11T13:37:59.000Z | pyggif.py | samar-khanna/cs224w-project | 50b255f87fe395cb8b638ec599825af2d1fc172b | [
"MIT"
] | null | null | null | pyggif.py | samar-khanna/cs224w-project | 50b255f87fe395cb8b638ec599825af2d1fc172b | [
"MIT"
] | 2 | 2022-03-06T16:26:39.000Z | 2022-03-06T17:14:20.000Z | from genericpath import exists
import pickle
import torch
print(torch.__version__)
import torch_geometric
print(torch_geometric.__version__)
import networkx as nx
import matplotlib.pyplot as plt
from pylab import show
import collections
import imageio
import os
def tuplify(tensor):
return (int(tensor[0].item())... | 38.046948 | 246 | 0.647705 |
2de638dc8bd3a1d339356524627d9966da674604 | 87,008 | py | Python | scipy/signal/signaltools.py | bewithaman/scipy | 9eea599120903c9f88fb16ba6b39af77cf7d70e5 | [
"BSD-3-Clause"
] | null | null | null | scipy/signal/signaltools.py | bewithaman/scipy | 9eea599120903c9f88fb16ba6b39af77cf7d70e5 | [
"BSD-3-Clause"
] | null | null | null | scipy/signal/signaltools.py | bewithaman/scipy | 9eea599120903c9f88fb16ba6b39af77cf7d70e5 | [
"BSD-3-Clause"
] | null | null | null | # Author: Travis Oliphant
# 1999 -- 2002
from __future__ import division, print_function, absolute_import
import warnings
import threading
from . import sigtools
from scipy._lib.six import callable
from scipy._lib._version import NumpyVersion
from scipy import linalg
from scipy.fftpack import (fft, ifft, ifftshift, ... | 32.771375 | 92 | 0.565189 |
2de66b07dd27f74700d5de29548fc17ef6d07d2b | 9,452 | py | Python | bin/disco_bake.py | Angakkuq/asiaq-aws | f7ddec9fc60aef685f372cbaefee2b08ae18b6a0 | [
"BSD-2-Clause"
] | null | null | null | bin/disco_bake.py | Angakkuq/asiaq-aws | f7ddec9fc60aef685f372cbaefee2b08ae18b6a0 | [
"BSD-2-Clause"
] | 4 | 2016-03-22T17:04:04.000Z | 2016-03-23T18:03:45.000Z | bin/disco_bake.py | Angakkuit/asiaq-aws | f7ddec9fc60aef685f372cbaefee2b08ae18b6a0 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Command line tool for baking AMI's and otherwise working with them.
"""
from __future__ import print_function
import sys
import argparse
from datetime import datetime
from disco_aws_automation import DiscoBake, HostclassTemplating
from disco_aws_automation.disco_aws_util import run_gracefull... | 53.101124 | 110 | 0.641981 |
2de66de341c204f0e5b4dab9ad529bd080672019 | 4,996 | py | Python | tensorflow/et0/test_chinese_map/generate_shp_from_txt.py | ningchaoar/portfolio-examples | bacbbbcc3f20e89648c91141156f091de4eef651 | [
"MIT"
] | 5 | 2021-11-26T03:54:26.000Z | 2022-03-18T01:15:05.000Z | tensorflow/et0/test_chinese_map/generate_shp_from_txt.py | ningchaoar/portfolio-examples | bacbbbcc3f20e89648c91141156f091de4eef651 | [
"MIT"
] | 8 | 2021-12-11T11:08:29.000Z | 2022-03-30T10:50:55.000Z | tensorflow/et0/test_chinese_map/generate_shp_from_txt.py | ningchaoar/portfolio-examples | bacbbbcc3f20e89648c91141156f091de4eef651 | [
"MIT"
] | 5 | 2021-11-29T07:55:08.000Z | 2022-03-21T06:38:51.000Z | # Copyright (c) 2021 Graphcore Ltd. All rights reserved.
import numpy as np
def process_prs(file):
f = open(file)
prs_list = []
file_lines = f.readlines()
for file_line in file_lines:
file_split = file_line.split()
name = file_split[0]
x_temp = float(file_split[2])
y_... | 39.968 | 106 | 0.483587 |
2de6c4a76a92ba1628c112a1713a1df9d1e3bc76 | 3,976 | py | Python | app/app/settings.py | baochyang/recipe-app-api | bc9cb805abcf7f13ad21b9612dce2717b755376b | [
"MIT"
] | null | null | null | app/app/settings.py | baochyang/recipe-app-api | bc9cb805abcf7f13ad21b9612dce2717b755376b | [
"MIT"
] | null | null | null | app/app/settings.py | baochyang/recipe-app-api | bc9cb805abcf7f13ad21b9612dce2717b755376b | [
"MIT"
] | null | null | null | """
Django settings for app project.
Generated by 'django-admin startproject' using Django 3.2.3.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
import os
from pa... | 24.695652 | 91 | 0.667505 |
2de6e74ca4c91f2e98a7bab39b3eb407f5c3200f | 1,615 | py | Python | tests/test_utils.py | exacaster/markdown_frames | 7a7107f1c00f0392f600fd5d503364b5ab1a71a6 | [
"MIT"
] | 4 | 2022-02-04T13:23:37.000Z | 2022-02-21T00:23:12.000Z | tests/test_utils.py | exacaster/markdown_frames | 7a7107f1c00f0392f600fd5d503364b5ab1a71a6 | [
"MIT"
] | 2 | 2022-02-04T14:31:15.000Z | 2022-02-07T06:52:46.000Z | tests/test_utils.py | exacaster/markdown_frames | 7a7107f1c00f0392f600fd5d503364b5ab1a71a6 | [
"MIT"
] | null | null | null | from markdown_frames.utils import parse_file, parse_markdown
def test_parse_markdown() -> None:
table1 = """
| column1 | column2 | column3 |
| str | int | float |
| ------- | ------- | ------- |
| hello | 1 | 1.11 |
"""
table2 = """
| column... | 28.333333 | 60 | 0.464396 |
2de724ed2b9163b7a4339ec0d31bf8c769ae7f9b | 7,081 | py | Python | tractseg/libs/Mrtrix.py | magreiner/TractSeg | 5ac5278fc3a6d3262f9f06924dbdde01b399ccf6 | [
"Apache-2.0"
] | null | null | null | tractseg/libs/Mrtrix.py | magreiner/TractSeg | 5ac5278fc3a6d3262f9f06924dbdde01b399ccf6 | [
"Apache-2.0"
] | null | null | null | tractseg/libs/Mrtrix.py | magreiner/TractSeg | 5ac5278fc3a6d3262f9f06924dbdde01b399ccf6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Division of Medical Image Computing, German Cancer Research Center (DKFZ)
#
# 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
#... | 53.643939 | 154 | 0.568564 |
2de7387d9c67c4cf6686b5a12653424bad98efb2 | 1,446 | py | Python | data/Location/Locator.py | SLAB-NLP/Akk | baa07b0fdf8c7d8623fbd78508867c30a8a7ff6d | [
"MIT"
] | 5 | 2021-09-14T07:09:07.000Z | 2021-11-15T19:43:13.000Z | data/Location/Locator.py | SLAB-NLP/Akk | baa07b0fdf8c7d8623fbd78508867c30a8a7ff6d | [
"MIT"
] | null | null | null | data/Location/Locator.py | SLAB-NLP/Akk | baa07b0fdf8c7d8623fbd78508867c30a8a7ff6d | [
"MIT"
] | 1 | 2021-11-15T19:43:19.000Z | 2021-11-15T19:43:19.000Z | from re import search
import numpy as np
import pandas as pd
from scipy.spatial.distance import euclidean as distance
LOCATION_TABLE = pd.read_csv("data/Location/toponym_cordinate.csv",index_col="Name")
# def _convert_coordinate(coordinate: str) -> np.array:
# '''HELPER: get a Coordinate as a string and returns i... | 38.052632 | 143 | 0.695021 |
2de7753ee0e7e2b3b6b114c1752496e7886d7318 | 425 | py | Python | project/user/models/role.py | fv316/flask-template-project | 026459b299c7aa4d82c2b59b98e3c929b4786a78 | [
"MIT"
] | 9 | 2017-02-08T21:42:15.000Z | 2021-12-15T05:18:18.000Z | project/user/models/role.py | fv316/flask-template-project | 026459b299c7aa4d82c2b59b98e3c929b4786a78 | [
"MIT"
] | 10 | 2016-07-25T11:00:08.000Z | 2019-09-25T14:56:40.000Z | project/user/models/role.py | fv316/flask-template-project | 026459b299c7aa4d82c2b59b98e3c929b4786a78 | [
"MIT"
] | 7 | 2016-11-01T20:11:03.000Z | 2020-02-04T14:25:49.000Z | # !/usr/bin/python
# -*- coding: utf-8 -*-
from sqlalchemy import Column, Integer, String, Unicode
from project.database import Base
class Role(Base):
__tablename__ = 'roles'
id = Column(Integer(), primary_key=True)
name = Column(String(50), nullable=False, server_default=u'', unique=True)
label = Co... | 26.5625 | 78 | 0.672941 |
2de78dce615d622354af2b52092291589c050fbc | 2,167 | py | Python | tests/pipeline/test_mpca_trainer.py | 19valentin99/pykale | 4bfc7d49b255d00dbcba39dd9aaf787a8ae0b4ad | [
"MIT"
] | 324 | 2020-11-05T19:07:11.000Z | 2022-03-16T21:31:39.000Z | tests/pipeline/test_mpca_trainer.py | 19valentin99/pykale | 4bfc7d49b255d00dbcba39dd9aaf787a8ae0b4ad | [
"MIT"
] | 212 | 2020-10-31T15:18:59.000Z | 2022-03-25T14:13:09.000Z | tests/pipeline/test_mpca_trainer.py | sz144/pykale | 1f5cce57a50f7772520a482e8135a391eb0517f5 | [
"MIT"
] | 52 | 2020-10-28T15:43:48.000Z | 2022-02-24T02:29:52.000Z | import matplotlib.figure
import numpy as np
import pytest
from numpy import testing
from sklearn.metrics import accuracy_score, roc_auc_score
from kale.interpret import model_weights, visualize
from kale.pipeline.mpca_trainer import MPCATrainer
CLASSIFIERS = ["svc", "linear_svc", "lr"]
PARAMS = [
{"classifier_par... | 34.396825 | 98 | 0.662206 |
2de79c6deefd665410b8d0d9c76719f3065a5467 | 2,734 | py | Python | tests/test_util.py | joseph-hellerstein/symSBML-deprecated | 197f1860bb2e8c5648b3d95d51f8b774fadcaa68 | [
"MIT"
] | null | null | null | tests/test_util.py | joseph-hellerstein/symSBML-deprecated | 197f1860bb2e8c5648b3d95d51f8b774fadcaa68 | [
"MIT"
] | null | null | null | tests/test_util.py | joseph-hellerstein/symSBML-deprecated | 197f1860bb2e8c5648b3d95d51f8b774fadcaa68 | [
"MIT"
] | null | null | null | from simple_sbml import constants as cn
from simple_sbml import exceptions
from simple_sbml import util
import libsbml
import numpy as np
import os
import unittest
NUM_S1 = 2
NUM_S2 = 3
IGNORE_TEST = False
ANTIMONY_STG = '''
%dS1 -> %dS2; 1
S1 = 0
S2 = 0
''' % (NUM_S1, NUM_S2)
ZIP_PATH = os.path.join(cn.BIOMODELS_D... | 24.19469 | 68 | 0.633504 |
2de7a6490a1681baf1fa43aee78c909f4d15c959 | 59 | py | Python | Tools/BuildSlaveSupport/ews-app/ews/models/__init__.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/BuildSlaveSupport/ews-app/ews/models/__init__.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/BuildSlaveSupport/ews-app/ews/models/__init__.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | from build import *
from patch import *
from step import *
| 14.75 | 19 | 0.745763 |
2de7ac695ccc327ae15e920059630e89a91cf117 | 6,435 | py | Python | python_modules/dagster/dagster_tests/cli_tests/test_workspace_config_schema.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/cli_tests/test_workspace_config_schema.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/cli_tests/test_workspace_config_schema.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import yaml
from dagster.core.test_utils import environ
from dagster.core.workspace.config_schema import process_workspace_config
def _validate_yaml_contents(yaml_contents):
return process_workspace_config(yaml.safe_load(yaml_contents))
def test_python_file():
terse_workspace_yaml = """
load_from:
- py... | 24.94186 | 92 | 0.676923 |
2de7c754a0d6e192a97b1149bec044c06562a295 | 6,576 | py | Python | oos/sports_generic/objects.py | armstrys/oos | 800cb4e54575c3976793d794c12f9df3f5a49624 | [
"Apache-2.0"
] | null | null | null | oos/sports_generic/objects.py | armstrys/oos | 800cb4e54575c3976793d794c12f9df3f5a49624 | [
"Apache-2.0"
] | null | null | null | oos/sports_generic/objects.py | armstrys/oos | 800cb4e54575c3976793d794c12f9df3f5a49624 | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: 01_sports_generic.objects.ipynb (unless otherwise specified).
__all__ = ['Team', 'Player', 'Game']
# Cell
import uuid
# from handlers.players import Players
from ..base import Base_Object
class Team(Base_Object):
'''
Simple class to hold team info
'''
# _... | 26.304 | 105 | 0.605991 |
2de7f47263ba827e332538396ed429c38cd5878d | 3,161 | py | Python | test/vanilla/low-level/Expected/AcceptanceTests/ReportLowLevel/reportlowlevel/_auto_rest_report_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/low-level/Expected/AcceptanceTests/ReportLowLevel/reportlowlevel/_auto_rest_report_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/low-level/Expected/AcceptanceTests/ReportLowLevel/reportlowlevel/_auto_rest_report_service.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 36.755814 | 100 | 0.650111 |
2de7fc446923c7bf49ad9931c7cea1241f29be6e | 1,177 | py | Python | tools/azure-devtools/src/azure_devtools/perfstress_tests/system_perfstress/socket_http_get_test.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | tools/azure-devtools/src/azure_devtools/perfstress_tests/system_perfstress/socket_http_get_test.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | tools/azure-devtools/src/azure_devtools/perfstress_tests/system_perfstress/socket_http_get_test.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 35.666667 | 102 | 0.587935 |
2de8117977ca9485ab284a8f2567f87429d29888 | 931 | py | Python | chess/main.py | lestherll/chess | 68c8da3f8dc7e47cc96dc87f5792ed2abab78ecb | [
"MIT"
] | 2 | 2021-10-17T03:07:08.000Z | 2021-12-27T07:01:27.000Z | chess/main.py | lestherll/chess | 68c8da3f8dc7e47cc96dc87f5792ed2abab78ecb | [
"MIT"
] | null | null | null | chess/main.py | lestherll/chess | 68c8da3f8dc7e47cc96dc87f5792ed2abab78ecb | [
"MIT"
] | null | null | null | from chess.custom_typehints import Colour
from chess.model.game import Game
from chess.model.move_generator import generate_move, get_attack_coords, _get_pawn_diag_attack
from chess.model.pieces import Piece, Pawn
from model.board import Board, Block
# board = Board()
# # for row in board.blocks:
# # print(row)
# ... | 25.861111 | 94 | 0.726101 |
2de814c33fd3e9a2dfb61bc69923dfd7ef18a46f | 5,105 | py | Python | topi/tests/python/test_topi_group_conv2d_NCHWc_int8.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 2 | 2019-07-29T06:26:59.000Z | 2019-07-29T06:27:02.000Z | topi/tests/python/test_topi_group_conv2d_NCHWc_int8.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | null | null | null | topi/tests/python/test_topi_group_conv2d_NCHWc_int8.py | mingwayzhang/tvm | 3b287c4d4e6d83e6fd30db47ffa3d5481a332a63 | [
"Apache-2.0"
] | 1 | 2019-12-03T13:53:44.000Z | 2019-12-03T13:53:44.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 42.541667 | 143 | 0.654848 |
2de824ed6fed93dacc6e39bda7fd052533d6057d | 2,134 | py | Python | JDjango/api/future/test.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | 3 | 2020-12-28T05:09:02.000Z | 2021-06-23T10:02:03.000Z | JDjango/api/future/test.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | JDjango/api/future/test.py | JIYANG-PLUS/JDjango | 57cbb13b2b4c07f34d546c0c637c22f60c1e692a | [
"MIT"
] | null | null | null | import wx
import wx.aui as aui
text = """\
Hello!
Welcome to this little demo of draggable tabs using the aui module.
To try it out, drag a tab from the top of the window all the way to the bottom. After releasing the mouse, the tab will dock at the hinted position. Then try it again with the remaining tabs in va... | 35.566667 | 338 | 0.631678 |
2de8555a7eeac5acb5a114b2a8d9c98250a6aef0 | 3,429 | py | Python | mauveinternet/forms.py | lordmauve/django-mauveinternet | 0c4143021c16f7ae7b6f60da0f3f9ab37ff9eaad | [
"MIT"
] | null | null | null | mauveinternet/forms.py | lordmauve/django-mauveinternet | 0c4143021c16f7ae7b6f60da0f3f9ab37ff9eaad | [
"MIT"
] | null | null | null | mauveinternet/forms.py | lordmauve/django-mauveinternet | 0c4143021c16f7ae7b6f60da0f3f9ab37ff9eaad | [
"MIT"
] | null | null | null | """A collection of shortcuts for Django forms that aim to solve some of the problems I
routinely face when programming with forms.
The objective is to create a compatible package by replacing and subclassing, to
make it possible to replace
from django import forms
with
from mauveinternet import forms
"""
import re
... | 35.350515 | 124 | 0.648294 |
2de8a02bbe0677c6673e9e8221161faad16f3950 | 2,666 | py | Python | ucb_cs61A/projects/maps/tests/03.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | null | null | null | ucb_cs61A/projects/maps/tests/03.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | 1 | 2017-07-31T08:15:26.000Z | 2017-07-31T08:15:26.000Z | ucb_cs61A/projects/maps/tests/03.py | tavaresdong/courses-notes | 7fb89103bca679f5ef9b14cbc777152daac1402e | [
"MIT"
] | 1 | 2019-10-06T16:52:31.000Z | 2019-10-06T16:52:31.000Z | test = {
'name': 'Problem 3',
'points': 1,
'suites': [
{
'cases': [
{
'answer': 'pair; e.g. [1, 1]',
'choices': [
'number; e.g. 1',
"restaurant; e.g. make_restaurant('A', [1, 1], ['Food'], 1, [])",
'pair; e.g. [1, 1]',
"string o... | 25.883495 | 77 | 0.326707 |
2de8b49a7d6a0389a08ccd7148ba1ecef7486465 | 13,382 | py | Python | teuthology/nuke/actions.py | alfredodeza/teuthology | aaff5feb6994cabffa4211bdfddc74fc08b65c50 | [
"MIT"
] | 1 | 2017-12-03T00:06:02.000Z | 2017-12-03T00:06:02.000Z | teuthology/nuke/actions.py | alfredodeza/teuthology | aaff5feb6994cabffa4211bdfddc74fc08b65c50 | [
"MIT"
] | null | null | null | teuthology/nuke/actions.py | alfredodeza/teuthology | aaff5feb6994cabffa4211bdfddc74fc08b65c50 | [
"MIT"
] | null | null | null | import logging
import time
from ..misc import get_testdir, reconnect
from ..orchestra import run
from ..orchestra.remote import Remote
from ..task import install as install_task
log = logging.getLogger(__name__)
def clear_firewall(ctx):
"""
Remove any iptables rules created by teuthology. These rules are
... | 30.905312 | 79 | 0.488268 |
2de91d5331b51dc4ab46c56a91a2481f7285cc3e | 5,544 | py | Python | test/test_ctrl/WaterPapCtrl.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 43 | 2016-11-25T15:21:23.000Z | 2021-08-20T06:09:40.000Z | test/test_ctrl/WaterPapCtrl.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 1,263 | 2016-11-25T15:58:37.000Z | 2021-11-02T22:23:47.000Z | test/test_ctrl/WaterPapCtrl.py | marc2332/sardana | 48dc9191baaa63f6c714d8c025e8f3f96548ad26 | [
"CC-BY-3.0"
] | 58 | 2016-11-21T11:33:55.000Z | 2021-09-01T06:21:21.000Z | import PyTango
import socket
import MotorController
class IcePapController(MotorController.MotorController):
"This class is the Tango Sardana motor controller for the ICEPAP"
ctrl_extra_attributes = {'First_extra': {'Type': 'PyTango.DevDouble', 'R/W Type': 'PyTango.READ_WRITE'},
... | 34.01227 | 142 | 0.621934 |
2de92a2f0cc71eb4e5a067020c8d0f356e7b8ce6 | 1,804 | py | Python | amodal_test.py | zhixuanli/SLN-Amodal | 266c648f6838e37f3ada7223f212b21f730ffb64 | [
"MIT"
] | 25 | 2019-08-17T16:04:58.000Z | 2022-03-28T03:00:42.000Z | amodal_test.py | zhixuanli/SLN-Amodal | 266c648f6838e37f3ada7223f212b21f730ffb64 | [
"MIT"
] | 6 | 2019-10-17T11:02:44.000Z | 2021-09-16T08:13:24.000Z | amodal_test.py | zhixuanli/SLN-Amodal | 266c648f6838e37f3ada7223f212b21f730ffb64 | [
"MIT"
] | 6 | 2019-09-03T05:26:35.000Z | 2022-02-07T17:51:31.000Z | import os
import skimage.io
import pickle
import model as modellib
from modal.deeplabv2 import *
from amodal_train import Amodalfig
# Root directory of the project
ROOT_DIR = os.getcwd()
# Directory to save logs and trained model
MODEL_DIR = os.path.join(ROOT_DIR, "logs")
IMAGE_DIR = os.path.join(ROOT_DIR, "images"... | 27.333333 | 78 | 0.712306 |
2de92d7db75ad9fbb3a2fce933f15aacbf08936c | 6,878 | py | Python | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_fc_volume_source.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_fc_volume_source.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/kubernetes/client/models/v1_fc_volume_source.py | DiptoChakrabarty/Kube-Automate | 2072d1aadd58eb405c7308ff5cfecbf50300ead3 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.15
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1FCV... | 30.299559 | 197 | 0.591742 |
2de93d5255d391258d9d8ba7d322ef8dada89075 | 3,863 | py | Python | astwro/config/config.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 6 | 2017-06-15T20:34:51.000Z | 2020-04-15T14:21:43.000Z | astwro/config/config.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 18 | 2017-08-15T20:53:55.000Z | 2020-10-05T23:40:34.000Z | astwro/config/config.py | majkelx/astwro | 4a9bbe3e4757c4076ad7c0d90cf08e38dab4e794 | [
"MIT"
] | 2 | 2017-11-06T15:33:53.000Z | 2020-10-02T21:06:05.000Z | from __future__ import absolute_import, division, print_function
__metaclass__ = type
# see https://wiki.python.org/moin/PortingToPy3k/BilingualQuickRef
try:
from ConfigParser import ConfigParser, NoOptionError, NoSectionError # python 2
except ImportError:
from configparser import ConfigParser, NoOptionError,... | 31.92562 | 101 | 0.646907 |
2de94357c805379cd867b81ad20767a9e7a2ebb2 | 15,016 | py | Python | nova/virt/hyperv/driver.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | nova/virt/hyperv/driver.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | nova/virt/hyperv/driver.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010 Cloud.com, Inc
# Copyright (c) 2012 Cloudbase Solutions Srl
#
# 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.... | 42.659091 | 79 | 0.629196 |
2de946f46404c409137db2dafac1ba42fb6c331b | 8,417 | py | Python | synapse/python_dependencies.py | yunwah/synapse | f7f4978134f63104d958c9d28f7d98886e1fe43a | [
"Apache-2.0"
] | null | null | null | synapse/python_dependencies.py | yunwah/synapse | f7f4978134f63104d958c9d28f7d98886e1fe43a | [
"Apache-2.0"
] | 1 | 2021-05-13T17:27:16.000Z | 2021-05-19T14:38:32.000Z | synapse/python_dependencies.py | yunwah/synapse | f7f4978134f63104d958c9d28f7d98886e1fe43a | [
"Apache-2.0"
] | null | null | null | # Copyright 2015, 2016 OpenMarket Ltd
# Copyright 2017 Vector Creations Ltd
# Copyright 2018 New Vector Ltd
# Copyright 2020 The Matrix.org Foundation C.I.C.
#
# 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 ... | 34.215447 | 88 | 0.632886 |
2de952462186e390259a508322d86597ba17feb8 | 7,253 | py | Python | utils.py | dylanrandle/interpret-RL | be59846ccfc17b16e37b6940dd5d7306815040b3 | [
"MIT"
] | null | null | null | utils.py | dylanrandle/interpret-RL | be59846ccfc17b16e37b6940dd5d7306815040b3 | [
"MIT"
] | null | null | null | utils.py | dylanrandle/interpret-RL | be59846ccfc17b16e37b6940dd5d7306815040b3 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import os
import pickle
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression, LinearRegression
from sklearn.ensemble import RandomForestClassifier, ExtraTreesClassifier
from sklearn.tree import DecisionTreeClassifier
from corel... | 32.671171 | 113 | 0.638908 |
2de96b68e34f7f97a493f009688fa8a4a1090dec | 272 | py | Python | zubhub_backend/zubhub/creators/permissions.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | 1 | 2022-01-21T14:15:24.000Z | 2022-01-21T14:15:24.000Z | zubhub_backend/zubhub/creators/permissions.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | null | null | null | zubhub_backend/zubhub/creators/permissions.py | NdibeRaymond/zubhub | 23907202af4f4f4f85a108ed15e811abb3d22407 | [
"MIT"
] | null | null | null | from rest_framework.permissions import BasePermission
class IsOwner(BasePermission):
message = "You must be the owner of this object to perform this function"
def has_object_permission(self, request, view, objects):
return objects.pk == request.user.pk
| 30.222222 | 77 | 0.757353 |
2de96e7f1fbd0a499ca713e42d8a759405902701 | 1,121 | py | Python | models/utils/scheduler/linear_scheduler.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 143 | 2021-12-03T02:33:36.000Z | 2022-03-29T00:01:48.000Z | models/utils/scheduler/linear_scheduler.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 33 | 2021-12-03T10:32:05.000Z | 2022-03-31T02:13:55.000Z | models/utils/scheduler/linear_scheduler.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 24 | 2021-12-04T06:46:42.000Z | 2022-03-30T07:57:47.000Z | class LinearScheduler:
def __init__(self, initial_value, ultimate_value, begin_step, end_step, per_iteration=True):
self.initial_value = initial_value
self.ultimate_value = ultimate_value
self.begin_step = begin_step
self.end_step = end_step
self.step_size = (ultimate_value -... | 32.970588 | 96 | 0.6405 |
2de9722cc62e5ba43628a63f15f7bcf157d3e322 | 1,146 | py | Python | ocd_backend/extractors/ob.py | openstate/kamervragen | 0b9486dfe1521f3e88b144f9cc8ad2b32ff24834 | [
"CC-BY-4.0"
] | 2 | 2018-03-15T16:32:59.000Z | 2021-04-06T01:37:18.000Z | ocd_backend/extractors/ob.py | openstate/kamervragen | 0b9486dfe1521f3e88b144f9cc8ad2b32ff24834 | [
"CC-BY-4.0"
] | 7 | 2017-07-06T11:45:54.000Z | 2022-03-11T23:14:16.000Z | ocd_backend/extractors/ob.py | openstate/kamervragen | 0b9486dfe1521f3e88b144f9cc8ad2b32ff24834 | [
"CC-BY-4.0"
] | 2 | 2018-04-05T09:46:44.000Z | 2018-04-13T14:29:02.000Z | import copy
import json
from pprint import pprint
from ocd_backend.extractors import BaseExtractor
from ocd_backend.exceptions import ConfigurationError
import feedparser
class OBExtrator(BaseExtractor):
def __init__(self, *args, **kwargs):
super(OBExtrator, self).__init__(*args, **kwargs)
if '... | 29.384615 | 77 | 0.650087 |
2de9b7e9c8c859ed6ff6b4c88c20b0f7ef6e4ecf | 18,380 | py | Python | tools/merge_vhdx.py | jonathan-greig/docker-explorer | edd7f89effc2c167bc809841212701a6e0518075 | [
"Apache-2.0"
] | null | null | null | tools/merge_vhdx.py | jonathan-greig/docker-explorer | edd7f89effc2c167bc809841212701a6e0518075 | [
"Apache-2.0"
] | null | null | null | tools/merge_vhdx.py | jonathan-greig/docker-explorer | edd7f89effc2c167bc809841212701a6e0518075 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Copyright 2020 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | 35.620155 | 78 | 0.716703 |
2dea10f42ceec42b6b139733a86f42fde50026d8 | 6,820 | py | Python | rally/common/objects/deploy.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | rally/common/objects/deploy.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | rally/common/objects/deploy.py | DeanHwd/rally | d284aa0746c54f1c375470e76dd206d19877a7fd | [
"Apache-2.0"
] | null | null | null | # Copyright 2013: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 36.470588 | 78 | 0.594135 |
2dea2fd8f86e85cad47f6047fdc321e79e4b8b44 | 694 | py | Python | robotics/pose/screw.py | wlbksy/robotics | a031a20bdf3e8734f3dcfe31d5c54405ff29415e | [
"MIT"
] | null | null | null | robotics/pose/screw.py | wlbksy/robotics | a031a20bdf3e8734f3dcfe31d5c54405ff29415e | [
"MIT"
] | null | null | null | robotics/pose/screw.py | wlbksy/robotics | a031a20bdf3e8734f3dcfe31d5c54405ff29415e | [
"MIT"
] | null | null | null | import numpy as np
# skew-symmetric matrix is a square matrix whose transpose equals its negative.
# A.T = -A
def skew2D(v: float) -> np.array:
"""The skew symmetric representation of vector v
"""
return np.array([[0, -v], [v, 0]])
def skew3D(v: np.array) -> np.array:
"""The skew symmetric represen... | 23.931034 | 79 | 0.595101 |
2dea3f56601ecf3a0cad2606084a36f6a359e36c | 1,779 | py | Python | lib/base/color.py | federico123579/BigBrother | 9b61dcf8fd84b6491690ae83bf695bc2b64b17b3 | [
"MIT"
] | 29 | 2017-03-14T11:48:54.000Z | 2022-02-22T02:01:25.000Z | lib/base/color.py | federico123579/BigBrother | 9b61dcf8fd84b6491690ae83bf695bc2b64b17b3 | [
"MIT"
] | null | null | null | lib/base/color.py | federico123579/BigBrother | 9b61dcf8fd84b6491690ae83bf695bc2b64b17b3 | [
"MIT"
] | 10 | 2017-07-16T18:58:05.000Z | 2021-09-27T23:45:24.000Z | #!/usr/bin/env python
'''
Module that contains all ANSCII escape colors.
'''
# CONSTANTS
CYAN = '\033[96m'
PURPLE = '\033[95m'
BLUE = '\033[94m'
GREEN = '\033[92m'
YELLOW = '\033[93m'
RED = '\033[91m'
WHITE = '\033[0m'
MAGENTA = '\033[35m'
BOLD = '\033[01m'
UNDERLINE = '\033[04m'
# COLOR FUNCTIONS
def bold(str):
... | 25.782609 | 78 | 0.587409 |
2dea5ba2fea5bc9838953c5c7ffba823499d0f0d | 4,206 | py | Python | app/alembic/versions/eca6746e004b_.py | flych3r/spotify-tracker | 306d549da6a57866ea480c85286d870e7653a1eb | [
"MIT"
] | 2 | 2021-06-25T00:24:13.000Z | 2021-07-10T13:00:39.000Z | app/alembic/versions/eca6746e004b_.py | flych3r/spotify-tracker | 306d549da6a57866ea480c85286d870e7653a1eb | [
"MIT"
] | null | null | null | app/alembic/versions/eca6746e004b_.py | flych3r/spotify-tracker | 306d549da6a57866ea480c85286d870e7653a1eb | [
"MIT"
] | 2 | 2021-05-16T01:40:39.000Z | 2021-07-10T12:59:07.000Z | """empty message
Revision ID: eca6746e004b
Revises:
Create Date: 2021-04-30 17:26:50.533979
"""
import sqlalchemy as sa
from alembic import op
# revision identifiers, used by Alembic.
revision = 'eca6746e004b'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto genera... | 39.679245 | 98 | 0.660723 |
2dea745ad1edffae74ae87489ee9382ccfafaf75 | 8,400 | py | Python | hardware/ipmi.py | constructorfleet/hardware | 6d5252740e83805b97ab0e6c3985dea7fd4fd262 | [
"Apache-2.0"
] | null | null | null | hardware/ipmi.py | constructorfleet/hardware | 6d5252740e83805b97ab0e6c3985dea7fd4fd262 | [
"Apache-2.0"
] | null | null | null | hardware/ipmi.py | constructorfleet/hardware | 6d5252740e83805b97ab0e6c3985dea7fd4fd262 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2013 eNovance SAS <licensing@enovance.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 applicabl... | 33.070866 | 107 | 0.565357 |
2dea7a8ab1ea7136989d0b3663e206d7b26fb402 | 84 | py | Python | nozama-cloudsearch-data/nozama/cloudsearch/data/__init__.py | iGamesInc/nozama-cloudsearch | 2f3637a98d4ef594cec0273a9c9c4cd8a8aac375 | [
"BSD-3-Clause"
] | null | null | null | nozama-cloudsearch-data/nozama/cloudsearch/data/__init__.py | iGamesInc/nozama-cloudsearch | 2f3637a98d4ef594cec0273a9c9c4cd8a8aac375 | [
"BSD-3-Clause"
] | null | null | null | nozama-cloudsearch-data/nozama/cloudsearch/data/__init__.py | iGamesInc/nozama-cloudsearch | 2f3637a98d4ef594cec0273a9c9c4cd8a8aac375 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
nozama-cloudsearch-model
nozama.cloudsearch.model
"""
| 10.5 | 24 | 0.642857 |
2deaa8c14060aacc36837080fd513f352c21dfac | 3,618 | py | Python | utils.py | ScienceParkStudyGroup/nlp_pubmed | aa92b44d7c965bda6ec1cb61e655e7b9592957e2 | [
"Apache-2.0"
] | null | null | null | utils.py | ScienceParkStudyGroup/nlp_pubmed | aa92b44d7c965bda6ec1cb61e655e7b9592957e2 | [
"Apache-2.0"
] | null | null | null | utils.py | ScienceParkStudyGroup/nlp_pubmed | aa92b44d7c965bda6ec1cb61e655e7b9592957e2 | [
"Apache-2.0"
] | null | null | null | # MRH, Dec 2021
import requests
import xml.etree.ElementTree as et
import regex as re
tag_remove = ['italic', 'bold', 'sup', 'sub', 'underline', 'title', 'sec', 'p',
'list', 'list-item', 'named-content']
total_remove = ['xref', 'table-wrap', 'fig', 'label', 'a', 'inline-formula']
def extract_clean(text,... | 34.132075 | 126 | 0.616915 |
2deab7ac58199c424fb871049a992254e3b3d266 | 49,166 | py | Python | utils.py | yueb17/UtilsHub | 5135eda475a857f2706aa7545ba0393ab267a51d | [
"MIT"
] | null | null | null | utils.py | yueb17/UtilsHub | 5135eda475a857f2706aa7545ba0393ab267a51d | [
"MIT"
] | null | null | null | utils.py | yueb17/UtilsHub | 5135eda475a857f2706aa7545ba0393ab267a51d | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.init as init
from torch.utils.data import Dataset
import torch.nn.functional as F
import torchvision
from torch.autograd import Variable
from pprint import pprint
import time, math, os, sys, copy, numpy as np, shutil as sh
import matplotlib.pyplot as plt
from mpl_toolk... | 35.861415 | 210 | 0.616747 |
2deac23f84b2b6b448ad9551b86b454dd052954f | 12,794 | py | Python | src/filetransfer/config.py | andreas19/FileTransfer | 48a6bde2332d57f83064bf0eebfdc4ec4364d6cd | [
"BSD-3-Clause"
] | 1 | 2019-05-10T15:57:39.000Z | 2019-05-10T15:57:39.000Z | src/filetransfer/config.py | andreas19/FileTransfer | 48a6bde2332d57f83064bf0eebfdc4ec4364d6cd | [
"BSD-3-Clause"
] | null | null | null | src/filetransfer/config.py | andreas19/FileTransfer | 48a6bde2332d57f83064bf0eebfdc4ec4364d6cd | [
"BSD-3-Clause"
] | null | null | null | """Configuration module."""
import configparser
import io
import logging
import os
from datetime import datetime
from email.utils import parseaddr
from pathlib import Path
from urllib.parse import urlunsplit
import easimpconf
from salmagundi import strings
from . import const
from .exceptions import ConfigError
from... | 40.106583 | 80 | 0.594341 |
2deac97f3e8b018d0c6fc8360edcf00a4402d740 | 8,570 | py | Python | tools/train.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | tools/train.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | tools/train.py | liuhd073/mmgeneration | 2e09a6b63c5f0ddee850d429c5b739ae1e0cc76d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
import argparse
import copy
import multiprocessing as mp
import os
import os.path as osp
import platform
import time
import warnings
import cv2
import mmcv
import torch
from mmcv import Config, DictAction
from mmcv.runner import get_dist_info, init_dist
from mmcv.utils i... | 37.423581 | 112 | 0.649708 |
2deaf50de724d004245e121a596f72fa5bc4e905 | 5,143 | py | Python | mlni/clustering.py | anbai106/pyhydra | 1b1060c06b15c02ca417fee13dc7def77b95d4da | [
"MIT"
] | 1 | 2022-03-21T13:18:13.000Z | 2022-03-21T13:18:13.000Z | mlni/clustering.py | anbai106/pyhydra | 1b1060c06b15c02ca417fee13dc7def77b95d4da | [
"MIT"
] | 4 | 2021-04-20T13:37:32.000Z | 2021-05-07T01:54:22.000Z | mlni/clustering.py | anbai106/pyhydra | 1b1060c06b15c02ca417fee13dc7def77b95d4da | [
"MIT"
] | 2 | 2020-10-24T16:45:07.000Z | 2021-01-11T03:13:17.000Z | import os
import numpy as np
import pandas as pd
from mlni.utils import consensus_clustering, cv_cluster_stability, hydra_solver_svm, time_bar
from mlni.base import WorkFlow
__author__ = "Junhao Wen"
__copyright__ = "Copyright 2019-2020 The CBICA & SBIA Lab"
__credits__ = ["Junhao Wen, Erdem Varol"]
__license__ = "See... | 53.020619 | 145 | 0.65701 |
2deb189629b33a69e3641145418e23cb922513a0 | 23,940 | py | Python | NEMbox/api.py | hyskyder/musicbox | ec06a49cc59c683f7f5e69fad5097c34a8a7984c | [
"MIT"
] | null | null | null | NEMbox/api.py | hyskyder/musicbox | ec06a49cc59c683f7f5e69fad5097c34a8a7984c | [
"MIT"
] | null | null | null | NEMbox/api.py | hyskyder/musicbox | ec06a49cc59c683f7f5e69fad5097c34a8a7984c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Author: omi
# @Date: 2014-08-24 21:51:57
'''
网易云音乐 Api
'''
from __future__ import (
print_function, unicode_literals, division, absolute_import
)
import json
import os
from collections import OrderedDict
from http.cookiejar import LWPCookieJar
from http.cookiejar ... | 33.203883 | 182 | 0.514411 |
2deb264caffa3311c0ead8d2cc26a28a043b37bb | 7,137 | py | Python | build.py | IVFSTEST/pybuilder | 2006a2da7b1f990d2cc981bebb88870ac9c2725b | [
"Apache-2.0"
] | 1 | 2020-04-17T01:02:10.000Z | 2020-04-17T01:02:10.000Z | build.py | IVFSTEST/pybuilder | 2006a2da7b1f990d2cc981bebb88870ac9c2725b | [
"Apache-2.0"
] | null | null | null | build.py | IVFSTEST/pybuilder | 2006a2da7b1f990d2cc981bebb88870ac9c2725b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of PyBuilder
#
# Copyright 2011-2020 PyBuilder 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
#
# h... | 40.322034 | 116 | 0.654757 |
2deb2b21e7a241bb368bc7c5bb21de1a8ab03f9b | 1,271 | py | Python | evap/evaluation/migrations/0128_django_40_noop.py | JannisBerndt/EvaP | a3ca8bcf091e811421084c4db14ae9666cf2a27f | [
"MIT"
] | 26 | 2015-01-18T18:01:57.000Z | 2018-10-12T14:37:15.000Z | evap/evaluation/migrations/0128_django_40_noop.py | JannisBerndt/EvaP | a3ca8bcf091e811421084c4db14ae9666cf2a27f | [
"MIT"
] | 737 | 2015-01-02T17:43:25.000Z | 2018-12-10T20:45:10.000Z | evap/evaluation/migrations/0128_django_40_noop.py | JannisBerndt/EvaP | a3ca8bcf091e811421084c4db14ae9666cf2a27f | [
"MIT"
] | 83 | 2015-01-14T12:39:41.000Z | 2018-10-29T16:36:43.000Z | # Generated by Django 4.0.4 on 2022-04-27 23:25
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('evaluation', '0127_fix_logentry_types'),
]
# Django 4.0 changed the migration autodetector, the release notes state... | 39.71875 | 141 | 0.688434 |
2deb2f42e452e6139cc036510467a8474e35fe4f | 800 | py | Python | constants.py | lehrblogger/where-do-you-go | 51c1fb3a66d8babe00a9412c72ebbd66fe348d88 | [
"MIT"
] | 20 | 2015-04-05T05:44:20.000Z | 2020-12-27T19:47:34.000Z | constants.py | lehrblogger/where-do-you-go | 51c1fb3a66d8babe00a9412c72ebbd66fe348d88 | [
"MIT"
] | null | null | null | constants.py | lehrblogger/where-do-you-go | 51c1fb3a66d8babe00a9412c72ebbd66fe348d88 | [
"MIT"
] | 4 | 2015-04-05T05:44:25.000Z | 2019-01-22T20:54:40.000Z | from os import environ
from gheatae import color_scheme
import logging
min_zoom = 3
max_zoom = 18 # note that these must also be in the static wdyg-private.js file
level_const = 140. #TODO fix this from being hard coded in models.py for UserInfo - I was getting a <type 'exceptions.AttributeError'>: 'module' object ha... | 34.782609 | 182 | 0.7725 |
2deb5b343a9aa0634c7c900fe314b4e47797c9c3 | 9,550 | py | Python | treeCl/parutils.py | kgori/treeCl | 54bdc53b979d0d60c1c5e3f7053c1e82b48e2590 | [
"MIT"
] | 22 | 2015-05-13T12:40:28.000Z | 2022-03-25T09:56:14.000Z | treeCl/parutils.py | kgori/treeCl | 54bdc53b979d0d60c1c5e3f7053c1e82b48e2590 | [
"MIT"
] | 26 | 2015-11-13T09:04:42.000Z | 2021-06-03T18:24:27.000Z | treeCl/parutils.py | kgori/treeCl | 54bdc53b979d0d60c1c5e3f7053c1e82b48e2590 | [
"MIT"
] | 8 | 2015-10-10T19:09:19.000Z | 2020-10-20T20:59:29.000Z | from abc import ABCMeta, abstractmethod
from .constants import PARALLEL_PROFILE
from .utils import setup_progressbar, grouper, flatten_list
import logging
import multiprocessing
import sys
logger = logging.getLogger(__name__)
__author__ = 'kgori'
"""
Introduced this workaround for a bug in multiprocessing where
error... | 33.626761 | 118 | 0.653194 |
2deb81952013136bd74e8af05f822ba9611bc32c | 1,133 | py | Python | venv/Scripts/rst2html5.py | StMay/Mahjong_Server | 66ecbaac0bddafffd439a02a3c422e2f207d4fb9 | [
"MIT"
] | null | null | null | venv/Scripts/rst2html5.py | StMay/Mahjong_Server | 66ecbaac0bddafffd439a02a3c422e2f207d4fb9 | [
"MIT"
] | null | null | null | venv/Scripts/rst2html5.py | StMay/Mahjong_Server | 66ecbaac0bddafffd439a02a3c422e2f207d4fb9 | [
"MIT"
] | null | null | null | #!C:\Users\Steve\PycharmProjects\Mahjong_Server\venv\Scripts\python.exe
# -*- coding: utf8 -*-
# :Copyright: © 2015 Günter Milde.
# :License: Released under the terms of the `2-Clause BSD license`_, in short:
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium wi... | 32.371429 | 78 | 0.721094 |
2deb9af77b8051e8edde919cfc5da485a0ec679c | 6,410 | py | Python | retrobiocat_web/app/biocatdb/routes/contributions/paper_tables.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 9 | 2020-12-01T16:33:02.000Z | 2022-01-19T20:02:42.000Z | retrobiocat_web/app/biocatdb/routes/contributions/paper_tables.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 4 | 2020-10-02T14:38:32.000Z | 2021-08-02T09:23:58.000Z | retrobiocat_web/app/biocatdb/routes/contributions/paper_tables.py | ihayhurst/RetroBioCat | d674897459c0ab65faad5ed3017c55cf51bcc020 | [
"MIT"
] | 6 | 2021-01-14T07:48:36.000Z | 2022-03-20T17:34:27.000Z | from retrobiocat_web.app.biocatdb import bp
from flask import render_template, flash, redirect, url_for, session, request, jsonify
from retrobiocat_web.app.biocatdb.model_forms import PaperInfo
from flask_security import roles_required, current_user
from retrobiocat_web.mongo.models.user_models import User
from retrobi... | 44.513889 | 144 | 0.664587 |
2debb3e820fb3bea80e85ede7af6647bf02ab50f | 3,652 | py | Python | chemkin_io/tests/test__write_reaction.py | sjklipp/interfaces | 646673ac125c4b48e69a64025a36abd1b2ace696 | [
"Apache-2.0"
] | null | null | null | chemkin_io/tests/test__write_reaction.py | sjklipp/interfaces | 646673ac125c4b48e69a64025a36abd1b2ace696 | [
"Apache-2.0"
] | null | null | null | chemkin_io/tests/test__write_reaction.py | sjklipp/interfaces | 646673ac125c4b48e69a64025a36abd1b2ace696 | [
"Apache-2.0"
] | null | null | null | """
tests writers
"""
import chemkin_io
def test__troe_writer():
""" test chemkin_io.writer.reaction.troe
"""
reaction1 = 'CH2OH=CH3O'
high_params = [111111.1111, 1.11, 111.111]
low_params = [222222.2222, 2.22, 222.222]
troe_params1 = [333.333, 4.212, 123211334344.2322]
troe_params2 = [3... | 31.482759 | 78 | 0.614184 |
2debc587d51bac9bacc5ad39a21c158b74916ac2 | 1,540 | py | Python | jinjamator/tools/rest_clients/iperf_api.py | jinjamator/jinjamator-core | 928a6db56a20f57d6f7dc66fb46de71de945817e | [
"Apache-2.0"
] | 7 | 2020-05-06T07:48:14.000Z | 2021-12-11T15:57:26.000Z | jinjamator/tools/rest_clients/iperf_api.py | jinjamator/jinjamator-core | 928a6db56a20f57d6f7dc66fb46de71de945817e | [
"Apache-2.0"
] | 1 | 2020-04-11T15:13:07.000Z | 2020-04-27T20:01:34.000Z | jinjamator/tools/rest_clients/iperf_api.py | jinjamator/jinjamator-core | 928a6db56a20f57d6f7dc66fb46de71de945817e | [
"Apache-2.0"
] | 1 | 2020-05-29T08:53:08.000Z | 2020-05-29T08:53:08.000Z | from jinjamator.external.rest_client.api import API
from jinjamator.external.rest_client.resource import Resource
import logging
from pprint import pformat
class RunState(Resource):
@property
def default_actions(self):
return {
"start": {"method": "POST", "url": "{0}/start".format(self.res... | 38.5 | 87 | 0.568182 |
2debcd22a864d1dd10d94dec838e9ec30e6eee5b | 527 | py | Python | python/tests/test_array_shift.py | ManarAbdelkarim/data-structures-and-algorithms | ece37d03c5931d2d6b0ce2d677635fb718944c38 | [
"MIT"
] | null | null | null | python/tests/test_array_shift.py | ManarAbdelkarim/data-structures-and-algorithms | ece37d03c5931d2d6b0ce2d677635fb718944c38 | [
"MIT"
] | 1 | 2021-05-06T19:41:25.000Z | 2021-05-06T19:41:25.000Z | python/tests/test_array_shift.py | ManarAbdelkarim/data-structures-and-algorithms | ece37d03c5931d2d6b0ce2d677635fb718944c38 | [
"MIT"
] | 2 | 2021-06-06T18:02:58.000Z | 2021-08-15T18:56:26.000Z | from challenges.array_shift.array_shift import *
def test_array1():
actual =[[],1]
expect= None
assert array_shift(actual[0],actual[1]) == expect
def test_array2():
actual = [3,2]
expect= None
assert array_shift(actual[0],actual[1]) == expect
def test_array3():
actual = [[1,2],'... | 21.958333 | 53 | 0.618596 |
2debd2c2a3cfc2c43fedecc39882161553d9d972 | 5,704 | py | Python | make_prg/subcommands/from_msa.py | leoisl/make_prg | 9204cb8a60d8fae0985b4eb464c5dd99c1338d45 | [
"MIT"
] | 1 | 2021-05-07T02:04:07.000Z | 2021-05-07T02:04:07.000Z | make_prg/subcommands/from_msa.py | leoisl/make_prg | 9204cb8a60d8fae0985b4eb464c5dd99c1338d45 | [
"MIT"
] | 9 | 2021-03-22T12:28:06.000Z | 2021-12-17T06:46:51.000Z | make_prg/subcommands/from_msa.py | leoisl/make_prg | 9204cb8a60d8fae0985b4eb464c5dd99c1338d45 | [
"MIT"
] | 2 | 2021-06-29T04:54:22.000Z | 2022-01-03T12:19:59.000Z | import multiprocessing
import os
from pathlib import Path
from loguru import logger
from make_prg import io_utils, prg_builder
from make_prg.from_msa import NESTING_LVL, MIN_MATCH_LEN
from make_prg.utils import output_files_already_exist
def register_parser(subparsers):
subparser_msa = subparsers.add_parser(
... | 33.162791 | 106 | 0.62798 |
2dec05997b7e8203fd68c4f3a82f0e77ff576c3a | 6,189 | py | Python | eval.py | YuyangXueEd/MRI_Recon_Tutorial | 5c235e0831e30528611f492668987caa0f183f80 | [
"MIT"
] | null | null | null | eval.py | YuyangXueEd/MRI_Recon_Tutorial | 5c235e0831e30528611f492668987caa0f183f80 | [
"MIT"
] | null | null | null | eval.py | YuyangXueEd/MRI_Recon_Tutorial | 5c235e0831e30528611f492668987caa0f183f80 | [
"MIT"
] | null | null | null | import sys
import pathlib
import argparse
from argparse import ArgumentParser
from collections import defaultdict
import torch
from torch.utils.data import DataLoader
from fastmri.data.mri_data import SliceData
from fastmri.data.subsample import MaskFunc
from fastmri.data.transforms import to_tensor, apply_mask, \
... | 38.203704 | 116 | 0.64243 |
2dec0e11c7994bb63e21b0f8e516b0272e321d50 | 194 | py | Python | main/dao/document_word.py | sotheara-leang/xFlask | b6899d4b6d1bdc4acfd812bfa8807e2cba7e8df0 | [
"MIT"
] | 2 | 2020-02-11T08:29:49.000Z | 2020-02-17T10:24:36.000Z | main/dao/document_word.py | sotheara-leang/xFlask | b6899d4b6d1bdc4acfd812bfa8807e2cba7e8df0 | [
"MIT"
] | null | null | null | main/dao/document_word.py | sotheara-leang/xFlask | b6899d4b6d1bdc4acfd812bfa8807e2cba7e8df0 | [
"MIT"
] | null | null | null | from xflask.dao import Dao
from main.model.document_word import DocumentWord
class DocumentWordDao(Dao):
def __init__(self):
super(DocumentWordDao, self).__init__(DocumentWord)
| 17.636364 | 59 | 0.762887 |
2dec302f3ea29cce23ca487b5b84b7c4dbc58752 | 1,689 | py | Python | Barbican/Server/barbican-stable-mitaka/barbican/barbican/model/migration/alembic_migrations/versions/46b98cde536_add_project_quotas_table.py | cloud-security-research/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 36 | 2017-11-08T23:36:35.000Z | 2022-03-20T16:01:55.000Z | Barbican/Server/barbican-stable-mitaka/barbican/barbican/model/migration/alembic_migrations/versions/46b98cde536_add_project_quotas_table.py | Calctopia-OpenSource/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 2 | 2017-11-17T03:19:17.000Z | 2018-07-04T03:37:36.000Z | Barbican/Server/barbican-stable-mitaka/barbican/barbican/model/migration/alembic_migrations/versions/46b98cde536_add_project_quotas_table.py | Calctopia-OpenSource/sgx-kms | 2f07bf36721dafe0e4a000ca3f41529dc8d2004a | [
"Apache-2.0"
] | 12 | 2017-11-13T03:20:40.000Z | 2021-07-16T03:26:41.000Z | """Add project quotas table
Revision ID: 46b98cde536
Revises: 1bece815014f
Create Date: 2015-08-28 17:42:35.057103
"""
# revision identifiers, used by Alembic.
revision = '46b98cde536'
down_revision = 'kilo'
from alembic import op
import sqlalchemy as sa
def upgrade():
ctx = op.get_context()
con = op.get_... | 36.717391 | 74 | 0.592066 |
2dec56413b6bbdea1b4f1d01b3ad43c2ac46cd7e | 42,899 | py | Python | nova/tests/unit/cells/test_cells_manager.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/cells/test_cells_manager.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/cells/test_cells_manager.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 1 | 2020-07-24T01:18:44.000Z | 2020-07-24T01:18:44.000Z | # Copyright (c) 2012 Rackspace Hosting
# 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 req... | 47.454646 | 79 | 0.595888 |
2dec57bcceed299f56b6664841120ee2eadd26f4 | 190 | py | Python | data-structures/sorting/quicksort/test/gen.py | andrenbrandao/algorithm-problems | a6413cc7b3810008dd80766ae0d398a7edc58407 | [
"MIT"
] | null | null | null | data-structures/sorting/quicksort/test/gen.py | andrenbrandao/algorithm-problems | a6413cc7b3810008dd80766ae0d398a7edc58407 | [
"MIT"
] | null | null | null | data-structures/sorting/quicksort/test/gen.py | andrenbrandao/algorithm-problems | a6413cc7b3810008dd80766ae0d398a7edc58407 | [
"MIT"
] | null | null | null | import sys
from random import randint
if __name__ == "__main__":
n = int(sys.argv[1])
inputs = []
for i in range(n):
inputs.append(str(i))
print(" ".join(inputs))
| 15.833333 | 29 | 0.584211 |
2dec69ebdd39303acf66296fcf423d5d184b9158 | 5,402 | py | Python | tests/test_notebooks.py | hsolbrig/cachejar | 2018f51397f7789cc02f9e19b50a32ab667d3f7b | [
"Apache-2.0"
] | null | null | null | tests/test_notebooks.py | hsolbrig/cachejar | 2018f51397f7789cc02f9e19b50a32ab667d3f7b | [
"Apache-2.0"
] | null | null | null | tests/test_notebooks.py | hsolbrig/cachejar | 2018f51397f7789cc02f9e19b50a32ab667d3f7b | [
"Apache-2.0"
] | null | null | null | import hashlib
import os
import unittest
import urllib.request
from contextlib import redirect_stdout
from io import StringIO
import cachejar
class ByteSum:
# An MD5 summary of a URL
def __init__(self, url):
self.hash = hashlib.md5(urllib.request.urlopen(url).read()).hexdigest()
class MyClass:
... | 34.407643 | 102 | 0.62699 |
2dec6da4a9ed2432624fa3c70a2b7c2cc3296350 | 9,236 | py | Python | model_zoo/unet.py | misads/torch_image_template | db55be6fcebdb6b0c5c739e505b8a7a2eb81c3c1 | [
"MIT"
] | 5 | 2019-12-23T05:13:15.000Z | 2020-04-09T03:47:53.000Z | torch_template/model_zoo/unet.py | misads/torch_template | 959be6d4bc368c1c3310c3902cc04271cca0941f | [
"MIT"
] | null | null | null | torch_template/model_zoo/unet.py | misads/torch_template | 959be6d4bc368c1c3310c3902cc04271cca0941f | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class NestedUNet(nn.Module):
"""
Implementation of this paper:
https://arxiv.org/pdf/1807.10165.pdf
"""
def __init__(self, in_channel=3, out_channel=3):
super(NestedUNet, self).__init__()
n1 = 64
filters = [n1, n1 * 2, n1 * 4, n1 * 8, n1... | 39.639485 | 106 | 0.594305 |
2dec881531eed67d5e183212d29ad273008aab82 | 1,060 | py | Python | Code Forces/Problem Set/B/keyboard.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | Code Forces/Problem Set/B/keyboard.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | Code Forces/Problem Set/B/keyboard.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z |
if __name__ == '__main__':
n, m, x = map(int, input().split())
keyboard = []
for i in range(n):
keyboard.append(input())
q = int(input())
text = input()
shift_keys = []
cost = dict()
for i in range(n):
for j in range(m):
if keyboard[i][j] == 'S':
... | 26.5 | 62 | 0.40566 |
2dec8d247a5d8cf6a939c5ff4e1508af0ec29596 | 789 | py | Python | django_oci/admin.py | vsoch/django-oci | e60b2d0501ddd45f6ca3596b126180bebb2e6903 | [
"Apache-2.0"
] | 5 | 2020-03-24T23:45:28.000Z | 2021-11-26T03:31:05.000Z | django_oci/admin.py | vsoch/django-oci | e60b2d0501ddd45f6ca3596b126180bebb2e6903 | [
"Apache-2.0"
] | 14 | 2020-04-02T17:13:28.000Z | 2020-12-29T12:36:38.000Z | django_oci/admin.py | vsoch/django-oci | e60b2d0501ddd45f6ca3596b126180bebb2e6903 | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2020, Vanessa Sochat
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, softwa... | 24.65625 | 72 | 0.780735 |
2dec94e0d17377fdb2599e76006689bb7228cd1c | 1,822 | py | Python | GUI.py | gandalf3/The-Queen-s-Workers | 31bdd846949581dbc855a30b64cbf04aabf5c06f | [
"CC-BY-3.0",
"Apache-2.0"
] | 2 | 2016-07-03T01:06:43.000Z | 2020-06-24T09:58:19.000Z | GUI.py | gandalf3/The-Queen-s-Workers | 31bdd846949581dbc855a30b64cbf04aabf5c06f | [
"CC-BY-3.0",
"Apache-2.0"
] | null | null | null | GUI.py | gandalf3/The-Queen-s-Workers | 31bdd846949581dbc855a30b64cbf04aabf5c06f | [
"CC-BY-3.0",
"Apache-2.0"
] | null | null | null | import bge
bge.render.showMouse(True)
def fix_text():
objs = bge.logic.getCurrentScene().objects
for o in objs:
try:
o.resolution = 1.25
except AttributeError:
pass
def update_resource_meters():
objs = bge.logic.getCurrentScene().objects
gd = bge.logic.gl... | 35.038462 | 135 | 0.635565 |
2decddbad97229fcba66bf64417c3aae6a30f77c | 7,432 | py | Python | app/objects_browser/window.py | mbroz/feel-the-streets | 6e21a496f1530b0500ca66e11712f3f31cd857ae | [
"MIT"
] | null | null | null | app/objects_browser/window.py | mbroz/feel-the-streets | 6e21a496f1530b0500ca66e11712f3f31cd857ae | [
"MIT"
] | null | null | null | app/objects_browser/window.py | mbroz/feel-the-streets | 6e21a496f1530b0500ca66e11712f3f31cd857ae | [
"MIT"
] | null | null | null |
import inspect
from PySide2.QtGui import QKeySequence
from PySide2.QtWidgets import QWidget, QListWidget, QTreeWidget, QTreeWidgetItem, QPushButton, QLabel, QGridLayout, QMenuBar, QApplication, QAction
from osm_db import EntityMetadata
from ..humanization_utils import format_field_value, underscored_to_words
fro... | 52.338028 | 169 | 0.677476 |
2decec416a21e4aa4a601450d14dceaf3ce9c29a | 3,834 | py | Python | cupy/internal.py | umitanuki/chainer | 225c56b233e684ff4855451d2af4c2fb66915f21 | [
"MIT"
] | null | null | null | cupy/internal.py | umitanuki/chainer | 225c56b233e684ff4855451d2af4c2fb66915f21 | [
"MIT"
] | null | null | null | cupy/internal.py | umitanuki/chainer | 225c56b233e684ff4855451d2af4c2fb66915f21 | [
"MIT"
] | 1 | 2018-11-18T00:36:51.000Z | 2018-11-18T00:36:51.000Z | import ctypes
import numpy
import six
import cupy
from cupy import cuda
def prod(args, init=1):
for arg in args:
init *= arg
return init
def get_reduced_dims(shape, strides, itemsize):
if not shape:
return (), ()
elif 0 in shape:
return (0,), (itemsize,)
reduced_shape =... | 30.428571 | 79 | 0.60746 |
2ded249d93036890947ae5806ab9182417d62cdf | 19 | py | Python | btd6_memory_info/generated/NinjaKiwi/LiNK/Lobbies/lobbies.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/NinjaKiwi/LiNK/Lobbies/lobbies.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/NinjaKiwi/LiNK/Lobbies/lobbies.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class Lobbies: pass | 19 | 19 | 0.842105 |
2ded2d8602af4a199e3a39b327ead426defc8279 | 96,745 | py | Python | sfepy/discrete/fem/meshio.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | sfepy/discrete/fem/meshio.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | sfepy/discrete/fem/meshio.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
import sys
from copy import copy
import numpy as nm
from sfepy.base.base import (complex_types, dict_from_keys_init,
assert_, is_derived_class, ordered_iteritems,
insert_static_method... | 32.585045 | 86 | 0.460551 |
2ded2f126f946ed044273d726cbc7d9d57ceae28 | 9,298 | py | Python | lampe/distributions/transforms.py | francois-rozet/lampe | 50e53c767ee5d98502ec8520b3bca554f2169eb7 | [
"MIT"
] | 3 | 2022-03-20T19:23:27.000Z | 2022-03-25T06:55:28.000Z | lampe/distributions/transforms.py | francois-rozet/lampe | 50e53c767ee5d98502ec8520b3bca554f2169eb7 | [
"MIT"
] | null | null | null | lampe/distributions/transforms.py | francois-rozet/lampe | 50e53c767ee5d98502ec8520b3bca554f2169eb7 | [
"MIT"
] | null | null | null | r"""Parameterizable transformations and bijections."""
import math
import torch
import torch.nn.functional as F
from torch import Tensor, LongTensor
from torch.distributions import Transform, constraints
from typing import *
from ..utils import broadcast
torch.distributions.transforms._InverseTransform.__name__ = ... | 27.508876 | 91 | 0.56496 |
2ded354c0a5d3bb696a174f1f2bc450ef30d61cf | 10,447 | py | Python | src/python/pants/pantsd/service/scheduler_service.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 1 | 2021-05-05T18:58:28.000Z | 2021-05-05T18:58:28.000Z | src/python/pants/pantsd/service/scheduler_service.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | null | null | null | src/python/pants/pantsd/service/scheduler_service.py | tpasternak/pants | edf5716283d449852309fff1a10dd351dfbf3493 | [
"Apache-2.0"
] | 3 | 2020-06-30T08:28:13.000Z | 2021-07-28T09:35:57.000Z | # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import logging
from typing import List, Optional, Tuple, cast
from pants.base.exiter import PANTS_SUCCEEDED_EXIT_CODE
from pants.base.specs import Specs
from pants.engine.fs import PathGl... | 43.529167 | 118 | 0.67024 |
2ded404f56ffe48dbde4f38f113939e91792fb26 | 806 | py | Python | 01 Basics/010 - Importing module/010 -a- Import module.py | TheUnicum/CorsoPython | 06cb2b58d46b26fc6d1cf4a585ff2666ab4b5c19 | [
"Apache-2.0"
] | null | null | null | 01 Basics/010 - Importing module/010 -a- Import module.py | TheUnicum/CorsoPython | 06cb2b58d46b26fc6d1cf4a585ff2666ab4b5c19 | [
"Apache-2.0"
] | null | null | null | 01 Basics/010 - Importing module/010 -a- Import module.py | TheUnicum/CorsoPython | 06cb2b58d46b26fc6d1cf4a585ff2666ab4b5c19 | [
"Apache-2.0"
] | null | null | null | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2018 Mattia Benedetti
# All rights reserved.
#
# Author: Mattia Benedetti
"""
- IMPORTING MODULES -
https://docs.python.org/2/tutorial/modules.html
Standard library
https://docs.python.org/2.7/library/index.html
importing import 'namemodul... | 20.15 | 49 | 0.616625 |
2ded57bfa75b1192eeab5ba8bc23e5b3dab2b0d6 | 5,227 | py | Python | tests/test_sensor_update_policy.py | mccbryan3/falconpy | ec4d3a574f2e9b06d046fc8d7ca6818f1f97331f | [
"Unlicense"
] | null | null | null | tests/test_sensor_update_policy.py | mccbryan3/falconpy | ec4d3a574f2e9b06d046fc8d7ca6818f1f97331f | [
"Unlicense"
] | null | null | null | tests/test_sensor_update_policy.py | mccbryan3/falconpy | ec4d3a574f2e9b06d046fc8d7ca6818f1f97331f | [
"Unlicense"
] | null | null | null | # test_sensor_update_policy.py
# This class tests the sensor_update_policy service class
import os
import sys
import pytest
# Authentication via the test_authorization.py
from tests import test_authorization as Authorization
# Classes to test - manually imported from sibling folder
from falconpy import sensor_update_p... | 41.484127 | 117 | 0.676487 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.