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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ea292e48500abfc6f700c14e3047f6a09f9842d6 | 1,458 | py | Python | wagtail/admin/api/actions/revert_to_page_revision.py | NKoech123/wagtail | c54f7852d04316279fe9d4a3ab2b3a751e5df18f | [
"BSD-3-Clause"
] | null | null | null | wagtail/admin/api/actions/revert_to_page_revision.py | NKoech123/wagtail | c54f7852d04316279fe9d4a3ab2b3a751e5df18f | [
"BSD-3-Clause"
] | null | null | null | wagtail/admin/api/actions/revert_to_page_revision.py | NKoech123/wagtail | c54f7852d04316279fe9d4a3ab2b3a751e5df18f | [
"BSD-3-Clause"
] | null | null | null | from django.core.exceptions import ValidationError as DjangoValidationError
from django.shortcuts import get_object_or_404
from rest_framework import fields, status
from rest_framework.exceptions import ValidationError
from rest_framework.response import Response
from rest_framework.serializers import Serializer
from ... | 35.560976 | 80 | 0.768861 |
624d29904d238cfc58c8d5f277736446660bcfd2 | 1,356 | py | Python | setup.py | AppliedAcousticsChalmers/sound_field_analysis-py | 5625a62def11922fc95b79185d78cfce1c6f3348 | [
"MIT"
] | 51 | 2018-09-18T01:53:27.000Z | 2022-02-28T04:55:29.000Z | setup.py | AppliedAcousticsChalmers/sound_field_analysis-py | 5625a62def11922fc95b79185d78cfce1c6f3348 | [
"MIT"
] | 10 | 2018-11-01T00:15:54.000Z | 2022-01-12T20:26:28.000Z | setup.py | AppliedAcousticsChalmers/sound_field_analysis-py | 5625a62def11922fc95b79185d78cfce1c6f3348 | [
"MIT"
] | 13 | 2019-04-27T16:19:47.000Z | 2021-12-18T16:33:40.000Z | from setuptools import find_packages, setup
setup(
name="sound_field_analysis",
url="https://github.com/AppliedAcousticsChalmers/sound_field_analysis-py/",
version=open("sound_field_analysis/_version.py", mode="r", encoding="utf-8")
.readlines()[-1]
.split()[-1]
.strip("\"'"),
license="MIT"... | 32.285714 | 80 | 0.618732 |
7743d6b249af5fad41fb9bce5b7435b08797320b | 3,555 | py | Python | heat/api/openstack/v1/util.py | NeCTAR-RC/heat | b152817f192a7b46514793633ddc968c1fe1ebf8 | [
"Apache-2.0"
] | 1 | 2015-02-26T03:23:23.000Z | 2015-02-26T03:23:23.000Z | heat/api/openstack/v1/util.py | NeCTAR-RC/heat | b152817f192a7b46514793633ddc968c1fe1ebf8 | [
"Apache-2.0"
] | null | null | null | heat/api/openstack/v1/util.py | NeCTAR-RC/heat | b152817f192a7b46514793633ddc968c1fe1ebf8 | [
"Apache-2.0"
] | null | null | null |
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | 34.514563 | 78 | 0.644163 |
0323f412523f6b353c2ac94c4203eefdf48a1e01 | 1,018 | py | Python | setup.py | etataurov/nameko-redis | 2114df9cd73b1e48511994a2c5da537fbb412406 | [
"Apache-2.0"
] | 32 | 2016-01-25T00:25:56.000Z | 2022-02-14T14:18:36.000Z | setup.py | daxia009/nameko-redis | 2114df9cd73b1e48511994a2c5da537fbb412406 | [
"Apache-2.0"
] | 7 | 2015-12-11T11:30:36.000Z | 2019-03-11T11:29:01.000Z | setup.py | daxia009/nameko-redis | 2114df9cd73b1e48511994a2c5da537fbb412406 | [
"Apache-2.0"
] | 8 | 2015-07-26T08:03:20.000Z | 2019-09-20T10:15:42.000Z | from setuptools import setup
setup(
name='nameko-redis',
version='1.1.0',
url='https://github.com/etataurov/nameko-redis/',
license='Apache License, Version 2.0',
author='etataurov',
author_email='tatauroff@gmail.com',
py_modules=['nameko_redis'],
install_requires=[
"nameko>=2.0... | 29.085714 | 61 | 0.563851 |
0a61b45ea2049973bd9d1ca4b95ef4ec439d48d2 | 927 | py | Python | venv/src/pages/lib.py | ddelgadoJS/ProyectoWeb | f899c910bf16a79d5c3498bc6e8aa6b741fb56e1 | [
"MIT"
] | 1 | 2019-10-28T03:44:38.000Z | 2019-10-28T03:44:38.000Z | venv/src/pages/lib.py | ddelgadoJS/ProyectoWeb | f899c910bf16a79d5c3498bc6e8aa6b741fb56e1 | [
"MIT"
] | null | null | null | venv/src/pages/lib.py | ddelgadoJS/ProyectoWeb | f899c910bf16a79d5c3498bc6e8aa6b741fb56e1 | [
"MIT"
] | null | null | null | from .models import Log, Empresa, Ruta, Parada
def crear_log(usuario, accion, empresa=None, ruta=None, parada=None):
"""
Crea un entry en la bitacora
empresa, ruta, y parada son opcionales,
si parada tiene un objeto se determina que es parada,
si no entonces si ruta tiene un objeto es una ruta
... | 26.485714 | 72 | 0.62891 |
4e83eb454875ec9bfba555a8de4cab949edd8984 | 986 | py | Python | adjango/urls.py | doucm/cmpython | d49a2138b9feea2fcf4768a7768c283cb066b3c5 | [
"Apache-2.0"
] | null | null | null | adjango/urls.py | doucm/cmpython | d49a2138b9feea2fcf4768a7768c283cb066b3c5 | [
"Apache-2.0"
] | null | null | null | adjango/urls.py | doucm/cmpython | d49a2138b9feea2fcf4768a7768c283cb066b3c5 | [
"Apache-2.0"
] | null | null | null | """adjango URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | 34 | 79 | 0.731237 |
ea95c02bdd3cb7ff948a409d1fde6554a0a2ba5b | 1,826 | py | Python | analysis/src/python/data_collection/stepik/api/steps.py | eartser/hyperstyle-analyze | 58e2d361662e73e1e047919f57ab840055783b7a | [
"Apache-2.0"
] | 1 | 2022-03-15T09:46:06.000Z | 2022-03-15T09:46:06.000Z | analysis/src/python/data_collection/stepik/api/steps.py | eartser/hyperstyle-analyze | 58e2d361662e73e1e047919f57ab840055783b7a | [
"Apache-2.0"
] | 1 | 2022-02-14T13:53:38.000Z | 2022-02-14T13:53:38.000Z | analysis/src/python/data_collection/stepik/api/steps.py | eartser/hyperstyle-analyze | 58e2d361662e73e1e047919f57ab840055783b7a | [
"Apache-2.0"
] | 3 | 2022-02-13T16:49:53.000Z | 2022-02-17T13:53:07.000Z | import datetime
from dataclasses import dataclass, field
from typing import List, Optional
from analysis.src.python.data_collection.api.platform_objects import BaseRequestParams, Object, ObjectResponse
from analysis.src.python.data_collection.stepik.stepik_objects import StepikPlatform
"""
This file contains classes,... | 25.361111 | 110 | 0.732749 |
66c89c7edd82eea879b4beeacb8ef10013c8dc87 | 5,332 | py | Python | python/slack_types/web_api/groups_history_response.py | warrenseine/slack-types | 19e280aa43186ab4b9126ac6891f43cac22d3aaf | [
"MIT"
] | null | null | null | python/slack_types/web_api/groups_history_response.py | warrenseine/slack-types | 19e280aa43186ab4b9126ac6891f43cac22d3aaf | [
"MIT"
] | null | null | null | python/slack_types/web_api/groups_history_response.py | warrenseine/slack-types | 19e280aa43186ab4b9126ac6891f43cac22d3aaf | [
"MIT"
] | null | null | null | # To use this code, make sure you
#
# import json
#
# and then, to convert JSON from a string, do
#
# result = groups_history_response_from_dict(json.loads(json_string))
from dataclasses import dataclass
from typing import Optional, Any, List, TypeVar, Callable, Type, cast
T = TypeVar("T")
def from_str(x: ... | 36.027027 | 136 | 0.665041 |
3294e6c79949ad0dd1126dfbbcc3105eaa5ed3d4 | 5,147 | py | Python | onlinecourse/migrations/0001_initial.py | SophMarch/final-cloud-app-with-database | ac98b40845087e29257b73e8ff40361c5fe4321a | [
"Apache-2.0"
] | null | null | null | onlinecourse/migrations/0001_initial.py | SophMarch/final-cloud-app-with-database | ac98b40845087e29257b73e8ff40361c5fe4321a | [
"Apache-2.0"
] | null | null | null | onlinecourse/migrations/0001_initial.py | SophMarch/final-cloud-app-with-database | ac98b40845087e29257b73e8ff40361c5fe4321a | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.3 on 2021-08-18 08:53
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUT... | 47.220183 | 210 | 0.58539 |
f79309021e7b44417946e28fb7db7b40cc2606e3 | 1,297 | py | Python | research/cv/dcgan/src/config.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | research/cv/dcgan/src/config.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | research/cv/dcgan/src/config.py | leelige/mindspore | 5199e05ba3888963473f2b07da3f7bca5b9ef6dc | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2021 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.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 28.195652 | 78 | 0.643793 |
97c3f977ff5e2e9aa532db30a321522266f6ffec | 104 | py | Python | django/models/database_models/apps.py | djangojeng-e/TIL | bdbe1dfb6ebc48b89067fddda195227cca64b8dc | [
"MIT"
] | null | null | null | django/models/database_models/apps.py | djangojeng-e/TIL | bdbe1dfb6ebc48b89067fddda195227cca64b8dc | [
"MIT"
] | null | null | null | django/models/database_models/apps.py | djangojeng-e/TIL | bdbe1dfb6ebc48b89067fddda195227cca64b8dc | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class DatabaseModelsConfig(AppConfig):
name = 'database_models'
| 17.333333 | 38 | 0.788462 |
e800bc7a5995c79f23d19e5698e74df88e030602 | 8,641 | py | Python | pulser-core/pulser/pulse.py | lvignoli/Pulser | 263149799d722023b2f7ab1fe653fbdebb2fe894 | [
"Apache-2.0"
] | null | null | null | pulser-core/pulser/pulse.py | lvignoli/Pulser | 263149799d722023b2f7ab1fe653fbdebb2fe894 | [
"Apache-2.0"
] | null | null | null | pulser-core/pulser/pulse.py | lvignoli/Pulser | 263149799d722023b2f7ab1fe653fbdebb2fe894 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Pulser Development 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.404444 | 79 | 0.64275 |
e6083ebf639ec1764e0f5a24763b6e1532546192 | 7,062 | py | Python | rotate_backups_s3/cli.py | tarzan0820/python-rotate-backups-s3 | d491b4e9f6ae3707daf765cbd905cc92e3152eee | [
"MIT"
] | 6 | 2016-07-30T09:32:47.000Z | 2019-02-24T21:44:48.000Z | rotate_backups_s3/cli.py | saltonmassally/python-rotate-backups-s3 | d491b4e9f6ae3707daf765cbd905cc92e3152eee | [
"MIT"
] | 3 | 2020-04-13T17:24:15.000Z | 2021-04-24T14:40:07.000Z | rotate_backups_s3/cli.py | saltonmassally/python-rotate-backups-s3 | d491b4e9f6ae3707daf765cbd905cc92e3152eee | [
"MIT"
] | 7 | 2019-04-02T15:40:50.000Z | 2022-03-21T16:33:50.000Z | # rotate-backups: Simple command line interface for backup rotation.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: March 20, 2016
# URL: https://github.com/xolox/python-rotate-backups
"""
Usage: rotate-backups-s3 [OPTIONS] DIRECTORY..
Easy rotation of backups in an AWS S3 bucket based. To use
this p... | 36.78125 | 86 | 0.660861 |
e37552ebf6734caaf4f98b3d944cd8e2ce98c5e5 | 670 | py | Python | Test29_tf/apis/square_difference.py | hooloong/My_TensorFlow | ef115989035b9ae14938dca47c0814b0d16dd6ba | [
"MIT"
] | 3 | 2018-07-29T17:31:58.000Z | 2019-06-27T10:36:34.000Z | Test29_tf/apis/square_difference.py | hooloong/My_TensorFlow | ef115989035b9ae14938dca47c0814b0d16dd6ba | [
"MIT"
] | null | null | null | Test29_tf/apis/square_difference.py | hooloong/My_TensorFlow | ef115989035b9ae14938dca47c0814b0d16dd6ba | [
"MIT"
] | 1 | 2019-02-18T02:27:39.000Z | 2019-02-18T02:27:39.000Z | '''
tf.squared_difference
squared_difference(
x,
y,
name=None
)
功能说明:
计算张量 x、y 对应元素差平方
参数列表:
参数名 必选 类型 说明
x 是 张量 是 half, float32, float64, int32, int64, complex64, complex128 其中一种类型
y 是 张量 是 half, float32, float64, int32, int64, complex64, complex128 其中一种类型
name 否 string 运算名称
'''
#!/usr/bin/py... | 21.612903 | 78 | 0.689552 |
a51e46e2d2af123a208f698da6e2a837c595c7d7 | 5,184 | py | Python | tests/test_json_functions.py | cristianomariacumer/eppy | 4ed38c2b40121a6bdf3c9f5dc33d1f1243cfc4be | [
"MIT"
] | 116 | 2015-04-07T13:58:34.000Z | 2022-02-23T15:52:35.000Z | tests/test_json_functions.py | cristianomariacumer/eppy | 4ed38c2b40121a6bdf3c9f5dc33d1f1243cfc4be | [
"MIT"
] | 324 | 2015-01-01T04:10:46.000Z | 2022-03-16T16:28:13.000Z | tests/test_json_functions.py | cristianomariacumer/eppy | 4ed38c2b40121a6bdf3c9f5dc33d1f1243cfc4be | [
"MIT"
] | 65 | 2015-07-14T21:57:02.000Z | 2022-02-14T08:39:02.000Z | # Copyright (c) 2016 Santosh Philip
# =======================================================================
# Distributed under the MIT License.
# (See accompanying file LICENSE or copy at
# http://opensource.org/licenses/MIT)
# =======================================================================
"""py.test for... | 36 | 85 | 0.496914 |
34890b4ccfe32a46d6564736a6c9586d4a701451 | 167 | py | Python | travis-ci/black_test-master/test.py | manishnagdewani96170/devops_work | 9362702f7d275be53f28c66472a26f4a04ef9a25 | [
"MIT"
] | null | null | null | travis-ci/black_test-master/test.py | manishnagdewani96170/devops_work | 9362702f7d275be53f28c66472a26f4a04ef9a25 | [
"MIT"
] | 3 | 2018-11-17T13:39:49.000Z | 2018-11-17T14:53:23.000Z | travis-ci/black_test-master/test.py | manishnagdewani96170/devops_work | 9362702f7d275be53f28c66472a26f4a04ef9a25 | [
"MIT"
] | null | null | null | numbers = [6, 5, 3, 8, 4, 2, 5, 4, 11]
# variable to store the sum
sum = 0
# iterate over the list
for val in numbers:
sum = sum + val
print("The sum is", sum)
| 15.181818 | 38 | 0.598802 |
c0f7c0d49cd2bc08d0b1e53d7fc5bf2a7a508340 | 7,540 | py | Python | from_3b1b/on_hold/eop/chapter1/area_model_bayes.py | tigerking/manim2 | 93e8957e433b8e59acb5a5213a4074ee0125b823 | [
"MIT"
] | null | null | null | from_3b1b/on_hold/eop/chapter1/area_model_bayes.py | tigerking/manim2 | 93e8957e433b8e59acb5a5213a4074ee0125b823 | [
"MIT"
] | null | null | null | from_3b1b/on_hold/eop/chapter1/area_model_bayes.py | tigerking/manim2 | 93e8957e433b8e59acb5a5213a4074ee0125b823 | [
"MIT"
] | null | null | null | from manim2.imports import *
class IllustrateAreaModelBayes(Scene):
def construct(self):
color_A = YELLOW
color_not_A = YELLOW_E
color_B = MAROON
color_not_B = MAROON_E
opacity_B = 0.7
# show independent events
sample_space_width = sample_space_h... | 32.925764 | 96 | 0.588727 |
5c81a4ba34d37b5017bbf32a1bccc42d6dda4c88 | 905 | py | Python | util/tests/NMSTest.py | BlancNicolas/face_detection_SY32 | a9181cda068e0cd36db74a8c50cf031b41141cbb | [
"MIT"
] | null | null | null | util/tests/NMSTest.py | BlancNicolas/face_detection_SY32 | a9181cda068e0cd36db74a8c50cf031b41141cbb | [
"MIT"
] | null | null | null | util/tests/NMSTest.py | BlancNicolas/face_detection_SY32 | a9181cda068e0cd36db74a8c50cf031b41141cbb | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
from util.NMS import *
import numpy as np
# Test with only one detected face and two overlapping boxes.
def test_with_1_detected_face():
box1 = np.array([13, 12, 17, 16])
box2 = np.array([13, 14, 17, 18])
box3 = np.array([14, 15, 18, 19])
boxes = np.vstack((box1, box2, ... | 31.206897 | 104 | 0.659669 |
98970159badd590e4c035b4b50f96d0bd238e444 | 385 | py | Python | ctfbox/tests/web_test.py | AFKL-CUIT/ctfbox | c0d8dcb9cb1c50490e495e8c0cf65dd21b57909b | [
"MIT"
] | 1 | 2021-04-19T03:08:08.000Z | 2021-04-19T03:08:08.000Z | ctfbox/tests/web_test.py | AFKL-CUIT/ctfbox | c0d8dcb9cb1c50490e495e8c0cf65dd21b57909b | [
"MIT"
] | null | null | null | ctfbox/tests/web_test.py | AFKL-CUIT/ctfbox | c0d8dcb9cb1c50490e495e8c0cf65dd21b57909b | [
"MIT"
] | null | null | null | import unittest
from ctfbox.web import *
class TestWeb(unittest.TestCase):
def test_get_flask_pin(self):
self.assertEqual(get_flask_pin("kingkk", "/home/kingkk/.local/lib/python3.5/site-packages/flask/app.py",
"00:0c:29:e5:45:6a", "19949f18ce36422da1402b3e3fe53008"),... | 29.615385 | 112 | 0.651948 |
70d8c169a8f80ea8afe9cf5aac83e230562cd78c | 2,683 | py | Python | Wharf/bmv2/pcap_tools/pcap_mcd_compare.py | CSEYJ/Flightplan | e1424f42c8f06446094941c38ef5989a76b7ee0a | [
"Apache-2.0"
] | 20 | 2020-10-06T08:37:22.000Z | 2022-03-28T07:32:23.000Z | Wharf/bmv2/pcap_tools/pcap_mcd_compare.py | CSEYJ/Flightplan | e1424f42c8f06446094941c38ef5989a76b7ee0a | [
"Apache-2.0"
] | 1 | 2021-01-24T15:51:40.000Z | 2021-01-24T15:51:40.000Z | Wharf/bmv2/pcap_tools/pcap_mcd_compare.py | CSEYJ/Flightplan | e1424f42c8f06446094941c38ef5989a76b7ee0a | [
"Apache-2.0"
] | 3 | 2021-01-06T03:43:50.000Z | 2021-10-15T20:09:32.000Z | import sys
from scapy.all import *
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('expected', type=str)
parser.add_argument('output', type=str)
parser.add_argument('--show', action='store', required=False, default=None)
args = parser.parse_args()
exp_cap = rdpcap(args.expected)
out_cap = [ x... | 23.743363 | 84 | 0.569512 |
c7ee54f963de12a2f7943004a2f89f41087a2962 | 65 | py | Python | homeworks/alexei_rakhmanko/lesson17/level01.py | tgrx/Z22 | b2539682ff26c8b6d9f63a7670c8a9c6b614a8ff | [
"Apache-2.0"
] | null | null | null | homeworks/alexei_rakhmanko/lesson17/level01.py | tgrx/Z22 | b2539682ff26c8b6d9f63a7670c8a9c6b614a8ff | [
"Apache-2.0"
] | 8 | 2019-11-15T18:15:56.000Z | 2020-02-03T18:05:05.000Z | homeworks/alexei_rakhmanko/lesson17/level01.py | tgrx/Z22 | b2539682ff26c8b6d9f63a7670c8a9c6b614a8ff | [
"Apache-2.0"
] | null | null | null | """Уровень 1"""
def key(arg):
"""функция"""
return arg
| 9.285714 | 17 | 0.507692 |
de4ff0100274593b000b1982759c3bdf6e6de9d7 | 5,146 | py | Python | test/functional/mempool_persist.py | lsji07/Ravencoin | e22523dea0e051f2f11e67284957629f44a1343d | [
"MIT"
] | 1,102 | 2017-10-28T14:49:48.000Z | 2022-03-30T00:57:26.000Z | test/functional/mempool_persist.py | lsji07/Ravencoin | e22523dea0e051f2f11e67284957629f44a1343d | [
"MIT"
] | 733 | 2018-01-03T16:46:49.000Z | 2022-03-27T04:55:44.000Z | test/functional/mempool_persist.py | lsji07/Ravencoin | e22523dea0e051f2f11e67284957629f44a1343d | [
"MIT"
] | 795 | 2018-01-03T23:03:01.000Z | 2022-03-25T15:08:45.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Copyright (c) 2017-2020 The Raven Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Test mempool persistence.
By default, ravend wil... | 45.539823 | 127 | 0.69899 |
bd092b51807b00160bb543941e01d680a6506e8d | 2,214 | py | Python | magma/passes/tsort.py | leonardt/magma | d3e8c9500ec3b167df8ed067e0c0305781c94ab6 | [
"MIT"
] | 167 | 2017-10-08T00:59:22.000Z | 2022-02-08T00:14:39.000Z | magma/passes/tsort.py | leonardt/magma | d3e8c9500ec3b167df8ed067e0c0305781c94ab6 | [
"MIT"
] | 719 | 2017-08-29T17:58:28.000Z | 2022-03-31T23:39:18.000Z | magma/passes/tsort.py | leonardt/magma | d3e8c9500ec3b167df8ed067e0c0305781c94ab6 | [
"MIT"
] | 14 | 2017-09-01T03:25:16.000Z | 2021-11-05T13:30:24.000Z | def tsort(graph):
"""
Repeatedly go through all of the nodes in the graph, moving each of
the nodes that has all its edges resolved, onto a sequence that
forms our sorted graph. A node has all of its edges resolved and
can be moved once all the nodes its edges point to, have been moved
from the ... | 42.576923 | 71 | 0.64047 |
0bfd43ce26d810d3f06f6fee78b7073f14d4e35e | 546 | py | Python | actstream/migrations/0005_auto_20190114_1558.py | AbartysHealth/django-activity-stream | d485189a275d17f0d80ffe1214b933144f52bb95 | [
"BSD-3-Clause"
] | null | null | null | actstream/migrations/0005_auto_20190114_1558.py | AbartysHealth/django-activity-stream | d485189a275d17f0d80ffe1214b933144f52bb95 | [
"BSD-3-Clause"
] | null | null | null | actstream/migrations/0005_auto_20190114_1558.py | AbartysHealth/django-activity-stream | d485189a275d17f0d80ffe1214b933144f52bb95 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.1.4 on 2019-01-14 19:58
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('actstream', '0004_auto_20181129_1434'),
]
operations = [
migrations.AlterField(
model_name='act... | 27.3 | 166 | 0.668498 |
415bf83faa0d28542b6da1767481f608d7c32d57 | 1,432 | py | Python | Leetcode/Python Solutions/Graphs/evaluateDivision.py | Mostofa-Najmus-Sakib/Applied-Algorithm | bc656fd655617407856e0ce45b68585fa81c5035 | [
"MIT"
] | 1 | 2020-01-06T02:21:56.000Z | 2020-01-06T02:21:56.000Z | Leetcode/Python Solutions/Graphs/evaluateDivision.py | Mostofa-Najmus-Sakib/Applied-Algorithm | bc656fd655617407856e0ce45b68585fa81c5035 | [
"MIT"
] | null | null | null | Leetcode/Python Solutions/Graphs/evaluateDivision.py | Mostofa-Najmus-Sakib/Applied-Algorithm | bc656fd655617407856e0ce45b68585fa81c5035 | [
"MIT"
] | 3 | 2021-02-22T17:41:01.000Z | 2022-01-13T05:03:19.000Z | """
LeetCode Problem 399. Evaluate Division
Link: https://leetcode.com/problems/evaluate-division/
Written by: Mostofa Adib Shakib
Language: Python
Time complexity: O(m*n)
Space complexity: O(n)
"""
class Solution:
def calcEquation(self, equations: List[List[str]], values: List[float], queries: List[List[str]]) -... | 31.822222 | 117 | 0.488827 |
389e6f5dd2bcb305e679b42fd926b5ef28f1c520 | 1,571 | py | Python | mogui/model/migrations/0001_initial.py | npmmirror/mogui | d239f35bbb5776dfbe29c7ec5410e8c6d0f76cc3 | [
"ECL-2.0",
"Apache-2.0"
] | 106 | 2017-08-23T05:03:48.000Z | 2022-02-10T03:52:55.000Z | mogui/model/migrations/0001_initial.py | npmmirror/mogui | d239f35bbb5776dfbe29c7ec5410e8c6d0f76cc3 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-04-02T03:35:50.000Z | 2020-04-02T09:31:41.000Z | mogui/model/migrations/0001_initial.py | npmmirror/mogui | d239f35bbb5776dfbe29c7ec5410e8c6d0f76cc3 | [
"ECL-2.0",
"Apache-2.0"
] | 42 | 2017-08-25T05:25:26.000Z | 2022-03-26T07:53:35.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-08-02 14:39
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Config... | 42.459459 | 125 | 0.619351 |
0a78df63c7ae42e32cc536fe5dcd4ad9c2901589 | 276 | py | Python | Python3_Mundo1_Aula9/Desafio023.py | AgladeJesus/python | 16e4e5cc43aa987858a4719748708d6d5327d75d | [
"MIT"
] | null | null | null | Python3_Mundo1_Aula9/Desafio023.py | AgladeJesus/python | 16e4e5cc43aa987858a4719748708d6d5327d75d | [
"MIT"
] | null | null | null | Python3_Mundo1_Aula9/Desafio023.py | AgladeJesus/python | 16e4e5cc43aa987858a4719748708d6d5327d75d | [
"MIT"
] | null | null | null | nm = int(input('Digite um número: '))
u = nm // 1 % 10
d = nm // 10 % 10
c = nm // 100 % 10
m = nm // 1000 % 10
print('Analisando o número {}'.format(nm))
print('Unidade: {}'.format(u))
print('Dezena: {}'.format(d))
print('Centena: {}'.format(c))
print('Milhar: {}'.format(m)) | 27.6 | 42 | 0.572464 |
78150967eee7d0a28d11abd25c9cefa87323d8b8 | 2,642 | py | Python | insights/parsers/readlink_openshift_certs.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | 121 | 2017-05-30T20:23:25.000Z | 2022-03-23T12:52:15.000Z | insights/parsers/readlink_openshift_certs.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | 1,977 | 2017-05-26T14:36:03.000Z | 2022-03-31T10:38:53.000Z | insights/parsers/readlink_openshift_certs.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | 244 | 2017-05-30T20:22:57.000Z | 2022-03-26T10:09:39.000Z | """
ReadLink parsers for Openshift certificate symbolic file links
==============================================================
This module contains the following parsers:
ReadLinkEKubeletClientCurrent - command ``/usr/bin/readlink -e /etc/origin/node/certificates/kubelet-client-current.pem``
----------------------... | 36.694444 | 134 | 0.627933 |
fbe8f013c589d3a0c54ba7b2a4cd63621f9f5b7d | 77,541 | py | Python | python/ray/_private/services.py | valiantljk-tt/ray | a4d1e322cbe787c433fb6d955a6621b3e082ad24 | [
"Apache-2.0"
] | 1 | 2021-04-25T17:16:29.000Z | 2021-04-25T17:16:29.000Z | python/ray/_private/services.py | tjcommV2X/ray | 3965310f939cfbb0d700174529ee5bc7d4871de8 | [
"Apache-2.0"
] | null | null | null | python/ray/_private/services.py | tjcommV2X/ray | 3965310f939cfbb0d700174529ee5bc7d4871de8 | [
"Apache-2.0"
] | null | null | null | import base64
import collections
import errno
import io
import json
import logging
import multiprocessing
import os
import mmap
import random
import shutil
import signal
import socket
import subprocess
import sys
import time
import colorama
import psutil
# Ray modules
import ray
import ray.ray_constants as ray_constan... | 41.070445 | 92 | 0.626236 |
73d8fcdb18545ec0c0074a4bc2fa11a85c716408 | 5,294 | py | Python | Lib/test/test_asyncio/test_windows_events.py | Ricky-Wilson/Python | 9896d7a9901dabea4b3d555af471577a624d1b95 | [
"PSF-2.0"
] | 315 | 2019-03-07T02:10:17.000Z | 2022-03-31T09:00:20.000Z | Lib/test/test_asyncio/test_windows_events.py | Ricky-Wilson/Python | 9896d7a9901dabea4b3d555af471577a624d1b95 | [
"PSF-2.0"
] | 1 | 2020-03-07T12:05:47.000Z | 2021-05-28T07:34:31.000Z | Lib/test/test_asyncio/test_windows_events.py | Ricky-Wilson/Python | 9896d7a9901dabea4b3d555af471577a624d1b95 | [
"PSF-2.0"
] | 96 | 2019-03-08T06:56:36.000Z | 2022-03-21T04:07:15.000Z | import os
import sys
import unittest
from unittest import mock
if sys.platform != 'win32':
raise unittest.SkipTest('Windows only')
import _winapi
import asyncio
from asyncio import _overlapped
from asyncio import test_utils
from asyncio import windows_events
class UpperProto(asyncio.Protocol):
def __init__... | 33.0875 | 87 | 0.62807 |
7a2530070e469ebfef06e5b5339eff54480abfd5 | 17,898 | py | Python | ax/core/parameter.py | bletham/Ax | e802ff1a285c9a0091aeaf5663640b219bdc0d3f | [
"MIT"
] | 1 | 2022-01-04T12:20:51.000Z | 2022-01-04T12:20:51.000Z | ax/core/parameter.py | bletham/Ax | e802ff1a285c9a0091aeaf5663640b219bdc0d3f | [
"MIT"
] | null | null | null | ax/core/parameter.py | bletham/Ax | e802ff1a285c9a0091aeaf5663640b219bdc0d3f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import annotations
from abc import ABCMeta, abstractmethod, abstractproperty
from enum import Enum
fro... | 32.541818 | 88 | 0.610627 |
316d43f95bccaaa8d900fc4485ad4533c4504847 | 3,354 | py | Python | game_seq_embedder/game_seq_embedder/transformers/tokenization_lxmert.py | fuxiAIlab/PMTC | bea55d821bc8adf64044194a0b72d8ce913a6213 | [
"Artistic-1.0-Perl"
] | 3 | 2020-09-18T05:19:01.000Z | 2021-01-28T15:47:06.000Z | game_seq_embedder/game_seq_embedder/transformers/tokenization_lxmert.py | fuxiAIlab/PMTC | bea55d821bc8adf64044194a0b72d8ce913a6213 | [
"Artistic-1.0-Perl"
] | null | null | null | game_seq_embedder/game_seq_embedder/transformers/tokenization_lxmert.py | fuxiAIlab/PMTC | bea55d821bc8adf64044194a0b72d8ce913a6213 | [
"Artistic-1.0-Perl"
] | 2 | 2020-07-16T16:20:59.000Z | 2021-08-08T20:22:47.000Z | # coding=utf-8
# Copyright 2020 The Google AI Team, Stanford University and The HuggingFace Inc. 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/L... | 41.407407 | 123 | 0.680083 |
6ce75a0b9c0234ee820e7408b1d3cf4b3e239bcc | 325 | py | Python | knn_robustness/knn/__init__.py | wangwllu/knn_robustness | 9a02f92bf00febf900b2817c1b7230284816b21b | [
"MIT"
] | 5 | 2019-09-22T05:09:58.000Z | 2020-11-25T04:46:33.000Z | wang_et_al/knn_robustness/knn/__init__.py | wagner-group/geoadex | 693856dc4537937fa09ec7a22e175f8243483b44 | [
"MIT"
] | null | null | null | wang_et_al/knn_robustness/knn/__init__.py | wagner-group/geoadex | 693856dc4537937fa09ec7a22e175f8243483b44 | [
"MIT"
] | null | null | null | from .attacks import Attack
from .attacks import MeanAttack
from .attacks import NaiveAttack
from .attacks import GreedyAttack
from .subsolvers import SubsolverFactory
from .verifiers import RelaxVerifier
__all__ = [
'Attack',
'MeanAttack', 'NaiveAttack', 'GreedyAttack',
'SubsolverFactory', 'RelaxVerifie... | 21.666667 | 48 | 0.769231 |
d7716bf9f3d6f653d32d2a214cbaa7d98f70e92a | 18,249 | py | Python | tests/test_network.py | djordon/queueing-tool | 00fc1b88257faeb2a31be75040b6649603460bab | [
"MIT"
] | 49 | 2015-04-30T00:42:45.000Z | 2022-03-21T14:49:46.000Z | tests/test_network.py | djordon/queueing-tool | 00fc1b88257faeb2a31be75040b6649603460bab | [
"MIT"
] | 48 | 2015-02-16T01:24:04.000Z | 2021-02-11T04:31:15.000Z | tests/test_network.py | djordon/queueing-tool | 00fc1b88257faeb2a31be75040b6649603460bab | [
"MIT"
] | 11 | 2017-11-23T08:53:12.000Z | 2022-03-21T18:22:09.000Z | import os
import unittest
try:
import unittest.mock as mock
except ImportError:
import mock
try:
import matplotlib.pyplot as plt
HAS_MATPLOTLIB = True
except ImportError:
HAS_MATPLOTLIB = False
import networkx as nx
import numpy as np
import queueing_tool as qt
TRAVIS_TEST = os.environ.get('TRA... | 31.792683 | 91 | 0.567154 |
8267780ff11a1c64b5c45ecef7dca8829a3ea676 | 58,374 | py | Python | mtp_api/apps/security/tests/test_views/test_check_views.py | ministryofjustice/mtp-api | b1c34c29e4aa9f48598cb060abe1368ae7686e0b | [
"MIT"
] | 5 | 2016-01-05T12:21:35.000Z | 2020-10-28T17:06:02.000Z | mtp_api/apps/security/tests/test_views/test_check_views.py | ministryofjustice/mtp-api | b1c34c29e4aa9f48598cb060abe1368ae7686e0b | [
"MIT"
] | 209 | 2015-06-12T09:39:41.000Z | 2022-03-21T16:01:19.000Z | mtp_api/apps/security/tests/test_views/test_check_views.py | ministryofjustice/mtp-api | b1c34c29e4aa9f48598cb060abe1368ae7686e0b | [
"MIT"
] | 1 | 2021-04-11T06:19:23.000Z | 2021-04-11T06:19:23.000Z | import datetime
from unittest import mock
from pprint import pformat
import dictdiffer
from django.urls import reverse
from django.utils.timezone import make_aware, now
from model_mommy import mommy
from parameterized import parameterized
from rest_framework import status as http_status
from rest_framework.test import... | 37.180892 | 115 | 0.588258 |
9e404f3f9cd07da9b467aeffe60467d64325a64c | 2,896 | py | Python | oh_data_source/processing.py | OpenHumans/google-search-history | 1b6878bee0f993c8a9700a91e0c5631124c16632 | [
"MIT"
] | null | null | null | oh_data_source/processing.py | OpenHumans/google-search-history | 1b6878bee0f993c8a9700a91e0c5631124c16632 | [
"MIT"
] | null | null | null | oh_data_source/processing.py | OpenHumans/google-search-history | 1b6878bee0f993c8a9700a91e0c5631124c16632 | [
"MIT"
] | null | null | null | from collections import OrderedDict
from datetime import timedelta
import json
import zipfile
import arrow
def arrow_time(timestamp):
arrow_compat_timestamp = '{}.{}'.format(timestamp[0:-6], timestamp[-6:])
return arrow.get(arrow_compat_timestamp)
def load_search_data(takeout_zipfile):
takeoutfile = zi... | 34.891566 | 82 | 0.572514 |
5bf6d1bfc01010c895781434b06b9fb9c96d3a75 | 6,649 | py | Python | ecs_explorer/ecs_client.py | firemanphil/ecs_explorer | 302ed2f39126ada87d03f7044e6de15678d46cb9 | [
"MIT"
] | 9 | 2017-04-30T10:03:10.000Z | 2021-01-25T03:28:48.000Z | ecs_explorer/ecs_client.py | firemanphil/ecs_explorer | 302ed2f39126ada87d03f7044e6de15678d46cb9 | [
"MIT"
] | null | null | null | ecs_explorer/ecs_client.py | firemanphil/ecs_explorer | 302ed2f39126ada87d03f7044e6de15678d46cb9 | [
"MIT"
] | 1 | 2020-10-22T15:15:03.000Z | 2020-10-22T15:15:03.000Z | from collections import defaultdict
import itertools
import threading
import Queue
import boto3
class EcsClient(object):
def __init__(self, role_to_assume):
self.role_to_assume = role_to_assume
boto3.setup_default_session(profile_name='default')
if role_to_assume:
self.client =... | 40.29697 | 136 | 0.594225 |
604a5872f8b4a72c1ecb49c2b3bf08f5fe017cf1 | 77 | py | Python | python/python-adaguc-server/wsgi.py | lukas-phaf/adaguc-server | aa5e267d6c5c15463035ff87d353707207374d1b | [
"Apache-2.0"
] | 1 | 2019-08-21T11:03:09.000Z | 2019-08-21T11:03:09.000Z | python/python-adaguc-server/wsgi.py | ernstdevreede/adaguc-server | 3516bf1a2ea6abb4f2e85e72944589dfcc990f7c | [
"Apache-2.0"
] | null | null | null | python/python-adaguc-server/wsgi.py | ernstdevreede/adaguc-server | 3516bf1a2ea6abb4f2e85e72944589dfcc990f7c | [
"Apache-2.0"
] | null | null | null | from main import app
import logging
if __name__ == "__main__":
app.run() | 15.4 | 26 | 0.701299 |
8ce3e398a313407df56c4f20172036e9083f645c | 4,008 | py | Python | zarr_dataset.py | jramapuram/dataset_to_zarr | 4d75f9912c0c4516b6d0b6f717ba22494444a4a3 | [
"Apache-2.0"
] | null | null | null | zarr_dataset.py | jramapuram/dataset_to_zarr | 4d75f9912c0c4516b6d0b6f717ba22494444a4a3 | [
"Apache-2.0"
] | null | null | null | zarr_dataset.py | jramapuram/dataset_to_zarr | 4d75f9912c0c4516b6d0b6f717ba22494444a4a3 | [
"Apache-2.0"
] | null | null | null | import os
import torch
import zarr
import functools
import numpy as np
from PIL import Image
from .abstract_dataset import AbstractLoader
def load_zarr(path, segment='train'):
"""Load the required npz file and return images + labels."""
choices = [f for f in os.listdir(path) if segment in f]
assert len(... | 43.096774 | 88 | 0.60479 |
36f8ed3b104c11f1c117bed01210c1af83c4f802 | 17,226 | py | Python | tools/perf/page_sets/key_silk_cases.py | justremotephone/android_external_chromium_org | 246856e61da7acf5494076c74198f2aea894a721 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2020-01-25T10:18:18.000Z | 2021-01-23T15:29:56.000Z | tools/perf/page_sets/key_silk_cases.py | justremotephone/android_external_chromium_org | 246856e61da7acf5494076c74198f2aea894a721 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | tools/perf/page_sets/key_silk_cases.py | justremotephone/android_external_chromium_org | 246856e61da7acf5494076c74198f2aea894a721 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2020-11-04T07:24:13.000Z | 2020-11-04T07:24:13.000Z | # Copyright 2014 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.
# pylint: disable=W0401,W0614
from telemetry.page.actions.all_page_actions import *
from telemetry.page import page as page_module
from telemetry.page import ... | 27.386328 | 91 | 0.691106 |
9dc5bc5f87b4a87e661d8d31fa9dedc098904232 | 10,417 | py | Python | openpeerpower/components/recorder/util.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 1 | 2021-07-08T20:09:55.000Z | 2021-07-08T20:09:55.000Z | openpeerpower/components/recorder/util.py | pcaston/core | e74d946cef7a9d4e232ae9e0ba150d18018cfe33 | [
"Apache-2.0"
] | 47 | 2021-02-21T23:43:07.000Z | 2022-03-31T06:07:10.000Z | openpeerpower/components/recorder/util.py | OpenPeerPower/core | f673dfac9f2d0c48fa30af37b0a99df9dd6640ee | [
"Apache-2.0"
] | null | null | null | """SQLAlchemy util functions."""
from __future__ import annotations
from collections.abc import Generator
from contextlib import contextmanager
from datetime import timedelta
import functools
import logging
import os
import time
from typing import TYPE_CHECKING
from sqlalchemy.exc import OperationalError, SQLAlchemyE... | 31.282282 | 105 | 0.63262 |
daf3f6fb50da06d0a2423f5c7d528261bfca609a | 7,525 | py | Python | cbuild/core/profile.py | yopito/cports | ef5f808a46724ee3cd215eb95192904ebb7ddcd1 | [
"BSD-2-Clause"
] | null | null | null | cbuild/core/profile.py | yopito/cports | ef5f808a46724ee3cd215eb95192904ebb7ddcd1 | [
"BSD-2-Clause"
] | null | null | null | cbuild/core/profile.py | yopito/cports | ef5f808a46724ee3cd215eb95192904ebb7ddcd1 | [
"BSD-2-Clause"
] | null | null | null | from cbuild.core import paths, logger, chroot
import configparser
import platform
import pathlib
import shlex
import os
import sys
# recognized hardening options
hardening_fields = {
"fortify": True,
"pie": True,
"relro": True,
"ssp": True, # this should really be compiler default
"scp": True, # s... | 26.219512 | 79 | 0.582193 |
4358011f303d9f2e9f96e96f2b4c948d8fbf1182 | 744 | py | Python | Main.py | AhmetKusoglu/Python-Returning-Function | 20edb13515b464db2d773a586e75d55e074b05a7 | [
"MIT"
] | null | null | null | Main.py | AhmetKusoglu/Python-Returning-Function | 20edb13515b464db2d773a586e75d55e074b05a7 | [
"MIT"
] | null | null | null | Main.py | AhmetKusoglu/Python-Returning-Function | 20edb13515b464db2d773a586e75d55e074b05a7 | [
"MIT"
] | null | null | null | import sqlite3
def user_database(name,surname,operation):
connect=sqlite3.connect("Database1.db")
cursor=connect.cursor()
cursor.execute("""CREATE TABLE IF NOT EXISTS user_base(name TEXT,surname TEXT) """)
def add_user():
cursor.execute("INSERT INTO user_base VALUES(?,?)",(name,surna... | 24.8 | 88 | 0.630376 |
cbcab2a7887120d87134c0acc89b84e0c001e28c | 401 | py | Python | fantasydraft/fantasydraft/wsgi.py | PhiloTFarnsworth/FantasyDraftPrototype | edcd75f1a61799f76d63d62d140fbc9b514931a3 | [
"MIT"
] | null | null | null | fantasydraft/fantasydraft/wsgi.py | PhiloTFarnsworth/FantasyDraftPrototype | edcd75f1a61799f76d63d62d140fbc9b514931a3 | [
"MIT"
] | null | null | null | fantasydraft/fantasydraft/wsgi.py | PhiloTFarnsworth/FantasyDraftPrototype | edcd75f1a61799f76d63d62d140fbc9b514931a3 | [
"MIT"
] | null | null | null | """
WSGI config for fantasydraft 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/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_... | 23.588235 | 78 | 0.790524 |
ffdbf0ccd2e487d5fe00bccca6e1184c3f1f82d1 | 8,063 | py | Python | conf.py | yalemssa/aspace-tools | 3ea1a0be08d85eddeaee93c5564bb9e865f6f8c8 | [
"MIT"
] | 4 | 2019-08-15T18:47:48.000Z | 2021-12-12T17:47:57.000Z | conf.py | yalemssa/aspace-tools | 3ea1a0be08d85eddeaee93c5564bb9e865f6f8c8 | [
"MIT"
] | 1 | 2021-05-04T19:49:16.000Z | 2021-05-04T19:49:16.000Z | conf.py | yalemssa/aspace-tools | 3ea1a0be08d85eddeaee93c5564bb9e865f6f8c8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# doctut documentation build configuration file, created by
# sphinx-quickstart on Sun Nov 17 17:36:15 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All ... | 32.512097 | 104 | 0.71363 |
5d18307d38079ba7dc2c565b404a75ce837e1c95 | 2,400 | py | Python | detect_faces.py | cesarsst/Tracking_Objects | 2ae02abc7f85745ba48b2acac46e053cd06a3fa0 | [
"MIT"
] | null | null | null | detect_faces.py | cesarsst/Tracking_Objects | 2ae02abc7f85745ba48b2acac46e053cd06a3fa0 | [
"MIT"
] | null | null | null | detect_faces.py | cesarsst/Tracking_Objects | 2ae02abc7f85745ba48b2acac46e053cd06a3fa0 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import time
from matplotlib import pyplot as plt
#Capturando 1 frame para detecção
cap = cv2.VideoCapture(0)
x = 0
while cap.isOpened():
res, frame = cap.read()
nomeDoFrame = 'frame-%d.jpg' % x
cv2.imwrite(nomeDoFrame, frame)
cap.release()
#Carregando imagem
imagem = c... | 25.806452 | 83 | 0.604167 |
d169d77f5b5b0f10941e13272e862b4d84b1f92d | 201 | py | Python | AgeCompareCalculator.py | sari21-meet/meet2019y1lab3 | df1af7bd99cacbf45cc949e6758953deca314be3 | [
"MIT"
] | null | null | null | AgeCompareCalculator.py | sari21-meet/meet2019y1lab3 | df1af7bd99cacbf45cc949e6758953deca314be3 | [
"MIT"
] | null | null | null | AgeCompareCalculator.py | sari21-meet/meet2019y1lab3 | df1af7bd99cacbf45cc949e6758953deca314be3 | [
"MIT"
] | null | null | null | Person1 = input('What is the age of the first person?')
Person2 = input('What is the age of the second person?')
Person1 = int(Person1)
Person2 = int(Person2)
Diff = abs(Person1 - Person2)
print(Diff)
| 28.714286 | 56 | 0.721393 |
8e95e58b1d1caf4006bea6d49b1adb1c469cacb0 | 429 | py | Python | juniper/get_interfaces_interpreter.py | kovarus/practical-network-programmability | 0c395dda2642a01f783fc6bd33e5768a22638ec4 | [
"Apache-2.0"
] | null | null | null | juniper/get_interfaces_interpreter.py | kovarus/practical-network-programmability | 0c395dda2642a01f783fc6bd33e5768a22638ec4 | [
"Apache-2.0"
] | null | null | null | juniper/get_interfaces_interpreter.py | kovarus/practical-network-programmability | 0c395dda2642a01f783fc6bd33e5768a22638ec4 | [
"Apache-2.0"
] | 1 | 2019-06-06T20:57:59.000Z | 2019-06-06T20:57:59.000Z | from pprint import pprint
from jnpr.junos import Device
from jnpr.junos.op.phyport import PhyPortTable
import code
with Device(host='34.208.13.114', user='pyez', password='Juniperpyez!', gather_facts=False) as dev:
intf_status = PhyPortTable(dev)
intf_status.get()
code.interact(local=locals())
for int... | 28.6 | 99 | 0.708625 |
71d326948562d57101d720e646bfc1918c6137d4 | 2,452 | py | Python | ztag/annotations/fox_brand.py | justinbastress/ztag | 137b754dfe22b7d6e0945ae33def372ec67d092b | [
"Apache-2.0"
] | 107 | 2015-10-13T16:03:21.000Z | 2021-11-08T10:53:07.000Z | ztag/annotations/fox_brand.py | justinbastress/ztag | 137b754dfe22b7d6e0945ae33def372ec67d092b | [
"Apache-2.0"
] | 73 | 2015-10-14T17:27:10.000Z | 2018-10-01T14:32:44.000Z | ztag/annotations/fox_brand.py | justinbastress/ztag | 137b754dfe22b7d6e0945ae33def372ec67d092b | [
"Apache-2.0"
] | 36 | 2015-10-14T17:13:20.000Z | 2021-10-05T19:41:10.000Z | from ztag.annotation import *
class FoxBrand(Annotation):
port = 1911
protocol = protocols.FOX
subprotocol = protocols.FOX.DEVICE_ID
_vendors = {
"vykon": (Manufacturer.VYKON, Type.SCADA_CONTROLLER),
"facexp": (Manufacturer.FACEXP, Type.SCADA_CONTROLLER),
"websopen": (Manufac... | 38.3125 | 74 | 0.617455 |
d348b30812230940fe8e5e105f3ebe355e2bf902 | 42,683 | py | Python | tests/publishing/test_emailer.py | professor0x/Alarmageddon | 2aa0493b78e8ea8ae7870651dc7ff1d8c58b309c | [
"Apache-2.0"
] | null | null | null | tests/publishing/test_emailer.py | professor0x/Alarmageddon | 2aa0493b78e8ea8ae7870651dc7ff1d8c58b309c | [
"Apache-2.0"
] | null | null | null | tests/publishing/test_emailer.py | professor0x/Alarmageddon | 2aa0493b78e8ea8ae7870651dc7ff1d8c58b309c | [
"Apache-2.0"
] | null | null | null | import alarmageddon.publishing.emailer as emailer
from alarmageddon.publishing.emailer import EmailPublisher, SimpleEmailPublisher
from alarmageddon.publishing.emailer import SilentUndefined
from alarmageddon.validations.validation import Priority
from alarmageddon.validations.http import HttpValidation
from alarmagedd... | 47.478309 | 89 | 0.600684 |
4e6c741025b9daa444a8f53350f213677a62ffce | 3,950 | py | Python | vnv_manager/app/api/urls.py | sonata-nfv/son-monitor | a48a15d0190f20913cf313ca28e3daabb3753285 | [
"Apache-2.0"
] | 5 | 2018-02-24T17:26:49.000Z | 2021-11-11T12:08:55.000Z | vnv_manager/app/api/urls.py | sonata-nfv/son-monitor | a48a15d0190f20913cf313ca28e3daabb3753285 | [
"Apache-2.0"
] | 11 | 2017-01-17T09:25:37.000Z | 2021-06-10T21:11:46.000Z | vnv_manager/app/api/urls.py | sonata-nfv/son-monitor | a48a15d0190f20913cf313ca28e3daabb3753285 | [
"Apache-2.0"
] | 9 | 2016-07-29T09:41:19.000Z | 2019-10-03T00:00:41.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 writin... | 42.934783 | 117 | 0.729367 |
4947708f191a59fdd0f25ab78f7141622f1fdbc9 | 16,560 | py | Python | app/env/lib/python3.7/site-packages/twilio/rest/preview/sync/service/document/document_permission.py | siyaochen/Tier1Health | 536591a7534bbb3fb27fe889bfed9de152ec1864 | [
"MIT"
] | 30 | 2018-06-12T12:00:53.000Z | 2021-05-02T01:27:16.000Z | app/env/lib/python3.7/site-packages/twilio/rest/preview/sync/service/document/document_permission.py | siyaochen/Tier1Health | 536591a7534bbb3fb27fe889bfed9de152ec1864 | [
"MIT"
] | 11 | 2019-12-26T17:21:03.000Z | 2022-03-21T22:17:07.000Z | app/env/lib/python3.7/site-packages/twilio/rest/preview/sync/service/document/document_permission.py | siyaochen/Tier1Health | 536591a7534bbb3fb27fe889bfed9de152ec1864 | [
"MIT"
] | 4 | 2018-06-12T14:14:20.000Z | 2018-06-19T16:01:49.000Z | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import ListResource
fr... | 36.157205 | 118 | 0.645894 |
600c7617d58eb2f68a1460805a1e2ccf6fcfa9c0 | 8,730 | py | Python | python-version-codes/Vrushank_plots( B_s, P, Pdot , RLc).py | We-Want-it-That-Way/Plotting | 30ecd9025ff9b68950a4e148d0af990bd4652780 | [
"MIT"
] | null | null | null | python-version-codes/Vrushank_plots( B_s, P, Pdot , RLc).py | We-Want-it-That-Way/Plotting | 30ecd9025ff9b68950a4e148d0af990bd4652780 | [
"MIT"
] | null | null | null | python-version-codes/Vrushank_plots( B_s, P, Pdot , RLc).py | We-Want-it-That-Way/Plotting | 30ecd9025ff9b68950a4e148d0af990bd4652780 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# Radio High Energy Pulsars collected by @Ginna Mystica, Catherine,Ashwin
# In[1]:
import pandas as pd
import numpy as np
import math
G={'Name of pulsar':['J0205+6449','J0218+4232','J0437-4715','J0534+2200','J1105-6107','J1124-5916','J1617-5055','J1930+1852','J2124-3358','J2229... | 37.467811 | 1,077 | 0.637572 |
db7960d19e83754af6c997512648278021ef0225 | 18,641 | py | Python | tensorflow/python/tools/freeze_graph.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 190,993 | 2015-11-09T13:17:30.000Z | 2022-03-31T23:05:27.000Z | tensorflow/python/tools/freeze_graph.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 48,461 | 2015-11-09T14:21:11.000Z | 2022-03-31T23:17:33.000Z | tensorflow/python/tools/freeze_graph.py | EricRemmerswaal/tensorflow | 141ff27877579c81a213fa113bd1b474c1749aca | [
"Apache-2.0"
] | 104,981 | 2015-11-09T13:40:17.000Z | 2022-03-31T19:51:54.000Z | # Copyright 2015 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... | 38.19877 | 80 | 0.668848 |
70f1718b096e21018fe9437c58564add66dbf9e2 | 8,437 | py | Python | openstack_dashboard/dashboards/identity/groups/tests.py | maofutian/horizon | dab92e7d2f576caea8f81c8e22a516fb45633794 | [
"Apache-2.0"
] | 60 | 2015-03-09T14:31:46.000Z | 2021-12-12T19:22:31.000Z | openstack_dashboard/dashboards/identity/groups/tests.py | 2733284198/avos | becf7dd313fb8569581f985118c8367921c731ab | [
"Apache-2.0"
] | 7 | 2015-04-13T13:21:10.000Z | 2016-02-24T18:38:28.000Z | openstack_dashboard/dashboards/identity/groups/tests.py | 2733284198/avos | becf7dd313fb8569581f985118c8367921c731ab | [
"Apache-2.0"
] | 13 | 2015-03-09T17:26:26.000Z | 2020-02-22T19:19:14.000Z | # Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 37.167401 | 79 | 0.608984 |
afb4dc1de48baaad0c280d0bc4c4ef9feeff409d | 1,794 | py | Python | state.py | dankolesnikov/VTA-Chat-Bot | f547a899e66ce4c1065591e21166de0902451c79 | [
"MIT"
] | 2 | 2019-03-18T11:40:07.000Z | 2022-01-07T02:08:04.000Z | state.py | dankolesnikov/VTA-Chat-Bot | f547a899e66ce4c1065591e21166de0902451c79 | [
"MIT"
] | null | null | null | state.py | dankolesnikov/VTA-Chat-Bot | f547a899e66ce4c1065591e21166de0902451c79 | [
"MIT"
] | null | null | null | class State:
'''Helper class to maintain the state of application'''
def __init__(self, mode, station, direction):
'''State can be: ready or not ready'''
self.state_rail = False
self.state_dash = False
self.mode = mode
self.station = station
self.direction = direc... | 31.473684 | 119 | 0.596433 |
c8f9ddedc5412e389bd218744f40873558df9802 | 3,969 | py | Python | lambdaCustomFunction/tweet_utils.py | MatthewGleeson/PulsePublicTwitterPipeline | c57e12cf76c6e23e235766c9acd86a40c39a4683 | [
"CNRI-Python"
] | 2 | 2021-02-15T16:54:48.000Z | 2021-02-16T19:13:48.000Z | lambdaCustomFunction/tweet_utils.py | MatthewGleeson/PulsePublicTwitterPipeline | c57e12cf76c6e23e235766c9acd86a40c39a4683 | [
"CNRI-Python"
] | null | null | null | lambdaCustomFunction/tweet_utils.py | MatthewGleeson/PulsePublicTwitterPipeline | c57e12cf76c6e23e235766c9acd86a40c39a4683 | [
"CNRI-Python"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import re
from textblob import TextBlob
class Sentiments:
POSITIVE = 'Positive'
NEGATIVE = 'Negative'
NEUTRAL = 'Neutral'
CONFUSED = 'Confused'
id_field = 'id_str'
emoticons = {Sentiments.POSITIVE: '😀|😁|😂|😃|😄|😅|😆|😇|😈|😉|😊|😋|😌|😍|😎|😏|😗|😘|😙|�... | 25.280255 | 96 | 0.489292 |
0437c1bf547e8f31f8f2169a53c5bf0855a1c17c | 6,927 | py | Python | ext/opentelemetry-ext-requests/src/opentelemetry/ext/requests/__init__.py | cnnradams/opentelemetry-python | a8a0ed40df851b8e6477d188c393b89c84f15e42 | [
"Apache-2.0"
] | 2 | 2020-08-13T21:10:48.000Z | 2020-09-30T00:55:05.000Z | ext/opentelemetry-ext-requests/src/opentelemetry/ext/requests/__init__.py | cnnradams/opentelemetry-python | a8a0ed40df851b8e6477d188c393b89c84f15e42 | [
"Apache-2.0"
] | null | null | null | ext/opentelemetry-ext-requests/src/opentelemetry/ext/requests/__init__.py | cnnradams/opentelemetry-python | a8a0ed40df851b8e6477d188c393b89c84f15e42 | [
"Apache-2.0"
] | null | null | null | # Copyright The OpenTelemetry Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | 36.267016 | 144 | 0.687599 |
82563a3a944cf9757d53b8312ba52148b0c445cb | 1,349 | py | Python | backtrack.py | ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos | 4acdbc423428fb2e0068720add69e7870c87929a | [
"Apache-2.0"
] | null | null | null | backtrack.py | ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos | 4acdbc423428fb2e0068720add69e7870c87929a | [
"Apache-2.0"
] | null | null | null | backtrack.py | ITCRStevenLPZ/Proyecto2-Analisis-de-Algoritmos | 4acdbc423428fb2e0068720add69e7870c87929a | [
"Apache-2.0"
] | null | null | null | # Python3 implementation of the approach
V = 4
answer = []
# Function to find the minimum weight
# Hamiltonian Cycle
def tsp(graph, v, currPos, n, count, cost):
# If last node is reached and it has
# a link to the starting node i.e
# the source then keep the minimum
# value out of the total cost of
# traversal a... | 22.864407 | 46 | 0.64937 |
af719b058b803ea7edf4b00090c0bc7609b83bca | 1,328 | py | Python | test/test_seq.py | idobatter/msgpack-python | d5436c28197f3ccdd473e1c54838133574948dab | [
"Apache-2.0"
] | 1 | 2015-11-06T02:39:01.000Z | 2015-11-06T02:39:01.000Z | test/test_seq.py | idobatter/msgpack-python | d5436c28197f3ccdd473e1c54838133574948dab | [
"Apache-2.0"
] | null | null | null | test/test_seq.py | idobatter/msgpack-python | d5436c28197f3ccdd473e1c54838133574948dab | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import six
import io
import msgpack
binarydata = [chr(i) for i in range(256)]
binarydata = six.b("".join(binarydata))
def gen_binary_data(idx):
data = binarydata[:idx % 300]
return data
def test_exceeding_unpacker_read_size():
dumpf = io.BytesIO()
packer = msgp... | 30.883721 | 149 | 0.619729 |
317623d6c4f4759de37311238af3c33f921f0c67 | 1,388 | py | Python | challonge/matches.py | russellvt/pychal | 5f79bba488beee82ab67add70a67c85553a8da73 | [
"BSD-2-Clause"
] | null | null | null | challonge/matches.py | russellvt/pychal | 5f79bba488beee82ab67add70a67c85553a8da73 | [
"BSD-2-Clause"
] | 2 | 2020-07-20T07:26:08.000Z | 2021-01-25T05:06:55.000Z | challonge/matches.py | russellvt/pychal | 5f79bba488beee82ab67add70a67c85553a8da73 | [
"BSD-2-Clause"
] | null | null | null | from challonge import api
def index(tournament, **params):
"""Retrieve a tournament's match list."""
return api.fetch_and_parse(
"GET",
"tournaments/%s/matches" % tournament,
**params)
def show(tournament, match_id, **params):
"""Retrieve a single match record for a tournament.""... | 28.326531 | 100 | 0.639049 |
9686ee6d1db300b59bb2e522ec0d8b84dac0a1bf | 1,769 | py | Python | src/fidesops/schemas/connection_configuration/connection_secrets.py | eastandwestwind/fidesops | 93e2881c0fdc30075b7cc22024965d18cec0bdea | [
"Apache-2.0"
] | 41 | 2021-11-01T23:53:43.000Z | 2022-03-22T23:07:56.000Z | src/fidesops/schemas/connection_configuration/connection_secrets.py | eastandwestwind/fidesops | 93e2881c0fdc30075b7cc22024965d18cec0bdea | [
"Apache-2.0"
] | 235 | 2021-11-01T20:31:55.000Z | 2022-03-31T15:40:58.000Z | src/fidesops/schemas/connection_configuration/connection_secrets.py | eastandwestwind/fidesops | 93e2881c0fdc30075b7cc22024965d18cec0bdea | [
"Apache-2.0"
] | 12 | 2021-11-02T00:44:51.000Z | 2022-03-14T16:23:10.000Z | from __future__ import annotations
import abc
from typing import Optional, Dict, Any, List
from pydantic import BaseModel, Extra, root_validator
from fidesops.models.connectionconfig import ConnectionTestStatus
from fidesops.schemas import Msg
class ConnectionConfigSecretsSchema(BaseModel, abc.ABC):
"""Abstrac... | 32.163636 | 97 | 0.69022 |
24285b24c0b0071f1d2f690cae18935b1c8ae706 | 1,080 | py | Python | var/spack/repos/builtin/packages/py-rios/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/py-rios/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/py-rios/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyRios(PythonPackage):
"""Raster I/O Simplification. A set of python modules which makes i... | 41.538462 | 96 | 0.722222 |
770c2bf32f25962927e70cbfc7823077356aa5db | 138 | py | Python | test13.py | cherytony/test1 | 506ce4cab6f641beff817c81d7a616db29a7131d | [
"Apache-2.0"
] | null | null | null | test13.py | cherytony/test1 | 506ce4cab6f641beff817c81d7a616db29a7131d | [
"Apache-2.0"
] | null | null | null | test13.py | cherytony/test1 | 506ce4cab6f641beff817c81d7a616db29a7131d | [
"Apache-2.0"
] | null | null | null | """
题目描述
写出一个程序,接受一个字符串,然后输出该字符串反转后的字符串。例如:
输入描述:
输入N个字符
输出描述:
输出该字符串反转后的字符串
示例1
输入
abcd
输出
dcba
"""
s = input()
ss = s[::-1]
print(ss) | 7.263158 | 34 | 0.673913 |
5b6dd50f1f6f13dc0f3aeb460a9c081b77ea8960 | 1,512 | py | Python | helpscout/tests/test_helpscout_web_hook_event.py | physera/python-helpscout | 84bf669417d72ca19641a02c9a660e1ae4271de4 | [
"MIT"
] | 6 | 2017-09-20T15:22:21.000Z | 2021-12-15T11:24:17.000Z | helpscout/tests/test_helpscout_web_hook_event.py | physera/python-helpscout | 84bf669417d72ca19641a02c9a660e1ae4271de4 | [
"MIT"
] | 39 | 2017-09-15T21:22:31.000Z | 2019-03-15T05:06:00.000Z | helpscout/tests/test_helpscout_web_hook_event.py | physera/python-helpscout | 84bf669417d72ca19641a02c9a660e1ae4271de4 | [
"MIT"
] | 6 | 2018-03-15T09:40:46.000Z | 2019-03-15T04:51:23.000Z | # -*- coding: utf-8 -*-
# Copyright 2017-TODAY LasLabs Inc.
# License MIT (https://opensource.org/licenses/MIT).
import unittest
from ..models import Customer
from ..web_hook import HelpScoutWebHookEvent
class TestHelpScoutWebHookEvent(unittest.TestCase):
def setUp(self):
super(TestHelpScoutWebHookEven... | 30.24 | 66 | 0.587963 |
8ac3714302f2abfcce869368dfaf55ce2c6a1e0a | 12,379 | py | Python | resources/usr/local/lib/python2.7/dist-packages/sklearn/mixture/tests/test_gmm.py | edawson/parliament2 | 2632aa3484ef64c9539c4885026b705b737f6d1e | [
"Apache-2.0"
] | null | null | null | resources/usr/local/lib/python2.7/dist-packages/sklearn/mixture/tests/test_gmm.py | edawson/parliament2 | 2632aa3484ef64c9539c4885026b705b737f6d1e | [
"Apache-2.0"
] | null | null | null | resources/usr/local/lib/python2.7/dist-packages/sklearn/mixture/tests/test_gmm.py | edawson/parliament2 | 2632aa3484ef64c9539c4885026b705b737f6d1e | [
"Apache-2.0"
] | 1 | 2020-05-28T23:01:44.000Z | 2020-05-28T23:01:44.000Z | import unittest
from nose.tools import assert_true
import numpy as np
from numpy.testing import (assert_array_equal, assert_array_almost_equal,
assert_raises)
from scipy import stats
from sklearn import mixture
from sklearn.datasets.samples_generator import make_spd_matrix
rng = np.random.R... | 37.286145 | 79 | 0.627272 |
f05c83a096fe88be2528097bf6bf7de25fa1b0c5 | 11,487 | py | Python | test/functional/bsv-128Mb-blocks-activation-default.py | gbtn/bitcoin-sv-gbtn | 8b09d1aa072da819fb3309b0be85dae0f1ac9549 | [
"MIT"
] | null | null | null | test/functional/bsv-128Mb-blocks-activation-default.py | gbtn/bitcoin-sv-gbtn | 8b09d1aa072da819fb3309b0be85dae0f1ac9549 | [
"MIT"
] | null | null | null | test/functional/bsv-128Mb-blocks-activation-default.py | gbtn/bitcoin-sv-gbtn | 8b09d1aa072da819fb3309b0be85dae0f1ac9549 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Copyright (c) 2017 The Bitcoin developers
# Copyright (c) 2018 The Bitcoin SV developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Test that t... | 38.807432 | 102 | 0.614085 |
9cceb316962fdffd7c5eafa09f78bf4dec5ba2b3 | 1,867 | py | Python | tests/all_tests/test_visualise.py | Siaan/COMS4995 | a1dffcd83698ab3832a79f7a9632cd34ce1448d7 | [
"Apache-2.0"
] | null | null | null | tests/all_tests/test_visualise.py | Siaan/COMS4995 | a1dffcd83698ab3832a79f7a9632cd34ce1448d7 | [
"Apache-2.0"
] | 13 | 2020-10-02T04:56:13.000Z | 2020-12-21T07:15:04.000Z | tests/all_tests/test_visualise.py | Siaan/COMS4995 | a1dffcd83698ab3832a79f7a9632cd34ce1448d7 | [
"Apache-2.0"
] | 1 | 2020-12-21T23:46:05.000Z | 2020-12-21T23:46:05.000Z | from tests import input_process, output_process, visualize
# from unittest import mock
# import scripts.main.clean_KF as KF
from scripts.main import process_data_file # noqa: F401
from scripts.main import process_output
import pandas as pd
import numpy as np
import os
THIS_DIR = os.path.dirname(os.path.abspath(__file_... | 23.049383 | 62 | 0.660418 |
04b76758eeecc00363fd23ba3b717d157649bbef | 3,157 | py | Python | podrum/manager/event_manager.py | plun1331/Podrum-Rewrite | cfb9645bb8f041cfab38f4f156da94df4f3ec788 | [
"MIT"
] | null | null | null | podrum/manager/event_manager.py | plun1331/Podrum-Rewrite | cfb9645bb8f041cfab38f4f156da94df4f3ec788 | [
"MIT"
] | null | null | null | podrum/manager/event_manager.py | plun1331/Podrum-Rewrite | cfb9645bb8f041cfab38f4f156da94df4f3ec788 | [
"MIT"
] | 1 | 2021-03-04T05:18:26.000Z | 2021-03-04T05:18:26.000Z | ################################################################################
# #
# ____ _ #
# | _ \ ___ __| |_ __ _ _ _ __ ___ ... | 59.566038 | 80 | 0.412417 |
b097334bc92d270a984d63434ae5c0c753633f65 | 977 | py | Python | examples/export_layers_as_png.py | 13751742405/photoshop-python-api | 5fe9b46dd2b2b4e2e1e6ef99a68d68b4fc032a70 | [
"MIT"
] | null | null | null | examples/export_layers_as_png.py | 13751742405/photoshop-python-api | 5fe9b46dd2b2b4e2e1e6ef99a68d68b4fc032a70 | [
"MIT"
] | null | null | null | examples/export_layers_as_png.py | 13751742405/photoshop-python-api | 5fe9b46dd2b2b4e2e1e6ef99a68d68b4fc032a70 | [
"MIT"
] | null | null | null | """Export every layer as a .png file."""
import os
from photoshop import Session
import examples._psd_files as psd # Import from examples.
PSD_FILE = psd.get_psd_files()
def hide_all_layers(layers):
for layer in layers:
layer.visible = False
def main():
psd_file = PSD_FILE["export_layers_as_png.... | 26.405405 | 70 | 0.623337 |
3b5147c4e0aa10396eb1d3a0c5c4a013227a4a09 | 937 | py | Python | officialWebsite/users/views.py | Mahima710/officialWebsite | 86f12ce152466a6382df573c9b0413c42cba4645 | [
"MIT"
] | null | null | null | officialWebsite/users/views.py | Mahima710/officialWebsite | 86f12ce152466a6382df573c9b0413c42cba4645 | [
"MIT"
] | null | null | null | officialWebsite/users/views.py | Mahima710/officialWebsite | 86f12ce152466a6382df573c9b0413c42cba4645 | [
"MIT"
] | null | null | null | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import generics
from officialWebsite.users.models import User
from officialWebsite.users.serializers import UserSerializer
class LeadListView(APIView):
"""List all leads"""
def get(self, request, format=... | 30.225806 | 68 | 0.732124 |
2705739f917352f40630af5f6f70f2344c1868fa | 3,620 | py | Python | scrum/forms.py | aneesahmed/gameplan2 | 7f7acd9c02c951ee1b25131334199d5a72073b66 | [
"Apache-2.0"
] | null | null | null | scrum/forms.py | aneesahmed/gameplan2 | 7f7acd9c02c951ee1b25131334199d5a72073b66 | [
"Apache-2.0"
] | null | null | null | scrum/forms.py | aneesahmed/gameplan2 | 7f7acd9c02c951ee1b25131334199d5a72073b66 | [
"Apache-2.0"
] | null | null | null | from django import forms
import datetime
from django.contrib.admin import widgets
from .models import Portfolio , PortfolioReleases, PortfolioStatus,Userstory, Sprint, Task, TaskStatus
from django.contrib.admin.widgets import AdminDateWidget
class UserstoryForm(forms.ModelForm):
class Meta:
model = Users... | 41.136364 | 123 | 0.59337 |
5be1d57b529dd7d1f672f0de4f97919f2ef50128 | 3,959 | py | Python | Code/web/NebFile/file_operations.py | CarlColglazier/QB_Nebulae_V2 | 3326fa1c672ba0845b28cb55847bea0c9b8e9a05 | [
"MIT"
] | 8 | 2020-05-14T20:18:29.000Z | 2021-08-08T15:18:28.000Z | Code/web/NebFile/file_operations.py | alex-thibodeau/QB_Nebulae_V2 | 34bcf341ea8eddaa9f9ce2e7c2d2438e00e50f54 | [
"MIT"
] | null | null | null | Code/web/NebFile/file_operations.py | alex-thibodeau/QB_Nebulae_V2 | 34bcf341ea8eddaa9f9ce2e7c2d2438e00e50f54 | [
"MIT"
] | null | null | null | import json
import os
import shutil
import cherrypy
BASE_DIR = "/"
#TODO check all the paths here
def check_path(path) :
path = os.path.normpath(path)
print (path)
if path.startswith("/usbdrive") or path.startswith("/") : return True
else : return True
def check_and_inc_name(path) :
newpath = pa... | 26.218543 | 114 | 0.566557 |
fdacbdfddd76e2d269ca0753ad298a35e9e90b74 | 26,333 | py | Python | ScienceFair/crack_password.py | maxxie114/ConvertionScripts | 25e518db23d63d5010fb10f78fa5c4d01ccaa69a | [
"MIT"
] | null | null | null | ScienceFair/crack_password.py | maxxie114/ConvertionScripts | 25e518db23d63d5010fb10f78fa5c4d01ccaa69a | [
"MIT"
] | null | null | null | ScienceFair/crack_password.py | maxxie114/ConvertionScripts | 25e518db23d63d5010fb10f78fa5c4d01ccaa69a | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Written by Howard Eglowstein, Science Buddies, 2014
# Updated by Ben Finio, Science Buddies, 2017
# formatting bugs fixed, 11/13/17
# This program is offered for use with the Science Buddies project idea
# "How Easily Can Your Password Be Hacked?" which lets you explore the
# makeup of a g... | 44.406408 | 214 | 0.634603 |
830b9cded7a1df5553f80b22aa4df5cbb2b1a153 | 24 | py | Python | script.py | SubodhKul/git-test | aa963f382ee147c49b0d1bb275edb37742966b68 | [
"MIT"
] | null | null | null | script.py | SubodhKul/git-test | aa963f382ee147c49b0d1bb275edb37742966b68 | [
"MIT"
] | null | null | null | script.py | SubodhKul/git-test | aa963f382ee147c49b0d1bb275edb37742966b68 | [
"MIT"
] | null | null | null | print("python script")
| 8 | 22 | 0.708333 |
2440dd3e4549606bcf24d3d6c60f24fd080ceac5 | 2,696 | py | Python | tests/rbac/common/role/propose_member_helper_test.py | crazyrex/sawtooth-next-directory | 210b581c8c92c307fab2f6d2b9a55526b56b790a | [
"Apache-2.0"
] | 1 | 2019-04-14T20:16:59.000Z | 2019-04-14T20:16:59.000Z | tests/rbac/common/role/propose_member_helper_test.py | crazyrex/sawtooth-next-directory | 210b581c8c92c307fab2f6d2b9a55526b56b790a | [
"Apache-2.0"
] | null | null | null | tests/rbac/common/role/propose_member_helper_test.py | crazyrex/sawtooth-next-directory | 210b581c8c92c307fab2f6d2b9a55526b56b790a | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Contributors to Hyperledger Sawtooth
#
# 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 ... | 37.971831 | 79 | 0.692136 |
da908e06968d7bb7ec61d84ef9c0a07481bbc39c | 3,407 | py | Python | ecomm/orders/models.py | aruntnp/MYPROJECTS | a1aac3650db607c1a86c0d640a947588656f4f70 | [
"MIT"
] | null | null | null | ecomm/orders/models.py | aruntnp/MYPROJECTS | a1aac3650db607c1a86c0d640a947588656f4f70 | [
"MIT"
] | 2 | 2018-10-09T21:58:30.000Z | 2018-10-10T06:55:10.000Z | ecomm/orders/models.py | aruntnp/MYPROJECTS | a1aac3650db607c1a86c0d640a947588656f4f70 | [
"MIT"
] | null | null | null | from math import fsum
from django.db import models
from carts.models import Cart
from ecomm.utils import unique_order_id_generator
from django.db.models.signals import pre_save, post_save
from billing.models import BillingProfile
from addresses.models import Address
# Create your models here.
ORDER_STATUS_CHOICE = (
... | 32.447619 | 118 | 0.694159 |
a034a07e8054052a4508ca58794469411754f8b4 | 5,223 | py | Python | oct/cli/sync/remote.py | staebler/origin-ci-tool | 2cb86c3cad7a37450e711571ac75997118c899e5 | [
"Apache-2.0"
] | 23 | 2017-01-06T21:32:09.000Z | 2022-03-14T17:14:49.000Z | oct/cli/sync/remote.py | staebler/origin-ci-tool | 2cb86c3cad7a37450e711571ac75997118c899e5 | [
"Apache-2.0"
] | 129 | 2017-01-06T18:29:51.000Z | 2022-01-27T17:37:21.000Z | oct/cli/sync/remote.py | staebler/origin-ci-tool | 2cb86c3cad7a37450e711571ac75997118c899e5 | [
"Apache-2.0"
] | 52 | 2017-01-06T16:03:49.000Z | 2022-01-24T18:58:58.000Z | # coding=utf-8
from __future__ import absolute_import, division, print_function
from click import UsageError, command, option, pass_context
from .git_options import git_options, git_options_helptext, git_version_specifier, validate_git_specifier
from .sync_options import sync_destination_option
from ..util.common_opt... | 35.053691 | 119 | 0.743442 |
1ffd55cb02b4c319d0501ada2e419dea55b26ded | 5,120 | py | Python | utils.py | Exssis67/Exssis67 | 23a93ec99cac1bb7ab228662bf748e85bcd3006b | [
"Apache-2.0"
] | null | null | null | utils.py | Exssis67/Exssis67 | 23a93ec99cac1bb7ab228662bf748e85bcd3006b | [
"Apache-2.0"
] | 4 | 2020-09-25T21:56:54.000Z | 2022-02-10T01:33:42.000Z | utils.py | Exssis67/Exssis67 | 23a93ec99cac1bb7ab228662bf748e85bcd3006b | [
"Apache-2.0"
] | null | null | null | """Contains utility functions for Yolo v3 model."""
import numpy as np
from PIL import Image, ImageDraw, ImageFont
from seaborn import color_palette
import cv2
def load_images(img_names, model_size):
"""Loads images in a 4D array.
Args:
img_names: A list of images names.
model_size: The input... | 40 | 95 | 0.517773 |
2dff29dc2bde2a2fde2cad911c27bd03beb45f30 | 3,312 | py | Python | python_benchmark.py | xiaocai2333/arctern_benchmark | f9f89c3e9267ff54ca7dac8a3f2d4f75984bba92 | [
"Apache-2.0"
] | 1 | 2020-05-19T02:40:08.000Z | 2020-05-19T02:40:08.000Z | python_benchmark.py | xiaocai2333/arctern_benchmark | f9f89c3e9267ff54ca7dac8a3f2d4f75984bba92 | [
"Apache-2.0"
] | null | null | null | python_benchmark.py | xiaocai2333/arctern_benchmark | f9f89c3e9267ff54ca7dac8a3f2d4f75984bba92 | [
"Apache-2.0"
] | 1 | 2020-05-19T02:40:10.000Z | 2020-05-19T02:40:10.000Z | # Copyright (C) 2019-2020 Zilliz. 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... | 30.953271 | 95 | 0.641304 |
4de4e8499a08c632f40ff032c042dd0168bc81d4 | 2,287 | py | Python | screenshot.py | Ismael-Safadi/sceenshot | 7da8b31849c450b6bbfc416d557476f31758b8ec | [
"MIT"
] | null | null | null | screenshot.py | Ismael-Safadi/sceenshot | 7da8b31849c450b6bbfc416d557476f31758b8ec | [
"MIT"
] | null | null | null | screenshot.py | Ismael-Safadi/sceenshot | 7da8b31849c450b6bbfc416d557476f31758b8ec | [
"MIT"
] | null | null | null | #this tool coded by :ismael al-safadi
#you can use this tool to help you in penetration testing
#enjoy your time
#thank you for using my script ^__^
from PIL import ImageGrab
import time,sys
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEBase import MIMEBase
from email.MIMEText imp... | 28.5875 | 161 | 0.658942 |
f7e0cbfc9034e98a33ee5869d07390cd56780f7c | 908 | py | Python | python_code/easy/476_Number_Complement_easy/runner.py | timshenkao/interview_coding_exercises | c531fa5e0c09faef976539275589e957fcb88393 | [
"Apache-2.0"
] | null | null | null | python_code/easy/476_Number_Complement_easy/runner.py | timshenkao/interview_coding_exercises | c531fa5e0c09faef976539275589e957fcb88393 | [
"Apache-2.0"
] | null | null | null | python_code/easy/476_Number_Complement_easy/runner.py | timshenkao/interview_coding_exercises | c531fa5e0c09faef976539275589e957fcb88393 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2021 - present, Timur Shenkao
# 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 appl... | 29.290323 | 78 | 0.668502 |
0de3a707ae80e2d325345c647943005facd6053c | 315 | py | Python | config/api_router.py | MikaelSantilio/ga-reports | c92f3053fbf0d2f88d5cb57cf625c1e0e82a36e9 | [
"MIT"
] | 1 | 2021-05-19T16:37:01.000Z | 2021-05-19T16:37:01.000Z | config/api_router.py | MikaelSantilio/ga-reports | c92f3053fbf0d2f88d5cb57cf625c1e0e82a36e9 | [
"MIT"
] | 4 | 2021-05-12T05:52:49.000Z | 2022-03-31T09:08:22.000Z | config/api_router.py | MikaelSantilio/ga-reports | c92f3053fbf0d2f88d5cb57cf625c1e0e82a36e9 | [
"MIT"
] | null | null | null | from django.conf import settings
from rest_framework.routers import DefaultRouter, SimpleRouter
from ga_reports.users.api.views import UserViewSet
if settings.DEBUG:
router = DefaultRouter()
else:
router = SimpleRouter()
router.register("users", UserViewSet)
app_name = "api"
urlpatterns = router.urls
| 19.6875 | 62 | 0.780952 |
b38af93ceaaaab114285b8d44b45a3e7dd76c6eb | 11,223 | py | Python | flask_security/datastore.py | WintorXR/flask-security | ca1db8cda177b0fe1a740b96a566a356fa8ebc25 | [
"MIT"
] | null | null | null | flask_security/datastore.py | WintorXR/flask-security | ca1db8cda177b0fe1a740b96a566a356fa8ebc25 | [
"MIT"
] | null | null | null | flask_security/datastore.py | WintorXR/flask-security | ca1db8cda177b0fe1a740b96a566a356fa8ebc25 | [
"MIT"
] | null | null | null | """
flask_security.datastore
~~~~~~~~~~~~~~~~~~~~~~~~
This module contains an user datastore classes.
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2019-2022 by J. Christopher Wagner (jwag).
:license: MIT, see LICENSE for more details.
Complete;ly rewritten to just use sessions and... | 35.971154 | 117 | 0.610086 |
144cbfa7ccfc803305d5366a78ecf44902d886a5 | 816 | py | Python | artifacts/inference.py | SteveNY-Tibco/iris-classifier-pyspark-dtc | 17f7de5b5c03bf33b3a990abca54bef63d7418b5 | [
"MIT"
] | null | null | null | artifacts/inference.py | SteveNY-Tibco/iris-classifier-pyspark-dtc | 17f7de5b5c03bf33b3a990abca54bef63d7418b5 | [
"MIT"
] | null | null | null | artifacts/inference.py | SteveNY-Tibco/iris-classifier-pyspark-dtc | 17f7de5b5c03bf33b3a990abca54bef63d7418b5 | [
"MIT"
] | null | null | null | # inference.py
import sys
import os
from pyspark.ml.classification import DecisionTreeClassificationModel
import pyspark
from pyspark.sql import SQLContext
from pyspark.ml.linalg import Vectors
#if ('sc' not in locals() or 'sc' not in globals()):
# os.environ['PYSPARK_PYTHON'] = '/usr/bin/python2'
sc = pyspark.... | 29.142857 | 75 | 0.691176 |
9911a2fd8312c02200ff6caf83e8692f87baa0af | 2,128 | py | Python | scripts/image_tools/images/regular_image.py | victorhu3/webots | 60d173850f0b4714c500db004e69f2df8cfb9e8a | [
"Apache-2.0"
] | 1 | 2020-06-08T13:38:11.000Z | 2020-06-08T13:38:11.000Z | scripts/image_tools/images/regular_image.py | victorhu3/webots | 60d173850f0b4714c500db004e69f2df8cfb9e8a | [
"Apache-2.0"
] | 2 | 2020-05-18T12:49:14.000Z | 2020-12-01T15:13:43.000Z | scripts/image_tools/images/regular_image.py | victorhu3/webots | 60d173850f0b4714c500db004e69f2df8cfb9e8a | [
"Apache-2.0"
] | 1 | 2022-02-25T12:34:18.000Z | 2022-02-25T12:34:18.000Z | # Copyright 1996-2020 Cyberbotics Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | 31.761194 | 79 | 0.620301 |
f36531c3b029fed19df10a69ca90823adfde4c39 | 11,808 | py | Python | tensorflow_similarity/callbacks.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | 1 | 2021-09-14T09:23:10.000Z | 2021-09-14T09:23:10.000Z | tensorflow_similarity/callbacks.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | null | null | null | tensorflow_similarity/callbacks.py | phillips96/similarity | 3794f288f17f47f1f90b5368e5c0eeac1e81e10d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The TensorFlow Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | 37.967846 | 110 | 0.618733 |
c6d782c6dc63f90f6d85ae42a3ed6aa61dcc781b | 2,377 | py | Python | src/ralph/api/tests/api.py | angry-tony/cmdb-ralph | eb2ad2212a133025b698eb48e379c0bfe14cace0 | [
"Apache-2.0"
] | null | null | null | src/ralph/api/tests/api.py | angry-tony/cmdb-ralph | eb2ad2212a133025b698eb48e379c0bfe14cace0 | [
"Apache-2.0"
] | null | null | null | src/ralph/api/tests/api.py | angry-tony/cmdb-ralph | eb2ad2212a133025b698eb48e379c0bfe14cace0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf.urls import include, url
from ralph.api import RalphAPISerializer, RalphAPIViewSet
from ralph.api.fields import StrField
from ralph.api.routers import RalphRouter
from ralph.tests.models import Bar, Car, Foo, Manufacturer
class FooSerializer(RalphAPISerializer):
__str__ =... | 25.287234 | 79 | 0.674379 |
aa3a712d75a6cc17b57ad5ef109b3c1c9741d65d | 4,006 | py | Python | mopidy_tidal/search.py | quodrum-glas/mopidy-tidal | 5e00e080c8447f616f9118da53c47e11ef13a512 | [
"Apache-2.0"
] | 2 | 2020-12-11T16:15:10.000Z | 2021-03-03T21:04:07.000Z | mopidy_tidal/search.py | quodrum-glas/mopidy-tidal | 5e00e080c8447f616f9118da53c47e11ef13a512 | [
"Apache-2.0"
] | null | null | null | mopidy_tidal/search.py | quodrum-glas/mopidy-tidal | 5e00e080c8447f616f9118da53c47e11ef13a512 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
import logging
from threading import Thread
from mopidy_tidal.lru_cache import SearchCache
from mopidy_tidal.full_models_mappers import create_mopidy_albums, \
create_mopidy_artists, create_mopidy_tracks
from mopidy_tidal.utils import remove_watermark, catch
logger = lo... | 36.09009 | 78 | 0.57314 |
baa99085dbea39f61c464bc776cfa74a0dbce41f | 309 | py | Python | djangocms_blog/liveblog/routing.py | Python-Marketing/django-content-server | 16794265c44152a86f99b8548c8e1cb8c890f51a | [
"CC0-1.0"
] | null | null | null | djangocms_blog/liveblog/routing.py | Python-Marketing/django-content-server | 16794265c44152a86f99b8548c8e1cb8c890f51a | [
"CC0-1.0"
] | null | null | null | djangocms_blog/liveblog/routing.py | Python-Marketing/django-content-server | 16794265c44152a86f99b8548c8e1cb8c890f51a | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from channels.routing import URLRouter
from django.urls import path
from .consumers import LiveblogConsumer
channel_routing = URLRouter([
path('<str:apphook>/<str:lang>/<str:post>/', LiveblogConsumer),
])
| 25.75 | 72 | 0.763754 |
c609b00d9781100adbf1f8662c527ea9e17da4e2 | 164,711 | py | Python | salt/cloud/clouds/vmware.py | vveliev-tc/salt | 899ed0046c4d05417edf26e28a30b9969c0e3253 | [
"Apache-2.0"
] | null | null | null | salt/cloud/clouds/vmware.py | vveliev-tc/salt | 899ed0046c4d05417edf26e28a30b9969c0e3253 | [
"Apache-2.0"
] | null | null | null | salt/cloud/clouds/vmware.py | vveliev-tc/salt | 899ed0046c4d05417edf26e28a30b9969c0e3253 | [
"Apache-2.0"
] | null | null | null | # pylint: disable=C0302
"""
VMware Cloud Module
===================
.. versionadded:: 2015.5.4
The VMware cloud module allows you to manage VMware ESX, ESXi, and vCenter.
See :ref:`Getting started with VMware <cloud-getting-started-vmware>` to get started.
:codeauthor: Nitin Madhok <nmadhok@g.clemson.edu>
Depende... | 34.545092 | 130 | 0.604264 |
865490713b8a7965188f69d1a45621c23b7ebf0d | 3,177 | py | Python | .buildbot/master/master.py | TCKACHIKSIS/lms | fd06eb7a2baa9b9f82caa5223c86ba500f88333c | [
"MIT"
] | 8 | 2021-02-09T12:15:27.000Z | 2022-03-14T07:41:02.000Z | .buildbot/master/master.py | TCKACHIKSIS/lms | fd06eb7a2baa9b9f82caa5223c86ba500f88333c | [
"MIT"
] | 70 | 2021-04-14T12:45:17.000Z | 2021-08-04T04:51:34.000Z | .buildbot/master/master.py | TCKACHIKSIS/lms | fd06eb7a2baa9b9f82caa5223c86ba500f88333c | [
"MIT"
] | 3 | 2021-08-03T08:22:01.000Z | 2022-02-27T23:20:05.000Z | # -*- python -*-
# ex: set filetype=python:
from buildbot.plugins import *
c = BuildmasterConfig = dict()
c['buildbotNetUsageData'] = 'basic'
repository_url = 'git://github.com/mesenev/lms.git'
c['workers'] = [
worker.Worker("lms-worker-main", "pass"),
worker.Worker("lms-worker-pr", "pass"),
worker.Worke... | 39.7125 | 117 | 0.684608 |
33ff96dad5df736c4f9957f659d0275be19c81cf | 1,034 | py | Python | chdnext_bench_commands/commands/chdtranslate.py | chdcomputers/chdnext_bench_commands | 472802245bf8f2b2d105f231b3159617643a9f73 | [
"MIT"
] | null | null | null | chdnext_bench_commands/commands/chdtranslate.py | chdcomputers/chdnext_bench_commands | 472802245bf8f2b2d105f231b3159617643a9f73 | [
"MIT"
] | null | null | null | chdnext_bench_commands/commands/chdtranslate.py | chdcomputers/chdnext_bench_commands | 472802245bf8f2b2d105f231b3159617643a9f73 | [
"MIT"
] | null | null | null | """ChD Computers bench translate commands"""
from __future__ import unicode_literals, absolute_import, print_function
import click
import frappe
from frappe.commands import pass_context, get_site
from frappe.exceptions import SiteNotSpecifiedError
@click.command("chd-getallcodefiles")
@pass_context
def chd_getallcodef... | 29.542857 | 89 | 0.786267 |
ee0977f35280527273e3df3d4263b0a12cebe20a | 3,442 | py | Python | nxbender/sslconn.py | jeanlego/nxBender | 48b066d93d615b8171aa0b6967deca4f53c51f3c | [
"BSD-3-Clause"
] | null | null | null | nxbender/sslconn.py | jeanlego/nxBender | 48b066d93d615b8171aa0b6967deca4f53c51f3c | [
"BSD-3-Clause"
] | null | null | null | nxbender/sslconn.py | jeanlego/nxBender | 48b066d93d615b8171aa0b6967deca4f53c51f3c | [
"BSD-3-Clause"
] | null | null | null | import ssl
import socket
import hashlib
import struct
import logging
import sys
import os
class SSLConnection(object):
def __init__(self, options, host, port):
self.options = options
sock = socket.socket()
sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
sock.connect((hos... | 29.169492 | 123 | 0.536316 |
c32b518a7fddaa95765aa26a50dcf54179fdb155 | 469 | py | Python | betterletter/strings.py | alexpovel/subalt | eee633f29a5c1ecd2e6d5efa22d8cd361c3ffe78 | [
"MIT"
] | null | null | null | betterletter/strings.py | alexpovel/subalt | eee633f29a5c1ecd2e6d5efa22d8cd361c3ffe78 | [
"MIT"
] | null | null | null | betterletter/strings.py | alexpovel/subalt | eee633f29a5c1ecd2e6d5efa22d8cd361c3ffe78 | [
"MIT"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
def cf_contains(element: str, string: str) -> bool:
"""Casefold (aka 'strong `lower()`') check if a substring is in a larger string.
Args:
element: The shorter string to be tested for containment in `string`.
string: The larger string.
... | 27.588235 | 84 | 0.682303 |
f7edcce1d97c92e62f57f3974f5c5c27b64ee106 | 2,014 | py | Python | samples/model-builder/create_training_pipeline_tabular_regression_sample.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | 180 | 2020-09-23T17:21:15.000Z | 2022-03-30T17:25:47.000Z | samples/model-builder/create_training_pipeline_tabular_regression_sample.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | 601 | 2020-09-23T16:23:44.000Z | 2022-03-31T19:08:23.000Z | samples/model-builder/create_training_pipeline_tabular_regression_sample.py | sakagarwal/python-aiplatform | 62b4a1ea589235910c6e87f027899a29bf1bacb1 | [
"Apache-2.0"
] | 109 | 2020-09-23T16:22:04.000Z | 2022-03-28T21:18:29.000Z | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 33.016393 | 76 | 0.755214 |
a9d57889c229da4bff878105a3bd9c488d457746 | 104,194 | py | Python | tensorflow/python/ops/nn_ops.py | sjawabidgely/tensorflow | 6e5b295111c188cc05bb3c51efe920a4fbe93b03 | [
"Apache-2.0"
] | 22 | 2018-01-13T14:52:47.000Z | 2018-07-05T01:00:28.000Z | tensorflow/python/ops/nn_ops.py | sjawabidgely/tensorflow | 6e5b295111c188cc05bb3c51efe920a4fbe93b03 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/ops/nn_ops.py | sjawabidgely/tensorflow | 6e5b295111c188cc05bb3c51efe920a4fbe93b03 | [
"Apache-2.0"
] | 3 | 2018-01-20T06:47:34.000Z | 2018-05-07T19:14:34.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.02126 | 161 | 0.667841 |
95a409232fe9c26fb7e34eeb1df6f0784e15933e | 3,587 | py | Python | symbl/telephony_api/TelephonyApi.py | mountaincode2/symbl-python | c46f3eac5d92be50e7ecb92b782619544a5af58e | [
"Apache-2.0"
] | 4 | 2021-09-25T15:25:00.000Z | 2022-01-11T14:05:56.000Z | symbl/telephony_api/TelephonyApi.py | mountaincode2/symbl-python | c46f3eac5d92be50e7ecb92b782619544a5af58e | [
"Apache-2.0"
] | 1 | 2021-11-25T11:12:10.000Z | 2021-11-25T11:12:10.000Z | symbl/telephony_api/TelephonyApi.py | mountaincode2/symbl-python | c46f3eac5d92be50e7ecb92b782619544a5af58e | [
"Apache-2.0"
] | 3 | 2021-08-23T06:33:55.000Z | 2022-01-11T14:05:59.000Z | from symbl.Connection import Connection
from symbl.telephony_api.TelephonyValidators import validateActions, validateEndpoint
from symbl_rest import ConnectionToEndpointApi as telephony_api_rest
from symbl.utils.Helper import initialize_api_client
class TelephonyApi():
def __init__(self):
'''
It... | 34.490385 | 204 | 0.588793 |
33e0693656549de2355e39c32987ed613098f7b8 | 53 | py | Python | napari/layers/shapes/__init__.py | OKaluza/napari | 95a6afbbdb54a530b1eaca23037b8f98c7c8b064 | [
"BSD-3-Clause"
] | null | null | null | napari/layers/shapes/__init__.py | OKaluza/napari | 95a6afbbdb54a530b1eaca23037b8f98c7c8b064 | [
"BSD-3-Clause"
] | 4 | 2019-12-08T20:20:44.000Z | 2020-01-16T21:57:33.000Z | napari/layers/shapes/__init__.py | OKaluza/napari | 95a6afbbdb54a530b1eaca23037b8f98c7c8b064 | [
"BSD-3-Clause"
] | null | null | null | from .shapes import Shapes
from . import keybindings
| 17.666667 | 26 | 0.811321 |
60bed5d0662183d0ab50c7d81315aead49b3337a | 4,285 | py | Python | i3pystatus/tools/setting_util.py | juliushaertl/i3pystatus | e2a0097316734b253af841b6cd6dbf01cc3e647c | [
"MIT"
] | null | null | null | i3pystatus/tools/setting_util.py | juliushaertl/i3pystatus | e2a0097316734b253af841b6cd6dbf01cc3e647c | [
"MIT"
] | null | null | null | i3pystatus/tools/setting_util.py | juliushaertl/i3pystatus | e2a0097316734b253af841b6cd6dbf01cc3e647c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import glob
import inspect
import os
import getpass
import sys
import signal
import pkgutil
from collections import defaultdict, OrderedDict
import keyring
import i3pystatus
from i3pystatus import Module, SettingsBase
from i3pystatus.core import ClassFinder
def signal_handler(signal, frame):
... | 31.740741 | 108 | 0.629172 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.