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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fc9cc9174dbb7e4b0ff4a213151c6b43bd8c10aa | 2,190 | py | Python | src/IceRayPy/utility/light/sun.py | dmilos/IceRay | 4e01f141363c0d126d3c700c1f5f892967e3d520 | [
"MIT-0"
] | 2 | 2020-09-04T12:27:15.000Z | 2022-01-17T14:49:40.000Z | src/IceRayPy/utility/light/sun.py | dmilos/IceRay | 4e01f141363c0d126d3c700c1f5f892967e3d520 | [
"MIT-0"
] | null | null | null | src/IceRayPy/utility/light/sun.py | dmilos/IceRay | 4e01f141363c0d126d3c700c1f5f892967e3d520 | [
"MIT-0"
] | 1 | 2020-09-04T12:27:52.000Z | 2020-09-04T12:27:52.000Z |
import IceRayPy
Coord3D = IceRayPy.type.math.coord.Scalar3D
class Point:
def __init__( self, P_dll, P_center = None ):
self.m_implementation = IceRayPy.core.light.SunG( P_dll, IceRayPy.core.light.Point( P_dll, IceRayPy.core.light.Spot( Coord3D( 0, 0, 10 ) ) ) )
#self.m_implementation =... | 35.322581 | 151 | 0.615068 |
6f044f58d9c75674b31f54cd8721b95f574a099d | 2,533 | py | Python | monitis_dump_monitor_list.py | shinhermit/ipsen-oxiane-automation | 3730a28a801f3b18855cd1c00729192abee64fd0 | [
"MIT"
] | null | null | null | monitis_dump_monitor_list.py | shinhermit/ipsen-oxiane-automation | 3730a28a801f3b18855cd1c00729192abee64fd0 | [
"MIT"
] | null | null | null | monitis_dump_monitor_list.py | shinhermit/ipsen-oxiane-automation | 3730a28a801f3b18855cd1c00729192abee64fd0 | [
"MIT"
] | 1 | 2017-12-06T09:13:50.000Z | 2017-12-06T09:13:50.000Z | from webapis.monitisapi import api_connector
from webapis.monitisapi.data_model import Monitor
from webapis.common.data_model import GenericWrappingIterator
from webapis import utils
from webapis.utils import Console
welcome_msg = """
-----------------------------------------------------------------------------------... | 36.185714 | 108 | 0.523885 |
ec9413a1cae9e04e4fc8db3832cb74d8f54cb2a7 | 3,182 | py | Python | pyprom/tests/util/helpers.py | Marchowes/pyProm | 0fb67597ba1f0be2e55e30c5e029df2a60e9ac56 | [
"BSD-3-Clause"
] | 5 | 2016-09-12T15:18:46.000Z | 2019-01-22T01:51:01.000Z | pyprom/tests/util/helpers.py | Marchowes/pyProm | 0fb67597ba1f0be2e55e30c5e029df2a60e9ac56 | [
"BSD-3-Clause"
] | 134 | 2016-08-15T02:14:06.000Z | 2021-09-01T14:54:16.000Z | pyprom/tests/util/helpers.py | Marchowes/pyProm | 0fb67597ba1f0be2e55e30c5e029df2a60e9ac56 | [
"BSD-3-Clause"
] | 2 | 2016-09-12T15:41:42.000Z | 2017-08-17T17:30:55.000Z | """
pyProm: Copyright 2018.
This software is distributed under a license that is described in
the LICENSE file that accompanies it.
"""
from pyprom.lib.containers.multipoint import MultiPoint
from pyprom.lib.locations.saddle import Saddle
def generate_MultiPoint(x, y, xSpan, ySpan,
datamap, ... | 37.435294 | 97 | 0.638906 |
7a1a923122febb983836d91f5d22acb278da2fa2 | 3,547 | py | Python | deepobs/pytorch/datasets/cifar100.py | H0merJayS1mpson/deepobscustom | e85816ce42466326dac18841c58b79f87a4a1a7c | [
"MIT"
] | 7 | 2019-09-06T04:51:14.000Z | 2020-05-12T09:05:47.000Z | deepobs/pytorch/datasets/cifar100.py | H0merJayS1mpson/deepobscustom | e85816ce42466326dac18841c58b79f87a4a1a7c | [
"MIT"
] | 16 | 2019-09-06T10:58:31.000Z | 2020-07-08T09:22:06.000Z | deepobs/pytorch/datasets/cifar100.py | H0merJayS1mpson/deepobscustom | e85816ce42466326dac18841c58b79f87a4a1a7c | [
"MIT"
] | 5 | 2019-07-24T14:20:15.000Z | 2020-10-14T13:14:08.000Z | # -*- coding: utf-8 -*-
"""CIFAR-100 DeepOBS dataset."""
from . import dataset
from deepobs import config
from torch.utils import data as dat
from torchvision import datasets
from torchvision import transforms
from .datasets_utils import train_eval_sampler
training_transform_augmented = transforms.Compose([
tr... | 44.898734 | 140 | 0.695799 |
e59ff302c9dc9d270bc1c1463d520c438ab768a5 | 2,792 | py | Python | test/bot_test.py | tienhien1102/neu-chatbot | f2a792b67a04ccfe5aa0b84c373a5918bb700ca6 | [
"MIT"
] | null | null | null | test/bot_test.py | tienhien1102/neu-chatbot | f2a792b67a04ccfe5aa0b84c373a5918bb700ca6 | [
"MIT"
] | null | null | null | test/bot_test.py | tienhien1102/neu-chatbot | f2a792b67a04ccfe5aa0b84c373a5918bb700ca6 | [
"MIT"
] | null | null | null | import os
from pymessenger.bot import Bot
from pymessenger import Element, Button
TOKEN = os.environ.get('EAAGQpPkuP5YBACDRuZBc1uS2DMn0aewRfuidgZBtuT78bf87YpFw3jwaAaBeI4JcoxcyKmgcshF80uJrAaI2BQLBAz9r4gZAT9k2PGbKaUbDQeYDsth1xOGc4IwlKt6rkFipKT6CwXJCPvH7gl80irRNQoUTn52K0NHKBBaEwZDZD')
APP_SECRET = os.environ.get('483d04... | 36.25974 | 200 | 0.738897 |
2382488e875478320b273a8ef859effae260c1f6 | 23,150 | py | Python | lib/modeling/detector.py | skokec/detectron-villard | 9e420bf3fb75a8f06f6e3fd970fc2600d8969d10 | [
"Apache-2.0"
] | 27 | 2019-05-03T14:24:51.000Z | 2022-03-25T13:13:56.000Z | lib/modeling/detector.py | skokec/detectron-villard | 9e420bf3fb75a8f06f6e3fd970fc2600d8969d10 | [
"Apache-2.0"
] | 5 | 2019-10-03T06:28:50.000Z | 2021-11-22T12:16:31.000Z | lib/modeling/detector.py | skokec/detectron-villard | 9e420bf3fb75a8f06f6e3fd970fc2600d8969d10 | [
"Apache-2.0"
] | 16 | 2019-05-10T09:46:40.000Z | 2022-03-18T02:12:41.000Z | # 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... | 39.982729 | 94 | 0.613002 |
7e990b880e414d1e950311cd9cf3fe7f5a65376a | 11,787 | py | Python | tests/integration/ec2/cloudwatch/test_connection.py | adastreamer/boto | ce472cbbcffd06298fdd0c980d5bfcdcee875498 | [
"MIT"
] | 15 | 2015-03-25T05:24:11.000Z | 2021-12-18T04:24:06.000Z | tests/integration/ec2/cloudwatch/test_connection.py | adastreamer/boto | ce472cbbcffd06298fdd0c980d5bfcdcee875498 | [
"MIT"
] | 1 | 2021-04-30T21:27:50.000Z | 2021-04-30T21:27:50.000Z | tests/integration/ec2/cloudwatch/test_connection.py | adastreamer/boto | ce472cbbcffd06298fdd0c980d5bfcdcee875498 | [
"MIT"
] | 10 | 2015-04-26T17:56:37.000Z | 2020-09-24T14:01:53.000Z | # Copyright (c) 2010 Hunter Blanks http://artifex.org/~hblanks/
# All rights reserved.
#
# 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 th... | 42.399281 | 380 | 0.626792 |
bd5a9fa80be5e4d2ee85afebba27dc3f37b4f105 | 2,022 | py | Python | aliyun-python-sdk-ocs/aliyunsdkocs/request/v20150407/DescribeClusterNodesForInnerInstRequest.py | DataDog/aliyun-openapi-python-sdk | 5cbee29bce6416dd62f61f0c3786b1af6ea0d84f | [
"Apache-2.0"
] | 1 | 2019-12-23T12:36:43.000Z | 2019-12-23T12:36:43.000Z | aliyun-python-sdk-ocs/aliyunsdkocs/request/v20150407/DescribeClusterNodesForInnerInstRequest.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ocs/aliyunsdkocs/request/v20150407/DescribeClusterNodesForInnerInstRequest.py | liusc27/aliyun-openapi-python-sdk | 5e3db3535dd21de987dc5981e71151327d5a884f | [
"Apache-2.0"
] | 1 | 2021-02-23T11:27:54.000Z | 2021-02-23T11:27:54.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... | 33.7 | 84 | 0.783877 |
c0577069bc367af1d143680bd10d4ba7bd9b126c | 4,794 | py | Python | tests/test_webapp.py | thiagolcmelo/dspreview | b20e7e3788f7d7cb7c44b17fc1c8e8a87c45f41e | [
"MIT"
] | null | null | null | tests/test_webapp.py | thiagolcmelo/dspreview | b20e7e3788f7d7cb7c44b17fc1c8e8a87c45f41e | [
"MIT"
] | null | null | null | tests/test_webapp.py | thiagolcmelo/dspreview | b20e7e3788f7d7cb7c44b17fc1c8e8a87c45f41e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# python standard
import sys
from datetime import datetime
sys.path.insert(0, "./src")
sys.path.insert(0, "./src/webapp")
# third-party imports
from flask_testing import TestCase
from flask import abort, url_for
# local imports
from utils.sql_helper import get_connection_strs
from webapp.app ... | 31.96 | 76 | 0.561952 |
70fc72a9a25ed7ad1070317dfaeaf838bc3f765b | 2,578 | py | Python | tests/unit_test.py | HBPMedical/i2b2-import | 444d492d6161e1792d3e283c0d85255308dbcd5f | [
"Apache-2.0"
] | 1 | 2021-07-02T16:38:16.000Z | 2021-07-02T16:38:16.000Z | tests/unit_test.py | HBPMedical/i2b2-import | 444d492d6161e1792d3e283c0d85255308dbcd5f | [
"Apache-2.0"
] | null | null | null | tests/unit_test.py | HBPMedical/i2b2-import | 444d492d6161e1792d3e283c0d85255308dbcd5f | [
"Apache-2.0"
] | 2 | 2017-02-02T09:51:30.000Z | 2019-11-13T06:48:44.000Z | import logging
import os
from nose.tools import assert_greater_equal
from sqlalchemy.exc import IntegrityError
from i2b2_import import i2b2_connection
from i2b2_import import data_catalog_connection
from i2b2_import import features_csv_import
from i2b2_import import meta_files_import
from i2b2_import import data_cata... | 36.309859 | 113 | 0.737393 |
909695ddf3284eb34843b03beae6dd21990a3c7c | 114 | py | Python | build_tools/frontend_test_nonstop_config.py | yandexdataschool/everware | 78c3a02acfcf3f3170981f2319d061eaf9c407aa | [
"BSD-3-Clause"
] | 130 | 2015-08-13T15:51:17.000Z | 2021-10-04T05:12:51.000Z | build_tools/frontend_test_nonstop_config.py | yandexdataschool/everware | 78c3a02acfcf3f3170981f2319d061eaf9c407aa | [
"BSD-3-Clause"
] | 184 | 2015-08-01T11:40:10.000Z | 2018-03-23T12:00:57.000Z | build_tools/frontend_test_nonstop_config.py | yandexdataschool/everware | 78c3a02acfcf3f3170981f2319d061eaf9c407aa | [
"BSD-3-Clause"
] | 38 | 2015-07-31T18:27:05.000Z | 2021-01-05T02:15:18.000Z | c = get_config()
load_subconfig('build_tools/frontend_test_normal_config.py')
c.Spawner.remove_containers = False
| 28.5 | 60 | 0.833333 |
8a5b6752610340409a8be9f4c8e87835597a413f | 840 | py | Python | SortingAlgorithm/QuickSort.py | weaponsX/SortingAlgorithmForPython3 | 8b5e1dd3aaf30b74c53ff643a225024ef8fbac13 | [
"Apache-2.0"
] | null | null | null | SortingAlgorithm/QuickSort.py | weaponsX/SortingAlgorithmForPython3 | 8b5e1dd3aaf30b74c53ff643a225024ef8fbac13 | [
"Apache-2.0"
] | null | null | null | SortingAlgorithm/QuickSort.py | weaponsX/SortingAlgorithmForPython3 | 8b5e1dd3aaf30b74c53ff643a225024ef8fbac13 | [
"Apache-2.0"
] | null | null | null | #交换排序-快速排序
"""
快速排序是通常被认为在同数量级(O(nlog2n))的排序方法中平均性能最好的。但若初始序列按关键码有序或基本有序时,快排序反而蜕化为冒泡排序。
为改进之,通常以“三者取中法”来选取基准记录,即将排序区间的两个端点与中点三个记录关键码居中的调整为支点记录。快速排序是一个不稳定的排序方法。
"""
def partition(numbers, low, high):
i = low-1
for j in range(low, high):
if numbers[j] <= numbers[high]:
i = i + 1
... | 24.705882 | 72 | 0.616667 |
8c54a4ea82d34045202556569d56f116bff08463 | 88 | py | Python | API-Server/wsgi.py | lenayq/COVIDContactTracerApp | efbe3edb8feb4048dadb9e161810dfdd9fdb83b2 | [
"Apache-2.0"
] | 5 | 2020-07-31T18:34:29.000Z | 2020-08-21T07:08:59.000Z | API-Server/wsgi.py | lenayq/COVIDContactTracerApp | efbe3edb8feb4048dadb9e161810dfdd9fdb83b2 | [
"Apache-2.0"
] | null | null | null | API-Server/wsgi.py | lenayq/COVIDContactTracerApp | efbe3edb8feb4048dadb9e161810dfdd9fdb83b2 | [
"Apache-2.0"
] | 2 | 2020-07-31T18:34:31.000Z | 2020-07-31T19:23:26.000Z | from server import app as application
if __name__ == "__main__":
application.run()
| 17.6 | 37 | 0.727273 |
068d8c1352eab1b4c16f7fb8a9d8d1986ab28c38 | 179 | py | Python | edx_rest_api_client/exceptions.py | regisb/edx-rest-api-client | 130b5aa1285cd45118becc5021285fdc03e2d56a | [
"Apache-2.0"
] | 14 | 2016-02-15T03:32:26.000Z | 2021-10-14T19:14:25.000Z | edx_rest_api_client/exceptions.py | regisb/edx-rest-api-client | 130b5aa1285cd45118becc5021285fdc03e2d56a | [
"Apache-2.0"
] | 40 | 2015-10-20T16:51:13.000Z | 2021-08-16T13:27:46.000Z | edx_rest_api_client/exceptions.py | regisb/edx-rest-api-client | 130b5aa1285cd45118becc5021285fdc03e2d56a | [
"Apache-2.0"
] | 10 | 2016-01-04T18:51:10.000Z | 2021-06-22T12:41:14.000Z | # noinspection PyUnresolvedReferences
from requests.exceptions import Timeout # pylint: disable=unused-import
from slumber.exceptions import * # pylint: disable=wildcard-import
| 44.75 | 72 | 0.826816 |
4b7c18e96992393b68a8f7b519ddd4024eaba977 | 627 | py | Python | implementation/manage.py | dwws-ufes/2019-SocialMeetScheduler | b5c94afb674ddcca5e53a0dff062edcb22343408 | [
"MIT"
] | 1 | 2020-01-10T19:18:14.000Z | 2020-01-10T19:18:14.000Z | implementation/manage.py | dwws-ufes/2019-SocialMeetScheduler | b5c94afb674ddcca5e53a0dff062edcb22343408 | [
"MIT"
] | 2 | 2020-06-05T19:25:25.000Z | 2021-06-04T21:59:09.000Z | implementation/manage.py | dwws-ufes/2019-SocialMeetScheduler | b5c94afb674ddcca5e53a0dff062edcb22343408 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'webproj.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise Import... | 28.5 | 73 | 0.682616 |
97c13fd496c65a8ef7909962ce6419f061de03f1 | 1,947 | py | Python | tests/functional/utils/test_misc.py | johnson2427/ape | e0dbce86d7ddb4574df109f443718f19dc183608 | [
"Apache-2.0"
] | null | null | null | tests/functional/utils/test_misc.py | johnson2427/ape | e0dbce86d7ddb4574df109f443718f19dc183608 | [
"Apache-2.0"
] | null | null | null | tests/functional/utils/test_misc.py | johnson2427/ape | e0dbce86d7ddb4574df109f443718f19dc183608 | [
"Apache-2.0"
] | null | null | null | from typing import Iterator
import pytest
from ape.exceptions import APINotImplementedError
from ape.utils.misc import (
add_padding_to_strings,
cached_iterator,
extract_nested_value,
raises_not_implemented,
)
def test_extract_nested_value():
structure = {"foo": {"bar": {"test": "expected_value"... | 29.5 | 100 | 0.682589 |
fcf7f4261ded22614e9b64060049dbd377f573a9 | 5,730 | py | Python | data_managers/data_manager_dada2/data_manager/data_manager.py | meugr/tools-iuc | 14002b1c1601aa7afaa7194385bf45285877baab | [
"MIT"
] | null | null | null | data_managers/data_manager_dada2/data_manager/data_manager.py | meugr/tools-iuc | 14002b1c1601aa7afaa7194385bf45285877baab | [
"MIT"
] | 2 | 2018-04-16T17:38:53.000Z | 2019-09-19T06:55:26.000Z | data_managers/data_manager_dada2/data_manager/data_manager.py | meugr/tools-iuc | 14002b1c1601aa7afaa7194385bf45285877baab | [
"MIT"
] | 1 | 2018-04-19T11:08:07.000Z | 2018-04-19T11:08:07.000Z | import argparse
import json
import os
try:
# For Python 3.0 and later
from urllib.request import Request, urlopen
except ImportError:
# Fall back to Python 2 imports
from urllib2 import Request, urlopen
DEFAULT_TAXLEVELS = "Kingdom,Phylum,Class,Order,Family,Genus,Species"
FILE2NAME = {
"silva_132"... | 42.761194 | 142 | 0.683421 |
6821fb7c4a264741d94bff25b8943766548eac91 | 528 | py | Python | experiments/scripts/visualize_gamma.py | wecacuee/POMDPy | c23ebf90f5815db4326564110487779961736b60 | [
"MIT"
] | 210 | 2015-04-23T17:05:50.000Z | 2022-03-14T08:00:00.000Z | experiments/scripts/visualize_gamma.py | wecacuee/POMDPy | c23ebf90f5815db4326564110487779961736b60 | [
"MIT"
] | 15 | 2015-04-13T05:36:14.000Z | 2019-05-06T19:14:50.000Z | experiments/scripts/visualize_gamma.py | wecacuee/POMDPy | c23ebf90f5815db4326564110487779961736b60 | [
"MIT"
] | 76 | 2016-08-18T03:54:08.000Z | 2022-01-26T09:08:23.000Z | from __future__ import absolute_import
from experiments.scripts import plot_alpha_vectors
from experiments.scripts import pickle_wrapper
import os
if __name__ == '__main__':
n_actions = 3
my_dir = os.path.dirname(__file__)
weight_dir = os.path.join(my_dir, '..', '..', 'experiments', 'pickle_jar')
gamm... | 37.714286 | 120 | 0.772727 |
87c4626938e2406df59b4d4126476ae008ed0810 | 19,542 | py | Python | arviz/stats/stats_utils.py | sudojarvis/arviz | 73531be4f23df7d764b2e3bec8c5ef5cb882590d | [
"Apache-2.0"
] | 1 | 2021-08-18T15:53:39.000Z | 2021-08-18T15:53:39.000Z | arviz/stats/stats_utils.py | sudojarvis/arviz | 73531be4f23df7d764b2e3bec8c5ef5cb882590d | [
"Apache-2.0"
] | null | null | null | arviz/stats/stats_utils.py | sudojarvis/arviz | 73531be4f23df7d764b2e3bec8c5ef5cb882590d | [
"Apache-2.0"
] | null | null | null | """Stats-utility functions for ArviZ."""
import warnings
from collections.abc import Sequence
from copy import copy as _copy
from copy import deepcopy as _deepcopy
import numpy as np
import pandas as pd
from scipy.fftpack import next_fast_len
from scipy.interpolate import CubicSpline
from scipy.stats.mstats ... | 33.986087 | 101 | 0.576962 |
8bdd693a8bea73e6ccec85e37ec5be7c0c6b4d35 | 371 | py | Python | python.py | Uzikan/phone-hack-prank | 430ebcadc011e50fd1953dae0710ecdc3de974de | [
"MIT"
] | null | null | null | python.py | Uzikan/phone-hack-prank | 430ebcadc011e50fd1953dae0710ecdc3de974de | [
"MIT"
] | null | null | null | python.py | Uzikan/phone-hack-prank | 430ebcadc011e50fd1953dae0710ecdc3de974de | [
"MIT"
] | null | null | null | from random import *
guess=""
password=input("password")
letters = ["0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0"]
while(guess != password):
Guess=""
for letter in password:
guessletter=letters[randint(0,25)]
guess=str(gue... | 24.733333 | 116 | 0.504043 |
f4e19898fee62c0b2bf1490e6f31106b5e364cc3 | 3,822 | py | Python | task1.py | Dima12101/2019_IT | 876f161bbc7286372a98dc1acc582fbd55735b21 | [
"MIT"
] | 3 | 2019-09-26T08:26:19.000Z | 2019-10-22T20:05:05.000Z | task1.py | Dima12101/2019_IT | 876f161bbc7286372a98dc1acc582fbd55735b21 | [
"MIT"
] | null | null | null | task1.py | Dima12101/2019_IT | 876f161bbc7286372a98dc1acc582fbd55735b21 | [
"MIT"
] | 51 | 2019-09-10T14:46:09.000Z | 2019-10-31T14:10:25.000Z | x = [1.49066127e-06, 1.00024454e-02, 2.00039718e-02, 3.00063867e-02,
4.00101677e-02, 5.00160261e-02, 6.00250086e-02, 7.00386374e-02,
8.00590993e-02, 9.00894983e-02, 1.00134185e-01, 1.10199182e-01,
1.20292721e-01, 1.30425906e-01, 1.40613524e-01, 1.50874996e-01,
1.61235486e-01, 1.71727136e-01, 1.82390... | 57.044776 | 68 | 0.682365 |
664d3511799a8ffa8ec9f4afa4bd48581ee82883 | 1,417 | py | Python | aliyun-python-sdk-imm/aliyunsdkimm/request/v20170906/GetImageJobRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-imm/aliyunsdkimm/request/v20170906/GetImageJobRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-imm/aliyunsdkimm/request/v20170906/GetImageJobRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 32.953488 | 70 | 0.752294 |
83fa1bbcedc11a1fdea83012040cc64f6f5a3b9e | 7,617 | py | Python | sdk/python/pulumi_gcp/organizations/iam_custom_role.py | 23doors/pulumi-gcp | ded01b199f95b164884266ea3e6f8206c8231270 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-12-20T22:08:20.000Z | 2019-12-20T22:08:20.000Z | sdk/python/pulumi_gcp/organizations/iam_custom_role.py | pellizzetti/pulumi-gcp | fad74dd55a0cf7723f73046bb0e6fcbfd948ba84 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_gcp/organizations/iam_custom_role.py | pellizzetti/pulumi-gcp | fad74dd55a0cf7723f73046bb0e6fcbfd948ba84 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from typing import Union
from .. import utilities, tables
class IAMCus... | 52.171233 | 186 | 0.675857 |
22324e2f80e2ed2117be716abb860427eb8eff3e | 9,220 | py | Python | mmseg/models/decode_heads/decode_head.py | xushige/mmseg-combine-cls | 9b645cd1cc6d1c145d5234a3ba554404889cb869 | [
"Apache-2.0"
] | 1 | 2021-09-16T14:47:11.000Z | 2021-09-16T14:47:11.000Z | mmseg/models/decode_heads/decode_head.py | xushige/mmseg-combine-cls | 9b645cd1cc6d1c145d5234a3ba554404889cb869 | [
"Apache-2.0"
] | null | null | null | mmseg/models/decode_heads/decode_head.py | xushige/mmseg-combine-cls | 9b645cd1cc6d1c145d5234a3ba554404889cb869 | [
"Apache-2.0"
] | null | null | null | from abc import ABCMeta, abstractmethod
import torch
import torch.nn as nn
from mmcv.runner import BaseModule, auto_fp16, force_fp32
from mmseg.core import build_pixel_sampler
from mmseg.ops import resize
from ..builder import build_loss
from ..losses import accuracy
class BaseDecodeHead(BaseModule, metaclass=ABCMe... | 39.570815 | 79 | 0.595879 |
98f6fda87ccb4570723283635ff4e6ecc3625e5d | 12,540 | py | Python | tests/test_suite.py | Justin-Fisher/webots | 8a39e8e4390612919a8d82c7815aa914f4c079a4 | [
"Apache-2.0"
] | 1,561 | 2019-09-04T11:32:32.000Z | 2022-03-31T18:00:09.000Z | tests/test_suite.py | Justin-Fisher/webots | 8a39e8e4390612919a8d82c7815aa914f4c079a4 | [
"Apache-2.0"
] | 2,184 | 2019-09-03T11:35:02.000Z | 2022-03-31T10:01:44.000Z | tests/test_suite.py | Justin-Fisher/webots | 8a39e8e4390612919a8d82c7815aa914f4c079a4 | [
"Apache-2.0"
] | 1,013 | 2019-09-07T05:09:32.000Z | 2022-03-31T13:01:28.000Z | #!/usr/bin/env python
# Copyright 1996-2021 Cyberbotics Ltd.
#
# 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... | 35.423729 | 123 | 0.640351 |
54cf2f9e5823897d6235ee3a85d59f9df0e373aa | 158 | py | Python | lessons/ObjectOrientedProgramming/IdeFiles/4a_binomial_package/distributions/__init__.py | Meng-nanco/DSND_Term2 | 00489e641eafc8b3843bfaa0a49297aa9767984e | [
"MIT"
] | null | null | null | lessons/ObjectOrientedProgramming/IdeFiles/4a_binomial_package/distributions/__init__.py | Meng-nanco/DSND_Term2 | 00489e641eafc8b3843bfaa0a49297aa9767984e | [
"MIT"
] | null | null | null | lessons/ObjectOrientedProgramming/IdeFiles/4a_binomial_package/distributions/__init__.py | Meng-nanco/DSND_Term2 | 00489e641eafc8b3843bfaa0a49297aa9767984e | [
"MIT"
] | null | null | null | from .Gaussiandistribution import Gaussian
# TODO: import the Binomial class from the Binomialdistribution module
from .Binomialdistribution import Binomial
| 31.6 | 70 | 0.85443 |
9db5dcb4685acd73951f2d8ddd4dac02f3499eb7 | 1,245 | py | Python | Thresholds/SusyD/Approach 2 - Sequential/susycommon.py | Suvoo/Formal-Concept-Analysis | 53e895b7112a741af352fc60869e689324c75557 | [
"MIT"
] | 4 | 2021-07-14T16:53:15.000Z | 2021-07-15T04:03:27.000Z | Thresholds/SusyD/Approach 2 - Sequential/susycommon.py | Suvoo/Formal-Concept-Analysis | 53e895b7112a741af352fc60869e689324c75557 | [
"MIT"
] | null | null | null | Thresholds/SusyD/Approach 2 - Sequential/susycommon.py | Suvoo/Formal-Concept-Analysis | 53e895b7112a741af352fc60869e689324c75557 | [
"MIT"
] | null | null | null | threshold = 929794
theta = 2500000
a,brr=[],[]
ac=''
with open('Thresholds\SusyD\Approach 1 - FrontRear\susy_support_att') as file:
for line in file:
line = line.strip()
line = line + '\t'
if(line[0] != 'S'):
for c in line:
if(c != '\t'):
ac ... | 21.101695 | 78 | 0.472289 |
73029aed48847c8ad509c1269e89ad27e03667e7 | 142 | py | Python | app/review/blueprint.py | MhmdRyhn/flask_restful_with_blueprint | 8122797008e4b6325ca3c4460542f0c72cb1a19c | [
"MIT"
] | null | null | null | app/review/blueprint.py | MhmdRyhn/flask_restful_with_blueprint | 8122797008e4b6325ca3c4460542f0c72cb1a19c | [
"MIT"
] | null | null | null | app/review/blueprint.py | MhmdRyhn/flask_restful_with_blueprint | 8122797008e4b6325ca3c4460542f0c72cb1a19c | [
"MIT"
] | null | null | null | import flask
import flask_restful
blueprint = flask.Blueprint('review', __name__)
url_prefix = '/review'
API = flask_restful.Api(blueprint)
| 17.75 | 47 | 0.78169 |
a0e34aa9986b18b393789b634c0d49a68981ba90 | 15,994 | py | Python | azurelinuxagent/ga/monitor.py | vrdmr/WALinuxAgent | 6d680e071cdf31049c4c636633bf3bcfa5366ccc | [
"Apache-2.0"
] | null | null | null | azurelinuxagent/ga/monitor.py | vrdmr/WALinuxAgent | 6d680e071cdf31049c4c636633bf3bcfa5366ccc | [
"Apache-2.0"
] | null | null | null | azurelinuxagent/ga/monitor.py | vrdmr/WALinuxAgent | 6d680e071cdf31049c4c636633bf3bcfa5366ccc | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Microsoft Corporation
#
# 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... | 43.819178 | 128 | 0.64543 |
339542e2b3a3e90c42d586da30354dee02e8397e | 33,150 | py | Python | trax/layers/combinators.py | YannickWehr/trax | 67dda3b236339a7f6de803a3f84a9e92d0f0442c | [
"Apache-2.0"
] | null | null | null | trax/layers/combinators.py | YannickWehr/trax | 67dda3b236339a7f6de803a3f84a9e92d0f0442c | [
"Apache-2.0"
] | null | null | null | trax/layers/combinators.py | YannickWehr/trax | 67dda3b236339a7f6de803a3f84a9e92d0f0442c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Trax 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 a... | 34.104938 | 84 | 0.666667 |
e1a492bb68b278dd946f5acbb009808edb52f6e3 | 6,213 | py | Python | selfdrive/car/honda/carcontroller.py | openmechanics/opv0431arch | 994d9b3f74b41fbe7060be8ee2ecc87870d4a1e3 | [
"MIT"
] | 2 | 2021-04-07T02:39:00.000Z | 2021-08-30T19:54:27.000Z | selfdrive/car/honda/carcontroller.py | openmechanics/opv0431arch | 994d9b3f74b41fbe7060be8ee2ecc87870d4a1e3 | [
"MIT"
] | null | null | null | selfdrive/car/honda/carcontroller.py | openmechanics/opv0431arch | 994d9b3f74b41fbe7060be8ee2ecc87870d4a1e3 | [
"MIT"
] | null | null | null | from collections import namedtuple
import os
from selfdrive.boardd.boardd import can_list_to_can_capnp
from selfdrive.controls.lib.drive_helpers import rate_limit
from common.numpy_fast import clip
from . import hondacan
from .values import AH
from common.fingerprints import HONDA as CAR
from selfdrive.can.packer impor... | 36.763314 | 146 | 0.6723 |
85ccc31d04bac6b8c03ddfc9307d2460cf4ba30c | 18,414 | py | Python | barentsz/_discover.py | robinklaassen/barentsz | 5c289d071ddf42d0a9a6c3dbd1db0bf809ae136a | [
"MIT"
] | null | null | null | barentsz/_discover.py | robinklaassen/barentsz | 5c289d071ddf42d0a9a6c3dbd1db0bf809ae136a | [
"MIT"
] | null | null | null | barentsz/_discover.py | robinklaassen/barentsz | 5c289d071ddf42d0a9a6c3dbd1db0bf809ae136a | [
"MIT"
] | null | null | null | import glob
import inspect
import re
import sys
from importlib import import_module
from pathlib import Path
from typing import (
Union,
Dict,
List,
Any,
Callable,
Type,
Iterable,
Optional,
Tuple,
Set,
TypeVar,
)
from typish import Module, subclass_of, instance_of
from bare... | 32.765125 | 100 | 0.632942 |
a0e4dae891748b8a01307ae7aac7bc7715d4cc4e | 9,199 | py | Python | examples/the-feeling-of-success/run_experiments.py | yujialuo/erdos | 7a631b55895f1a473b0f4d38a0d6053851e65b5d | [
"Apache-2.0"
] | null | null | null | examples/the-feeling-of-success/run_experiments.py | yujialuo/erdos | 7a631b55895f1a473b0f4d38a0d6053851e65b5d | [
"Apache-2.0"
] | null | null | null | examples/the-feeling-of-success/run_experiments.py | yujialuo/erdos | 7a631b55895f1a473b0f4d38a0d6053851e65b5d | [
"Apache-2.0"
] | null | null | null | import logging
from absl import app
from sensor_msgs.msg import Image
from insert_table_op import InsertTableOperator
from insert_block_op import InsertBlockOperator
from init_robot_op import InitRobotOperator
from gel_sight_op import GelSightOperator
from mock_loc_obj_op import MockLocateObjectOperator
from goto_xyz_... | 35.245211 | 79 | 0.655941 |
580e4527d60cfad9625c9ee7cfe7648df3a25260 | 24,697 | py | Python | tensorflow/python/keras/saving/saved_model/save_impl.py | leike666666/tensorflow | a3fd0ddfcb716be124e95b51e96e6c1e4507ef64 | [
"Apache-2.0"
] | 12 | 2020-12-28T18:42:10.000Z | 2022-03-24T17:34:21.000Z | tensorflow/python/keras/saving/saved_model/save_impl.py | sagol/tensorflow | 04f2870814d2773e09dcfa00cbe76a66a2c4de88 | [
"Apache-2.0"
] | 2 | 2021-08-25T15:57:35.000Z | 2022-02-10T01:09:32.000Z | tensorflow/python/keras/saving/saved_model/save_impl.py | sagol/tensorflow | 04f2870814d2773e09dcfa00cbe76a66a2c4de88 | [
"Apache-2.0"
] | 3 | 2020-03-09T19:17:02.000Z | 2020-06-26T23:14:31.000Z | # Copyright 2018 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... | 40.420622 | 111 | 0.732356 |
9fd7553a0e07c8f735cf9112db4d2a7abd4af39b | 759 | py | Python | Algorithms/037_AFRQ.py | ChaoticMarauder/Project_Rosalind | 6c70cd32908f3b11285e8505c3b43f1ea222decb | [
"MIT"
] | null | null | null | Algorithms/037_AFRQ.py | ChaoticMarauder/Project_Rosalind | 6c70cd32908f3b11285e8505c3b43f1ea222decb | [
"MIT"
] | null | null | null | Algorithms/037_AFRQ.py | ChaoticMarauder/Project_Rosalind | 6c70cd32908f3b11285e8505c3b43f1ea222decb | [
"MIT"
] | null | null | null | import math
def hardy_weinberg(p_list):
recessive_list=[]
for idx in range(len(p_list)):
r = math.sqrt(p_list[idx])
h = 2-r
recessive_allele_probability = r*h
recessive_list.append(recessive_allele_probability)
return recessive_list
def main():
wi... | 26.172414 | 66 | 0.623188 |
589958f2609b4e4bf2b08d5b35bc038388e03d99 | 1,125 | py | Python | docs/setup-example.py | tomochikahara/django-reusableapps | bedc0d80ea58b98ffaece46f96f1d137005b39b2 | [
"BSD-3-Clause"
] | 2 | 2015-07-03T13:00:49.000Z | 2016-05-08T07:46:39.000Z | docs/setup-example.py | tomochikahara/django-reusableapps | bedc0d80ea58b98ffaece46f96f1d137005b39b2 | [
"BSD-3-Clause"
] | null | null | null | docs/setup-example.py | tomochikahara/django-reusableapps | bedc0d80ea58b98ffaece46f96f1d137005b39b2 | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup
import os
# Compile the list of packages available, because distutils doesn't have
# an easy way to do this.
packages, data_files = [], []
root_dir = os.path.dirname(__file__)
if root_dir:
os.chdir(root_dir)
for dirpath, dirnames, filenames in os.walk('dummyapp'):
# Ignore dirname... | 31.25 | 79 | 0.648 |
3bbb55099b7830d95580ba2108812e6ca536062b | 58,775 | py | Python | src/pretix/base/services/cart.py | NorDULaN/pretix | e2b9fe8e71f3852721a42c594047d88f5181fd29 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-04-25T00:11:00.000Z | 2020-04-25T00:11:00.000Z | src/pretix/base/services/cart.py | NorDULaN/pretix | e2b9fe8e71f3852721a42c594047d88f5181fd29 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/pretix/base/services/cart.py | NorDULaN/pretix | e2b9fe8e71f3852721a42c594047d88f5181fd29 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | from collections import Counter, defaultdict, namedtuple
from datetime import datetime, time, timedelta
from decimal import Decimal
from typing import List, Optional
from celery.exceptions import MaxRetriesExceededError
from django.core.exceptions import ValidationError
from django.db import DatabaseError, transaction... | 47.823434 | 152 | 0.578375 |
d2f23b7d3121207be55d1e274d0dbfd666691cad | 119 | py | Python | monitor/users/admin.py | SunWind2000/battery-monitor | ec8c58382389dc5bfe791aee0ab609a3c514ed8a | [
"MIT"
] | 1 | 2021-10-20T16:19:15.000Z | 2021-10-20T16:19:15.000Z | monitor/users/admin.py | SunWind2000/battery-monitor | ec8c58382389dc5bfe791aee0ab609a3c514ed8a | [
"MIT"
] | 8 | 2020-02-12T00:05:43.000Z | 2021-09-22T17:52:01.000Z | monitor/users/admin.py | SunWind2000/battery-monitor | ec8c58382389dc5bfe791aee0ab609a3c514ed8a | [
"MIT"
] | null | null | null | from django.contrib import admin
from users.models import User
# Register your models here.
admin.site.register(User)
| 19.833333 | 32 | 0.806723 |
74abfe03e9384f6d0ca1d8f193e746aca3025f98 | 4,766 | py | Python | tests/test_io.py | cclauss/vergeml | 3403574db9c1df232809ddf85bbc415c60d35c7c | [
"MIT"
] | 324 | 2018-10-28T19:29:47.000Z | 2020-01-24T20:22:07.000Z | tests/test_io.py | cclauss/vergeml | 3403574db9c1df232809ddf85bbc415c60d35c7c | [
"MIT"
] | 8 | 2018-10-30T10:57:19.000Z | 2019-06-05T10:21:30.000Z | tests/test_io.py | cclauss/vergeml | 3403574db9c1df232809ddf85bbc415c60d35c7c | [
"MIT"
] | 19 | 2018-10-29T18:43:03.000Z | 2019-02-21T15:08:41.000Z | from vergeml.io import SourcePlugin, Source, source, Sample
from vergeml.option import option
import random
def test_source_scan(tmpdir):
_prepare_dir(tmpdir)
st = SourceTest({'samples-dir': str(tmpdir)})
st.begin_read_samples()
assert st.num_samples('train') == 8
assert st.num_samples('test') == ... | 34.536232 | 108 | 0.638481 |
30003202af42ddc3c47e7565dbac682877a3904c | 2,339 | py | Python | tests/storage/test_storage.py | pir8aye/DEXBot | cb963391174850796cc5cf76e4c73eb02da8000d | [
"MIT"
] | 1 | 2021-04-22T09:18:55.000Z | 2021-04-22T09:18:55.000Z | tests/storage/test_storage.py | pir8aye/DEXBot | cb963391174850796cc5cf76e4c73eb02da8000d | [
"MIT"
] | null | null | null | tests/storage/test_storage.py | pir8aye/DEXBot | cb963391174850796cc5cf76e4c73eb02da8000d | [
"MIT"
] | 2 | 2021-02-13T10:58:33.000Z | 2022-03-04T14:01:58.000Z | import logging
import pytest
log = logging.getLogger("dexbot")
log.setLevel(logging.DEBUG)
@pytest.mark.mandatory
def test_fetch_orders(storage):
order = {'id': '111', 'base': '10 CNY', 'quote': '1 BTS'}
storage.save_order(order)
fetched = storage.fetch_orders()
# Return value is dict {'id': 'order'}... | 30.376623 | 65 | 0.689611 |
f751b039578a7c622060bbd33808632d2dc01c69 | 8,787 | py | Python | tests/h/routes_test.py | julien-cheng/h | 36c8ec044725720cf36f0986cdf025395aca8929 | [
"BSD-2-Clause"
] | 2 | 2019-08-04T07:22:11.000Z | 2020-07-17T05:01:41.000Z | tests/h/routes_test.py | 11-eleven-11/h | 91c7a4504ad7471ed3e30246763a03e6c1cc531b | [
"BSD-2-Clause"
] | null | null | null | tests/h/routes_test.py | 11-eleven-11/h | 91c7a4504ad7471ed3e30246763a03e6c1cc531b | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from mock import Mock, call
from h.routes import includeme
def test_includeme():
config = Mock(spec_set=["add_route"])
includeme(config)
# This may look like a ridiculous test, but the cost of keeping it
# up-to-date is hopefully pre... | 37.551282 | 89 | 0.528963 |
6de75f3a0de7216b50e97803371f07b6e2128543 | 4,182 | py | Python | script/numerate.py | markus-schoen/arcgis-pro-geometry | 7f65515366535162d2eab461f4254dd06507e53e | [
"Apache-2.0"
] | null | null | null | script/numerate.py | markus-schoen/arcgis-pro-geometry | 7f65515366535162d2eab461f4254dd06507e53e | [
"Apache-2.0"
] | null | null | null | script/numerate.py | markus-schoen/arcgis-pro-geometry | 7f65515366535162d2eab461f4254dd06507e53e | [
"Apache-2.0"
] | null | null | null | # SCRIPT --------------------------------------------------------------------------------------------------------------
# Numerate all features by it's coordinates.
# To store the results, this method creates a short integer field. The lowest value is 1.
# ------------------------------------------------------------... | 55.76 | 120 | 0.246055 |
ba5604d6cbe8921b85bcd001827068b9c4bd6569 | 6,928 | py | Python | data/p3BR/R2/benchmark/startQiskit_Class284.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startQiskit_Class284.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startQiskit_Class284.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=60
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collections import Counter
from... | 31.779817 | 140 | 0.638279 |
7ac1ee0a1d3bf9c85e52c7c2a4200e13e40b65ac | 1,246 | py | Python | Draft_Phuong/ternary_ver2/test.py | phuong27102000/NTRU_HRSS_KEM_SV | fe4fd095134a41f4131a3aa953197e3933b303ad | [
"MIT"
] | null | null | null | Draft_Phuong/ternary_ver2/test.py | phuong27102000/NTRU_HRSS_KEM_SV | fe4fd095134a41f4131a3aa953197e3933b303ad | [
"MIT"
] | null | null | null | Draft_Phuong/ternary_ver2/test.py | phuong27102000/NTRU_HRSS_KEM_SV | fe4fd095134a41f4131a3aa953197e3933b303ad | [
"MIT"
] | null | null | null | import cocotb
from cocotb.clock import Clock
from cocotb.triggers import RisingEdge
from cocotb.triggers import Timer
from secrets import token_bytes as prg
from ter_model import ter_model
report = open('report.txt','w')
@cocotb.test()
async def test_ternary(dut):
"""Try accessing the design."""
dut._log.inf... | 34.611111 | 146 | 0.589888 |
84bc2e0e2407e158d931c8071f9d380c33a3e535 | 218 | py | Python | exercises/de/test_03_16_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 2,085 | 2019-04-17T13:10:40.000Z | 2022-03-30T21:51:46.000Z | exercises/de/test_03_16_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 79 | 2019-04-18T14:42:55.000Z | 2022-03-07T08:15:43.000Z | exercises/de/test_03_16_01.py | Jette16/spacy-course | 32df0c8f6192de6c9daba89740a28c0537e4d6a0 | [
"MIT"
] | 361 | 2019-04-17T13:34:32.000Z | 2022-03-28T04:42:45.000Z | def test():
assert (
"doc = nlp.make_doc(text)" in __solution__
or "doc = nlp.tokenizer(text)" in __solution__
), "Verwendest du tatsächlich nur den Tokenizer?"
__msg__.good("Sehr schön!")
| 27.25 | 54 | 0.633028 |
19aa585e14a2927e3ae96020a912f625dc293a39 | 10,307 | py | Python | model.py | atch841/one-shot-texture-segmentation | 5f3bc3d2ca103fee56f8957b22a89b8a4e032933 | [
"MIT"
] | 6 | 2019-05-08T11:16:38.000Z | 2021-01-07T19:35:58.000Z | model.py | atch841/one-shot-texture-segmentation | 5f3bc3d2ca103fee56f8957b22a89b8a4e032933 | [
"MIT"
] | null | null | null | model.py | atch841/one-shot-texture-segmentation | 5f3bc3d2ca103fee56f8957b22a89b8a4e032933 | [
"MIT"
] | 3 | 2020-07-22T02:43:47.000Z | 2022-01-17T05:33:01.000Z | import tensorflow as tf
from tensorflow.contrib import autograph
def get_model(is_training):
texture = tf.placeholder(tf.float32, shape=(None, 256, 256, 3), name='texture_input')
ref = tf.placeholder(tf.float32, shape=(None, 64, 64, 3), name='ref_input')
label = tf.placeholder(tf.float32, shape=(None, 256, 256, 1),... | 47.497696 | 108 | 0.6938 |
db97a4c3b955262d5ebb9aa0a5f46c0330b51653 | 62,844 | py | Python | saleor/graphql/meta/tests/test_meta_mutations.py | maersu/saleor | 7e1d340fe5c36eab2a1170f1567b6af43a112ea5 | [
"CC-BY-4.0"
] | 1 | 2020-09-02T00:14:04.000Z | 2020-09-02T00:14:04.000Z | saleor/graphql/meta/tests/test_meta_mutations.py | maersu/saleor | 7e1d340fe5c36eab2a1170f1567b6af43a112ea5 | [
"CC-BY-4.0"
] | 1 | 2022-02-15T03:31:12.000Z | 2022-02-15T03:31:12.000Z | saleor/graphql/meta/tests/test_meta_mutations.py | maersu/saleor | 7e1d340fe5c36eab2a1170f1567b6af43a112ea5 | [
"CC-BY-4.0"
] | null | null | null | import base64
import uuid
from unittest.mock import patch
import graphene
import pytest
from ....core.error_codes import MetadataErrorCode
from ....core.models import ModelWithMetadata
from ....invoice.models import Invoice
from ...tests.utils import assert_no_permission, get_graphql_content
PRIVATE_KEY = "private_k... | 29.148423 | 88 | 0.71442 |
6b34d713b3cdcce8cf4a26da087bc5c9d1ffdcab | 852 | py | Python | examples/get_windows.py | avivazran/UnrealEnginePython | 758ad1e5b3a871442d00bdc3144e246fa443098f | [
"MIT"
] | 2,350 | 2016-08-08T17:00:16.000Z | 2022-03-31T22:37:15.000Z | examples/get_windows.py | avivazran/UnrealEnginePython | 758ad1e5b3a871442d00bdc3144e246fa443098f | [
"MIT"
] | 820 | 2016-08-08T16:35:26.000Z | 2022-03-24T05:09:51.000Z | examples/get_windows.py | avivazran/UnrealEnginePython | 758ad1e5b3a871442d00bdc3144e246fa443098f | [
"MIT"
] | 658 | 2016-08-10T16:26:24.000Z | 2022-03-30T02:42:22.000Z | import unreal_engine as ue
from unreal_engine import FSlateApplication
from unreal_engine.classes import GameViewportClient
def iterate_window(window):
print(window.get_title())
for child in window.get_child_windows():
iterate_window(child)
# get the active top level window
top_window = FSlateApplicat... | 30.428571 | 94 | 0.821596 |
e48da0bfe0875770f4f4de0fcbacbb85e5325a25 | 14,934 | py | Python | venv/lib/python2.7/site-packages/ansible/modules/cloud/docker/docker_network.py | aburan28/ansible-devops-pipeline | 50aa801632ca0828c16faac55732f1e79085f932 | [
"Apache-2.0"
] | 1 | 2019-04-16T21:23:15.000Z | 2019-04-16T21:23:15.000Z | venv/lib/python2.7/site-packages/ansible/modules/cloud/docker/docker_network.py | aburan28/ansible-devops-pipeline | 50aa801632ca0828c16faac55732f1e79085f932 | [
"Apache-2.0"
] | 5 | 2020-02-26T20:10:50.000Z | 2021-09-23T23:23:18.000Z | venv/lib/python2.7/site-packages/ansible/modules/cloud/docker/docker_network.py | aburan28/ansible-devops-pipeline | 50aa801632ca0828c16faac55732f1e79085f932 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2016 Red Hat | Ansible
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['prev... | 35.472684 | 136 | 0.619593 |
41cecde9e9b393fc65673f61c224bd13aecad011 | 682 | py | Python | halogen/halogencli.py | AUCR/halogen | 33a26035fbd0a4a7f5d4ace482bb5a20cea9e5c4 | [
"MIT"
] | null | null | null | halogen/halogencli.py | AUCR/halogen | 33a26035fbd0a4a7f5d4ace482bb5a20cea9e5c4 | [
"MIT"
] | null | null | null | halogen/halogencli.py | AUCR/halogen | 33a26035fbd0a4a7f5d4ace482bb5a20cea9e5c4 | [
"MIT"
] | null | null | null | # coding=utf-8
""" The mfbot Python3 CLI script """
from halogen.mfbot import MFBot
def main() -> None:
""" Main function to start things up for the command line use of mfbot """
mfbot = MFBot()
mfbot.parse_args()
if mfbot.dir:
yara_rule_output = mfbot.dir_run()
if len(yara_rule_output... | 26.230769 | 78 | 0.611437 |
8d6cfcf77de016ef536279f1958b9c620f91dcf6 | 1,465 | py | Python | CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Demo/ceilometer/ceilometer/alarm/storage/impl_log.py | ishtjot/susereumutep | 56e20c1777e0c938ac42bd8056f84af9e0b76e46 | [
"Apache-2.0"
] | 2 | 2018-11-07T20:52:53.000Z | 2019-10-20T15:57:01.000Z | CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Demo/ceilometer/ceilometer/alarm/storage/impl_log.py | ishtjot/susereumutep | 56e20c1777e0c938ac42bd8056f84af9e0b76e46 | [
"Apache-2.0"
] | 3 | 2021-12-14T20:57:54.000Z | 2022-01-21T23:50:36.000Z | CodeAnalysis/SourceMeter_Interface/SourceMeter-8.2.0-x64-linux/Python/Demo/ceilometer/ceilometer/alarm/storage/impl_log.py | ishtjot/susereumutep | 56e20c1777e0c938ac42bd8056f84af9e0b76e46 | [
"Apache-2.0"
] | 2 | 2018-11-16T04:20:06.000Z | 2019-03-28T23:49:13.000Z | #
# Copyright 2012 New Dream Network, LLC (DreamHost)
#
# Author: Doug Hellmann <doug.hellmann@dreamhost.com>
#
# 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.apac... | 29.3 | 80 | 0.660751 |
ae21ef01ecf50bd9ba0911ab0dbf1becf395e830 | 438 | py | Python | handover/migrations/0007_auto_20190603_0328.py | utkarsh3mehta/todo | 8b1b22a3b016658050572abf818beabac8658f12 | [
"MIT"
] | null | null | null | handover/migrations/0007_auto_20190603_0328.py | utkarsh3mehta/todo | 8b1b22a3b016658050572abf818beabac8658f12 | [
"MIT"
] | null | null | null | handover/migrations/0007_auto_20190603_0328.py | utkarsh3mehta/todo | 8b1b22a3b016658050572abf818beabac8658f12 | [
"MIT"
] | null | null | null | # Generated by Django 2.2 on 2019-06-03 10:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('handover', '0006_auto_20190603_0327'),
]
operations = [
migrations.AlterField(
model_name='user',
name='userlastname',... | 23.052632 | 99 | 0.623288 |
c835e4b92306928ed8c23dbad5e97168e97aeee0 | 3,046 | py | Python | hlutils/tools/pyrep.py | huleiak47/python-hlutils | 2178bfaeff71081082051d229b6dfb8ad510fb6f | [
"Apache-2.0"
] | 2 | 2016-05-21T14:10:32.000Z | 2019-02-20T22:15:14.000Z | hlutils/tools/pyrep.py | huleiak47/python-hlutils | 2178bfaeff71081082051d229b6dfb8ad510fb6f | [
"Apache-2.0"
] | null | null | null | hlutils/tools/pyrep.py | huleiak47/python-hlutils | 2178bfaeff71081082051d229b6dfb8ad510fb6f | [
"Apache-2.0"
] | 1 | 2019-02-20T08:44:18.000Z | 2019-02-20T08:44:18.000Z | #!/usr/bin/env python
#-*- coding:utf-8 -*-
'''
Replace str from file or stdin
'''
import os
import sys
import argparse
import re
import locale
SYSENC = locale.getdefaultlocale()[1]
stdin = os.fdopen(sys.stdin.fileno(), 'rb')
stdout = os.fdopen(sys.stdout.fileno(), 'wb')
def parse_command():
parser = argparse.A... | 35.835294 | 210 | 0.59455 |
229dc8355cb215165fd1abbcdc21361f7132e863 | 5,174 | py | Python | skimage/feature/tests/test_orb.py | thewtex/scikit-image | 22bb6b94698b8889cbdf26b25d9e4fdb8b968d97 | [
"BSD-3-Clause"
] | 2 | 2020-02-24T02:24:43.000Z | 2021-12-19T11:44:34.000Z | skimage/feature/tests/test_orb.py | thewtex/scikit-image | 22bb6b94698b8889cbdf26b25d9e4fdb8b968d97 | [
"BSD-3-Clause"
] | null | null | null | skimage/feature/tests/test_orb.py | thewtex/scikit-image | 22bb6b94698b8889cbdf26b25d9e4fdb8b968d97 | [
"BSD-3-Clause"
] | 2 | 2019-06-16T06:38:28.000Z | 2021-12-19T11:44:48.000Z | import numpy as np
from skimage._shared.testing import assert_equal, assert_almost_equal
from skimage.feature import ORB
from skimage._shared import testing
from skimage import data
from skimage._shared.testing import test_parallel
img = data.coins()
@test_parallel()
def test_keypoints_orb_desired_no_of_keypoints()... | 46.196429 | 80 | 0.528605 |
97594c6f1177b5b05a3e94a14ea78f4dac704139 | 2,613 | py | Python | lib/surface/firebase/test/__init__.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/firebase/test/__init__.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | lib/surface/firebase/test/__init__.py | bshaffer/google-cloud-sdk | f587382fd112f238c0d6d5ca3dab8f52d2b5c5f9 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*- #
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 36.802817 | 79 | 0.746651 |
158d8437ce6a326b22916b0c5584e05ef7323fdf | 21,048 | py | Python | sample_xblocks/basic/problem.py | saharm1/xblock-sdk | 8d261eaadaf46be17f141a9db56cf9f9675fceea | [
"Apache-2.0"
] | null | null | null | sample_xblocks/basic/problem.py | saharm1/xblock-sdk | 8d261eaadaf46be17f141a9db56cf9f9675fceea | [
"Apache-2.0"
] | null | null | null | sample_xblocks/basic/problem.py | saharm1/xblock-sdk | 8d261eaadaf46be17f141a9db56cf9f9675fceea | [
"Apache-2.0"
] | null | null | null | """Problem XBlock, and friends.
Please note that this is a demonstrative implementation of how XBlocks can
be used, and is not an example of how problems are implemented in the
edx-platform runtime.
These implement a general mechanism for problems containing input fields
and checkers, wired together in interesting wa... | 40.633205 | 118 | 0.514348 |
547b6654a8476e9135306a03ce35eb233d349f50 | 1,561 | py | Python | PyBank/main.py | ericwaxler/python-challenge | 09f65c218be94340e1812fe290fcaaf0c53c3a5c | [
"ADSL"
] | null | null | null | PyBank/main.py | ericwaxler/python-challenge | 09f65c218be94340e1812fe290fcaaf0c53c3a5c | [
"ADSL"
] | null | null | null | PyBank/main.py | ericwaxler/python-challenge | 09f65c218be94340e1812fe290fcaaf0c53c3a5c | [
"ADSL"
] | null | null | null | import csv
file = "Resources/budget_data.csv"
total = 0
avg = 0
months = 0
old = 0
delta = []
with open(file, 'r') as csvfile:
csvreader = csv.reader(csvfile, delimiter=",")
first_row = next(csvreader)
months = sum(1 for row in csvreader)
with open(file, 'r') as csvfile:
csvr... | 28.381818 | 185 | 0.591928 |
55adb8554c37df72d03ff7c91ac0a9f40f0a650a | 7,188 | py | Python | ingestion/src/metadata/ingestion/source/redash.py | mosiac1/OpenMetadata | 21c14d257c6ae7ed2aad2a9ccff2c3a3f1594681 | [
"Apache-2.0"
] | 1 | 2022-03-30T06:29:29.000Z | 2022-03-30T06:29:29.000Z | ingestion/src/metadata/ingestion/source/redash.py | mosiac1/OpenMetadata | 21c14d257c6ae7ed2aad2a9ccff2c3a3f1594681 | [
"Apache-2.0"
] | null | null | null | ingestion/src/metadata/ingestion/source/redash.py | mosiac1/OpenMetadata | 21c14d257c6ae7ed2aad2a9ccff2c3a3f1594681 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Collate
# 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... | 41.074286 | 111 | 0.631886 |
d52d2eef529891d28ac38fb5e5e31c75ab640c3e | 471 | py | Python | src/fs/config.py | severus21/PycLi | 7160c725a88e527bff3b13cb9bcf0486d55d2b52 | [
"Apache-2.0"
] | null | null | null | src/fs/config.py | severus21/PycLi | 7160c725a88e527bff3b13cb9bcf0486d55d2b52 | [
"Apache-2.0"
] | null | null | null | src/fs/config.py | severus21/PycLi | 7160c725a88e527bff3b13cb9bcf0486d55d2b52 | [
"Apache-2.0"
] | 1 | 2017-05-21T16:07:21.000Z | 2017-05-21T16:07:21.000Z | #speed use only to select : read replicat
#nom => identifiant unique pour l'utilisateur(au sein d'un mêm parent)
import os
from pkg_resources import resource_filename, resource_exists
max_ratio = 100 #on ne peut multiplier la proba que par 5 au plus
counter = 0
#delay_snapshot = 100#nombre d'operations entre deux sna... | 33.642857 | 74 | 0.791932 |
b84606ea11d4e2df2277c3800dbde481a9ac59ed | 11,794 | py | Python | Python/example_controllers/audio/rube_goldberg.py | ricklentz/tdw | da40eec151acae20b28d6486defb4358d96adb0e | [
"BSD-2-Clause"
] | null | null | null | Python/example_controllers/audio/rube_goldberg.py | ricklentz/tdw | da40eec151acae20b28d6486defb4358d96adb0e | [
"BSD-2-Clause"
] | null | null | null | Python/example_controllers/audio/rube_goldberg.py | ricklentz/tdw | da40eec151acae20b28d6486defb4358d96adb0e | [
"BSD-2-Clause"
] | null | null | null | from typing import List, Dict
from pathlib import Path
import json
from argparse import ArgumentParser
from tdw.controller import Controller
from tdw.tdw_utils import TDWUtils
from tdw.librarian import ModelLibrarian
from tdw.add_ons.py_impact import PyImpact
from tdw.add_ons.audio_initializer import AudioInitializer
f... | 59.86802 | 147 | 0.527556 |
36adac71e783fef3070c688e2f865ca97ef28bbb | 691 | py | Python | src/handbook2/part7/snippet17.py | apurvmishra99/keras-idiomatic-programmer | 40ee5482615eadff0a74c349706ae1184c904c13 | [
"Apache-2.0"
] | 2 | 2019-10-11T15:09:03.000Z | 2021-08-01T12:09:10.000Z | src/handbook2/part7/snippet17.py | apurvmishra99/keras-idiomatic-programmer | 40ee5482615eadff0a74c349706ae1184c904c13 | [
"Apache-2.0"
] | null | null | null | src/handbook2/part7/snippet17.py | apurvmishra99/keras-idiomatic-programmer | 40ee5482615eadff0a74c349706ae1184c904c13 | [
"Apache-2.0"
] | 1 | 2021-08-01T12:09:38.000Z | 2021-08-01T12:09:38.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 40.647059 | 76 | 0.748191 |
9b8fc4c984fbd8d17f2fe9711c4043d424188a8f | 1,552 | py | Python | Data-Visulation-Using-matplotlib/code.py | peaceshadow07/greyatom-python-for-data-science | 5ea6d38ac0b1937b5678749efd810ecc401386c1 | [
"MIT"
] | null | null | null | Data-Visulation-Using-matplotlib/code.py | peaceshadow07/greyatom-python-for-data-science | 5ea6d38ac0b1937b5678749efd810ecc401386c1 | [
"MIT"
] | null | null | null | Data-Visulation-Using-matplotlib/code.py | peaceshadow07/greyatom-python-for-data-science | 5ea6d38ac0b1937b5678749efd810ecc401386c1 | [
"MIT"
] | null | null | null | # --------------
#Importing header files
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
data = pd.read_csv(path)
loan_status = data['Loan_Status'].value_counts()
loan_status.plot(kind='bar')
#Code starts here
# --------------
#Code starts here
property_and_loan = data.groupby(['Pro... | 21.260274 | 83 | 0.684923 |
dc020e52b3a77a4b3e6c463a8eac93482c1b9371 | 5,915 | py | Python | src/webpubsub/azext_webpubsub/_params.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/webpubsub/azext_webpubsub/_params.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/webpubsub/azext_webpubsub/_params.py | haroonf/azure-cli-extensions | 61c044d34c224372f186934fa7c9313f1cd3a525 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 57.427184 | 394 | 0.680473 |
eb03b90c20a955247d0ed384bcffaf077c0962cc | 1,259 | py | Python | bot/utils/tools.py | markelovstyle/duty-bot | 3c8686e1ab99402e3481b10876e3a529c132e1d6 | [
"Apache-2.0"
] | null | null | null | bot/utils/tools.py | markelovstyle/duty-bot | 3c8686e1ab99402e3481b10876e3a529c132e1d6 | [
"Apache-2.0"
] | null | null | null | bot/utils/tools.py | markelovstyle/duty-bot | 3c8686e1ab99402e3481b10876e3a529c132e1d6 | [
"Apache-2.0"
] | null | null | null | import re
from typing import Union
from pymorphy2 import MorphAnalyzer
from .display import *
m = MorphAnalyzer()
def get_case(
num: Union[float, int],
word: str,
case: str = "nomn",
include: bool = True
) -> str:
inflected = m.parse(word)[0].inflect({case})[0]
p = m.parse(inflected)[0]
... | 24.211538 | 77 | 0.576648 |
65f885d05db630a027c0d26c3bf07283a6cd0d48 | 6,673 | py | Python | docs/tutorials/utils/generate_cow_renders.py | jkxing/pytorch3d | 71dbebe8010a0dac3e56be464778aa48fbd3bcd3 | [
"BSD-3-Clause"
] | 6,041 | 2020-01-23T23:29:41.000Z | 2022-03-31T21:35:13.000Z | docs/tutorials/utils/generate_cow_renders.py | jkxing/pytorch3d | 71dbebe8010a0dac3e56be464778aa48fbd3bcd3 | [
"BSD-3-Clause"
] | 1,054 | 2020-01-24T15:23:15.000Z | 2022-03-31T15:31:59.000Z | docs/tutorials/utils/generate_cow_renders.py | jkxing/pytorch3d | 71dbebe8010a0dac3e56be464778aa48fbd3bcd3 | [
"BSD-3-Clause"
] | 943 | 2020-01-24T00:10:30.000Z | 2022-03-31T04:02:35.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import os
import numpy as np
import torch
from pytorch3d.io import load_objs_as_meshes
from pytorch3d.renderer i... | 39.720238 | 88 | 0.69474 |
9b370be840f1dd50e93c2bd481b58fb1afc0f6b1 | 208 | py | Python | py_tdlib/constructors/validate_order_info.py | Mr-TelegramBot/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 24 | 2018-10-05T13:04:30.000Z | 2020-05-12T08:45:34.000Z | py_tdlib/constructors/validate_order_info.py | MrMahdi313/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 3 | 2019-06-26T07:20:20.000Z | 2021-05-24T13:06:56.000Z | py_tdlib/constructors/validate_order_info.py | MrMahdi313/python-tdlib | 2e2d21a742ebcd439971a32357f2d0abd0ce61eb | [
"MIT"
] | 5 | 2018-10-05T14:29:28.000Z | 2020-08-11T15:04:10.000Z | from ..factory import Method
class validateOrderInfo(Method):
chat_id = None # type: "int53"
message_id = None # type: "int53"
order_info = None # type: "orderInfo"
allow_save = None # type: "Bool"
| 23.111111 | 39 | 0.6875 |
15461590a4b08d324a23fcc7522d36f8c235b69f | 8,743 | py | Python | deprecated/update_fc_dataset_record.py | jeremyh/agdc | 2e22c6bdd9305555db3615305ff6a5df6219cd51 | [
"BSD-3-Clause"
] | 34 | 2015-03-10T22:27:50.000Z | 2021-09-27T09:26:31.000Z | deprecated/update_fc_dataset_record.py | jeremyh/agdc | 2e22c6bdd9305555db3615305ff6a5df6219cd51 | [
"BSD-3-Clause"
] | 81 | 2015-01-28T07:41:58.000Z | 2016-01-28T23:01:22.000Z | deprecated/update_fc_dataset_record.py | jeremyh/agdc | 2e22c6bdd9305555db3615305ff6a5df6219cd51 | [
"BSD-3-Clause"
] | 29 | 2015-01-08T05:06:40.000Z | 2021-09-27T09:26:34.000Z | #!/usr/bin/env python
#===============================================================================
# Copyright (c) 2014 Geoscience Australia
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
... | 33.626923 | 140 | 0.657211 |
26f089a80aa78f0891b780b2a5eba61f08702920 | 1,877 | py | Python | graphs/graphs.py | ravewillow6383/data-structures-and-algorithms-python | 98533ee241a3ae452dab1ecb87aab39742005e35 | [
"MIT"
] | null | null | null | graphs/graphs.py | ravewillow6383/data-structures-and-algorithms-python | 98533ee241a3ae452dab1ecb87aab39742005e35 | [
"MIT"
] | null | null | null | graphs/graphs.py | ravewillow6383/data-structures-and-algorithms-python | 98533ee241a3ae452dab1ecb87aab39742005e35 | [
"MIT"
] | null | null | null | from collections import deque
from stacks import Stack
class Graph:
def __init__(self):
self._vertices = []
def add_vertex(self, value):
vert = Vertex(value)
self._vertices.append(vert)
return vert
def add_edge(self, vert1, vert2, weight=0):
if vert1 in self._... | 22.890244 | 63 | 0.54715 |
65a89d7c22f38fd51847627106e7d043149e86c6 | 8,924 | py | Python | gram/views.py | KingVulkan/Instagram | c15ba6ba13d9fdfca6ed85f52e65ebe78aa04b2c | [
"Unlicense"
] | null | null | null | gram/views.py | KingVulkan/Instagram | c15ba6ba13d9fdfca6ed85f52e65ebe78aa04b2c | [
"Unlicense"
] | null | null | null | gram/views.py | KingVulkan/Instagram | c15ba6ba13d9fdfca6ed85f52e65ebe78aa04b2c | [
"Unlicense"
] | null | null | null | from django.http import Http404
from django.shortcuts import render,redirect
from . models import Image ,Profile, Like, Follow, Comment
import datetime as dt
from django.contrib.auth.decorators import login_required
from django.conf import settings
from . forms import ImageForm, CommentForm, ProfileUpdateForm,UpdateIm... | 38.465517 | 405 | 0.613402 |
0127767790510255d141cdf9523020c2de70f3e3 | 1,654 | py | Python | function_grab.py | brianvan555/Stock | f0115ef0773153cd8df361556e398935cdd1bdde | [
"BSD-2-Clause"
] | null | null | null | function_grab.py | brianvan555/Stock | f0115ef0773153cd8df361556e398935cdd1bdde | [
"BSD-2-Clause"
] | null | null | null | function_grab.py | brianvan555/Stock | f0115ef0773153cd8df361556e398935cdd1bdde | [
"BSD-2-Clause"
] | null | null | null | import requests
from io import StringIO
import pandas as pd
import numpy as np
headers = {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "z... | 48.647059 | 175 | 0.588875 |
286b2d7939422958241ed42c2f26195a112d0d33 | 8,093 | py | Python | port/modules/gui.py | diskman88/mpython-desktop-robot | 01cd15fbeeba521ab874cf66f94d3909c4f8c39a | [
"MIT"
] | 53 | 2018-10-15T12:01:24.000Z | 2019-11-22T09:31:02.000Z | port/modules/gui.py | diskman88/mpython-desktop-robot | 01cd15fbeeba521ab874cf66f94d3909c4f8c39a | [
"MIT"
] | 10 | 2018-10-17T13:42:19.000Z | 2019-11-25T06:42:40.000Z | port/modules/gui.py | diskman88/mpython-desktop-robot | 01cd15fbeeba521ab874cf66f94d3909c4f8c39a | [
"MIT"
] | 26 | 2018-12-04T03:53:39.000Z | 2019-11-22T03:40:05.000Z | # gui for mpython
# MIT license; Copyright (c) 2019 Zhang Kaihua(apple_eat@126.com)
import time, math, struct, gc
from framebuf import FrameBuffer
import adafruit_miniqr,gc
class UI():
def __init__(self, oled):
self.display = oled
def ProgressBar(self, x, y, width, height, progress):
radius = ... | 35.968889 | 116 | 0.546645 |
00ac06b4edfcba2a79eb56381245a4cd9f57dac7 | 1,123 | py | Python | hmmyfier.py | dtrain157/Hmmyfier | a1b3a93472691f9ba8d990b89e9cb5fcb9ce1a16 | [
"MIT"
] | null | null | null | hmmyfier.py | dtrain157/Hmmyfier | a1b3a93472691f9ba8d990b89e9cb5fcb9ce1a16 | [
"MIT"
] | null | null | null | hmmyfier.py | dtrain157/Hmmyfier | a1b3a93472691f9ba8d990b89e9cb5fcb9ce1a16 | [
"MIT"
] | null | null | null | import requests
import shutil
import os
import constants
from datetime import datetime, timedelta
from psaw import PushshiftAPI
api = PushshiftAPI()
today = datetime.today()
timedelta = timedelta(days=-7)
date = today + timedelta
submissions = api.search_submissions(after=int(date.timestamp()),
... | 28.075 | 67 | 0.575245 |
80f6d266fcdd12a1e9cda28991633a4f1a2aaa76 | 123 | py | Python | login/admin.py | BeeZed/BucketList-Travels | 10445137df3a7b3394394d8c70a1b3e006011ae9 | [
"MIT"
] | null | null | null | login/admin.py | BeeZed/BucketList-Travels | 10445137df3a7b3394394d8c70a1b3e006011ae9 | [
"MIT"
] | null | null | null | login/admin.py | BeeZed/BucketList-Travels | 10445137df3a7b3394394d8c70a1b3e006011ae9 | [
"MIT"
] | 1 | 2019-12-02T19:26:36.000Z | 2019-12-02T19:26:36.000Z | from django.contrib import admin
from .models import UserInfo
# Register your models here.
admin.site.register(UserInfo)
| 17.571429 | 32 | 0.804878 |
1ba07ebfce28117e4ad4db3f95de8e0f619cc1b9 | 7,934 | py | Python | item_engine/bnf/grammars/bnf_1_0_0/materials.py | GabrielAmare/ItemEngine | 10277626c3724ad9ae7b934f53e11e305dc34da5 | [
"MIT"
] | null | null | null | item_engine/bnf/grammars/bnf_1_0_0/materials.py | GabrielAmare/ItemEngine | 10277626c3724ad9ae7b934f53e11e305dc34da5 | [
"MIT"
] | null | null | null | item_engine/bnf/grammars/bnf_1_0_0/materials.py | GabrielAmare/ItemEngine | 10277626c3724ad9ae7b934f53e11e305dc34da5 | [
"MIT"
] | null | null | null | from __future__ import annotations
from item_engine.textbase.items.lemmas import Lemma
from item_engine.textbase.items.tokens import Token
from typing import List
# this module has been auto-generated by ItemEngine
__all__ = ['Any_', 'All_', 'GrammarRule', 'Atom_', 'Str', 'Match', 'MatchAs', 'MatchIn', 'All', 'Any'... | 26.986395 | 173 | 0.570708 |
bb43fcaa12e2c416db4a6d06624b5c97a072ef07 | 884 | py | Python | tests/fixtures/legacy-backend-package/setup.py | offby1/pipenv | ce83c629385b4e7a791bd6857c2cf1e26ceb2351 | [
"MIT"
] | 18,636 | 2017-12-06T14:53:18.000Z | 2022-03-31T13:12:34.000Z | tests/fixtures/legacy-backend-package/setup.py | offby1/pipenv | ce83c629385b4e7a791bd6857c2cf1e26ceb2351 | [
"MIT"
] | 3,640 | 2017-12-06T16:58:35.000Z | 2022-03-31T22:20:57.000Z | tests/fixtures/legacy-backend-package/setup.py | offby1/pipenv | ce83c629385b4e7a791bd6857c2cf1e26ceb2351 | [
"MIT"
] | 1,987 | 2017-12-06T15:04:51.000Z | 2022-03-26T10:05:15.000Z | import ast
import os
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
ROOT = os.path.dirname(__file__)
PACKAGE_NAME = 'legacy_backend_package'
VERSION = None
with open(os.path.join(ROOT, 'src', PACKAGE_NAME.replace("-", "_"), '__init__.py')) as f:
for line in ... | 24.555556 | 89 | 0.656109 |
fca7957d1749effcd159bf99a1e4a2b93e3914d2 | 463 | py | Python | demo_importing_Ms_packages.py | mrabdsaif/DS-training | aa2b2cb6e25d5f00baafcd699fb6ed64817f4ac3 | [
"MIT"
] | null | null | null | demo_importing_Ms_packages.py | mrabdsaif/DS-training | aa2b2cb6e25d5f00baafcd699fb6ed64817f4ac3 | [
"MIT"
] | null | null | null | demo_importing_Ms_packages.py | mrabdsaif/DS-training | aa2b2cb6e25d5f00baafcd699fb6ed64817f4ac3 | [
"MIT"
] | null | null | null | # importing modules that I have created by importing just the module
#import helpers
#helpers.display('Sample msg', True)
# importing the item inside the module
from helpers import display
display('Sample msg',True)
from helpers import display
display('Sample msg',False)
# Now To create a virtual env (p... | 33.071429 | 130 | 0.75378 |
13ba721fef4a6d5b377b4fbc2b86c3c567229c61 | 21,373 | py | Python | OmniDB/OmniDB_app/views/plugins.py | bylee5/OmniDB-AgensManager | 04da397694b2c7c47e0a9f43c049fab98b4e5fc6 | [
"MIT"
] | null | null | null | OmniDB/OmniDB_app/views/plugins.py | bylee5/OmniDB-AgensManager | 04da397694b2c7c47e0a9f43c049fab98b4e5fc6 | [
"MIT"
] | null | null | null | OmniDB/OmniDB_app/views/plugins.py | bylee5/OmniDB-AgensManager | 04da397694b2c7c47e0a9f43c049fab98b4e5fc6 | [
"MIT"
] | null | null | null | from django.http import HttpResponse
from django.template import loader
from django.http import JsonResponse
from django.core import serializers
from django.shortcuts import redirect
from datetime import datetime
from math import ceil
import json
from os import listdir, makedirs, remove
from os.path import isfile, join... | 36.410562 | 287 | 0.583727 |
a508b7265813cbd35e60dbaf9685fae34f33a15d | 5,512 | py | Python | app/wqFull/G200/tsMap.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | null | null | null | app/wqFull/G200/tsMap.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | null | null | null | app/wqFull/G200/tsMap.py | fkwai/geolearn | 30cb4353d22af5020a48100d07ab04f465a315b0 | [
"MIT"
] | 2 | 2021-04-04T02:45:59.000Z | 2022-03-19T09:41:39.000Z |
import pandas as pd
from hydroDL.data import usgs, gageII, gridMET, ntn, GLASS, transform, dbBasin
import numpy as np
import matplotlib.pyplot as plt
from hydroDL.post import axplot, figplot
from hydroDL import kPath, utils
import json
import os
import importlib
from hydroDL.master import basinFull
from hydroDL.app.wa... | 35.10828 | 83 | 0.596698 |
8e6130c08ab88a516259b8d25172f260f1ec1c29 | 2,285 | py | Python | src/DicomIMG.py | CFOP2357/Support-system-for-reading-mammograms | 97078b95fdcf144e4155a4d0d0eeefb727262e25 | [
"MIT"
] | null | null | null | src/DicomIMG.py | CFOP2357/Support-system-for-reading-mammograms | 97078b95fdcf144e4155a4d0d0eeefb727262e25 | [
"MIT"
] | null | null | null | src/DicomIMG.py | CFOP2357/Support-system-for-reading-mammograms | 97078b95fdcf144e4155a4d0d0eeefb727262e25 | [
"MIT"
] | null | null | null | from pydicom import dcmread
import cv2 as cv
import numpy as np
from PIL import Image
def unsharp_mask(image, kernel_size: tuple = (5, 5), sigma: float = 10000.0, amount: float = 100.0,
threshold: float = 10000.0) -> np.array:
"""Return a sharpened version of the image, using an unsharp mask."""
... | 35.703125 | 116 | 0.698031 |
6c9e2170c3ce11a30612680fd4a0916ad4a89efd | 215 | py | Python | tests/testresources/pytest_code.py | yukihiko-shinoda/pytest-resource-path | bc56c4b5f2c8f3138baeac7f145717f6a70af7b6 | [
"MIT"
] | 5 | 2020-09-06T01:54:28.000Z | 2021-06-14T11:10:09.000Z | tests/testresources/pytest_code.py | yukihiko-shinoda/pytest-resource-path | bc56c4b5f2c8f3138baeac7f145717f6a70af7b6 | [
"MIT"
] | 5 | 2020-05-23T08:30:01.000Z | 2021-05-01T04:58:06.000Z | tests/testresources/pytest_code.py | yukihiko-shinoda/pytest-resource-path | bc56c4b5f2c8f3138baeac7f145717f6a70af7b6 | [
"MIT"
] | null | null | null | """This module is run in test_dir on pytest for test pytest FixtureRequest."""
def test_function_something():
"""This test is run in test_dir on pytest for test pytest FixtureRequest."""
assert 1 + 1 == 2
| 30.714286 | 80 | 0.711628 |
a83f1ea5ec94801c215c2ddc2b32063db3724be5 | 2,885 | py | Python | var/spack/repos/builtin/packages/r-rtracklayer/package.py | robertsawko/spack | 135cf4835f5b646c4aaa0e2eb5552c80fc3a5ce8 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2019-11-28T10:14:14.000Z | 2019-11-28T10:14:14.000Z | var/spack/repos/builtin/packages/r-rtracklayer/package.py | robertsawko/spack | 135cf4835f5b646c4aaa0e2eb5552c80fc3a5ce8 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/r-rtracklayer/package.py | robertsawko/spack | 135cf4835f5b646c4aaa0e2eb5552c80fc3a5ce8 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2017-01-21T17:19:32.000Z | 2017-01-21T17:19:32.000Z | # Copyright 2013-2019 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 RRtracklayer(RPackage):
"""R interface to genome annotation files and the UCSC genome brow... | 52.454545 | 85 | 0.650953 |
ad4e53b0cb536d20f8c1264eaff305135e191859 | 8,929 | py | Python | src/chia_log/log_consumer.py | alexking/chiadog | c6d3fc108dc19266981582402e499636016b9ceb | [
"MIT"
] | 1 | 2022-03-10T08:25:16.000Z | 2022-03-10T08:25:16.000Z | src/chia_log/log_consumer.py | alexking/chiadog | c6d3fc108dc19266981582402e499636016b9ceb | [
"MIT"
] | null | null | null | src/chia_log/log_consumer.py | alexking/chiadog | c6d3fc108dc19266981582402e499636016b9ceb | [
"MIT"
] | null | null | null | """Log consumers are responsible for fetching chia logs
and propagating them to subscribers for further handling.
This abstraction should provide an easy ability to switch between
local file reader and fetching logs from a remote machine.
The latter has not been implemented yet. Feel free to add it.
"""
# std
import ... | 34.342308 | 120 | 0.67544 |
57ad433b681e21472697960151c3e38848cb80c0 | 660 | py | Python | smserver/controllers/legacy/hello.py | CorySanin/stepmania-server | 0573436abcd5951533f049dc56d91878a40726ad | [
"MIT"
] | 17 | 2016-04-19T18:37:31.000Z | 2020-12-15T04:14:20.000Z | smserver/controllers/legacy/hello.py | CorySanin/stepmania-server | 0573436abcd5951533f049dc56d91878a40726ad | [
"MIT"
] | 40 | 2017-02-05T17:17:13.000Z | 2018-04-08T10:31:39.000Z | smserver/controllers/legacy/hello.py | CorySanin/stepmania-server | 0573436abcd5951533f049dc56d91878a40726ad | [
"MIT"
] | 3 | 2021-03-13T08:40:20.000Z | 2021-09-17T07:31:22.000Z | """ Hello controller """
from smserver.smutils.smpacket import smcommand
from smserver.smutils.smpacket import smpacket
from smserver.stepmania_controller import StepmaniaController
class HelloController(StepmaniaController):
command = smcommand.SMClientCommand.NSCHello
require_login = False
def handle(... | 31.428571 | 74 | 0.722727 |
b12a67a99b71045ed4a974906b48e05d3cd0ba7c | 1,666 | py | Python | setup.py | kevinhowbrook/wagtail-factories | 2026711169d3cce799fed75d15420d74e2c4afeb | [
"MIT"
] | null | null | null | setup.py | kevinhowbrook/wagtail-factories | 2026711169d3cce799fed75d15420d74e2c4afeb | [
"MIT"
] | null | null | null | setup.py | kevinhowbrook/wagtail-factories | 2026711169d3cce799fed75d15420d74e2c4afeb | [
"MIT"
] | null | null | null | import re
from setuptools import find_packages, setup
install_requires = [
"factory-boy>=2.8.0",
"wagtail>=2.0",
]
docs_require = [
"sphinx>=1.4.0",
]
tests_require = [
"pytest==6.0.1",
"pytest-django==3.9.0",
"pytest-cov==2.7.1",
"pytest-pythonpath==0.7.3",
"psycopg2>=2.3.1",
"c... | 26.444444 | 78 | 0.606242 |
11782cc82324864db8a63219fb350178ee33713b | 7,778 | py | Python | utils.py | 12-wu/- | 69362fa00b3956e1d56caced340389e31cb944a0 | [
"MIT"
] | null | null | null | utils.py | 12-wu/- | 69362fa00b3956e1d56caced340389e31cb944a0 | [
"MIT"
] | null | null | null | utils.py | 12-wu/- | 69362fa00b3956e1d56caced340389e31cb944a0 | [
"MIT"
] | null | null | null | import torch
import random
import torchvision.transforms as transforms
import numpy as np
import cv2
from poissonblending import blend
def gen_input_mask(
shape, hole_size,
hole_area=None, max_holes=1):
"""
* inputs:
- shape (sequence, required):
Shape of a mask tensor to be ge... | 37.574879 | 93 | 0.559784 |
85b7b22b2db7d245d8cfafc316df2f1d778a00a2 | 7,112 | py | Python | riskslim/tests/test_loss_functions.py | jnirschl/risk-slim | f0dc978780923e38d24e8219766c9f13d82a500f | [
"BSD-3-Clause"
] | 117 | 2017-02-15T01:44:53.000Z | 2022-03-26T14:11:51.000Z | riskslim/tests/test_loss_functions.py | vishalbelsare/risk-slim | 100aca0fc0475e1ffb22f5ecf8ba240384a10adb | [
"BSD-3-Clause"
] | 13 | 2017-07-19T14:34:31.000Z | 2021-11-02T18:28:02.000Z | riskslim/tests/test_loss_functions.py | jnirschl/risk-slim | f0dc978780923e38d24e8219766c9f13d82a500f | [
"BSD-3-Clause"
] | 30 | 2017-04-01T07:21:32.000Z | 2022-03-17T19:27:52.000Z | #noinspection
import numpy as np
import riskslim.loss_functions.fast_log_loss as fast
import riskslim.loss_functions.log_loss as normal
import riskslim.loss_functions.log_loss_weighted as weighted
import riskslim.loss_functions.lookup_log_loss as lookup
from riskslim.setup_functions import _setup_training_weights
np.... | 38.652174 | 128 | 0.724269 |
2eb21f542889b27a5ba82a8ab7bc716cef9f98b7 | 3,461 | py | Python | src/programy/parser/template/nodes/extension.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | null | null | null | src/programy/parser/template/nodes/extension.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | null | null | null | src/programy/parser/template/nodes/extension.py | motazsaad/fit-bot-fb-clt | 580477aa1ec91855b621d9ae276f2705962f6a87 | [
"MIT"
] | 4 | 2019-04-01T15:42:23.000Z | 2020-11-05T08:14:27.000Z | """
Copyright (c) 2016-2019 Keith Sterling http://www.keithsterling.com
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, m... | 38.455556 | 120 | 0.6423 |
aec7bf983d79435d0e6e4bc7d02a2c12ee82315d | 4,147 | py | Python | LipidFinder/PeakFilter/SolventCalcs.py | s-andrews/LipidFinder | c91d6caa8008e0a67188914e48f30913deff888d | [
"MIT"
] | 12 | 2018-03-12T06:43:29.000Z | 2021-12-30T03:01:12.000Z | LipidFinder/PeakFilter/SolventCalcs.py | s-andrews/LipidFinder | c91d6caa8008e0a67188914e48f30913deff888d | [
"MIT"
] | 6 | 2019-05-07T02:40:19.000Z | 2022-01-25T18:58:16.000Z | LipidFinder/PeakFilter/SolventCalcs.py | s-andrews/LipidFinder | c91d6caa8008e0a67188914e48f30913deff888d | [
"MIT"
] | 12 | 2019-01-15T10:48:17.000Z | 2021-12-30T03:01:13.000Z | # Copyright (c) 2019 J. Alvarez-Jarreta and C.J. Brasher
#
# This file is part of the LipidFinder software tool and governed by the
# 'MIT License'. Please see the LICENSE file that should have been
# included as part of this software.
"""Set of methods focused on adjust sample replicate intensities that
may be altered... | 43.197917 | 80 | 0.693755 |
73764668f4a292487d563544ede2e201cef7d39b | 1,827 | py | Python | func_json.py | yavord/flaskREST_API | 4b667b8975121c0b0eeffb907c2d33ec39208762 | [
"MIT"
] | null | null | null | func_json.py | yavord/flaskREST_API | 4b667b8975121c0b0eeffb907c2d33ec39208762 | [
"MIT"
] | null | null | null | func_json.py | yavord/flaskREST_API | 4b667b8975121c0b0eeffb907c2d33ec39208762 | [
"MIT"
] | null | null | null | import json
def __get_recipes():
with open('data.json') as json_f:
return((json.load(json_f))['recipes'])
def __write_recipe(recipe):
with open('data.json', 'r+') as json_f:
file_data = json.load(json_f)
file_data['recipes'].append(recipe)
json_f.seek(0)
json.dump(file_... | 27.681818 | 63 | 0.61029 |
63ba9f34786283f918a98cac4ded58144ed77560 | 7,020 | py | Python | scGCN/GWNN/train_GWNN.py | Dee-chen/scGCN | 604818fbaf32ef2fd6ee7bd601f4fe8eff26ac94 | [
"MIT"
] | 24 | 2020-10-06T00:56:02.000Z | 2022-03-04T06:41:18.000Z | scGCN/GWNN/train_GWNN.py | Dee-chen/scGCN | 604818fbaf32ef2fd6ee7bd601f4fe8eff26ac94 | [
"MIT"
] | 6 | 2020-10-11T14:47:11.000Z | 2022-03-08T10:07:39.000Z | scGCN/GWNN/train_GWNN.py | Dee-chen/scGCN | 604818fbaf32ef2fd6ee7bd601f4fe8eff26ac94 | [
"MIT"
] | 8 | 2020-12-15T09:14:56.000Z | 2022-03-04T01:26:19.000Z | from __future__ import division
from __future__ import print_function
import tensorflow as tf
import warnings
warnings.filterwarnings("ignore")
from utils import *
from models import GCN, MLP, GCN_WeightShare, Wavelet_Neural_Network, Spectral_CNN
from sc_utilities import *
import os
os.environ['CUDA_VISIBLE_DEVICES']... | 43.875 | 158 | 0.717521 |
bf4067eba083ea03acfaec44c46fd4bccb02a34c | 1,724 | py | Python | airflow/providers/apache/cassandra/example_dags/example_cassandra_dag.py | takuti/airflow | 0ac3b8c3dd749c59e60cf0169580b9e7c5049d9e | [
"Apache-2.0"
] | 8,092 | 2016-04-27T20:32:29.000Z | 2019-01-05T07:39:33.000Z | airflow/providers/apache/cassandra/example_dags/example_cassandra_dag.py | takuti/airflow | 0ac3b8c3dd749c59e60cf0169580b9e7c5049d9e | [
"Apache-2.0"
] | 2,961 | 2016-05-05T07:16:16.000Z | 2019-01-05T08:47:59.000Z | airflow/providers/apache/cassandra/example_dags/example_cassandra_dag.py | takuti/airflow | 0ac3b8c3dd749c59e60cf0169580b9e7c5049d9e | [
"Apache-2.0"
] | 3,546 | 2016-05-04T20:33:16.000Z | 2019-01-05T05:14:26.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... | 38.311111 | 107 | 0.774942 |
cd92dbba8b9dc6ede4e2e40eb80d8d982afcaccd | 4,672 | py | Python | model_methods/model_methods.py | shivamshinde123/flight-fare-prediction | 630c8f41419c751c54ac8f1637748a548a426482 | [
"MIT"
] | null | null | null | model_methods/model_methods.py | shivamshinde123/flight-fare-prediction | 630c8f41419c751c54ac8f1637748a548a426482 | [
"MIT"
] | null | null | null | model_methods/model_methods.py | shivamshinde123/flight-fare-prediction | 630c8f41419c751c54ac8f1637748a548a426482 | [
"MIT"
] | null | null | null | import os
import pathlib
import pickle
import shutil
import warnings
from Logging.logging import Logger
warnings.simplefilter(action='ignore', category=FutureWarning)
class modelMethods:
"""
Description: This class will contain the methods used for saving, loading and finding the correct model for
corre... | 32.901408 | 120 | 0.583048 |
7fe25bcadc950758407f9d217a408428d0c461b8 | 45,987 | py | Python | urdf2webots/parserURDF.py | omichel/urdf2webots | 30d70198e492cccf9f5a149643ab55e31185c9fe | [
"Apache-2.0"
] | 7 | 2018-10-09T16:38:26.000Z | 2019-07-27T03:02:50.000Z | urdf2webots/parserURDF.py | omichel/urdf2webots | 30d70198e492cccf9f5a149643ab55e31185c9fe | [
"Apache-2.0"
] | 18 | 2018-10-10T06:44:42.000Z | 2019-08-06T13:22:30.000Z | urdf2webots/parserURDF.py | omichel/urdf2webots | 30d70198e492cccf9f5a149643ab55e31185c9fe | [
"Apache-2.0"
] | 4 | 2018-10-20T03:06:30.000Z | 2019-04-13T02:03:08.000Z | """Import modules."""
import math
import os
import sys
import numpy
try:
from PIL import Image
except ImportError as e:
if sys.platform == 'linux2':
sys.stderr.write("PIL module not found, please install it with:\n")
sys.stderr.write("apt-get install python-pip\n")
sys.stderr.write("pip ... | 45.576809 | 205 | 0.591776 |
431f0bfdd41900f7510432c2cb6d10113adde3d4 | 1,121 | py | Python | server/djangoapp/urls.py | Dee-Sol/agfzb-CloudAppDevelopment_Capstone | ad3c25acdf7b8f9643e4698462079fe8347d1256 | [
"Apache-2.0"
] | null | null | null | server/djangoapp/urls.py | Dee-Sol/agfzb-CloudAppDevelopment_Capstone | ad3c25acdf7b8f9643e4698462079fe8347d1256 | [
"Apache-2.0"
] | null | null | null | server/djangoapp/urls.py | Dee-Sol/agfzb-CloudAppDevelopment_Capstone | ad3c25acdf7b8f9643e4698462079fe8347d1256 | [
"Apache-2.0"
] | null | null | null | from django.urls import path
from django.conf.urls.static import static
from django.conf import settings
from . import views
app_name = 'djangoapp'
urlpatterns = [
# route is a string contains a URL pattern
# view refers to the view function
# name the URL
# path for about view
path(route='about/'... | 33.969697 | 86 | 0.698483 |
64286b3590b7ea586a84e45db679779948b89e0c | 4,921 | py | Python | core/sawtooth_poet/poet_consensus/wait_timer.py | peterschwarz/sawtooth-poet | 6bce9a7c11bd1bdb54e24224b69b75e29b08f1a1 | [
"Apache-2.0"
] | 14 | 2018-07-27T06:06:31.000Z | 2021-12-03T00:30:39.000Z | core/sawtooth_poet/poet_consensus/wait_timer.py | peterschwarz/sawtooth-poet | 6bce9a7c11bd1bdb54e24224b69b75e29b08f1a1 | [
"Apache-2.0"
] | 20 | 2018-07-24T00:58:10.000Z | 2021-12-05T22:42:14.000Z | core/sawtooth_poet/poet_consensus/wait_timer.py | peterschwarz/sawtooth-poet | 6bce9a7c11bd1bdb54e24224b69b75e29b08f1a1 | [
"Apache-2.0"
] | 38 | 2018-07-20T19:54:48.000Z | 2022-03-20T07:27:46.000Z | # Copyright 2016, 2017 Intel Corporation
#
# 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 ... | 36.183824 | 80 | 0.629547 |
dba1104153a91a29db6d1a1e87aa96a27de7fc8e | 1,823 | py | Python | models/encoders/map2style.py | RahulBhalley/restyle-encoder-light | 9111ee9caa1d82d7510c800850f7fe2e5a573f11 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT"
] | null | null | null | models/encoders/map2style.py | RahulBhalley/restyle-encoder-light | 9111ee9caa1d82d7510c800850f7fe2e5a573f11 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT"
] | null | null | null | models/encoders/map2style.py | RahulBhalley/restyle-encoder-light | 9111ee9caa1d82d7510c800850f7fe2e5a573f11 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT"
] | null | null | null | import numpy as np
from torch import nn
from torch.nn import Conv2d, Module, MaxPool2d
from models.stylegan2.model import EqualLinear
class GradualStyleBlock(Module):
def __init__(self, in_c, out_c, spatial):
super(GradualStyleBlock, self).__init__()
self.out_c = out_c
self.spatial = spat... | 32.553571 | 76 | 0.565003 |
e5c5455badf1f6ed7f77a52d89c94aced808d4ae | 351 | py | Python | hpobench/benchmarks/od/od_benchmarks.py | pfistfl/HPOBench | a7ad8807bd2e058ff99f703ad057b64ecadd4b66 | [
"Apache-2.0"
] | 78 | 2017-01-14T14:25:55.000Z | 2020-09-30T22:57:14.000Z | hpobench/benchmarks/od/od_benchmarks.py | pfistfl/HPOBench | a7ad8807bd2e058ff99f703ad057b64ecadd4b66 | [
"Apache-2.0"
] | 84 | 2016-11-24T15:19:20.000Z | 2020-11-09T11:34:19.000Z | hpobench/benchmarks/od/od_benchmarks.py | pfistfl/HPOBench | a7ad8807bd2e058ff99f703ad057b64ecadd4b66 | [
"Apache-2.0"
] | 31 | 2016-11-29T19:56:06.000Z | 2020-07-10T04:13:33.000Z | """
This is just an entry point for starting the benchmarks.
"""
from hpobench.benchmarks.od.od_ae import ODAutoencoder
from hpobench.benchmarks.od.od_kde import ODKernelDensityEstimation
from hpobench.benchmarks.od.od_ocsvm import ODOneClassSupportVectorMachine
__all__ = [ODAutoencoder, ODKernelDensityEstimation, O... | 31.909091 | 84 | 0.849003 |
05d78f0f78d3cad0b90a11968ce52a9c2501cadb | 10,397 | py | Python | calculates_results_stats.py | ian0549/Developing-a-Command-line-Image-Classifier-Application-with-Deep-Learning | 4e4d05933aedd716311dac4ec71e61a7878d290e | [
"MIT"
] | null | null | null | calculates_results_stats.py | ian0549/Developing-a-Command-line-Image-Classifier-Application-with-Deep-Learning | 4e4d05933aedd716311dac4ec71e61a7878d290e | [
"MIT"
] | null | null | null | calculates_results_stats.py | ian0549/Developing-a-Command-line-Image-Classifier-Application-with-Deep-Learning | 4e4d05933aedd716311dac4ec71e61a7878d290e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# */AIPND-revision/intropyproject-classify-pet-images/calculates_results_stats.py
#
# PROGRAMMER: Ian Akoto
# DATE CREATED: 03/02/2020
# REVISED DATE: 03/04/202... | 55.897849 | 123 | 0.63326 |
5c8576e5211283b339f9ec0b098042a64ce8e7a7 | 359 | py | Python | GBP/urls.py | Scankiran/CurrencyAPI | 1fc987e267210796813028f773d8ea631d5b8da6 | [
"MIT"
] | null | null | null | GBP/urls.py | Scankiran/CurrencyAPI | 1fc987e267210796813028f773d8ea631d5b8da6 | [
"MIT"
] | null | null | null | GBP/urls.py | Scankiran/CurrencyAPI | 1fc987e267210796813028f773d8ea631d5b8da6 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path,include
from . import views
app_name = "GBP"
urlpatterns = [
path('last/', views.lastData, name = 'gbpLast'),
# path('hourly/',views.dashboard, name = 'gbpHourly'),
# path('daily/',views.addArticle,name='gbpoDaily'),
# path('mounthly',view... | 27.615385 | 63 | 0.685237 |
f6510547d0467fb391ff467e3bc55c67b1c5780d | 6,773 | py | Python | book/imdb_keras.py | qitsweauca/pyprobml | 59a1191896fbb7408fb589f0b8170a42c0f55969 | [
"MIT"
] | 1 | 2019-03-04T05:43:10.000Z | 2019-03-04T05:43:10.000Z | book/imdb_keras.py | YihaoHu/pyprobml | 59a1191896fbb7408fb589f0b8170a42c0f55969 | [
"MIT"
] | null | null | null | book/imdb_keras.py | YihaoHu/pyprobml | 59a1191896fbb7408fb589f0b8170a42c0f55969 | [
"MIT"
] | null | null | null |
# Movie review classifier using keras. Based on
# https://www.tensorflow.org/tutorials/keras/basic_text_classification
from __future__ import absolute_import, division, print_function
import tensorflow as tf
from tensorflow import keras
import numpy as np
from utils import save_fig
print(tf.__version__)
np.random... | 35.835979 | 122 | 0.636498 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.