hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
424c4cb5ef573a261b8c06538da73fe2cb6674e4 | 2,398 | py | Python | var/spack/repos/builtin/packages/py-pyfr/package.py | loumalouomega/spack | b5fa1b2a78d94e6d057534e25d4d8ab9b31eda1e | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-pyfr/package.py | loumalouomega/spack | b5fa1b2a78d94e6d057534e25d4d8ab9b31eda1e | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-pyfr/package.py | loumalouomega/spack | b5fa1b2a78d94e6d057534e25d4d8ab9b31eda1e | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyPyfr(PythonPackage):
"""PyFR is an open-source Python based framework for solving
a... | 40.644068 | 94 | 0.665972 |
7e421f5fcd6fa350e551997089fa97cff36589dc | 129 | py | Python | kaa/filetype/python/__init__.py | atsuoishimoto/kaaedit | 5233fdb70a04783c6513a5ec339452450e62e995 | [
"Unlicense"
] | 1 | 2015-11-04T13:37:08.000Z | 2015-11-04T13:37:08.000Z | kaa/filetype/python/__init__.py | atsuoishimoto/kaaedit | 5233fdb70a04783c6513a5ec339452450e62e995 | [
"Unlicense"
] | null | null | null | kaa/filetype/python/__init__.py | atsuoishimoto/kaaedit | 5233fdb70a04783c6513a5ec339452450e62e995 | [
"Unlicense"
] | null | null | null | FILE_EXT = {'.py', '.pyw'}
def get_modetype():
from kaa.filetype.python.pythonmode import PythonMode
return PythonMode
| 18.428571 | 57 | 0.705426 |
1f406f471c0bd4e577fd6dcff8c7911aefb2b9c7 | 15,237 | py | Python | orttraining/orttraining/python/training/postprocess.py | dennyac/onnxruntime | d5175795d2b7f2db18b0390f394a49238f814668 | [
"MIT"
] | 6,036 | 2019-05-07T06:03:57.000Z | 2022-03-31T17:59:54.000Z | orttraining/orttraining/python/training/postprocess.py | dennyac/onnxruntime | d5175795d2b7f2db18b0390f394a49238f814668 | [
"MIT"
] | 5,730 | 2019-05-06T23:04:55.000Z | 2022-03-31T23:55:56.000Z | orttraining/orttraining/python/training/postprocess.py | dennyac/onnxruntime | d5175795d2b7f2db18b0390f394a49238f814668 | [
"MIT"
] | 1,566 | 2019-05-07T01:30:07.000Z | 2022-03-31T17:06:50.000Z | import sys
import os.path
from onnx import *
import onnx
import numpy as np
import struct
from onnx import helper
from onnx import numpy_helper
def run_postprocess(model):
# this post pass is not required for pytorch >= 1.5
# where add_node_name in torch.onnx.export is default to True
model = add_name(mo... | 33.341357 | 145 | 0.537442 |
2b6411d8cadcdd18cd8d915bf430709cc768ef5b | 5,738 | py | Python | quickDDM/processingCore.py | CSymes/quickDDM | 4c55cbc62f36020ec90c69cd9440b12bc6b4a6a5 | [
"MIT"
] | 4 | 2019-03-20T22:10:57.000Z | 2021-06-07T21:15:53.000Z | quickDDM/processingCore.py | CSymes/quickDDM | 4c55cbc62f36020ec90c69cd9440b12bc6b4a6a5 | [
"MIT"
] | 3 | 2021-03-19T00:54:02.000Z | 2021-09-08T01:01:13.000Z | quickDDM/processingCore.py | CSymes/quickDDM | 4c55cbc62f36020ec90c69cd9440b12bc6b4a6a5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#processingCore.py
"""
Created on Tue Mar 26 14:26:28 2019
This is the most basic way of running the process. It will call each part
of the process in turn, chaining them together.
@author: Lionel
"""
import sys
import numpy as np
import quickDDM.readVideo as rV
import qu... | 40.408451 | 108 | 0.672011 |
ae5d87c3eef2018dbaf36c08aeef9f756ae2be15 | 627 | py | Python | src/client/python/env.py | jenny0322/food-safety-sample | de630e373480c25fdcd5b52f6358468ae2821bd5 | [
"MIT"
] | 8 | 2019-10-21T19:37:45.000Z | 2022-03-07T17:41:53.000Z | src/client/python/env.py | jenny0322/food-safety-sample | de630e373480c25fdcd5b52f6358468ae2821bd5 | [
"MIT"
] | 6 | 2019-11-14T21:28:47.000Z | 2022-01-22T12:36:06.000Z | src/client/python/env.py | jenny0322/food-safety-sample | de630e373480c25fdcd5b52f6358468ae2821bd5 | [
"MIT"
] | 5 | 2019-11-06T20:04:09.000Z | 2021-12-13T16:40:06.000Z | import os
import pprint
import platform
import yaml
def main():
z = add(4, 5)
print("The result of add is %s" %z)
with open("config.yml", 'r') as ymlfile:
cfg = yaml.load(ymlfile)
for section in cfg:
print(section)
print(cfg['iothub'])
print(cfg['other'])
... | 19.59375 | 68 | 0.575758 |
9e67023234210f9c4fd37b2068c636424c2ad646 | 23,006 | py | Python | smriprep/workflows/surfaces.py | Zeigar/smriprep | bf1086b69f2b672d165f2c0741f2e4bd9a6dcf1d | [
"Apache-2.0"
] | 1 | 2020-09-18T23:45:51.000Z | 2020-09-18T23:45:51.000Z | smriprep/workflows/surfaces.py | Zeigar/smriprep | bf1086b69f2b672d165f2c0741f2e4bd9a6dcf1d | [
"Apache-2.0"
] | null | null | null | smriprep/workflows/surfaces.py | Zeigar/smriprep | bf1086b69f2b672d165f2c0741f2e4bd9a6dcf1d | [
"Apache-2.0"
] | null | null | null | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Surface preprocessing workflows.
**sMRIPrep** uses FreeSurfer to reconstruct surfaces from T1w/T2w
structural images.
"""
from nipype.pipeline import engine as pe
from nipype.interfaces.base import Un... | 41.527076 | 117 | 0.634747 |
4518aed41324212c63ed2caaf9e1c98ea5d7f305 | 463 | py | Python | Introduction-to-data-visualization-with-matplotlib/3. Quantitative comparisons and statistical visualizations/script_6.py | nhutnamhcmus/datacamp-playground | 25457e813b1145e1d335562286715eeddd1c1a7b | [
"MIT"
] | 1 | 2021-05-08T11:09:27.000Z | 2021-05-08T11:09:27.000Z | Introduction-to-data-visualization-with-matplotlib/3. Quantitative comparisons and statistical visualizations/script_6.py | nhutnamhcmus/datacamp-playground | 25457e813b1145e1d335562286715eeddd1c1a7b | [
"MIT"
] | 1 | 2022-03-12T15:42:14.000Z | 2022-03-12T15:42:14.000Z | Introduction-to-data-visualization-with-matplotlib/3. Quantitative comparisons and statistical visualizations/script_6.py | nhutnamhcmus/datacamp-playground | 25457e813b1145e1d335562286715eeddd1c1a7b | [
"MIT"
] | 1 | 2021-04-30T18:24:19.000Z | 2021-04-30T18:24:19.000Z | fig, ax = plt.subplots()
# Add Seattle temperature data in each month with error bars
ax.errorbar(seattle_weather["MONTH"], seattle_weather["MLY-TAVG-NORMAL"], yerr=seattle_weather["MLY-TAVG-STDDEV"])
# Add Austin temperature data in each month with error bars
ax.errorbar(austin_weather["MONTH"], austin_weather... | 38.583333 | 115 | 0.7473 |
9a1e833eb12dd76b516960369b4fc67fda8ea344 | 8,429 | py | Python | build.py | dllu/dllup | 3d5e69754fb568cd70f01d277964df3dc7441a6b | [
"MIT"
] | 2 | 2021-09-14T18:33:00.000Z | 2021-12-02T07:08:46.000Z | build.py | dllu/dllup | 3d5e69754fb568cd70f01d277964df3dc7441a6b | [
"MIT"
] | null | null | null | build.py | dllu/dllup | 3d5e69754fb568cd70f01d277964df3dc7441a6b | [
"MIT"
] | null | null | null | #!/usr/bin/python
# The templating engine and the parser for the dllup markup language are hereby
# released open-source under the MIT License.
#
# Copyright (c) 2015 Daniel Lawrence Lu
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files ... | 39.023148 | 330 | 0.566971 |
c22e7ba6b7de8b53914f15f9c65b2350d3e4309e | 61 | py | Python | export_action/__init__.py | vakhov/django-export-action | 25dfdd960523818dbbd38f8ccb3fa2f1516fc4c6 | [
"MIT"
] | null | null | null | export_action/__init__.py | vakhov/django-export-action | 25dfdd960523818dbbd38f8ccb3fa2f1516fc4c6 | [
"MIT"
] | 1 | 2021-05-24T08:18:42.000Z | 2021-05-24T08:18:42.000Z | export_action/__init__.py | forum-group/django-export-action | 1dcdefbdb5487161be68993d9d54ea7a04c97042 | [
"MIT"
] | 1 | 2021-05-24T06:27:41.000Z | 2021-05-24T06:27:41.000Z | default_app_config = 'export_action.apps.ExportActionConfig'
| 30.5 | 60 | 0.868852 |
ad0275b69cfc03006cd2882bf90dee3438186567 | 3,004 | py | Python | build_tools/find_effected_packages.py | abujalski/Webports | 47bea8edcb0a5e00baab53f1e850d25a5beeb5d3 | [
"BSD-3-Clause"
] | 4 | 2016-12-01T05:19:53.000Z | 2019-03-09T12:30:08.000Z | build_tools/find_effected_packages.py | abujalski/Webports | 47bea8edcb0a5e00baab53f1e850d25a5beeb5d3 | [
"BSD-3-Clause"
] | 3 | 2016-12-26T03:43:16.000Z | 2021-01-28T10:41:45.000Z | build_tools/find_effected_packages.py | abujalski/Webports | 47bea8edcb0a5e00baab53f1e850d25a5beeb5d3 | [
"BSD-3-Clause"
] | 4 | 2016-08-03T19:32:01.000Z | 2020-03-09T01:29:58.000Z | #!/usr/bin/env python
# Copyright 2015 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Find which packages are effected by a given change.
Accepts a list of changed files and outputs a list of effected
packages. O... | 30.04 | 80 | 0.697403 |
908c78ac9e6c74469ef7518a4379349c62d35ba7 | 3,982 | py | Python | pi4home/components/stepper/__init__.py | khzd/pi4home | 937bcdcf77bab111cca10af1fe45c63a55c29aae | [
"MIT"
] | 1 | 2019-05-16T02:52:12.000Z | 2019-05-16T02:52:12.000Z | pi4home/components/stepper/__init__.py | khzd/pi4home | 937bcdcf77bab111cca10af1fe45c63a55c29aae | [
"MIT"
] | null | null | null | pi4home/components/stepper/__init__.py | khzd/pi4home | 937bcdcf77bab111cca10af1fe45c63a55c29aae | [
"MIT"
] | null | null | null | import voluptuous as vol
from pi4home.automation import ACTION_REGISTRY
import pi4home.config_validation as cv
from pi4home.const import CONF_ACCELERATION, CONF_DECELERATION, CONF_ID, CONF_MAX_SPEED, \
CONF_POSITION, CONF_TARGET
from pi4home.core import CORE
from pi4home.cpp_generator import Pvariable, add, get_va... | 31.856 | 97 | 0.73782 |
4ac09dffb1c0c179c00f694837f6ceba43402fc5 | 1,397 | py | Python | gchatautorespond/urls.py | merrlyne/gchatautorespond | a7f8d7b715ca9851a65588a268ce39addb906b6d | [
"BSD-2-Clause"
] | null | null | null | gchatautorespond/urls.py | merrlyne/gchatautorespond | a7f8d7b715ca9851a65588a268ce39addb906b6d | [
"BSD-2-Clause"
] | null | null | null | gchatautorespond/urls.py | merrlyne/gchatautorespond | a7f8d7b715ca9851a65588a268ce39addb906b6d | [
"BSD-2-Clause"
] | 1 | 2018-12-03T19:12:24.000Z | 2018-12-03T19:12:24.000Z | from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import RedirectView
from registration.backends.default.views import RegistrationView
from registration.forms import RegistrationFormTermsOfService as RegTOS
from .apps.autorespond import urls as autorespond_urls
from .... | 41.088235 | 108 | 0.743021 |
8e10edb8e9ed00a20afb44a9fc2e81951cbbfe19 | 24,041 | py | Python | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 8 | 2021-01-13T23:44:08.000Z | 2021-03-17T10:13:36.000Z | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | 2 | 2020-03-03T23:11:13.000Z | 2020-03-30T18:50:55.000Z | sdk/monitor/azure-mgmt-monitor/azure/mgmt/monitor/v2019_10_17/operations/_private_link_scopes_operations.py | vbarbaresi/azure-sdk-for-python | 397ba46c51d001ff89c66b170f5576cf8f49c05f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 49.063265 | 184 | 0.667776 |
59719918a749000c35190491dc7abcfb5972042d | 10,708 | py | Python | src/lava/lib/dl/slayer/axon/delta.py | timcheck/lava-dl | e680722071129fde952ea0d744984aa2a038797a | [
"BSD-3-Clause"
] | 37 | 2021-09-30T16:47:15.000Z | 2022-03-07T22:29:21.000Z | src/lava/lib/dl/slayer/axon/delta.py | timcheck/lava-dl | e680722071129fde952ea0d744984aa2a038797a | [
"BSD-3-Clause"
] | 36 | 2021-11-04T16:54:55.000Z | 2022-03-31T02:26:29.000Z | src/lava/lib/dl/slayer/axon/delta.py | timcheck/lava-dl | e680722071129fde952ea0d744984aa2a038797a | [
"BSD-3-Clause"
] | 20 | 2021-10-29T22:55:58.000Z | 2022-03-22T17:27:16.000Z | # Copyright (C) 2022 Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
"""Delta encoder implementation."""
import torch
class _DeltaUnit(torch.autograd.Function):
""" """
@staticmethod
def forward(
ctx,
input, threshold,
pre_state, residual_state, error_state,
cu... | 33.567398 | 79 | 0.537449 |
8d6dcda0f2f1cc8228a4706a43c877acabeee495 | 6,127 | py | Python | examples/decoding/plot_oasis_vbm.py | fabianp/nilearn | 367516822f538965368b936704a5346199331457 | [
"BSD-2-Clause"
] | null | null | null | examples/decoding/plot_oasis_vbm.py | fabianp/nilearn | 367516822f538965368b936704a5346199331457 | [
"BSD-2-Clause"
] | null | null | null | examples/decoding/plot_oasis_vbm.py | fabianp/nilearn | 367516822f538965368b936704a5346199331457 | [
"BSD-2-Clause"
] | null | null | null | """
Voxel-Based Morphometry on Oasis dataset
========================================
This example uses Voxel-Based Morphometry (VBM) to study the relationship
between aging and gray matter density.
The data come from the `OASIS <http://www.oasis-brains.org/>`_ project.
If you use it, you need to agree with the data ... | 38.055901 | 79 | 0.715195 |
6f602fcf644bf954a7c97b159e6873bbe140a67e | 1,427 | py | Python | tests/loudness/test_loudness_ecma.py | TutorialMaker/MoSQITo | d5805d3f9748db7b49836b1c7f7a4aaf4c1cb839 | [
"Apache-2.0"
] | null | null | null | tests/loudness/test_loudness_ecma.py | TutorialMaker/MoSQITo | d5805d3f9748db7b49836b1c7f7a4aaf4c1cb839 | [
"Apache-2.0"
] | null | null | null | tests/loudness/test_loudness_ecma.py | TutorialMaker/MoSQITo | d5805d3f9748db7b49836b1c7f7a4aaf4c1cb839 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Optional package import
try:
import pytest
except ImportError:
raise RuntimeError(
"In order to perform the tests you need the 'pytest' package."
)
import numpy as np
# Local application imports
from mosqito.functions.shared.sine_wave_generator import (
sine_wave_... | 26.425926 | 71 | 0.682551 |
e1309311f8f5dc30f1f81dccaad63bf387e79ab9 | 5,172 | py | Python | pw_docgen/py/pw_docgen/docgen.py | silvergasp/pigweed | b095218bcd7064ddcc5af5f689ce235fc9e4cc91 | [
"Apache-2.0"
] | null | null | null | pw_docgen/py/pw_docgen/docgen.py | silvergasp/pigweed | b095218bcd7064ddcc5af5f689ce235fc9e4cc91 | [
"Apache-2.0"
] | 1 | 2021-06-18T13:54:41.000Z | 2021-06-18T13:54:41.000Z | pw_docgen/py/pw_docgen/docgen.py | silvergasp/pigweed | b095218bcd7064ddcc5af5f689ce235fc9e4cc91 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Pigweed 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 36.422535 | 91 | 0.573859 |
3855efe1af5ac5e9cd6bb36b99dc1b32d3a74c3c | 286 | py | Python | skeleton/main.py | elsampsa/skeleton | 30679fc787014e347e0b21a6f74193237c0ffe61 | [
"MIT"
] | 4 | 2022-02-18T10:59:53.000Z | 2022-03-21T10:28:32.000Z | skeleton/main.py | elsampsa/skeleton | 30679fc787014e347e0b21a6f74193237c0ffe61 | [
"MIT"
] | null | null | null | skeleton/main.py | elsampsa/skeleton | 30679fc787014e347e0b21a6f74193237c0ffe61 | [
"MIT"
] | null | null | null | """
NAME.py : Description of the file
* Copyright: 2017 [copyright holder]
* Authors : Sampsa Riikonen
* Date : 2017
* Version : 0.1
This file is part of the skeleton library
[copy-paste your license here]
"""
import logging
def app(command, options, config):
pass
| 14.3 | 41 | 0.674825 |
c9f34c980abb5d25bb3d5c328454a26d00a5da8b | 19,594 | py | Python | sdk/python/pulumi_sysdig/monitor/notification_channel_email.py | Sysdig-Hackathon-Picasso/pulumi-sysdig | e25b655f6ad4a5f52678bc445be2d59f28f5bb4b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_sysdig/monitor/notification_channel_email.py | Sysdig-Hackathon-Picasso/pulumi-sysdig | e25b655f6ad4a5f52678bc445be2d59f28f5bb4b | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_sysdig/monitor/notification_channel_email.py | Sysdig-Hackathon-Picasso/pulumi-sysdig | e25b655f6ad4a5f52678bc445be2d59f28f5bb4b | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-12-01T08:57:09.000Z | 2021-12-01T08:57:09.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... | 43.349558 | 134 | 0.651577 |
722e02a356501ba219b1ceaba7fed17d1901278a | 354 | py | Python | data/store.py | toutpuissantged/BestOfWeb | fa4b62d26ef7ae73bdd69c5d65f6bfab46232f10 | [
"MIT"
] | 4 | 2020-07-25T15:36:21.000Z | 2022-02-17T21:38:48.000Z | data/store.py | toutpuissantged/BestOfWeb | fa4b62d26ef7ae73bdd69c5d65f6bfab46232f10 | [
"MIT"
] | null | null | null | data/store.py | toutpuissantged/BestOfWeb | fa4b62d26ef7ae73bdd69c5d65f6bfab46232f10 | [
"MIT"
] | null | null | null |
class Store():
'''
sert a enregistrer les etats
'''
def __init__(self,id: int):
data={
'filedir': '',
}
self.id : int = id
self.data=data
self.TabState=[]
def get_data(self):
return self.data
def set_data(self,newdata):
s... | 16.857143 | 35 | 0.488701 |
9edddd240d329529f9c74259bc2218aad3e6cc5f | 26,284 | py | Python | haystack/pipeline.py | peterdemin/haystack | 9ec2406a05aac3dc8afab68945a6afc2871bd2a3 | [
"Apache-2.0"
] | null | null | null | haystack/pipeline.py | peterdemin/haystack | 9ec2406a05aac3dc8afab68945a6afc2871bd2a3 | [
"Apache-2.0"
] | null | null | null | haystack/pipeline.py | peterdemin/haystack | 9ec2406a05aac3dc8afab68945a6afc2871bd2a3 | [
"Apache-2.0"
] | null | null | null | from abc import ABC
import os
from copy import deepcopy
from pathlib import Path
from typing import List, Optional, Dict
import networkx as nx
import yaml
from networkx import DiGraph
from networkx.drawing.nx_agraph import to_agraph
from haystack import BaseComponent
from haystack.generator.base import BaseGenerator
... | 44.70068 | 158 | 0.619959 |
f2b64b448eb064f5e46475ac9cb3bc5f6e9dc238 | 5,907 | py | Python | utils/scripts/dce_caffe2_model.py | jackm321/glow | 756673683dccbf579b641dade7169f37032bba92 | [
"Apache-2.0"
] | 2 | 2021-08-02T22:39:33.000Z | 2021-11-17T11:00:17.000Z | utils/scripts/dce_caffe2_model.py | bertmaher/glow | 7677eeaef263de4610a747069980f038f5b90b70 | [
"Apache-2.0"
] | null | null | null | utils/scripts/dce_caffe2_model.py | bertmaher/glow | 7677eeaef263de4610a747069980f038f5b90b70 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017-present, Facebook, 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... | 40.458904 | 133 | 0.735568 |
5e9fe067977a252899a4349a86250674ec312a4b | 34,827 | py | Python | ocp_resources/resource.py | akalenyu/openshift-python-wrapper | f403350b32b556ef15480e14f24cd40afcb8bbc5 | [
"Apache-2.0"
] | null | null | null | ocp_resources/resource.py | akalenyu/openshift-python-wrapper | f403350b32b556ef15480e14f24cd40afcb8bbc5 | [
"Apache-2.0"
] | null | null | null | ocp_resources/resource.py | akalenyu/openshift-python-wrapper | f403350b32b556ef15480e14f24cd40afcb8bbc5 | [
"Apache-2.0"
] | null | null | null | import json
import logging
import os
import re
from distutils.version import Version
import kubernetes
import urllib3
import yaml
from openshift.dynamic import DynamicClient
from openshift.dynamic.exceptions import (
InternalServerError,
NotFoundError,
ServerTimeoutError,
)
from urllib3.exceptions import P... | 32.824694 | 113 | 0.579148 |
1a7dede70d7b426a24d562cedb0ca8c823ef1224 | 3,197 | py | Python | roulette/evaluation/utils.py | miararoy/bliz | 0d197b6790ccfa0c71682abf551aa4df83a9b589 | [
"MIT"
] | null | null | null | roulette/evaluation/utils.py | miararoy/bliz | 0d197b6790ccfa0c71682abf551aa4df83a9b589 | [
"MIT"
] | null | null | null | roulette/evaluation/utils.py | miararoy/bliz | 0d197b6790ccfa0c71682abf551aa4df83a9b589 | [
"MIT"
] | null | null | null | import numpy as np
def validate_multiple_lists_length(*lists) -> bool:
"""Validates that a list of lists is of the same length
Args:
lists(list): a list of lists to be checked
Retuens:
b(bool): True if all list of the same length, False else.
"""
list_len = -1
for l in list... | 24.976563 | 89 | 0.587426 |
e5942f9713961c1a2f927ed1e5be000437de758b | 10,906 | py | Python | homeassistant/components/xiaomi_aqara.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/xiaomi_aqara.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/xiaomi_aqara.py | mfrueh/home-assistant | 5d64628b5bf4713016883282fd54de9c7d5089d0 | [
"Apache-2.0"
] | null | null | null | """
Support for Xiaomi Gateways.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/xiaomi_aqara/
"""
import asyncio
import logging
from datetime import timedelta
import voluptuous as vol
from homeassistant.components.discovery import SERVICE_XIAOMI_GW
f... | 32.849398 | 77 | 0.673941 |
345ddf1f426831d67b76b734466164c048c9e3a3 | 4,791 | py | Python | example/sigmorphon2021-shared-tasks/augment.py | cuichenx/neural-transducer | cdd3d0ecfa5cc5acec04eafa2de1ff15fbac3f9f | [
"MIT"
] | 49 | 2019-06-29T21:19:59.000Z | 2022-03-25T15:28:19.000Z | example/sigmorphon2021-shared-tasks/augment.py | cuichenx/neural-transducer | cdd3d0ecfa5cc5acec04eafa2de1ff15fbac3f9f | [
"MIT"
] | 5 | 2020-03-15T12:51:44.000Z | 2021-09-08T17:45:45.000Z | example/sigmorphon2021-shared-tasks/augment.py | cuichenx/neural-transducer | cdd3d0ecfa5cc5acec04eafa2de1ff15fbac3f9f | [
"MIT"
] | 15 | 2019-09-23T21:35:16.000Z | 2022-03-30T01:53:22.000Z | """
Borrowed from https://github.com/antonisa/inflection
"""
import argparse
import codecs
import os
import sys
from random import choice, random
from typing import Any, List
sys.path.append("src")
import align # noqa: E402
def read_data(filename):
with codecs.open(filename, "r", "utf-8") as inp:
lines ... | 27.693642 | 87 | 0.526821 |
f53f43d2d39fb72623ddbc3419ded3b5380f7fa7 | 6,012 | py | Python | interview-questions/harness-to-test-binaries.py | davemungo/various | ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce | [
"MIT"
] | 1 | 2020-01-19T01:21:56.000Z | 2020-01-19T01:21:56.000Z | interview-questions/harness-to-test-binaries.py | davemungo/various | ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce | [
"MIT"
] | null | null | null | interview-questions/harness-to-test-binaries.py | davemungo/various | ed7c17f8b75a27fc59b0a5cad6125d64d00cd3ce | [
"MIT"
] | 1 | 2021-07-02T14:40:01.000Z | 2021-07-02T14:40:01.000Z | ''' Explore funtionality of some unknown binary files.
Binary files are known to have some errors, construct a minimal test to find
the errors in each file
Verify expected functionality
-- entry for each word in the input file
-- line number for each word
-- line numbers ascend
-... | 29.043478 | 81 | 0.526281 |
e0ac6a98868a6d9e89f39f94a357860189336cf5 | 3,694 | py | Python | tag_counter/console_app.py | armansyz/python_task | 5d2d884ef350440d6264a1ff30c829c994d430fa | [
"MIT"
] | null | null | null | tag_counter/console_app.py | armansyz/python_task | 5d2d884ef350440d6264a1ff30c829c994d430fa | [
"MIT"
] | 1 | 2021-06-02T03:07:29.000Z | 2021-06-02T03:07:29.000Z | tag_counter/console_app.py | armansyz/tag_counter | a569f805e8aa78af01969da193044f4c6072b194 | [
"MIT"
] | null | null | null | from tag_counter.process_url import count_tags, url_format, url_name
from tag_counter.db_manager import TagManager
from loguru import logger
import pickle
import argparse
import yaml
def get_insert(argsa):
"""Get tags from db or insert if they do not exist"""
t = TagManager()
logger.info('Attempting to c... | 36.215686 | 104 | 0.610179 |
c9e839656fc1989292ce06bbd70a198e99f14715 | 878 | py | Python | mrfetcher/__init__.py | benlast/mrfetcher | 1a2c701b6b01ae14d03f7b4ccf505abbf2c947c5 | [
"MIT"
] | null | null | null | mrfetcher/__init__.py | benlast/mrfetcher | 1a2c701b6b01ae14d03f7b4ccf505abbf2c947c5 | [
"MIT"
] | null | null | null | mrfetcher/__init__.py | benlast/mrfetcher | 1a2c701b6b01ae14d03f7b4ccf505abbf2c947c5 | [
"MIT"
] | null | null | null | import collections
import os
import sys
from .forwarder import forward
ENV_VARS = [
('POP3_HOST', None),
('POP3_PORT', 110),
('POP3_USER', None),
('POP3_PASSWORD', None),
('SMTP_HOST', 'smtp.gmail.com'),
('SMTP_PORT', 465),
('SMTP_USER', None),
('SMTP_PASSWORD', None),
('TARGET_EMA... | 19.954545 | 72 | 0.555809 |
26a010934871017c04b9c14c35320bd23b7f78ad | 704 | py | Python | tools/model_downloader/arguments.py | russell-cooks/video-analytics-serving | 517645a1555b66147879de786606dd13ec3afd5b | [
"BSD-3-Clause"
] | null | null | null | tools/model_downloader/arguments.py | russell-cooks/video-analytics-serving | 517645a1555b66147879de786606dd13ec3afd5b | [
"BSD-3-Clause"
] | null | null | null | tools/model_downloader/arguments.py | russell-cooks/video-analytics-serving | 517645a1555b66147879de786606dd13ec3afd5b | [
"BSD-3-Clause"
] | null | null | null | '''
* Copyright (C) 2019-2020 Intel Corporation.
*
* SPDX-License-Identifier: BSD-3-Clause
'''
import argparse
def parse_args(args=None):
parser = argparse.ArgumentParser(description="Download & Convert models from Open Model Zoo.")
parser.add_argument('--output-dir', required=False, default=".",
... | 35.2 | 98 | 0.646307 |
8b4645c32ab3ef0ecb114ced866bbdd816e42a72 | 2,795 | py | Python | main.py | Sinowrt/checkDuplicate | cc0806ca6f5bacd16bf9ca5a47d0510643648e1c | [
"MIT"
] | null | null | null | main.py | Sinowrt/checkDuplicate | cc0806ca6f5bacd16bf9ca5a47d0510643648e1c | [
"MIT"
] | null | null | null | main.py | Sinowrt/checkDuplicate | cc0806ca6f5bacd16bf9ca5a47d0510643648e1c | [
"MIT"
] | null | null | null | import sys,os,checkDuplicate
from Ui_MainWindow import Ui_MainWindow
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
class MainWindow(QMainWindow, Ui_MainWindow):
appendSignal = pyqtSignal(str)
updateProgressSignal = pyqtSignal(float)
string_list=['公共基础知识... | 34.9375 | 81 | 0.68229 |
a89a53e13ecb73b4d2bf5fea96f5746f2db7b3f1 | 162 | py | Python | app/config/views.py | maro99/yapen | 0de7aa9d4b152aadd18511be6e536e89645452d9 | [
"MIT"
] | 1 | 2019-04-28T12:21:51.000Z | 2019-04-28T12:21:51.000Z | app/config/views.py | maro99/yapen | 0de7aa9d4b152aadd18511be6e536e89645452d9 | [
"MIT"
] | 5 | 2018-07-30T05:44:44.000Z | 2020-06-05T18:56:41.000Z | app/config/views.py | maro99/yapen | 0de7aa9d4b152aadd18511be6e536e89645452d9 | [
"MIT"
] | 5 | 2018-07-23T05:21:41.000Z | 2018-08-08T05:00:42.000Z | from django.http import HttpResponse
from django.shortcuts import render, redirect
def index(request):
return render(request, 'pensions/pensions_list.html') | 27 | 57 | 0.802469 |
8fee9b1eb4625c205d63b802513a953a281fbc36 | 98 | py | Python | exercise_2017/5th_week/test.py | Taewan-P/python_study | f347e370aaa33aba5ab233252bcd759b94615348 | [
"MIT"
] | null | null | null | exercise_2017/5th_week/test.py | Taewan-P/python_study | f347e370aaa33aba5ab233252bcd759b94615348 | [
"MIT"
] | null | null | null | exercise_2017/5th_week/test.py | Taewan-P/python_study | f347e370aaa33aba5ab233252bcd759b94615348 | [
"MIT"
] | null | null | null | def fastmult3(m,n):
ans = 0
while(n > 0):
ans += m
n = n-1
return ans
print(fastmult3(3,6)) | 14 | 21 | 0.581633 |
7359b3cbe63cdadb190ff7ef5f16ad6ace751886 | 5,676 | py | Python | neighbourhood/views.py | Ken-mbira/THE_WATCH | a6bfb65b2f134adf3b2e584ea8ebfc79588ef0b5 | [
"MIT"
] | null | null | null | neighbourhood/views.py | Ken-mbira/THE_WATCH | a6bfb65b2f134adf3b2e584ea8ebfc79588ef0b5 | [
"MIT"
] | null | null | null | neighbourhood/views.py | Ken-mbira/THE_WATCH | a6bfb65b2f134adf3b2e584ea8ebfc79588ef0b5 | [
"MIT"
] | null | null | null | from rest_framework.decorators import api_view,permission_classes
from rest_framework.permissions import IsAuthenticated,IsAuthenticatedOrReadOnly
from rest_framework.response import Response
from rest_framework import status
from rest_framework import generics
from neighbourhood.models import *
from account.serialize... | 31.186813 | 80 | 0.696617 |
19393d9ec478c05f6d108dd680ce641f7addc0f6 | 3,347 | py | Python | haproxysessionmon/backends/graylog.py | thanethomson/haproxy-session-mon | 7b19051ad7cc4814e874cfc0270607c9d1271831 | [
"MIT",
"MIT-0",
"Unlicense"
] | null | null | null | haproxysessionmon/backends/graylog.py | thanethomson/haproxy-session-mon | 7b19051ad7cc4814e874cfc0270607c9d1271831 | [
"MIT",
"MIT-0",
"Unlicense"
] | null | null | null | haproxysessionmon/backends/graylog.py | thanethomson/haproxy-session-mon | 7b19051ad7cc4814e874cfc0270607c9d1271831 | [
"MIT",
"MIT-0",
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
import json
from datetime import datetime
from haproxysessionmon.backends.base import StorageBackend
import logging
logger = logging.getLogger(__name__)
__all__ = [
"GraylogBackend"
]
class GraylogBackend(StorageBackend):
"""Uses Graylog to store statistics."""
def __init__(sel... | 33.808081 | 101 | 0.632507 |
23aa5d56030df1e1cb2b6cd824124924ee6016a2 | 3,091 | py | Python | reader.py | xtarx/cycleGAN-tensorflow | 8e73ae8c6473149fb930bb05299ed64d2b5dd5b3 | [
"MIT"
] | null | null | null | reader.py | xtarx/cycleGAN-tensorflow | 8e73ae8c6473149fb930bb05299ed64d2b5dd5b3 | [
"MIT"
] | null | null | null | reader.py | xtarx/cycleGAN-tensorflow | 8e73ae8c6473149fb930bb05299ed64d2b5dd5b3 | [
"MIT"
] | null | null | null | import tensorflow as tf
import utils
class Reader():
def __init__(self, tfrecords_file, image_size=256,
min_queue_examples=1000, batch_size=1, num_threads=8, name=''):
"""
Args:
tfrecords_file: string, tfrecords file path
min_queue_examples: integer, minimum number of samples to retain in the... | 32.882979 | 120 | 0.676804 |
f4c1a8fac2cdf8fcbf900b1444275efe5d50524a | 1,093 | py | Python | var/spack/repos/builtin/packages/conserver/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/conserver/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/conserver/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Conserver(AutotoolsPackage):
"""Conserver is an application that allows multiple users to
... | 45.541667 | 103 | 0.772187 |
39d69081266240a20fde31d33a2ce4d57d00adbc | 3,775 | py | Python | python/examples/lowlevel.py | angiglesias/rpi_ws281x | 013f38e62f804347b442e2144c14ee16a3c7e191 | [
"BSD-2-Clause"
] | 1,583 | 2015-01-01T14:39:44.000Z | 2022-03-28T19:21:19.000Z | python/examples/lowlevel.py | angiglesias/rpi_ws281x | 013f38e62f804347b442e2144c14ee16a3c7e191 | [
"BSD-2-Clause"
] | 428 | 2015-01-01T17:43:16.000Z | 2022-03-24T21:20:21.000Z | python/examples/lowlevel.py | angiglesias/rpi_ws281x | 013f38e62f804347b442e2144c14ee16a3c7e191 | [
"BSD-2-Clause"
] | 637 | 2015-01-03T19:53:09.000Z | 2022-03-31T16:33:52.000Z | # Example of low-level Python wrapper for rpi_ws281x library.
# Author: Tony DiCola (tony@tonydicola.com), Jeremy Garff (jer@jers.net)
#
# This is an example of how to use the SWIG-generated _rpi_ws281x module.
# You probably don't want to use this unless you are building your own library,
# because the SWIG generated ... | 38.131313 | 87 | 0.735099 |
ed5018ca32591177c227a04374c3f597c748775d | 4,777 | py | Python | portal/apps/comunidad/forms.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 8 | 2020-12-15T17:11:08.000Z | 2021-12-13T22:08:33.000Z | portal/apps/comunidad/forms.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 28 | 2020-12-15T17:34:03.000Z | 2022-02-01T04:09:10.000Z | portal/apps/comunidad/forms.py | Artis-Physis/utopia-cms | 5cb8d941d0b2df53fddc566a52e9d3baee4a007e | [
"BSD-3-Clause"
] | 7 | 2020-12-15T19:59:17.000Z | 2021-11-24T16:47:06.000Z | # -*- coding: utf-8 -*-
from django import forms
from comunidad.models import SubscriberEvento, SubscriberArticle, Registro
from thedaily.models import Subscriber
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Layout, Div, Submit, Button, Field, Fieldset, HTML, MultiField
from crispy_forms... | 38.524194 | 94 | 0.592841 |
caa216ad0ca56046b9179b0aae233772866b8c04 | 2,069 | py | Python | lib/galaxy/work/context.py | maikenp/galaxy | eb3f3c816f1f94bc328d092f30c8966d41a56a0d | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/work/context.py | maikenp/galaxy | eb3f3c816f1f94bc328d092f30c8966d41a56a0d | [
"CC-BY-3.0"
] | null | null | null | lib/galaxy/work/context.py | maikenp/galaxy | eb3f3c816f1f94bc328d092f30c8966d41a56a0d | [
"CC-BY-3.0"
] | null | null | null | from galaxy.managers.context import (
ProvidesHistoryContext,
)
class WorkRequestContext(ProvidesHistoryContext):
""" Stripped down implementation of Galaxy web transaction god object for
work request handling outside of web threads - uses mix-ins shared with
GalaxyWebTransaction to provide app, user,... | 33.918033 | 85 | 0.704688 |
238220b5d56a0fa6c3032317ca6820d6a96857c4 | 826 | py | Python | tsg/views.py | kityang/tushuguan | 81ed68833250b16251ff9656f10cc44929c26fc1 | [
"MIT"
] | null | null | null | tsg/views.py | kityang/tushuguan | 81ed68833250b16251ff9656f10cc44929c26fc1 | [
"MIT"
] | null | null | null | tsg/views.py | kityang/tushuguan | 81ed68833250b16251ff9656f10cc44929c26fc1 | [
"MIT"
] | null | null | null | import time
from django.http import HttpResponse
from django.shortcuts import render, redirect
from django.utils import timezone
from django.views.decorators.csrf import csrf_exempt
from tsg.models import 书籍
# Create your views here.
def index(request):
return render(request, 'index.html')
def 图书添加(request):
... | 25.030303 | 65 | 0.691283 |
a911f42ef0c7a0178b38a94af52d8b803df7d08b | 3,652 | py | Python | backend/randomtest.py | ezg/PanoramicDataWin8 | 229e9ab64cda30a0bd1c6d39a70754ba4651ad43 | [
"Apache-2.0"
] | 2 | 2015-09-29T03:25:03.000Z | 2021-04-29T03:17:28.000Z | backend/randomtest.py | ezg/PanoramicDataWin8 | 229e9ab64cda30a0bd1c6d39a70754ba4651ad43 | [
"Apache-2.0"
] | 1 | 2016-09-25T21:45:21.000Z | 2016-09-25T21:45:21.000Z | backend/randomtest.py | ezg/PanoramicDataWin8 | 229e9ab64cda30a0bd1c6d39a70754ba4651ad43 | [
"Apache-2.0"
] | 2 | 2015-10-26T17:21:48.000Z | 2016-10-29T15:45:32.000Z | from dataprovider import SequentialDataProvider
from databinner import DataBinner
import json
import time
import numpy as np
job = {
"type": "execute",
"dataset": "facts.csv_5000",
"task": {
"filter": "",
"aggregateFunctions": [
"Count"
],
"type": "visualization",
"chunkSize": 10000,
... | 36.888889 | 1,286 | 0.525192 |
e022397dcf37e3b4d2458120b14932b8a643eff1 | 11,710 | py | Python | utils/workers.py | kushwahashivam/alphazero-othello | 66fe081ac98a34a1c49db7ca3af3d67c7ee6a88b | [
"Apache-2.0"
] | 1 | 2021-07-02T15:52:14.000Z | 2021-07-02T15:52:14.000Z | utils/workers.py | kushwahashivam/alphazero-othello | 66fe081ac98a34a1c49db7ca3af3d67c7ee6a88b | [
"Apache-2.0"
] | 1 | 2020-10-11T18:23:49.000Z | 2020-10-11T18:23:49.000Z | utils/workers.py | kushwahashivam/alphazero-othello | 66fe081ac98a34a1c49db7ca3af3d67c7ee6a88b | [
"Apache-2.0"
] | 1 | 2020-10-11T18:21:00.000Z | 2020-10-11T18:21:00.000Z | from __future__ import annotations
from typing import Union, OrderedDict, Dict
import numpy as np
import pickle
import time
import torch
from torch.multiprocessing import Process, Queue
from config import OthelloConfig
from players.azplayer import AZPlayer
from utils.game import Othello
from utils.model import Networ... | 39.829932 | 115 | 0.583433 |
77093a57df4a35c85875ce2743eeaa5cce2c8fb7 | 2,298 | py | Python | lib/ops/prepare_labels_for_prn_and_update_refine_blobs.py | xieshuqin/RefineNet | 94d7f53db82aec2e3969850fe7c1d1b76ce7ad48 | [
"Apache-2.0"
] | null | null | null | lib/ops/prepare_labels_for_prn_and_update_refine_blobs.py | xieshuqin/RefineNet | 94d7f53db82aec2e3969850fe7c1d1b76ce7ad48 | [
"Apache-2.0"
] | null | null | null | lib/ops/prepare_labels_for_prn_and_update_refine_blobs.py | xieshuqin/RefineNet | 94d7f53db82aec2e3969850fe7c1d1b76ce7ad48 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
from core.config import cfg
import roi_data.prn
import utils.blob as blob_utils
class PrepareLabelsForPRNAndUpdateRefineBlobsOp(object):
""" Prep... | 29.844156 | 76 | 0.709312 |
eda574dfa2fd600b997c2ac83639297f90e25a08 | 2,906 | py | Python | koko/cam/machines/epilog.py | TheBeachLab/kokopelli | 529b8149a951363d2a027946464ea0bb22346428 | [
"MIT"
] | 196 | 2015-01-01T08:48:04.000Z | 2022-03-29T13:21:45.000Z | koko/cam/machines/epilog.py | Inban-pythonic/kokopelli | c99b7909e138c42c7d5c99927f5031f021bffd77 | [
"MIT"
] | 3 | 2015-01-14T09:55:15.000Z | 2016-12-28T21:01:49.000Z | koko/cam/machines/epilog.py | Inban-pythonic/kokopelli | c99b7909e138c42c7d5c99927f5031f021bffd77 | [
"MIT"
] | 26 | 2015-03-10T11:12:23.000Z | 2022-02-12T17:12:17.000Z | """
@namespace epilog
@brief Output details and UI panel for an Epilog laser cutter.
"""
NAME = 'Epilog'
import tempfile
import subprocess
import koko
from koko.cam.panel import OutputPanel
class EpilogOutput(OutputPanel):
""" @class EpilogOutput UI Panel for Epilog laser
"""
""" @var extension ... | 29.958763 | 194 | 0.522023 |
d09847efd81c1e91dcec1f9bf7f49026196c785e | 893 | py | Python | ext/opentelemetry-ext-redis/setup.py | sethmaxwl/opentelemetry-python | 224974879c286062d9a5e494fa7d1469832eabbe | [
"Apache-2.0"
] | 2 | 2020-08-13T21:10:48.000Z | 2020-09-30T00:55:05.000Z | ext/opentelemetry-ext-redis/setup.py | sethmaxwl/opentelemetry-python | 224974879c286062d9a5e494fa7d1469832eabbe | [
"Apache-2.0"
] | 1 | 2021-02-24T01:32:32.000Z | 2021-02-24T01:32:32.000Z | ext/opentelemetry-ext-redis/setup.py | sethmaxwl/opentelemetry-python | 224974879c286062d9a5e494fa7d1469832eabbe | [
"Apache-2.0"
] | 2 | 2020-06-01T12:38:23.000Z | 2021-01-07T10:55:47.000Z | # Copyright The 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 in ... | 33.074074 | 74 | 0.753639 |
4032533845d7dd0d709e60765f106c9a3aaeae9b | 465 | py | Python | PostManagement/models.py | officialrafsan/travelxpRED | 2209fba418496c7e64dde8cba271cfb8020856ac | [
"MIT"
] | null | null | null | PostManagement/models.py | officialrafsan/travelxpRED | 2209fba418496c7e64dde8cba271cfb8020856ac | [
"MIT"
] | null | null | null | PostManagement/models.py | officialrafsan/travelxpRED | 2209fba418496c7e64dde8cba271cfb8020856ac | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
from UserManagement.models import User
class Post(models.Model):
Post_title = models.CharField(max_length=100)
Post_location = models.CharField(max_length=100)
Post_tags = models.CharField(max_length=500)
Post_description = models.TextField(max... | 27.352941 | 72 | 0.754839 |
f6db2f4027a21ad1664c447d31e061f9aa389ae2 | 18,620 | py | Python | pywikibot/flow.py | anukaal/pywikibot | 086e99d686ceebb40cb2e3dc7989e78ce6de3b85 | [
"MIT"
] | 1 | 2021-07-28T11:48:03.000Z | 2021-07-28T11:48:03.000Z | pywikibot/flow.py | anukaal/pywikibot | 086e99d686ceebb40cb2e3dc7989e78ce6de3b85 | [
"MIT"
] | null | null | null | pywikibot/flow.py | anukaal/pywikibot | 086e99d686ceebb40cb2e3dc7989e78ce6de3b85 | [
"MIT"
] | null | null | null | """Objects representing Flow entities, like boards, topics, and posts."""
#
# (C) Pywikibot team, 2015-2020
#
# Distributed under the terms of the MIT license.
#
import abc
import logging
from urllib.parse import parse_qs, urlparse
from pywikibot.exceptions import (
LockedPageError,
NoPageError,
UnknownExt... | 34.934334 | 79 | 0.605639 |
bb160473c853b1e4b272db132845421ca557b82f | 6,114 | py | Python | convrnn/rcnn_sat/bl_net.py | esizikova/anytime-prediction | 5c2672d6454a91873ca2b40796a29c6f5db5ec99 | [
"MIT"
] | 15 | 2019-10-09T07:14:51.000Z | 2022-02-07T16:42:28.000Z | convrnn/rcnn_sat/bl_net.py | esizikova/anytime-prediction | 5c2672d6454a91873ca2b40796a29c6f5db5ec99 | [
"MIT"
] | 1 | 2021-03-25T15:33:18.000Z | 2021-03-25T15:33:18.000Z | convrnn/rcnn_sat/bl_net.py | esizikova/anytime-prediction | 5c2672d6454a91873ca2b40796a29c6f5db5ec99 | [
"MIT"
] | 4 | 2019-09-12T02:27:31.000Z | 2021-06-17T21:03:03.000Z | '''
Keras implementation of BL network
'''
import tensorflow as tf
class BLConvLayer(object):
'''BL recurrent convolutional layer
Note that this is NOT A KERAS LAYER but is an object containing Keras layers
Args:
filters: Int, number of output filters in convolutions
kernel_size: Int or... | 37.975155 | 80 | 0.567877 |
315abc3a775e1675a9812e40e4c750520421a6e0 | 963 | py | Python | bluebrain/repo-patches/packages/random123/package.py | BlueBrain/Spack | dc328512c70e182f3c24bb0ce64fa3586482bdf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | bluebrain/repo-patches/packages/random123/package.py | BlueBrain/Spack | dc328512c70e182f3c24bb0ce64fa3586482bdf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2022-03-01T02:26:40.000Z | 2022-03-15T02:33:38.000Z | bluebrain/repo-patches/packages/random123/package.py | BlueBrain/Spack | dc328512c70e182f3c24bb0ce64fa3586482bdf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | from spack import *
from spack.pkg.builtin.random123 import Random123 as BuiltinRandom123
class Random123(BuiltinRandom123):
__doc__ = BuiltinRandom123.__doc__
url = "https://github.com/DEShawResearch/random123/archive/refs/tags/v1.14.0.tar.gz"
version('1.14.0', sha256='effafd8656b18030b2a5b995cd36... | 56.647059 | 106 | 0.777778 |
c71daec41df73f51f6c37338c042ef6aaf7039d0 | 1,414 | py | Python | tests/clean_data_test.py | chika334/sport-prediction | 3f62c4be5d803cd7bd7a37ad85625257fa9fb37f | [
"MIT"
] | 29 | 2018-09-27T20:17:35.000Z | 2022-01-25T14:45:25.000Z | tests/clean_data_test.py | chika334/sport-prediction | 3f62c4be5d803cd7bd7a37ad85625257fa9fb37f | [
"MIT"
] | 1 | 2020-02-17T09:17:47.000Z | 2020-02-17T09:17:47.000Z | tests/clean_data_test.py | chika334/sport-prediction | 3f62c4be5d803cd7bd7a37ad85625257fa9fb37f | [
"MIT"
] | 23 | 2018-10-26T07:13:47.000Z | 2022-03-25T21:11:27.000Z | import pytest
import os
import pandas as pd
import requests
from match_history import (
get_current_fixtures,
convert_team_name,
)
from helpers import (
make_directory,
remove_directory,
)
def test_get_current_fixtures_api():
base_url = "http://api.football-data.org/v2/competitions/"
AUTH_TOKEN... | 35.35 | 73 | 0.736917 |
43f173cebda4b12cdfbdeba033ee4dd3ea066694 | 17,391 | py | Python | gmocoin/private/dto.py | makotookamura/GmoCoin | 025d3e68364bf52418dbc3445987ff21528db732 | [
"Apache-2.0"
] | null | null | null | gmocoin/private/dto.py | makotookamura/GmoCoin | 025d3e68364bf52418dbc3445987ff21528db732 | [
"Apache-2.0"
] | null | null | null | gmocoin/private/dto.py | makotookamura/GmoCoin | 025d3e68364bf52418dbc3445987ff21528db732 | [
"Apache-2.0"
] | null | null | null | #!python3
from marshmallow import fields
from marshmallow_enum import EnumField
from enum import Enum
from datetime import datetime
from pytz import timezone
from typing import List
from decimal import Decimal
from ..common.dto import BaseSchema, BaseResponse, BaseResponseSchema, \
Symbol, AssetSymbol, SalesSide, ... | 26.47032 | 187 | 0.598758 |
93491026e8ca33247efd2ac9118a0d1120ee7a18 | 57,635 | py | Python | web3/contract.py | smudgil/web3.py | c2a39301468cd6db8f910a74273b0729b4d3556f | [
"MIT"
] | null | null | null | web3/contract.py | smudgil/web3.py | c2a39301468cd6db8f910a74273b0729b4d3556f | [
"MIT"
] | null | null | null | web3/contract.py | smudgil/web3.py | c2a39301468cd6db8f910a74273b0729b4d3556f | [
"MIT"
] | null | null | null | """Interaction with smart contracts over Web3 connector.
"""
import copy
import itertools
from typing import (
TYPE_CHECKING,
Any,
Callable,
Collection,
Dict,
Generator,
Iterable,
List,
NoReturn,
Optional,
Sequence,
Tuple,
Type,
Union,
cast,
)
import warnings... | 34.265755 | 124 | 0.611347 |
b29395e258c3af02e8cc1e49fd5c4a4d4da64b83 | 392 | py | Python | backend/app/core/jobs/test_job.py | yangyuchi/ml-job-scheduler | bdafbf7fd266751a974d716e8d3ba64d3187fdcd | [
"MIT"
] | null | null | null | backend/app/core/jobs/test_job.py | yangyuchi/ml-job-scheduler | bdafbf7fd266751a974d716e8d3ba64d3187fdcd | [
"MIT"
] | null | null | null | backend/app/core/jobs/test_job.py | yangyuchi/ml-job-scheduler | bdafbf7fd266751a974d716e8d3ba64d3187fdcd | [
"MIT"
] | null | null | null | import logging
from ._base import JobBase
logging.basicConfig(level=logging.INFO)
class PrintHello(JobBase):
description: str = "Just for Test"
arguments: dict = {
"times": "How many hellos to print (int)",
}
@classmethod
async def run(cls, **kwargs):
args = kwargs["args"]
... | 23.058824 | 50 | 0.614796 |
5982f7a1e036078409c78d6e513c56e6bae74b03 | 15,318 | py | Python | tensorflow_estimator/python/estimator/canned/parsing_utils.py | tirkarthi/estimator | 5d962124f1c2ad5b2886ada53d5c604257b660b6 | [
"Apache-2.0"
] | null | null | null | tensorflow_estimator/python/estimator/canned/parsing_utils.py | tirkarthi/estimator | 5d962124f1c2ad5b2886ada53d5c604257b660b6 | [
"Apache-2.0"
] | null | null | null | tensorflow_estimator/python/estimator/canned/parsing_utils.py | tirkarthi/estimator | 5d962124f1c2ad5b2886ada53d5c604257b660b6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 43.641026 | 86 | 0.705379 |
6a89f7623c746992a53ffd9aad4cce29adf5d424 | 8,500 | py | Python | transformers/recommendations/matrixfactorization.py | james94/driverlessai-recipes | 87c35460db59ffda8dc18ad82cb3a9b8291410e4 | [
"Apache-2.0"
] | null | null | null | transformers/recommendations/matrixfactorization.py | james94/driverlessai-recipes | 87c35460db59ffda8dc18ad82cb3a9b8291410e4 | [
"Apache-2.0"
] | null | null | null | transformers/recommendations/matrixfactorization.py | james94/driverlessai-recipes | 87c35460db59ffda8dc18ad82cb3a9b8291410e4 | [
"Apache-2.0"
] | null | null | null | """Collaborative filtering features using various techniques of Matrix Factorization for recommendations.
Recommended for large data"""
"""
Add the user column name and item column name in recipe_dict in config to match the
column names as per the dataset or use the default 'user' and 'item' respectively in your datas... | 46.448087 | 118 | 0.638824 |
dfd131fd1aee88423928b970a9177b87a8652cbc | 16,522 | py | Python | fpga/lib/axi/tb/test_axi_adapter_16_32.py | totuwei/corundum | e983ad519fb4523d0ffca32f5e436195bcfc945c | [
"BSD-2-Clause-FreeBSD"
] | 603 | 2018-07-30T05:31:48.000Z | 2022-03-31T02:53:20.000Z | fpga/lib/axi/tb/test_axi_adapter_16_32.py | akira2009999/corundum | cdc14769c33186c6d45fcd79b95c70889febff2b | [
"BSD-2-Clause-FreeBSD"
] | 78 | 2020-08-20T20:06:33.000Z | 2022-03-30T23:44:37.000Z | fpga/lib/axi/tb/test_axi_adapter_16_32.py | akira2009999/corundum | cdc14769c33186c6d45fcd79b95c70889febff2b | [
"BSD-2-Clause-FreeBSD"
] | 200 | 2018-08-24T14:11:21.000Z | 2022-03-30T14:40:48.000Z | #!/usr/bin/env python
"""
Copyright (c) 2018 Alex Forencich
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, merg... | 32.846918 | 103 | 0.634124 |
a67fdda2542a1a0804b65f5d16d9200fcd967d04 | 957 | py | Python | test/unit/mock.py | xtough/sapcli | bdcb54afe387829af251543ef8c17394b5595d4d | [
"Apache-2.0"
] | null | null | null | test/unit/mock.py | xtough/sapcli | bdcb54afe387829af251543ef8c17394b5595d4d | [
"Apache-2.0"
] | null | null | null | test/unit/mock.py | xtough/sapcli | bdcb54afe387829af251543ef8c17394b5595d4d | [
"Apache-2.0"
] | null | null | null | from typing import Dict, NamedTuple
import sap.adt
class Response(NamedTuple):
text: str
status_code: int
headers: Dict
class Request(NamedTuple):
method: str
adt_uri: str
headers: Dict
body: str
params: Dict
def ok_responses():
yield Response(text='', status_code=200, head... | 22.255814 | 84 | 0.660397 |
d422aba8ebdc3f5c081d3073f7479e8ba0f5d229 | 217 | py | Python | L1Trigger/L1TGEM/python/me0TriggerDigis_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | L1Trigger/L1TGEM/python/me0TriggerDigis_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | L1Trigger/L1TGEM/python/me0TriggerDigis_cfi.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | import FWCore.ParameterSet.Config as cms
me0TriggerDigis = cms.EDProducer("ME0TriggerProducer",
ME0PadDigis = cms.InputTag("simMuonME0PadDigis"),
tmbParam = cms.PSet(
verbosity = cms.int32(0)
)
)
| 24.111111 | 54 | 0.709677 |
2ae1ed0d343e2a2c28e827b9cca77ef3199c150c | 1,573 | py | Python | distill/util.py | EthanZhangYC/invariance-equivariance | 6e369fd6f43c6b217740f7acd9533c298c43d360 | [
"MIT"
] | 64 | 2021-03-26T12:11:28.000Z | 2022-03-22T02:19:48.000Z | distill/util.py | wct5217488/invariance-equivariance | 6dfadb39a485d0e55c1cd0c8ce0e0f6dfc602dd3 | [
"MIT"
] | 4 | 2021-03-27T16:14:04.000Z | 2021-11-29T08:11:33.000Z | distill/util.py | wct5217488/invariance-equivariance | 6dfadb39a485d0e55c1cd0c8ce0e0f6dfc602dd3 | [
"MIT"
] | 8 | 2021-06-09T02:41:37.000Z | 2022-02-27T02:14:17.000Z | from __future__ import print_function
import torch.nn as nn
class Embed(nn.Module):
"""Embedding module"""
def __init__(self, dim_in=1024, dim_out=128):
super(Embed, self).__init__()
self.linear = nn.Linear(dim_in, dim_out)
self.l2norm = Normalize(2)
def forward(self, x):
... | 25.370968 | 74 | 0.589955 |
d4bf00f5a699ff23820f9d68a5b932b8702fa4a1 | 169 | py | Python | django_underconstruction/apps.py | koenwoortman/django-underconstruction | 0f00c9b7a8c3cf863c9ac04736fe65724898a847 | [
"MIT"
] | 1 | 2021-08-10T18:01:38.000Z | 2021-08-10T18:01:38.000Z | django_underconstruction/apps.py | koenwoortman/django-underconstruction | 0f00c9b7a8c3cf863c9ac04736fe65724898a847 | [
"MIT"
] | null | null | null | django_underconstruction/apps.py | koenwoortman/django-underconstruction | 0f00c9b7a8c3cf863c9ac04736fe65724898a847 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class DjangoUnderConstructionConfig(AppConfig):
name = 'django_underconstruction'
verbose_name = "Django Under Construction"
| 24.142857 | 47 | 0.798817 |
f7ee4df0fb2f49eed08fecc5043e0186a7446ca8 | 53,769 | py | Python | spectramanipulator/user_namespace.py | dmadea/Spectra-Manipulator | ddc1b27cb4f4691096dfa7b2975df350d2eaf40e | [
"MIT"
] | 1 | 2020-07-18T17:46:01.000Z | 2020-07-18T17:46:01.000Z | spectramanipulator/user_namespace.py | dmadea/Spectra-Manipulator | ddc1b27cb4f4691096dfa7b2975df350d2eaf40e | [
"MIT"
] | null | null | null | spectramanipulator/user_namespace.py | dmadea/Spectra-Manipulator | ddc1b27cb4f4691096dfa7b2975df350d2eaf40e | [
"MIT"
] | null | null | null | import numpy as np
from typing import Iterable
import os
import matplotlib as mpl
import matplotlib.pyplot as plt # we plot graphs with this library
from matplotlib import cm
from matplotlib.ticker import *
import matplotlib.gridspec as gridspec
from matplotlib import colors as c
# from copy import deepcopy
from Py... | 39.391209 | 143 | 0.626513 |
e1aabe1e15b59ed8b6e70688a2cb18114bd67cc3 | 32,714 | py | Python | python/tvm/relay/op/nn/_nn.py | DongZhaoYu/incubator-tvm | e1b053ac07bf6f52ec56713801de5dd040d7f4ac | [
"Apache-2.0"
] | 18 | 2017-08-29T02:26:12.000Z | 2021-12-14T06:13:33.000Z | python/tvm/relay/op/nn/_nn.py | DongZhaoYu/incubator-tvm | e1b053ac07bf6f52ec56713801de5dd040d7f4ac | [
"Apache-2.0"
] | null | null | null | python/tvm/relay/op/nn/_nn.py | DongZhaoYu/incubator-tvm | e1b053ac07bf6f52ec56713801de5dd040d7f4ac | [
"Apache-2.0"
] | 5 | 2018-03-27T01:02:13.000Z | 2020-12-29T00:32:31.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 31.365292 | 102 | 0.728312 |
14e4f9f055bb7864f0f1294cb525fa19e87277d7 | 274,929 | py | Python | src/azure-cli/azure/cli/command_modules/network/_help.py | scottsauber/azure-cli | 29767d75d850ddc1c24cc85bd46d861b61d77a47 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/network/_help.py | scottsauber/azure-cli | 29767d75d850ddc1c24cc85bd46d861b61d77a47 | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/network/_help.py | scottsauber/azure-cli | 29767d75d850ddc1c24cc85bd46d861b61d77a47 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# -----------------------------------------------------... | 39.775608 | 693 | 0.731902 |
384d99cf190d4399c4b3f9b52aa7bbfcaa4b2fe5 | 52,703 | py | Python | bcdi/preprocessing/bcdi_utils.py | ccechatelier/bcdi | cbe3b7960414b03f8e98336c3fcd7b367de441ca | [
"CECILL-B"
] | null | null | null | bcdi/preprocessing/bcdi_utils.py | ccechatelier/bcdi | cbe3b7960414b03f8e98336c3fcd7b367de441ca | [
"CECILL-B"
] | null | null | null | bcdi/preprocessing/bcdi_utils.py | ccechatelier/bcdi | cbe3b7960414b03f8e98336c3fcd7b367de441ca | [
"CECILL-B"
] | null | null | null | # -*- coding: utf-8 -*-
# BCDI: tools for pre(post)-processing Bragg coherent X-ray diffraction imaging data
# (c) 07/2017-06/2019 : CNRS UMR 7344 IM2NP
# (c) 07/2019-05/2021 : DESY PHOTON SCIENCE
# authors:
# Jerome Carnis, jerome.carnis@esrf.fr
"""Functions related to BCDI data preprocessing, befor... | 35.803668 | 88 | 0.57399 |
bb061209ecd5aa421f83c5ddd950a05989e1c880 | 208 | py | Python | trigger_webapp/trigger_app/apps.py | ADACS-Australia/mwa_trigger | 335752efda6251d61f40179fed9a19cf4e58ba85 | [
"MIT"
] | null | null | null | trigger_webapp/trigger_app/apps.py | ADACS-Australia/mwa_trigger | 335752efda6251d61f40179fed9a19cf4e58ba85 | [
"MIT"
] | 9 | 2022-01-31T05:56:48.000Z | 2022-03-16T08:03:59.000Z | trigger_webapp/trigger_app/apps.py | ADACS-Australia/mwa_trigger | 335752efda6251d61f40179fed9a19cf4e58ba85 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class TriggerAppConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'trigger_app'
def ready(self):
import trigger_app.signals | 26 | 56 | 0.740385 |
ac66a0d691935af40cd71aa4b9f0d213457f9571 | 6,822 | py | Python | pydm/data_plugins/__init__.py | ronpandolfi/pydm | 0a4ed7626bfd32d8d0c7b04be1359d89ee00f1fe | [
"BSD-3-Clause-LBNL"
] | null | null | null | pydm/data_plugins/__init__.py | ronpandolfi/pydm | 0a4ed7626bfd32d8d0c7b04be1359d89ee00f1fe | [
"BSD-3-Clause-LBNL"
] | null | null | null | pydm/data_plugins/__init__.py | ronpandolfi/pydm | 0a4ed7626bfd32d8d0c7b04be1359d89ee00f1fe | [
"BSD-3-Clause-LBNL"
] | null | null | null | """
Loads all the data plugins available at the given PYDM_DATA_PLUGINS_PATH
environment variable and subfolders that follows the *_plugin.py and have
classes that inherits from the pydm.data_plugins.PyDMPlugin class.
"""
import os
import sys
import inspect
import logging
import imp
import uuid
from collections import ... | 32.179245 | 79 | 0.624304 |
3e011cc6f5f243b28e4a6f52e471d18d85b15f95 | 1,013 | py | Python | good_spot/filter/migrations/0021_auto_20180329_1459.py | jasmine92122/NightClubBackend | 7f59129b78baaba0e0c25de2b493033b858f1b00 | [
"MIT"
] | null | null | null | good_spot/filter/migrations/0021_auto_20180329_1459.py | jasmine92122/NightClubBackend | 7f59129b78baaba0e0c25de2b493033b858f1b00 | [
"MIT"
] | 5 | 2020-02-12T03:13:11.000Z | 2022-01-13T01:41:14.000Z | good_spot/filter/migrations/0021_auto_20180329_1459.py | jasmine92122/NightClubBackend | 7f59129b78baaba0e0c25de2b493033b858f1b00 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-03-29 14:59
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('filter', '0020_auto_20180329_1446'),
]
operations = [
migrations.AddField(
... | 28.138889 | 62 | 0.595262 |
d6f00bd6b91641b097b243d150a96c81159c0a2a | 1,012 | py | Python | mockthink/test/unit/test_rtime.py | scivey/mockthink | d8c3ec9228cfa4db4d8a108f60f1b3824e05ef28 | [
"MIT"
] | 6 | 2016-02-25T03:51:27.000Z | 2019-10-26T23:20:25.000Z | mockthink/test/unit/test_rtime.py | alexa-infra/mockthink | d8c3ec9228cfa4db4d8a108f60f1b3824e05ef28 | [
"MIT"
] | 3 | 2016-04-13T18:34:23.000Z | 2021-01-16T13:35:49.000Z | mockthink/test/unit/test_rtime.py | deadscivey/mockthink | d8c3ec9228cfa4db4d8a108f60f1b3824e05ef28 | [
"MIT"
] | 7 | 2016-04-12T20:44:32.000Z | 2021-01-15T07:53:03.000Z | import unittest
import datetime
import rethinkdb
from mockthink.test.common import assertEqual
from ... import rtime
class TestRTime(unittest.TestCase):
def test_to_date(self):
timezone = rethinkdb.make_timezone('00:00')
dt = datetime.datetime(2014, 6, 3, 12, 5, 36, tzinfo=timezone)
as_dat... | 32.645161 | 71 | 0.667984 |
4fd874799ecdde1145b0c4ca103892a483c1a06c | 7,894 | py | Python | AhrsManager.py | UM-LoCoLab/NeuroLocoMiddleware | 0dfedeed8d6d8a41518b357b33ee92324b5029c3 | [
"MIT"
] | null | null | null | AhrsManager.py | UM-LoCoLab/NeuroLocoMiddleware | 0dfedeed8d6d8a41518b357b33ee92324b5029c3 | [
"MIT"
] | null | null | null | AhrsManager.py | UM-LoCoLab/NeuroLocoMiddleware | 0dfedeed8d6d8a41518b357b33ee92324b5029c3 | [
"MIT"
] | null | null | null | from SoftRealtimeLoop import SoftRealtimeLoop
import time
import csv
import sys, time
import numpy as np
from os.path import realpath
sys.path.append(r'/usr/share/python3-mscl/') # Path of the MSCL)
import traceback
import mscl
class AhrsManager():
def __init__(self, csv_file_name=None, dt=0.01, port="/dev/tt... | 37.770335 | 129 | 0.563973 |
5b7e364586e9f17917fc724464967c711cdd7fc6 | 10,288 | py | Python | geoist/magmod/tests/dipole_coords.py | CHEN-Zhaohui/geoist | 06a00db3e0ed3d92abf3e45b7b3bfbef6a858a5b | [
"MIT"
] | null | null | null | geoist/magmod/tests/dipole_coords.py | CHEN-Zhaohui/geoist | 06a00db3e0ed3d92abf3e45b7b3bfbef6a858a5b | [
"MIT"
] | null | null | null | geoist/magmod/tests/dipole_coords.py | CHEN-Zhaohui/geoist | 06a00db3e0ed3d92abf3e45b7b3bfbef6a858a5b | [
"MIT"
] | null | null | null | #-------------------------------------------------------------------------------
#
# Magnetic Dipole Coordinates - tests
#
# Author: Steve Shi Chen <chenshi80@gmail.com>
#
# Original Author: Martin Paces <martin.paces@eox.at>
#-------------------------------------------------------------------------------
# Copyright... | 33.511401 | 83 | 0.51701 |
d30d00c8af2158d9250b963be20cba1b9f6b6c35 | 1,712 | py | Python | venv/lib/python3.6/site-packages/xero_python/accounting/models/request_empty.py | 6enno/FarmXero | 881b1e6648e927631b276e66a4c5287e4de2cbc1 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/xero_python/accounting/models/request_empty.py | 6enno/FarmXero | 881b1e6648e927631b276e66a4c5287e4de2cbc1 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/xero_python/accounting/models/request_empty.py | 6enno/FarmXero | 881b1e6648e927631b276e66a4c5287e4de2cbc1 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Accounting API
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
Contact: api@xero.com
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
from xero_python.models import BaseModel
clas... | 25.552239 | 124 | 0.613318 |
ea16f064ee70077956c59a501e7dae311dadb774 | 247,402 | py | Python | nPYc/objects/_targetedDataset.py | ghaggart/nPYc-Toolbox | d0160b476581fbd695f3f5f0303048466ed95864 | [
"MIT"
] | 14 | 2018-01-23T23:10:40.000Z | 2022-02-03T15:15:52.000Z | nPYc/objects/_targetedDataset.py | ghaggart/nPYc-Toolbox | d0160b476581fbd695f3f5f0303048466ed95864 | [
"MIT"
] | 76 | 2018-01-24T17:37:25.000Z | 2022-03-23T14:12:54.000Z | nPYc/objects/_targetedDataset.py | ghaggart/nPYc-Toolbox | d0160b476581fbd695f3f5f0303048466ed95864 | [
"MIT"
] | 11 | 2018-01-25T11:35:47.000Z | 2022-03-07T15:04:02.000Z | """
Module for the import and manipulation of quantified targeted MS data sets.
"""
import copy
import os
import re
from datetime import datetime
import numpy
import pandas
import collections
import warnings
from .._toolboxPath import toolboxPath
from ._dataset import Dataset
from ..utilities import normalisation, rsd... | 71.400289 | 725 | 0.659667 |
7333a49c13050f97fc79f359093c51b5e25a39ac | 1,862 | py | Python | pipeline/objects/function.py | neuro-ai-dev/pipeline | c7edcc83576158062fe48f266dfaea62d754e761 | [
"Apache-2.0"
] | 2 | 2021-11-02T21:31:51.000Z | 2021-11-18T13:27:42.000Z | pipeline/objects/function.py | neuro-ai-dev/pipeline | c7edcc83576158062fe48f266dfaea62d754e761 | [
"Apache-2.0"
] | 5 | 2021-12-06T10:19:26.000Z | 2022-01-06T10:02:53.000Z | pipeline/objects/function.py | neuro-ai-dev/pipeline | c7edcc83576158062fe48f266dfaea62d754e761 | [
"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.646154 | 86 | 0.625134 |
0052eba33d5f67b5225b2ed1e9aebcbaf41932ba | 3,118 | py | Python | examples/rbfn/music_speech/train.py | FrostByte266/neupy | 4b7127e5e4178b0cce023ba36542f5ad3f1d798c | [
"MIT"
] | 801 | 2015-09-23T09:24:47.000Z | 2022-03-29T19:19:03.000Z | examples/rbfn/music_speech/train.py | FrostByte266/neupy | 4b7127e5e4178b0cce023ba36542f5ad3f1d798c | [
"MIT"
] | 277 | 2015-09-22T19:48:50.000Z | 2022-03-11T23:25:32.000Z | examples/rbfn/music_speech/train.py | FrostByte266/neupy | 4b7127e5e4178b0cce023ba36542f5ad3f1d798c | [
"MIT"
] | 194 | 2015-09-23T15:03:57.000Z | 2022-03-31T13:54:46.000Z | """
Music/Speech classification using PNN
-------------------------------------
A similar dataset which was collected for the purposes of
music/speech discrimination. The dataset consists of 120 tracks,
each 30 seconds long. Each class (music/speech) has 60 examples.
The tracks are all 22050Hz Mono 16-bit audio files ... | 30.871287 | 75 | 0.710071 |
2b62fb7c9073ba840523b3f6050dd65f492f0e96 | 1,775 | py | Python | tests/test_cookiecutter_generation.py | uisautomation/django-boilerplate | 62a1162e38fba263021dc39d872cb071533d9cc1 | [
"MIT"
] | null | null | null | tests/test_cookiecutter_generation.py | uisautomation/django-boilerplate | 62a1162e38fba263021dc39d872cb071533d9cc1 | [
"MIT"
] | 26 | 2018-01-18T11:20:34.000Z | 2019-03-10T13:46:52.000Z | tests/test_cookiecutter_generation.py | uisautomation/django-boilerplate | 62a1162e38fba263021dc39d872cb071533d9cc1 | [
"MIT"
] | 2 | 2018-01-11T20:55:44.000Z | 2019-03-11T16:51:23.000Z | import os
import re
import sys
import sh
import pytest
from binaryornot.check import is_binary
PATTERN = "{{(\s?cookiecutter)[.](.*?)}}"
RE_OBJ = re.compile(PATTERN)
@pytest.fixture
def context():
return {
"project_name": "My Test Project",
"project_slug": "test_project",
"application_na... | 26.102941 | 79 | 0.658028 |
c2fc2bf5543fbf922637b56db4d53193bdde8615 | 6,277 | py | Python | src/cfnlint/rules/parameters/AllowedPattern.py | Adam-sHub/cfn-lint | 4c501d01f87ec0ef9432dc407c5a9ac0025f00b6 | [
"MIT-0"
] | 1,134 | 2019-03-02T14:58:34.000Z | 2021-05-15T00:57:16.000Z | src/cfnlint/rules/parameters/AllowedPattern.py | Adam-sHub/cfn-lint | 4c501d01f87ec0ef9432dc407c5a9ac0025f00b6 | [
"MIT-0"
] | 1,122 | 2019-03-03T04:27:15.000Z | 2021-05-14T20:51:16.000Z | src/cfnlint/rules/parameters/AllowedPattern.py | Adam-sHub/cfn-lint | 4c501d01f87ec0ef9432dc407c5a9ac0025f00b6 | [
"MIT-0"
] | 297 | 2019-03-11T09:56:57.000Z | 2021-05-14T16:41:19.000Z | """
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: MIT-0
"""
import re
import six
from cfnlint.rules import CloudFormationLintRule
from cfnlint.rules import RuleMatch
from cfnlint.helpers import RESOURCE_SPECS
class AllowedPattern(CloudFormationLintRule):
"""Check if ... | 51.876033 | 146 | 0.58101 |
16c079dfa5e5ab3060fedab05f08bafd154d43a9 | 804 | py | Python | charts/pagerank2.py | twmarshall/tbd | 35de2a72515f5f1d0004c3d1ca896f5ef7cb4ce4 | [
"Apache-2.0"
] | null | null | null | charts/pagerank2.py | twmarshall/tbd | 35de2a72515f5f1d0004c3d1ca896f5ef7cb4ce4 | [
"Apache-2.0"
] | null | null | null | charts/pagerank2.py | twmarshall/tbd | 35de2a72515f5f1d0004c3d1ca896f5ef7cb4ce4 | [
"Apache-2.0"
] | 2 | 2015-03-03T03:39:26.000Z | 2015-04-13T14:34:11.000Z | import matplotlib
# prevents pyplot from trying to connect to x windowing
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import string
import sys
fig, ax = plt.subplots()
graph_dir = 'charts/'
def plotLine(... | 23.647059 | 158 | 0.575871 |
04bdee9a276d493d4c4c7377dfaeea14881e0ebc | 1,509 | py | Python | python/tests/test_ll_queue.py | mhendricks96/data-structures-and-algorithms | 9c07d284fa8f54a0405a1fc5bda963b6150cc2ef | [
"MIT"
] | null | null | null | python/tests/test_ll_queue.py | mhendricks96/data-structures-and-algorithms | 9c07d284fa8f54a0405a1fc5bda963b6150cc2ef | [
"MIT"
] | 39 | 2021-06-08T04:19:00.000Z | 2022-03-19T17:58:10.000Z | python/tests/test_ll_queue.py | mhendricks96/data-structures-and-algorithms | 9c07d284fa8f54a0405a1fc5bda963b6150cc2ef | [
"MIT"
] | null | null | null | from ll_queue.ll_queue import LL_Queue
from linked_list.linked_list import LinkedList, Node
# Linked List Queue Tests
def test_create_empty_queue():
my_queue = LL_Queue()
actual = len(my_queue)
expected = 0
assert actual == expected
def test_enqueue_one():
my_queue = LL_Queue()
my_queue.enqueu... | 24.737705 | 52 | 0.680583 |
cd182e14524a2ea405595787e2778aa80d5675b9 | 507 | py | Python | pontoon/tags/models.py | oberd/pontoon | 8366905e0e44eabd1f49cf4c57572792d5f2365a | [
"BSD-3-Clause"
] | null | null | null | pontoon/tags/models.py | oberd/pontoon | 8366905e0e44eabd1f49cf4c57572792d5f2365a | [
"BSD-3-Clause"
] | null | null | null | pontoon/tags/models.py | oberd/pontoon | 8366905e0e44eabd1f49cf4c57572792d5f2365a | [
"BSD-3-Clause"
] | 1 | 2019-07-17T21:21:41.000Z | 2019-07-17T21:21:41.000Z |
from django.db import models
from pontoon.base.models import PRIORITY_CHOICES, Project, Resource
class Tag(models.Model):
slug = models.CharField(max_length=20)
name = models.CharField(max_length=30)
project = models.ForeignKey(Project, blank=True, null=True)
resources = models.ManyToManyField(Resou... | 26.684211 | 67 | 0.700197 |
54a2ff0a5a559224427ff503472079019770d2cf | 134 | py | Python | raspy/board_revision.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | raspy/board_revision.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | raspy/board_revision.py | cyrusbuilt/RasPy | 1e34840cc90ea7f19317e881162209d3d819eb09 | [
"MIT"
] | null | null | null | """This module contains the Raspberry Pi board revisions."""
REV1 = 1
"""Revision 1.0 board."""
REV2 = 2
"""Revision 2.x board."""
| 14.888889 | 60 | 0.641791 |
b33c0daf8f6ce981bfdd76918c6ff8ca2e75c322 | 724 | py | Python | feeds/migrations/0001_initial.py | ralphqq/rss-apifier | cd056654abf24fd178f1e5d8661cafcb3cc1236b | [
"MIT"
] | null | null | null | feeds/migrations/0001_initial.py | ralphqq/rss-apifier | cd056654abf24fd178f1e5d8661cafcb3cc1236b | [
"MIT"
] | 5 | 2020-06-06T01:01:48.000Z | 2021-09-22T18:16:22.000Z | feeds/migrations/0001_initial.py | ralphqq/rss-apifier | cd056654abf24fd178f1e5d8661cafcb3cc1236b | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2019-10-23 10:30
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Feed',
fields=[
('id', mode... | 28.96 | 115 | 0.553867 |
e551464369acf97f21f0b9b698761a8fec2f1270 | 12,469 | py | Python | code/python/FundsAPIforDigitalPortals/v2/fds/sdk/FundsAPIforDigitalPortals/model/inline_response2004_share_class_registration_country.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/FundsAPIforDigitalPortals/v2/fds/sdk/FundsAPIforDigitalPortals/model/inline_response2004_share_class_registration_country.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/FundsAPIforDigitalPortals/v2/fds/sdk/FundsAPIforDigitalPortals/model/inline_response2004_share_class_registration_country.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
Funds API For Digital Portals
Search for mutual funds and ETFs using one single consolidated API, including a criteria-based screener. The API provides also base data, key figures, and holdings. A separate endpoint returns the possible values and value range for the parameters that the endpoint /fund/nota... | 47.957692 | 1,125 | 0.594274 |
3c1f6e6f27f361df9eb27fc2d39edd9ab4c05eee | 2,561 | py | Python | c2cgeoportal/scaffolds/update/CONST_alembic/main/versions/5109242131ce_add_column_time_widget.py | craxxkid/c2cgeoportal | 60ca7d5d014d69b0a938f858271c911a30da77c3 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | c2cgeoportal/scaffolds/update/CONST_alembic/main/versions/5109242131ce_add_column_time_widget.py | craxxkid/c2cgeoportal | 60ca7d5d014d69b0a938f858271c911a30da77c3 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | c2cgeoportal/scaffolds/update/CONST_alembic/main/versions/5109242131ce_add_column_time_widget.py | craxxkid/c2cgeoportal | 60ca7d5d014d69b0a938f858271c911a30da77c3 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015-2016, Camptocamp SA
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
#... | 40.650794 | 98 | 0.754393 |
8607704f0d23c096c4ced60c4c6d0771f9084509 | 483 | py | Python | visualizedata.py | scuruchima1/Chicago-COVID19-Forecaster | c83bd71f749b5ca13caed002544cf518f873372f | [
"MIT"
] | null | null | null | visualizedata.py | scuruchima1/Chicago-COVID19-Forecaster | c83bd71f749b5ca13caed002544cf518f873372f | [
"MIT"
] | null | null | null | visualizedata.py | scuruchima1/Chicago-COVID19-Forecaster | c83bd71f749b5ca13caed002544cf518f873372f | [
"MIT"
] | null | null | null | from pandas import read_csv
from pandas.plotting import scatter_matrix
from matplotlib import pyplot
import numpy as np
#Get 7-day moving average data set
dataset = read_csv(r'data/avg.csv')
data = np.genfromtxt(r"data/avg.csv", delimiter=",")
data = list(filter(([]).__ne__, data))
#Plot data, make scatter matrix, an... | 30.1875 | 81 | 0.759834 |
d9e23d7f6c7f869ad7080053248ad39d0614e99d | 1,965 | py | Python | daiquiri/metadata/serializers/dublincore.py | agy-why/daiquiri | 4d3e2ce51e202d5a8f1df404a0094a4e018dcb4d | [
"Apache-2.0"
] | 14 | 2018-12-23T18:35:02.000Z | 2021-12-15T04:55:12.000Z | daiquiri/metadata/serializers/dublincore.py | agy-why/daiquiri | 4d3e2ce51e202d5a8f1df404a0094a4e018dcb4d | [
"Apache-2.0"
] | 40 | 2018-12-20T12:44:05.000Z | 2022-03-21T11:35:20.000Z | daiquiri/metadata/serializers/dublincore.py | agy-why/daiquiri | 4d3e2ce51e202d5a8f1df404a0094a4e018dcb4d | [
"Apache-2.0"
] | 5 | 2019-05-16T08:03:35.000Z | 2021-08-23T20:03:11.000Z | from django.conf import settings
from rest_framework import serializers
from daiquiri.core.serializers import JSONListField
from daiquiri.metadata.models import Schema, Table
class DublincoreSerializer(serializers.ModelSerializer):
title = serializers.SerializerMethodField()
description = serializers.Seria... | 26.2 | 74 | 0.622392 |
e1936433afc40b68b04707a035438554bb375806 | 5,315 | py | Python | tests/test_etl.py | x14119641/small-projects | 20acb97bdbb7ef3e4946821e3476ea451e548e28 | [
"MIT"
] | null | null | null | tests/test_etl.py | x14119641/small-projects | 20acb97bdbb7ef3e4946821e3476ea451e548e28 | [
"MIT"
] | null | null | null | tests/test_etl.py | x14119641/small-projects | 20acb97bdbb7ef3e4946821e3476ea451e548e28 | [
"MIT"
] | null | null | null | from app import etl
import pandas as pd
from app.extensions import mongo
import pytest
doc_1 = {"_id": 2141219,
"iswc": "T0420889173",
"titles": [
{"title": "MALA YERBA",
"type": "OriginalTitle"}
],
"right_owners": [
{"name": "RAFAEL MENDIZAB... | 36.909722 | 160 | 0.614864 |
900c0e215c20d510c7cda1b2afb05136f055cc23 | 8,915 | py | Python | sphinx_markdown_parser/commonmark_parser.py | codejamninja/recommonmark | c5c9e79574ac3521a9357b86238f1d1c88f5859a | [
"MIT"
] | null | null | null | sphinx_markdown_parser/commonmark_parser.py | codejamninja/recommonmark | c5c9e79574ac3521a9357b86238f1d1c88f5859a | [
"MIT"
] | null | null | null | sphinx_markdown_parser/commonmark_parser.py | codejamninja/recommonmark | c5c9e79574ac3521a9357b86238f1d1c88f5859a | [
"MIT"
] | null | null | null | """Docutils CommonMark parser"""
import sys
from os.path import splitext
from docutils import parsers, nodes
from sphinx import addnodes
from commonmark import Parser
from warnings import warn
if sys.version_info < (3, 0):
from urlparse import urlparse
else:
from urllib.parse import urlparse
__all__ = ['C... | 33.389513 | 80 | 0.622658 |
207d583efd6d17cb9ab20dd1c28fa666b5099bb5 | 1,939 | py | Python | src/utils.py | kod3r/GraRep | ac42b59513993e37d29389d4dc23fc758207e96a | [
"MIT"
] | 1 | 2019-12-15T19:33:00.000Z | 2019-12-15T19:33:00.000Z | src/utils.py | kod3r/GraRep | ac42b59513993e37d29389d4dc23fc758207e96a | [
"MIT"
] | null | null | null | src/utils.py | kod3r/GraRep | ac42b59513993e37d29389d4dc23fc758207e96a | [
"MIT"
] | null | null | null | """Dataset reading utilities."""
import numpy as np
import pandas as pd
import networkx as nx
from scipy import sparse
from texttable import Texttable
def create_inverse_degree_matrix(edges):
"""
Creating an inverse degree matrix from an edge list.
:param edges: Edge list.
:return D_1: Inverse degree ... | 31.274194 | 80 | 0.617844 |
7ea7a64258baeceb17c5190974767da7c90347d4 | 1,840 | py | Python | software/logReader/intersect.py | Extent421/bladeBench | 0eb01b88e21e66a7897b3094041196790848b3e0 | [
"MIT"
] | 8 | 2018-10-30T22:04:56.000Z | 2020-07-17T12:50:56.000Z | software/logReader/intersect.py | Extent421/bladeBench | 0eb01b88e21e66a7897b3094041196790848b3e0 | [
"MIT"
] | null | null | null | software/logReader/intersect.py | Extent421/bladeBench | 0eb01b88e21e66a7897b3094041196790848b3e0 | [
"MIT"
] | null | null | null | #
# line segment intersection using vectors
# see Computer Graphics by F.S. Hill
#
from numpy import *
import sys
def perp( a ) :
b = empty_like(a)
b[0] = -a[1]
b[1] = a[0]
return b
# line segment a given by endpoints a1, a2
# line segment b given by endpoints b1, b2
# return
def intersectPoint( a1,a... | 23.896104 | 65 | 0.582065 |
fdda3d8796054ae73cfb79c7261280933007a087 | 11,580 | py | Python | cirq/google/api/v1/programs.py | exAClior/Cirq | 0701327bc66c988428f302dd1e4bed1eef1535a6 | [
"Apache-2.0"
] | 1 | 2021-01-05T19:47:55.000Z | 2021-01-05T19:47:55.000Z | cirq/google/api/v1/programs.py | rohitvuppala/Cirq | 0ff2894e053e4ce3bb1b54e9b9de1cc4345d10b3 | [
"Apache-2.0"
] | 4 | 2021-01-11T10:35:37.000Z | 2021-01-28T19:17:02.000Z | cirq/google/api/v1/programs.py | rohitvuppala/Cirq | 0ff2894e053e4ce3bb1b54e9b9de1cc4345d10b3 | [
"Apache-2.0"
] | 1 | 2021-12-30T21:50:00.000Z | 2021-12-30T21:50:00.000Z | # Copyright 2018 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 33.760933 | 97 | 0.66563 |
e4943d35b3262a5bcf1d5e62067e8ccd576a992e | 8,419 | py | Python | ucsmsdk/mometa/fc/FcStats.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 78 | 2015-11-30T14:10:05.000Z | 2022-02-13T00:29:08.000Z | ucsmsdk/mometa/fc/FcStats.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 113 | 2015-11-20T09:42:46.000Z | 2022-03-16T16:53:29.000Z | ucsmsdk/mometa/fc/FcStats.py | Kego/ucsmsdk | 244f283a5c295cf746110bb96686d079b19927ce | [
"Apache-2.0"
] | 86 | 2015-12-12T08:22:18.000Z | 2022-01-23T03:56:34.000Z | """This module contains the general information for FcStats ManagedObject."""
from ...ucsmo import ManagedObject
from ...ucscoremeta import MoPropertyMeta, MoMeta
from ...ucsmeta import VersionMeta
class FcStatsConsts:
SUSPECT_FALSE = "false"
SUSPECT_NO = "no"
SUSPECT_TRUE = "true"
SUSPECT_YES = "yes... | 69.578512 | 258 | 0.672645 |
48c3e8f6e551ecd77aa66983aa2d678734995b68 | 1,861 | py | Python | predict.py | romanbas/Image_Classifier | 74a675015796b1f6fea0d3439d1007cec2cbe61e | [
"MIT"
] | null | null | null | predict.py | romanbas/Image_Classifier | 74a675015796b1f6fea0d3439d1007cec2cbe61e | [
"MIT"
] | null | null | null | predict.py | romanbas/Image_Classifier | 74a675015796b1f6fea0d3439d1007cec2cbe61e | [
"MIT"
] | null | null | null |
import warnings
warnings.filterwarnings('ignore')
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import tensorflow_hub as hub
import logging
import argparse
import sys
import json
from PIL import Image
#==================================
logger = tf.get_logger()
logger.setLevel(logging.ER... | 27.367647 | 111 | 0.65986 |
ffd8dd1ac30847023f8c964bd02dc624c2b674a1 | 3,528 | py | Python | lib/proxy/tests.py | muffinresearch/solitude | 6cb37f591956111b54e5c4098602be21c8f4b438 | [
"BSD-3-Clause"
] | null | null | null | lib/proxy/tests.py | muffinresearch/solitude | 6cb37f591956111b54e5c4098602be21c8f4b438 | [
"BSD-3-Clause"
] | null | null | null | lib/proxy/tests.py | muffinresearch/solitude | 6cb37f591956111b54e5c4098602be21c8f4b438 | [
"BSD-3-Clause"
] | null | null | null | from django.conf import settings
from django.core.urlresolvers import reverse
import mock
from nose.tools import eq_
import requests
import test_utils
from lib.bango.constants import HEADERS_SERVICE_GET
from lib.bango.tests import samples
from lib.paypal.constants import HEADERS_URL_GET, HEADERS_TOKEN_GET
from lib.p... | 37.136842 | 77 | 0.619331 |
cca53c33de7869782daa1f9c17454a29fcf073ca | 1,736 | py | Python | src/drovirt/models/tasks.py | Storware/drovirt | 4726b237e2f8940a652e2b773ace0742bb788192 | [
"MIT"
] | 22 | 2018-10-19T13:40:56.000Z | 2021-05-11T08:39:37.000Z | src/drovirt/models/tasks.py | Storware/drovirt | 4726b237e2f8940a652e2b773ace0742bb788192 | [
"MIT"
] | 12 | 2019-02-11T15:07:53.000Z | 2019-02-11T15:21:33.000Z | src/drovirt/models/tasks.py | Storware/drovirt | 4726b237e2f8940a652e2b773ace0742bb788192 | [
"MIT"
] | 7 | 2018-12-10T14:17:49.000Z | 2022-02-03T23:43:51.000Z |
import enum
import logging
from sqlalchemy.sql import func
from drovirt.models.base import db, SerializerMixin
from drovirt.models.node import Node
logger = logging.getLogger(__name__)
class TaskStatus(enum.Enum):
QUEUED = "QUEUED"
ACTIVE = "ACTIVE"
COMPLETED = "COMPLETED"
FAILED = "FAILED"
class... | 36.93617 | 89 | 0.710829 |
5f68493d3a0fd0f5eaedcdea581e338d2e96c391 | 1,497 | py | Python | separator.py | AFakeman/HLM-tools | 9a0de2094b6426a1b28c1898f0a3e4d210cb3a81 | [
"Unlicense"
] | null | null | null | separator.py | AFakeman/HLM-tools | 9a0de2094b6426a1b28c1898f0a3e4d210cb3a81 | [
"Unlicense"
] | null | null | null | separator.py | AFakeman/HLM-tools | 9a0de2094b6426a1b28c1898f0a3e4d210cb3a81 | [
"Unlicense"
] | null | null | null | import sys
import os
import struct
from PIL import Image
def read_int32(file):
return int(struct.unpack('<i',file.read(4))[0])
def read_int64(file):
return int(struct.unpack('<q',file.read(8))[0])
def read_string(file, length):
return file.read(length).decode('ASCII')
def read_byte(file):
return in... | 27.722222 | 102 | 0.671343 |
106a9980026e70b39491501daae17c89c19d74c4 | 6,046 | py | Python | turbinia/pubsub.py | sa3eed3ed/turbinia | 1eb4db37813f2bd44dcc2c3764e9411f6a2f9d97 | [
"Apache-2.0"
] | null | null | null | turbinia/pubsub.py | sa3eed3ed/turbinia | 1eb4db37813f2bd44dcc2c3764e9411f6a2f9d97 | [
"Apache-2.0"
] | null | null | null | turbinia/pubsub.py | sa3eed3ed/turbinia | 1eb4db37813f2bd44dcc2c3764e9411f6a2f9d97 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2016 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 ... | 34.352273 | 80 | 0.691035 |
3c69b2136d2bea8a0c391f0c1beeae0a384cab00 | 1,431 | py | Python | surface_coatings/chains/alkylsilane.py | daico007/surface_coatings | fde9086931c7612a74b59975479f76c6b35b2812 | [
"MIT"
] | null | null | null | surface_coatings/chains/alkylsilane.py | daico007/surface_coatings | fde9086931c7612a74b59975479f76c6b35b2812 | [
"MIT"
] | 1 | 2021-10-07T20:38:41.000Z | 2021-10-07T20:38:41.000Z | surface_coatings/chains/alkylsilane.py | daico007/surface_coatings | fde9086931c7612a74b59975479f76c6b35b2812 | [
"MIT"
] | null | null | null | """Routine to create alkylsilane chain."""
import mbuild as mb
from mbuild.lib.recipes import Alkane
from mbuild.lib.moieties import Silane
from surface_coatings.molecules.one_port import OnePort
class Alkylsilane(mb.Compound):
"""A terminal-functionalized alkylsilane chain.
An alkylsilane chain featuring a... | 35.775 | 86 | 0.672956 |
e8fe1fb646df1eb6c525bdcaadeba4d6f8db5d8e | 738 | py | Python | src/omniglot/cli.py | j340m3/omniglot | 0290dba19288479905e9603bfe6a9daf92e5b7b4 | [
"BSD-2-Clause"
] | null | null | null | src/omniglot/cli.py | j340m3/omniglot | 0290dba19288479905e9603bfe6a9daf92e5b7b4 | [
"BSD-2-Clause"
] | 15 | 2016-12-30T14:25:20.000Z | 2022-03-20T16:47:43.000Z | src/omniglot/cli.py | j340m3/omniglot | 0290dba19288479905e9603bfe6a9daf92e5b7b4 | [
"BSD-2-Clause"
] | 1 | 2016-12-30T14:25:42.000Z | 2016-12-30T14:25:42.000Z | """
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 -momniglot` python will execute
``__main__.py`` as a s... | 30.75 | 80 | 0.711382 |
00a44825f6dabeca7cce793d38caca55cab3c644 | 6,827 | py | Python | ros/src/tl_detector/light_classification/tl_classifier_object_detect.py | stela/CarND-Capstone | d7bdbdef35519df97775a1407ab65c91ff6eba46 | [
"MIT"
] | 1 | 2018-05-10T16:46:11.000Z | 2018-05-10T16:46:11.000Z | ros/src/tl_detector/light_classification/tl_classifier_object_detect.py | stela/CarND-Capstone | d7bdbdef35519df97775a1407ab65c91ff6eba46 | [
"MIT"
] | 7 | 2018-06-20T20:42:53.000Z | 2018-08-21T13:51:30.000Z | ros/src/tl_detector/light_classification/tl_classifier_object_detect.py | stela/CarND-Capstone | d7bdbdef35519df97775a1407ab65c91ff6eba46 | [
"MIT"
] | 2 | 2018-07-02T21:48:08.000Z | 2018-07-06T20:03:29.000Z | from styx_msgs.msg import TrafficLight
import tensorflow as tf
import numpy as np
import datetime
from PIL import Image
class TLClassifierObjDetect(object):
"""
This class uses the trained model from the TensorFlow Object Detection API.
https://github.com/tensorflow/models/tree/master/research/object_det... | 41.375758 | 123 | 0.630877 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.