hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
03c58e479ec2c4b24c475488dab59d33ae0f29ba | 2,191 | py | Python | atomic_reactor/tasks/worker.py | ben-alkov/atomic-reactor | be6b626b7d822f77999f245193fefcc00c501ca9 | [
"BSD-3-Clause"
] | 1 | 2020-08-18T03:46:59.000Z | 2020-08-18T03:46:59.000Z | atomic_reactor/tasks/worker.py | ben-alkov/atomic-reactor | be6b626b7d822f77999f245193fefcc00c501ca9 | [
"BSD-3-Clause"
] | 30 | 2020-06-05T17:35:36.000Z | 2022-03-25T19:21:36.000Z | atomic_reactor/tasks/worker.py | ben-alkov/atomic-reactor | be6b626b7d822f77999f245193fefcc00c501ca9 | [
"BSD-3-Clause"
] | null | null | null | """
Copyright (c) 2021 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
from dataclasses import dataclass
from atomic_reactor.tasks import common
from atomic_reactor.tasks import plugin_based
@dataclass(frozen=... | 34.234375 | 90 | 0.561387 |
03c596e638c6ca96185abbd548580422a8083417 | 20,363 | py | Python | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/aio/operations/_my_workbooks_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/aio/operations/_my_workbooks_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/applicationinsights/azure-mgmt-applicationinsights/azure/mgmt/applicationinsights/v2015_05_01/aio/operations/_my_workbooks_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 45.96614 | 218 | 0.672789 |
03c59a463158fd0e2dabc08c0dc26d582b1a2889 | 985 | py | Python | igibson/utils/data_utils/ext_object/scripts_wip/link_annotation_updater.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 360 | 2020-04-02T11:12:09.000Z | 2022-03-24T21:46:58.000Z | igibson/utils/data_utils/ext_object/scripts_wip/link_annotation_updater.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 169 | 2020-04-07T21:01:05.000Z | 2022-03-31T10:07:39.000Z | igibson/utils/data_utils/ext_object/scripts_wip/link_annotation_updater.py | suresh-guttikonda/iGibson | a69e623058180146466cd52d4bb3c00d1facdacf | [
"MIT"
] | 94 | 2020-04-09T23:22:17.000Z | 2022-03-17T21:49:03.000Z | import json
import os
import igibson
LINK_NAME = None # TODO: Add the link name you want to add here.
OFFSETS = {
# (category_name, object_name): [x, y, z]
# TODO: Add the offsets you want to add here.
}
def get_category_directory(category):
return os.path.join(igibson.ig_dataset_path, "objects", categ... | 22.906977 | 69 | 0.608122 |
03c5a5cb77c7581d943fda5295a26840ac297eea | 4,430 | py | Python | tf/nn/bpnn_2.py | gsalinaslopez/MagRSS | 615a6649572b044973f753d704d706d66ae12026 | [
"MIT"
] | 3 | 2021-01-12T14:06:54.000Z | 2021-01-27T10:44:33.000Z | tf/nn/bpnn_2.py | gsalinaslopez/MagRSS | 615a6649572b044973f753d704d706d66ae12026 | [
"MIT"
] | null | null | null | tf/nn/bpnn_2.py | gsalinaslopez/MagRSS | 615a6649572b044973f753d704d706d66ae12026 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
# TensorFlow and tf.keras
import tensorflow as tf
from tensorflow import keras
from tensorflow import feature_column
from tensorflow.keras import layers
from sklearn.model_selection import train_test_split
# Helper libraries
import nu... | 36.311475 | 82 | 0.695485 |
03c5a63ef49da075f89c3908a4ceb1ba0d7bbea4 | 638 | py | Python | chapter6/flask/tweetsite/helpers.py | cs50sacramento/source-code-16-17 | 8e8276de39ba3106b67549108f6ee4cf71836025 | [
"MIT"
] | 1 | 2018-09-24T21:27:02.000Z | 2018-09-24T21:27:02.000Z | chapter6/flask/tweetsite/helpers.py | cs50sacramento/source-code-16-17 | 8e8276de39ba3106b67549108f6ee4cf71836025 | [
"MIT"
] | null | null | null | chapter6/flask/tweetsite/helpers.py | cs50sacramento/source-code-16-17 | 8e8276de39ba3106b67549108f6ee4cf71836025 | [
"MIT"
] | 1 | 2018-10-04T01:14:45.000Z | 2018-10-04T01:14:45.000Z | import csv
import urllib.request
from flask import redirect, render_template, request, session, url_for
from functools import wraps
def apology(top="", bottom=""):
"""Renders message as an apology to user."""
def escape(s):
"""
Escape special characters.
https://github.com/jacebrownin... | 33.578947 | 82 | 0.54232 |
03c5d0c15a925852a4b28bf78bb98b127415ac9d | 967 | py | Python | guilded/errors.py | sohamjaiswal10/vella-guilded | 0f21aeea8966a095f07e57af4619c1b38fe0828b | [
"MIT"
] | 4 | 2021-04-17T05:19:19.000Z | 2021-09-10T05:33:58.000Z | guilded/errors.py | sohamjaiswal10/vella-guilded | 0f21aeea8966a095f07e57af4619c1b38fe0828b | [
"MIT"
] | null | null | null | guilded/errors.py | sohamjaiswal10/vella-guilded | 0f21aeea8966a095f07e57af4619c1b38fe0828b | [
"MIT"
] | null | null | null | class GuildedException(Exception):
"""Base exception class for guilded.py
Ideally speaking, this could be caught to handle any exceptions thrown from this library.
"""
pass
class BotException(GuildedException):
"""Exception that's thrown when an operation in the :class:`Bot` fails.
These are us... | 33.344828 | 125 | 0.740434 |
03c5d7dadf1bdb29b299e6453abfb24d61393874 | 3,634 | py | Python | run_models.py | gdgrant/Evolutionary-Networks | 31ef58f2b883191cc57f9a0bb477c968367ca48c | [
"Apache-2.0"
] | null | null | null | run_models.py | gdgrant/Evolutionary-Networks | 31ef58f2b883191cc57f9a0bb477c968367ca48c | [
"Apache-2.0"
] | null | null | null | run_models.py | gdgrant/Evolutionary-Networks | 31ef58f2b883191cc57f9a0bb477c968367ca48c | [
"Apache-2.0"
] | null | null | null | import model
import time
from parameters import *
def try_model(updates):
print('Updating parameters...')
update_parameters(updates)
t0 = time.time()
try:
model.main()
print('Model run concluded. Run time: {:5.3f} s.\n\n'.format(time.time()-t0))
except KeyboardInterrupt:
... | 24.890411 | 91 | 0.494772 |
03c6189e4617a00eb358c5e2b069f4d93652a603 | 1,979 | py | Python | test/lit/child_pointer/__init__.py | sivachandra/gala | 6d7e5fd3cf3c319062a3985dbffd791944e180e9 | [
"Apache-2.0"
] | 4 | 2016-07-16T01:35:30.000Z | 2020-06-18T05:37:33.000Z | test/lit/child_pointer/__init__.py | sivachandra/gala | 6d7e5fd3cf3c319062a3985dbffd791944e180e9 | [
"Apache-2.0"
] | 7 | 2015-06-26T19:24:30.000Z | 2015-08-18T18:16:11.000Z | test/lit/child_pointer/__init__.py | sivachandra/gala | 6d7e5fd3cf3c319062a3985dbffd791944e180e9 | [
"Apache-2.0"
] | null | null | null | import gdb
import gdb.printing
class MyClassSubprinter:
"""A subprinter for class MyMap."""
# GALA's gdb.printing.register_pretty_printer relies on the subprinter "name"
# attribute to create a regex that matches the type.
name = "MyClass"
def __init__(self, val):
self.val = val
def to_string(self):
... | 27.486111 | 79 | 0.711976 |
03c61a3215e7303943c794ddde280569fb4acab8 | 3,379 | py | Python | Basics/E01_Basics/E05_Fonts.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-06-20T22:01:23.000Z | 2021-08-06T04:39:50.000Z | Basics/E01_Basics/E05_Fonts.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-05-17T09:32:27.000Z | 2021-03-15T19:45:52.000Z | Basics/E01_Basics/E05_Fonts.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 2 | 2021-02-25T19:07:45.000Z | 2022-01-09T21:14:06.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T E X A M P L E S
#
# www.pagebot.io
# Licensed under MIT conditions
#
# -----------------------------------------------------------------------------
#
# E05_F... | 31.579439 | 160 | 0.598402 |
03c622665afbb14f6f8930110d8d434de4481243 | 876 | py | Python | hashicorp_vault_client/test/test_body115.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | null | null | null | hashicorp_vault_client/test/test_body115.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | 2 | 2019-09-30T20:56:41.000Z | 2019-10-02T00:22:07.000Z | hashicorp_vault_client/test/test_body115.py | drewmullen/HAC | fb185804fd244366f8f8d01df22835b3d96e7512 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
HashiCorp Vault API
HTTP API that gives you full access to Vault. All API routes are prefixed with `/v1/`. # noqa: E501
OpenAPI spec version: 1.2.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
... | 21.9 | 104 | 0.686073 |
03c62f6ed946b2f913da4951060bfe7b6151c84d | 1,897 | py | Python | var/spack/repos/builtin/packages/r-dbplyr/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-09-10T22:50:08.000Z | 2021-01-12T22:18:54.000Z | var/spack/repos/builtin/packages/r-dbplyr/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2021-01-08T22:23:53.000Z | 2022-03-30T11:08:17.000Z | var/spack/repos/builtin/packages/r-dbplyr/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RDbplyr(RPackage):
"""A 'dplyr' back end for databases that allows you to work with remote... | 51.27027 | 95 | 0.703743 |
03c664eaa5276b2fdea2dc21d4a0dda37294ec3f | 16,577 | py | Python | dataprofiler/tests/labelers/test_integration_struct_data_labeler.py | az85252/DataProfiler | 1303abe04b48fa87c67d8d9b3a13f8cb88e79afb | [
"Apache-2.0"
] | null | null | null | dataprofiler/tests/labelers/test_integration_struct_data_labeler.py | az85252/DataProfiler | 1303abe04b48fa87c67d8d9b3a13f8cb88e79afb | [
"Apache-2.0"
] | null | null | null | dataprofiler/tests/labelers/test_integration_struct_data_labeler.py | az85252/DataProfiler | 1303abe04b48fa87c67d8d9b3a13f8cb88e79afb | [
"Apache-2.0"
] | null | null | null | import os
import unittest
import numpy as np
import pandas as pd
import dataprofiler as dp
class TestStructuredDataLabeler(unittest.TestCase):
@classmethod
def setUpClass(cls) -> None:
num_repeat_data = 50
cls.data = np.array(
[['123 Fake St.', '1/2/2020', 'nice.'],
... | 41.861111 | 89 | 0.625023 |
03c694341433e05913bf90773298528a5425352b | 4,888 | py | Python | hacksoc_org/routes.py | AaronC81/hacksoc.org | 796ec00091a416bd40279aae7f9fc9f301040997 | [
"Apache-1.1"
] | 9 | 2015-09-28T21:14:03.000Z | 2021-08-11T19:45:04.000Z | hacksoc_org/routes.py | AaronC81/hacksoc.org | 796ec00091a416bd40279aae7f9fc9f301040997 | [
"Apache-1.1"
] | 105 | 2017-01-01T23:43:43.000Z | 2022-03-21T14:31:43.000Z | hacksoc_org/routes.py | AaronC81/hacksoc.org | 796ec00091a416bd40279aae7f9fc9f301040997 | [
"Apache-1.1"
] | 40 | 2015-08-06T23:41:21.000Z | 2021-12-16T00:22:47.000Z | """
Defines Flask URL route handlers. Exports `blueprint` to be mounted by app onto the root.
"""
from hacksoc_org.loaders import MarkdownServerLoader, MarkdownNewsLoader
from flask import Blueprint, Response, render_template, url_for
from jinja2 import FileSystemLoader
import os
from os import path
import re
fro... | 28.923077 | 100 | 0.644231 |
03c6bac24ed9a7fc8d7457e116975511c1db107b | 5,827 | py | Python | docs/conf.py | Arindam-1991/deep_reid | ab68d95c2229ef5b832a6a6b614a9b91e4984bd5 | [
"MIT"
] | 1 | 2021-03-27T17:27:47.000Z | 2021-03-27T17:27:47.000Z | docs/conf.py | Arindam-1991/deep_reid | ab68d95c2229ef5b832a6a6b614a9b91e4984bd5 | [
"MIT"
] | null | null | null | docs/conf.py | Arindam-1991/deep_reid | ab68d95c2229ef5b832a6a6b614a9b91e4984bd5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ----------------------------------------------------... | 32.016484 | 80 | 0.631886 |
03c6d0372cfd87ac703280bbe12b7bc0575ab1d4 | 316 | py | Python | meeting5/config/docs.py | swannapa/meeting5 | abc3acf635575592bca1d85c360d598ea48ce6c3 | [
"MIT"
] | null | null | null | meeting5/config/docs.py | swannapa/meeting5 | abc3acf635575592bca1d85c360d598ea48ce6c3 | [
"MIT"
] | null | null | null | meeting5/config/docs.py | swannapa/meeting5 | abc3acf635575592bca1d85c360d598ea48ce6c3 | [
"MIT"
] | null | null | null | """
Configuration for docs
"""
# source_link = "https://github.com/[org_name]/meeting5"
# docs_base_url = "https://[org_name].github.io/meeting5"
# headline = "App that does everything"
# sub_heading = "Yes, you got that right the first time, everything"
def get_context(context):
context.brand_html = "Meeting5"
| 26.333333 | 68 | 0.724684 |
03c6dbec5b16406bc550b17478bfcd8ef32b4cc1 | 1,458 | py | Python | marqeta/response_models/reversal_model.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 21 | 2019-04-12T09:02:17.000Z | 2022-02-18T11:39:06.000Z | marqeta/response_models/reversal_model.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 1 | 2020-07-22T21:27:40.000Z | 2020-07-23T17:38:43.000Z | marqeta/response_models/reversal_model.py | marqeta/marqeta-python | 66fa690eb910825c510a391720b0fe717fac0234 | [
"MIT"
] | 10 | 2019-05-08T14:20:37.000Z | 2021-09-20T18:09:26.000Z | from datetime import datetime, date
from marqeta.response_models.network_fee_model import NetworkFeeModel
from marqeta.response_models.webhook import Webhook
from marqeta.response_models import datetime_object
import json
import re
class ReversalModel(object):
def __init__(self, json_response):
self.json_... | 29.16 | 89 | 0.709877 |
03c6e2216c2c8dcbc1474e8066e88811082730eb | 5,720 | py | Python | strategy.py | thomaslorincz/arduino-dots-and-boxes | 6410ffd696ba4898a1c047ece9d9a23888539b1d | [
"Apache-2.0"
] | null | null | null | strategy.py | thomaslorincz/arduino-dots-and-boxes | 6410ffd696ba4898a1c047ece9d9a23888539b1d | [
"Apache-2.0"
] | null | null | null | strategy.py | thomaslorincz/arduino-dots-and-boxes | 6410ffd696ba4898a1c047ece9d9a23888539b1d | [
"Apache-2.0"
] | null | null | null | def chain_is_open(chain, strat_box_dict):
'''Checks if a chain is open (all boxes of the chain can be enclosed in
consecutive moves).
Arguments:
chain (set): A set of vertices representing an open chain.
strat_box_dict (dict): A dictionary that maps strategy graph vertices
to t... | 38.389262 | 80 | 0.656643 |
03c6e33382a74368606daba0fca97b701abeb134 | 5,963 | py | Python | model/scikit/dffml_model_scikit/scikit_models.py | Lactem/dffml | 211f0b62e8c032b0a3bd0df8d105c2df1c0eb552 | [
"MIT"
] | null | null | null | model/scikit/dffml_model_scikit/scikit_models.py | Lactem/dffml | 211f0b62e8c032b0a3bd0df8d105c2df1c0eb552 | [
"MIT"
] | null | null | null | model/scikit/dffml_model_scikit/scikit_models.py | Lactem/dffml | 211f0b62e8c032b0a3bd0df8d105c2df1c0eb552 | [
"MIT"
] | null | null | null | # SPDX-License-Identifier: MIT
# Copyright (c) 2019 Intel Corporation
"""
Description of what this model does
"""
import os
import sys
import ast
import inspect
from collections import namedtuple
from typing import Dict
from sklearn.neural_network import MLPClassifier
from sklearn.neighbors import KNeighborsClassifier... | 29.087805 | 80 | 0.590475 |
03c6ea18095db3a669b3dd32b3e6cedeafa1f296 | 1,776 | py | Python | venv/Lib/site-packages/tests/test_261_FetchObjectAccess.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_261_FetchObjectAccess.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | venv/Lib/site-packages/tests/test_261_FetchObjectAccess.py | shehzadulislam/Assignment4 | a9cced70be6ae5d2685027d68032d5849f638301 | [
"Apache-2.0"
] | null | null | null | #
# Licensed Materials - Property of IBM
#
# (c) Copyright IBM Corp. 2007-2008
#
import unittest, sys
import ibm_db
import config
from testfunctions import IbmDbTestFunctions
class IbmDbTestCase(unittest.TestCase):
def test_261_FetchObjectAccess(self):
obj = IbmDbTestFunctions()
obj.assert_expect(self.r... | 26.507463 | 86 | 0.631194 |
03c6eb50d71b101cbae35eddff239e5e31caba68 | 1,414 | py | Python | net/data/verify_certificate_chain_unittest/generate-basic-constraints-pathlen-0-self-issued.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2018-01-02T15:42:08.000Z | 2018-01-02T15:42:08.000Z | net/data/verify_certificate_chain_unittest/generate-basic-constraints-pathlen-0-self-issued.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | net/data/verify_certificate_chain_unittest/generate-basic-constraints-pathlen-0-self-issued.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | #!/usr/bin/python
# Copyright (c) 2015 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.
"""Certificate chain with 2 intermediaries. The first intermediary has a basic
constraints path length of 0. The second one is self-iss... | 39.277778 | 78 | 0.717115 |
03c706174727d3cf5b48f98cee5ae14c2fc2a788 | 2,879 | py | Python | NBA Project/venv/Lib/site-packages/plotly/graph_objs/choropleth/unselected/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 1 | 2020-08-08T21:56:11.000Z | 2020-08-08T21:56:11.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/choropleth/unselected/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 2 | 2021-03-31T19:54:17.000Z | 2021-06-02T02:33:56.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/choropleth/unselected/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Marker(_BaseTraceHierarchyType):
# opacity
# -------
@property
def opacity(self):
"""
Sets the marker opacity of unselected points, applied only when
a selection exist... | 27.682692 | 82 | 0.53595 |
03c71fa58863820b67094b9a7415fdd024ca0a81 | 1,420 | py | Python | testsuite/python-tests/twitterPhoto.py | pyronia-sys/libpyronia | 02ccf1d832754f771d1f9a60e5e91819ec878757 | [
"Apache-2.0"
] | null | null | null | testsuite/python-tests/twitterPhoto.py | pyronia-sys/libpyronia | 02ccf1d832754f771d1f9a60e5e91819ec878757 | [
"Apache-2.0"
] | 2 | 2020-02-05T01:26:55.000Z | 2020-02-05T01:31:32.000Z | testsuite/python-tests/twitterPhoto.py | pyronia-sys/libpyronia | 02ccf1d832754f771d1f9a60e5e91819ec878757 | [
"Apache-2.0"
] | 1 | 2021-12-05T19:53:32.000Z | 2021-12-05T19:53:32.000Z | import tweepy
#import time
import random
from subprocess import call
#from datetime import datetime
from cv2 import imread
#import image_lib
#import msgformat
#These are the phrases variables that will be sent with the tweet
tweet = ['A tweet from my pi with pyronia', 'Hello! ']
#while True:
base_image_name = '/hom... | 28.4 | 76 | 0.788732 |
03c747815e6c6d850330fb6e178d872dafb5d887 | 3,891 | py | Python | demo/demo_base.py | xuchen-ethz/continuous_view_synthesis | c6fc39e5ef4a21b8b33154404c71c4d53625fe8c | [
"BSD-3-Clause"
] | 55 | 2020-02-04T01:00:55.000Z | 2022-01-09T04:16:16.000Z | demo/demo_base.py | xuchen-ethz/continuous_view_synthesis | c6fc39e5ef4a21b8b33154404c71c4d53625fe8c | [
"BSD-3-Clause"
] | 10 | 2020-04-20T09:26:14.000Z | 2021-09-06T07:12:59.000Z | demo/demo_base.py | xuchen-ethz/continuous_view_synthesis | c6fc39e5ef4a21b8b33154404c71c4d53625fe8c | [
"BSD-3-Clause"
] | 12 | 2020-04-11T02:04:33.000Z | 2022-01-05T03:02:01.000Z | import matplotlib.backends.backend_tkagg as tkagg
import matplotlib.pyplot as plt
from matplotlib.widgets import Button
from tkinter.filedialog import askopenfilename
import tkinter; tkinter.Tk().withdraw()
from models.base_model import BaseModel
import numpy as np
import cv2
class Demo():
def __init__(self, opt)... | 34.433628 | 100 | 0.621177 |
03c751ae031a7a3ad7748e9bdb0a2c96a6829a7f | 3,066 | py | Python | src/modules/web/filebuster.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | 46 | 2020-04-18T16:42:59.000Z | 2022-01-31T22:08:52.000Z | src/modules/web/filebuster.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | null | null | null | src/modules/web/filebuster.py | The-Cracker-Technology/nullscan | 47fb41f17c59201a0d65a14705b4ff95fcc50a03 | [
"MIT"
] | 11 | 2020-04-23T12:46:18.000Z | 2022-02-04T12:53:50.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*- ########################################################
# ____ _ __ #
# ___ __ __/ / /__ ___ ______ ______(_) /___ __ #
# / _ \/ // / / (_-</ -_) __/ // / __/ / __/ // / ... | 26.66087 | 80 | 0.409002 |
03c778cb838bc8bb6fd7443d4dc5927c282b1e5c | 16,214 | py | Python | neuro-sdk/tests/test_file_utils.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 11 | 2020-10-11T15:38:11.000Z | 2021-11-09T11:29:50.000Z | neuro-sdk/tests/test_file_utils.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 611 | 2020-09-30T21:27:52.000Z | 2022-01-10T10:44:44.000Z | neuro-sdk/tests/test_file_utils.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 1 | 2020-10-05T15:10:24.000Z | 2020-10-05T15:10:24.000Z | import errno
import os
import random
import secrets
import shutil
from datetime import datetime, timedelta
from pathlib import Path
from typing import Any, List
from unittest import mock
import pytest
from yarl import URL
from neuro_sdk import (
AbstractRecursiveFileProgress,
StorageProgressComplete,
Stor... | 34.571429 | 88 | 0.636487 |
03c7a8954e8e09d0632887e28cbce16687e19176 | 18,058 | py | Python | Python_memoire/smclomo/loss_distribution.py | LaGauffre/SMCCompoMo | 242feab1f1a6f923b682cfb8b033bb9c96317dc3 | [
"MIT"
] | 1 | 2021-06-18T01:42:08.000Z | 2021-06-18T01:42:08.000Z | Python_memoire/smclomo/loss_distribution.py | LaGauffre/SMCCompoMo | 242feab1f1a6f923b682cfb8b033bb9c96317dc3 | [
"MIT"
] | null | null | null | Python_memoire/smclomo/loss_distribution.py | LaGauffre/SMCCompoMo | 242feab1f1a6f923b682cfb8b033bb9c96317dc3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Sep 2 15:42:14 2020
@author: pierr
"""
import scipy.special as sp
import math as ma
import pandas as pd
import numpy as np
import scipy.stats as st
from scipy.optimize import minimize
def sim_gam_par(n, k, α, θ):
"""
Sample from a Gamma-Pareto model.
Paramete... | 25.433803 | 99 | 0.466774 |
03c7ac1093d0d2677a437695ac55cd00fb152f59 | 12,396 | py | Python | rl_reliability_metrics/evaluation/eval_metrics.py | tfboyd/rl-reliability-metrics | 0f517f43d5ef0b032b52dff9c2d38ac5db0da8af | [
"Apache-2.0"
] | 1 | 2020-04-17T18:29:25.000Z | 2020-04-17T18:29:25.000Z | rl_reliability_metrics/evaluation/eval_metrics.py | muszyna25/rl-reliability-metrics | f5bbb3ce9c90f1bf599c002e843128ab541630a6 | [
"Apache-2.0"
] | null | null | null | rl_reliability_metrics/evaluation/eval_metrics.py | muszyna25/rl-reliability-metrics | f5bbb3ce9c90f1bf599c002e843128ab541630a6 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2019 The Authors of RL Reliability Metrics.
#
# 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 b... | 37.563636 | 81 | 0.705308 |
03c7b15771b35dae2aa46ffc05d8b9e80f418521 | 706 | py | Python | BinarySearch/capacity_to_ship_packages_within_D_days.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 2 | 2020-06-25T21:10:32.000Z | 2020-12-10T06:53:45.000Z | BinarySearch/capacity_to_ship_packages_within_D_days.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | null | null | null | BinarySearch/capacity_to_ship_packages_within_D_days.py | mishrakeshav/Competitive-Programming | b25dcfeec0fb9a9c71bf3a05644b619f4ca83dd2 | [
"MIT"
] | 3 | 2020-05-15T14:17:09.000Z | 2021-07-25T13:18:20.000Z | """
link : https://leetcode.com/problems/capacity-to-ship-packages-within-d-days/
"""
class Solution:
def shipWithinDays(self, weights: List[int], D: int) -> int:
def condition(val):
c = 1
r = val
for i in weights:
if r >= i :
r -= i
... | 28.24 | 77 | 0.390935 |
03c7b4998856ccaf12ef22fb350bfc3878bd0ad5 | 2,648 | py | Python | table.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | 2 | 2015-05-25T10:47:30.000Z | 2017-12-12T18:15:00.000Z | table.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | table.py | strickyak/aphid | 12469858facdc9d7f110bf6c895e58eae9fb728f | [
"MIT"
] | null | null | null | from go import bufio, fmt, os, time
from go import path.filepath as F
import A, skiplist
from "github.com/strickyak/rye/contrib" import data
class Table:
# Construct with dpath where the t.* files are, and they will be loaded.
def __init__(dpath, suffix='0'):
.dpath = dpath
.suffix = suffix
.sk = skipl... | 23.855856 | 74 | 0.553248 |
03c7ec8dcbe5b8bc3654646e7a7208627b895afb | 99 | py | Python | giantstar/sessionManage/appSession/__init__.py | DaoSen-v/gaintstar | 5ecae8652c9f71aaa78cc0fd181d431cb130cab1 | [
"MIT"
] | 1 | 2021-08-06T08:32:15.000Z | 2021-08-06T08:32:15.000Z | giantstar/sessionManage/appSession/__init__.py | DaoSen-v/gaintstar | 5ecae8652c9f71aaa78cc0fd181d431cb130cab1 | [
"MIT"
] | null | null | null | giantstar/sessionManage/appSession/__init__.py | DaoSen-v/gaintstar | 5ecae8652c9f71aaa78cc0fd181d431cb130cab1 | [
"MIT"
] | null | null | null | # _*_encoding=utf8_*_
# @Time : 2021/5/7 9:17
# @Author : xuyong
# @Email: yong1.xu@casstime.com | 16.5 | 31 | 0.646465 |
03c801f1c4eb95a7e189161ef86a8c48016b45d8 | 6,445 | py | Python | demos/robot/stk/events.py | birfan/openface | 3328af0111700717f1cb60b034b12c6c9c4e0c6c | [
"Apache-2.0"
] | 5 | 2020-01-16T22:50:31.000Z | 2021-07-19T19:16:48.000Z | demos/robot/stk/events.py | birfan/openface | 3328af0111700717f1cb60b034b12c6c9c4e0c6c | [
"Apache-2.0"
] | 4 | 2018-07-05T13:29:00.000Z | 2021-11-05T18:22:49.000Z | app/scripts/dxproactivemobility/stk/events.py | softbankrobotics-labs/pepper-proactive-mobility | a9f6132ee5afd9bb6583741d9d4c481bd9597c65 | [
"BSD-3-Clause"
] | 4 | 2018-06-11T13:54:15.000Z | 2021-11-02T16:33:00.000Z | """
stk.events.py
Provides misc. wrappers for ALMemory and Signals (using the same syntax for
handling both).
"""
__version__ = "0.1.1"
__copyright__ = "Copyright 2015, Aldebaran Robotics"
__author__ = 'ekroeger'
__email__ = 'ekroeger@aldebaran.com'
import qi
def on(*keys):
"""Decorator for connecting a callb... | 34.100529 | 79 | 0.606206 |
03c8385c87e0b188601bf95b0873e8b270524a22 | 3,136 | py | Python | tests/modules/test_losses.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | 2 | 2021-02-22T12:15:42.000Z | 2021-05-02T15:22:24.000Z | tests/modules/test_losses.py | kmarathe10/mmf | 93cd2a7f333ad14e88fa6c2453a0f54b64b36210 | [
"BSD-3-Clause"
] | 7 | 2021-03-01T21:16:26.000Z | 2022-02-27T07:07:11.000Z | tests/modules/test_losses.py | krantirk/MMF | 2e4acaad7ca8eee4319e1205a560eed81733a0be | [
"BSD-3-Clause"
] | 1 | 2022-03-04T14:19:43.000Z | 2022-03-04T14:19:43.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
import collections
import unittest
from unittest.mock import MagicMock
import torch
import mmf.modules.losses as losses
from mmf.common.registry import registry
from mmf.common.sample import SampleList
RETURN_VALUE = torch.tensor(1.0)
def build_loss_side_effect(re... | 36.045977 | 88 | 0.683355 |
03c844dc5f587af4fcc73e7077b54d9154ae90ba | 1,245 | py | Python | satella/instrumentation/metrics/metric_types/simple.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 12 | 2019-12-13T10:17:38.000Z | 2022-01-05T09:01:36.000Z | satella/instrumentation/metrics/metric_types/simple.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 26 | 2016-04-01T11:55:26.000Z | 2021-12-30T17:03:59.000Z | satella/instrumentation/metrics/metric_types/simple.py | piotrmaslanka/satella | bf4ba7a21ad2ac93a366442a2b4574dc5568b87e | [
"MIT"
] | 1 | 2021-05-31T08:45:22.000Z | 2021-05-31T08:45:22.000Z | import typing as tp
from .base import EmbeddedSubmetrics
from .measurable_mixin import MeasurableMixin
from .registry import register_metric
from ..data import MetricData, MetricDataCollection
class SimpleMetric(EmbeddedSubmetrics):
__slots__ = ('data',)
CLASS_NAME = 'string'
CONSTRUCTOR = str
DEFAU... | 27.666667 | 94 | 0.68755 |
03c84a26ee15365bba9b71ec9f9ce6b52e0ee775 | 292 | py | Python | haps/scopes/__init__.py | ekiro/haps | 88d225e0177de0a0373d12d42d1b6a80437b8d5c | [
"MIT"
] | 38 | 2018-06-15T11:32:05.000Z | 2020-05-08T17:04:42.000Z | haps/scopes/__init__.py | lunarwings/haps | 537222b5c28244ae87d803918e1b7ede3a338cc8 | [
"MIT"
] | 6 | 2020-03-02T19:13:56.000Z | 2020-12-03T06:00:38.000Z | haps/scopes/__init__.py | ekiro/haps | 88d225e0177de0a0373d12d42d1b6a80437b8d5c | [
"MIT"
] | 2 | 2019-05-17T09:58:36.000Z | 2019-06-10T08:18:48.000Z | from typing import Any, Callable
class Scope:
"""
Base scope class. Every custom scope should subclass this.
"""
def get_object(self, type_: Callable) -> Any:
"""
Returns object from scope
:param type_:
"""
raise NotImplementedError
| 19.466667 | 62 | 0.59589 |
03c84c043146be3f3985087bff8d15efac5bddc4 | 2,718 | py | Python | functions/observatory/http-observatory/httpobs/scanner/tasks.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | null | null | null | functions/observatory/http-observatory/httpobs/scanner/tasks.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | 4 | 2021-02-12T09:50:38.000Z | 2021-06-17T10:33:09.000Z | functions/observatory/http-observatory/httpobs/scanner/tasks.py | radon-h2020/radon-function-lib | 2737e006a194021f2c8e4f793f9b99abda966175 | [
"MIT"
] | 2 | 2021-02-22T09:29:28.000Z | 2021-06-12T13:54:18.000Z | from celery import Celery
from celery.exceptions import (
SoftTimeLimitExceeded,
TimeLimitExceeded,
WorkerLostError,
WorkerShutdown,
WorkerTerminate)
from httpobs.conf import DEVELOPMENT_MODE
from httpobs.database import (insert_test_results,
select_site_headers,
... | 37.75 | 104 | 0.669978 |
03c857f04d98e1eeb6e3802c14cdac21e11c783e | 1,921 | py | Python | opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/controller.py | ThePumpingLemma/opentelemetry-python | 9ed98eb9320b9064e43c3b43ee7c4990eec3657a | [
"Apache-2.0"
] | null | null | null | opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/controller.py | ThePumpingLemma/opentelemetry-python | 9ed98eb9320b9064e43c3b43ee7c4990eec3657a | [
"Apache-2.0"
] | null | null | null | opentelemetry-sdk/src/opentelemetry/sdk/metrics/export/controller.py | ThePumpingLemma/opentelemetry-python | 9ed98eb9320b9064e43c3b43ee7c4990eec3657a | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, OpenTelemetry 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 i... | 33.701754 | 74 | 0.690786 |
03c87cd647478a11325f3c8183c3014ede3b2032 | 6,514 | py | Python | test/dlc_tests/eks/mxnet/training/test_eks_mxnet_training.py | laurenyu/deep-learning-containers | 0714377fcb075a3bce06b444787beb34cc13c9fc | [
"Apache-2.0"
] | null | null | null | test/dlc_tests/eks/mxnet/training/test_eks_mxnet_training.py | laurenyu/deep-learning-containers | 0714377fcb075a3bce06b444787beb34cc13c9fc | [
"Apache-2.0"
] | null | null | null | test/dlc_tests/eks/mxnet/training/test_eks_mxnet_training.py | laurenyu/deep-learning-containers | 0714377fcb075a3bce06b444787beb34cc13c9fc | [
"Apache-2.0"
] | null | null | null | import os
import random
import re
import pytest
from invoke import run
import test.test_utils.eks as eks_utils
@pytest.mark.model("mnist")
def test_eks_mxnet_single_node_training(mxnet_training):
"""
Function to create a pod using kubectl and given container image, and run MXNet training
Args:
... | 32.08867 | 100 | 0.622505 |
03c890c4e9be65e7693f29adba56de67f8ed7b9f | 2,729 | py | Python | FEBDAQMULTx2/data_analysis/12_labview_dark_rate/1_plot_dcr_vs_thr_by_stitching.py | kaikai581/t2k-mppc-daq | 6b4f7bf04d885e952d9fd653df8f9ca1dd31089e | [
"MIT"
] | null | null | null | FEBDAQMULTx2/data_analysis/12_labview_dark_rate/1_plot_dcr_vs_thr_by_stitching.py | kaikai581/t2k-mppc-daq | 6b4f7bf04d885e952d9fd653df8f9ca1dd31089e | [
"MIT"
] | null | null | null | FEBDAQMULTx2/data_analysis/12_labview_dark_rate/1_plot_dcr_vs_thr_by_stitching.py | kaikai581/t2k-mppc-daq | 6b4f7bf04d885e952d9fd653df8f9ca1dd31089e | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Make the dark count rate vs. threshold plot by concatenating multiple files.
'''
import argparse
import matplotlib
matplotlib.use('Agg')
import os
import pandas as pd
import seaborn as sns
class segmented_rate:
def __init__(self, infpns):
self.dfs_raw = []
self.df_rate = ... | 32.879518 | 213 | 0.606449 |
03c8a32bdcae52ab3d5baf214573a816c5548f83 | 2,920 | py | Python | auto_pilot/localization/kalman.py | farrellsc/zAutoPilot | 652d93690237dcb21c3cbdbdad95f917b7fec6e3 | [
"MIT"
] | 1 | 2018-03-05T08:27:58.000Z | 2018-03-05T08:27:58.000Z | auto_pilot/localization/kalman.py | farrellsc/zAutoPilot | 652d93690237dcb21c3cbdbdad95f917b7fec6e3 | [
"MIT"
] | null | null | null | auto_pilot/localization/kalman.py | farrellsc/zAutoPilot | 652d93690237dcb21c3cbdbdad95f917b7fec6e3 | [
"MIT"
] | null | null | null | from auto_pilot.localization.filter import Filter
from auto_pilot.data.world_map import WorldMap
from auto_pilot.data.coordinates import Coordinates
from auto_pilot.data.motion import Motion
from auto_pilot.common.param import Param
from overrides import overrides
import numpy as np
from typing import Tuple
@Filter.r... | 41.714286 | 116 | 0.707534 |
03c8afbfeab7d3841871075ab676c5a901179d19 | 18,907 | py | Python | A3C.py | jasonplato/RL_for_AutonomousGreenhouse | e814f3dc42a9ae684a1a6198c31dc900a8636d34 | [
"MIT"
] | 2 | 2021-08-09T14:42:55.000Z | 2021-12-09T15:42:58.000Z | A3C.py | jasonplato/RL_for_AutonomousGreenhouse | e814f3dc42a9ae684a1a6198c31dc900a8636d34 | [
"MIT"
] | null | null | null | A3C.py | jasonplato/RL_for_AutonomousGreenhouse | e814f3dc42a9ae684a1a6198c31dc900a8636d34 | [
"MIT"
] | null | null | null | import multiprocessing # 多线程模块
import threading # 线程模块
import queue
import tensorflow as tf
import numpy as np
import gym
import os
import shutil # 拷贝文件用
import matplotlib.pyplot as plt
from FeudalBatchProcessor import FeudalBatchProcessor
import policy_utils
from LSTMmodel import SingleStepLSTM
Game = 'CartPole-v0... | 44.072261 | 137 | 0.547416 |
03c8b981537e3fcfd6701a19389c2bfed72a1dc3 | 471 | py | Python | python/pymei_testsuite.py | Breakend/libmei | c031be79a2775e8bb9b47e1057e1398232d4b293 | [
"MIT"
] | null | null | null | python/pymei_testsuite.py | Breakend/libmei | c031be79a2775e8bb9b47e1057e1398232d4b293 | [
"MIT"
] | null | null | null | python/pymei_testsuite.py | Breakend/libmei | c031be79a2775e8bb9b47e1057e1398232d4b293 | [
"MIT"
] | 1 | 2021-02-23T21:13:47.000Z | 2021-02-23T21:13:47.000Z | import unittest
from test import meielement_test
from test import meidocument_test
from test import xmlimport_test
from test import xmlexport_test
def suite():
test_suite = unittest.TestSuite()
test_suite.addTest(meielement_test.suite())
test_suite.addTest(meidocument_test.suite())
test_suite.addTest(x... | 29.4375 | 48 | 0.783439 |
03c8c48840cc518b7fbb34967471f0a949730fa2 | 11,154 | py | Python | detectron_/modeling/roi_heads/rotated_fast_rcnn.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | detectron_/modeling/roi_heads/rotated_fast_rcnn.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | detectron_/modeling/roi_heads/rotated_fast_rcnn.py | TalhaUsuf/RetinaNet_W9_form | 2a66bba1de96bebd679775b841d95ac7dcfcbbbe | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
import logging
import numpy as np
import torch
from detectron.config import configurable
from detectron.layers import ShapeSpec, batched_nms_rotated
from detectron.structures import Instances, RotatedBoxes, pairwise_iou_rotated
from detectron.utils.events import get_e... | 41.158672 | 100 | 0.682446 |
03c908f59f9d5925520720b1e919ccf4a1ed7a48 | 5,066 | py | Python | optimistic.py | 201419/Optimizer-PyTorch | ce5c0dc96dca0689af2e0a3f0b0bb3821c2a31b0 | [
"Apache-2.0"
] | 42 | 2019-11-29T12:56:37.000Z | 2022-03-28T06:32:59.000Z | optimistic.py | HongdaChen/Optimizer-PyTorch | 5db2164fef8d419d4a1486c923f6835f54f0b091 | [
"Apache-2.0"
] | 1 | 2020-02-28T02:06:27.000Z | 2020-02-28T02:09:05.000Z | optimistic.py | HongdaChen/Optimizer-PyTorch | 5db2164fef8d419d4a1486c923f6835f54f0b091 | [
"Apache-2.0"
] | 15 | 2020-02-01T04:05:59.000Z | 2021-11-08T05:52:21.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from tensorflow.python.ops import control_flow_ops
from tensorflow.python.ops import math_ops
from tensorflow.python.ops import state_ops
from tensorflow.python.framework import ops
from tensorflow.python.train... | 40.528 | 101 | 0.634228 |
03c916c0d59dcf7ed998d9a52ac7293951b38906 | 7,746 | py | Python | dataset/blast_wall.py | YigeWang-WHU/BlastLoadsRegression | 884ba58a31ba854eaf86b846e551a97d84b11924 | [
"MIT"
] | null | null | null | dataset/blast_wall.py | YigeWang-WHU/BlastLoadsRegression | 884ba58a31ba854eaf86b846e551a97d84b11924 | [
"MIT"
] | null | null | null | dataset/blast_wall.py | YigeWang-WHU/BlastLoadsRegression | 884ba58a31ba854eaf86b846e551a97d84b11924 | [
"MIT"
] | null | null | null | from torch.utils.data import Dataset
import os
import numpy as np
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split
import torch
def make_dataset(data_root, txt, input_size, output_size, portion_train, portion_val):
#############################################... | 43.762712 | 126 | 0.639685 |
03c91c3cd6244e6b71cb368c943b79f0218dd33e | 1,448 | py | Python | PlayArea/OtherExperiments/Counters/synchronousCounter.py | JetStarBlues/Nand-2-Tetris | c27b5c2ac659f1edb63d36d89bf87e226bc5672c | [
"MIT"
] | null | null | null | PlayArea/OtherExperiments/Counters/synchronousCounter.py | JetStarBlues/Nand-2-Tetris | c27b5c2ac659f1edb63d36d89bf87e226bc5672c | [
"MIT"
] | null | null | null | PlayArea/OtherExperiments/Counters/synchronousCounter.py | JetStarBlues/Nand-2-Tetris | c27b5c2ac659f1edb63d36d89bf87e226bc5672c | [
"MIT"
] | null | null | null | ''''''''''''''''''''''''''' imports '''''''''''''''''''''''''''''
# Built ins
import sys
# Computer files
sys.path.append('../../Modules')
from _1__elementaryGates import *
from _2__arithmeticGates import *
from _3__clock import *
from _4__flipFlops import *
''''''''''''''''''''''''' helpers '''''''''''''''''''''''... | 19.567568 | 90 | 0.593923 |
03c9405f797ebee9e2b51251e71fdb50384ed75d | 2,841 | py | Python | hive_plug_play/engine/plugs/follow.py | seakintruth/hive-plug-play | 032caed7a0690a58410b3d4e93a1fdecf2009d58 | [
"MIT"
] | 3 | 2021-05-11T07:12:05.000Z | 2021-10-04T04:01:38.000Z | hive_plug_play/engine/plugs/follow.py | seakintruth/hive-plug-play | 032caed7a0690a58410b3d4e93a1fdecf2009d58 | [
"MIT"
] | 9 | 2021-06-02T03:43:01.000Z | 2021-07-23T14:52:03.000Z | hive_plug_play/engine/plugs/follow.py | seakintruth/hive-plug-play | 032caed7a0690a58410b3d4e93a1fdecf2009d58 | [
"MIT"
] | 1 | 2021-05-24T15:57:20.000Z | 2021-05-24T15:57:20.000Z | from hive_plug_play.server.system_status import SystemStatus
class SearchOps:
@classmethod
def follow(cls, follower_account=None, followed_account=None, block_range=None):
"""
"follow" | {"follower":"idwritershive","following":"olgavita","what":["blog"]}
"""
if block_range ... | 36.896104 | 97 | 0.475889 |
03c9458c7093820c10e74b086da8bac06e79d468 | 17,172 | py | Python | codes/utilities/selections.py | jasonzutty/ezCGP | ee44425e4835f9d7ca5651bbea3340cf9466840a | [
"MIT"
] | 5 | 2019-01-18T20:33:54.000Z | 2021-08-24T17:02:07.000Z | codes/utilities/selections.py | jasonzutty/ezCGP | ee44425e4835f9d7ca5651bbea3340cf9466840a | [
"MIT"
] | 188 | 2019-01-22T21:56:42.000Z | 2022-03-31T21:23:58.000Z | codes/utilities/selections.py | jasonzutty/ezCGP | ee44425e4835f9d7ca5651bbea3340cf9466840a | [
"MIT"
] | 3 | 2019-01-27T04:32:50.000Z | 2021-04-20T17:28:42.000Z | ###
# STOLEN FROM DEAP
# https://github.com/DEAP/deap/blob/232ed17142da1c8bb6a39179018f8278b122aada/deap/tools/emo.py
###
from __future__ import division
import bisect
import math
import random
from itertools import chain
from operator import attrgetter, itemgetter
from collections import defaultdict
#from config... | 37.330435 | 103 | 0.623282 |
03c94efebf6a79a9c1619cfbcab58a32df7c1898 | 2,002 | py | Python | kloppy/tests/test_metrica_events.py | ThomasSeidl/kloppy | ca59bb2aa3b54b08a50d35e2ed2dd3c2f56cdded | [
"BSD-3-Clause"
] | 176 | 2020-04-24T09:12:05.000Z | 2022-03-27T07:03:44.000Z | kloppy/tests/test_metrica_events.py | ThomasSeidl/kloppy | ca59bb2aa3b54b08a50d35e2ed2dd3c2f56cdded | [
"BSD-3-Clause"
] | 95 | 2020-04-24T18:37:36.000Z | 2022-03-23T21:59:10.000Z | kloppy/tests/test_metrica_events.py | ThomasSeidl/kloppy | ca59bb2aa3b54b08a50d35e2ed2dd3c2f56cdded | [
"BSD-3-Clause"
] | 39 | 2020-05-08T21:45:26.000Z | 2022-03-19T09:29:41.000Z | import os
from kloppy import MetricaEventsJsonSerializer
from kloppy.domain import (
Period,
Provider,
AttackingDirection,
SetPieceType,
BodyPart,
)
from kloppy.domain.models.common import DatasetType
class TestMetricaEvents:
def test_correct_deserialization(self):
base_dir = os.path... | 31.777778 | 78 | 0.636364 |
03c9647c7c54086d94071d547b01ba17548af418 | 3,071 | py | Python | helpers.py | Nathanmalnoury/gh-backport-action | a41a714afb6f95a46ef409f17efd0576892eab5e | [
"MIT"
] | null | null | null | helpers.py | Nathanmalnoury/gh-backport-action | a41a714afb6f95a46ef409f17efd0576892eab5e | [
"MIT"
] | 5 | 2021-10-21T11:10:37.000Z | 2021-12-14T19:02:45.000Z | helpers.py | Nathanmalnoury/gh-backport-action | a41a714afb6f95a46ef409f17efd0576892eab5e | [
"MIT"
] | 1 | 2021-09-09T06:14:26.000Z | 2021-09-09T06:14:26.000Z | import os
import subprocess
import typing
from subprocess import CalledProcessError
import requests
class GitException(Exception):
"""Exception raised when using git command line from python."""
pass
def git(*args):
try:
command_run = subprocess.run(["git", *args], stdout=subprocess.PIPE, stde... | 27.666667 | 112 | 0.656789 |
03c9722e6a027aaea68fe18388f279ab7bb32df7 | 6,424 | py | Python | contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/import_order.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/import_order.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | null | null | null | contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/import_order.py | dturner-tw/pants | 3a04f2e46bf2b8fb0a7999c09e4ffdf9057ed33f | [
"Apache-2.0"
] | 1 | 2019-06-10T17:24:34.000Z | 2019-06-10T17:24:34.000Z | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import ast
import os... | 32.77551 | 98 | 0.661426 |
03c9826be96e5772048f910e97dd1e816dace07d | 513 | py | Python | sentence_transformers/models/__init__.py | Ing-David/sentence-transformers | 4895f2f806d209a41a770e96ba2425aac605497c | [
"Apache-2.0"
] | null | null | null | sentence_transformers/models/__init__.py | Ing-David/sentence-transformers | 4895f2f806d209a41a770e96ba2425aac605497c | [
"Apache-2.0"
] | null | null | null | sentence_transformers/models/__init__.py | Ing-David/sentence-transformers | 4895f2f806d209a41a770e96ba2425aac605497c | [
"Apache-2.0"
] | null | null | null | from .Transformer import Transformer
from .Asym import Asym
from .BoW import BoW
from .CNN import CNN
from .Dense import Dense
from .LayerNorm import LayerNorm
from .LSTM import LSTM
from .Normalize import Normalize
from .Pooling import Pooling
from .WKPooling import WKPooling
from .WeightedLayerPooling import Weighted... | 32.0625 | 54 | 0.853801 |
03c994a8edbf1999211a482f6c2a11fbb336c228 | 2,491 | py | Python | tests/unit/drivers/test_helper.py | HarshCasper/jina | 81ab098b140b74ad1cfdfde9218cec7a40923749 | [
"Apache-2.0"
] | 1 | 2021-02-25T19:28:50.000Z | 2021-02-25T19:28:50.000Z | tests/unit/drivers/test_helper.py | HarshCasper/jina | 81ab098b140b74ad1cfdfde9218cec7a40923749 | [
"Apache-2.0"
] | 1 | 2021-02-27T05:56:45.000Z | 2021-02-27T05:57:03.000Z | tests/unit/drivers/test_helper.py | deepampatel/jina | 97f9e97a4a678a28bdeacbc7346eaf7bbd2aeb89 | [
"Apache-2.0"
] | null | null | null | import random
import numpy as np
import pytest
from jina import Document, DocumentSet
from jina.proto import jina_pb2
from jina.types.message import Message
from jina.types.ndarray.generic import NdArray
@pytest.fixture(scope='function')
def document():
with Document() as doc:
doc.text = 'this is text'
... | 31.531646 | 102 | 0.674026 |
03c9b4eaf79e98fdc62445a4f4ea2ba4fad48046 | 1,075 | py | Python | srttools/tests/test_read_config.py | TheDebbio/srt-single-dish-tools | a01059f888a55d4b3c9d0768d61c58ae005961ca | [
"BSD-3-Clause"
] | null | null | null | srttools/tests/test_read_config.py | TheDebbio/srt-single-dish-tools | a01059f888a55d4b3c9d0768d61c58ae005961ca | [
"BSD-3-Clause"
] | 1 | 2020-03-02T17:10:19.000Z | 2020-03-02T17:10:19.000Z | srttools/tests/test_read_config.py | TheDebbio/srt-single-dish-tools | a01059f888a55d4b3c9d0768d61c58ae005961ca | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
from srttools.read_config import read_config
import os
import astropy.units as u
class TestConfig(object):
@classmethod
def setup_class(cls):
cls.curdir = os.path.abspath(os.path.dirname(__file__))
cls.datadir = os.path.join(cls.curdir, 'data')
... | 28.289474 | 76 | 0.612093 |
03c9bd3fe516caf0ea662e9983f3e324580f66fb | 7,624 | py | Python | haystack/file_converter/pdf.py | fossabot/haystack | 785b257fd33f7d092c4414415c5a2552db81fe51 | [
"Apache-2.0"
] | 1 | 2021-08-04T09:06:43.000Z | 2021-08-04T09:06:43.000Z | haystack/file_converter/pdf.py | fossabot/haystack | 785b257fd33f7d092c4414415c5a2552db81fe51 | [
"Apache-2.0"
] | null | null | null | haystack/file_converter/pdf.py | fossabot/haystack | 785b257fd33f7d092c4414415c5a2552db81fe51 | [
"Apache-2.0"
] | 1 | 2021-04-23T14:59:37.000Z | 2021-04-23T14:59:37.000Z | import logging
import subprocess
from pathlib import Path
from typing import List, Optional, Dict, Any
from haystack.file_converter.base import BaseConverter
logger = logging.getLogger(__name__)
class PDFToTextConverter(BaseConverter):
def __init__(self, remove_numeric_tables: bool = False, valid_languages: Opt... | 54.848921 | 120 | 0.58893 |
03ca000dcad13e4b192ac0afd07e9200e64ad711 | 13,928 | py | Python | src/StockDraw/scripts/rebuild_StockDraw.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | 3 | 2019-11-26T05:33:47.000Z | 2020-05-18T06:49:41.000Z | src/StockDraw/scripts/rebuild_StockDraw.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | null | null | null | src/StockDraw/scripts/rebuild_StockDraw.py | xylsxyls/xueyelingshuan | 61eb1c7c4f76c3eaf4cf26e4b2b37b6ed2abc5b9 | [
"MIT"
] | null | null | null | #!python3
# -*- coding:utf-8 -*-
import os
import sys
import time
import ctypes
import shutil
import subprocess
IsPy3 = sys.version_info[0] >= 3
if IsPy3:
import winreg
else:
import codecs
import _winreg as winreg
BuildType = 'Release'
IsRebuild = True
Build = 'Rebuild'
Update = False
C... | 39.123596 | 196 | 0.58027 |
03ca0beded6fcf5f64e0fb9dd14ddb3433fa0406 | 1,088 | py | Python | market/templates/market/play/code_body_2.py | DatalogiForAlle/MarketSim | 7b501f585cea2d19ca5b3f927065003480954298 | [
"MIT"
] | null | null | null | market/templates/market/play/code_body_2.py | DatalogiForAlle/MarketSim | 7b501f585cea2d19ca5b3f927065003480954298 | [
"MIT"
] | 104 | 2021-06-01T08:10:38.000Z | 2021-09-07T11:30:19.000Z | market/templates/market/play/code_body_2.py | DatalogiForAlle/MarketSim | 7b501f585cea2d19ca5b3f927065003480954298 | [
"MIT"
] | 1 | 2022-02-24T14:04:03.000Z | 2022-02-24T14:04:03.000Z | """ Algoritme 2 - kan ikke redigeres """
import random, math
# I runde 1 foretager vi disse valg:
if round == 1:
# Vi lader prisen pr. vare være dobbelt så
# stor som vores omkostning. pr. vare.
price_choice = 2 * prod_cost
# Vi vælger at producere en femtedel af
# det maksimale antal varer, vi har råd... | 32 | 65 | 0.693015 |
03ca520bf17dd46db7322a53f61a6ec4ea0d1c1e | 1,370 | py | Python | lfscheckdigitapi/__init__.py | epg-apg/lfs-checkdigit-api | 17ca1480e76e2d902f7a712b4f5bc1cf419fcb86 | [
"MIT"
] | null | null | null | lfscheckdigitapi/__init__.py | epg-apg/lfs-checkdigit-api | 17ca1480e76e2d902f7a712b4f5bc1cf419fcb86 | [
"MIT"
] | null | null | null | lfscheckdigitapi/__init__.py | epg-apg/lfs-checkdigit-api | 17ca1480e76e2d902f7a712b4f5bc1cf419fcb86 | [
"MIT"
] | null | null | null | import os
import sentry_sdk
from flask import Flask, abort, escape
from sentry_sdk.integrations.flask import FlaskIntegration
from .checkdigit import calculateCheckDigit
sentry_sdk.init(
dsn="https://9dbd1798137d41778fa81ba3203b92a1@o340050.ingest.sentry.io/5942394",
integrations=[FlaskIntegration()],
# S... | 28.541667 | 84 | 0.709489 |
03ca53cb8e8c9108d8196554058244f1d37cefa4 | 11,262 | py | Python | celery/result.py | gthb/celery | 13057dc69a6ecda6aabfae7b7640d971176251fb | [
"BSD-3-Clause"
] | 2 | 2017-05-24T13:03:30.000Z | 2017-09-04T08:24:19.000Z | celery/result.py | gthb/celery | 13057dc69a6ecda6aabfae7b7640d971176251fb | [
"BSD-3-Clause"
] | null | null | null | celery/result.py | gthb/celery | 13057dc69a6ecda6aabfae7b7640d971176251fb | [
"BSD-3-Clause"
] | null | null | null | from __future__ import generators
import time
from copy import copy
from itertools import imap
from celery import states
from celery.backends import default_backend
from celery.datastructures import PositionQueue
from celery.exceptions import TimeoutError
from celery.messaging import with_connection
from celery.util... | 28.803069 | 78 | 0.602202 |
03ca68976f4e9d1112214a6fe4efb4aa5ae3464a | 28,884 | py | Python | wyzecam/iotc.py | mrlt8/wyzecam | 8852bc55e0b134f56ef81097bd416c995dc6a46c | [
"MIT"
] | 3 | 2021-08-07T06:22:23.000Z | 2021-08-24T03:55:39.000Z | wyzecam/iotc.py | mrlt8/wyzecam | 8852bc55e0b134f56ef81097bd416c995dc6a46c | [
"MIT"
] | null | null | null | wyzecam/iotc.py | mrlt8/wyzecam | 8852bc55e0b134f56ef81097bd416c995dc6a46c | [
"MIT"
] | null | null | null | from typing import Any, Dict, Iterator, Optional, Tuple, Union
import enum
import logging
import pathlib
import time
import warnings
from ctypes import CDLL, c_int
from wyzecam.api_models import WyzeAccount, WyzeCamera
try:
import av
import av.video.frame
except ImportError:
av = None
try:
import cv... | 39.405184 | 113 | 0.606876 |
03ca68cdec79cf0e598c9ec929f3686ecfe50843 | 3,584 | py | Python | color_bracket.py | AdamSpannbauer/ncaa_color_bracket | f8827b94a74fda9582d98bfdd7a6941599bb4a09 | [
"MIT"
] | null | null | null | color_bracket.py | AdamSpannbauer/ncaa_color_bracket | f8827b94a74fda9582d98bfdd7a6941599bb4a09 | [
"MIT"
] | null | null | null | color_bracket.py | AdamSpannbauer/ncaa_color_bracket | f8827b94a74fda9582d98bfdd7a6941599bb4a09 | [
"MIT"
] | null | null | null | import pandas as pd
import json
import colorsys
import matplotlib.pyplot as plt
import numpy as np
#read in data
color_data = pd.read_csv('data/school_color_df.csv', index_col=0)
with open("data/bracket.json") as f:
bracket = json.loads(f.read())
def gen_matchups(n):
"""
generate seed pairs for a round
>>> gen_m... | 22.683544 | 80 | 0.610212 |
03ca6f24a76ea05f6a1ccab86935f09e203c6629 | 1,941 | py | Python | critpor.py | FankaRoy/pyrockphy | c29ebc3de25b4526b396fd477fb5dd7064cb0bda | [
"MIT"
] | null | null | null | critpor.py | FankaRoy/pyrockphy | c29ebc3de25b4526b396fd477fb5dd7064cb0bda | [
"MIT"
] | null | null | null | critpor.py | FankaRoy/pyrockphy | c29ebc3de25b4526b396fd477fb5dd7064cb0bda | [
"MIT"
] | 1 | 2020-02-26T18:56:29.000Z | 2020-02-26T18:56:29.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue Dec 11 19:22:45 2018
@author: Fanka, W. Roye T.
Ref: MATLAB code by T. Mukerji;
function [vpcr,vscr,rocr,mcr,kcr,mucr]=critpor(vp1,vs1,ro1,vp2,vs2,ro2,\
phicr)
"""
#import matplotlib.pyplot as plt
import ... | 38.058824 | 80 | 0.453375 |
03ca6fe32f4c5dbf138ea2b303f4f289f5be9ab3 | 5,253 | py | Python | cmdrjump/views.py | zachtib/MagicWithFriends | 18db849fe282903051820b718a2d7b434360e332 | [
"MIT"
] | null | null | null | cmdrjump/views.py | zachtib/MagicWithFriends | 18db849fe282903051820b718a2d7b434360e332 | [
"MIT"
] | 5 | 2021-02-15T20:52:10.000Z | 2021-07-03T18:19:59.000Z | cmdrjump/views.py | zachtib/MagicWithFriends | 18db849fe282903051820b718a2d7b434360e332 | [
"MIT"
] | null | null | null | import random
from django.http import Http404
from django.shortcuts import render, get_object_or_404
from django.urls import reverse
from cards.models import Color
from .deckimporter import colorpair_from_set
from .models import CommanderJumpstartDeck, DualColoredDeck
# Create your views here.
def start(request):
... | 34.788079 | 106 | 0.63202 |
03ca780fab7e34328b124347e5f96ebfcc6bc71b | 11,702 | py | Python | services/traction/acapy_client/model/attach_decorator_data_jws_header.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 12 | 2022-01-29T20:30:03.000Z | 2022-03-29T11:46:14.000Z | services/traction/acapy_client/model/attach_decorator_data_jws_header.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 38 | 2021-11-22T17:52:50.000Z | 2022-03-31T17:52:00.000Z | services/traction/acapy_client/model/attach_decorator_data_jws_header.py | Open-Earth-Foundation/traction | 908b555a7f408a88541b7692d3730e37a297c919 | [
"Apache-2.0"
] | 9 | 2021-11-22T18:05:48.000Z | 2022-03-29T11:25:08.000Z | """
Aries Cloud Agent
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v0.7.2
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from acapy_cli... | 41.349823 | 209 | 0.560502 |
03cae2ed0276e9b7cae84171a6ee1cd109057f7d | 285 | py | Python | src/apps/ideas/urls.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | null | null | null | src/apps/ideas/urls.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | 48 | 2017-04-21T17:35:23.000Z | 2020-08-29T04:19:35.000Z | src/apps/ideas/urls.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import IdeasIndex, IdeaDetail, IdeaAdd
app_name = 'ideas'
urlpatterns = [
path('', IdeasIndex.as_view(), name='index'),
path('add/', IdeaAdd.as_view(), name='add'),
path('detalle/<int:pk>/', IdeaDetail.as_view(), name='detalle')
]
| 28.5 | 67 | 0.673684 |
03cafbf47ccf36697b585ab18568e477916c6d22 | 559 | py | Python | python/dynamic_programming/0062_unique_paths.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 6 | 2019-07-15T13:23:57.000Z | 2020-01-22T03:12:01.000Z | python/dynamic_programming/0062_unique_paths.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | null | null | null | python/dynamic_programming/0062_unique_paths.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 1 | 2019-07-24T02:15:31.000Z | 2019-07-24T02:15:31.000Z | class Solution(object):
def uniquePaths(self, m, n):
"""
:type m: int
:type n: int
:rtype: int
"""
dp = [[0] * m for _ in range(n)]
for i in range(m):
dp[0][i] = 1
for i in range(n):
dp[i][0] = 1
for i in range(1, n):
... | 23.291667 | 54 | 0.423971 |
03cb0edaad23892efefbbd7e1b299ab7ab4865f6 | 83 | py | Python | pyosmo/__init__.py | OPpuolitaival/pyosmo | d95b46bccde44d5d214558ff580da033fd66feaf | [
"MIT"
] | 7 | 2018-08-13T06:01:23.000Z | 2021-12-11T18:18:14.000Z | pyosmo/__init__.py | OPpuolitaival/pyosmo | d95b46bccde44d5d214558ff580da033fd66feaf | [
"MIT"
] | 4 | 2018-07-18T05:14:05.000Z | 2021-12-11T18:17:47.000Z | pyosmo/__init__.py | OPpuolitaival/pyosmo | d95b46bccde44d5d214558ff580da033fd66feaf | [
"MIT"
] | 4 | 2018-03-19T11:24:00.000Z | 2021-12-11T18:16:15.000Z | from .decorators import weight
from .model import OsmoModel
from .osmo import Osmo
| 20.75 | 30 | 0.819277 |
03cb15c8422136271f58d256a18eacb5b644912c | 872 | py | Python | src/settings.py | zyphrus/fetcherd-py | 556e2ef117c70323370eba976fc236d48bcbafe6 | [
"MIT"
] | null | null | null | src/settings.py | zyphrus/fetcherd-py | 556e2ef117c70323370eba976fc236d48bcbafe6 | [
"MIT"
] | null | null | null | src/settings.py | zyphrus/fetcherd-py | 556e2ef117c70323370eba976fc236d48bcbafe6 | [
"MIT"
] | null | null | null | import json
import logging
import os
import shutil
from fetcherd.util import get_data, get_config_home
class Settings(object):
"""Collection of settings"""
def __init__(self, path):
"""path is a string to the file to be loaded as settings"""
# if no path is given try default
if not ... | 25.647059 | 78 | 0.62156 |
03cb19a68f9712928d577b38b42c88fcf7dba222 | 127 | py | Python | contrib/diggext/drivers/locations/racks/apcrack.py | thekad/clusto | c141ea3ef4931c6a21fdf42845c6e9de5ee08caa | [
"BSD-3-Clause"
] | 216 | 2015-01-10T17:03:25.000Z | 2022-03-24T07:23:41.000Z | contrib/diggext/drivers/locations/racks/apcrack.py | thekad/clusto | c141ea3ef4931c6a21fdf42845c6e9de5ee08caa | [
"BSD-3-Clause"
] | 23 | 2015-01-08T16:51:22.000Z | 2021-03-13T12:56:04.000Z | contrib/diggext/drivers/locations/racks/apcrack.py | thekad/clusto | c141ea3ef4931c6a21fdf42845c6e9de5ee08caa | [
"BSD-3-Clause"
] | 49 | 2015-01-08T00:13:17.000Z | 2021-09-22T02:01:20.000Z |
from clusto.drivers.locations.racks.basicrack import BasicRack
class APCRack(BasicRack):
_driver_name = "apcrack"
| 14.111111 | 62 | 0.748031 |
03cb2713e07b32d3f8a42a491aa90b198ee4c374 | 388 | py | Python | config_bayesian.py | Neronjust2017/BayesianCNN | 33fc227b3ec2ff9cde816403db6aa4ae68d586e2 | [
"MIT"
] | 2 | 2020-07-07T12:29:07.000Z | 2021-04-12T12:49:40.000Z | config_bayesian.py | Neronjust2017/BayesianCNN | 33fc227b3ec2ff9cde816403db6aa4ae68d586e2 | [
"MIT"
] | 1 | 2021-05-18T13:12:18.000Z | 2021-05-18T13:12:18.000Z | config_bayesian.py | Neronjust2017/BayesianCNN | 33fc227b3ec2ff9cde816403db6aa4ae68d586e2 | [
"MIT"
] | 3 | 2020-05-29T08:05:51.000Z | 2021-05-26T13:19:36.000Z | ############### Configuration file for Bayesian ###############
n_epochs = 100
lr_start = 0.001
num_workers = 0
valid_size = 0.2
batch_size = 500
train_ens = 1
valid_ens = 1
test_ens = 1
record_mean_var = False
recording_freq_per_epoch = 5 # 32
record_layers = ['fc3']
# Cross-module global variables
mean_var_dir ... | 19.4 | 63 | 0.698454 |
03cb395fd673104be98e5ebd672add9225ec26b6 | 3,500 | py | Python | oscar/lib/python2.7/site-packages/PIL/BdfFontFile.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/BdfFontFile.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/PIL/BdfFontFile.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | #
# The Python Imaging Library
# $Id$
#
# bitmap distribution font (bdf) file parser
#
# history:
# 1996-05-16 fl created (as bdf2pil)
# 1997-08-25 fl converted to FontFile driver
# 2001-05-25 fl removed bogus __init__ call
# 2002-11-20 fl robustification (from Kevin Cazabon, Dmitry Vasiliev)
# 2003-... | 26.119403 | 72 | 0.480571 |
03cb9060d035c130a97368421d30aa54fe09fb63 | 14,348 | py | Python | sdk/python/pulumi_azure/databricks/_inputs.py | pulumi/pulumi-azure | c62b6c1828de1facfd0d92425b72e22e229b0afc | [
"ECL-2.0",
"Apache-2.0"
] | 109 | 2018-06-18T00:19:44.000Z | 2022-02-20T05:32:57.000Z | sdk/python/pulumi_azure/databricks/_inputs.py | pulumi/pulumi-azure | c62b6c1828de1facfd0d92425b72e22e229b0afc | [
"ECL-2.0",
"Apache-2.0"
] | 663 | 2018-06-18T21:08:46.000Z | 2022-03-31T20:10:11.000Z | sdk/python/pulumi_azure/databricks/_inputs.py | pulumi/pulumi-azure | c62b6c1828de1facfd0d92425b72e22e229b0afc | [
"ECL-2.0",
"Apache-2.0"
] | 41 | 2018-07-19T22:37:38.000Z | 2022-03-14T10:56:26.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from .. import... | 53.93985 | 321 | 0.714106 |
03cb9f93e416ef0e1edcea0187d82444764afea3 | 17,428 | py | Python | Eye-Tracking-System/farzad/SIGBTools.py | tonybeltramelli/Graphics-And-Vision | a1dbeada8e907b119ecce1fe421ae91e64ff3371 | [
"Apache-2.0"
] | 12 | 2017-05-26T12:04:38.000Z | 2021-07-11T04:42:19.000Z | Eye-Tracking-System/farzad/SIGBTools.py | tonybeltramelli/Graphics-And-Vision | a1dbeada8e907b119ecce1fe421ae91e64ff3371 | [
"Apache-2.0"
] | null | null | null | Eye-Tracking-System/farzad/SIGBTools.py | tonybeltramelli/Graphics-And-Vision | a1dbeada8e907b119ecce1fe421ae91e64ff3371 | [
"Apache-2.0"
] | 4 | 2017-05-09T08:26:44.000Z | 2018-04-23T03:16:01.000Z | import cv2;
import cv2
import numpy as np
import pylab
from pylab import *
import matplotlib as mpl
import math
''' This module contains sets of functions useful for basic image analysis and should be useful in the SIGB course.
Written and Assembled (2012,2013) by Dan Witzner Hansen, IT University.
'''
def getCircl... | 35.567347 | 162 | 0.568855 |
03cba862cf7ae32eea1017bf390922334ad6f6a1 | 3,317 | py | Python | nicos_pnpi/nero/setups/virtual-monochromator.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 12 | 2019-11-06T15:40:36.000Z | 2022-01-01T16:23:00.000Z | nicos_pnpi/nero/setups/virtual-monochromator.py | ess-dmsc/nicos | 755d61d403ff7123f804c45fc80c7ff4d762993b | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 91 | 2020-08-18T09:20:26.000Z | 2022-02-01T11:07:14.000Z | nicos_pnpi/nero/setups/virtual-monochromator.py | mlz-ictrl/nicos | a6de0bc194ba42e3dc04a033713b41b5499ba8e1 | [
"CC-BY-3.0",
"Apache-2.0",
"CC-BY-4.0"
] | 6 | 2020-01-11T10:52:30.000Z | 2022-02-25T12:35:23.000Z | description = 'Virtual monochromator'
excludes = ['monochromator']
x_conf = configdata('localconfig.X_CONF')
y_conf = configdata('localconfig.Y_CONF')
chi1_conf = configdata('localconfig.CHI1_CONF')
chi2_conf = configdata('localconfig.CHI2_CONF')
chi3_conf = configdata('localconfig.CHI3_CONF')
chi4_conf = configdata... | 38.126437 | 59 | 0.516431 |
03cbb7a9039e4582fb172babaa793b13094515c8 | 4,322 | py | Python | python/example/print_cantilever_3d.py | srl-ethz/diffPD_sim2real | e491668995a163b8ff7542d99f0b4e0c0f4ed2df | [
"MIT"
] | 4 | 2022-02-10T02:28:42.000Z | 2022-02-10T07:28:35.000Z | python/example/print_cantilever_3d.py | srl-ethz/diffPD_sim2real | e491668995a163b8ff7542d99f0b4e0c0f4ed2df | [
"MIT"
] | null | null | null | python/example/print_cantilever_3d.py | srl-ethz/diffPD_sim2real | e491668995a163b8ff7542d99f0b4e0c0f4ed2df | [
"MIT"
] | null | null | null | import sys
sys.path.append('../')
from pathlib import Path
import pickle
import matplotlib.pyplot as plt
from matplotlib.ticker import ScalarFormatter
import numpy as np
from py_diff_pd.common.common import print_info
if __name__ == '__main__':
folder = Path('cantilever_3d')
for thread_ct in [2, 4, 8]:
... | 46.978261 | 163 | 0.591393 |
03cbb8e548e011160e9d69d64fee9f2a2e20e9ad | 35,331 | py | Python | bbopt/optimizer.py | vishalbelsare/bbopt | 408e210e57b7a2aaf3cfd3a3c225fc2af6b3c56d | [
"Apache-2.0"
] | 67 | 2017-09-19T21:23:56.000Z | 2022-03-30T14:13:06.000Z | bbopt/optimizer.py | vishalbelsare/bbopt | 408e210e57b7a2aaf3cfd3a3c225fc2af6b3c56d | [
"Apache-2.0"
] | 16 | 2018-03-01T19:50:46.000Z | 2022-01-22T02:04:53.000Z | bbopt/optimizer.py | vishalbelsare/bbopt | 408e210e57b7a2aaf3cfd3a3c225fc2af6b3c56d | [
"Apache-2.0"
] | 8 | 2019-01-04T17:12:35.000Z | 2021-09-17T14:11:42.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# __coconut_hash__ = 0x3af381c
# Compiled with Coconut version 2.0.0-a_dev9 [How Not to Be Seen]
"""
The main BBopt interface.
"""
# Coconut Header: -------------------------------------------------------------
from __future__ import print_function, absolute_import, uni... | 49.691983 | 913 | 0.682121 |
03cbcdf930e3e2287fa280548f631f4976becc2f | 6,646 | py | Python | generate_classes.py | Adirio/obs-websocket-py | 56fd49e5aefaf3f7a560a9d8f286e0fb480f4a99 | [
"MIT"
] | null | null | null | generate_classes.py | Adirio/obs-websocket-py | 56fd49e5aefaf3f7a560a9d8f286e0fb480f4a99 | [
"MIT"
] | 10 | 2019-09-11T07:59:42.000Z | 2019-09-12T06:30:43.000Z | generate_classes.py | Adirio/obs-websocket-py | 56fd49e5aefaf3f7a560a9d8f286e0fb480f4a99 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from datetime import datetime
import json
from re import compile
from six.moves.urllib.request import urlopen
github_user = 'Palakis'
github_repo = 'obs-websocket'
github_branch = '4.x-current'
github_path = 'docs/generated/comments.json'
caps = compile('(?<![A-Z])([A-Z]... | 44.306667 | 79 | 0.369696 |
03cbe5595f425dcfa2a9a0f81a33b73560b54fe0 | 1,130 | py | Python | Kerning/compareKernGroups.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | 2 | 2021-02-12T20:36:29.000Z | 2021-11-03T08:04:01.000Z | Kerning/compareKernGroups.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | null | null | null | Kerning/compareKernGroups.py | protimient/Glyphs-Scripts | 0481ea01153844667cff8cfa3fad97c33af09956 | [
"Apache-2.0"
] | null | null | null | # MenuTitle: Compare Kerning Groups Font to Font
# -*- coding: utf-8 -*-
__doc__ = """
Colours glyphs in font view according to their differences.
"""
import os
Glyphs.clearLog()
if len(Glyphs.fonts) == 2:
f1 = Glyphs.font
f2 = Glyphs.fonts[abs(Glyphs.fonts.index(f1) - 1)]
for g in f1.glyphs:
if ... | 25.681818 | 101 | 0.563717 |
03cc2c07d9a7d44df6e0eb51b67b07f0ef504ecf | 1,520 | py | Python | stanCode_Projects/hangman_game/similarity.py | JohnsonWang0319/MystanCodeProjects | 9a961761b91ef145847405b0b8c1e958c44e7347 | [
"MIT"
] | null | null | null | stanCode_Projects/hangman_game/similarity.py | JohnsonWang0319/MystanCodeProjects | 9a961761b91ef145847405b0b8c1e958c44e7347 | [
"MIT"
] | null | null | null | stanCode_Projects/hangman_game/similarity.py | JohnsonWang0319/MystanCodeProjects | 9a961761b91ef145847405b0b8c1e958c44e7347 | [
"MIT"
] | null | null | null | """
File: similarity.py
Name: JOHNSON
----------------------------
This program compares short dna sequence, s2,
with sub sequences of a long dna sequence, s1
The way of approaching this task is the same as
what people are doing in the bio industry.
"""
def main():
dna = input('Please give me a DNA sequence to se... | 29.230769 | 99 | 0.5875 |
03cc37c03d53bb43d3f767400cbb7d73e5c8b509 | 9,956 | py | Python | tests/unit/states/service_test.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2018-09-19T22:42:54.000Z | 2018-09-19T22:42:54.000Z | tests/unit/states/service_test.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | null | null | null | tests/unit/states/service_test.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2019-07-23T13:42:23.000Z | 2019-07-23T13:42:23.000Z | # -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Rahul Handay <rahulha@saltstack.com>`
'''
# Import Python Libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import TestCase, skipIf
from salttesting.helpers import ensure_in_syspath
from salttesting.mock import (
MagicMock,... | 45.254545 | 115 | 0.516975 |
03cc3e0531aa193f18ca66941e55db45ab529ba9 | 41,837 | py | Python | core/argo/core/TFDeepLearningModel.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | null | null | null | core/argo/core/TFDeepLearningModel.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | null | null | null | core/argo/core/TFDeepLearningModel.py | szokejokepu/natural-rws | bb1ad4ca3ec714e6bf071d2136593dc853492b68 | [
"MIT"
] | null | null | null | import os
from abc import abstractmethod
from itertools import chain
import numpy as np
import tensorflow as tf
from datasets.Dataset import Dataset, TRAIN_LOOP
from .ArgoLauncher import ArgoLauncher
from .DeepLearningModel import DeepLearningModel
from .Regularizers import Regularizers
from .argoLogging import get_l... | 41.463826 | 205 | 0.611899 |
03cc68508630ea931ee63e393647f0a5d6d3bdc0 | 2,482 | py | Python | libra_client/lbrtypes/account_config/resources/currency_info.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | libra_client/lbrtypes/account_config/resources/currency_info.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | null | null | null | libra_client/lbrtypes/account_config/resources/currency_info.py | violas-core/violas-client | e8798f7d081ac218b78b81fd7eb2f8da92631a16 | [
"MIT"
] | 1 | 2022-01-05T06:49:42.000Z | 2022-01-05T06:49:42.000Z | from libra_client.canoser import Struct, Uint64, Uint128
from libra_client.move_core_types.move_resource import MoveResource
from libra_client.move_core_types.language_storage import StructTag, CORE_CODE_ADDRESS, ResourceKey
from libra_client.lbrtypes.access_path import AccessPath
from libra_client.move_core_types.iden... | 35.971014 | 115 | 0.724416 |
03cc74a222e600f2e07c9980b86bb31271663e7d | 634 | py | Python | tests/python/multi-node/dist_sync_inception.py | danielpinero/prueba | 4aa1b8d2d4c7a4abf8e4d604fb2ceab78b3dbe1d | [
"Apache-2.0"
] | null | null | null | tests/python/multi-node/dist_sync_inception.py | danielpinero/prueba | 4aa1b8d2d4c7a4abf8e4d604fb2ceab78b3dbe1d | [
"Apache-2.0"
] | null | null | null | tests/python/multi-node/dist_sync_inception.py | danielpinero/prueba | 4aa1b8d2d4c7a4abf8e4d604fb2ceab78b3dbe1d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# pylint: skip-file
import mxnet as mx
import common
import logging
mx.random.seed(0)
logging.basicConfig(level=logging.DEBUG)
kv = mx.kvstore.create('dist_sync')
# feed each machine the whole data
(train, val) = common.cifar10(batch_size = 128, input_shape=(3,28,28))
model = mx.model.FeedForw... | 23.481481 | 70 | 0.616719 |
03cc74a5d83f7f0ac4bb2d173c1888c412ee9a27 | 2,352 | py | Python | scripts/structToTrueLines.py | truwl/variantbenchmarking | 97800c5bd29119cf1f8983eea72fbfc54ac2e9c0 | [
"MIT"
] | null | null | null | scripts/structToTrueLines.py | truwl/variantbenchmarking | 97800c5bd29119cf1f8983eea72fbfc54ac2e9c0 | [
"MIT"
] | null | null | null | scripts/structToTrueLines.py | truwl/variantbenchmarking | 97800c5bd29119cf1f8983eea72fbfc54ac2e9c0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
import json
import os
import argparse
# Usage: python structToTrueLines.py "{region_GRCh38_notinrefseq_cds: false, region_GRCh38_refseq_cds: true, region_GRCh38_HG001_PG2016_10_comphetindel10bp_slop50: true}" gs://truwl-giab/genome-stratifications/v2.0/GRCh38/GenomeSpecific lines
... | 45.230769 | 242 | 0.723214 |
03cc954fa96965c49a72870c225f71ff25acb5d5 | 813 | py | Python | tests/func/test_get.py | 0LL13/person | 3b9d43c7b5c1452fd6d28ad50f1831dfb4c4fa62 | [
"MIT"
] | null | null | null | tests/func/test_get.py | 0LL13/person | 3b9d43c7b5c1452fd6d28ad50f1831dfb4c4fa62 | [
"MIT"
] | 12 | 2020-09-09T07:33:38.000Z | 2020-10-01T03:28:44.000Z | tests/func/test_get.py | 0LL13/person | 3b9d43c7b5c1452fd6d28ad50f1831dfb4c4fa62 | [
"MIT"
] | 2 | 2020-09-01T07:49:38.000Z | 2020-09-12T07:50:27.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# test_get.py
"""Tests the get function of mop_tinyDB."""
from context import mop_role
new_mop = mop_role.MoP("17", "NRW", "Grüne", "Gudrun B.", "Heinz")
def test_get_returns_valid_mop(db_with_3_mops, three_mops_fixture):
"""Test mop_db.get_mop(<valid mop_id>) should... | 26.225806 | 74 | 0.674047 |
03ccae3cee5420744955b6c8e85dcc7c07514eac | 3,955 | py | Python | alipay/aop/api/request/AlipayUserInviteRtaConsultRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/request/AlipayUserInviteRtaConsultRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/request/AlipayUserInviteRtaConsultRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayUserInviteRtaConsultModel import AlipayUserInviteRtaConsultModel
class AlipayUserInviteRtaConsultRequest(object):
def __i... | 27.275862 | 148 | 0.643236 |
03ccb3ef736cf8a6b88a03cd84109cc834c29de2 | 2,066 | py | Python | afc_and_instproxy_upgrade_ipa.py | upbit/python-imobiledevice_demo | 3c6d842bd9baa3b227948345a3baf08375e810b0 | [
"Unlicense"
] | 38 | 2015-01-05T00:46:34.000Z | 2021-09-24T08:51:00.000Z | afc_and_instproxy_upgrade_ipa.py | upbit/python-imobiledevice_demo | 3c6d842bd9baa3b227948345a3baf08375e810b0 | [
"Unlicense"
] | 2 | 2015-11-02T04:56:37.000Z | 2020-12-18T02:12:53.000Z | afc_and_instproxy_upgrade_ipa.py | upbit/python-imobiledevice_demo | 3c6d842bd9baa3b227948345a3baf08375e810b0 | [
"Unlicense"
] | 22 | 2015-01-01T10:50:18.000Z | 2022-03-14T08:28:41.000Z | #!/usr/bin/env python
import plist
from imobiledevice import *
def lockdown_get_service_client(service_class):
ld = LockdownClient(iDevice())
return ld.get_service_client(service_class)
def afc_upload_file(filename, local_stream, path="/"):
afc = lockdown_get_service_client(AfcClient)
try:
afc.get_file_info(p... | 23.747126 | 90 | 0.741045 |
03cce7d0749b311e57575e24eaeb350a23df59dd | 5,973 | py | Python | Node/files/node.py | BPChain/private-quorum | 3ec6ae8a08f3bc1a6191bb3d0b3d15356ece4622 | [
"MIT"
] | 2 | 2018-06-06T09:15:41.000Z | 2018-06-06T14:33:07.000Z | Node/files/node.py | BPChain/private-quorum | 3ec6ae8a08f3bc1a6191bb3d0b3d15356ece4622 | [
"MIT"
] | 2 | 2021-05-28T23:55:22.000Z | 2021-06-01T22:20:09.000Z | Node/files/node.py | BPChain/private-quorum | 3ec6ae8a08f3bc1a6191bb3d0b3d15356ece4622 | [
"MIT"
] | null | null | null | """ I read values from my local blockchain node by using the Web3 Library which uses the nodes
RPC-API.
Make sure the required apis are unlocked in geth. I send the values I read to a server in a
specified interval via a secure websocket. This can be configured in the config.yml.
Important variable is S... | 35.766467 | 107 | 0.708354 |
03cd092e723f6fa1aeb863dc5f97514fe46ee8bf | 12,604 | py | Python | clients/keto/python/ory_keto_client/rest.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/keto/python/ory_keto_client/rest.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | clients/keto/python/ory_keto_client/rest.py | kolotaev/sdk | 0dda1becd70be8d7b9d678321ebe780c1ba00485 | [
"Apache-2.0"
] | null | null | null | """
ORY Keto
Ory Keto is a cloud native access control server providing best-practice patterns (RBAC, ABAC, ACL, AWS IAM Policies, Kubernetes Roles, ...) via REST APIs. # noqa: E501
The version of the OpenAPI document: v0.6.0-alpha.6
Contact: hi@ory.sh
Generated by: https://openapi-generator.tech... | 42.870748 | 173 | 0.545938 |
03cd2741bb7849437d192237109762f65025906c | 82,475 | py | Python | tests/unit/gapic/compute_v1/test_ssl_certificates.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_ssl_certificates.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/compute_v1/test_ssl_certificates.py | LaudateCorpus1/python-compute | a36c637f153c7b4ef49bb6a78c8b09f3746e7af1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 38.684334 | 118 | 0.684013 |
03cd298463dc5f8f3cf6976037b6d4c0a3f453ef | 2,259 | py | Python | JumpScale9AYS/jobcontroller/models/ActionModel.py | Jumpscale/ays9 | 63bd414ff06372ba885c55eec528f427e63bcbe1 | [
"Apache-2.0"
] | 4 | 2017-06-07T08:10:06.000Z | 2017-11-10T02:20:38.000Z | JumpScale9AYS/jobcontroller/models/ActionModel.py | Jumpscale/ays9 | 63bd414ff06372ba885c55eec528f427e63bcbe1 | [
"Apache-2.0"
] | 242 | 2017-05-18T10:51:48.000Z | 2019-09-18T15:09:47.000Z | JumpScale9AYS/jobcontroller/models/ActionModel.py | Jumpscale/ays9 | 63bd414ff06372ba885c55eec528f427e63bcbe1 | [
"Apache-2.0"
] | 5 | 2017-06-16T15:43:25.000Z | 2017-09-29T12:48:06.000Z | from js9 import j
from JumpScale9Lib.data.capnp.ModelBase import ModelBase
class ActionModel(ModelBase):
"""
object which has info required to execute a method (an action)
"""
@property
def imports(self):
return ""
@property
def code(self):
return self.dbobj.code
@co... | 26.576471 | 116 | 0.555556 |
03cd95d0d35f402d0eec448cd82813fb6dfd4b46 | 2,468 | py | Python | msticpy/datamodel/entities/dns.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | null | null | null | msticpy/datamodel/entities/dns.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | null | null | null | msticpy/datamodel/entities/dns.py | GiuseppeLaurenza/msticpy | 37f96126b1e7ed06d3d140e340cdf86d6eee440b | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""Dns Ent... | 30.469136 | 77 | 0.59684 |
03cd9ed546298f40f809917991f88af2e9d1655c | 2,231 | py | Python | ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/params.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 5 | 2018-06-03T05:19:40.000Z | 2021-04-16T17:10:49.000Z | ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/params.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | null | null | null | ambari-server/src/main/resources/stacks/HDP/2.0.6/services/PIG/package/scripts/params.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 6 | 2019-05-07T13:24:39.000Z | 2021-02-15T14:12:37.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 use this ... | 41.314815 | 125 | 0.759749 |
03cdf59cd8209c74031cda0714bbd7feeb41a80b | 3,592 | py | Python | englishWebDictionary/startmodule.py | Darkclainer/englishWordManager | 3f6ac47fa0b7c1e383465c5724cb58b50b504f56 | [
"MIT"
] | null | null | null | englishWebDictionary/startmodule.py | Darkclainer/englishWordManager | 3f6ac47fa0b7c1e383465c5724cb58b50b504f56 | [
"MIT"
] | null | null | null | englishWebDictionary/startmodule.py | Darkclainer/englishWordManager | 3f6ac47fa0b7c1e383465c5724cb58b50b504f56 | [
"MIT"
] | null | null | null | """This module defines function 'start' that is called on triggering action in anki menu."""
import aqt
from .config import getConfig, setConfig
from . import templates
from .ankiinterface import AnkiInterface, NoModel
from .mainwindow import MainWindow
def start():
"""Get config, AnkiInterface and create MainWind... | 32.954128 | 92 | 0.663976 |
03ce09ef299bd766a6d02f70b34b9b73eab82ce6 | 2,244 | py | Python | docs/source/conf.py | blairdrummond/flask-s3-viewer | e8ce36d4456da49c0b5642da3088d016e780ef83 | [
"MIT"
] | null | null | null | docs/source/conf.py | blairdrummond/flask-s3-viewer | e8ce36d4456da49c0b5642da3088d016e780ef83 | [
"MIT"
] | null | null | null | docs/source/conf.py | blairdrummond/flask-s3-viewer | e8ce36d4456da49c0b5642da3088d016e780ef83 | [
"MIT"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 31.166667 | 79 | 0.654635 |
03ce0c9cde1f0858bad961e946105495f0bc79b0 | 2,980 | py | Python | doc/conf.py | WarrenWeckesser/mpsci | 675f0f3b76700529558a3bae2a1b2ca09552233b | [
"BSD-2-Clause"
] | 7 | 2019-03-27T17:25:41.000Z | 2022-03-31T03:55:29.000Z | doc/conf.py | WarrenWeckesser/mpsci | 675f0f3b76700529558a3bae2a1b2ca09552233b | [
"BSD-2-Clause"
] | 2 | 2019-05-09T16:09:45.000Z | 2021-01-04T03:55:09.000Z | doc/conf.py | WarrenWeckesser/mpsci | 675f0f3b76700529558a3bae2a1b2ca09552233b | [
"BSD-2-Clause"
] | null | null | null | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup --------------------------------------------------------------
# If extensions (or module... | 29.50495 | 79 | 0.633221 |
03ce13804d733bba22f15ec7bedfd8ff3e91f61b | 2,871 | py | Python | lib/surface/compute/__init__.py | ianel20/google-cloud-sdk | 36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3 | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/__init__.py | ianel20/google-cloud-sdk | 36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3 | [
"Apache-2.0"
] | null | null | null | lib/surface/compute/__init__.py | ianel20/google-cloud-sdk | 36ed4e06ba3961d0a8fbf30a3eaabf7db6d4e9c3 | [
"Apache-2.0"
] | 1 | 2020-07-25T12:23:41.000Z | 2020-07-25T12:23:41.000Z | # Copyright 2014 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... | 31.206522 | 75 | 0.722048 |
03ce25946e543764fce40f9c06c8d9a5bc9d5dc8 | 4,842 | py | Python | tacotron/models/multihead_attention.py | ankye/Tacotron-2 | e0cd46ece5d96948d684f29a224d9b7154976752 | [
"MIT"
] | 5 | 2019-04-11T02:45:04.000Z | 2019-05-22T11:58:15.000Z | tacotron/models/multihead_attention.py | ankye/Tacotron-2 | e0cd46ece5d96948d684f29a224d9b7154976752 | [
"MIT"
] | 1 | 2019-12-30T08:23:36.000Z | 2020-02-22T02:15:31.000Z | tacotron/models/multihead_attention.py | ankye/Tacotron-2 | e0cd46ece5d96948d684f29a224d9b7154976752 | [
"MIT"
] | 4 | 2019-05-29T14:29:46.000Z | 2020-02-21T13:16:57.000Z | import tensorflow as tf
import numpy as np
import math
from tacotron.utils.ops import shape_list
class MultiheadAttention():
'''Computes the multi-head attention as described in
https://arxiv.org/abs/1706.03762.
Args:
num_heads: The number of attention heads.
query: The sequence of queries. A tensor of s... | 37.246154 | 121 | 0.64209 |
03ce2fd0e5fa3d89e67841866805700c36e5b447 | 22,154 | py | Python | sleepy/menus.py | HitSyr/Sleepy | 70ec9479fb947a624e3c658ea39c886c30bf794d | [
"MIT"
] | 4 | 2021-12-08T21:38:14.000Z | 2022-01-30T04:16:38.000Z | sleepy/menus.py | HitSyr/Sleepy | 70ec9479fb947a624e3c658ea39c886c30bf794d | [
"MIT"
] | 2 | 2021-09-29T13:33:26.000Z | 2021-12-12T12:52:16.000Z | sleepy/menus.py | HitSyr/Sleepy | 70ec9479fb947a624e3c658ea39c886c30bf794d | [
"MIT"
] | null | null | null | """
Copyright (c) 2018-present HitchedSyringe
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
"""
from __future__ import annotations
__all__ = (
"BaseView",
"Bot... | 30.431319 | 98 | 0.611086 |
03ce3a75b3677c668b1fe804b0015b8caf5a6c09 | 1,896 | py | Python | cogbot/cogs/robo_mod/conditions/message_contains_external_media.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 8 | 2016-12-26T14:10:38.000Z | 2021-01-02T03:50:05.000Z | cogbot/cogs/robo_mod/conditions/message_contains_external_media.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 28 | 2016-12-12T04:06:53.000Z | 2020-04-23T06:18:55.000Z | cogbot/cogs/robo_mod/conditions/message_contains_external_media.py | Arcensoth/cogbot | ef9d935ae8c8fbe00fb9370c75e0e6d9189141d0 | [
"MIT"
] | 9 | 2017-06-03T00:33:57.000Z | 2020-10-29T18:16:02.000Z | from cogbot.cogs.robo_mod.robo_mod_condition import RoboModCondition
from cogbot.cogs.robo_mod.robo_mod_trigger import RoboModTrigger
from discord import Message
class MessageContainsExternalMediaCondition(RoboModCondition):
def __init__(self):
self.ignore_links: bool = False
self.ignore_embeds: b... | 42.133333 | 93 | 0.728903 |
03ce3a7d629e9377331f3527d681c955906ba255 | 7,584 | py | Python | algopy/globalfuncs.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 54 | 2015-03-05T13:38:08.000Z | 2021-11-29T11:54:48.000Z | algopy/globalfuncs.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 7 | 2016-04-06T11:25:00.000Z | 2020-11-09T13:53:20.000Z | algopy/globalfuncs.py | arthus701/algopy | 1e2430f803289bbaed6bbdff6c28f98d7767835c | [
"Unlicense"
] | 13 | 2015-01-17T17:05:56.000Z | 2021-08-05T01:13:16.000Z | import math
import numpy
import string
from . import utils
from algopy import UTPM
from algopy import Function
# override numpy definitions
numpy_function_names = [
'exp', 'expm1', 'log', 'log1p', 'sqrt', 'pow',
'sin', 'cos', 'tan',
'arcsin', 'arccos', 'arctan',
'sinh', 'cosh', 'tanh',... | 24.543689 | 78 | 0.626714 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.