hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a0bb049244e583c008dcf23ea943a3167788ea1 | 931 | py | Python | ckanext/ottawa/listing.py | CityofOttawa/Ottawa-ckan | 0405b27ab18a66b4052eb11f27527d7fc8fa2f37 | [
"MIT"
] | null | null | null | ckanext/ottawa/listing.py | CityofOttawa/Ottawa-ckan | 0405b27ab18a66b4052eb11f27527d7fc8fa2f37 | [
"MIT"
] | 12 | 2015-06-05T15:52:40.000Z | 2017-04-25T15:17:47.000Z | ckanext/ottawa/listing.py | CityofOttawa/Ottawa-ckan | 0405b27ab18a66b4052eb11f27527d7fc8fa2f37 | [
"MIT"
] | null | null | null | import os
import logging
from ckan.plugins.interfaces import IPackageController
from ckan.plugins import implements, SingletonPlugin
from genshi import Stream
class OttawaPackageListing(SingletonPlugin):
implements(IPackageController, inherit=True)
def after_search(self, search_results, search_params):
... | 40.478261 | 90 | 0.584318 |
4a0bb08047aaad084d0aba8d923e786a366b18bb | 760 | py | Python | AzureCli/azext_bot/azext_bot/_client_factory.py | mgbennet/botbuilder-tools | c16b6350e3575b642c0447781dc163f8251bde43 | [
"MIT"
] | null | null | null | AzureCli/azext_bot/azext_bot/_client_factory.py | mgbennet/botbuilder-tools | c16b6350e3575b642c0447781dc163f8251bde43 | [
"MIT"
] | null | null | null | AzureCli/azext_bot/azext_bot/_client_factory.py | mgbennet/botbuilder-tools | c16b6350e3575b642c0447781dc163f8251bde43 | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
def get_botservice_management_client(cli_ctx, *_):
from azure.cli.core.commands.client_factory import get_mgmt_service_client
from azext_bot.botservice import AzureBotService
return get_mgmt_service_client(cli_ct... | 36.190476 | 78 | 0.822368 |
4a0bb0ca8f8cda4337ac98ed95bb43e8ce909c40 | 2,859 | py | Python | tolua.py | lzubiaur/debugconsole | b049e23a4a806332e59970825c6c1e9adce52403 | [
"MIT"
] | 2 | 2015-08-31T06:28:55.000Z | 2015-11-06T06:12:27.000Z | tolua.py | lzubiaur/debugconsole | b049e23a4a806332e59970825c6c1e9adce52403 | [
"MIT"
] | null | null | null | tolua.py | lzubiaur/debugconsole | b049e23a4a806332e59970825c6c1e9adce52403 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
" Copyright (c) 2013 Laurent Zubiaur
"
" http://www.pix2d.com/
"
" 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 th... | 35.7375 | 122 | 0.671913 |
4a0bb0dbbb635d05574b9a709b7444f4b08066e8 | 57,125 | py | Python | qiita_db/test/test_util.py | unique-identifier/qiita | 6f7a2471b96d65ab05fce55d1e5fdf35b4cae374 | [
"BSD-3-Clause"
] | null | null | null | qiita_db/test/test_util.py | unique-identifier/qiita | 6f7a2471b96d65ab05fce55d1e5fdf35b4cae374 | [
"BSD-3-Clause"
] | null | null | null | qiita_db/test/test_util.py | unique-identifier/qiita | 6f7a2471b96d65ab05fce55d1e5fdf35b4cae374 | [
"BSD-3-Clause"
] | null | null | null | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 43.342185 | 79 | 0.594433 |
4a0bb1163e03f7f0af9a868079320000f6c2c5e8 | 5,905 | py | Python | nn_optimizers.py | Sentimentron/Dracula | 878f81c1c56a8ac12cf02d8f15bd93c544e29611 | [
"BSD-3-Clause"
] | 100 | 2016-04-25T17:48:50.000Z | 2021-02-11T04:11:54.000Z | nn_optimizers.py | Sentimentron/Dracula | 878f81c1c56a8ac12cf02d8f15bd93c544e29611 | [
"BSD-3-Clause"
] | 1 | 2017-02-25T21:26:40.000Z | 2017-02-27T18:04:51.000Z | nn_optimizers.py | Sentimentron/Dracula | 878f81c1c56a8ac12cf02d8f15bd93c544e29611 | [
"BSD-3-Clause"
] | 25 | 2016-07-27T23:11:44.000Z | 2020-01-21T01:55:36.000Z | """
This file contains implementations of the various methods
used to train stuff.
"""
import theano
from theano import tensor
from util import numpy_floatX
def sgd(lr, tparams, grads, x_c, x_w, mask, wmask, y, cost):
""" Stochastic Gradient Descent
:note: A more complicated version of sgd then ne... | 35.787879 | 90 | 0.552752 |
4a0bb159bfef66ad0815de7a7501169455fd5041 | 53 | py | Python | software/python/simple_pendulum/controllers/energy_shaping/__init__.py | alopezrivera/torque_limited_simple_pendulum | 2164a41d65c16743ba260a79a04a04cdd72c3903 | [
"BSD-3-Clause"
] | 15 | 2021-10-16T04:50:34.000Z | 2022-03-26T23:54:19.000Z | software/python/simple_pendulum/controllers/energy_shaping/__init__.py | alopezrivera/torque_limited_simple_pendulum | 2164a41d65c16743ba260a79a04a04cdd72c3903 | [
"BSD-3-Clause"
] | 17 | 2021-11-30T22:17:28.000Z | 2022-03-21T12:28:45.000Z | software/python/simple_pendulum/controllers/energy_shaping/__init__.py | alopezrivera/torque_limited_simple_pendulum | 2164a41d65c16743ba260a79a04a04cdd72c3903 | [
"BSD-3-Clause"
] | 13 | 2021-10-18T07:45:29.000Z | 2022-03-22T12:56:33.000Z | """
Energy Shaping Control
======================
""" | 13.25 | 22 | 0.377358 |
4a0bb168c595382337f9aa0844fd3c05d267b5eb | 2,699 | py | Python | Chapter15/c15_17_GIR_GARCH_result.py | John-ye666/Python-for-Finance-Second-Edition | dabef09bcdd7b0ec2934774741bd0a7e1950de73 | [
"MIT"
] | 236 | 2017-07-02T03:06:54.000Z | 2022-03-31T03:15:33.000Z | Chapter15/c15_17_GIR_GARCH_result.py | John-ye666/Python-for-Finance-Second-Edition | dabef09bcdd7b0ec2934774741bd0a7e1950de73 | [
"MIT"
] | null | null | null | Chapter15/c15_17_GIR_GARCH_result.py | John-ye666/Python-for-Finance-Second-Edition | dabef09bcdd7b0ec2934774741bd0a7e1950de73 | [
"MIT"
] | 139 | 2017-06-30T10:28:16.000Z | 2022-01-19T19:43:34.000Z | """
Name : c15_17_gir_GARCH_result.py
Book : Python for Finance (2nd ed.)
Publisher: Packt Publishing Ltd.
Author : Yuxing Yan
Date : 6/6/2017
email : yany@canisius.edu
paulyxy@hotmail.com
"""
import numpy as np
import scipy as sp
from numpy.linalg import inv
import matplotli... | 30.325843 | 101 | 0.575028 |
4a0bb21c2a91bd576269156f2d30f322e84c462a | 2,456 | py | Python | insta/models.py | DorcasWanjiku/Instagram-page | e99b8ac27467ff95d82d01f47ded99faa71866b8 | [
"RSA-MD"
] | null | null | null | insta/models.py | DorcasWanjiku/Instagram-page | e99b8ac27467ff95d82d01f47ded99faa71866b8 | [
"RSA-MD"
] | null | null | null | insta/models.py | DorcasWanjiku/Instagram-page | e99b8ac27467ff95d82d01f47ded99faa71866b8 | [
"RSA-MD"
] | null | null | null | # Create your models here.
from django.db import models
from django.utils import timezone
from datetime import datetime
from django.contrib.auth.models import User
from cloudinary.models import CloudinaryField
# from pyuploadcare.dj.models import ImageField
# Create your models here.
class Profile(models.Model):
... | 27.288889 | 98 | 0.702769 |
4a0bb360aee5b3fe8469ddadec20c64615b0828b | 80 | py | Python | run.py | sinivaal/Flask-API | a237fab61024c8717c0de7983216e69fa3c8f4ed | [
"MIT"
] | null | null | null | run.py | sinivaal/Flask-API | a237fab61024c8717c0de7983216e69fa3c8f4ed | [
"MIT"
] | null | null | null | run.py | sinivaal/Flask-API | a237fab61024c8717c0de7983216e69fa3c8f4ed | [
"MIT"
] | null | null | null | from application import app
if __name__ == "__main__":
app.run(host='0.0.0.0') | 20 | 27 | 0.7 |
4a0bb3acb0fd0ad2596d2149f6e3f60a57987dff | 4,269 | py | Python | speccer/ops.py | bensimner/speccer | 85cd4fa72e87b104b072663dfe373eeb47d44b61 | [
"MIT"
] | 1 | 2022-02-09T01:39:33.000Z | 2022-02-09T01:39:33.000Z | speccer/ops.py | bensimner/speccer | 85cd4fa72e87b104b072663dfe373eeb47d44b61 | [
"MIT"
] | null | null | null | speccer/ops.py | bensimner/speccer | 85cd4fa72e87b104b072663dfe373eeb47d44b61 | [
"MIT"
] | null | null | null | # ops.py - Operations over strategies
# author: Ben Simner
from __future__ import generator_stop
import typing
import logging
import contextlib
import collections
from . import strategy
from . import typeable
from . import _errors
log = logging.getLogger('ops')
__all__ = [
'value_args',
'va... | 30.71223 | 115 | 0.532677 |
4a0bb46513fade2530013618ab7cd1fe558f87cb | 5,819 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_interface_load_balancers_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 3 | 2020-06-23T02:25:27.000Z | 2021-09-07T18:48:11.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_interface_load_balancers_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 510 | 2019-07-17T16:11:19.000Z | 2021-08-02T08:38:32.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2017_09_01/operations/_network_interface_load_balancers_operations.py | rsdoherty/azure-sdk-for-python | 6bba5326677468e6660845a703686327178bb7b1 | [
"MIT"
] | 5 | 2019-09-04T12:51:37.000Z | 2020-09-16T07:28:40.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 47.696721 | 196 | 0.668843 |
4a0bb623c2f5a320a5a650ca1bb494fc567341f6 | 946 | py | Python | api/resources/admin.py | xmetadata/smart-campus | 84fa5eaafda6f875aaf3d7b53248f941ad1506d9 | [
"MIT"
] | 1 | 2018-02-27T01:23:48.000Z | 2018-02-27T01:23:48.000Z | api/resources/admin.py | xmetadata/smart-campus | 84fa5eaafda6f875aaf3d7b53248f941ad1506d9 | [
"MIT"
] | null | null | null | api/resources/admin.py | xmetadata/smart-campus | 84fa5eaafda6f875aaf3d7b53248f941ad1506d9 | [
"MIT"
] | null | null | null | from flask_restful import Resource, request
from flask_jwt import jwt_required, current_identity
from sqlalchemy.exc import SQLAlchemyError
import json
from common.satree import TreeManager
from common.database import db
from models.nodetree import NodeTree, InNodeSchema
class AdminData(Resource):
@jwt_... | 35.037037 | 90 | 0.658562 |
4a0bb7e9be01bbacf756d56caa45d02afb03c8ea | 12,118 | py | Python | core/player.py | JoshuaSkelly/TroubleInCloudLand | 2642124f7549c91b89060d424524f69bb7edc169 | [
"MIT"
] | 2 | 2017-04-13T09:59:10.000Z | 2017-04-13T21:07:22.000Z | core/player.py | JoshuaSkelly/TroubleInCloudLand | 2642124f7549c91b89060d424524f69bb7edc169 | [
"MIT"
] | 2 | 2017-04-14T15:33:19.000Z | 2017-04-21T19:55:01.000Z | core/player.py | JoshuaSkelly/TroubleInCloudLand | 2642124f7549c91b89060d424524f69bb7edc169 | [
"MIT"
] | 4 | 2019-02-12T05:48:17.000Z | 2020-10-15T23:12:45.000Z | import copy
import random
from core import actor, bullet, particle
from core.actor import *
from ui import text, infobubble
from utils import utility
def load_data():
Player.master_animation_list.build_animation('Idle', ['kuunIdle'])
Player.master_animation_list.build_animation('Fire', ['kuunShoot'])
Pla... | 38.348101 | 121 | 0.592177 |
4a0bb812c581ccc4f479b1ff4bafba0abceaee63 | 19,085 | py | Python | sequence/BioReaders.py | dpryan79/cDNA_Cupcake | 8d3fb3ad087cdc70e2e8ce98c815d118b2bc5987 | [
"BSD-3-Clause-Clear"
] | 60 | 2016-01-22T19:09:05.000Z | 2022-01-21T02:38:46.000Z | sequence/BioReaders.py | dpryan79/cDNA_Cupcake | 8d3fb3ad087cdc70e2e8ce98c815d118b2bc5987 | [
"BSD-3-Clause-Clear"
] | 93 | 2016-03-03T04:54:40.000Z | 2022-03-31T18:43:28.000Z | sequence/BioReaders.py | dpryan79/cDNA_Cupcake | 8d3fb3ad087cdc70e2e8ce98c815d118b2bc5987 | [
"BSD-3-Clause-Clear"
] | 22 | 2015-12-13T14:49:00.000Z | 2021-11-22T09:08:07.000Z | """
Should always be faithful duplicate of sequence/BioReaders.py
Duplicated here for tofu installation. This one is called via cupcake.io.BioReaders.
"""
import re, sys
from collections import namedtuple
Interval = namedtuple('Interval', ['start', 'end'])
class SimpleSAMReader:
... | 36.701923 | 119 | 0.543149 |
4a0bb8878c8edb86ad22b36a4219949fb6ce1604 | 1,951 | py | Python | src/datasets/eeg_epilepsy.py | ajrcampbell/early-exit-ensembles | 361b232f0e18cf1c6f8f49d70f8b630eeb1e2b49 | [
"MIT"
] | 11 | 2021-11-14T10:47:11.000Z | 2022-01-05T12:56:38.000Z | src/datasets/eeg_epilepsy.py | ajrcampbell/early-exit-ensembles | 361b232f0e18cf1c6f8f49d70f8b630eeb1e2b49 | [
"MIT"
] | 2 | 2022-01-07T09:18:31.000Z | 2022-01-10T03:13:08.000Z | src/datasets/eeg_epilepsy.py | ajrcampbell/early-exit-ensembles | 361b232f0e18cf1c6f8f49d70f8b630eeb1e2b49 | [
"MIT"
] | 3 | 2021-12-04T07:32:44.000Z | 2021-12-23T12:42:37.000Z | import torch
import numpy as np
import pandas as pd
from torch.utils.data import Dataset
from sklearn.model_selection import train_test_split
from src.transforms import Compose, FlipTime, Shift, FlipPolarity, GuassianNoise
from src.datasets.utils import calculate_sample_weights
def get_eeg_epilepsy(data_dir, valid_p... | 32.516667 | 118 | 0.662737 |
4a0bb8beac20af54ac02e661bb96cb744fc88085 | 4,836 | py | Python | vae_ld/models/decoders.py | bonheml/VAE_learning_dynamics | 2bdbc421a5e80841e753c6ee0986dd4670284dde | [
"Apache-2.0"
] | 3 | 2021-03-13T15:25:02.000Z | 2021-11-19T09:53:58.000Z | vae_ld/models/decoders.py | bonheml/VAE_learning_dynamics | 2bdbc421a5e80841e753c6ee0986dd4670284dde | [
"Apache-2.0"
] | 4 | 2020-11-13T19:07:39.000Z | 2021-09-04T15:50:00.000Z | vae_ld/models/decoders.py | bonheml/VAE_learning_dynamics | 2bdbc421a5e80841e753c6ee0986dd4670284dde | [
"Apache-2.0"
] | null | null | null | import numpy as np
import tensorflow as tf
from tensorflow.keras import layers
class DeconvolutionalDecoder(tf.keras.Model):
""" Deconvolutional decoder initially used in beta-VAE [1]. Based on Locatello et al. [2] implementation
(https://github.com/google-research/disentanglement_lib)
[1] Higgins, I. et... | 52.565217 | 114 | 0.651365 |
4a0bb8f34e13d5eb4296bd7a476d88e4840aa26f | 2,202 | py | Python | dfs_sweeper.py | dungba88/cleaner_robot | ce2b21e40ce6f3db9ae007c5ceb7c1cb911b225f | [
"Unlicense"
] | 55 | 2017-10-06T17:59:34.000Z | 2022-03-08T07:03:50.000Z | dfs_sweeper.py | dungba88/cleaner_robot | ce2b21e40ce6f3db9ae007c5ceb7c1cb911b225f | [
"Unlicense"
] | 1 | 2019-07-30T14:14:36.000Z | 2019-08-22T03:45:38.000Z | dfs_sweeper.py | dungba88/cleaner_robot | ce2b21e40ce6f3db9ae007c5ceb7c1cb911b225f | [
"Unlicense"
] | 19 | 2018-07-12T12:48:36.000Z | 2021-12-05T14:06:34.000Z | class DFSSweeper(object):
def __init__(self, robot):
self.observed_map = {}
self.robot = robot
self.loggable = True
def sweep(self):
self.move({'x': 0, 'y': 0}, 0)
def move(self, cur, dir):
self.observed_map[str(cur['x'])+'_'+str(cur['y'])] = 1
straight = se... | 33.876923 | 99 | 0.485468 |
4a0bb992fd9897c6d6b9c148e794f6e4c7510fb6 | 25,290 | py | Python | src/etc/unicode.py | eyolfson/rust | 458a6a2f6e9dfb6ed3d76f14418ff1f2f5e97f86 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | src/etc/unicode.py | eyolfson/rust | 458a6a2f6e9dfb6ed3d76f14418ff1f2f5e97f86 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | src/etc/unicode.py | eyolfson/rust | 458a6a2f6e9dfb6ed3d76f14418ff1f2f5e97f86 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2011-2013 The Rust Project Developers. See the COPYRIGHT
# file at the top-level directory of this distribution and at
# http://rust-lang.org/COPYRIGHT.
#
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT lice... | 35.027701 | 100 | 0.564966 |
4a0bbace6820dd52b39e5209a482aa500b14ec7d | 5,856 | py | Python | uhd_restpy/testplatform/sessions/ixnetwork/globals/topology/pce/pce_5defd13c57ea406c73fd4b2cb010a30f.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | uhd_restpy/testplatform/sessions/ixnetwork/globals/topology/pce/pce_5defd13c57ea406c73fd4b2cb010a30f.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | uhd_restpy/testplatform/sessions/ixnetwork/globals/topology/pce/pce_5defd13c57ea406c73fd4b2cb010a30f.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# 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,... | 37.538462 | 251 | 0.676059 |
4a0bbb7bd6d1db31b95975c167d4543d43d005e1 | 4,415 | py | Python | app/emr_autoscaling/scaler.py | ImmobilienScout24/emr-autoscaling | f32e2e9e72306927ae28d4bff98c2bc5bf8eec66 | [
"Apache-2.0"
] | 11 | 2016-05-13T09:01:06.000Z | 2017-05-10T08:47:06.000Z | app/emr_autoscaling/scaler.py | ImmobilienScout24/emr-autoscaling | f32e2e9e72306927ae28d4bff98c2bc5bf8eec66 | [
"Apache-2.0"
] | null | null | null | app/emr_autoscaling/scaler.py | ImmobilienScout24/emr-autoscaling | f32e2e9e72306927ae28d4bff98c2bc5bf8eec66 | [
"Apache-2.0"
] | null | null | null | import boto3
from datetime import datetime
from app.pytz import timezone
from app.emr_autoscaling.utils import get_logger
from app.emr_autoscaling.constants import UP, DOWN
class EmrScaler:
def __init__(self, emr, min_instances=0, max_instances=20, office_hours_start=7, office_hours_end=18,
sh... | 42.047619 | 135 | 0.62333 |
4a0bbb8e5217530d0fa580c7cdaea79743b9d29a | 10,533 | py | Python | trainer.py | Edresson/deepspeech-playground | 9af761b7729ae44d0f53b6d55a404a8ee497bf95 | [
"Apache-2.0"
] | null | null | null | trainer.py | Edresson/deepspeech-playground | 9af761b7729ae44d0f53b6d55a404a8ee497bf95 | [
"Apache-2.0"
] | null | null | null | trainer.py | Edresson/deepspeech-playground | 9af761b7729ae44d0f53b6d55a404a8ee497bf95 | [
"Apache-2.0"
] | null | null | null | import os
import logging
import numpy as np
from utils import conv_chain_output_length, word_error_rate, save_model
logger = logging.getLogger(__name__)
def _last_of_list_or_none(l):
return None if len(l) == 0 else l[-1]
class Trainer(object):
"""
Training and validation routines
Properties:
... | 39.597744 | 80 | 0.568974 |
4a0bbd3e001a062ddc9e3be6bd3b4bedc2c70776 | 65,938 | py | Python | myvenv/lib/python3.5/site-packages/babel/dates.py | tuvapp/tuvappcom | 5ca2be19f4b0c86a1d4a9553711a4da9d3f32841 | [
"MIT"
] | 35 | 2016-09-22T22:53:14.000Z | 2020-02-13T15:12:21.000Z | myvenv/lib/python3.5/site-packages/babel/dates.py | tuvapp/tuvappcom | 5ca2be19f4b0c86a1d4a9553711a4da9d3f32841 | [
"MIT"
] | 28 | 2020-03-04T22:01:48.000Z | 2022-03-12T00:59:47.000Z | myvenv/lib/python3.5/site-packages/babel/dates.py | tuvapp/tuvappcom | 5ca2be19f4b0c86a1d4a9553711a4da9d3f32841 | [
"MIT"
] | 88 | 2016-11-27T02:16:11.000Z | 2020-02-28T05:10:26.000Z | # -*- coding: utf-8 -*-
"""
babel.dates
~~~~~~~~~~~
Locale dependent formatting and parsing of dates and times.
The default locale for the functions in this module is determined by the
following environment variables, in that order:
* ``LC_TIME``,
* ``LC_ALL``, and
* ``LANG``
... | 37.57151 | 119 | 0.613546 |
4a0bbddbc112272baa309235058082b5e2be9ab0 | 3,519 | py | Python | gpgraph/tests/test_base.py | lperezmo/gpgraph | 7c62a8181734be8a6bc46a434839a06808736a2c | [
"Unlicense"
] | null | null | null | gpgraph/tests/test_base.py | lperezmo/gpgraph | 7c62a8181734be8a6bc46a434839a06808736a2c | [
"Unlicense"
] | 1 | 2020-07-02T21:55:17.000Z | 2020-07-02T21:55:17.000Z | gpgraph/tests/test_base.py | lperezmo/gpgraph | 7c62a8181734be8a6bc46a434839a06808736a2c | [
"Unlicense"
] | 3 | 2019-04-24T20:42:43.000Z | 2020-06-25T04:12:37.000Z | import pytest
from gpmap.gpm import GenotypePhenotypeMap
from gpgraph.base import get_neighbors, GenotypePhenotypeGraph
import numpy as np
import time
@pytest.fixture
def gpmap_base():
# Data
wildtype = "AAA"
genotypes = ["AAA", "AAT", "ATA", "TAA", "ATT", "TAT", "TTA", "TTT"]
phenotypes = [0.1, 0.2, ... | 37.43617 | 101 | 0.677749 |
4a0bbe5cce2650418164ab3c34905870982aca19 | 947 | py | Python | reqs/pk_raffle_handler.py | paipaitou/bili2.0 | 73dbe4738706b05fce57106544e4a784ccb52760 | [
"MIT"
] | null | null | null | reqs/pk_raffle_handler.py | paipaitou/bili2.0 | 73dbe4738706b05fce57106544e4a784ccb52760 | [
"MIT"
] | null | null | null | reqs/pk_raffle_handler.py | paipaitou/bili2.0 | 73dbe4738706b05fce57106544e4a784ccb52760 | [
"MIT"
] | null | null | null | from bili_global import API_LIVE
from json_rsp_ctrl import ZERO_ONLY_CTRL
class PkRaffleHandlerReq:
@staticmethod
async def check(user, real_roomid):
url = f'{API_LIVE}/xlive/lottery-interface/v1/lottery/Check?roomid={real_roomid}'
json_rsp = await user.bililive_session.request_json('G... | 35.074074 | 97 | 0.594509 |
4a0bbee905688be1158f8769495dae907375dba0 | 514 | py | Python | src/application/forms.py | yakudzam/flask-gae-blog | ab422a72f93ddc838dca9bc139ddcac978306937 | [
"MIT",
"CC-BY-3.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | src/application/forms.py | yakudzam/flask-gae-blog | ab422a72f93ddc838dca9bc139ddcac978306937 | [
"MIT",
"CC-BY-3.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | src/application/forms.py | yakudzam/flask-gae-blog | ab422a72f93ddc838dca9bc139ddcac978306937 | [
"MIT",
"CC-BY-3.0",
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | """
forms.py
Web forms based on Flask-WTForms
See: http://flask.pocoo.org/docs/patterns/wtforms/
http://wtforms.simplecodes.com/
"""
from lib.wtforms import Form
from lib.wtforms import validators
from lib.wtforms.ext.appengine.ndb import model_form
from models import Post
# App Engine ndb model form exampl... | 24.47619 | 95 | 0.673152 |
4a0bbf9c91dce0dba9876e54704308da4fa921ad | 11,491 | py | Python | salt/modules/npm.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2020-01-02T09:03:21.000Z | 2020-01-02T09:03:21.000Z | salt/modules/npm.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | null | null | null | salt/modules/npm.py | jubrad/salt | 7960334fb726cfde45e6409da79a65535c626685 | [
"Apache-2.0"
] | 1 | 2020-01-02T09:03:24.000Z | 2020-01-02T09:03:24.000Z | # -*- coding: utf-8 -*-
'''
Manage and query NPM packages.
'''
from __future__ import absolute_import
try:
from shlex import quote as _cmd_quote # pylint: disable=E0611
except ImportError:
from pipes import quote as _cmd_quote
# Import python libs
import json
import logging
# Import salt libs
import salt.uti... | 25.14442 | 104 | 0.606127 |
4a0bc08c7a375c724e5e5f65271a7ec7f48729cf | 7,572 | py | Python | example_app/faceRecognition_notifications.py | SIOTLAB/EdgeAP | c644aaefe17d9b855c82ed2ccbd4bfd28bc05024 | [
"Apache-2.0"
] | 1 | 2020-10-12T02:10:46.000Z | 2020-10-12T02:10:46.000Z | example_app/faceRecognition_notifications.py | SIOTLAB/EdgeAP | c644aaefe17d9b855c82ed2ccbd4bfd28bc05024 | [
"Apache-2.0"
] | null | null | null | example_app/faceRecognition_notifications.py | SIOTLAB/EdgeAP | c644aaefe17d9b855c82ed2ccbd4bfd28bc05024 | [
"Apache-2.0"
] | null | null | null | import cv2
import numpy as np
import os
import sys
from twilio.rest import Client
import RPi.GPIO as GPIO
import time
import json
import argparse
# CLI options
argparser = argparse.ArgumentParser(description='Face Detection application with text notifications')
argparser.add_argument('-c', '--config', type... | 34.108108 | 105 | 0.507528 |
4a0bc0b3a92451de8bbb9c09c86c1695dcd617fa | 3,687 | py | Python | lib/rucio/db/sqla/migrate_repo/versions/45378a1e76a8_create_collection_replica_table.py | fno2010/rucio | 47e93cfbe5887071c70de4ba815c1bbdddfac2ce | [
"Apache-2.0"
] | null | null | null | lib/rucio/db/sqla/migrate_repo/versions/45378a1e76a8_create_collection_replica_table.py | fno2010/rucio | 47e93cfbe5887071c70de4ba815c1bbdddfac2ce | [
"Apache-2.0"
] | null | null | null | lib/rucio/db/sqla/migrate_repo/versions/45378a1e76a8_create_collection_replica_table.py | fno2010/rucio | 47e93cfbe5887071c70de4ba815c1bbdddfac2ce | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright CERN since 2015
#
# 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 ... | 45.518519 | 127 | 0.630594 |
4a0bc0b8ed492c737e54e76fa67d6dfd43eba6fb | 1,191 | py | Python | crawler1.py | vsai121/Web-crawler | 727db4bac41301ecf45889919f0123ad331f4a22 | [
"MIT"
] | null | null | null | crawler1.py | vsai121/Web-crawler | 727db4bac41301ecf45889919f0123ad331f4a22 | [
"MIT"
] | null | null | null | crawler1.py | vsai121/Web-crawler | 727db4bac41301ecf45889919f0123ad331f4a22 | [
"MIT"
] | null | null | null | import os
def create_project_directory(directory):
if not os.path.exists(directory):
print('Creating Project ' + directory)
os.makedirs(directory)
def write_file(filename , data):
f = open(filename , 'w')
f.write(data)
f.close()
def create_datafiles(directory , url):
queue = dir... | 20.534483 | 78 | 0.546599 |
4a0bc0c41869bcfd8f40b9179ab30b56425f65b4 | 217 | py | Python | Agent/tests/functional_test.py | a523/storagestatck | cea14d5e276af1d90f0fc8c0b00881fa7e2bff9a | [
"MIT"
] | 3 | 2019-11-19T09:38:51.000Z | 2020-12-21T13:23:52.000Z | Agent/tests/functional_test.py | a523/storagestatck | cea14d5e276af1d90f0fc8c0b00881fa7e2bff9a | [
"MIT"
] | 7 | 2020-01-20T04:02:23.000Z | 2021-06-10T17:54:36.000Z | Agent/tests/functional_test.py | a523/storagestack | cea14d5e276af1d90f0fc8c0b00881fa7e2bff9a | [
"MIT"
] | null | null | null | """功能测试,测试前请先启动服务"""
import requests
def test_server_status():
resp = requests.get('http://localhost:8600/hello')
assert resp.status_code == 200, 'Agent web server unavailable'
assert resp.text == 'OK'
| 21.7 | 66 | 0.691244 |
4a0bc0e893221a12675380335b725316ccddb270 | 1,938 | py | Python | pyhdx/__init__.py | sebaztiano/PyHDX | 12fc2b5f67200885706226823bd8e1f46e3b5db1 | [
"MIT"
] | null | null | null | pyhdx/__init__.py | sebaztiano/PyHDX | 12fc2b5f67200885706226823bd8e1f46e3b5db1 | [
"MIT"
] | null | null | null | pyhdx/__init__.py | sebaztiano/PyHDX | 12fc2b5f67200885706226823bd8e1f46e3b5db1 | [
"MIT"
] | null | null | null | """Top-level package for PyHDX."""
import setuptools # Import prevents warning
from .models import PeptideMasterTable, PeptideMeasurements, KineticsSeries, Coverage
from .fileIO import read_dynamx
from .output import Output
from pathlib import Path
package_name = 'pyhdx'
try:
import importlib.metadata
__ve... | 32.847458 | 121 | 0.706914 |
4a0bc1c4f4ec77c2adfe8d07ea7700b0ae9e7572 | 2,258 | py | Python | tests/test_utils/salesforce_system_helpers.py | gtossou/airflow | 0314a3a218f864f78ec260cc66134e7acae34bc5 | [
"Apache-2.0"
] | 2 | 2020-12-03T01:29:54.000Z | 2020-12-03T01:30:06.000Z | tests/test_utils/salesforce_system_helpers.py | gtossou/airflow | 0314a3a218f864f78ec260cc66134e7acae34bc5 | [
"Apache-2.0"
] | null | null | null | tests/test_utils/salesforce_system_helpers.py | gtossou/airflow | 0314a3a218f864f78ec260cc66134e7acae34bc5 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 39.614035 | 91 | 0.742693 |
4a0bc23eff2dc97f638c6e4ffd1b8fd49aa94f0b | 34,413 | py | Python | conference.py | preveyj/Udacity-FSWDND-Project-4 | 3364ec0cb6e0394370322f3adc74b78fc3894fac | [
"Apache-2.0"
] | null | null | null | conference.py | preveyj/Udacity-FSWDND-Project-4 | 3364ec0cb6e0394370322f3adc74b78fc3894fac | [
"Apache-2.0"
] | null | null | null | conference.py | preveyj/Udacity-FSWDND-Project-4 | 3364ec0cb6e0394370322f3adc74b78fc3894fac | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
conference.py -- Udacity conference server-side Python App Engine API;
uses Google Cloud Endpoints
$Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $
created by wesc on 2014 apr 21
"""
__author__ = 'wesc+api@google.com (Wesley Chun)'
from datetime import datetime
from dat... | 38.364548 | 132 | 0.628048 |
4a0bc30b730625d6f5618e9e8db9ce6a23133c92 | 148 | py | Python | Part 2/Week_4_7/Fatorial.py | Arielcarv/Intro-Ciencia-da-Computacao-USP | 03d69b9e0f3fa5fca053d0fc406aa1a584d33de1 | [
"MIT"
] | null | null | null | Part 2/Week_4_7/Fatorial.py | Arielcarv/Intro-Ciencia-da-Computacao-USP | 03d69b9e0f3fa5fca053d0fc406aa1a584d33de1 | [
"MIT"
] | null | null | null | Part 2/Week_4_7/Fatorial.py | Arielcarv/Intro-Ciencia-da-Computacao-USP | 03d69b9e0f3fa5fca053d0fc406aa1a584d33de1 | [
"MIT"
] | null | null | null | def fatorial(x):
if x < 1: # base da recursão
return 1
else:
return x * fatorial(x-1) # chamada recursiva
| 24.666667 | 52 | 0.5 |
4a0bc34866f393ad194c709c22a955355c159ef9 | 311 | py | Python | School/Between (1-7).py | Bamgm14/My-Random-Work | b9678a3a84dd8ff00efd638890cff76eb6967c1b | [
"MIT"
] | null | null | null | School/Between (1-7).py | Bamgm14/My-Random-Work | b9678a3a84dd8ff00efd638890cff76eb6967c1b | [
"MIT"
] | null | null | null | School/Between (1-7).py | Bamgm14/My-Random-Work | b9678a3a84dd8ff00efd638890cff76eb6967c1b | [
"MIT"
] | null | null | null | #To accept a single digit Between (1-7) and display a 3 digit number as n*100+(n+1)*10+(n+2))
while True:
a=int(input("Enter Number(n):"))
if a>7 or a<1:
print ("INPUT NUMBER BETWEEN 1 AND 7")
else:
b=(a+1)*10
c=(a+2)
a=a*100
print (a+b+c)
break
| 23.923077 | 93 | 0.514469 |
4a0bc3acb4646d473b50a9a5ba794efa81d2361f | 8,665 | py | Python | docs/source/conf.py | jtoD5T/TinCanPython | e98b5087cb7f3a29c6a00392b327cd6241c4a354 | [
"Apache-2.0"
] | 38 | 2015-02-26T12:40:15.000Z | 2021-08-19T11:19:25.000Z | docs/source/conf.py | jtoD5T/TinCanPython | e98b5087cb7f3a29c6a00392b327cd6241c4a354 | [
"Apache-2.0"
] | 21 | 2015-01-07T23:12:01.000Z | 2022-02-27T12:35:49.000Z | docs/source/conf.py | jtoD5T/TinCanPython | e98b5087cb7f3a29c6a00392b327cd6241c4a354 | [
"Apache-2.0"
] | 27 | 2015-02-09T17:21:44.000Z | 2022-02-27T12:36:25.000Z | # -*- coding: utf-8 -*-
#
# Tin Can Python documentation build configuration file, created by
# sphinx-quickstart on Tue Jun 10 12:52:27 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file... | 31.856618 | 79 | 0.709636 |
4a0bc3c06d504a5876d38ff1c06be7d231caee8e | 2,179 | py | Python | Jogo_da_velha/controller/TabuleirosCtrl.py | Lucas-Dinelli/Projeto_Como_As_Maquinas_Aprendem | 5b47cb9b3f237af32c4caac758380f823637d236 | [
"MIT"
] | null | null | null | Jogo_da_velha/controller/TabuleirosCtrl.py | Lucas-Dinelli/Projeto_Como_As_Maquinas_Aprendem | 5b47cb9b3f237af32c4caac758380f823637d236 | [
"MIT"
] | null | null | null | Jogo_da_velha/controller/TabuleirosCtrl.py | Lucas-Dinelli/Projeto_Como_As_Maquinas_Aprendem | 5b47cb9b3f237af32c4caac758380f823637d236 | [
"MIT"
] | null | null | null | class TabuleiroCtrl:
def __init__(self, ambiente, entradas, preJogo, inteligencia,
telaTabuleiro, preJogoCtrl, fimDeJogosCtrl,
pecasCtrl, atuadoresCtrl, todosTiposJogadores):
self.IAmbiente = ambiente
self.IEntradas = entradas
self.IPreJogo = preJogo
... | 36.932203 | 77 | 0.653052 |
4a0bc4a15286267d1623b6fe6af9154794e866e2 | 2,875 | py | Python | tests/test_additional_responses_router.py | broHeryk/squall | 47c844d45548ed62745ee8385d6e6bda9e8269ad | [
"MIT"
] | 27 | 2021-12-04T15:54:59.000Z | 2022-02-19T15:37:35.000Z | tests/test_additional_responses_router.py | broHeryk/squall | 47c844d45548ed62745ee8385d6e6bda9e8269ad | [
"MIT"
] | 21 | 2021-12-04T21:17:54.000Z | 2022-01-30T23:45:43.000Z | tests/test_additional_responses_router.py | broHeryk/squall | 47c844d45548ed62745ee8385d6e6bda9e8269ad | [
"MIT"
] | 2 | 2021-12-29T10:53:59.000Z | 2022-01-12T05:01:02.000Z | from squall import Router, Squall
from squall.testclient import TestClient
app = Squall()
router = Router()
@router.get("/a", responses={501: {"description": "Error 1"}})
async def a():
return "a"
@router.get(
"/b",
responses={
502: {"description": "Error 2"},
"4XX": {"description": "Er... | 25.669643 | 72 | 0.446957 |
4a0bc5c96ff510d02c34838ef46a2c2007a3b74f | 20,969 | py | Python | Benchmarks/common/utility/makefile_gen/makegen.py | LemonAndRabbit/rodinia-hls | 097e8cf572a9ab04403c4eb0cfdb042f233f4aea | [
"BSD-2-Clause"
] | 364 | 2016-10-18T18:07:32.000Z | 2022-03-31T05:21:25.000Z | Benchmarks/common/utility/makefile_gen/makegen.py | LemonAndRabbit/rodinia-hls | 097e8cf572a9ab04403c4eb0cfdb042f233f4aea | [
"BSD-2-Clause"
] | 54 | 2016-09-19T09:11:27.000Z | 2021-04-19T04:42:58.000Z | Benchmarks/common/utility/makefile_gen/makegen.py | LemonAndRabbit/rodinia-hls | 097e8cf572a9ab04403c4eb0cfdb042f233f4aea | [
"BSD-2-Clause"
] | 227 | 2016-08-18T23:12:33.000Z | 2022-01-19T14:06:12.000Z | #!/usr/bin/env python
from sys import argv
import json
import glob
import os
import re
import subprocess
def create_params(target,data):
target.write("# Points to Utility Directory\n")
dirName = os.getcwd()
dirNameList = list(dirName.split("/"))
dirNameIndex = dirNameList.index("apps")
diff = l... | 35.420608 | 126 | 0.571033 |
4a0bc7ce96c813eb90cc9895886bc9abf7376ee0 | 2,840 | py | Python | jacobi/sharedAlt.py | nqiao/Voxel-Modeling | ee4cb96037cfde6adc9ad7b719d1ccf1f5ced5ae | [
"MIT"
] | null | null | null | jacobi/sharedAlt.py | nqiao/Voxel-Modeling | ee4cb96037cfde6adc9ad7b719d1ccf1f5ced5ae | [
"MIT"
] | null | null | null | jacobi/sharedAlt.py | nqiao/Voxel-Modeling | ee4cb96037cfde6adc9ad7b719d1ccf1f5ced5ae | [
"MIT"
] | null | null | null | import numpy as np
import math
from numba import jit, cuda, float32, int32
'''Create Global Variable that is the block size'''
TPB = 8
RAD = 1
SH_N = 10 # MUST AGREE WITH TPB+2*RAD
'''
stencil = (
(.05, .2, .05),
(.2, 0., .2),
(.05, .2, .05))
See, for example, en.wikipedia.org/wiki/Discrete_Laplace_operator
The -3 ... | 27.572816 | 71 | 0.617958 |
4a0bc7f8136f33722818a1aba9b12935ff527f34 | 1,526 | py | Python | setup.py | twilio-labs/twilio-anchore | 4f0413b1c9c093a971d3c966b83cd920ff9c00be | [
"MIT"
] | 12 | 2022-01-21T19:25:07.000Z | 2022-03-14T20:47:46.000Z | setup.py | twilio-labs/twilio-anchore | 4f0413b1c9c093a971d3c966b83cd920ff9c00be | [
"MIT"
] | 1 | 2022-01-21T21:05:45.000Z | 2022-01-24T20:32:37.000Z | setup.py | twilio-labs/twilio-anchore | 4f0413b1c9c093a971d3c966b83cd920ff9c00be | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="twilio-anchore",
version="1.0.0",
description="Twilio python library that facilitates the use of some features of the Anchore API.",
long_description=long_description,
lo... | 34.681818 | 102 | 0.621232 |
4a0bc894f8c9e6aae7aeb0032ff235c583419c4b | 6,048 | py | Python | zaifapi/exchange_api/trade.py | techbureau/zaifapi | 5b7db7d6abdc76b4e911a74457140b3faf0b7317 | [
"MIT"
] | 62 | 2017-05-10T12:24:48.000Z | 2021-03-17T07:03:29.000Z | zaifapi/exchange_api/trade.py | techbureau/zaifapi | 5b7db7d6abdc76b4e911a74457140b3faf0b7317 | [
"MIT"
] | 15 | 2017-06-12T07:12:14.000Z | 2020-01-30T13:28:53.000Z | zaifapi/exchange_api/trade.py | techbureau/zaifapi | 5b7db7d6abdc76b4e911a74457140b3faf0b7317 | [
"MIT"
] | 19 | 2017-08-23T20:47:14.000Z | 2018-11-21T10:01:06.000Z | import time
import hmac
import hashlib
from decimal import Decimal
from datetime import datetime
from abc import ABCMeta, abstractmethod
from typing import Optional
from urllib.parse import urlencode
from zaifapi.api_common import ApiUrl, get_response, get_api_url, method_name
from zaifapi.api_error import ZaifApiError... | 31.831579 | 88 | 0.616237 |
4a0bc8d6873e4464d5c8f0bada57b6731693a8a4 | 1,628 | py | Python | lib/JumpScale/baselib/influxdb/Influxdb.py | rudecs/jumpscale_core7 | 30c03f26f1cdad3edbb9d79d50fbada8acc974f5 | [
"Apache-2.0"
] | null | null | null | lib/JumpScale/baselib/influxdb/Influxdb.py | rudecs/jumpscale_core7 | 30c03f26f1cdad3edbb9d79d50fbada8acc974f5 | [
"Apache-2.0"
] | null | null | null | lib/JumpScale/baselib/influxdb/Influxdb.py | rudecs/jumpscale_core7 | 30c03f26f1cdad3edbb9d79d50fbada8acc974f5 | [
"Apache-2.0"
] | null | null | null | from JumpScale import j
import redis
from influxdb import client as influxdb
import requests
from requests.auth import HTTPBasicAuth
class InfluxdbFactory:
"""
"""
def __init__(self):
pass
def get(self, host='localhost', port=8086,username='root', password='root', database=None, ssl=False, v... | 37.860465 | 168 | 0.654177 |
4a0bca79186cb5cf7a4a292bae6693efb3efe8df | 8,330 | py | Python | plugins/m/dox.py | marinjurjevic/m.css | e6eff549fb5edeabacf01369d6b845a2a59c2ebe | [
"MIT"
] | 8 | 2021-12-06T16:17:17.000Z | 2022-03-05T09:23:45.000Z | plugins/m/dox.py | marinjurjevic/m.css | e6eff549fb5edeabacf01369d6b845a2a59c2ebe | [
"MIT"
] | 11 | 2021-01-21T08:32:35.000Z | 2021-06-29T16:13:13.000Z | plugins/m/dox.py | marinjurjevic/m.css | e6eff549fb5edeabacf01369d6b845a2a59c2ebe | [
"MIT"
] | 1 | 2021-11-02T02:06:41.000Z | 2021-11-02T02:06:41.000Z | #
# This file is part of m.css.
#
# Copyright © 2017, 2018, 2019, 2020 Vladimír Vondruš <mosra@centrum.cz>
#
# 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, inc... | 43.160622 | 179 | 0.601801 |
4a0bcad4d804f55aa5180c6c62c4a3fa389f3cdf | 643 | py | Python | ProyectoFinal/repartidor/models.py | PredadorAkrid/IS-2020-2-La-Orden-De-Turing | cc292723a7bc4e4c1f848d00484f62ac75e7ad20 | [
"Apache-2.0"
] | null | null | null | ProyectoFinal/repartidor/models.py | PredadorAkrid/IS-2020-2-La-Orden-De-Turing | cc292723a7bc4e4c1f848d00484f62ac75e7ad20 | [
"Apache-2.0"
] | null | null | null | ProyectoFinal/repartidor/models.py | PredadorAkrid/IS-2020-2-La-Orden-De-Turing | cc292723a7bc4e4c1f848d00484f62ac75e7ad20 | [
"Apache-2.0"
] | null | null | null | """Modelos Repartidor"""
#Django
from django.db import models
from django.contrib.auth.models import User
class Repartidor(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE, unique=True)
id_repatidor = models.AutoField(primary_key=True, db_column='id_repatidor')
nombre_repartidor = models.C... | 35.722222 | 76 | 0.802488 |
4a0bcbc2e8a14114ef6c769931ff8ff4e5c92e71 | 5,692 | py | Python | import_data.py | SaeedSharifiMa/FairDP | 8c984e2f11ab465d3155412d3427c5be5b99ab70 | [
"Xnet",
"X11"
] | 2 | 2020-07-18T06:55:40.000Z | 2020-11-02T09:09:54.000Z | import_data.py | SaeedSharifiMa/FairDP | 8c984e2f11ab465d3155412d3427c5be5b99ab70 | [
"Xnet",
"X11"
] | null | null | null | import_data.py | SaeedSharifiMa/FairDP | 8c984e2f11ab465d3155412d3427c5be5b99ab70 | [
"Xnet",
"X11"
] | 4 | 2020-05-11T03:04:15.000Z | 2021-04-17T18:11:20.000Z | import numpy as np
import pandas as pd
def center(X):
for col in X.columns:
X.loc[:, col] = X.loc[:, col]-np.mean(X.loc[:, col])
return X
def add_intercept(X):
"""Add all 1's column to predictor matrix"""
X['intercept'] = [1]*X.shape[0]
def one_hot_code(df1, sens_dict):
cols = df1.colum... | 40.94964 | 109 | 0.599438 |
4a0bcbc8699a39847f8a1e78609c925a23b8aca5 | 1,741 | py | Python | retailapp/user/app/auth/auth.py | kmsarabu/auroraglobaldb_eks | ac4d7064c889e9e5706a828d4e6d9d25d12debb5 | [
"MIT"
] | null | null | null | retailapp/user/app/auth/auth.py | kmsarabu/auroraglobaldb_eks | ac4d7064c889e9e5706a828d4e6d9d25d12debb5 | [
"MIT"
] | null | null | null | retailapp/user/app/auth/auth.py | kmsarabu/auroraglobaldb_eks | ac4d7064c889e9e5706a828d4e6d9d25d12debb5 | [
"MIT"
] | null | null | null | from functools import wraps
from flask import request, make_response, jsonify
import os
class AuthError(Exception):
def __init__(self, error, status_code):
self.error = error
self.status_code = status_code
def get_token_auth_header():
"""Obtains the access token from the Authorization Header
... | 32.849057 | 69 | 0.549684 |
4a0bcbf8ecdb946bb6f72e93922006fd6b48dba2 | 77 | py | Python | recognition/arcface_torch/backbones/__init__.py | PatrickHwang/insightface | e97344135a88bc0815f60e17f12f13eba1dd875c | [
"MIT"
] | 18 | 2018-04-13T02:55:03.000Z | 2020-10-12T01:37:52.000Z | recognition/arcface_torch/backbones/__init__.py | DrSnowbird/insightface-docker | 788cc1410dbff45b1d2aadd73c1d3be5e585e16e | [
"MIT"
] | 1 | 2022-01-27T16:36:50.000Z | 2022-02-04T04:28:37.000Z | recognition/arcface_torch/backbones/__init__.py | DrSnowbird/insightface-docker | 788cc1410dbff45b1d2aadd73c1d3be5e585e16e | [
"MIT"
] | 7 | 2018-08-29T06:41:19.000Z | 2019-09-11T06:10:39.000Z | from .iresnet import iresnet18, iresnet34, iresnet50, iresnet100, iresnet200
| 38.5 | 76 | 0.831169 |
4a0bccd4c4500390faa7f88d34b806e0f35e2566 | 4,161 | py | Python | tests/api/v1_3_3/test_clients.py | wastorga/dnacentersdk | 1a25aaef2eaa016fe54ebebbd7448919e0effa3f | [
"MIT"
] | null | null | null | tests/api/v1_3_3/test_clients.py | wastorga/dnacentersdk | 1a25aaef2eaa016fe54ebebbd7448919e0effa3f | [
"MIT"
] | null | null | null | tests/api/v1_3_3/test_clients.py | wastorga/dnacentersdk | 1a25aaef2eaa016fe54ebebbd7448919e0effa3f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNACenterAPI clients API fixtures and tests.
Copyright (c) 2019 Cisco and/or its affiliates.
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, includ... | 29.097902 | 95 | 0.759673 |
4a0bcd956bf2acabafd67287f793f0613d6d5606 | 28,705 | py | Python | usienarl/models/deep_sarsa.py | InsaneMonster/USienaRL | 95eb35913b448c970b83ab941a24657156cfcd9b | [
"BSD-3-Clause"
] | 6 | 2019-08-24T08:40:09.000Z | 2020-05-20T10:54:26.000Z | usienarl/models/deep_sarsa.py | InsaneMonster/USienaRL | 95eb35913b448c970b83ab941a24657156cfcd9b | [
"BSD-3-Clause"
] | null | null | null | usienarl/models/deep_sarsa.py | InsaneMonster/USienaRL | 95eb35913b448c970b83ab941a24657156cfcd9b | [
"BSD-3-Clause"
] | null | null | null | # Import packages
import tensorflow
import numpy
import math
# Import required src
from usienarl import SpaceType, Model, Config
from usienarl.utils import SumTree
class Buffer:
"""
Prioritized experience replay buffer. It uses a sum tree to store not only the samples but also the priority of
the sampl... | 59.677755 | 223 | 0.663787 |
4a0bcdd22a7a4f6a5e9ba96c1a4a9926cbb87f57 | 923 | py | Python | src/program/migrations/0042_auto_20170715_1547.py | flokli/bornhack-website | 9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d | [
"BSD-3-Clause"
] | 7 | 2017-04-14T15:28:29.000Z | 2021-09-10T09:45:38.000Z | src/program/migrations/0042_auto_20170715_1547.py | flokli/bornhack-website | 9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d | [
"BSD-3-Clause"
] | 799 | 2016-04-28T09:31:50.000Z | 2022-03-29T09:05:02.000Z | src/program/migrations/0042_auto_20170715_1547.py | flokli/bornhack-website | 9dd6b0b23c2e6b1fb2c5f03a8766d4aa96d4443d | [
"BSD-3-Clause"
] | 35 | 2016-04-28T09:23:53.000Z | 2021-05-02T12:36:01.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-07-15 13:47
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("program", "0041_auto_20170711_2248")]
operations = [
migrations.AddField(
mo... | 30.766667 | 122 | 0.600217 |
4a0bcdee5d6e2072efabe2c451cf120ed86c37f5 | 29,599 | py | Python | python/ray/autoscaler/_private/resource_demand_scheduler.py | rogertrullo/ray | 543f7809a6e81a346472662a1dcdf5d3263f6e27 | [
"Apache-2.0"
] | null | null | null | python/ray/autoscaler/_private/resource_demand_scheduler.py | rogertrullo/ray | 543f7809a6e81a346472662a1dcdf5d3263f6e27 | [
"Apache-2.0"
] | null | null | null | python/ray/autoscaler/_private/resource_demand_scheduler.py | rogertrullo/ray | 543f7809a6e81a346472662a1dcdf5d3263f6e27 | [
"Apache-2.0"
] | null | null | null | """Implements multi-node-type autoscaling.
This file implements an autoscaling algorithm that is aware of multiple node
types (e.g., example-multi-node-type.yaml). The Ray autoscaler will pass in
a vector of resource shape demands, and the resource demand scheduler will
return a list of node types that can satisfy the... | 43.91543 | 79 | 0.630427 |
4a0bce6f1dbd27265cb1dd3335c00a5dc1212306 | 20,224 | py | Python | app/routes.py | ccodwg/Covid19CanadaAPI | 0c31435b3c27313af999dfb7eecba8b8b811887f | [
"MIT"
] | 1 | 2021-12-17T14:47:58.000Z | 2021-12-17T14:47:58.000Z | app/routes.py | ccodwg/Covid19CanadaAPI | 0c31435b3c27313af999dfb7eecba8b8b811887f | [
"MIT"
] | 22 | 2021-01-08T16:28:18.000Z | 2021-12-20T19:48:38.000Z | app/routes.py | ccodwg/Covid19CanadaAPI | 0c31435b3c27313af999dfb7eecba8b8b811887f | [
"MIT"
] | 3 | 2021-01-10T00:59:51.000Z | 2021-10-01T20:46:23.000Z | # import app components
from app import app, data
from flask_cors import CORS
CORS(app) # enable CORS for all routes
# import libraries
from flask import request, jsonify
import pandas as pd
import re
from datetime import datetime
from functools import reduce
# define functions
## process date args
def date_arg(arg)... | 32.831169 | 137 | 0.562401 |
4a0bd03c55d02a593385f66664f2f6956da56b8e | 587 | py | Python | Examples/Image/Classification/ResNet/Python/run_Distributed.py | Wootai/CNTK | 5eca042341c8152594e67652a44c3b733a2acaa0 | [
"RSA-MD"
] | 5 | 2017-08-28T08:27:18.000Z | 2021-04-20T21:12:52.000Z | Examples/Image/Classification/ResNet/Python/run_Distributed.py | zhuyawen/CNTK | 0ee09cf771bda9d4912790e0fed7322e89d86d87 | [
"RSA-MD"
] | null | null | null | Examples/Image/Classification/ResNet/Python/run_Distributed.py | zhuyawen/CNTK | 0ee09cf771bda9d4912790e0fed7322e89d86d87 | [
"RSA-MD"
] | 3 | 2019-08-23T11:42:14.000Z | 2022-01-06T08:41:32.000Z | if __name__ == '__main__':
import time
import subprocess
start_time = time.time()
subprocess.call(["python", "TrainResNet_CIFAR10_Distributed.py", "-n", "resnet110", "-q", "32", "-a", "0"], stderr=subprocess.STDOUT)
print("\n--- Non-distributed: %s seconds ---\n" % (time.time() - start_time))
... | 48.916667 | 159 | 0.608177 |
4a0bd0df4d30c56aab32b2013e010da4e1887d9b | 5,621 | py | Python | mpmath/rational.py | diofant/mpmath1 | 1deafadddfc9d62f619f6ee80cd469fc001d7a70 | [
"BSD-3-Clause"
] | null | null | null | mpmath/rational.py | diofant/mpmath1 | 1deafadddfc9d62f619f6ee80cd469fc001d7a70 | [
"BSD-3-Clause"
] | null | null | null | mpmath/rational.py | diofant/mpmath1 | 1deafadddfc9d62f619f6ee80cd469fc001d7a70 | [
"BSD-3-Clause"
] | null | null | null | import numbers
import operator
import sys
from .libmp import int_types, mpf_hash, bitcount, from_man_exp, HASH_MODULUS
new = object.__new__
def create_reduced(p, q, _cache={}):
key = p, q
if key in _cache:
return _cache[key]
x, y = p, q
while y:
x, y = y, x % y
if x != 1:
p... | 24.43913 | 79 | 0.486568 |
4a0bd1c9424a52f1d1f1f68d567fa77958728d99 | 13,162 | py | Python | iis-3rdparty-madis/src/main/resources/eu/dnetlib/iis/3rdparty/scripts/madis/lib/sqlparse/keywords.py | mpol/iis | fbf7129bbd131fbf824a0d3fc8a0afde367794e2 | [
"Apache-2.0"
] | 20 | 2015-09-19T21:17:23.000Z | 2022-03-01T10:37:59.000Z | iis-3rdparty-madis/src/main/resources/eu/dnetlib/iis/3rdparty/scripts/madis/lib/sqlparse/keywords.py | mpol/iis | fbf7129bbd131fbf824a0d3fc8a0afde367794e2 | [
"Apache-2.0"
] | 1,054 | 2015-09-11T06:51:27.000Z | 2022-03-30T09:46:54.000Z | iis-3rdparty-madis/src/main/resources/eu/dnetlib/iis/3rdparty/scripts/madis/lib/sqlparse/keywords.py | mpol/iis | fbf7129bbd131fbf824a0d3fc8a0afde367794e2 | [
"Apache-2.0"
] | 80 | 2015-12-09T12:41:52.000Z | 2022-02-16T11:46:42.000Z | from sqlparse.tokens import *
KEYWORDS = {
'ABORT': Keyword,
'ABS': Keyword,
'ABSOLUTE': Keyword,
'ACCESS': Keyword,
'ADA': Keyword,
'ADD': Keyword,
'ADMIN': Keyword,
'AFTER': Keyword,
'AGGREGATE': Keyword,
'ALIAS': Keyword,
'ALL': Keyword,
'ALLOCATE': Keyword,
'ANAL... | 23.336879 | 50 | 0.593831 |
4a0bd1d195f96f782e72b39e40dac512c8514d68 | 950 | py | Python | app/models.py | benosment/cookbook | 4f0d704f1953627145fcc89b924e5476b0bdb2fc | [
"MIT"
] | null | null | null | app/models.py | benosment/cookbook | 4f0d704f1953627145fcc89b924e5476b0bdb2fc | [
"MIT"
] | null | null | null | app/models.py | benosment/cookbook | 4f0d704f1953627145fcc89b924e5476b0bdb2fc | [
"MIT"
] | null | null | null | from . import db
from datetime import datetime
# With an ORM, the model (a Python class) is mapped to
# columns in a corresponding database table
class Recipe(db.Model):
__tablename__ = 'recipes'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64), unique=True, nullable=False)
... | 33.928571 | 68 | 0.691579 |
4a0bd203b4efd163153865d067cda41fab7da66c | 2,467 | py | Python | tests/flytekit/unit/models/test_common.py | flytehub/flytekit | f8f53567594069b29fcd3f99abd1da71a5ef0e22 | [
"Apache-2.0"
] | 1 | 2019-10-22T05:22:16.000Z | 2019-10-22T05:22:16.000Z | tests/flytekit/unit/models/test_common.py | chixcode/flytekit | f901aee721847c6264d44079d4fa31a75b8876e1 | [
"Apache-2.0"
] | null | null | null | tests/flytekit/unit/models/test_common.py | chixcode/flytekit | f901aee721847c6264d44079d4fa31a75b8876e1 | [
"Apache-2.0"
] | 1 | 2019-08-28T22:27:07.000Z | 2019-08-28T22:27:07.000Z | from __future__ import absolute_import
from flytekit.models import common as _common
from flytekit.models.core import execution as _execution
def test_notification_email():
obj = _common.EmailNotification(['a', 'b', 'c'])
assert obj.recipients_email == ['a', 'b', 'c']
obj2 = _common.EmailNotification.fro... | 35.753623 | 100 | 0.714633 |
4a0bd266332ff1282d160b46d871f7b8e3dcb7d0 | 46 | py | Python | olive/core/managers/__init__.py | liuyenting/olive-core | b532b29e29fe9f167369f66b8d922f5f644f9309 | [
"Apache-2.0"
] | null | null | null | olive/core/managers/__init__.py | liuyenting/olive-core | b532b29e29fe9f167369f66b8d922f5f644f9309 | [
"Apache-2.0"
] | null | null | null | olive/core/managers/__init__.py | liuyenting/olive-core | b532b29e29fe9f167369f66b8d922f5f644f9309 | [
"Apache-2.0"
] | null | null | null | from .devices import *
from .drivers import * | 23 | 23 | 0.73913 |
4a0bd36eb588aed9ebdc29dd83fc786aca11770c | 732 | py | Python | config/queue.py | FAITHM1/masonite_blog_backend | d20b707f7a93dc51816821fa47b341c9a38f7df6 | [
"MIT"
] | 4 | 2020-11-01T22:51:01.000Z | 2021-09-23T23:12:53.000Z | config/queue.py | FAITHM1/masonite_blog_backend | d20b707f7a93dc51816821fa47b341c9a38f7df6 | [
"MIT"
] | 17 | 2021-02-07T17:32:15.000Z | 2022-03-21T22:08:31.000Z | config/queue.py | FAITHM1/masonite_blog_backend | d20b707f7a93dc51816821fa47b341c9a38f7df6 | [
"MIT"
] | 3 | 2020-11-14T16:55:09.000Z | 2021-03-26T18:59:06.000Z | """Queue Settings."""
from masonite import env
"""Queue Driver
Queues are an excellent way to send intensive and time consuming tasks
into the background to improve performance of your application.
Supported: 'async', 'amqp'
"""
DRIVER = env("QUEUE_DRIVER", "async")
"""Queue Drivers
Put any configuration settings ... | 25.241379 | 78 | 0.636612 |
4a0bd4df630f0a6268109b22c359e2e874f2a4ab | 3,854 | py | Python | src/bandersnatch_filter_plugins/filename_name.py | techalchemy/bandersnatch | 1c4030f714d7abdc993f1265c42acb7657c9b84f | [
"AFL-3.0"
] | null | null | null | src/bandersnatch_filter_plugins/filename_name.py | techalchemy/bandersnatch | 1c4030f714d7abdc993f1265c42acb7657c9b84f | [
"AFL-3.0"
] | null | null | null | src/bandersnatch_filter_plugins/filename_name.py | techalchemy/bandersnatch | 1c4030f714d7abdc993f1265c42acb7657c9b84f | [
"AFL-3.0"
] | null | null | null | import logging
from typing import List
from bandersnatch.filter import FilterReleasePlugin
logger = logging.getLogger("bandersnatch")
class ExcludePlatformFilter(FilterReleasePlugin):
"""
Filters releases based on regex patters defined by the user.
"""
name = "exclude_platform"
_patterns: List... | 30.587302 | 86 | 0.522314 |
4a0bd54adb69f33f3d824f8cf044c462d488cd87 | 1,488 | py | Python | build.py | odant/conan-date | bbd75bd1fe2083c192848de96f086ca49be2d931 | [
"MIT"
] | null | null | null | build.py | odant/conan-date | bbd75bd1fe2083c192848de96f086ca49be2d931 | [
"MIT"
] | null | null | null | build.py | odant/conan-date | bbd75bd1fe2083c192848de96f086ca49be2d931 | [
"MIT"
] | null | null | null | import platform, os
from conan.packager import ConanMultiPackager
# Common settings
username = "odant" if "CONAN_USERNAME" not in os.environ else None
# Windows settings
visual_versions = ["14", "15"] if "CONAN_VISUAL_VERSIONS" not in os.environ else None
visual_runtimes = ["MD", "MDd"] if "CONAN_VISUAL_RUNTI... | 33.818182 | 87 | 0.663306 |
4a0bd602e4d9abe3c75bc3eb84f8dd144446ed64 | 1,549 | py | Python | sdk/python/pulumi_rke/__init__.py | jaxxstorm/pulumi-rke | 9031a8509ce0f210348ece7419c1e7392174d603 | [
"ECL-2.0",
"Apache-2.0"
] | 3 | 2020-03-13T20:27:32.000Z | 2020-12-10T15:47:31.000Z | sdk/python/pulumi_rke/__init__.py | jaxxstorm/pulumi-rke | 9031a8509ce0f210348ece7419c1e7392174d603 | [
"ECL-2.0",
"Apache-2.0"
] | 97 | 2020-03-24T01:00:33.000Z | 2021-04-25T20:27:28.000Z | sdk/python/pulumi_rke/__init__.py | jaxxstorm/pulumi-rke | 9031a8509ce0f210348ece7419c1e7392174d603 | [
"ECL-2.0",
"Apache-2.0"
] | 4 | 2020-03-23T21:44:29.000Z | 2021-05-13T14:28:22.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! ***
# Export this package's modules as members:
from .cluster import *
from .provider import *
from ._inputs import *
from . import outputs... | 29.226415 | 95 | 0.662363 |
4a0bd6bd29c404b436f005f9e42f057f706caf22 | 4,683 | py | Python | heart_disease_correlation/coronary.py | Sapphirine/202112-38-GOPS | 0a52d8ed56c432845201be93bc5db80bc06d9b0e | [
"MIT"
] | null | null | null | heart_disease_correlation/coronary.py | Sapphirine/202112-38-GOPS | 0a52d8ed56c432845201be93bc5db80bc06d9b0e | [
"MIT"
] | 2 | 2021-12-23T04:32:41.000Z | 2021-12-23T05:01:33.000Z | heart_disease_correlation/coronary.py | Sapphirine/202112-38-GOPS | 0a52d8ed56c432845201be93bc5db80bc06d9b0e | [
"MIT"
] | 1 | 2022-03-05T22:50:36.000Z | 2022-03-05T22:50:36.000Z | import pandas as pd
from statistics import mean
state_codes = ['KY', 'OH', 'PA', 'VA', 'WV']
df = pd.read_csv('heart_disease.csv', low_memory=False)
df = df.loc[df['Topic'] == 'Coronary Heart Disease']
df = df.loc[df['Data_Value_Unit']=="per 100,000"]
df = df.loc[df['LocationAbbr'].isin(state_codes)]
# print(df)
st... | 42.963303 | 151 | 0.708093 |
4a0bd84645a4f0b192db65d1940578b30ee51e58 | 5,682 | py | Python | pronotepy/test_pronotepy.py | HevelMc/pronotepy | efacde74c70e003394adf07d8ddf289358966344 | [
"MIT"
] | null | null | null | pronotepy/test_pronotepy.py | HevelMc/pronotepy | efacde74c70e003394adf07d8ddf289358966344 | [
"MIT"
] | null | null | null | pronotepy/test_pronotepy.py | HevelMc/pronotepy | efacde74c70e003394adf07d8ddf289358966344 | [
"MIT"
] | null | null | null | import datetime
import typing
import unittest
import pronotepy
client = pronotepy.Client('https://demo.index-education.net/pronote/eleve.html', 'demonstration', 'pronotevs')
class TestClient(unittest.TestCase):
global client
def test__get_week(self):
self.assertEqual(client.get_week(client.start_da... | 33.621302 | 117 | 0.67441 |
4a0bd88599e6fad73a0e88090941dd1d2a49afb3 | 1,167 | py | Python | pymoo/usage/usage_performance_indicator.py | gabicavalcante/pymoo | 1711ce3a96e5ef622d0116d6c7ea4d26cbe2c846 | [
"Apache-2.0"
] | 11 | 2018-05-22T17:38:02.000Z | 2022-02-28T03:34:33.000Z | pymoo/usage/usage_performance_indicator.py | gabicavalcante/pymoo | 1711ce3a96e5ef622d0116d6c7ea4d26cbe2c846 | [
"Apache-2.0"
] | 15 | 2022-01-03T19:36:36.000Z | 2022-03-30T03:57:58.000Z | pymoo/usage/usage_performance_indicator.py | gabicavalcante/pymoo | 1711ce3a96e5ef622d0116d6c7ea4d26cbe2c846 | [
"Apache-2.0"
] | 3 | 2021-11-22T08:01:47.000Z | 2022-03-11T08:53:58.000Z | # START load_data
import numpy as np
from pymoo.factory import get_problem
from pymoo.visualization.scatter import Scatter
# The pareto front of a scaled zdt1 problem
pf = get_problem("zdt1").pareto_front()
# The result found by an algorithm
A = pf[::10] * 1.1
# plot the result
Scatter(legend=True).add(pf, label="Pa... | 19.779661 | 80 | 0.748072 |
4a0bda9ff63a11d50ecbedfc6e621e6123a5fbad | 1,175 | py | Python | load_dataset.py | DiegoLigtenberg/Workspace-Thesis-MSS | 061fd31c09a7d6d0e9dd1c49d0dd11b84057e547 | [
"MIT"
] | null | null | null | load_dataset.py | DiegoLigtenberg/Workspace-Thesis-MSS | 061fd31c09a7d6d0e9dd1c49d0dd11b84057e547 | [
"MIT"
] | null | null | null | load_dataset.py | DiegoLigtenberg/Workspace-Thesis-MSS | 061fd31c09a7d6d0e9dd1c49d0dd11b84057e547 | [
"MIT"
] | null | null | null | import re
import glob
import os
DB_DIRECTORY = r"database\**\*.mp4"
def atoi(text):
return int(text) if text.isdigit() else text
def natural_keys(text):
return [ atoi(c) for c in re.split(r'(\d+)', text) ]
def dir_to_sorted_file_list():
files = list(glob.glob(DB_DIRECTORY,recursive=True))
files.so... | 26.111111 | 74 | 0.674043 |
4a0bdae9ccda92274c0484fb6ff92b87a582bbf3 | 4,545 | py | Python | covertutils/covertutils/shells/subshells/controlsubshell.py | aidden-laoch/sabre | 0940aa51dfc5074291df9d29db827ddb4010566d | [
"MIT"
] | 2 | 2020-11-23T23:54:32.000Z | 2021-05-25T12:28:05.000Z | covertutils/covertutils/shells/subshells/controlsubshell.py | aidden-laoch/sabre | 0940aa51dfc5074291df9d29db827ddb4010566d | [
"MIT"
] | 1 | 2021-03-20T05:43:02.000Z | 2021-03-20T05:43:02.000Z | covertutils/covertutils/shells/subshells/controlsubshell.py | aidden-laoch/sabre | 0940aa51dfc5074291df9d29db827ddb4010566d | [
"MIT"
] | null | null | null | import json
# from covertutils.payloads.generic.control import Commands as control_commands
from covertutils.shells.subshells import SimpleSubShell
Commands = {
'reset' : 'R',
'identity' : 'ID',
'sysinfo' : 'SI',
'kill' : 'KI',
'mute' : 'MU',
'unmute' : 'UM',
'nuke' : 'NK',
'check_sync' : 'CS',
'sync' : 'Y',
... | 26.424419 | 130 | 0.676128 |
4a0bdaeec3b710e6bd81a7787f700b8c8d71b01f | 45 | py | Python | src/deps/ext/torchvision/__init__.py | ericotjo001/neuron-descriptions | 744fbf65c6538edd2fa423108eca7e2cd72f8b59 | [
"MIT"
] | 5 | 2022-02-22T21:58:10.000Z | 2022-03-22T16:19:14.000Z | src/deps/ext/torchvision/__init__.py | ericotjo001/neuron-descriptions | 744fbf65c6538edd2fa423108eca7e2cd72f8b59 | [
"MIT"
] | 3 | 2022-02-27T06:43:34.000Z | 2022-03-18T08:30:30.000Z | src/deps/ext/torchvision/__init__.py | ericotjo001/neuron-descriptions | 744fbf65c6538edd2fa423108eca7e2cd72f8b59 | [
"MIT"
] | 1 | 2022-02-27T05:18:30.000Z | 2022-02-27T05:18:30.000Z | """Extensions to the torchvision library."""
| 22.5 | 44 | 0.733333 |
4a0bdb9836d1fe403db1926de42525dbfeab1681 | 4,401 | py | Python | small_spider/spider_downloader.py | saberbin/small_spider | d3c14681a5bb2b068fe5afb23d637d21b8fa76aa | [
"Apache-2.0"
] | null | null | null | small_spider/spider_downloader.py | saberbin/small_spider | d3c14681a5bb2b068fe5afb23d637d21b8fa76aa | [
"Apache-2.0"
] | null | null | null | small_spider/spider_downloader.py | saberbin/small_spider | d3c14681a5bb2b068fe5afb23d637d21b8fa76aa | [
"Apache-2.0"
] | null | null | null | import requests
import random
import warnings
class SpiderDownloader(object):
# 请求头
HEADERS = (
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.119 Safari/537.36',
'Opera/9.80 (Windows NT 6.0) Presto/2.12.388 Version/12.14',
'Mozilla/... | 39.648649 | 129 | 0.56987 |
4a0bdcf0191b84a8e04552927cac5f2ec0604e62 | 2,714 | py | Python | getNews.py | iprashant2402/newsquoo-backend-python | fef21eefdb1160c3728067706798cc8020c08eb8 | [
"Apache-2.0"
] | null | null | null | getNews.py | iprashant2402/newsquoo-backend-python | fef21eefdb1160c3728067706798cc8020c08eb8 | [
"Apache-2.0"
] | null | null | null | getNews.py | iprashant2402/newsquoo-backend-python | fef21eefdb1160c3728067706798cc8020c08eb8 | [
"Apache-2.0"
] | null | null | null | from newsapi import NewsApiClient
import json
# Init
newsapi = NewsApiClient(api_key='e1529d21c8c34fc49978ebc4e673ccf7')
uid = 0
all_articles = []
# Get articles for month of April----------------------------------#
day = 17
base_date1 = '2020-04-'
base_date2 = '2020-04-0'
while(day<=30):
if(day<10):
if(d... | 35.246753 | 130 | 0.450626 |
4a0bdd29c23ee12e389a2f30f3e8321b46a2d291 | 7,016 | py | Python | storageclient/google.py | uc-cdis/storage-client | 43f116effcc8f9469cee912dfb6cb64506c4ece1 | [
"Apache-2.0"
] | null | null | null | storageclient/google.py | uc-cdis/storage-client | 43f116effcc8f9469cee912dfb6cb64506c4ece1 | [
"Apache-2.0"
] | 13 | 2017-12-07T21:21:28.000Z | 2021-11-02T19:37:57.000Z | storageclient/google.py | uc-cdis/storage-client | 43f116effcc8f9469cee912dfb6cb64506c4ece1 | [
"Apache-2.0"
] | null | null | null | from storageclient.base import StorageClient
from storageclient.errors import RequestError
from cirrus import GoogleCloudManager
class UserProxy(object):
def __init__(self, username):
self.username = username
class GoogleCloudStorageClient(StorageClient):
def __init__(self, config):
super(Go... | 32.183486 | 81 | 0.597349 |
4a0bdd636cedff721af320c0b637a31b7f175f00 | 118 | py | Python | scripts/hashing_file.py | Pyt45/algorithms-dataStructure-python | d88a5225e49dd1cbce5363b1f88c0f207a301d5c | [
"MIT"
] | null | null | null | scripts/hashing_file.py | Pyt45/algorithms-dataStructure-python | d88a5225e49dd1cbce5363b1f88c0f207a301d5c | [
"MIT"
] | null | null | null | scripts/hashing_file.py | Pyt45/algorithms-dataStructure-python | d88a5225e49dd1cbce5363b1f88c0f207a301d5c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import hashlib
from __future__ import annotations
def hash_file(filepath: str) -> str:
pass | 19.666667 | 36 | 0.754237 |
4a0bde1908a76ba550238c14359b18ae63f00d96 | 2,821 | py | Python | airbyte-integrations/connectors/source-twitter-ads/unit_tests/test_streams.py | blinkist/airbyte | 46ab8abc4fcc4243b6eeb7d3864fa43fa5a55d64 | [
"MIT"
] | null | null | null | airbyte-integrations/connectors/source-twitter-ads/unit_tests/test_streams.py | blinkist/airbyte | 46ab8abc4fcc4243b6eeb7d3864fa43fa5a55d64 | [
"MIT"
] | null | null | null | airbyte-integrations/connectors/source-twitter-ads/unit_tests/test_streams.py | blinkist/airbyte | 46ab8abc4fcc4243b6eeb7d3864fa43fa5a55d64 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2021 Airbyte, Inc., all rights reserved.
#
from http import HTTPStatus
from unittest.mock import MagicMock
import pytest
from source_twitter_ads.source import TwitterAdsStream
@pytest.fixture
def patch_base_class(mocker):
# Mock abstract methods to enable instantiating abstract class
mocke... | 33.583333 | 82 | 0.740518 |
4a0bde24e10dba91b983bad2939fb64d3f979cf4 | 41 | py | Python | venv/lib/python3.6/encodings/hp_roman8.py | JamesMusyoka/Blog | fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5 | [
"Unlicense"
] | 2 | 2019-04-17T13:35:50.000Z | 2021-12-21T00:11:36.000Z | venv/lib/python3.6/encodings/hp_roman8.py | JamesMusyoka/Blog | fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5 | [
"Unlicense"
] | 2 | 2021-03-31T19:51:24.000Z | 2021-06-10T23:05:09.000Z | venv/lib/python3.6/encodings/hp_roman8.py | JamesMusyoka/Blog | fdcb51cf4541bbb3b9b3e7a1c3735a0b1f45f0b5 | [
"Unlicense"
] | 2 | 2019-10-01T08:47:35.000Z | 2020-07-11T06:32:16.000Z | /usr/lib/python3.6/encodings/hp_roman8.py | 41 | 41 | 0.829268 |
4a0bde8f3edbbafaf3d987a0d6e3e19e1cd29b3d | 6,060 | py | Python | orion/evaluation/point.py | PSFC-HEDP/Orion | 37535c788112df346bb9d3a13255f58f2479d4bc | [
"MIT"
] | 543 | 2020-06-16T21:48:43.000Z | 2021-10-04T01:56:27.000Z | orion/evaluation/point.py | PSFC-HEDP/Orion | 37535c788112df346bb9d3a13255f58f2479d4bc | [
"MIT"
] | 147 | 2020-05-20T02:22:26.000Z | 2021-10-12T05:28:56.000Z | orion/evaluation/point.py | PSFC-HEDP/Orion | 37535c788112df346bb9d3a13255f58f2479d4bc | [
"MIT"
] | 98 | 2020-08-13T11:29:51.000Z | 2021-10-04T18:59:09.000Z | from orion.evaluation.common import _accuracy, _f1_score, _precision, _recall, _weighted_segment
def _point_partition(expected, observed, start=None, end=None):
expected = set(expected)
observed = set(observed)
edge_start = min(expected.union(observed))
if start is not None:
edge_start = star... | 36.506024 | 96 | 0.645545 |
4a0bdfae05defeee64d8f9ef7e4991812eb815c9 | 677 | py | Python | PDSUtilities/pandas/utilities.py | DrJohnWagner/PDSUtilities | ffad1a02f78f46acdf4bd65d7c2eb063af7dbc13 | [
"Apache-2.0"
] | null | null | null | PDSUtilities/pandas/utilities.py | DrJohnWagner/PDSUtilities | ffad1a02f78f46acdf4bd65d7c2eb063af7dbc13 | [
"Apache-2.0"
] | 12 | 2022-01-18T06:21:03.000Z | 2022-01-20T07:29:56.000Z | PDSUtilities/pandas/utilities.py | DrJohnWagner/PDSUtilities | ffad1a02f78f46acdf4bd65d7c2eb063af7dbc13 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
def read_or_create_csv(filename, columns, index_col=[0]):
try:
df = pd.read_csv(filename, index_col=index_col)
except FileNotFoundError:
print(f"Pandas file {filename} not found...creating!")
df = pd.DataFrame(columns = columns)
except pd.errors.EmptyDataError:
... | 37.611111 | 62 | 0.654357 |
4a0bdfb19dea97ece2b859d4235ad136cba3d6ef | 313 | py | Python | tests/tensor/test_multinomial.py | nlp-greyfoss/metagrad | 0f32f177ced1478f0c75ad37bace9a9fc4044ba3 | [
"MIT"
] | 7 | 2022-01-27T05:38:02.000Z | 2022-03-30T01:48:00.000Z | tests/tensor/test_multinomial.py | nlp-greyfoss/metagrad | 0f32f177ced1478f0c75ad37bace9a9fc4044ba3 | [
"MIT"
] | null | null | null | tests/tensor/test_multinomial.py | nlp-greyfoss/metagrad | 0f32f177ced1478f0c75ad37bace9a9fc4044ba3 | [
"MIT"
] | 2 | 2022-02-22T07:47:02.000Z | 2022-03-22T08:31:59.000Z | from metagrad.tensor import Tensor
def test_simple_multinomial():
weights = Tensor([0, 10, 3, 0])
x = Tensor.multinomial(weights, 5, replace=True)
print(x)
def test_multinomial():
weights = Tensor([[0, 10, 3, 0], [5, 0, 0, 5]])
x = Tensor.multinomial(weights, 5, replace=True)
print(x) | 24.076923 | 52 | 0.642173 |
4a0be0d2556a6120203b89cb1cdf05b71d2ed3fb | 3,429 | py | Python | tests/test_class_file_data.py | jthDEV/tern | cea8d4341a04a7d0785d6e5e5cc4827667502cd1 | [
"BSD-2-Clause"
] | null | null | null | tests/test_class_file_data.py | jthDEV/tern | cea8d4341a04a7d0785d6e5e5cc4827667502cd1 | [
"BSD-2-Clause"
] | null | null | null | tests/test_class_file_data.py | jthDEV/tern | cea8d4341a04a7d0785d6e5e5cc4827667502cd1 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (c) 2020 VMware, Inc. All Rights Reserved.
# SPDX-License-Identifier: BSD-2-Clause
import unittest
from tern.classes.file_data import FileData
from test_fixtures import TestTemplate1
from test_fixtures import TestTemplate2
class TestClassFileData(unittest.TestCase):
def se... | 36.870968 | 70 | 0.610674 |
4a0be13889ad2640fa67b2e6d152e91629557369 | 12,540 | py | Python | scipy/spatial/_spherical_voronoi.py | xu-hong-/scipy | f737001cf0a75654efe09a1de5cdf5d1895bda59 | [
"BSD-3-Clause"
] | 6,989 | 2017-07-18T06:23:18.000Z | 2022-03-31T15:58:36.000Z | scipy/spatial/_spherical_voronoi.py | xu-hong-/scipy | f737001cf0a75654efe09a1de5cdf5d1895bda59 | [
"BSD-3-Clause"
] | 1,978 | 2017-07-18T09:17:58.000Z | 2022-03-31T14:28:43.000Z | scipy/spatial/_spherical_voronoi.py | xu-hong-/scipy | f737001cf0a75654efe09a1de5cdf5d1895bda59 | [
"BSD-3-Clause"
] | 1,228 | 2017-07-18T09:03:13.000Z | 2022-03-29T05:57:40.000Z | """
Spherical Voronoi Code
.. versionadded:: 0.18.0
"""
#
# Copyright (C) Tyler Reddy, Ross Hemsley, Edd Edmondson,
# Nikolai Nowaczyk, Joe Pitt-Francis, 2015.
#
# Distributed under the same BSD license as Scipy.
#
import numpy as np
import numpy.matlib
import scipy
import itertools
from scipy._lib._... | 38.348624 | 78 | 0.629027 |
4a0be1d4e0fe1553ab9b7e04cfe6c645533c92d9 | 2,000 | py | Python | lograt/watchdog/observers/lograt_observer_api.py | teddbug-S/LogRat | b608e29cbbe93d2f35a32e47c2b98e6be40bdf59 | [
"MIT"
] | null | null | null | lograt/watchdog/observers/lograt_observer_api.py | teddbug-S/LogRat | b608e29cbbe93d2f35a32e47c2b98e6be40bdf59 | [
"MIT"
] | null | null | null | lograt/watchdog/observers/lograt_observer_api.py | teddbug-S/LogRat | b608e29cbbe93d2f35a32e47c2b98e6be40bdf59 | [
"MIT"
] | null | null | null | #
# MIT License
#
# Copyright (c) 2021 Divine Darkey
#
# 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, mer... | 40.816327 | 80 | 0.7255 |
4a0be22c6326419ea8f1271618a99cf113efe452 | 371 | py | Python | tests/bento_service_examples/iris_classifier.py | vedashree29296/BentoML | 79f94d543a0684e04551207d102a2d254b770ad3 | [
"Apache-2.0"
] | null | null | null | tests/bento_service_examples/iris_classifier.py | vedashree29296/BentoML | 79f94d543a0684e04551207d102a2d254b770ad3 | [
"Apache-2.0"
] | null | null | null | tests/bento_service_examples/iris_classifier.py | vedashree29296/BentoML | 79f94d543a0684e04551207d102a2d254b770ad3 | [
"Apache-2.0"
] | null | null | null | import bentoml
from bentoml.adapters import DataframeInput
from bentoml.frameworks.sklearn import SklearnModelArtifact
@bentoml.env(infer_pip_packages=True)
@bentoml.artifacts([SklearnModelArtifact('model')])
class IrisClassifier(bentoml.BentoService):
@bentoml.api(input=DataframeInput())
def predict(self, df... | 30.916667 | 59 | 0.795148 |
4a0be234e994de5d2a8b2523837d9a61a2cd5271 | 4,304 | py | Python | composer/models/base.py | jbloxham/composer | 6dd0a0f297cafb404333d6280a5344bcb7f3bee6 | [
"Apache-2.0"
] | null | null | null | composer/models/base.py | jbloxham/composer | 6dd0a0f297cafb404333d6280a5344bcb7f3bee6 | [
"Apache-2.0"
] | null | null | null | composer/models/base.py | jbloxham/composer | 6dd0a0f297cafb404333d6280a5344bcb7f3bee6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 MosaicML. All Rights Reserved.
from __future__ import annotations
import abc
from typing import Any, Optional, Tuple
import torch
from torch import Tensor
from torchmetrics.classification.accuracy import Accuracy
from torchmetrics.collections import MetricCollection
from composer.core.types import ... | 33.364341 | 91 | 0.62802 |
4a0be43146c06dad6851e21b74dd068eba85ffb6 | 872 | py | Python | bnw/core/ensure_indexes.py | l29ah/bnw | d03db025e12c96de42c9a7a4ede329d7c9d216c5 | [
"BSD-2-Clause"
] | 23 | 2015-01-14T13:22:37.000Z | 2022-01-11T11:38:43.000Z | bnw/core/ensure_indexes.py | l29ah/bnw | d03db025e12c96de42c9a7a4ede329d7c9d216c5 | [
"BSD-2-Clause"
] | 31 | 2015-01-27T19:57:45.000Z | 2018-10-04T22:35:22.000Z | bnw/core/ensure_indexes.py | l29ah/bnw | d03db025e12c96de42c9a7a4ede329d7c9d216c5 | [
"BSD-2-Clause"
] | 11 | 2015-01-02T10:29:14.000Z | 2018-06-28T13:09:53.000Z | #!/usr/bin/env python
from twisted.internet import defer
try:
from bnw.core import bnw_objects as objs
except ImportError:
pass
@defer.inlineCallbacks
def index():
for name in dir(objs):
cls = getattr(objs, name)
if (isinstance(cls, type) and issubclass(cls, objs.MongoObject) and
... | 25.647059 | 75 | 0.651376 |
4a0be5bf7e804e4281f17548366e910ea8af14d0 | 25,435 | py | Python | dss/start.py | sethbam9/tutorials | c259636682304cb516e9048ca8df5a3ab92c62cc | [
"MIT"
] | 2 | 2019-07-17T18:51:26.000Z | 2019-07-24T19:45:23.000Z | dss/start.py | sethbam9/tutorials | c259636682304cb516e9048ca8df5a3ab92c62cc | [
"MIT"
] | 3 | 2019-01-16T10:56:50.000Z | 2020-11-16T16:30:48.000Z | dss/start.py | sethbam9/tutorials | c259636682304cb516e9048ca8df5a3ab92c62cc | [
"MIT"
] | 2 | 2020-12-17T15:41:33.000Z | 2021-11-03T18:23:07.000Z | # ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.5'
# jupytext_version: 1.11.4
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# <img align="right" src="images/tf.png" width="128"/>... | 30.279762 | 178 | 0.681148 |
4a0be62f614c813c00d241ee06ea2b5b1bb63372 | 23,818 | py | Python | nltk/app/concordance_app.py | FGDBTKD/nltk | 384e46e82789c7f47a7fb521ef976f82c3c4c3fb | [
"Apache-2.0"
] | null | null | null | nltk/app/concordance_app.py | FGDBTKD/nltk | 384e46e82789c7f47a7fb521ef976f82c3c4c3fb | [
"Apache-2.0"
] | null | null | null | nltk/app/concordance_app.py | FGDBTKD/nltk | 384e46e82789c7f47a7fb521ef976f82c3c4c3fb | [
"Apache-2.0"
] | 1 | 2019-10-18T08:58:45.000Z | 2019-10-18T08:58:45.000Z | # Natural Language Toolkit: Concordance Application
#
# Copyright (C) 2001-2018 NLTK Project
# Author: Sumukh Ghodke <sghodke@csse.unimelb.edu.au>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
import re
import threading
from six.moves import queue as q
from six.moves.tkinter_font import Font
fr... | 41.933099 | 162 | 0.59665 |
4a0be728959dabc4e4bf55fda0130ee9d850cf89 | 574 | py | Python | chapter 04/timerclass.py | bpbpublications/Python-Data-Persistence | 444cd44b2853c05a84e59e85d4f705ef74395204 | [
"MIT"
] | 6 | 2020-08-16T12:55:01.000Z | 2022-03-08T13:06:23.000Z | chapter 04/timerclass.py | bpbpublications/Python-Data-Persistence | 444cd44b2853c05a84e59e85d4f705ef74395204 | [
"MIT"
] | null | null | null | chapter 04/timerclass.py | bpbpublications/Python-Data-Persistence | 444cd44b2853c05a84e59e85d4f705ef74395204 | [
"MIT"
] | 1 | 2020-08-16T12:57:39.000Z | 2020-08-16T12:57:39.000Z | #timerclass.py
#4.42
class timer:
def __init__(self, hr=None, min=None):
self.hrs=hr
self.mins=min
def __add__(self, arg):
temp=timer()
temp.hrs=self.hrs+arg.hrs
temp.mins=self.mins+arg.mins
if temp.mins>=60:... | 31.888889 | 72 | 0.461672 |
4a0be85adfbd0c0a17a00408ed2cf36f205493aa | 7,610 | py | Python | src/practice task1/practicedemo.py | cjshearer/project-athena | 3394da6cd6dbe1c1c2b84f0a2f58c5168c4c6775 | [
"MIT"
] | null | null | null | src/practice task1/practicedemo.py | cjshearer/project-athena | 3394da6cd6dbe1c1c2b84f0a2f58c5168c4c6775 | [
"MIT"
] | 2 | 2020-10-20T18:24:11.000Z | 2020-10-20T18:25:53.000Z | src/practice task1/practicedemo.py | cjshearer/project-athena | 3394da6cd6dbe1c1c2b84f0a2f58c5168c4c6775 | [
"MIT"
] | null | null | null | import os
from utils.file import load_from_json
from utils.model import load_lenet
import numpy as np
from utils.model import load_pool
from utils.metrics import error_rate, get_corrections
from models.athena import Ensemble, ENSEMBLE_STRATEGY
def generate_ae(model, data, labels, attack_configs, save=False, output_d... | 41.135135 | 100 | 0.651774 |
4a0beb6171e24f2d7cc390d895a2d608519b5f20 | 9,650 | py | Python | ros2_ws/src/algorithms/state_estimation/state_estimation_3d/state_estimation_3d/ekf_node.py | FastSense/rosbot-ros2 | c2d274ce179534fec5b2786a6f96b6d638019ac4 | [
"MIT"
] | null | null | null | ros2_ws/src/algorithms/state_estimation/state_estimation_3d/state_estimation_3d/ekf_node.py | FastSense/rosbot-ros2 | c2d274ce179534fec5b2786a6f96b6d638019ac4 | [
"MIT"
] | 2 | 2021-07-05T14:50:09.000Z | 2021-09-14T15:21:11.000Z | ros2_ws/src/algorithms/state_estimation/state_estimation_3d/state_estimation_3d/ekf_node.py | FastSense/metalbot | 063c897a16129d9aa88c2c7c52bdf6547af894e4 | [
"MIT"
] | null | null | null | import cv2
import nnio
import numpy as np
from scipy.spatial.transform import Rotation
from argparse import Namespace
import rclpy
from rclpy.node import Node
from sensor_msgs.msg import Image, Imu, CameraInfo
from nav_msgs.msg import Odometry
from cv_bridge import CvBridge
import tf2_ros
from .spacekf import SpaceKF... | 33.506944 | 111 | 0.600725 |
4a0bed6d6c40d1b3a7815043b57b58b86a6a4956 | 4,683 | py | Python | script.module.tknorris.shared/lib/cache.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2019-03-05T09:37:15.000Z | 2019-03-05T09:37:15.000Z | script.module.tknorris.shared/lib/cache.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | null | null | null | script.module.tknorris.shared/lib/cache.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2021-11-05T20:48:09.000Z | 2021-11-05T20:48:09.000Z | """
tknorris shared module
Copyright (C) 2016 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | 39.686441 | 170 | 0.630579 |
4a0bee6fe44838b7852e55fef1bfe2763b86baf9 | 19,941 | py | Python | networking_bigswitch/tests/unit/bigswitch/test_restproxy_plugin.py | WeifanFu-bsn/networking-bigswitch | 6d66edbc4f9836e34f3588449775af983516092f | [
"Apache-2.0"
] | null | null | null | networking_bigswitch/tests/unit/bigswitch/test_restproxy_plugin.py | WeifanFu-bsn/networking-bigswitch | 6d66edbc4f9836e34f3588449775af983516092f | [
"Apache-2.0"
] | null | null | null | networking_bigswitch/tests/unit/bigswitch/test_restproxy_plugin.py | WeifanFu-bsn/networking-bigswitch | 6d66edbc4f9836e34f3588449775af983516092f | [
"Apache-2.0"
] | null | null | null | # Copyright 2012 Big Switch Networks, 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 by appl... | 40.284848 | 79 | 0.600572 |
4a0bef5058b2e33bed0617ede5343ba341899a00 | 5,036 | py | Python | wifipumpkin3/core/controllers/proxycontroller.py | oza6ut0ne/wifipumpkin3 | 7aef4d2a67e0b3b4618f27af4617c5fb8e3b9cc6 | [
"Apache-2.0"
] | 1 | 2022-01-17T11:38:59.000Z | 2022-01-17T11:38:59.000Z | wifipumpkin3/core/controllers/proxycontroller.py | oza6ut0ne/wifipumpkin3 | 7aef4d2a67e0b3b4618f27af4617c5fb8e3b9cc6 | [
"Apache-2.0"
] | null | null | null | wifipumpkin3/core/controllers/proxycontroller.py | oza6ut0ne/wifipumpkin3 | 7aef4d2a67e0b3b4618f27af4617c5fb8e3b9cc6 | [
"Apache-2.0"
] | null | null | null | from wifipumpkin3.core.config.globalimport import *
from wifipumpkin3.core.common.uimodel import *
from wifipumpkin3.core.servers.proxy import *
from wifipumpkin3.core.utility.component import ControllerBlueprint
import copy
# This file is part of the wifipumpkin3 Open Source Project.
# wifipumpkin3 is licensed under t... | 30.337349 | 85 | 0.583002 |
4a0bef5fd459939aaf5645a766cb22c75502c7fc | 5,069 | py | Python | async_covid/worldometers/covid.py | ahnaf-zamil/async-covid | 0789ce8712b429fc2a226444e33c4fe03be91a8a | [
"MIT"
] | 2 | 2020-11-03T06:46:57.000Z | 2020-11-18T12:36:01.000Z | async_covid/worldometers/covid.py | ahnaf-zamil/async-covid | 0789ce8712b429fc2a226444e33c4fe03be91a8a | [
"MIT"
] | null | null | null | async_covid/worldometers/covid.py | ahnaf-zamil/async-covid | 0789ce8712b429fc2a226444e33c4fe03be91a8a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""" Covid coronavirus statistics based on worldometers.info statistics
"""
import urllib.request
from bs4 import BeautifulSoup
from async_covid.worldometers.models import CovidModel
from async_covid import config
from pydantic import ValidationError
URL = "https://www.worldometers.info/coronav... | 32.703226 | 181 | 0.584928 |
4a0befeda38f253de81da5920df40d7dd14e5b30 | 12,008 | py | Python | IRIS_data_download/IRIS_download_support/obspy/core/util/decorator.py | earthinversion/Fnet_IRIS_data_automated_download | 09a6e0c992662feac95744935e038d1c68539fa1 | [
"MIT"
] | 2 | 2020-03-05T01:03:01.000Z | 2020-12-17T05:04:07.000Z | IRIS_data_download/IRIS_download_support/obspy/core/util/decorator.py | earthinversion/Fnet_IRIS_data_automated_download | 09a6e0c992662feac95744935e038d1c68539fa1 | [
"MIT"
] | 4 | 2021-03-31T19:25:55.000Z | 2021-12-13T20:32:46.000Z | IRIS_data_download/IRIS_download_support/obspy/core/util/decorator.py | earthinversion/Fnet_IRIS_data_automated_download | 09a6e0c992662feac95744935e038d1c68539fa1 | [
"MIT"
] | 2 | 2020-09-08T19:33:40.000Z | 2021-04-05T09:47:50.000Z | # -*- coding: utf-8 -*-
"""
Decorator used in ObsPy.
:copyright:
The ObsPy Development Team (devs@obspy.org)
:license:
GNU Lesser General Public License, Version 3
(https://www.gnu.org/copyleft/lesser.html)
"""
from __future__ import (absolute_import, division, print_function,
unico... | 35.111111 | 79 | 0.564041 |
4a0bf04dc887e96bba8f19bb8b50d76d895b628d | 3,872 | py | Python | pytext/metrics/tests/basic_metrics_test.py | debowin/pytext | 91126bb34bd689f3513f25ca0d356ad374e004ab | [
"BSD-3-Clause"
] | 3 | 2019-10-19T11:16:12.000Z | 2021-11-17T11:09:00.000Z | pytext/metrics/tests/basic_metrics_test.py | debowin/pytext | 91126bb34bd689f3513f25ca0d356ad374e004ab | [
"BSD-3-Clause"
] | null | null | null | pytext/metrics/tests/basic_metrics_test.py | debowin/pytext | 91126bb34bd689f3513f25ca0d356ad374e004ab | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
from pytext.metrics import (
ClassificationMetrics,
LabelPrediction,
MacroPRF1Metrics,
MacroPRF1Scores,
PRF1Scores,
SoftClassificationMetrics,
compute_classification_metrics,
compute_soft_metri... | 34.882883 | 88 | 0.522211 |
4a0bf0701a37851c1e9bbdf93829798596618309 | 15,134 | py | Python | rama/keysyms.py | tadfisher/rama | 6dcb0c41fa1c52fa43f08f1f1777e741db3b372e | [
"MIT"
] | 2 | 2015-08-29T01:07:20.000Z | 2015-11-15T19:12:42.000Z | rama/keysyms.py | tadfisher/rama | 6dcb0c41fa1c52fa43f08f1f1777e741db3b372e | [
"MIT"
] | null | null | null | rama/keysyms.py | tadfisher/rama | 6dcb0c41fa1c52fa43f08f1f1777e741db3b372e | [
"MIT"
] | 2 | 2018-08-07T11:27:19.000Z | 2021-01-12T15:20:20.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2008-2009, samurai-x.org
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# noti... | 48.197452 | 95 | 0.624488 |
4a0bf0e1dda2b1bac0c73e90c318f4e0125f0378 | 985 | py | Python | examples/m_reader.py | JoaoGFarias/locust-plugins | c3cac416d75466e899b69416915509c0e1f8d08d | [
"Apache-2.0"
] | null | null | null | examples/m_reader.py | JoaoGFarias/locust-plugins | c3cac416d75466e899b69416915509c0e1f8d08d | [
"Apache-2.0"
] | null | null | null | examples/m_reader.py | JoaoGFarias/locust-plugins | c3cac416d75466e899b69416915509c0e1f8d08d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import locust_plugins.utils
locust_plugins.utils.gevent_debugger_patch()
import os
from locust_plugins.mongoreader import MongoReader
from locust_plugins.listeners import PrintListener
from locust import HttpLocust, task, TaskSet
from locust.wait_time import constant_pacing
reader = MongoReade... | 25.25641 | 64 | 0.723858 |
4a0bf12945f0289299ea0762fbe278d006bc617d | 3,664 | py | Python | ClientA.py | DashanGao/Secret-sharing-based_2PC_vertical_fed_learning | a7c3eeb697d839dbc6d11ddccdd57197450a47bc | [
"MIT"
] | 10 | 2020-06-19T03:29:33.000Z | 2021-12-05T12:01:53.000Z | ClientA.py | GaoDashan1/Secret-sharing-based_2PC_vertical_fed_learning | a7c3eeb697d839dbc6d11ddccdd57197450a47bc | [
"MIT"
] | null | null | null | ClientA.py | GaoDashan1/Secret-sharing-based_2PC_vertical_fed_learning | a7c3eeb697d839dbc6d11ddccdd57197450a47bc | [
"MIT"
] | 1 | 2021-12-31T14:57:54.000Z | 2021-12-31T14:57:54.000Z | from Client import Client
import numpy as np
class ClientA(Client):
def __init__(self, name, X, config):
super().__init__(config, config['ADDR_A'])
self.name = name
self.X = X
self.weights = np.zeros(X.shape[1]) # np.random.rand(X.shape[1]) * 2 - 1
self.estim_e =... | 38.166667 | 114 | 0.525109 |
4a0bf30a96ec1d6bdde51ef47f0c1289303e0763 | 11,595 | py | Python | src/esdl_helper.py | ESDLMapEditorESSIM/esdl-mapeditor | c17090e19de8ff3a0cc552f347639bac67840d22 | [
"Apache-2.0"
] | null | null | null | src/esdl_helper.py | ESDLMapEditorESSIM/esdl-mapeditor | c17090e19de8ff3a0cc552f347639bac67840d22 | [
"Apache-2.0"
] | 14 | 2020-09-30T21:16:46.000Z | 2021-11-08T18:54:34.000Z | src/esdl_helper.py | ESDLMapEditorESSIM/esdl-mapeditor | c17090e19de8ff3a0cc552f347639bac67840d22 | [
"Apache-2.0"
] | 1 | 2020-09-17T12:48:57.000Z | 2020-09-17T12:48:57.000Z | # This work is based on original code developed and copyrighted by TNO 2020.
# Subsequent contributions are licensed to you by the developers of such code and are
# made available to the Project under one or several contributor license agreements.
#
# This work is licensed to you under the Apache License, Version 2... | 41.55914 | 156 | 0.594653 |
4a0bf3c57bfec1a89a82d7e6d7f9df5761be83d7 | 9,365 | py | Python | openstack_dashboard/test/settings.py | NunoEdgarGFlowHub/horizon | 73a0bbd43ea78ac5337f7d00977ec5f32452067e | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/test/settings.py | NunoEdgarGFlowHub/horizon | 73a0bbd43ea78ac5337f7d00977ec5f32452067e | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/test/settings.py | NunoEdgarGFlowHub/horizon | 73a0bbd43ea78ac5337f7d00977ec5f32452067e | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 28.465046 | 78 | 0.639829 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.