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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
6232de4db84748dbc291489a542749abda27907f | 16,719 | py | Python | src/livecli/session.py | NghiemTrung/livecli | 6a21b1b144b045963b6d1db8d4d8dc8471b62737 | [
"BSD-2-Clause"
] | 1 | 2019-12-04T11:54:52.000Z | 2019-12-04T11:54:52.000Z | src/livecli/session.py | NghiemTrung/livecli | 6a21b1b144b045963b6d1db8d4d8dc8471b62737 | [
"BSD-2-Clause"
] | null | null | null | src/livecli/session.py | NghiemTrung/livecli | 6a21b1b144b045963b6d1db8d4d8dc8471b62737 | [
"BSD-2-Clause"
] | null | null | null | import imp
import pkgutil
import sys
import traceback
import requests
from livecli.utils import update_scheme
from livecli.utils.l10n import Localization
from . import plugins, __version__
from .compat import is_win32
from .exceptions import NoPluginError, PluginError
from .logger import Logger
from .options import Op... | 35.800857 | 91 | 0.520545 |
cd3838d795f7575ac7f5346fdb1cf633982898d2 | 11,410 | py | Python | networkx/algorithms/centrality/group.py | AaronOpfer/networkx | f04ca835c3503f04f9b3e933270575980e44205b | [
"BSD-3-Clause"
] | 3 | 2020-08-04T20:29:41.000Z | 2020-11-09T09:28:19.000Z | networkx/algorithms/centrality/group.py | AaronOpfer/networkx | f04ca835c3503f04f9b3e933270575980e44205b | [
"BSD-3-Clause"
] | 30 | 2020-04-15T19:37:40.000Z | 2020-04-22T21:19:35.000Z | networkx/algorithms/centrality/group.py | AaronOpfer/networkx | f04ca835c3503f04f9b3e933270575980e44205b | [
"BSD-3-Clause"
] | 4 | 2019-07-19T15:06:37.000Z | 2021-03-17T22:29:04.000Z | # -*- coding: utf-8 -*-
# Copyright (C) 2004-2019 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
#
# Authors: Nanda H Krishna <nanda.harishankar@gmail.com>
"""Group centrality measures."""
from itertools imp... | 30.508021 | 89 | 0.623225 |
ed3d660d31492892d55f1ea2ee8e1811f0a7e623 | 7,052 | py | Python | src/asset/skeleton.py | matyalatte/FF7R-mesh-importer | e8b66bc0ba410f340ad2c538dbe1c72e5c89a86b | [
"MIT"
] | 3 | 2022-03-01T13:30:27.000Z | 2022-03-22T21:30:44.000Z | src/asset/skeleton.py | matyalatte/FF7R-mesh-importer | e8b66bc0ba410f340ad2c538dbe1c72e5c89a86b | [
"MIT"
] | null | null | null | src/asset/skeleton.py | matyalatte/FF7R-mesh-importer | e8b66bc0ba410f340ad2c538dbe1c72e5c89a86b | [
"MIT"
] | 4 | 2022-03-01T20:17:15.000Z | 2022-03-27T10:13:31.000Z | from util.io_util import *
from util.logger import logger
from gltf.bone import Bone as gltfBone
import struct
class Bone:
#name_id: id of name list
#parent: parent bone's id
#rot: quaternion
#pos: position
#size: size
def __init__(self, f):
self.name_id=read_uint32(f)
self.ins... | 33.421801 | 130 | 0.596427 |
cb21fc7366bcebdd2fee0d460904f4f768c1fe16 | 1,717 | py | Python | tensorflow_io/core/python/experimental/text_io_layer_ops.py | burgerkingeater/io | f2de208f474d6ba4926e2c7f9e901e102ca5c254 | [
"Apache-2.0"
] | null | null | null | tensorflow_io/core/python/experimental/text_io_layer_ops.py | burgerkingeater/io | f2de208f474d6ba4926e2c7f9e901e102ca5c254 | [
"Apache-2.0"
] | null | null | null | tensorflow_io/core/python/experimental/text_io_layer_ops.py | burgerkingeater/io | f2de208f474d6ba4926e2c7f9e901e102ca5c254 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.022727 | 83 | 0.601048 |
5c17d47481a842a88749f4d24d0363e5d7a4bd3a | 1,673 | py | Python | settings.py | henryjams/PyCC_game | 4b76ae2fd1404d2e066a46133ccf6d71d4dfd894 | [
"MIT"
] | null | null | null | settings.py | henryjams/PyCC_game | 4b76ae2fd1404d2e066a46133ccf6d71d4dfd894 | [
"MIT"
] | null | null | null | settings.py | henryjams/PyCC_game | 4b76ae2fd1404d2e066a46133ccf6d71d4dfd894 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Jan 20 21:48:47 2022
@author: Hank
"""
import pygame
class Settings:
"""A class for storing all game settings"""
def __init__(self):
"""Initialize the game's static settings"""
# Screen settings
self.screen_width = 1600
self.scre... | 28.844828 | 75 | 0.591751 |
5dee8ee97bc0cb84f810c21803866f66da549a74 | 386 | py | Python | tests/test_chargebacks.py | wegroupwolves/async-mollie-api-python | b0c46db52a848677ab04f26ceac2474bdc287772 | [
"BSD-2-Clause"
] | null | null | null | tests/test_chargebacks.py | wegroupwolves/async-mollie-api-python | b0c46db52a848677ab04f26ceac2474bdc287772 | [
"BSD-2-Clause"
] | null | null | null | tests/test_chargebacks.py | wegroupwolves/async-mollie-api-python | b0c46db52a848677ab04f26ceac2474bdc287772 | [
"BSD-2-Clause"
] | null | null | null | from __future__ import absolute_import
from mollie.api.objects.chargeback import Chargeback
from .utils import assert_list_object
def test_list_chargebacks(client, response):
"""Get a list of chargebacks."""
response.get("https://api.mollie.com/v2/chargebacks", "chargebacks_list")
chargebacks = client.c... | 29.692308 | 77 | 0.779793 |
dc69d6ed3249cf73c6fb5236f8a91341ca5678d1 | 25,643 | py | Python | virt/ansible-latest/lib/python2.7/site-packages/ansible/modules/cloud/azure/azure_rm_storageaccount.py | lakhlaifi/RedHat-Ansible | 27c5077cced9d416081fcd5d69ea44bca0317fa4 | [
"Apache-2.0"
] | 1 | 2020-03-29T18:41:01.000Z | 2020-03-29T18:41:01.000Z | ansible/ansible/modules/cloud/azure/azure_rm_storageaccount.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 7 | 2020-09-07T17:27:56.000Z | 2022-03-02T06:25:46.000Z | ansible/ansible/modules/cloud/azure/azure_rm_storageaccount.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 1 | 2020-03-22T01:04:48.000Z | 2020-03-22T01:04:48.000Z | #!/usr/bin/python
#
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@redhat.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANS... | 42.953099 | 154 | 0.594392 |
01a7a01ce7f9b56a795e3a42b8d787304f54a305 | 29 | py | Python | Learning-Oreily-Jessica/rte.py | channa006/Basic_Python_Scripts | 4b1b5073ec3eb91dbca8f1541e32a55e466eeb59 | [
"MIT"
] | null | null | null | Learning-Oreily-Jessica/rte.py | channa006/Basic_Python_Scripts | 4b1b5073ec3eb91dbca8f1541e32a55e466eeb59 | [
"MIT"
] | null | null | null | Learning-Oreily-Jessica/rte.py | channa006/Basic_Python_Scripts | 4b1b5073ec3eb91dbca8f1541e32a55e466eeb59 | [
"MIT"
] | null | null | null | import netmiko
dir(netmiko)
| 7.25 | 14 | 0.793103 |
1029bb569ec9517b94fba95086bed6257825a70a | 7,767 | py | Python | test/algorithms/refinement/test_hierarchical_detector_refinement.py | jbeilstenedmands/dials | fb9672b91854f564cbbba6f1cceeefa18d135965 | [
"BSD-3-Clause"
] | null | null | null | test/algorithms/refinement/test_hierarchical_detector_refinement.py | jbeilstenedmands/dials | fb9672b91854f564cbbba6f1cceeefa18d135965 | [
"BSD-3-Clause"
] | 2 | 2020-07-31T22:37:30.000Z | 2020-07-31T23:08:55.000Z | test/algorithms/refinement/test_hierarchical_detector_refinement.py | jbeilstenedmands/dials | fb9672b91854f564cbbba6f1cceeefa18d135965 | [
"BSD-3-Clause"
] | 1 | 2020-02-04T15:39:06.000Z | 2020-02-04T15:39:06.000Z | from __future__ import absolute_import, division, print_function
import copy
import math
import os
import pytest
def generate_reflections(experiments):
from dials.algorithms.spot_prediction import IndexGenerator
from dials.algorithms.refinement.prediction.managed_predictors import (
ScansRayPredicto... | 32.3625 | 87 | 0.69409 |
d93c631d9ef8092d991baf003c6fc9e25f584906 | 7,685 | py | Python | fhirclient/models/fhirabstractresource.py | bmilius-nmdp/client-py | a6861ee7294501304ddf6c86a2f0670180fd6407 | [
"Apache-2.0"
] | null | null | null | fhirclient/models/fhirabstractresource.py | bmilius-nmdp/client-py | a6861ee7294501304ddf6c86a2f0670180fd6407 | [
"Apache-2.0"
] | null | null | null | fhirclient/models/fhirabstractresource.py | bmilius-nmdp/client-py | a6861ee7294501304ddf6c86a2f0670180fd6407 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Base class for FHIR resources.
# 2014, SMART Health IT.
from . import fhirabstractbase
class FHIRAbstractResource(fhirabstractbase.FHIRAbstractBase):
""" Extends the FHIRAbstractBase with server talking capabilities.
"""
resource_type = 'FHIRAbstractRes... | 36.421801 | 115 | 0.615875 |
7e6f02cfd1670d099a7d7e2e7ea807e8a4411fc6 | 7,848 | py | Python | src/game_functions.py | ImposterKibe/Alien-Invasion | 42daf56ae525aac313d3f0dd43fb3f3f1c3714cf | [
"MIT"
] | null | null | null | src/game_functions.py | ImposterKibe/Alien-Invasion | 42daf56ae525aac313d3f0dd43fb3f3f1c3714cf | [
"MIT"
] | 3 | 2019-03-19T14:54:10.000Z | 2019-07-25T19:10:51.000Z | src/game_functions.py | ImposterKibe/Alien-Invasion | 42daf56ae525aac313d3f0dd43fb3f3f1c3714cf | [
"MIT"
] | 2 | 2019-03-08T12:47:35.000Z | 2019-03-19T13:34:41.000Z | import sys
from time import sleep
import pygame
from alien import Alien
from bullet import Bullet
def update_aliens(sett, stats, sb, screen, ship, aliens, bullets):
"""Check edges and Update the positions."""
check_fleet_edges(sett, aliens)
aliens.update()
check_aliens_bottom(sett, stats, sb, screen... | 30.65625 | 79 | 0.651249 |
001ba3f2c1700d20b1fa8afe460f446aa3d72767 | 6,648 | py | Python | guiauto/example/tests/Test_Outlook.py | saasaa831/guidesktop | 68abe5e896c4d29cf12898abd3b27c60553a3948 | [
"Apache-2.0"
] | null | null | null | guiauto/example/tests/Test_Outlook.py | saasaa831/guidesktop | 68abe5e896c4d29cf12898abd3b27c60553a3948 | [
"Apache-2.0"
] | null | null | null | guiauto/example/tests/Test_Outlook.py | saasaa831/guidesktop | 68abe5e896c4d29cf12898abd3b27c60553a3948 | [
"Apache-2.0"
] | null | null | null | from unittest import TestCase
import time, traceback, os, logging.config
from pytest import mark
from guiauto.gui.appDriver import BrowserDriver
from guiauto.gui.driverStart import sdownProcess
from guiauto.util.archive import setup_logging
from guiauto.example.pages.pagesall import allPages
ROOT_DIR = os.path.dirname(... | 46.48951 | 105 | 0.676594 |
a4692df5395390e0a9e974f6b1121c0b5a10fa9d | 5,184 | py | Python | manage.py | SUJISHREE/TaarifaWaterpoints | 5b7316beac08feff5dd5e473c90e3185d2241541 | [
"Apache-2.0"
] | 12 | 2015-04-09T17:30:25.000Z | 2022-03-04T09:55:38.000Z | manage.py | SUJISHREE/TaarifaWaterpoints | 5b7316beac08feff5dd5e473c90e3185d2241541 | [
"Apache-2.0"
] | 31 | 2015-01-05T15:58:09.000Z | 2021-12-19T17:46:21.000Z | manage.py | SUJISHREE/TaarifaWaterpoints | 5b7316beac08feff5dd5e473c90e3185d2241541 | [
"Apache-2.0"
] | 12 | 2015-02-04T08:59:44.000Z | 2021-10-31T13:30:07.000Z | from csv import DictReader
from datetime import datetime
from pprint import pprint
from flask_script import Manager
from taarifa_api import add_document, delete_documents, get_schema
from taarifa_waterpoints import app
from taarifa_waterpoints.schemas import facility_schema, service_schema
manager = Manager(app)
d... | 29.793103 | 80 | 0.629437 |
ab72903dd9c32e4bb2aa3556d87b8aec258f89d9 | 3,201 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-search-websearch/setup.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/cognitiveservices/azure-cognitiveservices-search-websearch/setup.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/cognitiveservices/azure-cognitiveservices-search-websearch/setup.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.000Z | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 34.419355 | 91 | 0.614183 |
9614a81c672d022bfaa5f57c47b9212c32fd2b23 | 3,260 | py | Python | tests/regressiontests/wsgi/tests.py | graingert/django | 784d0c261c76535dc760bc8d76793d92f35c1513 | [
"BSD-3-Clause"
] | 1 | 2020-08-08T01:55:00.000Z | 2020-08-08T01:55:00.000Z | tests/regressiontests/wsgi/tests.py | graingert/django | 784d0c261c76535dc760bc8d76793d92f35c1513 | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/wsgi/tests.py | graingert/django | 784d0c261c76535dc760bc8d76793d92f35c1513 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals
from django.core.exceptions import ImproperlyConfigured
from django.core.servers.basehttp import get_internal_wsgi_application
from django.core.wsgi import get_wsgi_application
from django.test import TestCase
from django.test.client import RequestFactory
from django.test.utils ... | 32.6 | 151 | 0.672699 |
0a68bb97bc918c3d613fb0f589c2ad680ef5aef0 | 2,224 | py | Python | DMProject/15.package/15.2.decision_function.py | gongjunhuang/Spider | c683137dafac9c7f4afd359baf9d0717d1a127e2 | [
"Apache-2.0"
] | 1 | 2018-02-26T15:45:17.000Z | 2018-02-26T15:45:17.000Z | DMProject/15.package/15.2.decision_function.py | gongjunhuang/Spider | c683137dafac9c7f4afd359baf9d0717d1a127e2 | [
"Apache-2.0"
] | null | null | null | DMProject/15.package/15.2.decision_function.py | gongjunhuang/Spider | c683137dafac9c7f4afd359baf9d0717d1a127e2 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding:utf-8 -*-
import numpy as np
from sklearn import svm
from scipy import stats
from sklearn.metrics import accuracy_score
import matplotlib as mpl
import matplotlib.pyplot as plt
def extend(a, b, r=0.01):
return a * (1 + r) - b * r, -a * r + b * (1 + r)
if __name__ == "__main__":
... | 35.870968 | 86 | 0.607014 |
73ef68831b6c05ffc9c9d0e9bdd37c2f23031013 | 1,133 | py | Python | plugins/feeds/public/botvrij_sha1.py | yeti-threatintel/yeti | 9e8b76cd393f149c4990ead003902eac50c1766d | [
"Apache-2.0"
] | null | null | null | plugins/feeds/public/botvrij_sha1.py | yeti-threatintel/yeti | 9e8b76cd393f149c4990ead003902eac50c1766d | [
"Apache-2.0"
] | null | null | null | plugins/feeds/public/botvrij_sha1.py | yeti-threatintel/yeti | 9e8b76cd393f149c4990ead003902eac50c1766d | [
"Apache-2.0"
] | null | null | null | import logging
from datetime import timedelta, datetime
from core.errors import ObservableValidationError
from core.feed import Feed
from core.observables import Hash
class BotvrijSHA1(Feed):
default_values = {
"frequency": timedelta(hours=12),
"name": "BotvrijSHA1",
"source": "https://ww... | 28.325 | 84 | 0.599294 |
2c48d2322b11ff154ceb9a9a753870e744c6973d | 272 | py | Python | projects/migrations/0004_merge_20220205_0857.py | dhavall13/fehler_core | dd27802d5b227a32aebcc8bfde68e78a69a36d66 | [
"MIT"
] | null | null | null | projects/migrations/0004_merge_20220205_0857.py | dhavall13/fehler_core | dd27802d5b227a32aebcc8bfde68e78a69a36d66 | [
"MIT"
] | null | null | null | projects/migrations/0004_merge_20220205_0857.py | dhavall13/fehler_core | dd27802d5b227a32aebcc8bfde68e78a69a36d66 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.26 on 2022-02-05 08:57
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("projects", "0003_project_description"),
("projects", "0002_auto_20220205_1142"),
]
operations = []
| 19.428571 | 49 | 0.665441 |
65d8eb41fffa2ed55d8b895ffbbdd8d2940ca6b5 | 21,678 | py | Python | spark_fhir_schemas/r4/resources/medicinalproductinteraction.py | imranq2/SparkFhirSchemas | 24debae6980fb520fe55aa199bdfd43c0092eb9c | [
"Apache-2.0"
] | 2 | 2020-10-31T23:25:01.000Z | 2021-06-09T14:12:42.000Z | spark_fhir_schemas/r4/resources/medicinalproductinteraction.py | imranq2/SparkFhirSchemas | 24debae6980fb520fe55aa199bdfd43c0092eb9c | [
"Apache-2.0"
] | null | null | null | spark_fhir_schemas/r4/resources/medicinalproductinteraction.py | imranq2/SparkFhirSchemas | 24debae6980fb520fe55aa199bdfd43c0092eb9c | [
"Apache-2.0"
] | null | null | null | from typing import Union, List, Optional
from pyspark.sql.types import StructType, StructField, StringType, ArrayType, DataType
# This file is auto-generated by generate_schema so do not edit it manually
# noinspection PyPep8Naming
class MedicinalProductInteractionSchema:
"""
The interactions of the medicina... | 51.369668 | 104 | 0.565043 |
349558139a3eb2c7be2ae3e1cafb0eb979366b0e | 963 | py | Python | example/example/views.py | timgates42/duoshuo-python-sdk | 37a16e5d7c1d0899142d46f08ef53c79dbe887a0 | [
"Apache-2.0"
] | 47 | 2015-01-11T15:51:27.000Z | 2019-04-21T12:17:21.000Z | example/example/views.py | timgates42/duoshuo-python-sdk | 37a16e5d7c1d0899142d46f08ef53c79dbe887a0 | [
"Apache-2.0"
] | 3 | 2016-06-14T10:19:00.000Z | 2018-06-01T02:56:40.000Z | example/example/views.py | timgates42/duoshuo-python-sdk | 37a16e5d7c1d0899142d46f08ef53c79dbe887a0 | [
"Apache-2.0"
] | 18 | 2015-02-25T08:39:26.000Z | 2021-11-22T19:22:54.000Z | # encoding: utf8
from django.http import HttpResponse
from django.template.response import TemplateResponse
from django.shortcuts import render
from accounts.models import UserProfile
import settings
import jwt
def home(request):
duoshuo_jwt_token = None
ctx = {
'settings': settings,
... | 33.206897 | 99 | 0.677051 |
b49496ea17aeccdb380e14609b11ddc331010b0b | 1,298 | py | Python | custom_components/pool_pump/const.py | moafrancky/ha-pool_pump | 21a040b73049ec36c41b008a80aeb3cadde6781d | [
"MIT"
] | null | null | null | custom_components/pool_pump/const.py | moafrancky/ha-pool_pump | 21a040b73049ec36c41b008a80aeb3cadde6781d | [
"MIT"
] | null | null | null | custom_components/pool_pump/const.py | moafrancky/ha-pool_pump | 21a040b73049ec36c41b008a80aeb3cadde6781d | [
"MIT"
] | null | null | null | """Constants for blueprint."""
# Base component constants
NAME = "Pool Pump Manager"
DOMAIN = "pool_pump"
DOMAIN_DATA = f"{DOMAIN}_data"
VERSION = "0.0.2beta1"
ISSUE_URL = "https://github.com/oncleben31/ha-pool_pump/issues"
DOC_URL = "https://github.com/oncleben31/ha-pool_pump"
# Icons
ICON = "mdi:format-quote-close"... | 28.844444 | 70 | 0.723421 |
0638bcc16cd9a056d50abc97fb3dbe132f61c6a5 | 33,417 | py | Python | regens_library.py | greggj2016/regens | 763413891f41068830b5e711ad3f16917e7771cf | [
"MIT"
] | null | null | null | regens_library.py | greggj2016/regens | 763413891f41068830b5e711ad3f16917e7771cf | [
"MIT"
] | null | null | null | regens_library.py | greggj2016/regens | 763413891f41068830b5e711ad3f16917e7771cf | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import pdb
from time import time
from bed_reader import open_bed
from bed_reader import to_bed
from scipy.optimize import root
from copy import deepcopy as COPY
from sklearn.linear_model import LogisticRegression
from sklearn.linear_model import LinearRegression
from regens_tester... | 57.22089 | 181 | 0.698178 |
f5d363b4afe48a8a72b64bfcaf705be50a85a79d | 6,560 | py | Python | tests/tibanna/ffcommon/test_file_format.py | 4dn-dcic/tibanna_ff | 6fcfc056b832c14500e525207afeb5722f366a26 | [
"MIT"
] | 2 | 2019-10-08T17:36:02.000Z | 2019-10-08T18:42:05.000Z | tests/tibanna/ffcommon/test_file_format.py | 4dn-dcic/tibanna_ff | 6fcfc056b832c14500e525207afeb5722f366a26 | [
"MIT"
] | null | null | null | tests/tibanna/ffcommon/test_file_format.py | 4dn-dcic/tibanna_ff | 6fcfc056b832c14500e525207afeb5722f366a26 | [
"MIT"
] | null | null | null | from tibanna_ffcommon.file_format import (
FormatExtensionMap,
parse_formatstr,
)
import pytest
import mock
@pytest.fixture
def minimal_format_search_result():
return [{'file_format': 'bam',
'standard_file_extension': 'bam',
'extrafile_formats': ['/file-formats/bai/']},
... | 53.770492 | 127 | 0.573323 |
0eef9cdc1c5f90c9796657bdbfdae31b959ece2d | 1,801 | py | Python | experiments/utils/auditor.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | 2 | 2022-03-17T04:50:20.000Z | 2022-03-17T04:51:31.000Z | experiments/utils/auditor.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | experiments/utils/auditor.py | ravirahman/sancus | 6563852b98edeb1068574e2d99e1fc18b815bee3 | [
"MIT"
] | null | null | null | import logging
import os
from decimal import Decimal
from threading import Event
from auditor.auditor import Auditor
from auditor.config import AuditorConfig, WebauthnConfig
from common.config import GRPCConfig, GRPCServerConfig, SQLAlchemyConfig
from common.utils.latency_interceptor import LatencyInterceptor
from com... | 30.525424 | 86 | 0.695725 |
61f2936b36263fc6b0d465280bb692998c3d8c8a | 10,644 | py | Python | std/pytorch/01-low/77.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | std/pytorch/01-low/77.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | std/pytorch/01-low/77.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import re
import os
import unicodedata
import numpy as np
device = torch.device("cpu")
MAX_LENGTH = 10
PAD_token = 0
SOS_token = 1
EOS_token = 2
class Voc:
def __init__(self, name):
self.name = name
self.trimmed = False
... | 37.478873 | 112 | 0.670237 |
cc4cb03249c9579124223080b7f62b484d7fff5f | 73 | py | Python | pdfplumber/_version.py | shalevy1/pdfplumber | 7cf54a1cc9d2750299d8530a18c5dcbf996b75e1 | [
"MIT"
] | 1 | 2019-08-25T13:39:27.000Z | 2019-08-25T13:39:27.000Z | pdfplumber/_version.py | theRealSuperMario/pdfplumber | 7cf54a1cc9d2750299d8530a18c5dcbf996b75e1 | [
"MIT"
] | 4 | 2021-03-19T15:48:11.000Z | 2022-03-12T00:54:11.000Z | pdfplumber/_version.py | theRealSuperMario/pdfplumber | 7cf54a1cc9d2750299d8530a18c5dcbf996b75e1 | [
"MIT"
] | null | null | null | version_info = (0, 5, 12)
__version__ = '.'.join(map(str, version_info))
| 24.333333 | 46 | 0.671233 |
50a553c3bb36e2479d60ac0a7bed34633e1453f8 | 136,814 | py | Python | vision/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2.py | q-logic/google-cloud-python | a65065c89c059bc564bbdd79288a48970907c399 | [
"Apache-2.0"
] | null | null | null | vision/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2.py | q-logic/google-cloud-python | a65065c89c059bc564bbdd79288a48970907c399 | [
"Apache-2.0"
] | 40 | 2019-07-16T10:04:48.000Z | 2020-01-20T09:04:59.000Z | vision/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2.py | q-logic/google-cloud-python | a65065c89c059bc564bbdd79288a48970907c399 | [
"Apache-2.0"
] | 2 | 2019-07-18T00:05:31.000Z | 2019-11-27T14:17:22.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/vision_v1p2beta1/proto/image_annotator.proto
import sys
_b = sys.version_info[0] < 3 and (lambda x: x) or (lambda x: x.encode("latin1"))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf... | 34.759654 | 11,397 | 0.634445 |
d63938df691feb729469c3c0d3106d18b3b7e4cf | 6,092 | py | Python | zaza/openstack/configure/guest.py | freyes/zaza-openstack-tests | c9834315f996966aaedd95d712a991df7a449eb8 | [
"ECL-2.0",
"Apache-2.0"
] | 5 | 2019-08-09T02:39:12.000Z | 2021-05-18T14:19:51.000Z | zaza/openstack/configure/guest.py | freyes/zaza-openstack-tests | c9834315f996966aaedd95d712a991df7a449eb8 | [
"ECL-2.0",
"Apache-2.0"
] | 350 | 2019-05-13T10:28:33.000Z | 2022-03-30T13:35:16.000Z | zaza/openstack/configure/guest.py | freyes/zaza-openstack-tests | c9834315f996966aaedd95d712a991df7a449eb8 | [
"ECL-2.0",
"Apache-2.0"
] | 72 | 2019-04-18T06:05:01.000Z | 2022-03-29T05:41:40.000Z | #!/usr/bin/env python3
# Copyright 2018 Canonical Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 35.418605 | 77 | 0.660867 |
baafe94be794b23f40fe09fa46757da38b3a18ef | 13,978 | py | Python | heat/tests/common.py | stackriot/heat | 9ed612906e388eda8bf850420cbceef54e05841c | [
"Apache-2.0"
] | 265 | 2015-01-02T09:33:22.000Z | 2022-03-26T23:19:54.000Z | heat/tests/common.py | stackriot/heat | 9ed612906e388eda8bf850420cbceef54e05841c | [
"Apache-2.0"
] | 8 | 2015-09-01T15:43:19.000Z | 2021-12-14T05:18:23.000Z | heat/tests/common.py | stackriot/heat | 9ed612906e388eda8bf850420cbceef54e05841c | [
"Apache-2.0"
] | 295 | 2015-01-06T07:00:40.000Z | 2021-09-06T08:05:06.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
# ... | 44.234177 | 79 | 0.655745 |
677fd982288dab9405a56e7b06ad6bfa2031b190 | 4,314 | py | Python | openapi_client/models/prediction_resource_relationships_trip_data.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/prediction_resource_relationships_trip_data.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | openapi_client/models/prediction_resource_relationships_trip_data.py | hypostulate/mbta-api-client | f18903b6269c523c733a31574ff4579349fed3f8 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
MBTA
MBTA service API. https://www.mbta.com Source code: https://github.com/mbta/api # noqa: E501
The version of the OpenAPI document: 3.0
Contact: developer@mbta.com
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from op... | 28.381579 | 97 | 0.588549 |
698e8c668596fb1c034a105f059d927b3aa7c43f | 5,109 | py | Python | temboo/core/Library/Zendesk/Requests/UpdateRequest.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | 7 | 2016-03-07T02:07:21.000Z | 2022-01-21T02:22:41.000Z | temboo/core/Library/Zendesk/Requests/UpdateRequest.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | null | null | null | temboo/core/Library/Zendesk/Requests/UpdateRequest.py | jordanemedlock/psychtruths | 52e09033ade9608bd5143129f8a1bfac22d634dd | [
"Apache-2.0"
] | 8 | 2016-06-14T06:01:11.000Z | 2020-04-22T09:21:44.000Z | # -*- coding: utf-8 -*-
###############################################################################
#
# UpdateRequest
# Updates an existing request.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file exce... | 41.536585 | 254 | 0.6743 |
2958f1456d7b4a69c0995b9796544c2b73cd5f79 | 18,798 | py | Python | medis/Telescope/coronagraph.py | RupertDodkins/medis | bdb1f00fb93506da2a1f251bc6780e70e97a16c5 | [
"MIT"
] | 1 | 2021-06-25T17:35:56.000Z | 2021-06-25T17:35:56.000Z | medis/Telescope/coronagraph.py | RupertDodkins/medis | bdb1f00fb93506da2a1f251bc6780e70e97a16c5 | [
"MIT"
] | null | null | null | medis/Telescope/coronagraph.py | RupertDodkins/medis | bdb1f00fb93506da2a1f251bc6780e70e97a16c5 | [
"MIT"
] | 2 | 2018-12-08T15:05:13.000Z | 2019-08-08T17:28:24.000Z | import os
import proper
import numpy as np
import matplotlib.pylab as plt
from medis.Utils.plot_tools import quicklook_wf, quicklook_im
from scipy.ndimage.interpolation import shift
from astropy.io.fits import getdata, writeto
import cv2
from medis.params import ap, tp, iop
from medis.Utils.misc import dprint
import ma... | 46.300493 | 151 | 0.616342 |
947950884ef4d2ac9f558bb88be53c9e172f4750 | 740 | py | Python | test.py | harisanth123/sofia | bdcb3ae3c3b50415da505ab86b50df20a9512dde | [
"MIT"
] | null | null | null | test.py | harisanth123/sofia | bdcb3ae3c3b50415da505ab86b50df20a9512dde | [
"MIT"
] | null | null | null | test.py | harisanth123/sofia | bdcb3ae3c3b50415da505ab86b50df20a9512dde | [
"MIT"
] | null | null | null | import requests
import tkinter as tk
def getnews():
api_key="54703bd8678b43b4ab72820379ca7fac"
url="https://newsapi.org/v2/top-headlines?country=in&apiKey="+api_key
news = requests.get(url).json()
articles = news["articles"]
my_articles = []
my_news = ""
for article in articles:
... | 22.424242 | 73 | 0.67027 |
6de1a4af012fefd925c0ffff1e1d9a72ca24fe7b | 281 | py | Python | vrequest/template/v/items.py | cilame/vrequest | 01d98cbd384e9dcd11dfe76a094e8d34427b4c36 | [
"MIT"
] | 40 | 2019-04-09T08:09:16.000Z | 2022-03-16T07:44:30.000Z | vrequest/template/v/items.py | zhangsanfu/vrequest | 0a483bb4ea86452b03ccf33869c1ebcd3f6c6d32 | [
"MIT"
] | 1 | 2019-10-08T15:04:02.000Z | 2021-04-15T06:01:21.000Z | vrequest/template/v/items.py | zhangsanfu/vrequest | 0a483bb4ea86452b03ccf33869c1ebcd3f6c6d32 | [
"MIT"
] | 13 | 2019-10-25T01:10:59.000Z | 2021-12-22T05:43:17.000Z | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class VItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
pass
| 18.733333 | 52 | 0.679715 |
492973ca02a160604909e12db59d7b65bec18427 | 1,227 | py | Python | server/recommender/db.py | Suharsh329/myrecipes | 4b4032c237aa6306de13c7b23ef5ed844e9b0add | [
"MIT"
] | null | null | null | server/recommender/db.py | Suharsh329/myrecipes | 4b4032c237aa6306de13c7b23ef5ed844e9b0add | [
"MIT"
] | null | null | null | server/recommender/db.py | Suharsh329/myrecipes | 4b4032c237aa6306de13c7b23ef5ed844e9b0add | [
"MIT"
] | null | null | null | from configparser import ConfigParser
import psycopg2
import os
def config(filename=os.getcwd() + '/recommender/config.ini', section='postgresql'):
# create a parser
parser = ConfigParser()
# read config file
parser.read(filename)
# get section, default to postgresql
db = {}
if... | 22.722222 | 91 | 0.604727 |
0e5b956d0cc4fa4d581378f6a4dce79c8acab139 | 12,601 | py | Python | pycftboot/cbt_seed2.py | alepiazza/pycftboot | d2f374744f528779cc68860cdbc904e0b7674bd8 | [
"MIT"
] | null | null | null | pycftboot/cbt_seed2.py | alepiazza/pycftboot | d2f374744f528779cc68860cdbc904e0b7674bd8 | [
"MIT"
] | null | null | null | pycftboot/cbt_seed2.py | alepiazza/pycftboot | d2f374744f528779cc68860cdbc904e0b7674bd8 | [
"MIT"
] | null | null | null | from symengine.lib.symengine_wrapper import Integer, eval_mpfr
from .cbt_common import ConformalBlockTableCommon
from .polynomial_vector import PolynomialVector
from .chain_rule import chain_rule_single
from .common import rules
from .constants import delta, prec, ell, r_cross, one
class ConformalBlockTableSeed2(Con... | 69.618785 | 268 | 0.481549 |
a86915fc796490e8c19f76ce8ba2e640877c4d66 | 3,825 | py | Python | src/kegnet/generator/utils.py | videoturingtest/KegNet | fe5d1eb5ab5453be70c4be473fd3da71afe4b06c | [
"Apache-2.0"
] | 42 | 2019-10-01T02:14:34.000Z | 2022-03-07T06:57:58.000Z | src/kegnet/generator/utils.py | videoturingtest/KegNet | fe5d1eb5ab5453be70c4be473fd3da71afe4b06c | [
"Apache-2.0"
] | 5 | 2019-12-18T16:44:52.000Z | 2021-10-02T15:45:37.000Z | src/kegnet/generator/utils.py | videoturingtest/KegNet | fe5d1eb5ab5453be70c4be473fd3da71afe4b06c | [
"Apache-2.0"
] | 13 | 2019-10-04T02:55:51.000Z | 2021-08-13T09:10:17.000Z | """
Knowledge Extraction with No Observable Data (NeurIPS 2019)
Authors:
- Jaemin Yoo (jaeminyoo@snu.ac.kr), Seoul National University
- Minyong Cho (chominyong@gmail.com), Seoul National University
- Taebum Kim (k.taebum@snu.ac.kr), Seoul National University
- U Kang (ukang@snu.ac.kr), Seoul National University
This... | 31.097561 | 73 | 0.667974 |
d70fd4dab9a4ce00a72b64dd55b963e8c55ebf18 | 473 | py | Python | 36-56/EX0036.py | printAllen-Lee/Mundo-2-de-Python | 8d83dcd0e73db6ce288797400520ca49080e31f1 | [
"MIT"
] | 1 | 2021-05-02T21:09:17.000Z | 2021-05-02T21:09:17.000Z | 36-56/EX0036.py | printAllen-Lee/Mundo-2-de-Python | 8d83dcd0e73db6ce288797400520ca49080e31f1 | [
"MIT"
] | null | null | null | 36-56/EX0036.py | printAllen-Lee/Mundo-2-de-Python | 8d83dcd0e73db6ce288797400520ca49080e31f1 | [
"MIT"
] | null | null | null | casa = float(input('Digite o Valor da Casa: R$'))
sal = float(input('Qual é o Salario do Comprador?'))
anos = int(input('Quantos anos de financiamento?'))
prestação = casa / (anos * 12)
minimo = sal * 30 /100
print('Para pagar uma casa de R${:.2f} em {} anos'.format(casa,anos),end = '')
print('A prestação será de R${:... | 29.5625 | 78 | 0.646934 |
cfbf65e3ba50dc1db7a67f638c5f815d16741856 | 3,655 | py | Python | wallpaper_changer.py | piepmatz/old-memories-new-wallpaper | 912edbf85d3480489299094db9afdb103b74ca6b | [
"MIT"
] | 1 | 2016-05-29T11:03:03.000Z | 2016-05-29T11:03:03.000Z | wallpaper_changer.py | piepmatz/old-memories-new-wallpaper | 912edbf85d3480489299094db9afdb103b74ca6b | [
"MIT"
] | 8 | 2016-05-29T11:02:44.000Z | 2016-11-19T14:18:03.000Z | wallpaper_changer.py | piepmatz/old-memories-new-wallpaper | 912edbf85d3480489299094db9afdb103b74ca6b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import unicode_literals, print_function
from datetime import date
import random
import sys
import argparse
import os
from sources import FilesystemSource, LightroomSource
from desktop_environments import OSXDesktop, WindowsDesktop
from util import error
def load_source(args):
... | 36.188119 | 120 | 0.643776 |
40f230ec7d050afacc4622bb1127435042febbb2 | 7,943 | py | Python | fetal_brain_mask/app.py | FNNDSC/pl-fetal-brain-masking | c038c29fe39c58c48616b770ffc0ce41897c6e37 | [
"MIT"
] | null | null | null | fetal_brain_mask/app.py | FNNDSC/pl-fetal-brain-masking | c038c29fe39c58c48616b770ffc0ce41897c6e37 | [
"MIT"
] | null | null | null | fetal_brain_mask/app.py | FNNDSC/pl-fetal-brain-masking | c038c29fe39c58c48616b770ffc0ce41897c6e37 | [
"MIT"
] | null | null | null | # fetal_brain_mask ds ChRIS plugin app
#
# (c) 2021 Fetal-Neonatal Neuroimaging & Developmental Science Center
# Boston Children's Hospital
#
# http://childrenshospital.org/FNNDSC/
# dev@babyMRI.org
#
from chrisapp.base import ChrisApp
from argparse import Argument... | 38.746341 | 107 | 0.581518 |
6d1af324b5757f281915cba827695b2659df0de1 | 13,344 | py | Python | anchore_manager/cli/analyzers.py | rbrady/anchore-engine | 5a5c492d76b5f911e60be422912fe8d42a74872b | [
"Apache-2.0"
] | 1,484 | 2017-09-11T19:08:42.000Z | 2022-03-29T07:47:44.000Z | anchore_manager/cli/analyzers.py | rbrady/anchore-engine | 5a5c492d76b5f911e60be422912fe8d42a74872b | [
"Apache-2.0"
] | 913 | 2017-09-27T20:37:53.000Z | 2022-03-29T17:21:28.000Z | anchore_manager/cli/analyzers.py | rbrady/anchore-engine | 5a5c492d76b5f911e60be422912fe8d42a74872b | [
"Apache-2.0"
] | 294 | 2017-09-12T16:54:03.000Z | 2022-03-14T01:28:51.000Z | import base64
import json
import os
import random
import re
import time
import click
import anchore_engine.common.helpers
from anchore_engine.clients import localanchore_standalone
from anchore_engine.clients.localanchore_standalone import analyze_image
from anchore_engine.clients.skopeo_wrapper import manifest_to_di... | 35.679144 | 173 | 0.536721 |
99a06bf417c919de72b5df6d2efabfd81b119a3c | 4,416 | py | Python | tests/contrib/pyramid/test_pyramid_autopatch.py | lucien2k/dd-trace-py | bb2f5a260ed2fc63e8e4120e2294428f3ec2cf1d | [
"BSD-3-Clause"
] | null | null | null | tests/contrib/pyramid/test_pyramid_autopatch.py | lucien2k/dd-trace-py | bb2f5a260ed2fc63e8e4120e2294428f3ec2cf1d | [
"BSD-3-Clause"
] | null | null | null | tests/contrib/pyramid/test_pyramid_autopatch.py | lucien2k/dd-trace-py | bb2f5a260ed2fc63e8e4120e2294428f3ec2cf1d | [
"BSD-3-Clause"
] | 1 | 2021-01-24T13:44:57.000Z | 2021-01-24T13:44:57.000Z | # stdlib
import json
import logging
import sys
import webtest
from nose.tools import eq_
from pyramid.config import Configurator
from pyramid.httpexceptions import HTTPInternalServerError
# 3p
from pyramid.response import Response
from pyramid.view import view_config
from wsgiref.simple_server import make_server
# pro... | 26.443114 | 63 | 0.636549 |
663e0f79286d990bf1ae1d8821443d8ca3259ec6 | 12,857 | py | Python | nova/virt/hyperv/migrationops.py | ONOP/nova | dd29ac18d3cb78c608e0fb104d455e6826a1b53e | [
"Apache-2.0"
] | 7 | 2017-06-19T19:37:00.000Z | 2019-06-16T02:06:14.000Z | nova/virt/hyperv/migrationops.py | ONOP/nova | dd29ac18d3cb78c608e0fb104d455e6826a1b53e | [
"Apache-2.0"
] | null | null | null | nova/virt/hyperv/migrationops.py | ONOP/nova | dd29ac18d3cb78c608e0fb104d455e6826a1b53e | [
"Apache-2.0"
] | 6 | 2015-06-20T16:07:28.000Z | 2020-08-19T14:57:59.000Z | # Copyright 2013 Cloudbase Solutions Srl
# 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... | 43.880546 | 79 | 0.613596 |
9c754f5c68bda9916a5de36a5377bfd24f6d2c81 | 325 | py | Python | client/python/thegame/abilities.py | afq984/thegame | 3769fffa281b7d5e8d1336d57e73c8e8d4d2289a | [
"MIT"
] | 3 | 2017-08-18T00:32:54.000Z | 2017-11-18T02:25:51.000Z | client/python/thegame/abilities.py | afq984/thegame | 3769fffa281b7d5e8d1336d57e73c8e8d4d2289a | [
"MIT"
] | 3 | 2017-08-15T09:59:25.000Z | 2018-08-22T17:28:13.000Z | client/python/thegame/abilities.py | afq984/thegame | 3769fffa281b7d5e8d1336d57e73c8e8d4d2289a | [
"MIT"
] | 1 | 2018-08-07T12:38:48.000Z | 2018-08-07T12:38:48.000Z | import re
import enum
class Ability(enum.IntEnum):
HealthRegen = 0
MaxHealth = 1
BodyDamage = 2
BulletSpeed = 3
BulletPenetration = 4
BulletDamage = 5
Reload = 6
MovementSpeed = 7
@property
def as_camel(self):
return re.sub('([A-Z])', r'_\1', self.name).lstrip('_').low... | 18.055556 | 71 | 0.606154 |
b94d011b4c4b7f75204da18ca08ca263eba3c19e | 707 | py | Python | tests/parser/syntax/test_missing_return.py | vaporyco/vyper | bdd7b01fe5cd452aba78aea6ebb1bde8419f35b3 | [
"MIT"
] | null | null | null | tests/parser/syntax/test_missing_return.py | vaporyco/vyper | bdd7b01fe5cd452aba78aea6ebb1bde8419f35b3 | [
"MIT"
] | null | null | null | tests/parser/syntax/test_missing_return.py | vaporyco/vyper | bdd7b01fe5cd452aba78aea6ebb1bde8419f35b3 | [
"MIT"
] | null | null | null | import pytest
from pytest import raises
from viper import compiler
from viper.exceptions import StructureException
fail_list = [
"""
@public
def foo() -> num:
pass
""",
]
@pytest.mark.parametrize('bad_code', fail_list)
def test_missing_return(bad_code):
with raises(StructureException):
comp... | 17.243902 | 80 | 0.671853 |
5ff61686975e3ae35cc73dc429ac5befe60db5c0 | 845 | py | Python | backend/tradingbot/migrations/0006_auto_20220110_2318.py | webclinic017/WallStreetBots | f4f73539b080ce7667b52ee8195919ec4e7b79b8 | [
"MIT"
] | 4 | 2021-11-12T02:04:30.000Z | 2022-01-03T22:56:41.000Z | backend/tradingbot/migrations/0006_auto_20220110_2318.py | webclinic017/WallStreetBots | f4f73539b080ce7667b52ee8195919ec4e7b79b8 | [
"MIT"
] | 5 | 2021-11-11T20:48:34.000Z | 2022-03-12T18:08:40.000Z | backend/tradingbot/migrations/0006_auto_20220110_2318.py | webclinic017/WallStreetBots | f4f73539b080ce7667b52ee8195919ec4e7b79b8 | [
"MIT"
] | 2 | 2021-11-15T14:23:36.000Z | 2021-11-27T19:44:38.000Z | # Generated by Django 3.2.8 on 2022-01-11 04:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tradingbot', '0005_auto_20220110_0101'),
]
operations = [
migrations.AddField(
model_name='portfolio',
name='optimiz... | 35.208333 | 219 | 0.64142 |
45270c20eb858b5b621501dcb15289bec22e42ed | 1,564 | py | Python | armory/baseline_models/keras/cifar.py | KyleBittner/armory | 7e403d6aa9f8f60f34365de06cd990697a1c5b1c | [
"MIT"
] | 1 | 2021-06-17T23:05:58.000Z | 2021-06-17T23:05:58.000Z | armory/baseline_models/keras/cifar.py | KyleBittner/armory | 7e403d6aa9f8f60f34365de06cd990697a1c5b1c | [
"MIT"
] | null | null | null | armory/baseline_models/keras/cifar.py | KyleBittner/armory | 7e403d6aa9f8f60f34365de06cd990697a1c5b1c | [
"MIT"
] | null | null | null | """
CNN model for 32x32x3 image classification
"""
from typing import Optional
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Flatten, Conv2D, MaxPooling2D
from art.classifiers import KerasClassifier
def make_cifar_model(**kwargs) -> tf.keras.Model:
... | 26.965517 | 84 | 0.632353 |
f1153c0734e632d9ba8e61ea91728cf7a0b51e53 | 395 | py | Python | examples/networking/update_range.py | j--wong/lib-stax-python-sdk | 0ea560b90ad7c62ec4ce84ae841a1fc183f8986b | [
"Apache-2.0"
] | 8 | 2020-05-15T03:39:51.000Z | 2022-01-20T05:15:00.000Z | examples/networking/update_range.py | j--wong/lib-stax-python-sdk | 0ea560b90ad7c62ec4ce84ae841a1fc183f8986b | [
"Apache-2.0"
] | 62 | 2020-05-07T23:51:46.000Z | 2022-03-15T23:18:09.000Z | examples/networking/update_range.py | j--wong/lib-stax-python-sdk | 0ea560b90ad7c62ec4ce84ae841a1fc183f8986b | [
"Apache-2.0"
] | 9 | 2020-05-15T04:00:26.000Z | 2022-02-18T03:53:37.000Z | import json
import os
from staxapp.config import Config
from staxapp.openapi import StaxClient
Config.access_key = os.getenv("STAX_ACCESS_KEY")
Config.secret_key = os.getenv("STAX_SECRET_KEY")
networks = StaxClient("networking")
body = {
"Name": "my-own-range"
}
response = networks.UpdateCidrRange(range_id="<ra... | 21.944444 | 68 | 0.759494 |
7a4a098e64dab58b0df3dde23a9587e58e270ef4 | 5,875 | py | Python | examples/t5_ancient_translation_train.py | 6666ev/bert_seq2seq | caa9b6c5629ae5783c733aebbbcf669d8ab5dde2 | [
"Apache-2.0"
] | 795 | 2020-03-13T10:16:26.000Z | 2022-03-30T02:07:57.000Z | examples/t5_ancient_translation_train.py | 6666ev/bert_seq2seq | caa9b6c5629ae5783c733aebbbcf669d8ab5dde2 | [
"Apache-2.0"
] | 51 | 2020-03-23T09:09:45.000Z | 2022-03-24T02:44:53.000Z | examples/t5_ancient_translation_train.py | 6666ev/bert_seq2seq | caa9b6c5629ae5783c733aebbbcf669d8ab5dde2 | [
"Apache-2.0"
] | 152 | 2020-04-01T04:37:18.000Z | 2022-03-31T03:22:14.000Z | import torch
import time
import glob
from torch.utils.data import Dataset, DataLoader
from bert_seq2seq import T5PegasusTokenizer, load_chinese_base_vocab
from bert_seq2seq import T5Model
vocab_path = "./state_dict/t5-chinese/vocab.txt"
model_path = "./state_dict/t5-chinese/pytorch_model.bin"
model_save_path = "./sta... | 30.921053 | 111 | 0.587234 |
c8f9b8e2af0fa1a6375ef6b4e2e835083eb08d93 | 782 | py | Python | TDO/utils_tdo/utils_evaluation.py | lgi2p/TDSelection | bd695d19e991cc852c00b73aa874406c9d37c391 | [
"MIT"
] | null | null | null | TDO/utils_tdo/utils_evaluation.py | lgi2p/TDSelection | bd695d19e991cc852c00b73aa874406c9d37c391 | [
"MIT"
] | null | null | null | TDO/utils_tdo/utils_evaluation.py | lgi2p/TDSelection | bd695d19e991cc852c00b73aa874406c9d37c391 | [
"MIT"
] | null | null | null | def compute_precision_with_general(sol_dict_, truth_, ancestors_):
#function that compute the number of expected/general/erroneous values returned by the approach
#note that the general values are all the returned values that are more general than the expected one (therefore they are still true)
#note th... | 41.157895 | 138 | 0.639386 |
bc38b3a67b63eb97afaadc5d793e24eb5a08040f | 4,675 | py | Python | factories/go_ethereum_arm.py | expanse-project/expanse-buildbot | 0d042a12901aed2eacc7ce3ef6b03f2d2dafdd9c | [
"MIT"
] | null | null | null | factories/go_ethereum_arm.py | expanse-project/expanse-buildbot | 0d042a12901aed2eacc7ce3ef6b03f2d2dafdd9c | [
"MIT"
] | null | null | null | factories/go_ethereum_arm.py | expanse-project/expanse-buildbot | 0d042a12901aed2eacc7ce3ef6b03f2d2dafdd9c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import factory
reload(factory)
from factory import *
import go_ethereum
reload(go_ethereum)
from go_ethereum import get_short_revision_go, _go_cmds
def arm_go_factory(branch='develop', isPullRequest=False):
factory = BuildFactory()
env = {
"GOPATH": Int... | 34.88806 | 151 | 0.514439 |
ecf01b8d85dc9fb682ab4c1e5fd8747a338e2f21 | 1,653 | py | Python | caldavclientlibrary/client/account.py | LaudateCorpus1/ccs-caldavclientlibrary | 5b1db7f3b49f03ba715f7286f71ddb9f54ddddac | [
"Apache-2.0"
] | 49 | 2016-08-22T17:34:34.000Z | 2021-11-08T09:47:45.000Z | caldavclientlibrary/client/account.py | DalavanCloud/ccs-caldavclientlibrary | ce8d554b8a0bcb13468f2dc87eef77da2302d6b3 | [
"Apache-2.0"
] | null | null | null | caldavclientlibrary/client/account.py | DalavanCloud/ccs-caldavclientlibrary | ce8d554b8a0bcb13468f2dc87eef77da2302d6b3 | [
"Apache-2.0"
] | 18 | 2017-01-21T22:28:04.000Z | 2022-03-26T11:57:30.000Z | ##
# Copyright (c) 2006-2016 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 42.384615 | 148 | 0.747731 |
199435be63082f88b9188954fa60de3c624c85dd | 261 | py | Python | layers/layer1_python3/0200_mflog/setup.py | thefab/mfcom-1 | f6a209edb22a782dfb0cf63cc0f62433b1b6e961 | [
"BSD-3-Clause"
] | null | null | null | layers/layer1_python3/0200_mflog/setup.py | thefab/mfcom-1 | f6a209edb22a782dfb0cf63cc0f62433b1b6e961 | [
"BSD-3-Clause"
] | null | null | null | layers/layer1_python3/0200_mflog/setup.py | thefab/mfcom-1 | f6a209edb22a782dfb0cf63cc0f62433b1b6e961 | [
"BSD-3-Clause"
] | null | null | null | import fastentrypoints # noqa: F401
from setuptools import setup
from setuptools import find_packages
setup(
name='mflog',
packages=find_packages(),
entry_points={
"console_scripts": [
"log = mflog.log:main",
]
}
)
| 18.642857 | 36 | 0.628352 |
c76786912e3cd7b7695b0636442d19e3fb1ff97b | 5,128 | py | Python | dev/local/callback/fp16.py | bearpelican/fastai_dev | eebc8430ec24eadce7455482a285df80505bae8a | [
"Apache-2.0"
] | null | null | null | dev/local/callback/fp16.py | bearpelican/fastai_dev | eebc8430ec24eadce7455482a285df80505bae8a | [
"Apache-2.0"
] | null | null | null | dev/local/callback/fp16.py | bearpelican/fastai_dev | eebc8430ec24eadce7455482a285df80505bae8a | [
"Apache-2.0"
] | null | null | null | #AUTOGENERATED! DO NOT EDIT! File to edit: dev/18_callback_fp16.ipynb (unless otherwise specified).
__all__ = ['get_master', 'to_master_grads', 'to_model_params', 'test_overflow', 'grad_overflow', 'MixedPrecision']
#Cell
from ..torch_basics import *
from ..test import *
from ..layers import *
from ..data.all import *... | 41.691057 | 114 | 0.689158 |
0125162f868054438aba1f2e9220c7fb56c71892 | 552 | py | Python | comment/templatetags/comment.py | fajardm/django-comment | 026acd21dc9cb155e491e3873d6d9d66845cb4f4 | [
"MIT"
] | null | null | null | comment/templatetags/comment.py | fajardm/django-comment | 026acd21dc9cb155e491e3873d6d9d66845cb4f4 | [
"MIT"
] | null | null | null | comment/templatetags/comment.py | fajardm/django-comment | 026acd21dc9cb155e491e3873d6d9d66845cb4f4 | [
"MIT"
] | null | null | null | from django import template
from comment.forms import CommentForm
from comment import models
register = template.Library()
@register.simple_tag
def comment_form(content_type, object_id):
return CommentForm(initial={'content_type': content_type, 'object_id': object_id})
@register.simple_tag
def comment_list(con... | 26.285714 | 86 | 0.818841 |
e314ddc48a8a505935cf88327d829b61b0b8bbe3 | 6,865 | py | Python | bin/bdftofnt.py | kisonecat/lerminus | 0f00219a85ba845427f3ab32b53e1d706b7dc8f2 | [
"X11"
] | 20 | 2020-09-15T17:07:46.000Z | 2022-03-29T17:17:05.000Z | bin/bdftofnt.py | kisonecat/lerminus | 0f00219a85ba845427f3ab32b53e1d706b7dc8f2 | [
"X11"
] | 3 | 2020-09-15T18:02:08.000Z | 2021-02-15T03:08:14.000Z | bin/bdftofnt.py | kisonecat/lerminus | 0f00219a85ba845427f3ab32b53e1d706b7dc8f2 | [
"X11"
] | null | null | null | #
# Copyright (c) 2019 Dimitar Toshkov Zhekov <dimitar.zhekov@gmail.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or (at your option) any later versio... | 29.978166 | 105 | 0.638747 |
c2bc2ac6982782327017c8c5fe9eed9f9a35fca8 | 839 | py | Python | saku/auction/serializers.py | Mehdi-MosTafavi/Saku-Backend | 348a1a676ffc8ddd9077f8c94733c5f6dce98fbd | [
"MIT"
] | null | null | null | saku/auction/serializers.py | Mehdi-MosTafavi/Saku-Backend | 348a1a676ffc8ddd9077f8c94733c5f6dce98fbd | [
"MIT"
] | null | null | null | saku/auction/serializers.py | Mehdi-MosTafavi/Saku-Backend | 348a1a676ffc8ddd9077f8c94733c5f6dce98fbd | [
"MIT"
] | null | null | null | import random
import string
from rest_framework import serializers
from auction.models import Auction
def get_random_token():
return ''.join(random.choice(string.ascii_letters + string.digits) for _ in range(8))
class CreateAuctionRequestSerializer(serializers.ModelSerializer):
class Meta:
model = A... | 31.074074 | 100 | 0.690107 |
03fa081146f0f93592a41909f948e8f1ba07ff9c | 509 | py | Python | poroto/converter.py | TANGO-Project/poroto | 380c0ab9f33bead70ed71c78493e682924d7f997 | [
"BSD-3-Clause"
] | 1 | 2018-05-22T22:53:31.000Z | 2018-05-22T22:53:31.000Z | poroto/converter.py | TANGO-Project/poroto | 380c0ab9f33bead70ed71c78493e682924d7f997 | [
"BSD-3-Clause"
] | null | null | null | poroto/converter.py | TANGO-Project/poroto | 380c0ab9f33bead70ed71c78493e682924d7f997 | [
"BSD-3-Clause"
] | null | null | null | class Converter():
def __init__(self, debug):
self.debug = debug
@classmethod
def register_arguments(cls, arg_parser):
pass
@classmethod
def parse_arguments(cls, args):
pass
def init(self, pragma_registry):
pass
def first_pass_validators(self):
ret... | 18.851852 | 57 | 0.59725 |
3f08bd9f611884a8c770a57e479e8e72d99b6b13 | 179 | py | Python | show_message.py | kajackdfw/python_rpi_sense_hat_demos | b0e5c0a7efe95db188c08409701af9ce9fe238fd | [
"CC0-1.0"
] | null | null | null | show_message.py | kajackdfw/python_rpi_sense_hat_demos | b0e5c0a7efe95db188c08409701af9ce9fe238fd | [
"CC0-1.0"
] | null | null | null | show_message.py | kajackdfw/python_rpi_sense_hat_demos | b0e5c0a7efe95db188c08409701af9ce9fe238fd | [
"CC0-1.0"
] | null | null | null | from sense_hat import SenseHat
sense = SenseHat()
while True:
sense.show_message("Astro Pi is awesome!!", scroll_speed=0.05, text_colour=[255,255,0], back_colour=[0,0,255])
| 25.571429 | 114 | 0.731844 |
7031785a0dfa5b63b843961bc1f7373b3543b899 | 8,301 | py | Python | scripts/analyze_leaderboard.py | VIDA-NYU/alphad3m | db40193a448300d87442c451f9da17fa5cb845fd | [
"Apache-2.0"
] | null | null | null | scripts/analyze_leaderboard.py | VIDA-NYU/alphad3m | db40193a448300d87442c451f9da17fa5cb845fd | [
"Apache-2.0"
] | null | null | null | scripts/analyze_leaderboard.py | VIDA-NYU/alphad3m | db40193a448300d87442c451f9da17fa5cb845fd | [
"Apache-2.0"
] | null | null | null | import os
import re
import logging
import pandas as pd
from bs4 import BeautifulSoup
from os.path import join, exists, dirname
from prettytable import PrettyTable
logger = logging.getLogger(__name__)
ALL_TA2S = {'NYU-TA2', 'CMU-TA2', 'UCB-TA2', 'Uncharted-TA2', 'SRI-TA2', 'Texas A&M-TA2', 'D3M ENSEMBLE-TA2', 'NEW-NYU... | 38.077982 | 124 | 0.654499 |
957441264843951e2f0e624137921014d448272a | 2,534 | py | Python | src/diffAnlysis.py | bioinfoUQAM/mirLibSpark | 5ea8c828e0ea53a6fa8689fca52a3b6818eeecc1 | [
"BSD-3-Clause"
] | 1 | 2019-12-05T19:36:46.000Z | 2019-12-05T19:36:46.000Z | src/diffAnlysis.py | bioinfoUQAM/mirLibSpark | 5ea8c828e0ea53a6fa8689fca52a3b6818eeecc1 | [
"BSD-3-Clause"
] | null | null | null | src/diffAnlysis.py | bioinfoUQAM/mirLibSpark | 5ea8c828e0ea53a6fa8689fca52a3b6818eeecc1 | [
"BSD-3-Clause"
] | null | null | null | '''
Amine M Remita
Chao-Jung Wu
2018-10-05
'''
import math
from scipy.stats import norm
from statsmodels.stats.multitest import multipletests
def __calculate_z_score (N1, N2, n1, n2):
''' # Kal et al 1999 '''
p0 = (n1 + n2)/(N1 + N2)
p1 = n1/N1
p2 = n2/N2
denom = math.sqrt(p0 * (1-p0) * ( (1/N1) + (1/N2)... | 26.123711 | 115 | 0.653118 |
1cab04b6737e6a1ee802ed686535b581e469b72d | 4,852 | py | Python | with_chemical_syn/bif_with_color/gamma=0.4_kappa=0/dat_to_py.py | helene-todd/M2_thesis_code | f844d6652229c6abe09bd40aa43f5002faa9e5ba | [
"MIT"
] | null | null | null | with_chemical_syn/bif_with_color/gamma=0.4_kappa=0/dat_to_py.py | helene-todd/M2_thesis_code | f844d6652229c6abe09bd40aa43f5002faa9e5ba | [
"MIT"
] | null | null | null | with_chemical_syn/bif_with_color/gamma=0.4_kappa=0/dat_to_py.py | helene-todd/M2_thesis_code | f844d6652229c6abe09bd40aa43f5002faa9e5ba | [
"MIT"
] | null | null | null | from matplotlib import cm, rcParams
import matplotlib.pyplot as plt
import matplotlib.colors as colors
import matplotlib as matplotlib
import numpy as np
import math as math
import random as rand
import os, sys
import csv
import argparse
# TO DO : Rewrite this code to make it more readable.
# USAGE : Run in terminal ... | 35.676471 | 203 | 0.604493 |
56c9b8fceb9ead544444f4e7ea768ed9e1c221d2 | 2,373 | py | Python | utils/ugatit_utils.py | SpikeKing/UGATIT-new | 4efbdc4e6d8046f5dd452616975d88c01fcbab72 | [
"MIT"
] | 1 | 2020-08-06T02:19:13.000Z | 2020-08-06T02:19:13.000Z | utils/ugatit_utils.py | SpikeKing/UGATIT-new | 4efbdc4e6d8046f5dd452616975d88c01fcbab72 | [
"MIT"
] | null | null | null | utils/ugatit_utils.py | SpikeKing/UGATIT-new | 4efbdc4e6d8046f5dd452616975d88c01fcbab72 | [
"MIT"
] | null | null | null | import tensorflow as tf
from tensorflow.contrib import slim
import cv2
import os, random
import numpy as np
class ImageData:
def __init__(self, load_size, channels, augment_flag):
self.load_size = load_size
self.channels = channels
self.augment_flag = augment_flag
def image_processin... | 26.366667 | 81 | 0.650232 |
3c3f06f0496990e500a2b6face668a025fe17841 | 4,538 | py | Python | dnnbrain/dnn/base.py | shuledelizi/dnnbrain | 3e584e6ffd5d9b1c01e685cccaa6a13a77b8a965 | [
"MIT"
] | null | null | null | dnnbrain/dnn/base.py | shuledelizi/dnnbrain | 3e584e6ffd5d9b1c01e685cccaa6a13a77b8a965 | [
"MIT"
] | null | null | null | dnnbrain/dnn/base.py | shuledelizi/dnnbrain | 3e584e6ffd5d9b1c01e685cccaa6a13a77b8a965 | [
"MIT"
] | null | null | null | import cv2
import torch
import numpy as np
from PIL import Image
from os.path import join as pjoin
from torchvision import transforms
class ImageSet:
"""
Build a dataset to load image
"""
def __init__(self, img_dir, img_ids, labels=None, transform=None):
"""
Initialize ImageSet
... | 31.957746 | 104 | 0.58528 |
d36cfc9f3e8865a3274a6fdd0bf9b9dc5985cbe7 | 1,961 | py | Python | hub/sensorhub/views/api/temperature_api_view.py | kblum/sensor-hub | 6b766ca59be74ae1a8d3d42afe048d04b6a0c546 | [
"MIT"
] | null | null | null | hub/sensorhub/views/api/temperature_api_view.py | kblum/sensor-hub | 6b766ca59be74ae1a8d3d42afe048d04b6a0c546 | [
"MIT"
] | null | null | null | hub/sensorhub/views/api/temperature_api_view.py | kblum/sensor-hub | 6b766ca59be74ae1a8d3d42afe048d04b6a0c546 | [
"MIT"
] | null | null | null | import logging
from . import BaseAuthenticatedApiView
from hub.sensorhub.models import Sensor, Reading, UserAgent
from rest_framework.exceptions import ParseError
from rest_framework.response import Response
logger = logging.getLogger(__name__)
class TemperatureApiView(BaseAuthenticatedApiView):
"""
View for... | 40.854167 | 104 | 0.690974 |
43c3dce1d64aef61ddd6a9a7389b9e5bdfe90e5e | 6,762 | py | Python | rucio_jupyterlab/tests/test_handler_did_search.py | didithilmy/rucio-jupyterlab | ad2db1344bb433a466696cde51aa787cd3b23237 | [
"BSD-3-Clause"
] | 4 | 2020-10-14T15:01:02.000Z | 2021-09-30T14:17:26.000Z | rucio_jupyterlab/tests/test_handler_did_search.py | didithilmy/rucio-jupyterlab | ad2db1344bb433a466696cde51aa787cd3b23237 | [
"BSD-3-Clause"
] | 1 | 2021-04-30T14:29:53.000Z | 2021-05-01T07:21:33.000Z | rucio_jupyterlab/tests/test_handler_did_search.py | didithilmy/rucio-jupyterlab | ad2db1344bb433a466696cde51aa787cd3b23237 | [
"BSD-3-Clause"
] | 1 | 2020-07-31T19:57:24.000Z | 2020-07-31T19:57:24.000Z | import json
from unittest.mock import call
import pytest
from rucio_jupyterlab.handlers.did_search import DIDSearchHandler, DIDSearchHandlerImpl, WildcardDisallowedException
from rucio_jupyterlab.rucio import RucioAPIFactory
from .mocks.mock_handler import MockHandler
MOCK_ACTIVE_INSTANCE = 'atlas'
def test_search_... | 39.776471 | 122 | 0.665631 |
db2f915224867f579ea866232c6a49bf95303314 | 1,212 | py | Python | test/test_sequence.py | ArchitJain1201/SBOL-utilities | 398c885eb9139e0833141ef45e87181253193724 | [
"MIT"
] | 3 | 2021-12-24T09:23:39.000Z | 2022-02-08T21:01:48.000Z | test/test_sequence.py | ArchitJain1201/SBOL-utilities | 398c885eb9139e0833141ef45e87181253193724 | [
"MIT"
] | 57 | 2021-04-26T14:36:54.000Z | 2022-03-22T14:02:37.000Z | test/test_sequence.py | ArchitJain1201/SBOL-utilities | 398c885eb9139e0833141ef45e87181253193724 | [
"MIT"
] | 13 | 2021-11-07T15:12:52.000Z | 2022-03-21T13:09:02.000Z | import unittest
import sbol3
from sbol_utilities.sequence import unambiguous_dna_sequence, unambiguous_rna_sequence, unambiguous_protein_sequence
class TestSequence(unittest.TestCase):
def test_sequence_validators(self):
assert unambiguous_dna_sequence('actGATCG')
assert not unambiguous_dna_seq... | 37.875 | 116 | 0.728548 |
29505ddb65f3e3fcf49c59ce175ca86214b5df08 | 3,753 | py | Python | backend/django/core/urls/api.py | RTIInternational/SMART | c95eaa088df33bac95aababdc560c10422eed6e3 | [
"MIT"
] | 185 | 2018-10-01T16:38:35.000Z | 2022-03-16T14:39:04.000Z | backend/django/core/urls/api.py | RTIInternational/SMART | c95eaa088df33bac95aababdc560c10422eed6e3 | [
"MIT"
] | 93 | 2018-12-07T15:33:44.000Z | 2022-03-09T15:19:08.000Z | backend/django/core/urls/api.py | RTIInternational/SMART | c95eaa088df33bac95aababdc560c10422eed6e3 | [
"MIT"
] | 30 | 2019-03-04T05:44:44.000Z | 2022-03-19T17:07:14.000Z | from django.conf.urls import include, re_path
from rest_framework import routers
from core.views import api, api_admin, api_annotate, api_viewsets
app_name = "core"
api_router = routers.DefaultRouter()
api_router.register(r"users", api_viewsets.ProfileViewSet)
api_router.register(r"auth_users", api_viewsets.AuthUser... | 44.678571 | 88 | 0.715428 |
26aad828895c4b2e0b15f221eae0a7bb97360d47 | 132,389 | py | Python | test/vanilla/Expected/AcceptanceTests/BodyDictionary/bodydictionary/operations/_dictionary_operations.py | qwordy/autorest.python | 6b12df51c2a39a1285546b5a771b69f5896e794f | [
"MIT"
] | null | null | null | test/vanilla/Expected/AcceptanceTests/BodyDictionary/bodydictionary/operations/_dictionary_operations.py | qwordy/autorest.python | 6b12df51c2a39a1285546b5a771b69f5896e794f | [
"MIT"
] | null | null | null | test/vanilla/Expected/AcceptanceTests/BodyDictionary/bodydictionary/operations/_dictionary_operations.py | qwordy/autorest.python | 6b12df51c2a39a1285546b5a771b69f5896e794f | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 43.067339 | 112 | 0.647682 |
efeb280a94410f54a00319a776abd334ab36807b | 1,197 | py | Python | django_sqlalchemy/ext/dj/models.py | anton-niki/Django-SQLAlchemy | 9bdf83ee3e528786c40a88ad75b874f026f0edf2 | [
"BSD-3-Clause"
] | null | null | null | django_sqlalchemy/ext/dj/models.py | anton-niki/Django-SQLAlchemy | 9bdf83ee3e528786c40a88ad75b874f026f0edf2 | [
"BSD-3-Clause"
] | null | null | null | django_sqlalchemy/ext/dj/models.py | anton-niki/Django-SQLAlchemy | 9bdf83ee3e528786c40a88ad75b874f026f0edf2 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django_sqlalchemy.declarative import create_base
from django_sqlalchemy.core import engine
from sqlalchemy import Table, Column, Integer, String, MetaData, ForeignKey, Boolean, DateTime
from sqlalchemy.sql.expression import text
from sqlalchemy.ext.hybrid import hybrid_property, hybrid_me... | 36.272727 | 94 | 0.688388 |
c62c4baca8345f20bcaddc957e622481500b9252 | 1,737 | py | Python | jvd/ghidra/dependencies.py | ccDev-Labs/JARV1S-Disassembler | ee41eb493c15a66b4695b6f24039c38471b7eb47 | [
"Apache-2.0"
] | 7 | 2020-12-19T18:56:23.000Z | 2021-11-21T20:29:58.000Z | jvd/ghidra/dependencies.py | ccDev-Labs/JARV1S-Disassembler | ee41eb493c15a66b4695b6f24039c38471b7eb47 | [
"Apache-2.0"
] | 1 | 2020-12-20T07:57:37.000Z | 2020-12-28T18:10:11.000Z | jvd/ghidra/dependencies.py | L1NNA/JARV1S-Ghidra | 84b551b2a1266b6bcb9454aaa01b97b21d7d4d4f | [
"Apache-2.0"
] | 2 | 2020-12-20T11:32:20.000Z | 2021-03-17T15:36:16.000Z | from tqdm import tqdm
import subprocess
from jvd.resources import ResourceAbstract, require
import re
import platform
import os
class GhidraJar(ResourceAbstract):
def __init__(self):
super().__init__()
self.default = 'https://github.com/L1NNA/JARV1S-Ghidra/releases/download/v0.0.1/jarv1s-ghidra.ja... | 36.957447 | 160 | 0.618883 |
dc39138d58f4fd8d9ac8feb19fd9329bd51af059 | 1,679 | py | Python | dicewars/server/summary.py | thejoeejoee/SUI-MIT-VUT-2020-2021 | aee307aa772c5a0e97578da5ebedd3e2cd39ab91 | [
"MIT"
] | null | null | null | dicewars/server/summary.py | thejoeejoee/SUI-MIT-VUT-2020-2021 | aee307aa772c5a0e97578da5ebedd3e2cd39ab91 | [
"MIT"
] | null | null | null | dicewars/server/summary.py | thejoeejoee/SUI-MIT-VUT-2020-2021 | aee307aa772c5a0e97578da5ebedd3e2cd39ab91 | [
"MIT"
] | 1 | 2021-01-15T19:01:45.000Z | 2021-01-15T19:01:45.000Z | from collections import defaultdict
class GameSummary:
def __init__(self):
self.winner = None
self.nb_battles = 0
self.eliminations = []
def set_winner(self, winner):
if winner is None:
self.winner = '#None'
else:
self.winner = winner
def a... | 26.650794 | 98 | 0.60274 |
c0382c7504f5dd362414048d0aa7d84adda537df | 2,366 | py | Python | awx/main/constants.py | sumit-21/awx | 966a62c6bf2ec0c672e076684341bc6bd75827af | [
"Apache-2.0"
] | 17 | 2021-04-03T01:40:17.000Z | 2022-03-03T11:45:20.000Z | awx/main/constants.py | sumit-21/awx | 966a62c6bf2ec0c672e076684341bc6bd75827af | [
"Apache-2.0"
] | 24 | 2021-05-18T21:13:35.000Z | 2022-03-29T10:23:52.000Z | awx/main/constants.py | sumit-21/awx | 966a62c6bf2ec0c672e076684341bc6bd75827af | [
"Apache-2.0"
] | 14 | 2021-04-06T20:05:41.000Z | 2022-03-24T14:16:03.000Z | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
import re
from django.utils.translation import ugettext_lazy as _
__all__ = [
'CLOUD_PROVIDERS', 'SCHEDULEABLE_PROVIDERS', 'PRIVILEGE_ESCALATION_METHODS',
'ANSI_SGR_PATTERN', 'CAN_CANCEL', 'ACTIVE_STATES', 'STANDARD_INVENTORY_UPDATE_ENV'
]
CLOUD_PROV... | 41.508772 | 97 | 0.695266 |
c4f4f5d652cd5f20aea9dcd2804a1c017838ea4d | 2,867 | py | Python | california_house_csv.py | KyleXus/Advanced-Programming | f00bb2882f7c39c98b9616de36ed681339cd29ac | [
"Unlicense"
] | null | null | null | california_house_csv.py | KyleXus/Advanced-Programming | f00bb2882f7c39c98b9616de36ed681339cd29ac | [
"Unlicense"
] | null | null | null | california_house_csv.py | KyleXus/Advanced-Programming | f00bb2882f7c39c98b9616de36ed681339cd29ac | [
"Unlicense"
] | null | null | null | import csv
import sqlite3
# open the connection to the database
conn = sqlite3.connect('california_house_data.db')
cur = conn.cursor()
# drop the data from the table so that if we rerun the file, we don't repeat values
conn.execute('DROP TABLE IF EXISTS test')
print("table dropped successfully");
# create table again... | 40.380282 | 181 | 0.659923 |
939ee86ca9dcc4fd36c730604b803b2e92c6728d | 11,711 | py | Python | tests/test_extensions/test_onnx_extension/test_onnx_serialization.py | adriansmares/openml-deeplearning | 44856ae5f79b553acdb3001e52ca981922f3093f | [
"BSD-3-Clause"
] | null | null | null | tests/test_extensions/test_onnx_extension/test_onnx_serialization.py | adriansmares/openml-deeplearning | 44856ae5f79b553acdb3001e52ca981922f3093f | [
"BSD-3-Clause"
] | 8 | 2019-05-23T08:03:24.000Z | 2019-09-20T10:14:43.000Z | tests/test_extensions/test_onnx_extension/test_onnx_serialization.py | adriansmares/openml-deeplearning | 44856ae5f79b553acdb3001e52ca981922f3093f | [
"BSD-3-Clause"
] | 2 | 2019-06-19T11:10:47.000Z | 2019-07-08T10:31:01.000Z | import os
import re
import sys
import onnx
import inspect
from collections import OrderedDict
import openml
from openml.extensions.onnx import OnnxExtension
from openml.testing import TestBase
this_directory = os.path.dirname(os.path.abspath(__file__))
sys.path.append(this_directory)
# Values taken from https://git... | 57.406863 | 100 | 0.454871 |
1d0975b4d91650bd8dbea7464fad4158085cb9f6 | 955 | py | Python | plot.py | aarora79/sb_study | aaeaaae9eac159d94e102ecdff24591d1e81e148 | [
"MIT"
] | 1 | 2017-12-02T04:25:39.000Z | 2017-12-02T04:25:39.000Z | plot.py | aarora79/sb_study | aaeaaae9eac159d94e102ecdff24591d1e81e148 | [
"MIT"
] | null | null | null | plot.py | aarora79/sb_study | aaeaaae9eac159d94e102ecdff24591d1e81e148 | [
"MIT"
] | 1 | 2020-03-04T01:25:18.000Z | 2020-03-04T01:25:18.000Z | """
Thanks Josh Hemann for the example
"""
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.patches import Polygon
import pandas as pd
## numpy is used for creating fake data
import numpy as np
import matplotlib as mpl
import os
## agg backend is used to create plot as a .png file
mpl.use('agg')
... | 24.487179 | 81 | 0.727749 |
3e7122221be7c6b8f4124f12a1d3e219d467710a | 14,691 | py | Python | resources/mgltools_x86_64Linux2_1.5.6/lib/python2.5/site-packages/paramiko/pkey.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | 8 | 2021-12-14T21:30:01.000Z | 2022-02-14T11:30:03.000Z | cmdb_v0.1/scanhosts/modules/paramiko_old/pkey.py | codemaker-man/projects | 334aac28b72a7b466fba23df4db11e95df13a3ec | [
"MIT"
] | null | null | null | cmdb_v0.1/scanhosts/modules/paramiko_old/pkey.py | codemaker-man/projects | 334aac28b72a7b466fba23df4db11e95df13a3ec | [
"MIT"
] | 3 | 2016-04-11T14:10:59.000Z | 2019-03-13T10:32:38.000Z | # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko is free software; you can redistribute it and/or modify it under the
# terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (a... | 38.458115 | 107 | 0.611463 |
3146b37db7bc88dc5964784988058b9c1266d311 | 749 | py | Python | build/lib/lib/Common/Assert.py | alexfmsu/pyquantum | 78b09987cbfecf549e67b919bb5cb2046b21ad44 | [
"MIT"
] | null | null | null | build/lib/lib/Common/Assert.py | alexfmsu/pyquantum | 78b09987cbfecf549e67b919bb5cb2046b21ad44 | [
"MIT"
] | null | null | null | build/lib/lib/Common/Assert.py | alexfmsu/pyquantum | 78b09987cbfecf549e67b919bb5cb2046b21ad44 | [
"MIT"
] | 2 | 2020-07-28T08:40:06.000Z | 2022-02-16T23:04:58.000Z | # from Common.ext import print_error
from inspect import currentframe as cf
from inspect import currentframe, getframeinfo
frameinfo = getframeinfo(currentframe())
def print_error(err_msg, cf):
filename = getframeinfo(cf).filename
print("\033[1;31;1mError:\033[1;32;0m", end=" ")
print(err_msg, end="\n\n... | 24.16129 | 99 | 0.544726 |
88b3ae20af0cabcc64ac574467a354cc39ec6ce3 | 128 | py | Python | carApp/admin.py | cs-fullstack-2019-spring/django-validation-cw-tdude0175-1 | 4f52b88e6b387b8babe7d9b1453bb7c6d77c2f11 | [
"Apache-2.0"
] | null | null | null | carApp/admin.py | cs-fullstack-2019-spring/django-validation-cw-tdude0175-1 | 4f52b88e6b387b8babe7d9b1453bb7c6d77c2f11 | [
"Apache-2.0"
] | null | null | null | carApp/admin.py | cs-fullstack-2019-spring/django-validation-cw-tdude0175-1 | 4f52b88e6b387b8babe7d9b1453bb7c6d77c2f11 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from .models import NewCarModel
# Register your models here.
admin.site.register(NewCarModel) | 21.333333 | 32 | 0.820313 |
6601cb93fc62d97c19bb4ad0ce17f0d698c102de | 1,406 | py | Python | pytorch_lightning/tuner/tuning.py | GimmickNG/pytorch-lightning | b36c5e86d014671b0fa922d750b27420bc73b6f9 | [
"Apache-2.0"
] | 1 | 2021-03-10T20:13:50.000Z | 2021-03-10T20:13:50.000Z | pytorch_lightning/tuner/tuning.py | GimmickNG/pytorch-lightning | b36c5e86d014671b0fa922d750b27420bc73b6f9 | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/tuner/tuning.py | GimmickNG/pytorch-lightning | b36c5e86d014671b0fa922d750b27420bc73b6f9 | [
"Apache-2.0"
] | 1 | 2020-09-11T22:53:18.000Z | 2020-09-11T22:53:18.000Z | # Copyright The PyTorch Lightning team.
#
# 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 i... | 38 | 106 | 0.653627 |
cbafe6bd42356fff1e8562d425917ae9e5181aea | 48,162 | py | Python | app.py | youka14/AIcar | 92b1e7b6b129e3db39fc0cd2fee828980086a08e | [
"MIT"
] | null | null | null | app.py | youka14/AIcar | 92b1e7b6b129e3db39fc0cd2fee828980086a08e | [
"MIT"
] | null | null | null | app.py | youka14/AIcar | 92b1e7b6b129e3db39fc0cd2fee828980086a08e | [
"MIT"
] | null | null | null |
from PIL import Image
import tkinter as tk
from tkinter import filedialog
from yolo import YOLO
import io,os
import base64
import time
import numpy as np
import cv2
from keras.backend import clear_session
from flask import make_response,Response
from flask import Flask, render_template, request , redirec... | 142.913947 | 35,579 | 0.84359 |
26a717db1896a7fde9943487048d9449b9c6af91 | 1,663 | py | Python | models/Model.py | KellieHawks/TTT-Proj | 6626d9250cf9cdd94eed2257ffab8ccbdf9f687d | [
"MIT"
] | null | null | null | models/Model.py | KellieHawks/TTT-Proj | 6626d9250cf9cdd94eed2257ffab8ccbdf9f687d | [
"MIT"
] | null | null | null | models/Model.py | KellieHawks/TTT-Proj | 6626d9250cf9cdd94eed2257ffab8ccbdf9f687d | [
"MIT"
] | null | null | null | """
Authors: Kellie Hawks
Date: 04/14/2019
CIS 407
Tic Tac Toe Bot
Cite: Rules for tictactoe - http://www.cyberoculus.com/tic-tac-toe.asp?Action=Rules
"""
#System Imports
from datetime import datetime, timedelta
import copy
class TTTModel:
"""CONSTRUCTOR FOR MODEL"""
def __init__(self, wins... | 21.881579 | 87 | 0.619964 |
95a66d4a43d1bc26041917d72dfd1af48999fea2 | 27,028 | py | Python | deepff/lammps_run.py | JunboLu/CP2K_kit | 0950f37f253c3f90d6a0539c57f1be1045e7317d | [
"Apache-2.0"
] | 16 | 2021-04-19T03:40:32.000Z | 2022-02-21T12:53:33.000Z | deepff/lammps_run.py | JunboLu/CP2K_kit | 0950f37f253c3f90d6a0539c57f1be1045e7317d | [
"Apache-2.0"
] | null | null | null | deepff/lammps_run.py | JunboLu/CP2K_kit | 0950f37f253c3f90d6a0539c57f1be1045e7317d | [
"Apache-2.0"
] | 2 | 2021-11-28T02:55:31.000Z | 2022-02-21T12:54:52.000Z | #! /usr/env/bin python
import os
import math
import subprocess
import numpy as np
from CP2K_kit.tools import *
from CP2K_kit.deepff import process
from CP2K_kit.deepff import gen_lammps_task
def lmpmd_single(lmp_dir, sys_index, task_index, lmp_exe, lmp_path, mpi_path, \
lmp_mpi_num_per_job, lmp_omp_n... | 36.772789 | 144 | 0.669824 |
d884142594aad11a19db9823081e8969650445c2 | 1,487 | py | Python | tests/conftest.py | humilis/humilis-push-processor | 966e147bdef103584109bc781ef8af5a7d82a83b | [
"MIT"
] | null | null | null | tests/conftest.py | humilis/humilis-push-processor | 966e147bdef103584109bc781ef8af5a7d82a83b | [
"MIT"
] | 6 | 2016-07-21T15:30:52.000Z | 2018-01-12T19:55:02.000Z | tests/conftest.py | humilis/humilis-push-processor | 966e147bdef103584109bc781ef8af5a7d82a83b | [
"MIT"
] | null | null | null | """Unit test configuration."""
from __future__ import unicode_literals
import pytest
import json
import uuid
@pytest.fixture(scope="session", params=[1, 5])
def events(request):
"""A batch of events to be ingested by Kinesis."""
return [{
"id": str(uuid.uuid4()).replace("-", ""),
"timestamp":... | 29.74 | 75 | 0.621385 |
41905371d57ccbc2970596fe13eb09b0343c152c | 1,825 | py | Python | ranger/plugins/bxref_linemode.py | amerlyq/airy | 696b00d22734c4d840eb6cd83a34050efdecd51b | [
"MIT"
] | 17 | 2015-06-08T16:49:44.000Z | 2022-02-05T05:58:12.000Z | ranger/plugins/bxref_linemode.py | amerlyq/airy | 696b00d22734c4d840eb6cd83a34050efdecd51b | [
"MIT"
] | null | null | null | ranger/plugins/bxref_linemode.py | amerlyq/airy | 696b00d22734c4d840eb6cd83a34050efdecd51b | [
"MIT"
] | 4 | 2015-08-09T19:47:34.000Z | 2018-05-18T20:26:13.000Z | import ranger.api
from ranger.core.linemode import LinemodeBase
@ranger.api.register_linemode
class XAttrLinemode(LinemodeBase):
"""list file attributes on a Linux second extended file system"""
name = "xattr"
def xattr_get(self, f):
# XXX: lsattr != os.listxattr (BAD: empty list)
from s... | 33.796296 | 88 | 0.632329 |
3988029686a78c653209cfb0e7a0ec3239cc1504 | 1,648 | py | Python | src/proof-of-concept/utils.py | zbreit/spotify-covergen | ff7e53ff5bb4fa5f3f77bd1c4ad437249e99604d | [
"MIT"
] | 1 | 2021-02-01T19:59:33.000Z | 2021-02-01T19:59:33.000Z | python-proof-of-concept/utils.py | zbreit/spotify-covergen | ff7e53ff5bb4fa5f3f77bd1c4ad437249e99604d | [
"MIT"
] | 2 | 2021-02-01T21:18:04.000Z | 2022-02-18T00:33:48.000Z | src/proof-of-concept/utils.py | zbreit/spotify-covergen | ff7e53ff5bb4fa5f3f77bd1c4ad437249e99604d | [
"MIT"
] | null | null | null | from PIL import Image
from typing import Generator, Tuple
def centered_resize(image: Image, size: Tuple[int, int]) -> Image:
"""
Resizes an image, cropping and centering it doesn't match the target resolution.
Like CSS's `background-fill: cover`
"""
width, height = size
old_aspect_ratio = imag... | 35.826087 | 102 | 0.64017 |
de91af79cb244317281354e05aee50b29a46bb88 | 2,650 | py | Python | cdpcli/extensions/arguments.py | anuragpatro/cdpcli | fe2b78308e4f8c09aa9609a43a646f314fa20327 | [
"Apache-2.0"
] | 7 | 2020-10-01T14:03:57.000Z | 2022-02-23T17:47:08.000Z | cdpcli/extensions/arguments.py | anuragpatro/cdpcli | fe2b78308e4f8c09aa9609a43a646f314fa20327 | [
"Apache-2.0"
] | 1 | 2020-11-30T08:00:50.000Z | 2020-12-01T08:00:20.000Z | cdpcli/extensions/arguments.py | anuragpatro/cdpcli | fe2b78308e4f8c09aa9609a43a646f314fa20327 | [
"Apache-2.0"
] | 7 | 2020-11-07T20:55:47.000Z | 2021-11-09T18:45:33.000Z | # Copyright 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Modifications made by Cloudera are:
# Copyright (c) 2016 Cloudera, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
... | 40.769231 | 79 | 0.679623 |
0707416e57d9ace0339aba4a5346810614647cea | 62 | py | Python | calvin/actorstore/systemactors/text/__init__.py | gabrielcercel/calvin-base | c0315f100643230d65aed1745e1c22df3e7a7c2c | [
"Apache-2.0"
] | 334 | 2015-06-04T15:14:28.000Z | 2022-02-09T11:14:17.000Z | calvin/actorstore/systemactors/text/__init__.py | gabrielcercel/calvin-base | c0315f100643230d65aed1745e1c22df3e7a7c2c | [
"Apache-2.0"
] | 89 | 2015-06-13T19:15:35.000Z | 2019-12-03T19:23:20.000Z | calvin/actorstore/systemactors/text/__init__.py | gabrielcercel/calvin-base | c0315f100643230d65aed1745e1c22df3e7a7c2c | [
"Apache-2.0"
] | 112 | 2015-06-06T19:16:54.000Z | 2020-10-19T01:27:55.000Z | """This module organizes actors related to text processing.""" | 62 | 62 | 0.774194 |
15504fa25c5bae6514e47587e1e76f936c251c50 | 311 | py | Python | src/utilities/getCleanedStrings.py | LuisArmando-TestCoder/ShareGraph | fa89d37c8fe522c526b903fe25bd1e22fd769425 | [
"MIT"
] | null | null | null | src/utilities/getCleanedStrings.py | LuisArmando-TestCoder/ShareGraph | fa89d37c8fe522c526b903fe25bd1e22fd769425 | [
"MIT"
] | null | null | null | src/utilities/getCleanedStrings.py | LuisArmando-TestCoder/ShareGraph | fa89d37c8fe522c526b903fe25bd1e22fd769425 | [
"MIT"
] | null | null | null | def getCleanedStrings(strings, partsToClean):
cleanedStrings = []
for string in strings:
cleanedString = string
for partToClean in partsToClean:
cleanedString = cleanedString.replace(partToClean, "")
cleanedStrings.append(cleanedString)
return cleanedStrings | 25.916667 | 66 | 0.691318 |
2985e3b036ce71540e22eaf7cd7929b9cbb2ee78 | 2,696 | py | Python | tests/crud/test_crud_updating.py | MacHu-GWU/sqlalchemy_mate-project | e9f7cf7434c984f391758b9b915dad1e1cc774f9 | [
"MIT"
] | 2 | 2019-10-31T17:03:18.000Z | 2021-03-26T04:12:03.000Z | tests/crud/test_crud_updating.py | MacHu-GWU/sqlalchemy_mate-project | e9f7cf7434c984f391758b9b915dad1e1cc774f9 | [
"MIT"
] | 1 | 2020-12-05T23:16:20.000Z | 2020-12-05T23:16:20.000Z | tests/crud/test_crud_updating.py | MacHu-GWU/sqlalchemy_mate-project | e9f7cf7434c984f391758b9b915dad1e1cc774f9 | [
"MIT"
] | 1 | 2021-04-12T07:35:31.000Z | 2021-04-12T07:35:31.000Z | # -*- coding: utf-8 -*-
import pytest
from sqlalchemy_mate.crud import selecting
from sqlalchemy_mate.crud import updating
from sqlalchemy_mate.crud import deleting
from sqlalchemy_mate.tests import (
IS_WINDOWS,
engine_sqlite, engine_psql, t_cache, t_graph, BaseTest
)
class UpdatingApiBaseTest(BaseTest):
... | 29.304348 | 77 | 0.561202 |
fa5cc337673618210dd43ad47a7cac2fc6fbdb16 | 4,131 | py | Python | PC_Detector/instructions.py | MIAOUS-group/web-port-contention | 962949d8a20513095ceae31efc6526a6ac0a1e2f | [
"MIT"
] | 1 | 2022-03-16T14:43:17.000Z | 2022-03-16T14:43:17.000Z | PC_Detector/instructions.py | MIAOUS-group/web-port-contention | 962949d8a20513095ceae31efc6526a6ac0a1e2f | [
"MIT"
] | null | null | null | PC_Detector/instructions.py | MIAOUS-group/web-port-contention | 962949d8a20513095ceae31efc6526a6ac0a1e2f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
def cross_product(type, operations):
results = []
for t in type:
for o in operations:
results.append("{}.{}".format(t,o))
return results
def get_input_output(cvop):
io_type_re = re.search("([if][0-9]{2}).[a-z_]*([if][0-9]{2}... | 40.5 | 697 | 0.588235 |
8567a21108416e88d8d448a51c2a633e34bec251 | 8,176 | py | Python | lambdo/utils.py | wangchengrong/lambdo | 7de0e4bd61ffa6d03f23290c198f08a22c3fcf28 | [
"MIT"
] | 1 | 2021-02-24T09:06:32.000Z | 2021-02-24T09:06:32.000Z | lambdo/utils.py | wangchengrong/lambdo | 7de0e4bd61ffa6d03f23290c198f08a22c3fcf28 | [
"MIT"
] | null | null | null | lambdo/utils.py | wangchengrong/lambdo | 7de0e4bd61ffa6d03f23290c198f08a22c3fcf28 | [
"MIT"
] | null | null | null | __author__="Alexandr Savinov"
import os
import pickle
import urllib.parse
import pandas as pd
import logging
log = logging.getLogger('UTILS')
def is_valid_uri(uri):
"""Determine if the string is a valid URL. We use it to distringuish links from workflow variables."""
try:
result = urllib.parse.urlpa... | 30.621723 | 133 | 0.603841 |
75b708a8391dcbb6f29bf8588e5d6fe40b1c46f8 | 928 | py | Python | valentina/app/tests/test_affiliation_model.py | g4brielvs/valentina | d34ff934c88f465385be924bbe24cec7f1c395c8 | [
"MIT"
] | null | null | null | valentina/app/tests/test_affiliation_model.py | g4brielvs/valentina | d34ff934c88f465385be924bbe24cec7f1c395c8 | [
"MIT"
] | 1 | 2021-06-10T23:37:05.000Z | 2021-06-10T23:37:05.000Z | valentina/app/tests/test_affiliation_model.py | g4brielvs/valentina | d34ff934c88f465385be924bbe24cec7f1c395c8 | [
"MIT"
] | null | null | null | from django.contrib.auth.models import User
from django.test import TestCase
from valentina.app.models import Affiliation, Chat
class TestAffiliationModel(TestCase):
def setUp(self):
self.chat = Chat.objects.create(person='42')
self.user = User.objects.create_user(username='olivia')
self.... | 37.12 | 70 | 0.580819 |
e88aa38626e68152258495279d58d6465abae315 | 916 | py | Python | back/products/models.py | cwhittl/givecamp | f92204bb095efe7c60513d8aad4985fc985cdfca | [
"MIT"
] | 9 | 2017-01-17T10:00:14.000Z | 2021-08-02T09:45:52.000Z | back/products/models.py | cwhittl/givecamp | f92204bb095efe7c60513d8aad4985fc985cdfca | [
"MIT"
] | 3 | 2017-04-06T08:56:45.000Z | 2018-07-10T05:06:31.000Z | back/products/models.py | cwhittl/givecamp | f92204bb095efe7c60513d8aad4985fc985cdfca | [
"MIT"
] | 2 | 2018-01-11T16:42:02.000Z | 2018-07-04T17:20:36.000Z | from django.db import models
PRODUCT_TYPE = (
('p', 'Product'),
('s', 'Service'),
)
PERIODS = (
('1m', '1 month'),
('3m', '3 months'),
('1y', '1 year'),
)
class Category(models.Model):
name = models.CharField(max_length=255)
def __str__(self):
return self.name
class Meta:... | 23.487179 | 93 | 0.655022 |
9dda57e533925ac0280fbb4b1d969ddfe00abc50 | 1,451 | py | Python | Tower_defence_Golear_Karpenko/config.py | Disadvantaged/Tower_defence_Golear_Karpenko | 27430159b7d0e0c5bc7d6df1d2e82d4e8acedb54 | [
"MIT"
] | 2 | 2019-05-17T07:40:31.000Z | 2020-03-02T18:22:54.000Z | Tower_defence_Golear_Karpenko/config.py | Disadvantaged/Tower_defence_Golear_Karpenko | 27430159b7d0e0c5bc7d6df1d2e82d4e8acedb54 | [
"MIT"
] | null | null | null | Tower_defence_Golear_Karpenko/config.py | Disadvantaged/Tower_defence_Golear_Karpenko | 27430159b7d0e0c5bc7d6df1d2e82d4e8acedb54 | [
"MIT"
] | 1 | 2020-01-01T19:01:28.000Z | 2020-01-01T19:01:28.000Z | from Tower_defence_Golear_Karpenko.base_classes.coordinate import Coordinate
# Colors
WHITE = (255, 255, 255)
BLACK = (0, 0, 0)
DARKGREY = (40, 40, 40)
LIGHTGREY = (100, 100, 100)
GREEN = (0, 255, 0)
RED = (255, 0, 0)
YELLOW = (255, 255, 0)
TURQUOISE = (64, 224, 208)
# Screen
SCREEN_HEIGHT = 700
SCREEN_WIDTH = 1000
F... | 21.338235 | 76 | 0.751895 |
fdc2c15b6ef70524132ecf3b41ec7cdfb31146b5 | 86 | py | Python | p2_continuous-control/constants.py | aagnone3/deep-rl-nd | 939a69ab47f69557aba110a519449aaa80bd145d | [
"Apache-2.0"
] | null | null | null | p2_continuous-control/constants.py | aagnone3/deep-rl-nd | 939a69ab47f69557aba110a519449aaa80bd145d | [
"Apache-2.0"
] | null | null | null | p2_continuous-control/constants.py | aagnone3/deep-rl-nd | 939a69ab47f69557aba110a519449aaa80bd145d | [
"Apache-2.0"
] | null | null | null | import torch
DEVICE = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
| 21.5 | 71 | 0.732558 |
58d1d0645c47784ef7a5bae3e9edd0c417ff438f | 37,490 | py | Python | topology_sdk/model/tool/tool_task_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | topology_sdk/model/tool/tool_task_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | topology_sdk/model/tool/tool_task_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: tool_task.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf i... | 46.341162 | 3,482 | 0.747773 |
199b2789582dde754f5b10b751fd9bf9bd1e5ad9 | 1,197 | py | Python | cmdix/test/test_ls.py | jaraco/pycoreutils | 1df462b7b8ff59325cd6183fd3f54197230db632 | [
"MIT"
] | 18 | 2019-02-19T14:12:00.000Z | 2021-08-19T19:34:46.000Z | cmdix/test/test_ls.py | jaraco/pycoreutils | 1df462b7b8ff59325cd6183fd3f54197230db632 | [
"MIT"
] | 8 | 2019-02-11T01:44:54.000Z | 2022-03-28T06:28:48.000Z | cmdix/test/test_ls.py | jaraco/pycoreutils | 1df462b7b8ff59325cd6183fd3f54197230db632 | [
"MIT"
] | 1 | 2021-05-27T18:50:53.000Z | 2021-05-27T18:50:53.000Z | import os
import stat
import time
import textwrap
import pytest
from . import BaseTestCase
class TestCase(BaseTestCase):
def test_ls(self):
self.setup_filesystem()
out = self.runcommandline('ls')[0]
assert out == 'dir1\ndir2\nfile1\nfile2.txt\nfile3.empty\n'
@pytest.mark.xfail("platf... | 29.195122 | 82 | 0.532164 |
dc7c9c9d4558112a71e608c119283b0ee452a22f | 4,308 | py | Python | examples/python/alphametic.py | gtara/or-tools | 39d63b8d23b78bdace53f620f33265959a018e7a | [
"Apache-2.0"
] | 1 | 2015-12-31T07:22:36.000Z | 2015-12-31T07:22:36.000Z | examples/python/alphametic.py | AlperSaltabas/OR_Tools_Google_API | 7ee31efec888adb3692e613e8c3f85ad06140af8 | [
"Apache-2.0"
] | null | null | null | examples/python/alphametic.py | AlperSaltabas/OR_Tools_Google_API | 7ee31efec888adb3692e613e8c3f85ad06140af8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.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 applicable ... | 25.341176 | 90 | 0.63533 |
546901f85f122bc60265961540d45f0aade690f3 | 3,107 | py | Python | conans/test/functional/generators/virtualbuildenv_test.py | Mark-Hatch-Bose/conan | 1106a34f2c61ca487e407bf73cd2a8f280462f3c | [
"MIT"
] | 2 | 2020-02-12T09:56:25.000Z | 2022-03-03T06:41:35.000Z | conans/test/functional/generators/virtualbuildenv_test.py | Mark-Hatch-Bose/conan | 1106a34f2c61ca487e407bf73cd2a8f280462f3c | [
"MIT"
] | 6 | 2016-03-08T22:06:45.000Z | 2020-06-02T15:22:19.000Z | conans/test/functional/generators/virtualbuildenv_test.py | Mark-Hatch-Bose/conan | 1106a34f2c61ca487e407bf73cd2a8f280462f3c | [
"MIT"
] | 2 | 2019-08-07T18:15:16.000Z | 2021-08-04T12:33:05.000Z | import os
import platform
import unittest
from conans import load
from conans.client.tools.oss import check_output
from conans.test.utils.tools import TestClient
class VirtualBuildEnvTest(unittest.TestCase):
@unittest.skipUnless(platform.system() == "Windows", "needs Windows")
def test_delimiter_error(self)... | 40.350649 | 97 | 0.645317 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.