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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fb898e1adbf20bb39237cc3012f9377bc966c8b1 | 551 | py | Python | bbos1994/0002/saveDiscountToDB.py | saurabh896/python-1 | f8d3aedf4c0fe6e24dfa3269ea7e642c9f7dd9b7 | [
"MIT"
] | 3,976 | 2015-01-01T15:49:39.000Z | 2022-03-31T03:47:56.000Z | bbos1994/0002/saveDiscountToDB.py | oyesam7/python-1 | 220734af09fa09a6f615d4f1b4612a0ab75d91d1 | [
"MIT"
] | 97 | 2015-01-11T02:59:46.000Z | 2022-03-16T14:01:56.000Z | bbos1994/0002/saveDiscountToDB.py | oyesam7/python-1 | 220734af09fa09a6f615d4f1b4612a0ab75d91d1 | [
"MIT"
] | 3,533 | 2015-01-01T06:19:30.000Z | 2022-03-28T13:14:54.000Z | #! /usr/bin/python3
# -*- coding:utf-8 -*-
__author__ = 'TonyZhu'
import mysql.connector
import discount
def saveToMySQL(discount_str):
conn = mysql.connector.connect(user = 'root',password='password',database = 'Test')
cursor = conn.cursor()
cursor.execute('insert into discount values(%s)',[discount_str])
coun... | 23.956522 | 84 | 0.724138 |
f97e153d5ef28a28e94cff2f6a1b5f40c60b088f | 1,578 | py | Python | run_config.py | meulemansalex/deep_feedback_control | 0a592c595334ce81d0c753f65f1cde7c02c8222b | [
"Apache-2.0"
] | 4 | 2021-06-15T06:28:29.000Z | 2021-11-27T17:59:05.000Z | run_config.py | meulemansalex/deep_feedback_control | 0a592c595334ce81d0c753f65f1cde7c02c8222b | [
"Apache-2.0"
] | null | null | null | run_config.py | meulemansalex/deep_feedback_control | 0a592c595334ce81d0c753f65f1cde7c02c8222b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2021 Alexander Meulemans, Matilde Tristany Farinha, Javier Garcia Gordonez
#
# 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/lice... | 30.346154 | 86 | 0.676172 |
7271277414768ac17727b2263c2369f08ebb04a5 | 232 | py | Python | api/__init__.py | alexpulver/flask-webapi | 0590f98f3f1af8420f2ee719d6c3bce7635ec2eb | [
"MIT"
] | null | null | null | api/__init__.py | alexpulver/flask-webapi | 0590f98f3f1af8420f2ee719d6c3bce7635ec2eb | [
"MIT"
] | null | null | null | api/__init__.py | alexpulver/flask-webapi | 0590f98f3f1af8420f2ee719d6c3bce7635ec2eb | [
"MIT"
] | 1 | 2020-11-26T16:45:02.000Z | 2020-11-26T16:45:02.000Z | import os
from flask import Flask
from flask_restful import Api
from api.v1.endpoint import Endpoint
def create_app():
app = Flask(__name__)
api = Api(app)
api.add_resource(Endpoint, '/v1/endpoint')
return app
| 14.5 | 46 | 0.711207 |
23499838c4841b4a98549d3ffd3ff92c991a1e88 | 6,445 | py | Python | tests/test_datasets.py | rgerkin/psiz | d540738462b6436a08a472d5e349ca2b813e6d47 | [
"Apache-2.0"
] | null | null | null | tests/test_datasets.py | rgerkin/psiz | d540738462b6436a08a472d5e349ca2b813e6d47 | [
"Apache-2.0"
] | 1 | 2022-02-10T07:33:06.000Z | 2022-02-10T07:33:06.000Z | tests/test_datasets.py | rgerkin/psiz | d540738462b6436a08a472d5e349ca2b813e6d47 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 The PsiZ 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 r... | 31.286408 | 86 | 0.662684 |
0a6f5c3cbd91efd7d110392bb1c19afc456b29dd | 1,332 | py | Python | core/wave-core/use_gcp/p_color.py | seu0313/Bad-word-filter | 8d4f752032cb16c33729099f836e096cda9c163b | [
"Apache-2.0"
] | null | null | null | core/wave-core/use_gcp/p_color.py | seu0313/Bad-word-filter | 8d4f752032cb16c33729099f836e096cda9c163b | [
"Apache-2.0"
] | 22 | 2021-06-01T07:01:55.000Z | 2021-06-20T07:11:36.000Z | core/wave-core/use_gcp/p_color.py | seu0313/Bad-word-filter | 8d4f752032cb16c33729099f836e096cda9c163b | [
"Apache-2.0"
] | 1 | 2020-12-05T10:40:12.000Z | 2020-12-05T10:40:12.000Z | class Pcolor :
BLACK = '\033[30m'
RED = '\033[31m'
GREEN = '\033[32m'
YELLOW = '\033[33m'
BLUE = '\033[34m'
MAGENTA = '\033[35m'
CYAN = '\033[36m'
WHITE = '\033[37m'
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
... | 37 | 60 | 0.629129 |
7f79a48dcfaf87f539ce8403580d3575d23f3a8a | 7,587 | py | Python | en2wubi/preprocessing/filter_split.py | duguyue100/wmt-en2wubi | 1191568126ce3e6cfb565ce3d2a6532d9367da97 | [
"MIT"
] | 12 | 2018-09-12T18:55:58.000Z | 2021-05-17T14:51:05.000Z | preprocessing/filter_split.py | duguyue100/en2pinyin | 6010c1ba7e635dff608463395a3e957bfe47aa21 | [
"MIT"
] | 1 | 2021-03-21T11:06:28.000Z | 2021-04-01T13:28:35.000Z | preprocessing/filter_split.py | duguyue100/en2pinyin | 6010c1ba7e635dff608463395a3e957bfe47aa21 | [
"MIT"
] | 1 | 2019-10-30T02:00:46.000Z | 2019-10-30T02:00:46.000Z | # -*- coding: utf-8 -*-
"""
Filter, shuffle and display statistics about data.
Split into train/valid/test.
"""
import importlib
import linecache
import logging
import pickle
import re
import subprocess
import sys
importlib.reload(sys)
# sys.setdefaultencoding('utf8')
import numpy as np
logging.basicConfig(format='... | 39.515625 | 124 | 0.603796 |
fb608ceb9d997c6831754bda03a9ee556f318c47 | 45,025 | py | Python | dev/Tools/build/waf-1.7.13/lmbrwaflib/copy_tasks.py | crazyskateface/lumberyard | 164512f8d415d6bdf37e195af319ffe5f96a8f0b | [
"AML"
] | 1 | 2020-03-24T04:54:22.000Z | 2020-03-24T04:54:22.000Z | dev/Tools/build/waf-1.7.13/lmbrwaflib/copy_tasks.py | santosh90n/lumberyard-1 | 9608bcf905bb60e9f326bd3fe8297381c22d83a6 | [
"AML"
] | null | null | null | dev/Tools/build/waf-1.7.13/lmbrwaflib/copy_tasks.py | santosh90n/lumberyard-1 | 9608bcf905bb60e9f326bd3fe8297381c22d83a6 | [
"AML"
] | 2 | 2019-07-09T00:03:08.000Z | 2020-03-24T04:54:27.000Z | #
# All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
# its licensors.
#
# For complete copyright and license terms please see the LICENSE at the root of this
# distribution (the "License"). All use of this software is governed by the License,
# or, if provided, by the license below or th... | 41.922719 | 183 | 0.637091 |
6534992a5ded5772fe3357e7024ceb7bc77b58fd | 439,332 | py | Python | kubernetes/client/apis/apps_v1_api.py | craigtracey/python | 177564c655c0ea3f9cf38e61ca275ef6c6256aab | [
"Apache-2.0"
] | null | null | null | kubernetes/client/apis/apps_v1_api.py | craigtracey/python | 177564c655c0ea3f9cf38e61ca275ef6c6256aab | [
"Apache-2.0"
] | null | null | null | kubernetes/client/apis/apps_v1_api.py | craigtracey/python | 177564c655c0ea3f9cf38e61ca275ef6c6256aab | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.9.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
im... | 60.223715 | 1,390 | 0.637789 |
367adafceccdf978a003bfccc85bf09e79f57d17 | 20,729 | py | Python | models/layers/mesh.py | Sanjay-Ganeshan/point2mesh | 0b5f8eade103d4408529d94ec5ca55cf64a9a2c4 | [
"MIT"
] | null | null | null | models/layers/mesh.py | Sanjay-Ganeshan/point2mesh | 0b5f8eade103d4408529d94ec5ca55cf64a9a2c4 | [
"MIT"
] | null | null | null | models/layers/mesh.py | Sanjay-Ganeshan/point2mesh | 0b5f8eade103d4408529d94ec5ca55cf64a9a2c4 | [
"MIT"
] | null | null | null | import torch
import numpy as np
from queue import Queue
from utils import load_obj, export
import copy
from pathlib import Path
import pickle
from pytorch3d.ops.knn import knn_gather, knn_points
class Mesh:
def __init__(self, file, hold_history=False, vs=None, faces=None, device='cpu', gfmm=True):
if file... | 40.565558 | 116 | 0.55719 |
b62e4a6ceb61cc3fa896770087dd486413a6b3aa | 7,395 | py | Python | testes/testes_integracao.py | gelhen/pythonbirds | d7234f55627cf0016d9e40299762d208bed938d3 | [
"MIT"
] | null | null | null | testes/testes_integracao.py | gelhen/pythonbirds | d7234f55627cf0016d9e40299762d208bed938d3 | [
"MIT"
] | null | null | null | testes/testes_integracao.py | gelhen/pythonbirds | d7234f55627cf0016d9e40299762d208bed938d3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from itertools import chain
import os
from os import path
from unittest.case import TestCase
import math
import sys
project_dir = path.dirname(__file__)
project_dir = path.join('..')
sys.path.append(project_dir)
from placa_grafica_tkinter import rodar_fase
project_dir = os.path.join(os.path.d... | 38.316062 | 120 | 0.639216 |
93f03b99cd70377ca9ee359bc449ced56d50e11b | 868 | py | Python | tests/app/notify_client/test_api_key_api_client.py | cds-snc/notifier-admin | 69aab94cb8d1711488e471cac52223c7f9f6f90e | [
"MIT"
] | 16 | 2019-11-05T21:35:49.000Z | 2022-01-12T15:00:32.000Z | tests/app/notify_client/test_api_key_api_client.py | cds-snc/notification-admin | d4056798bf889ad29893667bbb67ead2f8e466e4 | [
"MIT"
] | 509 | 2019-07-11T22:03:19.000Z | 2022-03-30T15:19:26.000Z | tests/app/notify_client/test_api_key_api_client.py | cds-snc/notifier-admin | 69aab94cb8d1711488e471cac52223c7f9f6f90e | [
"MIT"
] | 8 | 2020-02-21T20:19:29.000Z | 2022-03-31T14:17:02.000Z | import uuid
from app.notify_client.api_key_api_client import ApiKeyApiClient
def test_get_api_key_statistics(mocker, api_user_active):
api_key_id = uuid.uuid4()
expected_url = "/api-key/{}/summary-statistics".format(api_key_id)
client = ApiKeyApiClient()
mock_get = mocker.patch("app.notify_client.ap... | 33.384615 | 87 | 0.792627 |
9ad1b85c4cf2dbeaf1ca4b1843fce26870f48d10 | 4,004 | py | Python | tests/unit/__init__.py | nvdajp/nvdajp | de216d4599f95cddffa1062d4ec1bc50348c51e0 | [
"bzip2-1.0.6"
] | 19 | 2016-05-11T05:15:31.000Z | 2022-03-17T12:40:10.000Z | tests/unit/__init__.py | nvdajp/nvdajp | de216d4599f95cddffa1062d4ec1bc50348c51e0 | [
"bzip2-1.0.6"
] | 307 | 2015-08-27T11:22:33.000Z | 2022-03-29T10:43:34.000Z | tests/unit/__init__.py | nvdajp/nvdajp | de216d4599f95cddffa1062d4ec1bc50348c51e0 | [
"bzip2-1.0.6"
] | 14 | 2016-03-28T07:31:49.000Z | 2022-03-30T04:56:35.000Z | # tests/unit/__init__.py
# A part of NonVisual Desktop Access (NVDA)
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
# Copyright (C) 2017-2019 NV Access Limited, Babbage B.V.
"""NVDA unit testing.
All unit tests should reside within this package and should be
... | 37.074074 | 108 | 0.764236 |
3036d4ece0f78c67f8217aebaab42d8acc1db47e | 4,627 | py | Python | sahara_plugins/plugins/vanilla/v2_7_1/config_helper.py | tellesnobrega/sahara-plugins | 53deddbeb5d91b50045a7e9065b7810b6bea8f39 | [
"Apache-2.0"
] | null | null | null | sahara_plugins/plugins/vanilla/v2_7_1/config_helper.py | tellesnobrega/sahara-plugins | 53deddbeb5d91b50045a7e9065b7810b6bea8f39 | [
"Apache-2.0"
] | null | null | null | sahara_plugins/plugins/vanilla/v2_7_1/config_helper.py | tellesnobrega/sahara-plugins | 53deddbeb5d91b50045a7e9065b7810b6bea8f39 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 Mirantis 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 to in writ... | 30.440789 | 76 | 0.669981 |
df791961a343ac3ab93fa4e634147d6fdcdd2d37 | 48,718 | py | Python | DeviceManager/DeviceHandler.py | marianoleonardo/device-manager | f00d4bcaec825a19fa8b504b8109ac94dd280df0 | [
"Apache-2.0"
] | null | null | null | DeviceManager/DeviceHandler.py | marianoleonardo/device-manager | f00d4bcaec825a19fa8b504b8109ac94dd280df0 | [
"Apache-2.0"
] | null | null | null | DeviceManager/DeviceHandler.py | marianoleonardo/device-manager | f00d4bcaec825a19fa8b504b8109ac94dd280df0 | [
"Apache-2.0"
] | null | null | null | """
Handles CRUD operations for devices, and their configuration on the
FIWARE backend
"""
import re
import logging
import json
import time
from datetime import datetime
import secrets
from flask import request, jsonify, Blueprint, make_response
from sqlalchemy.exc import IntegrityError
from sqlalchemy import o... | 38.240188 | 147 | 0.616897 |
9b7029e9b5960a7a37757757f81d7a05f6ff8af5 | 5,417 | py | Python | main.py | bmwenda/amity | 5384daef30825edd636bfd67b615a1d4e86e70d5 | [
"MIT"
] | null | null | null | main.py | bmwenda/amity | 5384daef30825edd636bfd67b615a1d4e86e70d5 | [
"MIT"
] | null | null | null | main.py | bmwenda/amity | 5384daef30825edd636bfd67b615a1d4e86e70d5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Usage:
amity create_room (<room_name> <room_type>)...
amity add_person <first_name> <last_name> (Fellow | Staff) [--wants_accomodation=(Y | N)]
amity print_allocations [-output=<filename>]
amity reallocate_person <first_name> <last_name> <room_name>
amity print_room <room_n... | 27.085 | 98 | 0.603101 |
87e299ff5124828c94b128871f23a015f866c43f | 6,410 | py | Python | src/streamlink/plugins/adultswim.py | melmorabity/streamlink | 24c59a23103922977991acc28741a323d8efa7a1 | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/adultswim.py | melmorabity/streamlink | 24c59a23103922977991acc28741a323d8efa7a1 | [
"BSD-2-Clause"
] | null | null | null | src/streamlink/plugins/adultswim.py | melmorabity/streamlink | 24c59a23103922977991acc28741a323d8efa7a1 | [
"BSD-2-Clause"
] | null | null | null | import logging
import re
from urllib.parse import urlparse, urlunparse
from streamlink.plugin import Plugin, PluginError, pluginmatcher
from streamlink.plugin.api import validate
from streamlink.stream import HLSStream
from streamlink.utils.parse import parse_json
log = logging.getLogger(__name__)
@pluginmatcher(re... | 32.704082 | 81 | 0.563183 |
f88242d35c28465ca9a82521adf21712dfa54dd7 | 5,400 | py | Python | lib/Hydrus/API/GUI.py | Connor22/hydrus | d0ae4a8898742a0d13601e1167d5ba697b31c395 | [
"WTFPL"
] | null | null | null | lib/Hydrus/API/GUI.py | Connor22/hydrus | d0ae4a8898742a0d13601e1167d5ba697b31c395 | [
"WTFPL"
] | null | null | null | lib/Hydrus/API/GUI.py | Connor22/hydrus | d0ae4a8898742a0d13601e1167d5ba697b31c395 | [
"WTFPL"
] | null | null | null | from . import ClientAPI
from . import ClientConstants as CC
from . import ClientData
from . import ClientGUICommon
from . import ClientGUIControls
from . import ClientGUIDialogs
from . import ClientGUIDialogsQuick
from . import ClientGUIListCtrl
from . import ClientGUIScrolledPanels
from . import ClientGUITags
from . i... | 31.764706 | 213 | 0.618704 |
f802f38b44bd99d666ef26b82c53ec8969c96109 | 59,451 | py | Python | c7n/resources/rds.py | dnouri/cloud-custodian | 4e8b3b45f60731df942ffe6b61645416d7a67daa | [
"Apache-2.0"
] | 1 | 2021-05-21T03:55:26.000Z | 2021-05-21T03:55:26.000Z | c7n/resources/rds.py | dnouri/cloud-custodian | 4e8b3b45f60731df942ffe6b61645416d7a67daa | [
"Apache-2.0"
] | 1 | 2021-02-10T02:20:45.000Z | 2021-02-10T02:20:45.000Z | c7n/resources/rds.py | dnouri/cloud-custodian | 4e8b3b45f60731df942ffe6b61645416d7a67daa | [
"Apache-2.0"
] | 1 | 2021-05-02T01:49:36.000Z | 2021-05-02T01:49:36.000Z | # Copyright 2015-2017 Capital One Services, LLC
# Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
"""
RDS Resource Manager
====================
Example Policies
----------------
Find rds instances that are publicly available
.. code-block:: yaml
policies:
- name: rds-public
... | 34.344887 | 100 | 0.583203 |
2973bd8a98f15bbeda9dd7190710ada30dbcfde2 | 3,424 | py | Python | client/qbittorrent.py | hdchina-org/CredentialChanger | 8c4ec7b26885e6b71400b04b2ac902b16680c487 | [
"MIT"
] | 1 | 2019-10-11T05:55:01.000Z | 2019-10-11T05:55:01.000Z | client/qbittorrent.py | hdchina-org/CredentialChanger | 8c4ec7b26885e6b71400b04b2ac902b16680c487 | [
"MIT"
] | null | null | null | client/qbittorrent.py | hdchina-org/CredentialChanger | 8c4ec7b26885e6b71400b04b2ac902b16680c487 | [
"MIT"
] | null | null | null | import json
import logging
import urllib.request
import urllib.parse
from client.baseclient import BaseClient
from exceptions import *
class qBittorrent(BaseClient):
def __init__(self, host, port, username, password, passkey):
self._cookie_processor = urllib.request.HTTPCookieProcessor()
self._mi... | 43.897436 | 120 | 0.610689 |
703e73426c1f3ae11f446d045d2d3019250380cf | 7,038 | py | Python | built-in/PyTorch/Official/cv/image_object_detection/Faster_Mask_RCNN_for_PyTorch_Dynamic_Shape/detectron2/modeling/proposal_generator/proposal_utils.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 12 | 2020-12-13T08:34:24.000Z | 2022-03-20T15:17:17.000Z | built-in/PyTorch/Official/cv/image_object_detection/Faster_Mask_RCNN_for_PyTorch_Dynamic_Shape/detectron2/modeling/proposal_generator/proposal_utils.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 1 | 2022-01-20T03:11:05.000Z | 2022-01-20T06:53:39.000Z | built-in/PyTorch/Official/cv/image_object_detection/Faster_Mask_RCNN_for_PyTorch_Dynamic_Shape/detectron2/modeling/proposal_generator/proposal_utils.py | Ascend/modelzoo | f018cfed33dbb1cc2110b9ea2e233333f71cc509 | [
"Apache-2.0"
] | 2 | 2021-07-10T12:40:46.000Z | 2021-12-17T07:55:15.000Z | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
# Copyright 2020 Huawei Technologies Co., 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.... | 39.988636 | 109 | 0.671498 |
930d5b02429d3d62ea791347916eb504f8a63b17 | 34,175 | py | Python | sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_services_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 2 | 2019-08-23T21:14:00.000Z | 2021-09-07T18:32:34.000Z | sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_services_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 2 | 2020-03-03T23:11:13.000Z | 2020-03-30T18:50:55.000Z | sdk/healthcareapis/azure-mgmt-healthcareapis/azure/mgmt/healthcareapis/aio/operations/_services_operations.py | mohamedshabanofficial/azure-sdk-for-python | 81c585f310cd2ec23d2ad145173958914a075a58 | [
"MIT"
] | 1 | 2021-12-18T20:01:22.000Z | 2021-12-18T20:01:22.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 51.390977 | 193 | 0.673738 |
62d84c3a9db97f815790a4fbff7de9ab8ce5df41 | 9,717 | py | Python | src/obfuscapk/obfuscators/method_overload/__init__.py | binaryflesh/Obfuscapk | 56404d3149832ac48a337b0463eacfb3cd7f4573 | [
"MIT"
] | null | null | null | src/obfuscapk/obfuscators/method_overload/__init__.py | binaryflesh/Obfuscapk | 56404d3149832ac48a337b0463eacfb3cd7f4573 | [
"MIT"
] | null | null | null | src/obfuscapk/obfuscators/method_overload/__init__.py | binaryflesh/Obfuscapk | 56404d3149832ac48a337b0463eacfb3cd7f4573 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.7
import logging
import random
from typing import List, Set
from obfuscapk import obfuscator_category
from obfuscapk import util
from obfuscapk.obfuscation import Obfuscation
class MethodOverload(obfuscator_category.ICodeObfuscator):
def __init__(self):
self.logger = logging.getL... | 49.576531 | 117 | 0.544921 |
e477216b02fb65cb3ad46e4cf84d2487e21d0c40 | 2,501 | py | Python | rooms/room1.py | RangerDevv/Neia-Python | 50edbc6100418947b8cc9f8db39c9e98ec3ec909 | [
"MIT"
] | null | null | null | rooms/room1.py | RangerDevv/Neia-Python | 50edbc6100418947b8cc9f8db39c9e98ec3ec909 | [
"MIT"
] | null | null | null | rooms/room1.py | RangerDevv/Neia-Python | 50edbc6100418947b8cc9f8db39c9e98ec3ec909 | [
"MIT"
] | null | null | null | from cgitb import text
from pickle import REDUCE
import pygame
import random
import os
import sys
from assets.player import player
# for calling player.py
currentdir = os.path.dirname(os.path.realpath(__file__))
parentdir = os.path.dirname(currentdir)
sys.path.append(parentdir)
pygame.init()
# hiding the cursor
pyga... | 28.747126 | 111 | 0.596162 |
f1549c46879a80882eb3ef43dee1d3c8a41a63d1 | 291 | py | Python | 04_ciclos_3.py | steban1234/Ejercicios-universidad | dd9873512d90606771537df8eabac2f8c00c83f5 | [
"MIT"
] | null | null | null | 04_ciclos_3.py | steban1234/Ejercicios-universidad | dd9873512d90606771537df8eabac2f8c00c83f5 | [
"MIT"
] | null | null | null | 04_ciclos_3.py | steban1234/Ejercicios-universidad | dd9873512d90606771537df8eabac2f8c00c83f5 | [
"MIT"
] | 1 | 2021-09-29T23:06:03.000Z | 2021-09-29T23:06:03.000Z | # Solicitar al usuario numeros enteros hasta que digite un numero par
es_par = False
while es_par == False:
numero = int(input('Digite un numero entero: '))
if numero % 2 == 0:
es_par = True
print('El numero {} es par' .format(numero))
else:
continue
| 22.384615 | 69 | 0.618557 |
e0b9867df18204f1a874f74c57aa29f4b44844dc | 14,909 | py | Python | samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py | tek08/openapi-generator | 5d14b46a5e305b8f1c541b1d6d96751f0626e363 | [
"Apache-2.0"
] | null | null | null | samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py | tek08/openapi-generator | 5d14b46a5e305b8f1c541b1d6d96751f0626e363 | [
"Apache-2.0"
] | null | null | null | samples/client/petstore/python-experimental/petstore_api/api/another_fake_api.py | tek08/openapi-generator | 5d14b46a5e305b8f1c541b1d6d96751f0626e363 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
... | 37.087065 | 174 | 0.533839 |
0def5450a5228e2c7db905a134eb07ca1765e49d | 2,671 | py | Python | app/views/community.py | SitVisVobisCum/FCS-ClubHub | ee9039e90773e2c70797393ee842df72a151b231 | [
"MIT"
] | null | null | null | app/views/community.py | SitVisVobisCum/FCS-ClubHub | ee9039e90773e2c70797393ee842df72a151b231 | [
"MIT"
] | null | null | null | app/views/community.py | SitVisVobisCum/FCS-ClubHub | ee9039e90773e2c70797393ee842df72a151b231 | [
"MIT"
] | null | null | null | from flask import abort, Blueprint, redirect, request
from flask.templating import render_template
from flask.helpers import url_for
from flask_login import current_user, login_required
from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField
from wtforms.validators import DataRequired, Length, Va... | 37.619718 | 100 | 0.664171 |
c26c1287e97807998b34541c509866dedfa12498 | 42 | py | Python | examples/colab/test.py | dgupgu/hub | 69c6d5f0bee309cb419b76bb1e34acf82b18bad0 | [
"Apache-2.0"
] | null | null | null | examples/colab/test.py | dgupgu/hub | 69c6d5f0bee309cb419b76bb1e34acf82b18bad0 | [
"Apache-2.0"
] | null | null | null | examples/colab/test.py | dgupgu/hub | 69c6d5f0bee309cb419b76bb1e34acf82b18bad0 | [
"Apache-2.0"
] | null | null | null | import tensorflow_macos as tf
print("hi")
| 14 | 29 | 0.785714 |
5134bee6779558156c58d2a81e7fdae4f922d3a8 | 2,681 | py | Python | src/stage_01_load_and_train.py | DeepranjanG/Bert-DVC | 18f882c02fe648cf646877c1105087bf5403fb74 | [
"MIT"
] | null | null | null | src/stage_01_load_and_train.py | DeepranjanG/Bert-DVC | 18f882c02fe648cf646877c1105087bf5403fb74 | [
"MIT"
] | null | null | null | src/stage_01_load_and_train.py | DeepranjanG/Bert-DVC | 18f882c02fe648cf646877c1105087bf5403fb74 | [
"MIT"
] | null | null | null | from src.utils.all_utils import read_yaml
import pandas as pd
import argparse
import os
import shutil
from tqdm import tqdm
import logging
from transformers import AutoConfig, AutoTokenizer
import torch
import torch.nn as nn
import torch.optim as optim
from torch.utils.data import DataLoader
from src.utils.dataset imp... | 33.5125 | 146 | 0.724357 |
462fd72816fbc1d4ecc0d8d4fd7df820952035d6 | 19,754 | py | Python | python/ccxt/async_support/base/exchange.py | MitchellTesla/ccxt | 613d5e8a0c9156c24ef2e57f8b0e5c84527558fd | [
"MIT"
] | 1 | 2022-02-18T03:54:29.000Z | 2022-02-18T03:54:29.000Z | python/ccxt/async_support/base/exchange.py | MitchellTesla/ccxt | 613d5e8a0c9156c24ef2e57f8b0e5c84527558fd | [
"MIT"
] | null | null | null | python/ccxt/async_support/base/exchange.py | MitchellTesla/ccxt | 613d5e8a0c9156c24ef2e57f8b0e5c84527558fd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
__version__ = '1.81.74'
# -----------------------------------------------------------------------------
import asyncio
import concurrent.futures
import socket
import certifi
import aiohttp
import ssl
import sys
i... | 46.154206 | 363 | 0.62924 |
b09c69e9ee1938d81b919201ffa960d1dc0a2b55 | 51,811 | py | Python | tests/validation/cattlevalidationtest/core/common_fixtures.py | aruneli/rancher-tests | f0ff5539420ac354fc951ed239b002cecde52505 | [
"Apache-2.0"
] | null | null | null | tests/validation/cattlevalidationtest/core/common_fixtures.py | aruneli/rancher-tests | f0ff5539420ac354fc951ed239b002cecde52505 | [
"Apache-2.0"
] | null | null | null | tests/validation/cattlevalidationtest/core/common_fixtures.py | aruneli/rancher-tests | f0ff5539420ac354fc951ed239b002cecde52505 | [
"Apache-2.0"
] | null | null | null | from cattle import from_env
import pytest
import random
import requests
import os
import time
import logging
import paramiko
import inspect
import re
from docker import Client
import pickle
import sys
FORMAT = "\n[ %(asctime)s %(levelname)s %(filename)s:%(lineno)s - %(funcName)20s() ] %(message)s \n"
logging.basicConf... | 33.190903 | 100 | 0.618228 |
e46bee00155e8e3c8b45679a868f226dc2c11aa9 | 1,945 | py | Python | test/runner_test.py | saavedra29/rgkit_py3 | 27d024567ebc6f852f47d1ff5c00df081abbd0d4 | [
"Unlicense"
] | 1 | 2021-11-04T22:19:59.000Z | 2021-11-04T22:19:59.000Z | test/runner_test.py | saavedra29/rgkit_py3 | 27d024567ebc6f852f47d1ff5c00df081abbd0d4 | [
"Unlicense"
] | null | null | null | test/runner_test.py | saavedra29/rgkit_py3 | 27d024567ebc6f852f47d1ff5c00df081abbd0d4 | [
"Unlicense"
] | 2 | 2021-02-16T09:37:47.000Z | 2021-11-04T22:30:51.000Z |
import unittest
import rgkit
from rgkit.run import Runner, Options
from rgkit.settings import settings as rgkit_settings
import rgkit.gamestate as gamestate
class TestRobot:
def act(self, game):
return ['guard']
called = False
class TestRunner(unittest.TestCase):
def test_default_options(self):
... | 30.390625 | 63 | 0.6509 |
45ed83f7bde517c32844f4dee23d2b787bdb865c | 5,406 | py | Python | compute_evol_indices.py | loodvn/EVE | a4c7be9dbd455eeb4aeeb4913dd85e6873db221c | [
"MIT"
] | null | null | null | compute_evol_indices.py | loodvn/EVE | a4c7be9dbd455eeb4aeeb4913dd85e6873db221c | [
"MIT"
] | null | null | null | compute_evol_indices.py | loodvn/EVE | a4c7be9dbd455eeb4aeeb4913dd85e6873db221c | [
"MIT"
] | null | null | null | import os,sys
import json
import argparse
import pandas as pd
import torch
from EVE import VAE_model
from utils import data_utils
if __name__=='__main__':
parser = argparse.ArgumentParser(description='Evol indices')
parser.add_argument('--MSA_data_folder', type=str, help='Folder where MSAs are stored')
p... | 55.163265 | 208 | 0.706437 |
93783bcc955338271c107107c3ff163149fae8a7 | 4,039 | py | Python | exp3/architecture.py | raghakot/deep-learning-experiments | 8ae0a67825ba0d6d863fd253d534754c21d87056 | [
"MIT"
] | 7 | 2017-10-29T10:25:46.000Z | 2021-07-11T06:07:26.000Z | exp3/architecture.py | raghakot/deep-learning-experiments | 8ae0a67825ba0d6d863fd253d534754c21d87056 | [
"MIT"
] | null | null | null | exp3/architecture.py | raghakot/deep-learning-experiments | 8ae0a67825ba0d6d863fd253d534754c21d87056 | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
from keras import backend as K
from keras.layers import Lambda, Layer
class Connection(Layer):
"""Takes a list of inputs, resizes them to the same shape, and outputs a weighted merge.
"""
def __init__(self, init_value=0.5, merge_mode='concat',
r... | 37.055046 | 111 | 0.641495 |
204a3e045d96a6b254b5e6569093671d909cf347 | 2,919 | py | Python | openstack/NYI/make_vpc.py | Roddd/cloud-creator | 05f9c3aa052759bc16a999ebe516fe35e99fd490 | [
"Apache-2.0"
] | 1 | 2015-10-20T05:29:08.000Z | 2015-10-20T05:29:08.000Z | openstack/NYI/make_vpc.py | Roddd/cloud-creator | 05f9c3aa052759bc16a999ebe516fe35e99fd490 | [
"Apache-2.0"
] | null | null | null | openstack/NYI/make_vpc.py | Roddd/cloud-creator | 05f9c3aa052759bc16a999ebe516fe35e99fd490 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# Title make-tenent.py
# Description Create a tenent on OpenStack
# Author I-Ming Chen <imchen@red5studios.com>
# Date 2014-12-03
# Version 0.0.1
# Usage ./make-tenent.py
# ./make-tenent.py --cidrblock 160 --profile prod-sa-east-1 [--dryrun] [--... | 33.94186 | 110 | 0.620761 |
2c4e661ed15b57261c7db38103927ff488fd4f8b | 2,245 | py | Python | backend/module_options_3_4/urls.py | cb-abd-dev/module-options-3-4 | a50762c37f7e74d1298d54bf91837c3d0af17ede | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/module_options_3_4/urls.py | cb-abd-dev/module-options-3-4 | a50762c37f7e74d1298d54bf91837c3d0af17ede | [
"FTL",
"AML",
"RSA-MD"
] | 38 | 2021-09-07T12:35:08.000Z | 2022-02-06T13:30:50.000Z | backend/module_options_3_4/urls.py | cb-abd-dev/module-options-3-4 | a50762c37f7e74d1298d54bf91837c3d0af17ede | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """module_options_3_4 URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
... | 35.078125 | 87 | 0.716704 |
fa359693f2333d6574feae0819da184484aa25bd | 4,554 | py | Python | tools/tflitefile_tool/saver/config_saver.py | chogba6/ONE | 3d35259f89ee3109cfd35ab6f38c231904487f3b | [
"Apache-2.0"
] | 255 | 2020-05-22T07:45:29.000Z | 2022-03-29T23:58:22.000Z | tools/tflitefile_tool/saver/config_saver.py | chogba6/ONE | 3d35259f89ee3109cfd35ab6f38c231904487f3b | [
"Apache-2.0"
] | 5,102 | 2020-05-22T07:48:33.000Z | 2022-03-31T23:43:39.000Z | tools/tflitefile_tool/saver/config_saver.py | chogba6/ONE | 3d35259f89ee3109cfd35ab6f38c231904487f3b | [
"Apache-2.0"
] | 120 | 2020-05-22T07:51:08.000Z | 2022-02-16T19:08:05.000Z | #!/usr/bin/python
# Copyright (c) 2019 Samsung Electronics 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/LICENSE-2.0
#
#... | 37.02439 | 88 | 0.624067 |
377e9ac76c97614c127f7f03349f3c847cb76574 | 7,296 | py | Python | rgtn.py | gylx/RGTN | bfd2b8cadfbdab824be53d5d0700b8d9b0533eb1 | [
"MIT"
] | 1 | 2021-06-16T01:36:01.000Z | 2021-06-16T01:36:01.000Z | rgtn.py | gylx/RGTN | bfd2b8cadfbdab824be53d5d0700b8d9b0533eb1 | [
"MIT"
] | null | null | null | rgtn.py | gylx/RGTN | bfd2b8cadfbdab824be53d5d0700b8d9b0533eb1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 15 17:59:11 2020
@author: yaoleixu
"""
# ============================================================================
# Import libraries
import numpy as np
import tensorflow as tf
tf.random.set_seed(0)
# =====================================... | 33.163636 | 117 | 0.532346 |
f15e1947140185526a3fa7681bbf1e470344d628 | 4,295 | py | Python | kubernetes/client/models/v1_flocker_volume_source.py | kevingessner/python | 3f4d09d260cf0839fae8173852c69e0419188454 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_flocker_volume_source.py | kevingessner/python | 3f4d09d260cf0839fae8173852c69e0419188454 | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v1_flocker_volume_source.py | kevingessner/python | 3f4d09d260cf0839fae8173852c69e0419188454 | [
"Apache-2.0"
] | 1 | 2018-07-19T16:37:20.000Z | 2018-07-19T16:37:20.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.9.3
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | 27.709677 | 116 | 0.586263 |
fe7a373bef1212db823b282f0d34bfe4584a483d | 3,259 | py | Python | tg_bot/keyboards/suburbans.py | EeOneDown/spbu4u | 2ad01088fb167c80c53b757a0247fc5cde34c20f | [
"Apache-2.0"
] | 30 | 2017-09-14T20:25:43.000Z | 2022-03-12T09:55:35.000Z | tg_bot/keyboards/suburbans.py | EeOneDown/spbu4u | 2ad01088fb167c80c53b757a0247fc5cde34c20f | [
"Apache-2.0"
] | 59 | 2018-01-12T18:29:24.000Z | 2019-03-08T21:08:40.000Z | tg_bot/keyboards/suburbans.py | EeOneDown/spbu4u | 2ad01088fb167c80c53b757a0247fc5cde34c20f | [
"Apache-2.0"
] | 8 | 2017-12-01T18:36:04.000Z | 2020-11-22T00:36:15.000Z | from telebot.types import InlineKeyboardMarkup, InlineKeyboardButton
from app.constants import all_stations
def start_station_keyboard():
"""
Creates start station keyboard
:return: start station keyboard
:rtype: InlineKeyboardMarkup
"""
inline_keyboard = InlineKeyboardMarkup(row_width=1)
... | 28.587719 | 74 | 0.662166 |
943330a9273b3a445c6672f658d20b95093e9ff8 | 1,096 | py | Python | tests/toynet_test.py | krishnapalS/NiftyNet | c31019b14137d5a39d59c81221fe2b8e066b38b4 | [
"Apache-2.0"
] | null | null | null | tests/toynet_test.py | krishnapalS/NiftyNet | c31019b14137d5a39d59c81221fe2b8e066b38b4 | [
"Apache-2.0"
] | null | null | null | tests/toynet_test.py | krishnapalS/NiftyNet | c31019b14137d5a39d59c81221fe2b8e066b38b4 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, print_function
import tensorflow as tf
from niftynet.network.toynet import ToyNet
from tests.niftynet_testcase import NiftyNetTestCase
class ToyNetTest(NiftyNetTestCase):
def test_3d_shape(self):
input_shape = (2, 32, 32, 32, 1)
x = tf.ones(input_... | 30.444444 | 65 | 0.62865 |
16933955b5eda9c98cc416cd874b2b6069570676 | 2,566 | py | Python | src/unicon/plugins/nxos/patterns.py | fpessoanunes/unicon.plugins | 663ea096096d96c3080c7cc0ddbbd49596f34afe | [
"Apache-2.0"
] | null | null | null | src/unicon/plugins/nxos/patterns.py | fpessoanunes/unicon.plugins | 663ea096096d96c3080c7cc0ddbbd49596f34afe | [
"Apache-2.0"
] | null | null | null | src/unicon/plugins/nxos/patterns.py | fpessoanunes/unicon.plugins | 663ea096096d96c3080c7cc0ddbbd49596f34afe | [
"Apache-2.0"
] | 2 | 2021-10-19T16:11:56.000Z | 2021-11-23T09:58:34.000Z | """
This module contains all the patterns required in the NXOS
implementation.
"""
from unicon.plugins.generic.patterns import GenericPatterns
class NxosPatterns(GenericPatterns):
def __init__(self):
super().__init__()
self.enable_prompt = r'^(.*?)([Rr]outer|[Ss]witch|%N)(\(standby\))?(\(m... | 64.15 | 128 | 0.598207 |
c272bfb8a70dafddebed7304a38545147a6c7d55 | 8,860 | py | Python | numpy_demo/matrixlib/tests/test_masked_matrix.py | mpmkp2020/numpy_demo | 796262e06c84b7e9aa446b244a3faf3891d9ece1 | [
"BSD-3-Clause"
] | null | null | null | numpy_demo/matrixlib/tests/test_masked_matrix.py | mpmkp2020/numpy_demo | 796262e06c84b7e9aa446b244a3faf3891d9ece1 | [
"BSD-3-Clause"
] | null | null | null | numpy_demo/matrixlib/tests/test_masked_matrix.py | mpmkp2020/numpy_demo | 796262e06c84b7e9aa446b244a3faf3891d9ece1 | [
"BSD-3-Clause"
] | null | null | null | import numpy_demo as np
from numpy_demo.ma.testutils import (assert_, assert_equal, assert_raises,
assert_array_equal)
from numpy_demo.ma.core import (masked_array, masked_values, masked, allequal,
MaskType, getmask, MaskedArray, nomask,
... | 38.521739 | 78 | 0.570316 |
a4cffb4ac66309e4bddd794de4525b5f5563f13c | 10,300 | py | Python | v6.0.6/log/fortios_log_custom_field.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 14 | 2018-09-25T20:35:25.000Z | 2021-07-14T04:30:54.000Z | v6.0.6/log/fortios_log_custom_field.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 32 | 2018-10-09T04:13:42.000Z | 2020-05-11T07:20:28.000Z | v6.0.6/log/fortios_log_custom_field.py | fortinet-solutions-cse/ansible_fgt_modules | c45fba49258d7c9705e7a8fd9c2a09ea4c8a4719 | [
"Apache-2.0"
] | 11 | 2018-10-09T00:14:53.000Z | 2021-11-03T10:54:09.000Z | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | 29.94186 | 99 | 0.602233 |
55618c55af78eccafe6a59c05ce280b195f3e8f8 | 5,777 | py | Python | nncf/common/accuracy_aware_training/runner.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | null | null | null | nncf/common/accuracy_aware_training/runner.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | 1 | 2021-07-23T07:46:52.000Z | 2021-07-23T07:46:52.000Z | nncf/common/accuracy_aware_training/runner.py | sarthakpati/nncf | 29ad62c664c1dd53b3c8c50fc001a1b36bd1e8ac | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2021 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 in writin... | 40.683099 | 106 | 0.702787 |
64af02296524191ffbf3570feac4d01b2823349c | 4,010 | py | Python | utils/etp_utils.py | Whitecoin-XWC/Whitecoin-CrosschainMidware | 7560d80f3bac09250ed365e7e6b9239209e7e502 | [
"Apache-2.0"
] | null | null | null | utils/etp_utils.py | Whitecoin-XWC/Whitecoin-CrosschainMidware | 7560d80f3bac09250ed365e7e6b9239209e7e502 | [
"Apache-2.0"
] | null | null | null | utils/etp_utils.py | Whitecoin-XWC/Whitecoin-CrosschainMidware | 7560d80f3bac09250ed365e7e6b9239209e7e502 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# from __future__ import print_function
import requests
import json
from config import config
import sys
import shutil
import os
from math import pow,floor
import time
from service import logger
import traceback
temp_config = config["development"]
def etp_request(method, args):
url = "htt... | 30.150376 | 117 | 0.621945 |
680c217f7b1b1f2c6b484e533f33f6af9c2249d7 | 4,394 | py | Python | data process/analyse_us.py | gizzleon/EmojiInfoVis | 81e0a80fcc4182853c9105bcc98100b29167887c | [
"BSD-2-Clause"
] | null | null | null | data process/analyse_us.py | gizzleon/EmojiInfoVis | 81e0a80fcc4182853c9105bcc98100b29167887c | [
"BSD-2-Clause"
] | null | null | null | data process/analyse_us.py | gizzleon/EmojiInfoVis | 81e0a80fcc4182853c9105bcc98100b29167887c | [
"BSD-2-Clause"
] | null | null | null |
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
from scipy.stats import mannwhitneyu
import json
import csv
import re
us_state_abbrev = { #https://gist.github.com/rogerallen/1583593
'Alabama': 'AL',
'Alaska': 'AK',
'Arizona': 'AZ',
'Arkansas': 'AR',
'California': 'CA',
'... | 27.63522 | 111 | 0.502959 |
7d8e804842b2f41ad9258f48c73f3591b743801c | 491 | py | Python | visitey_backend/wsgi.py | Visitey/Visitey-Server | e91c0ac52e943af9a739c42a6a3fe8603994c6b6 | [
"MIT"
] | 1 | 2018-06-06T09:46:00.000Z | 2018-06-06T09:46:00.000Z | visitey_backend/wsgi.py | Visitey/Visitey-Server | e91c0ac52e943af9a739c42a6a3fe8603994c6b6 | [
"MIT"
] | null | null | null | visitey_backend/wsgi.py | Visitey/Visitey-Server | e91c0ac52e943af9a739c42a6a3fe8603994c6b6 | [
"MIT"
] | null | null | null | """
WSGI config for VISITEY project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
from whitenoise.django import Djang... | 25.842105 | 78 | 0.806517 |
e6fd33e772e5f0f24a8c8b8597c395a378b69eca | 6,377 | py | Python | kelvin/tests/test_ft_ccsd.py | awhite862/kelvin | a2e5c3acd8bbf9a9b3e88f321849374e7070f000 | [
"MIT"
] | 1 | 2021-08-05T15:53:46.000Z | 2021-08-05T15:53:46.000Z | kelvin/tests/test_ft_ccsd.py | awhite862/kelvin | a2e5c3acd8bbf9a9b3e88f321849374e7070f000 | [
"MIT"
] | null | null | null | kelvin/tests/test_ft_ccsd.py | awhite862/kelvin | a2e5c3acd8bbf9a9b3e88f321849374e7070f000 | [
"MIT"
] | 1 | 2022-01-13T18:41:06.000Z | 2022-01-13T18:41:06.000Z | import unittest
import numpy
from pyscf import gto, scf
from kelvin.ccsd import ccsd
from kelvin.fci import FCI
from kelvin.scf_system import SCFSystem
from kelvin.ueg_system import UEGSystem
from kelvin.pueg_system import PUEGSystem
def compute_ft_ccsd(m, T, mu):
sys = SCFSystem(m, T, mu)
ccsdT = ccsd(sys, T... | 30.658654 | 72 | 0.504783 |
c9352c775bb875dbffc80377b7241b7153934cca | 61,466 | py | Python | salt/modules/tls.py | johnj/salt | b23656fa5ee24047c43ac702d6796a700570f749 | [
"Apache-2.0"
] | 5 | 2017-02-07T05:39:29.000Z | 2020-06-13T02:07:33.000Z | salt/modules/tls.py | johnj/salt | b23656fa5ee24047c43ac702d6796a700570f749 | [
"Apache-2.0"
] | 86 | 2017-01-27T11:54:46.000Z | 2020-05-20T06:25:26.000Z | salt/modules/tls.py | johnj/salt | b23656fa5ee24047c43ac702d6796a700570f749 | [
"Apache-2.0"
] | 11 | 2017-01-26T19:36:29.000Z | 2021-12-11T07:54:16.000Z | # -*- coding: utf-8 -*-
r'''
A salt module for SSL/TLS.
Can create a Certificate Authority (CA)
or use Self-Signed certificates.
:depends: PyOpenSSL Python module (0.10 or later, 0.14 or later for X509
extension support)
:configuration: Add the following values in /etc/salt/minion for the CA module
to functio... | 30.856426 | 112 | 0.574236 |
df8db68cf451a412235466e6790ef01e13889297 | 670 | py | Python | manage.py | richardkefa/project-rating | 533f48522ee4d578ec7efb46603ddda10087601f | [
"MIT"
] | null | null | null | manage.py | richardkefa/project-rating | 533f48522ee4d578ec7efb46603ddda10087601f | [
"MIT"
] | null | null | null | manage.py | richardkefa/project-rating | 533f48522ee4d578ec7efb46603ddda10087601f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'project_review.settings')
try:
from django.core.management import execute_from_command_line
exce... | 29.130435 | 78 | 0.68209 |
798569a5e1168143cf96f2b267aa20ce532d0e23 | 6,997 | py | Python | venv/Lib/site-packages/google/protobuf/descriptor_database.py | parthpankajtiwary/keras-groundup | 0df0844e7d9dca741fad0965761a12f72ee51f07 | [
"MIT"
] | 1 | 2021-11-25T02:14:23.000Z | 2021-11-25T02:14:23.000Z | venv/Lib/site-packages/google/protobuf/descriptor_database.py | parthpankajtiwary/keras-groundup | 0df0844e7d9dca741fad0965761a12f72ee51f07 | [
"MIT"
] | 1 | 2020-04-23T02:34:53.000Z | 2020-04-23T02:34:53.000Z | venv/Lib/site-packages/google/protobuf/descriptor_database.py | parthpankajtiwary/keras-groundup | 0df0844e7d9dca741fad0965761a12f72ee51f07 | [
"MIT"
] | 1 | 2020-04-27T15:07:54.000Z | 2020-04-27T15:07:54.000Z | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... | 39.308989 | 81 | 0.712305 |
1007c9d663d5179e2193a1296061af3c0595a16a | 4,141 | py | Python | guild/uat.py | msarahan/guildai | 99bdd09683291dbc206b6dde1b327d47401d29eb | [
"Apache-2.0"
] | null | null | null | guild/uat.py | msarahan/guildai | 99bdd09683291dbc206b6dde1b327d47401d29eb | [
"Apache-2.0"
] | null | null | null | guild/uat.py | msarahan/guildai | 99bdd09683291dbc206b6dde1b327d47401d29eb | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-2022 TensorHub, 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 to in writ... | 27.97973 | 88 | 0.64284 |
2e8d2eb293ec57cce068d1a611a39ced0bc82f5f | 1,447 | py | Python | tests/cim/data_generator/test_vessel_parser.py | yangboz/maro | 0973783e55ca07bf8e177910c9d47854117a4ea8 | [
"MIT"
] | 598 | 2020-09-23T00:50:22.000Z | 2022-03-31T08:12:54.000Z | tests/cim/data_generator/test_vessel_parser.py | yangboz/maro | 0973783e55ca07bf8e177910c9d47854117a4ea8 | [
"MIT"
] | 235 | 2020-09-22T10:20:48.000Z | 2022-03-31T02:10:03.000Z | tests/cim/data_generator/test_vessel_parser.py | yangboz/maro | 0973783e55ca07bf8e177910c9d47854117a4ea8 | [
"MIT"
] | 116 | 2020-09-22T09:19:04.000Z | 2022-02-12T05:04:07.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
import unittest
import yaml
from maro.data_lib.cim.parsers import parse_vessels
conf_str = """
vessels:
rt1_vessel_001:
capacity: 92400
parking:
duration: 1
noise: 0
route:
initial_port_name: supply_port_001
... | 24.116667 | 75 | 0.658604 |
00a6c814c753599537b050974da4354c88ba96e1 | 3,090 | py | Python | intro/part03-25_factorial/test/test_factorial.py | Hannah-Abi/python-pro-21 | 2ce32c4bf118054329d19afdf83c50561be1ada8 | [
"MIT"
] | null | null | null | intro/part03-25_factorial/test/test_factorial.py | Hannah-Abi/python-pro-21 | 2ce32c4bf118054329d19afdf83c50561be1ada8 | [
"MIT"
] | null | null | null | intro/part03-25_factorial/test/test_factorial.py | Hannah-Abi/python-pro-21 | 2ce32c4bf118054329d19afdf83c50561be1ada8 | [
"MIT"
] | null | null | null | import unittest
from unittest.mock import patch
from tmc import points
from tmc.utils import load_module, reload_module, get_stdout, sanitize
from functools import reduce
exercise = 'src.factorial'
def outputs_equal(str1 : str, str2 : str) -> bool:
return sanitize(str1.lower()) == sanitize(str2.lower())
def get... | 47.538462 | 141 | 0.583172 |
503b31aaf6a72d9f0cdf0e0b0477d46d8dd52a6a | 12,052 | py | Python | simple.py | rddy/isql | 68ca85f11a03c2b51560a79ddd1f7443fdbb46f6 | [
"Apache-2.0"
] | 30 | 2018-05-22T08:43:09.000Z | 2022-01-07T07:03:30.000Z | simple.py | rddy/isql | 68ca85f11a03c2b51560a79ddd1f7443fdbb46f6 | [
"Apache-2.0"
] | null | null | null | simple.py | rddy/isql | 68ca85f11a03c2b51560a79ddd1f7443fdbb46f6 | [
"Apache-2.0"
] | 3 | 2018-07-03T11:57:05.000Z | 2019-07-03T16:10:18.000Z | import numpy as np
import os
import dill
import tempfile
import tensorflow as tf
import zipfile
import baselines.common.tf_util as U
from baselines import logger
from baselines.common.schedules import LinearSchedule
from baselines import deepq
from baselines.deepq.replay_buffer import ReplayBuffer, PrioritizedReplayB... | 39.003236 | 136 | 0.61301 |
b908216a4ea640ce33169d661047c102b02eb48b | 93 | py | Python | pytestpackage/__init__.py | carlodri/pytestpackage | 7118c2d29cd66f0cbf8039bc7a33f2f57b10c0ce | [
"MIT"
] | null | null | null | pytestpackage/__init__.py | carlodri/pytestpackage | 7118c2d29cd66f0cbf8039bc7a33f2f57b10c0ce | [
"MIT"
] | null | null | null | pytestpackage/__init__.py | carlodri/pytestpackage | 7118c2d29cd66f0cbf8039bc7a33f2f57b10c0ce | [
"MIT"
] | null | null | null | __author__ = 'Carlo Dri'
__email__ = 'carlo.dri@gmail.com'
from .version import __version__
| 18.6 | 33 | 0.763441 |
b6208eeb28dc59de9b846258384dbcf082dc13aa | 187 | py | Python | chemflow/jobs/admin.py | donadef/django-test | 70479458833045fa6476aaf93c3f62cc1ad26df4 | [
"MIT"
] | null | null | null | chemflow/jobs/admin.py | donadef/django-test | 70479458833045fa6476aaf93c3f62cc1ad26df4 | [
"MIT"
] | 2 | 2019-01-31T11:15:36.000Z | 2019-01-31T11:19:32.000Z | chemflow/jobs/admin.py | donadef/django-test | 70479458833045fa6476aaf93c3f62cc1ad26df4 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth import get_user_model
from django.db import models
from .models import Job
User = get_user_model()
admin.site.register(Job)
| 15.583333 | 46 | 0.802139 |
f9970484fe5b908fcfdf14a63635f5cf235acdc3 | 211 | py | Python | kattis/basketballoneonone.py | terror/Solutions | 1ad33daec95b565a38ac4730261593bcf249ac86 | [
"CC0-1.0"
] | 2 | 2021-04-05T14:26:37.000Z | 2021-06-10T04:22:01.000Z | kattis/basketballoneonone.py | terror/Solutions | 1ad33daec95b565a38ac4730261593bcf249ac86 | [
"CC0-1.0"
] | null | null | null | kattis/basketballoneonone.py | terror/Solutions | 1ad33daec95b565a38ac4730261593bcf249ac86 | [
"CC0-1.0"
] | null | null | null | scores = list(input())
a = 0
b = 0
for i in range(len(scores)):
if scores[i] == 'A':
a += int(scores[i + 1])
if scores[i] == 'B':
b += int(scores[i + 1])
if a > b:
print("A")
else:
print("B")
| 13.1875 | 28 | 0.488152 |
7e6a9776e54e4cf9c5cd87ffec3492c1f7057954 | 4,442 | py | Python | src/wallet/wallet_action_store.py | cryptonoob42/chia-blockchain | b6506a67d5b5e2e54c844074872e936dbde5a834 | [
"Apache-2.0"
] | null | null | null | src/wallet/wallet_action_store.py | cryptonoob42/chia-blockchain | b6506a67d5b5e2e54c844074872e936dbde5a834 | [
"Apache-2.0"
] | null | null | null | src/wallet/wallet_action_store.py | cryptonoob42/chia-blockchain | b6506a67d5b5e2e54c844074872e936dbde5a834 | [
"Apache-2.0"
] | null | null | null | from typing import Optional, List
import aiosqlite
from src.util.ints import uint32
from src.wallet.util.wallet_types import WalletType
from src.wallet.wallet_action import WalletAction
class WalletActionStore:
"""
WalletActionStore keeps track of all wallet actions that require persistence.
Used by Colo... | 28.474359 | 88 | 0.55448 |
c7e98cdecd3b281523a5bb1c383cc9325d6b404c | 231 | py | Python | venv/app/Main.py | KarateJB/Python.Thsrc | 5a61479bdaf2901b8a5a03a8f786a6e65105db0f | [
"MIT"
] | null | null | null | venv/app/Main.py | KarateJB/Python.Thsrc | 5a61479bdaf2901b8a5a03a8f786a6e65105db0f | [
"MIT"
] | null | null | null | venv/app/Main.py | KarateJB/Python.Thsrc | 5a61479bdaf2901b8a5a03a8f786a6e65105db0f | [
"MIT"
] | null | null | null |
# coding: utf-8
from Apopnd import Apopnd
from Apoload import Apoload
def main():
target_file_path = Apopnd().Apopnd_Thsr()
print(target_file_path)
Apoload(target_file_path)
if __name__ == "__main__":
main()
| 14.4375 | 45 | 0.701299 |
70c55eae641b7da911d70314cb031cdf2543a906 | 5,077 | py | Python | save_nets.py | akinoriosamura/MobileFaceNet_TF | 012dd53d7244e5019a9d10b008abb8c8a6da0d2a | [
"Apache-2.0"
] | null | null | null | save_nets.py | akinoriosamura/MobileFaceNet_TF | 012dd53d7244e5019a9d10b008abb8c8a6da0d2a | [
"Apache-2.0"
] | null | null | null | save_nets.py | akinoriosamura/MobileFaceNet_TF | 012dd53d7244e5019a9d10b008abb8c8a6da0d2a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# /usr/bin/env/python3
'''
test pretrained model.
Author: aiboy.wei@outlook.com .
'''
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from utils.data_process import load_data
from verification import evaluate
from scipy.optimize imp... | 40.943548 | 129 | 0.68958 |
1b467bad5c1e55673ed7a958e00e46b5dab62d38 | 14,684 | py | Python | watcher/tests/db/test_audit.py | mail2nsrajesh/watcher | 5f179609d0ee145fc7957972c83593cce242884d | [
"Apache-2.0"
] | null | null | null | watcher/tests/db/test_audit.py | mail2nsrajesh/watcher | 5f179609d0ee145fc7957972c83593cce242884d | [
"Apache-2.0"
] | null | null | null | watcher/tests/db/test_audit.py | mail2nsrajesh/watcher | 5f179609d0ee145fc7957972c83593cce242884d | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 OpenStack Foundation
# 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 requ... | 37.459184 | 78 | 0.630482 |
3d51a68f82ea0e29cf4797d98b449257d6c6f290 | 3,233 | py | Python | tests/test_device/test_mlu/test_mlu_parallel.py | Qiza-lyhm/mmcv-1 | 362a90f8bfffe62d5802925944f540ed16b2731e | [
"Apache-2.0"
] | null | null | null | tests/test_device/test_mlu/test_mlu_parallel.py | Qiza-lyhm/mmcv-1 | 362a90f8bfffe62d5802925944f540ed16b2731e | [
"Apache-2.0"
] | null | null | null | tests/test_device/test_mlu/test_mlu_parallel.py | Qiza-lyhm/mmcv-1 | 362a90f8bfffe62d5802925944f540ed16b2731e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) OpenMMLab. All rights reserved.
from unittest.mock import MagicMock, patch
import pytest
import torch
import torch.nn as nn
from mmcv.device.mlu import (IS_MLU_AVAILABLE, MLUDataParallel,
MLUDistributedDataParallel)
from mmcv.device.mlu._functions import Scatter, scatter
f... | 32.656566 | 77 | 0.645221 |
dd56b6a807700b0b0edbe5f7487a283948e254ef | 8,050 | py | Python | jikipedia/__init__.py | daizihan233/jikipedia-api | 0ea03ab1862bb9c19ef4f253e8a38d59176aa57b | [
"MIT"
] | null | null | null | jikipedia/__init__.py | daizihan233/jikipedia-api | 0ea03ab1862bb9c19ef4f253e8a38d59176aa57b | [
"MIT"
] | null | null | null | jikipedia/__init__.py | daizihan233/jikipedia-api | 0ea03ab1862bb9c19ef4f253e8a38d59176aa57b | [
"MIT"
] | null | null | null | import random
import requests
import json
import base64
class Jikipedia:
# 获取 用户基础信息
def __init__(self, phone: str, password: str):
self.phone = phone
self.password = password
if len(phone) != 11:
raise ValueError('手机号码长度不正确')
# 生成 明文XID(纯Python实现)
def generate_pla... | 37.793427 | 119 | 0.516646 |
6c03c7f9d8b81b2268b567960255efb1b6308669 | 193 | py | Python | pyProj/ind1.py | surai5a/laba_2_13 | 126120334a697911a08597c38ad5edfae80d97a6 | [
"MIT"
] | null | null | null | pyProj/ind1.py | surai5a/laba_2_13 | 126120334a697911a08597c38ad5edfae80d97a6 | [
"MIT"
] | null | null | null | pyProj/ind1.py | surai5a/laba_2_13 | 126120334a697911a08597c38ad5edfae80d97a6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from mod1 import func1
if __name__ == "__main__":
a = int(input("a? "))
b = int(input("b? "))
test = func1(a, b)
print(test())
| 16.083333 | 26 | 0.533679 |
a599e31b997ceaf89cafc293e81649f51a2645c8 | 301 | py | Python | test/keywords.py | Filco306/NL-Augmenter | d8655d172b651a8cbf56891c35476328a3a0765b | [
"MIT"
] | 583 | 2021-06-12T02:30:26.000Z | 2022-03-28T05:57:45.000Z | test/keywords.py | Filco306/NL-Augmenter | d8655d172b651a8cbf56891c35476328a3a0765b | [
"MIT"
] | 246 | 2021-06-11T15:49:36.000Z | 2022-02-02T12:17:41.000Z | test/keywords.py | Filco306/NL-Augmenter | d8655d172b651a8cbf56891c35476328a3a0765b | [
"MIT"
] | 189 | 2021-06-15T14:14:15.000Z | 2022-03-15T22:10:46.000Z | def keywords_in_file():
"""
Loads all the keywords from the keywords.md file. Mainly loads all the words which have an indentation.
"""
with open("docs/keywords.md") as kfile:
keywords = [line.split("`")[1] for line in kfile.readlines() if " " in line]
return keywords | 43 | 107 | 0.647841 |
419f903aef7e0eff7a41a9efce3c518b00087172 | 2,435 | py | Python | optimade_gateway/models/search.py | Materials-Consortia/optimade-gateway | b73efe755d53f38cb23cb90805742de7149181aa | [
"MIT"
] | 3 | 2021-04-18T19:49:51.000Z | 2022-01-29T17:50:34.000Z | optimade_gateway/models/search.py | Materials-Consortia/optimade-gateway | b73efe755d53f38cb23cb90805742de7149181aa | [
"MIT"
] | 162 | 2021-04-19T21:11:52.000Z | 2022-03-30T06:45:27.000Z | optimade_gateway/models/search.py | Materials-Consortia/optimade-gateway | b73efe755d53f38cb23cb90805742de7149181aa | [
"MIT"
] | null | null | null | """Pydantic models/schemas for the Search resource."""
# pylint: disable=no-self-argument,no-self-use
from typing import Set
import warnings
from pydantic import AnyUrl, BaseModel, Field, root_validator, validator
from optimade_gateway.models.queries import OptimadeQueryParameters
from optimade_gateway.warnings impor... | 34.785714 | 90 | 0.632444 |
116845b71538be60492db918488e925666e6757f | 9,981 | py | Python | trac/tests/wikisyntax.py | haskell-infra/trac | 5e086948718893ede9965ea4ce3625da32676730 | [
"BSD-3-Clause"
] | null | null | null | trac/tests/wikisyntax.py | haskell-infra/trac | 5e086948718893ede9965ea4ce3625da32676730 | [
"BSD-3-Clause"
] | 1 | 2019-03-20T19:13:53.000Z | 2019-08-14T20:15:09.000Z | trac/tests/wikisyntax.py | haskell-infra/trac | 5e086948718893ede9965ea4ce3625da32676730 | [
"BSD-3-Clause"
] | 2 | 2019-03-20T01:23:30.000Z | 2019-12-06T16:13:07.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2013 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.org/wiki/TracLicense.
#
# This software consi... | 48.926471 | 262 | 0.648632 |
9b2e982e63e79c552ea37fee89450198d47b6528 | 12,933 | py | Python | openfermioncirq/experiments/hfvqe/analysis.py | kevinsung/OpenFermion-Cirq | adb2d1673637551f97524705605bb7d266455472 | [
"Apache-2.0"
] | null | null | null | openfermioncirq/experiments/hfvqe/analysis.py | kevinsung/OpenFermion-Cirq | adb2d1673637551f97524705605bb7d266455472 | [
"Apache-2.0"
] | null | null | null | openfermioncirq/experiments/hfvqe/analysis.py | kevinsung/OpenFermion-Cirq | adb2d1673637551f97524705605bb7d266455472 | [
"Apache-2.0"
] | null | null | null | from typing import Dict, List, Optional
import numpy as np
from openfermion.utils import wedge
from openfermion.ops import InteractionRDM
import openfermioncirq.experiments.hfvqe.util as ccu
from openfermioncirq.experiments.hfvqe.objective import generate_hamiltonian
# pylint: disable=C
def kdelta(i: int, j: int):
... | 43.11 | 102 | 0.57187 |
0db987b902255bdb04b211523c96ae756a63bd3e | 803 | py | Python | app/core/test/test_admin.py | amolmorey/recipe-app-api | c658614637eb8ca636a32ac201a1eb08f7f2315f | [
"MIT"
] | null | null | null | app/core/test/test_admin.py | amolmorey/recipe-app-api | c658614637eb8ca636a32ac201a1eb08f7f2315f | [
"MIT"
] | null | null | null | app/core/test/test_admin.py | amolmorey/recipe-app-api | c658614637eb8ca636a32ac201a1eb08f7f2315f | [
"MIT"
] | null | null | null | from django.test import TestCase, Client
from django.contrib.auth import get_user_model
from django.urls import reverse
class djandoAdminTestClass(TestCase):
def setUp(self):
"""django admin and user setup"""
self.client = Client()
self.admin_user = get_user_model().objects.create_superuser(
email = 'am... | 23.617647 | 62 | 0.723537 |
db88216166b1ddd0232176f0fee40937abdbf634 | 416 | py | Python | social/admin.py | Yubisel/webempresa | a96086a225946aff0c79c537da6d6f11a852f4ad | [
"MIT"
] | null | null | null | social/admin.py | Yubisel/webempresa | a96086a225946aff0c79c537da6d6f11a852f4ad | [
"MIT"
] | null | null | null | social/admin.py | Yubisel/webempresa | a96086a225946aff0c79c537da6d6f11a852f4ad | [
"MIT"
] | null | null | null | from django.contrib import admin
from .models import Link
# Register your models here.
class LinkAdmin(admin.ModelAdmin):
readonly_fields = ["created", "updated"]
def get_readonly_fields(self, request, obj=None):
if request.user.groups.filter(name="Personal").exists():
return ("key", "name... | 29.714286 | 64 | 0.668269 |
048a01b50363fc22637ab7e88a0e294b09b47022 | 22,033 | py | Python | app/grandchallenge/challenges/models.py | kaczmarj/grand-challenge.org | 8dc8a2170e51072354f7e94f2a22578805a67b94 | [
"Apache-2.0"
] | null | null | null | app/grandchallenge/challenges/models.py | kaczmarj/grand-challenge.org | 8dc8a2170e51072354f7e94f2a22578805a67b94 | [
"Apache-2.0"
] | null | null | null | app/grandchallenge/challenges/models.py | kaczmarj/grand-challenge.org | 8dc8a2170e51072354f7e94f2a22578805a67b94 | [
"Apache-2.0"
] | null | null | null | import datetime
import logging
from itertools import chain, product
from actstream.actions import follow, unfollow
from actstream.models import Follow
from django.conf import settings
from django.contrib.auth.models import Group
from django.contrib.contenttypes.models import ContentType
from django.contrib.postgres.fi... | 32.44919 | 178 | 0.621931 |
215f1179dc0a7d042f5057b588474244f8184451 | 2,303 | py | Python | django/templatetags/cache.py | webjunkie/django | 5dbca13f3baa2e1bafd77e84a80ad6d8a074712e | [
"BSD-3-Clause"
] | 285 | 2019-12-23T09:50:21.000Z | 2021-12-08T09:08:49.000Z | django/templatetags/cache.py | webjunkie/django | 5dbca13f3baa2e1bafd77e84a80ad6d8a074712e | [
"BSD-3-Clause"
] | 18 | 2015-01-14T07:51:48.000Z | 2021-10-14T01:19:26.000Z | django/templatetags/cache.py | webjunkie/django | 5dbca13f3baa2e1bafd77e84a80ad6d8a074712e | [
"BSD-3-Clause"
] | 70 | 2015-01-01T00:33:24.000Z | 2021-12-10T03:43:07.000Z | from __future__ import unicode_literals
from django.core.cache.utils import make_template_fragment_key
from django.template import Library, Node, TemplateSyntaxError, VariableDoesNotExist
from django.core.cache import cache
register = Library()
class CacheNode(Node):
def __init__(self, nodelist, expire_time_var,... | 35.984375 | 107 | 0.658272 |
a11ae4cd6466dd399b2b084184e3f877227deafd | 5,626 | py | Python | telemetry/telemetry/internal/platform/profiler/tcmalloc_heap_profiler.py | bopopescu/catapult-2 | dd4b5729a8b7c585775b8a3ad340746af67fdd91 | [
"BSD-3-Clause"
] | 27 | 2016-04-27T01:02:03.000Z | 2021-12-13T08:53:19.000Z | telemetry/telemetry/internal/platform/profiler/tcmalloc_heap_profiler.py | bopopescu/catapult-2 | dd4b5729a8b7c585775b8a3ad340746af67fdd91 | [
"BSD-3-Clause"
] | 2 | 2017-03-09T09:00:50.000Z | 2017-09-21T15:48:20.000Z | telemetry/telemetry/internal/platform/profiler/tcmalloc_heap_profiler.py | bopopescu/catapult-2 | dd4b5729a8b7c585775b8a3ad340746af67fdd91 | [
"BSD-3-Clause"
] | 17 | 2016-04-27T02:06:39.000Z | 2019-12-18T08:07:00.000Z | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import sys
from telemetry.internal.backends.chrome import android_browser_finder
from telemetry.internal.platform import profiler
... | 37.758389 | 80 | 0.715784 |
f677509b351246ee87d37cc5c29ac07223e40ab6 | 377 | py | Python | Homework/Sampling/sampling.py | ehsansajadi/SBU-Data-Mining | b876afd4d8ee7ccd7c1b3a716e3f628daa08cae7 | [
"MIT"
] | 5 | 2021-07-12T16:22:08.000Z | 2022-01-18T06:19:56.000Z | Homework/Sampling/sampling.py | ehsansajadi/SBU-Data-Mining | b876afd4d8ee7ccd7c1b3a716e3f628daa08cae7 | [
"MIT"
] | null | null | null | Homework/Sampling/sampling.py | ehsansajadi/SBU-Data-Mining | b876afd4d8ee7ccd7c1b3a716e3f628daa08cae7 | [
"MIT"
] | null | null | null | import pandas as pd
df = pd.read_csv(r'C:\Users\Ehsan\Desktop\6\Data Mining\Data-Mining\Dateset\TelegramByKamyab\Life Expectancy Data.csv')
df_random_sample = df.sample(n = 50)
print(df_random_sample)
grouped = df.groupby('Country', group_keys = False).apply(lambda x: x.sample(1))
print('----------------------------... | 37.7 | 119 | 0.623342 |
dbcaa877abfba97c5f1d8e2c5aed55109c0cacd8 | 1,105 | py | Python | swaps/service/account/req_account_balance.py | DunnCreativeSS/cash_carry_leveraged_futures_arbitrageur | 1120ebfb487ce4987fe70e6645b36e0d7ce041ec | [
"Apache-2.0"
] | 1 | 2021-09-06T00:09:11.000Z | 2021-09-06T00:09:11.000Z | swaps/service/account/req_account_balance.py | DunnCreativeSS/cash_carry_leveraged_futures_arbitrageur | 1120ebfb487ce4987fe70e6645b36e0d7ce041ec | [
"Apache-2.0"
] | null | null | null | swaps/service/account/req_account_balance.py | DunnCreativeSS/cash_carry_leveraged_futures_arbitrageur | 1120ebfb487ce4987fe70e6645b36e0d7ce041ec | [
"Apache-2.0"
] | null | null | null |
from swaps.utils import *
from swaps.connection.websocket_req_client import *
from swaps.model.account import *
class ReqAccountBalanceService:
def __init__(self, params):
self.params = params
def subscribe(self, callback, error_handler, **kwargs):
client_req_id = self.params["client_req_i... | 31.571429 | 72 | 0.560181 |
fbbee77f1b3cb7923d1f055245eca2d722f995f8 | 2,409 | py | Python | system/api_lib.py | queeno/aptly | 9c834f410cfc6045b28d76c4578bca8cfd1f410b | [
"MIT"
] | null | null | null | system/api_lib.py | queeno/aptly | 9c834f410cfc6045b28d76c4578bca8cfd1f410b | [
"MIT"
] | null | null | null | system/api_lib.py | queeno/aptly | 9c834f410cfc6045b28d76c4578bca8cfd1f410b | [
"MIT"
] | 1 | 2018-09-20T01:35:31.000Z | 2018-09-20T01:35:31.000Z | from lib import BaseTest
import time
import json
import random
import string
import os
import inspect
import shutil
try:
import requests
except ImportError:
requests = None
class APITest(BaseTest):
"""
BaseTest + testing aptly API
"""
aptly_server = None
base_url = "127.0.0.1:8765"
d... | 30.493671 | 112 | 0.601494 |
05648b64c0a217f7c739fa85024831b13e888f2e | 1,495 | py | Python | tee.py | NCAR/HPCinstall | e70e984305bfc6c54725601bb14ce5f499e65bc9 | [
"BSD-3-Clause"
] | 5 | 2017-09-15T22:25:15.000Z | 2019-04-08T22:44:00.000Z | tee.py | NCAR/HPCinstall | e70e984305bfc6c54725601bb14ce5f499e65bc9 | [
"BSD-3-Clause"
] | 15 | 2017-03-08T21:42:19.000Z | 2019-04-22T20:04:26.000Z | tee.py | NCAR/HPCinstall | e70e984305bfc6c54725601bb14ce5f499e65bc9 | [
"BSD-3-Clause"
] | 4 | 2017-05-02T15:36:25.000Z | 2022-03-29T19:39:57.000Z | import sys
OUT=0
ERR=1
class _tee:
def __init__(self, logfile, type):
if type == OUT:
self.stdout = sys.stdout
self.stderr = None
elif type == ERR:
self.stdout = None
self.stderr = sys.stderr
self.log = logfile
self.type = type
d... | 22.313433 | 48 | 0.583278 |
b55f80f14d1a0840a5a5c2befd15059ba7459ad0 | 13,169 | py | Python | middle_tier/plugins/osp/osp_security_proxy.py | ogedaymf/CX | bd7a8be448e669561a418d235ab77aac152a4e11 | [
"MIT"
] | 19 | 2017-10-12T11:53:54.000Z | 2021-12-04T11:47:46.000Z | middle_tier/plugins/osp/osp_security_proxy.py | ogedaymf/CX | bd7a8be448e669561a418d235ab77aac152a4e11 | [
"MIT"
] | 31 | 2018-06-22T18:35:29.000Z | 2022-03-02T03:08:57.000Z | middle_tier/plugins/osp/osp_security_proxy.py | ogedaymf/CX | bd7a8be448e669561a418d235ab77aac152a4e11 | [
"MIT"
] | 12 | 2017-10-17T08:21:58.000Z | 2021-01-14T12:30:08.000Z | import json
import logging
import requests
from exceptions import MiddleTierException
from proxy.response import Response
from resources.base import Resource
from security import IncorrectSecurityConfigurationException, UnauthorizedSecurityException, \
AuthenticationResponse
from security.custom import CustomKeyH... | 48.594096 | 186 | 0.636039 |
467cc75d8e5ce1ec180ca189e3fc559c14ef61d5 | 342 | py | Python | documentrepo/store.py | kr428/documentrepo | f8843ed01d15895b4354f562ce80e34fa2d881cc | [
"Apache-2.0"
] | null | null | null | documentrepo/store.py | kr428/documentrepo | f8843ed01d15895b4354f562ce80e34fa2d881cc | [
"Apache-2.0"
] | null | null | null | documentrepo/store.py | kr428/documentrepo | f8843ed01d15895b4354f562ce80e34fa2d881cc | [
"Apache-2.0"
] | null | null | null | """document repository"""
class store:
"""store implementation"""
documents = {}
def __init__(self):
self.documents["1"]="foo"
self.documents["2"]="bar"
self.documents["3"]="baz"
def list_docs(self):
return self.documents
def get_document(self,doc):
retu... | 19 | 34 | 0.587719 |
84f7829c0dbf61ab7e381afed3836b9833856264 | 6,568 | py | Python | ironicclient/v1/chassis.py | NaohiroTamura/python-ironicclient | d23c02f64f977acc593e320d4cd5c65d327f19d4 | [
"Apache-2.0"
] | null | null | null | ironicclient/v1/chassis.py | NaohiroTamura/python-ironicclient | d23c02f64f977acc593e320d4cd5c65d327f19d4 | [
"Apache-2.0"
] | null | null | null | ironicclient/v1/chassis.py | NaohiroTamura/python-ironicclient | d23c02f64f977acc593e320d4cd5c65d327f19d4 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright © 2013 Red Hat, 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 require... | 38.409357 | 79 | 0.573843 |
a6528a879c67965a7636c30977801a77fb2a2dfc | 2,701 | py | Python | warren/plugins/ols.py | agounaris/lehmanbrothers | c82ce0c9ed1abc51170915153e15e5240726c607 | [
"MIT"
] | null | null | null | warren/plugins/ols.py | agounaris/lehmanbrothers | c82ce0c9ed1abc51170915153e15e5240726c607 | [
"MIT"
] | 1 | 2021-11-15T17:46:29.000Z | 2021-11-15T17:46:29.000Z | warren/plugins/ols.py | agounaris/warren | c82ce0c9ed1abc51170915153e15e5240726c607 | [
"MIT"
] | null | null | null | from .abstractplugin import AbstractPlugin
from marshmallow import Schema, fields, pprint
from datetime import datetime
import os
import numpy as np
# import statsmodels.api as sm
import statsmodels.formula.api as sm
import pandas as pd
def Date(fmt='%Y-%m-%d'):
return lambda v: datetime.strptime(v, fmt)
class ... | 31.406977 | 105 | 0.584598 |
8fd50d67fa14951af71907614c6b2c568a6675d5 | 5,723 | py | Python | variantworks/utils/encoders.py | michaelbrownid/VariantWorks | e9952f6272eab3b6d4d1317df027ed5f26855ef8 | [
"Apache-2.0"
] | 32 | 2020-06-08T20:24:19.000Z | 2021-12-02T04:07:16.000Z | variantworks/utils/encoders.py | michaelbrownid/VariantWorks | e9952f6272eab3b6d4d1317df027ed5f26855ef8 | [
"Apache-2.0"
] | 56 | 2020-06-08T21:42:43.000Z | 2021-05-18T17:55:51.000Z | variantworks/utils/encoders.py | michaelbrownid/VariantWorks | e9952f6272eab3b6d4d1317df027ed5f26855ef8 | [
"Apache-2.0"
] | 16 | 2020-06-08T20:22:17.000Z | 2021-09-06T05:54:53.000Z | #
# Copyright 2020 NVIDIA 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... | 36.221519 | 111 | 0.666608 |
60e3c59f965a9295b0f3f1e52a9e627355ebe7f4 | 35,604 | py | Python | node_manager_fkie/src/node_manager_fkie/editor/editor.py | Ryangupta8/multimaster_fkie | 0ba4e2eaba0ec26a242ce42384dab0ec191d2553 | [
"BSD-3-Clause"
] | null | null | null | node_manager_fkie/src/node_manager_fkie/editor/editor.py | Ryangupta8/multimaster_fkie | 0ba4e2eaba0ec26a242ce42384dab0ec191d2553 | [
"BSD-3-Clause"
] | null | null | null | node_manager_fkie/src/node_manager_fkie/editor/editor.py | Ryangupta8/multimaster_fkie | 0ba4e2eaba0ec26a242ce42384dab0ec191d2553 | [
"BSD-3-Clause"
] | null | null | null | # Software License Agreement (BSD License)
#
# Copyright (c) 2012, Fraunhofer FKIE/US, Alexander Tiderko
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributions of source code mus... | 45.881443 | 150 | 0.623273 |
c872d7063c6ab258058160b6a7e9fc1d402f0af2 | 1,437 | py | Python | scripts/git-role-management/internal/model/permission_model.py | msleprosy/cloud-pipeline | bccc2b196fad982380efc37a1c3785098bec6c85 | [
"Apache-2.0"
] | 126 | 2019-03-22T19:40:38.000Z | 2022-02-16T13:01:44.000Z | scripts/git-role-management/internal/model/permission_model.py | msleprosy/cloud-pipeline | bccc2b196fad982380efc37a1c3785098bec6c85 | [
"Apache-2.0"
] | 1,189 | 2019-03-25T10:39:27.000Z | 2022-03-31T12:50:33.000Z | scripts/git-role-management/internal/model/permission_model.py | msleprosy/cloud-pipeline | bccc2b196fad982380efc37a1c3785098bec6c85 | [
"Apache-2.0"
] | 62 | 2019-03-22T22:09:49.000Z | 2022-03-08T12:05:56.000Z | # Copyright 2017-2019 EPAM Systems, Inc. (https://www.epam.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.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 36.846154 | 74 | 0.627001 |
cfd583b7877c4a32e44ebd0cf3c3812bbb6eeede | 899 | py | Python | 2015/day-19.py | SimplyDanny/advent-of-code-2015 | 66ef2accccec479989fe47145a5fff3159c418bf | [
"BSD-2-Clause"
] | null | null | null | 2015/day-19.py | SimplyDanny/advent-of-code-2015 | 66ef2accccec479989fe47145a5fff3159c418bf | [
"BSD-2-Clause"
] | 2 | 2020-02-19T21:06:29.000Z | 2020-03-15T15:14:58.000Z | 2015/day-19.py | SimplyDanny/advent-of-code-2015 | 66ef2accccec479989fe47145a5fff3159c418bf | [
"BSD-2-Clause"
] | null | null | null | import re
from common import print_results, readlines
REPLACEMENT_REGEX = re.compile(r'(\w+) => (\w+)')
replace = lambda s, i, rep: s[:i] + rep[1] + s[i + len(rep[0]):]
#### Main part.
lines = readlines(__file__)
replacements = [REPLACEMENT_REGEX.match(line).groups() for line in lines[:-2]]
medicine = lines[-1]
L... | 25.685714 | 78 | 0.645161 |
0c7a22c30b8e4c1483768de163b3c8c88f47fc79 | 924 | py | Python | hlextra.py | yashjain0/No-tes | 43f198a1992fb1785511601755a4f6eabe36e6c5 | [
"Apache-2.0"
] | null | null | null | hlextra.py | yashjain0/No-tes | 43f198a1992fb1785511601755a4f6eabe36e6c5 | [
"Apache-2.0"
] | null | null | null | hlextra.py | yashjain0/No-tes | 43f198a1992fb1785511601755a4f6eabe36e6c5 | [
"Apache-2.0"
] | null | null | null | from typing import List, Tuple
import poppler
def extract_highlights(filepath: str) -> List[Tuple[int, int, int, int, str]]:
"""
This is based on code from Marwan Alsabbagh, https://stackoverflow.com/questions/13748242/extracting-pdf-annotations-comments
see http://socialdatablog.com/extract-pdf-annotati... | 34.222222 | 129 | 0.61039 |
b4e19ce3de31a1529b51e58243e88bcd06d912fa | 10,150 | py | Python | bspider/master/service/node.py | littlebai3618/bspider | ff4d003cd0825247db4efe62db95f9245c0a303c | [
"BSD-3-Clause"
] | 3 | 2020-06-19T03:52:29.000Z | 2021-05-21T05:50:46.000Z | bspider/master/service/node.py | littlebai3618/bspider | ff4d003cd0825247db4efe62db95f9245c0a303c | [
"BSD-3-Clause"
] | 2 | 2021-03-31T19:39:03.000Z | 2021-05-12T02:10:26.000Z | bspider/master/service/node.py | littlebai3618/bspider | ff4d003cd0825247db4efe62db95f9245c0a303c | [
"BSD-3-Clause"
] | null | null | null | from bspider.core.api import BaseService, Conflict, NotFound, PostSuccess, DeleteSuccess, PatchSuccess, GetSuccess, \
ParameterException
from bspider.core.api import AgentMixIn
from bspider.utils.exceptions import RemoteOPError
from bspider.master.server import log
from bspider.master.dao import NodeDao
class Nod... | 42.116183 | 119 | 0.53665 |
b09f2b900d2db3a3662fb17827beda8c8a2ea653 | 2,696 | py | Python | Utilities/ReferenceImplementations/rnn.py | texasmichelle/swift-apis | 953714807002dde39100798a215c3a86e12bcc10 | [
"Apache-2.0"
] | 848 | 2019-02-12T00:27:29.000Z | 2022-01-26T04:41:50.000Z | Utilities/ReferenceImplementations/rnn.py | BradLarson/swift-apis | 02f31d531cbbfbd72de2b2f288f24f8645ee5bcb | [
"Apache-2.0"
] | 698 | 2019-02-12T12:35:54.000Z | 2022-01-25T00:48:53.000Z | Utilities/ReferenceImplementations/rnn.py | ProfFan/swift-apis | f51ee4618d652a2419e998bf9418ad80bda67454 | [
"Apache-2.0"
] | 181 | 2019-02-12T00:33:34.000Z | 2021-12-05T19:15:55.000Z | # Computes expected results for `testRNN()` in `Tests/TensorFlowTests/LayerTests.swift`.
# Requires 'tensorflow>=2.0.0a0' (e.g. "pip install tensorflow==2.2.0").
import sys
import numpy
import tensorflow as tf
# Set random seed for repetable results
tf.random.set_seed(0)
def indented(s):
return '\n'.join([' '... | 35.012987 | 105 | 0.729599 |
d005857476da996cad64ef0adb74c97f33cd1984 | 3,122 | gyp | Python | binding.gyp | clayrisser/node-sigar | de325ca59523dd9b0c91eb27dcf0085c2a265f38 | [
"MIT"
] | 2 | 2020-04-26T19:34:44.000Z | 2020-04-29T17:15:17.000Z | binding.gyp | clayrisser/node-sigar | de325ca59523dd9b0c91eb27dcf0085c2a265f38 | [
"MIT"
] | null | null | null | binding.gyp | clayrisser/node-sigar | de325ca59523dd9b0c91eb27dcf0085c2a265f38 | [
"MIT"
] | null | null | null | {
'targets': [
{
'target_name': 'sigar',
'include_dirs': [
'<!@(node -p "require(\'node-addon-api\').include")',
'deps/sigar/include',
'src/include'
],
'sources': [
'deps/sigar/src/sigar.c',
... | 35.885057 | 69 | 0.328956 |
c07110bffe929837b2bcc0ef1daa1496654e248b | 1,690 | py | Python | config/wsgi.py | alexandersilvera/Plataforma-Umbanda | bc15af7567199cefcd1a4f292a64a26afdd7f5c6 | [
"MIT"
] | null | null | null | config/wsgi.py | alexandersilvera/Plataforma-Umbanda | bc15af7567199cefcd1a4f292a64a26afdd7f5c6 | [
"MIT"
] | null | null | null | config/wsgi.py | alexandersilvera/Plataforma-Umbanda | bc15af7567199cefcd1a4f292a64a26afdd7f5c6 | [
"MIT"
] | null | null | null | """
WSGI config for plataforma-centro project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPL... | 43.333333 | 79 | 0.805325 |
992a3196ade53f8c6d2a24599515ba5293b19dfb | 2,048 | py | Python | technogix_iac_keywords/acm.py | technogix-terraform/robotframework | e00b51ae3974bbf25b2c65238a869b3f9d776b9d | [
"MIT"
] | null | null | null | technogix_iac_keywords/acm.py | technogix-terraform/robotframework | e00b51ae3974bbf25b2c65238a869b3f9d776b9d | [
"MIT"
] | null | null | null | technogix_iac_keywords/acm.py | technogix-terraform/robotframework | e00b51ae3974bbf25b2c65238a869b3f9d776b9d | [
"MIT"
] | null | null | null | """ -----------------------------------------------------
# TECHNOGIX
# -------------------------------------------------------
# Copyright (c) [2022] Technogix SARL
# All rights reserved
# -------------------------------------------------------
# Keywords to manage certificates tasks
# -------------------------... | 37.236364 | 89 | 0.601074 |
efc231601bcba8ce5d35a575bb2df678addc1386 | 2,978 | py | Python | webcart/shopping_cart/views.py | BabGee/hobby-projects | 2778551426b449f43033701e52b34a055e066df9 | [
"bzip2-1.0.6"
] | null | null | null | webcart/shopping_cart/views.py | BabGee/hobby-projects | 2778551426b449f43033701e52b34a055e066df9 | [
"bzip2-1.0.6"
] | null | null | null | webcart/shopping_cart/views.py | BabGee/hobby-projects | 2778551426b449f43033701e52b34a055e066df9 | [
"bzip2-1.0.6"
] | null | null | null | from django.shortcuts import render
from products.models import Product
from users.models import Profile
from django.contrib.auth.decorators import login_required
from shopping_cart.models import OrderItem, Order
from django.contrib import messages
from django.shortcuts import render, redirect, get_object_or_404
from s... | 31.680851 | 88 | 0.793486 |
1c72f269e490ebf152a9c1c8be41d6bef76826f9 | 1,462 | py | Python | mysql_tests/conftest.py | vgerak/gino | a703ce2ce0e2ef01a4f39a3f0bf6c93a5b947b88 | [
"BSD-3-Clause"
] | null | null | null | mysql_tests/conftest.py | vgerak/gino | a703ce2ce0e2ef01a4f39a3f0bf6c93a5b947b88 | [
"BSD-3-Clause"
] | null | null | null | mysql_tests/conftest.py | vgerak/gino | a703ce2ce0e2ef01a4f39a3f0bf6c93a5b947b88 | [
"BSD-3-Clause"
] | null | null | null | import ssl
import aiomysql
import pytest
import sqlalchemy
from async_generator import yield_, async_generator
import gino
from .models import db, DB_ARGS, MYSQL_URL, random_name
ECHO = False
@pytest.fixture(scope="module")
def sa_engine():
rv = sqlalchemy.create_engine(MYSQL_URL, echo=ECHO)
db.create_all(... | 24.366667 | 67 | 0.73461 |
4d0a835ccb02e8a97f618821eaa00cab7e3a01af | 761 | py | Python | pinax/projects/sample_group_project/apps/basic_groups/urls.py | jpic/pinax | a9b30e437e4298d74101b45cec0d4dba9702cdd1 | [
"MIT"
] | null | null | null | pinax/projects/sample_group_project/apps/basic_groups/urls.py | jpic/pinax | a9b30e437e4298d74101b45cec0d4dba9702cdd1 | [
"MIT"
] | null | null | null | pinax/projects/sample_group_project/apps/basic_groups/urls.py | jpic/pinax | a9b30e437e4298d74101b45cec0d4dba9702cdd1 | [
"MIT"
] | null | null | null | from django.conf.urls.defaults import *
from basic_groups.models import BasicGroup
from groups.bridge import ContentBridge
bridge = ContentBridge(BasicGroup, "basic_groups")
urlpatterns = patterns("",
url(r"^create/$", "basic_groups.views.create", name="group_create"),
url(r"^your_groups/$", "basic_grou... | 30.44 | 102 | 0.687254 |
1c5c08332da2efd4f3832a8f9e5f83f20c009860 | 4,497 | py | Python | audio.py | Maniues/Wav2Lip | b2b5351f30efb5b580b1d006ddb53413b9fec3d6 | [
"MIT"
] | 31 | 2020-09-10T20:00:09.000Z | 2022-03-20T15:03:23.000Z | audio.py | Maniues/Wav2Lip | b2b5351f30efb5b580b1d006ddb53413b9fec3d6 | [
"MIT"
] | 3 | 2020-11-13T19:07:25.000Z | 2022-02-10T02:27:45.000Z | audio.py | Maniues/Wav2Lip | b2b5351f30efb5b580b1d006ddb53413b9fec3d6 | [
"MIT"
] | 4 | 2021-01-06T22:52:07.000Z | 2022-03-03T14:58:24.000Z | import librosa
import librosa.filters
import numpy as np
import tensorflow as tf
from scipy import signal
from scipy.io import wavfile
from hparams import hparams as hp
def load_wav(path, sr):
return librosa.core.load(path, sr=sr)[0]
def save_wav(wav, path, sr):
wav *= 32767 / max(0.01, np.max(np.abs(wav)))
... | 32.824818 | 116 | 0.623527 |
5ecf6b3df9835f2f0e021756ea150c14dedc1f54 | 5,142 | py | Python | legal-api/tests/unit/models/test_user.py | bsnopek-freshworks/lear | e1c53e70b62bd3073d2e5210deb6b3658fd1b719 | [
"Apache-2.0"
] | null | null | null | legal-api/tests/unit/models/test_user.py | bsnopek-freshworks/lear | e1c53e70b62bd3073d2e5210deb6b3658fd1b719 | [
"Apache-2.0"
] | null | null | null | legal-api/tests/unit/models/test_user.py | bsnopek-freshworks/lear | e1c53e70b62bd3073d2e5210deb6b3658fd1b719 | [
"Apache-2.0"
] | null | null | null | # Copyright © 2019 Province of British Columbia
#
# 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 agr... | 32.1375 | 113 | 0.672695 |
72ca171f4f0e8efd7af9358d03fe97319457b794 | 9,134 | py | Python | tests/func/test_config.py | baajur/dvc | f30d51ca4216236edae7e2ed82f2843a1df11b8c | [
"Apache-2.0"
] | null | null | null | tests/func/test_config.py | baajur/dvc | f30d51ca4216236edae7e2ed82f2843a1df11b8c | [
"Apache-2.0"
] | null | null | null | tests/func/test_config.py | baajur/dvc | f30d51ca4216236edae7e2ed82f2843a1df11b8c | [
"Apache-2.0"
] | 1 | 2021-02-06T12:48:24.000Z | 2021-02-06T12:48:24.000Z | import os
import textwrap
import pytest
from dvc.config import Config, ConfigError
from dvc.main import main
def test_config_set(tmp_dir, dvc):
assert main(["config", "core.analytics", "false"]) == 0
assert (tmp_dir / ".dvc" / "config").read_text() == textwrap.dedent(
"""\
[core]
... | 28.454829 | 78 | 0.533392 |
9d6351f37d138bb7b2de8c9780d647e011a56706 | 3,608 | py | Python | setup.py | steinvenic/escience | 55a6290ea026fba3cdf5f889ef67dfd50e394703 | [
"MIT"
] | 1 | 2019-03-28T13:33:30.000Z | 2019-03-28T13:33:30.000Z | setup.py | steinvenic/escience | 55a6290ea026fba3cdf5f889ef67dfd50e394703 | [
"MIT"
] | null | null | null | setup.py | steinvenic/escience | 55a6290ea026fba3cdf5f889ef67dfd50e394703 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Note: To use the 'upload' functionality of this file, you must:
# $ pip install twine
import io
import os
import sys
from shutil import rmtree
from setuptools import find_packages, setup, Command
# Package meta-data.
NAME = 'escience'
DESCRIPTION = 'escience ClL'
UR... | 27.541985 | 97 | 0.643847 |
ed6bb217799198a61201938c32853bec827679ce | 2,448 | py | Python | senlin-7.0.0/senlin/common/policies/profiles.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 45 | 2015-10-18T02:56:50.000Z | 2022-03-01T15:28:02.000Z | senlin-7.0.0/senlin/common/policies/profiles.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | senlin-7.0.0/senlin/common/policies/profiles.py | scottwedge/OpenStack-Stein | 7077d1f602031dace92916f14e36b124f474de15 | [
"Apache-2.0"
] | 45 | 2015-10-19T02:35:57.000Z | 2021-09-28T09:01:42.000Z | # All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 26.608696 | 78 | 0.542484 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.