hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bbb49b4b8be7c24fc7faee54154a345b7779f0c2 | 8,193 | py | Python | config/settings/production.py | jamesaud/se1-group4 | 5280b13dff33e72ce717318a8dd78a06cd6effb3 | [
"MIT"
] | 1 | 2021-09-09T15:43:09.000Z | 2021-09-09T15:43:09.000Z | config/settings/production.py | jamesaud/se1-group4 | 5280b13dff33e72ce717318a8dd78a06cd6effb3 | [
"MIT"
] | null | null | null | config/settings/production.py | jamesaud/se1-group4 | 5280b13dff33e72ce717318a8dd78a06cd6effb3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Production Configurations
- Use Amazon's S3 for storing static files and uploaded media
- Use mailgun to send emails
- Use Redis for cache
"""
from __future__ import absolute_import, unicode_literals
from boto.s3.connection import OrdinaryCallingFormat
from django.utils import six
import... | 35.314655 | 117 | 0.621018 |
f1f9cca0eb36c3504aee579f64b50b274c05a7c3 | 1,901 | py | Python | tests/provider/noaa/ghcn/test_api_stations.py | meteoDaniel/wetterdienst | 106a2fa9f887983281a6886c15bb3a845850dfb7 | [
"MIT"
] | 3 | 2020-06-19T09:21:07.000Z | 2020-06-30T22:12:42.000Z | tests/provider/noaa/ghcn/test_api_stations.py | meteoDaniel/wetterdienst | 106a2fa9f887983281a6886c15bb3a845850dfb7 | [
"MIT"
] | 27 | 2020-06-17T23:10:37.000Z | 2020-07-01T22:05:17.000Z | tests/provider/noaa/ghcn/test_api_stations.py | meteoDaniel/wetterdienst | 106a2fa9f887983281a6886c15bb3a845850dfb7 | [
"MIT"
] | 1 | 2020-06-22T22:37:45.000Z | 2020-06-22T22:37:45.000Z | import pandas as pd
from pandas._testing import assert_frame_equal
from wetterdienst.provider.noaa.ghcn import NoaaGhcnRequest
def test_noaa_ghcn_stations():
df = NoaaGhcnRequest("daily").all().df.iloc[:5, :]
df_expected = pd.DataFrame(
{
"station_id": pd.Series(
[
... | 33.350877 | 94 | 0.409784 |
f673400ad3e5dedb315f834e41a9c4c8b07654c3 | 3,151 | py | Python | export-neptune-to-elasticsearch/lambda/export_neptune_to_kinesis.py | kaddybrar/amazon-neptune-tools | 86ce4f1451e3a7446f48db64a5b3bdfbf9a99208 | [
"Apache-2.0"
] | 1 | 2020-11-11T15:04:56.000Z | 2020-11-11T15:04:56.000Z | export-neptune-to-elasticsearch/lambda/export_neptune_to_kinesis.py | yugijimoh/amazon-neptune-tools | 18cd7c80736a39fa1b74be16264fb0b02ff82784 | [
"Apache-2.0"
] | null | null | null | export-neptune-to-elasticsearch/lambda/export_neptune_to_kinesis.py | yugijimoh/amazon-neptune-tools | 18cd7c80736a39fa1b74be16264fb0b02ff82784 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Amazon.com, Inc. 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.
# A copy of the License is located at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# or in ... | 35.404494 | 259 | 0.649 |
4f316446431aa1ba7fd888ed58cf396fb4d95574 | 23,595 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_image_versions_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_image_versions_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2019_03_01/operations/_gallery_image_versions_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 50.524625 | 247 | 0.670184 |
1d6a05237bd8dd1d73108b584fc29c99b3734df6 | 1,351 | py | Python | utils/Config.py | salem-devloper/test2 | fae117616924e7044114d6b3cd27ce02de954891 | [
"MIT"
] | null | null | null | utils/Config.py | salem-devloper/test2 | fae117616924e7044114d6b3cd27ce02de954891 | [
"MIT"
] | null | null | null | utils/Config.py | salem-devloper/test2 | fae117616924e7044114d6b3cd27ce02de954891 | [
"MIT"
] | null | null | null | """
Common utility functions and classes
"""
import torch
class Option():
"""Training Configuration """
name = "Lung-Segmentation"
# root dir of training and validation set
root_dir = '../input/lung-segmentation-drive/lung-segmentation'
test_root = '/media/storage/wu1114/RSNA/stage_1_test'
re... | 34.641026 | 88 | 0.664693 |
e842a7f565e212faf391daf8cff8e38aae1dc565 | 7,303 | py | Python | ABBA-BABA/freq.py | evodify/population-genetic-analyses | 5295f9d68736ac02fc5f3ece43dadd5bf4e98e6f | [
"MIT"
] | 3 | 2018-01-31T09:57:10.000Z | 2021-02-03T18:34:01.000Z | ABBA-BABA/freq.py | evodify/population-genetic-analyses | 5295f9d68736ac02fc5f3ece43dadd5bf4e98e6f | [
"MIT"
] | null | null | null | ABBA-BABA/freq.py | evodify/population-genetic-analyses | 5295f9d68736ac02fc5f3ece43dadd5bf4e98e6f | [
"MIT"
] | 1 | 2019-09-02T06:13:29.000Z | 2019-09-02T06:13:29.000Z | #!/usr/bin/env python2
"""
Original script was written by Simon Martin (shm45@cam.ac.uk)
Publication: MARTIN ET AL. 2013 GENOME-WIDE EVIDENCE FOR SPECIATION WITH GENE FLOW IN HELICONIUS BUTTERFLIES
Email: shm45@cam.ac.uk
07-04-2013
This script calculates the frequency of either the minor allele or the derived allele i... | 27.25 | 131 | 0.639737 |
cae1a43be9c3aca4627671fec58a01136616ebae | 389 | py | Python | lib/python2.7/site-packages/networkx/algorithms/centrality/__init__.py | nishaero/wifi-userseg-ryu | 1132f2c813b79eff755bdd1a9e73e7ad3980af7c | [
"Apache-2.0"
] | 15 | 2018-04-26T08:17:18.000Z | 2021-03-05T08:44:13.000Z | lib/python2.7/site-packages/networkx/algorithms/centrality/__init__.py | nishaero/wifi-userseg-ryu | 1132f2c813b79eff755bdd1a9e73e7ad3980af7c | [
"Apache-2.0"
] | null | null | null | lib/python2.7/site-packages/networkx/algorithms/centrality/__init__.py | nishaero/wifi-userseg-ryu | 1132f2c813b79eff755bdd1a9e73e7ad3980af7c | [
"Apache-2.0"
] | 6 | 2018-04-12T15:49:27.000Z | 2022-01-27T12:34:50.000Z | from .betweenness import *
from .betweenness_subset import *
from .closeness import *
from .communicability_alg import *
from .current_flow_closeness import *
from .current_flow_betweenness import *
from .current_flow_betweenness_subset import *
from .degree_alg import *
from .dispersion import *
from .eigenvector impo... | 27.785714 | 46 | 0.799486 |
3d251e8cfa869c458ef3292bb118592cac295650 | 125 | py | Python | fau_colors/__init__.py | mgmax/fau_colors | e755459c12cc75d03be9d7e16a56b1c8027ae37b | [
"MIT"
] | null | null | null | fau_colors/__init__.py | mgmax/fau_colors | e755459c12cc75d03be9d7e16a56b1c8027ae37b | [
"MIT"
] | null | null | null | fau_colors/__init__.py | mgmax/fau_colors | e755459c12cc75d03be9d7e16a56b1c8027ae37b | [
"MIT"
] | null | null | null | __version__ = "1.0.1"
from fau_colors.v2021 import cmaps, colors, colors_all, colors_dark, register_cmaps, unregister_cmaps
| 31.25 | 101 | 0.808 |
0c9984321f8412a6e44340f8fbb940d9c66a0ab2 | 316 | py | Python | ouijabot_proxy/setup.py | StanfordMSL/ouijabot | 7248d95212123c32c94ef1faaedd2e4907a4d8e1 | [
"MIT"
] | 3 | 2017-11-06T08:38:16.000Z | 2019-02-05T22:03:00.000Z | ouijabot_proxy/setup.py | StanfordMSL/ouijabot | 7248d95212123c32c94ef1faaedd2e4907a4d8e1 | [
"MIT"
] | 1 | 2019-02-05T22:34:55.000Z | 2019-02-05T22:34:55.000Z | ouijabot_proxy/setup.py | StanfordMSL/ouijabot | 7248d95212123c32c94ef1faaedd2e4907a4d8e1 | [
"MIT"
] | 1 | 2018-08-10T18:09:42.000Z | 2018-08-10T18:09:42.000Z | ## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
# fetch values from package.xml
setup_args = generate_distutils_setup(
packages=['ouijabot_proxy'],
package_dir={'': 'src'}
)
setup(**setup_args) | 26.333333 | 65 | 0.759494 |
81a93559c98f79087f8b432a7718956d15e975fa | 40,964 | py | Python | pkgs/conda-4.1.11-py27_0/lib/python2.7/site-packages/conda/install.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pkgs/conda-4.1.11-py27_0/lib/python2.7/site-packages/conda/install.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | pkgs/conda-4.1.11-py27_0/lib/python2.7/site-packages/conda/install.py | wangyum/anaconda | 6e5a0dbead3327661d73a61e85414cf92aa52be6 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # (c) 2012-2014 Continuum Analytics, Inc. / http://continuum.io
# All Rights Reserved
#
# conda is distributed under the terms of the BSD 3-clause license.
# Consult LICENSE.txt or http://opensource.org/licenses/BSD-3-Clause.
""" This module contains:
* all low-level code for extracting, linking and unlinking package... | 32.692737 | 121 | 0.591056 |
f44b8a208d3003af4ba1a3a4b2cb77782780e7d1 | 760 | py | Python | app/urls.py | EgiAprilianto/django-crud | b678eda0113fc40e1d28ba32cd5307d70eeef67d | [
"OML"
] | null | null | null | app/urls.py | EgiAprilianto/django-crud | b678eda0113fc40e1d28ba32cd5307d70eeef67d | [
"OML"
] | null | null | null | app/urls.py | EgiAprilianto/django-crud | b678eda0113fc40e1d28ba32cd5307d70eeef67d | [
"OML"
] | 1 | 2022-03-09T14:19:04.000Z | 2022-03-09T14:19:04.000Z | """app URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based vie... | 33.043478 | 77 | 0.698684 |
f8e805f9ad1d1dd5b5548ab0b65924b5f7488a8b | 188 | py | Python | fastapi_sample/__init__.py | anyakichi/fastapi-sample | 745403c585b86c76a7926c41fcc5f15d1dd25e29 | [
"MIT"
] | null | null | null | fastapi_sample/__init__.py | anyakichi/fastapi-sample | 745403c585b86c76a7926c41fcc5f15d1dd25e29 | [
"MIT"
] | null | null | null | fastapi_sample/__init__.py | anyakichi/fastapi-sample | 745403c585b86c76a7926c41fcc5f15d1dd25e29 | [
"MIT"
] | null | null | null | __version__ = "0.1.0"
from typing import Any, Dict
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
async def root() -> Dict[str, Any]:
return {"message": "Hello World"}
| 14.461538 | 37 | 0.648936 |
9279ac39e83ae587a8fd6f65dfdd7e4680b40976 | 5,360 | py | Python | ultracart/models/single_sign_on_token_response.py | UltraCart/rest_api_v2_sdk_python | d734ea13fabc7a57872ff68bac06861edb8fd882 | [
"Apache-2.0"
] | 1 | 2018-03-15T16:56:23.000Z | 2018-03-15T16:56:23.000Z | ultracart/models/single_sign_on_token_response.py | UltraCart/rest_api_v2_sdk_python | d734ea13fabc7a57872ff68bac06861edb8fd882 | [
"Apache-2.0"
] | null | null | null | ultracart/models/single_sign_on_token_response.py | UltraCart/rest_api_v2_sdk_python | d734ea13fabc7a57872ff68bac06861edb8fd882 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
UltraCart Rest API V2
UltraCart REST API Version 2 # noqa: E501
OpenAPI spec version: 2.0.0
Contact: support@ultracart.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class SingleSignOnTokenRespons... | 30.804598 | 99 | 0.607463 |
1c4c80dd1d7a0504e1fe8dd219c522ab897f9309 | 1,212 | py | Python | events/migrations/0013_auto_20190807_0658.py | gda2048/thefirst | f0a74c0a53d507297c58eb267152f6b17339ac02 | [
"Apache-2.0"
] | 5 | 2019-08-19T14:49:29.000Z | 2019-12-19T19:03:54.000Z | events/migrations/0013_auto_20190807_0658.py | Sirkirill/PhychoBlog | f0a74c0a53d507297c58eb267152f6b17339ac02 | [
"Apache-2.0"
] | 10 | 2020-02-12T00:46:12.000Z | 2022-02-10T09:16:47.000Z | events/migrations/0013_auto_20190807_0658.py | Sirkirill/PhychoBlog | f0a74c0a53d507297c58eb267152f6b17339ac02 | [
"Apache-2.0"
] | 1 | 2019-10-10T13:04:11.000Z | 2019-10-10T13:04:11.000Z | # Generated by Django 2.2.4 on 2019-08-07 06:58
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('events', '0012_auto_20190804_1909'),
]
operations = [
migrations.AlterField(
model_name='announcement',
name='content... | 31.894737 | 111 | 0.589934 |
3428219a5de9f2c5c4b6cc74c1c96e220cb8247e | 4,964 | py | Python | testscripts/RDKB/component/TDKB_TR181/TDKB_TR181_WEBPA_TDM_SetAllParameterValues_WithReboot.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/TDKB_TR181/TDKB_TR181_WEBPA_TDM_SetAllParameterValues_WithReboot.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/TDKB_TR181/TDKB_TR181_WEBPA_TDM_SetAllParameterValues_WithReboot.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | ##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2020 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use th... | 41.714286 | 152 | 0.719782 |
f5d7c55a50cb872100fc43dbe4cd1db32f67029e | 8,612 | py | Python | ppb/sprites.py | milasp/pursuedpybear | 166cbc3e7b9cd10b50c512f37ab1d943dfbdfb7b | [
"Artistic-2.0"
] | null | null | null | ppb/sprites.py | milasp/pursuedpybear | 166cbc3e7b9cd10b50c512f37ab1d943dfbdfb7b | [
"Artistic-2.0"
] | null | null | null | ppb/sprites.py | milasp/pursuedpybear | 166cbc3e7b9cd10b50c512f37ab1d943dfbdfb7b | [
"Artistic-2.0"
] | null | null | null | from inspect import getfile
from pathlib import Path
from typing import Union
import ppb
from ppb import Vector
from ppb.events import EventMixin
from ppb.utils import FauxFloat
import ppb_vector
TOP = "top"
BOTTOM = "bottom"
LEFT = "left"
RIGHT = "right"
error_message = "'{klass}' object does not have attribute '... | 27.514377 | 82 | 0.58523 |
c0019d2121822ace056ffb8a014ed8ef8d44877c | 3,800 | py | Python | ComputeScore/main_180405.py | samik1986/ML_Semantic_Segmenation_NMI | eaf963e13e18ce091edb45dcb0cc67727ef32f1a | [
"MIT"
] | 13 | 2020-07-13T17:44:39.000Z | 2021-12-15T01:44:24.000Z | ComputeScore/main_180405.py | samik1986/ML_Semantic_Segmenation_NMI | eaf963e13e18ce091edb45dcb0cc67727ef32f1a | [
"MIT"
] | 22 | 2020-03-31T11:48:27.000Z | 2022-02-10T01:50:35.000Z | ComputeScore/main_180405.py | samik1986/ML_Semantic_Segmenation_NMI | eaf963e13e18ce091edb45dcb0cc67727ef32f1a | [
"MIT"
] | 5 | 2020-11-07T11:06:53.000Z | 2021-11-13T19:19:07.000Z | from dk_metric import image_metrics
import os
from multiprocessing import Process, Lock, Manager
import numpy as np
import time
import sys
'''python3 main.py gt_folder pre_folder output_folder [optional startt endt stepsize]'''
gt_folder = sys.argv[1]
prop_folder = sys.argv[2]
output_csv = os.path.join(sys.argv[3], '... | 35.849057 | 113 | 0.606053 |
e41529d5b611417ab7c17dad0e03946181557d69 | 724 | py | Python | python_3/synthetic_data_generator/experiments/expr_generate_random_shuffled_products.py | duttashi/valet | 25b57db860d5c1abce9f1d8b45b73bc8e8743025 | [
"MIT"
] | null | null | null | python_3/synthetic_data_generator/experiments/expr_generate_random_shuffled_products.py | duttashi/valet | 25b57db860d5c1abce9f1d8b45b73bc8e8743025 | [
"MIT"
] | 39 | 2020-10-11T06:57:35.000Z | 2021-11-02T08:57:01.000Z | python_3/synthetic_data_generator/experiments/expr_generate_random_shuffled_products.py | duttashi/valet | 25b57db860d5c1abce9f1d8b45b73bc8e8743025 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Oct 13 07:50:11 2020
Objective: Given a product list as an input to a function,
randomly shuffle and repeat the list N number of times
Function parameters: product list, number of repetitions
Function return value: random shuffled list of products
@author: Ashish
"""
... | 32.909091 | 74 | 0.734807 |
7ddd16dc05d37ca55426b2cedbcadc7d04f73bc5 | 100 | py | Python | fprofiles_api/apps.py | Mfaizs7/fprofiles-rest-api | d3a77b6de6a24d5fc2a23eb619c7d72fe3a8b48c | [
"MIT"
] | null | null | null | fprofiles_api/apps.py | Mfaizs7/fprofiles-rest-api | d3a77b6de6a24d5fc2a23eb619c7d72fe3a8b48c | [
"MIT"
] | null | null | null | fprofiles_api/apps.py | Mfaizs7/fprofiles-rest-api | d3a77b6de6a24d5fc2a23eb619c7d72fe3a8b48c | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class FprofilesApiConfig(AppConfig):
name = 'fprofiles_api'
| 16.666667 | 36 | 0.78 |
e3a5b686b230bf16ef4167c7db80ac7822c0f816 | 1,669 | py | Python | rdflib/__init__.py | Letractively/rdflib | b92e162efd61506d19ed25a12960cd32f0c7432e | [
"BSD-3-Clause"
] | null | null | null | rdflib/__init__.py | Letractively/rdflib | b92e162efd61506d19ed25a12960cd32f0c7432e | [
"BSD-3-Clause"
] | null | null | null | rdflib/__init__.py | Letractively/rdflib | b92e162efd61506d19ed25a12960cd32f0c7432e | [
"BSD-3-Clause"
] | null | null | null | """\
A pure Python package providing the core RDF constructs.
The packages is intended to provide the core RDF types and interfaces
for working with RDF. The package defines a plugin interface for
parsers, stores, and serializers that other packages can use to
implement parsers, stores, and serializers that will plug ... | 21.397436 | 76 | 0.673457 |
38ea3630f549c36f26f2f680a90640035ca2e5ac | 1,807 | py | Python | tests/test_streaming.py | parking52/kopf | 96c27872ac794f5ba8155c175f072be30ebc000c | [
"MIT"
] | null | null | null | tests/test_streaming.py | parking52/kopf | 96c27872ac794f5ba8155c175f072be30ebc000c | [
"MIT"
] | null | null | null | tests/test_streaming.py | parking52/kopf | 96c27872ac794f5ba8155c175f072be30ebc000c | [
"MIT"
] | null | null | null | import collections.abc
import pytest
from kopf.reactor.watching import StopStreaming, streaming_next, streaming_aiter
async def test_streaming_next_never_ends_with_stopiteration():
lst = []
src = iter(lst)
with pytest.raises(StopStreaming) as e:
streaming_next(src)
assert not isinstance(e,... | 23.166667 | 80 | 0.684007 |
55591e79c51d9f8834c55f4f87cd2b8901696bc8 | 9,020 | py | Python | core/src/main/bin/datax.py | xrfinbupt/DataX | 643e6f862357e34d14a7eb86c1a55ac68c31a502 | [
"Apache-2.0"
] | 6 | 2020-05-09T07:40:48.000Z | 2020-12-17T10:28:36.000Z | core/src/main/bin/datax.py | phillip2019/DataX | ad40291e23bbee4034da7200b57b014dce9ba5d4 | [
"Apache-2.0"
] | 18 | 2020-01-13T17:02:16.000Z | 2020-12-23T05:45:55.000Z | core/src/main/bin/datax.py | zhongjiajie/DataX | 643e6f862357e34d14a7eb86c1a55ac68c31a502 | [
"Apache-2.0"
] | 5 | 2019-10-25T01:44:33.000Z | 2021-10-20T05:53:57.000Z | #!/usr/bin/env python
# -*- coding:utf-8 -*-
from __future__ import print_function
import sys
import os
import signal
import subprocess
import time
import re
import socket
import json
from optparse import OptionParser
from optparse import OptionGroup
from string import Template
import codecs
import platform
def isWi... | 39.047619 | 213 | 0.627938 |
2f179bb5b9d53414b6e2c0a59dfbb0f34c45eae1 | 21,569 | py | Python | modules/sniffer.py | vaginessa/BoopSuite | 0c7afe1fc6772339617d707ac18e4dedac1d955c | [
"MIT"
] | null | null | null | modules/sniffer.py | vaginessa/BoopSuite | 0c7afe1fc6772339617d707ac18e4dedac1d955c | [
"MIT"
] | null | null | null | modules/sniffer.py | vaginessa/BoopSuite | 0c7afe1fc6772339617d707ac18e4dedac1d955c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from logging import getLogger, ERROR
from random import choice
from threading import Thread
from scapy.all import *
from scapy.contrib.wpa_eapol import WPA_key
import devices
import globalsx
import packets
import clients
import networks
getLogger("scapy.runtime").setLe... | 32.434586 | 196 | 0.499189 |
bb702c39d20eb57762d5bc883810c7969f9e9950 | 624 | pyde | Python | light/listing77ex2/listing77ex2.pyde | Drozdnik/2019-fall-polytech-cs | 02154dd152c454c25bdce93a0643267e8f65eee4 | [
"MIT"
] | null | null | null | light/listing77ex2/listing77ex2.pyde | Drozdnik/2019-fall-polytech-cs | 02154dd152c454c25bdce93a0643267e8f65eee4 | [
"MIT"
] | null | null | null | light/listing77ex2/listing77ex2.pyde | Drozdnik/2019-fall-polytech-cs | 02154dd152c454c25bdce93a0643267e8f65eee4 | [
"MIT"
] | null | null | null | coint = 0
def setup():
background(100)
smooth()
img1 = loadImage("data/0000.jpg")
img2 = loadImage("data/0001.jpg")
size(800,800)
global img1, img2
def mouseClicked():
global coint
if mouseButton == LEFT:
coint += 5
if coint < 0:
coint = 0... | 22.285714 | 43 | 0.514423 |
fca28d37c36beed997074514bbd78281ce58f96e | 4,526 | py | Python | Lib/test/script_helper.py | deadsnakes/python3.1 | 88d77610a7873c5161bfc15cd69557fc7697b1a3 | [
"PSF-2.0"
] | null | null | null | Lib/test/script_helper.py | deadsnakes/python3.1 | 88d77610a7873c5161bfc15cd69557fc7697b1a3 | [
"PSF-2.0"
] | null | null | null | Lib/test/script_helper.py | deadsnakes/python3.1 | 88d77610a7873c5161bfc15cd69557fc7697b1a3 | [
"PSF-2.0"
] | null | null | null | # Common utility functions used by various script execution tests
# e.g. test_cmd_line, test_cmd_line_script and test_runpy
import sys
import os
import os.path
import tempfile
import subprocess
import py_compile
import contextlib
import shutil
import zipfile
from test.support import strip_python_stderr
# Executing ... | 34.815385 | 83 | 0.681617 |
bcdf33198097b64581b4456d32432bc3fed4d2b2 | 4,275 | py | Python | sort.py | evandrocoan/SublimePackageDefault | ff47d47b59fc3ff2c1146168605ed85ace1f3b0e | [
"Unlicense",
"MIT"
] | 3 | 2018-12-08T21:44:45.000Z | 2019-03-01T03:22:32.000Z | sort.py | evandrocoan/SublimePackageDefault | ff47d47b59fc3ff2c1146168605ed85ace1f3b0e | [
"Unlicense",
"MIT"
] | null | null | null | sort.py | evandrocoan/SublimePackageDefault | ff47d47b59fc3ff2c1146168605ed85ace1f3b0e | [
"Unlicense",
"MIT"
] | null | null | null | import random
import sublime
import sublime_plugin
def permute_selection(f, v, e):
regions = [s for s in v.sel() if not s.empty()]
regions.sort()
txt = [v.substr(s) for s in regions]
txt = f(txt)
# no sane way to handle this case
if len(txt) != len(regions):
return
# Do the repl... | 22.983871 | 86 | 0.618246 |
e204d77a87f2bfc2d3f26169452ee021c901068e | 2,028 | py | Python | p14_grade_point_avg.py | Muneeb97/Python | 3d8e78268e6e09f25f43b1d119aa54129e979da4 | [
"MIT"
] | null | null | null | p14_grade_point_avg.py | Muneeb97/Python | 3d8e78268e6e09f25f43b1d119aa54129e979da4 | [
"MIT"
] | null | null | null | p14_grade_point_avg.py | Muneeb97/Python | 3d8e78268e6e09f25f43b1d119aa54129e979da4 | [
"MIT"
] | null | null | null | #5 grades point average and more
grades= []
print("Grades 0-100")
grade_number = int(input("How many grades do you want to enter: "))
def grade_collect(n):
for i in range(n):
grade_entered = int(input("Enter Grade: "))
if(grade_entered == 0 or grade_entered >100):
print("E... | 33.245902 | 109 | 0.64497 |
59cbf70163f23b530a29da29a4532f89bbb4373e | 1,265 | py | Python | saleor/search/backends/elasticsearch_dashboard.py | jdruiter/saleor | 9393ac20bd3e82c8ec1f17f6e47e3d7379f20419 | [
"BSD-3-Clause"
] | 1 | 2021-01-29T13:28:29.000Z | 2021-01-29T13:28:29.000Z | saleor/search/backends/elasticsearch_dashboard.py | jdruiter/saleor | 9393ac20bd3e82c8ec1f17f6e47e3d7379f20419 | [
"BSD-3-Clause"
] | 1 | 2022-02-10T14:46:00.000Z | 2022-02-10T14:46:00.000Z | saleor/search/backends/elasticsearch_dashboard.py | jdruiter/saleor | 9393ac20bd3e82c8ec1f17f6e47e3d7379f20419 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from ..documents import ProductDocument, OrderDocument, UserDocument
from elasticsearch_dsl.query import MultiMatch
def _search_products(phrase):
prod_query = MultiMatch(
fields=['name', 'title', 'description'],
query=phrase,
type='cross_fields')
... | 29.418605 | 78 | 0.683004 |
b3f618fb5cfbc24d9d551ab3defb1a5aa08b963f | 2,163 | py | Python | Detection_Cheating/controllers/analysis_con.py | kimheejoo/Detection_Cheating_Server | 488a9c61ab5c3030c7949695549f2edc34f20be1 | [
"MIT"
] | 2 | 2022-01-04T05:50:50.000Z | 2022-03-10T05:57:56.000Z | Detection_Cheating/controllers/analysis_con.py | kimheejoo/Detection_Cheating_Server | 488a9c61ab5c3030c7949695549f2edc34f20be1 | [
"MIT"
] | null | null | null | Detection_Cheating/controllers/analysis_con.py | kimheejoo/Detection_Cheating_Server | 488a9c61ab5c3030c7949695549f2edc34f20be1 | [
"MIT"
] | 2 | 2021-01-05T15:50:32.000Z | 2021-09-28T06:23:35.000Z | '''
analysis controller
'''
from flask import current_app
from models import db, Students
from datetime import datetime
import scapy.all as sc
def getPacketTime(packet_path):
try:
pkts = sc.rdpcap(packet_path)
except MemoryError:
print("Memory Error로 인해 packet을 열지 못하였습니다.")
return None
... | 30.041667 | 102 | 0.632455 |
1dbbc12b54380bc49a8a4128792adc3bac6c6df5 | 182 | py | Python | test/src_examples/python/py_error_and_fail_manyErrors/Root/test/test3.py | codeboardio/kali | 454c5c392aa0fb222b67b54549b32edbf15071c0 | [
"MIT"
] | null | null | null | test/src_examples/python/py_error_and_fail_manyErrors/Root/test/test3.py | codeboardio/kali | 454c5c392aa0fb222b67b54549b32edbf15071c0 | [
"MIT"
] | null | null | null | test/src_examples/python/py_error_and_fail_manyErrors/Root/test/test3.py | codeboardio/kali | 454c5c392aa0fb222b67b54549b32edbf15071c0 | [
"MIT"
] | 2 | 2017-10-13T11:30:22.000Z | 2020-01-12T14:22:28.000Z | from Root import application
import unittest
class test3(unittest.TestCase):
def test_one(self):
self.assertEqual(application.foo(),1)
if __name__ == '__main__':
unittest.main()
| 22.75 | 39 | 0.769231 |
509b07e84321b4393b79fa3391ca37e73e56fbe1 | 5,664 | py | Python | LinearResponseVariationalBayes/NormalParams.py | rgiordan/LinearResponseVariationalBayes.py | 5305d7e204481e518c5ef82bbed065ec627a4a9e | [
"Apache-2.0"
] | 6 | 2018-08-19T08:00:00.000Z | 2019-10-27T10:31:36.000Z | LinearResponseVariationalBayes/NormalParams.py | rgiordan/LinearResponseVariationalBayes.py | 5305d7e204481e518c5ef82bbed065ec627a4a9e | [
"Apache-2.0"
] | 9 | 2017-06-09T17:58:28.000Z | 2018-10-04T22:52:33.000Z | LinearResponseVariationalBayes/NormalParams.py | rgiordan/LinearResponseVariationalBayes.py | 5305d7e204481e518c5ef82bbed065ec627a4a9e | [
"Apache-2.0"
] | 1 | 2018-01-15T06:26:35.000Z | 2018-01-15T06:26:35.000Z | import LinearResponseVariationalBayes as vb
import LinearResponseVariationalBayes.ExponentialFamilies as ef
from autograd import numpy as np
class MVNParam(vb.ModelParamsDict):
def __init__(self, name='', dim=2, min_info=0.0):
super().__init__(name=name)
self.__dim = dim
self.push_param(vb... | 34.748466 | 76 | 0.595516 |
6baa31b5382cdb4743e60acb2e12e1249c797744 | 88 | py | Python | ontology/logistic_regression/sherlock/listify_circuits_k18_forward.py | ehbeam/neuro-knowledge-engine | 9dc56ade0bbbd8d14f0660774f787c3f46d7e632 | [
"MIT"
] | 15 | 2020-07-17T07:10:26.000Z | 2022-02-18T05:51:45.000Z | ontology/neural_network/sherlock/listify_circuits_k18_forward.py | YifeiCAO/neuro-knowledge-engine | 9dc56ade0bbbd8d14f0660774f787c3f46d7e632 | [
"MIT"
] | 2 | 2022-01-14T09:10:12.000Z | 2022-01-28T17:32:42.000Z | ontology/neural_network/sherlock/listify_circuits_k18_forward.py | YifeiCAO/neuro-knowledge-engine | 9dc56ade0bbbd8d14f0660774f787c3f46d7e632 | [
"MIT"
] | 4 | 2021-12-22T13:27:32.000Z | 2022-02-18T05:51:47.000Z | #!/bin/python
import listify_circuits
listify_circuits.optimize_circuits(18, 'forward') | 22 | 49 | 0.829545 |
f919b450f32ed59470ec9ed0132ffbe5b0da3585 | 8,625 | py | Python | tests/ut/python/dataset/test_random_posterize.py | huxian123/mindspore | ec5ba10c82bbd6eccafe32d3a1149add90105bc8 | [
"Apache-2.0"
] | 2 | 2021-04-22T07:00:59.000Z | 2021-11-08T02:49:09.000Z | tests/ut/python/dataset/test_random_posterize.py | huxian123/mindspore | ec5ba10c82bbd6eccafe32d3a1149add90105bc8 | [
"Apache-2.0"
] | 1 | 2020-12-29T06:46:38.000Z | 2020-12-29T06:46:38.000Z | tests/ut/python/dataset/test_random_posterize.py | huxian123/mindspore | ec5ba10c82bbd6eccafe32d3a1149add90105bc8 | [
"Apache-2.0"
] | 1 | 2021-05-10T03:30:36.000Z | 2021-05-10T03:30:36.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 38.163717 | 120 | 0.694493 |
5d2fb52f90c271fbb96cb73db468ab7243f29422 | 2,484 | py | Python | classification/Decision Tree/tree.py | 4yub1k/Machine-learning | 8f15be5409e6b47b8d7da1ab0fd04f717f2668a8 | [
"MIT"
] | null | null | null | classification/Decision Tree/tree.py | 4yub1k/Machine-learning | 8f15be5409e6b47b8d7da1ab0fd04f717f2668a8 | [
"MIT"
] | null | null | null | classification/Decision Tree/tree.py | 4yub1k/Machine-learning | 8f15be5409e6b47b8d7da1ab0fd04f717f2668a8 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
#Here we have pick the best drug (A,B) for a patient based on their age, sex etc
"""Load CSV"""
df = pd.read_csv("drug.csv", sep=',')
print(df[0:5])
print("Total row/entries : ",df.shape[0],df.shape)
"""Convert to array of vales (no column row)""... | 34.5 | 167 | 0.732689 |
af3b6d7c9460ec364b6440c207b9a392e010f48f | 114 | py | Python | config.py | pulbhaba/tagged-pets-bot | 42d7238825e37c8988657b797e99578b703baadb | [
"Apache-2.0"
] | null | null | null | config.py | pulbhaba/tagged-pets-bot | 42d7238825e37c8988657b797e99578b703baadb | [
"Apache-2.0"
] | null | null | null | config.py | pulbhaba/tagged-pets-bot | 42d7238825e37c8988657b797e99578b703baadb | [
"Apache-2.0"
] | null | null | null | COOKIE_BHA = 'This should be the cookies for one user'
COOKIE_NIKKI = 'This should be the cookies for other user'
| 38 | 58 | 0.77193 |
18e921daa9c34a39d0134e9a009152de91a11453 | 237,609 | py | Python | python_modules/dagster/dagster_tests/core_tests/snap_tests/snapshots/snap_test_pipeline_snap.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 4,606 | 2018-06-21T17:45:20.000Z | 2022-03-31T23:39:42.000Z | python_modules/dagster/dagster_tests/core_tests/snap_tests/snapshots/snap_test_pipeline_snap.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 6,221 | 2018-06-12T04:36:01.000Z | 2022-03-31T21:43:05.000Z | python_modules/dagster/dagster_tests/core_tests/snap_tests/snapshots/snap_test_pipeline_snap.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 619 | 2018-08-22T22:43:09.000Z | 2022-03-31T22:48:06.000Z | # -*- coding: utf-8 -*-
# snapshottest: v1 - https://goo.gl/zC4yUc
from __future__ import unicode_literals
from snapshottest import Snapshot
snapshots = Snapshot()
snapshots['test_basic_dep_fan_out 1'] = '''{
"__class__": "PipelineSnapshot",
"config_schema_snapshot": {
"__class__": "ConfigSchemaSnapshot",
... | 32.380621 | 121 | 0.529281 |
1275199288757ff2ad3ed5877d999d611f88cb24 | 22,802 | py | Python | plugins/modules/oci_container_engine_cluster_actions.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_container_engine_cluster_actions.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_container_engine_cluster_actions.py | sohwaje/oci-ansible-collection | 9e6b8cf55e596a96560710a457a7df05886fc59c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2020, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 41.533698 | 160 | 0.570082 |
5f1c04b3d6e134f5c6d71dae40b32c5e2b8f035b | 153 | py | Python | examples/apps/django_multi_apps/stockscreener/urls.py | datalayer-contrib/holoviz-panel | c97b57e8eaff4b5f542add41f496395da2483b23 | [
"BSD-3-Clause"
] | 1,130 | 2019-11-23T09:53:37.000Z | 2022-03-31T11:30:07.000Z | examples/apps/django_multi_apps/stockscreener/urls.py | datalayer-contrib/holoviz-panel | c97b57e8eaff4b5f542add41f496395da2483b23 | [
"BSD-3-Clause"
] | 2,265 | 2019-11-20T17:09:09.000Z | 2022-03-31T22:09:38.000Z | examples/apps/django_multi_apps/stockscreener/urls.py | datalayer-contrib/holoviz-panel | c97b57e8eaff4b5f542add41f496395da2483b23 | [
"BSD-3-Clause"
] | 215 | 2019-11-26T11:49:04.000Z | 2022-03-30T10:23:11.000Z | from django.urls import path
from . import views
app_name = 'stockscreener'
urlpatterns = [
path('', views.stockscreener, name='stockscreener'),
]
| 17 | 56 | 0.718954 |
7d5905d6e6fe6d40599a43192a7a8520630fef2e | 1,416 | py | Python | memory/impala_client.py | gridsum/IML-predictor- | 2f4b4b7799752b3783bdcf01d1ca9e2a61942a74 | [
"Apache-2.0"
] | 3 | 2018-04-20T03:26:18.000Z | 2018-04-20T06:09:50.000Z | memory/impala_client.py | gridsum/IML-predictor- | 2f4b4b7799752b3783bdcf01d1ca9e2a61942a74 | [
"Apache-2.0"
] | null | null | null | memory/impala_client.py | gridsum/IML-predictor- | 2f4b4b7799752b3783bdcf01d1ca9e2a61942a74 | [
"Apache-2.0"
] | null | null | null | import logging
from impala.dbapi import connect
from .settings import ImpalaConstants, NEED_CERTIFICATE
from .error import ImpalaConnectError, ImpalaQueryError
class ImpalaWrapper:
def __init__(self, host=ImpalaConstants.HOST, port=ImpalaConstants.PORT,
user=ImpalaConstants.USER, database=None, ... | 29.5 | 76 | 0.592514 |
7d4f4e387054adbe5a5435c6fda5f5b3cc6bffe5 | 466 | py | Python | data/scripts/templates/object/tangible/wearables/ithorian/shared_ith_jacket_s14.py | obi-two/GameServer | 7d37024e2291a97d49522610cd8f1dbe5666afc2 | [
"MIT"
] | 20 | 2015-02-23T15:11:56.000Z | 2022-03-18T20:56:48.000Z | data/scripts/templates/object/tangible/wearables/ithorian/shared_ith_jacket_s14.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | null | null | null | data/scripts/templates/object/tangible/wearables/ithorian/shared_ith_jacket_s14.py | apathyboy/swganh | 665128efe9154611dec4cb5efc61d246dd095984 | [
"MIT"
] | 20 | 2015-04-04T16:35:59.000Z | 2022-03-24T14:54:37.000Z | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/wearables/ithorian/shared_ith_jacket_s14.iff"
result.attribute_temp... | 27.411765 | 81 | 0.738197 |
39ade7d2fa5d033aa78fd8d28a0e11a8b087f706 | 5,460 | py | Python | tools/pdtools/pdtools/util.py | lhartung/paradrop-test | 22a491bf3198bf61bcabaedfaecde5b9be97e76f | [
"Apache-2.0"
] | 76 | 2015-08-24T18:15:20.000Z | 2021-12-06T20:03:19.000Z | tools/pdtools/pdtools/util.py | leilei1881/Paradrop | 546464e075f8a226b9eb4fe444390dc5c8527ad9 | [
"Apache-2.0"
] | 35 | 2015-07-07T22:27:49.000Z | 2022-03-01T17:13:40.000Z | tools/pdtools/pdtools/util.py | lhartung/paradrop-test | 22a491bf3198bf61bcabaedfaecde5b9be97e76f | [
"Apache-2.0"
] | 27 | 2016-02-03T22:00:09.000Z | 2021-09-26T16:59:38.000Z | import getpass
import os
import tempfile
import builtins
import yaml
LOCAL_DEFAULT_USERNAME = "paradrop"
LOCAL_DEFAULT_PASSWORD = ""
def format_result(data):
"""
Format a result from an API call for printing.
"""
if data is None or data == []:
return ""
return yaml.safe_dump(data, defau... | 28.4375 | 93 | 0.641758 |
c45da4d0eb046bbdae3aaa125b45a4bae27c9487 | 8,058 | py | Python | python/createVcf.py | anands-repo/hello | 743ff49c0de97a985643280a3b5cb562c58e7fb7 | [
"MIT"
] | 7 | 2020-03-27T06:33:24.000Z | 2022-03-31T16:16:47.000Z | python/createVcf.py | anands-repo/hello | 743ff49c0de97a985643280a3b5cb562c58e7fb7 | [
"MIT"
] | 3 | 2021-08-24T08:33:03.000Z | 2022-01-10T09:30:21.000Z | python/createVcf.py | anands-repo/hello | 743ff49c0de97a985643280a3b5cb562c58e7fb7 | [
"MIT"
] | null | null | null | # © 2019 University of Illinois Board of Trustees. All rights reserved
import argparse
import subprocess
import re
import ast
from ReferenceCache import ReferenceCache
from functools import reduce
import os
import subprocess
import pysam
SNV_THRESHOLD=0.1
INDEL_THRESHOLD=0.1
def correctRepresentation(variant, ref):
... | 32.889796 | 196 | 0.558699 |
bc51013c19099b175b2e622ef3d3c5959b8172d6 | 16,876 | py | Python | heat_dashboard/test/test_data/heat_data.py | efenfauzi/heat-dashboard | e1e9fc853b72c2770ba041c0ac1151b4c9484f36 | [
"Apache-2.0"
] | 13 | 2017-10-31T10:35:14.000Z | 2020-10-28T03:23:04.000Z | heat_dashboard/test/test_data/heat_data.py | efenfauzi/heat-dashboard | e1e9fc853b72c2770ba041c0ac1151b4c9484f36 | [
"Apache-2.0"
] | 3 | 2019-11-01T13:03:10.000Z | 2019-12-06T17:33:03.000Z | heat_dashboard/test/test_data/heat_data.py | openstack/heat-dashboard | 8704da6f4a6d8f6f64be2d72af49f0ea44d7b900 | [
"Apache-2.0"
] | 13 | 2017-12-21T08:33:23.000Z | 2021-01-18T14:26:22.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 27.307443 | 79 | 0.553626 |
21031a79cfa6e1dd3a793bc546a8b9f5ba9afd05 | 2,575 | py | Python | neutron/tests/unit/oneconvergence/test_plugin_helper.py | SnabbCo/neutron | a657c06d10f2171149c6b1863df36522bdc11cd7 | [
"Apache-2.0"
] | 3 | 2015-02-02T02:51:39.000Z | 2015-02-23T10:20:23.000Z | neutron/tests/unit/oneconvergence/test_plugin_helper.py | SnabbCo/neutron | a657c06d10f2171149c6b1863df36522bdc11cd7 | [
"Apache-2.0"
] | 4 | 2015-02-23T10:21:11.000Z | 2015-03-04T09:28:20.000Z | neutron/tests/unit/oneconvergence/test_plugin_helper.py | SnabbCo/neutron | a657c06d10f2171149c6b1863df36522bdc11cd7 | [
"Apache-2.0"
] | 3 | 2015-04-03T08:47:02.000Z | 2020-02-05T10:40:45.000Z | # Copyright 2014 OneConvergence, 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 requir... | 42.213115 | 78 | 0.640388 |
e429ecd00df89462223442aef0d99c6bec78cc5c | 23,015 | py | Python | examples/pytorch/question_generation/run_question_generation_iclr.py | amanapte/graph4nlp | 1ec5464b5d6b1f9c36297171cfedf617021273c3 | [
"Apache-2.0"
] | 1 | 2021-12-09T21:56:49.000Z | 2021-12-09T21:56:49.000Z | examples/pytorch/question_generation/run_question_generation_iclr.py | amanapte/graph4nlp | 1ec5464b5d6b1f9c36297171cfedf617021273c3 | [
"Apache-2.0"
] | null | null | null | examples/pytorch/question_generation/run_question_generation_iclr.py | amanapte/graph4nlp | 1ec5464b5d6b1f9c36297171cfedf617021273c3 | [
"Apache-2.0"
] | null | null | null | import argparse
import multiprocessing
import os
import platform
import time
import numpy as np
import torch
import torch.backends.cudnn as cudnn
import torch.multiprocessing
import torch.nn as nn
import torch.optim as optim
from torch.optim.lr_scheduler import ReduceLROnPlateau
from torch.utils.data import DataLoader
... | 39.207836 | 100 | 0.58866 |
c6872bc2a138d120ee83352ee94e5ce83cd98d6b | 2,754 | py | Python | Previous_State_On_Repo/StrokeRecoveryOffline/Data/code/txtcreator.py | rohun-tripati/pythonRepo | 91a7d536f7be05adc15e4d5add0a8a4a08c28c62 | [
"Unlicense"
] | 1 | 2018-06-25T19:20:48.000Z | 2018-06-25T19:20:48.000Z | Previous_State_On_Repo/StrokeRecoveryOffline/Data/code/txtcreator.py | rohun-tripati/pythonRepo | 91a7d536f7be05adc15e4d5add0a8a4a08c28c62 | [
"Unlicense"
] | null | null | null | Previous_State_On_Repo/StrokeRecoveryOffline/Data/code/txtcreator.py | rohun-tripati/pythonRepo | 91a7d536f7be05adc15e4d5add0a8a4a08c28c62 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
import os, sys, time
import Image
import numpy as np
import width as WT
from copy import deepcopy
def update(top, bottom, left, right, j ,i):
if top > j:
top = j
if bottom < j:
bottom = j
if left > i:
left = i
if right < i:
right = i
return top, bottom, left, right
def howmuchto... | 25.5 | 136 | 0.629993 |
25280c9ae3f41265f362a1e78f6d06ea4121e0b1 | 735 | py | Python | Data Structures and Algorithms/LeetCode Algo Solutions/EASY DIFFICULTY PROBLEMS/SubtractProductAndSumOfDigits.py | akkik04/Python-DataStructures-and-Algorithms | 8db63173218e5a9205dbb325935c71fec93b695c | [
"MIT"
] | 1 | 2022-01-22T18:19:07.000Z | 2022-01-22T18:19:07.000Z | Data Structures and Algorithms/LeetCode Algo Solutions/EASY DIFFICULTY PROBLEMS/SubtractProductAndSumOfDigits.py | akkik04/Python-DataStructures-and-Algorithms | 8db63173218e5a9205dbb325935c71fec93b695c | [
"MIT"
] | null | null | null | Data Structures and Algorithms/LeetCode Algo Solutions/EASY DIFFICULTY PROBLEMS/SubtractProductAndSumOfDigits.py | akkik04/Python-DataStructures-and-Algorithms | 8db63173218e5a9205dbb325935c71fec93b695c | [
"MIT"
] | null | null | null | # SUBTRACT THE PRODUCT AND SUM OF DIGITS OF AN INTEGER LEETCODE SOLUTION:
class Solution(object):
def subtractProductAndSum(self, n):
# creating a list of the digits for 'n'.
x = map(int, str(n))
# initializing variables to track the product and sum of the digits.
digit... | 30.625 | 77 | 0.6 |
6b1ec0d746f5d1bc6c5959e4646512ba4c4036a0 | 1,332 | py | Python | dynamic_programming/longest_increasing_subsequence_o(nlogn).py | MKiperszmid/Python | 6b368e6ab2fa1a839b029fd45e127521bbe76005 | [
"MIT"
] | 1 | 2020-08-28T18:25:45.000Z | 2020-08-28T18:25:45.000Z | dynamic_programming/longest_increasing_subsequence_o(nlogn).py | MKiperszmid/Python | 6b368e6ab2fa1a839b029fd45e127521bbe76005 | [
"MIT"
] | 1 | 2020-08-28T18:24:31.000Z | 2020-08-28T19:35:47.000Z | dynamic_programming/longest_increasing_subsequence_o(nlogn).py | MKiperszmid/Python | 6b368e6ab2fa1a839b029fd45e127521bbe76005 | [
"MIT"
] | null | null | null | #############################
# Author: Aravind Kashyap
# File: lis.py
# comments: This programme outputs the Longest Strictly Increasing Subsequence in
# O(NLogN) Where N is the Number of elements in the list
#############################
from typing import List
def CeilIndex(v, l, r, key): # noqa: E741
... | 23.785714 | 86 | 0.487237 |
d4f6af1a992873e2fd809a288fb0ed09340a71a0 | 35,200 | py | Python | py/google_drive_api.py | YoelMonsalve/GoogleDrivePythonLibrary | 00ac381a362a0bc885487c23ca185a219baf1944 | [
"MIT"
] | null | null | null | py/google_drive_api.py | YoelMonsalve/GoogleDrivePythonLibrary | 00ac381a362a0bc885487c23ca185a219baf1944 | [
"MIT"
] | null | null | null | py/google_drive_api.py | YoelMonsalve/GoogleDrivePythonLibrary | 00ac381a362a0bc885487c23ca185a219baf1944 | [
"MIT"
] | null | null | null | from __future__ import print_function
import os.path
from googleapiclient.discovery import build
from google_auth_oauthlib.flow import InstalledAppFlow
from google.auth.transport.requests import Request
from google.oauth2.credentials import Credentials
from googleapiclient.http import MediaFileUpload
import sys ... | 42.256903 | 215 | 0.578352 |
a2e7163a25c553230c3e6f160f729c009deed9f5 | 34,671 | py | Python | flask_admin/tests/mongoengine/test_basic.py | martjushev/flask-admin | 4880593cd054ff60ce33b6156d62fc33c1a257c4 | [
"BSD-3-Clause"
] | 28 | 2020-02-16T09:59:12.000Z | 2021-05-20T06:52:05.000Z | flask_admin/tests/mongoengine/test_basic.py | d3alek/flask-admin | 3643d78808596f4634c8779e5decde9ef8ebda6e | [
"BSD-3-Clause"
] | 5 | 2020-01-22T12:26:09.000Z | 2020-02-24T04:27:35.000Z | flask_admin/tests/mongoengine/test_basic.py | d3alek/flask-admin | 3643d78808596f4634c8779e5decde9ef8ebda6e | [
"BSD-3-Clause"
] | 4 | 2020-03-31T09:22:49.000Z | 2021-06-18T05:00:05.000Z | from nose.tools import eq_, ok_
from wtforms import fields, validators
from flask_admin import form
from flask_admin._compat import as_unicode
from flask_admin.contrib.mongoengine import ModelView
from . import setup
from datetime import datetime
class CustomModelView(ModelView):
def __init__(self, model,
... | 28.630058 | 104 | 0.611577 |
bdc1a1e35704b70ed21ff295a837520907c1dc3e | 5,695 | py | Python | filter_plugins/merge.py | openfun/arnold | 3ffd61d8296d93111e6b5412a53c42d67ca61463 | [
"MIT"
] | 34 | 2018-03-09T13:06:05.000Z | 2021-05-09T10:12:16.000Z | filter_plugins/merge.py | openfun/arnold | 3ffd61d8296d93111e6b5412a53c42d67ca61463 | [
"MIT"
] | 302 | 2018-05-23T12:06:29.000Z | 2022-02-28T08:22:34.000Z | filter_plugins/merge.py | openfun/arnold | 3ffd61d8296d93111e6b5412a53c42d67ca61463 | [
"MIT"
] | 10 | 2018-05-31T08:28:58.000Z | 2022-03-10T09:51:08.000Z | """
Merge Jinja filters
"""
from copy import deepcopy
from pathlib import Path
from ansible.errors import AnsibleFilterError
from ansible.utils.encrypt import random_password
# pylint: disable=invalid-name,too-many-branches
def merge_with_app(base, new):
"""
Merge data from the "new" application to the ... | 34.307229 | 83 | 0.60878 |
9d71a58401d0f34bcd8ea3e7adc62e60748b7e42 | 1,983 | py | Python | applications/ppmi_volumes/collect_ppmi_volumes_direct_reg_seg_mjff.py | stnava/superiq | a13befe5f525bbef02cd095031952db62c5d054e | [
"Apache-2.0"
] | null | null | null | applications/ppmi_volumes/collect_ppmi_volumes_direct_reg_seg_mjff.py | stnava/superiq | a13befe5f525bbef02cd095031952db62c5d054e | [
"Apache-2.0"
] | null | null | null | applications/ppmi_volumes/collect_ppmi_volumes_direct_reg_seg_mjff.py | stnava/superiq | a13befe5f525bbef02cd095031952db62c5d054e | [
"Apache-2.0"
] | null | null | null | from superiq import VolumeData
from superiq.pipeline_utils import *
import boto3
import pandas as pd
from datetime import datetime
def collect_brain_age(bucket, version):
prefix = f"superres-pipeline-{version}/"
objects = list_images(bucket, prefix)
brain_age = [i for i in objects if i.endswith('brain_age.csv')]
d... | 35.410714 | 104 | 0.740292 |
91a17b8eb589cab75848f760561942840385e2a2 | 536 | py | Python | modules/vtk_basic/vtkHierarchicalDataSetGeometryFilter.py | chrisidefix/devide | 99bfe156e710fa47ba7ae88b0ce1eef592a3a439 | [
"BSD-3-Clause"
] | 25 | 2015-08-24T16:05:14.000Z | 2020-12-09T20:07:14.000Z | modules/vtk_basic/vtkHierarchicalDataSetGeometryFilter.py | chrisidefix/devide | 99bfe156e710fa47ba7ae88b0ce1eef592a3a439 | [
"BSD-3-Clause"
] | 1 | 2016-02-16T21:18:10.000Z | 2016-02-16T21:18:10.000Z | modules/vtk_basic/vtkHierarchicalDataSetGeometryFilter.py | chrisidefix/devide | 99bfe156e710fa47ba7ae88b0ce1eef592a3a439 | [
"BSD-3-Clause"
] | 5 | 2016-02-16T20:05:37.000Z | 2020-01-31T11:27:39.000Z | # class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkHierarchicalDataSetGeometryFilter(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manag... | 41.230769 | 70 | 0.73694 |
ec589c003618327870a458e640132c3e9d16a487 | 14,509 | py | Python | plugins/modules/oci_network_subnet_facts.py | hanielburton/oci-ansible-collection | dfdffde637f746d346ba35569be8c3a3407022f2 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_network_subnet_facts.py | hanielburton/oci-ansible-collection | dfdffde637f746d346ba35569be8c3a3407022f2 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_network_subnet_facts.py | hanielburton/oci-ansible-collection | dfdffde637f746d346ba35569be8c3a3407022f2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2017, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 38.282322 | 144 | 0.599145 |
86f23fb78462d680f148ac045f39fe60ee060d12 | 345 | py | Python | sampleprj/pysubpckB/src/sampleprj/pysubpckB/pysubsub/__init__.py | astyl/AcrobatomaticBuildSystem | a8a4858d723a0673eeeb6f039af05dc86be638a9 | [
"BSD-2-Clause-FreeBSD"
] | 10 | 2019-01-07T20:17:05.000Z | 2022-03-07T20:46:58.000Z | sampleprj/pysubpckB/src/sampleprj/pysubpckB/pysubsub/__init__.py | astyl/AcrobatomaticBuildSystem | a8a4858d723a0673eeeb6f039af05dc86be638a9 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-09-04T11:27:10.000Z | 2019-09-04T15:02:36.000Z | sampleprj/pysubpckB/src/sampleprj/pysubpckB/pysubsub/__init__.py | astyl/AcrobatomaticBuildSystem | a8a4858d723a0673eeeb6f039af05dc86be638a9 | [
"BSD-2-Clause-FreeBSD"
] | 3 | 2019-08-30T10:01:55.000Z | 2022-01-27T21:06:39.000Z | # -*-coding:Utf-8 -*
# @file __init__.py
#
# Copyright 2016 Airbus Safran Launchers. All rights reserved.
# Use is subject to license terms.
#
# $Id$
# $Date$
#
# module import entry point
# for subpackage sampleprj.pysubpckB.pysubsub
print 'importing sampleprj.pysubpckB.pysubsub ...'
print 'importing sampleprj.pys... | 21.5625 | 62 | 0.724638 |
e2577765e2f5f7f4b23d0d55b15fa9ba7873a610 | 2,792 | py | Python | pkg/v1/providers/tests/clustergen/gencluster_params.py | ykakarap/tanzu-framework | 35a410d8ddc8b2f606a66ea0d1d696744b3c89b8 | [
"Apache-2.0"
] | 1 | 2022-03-24T12:13:01.000Z | 2022-03-24T12:13:01.000Z | pkg/v1/providers/tests/clustergen/gencluster_params.py | ykakarap/tanzu-framework | 35a410d8ddc8b2f606a66ea0d1d696744b3c89b8 | [
"Apache-2.0"
] | 5 | 2022-02-08T09:52:10.000Z | 2022-03-29T11:28:40.000Z | pkg/v1/providers/tests/clustergen/gencluster_params.py | ykakarap/tanzu-framework | 35a410d8ddc8b2f606a66ea0d1d696744b3c89b8 | [
"Apache-2.0"
] | 1 | 2021-11-10T11:01:42.000Z | 2021-11-10T11:01:42.000Z | #!/usr/bin/env python3
# Copyright 2020 The TKG Contributors.
#
# 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 applic... | 38.246575 | 103 | 0.534742 |
fb6b2964f6421ec8e84a4b6943488bc58137e104 | 1,977 | py | Python | medium/python/c0296_636_exclusive-time-of-functions/00_leetcode_0296.py | drunkwater/leetcode | 8cc4a07763e71efbaedb523015f0c1eff2927f60 | [
"Ruby"
] | null | null | null | medium/python/c0296_636_exclusive-time-of-functions/00_leetcode_0296.py | drunkwater/leetcode | 8cc4a07763e71efbaedb523015f0c1eff2927f60 | [
"Ruby"
] | null | null | null | medium/python/c0296_636_exclusive-time-of-functions/00_leetcode_0296.py | drunkwater/leetcode | 8cc4a07763e71efbaedb523015f0c1eff2927f60 | [
"Ruby"
] | 3 | 2018-02-09T02:46:48.000Z | 2021-02-20T08:32:03.000Z | # DRUNKWATER TEMPLATE(add description and prototypes)
# Question Title and Description on leetcode.com
# Function Declaration and Function Prototypes on leetcode.com
#636. Exclusive Time of Functions
#Given the running logs of n functions that are executed in a nonpreemptive single threaded CPU, find the exclusive time... | 50.692308 | 265 | 0.73394 |
e9fb022673cfa409592e5e23f5e60bb5e1f0ccf0 | 6,181 | py | Python | cs-config/cs_config/functions.py | MaxGhenis/Tax-Cruncher | c06fd06ec4d17cc2795f97a6ff088fcd220d3498 | [
"MIT"
] | 1 | 2019-10-15T04:07:56.000Z | 2019-10-15T04:07:56.000Z | cs-config/cs_config/functions.py | MaxGhenis/Tax-Cruncher | c06fd06ec4d17cc2795f97a6ff088fcd220d3498 | [
"MIT"
] | null | null | null | cs-config/cs_config/functions.py | MaxGhenis/Tax-Cruncher | c06fd06ec4d17cc2795f97a6ff088fcd220d3498 | [
"MIT"
] | 1 | 2020-01-03T02:39:54.000Z | 2020-01-03T02:39:54.000Z | import os
import json
import traceback
import paramtools
import pandas as pd
import inspect
from .helpers import convert_defaults, convert_adj
from .outputs import credit_plot, rate_plot, liability_plot
from .constants import MetaParameters
from bokeh.models import ColumnDataSource
from taxcrunch.cruncher import Crunch... | 28.615741 | 87 | 0.620126 |
6ba4740638ee3de5412f75ad8b3cbf68a3da18fc | 102 | py | Python | novice/03-04/Latihan/hello.py | septiannurtrir/praxis-academy | 1ef7f959c372ae991d74ccd373123142c2fbc542 | [
"MIT"
] | 1 | 2019-08-27T17:06:13.000Z | 2019-08-27T17:06:13.000Z | novice/03-04/Latihan/hello.py | septiannurtrir/praxis-academy | 1ef7f959c372ae991d74ccd373123142c2fbc542 | [
"MIT"
] | null | null | null | novice/03-04/Latihan/hello.py | septiannurtrir/praxis-academy | 1ef7f959c372ae991d74ccd373123142c2fbc542 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello():
return 'Hello, World' | 14.571429 | 25 | 0.666667 |
214f95cc8a01e5b753397f318f6a667a7ae6270b | 327 | py | Python | PreProcessingScript/dbConn.py | svobodam/Deep-Learning-Text-Summariser | b429384d171f3f32a0b2fc55e76b16645c615b1d | [
"MIT"
] | 1 | 2018-01-12T06:22:05.000Z | 2018-01-12T06:22:05.000Z | PreProcessingScript/dbConn.py | svobodam/Deep-Learning-Text-Summariser | b429384d171f3f32a0b2fc55e76b16645c615b1d | [
"MIT"
] | null | null | null | PreProcessingScript/dbConn.py | svobodam/Deep-Learning-Text-Summariser | b429384d171f3f32a0b2fc55e76b16645c615b1d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Database connection for DB manipulation
# Import libraries
import sqlite3
sqlConnection = sqlite3.connect('Data/DUCDataset.db')
c = sqlConnection.cursor()
c.execute("DELETE from summDUC WHERE TopicNo = 'D0702A'")
# Save changes
sqlConnection.commit()
# Close connection to DB
sqlConnection.c... | 19.235294 | 57 | 0.767584 |
88212e0f29d2130bee1c9f9e2819385beabc61a8 | 56,558 | py | Python | netapp/santricity/api/v2/administration_api.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 5 | 2016-08-23T17:52:22.000Z | 2019-05-16T08:45:30.000Z | netapp/santricity/api/v2/administration_api.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 2 | 2016-11-10T05:30:21.000Z | 2019-04-05T15:03:37.000Z | netapp/santricity/api/v2/administration_api.py | NetApp/santricity-webapi-pythonsdk | 1d3df4a00561192f4cdcdd1890f4d27547ed2de2 | [
"BSD-3-Clause-Clear"
] | 7 | 2016-08-25T16:11:44.000Z | 2021-02-22T05:31:25.000Z | #!/usr/bin/env python
# coding: utf-8
"""
AdministrationApi.py
The Clear BSD License
Copyright (c) – 2016, NetApp, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the fol... | 37.111549 | 845 | 0.497047 |
d3341d78d040dda21ac7c017f131edddff6deb20 | 204 | py | Python | fitness_app/users/tests/test_models.py | johanoh/fitness_app | bd8bc093058ab9f3873132d93ac3262d117546e0 | [
"MIT"
] | null | null | null | fitness_app/users/tests/test_models.py | johanoh/fitness_app | bd8bc093058ab9f3873132d93ac3262d117546e0 | [
"MIT"
] | null | null | null | fitness_app/users/tests/test_models.py | johanoh/fitness_app | bd8bc093058ab9f3873132d93ac3262d117546e0 | [
"MIT"
] | null | null | null | import pytest
from fitness_app.users.models import User
pytestmark = pytest.mark.django_db
def test_user_get_absolute_url(user: User):
assert user.get_absolute_url() == f"/users/{user.username}/"
| 20.4 | 64 | 0.77451 |
c0e25365c290441f53d3bd1ca056eb822226a614 | 863 | py | Python | xunit-autolabeler-v2/ast_parser/core/test_data/parser/class_wrapped_tests/class_wrapped_test.py | GoogleCloudPlatform/repo-automation-playground | a4c8f104c246ede002f6c18fcebfc0496c8abb94 | [
"Apache-2.0"
] | 5 | 2019-07-11T17:35:44.000Z | 2021-10-09T01:49:04.000Z | xunit-autolabeler-v2/ast_parser/core/test_data/parser/class_wrapped_tests/class_wrapped_test.py | GoogleCloudPlatform/repo-automation-playground | a4c8f104c246ede002f6c18fcebfc0496c8abb94 | [
"Apache-2.0"
] | 36 | 2019-08-27T18:20:21.000Z | 2022-01-12T21:29:00.000Z | xunit-autolabeler-v2/ast_parser/core/test_data/parser/class_wrapped_tests/class_wrapped_test.py | GoogleCloudPlatform/repo-automation-playground | a4c8f104c246ede002f6c18fcebfc0496c8abb94 | [
"Apache-2.0"
] | 13 | 2019-10-30T19:39:51.000Z | 2021-04-04T09:31:52.000Z | # Copyright 2020 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 30.821429 | 74 | 0.746234 |
50e9cb6a57de9302fad127cbb738bc05921c7685 | 4,242 | py | Python | azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/iot_dps_client.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/iot_dps_client.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 54 | 2016-03-25T17:25:01.000Z | 2018-10-22T17:27:54.000Z | azure-mgmt-iothubprovisioningservices/azure/mgmt/iothubprovisioningservices/iot_dps_client.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.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 ... | 43.731959 | 105 | 0.727723 |
7eea3b040ce6ace72b6f6038a0e1d15d4e6ad53a | 975 | py | Python | python/test/test_env_from_source.py | adriangonz/seldon-deploy-sdk | c5504838630a87053387cec57ec2e1e7251971e2 | [
"Apache-2.0"
] | 6 | 2021-02-18T14:37:54.000Z | 2022-01-13T13:27:43.000Z | python/test/test_env_from_source.py | adriangonz/seldon-deploy-sdk | c5504838630a87053387cec57ec2e1e7251971e2 | [
"Apache-2.0"
] | 14 | 2021-01-04T16:32:03.000Z | 2021-12-13T17:53:59.000Z | python/test/test_env_from_source.py | adriangonz/seldon-deploy-sdk | c5504838630a87053387cec57ec2e1e7251971e2 | [
"Apache-2.0"
] | 7 | 2021-03-17T09:05:55.000Z | 2022-01-05T10:39:56.000Z | # coding: utf-8
"""
Seldon Deploy API
API to interact and manage the lifecycle of your machine learning models deployed through Seldon Deploy. # noqa: E501
OpenAPI spec version: v1alpha1
Contact: hello@seldon.io
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future... | 23.780488 | 122 | 0.718974 |
1905f0888299e7ae9f86d3b4e48425451fb03697 | 1,247 | py | Python | clients/client/python/test/test_v0alpha0_api.py | ory/sdk | 9849c6115f44f4b7612ad246124d80b4401fd730 | [
"Apache-2.0"
] | 77 | 2020-02-14T17:27:36.000Z | 2022-03-25T08:44:52.000Z | clients/client/python/test/test_v0alpha0_api.py | vinckr/sdk | 5b93557835af7ad3662ef620b3ef10729149d484 | [
"Apache-2.0"
] | 125 | 2020-02-07T21:45:52.000Z | 2022-03-31T12:54:24.000Z | clients/client/python/test/test_v0alpha0_api.py | vinckr/sdk | 5b93557835af7ad3662ef620b3ef10729149d484 | [
"Apache-2.0"
] | 44 | 2020-01-31T22:05:47.000Z | 2022-03-09T14:41:22.000Z | """
Ory APIs
Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers. # noqa: E501
The version of the OpenAPI document: v0.0.1-alpha.30
Contact: support@ory.sh
Generated by: htt... | 21.5 | 194 | 0.630313 |
5a47a06b7186bc9ffd89c97dd255290db55c3086 | 19,610 | py | Python | mars/serialize/tests/test_serialize.py | immortalFrogJiang/mars | 93c786e38bdc0fbb483282d7792379db0345a3b6 | [
"Apache-2.0"
] | 1 | 2019-02-01T07:41:48.000Z | 2019-02-01T07:41:48.000Z | mars/serialize/tests/test_serialize.py | immortalFrogJiang/mars | 93c786e38bdc0fbb483282d7792379db0345a3b6 | [
"Apache-2.0"
] | null | null | null | mars/serialize/tests/test_serialize.py | immortalFrogJiang/mars | 93c786e38bdc0fbb483282d7792379db0345a3b6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 1999-2018 Alibaba Group Holding 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-... | 40.939457 | 114 | 0.618307 |
33fcf628addb572db39df30e31d56f9e18af4d3c | 399 | py | Python | geolocation/asgi.py | GiovannaK/geolocation-system-django | b7938bd852fee314192fb9965174fd67325e77bb | [
"Unlicense"
] | null | null | null | geolocation/asgi.py | GiovannaK/geolocation-system-django | b7938bd852fee314192fb9965174fd67325e77bb | [
"Unlicense"
] | null | null | null | geolocation/asgi.py | GiovannaK/geolocation-system-django | b7938bd852fee314192fb9965174fd67325e77bb | [
"Unlicense"
] | null | null | null | """
ASGI config for geolocation project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_S... | 23.470588 | 78 | 0.789474 |
6e9e47bfe494043e4d70a05208766f1ba74784ed | 4,573 | py | Python | qa/rpc-tests/multi_rpc.py | FusionEnergyX/FusionX | c8d72602f2050b5940fb182f9645cd0712cd2784 | [
"MIT"
] | 1 | 2019-03-20T20:33:48.000Z | 2019-03-20T20:33:48.000Z | qa/rpc-tests/multi_rpc.py | FusionEnerqyX/FusionX | 4e0d6bd3964f3961a16fc8ea8e8f749bb5c61d6a | [
"MIT"
] | null | null | null | qa/rpc-tests/multi_rpc.py | FusionEnerqyX/FusionX | 4e0d6bd3964f3961a16fc8ea8e8f749bb5c61d6a | [
"MIT"
] | 2 | 2019-05-23T15:09:41.000Z | 2019-07-15T13:02:56.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test multiple rpc user config option rpcauth
#
from test_framework.test_framework import BitcoinTest... | 37.793388 | 129 | 0.645091 |
1d966500aa4d45f6453f87bffaa39a9b09408107 | 6,829 | py | Python | src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/_help.py | diberry/azure-cli | 302999245cbb13b890b0a74f03443c577bd4bfae | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/_help.py | diberry/azure-cli | 302999245cbb13b890b0a74f03443c577bd4bfae | [
"MIT"
] | 3 | 2021-03-26T00:25:36.000Z | 2022-03-29T22:03:55.000Z | src/command_modules/azure-cli-ams/azure/cli/command_modules/ams/_help.py | diberry/azure-cli | 302999245cbb13b890b0a74f03443c577bd4bfae | [
"MIT"
] | 1 | 2020-07-13T22:28:09.000Z | 2020-07-13T22:28:09.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.
# -----------------------------------------------------... | 26.265385 | 147 | 0.656026 |
709e995cd31b0abd76a18a285a1dda7405392fe6 | 10,717 | py | Python | intersight/models/content_base_parameter_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 21 | 2018-03-29T14:20:35.000Z | 2021-10-13T05:11:41.000Z | intersight/models/content_base_parameter_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 14 | 2018-01-30T15:45:46.000Z | 2022-02-23T14:23:21.000Z | intersight/models/content_base_parameter_all_of.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 18 | 2018-01-03T15:09:56.000Z | 2021-07-16T02:21:54.000Z | # coding: utf-8
"""
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environmen... | 38.689531 | 1,052 | 0.640664 |
36cfa71aac3d887882303854576284604cf31b97 | 1,437 | py | Python | tests/test-poly1.py | 6tudent/pyemf | 830e61008af8acf1830e5c91dc876313a771afdb | [
"BSD-3-Clause-No-Nuclear-Warranty"
] | 16 | 2016-01-22T01:40:10.000Z | 2021-07-22T02:19:24.000Z | tests/test-poly1.py | 6tudent/pyemf | 830e61008af8acf1830e5c91dc876313a771afdb | [
"BSD-3-Clause-No-Nuclear-Warranty"
] | 1 | 2017-11-07T11:53:14.000Z | 2017-11-07T11:53:14.000Z | tests/test-poly1.py | jeremysanders/pyemf | 830e61008af8acf1830e5c91dc876313a771afdb | [
"BSD-3-Clause-No-Nuclear-Warranty"
] | 11 | 2017-02-28T21:02:26.000Z | 2020-10-21T19:23:29.000Z | #!/usr/bin/env python
# Test of bounds checking and 16bit/32bit versions of polygon, polyline, etc.
import pyemf
width=8
height=6
dpi=300
emf=pyemf.EMF(width,height,dpi)
pen=emf.CreatePen(pyemf.PS_SOLID,10,(0x01,0xa0,0xff))
emf.SelectObject(pen)
brush=emf.CreateSolidBrush((0x50,0x50,0x50))
emf.SelectObject(brush)
... | 26.611111 | 96 | 0.690327 |
d73f90910d950c761deea4587ab6b82edca66ce9 | 2,327 | py | Python | mkdocs/main.py | ergonlogic/mkdocs | 4f0ab8af2580b5b8a2e02af57403015f9d1c7df3 | [
"BSD-2-Clause"
] | 1 | 2015-11-08T11:41:46.000Z | 2015-11-08T11:41:46.000Z | mkdocs/main.py | ericholscher/mkdocs | 2cee131ecb39d03a9ea9be0a2cf663c1ca94cadf | [
"BSD-2-Clause"
] | null | null | null | mkdocs/main.py | ericholscher/mkdocs | 2cee131ecb39d03a9ea9be0a2cf663c1ca94cadf | [
"BSD-2-Clause"
] | 1 | 2019-09-10T07:28:37.000Z | 2019-09-10T07:28:37.000Z | #!/usr/bin/env python
# coding: utf-8
from __future__ import print_function
import logging
import sys
from mkdocs import __version__
from mkdocs.build import build
from mkdocs.config import load_config
from mkdocs.exceptions import MkDocsException
from mkdocs.gh_deploy import gh_deploy
from mkdocs.new import new
from... | 28.728395 | 79 | 0.664375 |
5bbd7626b9a6bffcc0bfcc7dd1f70c92eea201f1 | 8,804 | py | Python | venv/Lib/site-packages/tableutil/text_table.py | avim2809/CameraSiteBlocker | bfc0434e75e8f3f95c459a4adc86b7673200816e | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tableutil/text_table.py | avim2809/CameraSiteBlocker | bfc0434e75e8f3f95c459a4adc86b7673200816e | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tableutil/text_table.py | avim2809/CameraSiteBlocker | bfc0434e75e8f3f95c459a4adc86b7673200816e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import codecs
from collections import OrderedDict
from future.builtins import str
class BadTextTable(Exception):
pass
def get_headings_for_text_table(text_table,
field_delimiter=u'|'):
try:
headings = codecs.open(text_table, u'r', encoding=u'u... | 30.675958 | 97 | 0.49841 |
0b41b5fc987bb8c6122a7f1653e1a1a2a37d6e21 | 7,355 | py | Python | autoPyTorch/pipeline/components/setup/network_backbone/ShapedMLPBackbone.py | franchuterivera/Auto-PyTorch | ff5c5c99e424a47b5cdb0e40ec68fbf33943e764 | [
"Apache-2.0"
] | 1 | 2021-05-12T10:11:58.000Z | 2021-05-12T10:11:58.000Z | autoPyTorch/pipeline/components/setup/network_backbone/ShapedMLPBackbone.py | franchuterivera/Auto-PyTorch | ff5c5c99e424a47b5cdb0e40ec68fbf33943e764 | [
"Apache-2.0"
] | 1 | 2021-06-23T21:48:03.000Z | 2021-06-23T21:48:03.000Z | autoPyTorch/pipeline/components/setup/network_backbone/ShapedMLPBackbone.py | franchuterivera/Auto-PyTorch | ff5c5c99e424a47b5cdb0e40ec68fbf33943e764 | [
"Apache-2.0"
] | null | null | null | from typing import Dict, List, Optional, Tuple, Union
import ConfigSpace as CS
from ConfigSpace.configuration_space import ConfigurationSpace
from ConfigSpace.hyperparameters import (
CategoricalHyperparameter,
UniformFloatHyperparameter,
UniformIntegerHyperparameter
)
from torch import nn
from autoPyTor... | 53.686131 | 117 | 0.510945 |
ac3644624bef299d91a0beb31bda7f72765b1bb5 | 1,768 | py | Python | dycon_web/contest/migrations/0020_auto_20211118_2121.py | landges/dycon | 314f2c0f9ed682a56d19c741e6a132cc3331ca5f | [
"MIT"
] | null | null | null | dycon_web/contest/migrations/0020_auto_20211118_2121.py | landges/dycon | 314f2c0f9ed682a56d19c741e6a132cc3331ca5f | [
"MIT"
] | null | null | null | dycon_web/contest/migrations/0020_auto_20211118_2121.py | landges/dycon | 314f2c0f9ed682a56d19c741e6a132cc3331ca5f | [
"MIT"
] | null | null | null | # Generated by Django 3.2.7 on 2021-11-18 21:21
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contest', '0019_auto_20211118_2120'),
]
operations = [
migrations.RemoveField(
model_name='competitionsubmission',
name='coo... | 28.516129 | 47 | 0.575792 |
efd8e8bb5f6084f850f50b736631729309a53d8e | 398 | py | Python | ddtrace/contrib/elasticsearch/elasticsearch.py | zhammer/dd-trace-py | 4c30f6e36bfa34a63cd9b6884677c977f76d2a01 | [
"Apache-2.0",
"BSD-3-Clause"
] | 5 | 2020-03-07T01:12:29.000Z | 2021-04-21T00:53:19.000Z | ddtrace/contrib/elasticsearch/elasticsearch.py | zhammer/dd-trace-py | 4c30f6e36bfa34a63cd9b6884677c977f76d2a01 | [
"Apache-2.0",
"BSD-3-Clause"
] | 4 | 2019-11-22T20:58:01.000Z | 2020-08-17T21:16:13.000Z | ddtrace/contrib/elasticsearch/elasticsearch.py | zhammer/dd-trace-py | 4c30f6e36bfa34a63cd9b6884677c977f76d2a01 | [
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2020-03-18T16:29:20.000Z | 2020-07-20T16:05:10.000Z | from importlib import import_module
module_names = ('elasticsearch', 'elasticsearch1', 'elasticsearch2', 'elasticsearch5', 'elasticsearch6')
for module_name in module_names:
try:
elasticsearch = import_module(module_name)
break
except ImportError:
pass
else:
raise ImportError('could... | 26.533333 | 104 | 0.718593 |
c7b04472691e6878c863ea243971da107f0dd341 | 66 | py | Python | inventario/urls.py | exildev/pisix | 6e844be31333c7f6cd12fd0e21dc990405f9c27c | [
"MIT"
] | null | null | null | inventario/urls.py | exildev/pisix | 6e844be31333c7f6cd12fd0e21dc990405f9c27c | [
"MIT"
] | null | null | null | inventario/urls.py | exildev/pisix | 6e844be31333c7f6cd12fd0e21dc990405f9c27c | [
"MIT"
] | null | null | null | from django.conf.urls import url
import views
urlpatterns = [
]
| 9.428571 | 32 | 0.742424 |
48fde2619576bd3c06656763c33a09b757c8f048 | 6,610 | py | Python | snips_nlu/tests/test_intent_loading.py | CharlyBlavier/snips-nlu-Copy | 829d513ac464e0421a264fd64d8b94f59a09875e | [
"Apache-2.0"
] | 3,764 | 2018-02-27T08:25:52.000Z | 2022-03-30T17:59:22.000Z | snips_nlu/tests/test_intent_loading.py | unicorns18/snips-nlu | 74b2893c91fc0bafc919a7e088ecb0b2bd611acf | [
"Apache-2.0"
] | 305 | 2018-02-28T13:45:23.000Z | 2022-03-10T15:33:35.000Z | snips_nlu/tests/test_intent_loading.py | unicorns18/snips-nlu | 74b2893c91fc0bafc919a7e088ecb0b2bd611acf | [
"Apache-2.0"
] | 559 | 2018-03-04T15:44:15.000Z | 2022-03-21T17:00:21.000Z | from __future__ import unicode_literals
import io
from unittest import TestCase
from snips_nlu.dataset import Intent
from snips_nlu.exceptions import IntentFormatError
class TestIntentLoading(TestCase):
def test_should_load_from_yaml_file(self):
# Given
intent = Intent.from_yaml(io.StringIO("""
... | 29.377778 | 75 | 0.38941 |
c9402580a48802756b1f0f042a31820d9e53a2fb | 1,806 | py | Python | tests/test_package.py | randyzwitch/streamlit-embedcode | 996fccadb0d3e9c53d1efc009b6b89a57428d0fb | [
"MIT"
] | 24 | 2020-07-16T17:04:55.000Z | 2022-03-10T00:14:04.000Z | tests/test_package.py | randyzwitch/streamlit-embedcode | 996fccadb0d3e9c53d1efc009b6b89a57428d0fb | [
"MIT"
] | 2 | 2020-07-13T20:23:23.000Z | 2020-07-23T15:03:37.000Z | tests/test_package.py | randyzwitch/streamlit-embedcode | 996fccadb0d3e9c53d1efc009b6b89a57428d0fb | [
"MIT"
] | 6 | 2020-09-02T18:19:28.000Z | 2022-01-03T02:11:26.000Z | from streamlit_embedcode import _clean_link
from seleniumbase import BaseCase # https://seleniumbase.io/
def test_cleanlink_notrailing():
assert (
_clean_link(
"https://gist.github.com/randyzwitch/be8c5e9fb5b8e7b046afebcac12e5087"
)
== "https://gist.github.com/randyzwitch/be8c... | 30.610169 | 83 | 0.677741 |
b68b5bab9c2101867d6b9e4ce5b6d515bbf67efd | 4,503 | py | Python | test/test_config_command.py | kiefermat/beets | 268dcb0008228912c305fc6e8818dafda3b48555 | [
"MIT"
] | 1 | 2015-11-06T06:39:51.000Z | 2015-11-06T06:39:51.000Z | test/test_config_command.py | kiefermat/beets | 268dcb0008228912c305fc6e8818dafda3b48555 | [
"MIT"
] | null | null | null | test/test_config_command.py | kiefermat/beets | 268dcb0008228912c305fc6e8818dafda3b48555 | [
"MIT"
] | null | null | null | import os
import yaml
from mock import patch
from tempfile import mkdtemp
from shutil import rmtree
from beets import ui
from beets import config
import _common
from _common import unittest
from helper import TestHelper, capture_stdout
from beets.library import Library
class ConfigCommandTest(unittest.TestCase, Tes... | 35.179688 | 78 | 0.631801 |
715ff422a40f65676e33d77e465f8f2e9f90eaef | 469 | py | Python | src/models/helper.py | wdy06/kaggle-data-science-bowl-2019 | 645d690595fccc4a130cd435aef536c3af2e9045 | [
"MIT"
] | null | null | null | src/models/helper.py | wdy06/kaggle-data-science-bowl-2019 | 645d690595fccc4a130cd435aef536c3af2e9045 | [
"MIT"
] | null | null | null | src/models/helper.py | wdy06/kaggle-data-science-bowl-2019 | 645d690595fccc4a130cd435aef536c3af2e9045 | [
"MIT"
] | null | null | null | from models.model_lgbm import ModelLGBMClassifier, ModelLGBMRegressor
from models.model_catboost import ModelCatBoostRegressor
from models.model_xgb import ModelXGBRegressor
from models.model_nn import ModelNNRegressor
MODEL_MAP = {
'ModelLGBMClassifier': ModelLGBMClassifier,
'ModelLGBMRegressor': ModelLGBMReg... | 36.076923 | 69 | 0.831557 |
e4259f5f12104c37c3927f39e9c07c325fb868d7 | 1,871 | py | Python | src/algorithms/sorting.py | frapa/py_data_structures | ad6f0cc35a6cc896f31d94bc7b20054015376173 | [
"MIT"
] | null | null | null | src/algorithms/sorting.py | frapa/py_data_structures | ad6f0cc35a6cc896f31d94bc7b20054015376173 | [
"MIT"
] | null | null | null | src/algorithms/sorting.py | frapa/py_data_structures | ad6f0cc35a6cc896f31d94bc7b20054015376173 | [
"MIT"
] | null | null | null | from collections.abc import Callable
from typing import Any, Sequence
from src.data_structures.heap import Heap
SortFunction = Callable[[Sequence[Any]], Sequence[Any]]
def insertion_sort(data: Sequence[Any]) -> Sequence[Any]:
if len(data) <= 1:
return data
for i, item in enumerate(data[1:], start=1... | 21.755814 | 61 | 0.540887 |
9a506824b46834cc5080402a3c2487e6f62edfbf | 1,217 | py | Python | task.py | nricklin/gdal-multiplex-task | e61c27f1fadcffbf160d662b20fb3a54590b9017 | [
"MIT"
] | null | null | null | task.py | nricklin/gdal-multiplex-task | e61c27f1fadcffbf160d662b20fb3a54590b9017 | [
"MIT"
] | 1 | 2019-05-30T19:09:13.000Z | 2019-05-30T19:09:13.000Z | task.py | nricklin/gdal-multiplex-task | e61c27f1fadcffbf160d662b20fb3a54590b9017 | [
"MIT"
] | null | null | null | import subprocess
import json
outdir = '/mnt/work/output/'
indir = '/mnt/work/input/'
out_status = '/mnt/work/status.json'
input_data = json.load(open('/mnt/work/input/ports.json'))
command = input_data['command']
command = command.replace('$indir', indir)
command = command.replace('$outdir', outdir)
print("Runnin... | 28.97619 | 94 | 0.649137 |
5b3b0798a18052058d1272960cad30e2dade40b7 | 2,308 | py | Python | tests/unittests/utils/test_yaml_utils.py | krishnakatyal/towhee | c5e043aa1509cf46644ca6b53f691d6ed2647212 | [
"Apache-2.0"
] | null | null | null | tests/unittests/utils/test_yaml_utils.py | krishnakatyal/towhee | c5e043aa1509cf46644ca6b53f691d6ed2647212 | [
"Apache-2.0"
] | 1 | 2022-01-19T06:21:07.000Z | 2022-01-19T06:21:07.000Z | tests/unittests/utils/test_yaml_utils.py | jennyli-z/towhee | 55c55fd961229575b75eae269b55090c839f8dcd | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Zilliz. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 37.836066 | 119 | 0.665511 |
9b513f6cd0be0db3713a57351d1cb1e2dc1daeee | 540 | py | Python | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/ferrol-mola-32222 | 75e7ec9e3fcb45f206725c4bad699002a75d55af | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/ferrol-mola-32222 | 75e7ec9e3fcb45f206725c4bad699002a75d55af | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/home/migrations/0001_load_initial_data.py | crowdbotics-apps/ferrol-mola-32222 | 75e7ec9e3fcb45f206725c4bad699002a75d55af | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | from django.db import migrations
def create_site(apps, schema_editor):
Site = apps.get_model("sites", "Site")
custom_domain = "ferrol-mola-32222.botics.co"
site_params = {
"name": "Ferrol Mola",
}
if custom_domain:
site_params["domain"] = custom_domain
Site.objects.update_or_... | 20.769231 | 61 | 0.655556 |
efd5440b297bad9ea4fb44ac074e36ef065df6c4 | 1,769 | py | Python | 7-Ptrace-Code_injection_and_Syscall_interception/evasion.py | galtoubul/Introduction_to_Information_Security | 565181ef2ec9530de8e4af43d97da454ddcc77be | [
"MIT"
] | null | null | null | 7-Ptrace-Code_injection_and_Syscall_interception/evasion.py | galtoubul/Introduction_to_Information_Security | 565181ef2ec9530de8e4af43d97da454ddcc77be | [
"MIT"
] | null | null | null | 7-Ptrace-Code_injection_and_Syscall_interception/evasion.py | galtoubul/Introduction_to_Information_Security | 565181ef2ec9530de8e4af43d97da454ddcc77be | [
"MIT"
] | null | null | null | import server
from subprocess import check_output
class EvadeAntivirusServer(server.CommandServer):
"""The base class for the servers we will implement"""
def __init__(self):
super(EvadeAntivirusServer, self).__init__()
self.add_payload(
self.payload_for_getting_antivirus_pid(),
... | 31.589286 | 80 | 0.622951 |
35f511df4ac1123fbb59faea94673545fc605f22 | 1,446 | py | Python | cirq-google/cirq_google/engine/__init__.py | Saibaba-Alapati/Cirq | 782efcd04c3bbf73a0d630306a3d1cfd9966521d | [
"Apache-2.0"
] | 3,326 | 2018-07-18T23:17:21.000Z | 2022-03-29T22:28:24.000Z | cirq-google/cirq_google/engine/__init__.py | resduo/Cirq | 680f897345eb1c71c9242515edda8f04b8594319 | [
"Apache-2.0"
] | 3,443 | 2018-07-18T21:07:28.000Z | 2022-03-31T20:23:21.000Z | cirq-google/cirq_google/engine/__init__.py | resduo/Cirq | 680f897345eb1c71c9242515edda8f04b8594319 | [
"Apache-2.0"
] | 865 | 2018-07-18T23:30:24.000Z | 2022-03-30T11:43:23.000Z | # Copyright 2018 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 24.1 | 74 | 0.763485 |
e36d542366c6c55f5afda2640cd1ae08e6215b19 | 5,616 | py | Python | sdk/python/pulumi_azure_native/synapse/v20210301/get_private_endpoint_connection.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/synapse/v20210301/get_private_endpoint_connection.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/synapse/v20210301/get_private_endpoint_connection.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
from... | 41.6 | 193 | 0.696047 |
264041928f7814a68521dae8a9fd3662ebfc2299 | 3,124 | py | Python | src/globus_sdk/config/environments.py | mh-globus/globus-sdk-python | c740ebd85640d5c5fe92fd22e99ec05b1a280f6d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/globus_sdk/config/environments.py | mh-globus/globus-sdk-python | c740ebd85640d5c5fe92fd22e99ec05b1a280f6d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/globus_sdk/config/environments.py | mh-globus/globus-sdk-python | c740ebd85640d5c5fe92fd22e99ec05b1a280f6d | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import logging
import os
from typing import Dict, List, Optional, Type, cast
log = logging.getLogger(__name__)
# the format string for a service URL pulled out of the environment
# these are handled with uppercased service names, e.g.
# `GLOBUS_SDK_SERVICE_URL_SEARCH=...`
_SERVICE_URL_VAR_FORMAT = "GLOBUS_SDK_SERVIC... | 32.206186 | 88 | 0.663572 |
71ad9149634512d91ca2cbc6769ac926f38bc19c | 342 | py | Python | app/__init__.py | hcanul/jinja-admin-flask | 11914dc7a5cdaf036bf24aecc0d24daf86bbd7f2 | [
"MIT"
] | 6 | 2020-06-15T11:08:19.000Z | 2021-03-28T02:46:16.000Z | app/__init__.py | app-generator/jinja-template-sb-admin | 44c722c83fd5a89be67471b952af7ca7585c08db | [
"MIT"
] | 5 | 2022-01-25T20:48:29.000Z | 2022-01-28T11:45:30.000Z | app/__init__.py | app-generator/jinja-template-sb-admin | 44c722c83fd5a89be67471b952af7ca7585c08db | [
"MIT"
] | 2 | 2020-06-19T01:25:05.000Z | 2020-09-21T19:32:27.000Z | # -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""
# import Flask
from flask import Flask
# Inject Flask magic
app = Flask(__name__)
# App Config - the minimal footprint
app.config['TESTING' ] = True
app.config['SECRET_KEY'] = 'S#perS3crEt_JamesBond'
# Import routing to render the pages
... | 19 | 51 | 0.69883 |
655bf7d4eb61ba4819bcfcf07acc7bf29501fec1 | 4,436 | py | Python | homeassistant/components/downloader.py | hcchu/home-assistant-clone | dbc91c1d48c6570764bbaa58467aa4dc87f2186b | [
"MIT"
] | 1 | 2019-05-19T01:51:57.000Z | 2019-05-19T01:51:57.000Z | homeassistant/components/downloader.py | hcchu/home-assistant-clone | dbc91c1d48c6570764bbaa58467aa4dc87f2186b | [
"MIT"
] | null | null | null | homeassistant/components/downloader.py | hcchu/home-assistant-clone | dbc91c1d48c6570764bbaa58467aa4dc87f2186b | [
"MIT"
] | 1 | 2022-02-12T23:56:40.000Z | 2022-02-12T23:56:40.000Z | """
homeassistant.components.downloader
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Provides functionality to download files.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/downloader/
"""
import os
import logging
import re
import threading
from homeassistant.... | 30.805556 | 79 | 0.538999 |
d2617931f69bb777933e9399ff9d4acbbc9f26bb | 2,734 | py | Python | app/core/models.py | eitan-lukin/recipe-app-api | 13a2781c66bd329748786ba4cc7b380ed8a505c0 | [
"MIT"
] | null | null | null | app/core/models.py | eitan-lukin/recipe-app-api | 13a2781c66bd329748786ba4cc7b380ed8a505c0 | [
"MIT"
] | null | null | null | app/core/models.py | eitan-lukin/recipe-app-api | 13a2781c66bd329748786ba4cc7b380ed8a505c0 | [
"MIT"
] | null | null | null | import uuid
import os
from django.db import models
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \
PermissionsMixin
from django.conf import settings
def recipe_image_file_path(instance, filename):
"""Generate file path for new recipe image"""
... | 29.397849 | 76 | 0.673007 |
da731754429ac4058055505d4b000f8f03d00694 | 11,959 | py | Python | deal/linter/_transformer.py | orsinium/condition | 4cb8208a6aefe50a86669d3cdded810244cba597 | [
"MIT"
] | 40 | 2018-01-27T09:49:18.000Z | 2019-05-07T08:02:20.000Z | deal/linter/_transformer.py | orsinium/condition | 4cb8208a6aefe50a86669d3cdded810244cba597 | [
"MIT"
] | 6 | 2018-09-05T10:44:36.000Z | 2019-07-06T07:12:19.000Z | deal/linter/_transformer.py | rpdelaney/deal | ebf4244605bb5cc5da5a910010238437d372d5d0 | [
"MIT"
] | 4 | 2018-03-22T11:28:05.000Z | 2019-08-01T07:43:23.000Z | from __future__ import annotations
from enum import Enum
from pathlib import Path
from typing import Iterator, NamedTuple, Union
import astroid
from ._contract import Category
from ._extractors import get_value
from ._func import Func
from ._rules import CheckMarkers, CheckRaises
Priority = int
class Transformat... | 34.168571 | 85 | 0.583912 |
4706bd2a8ffd7ddfcb6fd46e88565ebb790c6346 | 5,266 | py | Python | qa/rpc-tests/cfund-rawtx-paymentrequest-vote.py | stakecom/stakework | a2110b0ba6aa9638a18c2e7ae12f0f229e074f35 | [
"MIT"
] | null | null | null | qa/rpc-tests/cfund-rawtx-paymentrequest-vote.py | stakecom/stakework | a2110b0ba6aa9638a18c2e7ae12f0f229e074f35 | [
"MIT"
] | null | null | null | qa/rpc-tests/cfund-rawtx-paymentrequest-vote.py | stakecom/stakework | a2110b0ba6aa9638a18c2e7ae12f0f229e074f35 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2018 The Stakework Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import StakeWorkTestFramework
from test_framework.cfund_util import *
c... | 45.008547 | 95 | 0.676984 |
7abdac626eaaf2f2f6320553fced3eb5a1585484 | 3,710 | py | Python | test/center_loss_test.py | KittenCN/pyFaceNet | 0804d06a3533a83ff865a3c4343cfca2a5cbe063 | [
"MIT"
] | 1 | 2020-04-27T22:52:14.000Z | 2020-04-27T22:52:14.000Z | test/center_loss_test.py | KittenCN/pyFaceNet | 0804d06a3533a83ff865a3c4343cfca2a5cbe063 | [
"MIT"
] | null | null | null | test/center_loss_test.py | KittenCN/pyFaceNet | 0804d06a3533a83ff865a3c4343cfca2a5cbe063 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2016 David Sandberg
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, me... | 42.159091 | 123 | 0.598922 |
17f0ae0eae6fadf4e4cc3b2765f9ec23057340ce | 5,295 | py | Python | SalishSeaTools/tests/test_unit_conversions.py | remanevy/Package | b8c394c5b886b2a85063f8da3957ea3ca4bbec3f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | SalishSeaTools/tests/test_unit_conversions.py | remanevy/Package | b8c394c5b886b2a85063f8da3957ea3ca4bbec3f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | SalishSeaTools/tests/test_unit_conversions.py | remanevy/Package | b8c394c5b886b2a85063f8da3957ea3ca4bbec3f | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2013-2016 The Salish Sea MEOPAR Contributors
# and The University of British Columbia
# 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... | 34.16129 | 77 | 0.663645 |
1c7c48878823a68e109244f3c551abf93439812b | 173 | py | Python | demo/DiSC_Demo/DiSC_Demo/urls.py | UMKC-BigDataLab/DiSC | fda81260a9f54a4519cceb1a4b0f501f095b6b4b | [
"Apache-2.0"
] | null | null | null | demo/DiSC_Demo/DiSC_Demo/urls.py | UMKC-BigDataLab/DiSC | fda81260a9f54a4519cceb1a4b0f501f095b6b4b | [
"Apache-2.0"
] | null | null | null | demo/DiSC_Demo/DiSC_Demo/urls.py | UMKC-BigDataLab/DiSC | fda81260a9f54a4519cceb1a4b0f501f095b6b4b | [
"Apache-2.0"
] | 1 | 2018-08-24T17:44:52.000Z | 2018-08-24T17:44:52.000Z | from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('admin/', admin.site.urls),
path('disc/', include('configure.urls')),
]
| 21.625 | 45 | 0.693642 |
485d18cb757cf96780754e925799ef3ea8def27c | 10,025 | py | Python | cherry/base.py | Windsooon/cherry | bc6ae1f0284d837fb95279098538530312313534 | [
"MIT"
] | 433 | 2019-07-23T06:51:05.000Z | 2022-03-29T03:43:49.000Z | cherry/base.py | Windsooon/cherry | bc6ae1f0284d837fb95279098538530312313534 | [
"MIT"
] | 7 | 2019-09-06T09:34:02.000Z | 2022-01-19T07:16:04.000Z | cherry/base.py | Windsooon/cherry | bc6ae1f0284d837fb95279098538530312313534 | [
"MIT"
] | 34 | 2019-08-27T09:50:29.000Z | 2022-03-25T01:55:35.000Z | # -*- coding: utf-8 -*-
"""
cherry.base
~~~~~~~~~~~~
Base method for cherry
:copyright: (c) 2018-2020 by Windson Yang
:license: MIT License, see LICENSE for more details.
"""
import os
import pickle
import tarfile
import hashlib
import codecs
import urllib
import logging
import numpy as np
from collections import nam... | 35.175439 | 110 | 0.650973 |
44ea836d8adf48a4cd8247338cd9e9f7f7b91557 | 4,269 | py | Python | LF_total_energy_variation_multiplication.py | kimukook/variable_length_oscillating_pendulum | 486aa95fe4b9cbaa6cbeb542209259484f48e191 | [
"MIT"
] | null | null | null | LF_total_energy_variation_multiplication.py | kimukook/variable_length_oscillating_pendulum | 486aa95fe4b9cbaa6cbeb542209259484f48e191 | [
"MIT"
] | null | null | null | LF_total_energy_variation_multiplication.py | kimukook/variable_length_oscillating_pendulum | 486aa95fe4b9cbaa6cbeb542209259484f48e191 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import pendulum
from pendulum import Pendulum
from functools import partial
from scipy import io
'''
This is a script that computes a specific function over the state space (phase space). The function considered here
is for proving the asymptotic stability for the vari... | 28.651007 | 271 | 0.573671 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.