hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
aa2d658bf6eecc23e7845825a913f9c0632d171d | 50,811 | py | Python | qiskit_metal/qlibrary/core/base.py | TomVethaak/qiskit-metal | 0fd3049b16a2b28dc6890b696d67329a91da70b9 | [
"Apache-2.0"
] | null | null | null | qiskit_metal/qlibrary/core/base.py | TomVethaak/qiskit-metal | 0fd3049b16a2b28dc6890b696d67329a91da70b9 | [
"Apache-2.0"
] | null | null | null | qiskit_metal/qlibrary/core/base.py | TomVethaak/qiskit-metal | 0fd3049b16a2b28dc6890b696d67329a91da70b9 | [
"Apache-2.0"
] | 1 | 2022-01-26T06:21:27.000Z | 2022-01-26T06:21:27.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2021.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | 38.232506 | 102 | 0.58629 |
5c4ae145189874e8eebd87a4887386e1429fa322 | 1,175 | py | Python | sympy/strategies/traverse.py | eriknw/sympy | b7544e2bb74c011f6098a7e886fd77f41776c2c4 | [
"BSD-3-Clause"
] | 7 | 2015-01-14T06:55:33.000Z | 2018-08-11T14:43:52.000Z | sympy/strategies/traverse.py | pbeltran/sympy-1 | 94f92b36731c2bebe6de1037c063c2a258a8a399 | [
"BSD-3-Clause"
] | 1 | 2018-02-19T04:56:04.000Z | 2018-02-19T04:56:04.000Z | sympy/strategies/traverse.py | pbeltran/sympy-1 | 94f92b36731c2bebe6de1037c063c2a258a8a399 | [
"BSD-3-Clause"
] | 1 | 2016-04-24T14:39:22.000Z | 2016-04-24T14:39:22.000Z | """ Strategies to Traverse a Tree """
from util import basic_fns, expr_fns
from sympy.strategies.core import chain, do_one
def top_down(rule, fns=basic_fns):
""" Apply a rule down a tree running it on the top nodes first """
return chain(rule, lambda expr: sall(top_down(rule, fns), fns)(expr))
def bottom_up(r... | 37.903226 | 77 | 0.651064 |
6f02fcaa58dad0981b449eee505ecc45519262b0 | 1,004 | py | Python | ex105.py | arthurfas123/Curso-De-Python | c4a15d92811bd101a8562d2c3a90fe2d5a3c360d | [
"MIT"
] | null | null | null | ex105.py | arthurfas123/Curso-De-Python | c4a15d92811bd101a8562d2c3a90fe2d5a3c360d | [
"MIT"
] | null | null | null | ex105.py | arthurfas123/Curso-De-Python | c4a15d92811bd101a8562d2c3a90fe2d5a3c360d | [
"MIT"
] | null | null | null | def notas(*notas, sit=False):
"""
=> Função que lê uma quantidade indefinida de notas e retorna um dicionario
com quantidade de notas, notas, maior nota, menor nota, media e situação
como um parametro opçional.
:param notas: quantidade indefinida de notas de um determinado aluno.
:param sit: (... | 34.62069 | 104 | 0.623506 |
0218f60649b8c3ca843b43b78ec4f11b8d537fd8 | 18,536 | py | Python | sktime/forecasting/trend.py | mikofski/sktime | 87bdf36dbc0990f29942eb6f7fa56a8e6c5fa7b7 | [
"BSD-3-Clause"
] | 1 | 2019-12-23T16:57:14.000Z | 2019-12-23T16:57:14.000Z | sktime/forecasting/trend.py | mikofski/sktime | 87bdf36dbc0990f29942eb6f7fa56a8e6c5fa7b7 | [
"BSD-3-Clause"
] | null | null | null | sktime/forecasting/trend.py | mikofski/sktime | 87bdf36dbc0990f29942eb6f7fa56a8e6c5fa7b7 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# !/usr/bin/env python3 -u
# copyright: sktime developers, BSD-3-Clause License (see LICENSE file)
"""Implements trend based forecasters."""
__author__ = ["Anthony Jancso", "mloning", "aiwalter"]
__all__ = ["TrendForecaster", "PolynomialTrendForecaster", "STLForecaster"]
import numpy as np
imp... | 37.370968 | 88 | 0.641616 |
ea43000fa67e9c436fec501f01895b9f48511a0e | 1,459 | py | Python | haemapod/main.py | globalspin/haemapod | 990440d7c8f369bc5082f0aae5867a0a150613f1 | [
"MIT"
] | null | null | null | haemapod/main.py | globalspin/haemapod | 990440d7c8f369bc5082f0aae5867a0a150613f1 | [
"MIT"
] | 1 | 2015-03-24T21:25:45.000Z | 2015-03-24T21:25:45.000Z | haemapod/main.py | globalspin/haemapod | 990440d7c8f369bc5082f0aae5867a0a150613f1 | [
"MIT"
] | null | null | null | from google.appengine.ext.webapp import WSGIApplication
from google.appengine.ext.webapp.util import run_wsgi_app
from request_handler import RequestHandler
def application():
return WSGIApplication([
('/', RequestHandler.with_page('handlers.default')),
('/people/add', RequestHandler.with_page('handlers.peo... | 48.633333 | 98 | 0.721727 |
1a91572afce184707c214322b4415929e3e63a21 | 3,632 | py | Python | lib/world/render/ChunkRenderer.py | defgsus/thegame | 38a627d9108f1418b94b08831fd640dd87fbba83 | [
"MIT"
] | 1 | 2021-11-05T11:49:26.000Z | 2021-11-05T11:49:26.000Z | lib/world/render/ChunkRenderer.py | defgsus/thegame | 38a627d9108f1418b94b08831fd640dd87fbba83 | [
"MIT"
] | null | null | null | lib/world/render/ChunkRenderer.py | defgsus/thegame | 38a627d9108f1418b94b08831fd640dd87fbba83 | [
"MIT"
] | null | null | null | from ...opengl import *
from ...opengl import postproc
from .deferred.ChunkMeshRenderNode import ChunkMeshRenderNode
from .deferred.ChunkMeshLightingNode import ChunkMeshLightingNode
from .full.ChunkMeshAllNode import ChunkMeshAllNode
from .split.ChunkMeshWithoutLight import ChunkMeshWithoutLight
from .split.ChunkMeshO... | 40.355556 | 103 | 0.62913 |
eaf2636404414336a028aa6b88599d50fecf9f29 | 4,388 | py | Python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_management_lock_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_management_lock_client.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/locks/v2016_09_01/_management_lock_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 ... | 43.019608 | 137 | 0.698952 |
14c9d5d6681482e973d6157c46da1013acc5a912 | 6,283 | py | Python | zabbix/scripts/ali-ecs-monitor/ecs_bandwidth_monitor.py | harvey-zang/ali-tools | 3d34dcbd841f101de3e014adcf7117ec1221b8d7 | [
"Apache-2.0"
] | null | null | null | zabbix/scripts/ali-ecs-monitor/ecs_bandwidth_monitor.py | harvey-zang/ali-tools | 3d34dcbd841f101de3e014adcf7117ec1221b8d7 | [
"Apache-2.0"
] | null | null | null | zabbix/scripts/ali-ecs-monitor/ecs_bandwidth_monitor.py | harvey-zang/ali-tools | 3d34dcbd841f101de3e014adcf7117ec1221b8d7 | [
"Apache-2.0"
] | 1 | 2021-05-31T14:08:43.000Z | 2021-05-31T14:08:43.000Z | #! /usr/bin/env /usr/bin/python3.7
from aliyunsdkcore.client import AcsClient
from aliyunsdkecs.request.v20140526 import DescribeInstancesRequest
from aliyunsdkcms.request.v20170301 import QueryMetricLastRequest
import json
import sys
class ecsBandMonitor(object):
def __init__(self, ali_key, ali_secret, region_i... | 39.515723 | 163 | 0.594143 |
03f7ab3d9eb2cf738646e12e1d94c1cb186974ac | 4,558 | py | Python | scripts/get_uwsgi_args.py | emily101-gif/immport-galaxy | 8f353d1f9b4e0d044e1a9d0b1f928b440df78b8c | [
"CC-BY-3.0"
] | 1 | 2020-01-06T21:04:22.000Z | 2020-01-06T21:04:22.000Z | scripts/get_uwsgi_args.py | emily101-gif/immport-galaxy | 8f353d1f9b4e0d044e1a9d0b1f928b440df78b8c | [
"CC-BY-3.0"
] | 7 | 2019-04-26T12:29:58.000Z | 2022-03-02T04:33:12.000Z | scripts/get_uwsgi_args.py | emily101-gif/immport-galaxy | 8f353d1f9b4e0d044e1a9d0b1f928b440df78b8c | [
"CC-BY-3.0"
] | 7 | 2016-11-03T19:11:01.000Z | 2020-05-11T14:23:52.000Z | from __future__ import print_function
import os
import sys
from six import string_types
from six.moves import shlex_quote
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, 'lib')))
from galaxy.util.path import get_ext
from galaxy.util.properties import load_app_properties, nice_c... | 37.669421 | 130 | 0.647214 |
29cf0c762c31fc56cd53a64c787a1ae3e1c1173c | 412 | py | Python | packages/python/plotly/plotly/validators/isosurface/_value.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/isosurface/_value.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | packages/python/plotly/plotly/validators/isosurface/_value.py | mastermind88/plotly.py | efa70710df1af22958e1be080e105130042f1839 | [
"MIT"
] | null | null | null | import _plotly_utils.basevalidators
class ValueValidator(_plotly_utils.basevalidators.DataArrayValidator):
def __init__(self, plotly_name="value", parent_name="isosurface", **kwargs):
super(ValueValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | 34.333333 | 80 | 0.682039 |
b5abb6f4fa4464a18fb47e2c55fddb3b7afe4ba3 | 2,556 | py | Python | neural_network/constant.py | PurdueMINDS/SAGA | 3c64ad6f84d8d998c88341f62ac39aaa25a6727e | [
"Apache-2.0"
] | 1 | 2018-10-15T12:53:01.000Z | 2018-10-15T12:53:01.000Z | neural_network/constant.py | PurdueMINDS/SAGA | 3c64ad6f84d8d998c88341f62ac39aaa25a6727e | [
"Apache-2.0"
] | null | null | null | neural_network/constant.py | PurdueMINDS/SAGA | 3c64ad6f84d8d998c88341f62ac39aaa25a6727e | [
"Apache-2.0"
] | 1 | 2018-11-05T23:14:27.000Z | 2018-11-05T23:14:27.000Z | # Copyright 2018 Jianfei Gao, Leonardo Teixeira, Bruno Ribeiro.
#
# 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
#
# Unle... | 28.719101 | 86 | 0.669797 |
c776c9fdf3c612eb3132613caed18b3ae23c8e88 | 4,670 | py | Python | optimization/rgbd/step0_prepare_frontend_data.py | liubarnabas/hifi3dface | 33886a82aadd2da7ff7c2d5a91303413d096b778 | [
"Apache-2.0"
] | 442 | 2020-10-13T03:40:48.000Z | 2022-03-31T05:00:28.000Z | optimization/rgbd/step0_prepare_frontend_data.py | liubarnabas/hifi3dface | 33886a82aadd2da7ff7c2d5a91303413d096b778 | [
"Apache-2.0"
] | 33 | 2020-10-15T14:50:27.000Z | 2022-03-18T11:27:50.000Z | optimization/rgbd/step0_prepare_frontend_data.py | liubarnabas/hifi3dface | 33886a82aadd2da7ff7c2d5a91303413d096b778 | [
"Apache-2.0"
] | 99 | 2020-10-14T09:40:53.000Z | 2022-03-21T06:51:39.000Z | # -*- coding:utf8 -*-
"""
This file is part of the repo: https://github.com/tencent-ailab/hifi3dface
If you find the code useful, please cite our paper:
"High-Fidelity 3D Digital Human Head Creation from RGB-D Selfies."
ACM Transactions on Graphics 2021
Code: https://github.com/tencent-ailab/hifi3dface
Copyright (c... | 33.84058 | 81 | 0.643469 |
5ebeeaa7c986c270ae5afdbb2fbddccc9f640c0e | 28,432 | py | Python | mujoco-py-1.50.1.1/.eggs/imageio-2.13.5-py3.5.egg/imageio/plugins/ffmpeg.py | guen-a-park/stablebl_safedagger | a5b1b9357c2f50f32dbfdba1444499aae52f3de5 | [
"MIT"
] | 5 | 2022-01-05T00:41:46.000Z | 2022-03-21T07:22:58.000Z | mujoco-py-1.50.1.1/.eggs/imageio-2.13.5-py3.5.egg/imageio/plugins/ffmpeg.py | guen-a-park/stablebl_safedagger | a5b1b9357c2f50f32dbfdba1444499aae52f3de5 | [
"MIT"
] | null | null | null | mujoco-py-1.50.1.1/.eggs/imageio-2.13.5-py3.5.egg/imageio/plugins/ffmpeg.py | guen-a-park/stablebl_safedagger | a5b1b9357c2f50f32dbfdba1444499aae52f3de5 | [
"MIT"
] | 2 | 2022-03-20T17:35:44.000Z | 2022-03-21T18:30:31.000Z | # -*- coding: utf-8 -*-
# imageio is distributed under the terms of the (new) BSD License.
"""Read/Write video using FFMPEG
Backend Library: https://github.com/imageio/imageio-ffmpeg
.. note::
To use this plugin you have to install its backend::
pip install imageio[ffmpeg]
The ffmpeg format provides r... | 39.709497 | 88 | 0.575725 |
2aa79019004f02d265c59f93c17b35e758d1dfd2 | 1,838 | py | Python | src/bxcommon/messages/bloxroute/keep_alive_message.py | thabaptiser/bxcommon | ee8547c9fc68c71b8acf4ce0989a344681ea273c | [
"MIT"
] | null | null | null | src/bxcommon/messages/bloxroute/keep_alive_message.py | thabaptiser/bxcommon | ee8547c9fc68c71b8acf4ce0989a344681ea273c | [
"MIT"
] | null | null | null | src/bxcommon/messages/bloxroute/keep_alive_message.py | thabaptiser/bxcommon | ee8547c9fc68c71b8acf4ce0989a344681ea273c | [
"MIT"
] | null | null | null | from typing import Optional
from bxcommon import constants
from bxcommon.messages.bloxroute.abstract_bloxroute_message import AbstractBloxrouteMessage
from bxcommon.messages.bloxroute.protocol_version import PROTOCOL_VERSION
from bxcommon.utils.message_buffer_builder import PayloadElement, PayloadBlock
class KeepAli... | 36.039216 | 91 | 0.699674 |
0ef3435628ba579027ca9440403a2de775298d8b | 1,904 | py | Python | tests/services/requests/test_requests_service_config.py | Pineirin/invenio-requests | 7eb85365128e4189e4c81d154e8918b09aae033d | [
"MIT"
] | null | null | null | tests/services/requests/test_requests_service_config.py | Pineirin/invenio-requests | 7eb85365128e4189e4c81d154e8918b09aae033d | [
"MIT"
] | null | null | null | tests/services/requests/test_requests_service_config.py | Pineirin/invenio-requests | 7eb85365128e4189e4c81d154e8918b09aae033d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2021 TU Wien.
#
# Invenio-Requests is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
"""Test the service configuration."""
import pytest
from invenio_records_permissions.generators import AnyU... | 32.271186 | 76 | 0.772059 |
dfbafb3d7759dea7fa61390cb2cd233c4ff56599 | 1,039 | py | Python | examples/basic-ipc/bot.py | MeFaltaUnVerano21/discord-ext-ipc | 0e69ff62aa05a1891080b2b81e6035883acf6e2d | [
"Apache-2.0"
] | 1 | 2021-01-07T22:45:16.000Z | 2021-01-07T22:45:16.000Z | examples/basic-ipc/bot.py | MeFaltaUnVerano21/discord-ext-ipc | 0e69ff62aa05a1891080b2b81e6035883acf6e2d | [
"Apache-2.0"
] | 1 | 2021-02-09T00:38:52.000Z | 2021-02-09T00:38:52.000Z | examples/basic-ipc/bot.py | MeFaltaUnVerano21/discord-ext-ipc | 0e69ff62aa05a1891080b2b81e6035883acf6e2d | [
"Apache-2.0"
] | 2 | 2021-01-09T20:43:10.000Z | 2021-01-22T00:48:48.000Z | import discord
from discord.ext import commands, ipc
class MyBot(commands.Bot):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.ipc = ipc.Server(self, secret_key="my_secret_key") # create our IPC Server
async def on_ready(self):
"""Called upon the READY e... | 26.641026 | 88 | 0.658325 |
ed9664fbeffb2119304f380ce8a00cbd61e1f3f3 | 201 | py | Python | CodeChef/MISS_NUM/test2.py | afifabroory/CompetitiveProgramming | 231883eeab5abbd84005e80c5065dd02fd8430ef | [
"Unlicense"
] | null | null | null | CodeChef/MISS_NUM/test2.py | afifabroory/CompetitiveProgramming | 231883eeab5abbd84005e80c5065dd02fd8430ef | [
"Unlicense"
] | null | null | null | CodeChef/MISS_NUM/test2.py | afifabroory/CompetitiveProgramming | 231883eeab5abbd84005e80c5065dd02fd8430ef | [
"Unlicense"
] | null | null | null | from math import sqrt, floor
def factor(n):
factorization = list()
for d in range(1, n+1):
if n%d == 0:
factorization.append(d)
return factorization
print(factor(99))
| 18.272727 | 35 | 0.60199 |
05cc10ce3986c46408ad100420e91fb1f4ba99e3 | 10,862 | py | Python | plugins/modules/oci_opsi_sql_statistics_time_series_facts.py | hanielburton/oci-ansible-collection | dfdffde637f746d346ba35569be8c3a3407022f2 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_opsi_sql_statistics_time_series_facts.py | hanielburton/oci-ansible-collection | dfdffde637f746d346ba35569be8c3a3407022f2 | [
"Apache-2.0"
] | null | null | null | plugins/modules/oci_opsi_sql_statistics_time_series_facts.py | hanielburton/oci-ansible-collection | dfdffde637f746d346ba35569be8c3a3407022f2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Copyright (c) 2017, 2021 Oracle and/or its affiliates.
# This software is made available to you under the terms of the GPL 3.0 license or the Apache 2.0 license.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Apache License v2.0
# See LICENSE.TXT for d... | 37.19863 | 153 | 0.584607 |
098dddbc6d536d4a73496501c2e343c4822a6292 | 614 | py | Python | clip/mangled/__torch__/torch/nn/modules/linear/___torch_mangle_9472.py | shawwn/CLIP | ba33b4eb956e6f507b4b39468b3b7336ac2260a1 | [
"MIT"
] | 6 | 2021-01-09T14:34:17.000Z | 2021-06-13T06:46:43.000Z | clip/ViT-B-32-cuda/code/__torch__/torch/nn/modules/linear/___torch_mangle_9472.py | shawwn/CLIP | ba33b4eb956e6f507b4b39468b3b7336ac2260a1 | [
"MIT"
] | null | null | null | clip/ViT-B-32-cuda/code/__torch__/torch/nn/modules/linear/___torch_mangle_9472.py | shawwn/CLIP | ba33b4eb956e6f507b4b39468b3b7336ac2260a1 | [
"MIT"
] | 2 | 2021-01-09T10:30:04.000Z | 2021-01-09T18:43:29.000Z | class Linear(Module):
__parameters__ = ["weight", "bias", ]
__buffers__ = []
weight : Tensor
bias : Tensor
training : bool
def forward(self: __torch__.torch.nn.modules.linear.___torch_mangle_9472.Linear,
argument_1: Tensor) -> Tensor:
_0 = self.bias
output = torch.matmul(argument_1, torch.t(self... | 36.117647 | 83 | 0.705212 |
69d4341bfb711926ce56a3d87c48dc31cd70bc18 | 794 | py | Python | var/spack/repos/builtin/packages/py-lit/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-lit/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2021-11-09T20:28:40.000Z | 2022-03-15T03:26:33.000Z | var/spack/repos/builtin/packages/py-lit/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyLit(PythonPackage):
"""lit is a portable tool for executing LLVM and Clang style... | 37.809524 | 96 | 0.75063 |
87b2200d46623b525e39e93b1080d3000853433d | 4,065 | py | Python | repos.py | mw4rf/repos.py | 34fbdea2a3706663b045b8d61d827c86f4963b5b | [
"MIT"
] | null | null | null | repos.py | mw4rf/repos.py | 34fbdea2a3706663b045b8d61d827c86f4963b5b | [
"MIT"
] | null | null | null | repos.py | mw4rf/repos.py | 34fbdea2a3706663b045b8d61d827c86f4963b5b | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# MIT License
# Copyright (c) [2017] [mw4rf]
# 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 u... | 30.111111 | 108 | 0.680197 |
515862231ae95716ca1b5d2ff29b083c8f2fa3e6 | 3,888 | py | Python | util_kerasmodel_info.py | galsh17/cartwheel_train | a50abe18cfe8c1f0f24267c3efa8537ecf211e72 | [
"MIT"
] | 32 | 2018-09-04T08:51:08.000Z | 2022-02-22T02:04:38.000Z | util_kerasmodel_info.py | galsh17/cartwheel_train | a50abe18cfe8c1f0f24267c3efa8537ecf211e72 | [
"MIT"
] | 5 | 2019-05-27T07:54:52.000Z | 2022-01-11T10:14:25.000Z | util_kerasmodel_info.py | galsh17/cartwheel_train | a50abe18cfe8c1f0f24267c3efa8537ecf211e72 | [
"MIT"
] | 14 | 2018-06-22T15:29:39.000Z | 2021-09-28T12:58:37.000Z | #------------------------------------------------------------------------------#
# This script prints out info on the specified model.
# Can give you:
# a) Input output dimensions
# b) Sample Computation times for various input dimensions on your GPU
# c) FLOPS for the computation
#
# Author : Manohar Ku... | 37.028571 | 229 | 0.643519 |
53290a9b944ece1789d592932cc3697c9431f2f3 | 17,510 | py | Python | UROPcode/utlis/process.py | YingjieQiao/WebScraping | c5045e16e1ad2ac9dd85330cbacf9aa4abf08251 | [
"MIT"
] | 2 | 2020-07-30T17:20:32.000Z | 2021-08-12T20:03:39.000Z | UROPcode/utlis/process.py | YingjieQiao/WebScraping | c5045e16e1ad2ac9dd85330cbacf9aa4abf08251 | [
"MIT"
] | null | null | null | UROPcode/utlis/process.py | YingjieQiao/WebScraping | c5045e16e1ad2ac9dd85330cbacf9aa4abf08251 | [
"MIT"
] | 1 | 2021-10-02T10:41:19.000Z | 2021-10-02T10:41:19.000Z | import regex
import string
import unidecode
from os import path
from monty.fractions import gcd_float
from chemdataextractor.doc import Paragraph
from gensim.models.phrases import Phraser
from pymatgen.core.periodic_table import Element
from pymatgen.core.composition import Composition, CompositionError
PHRASER_PATH... | 49.185393 | 120 | 0.551571 |
a2daeeed69ec3b3e736b5cbe22ef9581ab66b369 | 2,987 | py | Python | django_extensions/management/commands/mail_debug.py | EvgeneOskin/django-extensions | f40be190de1102f663573e65cbb19b4d7da83864 | [
"MIT"
] | null | null | null | django_extensions/management/commands/mail_debug.py | EvgeneOskin/django-extensions | f40be190de1102f663573e65cbb19b4d7da83864 | [
"MIT"
] | null | null | null | django_extensions/management/commands/mail_debug.py | EvgeneOskin/django-extensions | f40be190de1102f663573e65cbb19b4d7da83864 | [
"MIT"
] | 1 | 2019-03-21T08:17:36.000Z | 2019-03-21T08:17:36.000Z | # coding=utf-8
import asyncore
import sys
from logging import getLogger
from smtpd import SMTPServer
from django.core.management.base import CommandError
from django_extensions.management.utils import setup_logger, signalcommand
from django_extensions.compat import CompatibilityBaseCommand as BaseCommand
logger = ge... | 34.333333 | 95 | 0.586207 |
710d44f55d3ca8555c7f41ede49ea8f72d0f9aeb | 18,455 | py | Python | datasets.py | rkolli929/DexiNed | 340909a74ebe19b889f30a20c4aa458c537ab86e | [
"MIT"
] | null | null | null | datasets.py | rkolli929/DexiNed | 340909a74ebe19b889f30a20c4aa458c537ab86e | [
"MIT"
] | null | null | null | datasets.py | rkolli929/DexiNed | 340909a74ebe19b889f30a20c4aa458c537ab86e | [
"MIT"
] | 2 | 2021-11-23T16:59:08.000Z | 2021-11-23T17:01:43.000Z | import os
import random
import cv2
import numpy as np
import torch
from torch.utils.data import Dataset
import json
DATASET_NAMES = [
'BIPED',
'BSDS',
'BSDS-RIND',
'BSDS300',
'CID',
'DCD',
'MDBD', #5
'PASCAL',
'NYUD',
'CLASSIC'
] # 8
def dataset_info(dataset_name, is_linux=T... | 37.895277 | 119 | 0.475427 |
6adef8a04726b0bb7ea377d0cdb322449a426eb4 | 50,191 | py | Python | psyneulink/library/components/mechanisms/modulatory/control/agt/lccontrolmechanism.py | AlirezaFarnia/PsyNeuLink | c66f8248d1391830e76c97df4b644e12a02c2b73 | [
"Apache-2.0"
] | null | null | null | psyneulink/library/components/mechanisms/modulatory/control/agt/lccontrolmechanism.py | AlirezaFarnia/PsyNeuLink | c66f8248d1391830e76c97df4b644e12a02c2b73 | [
"Apache-2.0"
] | null | null | null | psyneulink/library/components/mechanisms/modulatory/control/agt/lccontrolmechanism.py | AlirezaFarnia/PsyNeuLink | c66f8248d1391830e76c97df4b644e12a02c2b73 | [
"Apache-2.0"
] | null | null | null | # Princeton University licenses this file to You 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 writin... | 51.636831 | 125 | 0.694886 |
222ffc81bd61cd66210c0d4f7cec86da13bee072 | 25,986 | py | Python | src/utils/image_processing.py | V1ct0reo/lightning-fast-hydra | eb86d67da7c97b611c99dcee9c7208142286d4d6 | [
"MIT"
] | null | null | null | src/utils/image_processing.py | V1ct0reo/lightning-fast-hydra | eb86d67da7c97b611c99dcee9c7208142286d4d6 | [
"MIT"
] | null | null | null | src/utils/image_processing.py | V1ct0reo/lightning-fast-hydra | eb86d67da7c97b611c99dcee9c7208142286d4d6 | [
"MIT"
] | null | null | null | import argparse
import numpy
import cv2
import scipy
from scipy import ndimage
from random import randint
import random
import os
import shutil
from PIL import Image
from PIL import ImageEnhance
from PIL import ExifTags
from PIL import ImageFilter
# crop a random sized (60-100% of original image) square somewhere on... | 38.554896 | 208 | 0.619564 |
52b02cdbefdcf8b7245a961b1148c798c5219efe | 8,391 | py | Python | cirq/value/value_equality.py | jlmayfield/Cirq | dc1294f54118a9a4f92546ca13780b91615dd675 | [
"Apache-2.0"
] | 2 | 2019-04-02T10:22:21.000Z | 2019-06-19T04:54:04.000Z | cirq/value/value_equality.py | jlmayfield/Cirq | dc1294f54118a9a4f92546ca13780b91615dd675 | [
"Apache-2.0"
] | 4 | 2019-03-27T22:51:42.000Z | 2019-04-03T22:41:36.000Z | cirq/value/value_equality.py | jlmayfield/Cirq | dc1294f54118a9a4f92546ca13780b91615dd675 | [
"Apache-2.0"
] | 1 | 2019-03-27T21:30:44.000Z | 2019-03-27T21:30:44.000Z | # Copyright 2018 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 40.536232 | 80 | 0.687522 |
cc6e6b98363c8da89f9a58df0ea45636812d7df2 | 487 | py | Python | elasticapm/instrumentation/packages/zlib.py | lyrixderaven/apm-agent-python | e21b306da70995ca1582666378b7059495ff1bee | [
"BSD-3-Clause"
] | 2 | 2019-02-15T20:23:39.000Z | 2019-02-15T20:26:06.000Z | elasticapm/instrumentation/packages/zlib.py | lyrixderaven/apm-agent-python | e21b306da70995ca1582666378b7059495ff1bee | [
"BSD-3-Clause"
] | null | null | null | elasticapm/instrumentation/packages/zlib.py | lyrixderaven/apm-agent-python | e21b306da70995ca1582666378b7059495ff1bee | [
"BSD-3-Clause"
] | null | null | null | from elasticapm.instrumentation.packages.base import AbstractInstrumentedModule
from elasticapm.traces import capture_span
class ZLibInstrumentation(AbstractInstrumentedModule):
name = "zlib"
instrument_list = [("zlib", "compress"), ("zlib", "decompress")]
def call(self, module, method, wrapped, instance... | 37.461538 | 79 | 0.714579 |
c8a6ab6dc6cce760b76de003929be3f339d3db45 | 28,527 | py | Python | tests/unit/task/scenarios/neutron/test_network.py | jogeo/rally-openstack | 83437e7c5925d5d647cd28f1821b6d51687b0123 | [
"Apache-2.0"
] | null | null | null | tests/unit/task/scenarios/neutron/test_network.py | jogeo/rally-openstack | 83437e7c5925d5d647cd28f1821b6d51687b0123 | [
"Apache-2.0"
] | null | null | null | tests/unit/task/scenarios/neutron/test_network.py | jogeo/rally-openstack | 83437e7c5925d5d647cd28f1821b6d51687b0123 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014: Intel 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 a... | 42.833333 | 78 | 0.645879 |
edef1bc001a89b12b0cdfc92c2f11923c0c862bf | 1,426 | py | Python | model-optimizer/extensions/ops/Enter.py | fujunwei/dldt | 09497b7724de4be92629f7799b8538b483d809a2 | [
"Apache-2.0"
] | 1 | 2021-07-30T17:03:50.000Z | 2021-07-30T17:03:50.000Z | model-optimizer/extensions/ops/Enter.py | fujunwei/dldt | 09497b7724de4be92629f7799b8538b483d809a2 | [
"Apache-2.0"
] | null | null | null | model-optimizer/extensions/ops/Enter.py | fujunwei/dldt | 09497b7724de4be92629f7799b8538b483d809a2 | [
"Apache-2.0"
] | null | null | null | """
Copyright (C) 2018-2020 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 agreed to i... | 31.688889 | 105 | 0.685835 |
07e070e48b5f398342da7cb13c9421968e6c43f0 | 3,269 | py | Python | openprocurement/auctions/geb/tests/base.py | andrey484/openprocurement.auctions.geb | 05c9ea3db1b1d290521b1430286ff2e5064819cd | [
"Apache-2.0"
] | null | null | null | openprocurement/auctions/geb/tests/base.py | andrey484/openprocurement.auctions.geb | 05c9ea3db1b1d290521b1430286ff2e5064819cd | [
"Apache-2.0"
] | null | null | null | openprocurement/auctions/geb/tests/base.py | andrey484/openprocurement.auctions.geb | 05c9ea3db1b1d290521b1430286ff2e5064819cd | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from StringIO import StringIO
import json
import os
from openprocurement.auctions.core.tests.base import (
BaseWebTest as CoreBaseWebTest,
)
from openprocurement.auctions.core.tests.base import MOCK_CONFIG as BASE_MOCK_CONFIG
from openprocurement.auctions.core.utils import connection_mock_... | 30.839623 | 107 | 0.631386 |
0f753579159f1b6ea4b7987573167c66c3f5bae7 | 1,183 | py | Python | names/database.py | PuchatekwSzortach/names_database_builder | bdfdd293abb7889bf2f63ce1e9e278b0fe567bcb | [
"MIT"
] | 1 | 2021-07-28T05:14:14.000Z | 2021-07-28T05:14:14.000Z | names/database.py | PuchatekwSzortach/names_database_builder | bdfdd293abb7889bf2f63ce1e9e278b0fe567bcb | [
"MIT"
] | null | null | null | names/database.py | PuchatekwSzortach/names_database_builder | bdfdd293abb7889bf2f63ce1e9e278b0fe567bcb | [
"MIT"
] | null | null | null | import sqlalchemy
import sqlalchemy.ext.declarative
import sqlalchemy.orm
import sqlalchemy.event
def enforce_foreign_key_constraint(connection, record):
connection.execute('pragma foreign_keys=ON')
engine = sqlalchemy.create_engine('sqlite:///names.db', echo=False)
sqlalchemy.event.listen(engine, 'connect', enf... | 26.288889 | 84 | 0.754861 |
9fb1c22d750c42d4e739d4deef45c0e8ce9f3496 | 375 | py | Python | setup.py | sonhal/homemade-crypto-library | bb385d786d22f7adccfe1b84fa089e2d3848e16f | [
"MIT"
] | null | null | null | setup.py | sonhal/homemade-crypto-library | bb385d786d22f7adccfe1b84fa089e2d3848e16f | [
"MIT"
] | null | null | null | setup.py | sonhal/homemade-crypto-library | bb385d786d22f7adccfe1b84fa089e2d3848e16f | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='homemade_crypto',
version='0.0.1',
packages=find_packages(where="src"),
package_dir={"": "src"},
url='https://github.com/sonhal/homemade-crypto-library',
license='MIT',
author='sondre',
author_email='',
description='A homemade... | 26.785714 | 79 | 0.688 |
add194a3e774db45b161873a435654c7910496e4 | 288 | py | Python | apps/test_readfile/readTest.py | mjysh/smarties | e739680fc3195ca4107b64f773158fbec42753fb | [
"MIT"
] | null | null | null | apps/test_readfile/readTest.py | mjysh/smarties | e739680fc3195ca4107b64f773158fbec42753fb | [
"MIT"
] | null | null | null | apps/test_readfile/readTest.py | mjysh/smarties | e739680fc3195ca4107b64f773158fbec42753fb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 9 15:47:00 2021
@author: yusheng
"""
import sys
import numpy as np
import matplotlib.pyplot as plt
FILE = "./train/restarted_agent_00_net_"
ftype = np.float32
W = np.fromfile(FILE +"weights.raw", dtype=ftype) | 20.571429 | 56 | 0.684028 |
23b5e23af7194c7b2d15d72e0bc7cd29cc3afd0c | 4,839 | py | Python | utils/FinancesUtil.py | klpdotorg/disereports | 5d6290dbd684c4bb4093562c4882f21b818ec81f | [
"MIT"
] | null | null | null | utils/FinancesUtil.py | klpdotorg/disereports | 5d6290dbd684c4bb4093562c4882f21b818ec81f | [
"MIT"
] | null | null | null | utils/FinancesUtil.py | klpdotorg/disereports | 5d6290dbd684c4bb4093562c4882f21b818ec81f | [
"MIT"
] | null | null | null | import csv
import traceback
import codecs
import sys, os,traceback
def getFinancesText(data,lang,constype):
transDict = {}
f = codecs.open(os.path.join(os.getcwd(),'translations/fin_translations_text.csv'),'r','utf-8')
for line in f.readlines():
text = line.split('|')
if lang == 2:
tra... | 41.358974 | 211 | 0.600537 |
5d21b53988815315ed39adc30c9e83efb6a7ab12 | 6,877 | py | Python | src/third_party/wiredtiger/lang/python/wiredtiger/packing.py | EdwardPrentice/wrongo | 1e7c9136f5fab7040b5bd5df51b4946876625c88 | [
"Apache-2.0"
] | 25 | 2016-12-07T09:39:51.000Z | 2021-12-16T11:17:37.000Z | src/third_party/wiredtiger/lang/python/wiredtiger/packing.py | EdwardPrentice/wrongo | 1e7c9136f5fab7040b5bd5df51b4946876625c88 | [
"Apache-2.0"
] | 1 | 2022-03-05T02:55:28.000Z | 2022-03-05T05:28:00.000Z | src/third_party/wiredtiger/lang/python/wiredtiger/packing.py | EdwardPrentice/wrongo | 1e7c9136f5fab7040b5bd5df51b4946876625c88 | [
"Apache-2.0"
] | 23 | 2017-01-22T03:35:26.000Z | 2021-12-16T11:17:39.000Z | #!/usr/bin/env python
#
# Public Domain 2014-2016 MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compil... | 34.21393 | 87 | 0.518685 |
bf67d417114fa5ceceb01f63c396afd82dc19a10 | 2,460 | py | Python | userbot/modules/rastick.py | Daylight23/oub-remix | 3a85cbc956af0bd17bb18f8712df4fea25125203 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/rastick.py | Daylight23/oub-remix | 3a85cbc956af0bd17bb18f8712df4fea25125203 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/rastick.py | Daylight23/oub-remix | 3a85cbc956af0bd17bb18f8712df4fea25125203 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2020-09-08T16:22:51.000Z | 2020-09-08T16:22:51.000Z | import random
import re
from userbot import CMD_HELP, bot
from userbot.events import register
from asyncio import sleep
EMOJI_PATTERN = re.compile(
"["
"\U0001F1E0-\U0001F1FF" # flags (iOS)
"\U0001F300-\U0001F5FF" # symbols & pictographs
"\U0001F600-\U0001F64F" # emoticons
"\U0001F680-\U0001F6FF... | 20.847458 | 98 | 0.492276 |
25f2640ec6acd08c0f8453a9351ee554cc35f058 | 3,162 | py | Python | tensorflow_federated/python/research/optimization/emnist_ae/dataset.py | matech96/federated | b30a26d66162bd02a89a12f119e17925d161a26b | [
"Apache-2.0"
] | 1 | 2020-06-22T03:08:16.000Z | 2020-06-22T03:08:16.000Z | tensorflow_federated/python/research/optimization/emnist_ae/dataset.py | matech96/federated | b30a26d66162bd02a89a12f119e17925d161a26b | [
"Apache-2.0"
] | 7 | 2020-04-03T05:32:28.000Z | 2020-05-15T01:28:25.000Z | tensorflow_federated/python/research/optimization/emnist_ae/dataset.py | matech96/federated | b30a26d66162bd02a89a12f119e17925d161a26b | [
"Apache-2.0"
] | 2 | 2020-04-28T17:46:13.000Z | 2022-02-10T02:40:40.000Z | # Copyright 2019, The TensorFlow Federated 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 o... | 37.2 | 76 | 0.732448 |
e3c162691c2247844e2163cf960a5423e112c6bc | 5,946 | py | Python | blog/admin_app/views.py | skrsinghrahul/blog | ffa1ae6d9b411b2c6ff90fb00ecc0263f436ac18 | [
"MIT"
] | null | null | null | blog/admin_app/views.py | skrsinghrahul/blog | ffa1ae6d9b411b2c6ff90fb00ecc0263f436ac18 | [
"MIT"
] | 3 | 2020-06-05T19:00:26.000Z | 2021-06-01T22:31:16.000Z | blog/admin_app/views.py | skrsinghrahul/blog | ffa1ae6d9b411b2c6ff90fb00ecc0263f436ac18 | [
"MIT"
] | null | null | null | import time
from django.db.models import Q
from django.utils.text import slugify
from rest_framework import status, serializers
from rest_framework.generics import ListAPIView, CreateAPIView, UpdateAPIView
from rest_framework.response import Response
from admin_app.models import Blog, Topic
from admin_app.serializers... | 44.044444 | 102 | 0.659267 |
a645a8f724bb429d6811002925d90aacd8a1b978 | 7,770 | py | Python | src/eascheduler/jobs/job_base_datetime.py | spacemanspiff2007/eascheduler | 849fe8f43b7bbcb8db3e76c0dda2811eb935cf39 | [
"Apache-2.0"
] | null | null | null | src/eascheduler/jobs/job_base_datetime.py | spacemanspiff2007/eascheduler | 849fe8f43b7bbcb8db3e76c0dda2811eb935cf39 | [
"Apache-2.0"
] | 3 | 2021-04-08T11:02:31.000Z | 2022-02-14T06:07:56.000Z | src/eascheduler/jobs/job_base_datetime.py | spacemanspiff2007/eascheduler | 849fe8f43b7bbcb8db3e76c0dda2811eb935cf39 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from datetime import datetime
from datetime import time as dt_time
from datetime import timedelta
from random import uniform
from typing import Callable, Optional, Tuple, Union
from pendulum import DateTime, from_timestamp, instance
from pendulum import now as get_now
from pendulum ... | 39.846154 | 118 | 0.65148 |
af24a76ad69c3e81d2fd97da59cad5aa7f2d3243 | 12,449 | py | Python | zomato_distribution_api/zomato_wrapper.py | chetanrrk/Python_API_for_Zomato | 7047e498dd6aa11a4a6ba09cd3881f692b193d04 | [
"MIT"
] | null | null | null | zomato_distribution_api/zomato_wrapper.py | chetanrrk/Python_API_for_Zomato | 7047e498dd6aa11a4a6ba09cd3881f692b193d04 | [
"MIT"
] | null | null | null | zomato_distribution_api/zomato_wrapper.py | chetanrrk/Python_API_for_Zomato | 7047e498dd6aa11a4a6ba09cd3881f692b193d04 | [
"MIT"
] | null | null | null | import requests
import ast
import json
base_url = "https://developers.zomato.com/api/v2.1/"
class Zomato:
"""
Wrapper class to the zomato web api.
original source: https://github.com/sharadbhat/Zomatopy
"""
def __init__(self, key):
self.user_key = key
def get_categories(self):
... | 36.294461 | 127 | 0.594506 |
42f14f540405455089767bc46be4dc000695d2d2 | 60,036 | bzl | Python | tensorflow/workspace.bzl | bilisun/tensorflow | 4585e33550e84051ec2f0f1cedcc24894cc42b2f | [
"Apache-2.0"
] | 1 | 2022-02-22T08:41:05.000Z | 2022-02-22T08:41:05.000Z | tensorflow/workspace.bzl | bilisun/tensorflow | 4585e33550e84051ec2f0f1cedcc24894cc42b2f | [
"Apache-2.0"
] | null | null | null | tensorflow/workspace.bzl | bilisun/tensorflow | 4585e33550e84051ec2f0f1cedcc24894cc42b2f | [
"Apache-2.0"
] | null | null | null | # TensorFlow external dependencies that can be loaded in WORKSPACE files.
load("//third_party/gpus:cuda_configure.bzl", "cuda_configure")
load("//third_party/gpus:rocm_configure.bzl", "rocm_configure")
load("//third_party/tensorrt:tensorrt_configure.bzl", "tensorrt_configure")
load("//third_party/nccl:nccl_configure.b... | 48.809756 | 203 | 0.688937 |
1d44359e1302ad145ce6a95b5c28195425abaaca | 3,241 | py | Python | NeuralNets/backpropagation.py | lucassid/nn | a53213a3670088772212f5108cd36c9e8e5fb7b7 | [
"MIT"
] | 2 | 2018-05-05T16:45:18.000Z | 2018-06-08T13:40:53.000Z | NeuralNets/backpropagation.py | lucassid/nn | a53213a3670088772212f5108cd36c9e8e5fb7b7 | [
"MIT"
] | 1 | 2018-05-08T22:47:23.000Z | 2018-05-08T23:17:44.000Z | NeuralNets/backpropagation.py | lucassid/nn | a53213a3670088772212f5108cd36c9e8e5fb7b7 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib as mpl
#mpl.use("agg")
import matplotlib.style as style
import matplotlib.pyplot as plt
sigmoid = lambda z:np.tanh(z)
Dsigmoid = lambda z: (1/ np.cosh(z)) ** 2
gaussian = lambda x: np.exp(-1 * x**(2)) * 2 - 1
test = lambda x: 0.2 + 0.4 * x**2 + 0.3 * np.sin(15 * x) + 0.05 * np.cos(... | 26.349593 | 91 | 0.511262 |
9339567dbee502bab6ef8a06457daa04ba8fc8fd | 1,195 | py | Python | scripts/buffer_core_demo.py | lucasw/tf_demo | a9f333f14ec3e866c9a23aee46593b87efaa90ab | [
"BSD-3-Clause"
] | 2 | 2018-02-27T18:16:39.000Z | 2020-07-19T10:41:09.000Z | scripts/buffer_core_demo.py | lucasw/tf_demo | a9f333f14ec3e866c9a23aee46593b87efaa90ab | [
"BSD-3-Clause"
] | 2 | 2018-02-18T05:02:08.000Z | 2018-02-18T21:16:17.000Z | scripts/buffer_core_demo.py | lucasw/tf_demo | a9f333f14ec3e866c9a23aee46593b87efaa90ab | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import rospy
import tf2_ros
from geometry_msgs.msg import TransformStamped
buffer_core = tf2_ros.BufferCore(rospy.Duration(10.0))
ts1 = TransformStamped()
ts1.header.stamp = rospy.Time(0)
ts1.header.frame_id = 'map'
ts1.child_frame_id = 'frame1'
ts1.transform.translation.x = 2.71828183
ts1.transf... | 33.194444 | 78 | 0.743933 |
0b1ff24c56bf398caf8b5a1d05922600ecdacd1b | 634 | py | Python | julie/mathemathics/equations.py | MarcelloBB/julieutils | cffba53a1561d05660c2274ce0a9485bf9e0ddcf | [
"MIT"
] | 2 | 2021-08-23T15:16:43.000Z | 2021-11-01T15:29:02.000Z | julie/mathemathics/equations.py | MarcelloBB/julieutils | cffba53a1561d05660c2274ce0a9485bf9e0ddcf | [
"MIT"
] | null | null | null | julie/mathemathics/equations.py | MarcelloBB/julieutils | cffba53a1561d05660c2274ce0a9485bf9e0ddcf | [
"MIT"
] | null | null | null | import math
class Equation:
def __init__(self, a : float, b : float, c : float) -> None:
self.a, self.b, self.c, self.delta = a, b, c, (b**2 - 4 * a * c);
def solve(self) -> float:
# Case 1: [Delta > 0]
if self.delta > 0:
x1 = ((-self.b + math.sqrt(self.delta)) / (2 * self.... | 24.384615 | 73 | 0.443218 |
a87d59679d946d87fecbf7a5e7ff91ed8398d509 | 795 | py | Python | sensors/pi_config.py | TerryHowe/coopernetes | 32b4c3926bde9deb2fa98c1595cf54afbcfa0387 | [
"MIT"
] | null | null | null | sensors/pi_config.py | TerryHowe/coopernetes | 32b4c3926bde9deb2fa98c1595cf54afbcfa0387 | [
"MIT"
] | null | null | null | sensors/pi_config.py | TerryHowe/coopernetes | 32b4c3926bde9deb2fa98c1595cf54afbcfa0387 | [
"MIT"
] | null | null | null | import os
import yaml
class PiConfig(object):
def __init__(self):
try:
config_file = './config.yaml'
sample_config_file = './sample_config.yaml'
if (not os.path.exists(config_file) and
os.path.exists(sample_config_file)):
config_file = sam... | 31.8 | 62 | 0.532075 |
1539730e23bf40a2622e342ea929013b0fd25c80 | 1,858 | py | Python | h2o-py/tests/testdir_munging/binop/pyunit_binop2_gt.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 6,098 | 2015-05-22T02:46:12.000Z | 2022-03-31T16:54:51.000Z | h2o-py/tests/testdir_munging/binop/pyunit_binop2_gt.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 2,517 | 2015-05-23T02:10:54.000Z | 2022-03-30T17:03:39.000Z | h2o-py/tests/testdir_munging/binop/pyunit_binop2_gt.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 2,199 | 2015-05-22T04:09:55.000Z | 2022-03-28T22:20:45.000Z | import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
def binop_gt():
iris = h2o.import_file(path=pyunit_utils.locate("smalldata/iris/iris_wheader.csv"))
rows, cols = iris.dim
iris.show()
#frame/scaler
res = iris > 5
res_rows, res_cols = res.dim
... | 25.108108 | 87 | 0.624865 |
a80352d71a6be4fd2a790fa10569c8a689d6ee20 | 37,884 | py | Python | aiogram/types/inline_query_result.py | Nebulino/aiogram | 30a1fdc940338adb12fea4494758750174e79223 | [
"MIT"
] | 3 | 2020-12-06T16:55:53.000Z | 2021-11-19T19:25:57.000Z | aiogram/types/inline_query_result.py | Nebulino/aiogram | 30a1fdc940338adb12fea4494758750174e79223 | [
"MIT"
] | 1 | 2019-10-18T19:33:20.000Z | 2019-10-18T19:33:20.000Z | aiogram/types/inline_query_result.py | Nebulino/aiogram | 30a1fdc940338adb12fea4494758750174e79223 | [
"MIT"
] | 2 | 2020-12-30T09:51:30.000Z | 2021-11-10T16:50:28.000Z | import typing
from . import base
from . import fields
from .inline_keyboard import InlineKeyboardMarkup
from .input_message_content import InputMessageContent
class InlineQueryResult(base.TelegramObject):
"""
This object represents one result of an inline query.
Telegram clients currently support result... | 51.194595 | 120 | 0.622189 |
82599c4d39d4d6a4e020b37707b946c6e6c0afab | 101 | py | Python | Backend/DungeonDirector/Direction.py | LukasKlein00/SWEProjekt2021 | 70144e1436a86c476302754c0233a4e4c8180457 | [
"MIT"
] | 6 | 2021-03-13T09:07:16.000Z | 2021-04-24T11:59:39.000Z | Backend/DungeonDirector/Direction.py | LukasKlein00/SWEProjekt2021 | 70144e1436a86c476302754c0233a4e4c8180457 | [
"MIT"
] | 50 | 2021-05-01T15:59:02.000Z | 2021-05-20T18:57:28.000Z | Backend/DungeonDirector/Direction.py | LukasKlein00/SWEProjekt2021 | 70144e1436a86c476302754c0233a4e4c8180457 | [
"MIT"
] | 2 | 2021-04-21T23:04:07.000Z | 2021-05-01T09:56:12.000Z | from enum import Enum
class Direction(Enum):
north = 0
south = 1
west = 2
east = 3
| 11.222222 | 22 | 0.574257 |
1c16feceb4475df0acfaa5e232507e59611abe2d | 2,046 | py | Python | evogtk/gui/accessclasslib/checkbutton.py | R3v1L/evogtk | 9f951a08770e99ffd701a1994ba948aa8014f2af | [
"MIT"
] | null | null | null | evogtk/gui/accessclasslib/checkbutton.py | R3v1L/evogtk | 9f951a08770e99ffd701a1994ba948aa8014f2af | [
"MIT"
] | null | null | null | evogtk/gui/accessclasslib/checkbutton.py | R3v1L/evogtk | 9f951a08770e99ffd701a1994ba948aa8014f2af | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
###############################################################################
# Copyright (C) 2008 EVO Sistemas Libres <central@evosistemas.com>
# 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 F... | 35.275862 | 122 | 0.607038 |
d7874b074f4cbadc856e44338e9aa029ce17dfc2 | 15,864 | py | Python | pysal/explore/pointpats/process.py | ocefpaf/pysal | 7e397bdb4c22d4e2442b4ee88bcd691d2421651d | [
"BSD-3-Clause"
] | 1 | 2021-08-16T02:47:35.000Z | 2021-08-16T02:47:35.000Z | pysal/explore/pointpats/process.py | ocefpaf/pysal | 7e397bdb4c22d4e2442b4ee88bcd691d2421651d | [
"BSD-3-Clause"
] | null | null | null | pysal/explore/pointpats/process.py | ocefpaf/pysal | 7e397bdb4c22d4e2442b4ee88bcd691d2421651d | [
"BSD-3-Clause"
] | 1 | 2016-11-11T19:20:51.000Z | 2016-11-11T19:20:51.000Z | """
Simulation of planar point processes
TODO
- inhibition process(es)
- optimize draws for complex windows
- documentation
"""
__author__ = "Serge Rey sjsrey@gmail.com"
__all__ = ['PointProcess', 'PoissonPointProcess', 'PoissonClusterPointProcess']
import numpy as np
import pysal.lib as ps
from numpy.random import... | 34.713348 | 101 | 0.551437 |
c973eb37b57816bd162f4c4018e34745e78863d6 | 4,305 | py | Python | userbot/plugins/markdown_IQ.py | TeleOniOn/TeleOniOn | 9d6c676267e3dd991952e2d7166fac646fe7f2fc | [
"Apache-2.0"
] | null | null | null | userbot/plugins/markdown_IQ.py | TeleOniOn/TeleOniOn | 9d6c676267e3dd991952e2d7166fac646fe7f2fc | [
"Apache-2.0"
] | null | null | null | userbot/plugins/markdown_IQ.py | TeleOniOn/TeleOniOn | 9d6c676267e3dd991952e2d7166fac646fe7f2fc | [
"Apache-2.0"
] | null | null | null | #@TeleOniOn
import re
from functools import partial
from telethon import events
from telethon.tl.functions.messages import EditMessageRequest
from telethon.extensions.markdown import DEFAULT_URL_RE
from telethon.utils import add_surrogate, del_surrogate
from telethon.tl.types import (
MessageEntityBold, MessageEnt... | 29.486301 | 82 | 0.61626 |
3447f9e459485c55d24cca265df52ade0a2ea701 | 4,896 | py | Python | demo/uncertainty_demo.py | bottydim/dginn | c6b638b2df1e1fe57a76961b18c68dceee55ac38 | [
"BSD-3-Clause"
] | null | null | null | demo/uncertainty_demo.py | bottydim/dginn | c6b638b2df1e1fe57a76961b18c68dceee55ac38 | [
"BSD-3-Clause"
] | null | null | null | demo/uncertainty_demo.py | bottydim/dginn | c6b638b2df1e1fe57a76961b18c68dceee55ac38 | [
"BSD-3-Clause"
] | null | null | null | if __name__ == '__main__':
import tensorflow as tf
tf.compat.v1.enable_eager_execution()
import os
from collections import defaultdict
import dill as pickle
from aggregator_utils import compute_dg_per_datapoint
from aggregator_utils import get_count_aggregators, extract_dgs_by_ids
from core import *
from co... | 33.081081 | 112 | 0.705882 |
62fdc94af2d52ce5ddd6690a881e26bef034856d | 21,290 | py | Python | trac/ticket/notification.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | 1 | 2017-08-03T07:04:28.000Z | 2017-08-03T07:04:28.000Z | trac/ticket/notification.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | null | null | null | trac/ticket/notification.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2009 Edgewall Software
# Copyright (C) 2003-2005 Daniel Lundin <daniel@edgewall.com>
# Copyright (C) 2005-2006 Emmanuel Blot <emmanuel.blot@free.fr>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as p... | 40.863724 | 79 | 0.519822 |
afe61f47a159dfc0fe69c69ca9542e8ee7bfc5af | 9,355 | py | Python | modules/api/functional_test/live_tests/recordsets/get_recordset_test.py | slandry90/vinyldns | bf3122bdd5058af53561224adb1984e3b9f1f5bc | [
"Apache-2.0"
] | 333 | 2018-07-27T12:58:40.000Z | 2022-03-16T23:05:37.000Z | modules/api/functional_test/live_tests/recordsets/get_recordset_test.py | slandry90/vinyldns | bf3122bdd5058af53561224adb1984e3b9f1f5bc | [
"Apache-2.0"
] | 1,010 | 2018-07-27T14:43:14.000Z | 2022-03-25T09:29:43.000Z | modules/api/functional_test/live_tests/recordsets/get_recordset_test.py | slandry90/vinyldns | bf3122bdd5058af53561224adb1984e3b9f1f5bc | [
"Apache-2.0"
] | 123 | 2018-07-26T20:06:04.000Z | 2022-02-16T17:12:17.000Z | import pytest
import uuid
from utils import *
from hamcrest import *
from vinyldns_python import VinylDNSClient
def test_get_recordset_no_authorization(shared_zone_test_context):
"""
Test getting a recordset without authorization
"""
client = shared_zone_test_context.ok_vinyldns_client
client.get_... | 40.497835 | 110 | 0.656547 |
f65d6e2d53d9176145030b1c5ac550c129f5a5ae | 263 | py | Python | src/python/374.guessNumber.py | witimlfl/leetcode-exercise | 9449c41fa03b996a37923f1dede0933753691282 | [
"MIT"
] | null | null | null | src/python/374.guessNumber.py | witimlfl/leetcode-exercise | 9449c41fa03b996a37923f1dede0933753691282 | [
"MIT"
] | null | null | null | src/python/374.guessNumber.py | witimlfl/leetcode-exercise | 9449c41fa03b996a37923f1dede0933753691282 | [
"MIT"
] | null | null | null | ##
#我们正在玩一个猜数字游戏。 游戏规则如下:
#我从 1 到 n 选择一个数字。 你需要猜我选择了哪个数字。
#每次你猜错了,我会告诉你这个数字是大了还是小了。
#你调用一个预先定义好的接口 guess(int num),它会返回 3 个可能的结果(-1,1 或 0):
#-1 : 我的数字比较小
# 1 : 我的数字比较大
# 0 : 恭喜!你猜对了!
# #
class Solution:
def guessNumber(self, n: int) -> int:
return n; | 18.785714 | 54 | 0.646388 |
3fa1b93cc6f9df37c4ed9c0133fbacbac5784c6c | 1,082 | py | Python | py3/tflib/ops/mlp.py | fr42k/gap-wgan-gp | 4e373c43d606a1b83f76893d93f9cf8be8cd460d | [
"MIT"
] | null | null | null | py3/tflib/ops/mlp.py | fr42k/gap-wgan-gp | 4e373c43d606a1b83f76893d93f9cf8be8cd460d | [
"MIT"
] | null | null | null | py3/tflib/ops/mlp.py | fr42k/gap-wgan-gp | 4e373c43d606a1b83f76893d93f9cf8be8cd460d | [
"MIT"
] | null | null | null | import tflib as lib
import tflib.ops.linear
import tensorflow as tf
def _ReLULayer(name, input_dim, output_dim, inputs):
output = lib.ops.linear.Linear(
name+'.Linear',
input_dim=input_dim,
output_dim=output_dim,
inputs=inputs,
initialization='glorot_he'
)
# output... | 23.021277 | 67 | 0.59427 |
6480c6fd234378be80d778c442f12fe46365d118 | 812 | py | Python | ChinaDistrict/ChinaDistrict/urls.py | singleye/Grocery | d009ea4a4447c9cbb913e16a66fa9e8f3ec99ffc | [
"MIT"
] | null | null | null | ChinaDistrict/ChinaDistrict/urls.py | singleye/Grocery | d009ea4a4447c9cbb913e16a66fa9e8f3ec99ffc | [
"MIT"
] | null | null | null | ChinaDistrict/ChinaDistrict/urls.py | singleye/Grocery | d009ea4a4447c9cbb913e16a66fa9e8f3ec99ffc | [
"MIT"
] | null | null | null | """ChinaDistrict URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class... | 35.304348 | 77 | 0.708128 |
35a5d21bd6b2213ec7af85882d4067297695df17 | 2,891 | py | Python | users/webservice/sensor/bought_history.py | RaphaelPrevost/Back2Shops | 5f2d369e82fe2a7b9b3a6c55782319b23d142dfd | [
"CECILL-B"
] | null | null | null | users/webservice/sensor/bought_history.py | RaphaelPrevost/Back2Shops | 5f2d369e82fe2a7b9b3a6c55782319b23d142dfd | [
"CECILL-B"
] | 6 | 2021-03-31T19:21:50.000Z | 2022-01-13T01:46:09.000Z | users/webservice/sensor/bought_history.py | RaphaelPrevost/Back2Shops | 5f2d369e82fe2a7b9b3a6c55782319b23d142dfd | [
"CECILL-B"
] | null | null | null | # -*- coding: utf-8 -*-
#############################################################################
#
# Copyright © Dragon Dollar Limited
# contact: contact@dragondollar.com
#
# This software is a collection of webservices designed to provide a secure
# and scalable framework to build e-commerce websites.
#
# This s... | 43.149254 | 88 | 0.690419 |
9ba48cc0103c66e24e2340ab53fb72c6c47e68d4 | 9,937 | py | Python | pyswarms/single/global_best.py | msat59/pyswarms | 0196301cee4a6c46e98186e3dc451393f0854ce8 | [
"MIT"
] | null | null | null | pyswarms/single/global_best.py | msat59/pyswarms | 0196301cee4a6c46e98186e3dc451393f0854ce8 | [
"MIT"
] | null | null | null | pyswarms/single/global_best.py | msat59/pyswarms | 0196301cee4a6c46e98186e3dc451393f0854ce8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
A Global-best Particle Swarm Optimization (gbest PSO) algorithm.
It takes a set of candidate solutions, and tries to find the best
solution using a position-velocity update method. Uses a
star-topology where each particle is attracted to the best
performing particle.
The position update ... | 37.357143 | 113 | 0.615377 |
800e6bef32823c09dc095cc31b16483b38617647 | 710 | py | Python | setup.py | vtecftwy/ecutils | bb599663df355a35edd525747a04e241a45f6b34 | [
"MIT"
] | 2 | 2021-06-10T02:06:17.000Z | 2021-06-14T04:57:17.000Z | setup.py | vtecftwy/ecutils | bb599663df355a35edd525747a04e241a45f6b34 | [
"MIT"
] | null | null | null | setup.py | vtecftwy/ecutils | bb599663df355a35edd525747a04e241a45f6b34 | [
"MIT"
] | null | null | null | from setuptools import setup
# https://pythonhosted.org/an_example_pypi_project/setuptools.html
setup(
name='ecutils',
version='1.0.0b',
author='EC',
author_email='bitbucker@procurasia.com',
packages=['ecutils'],
scripts=[],
url='',
license='LICENSE.txt',
description='Set of utility functions used in several... | 22.1875 | 66 | 0.666197 |
80aa4c2b596f70bef15e213b57e573367fb3cc97 | 4,898 | py | Python | src/holophrasm/build_payout_data_set.py | princeton-vl/MetaGen | 6963b973f7b5da8e868ff8ad22033e319976d6cb | [
"BSD-2-Clause"
] | 16 | 2020-11-13T15:25:49.000Z | 2022-02-17T02:06:25.000Z | src/holophrasm/build_payout_data_set.py | princeton-vl/MetaGen | 6963b973f7b5da8e868ff8ad22033e319976d6cb | [
"BSD-2-Clause"
] | 2 | 2021-06-03T20:41:50.000Z | 2022-01-04T06:45:16.000Z | src/holophrasm/build_payout_data_set.py | princeton-vl/MetaGen | 6963b973f7b5da8e868ff8ad22033e319976d6cb | [
"BSD-2-Clause"
] | 4 | 2020-12-12T02:36:49.000Z | 2021-06-03T19:21:52.000Z | import pickle as pickle
import interface
import withpool
import data_utils5 as data
import heapq
import numpy as np
import time
'''
Figure out the data set.
For each validation proposition, do the following:
list all the entails proof steps
for each proof step:
find the ten best next steps using pred ... | 31.397436 | 120 | 0.626786 |
4b97f80e6db4561fede052fc2630cb1705d6b11e | 1,855 | py | Python | tools/saber_plot/diag.py | NOAA-EMC/saber | 9e9081573757f2c524f4a9ff33838d47961ae4fb | [
"Apache-2.0"
] | 3 | 2020-10-29T21:59:35.000Z | 2021-12-17T18:44:40.000Z | tools/saber_plot/diag.py | NOAA-EMC/saber | 9e9081573757f2c524f4a9ff33838d47961ae4fb | [
"Apache-2.0"
] | null | null | null | tools/saber_plot/diag.py | NOAA-EMC/saber | 9e9081573757f2c524f4a9ff33838d47961ae4fb | [
"Apache-2.0"
] | 3 | 2020-10-30T17:15:36.000Z | 2021-06-29T19:16:52.000Z | #!/usr/bin/env python3
import argparse
from netCDF4 import Dataset
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import numpy.ma as ma
import os
def diag(testdata, test, mpi, omp, suffix, testfig):
"""! Plot script for the "diagnostic" files produced by BUMP"""
# Open file
f = Dataset... | 30.409836 | 118 | 0.56442 |
10a8c62b9f619636e5c609b19129769285dbbc40 | 1,536 | py | Python | setup.py | moreati/doctest-prefix-all-the-strings | 886d94261afb5586ecbf8b701c766dcb29fdcd6d | [
"Apache-2.0"
] | null | null | null | setup.py | moreati/doctest-prefix-all-the-strings | 886d94261afb5586ecbf8b701c766dcb29fdcd6d | [
"Apache-2.0"
] | null | null | null | setup.py | moreati/doctest-prefix-all-the-strings | 886d94261afb5586ecbf8b701c766dcb29fdcd6d | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
import io
import os
def read(fname, encoding='utf-8'):
here = os.path.dirname(__file__)
with io.open(os.path.join(here, fname), encoding=encoding) as f:
return f.read()
setup(
name='pretext',
version='0.0.4',
description='Use doctest with bytes, str & unicode... | 32.680851 | 78 | 0.626953 |
01ba907a6f782e12d39359d431ec19d6190beeab | 2,644 | py | Python | src/simulation.py | oKermorgant/ros2_2020 | d6008446db4b14092f48a5ec66f08f8438481632 | [
"MIT"
] | 3 | 2021-01-07T21:24:29.000Z | 2021-05-12T04:13:55.000Z | src/simulation.py | oKermorgant/ros2_2020 | d6008446db4b14092f48a5ec66f08f8438481632 | [
"MIT"
] | null | null | null | src/simulation.py | oKermorgant/ros2_2020 | d6008446db4b14092f48a5ec66f08f8438481632 | [
"MIT"
] | 1 | 2021-01-09T02:40:29.000Z | 2021-01-09T02:40:29.000Z | #!/usr/bin/env python3
import rclpy
from rclpy.node import Node
import numpy as np
from geometry_msgs.msg import Twist, TransformStamped
from tf2_ros import TransformBroadcaster
a = 2
b = 3
dt = 0.05
class Robot:
def __init__(self, node, name):
self.name = name
self.tf = TransformStamped... | 26.178218 | 73 | 0.49357 |
e3f51a16815448c7e661ab273f7e3246c0a3696a | 724 | py | Python | Python/B9-Sanduhr_rueckwaerts/B9-Sanduhr_rueckwaerts.py | frankyhub/Calliope | 335f0ef5ca9bcf57e14166319501ec9086bc09bf | [
"MIT"
] | null | null | null | Python/B9-Sanduhr_rueckwaerts/B9-Sanduhr_rueckwaerts.py | frankyhub/Calliope | 335f0ef5ca9bcf57e14166319501ec9086bc09bf | [
"MIT"
] | null | null | null | Python/B9-Sanduhr_rueckwaerts/B9-Sanduhr_rueckwaerts.py | frankyhub/Calliope | 335f0ef5ca9bcf57e14166319501ec9086bc09bf | [
"MIT"
] | null | null | null | Reihe = 0
Spalte = 0
def on_button_pressed_a():
global Reihe, Spalte
basic.show_leds("""
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
""")
Reihe = 0
Spalte = 0
for index in range(5):
for index2 in range(5):
led... | 22.625 | 55 | 0.43232 |
ece41a236dd85c1d68602fba2604eac373823ee4 | 8,739 | py | Python | processor/processor_protonet.py | maxstrobel/HCN-PrototypeLoss-PyTorch | 442d5915b36ecc21dfe98970b85757d2772e6d35 | [
"MIT"
] | 24 | 2019-03-02T06:09:26.000Z | 2021-12-13T17:21:30.000Z | processor/processor_protonet.py | maxstrobel/HCN-PrototypeLoss-PyTorch | 442d5915b36ecc21dfe98970b85757d2772e6d35 | [
"MIT"
] | 1 | 2019-03-02T03:17:30.000Z | 2019-03-19T11:49:34.000Z | processor/processor_protonet.py | maxstrobel/HCN-PrototypeLoss-PyTorch | 442d5915b36ecc21dfe98970b85757d2772e6d35 | [
"MIT"
] | 5 | 2019-03-21T15:31:42.000Z | 2020-05-30T17:41:28.000Z | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.utils.data import DataLoader
from tqdm import tqdm
from processor.processor import Processor
from processor.utils.utils import DictAction, euclidean_dist
class ProcessorProtoNet(Processor):
"""
Processor for trai... | 40.271889 | 109 | 0.606591 |
7f0e818420902b999d6f027898cebc484c10d4b7 | 6,221 | py | Python | omaha_server/omaha/builder.py | dentalwings/omaha-server | 3d8e18c8f4aac4eb16445c0f3160ed1fc2fc8de5 | [
"Apache-2.0"
] | 2 | 2019-06-13T20:47:18.000Z | 2022-03-31T03:14:54.000Z | omaha_server/omaha/builder.py | dentalwings/omaha-server | 3d8e18c8f4aac4eb16445c0f3160ed1fc2fc8de5 | [
"Apache-2.0"
] | 1 | 2020-02-26T20:03:27.000Z | 2020-02-26T20:03:27.000Z | omaha_server/omaha/builder.py | dentalwings/omaha-server | 3d8e18c8f4aac4eb16445c0f3160ed1fc2fc8de5 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
This software is licensed under the Apache 2 license, quoted below.
Copyright 2014 Crystalnix Limited
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... | 33.627027 | 102 | 0.665327 |
9c17019aa26c2b72d006b13279654c8cba939b82 | 3,139 | py | Python | django_mailbox/south_migrations/0006_auto__add_field_message_in_reply_to.py | mathandpencil/django-mailbox | 2932403417f51e51bec7ca2146cd294b3faef4a4 | [
"MIT"
] | null | null | null | django_mailbox/south_migrations/0006_auto__add_field_message_in_reply_to.py | mathandpencil/django-mailbox | 2932403417f51e51bec7ca2146cd294b3faef4a4 | [
"MIT"
] | null | null | null | django_mailbox/south_migrations/0006_auto__add_field_message_in_reply_to.py | mathandpencil/django-mailbox | 2932403417f51e51bec7ca2146cd294b3faef4a4 | [
"MIT"
] | null | null | null | import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Message.in_reply_to'
db.add_column('django_mailbox_message', 'in_reply_to',
self.gf('django.db... | 57.072727 | 215 | 0.614845 |
4aaa3f0a0a0b91a6139c800d10e7fdfbb82a7304 | 210 | py | Python | app/favorite/renderers.py | tonyguesswho/favorite-things | cab2ff4a68ce468dbcbe2d6dd42991bcad9fc127 | [
"MIT"
] | null | null | null | app/favorite/renderers.py | tonyguesswho/favorite-things | cab2ff4a68ce468dbcbe2d6dd42991bcad9fc127 | [
"MIT"
] | 5 | 2021-03-09T13:00:32.000Z | 2022-02-26T15:45:12.000Z | app/favorite/renderers.py | tonyguesswho/favorite-things | cab2ff4a68ce468dbcbe2d6dd42991bcad9fc127 | [
"MIT"
] | 2 | 2020-01-16T08:39:49.000Z | 2020-01-17T16:18:44.000Z | from core.renderers import CoreJSONRenderer
class FavoriteJsonRenderer(CoreJSONRenderer):
object_label = 'favorite'
pagination_object_label = 'favorites'
pagination_count_label = 'favoritesCount'
| 26.25 | 45 | 0.8 |
bcfc43dcc756eaaba86e1f1498174a9666d540f0 | 9,328 | py | Python | MANN/Model.py | hmishra2250/NTM-One-Shot-TF | bff66a87e89b65103375691b5512bac4ce4bd55f | [
"MIT"
] | 265 | 2017-01-26T17:56:57.000Z | 2021-08-09T11:44:45.000Z | MANN/Model.py | hmishra2250/NTM-One-Shot-TF | bff66a87e89b65103375691b5512bac4ce4bd55f | [
"MIT"
] | 11 | 2017-05-09T21:42:26.000Z | 2019-05-13T06:50:10.000Z | MANN/Model.py | hmishra2250/NTM-One-Shot-TF | bff66a87e89b65103375691b5512bac4ce4bd55f | [
"MIT"
] | 86 | 2017-01-30T17:38:39.000Z | 2021-07-17T03:31:31.000Z | import tensorflow as tf
import numpy as np
from .Utils.init import weight_and_bias_init, shared_glorot_uniform, shared_one_hot
from .Utils.similarities import cosine_similarity
from .Utils.tf_utils import shared_float32
from .Utils.tf_utils import update_tensor
def memory_augmented_neural_network(input_var, target_v... | 64.331034 | 184 | 0.680532 |
db229cbcf96c19129bd02c109ae027569dfac030 | 1,163 | py | Python | user/migrations/0001_initial.py | zhongmei57485/SwiperPro | b00dde5af05f158d7cd2c649e8a07a2c19623b69 | [
"Apache-2.0"
] | null | null | null | user/migrations/0001_initial.py | zhongmei57485/SwiperPro | b00dde5af05f158d7cd2c649e8a07a2c19623b69 | [
"Apache-2.0"
] | 9 | 2019-12-04T23:48:54.000Z | 2021-06-10T18:31:57.000Z | user/migrations/0001_initial.py | zhongmei57485/SwiperPro | b00dde5af05f158d7cd2c649e8a07a2c19623b69 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.1 on 2019-07-17 19:45
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.AutoField(aut... | 36.34375 | 170 | 0.522786 |
cd5893d04810839d7027be2fe50cdc2b940b120c | 346 | py | Python | mrp_system/migrations/0038_auto_20190114_1348.py | mgeorge8/django_time | f75a442941b0ebbb6cc46a6d18e42b91695b7e57 | [
"MIT"
] | 1 | 2018-11-09T02:09:14.000Z | 2018-11-09T02:09:14.000Z | mrp_system/migrations/0038_auto_20190114_1348.py | mgeorge8/django_time | f75a442941b0ebbb6cc46a6d18e42b91695b7e57 | [
"MIT"
] | null | null | null | mrp_system/migrations/0038_auto_20190114_1348.py | mgeorge8/django_time | f75a442941b0ebbb6cc46a6d18e42b91695b7e57 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.2 on 2019-01-14 13:48
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('mrp_system', '0037_billofmaterials_amount'),
]
operations = [
migrations.RenameModel(
old_name='BillofMaterials',
new_name='... | 19.222222 | 54 | 0.612717 |
d893d9b38ba3cdbb39582156d0fcb9ede9ebe1e1 | 1,603 | py | Python | selene/wait.py | KalinkinaMaria/selene | 859e1102c85740b52af8d0f08dd6b6490b4bd2ff | [
"MIT"
] | null | null | null | selene/wait.py | KalinkinaMaria/selene | 859e1102c85740b52af8d0f08dd6b6490b4bd2ff | [
"MIT"
] | 1 | 2021-06-02T04:21:17.000Z | 2021-06-02T04:21:17.000Z | selene/wait.py | vkarpenko/selene | 4776357430c940be38f38be9981006dd156f9730 | [
"MIT"
] | null | null | null | import six
import time
from selenium.common.exceptions import TimeoutException
from selene.abctypes.conditions import IEntityCondition
def wait_for(entity, condition, timeout=4, polling=0.1):
# type: (object, IEntityCondition, int) -> object
end_time = time.time() + timeout
while True:
try:
... | 34.847826 | 110 | 0.570805 |
364baa5a110741b4405535ea81ed76f9302348f5 | 985 | py | Python | setup.py | cmccandless/homectl | 338b09583b9817a11bf55df7c4db6143b43d74f9 | [
"MIT"
] | null | null | null | setup.py | cmccandless/homectl | 338b09583b9817a11bf55df7c4db6143b43d74f9 | [
"MIT"
] | null | null | null | setup.py | cmccandless/homectl | 338b09583b9817a11bf55df7c4db6143b43d74f9 | [
"MIT"
] | null | null | null | import setuptools
from homectl.__version__ import VERSION
if __name__ == '__main__':
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="homectl",
version=VERSION,
author="Corey McCandless",
author_email="crm1994@gmail.com",
d... | 29.848485 | 54 | 0.57868 |
150ec851b06d04877e9140def5f6f13ab4540575 | 292 | py | Python | src/utils/install.py | project-delphi/object-detector | 0caf4f8c676f433286e99425baa2ad7c8350f711 | [
"BSD-3-Clause"
] | 8 | 2019-06-16T22:44:50.000Z | 2022-01-23T17:11:27.000Z | src/utils/install.py | project-delphi/object-detector | 0caf4f8c676f433286e99425baa2ad7c8350f711 | [
"BSD-3-Clause"
] | null | null | null | src/utils/install.py | project-delphi/object-detector | 0caf4f8c676f433286e99425baa2ad7c8350f711 | [
"BSD-3-Clause"
] | 1 | 2022-01-23T17:11:41.000Z | 2022-01-23T17:11:41.000Z | from os import chdir
from subprocess import run
def install_retinanet():
run('git clone https://github.com/fizyr/keras-retinanet.git'.split(' '))
chdir('keras-retinanet')
run('pip install /content/keras-retinanet/'.split(' '))
run('python setup.py build_ext --inplace'.split(' '))
| 26.545455 | 74 | 0.708904 |
4f5b63b9ca4715331d83934eac853e385980a522 | 809 | py | Python | setup.py | casimp/cpex | ef22860c9f1b1fe7faaa093c480a07c4f8ef34a0 | [
"MIT"
] | 1 | 2021-04-17T00:09:02.000Z | 2021-04-17T00:09:02.000Z | setup.py | casimp/cpex | ef22860c9f1b1fe7faaa093c480a07c4f8ef34a0 | [
"MIT"
] | null | null | null | setup.py | casimp/cpex | ef22860c9f1b1fe7faaa093c480a07c4f8ef34a0 | [
"MIT"
] | 2 | 2021-07-18T02:43:11.000Z | 2022-03-16T03:25:28.000Z | from setuptools import setup
setup(
name='cpex',
version='0.1',
author='C. Simpson',
author_email='c.a.simpson01@gmail.com',
packages=['cpex'],
include_package_data=True,
url='https://github.com/casimp/cpex',
download_url = 'https://github.com/casimp/cpex/tarball/v0.1',
license='LIC... | 35.173913 | 96 | 0.641533 |
23f1af6bdbae70dc1a4423499e7dc960f84aa8fa | 936 | py | Python | dfp/get_device_capabilities.py | surensilva/dfp-prebid-setup | 394a6b7ba8208aa45a3a9241158fc77e07b77c96 | [
"MIT"
] | null | null | null | dfp/get_device_capabilities.py | surensilva/dfp-prebid-setup | 394a6b7ba8208aa45a3a9241158fc77e07b77c96 | [
"MIT"
] | null | null | null | dfp/get_device_capabilities.py | surensilva/dfp-prebid-setup | 394a6b7ba8208aa45a3a9241158fc77e07b77c96 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import sys
from googleads import ad_manager
from dfp.client import get_client
logger = logging.getLogger(__name__)
def get_device_capabilities():
"""
Gets Device capabilities.
Args:
order_id(str): the id of the DFP orderrd
Returns:
arr... | 19.5 | 69 | 0.689103 |
909fee69ec78b5b1519f052bc3f8bd05c9cd8446 | 4,120 | py | Python | src/bluetooth/bluetooth_service.py | mikaponics/mikapod-soil-rpi | 5090a2cf7d252b7e53fe25680048732c0c9cecb9 | [
"BSD-3-Clause"
] | null | null | null | src/bluetooth/bluetooth_service.py | mikaponics/mikapod-soil-rpi | 5090a2cf7d252b7e53fe25680048732c0c9cecb9 | [
"BSD-3-Clause"
] | null | null | null | src/bluetooth/bluetooth_service.py | mikaponics/mikapod-soil-rpi | 5090a2cf7d252b7e53fe25680048732c0c9cecb9 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import datetime
import signal
import time
import json
from serial import Serial
import Pyro4
import pytz
from foundation import *
class ServiceExit(Exception):
"""
Custom exception which is used to trigger the clean exit
of all running threads and the main progr... | 35.826087 | 169 | 0.6 |
d1bbcbefdc21f7aacec04508ef2ae3a1badfcffc | 323 | py | Python | lp_solver.py | DenisAltruist/NEFreeSamplesFinder | 56e550332bef26251730742897c08dc604113673 | [
"MIT"
] | 1 | 2019-11-06T17:45:38.000Z | 2019-11-06T17:45:38.000Z | lp_solver.py | DenisAltruist/NEFreeSamplesFinder | 56e550332bef26251730742897c08dc604113673 | [
"MIT"
] | null | null | null | lp_solver.py | DenisAltruist/NEFreeSamplesFinder | 56e550332bef26251730742897c08dc604113673 | [
"MIT"
] | null | null | null | from scipy.optimize import linprog
import time
import numpy as np
def solve(A, b):
c = np.zeros(len(A[0])).tolist()
res = linprog(c=c, A_ub=A, b_ub=b, bounds=(None, None), method='interior-point')
return res['success'], np.array(res['x']).tolist()
def is_feasible(A, b):
res, sol = solve(A, b)
return res, ... | 26.916667 | 82 | 0.659443 |
3da5cf2abc80c206d7dcbb44a3e5077e417db332 | 1,910 | py | Python | check_nodes.py | backster82/check_kubernetes | e4b82cc2abf0459832a3876e862184d7fe897a9e | [
"Apache-2.0"
] | 14 | 2018-07-17T12:48:47.000Z | 2020-11-25T14:57:00.000Z | check_nodes.py | backster82/check_kubernetes | e4b82cc2abf0459832a3876e862184d7fe897a9e | [
"Apache-2.0"
] | 3 | 2019-03-15T08:06:37.000Z | 2019-09-23T09:57:59.000Z | check_nodes.py | backster82/check_kubernetes | e4b82cc2abf0459832a3876e862184d7fe897a9e | [
"Apache-2.0"
] | 5 | 2019-08-28T12:59:08.000Z | 2021-08-10T06:03:37.000Z | #!/usr/bin/env python
"""
Check for Kubernetes Nodes
"""
import argparse
from kubernetes import config, client
import nagiosplugin
from version import __version__ as version
class Nodes(nagiosplugin.Resource):
"""
Check for Kubernetes Nodes
"""
def __init__(self, kube_config):
self.kube_co... | 28.507463 | 103 | 0.615707 |
b3af738793af3106f39d573803e3d7b8c0120957 | 10,555 | py | Python | kivy/core/video/video_ffpyplayer.py | CharaD7/kivy | 85065fe6633f5ac831c193dc84e3f636b789cc3a | [
"MIT"
] | null | null | null | kivy/core/video/video_ffpyplayer.py | CharaD7/kivy | 85065fe6633f5ac831c193dc84e3f636b789cc3a | [
"MIT"
] | null | null | null | kivy/core/video/video_ffpyplayer.py | CharaD7/kivy | 85065fe6633f5ac831c193dc84e3f636b789cc3a | [
"MIT"
] | 1 | 2019-04-12T05:43:48.000Z | 2019-04-12T05:43:48.000Z | '''
FFmpeg based video abstraction
==============================
To use, you need to install ffpyplyaer and have a compiled ffmpeg shared
library.
https://github.com/matham/ffpyplayer
The docs there describe how to set this up. But briefly, first you need to
compile ffmpeg using the shared flags while disabling... | 32.779503 | 80 | 0.591473 |
0b8c26bda4f832cc278bcb452a517a8b7c5435b4 | 4,588 | py | Python | contrib/testgen/gen_base58_test_vectors.py | DemoCoin-Dev/democoin | 4f3ee2a4484a05140cc1066a299afae7c120b0d2 | [
"MIT"
] | 1 | 2018-10-15T00:55:42.000Z | 2018-10-15T00:55:42.000Z | contrib/testgen/gen_base58_test_vectors.py | DemoCoin-Dev/democoin | 4f3ee2a4484a05140cc1066a299afae7c120b0d2 | [
"MIT"
] | null | null | null | contrib/testgen/gen_base58_test_vectors.py | DemoCoin-Dev/democoin | 4f3ee2a4484a05140cc1066a299afae7c120b0d2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2012-2018 The Democoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Generate valid and invalid base58 address and private key test vectors.
Usage:
gen_base58_test_v... | 34.496241 | 91 | 0.613775 |
0d6c00e9a179eb1633c8daea1a310e4906878c1f | 4,469 | py | Python | PythonCode/Gravity Simulation/main.py | sansy98/sansy_repo | bf67dfc9770223b9c87b328c92992095a660d36f | [
"MIT"
] | 2 | 2020-06-11T06:51:25.000Z | 2020-10-06T18:57:02.000Z | PythonCode/Gravity Simulation/main.py | sansy98/sansy_repo | bf67dfc9770223b9c87b328c92992095a660d36f | [
"MIT"
] | null | null | null | PythonCode/Gravity Simulation/main.py | sansy98/sansy_repo | bf67dfc9770223b9c87b328c92992095a660d36f | [
"MIT"
] | null | null | null | import pygame as pg
from pygame.locals import *
from math import sqrt
SIZE = 750
G = 6.67 * 10**-11
class Particle():
def __init__(self, pos, m):
self.x = pos[0]
self.y = pos[1]
self.v = 0 #Particle's velocity, starts at 0
self.d = SIZE-pos[1]/3... | 39.548673 | 148 | 0.531886 |
47c19d1fa99543db277add104d0e8899d5d44b17 | 1,429 | py | Python | hgvs/utils/reftranscriptdata.py | naomifox/hgvs | 5007142191cac8dba2272bad5b945a27c0a5cf87 | [
"Apache-2.0"
] | null | null | null | hgvs/utils/reftranscriptdata.py | naomifox/hgvs | 5007142191cac8dba2272bad5b945a27c0a5cf87 | [
"Apache-2.0"
] | null | null | null | hgvs/utils/reftranscriptdata.py | naomifox/hgvs | 5007142191cac8dba2272bad5b945a27c0a5cf87 | [
"Apache-2.0"
] | null | null | null | from Bio.Seq import Seq
from hgvs.exceptions import HGVSDataNotAvailableError
class RefTranscriptData(object):
def __init__(self, hdp, tx_ac, pro_ac):
"""helper for generating RefTranscriptData from for c_to_p"""
tx_info = hdp.get_tx_identity_info(tx_ac)
tx_seq = hdp.get_seq(tx_ac)
... | 39.694444 | 168 | 0.682295 |
01da27d92c9929fe7ff7c5cb18521b2140736abc | 12,731 | py | Python | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/ad_group_criterion_service/transports/grpc.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 7 | 2021-02-21T10:39:41.000Z | 2021-12-07T07:31:28.000Z | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/ad_group_criterion_service/transports/grpc.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 6 | 2021-02-02T23:46:11.000Z | 2021-11-15T01:46:02.000Z | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/ad_group_criterion_service/transports/grpc.py | googleapis/googleapis-gen | d84824c78563d59b0e58d5664bfaa430e9ad7e7a | [
"Apache-2.0"
] | 4 | 2021-01-28T23:25:45.000Z | 2021-08-30T01:55:16.000Z | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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.467857 | 112 | 0.634593 |
b0b74b8cbec73ac2d2c379e44f4e1a5200253bbd | 1,477 | py | Python | tkinter/pynput-keylogger/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 140 | 2017-02-21T22:49:04.000Z | 2022-03-22T17:51:58.000Z | tkinter/pynput-keylogger/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 5 | 2017-12-02T19:55:00.000Z | 2021-09-22T23:18:39.000Z | tkinter/pynput-keylogger/main.py | whitmans-max/python-examples | 881a8f23f0eebc76816a0078e19951893f0daaaa | [
"MIT"
] | 79 | 2017-01-25T10:53:33.000Z | 2022-03-11T16:13:57.000Z |
# date: 2019.07.08
# https://stackoverflow.com/questions/56925820/function-to-start-and-stopthread/56926749#56926749
from pynput.keyboard import Listener, Key
import tkinter as tk
from functools import partial
def press(key):
keyd = str(key)
keyd = keyd.replace("Key.space", " ")
keyd = keyd.replace("'"... | 23.822581 | 97 | 0.586324 |
9b1b7c5c3b522680e787121120a8cbc9c5782822 | 1,102 | py | Python | src/cplex/_internal/_pycplex_platform.py | tfang94/paql-project | 0848d13a0f2489349d196a596cc1a1a1f2ee1bfe | [
"MIT"
] | 1 | 2021-04-28T21:30:39.000Z | 2021-04-28T21:30:39.000Z | src/cplex/_internal/_pycplex_platform.py | tfang94/paql-project | 0848d13a0f2489349d196a596cc1a1a1f2ee1bfe | [
"MIT"
] | null | null | null | src/cplex/_internal/_pycplex_platform.py | tfang94/paql-project | 0848d13a0f2489349d196a596cc1a1a1f2ee1bfe | [
"MIT"
] | 3 | 2021-04-25T16:51:47.000Z | 2022-02-03T21:04:34.000Z | # ------------------------------------------------------------------------------
# Licensed Materials - Property of IBM
# 5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21
# Copyright IBM Corporation 2008, 2020. All Rights Reserved.
#
# US Government Users Restricted Rights - Use, duplication or
# disclosu... | 38 | 80 | 0.608893 |
7d42de1f6bbdee52afa746f1494b557ea1f026a2 | 24,582 | py | Python | website/project/views/contributor.py | harrismendell/osf.io | e2727b1bb2aaa7de494f941be08cb3e9305ae624 | [
"Apache-2.0"
] | null | null | null | website/project/views/contributor.py | harrismendell/osf.io | e2727b1bb2aaa7de494f941be08cb3e9305ae624 | [
"Apache-2.0"
] | null | null | null | website/project/views/contributor.py | harrismendell/osf.io | e2727b1bb2aaa7de494f941be08cb3e9305ae624 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import time
import itertools
import httplib as http
from collections import Counter
from flask import request
from modularodm.exceptions import ValidationValueError
from framework import forms
from framework import status
from framework.flask import redirect # VOL-aware redirect
from framewor... | 34.332402 | 94 | 0.659548 |
35bd4d9acea08dc6ab021683cb10db4de588e284 | 1,228 | py | Python | Lab_3/busqueda binaria/busqueda_binaria.py | Hubert-HD/Lab_ADA | 5720db350baef7b8b892b563b93f82df7591d301 | [
"BSD-3-Clause"
] | null | null | null | Lab_3/busqueda binaria/busqueda_binaria.py | Hubert-HD/Lab_ADA | 5720db350baef7b8b892b563b93f82df7591d301 | [
"BSD-3-Clause"
] | null | null | null | Lab_3/busqueda binaria/busqueda_binaria.py | Hubert-HD/Lab_ADA | 5720db350baef7b8b892b563b93f82df7591d301 | [
"BSD-3-Clause"
] | null | null | null | # Implementar el algoritmo de búsqueda binaria
import random, time, json, math
def binarySearch(array, target):
# Devuelve "Verdadero" si un número dado se encuentra en un arreglo de enteros, caso contrario devuelve "Falso"
izquierda = 0;
derecha = len(array) - 1
while(izquierda <= derecha):
medio = math.f... | 32.315789 | 115 | 0.681596 |
9a3588ede9d1a9323aca6728b831c85c5b7a4d56 | 1,048 | py | Python | skxray/core/tests/test_image.py | celiafish/scikit-xray | 660a37821d58544b6443c5b8cd9c96daef577ed2 | [
"BSD-3-Clause"
] | null | null | null | skxray/core/tests/test_image.py | celiafish/scikit-xray | 660a37821d58544b6443c5b8cd9c96daef577ed2 | [
"BSD-3-Clause"
] | null | null | null | skxray/core/tests/test_image.py | celiafish/scikit-xray | 660a37821d58544b6443c5b8cd9c96daef577ed2 | [
"BSD-3-Clause"
] | 1 | 2019-03-04T07:12:02.000Z | 2019-03-04T07:12:02.000Z | from __future__ import absolute_import, division, print_function
import numpy as np
import numpy.random
from nose.tools import assert_equal
import skimage.draw as skd
from scipy.ndimage.morphology import binary_dilation
import skxray.core.image as nimage
def test_find_ring_center_acorr_1D():
for x in [110, 150, ... | 27.578947 | 75 | 0.657443 |
b4fcac2df9cf55c84e7aa522571fcfc630876c8d | 705 | py | Python | src/environments/env_wrapper.py | sarah-keren/MAC | 884aad0f0b5a6b74fd7a63e464aa8404cdb057c6 | [
"MIT"
] | null | null | null | src/environments/env_wrapper.py | sarah-keren/MAC | 884aad0f0b5a6b74fd7a63e464aa8404cdb057c6 | [
"MIT"
] | null | null | null | src/environments/env_wrapper.py | sarah-keren/MAC | 884aad0f0b5a6b74fd7a63e464aa8404cdb057c6 | [
"MIT"
] | null | null | null | class EnvWrappper:
def __init__(self, env, needs_conv=False):
self.env = env
self.num_obs = self.env.observation_spaces[env.possible_agents[0]].shape
self.num_actions = self.env.action_spaces[env.possible_agents[0]].n
self.needs_conv = needs_conv
self.env_agents = self.env.p... | 26.111111 | 80 | 0.670922 |
04451594405d5047affb0513ed40aad65582d12c | 1,588 | py | Python | examples/textbook/plot_M67Data.py | joshuawall/amuse | c2034074ee76c08057c4faa96c32044ab40952e9 | [
"Apache-2.0"
] | 1 | 2019-12-28T22:47:51.000Z | 2019-12-28T22:47:51.000Z | examples/textbook/plot_M67Data.py | joshuawall/amuse | c2034074ee76c08057c4faa96c32044ab40952e9 | [
"Apache-2.0"
] | null | null | null | examples/textbook/plot_M67Data.py | joshuawall/amuse | c2034074ee76c08057c4faa96c32044ab40952e9 | [
"Apache-2.0"
] | 2 | 2021-11-19T04:41:37.000Z | 2021-11-20T02:11:17.000Z | #!/usr/bin/python
from __future__ import division
from matplotlib import pyplot
import os
def logLuminosity(V):
VminMv = 9.7
MBolSun = 4.74
Mv = V - VminMv
L = (MBolSun - Mv)/2.5
return L
def logTeff(BminV):
logT = (14.551 - BminV)/3.684
if logT > 3.961:
a,b,c = [.344,-3.402,8.037... | 23.014493 | 64 | 0.528967 |
a8e0d6d3f391c14712924b220fd45245ade932d9 | 3,118 | py | Python | Task-5/src/mesh.py | rionaldichandraseta/grafika-opengl | ab511880d7a36aacfa98c01ebbdecaabb7d6733f | [
"MIT"
] | null | null | null | Task-5/src/mesh.py | rionaldichandraseta/grafika-opengl | ab511880d7a36aacfa98c01ebbdecaabb7d6733f | [
"MIT"
] | null | null | null | Task-5/src/mesh.py | rionaldichandraseta/grafika-opengl | ab511880d7a36aacfa98c01ebbdecaabb7d6733f | [
"MIT"
] | null | null | null | import glm
import shader
class Vertex(object):
def __init__(self, position, texture_coordinate, normal):
self._position = position
self._texture_coordinate = texture_coordinate
self._normal = normal
class Texture(object):
def __init__(self, id, texture_type, path):
self._id = i... | 34.263736 | 110 | 0.628608 |
d1dc50e97b6b3b5437f19b1639e8279fd077430c | 7,556 | py | Python | python/fate_test/fate_test/scripts/benchmark_cli.py | QuantumA/FATE | 89a3dd593252128c1bf86fb1014b25a629bdb31a | [
"Apache-2.0"
] | 1 | 2022-02-07T06:23:15.000Z | 2022-02-07T06:23:15.000Z | python/fate_test/fate_test/scripts/benchmark_cli.py | JavaGreenHands/FATE | ea1e94b6be50c70c354d1861093187e523af32f2 | [
"Apache-2.0"
] | 11 | 2020-10-09T09:53:50.000Z | 2021-12-06T16:14:51.000Z | python/fate_test/fate_test/scripts/benchmark_cli.py | JavaGreenHands/FATE | ea1e94b6be50c70c354d1861093187e523af32f2 | [
"Apache-2.0"
] | null | null | null | import os
import re
import time
import uuid
from datetime import timedelta
from inspect import signature
import click
from fate_test._client import Clients
from fate_test._config import Config
from fate_test._io import LOGGER, echo
from fate_test._parser import BenchmarkSuite
from fate_test.scripts._options import Sha... | 49.710526 | 120 | 0.616464 |
3efca31d583f7ad22f2ce7fa845bd7f4340e9268 | 16,456 | py | Python | tests/nodeos_forked_chain_test.py | InfraBlockchain/infrablockchain | 447fa0e836d31be35357a07c22dc55d93079bbcf | [
"MIT"
] | 14 | 2021-04-15T06:50:08.000Z | 2022-02-23T14:43:14.000Z | tests/nodeos_forked_chain_test.py | InfraBlockchain/infrablockchain | 447fa0e836d31be35357a07c22dc55d93079bbcf | [
"MIT"
] | null | null | null | tests/nodeos_forked_chain_test.py | InfraBlockchain/infrablockchain | 447fa0e836d31be35357a07c22dc55d93079bbcf | [
"MIT"
] | 3 | 2021-07-04T13:08:17.000Z | 2021-12-14T03:46:50.000Z | #!/usr/bin/env python3
from testUtils import Utils
import testUtils
import time
from Cluster import Cluster
from WalletMgr import WalletMgr
from Node import BlockType
from Node import Node
from TestHelper import AppArgs
from TestHelper import TestHelper
import decimal
import math
import re
import signal
############... | 40.038929 | 193 | 0.685404 |
c8a1f5c4d6af3eedefcbf34399e6f394aba013ac | 15,870 | py | Python | apps/sarasate.py | mudbri/Faure | bda4321abf54fea3df686c8958209c449798eb73 | [
"Apache-2.0"
] | null | null | null | apps/sarasate.py | mudbri/Faure | bda4321abf54fea3df686c8958209c449798eb73 | [
"Apache-2.0"
] | null | null | null | apps/sarasate.py | mudbri/Faure | bda4321abf54fea3df686c8958209c449798eb73 | [
"Apache-2.0"
] | null | null | null | from ravel.app import AppConsole, mk_watchcmd
import psycopg2
import tabulate
import re
from z3 import *
class RelaAlgConsole(AppConsole):
def default(self, line):
"Execute a PostgreSQL statement"
try:
select_clause, from_clause, defined_where_clause, where_lists = self.pre_processing(... | 39.185185 | 132 | 0.501449 |
d5d1d0590bb0fb76880b4b3549211a6507904aec | 4,224 | py | Python | swaggercheck/strategies/basestrategies.py | FrancoMaxime/swagger-check | d884604b338afcbda3679fd8baca87721fbf1197 | [
"MIT"
] | 1 | 2019-07-12T07:18:07.000Z | 2019-07-12T07:18:07.000Z | swaggercheck/strategies/basestrategies.py | FrancoMaxime/swagger-check | d884604b338afcbda3679fd8baca87721fbf1197 | [
"MIT"
] | 7 | 2019-07-06T08:00:00.000Z | 2020-01-27T14:28:17.000Z | swaggercheck/strategies/basestrategies.py | FrancoMaxime/swagger-check | d884604b338afcbda3679fd8baca87721fbf1197 | [
"MIT"
] | 2 | 2019-07-06T08:07:48.000Z | 2019-09-24T13:20:54.000Z | """
Extra hypothesis strategies built from those in `hypothesis.strategies`, and
helper functions for merging dictionary type strategies and dictionaries of
strategies.
"""
import logging
import datetime
import io
import hypothesis.strategies as hy_st
__all__ = [
"json",
"dates",
"times",
"datetimes",... | 31.288889 | 79 | 0.682055 |
1f0e17d805745d52043e1593c0a9d754ebaf7e23 | 905 | py | Python | tests/test_dataset/test_ndplot.py | Mailaender/spectrochempy | d58221afeb9f78e2e3e0079b3fd6c0162a902c04 | [
"CECILL-B"
] | null | null | null | tests/test_dataset/test_ndplot.py | Mailaender/spectrochempy | d58221afeb9f78e2e3e0079b3fd6c0162a902c04 | [
"CECILL-B"
] | null | null | null | tests/test_dataset/test_ndplot.py | Mailaender/spectrochempy | d58221afeb9f78e2e3e0079b3fd6c0162a902c04 | [
"CECILL-B"
] | null | null | null | # -*- coding: utf-8 -*-
# ======================================================================================================================
# Copyright (©) 2015-2021 LCS - Laboratoire Catalyse et Spectrochimie, Caen, France. =
# CeCILL-B FREE SOFTWARE LICENSE AGREEMENT - See ful... | 36.2 | 120 | 0.454144 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.