hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7987e6e7cd21984a9a2aada515e67ef3c002fae0 | 5,573 | py | Python | pypy/module/sys/test/test_initpath.py | yxzoro/pypy | 6e47b3d3e5513d9639a21554963a6ace172ccfee | [
"Apache-2.0",
"OpenSSL"
] | 1 | 2021-06-02T23:02:09.000Z | 2021-06-02T23:02:09.000Z | pypy/module/sys/test/test_initpath.py | yxzoro/pypy | 6e47b3d3e5513d9639a21554963a6ace172ccfee | [
"Apache-2.0",
"OpenSSL"
] | 1 | 2021-03-30T18:08:41.000Z | 2021-03-30T18:08:41.000Z | pypy/module/sys/test/test_initpath.py | yxzoro/pypy | 6e47b3d3e5513d9639a21554963a6ace172ccfee | [
"Apache-2.0",
"OpenSSL"
] | null | null | null | import py
import os.path
from pypy.module.sys.initpath import (compute_stdlib_path, find_executable,
find_stdlib, resolvedirof,
pypy_init_home, pypy_init_free,
find_pyvenv_cfg)
from pypy.module.sys.version ... | 39.524823 | 79 | 0.660506 |
7987e7246ec398363bc8e4237e1c69aab1e8d698 | 5,313 | py | Python | kedro/extras/datasets/api/api_dataset.py | iamkuldeepsingh/kedro | 1ccd6d41a9edf5b707ae33e167a625ff3a679bef | [
"Apache-2.0"
] | 1 | 2020-12-01T15:19:30.000Z | 2020-12-01T15:19:30.000Z | kedro/extras/datasets/api/api_dataset.py | iamkuldeepsingh/kedro | 1ccd6d41a9edf5b707ae33e167a625ff3a679bef | [
"Apache-2.0"
] | 1 | 2020-02-04T10:17:25.000Z | 2020-02-04T10:17:25.000Z | kedro/extras/datasets/api/api_dataset.py | iamkuldeepsingh/kedro | 1ccd6d41a9edf5b707ae33e167a625ff3a679bef | [
"Apache-2.0"
] | 1 | 2020-02-01T09:07:02.000Z | 2020-02-01T09:07:02.000Z | # Copyright 2020 QuantumBlack Visual Analytics 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/licenses/LICENSE-2.0
#
# THE SOFTWARE IS PROVIDED "AS IS", WIT... | 38.781022 | 105 | 0.63467 |
7987e845ac877376ac185a4063d1163629d82502 | 25,764 | py | Python | counterpartylib/lib/messages/bet.py | modulesio/bitcoin-backend | 968ea19482212cb3dd8736461b63159554fc977d | [
"MIT"
] | null | null | null | counterpartylib/lib/messages/bet.py | modulesio/bitcoin-backend | 968ea19482212cb3dd8736461b63159554fc977d | [
"MIT"
] | null | null | null | counterpartylib/lib/messages/bet.py | modulesio/bitcoin-backend | 968ea19482212cb3dd8736461b63159554fc977d | [
"MIT"
] | null | null | null | #! /usr/bin/python3
"""
Datastreams are identified by the address that publishes them, and referenced
in transaction outputs.
For CFD leverage, 1x = 5040, 2x = 10080, etc.: 5040 is a superior highly
composite number and a colossally abundant number, and has 1-10, 12 as factors.
All wagers are in XCP.
Expiring a bet... | 43.30084 | 397 | 0.596064 |
7987e90af941ca9fe34d1cababdfd0c2488b9970 | 4,583 | py | Python | data_analytics/preprocessing/create_db.py | reidy-p/DublinBusPredictions | a6b1fc8a5c28500a3292883ea0dfcde1770d78d1 | [
"MIT"
] | null | null | null | data_analytics/preprocessing/create_db.py | reidy-p/DublinBusPredictions | a6b1fc8a5c28500a3292883ea0dfcde1770d78d1 | [
"MIT"
] | null | null | null | data_analytics/preprocessing/create_db.py | reidy-p/DublinBusPredictions | a6b1fc8a5c28500a3292883ea0dfcde1770d78d1 | [
"MIT"
] | null | null | null | import sqlite3
import pandas as pd
# Create db if it doesn't exist or connect to it if it does exist
with sqlite3.connect("/home/team13/db/database/DublinBusHistoric.db") as connection:
c = connection.cursor()
# vehicles
c.execute("""DROP TABLE IF EXISTS vehicles""")
c.execute("""CREATE TABLE vehicles... | 34.458647 | 99 | 0.586515 |
7987e9c2532d54036c2f9525912d425339512ab7 | 1,061 | py | Python | chapter09/csrf/icbc/icbc/urls.py | Tomtao626/django | fe945063593b4bfe82d74842f728b854b501a294 | [
"Apache-2.0"
] | null | null | null | chapter09/csrf/icbc/icbc/urls.py | Tomtao626/django | fe945063593b4bfe82d74842f728b854b501a294 | [
"Apache-2.0"
] | null | null | null | chapter09/csrf/icbc/icbc/urls.py | Tomtao626/django | fe945063593b4bfe82d74842f728b854b501a294 | [
"Apache-2.0"
] | null | null | null | """icbc URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.1/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-based vi... | 37.892857 | 77 | 0.694628 |
7987e9c607d7519a3102e8a65bba96108be04742 | 5,717 | py | Python | tools/memory_inspector/memory_inspector/frontends/command_line.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | tools/memory_inspector/memory_inspector/frontends/command_line.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 395 | 2020-04-18T08:22:18.000Z | 2021-12-08T13:04:49.000Z | tools/memory_inspector/memory_inspector/frontends/command_line.py | kjthegod/chromium | cf940f7f418436b77e15b1ea23e6fa100ca1c91a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Command line frontend for Memory Inspector"""
import json
import memory_inspector
import optparse
import os
import time
from memory_inspector import con... | 32.856322 | 77 | 0.649991 |
7987ea6e63484558240345e9d192e8c9574d5e7c | 1,781 | py | Python | examples/simple/thrift/client.py | westover/tchannel-python | d9c16291f49b3b9dd1353c01179d4f4c3168c53a | [
"MIT"
] | null | null | null | examples/simple/thrift/client.py | westover/tchannel-python | d9c16291f49b3b9dd1353c01179d4f4c3168c53a | [
"MIT"
] | null | null | null | examples/simple/thrift/client.py | westover/tchannel-python | d9c16291f49b3b9dd1353c01179d4f4c3168c53a | [
"MIT"
] | null | null | null | # Copyright (c) 2016 Uber Technologies, Inc.
#
# 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, publ... | 30.706897 | 79 | 0.738349 |
7987edc38fd9004716b8c7cee809735ac78000d7 | 698 | py | Python | 3-python-notebook/15-reading-from-url-to-file.py | reetasharma11/winter2020-code | 6875ca13e4f3d2a95ad36dca386a3a87e8ed08f7 | [
"MIT"
] | null | null | null | 3-python-notebook/15-reading-from-url-to-file.py | reetasharma11/winter2020-code | 6875ca13e4f3d2a95ad36dca386a3a87e8ed08f7 | [
"MIT"
] | null | null | null | 3-python-notebook/15-reading-from-url-to-file.py | reetasharma11/winter2020-code | 6875ca13e4f3d2a95ad36dca386a3a87e8ed08f7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import urllib.request
import shutil
url = 'https://www.theweathernetwork.com/ca/weather/quebec/montreal/'
# url = 'http://donnees.ville.montreal.qc.ca/dataset/6502942d-788a-43ff-b935-eb7b7d8b58cd/resource/01f91df2-6ed9-47b2-ba85-e6bc9236ac73/download/compteur-eau.csv'
# url = 'https://raw.githu... | 38.777778 | 162 | 0.787966 |
7987edc7114460284f3773a2e4766d99ee13be1a | 2,276 | py | Python | chhotu/orders/models.py | roshan007/chhout.web.backend | a952a53d908fb0c648b8b7279130166c2054f502 | [
"MIT"
] | null | null | null | chhotu/orders/models.py | roshan007/chhout.web.backend | a952a53d908fb0c648b8b7279130166c2054f502 | [
"MIT"
] | null | null | null | chhotu/orders/models.py | roshan007/chhout.web.backend | a952a53d908fb0c648b8b7279130166c2054f502 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext_lazy as _
from products.models import Product
from accounts.models import Profile
from .managers import CartManager, OrderManager
CONFIRMED = "1"
INPROGRESS = "2"
DELIVERED = "3"
CANCELLED = "4"
ORDER... | 32.514286 | 118 | 0.695079 |
7987edea53169d705dd8840d0496d2203f96fa15 | 2,067 | py | Python | examples/experiments/profiling/tf_research.py | bestetc/batchflow | d2a843640383fbe860654236881483f755227e06 | [
"Apache-2.0"
] | 101 | 2017-06-05T07:33:54.000Z | 2018-10-28T04:55:23.000Z | examples/experiments/profiling/tf_research.py | bestetc/batchflow | d2a843640383fbe860654236881483f755227e06 | [
"Apache-2.0"
] | 243 | 2018-11-29T02:03:55.000Z | 2022-02-21T08:28:29.000Z | examples/experiments/profiling/tf_research.py | bestetc/batchflow | d2a843640383fbe860654236881483f755227e06 | [
"Apache-2.0"
] | 35 | 2019-01-29T14:26:14.000Z | 2021-12-30T01:39:02.000Z | """ Test research with tf model """
import sys
sys.path.append("../../..")
from batchflow import Pipeline, B, C, V, D
from batchflow.opensets import MNIST
from batchflow.models.tf import VGG16
from batchflow.research import Research
BATCH_SIZE = 64
model_config = {
'inputs/images/shape': (28, 28, 1),
'input... | 33.33871 | 117 | 0.655056 |
7987edeb544091ec93e498522a19114693b86591 | 3,094 | py | Python | test/functional/zapwallettxes.py | SmartArray/faircoin-1 | 8540acb7ffecad5a12596553031682f614486652 | [
"MIT"
] | 59 | 2017-06-28T22:05:33.000Z | 2022-03-30T20:42:17.000Z | test/functional/zapwallettxes.py | SmartArray/faircoin-1 | 8540acb7ffecad5a12596553031682f614486652 | [
"MIT"
] | 17 | 2017-06-30T11:07:19.000Z | 2021-03-12T09:59:29.000Z | test/functional/zapwallettxes.py | SmartArray/faircoin-1 | 8540acb7ffecad5a12596553031682f614486652 | [
"MIT"
] | 24 | 2017-07-19T07:00:55.000Z | 2022-03-28T19:35:40.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the zapwallettxes functionality.
- start three bitcoind nodes
- create four transactions on node ... | 37.277108 | 106 | 0.659017 |
7987ee219ca0145586681253570044f7bd2c5b90 | 9,103 | py | Python | SocReward.01/NEW_FOR_ALON/level2_submit.py | DVS-Lab/duke-archive | 8d127f18d5930803410e716a4b62aac7d4aa4beb | [
"MIT"
] | null | null | null | SocReward.01/NEW_FOR_ALON/level2_submit.py | DVS-Lab/duke-archive | 8d127f18d5930803410e716a4b62aac7d4aa4beb | [
"MIT"
] | null | null | null | SocReward.01/NEW_FOR_ALON/level2_submit.py | DVS-Lab/duke-archive | 8d127f18d5930803410e716a4b62aac7d4aa4beb | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys,os,time,re,datetime,smtplib
#########user section#########################
#user specific constants
username = "smith" #your cluster login name (use what shows up in qstatall)
useremail = "smith@biac.duke.edu" #email to send job notices to
template_f = file("level2.sh")... | 38.247899 | 218 | 0.658354 |
7987f098d7facc2795642210a1bcf31ddf832807 | 8,203 | py | Python | torch_utils/ops/conv2d_resample.py | yohan-pg/stylegan2-ada-pytorch | e1225b08d55ff5ca38e1646fa430d3c3c3bb3c68 | [
"BSD-Source-Code"
] | null | null | null | torch_utils/ops/conv2d_resample.py | yohan-pg/stylegan2-ada-pytorch | e1225b08d55ff5ca38e1646fa430d3c3c3bb3c68 | [
"BSD-Source-Code"
] | null | null | null | torch_utils/ops/conv2d_resample.py | yohan-pg/stylegan2-ada-pytorch | e1225b08d55ff5ca38e1646fa430d3c3c3bb3c68 | [
"BSD-Source-Code"
] | null | null | null | # Copyright (c) 2021, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and rel... | 37.976852 | 108 | 0.563209 |
7987f29bcf18bd4cee9caf04c19f1c08098e4436 | 21,069 | py | Python | sdk/python/pulumi_aws/applicationloadbalancing/target_group.py | Otanikotani/pulumi-aws | 00e2b352da42c5b1b0ec7b4760eec5ad2b23ff21 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/applicationloadbalancing/target_group.py | Otanikotani/pulumi-aws | 00e2b352da42c5b1b0ec7b4760eec5ad2b23ff21 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/applicationloadbalancing/target_group.py | Otanikotani/pulumi-aws | 00e2b352da42c5b1b0ec7b4760eec5ad2b23ff21 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from .. import _utilitie... | 59.685552 | 286 | 0.680146 |
7987f4326746522da739fab076b582a3159714da | 318 | py | Python | practise/jumpgame.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | practise/jumpgame.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | practise/jumpgame.py | mengyangbai/leetcode | e7a6906ecc5bce665dec5d0f057b302a64d50f40 | [
"MIT"
] | null | null | null | class Solution(object):
def canJump(self, nums):
step = nums[0]
for i in range(1, len(nums)):
if step > 0:
step -= 1
step = max(step, nums[i])
else:
return False
return True
a = Solution()
a.canJump([2, 3, 1, 1, 4])
| 21.2 | 41 | 0.440252 |
7987f4614c25d6de0bacd603d4a50aaf9f955c67 | 8,665 | py | Python | frappe/utils/__init__.py | gangadharkadam/bims_frappe | 25735f47aaf52feb4042234c791e58ebb5c5a1fa | [
"MIT"
] | null | null | null | frappe/utils/__init__.py | gangadharkadam/bims_frappe | 25735f47aaf52feb4042234c791e58ebb5c5a1fa | [
"MIT"
] | null | null | null | frappe/utils/__init__.py | gangadharkadam/bims_frappe | 25735f47aaf52feb4042234c791e58ebb5c5a1fa | [
"MIT"
] | null | null | null | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
# util __init__.py
from __future__ import unicode_literals
from werkzeug.test import Client
import os, sys, re, urllib
import frappe
# utility functions like cint, int, flt, etc.
from frappe.utils.data import *
de... | 24.271709 | 169 | 0.661396 |
7987f4bae7d9357b871c0e108a0135a8b98c2506 | 12,965 | py | Python | zvt/ui/apps/factor_app.py | loveher147/zvt | e16d8e20daa5d0c069294f063d8f5a021bb8e8bf | [
"MIT"
] | null | null | null | zvt/ui/apps/factor_app.py | loveher147/zvt | e16d8e20daa5d0c069294f063d8f5a021bb8e8bf | [
"MIT"
] | null | null | null | zvt/ui/apps/factor_app.py | loveher147/zvt | e16d8e20daa5d0c069294f063d8f5a021bb8e8bf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from typing import List
import dash_core_components as dcc
import dash_daq as daq
import dash_html_components as html
from dash import dash
from dash.dependencies import Input, Output, State
from zvt.api.trader_info_api import AccountStatsReader, OrderReader, get_order_securities
from zvt.api.... | 43.07309 | 120 | 0.472349 |
7987f501abf34961470b727d6977696152588c07 | 724 | py | Python | src/data_management/pv_trepos.py | gbekes/football-data-project | 0ce1ea9ca421ebbd98e720621c5837ce990ff24e | [
"MIT"
] | 1 | 2021-10-09T20:55:53.000Z | 2021-10-09T20:55:53.000Z | src/data_management/pv_trepos.py | gbekes/football-data-project | 0ce1ea9ca421ebbd98e720621c5837ce990ff24e | [
"MIT"
] | 3 | 2021-09-17T14:48:35.000Z | 2021-10-14T20:22:41.000Z | src/data_management/pv_trepos.py | sscu-budapest/football-data-project | 70c01e6e0b871af3108af5d8d34848825cad7d8f | [
"MIT"
] | null | null | null | from sscutils import create_trepo_with_subsets
countries_table = create_trepo_with_subsets("countries", prefix="pv")
player_info_table = create_trepo_with_subsets("player_info", prefix="pv")
seasons_table = create_trepo_with_subsets("season_info", prefix="pv")
match_info_table = create_trepo_with_subsets("match_info",... | 60.333333 | 83 | 0.831492 |
7987f51579fa90040e90b14d42d76c784475b40f | 244 | py | Python | toy_experiments/utils/rng.py | leyiweb/Adversarially-Learned-Anomaly-Detection | 763359fc8fe84677f0c26075967c96ae4a4074f1 | [
"MIT"
] | 125 | 2018-09-13T01:56:39.000Z | 2022-02-24T07:41:02.000Z | toy_experiments/utils/rng.py | leyiweb/Adversarially-Learned-Anomaly-Detection | 763359fc8fe84677f0c26075967c96ae4a4074f1 | [
"MIT"
] | 5 | 2020-01-28T22:17:33.000Z | 2022-02-09T23:31:16.000Z | toy_experiments/utils/rng.py | leyiweb/Adversarially-Learned-Anomaly-Detection | 763359fc8fe84677f0c26075967c96ae4a4074f1 | [
"MIT"
] | 47 | 2018-09-13T08:28:09.000Z | 2022-03-28T08:08:08.000Z | from numpy.random import RandomState
from random import Random
seed = 2
py_rng = Random(seed)
np_rng = RandomState(seed)
def set_seed(n):
global seed, py_rng, np_rng
seed = n
py_rng = Random(seed)
np_rng = RandomState(seed)
| 16.266667 | 36 | 0.704918 |
7987f58d148b118a101a0c29d9fcfe7952febd9c | 3,914 | py | Python | challenges/Carbonate/poller/for-release/machine.py | pingjuiliao/cb-multios | 64ededd0b87030eda7c40c4388a4ad8283712d8e | [
"MIT"
] | 473 | 2016-08-01T12:48:16.000Z | 2022-03-09T18:13:14.000Z | challenges/Carbonate/poller/for-release/machine.py | pingjuiliao/cb-multios | 64ededd0b87030eda7c40c4388a4ad8283712d8e | [
"MIT"
] | 71 | 2016-08-01T03:33:44.000Z | 2022-03-09T18:37:04.000Z | challenges/Carbonate/poller/for-release/machine.py | pingjuiliao/cb-multios | 64ededd0b87030eda7c40c4388a4ad8283712d8e | [
"MIT"
] | 121 | 2016-08-01T04:07:53.000Z | 2022-03-07T11:08:09.000Z | #!/usr/bin/env python
from generator.actions import Actions
from random import randint, choice
from struct import pack
import ctypes
import sys
class Protocol():
def empty_frame(self, id):
return self.frame(id, '')
def frame(self, id, data):
return pack('<2B', id, len(data)) + data
class Scra... | 33.452991 | 84 | 0.601431 |
7987f61c63aecb18faf1b8f0830419bdf56d1c8d | 990 | py | Python | tests/rules/test_no_such_file.py | eoinjordan/thefeck | e04f50409ba3069ec6a9f7c0aab39ca835a41b68 | [
"MIT"
] | null | null | null | tests/rules/test_no_such_file.py | eoinjordan/thefeck | e04f50409ba3069ec6a9f7c0aab39ca835a41b68 | [
"MIT"
] | null | null | null | tests/rules/test_no_such_file.py | eoinjordan/thefeck | e04f50409ba3069ec6a9f7c0aab39ca835a41b68 | [
"MIT"
] | null | null | null | import pytest
from thefeck.rules.no_such_file import match, get_new_command
from thefeck.types import Command
@pytest.mark.parametrize('command', [
Command('mv bar bar/bar', "mv: cannot move 'bar' to 'bar/bar': No such file or directory"),
Command('mv bar bar/', "mv: cannot move 'bar' to 'bar/': No such file ... | 35.357143 | 131 | 0.683838 |
7987f6389b5fd0df2a4758d9bbae526f6c97a9c1 | 8,210 | py | Python | research/resnet/resnet_main.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | 1 | 2021-05-17T01:42:29.000Z | 2021-05-17T01:42:29.000Z | research/resnet/resnet_main.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | null | null | null | research/resnet/resnet_main.py | jdavidagudelo/tensorflow-models | 6f019beec73b01861363bf717706e27f4210b979 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 38.544601 | 82 | 0.620219 |
7987f68d50f7e8851bb63e7a121ec21ce716958f | 23,552 | py | Python | tf_quant_finance/models/hull_white/vector_hull_white.py | 2torus/tf-quant-finance | 2647d65b4c8458203c89e023d03d738028f32884 | [
"Apache-2.0"
] | null | null | null | tf_quant_finance/models/hull_white/vector_hull_white.py | 2torus/tf-quant-finance | 2647d65b4c8458203c89e023d03d738028f32884 | [
"Apache-2.0"
] | null | null | null | tf_quant_finance/models/hull_white/vector_hull_white.py | 2torus/tf-quant-finance | 2647d65b4c8458203c89e023d03d738028f32884 | [
"Apache-2.0"
] | null | null | null | # Lint as: python3
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 44.354049 | 97 | 0.64606 |
7987f6b41ef1d0ea9abbd66c1f3d272d77891957 | 22,183 | py | Python | tensorflow_probability/python/distributions/lkj.py | jbergmanster/probability | e15b307066e7485b8fe9faf3d289c739ab8d3806 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/lkj.py | jbergmanster/probability | e15b307066e7485b8fe9faf3d289c739ab8d3806 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/lkj.py | jbergmanster/probability | e15b307066e7485b8fe9faf3d289c739ab8d3806 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Probability 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... | 42.414914 | 97 | 0.676915 |
7987f6e6e23ebbd6f09481e338b74eede3aa071b | 1,046 | py | Python | src/psd_tools/decoder/color.py | EvgenKo423/psd-tools | 087aea48393ad1b6005b56e9965262e08e2b6010 | [
"MIT"
] | null | null | null | src/psd_tools/decoder/color.py | EvgenKo423/psd-tools | 087aea48393ad1b6005b56e9965262e08e2b6010 | [
"MIT"
] | null | null | null | src/psd_tools/decoder/color.py | EvgenKo423/psd-tools | 087aea48393ad1b6005b56e9965262e08e2b6010 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import warnings
from collections import namedtuple
from psd_tools.utils import read_fmt
from psd_tools.constants import ColorSpaceID
_Color = namedtuple('Color', 'color_space_id color_data')
class Color(_Color):
def __repr__(self)... | 28.27027 | 75 | 0.686424 |
7987f7589a02369cffb8b4fd0d9337d21ed48039 | 1,614 | py | Python | word-count-api/server/main.py | lisy09/spark-dev-box | ed362cb5b19400a798995e270869df14805600a0 | [
"MIT"
] | null | null | null | word-count-api/server/main.py | lisy09/spark-dev-box | ed362cb5b19400a798995e270869df14805600a0 | [
"MIT"
] | null | null | null | word-count-api/server/main.py | lisy09/spark-dev-box | ed362cb5b19400a798995e270869df14805600a0 | [
"MIT"
] | null | null | null | from fastapi import FastAPI
from fastapi_plugins import redis_plugin, RedisSettings
import logging
from .routers import routers
from .core.config import get_config, get_gunicorn_config
from .core.logger import setup_logger, StubbedGunicornLogger
import gunicorn.app.base
def createSimpleFastapi():
app = FastAPI()... | 30.45283 | 68 | 0.687113 |
7987f849af559117935f047958633dedfdcf3943 | 19,450 | py | Python | src/ralph_scrooge/rest_api/public/v0_9/pricing_service_usages.py | ar4s/ralph_pricing | 40127e9450edc91ba0be725d63bf691dde16a137 | [
"Apache-2.0"
] | null | null | null | src/ralph_scrooge/rest_api/public/v0_9/pricing_service_usages.py | ar4s/ralph_pricing | 40127e9450edc91ba0be725d63bf691dde16a137 | [
"Apache-2.0"
] | null | null | null | src/ralph_scrooge/rest_api/public/v0_9/pricing_service_usages.py | ar4s/ralph_pricing | 40127e9450edc91ba0be725d63bf691dde16a137 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
from collections import defaultdict
from datetime import datetime
from django.conf import settings
from django.core.exceptions im... | 36.152416 | 95 | 0.644781 |
7987f84dfe2ca7d855202c5d1389688fe0461e6f | 6,377 | py | Python | src/osinstall.py | chadmed/asahi-installer | f611af0e5d13fc4c87985a75583506b1b846c764 | [
"MIT"
] | null | null | null | src/osinstall.py | chadmed/asahi-installer | f611af0e5d13fc4c87985a75583506b1b846c764 | [
"MIT"
] | null | null | null | src/osinstall.py | chadmed/asahi-installer | f611af0e5d13fc4c87985a75583506b1b846c764 | [
"MIT"
] | null | null | null | # SPDX-License-Identifier: MIT
import os, shutil, sys, stat, subprocess, urlcache, zipfile, logging, firmware
from util import *
class OSInstaller(PackageInstaller):
PART_ALIGNMENT = 1024 * 1024
def __init__(self, dutil, data, template):
super().__init__()
self.dutil = dutil
self.data ... | 39.85625 | 95 | 0.564529 |
7987f8836669b4a1117c602b2c9b95a00283831c | 2,539 | py | Python | test/regexp/python5.py | kylebarron/MagicPython | da6fa0793e2c85d3bf7709ff1d4f65ccf468db11 | [
"MIT"
] | 1,482 | 2015-10-16T21:59:32.000Z | 2022-03-30T11:44:40.000Z | test/regexp/python5.py | kylebarron/MagicPython | da6fa0793e2c85d3bf7709ff1d4f65ccf468db11 | [
"MIT"
] | 226 | 2015-10-15T15:53:44.000Z | 2022-03-25T03:08:27.000Z | test/regexp/python5.py | kylebarron/MagicPython | da6fa0793e2c85d3bf7709ff1d4f65ccf468db11 | [
"MIT"
] | 129 | 2015-10-20T02:41:49.000Z | 2022-03-22T01:44:36.000Z | a = r'foo#not a comment'
a = r'''
(?x) # multi-line regexp
foo # comment
'''
a = R'''
(?x) # not a
foo # comment
'''
a : source.python
: source.python
= : keyword.operator.assignment.python, source.python
: source.pytho... | 56.422222 | 136 | 0.653801 |
7987f8de725238d2357c5f22e7b6994814a0f8ee | 17,283 | py | Python | main/robot.py | zwitterion/python_robot | ab1e56c6189ff376522cdd93ddf209eb59df111a | [
"MIT"
] | null | null | null | main/robot.py | zwitterion/python_robot | ab1e56c6189ff376522cdd93ddf209eb59df111a | [
"MIT"
] | null | null | null | main/robot.py | zwitterion/python_robot | ab1e56c6189ff376522cdd93ddf209eb59df111a | [
"MIT"
] | null | null | null | import os
import sys
import multiprocessing as mp
import traceback
from collections import namedtuple
from timeit import default_timer as timer
import numpy as np
import math
from messagebus_manager import MessageBusManager, ProcessNames, TopicNames
from config import Config
from message import Message#, Command
cla... | 35.488706 | 166 | 0.578198 |
7987f940dbfc8a0150d5384e40a21220f261d110 | 1,377 | py | Python | tests/test_open_examples.py | pantlavanya/nem-reader | 5405a5cba4bb8ebdad05c28455d12bb34a6d3ce5 | [
"MIT"
] | null | null | null | tests/test_open_examples.py | pantlavanya/nem-reader | 5405a5cba4bb8ebdad05c28455d12bb34a6d3ce5 | [
"MIT"
] | null | null | null | tests/test_open_examples.py | pantlavanya/nem-reader | 5405a5cba4bb8ebdad05c28455d12bb34a6d3ce5 | [
"MIT"
] | null | null | null | """ Test Suite
"""
import pytest
import os
import sys
sys.path.insert(0,
os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
import nemreader as nr
def test_unzipped_examples():
""" Open and parse unzipped example files """
test_path = os.path.abspath('examples/unzipped')
for... | 31.295455 | 79 | 0.67175 |
7987f96ff5421954d978325c8bb0802720f5cabb | 3,136 | py | Python | sgtl/algorithms.py | rasmita404/py-sgtl | c2872b81ed4a591f880624de2288f4dadf57ccf8 | [
"MIT"
] | 5 | 2021-11-11T10:26:39.000Z | 2022-01-26T07:46:43.000Z | sgtl/algorithms.py | rasmita404/py-sgtl | c2872b81ed4a591f880624de2288f4dadf57ccf8 | [
"MIT"
] | 43 | 2021-11-11T10:41:41.000Z | 2022-03-21T17:02:55.000Z | sgtl/algorithms.py | rasmita404/py-sgtl | c2872b81ed4a591f880624de2288f4dadf57ccf8 | [
"MIT"
] | 2 | 2021-11-12T17:43:30.000Z | 2022-01-22T14:32:33.000Z | """
A collection of spectral graph algorithms.
"""
from typing import Tuple, List, Set
import numpy as np
import scipy.sparse.linalg
import sgtl
def _sweep_set(graph: sgtl.Graph, vector: List[float]) -> Tuple[Set[int], Set[int]]:
"""
Given an SGTL graph and a vector, use the sweep set algorithm to find a spa... | 34.844444 | 116 | 0.68463 |
7987f99197aa07833f99a73152a8dfda07e2c600 | 33,374 | py | Python | plugin.program.beta.wizard/resources/libs/notify.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2019-03-05T09:37:15.000Z | 2019-03-05T09:37:15.000Z | plugin.program.beta.wizard/resources/libs/notify.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | null | null | null | plugin.program.beta.wizard/resources/libs/notify.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2021-11-05T22:16:08.000Z | 2021-11-05T22:16:08.000Z | ################################################################################
# Copyright (C) 2015 Surfacingx #
# #
# This Program is free software; you can redistribute it and/or modify ... | 55.716194 | 410 | 0.710583 |
7987fa23b422cc7411a962811365ccdb31f03624 | 2,601 | py | Python | bin/sam-coverage.py | UdoGi/dark-matter | 3d49e89fa5e81f83144119f6216c5774176d203b | [
"MIT"
] | 10 | 2016-03-09T09:43:14.000Z | 2021-04-03T21:46:12.000Z | bin/sam-coverage.py | terrycojones/dark-matter | 67d16f870db6b4239e17e542bc6e3f072dc29c75 | [
"MIT"
] | 332 | 2015-01-07T12:37:30.000Z | 2022-01-20T15:48:11.000Z | bin/sam-coverage.py | terrycojones/dark-matter | 67d16f870db6b4239e17e542bc6e3f072dc29c75 | [
"MIT"
] | 4 | 2016-03-08T14:56:39.000Z | 2021-01-27T08:11:27.000Z | #!/usr/bin/env python
from __future__ import print_function
import argparse
from collections import defaultdict, Counter
from dark.filter import (
addFASTAFilteringCommandLineOptions, parseFASTAFilteringCommandLineOptions)
from dark.reads import Reads
from dark.sam import samfile, SAMFilter
parser = argparse.Ar... | 38.820896 | 79 | 0.723568 |
7987fa9cacd8219f71d8ea6f1e1f660d5657866f | 1,585 | py | Python | tests/unit_tests/cellular/test_cellular_Q.py | fqzhou/LoadBalanceControl-RL | 689eec3b3b27e121aa45d2793e411f1863f6fc0b | [
"MIT"
] | 11 | 2018-10-29T06:50:43.000Z | 2022-03-28T14:26:09.000Z | tests/unit_tests/cellular/test_cellular_Q.py | fqzhou/LoadBalanceControl-RL | 689eec3b3b27e121aa45d2793e411f1863f6fc0b | [
"MIT"
] | 1 | 2022-03-01T13:46:25.000Z | 2022-03-01T13:46:25.000Z | tests/unit_tests/cellular/test_cellular_Q.py | fqzhou/LoadBalanceControl-RL | 689eec3b3b27e121aa45d2793e411f1863f6fc0b | [
"MIT"
] | 6 | 2019-02-05T20:01:53.000Z | 2020-09-04T12:30:00.000Z | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
""" Test cases for applying Qalgorithm on Cellular environment """
import pytest
from collections import OrderedDict
from tests.sample_files import sample_cellular_env
from tests.sample_files import sample_cellular_q_agent as agent
from loadbalanceRL import constants
fr... | 23.308824 | 76 | 0.731861 |
7987fa9d473d875055dd93c27c7a0b8fe99b7c6c | 207 | py | Python | app/config.py | JoshieKun/Flask-React-SocketIO | a38625fda61d220751338479b21d726a1a5f7545 | [
"MIT"
] | 13 | 2017-11-11T02:02:06.000Z | 2021-07-10T04:37:28.000Z | app/config.py | CharlyJazz/Example-Flask-React-SocketIO | 5b5a15e7abeb704e58721b58292c59be936c1d6d | [
"MIT"
] | 7 | 2018-07-07T19:07:59.000Z | 2019-10-06T01:10:47.000Z | app/config.py | CharlyJazz/Example-Flask-React-SocketIO | 5b5a15e7abeb704e58721b58292c59be936c1d6d | [
"MIT"
] | 7 | 2018-04-28T02:10:19.000Z | 2020-05-21T17:09:12.000Z | import os, string, random
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
SECRET_KEY = 'Hello bro'
class DevelopmentConfig(Config):
FILEDIR = basedir + '/static/files/'
| 20.7 | 52 | 0.719807 |
7987fb9541f03328f49a006b2d50fb72dff0abc5 | 3,703 | py | Python | section3_change_pars_for_weak_hurricanes/Source_code_for_extracting_data/source_code_change_Clz_isftcflx_1/1_Calculate_z0_time_series_at_eyewall_2km.py | Sunnyfred/Atlantic_Hurricane_Simulations | ee5d6d0f975876a01c4a21bebd3089bf3bbb843a | [
"MIT"
] | null | null | null | section3_change_pars_for_weak_hurricanes/Source_code_for_extracting_data/source_code_change_Clz_isftcflx_1/1_Calculate_z0_time_series_at_eyewall_2km.py | Sunnyfred/Atlantic_Hurricane_Simulations | ee5d6d0f975876a01c4a21bebd3089bf3bbb843a | [
"MIT"
] | null | null | null | section3_change_pars_for_weak_hurricanes/Source_code_for_extracting_data/source_code_change_Clz_isftcflx_1/1_Calculate_z0_time_series_at_eyewall_2km.py | Sunnyfred/Atlantic_Hurricane_Simulations | ee5d6d0f975876a01c4a21bebd3089bf3bbb843a | [
"MIT"
] | 1 | 2021-11-05T18:14:09.000Z | 2021-11-05T18:14:09.000Z | import os
import math
import numpy as np
import matplotlib as matplot
import matplotlib.pyplot as plt
from netCDF4 import Dataset
import csv
from wrf import (to_np, getvar, smooth2d, get_cartopy, cartopy_xlim,
cartopy_ylim, latlon_coords)
# List the colors that will be used for tracing the track.
co... | 34.287037 | 184 | 0.570348 |
7987fe85b5b8c7021ec50b630725833f49f12435 | 1,542 | py | Python | ckanext/example_ipermissionlabels/plugin.py | ziveo/ckan | f4cfe5e28789df58b2bf7e73e5989ffda00e5c5c | [
"Apache-2.0"
] | 2,805 | 2015-01-02T18:13:15.000Z | 2022-03-31T03:35:01.000Z | ckanext/example_ipermissionlabels/plugin.py | ziveo/ckan | f4cfe5e28789df58b2bf7e73e5989ffda00e5c5c | [
"Apache-2.0"
] | 3,801 | 2015-01-02T11:05:36.000Z | 2022-03-31T19:24:37.000Z | ckanext/example_ipermissionlabels/plugin.py | ziveo/ckan | f4cfe5e28789df58b2bf7e73e5989ffda00e5c5c | [
"Apache-2.0"
] | 1,689 | 2015-01-02T19:46:43.000Z | 2022-03-28T14:59:43.000Z | # encoding: utf-8
from ckan import plugins
from ckan.lib.plugins import DefaultPermissionLabels
from ckan.plugins.toolkit import get_action
class ExampleIPermissionLabelsPlugin(
plugins.SingletonPlugin, DefaultPermissionLabels):
u'''
Example permission labels plugin that makes datasets whose
note... | 35.860465 | 78 | 0.655642 |
798800dfb51b87928c5dc979a4f71731312ea8e7 | 2,174 | py | Python | setup.py | basnijholt-test/adaptive | 80a91bb44bc800b95b552642e9776fc7fd4aecef | [
"BSD-3-Clause"
] | null | null | null | setup.py | basnijholt-test/adaptive | 80a91bb44bc800b95b552642e9776fc7fd4aecef | [
"BSD-3-Clause"
] | null | null | null | setup.py | basnijholt-test/adaptive | 80a91bb44bc800b95b552642e9776fc7fd4aecef | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import os
import sys
from setuptools import find_packages, setup
if sys.version_info < (3, 6):
print("adaptive requires Python 3.6 or above.")
sys.exit(1)
# Loads _version.py module without importing the whole package.
def get_version_and_cmdclass(package_name):
import os
fro... | 26.512195 | 138 | 0.631555 |
798801599070da011b40cf19a0c34a073901d7ed | 4,067 | py | Python | tools/telemetry/telemetry/core/util.py | kurli/chromium-crosswalk | f4c5d15d49d02b74eb834325e4dff50b16b53243 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/telemetry/telemetry/core/util.py | kurli/chromium-crosswalk | f4c5d15d49d02b74eb834325e4dff50b16b53243 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/telemetry/telemetry/core/util.py | kurli/chromium-crosswalk | f4c5d15d49d02b74eb834325e4dff50b16b53243 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import inspect
import os
import socket
import sys
import time
class TimeoutException(Exception):
pass
def GetBaseDir():
main_module = sys.modules[... | 28.440559 | 80 | 0.657979 |
798801f9106f914422e058009e1d3605b5860f6a | 47,783 | py | Python | repo/plugin.video.exodus/resources/lib/indexers/tvshows.py | Hades01/Addons | 710da97ac850197498a3cd64be1811c593610add | [
"Apache-2.0"
] | null | null | null | repo/plugin.video.exodus/resources/lib/indexers/tvshows.py | Hades01/Addons | 710da97ac850197498a3cd64be1811c593610add | [
"Apache-2.0"
] | null | null | null | repo/plugin.video.exodus/resources/lib/indexers/tvshows.py | Hades01/Addons | 710da97ac850197498a3cd64be1811c593610add | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Exodus Add-on
Copyright (C) 2016 Exodus
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your opti... | 42.511566 | 396 | 0.51106 |
7988022d4abb8e25fe042b0417af6243b641fd4e | 923 | py | Python | seqauto/migrations/0017_auto_20210406_1151.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 5 | 2021-01-14T03:34:42.000Z | 2022-03-07T15:34:18.000Z | seqauto/migrations/0017_auto_20210406_1151.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 551 | 2020-10-19T00:02:38.000Z | 2022-03-30T02:18:22.000Z | seqauto/migrations/0017_auto_20210406_1151.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | null | null | null | # Generated by Django 3.1.3 on 2021-04-06 02:21
import django.db.models.deletion
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('seqauto', '0016_remove_samplesheet_old_sequencing_run'),
]
operations = [
migrations.AddField(
... | 31.827586 | 121 | 0.651138 |
79880292f3240eecbce7c9186eff25a45ad8db59 | 158,756 | py | Python | China_Social_Credit_Test.py | Kirito06TV/China_Social_Credits | b557dda7c83f2f3ba8cb50f6ff5ff40a234113c6 | [
"MIT"
] | 1 | 2022-01-31T16:59:49.000Z | 2022-01-31T16:59:49.000Z | China_Social_Credit_Test.py | Kirito06TV/China_Social_Credits | b557dda7c83f2f3ba8cb50f6ff5ff40a234113c6 | [
"MIT"
] | null | null | null | China_Social_Credit_Test.py | Kirito06TV/China_Social_Credits | b557dda7c83f2f3ba8cb50f6ff5ff40a234113c6 | [
"MIT"
] | null | null | null | print('''
Bnevenuto al test per i crediti sociali.
Rispondi bene o la tua esecuzione sarà imminente
E mi raccomando: Forza Cina
的笑容都沒你的甜
Crediti del programma:
Kirito
kirito__._._ su tiktok
''')
while True:
crediti = 1
risposta = input('Pronto per iniziare il test? S/N? (Ricorda che l\'iniziale d... | 136.154374 | 155 | 0.769004 |
7988033c6c07778eb10d05902e01a109cae73465 | 1,754 | py | Python | pipeline/objects/function.py | mystic-ai/pipeline | 487c5e755a862a12c90572b0eff170853ecb3790 | [
"Apache-2.0"
] | 7 | 2022-01-28T20:27:50.000Z | 2022-02-22T15:30:00.000Z | pipeline/objects/function.py | mystic-ai/pipeline | 487c5e755a862a12c90572b0eff170853ecb3790 | [
"Apache-2.0"
] | 17 | 2022-01-11T12:05:38.000Z | 2022-03-25T15:29:43.000Z | pipeline/objects/function.py | mystic-ai/pipeline | 487c5e755a862a12c90572b0eff170853ecb3790 | [
"Apache-2.0"
] | null | null | null | import inspect
from hashlib import sha256
from typing import Any, Callable, Dict, Optional
from pipeline.schemas.function import FunctionGet
from pipeline.util import generate_id, hex_to_python_object
class Function:
local_id: str
remote_id: str
name: str
source: str
hash: str
typing_inputs... | 28.290323 | 86 | 0.63455 |
798803966cd40e90282c00b13fc6db6fe02e570d | 4,405 | py | Python | ParlAI/tests/test_dict.py | UmaTaru/run | be29e4d41a4de3dee27cd6796801bfe51382d294 | [
"MIT"
] | 163 | 2019-06-23T14:07:57.000Z | 2022-02-25T23:06:07.000Z | ParlAI/tests/test_dict.py | UmaTaru/run | be29e4d41a4de3dee27cd6796801bfe51382d294 | [
"MIT"
] | 8 | 2019-07-24T12:41:31.000Z | 2022-02-10T00:17:20.000Z | ParlAI/tests/test_dict.py | UmaTaru/run | be29e4d41a4de3dee27cd6796801bfe51382d294 | [
"MIT"
] | 31 | 2019-06-26T01:21:07.000Z | 2021-09-06T17:23:24.000Z | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""Dictionary testing."""
from parlai.core.build_data import modelzoo_path
from parlai.core.dict import find_ngrams
fro... | 37.330508 | 87 | 0.625199 |
798803e076d2e5ca04b9d22a04051df99ba64bc5 | 82 | py | Python | bot/error_classes/__init__.py | NMisko/monkalot | 965a16ca6a4921c8a9e6e996e9a0e3a9beb8444b | [
"MIT"
] | 20 | 2017-09-08T21:13:38.000Z | 2022-01-29T03:24:13.000Z | bot/error_classes/__init__.py | NMisko/monkalot | 965a16ca6a4921c8a9e6e996e9a0e3a9beb8444b | [
"MIT"
] | 32 | 2017-08-20T17:46:14.000Z | 2021-11-18T22:54:59.000Z | bot/error_classes/__init__.py | NMisko/monkalot | 965a16ca6a4921c8a9e6e996e9a0e3a9beb8444b | [
"MIT"
] | 10 | 2017-08-19T01:13:41.000Z | 2021-08-07T08:45:30.000Z | """ Package for custom classes."""
from .error_classes import UserNotFoundError
| 16.4 | 44 | 0.768293 |
7988050668dc9b9bf21e5829ccceb8172001db61 | 481 | py | Python | juriscraper/opinions/united_states/state/nmctapp_slip.py | umeboshi2/juriscraper | 16abceb3747947593841b1c2708de84dcc85c59d | [
"BSD-2-Clause"
] | null | null | null | juriscraper/opinions/united_states/state/nmctapp_slip.py | umeboshi2/juriscraper | 16abceb3747947593841b1c2708de84dcc85c59d | [
"BSD-2-Clause"
] | null | null | null | juriscraper/opinions/united_states/state/nmctapp_slip.py | umeboshi2/juriscraper | 16abceb3747947593841b1c2708de84dcc85c59d | [
"BSD-2-Clause"
] | 1 | 2021-03-03T00:03:16.000Z | 2021-03-03T00:03:16.000Z | from juriscraper.opinions.united_states.state import nm_p
class Site(nm_p.Site):
def __init__(self, *args, **kwargs):
super(Site, self).__init__(*args, **kwargs)
self.url = 'http://www.nmcompcomm.us/nmcases/NMCASlip.aspx'
self.court_id = self.__module__
def _get_docket_numbers(self):
... | 30.0625 | 67 | 0.656965 |
7988053c7e4d9d24fa874e7e4f12a6665ea06d39 | 15,870 | py | Python | pyops/plots.py | johnnycakes79/pyops | 9eeda939e3f0d65a5dd220b3e439c8d2ba880d98 | [
"BSD-3-Clause"
] | 2 | 2016-03-23T14:35:16.000Z | 2016-05-17T04:56:28.000Z | pyops/plots.py | johnnycakes79/pyops | 9eeda939e3f0d65a5dd220b3e439c8d2ba880d98 | [
"BSD-3-Clause"
] | null | null | null | pyops/plots.py | johnnycakes79/pyops | 9eeda939e3f0d65a5dd220b3e439c8d2ba880d98 | [
"BSD-3-Clause"
] | null | null | null | import pandas as pd
from bokeh.plotting import figure, show, output_notebook, gridplot
from bokeh.palettes import brewer
from collections import OrderedDict
from bokeh.models import HoverTool
import numpy as np
from bokeh.models import ColumnDataSource, Range1d, FactorRange
from datetime import datetime
# BREWER_PLOT... | 35.662921 | 79 | 0.642974 |
79880567691ad6307a82f769d2d04d67f3d07f99 | 911 | py | Python | src/dohlee/cli.py | dohlee/python-dohlee | 55e77591fe1e604c602bd8ab2bfaa8bd0277af54 | [
"MIT"
] | 1 | 2020-02-12T18:45:41.000Z | 2020-02-12T18:45:41.000Z | src/dohlee/cli.py | dohlee/python-dohlee | 55e77591fe1e604c602bd8ab2bfaa8bd0277af54 | [
"MIT"
] | null | null | null | src/dohlee/cli.py | dohlee/python-dohlee | 55e77591fe1e604c602bd8ab2bfaa8bd0277af54 | [
"MIT"
] | null | null | null | """
Module that contains the command line app.
Why does this file exist, and why not put this in __main__?
You might be tempted to import things from __main__ later, but that will cause
problems: the code will get executed twice:
- When you run `python -mdohlee` python will execute
``__main__.py`` as a scr... | 33.740741 | 80 | 0.712404 |
7988064183ac5b557d3ca01ceec579b352280a30 | 23,555 | py | Python | homeassistant/components/media_player/__init__.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | homeassistant/components/media_player/__init__.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | homeassistant/components/media_player/__init__.py | mweinelt/home-assistant | cc0d0a38d7f24885e5146bd0826fa8ba3e2b39a1 | [
"MIT"
] | null | null | null | """
Component to interface with various media players.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/media_player/
"""
import asyncio
import hashlib
import logging
import os
from aiohttp import web
import async_timeout
import voluptuous as vol
from h... | 30.831152 | 79 | 0.681809 |
7988065da3235a226b5be1c87aff6b26264f811c | 2,081 | py | Python | examples/osb/app/handlers/index.py | medecau/lamson | e78520b857384462b9eecdedfc0f8c2e57cdd00a | [
"BSD-3-Clause"
] | null | null | null | examples/osb/app/handlers/index.py | medecau/lamson | e78520b857384462b9eecdedfc0f8c2e57cdd00a | [
"BSD-3-Clause"
] | null | null | null | examples/osb/app/handlers/index.py | medecau/lamson | e78520b857384462b9eecdedfc0f8c2e57cdd00a | [
"BSD-3-Clause"
] | null | null | null | from __future__ import with_statement
from email.utils import parseaddr
from lamson import view, queue
from lamson.routing import route, stateless
import logging
from config import settings
from app.model import post
from markdown import markdown
@route("(post_name)@(host)")
@stateless
def POSTING(message, post_name... | 29.728571 | 86 | 0.649688 |
798806e10cc51024a9cd519ae5af66b81db804e2 | 343 | py | Python | main.py | nakaba9696/discord-bot | 35eeb6e0b4b2808ceafc04d53c1a811df762e1ad | [
"MIT"
] | null | null | null | main.py | nakaba9696/discord-bot | 35eeb6e0b4b2808ceafc04d53c1a811df762e1ad | [
"MIT"
] | null | null | null | main.py | nakaba9696/discord-bot | 35eeb6e0b4b2808ceafc04d53c1a811df762e1ad | [
"MIT"
] | null | null | null | import discord
import random
client = discord.Client()
@client.event
async def on_ready():
print("Logged in")
@client.event
async def on_message(message):
emojis = ["👍", "👎"]
react_num = random.randint(0, len(emojis) - 1)
await client.add_reaction(message, emojis[react_num])
if __name__ == "__mai... | 18.052632 | 57 | 0.673469 |
79880717c409c35c39e8ecf6ffcf75ae60ed81aa | 815 | py | Python | crud/views/theme.py | sergeyv/crud | 3e95859c87844634b5171d31c5353341e52c8277 | [
"ZPL-2.1"
] | 1 | 2020-08-26T01:25:05.000Z | 2020-08-26T01:25:05.000Z | crud/views/theme.py | sergeyv/crud | 3e95859c87844634b5171d31c5353341e52c8277 | [
"ZPL-2.1"
] | null | null | null | crud/views/theme.py | sergeyv/crud | 3e95859c87844634b5171d31c5353341e52c8277 | [
"ZPL-2.1"
] | null | null | null | ##########################################
# This file forms part of CRUD
# Copyright: refer to COPYRIGHT.txt
# License: refer to LICENSE.txt
##########################################
from pyramid.security import authenticated_userid
from pyramid.renderers import get_renderer
class Theme(object):
... | 26.290323 | 70 | 0.606135 |
798807723fa50036ca6b790bad202a63313d014b | 430 | py | Python | taxonomies/translation.py | IATI/new-website | b90783e32d19ac4c821c5ea018a52997a11b5286 | [
"MIT"
] | 4 | 2019-03-28T06:42:17.000Z | 2021-06-06T13:10:51.000Z | taxonomies/translation.py | IATI/new-website | b90783e32d19ac4c821c5ea018a52997a11b5286 | [
"MIT"
] | 177 | 2018-09-28T14:21:56.000Z | 2022-03-30T21:45:26.000Z | taxonomies/translation.py | IATI/new-website | b90783e32d19ac4c821c5ea018a52997a11b5286 | [
"MIT"
] | 8 | 2018-10-25T20:43:10.000Z | 2022-03-17T14:19:27.000Z | """Module for registering model fields for translation, for use by django-modeltranslation."""
from modeltranslation.translator import TranslationOptions
from modeltranslation.decorators import register
from .models import Constituency
@register(Constituency)
class ConstituencyTR(TranslationOptions):
"""Class de... | 33.076923 | 94 | 0.818605 |
798807fd629c7e7832bd35642e09f7f36cda3dee | 5,021 | py | Python | swig/python/gdal-utils/osgeo_utils/samples/gdal2grd.py | sthagen/OSGeo-gdal | 07631e3f3352f4f7453344b1cb73c6b681609d38 | [
"Apache-2.0"
] | null | null | null | swig/python/gdal-utils/osgeo_utils/samples/gdal2grd.py | sthagen/OSGeo-gdal | 07631e3f3352f4f7453344b1cb73c6b681609d38 | [
"Apache-2.0"
] | null | null | null | swig/python/gdal-utils/osgeo_utils/samples/gdal2grd.py | sthagen/OSGeo-gdal | 07631e3f3352f4f7453344b1cb73c6b681609d38 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
###############################################################################
# $Id$
#
# Project: GDAL Python samples
# Purpose: Script to write out ASCII GRD rasters (used in Golden Software
# Surfer)
# from any source supported by GDAL.
# Author: Andrey Kiselev, dron@r... | 35.864286 | 104 | 0.577773 |
79880860fb96ed80d48d6d2aaad69ec17afbb083 | 552 | py | Python | examples/simple_input_with_popup.py | jasondelaat/ticklish_ui | fd30dfe1371c268e42bb62708947a37d080be851 | [
"BSD-3-Clause"
] | 3 | 2021-02-15T06:18:46.000Z | 2021-08-02T13:07:58.000Z | examples/simple_input_with_popup.py | jasondelaat/ticklish_ui | fd30dfe1371c268e42bb62708947a37d080be851 | [
"BSD-3-Clause"
] | null | null | null | examples/simple_input_with_popup.py | jasondelaat/ticklish_ui | fd30dfe1371c268e42bb62708947a37d080be851 | [
"BSD-3-Clause"
] | null | null | null | from ticklish_ui import *
app = Application(
'Example GUI',
# .row1
[Label('Enter some text below:')],
# .row2
[Entry().options(name='user_text')],
# .row3
[Button('OK').options(name='ok'), CloseButton('Quit')],
)
def show_text(event):
text = app.nametowidget('.row2.user_text').get... | 16.235294 | 59 | 0.561594 |
798808fc8ef9ba1db1c7bb6c1db943f1a042e887 | 3,545 | py | Python | chemdataextractor/parse/ir.py | edbeard/chemdataextractor-uvvis2018 | a5750d5313a250468e29d244cd4aeafdfc3250da | [
"MIT"
] | 6 | 2019-12-05T17:10:19.000Z | 2021-08-10T15:15:10.000Z | chemdataextractor/parse/ir.py | edbeard/chemdataextractor-uvvis2018 | a5750d5313a250468e29d244cd4aeafdfc3250da | [
"MIT"
] | null | null | null | chemdataextractor/parse/ir.py | edbeard/chemdataextractor-uvvis2018 | a5750d5313a250468e29d244cd4aeafdfc3250da | [
"MIT"
] | 2 | 2020-06-29T06:58:53.000Z | 2021-03-21T08:39:36.000Z | # -*- coding: utf-8 -*-
"""
chemdataextractor.parse.ir
~~~~~~~~~~~~~~~~~~~~~~~~~~
IR spectrum text parser.
:copyright: Copyright 2016 by Matt Swain.
:license: MIT, see LICENSE file for more details.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from ... | 33.761905 | 194 | 0.580536 |
7988099ea6310b985b36f73b05625d91586e622c | 7,631 | py | Python | backend/tests/test_user.py | rpenna/post-scheduler | 775a145eab6064ecfe2028064ab85834a7a1c412 | [
"MIT"
] | null | null | null | backend/tests/test_user.py | rpenna/post-scheduler | 775a145eab6064ecfe2028064ab85834a7a1c412 | [
"MIT"
] | 8 | 2020-10-10T02:02:56.000Z | 2020-11-08T21:04:17.000Z | backend/tests/test_user.py | rpenna/post-scheduler | 775a145eab6064ecfe2028064ab85834a7a1c412 | [
"MIT"
] | null | null | null | import json, pytest, time
auth_token_ok_user = None
@pytest.fixture
def data_ok_user():
mimetype = 'application/json'
return {
'headers': {
'Content-Type': mimetype,
'Accept': mimetype
},
'body': {
'name': 'Rachel Green',
'email': 'rache... | 28.262963 | 117 | 0.635959 |
79880b4d7003e07268c0b4ad0a72010a43fa06ec | 1,079 | py | Python | nova/keymgr/__init__.py | nicholaskuechler/nova | ff412c3888b234eb123161cc4e6d0d0d69c0004e | [
"Apache-2.0"
] | 5 | 2017-06-23T07:37:39.000Z | 2020-10-21T07:07:50.000Z | nova/keymgr/__init__.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 5 | 2016-07-11T20:59:47.000Z | 2020-07-28T09:56:35.000Z | nova/keymgr/__init__.py | foruy/openflow-multiopenstack | 74140b041ac25ed83898ff3998e8dcbed35572bb | [
"Apache-2.0"
] | 4 | 2017-06-23T07:37:43.000Z | 2020-12-28T09:57:22.000Z | # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory
# 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/... | 31.735294 | 78 | 0.719184 |
79880d41aa20499e9b9a121bcc4bf3b06573cb31 | 5,406 | py | Python | sample-demo/venv/Lib/site-packages/rx/scheduler/eventloop/asynciothreadsafescheduler.py | rupc/bsp-protos | 58833e7ab9ff53f3633708fb5f95edfdd152c5ea | [
"Apache-2.0"
] | 4,342 | 2015-01-06T09:00:23.000Z | 2022-03-28T15:05:50.000Z | sample-demo/venv/Lib/site-packages/rx/scheduler/eventloop/asynciothreadsafescheduler.py | rupc/bsp-protos | 58833e7ab9ff53f3633708fb5f95edfdd152c5ea | [
"Apache-2.0"
] | 613 | 2015-01-07T20:44:56.000Z | 2022-03-20T06:14:20.000Z | sample-demo/venv/Lib/site-packages/rx/scheduler/eventloop/asynciothreadsafescheduler.py | rupc/bsp-protos | 58833e7ab9ff53f3633708fb5f95edfdd152c5ea | [
"Apache-2.0"
] | 420 | 2015-01-07T14:30:30.000Z | 2022-03-11T22:47:46.000Z | import logging
import asyncio
from concurrent.futures import Future
from typing import List, Optional
from rx.core import typing
from rx.disposable import CompositeDisposable, Disposable, SingleAssignmentDisposable
from .asyncioscheduler import AsyncIOScheduler
log = logging.getLogger("Rx")
class AsyncIOThreadSa... | 33.165644 | 85 | 0.586201 |
79880d49822197c484dc0a80cd1007de65281be1 | 20,371 | py | Python | lims/crm/views.py | sqilz/LIMS-Backend | b64e1fa512f89e4492803d44c6b8c35e4d4724cc | [
"MIT"
] | 12 | 2017-03-01T10:39:36.000Z | 2022-01-04T06:17:19.000Z | lims/crm/views.py | sqilz/LIMS-Backend | b64e1fa512f89e4492803d44c6b8c35e4d4724cc | [
"MIT"
] | 29 | 2017-04-25T14:05:08.000Z | 2021-06-21T14:41:53.000Z | lims/crm/views.py | sqilz/LIMS-Backend | b64e1fa512f89e4492803d44c6b8c35e4d4724cc | [
"MIT"
] | 4 | 2017-10-11T16:22:53.000Z | 2021-02-23T15:45:21.000Z | import datetime
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ObjectDoesNotExist
from rest_framework.views import APIView
from rest_framework.response import Response
from simple_salesforce import Salesforce
from django_countries import countries
fro... | 46.192744 | 98 | 0.506504 |
79880dad72ca0cfa87b75eb9f6dc0ba6ab42d74a | 213 | py | Python | 09_inspection/solutions/solution_06.py | jparrax/datascience_middle_course | 347dfd6f68fa0f90eac35e8154f3ea469ccbdea2 | [
"CC0-1.0"
] | 2 | 2021-11-10T10:13:25.000Z | 2022-01-12T08:11:59.000Z | 09_inspection/solutions/solution_06.py | jparrax/datascience_middle_course | 347dfd6f68fa0f90eac35e8154f3ea469ccbdea2 | [
"CC0-1.0"
] | 2 | 2022-01-11T19:45:49.000Z | 2022-01-11T20:36:03.000Z | 09_inspection/solutions/solution_06.py | jparrax/datascience_middle_course | 347dfd6f68fa0f90eac35e8154f3ea469ccbdea2 | [
"CC0-1.0"
] | 1 | 2022-01-12T08:12:11.000Z | 2022-01-12T08:12:11.000Z | import numpy as np
from sklearn.pipeline import make_pipeline
from sklearn.linear_model import RidgeCV
alphas = np.logspace(-3, 3, num=100)
model = make_pipeline(
preprocessor, RidgeCV(alphas=alphas)
)
model
| 21.3 | 42 | 0.784038 |
79880e5c49b0d116f0e97299c560f4034cd87141 | 2,407 | py | Python | udsp/filter/base.py | a-gram/udsp | fc1ae809b9c490b4d55e7446f262d90f8a685b40 | [
"MIT"
] | null | null | null | udsp/filter/base.py | a-gram/udsp | fc1ae809b9c490b4d55e7446f262d90f8a685b40 | [
"MIT"
] | null | null | null | udsp/filter/base.py | a-gram/udsp | fc1ae809b9c490b4d55e7446f262d90f8a685b40 | [
"MIT"
] | null | null | null | """
Systems' base class. The mother of all filters.
"""
class System(object):
"""
Abstract base class for all types of systems
This class defines the interface for a filter with n inputs
and m outputs (a MIMO filter, loosely speaking).
Attributes
----------
inputs: list[Signal]
... | 28.654762 | 73 | 0.606564 |
79880e5e32743329cee8a7203703e84961044974 | 1,716 | py | Python | src_2021/prepro_00_create_initial_parsers.py | w32zhong/MathDowsers-ARQMath | 7121a5b4399fad18950f4df481371ace40b94fdf | [
"MIT"
] | 3 | 2021-10-05T00:13:42.000Z | 2022-01-02T14:31:55.000Z | src_2021/prepro_00_create_initial_parsers.py | w32zhong/MathDowsers-ARQMath | 7121a5b4399fad18950f4df481371ace40b94fdf | [
"MIT"
] | null | null | null | src_2021/prepro_00_create_initial_parsers.py | w32zhong/MathDowsers-ARQMath | 7121a5b4399fad18950f4df481371ace40b94fdf | [
"MIT"
] | 1 | 2022-01-02T14:39:26.000Z | 2022-01-02T14:39:26.000Z | """
Create initial parsers for each MSE entity in pkl format.
These pkl files store selected information from the raw XML files.
Prerequisite:
data xml files are downloaded at <ARQM_XML_PATH>
Effect:
parser pkl files are created at the prepro folder
("<XXX>_parser.pkl" for Comment, PostLink, Vote, User an... | 33.647059 | 77 | 0.799534 |
79880f14ed566d034b624ca332ce68d364212980 | 9,940 | py | Python | robot_sim/_kinematics/jlchain_mesh.py | liang324/wrs | 46eadec355c61a9c7bac1fa0f3cf419b2aac19aa | [
"MIT"
] | 23 | 2021-04-02T09:02:04.000Z | 2022-03-22T05:31:03.000Z | robot_sim/_kinematics/jlchain_mesh.py | liang324/wrs | 46eadec355c61a9c7bac1fa0f3cf419b2aac19aa | [
"MIT"
] | 35 | 2021-04-12T09:41:05.000Z | 2022-03-26T13:32:46.000Z | robot_sim/_kinematics/jlchain_mesh.py | liang324/wrs | 46eadec355c61a9c7bac1fa0f3cf419b2aac19aa | [
"MIT"
] | 16 | 2021-03-30T11:55:45.000Z | 2022-03-30T07:10:59.000Z | import numpy as np
import modeling.geometric_model as gm
import modeling.collision_model as cm
import modeling.model_collection as mc
import basis.robot_math as rm
class JLChainMesh(object):
"""
The mesh generator class for JntLnks
NOTE: it is unnecessary to attach a nodepath to render repeatedly
once... | 45.181818 | 127 | 0.532696 |
7988102682516c7fe9d33c412e403e2bca285927 | 3,800 | py | Python | model/unet_dilated_encoder.py | alongwithyou/pytorch-kaldi | c4f949ced995afe40f8813a6a8225abe5132882a | [
"MIT"
] | 4 | 2020-04-09T01:04:47.000Z | 2020-08-20T12:31:10.000Z | model/unet_dilated_encoder.py | dendisuhubdy/Wave-U-Net-for-Speech-Enhancement | ef16d0f44df65ee133c166fc51e150790d5ecd07 | [
"MIT"
] | null | null | null | model/unet_dilated_encoder.py | dendisuhubdy/Wave-U-Net-for-Speech-Enhancement | ef16d0f44df65ee133c166fc51e150790d5ecd07 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class DownSamplingLayer(nn.Module):
def __init__(self, channel_in, channel_out, dilation=1, kernel_size=15, stride=1, padding=7):
super(DownSamplingLayer, self).__init__()
self.main = nn.Sequential(
nn.Conv1d(c... | 35.849057 | 98 | 0.540526 |
7988109317d1fa8666a63e544e94df9b2d65ed9f | 1,022 | py | Python | leetcode/14_longest_common_prefix.py | sssunda/solve_algorithms | cb630d3b1d7f4bae0115ecb45d9a9b4f2e1eff27 | [
"MIT"
] | null | null | null | leetcode/14_longest_common_prefix.py | sssunda/solve_algorithms | cb630d3b1d7f4bae0115ecb45d9a9b4f2e1eff27 | [
"MIT"
] | null | null | null | leetcode/14_longest_common_prefix.py | sssunda/solve_algorithms | cb630d3b1d7f4bae0115ecb45d9a9b4f2e1eff27 | [
"MIT"
] | null | null | null | """
14. Longest Common Prefix
Write a function to find the longest common prefix string amongst an array of strings.
If there is no common prefix, return an empty string "".
Example 1:
Input: ["flower","flow","flight"]
Output: "fl"
Example 2:
Input: ["dog","racecar","car"]
Output: ""
Explanation: There is no comm... | 21.291667 | 86 | 0.530333 |
7988113b0e829814d3cc9b2f8eca3f49ca26806d | 6,429 | py | Python | baselines/deepq/replay_buffer.py | dingchenghu/baselines_openai | a89bee3c8dc9dde97e32ad7be32d7db31245c3fe | [
"MIT"
] | 281 | 2018-06-21T08:29:02.000Z | 2021-10-03T12:18:06.000Z | baselines/deepq/replay_buffer.py | xinghai-sun/baselines | f2729693253c0ef4d4086231d36e0a4307ec1cb3 | [
"MIT"
] | 6 | 2018-09-23T17:40:22.000Z | 2021-03-21T07:46:26.000Z | baselines/deepq/replay_buffer.py | xinghai-sun/baselines | f2729693253c0ef4d4086231d36e0a4307ec1cb3 | [
"MIT"
] | 41 | 2018-06-15T07:21:30.000Z | 2021-12-06T04:06:52.000Z | import numpy as np
import random
from baselines.common.segment_tree import SumSegmentTree, MinSegmentTree
class ReplayBuffer(object):
def __init__(self, size):
"""Create Replay buffer.
Parameters
----------
size: int
Max number of transitions to store in the buffer. W... | 33.659686 | 108 | 0.591383 |
798811a091ae654e0ae0f7aa03dccbe04eb30d51 | 2,059 | py | Python | 100.moduloPlatform.py | josuerojasq/netacad_python | 510c3a026f83e499144d91c00edc5045a8304a08 | [
"MIT"
] | null | null | null | 100.moduloPlatform.py | josuerojasq/netacad_python | 510c3a026f83e499144d91c00edc5045a8304a08 | [
"MIT"
] | null | null | null | 100.moduloPlatform.py | josuerojasq/netacad_python | 510c3a026f83e499144d91c00edc5045a8304a08 | [
"MIT"
] | null | null | null | #El módulo "platform" permite acceder a los datos de la plataforma subyacente, es decir,
#hardware, sistema operativo e información sobre la versión del intérprete.
#"platform(aliased = False, terse = False)"
#aliased → cuando se establece a True (o cualquier valor distinto de cero)
# puede hacer que la función present... | 37.436364 | 107 | 0.775134 |
798811b67fcec3af47c16b99b96e55b5cdc9f4cd | 18,076 | py | Python | sdk/python/pulumi_azure_native/documentdb/v20200901/gremlin_resource_gremlin_database.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20200901/gremlin_resource_gremlin_database.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20200901/gremlin_resource_gremlin_database.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 62.331034 | 3,541 | 0.708287 |
798811e1a9a9b5c7b79690b6f2a41fab243528f3 | 2,021 | py | Python | examples/create_topology.py | ellagupta/optical-rl-gym | 184d9fd8765060a3165e3dfbda8586f9437bd5d1 | [
"MIT"
] | 11 | 2020-07-20T12:31:47.000Z | 2022-03-03T19:07:14.000Z | examples/create_topology.py | ellagupta/optical-rl-gym | 184d9fd8765060a3165e3dfbda8586f9437bd5d1 | [
"MIT"
] | 2 | 2020-10-09T05:01:22.000Z | 2020-11-10T05:01:13.000Z | examples/create_topology.py | ellagupta/optical-rl-gym | 184d9fd8765060a3165e3dfbda8586f9437bd5d1 | [
"MIT"
] | 18 | 2020-10-05T09:10:34.000Z | 2021-11-10T23:05:41.000Z | """
This script generates a binary file containing a NetworkX graph with all the initializations necessary to work with Optical RL-Gym.
It facilitates when it comes to training a RL agent.
"""
import optical_rl_gym
from optical_rl_gym.utils import Path
from itertools import islice
import numpy as np
import networkx a... | 33.131148 | 131 | 0.668976 |
798814600c55cb795f5d948f62ae7c22180fb170 | 15,950 | py | Python | gamestonk_terminal/cryptocurrency/coingecko/pycoingecko_controller.py | Meg1211/GamestonkTerminal | 9e8b9fb631df1778795236b3ec2aa66725266c15 | [
"MIT"
] | null | null | null | gamestonk_terminal/cryptocurrency/coingecko/pycoingecko_controller.py | Meg1211/GamestonkTerminal | 9e8b9fb631df1778795236b3ec2aa66725266c15 | [
"MIT"
] | null | null | null | gamestonk_terminal/cryptocurrency/coingecko/pycoingecko_controller.py | Meg1211/GamestonkTerminal | 9e8b9fb631df1778795236b3ec2aa66725266c15 | [
"MIT"
] | null | null | null | """Cryptocurrency Controller"""
__docformat__ = "numpy"
# pylint: disable=R0904, C0302, W0622
import argparse
import os
import pandas as pd
from prompt_toolkit.completion import NestedCompleter
from gamestonk_terminal import feature_flags as gtff
from gamestonk_terminal.helper_funcs import get_flair
from gamestonk_term... | 34.901532 | 118 | 0.584201 |
798814aad5ee276f81f0d9bc7ef3ce759b719b63 | 494 | py | Python | pythonProject/03al79Map/mapeamento.py | D-Wolter/PycharmProjects | c8d6144efa30261bff72a3e0414a0d80f6730f9b | [
"MIT"
] | null | null | null | pythonProject/03al79Map/mapeamento.py | D-Wolter/PycharmProjects | c8d6144efa30261bff72a3e0414a0d80f6730f9b | [
"MIT"
] | null | null | null | pythonProject/03al79Map/mapeamento.py | D-Wolter/PycharmProjects | c8d6144efa30261bff72a3e0414a0d80f6730f9b | [
"MIT"
] | null | null | null | #aqui estamos puxando o outro arquivo do diretorio (arquivo python dados)
#importando as listas: produtos, pessoas, lista
from dados import produtos, pessoas, lista
#importando valores da lista do outro arquivo dados
nova_lista = map(lambda x: x*2, lista)#multiplica valores da lista numa nova_lista
#chamando funcao m... | 41.166667 | 84 | 0.740891 |
798814dd53533ceaad6f34be21129c4fd4167265 | 57,083 | py | Python | pyDeltaRCM/deltaRCM_tools.py | mperignon/pyDeltaRCM_WMT | 2b1e9c68cfc7abe165e17ff09a44a46e8b9a3f16 | [
"MIT"
] | 2 | 2018-12-10T02:37:50.000Z | 2019-06-26T12:53:58.000Z | pyDeltaRCM/deltaRCM_tools.py | mperignon/pyDeltaRCM_WMT | 2b1e9c68cfc7abe165e17ff09a44a46e8b9a3f16 | [
"MIT"
] | 1 | 2016-11-10T17:26:31.000Z | 2016-11-10T18:55:13.000Z | pyDeltaRCM/deltaRCM_tools.py | mperignon/pyDeltaRCM_WMT | 2b1e9c68cfc7abe165e17ff09a44a46e8b9a3f16 | [
"MIT"
] | 4 | 2016-09-06T19:07:40.000Z | 2019-02-15T16:46:20.000Z | #! /usr/bin/env python
from math import floor, sqrt, pi
import numpy as np
from random import shuffle
import matplotlib
from matplotlib import pyplot as plt
from scipy import ndimage
import sys, os, re, string
from netCDF4 import Dataset
import time as time_lib
from scipy.sparse import lil_matrix, csc_matrix, hstack
im... | 31.961366 | 99 | 0.447016 |
7988152f147f36f45eabb060d41cf103b4a57710 | 870 | py | Python | test/standardbenchmarks/test_StandardDiskBenchmark.py | pip-benchmark/pip-benchmark-python | d75672e940af12e2f9818607e2188490e989d8c5 | [
"MIT"
] | null | null | null | test/standardbenchmarks/test_StandardDiskBenchmark.py | pip-benchmark/pip-benchmark-python | d75672e940af12e2f9818607e2188490e989d8c5 | [
"MIT"
] | null | null | null | test/standardbenchmarks/test_StandardDiskBenchmark.py | pip-benchmark/pip-benchmark-python | d75672e940af12e2f9818607e2188490e989d8c5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import threading
from pip_benchmark_python.standardbenchmarks.StandardDiskBenchmark import StandardDiskBenchmark
class TestStandardDiskBenchmark:
benchmark = None
def callback(self, arg=None):
print('Is Done!')
def setup_method(self):
self.benchmark = StandardDi... | 24.166667 | 95 | 0.63908 |
798815574b02c514f9e8819c49a2947aaba9fae6 | 8,003 | py | Python | examples/applications/parallel-sentence-mining/bucc2018.py | danielperezr88/sentence-transformers | 56a7990c56c484e7948cf6400b54f27114bb267c | [
"Apache-2.0"
] | null | null | null | examples/applications/parallel-sentence-mining/bucc2018.py | danielperezr88/sentence-transformers | 56a7990c56c484e7948cf6400b54f27114bb267c | [
"Apache-2.0"
] | null | null | null | examples/applications/parallel-sentence-mining/bucc2018.py | danielperezr88/sentence-transformers | 56a7990c56c484e7948cf6400b54f27114bb267c | [
"Apache-2.0"
] | null | null | null | """
This script tests the approach on the BUCC 2018 shared task on finding parallel sentences:
https://comparable.limsi.fr/bucc2018/bucc2018-task.html
You can download the necessary files from there.
We have used it in our paper (https://arxiv.org/pdf/2004.09813.pdf) in Section 4.2 to evaluate different multili... | 37.397196 | 162 | 0.706485 |
798815a9c559397662747c44d2a9d0b09515eb52 | 1,370 | py | Python | kerapu/boom/boom_parameter/SpecialismeCluster.py | SetBased/Kerapu | fdae5ce96e9c79bf0d325c488077436fa31ad03f | [
"MIT"
] | 3 | 2019-07-02T11:12:51.000Z | 2020-09-21T14:59:56.000Z | kerapu/boom/boom_parameter/SpecialismeCluster.py | SetBased/Kerapu | fdae5ce96e9c79bf0d325c488077436fa31ad03f | [
"MIT"
] | 3 | 2017-06-15T08:54:06.000Z | 2019-07-02T16:07:25.000Z | kerapu/boom/boom_parameter/SpecialismeCluster.py | SetBased/Kerapu | fdae5ce96e9c79bf0d325c488077436fa31ad03f | [
"MIT"
] | 5 | 2017-01-27T12:31:56.000Z | 2019-07-02T11:56:45.000Z | from kerapu.boom.boom_parameter.BoomParameter import BoomParameter
from kerapu.lbz.Subtraject import Subtraject
class SpecialismeCluster(BoomParameter):
"""
Klasse voor boomparameter specialismecluster.
Boomparameternummers: 210, 202.
"""
# -------------------------------------------------------... | 36.052632 | 120 | 0.489781 |
798815f36980442c24810f15708aa0f193811938 | 114 | py | Python | bootstrap_signup_form/pages/urls.py | zkan/bootstrap-signup-form | a8657e905f4dd85fddc768e7530275538cde376f | [
"MIT"
] | null | null | null | bootstrap_signup_form/pages/urls.py | zkan/bootstrap-signup-form | a8657e905f4dd85fddc768e7530275538cde376f | [
"MIT"
] | 7 | 2019-12-04T23:16:01.000Z | 2021-06-10T18:13:16.000Z | bootstrap_signup_form/pages/urls.py | zkan/bootstrap-signup-form | a8657e905f4dd85fddc768e7530275538cde376f | [
"MIT"
] | null | null | null | from django.urls import path
from .views import IndexView
urlpatterns = [
path('', IndexView.as_view()),
]
| 12.666667 | 34 | 0.692982 |
798815fb58be0f1bb6b48a773788e1821cefb672 | 3,577 | py | Python | lldb/test/API/commands/frame/var/TestFrameVar.py | rarutyun/llvm | 76fa6b3bcade074bdedef740001c4528e1aa08a8 | [
"Apache-2.0"
] | 305 | 2019-09-14T17:16:05.000Z | 2022-03-31T15:05:20.000Z | lldb/test/API/commands/frame/var/TestFrameVar.py | rarutyun/llvm | 76fa6b3bcade074bdedef740001c4528e1aa08a8 | [
"Apache-2.0"
] | 410 | 2019-06-06T20:52:32.000Z | 2022-01-18T14:21:48.000Z | lldb/test/API/commands/frame/var/TestFrameVar.py | rarutyun/llvm | 76fa6b3bcade074bdedef740001c4528e1aa08a8 | [
"Apache-2.0"
] | 50 | 2019-05-10T21:12:24.000Z | 2022-01-21T06:39:47.000Z | """
Make sure the frame variable -g, -a, and -l flags work.
"""
import lldb
import lldbsuite.test.lldbutil as lldbutil
from lldbsuite.test.lldbtest import *
class TestFrameVar(TestBase):
mydir = TestBase.compute_mydir(__file__)
# If your test case doesn't stress debug info, the
# set this to true. T... | 38.880435 | 102 | 0.662287 |
79881628c0f1ea96228f3a9e3f6e665f59e25f77 | 462 | py | Python | qstrader/asset/universe_mc/universe_mc.py | tom3c/qstrader | 015f0e52f2879c160f372306b0c0bd2d4e843ab4 | [
"MIT"
] | null | null | null | qstrader/asset/universe_mc/universe_mc.py | tom3c/qstrader | 015f0e52f2879c160f372306b0c0bd2d4e843ab4 | [
"MIT"
] | null | null | null | qstrader/asset/universe_mc/universe_mc.py | tom3c/qstrader | 015f0e52f2879c160f372306b0c0bd2d4e843ab4 | [
"MIT"
] | null | null | null | ####TC####
from abc import ABCMeta, abstractmethod
class Universe_MC(object):
"""
Interface specification for an Asset Universe.
"""
__metaclass__ = ABCMeta
@abstractmethod
def get_assets(self, dt):
raise NotImplementedError(
"Should implement get_assets()"
)
... | 18.48 | 50 | 0.623377 |
79881649c49d8b482e5d89232e48d39adb888f8f | 4,051 | py | Python | server/zmq_ppqueue.py | merlinran/acorn-precision-farming-rover | 228bbeb537550df79ae57985c427975ffa828bcd | [
"Apache-2.0"
] | 143 | 2021-02-23T16:17:32.000Z | 2022-03-30T09:42:27.000Z | server/zmq_ppqueue.py | Twisted-Fields/acorn-precision-farming-rover | 228bbeb537550df79ae57985c427975ffa828bcd | [
"Apache-2.0"
] | 19 | 2021-05-13T19:03:21.000Z | 2022-03-25T08:46:44.000Z | server/zmq_ppqueue.py | merlinran/acorn-precision-farming-rover | 228bbeb537550df79ae57985c427975ffa828bcd | [
"Apache-2.0"
] | 17 | 2021-02-23T22:02:24.000Z | 2022-03-20T15:12:20.000Z | """
*********************************************************************
This file is part of:
The Acorn Project
https://wwww.twistedfields.com/research
*********************************************************************
Copyright (c) 2019-2021 Taylor Alexande... | 30.923664 | 75 | 0.613676 |
798816d4c1904644da2c13ef75e3b2856f0488af | 2,171 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/djangoapps/third_party_auth/management/commands/remove_social_auth_users.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/djangoapps/third_party_auth/management/commands/remove_social_auth_users.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/common/djangoapps/third_party_auth/management/commands/remove_social_auth_users.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """
Management command to remove social auth users. Intended for use in masters
integration sandboxes to allow partners reset users and enrollment data.
"""
import logging
from django.conf import settings
from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user
from django.cor... | 33.921875 | 125 | 0.677568 |
79881881a881054f2383de2ccf96976b88933d17 | 12,903 | py | Python | security_monkey/__init__.py | matthewswogger/security_monkey | 66195a708e464e27568eb8f96610b8a535e00661 | [
"Apache-2.0"
] | null | null | null | security_monkey/__init__.py | matthewswogger/security_monkey | 66195a708e464e27568eb8f96610b8a535e00661 | [
"Apache-2.0"
] | null | null | null | security_monkey/__init__.py | matthewswogger/security_monkey | 66195a708e464e27568eb8f96610b8a535e00661 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Netflix, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 35.350685 | 114 | 0.72208 |
798818c47eeb9be3c2678e11da3289d96691b320 | 12,999 | py | Python | Common/oauth2.py | flopezag/fiware-management-scripts | 3e9ccdb62a11ec0ffd0747511f5512bcdb0df729 | [
"Apache-2.0"
] | null | null | null | Common/oauth2.py | flopezag/fiware-management-scripts | 3e9ccdb62a11ec0ffd0747511f5512bcdb0df729 | [
"Apache-2.0"
] | 21 | 2017-01-17T12:19:47.000Z | 2021-06-03T07:56:56.000Z | Common/oauth2.py | flopezag/fiware-management-scripts | 3e9ccdb62a11ec0ffd0747511f5512bcdb0df729 | [
"Apache-2.0"
] | 1 | 2017-05-03T21:42:49.000Z | 2017-05-03T21:42:49.000Z | #!/usr/bin/python
#
# Copyright 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | 35.90884 | 94 | 0.670128 |
798818c6c85f10b2fbbd40ad508d2c3369622edc | 2,318 | py | Python | Libraries/Python/tqdm/v4.23.3/tqdm/_version.py | lilkicker/v3-Common_Environment | df6f571e7f7d3c1b8c84d292c51e1323f43e2b05 | [
"BSL-1.0"
] | null | null | null | Libraries/Python/tqdm/v4.23.3/tqdm/_version.py | lilkicker/v3-Common_Environment | df6f571e7f7d3c1b8c84d292c51e1323f43e2b05 | [
"BSL-1.0"
] | 1 | 2018-06-08T06:45:16.000Z | 2018-06-08T06:45:16.000Z | Libraries/Python/tqdm/v4.23.3/tqdm/_version.py | lilkicker/v3-Common_Environment | df6f571e7f7d3c1b8c84d292c51e1323f43e2b05 | [
"BSL-1.0"
] | 1 | 2018-06-08T04:15:17.000Z | 2018-06-08T04:15:17.000Z | # Definition of the version number
import os
from io import open as io_open
__all__ = ["__version__"]
# major, minor, patch, -extra
version_info = 4, 23, 3
# Nice string for the version
__version__ = '.'.join(map(str, version_info))
# auto -extra based on commit hash (if not tagged as release)
scriptdir = os.path.... | 38.633333 | 79 | 0.525453 |
798818d87476c56f5d19f499adde91e0775781fe | 22,352 | py | Python | sdk/python/pulumi_azure_native/aad/v20170101/domain_service.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/aad/v20170101/domain_service.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/aad/v20170101/domain_service.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 43.827451 | 743 | 0.657301 |
79881999a6d377a9732dcd675a8742807759fe91 | 391 | py | Python | samples/python/topology/notebooks/PyAPI/my_module.py | Jaimie-Jin1/streamsx.topology | 6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08 | [
"Apache-2.0"
] | 31 | 2015-06-24T06:21:14.000Z | 2020-08-28T21:45:50.000Z | samples/python/topology/notebooks/PyAPI/my_module.py | Jaimie-Jin1/streamsx.topology | 6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08 | [
"Apache-2.0"
] | 1,203 | 2015-06-15T02:11:49.000Z | 2021-03-22T09:47:54.000Z | samples/python/topology/notebooks/PyAPI/my_module.py | Jaimie-Jin1/streamsx.topology | 6f316ec8e9ed1349c6f061d9bb7d03deb87e3d08 | [
"Apache-2.0"
] | 53 | 2015-05-28T21:14:16.000Z | 2021-12-23T12:58:59.000Z | import numpy as np
import pybrain
import sys
import time
#
# PyAPI Operators
#
class Counter(object):
def __init__(self):
self.count = 0
def __call__(self):
while True:
self.count = self.count + 1
yield self.count
time.sleep(.2)
class negative_... | 17 | 39 | 0.567775 |
79881a0ead20099e7943bd85b4cd91edaf79c90c | 32,039 | py | Python | tests/core/full_node/test_full_node_store.py | Plotter-Network/plotter-blockchain | 13d10557496f37b9a001786ff837bdf34d8f1bcb | [
"Apache-2.0"
] | 1 | 2021-07-10T12:50:30.000Z | 2021-07-10T12:50:30.000Z | tests/core/full_node/test_full_node_store.py | Plotter-Network/plotter-blockchain | 13d10557496f37b9a001786ff837bdf34d8f1bcb | [
"Apache-2.0"
] | null | null | null | tests/core/full_node/test_full_node_store.py | Plotter-Network/plotter-blockchain | 13d10557496f37b9a001786ff837bdf34d8f1bcb | [
"Apache-2.0"
] | null | null | null | # flake8: noqa: F811, F401
import asyncio
from secrets import token_bytes
from typing import List, Optional
import pytest
from plotter.consensus.blockchain import ReceiveBlockResult
from plotter.consensus.multiprocess_validation import PreValidationResult
from plotter.consensus.pot_iterations import is_overflow_block... | 45.316832 | 120 | 0.621087 |
79881a2bc7d03bbb2147b76da113829e9f08be62 | 124 | py | Python | funcs.py | DhruvPatel01/NotAeroCalc | d4db34c88eaf55e198c9205eb2868bb6c2aca701 | [
"MIT"
] | null | null | null | funcs.py | DhruvPatel01/NotAeroCalc | d4db34c88eaf55e198c9205eb2868bb6c2aca701 | [
"MIT"
] | null | null | null | funcs.py | DhruvPatel01/NotAeroCalc | d4db34c88eaf55e198c9205eb2868bb6c2aca701 | [
"MIT"
] | null | null | null | univariate_funcs = {
'log', 'exp', 'log10',
'sqrt', 'abs',
'cos', 'sin', 'tan', 'arccos', 'arcsin', 'arctan',
} | 24.8 | 54 | 0.491935 |
79881a387a202b8a4f6776e97b41772cc4ef5f9e | 2,034 | py | Python | ftl/node/main.py | rahulrv1980/runtimes-common | a78190b99006c7381d1176015235a4d03d846652 | [
"Apache-2.0"
] | null | null | null | ftl/node/main.py | rahulrv1980/runtimes-common | a78190b99006c7381d1176015235a4d03d846652 | [
"Apache-2.0"
] | null | null | null | ftl/node/main.py | rahulrv1980/runtimes-common | a78190b99006c7381d1176015235a4d03d846652 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 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 applicable law or ag... | 34.474576 | 76 | 0.725664 |
79881a9843be0db7191e35e2fc0199373f3983d0 | 6,584 | py | Python | Book_Newspaper_Batch/convert_jp2cpd_to_book_with_derivs.py | lsulibraries/convert_to_islandorabooknews | 743e3afdcfd308e2a78076dbaca84171fe62d1cc | [
"MIT"
] | 1 | 2019-10-23T18:57:37.000Z | 2019-10-23T18:57:37.000Z | Book_Newspaper_Batch/convert_jp2cpd_to_book_with_derivs.py | lsulibraries/convert_to_islandorabooknews | 743e3afdcfd308e2a78076dbaca84171fe62d1cc | [
"MIT"
] | null | null | null | Book_Newspaper_Batch/convert_jp2cpd_to_book_with_derivs.py | lsulibraries/convert_to_islandorabooknews | 743e3afdcfd308e2a78076dbaca84171fe62d1cc | [
"MIT"
] | null | null | null | #! /usr/bin/env python3.6
import os
import sys
import shutil
import subprocess
import multiprocessing
from lxml import etree as ET
import make_book_derivs
FITS_PATH = make_book_derivs.find_fits_package()
def main(collection_sourcepath):
collection_sourcepath = os.path.realpath(collection_sourcepath)
coll... | 39.662651 | 119 | 0.714004 |
79881abbded43b46867ec88b10bd165fdfbef06d | 610 | py | Python | src/task_blox/__init__.py | deeso/task-blox | f7a971036451851017cf00de79379a25088b6cb4 | [
"Apache-2.0"
] | null | null | null | src/task_blox/__init__.py | deeso/task-blox | f7a971036451851017cf00de79379a25088b6cb4 | [
"Apache-2.0"
] | null | null | null | src/task_blox/__init__.py | deeso/task-blox | f7a971036451851017cf00de79379a25088b6cb4 | [
"Apache-2.0"
] | null | null | null | from task_blox.network.elksubmitjson import ElkSubmitJson
from task_blox.network.pgsubmitjsonnc import PGSubmitJsonNC
from task_blox.os.dirchecker import DirChecker
from task_blox.os.rmfiles import RmFiles
from task_blox.parse.readjsonfile import ReadJsonFile
from task_blox.parse.jsonupdate import KeyedJsonUpdate
TAS... | 33.888889 | 59 | 0.801639 |
79881aedd924ff79fecdc6e6c8289c187aa3f297 | 13 | py | Python | tempCodeRunnerFile.py | lkds/Distributed_File_System | eab1609ec35213097acdc3af58e0f297c5865fdb | [
"MIT"
] | 1 | 2021-03-01T08:48:46.000Z | 2021-03-01T08:48:46.000Z | tempCodeRunnerFile.py | lkds/Distributed_File_System | eab1609ec35213097acdc3af58e0f297c5865fdb | [
"MIT"
] | null | null | null | tempCodeRunnerFile.py | lkds/Distributed_File_System | eab1609ec35213097acdc3af58e0f297c5865fdb | [
"MIT"
] | null | null | null | 192.168.43.52 | 13 | 13 | 0.769231 |
79881af801e794ed7414e0e300ab925bafa7954e | 4,125 | py | Python | bin/tabula_ss2.py | brianhie/ample | 8902dd2c165fbdcb1b387fd5389157ec1ded0b03 | [
"MIT"
] | 45 | 2019-02-04T21:48:50.000Z | 2022-02-02T10:03:15.000Z | bin/tabula_ss2.py | brianhie/ample | 8902dd2c165fbdcb1b387fd5389157ec1ded0b03 | [
"MIT"
] | 9 | 2019-02-11T10:42:08.000Z | 2021-05-21T22:51:45.000Z | bin/tabula_ss2.py | prete/geosketch | 8902dd2c165fbdcb1b387fd5389157ec1ded0b03 | [
"MIT"
] | 6 | 2019-02-01T01:10:56.000Z | 2022-01-25T08:49:58.000Z | import numpy as np
import os
from scanorama import *
from scipy.sparse import vstack
from sklearn.cluster import KMeans
from sklearn.preprocessing import normalize, LabelEncoder
from experiments import *
from process import load_names
from utils import *
np.random.seed(0)
NAMESPACE = 'tabula_ss2'
METHOD = 'svd'
DIMR... | 31.48855 | 80 | 0.674424 |
79881b175033673a6780752ea5961213fbb84dde | 13,366 | py | Python | airflow/providers/google/cloud/operators/kubernetes_engine.py | marcoaaguiar/airflow | 507fc28c5d96b6b6954efbf0d3b344a431916148 | [
"Apache-2.0"
] | 1 | 2020-08-05T18:30:40.000Z | 2020-08-05T18:30:40.000Z | airflow/providers/google/cloud/operators/kubernetes_engine.py | gardnerdev/airflow | 9fd5af9b3fcc2a049b2d4cc490ea3ef7cb155a6b | [
"Apache-2.0"
] | null | null | null | airflow/providers/google/cloud/operators/kubernetes_engine.py | gardnerdev/airflow | 9fd5af9b3fcc2a049b2d4cc490ea3ef7cb155a6b | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 39.081871 | 150 | 0.662652 |
79881b504835384c68d4d5daee443bce4bd06cbf | 407 | py | Python | src/utils/libraries/Get_duration_execution_time.py | Shellyda/Algorithms-Sorting-Project | 205f76b5127a53829056889e46cf240e0d75cbb5 | [
"MIT"
] | null | null | null | src/utils/libraries/Get_duration_execution_time.py | Shellyda/Algorithms-Sorting-Project | 205f76b5127a53829056889e46cf240e0d75cbb5 | [
"MIT"
] | null | null | null | src/utils/libraries/Get_duration_execution_time.py | Shellyda/Algorithms-Sorting-Project | 205f76b5127a53829056889e46cf240e0d75cbb5 | [
"MIT"
] | null | null | null | from timeit import default_timer
class Get_duration_execution_time:
def Ordering(name_of_algorithm, function, random_list):
begin = default_timer()
function(random_list)
end = default_timer()
result = end - begin
print(
" - {} runtime: {:.6f} seconds".format(
... | 27.133333 | 59 | 0.58231 |
79881c866e31c320dc630b64af0a2043a0889a61 | 2,477 | py | Python | tools/custom_apns.py | chetos-rom/android_vendor_chetos | f5359d33e7f87624a0b9550a7d251e76909436e3 | [
"Apache-2.0"
] | null | null | null | tools/custom_apns.py | chetos-rom/android_vendor_chetos | f5359d33e7f87624a0b9550a7d251e76909436e3 | [
"Apache-2.0"
] | null | null | null | tools/custom_apns.py | chetos-rom/android_vendor_chetos | f5359d33e7f87624a0b9550a7d251e76909436e3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (C) 2018 The LineageOS Project
#
# 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... | 39.31746 | 84 | 0.578119 |
79882221ca5d8fc0daa8392d62a80586e8555344 | 67,937 | py | Python | src/sage/plot/animate.py | RexWzh/sage-1 | 1e8ba0aac4cd2975141950daa5c9e0d294b070e4 | [
"BSL-1.0"
] | null | null | null | src/sage/plot/animate.py | RexWzh/sage-1 | 1e8ba0aac4cd2975141950daa5c9e0d294b070e4 | [
"BSL-1.0"
] | null | null | null | src/sage/plot/animate.py | RexWzh/sage-1 | 1e8ba0aac4cd2975141950daa5c9e0d294b070e4 | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
Animated plots
Animations are generated from a list (or other iterable) of graphics
objects.
Images are produced by calling the ``save_image`` method on each input
object, creating a sequence of PNG files.
These are then assembled to various target formats using different
tools.
In particu... | 38.776826 | 184 | 0.554219 |
7988226e0b89017c831aa3cb5efdd17b1d52213e | 66 | py | Python | gadalang/__main__.py | gadalang/gadalang | 58288954deb87021c637c8a553094069ed9abbf4 | [
"MIT"
] | null | null | null | gadalang/__main__.py | gadalang/gadalang | 58288954deb87021c637c8a553094069ed9abbf4 | [
"MIT"
] | null | null | null | gadalang/__main__.py | gadalang/gadalang | 58288954deb87021c637c8a553094069ed9abbf4 | [
"MIT"
] | 1 | 2021-04-14T16:00:19.000Z | 2021-04-14T16:00:19.000Z | from gadalang import main
if __name__ == "__main__":
main()
| 11 | 26 | 0.666667 |
79882360c1615ade24c62fa2e0c88eaeaf8d45eb | 588 | py | Python | resilient-circuits-performance-testing/pt_integration_c/pt_integration_c/util/selftest.py | lmahoney1/resilient-python-api | ae7db374e6e79a03e555c3b9ff3c723c3314f673 | [
"MIT"
] | 28 | 2017-12-22T00:26:59.000Z | 2022-01-22T14:51:33.000Z | resilient-circuits-performance-testing/pt_integration_c/pt_integration_c/util/selftest.py | lmahoney1/resilient-python-api | ae7db374e6e79a03e555c3b9ff3c723c3314f673 | [
"MIT"
] | 18 | 2018-03-06T19:04:20.000Z | 2022-03-21T15:06:30.000Z | resilient-circuits-performance-testing/pt_integration_c/pt_integration_c/util/selftest.py | lmahoney1/resilient-python-api | ae7db374e6e79a03e555c3b9ff3c723c3314f673 | [
"MIT"
] | 28 | 2018-05-01T17:53:22.000Z | 2022-03-28T09:56:59.000Z | # -*- coding: utf-8 -*-
# pragma pylint: disable=unused-argument, no-self-use
"""Function implementation
test with: resilient-circuits selftest -l pt_integration_c
"""
import logging
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
log.addHandler(logging.StreamHandler())
def selftest_function(opts):
... | 29.4 | 96 | 0.729592 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.