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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
489d4dc8e5f3cc67a474dcb7feb4968126355d94 | 17,176 | py | Python | modules/tools/gen_vehicle_protocol/gen_protocols.py | yuyangapollo/apollo | 8c3daa48edf457efe042207f543d3e165a642ad2 | [
"Apache-2.0"
] | null | null | null | modules/tools/gen_vehicle_protocol/gen_protocols.py | yuyangapollo/apollo | 8c3daa48edf457efe042207f543d3e165a642ad2 | [
"Apache-2.0"
] | null | null | null | modules/tools/gen_vehicle_protocol/gen_protocols.py | yuyangapollo/apollo | 8c3daa48edf457efe042207f543d3e165a642ad2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
###############################################################################
# Copyright 2017 The Apollo 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... | 35.561077 | 99 | 0.552806 |
086cc045e27166e82fadb70c7bc3edaf4da553b4 | 1,716 | py | Python | certbot_dns_corenetworks/dns_corenetworks_test.py | MasinAD/certbot-dns-corenetworks | 06924213d21d056da50716009b5bbf4ebcb8b12a | [
"Apache-2.0"
] | null | null | null | certbot_dns_corenetworks/dns_corenetworks_test.py | MasinAD/certbot-dns-corenetworks | 06924213d21d056da50716009b5bbf4ebcb8b12a | [
"Apache-2.0"
] | null | null | null | certbot_dns_corenetworks/dns_corenetworks_test.py | MasinAD/certbot-dns-corenetworks | 06924213d21d056da50716009b5bbf4ebcb8b12a | [
"Apache-2.0"
] | null | null | null | """Tests for certbot_dns_corenetworks.dns_corenetworks."""
import os
import unittest
import mock
from requests.exceptions import HTTPError
from certbot.plugins import dns_test_common
from certbot.plugins import dns_test_common_lexicon
from certbot.tests import util as test_util
LOGIN = 'foo'
PASSWORD = 'bar'
class... | 33 | 102 | 0.734266 |
64d0010a2cd52fd038e5843953c93fa654478ae3 | 10,972 | py | Python | lightkurve/seismology/stellar_estimators.py | burke86/lightkurve | fda3e92544ccc3c6b38d003b2980a232fbcbbd0b | [
"MIT"
] | 1 | 2021-05-07T10:42:01.000Z | 2021-05-07T10:42:01.000Z | lightkurve/seismology/stellar_estimators.py | burke86/lightkurve | fda3e92544ccc3c6b38d003b2980a232fbcbbd0b | [
"MIT"
] | 7 | 2018-07-14T17:49:36.000Z | 2020-09-24T19:58:13.000Z | lightkurve/seismology/stellar_estimators.py | barentsen/lightkurve | 5b1693832bc509e42742d1b6f20224d131e62d8c | [
"MIT"
] | null | null | null | """Functions to estimate stellar parameters (radius, mass, logg) using
asteroseismic scaling relations.
"""
from uncertainties import ufloat, umath
from astropy import units as u
from astropy import constants as const
from .utils import SeismologyQuantity
__all__ = ['estimate_radius', 'estimate_mass', 'estimate_logg... | 44.241935 | 95 | 0.685108 |
ddb17b6e53147a98f8f014a55724656f0a4f7694 | 144 | py | Python | pipenv/vendor/requirementslib/__init__.py | craynic/pipenv | e137d4334a5d225a06bf41b21e2eef746c19c3cb | [
"MIT"
] | null | null | null | pipenv/vendor/requirementslib/__init__.py | craynic/pipenv | e137d4334a5d225a06bf41b21e2eef746c19c3cb | [
"MIT"
] | null | null | null | pipenv/vendor/requirementslib/__init__.py | craynic/pipenv | e137d4334a5d225a06bf41b21e2eef746c19c3cb | [
"MIT"
] | null | null | null | # -*- coding=utf-8 -*-
__version__ = '1.1.9.dev0'
from .exceptions import RequirementError
from .models import Requirement, Lockfile, Pipfile
| 20.571429 | 50 | 0.736111 |
3d654d865f0c14088d9d37d31f5e46ff59154183 | 24,349 | py | Python | src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/servers_operations.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/servers_operations.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/db-up/azext_db_up/vendored_sdks/azure_mgmt_rdbms/mariadb/operations/servers_operations.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 46.028355 | 156 | 0.664586 |
69c512413ca49c660d17343e10e4cd3cf51599e2 | 281 | py | Python | visualqc/__diffusion__.py | raamana/corticalqa | 8bca13b2c624e7a230d0b0a5a6539357af641163 | [
"Apache-2.0"
] | 54 | 2018-02-05T14:50:57.000Z | 2022-02-04T10:24:35.000Z | visualqc/__diffusion__.py | shannyfoo/visualqc | 606d2b8770e619f8d990faeae24032bf4b152f29 | [
"Apache-2.0"
] | 45 | 2018-02-09T02:46:32.000Z | 2022-03-30T22:36:59.000Z | visualqc/__diffusion__.py | shannyfoo/visualqc | 606d2b8770e619f8d990faeae24032bf4b152f29 | [
"Apache-2.0"
] | 10 | 2018-02-09T19:46:27.000Z | 2022-02-17T09:44:36.000Z | from sys import version_info
if version_info.major > 2:
from visualqc import diffusion
else:
raise NotImplementedError('visualqc_diffusion requires Python 3 or higher!')
def main():
"""Entry point."""
diffusion.cli_run()
if __name__ == '__main__':
main()
| 16.529412 | 80 | 0.697509 |
8bb10fde0388474b2ccaedabfdcc914c9b4e5aef | 1,700 | py | Python | tf2onnx/tflite/RNNOptions.py | gcunhase/tensorflow-onnx | 8a61c99fbc39c36d70781f95e2c7c582f46ba2db | [
"Apache-2.0"
] | 1 | 2021-04-30T15:26:06.000Z | 2021-04-30T15:26:06.000Z | tf2onnx/tflite/RNNOptions.py | gcunhase/tensorflow-onnx | 8a61c99fbc39c36d70781f95e2c7c582f46ba2db | [
"Apache-2.0"
] | null | null | null | tf2onnx/tflite/RNNOptions.py | gcunhase/tensorflow-onnx | 8a61c99fbc39c36d70781f95e2c7c582f46ba2db | [
"Apache-2.0"
] | 1 | 2021-05-11T21:51:52.000Z | 2021-05-11T21:51:52.000Z | # SPDX-License-Identifier: Apache-2.0
# automatically generated by the FlatBuffers compiler, do not modify
# namespace: tflite
import flatbuffers
from flatbuffers.compat import import_numpy
np = import_numpy()
class RNNOptions(object):
__slots__ = ['_tab']
@classmethod
def GetRootAsRNNOptions(cls, buf,... | 36.170213 | 133 | 0.726471 |
ed30226ea55b17e5b00ca86344177453a51f6af9 | 273 | py | Python | ABC/166/b.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | ABC/166/b.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | ABC/166/b.py | fumiyanll23/AtCoder | 362ca9fcacb5415c1458bc8dee5326ba2cc70b65 | [
"MIT"
] | null | null | null | N, K = map(int, input().split())
d = [0 for i in range(K)]
A = []
for i in range(K):
d[i] = int(input())
A.append(list(map(int, input().split())))
candy = [0 for i in range(N)]
for i in range(K):
for j in range(d[i]):
candy[A[i][j]-1] += 1
print(candy.count(0)) | 21 | 43 | 0.553114 |
d659e5f3e23a8e205074194264ce3c11b3b1eca4 | 19,732 | py | Python | gs_api_client/swagger/models/paas_service_update.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | 7 | 2019-07-12T13:59:45.000Z | 2021-03-16T08:46:20.000Z | gs_api_client/swagger/models/paas_service_update.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | 13 | 2020-01-23T07:50:29.000Z | 2022-03-21T14:32:40.000Z | gs_api_client/swagger/models/paas_service_update.py | gridscale/gridscale_api_client_python | 755b8e8a017784a4f5c6b3a577338ff988c41a9a | [
"MIT"
] | null | null | null | # coding: utf-8
"""
API Specification
# Introduction Welcome to gridscales API documentation. A REST API is a programming interface that allows you to access and send data directly to our systems using HTTPS requests, without the need to use a web GUI. All the functionality you are already familiar with in y... | 86.165939 | 12,787 | 0.69927 |
84ba3e53249def115ccc7410900325690502fb69 | 9,899 | py | Python | jarvis_cd/launchers/lustre/package.py | lukemartinlogan/jarvis-cd | fe929a22aa9b93498bacd5494b15c7c6a7c49e37 | [
"MIT"
] | null | null | null | jarvis_cd/launchers/lustre/package.py | lukemartinlogan/jarvis-cd | fe929a22aa9b93498bacd5494b15c7c6a7c49e37 | [
"MIT"
] | null | null | null | jarvis_cd/launchers/lustre/package.py | lukemartinlogan/jarvis-cd | fe929a22aa9b93498bacd5494b15c7c6a7c49e37 | [
"MIT"
] | null | null | null | from jarvis_cd.echo_node import EchoNode
from jarvis_cd.exec_node import ExecNode
from jarvis_cd.hostfile import Hostfile
from jarvis_cd.launcher import Launcher, LauncherConfig
import os
import socket
from jarvis_cd.scp_node import SCPNode
from jarvis_cd.sleep_node import SleepNode
from jarvis_cd.ssh_node import SSHN... | 45.828704 | 165 | 0.567532 |
6bd6ff4dc3fe404a35ec1fd6c0c699c74e8851e5 | 480 | py | Python | app/modules/pinyin_compare/pinyin.py | KennyChenFight/AIBox-Server | e2bb4a9afff1db7596741c4084889769510eb27b | [
"MIT"
] | 1 | 2018-10-18T14:48:09.000Z | 2018-10-18T14:48:09.000Z | app/modules/pinyin_compare/pinyin.py | KennyChenFight/AIBox-Server | e2bb4a9afff1db7596741c4084889769510eb27b | [
"MIT"
] | null | null | null | app/modules/pinyin_compare/pinyin.py | KennyChenFight/AIBox-Server | e2bb4a9afff1db7596741c4084889769510eb27b | [
"MIT"
] | 1 | 2018-09-22T08:18:14.000Z | 2018-09-22T08:18:14.000Z | from xpinyin import Pinyin
p = Pinyin()
def to_pinyin(word):
return p.get_pinyin(word)
# word_1 & word_2 都不是拼音
def compare(word_1, word_2):
pinyin_1 = p.get_pinyin(word_1)
pinyin_2 = p.get_pinyin(word_2)
if pinyin_1 == pinyin_2:
return True
else:
return False
# word_1不是拼音, word_... | 19.2 | 40 | 0.6625 |
8c3e094576ad5407cb186a4674c54c1bcdd8d3ec | 14,985 | py | Python | Data/Drawings.py | pracedru/PracedruDesign | e6e313ee3efb377a8e393e5276eb9daa172e1c58 | [
"BSD-3-Clause"
] | 3 | 2019-01-09T09:32:56.000Z | 2019-02-14T18:27:33.000Z | Data/Drawings.py | pracedru/PracedruDesign | e6e313ee3efb377a8e393e5276eb9daa172e1c58 | [
"BSD-3-Clause"
] | null | null | null | Data/Drawings.py | pracedru/PracedruDesign | e6e313ee3efb377a8e393e5276eb9daa172e1c58 | [
"BSD-3-Clause"
] | null | null | null | from enum import Enum
from Data.Paper import *
from Data.Events import ChangeEvent, ValueChangeEvent
from Data.Objects import ObservableObject, NamedObservableObject
from Data.Parameters import Parameters
from Data.Plane import Plane
from Data.Sketch import Sketch
from Data.Vertex import Vertex
class ViewType(Enum):... | 29.267578 | 105 | 0.719319 |
b68f3d3f2abf99cbfce04160d16c49cb3057c97a | 2,087 | py | Python | tests/flask/test_query_params.py | skilkis/strawberry | 05c94aea86d5c44e226d0f5a0d453079308ce8b9 | [
"MIT"
] | null | null | null | tests/flask/test_query_params.py | skilkis/strawberry | 05c94aea86d5c44e226d0f5a0d453079308ce8b9 | [
"MIT"
] | 3 | 2021-11-08T01:12:10.000Z | 2022-03-21T06:33:38.000Z | tests/flask/test_query_params.py | uvicorn/strawberry | 100e47fd430f0552c9ef9549306faceac610431d | [
"MIT"
] | null | null | null | import json
def test_no_graphiql_empty_get(flask_client_no_graphiql):
response = flask_client_no_graphiql.get("/graphql")
assert response.status_code == 415
def test_no_query(flask_client):
params = {"variables": '{"name": "James"}'}
response = flask_client.get("/graphql", query_string=params)
... | 23.188889 | 70 | 0.609008 |
13b6bbbd28c2d096149ec60f15b2cc83ff0f13b9 | 1,449 | py | Python | grr/tools/export_plugins/hash_file_store_plugin.py | theGreenJedi/grr | d9e11e304dc299d49c76b7fdf6fdbfcd4b8eec39 | [
"Apache-2.0"
] | null | null | null | grr/tools/export_plugins/hash_file_store_plugin.py | theGreenJedi/grr | d9e11e304dc299d49c76b7fdf6fdbfcd4b8eec39 | [
"Apache-2.0"
] | null | null | null | grr/tools/export_plugins/hash_file_store_plugin.py | theGreenJedi/grr | d9e11e304dc299d49c76b7fdf6fdbfcd4b8eec39 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""'hash_file_store' plugin for GRR export tool."""
from grr.lib import data_store
from grr.lib import rdfvalue
from grr.lib.aff4_objects import filestore
from grr.tools.export_plugins import plugin
class HashFileStoreExportPlugin(plugin.OutputPluginBasedExportPlugin):
"""Exports hashes fro... | 32.931818 | 77 | 0.640442 |
b3fe47603d0debbca463ac8ea43ae98d10435b43 | 224 | py | Python | board/filters/__init__.py | EliasEriksson/MinesweeperAI | 3b881540baceea116eb3023c33bb355e6a67f8ce | [
"MIT"
] | 1 | 2020-04-11T21:29:24.000Z | 2020-04-11T21:29:24.000Z | board/filters/__init__.py | EliasEriksson/MinesweeperAI | 3b881540baceea116eb3023c33bb355e6a67f8ce | [
"MIT"
] | null | null | null | board/filters/__init__.py | EliasEriksson/MinesweeperAI | 3b881540baceea116eb3023c33bb355e6a67f8ce | [
"MIT"
] | null | null | null | from .black_and_white_filter import black_and_white_filter as black_and_white
from .color_filter import color_filter as color
from .field_filter import field_filter as field
__all__ = ["black_and_white", "color", "field"]
| 32 | 77 | 0.825893 |
4250c19d146ad00ecc64c49ef45a35a451655022 | 11,052 | py | Python | caluma/form/migrations/0001_initial.py | czosel/caluma | 4a3e81b2000961ab934bfc1c6840ec00f0ba2c19 | [
"MIT"
] | null | null | null | caluma/form/migrations/0001_initial.py | czosel/caluma | 4a3e81b2000961ab934bfc1c6840ec00f0ba2c19 | [
"MIT"
] | 1 | 2020-07-11T01:07:44.000Z | 2020-07-11T01:07:44.000Z | caluma/form/migrations/0001_initial.py | czosel/caluma | 4a3e81b2000961ab934bfc1c6840ec00f0ba2c19 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.17 on 2018-12-12 12:43
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
from django.db import migrations, models
import django.db.models.deletion
import localized_fields.fields.field
import uuid
class Migration(migrations.Migration... | 37.212121 | 87 | 0.440554 |
e3ff4211aed4e1270ff50cafc914f9c7068fd7fe | 3,729 | py | Python | tools/android/junction_test.py | sevki/bazel | b18915752a69fbbc6ed94e1710198167593565fc | [
"Apache-2.0"
] | 8 | 2015-12-25T16:16:53.000Z | 2021-07-13T09:58:53.000Z | tools/android/junction_test.py | sevki/bazel | b18915752a69fbbc6ed94e1710198167593565fc | [
"Apache-2.0"
] | 67 | 2022-01-12T18:22:13.000Z | 2022-01-12T18:24:28.000Z | tools/android/junction_test.py | sevki/bazel | b18915752a69fbbc6ed94e1710198167593565fc | [
"Apache-2.0"
] | 6 | 2016-02-10T20:07:36.000Z | 2020-11-18T17:44:05.000Z | # Copyright 2017 The Bazel 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 applicable la... | 40.978022 | 79 | 0.721641 |
fd27dcc9675602820d1a055171e8df6d6c604d18 | 86,713 | py | Python | gbpservice/neutron/services/grouppolicy/plugin.py | mr-smart/group-based-policy | e3fac66aa2d1eb3afd713ff763259e85f0e461af | [
"Apache-2.0"
] | null | null | null | gbpservice/neutron/services/grouppolicy/plugin.py | mr-smart/group-based-policy | e3fac66aa2d1eb3afd713ff763259e85f0e461af | [
"Apache-2.0"
] | null | null | null | gbpservice/neutron/services/grouppolicy/plugin.py | mr-smart/group-based-policy | e3fac66aa2d1eb3afd713ff763259e85f0e461af | [
"Apache-2.0"
] | 1 | 2019-12-03T15:28:24.000Z | 2019-12-03T15:28:24.000Z | # 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... | 47.907735 | 79 | 0.628971 |
8afbb38d5dc19e75687457493a772cd2f94e3b67 | 24,466 | py | Python | cw.py | kkew3/pytorch-cw2 | 44993391ac9444b9941596d7fec6627fe6673910 | [
"MIT"
] | 55 | 2018-08-30T16:14:41.000Z | 2022-03-28T13:26:49.000Z | cw.py | Mrzhouqifei/pytorch-cw2 | 44993391ac9444b9941596d7fec6627fe6673910 | [
"MIT"
] | 1 | 2018-12-11T03:37:04.000Z | 2018-12-19T17:13:07.000Z | cw.py | kkew3/pytorch-cw2 | 44993391ac9444b9941596d7fec6627fe6673910 | [
"MIT"
] | 15 | 2019-04-02T07:29:51.000Z | 2022-03-09T04:23:37.000Z | """
Carlini-Wagner attack (http://arxiv.org/abs/1608.04644).
Referential implementation:
- https://github.com/carlini/nn_robust_attacks.git (the original implementation)
- https://github.com/rwightman/pytorch-nips2017-attack-example.git
"""
import operator as op
from typing import Union, Tuple
import numpy as np
im... | 45.307407 | 108 | 0.60394 |
5538b29c4d0145016101d5a35e3faa5680fec014 | 530 | py | Python | Chapter02/urllib/urllib_form_data.py | yangwawa0323/Learning-Python-Networking-Second-Edition | 5460fe4fb6acc5d0df19bf36e52ac09e9a11eb8b | [
"MIT"
] | 52 | 2018-12-17T19:33:06.000Z | 2022-03-25T18:14:02.000Z | Chapter02/urllib/urllib_form_data.py | barretthugh/Learning-Python-Networking-Second-Edition | 0f00b8b20c1c85e76754e47113dff8ca9e99d5ca | [
"MIT"
] | null | null | null | Chapter02/urllib/urllib_form_data.py | barretthugh/Learning-Python-Networking-Second-Edition | 0f00b8b20c1c85e76754e47113dff8ca9e99d5ca | [
"MIT"
] | 38 | 2018-12-18T09:08:43.000Z | 2022-02-06T02:53:05.000Z | #!/usr/bin/env python3
from urllib.request import urlopen
from urllib.parse import urlencode
from urllib.request import Request
import json
data_dict = {'custname': 'customer','custtel': '323232',
'size': 'large','custemail': 'email@domain.com'}
data = urlencode(data_dict).encode('utf-8')
print(data)
req = Request('... | 29.444444 | 80 | 0.760377 |
642efa8c9a14a30508aed9efe268ce0ab1874041 | 1,267 | py | Python | tests/test_extraction.py | Kabongosalomon/axcell | f9c74910561f6064a04a10118824c99e871f8a38 | [
"Apache-2.0"
] | 335 | 2020-05-07T19:57:36.000Z | 2022-03-16T07:05:51.000Z | tests/test_extraction.py | doc22940/axcell | b41c1623377d89c3c45a61907f0a47ea029269de | [
"Apache-2.0"
] | 16 | 2020-06-12T16:43:29.000Z | 2021-11-24T11:19:09.000Z | tests/test_extraction.py | doc22940/axcell | b41c1623377d89c3c45a61907f0a47ea029269de | [
"Apache-2.0"
] | 50 | 2020-05-07T20:35:18.000Z | 2022-02-16T06:37:31.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import pytest
from pathlib import Path
from axcell.helpers.paper_extractor import PaperExtractor
from axcell.data.paper_collection import PaperCollection
from shutil import copyfileobj
import gzip
def test_extraction(tmpdir):
# pack main.tex... | 32.487179 | 86 | 0.692186 |
9788f76ff8a41bfa0885c48722f13afb39d6305b | 7,422 | py | Python | game/state.py | Areking-RS/Code-jam-2021 | 67b2a4526ededa7bbef7a6963443dbb1c5d63d37 | [
"MIT"
] | null | null | null | game/state.py | Areking-RS/Code-jam-2021 | 67b2a4526ededa7bbef7a6963443dbb1c5d63d37 | [
"MIT"
] | null | null | null | game/state.py | Areking-RS/Code-jam-2021 | 67b2a4526ededa7bbef7a6963443dbb1c5d63d37 | [
"MIT"
] | null | null | null | from typing import Generator, Optional, Union
from blessed import Terminal
from game.components import (
Ascii, FollowAI, Movement, PlayerInput, Renderable, Text, TimeToLive,
Transform
)
from game.cutscenes import CutsceneFrame, CutsceneSequence, ordered_cutscenes
from game.ecs.world import World
from game.ma... | 31.991379 | 88 | 0.626381 |
4550934031aec77ba2517b33be10f8f89bdf83e8 | 51,816 | py | Python | tests/engine/test_flow_runner.py | davidfhaines/prefect | 47e49bd685920b09164e8397a2b29f91197cebbc | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/engine/test_flow_runner.py | davidfhaines/prefect | 47e49bd685920b09164e8397a2b29f91197cebbc | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | tests/engine/test_flow_runner.py | davidfhaines/prefect | 47e49bd685920b09164e8397a2b29f91197cebbc | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import collections
import datetime
import queue
import random
import time
from unittest.mock import MagicMock
import pendulum
import pytest
import prefect
from prefect.core import Flow, Parameter, Task
from prefect.engine import signals
from prefect.engine.cache_validators import duration_only
from prefect.engine.exe... | 33.408124 | 123 | 0.656187 |
294045377a0564537638366a8a114a1a4b987573 | 701 | py | Python | setup.py | tushar2488/sos | d97e57453f98394a0957a5a00675b44b3e3c37df | [
"MIT"
] | null | null | null | setup.py | tushar2488/sos | d97e57453f98394a0957a5a00675b44b3e3c37df | [
"MIT"
] | null | null | null | setup.py | tushar2488/sos | d97e57453f98394a0957a5a00675b44b3e3c37df | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import re, ast
with open('requirements.txt') as f:
install_requires = f.read().strip().split('\n')
# get version from __version__ variable in sos/__init__.py
_version_re = re.compile(r'__version__\s+=\s+(.*)')
with open('sos/__init__.py', 'rb') as ... | 26.961538 | 58 | 0.730385 |
290aabaee00322eff09521619fcfdf5d516c1d3c | 4,706 | py | Python | src/util/graph_definition.py | imatge-upc/skiprnn-2017-tfm | 63f93a539a3f2c7a713089fdd2c38bb7b0c581ca | [
"MIT"
] | 129 | 2017-08-24T00:27:47.000Z | 2022-03-24T21:42:37.000Z | src/util/graph_definition.py | imatge-upc/skiprnn-2018-iclr | 63f93a539a3f2c7a713089fdd2c38bb7b0c581ca | [
"MIT"
] | 8 | 2018-02-28T15:05:48.000Z | 2022-02-09T23:30:21.000Z | src/util/graph_definition.py | imatge-upc/skiprnn-2018-iclr | 63f93a539a3f2c7a713089fdd2c38bb7b0c581ca | [
"MIT"
] | 45 | 2017-08-24T13:16:11.000Z | 2021-05-13T02:36:59.000Z | """
Graph creation functions.
"""
from __future__ import print_function
from __future__ import absolute_import
import tensorflow as tf
from rnn_cells.basic_rnn_cells import BasicLSTMCell, BasicGRUCell
from rnn_cells.skip_rnn_cells import SkipLSTMCell, MultiSkipLSTMCell
from rnn_cells.skip_rnn_cells import SkipGRUCe... | 38.892562 | 111 | 0.664046 |
744c8f6c5d7b7314da0d32771da32d0c43e4f5e3 | 2,247 | py | Python | services/web/src/auth/forms.py | dmenezesgabriel/flask-notes | 6a18f23e841b7d8ff641c0840f4cb9814dbcccb7 | [
"MIT"
] | null | null | null | services/web/src/auth/forms.py | dmenezesgabriel/flask-notes | 6a18f23e841b7d8ff641c0840f4cb9814dbcccb7 | [
"MIT"
] | null | null | null | services/web/src/auth/forms.py | dmenezesgabriel/flask-notes | 6a18f23e841b7d8ff641c0840f4cb9814dbcccb7 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from flask_babel import lazy_gettext as _l
from wtforms import StringField, PasswordField, SubmitField, BooleanField
from wtforms.validators import (
DataRequired, length, EqualTo, Email, ValidationError)
from src.models import User
class Register(FlaskForm):
username = StringF... | 37.45 | 78 | 0.684913 |
ca767602b03ef6be32e9c7e13c362924c5d02091 | 1,116 | py | Python | ex24.py | thinmarwin/python-exercises | 2d8ccdf9b0fcf73802b161ca31dd0428e92bbc66 | [
"MIT"
] | null | null | null | ex24.py | thinmarwin/python-exercises | 2d8ccdf9b0fcf73802b161ca31dd0428e92bbc66 | [
"MIT"
] | null | null | null | ex24.py | thinmarwin/python-exercises | 2d8ccdf9b0fcf73802b161ca31dd0428e92bbc66 | [
"MIT"
] | null | null | null | print("Let's priactive everything.")
print('You\'d need to know \'bout escapes with \\ that do:')
print('\n newlines and \t tabs.')
poem="""
\tThe lovely world
with logic so firmly planted
cannot discern \n the needs of love
nor comprehend passion from intuition
and requires an explanation
\n\t\twhere there is none.
"... | 27.219512 | 69 | 0.693548 |
62a993455b9be52df51eee21ca3a37bb45cad3d3 | 30,700 | py | Python | sdk/python/pulumi_azure_native/network/v20191101/public_ip_address.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20191101/public_ip_address.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20191101/public_ip_address.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 54.144621 | 5,476 | 0.685993 |
5b57343df9fc48ccb5fb4c3e1682795dde4ef268 | 3,052 | py | Python | packages/python/plotly/plotly/validators/bar/insidetextfont/__init__.py | sgn/plotly.py | 587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6 | [
"MIT"
] | 3 | 2020-02-04T21:39:20.000Z | 2020-11-17T19:07:07.000Z | packages/python/plotly/plotly/validators/bar/insidetextfont/__init__.py | sgn/plotly.py | 587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6 | [
"MIT"
] | 12 | 2020-06-06T01:22:26.000Z | 2022-03-12T00:13:42.000Z | packages/python/plotly/plotly/validators/bar/insidetextfont/__init__.py | sgn/plotly.py | 587075c9f5a57a3dd60b03b2d47d925fbbb9b9b6 | [
"MIT"
] | 17 | 2019-11-21T14:11:29.000Z | 2019-11-21T15:26:23.000Z | import _plotly_utils.basevalidators
class SizesrcValidator(_plotly_utils.basevalidators.SrcValidator):
def __init__(
self, plotly_name="sizesrc", parent_name="bar.insidetextfont", **kwargs
):
super(SizesrcValidator, self).__init__(
plotly_name=plotly_name,
parent_name=p... | 31.463918 | 88 | 0.632372 |
a7c3800fa014f8f56a5e27d139eaa2bbd3dd7ded | 2,841 | py | Python | mod/scene_graph.py | MarioA-PM/Snake2D | b5a196360331b88955e478f8f98e35b85c2c6ce5 | [
"CC0-1.0"
] | null | null | null | mod/scene_graph.py | MarioA-PM/Snake2D | b5a196360331b88955e478f8f98e35b85c2c6ce5 | [
"CC0-1.0"
] | null | null | null | mod/scene_graph.py | MarioA-PM/Snake2D | b5a196360331b88955e478f8f98e35b85c2c6ce5 | [
"CC0-1.0"
] | null | null | null | # coding=utf-8
"""
Daniel Calderon, CC3501, 2019-2
A simple scene graph class and functionality
"""
from OpenGL.GL import *
import numpy as np
from mod import easy_shaders as es, transformations as tr
# A simple class to handle a scene graph
# Each node represents a group of objects
# Each leaf represents a basic f... | 29.59375 | 113 | 0.687434 |
d056d96cb70fc1521719c4b671440d61404b7cbf | 1,929 | py | Python | setup.py | astrotransients/sne | 11abc3131c6366ecd23964369e55ff264add7805 | [
"MIT"
] | 30 | 2016-07-21T20:41:52.000Z | 2022-03-17T20:52:49.000Z | setup.py | astrotransients/sne | 11abc3131c6366ecd23964369e55ff264add7805 | [
"MIT"
] | 48 | 2016-07-07T12:02:50.000Z | 2020-10-14T21:20:02.000Z | setup.py | astrocatalogs/astrocats | 11abc3131c6366ecd23964369e55ff264add7805 | [
"MIT"
] | 9 | 2016-07-22T08:19:44.000Z | 2022-03-17T23:26:08.000Z | """WARNING : THIS SCRIPT IS NOT CURRENTLY OPERATIONAL.
"""
import logging
import os
from setuptools import find_packages, setup
from setuptools.command.develop import develop
from setuptools.command.install import install
with open('requirements.txt') as f:
required = f.read().splitlines()
dir_path = os.path.di... | 26.067568 | 79 | 0.656299 |
76742909624fba012094f65a37a5c32b13662103 | 18,971 | py | Python | basenji/vcf.py | shtoneyan/basenji | b220dc72069c3d8c250f36cb09799b337daac2fe | [
"Apache-2.0"
] | null | null | null | basenji/vcf.py | shtoneyan/basenji | b220dc72069c3d8c250f36cb09799b337daac2fe | [
"Apache-2.0"
] | null | null | null | basenji/vcf.py | shtoneyan/basenji | b220dc72069c3d8c250f36cb09799b337daac2fe | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Calico 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, sof... | 27.980826 | 122 | 0.624743 |
31aa5ed79b43acf4d436a1dde60f9ec5f4e2b569 | 1,479 | py | Python | L1Trigger/L1THGCal/python/hgcalTowerMapProducer_cfi.py | bkilian15/cmssw | ad9b85e79d89f4f6c393c8cc648261366d82adca | [
"Apache-2.0"
] | null | null | null | L1Trigger/L1THGCal/python/hgcalTowerMapProducer_cfi.py | bkilian15/cmssw | ad9b85e79d89f4f6c393c8cc648261366d82adca | [
"Apache-2.0"
] | null | null | null | L1Trigger/L1THGCal/python/hgcalTowerMapProducer_cfi.py | bkilian15/cmssw | ad9b85e79d89f4f6c393c8cc648261366d82adca | [
"Apache-2.0"
] | null | null | null | import FWCore.ParameterSet.Config as cms
import math
L1TTriggerTowerConfig_etaphi = cms.PSet(readMappingFile=cms.bool(False),
minEta=cms.double(1.479),
maxEta=cms.double(3.0),
minPhi=cms.double(-1*ma... | 46.21875 | 85 | 0.478702 |
20dcdfbc43738e8db381d416a52c1e23d9a8fed5 | 1,377 | py | Python | tests/tests_dezero/test_layers.py | daisuke19891023/dl-from-scratch-3 | 4fb9441cfcceca96ac07c602053e608d92c80838 | [
"MIT"
] | null | null | null | tests/tests_dezero/test_layers.py | daisuke19891023/dl-from-scratch-3 | 4fb9441cfcceca96ac07c602053e608d92c80838 | [
"MIT"
] | 2 | 2020-05-30T15:04:54.000Z | 2020-05-30T15:05:20.000Z | tests/tests_dezero/test_layers.py | daisuke19891023/dl-from-scratch-3 | 4fb9441cfcceca96ac07c602053e608d92c80838 | [
"MIT"
] | null | null | null | if '__file__' in globals():
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import numpy as np
import matplotlib.pyplot as plt
from dezero import Variable
from dezero import setup_variable
from dezero.utils import plot_dot_graph
import dezero.funct... | 25.5 | 66 | 0.620189 |
49eb7eda46176ff9623ba0ca9acedcce8076e756 | 6,274 | py | Python | features/steps/inventory_steps.py | devops-inventory/inventory | 9febddf89f16837f83602da290349bdfbcd72cff | [
"Apache-2.0"
] | 1 | 2021-08-12T16:06:07.000Z | 2021-08-12T16:06:07.000Z | features/steps/inventory_steps.py | devops-inventory/inventory | 9febddf89f16837f83602da290349bdfbcd72cff | [
"Apache-2.0"
] | 108 | 2019-02-26T19:52:27.000Z | 2019-05-13T23:37:36.000Z | features/steps/inventory_steps.py | devops-inventory/inventory | 9febddf89f16837f83602da290349bdfbcd72cff | [
"Apache-2.0"
] | 2 | 2019-02-26T19:46:07.000Z | 2021-02-07T21:45:54.000Z | """
Inventory Steps
Steps file for Inventory.feature
"""
from os import getenv
import json
import logging
import requests
from behave import *
from compare import expect, ensure
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import ex... | 38.490798 | 91 | 0.674211 |
a4343b770837d566842a92b6c352bbc51321b2c2 | 1,884 | py | Python | edna2/utils/test/UtilsTest_exec_test.py | gsantoni/edna2 | 0aad63a3ea8091ce62118f0b2c8ac78a2286da9e | [
"CC0-1.0",
"MIT"
] | null | null | null | edna2/utils/test/UtilsTest_exec_test.py | gsantoni/edna2 | 0aad63a3ea8091ce62118f0b2c8ac78a2286da9e | [
"CC0-1.0",
"MIT"
] | 2 | 2020-04-06T10:39:50.000Z | 2021-04-14T19:24:37.000Z | edna2/utils/test/UtilsTest_exec_test.py | gsantoni/edna2 | 0aad63a3ea8091ce62118f0b2c8ac78a2286da9e | [
"CC0-1.0",
"MIT"
] | 5 | 2019-06-14T07:28:38.000Z | 2021-04-28T13:10:39.000Z | #
# Copyright (c) European Synchrotron Radiation Facility (ESRF)
#
# 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,... | 38.44898 | 82 | 0.734607 |
a019d5b25ab8537adb7e05b2c00a3ddf93465d04 | 3,404 | py | Python | airflow/providers/amazon/aws/hooks/sns.py | shashijangra/airflow-1 | c3e340584bf1892c4f73aa9e7495b5823dab0c40 | [
"Apache-2.0"
] | 2 | 2021-07-30T17:25:56.000Z | 2021-08-03T13:51:09.000Z | airflow/providers/amazon/aws/hooks/sns.py | shashijangra/airflow-1 | c3e340584bf1892c4f73aa9e7495b5823dab0c40 | [
"Apache-2.0"
] | null | null | null | airflow/providers/amazon/aws/hooks/sns.py | shashijangra/airflow-1 | c3e340584bf1892c4f73aa9e7495b5823dab0c40 | [
"Apache-2.0"
] | 1 | 2020-11-06T01:26:29.000Z | 2020-11-06T01:26:29.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... | 35.092784 | 107 | 0.655993 |
55b5c9e8f3141c3abf87e080cf9e394503061d13 | 457 | py | Python | main/migrations/0017_auto_20201127_1650.py | zahir1509/project-ap-etravel | 2113a84ae4340be0e8cfa2676f448878c625e3e3 | [
"MIT"
] | 1 | 2020-12-06T17:49:11.000Z | 2020-12-06T17:49:11.000Z | main/migrations/0017_auto_20201127_1650.py | zahir1509/project-ap-etravel | 2113a84ae4340be0e8cfa2676f448878c625e3e3 | [
"MIT"
] | null | null | null | main/migrations/0017_auto_20201127_1650.py | zahir1509/project-ap-etravel | 2113a84ae4340be0e8cfa2676f448878c625e3e3 | [
"MIT"
] | 1 | 2020-12-07T14:20:41.000Z | 2020-12-07T14:20:41.000Z | # Generated by Django 3.1.3 on 2020-11-27 11:20
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('main', '0016_auto_20201127_1650'),
]
operations = [
migrations.AlterField(
model_name='reservation',
... | 22.85 | 100 | 0.623632 |
7b117f708d10b444361261314f52b9dc8c44bad0 | 2,096 | py | Python | app.py | Annamalaisaravanan/Volume-Controller-using-OpenCV | eaed20e16ed4e72ce9a04542795581b7f9045cd0 | [
"MIT"
] | null | null | null | app.py | Annamalaisaravanan/Volume-Controller-using-OpenCV | eaed20e16ed4e72ce9a04542795581b7f9045cd0 | [
"MIT"
] | null | null | null | app.py | Annamalaisaravanan/Volume-Controller-using-OpenCV | eaed20e16ed4e72ce9a04542795581b7f9045cd0 | [
"MIT"
] | null | null | null | import keras
from keras.models import load_model
import cv2
import pyautogui as p # to control the buttons in the keyboard
import numpy as np
import operator
#load the trained model
model=load_model("path/to/the/directory/which/contains/volume_up_new_model.h5")
#initialise the camera
cap=cv2.VideoCapture... | 37.428571 | 137 | 0.616889 |
f838bb938d69cebc8395a221a394fb2886ffa623 | 15,258 | py | Python | beacon_export_plugin/operators/beacon_metric_exporter_operator.py | jgruberf5/beacon-airflow | 8dddb57a966901d47e2c1d443fb6f63dcb0f2f9d | [
"Apache-2.0"
] | null | null | null | beacon_export_plugin/operators/beacon_metric_exporter_operator.py | jgruberf5/beacon-airflow | 8dddb57a966901d47e2c1d443fb6f63dcb0f2f9d | [
"Apache-2.0"
] | 8 | 2020-12-17T21:21:03.000Z | 2022-03-29T22:28:19.000Z | beacon_export_plugin/operators/beacon_metric_exporter_operator.py | jgruberf5/beacon-airflow | 8dddb57a966901d47e2c1d443fb6f63dcb0f2f9d | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# pylint: disable=broad-except
# Copyright (c) 2016-2018, F5 Networks, 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
#
... | 41.349593 | 125 | 0.559772 |
7d5a033bc6cb4cec59e71d660b96d1ead0dee0e0 | 2,086 | py | Python | lhotse/bin/modes/recipes/icsi.py | glynpu/lhotse | 1d7807025575fdaa96cb907c451db0fb0fd23cde | [
"Apache-2.0"
] | 64 | 2020-04-27T14:55:15.000Z | 2020-10-25T06:57:56.000Z | lhotse/bin/modes/recipes/icsi.py | glynpu/lhotse | 1d7807025575fdaa96cb907c451db0fb0fd23cde | [
"Apache-2.0"
] | 85 | 2020-04-26T06:29:47.000Z | 2020-10-19T20:28:52.000Z | lhotse/bin/modes/recipes/icsi.py | glynpu/lhotse | 1d7807025575fdaa96cb907c451db0fb0fd23cde | [
"Apache-2.0"
] | 17 | 2020-06-19T06:26:33.000Z | 2020-10-12T15:19:15.000Z | import click
from lhotse.bin.modes import download, prepare
from lhotse.recipes.icsi import download_icsi, prepare_icsi
from lhotse.utils import Pathlike
__all__ = ["icsi"]
@download.command(context_settings=dict(show_default=True))
@click.argument("audio_dir", type=click.Path())
@click.option(
"--transcripts-d... | 24.541176 | 82 | 0.658198 |
1e72c48b2a7e2cb8bbf46e10ec7bdaab0dddffdd | 2,604 | py | Python | lib/btstack/tool/bluetooth_data_types.py | thiamchi/micropython_custom | b2d3ac286268502029a2215adb710c15f21ccae0 | [
"MIT"
] | 3 | 2021-06-05T01:04:56.000Z | 2021-12-19T18:08:08.000Z | lib/btstack/tool/bluetooth_data_types.py | thiamchi/micropython_custom | b2d3ac286268502029a2215adb710c15f21ccae0 | [
"MIT"
] | 1 | 2021-06-19T19:03:10.000Z | 2021-06-19T19:29:10.000Z | lib/btstack/tool/bluetooth_data_types.py | thiamchi/micropython_custom | b2d3ac286268502029a2215adb710c15f21ccae0 | [
"MIT"
] | 3 | 2021-06-12T12:26:34.000Z | 2022-02-22T11:05:01.000Z | #!/usr/bin/env python
#
# Scrape GAP Data Types from Bluetooth SIG page
# Copyright 2016 BlueKitchen GmbH
#
from lxml import html
import datetime
import re
import requests
import sys
import os
headers = {'user-agent': 'curl/7.63.0'}
program_info = '''
BTstack Data Types Scraper for BTstack
Copyright 2016, BlueKitche... | 27.410526 | 122 | 0.631336 |
7089b6a943c5ffe06e969b8e0cd598262f46aa89 | 1,410 | py | Python | tests/tests_mlflow_turing_scoring_server/base/base_test.py | jose-turintech/mlflow-turing-scoring-server | 2a4ccdc94fa6313f401dad37fd40b232a36dc530 | [
"BSD-3-Clause"
] | null | null | null | tests/tests_mlflow_turing_scoring_server/base/base_test.py | jose-turintech/mlflow-turing-scoring-server | 2a4ccdc94fa6313f401dad37fd40b232a36dc530 | [
"BSD-3-Clause"
] | null | null | null | tests/tests_mlflow_turing_scoring_server/base/base_test.py | jose-turintech/mlflow-turing-scoring-server | 2a4ccdc94fa6313f401dad37fd40b232a36dc530 | [
"BSD-3-Clause"
] | null | null | null | """
This module aims to implement the base class used by all test classes with common methods.
"""
# ────────────────────────────────────────── imports ────────────────────────────────────────── #
import unittest
from pathlib import Path
from tests_mlflow_turing_scoring_server.conftest import data_mgr
# ────────────... | 32.790698 | 97 | 0.411348 |
fb627dbaf26ba4cb7a17ce25f654366db8f3fa37 | 7,420 | py | Python | app/core/models.py | rach4you/secteur-app-api | c32093bc75db0ce84681df6cec5862542132e519 | [
"MIT"
] | null | null | null | app/core/models.py | rach4you/secteur-app-api | c32093bc75db0ce84681df6cec5862542132e519 | [
"MIT"
] | 3 | 2021-03-10T22:56:54.000Z | 2022-02-27T07:00:47.000Z | app/core/models.py | rach4you/secteur-app-api | c32093bc75db0ce84681df6cec5862542132e519 | [
"MIT"
] | null | null | null | import uuid
import os
from django.db import models
from django.contrib.auth.models import AbstractBaseUser, BaseUserManager, \
PermissionsMixin
from django.conf import settings
def user_image_file_path(instance, filename):
"""Generate file path for new user image"""
ext = filename.split('.')[-1]
file... | 30.916667 | 107 | 0.683827 |
43a7a610de8444988ef65873e7e32db5d5ab6a32 | 4,309 | py | Python | tests/test_tutorial/test_path_operation_configurations/test_tutorial005_py310.py | ssensalo/fastapi | 146f57b8f70c5757dc20edc716dba1b96936a8d6 | [
"MIT"
] | 1 | 2021-11-26T15:27:59.000Z | 2021-11-26T15:27:59.000Z | tests/test_tutorial/test_path_operation_configurations/test_tutorial005_py310.py | ssensalo/fastapi | 146f57b8f70c5757dc20edc716dba1b96936a8d6 | [
"MIT"
] | 1 | 2022-01-07T21:04:04.000Z | 2022-01-07T21:04:04.000Z | tests/test_tutorial/test_path_operation_configurations/test_tutorial005_py310.py | ssensalo/fastapi | 146f57b8f70c5757dc20edc716dba1b96936a8d6 | [
"MIT"
] | null | null | null | import pytest
from fastapi.testclient import TestClient
from ...utils import needs_py310
openapi_schema = {
"openapi": "3.0.2",
"info": {"title": "FastAPI", "version": "0.1.0"},
"paths": {
"/items/": {
"post": {
"responses": {
"200": {
... | 35.319672 | 293 | 0.387561 |
1155e10055a31211a92d353787e5a681d5aaa47f | 4,138 | py | Python | dubbo_client/rpclib.py | wuwen5/dubbo-python | d86ad6acd30592c2389c6aba4360e0b61b8396dc | [
"Apache-2.0"
] | 1 | 2020-12-21T06:58:10.000Z | 2020-12-21T06:58:10.000Z | dubbo_client/rpclib.py | wuwen5/dubbo-python | d86ad6acd30592c2389c6aba4360e0b61b8396dc | [
"Apache-2.0"
] | null | null | null | dubbo_client/rpclib.py | wuwen5/dubbo-python | d86ad6acd30592c2389c6aba4360e0b61b8396dc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
"""
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"); yo... | 36.946429 | 108 | 0.656839 |
8dbbe1eba0b6d757452a8466f8e9d111c35011d2 | 384 | py | Python | code/List/symmetric_difference.py | jumploop/30-seconds-of-python | bfcc5a35d9bd0bba67e81de5715dba21e1ba43be | [
"CC0-1.0"
] | null | null | null | code/List/symmetric_difference.py | jumploop/30-seconds-of-python | bfcc5a35d9bd0bba67e81de5715dba21e1ba43be | [
"CC0-1.0"
] | null | null | null | code/List/symmetric_difference.py | jumploop/30-seconds-of-python | bfcc5a35d9bd0bba67e81de5715dba21e1ba43be | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
功能实现:返回两个可迭代对象之间的对称差,而不会过滤出重复的值。
解读:
从每个列表创建一个集合。
对它们中的每一个都使用列表推导式,以只保留先前创建的另一个集合中不包含的值。
"""
def symmetric_difference(a, b):
(_a, _b) = (set(a), set(b))
return [item for item in a if item not in _b] + [item for item in b if item not in _a]
# Examples
print... | 17.454545 | 90 | 0.643229 |
d03c10542c895a34900c7151f2abb769ff1e90fd | 340 | py | Python | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_projects/migrations/0011_remove_project_screenshot.py | michellechena/azure-intelligent-edge-patterns | b1260b962b208880532391e7ef2148d240f489f8 | [
"MIT"
] | null | null | null | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_projects/migrations/0011_remove_project_screenshot.py | michellechena/azure-intelligent-edge-patterns | b1260b962b208880532391e7ef2148d240f489f8 | [
"MIT"
] | null | null | null | factory-ai-vision/EdgeSolution/modules/WebModule/backend/vision_on_edge/azure_projects/migrations/0011_remove_project_screenshot.py | michellechena/azure-intelligent-edge-patterns | b1260b962b208880532391e7ef2148d240f489f8 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.8 on 2021-08-26 05:38
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('azure_projects', '0010_auto_20210825_1021'),
]
operations = [
migrations.RemoveField(
model_name='project',
name='screenshot... | 18.888889 | 54 | 0.605882 |
cb72007062a87f18172db9b811bdf63a789162a4 | 7,249 | py | Python | EvoOpt/solvers/SimulatedAnnealing.py | tsyet12/EvoOpt | 2e70f29ee58217a667430571ac81bae7112e9336 | [
"BSD-2-Clause"
] | 9 | 2019-09-27T19:14:05.000Z | 2022-03-13T00:42:34.000Z | EvoOpt/solvers/SimulatedAnnealing.py | tsyet12/Moptimum | 2e70f29ee58217a667430571ac81bae7112e9336 | [
"BSD-2-Clause"
] | 4 | 2019-05-31T14:32:02.000Z | 2021-02-09T20:30:27.000Z | EvoOpt/solvers/SimulatedAnnealing.py | tsyet12/Moptimum | 2e70f29ee58217a667430571ac81bae7112e9336 | [
"BSD-2-Clause"
] | 1 | 2019-11-15T18:37:55.000Z | 2019-11-15T18:37:55.000Z | '''Simulated Annealing
###
###Code and Implementation by Sin Yong, Teng
###
###
###Implemented on 08/06/2019
'''
import numpy as np
import matplotlib.pyplot as mp
class SimulatedAnnealing():
def __init__(self,f,x,lb,ub,pop=200,max_gen=50,nsize=1,normal_neighbour=True,verbose=True):
self.f=np.vectorize(f)... | 42.391813 | 230 | 0.637053 |
0d011f719b84fa9bc4601f444ee192014249614a | 1,674 | py | Python | problems/lt126.py | jaxonwang/my_leetcode | f55c664050a27f583abeb534564b5c3af48f6192 | [
"MIT"
] | null | null | null | problems/lt126.py | jaxonwang/my_leetcode | f55c664050a27f583abeb534564b5c3af48f6192 | [
"MIT"
] | null | null | null | problems/lt126.py | jaxonwang/my_leetcode | f55c664050a27f583abeb534564b5c3af48f6192 | [
"MIT"
] | null | null | null | import queue
import itertools
class Solution(object):
def findLadders(self, beginWord, endWord, wordList):
"""
:type beginWord: str
:type endWord: str
:type wordList: List[str]
:rtype: List[List[str]]
"""
parent = {}
def append_to_parent(p, child):
... | 29.368421 | 81 | 0.457587 |
4583eb29e8a8f729683cd5c35166547bea5e6b84 | 17,833 | py | Python | src/datasets/inspect.py | KhalidAlt/datasets | f013aff823b831fb48b458a7bbb3bb11c2981326 | [
"Apache-2.0"
] | null | null | null | src/datasets/inspect.py | KhalidAlt/datasets | f013aff823b831fb48b458a7bbb3bb11c2981326 | [
"Apache-2.0"
] | null | null | null | src/datasets/inspect.py | KhalidAlt/datasets | f013aff823b831fb48b458a7bbb3bb11c2981326 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The HuggingFace Datasets 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 ... | 53.392216 | 174 | 0.690462 |
81c7485c9edd7b1b93dea57337ced0bf6a369949 | 3,240 | py | Python | delta/data/frontend/plp.py | didichuxing/delta | 31dfebc8f20b7cb282b62f291ff25a87e403cc86 | [
"Apache-2.0"
] | 1,442 | 2019-07-09T07:34:28.000Z | 2020-11-15T09:52:09.000Z | delta/data/frontend/plp.py | didichuxing/delta | 31dfebc8f20b7cb282b62f291ff25a87e403cc86 | [
"Apache-2.0"
] | 93 | 2019-07-22T09:20:20.000Z | 2020-11-13T01:59:30.000Z | delta/data/frontend/plp.py | didichuxing/delta | 31dfebc8f20b7cb282b62f291ff25a87e403cc86 | [
"Apache-2.0"
] | 296 | 2019-07-09T07:35:28.000Z | 2020-11-16T02:27:51.000Z | # Copyright (C) 2017 Beijing Didi Infinity Technology and Development Co.,Ltd.
# 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/LI... | 35.217391 | 94 | 0.658951 |
830f69e4218387da7b75c53eae46f376e920f7de | 67,437 | py | Python | wikum-env3/lib/python3.7/site-packages/praw/models/reddit/widgets.py | xuericlin/wikum | f0171f1697efa91d6957f976f473c9201db85648 | [
"MIT"
] | 1 | 2019-12-24T07:49:18.000Z | 2019-12-24T07:49:18.000Z | praw/models/reddit/widgets.py | TebelloX/praw | ffefec2b514d2d4df1bb3090a0a6e3f1c43c8085 | [
"BSD-2-Clause"
] | 1 | 2019-11-04T16:26:26.000Z | 2019-11-06T12:09:24.000Z | praw/models/reddit/widgets.py | TebelloX/praw | ffefec2b514d2d4df1bb3090a0a6e3f1c43c8085 | [
"BSD-2-Clause"
] | null | null | null | """Provide classes related to widgets."""
import os.path
from json import dumps, JSONEncoder
from ...const import API_PATH
from ...util.cache import cachedproperty
from ..base import PRAWBase
from ..list.base import BaseList
class Button(PRAWBase):
"""Class to represent a single button inside a :class:`.ButtonW... | 37.444198 | 79 | 0.52225 |
8346d2286e247ca62de75f4e92657dc7efd58851 | 1,990 | py | Python | var/spack/repos/builtin/packages/pkgconf/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/pkgconf/package.py | robertsawko/spack | 135cf4835f5b646c4aaa0e2eb5552c80fc3a5ce8 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/pkgconf/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 Pkgconf(AutotoolsPackage):
"""pkgconf is a program which helps to configure compiler and l... | 47.380952 | 96 | 0.749749 |
12cdc56d417303eefb74628de55631746cab8289 | 5,558 | py | Python | contrib/seeds/makeseeds.py | L00119483/TechSquad.io | 3ebafca95c5b125f3dbe52d9d4cde29c61a48975 | [
"MIT"
] | 4 | 2018-06-16T20:08:19.000Z | 2018-08-22T15:44:58.000Z | contrib/seeds/makeseeds.py | L00119483/TechSquad.io | 3ebafca95c5b125f3dbe52d9d4cde29c61a48975 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | L00119483/TechSquad.io | 3ebafca95c5b125f3dbe52d9d4cde29c61a48975 | [
"MIT"
] | 7 | 2018-06-06T18:51:07.000Z | 2018-09-08T15:17:04.000Z | #!/usr/bin/env python3
# Copyright (c) 2013-2018 The Bitcoin Core developers
# Copyright (c) 2018 The Wagerr developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
NSEEDS=512
... | 32.127168 | 186 | 0.56855 |
3505090dc6828f9ad3d779efed94c093bdd8366b | 1,943 | py | Python | MA333/Project1/logistic_regression.py | iydon/homework | 253d4746528ef62d33eba1de0b90dcb17ec587ed | [
"MIT"
] | 8 | 2019-10-20T08:18:54.000Z | 2021-07-11T12:14:56.000Z | MA333/Project1/logistic_regression.py | AllenYZB/homework | 65bd3372df197bec5e152a37cdc1f6f5432b7f3e | [
"MIT"
] | 2 | 2022-01-13T03:04:10.000Z | 2022-03-12T00:49:10.000Z | MA333/Project1/logistic_regression.py | AllenYZB/homework | 65bd3372df197bec5e152a37cdc1f6f5432b7f3e | [
"MIT"
] | 2 | 2019-11-02T05:46:01.000Z | 2020-03-12T23:11:28.000Z | import numpy as np
from numpy import array, diag, divide, exp, matrix, power, zeros
from numpy.linalg import inv, norm
class logistic_regression_IRLS(object):
"""
Maximum likelihood approach for logistic regression.
"""
def __init__(self):
self.w = None
def fit(self, X, y, w0=None, erf=N... | 25.233766 | 69 | 0.523932 |
f11f5b0501de5378da84aa992367d19cb64313f5 | 1,786 | py | Python | backend/server.py | SeonminKim1/tomato-disease-detector | 265f8266880f7cbda4ac601552bb14d6acee9357 | [
"MIT"
] | 4 | 2021-04-18T06:26:50.000Z | 2022-03-18T08:12:43.000Z | backend/server.py | SeonminKim1/tomato-disease-detector | 265f8266880f7cbda4ac601552bb14d6acee9357 | [
"MIT"
] | null | null | null | backend/server.py | SeonminKim1/tomato-disease-detector | 265f8266880f7cbda4ac601552bb14d6acee9357 | [
"MIT"
] | 2 | 2021-04-17T14:10:37.000Z | 2021-11-02T13:51:03.000Z | from fastapi import FastAPI, File, BackgroundTasks
from fastapi.logger import logger
from fastapi.responses import Response
import cv2
import asyncio
from detection import get_model as get_det_model
import io
import numpy as np
from PIL import Image
detector_model = get_det_model("./weights/yolov5s_tomato_7classes... | 28.349206 | 81 | 0.727324 |
f25a26e0c93d2806a4db8913632e3ebd6c2b0959 | 1,627 | py | Python | tests/resources/mlflow-test-plugin/setup.py | rbrown-kayak/mlflow | f3af81f229b9dc4ec6f97eb4996d260df20db824 | [
"Apache-2.0"
] | 2 | 2020-09-15T14:19:27.000Z | 2021-05-21T09:59:02.000Z | tests/resources/mlflow-test-plugin/setup.py | rbrown-kayak/mlflow | f3af81f229b9dc4ec6f97eb4996d260df20db824 | [
"Apache-2.0"
] | 36 | 2019-04-11T21:45:45.000Z | 2022-03-11T05:05:16.000Z | tests/resources/mlflow-test-plugin/setup.py | rbrown-kayak/mlflow | f3af81f229b9dc4ec6f97eb4996d260df20db824 | [
"Apache-2.0"
] | 2 | 2020-06-28T01:39:36.000Z | 2022-01-06T17:26:50.000Z | from setuptools import setup, find_packages
setup(
name="mlflow-test-plugin",
version="0.0.1",
description="Test plugin for MLflow",
packages=find_packages(),
# Require MLflow as a dependency of the plugin, so that plugin users can simply install
# the plugin & then immediately use it with MLf... | 58.107143 | 127 | 0.742471 |
508d112499ac12ac87ba4cf9124683ffecfdeb6d | 5,624 | py | Python | SSnet_in_Action/grad.py | ekraka/SSnet | 6a28140b2e54e5415553609a612fcae92f9103f0 | [
"MIT"
] | 20 | 2020-01-23T07:29:27.000Z | 2022-03-22T12:38:33.000Z | SSnet_in_Action/grad.py | ekraka/SSnet | 6a28140b2e54e5415553609a612fcae92f9103f0 | [
"MIT"
] | 3 | 2020-05-19T18:43:19.000Z | 2021-07-30T16:13:48.000Z | SSnet_in_Action/grad.py | ekraka/SSnet | 6a28140b2e54e5415553609a612fcae92f9103f0 | [
"MIT"
] | 5 | 2020-02-07T18:55:23.000Z | 2021-07-15T01:43:47.000Z | from math import log10, floor
from keras.models import Sequential,Model
import tensorflow as tf
from keras.layers import Dense, Activation, Input,RepeatVector,Embedding, Flatten, Concatenate,Dropout
from keras.models import Model
from keras.utils.vis_utils import model_to_dot
#from sklearn import metrics as mt
from ker... | 32.137143 | 124 | 0.592639 |
04724626f79b5b1e346ff9ddccc8a621d0ea122c | 14,575 | py | Python | platonpm/package.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | platonpm/package.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | platonpm/package.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | import json
from pathlib import (
Path,
)
from typing import (
TYPE_CHECKING,
Any,
Dict,
Generator,
Iterable,
List,
Optional,
Tuple,
Type,
Union,
cast,
)
from platon_typing import (
URI,
Address,
ContractName,
Manifest,
)
from platon_utils import (
to... | 33.276256 | 103 | 0.623877 |
f7695f0d187810f59681c2b0fd80cfab8515725c | 27,825 | py | Python | objectpath/core/interpreter.py | SREnity/ObjectPath | 25958956ef482009be911a8b0a8e679b9f636fc9 | [
"MIT"
] | 327 | 2015-01-02T13:20:39.000Z | 2022-03-28T11:30:25.000Z | objectpath/core/interpreter.py | SREnity/ObjectPath | 25958956ef482009be911a8b0a8e679b9f636fc9 | [
"MIT"
] | 71 | 2015-02-03T08:22:58.000Z | 2021-06-20T07:01:51.000Z | objectpath/core/interpreter.py | SREnity/ObjectPath | 25958956ef482009be911a8b0a8e679b9f636fc9 | [
"MIT"
] | 89 | 2015-02-10T01:02:42.000Z | 2021-08-09T07:17:33.000Z | #!/usr/bin/env python
# This file is part of ObjectPath released under MIT license.
# Copyright (C) 2010-2014 Adrian Kalbarczyk
import sys, re
from .parser import parse
from objectpath.core import *
import objectpath.utils.colorify as color # pylint: disable=W0614
from objectpath.utils import flatten, filter_dict, t... | 36.372549 | 140 | 0.503073 |
dcf9f076dc99b145d0b8b275cd0619e22249f8ad | 1,398 | py | Python | release/stubs.min/System/Windows/Forms/__init___parts/ListViewHitTestLocations.py | tranconbv/ironpython-stubs | a601759e6c6819beff8e6b639d18a24b7e351851 | [
"MIT"
] | null | null | null | release/stubs.min/System/Windows/Forms/__init___parts/ListViewHitTestLocations.py | tranconbv/ironpython-stubs | a601759e6c6819beff8e6b639d18a24b7e351851 | [
"MIT"
] | null | null | null | release/stubs.min/System/Windows/Forms/__init___parts/ListViewHitTestLocations.py | tranconbv/ironpython-stubs | a601759e6c6819beff8e6b639d18a24b7e351851 | [
"MIT"
] | null | null | null | class ListViewHitTestLocations(Enum,IComparable,IFormattable,IConvertible):
"""
Defines constants that represent areas in a System.Windows.Forms.ListView or System.Windows.Forms.ListViewItem.
enum (flags) ListViewHitTestLocations,values: AboveClientArea (256),BelowClientArea (16),Image (2),Label (4),LeftOfCl... | 31.772727 | 215 | 0.703147 |
8a60b898faad0732a55747e9b8bdbfb388882ddc | 8,528 | py | Python | data_loader.py | wanghaiyangMIT/rhythm-detection | dc6f8522d9bd404b3447f5e1724b9474385bb38c | [
"CC-BY-4.0"
] | 2 | 2019-05-21T14:10:18.000Z | 2021-11-06T18:59:08.000Z | data_loader.py | wanghaiyangMIT/rhythm-detection-opticalflowpure | dc6f8522d9bd404b3447f5e1724b9474385bb38c | [
"CC-BY-4.0"
] | null | null | null | data_loader.py | wanghaiyangMIT/rhythm-detection-opticalflowpure | dc6f8522d9bd404b3447f5e1724b9474385bb38c | [
"CC-BY-4.0"
] | null | null | null | import os
import json
import sys
import cv2
import time
import pickle
import argparse
import random
from tqdm import tqdm
import numpy as np
import torch
from torch.autograd import Variable
import torch.utils.data as data
import torchvision.transforms as transforms
from utils import DataError,letterbox_image224,prep_im... | 41.198068 | 109 | 0.517824 |
2a356b9daa3542de031ed14a8bd2b7034fa134d8 | 1,688 | py | Python | chat/Message.py | oinqu/network-protocol-design-course | 3f190c1a5423a472e98af94e00da08a7c4718028 | [
"MIT"
] | null | null | null | chat/Message.py | oinqu/network-protocol-design-course | 3f190c1a5423a472e98af94e00da08a7c4718028 | [
"MIT"
] | null | null | null | chat/Message.py | oinqu/network-protocol-design-course | 3f190c1a5423a472e98af94e00da08a7c4718028 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
class Message:
"""
Message object.
Author: Stanislav Grebennik
This class represents an incoming or outgoing message. Each message is stored in memory
as a separate object.
Main purpose of this class is to be a cache for message segments. The cache can be used in case... | 32.461538 | 99 | 0.627962 |
2c9bd4aa5bf888a508fefdac3543c948823734b8 | 2,914 | py | Python | learning_logs/views.py | lincoco/learning_log | 980c4ae41cd4e34d3208057a77e7d232c389dec3 | [
"MIT"
] | 1 | 2019-06-03T03:41:26.000Z | 2019-06-03T03:41:26.000Z | learning_logs/views.py | lincoco/learning_log | 980c4ae41cd4e34d3208057a77e7d232c389dec3 | [
"MIT"
] | null | null | null | learning_logs/views.py | lincoco/learning_log | 980c4ae41cd4e34d3208057a77e7d232c389dec3 | [
"MIT"
] | null | null | null | from django.shortcuts import render, HttpResponse
from .models import Topic, Entry
from django.http import HttpResponseRedirect, Http404
from django.urls import reverse
from .forms import TopicForm, EntryForm
from django.contrib.auth.decorators import login_required
# Create your views here.
# print(Topic.objects.ge... | 33.113636 | 76 | 0.639671 |
8d448c062862147b9a18fa904b33463cd1c65391 | 193 | py | Python | python-HR/practice/pracOne.py | pouyapanahandeh/python3-ref | b8865ebb6da8065754a4df341cedfccdf3b3d2c5 | [
"MIT"
] | null | null | null | python-HR/practice/pracOne.py | pouyapanahandeh/python3-ref | b8865ebb6da8065754a4df341cedfccdf3b3d2c5 | [
"MIT"
] | null | null | null | python-HR/practice/pracOne.py | pouyapanahandeh/python3-ref | b8865ebb6da8065754a4df341cedfccdf3b3d2c5 | [
"MIT"
] | null | null | null | # write program to remove the duplicates in a list.
numbers = [2,4,6,2,4,5,7,6,7,8,9,8,9]
uniques = []
for index in numbers:
if index not in uniques:
uniques.append(index)
print(uniques) | 21.444444 | 51 | 0.689119 |
08f7f32298a1481af6c836b7af8def45f7956c94 | 6,768 | py | Python | dac/gail.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-13T21:48:52.000Z | 2022-03-13T21:48:52.000Z | dac/gail.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | null | null | null | dac/gail.py | shaun95/google-research | d41bbaca1eb9bfd980ec2b3fd201c3ddb4d1f2e5 | [
"Apache-2.0"
] | 1 | 2022-03-30T07:20:29.000Z | 2022-03-30T07:20:29.000Z | # coding=utf-8
# Copyright 2022 The Google Research 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 applicab... | 35.621053 | 115 | 0.701684 |
d6f31e0dff86b81e78b998ab299e55cde979f69f | 5,503 | py | Python | launch/all.launch.py | Valts-M/ros2_com | 647bfb815595309ef469cbf81a1f7f1b9bb1fc3c | [
"Apache-2.0"
] | null | null | null | launch/all.launch.py | Valts-M/ros2_com | 647bfb815595309ef469cbf81a1f7f1b9bb1fc3c | [
"Apache-2.0"
] | null | null | null | launch/all.launch.py | Valts-M/ros2_com | 647bfb815595309ef469cbf81a1f7f1b9bb1fc3c | [
"Apache-2.0"
] | null | null | null | import launch
from launch.substitutions import Command, LaunchConfiguration
from launch_ros.actions import LifecycleNode
from launch.actions import EmitEvent
from launch.actions import RegisterEventHandler
from launch_ros.events.lifecycle import ChangeState
from launch_ros.events.lifecycle import matches_node_name
from... | 37.182432 | 130 | 0.631837 |
43b15c0118531b7cfffb8cd7efd0ed832365da63 | 233 | py | Python | clash/shortest/short-clash11.py | a93-git/codingame-solutions | 25df0f7824844646ceb0b6128274ff92f1084c8c | [
"MIT"
] | null | null | null | clash/shortest/short-clash11.py | a93-git/codingame-solutions | 25df0f7824844646ceb0b6128274ff92f1084c8c | [
"MIT"
] | null | null | null | clash/shortest/short-clash11.py | a93-git/codingame-solutions | 25df0f7824844646ceb0b6128274ff92f1084c8c | [
"MIT"
] | null | null | null | """ Find the difference between sum of digits at odd and even pos"""
s=str
n,r,l,i,w = s(input()),range,len,int,sum
o = r(0, l(s(n)), 2)
e = r(1, l(s(n)), 2)
p = w([i(s(n)[x]) for x in o])
q = w([i(s(n)[x]) for x in e])
print(p - q) | 25.888889 | 68 | 0.540773 |
84a8ea727281d4b20222a47c47ec09c2b58a0705 | 881 | py | Python | setup.py | GlenRice-NOAA/Sounding-Selection | 165d3d3922cef4e216188bbb40b498e32dac9509 | [
"CC0-1.0"
] | null | null | null | setup.py | GlenRice-NOAA/Sounding-Selection | 165d3d3922cef4e216188bbb40b498e32dac9509 | [
"CC0-1.0"
] | null | null | null | setup.py | GlenRice-NOAA/Sounding-Selection | 165d3d3922cef4e216188bbb40b498e32dac9509 | [
"CC0-1.0"
] | 1 | 2022-01-20T13:07:54.000Z | 2022-01-20T13:07:54.000Z | from setuptools import setup
import pathlib
cwd = pathlib.Path(__file__).parent.resolve()
long_description = (cwd / 'README.md').read_text(encoding='utf-8')
setup(name='sounding_selection',
version='1.0.0',
description='Label-Based Method for Hydrographic Sounding Selection',
license='MIT',... | 36.708333 | 76 | 0.61294 |
2b6f5c99e3594baf1e7a6c1589e09ea3643e074c | 133 | py | Python | src/__init__.py | ardieb/TrumpTweetClassifier | 6b0af5b1e7d213fe1acdc401c088be20e3225f5b | [
"MIT"
] | null | null | null | src/__init__.py | ardieb/TrumpTweetClassifier | 6b0af5b1e7d213fe1acdc401c088be20e3225f5b | [
"MIT"
] | null | null | null | src/__init__.py | ardieb/TrumpTweetClassifier | 6b0af5b1e7d213fe1acdc401c088be20e3225f5b | [
"MIT"
] | null | null | null | __title__ = 'tweetokenize'
__version__ = '1.0'
__author__ = 'Arthur Burke'
__license__ = 'MIT'
from src.Vectorize import Vectorize
| 16.625 | 35 | 0.75188 |
5a30c6595f4ffad13978b40e08ce26f45bc21f38 | 2,384 | py | Python | billing/integration.py | litchfield/merchant | e4fba8a88a326bbde39c26e937c17d5283817320 | [
"BSD-3-Clause"
] | null | null | null | billing/integration.py | litchfield/merchant | e4fba8a88a326bbde39c26e937c17d5283817320 | [
"BSD-3-Clause"
] | null | null | null | billing/integration.py | litchfield/merchant | e4fba8a88a326bbde39c26e937c17d5283817320 | [
"BSD-3-Clause"
] | 1 | 2021-09-19T03:08:42.000Z | 2021-09-19T03:08:42.000Z | from django.utils.importlib import import_module
from django.conf import settings
from django.conf.urls import patterns
class IntegrationModuleNotFound(Exception):
pass
class IntegrationNotConfigured(Exception):
pass
integration_cache = {}
class Integration(object):
"""Base Integration class that nee... | 29.8 | 114 | 0.665268 |
c716b170d08626ab5def7089005d9642aafac4c1 | 43,515 | py | Python | bloop/models.py | monoflo/bloop | c476298e5a40decf9fdf2ed50df74be8f91fdffd | [
"MIT"
] | null | null | null | bloop/models.py | monoflo/bloop | c476298e5a40decf9fdf2ed50df74be8f91fdffd | [
"MIT"
] | null | null | null | bloop/models.py | monoflo/bloop | c476298e5a40decf9fdf2ed50df74be8f91fdffd | [
"MIT"
] | null | null | null | import collections
import collections.abc
import inspect
import logging
from copy import copy as copyfn
from typing import Callable, Dict, Optional, Set
from . import util
from .conditions import ComparisonMixin
from .exceptions import InvalidModel, InvalidStream
from .signals import model_created, object_modified
fro... | 38.305458 | 118 | 0.634862 |
bff5f945a6f407e41da9b8e3d824685f935054e4 | 10,019 | py | Python | tests/test_params.py | pguermo/pytest-ansible | c2891a80ce570e66fec43082e66eb99cae15fd18 | [
"MIT"
] | null | null | null | tests/test_params.py | pguermo/pytest-ansible | c2891a80ce570e66fec43082e66eb99cae15fd18 | [
"MIT"
] | null | null | null | tests/test_params.py | pguermo/pytest-ansible | c2891a80ce570e66fec43082e66eb99cae15fd18 | [
"MIT"
] | null | null | null | import sys
import pytest
import ansible
from pkg_resources import parse_version
from pytest_ansible.has_version import has_ansible_v28
try:
import mock
except ImportError:
from unittest import mock
import re
try:
from _pytest.main import EXIT_OK, EXIT_TESTSFAILED, EXIT_USAGEERROR, EXIT_NOTESTSCOLLECTED, EXI... | 33.285714 | 122 | 0.664438 |
70ab2496035418b23f375f145fe639eda4dad474 | 242 | py | Python | tests/basics/builtin_dir.py | peterson79/pycom-micropython-sigfox | 3f93fc2c02567c96f18cff4af9125db8fd7a6fb4 | [
"MIT"
] | 37 | 2017-12-07T15:49:29.000Z | 2022-03-16T16:01:38.000Z | tests/basics/builtin_dir.py | peterson79/pycom-micropython-sigfox | 3f93fc2c02567c96f18cff4af9125db8fd7a6fb4 | [
"MIT"
] | 27 | 2015-01-02T16:17:37.000Z | 2015-09-07T19:21:26.000Z | tests/basics/builtin_dir.py | peterson79/pycom-micropython-sigfox | 3f93fc2c02567c96f18cff4af9125db8fd7a6fb4 | [
"MIT"
] | 22 | 2016-08-01T01:35:30.000Z | 2022-03-22T18:12:23.000Z | # test builtin dir
# dir of locals
print('__name__' in dir())
# dir of module
import sys
print('platform' in dir(sys))
class Foo:
def __init__(self):
self.x = 1
foo = Foo()
print('__init__' in dir(foo))
print('x' in dir(foo))
| 14.235294 | 29 | 0.636364 |
b2f999b623a86006a08f423c147dd79910d4aa2b | 19,350 | py | Python | seisflows/solver/base.py | weiliu620/seisflows | 42a576ceda8c3ac5d38cedfacd7d4bde98d471d8 | [
"BSD-2-Clause"
] | null | null | null | seisflows/solver/base.py | weiliu620/seisflows | 42a576ceda8c3ac5d38cedfacd7d4bde98d471d8 | [
"BSD-2-Clause"
] | null | null | null | seisflows/solver/base.py | weiliu620/seisflows | 42a576ceda8c3ac5d38cedfacd7d4bde98d471d8 | [
"BSD-2-Clause"
] | 1 | 2020-08-26T16:40:03.000Z | 2020-08-26T16:40:03.000Z |
import subprocess
import sys
import numpy as np
from functools import partial
from glob import glob
from importlib import import_module
from os.path import basename, join
from seisflows.config import ParameterError, custom_import
from seisflows.plugins import solver_io
from seisflows.tools import msg, unix
from seisf... | 31.009615 | 82 | 0.592817 |
294fdf81f9660203101cfa47ffab35f792573e61 | 653 | py | Python | project/urls.py | yrkv/remote-robot-server | ff308acb79883b76c832420a045f5036b9605cab | [
"CC0-1.0"
] | null | null | null | project/urls.py | yrkv/remote-robot-server | ff308acb79883b76c832420a045f5036b9605cab | [
"CC0-1.0"
] | null | null | null | project/urls.py | yrkv/remote-robot-server | ff308acb79883b76c832420a045f5036b9605cab | [
"CC0-1.0"
] | null | null | null | from django.conf import settings
from django.conf.urls import include, url
from django.contrib import admin
from welcome.views import index, health
from welcome.robot_control import get_state, set_state
urlpatterns = [
# Examples:
# url(r'^$', 'project.views.home', name='home'),
# url(r'^blog/', include('... | 25.115385 | 57 | 0.661562 |
ae074b729161a8a016438e6cda4b4b4c4c15281c | 6,045 | py | Python | tapestry/gallery.py | msgre/tapestry | 42ac142a8134593a3810fe4cf9bc770f323606d2 | [
"Apache-1.1"
] | null | null | null | tapestry/gallery.py | msgre/tapestry | 42ac142a8134593a3810fe4cf9bc770f323606d2 | [
"Apache-1.1"
] | null | null | null | tapestry/gallery.py | msgre/tapestry | 42ac142a8134593a3810fe4cf9bc770f323606d2 | [
"Apache-1.1"
] | null | null | null | import math
import os
import pygame
import pygame.locals
import re
import time
from .config import GalleryConfig, TitlesConfig
from .detective import get_entries, check_file
from .states import get_state, STATE_ACTION, STATE_BACK, STATE_MISSING_SOURCE, STATE_NEXT, STATE_PREV, STATE_QUIT
from .view import View
class ... | 34.346591 | 115 | 0.586435 |
744f1364b7f198691fe6af115e14cd8d0d24cb74 | 144,532 | py | Python | lib/isl/interface/isl.py | ShreyasKhandekar/IEGenLib | 93bce46a3fe0b829c3cb957746a53b7cfc4373b5 | [
"BSD-2-Clause"
] | 5 | 2019-05-20T03:35:41.000Z | 2021-09-16T22:22:13.000Z | lib/isl/interface/isl.py | ShreyasKhandekar/IEGenLib | 93bce46a3fe0b829c3cb957746a53b7cfc4373b5 | [
"BSD-2-Clause"
] | 160 | 2021-01-05T18:34:10.000Z | 2022-03-03T01:27:49.000Z | lib/isl/interface/isl.py | ShreyasKhandekar/IEGenLib | 93bce46a3fe0b829c3cb957746a53b7cfc4373b5 | [
"BSD-2-Clause"
] | 10 | 2015-11-04T17:45:04.000Z | 2022-01-15T08:43:18.000Z | from ctypes import *
isl = cdll.LoadLibrary("libisl.so")
libc = cdll.LoadLibrary("libc.so.6")
class Error(Exception):
pass
class Context:
defaultInstance = None
def __init__(self):
ptr = isl.isl_ctx_alloc()
self.ptr = ptr
def __del__(self):
isl.isl_ctx_free(self)
def fr... | 36.851606 | 158 | 0.622139 |
2fa9b118e1045c8d2fc982de1e7200257ff83a6d | 64 | py | Python | retina/model/anchors/registry.py | mike112223/retina | cdad3af8240471619f42e9edd1caf68a0241bea6 | [
"Apache-2.0"
] | null | null | null | retina/model/anchors/registry.py | mike112223/retina | cdad3af8240471619f42e9edd1caf68a0241bea6 | [
"Apache-2.0"
] | null | null | null | retina/model/anchors/registry.py | mike112223/retina | cdad3af8240471619f42e9edd1caf68a0241bea6 | [
"Apache-2.0"
] | null | null | null | from retina.utils import Registry
ANCHORS = Registry('anchor')
| 16 | 33 | 0.78125 |
bd1016cc112fad9959012aa016b2de2358b8b4f3 | 62 | py | Python | packages/pytea/pylib/torch/nn/__init__.py | lego0901/pytea | 8ede650def2e68f4610ba816451d8b9e28f09f76 | [
"MIT"
] | null | null | null | packages/pytea/pylib/torch/nn/__init__.py | lego0901/pytea | 8ede650def2e68f4610ba816451d8b9e28f09f76 | [
"MIT"
] | null | null | null | packages/pytea/pylib/torch/nn/__init__.py | lego0901/pytea | 8ede650def2e68f4610ba816451d8b9e28f09f76 | [
"MIT"
] | null | null | null | from .modules import *
from . import functional as functional
| 20.666667 | 38 | 0.790323 |
dabee702aa5d24282ce7625b6101221d7e53604a | 617 | py | Python | apps/sucursales/migrations/0001_initial.py | Kingarturs/mercedez-crm | 882c0bb4c011a41e82c203ebd1e0b36dc075dfd7 | [
"Apache-2.0"
] | null | null | null | apps/sucursales/migrations/0001_initial.py | Kingarturs/mercedez-crm | 882c0bb4c011a41e82c203ebd1e0b36dc075dfd7 | [
"Apache-2.0"
] | null | null | null | apps/sucursales/migrations/0001_initial.py | Kingarturs/mercedez-crm | 882c0bb4c011a41e82c203ebd1e0b36dc075dfd7 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.7 on 2021-05-04 04:32
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Sucursal',
fields=[
('id', models.AutoField... | 25.708333 | 114 | 0.573744 |
5a8006462c89f1d2fe5ec2c8c7438e38fa9fbbc5 | 3,397 | py | Python | satflow/baseline/optical_flow.py | j0shmillar/satflow | a0ebe53565845da5b3eac51713f32eede70b42ba | [
"MIT"
] | null | null | null | satflow/baseline/optical_flow.py | j0shmillar/satflow | a0ebe53565845da5b3eac51713f32eede70b42ba | [
"MIT"
] | null | null | null | satflow/baseline/optical_flow.py | j0shmillar/satflow | a0ebe53565845da5b3eac51713f32eede70b42ba | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import torch.nn.functional as F
import webdataset as wds
import yaml
from satflow.data.datasets import OpticalFlowDataset, SatFlowDataset
def load_config(config_file):
with open(config_file, "r") as cfg:
return yaml.load(cfg, Loader=yaml.FullLoader)["config"]
config = load... | 37.32967 | 128 | 0.648808 |
8417b3d8d2a7109b51c7fc502106fc2cfb6af430 | 142 | py | Python | sudoku/main.py | Lancea12/sudoku_solver | 160fbd0f12c3ee52c31ef07249a6811000e03843 | [
"MIT"
] | null | null | null | sudoku/main.py | Lancea12/sudoku_solver | 160fbd0f12c3ee52c31ef07249a6811000e03843 | [
"MIT"
] | null | null | null | sudoku/main.py | Lancea12/sudoku_solver | 160fbd0f12c3ee52c31ef07249a6811000e03843 | [
"MIT"
] | null | null | null | from flask import Flask
from flask import render_template
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
db = SQLAlchemy(app)
| 20.285714 | 39 | 0.823944 |
a2a91b4c03f883adacd33efd7ea274b1fb5b1b69 | 29 | py | Python | tests/common/snappi/__init__.py | lolyu/sonic-mgmt | ed888fd1ce26e7f44fd7f70af00c43ace4882668 | [
"Apache-2.0"
] | 132 | 2016-10-19T12:34:44.000Z | 2022-03-16T09:00:39.000Z | tests/common/snappi/__init__.py | lolyu/sonic-mgmt | ed888fd1ce26e7f44fd7f70af00c43ace4882668 | [
"Apache-2.0"
] | 3,152 | 2016-09-21T23:05:58.000Z | 2022-03-31T23:29:08.000Z | tests/common/snappi/__init__.py | lolyu/sonic-mgmt | ed888fd1ce26e7f44fd7f70af00c43ace4882668 | [
"Apache-2.0"
] | 563 | 2016-09-20T01:00:15.000Z | 2022-03-31T22:43:54.000Z | # Place for snappi fixtures.
| 14.5 | 28 | 0.758621 |
f6f06fc41ad6185bf1ca182042ac67fcf8b12088 | 185 | py | Python | config.py | SebastjanLeskovar/iron_gate | 5543de193f3ba98433362b0c9a33d3782b046447 | [
"MIT"
] | null | null | null | config.py | SebastjanLeskovar/iron_gate | 5543de193f3ba98433362b0c9a33d3782b046447 | [
"MIT"
] | null | null | null | config.py | SebastjanLeskovar/iron_gate | 5543de193f3ba98433362b0c9a33d3782b046447 | [
"MIT"
] | null | null | null | ''' Configure threading in port scanner '''
# Number of allowed threads (default: 100)
number_threads = 100
# Number of jobs assigned (default: 1024, total: 65535)
number_jobs = 1024
| 23.125 | 55 | 0.735135 |
ef9831e99a0cd308c05fa95ea2597abaf24fd0fe | 9,520 | py | Python | tests/test_loadgen.py | corvustristis/apiritif | b80c64d1a696e970fc437075a7a63435ba465dca | [
"Apache-2.0"
] | null | null | null | tests/test_loadgen.py | corvustristis/apiritif | b80c64d1a696e970fc437075a7a63435ba465dca | [
"Apache-2.0"
] | null | null | null | tests/test_loadgen.py | corvustristis/apiritif | b80c64d1a696e970fc437075a7a63435ba465dca | [
"Apache-2.0"
] | null | null | null | import copy
import logging
import os
import tempfile
import time
from unittest import TestCase
from multiprocessing.pool import CLOSE
import apiritif
from apiritif import store, thread
from apiritif.loadgen import Worker, Params, Supervisor, JTLSampleWriter
dummy_tests = [os.path.join(os.path.dirname(__file__), "reso... | 32.162162 | 107 | 0.607563 |
b394231d928b81c88d2ded8f174ad03bf85c6514 | 9,763 | py | Python | polls/views.py | 30Meridian/RozumneMistoSnapshot | 67a83b3908674d01992561dfb37596e395b4d482 | [
"BSD-3-Clause"
] | null | null | null | polls/views.py | 30Meridian/RozumneMistoSnapshot | 67a83b3908674d01992561dfb37596e395b4d482 | [
"BSD-3-Clause"
] | null | null | null | polls/views.py | 30Meridian/RozumneMistoSnapshot | 67a83b3908674d01992561dfb37596e395b4d482 | [
"BSD-3-Clause"
] | null | null | null | import datetime
from django.views.generic import DetailView, ListView, RedirectView, CreateView, DeleteView, UpdateView
from django.shortcuts import redirect, get_object_or_404
from django.contrib import messages
from django.core.urlresolvers import reverse_lazy
from django.http import HttpResponse, HttpResponseRedire... | 42.447826 | 138 | 0.648981 |
f3184f4c071788d5262808fdf3a7bcfeea8c7694 | 14,159 | py | Python | postprocessing/scr_run_network_det.py | geoHeil/FAST | 96e41c8eb1705c7715065b7aed69570dd85752d1 | [
"Apache-2.0"
] | null | null | null | postprocessing/scr_run_network_det.py | geoHeil/FAST | 96e41c8eb1705c7715065b7aed69570dd85752d1 | [
"Apache-2.0"
] | null | null | null | postprocessing/scr_run_network_det.py | geoHeil/FAST | 96e41c8eb1705c7715065b7aed69570dd85752d1 | [
"Apache-2.0"
] | 1 | 2021-06-25T13:09:29.000Z | 2021-06-25T13:09:29.000Z | #########################################################################
## NETWORK DETECTION ##
#########################################################################
#########################################################################
## loads... | 41.521994 | 195 | 0.557878 |
c9f299eda98086c0aafeb172601f59e3e7c97283 | 12,002 | py | Python | tools/project.py | ecoromka/mbed-os | 757b9e250d9cae73d79f302db03550dec3bfb82b | [
"Apache-2.0"
] | 3 | 2019-04-26T05:38:10.000Z | 2021-08-11T21:00:48.000Z | tools/project.py | engali94/mbed-os | d030c04a6039c832bfe1610efb8162e0807678d1 | [
"Apache-2.0"
] | 7 | 2018-12-07T15:59:10.000Z | 2019-04-17T19:13:53.000Z | tools/project.py | engali94/mbed-os | d030c04a6039c832bfe1610efb8162e0807678d1 | [
"Apache-2.0"
] | 7 | 2019-01-18T07:20:14.000Z | 2019-03-07T09:09:14.000Z | """
Copyright (c) 2016-2019 ARM Limited. All rights reserved.
SPDX-License-Identifier: Apache-2.0
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... | 29.416667 | 84 | 0.623229 |
dad46dcab869276bfc56b02e67b04fe514a72755 | 3,191 | py | Python | i3pystatus/whosonlocation.py | crwood/i3pystatus | 0e7e04f075afb73be1a71d3ad2fc5b0d33bb9214 | [
"MIT"
] | null | null | null | i3pystatus/whosonlocation.py | crwood/i3pystatus | 0e7e04f075afb73be1a71d3ad2fc5b0d33bb9214 | [
"MIT"
] | null | null | null | i3pystatus/whosonlocation.py | crwood/i3pystatus | 0e7e04f075afb73be1a71d3ad2fc5b0d33bb9214 | [
"MIT"
] | 1 | 2019-08-15T10:35:54.000Z | 2019-08-15T10:35:54.000Z | from i3pystatus import IntervalModule
import requests
from collections import OrderedDict
from bs4 import BeautifulSoup
class WhosOnLocation():
email = None
password = None
session = None
def __init__(self, email, password):
self.email = email
self.password = password
self.se... | 29.546296 | 105 | 0.596365 |
1bb17e3dd77230a5a7b5e2d7cbcfa1769eef8d21 | 3,283 | py | Python | arcade/examples/background_music.py | JFincher42/arcade | f9eebfc4c6989e0e99d7b6dfe0409f248bfd5a44 | [
"MIT"
] | 1 | 2021-03-04T14:02:29.000Z | 2021-03-04T14:02:29.000Z | arcade/examples/background_music.py | 3w36zj6/arcade | 2429205243f3b8c247a67163caea2e694f8e2ba4 | [
"MIT"
] | null | null | null | arcade/examples/background_music.py | 3w36zj6/arcade | 2429205243f3b8c247a67163caea2e694f8e2ba4 | [
"MIT"
] | null | null | null | """
Background Music Example
If Python and Arcade are installed, this example can be run from the command line with:
python -m arcade.examples.background_music
"""
import arcade
import time
SCREEN_WIDTH = 600
SCREEN_HEIGHT = 300
SCREEN_TITLE = "Starting Template Simple"
MUSIC_VOLUME = 0.5
class MyGame(arcade.Window... | 31.266667 | 108 | 0.632348 |
5bf0b4083067d9622331cbef5802b756210f1c37 | 3,650 | py | Python | scico/test/test_flax.py | lanl/scico | 976c9e5833f8f67eed2eaa43460d89fb09bb9f78 | [
"BSD-3-Clause"
] | 18 | 2021-09-21T18:55:11.000Z | 2022-03-21T20:13:05.000Z | scico/test/test_flax.py | lanl/scico | 976c9e5833f8f67eed2eaa43460d89fb09bb9f78 | [
"BSD-3-Clause"
] | 218 | 2021-09-21T21:45:08.000Z | 2022-03-30T18:45:27.000Z | scico/test/test_flax.py | lanl/scico | 976c9e5833f8f67eed2eaa43460d89fb09bb9f78 | [
"BSD-3-Clause"
] | 2 | 2021-09-23T22:44:47.000Z | 2021-12-18T16:01:43.000Z | from functools import partial
import numpy as np
import pytest
from flax import linen as nn
from scico import _flax as sflax
from scico import random
from scico._flax import FlaxMap
class TestSet:
def test_convnblock_default(self):
nflt = 16 # number of filters
conv = partial(nn.Conv, dtype=np... | 33.181818 | 93 | 0.637808 |
77594cd3fa5fd0a43d0cb26c12a0c36be2447a4f | 909 | py | Python | kubernetes/test/test_v1_host_alias.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | 2 | 2020-06-21T08:03:18.000Z | 2020-06-21T09:53:29.000Z | kubernetes/test/test_v1_host_alias.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_host_alias.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | 1 | 2020-12-10T07:28:08.000Z | 2020-12-10T07:28:08.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.16
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import... | 22.725 | 124 | 0.708471 |
f8e6695364f143f7139c92c7e53ae977c2ebfdf5 | 3,040 | py | Python | PyFlow/Packages/PyFlowOpenCv/__init__.py | bobosky/PyFlowOpenCv | 1c02fcbee6f3a1998f81e81d9673beab2fecae6c | [
"Apache-2.0"
] | 2 | 2020-07-17T20:05:50.000Z | 2022-02-13T23:35:04.000Z | PyFlow/Packages/PyFlowOpenCv/__init__.py | bobosky/PyFlowOpenCv | 1c02fcbee6f3a1998f81e81d9673beab2fecae6c | [
"Apache-2.0"
] | null | null | null | PyFlow/Packages/PyFlowOpenCv/__init__.py | bobosky/PyFlowOpenCv | 1c02fcbee6f3a1998f81e81d9673beab2fecae6c | [
"Apache-2.0"
] | 1 | 2021-01-15T07:01:53.000Z | 2021-01-15T07:01:53.000Z | PACKAGE_NAME = 'PyFlowOpenCv'
from collections import OrderedDict
from PyFlow.UI.UIInterfaces import IPackage
# Pins
from PyFlow.Packages.PyFlowOpenCv.Pins.ImagePin import ImagePin
from PyFlow.Packages.PyFlowOpenCv.Pins.ImagePin import VideoPin
from PyFlow.Packages.PyFlowOpenCv.Pins.ImagePin import GraphElementPin
fr... | 31.666667 | 124 | 0.843421 |
3d1ac3506bee05d8d26f84aa3a307db2a74eceb8 | 10,500 | py | Python | networkx/algorithms/community/modularity_max.py | LamprosYfantis/networkx | 4f957ad8abef63f0933dcc198468897fbcdabce2 | [
"BSD-3-Clause"
] | null | null | null | networkx/algorithms/community/modularity_max.py | LamprosYfantis/networkx | 4f957ad8abef63f0933dcc198468897fbcdabce2 | [
"BSD-3-Clause"
] | null | null | null | networkx/algorithms/community/modularity_max.py | LamprosYfantis/networkx | 4f957ad8abef63f0933dcc198468897fbcdabce2 | [
"BSD-3-Clause"
] | null | null | null | # modularity_max.py - functions for finding communities based on modularity
#
# Copyright 2018 Edward L. Platt
#
# This file is part of NetworkX
#
# NetworkX is distributed under a BSD license; see LICENSE.txt for more
# information.
#
# Authors:
# Edward L. Platt <ed@elplatt.com>
#
# TODO:
# - Alter equations for ... | 37.102473 | 79 | 0.541905 |
306ec436257c0d39ab9e5f00b62ab6c5b2c8cfb0 | 11,485 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/applyactions_f3190fab64661538563653e07df155a5.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 20 | 2019-05-07T01:59:14.000Z | 2022-02-11T05:24:47.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/applyactions_f3190fab64661538563653e07df155a5.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 60 | 2019-04-03T18:59:35.000Z | 2022-02-22T12:05:05.000Z | ixnetwork_restpy/testplatform/sessions/ixnetwork/vport/protocols/applyactions_f3190fab64661538563653e07df155a5.py | OpenIxia/ixnetwork_restpy | f628db450573a104f327cf3c737ca25586e067ae | [
"MIT"
] | 13 | 2019-05-20T10:48:31.000Z | 2021-10-06T07:45:44.000Z | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify,... | 35.230061 | 299 | 0.616282 |
7754d47fbaab55136d7c64559c60cc5709df8016 | 3,928 | py | Python | fdia_simulation/tests/benchmarks/test_noise_finder_2radars.py | QDucasse/FDIA_simulation | bdd0cb072f07b9a96fd82df581c9c7493ae66cbc | [
"MIT"
] | 7 | 2020-12-11T16:20:59.000Z | 2022-01-11T21:18:25.000Z | fdia_simulation/tests/benchmarks/test_noise_finder_2radars.py | QDucasse/FDIA_simulation | bdd0cb072f07b9a96fd82df581c9c7493ae66cbc | [
"MIT"
] | 2 | 2020-09-25T06:56:56.000Z | 2021-06-25T15:40:38.000Z | fdia_simulation/tests/benchmarks/test_noise_finder_2radars.py | QDucasse/FDIA_simulation | bdd0cb072f07b9a96fd82df581c9c7493ae66cbc | [
"MIT"
] | 5 | 2019-08-27T11:13:31.000Z | 2021-11-26T12:52:19.000Z | # -*- coding: utf-8 -*-
"""
Created on Mon Jul 29 15:49:35 2019
@author: qde
"""
import unittest
import numpy as np
from abc import ABC, abstractmethod
from filterpy.kalman import IMMEstimator
from fdia_simulation.models import Radar
from fdia_simulation.filters... | 44.636364 | 136 | 0.634165 |
5ae2e2436f066389421279e500acf712408a3acd | 1,188 | py | Python | backup/source_reading/tester-in-hardway/thoughts-in-python/intermedia/generator_iterator.py | qdriven/qdriven-read-write | 7e49ee430470b9338392066d4bd5245e0a98aa1e | [
"MIT"
] | 1 | 2021-04-26T05:21:09.000Z | 2021-04-26T05:21:09.000Z | backup/source_reading/tester-in-hardway/thoughts-in-python/intermedia/generator_iterator.py | qdriven/qdriven-read-write | 7e49ee430470b9338392066d4bd5245e0a98aa1e | [
"MIT"
] | null | null | null | backup/source_reading/tester-in-hardway/thoughts-in-python/intermedia/generator_iterator.py | qdriven/qdriven-read-write | 7e49ee430470b9338392066d4bd5245e0a98aa1e | [
"MIT"
] | null | null | null | # encoding: utf-8
"""
# Generators
- iterator: enable to traverse a container
* iterable
* iterator
* iteration
- generator
## Iterable/Iterator/Iteration
***Iterable***:
- __iter__ and __getitem__
- return iterator
- any object provide an iterator
***Iterator***
- __next__
***Iteration***
A process of taki... | 15.230769 | 75 | 0.68771 |
f956732c9e3414a1208891001d371c6aa2ca650e | 7,900 | py | Python | test/new_tests/test_list_remove_range.py | jensengrey/aerospike-client-python | 2242408f789c2f1521a1434bb39678c5e4034982 | [
"Apache-2.0"
] | null | null | null | test/new_tests/test_list_remove_range.py | jensengrey/aerospike-client-python | 2242408f789c2f1521a1434bb39678c5e4034982 | [
"Apache-2.0"
] | null | null | null | test/new_tests/test_list_remove_range.py | jensengrey/aerospike-client-python | 2242408f789c2f1521a1434bb39678c5e4034982 | [
"Apache-2.0"
] | 1 | 2021-08-02T22:30:21.000Z | 2021-08-02T22:30:21.000Z | # -*- coding: utf-8 -*-
import pytest
import sys
import random
from .test_base_class import TestBaseClass
from aerospike import exception as e
aerospike = pytest.importorskip("aerospike")
try:
import aerospike
except:
print("Please install aerospike python client.")
sys.exit(1)
class TestListRemoveRange(... | 33.617021 | 76 | 0.563291 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.