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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
799478ee4214034d03067b04b0a7007ec82da516 | 210 | py | Python | readthedocs/restapi/serializers.py | yrchen/readthedocs.org | b3580e3f3f08ce79734ffbfd26b04a35689a2f64 | [
"MIT"
] | 1 | 2019-08-02T19:56:43.000Z | 2019-08-02T19:56:43.000Z | readthedocs/restapi/serializers.py | johncosta/readthedocs.org | 0f983d1285157eca0d676d3436b8bb10941487ae | [
"MIT"
] | null | null | null | readthedocs/restapi/serializers.py | johncosta/readthedocs.org | 0f983d1285157eca0d676d3436b8bb10941487ae | [
"MIT"
] | null | null | null | from rest_framework import serializers
from projects.models import Project
class ProjectSerializer(serializers.ModelSerializer):
class Meta:
model = Project
excludes = ['path', 'featured'] | 26.25 | 53 | 0.738095 |
7994796380d248cc05d63df1df98d9d6a5b39ee1 | 35 | py | Python | btd6_memory_info/generated/Assets/Scripts/Models/Towers/Projectiles/Behaviors/AddBehaviorToBloonModel/add_behavior_to_bloon_model.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Models/Towers/Projectiles/Behaviors/AddBehaviorToBloonModel/add_behavior_to_bloon_model.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/Assets/Scripts/Models/Towers/Projectiles/Behaviors/AddBehaviorToBloonModel/add_behavior_to_bloon_model.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class AddBehaviorToBloonModel: pass | 35 | 35 | 0.914286 |
79947e625bb589e36f46b50b0c54da16c75fc987 | 2,880 | py | Python | PythonNetCode/chapter8/8_3a_xmlrpc_server_with_http_auth.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | PythonNetCode/chapter8/8_3a_xmlrpc_server_with_http_auth.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | PythonNetCode/chapter8/8_3a_xmlrpc_server_with_http_auth.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Python Network Programming Cookbook -- Chapter - 8
# This program is optimized for Python 2.7.
# It may run on any other version with/without modifications.
import argparse
import xmlrpclib
from base64 import b64decode
from SimpleXMLRPCServer import SimpleXMLRPCServer, SimpleXMLRPCRequestHandl... | 42.985075 | 111 | 0.655208 |
7994ac84b3c45e481d2515577f3232d70fa08681 | 4,965 | py | Python | influxdb_client/domain/create_dashboard_request.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | 1 | 2021-06-06T10:39:47.000Z | 2021-06-06T10:39:47.000Z | influxdb_client/domain/create_dashboard_request.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | influxdb_client/domain/create_dashboard_request.py | kelseiv/influxdb-client-python | 9a0d2d659157cca96f6a04818fdeb215d699bdd7 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class Crea... | 28.699422 | 124 | 0.582276 |
7994e30af2e289102985ff19a334f6bae0c38f74 | 11,724 | py | Python | ertk/tensorflow/utils.py | bagustris/emotion | 5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36 | [
"MIT"
] | 3 | 2020-11-03T14:54:22.000Z | 2021-04-12T12:23:10.000Z | ertk/tensorflow/utils.py | bagustris/emotion | 5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36 | [
"MIT"
] | null | null | null | ertk/tensorflow/utils.py | bagustris/emotion | 5bd83d3ca8a6eb930f449b7a990fefd75d0c7d36 | [
"MIT"
] | 2 | 2020-12-03T06:21:59.000Z | 2021-01-16T04:47:12.000Z | from functools import wraps
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union
import numpy as np
import tensorflow as tf
from sklearn.pipeline import Pipeline
from tensorflow.keras.layers import Layer, Wrapper
from tensorflow.keras.losses import Loss
from tensorflow.keras.metrics import Metric... | 30.771654 | 86 | 0.632634 |
7994e32f594d0162a0e6309d10f7fbc724cec397 | 5,974 | py | Python | rec_app/app.py | LukasSteffensen/movielens-imdb-exploration | a7de353b3a065a98820175ef58ac4621e72a9b2b | [
"MIT"
] | 30 | 2020-01-15T20:38:32.000Z | 2021-12-25T06:55:07.000Z | rec_app/app.py | audreyanneguindon/movielens-imdb-exploration | a7de353b3a065a98820175ef58ac4621e72a9b2b | [
"MIT"
] | 5 | 2019-12-11T10:37:46.000Z | 2020-01-10T18:35:17.000Z | rec_app/app.py | audreyanneguindon/movielens-imdb-exploration | a7de353b3a065a98820175ef58ac4621e72a9b2b | [
"MIT"
] | 15 | 2020-04-06T23:24:34.000Z | 2021-08-22T02:04:30.000Z | from flask import Flask, request, render_template, session
import numpy as np
import pandas as pd
from surprise import NMF, Dataset, Reader
from scipy.stats import hmean
import os
from src.data import initial_data, get_trending_movie_ids, update_data, onehotencoding2genre
from src.siamese_training import training
ap... | 40.917808 | 146 | 0.71761 |
79951adfaabdca4b8bf37625b65de678df64ef97 | 2,375 | py | Python | InterfaceMethodsPython/gaussSeidelRelajado.py | jonyzp/parallelGames | ba9895971dcf0c6e77a0738113ffae3a01596e6e | [
"Apache-2.0"
] | null | null | null | InterfaceMethodsPython/gaussSeidelRelajado.py | jonyzp/parallelGames | ba9895971dcf0c6e77a0738113ffae3a01596e6e | [
"Apache-2.0"
] | null | null | null | InterfaceMethodsPython/gaussSeidelRelajado.py | jonyzp/parallelGames | ba9895971dcf0c6e77a0738113ffae3a01596e6e | [
"Apache-2.0"
] | null | null | null | import numpy as np
import sys
import json
from math import *
def initializeMatrix(file,size):
A = np.zeros((size, size+1))
#xValues = np.array(sys.argv[4]) #sys.argv[4] vector con los valores iniciales
xValues= json.loads(sys.argv[4])
for i in range (size):
cont=0
fileMio=file.readl... | 27.616279 | 129 | 0.580211 |
79955f5168c7d49ae3ab0cf78ac16c1e25bba0d3 | 8,130 | py | Python | EXAMPLE_MCMC/MCMC_fitter.py | sidgurun/FLaREON | 58672e49bb6fdf5ad2802fa02310724b9c3198ac | [
"MIT"
] | null | null | null | EXAMPLE_MCMC/MCMC_fitter.py | sidgurun/FLaREON | 58672e49bb6fdf5ad2802fa02310724b9c3198ac | [
"MIT"
] | null | null | null | EXAMPLE_MCMC/MCMC_fitter.py | sidgurun/FLaREON | 58672e49bb6fdf5ad2802fa02310724b9c3198ac | [
"MIT"
] | null | null | null | import sys
import numpy as np
import FLaREON as Lya
import emcee
#==============================================================================#
#==============================================================================#
#==============================================================================#
# In ... | 35.657895 | 184 | 0.530873 |
79956d77fb1a46b13bc2734030f39a791f0e2a17 | 3,812 | py | Python | usaspending_api/core/validator/award_filter.py | animatecitizen/usaspending-api | 556511ff51fe80a8be8361daa5876fd684a04efe | [
"CC0-1.0"
] | null | null | null | usaspending_api/core/validator/award_filter.py | animatecitizen/usaspending-api | 556511ff51fe80a8be8361daa5876fd684a04efe | [
"CC0-1.0"
] | null | null | null | usaspending_api/core/validator/award_filter.py | animatecitizen/usaspending-api | 556511ff51fe80a8be8361daa5876fd684a04efe | [
"CC0-1.0"
] | null | null | null | from django.conf import settings
from usaspending_api.awards.v2.lookups.lookups import award_type_mapping
from usaspending_api.core.validator.helpers import TINY_SHIELD_SEPARATOR
AWARD_FILTER = [
{'name': 'award_ids', 'type': 'array', 'array_type': 'text', 'text_type': 'search'},
{'name': 'award_type_codes',... | 66.877193 | 109 | 0.598898 |
799586c2b0077522a5c531c57d922dc66bf54f3d | 1,586 | py | Python | dajaxice/templatetags/dajaxice_templatetags.py | ifanrx/django-dajaxice | 6e066c39e7908f352bf0913634f45deab1f8a710 | [
"BSD-3-Clause"
] | 9 | 2016-05-25T20:58:02.000Z | 2020-11-18T00:09:46.000Z | dajaxice/templatetags/dajaxice_templatetags.py | ifanrx/django-dajaxice | 6e066c39e7908f352bf0913634f45deab1f8a710 | [
"BSD-3-Clause"
] | 5 | 2016-05-25T01:18:40.000Z | 2019-10-09T10:47:35.000Z | dajaxice/templatetags/dajaxice_templatetags.py | ifanrx/django-dajaxice | 6e066c39e7908f352bf0913634f45deab1f8a710 | [
"BSD-3-Clause"
] | 16 | 2015-07-16T10:59:42.000Z | 2019-08-06T13:38:03.000Z | import logging
from django import template
from django.middleware.csrf import get_token
from django.conf import settings
from django.core.files.storage import get_storage_class
from django.urls import reverse
from django.utils.safestring import mark_safe
from dajaxice.core import dajaxice_config
staticfiles_storage... | 35.244444 | 134 | 0.740227 |
799590d051589ca15e834966489e6ecf9b8e3053 | 3,800 | py | Python | intersight/models/connectorpack_connector_pack_summary_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/connectorpack_connector_pack_summary_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/connectorpack_connector_pack_summary_ref.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class ConnectorpackConnectorPackSummaryRef(object):
"""... | 25.333333 | 89 | 0.564474 |
7995a35e8f3b917383cece222c670d8f2de70540 | 137,954 | py | Python | src/aks-preview/azext_aks_preview/custom.py | smurawski/azure-cli-extensions | 7ac32934bf3a1ec4b100bf7fa2ca5cbd09b5dc03 | [
"MIT"
] | null | null | null | src/aks-preview/azext_aks_preview/custom.py | smurawski/azure-cli-extensions | 7ac32934bf3a1ec4b100bf7fa2ca5cbd09b5dc03 | [
"MIT"
] | 9 | 2022-03-25T19:35:49.000Z | 2022-03-31T06:09:47.000Z | src/aks-preview/azext_aks_preview/custom.py | smurawski/azure-cli-extensions | 7ac32934bf3a1ec4b100bf7fa2ca5cbd09b5dc03 | [
"MIT"
] | null | null | null | # pylint: disable=too-many-lines
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------... | 43.409062 | 227 | 0.643127 |
7995aadc7b14869fcdaeee96cec8666c34a58c00 | 18,783 | py | Python | network.py | negi111111/StarGAN | 149c8b4092e1555d8a7af8daab0185d1d04a6089 | [
"MIT"
] | 6 | 2018-11-25T08:53:55.000Z | 2020-02-20T02:20:27.000Z | network.py | negi111111/Food-Changer-GAN | 149c8b4092e1555d8a7af8daab0185d1d04a6089 | [
"MIT"
] | null | null | null | network.py | negi111111/Food-Changer-GAN | 149c8b4092e1555d8a7af8daab0185d1d04a6089 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
from torch.nn import init
import functools
from torch.autograd import Variable
from torch.optim import lr_scheduler
import numpy as np
###############################################################################
# Functions
##########################################################... | 40.220557 | 151 | 0.606772 |
7995b056ea3049f42e7a95358a81495d44768759 | 221 | py | Python | classfunc_unitest.py | sillybun/pyctlib | d4c8b191fd270923ad73924760847f2bdbdd9116 | [
"MIT"
] | 3 | 2021-07-03T17:27:44.000Z | 2021-09-26T20:48:19.000Z | classfunc_unitest.py | sillybun/pyctlib | d4c8b191fd270923ad73924760847f2bdbdd9116 | [
"MIT"
] | null | null | null | classfunc_unitest.py | sillybun/pyctlib | d4c8b191fd270923ad73924760847f2bdbdd9116 | [
"MIT"
] | 1 | 2022-03-08T08:54:03.000Z | 2022-03-08T08:54:03.000Z | import sys
import os
from sys import getsizeof
sys.path.append(os.path.abspath("."))
import pyctlib
from pyctlib.classfunc import save_args
class A:
def __init__(self, a, b):
save_args(vars())
a = A(1, 2)
| 14.733333 | 39 | 0.692308 |
7995e0af6b204cef02b50833dd21454073237c6f | 8,780 | py | Python | atom/proton/python/proton_api/models/opt_config.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 11 | 2019-04-16T02:11:17.000Z | 2021-12-16T22:51:40.000Z | atom/proton/python/proton_api/models/opt_config.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 81 | 2019-11-19T23:24:28.000Z | 2022-03-28T11:35:47.000Z | atom/proton/python/proton_api/models/opt_config.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | 11 | 2020-07-08T02:29:56.000Z | 2022-03-28T10:05:33.000Z | # coding: utf-8
"""
Hydrogen Proton API
Financial engineering module of Hydrogen Atom # noqa: E501
OpenAPI spec version: 1.9.2
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from proton_... | 29.762712 | 173 | 0.588269 |
7995e38c322001acf1230e8cf6db9a6c1c639dc1 | 4,789 | py | Python | opacus/layers/param_rename.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 2 | 2022-03-22T13:59:28.000Z | 2022-03-24T07:02:54.000Z | opacus/layers/param_rename.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 12 | 2022-02-17T16:29:31.000Z | 2022-03-29T15:06:42.000Z | opacus/layers/param_rename.py | nhsx-mirror/SynthVAE | 64c00dff1b9cb1fe22b4b25e585b17ca5c7b9651 | [
"MIT"
] | 3 | 2021-11-18T10:13:00.000Z | 2022-03-23T10:25:55.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from typing import Dict, Union
import torch.nn as nn
from torch import Tensor
from torch.nn.modules.module import _IncompatibleKeys
def filter_out_old_keys(self, state_dict, prefix, local_metadata):
new_state_dict = {... | 42.008772 | 103 | 0.622677 |
7995e519f6a887c9743a52bb7184d7d3e422bf7b | 1,689 | py | Python | plugins/maya/publish/validate_no_redundant_nodes.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 3 | 2020-04-01T10:51:17.000Z | 2021-08-05T18:35:23.000Z | plugins/maya/publish/validate_no_redundant_nodes.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | null | null | null | plugins/maya/publish/validate_no_redundant_nodes.py | davidlatwe/reveries-config | 4a282dd64a32a9b87bd1a070759b6425ff785d68 | [
"MIT"
] | 1 | 2020-07-05T12:06:30.000Z | 2020-07-05T12:06:30.000Z |
import pyblish.api
from reveries import plugins
class SelectUnknownNodes(plugins.MayaSelectInvalidContextAction):
label = "Select Unknown"
class DeleteUnknownNodes(plugins.RepairContextAction):
label = "Delete Unknown"
class ValidateNoRedundantNodes(pyblish.api.ContextPlugin):
# redshift nodes
... | 25.984615 | 78 | 0.618709 |
7995fdc3311aed6adcac44b49ca96dcbb3132978 | 527 | py | Python | COVIDSafepassage/COVIDSafepassage/permission.py | VICS-CORE/safepassage_server | 58bc04dbfa55430c0218567211e5259de77518ae | [
"MIT"
] | null | null | null | COVIDSafepassage/COVIDSafepassage/permission.py | VICS-CORE/safepassage_server | 58bc04dbfa55430c0218567211e5259de77518ae | [
"MIT"
] | 8 | 2020-04-25T09:42:25.000Z | 2022-03-12T00:23:32.000Z | COVIDSafepassage/COVIDSafepassage/permission.py | VICS-CORE/safepassage_server | 58bc04dbfa55430c0218567211e5259de77518ae | [
"MIT"
] | null | null | null | from rest_framework import permissions
from passsystem import views
from passsystem.models import User
class IsAuthenticated(permissions.BasePermission):
def has_permission(self, request, view):
# allow login and logout requests without authentication
if isinstance(view, views.SessionLoginApiVie... | 32.9375 | 103 | 0.757116 |
799600123db11d83e1b70d171eb87eb4b8057668 | 6,822 | py | Python | qiskit/_quantumcircuit.py | emmabostian/qiskit-sdk-py | 2feba1cba156ba85fc840630c62a793099f208d0 | [
"Apache-2.0"
] | 2 | 2020-11-17T18:49:44.000Z | 2021-02-16T11:01:41.000Z | qiskit/_quantumcircuit.py | emmabostian/qiskit-sdk-py | 2feba1cba156ba85fc840630c62a793099f208d0 | [
"Apache-2.0"
] | null | null | null | qiskit/_quantumcircuit.py | emmabostian/qiskit-sdk-py | 2feba1cba156ba85fc840630c62a793099f208d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2017 IBM RESEARCH. 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
#
# U... | 35.53125 | 80 | 0.580915 |
79960b44155888ce69eb6f230a1e163b5b0495ab | 5,782 | py | Python | sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_skus_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_skus_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storagecache/azure/mgmt/storagecache/operations/_skus_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"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 ... | 40.152778 | 133 | 0.665687 |
79966e2387f30fde1c988596ac8f00882a48e0e8 | 9,089 | py | Python | ml-agents/mlagents/trainers/trainer.py | choyai/ml-agents | dfe9c11518f1de73f36bf85c36477372481e1598 | [
"Apache-2.0"
] | null | null | null | ml-agents/mlagents/trainers/trainer.py | choyai/ml-agents | dfe9c11518f1de73f36bf85c36477372481e1598 | [
"Apache-2.0"
] | null | null | null | ml-agents/mlagents/trainers/trainer.py | choyai/ml-agents | dfe9c11518f1de73f36bf85c36477372481e1598 | [
"Apache-2.0"
] | null | null | null | # # Unity ML-Agents Toolkit
import logging
from typing import Dict, List, Deque, Any
from mlagents.tf_utils import tf
from collections import deque
from mlagents_envs.exception import UnityException
from mlagents_envs.timers import set_gauge
from mlagents.trainers.trainer_metrics import TrainerMetrics
from mlagents.... | 35.503906 | 96 | 0.581362 |
7996b1d589970bbcea77e702d38cdc08a5df4222 | 423 | py | Python | pyscenarios/typing.py | crusaderky/pyscenarios | c93725c33a6e68af85f15070d89b4b3158ba362e | [
"Apache-2.0"
] | 10 | 2019-01-02T15:01:34.000Z | 2021-09-22T05:59:29.000Z | pyscenarios/typing.py | crusaderky/pyscenarios | c93725c33a6e68af85f15070d89b4b3158ba362e | [
"Apache-2.0"
] | 3 | 2020-07-02T12:29:52.000Z | 2022-03-26T18:02:20.000Z | pyscenarios/typing.py | crusaderky/pyscenarios | c93725c33a6e68af85f15070d89b4b3158ba362e | [
"Apache-2.0"
] | 2 | 2020-09-03T16:41:32.000Z | 2021-09-02T11:41:10.000Z | from typing import Tuple, Union
# Chunk size for a return array, which has shape (samples, dimensions). It can be
# anything accepted by dask (a positive integer, a tuple of two ints, or a tuple of two
# tuples of ints) for the output shape or None to request a numpy array.
Chunks2D = Union[None, int, Tuple[int, int],... | 52.875 | 87 | 0.706856 |
7996deb5c3dd7ff80c06cf02382e24b18c700eb6 | 469 | py | Python | LeetCode/easy - Array/118. Pascal's Triangle/solution.py | vincent507cpu/Comprehensive-Algorithm-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | 4 | 2020-06-26T00:45:53.000Z | 2021-04-19T12:23:32.000Z | LeetCode/easy - Array/118. Pascal's Triangle/solution.py | vincent507cpu/LeetCode-Comprehensive-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | null | null | null | LeetCode/easy - Array/118. Pascal's Triangle/solution.py | vincent507cpu/LeetCode-Comprehensive-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | null | null | null | # consulted
# https://leetcode.com/problems/pascals-triangle/discuss/38128/Python-4-lines-short-solution-using-map.
class Solution:
def generate(self, numRows: int) -> List[List[int]]:
res = [[1]]
for _ in range(2, numRows+1):
tmp1 = [0] + res[-1]
tmp2 = res[-1] + ... | 31.266667 | 103 | 0.513859 |
7996e40965ad2793c84b5c6cb23e47c5f4c78636 | 15,796 | py | Python | TileStache/Config.py | iandees/TileStache | a56839e0d71544b1e8f3d950e9a47926d40088ae | [
"BSD-3-Clause"
] | 13 | 2016-12-26T14:17:03.000Z | 2021-07-31T04:43:44.000Z | TileStache/Config.py | iandees/TileStache | a56839e0d71544b1e8f3d950e9a47926d40088ae | [
"BSD-3-Clause"
] | 6 | 2017-06-12T14:48:33.000Z | 2017-11-02T08:15:12.000Z | TileStache/Config.py | iandees/TileStache | a56839e0d71544b1e8f3d950e9a47926d40088ae | [
"BSD-3-Clause"
] | 3 | 2017-01-07T23:09:29.000Z | 2018-12-11T14:48:13.000Z | """ The configuration bits of TileStache.
TileStache configuration is stored in JSON files, and is composed of two main
top-level sections: "cache" and "layers". There are examples of both in this
minimal sample configuration:
{
"cache": {"name": "Test"},
"layers": {
"example": {
"... | 33.115304 | 146 | 0.631806 |
7996f60145251a42e13b51169d369a89b07370bc | 1,957 | py | Python | CadVlan/Util/forms/fields.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 17 | 2015-05-19T20:03:45.000Z | 2022-03-24T06:19:47.000Z | CadVlan/Util/forms/fields.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 41 | 2015-01-27T18:36:07.000Z | 2021-06-10T20:34:03.000Z | CadVlan/Util/forms/fields.py | marcusgc/GloboNetworkAPI-WebUI | 1172f14028f9c116d71df7489eda770446b131d2 | [
"Apache-2.0"
] | 19 | 2016-09-12T07:35:42.000Z | 2022-01-28T23:46:11.000Z | # -*- coding:utf-8 -*-
# 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 "Lic... | 41.638298 | 74 | 0.690853 |
79972c3cc32915881d1f34b8aa1c136cabb7bb1e | 851 | py | Python | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo/db/sqlalchemy/migration_cli/__init__.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 1 | 2019-09-11T11:56:19.000Z | 2019-09-11T11:56:19.000Z | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo/db/sqlalchemy/migration_cli/__init__.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | tools/dockerize/webportal/usr/lib/python2.7/site-packages/oslo/db/sqlalchemy/migration_cli/__init__.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | null | null | null | # 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 agreed to in... | 44.789474 | 78 | 0.759107 |
7997395053654b0e390144d5f94ee10b5e7e1e57 | 2,562 | py | Python | src/anonymize.py | DougTrajano/olid-br | d78cfe189703b3af4c6ecc7444e8713b76c8e52f | [
"Apache-2.0"
] | 2 | 2022-01-24T02:22:21.000Z | 2022-01-24T02:22:23.000Z | src/anonymize.py | DougTrajano/olid-br | d78cfe189703b3af4c6ecc7444e8713b76c8e52f | [
"Apache-2.0"
] | 1 | 2022-03-14T03:08:41.000Z | 2022-03-14T03:08:41.000Z | src/anonymize.py | DougTrajano/olid-br | d78cfe189703b3af4c6ecc7444e8713b76c8e52f | [
"Apache-2.0"
] | null | null | null | import re
import logging
import spacy
_logger = logging.getLogger()
class Anonymizer(object):
def __init__(self, user_placeholder: str = "USER", url_placeholder: str = "URL",
hashtag_placeholder: str = "HASHTAG", spacy_model: str = "pt_core_news_lg"):
self.user_placeholder = user_placeho... | 27.255319 | 160 | 0.590554 |
799740a794618ce7afad0ff3cb239840a7d4976f | 10,867 | py | Python | faucet/faucet_metrics.py | JJJollyjim/faucet | 90854634be50cd3a5b8fa17e81638f418b123b24 | [
"Apache-2.0"
] | 3 | 2021-04-07T19:10:12.000Z | 2021-12-30T17:11:14.000Z | faucet/faucet_metrics.py | JJJollyjim/faucet | 90854634be50cd3a5b8fa17e81638f418b123b24 | [
"Apache-2.0"
] | null | null | null | faucet/faucet_metrics.py | JJJollyjim/faucet | 90854634be50cd3a5b8fa17e81638f418b123b24 | [
"Apache-2.0"
] | null | null | null | """Implement Prometheus statistics."""
# Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2015 Brad Cowie, Christopher Lorier and Joe Stringer.
# Copyright (C) 2015 Research and Education Advanced Network New Zealand Ltd.
# Copyright (C) 2015--2019 The Contributors
#
# Licensed under the ... | 44.904959 | 125 | 0.632833 |
79977dd6a646801e05989d1dc79821aae3f33491 | 174,154 | py | Python | docassemble_base/docassemble/base/standardformatter.py | JuryA/docassemble | 5d2de6de4d1c84745a1ab94d377419b759963f96 | [
"MIT"
] | 1 | 2019-07-25T15:38:39.000Z | 2019-07-25T15:38:39.000Z | docassemble_base/docassemble/base/standardformatter.py | JuryA/docassemble | 5d2de6de4d1c84745a1ab94d377419b759963f96 | [
"MIT"
] | null | null | null | docassemble_base/docassemble/base/standardformatter.py | JuryA/docassemble | 5d2de6de4d1c84745a1ab94d377419b759963f96 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from six import string_types, text_type, PY2
from docassemble.base.functions import word, currency_symbol, url_action, comma_and_list, server
from docassemble.base.util import format_date
from docassemble.base.filter import markdown_to_html, get_audio_urls, get_video_urls, audio_control, video_c... | 73.731583 | 839 | 0.557954 |
79978583368f77b7a58b05ae9b81f752b3d3294b | 7,965 | py | Python | nova/api/openstack/compute/plugins/v3/server_metadata.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | 1 | 2021-09-10T15:29:02.000Z | 2021-09-10T15:29:02.000Z | nova/api/openstack/compute/plugins/v3/server_metadata.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/api/openstack/compute/plugins/v3/server_metadata.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | 1 | 2020-07-24T06:47:54.000Z | 2020-07-24T06:47:54.000Z | # Copyright 2011 OpenStack Foundation
# 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 requ... | 40.431472 | 78 | 0.578531 |
7997977074497195c378aa473d005f161f90a294 | 622 | py | Python | examples/he.py | YiqingZhouKelly/pyqmc | ec14c7b3cceb01d287cb09ebc5d2af37014c1c8e | [
"MIT"
] | null | null | null | examples/he.py | YiqingZhouKelly/pyqmc | ec14c7b3cceb01d287cb09ebc5d2af37014c1c8e | [
"MIT"
] | null | null | null | examples/he.py | YiqingZhouKelly/pyqmc | ec14c7b3cceb01d287cb09ebc5d2af37014c1c8e | [
"MIT"
] | null | null | null | if __name__ == "__main__":
import pyscf
import pyqmc
import pandas as pd
mol = pyscf.gto.M(atom = "He 0. 0. 0.", basis='bfd_vdz', ecp='bfd', unit='bohr')
mf = pyscf.scf.RHF(mol).run()
wf = pyqmc.slater_jastrow(mol, mf)
nconfig = 1000
configs = pyqmc.initial_guess(mol, nconfig)
acc... | 31.1 | 84 | 0.633441 |
7997985a574e44e1008737d0e523647625677532 | 568 | py | Python | src/samples/pymxs/get_rendered_normals.py | RegionStormer/3dsMax-Python-HowTos | b86ef45ef4d8dff373bd1cbfe5c4d5b805687339 | [
"MIT"
] | 88 | 2020-03-19T20:24:08.000Z | 2022-03-23T23:13:54.000Z | src/samples/pymxs/get_rendered_normals.py | RegionStormer/3dsMax-Python-HowTos | b86ef45ef4d8dff373bd1cbfe5c4d5b805687339 | [
"MIT"
] | 5 | 2020-04-09T19:56:47.000Z | 2021-11-12T20:02:18.000Z | src/samples/pymxs/get_rendered_normals.py | RegionStormer/3dsMax-Python-HowTos | b86ef45ef4d8dff373bd1cbfe5c4d5b805687339 | [
"MIT"
] | 22 | 2020-03-19T19:24:36.000Z | 2022-03-18T21:55:19.000Z | '''
An example of how to get the vertices and normals of a node
'''
from pymxs import runtime as rt # pylint: disable=import-error
def main():
"""Create a box and display its vertices and normals."""
box = rt.box()
print(f"node name: {box.name}")
trimesh = rt.convertTo(box, rt.TrimeshGeometry)
prin... | 31.555556 | 62 | 0.640845 |
7997b051ab8fb84c8959a51929714e3537a0cbc4 | 35 | py | Python | test/test_adapter.py | EarnestResearch/dbt-athena | 2409993aade3791bb5e889feb99e014613e8d12a | [
"Apache-2.0"
] | 43 | 2020-01-14T18:55:42.000Z | 2022-03-23T12:16:59.000Z | test/test_adapter.py | EarnestResearch/dbt-athena | 2409993aade3791bb5e889feb99e014613e8d12a | [
"Apache-2.0"
] | 19 | 2020-01-17T10:02:07.000Z | 2021-08-05T21:41:25.000Z | test/test_adapter.py | EarnestResearch/dbt-athena | 2409993aade3791bb5e889feb99e014613e8d12a | [
"Apache-2.0"
] | 14 | 2020-01-18T17:49:48.000Z | 2020-12-16T09:44:17.000Z | def test_config():
assert True
| 11.666667 | 18 | 0.685714 |
7997ca5a18faea8bc820f47e83a50e88be785315 | 327 | py | Python | arc/arc037/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | arc/arc037/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | arc/arc037/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
import math
from collections import defaultdict, deque
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
INF = float('inf')
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
N = ni()
M = na()
ans = 0
for m in M:
ans += max(0, 80 - m)
pri... | 17.210526 | 53 | 0.651376 |
79983df09f28ce56fcaa3b540d4c5c981d29b0c2 | 28,477 | py | Python | SCRAPE/Lib/site-packages/IPython/core/magic.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 2 | 2022-02-26T11:19:40.000Z | 2022-03-28T08:23:25.000Z | SCRAPE/Lib/site-packages/IPython/core/magic.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | null | null | null | SCRAPE/Lib/site-packages/IPython/core/magic.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1 | 2022-03-28T09:19:34.000Z | 2022-03-28T09:19:34.000Z | # encoding: utf-8
"""Magic functions for InteractiveShell.
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2001 Janko Hauser <jhauser@zscout.de> and
# Copyright (C) 2001 Fernando Perez <fperez@colorado.edu>
# Copyright (C) 2008 The IPython Development Team
# Dist... | 38.121821 | 112 | 0.611546 |
799840b6a0a7ff5f742a37256f8dad3afdd20b4b | 6,314 | py | Python | google-assistant-sdk/googlesamples/assistant/library/diva.py | lcaggio/assistant-sdk-python | 9636fb37d30b700fce42f720422bfc5eb8280272 | [
"Apache-2.0"
] | null | null | null | google-assistant-sdk/googlesamples/assistant/library/diva.py | lcaggio/assistant-sdk-python | 9636fb37d30b700fce42f720422bfc5eb8280272 | [
"Apache-2.0"
] | null | null | null | google-assistant-sdk/googlesamples/assistant/library/diva.py | lcaggio/assistant-sdk-python | 9636fb37d30b700fce42f720422bfc5eb8280272 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2017 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 by applicable law or... | 38.5 | 98 | 0.631296 |
79984da51b7862144b226e0c267be3134b1b2435 | 3,782 | py | Python | example/repair_java2.py | bloa/pyggi | 79babee583460494b1c533e45e49c7cb23ed70c9 | [
"MIT"
] | null | null | null | example/repair_java2.py | bloa/pyggi | 79babee583460494b1c533e45e49c7cb23ed70c9 | [
"MIT"
] | null | null | null | example/repair_java2.py | bloa/pyggi | 79babee583460494b1c533e45e49c7cb23ed70c9 | [
"MIT"
] | null | null | null | import argparse
import random
from pyggi.base import Patch, AbstractProgram
from pyggi.tree import TreeProgram, SrcmlEngine
from pyggi.tree import StmtReplacement, StmtInsertion, StmtDeletion
from pyggi.tree import ComparisonOperatorSetting
from pyggi.algo import FirstImprovement
# ===================================... | 42.022222 | 129 | 0.60074 |
799853e174f1a6de9a87987bd12c3c6dd88f5693 | 2,390 | py | Python | src/apitestframework/utils/config.py | JMatica/apitestframework | 4e195a3a4862cf50562ed21a4564e14d66c712b5 | [
"Apache-2.0"
] | 2 | 2020-08-07T11:46:48.000Z | 2021-01-18T21:44:21.000Z | src/apitestframework/utils/config.py | JMatica/apitestframework | 4e195a3a4862cf50562ed21a4564e14d66c712b5 | [
"Apache-2.0"
] | null | null | null | src/apitestframework/utils/config.py | JMatica/apitestframework | 4e195a3a4862cf50562ed21a4564e14d66c712b5 | [
"Apache-2.0"
] | 1 | 2020-08-07T10:38:49.000Z | 2020-08-07T10:38:49.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2018 JMatica Srl
#
# This file is part of apitestframework.
#
# 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.apa... | 31.866667 | 125 | 0.667782 |
7998629deae9fb9be474d444bbb7fa50bafdffcd | 3,115 | py | Python | src/lysate_urea_denaturation/plotting/plot_clustering.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null | src/lysate_urea_denaturation/plotting/plot_clustering.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null | src/lysate_urea_denaturation/plotting/plot_clustering.py | dezeraecox-manuscripts/COX_Proteome-stability | a5397baae7f0bc73980b88f8ccf7b83e3d05f590 | [
"MIT"
] | null | null | null |
import os, functools
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
import skfuzzy as fuzz
from GEN_Utils import FileHandling
from loguru import logger
from pykalman import KalmanFilter
from sklearn.cluster import KMeans
from sklearn.decomposition import ... | 37.53012 | 186 | 0.732905 |
799869c57adec9a91c5ca6952765f309822bdc0c | 9,388 | py | Python | igraph/test/attributes.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | 2 | 2017-03-07T04:01:59.000Z | 2017-05-02T17:19:29.000Z | igraph/test/attributes.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | null | null | null | igraph/test/attributes.py | tuandnvn/ecat_learning | fe797a088baec356e08b2e3cd56c7b73dd37c843 | [
"MIT"
] | null | null | null | # vim:ts=4 sw=4 sts=4:
import unittest
from igraph import *
class AttributeTests(unittest.TestCase):
def testGraphAttributes(self):
g = Graph.Full(5)
g["date"] = "2005-12-17"
self.assertTrue(g["date"] == "2005-12-17")
del g["date"]
self.assertRaises(KeyError, g.__getitem__, ... | 37.854839 | 87 | 0.568918 |
7998708c890dd1ddc5d91922d31d6d4ad1d270ca | 409 | py | Python | midterm2/hours_for_study.py | williamtrang/DSC20 | eb72c1003ee98e30f63040568e82eedcb8d3af52 | [
"Apache-2.0"
] | null | null | null | midterm2/hours_for_study.py | williamtrang/DSC20 | eb72c1003ee98e30f63040568e82eedcb8d3af52 | [
"Apache-2.0"
] | null | null | null | midterm2/hours_for_study.py | williamtrang/DSC20 | eb72c1003ee98e30f63040568e82eedcb8d3af52 | [
"Apache-2.0"
] | null | null | null | def hours_for_study(*chores):
"""
>>> hours_for_study(('A', 5))
12
>>> hours_for_study()
17
>>> hours_for_study(('A', 6), ('B', 4))
7
>>> hours_for_study(('B', 20))
0
"""
chore_hours = 0
total_hours = 17
for arg in chores:
chore_hours += arg[1]
tot... | 17.041667 | 43 | 0.520782 |
79989a58b50ae9f64cee8ff632962f302b17dd09 | 10,713 | py | Python | tf2_gnn/layers/nodes_to_graph_representation.py | ktaebum/tf2-gnn | 4eb6bf367623fef28c937b632e3caa83288de206 | [
"MIT"
] | null | null | null | tf2_gnn/layers/nodes_to_graph_representation.py | ktaebum/tf2-gnn | 4eb6bf367623fef28c937b632e3caa83288de206 | [
"MIT"
] | null | null | null | tf2_gnn/layers/nodes_to_graph_representation.py | ktaebum/tf2-gnn | 4eb6bf367623fef28c937b632e3caa83288de206 | [
"MIT"
] | null | null | null | """Graph representation aggregation layer."""
from abc import abstractmethod
from typing import List, NamedTuple, Optional
import tensorflow as tf
from dpu_utils.tf2utils import MLP, get_activation_function_by_name, unsorted_segment_softmax
class NodesToGraphRepresentationInput(NamedTuple):
"""A named tuple to h... | 46.176724 | 112 | 0.639223 |
7998a8a8c8d58b4648058a6dbdd11c3a9c8091bb | 69,260 | py | Python | cgatpipelines/tasks/rnaseq.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | null | null | null | cgatpipelines/tasks/rnaseq.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | null | null | null | cgatpipelines/tasks/rnaseq.py | kevinrue/cgat-flow | 02b5a1867253c2f6fd6b4f3763e0299115378913 | [
"MIT"
] | null | null | null | """rnaseq.py - Tasks for RNAseq analysis
==============================================
This module provides tasks related to RNAseq analysis.
Cufflinks/Cuffdiff
------------------
The module contains wrappers for running and parsing the output
of cufflinks and cuffdiff.
UTR analysis
------------
The functions :fu... | 33.556202 | 82 | 0.567066 |
7998bd3c9ea689ab5d485521ea5f48a7111484a5 | 22,914 | py | Python | electrumsv/devices/trezor/qt.py | CherryDT/electrumsv | 6b778b1c363e22286c3e3ef1bc5a2fa56955ac48 | [
"MIT"
] | 1 | 2021-12-28T10:52:11.000Z | 2021-12-28T10:52:11.000Z | electrumsv/devices/trezor/qt.py | SomberNight/electrumsv | 28262e3cab7b73e4960466f8aee252975953acf8 | [
"MIT"
] | null | null | null | electrumsv/devices/trezor/qt.py | SomberNight/electrumsv | 28262e3cab7b73e4960466f8aee252975953acf8 | [
"MIT"
] | null | null | null | from functools import partial
from PyQt5.QtCore import Qt, QEventLoop, pyqtSignal
from PyQt5.QtWidgets import QGridLayout, QPushButton, \
QVBoxLayout, QLabel, QCheckBox, QDialog, QLineEdit, QHBoxLayout, \
QGroupBox, QButtonGroup, QRadioButton, QFileDialog, QMessageBox, \
QWidget, QSlider, QTabWidget
from ... | 40.412698 | 90 | 0.615039 |
7998c1b749bbc12665fc41d207ed6ab3ed410061 | 4,965 | py | Python | src/svm/SVM.py | elenarose/scares-api | d754ae9066cc77ce999e76ffe4aa2546e8714642 | [
"MIT"
] | null | null | null | src/svm/SVM.py | elenarose/scares-api | d754ae9066cc77ce999e76ffe4aa2546e8714642 | [
"MIT"
] | null | null | null | src/svm/SVM.py | elenarose/scares-api | d754ae9066cc77ce999e76ffe4aa2546e8714642 | [
"MIT"
] | null | null | null | # Title : TODO
# Objective : TODO
# Created by: satwikkamarthi
# Created on: 10/4/20
import pandas as pd
# from sklearn.cross_decomposition import CCA
# from sklearn.datasets import make_multilabel_classification
# from sklearn.metrics import confusion_matrix
# from sklearn.svm import SVC
# import numpy as np
###... | 42.076271 | 135 | 0.420544 |
7998ca4886c3bfcda064f392f04fe2a1e6eb7dda | 11,036 | py | Python | converter/models/resnet.py | KaiyuYue/resnext-wsl-caffe | 222de80aae6bd423535d8d680ca03943d4424e09 | [
"MIT"
] | 2 | 2019-06-27T00:56:47.000Z | 2019-10-20T11:07:42.000Z | converter/models/resnet.py | KaiyuYue/resnext-wsl-caffe | 222de80aae6bd423535d8d680ca03943d4424e09 | [
"MIT"
] | null | null | null | converter/models/resnet.py | KaiyuYue/resnext-wsl-caffe | 222de80aae6bd423535d8d680ca03943d4424e09 | [
"MIT"
] | 2 | 2019-08-12T03:29:27.000Z | 2020-04-14T12:37:22.000Z | import torch.nn as nn
__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
'resnet152', 'resnext50_32x4d', 'resnext101_32x8d']
model_urls = {
'resnet18': 'https://download.pytorch.org/models/resnet18-5c106cde.pth',
'resnet34': 'https://download.pytorch.org/models/resnet34-333f7ec... | 37.283784 | 106 | 0.613447 |
79994a9a4e763c800995eee538bf32063c975047 | 107,587 | py | Python | theano/gpuarray/dnn.py | jdehotin/Theano | 0477d6356e4c5ceb5c3c03585e59d2e85abfcd02 | [
"BSD-3-Clause"
] | null | null | null | theano/gpuarray/dnn.py | jdehotin/Theano | 0477d6356e4c5ceb5c3c03585e59d2e85abfcd02 | [
"BSD-3-Clause"
] | null | null | null | theano/gpuarray/dnn.py | jdehotin/Theano | 0477d6356e4c5ceb5c3c03585e59d2e85abfcd02 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, print_function, division
import ctypes
import os
import sys
import warnings
import numpy
from six import integer_types
import theano
from theano import Op, Apply, tensor, config, Variable
from theano.scalar import as_scalar, constant, Log, get_scalar_type
from theano.tensor imp... | 36.819644 | 134 | 0.607908 |
79995a35a01574ac14f9dc5fa76788d71daaf67c | 1,320 | py | Python | data/transcoder_evaluation_gfg/python/INTEGER_POSITIVE_VALUE_POSITIVE_NEGATIVE_VALUE_ARRAY_1.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/INTEGER_POSITIVE_VALUE_POSITIVE_NEGATIVE_VALUE_ARRAY_1.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/INTEGER_POSITIVE_VALUE_POSITIVE_NEGATIVE_VALUE_ARRAY_1.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( arr , n ) :
neg = 0
pos = 0
sum = 0
for i in range ( 0 , n ) :
sum += arr [ i ]
if ... | 33.846154 | 152 | 0.453788 |
799979fcc65b56be84e97698c186b8455fa8b37c | 22,906 | py | Python | oscar/lib/python2.7/site-packages/babel/support.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/babel/support.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/babel/support.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
babel.support
~~~~~~~~~~~~~
Several classes and functions that help with integrating and using Babel
in applications.
.. note: the code in this module is not used by Babel itself
:copyright: (c) 2013 by the Babel Team.
:license: BSD, see LICENSE for ... | 37.55082 | 81 | 0.597878 |
79997df4fc9673a80b2773bc8f8323d257246262 | 552 | py | Python | run pipeline.py | webclinic017/time-series-pipeline | 5ac418b91e395a48cba397f95d25d221adfff9bd | [
"MIT"
] | 3 | 2021-08-28T10:55:12.000Z | 2021-12-01T20:42:38.000Z | run pipeline.py | webclinic017/time-series-pipeline | 5ac418b91e395a48cba397f95d25d221adfff9bd | [
"MIT"
] | null | null | null | run pipeline.py | webclinic017/time-series-pipeline | 5ac418b91e395a48cba397f95d25d221adfff9bd | [
"MIT"
] | 1 | 2021-09-26T16:07:24.000Z | 2021-09-26T16:07:24.000Z | import importlib
importlib.import_module("0_download")
# 1_data exploration
importlib.import_module("2_data validation")
importlib.import_module("3_1_preprocessingFNDMT")
importlib.import_module("3_2_preprocessingOHLCV")
importlib.import_module("4_1_merge_sources")
# importlib.import_module('4_2_cluster_stocks')
impor... | 34.5 | 49 | 0.84058 |
799987a0debe770f25c3a996ac4c4b7bc6e240d3 | 23,238 | py | Python | efficientdet/keras/train_lib.py | williamhyin/nikzak_test | 3ced5b1b391cfb54144c14a830ef896c3715889c | [
"Apache-2.0"
] | 1 | 2020-09-07T10:47:58.000Z | 2020-09-07T10:47:58.000Z | efficientdet/keras/train_lib.py | wheemyungshin/automl | 7d6b964ca4f19b5ef0e8f21e8ff2365cb21a8ecb | [
"Apache-2.0"
] | null | null | null | efficientdet/keras/train_lib.py | wheemyungshin/automl | 7d6b964ca4f19b5ef0e8f21e8ff2365cb21a8ecb | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google Research. 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... | 39.996558 | 80 | 0.671056 |
799990cdbfb5cab7fe2910ecdee5e534a2a17d3f | 992 | py | Python | limix/stats/trans.py | fpcasale/limix | a6bc2850f243fe779991bb53a24ddbebe0ab74d2 | [
"Apache-2.0"
] | null | null | null | limix/stats/trans.py | fpcasale/limix | a6bc2850f243fe779991bb53a24ddbebe0ab74d2 | [
"Apache-2.0"
] | null | null | null | limix/stats/trans.py | fpcasale/limix | a6bc2850f243fe779991bb53a24ddbebe0ab74d2 | [
"Apache-2.0"
] | null | null | null | def boxcox(X):
r"""Gaussianize X using the Box-Cox transformation.
Each phentoype is brought to a positive schale by first subtracting the
minimum value and adding 1.
Then each phenotype is transformed by the Box-Cox transformation.
Args:
X (array_like): samples by phenotypes.
Returns... | 26.810811 | 75 | 0.535282 |
7999a11446830291b7778aceb7fb2e5fdce2ef72 | 3,657 | py | Python | src/software/simulated_tests/full_system.py | jonl112/Software | 61a028a98d5c0dd5e79bf055b231633290ddbf9f | [
"MIT"
] | null | null | null | src/software/simulated_tests/full_system.py | jonl112/Software | 61a028a98d5c0dd5e79bf055b231633290ddbf9f | [
"MIT"
] | null | null | null | src/software/simulated_tests/full_system.py | jonl112/Software | 61a028a98d5c0dd5e79bf055b231633290ddbf9f | [
"MIT"
] | null | null | null | from subprocess import Popen
from proto.import_all_protos import *
from software.networking.threaded_unix_listener import ThreadedUnixListener
from software.networking.threaded_unix_sender import ThreadedUnixSender
from software.py_constants import *
class FullSystem(object):
def __init__(self, runtime_dir="/tm... | 32.078947 | 86 | 0.686628 |
7999a2307475fd085775c9e4050242e46ab7671f | 3,660 | py | Python | deep_compression/models/channel_remixer.py | YodaEmbedding/deep-compression | cc1ea691921fbe2e5cffeb30a02b777dadd08700 | [
"MIT"
] | null | null | null | deep_compression/models/channel_remixer.py | YodaEmbedding/deep-compression | cc1ea691921fbe2e5cffeb30a02b777dadd08700 | [
"MIT"
] | null | null | null | deep_compression/models/channel_remixer.py | YodaEmbedding/deep-compression | cc1ea691921fbe2e5cffeb30a02b777dadd08700 | [
"MIT"
] | null | null | null | # fmt: off
import torch.nn as nn
from compressai.layers import (
GDN,
ResidualBlock,
ResidualBlockUpsample,
ResidualBlockWithStride,
conv3x3,
subpel_conv3x3,
)
from compressai.models.utils import conv, deconv
from deep_compression.layers import SEBlock
from deep_compression.models.compressai i... | 30.5 | 69 | 0.582514 |
7999d5fb880e42735809200a3f2c1da8c0106bcb | 476 | py | Python | alipay/aop/api/response/AlipayMerchantMrchsurplmorderPointPayResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayMerchantMrchsurplmorderPointPayResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/response/AlipayMerchantMrchsurplmorderPointPayResponse.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.response.AlipayResponse import AlipayResponse
class AlipayMerchantMrchsurplmorderPointPayResponse(AlipayResponse):
def __init__(self):
super(AlipayMerchantMrchsurplmorderPointPayResponse, self).__init__()
def parse_respo... | 29.75 | 118 | 0.796218 |
7999da39988bbcb0ab415c26d8823c5786776084 | 786 | py | Python | libs/cprint.py | spidermila/mikrotik_control | 65bf4405be180cf5073cdb129aa345df4ddfac52 | [
"MIT"
] | null | null | null | libs/cprint.py | spidermila/mikrotik_control | 65bf4405be180cf5073cdb129aa345df4ddfac52 | [
"MIT"
] | null | null | null | libs/cprint.py | spidermila/mikrotik_control | 65bf4405be180cf5073cdb129aa345df4ddfac52 | [
"MIT"
] | 1 | 2022-03-20T02:57:03.000Z | 2022-03-20T02:57:03.000Z | from typing import Any
from typing import Dict
from typing import List
def cprint(rows) -> None: # type: ignore
column_widths: Dict[int, Any] = {}
for row in rows:
for number, column in enumerate(row):
current_column_width = len(str(column))
if number not in column_widths.keys... | 30.230769 | 65 | 0.600509 |
7999db2f7f2cb16abb3b3926ef3deea61c0d71d3 | 11,467 | py | Python | ml-agents/mlagents/trainers/torch/utils.py | mattinjersey/ml-agents | 7dcf947f541d661cc4a94b0e7758e1b12c6be078 | [
"Apache-2.0"
] | 1 | 2021-12-02T23:22:56.000Z | 2021-12-02T23:22:56.000Z | ml-agents/mlagents/trainers/torch/utils.py | mattinjersey/ml-agents | 7dcf947f541d661cc4a94b0e7758e1b12c6be078 | [
"Apache-2.0"
] | null | null | null | ml-agents/mlagents/trainers/torch/utils.py | mattinjersey/ml-agents | 7dcf947f541d661cc4a94b0e7758e1b12c6be078 | [
"Apache-2.0"
] | null | null | null | from typing import List, Optional, Tuple
from mlagents.torch_utils import torch, nn
import numpy as np
from mlagents.trainers.torch.encoders import (
SimpleVisualEncoder,
ResNetVisualEncoder,
NatureVisualEncoder,
SmallVisualEncoder,
VectorInput,
)
from mlagents.trainers.settings import EncoderType,... | 40.953571 | 108 | 0.624488 |
7999f2934c5f771d34515ccc925bb79ccd9cf9d2 | 3,089 | py | Python | tools/perf/measurements/smoothness.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | tools/perf/measurements/smoothness.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/perf/measurements/smoothness.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import legacy_page_test
from telemetry.timeline import chrome_trace_category_filter
from telemetry.web_perf import timeline_based_measure... | 36.77381 | 80 | 0.767562 |
7999f9b365880d4c4efaed6d57986a5f3afa4b9d | 1,868 | py | Python | scripts/mapping_features.py | 151232summerday/Tencent_Ads_Algo_2018 | dc1aa2285e196e87d100b7e6769f3c97c19e394f | [
"MIT"
] | 293 | 2018-08-17T14:29:28.000Z | 2022-02-28T12:35:48.000Z | scripts/mapping_features.py | 151232summerday/Tencent_Ads_Algo_2018 | dc1aa2285e196e87d100b7e6769f3c97c19e394f | [
"MIT"
] | 1 | 2018-08-21T14:48:38.000Z | 2018-08-21T14:48:38.000Z | scripts/mapping_features.py | 151232summerday/Tencent_Ads_Algo_2018 | dc1aa2285e196e87d100b7e6769f3c97c19e394f | [
"MIT"
] | 70 | 2018-08-21T03:39:38.000Z | 2022-03-01T07:21:08.000Z | '''
This scripts should run on raw user feature files.
'''
user_fn = "data/M_ff/userFeature.data"
new_user_fn = "data/M_ff/userFeature_mapped.data"
user_offsets_fn = "data/M_ff/userFeature_mapped_offsets.pkl"
features_mapping_fn = "data/M_ff/features_mapping.pkl"
import pickle as pkl
class Feature:
def __init__(... | 24.578947 | 81 | 0.582441 |
799a36f60b289f9338e18b06649bff88095dc18b | 7,954 | py | Python | leetcode_python/Linked_list/intersection-of-two-linked-lists.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Linked_list/intersection-of-two-linked-lists.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | leetcode_python/Linked_list/intersection-of-two-linked-lists.py | yennanliu/Python_basics | 6a597442d39468295946cefbfb11d08f61424dc3 | [
"Unlicense"
] | null | null | null | """
160. Intersection of Two Linked Lists
Easy
Given the heads of two singly linked-lists headA and headB, return the node at which the two lists intersect. If the two linked lists have no intersection at all, return null.
For example, the following two linked lists begin to intersect at node c1:
The test cases ar... | 34.4329 | 209 | 0.59819 |
799a37a2ea49d5b01a866e60b699a0871716f777 | 730 | py | Python | app-configurations/sublime/Sublime Text 3/Backup/20170807084458/HTML-CSS-JS Prettify/src/py/utils/paths.py | michaelDomingues/osx-configurations | e5648012dc5358f3712aa33495de1a05c9dc1655 | [
"MIT"
] | null | null | null | app-configurations/sublime/Sublime Text 3/Backup/20170807084458/HTML-CSS-JS Prettify/src/py/utils/paths.py | michaelDomingues/osx-configurations | e5648012dc5358f3712aa33495de1a05c9dc1655 | [
"MIT"
] | null | null | null | app-configurations/sublime/Sublime Text 3/Backup/20170807084458/HTML-CSS-JS Prettify/src/py/utils/paths.py | michaelDomingues/osx-configurations | e5648012dc5358f3712aa33495de1a05c9dc1655 | [
"MIT"
] | null | null | null | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""Various paths used by this plugin"""
from os.path import abspath, realpath, dirname, basename, join
from sublime impo... | 30.416667 | 77 | 0.726027 |
799a4c481dc23063421e5fe13fb3dd22911ddd33 | 188 | py | Python | comments/templatetags/comment_captcha_tag.py | FRA1T/django_news | f293df7197a261d8f853a68a1579dc377c0f1d15 | [
"MIT"
] | 2 | 2020-10-31T07:01:03.000Z | 2020-10-31T07:04:13.000Z | comments/templatetags/comment_captcha_tag.py | GitHuber228/django_news | 63798966214848ca9ab9370ca070d1b9c89a314b | [
"MIT"
] | null | null | null | comments/templatetags/comment_captcha_tag.py | GitHuber228/django_news | 63798966214848ca9ab9370ca070d1b9c89a314b | [
"MIT"
] | 1 | 2020-10-31T07:04:21.000Z | 2020-10-31T07:04:21.000Z | from django import template
from comments.forms import PostCommentForm
register = template.Library()
@register.simple_tag
def get_comment_captcha_form():
return PostCommentForm()
| 15.666667 | 42 | 0.803191 |
799a665b0a1852ef7487e2f645ed208f73816a1e | 388 | py | Python | sciwing/datasets/__init__.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | null | null | null | sciwing/datasets/__init__.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | null | null | null | sciwing/datasets/__init__.py | sean-dingxu/sciwing | 75eca1ea43be165eab20cf8bd81bbc19cecda74c | [
"MIT"
] | null | null | null | from sciwing.datasets.classification.text_classification_dataset import (
TextClassificationDataset,
)
from sciwing.datasets.classification.text_classification_dataset import (
TextClassificationDatasetManager,
)
from sciwing.datasets.seq_labeling.conll_dataset import CoNLLDatasetManager
from sciwing.datasets.s... | 43.111111 | 90 | 0.881443 |
799a7292610026f7cb0050da75efad898b20204a | 22,449 | py | Python | mcmc.py | dhuppenkothen/UTools | 5d910ed43e26636db15bd28fb07f58f037ecbf8d | [
"BSD-2-Clause"
] | 1 | 2015-03-30T23:31:11.000Z | 2015-03-30T23:31:11.000Z | mcmc.py | dhuppenkothen/UTools | 5d910ed43e26636db15bd28fb07f58f037ecbf8d | [
"BSD-2-Clause"
] | null | null | null | mcmc.py | dhuppenkothen/UTools | 5d910ed43e26636db15bd28fb07f58f037ecbf8d | [
"BSD-2-Clause"
] | null | null | null | ##### MARKOV CHAIN MONTE CARLO
#
# my own implementation of Metropolis-Hastings
# More an academic exercise than a really useful implementation
#
from __future__ import print_function
import matplotlib.pyplot as plt
from pylab import *
from matplotlib.ticker import MaxNLocator
import cPickle as pickle
import copy
fr... | 33.159527 | 156 | 0.533298 |
799a8382b38a5b4dbdf6e3031afbb1bb3476877b | 11,061 | py | Python | datalad/dochelpers.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | null | null | null | datalad/dochelpers.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | 21 | 2015-03-12T11:48:18.000Z | 2020-08-31T09:28:05.000Z | datalad/dochelpers.py | christinerogers/datalad | 8b91f3767b45371e213aa7ade146a290a13c00f2 | [
"MIT"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ##... | 30.221311 | 87 | 0.603562 |
799ab302d2aaa6fa3432f7031ffadc23c142c870 | 727 | py | Python | src/dcos_e2e_cli/dcos_aws/__init__.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | src/dcos_e2e_cli/dcos_aws/__init__.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | src/dcos_e2e_cli/dcos_aws/__init__.py | cprovencher/dcos-e2e | c54b3d41f246efe3f90dcf225b0bffdc1f615daa | [
"Apache-2.0"
] | null | null | null | """
A CLI for controlling DC/OS clusters on AWS.
"""
import click
from .commands.create import create
from .commands.doctor import doctor
from .commands.inspect_cluster import inspect_cluster
from .commands.list_clusters import list_clusters
from .commands.run_command import run
from .commands.sync import sync_code
f... | 22.71875 | 53 | 0.793673 |
799ac6fe7e2cf01c9b2160d6663475e7db2cad04 | 181 | py | Python | taskcontrol/__init__.py | taskcontrols/py-taskcontrols | 0f3f8d64cafc77dfbf23e70b0c86a91fea858ce4 | [
"MIT"
] | 1 | 2020-04-17T07:15:14.000Z | 2020-04-17T07:15:14.000Z | taskcontrol/__init__.py | taskcontrols/py-taskcontrols | 0f3f8d64cafc77dfbf23e70b0c86a91fea858ce4 | [
"MIT"
] | 14 | 2021-11-26T15:18:05.000Z | 2021-12-12T03:05:31.000Z | taskcontrol/__init__.py | taskcontrols/py-taskcontrols | 0f3f8d64cafc77dfbf23e70b0c86a91fea858ce4 | [
"MIT"
] | 1 | 2021-11-26T15:05:52.000Z | 2021-11-26T15:05:52.000Z |
from taskcontrol import lib
from taskcontrol import setup
from taskcontrol import admin
from taskcontrol.lib import Workflow, task, PluginBase
__version__ = "1.3.0-beta-1"
| 22.625 | 55 | 0.779006 |
799adcd39d639b407c3a160eb88714c588e16b8f | 810 | py | Python | examples/zeromq_test.py | msabramo/diesel | a1ed7ed0358d0fec8592e23aafc3b7ec167ab649 | [
"BSD-3-Clause"
] | 224 | 2015-01-03T06:33:05.000Z | 2021-11-22T03:19:02.000Z | examples/zeromq_test.py | dowski/diesel | d9824e467805caf40e0ba21b88a27db38e64c352 | [
"BSD-3-Clause"
] | 12 | 2015-01-01T03:35:15.000Z | 2021-05-22T23:37:28.000Z | examples/zeromq_test.py | dowski/diesel | d9824e467805caf40e0ba21b88a27db38e64c352 | [
"BSD-3-Clause"
] | 37 | 2015-01-04T01:47:55.000Z | 2022-03-03T02:04:15.000Z | from diesel import quickstart, quickstop, sleep
from diesel.protocols.zeromq import DieselZMQSocket, zctx, zmq
import time
def handle_messages():
insock = DieselZMQSocket(zctx.socket(zmq.DEALER), bind="inproc://foo")
for x in xrange(500000):
msg = insock.recv()
assert msg == "yo dawg %s" % x
... | 26.129032 | 78 | 0.625926 |
799af6299191fb51bfedd2e5d52f4dea27760996 | 347 | py | Python | 0x08-python-more_classes/3-main.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | 0x08-python-more_classes/3-main.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | 0x08-python-more_classes/3-main.py | gogomillan/holbertonschool-higher_level_programming | 1549ffc4fdc284271684321ff6edd882a314193a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
Rectangle = __import__('3-rectangle').Rectangle
my_rectangle = Rectangle(2, 4)
print("Area: {} - Perimeter: {}".format(my_rectangle.area(),
my_rectangle.perimeter()))
print(str(my_rectangle))
print(repr(my_rectangle))
print("--")
my_rectangle.width = 10
my_rectangle.height = 3
print(my_rectangle)... | 20.411765 | 60 | 0.740634 |
799b1ca91ca4102181fbe45697ba3d32740bfd69 | 5,114 | py | Python | neptunecontrib/sync/with_json.py | elbaro/neptune-contrib | 568454cd8171da0b04fe609bc8ca446a77979e5e | [
"MIT"
] | null | null | null | neptunecontrib/sync/with_json.py | elbaro/neptune-contrib | 568454cd8171da0b04fe609bc8ca446a77979e5e | [
"MIT"
] | null | null | null | neptunecontrib/sync/with_json.py | elbaro/neptune-contrib | 568454cd8171da0b04fe609bc8ca446a77979e5e | [
"MIT"
] | null | null | null | #
# Copyright (c) 2019, Neptune Labs Sp. z o.o.
#
# 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 agr... | 35.268966 | 117 | 0.582323 |
799b2ed5ec56858f6ce351d0441ede448cb276d8 | 1,216 | py | Python | sunpy/map/sources/tests/test_eit_source.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | sunpy/map/sources/tests/test_eit_source.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | sunpy/map/sources/tests/test_eit_source.py | Naman9639/sunpy | 24c0cfbd9b03d7f9554bc86036fac2b78a5fcc56 | [
"BSD-2-Clause"
] | null | null | null | """Test cases for SOHO Map subclasses.
This particular test file pertains to EITMap.
@Author: Pritish C. (VaticanCameos)
"""
import os
import glob
import numpy as np
from matplotlib import colors
import pytest
from sunpy.map.sources.soho import EITMap
from sunpy.map import Map
import sunpy.data.test
path = sunpy.da... | 28.952381 | 70 | 0.745066 |
799b44e7f00a1af3d569a61d28a3926ff198af6d | 1,853 | py | Python | e3sm_to_cmip/cmor_handlers/cesm2_wetbc.py | JGCRI/e3sm_to_cmip | 3d3bc7dd7e3a46a97dba4f13a888758e01ef4797 | [
"MIT"
] | null | null | null | e3sm_to_cmip/cmor_handlers/cesm2_wetbc.py | JGCRI/e3sm_to_cmip | 3d3bc7dd7e3a46a97dba4f13a888758e01ef4797 | [
"MIT"
] | null | null | null | e3sm_to_cmip/cmor_handlers/cesm2_wetbc.py | JGCRI/e3sm_to_cmip | 3d3bc7dd7e3a46a97dba4f13a888758e01ef4797 | [
"MIT"
] | null | null | null | """
bc_a1SFWET, bc_a4SFWET, bc_c1SFWET, bc_c4SFWET to wetbc converter
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import cmor
from e3sm_to_cmip.lib import handle_variables
# list of raw variable names needed
RAW_VARIABLES = [str('bc_a1SFWET'), str('bc_a4SFWET'), str('bc_c1SF... | 31.948276 | 92 | 0.59741 |
799b73acee5061ad5ba2b500b419e23e8042070f | 175 | py | Python | office365/sharepoint/changes/change_alert.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 544 | 2016-08-04T17:10:16.000Z | 2022-03-31T07:17:20.000Z | office365/sharepoint/changes/change_alert.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 438 | 2016-10-11T12:24:22.000Z | 2022-03-31T19:30:35.000Z | office365/sharepoint/changes/change_alert.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | 202 | 2016-08-22T19:29:40.000Z | 2022-03-30T20:26:15.000Z | from office365.sharepoint.changes.change import Change
class ChangeAlert(Change):
@property
def alert_id(self):
return self.properties.get("AlertId", None)
| 19.444444 | 54 | 0.725714 |
799b864e83a22efd2b79b0d7fd0da08b6a0c6ee3 | 50,279 | py | Python | lingvo/core/base_model.py | eric-haibin-lin/lingvo | d66710d9b28f349047d53f3fba0b87694b978350 | [
"Apache-2.0"
] | null | null | null | lingvo/core/base_model.py | eric-haibin-lin/lingvo | d66710d9b28f349047d53f3fba0b87694b978350 | [
"Apache-2.0"
] | null | null | null | lingvo/core/base_model.py | eric-haibin-lin/lingvo | d66710d9b28f349047d53f3fba0b87694b978350 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | 39.1581 | 94 | 0.686489 |
799b8779921a0c1ab04cce366082fcfe0ed6f9c0 | 3,250 | py | Python | experiments/ashvin/icml2020/bcq/bc_hand1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/bcq/bc_hand1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/bcq/bc_hand1.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | """
AWR + SAC from demo experiment
"""
from rlkit.demos.source.dict_to_mdp_path_loader import DictToMDPPathLoader
from rlkit.launchers.experiments.awac.awac_rl import experiment, process_args
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.arglauncher import run_variants
from rlkit.torch.sac.policies im... | 29.017857 | 78 | 0.583692 |
799b9f43022008e2e03ab6f0fb315d88d195a221 | 348 | py | Python | by-session/class-921/week2/poly.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | 2 | 2015-04-29T20:59:35.000Z | 2018-09-26T13:33:43.000Z | by-session/class-921/week2/poly.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | null | null | null | by-session/class-921/week2/poly.py | amiraliakbari/sharif-mabani-python | 5d14a08d165267fe71c28389ddbafe29af7078c5 | [
"MIT"
] | null | null | null | import turtle
def circle():
while turtle.heading() < 359:
turtle.forward(1)
turtle.left(1)
turtle.left(1)
def poly(r, teta):
n = 360 / teta
while n > 0:
n = n - 1
turtle.forward(r)
turtle.left(teta)
n = 10
while n > 0:
n = n - 1
poly(10, 30)
turtle.... | 14.5 | 33 | 0.522989 |
799bb131fe71bab6004cdf55d77f6c4463b92446 | 1,315 | py | Python | rally/cli/main.py | LorenzoBianconi/rally | 2bbd7ee590cca048fb4ad6a8eefc484989979ff8 | [
"Apache-2.0"
] | 1 | 2021-09-29T02:16:09.000Z | 2021-09-29T02:16:09.000Z | rally/cli/main.py | noah8713/rally-ovs | 2434787c2cf4ca267108966c4ddc55ded3c333d9 | [
"Apache-2.0"
] | 1 | 2020-07-14T11:29:31.000Z | 2020-07-14T11:29:31.000Z | rally/cli/main.py | noah8713/rally-ovs | 2434787c2cf4ca267108966c4ddc55ded3c333d9 | [
"Apache-2.0"
] | 1 | 2020-07-02T01:33:48.000Z | 2020-07-02T01:33:48.000Z | # 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... | 28.586957 | 78 | 0.734601 |
799bbcdb402f88fa13af725bb5f1afca7a5d298b | 8,427 | py | Python | common/config_parser/section/base_section.py | albalabkin/PyCats | b3fa09e116f38cebbb66faef16785e2795d80aa9 | [
"Apache-2.0"
] | null | null | null | common/config_parser/section/base_section.py | albalabkin/PyCats | b3fa09e116f38cebbb66faef16785e2795d80aa9 | [
"Apache-2.0"
] | null | null | null | common/config_parser/section/base_section.py | albalabkin/PyCats | b3fa09e116f38cebbb66faef16785e2795d80aa9 | [
"Apache-2.0"
] | null | null | null | from abc import ABCMeta, abstractmethod
from common.config_parser.config_error import ConfigError
class ConfigSection(metaclass=ABCMeta):
"""An abstract base class representing a base section of the
configuration file. Any specific section class must derive from it.
"""
def __init__(self, config, se... | 41.925373 | 109 | 0.601875 |
799c1b3116506078dab69847553b80bc143fa262 | 38,299 | py | Python | simulations_folder/simulation_analysis_scripts/checkpickle.py | SIGKDD2021ANON/PaperCodeBandits | bf1c3a6cf2de2dc81228bedb97c5aa3657cebebd | [
"Apache-2.0"
] | null | null | null | simulations_folder/simulation_analysis_scripts/checkpickle.py | SIGKDD2021ANON/PaperCodeBandits | bf1c3a6cf2de2dc81228bedb97c5aa3657cebebd | [
"Apache-2.0"
] | null | null | null | simulations_folder/simulation_analysis_scripts/checkpickle.py | SIGKDD2021ANON/PaperCodeBandits | bf1c3a6cf2de2dc81228bedb97c5aa3657cebebd | [
"Apache-2.0"
] | null | null | null | import matplotlib
matplotlib.use('Agg')
#matplotlib.use("gtk")
import matplotlib as mpl
#matplotlib.use('Qt5Agg')
from table_functions import *
import pickle
import os
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import sys
#sys.path.insert()
# print(data)
import numpy as np
import os
from ... | 50.727152 | 307 | 0.620251 |
799c2aa7f7c3d70c22a82bfe70bea94d67a2dea9 | 4,569 | py | Python | TrainHumanGoalie1LastShooterSwitch.py | krm58/PenaltyShot_Behavior | 2a52ff13af0d0661e5700cc36cd32c25809656bd | [
"MIT"
] | 3 | 2019-02-25T02:27:27.000Z | 2019-11-19T17:59:19.000Z | TrainHumanGoalie1LastShooterSwitch.py | krm58/PenaltyShot_Behavior | 2a52ff13af0d0661e5700cc36cd32c25809656bd | [
"MIT"
] | null | null | null | TrainHumanGoalie1LastShooterSwitch.py | krm58/PenaltyShot_Behavior | 2a52ff13af0d0661e5700cc36cd32c25809656bd | [
"MIT"
] | 1 | 2021-12-12T16:28:40.000Z | 2021-12-12T16:28:40.000Z | import sys
import csv
import numpy as np
import gpflow
import os
import pandas as pd
import h5py
from sklearn.model_selection import train_test_split
import tensorflow as tf
from scipy.cluster.vq import kmeans
tf.set_random_seed(1234)
import pickle
import argparse
import PKutils
def train_model(**kwargs):
npseed = kw... | 43.103774 | 152 | 0.762311 |
799c4f4684efa22d2d4066f9a09b2bc56b7e7bd0 | 4,203 | py | Python | pygerduty/common.py | g-k/pygerduty | e5c5fb446c6149ff61b07aea8bd72b3f6396a4da | [
"MIT"
] | 1 | 2020-08-04T11:42:53.000Z | 2020-08-04T11:42:53.000Z | pygerduty/common.py | cugini-dbx/pygerduty | 1982aa4ccb33eb10b98b695056517f7bc5f4dff6 | [
"MIT"
] | null | null | null | pygerduty/common.py | cugini-dbx/pygerduty | 1982aa4ccb33eb10b98b695056517f7bc5f4dff6 | [
"MIT"
] | null | null | null | # Requester Module used by REST API module as well as EVENTS API module.
import datetime
import functools
import json
from six import string_types
from six.moves import urllib
ISO8601_FORMAT = "%Y-%m-%dT%H:%M:%SZ"
class Error(Exception):
pass
class BadRequest(Error):
def __init__(self, payload, *args, **kw... | 26.601266 | 78 | 0.584582 |
799cb8e974daa05ed69b7916bea06ab5b23bdead | 2,427 | py | Python | crane_plus_joint_state_publisher/src/crane_plus_joint_state_publisher.py | leo-miura-robot/crane_plus_arm | 7df68aba23efc02e220410f2c8a6ccece335e1e6 | [
"Apache-2.0"
] | 11 | 2017-05-17T11:39:12.000Z | 2021-12-10T01:02:47.000Z | crane_plus_joint_state_publisher/src/crane_plus_joint_state_publisher.py | shu-rt/crane_plus_arm | e9457afa2e0447f0379622597fe920780a283e19 | [
"Apache-2.0"
] | 1 | 2021-09-22T23:01:44.000Z | 2021-09-22T23:01:44.000Z | crane_plus_joint_state_publisher/src/crane_plus_joint_state_publisher.py | shu-rt/crane_plus_arm | e9457afa2e0447f0379622597fe920780a283e19 | [
"Apache-2.0"
] | 7 | 2017-08-20T06:28:03.000Z | 2021-12-10T01:02:32.000Z | #!/usr/bin/env python
"""Joint state publishing node for the CRANE+ manipulator."""
import sys
import rospy
from sensor_msgs.msg import JointState
from dynamixel_msgs.msg import JointState as DynamixelJointState
def joint_state_cb(msg, js_publisher):
"""Callback that converts a Dynamixel JointState to a stand... | 29.962963 | 81 | 0.662958 |
799cd81c2e03913706041122535a52852a0dec26 | 51,270 | py | Python | kite/venv/lib/python3.7/site-packages/soupsieve/css_match.py | pxuanqui/Edge-Assisted-Cart | 2edd1f7023ab0b02f5733e2e9204bac4623eeeac | [
"BSD-3-Clause"
] | 191 | 2018-12-08T14:15:33.000Z | 2022-03-30T02:21:49.000Z | kite/venv/lib/python3.7/site-packages/soupsieve/css_match.py | pxuanqui/Edge-Assisted-Cart | 2edd1f7023ab0b02f5733e2e9204bac4623eeeac | [
"BSD-3-Clause"
] | 57 | 2019-02-24T06:21:24.000Z | 2022-03-25T01:29:36.000Z | kite/venv/lib/python3.7/site-packages/soupsieve/css_match.py | pxuanqui/Edge-Assisted-Cart | 2edd1f7023ab0b02f5733e2e9204bac4623eeeac | [
"BSD-3-Clause"
] | 44 | 2019-01-12T13:46:51.000Z | 2022-03-24T14:21:42.000Z | """CSS matcher."""
from __future__ import unicode_literals
from datetime import datetime
from . import util
import re
from .import css_types as ct
import unicodedata
# Empty tag pattern (whitespace okay)
RE_NOT_EMPTY = re.compile('[^ \t\r\n\f]')
RE_NOT_WS = re.compile('[^ \t\r\n\f]+')
# Relationships
REL_PARENT = ' ... | 35.044429 | 120 | 0.533684 |
799ced2033c8f0b2e2221ec205080597bc0b335a | 552 | py | Python | src/streamclient.py | HuiiBuh/checkers-master | 112eb1df1d8b0d691edd82978945ea5527b75fab | [
"MIT"
] | 1 | 2021-09-04T05:34:51.000Z | 2021-09-04T05:34:51.000Z | src/streamclient.py | HuiiBuh/checkers-master | 112eb1df1d8b0d691edd82978945ea5527b75fab | [
"MIT"
] | null | null | null | src/streamclient.py | HuiiBuh/checkers-master | 112eb1df1d8b0d691edd82978945ea5527b75fab | [
"MIT"
] | null | null | null | from .client import Client
import cv2
import imutils
class StreamClient(Client):
stream_url: str = None
def __init__(self, url=None, token=None, stream_url=None):
super().__init__(url=url, token=token)
self.set_stream_url(stream_url)
def set_stream_url(self, stream_url):
self.st... | 24 | 62 | 0.641304 |
799cf441685304ee2d59fe767870b9289ffb03c1 | 1,182 | py | Python | utils/passlib_pbkdf2_sha512_wrapper.py | bowlofstew/bii-server | 9abc558b1ba9722088e22a4937a224cfcc3c5f22 | [
"MIT"
] | 27 | 2015-04-15T09:40:26.000Z | 2020-04-29T06:24:06.000Z | utils/passlib_pbkdf2_sha512_wrapper.py | bowlofstew/bii-server | 9abc558b1ba9722088e22a4937a224cfcc3c5f22 | [
"MIT"
] | 2 | 2015-06-03T20:19:51.000Z | 2015-06-30T20:40:14.000Z | utils/passlib_pbkdf2_sha512_wrapper.py | bowlofstew/bii-server | 9abc558b1ba9722088e22a4937a224cfcc3c5f22 | [
"MIT"
] | 10 | 2015-08-06T08:17:28.000Z | 2020-09-29T17:02:57.000Z | # HISTORICAL USE FOR:
# Django stores the password in DB with 128 characters. This is a "standard" for Django,
# because the password attribute of User class is defined in AbstractBaseUser class and
# this can't be override.
# We use 'biicode' as algorithm for Django. Django determines the hasher with the first
# para... | 36.9375 | 91 | 0.739425 |
799cfd388bdde6d1e04238d8f76c914507d02d9f | 1,788 | py | Python | python/src/test/protobuf/run_tests.py | nowelium/protobuf-socket-rpc | 2546a261dccbc19f90fa3f1ea325c4032e610d49 | [
"MIT"
] | 3 | 2015-09-05T06:29:55.000Z | 2017-02-15T13:59:39.000Z | python/src/test/protobuf/run_tests.py | nowelium/protobuf-socket-rpc | 2546a261dccbc19f90fa3f1ea325c4032e610d49 | [
"MIT"
] | null | null | null | python/src/test/protobuf/run_tests.py | nowelium/protobuf-socket-rpc | 2546a261dccbc19f90fa3f1ea325c4032e610d49 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2009 Las Cumbres Observatory (www.lcogt.net)
#
# 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
... | 36.489796 | 79 | 0.764541 |
799d019dde27781b2f1c04718c753d130848fc4c | 809 | py | Python | software/authbox/compat.py | brianredbeard/makerspace-auth | 79fab40be5455e29f5d596a44d0c4978f9112109 | [
"Apache-2.0"
] | 1 | 2019-05-29T17:02:09.000Z | 2019-05-29T17:02:09.000Z | software/authbox/compat.py | brianredbeard/makerspace-auth | 79fab40be5455e29f5d596a44d0c4978f9112109 | [
"Apache-2.0"
] | null | null | null | software/authbox/compat.py | brianredbeard/makerspace-auth | 79fab40be5455e29f5d596a44d0c4978f9112109 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Tim Hatch 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 agr... | 28.892857 | 78 | 0.761434 |
799d1f3a5468d8aecd2a0e334e06459f48415d34 | 132 | py | Python | vilya/issues/__init__.py | xtao/vilya | 39afda324bcfe9eefe7d813381d5b1627ba00ae5 | [
"BSD-3-Clause"
] | 2 | 2015-01-15T09:10:57.000Z | 2015-01-15T09:55:10.000Z | vilya/issues/__init__.py | xtao/vilya | 39afda324bcfe9eefe7d813381d5b1627ba00ae5 | [
"BSD-3-Clause"
] | null | null | null | vilya/issues/__init__.py | xtao/vilya | 39afda324bcfe9eefe7d813381d5b1627ba00ae5 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from ..core import Service
from .models import Issue
class IssuesService(Service):
__model__ = Issue
| 14.666667 | 29 | 0.689394 |
799d2e94c46e01b37ef5e98be933e7ff043b2cfa | 3,826 | py | Python | mlrun/platforms/other.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | null | null | null | mlrun/platforms/other.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | null | null | null | mlrun/platforms/other.py | EdmondIguazio/mlrun | e63b34a610788ebe522ce7a46642e26927e39882 | [
"Apache-2.0"
] | 1 | 2021-05-05T14:19:46.000Z | 2021-05-05T14:19:46.000Z | # Copyright 2018 Iguazio
#
# 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... | 39.040816 | 94 | 0.676947 |
799db24cd4037909a04b5f76765f29a8be498829 | 3,068 | py | Python | prod/jobs/refill_binance_future_bars.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | null | null | null | prod/jobs/refill_binance_future_bars.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | null | null | null | prod/jobs/refill_binance_future_bars.py | howyu88/vnpy2 | c8ae445823dc1f71abda1a79fae7d4be3dd92dd4 | [
"MIT"
] | null | null | null | # flake8: noqa
import os
import sys
import csv
import pandas as pd
# 将repostory的目录i,作为根目录,添加到系统环境中。
ROOT_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..'))
if ROOT_PATH not in sys.path:
sys.path.append(ROOT_PATH)
print(f'append {ROOT_PATH} into sys.path')
from datetime import dateti... | 28.943396 | 103 | 0.660691 |
799de5d175896a25bdec338a7c94a148f5ef2bd9 | 12,713 | py | Python | research/object_detection/trainer.py | davidcui79/price_models | 5307eebeca3d09b8d78b63586947b31ff835f5f3 | [
"Apache-2.0"
] | null | null | null | research/object_detection/trainer.py | davidcui79/price_models | 5307eebeca3d09b8d78b63586947b31ff835f5f3 | [
"Apache-2.0"
] | null | null | null | research/object_detection/trainer.py | davidcui79/price_models | 5307eebeca3d09b8d78b63586947b31ff835f5f3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 42.518395 | 80 | 0.715567 |
799dfb11a4f440298877bbb70c81c4398d11c04a | 658 | py | Python | python/view_angle.py | victorpoughon/master-thesis | 61565db7dd2ce0909dacfb2a33f10c66bfb11a34 | [
"MIT"
] | null | null | null | python/view_angle.py | victorpoughon/master-thesis | 61565db7dd2ce0909dacfb2a33f10c66bfb11a34 | [
"MIT"
] | null | null | null | python/view_angle.py | victorpoughon/master-thesis | 61565db7dd2ce0909dacfb2a33f10c66bfb11a34 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import os
import os.path
import numpy as np
import matplotlib.pyplot as plt
from features_common import match_angle, base_plot
if __name__ == "__main__":
if len(sys.argv) >= 2:
path = sys.argv[1]
else:
path = "."
shape = np.loadtxt(os.path.join(path, "sh... | 22.689655 | 73 | 0.644377 |
799e1239f610eb5844f7d4517b9586969efc4808 | 6,311 | py | Python | homeassistant/components/zha/entity.py | mengwangk/home-assistant | 8f7e2ac41ffc969a825329e866c1e27d0e823bb0 | [
"Apache-2.0"
] | 1 | 2020-03-29T00:56:35.000Z | 2020-03-29T00:56:35.000Z | homeassistant/components/zha/entity.py | mengwangk/home-assistant | 8f7e2ac41ffc969a825329e866c1e27d0e823bb0 | [
"Apache-2.0"
] | 1 | 2022-03-12T01:06:11.000Z | 2022-03-12T01:06:11.000Z | homeassistant/components/zha/entity.py | mengwangk/home-assistant | 8f7e2ac41ffc969a825329e866c1e27d0e823bb0 | [
"Apache-2.0"
] | 1 | 2020-03-07T10:43:50.000Z | 2020-03-07T10:43:50.000Z | """Entity for Zigbee Home Automation."""
import asyncio
import logging
import time
from homeassistant.core import callback
from homeassistant.helpers import entity
from homeassistant.helpers.device_registry import CONNECTION_ZIGBEE
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassista... | 32.699482 | 88 | 0.632388 |
799e16c5254b507857c207321a51cad3e59fcbb7 | 1,832 | py | Python | src/rubrix/sdk/models/copy_dataset_request_tags.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/models/copy_dataset_request_tags.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/models/copy_dataset_request_tags.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2021-present, the Recognai S.L. team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | 30.533333 | 77 | 0.69214 |
799e1d715b27c607dbf70c58d290a998b867c3cb | 368 | py | Python | chapter6/flask/flasktest.py | cs50sacramento/source-code-16-17 | 8e8276de39ba3106b67549108f6ee4cf71836025 | [
"MIT"
] | null | null | null | chapter6/flask/flasktest.py | cs50sacramento/source-code-16-17 | 8e8276de39ba3106b67549108f6ee4cf71836025 | [
"MIT"
] | null | null | null | chapter6/flask/flasktest.py | cs50sacramento/source-code-16-17 | 8e8276de39ba3106b67549108f6ee4cf71836025 | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello():
return "<html><head><title>Hello Flask</title> \
<body><b>hello</b></body></html>"
@app.route("/cs50ap")
def cs50():
return "This is CS50 AP."
@app.route("/name/<name>")
def greet(name):
return "Hello, " + name
if... | 20.444444 | 52 | 0.597826 |
799e55c2f46bdce352dc7d8cb9993b66b9e36221 | 10,224 | py | Python | vortex_panel_steady.py | kslam07/RWA3-UA | b786659783901196554bd1b93f2c790f4b9a574b | [
"MIT"
] | null | null | null | vortex_panel_steady.py | kslam07/RWA3-UA | b786659783901196554bd1b93f2c790f4b9a574b | [
"MIT"
] | null | null | null | vortex_panel_steady.py | kslam07/RWA3-UA | b786659783901196554bd1b93f2c790f4b9a574b | [
"MIT"
] | null | null | null |
## VORTEX PANEL METHOD
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.cm import ScalarMappable
# ---------------------------------- #
# Flags
# ---------------------------------- #
enable_flap = True
plot_backmesh = False
plot_camber = False
plot_cl_curve = False
plo... | 32.35443 | 110 | 0.549687 |
799e97dd281c80cf64437c14ef4f9360606ff775 | 2,140 | py | Python | GeneticAlgorithms/test/IndividualSuite.py | jlln/GeneticKnapsack | fed7578d25ae2c9d80d17e0dfaef5ee9b8bcb0ba | [
"MIT"
] | null | null | null | GeneticAlgorithms/test/IndividualSuite.py | jlln/GeneticKnapsack | fed7578d25ae2c9d80d17e0dfaef5ee9b8bcb0ba | [
"MIT"
] | null | null | null | GeneticAlgorithms/test/IndividualSuite.py | jlln/GeneticKnapsack | fed7578d25ae2c9d80d17e0dfaef5ee9b8bcb0ba | [
"MIT"
] | null | null | null | import unittest
import numpy as np
from src.KnapsackIndividual import KnapsackIndividual,KnapsackItem
from src.FunctionOptimizerIndividual import FunctionMinimizer2DIndividual
class TestKnapsackIndividualMethods(unittest.TestCase):
def setUp(self):
self.items = list(set([(np.random.randint(1,30)... | 36.271186 | 144 | 0.643458 |
799eb4e8d1d8bf3ca05e88d0cf6da6ecbf4d816c | 4,741 | py | Python | alipay/aop/api/domain/AlipayGongyiUserInfoTest.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/domain/AlipayGongyiUserInfoTest.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/domain/AlipayGongyiUserInfoTest.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.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayGongyiAddressTest import AlipayGongyiAddressTest
from alipay.aop.api.domain.AlipayGongyiAddressTest import AlipayGongyiAddressTest
class AlipayGongyiUserInfoTest(object):
... | 30.587097 | 89 | 0.548197 |
799ed149a562df63d4d6bc6744a069b4f4fa00e1 | 2,029 | py | Python | venv/Lib/site-packages/pyrogram/raw/types/input_privacy_value_disallow_all.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 2 | 2021-12-13T07:09:55.000Z | 2022-01-12T12:15:20.000Z | venv/Lib/site-packages/pyrogram/raw/types/input_privacy_value_disallow_all.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | venv/Lib/site-packages/pyrogram/raw/types/input_privacy_value_disallow_all.py | hoangkiet1906/Botcie_ver1 | c133b915edde06dac690a7dc6ca160f6792fc4c8 | [
"MIT"
] | null | null | null | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2021 Dan <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free... | 31.703125 | 103 | 0.639724 |
799ee745c97f900a4725f6f09feb2f20f5e12b40 | 15,949 | py | Python | sdk/python/pulumi_consul/acl_role.py | pulumi/pulumi-consul | 5b66c5b97fda6b5433bfb4d4173c999e468c82e8 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2019-11-12T12:21:18.000Z | 2021-07-31T08:17:22.000Z | sdk/python/pulumi_consul/acl_role.py | pulumi/pulumi-consul | 5b66c5b97fda6b5433bfb4d4173c999e468c82e8 | [
"ECL-2.0",
"Apache-2.0"
] | 38 | 2019-11-21T15:19:33.000Z | 2022-03-31T15:24:11.000Z | sdk/python/pulumi_consul/acl_role.py | pulumi/pulumi-consul | 5b66c5b97fda6b5433bfb4d4173c999e468c82e8 | [
"ECL-2.0",
"Apache-2.0"
] | 2 | 2020-11-24T12:23:13.000Z | 2021-12-06T17:33:31.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from . import ... | 40.377215 | 162 | 0.633707 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.