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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f7d6b0b60ed44f9c5d0f9ba44693579cdcaabe30 | 2,820 | py | Python | python-midonetclient/src/midonetclient/tracerequest.py | gdecandia/midonet-1 | 6a8e2ec3941061716fbf13c99d2133c7a3b5d3aa | [
"Apache-2.0"
] | null | null | null | python-midonetclient/src/midonetclient/tracerequest.py | gdecandia/midonet-1 | 6a8e2ec3941061716fbf13c99d2133c7a3b5d3aa | [
"Apache-2.0"
] | null | null | null | python-midonetclient/src/midonetclient/tracerequest.py | gdecandia/midonet-1 | 6a8e2ec3941061716fbf13c99d2133c7a3b5d3aa | [
"Apache-2.0"
] | 1 | 2018-10-25T05:52:05.000Z | 2018-10-25T05:52:05.000Z | # Copyright (c) 2015 Midokura SARL, All Rights Reserved.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 28.77551 | 75 | 0.642553 |
f7d6bfb7264852ec3ec41c2c1fb6c4e2c6d93dba | 4,906 | py | Python | ThirdParty/AutobahnPython/autobahn/utf8validator.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 1 | 2021-10-13T01:57:14.000Z | 2021-10-13T01:57:14.000Z | ThirdParty/AutobahnPython/autobahn/utf8validator.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | null | null | null | ThirdParty/AutobahnPython/autobahn/utf8validator.py | OpenGeoscience/VTK | a373e975b9284a022f43a062ebf5042bb17b4e44 | [
"BSD-3-Clause"
] | 5 | 2015-10-09T04:12:29.000Z | 2021-12-15T16:57:11.000Z | ###############################################################################
##
## Copyright 2011-2013 Tavendo GmbH
##
## Note:
##
## This code is a Python implementation of the algorithm
##
## "Flexible and Economical UTF-8 Decoder"
##
## by Bjoern Hoehrmann
##
## bjoern@hoehrmann.de
## h... | 40.545455 | 127 | 0.584386 |
f7d6c212d88584aae150fc44c25cf3edf4a9488c | 663 | py | Python | apps/contacts/views.py | tuanquanghpvn/flask-intro | 4dbc6bfbbdee13bc601b7ba8f10ede3635a2cfaf | [
"MIT"
] | null | null | null | apps/contacts/views.py | tuanquanghpvn/flask-intro | 4dbc6bfbbdee13bc601b7ba8f10ede3635a2cfaf | [
"MIT"
] | null | null | null | apps/contacts/views.py | tuanquanghpvn/flask-intro | 4dbc6bfbbdee13bc601b7ba8f10ede3635a2cfaf | [
"MIT"
] | null | null | null | from flask import render_template, request
from flask.ext.classy import FlaskView
from . import contacts_bluesrprints
class ContactView(FlaskView):
route_base = '/'
def get_context_data(self):
context = {
'info': {
'title': 'Contact - Clean Blog',
'head': '... | 27.625 | 65 | 0.589744 |
f7d6e907513b8a13cdd7580da5a75d13e289a1cd | 2,311 | py | Python | tests/integration/test_widgets2.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 2 | 2017-11-08T19:55:57.000Z | 2018-12-21T12:41:41.000Z | tests/integration/test_widgets2.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | null | null | null | tests/integration/test_widgets2.py | pauleveritt/kaybee | a00a718aaaa23b2d12db30dfacb6b2b6ec84459c | [
"Apache-2.0"
] | 1 | 2018-10-13T08:59:29.000Z | 2018-10-13T08:59:29.000Z | import pytest
pytestmark = pytest.mark.sphinx('html', testroot='widgets2')
@pytest.mark.parametrize('page', ['index.html', ], indirect=True)
class TestWidgets2:
def test_index(self, page):
# The genericpage doesn't have an acquire for template, so just use
h1 = page.find('h1').contents[0].strip(... | 36.109375 | 77 | 0.624838 |
f7d6e9d8c277ee2c9a04fa5079e0a7793932b761 | 16,786 | py | Python | models/new_transformer.py | Khoale1096/stupidNMT | 894536c16dc7ff958aa5571828a89ecabfcb72d7 | [
"BSD-3-Clause"
] | 31 | 2020-05-05T21:56:45.000Z | 2022-02-24T19:08:19.000Z | models/new_transformer.py | Khoale1096/stupidNMT | 894536c16dc7ff958aa5571828a89ecabfcb72d7 | [
"BSD-3-Clause"
] | 1 | 2020-09-22T05:18:04.000Z | 2020-09-22T05:18:04.000Z | models/new_transformer.py | Khoale1096/stupidNMT | 894536c16dc7ff958aa5571828a89ecabfcb72d7 | [
"BSD-3-Clause"
] | 5 | 2020-05-06T06:04:40.000Z | 2020-12-29T14:09:31.000Z | '''
A module which implements the basic Transformer
'''
import uuid
import threading
import pdb
import torch
from torch import nn
from models.new_attention import NewAttention
from models.attention import MultiHeadedAttention
from models.embeddings import PositionEmbedding, TokenEmbedding
from models.utils import Labe... | 37.891648 | 113 | 0.587275 |
f7d707be9c9e2286652b8a0677be55e1aa27a13a | 3,890 | py | Python | .leetcode/133.clone-graph.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/133.clone-graph.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/133.clone-graph.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=133 lang=python3
#
# [133] Clone Graph
#
# https://leetcode.com/problems/clone-graph/description/
#
# algorithms
# Medium (40.59%)
# Likes: 3134
# Dislikes: 1731
# Total Accepted: 477.8K
# Total Submissions: 1.2M
# Testcase Example: '[[2,4],[1,3],[2,4],[1,3]]'
#
# Given a reference of a nod... | 23.154762 | 79 | 0.625964 |
f7d70cf02feeef2ae4a7e4cb4bf0560c24e4d8dc | 10,872 | py | Python | tf_agents/environments/tf_py_environment_test.py | wookayin/tensorflow-agents | ae3751dfeed52422a350227047648dd82297960b | [
"Apache-2.0"
] | 2 | 2018-12-20T01:49:33.000Z | 2019-12-09T13:17:05.000Z | tf_agents/environments/tf_py_environment_test.py | kuanfang/agents | a0f25a4b44d4fc844c9b804bab60af2167f8d2bb | [
"Apache-2.0"
] | null | null | null | tf_agents/environments/tf_py_environment_test.py | kuanfang/agents | a0f25a4b44d4fc844c9b804bab60af2167f8d2bb | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The TF-Agents Authors.
#
# 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... | 37.619377 | 80 | 0.732616 |
f7d76fa37dfe3436dc07ef9306b610bbbf2d184d | 2,097 | py | Python | pi/button_listener.py | n0mn0m/bot_commander | d16358529bbac27e34334278b35448adf6090377 | [
"MIT"
] | 1 | 2020-06-22T17:51:03.000Z | 2020-06-22T17:51:03.000Z | pi/button_listener.py | n0mn0m/bot_commander | d16358529bbac27e34334278b35448adf6090377 | [
"MIT"
] | null | null | null | pi/button_listener.py | n0mn0m/bot_commander | d16358529bbac27e34334278b35448adf6090377 | [
"MIT"
] | null | null | null | import time
import busio
import logging
from digitalio import DigitalInOut, Direction, Pull
import board
import adafruit_ssd1306
import adafruit_rfm9x
LOG_FORMAT = "%(asctime)s:%(levelname)s:%(message)s"
logging.basicConfig(
filename="/home/pi/logs/button.log",
level=logging.INFO,
format=LOG_FORMAT,
da... | 27.96 | 78 | 0.653314 |
f7d77c1c60f4ae0ad977ded4dae1683e06640f0a | 7,243 | py | Python | source/api/controlplane/profile/infrastructure/lambda/ProbeVideo/lambda_function.py | awslabs/aws-media-replay-engine | 2c217eff42f8e2c56b43e2ecf593f5aaa92c5451 | [
"Apache-2.0"
] | 22 | 2021-11-24T01:23:07.000Z | 2022-03-26T23:24:46.000Z | source/api/controlplane/profile/infrastructure/lambda/ProbeVideo/lambda_function.py | awslabs/aws-media-replay-engine | 2c217eff42f8e2c56b43e2ecf593f5aaa92c5451 | [
"Apache-2.0"
] | null | null | null | source/api/controlplane/profile/infrastructure/lambda/ProbeVideo/lambda_function.py | awslabs/aws-media-replay-engine | 2c217eff42f8e2c56b43e2ecf593f5aaa92c5451 | [
"Apache-2.0"
] | 3 | 2021-12-10T09:42:51.000Z | 2022-02-16T02:22:50.000Z | # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
##############################################################################
#
# PURPOSE:
# Probe the HLS video segment (.ts) file outputted by MediaLive to extract
# metadata about the video segment an... | 40.238889 | 141 | 0.589811 |
f7d79492111107d3200afd00f102fa956c6b0a67 | 1,830 | py | Python | venv/Lib/site-packages/pyrogram/raw/base/contact.py | D1ne2021/jjhhhjj | a090da30983b3ef276dfe4cef2ded4526f36002a | [
"MIT"
] | 5 | 2021-09-11T22:01:15.000Z | 2022-03-16T21:33:42.000Z | backend/pyrogram/raw/base/contact.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | null | null | null | backend/pyrogram/raw/base/contact.py | iamatlasss/social-media-analyzer | 429d1d2bbd8bfce80c50c5f8edda58f87ace668d | [
"Apache-2.0"
] | 3 | 2022-01-18T11:06:22.000Z | 2022-02-26T13:39:28.000Z | # 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... | 36.6 | 87 | 0.633333 |
f7d7b089b19f8360e127b2dbed9a484e92d1c8a7 | 2,581 | py | Python | src/part5.py | mremilien/ICP | 671c600acc75a4126216cfc11c67d44ccfac037f | [
"MIT"
] | 3 | 2021-02-02T04:11:45.000Z | 2021-05-04T17:38:40.000Z | src/part5.py | mremilien/ICP | 671c600acc75a4126216cfc11c67d44ccfac037f | [
"MIT"
] | null | null | null | src/part5.py | mremilien/ICP | 671c600acc75a4126216cfc11c67d44ccfac037f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""this is for the part 5 of CourseWork 1."""
__author__ = 'Chengkun Li'
import sys
import os
import open3d as o3d
import numpy as np
import trimesh
import matplotlib
import matplotlib.pyplot as plt
import tools.baseICP
import tools.tools
# check whether the data folder... | 31.096386 | 102 | 0.640062 |
f7d7b138ba6c0bffc9333e6eedadfed58cbef40e | 618 | py | Python | rig/reset_pivot.py | Zeplaro/Maya | d1fb1c6c14984d5d4dbf6a8a422026d935256729 | [
"MIT"
] | null | null | null | rig/reset_pivot.py | Zeplaro/Maya | d1fb1c6c14984d5d4dbf6a8a422026d935256729 | [
"MIT"
] | null | null | null | rig/reset_pivot.py | Zeplaro/Maya | d1fb1c6c14984d5d4dbf6a8a422026d935256729 | [
"MIT"
] | null | null | null | import maya.cmds as mc
def reset_pivot(*objs):
if not objs:
objs = mc.ls(sl=True, fl=True)
if not objs:
mc.warning('Select at least one object')
return
for obj in objs:
pivot = mc.group(em=True, w=True, n='{}Pivot#'.format(obj))
mc.delete(mc.parentConstraint(obj, ... | 24.72 | 67 | 0.563107 |
f7d7c356724f7c0e264cbc55c92886426dbabb54 | 1,175 | py | Python | models/optimizers/sgd.py | mwong009/iclv_rbm | 9fdfad803b53229a2eb42bc2c1a778e9ce1b83a5 | [
"MIT"
] | 1 | 2020-07-16T12:30:02.000Z | 2020-07-16T12:30:02.000Z | models/optimizers/sgd.py | mwong009/iclv_rbm | 9fdfad803b53229a2eb42bc2c1a778e9ce1b83a5 | [
"MIT"
] | null | null | null | models/optimizers/sgd.py | mwong009/iclv_rbm | 9fdfad803b53229a2eb42bc2c1a778e9ce1b83a5 | [
"MIT"
] | 1 | 2020-01-02T15:28:42.000Z | 2020-01-02T15:28:42.000Z | import theano.tensor as T
import numpy as np
import theano
from theano import shared
class sgd(object):
""" Stochastic Gradient Descent (SGD)
Generates update expressions of the form:
param := param - learning_rate * gradient
"""
def __init__(self, params, masks=None):
self.masks = masks
... | 29.375 | 69 | 0.593191 |
f7d7d085c974fa217ed30708723cb1b887034ca0 | 9,157 | py | Python | tensorflow/python/data/kernel_tests/list_files_dataset_op_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/python/data/kernel_tests/list_files_dataset_op_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/python/data/kernel_tests/list_files_dataset_op_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # 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... | 37.37551 | 80 | 0.693349 |
f7d7d5d6e7bec84297c0f40330483c3815c79375 | 500 | py | Python | brownie/network/__init__.py | acolytec3/brownie | e00e1f26f5b05e963fe50ffe198634c9e8876589 | [
"MIT"
] | null | null | null | brownie/network/__init__.py | acolytec3/brownie | e00e1f26f5b05e963fe50ffe198634c9e8876589 | [
"MIT"
] | null | null | null | brownie/network/__init__.py | acolytec3/brownie | e00e1f26f5b05e963fe50ffe198634c9e8876589 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from .main import ( # NOQA 401
connect,
disconnect,
show_active,
is_connected,
gas_limit,
gas_price,
)
from .account import Accounts
from .state import TxHistory
from .rpc import Rpc
from .web3 import Web3
__all__ = ["accounts", "history", "rpc", "web3"]
__console_dir__ = [... | 16.666667 | 48 | 0.646 |
f7d7ed557e75f857256b0313dda4f44d0706802c | 15 | py | Python | btd6_memory_info/generated/System/Net/net.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/System/Net/net.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/System/Net/net.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class Net: pass | 15 | 15 | 0.8 |
f7d851b4478981d23fe81c8f230ceffa9a90120b | 4,845 | py | Python | sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operation_statuses_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operation_statuses_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/media/azure-mgmt-media/azure/mgmt/media/aio/operations/_operation_statuses_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 ... | 43.258929 | 236 | 0.695356 |
f7d8622badeb7b22a47c399b27d04beef698c53c | 422 | py | Python | tests/test_html_tags/test_cite_tag.py | bharadwajyarlagadda/korona | ee4662b6a29907495e31ed2581dc5484bb03eadc | [
"MIT"
] | 2 | 2016-10-11T03:57:30.000Z | 2018-01-19T20:13:47.000Z | tests/test_html_tags/test_cite_tag.py | iskodirajga/korona | ee4662b6a29907495e31ed2581dc5484bb03eadc | [
"MIT"
] | 16 | 2016-08-19T04:08:45.000Z | 2016-09-27T03:26:39.000Z | tests/test_html_tags/test_cite_tag.py | iskodirajga/korona | ee4662b6a29907495e31ed2581dc5484bb03eadc | [
"MIT"
] | 1 | 2016-10-11T03:57:33.000Z | 2016-10-11T03:57:33.000Z | # -*- coding: utf-8 -*-
from ..fixtures import parametrize
from korona.html.tags import Cite
from korona.templates.html.tags import cite
@parametrize('attributes', [
({'text': 'abcd'}),
])
def test_construct_cite_tag(attributes):
"""Test for validating whether the citation tag is constructed correctly or
... | 23.444444 | 79 | 0.694313 |
f7d865a138443defb9b1dbeb8a16180ecb1c46db | 2,742 | py | Python | Common/IO/DirInfo/DirInfo.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 2 | 2020-03-04T11:18:38.000Z | 2020-05-10T15:36:42.000Z | Common/IO/DirInfo/DirInfo.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 6 | 2020-03-30T16:42:47.000Z | 2021-12-13T20:37:21.000Z | Common/IO/DirInfo/DirInfo.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 1 | 2020-04-14T11:26:16.000Z | 2020-04-14T11:26:16.000Z | #from Common.IO.DirInfo.IDirInfo import IDirInfo
from abc import *
from pathlib import Path
import os
import datetime
class DirInfo(ABC):
__length: int = 0
__path_orig: str = ''
__path_abs: str = ''
__dir_name: str = ''
__dir_path: str = ''
__dir_root: str = ''
__name: str = ''
__is_ab... | 25.626168 | 82 | 0.634209 |
f7d8839093326c72202460c43c754eb26c7c6544 | 307 | py | Python | timer.py | codePerfectPlus/Awesome-Coding-Problems | a5b9b32f89553f48821cde6ae71369fae715be3b | [
"MIT"
] | 3 | 2020-10-20T20:48:40.000Z | 2021-12-02T14:08:16.000Z | timer.py | Py-Contributors/Awesome-Coding-Problems | a5b9b32f89553f48821cde6ae71369fae715be3b | [
"MIT"
] | null | null | null | timer.py | Py-Contributors/Awesome-Coding-Problems | a5b9b32f89553f48821cde6ae71369fae715be3b | [
"MIT"
] | null | null | null | import time
# decorator to time the function
def timer(func):
def wrapper(*args, **kwargs):
start = time.perf_counter()
result = func(*args, **kwargs)
end = time.perf_counter()
print(f'{func.__name__} took {end - start} seconds')
return result
return wrapper | 27.909091 | 60 | 0.618893 |
f7d8bac3e8a2e7c1667054fc8fb44efcadd41c9f | 593 | py | Python | LeetCode/easy - Array/1018. Binary Prefix Divisible By 5/solution.py | vincent507cpu/Comprehensive-Algorithm-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | 4 | 2020-06-26T00:45:53.000Z | 2021-04-19T12:23:32.000Z | LeetCode/easy - Array/1018. Binary Prefix Divisible By 5/solution.py | vincent507cpu/LeetCode-Comprehensive-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | null | null | null | LeetCode/easy - Array/1018. Binary Prefix Divisible By 5/solution.py | vincent507cpu/LeetCode-Comprehensive-Solution | 04e01e49622457f09af2e1133954f043c0c92cb9 | [
"MIT"
] | null | null | null | class Solution:
# my solution
def prefixesDivBy5(self, A: List[int]) -> List[bool]:
res = []
tmp = 0
for n in A:
tmp = tmp * 2 + n
res.append(tmp % 5 == 0)
return res
# faster solution
# https://leetcode.com/problems/bina... | 28.238095 | 107 | 0.475548 |
f7d8c998e9e083fee13e820a913c80688c2ac6e1 | 2,536 | py | Python | lib/multiviews/totalcapture_body.py | CHUNYUWANG/imu-human-pose-pytorch | f4813336571789f46eabdfb520e7ed5b20ac04ea | [
"MIT"
] | 72 | 2020-03-26T13:26:39.000Z | 2022-03-16T08:45:34.000Z | lib/multiviews/totalcapture_body.py | zhezh/imu-human-pose-pytorch | f4813336571789f46eabdfb520e7ed5b20ac04ea | [
"MIT"
] | 10 | 2020-04-05T07:17:49.000Z | 2022-03-04T05:32:12.000Z | lib/multiviews/totalcapture_body.py | CHUNYUWANG/imu-human-pose-pytorch | f4813336571789f46eabdfb520e7ed5b20ac04ea | [
"MIT"
] | 13 | 2020-04-12T20:33:38.000Z | 2022-02-17T11:23:13.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
import numpy as np
class HumanBody(object):
def __init__(self):
self.skeleton = self.get_skeleton()
self.skeleton_sorted_by_level = self.sort_skeleton_by_level(
self.skeleton)
self.imu_edges = self.get_i... | 32.935065 | 100 | 0.516167 |
f7d8ca2cf589f41082946f070143ed6bc1764cb7 | 1,512 | py | Python | Courses/Udacity/CS101/Lesson_2_Problem_Set_(Optional_2)/01-Superhero_nuisance/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2019-02-13T12:02:26.000Z | 2019-02-13T12:02:26.000Z | Courses/Udacity/CS101/Lesson_2_Problem_Set_(Optional_2)/01-Superhero_nuisance/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 1 | 2018-08-13T15:58:33.000Z | 2018-08-13T15:58:33.000Z | Courses/Udacity/CS101/Lesson_2_Problem_Set_(Optional_2)/01-Superhero_nuisance/supplied/studentMain.py | leparrav/Playground | dcb90a2dd2bc1867511cfe621eb21248a60e357f | [
"Unlicense"
] | 2 | 2017-08-10T20:01:29.000Z | 2021-07-01T08:39:13.000Z | # By Sam the Great from forums
# That freaking superhero has been frequenting Udacity
# as his favorite boss battle fight stage. The 'Udacity'
# banner keeps breaking, and money is being wasted on
# repairs. This time, we need you to proceduralize the
# fixing process by building a machine to automatically
# search thr... | 40.864865 | 118 | 0.698413 |
f7d8d26b2edb7a7270df52a7552304841be28d25 | 574 | py | Python | SCRAPE/Lib/site-packages/twisted/trial/_dist/workercommands.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 4,612 | 2015-01-01T12:57:23.000Z | 2022-03-30T01:08:23.000Z | SCRAPE/Lib/site-packages/twisted/trial/_dist/workercommands.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,243 | 2015-01-23T17:23:59.000Z | 2022-03-28T13:46:17.000Z | SCRAPE/Lib/site-packages/twisted/trial/_dist/workercommands.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1,236 | 2015-01-13T14:41:26.000Z | 2022-03-17T07:12:36.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Commands for telling a worker to load tests or run tests.
@since: 12.3
"""
from twisted.protocols.amp import Boolean, Command, Unicode
NativeString = Unicode
class Run(Command):
"""
Run a test.
"""
arguments = [(b"testCas... | 18.516129 | 60 | 0.646341 |
f7d8d7b6d6bbc7f8a6c1802ec8a9bedc82cb072a | 5,799 | py | Python | compyle/tests/test_ext_module.py | manish364824/compyle | cc97dd0a0e7b12f904b3f1c0f20aa06a41779c61 | [
"BSD-3-Clause"
] | 1 | 2020-11-23T12:13:04.000Z | 2020-11-23T12:13:04.000Z | compyle/tests/test_ext_module.py | manish364824/compyle | cc97dd0a0e7b12f904b3f1c0f20aa06a41779c61 | [
"BSD-3-Clause"
] | null | null | null | compyle/tests/test_ext_module.py | manish364824/compyle | cc97dd0a0e7b12f904b3f1c0f20aa06a41779c61 | [
"BSD-3-Clause"
] | null | null | null | from contextlib import contextmanager
from distutils.sysconfig import get_config_var
from io import open as io_open
import os
from os.path import join, exists
import shutil
import sys
import tempfile
from textwrap import dedent
from multiprocessing import Pool
from unittest import TestCase, main
try:
from unittest... | 29.436548 | 76 | 0.607174 |
f7d8dbc9e89b1af106c2986e91f9a7320685e320 | 981 | py | Python | oscar/lib/python2.7/site-packages/phonenumbers/data/region_GY.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/region_GY.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/phonenumbers/data/region_GY.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | """Auto-generated file, do not edit by hand. GY metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_GY = PhoneMetadata(id='GY', country_code=592, international_prefix='001',
general_desc=PhoneNumberDesc(national_number_pattern='[2-46-9]\\d{6}', possible_length=(7... | 89.181818 | 215 | 0.705403 |
f7d8e9ee9d5ab30be8ea0bd7d7fb2b2a10c34f56 | 2,085 | py | Python | tests/test_dataset.py | RUB-SysSec/WaveFake | d52d51b9ccdb0cec3f484e84b228791f06b955be | [
"MIT"
] | 20 | 2021-11-04T04:29:04.000Z | 2022-03-26T11:36:50.000Z | tests/test_dataset.py | RUB-SysSec/WaveFake | d52d51b9ccdb0cec3f484e84b228791f06b955be | [
"MIT"
] | null | null | null | tests/test_dataset.py | RUB-SysSec/WaveFake | d52d51b9ccdb0cec3f484e84b228791f06b955be | [
"MIT"
] | 3 | 2021-11-06T13:22:40.000Z | 2022-01-30T18:07:20.000Z | """Test cases for datahandling."""
import unittest
import torch
from dfadetect.datasets import AudioDataset
from dfadetect.utils import find_wav_files
from tests.utils import REAL_PATH, load_real, load_special
class TestAudioDataset(unittest.TestCase):
def test_loading_audio(self):
dataset = load_real(... | 25.426829 | 67 | 0.635012 |
f7d8f733a6bd8f4473277680f7cecb2c57a8b1f6 | 1,895 | py | Python | rec.py | hngi/lucidblog_hng_ml_team | 450105fc8c0562056ce08b313777fa8f9f4f2882 | [
"Apache-2.0"
] | null | null | null | rec.py | hngi/lucidblog_hng_ml_team | 450105fc8c0562056ce08b313777fa8f9f4f2882 | [
"Apache-2.0"
] | 2 | 2021-03-31T19:28:51.000Z | 2021-06-02T00:36:03.000Z | rec.py | chidibede/lucidblog_hng_ml_team | 13e261331e5be1c62ae952a23f1b603cdc466e36 | [
"Apache-2.0"
] | 1 | 2019-10-26T19:54:22.000Z | 2019-10-26T19:54:22.000Z | import math
#Class for Popularity based Recommender System model
class popularity_recommender_py():
def __init__(self):
self.train_data = None
self.user_id = None
self.popularity_recommendations = None
def smooth_user_preference(self, x):
return math.log(1 + x, 2)
#Create ... | 41.195652 | 153 | 0.691293 |
f7d9229265d525f12799c5a16b889d220c5c732d | 8,841 | py | Python | scripts/reference_based_layout.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 116 | 2019-11-28T07:54:26.000Z | 2022-03-31T03:20:44.000Z | scripts/reference_based_layout.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 120 | 2019-12-08T21:01:46.000Z | 2022-03-30T04:11:52.000Z | scripts/reference_based_layout.py | AMARTELKE/Pangenome-with-Panaroo | b720debf8616882668d53600038c334393080d9b | [
"MIT"
] | 19 | 2019-12-19T05:34:03.000Z | 2022-03-19T05:54:51.000Z | import networkx as nxvisited
import re
import networkx.classes.function as function
import networkx.algorithms.connectivity.cuts as cuts
import networkx as nx
import pandas as pd
def get_dist(ref_s, ref_t, max_dist):
s = ref_s.split("_")[-1]
t = ref_t.split("_")[-1]
return min(abs(int(s) - int(t)), abs(ab... | 40.186364 | 136 | 0.541907 |
f7d94be6540f4373d1f1a9ff894dc2125e03dcdf | 3,120 | py | Python | swimpool/process.py | agounaris/swimpool | 352466220d50c9ac96eca84b8baea5062fe6b2ab | [
"BSD-3-Clause"
] | null | null | null | swimpool/process.py | agounaris/swimpool | 352466220d50c9ac96eca84b8baea5062fe6b2ab | [
"BSD-3-Clause"
] | 5 | 2017-12-04T09:24:44.000Z | 2017-12-04T09:24:48.000Z | swimpool/process.py | agounaris/swimpool | 352466220d50c9ac96eca84b8baea5062fe6b2ab | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from multiprocessing import Pool
class ResultSet(object):
def __init__(self, function_name, function_result):
"""ResultSet initialization, standarises output
Args:
function_name (string): The name of the function
function_result (list): Results
... | 32.5 | 78 | 0.634295 |
f7d984320553815c22fe82f1669ca32c8439d4e6 | 1,492 | bzl | Python | swift/internal/deps.bzl | gwik/rules_swift | ac4bd887fa85666fb12b395fcf01c227a8a6b603 | [
"Apache-2.0"
] | null | null | null | swift/internal/deps.bzl | gwik/rules_swift | ac4bd887fa85666fb12b395fcf01c227a8a6b603 | [
"Apache-2.0"
] | null | null | null | swift/internal/deps.bzl | gwik/rules_swift | ac4bd887fa85666fb12b395fcf01c227a8a6b603 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The Bazel 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 applicable la... | 34.697674 | 79 | 0.745979 |
f7d990f66f00b9457b94cebf339cc74996134e9a | 1,078 | py | Python | test/vanilla/low-level/Expected/AcceptanceTests/BodyFormDataLowLevel/bodyformdatalowlevel/rest/formdata/__init__.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 35 | 2018-04-03T12:15:53.000Z | 2022-03-11T14:03:34.000Z | test/vanilla/low-level/Expected/AcceptanceTests/BodyFormDataLowLevel/bodyformdatalowlevel/rest/formdata/__init__.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 652 | 2017-08-28T22:44:41.000Z | 2022-03-31T21:20:31.000Z | test/vanilla/low-level/Expected/AcceptanceTests/BodyFormDataLowLevel/bodyformdatalowlevel/rest/formdata/__init__.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 29 | 2017-08-28T20:57:01.000Z | 2022-03-11T14:03:38.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.869565 | 94 | 0.689239 |
f7d9b047fe916c61c178e60e2731640d5f65cde4 | 37,684 | py | Python | Sklearn_scipy_numpy/source/sklearn/tree/tree.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 4 | 2018-01-21T21:18:35.000Z | 2022-03-23T21:57:56.000Z | Sklearn_scipy_numpy/source/sklearn/tree/tree.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | Sklearn_scipy_numpy/source/sklearn/tree/tree.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | """
This module gathers tree-based methods, including decision, regression and
randomized trees. Single and multi-output problems are both handled.
"""
# Authors: Gilles Louppe <g.louppe@gmail.com>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Brian Holt <bdholt1@gmail.com>
# Noel Da... | 39.295099 | 97 | 0.594947 |
f7d9c47b2ace81aa41f29eaf74ad6150a07ba079 | 512 | py | Python | examples/docs_snippets/docs_snippets/guides/dagster/dagster_type_factories/schema.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets/guides/dagster/dagster_type_factories/schema.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets/guides/dagster/dagster_type_factories/schema.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import pandas as pd
import pandera as pa
MIN_DATE = pd.Timestamp("2021-10-01")
df = pd.read_csv(
"./ebike_trips.csv",
parse_dates=["start_time", "end_time"],
)
trips_schema = pa.DataFrameSchema(
columns={
"bike_id": pa.Column(
int, checks=pa.Check.ge(0)
), ... | 24.380952 | 76 | 0.632813 |
f7d9cb4f48758d75087d88bb1caa70ffe117235e | 4,941 | py | Python | app/dog_classifier.py | cmeng94/dog-breed-classifier | 7178d82f9d654e2e95e8f5611c89353554094412 | [
"MIT"
] | null | null | null | app/dog_classifier.py | cmeng94/dog-breed-classifier | 7178d82f9d654e2e95e8f5611c89353554094412 | [
"MIT"
] | null | null | null | app/dog_classifier.py | cmeng94/dog-breed-classifier | 7178d82f9d654e2e95e8f5611c89353554094412 | [
"MIT"
] | null | null | null | import sys
import cv2
import numpy as np
from tqdm import tqdm
from keras.models import Sequential
from keras.layers import Dropout, Flatten, Dense
from keras.layers import Conv2D, MaxPooling2D, GlobalAveragePooling2D, GlobalMaxPooling2D
from keras.callbacks import ModelCheckpoint
from keras.preprocessing import ima... | 28.073864 | 107 | 0.680429 |
f7d9deacfa1f24d31b2aaed6b54f5a786b36a294 | 204 | py | Python | playground/step4/test5.py | jhson989/jhML | eb8b76d3b47df858e82cd971bb32794e12de4747 | [
"Apache-2.0"
] | null | null | null | playground/step4/test5.py | jhson989/jhML | eb8b76d3b47df858e82cd971bb32794e12de4747 | [
"Apache-2.0"
] | null | null | null | playground/step4/test5.py | jhson989/jhML | eb8b76d3b47df858e82cd971bb32794e12de4747 | [
"Apache-2.0"
] | null | null | null |
import jhML
import jhML.functions as F
from jhML import Variable
x = Variable([1.0, 1.0, 1.0, 2.0])
y = Variable([3.0, 3.0, 3.0, 3.0])
xsin = F.sin(x)
z = xsin * y
print(z)
z.backward()
print(x.grad)
| 13.6 | 34 | 0.627451 |
f7d9efa1430400421b4ed0296004fea28b213663 | 6,090 | py | Python | src/rubrix/sdk/models/text2_text_record.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/models/text2_text_record.py | sakares/rubrix | 791ffb29815b5d24f2bbbb0fa422f85f8b30098f | [
"Apache-2.0"
] | null | null | null | src/rubrix/sdk/models/text2_text_record.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 ... | 35.614035 | 77 | 0.647455 |
f7da018abaaf9c6f1d103b1f5af346c5529d9c32 | 7,646 | py | Python | Tools/Scripts/webkitpy/common/net/resultsjsonparser.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 6 | 2021-07-05T16:09:39.000Z | 2022-03-06T22:44:42.000Z | Tools/Scripts/webkitpy/common/net/resultsjsonparser.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | 7 | 2022-03-15T13:25:39.000Z | 2022-03-15T13:25:44.000Z | Tools/Scripts/webkitpy/common/net/resultsjsonparser.py | jacadcaps/webkitty | 9aebd2081349f9a7b5d168673c6f676a1450a66d | [
"BSD-2-Clause"
] | null | null | null | # Copyright (c) 2010, Google Inc. All rights reserved.
# Copyright (C) 2019 Apple Inc. 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 abov... | 43.942529 | 136 | 0.712922 |
f7da18a51d0b87b510b758c5ac89cac11465f5ac | 4,461 | py | Python | scripts/spark_preprocessing.py | Nathx/subs_check | b91e0f031f756d0df317c6768fe73e4d07dc7ba3 | [
"MIT"
] | null | null | null | scripts/spark_preprocessing.py | Nathx/subs_check | b91e0f031f756d0df317c6768fe73e4d07dc7ba3 | [
"MIT"
] | null | null | null | scripts/spark_preprocessing.py | Nathx/subs_check | b91e0f031f756d0df317c6768fe73e4d07dc7ba3 | [
"MIT"
] | 2 | 2016-07-10T22:24:57.000Z | 2020-03-26T02:54:28.000Z |
# coding: utf-8
import subtitle_featurizer as sf
import os
from pyspark.mllib.feature import HashingTF
import pyspark as ps
from pyspark.mllib.regression import LabeledPoint
from pyspark.mllib.linalg import Vectors
import pandas as pd
from pyspark.sql import SQLContext
import numpy as np
from pyspark.mllib.classific... | 28.414013 | 113 | 0.668236 |
f7da1b98509b2b48e08fcb79f248d22c8493f6da | 4,491 | py | Python | data/amodalImage.py | zhixuanli/SLN-Amodal | 266c648f6838e37f3ada7223f212b21f730ffb64 | [
"MIT"
] | 25 | 2019-08-17T16:04:58.000Z | 2022-03-28T03:00:42.000Z | data/amodalImage.py | zhixuanli/SLN-Amodal | 266c648f6838e37f3ada7223f212b21f730ffb64 | [
"MIT"
] | 6 | 2019-10-17T11:02:44.000Z | 2021-09-16T08:13:24.000Z | data/amodalImage.py | zhixuanli/SLN-Amodal | 266c648f6838e37f3ada7223f212b21f730ffb64 | [
"MIT"
] | 6 | 2019-09-03T05:26:35.000Z | 2022-02-07T17:51:31.000Z | import numpy as np
import random
import cv2,os,pickle
from skimage import morphology
class amodalImage:
def __init__(self, image_file=None):
with open(image_file, 'rb') as fp:
self.Image_anns = pickle.load(fp)
# use number to label areas, 2**i = visual areas index for amodal i ,2**(32+i) =... | 35.362205 | 117 | 0.569584 |
f7da1d80dd16a0870ddaa08c66c97bbb39a03e88 | 8,707 | py | Python | nova/tests/functional/api_sample_tests/test_server_migrations.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/tests/functional/api_sample_tests/test_server_migrations.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | null | null | null | nova/tests/functional/api_sample_tests/test_server_migrations.py | ebalduf/nova-backports | 6bf97ec73467de522d34ab7a17ca0e0874baa7f9 | [
"Apache-2.0"
] | 1 | 2020-03-01T17:04:57.000Z | 2020-03-01T17:04:57.000Z | # Copyright 2016 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.686916 | 78 | 0.6133 |
f7da437923fbb964fc3311a9c61fe185736b12ed | 2,689 | py | Python | blackbelt/commands/t.py | apiaryio/black-belt | d28d7022605bfd0c6814e591da21729f6aa0eecf | [
"MIT"
] | 3 | 2015-06-02T20:46:53.000Z | 2019-07-16T20:15:38.000Z | blackbelt/commands/t.py | apiaryio/black-belt | d28d7022605bfd0c6814e591da21729f6aa0eecf | [
"MIT"
] | 113 | 2015-01-13T15:27:51.000Z | 2018-09-12T09:06:45.000Z | blackbelt/commands/t.py | apiaryio/black-belt | d28d7022605bfd0c6814e591da21729f6aa0eecf | [
"MIT"
] | 1 | 2015-06-02T20:47:14.000Z | 2015-06-02T20:47:14.000Z | import click
from blackbelt.handle_trello import (
migrate_label as ml,
schedule_list as sl,
next_card as n,
next_week as nw,
open_current_working_ticket as cc,
verify as v,
order_tea as ot
)
@click.group(help='Handle Trello-related actions and integrations.')
def cli():
pass
@cli.c... | 28.913978 | 178 | 0.667534 |
f7da71b6327567fcf30111ba3e399b87b55cdf9e | 36,631 | py | Python | scrapli/factory.py | hellt/scrapli | 88f8ea78957de03a519ee05341552d6a1ee6f6f1 | [
"MIT"
] | null | null | null | scrapli/factory.py | hellt/scrapli | 88f8ea78957de03a519ee05341552d6a1ee6f6f1 | [
"MIT"
] | null | null | null | scrapli/factory.py | hellt/scrapli | 88f8ea78957de03a519ee05341552d6a1ee6f6f1 | [
"MIT"
] | null | null | null | """scrapli.factory"""
import importlib
from copy import deepcopy
from io import BytesIO
from typing import Any, Callable, Dict, List, Optional, Tuple, Type, Union, cast
from scrapli.driver import AsyncGenericDriver, AsyncNetworkDriver, GenericDriver, NetworkDriver
from scrapli.driver.core import (
AsyncEOSDriver,
... | 45.056581 | 100 | 0.661216 |
f7da77f77a87d98c24ed52cd67d4e677c15a780e | 946 | py | Python | algorithms/python/test_qsort.py | rik0/rk-exempla | 811f859a0980b0636bbafa2656893d988c4d0e32 | [
"MIT"
] | 1 | 2017-02-20T21:04:47.000Z | 2017-02-20T21:04:47.000Z | algorithms/python/test_qsort.py | rik0/rk-exempla | 811f859a0980b0636bbafa2656893d988c4d0e32 | [
"MIT"
] | null | null | null | algorithms/python/test_qsort.py | rik0/rk-exempla | 811f859a0980b0636bbafa2656893d988c4d0e32 | [
"MIT"
] | 2 | 2017-02-20T21:04:49.000Z | 2021-05-18T11:29:16.000Z | import qsort
from nose import tools
fixture_lsts = [
[1, 2, 3, 4], [1, 2, 4, 3], [1, 3, 2, 4], [1, 3, 2, 3],
[4, 2, 3, 1], [1, 4, 3, 2], [3, 2, 1, 4], [3, 2, 2, 4],
[3, 1, 1, 3], [1, 1, 1, 1], [1, 2, 1, 1], [1, 2, 3],
[1, 3, 2], [2, 1, 3], [2, 3, 1], [3, 1, 2], [3, 2, 1],
[3, 2, 3], [3, 1, 1], [], ... | 23.65 | 59 | 0.539112 |
f7dac819fe9bf62fb10df7d5821c72539c346e6a | 4,551 | py | Python | tensorflow/contrib/learn/python/learn/utils/input_fn_utils.py | gnoses/TensorFlow | 63a21e054007d86269ed1ad0145ebce04ee57a81 | [
"Apache-2.0"
] | 2 | 2020-05-04T03:59:25.000Z | 2021-07-16T03:09:22.000Z | tensorflow/contrib/learn/python/learn/utils/input_fn_utils.py | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | null | null | null | tensorflow/contrib/learn/python/learn/utils/input_fn_utils.py | amineferchichi/tensorflow | 4ac9c09d5ca57a03b8daa5fb9e295947b1619854 | [
"Apache-2.0"
] | 1 | 2019-05-22T08:34:09.000Z | 2019-05-22T08:34:09.000Z | # Copyright 2016 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.138889 | 80 | 0.683806 |
f7dae7fa463859ecdf6a13cd509ee7908c6f127d | 1,166 | py | Python | src/streamlink/plugins/europaplus.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | 1 | 2019-11-25T01:37:21.000Z | 2019-11-25T01:37:21.000Z | src/streamlink/plugins/europaplus.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/europaplus.py | zel4ever/streamlink | 0e48e2f01a370fa83cabc27b067b6f72cd1b8d9d | [
"BSD-2-Clause"
] | null | null | null | from __future__ import print_function
import re
from streamlink.plugin import Plugin
from streamlink.plugin.api import http
from streamlink.plugin.api.utils import itertags
from streamlink.stream import HLSStream
from streamlink.utils import update_scheme
class EuropaPlusTV(Plugin):
url_re = re.compile(r"https?... | 34.294118 | 90 | 0.649228 |
f7daea9c9d53f290678829fdfb6f0b74a872d23b | 259 | py | Python | vaurien/tests/util.py | mozilla-libs/vaurien | dd53074fc3a01cf554c8f628423b5623f8d6e45d | [
"Apache-2.0"
] | 131 | 2015-01-04T06:11:22.000Z | 2017-12-01T14:39:26.000Z | vaurien/tests/util.py | leandromoreira/vaurien | 5e734a4280280e2763d0fca3ab3fef9c70484dc0 | [
"Apache-2.0"
] | 13 | 2015-01-29T02:10:33.000Z | 2017-07-31T17:34:11.000Z | vaurien/tests/util.py | leandromoreira/vaurien | 5e734a4280280e2763d0fca3ab3fef9c70484dc0 | [
"Apache-2.0"
] | 18 | 2015-02-02T13:09:18.000Z | 2017-07-07T09:04:37.000Z | import subprocess
import sys
def start_web_server(port=8888):
cmd = [sys.executable, '-m', 'SimpleHTTPServer', str(port)]
server = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
return server
| 25.9 | 63 | 0.648649 |
f7dafc968aade2f0980b3201bb43569c062ece58 | 27,564 | py | Python | mypy/checkmember.py | cocoatomo/mypy | f8c3550b9405bf419aa1e0d6f7eb56dc10565a89 | [
"PSF-2.0"
] | null | null | null | mypy/checkmember.py | cocoatomo/mypy | f8c3550b9405bf419aa1e0d6f7eb56dc10565a89 | [
"PSF-2.0"
] | null | null | null | mypy/checkmember.py | cocoatomo/mypy | f8c3550b9405bf419aa1e0d6f7eb56dc10565a89 | [
"PSF-2.0"
] | null | null | null | """Type checking of attribute access"""
from typing import cast, Callable, List, Optional, TypeVar
from mypy.types import (
Type, Instance, AnyType, TupleType, CallableType, FunctionLike, TypeVarDef,
Overloaded, TypeVarType, UnionType, PartialType,
DeletedType, NoneTyp, TypeType, function_type
)
from mypy... | 44.601942 | 98 | 0.610579 |
f7dafe381b3c3b1589f3ec806fa5602329bf15bf | 26,986 | py | Python | salt/utils/http.py | johngrasty/salt | f66b18d8ee52eb988c3dbd8ba3ff6a6173c8aea5 | [
"Apache-2.0"
] | null | null | null | salt/utils/http.py | johngrasty/salt | f66b18d8ee52eb988c3dbd8ba3ff6a6173c8aea5 | [
"Apache-2.0"
] | 1 | 2015-09-02T12:49:48.000Z | 2015-09-02T19:22:58.000Z | salt/utils/http.py | johngrasty/salt | f66b18d8ee52eb988c3dbd8ba3ff6a6173c8aea5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Utils for making various web calls. Primarily designed for REST, SOAP, webhooks
and the like, but also useful for basic HTTP testing.
.. versionaddedd:: 2015.2
'''
# Import python libs
from __future__ import absolute_import
import json
import logging
import os.path
import pprint
import soc... | 33.111656 | 110 | 0.557956 |
f7db3ecc739df7ea13324b82f2b3e543707a77d1 | 4,653 | py | Python | infra/services/bugdroid/test/gitiles_poller_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 2 | 2021-04-13T21:22:18.000Z | 2021-09-07T02:11:57.000Z | infra/services/bugdroid/test/gitiles_poller_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | 21 | 2020-09-06T02:41:05.000Z | 2022-03-02T04:40:01.000Z | infra/services/bugdroid/test/gitiles_poller_test.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 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.
import copy
import datetime
import mock
import logging
import tempfile
import unittest
from infra.services.bugdroid import gitiles_poller
from infra.service... | 37.829268 | 80 | 0.708145 |
f7db4e1a7af493619257d23d2e415affaa4da720 | 3,474 | py | Python | src/ggrc_risk_assessments/__init__.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc_risk_assessments/__init__.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/ggrc_risk_assessments/__init__.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
from flask import Blueprint
from sqlalchemy import orm
from ggrc import settings
from ggrc.models import all_models
from ggrc.models import reflection
from ggrc.rbac import permissions
from ggrc.services.re... | 29.692308 | 78 | 0.719919 |
f7db526d867a49cabbdb47bdf478b601894cece2 | 12,290 | py | Python | paper_plots_tables.py | mustaric/TESS_JWST_calibration_stars | 045507685309d7aab609be6c98721e4ee3a5701b | [
"BSD-2-Clause"
] | null | null | null | paper_plots_tables.py | mustaric/TESS_JWST_calibration_stars | 045507685309d7aab609be6c98721e4ee3a5701b | [
"BSD-2-Clause"
] | null | null | null | paper_plots_tables.py | mustaric/TESS_JWST_calibration_stars | 045507685309d7aab609be6c98721e4ee3a5701b | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 1 11:57:52 2021
@author: smullally
"""
import Susan
import matplotlib.pyplot as plt
import numpy as np
outdir = "/Users/smullally/Science/tess_monitor_standards/paper/plots/"
#Directory of the data files
ddir = "/Users/smullally/Science/tess_mon... | 39.645161 | 103 | 0.664687 |
f7db64fc9ad9e408637afe73d2058573fe8d4e80 | 65,514 | py | Python | src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_resource_guards_operations.py | LGDoor/azure-cli-extensions | 570a7c181999c1dd160d48f8454aab6cea057a20 | [
"MIT"
] | null | null | null | src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_resource_guards_operations.py | LGDoor/azure-cli-extensions | 570a7c181999c1dd160d48f8454aab6cea057a20 | [
"MIT"
] | null | null | null | src/dataprotection/azext_dataprotection/vendored_sdks/dataprotection/aio/operations/_resource_guards_operations.py | LGDoor/azure-cli-extensions | 570a7c181999c1dd160d48f8454aab6cea057a20 | [
"MIT"
] | 1 | 2022-02-14T21:43:29.000Z | 2022-02-14T21:43:29.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 (autorest: 3.0.... | 50.825446 | 282 | 0.677 |
f7db699282aa016f4582f366008090183d1030c8 | 10,326 | py | Python | cobbler_distro_import.py | zdudic/cobbler | ad409b3b92f4def23dd250a8410ca0b0be9499b0 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | cobbler_distro_import.py | zdudic/cobbler | ad409b3b92f4def23dd250a8410ca0b0be9499b0 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | cobbler_distro_import.py | zdudic/cobbler | ad409b3b92f4def23dd250a8410ca0b0be9499b0 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | #!/bin/env python
# this was written for python2
# Import cobbler disto, arguments are:
# $1 = http or nfs path to iso
# $2 = arch
# ks file is hardcoded, /var/lib/cobbler/kickstarts/default.ks
# -----------------------------------------------------------
import os
from time import gmtime, strftime
import datetime
im... | 37.010753 | 126 | 0.636936 |
f7db6e4afacdc79ebfcd575b8b4109afe6768da2 | 1,873 | py | Python | tests/test_examples_template_generator.py | jpvowen/troposphere | 6a9efa7717db75905b846a9f3aafd092f55c7925 | [
"BSD-2-Clause"
] | 1 | 2021-04-03T22:24:36.000Z | 2021-04-03T22:24:36.000Z | tests/test_examples_template_generator.py | cartermeyers/troposphere | 4b42fa0d65f73cec28184b5349aa198fb8ee5b2e | [
"BSD-2-Clause"
] | null | null | null | tests/test_examples_template_generator.py | cartermeyers/troposphere | 4b42fa0d65f73cec28184b5349aa198fb8ee5b2e | [
"BSD-2-Clause"
] | 5 | 2020-05-10T13:50:32.000Z | 2021-09-09T09:06:54.000Z | import os
import re
import unittest
import json
from troposphere.template_generator import TemplateGenerator
try:
u = unicode
except NameError:
u = str
class TestTemplateGenerator(unittest.TestCase):
maxDiff = None
# those are set by create_test_class
filename = None
expected_output = None
... | 27.955224 | 77 | 0.657768 |
f7db7ac63aa20b07abbadc387e8b34bbd78c67ae | 148 | py | Python | instance/config.example.py | abhishtagatya/pandubot | ec0f20b31fc61b5581753711d774213bbf70d438 | [
"MIT"
] | 1 | 2018-08-29T12:03:06.000Z | 2018-08-29T12:03:06.000Z | instance/config.example.py | abhishtagatya/pandubot | ec0f20b31fc61b5581753711d774213bbf70d438 | [
"MIT"
] | null | null | null | instance/config.example.py | abhishtagatya/pandubot | ec0f20b31fc61b5581753711d774213bbf70d438 | [
"MIT"
] | null | null | null | LINE_CHANNEL_ACCESS_TOKEN = ""
LINE_CHANNEL_SECRET_TOKEN = ""
ZOMATO_API_KEY = ""
GOOGLE_MAPS_API_KEY = ""
WEATHER_MAP_API = ""
DATABASE_URI = ""
| 16.444444 | 30 | 0.743243 |
f7db8f87ca2c70302f5fe1351d7ca7a03709454e | 2,320 | py | Python | goal_prox/method/goal_gail_discriminator.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | 4 | 2021-11-17T20:19:34.000Z | 2022-03-31T04:21:26.000Z | goal_prox/method/goal_gail_discriminator.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | null | null | null | goal_prox/method/goal_gail_discriminator.py | clvrai/goal_prox_il | 7c809b2ee575a69a14997068db06f3c1f3c8bd08 | [
"MIT"
] | null | null | null | import torch
from rlf.algos.il.gaifo import GaifoDiscrim
from rlf.algos.nested_algo import NestedAlgo
from goal_prox.method.goal_gail_algo import GoalGAILAlgo
from goal_prox.method.goal_gail_dataset import GoalGAILTrajDataset
class GoalGAIL(NestedAlgo):
def __init__(self, agent_updater=GoalGAILAlgo(), get_discri... | 31.780822 | 81 | 0.646552 |
f7dba9c1c38ebce072c4bf377d473508f0d42ccb | 4,748 | py | Python | ferrox/lib/base.py | hsuaz/ferrox | ac89b698e6c12c57c7a3128b6a25a3dc100bfc15 | [
"MIT"
] | 3 | 2017-01-03T20:55:16.000Z | 2022-03-01T15:21:53.000Z | ferrox/lib/base.py | hsuaz/ferrox | ac89b698e6c12c57c7a3128b6a25a3dc100bfc15 | [
"MIT"
] | null | null | null | ferrox/lib/base.py | hsuaz/ferrox | ac89b698e6c12c57c7a3128b6a25a3dc100bfc15 | [
"MIT"
] | 4 | 2017-01-03T20:48:09.000Z | 2022-03-01T15:21:58.000Z | """The base Controller API
Provides the BaseController class for subclassing, and other objects
utilized by Controllers.
"""
from pylons import c, cache, config, g, request, response, session
from pylons.controllers import WSGIController
from pylons.controllers.util import abort, etag_cache, redirect_to
from pylons.de... | 36.523077 | 83 | 0.630792 |
f7dbb4eb1d2b6582617549220e9e7dae802ac4f0 | 6,194 | py | Python | cyclonedx/bom/reader.py | c0d3nh4ck/cyclonedx-python | 287d0bc518f1c18f00659466c7d116109061cd48 | [
"Apache-2.0"
] | null | null | null | cyclonedx/bom/reader.py | c0d3nh4ck/cyclonedx-python | 287d0bc518f1c18f00659466c7d116109061cd48 | [
"Apache-2.0"
] | null | null | null | cyclonedx/bom/reader.py | c0d3nh4ck/cyclonedx-python | 287d0bc518f1c18f00659466c7d116109061cd48 | [
"Apache-2.0"
] | null | null | null | import requests
import requirements
from collections import OrderedDict
from packageurl import PackageURL
from packaging.utils import canonicalize_version
from packaging.version import parse as packaging_parse
from cyclonedx.bom import generator
from cyclonedx.models import *
DEFAULT_PACKAGE_INFO_URL = "https://pypi... | 37.313253 | 134 | 0.696642 |
f7dbc8a3bb8bbff7681a318aaea834bb15f06f8d | 36,316 | py | Python | cmd2/argparse_custom.py | scartill/cmd2 | 1b4e1e25f84bcc800a5f369783c3c3448a42361e | [
"MIT"
] | null | null | null | cmd2/argparse_custom.py | scartill/cmd2 | 1b4e1e25f84bcc800a5f369783c3c3448a42361e | [
"MIT"
] | null | null | null | cmd2/argparse_custom.py | scartill/cmd2 | 1b4e1e25f84bcc800a5f369783c3c3448a42361e | [
"MIT"
] | null | null | null | # coding=utf-8
"""
This module adds capabilities to argparse by patching a few of its functions. It also defines a parser
class called Cmd2ArgumentParser which improves error and help output over normal argparse. All cmd2 code uses
this parser and it is recommended that developers of cmd2-based apps either use it or wr... | 44.889988 | 119 | 0.621159 |
f7dbcd29207d7a75f1d601e0d41dd2f450e7d856 | 7,586 | py | Python | Problem sets/PS6/ps6/rubik/rubik.py | overlord1109/mit-6.006-solutions | 85577adf672e5827294408180172d129afd9fdfd | [
"MIT"
] | null | null | null | Problem sets/PS6/ps6/rubik/rubik.py | overlord1109/mit-6.006-solutions | 85577adf672e5827294408180172d129afd9fdfd | [
"MIT"
] | null | null | null | Problem sets/PS6/ps6/rubik/rubik.py | overlord1109/mit-6.006-solutions | 85577adf672e5827294408180172d129afd9fdfd | [
"MIT"
] | null | null | null | # rubik.py
# Author: Ronald L. Rivest
# Modified: Michael Lieberman
# Last updated: October 24, 2008
#
# Routines to work with Rubik's 2x2x2 cube
"""
We'll call the six sides, as usual:
Front Back Up Down Left Right
or F, B, U, D, L, R.
Permutations:
We'll number the cubie positions starting
at 0, front to ba... | 32.55794 | 128 | 0.619299 |
f7dbcf0ac9669a567b0c6ffbca83dacae80e925c | 1,504 | py | Python | randlov1998/goto_sarsalambda_linfa_replacetrace_onlysteer.py | chrisdembia/agent-bicycle | 1ecc3fcad8504385e9e85ccbc539464cb4e6c4e6 | [
"MIT"
] | 10 | 2015-07-07T05:14:15.000Z | 2020-06-20T00:57:38.000Z | randlov1998/goto_sarsalambda_linfa_replacetrace_onlysteer.py | chrisdembia/agent-bicycle | 1ecc3fcad8504385e9e85ccbc539464cb4e6c4e6 | [
"MIT"
] | null | null | null | randlov1998/goto_sarsalambda_linfa_replacetrace_onlysteer.py | chrisdembia/agent-bicycle | 1ecc3fcad8504385e9e85ccbc539464cb4e6c4e6 | [
"MIT"
] | 6 | 2015-07-07T05:14:16.000Z | 2021-04-25T02:07:47.000Z |
from pybrain.rl.agents.linearfa import LinearFA_Agent
from pybrain.rl.experiments import EpisodicExperiment
from environment import Environment
from tasks import LinearFATileCoding3456GoToTask
from training import LinearFATraining
from learners import SARSALambda_LinFA_ReplacingTraces
task = LinearFATileCoding3456Go... | 40.648649 | 79 | 0.823803 |
f7dbd72f63f79e3a135f7b2c14c2a73761496cde | 8,496 | py | Python | pymodbus/client/asynchronous/deprecated/asynchronous.py | swamper123/pymodbus | 7dfac6f19c60d3aa50a168ff82db88204dfb3a30 | [
"BSD-3-Clause"
] | null | null | null | pymodbus/client/asynchronous/deprecated/asynchronous.py | swamper123/pymodbus | 7dfac6f19c60d3aa50a168ff82db88204dfb3a30 | [
"BSD-3-Clause"
] | 1 | 2020-10-29T12:01:38.000Z | 2022-03-21T02:39:59.000Z | pymodbus/client/asynchronous/deprecated/asynchronous.py | swamper123/pymodbus | 7dfac6f19c60d3aa50a168ff82db88204dfb3a30 | [
"BSD-3-Clause"
] | null | null | null | """
Implementation of a Modbus Client Using Twisted
--------------------------------------------------
Example run::
from twisted.internet import reactor, protocol
from pymodbus.client.asynchronous import ModbusClientProtocol
def printResult(result):
print( "Result: %d" % result.bits[0])
def... | 36.62069 | 95 | 0.587688 |
f7dc06904250cf67f463c22ce74521347f8bfb03 | 7,540 | py | Python | 12.20/model2.py | gzyszuuow/BusBunching | e9b01a62e422ae6525d9287bdf46c25aacdf9c6c | [
"Apache-2.0"
] | null | null | null | 12.20/model2.py | gzyszuuow/BusBunching | e9b01a62e422ae6525d9287bdf46c25aacdf9c6c | [
"Apache-2.0"
] | null | null | null | 12.20/model2.py | gzyszuuow/BusBunching | e9b01a62e422ae6525d9287bdf46c25aacdf9c6c | [
"Apache-2.0"
] | null | null | null | from keras.models import Model
from keras.layers import Input
from keras.layers import LSTM
from keras.layers import Dense
from keras.layers import GRU,Embedding,concatenate,Reshape
import numpy as np
import keras
#from loaddata2 import *
path1 = "C:\\Users\\bdu\\Desktop\\gzy\\BusBunching\\BusRoute400\\Test\\... | 34.746544 | 145 | 0.701459 |
f7dc50897befa3cb4f1f8400534607d67f0cb0df | 85,972 | py | Python | test/domapi/CoreLvl1.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | 2 | 2018-05-28T23:01:20.000Z | 2018-05-29T03:59:38.000Z | test/domapi/CoreLvl1.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | test/domapi/CoreLvl1.py | jkloth/pyxml | de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d | [
"MIT"
] | null | null | null | ##############################################################################
#
# Zope Public License (ZPL) Version 1.0
# -------------------------------------
#
# Copyright (c) Digital Creations. All rights reserved.
#
# This license has been certified as Open Source(tm).
#
# Redistribution and use in source and bin... | 38.125055 | 80 | 0.628728 |
f7dc582108283f6080ac50d890e93f7ffb6c243d | 8,032 | py | Python | atlas/common/utils.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | null | null | null | atlas/common/utils.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | 15 | 2015-01-06T13:41:52.000Z | 2022-03-30T10:37:25.000Z | atlas/common/utils.py | PanDAWMS/panda-bigmon-atlas | a3688b9ed722a15c0469c8bee84cc9a417670608 | [
"Apache-2.0"
] | 1 | 2017-07-20T08:01:24.000Z | 2017-07-20T08:01:24.000Z | """
utils
"""
import logging
import pytz
from itertools import islice, chain
#from ..settings import STATIC_URL, ENV
#from settings import STATIC_URL, FILTER_UI_ENV
#from django.conf.settings import STATIC_URL, FILTER_UI_ENV
from django.conf import settings
#.settings import STATIC_URL, FILTER_UI_ENV
import datetime
... | 32.518219 | 123 | 0.581673 |
f7dc789777390db877e01853b9b8ebfe801cf3e8 | 569 | py | Python | axonius_api_client/cli/grp_system/grp_discover/__init__.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 11 | 2020-01-31T00:28:26.000Z | 2022-03-25T20:27:08.000Z | axonius_api_client/cli/grp_system/grp_discover/__init__.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 83 | 2020-01-22T12:52:38.000Z | 2022-02-07T16:20:18.000Z | axonius_api_client/cli/grp_system/grp_discover/__init__.py | kf-careem/axonius_api_client | 27767c896ca446e74ca5d69e087e1a0dcf7157ec | [
"MIT"
] | 16 | 2019-08-23T17:44:31.000Z | 2022-01-06T00:57:34.000Z | # -*- coding: utf-8 -*-
"""Command line interface for Axonius API Client."""
import click
from ...context import AliasedGroup
from . import cmd_get, cmd_is_data_stable, cmd_is_running, cmd_start, cmd_stop, cmd_wait_data_stable
@click.group(cls=AliasedGroup)
def discover():
"""Group: Discover and Lifecycle manage... | 28.45 | 100 | 0.797891 |
f7dc7b63a4741e983d77de42bdf5db20e117779e | 1,867 | py | Python | stonesoup/sensor/tests/test_passive.py | SohSalari/Stone-Soup | e073d4145df18facad43e4ab7b0a34e8d65f67ee | [
"MIT"
] | 1 | 2020-07-21T15:20:20.000Z | 2020-07-21T15:20:20.000Z | stonesoup/sensor/tests/test_passive.py | mgomesborges/Stone-Soup | 39c7f02ce11e10c9b3c612ad359f6d8bca495266 | [
"MIT"
] | null | null | null | stonesoup/sensor/tests/test_passive.py | mgomesborges/Stone-Soup | 39c7f02ce11e10c9b3c612ad359f6d8bca495266 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
import numpy as np
from ...functions import cart2angles, rotx, roty, rotz
from ...types.array import StateVector, CovarianceMatrix
from ...types.state import State
from ..passive import PassiveElevationBearing
def test_passive_sensor():
# Input arguments
# TODO: pytes... | 32.754386 | 65 | 0.667381 |
f7dc8bccaed6a53162a8b0a80f5d926847ffe42b | 16 | py | Python | const.py | richard3983/pytorch-deep-generative-replay | 1375697da7e550a2e7458a8a32757e650e1dd3e1 | [
"MIT"
] | 127 | 2017-11-01T12:12:32.000Z | 2022-03-20T11:39:16.000Z | const.py | richard3983/pytorch-deep-generative-replay | 1375697da7e550a2e7458a8a32757e650e1dd3e1 | [
"MIT"
] | 6 | 2019-01-24T07:00:43.000Z | 2020-11-07T05:45:06.000Z | const.py | richard3983/pytorch-deep-generative-replay | 1375697da7e550a2e7458a8a32757e650e1dd3e1 | [
"MIT"
] | 22 | 2018-01-22T22:42:28.000Z | 2022-03-03T06:14:08.000Z | EPSILON = 1e-16
| 8 | 15 | 0.6875 |
f7dc99da2eadd7ada7857cb168104fe1005b8508 | 117 | py | Python | training.py | joLahann/dapnn | 393ee55fe01c654de5fbc96589688ddc92e0dcda | [
"Apache-2.0"
] | null | null | null | training.py | joLahann/dapnn | 393ee55fe01c654de5fbc96589688ddc92e0dcda | [
"Apache-2.0"
] | null | null | null | training.py | joLahann/dapnn | 393ee55fe01c654de5fbc96589688ddc92e0dcda | [
"Apache-2.0"
] | null | null | null | from dapnn.training import *
import fire
import warnings
warnings.filterwarnings("ignore")
fire.Fire(run_training)
| 14.625 | 33 | 0.811966 |
f7dcb36a8ca6ccb286b8366324fa6745cebf35f3 | 17,217 | py | Python | salt/utils/verify.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | 1 | 2020-09-16T21:31:02.000Z | 2020-09-16T21:31:02.000Z | salt/utils/verify.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | null | null | null | salt/utils/verify.py | jbq/pkg-salt | b6742e03cbbfb82f4ce7db2e21a3ff31b270cdb3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
A few checks to make sure the environment is sane
'''
from __future__ import absolute_import
# Original Author: Jeff Schroeder <jeffschroeder@computer.org>
# Import python libs
import os
import re
import sys
import stat
import errno
import socket
import logging
# Import third party libs
i... | 34.228628 | 92 | 0.562061 |
f7dcc2fc1d6fc399b9a556be600fd2b89805fd5f | 3,846 | py | Python | intersight/models/compute_board_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/compute_board_list.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/models/compute_board_list.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 ComputeBoardList(object):
"""
NOTE: This clas... | 24.974026 | 81 | 0.548882 |
f7dcda594a6bfac0171394d0d451111a72dc1d3f | 247 | py | Python | razor/pytorch-RLmodel/read_grpcdata.py | lahiri-phdworks/OCCAM | 21919b0819606b8f76a391965151fba6df86cee7 | [
"BSD-3-Clause"
] | null | null | null | razor/pytorch-RLmodel/read_grpcdata.py | lahiri-phdworks/OCCAM | 21919b0819606b8f76a391965151fba6df86cee7 | [
"BSD-3-Clause"
] | null | null | null | razor/pytorch-RLmodel/read_grpcdata.py | lahiri-phdworks/OCCAM | 21919b0819606b8f76a391965151fba6df86cee7 | [
"BSD-3-Clause"
] | null | null | null | import proto.Previrt_pb2 as pb
import sys
import os
cwd = os.getcwd()
if __name__ == "__main__":
filename = sys.argv[1]
res = pb.ComponentInterface()
res.ParseFromString(open(os.path.join(cwd, filename), "rb").read())
print(res)
| 20.583333 | 71 | 0.680162 |
f7dcf2b30a270ba02c85c886ff84af5e4043755f | 2,641 | py | Python | bonneville/modules/riak.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/modules/riak.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/modules/riak.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
Riak Salt Module
=======================
Author: David Boucha <boucha@gmail.com>
'''
# Import bonneville libs
import bonneville.utils
def __virtual__():
'''
Only available on systems with Riak installed.
'''
if bonneville.utils.which('riak'):
return 'riak'
re... | 20.472868 | 73 | 0.488451 |
f7dcfd97a71e33b9bfe7b681bd1d20a1f356ed84 | 7,938 | py | Python | scilifelab/pm/core/project.py | ssjunnebo/scilifelab | 79960f7042118f900bd1eaabe4902ee76abd8020 | [
"MIT"
] | 1 | 2016-03-21T14:04:09.000Z | 2016-03-21T14:04:09.000Z | scilifelab/pm/core/project.py | ssjunnebo/scilifelab | 79960f7042118f900bd1eaabe4902ee76abd8020 | [
"MIT"
] | 35 | 2015-01-22T08:25:02.000Z | 2020-02-17T12:09:12.000Z | scilifelab/pm/core/project.py | ssjunnebo/scilifelab | 79960f7042118f900bd1eaabe4902ee76abd8020 | [
"MIT"
] | 6 | 2015-01-16T15:32:08.000Z | 2020-01-30T14:34:40.000Z | """Pm Project module"""
import os
import sys
import re
import yaml
from cement.core import controller, hook
from scilifelab.pm.core.controller import AbstractExtendedBaseController, AbstractBaseController
from scilifelab.utils.misc import query_yes_no, filtered_walk, walk
from scilifelab.pm.lib.clean import purge_alig... | 53.275168 | 245 | 0.66125 |
f7dd097957664cf5bc8dd1c64d75958cee7deb9e | 9,919 | py | Python | alipay/aop/api/domain/AlipayCommerceEducateTrainCourseModifyModel.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/AlipayCommerceEducateTrainCourseModifyModel.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/AlipayCommerceEducateTrainCourseModifyModel.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.CateInfo import CateInfo
from alipay.aop.api.domain.ShopMerchantInfo import ShopMerchantInfo
from alipay.aop.api.domain.CourseSKUInfo import CourseSKUInfo
from alipay.aop.api.domain... | 32.415033 | 77 | 0.559129 |
f7dd3afea165e37f7f7ea079cc887823dc491ef4 | 7,602 | py | Python | pyxtal/representation.py | qzhu2017/PyXtal | c9c9b109f0a258ca992f59455eb57c9577ef80bc | [
"MIT"
] | 127 | 2018-09-21T22:27:17.000Z | 2022-03-30T21:11:49.000Z | pyxtal/representation.py | qzhu2017/PyXtal | c9c9b109f0a258ca992f59455eb57c9577ef80bc | [
"MIT"
] | 171 | 2018-08-06T07:10:24.000Z | 2022-03-29T00:59:53.000Z | pyxtal/representation.py | qzhu2017/PyXtal | c9c9b109f0a258ca992f59455eb57c9577ef80bc | [
"MIT"
] | 50 | 2018-08-12T22:50:46.000Z | 2022-03-23T07:52:47.000Z | import os
import numpy as np
from pyxtal.symmetry import Group
from pyxtal.lattice import Lattice
from pyxtal.wyckoff_site import mol_site
from pyxtal.molecule import find_id_from_smile
class representation():
"""
A class to handle the 1D representation of molecular crystal
Works for Zprime > 1
Ar... | 30.902439 | 105 | 0.482636 |
f7dd410ee0d30b45599deb5c62f47a47a5ed86b0 | 996 | py | Python | ppobyter/events/dianciealtar.py | graatje/highscoresbot | 26207b8191ed6c9a3d7ecd49fea482e6d3603c36 | [
"MIT"
] | null | null | null | ppobyter/events/dianciealtar.py | graatje/highscoresbot | 26207b8191ed6c9a3d7ecd49fea482e6d3603c36 | [
"MIT"
] | null | null | null | ppobyter/events/dianciealtar.py | graatje/highscoresbot | 26207b8191ed6c9a3d7ecd49fea482e6d3603c36 | [
"MIT"
] | null | null | null | from .event import Event
class DiancieAltar(Event):
"""
This class is the dianciealtar event.
"""
def __init__(self, player, amount):
"""
here the superclass init is called, and it sets the player and the amount.
:param player: The player who topped off the altar.
:para... | 31.125 | 106 | 0.616466 |
f7dd482120221be259f7578439a8124f6fdebd6c | 7,711 | py | Python | Algoritmo.py | sebastianperudev2001/ComputerNetworks-FinalProject-BellmanFord | 453259f765a9a6941a5d68fec739c52a81863215 | [
"MIT"
] | 1 | 2022-02-22T20:36:46.000Z | 2022-02-22T20:36:46.000Z | Algoritmo.py | sebastianperudev2001/ComputerNetworks-FinalProject-BellmanFord | 453259f765a9a6941a5d68fec739c52a81863215 | [
"MIT"
] | null | null | null | Algoritmo.py | sebastianperudev2001/ComputerNetworks-FinalProject-BellmanFord | 453259f765a9a6941a5d68fec739c52a81863215 | [
"MIT"
] | null | null | null | """
Proyecto de Redes
Autor: Sebastian Chavarry
Codigo: 20200498
Numero de Orden: 13
Tema: Vector Distancia //Bellman-Ford
"""
#Se importan las librerias que vamos a necesitar para el codigo
import numpy as np, timeit, os, psutil, sys
#Definimos variables String con codigo ASCII que nos permitiran dar color a nuestro... | 37.985222 | 166 | 0.591752 |
f7dd8d2ed9139b05e3bd1ac93cdaa2e9723e9bb7 | 2,173 | py | Python | prototypes/newOdeInterface/SolverComparison.py | goujou/CompartmentalSystems | 4724555c33f11395ddc32738e8dfed7349ee155f | [
"MIT"
] | null | null | null | prototypes/newOdeInterface/SolverComparison.py | goujou/CompartmentalSystems | 4724555c33f11395ddc32738e8dfed7349ee155f | [
"MIT"
] | null | null | null | prototypes/newOdeInterface/SolverComparison.py | goujou/CompartmentalSystems | 4724555c33f11395ddc32738e8dfed7349ee155f | [
"MIT"
] | null | null | null |
# coding: utf-8
# # The directional field
# In[1]:
get_ipython().run_line_magic('matplotlib', 'notebook')
import matplotlib
import matplotlib.pylab as plt
import numpy as np
def directional_field(ts,xs,func):
v_ts=np.zeros((len(xs),len(ts)))
v_xs=np.zeros((len(xs),len(ts)))
for i in range(len(ts)):
... | 14.782313 | 95 | 0.625863 |
f7ddc07f7c4c31e28b362fc4cf2dae8992a0c504 | 1,171 | py | Python | plugins/tags/blocks/cooldown.py | Friskytool/command-handler | 2c0c7eecc8afe7898650dfc69d1c8816448c2480 | [
"MIT"
] | null | null | null | plugins/tags/blocks/cooldown.py | Friskytool/command-handler | 2c0c7eecc8afe7898650dfc69d1c8816448c2480 | [
"MIT"
] | 4 | 2021-12-10T06:18:12.000Z | 2022-03-24T14:43:57.000Z | plugins/tags/blocks/cooldown.py | Friskytool/command-handler | 2c0c7eecc8afe7898650dfc69d1c8816448c2480 | [
"MIT"
] | null | null | null | from typing import Optional
from TagScriptEngine import Context, Block
class CooldownBlock(Block):
"""
Redirects the tag response to either the given channel, the author's DMs,
or uses a reply based on what is passed to the parameter.
**Usage:** ``{redirect(<"dm"|"reply"|channel>)}``
**Payload:... | 27.232558 | 77 | 0.587532 |
f7dde40ab9f373d304f284880c3816b1688f5cac | 16,864 | py | Python | smrf/utils/wind/model.py | scotthavens/smrf | a492d01a5eef994e00728c1cbed9f693879bbade | [
"CC0-1.0"
] | null | null | null | smrf/utils/wind/model.py | scotthavens/smrf | a492d01a5eef994e00728c1cbed9f693879bbade | [
"CC0-1.0"
] | null | null | null | smrf/utils/wind/model.py | scotthavens/smrf | a492d01a5eef994e00728c1cbed9f693879bbade | [
"CC0-1.0"
] | null | null | null | from __future__ import print_function
import os
# import matplotlib.pyplot as plt
# import progressbar
from datetime import datetime
import netCDF4 as nc
import numpy as np
from . import wind_c
class wind_model():
"""
Estimating wind speed and direction is complex terrain can be difficult due
to the i... | 31.879017 | 84 | 0.554495 |
f7de1d5cac455cea8db2fc9d2b93935c816a13d8 | 485 | py | Python | tests/unit/schema/test_paths.py | grktsh/openapi-core | d4ada7bcbb9b13f5c5dd090988c35be7a0d141b7 | [
"BSD-3-Clause"
] | null | null | null | tests/unit/schema/test_paths.py | grktsh/openapi-core | d4ada7bcbb9b13f5c5dd090988c35be7a0d141b7 | [
"BSD-3-Clause"
] | null | null | null | tests/unit/schema/test_paths.py | grktsh/openapi-core | d4ada7bcbb9b13f5c5dd090988c35be7a0d141b7 | [
"BSD-3-Clause"
] | null | null | null | import mock
import pytest
from openapi_core.schema.paths.models import Path
class TestPaths(object):
@pytest.fixture
def path(self):
operations = {
'get': mock.sentinel.get,
'post': mock.sentinel.post,
}
return Path('/path', operations)
@property
def ... | 22.045455 | 50 | 0.606186 |
f7de5846bba912628519d32b77634a2e4670472c | 2,204 | py | Python | test.py | ChiLlx/Modified-3D-UNet-Pytorch | 0b3bb64bbfa7c5422b2fc85d0c4eb37c0773afec | [
"MIT"
] | 193 | 2018-04-17T07:28:16.000Z | 2022-03-23T00:34:43.000Z | test.py | ChiLlx/Modified-3D-UNet-Pytorch | 0b3bb64bbfa7c5422b2fc85d0c4eb37c0773afec | [
"MIT"
] | 7 | 2018-07-16T01:54:23.000Z | 2020-12-04T06:55:02.000Z | test.py | ChiLlx/Modified-3D-UNet-Pytorch | 0b3bb64bbfa7c5422b2fc85d0c4eb37c0773afec | [
"MIT"
] | 50 | 2018-08-13T23:06:19.000Z | 2021-12-09T09:42:13.000Z | import numpy as np
import SimpleITK as sitk
import cPickle as pickle
import os
import pprint
from dataset import load_dataset, BraTS2018List, BatchGenerator3D_random_sampling
import paths
from torch.utils.data import DataLoader
from sklearn.model_selection import train_test_split
def testDataPreprocessing(pat_id = 0)... | 30.611111 | 149 | 0.761797 |
f7de6f5dcddaeed30acc4d23e3dd77a22b901967 | 1,480 | py | Python | examples/plot_square_h2_poincare_disk.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | examples/plot_square_h2_poincare_disk.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | examples/plot_square_h2_poincare_disk.py | opeltre/geomstats | 135d5bb6f19e29dd453c68399e04100a9e2c76bf | [
"MIT"
] | null | null | null | """
Plot a square on H2 with Poincare Disk visualization.
"""
import os
import matplotlib.pyplot as plt
import numpy as np
import geomstats.visualization as visualization
from geomstats.geometry.hyperbolic_space import HyperbolicSpace
H2 = HyperbolicSpace(dimension=2)
METRIC = H2.metric
SQUARE_SIZE = 50
def main... | 26.909091 | 72 | 0.613514 |
f7de780b325a17818a9528b24c529dcf9d6331da | 1,764 | py | Python | ch06/code/ch06-01_sym_diff.py | MatthiasWunsch/python-geospatial-analysis-cookbook | 88946ca6242283c9110488c64ac44057a53e2831 | [
"MIT"
] | 98 | 2015-06-14T08:42:21.000Z | 2022-03-09T16:48:43.000Z | ch06/code/ch06-01_sym_diff.py | MatthiasWunsch/python-geospatial-analysis-cookbook | 88946ca6242283c9110488c64ac44057a53e2831 | [
"MIT"
] | 6 | 2015-12-23T09:56:33.000Z | 2022-02-13T20:06:05.000Z | ch06/code/ch06-01_sym_diff.py | MatthiasWunsch/python-geospatial-analysis-cookbook | 88946ca6242283c9110488c64ac44057a53e2831 | [
"MIT"
] | 43 | 2015-08-24T13:13:32.000Z | 2022-03-14T20:55:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from os.path import realpath
from shapely.geometry import MultiPolygon
from shapely.geometry import asShape
from shapely.wkt import dumps
# define our files input and output locations
input_fairways = realpath("../geodata/pebble-beach-fairways-3857.geojson")
... | 32.666667 | 74 | 0.764172 |
f7ded512915b9513b42e7d9cda2a68c0b84840e7 | 14,529 | py | Python | amplify/backend/function/tempsearch/src/index.py | theEpsilon/slr-tool | 941d01dc108d6d2ceadced0a92ac63fa518ebab2 | [
"Apache-2.0"
] | null | null | null | amplify/backend/function/tempsearch/src/index.py | theEpsilon/slr-tool | 941d01dc108d6d2ceadced0a92ac63fa518ebab2 | [
"Apache-2.0"
] | null | null | null | amplify/backend/function/tempsearch/src/index.py | theEpsilon/slr-tool | 941d01dc108d6d2ceadced0a92ac63fa518ebab2 | [
"Apache-2.0"
] | null | null | null | import string
import json
import springer_api
import elsevier_api
import ieee_api
from enum import Enum
import os
import boto3
def handler(event, context):
"""
Takes the search given by event and returns a 20 records per api,
or if page = 0 saves the search.
ExampleEvent = {
"event":
... | 28.266537 | 120 | 0.457568 |
f7ded935aa02b80a392293b89a9d4c057e6ee61f | 10,097 | py | Python | taf/testlib/linux/iperf/iperf_cmd.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 10 | 2016-12-16T00:05:58.000Z | 2018-10-30T17:48:25.000Z | taf/testlib/linux/iperf/iperf_cmd.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 40 | 2017-01-04T23:07:05.000Z | 2018-04-16T19:52:02.000Z | taf/testlib/linux/iperf/iperf_cmd.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 23 | 2016-12-30T05:03:53.000Z | 2020-04-01T08:40:24.000Z | # Copyright (c) 2016 - 2017, Intel Corporation.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 33.996633 | 99 | 0.555809 |
f7df006bf8882449997d0c13974e4b3897c143f0 | 6,985 | py | Python | tasks.py | scartill/cmd2 | 1b4e1e25f84bcc800a5f369783c3c3448a42361e | [
"MIT"
] | 1 | 2021-07-06T23:59:46.000Z | 2021-07-06T23:59:46.000Z | tasks.py | scartill/cmd2 | 1b4e1e25f84bcc800a5f369783c3c3448a42361e | [
"MIT"
] | null | null | null | tasks.py | scartill/cmd2 | 1b4e1e25f84bcc800a5f369783c3c3448a42361e | [
"MIT"
] | null | null | null | #
# coding=utf-8
# flake8: noqa E302
"""Development related tasks to be run with 'invoke'.
Make sure you satisfy the following Python module requirements if you are trying to publish a release to PyPI:
- twine >= 1.11.0
- wheel >= 0.31.0
- setuptools >= 39.1.0
"""
import os
import re
import shutil
import s... | 28.627049 | 210 | 0.697065 |
f7df375589340a32f9ae49549e0d4a19b69cf4ef | 744 | py | Python | study/matplotlib-datatime.py | CrtomirJuren/npTDMS | cbebbf31d3977af06dbfa7f9602c89627134621d | [
"MIT"
] | 2 | 2021-02-04T05:40:01.000Z | 2021-04-06T14:34:55.000Z | study/matplotlib-datatime.py | CrtomirJuren/npTDMS | cbebbf31d3977af06dbfa7f9602c89627134621d | [
"MIT"
] | null | null | null | study/matplotlib-datatime.py | CrtomirJuren/npTDMS | cbebbf31d3977af06dbfa7f9602c89627134621d | [
"MIT"
] | 2 | 2021-02-04T05:40:15.000Z | 2021-12-25T06:07:54.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 27 13:22:05 2020
@author: crtjur
"""
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import numpy as np
import datetime as dt
np.random.seed(1)
N = 100
y = np.random.rand(N)
start = dt.datetime.now()
duration = 10
delta = dt.timedelta(days=1)
print(d... | 19.578947 | 69 | 0.709677 |
f7df7e8895d354f44a19d92882611be471b81b44 | 3,603 | py | Python | src/CompartmentalSystems/bins/TsTpField.py | goujou/CompartmentalSystems | 4724555c33f11395ddc32738e8dfed7349ee155f | [
"MIT"
] | null | null | null | src/CompartmentalSystems/bins/TsTpField.py | goujou/CompartmentalSystems | 4724555c33f11395ddc32738e8dfed7349ee155f | [
"MIT"
] | null | null | null | src/CompartmentalSystems/bins/TsTpField.py | goujou/CompartmentalSystems | 4724555c33f11395ddc32738e8dfed7349ee155f | [
"MIT"
] | null | null | null | # vim: set ff=unix expandtab ts=4 sw=4:
import numpy as np
import matplotlib
# matplotlib.use("Agg")
import matplotlib.pyplot as plt
import matplotlib.animation as manimation
from matplotlib.collections import PolyCollection
from matplotlib.colors import colorConverter
from .TimeField import TimeField
from .TsTpBin i... | 33.361111 | 87 | 0.582848 |
f7df860917be8c4c5c30da1111fa3d0b5b493c19 | 1,030 | py | Python | tests/pymath/test_saddle_points.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 3 | 2017-05-02T10:28:13.000Z | 2019-02-06T09:10:11.000Z | tests/pymath/test_saddle_points.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2017-06-21T20:39:14.000Z | 2020-02-25T10:28:57.000Z | tests/pymath/test_saddle_points.py | JASTYN/pythonmaster | 46638ab09d28b65ce5431cd0759fe6df272fb85d | [
"Apache-2.0",
"MIT"
] | 2 | 2016-07-29T04:35:22.000Z | 2017-01-18T17:05:36.000Z | """Tests for the saddle-points exercise
Implementation note:
The saddle_points function must validate the input matrix and raise a
ValueError with a meaningful error message if the matrix turns out to be
irregular.
"""
import unittest
from pymath.saddle_points import saddle_points
class SaddlePointTest(unittest.Tes... | 28.611111 | 72 | 0.628155 |
f7dfa27172c532bc144e49e2a3b7ee4c48832d2e | 6,713 | py | Python | mdf/remote/__init__.py | manahl/mdf | 4b2c78084467791ad883c0b4c53832ad70fc96ef | [
"MIT"
] | 100 | 2015-06-14T23:38:41.000Z | 2019-10-28T03:23:28.000Z | mdf/remote/__init__.py | ahlmss/mdf | 4b2c78084467791ad883c0b4c53832ad70fc96ef | [
"MIT"
] | 6 | 2016-12-28T11:22:12.000Z | 2018-12-02T23:01:08.000Z | mdf/remote/__init__.py | manahl/mdf | 4b2c78084467791ad883c0b4c53832ad70fc96ef | [
"MIT"
] | 40 | 2015-07-21T17:13:56.000Z | 2019-07-29T21:26:49.000Z | """
Remote proxy objects for MDF.
Allows contexts to be constructed and evaluated in external processes
using Pyro4.
"""
from ..context import MDFContext
from ..runner import run
from . import serializer
import Pyro4
import copy
import sys
import Pyro4.util
import pickle
Pyro4.util.Serializer.pickle = pickle
# ins... | 31.516432 | 104 | 0.620587 |
f7dff35c3cd1a35dbef0d8891636c8c1ffe65c24 | 3,674 | py | Python | alipay/aop/api/domain/AlipayFundTransInnovateOrderQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayFundTransInnovateOrderQueryModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayFundTransInnovateOrderQueryModel.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.constant.ParamConstants import *
from alipay.aop.api.domain.Participant import Participant
class AlipayFundTransInnovateOrderQueryModel(object):
def __init__(self):
self._biz_scene = None
self._business_params = None
... | 30.616667 | 81 | 0.602885 |
f7e0348b31fee2bb8379134337eb930b8d173668 | 2,717 | py | Python | python/book-store/book_store_test.py | harshcurious/Exercism | 7cf05550ed242fe8ef942c8727ad28cc592e2e1e | [
"MIT"
] | 9 | 2020-12-12T03:29:33.000Z | 2021-08-11T13:08:06.000Z | python/book-store/book_store_test.py | harshcurious/Exercism | 7cf05550ed242fe8ef942c8727ad28cc592e2e1e | [
"MIT"
] | null | null | null | python/book-store/book_store_test.py | harshcurious/Exercism | 7cf05550ed242fe8ef942c8727ad28cc592e2e1e | [
"MIT"
] | 1 | 2020-11-02T10:40:06.000Z | 2020-11-02T10:40:06.000Z | import unittest
from book_store import total
# Tests adapted from `problem-specifications//canonical-data.json`
class BookStoreTest(unittest.TestCase):
def test_only_a_single_book(self):
basket = [1]
self.assertEqual(total(basket), 800)
def test_two_of_the_same_book(self):
basket = ... | 32.345238 | 88 | 0.644093 |
f7e05fbfa2af67f913cef6b3364536d6481bde15 | 52,610 | py | Python | larch/xrd/cifdb.py | Bob620/xraylarch | f8d38e6122cc0e8c990b0f024db3b503a5fbf057 | [
"BSD-2-Clause"
] | null | null | null | larch/xrd/cifdb.py | Bob620/xraylarch | f8d38e6122cc0e8c990b0f024db3b503a5fbf057 | [
"BSD-2-Clause"
] | null | null | null | larch/xrd/cifdb.py | Bob620/xraylarch | f8d38e6122cc0e8c990b0f024db3b503a5fbf057 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
'''
build American Mineralogist Crystal Structure Databse (amcsd)
'''
import os
import requests
import numpy as np
import six
from itertools import groupby
from distutils.version import StrictVersion
import larch
from .xrd_fitting import peaklocater
from .xrd_cif import create_cif, SPACEGROUPS... | 39.378743 | 122 | 0.512127 |
f7e079c0e7f83e05cb60f47281fd8d19040befc7 | 2,894 | py | Python | api/classification/siamese/score.py | xiafanzeng/Raman-Spectroscopy | ba0b8b7ad0d9b9487a7602b0a09a41d970f70598 | [
"MIT"
] | 4 | 2021-03-19T14:09:41.000Z | 2022-01-09T09:33:55.000Z | api/classification/siamese/score.py | xiafanzeng/Raman-Spectroscopy | ba0b8b7ad0d9b9487a7602b0a09a41d970f70598 | [
"MIT"
] | null | null | null | api/classification/siamese/score.py | xiafanzeng/Raman-Spectroscopy | ba0b8b7ad0d9b9487a7602b0a09a41d970f70598 | [
"MIT"
] | 1 | 2022-02-24T07:18:41.000Z | 2022-02-24T07:18:41.000Z | from keras.utils import Sequence
import numpy as np
import keras.backend as K
from tqdm import tqdm
from config import spectral_shape
class FeatureGen(Sequence):
def __init__(self, train, data, batch_size=64, verbose=1):
super(FeatureGen, self).__init__()
self.data = data
self.train... | 36.632911 | 83 | 0.59226 |
f7e087f3b88662778298a613c975cb8dad71ecfd | 5,802 | py | Python | foo_015a_global_hunger_index/foo_015a_global_hunger_index_processing.py | loganbyers/data-pre-processing | bbed4a86752ab11575825ae05b6234d06b23ff68 | [
"MIT"
] | null | null | null | foo_015a_global_hunger_index/foo_015a_global_hunger_index_processing.py | loganbyers/data-pre-processing | bbed4a86752ab11575825ae05b6234d06b23ff68 | [
"MIT"
] | null | null | null | foo_015a_global_hunger_index/foo_015a_global_hunger_index_processing.py | loganbyers/data-pre-processing | bbed4a86752ab11575825ae05b6234d06b23ff68 | [
"MIT"
] | null | null | null | import os
import pandas as pd
import urllib.request
import tabula
from carto.datasets import DatasetManager
from carto.auth import APIKeyAuthClient
import boto3
from botocore.exceptions import NoCredentialsError
from zipfile import ZipFile
# name of table on Carto where you want to upload data
# this should be a table... | 40.013793 | 151 | 0.756291 |
f7e0a22f50ee5e4978ac59dbe54e12324c9a6c9a | 2,534 | py | Python | lib/python3.8/site-packages/django_elasticsearch_dsl_drf/fields/common.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | null | null | null | lib/python3.8/site-packages/django_elasticsearch_dsl_drf/fields/common.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | 7 | 2020-06-06T01:06:19.000Z | 2022-02-10T11:15:14.000Z | lib/python3.8/site-packages/django_elasticsearch_dsl_drf/fields/common.py | ervinpepic/Kodecta_media_catalog | c1e0692d42ee4935a7e1ae7fec1913ddab3054f2 | [
"Apache-2.0"
] | 1 | 2020-11-04T03:21:24.000Z | 2020-11-04T03:21:24.000Z | """
Common fields.
"""
from rest_framework import serializers
from .helpers import to_representation
__title__ = 'django_elasticsearch_dsl_drf.fields.nested_fields'
__author__ = 'Artur Barseghyan <artur.barseghyan@gmail.com>'
__copyright__ = '2017-2019 Artur Barseghyan'
__license__ = 'GPL 2.0/LGPL 2.1'
__all__ = (
... | 25.857143 | 65 | 0.664562 |
f7e0e11180cbffeac663a8c43c1ab6e47f0ddec5 | 4,338 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/_container_service_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/_container_service_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_09_30_preview/aio/_container_service_client.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 ... | 44.721649 | 141 | 0.707699 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.