hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
02c504da3617b05aec2853291b2be3371afce47d | 9,667 | py | Python | CLI_Wallet.py | Onyx-Official/duino-coin | 6c2984097d93354f3738437e44d7db1d1b3113ae | [
"MIT"
] | null | null | null | CLI_Wallet.py | Onyx-Official/duino-coin | 6c2984097d93354f3738437e44d7db1d1b3113ae | [
"MIT"
] | null | null | null | CLI_Wallet.py | Onyx-Official/duino-coin | 6c2984097d93354f3738437e44d7db1d1b3113ae | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
##########################################
# Duino-Coin CLI Wallet (v1.6)
# https://github.com/revoxhere/duino-coin
# Distributed under MIT license
# © Duino-Coin Community 2020
##########################################
import socket, configparser, getpass, os, platform, sys, time, json, dateti... | 41.48927 | 187 | 0.670735 |
5cec23644954a268c9702069b599e6f5b4065c27 | 1,352 | py | Python | tests/integration/projects/general_non_batch/tests/test_microbatch.py | niits/BentoML | 3954f36762e10f5df15af7e0ae6dd71f5f214261 | [
"Apache-2.0"
] | 3,451 | 2019-04-02T01:47:42.000Z | 2022-03-31T16:20:49.000Z | tests/integration/projects/general_non_batch/tests/test_microbatch.py | niits/BentoML | 3954f36762e10f5df15af7e0ae6dd71f5f214261 | [
"Apache-2.0"
] | 1,925 | 2019-04-03T00:19:05.000Z | 2022-03-31T22:41:54.000Z | tests/integration/projects/general_non_batch/tests/test_microbatch.py | niits/BentoML | 3954f36762e10f5df15af7e0ae6dd71f5f214261 | [
"Apache-2.0"
] | 451 | 2019-04-02T01:53:41.000Z | 2022-03-29T08:49:06.000Z | import asyncio
import psutil
import pytest
DEFAULT_MAX_LATENCY = 10 * 1000
@pytest.mark.skipif(not psutil.POSIX, reason="production server only works on POSIX")
@pytest.mark.asyncio
async def test_batch_size_limit(host):
A, B = 0.0002, 0.01
data = '{"a": %s, "b": %s}' % (A, B)
# test for max_batch_size... | 27.04 | 85 | 0.56287 |
292c38e0294e6898c256d5b61559a5b2ac22c455 | 6,779 | py | Python | instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py | willarmiros/opentelemetry-python-contrib | 0d34ef26b75f9a3bc275bf828b5a806d39ba1a40 | [
"Apache-2.0",
"BSD-3-Clause"
] | 208 | 2020-04-07T21:18:03.000Z | 2022-03-31T21:45:30.000Z | instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py | willarmiros/opentelemetry-python-contrib | 0d34ef26b75f9a3bc275bf828b5a806d39ba1a40 | [
"Apache-2.0",
"BSD-3-Clause"
] | 636 | 2020-04-08T17:39:48.000Z | 2022-03-31T18:48:40.000Z | instrumentation/opentelemetry-instrumentation-pyramid/src/opentelemetry/instrumentation/pyramid/callbacks.py | willarmiros/opentelemetry-python-contrib | 0d34ef26b75f9a3bc275bf828b5a806d39ba1a40 | [
"Apache-2.0",
"BSD-3-Clause"
] | 172 | 2020-06-05T22:33:37.000Z | 2022-03-30T13:57:27.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 ... | 36.446237 | 101 | 0.690515 |
3c6c5a246fd48e454018623246cca4b8a9abdd8d | 4,544 | py | Python | tfx/components/statistics_gen/component.py | jkim1014/tfx | 5a4229639343a373fe4da9295b1ee5113912a902 | [
"Apache-2.0"
] | null | null | null | tfx/components/statistics_gen/component.py | jkim1014/tfx | 5a4229639343a373fe4da9295b1ee5113912a902 | [
"Apache-2.0"
] | null | null | null | tfx/components/statistics_gen/component.py | jkim1014/tfx | 5a4229639343a373fe4da9295b1ee5113912a902 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC. 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 a... | 44.54902 | 80 | 0.733495 |
5a55e4c19eec5cd071f5749a5c8a69cc8eb37a46 | 22 | py | Python | samflow/__init__.py | samesense/chilin | d61893d58dc7ff98293ae9d3d11a03a247040404 | [
"BSD-3-Clause"
] | 29 | 2016-09-27T15:33:27.000Z | 2021-07-14T03:26:53.000Z | samflow/__init__.py | samesense/chilin | d61893d58dc7ff98293ae9d3d11a03a247040404 | [
"BSD-3-Clause"
] | 15 | 2015-11-22T13:12:03.000Z | 2022-01-19T02:18:25.000Z | samflow/__init__.py | samesense/chilin | d61893d58dc7ff98293ae9d3d11a03a247040404 | [
"BSD-3-Clause"
] | 9 | 2015-03-30T14:37:26.000Z | 2019-06-20T19:06:07.000Z | __author__ = 'ad9075'
| 11 | 21 | 0.727273 |
9bac53e2a8234d8a1b121df673a2bc24bf49c0f9 | 494 | py | Python | wrappers/python/tests/did/test_key_for_local_did.py | sklump/indy-sdk | ee05a89ddf60b42f7483bebf2d89a936e12730df | [
"Apache-2.0"
] | 636 | 2017-05-25T07:45:43.000Z | 2022-03-23T22:30:34.000Z | wrappers/python/tests/did/test_key_for_local_did.py | Nick-1979/indy-sdk | e5f812e14962f0d51cf96f843033754ff841ce30 | [
"Apache-2.0"
] | 731 | 2017-05-29T07:15:08.000Z | 2022-03-31T07:55:58.000Z | wrappers/python/tests/did/test_key_for_local_did.py | Nick-1979/indy-sdk | e5f812e14962f0d51cf96f843033754ff841ce30 | [
"Apache-2.0"
] | 904 | 2017-05-25T07:45:49.000Z | 2022-03-31T07:43:31.000Z | import pytest
from indy import did, error
@pytest.mark.asyncio
async def test_key_for_local_did_works(wallet_handle, identity_trustee1):
(_did, verkey) = identity_trustee1
received_key = await did.key_for_local_did(wallet_handle, _did)
assert verkey == received_key
@pytest.mark.asyncio
async def test_k... | 29.058824 | 79 | 0.799595 |
9511c7ac36ce3e233d06d6fc4682be2eb09ba8c8 | 3,216 | py | Python | tests/convert_test.py | sbck/onnx-coreml | cf71a8d576ac0ae81663e3bf42d0d3d78fea9acf | [
"MIT"
] | 1 | 2019-11-25T16:38:01.000Z | 2019-11-25T16:38:01.000Z | tests/convert_test.py | gustavla/onnx-coreml | a410caae96e237a394a3da4277ad2e75014ff96f | [
"MIT"
] | null | null | null | tests/convert_test.py | gustavla/onnx-coreml | a410caae96e237a394a3da4277ad2e75014ff96f | [
"MIT"
] | 1 | 2019-06-09T06:19:01.000Z | 2019-06-09T06:19:01.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import unittest
import numpy as np
import numpy.testing as npt # type: ignore
import numpy.random as npr
from PIL import Image # type: ignore
from onnx_coreml import ... | 34.580645 | 76 | 0.598259 |
0a33835e5b629fcb49ebe7f1f46ec200c516f30b | 1,434 | py | Python | NumericalIntegral/simpson_formula.py | KristopherTsui/NumericalAnalysisExperiment | c751c2c4f94c0943f1b00b5fb52f56e7ba240bbf | [
"MIT"
] | null | null | null | NumericalIntegral/simpson_formula.py | KristopherTsui/NumericalAnalysisExperiment | c751c2c4f94c0943f1b00b5fb52f56e7ba240bbf | [
"MIT"
] | null | null | null | NumericalIntegral/simpson_formula.py | KristopherTsui/NumericalAnalysisExperiment | c751c2c4f94c0943f1b00b5fb52f56e7ba240bbf | [
"MIT"
] | null | null | null | import math
import numpy as np
def f(x):
return np.exp(-1*x**2)
def g(x):
return np.sin(x) / x
def trapezoid_formula(inte, func):
""" Calculate the integral by trapezoid formula
Args:
inte: ndarray, the integrand interval
func: function object, the integrand function
Returns:... | 26.072727 | 99 | 0.651325 |
499632721be82134e7905e244855c7dfe243613c | 1,246 | py | Python | scripts/producer.py | eykop/Web-Monitoring-Kafka-PostgreSQL | d80ae6b1998c7c00af23cb805843162b9e6135b8 | [
"MIT"
] | null | null | null | scripts/producer.py | eykop/Web-Monitoring-Kafka-PostgreSQL | d80ae6b1998c7c00af23cb805843162b9e6135b8 | [
"MIT"
] | null | null | null | scripts/producer.py | eykop/Web-Monitoring-Kafka-PostgreSQL | d80ae6b1998c7c00af23cb805843162b9e6135b8 | [
"MIT"
] | 1 | 2021-06-03T11:53:43.000Z | 2021-06-03T11:53:43.000Z | import argparse
import os
import logging
from kafka_postgres.settings import settings
from kafka_postgres.settings.exceptions import ConfigurationException
from scripts.web_check import start_web_monitoring_website_checking
log = logging.getLogger("kafka_postgresql_demo")
# Configure logging
from kafka_postgres.sett... | 28.976744 | 95 | 0.743981 |
3ce56f71060c591c2318e5020adb34922c765349 | 2,946 | py | Python | src/mitre/securingai/sdk/exceptions/pyplugs.py | usnistgov/dioptra | 08a08e96c27787915bafc75a483431333e2c70ca | [
"CC-BY-4.0"
] | 14 | 2021-06-17T15:16:12.000Z | 2021-11-08T10:25:37.000Z | src/mitre/securingai/sdk/exceptions/pyplugs.py | usnistgov/dioptra | 08a08e96c27787915bafc75a483431333e2c70ca | [
"CC-BY-4.0"
] | 7 | 2021-09-20T20:20:26.000Z | 2022-03-30T13:17:43.000Z | src/mitre/securingai/sdk/exceptions/pyplugs.py | usnistgov/dioptra | 08a08e96c27787915bafc75a483431333e2c70ca | [
"CC-BY-4.0"
] | 4 | 2021-06-29T16:52:42.000Z | 2022-01-21T16:56:45.000Z | # This Software (Dioptra) is being made available as a public service by the
# National Institute of Standards and Technology (NIST), an Agency of the United
# States Department of Commerce. This software was developed in part by employees of
# NIST and in part by NIST contractors. Copyright in portions of this softwar... | 49.1 | 120 | 0.784114 |
5603ea11e04d2cbaee7e20307902459802922b11 | 928 | py | Python | test/models.py | oreilm49/sqlalchemy-filters | 93c5a7399a2a2edeb796079193becd134f369ae8 | [
"Apache-2.0"
] | null | null | null | test/models.py | oreilm49/sqlalchemy-filters | 93c5a7399a2a2edeb796079193becd134f369ae8 | [
"Apache-2.0"
] | null | null | null | test/models.py | oreilm49/sqlalchemy-filters | 93c5a7399a2a2edeb796079193becd134f369ae8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from sqlalchemy import (
Column, Date, DateTime, ForeignKey, Integer, String, Time
)
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import relationship
class Base(object):
id = Column(Integer, primary_key=True)
name = Column(String(50), nullable=False)... | 19.744681 | 65 | 0.69181 |
6c1f77c633c0de4e73f1335e0095333d1df3bc38 | 1,229 | py | Python | tdd/polls/migrations/0001_initial.py | nokiadev/django-tdd-dojo | 39ecead6ad1bd86813a124b44d9184c66b01ccfd | [
"MIT"
] | 1 | 2015-11-27T21:45:27.000Z | 2015-11-27T21:45:27.000Z | tdd/polls/migrations/0001_initial.py | valdergallo/django-tdd-dojo | 39ecead6ad1bd86813a124b44d9184c66b01ccfd | [
"MIT"
] | null | null | null | tdd/polls/migrations/0001_initial.py | valdergallo/django-tdd-dojo | 39ecead6ad1bd86813a124b44d9184c66b01ccfd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9c1 on 2015-11-27 21:57
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Creat... | 31.512821 | 114 | 0.585842 |
82c2a1dad07376aeee24035d6bb43b8a262be37c | 11,776 | py | Python | tools/data-generation/causal-occlusion/render.py | brendel-group/causal-understanding-via-visualizations | 3cd1a30f4305c48b1a715da5f62a552d803fb933 | [
"MIT"
] | 6 | 2021-06-30T11:10:48.000Z | 2022-01-14T11:36:14.000Z | tools/data-generation/causal-occlusion/render.py | brendel-group/causal-understanding-via-visualizations | 3cd1a30f4305c48b1a715da5f62a552d803fb933 | [
"MIT"
] | null | null | null | tools/data-generation/causal-occlusion/render.py | brendel-group/causal-understanding-via-visualizations | 3cd1a30f4305c48b1a715da5f62a552d803fb933 | [
"MIT"
] | null | null | null | # copied from https://github.com/bethgelab/testing_visualizations/blob/master/generate_stimuli/render.py on 18.04.2021
#
# modified: do not show rendered images but just return them
#
# Copyright 2018 The Lucid Authors. All Rights Reserved.
#
# Modified by Roland S. Zimmermann, Judy Borowski
#
# Licensed under the Apac... | 38.358306 | 118 | 0.663043 |
448f352a8ca24aef8f427886aaf00b38e5822eed | 5,544 | py | Python | src/oci/core/models/copy_volume_backup_details.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 249 | 2017-09-11T22:06:05.000Z | 2022-03-04T17:09:29.000Z | src/oci/core/models/copy_volume_backup_details.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 228 | 2017-09-11T23:07:26.000Z | 2022-03-23T10:58:50.000Z | src/oci/core/models/copy_volume_backup_details.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 224 | 2017-09-27T07:32:43.000Z | 2022-03-25T16:55:42.000Z | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 34.434783 | 245 | 0.676768 |
28cb5e0212afb0bee498e6ac2ce544c6782da9a6 | 6,942 | py | Python | lh_exp/road_deeplabv3plus/lh_road_deeplabv3plus.py | kiddliao/mmsegmentation | 6c87da0d6de3fc3a3fb7538f10424957d1235436 | [
"Apache-2.0"
] | null | null | null | lh_exp/road_deeplabv3plus/lh_road_deeplabv3plus.py | kiddliao/mmsegmentation | 6c87da0d6de3fc3a3fb7538f10424957d1235436 | [
"Apache-2.0"
] | null | null | null | lh_exp/road_deeplabv3plus/lh_road_deeplabv3plus.py | kiddliao/mmsegmentation | 6c87da0d6de3fc3a3fb7538f10424957d1235436 | [
"Apache-2.0"
] | null | null | null | norm_cfg = dict(type='BN', requires_grad=True)
model = dict(
type='EncoderDecoder',
pretrained='open-mmlab://resnet101_v1c',
backbone=dict(
type='ResNetV1c',
depth=101,
num_stages=4,
out_indices=(0, 1, 2, 3),
dilations=(1, 1, 2, 4),
strides=(1, 2, 1, 1),
... | 35.6 | 79 | 0.530683 |
fa0815ffafc293a3aea58cc19bd4a3ff311cc0ba | 2,697 | py | Python | docs/source/conf.py | Geoffysicist/PhysBryk | a3e5684bf9f12df49ad34a536ef6cc23f7473982 | [
"CC0-1.0"
] | null | null | null | docs/source/conf.py | Geoffysicist/PhysBryk | a3e5684bf9f12df49ad34a536ef6cc23f7473982 | [
"CC0-1.0"
] | 10 | 2020-10-19T10:02:59.000Z | 2020-11-24T08:18:30.000Z | docs/source/conf.py | Geoffysicist/PhysBryk | a3e5684bf9f12df49ad34a536ef6cc23f7473982 | [
"CC0-1.0"
] | 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... | 35.025974 | 109 | 0.675936 |
5d7018b1df61333e7bb27f43a9548bb6e49ad1e1 | 5,940 | py | Python | datasets/prepare_common_voice.py | sciforce/asr-pytorch | 43978de858c534b549f70c72f31339b7ee691356 | [
"MIT"
] | 4 | 2020-03-28T03:08:05.000Z | 2021-01-01T10:05:59.000Z | datasets/prepare_common_voice.py | sciforce/asr-pytorch | 43978de858c534b549f70c72f31339b7ee691356 | [
"MIT"
] | null | null | null | datasets/prepare_common_voice.py | sciforce/asr-pytorch | 43978de858c534b549f70c72f31339b7ee691356 | [
"MIT"
] | 1 | 2021-09-10T04:51:29.000Z | 2021-09-10T04:51:29.000Z | import csv
import json
from argparse import ArgumentParser
from tqdm.auto import tqdm
from pathlib import Path
from utils.ipa_encoder import IPAEncoder
from utils.logger import get_logger
from utils.ipa_utils import IPAError
logger = get_logger('asr.train')
def collect_data(directory, langs_list=None, subset='train... | 44.661654 | 132 | 0.634512 |
1f1a32de20f47397c9a9906ca3f06fa5ca1d8bf7 | 9,753 | py | Python | ops/io.py | PeterDeWeirdt/OpticalPooledScreens | 43c9cc7bf9beae90d02bb0e516c0669e7a107682 | [
"MIT"
] | null | null | null | ops/io.py | PeterDeWeirdt/OpticalPooledScreens | 43c9cc7bf9beae90d02bb0e516c0669e7a107682 | [
"MIT"
] | null | null | null | ops/io.py | PeterDeWeirdt/OpticalPooledScreens | 43c9cc7bf9beae90d02bb0e516c0669e7a107682 | [
"MIT"
] | null | null | null | import numpy as np
import os
import pandas as pd
import six
import struct
import warnings
import ops.utils
import ops.constants
from ops.tifffile_new import imread
# currently needed to save ImageJ-compatible hyperstacks
from ops.tifffile_old import imsave
imagej_description = ''.join(['ImageJ=1.49v\nimages=%d\nchann... | 34.585106 | 97 | 0.602174 |
14f45808ae7971ae1eb9d7547259a4dca1f7a0a9 | 16,820 | py | Python | tests.py | id0Sch/httpagentparser | a990bb5069d625222c66ba18da1e5d9656852b4d | [
"MIT"
] | null | null | null | tests.py | id0Sch/httpagentparser | a990bb5069d625222c66ba18da1e5d9656852b4d | [
"MIT"
] | null | null | null | tests.py | id0Sch/httpagentparser | a990bb5069d625222c66ba18da1e5d9656852b4d | [
"MIT"
] | null | null | null | import unittest
import time
import httpagentparser
detect = httpagentparser.detect
simple_detect = httpagentparser.simple_detect
data = (
# tuple of tuples
# tuple (agent-string, expected result of simple_detect, expected result of detect)
("Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.0.10) Gecko/20... | 77.511521 | 237 | 0.603151 |
c61f11de079c47fc238e84d78fc301c9f56b3630 | 6,750 | py | Python | tensorflow/vocab.py | a414351664/DuReader | 799a97b34d74505c0cfdf16d31232d9de0abd1a8 | [
"Apache-2.0"
] | 1 | 2019-05-17T00:47:20.000Z | 2019-05-17T00:47:20.000Z | tensorflow/vocab.py | a414351664/DuReader | 799a97b34d74505c0cfdf16d31232d9de0abd1a8 | [
"Apache-2.0"
] | null | null | null | tensorflow/vocab.py | a414351664/DuReader | 799a97b34d74505c0cfdf16d31232d9de0abd1a8 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf8 -*-
# ==============================================================================
# Copyright 2017 Baidu.com, 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 th... | 33.75 | 97 | 0.564889 |
bed267c4c65195abc8b1f8b003c89ec04730d6df | 7,034 | py | Python | examples/pointnet/train_segmentation.py | UofT-EcoSystem/hfta | 3ecde20363570b65f4f9656ff3204fe31f2ddcc0 | [
"MIT"
] | 24 | 2021-04-06T20:36:10.000Z | 2022-02-26T17:03:33.000Z | examples/pointnet/train_segmentation.py | UofT-EcoSystem/hfta | 3ecde20363570b65f4f9656ff3204fe31f2ddcc0 | [
"MIT"
] | 20 | 2021-04-02T00:51:34.000Z | 2022-03-29T15:00:08.000Z | examples/pointnet/train_segmentation.py | UofT-EcoSystem/hfta | 3ecde20363570b65f4f9656ff3204fe31f2ddcc0 | [
"MIT"
] | 5 | 2021-04-11T20:07:32.000Z | 2021-06-14T06:41:05.000Z | import argparse
import numpy as np
import os
import pandas as pd
import random
import time
import torch
import torch.cuda.amp as amp
import torch.nn.functional as F
import torch.optim as optim
import torch.utils.data
from dataset import ShapeNetDataset
from model import PointNetDenseCls, feature_transform_regularizer
... | 25.032028 | 80 | 0.673443 |
5350e6dfebeb26bde52cde0e7f2c8be7cf514d1e | 717 | py | Python | userge/versions.py | wildyvpn-network/bot | 87459495000bd6004b8f62a9cb933c164da9ef29 | [
"MIT"
] | null | null | null | userge/versions.py | wildyvpn-network/bot | 87459495000bd6004b8f62a9cb933c164da9ef29 | [
"MIT"
] | null | null | null | userge/versions.py | wildyvpn-network/bot | 87459495000bd6004b8f62a9cb933c164da9ef29 | [
"MIT"
] | null | null | null | # pylint: disable=missing-module-docstring
#
# Copyright (C) 2020 by UsergeTeam@Github, < https://github.com/UsergeTeam >.
#
# This file is part of < https://github.com/UsergeTeam/Userge > project,
# and is released under the "GNU v3.0 License Agreement".
# Please see < https://github.com/uaudith/Userge/blob/master/LIC... | 32.590909 | 88 | 0.746165 |
bab807a3406ff012467dbd88e6efca3001fcb791 | 978 | py | Python | setup.py | papachristoumarios/sade | 06560dafc8b805585463a0f26c4809682118a1f1 | [
"MIT"
] | 7 | 2019-06-25T17:11:05.000Z | 2021-05-31T01:58:34.000Z | setup.py | azterizk/sade | 06560dafc8b805585463a0f26c4809682118a1f1 | [
"MIT"
] | 1 | 2020-09-25T03:30:17.000Z | 2020-09-25T03:30:17.000Z | setup.py | azterizk/sade | 06560dafc8b805585463a0f26c4809682118a1f1 | [
"MIT"
] | 1 | 2021-05-31T01:58:16.000Z | 2021-05-31T01:58:16.000Z | """Setup module"""
from setuptools import setup
setup(
name='sade',
version='1.0',
description='Software Architecture with Document Embeddings',
author='Marios Papachristou',
author_email='papachristoumarios@gmail.com',
url='https://github.com/papachristoumarios/sade',
packages=[
's... | 27.942857 | 65 | 0.592025 |
7e693a1622008c326f48779623956e16ab40390e | 6,560 | py | Python | neutron/services/qos/drivers/ovn/driver.py | krissterckx/neutron | 396deed808dc9b69d4641ffe16bcbe6655bc6cd5 | [
"Apache-2.0"
] | null | null | null | neutron/services/qos/drivers/ovn/driver.py | krissterckx/neutron | 396deed808dc9b69d4641ffe16bcbe6655bc6cd5 | [
"Apache-2.0"
] | null | null | null | neutron/services/qos/drivers/ovn/driver.py | krissterckx/neutron | 396deed808dc9b69d4641ffe16bcbe6655bc6cd5 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 37.485714 | 78 | 0.66311 |
0c928ee795972be39b4ca980ff6c533b542c77cf | 545 | py | Python | url_shortener/shortener/migrations/0001_initial.py | dogukanteber/url-shortener | baa1cdf85964e3e5bf9ff4760f9cbf4530b18b83 | [
"Unlicense"
] | null | null | null | url_shortener/shortener/migrations/0001_initial.py | dogukanteber/url-shortener | baa1cdf85964e3e5bf9ff4760f9cbf4530b18b83 | [
"Unlicense"
] | null | null | null | url_shortener/shortener/migrations/0001_initial.py | dogukanteber/url-shortener | baa1cdf85964e3e5bf9ff4760f9cbf4530b18b83 | [
"Unlicense"
] | null | null | null | # Generated by Django 4.0 on 2021-12-18 16:49
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Url',
fields=[
('id', models.BigAutoField(aut... | 23.695652 | 117 | 0.570642 |
9d45d7679244149747cff896627fd5af01a41da9 | 19,920 | py | Python | third_party/ros_aarch64/lib/python2.7/dist-packages/visualization_msgs/msg/_MarkerArray.py | silverland79/apollo1.0 | 6e725e8dd5013b769efa18f43e5ae675f4847fbd | [
"Apache-2.0"
] | 2 | 2018-01-29T03:10:39.000Z | 2020-12-08T09:08:41.000Z | third_party/ros_x86_64/lib/python2.7/dist-packages/visualization_msgs/msg/_MarkerArray.py | silverland79/apollo1.0 | 6e725e8dd5013b769efa18f43e5ae675f4847fbd | [
"Apache-2.0"
] | null | null | null | third_party/ros_x86_64/lib/python2.7/dist-packages/visualization_msgs/msg/_MarkerArray.py | silverland79/apollo1.0 | 6e725e8dd5013b769efa18f43e5ae675f4847fbd | [
"Apache-2.0"
] | 3 | 2018-01-29T12:22:56.000Z | 2020-12-08T09:08:46.000Z | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from visualization_msgs/MarkerArray.msg. Do not edit."""
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
import genpy
import geometry_msgs.msg
import visualization_msgs.msg
import std_msgs.msg... | 34.168096 | 178 | 0.572038 |
20ac9d0ac216806087fb5ad8056ab93bab0ea445 | 5,544 | py | Python | rstfinder/rst_parse_batch.py | aoifecahill/discourse-parsing | fa78d6a4585c38541f4f350d967ecbd60a67d4c3 | [
"MIT"
] | 75 | 2015-03-31T07:03:34.000Z | 2020-08-28T06:55:15.000Z | rstfinder/rst_parse_batch.py | aoifecahill/discourse-parsing | fa78d6a4585c38541f4f350d967ecbd60a67d4c3 | [
"MIT"
] | 20 | 2015-04-14T17:38:54.000Z | 2020-09-15T14:28:12.000Z | rstfinder/rst_parse_batch.py | aoifecahill/discourse-parsing | fa78d6a4585c38541f4f350d967ecbd60a67d4c3 | [
"MIT"
] | 17 | 2015-05-16T13:03:32.000Z | 2020-08-28T06:55:16.000Z | #!/usr/bin/env python
"""
Functions for batch-parsing multiple documents in parallel.
:author: Michael Heilman
:author: Nitin Madnani
:organization: ETS
"""
import argparse
import json
import logging
import math
from concurrent.futures import ProcessPoolExecutor
from multiprocessing import cpu_count
from .discourse_p... | 38.234483 | 107 | 0.555375 |
faf5813f0ec41c32db53500ddda10c943971f313 | 11,709 | py | Python | dearpypixl/containers.py | Atlamillias/pixl-engine | c4217a3a65e01e49d05bf7f07946d65484f6e1da | [
"MIT"
] | 6 | 2021-08-28T03:22:19.000Z | 2021-10-14T22:04:04.000Z | dearpypixl/containers.py | Atlamillias/pixl-engine | c4217a3a65e01e49d05bf7f07946d65484f6e1da | [
"MIT"
] | 1 | 2021-07-29T16:51:28.000Z | 2021-08-03T00:24:11.000Z | dearpypixl/containers.py | Atlamillias/pixl-engine | c4217a3a65e01e49d05bf7f07946d65484f6e1da | [
"MIT"
] | null | null | null | from typing import Union, Callable, Any
from time import sleep
from dearpygui import _dearpygui
import dearpypixl.appitems.containers
from dearpypixl.appitems.containers import *
from dearpypixl.components import Container, Widget, ItemEvents, item_attribute, ItemAttribute, ContainerItemT, WidgetItemT
from dearpypixl... | 33.646552 | 123 | 0.617388 |
4488c384be2b8e0f7606d358e79c2b76a2a85cab | 1,162 | py | Python | server/openslides/utils/stream.py | Gersdorfa/OpenSlides | fca1e94759ba32de2e57fec083d8973d095f1cd0 | [
"MIT"
] | 1 | 2019-08-23T20:39:34.000Z | 2019-08-23T20:39:34.000Z | server/openslides/utils/stream.py | Gersdorfa/OpenSlides | fca1e94759ba32de2e57fec083d8973d095f1cd0 | [
"MIT"
] | 2 | 2021-11-02T15:53:58.000Z | 2022-03-02T12:19:49.000Z | server/openslides/utils/stream.py | DLRG-Jugend-NDS/OpenSlides | 03704e4852821ccd67fe23adb6e2c38b67d93732 | [
"MIT"
] | null | null | null | import json
from typing import Any
from django.conf import settings
from typing_extensions import Protocol
from . import logging
from .redis import use_redis
logger = logging.getLogger(__name__)
REDIS_STREAM_MAXLEN = getattr(settings, "REDIS_STREAM_MAXLEN", None)
logger.info(f"Redis stream maxlen {REDIS_STREAM_MAX... | 22.784314 | 84 | 0.674699 |
25786592fc2a8610ece938f12e39577fb5140aea | 218 | py | Python | Financial market/decorators.py | kirillzx/Agent-based-modeling | 8f3ef7d42e4424a603781ade7f9eb643582bf2ea | [
"MIT"
] | null | null | null | Financial market/decorators.py | kirillzx/Agent-based-modeling | 8f3ef7d42e4424a603781ade7f9eb643582bf2ea | [
"MIT"
] | null | null | null | Financial market/decorators.py | kirillzx/Agent-based-modeling | 8f3ef7d42e4424a603781ade7f9eb643582bf2ea | [
"MIT"
] | 1 | 2019-10-10T16:23:51.000Z | 2019-10-10T16:23:51.000Z | import time
def timeit(func):
def wrapper(*args, **kwargs):
t1 = time.time()
f = func(*args, **kwargs)
t2 = time.time() - t1
print(t2)
return f
return wrapper
| 19.818182 | 34 | 0.490826 |
fc089aa4786bb12f2983b5c65ca0d8b081dc49d9 | 2,400 | py | Python | heuristics/greedy_optimisation.py | pdecol/mixed-linear-layouts | 377e8c441686ce128e37962f73c57fcf5d4fb440 | [
"MIT"
] | null | null | null | heuristics/greedy_optimisation.py | pdecol/mixed-linear-layouts | 377e8c441686ce128e37962f73c57fcf5d4fb440 | [
"MIT"
] | null | null | null | heuristics/greedy_optimisation.py | pdecol/mixed-linear-layouts | 377e8c441686ce128e37962f73c57fcf5d4fb440 | [
"MIT"
] | null | null | null | import random
def _greedy_edge_assignment_optimization(mll):
edges = list(mll.stack + mll.queue)
random.shuffle(edges)
for edge in edges:
crossings = mll.crossings_of_edge_on_page(edge, mll.stack)
nestings = mll.nestings_of_edge_on_page(edge, mll.queue)
if edge in mll.stack and ne... | 28.235294 | 71 | 0.644583 |
4a9b46d66378f5fe1cb4b07da4884761faa854f9 | 2,018 | py | Python | cirrocumulus/json_io.py | jkanche/cirrocumulus | 242a178fd15c26cea2f5949b62f7a38fe756087d | [
"BSD-3-Clause"
] | 27 | 2019-11-08T15:41:38.000Z | 2022-02-06T23:07:07.000Z | cirrocumulus/json_io.py | jkanche/cirrocumulus | 242a178fd15c26cea2f5949b62f7a38fe756087d | [
"BSD-3-Clause"
] | 25 | 2020-08-01T20:11:16.000Z | 2022-03-30T14:56:25.000Z | cirrocumulus/json_io.py | jkanche/cirrocumulus | 242a178fd15c26cea2f5949b62f7a38fe756087d | [
"BSD-3-Clause"
] | 5 | 2021-03-18T08:45:16.000Z | 2022-02-06T23:08:20.000Z | import logging
import os
import numpy as np
import pandas._libs.json as ujson
import scipy.sparse
logger = logging.getLogger("cirro")
def write_json(d, output_dir, name):
os.makedirs(output_dir, exist_ok=True)
with open(output_dir + os.path.sep + name + '.json', 'wt') as f:
c = ujson.dumps(d, double... | 30.119403 | 78 | 0.632805 |
1185a74628a7d0f1a78d80ca69b86cd78d55c61d | 2,265 | py | Python | data/init_pub.py | SharjeelAliBCS/comp3005W20-project | 3a2d272a4426efc628f53d786597a169a9b0cc6e | [
"MIT"
] | null | null | null | data/init_pub.py | SharjeelAliBCS/comp3005W20-project | 3a2d272a4426efc628f53d786597a169a9b0cc6e | [
"MIT"
] | 1 | 2022-02-13T20:08:31.000Z | 2022-02-13T20:08:31.000Z | data/init_pub.py | SharjeelAliBCS/comp3005W20-project | 3a2d272a4426efc628f53d786597a169a9b0cc6e | [
"MIT"
] | null | null | null | import random
import gzip
import itertools
import json
def readData():
readData = []
with open('address.txt', 'r') as f:
readData = f.readlines()
data = []
c = 0
obj = {}
for i in readData:
li = ['AB', 'BC', 'MB', 'NB', 'NL','NT','NS','NU','ON','PE','QC','SK','YT']
i = i... | 27.962963 | 127 | 0.467108 |
4407536e10c95f5d0d3eaedf4cefe832d0cf340d | 411 | py | Python | 17_process_thread/30_1_multithread_rlock.py | hemuke/python | bc99f2b5aee997083ae31f59a2b33db48c8255f3 | [
"Apache-2.0"
] | null | null | null | 17_process_thread/30_1_multithread_rlock.py | hemuke/python | bc99f2b5aee997083ae31f59a2b33db48c8255f3 | [
"Apache-2.0"
] | null | null | null | 17_process_thread/30_1_multithread_rlock.py | hemuke/python | bc99f2b5aee997083ae31f59a2b33db48c8255f3 | [
"Apache-2.0"
] | null | null | null | """多线程同步之RLock"""
"""
from threading import Lock
lock = Lock()
lock.acquire()
print('获得锁')
lock.acquire()
print('获得锁')
lock.release()
print('释放锁')
lock.release()
print('释放锁')
"""
from threading import RLock
rlock = RLock()
rlock.acquire()
print('获得锁')
rlock.acquire()
print('获得锁')
rlock.acquire()
print('获得锁')... | 9.785714 | 27 | 0.6618 |
bff01f3bd0feb351ed9d4064b5e3afcce9e17726 | 49 | py | Python | quantize/initialize/__init__.py | hey-yahei/Quantization.MXNet | 0bfbd7cff79b520548df56fdc3cf74dc591a4325 | [
"MIT"
] | 50 | 2019-04-03T09:17:54.000Z | 2022-01-11T06:38:44.000Z | quantize/initialize/__init__.py | hey-yahei/RT_Quantization.MXNet | 0bfbd7cff79b520548df56fdc3cf74dc591a4325 | [
"MIT"
] | 2 | 2019-09-04T04:51:46.000Z | 2020-01-07T08:14:59.000Z | quantize/initialize/__init__.py | hey-yahei/RT_Quantization.MXNet | 0bfbd7cff79b520548df56fdc3cf74dc591a4325 | [
"MIT"
] | 7 | 2019-08-07T09:23:29.000Z | 2021-07-23T01:41:27.000Z | #-*- coding: utf-8 -*-
from .initialize import * | 16.333333 | 25 | 0.612245 |
08042c81592a472cdce86b18113ebced3ab9a23d | 1,322 | py | Python | desktop/core/ext-py/PyYAML-5.4.1/tests/lib3/test_recursive.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | desktop/core/ext-py/PyYAML-5.4.1/tests/lib3/test_recursive.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | desktop/core/ext-py/PyYAML-5.4.1/tests/lib3/test_recursive.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z |
import yaml
class AnInstance:
def __init__(self, foo, bar):
self.foo = foo
self.bar = bar
def __repr__(self):
try:
return "%s(foo=%r, bar=%r)" % (self.__class__.__name__,
self.foo, self.bar)
except RuntimeError:
return "%s(foo=..., ... | 25.423077 | 67 | 0.585477 |
d800aa44c96b8669ab6de5c241e87dd5113c9170 | 614 | py | Python | reasoning_lib/scripts/make_fever_docs_nice_for_win.py | UKPLab/emnlp2020-faithful-rationales | f8db727019b9498765a502dd2cadb3b0a62ee766 | [
"Apache-1.1"
] | 4 | 2021-01-28T17:10:49.000Z | 2021-11-09T14:50:47.000Z | reasoning_lib/scripts/make_fever_docs_nice_for_win.py | UKPLab/emnlp2020-faithful-rationales | f8db727019b9498765a502dd2cadb3b0a62ee766 | [
"Apache-1.1"
] | null | null | null | reasoning_lib/scripts/make_fever_docs_nice_for_win.py | UKPLab/emnlp2020-faithful-rationales | f8db727019b9498765a502dd2cadb3b0a62ee766 | [
"Apache-1.1"
] | 1 | 2020-11-15T16:28:14.000Z | 2020-11-15T16:28:14.000Z | from docopt import docopt
import os, shutil
def main():
args = docopt("""Make FEVER DICS NICE
Usage:
make_fever_docs_nice_for_win.py all <src> <dest>
""")
src = args['<src>']
dest = args['<dest>']
if not os.path.exists(dest):
os.makedirs(dest)
docs = os.listd... | 21.172414 | 77 | 0.535831 |
bc721d9529e698aaa9618a80837f0c91f50c4f1a | 4,984 | py | Python | kazoo/handlers/gevent.py | 0xbase12/kazoo | ac09667bf6b7afd69fe494cbc67e2e56327a73bb | [
"Apache-2.0"
] | 3 | 2019-05-09T08:15:29.000Z | 2021-10-12T06:24:49.000Z | kazoo/handlers/gevent.py | 0xbase12/kazoo | ac09667bf6b7afd69fe494cbc67e2e56327a73bb | [
"Apache-2.0"
] | 3 | 2020-03-24T06:22:02.000Z | 2021-06-10T21:28:35.000Z | kazoo/handlers/gevent.py | 0xbase12/kazoo | ac09667bf6b7afd69fe494cbc67e2e56327a73bb | [
"Apache-2.0"
] | null | null | null | """A gevent based handler."""
from __future__ import absolute_import
import logging
import gevent
from gevent import socket
import gevent.event
import gevent.queue
import gevent.select
import gevent.thread
try:
from gevent.lock import Semaphore, RLock
except ImportError:
from gevent.coros import Semaphore, RL... | 30.390244 | 71 | 0.637239 |
9c9b13900c47a75ee4e1a4093183fb99ace530ab | 255 | py | Python | lib/oim_layer/__init__.py | AdilSiddiqui131/OIM | eaddb9dadff3bb2e9edcdbf3a4713398c25402ac | [
"MIT"
] | 73 | 2020-02-06T22:43:05.000Z | 2021-12-14T08:45:57.000Z | lib/oim_layer/__init__.py | AdilSiddiqui131/OIM | eaddb9dadff3bb2e9edcdbf3a4713398c25402ac | [
"MIT"
] | 9 | 2020-02-13T14:26:11.000Z | 2020-11-05T13:00:25.000Z | lib/oim_layer/__init__.py | AdilSiddiqui131/OIM | eaddb9dadff3bb2e9edcdbf3a4713398c25402ac | [
"MIT"
] | 17 | 2020-02-20T03:36:38.000Z | 2021-04-24T17:07:17.000Z | # --------------------------------------------------------
# OIM
# Copyright (c) 2019 SenseTime Research
# Licensed under The MIT License [see LICENSE for details]
# Written by SenseTime Research
# --------------------------------------------------------
| 36.428571 | 58 | 0.415686 |
6f4afd5c98c7d0bbbf16b06ac05b1114e808b244 | 545 | py | Python | ocean-world-wechat/oceanworldapp/manage.py | l2m2/dirty-projects | e3bff1f829e20b78462e3e91ab094cfad2f1a692 | [
"MIT"
] | 1 | 2020-06-04T00:54:00.000Z | 2020-06-04T00:54:00.000Z | ocean-world-wechat/oceanworldapp/manage.py | l2m2/dirty-projects | e3bff1f829e20b78462e3e91ab094cfad2f1a692 | [
"MIT"
] | null | null | null | ocean-world-wechat/oceanworldapp/manage.py | l2m2/dirty-projects | e3bff1f829e20b78462e3e91ab094cfad2f1a692 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'oceanworldapp.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django... | 34.0625 | 77 | 0.689908 |
f72be4cb8b14bc8a51522aeae3113d30c873f8c5 | 1,485 | py | Python | v1functions/timer-trigger-azuresearch-index-monitoring/function/run.py | anuragc617/azure-functions-python-samples | d39e3154a960bd10cd1be80eecf0c4a1d5ab2244 | [
"MIT"
] | 323 | 2017-01-31T03:25:33.000Z | 2022-03-30T06:06:31.000Z | v1functions/timer-trigger-azuresearch-index-monitoring/function/run.py | anuragc617/azure-functions-python-samples | d39e3154a960bd10cd1be80eecf0c4a1d5ab2244 | [
"MIT"
] | 41 | 2017-10-13T10:43:35.000Z | 2022-01-13T01:10:24.000Z | v1functions/timer-trigger-azuresearch-index-monitoring/function/run.py | anuragc617/azure-functions-python-samples | d39e3154a960bd10cd1be80eecf0c4a1d5ab2244 | [
"MIT"
] | 167 | 2017-01-31T03:25:44.000Z | 2022-03-15T16:54:54.000Z | # -*- coding: utf-8 -*-
"""
Azure Functions Timer Trigger Python Sample
- Get Azure Search Index Statistics and store them into DocumentDB
DocumentDB binding reference:
https://docs.microsoft.com/en-us/azure/azure-functions/functions-bindings-documentdb
"""
import sys, os, datetime, json
import httplib, urllib
AZ... | 30.306122 | 99 | 0.711785 |
7865fde17826f3f46d3e637f66468f03050e58e2 | 3,686 | py | Python | utils.py | BUTSpeechFIT/vq-aud | 088492e5d02b6e5cb6126b27da869704cd2c9e2c | [
"MIT"
] | null | null | null | utils.py | BUTSpeechFIT/vq-aud | 088492e5d02b6e5cb6126b27da869704cd2c9e2c | [
"MIT"
] | null | null | null | utils.py | BUTSpeechFIT/vq-aud | 088492e5d02b6e5cb6126b27da869704cd2c9e2c | [
"MIT"
] | null | null | null | import os
import pickle
import io
import sys
import shlex
import subprocess
import time
class SimpleLoader:
def initialize_args(self, kwargs):
for key, val in kwargs.items():
setattr(self, key, val)
def since(t0):
return time.time() - t0
def reduce_lr(history, lr, co... | 24.738255 | 76 | 0.558329 |
15ac2bf5348fe8fa90c42bb0a7cd34b166a8a9ed | 2,079 | py | Python | data/download_data.py | GiladGH/pointcleannet | 1c7f8f00c2062923063de2f796d96e444476d698 | [
"MIT"
] | 1 | 2019-09-30T03:33:47.000Z | 2019-09-30T03:33:47.000Z | data/download_data.py | GiladGH/pointcleannet | 1c7f8f00c2062923063de2f796d96e444476d698 | [
"MIT"
] | null | null | null | data/download_data.py | GiladGH/pointcleannet | 1c7f8f00c2062923063de2f796d96e444476d698 | [
"MIT"
] | null | null | null | import os
#import zipfile
import urllib
import tarfile
import argparse
def parse_arguments():
parser = argparse.ArgumentParser()
# naming / file handling
parser.add_argument(
'--task', type=str, default='denoising', help='task name for dataset')
return parser.parse_args()
def download_dataset... | 39.226415 | 124 | 0.702261 |
29f333f2ae959e1b023a0c953acb7c113266ba29 | 35 | py | Python | odoo-13.0/venv/lib/python3.8/site-packages/PixarImagePlugin.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | 2 | 2021-06-20T16:56:45.000Z | 2021-06-20T17:30:18.000Z | odoo-13.0/venv/lib/python3.8/site-packages/PixarImagePlugin.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | odoo-13.0/venv/lib/python3.8/site-packages/PixarImagePlugin.py | VaibhavBhujade/Blockchain-ERP-interoperability | b5190a037fb6615386f7cbad024d51b0abd4ba03 | [
"MIT"
] | null | null | null | from PIL.PixarImagePlugin import *
| 17.5 | 34 | 0.828571 |
6d88a0ddc5455d0f241d95f2db4b6e9dea4ec0d1 | 23,783 | py | Python | tasks/govinfo.py | backwardn/congress | f327c0af85eec11886178db7aaa7d6d599087a24 | [
"CC0-1.0"
] | null | null | null | tasks/govinfo.py | backwardn/congress | f327c0af85eec11886178db7aaa7d6d599087a24 | [
"CC0-1.0"
] | null | null | null | tasks/govinfo.py | backwardn/congress | f327c0af85eec11886178db7aaa7d6d599087a24 | [
"CC0-1.0"
] | 1 | 2020-05-22T18:26:43.000Z | 2020-05-22T18:26:43.000Z | # Downloads documents from GPO's GovInfo.gov site, using sitemaps
# to efficiently determine what needs to be updated. See
# https://www.govinfo.gov/sitemaps for a list of collections.
# This service was formerly called "Fdsys."
#
# ./run govinfo--collections=BILLS,STATUTE,...
# Download bill text (from the BILLS colle... | 41.945326 | 152 | 0.65921 |
35721fdcc2e95a88a2a9cea4bd5cc5c6fa2e1ead | 1,488 | py | Python | visualisation/visual.py | kaphka/ml-software | 03c4c0023be3e10fcb9a625796142ed4605e8104 | [
"Apache-2.0"
] | null | null | null | visualisation/visual.py | kaphka/ml-software | 03c4c0023be3e10fcb9a625796142ed4605e8104 | [
"Apache-2.0"
] | null | null | null | visualisation/visual.py | kaphka/ml-software | 03c4c0023be3e10fcb9a625796142ed4605e8104 | [
"Apache-2.0"
] | null | null | null | import vispy
from vispy import app, scene, color
from vispy import visuals
from vispy.visuals.transforms import STTransform
from vispy.geometry import create_box
import sys
import pickle
import os.path as op
import numpy as np
# In[2]:
with open('../theano/xor.keras' ,'rb') as kmodel:
model = pickle.load(kmodel... | 24.8 | 79 | 0.668011 |
d2066f2c6625854ecda4a72c42c1d8f35e00f63e | 6,442 | py | Python | science/wdmerger_I/binary/circular_orbit/analyze.py | AMReX-Astro/wdmerger | 9f575efacc8d373b6d2961f731e30bf59ee15ffd | [
"MIT"
] | 2 | 2019-01-23T21:12:02.000Z | 2021-12-14T07:34:38.000Z | science/wdmerger_I/binary/circular_orbit/analyze.py | AMReX-Astro/wdmerger | 9f575efacc8d373b6d2961f731e30bf59ee15ffd | [
"MIT"
] | 1 | 2017-08-05T06:25:41.000Z | 2017-08-05T06:25:41.000Z | science/wdmerger_I/binary/circular_orbit/analyze.py | AMReX-Astro/wdmerger | 9f575efacc8d373b6d2961f731e30bf59ee15ffd | [
"MIT"
] | 2 | 2018-12-25T01:05:59.000Z | 2020-12-28T10:01:59.000Z | import yt
import numpy as np
from matplotlib import pyplot as plt
import wdmerger
import wdmerger_grid_diag_analysis as grid_diag
import wdmerger_star_diag_analysis as star_diag
import os
markers = ['o', '+', '.', ',', '*']
# Long orbits
diag_list = []
rot_list = ['0', '1']
ratio_list = ['equal', 'unequal']
results... | 28.254386 | 126 | 0.580565 |
bebd0099facc4679478b2e85efe33c08c110dc87 | 8,669 | py | Python | tests/test_dimensions.py | Jonxslays/analytix | daebe871b730bcf553c0fa2e8ba108ab38f49a14 | [
"BSD-3-Clause"
] | null | null | null | tests/test_dimensions.py | Jonxslays/analytix | daebe871b730bcf553c0fa2e8ba108ab38f49a14 | [
"BSD-3-Clause"
] | null | null | null | tests/test_dimensions.py | Jonxslays/analytix | daebe871b730bcf553c0fa2e8ba108ab38f49a14 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2021-present, Ethan Henderson
# 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
# list of condit... | 34.400794 | 87 | 0.731111 |
a6c575868009209df3cd670bd69be1d91340a583 | 344 | py | Python | np/reference/ch5code/sawtooth.py | focusunsink/study_python | 322326642db54df8725793d70a95d21ac40b6507 | [
"MIT"
] | null | null | null | np/reference/ch5code/sawtooth.py | focusunsink/study_python | 322326642db54df8725793d70a95d21ac40b6507 | [
"MIT"
] | null | null | null | np/reference/ch5code/sawtooth.py | focusunsink/study_python | 322326642db54df8725793d70a95d21ac40b6507 | [
"MIT"
] | null | null | null | import numpy as np
from matplotlib.pyplot import plot
from matplotlib.pyplot import show
import sys
t = np.linspace(-np.pi, np.pi, 201)
k = np.arange(1, float(sys.argv[1]))
f = np.zeros_like(t)
for i in range(len(t)):
f[i] = np.sum(np.sin(2 * np.pi * k * t[i])/k)
f = (-2 / np.pi) * f
plot(t, f, lw=1.0)
plot(t, np... | 20.235294 | 48 | 0.625 |
eba51b5eff4545a68e757a2bfc2f0be880b11e58 | 2,548 | py | Python | data/p4VQE/R4/benchmark/startQiskit_Class686.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit_Class686.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p4VQE/R4/benchmark/startQiskit_Class686.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=15
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
import networkx as nx
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collectio... | 28 | 118 | 0.637363 |
d8f87189ed816c677829758f0475ba9bba6577a6 | 6,733 | py | Python | qa/rpc-tests/test_framework/test_framework.py | bitcosur/AMX | 01d921e075b5c515e281895e8958973f8a14b18b | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/test_framework.py | bitcosur/AMX | 01d921e075b5c515e281895e8958973f8a14b18b | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/test_framework.py | bitcosur/AMX | 01d921e075b5c515e281895e8958973f8a14b18b | [
"MIT"
] | 4 | 2018-03-11T17:14:16.000Z | 2018-06-15T13:04:32.000Z | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Base class for RPC testing
# Add python-bitcoinrpc to module search path:
import os
import sys
import... | 34.005051 | 98 | 0.616813 |
b9192b93e4c7178037816b498bfb4299db398f34 | 1,012 | py | Python | tests/test_framingham.py | openhealthalgorithms/algorithms | 97ce727079ea18607a4144ff1d053a208bbc6c6e | [
"Apache-2.0"
] | 2 | 2017-01-08T11:00:04.000Z | 2017-01-21T17:38:11.000Z | tests/test_framingham.py | fredhersch/openhealthalgorithms | 97ce727079ea18607a4144ff1d053a208bbc6c6e | [
"Apache-2.0"
] | 9 | 2017-08-20T13:59:28.000Z | 2018-01-20T11:20:12.000Z | tests/test_framingham.py | openhealthalgorithms/algorithms | 97ce727079ea18607a4144ff1d053a208bbc6c6e | [
"Apache-2.0"
] | 1 | 2017-01-22T09:53:31.000Z | 2017-01-22T09:53:31.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from OHA.Framingham import Framingham
from OHA.param_builders.framingham_param_builder import FraminghamParamsBuilder as FPB
class FraminghamTest(unittest.TestCase):
def test_heart_age_and_actual_age_is_same(self):
params = FPB().gender('F')... | 40.48 | 120 | 0.699605 |
ed75333392044cc70985dfa927bd4a5efb9ede1b | 1,463 | py | Python | tests/checkout_repo/basicgit_test.py | BradenM/micropython-stubber | 042aee27685dcf0152b6580c005f8a20a04f9d59 | [
"MIT"
] | 1 | 2021-07-22T15:55:32.000Z | 2021-07-22T15:55:32.000Z | tests/checkout_repo/basicgit_test.py | BradenM/micropython-stubber | 042aee27685dcf0152b6580c005f8a20a04f9d59 | [
"MIT"
] | null | null | null | tests/checkout_repo/basicgit_test.py | BradenM/micropython-stubber | 042aee27685dcf0152b6580c005f8a20a04f9d59 | [
"MIT"
] | null | null | null | import sys
import os
import pytest
#make sure that the source can be found
sys.path.insert(1, './src')
# pylint: disable=wrong-import-position,import-error
# Module Under Test
import basicgit as git
def common_tst(tag):
print(tag)
assert isinstance(tag, str), "tag must be a string"
assert tag.startswith(... | 26.6 | 70 | 0.673958 |
71f270b7938520ee7d36c61c602c8d2e089f7f13 | 8,013 | py | Python | tcga_encoder/analyses/old/survival_from_z_space2.py | tedmeeds/tcga_encoder | 805f9a5bcc422a43faea45baa0996c88d346e3b4 | [
"MIT"
] | 2 | 2017-12-19T15:32:46.000Z | 2018-01-12T11:24:24.000Z | tcga_encoder/analyses/old/survival_from_z_space2.py | tedmeeds/tcga_encoder | 805f9a5bcc422a43faea45baa0996c88d346e3b4 | [
"MIT"
] | null | null | null | tcga_encoder/analyses/old/survival_from_z_space2.py | tedmeeds/tcga_encoder | 805f9a5bcc422a43faea45baa0996c88d346e3b4 | [
"MIT"
] | null | null | null | from tcga_encoder.utils.helpers import *
from tcga_encoder.data.data import *
from tcga_encoder.definitions.tcga import *
#from tcga_encoder.definitions.nn import *
from tcga_encoder.definitions.locations import *
from tcga_encoder.analyses.survival_functions import *
#from tcga_encoder.algorithms import *
import seab... | 39.668317 | 376 | 0.708973 |
3f33e1c25a737f3368c3207caa0f20afd4570d05 | 195 | py | Python | tests/conftest.py | RicardoAzuul/code-institute-ms3-backend | ae669ea88bf11f38e3a215139dadd3bb3c65580c | [
"MIT"
] | null | null | null | tests/conftest.py | RicardoAzuul/code-institute-ms3-backend | ae669ea88bf11f38e3a215139dadd3bb3c65580c | [
"MIT"
] | null | null | null | tests/conftest.py | RicardoAzuul/code-institute-ms3-backend | ae669ea88bf11f38e3a215139dadd3bb3c65580c | [
"MIT"
] | 1 | 2022-03-18T16:48:29.000Z | 2022-03-18T16:48:29.000Z | # creates a Flask app for testing
import pytest
from app import app as flask_app
@pytest.fixture
def app():
yield flask_app
@pytest.fixture
def client(app):
return app.test_client() | 13 | 33 | 0.733333 |
8b77a07cab85bdbd23f255b172bcbd22215f081a | 3,237 | py | Python | invman/settings.py | mainecivichackday/invman | 185bfeb389ba750ebdd1f789e1de3f368af576d0 | [
"Apache-2.0"
] | null | null | null | invman/settings.py | mainecivichackday/invman | 185bfeb389ba750ebdd1f789e1de3f368af576d0 | [
"Apache-2.0"
] | null | null | null | invman/settings.py | mainecivichackday/invman | 185bfeb389ba750ebdd1f789e1de3f368af576d0 | [
"Apache-2.0"
] | null | null | null | """
Django settings for invman project.
Generated by 'django-admin startproject' using Django 1.9.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
# ... | 25.896 | 91 | 0.698486 |
b4af3d31ce4f340debea974571da0407b2ea5242 | 22,588 | py | Python | Lib/site.py | Krrishdhaneja/cpython | 9ae9ad8ba35cdcece7ded73cd2207e4f8cb85578 | [
"0BSD"
] | 1 | 2020-10-25T16:33:22.000Z | 2020-10-25T16:33:22.000Z | Lib/site.py | Krrishdhaneja/cpython | 9ae9ad8ba35cdcece7ded73cd2207e4f8cb85578 | [
"0BSD"
] | null | null | null | Lib/site.py | Krrishdhaneja/cpython | 9ae9ad8ba35cdcece7ded73cd2207e4f8cb85578 | [
"0BSD"
] | null | null | null | """Append module search paths for third-party packages to sys.path.
****************************************************************
* This module is automatically imported during initialization. *
****************************************************************
This will append site-specific paths to the modul... | 34.432927 | 85 | 0.610103 |
ef507f3a61a33275c5316cfc0e87d0b8e3c945e3 | 2,164 | py | Python | persephone/tests/test_transcription_preprocessing.py | a-tsioh/persephone | 254e70018237cfb3c06ffd04a418673b4e6b953f | [
"Apache-2.0"
] | 133 | 2018-05-06T10:46:19.000Z | 2021-11-04T01:54:50.000Z | persephone/tests/test_transcription_preprocessing.py | a-tsioh/persephone | 254e70018237cfb3c06ffd04a418673b4e6b953f | [
"Apache-2.0"
] | 119 | 2018-01-28T03:18:28.000Z | 2018-04-30T05:30:21.000Z | persephone/tests/test_transcription_preprocessing.py | a-tsioh/persephone | 254e70018237cfb3c06ffd04a418673b4e6b953f | [
"Apache-2.0"
] | 26 | 2018-05-14T08:09:18.000Z | 2022-02-09T18:12:36.000Z | def test_segment_into_chars():
from persephone.preprocess.labels import segment_into_chars
input_1 = "hello"
output_1 = "h e l l o"
input_2 = "hello world"
output_2 = "h e l l o w o r l d"
input_3 = "hello wo rld"
output_3 = "h e l l o w o r l d"
input_4 = "hello wo rld\r\n"
... | 34.349206 | 92 | 0.630314 |
475e2529e5c7216e2f9e58be7e894063dc39e64d | 67 | py | Python | tests/__init__.py | MolSSI/packmol_step | a411aaee143a8a0687b7c8687a3fa5d93dd79edd | [
"BSD-3-Clause"
] | 1 | 2021-12-15T01:31:30.000Z | 2021-12-15T01:31:30.000Z | tests/__init__.py | MolSSI/packmol_step | a411aaee143a8a0687b7c8687a3fa5d93dd79edd | [
"BSD-3-Clause"
] | 14 | 2019-08-13T21:29:48.000Z | 2021-11-27T20:21:05.000Z | tests/__init__.py | molssi-seamm/packmol_step | 302100b0a410550bb067ac0c3144c28d84e2fc6b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""Unit test package for packmol_step."""
| 16.75 | 41 | 0.597015 |
7cc3f00e1a026989351f5bd7cd18d79aff8ab3ba | 3,260 | py | Python | homeassistant/components/vesync/fan.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 6 | 2017-08-02T19:26:39.000Z | 2020-03-14T22:47:41.000Z | homeassistant/components/vesync/fan.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 56 | 2020-08-03T07:30:54.000Z | 2022-03-31T06:02:04.000Z | homeassistant/components/vesync/fan.py | erogleva/core | 994ae09f69afe772150a698953c0d7386a745de2 | [
"Apache-2.0"
] | 14 | 2018-08-19T16:28:26.000Z | 2021-09-02T18:26:53.000Z | """Support for VeSync fans."""
import logging
from homeassistant.components.fan import (
SPEED_HIGH,
SPEED_LOW,
SPEED_MEDIUM,
SPEED_OFF,
SUPPORT_SET_SPEED,
FanEntity,
)
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from .common im... | 28.596491 | 87 | 0.651227 |
edc769d602f79d55315ccce616b7f765bfe16f9c | 4,127 | py | Python | PrivacyGuard/post_process/post_processor.py | honshj/PaddleSleeve | 1e7e172bed7e2336f8842677a1917b51cc604b19 | [
"Apache-2.0"
] | 41 | 2021-05-10T10:34:23.000Z | 2022-02-24T08:48:16.000Z | PrivacyGuard/post_process/post_processor.py | honshj/PaddleSleeve | 1e7e172bed7e2336f8842677a1917b51cc604b19 | [
"Apache-2.0"
] | 12 | 2021-06-07T14:22:42.000Z | 2022-03-16T11:56:45.000Z | PrivacyGuard/post_process/post_processor.py | honshj/PaddleSleeve | 1e7e172bed7e2336f8842677a1917b51cc604b19 | [
"Apache-2.0"
] | 14 | 2021-05-10T10:22:55.000Z | 2022-02-14T01:44:17.000Z | # Copyright (c) 2020 PaddlePaddle 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 appli... | 37.518182 | 124 | 0.626605 |
53465663ab202713a3f03c6334544c1ddd6a70c7 | 1,346 | py | Python | organization/models.py | weirdaze/tauto | e5a635628cd92998212cf3ae74aef2f0436430f5 | [
"MIT"
] | null | null | null | organization/models.py | weirdaze/tauto | e5a635628cd92998212cf3ae74aef2f0436430f5 | [
"MIT"
] | 6 | 2021-03-19T16:01:33.000Z | 2022-03-12T00:54:23.000Z | organization/models.py | weirdaze/tauto | e5a635628cd92998212cf3ae74aef2f0436430f5 | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes.fields import GenericRelation
class OrgRole(models.Model):
name = models.CharField(... | 30.590909 | 88 | 0.755572 |
f64e8e797953d471ba69081078965a615f16fe08 | 13,034 | py | Python | src/commands/setup.py | Tauseef-Hilal/iCODE-BOT | dd4efa9084c35d238f1170ff3af69eeeb055abec | [
"MIT"
] | 1 | 2022-03-31T15:31:10.000Z | 2022-03-31T15:31:10.000Z | src/commands/setup.py | Tauseef-Hilal/iCODE-BOT | dd4efa9084c35d238f1170ff3af69eeeb055abec | [
"MIT"
] | null | null | null | src/commands/setup.py | Tauseef-Hilal/iCODE-BOT | dd4efa9084c35d238f1170ff3af69eeeb055abec | [
"MIT"
] | null | null | null | from discord import (
Cog,
Embed,
Guild,
Interaction,
Option,
Role,
SlashCommandGroup,
ApplicationContext,
TextChannel
)
from ..utils.color import Colors
from ..bot import ICodeBot
from ..utils.checks import (
maintenance_check,
permission_check
)
class SetupCommands(Cog):... | 31.407229 | 73 | 0.467546 |
601e0cb62fa326488fa78ce7e5c8c0b6fda2e158 | 3,941 | py | Python | insights/parsers/lsvmbus.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | null | null | null | insights/parsers/lsvmbus.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | null | null | null | insights/parsers/lsvmbus.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | null | null | null | """
LsvmBus - Command ``lsvmbus -vv``
=================================
This module parses the output of the command ``lsvmbus -vv``.
"""
import re
from insights import parser, CommandParser
from insights.parsers import SkipException
from insights.specs import Specs
@parser(Specs.lsvmbus)
class LsvmBus(CommandParse... | 45.298851 | 126 | 0.55392 |
b5e5605a1d4d9a9a6b8c20f96c0149aa208386cd | 5,337 | py | Python | pythonforandroid/recipes/ffmpeg/__init__.py | mishk/python-for-android | 1b887bed09a7ec19bfa00c9fb69a54e3f60a2328 | [
"MIT"
] | 19 | 2019-11-22T06:07:37.000Z | 2022-03-16T20:45:06.000Z | pythonforandroid/recipes/ffmpeg/__init__.py | ganeshgandhiTN/python-for-android | 690dd18bcf9bbd3ff5a245ac1e7296cc266e5543 | [
"MIT"
] | null | null | null | pythonforandroid/recipes/ffmpeg/__init__.py | ganeshgandhiTN/python-for-android | 690dd18bcf9bbd3ff5a245ac1e7296cc266e5543 | [
"MIT"
] | 2 | 2021-01-02T14:45:16.000Z | 2021-11-02T13:04:59.000Z | from pythonforandroid.toolchain import Recipe, current_directory, shprint
from os.path import exists, join, realpath
import sh
class FFMpegRecipe(Recipe):
version = '007e03348dbd8d3de3eb09022d72c734a8608144'
# Moved to github.com instead of ffmpeg.org to improve download speed
url = 'https://github.com/FF... | 37.0625 | 107 | 0.471801 |
b478dde890d1d6c2a95ff8bb075741f3f92aac1d | 17,907 | py | Python | sdk/python/pulumi_azure_native/network/v20200301/route.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20200301/route.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20200301/route.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 56.847619 | 4,464 | 0.680628 |
428ebbedca85f9b94b4b1db0f3b36a334126196b | 9,482 | py | Python | tensorflow/contrib/autograph/pyct/static_analysis/cfg_test.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/autograph/pyct/static_analysis/cfg_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/autograph/pyct/static_analysis/cfg_test.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 26 | 2017-04-12T16:25:44.000Z | 2018-10-30T10:10:15.000Z | # 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... | 31.190789 | 80 | 0.635625 |
0fc3da14215b3d31d6530a70c52ad4c5c4e7748a | 5,642 | py | Python | libs/modules/odm_loss.py | lsc25846/Wildlife-Recognition-System | 81d8afdf4a50bc94bf5e1952bfce1b5a9c4c6bd2 | [
"MIT"
] | null | null | null | libs/modules/odm_loss.py | lsc25846/Wildlife-Recognition-System | 81d8afdf4a50bc94bf5e1952bfce1b5a9c4c6bd2 | [
"MIT"
] | null | null | null | libs/modules/odm_loss.py | lsc25846/Wildlife-Recognition-System | 81d8afdf4a50bc94bf5e1952bfce1b5a9c4c6bd2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import torch
import torch.nn as nn
from torch.autograd import Variable
import torch.nn.functional as functional
from libs.utils.box_utils import log_sum_exp, match_with_flags
from past.builtins import xrange
import pdb
class ODMLoss(nn.Module):
"""
"""
def __init__(self, num_cl... | 44.078125 | 96 | 0.615916 |
dd9f8206f0b34687875d58087ef200bcb27592a7 | 7,070 | py | Python | sample_models.py | alealv/AIND-VUI-Capstone | cc37aea4ab8244ed4553821413bf8834e8d1467c | [
"MIT"
] | null | null | null | sample_models.py | alealv/AIND-VUI-Capstone | cc37aea4ab8244ed4553821413bf8834e8d1467c | [
"MIT"
] | null | null | null | sample_models.py | alealv/AIND-VUI-Capstone | cc37aea4ab8244ed4553821413bf8834e8d1467c | [
"MIT"
] | null | null | null | from keras import backend as K
from keras.models import Model
from keras.layers import (BatchNormalization, Conv1D, Dense, Input,
TimeDistributed, Activation, Bidirectional, SimpleRNN, GRU, LSTM)
def simple_rnn_model(input_dim, output_dim=29):
""" Build a recurrent network for speech
"""
# Main acous... | 42.590361 | 126 | 0.686563 |
c21edeb1593bfc33aa2e13c2e73b7b75d2266f09 | 12,582 | py | Python | patients/models.py | lfranceschetti/lyprox | 08410994068a89cc81a92746392b0c0188e403ee | [
"MIT"
] | null | null | null | patients/models.py | lfranceschetti/lyprox | 08410994068a89cc81a92746392b0c0188e403ee | [
"MIT"
] | null | null | null | patients/models.py | lfranceschetti/lyprox | 08410994068a89cc81a92746392b0c0188e403ee | [
"MIT"
] | null | null | null | from dateutil.parser import ParserError, parse
from django.db import models
from django.urls import reverse
from accounts.models import Institution
from core.loggers import ModelLoggerMixin
class RobustDateField(models.DateField):
"""DateField that doesn't raise a ValidationError when the date string isn't
f... | 39.566038 | 82 | 0.539342 |
6e3f3688552db0d7cfbea213158b30ae4c444f78 | 99,984 | py | Python | src/sentry/south_migrations/0394_auto__chg_field_project_team.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | 2 | 2019-03-04T12:45:54.000Z | 2019-03-04T12:45:55.000Z | src/sentry/south_migrations/0394_auto__chg_field_project_team.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | 196 | 2019-06-10T08:34:10.000Z | 2022-02-22T01:26:13.000Z | src/sentry/south_migrations/0394_auto__chg_field_project_team.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | 1 | 2017-02-09T06:36:57.000Z | 2017-02-09T06:36:57.000Z | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
# Flag to indicate if this migration is too risky
# to run online and needs to be coordinated for offline
... | 91.060109 | 233 | 0.588954 |
8d6f19ca49abdae9c5aabb2e5106884ecba5c7be | 4,028 | py | Python | nbs/srm_dataset.py | nandakishorem777/Quality_of_life | e3c0cfe6e4756d4e91df8922a731f51275590676 | [
"MIT"
] | null | null | null | nbs/srm_dataset.py | nandakishorem777/Quality_of_life | e3c0cfe6e4756d4e91df8922a731f51275590676 | [
"MIT"
] | null | null | null | nbs/srm_dataset.py | nandakishorem777/Quality_of_life | e3c0cfe6e4756d4e91df8922a731f51275590676 | [
"MIT"
] | null | null | null | import torch
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms
import numpy as np
import pandas as pd
from dataclasses import dataclass
from pathlib import Path
from PIL import Image
from sklearn.model_selection import train_test_split
from utils import read_df
CWD = Path.... | 35.964286 | 149 | 0.629096 |
5ab353af549099a7314d11a37bc3e6fed5f2ebbe | 2,985 | py | Python | azure/aria/aria-extension-cloudify/src/aria/aria/cli/helptexts.py | onap/archive-multicloud-azure | d3562b78879a900510c8ecb1241156d5b9bb50f6 | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2018-10-13T06:32:10.000Z | 2018-10-13T06:32:10.000Z | azure/aria/aria-extension-cloudify/src/aria/aria/cli/helptexts.py | onap/archive-multicloud-azure | d3562b78879a900510c8ecb1241156d5b9bb50f6 | [
"Apache-2.0",
"CC-BY-4.0"
] | null | null | null | azure/aria/aria-extension-cloudify/src/aria/aria/cli/helptexts.py | onap/archive-multicloud-azure | d3562b78879a900510c8ecb1241156d5b9bb50f6 | [
"Apache-2.0",
"CC-BY-4.0"
] | 1 | 2020-06-16T15:13:06.000Z | 2020-06-16T15:13:06.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 ... | 47.380952 | 99 | 0.761139 |
001d3d5d3a6aa9808bf90ae1914938638690fcc6 | 720 | py | Python | cha_bebe/galeria/views.py | intelektos/Cha_bebe | 23df4af3901413c9c50e73bd305ade165c81001b | [
"MIT"
] | null | null | null | cha_bebe/galeria/views.py | intelektos/Cha_bebe | 23df4af3901413c9c50e73bd305ade165c81001b | [
"MIT"
] | 9 | 2020-06-08T03:31:08.000Z | 2022-01-13T02:44:42.000Z | cha_bebe/galeria/views.py | intelektos/Cha_bebe | 23df4af3901413c9c50e73bd305ade165c81001b | [
"MIT"
] | 1 | 2020-06-01T17:43:20.000Z | 2020-06-01T17:43:20.000Z | from django.shortcuts import render, get_object_or_404
from django.template import RequestContext
from .models import Album, Imagem
def index(request):
template_name = 'index.html'
albuns = Album.objects.all()
context = {'albuns': albuns }
return render(request, template_name, context)
def album(requ... | 30 | 54 | 0.751389 |
d3c9b516ff3b54c05f2e8e6d7ee786bd410f2171 | 2,069 | py | Python | scripts/meta_launcher.py | sushuang9210/GAIL_LSTM | 457ecee9b812b304b6e319d310451a4ad3038e22 | [
"MIT"
] | 3 | 2017-09-14T03:08:26.000Z | 2020-10-13T15:38:50.000Z | scripts/meta_launcher.py | sushuang9210/GAIL_LSTM | 457ecee9b812b304b6e319d310451a4ad3038e22 | [
"MIT"
] | null | null | null | scripts/meta_launcher.py | sushuang9210/GAIL_LSTM | 457ecee9b812b304b6e319d310451a4ad3038e22 | [
"MIT"
] | 1 | 2022-03-12T15:32:02.000Z | 2022-03-12T15:32:02.000Z | import numpy as np
S = []
for policy_type in ["gru"]:
for hspec, gru_dim in [#([128, 128, 128, 64, 64],64),
#([256,128,64,64,32],32)]:
#([256,256],64),
#([256,256,32],32)]:
([256, 128, 64, 64, 32, 16],16),
... | 45.977778 | 137 | 0.482359 |
a462f885484ea737a30e7824b038c9b6d1a506b0 | 7,119 | py | Python | homeassistant/components/fritzbox/config_flow.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 1 | 2021-03-23T07:20:03.000Z | 2021-03-23T07:20:03.000Z | homeassistant/components/fritzbox/config_flow.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 60 | 2020-07-06T15:10:30.000Z | 2022-03-31T06:01:46.000Z | homeassistant/components/fritzbox/config_flow.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 2 | 2021-03-22T21:42:48.000Z | 2021-04-12T12:26:39.000Z | """Config flow for AVM Fritz!Box."""
from urllib.parse import urlparse
from pyfritzhome import Fritzhome, LoginError
from requests.exceptions import HTTPError
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.components.ssdp import (
ATTR_SSDP_LOCATION,
ATTR_UPNP_FRIENDLY_NA... | 33.9 | 86 | 0.62565 |
d320ba999504eb8efe3974a48266e0d00251e094 | 33,259 | py | Python | glance/tests/unit/common/test_utils.py | Steap/glance | 4ee7799aa7f6a7172e361392ebb8d3da03e0bf7f | [
"Apache-2.0"
] | 309 | 2015-01-01T17:49:09.000Z | 2022-03-29T14:56:31.000Z | glance/tests/unit/common/test_utils.py | Steap/glance | 4ee7799aa7f6a7172e361392ebb8d3da03e0bf7f | [
"Apache-2.0"
] | 8 | 2015-11-04T21:53:48.000Z | 2020-12-15T05:36:35.000Z | glance/tests/unit/common/test_utils.py | Steap/glance | 4ee7799aa7f6a7172e361392ebb8d3da03e0bf7f | [
"Apache-2.0"
] | 409 | 2015-01-01T11:28:26.000Z | 2022-03-29T14:56:41.000Z | # Copyright 2011 OpenStack Foundation
# Copyright 2015 Mirantis, 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... | 40.461071 | 79 | 0.597252 |
81b4ddd01b28f71c056c1ddcf2983a16e2c89be9 | 1,943 | py | Python | alembic/versions/cf9bdb2ec3a6_create_network_audit_cateogories_and_.py | bodastage/bts-database | 96df7915621dd46daf55016eedf5cfc84dd0e3a2 | [
"Apache-2.0"
] | 1 | 2019-08-30T01:20:14.000Z | 2019-08-30T01:20:14.000Z | alembic/versions/cf9bdb2ec3a6_create_network_audit_cateogories_and_.py | bodastage/bts-database | 96df7915621dd46daf55016eedf5cfc84dd0e3a2 | [
"Apache-2.0"
] | 1 | 2018-05-30T09:29:24.000Z | 2018-05-30T10:04:37.000Z | alembic/versions/cf9bdb2ec3a6_create_network_audit_cateogories_and_.py | bodastage/bts-database | 96df7915621dd46daf55016eedf5cfc84dd0e3a2 | [
"Apache-2.0"
] | 3 | 2018-03-10T23:29:30.000Z | 2019-02-19T22:11:09.000Z | """Create network audit cateogories and rules tables
Revision ID: cf9bdb2ec3a6
Revises: b459b9fd49f9
Create Date: 2018-03-14 01:23:32.833000
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'cf9bdb2ec3a6'
down_revision = 'b459b9fd49f9'
branch_labels = None
depen... | 34.696429 | 93 | 0.670612 |
66d5aa4a7b04b771cd1559d27332b7afda1faae6 | 1,367 | py | Python | examples/xor/xor.py | ruyimarone/dynet | 67bace3fb1d79327ada53b248e497c894819760d | [
"Apache-2.0"
] | 3,307 | 2016-10-08T15:51:28.000Z | 2022-03-30T04:40:44.000Z | examples/xor/xor.py | ruyimarone/dynet | 67bace3fb1d79327ada53b248e497c894819760d | [
"Apache-2.0"
] | 1,348 | 2016-10-08T14:36:55.000Z | 2022-03-26T15:19:27.000Z | examples/xor/xor.py | ruyimarone/dynet | 67bace3fb1d79327ada53b248e497c894819760d | [
"Apache-2.0"
] | 741 | 2016-10-09T04:44:30.000Z | 2022-03-29T22:29:02.000Z | import sys
import dynet as dy
#xsent = True
xsent = False
HIDDEN_SIZE = 8
ITERATIONS = 2000
m = dy.Model()
trainer = dy.SimpleSGDTrainer(m)
W = m.add_parameters((HIDDEN_SIZE, 2))
b = m.add_parameters(HIDDEN_SIZE)
V = m.add_parameters((1, HIDDEN_SIZE))
a = m.add_parameters(1)
if len(sys.argv) == 2:
m.populate_fro... | 18.726027 | 47 | 0.591075 |
43b376abbe8251188300ecdbb45829fa35b4797c | 498 | py | Python | scripts/PMC_OA/extract_pdf_package_url.py | yeastgenome/SGDBackend-Nex2 | 8bd14e45def10361d1c176ce2825a8eff621dea1 | [
"MIT"
] | 5 | 2015-11-24T23:09:46.000Z | 2019-11-06T17:48:13.000Z | scripts/PMC_OA/extract_pdf_package_url.py | yeastgenome/SGDBackend-Nex2 | 8bd14e45def10361d1c176ce2825a8eff621dea1 | [
"MIT"
] | 188 | 2017-08-28T22:39:03.000Z | 2022-03-02T14:53:46.000Z | scripts/PMC_OA/extract_pdf_package_url.py | yeastgenome/SGDBackend-Nex2 | 8bd14e45def10361d1c176ce2825a8eff621dea1 | [
"MIT"
] | 7 | 2018-05-13T01:58:07.000Z | 2021-06-25T19:08:33.000Z | infile = '../dumping/paper/data/pmcid_2021.txt'
infile2 = 'data/pmc_oa_tar_ball_url.lst'
f = open(infile)
pmc2pmidEtc = {}
for line in f:
pieces = line.strip().split('\t')
pmc2pmidEtc[pieces[1]] = (pieces[0], pieces[2])
f.close()
f = open(infile2)
for line in f:
pieces = line.strip().split('\t')
if ... | 20.75 | 62 | 0.600402 |
3276cfb6eade1327d44cb94c68ad8a2184da712f | 8,581 | py | Python | docs/conf.py | dagraham/python-prompt-toolkit | b6e5396f73a15747755bccfaae45ddf4af5ee40a | [
"BSD-3-Clause"
] | 1 | 2020-03-12T06:45:06.000Z | 2020-03-12T06:45:06.000Z | docs/conf.py | dagraham/python-prompt-toolkit | b6e5396f73a15747755bccfaae45ddf4af5ee40a | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | dagraham/python-prompt-toolkit | b6e5396f73a15747755bccfaae45ddf4af5ee40a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# prompt_toolkit documentation build configuration file, created by
# sphinx-quickstart on Thu Jul 31 14:17:08 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file... | 31.781481 | 79 | 0.718797 |
a5da178aadb7815e3cad35f9b9fd0dbefa0b2c7e | 11,240 | py | Python | addons/cats-blender-plugin-0-19-0/extern_tools/mmd_tools_local/operators/misc.py | trisadmeslek/V-Sekai-Blender-tools | 0d8747387c58584b50c69c61ba50a881319114f8 | [
"MIT"
] | 725 | 2020-06-30T00:12:35.000Z | 2021-11-07T03:10:44.000Z | addons/cats-blender-plugin-0-19-0/extern_tools/mmd_tools_local/operators/misc.py | trisadmeslek/V-Sekai-Blender-tools | 0d8747387c58584b50c69c61ba50a881319114f8 | [
"MIT"
] | 144 | 2017-12-27T20:57:07.000Z | 2020-06-27T13:58:40.000Z | addons/cats-blender-plugin-0-19-0/extern_tools/mmd_tools_local/operators/misc.py | trisadmeslek/V-Sekai-Blender-tools | 0d8747387c58584b50c69c61ba50a881319114f8 | [
"MIT"
] | 106 | 2020-07-04T02:56:27.000Z | 2021-11-07T08:54:11.000Z | # -*- coding: utf-8 -*-
import re
import bpy
from bpy.types import Operator
from mmd_tools_local import register_wrap
from mmd_tools_local import utils
from mmd_tools_local.bpyutils import ObjectOp
from mmd_tools_local.core import model as mmd_model
from mmd_tools_local.core.morph import FnMorph
from mmd_tools_local... | 34.268293 | 111 | 0.615302 |
0b6d638b2ebebc50efc1a944ad19ee2ec000914e | 6,849 | py | Python | skimage/_shared/testing.py | vighneshbirodkar/scikit-image | 766745c0498a82852c3044fb205c9970ba1caee2 | [
"BSD-3-Clause"
] | 3 | 2017-02-20T18:18:27.000Z | 2021-07-31T17:00:56.000Z | skimage13/_shared/testing.py | jzw0025/Kyber | ce2069da469095e6a086f7bbf9cd980f10563b22 | [
"Unlicense"
] | 2 | 2016-01-08T18:30:49.000Z | 2016-07-21T07:55:29.000Z | skimage13/_shared/testing.py | jzw0025/Kyber | ce2069da469095e6a086f7bbf9cd980f10563b22 | [
"Unlicense"
] | 2 | 2017-05-09T13:33:37.000Z | 2018-12-23T10:57:18.000Z | """Testing utilities."""
import os
import re
import threading
import functools
from tempfile import NamedTemporaryFile
from numpy import testing
import numpy as np
from ._warnings import expected_warnings
import warnings
from .. import data, io, img_as_uint, img_as_float, img_as_int, img_as_ubyte
SKIP_RE = re.com... | 27.178571 | 81 | 0.629581 |
d6874d6e012e01dffe584942d739c30cb238a114 | 13,902 | py | Python | pyhocon/config_tree.py | liqinshan/pyhocon | 25c33968945c1d7bed6e6326af177fc40ae851b6 | [
"Apache-2.0"
] | 1 | 2019-03-07T08:49:16.000Z | 2019-03-07T08:49:16.000Z | pyhocon/config_tree.py | liqinshan/pyhocon | 25c33968945c1d7bed6e6326af177fc40ae851b6 | [
"Apache-2.0"
] | null | null | null | pyhocon/config_tree.py | liqinshan/pyhocon | 25c33968945c1d7bed6e6326af177fc40ae851b6 | [
"Apache-2.0"
] | null | null | null | from pyparsing import lineno
from pyparsing import col
try: # pragma: no cover
from collections import OrderedDict
except ImportError: # pragma: no cover
from ordereddict import OrderedDict
try:
basestring
except NameError:
basestring = str
import re
from pyhocon.exceptions import ConfigException, C... | 34.929648 | 139 | 0.558409 |
008151d40ed6f01fe03d993f639540d58f78f001 | 6,365 | py | Python | examples/pxScene2d/external/libnode-v10.15.3/deps/v8/tools/sanitizers/sancov_formatter_test.py | madanagopaltcomcast/pxCore | c4a3a40a190521c8b6383d126c87612eca5b3c42 | [
"Apache-2.0"
] | 20,995 | 2015-01-01T05:12:40.000Z | 2022-03-31T21:39:18.000Z | examples/pxScene2d/external/libnode-v10.15.3/deps/v8/tools/sanitizers/sancov_formatter_test.py | madanagopaltcomcast/pxCore | c4a3a40a190521c8b6383d126c87612eca5b3c42 | [
"Apache-2.0"
] | 9,469 | 2015-01-30T05:33:07.000Z | 2022-03-31T16:17:21.000Z | examples/pxScene2d/external/libnode-v10.15.3/deps/v8/tools/sanitizers/sancov_formatter_test.py | madanagopaltcomcast/pxCore | c4a3a40a190521c8b6383d126c87612eca5b3c42 | [
"Apache-2.0"
] | 4,523 | 2015-01-01T15:12:34.000Z | 2022-03-28T06:23:41.000Z | # Copyright 2016 the V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Requires python-coverage. Native python coverage version >= 3.7.1 should
# be installed to get the best speed.
import copy
import coverage
import loggin... | 28.415179 | 79 | 0.6022 |
1b15f34458ce726ad350467eec310c53fd992c9a | 6,134 | py | Python | tensorflow/python/keras/engine/input_layer_test.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 74 | 2020-07-06T17:11:39.000Z | 2022-01-28T06:31:28.000Z | tensorflow/python/keras/engine/input_layer_test.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 88 | 2020-11-24T08:18:10.000Z | 2022-03-25T20:28:30.000Z | tensorflow/python/keras/engine/input_layer_test.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 12 | 2020-07-08T07:27:17.000Z | 2021-12-27T08:54:27.000Z | # Copyright 2020 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... | 41.167785 | 78 | 0.674764 |
82683441d34661a0340b78996952b76db6b50d85 | 12,163 | py | Python | release/scripts/addons_contrib/io_scene_open_street_map.py | noorbeast/BlenderSource | 65ebecc5108388965678b04b43463b85f6c69c1d | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 3 | 2019-09-16T10:29:19.000Z | 2022-02-11T14:43:18.000Z | engine/2.80/scripts/addons_contrib/io_scene_open_street_map.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | null | null | null | engine/2.80/scripts/addons_contrib/io_scene_open_street_map.py | byteinc/Phasor | f7d23a489c2b4bcc3c1961ac955926484ff8b8d9 | [
"Unlicense"
] | null | null | null | # ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed ... | 33.880223 | 102 | 0.510236 |
ba6d1c5db7f0cfd4223cf1ca9b910d342993c58b | 481 | py | Python | configs/_base_/coco_wsod_runtime.py | dyabel/wsod-mmdet | 60fc1993ea298f992b160b5599a6134702ac0d4f | [
"Apache-2.0"
] | 6 | 2021-10-09T05:34:04.000Z | 2022-03-31T00:36:55.000Z | configs/_base_/coco_wsod_runtime.py | dyabel/wsod-mmdet | 60fc1993ea298f992b160b5599a6134702ac0d4f | [
"Apache-2.0"
] | null | null | null | configs/_base_/coco_wsod_runtime.py | dyabel/wsod-mmdet | 60fc1993ea298f992b160b5599a6134702ac0d4f | [
"Apache-2.0"
] | null | null | null | checkpoint_config = dict(interval=1)
# yapf:disable
log_config = dict(
interval=50,
hooks=[
dict(type='TextLoggerHook'),
# dict(type='TensorboardLoggerHook')
])
# yapf:enable
dist_params = dict(backend='nccl')
log_level = 'INFO'
load_from = None
# resume_from = '/data/dy/work_dirs/wsod_coco/... | 26.722222 | 66 | 0.694387 |
decb9537748a8a95353813533f9a42e41acbcde1 | 1,323 | py | Python | InteractiveHtmlBom/ecad/kicad_extra/parser_base.py | XiaoMingXD/InteractiveHtmlBom | 45993bfaaff80cdc48b4422fe2d843d14973c572 | [
"MIT"
] | 7 | 2021-03-26T14:56:34.000Z | 2022-03-27T16:06:48.000Z | InteractiveHtmlBom/ecad/kicad_extra/parser_base.py | XiaoMingXD/InteractiveHtmlBom | 45993bfaaff80cdc48b4422fe2d843d14973c572 | [
"MIT"
] | 1 | 2022-03-14T20:55:56.000Z | 2022-03-20T07:24:11.000Z | InteractiveHtmlBom/ecad/kicad_extra/parser_base.py | XiaoMingXD/InteractiveHtmlBom | 45993bfaaff80cdc48b4422fe2d843d14973c572 | [
"MIT"
] | 1 | 2022-03-27T16:06:54.000Z | 2022-03-27T16:06:54.000Z | class ParserBase:
def __init__(self, file_name):
"""
:param file_name: path to file that should be parsed.
"""
self.file_name = file_name
@staticmethod
def normalize_field_names(data):
field_map = {f.lower(): f for f in reversed(data[0])}
def remap(ref_fiel... | 28.76087 | 64 | 0.486772 |
1e42958f16589ae8f1458b9e8b0a34caf2aef895 | 3,974 | py | Python | adventure/models/location.py | lamarmeigs/adventure | 570ca211911b86ef62c1258a2d040c3fd95fb786 | [
"MIT"
] | 2 | 2017-01-16T04:35:12.000Z | 2019-09-21T02:00:28.000Z | adventure/models/location.py | lamarmeigs/adventure | 570ca211911b86ef62c1258a2d040c3fd95fb786 | [
"MIT"
] | null | null | null | adventure/models/location.py | lamarmeigs/adventure | 570ca211911b86ef62c1258a2d040c3fd95fb786 | [
"MIT"
] | null | null | null | from adventure.models.base import BaseModel
class Direction(BaseModel):
"""Describes a direction (either cardinal or relative) to place exits."""
def __init__(self, name, abbrev, _identifier=None):
"""Creates a new `Direction` instance.
Arguments:
name (str): the primary way to r... | 34.859649 | 78 | 0.599396 |
1825f6342444011c63e7031414e7dad4ae2123bf | 4,288 | py | Python | tensorflow/tools/ci_build/builds/check_system_libs.py | Stevanus-Christian/tensorflow | d44afcf5ca16c5d704c66f891b99eac804e7cd14 | [
"Apache-2.0"
] | 3 | 2022-03-09T01:39:56.000Z | 2022-03-30T23:17:58.000Z | tensorflow/tools/ci_build/builds/check_system_libs.py | Stevanus-Christian/tensorflow | d44afcf5ca16c5d704c66f891b99eac804e7cd14 | [
"Apache-2.0"
] | 1 | 2020-08-01T05:40:12.000Z | 2020-08-01T05:40:12.000Z | tensorflow/tools/ci_build/builds/check_system_libs.py | Stevanus-Christian/tensorflow | d44afcf5ca16c5d704c66f891b99eac804e7cd14 | [
"Apache-2.0"
] | 1 | 2022-03-22T00:45:15.000Z | 2022-03-22T00:45:15.000Z | #!/usr/bin/env python
# Copyright 2020 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
#
# Unle... | 37.286957 | 83 | 0.718284 |
745c6de19f368aa0547f4ea422da872e737415e7 | 26,327 | py | Python | avantpy/converter.py | aroberge/avantpy | 98d25964e54853abe2d28ce3c61c72f55678a4f5 | [
"MIT"
] | 17 | 2019-04-06T18:20:07.000Z | 2021-08-15T13:16:18.000Z | avantpy/converter.py | aroberge/avantpy | 98d25964e54853abe2d28ce3c61c72f55678a4f5 | [
"MIT"
] | 10 | 2019-03-08T21:20:34.000Z | 2020-08-25T19:07:46.000Z | avantpy/converter.py | aroberge/avantpy | 98d25964e54853abe2d28ce3c61c72f55678a4f5 | [
"MIT"
] | null | null | null | """
This module contains all the necessary functions, classes and methods
to take a file written in a given dialect and convert it into Python.
In doing so, it can identify some mistakes and raise some custom
exceptions which can be used to inform users in a way that is less
intimidating than the usual Python traceback... | 36.36326 | 87 | 0.601588 |
b5229ab65fb124fcd8169d7a2937c1bd1a83f033 | 1,435 | py | Python | test/unit/metrics/test_annotated_metric_function.py | bramreinders97/fairlearn | 3335c33117993843252b4adeaeac3ac18683b2ca | [
"MIT"
] | null | null | null | test/unit/metrics/test_annotated_metric_function.py | bramreinders97/fairlearn | 3335c33117993843252b4adeaeac3ac18683b2ca | [
"MIT"
] | null | null | null | test/unit/metrics/test_annotated_metric_function.py | bramreinders97/fairlearn | 3335c33117993843252b4adeaeac3ac18683b2ca | [
"MIT"
] | null | null | null | # Copyright (c) Microsoft Corporation and Fairlearn contributors.
# Licensed under the MIT License.
import functools
import numpy as np
from sklearn.metrics import recall_score
from fairlearn.metrics._annotated_metric_function import AnnotatedMetricFunction
def test_constructor_unnamed():
fc = AnnotatedMetricFun... | 38.783784 | 81 | 0.760976 |
7c40eedbaa020a4ddfdbdf3e6f9a85e98aec6b99 | 2,536 | py | Python | tests/ext/django/test_middleware.py | MarSoft/aws-xray-sdk-python | f300a865135a17740a15b496021d9602fd67bbbc | [
"Apache-2.0"
] | null | null | null | tests/ext/django/test_middleware.py | MarSoft/aws-xray-sdk-python | f300a865135a17740a15b496021d9602fd67bbbc | [
"Apache-2.0"
] | null | null | null | tests/ext/django/test_middleware.py | MarSoft/aws-xray-sdk-python | f300a865135a17740a15b496021d9602fd67bbbc | [
"Apache-2.0"
] | null | null | null | import django
from django.core.urlresolvers import reverse
from django.test import TestCase
from aws_xray_sdk.core import xray_recorder
from aws_xray_sdk.core.context import Context
class XRayTestCase(TestCase):
def setUp(self):
django.setup()
xray_recorder.configure(context=Context(),
... | 29.149425 | 60 | 0.612382 |
53fcd6d8e548b6bc5ba07664a53ac40320ccc30b | 22,334 | py | Python | Preferences/Boot Environments.app/Resources/boot-environments.py | MalloryA/Utilities | ce1bb2fbbad886ca4beef28942348400b2b117ee | [
"BSD-2-Clause"
] | 19 | 2021-01-07T12:56:40.000Z | 2022-01-25T18:58:44.000Z | Preferences/Boot Environments.app/Resources/boot-environments.py | MalloryA/Utilities | ce1bb2fbbad886ca4beef28942348400b2b117ee | [
"BSD-2-Clause"
] | 129 | 2020-11-29T13:15:45.000Z | 2022-03-31T18:29:37.000Z | Preferences/Boot Environments.app/Resources/boot-environments.py | MalloryA/Utilities | ce1bb2fbbad886ca4beef28942348400b2b117ee | [
"BSD-2-Clause"
] | 24 | 2021-01-07T12:55:16.000Z | 2022-01-23T18:08:39.000Z | #!/usr/bin/env python3
# Simple ZFS configuration tool written for FreeBSD in PyQt5
# for bectl(1)
# https://www.freebsd.org/cgi/man.cgi?bectl
# Copyright (c) 2020, Simon Peter <probono@puredarwin.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are p... | 40.096948 | 299 | 0.596221 |
bd8786810623003f72b255039a8b51807c36e9ab | 1,712 | py | Python | setup.py | rhondamorgan/EXOSIMS | 4c96a7867f6f5a61ccdbd9f1971759fc34a1108c | [
"BSD-3-Clause"
] | null | null | null | setup.py | rhondamorgan/EXOSIMS | 4c96a7867f6f5a61ccdbd9f1971759fc34a1108c | [
"BSD-3-Clause"
] | null | null | null | setup.py | rhondamorgan/EXOSIMS | 4c96a7867f6f5a61ccdbd9f1971759fc34a1108c | [
"BSD-3-Clause"
] | null | null | null | import setuptools
import os.path
import re
use_cython = True
try:
from Cython.Build import cythonize
import numpy
extensions = [setuptools.Extension("EXOSIMS.util.KeplerSTM_C.CyKeplerSTM", \
[os.path.join("EXOSIMS","util","KeplerSTM_C","CyKeplerSTM.pyx"),\
os.path.jo... | 32.301887 | 85 | 0.653621 |
dd9482d4e7d559e9cfe64a5e5c5b30f30634e489 | 17,286 | py | Python | boilerplate/boilerplate.py | juglab/HDN | e30edf7ec2cd55c902e469b890d8fe44d15cbb7e | [
"BSD-3-Clause"
] | 15 | 2021-09-24T02:40:21.000Z | 2022-03-28T09:41:22.000Z | boilerplate/boilerplate.py | juglab/HDN | e30edf7ec2cd55c902e469b890d8fe44d15cbb7e | [
"BSD-3-Clause"
] | 2 | 2022-02-14T11:58:15.000Z | 2022-02-18T11:51:02.000Z | boilerplate/boilerplate.py | juglab/HDN | e30edf7ec2cd55c902e469b890d8fe44d15cbb7e | [
"BSD-3-Clause"
] | 2 | 2022-02-11T00:53:35.000Z | 2022-03-10T11:13:58.000Z | import numpy as np
import math
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.utils.data import TensorDataset
from torch.utils.data import Dataset, DataLoader
from torchvision.utils import save_image
from torch.nn import init
from torch.optim.optimizer import O... | 38.32816 | 134 | 0.64746 |
dbdb794eb226c8f00c61df032ab23cf1a56be74e | 470 | py | Python | tests/unit/modules/test_tidx2.py | salt-extensions/salt-ext-test-2 | 744ce0ff30b0eecdda9987a461ff2d2f82dc203a | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/test_tidx2.py | salt-extensions/salt-ext-test-2 | 744ce0ff30b0eecdda9987a461ff2d2f82dc203a | [
"Apache-2.0"
] | null | null | null | tests/unit/modules/test_tidx2.py | salt-extensions/salt-ext-test-2 | 744ce0ff30b0eecdda9987a461ff2d2f82dc203a | [
"Apache-2.0"
] | 1 | 2020-12-04T11:30:02.000Z | 2020-12-04T11:30:02.000Z | import pytest
import saltext.tidx2.modules.tidx2_mod as tidx2_module
@pytest.fixture
def configure_loader_modules():
module_globals = {"__salt__": {"this_does_not_exist.please_replace_it": lambda: True}}
return {tidx2_module: module_globals}
def test_replace_this_this_with_something_meaningful():
assert... | 33.571429 | 90 | 0.814894 |
6160afc2af072e354e11ae50f0a7cd90f9ee4011 | 4,616 | py | Python | tests/python/pants_test/engine/legacy/test_filemap_integration.py | mateor/pants | e01cee8959da269c0b526138760847901e4d4a48 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/engine/legacy/test_filemap_integration.py | mateor/pants | e01cee8959da269c0b526138760847901e4d4a48 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/engine/legacy/test_filemap_integration.py | mateor/pants | e01cee8959da269c0b526138760847901e4d4a48 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2016 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 os
from pant... | 44.815534 | 121 | 0.652296 |
93c1bccb6dc122163db301a98978390b441290b6 | 2,279 | py | Python | websauna/system/admin/utils.py | stevepiercy/websauna | 2886b86f7920d75900c634958779d61aa73f011b | [
"CNRI-Python"
] | null | null | null | websauna/system/admin/utils.py | stevepiercy/websauna | 2886b86f7920d75900c634958779d61aa73f011b | [
"CNRI-Python"
] | null | null | null | websauna/system/admin/utils.py | stevepiercy/websauna | 2886b86f7920d75900c634958779d61aa73f011b | [
"CNRI-Python"
] | null | null | null | # Websauna
from websauna.system.admin.interfaces import IAdmin
from websauna.system.admin.modeladmin import ModelAdmin
from websauna.system.core.traversal import Resource
def get_admin(request) -> IAdmin:
"""Get hold of the default site admin interface root object."""
admin_class = request.registry.queryUtili... | 32.098592 | 101 | 0.742431 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.