hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
bbf2ddcc64c4d9303364a48415c3e71141476b01 | 2,386 | py | Python | engine/render.py | suoxinkey/PlenOctrees_NeRF-SH | bf66ecc93ee166a4dc1a208d063408b452484dde | [
"MIT"
] | 54 | 2021-04-13T14:51:40.000Z | 2022-03-09T12:49:46.000Z | engine/render.py | suoxinkey/PlenOctrees_NeRF-SH | bf66ecc93ee166a4dc1a208d063408b452484dde | [
"MIT"
] | 2 | 2021-04-17T02:05:41.000Z | 2021-12-06T12:09:38.000Z | engine/render.py | suoxinkey/PlenOctrees_NeRF-SH | bf66ecc93ee166a4dc1a208d063408b452484dde | [
"MIT"
] | 2 | 2021-04-17T16:22:20.000Z | 2021-08-23T05:17:04.000Z | import torch
from utils import batchify_ray, vis_density, ray_sampling
import numpy as np
import os
import torch
'''
Sample rays from views (and images) with/without masks
--------------------------
INPUT Tensors
K: intrinsics of camera (3,3)
T: extrinsic of camera (4,4)
image_size: the size of image [H,W]
ROI: 2... | 29.45679 | 100 | 0.638726 |
fbcc7cf679daf341bb36ab70199154eda4564daf | 1,060 | py | Python | noxfile.py | raman325/cookiecutter-homeassistant-custom-component | a546052798905646d78b446ce20f2b2554e468c2 | [
"MIT"
] | 28 | 2020-11-14T18:03:42.000Z | 2022-03-05T11:22:12.000Z | noxfile.py | raman325/cookiecutter-homeassistant-custom-component | a546052798905646d78b446ce20f2b2554e468c2 | [
"MIT"
] | 133 | 2020-10-30T09:25:49.000Z | 2022-03-31T04:05:15.000Z | noxfile.py | raman325/cookiecutter-homeassistant-custom-component | a546052798905646d78b446ce20f2b2554e468c2 | [
"MIT"
] | 9 | 2021-01-06T03:16:45.000Z | 2022-02-28T18:22:19.000Z | """Nox sessions."""
from pathlib import Path
import shutil
import nox
from nox.sessions import Session
nox.options.sessions = (
"linkcheck",
)
@nox.session
def docs(session: Session) -> None:
"""Build the documentation."""
args = session.posargs or ["-W", "-n", "docs", "docs/_build"]
if session.inte... | 24.651163 | 78 | 0.631132 |
dfa79c208b049698bd7d25fe9f75455c74bb100b | 31,134 | py | Python | grumpy-tools-src/grumpy_tools/compiler/stmt.py | alanjds/grumpy | c5700607ae7f66c355a053118a62992d1ec28404 | [
"Apache-2.0"
] | 19 | 2018-03-27T07:46:26.000Z | 2020-04-18T12:05:33.000Z | grumpy-tools-src/grumpy_tools/compiler/stmt.py | alanjds/grumpy | c5700607ae7f66c355a053118a62992d1ec28404 | [
"Apache-2.0"
] | 147 | 2018-08-03T16:18:53.000Z | 2018-08-20T15:15:11.000Z | grumpy-tools-src/grumpy_tools/compiler/stmt.py | alanjds/grumpy | c5700607ae7f66c355a053118a62992d1ec28404 | [
"Apache-2.0"
] | 1 | 2018-07-28T14:17:35.000Z | 2018-07-28T14:17:35.000Z | # coding=utf-8
# Copyright 2016 Google 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 app... | 41.401596 | 136 | 0.624077 |
c5153d63941e2d2464b8740e5aa1a0b2987d798f | 9,877 | py | Python | pypuppetdb/api/v3.py | grandich/pypuppetdb | f509d41aaca67c0c44b5324c3dcad27c38ba26c3 | [
"Apache-2.0"
] | null | null | null | pypuppetdb/api/v3.py | grandich/pypuppetdb | f509d41aaca67c0c44b5324c3dcad27c38ba26c3 | [
"Apache-2.0"
] | null | null | null | pypuppetdb/api/v3.py | grandich/pypuppetdb | f509d41aaca67c0c44b5324c3dcad27c38ba26c3 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from __future__ import absolute_import
import logging
from pypuppetdb.api import BaseAPI
from pypuppetdb.utils import json_to_datetime
from datetime import datetime, timedelta
from pypuppetdb.types import (
Node, Fact, Resource,
Report, Event, Catalog
)
log = loggi... | 38.135135 | 78 | 0.523337 |
111c9eb55e0b5ad6188685018b5029b7e7d0dea0 | 7,169 | py | Python | spektral/data/utils.py | colliner/spektral | b776200fd1fa820f05b559f0c1c6265e0eca4894 | [
"MIT"
] | null | null | null | spektral/data/utils.py | colliner/spektral | b776200fd1fa820f05b559f0c1c6265e0eca4894 | [
"MIT"
] | null | null | null | spektral/data/utils.py | colliner/spektral | b776200fd1fa820f05b559f0c1c6265e0eca4894 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
from scipy import sparse as sp
from spektral.utils import pad_jagged_array
def to_disjoint(x_list=None, a_list=None, e_list=None):
"""
Converts lists of node features, adjacency matrices and edge features to
[disjoint mode](https://danielegrattarola.github.io/sp... | 34.466346 | 92 | 0.638304 |
e5763605901bda1f5dc6f9c19651c13483ed2ea1 | 997 | py | Python | setup.py | eraclitux/ipcampy | bffd1c4df9006705cffa5b83a090b0db90cbcbcf | [
"MIT"
] | 33 | 2015-03-22T04:05:58.000Z | 2021-02-15T14:14:55.000Z | setup.py | eraclitux/ipcampy | bffd1c4df9006705cffa5b83a090b0db90cbcbcf | [
"MIT"
] | 4 | 2015-02-16T19:37:05.000Z | 2017-03-24T15:34:11.000Z | setup.py | eraclitux/ipcampy | bffd1c4df9006705cffa5b83a090b0db90cbcbcf | [
"MIT"
] | 14 | 2016-01-04T08:13:43.000Z | 2021-04-27T13:52:16.000Z | #!/usr/bin/env python
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='IpCamPy',
version='0.3.0',
author='Andrea Masi',
author_email='eraclitux@gmail.com',
packages=['ipcampy', 'ipcampy.test', 'ipcamweb'],
scripts=['bin/campatrol'],
... | 28.485714 | 113 | 0.626881 |
a9049ef09d9a3205ec8dea85b46767504b2aae6c | 6,631 | py | Python | xcsg/impl.py | ebak/pyxcsg | f747321b069f02fc7fbea09129b6949fffd38eb3 | [
"MIT"
] | 1 | 2021-01-15T19:48:42.000Z | 2021-01-15T19:48:42.000Z | xcsg/impl.py | ebak/pyxcsg | f747321b069f02fc7fbea09129b6949fffd38eb3 | [
"MIT"
] | null | null | null | xcsg/impl.py | ebak/pyxcsg | f747321b069f02fc7fbea09129b6949fffd38eb3 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 Endre Bak
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribut... | 30.699074 | 113 | 0.636405 |
74a45b91df99fa0a7f81ef2d39395c16b52181fa | 2,774 | py | Python | bclearer_boson_1_2_source/b_code/orchestrators/boson_1_2_bclearer_orchestrator.py | teapowell/bclearer_boson_1_2 | 571b2e1ca6dee93ccc5cb4e30abe2660f40c2ac0 | [
"MIT"
] | null | null | null | bclearer_boson_1_2_source/b_code/orchestrators/boson_1_2_bclearer_orchestrator.py | teapowell/bclearer_boson_1_2 | 571b2e1ca6dee93ccc5cb4e30abe2660f40c2ac0 | [
"MIT"
] | null | null | null | bclearer_boson_1_2_source/b_code/orchestrators/boson_1_2_bclearer_orchestrator.py | teapowell/bclearer_boson_1_2 | 571b2e1ca6dee93ccc5cb4e30abe2660f40c2ac0 | [
"MIT"
] | 1 | 2021-11-19T13:05:53.000Z | 2021-11-19T13:05:53.000Z | import os
from bnop_source.b_code.bnop_facades import BnopFacades
from nf_common_source.code.services.datetime_service.time_helpers.time_getter import now_time_as_string_for_files
from nf_common_source.code.services.file_system_service.folder_selector import select_folder
from nf_ea_com_bnop_source.b_code.nf_ea_com_bn... | 29.827957 | 113 | 0.731074 |
a276019d6bb4b39eae3757b1697893269f1d9176 | 2,172 | py | Python | lib/node_modules/@stdlib/math/base/special/asinh/benchmark/python/benchmark.py | ghalimi/stdlib | 88f50b88aa945875ef053e2f89d26f9150a18c12 | [
"BSL-1.0"
] | 3,428 | 2016-07-14T13:48:46.000Z | 2022-03-31T22:32:13.000Z | lib/node_modules/@stdlib/math/base/special/asinh/benchmark/python/benchmark.py | ghalimi/stdlib | 88f50b88aa945875ef053e2f89d26f9150a18c12 | [
"BSL-1.0"
] | 435 | 2016-04-07T18:12:45.000Z | 2022-03-22T15:43:17.000Z | lib/node_modules/@stdlib/math/base/special/asinh/benchmark/python/benchmark.py | sthagen/stdlib | 042b6215818db0e2a784e72c7e054167dcefcd2a | [
"BSL-1.0"
] | 188 | 2016-11-29T22:58:11.000Z | 2022-03-17T06:46:43.000Z | #!/usr/bin/env python
#
# @license Apache-2.0
#
# Copyright (c) 2018 The Stdlib 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
#
# ... | 22.163265 | 74 | 0.63628 |
c229cacdbc9a14997150b60f206c06c9e86afbcc | 34,552 | py | Python | alpaca_backtrader_api/alpacastore.py | bbeale/alpaca-backtrader-api | 9624b331708ea0c5410dd3828ce26a47a12695fc | [
"Apache-2.0"
] | null | null | null | alpaca_backtrader_api/alpacastore.py | bbeale/alpaca-backtrader-api | 9624b331708ea0c5410dd3828ce26a47a12695fc | [
"Apache-2.0"
] | null | null | null | alpaca_backtrader_api/alpacastore.py | bbeale/alpaca-backtrader-api | 9624b331708ea0c5410dd3828ce26a47a12695fc | [
"Apache-2.0"
] | null | null | null | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import os
import collections
import time
from enum import Enum
import traceback
from datetime import datetime, timedelta, time as dtime
from dateutil.parser import parse as date_parse
import time as _time
impor... | 35.768116 | 79 | 0.531691 |
602dcc4655b07fd428dc44e566e65a45402c7fe2 | 26,737 | py | Python | integration_tests/test_suites/k8s-integration-test-suite/test_scheduler.py | coderanger/dagster | d3e323f8ed55cd906d6f44f19595348ea1580b2d | [
"Apache-2.0"
] | null | null | null | integration_tests/test_suites/k8s-integration-test-suite/test_scheduler.py | coderanger/dagster | d3e323f8ed55cd906d6f44f19595348ea1580b2d | [
"Apache-2.0"
] | null | null | null | integration_tests/test_suites/k8s-integration-test-suite/test_scheduler.py | coderanger/dagster | d3e323f8ed55cd906d6f44f19595348ea1580b2d | [
"Apache-2.0"
] | null | null | null | import os
import subprocess
import sys
from contextlib import contextmanager
import kubernetes
import pytest
from dagster import DagsterInstance, ScheduleDefinition, seven
from dagster.core.definitions import lambda_solid, pipeline, repository
from dagster.core.host_representation import (
ManagedGrpcPythonEnvRepo... | 37.083218 | 150 | 0.709728 |
c0a706d253998661233f300730b2adfef8a6ac7c | 533 | py | Python | GettingStartTensorFlow/Chapter2/JuliaSet.py | zhangxiaoya/Practice-TensorFlow | e15bb95f88c99ada17d66880012e7ef25f6a7240 | [
"MIT"
] | null | null | null | GettingStartTensorFlow/Chapter2/JuliaSet.py | zhangxiaoya/Practice-TensorFlow | e15bb95f88c99ada17d66880012e7ef25f6a7240 | [
"MIT"
] | null | null | null | GettingStartTensorFlow/Chapter2/JuliaSet.py | zhangxiaoya/Practice-TensorFlow | e15bb95f88c99ada17d66880012e7ef25f6a7240 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
Y, X = np.mgrid[-2:2:0.005, -2:2:0.005]
Z = X + 1j * Y
Z = tf.constant(Z.astype("complex64"))
zs = tf.Variable(Z)
ns = tf.Variable(tf.zeros_like(Z, "float32"))
sess = tf.InteractiveSession()
tf.global_variables_initializer().run()
c = compl... | 22.208333 | 80 | 0.677298 |
964ad4bf379f04669b12592e33463ad9b36d6297 | 5,341 | py | Python | inout.py | RohJiHyun/splocs | 4c6ce9983000fdc12e404b9ae04f9d1a6c9bdf5d | [
"MIT"
] | null | null | null | inout.py | RohJiHyun/splocs | 4c6ce9983000fdc12e404b9ae04f9d1a6c9bdf5d | [
"MIT"
] | null | null | null | inout.py | RohJiHyun/splocs | 4c6ce9983000fdc12e404b9ae04f9d1a6c9bdf5d | [
"MIT"
] | null | null | null | from os import path
from glob import glob
from io import StringIO
import numpy as np
import h5py
from scipy.sparse.csgraph import connected_components
from scipy.sparse import csr_matrix
from util import sort_nicely, veclen, filter_reindex
def convert_sequence_to_hdf5(filename_pattern, loader_function, hdf_output_f... | 37.34965 | 118 | 0.607939 |
c8017b0051725007f0b5c23600cf2130fbb334a8 | 1,743 | py | Python | templates/functions/layers/dependencies/python/bin/jp.py | 1Strategy/custom-resource-starter-template | d8297691e780c81e8ec94766fba13773e9fe9ff7 | [
"Apache-2.0"
] | null | null | null | templates/functions/layers/dependencies/python/bin/jp.py | 1Strategy/custom-resource-starter-template | d8297691e780c81e8ec94766fba13773e9fe9ff7 | [
"Apache-2.0"
] | null | null | null | templates/functions/layers/dependencies/python/bin/jp.py | 1Strategy/custom-resource-starter-template | d8297691e780c81e8ec94766fba13773e9fe9ff7 | [
"Apache-2.0"
] | 4 | 2021-11-25T00:16:19.000Z | 2021-12-06T09:26:22.000Z | #!/Users/scott/.local/share/virtualenvs/custom_resource_starter-u0Y-q6K1/bin/python3.8
import sys
import json
import argparse
from pprint import pformat
import jmespath
from jmespath import exceptions
def main():
parser = argparse.ArgumentParser()
parser.add_argument('expression')
parser.add_argument('-... | 31.690909 | 86 | 0.604705 |
ec44fc585141a5d6b32a7d67ec2cb7faed5f3018 | 2,802 | py | Python | session.py | arturosevilla/notification-server-example | a180f411a65e389c7b21cb9b8d6af8f973bf204e | [
"BSD-3-Clause"
] | 1 | 2015-09-16T10:32:07.000Z | 2015-09-16T10:32:07.000Z | session.py | arturosevilla/notification-server-example | a180f411a65e389c7b21cb9b8d6af8f973bf204e | [
"BSD-3-Clause"
] | null | null | null | session.py | arturosevilla/notification-server-example | a180f411a65e389c7b21cb9b8d6af8f973bf204e | [
"BSD-3-Clause"
] | null | null | null | from redis import Redis
import pickle
from datetime import timedelta
from werkzeug.datastructures import CallbackDict
from flask.sessions import SessionInterface, SessionMixin
from sid import encode_id, generate_id, get_secure_id
class RedisSession(CallbackDict, SessionMixin):
def __init__(self, initial=None, sid... | 34.170732 | 79 | 0.613133 |
ab82a956163ad2fd769108234e138bce5f07c63b | 230 | py | Python | config.py | opensourcedcgy/ESZ-disaggregation | c5b00d5bb2c738209a1adfbe9e603e8d8ad1d16d | [
"Apache-2.0"
] | 2 | 2021-06-02T09:54:31.000Z | 2022-03-17T07:37:30.000Z | config.py | opensourcedcgy/ESZ-disaggregation | c5b00d5bb2c738209a1adfbe9e603e8d8ad1d16d | [
"Apache-2.0"
] | 1 | 2021-05-19T14:00:38.000Z | 2021-05-19T14:00:38.000Z | config.py | opensourcedcgy/ESZ-disaggregation | c5b00d5bb2c738209a1adfbe9e603e8d8ad1d16d | [
"Apache-2.0"
] | 1 | 2022-03-17T07:16:07.000Z | 2022-03-17T07:16:07.000Z | # -*- coding: utf-8 -*-
"""Configs of training"""
default_models = {
'BASE_LOAD': 'simple',
'DISHWASHER': 'exp1',
'DRYER': 'exp1',
'HEATING': 'simple',
'REFRIGERATOR': 'exp1',
'WASHING_MACHINE': 'exp1',
}
| 19.166667 | 30 | 0.552174 |
a240e98fc51e15ba0611d8ca1327cc7e07ef1e79 | 1,446 | py | Python | caffe2/python/operator_test/conftest.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 60,067 | 2017-01-18T17:21:31.000Z | 2022-03-31T21:37:45.000Z | caffe2/python/operator_test/conftest.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 66,955 | 2017-01-18T17:21:38.000Z | 2022-03-31T23:56:11.000Z | caffe2/python/operator_test/conftest.py | Hacky-DH/pytorch | 80dc4be615854570aa39a7e36495897d8a040ecc | [
"Intel"
] | 19,210 | 2017-01-18T17:45:04.000Z | 2022-03-31T23:51:56.000Z |
import caffe2.python.serialized_test.serialized_test_util as serial
def pytest_addoption(parser):
parser.addoption(
'-G',
'--generate-serialized',
action='store_true',
dest='generate',
help='generate output files (default=false, compares to current files)',
)
p... | 29.510204 | 80 | 0.663209 |
b95a6521d07a5493d2a6ac5e2e26a72d9023f4b9 | 203 | py | Python | Hackathon 4.0_2021-01-08_07-11-48.py | ClointFusion-Community/CFC-Projects | c6381738ade07e6e8979bbae37400ec2b4e626c5 | [
"MIT"
] | null | null | null | Hackathon 4.0_2021-01-08_07-11-48.py | ClointFusion-Community/CFC-Projects | c6381738ade07e6e8979bbae37400ec2b4e626c5 | [
"MIT"
] | null | null | null | Hackathon 4.0_2021-01-08_07-11-48.py | ClointFusion-Community/CFC-Projects | c6381738ade07e6e8979bbae37400ec2b4e626c5 | [
"MIT"
] | null | null | null | # This code is generated automatically by ClointFusion BOT Builder Tool.
import ClointFusion as cf
import time
cf.window_show_desktop()
cf.mouse_click(int(cf.pg.size()[0]/2),int(cf.pg.size()[1]/2))
| 25.375 | 72 | 0.748768 |
c54ed465d1c1a39a883c0a73517ecf00b945aa16 | 5,748 | py | Python | scripts/boot/configure.py | asteroidrush/ar-node | 5dc946a55cf592b663f3febbeed75244eda49f28 | [
"MIT"
] | null | null | null | scripts/boot/configure.py | asteroidrush/ar-node | 5dc946a55cf592b663f3febbeed75244eda49f28 | [
"MIT"
] | null | null | null | scripts/boot/configure.py | asteroidrush/ar-node | 5dc946a55cf592b663f3febbeed75244eda49f28 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import json
from os.path import abspath
from time import sleep
from src.accounts import AccountsManager
from src.auth import AuthManager
from src.components import BootNode, Wallet, Cleos, Token
from src.contracts import ContractsManager
from src.process import ProcessManager
... | 39.641379 | 126 | 0.635699 |
e42e07351ce1ef0f2acc683f5d488cea43eeb33d | 2,043 | py | Python | setup.py | alexdb27/PBxplore | 10877bd5e54d9f40b4a0083c276ee1982c61b417 | [
"MIT"
] | 20 | 2015-03-06T15:02:56.000Z | 2021-09-18T21:52:11.000Z | setup.py | alexdb27/PBxplore | 10877bd5e54d9f40b4a0083c276ee1982c61b417 | [
"MIT"
] | 131 | 2015-01-15T17:04:12.000Z | 2021-01-27T14:45:42.000Z | setup.py | alexdb27/PBxplore | 10877bd5e54d9f40b4a0083c276ee1982c61b417 | [
"MIT"
] | 14 | 2015-03-08T18:36:23.000Z | 2021-09-14T10:54:13.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.rst')) as f:
readme = f.read()
# Extras requirements for optional dependencies
extras = {
'analysis': ['weblogo>=3.7'],... | 27.24 | 84 | 0.632403 |
f3063349b685b4990c5983e98af36fa45fe103fd | 1,414 | py | Python | 4. Fundamentals/black_scholes.py | conquerv0/Pynance | 02dcfffd0a54374c603baad02ee31bc7ced7f670 | [
"Apache-2.0"
] | 16 | 2020-04-18T17:28:40.000Z | 2022-02-11T01:11:21.000Z | 4. Fundamentals/black_scholes.py | conquerv0/Pynance | 02dcfffd0a54374c603baad02ee31bc7ced7f670 | [
"Apache-2.0"
] | 1 | 2020-07-22T02:22:03.000Z | 2020-07-22T02:22:03.000Z | 4. Fundamentals/black_scholes.py | conquerv0/Pynance | 02dcfffd0a54374c603baad02ee31bc7ced7f670 | [
"Apache-2.0"
] | 6 | 2020-06-29T17:37:47.000Z | 2022-02-13T17:02:39.000Z | import pandas_datareader as pdr
from pandas_datareader import data, wb
from datetime import date
import numpy as np
import pandas as pd
from scipy import log,exp,sqrt,stats
def blackscholes_call(S,E,T,rf,sigma):
"""this function calculates the d1, d2 parameters and derive the normal distribution function
, then ret... | 32.136364 | 97 | 0.71075 |
4857f8f00c7ce007ff7ac367bb5ddd1f0d59e571 | 278 | py | Python | prime.py | Enfioz/enpands-problems | ac6b8904706e3acb50077e3ffe08f39f0b5b31be | [
"MIT"
] | null | null | null | prime.py | Enfioz/enpands-problems | ac6b8904706e3acb50077e3ffe08f39f0b5b31be | [
"MIT"
] | null | null | null | prime.py | Enfioz/enpands-problems | ac6b8904706e3acb50077e3ffe08f39f0b5b31be | [
"MIT"
] | null | null | null | # Patick Corcoran
# Chekc if a number is prime.
# The primes are 2, 3, 5, 7, 11, 13, ...
p = 347
isprime = True
for m in range(2, p-1):
if p % m == 0:
isprime = False
break
if isprime:
print(p, "is a prime number.")
else:
print(p, "is not prime,") | 17.375 | 40 | 0.557554 |
f34c3ce15ff254617d435888dd27e75dec076acc | 8,557 | py | Python | intersight/model/mo_tag_key_summary.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 5 | 2021-12-16T15:13:32.000Z | 2022-03-29T16:09:54.000Z | intersight/model/mo_tag_key_summary.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 4 | 2022-01-25T19:05:51.000Z | 2022-03-29T20:18:37.000Z | intersight/model/mo_tag_key_summary.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 2 | 2020-07-07T15:01:08.000Z | 2022-01-31T04:27:35.000Z | """
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environments in more advan... | 49.178161 | 1,678 | 0.629777 |
ca896244bfe2c8c2c3b5e3011c45d4b6935af15c | 1,483 | py | Python | iron-unconditioned-reflexes/NeuralNetwork/NeuralNetwork.py | zshimanchik/iron-unconditioned-reflexes | 22897bad377361ca85aac6d6e8ab1c6eaa069032 | [
"MIT"
] | null | null | null | iron-unconditioned-reflexes/NeuralNetwork/NeuralNetwork.py | zshimanchik/iron-unconditioned-reflexes | 22897bad377361ca85aac6d6e8ab1c6eaa069032 | [
"MIT"
] | 5 | 2016-02-15T16:28:33.000Z | 2016-05-04T20:47:10.000Z | iron-unconditioned-reflexes/NeuralNetwork/NeuralNetwork.py | zshimanchik/iron-unconditioned-reflexes | 22897bad377361ca85aac6d6e8ab1c6eaa069032 | [
"MIT"
] | null | null | null | from Layer import InputLayer, Layer, Readiness
class NeuralNetwork:
def __init__(self, shape):
self.layers = []
self.shape = shape
self.time = 0
self.input_layer = InputLayer(shape[0])
self.layers.append(self.input_layer)
prev_layer = self.input_layer
for... | 29.078431 | 70 | 0.597438 |
23ccbdfb4f65d41fe11775768d0f96600138385b | 2,389 | py | Python | cupy/manipulation/basic.py | andravin/cupy | 833a38b5f797c9d44548847f17469117dc8856a4 | [
"MIT"
] | 1 | 2019-12-01T09:08:14.000Z | 2019-12-01T09:08:14.000Z | cupy/manipulation/basic.py | hephaex/cupy | 5cf50a93bbdebe825337ed7996c464e84b1495ba | [
"MIT"
] | 1 | 2019-08-05T09:36:13.000Z | 2019-08-06T12:03:01.000Z | cupy/manipulation/basic.py | hephaex/cupy | 5cf50a93bbdebe825337ed7996c464e84b1495ba | [
"MIT"
] | 1 | 2022-03-24T13:19:55.000Z | 2022-03-24T13:19:55.000Z | import numpy
import six
from cupy import core
from cupy.core import fusion
from cupy.sorting import search
def copyto(dst, src, casting='same_kind', where=None):
"""Copies values from one array to another with broadcasting.
This function can be called for arrays on different devices. In this case,
casti... | 32.283784 | 78 | 0.619506 |
8c51b0a525926cfe17bcba91235f40185d972c44 | 6,361 | py | Python | python/mxnet/gluon/nn/activations.py | paulk-asert/incubator-mxnet | 6acf7e6a051e75d9f1cca0ec3c198c38c0f6a3fe | [
"Apache-2.0"
] | 228 | 2018-12-06T09:34:01.000Z | 2022-03-08T17:02:02.000Z | python/mxnet/gluon/nn/activations.py | urantialife/incubator-mxnet | bcff49888fdaae6b9922de4d4712d505cf33c596 | [
"Apache-2.0"
] | 29 | 2020-09-05T00:57:25.000Z | 2022-02-26T14:48:52.000Z | python/mxnet/gluon/nn/activations.py | urantialife/incubator-mxnet | bcff49888fdaae6b9922de4d4712d505cf33c596 | [
"Apache-2.0"
] | 34 | 2018-12-14T02:59:53.000Z | 2022-01-22T14:15:19.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 27.899123 | 98 | 0.611539 |
82f667c2972bf4eb56b199d7b9b35515e8d74cca | 1,183 | py | Python | Whatsapp Bot with Loop.py | Hetansh-patel/Whataspp-bot | b97ede21a140d809328159dfd08beeff553787cb | [
"Unlicense"
] | null | null | null | Whatsapp Bot with Loop.py | Hetansh-patel/Whataspp-bot | b97ede21a140d809328159dfd08beeff553787cb | [
"Unlicense"
] | null | null | null | Whatsapp Bot with Loop.py | Hetansh-patel/Whataspp-bot | b97ede21a140d809328159dfd08beeff553787cb | [
"Unlicense"
] | null | null | null | # Bot to send message in WhatasppWeb
# Importing webdriver from selenium
from selenium import webdriver
import time
# Giving a path of chromedriver and website to direct
chrome_browser = webdriver.Chrome(
executable_path = 'P:/chromedriver.exe'
)
chrome_browser.get('https://web.whatsapp.com/')
# Pau... | 35.848485 | 85 | 0.727811 |
5dc6d396f3cb22ee822eb9b23a50aca1efb8ae0e | 5,934 | py | Python | download.py | superChoi7/DeepJ | b4d0964079daf9ce5fb15aface3cc0efcc4a01bf | [
"MIT"
] | 1 | 2021-12-31T19:08:16.000Z | 2021-12-31T19:08:16.000Z | download.py | superChoi7/DeepJ | b4d0964079daf9ce5fb15aface3cc0efcc4a01bf | [
"MIT"
] | null | null | null | download.py | superChoi7/DeepJ | b4d0964079daf9ce5fb15aface3cc0efcc4a01bf | [
"MIT"
] | 1 | 2022-02-28T00:42:50.000Z | 2022-02-28T00:42:50.000Z | import os
from pathlib import Path
styles = [
[
'data/classical/beethoven',
'data/classical/haydn',
'data/classical/mozart'
],
[
'data/romantic/borodin',
'data/romantic/brahms',
'data/romantic/tschai'
]
]
dataurls = [
[
[
'http://... | 53.459459 | 93 | 0.640546 |
697a2b04c33846e7560244fd3dc6d18b31fdd5e8 | 23,974 | py | Python | python/ambassador/ir/irhttpmapping.py | imoisharma/emissary | 5346ccb06673827a6a2e51ddaf92925f60bd9de9 | [
"Apache-2.0"
] | null | null | null | python/ambassador/ir/irhttpmapping.py | imoisharma/emissary | 5346ccb06673827a6a2e51ddaf92925f60bd9de9 | [
"Apache-2.0"
] | null | null | null | python/ambassador/ir/irhttpmapping.py | imoisharma/emissary | 5346ccb06673827a6a2e51ddaf92925f60bd9de9 | [
"Apache-2.0"
] | null | null | null | from ambassador.utils import RichStatus
from ambassador.utils import ParsedService as Service
from typing import Any, ClassVar, Dict, List, Optional, Type, Union, TYPE_CHECKING
from ..config import Config
from .irbasemapping import IRBaseMapping, normalize_service_name
from .irbasemappinggroup import IRBaseMappingGr... | 42.133568 | 146 | 0.591474 |
9e415f76a53326c5809b7a8c508701c519ab443b | 4,324 | py | Python | demo/model_zoo/resnet/example/image_list_provider.py | lzhao4ever/Paddle-master | 5c0eb23d1c021fed88416df9eae8511d36df4372 | [
"Apache-2.0"
] | 1 | 2018-12-20T12:15:39.000Z | 2018-12-20T12:15:39.000Z | demo/model_zoo/resnet/example/image_list_provider.py | lzhao4ever/Paddle-master | 5c0eb23d1c021fed88416df9eae8511d36df4372 | [
"Apache-2.0"
] | null | null | null | demo/model_zoo/resnet/example/image_list_provider.py | lzhao4ever/Paddle-master | 5c0eb23d1c021fed88416df9eae8511d36df4372 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016 Baidu, 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 applicable law o... | 41.980583 | 80 | 0.681776 |
83b3a4c336a6d38d5c1df73387fe57792d3ce0b3 | 963 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/matrixkeypad_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/matrixkeypad_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/matrixkeypad_simpletest.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import time
import digitalio
import board
import adafruit_matrixkeypad
# Membrane 3x4 matrix keypad - https://www.adafruit.com/product/419
cols = [digitalio.DigitalInOut(x) for x in (board.D9, board.D6, board.D5)]
rows = [di... | 35.666667 | 93 | 0.708204 |
fc7cdd256a0d253dd10370b9e1436f59755876d9 | 875 | py | Python | FiniteJH/proj_simplex.py | microsoft/Dr-Jekyll-and-Mr-Hyde-The-Strange-Case-of-Off-Policy-Policy-Updates | e085b10156787838a342037e6042af00f5262d5a | [
"MIT"
] | 2 | 2021-12-22T18:18:30.000Z | 2022-02-25T17:57:33.000Z | FiniteJH/proj_simplex.py | microsoft/Dr-Jekyll-and-Mr-Hyde-The-Strange-Case-of-Off-Policy-Policy-Updates | e085b10156787838a342037e6042af00f5262d5a | [
"MIT"
] | null | null | null | FiniteJH/proj_simplex.py | microsoft/Dr-Jekyll-and-Mr-Hyde-The-Strange-Case-of-Off-Policy-Policy-Updates | e085b10156787838a342037e6042af00f5262d5a | [
"MIT"
] | null | null | null | """
Implements three algorithms for projecting a vector onto the simplex: sort, pivot and bisection.
For details and references, see the following paper:
Large-scale Multiclass Support Vector Machine Training via Euclidean Projection onto the Simplex
Mathieu Blondel, Akinori Fujino, and Naonori Ueda.
ICPR 2014.
h... | 33.653846 | 97 | 0.633143 |
c0da5566ae4efc99a0852e6d416397052d541905 | 7,010 | py | Python | ncfm/stacking.py | kirk86/kaggle | 8178ed790bc1f8fcd2cd7a01560e5f25f01c07cc | [
"MIT"
] | null | null | null | ncfm/stacking.py | kirk86/kaggle | 8178ed790bc1f8fcd2cd7a01560e5f25f01c07cc | [
"MIT"
] | null | null | null | ncfm/stacking.py | kirk86/kaggle | 8178ed790bc1f8fcd2cd7a01560e5f25f01c07cc | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Blending {RandomForests, ExtraTrees, GradientBoosting} + stretching to
[0,1]. The blending scheme is related to the idea Jose H. Solorzano
presented here:
http://www.kaggle.com/c/bioresponse/forums/t/1889/question-about-the-process-of-ensemble-learning/10950#post10950
'''You can try this: In one of ... | 43.540373 | 113 | 0.579743 |
bda1c0c1b362c0451454c49cce829f3b33031c53 | 34,791 | py | Python | flask_restx/api.py | yuvalherziger/flask-restx | 55f012a2faf96d63385a59d3bb05b03f864554e2 | [
"BSD-3-Clause"
] | 1 | 2020-09-14T15:54:35.000Z | 2020-09-14T15:54:35.000Z | flask_restx/api.py | yuvalherziger/flask-restx | 55f012a2faf96d63385a59d3bb05b03f864554e2 | [
"BSD-3-Clause"
] | null | null | null | flask_restx/api.py | yuvalherziger/flask-restx | 55f012a2faf96d63385a59d3bb05b03f864554e2 | [
"BSD-3-Clause"
] | 1 | 2020-05-25T14:22:44.000Z | 2020-05-25T14:22:44.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import difflib
import inspect
from itertools import chain
import logging
import operator
import re
import six
import sys
from collections import OrderedDict
from functools import wraps, partial
from types import MethodType
from flask import url_for, req... | 37.449946 | 99 | 0.627145 |
27cd1e83c9c88595423cc7bb43a415f9dd8a2b43 | 345 | py | Python | zonepy/__init__.py | brclark-usgs/zonepy | d857fbace05855a2f20dc2c515885b2ce87f3999 | [
"BSD-3-Clause"
] | null | null | null | zonepy/__init__.py | brclark-usgs/zonepy | d857fbace05855a2f20dc2c515885b2ce87f3999 | [
"BSD-3-Clause"
] | 12 | 2018-01-31T21:36:07.000Z | 2020-03-10T14:43:29.000Z | zonepy/__init__.py | brclark-usgs/zonepy | d857fbace05855a2f20dc2c515885b2ce87f3999 | [
"BSD-3-Clause"
] | null | null | null | '''
Zonal Analysis
Developed by Brian Clark, Katherine Knierim, and Leslie Duncan. Portions of
this code were modified from Copyright 2013 Matthew Perry, which were
licensed under BSD-3 and included in this repo.
'''
__name__ = 'zonepy'
__author__ = 'Brian Clark, Katherine Kneirim, and Leslie Duncan'
# imports
f... | 21.5625 | 76 | 0.765217 |
be2ca34c062881367d144bc04d9b9a326e48c904 | 386 | py | Python | presentation/controller_group.py | NinjaGeeks/cli-python-IOTNinja | 444b6f84587580d7659c60773a636188654be074 | [
"MIT"
] | null | null | null | presentation/controller_group.py | NinjaGeeks/cli-python-IOTNinja | 444b6f84587580d7659c60773a636188654be074 | [
"MIT"
] | null | null | null | presentation/controller_group.py | NinjaGeeks/cli-python-IOTNinja | 444b6f84587580d7659c60773a636188654be074 | [
"MIT"
] | null | null | null | from base_controllers import ControllerGroup
# As soon as possible
class VerticalControllerGroup(ControllerGroup):
def __init__(self, cg_id):
super().__init__(cg_id)
self.__define_type("verticalGroup")
class HorizontalControllerGroup(ControllerGroup):
def __init__(self, cg_id):
supe... | 24.125 | 49 | 0.733161 |
406df48942fe7468e5c68daadba76bc4c1c17b5e | 30,352 | py | Python | dvaapp/tasks.py | pune-lug/DeepVideoAnalytics | 2650037040dca49b0f537df576af123dae8cef97 | [
"Apache-2.0"
] | null | null | null | dvaapp/tasks.py | pune-lug/DeepVideoAnalytics | 2650037040dca49b0f537df576af123dae8cef97 | [
"Apache-2.0"
] | null | null | null | dvaapp/tasks.py | pune-lug/DeepVideoAnalytics | 2650037040dca49b0f537df576af123dae8cef97 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
import subprocess,sys,shutil,os,glob,time,logging
from django.conf import settings
from dva.celery import app
from .models import Video, Frame, Detection, TEvent, Query, IndexEntries,QueryResults, Annotation, VLabel, Export, VDNDataset, S3Export, S3Import, Clusters, ClusterCodes
f... | 39.936842 | 169 | 0.644373 |
977dc631c0f1b8c43252a6d0f6882afb8779fd6e | 1,642 | py | Python | lit_nlp/components/pca.py | noahcb/lit | aae2af6b63003d1346e99995aa6213be2112c352 | [
"Apache-2.0"
] | 3 | 2020-11-27T12:47:44.000Z | 2022-01-13T21:17:02.000Z | lit_nlp/components/pca.py | screwdriver66/lit | a40ef90b514383fb78b3f8742aea31135445693e | [
"Apache-2.0"
] | 4 | 2021-09-20T22:29:08.000Z | 2022-02-27T14:30:20.000Z | lit_nlp/components/pca.py | screwdriver66/lit | a40ef90b514383fb78b3f8742aea31135445693e | [
"Apache-2.0"
] | 1 | 2020-08-14T23:06:34.000Z | 2020-08-14T23:06:34.000Z | # 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 agreed to in writing, s... | 32.196078 | 80 | 0.663216 |
e0b6dc04eb022709724cc9f092c1b75ad30cbb74 | 1,340 | py | Python | app/tests/api/event_source/test_delete.py | hollyfoxx/ace2-ams-api | 08ecf3f3dc8ac9abd224465731458950d4f78b7d | [
"Apache-2.0"
] | null | null | null | app/tests/api/event_source/test_delete.py | hollyfoxx/ace2-ams-api | 08ecf3f3dc8ac9abd224465731458950d4f78b7d | [
"Apache-2.0"
] | null | null | null | app/tests/api/event_source/test_delete.py | hollyfoxx/ace2-ams-api | 08ecf3f3dc8ac9abd224465731458950d4f78b7d | [
"Apache-2.0"
] | null | null | null | import uuid
from fastapi import status
"""
NOTE: There are no tests for the foreign key constraints. The DELETE endpoint will need to be updated once the endpoints
are in place in order to account for this.
"""
#
# INVALID TESTS
#
def test_delete_invalid_uuid(client_valid_access_token):
delete = client_valid... | 27.916667 | 120 | 0.760448 |
03bd24670967db664f55da988dc7352ec5d07f36 | 410 | py | Python | pyGRBz/cli.py | dcorre/pyGRBz | 4955e9454a19fcc409649ad623c31d5bec66cc64 | [
"MIT"
] | 2 | 2020-05-21T15:06:48.000Z | 2021-08-17T07:22:09.000Z | pyGRBz/cli.py | dcorre/pyGRBz | 4955e9454a19fcc409649ad623c31d5bec66cc64 | [
"MIT"
] | null | null | null | pyGRBz/cli.py | dcorre/pyGRBz | 4955e9454a19fcc409649ad623c31d5bec66cc64 | [
"MIT"
] | 3 | 2021-07-29T10:42:16.000Z | 2022-03-11T07:15:53.000Z | # -*- coding: utf-8 -*-
"""Console script for pyGRBz."""
import sys
import click
@click.command()
def main(args=None):
"""Console script for pyGRBz."""
click.echo("Replace this message by putting your code into "
"pyGRBz.cli.main")
click.echo("See click documentation at http://click.pocoo.... | 21.578947 | 68 | 0.634146 |
d2de1612fa593c61b2f64bec3a3f0918cd41df5c | 18,442 | py | Python | pjrpc/server/dispatcher.py | dapper91/pjrpc | cbf5c9e072935f9e59d306244c67499a4ad3e0f5 | [
"Unlicense"
] | 10 | 2020-03-15T06:41:58.000Z | 2022-03-17T08:55:53.000Z | pjrpc/server/dispatcher.py | dapper91/pjrpc | cbf5c9e072935f9e59d306244c67499a4ad3e0f5 | [
"Unlicense"
] | 41 | 2019-11-16T09:57:54.000Z | 2022-03-31T17:34:13.000Z | pjrpc/server/dispatcher.py | dapper91/pjrpc | cbf5c9e072935f9e59d306244c67499a4ad3e0f5 | [
"Unlicense"
] | 1 | 2022-03-17T08:21:28.000Z | 2022-03-17T08:21:28.000Z | import asyncio
import collections
import functools as ft
import json
import itertools as it
import logging
from typing import Any, Callable, Dict, ItemsView, KeysView, List, Optional, Type, Iterator, Iterable, Union, ValuesView
import pjrpc
from pjrpc.common import v20, BatchRequest, BatchResponse, Request, Response, ... | 34.406716 | 120 | 0.627155 |
b5728ee175df5e72fafca8262595e7e197bee6e4 | 25,285 | py | Python | pocs/observatory.py | AstroHuntsman/POCS | c582bef36b7f2c4da9b8f36144f1e2a10df3b5cc | [
"MIT"
] | 1 | 2018-01-04T16:06:39.000Z | 2018-01-04T16:06:39.000Z | pocs/observatory.py | AstroHuntsman/POCS | c582bef36b7f2c4da9b8f36144f1e2a10df3b5cc | [
"MIT"
] | 49 | 2017-02-13T02:59:18.000Z | 2018-02-12T04:38:56.000Z | pocs/observatory.py | AstroHuntsman/POCS | c582bef36b7f2c4da9b8f36144f1e2a10df3b5cc | [
"MIT"
] | 1 | 2019-04-16T04:52:16.000Z | 2019-04-16T04:52:16.000Z | import os
from collections import OrderedDict
from datetime import datetime
from glob import glob
from astroplan import Observer
from astropy import units as u
from astropy.coordinates import EarthLocation
from astropy.coordinates import get_moon
from astropy.coordinates import get_sun
from . import PanBase
from .i... | 36.966374 | 117 | 0.565395 |
502d3062441c74fa6be5920c100e63aa98d96463 | 387 | py | Python | Exercises/ex010_conversao.py | monique-tukaj/cursoemvideo-python | 79e1fd58ab5fc7d89970ff0586761767104de0e5 | [
"MIT"
] | null | null | null | Exercises/ex010_conversao.py | monique-tukaj/cursoemvideo-python | 79e1fd58ab5fc7d89970ff0586761767104de0e5 | [
"MIT"
] | null | null | null | Exercises/ex010_conversao.py | monique-tukaj/cursoemvideo-python | 79e1fd58ab5fc7d89970ff0586761767104de0e5 | [
"MIT"
] | null | null | null | #crie um programa que leia quanto dinheiro uma pessoa tem na carteira
#e mostre quantos euros ela pode comprar.
#cotacao atual
valor = float(input('Digite a quantidade de dinheiro que deseja trocar em euro: R$'))
conversao = valor / 6.26
print('Com R$ {:.2f} poderá comprar €{:.2f}.'.format(valor, conversao))
#pesquis... | 43 | 85 | 0.751938 |
d5e9dd01365a041dfd8f6df34941df56228397f3 | 7,476 | py | Python | control/tests/sisotool_test.py | berezhko/python-control | 78ec3eedd5a4a5f3d8409eec7c7f7e787793b357 | [
"BSD-3-Clause"
] | 1 | 2022-01-05T14:20:43.000Z | 2022-01-05T14:20:43.000Z | control/tests/sisotool_test.py | berezhko/python-control | 78ec3eedd5a4a5f3d8409eec7c7f7e787793b357 | [
"BSD-3-Clause"
] | null | null | null | control/tests/sisotool_test.py | berezhko/python-control | 78ec3eedd5a4a5f3d8409eec7c7f7e787793b357 | [
"BSD-3-Clause"
] | null | null | null | """sisotool_test.py"""
from control.exception import ControlMIMONotImplemented
import matplotlib.pyplot as plt
import numpy as np
from numpy.testing import assert_array_almost_equal
import pytest
from control.sisotool import sisotool, rootlocus_pid_designer
from control.rlocus import _RLClickDispatcher
from control.x... | 41.303867 | 92 | 0.570225 |
670cfe3b54c4dfee3548161a276452149bd4c3a3 | 409 | py | Python | rabbitmq/send.py | maxis1314/pyutils | 7e0666c650209155b3da186d09c54cf14825df1e | [
"Apache-2.0"
] | 2 | 2017-06-12T07:58:51.000Z | 2018-03-08T09:43:35.000Z | rabbitmq/send.py | maxis1314/pyutils | 7e0666c650209155b3da186d09c54cf14825df1e | [
"Apache-2.0"
] | 1 | 2017-06-10T02:05:52.000Z | 2017-07-04T03:57:28.000Z | rabbitmq/send.py | maxis1314/pyutils | 7e0666c650209155b3da186d09c54cf14825df1e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import pika
import sys
connection = pika.BlockingConnection(pika.ConnectionParameters(
host='localhost',virtual_host='/'))
channel = connection.channel()
#channel.queue_declare(queue='hello')
channel.basic_publish(exchange=sys.argv[1],
routing_key=sys.argv[2],
... | 25.5625 | 63 | 0.662592 |
d6570f0e27ff65076fc68cff27c367f59a7fe4f7 | 6,667 | py | Python | test/functional/txn_doublespend.py | wolfoxonly/bwb | aae01441cdc171ff7bbdc161b74b4eeb2f1b5a10 | [
"MIT"
] | null | null | null | test/functional/txn_doublespend.py | wolfoxonly/bwb | aae01441cdc171ff7bbdc161b74b4eeb2f1b5a10 | [
"MIT"
] | null | null | null | test/functional/txn_doublespend.py | wolfoxonly/bwb | aae01441cdc171ff7bbdc161b74b4eeb2f1b5a10 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bwbcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet accounts properly when there is a double-spend conflict."""
from test_framework.test_f... | 46.298611 | 111 | 0.60597 |
459b171e051f15e853b5f24e850d1f61ebb89896 | 8,369 | py | Python | espaloma/data/md.py | jstaker7/espaloma | d80d280acd608dc04c93966afe15cc3cb74f65a8 | [
"MIT"
] | null | null | null | espaloma/data/md.py | jstaker7/espaloma | d80d280acd608dc04c93966afe15cc3cb74f65a8 | [
"MIT"
] | null | null | null | espaloma/data/md.py | jstaker7/espaloma | d80d280acd608dc04c93966afe15cc3cb74f65a8 | [
"MIT"
] | null | null | null | # =============================================================================
# IMPORTS
# =============================================================================
import numpy as np
import torch
from openforcefield.typing.engines.smirnoff import ForceField
from simtk import openmm, unit
from simtk.openmm.app imp... | 27.989967 | 79 | 0.549528 |
5c5887db7a5bd54d36c42b5539a4328f8ad387cd | 11,736 | py | Python | prototypes/test/ukanren.py | fkberthold/tweedle | 6c6d21ad72143c75df860202556e4dc553a8b315 | [
"MIT"
] | 1 | 2019-01-22T06:42:51.000Z | 2019-01-22T06:42:51.000Z | prototypes/test/ukanren.py | fkberthold/tweedle | 6c6d21ad72143c75df860202556e4dc553a8b315 | [
"MIT"
] | null | null | null | prototypes/test/ukanren.py | fkberthold/tweedle | 6c6d21ad72143c75df860202556e4dc553a8b315 | [
"MIT"
] | null | null | null | import os.path
import sys
import unittest
from microkanren.ukanren import *
from microkanren.macro import macros, conj, disj, goal, call
empty_state = State()
one_value = State({LVar(0):'hi'})
two_values = State({LVar(0):'hi', LVar(1):'bye'})
value_reference = State({LVar(0):LVar(1), LVar(1):'bye'})
identical_values ... | 36.222222 | 114 | 0.612304 |
888b46443b3519711ba20f6d47fb4776e6321675 | 1,880 | py | Python | python/b_a_variables_declare.py | IVBakker/learn | e0a4249459798b2c4e715a14a801ca53feb3cc64 | [
"MIT"
] | 1 | 2019-07-09T15:22:28.000Z | 2019-07-09T15:22:28.000Z | python/b_a_variables_declare.py | IVBakker/learn | e0a4249459798b2c4e715a14a801ca53feb3cc64 | [
"MIT"
] | null | null | null | python/b_a_variables_declare.py | IVBakker/learn | e0a4249459798b2c4e715a14a801ca53feb3cc64 | [
"MIT"
] | null | null | null | # Showing message while your code is running is really important
# It helps debugging and understanding what's happening
print(f"HELLO")
# START
# "XX = <VALUE>" announce that we need a new variable that is going to be called XX with value.
# The name of a variable is only for the coder, it makes no changes to the pro... | 28.484848 | 101 | 0.697872 |
61cb229713f1b1827e5988834b461f31ae09c00e | 1,548 | py | Python | manga_py/providers/comico_jp.py | tgaugry/manga-py | d0be627e5425020053b4fb117a9b3f0d79b20c9e | [
"MIT"
] | null | null | null | manga_py/providers/comico_jp.py | tgaugry/manga-py | d0be627e5425020053b4fb117a9b3f0d79b20c9e | [
"MIT"
] | null | null | null | manga_py/providers/comico_jp.py | tgaugry/manga-py | d0be627e5425020053b4fb117a9b3f0d79b20c9e | [
"MIT"
] | null | null | null | from sys import stderr
from manga_py.provider import Provider
from .helpers.std import Std
class ComicoJp(Provider, Std):
def get_chapter_index(self) -> str:
idx = self.re.search(r'articleNo=(\d+)', self.chapter)
if idx:
return '{}-{}'.format(self.chapter_id, idx.group(1))
re... | 30.352941 | 103 | 0.575581 |
015f2b948c2141df821e06d4ac45c8147c3da327 | 392 | py | Python | flask_react_template/server/config/base.py | victor-iyiola/flask-react-template | 7b6d0363499908204fb3db0f519c8dfbf0a805d9 | [
"MIT"
] | 1 | 2018-01-31T17:19:09.000Z | 2018-01-31T17:19:09.000Z | flask_react_template/server/config/base.py | victor-iyiola/flask-react-template | 7b6d0363499908204fb3db0f519c8dfbf0a805d9 | [
"MIT"
] | null | null | null | flask_react_template/server/config/base.py | victor-iyiola/flask-react-template | 7b6d0363499908204fb3db0f519c8dfbf0a805d9 | [
"MIT"
] | null | null | null | """
@author Victor I. Afolabi
A.I. Engineer & Software developer
javafolabi@gmail.com
Created on 31 January, 2018 @ 4:56 PM.
Copyright © 2018. Victor. All rights reserved.
"""
from passlib.hash import sha256_crypt
from flask_react_template.settings import APP_NAME
class Config(object):
DEBUG = Fa... | 20.631579 | 50 | 0.721939 |
c8e0bcc54e2d2e2e536050d607b16d13b8dd71ed | 1,002 | py | Python | _filter.py | prajjwal1/nlp_simple_qa | 340282feb69b133567be833a8ec19171a9ab1fd6 | [
"Apache-2.0"
] | null | null | null | _filter.py | prajjwal1/nlp_simple_qa | 340282feb69b133567be833a8ec19171a9ab1fd6 | [
"Apache-2.0"
] | 5 | 2021-11-30T01:10:42.000Z | 2021-11-30T01:11:09.000Z | _filter.py | prajjwal1/nlp_simple_qa | 340282feb69b133567be833a8ec19171a9ab1fd6 | [
"Apache-2.0"
] | null | null | null | import pickle
import re
def filter_query(query):
words_to_remove = ["how", "when", "what", "was", "the", "of", "the", "for", "whence", "\""]
chars_to_remove = ['"', '?', '.', "‟", "„", "“", "’", "“", "”"]
query = ' '.join([x for x in query.split() if x not in words_to_remove])
s = re.sub(r'\W+', '', qu... | 29.470588 | 95 | 0.625749 |
c1ef1485dd7f15be6728ac720df77a08cc43235d | 104,929 | bzl | Python | dotnet/stdlib.net/net47/generated.bzl | nolen777/rules_mono | b49c210478c2240fcc7be655c9fc37d751610fb1 | [
"Apache-2.0"
] | null | null | null | dotnet/stdlib.net/net47/generated.bzl | nolen777/rules_mono | b49c210478c2240fcc7be655c9fc37d751610fb1 | [
"Apache-2.0"
] | null | null | null | dotnet/stdlib.net/net47/generated.bzl | nolen777/rules_mono | b49c210478c2240fcc7be655c9fc37d751610fb1 | [
"Apache-2.0"
] | null | null | null | load("@rules_mono//dotnet/private:rules/stdlib.bzl", "net_stdlib")
def define_stdlib(context_data):
net_stdlib(
name = "accessibility.dll",
version = "4.0.0.0",
dotnet_context_data = context_data,
ref = "@Microsoft.NETFramework.ReferenceAssemblies.net47.1.0.0//:build/.NETFramework/v... | 44.480288 | 165 | 0.612081 |
83afb9339aa841d601430ada8501d4a8985be294 | 8,877 | py | Python | pyattck/configuration.py | aacienfuegos/pyattck | b3013b846aa4de414bb7654abdbf8bd19c491eda | [
"MIT"
] | null | null | null | pyattck/configuration.py | aacienfuegos/pyattck | b3013b846aa4de414bb7654abdbf8bd19c491eda | [
"MIT"
] | null | null | null | pyattck/configuration.py | aacienfuegos/pyattck | b3013b846aa4de414bb7654abdbf8bd19c491eda | [
"MIT"
] | null | null | null | import os
import json
import warnings
from urllib.parse import urlparse
from pathlib import Path
import yaml
from requests.api import request
from .utils.exceptions import UnknownFileError
class ConfigurationProperties(type):
__config_data = None
def __download_url_data(cls, url):
response = request... | 35.22619 | 203 | 0.640757 |
e89c36f1068e9c1410f9f47f853b49b298ccd7e6 | 3,269 | py | Python | scripts/mlflow_migration/db_util/dblib.py | tmankita/trains | 068a5296e12dcfa6f46b241dfadfb50b7dffaf8f | [
"Apache-2.0"
] | null | null | null | scripts/mlflow_migration/db_util/dblib.py | tmankita/trains | 068a5296e12dcfa6f46b241dfadfb50b7dffaf8f | [
"Apache-2.0"
] | null | null | null | scripts/mlflow_migration/db_util/dblib.py | tmankita/trains | 068a5296e12dcfa6f46b241dfadfb50b7dffaf8f | [
"Apache-2.0"
] | null | null | null | from typing import Type, Optional
from urllib.parse import urlparse
from sqlalchemy import distinct
from .schemas.metric import Metric
from .schemas.param import Param
from .schemas.run import Run
from .schemas.tag import Tag
DATABASE_ENGINES = ["postgresql", "mysql", "sqlite", "mssql"]
Session: Optional[Type] = No... | 23.021127 | 88 | 0.672989 |
82016f6fa33c512f4da35a81fc2933d876b7db90 | 4,583 | py | Python | scripts/build/builders/esp32.py | rachel-li-jci/connectedhomeip | 7200076e7c690d9fbad4c1d3d13db1d11d87d259 | [
"Apache-2.0"
] | null | null | null | scripts/build/builders/esp32.py | rachel-li-jci/connectedhomeip | 7200076e7c690d9fbad4c1d3d13db1d11d87d259 | [
"Apache-2.0"
] | 1 | 2021-06-16T08:38:45.000Z | 2021-06-16T08:38:45.000Z | scripts/build/builders/esp32.py | rachel-li-jci/connectedhomeip | 7200076e7c690d9fbad4c1d3d13db1d11d87d259 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 Project CHIP 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 or agreed to in ... | 32.048951 | 104 | 0.614881 |
d6ab1ceac71f71b48c2f515ef9f292066cacb522 | 2,503 | py | Python | dm/dhcp_test.py | DentonGentry/gfiber-catawampus | b01e4444f3c7f12b1af7837203b37060fd443bb7 | [
"Apache-2.0"
] | 2 | 2017-10-03T16:06:29.000Z | 2020-09-08T13:03:13.000Z | dm/dhcp_test.py | DentonGentry/gfiber-catawampus | b01e4444f3c7f12b1af7837203b37060fd443bb7 | [
"Apache-2.0"
] | null | null | null | dm/dhcp_test.py | DentonGentry/gfiber-catawampus | b01e4444f3c7f12b1af7837203b37060fd443bb7 | [
"Apache-2.0"
] | 1 | 2017-05-07T17:39:02.000Z | 2017-05-07T17:39:02.000Z | #!/usr/bin/python
# Copyright 2013 Google 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 appli... | 40.370968 | 76 | 0.719537 |
379a3de6db3c4a30af0922fcaeb261d40924b106 | 2,921 | py | Python | plots/coldstarts.py | Be-FaaS/BeFaaS-analysis | a63025d9ee9f0835f2f98346df59c42f058e0d6b | [
"Apache-2.0"
] | null | null | null | plots/coldstarts.py | Be-FaaS/BeFaaS-analysis | a63025d9ee9f0835f2f98346df59c42f058e0d6b | [
"Apache-2.0"
] | null | null | null | plots/coldstarts.py | Be-FaaS/BeFaaS-analysis | a63025d9ee9f0835f2f98346df59c42f058e0d6b | [
"Apache-2.0"
] | null | null | null | import pathlib
from collections import defaultdict
import pandas as pd
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
import seaborn as sns
from argmagic import argmagic
import befaas as bf
from befaas.helper import group_by
from befaas.logentry import ColdstartLog
from befaas.calls import ... | 25.4 | 71 | 0.661417 |
ac753cce1d322125e26ea524a5e930975829dde8 | 3,105 | py | Python | drl_grasping/envs/tasks/reach/reach_depth_image.py | Tiamat-Tech/drl_grasping | e67efee1cdbeeb3cb1e4d028890bbfc601e7840c | [
"BSD-3-Clause"
] | 126 | 2020-11-02T11:08:07.000Z | 2022-03-31T16:25:06.000Z | drl_grasping/envs/tasks/reach/reach_depth_image.py | Tiamat-Tech/drl_grasping | e67efee1cdbeeb3cb1e4d028890bbfc601e7840c | [
"BSD-3-Clause"
] | 68 | 2020-11-02T13:18:29.000Z | 2022-02-27T17:38:50.000Z | drl_grasping/envs/tasks/reach/reach_depth_image.py | Tiamat-Tech/drl_grasping | e67efee1cdbeeb3cb1e4d028890bbfc601e7840c | [
"BSD-3-Clause"
] | 27 | 2021-01-20T16:15:41.000Z | 2022-03-15T10:44:43.000Z | from drl_grasping.envs.tasks.reach import Reach
from drl_grasping.perception import CameraSubscriber
from gym_ignition.utils.typing import Observation
from gym_ignition.utils.typing import ObservationSpace
from typing import Tuple
import abc
import gym
import numpy as np
# TODO: ReachDepthImage environment currently d... | 37.865854 | 96 | 0.589694 |
77f2e1e6b21d5ce45df4385d4b7e8c193fcad8ea | 1,862 | py | Python | cutRod.py | Jhan960102/Algorithm-Note | 888481b191b65edd9f5f29ef627cf233a5d3e30a | [
"Apache-2.0"
] | null | null | null | cutRod.py | Jhan960102/Algorithm-Note | 888481b191b65edd9f5f29ef627cf233a5d3e30a | [
"Apache-2.0"
] | null | null | null | cutRod.py | Jhan960102/Algorithm-Note | 888481b191b65edd9f5f29ef627cf233a5d3e30a | [
"Apache-2.0"
] | null | null | null | # -*- encoding:utf-8 -*-
# @Author: jhan
# @FileName: cutRod.py
# @Date: 2022/1/12 10:51
p = [0, 1, 5, 8, 9, 10, 17, 17, 20, 24, 30]
def cut_rod_recurision_1(p, n):
if n == 0:
return 0
else:
res = p[n]
for i in range(1, n):
res = max(res, (cut_rod_recurision_1(... | 20.688889 | 88 | 0.422127 |
720ae1273099ff79ecb69f2ceb5328169b9e4a88 | 21,027 | py | Python | back of PSSM/PSSM/pssm/models/rstereo # back of matrix aggregation.py | lidongyv/PSSM | 61ef78bc465fd53fb128d0aa1b913f787c8c7f74 | [
"Apache-2.0"
] | null | null | null | back of PSSM/PSSM/pssm/models/rstereo # back of matrix aggregation.py | lidongyv/PSSM | 61ef78bc465fd53fb128d0aa1b913f787c8c7f74 | [
"Apache-2.0"
] | null | null | null | back of PSSM/PSSM/pssm/models/rstereo # back of matrix aggregation.py | lidongyv/PSSM | 61ef78bc465fd53fb128d0aa1b913f787c8c7f74 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# @Author: yulidong
# @Date: 2018-07-17 10:44:43
# @Last Modified by: yulidong
# @Last Modified time: 2018-08-30 20:14:54
# -*- coding: utf-8 -*-
# @Author: lidong
# @Date: 2018-03-20 18:01:52
# @Last Modified by: yulidong
# @Last Modified time: 2018-07-16 22:16:14
import time
import tor... | 44.929487 | 159 | 0.563704 |
da6c45691c6bca95f1184fe4e0f2066502e76730 | 10,169 | py | Python | src/GUI/image_processing.py | Team-Ausdroid-Unimelb/rm_ai_challenge_2020s2_koala | 6d1e141e33a27ab3f8f35dd0f39649b4f9281bf3 | [
"MIT"
] | null | null | null | src/GUI/image_processing.py | Team-Ausdroid-Unimelb/rm_ai_challenge_2020s2_koala | 6d1e141e33a27ab3f8f35dd0f39649b4f9281bf3 | [
"MIT"
] | null | null | null | src/GUI/image_processing.py | Team-Ausdroid-Unimelb/rm_ai_challenge_2020s2_koala | 6d1e141e33a27ab3f8f35dd0f39649b4f9281bf3 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import time
import os
from pathlib import Path
from PIL import ImageTk,Image
import GUI_support
import tkinter as tk
from predictions import LabelledImage, Armour
from filemanagement import *
from tkinter import messagebox
CONFIDENCE_THRESHOLD = 0.05
## Load necessary files for model
de... | 32.697749 | 118 | 0.643328 |
79c08e12a3cc83a24975e77d1795da4b54415ab4 | 1,474 | py | Python | examples/plotting/file/bar_stacked_split.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 15,193 | 2015-01-01T05:11:45.000Z | 2022-03-31T19:30:20.000Z | examples/plotting/file/bar_stacked_split.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 9,554 | 2015-01-01T03:16:54.000Z | 2022-03-31T22:59:39.000Z | examples/plotting/file/bar_stacked_split.py | g-parki/bokeh | 664ead5306bba64609e734d4105c8aa8cfb76d81 | [
"BSD-3-Clause"
] | 4,829 | 2015-01-02T03:35:32.000Z | 2022-03-30T16:40:26.000Z | ''' A split, horizontal stacked bar chart using plain Python lists.
.. bokeh-example-metadata::
:apis: bokeh.plotting.Figure.hbar_stack
:refs: :ref:`userguide_categorical` > :ref:`userguide_categorical_bars` > :ref:`userguide_categorical_bars_stacked`
:keywords: bars, categorical, stacked
'''
from bokeh.m... | 35.95122 | 119 | 0.622795 |
af22aa254fa3ac30a13a5cd6ba066d9bae8680b2 | 698 | py | Python | test/test_device.py | kinow-io/kinow-python-sdk | 4c1699a3c78048b84287bd049a669651a5b4e2d5 | [
"Apache-2.0"
] | 1 | 2019-06-26T14:24:54.000Z | 2019-06-26T14:24:54.000Z | test/test_device.py | kinow-io/kinow-python-sdk | 4c1699a3c78048b84287bd049a669651a5b4e2d5 | [
"Apache-2.0"
] | null | null | null | test/test_device.py | kinow-io/kinow-python-sdk | 4c1699a3c78048b84287bd049a669651a5b4e2d5 | [
"Apache-2.0"
] | 1 | 2018-02-01T10:08:40.000Z | 2018-02-01T10:08:40.000Z | # coding: utf-8
"""
Server API
Reference for Server API (REST/Json)
OpenAPI spec version: 1.4.58
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
import unittest
import kinow_client
from kinow_client.rest import ... | 16.232558 | 68 | 0.660458 |
c4ec47371601eafa5acd4c3980934259ce1df47f | 2,832 | py | Python | py3status/modules/pingdom.py | Lujeni/py3status | ed5cc6b7c15c45a04ae8fe9f659175d6f4effac3 | [
"BSD-2-Clause"
] | null | null | null | py3status/modules/pingdom.py | Lujeni/py3status | ed5cc6b7c15c45a04ae8fe9f659175d6f4effac3 | [
"BSD-2-Clause"
] | null | null | null | py3status/modules/pingdom.py | Lujeni/py3status | ed5cc6b7c15c45a04ae8fe9f659175d6f4effac3 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Dynamically display the latest response time of the configured checks using
the Pingdom API.
We also verify the status of the checks and colorize if needed.
Pingdom API doc : https://www.pingdom.com/services/api-documentation-rest/
#NOTE: This module needs the 'requests' python module from ... | 32.181818 | 75 | 0.548729 |
24ae6ab491ffea7cda20d15e793b8c6dee69e414 | 1,990 | py | Python | tests/test_vardict.py | msk-access/postprocessing_variant_calls | fb14d35249d0eac9e263b3b5ef97fbd2ea908d9e | [
"MIT"
] | null | null | null | tests/test_vardict.py | msk-access/postprocessing_variant_calls | fb14d35249d0eac9e263b3b5ef97fbd2ea908d9e | [
"MIT"
] | null | null | null | tests/test_vardict.py | msk-access/postprocessing_variant_calls | fb14d35249d0eac9e263b3b5ef97fbd2ea908d9e | [
"MIT"
] | null | null | null | import pytest # type: ignore
import os
from typer.testing import CliRunner
from pdb import set_trace as bp
from postprocessing_variant_calls.main import app
runner = CliRunner()
vardict_single_calls = [
['vardict', 'single', 'filter', '--inputVcf', 'tests/data/vardict/single_test.vcf' , '--tsampleName', 'Mye... | 45.227273 | 180 | 0.736683 |
f99ca4fb316d61be1e719bb510d63c13a8c90eee | 1,013 | py | Python | tests/test_helper.py | patrick-gxg/mashumaro | a6bd88477d30deeb130b19856c0fe9e6e78a78d9 | [
"Apache-2.0"
] | 394 | 2018-11-09T11:55:11.000Z | 2022-03-27T07:39:48.000Z | tests/test_helper.py | patrick-gxg/mashumaro | a6bd88477d30deeb130b19856c0fe9e6e78a78d9 | [
"Apache-2.0"
] | 70 | 2018-12-10T19:43:01.000Z | 2022-03-17T07:37:45.000Z | tests/test_helper.py | patrick-gxg/mashumaro | a6bd88477d30deeb130b19856c0fe9e6e78a78d9 | [
"Apache-2.0"
] | 29 | 2018-12-10T19:44:19.000Z | 2022-03-11T00:12:26.000Z | from mashumaro import field_options
from mashumaro.types import SerializationStrategy
def test_field_options_helper():
assert field_options() == {
"serialize": None,
"deserialize": None,
"serialization_strategy": None,
"alias": None,
}
def serialize(x):
return x #... | 25.325 | 78 | 0.640671 |
921d3d23dee9d403b4241a49fe395fcbd66faae2 | 4,640 | py | Python | pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/logging/verify.py | miott/genielibs | 6464642cdd67aa2367bdbb12561af4bb060e5e62 | [
"Apache-2.0"
] | null | null | null | pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/logging/verify.py | miott/genielibs | 6464642cdd67aa2367bdbb12561af4bb060e5e62 | [
"Apache-2.0"
] | null | null | null | pkgs/sdk-pkg/src/genie/libs/sdk/apis/iosxe/logging/verify.py | miott/genielibs | 6464642cdd67aa2367bdbb12561af4bb060e5e62 | [
"Apache-2.0"
] | null | null | null | """ Common verification functions for logging """
# Python
import re
import logging
from datetime import datetime
# Genie
from genie.metaparser.util.exceptions import SchemaEmptyParserError
# Logging
from genie.libs.sdk.apis.iosxe.logging.get import get_logging_logs
log = logging.getLogger(__name__)
def is_loggin... | 35.692308 | 145 | 0.618534 |
356de4bc6d2e5ab5dbe49cd74eefff5a0cd27db4 | 6,646 | py | Python | helios/pipeViewer/pipe_view/gui/dialogs/select_db_dlg.py | debjyoti0891/map | abdae67964420d7d36255dcbf83e4240a1ef4295 | [
"MIT"
] | 44 | 2019-12-13T06:39:13.000Z | 2022-03-29T23:09:28.000Z | helios/pipeViewer/pipe_view/gui/dialogs/select_db_dlg.py | debjyoti0891/map | abdae67964420d7d36255dcbf83e4240a1ef4295 | [
"MIT"
] | 222 | 2020-01-14T21:58:56.000Z | 2022-03-31T20:05:12.000Z | helios/pipeViewer/pipe_view/gui/dialogs/select_db_dlg.py | debjyoti0891/map | abdae67964420d7d36255dcbf83e4240a1ef4295 | [
"MIT"
] | 19 | 2020-01-03T19:03:22.000Z | 2022-01-09T08:36:20.000Z | # # @package select_db_dbg.py
# @brief Dialog for selecting a database file
import sys
import os
import wx
import wx.lib.scrolledpanel as scrolledpanel
# # Dialog for selecting an Argos database.
#
# Use ShowModal to display the dialog and then use GetPrefix to see selected
# filename
class SelectDatabaseDlg(wx.D... | 35.351064 | 100 | 0.599759 |
a96c94b0d02dc6e2b87ecdd680565e449a0bead0 | 142 | py | Python | exercicios-turtle/.history/conversor_temp_20210624131905.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | 1 | 2021-11-28T18:49:21.000Z | 2021-11-28T18:49:21.000Z | exercicios-turtle/.history/conversor_temp_20210624131905.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | null | null | null | exercicios-turtle/.history/conversor_temp_20210624131905.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | null | null | null | print("Abaixo digite o valor da temperatura em graus para saber sua conversão em fahrenheit")
temp = int(input('digite a temperatura'))
if = | 35.5 | 93 | 0.760563 |
a1cb2f796e79563a804c723eda8f71f2a95db2a7 | 8,028 | py | Python | segeval/ml/__init__.py | cfournie/segmentation.evaluation | c4140b48112aac697aa7f05effe8026648ebc501 | [
"BSD-3-Clause"
] | 27 | 2015-03-22T23:06:47.000Z | 2022-01-21T23:21:05.000Z | segeval/ml/__init__.py | cfournie/segmentation.evaluation | c4140b48112aac697aa7f05effe8026648ebc501 | [
"BSD-3-Clause"
] | 4 | 2015-03-12T18:27:08.000Z | 2019-10-24T13:09:31.000Z | segeval/ml/__init__.py | cfournie/segmentation.evaluation | c4140b48112aac697aa7f05effe8026648ebc501 | [
"BSD-3-Clause"
] | 7 | 2015-03-12T18:29:27.000Z | 2019-01-25T08:52:05.000Z | '''
Machine learning metric package. This package a variety of traditional machine
learning metrics that have been adapted for use in segmentation.
.. moduleauthor:: Chris Fournier <chris.m.fournier@gmail.com>
'''
from __future__ import absolute_import, division
from decimal import Decimal
from collections import def... | 31.731225 | 86 | 0.626557 |
a07076e8dd2359b6ac9323c87ec8f9119c8bdace | 17,516 | py | Python | nncls/data/_meta.py | xiaohu2015/nncls | b7071b69c0ca9521e914eab2f8dcfaf1a80723d6 | [
"Apache-2.0"
] | 8 | 2021-11-10T13:09:26.000Z | 2021-12-12T00:11:46.000Z | nncls/data/_meta.py | xiaohu2015/nncls | b7071b69c0ca9521e914eab2f8dcfaf1a80723d6 | [
"Apache-2.0"
] | null | null | null | nncls/data/_meta.py | xiaohu2015/nncls | b7071b69c0ca9521e914eab2f8dcfaf1a80723d6 | [
"Apache-2.0"
] | null | null | null |
_IMAGENET_CATEGORIES = [
"tench",
"goldfish",
"great white shark",
"tiger shark",
"hammerhead",
"electric ray",
"stingray",
"cock",
"hen",
"ostrich",
"brambling",
"goldfinch",
"house finch",
"junco",
"indigo bunting",
"robin",
"bulbul",
"jay",
... | 17.446215 | 37 | 0.515757 |
dea1be16f0239343a92a5db2b2f074a2af189da5 | 261 | py | Python | tests/test_migrations_func.py | Drizzt1991/plasticine | be61baa88f53bdfa666d068a14f17ccc0cfe4d02 | [
"MIT"
] | null | null | null | tests/test_migrations_func.py | Drizzt1991/plasticine | be61baa88f53bdfa666d068a14f17ccc0cfe4d02 | [
"MIT"
] | null | null | null | tests/test_migrations_func.py | Drizzt1991/plasticine | be61baa88f53bdfa666d068a14f17ccc0cfe4d02 | [
"MIT"
] | null | null | null |
from unittest import TestCase
from elasticine.Migrations import MappingMigration
class TestMigrationsFunc(TestCase):
def setUp(self):
self.elastic = Elasticsearch(hosts, **es_params)
def test_simple_migration(self):
pass
| 16.3125 | 56 | 0.708812 |
12839363bf8a8fff2a875e22fd522df989c543e8 | 2,491 | py | Python | monster.py | ichomchom/Indeed-Bot | ce0355e9533327b01caf547b000988282aed4483 | [
"MIT"
] | 17 | 2019-08-04T18:05:34.000Z | 2022-03-20T22:30:51.000Z | monster.py | ichomchom/Indeed-Bot | ce0355e9533327b01caf547b000988282aed4483 | [
"MIT"
] | 1 | 2020-05-30T16:59:36.000Z | 2021-04-20T07:53:49.000Z | monster.py | ichomchom/Indeed-Bot | ce0355e9533327b01caf547b000988282aed4483 | [
"MIT"
] | 7 | 2019-12-17T19:21:28.000Z | 2022-02-08T11:27:23.000Z | from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdrive... | 30.753086 | 102 | 0.704135 |
da7b941c40ec775014f79af9856aca9760669a06 | 1,234 | py | Python | data/p4VQE/R4/benchmark/startPyquil170.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startPyquil170.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startPyquil170.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=4
# total number=12
import pyquil
from pyquil.api import local_forest_runtime, QVMConnection
from pyquil import Program, get_qc
from pyquil.gates import *
import numpy as np
conn = QVMConnection()
def make_circuit()-> Program:
prog = Program() # circuit begin
prog += H(0) # number=1
pr... | 23.283019 | 64 | 0.599676 |
efdcae5ded4bf8b6654d9a311c777d0d25a8d295 | 12,910 | py | Python | backend/final.py | vsraghavhk/interactive-gcoder | 1aa7b20a90a03de7b2df51e27b6a4e630eb75f6f | [
"Apache-2.0"
] | 1 | 2020-12-02T19:29:32.000Z | 2020-12-02T19:29:32.000Z | backend/final.py | vsraghavhk/interactive-gcoder | 1aa7b20a90a03de7b2df51e27b6a4e630eb75f6f | [
"Apache-2.0"
] | null | null | null | backend/final.py | vsraghavhk/interactive-gcoder | 1aa7b20a90a03de7b2df51e27b6a4e630eb75f6f | [
"Apache-2.0"
] | null | null | null | import os
import json
import math
from random import randrange
import matplotlib.pyplot as plt
from create_json import make_json
from collections import defaultdict
filename = "default.gcode"
data_file = "variables.json"
# create data.json file if it doesn't exist.
if os.path.exists(data_file) == False:
... | 36.468927 | 130 | 0.517893 |
4e807582d37d2680946b2e47678fe298d58265d7 | 12,937 | py | Python | onnxruntime/test/python/quantization/test_op_pad.py | SiriusKY/onnxruntime | 3c5853dcbc9d5dda2476afa8c6105802d2b8e53d | [
"MIT"
] | 1 | 2022-03-16T11:30:16.000Z | 2022-03-16T11:30:16.000Z | onnxruntime/test/python/quantization/test_op_pad.py | SiriusKY/onnxruntime | 3c5853dcbc9d5dda2476afa8c6105802d2b8e53d | [
"MIT"
] | null | null | null | onnxruntime/test/python/quantization/test_op_pad.py | SiriusKY/onnxruntime | 3c5853dcbc9d5dda2476afa8c6105802d2b8e53d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# 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.
# -----------------------------------------------... | 59.344037 | 135 | 0.677205 |
fc8803ba4c30643d97603596570ca8651cea40ce | 4,829 | py | Python | build/lib.macosx-10.9-x86_64-3.9/mediapipe/calculators/core/flow_limiter_calculator_pb2.py | hanggaoh/mediapipe | 9eafb85cd7daa8986be7e4cc8af2f256f6f83451 | [
"Apache-2.0"
] | 2 | 2021-08-11T15:50:12.000Z | 2021-09-03T17:53:47.000Z | build/lib.macosx-10.9-x86_64-3.9/mediapipe/calculators/core/flow_limiter_calculator_pb2.py | hanggaoh/mediapipe | 9eafb85cd7daa8986be7e4cc8af2f256f6f83451 | [
"Apache-2.0"
] | 1 | 2022-01-20T11:17:50.000Z | 2022-01-20T11:17:50.000Z | build/lib.macosx-10.9-x86_64-3.9/mediapipe/calculators/core/flow_limiter_calculator_pb2.py | hanggaoh/mediapipe | 9eafb85cd7daa8986be7e4cc8af2f256f6f83451 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mediapipe/calculators/core/flow_limiter_calculator.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import re... | 47.811881 | 522 | 0.807414 |
8fe338fdb4e92c4223b2ea0db035bd6d5fc39adc | 7,442 | py | Python | py_glo_boards_api/api.py | Transparent-CDN/py-glo-board | 39dc2a6a7a658490b4e572de2e540afdd6461f83 | [
"MIT"
] | 6 | 2019-12-12T13:10:18.000Z | 2021-11-03T08:37:31.000Z | py_glo_boards_api/api.py | Transparent-CDN/py-glo-board | 39dc2a6a7a658490b4e572de2e540afdd6461f83 | [
"MIT"
] | 2 | 2019-11-12T13:10:33.000Z | 2021-01-26T05:15:32.000Z | py_glo_boards_api/api.py | Transparent-CDN/py-glo-board | 39dc2a6a7a658490b4e572de2e540afdd6461f83 | [
"MIT"
] | 3 | 2019-10-22T10:08:55.000Z | 2021-11-23T17:55:52.000Z | import requests
import json
API_URL = "https://gloapi.gitkraken.com/v1/glo/{0}"
CONNECT_TIMEOUT = 3.5
def _make_request(token, method_name, method='get', params={}, json_params=None, files=None):
payload = {'access_token': token}
payload.update(params)
result = requests.request(method, API_URL.format(met... | 31.533898 | 138 | 0.671056 |
6d6dde7710ca4e799380b51d27017835d98246df | 1,061 | py | Python | day-16/part-2/francisco.py | TPXP/adventofcode-2019 | ee653d6bfb510d14f2c2b3efc730d328c16b3f71 | [
"MIT"
] | 8 | 2019-12-01T08:56:46.000Z | 2019-12-05T21:21:12.000Z | day-16/part-2/francisco.py | TPXP/adventofcode-2019 | ee653d6bfb510d14f2c2b3efc730d328c16b3f71 | [
"MIT"
] | 10 | 2019-11-25T09:56:20.000Z | 2021-05-10T19:57:48.000Z | day-16/part-2/francisco.py | TPXP/adventofcode-2019 | ee653d6bfb510d14f2c2b3efc730d328c16b3f71 | [
"MIT"
] | 5 | 2019-12-01T08:19:57.000Z | 2020-11-23T09:50:19.000Z | from tool.runners.python import SubmissionPy
import itertools
import numpy as np
def fft_iter_2(l, offset, times=100):
# Key assumption for part 2
assert offset > 10000 * len(l) // 2
# l = np.array([l[i % len(l)] for i in range(offset, 10_000 * len(l))])
l = np.array(
list(
itert... | 25.878049 | 86 | 0.549482 |
eb938b88cda4366a6ae98880a6b1151db9864c1c | 2,326 | py | Python | test/python/circuit/test_circuit_multi_registers.py | lerongil/qiskit-terra | a25af2a2378bc3d4f5ec73b948d048d1b707454c | [
"Apache-2.0"
] | 22 | 2019-08-15T04:39:15.000Z | 2022-03-06T05:17:04.000Z | test/python/circuit/test_circuit_multi_registers.py | lerongil/qiskit-terra | a25af2a2378bc3d4f5ec73b948d048d1b707454c | [
"Apache-2.0"
] | 2 | 2020-10-26T07:12:12.000Z | 2021-12-09T16:22:51.000Z | test/python/circuit/test_circuit_multi_registers.py | lerongil/qiskit-terra | a25af2a2378bc3d4f5ec73b948d048d1b707454c | [
"Apache-2.0"
] | 9 | 2019-09-05T05:33:00.000Z | 2021-10-09T16:04:53.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# 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... | 31.863014 | 77 | 0.6681 |
053ac0700d2dd8fad51c51732b85273d9be4255e | 3,641 | py | Python | api_yamdb/api/serializers.py | 4madeuz/DRF_exampe | ab4f155fcc0ed10912f8a05f57de6b45d4d836fd | [
"MIT"
] | null | null | null | api_yamdb/api/serializers.py | 4madeuz/DRF_exampe | ab4f155fcc0ed10912f8a05f57de6b45d4d836fd | [
"MIT"
] | null | null | null | api_yamdb/api/serializers.py | 4madeuz/DRF_exampe | ab4f155fcc0ed10912f8a05f57de6b45d4d836fd | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.shortcuts import get_object_or_404
from rest_framework import serializers
from rest_framework.relations import SlugRelatedField
from rest_framework_simplejwt.serializers import TokenObtainPairSerializer
from reviews.models import Categories, Comment, Genres, R... | 28.669291 | 79 | 0.641857 |
bb72b867d7abab77336d59b8be4c703ff770e469 | 2,608 | py | Python | sample-code/Python/23 Analytics/get_analytics_summary.py | Mesitis/community | da5ae7d57d7ed4c4f55ef1671520ff32270ad213 | [
"MIT"
] | 2 | 2017-06-12T06:19:05.000Z | 2018-02-07T05:32:22.000Z | sample-code/Python/23 Analytics/get_analytics_summary.py | Mesitis/community | da5ae7d57d7ed4c4f55ef1671520ff32270ad213 | [
"MIT"
] | null | null | null | sample-code/Python/23 Analytics/get_analytics_summary.py | Mesitis/community | da5ae7d57d7ed4c4f55ef1671520ff32270ad213 | [
"MIT"
] | 2 | 2017-07-05T05:26:27.000Z | 2018-09-05T13:52:27.000Z | '''
- login and get token
- process 2FA if 2FA is setup for this account
- Returns analytics data for the given switch user
'''
import requests
import json
get_token_url = "https://api.canopy.cloud:443/api/v1/sessions/"
validate_otp_url = "https://api.canopy.cloud:443/api/v1/sessions/otp/validate.json" #calling the... | 33.87013 | 140 | 0.722009 |
2cc2ebe4f22fdc770184e319a719a08eb4c1e1fe | 8,378 | py | Python | dayu_job_center/src/server.py | phenom-films/dayu_job_center | bcdb8c22e6e41c88aeca6584f17f8d95cea89ef2 | [
"MIT"
] | 7 | 2018-10-11T07:44:38.000Z | 2021-05-26T16:34:38.000Z | dayu_job_center/src/server.py | phenom-films/dayu_job_center | bcdb8c22e6e41c88aeca6584f17f8d95cea89ef2 | [
"MIT"
] | null | null | null | dayu_job_center/src/server.py | phenom-films/dayu_job_center | bcdb8c22e6e41c88aeca6584f17f8d95cea89ef2 | [
"MIT"
] | 4 | 2019-07-19T01:03:38.000Z | 2022-02-16T13:43:17.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
__author__ = 'andyguo'
import datetime
import json
import threading
import zmq
from config import *
from util import tprint, recursive_update
from worker import LocalAsyncWorker
class ServerBase(object):
worker_count = None
workers = {}
available_workers... | 36.268398 | 117 | 0.578181 |
ba60bb52ccb7ec0a36b24ca5414b807bd7d8b5e6 | 466 | py | Python | bookr/reviews/migrations/0003_book_publication_date.py | ecedmondson/bookr | 0e8adcbad177bde48b975de422d9bccee09da4cc | [
"MIT"
] | null | null | null | bookr/reviews/migrations/0003_book_publication_date.py | ecedmondson/bookr | 0e8adcbad177bde48b975de422d9bccee09da4cc | [
"MIT"
] | 2 | 2022-02-05T03:07:06.000Z | 2022-02-05T03:07:37.000Z | bookr/reviews/migrations/0003_book_publication_date.py | ecedmondson/bookr | 0e8adcbad177bde48b975de422d9bccee09da4cc | [
"MIT"
] | null | null | null | # Generated by Django 4.0.2 on 2022-02-16 02:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("reviews", "0002_book_contributor_review_bookcontributor_and_more"),
]
operations = [
migrations.AddField(
model_name="book",
... | 24.526316 | 94 | 0.645923 |
a826d12645b1beb23a61caecc90cf5df08e3ae8a | 33,913 | py | Python | fullwavepy/ndat/arrays.py | kmch/FullwavePy | 3c704b9b6ae2c6c585adb61e57991caf30ab240e | [
"MIT"
] | 2 | 2020-12-24T01:02:16.000Z | 2021-02-17T10:00:58.000Z | fullwavepy/ndat/arrays.py | kmch/FullwavePy | 3c704b9b6ae2c6c585adb61e57991caf30ab240e | [
"MIT"
] | null | null | null | fullwavepy/ndat/arrays.py | kmch/FullwavePy | 3c704b9b6ae2c6c585adb61e57991caf30ab240e | [
"MIT"
] | null | null | null | """
Wrappers around NumPy arrays.
Notes
-----
Arr3d -> Arr2d etc. can only be achieved by their slice() methods
Numpy's slice-index notation A[:,0,:] etc. works (i.e. reshapes)
but doesn't convert the type
(c) 2019- Kajetan Chrapkiewicz.
Copywright: Ask for permission writing to k.chrapkiewicz17@imperial.ac.uk.
"""... | 31.342884 | 135 | 0.528942 |
cd009b6a376ab491d7653d406cd8f30a59d2e0c0 | 498 | py | Python | tools/first_last_name.py | lucasayres/python-tools | 686b84986aae1b1714fa5645b1f2a3fd6ef8355d | [
"MIT"
] | 71 | 2018-06-28T17:38:15.000Z | 2022-02-08T17:42:42.000Z | tools/first_last_name.py | DalavanCloud/python-tools | 686b84986aae1b1714fa5645b1f2a3fd6ef8355d | [
"MIT"
] | null | null | null | tools/first_last_name.py | DalavanCloud/python-tools | 686b84986aae1b1714fa5645b1f2a3fd6ef8355d | [
"MIT"
] | 14 | 2018-07-08T03:29:29.000Z | 2022-03-22T21:04:39.000Z | # -*- coding: utf-8 -*-
def first_last_name(name):
"""Extract the first and last name from a full name.
Args:
name (str): Full name.
Returns:
str: Return 'first_name last_name'.
"""
name = name.strip().split()
first_last = ''
if len(name):
first = name[0]
l... | 21.652174 | 56 | 0.514056 |
33c6f0b828a25f84b51c08afbd165bd11237bafc | 487 | py | Python | Curso_Python_3_UDEMY/programacao_funcional/imutabilidade_v2.py | DanilooSilva/Cursos_de_Python | 8f167a4c6e16f01601e23b6f107578aa1454472d | [
"MIT"
] | null | null | null | Curso_Python_3_UDEMY/programacao_funcional/imutabilidade_v2.py | DanilooSilva/Cursos_de_Python | 8f167a4c6e16f01601e23b6f107578aa1454472d | [
"MIT"
] | null | null | null | Curso_Python_3_UDEMY/programacao_funcional/imutabilidade_v2.py | DanilooSilva/Cursos_de_Python | 8f167a4c6e16f01601e23b6f107578aa1454472d | [
"MIT"
] | null | null | null | #! python3
from locale import setlocale, LC_ALL
from calendar import mdays, month_name
from functools import reduce
# Português do Brasil
setlocale(LC_ALL, 'pt_BR')
def mes_com_31(mes): return mdays[mes] == 31
def get_nome_mes(mes): return month_name[mes]
def juntar_meses(todos, nome_mes): return f'{todos}\n- {n... | 21.173913 | 66 | 0.671458 |
dabff48250b9e310723721ce9c239af7c942deca | 401 | py | Python | convert_spm_to_hf.py | bigscience-workshop/tokenization | 9fcf1bfdb95ee8849486ab2e5a1b354d7a8d5270 | [
"Apache-2.0"
] | 2 | 2021-10-19T00:08:34.000Z | 2022-02-03T09:10:29.000Z | convert_spm_to_hf.py | bigscience-workshop/tokenization | 9fcf1bfdb95ee8849486ab2e5a1b354d7a8d5270 | [
"Apache-2.0"
] | null | null | null | convert_spm_to_hf.py | bigscience-workshop/tokenization | 9fcf1bfdb95ee8849486ab2e5a1b354d7a8d5270 | [
"Apache-2.0"
] | 1 | 2021-08-09T03:02:00.000Z | 2021-08-09T03:02:00.000Z | from transformers.convert_slow_tokenizer import SpmConverter
import sys
class SPMTokenizer:
def __init__(self, vocab_file):
self.vocab_file = vocab_file
input_file = sys.argv[1] + '.model'
output_file = sys.argv[1] + '.json'
original_tokenizer = SPMTokenizer(input_file)
converter = SpmConverter(o... | 26.733333 | 60 | 0.765586 |
a4da58d32509cc71cf36716bd685f666004c84e2 | 6,767 | py | Python | rotkehlchen/externalapis/coingecko.py | davbre/rotki | bab693a98a1834df2f983db100e293bd5a44ab0c | [
"BSD-3-Clause"
] | 1 | 2020-11-14T12:20:37.000Z | 2020-11-14T12:20:37.000Z | rotkehlchen/externalapis/coingecko.py | davbre/rotki | bab693a98a1834df2f983db100e293bd5a44ab0c | [
"BSD-3-Clause"
] | null | null | null | rotkehlchen/externalapis/coingecko.py | davbre/rotki | bab693a98a1834df2f983db100e293bd5a44ab0c | [
"BSD-3-Clause"
] | null | null | null | import json
import logging
from typing import Any, Dict, List, NamedTuple, Optional, Union, overload
from urllib.parse import urlencode
import requests
from typing_extensions import Literal
from rotkehlchen.assets.asset import Asset
from rotkehlchen.constants import ZERO
from rotkehlchen.errors import RemoteError
fro... | 27.733607 | 97 | 0.558889 |
0c95a22e246943817eab2eabc14c96cd064adbdf | 1,614 | py | Python | emh_code/tf-idf/lzd_tf-idf.py | NCBI-Hackathons/Virulence_AMR_Data_Index | 57f9c0a21fc5f78ef6dc73c978cd27ca61858dde | [
"MIT"
] | 1 | 2020-02-05T17:37:39.000Z | 2020-02-05T17:37:39.000Z | emh_code/tf-idf/lzd_tf-idf.py | NCBI-Hackathons/Virulence_AMR_Data_Index_Resource | 57f9c0a21fc5f78ef6dc73c978cd27ca61858dde | [
"MIT"
] | null | null | null | emh_code/tf-idf/lzd_tf-idf.py | NCBI-Hackathons/Virulence_AMR_Data_Index_Resource | 57f9c0a21fc5f78ef6dc73c978cd27ca61858dde | [
"MIT"
] | 2 | 2019-08-13T15:08:30.000Z | 2019-08-13T16:06:23.000Z | from math import log, ceil
import sys
import os
from random import shuffle
alphabet = 'gatc'
# Create a subsequence frequency dictionary using the Lempel-Ziv technique.
def lzd(s, d_init={k:0 for k in alphabet}):
d = dict(d_init.items())
i = 0
for n in range(1, len(s)):
if not s[i:n] in d:
... | 28.821429 | 75 | 0.495043 |
be801004abdace881807b4dd294aca7630564e4d | 925 | py | Python | wakeup.py | mcagriaksoy/fipy-GPS-Accelerometer-LoRa | f3fed3f4f64300f478c45ea6d4f74735d61566e3 | [
"MIT"
] | 10 | 2018-06-16T21:12:26.000Z | 2022-03-22T20:50:58.000Z | wakeup.py | mcagriaksoy/fipy-GPS-Accelerometer-LoRa | f3fed3f4f64300f478c45ea6d4f74735d61566e3 | [
"MIT"
] | null | null | null | wakeup.py | mcagriaksoy/fipy-GPS-Accelerometer-LoRa | f3fed3f4f64300f478c45ea6d4f74735d61566e3 | [
"MIT"
] | 6 | 2018-12-06T10:12:33.000Z | 2021-02-12T10:22:18.000Z | from pytrack import Pytrack
from LIS2HH12 import LIS2HH12
import time
py = Pytrack()
# display the reset reason code and the sleep remaining in seconds
# possible values of wakeup reason are:
# WAKE_REASON_ACCELEROMETER = 1
# WAKE_REASON_PUSH_BUTTON = 2
# WAKE_REASON_TIMER = 4
# WAKE_REASON_INT_PIN = 8
... | 28.90625 | 85 | 0.753514 |
ed7ccdbf0cbb38b74740e4c6ca02afcc0f6145bb | 839 | py | Python | where/lib/exceptions.py | ingridfausk/where | b65398911075b7ddef3a3a1146efa428eae498fe | [
"MIT"
] | 16 | 2018-08-31T10:31:11.000Z | 2022-03-15T16:07:24.000Z | where/lib/exceptions.py | ingridfausk/where | b65398911075b7ddef3a3a1146efa428eae498fe | [
"MIT"
] | 5 | 2018-07-13T14:04:24.000Z | 2021-06-17T02:14:44.000Z | where/lib/exceptions.py | ingridfausk/where | b65398911075b7ddef3a3a1146efa428eae498fe | [
"MIT"
] | 15 | 2018-06-07T05:45:24.000Z | 2022-03-15T16:07:27.000Z | """Definition of Where-specific exceptions
Description:
------------
Custom exceptions used by Where for more specific error messages and handling.
"""
from midgard.dev.exceptions import MidgardException # noqa
class WhereException(Exception):
pass
class WhereExit(SystemExit, WhereException):
pass
cl... | 14.220339 | 78 | 0.761621 |
f9257af77f53cdbb4d406169a84f5c8e2420490a | 19,281 | py | Python | throxy.py | proxies8888/proxytest-1 | 96aeef133d30dd91d3894fe1b12c557389b4d904 | [
"MIT"
] | 9 | 2015-02-25T01:25:53.000Z | 2022-01-27T03:01:35.000Z | throxy.py | proxies8888/proxytest-1 | 96aeef133d30dd91d3894fe1b12c557389b4d904 | [
"MIT"
] | null | null | null | throxy.py | proxies8888/proxytest-1 | 96aeef133d30dd91d3894fe1b12c557389b4d904 | [
"MIT"
] | 4 | 2016-11-05T04:49:34.000Z | 2020-09-30T18:02:16.000Z | #! /usr/bin/env python
# throxy.py - HTTP proxy to simulate dial-up access
# Copyright (c) 2007 Johann C. Rocholl <johann@rocholl.net>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software withou... | 37.731898 | 78 | 0.605985 |
a09a220d0b32ec8e7dfa7ffab568ef24ea43a67d | 916 | py | Python | scripts/web.py | 452/micropython-examples | b366d6be43d69664d8e0d09aa67b6efde5fc3a16 | [
"Apache-2.0"
] | null | null | null | scripts/web.py | 452/micropython-examples | b366d6be43d69664d8e0d09aa67b6efde5fc3a16 | [
"Apache-2.0"
] | null | null | null | scripts/web.py | 452/micropython-examples | b366d6be43d69664d8e0d09aa67b6efde5fc3a16 | [
"Apache-2.0"
] | null | null | null | def s():
# minimal Ajax in Control Webserver
CONTENT = """\
HTTP/1.0 200 OK
Hello #{} from MicroPython!
"""
import socket
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind(('', 80))
s.listen(0) # just queue up some requests
counter=0
while True:
conn, addr = s.accept()
print("Got a connection... | 27.757576 | 99 | 0.637555 |
47a92cf0aecd6a551276d6ca794c2ad10a0cf828 | 17,847 | py | Python | launcher.py | edgarp413/apo-bot | da3d09e02fc048714f5731f0f5d36e1d814b3bf9 | [
"MIT"
] | null | null | null | launcher.py | edgarp413/apo-bot | da3d09e02fc048714f5731f0f5d36e1d814b3bf9 | [
"MIT"
] | null | null | null | launcher.py | edgarp413/apo-bot | da3d09e02fc048714f5731f0f5d36e1d814b3bf9 | [
"MIT"
] | null | null | null | from __future__ import print_function
import os
import sys
import subprocess
try: # Older Pythons lack this
import urllib.request # We'll let them reach the Python
from importlib.util import find_spec # check anyway
except ImportError:
pass
import ... | 31.092334 | 80 | 0.558525 |
687c0ab018691caa8ba9e2d46c6051bbbf92d757 | 6,275 | py | Python | custom/m4change/user_calcs/all_hmis_report_calcs.py | dslowikowski/commcare-hq | ad8885cf8dab69dc85cb64f37aeaf06106124797 | [
"BSD-3-Clause"
] | 1 | 2015-02-10T23:26:39.000Z | 2015-02-10T23:26:39.000Z | custom/m4change/user_calcs/all_hmis_report_calcs.py | SEL-Columbia/commcare-hq | 992ee34a679c37f063f86200e6df5a197d5e3ff6 | [
"BSD-3-Clause"
] | 1 | 2022-03-12T01:03:25.000Z | 2022-03-12T01:03:25.000Z | custom/m4change/user_calcs/all_hmis_report_calcs.py | johan--/commcare-hq | 86ee99c54f55ee94e4c8f2f6f30fc44e10e69ebd | [
"BSD-3-Clause"
] | null | null | null | import fluff
from custom.m4change.constants import PMTCT_CLIENTS_FORM
from custom.m4change.user_calcs import get_date_delivery, form_passes_filter_date_delivery, get_received_on
from datetime import datetime
def _get_comparison_results(field_value, comparison_operator, expected_value):
result = True
if isinst... | 44.190141 | 131 | 0.626135 |
0c3999936907605451d4190c259571ad01fdb843 | 541 | py | Python | config.py | Narasimhareddy26/imaginary | 5287d4b5ffeb7ec12d8eca834290d62b64a64c55 | [
"MIT"
] | 1 | 2019-10-27T14:05:30.000Z | 2019-10-27T14:05:30.000Z | config.py | Narasimhareddy26/imaginary | 5287d4b5ffeb7ec12d8eca834290d62b64a64c55 | [
"MIT"
] | null | null | null | config.py | Narasimhareddy26/imaginary | 5287d4b5ffeb7ec12d8eca834290d62b64a64c55 | [
"MIT"
] | 2 | 2018-01-25T00:37:31.000Z | 2019-10-27T14:05:32.000Z | """
@author Victor I. Afolabi
A.I. Engineer & Software developer
javafolabi@gmail.com
Created on 01 February, 2018 @ 2:40 PM.
Copyright © 2018. Victor. All rights reserved.
"""
from passlib.hash import sha256_crypt
from settings import APP_NAME
class Base(object):
DEBUG = False
TESTING = Fal... | 16.90625 | 57 | 0.698706 |
70820c80e35e128547803fd2d5d18d10796a82ee | 3,803 | py | Python | eoxserver/resources/coverages/metadata/formats/eoom.py | constantinius/eoxserver_combined | 68f261133fed65a4e8a6ddba82b0d2845171e4bf | [
"OML"
] | null | null | null | eoxserver/resources/coverages/metadata/formats/eoom.py | constantinius/eoxserver_combined | 68f261133fed65a4e8a6ddba82b0d2845171e4bf | [
"OML"
] | null | null | null | eoxserver/resources/coverages/metadata/formats/eoom.py | constantinius/eoxserver_combined | 68f261133fed65a4e8a6ddba82b0d2845171e4bf | [
"OML"
] | null | null | null | #-------------------------------------------------------------------------------
#
# Project: EOxServer <http://eoxserver.org>
# Authors: Fabian Schindler <fabian.schindler@eox.at>
#
#-------------------------------------------------------------------------------
# Copyright (C) 2013 EOX IT Services GmbH
#
# Permission... | 44.22093 | 164 | 0.679464 |
5ef5bf82fbc39c883761d935eb2d713adb075dbf | 611 | py | Python | main/generator_key.py | genisyskernel/random-key-twitch | f90d4b551992c4bced5cd769806dcb6db3bacb1d | [
"MIT"
] | 1 | 2020-11-28T05:58:57.000Z | 2020-11-28T05:58:57.000Z | main/generator_key.py | genisyskernel/random-key-twitch | f90d4b551992c4bced5cd769806dcb6db3bacb1d | [
"MIT"
] | null | null | null | main/generator_key.py | genisyskernel/random-key-twitch | f90d4b551992c4bced5cd769806dcb6db3bacb1d | [
"MIT"
] | null | null | null | from random import randint, choice
import string
chars_upper = string.ascii_uppercase
chars_lower = string.ascii_lowercase
chars_letters = string.ascii_letters
chars_numbers = string.digits
key0 = "live"
key1 = randint(000000000, 999999999)
key_main = chars_letters + chars_numbers
key2 = "".join(choice(key_main) for _... | 27.772727 | 76 | 0.805237 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.