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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b42fb1dd536d22723ae90ddff8288dfe9cda8bbe | 219 | py | Python | blog/models.py | rpopov94/portfolio-project | 60e3c59e41dee1dff314727b8071c7c041fad9f8 | [
"Apache-2.0"
] | null | null | null | blog/models.py | rpopov94/portfolio-project | 60e3c59e41dee1dff314727b8071c7c041fad9f8 | [
"Apache-2.0"
] | null | null | null | blog/models.py | rpopov94/portfolio-project | 60e3c59e41dee1dff314727b8071c7c041fad9f8 | [
"Apache-2.0"
] | null | null | null | from django.db import models
class Blog(models.Model):
title = models.CharField(max_length=200)
description = models.TextField()
date = models.DateField()
def __str__(self):
return self.title | 21.9 | 44 | 0.689498 |
d045996d2ac27ed41f3ba7f9dde8752714a9ddc2 | 519 | py | Python | objectModel/Python/cdm/utilities/import_info.py | rt112000/CDM | 34bd34f9260140a8f8aa02bd87c23033f3daad4c | [
"CC-BY-4.0",
"MIT"
] | 884 | 2019-05-10T02:09:10.000Z | 2022-03-31T14:02:00.000Z | objectModel/Python/cdm/utilities/import_info.py | spbast/CDM | bf97a3720c97ee4c9df3625084cf8b3bc65ff9c7 | [
"CC-BY-4.0",
"MIT"
] | 171 | 2019-06-10T11:34:37.000Z | 2022-03-31T22:50:12.000Z | objectModel/Python/cdm/utilities/import_info.py | spbast/CDM | bf97a3720c97ee4c9df3625084cf8b3bc65ff9c7 | [
"CC-BY-4.0",
"MIT"
] | 340 | 2019-05-07T18:00:16.000Z | 2022-03-31T12:00:15.000Z | # Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
class ImportInfo:
"""Contains information about an import in the imports pririty map."""
def __init__(self, priority: int, is_moniker: bool):
# Th... | 37.071429 | 94 | 0.714836 |
693f45705fdbe0a59ca0f04322f18881b1b8db78 | 1,857 | py | Python | share/qt/extract_strings_qt.py | emixil/emixil | 7cc0833f5290541d29eaf7fe5be3341235212512 | [
"MIT"
] | null | null | null | share/qt/extract_strings_qt.py | emixil/emixil | 7cc0833f5290541d29eaf7fe5be3341235212512 | [
"MIT"
] | null | null | null | share/qt/extract_strings_qt.py | emixil/emixil | 7cc0833f5290541d29eaf7fe5be3341235212512 | [
"MIT"
] | 20 | 2021-02-10T06:55:21.000Z | 2021-02-23T21:02:43.000Z | #!/usr/bin/python
'''
Extract _("...") strings for translation and convert to Qt4 stringdefs so that
they can be picked up by Qt linguist.
'''
from subprocess import Popen, PIPE
import glob
import operator
import os
import sys
OUT_CPP="qt/emixilstrings.cpp"
EMPTY=['""']
def parse_po(text):
"""
Parse 'po' form... | 23.506329 | 79 | 0.5972 |
a7fa57dd922ffb1c2cd5e115642b41ec755f38c1 | 7,372 | py | Python | data/external/repositories/154909/march_madness-master/team.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories/154909/march_madness-master/team.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | null | null | null | data/external/repositories/154909/march_madness-master/team.py | Keesiu/meta-kaggle | 87de739aba2399fd31072ee81b391f9b7a63f540 | [
"MIT"
] | 1 | 2019-12-04T08:23:33.000Z | 2019-12-04T08:23:33.000Z | """
The polls that have the most data, in order
"SAG" "12" "6114.0"
"MOR" "12" "6031.5"
"POM" "12" "5823.91666666667"
"WLK" "12" "4862.16666666667"
"BOB" "12" "4700.25"
"DOL" "12" "4594.16666666667"
"COL" "12" "4252.08333333333"
"RPI" "12" "4039.0"
"WOL" "12" "3966.58333333333"
"RTH" "12" "3922.0"
"USA" "12" "454.66666... | 32.475771 | 120 | 0.504748 |
a1dbbf1ee9431d76d12bd8437d5b4556679ddc66 | 1,496 | py | Python | stacks-and-queues/python/stack_of_plates.py | DatGreekChick/ctci | b165bd529fe3ca32cc5c95ea274080bd5689501d | [
"MIT"
] | null | null | null | stacks-and-queues/python/stack_of_plates.py | DatGreekChick/ctci | b165bd529fe3ca32cc5c95ea274080bd5689501d | [
"MIT"
] | null | null | null | stacks-and-queues/python/stack_of_plates.py | DatGreekChick/ctci | b165bd529fe3ca32cc5c95ea274080bd5689501d | [
"MIT"
] | null | null | null | # 3.3: Stack of Plates
from stack import Node
# Runtime: O(1) - Space: O(1)
class StackInfo:
def __init__(self):
self.capacity = 3
self.size = 0
self.top = None
class SetOfStacks:
def __init__(self):
self.stacks = []
def print(self):
for idx, stack in enumerate(s... | 21.070423 | 83 | 0.550802 |
df008425b89b2749e4f23a8d6b6eec6145ebe308 | 3,735 | py | Python | src/apps/user_operation/serializers.py | fuxinhan/worker | 7e8fb8dd2e0210bf12d9fd9290805d00ad895e09 | [
"MIT"
] | null | null | null | src/apps/user_operation/serializers.py | fuxinhan/worker | 7e8fb8dd2e0210bf12d9fd9290805d00ad895e09 | [
"MIT"
] | null | null | null | src/apps/user_operation/serializers.py | fuxinhan/worker | 7e8fb8dd2e0210bf12d9fd9290805d00ad895e09 | [
"MIT"
] | null | null | null | from datetime import datetime, timedelta
from rest_framework import serializers
from rest_framework.validators import UniqueTogetherValidator
from .models import UserEnroll, SalesInfo, UserFavoriteCourse, UserCourse
from .models import UserDeadline, UserFavoriteOrg, UserFavoriteSketch
from courses.serializers import ... | 28.730769 | 126 | 0.65328 |
4c2cd760704ab81ae22ce54c1aa7f099a4ec141e | 108 | py | Python | fileupload/admin.py | myacera100/ai-django-fileupload | 25c0cbd10c93a4556cec82cc5ccaf3e21e0335ec | [
"MIT"
] | 1 | 2017-11-06T14:55:28.000Z | 2017-11-06T14:55:28.000Z | fileupload/admin.py | myacera100/ai-django-fileupload | 25c0cbd10c93a4556cec82cc5ccaf3e21e0335ec | [
"MIT"
] | 1 | 2017-11-06T14:55:24.000Z | 2017-11-06T14:55:24.000Z | fileupload/admin.py | myacera100/ai-django-fileupload | 25c0cbd10c93a4556cec82cc5ccaf3e21e0335ec | [
"MIT"
] | 1 | 2021-04-05T03:41:25.000Z | 2021-04-05T03:41:25.000Z | from fileupload.models import Attachment
from django.contrib import admin
admin.site.register(Attachment)
| 18 | 40 | 0.842593 |
51d19799412ffe877815b7e7705d82e9eec15e1e | 666 | py | Python | PyUdemy/Day10/DaysInMoth.py | JoseArtur/phyton-exercices | f3da4447044e445222233960f991fb2e36311131 | [
"MIT"
] | null | null | null | PyUdemy/Day10/DaysInMoth.py | JoseArtur/phyton-exercices | f3da4447044e445222233960f991fb2e36311131 | [
"MIT"
] | null | null | null | PyUdemy/Day10/DaysInMoth.py | JoseArtur/phyton-exercices | f3da4447044e445222233960f991fb2e36311131 | [
"MIT"
] | null | null | null | def is_leap(year):
if year % 4 == 0:
if year % 100 == 0:
if year % 400 == 0:
return("Leap year.")
else:
return("Not leap year.")
else:
return("Leap year.")
else:
return("Not leap year.")
def days_in_month(year,month):
month_days = [31, 28, 31, 30, 31, 30, 31, 31... | 22.2 | 65 | 0.582583 |
49ead08d68781124b61c2a0d1621659f11ca3922 | 1,556 | py | Python | var/spack/repos/builtin/packages/r-distributional/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/r-distributional/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/r-distributional/package.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 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 RDistributional(RPackage):
"""Functions for Base Types and Core R and 'Tidyverse' Features... | 44.457143 | 95 | 0.71144 |
18431c465aba5d45966a5e7ab4f24ffab6bd0bfd | 983 | py | Python | tests/entrypoints/test_fix_command.py | HiteshMah-Jan/thefuck | 132c62262246824470934c2c6f46919ef6f00203 | [
"MIT"
] | 75,504 | 2015-04-08T18:22:19.000Z | 2022-03-31T23:59:52.000Z | tests/entrypoints/test_fix_command.py | parulgarg123/thefuck | d10fc80fa5da5724ec945aec12720ef41be9551f | [
"MIT"
] | 1,160 | 2015-04-17T18:47:12.000Z | 2022-03-30T20:42:26.000Z | tests/entrypoints/test_fix_command.py | parulgarg123/thefuck | d10fc80fa5da5724ec945aec12720ef41be9551f | [
"MIT"
] | 4,399 | 2015-04-17T18:36:04.000Z | 2022-03-31T07:01:03.000Z | import pytest
from mock import Mock
from thefuck.entrypoints.fix_command import _get_raw_command
class TestGetRawCommand(object):
def test_from_force_command_argument(self):
known_args = Mock(force_command=['git', 'brunch'])
assert _get_raw_command(known_args) == ['git', 'brunch']
def test_fr... | 36.407407 | 64 | 0.62767 |
df6b621271700b8f6ca72d2fdb40f4fe37f62a64 | 5,681 | py | Python | ixnetwork_restpy/testplatform/sessions/ixnetwork/globals/topology/tlveditor/restriction_e362d0ce9d693ee94a071e4f973da1d3.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | ixnetwork_restpy/testplatform/sessions/ixnetwork/globals/topology/tlveditor/restriction_e362d0ce9d693ee94a071e4f973da1d3.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | ixnetwork_restpy/testplatform/sessions/ixnetwork/globals/topology/tlveditor/restriction_e362d0ce9d693ee94a071e4f973da1d3.py | Vibaswan/ixnetwork_restpy | 239fedc7050890746cbabd71ea1e91c68d9e5cad | [
"MIT"
] | null | null | null | # MIT LICENSE
#
# Copyright 1997 - 2020 by IXIA Keysight
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify,... | 38.385135 | 172 | 0.676993 |
9f8b9a64a82f765eb41c7861aeb24f2e136a2dfd | 2,242 | py | Python | utest/usages/test_resource_usages.py | veryl-technologies/t24-tests-ide | 16cd803895916a785c0e1fec3f71f9388c21edc9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-06-27T08:48:24.000Z | 2019-06-27T08:48:24.000Z | utest/usages/test_resource_usages.py | veryl-technologies/t24-tests-ide | 16cd803895916a785c0e1fec3f71f9388c21edc9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | utest/usages/test_resource_usages.py | veryl-technologies/t24-tests-ide | 16cd803895916a785c0e1fec3f71f9388c21edc9 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | import unittest
import datafilereader
from robot.utils.asserts import assert_equals
from robotide.usages.commands import FindResourceUsages
class ResourceUsageTests(unittest.TestCase):
# NOTE! The data is shared among tests
# This is for performance reasons but be warned when you add tests!
@classmethod
... | 40.763636 | 118 | 0.711864 |
59d7d2667eed71f55f7bf8d92cce87447657a097 | 806 | py | Python | garbevents/settings.py | QingTian203/garbevents | b3a5e8b3a08ae9a197ae0c17d78acf53b1cc4350 | [
"MIT"
] | 74 | 2020-07-09T13:55:08.000Z | 2022-03-29T07:11:00.000Z | garbevents/settings.py | wuzhiqiang15/garbevents | 76cd28ea0db8364b8e5ef2c6523f630f97a92f12 | [
"MIT"
] | 10 | 2020-08-19T06:42:10.000Z | 2022-03-16T10:46:25.000Z | garbevents/settings.py | wuzhiqiang15/garbevents | 76cd28ea0db8364b8e5ef2c6523f630f97a92f12 | [
"MIT"
] | 25 | 2020-07-14T11:01:01.000Z | 2022-03-17T11:06:18.000Z | # -*- coding: utf-8 -*-
"""
Parameter initialization is a global variable by default. When calling the relevant API,
you need to inherit the setting class and set the corresponding parameters.
"""
class Settings(object):
"""
# 埋点上传url
ST.url = 'https://www.baidu.com/'
# 报告生成路径
ST.report_path = '... | 24.424242 | 101 | 0.619107 |
51f48b69f5a97792ed83236058b2281a9436bf6c | 1,221 | py | Python | parsec/commands/workflows/extract_workflow_from_history.py | erasche/parsec | c2f1bda7ff776f9aa121c7b94d62e3da2fad93f6 | [
"Apache-2.0"
] | 8 | 2015-03-27T17:09:15.000Z | 2021-07-13T15:33:02.000Z | parsec/commands/workflows/extract_workflow_from_history.py | erasche/parsec | c2f1bda7ff776f9aa121c7b94d62e3da2fad93f6 | [
"Apache-2.0"
] | 30 | 2015-02-27T21:21:47.000Z | 2021-08-31T14:19:55.000Z | parsec/commands/workflows/extract_workflow_from_history.py | erasche/parsec | c2f1bda7ff776f9aa121c7b94d62e3da2fad93f6 | [
"Apache-2.0"
] | 12 | 2017-06-01T03:49:23.000Z | 2021-07-13T15:33:06.000Z | import click
from parsec.cli import pass_context, json_loads
from parsec.decorators import custom_exception, json_output
@click.command('extract_workflow_from_history')
@click.argument("history_id", type=str)
@click.argument("workflow_name", type=str)
@click.option(
"--job_ids",
help="Optional list of job IDs... | 32.131579 | 177 | 0.763309 |
0be3913cc496bbe3ff38ff949b6ab64e88c44e6c | 219 | py | Python | configs/train_classifier/td_chexpert/td_chexpert_bce_50.py | CAMP-eXplain-AI/imba-explain | e41b4ca5de63955cb0e925aad9599f38c5a3e973 | [
"MIT"
] | null | null | null | configs/train_classifier/td_chexpert/td_chexpert_bce_50.py | CAMP-eXplain-AI/imba-explain | e41b4ca5de63955cb0e925aad9599f38c5a3e973 | [
"MIT"
] | null | null | null | configs/train_classifier/td_chexpert/td_chexpert_bce_50.py | CAMP-eXplain-AI/imba-explain | e41b4ca5de63955cb0e925aad9599f38c5a3e973 | [
"MIT"
] | null | null | null | _base_ = [
'../../_base_/classifiers/truncated_densenet.py', '../../_base_/datasets/chexpert_class_dataset.py',
'../../_base_/losses/bce.py', '../../_base_/schedules/50e.py'
]
classifier = dict(num_classes=14)
| 31.285714 | 104 | 0.6621 |
1d0e88e725777210dd8d92f72a7b3027e0ff6a17 | 1,993 | py | Python | api/mako/models.py | erik-sn/mako | f64644dacb132b0063805ccafc3f485bdb62595b | [
"MIT"
] | null | null | null | api/mako/models.py | erik-sn/mako | f64644dacb132b0063805ccafc3f485bdb62595b | [
"MIT"
] | 12 | 2020-02-11T23:12:23.000Z | 2022-02-26T13:08:40.000Z | api/mako/models.py | erik-sn/mako | f64644dacb132b0063805ccafc3f485bdb62595b | [
"MIT"
] | 2 | 2018-08-10T08:14:31.000Z | 2018-10-01T16:46:37.000Z | from django.db import models
from django.contrib.postgres.fields import ArrayField
FILE_EXTENSIONS = ['.txt', '.dat', '.db', '.log', '.mbd', '.sql', '.xml',\
'.py', '.c', '.cpp', '.m', '.txt', '.bat', '.bin', '.exe',\
'.jar', '.wsf', '.cgi', '.apk', '.com', '.html', '.css',\
... | 32.145161 | 101 | 0.60863 |
8338ca409c68b767a941bc11fed7f6a9d738fc72 | 36,085 | py | Python | unfurl/unfurl/configurator.py | cybercur4/unfurl | 39ba274ae50c64c176da5df45ca0cfe03eeb67a1 | [
"MIT"
] | 1 | 2022-01-15T07:17:36.000Z | 2022-01-15T07:17:36.000Z | unfurl/configurator.py | Md-Danish-eng/unfurl | a081657afbd1128e58f95d75ed8cdbdfff2dfe3f | [
"MIT"
] | null | null | null | unfurl/configurator.py | Md-Danish-eng/unfurl | a081657afbd1128e58f95d75ed8cdbdfff2dfe3f | [
"MIT"
] | null | null | null | # Copyright (c) 2020 Adam Souzis
# SPDX-License-Identifier: MIT
import six
from collections.abc import Mapping, MutableSequence
import os
import copy
from .support import Status, ResourceChanges, Priority, TopologyMap
from .result import (
serialize_value,
ChangeAware,
Results,
ResultsMap,
get_diges... | 36.746436 | 308 | 0.60291 |
92a4ed9d1b02b073a82d4945184f91a19b59ee57 | 571 | py | Python | main.py | Rajmeet/Image-to-Speech | b91d37c9133711818f167971f0e690557c83e2e2 | [
"MIT"
] | null | null | null | main.py | Rajmeet/Image-to-Speech | b91d37c9133711818f167971f0e690557c83e2e2 | [
"MIT"
] | null | null | null | main.py | Rajmeet/Image-to-Speech | b91d37c9133711818f167971f0e690557c83e2e2 | [
"MIT"
] | null | null | null | # **** IMPORTING **** #
import cv2
import os
from gtts import gTTS
from PIL import Image
import pytesseract
pytesseract.pytesseract.tesseract_cmd = (r"C:\Program Files\Tesseract-OCR\tesseract.exe")
# **** CONVERSION **** #
def ImageConversionToText(file):
img = cv2.imread(file)
text = pytesseract.... | 21.961538 | 90 | 0.646235 |
fbbed3a6b82ed01347855b5bca7de426e9f43e08 | 45,919 | py | Python | sphinx/domains/std.py | eamanu/sphinx | 8f184e07bbc47228e18fa63e6746bc894816fd88 | [
"BSD-2-Clause"
] | null | null | null | sphinx/domains/std.py | eamanu/sphinx | 8f184e07bbc47228e18fa63e6746bc894816fd88 | [
"BSD-2-Clause"
] | 7 | 2021-03-30T14:10:56.000Z | 2022-03-12T00:43:13.000Z | virtual/lib/python3.6/site-packages/sphinx/domains/std.py | Mercy-Njoroge/blog | 404336fb0fc8d172ddde8b744042cb3f37d89c65 | [
"MIT"
] | null | null | null | """
sphinx.domains.std
~~~~~~~~~~~~~~~~~~
The standard domain.
:copyright: Copyright 2007-2020 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import unicodedata
import warnings
from copy import copy
from typing import Any, Callable, Dict, Iterable, Iterator... | 41.555656 | 114 | 0.564385 |
77eb230cba94a665d1c411c10f0b81b9edece1be | 5,093 | py | Python | conary_test/optionstest.py | sassoftware/conary | d418968acd5e11ee17ed6d91ca395ea10a040222 | [
"Apache-2.0"
] | 43 | 2015-03-31T01:37:10.000Z | 2021-11-14T16:26:48.000Z | conary_test/optionstest.py | sassoftware/conary | d418968acd5e11ee17ed6d91ca395ea10a040222 | [
"Apache-2.0"
] | 9 | 2015-06-10T16:39:41.000Z | 2020-01-27T16:35:01.000Z | conary_test/optionstest.py | sassoftware/conary | d418968acd5e11ee17ed6d91ca395ea10a040222 | [
"Apache-2.0"
] | 9 | 2015-04-07T08:12:37.000Z | 2020-01-26T09:54:18.000Z | #
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 42.798319 | 142 | 0.609464 |
eaee2287027fce5d45ecad25e510bc7a1c234461 | 34 | py | Python | ddlogger/__init__.py | kkew3/dot-dot-logger | 31620e2137c5a2dbdcf7bb46dd91555c51b64c81 | [
"MIT"
] | null | null | null | ddlogger/__init__.py | kkew3/dot-dot-logger | 31620e2137c5a2dbdcf7bb46dd91555c51b64c81 | [
"MIT"
] | null | null | null | ddlogger/__init__.py | kkew3/dot-dot-logger | 31620e2137c5a2dbdcf7bb46dd91555c51b64c81 | [
"MIT"
] | null | null | null | from ddlogger import DotDotLogger
| 17 | 33 | 0.882353 |
8263a462d8fa970f4276b8a7e67b4f39cd4f4dcc | 3,874 | py | Python | AI_run.py | ManuelSerranoR/Deep-Driving | c14bc9596704cd33529b8cb30b345eda4ee30432 | [
"MIT"
] | 1 | 2022-02-22T08:03:12.000Z | 2022-02-22T08:03:12.000Z | AI_run.py | ManuelSerranoR/Deep-Driving | c14bc9596704cd33529b8cb30b345eda4ee30432 | [
"MIT"
] | null | null | null | AI_run.py | ManuelSerranoR/Deep-Driving | c14bc9596704cd33529b8cb30b345eda4ee30432 | [
"MIT"
] | null | null | null | import socket
import sys
import getopt
import math
import os
import cv2
import time
import mss
import mss.tools
import random
import pandas as pd
import numpy as np
from PIL import Image
import pickle
import pyautogui
from skimage import transform #For downsizing images
import tensorflow as tf
sys.path.append('/home/ca... | 33.982456 | 91 | 0.655653 |
2ba43113c42a149f08a26bf3d80a20f5b56d6f53 | 28,800 | py | Python | test/python/test_attribute/test_attributes.py | ritvik06/Higra | 5ab1601224cd5a3af5143ce380125fdfff1bde66 | [
"CECILL-B"
] | 64 | 2019-08-18T19:23:23.000Z | 2022-03-21T04:15:04.000Z | test/python/test_attribute/test_attributes.py | ritvik06/Higra | 5ab1601224cd5a3af5143ce380125fdfff1bde66 | [
"CECILL-B"
] | 120 | 2019-08-16T09:10:35.000Z | 2022-03-17T09:42:58.000Z | test/python/test_attribute/test_attributes.py | ritvik06/Higra | 5ab1601224cd5a3af5143ce380125fdfff1bde66 | [
"CECILL-B"
] | 12 | 2019-10-04T07:35:55.000Z | 2021-01-10T19:59:11.000Z | ############################################################################
# Copyright ESIEE Paris (2018) #
# #
# Contributor(s) : Benjamin Perret #
# ... | 42.793462 | 142 | 0.513785 |
53e6e342c1b77e3539f650414a90bcb7ec4ead81 | 5,302 | py | Python | Peer_Node.py | ck-chaudhary/Auto-PUFChain-An-Automated-Interaction-Tool-for-PUFs-and-Blockchain-in-Electronic-Supply-Chain | e3916a5b3c4d66e437bc78c5f2e866dbebd04317 | [
"MIT"
] | null | null | null | Peer_Node.py | ck-chaudhary/Auto-PUFChain-An-Automated-Interaction-Tool-for-PUFs-and-Blockchain-in-Electronic-Supply-Chain | e3916a5b3c4d66e437bc78c5f2e866dbebd04317 | [
"MIT"
] | null | null | null | Peer_Node.py | ck-chaudhary/Auto-PUFChain-An-Automated-Interaction-Tool-for-PUFs-and-Blockchain-in-Electronic-Supply-Chain | e3916a5b3c4d66e437bc78c5f2e866dbebd04317 | [
"MIT"
] | null | null | null | # Code for Peer Node interfacing
import json
from web3 import Web3
import time
import os
import sys
node_url = 'HTTP://127.0.0.1:7545'
w3 = Web3(Web3.HTTPProvider(node_url))
print("connected = ",w3.isConnected())
w3.eth.defaultAccount = w3.eth.accounts[9]
print(w3.eth.blockNumber)
contract_address_file = open("co... | 50.018868 | 2,036 | 0.621275 |
c872803d7e248ff842d86669bd9fc9a80ff64c65 | 396,325 | py | Python | test/test_linalg.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 1 | 2022-01-20T03:49:23.000Z | 2022-01-20T03:49:23.000Z | test/test_linalg.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | 14 | 2021-10-14T06:58:50.000Z | 2021-12-17T11:51:07.000Z | test/test_linalg.py | vuanvin/pytorch | 9267fd8d7395074001ad7cf2a8f28082dbff6b0b | [
"Intel"
] | null | null | null | # -*- coding: utf-8 -*-
# Owner(s): ["module: linear algebra"]
import torch
import numpy as np
import unittest
import itertools
import warnings
import math
from math import inf, nan, isnan
import random
from random import randrange
from itertools import product
from functools import reduce, partial, wraps
from torch... | 47.373297 | 131 | 0.579734 |
66da6cd601c4d595ae01cc0548907f734fc9b68e | 957 | py | Python | cli/commands/command.py | collabinator/clivrt | 1a814bf41becf43b17c60e644e353f4196dceba8 | [
"Apache-2.0"
] | 1 | 2022-02-11T16:56:38.000Z | 2022-02-11T16:56:38.000Z | cli/commands/command.py | collabinator/clivrt | 1a814bf41becf43b17c60e644e353f4196dceba8 | [
"Apache-2.0"
] | 10 | 2022-02-02T05:23:25.000Z | 2022-02-18T20:58:42.000Z | cli/commands/command.py | collabinator/clivrt | 1a814bf41becf43b17c60e644e353f4196dceba8 | [
"Apache-2.0"
] | null | null | null | from configparser import ConfigParser
from distutils.command.config import config
import logging
from attrs import define
from cli.datamodel.session import Session
from cli.network.networkmanager import NetworkManager
@define
class Command:
cmd_name: str
config: ConfigParser
session: Session
... | 29.90625 | 74 | 0.650993 |
7d712107fe66dfb7d1dba32d7c5c488821cc7928 | 1,164 | py | Python | webStorm-APICloud/python_tools/Lib/test/test_netrc.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | 81 | 2017-03-13T08:24:01.000Z | 2021-04-02T09:48:38.000Z | webStorm-APICloud/python_tools/Lib/test/test_netrc.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | 6 | 2017-04-30T08:36:55.000Z | 2017-09-22T01:37:28.000Z | webStorm-APICloud/python_tools/Lib/test/test_netrc.py | zzr925028429/androidyianyan | 8967fdba92473e8e65ee222515dfc54cdae5bb0b | [
"MIT"
] | 41 | 2017-03-18T14:11:58.000Z | 2021-04-14T05:06:09.000Z |
import netrc, os, unittest, sys
from test import test_support
TEST_NETRC = """
machine foo login log1 password pass1 account acct1
macdef macro1
line1
line2
macdef macro2
line3
line4
default login log2 password pass2
"""
temp_filename = test_support.TESTFN
class NetrcTestCase(unittest.TestC... | 23.755102 | 77 | 0.565292 |
6394921455bdd45656c0d2323c7144b2c9aea58f | 409 | py | Python | main_crm/asgi.py | itsmohiful/customer-relationship-management | 33363af8a272e5fda85d72709f3cf5d4469f555d | [
"MIT"
] | null | null | null | main_crm/asgi.py | itsmohiful/customer-relationship-management | 33363af8a272e5fda85d72709f3cf5d4469f555d | [
"MIT"
] | null | null | null | main_crm/asgi.py | itsmohiful/customer-relationship-management | 33363af8a272e5fda85d72709f3cf5d4469f555d | [
"MIT"
] | null | null | null | """
ASGI config for main_crm project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault... | 24.058824 | 79 | 0.755501 |
fe29b8e5e7c80e5b0b1c6370135da47e66040e88 | 687 | py | Python | var/spack/repos/builtin/packages/py-contextvars/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-contextvars/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2021-11-09T20:28:40.000Z | 2022-03-15T03:26:33.000Z | var/spack/repos/builtin/packages/py-contextvars/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.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.package import *
class PyContextvars(PythonPackage):
"""This package implements a backport of Python 3.7... | 32.714286 | 93 | 0.736536 |
d8515968dcf0d9a19c01d8cfe2ff889a5f1f0fd4 | 152 | py | Python | vendimia/ventas/apps.py | soru13/vendimia | ebcf85473855e6f990b1a49574ac669fdd4d443e | [
"MIT"
] | null | null | null | vendimia/ventas/apps.py | soru13/vendimia | ebcf85473855e6f990b1a49574ac669fdd4d443e | [
"MIT"
] | 5 | 2020-02-11T23:26:24.000Z | 2022-01-13T00:39:54.000Z | vendimia/ventas/apps.py | soru13/vendimia | ebcf85473855e6f990b1a49574ac669fdd4d443e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps import AppConfig
class VentasConfig(AppConfig):
name = 'ventas'
| 16.888889 | 39 | 0.730263 |
d6b7cde0714cca573be9389088c8754d19ed5602 | 1,122 | py | Python | fundamentals/download/tests/test__fetch.py | mtbannister/fundamentals | f1ba77ded115c727432220e50b2e20d251b2e225 | [
"MIT"
] | null | null | null | fundamentals/download/tests/test__fetch.py | mtbannister/fundamentals | f1ba77ded115c727432220e50b2e20d251b2e225 | [
"MIT"
] | null | null | null | fundamentals/download/tests/test__fetch.py | mtbannister/fundamentals | f1ba77ded115c727432220e50b2e20d251b2e225 | [
"MIT"
] | null | null | null | import os
import nose2
import nose2
import unittest
import shutil
import yaml
from fundamentals.download import _fetch
from fundamentals.utKit import utKit
from fundamentals import tools
su = tools(
arguments={"settingsFile": None},
docString=__doc__,
logLevel="DEBUG",
options_first=False,
project... | 23.375 | 66 | 0.717469 |
f38f8ecaf1cf48deb5cd0adafa4a3d1028e5ebdd | 2,173 | py | Python | alipay/aop/api/domain/AlipayOpenMessagetestCesSendModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayOpenMessagetestCesSendModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayOpenMessagetestCesSendModel.py | snowxmas/alipay-sdk-python-all | 96870ced60facd96c5bce18d19371720cbda3317 | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.GavintestNewLeveaOne import GavintestNewLeveaOne
class AlipayOpenMessagetestCesSendModel(object):
def __init__(self):
self._cop = None
self._str = None
@... | 28.592105 | 78 | 0.519098 |
07a91e44c6e98c84ceddaba90e12c8ffdd30a323 | 2,022 | py | Python | rastervision/data/label_source/object_detection_geojson_source_config.py | AirbusAerial/raster-vision | cfa7826169392e497fb57a540eb952fc6cee3a98 | [
"Apache-2.0"
] | 2 | 2019-04-17T13:04:23.000Z | 2020-10-04T10:28:27.000Z | rastervision/data/label_source/object_detection_geojson_source_config.py | AirbusAerial/raster-vision | cfa7826169392e497fb57a540eb952fc6cee3a98 | [
"Apache-2.0"
] | null | null | null | rastervision/data/label_source/object_detection_geojson_source_config.py | AirbusAerial/raster-vision | cfa7826169392e497fb57a540eb952fc6cee3a98 | [
"Apache-2.0"
] | null | null | null | from copy import deepcopy
import rastervision as rv
from rastervision.data.label_source import (
LabelSourceConfig, LabelSourceConfigBuilder, ObjectDetectionGeoJSONSource)
from rastervision.protos.label_source_pb2 import LabelSourceConfig as LabelSourceConfigMsg
class ObjectDetectionGeoJSONSourceConfig(LabelSour... | 33.7 | 90 | 0.646884 |
0d912eb78233a40490ae11f3d34b738a50c05e0d | 8,400 | py | Python | white_box_attack.py | zeta1999/adversarial-robustness-by-design | 3c252a17685bea0ffa94a6e1bcc694915470da0e | [
"MIT"
] | 8 | 2021-01-08T10:56:47.000Z | 2021-06-08T07:58:14.000Z | white_box_attack.py | zeta1999/adversarial-robustness-by-design | 3c252a17685bea0ffa94a6e1bcc694915470da0e | [
"MIT"
] | null | null | null | white_box_attack.py | zeta1999/adversarial-robustness-by-design | 3c252a17685bea0ffa94a6e1bcc694915470da0e | [
"MIT"
] | 1 | 2021-05-04T09:41:49.000Z | 2021-05-04T09:41:49.000Z | import argparse
import numpy as np
import torch
from utils import get_model, compute_score, cifar10, cifar100, return_path_to_folder
class AdversarialAttack:
def __init__(self, model, dataset, n_epochs, step_size, opu_output, opu_input, pgd_attacks_iterations, binary_layer,
save_images, sign_bac... | 50 | 132 | 0.612381 |
c06695b572ea594fe782c5f5eba5162ae256bd11 | 94 | py | Python | 17 - Modules/Ex_111/exec111.py | o-Ian/Practice-Python | 1e4b2d0788e70006096a53a7cf038db3148ba4b7 | [
"MIT"
] | 4 | 2021-04-23T18:07:58.000Z | 2021-05-12T11:38:14.000Z | 17 - Modules/Ex_111/exec111.py | o-Ian/Practice-Python | 1e4b2d0788e70006096a53a7cf038db3148ba4b7 | [
"MIT"
] | null | null | null | 17 - Modules/Ex_111/exec111.py | o-Ian/Practice-Python | 1e4b2d0788e70006096a53a7cf038db3148ba4b7 | [
"MIT"
] | null | null | null | from utilidadesCeV.moeda import resumo
p = float(input('Digite o preço: '))
resumo(p, 80, 35)
| 23.5 | 38 | 0.723404 |
b503edd34a703f9584446125494b0cb75b8bd617 | 4,308 | py | Python | src/sage/combinat/root_system/type_G_affine.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 1,742 | 2015-01-04T07:06:13.000Z | 2022-03-30T11:32:52.000Z | src/sage/combinat/root_system/type_G_affine.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 66 | 2015-03-19T19:17:24.000Z | 2022-03-16T11:59:30.000Z | src/sage/combinat/root_system/type_G_affine.py | UCD4IDS/sage | 43474c96d533fd396fe29fe0782d44dc7f5164f7 | [
"BSL-1.0"
] | 495 | 2015-01-10T10:23:18.000Z | 2022-03-24T22:06:11.000Z | """
Root system data for (untwisted) type G affine
"""
#*****************************************************************************
# Copyright (C) 2008-2009 Daniel Bump
# Copyright (C) 2008-2009 Justin Walker
# Copyright (C) 2008-2009 Nicolas M. Thiery <nthiery at users.sf.net>,
#
# Distributed un... | 33.65625 | 91 | 0.481198 |
823e8bd09872e30562c3f0b59970c62ecd33a9da | 1,995 | py | Python | structural-probes/lpmayos_probes_experiments/analyze_results/add_mlm_perplexities.py | lpmayos/structural-probes | 05a0914ac55b45149057c120635834d7134c6986 | [
"Apache-2.0"
] | null | null | null | structural-probes/lpmayos_probes_experiments/analyze_results/add_mlm_perplexities.py | lpmayos/structural-probes | 05a0914ac55b45149057c120635834d7134c6986 | [
"Apache-2.0"
] | null | null | null | structural-probes/lpmayos_probes_experiments/analyze_results/add_mlm_perplexities.py | lpmayos/structural-probes | 05a0914ac55b45149057c120635834d7134c6986 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import os
from argparse import ArgumentParser
import json
import logging
import re
def add_perplexities(models_path, output_file, results_folder):
"""
"""
with open(output_file, 'r') as f:
results = json.load(f)
for i, run in results.items():
fo... | 36.944444 | 176 | 0.653133 |
74bd608c0b832030efb97f066ec59c5302eec660 | 4,087 | py | Python | platform/core/tests/test_ci/test_service.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | platform/core/tests/test_ci/test_service.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | platform/core/tests/test_ci/test_service.py | hackerwins/polyaxon | ff56a098283ca872abfbaae6ba8abba479ffa394 | [
"Apache-2.0"
] | null | null | null | import os
import shutil
import pytest
import ci
from db.models.build_jobs import BuildJob
from db.models.experiment_groups import ExperimentGroup
from db.models.experiments import Experiment
from db.models.jobs import Job
from factories.ci_factory import CIFactory
from factories.factory_projects import ProjectFactor... | 35.232759 | 83 | 0.654514 |
33d0f1685f9b917a7cf35cfda323ed0cbf6a7422 | 6,181 | py | Python | src/python/bcc/libbcc.py | sbilly/bcc | 52cd371306705c39ad8c06fef195f6c4cdebf664 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-04-30T05:05:53.000Z | 2021-04-30T05:05:53.000Z | src/python/bcc/libbcc.py | sbilly/bcc | 52cd371306705c39ad8c06fef195f6c4cdebf664 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/python/bcc/libbcc.py | sbilly/bcc | 52cd371306705c39ad8c06fef195f6c4cdebf664 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2015 PLUMgrid
#
# 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, softwar... | 44.789855 | 89 | 0.781751 |
fb27304866f6957fa8f22810b6914ec2f7b22492 | 657 | py | Python | picture_bed/models.py | TechDailyGroup/news_app_web_api | f1255c70dfd3eaa49e77b67fb1392aa7f8c4e7fb | [
"Apache-2.0"
] | null | null | null | picture_bed/models.py | TechDailyGroup/news_app_web_api | f1255c70dfd3eaa49e77b67fb1392aa7f8c4e7fb | [
"Apache-2.0"
] | 6 | 2021-06-02T02:04:38.000Z | 2022-03-12T00:34:28.000Z | picture_bed/models.py | TechDailyGroup/news_app_web_api | f1255c70dfd3eaa49e77b67fb1392aa7f8c4e7fb | [
"Apache-2.0"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
class Picture(models.Model):
def user_directory_path(instance, filename):
# This is a legacy function used for migration
return user_pictures_path(instance, filename)
def user_pictures_path(instance, filename):
#... | 34.578947 | 81 | 0.730594 |
fd5a05d22270a56ae61471427df8eb8461a6243a | 1,357 | py | Python | vang/tfs/get_projects.py | mattiasl/scripts | e9245ce432b0dd5743506654ada52e017d0b6be0 | [
"Apache-2.0"
] | 6 | 2018-01-31T09:59:18.000Z | 2020-06-09T08:55:22.000Z | vang/tfs/get_projects.py | mattiasl/scripts | e9245ce432b0dd5743506654ada52e017d0b6be0 | [
"Apache-2.0"
] | null | null | null | vang/tfs/get_projects.py | mattiasl/scripts | e9245ce432b0dd5743506654ada52e017d0b6be0 | [
"Apache-2.0"
] | 2 | 2018-11-19T09:56:46.000Z | 2020-06-08T10:53:11.000Z | #!/usr/bin/env python3
import argparse
from sys import argv
from vang.tfs.api import call
def get_projects(organisations, project_specs=False, names=False):
if not organisations:
return []
projects = [(o, p) for o in organisations
for p in call(f'/{o}/_apis/projects?api-version=3.2')... | 27.14 | 79 | 0.638909 |
d9576879dd2d1afb75a90f0a5b8cbbece85b9a6d | 2,819 | py | Python | statsmodels/tools/transform_model.py | CCHiggins/statsmodels | 300b6fba90c65c8e94b4f83e04f7ae1b0ceeac2e | [
"BSD-3-Clause"
] | 6,931 | 2015-01-01T11:41:55.000Z | 2022-03-31T17:03:24.000Z | statsmodels/tools/transform_model.py | CCHiggins/statsmodels | 300b6fba90c65c8e94b4f83e04f7ae1b0ceeac2e | [
"BSD-3-Clause"
] | 6,137 | 2015-01-01T00:33:45.000Z | 2022-03-31T22:53:17.000Z | statsmodels/tools/transform_model.py | CCHiggins/statsmodels | 300b6fba90c65c8e94b4f83e04f7ae1b0ceeac2e | [
"BSD-3-Clause"
] | 2,608 | 2015-01-02T21:32:31.000Z | 2022-03-31T07:38:30.000Z | # -*- coding: utf-8 -*-
"""
Created on Tue May 27 13:23:24 2014
Author: Josef Perktold
License: BSD-3
"""
import numpy as np
class StandardizeTransform(object):
"""class to reparameterize a model for standardized exog
Parameters
----------
data : array_like
data that is standardized along ... | 29.364583 | 79 | 0.608372 |
4962bd44eb6517b3ce1dca4bffa3eb44b0712549 | 490 | py | Python | sphinx/source/docs/user_guide/source_examples/concepts_charts.py | rothnic/bokeh | 8da5e16b260a75caa8e7ef4caf215bb93dd784db | [
"BSD-3-Clause"
] | 1 | 2015-07-17T13:57:01.000Z | 2015-07-17T13:57:01.000Z | sphinx/source/docs/user_guide/source_examples/concepts_charts.py | rothnic/bokeh | 8da5e16b260a75caa8e7ef4caf215bb93dd784db | [
"BSD-3-Clause"
] | null | null | null | sphinx/source/docs/user_guide/source_examples/concepts_charts.py | rothnic/bokeh | 8da5e16b260a75caa8e7ef4caf215bb93dd784db | [
"BSD-3-Clause"
] | 1 | 2016-03-18T03:01:59.000Z | 2016-03-18T03:01:59.000Z | from bokeh.charts import Scatter, output_file, show
# prepare some data, a Pandas GroupBy object in this case
from bokeh.sampledata.iris import flowers
grouped = flowers[["petal_length", "petal_width", "species"]].groupby("species")
# create a scatter chart
p = Scatter(grouped, title="iris data", width=400, height=40... | 30.625 | 80 | 0.730612 |
8c22c1c4e9d862b7f3eabb75ca462bc526af8cd5 | 3,133 | py | Python | 8_Concurrency/2_asyncio/1_generators.py | hauntarl/real-python | 6ffb535648bf5c79c90e2ed7def842078bc7807f | [
"MIT"
] | 2 | 2020-12-15T18:11:00.000Z | 2021-03-01T11:43:16.000Z | 8_Concurrency/2_asyncio/1_generators.py | hauntarl/real_python | 6ffb535648bf5c79c90e2ed7def842078bc7807f | [
"MIT"
] | null | null | null | 8_Concurrency/2_asyncio/1_generators.py | hauntarl/real_python | 6ffb535648bf5c79c90e2ed7def842078bc7807f | [
"MIT"
] | null | null | null | """
asyncio is a library built into python to write concurrent code using the
async/await syntax.
- concurrency is not parallelism: things that are concurrent are tasks or items
that could potentially run in parallel but may not necessarily run in parallel.
It is often a perfect fit for IO-bound and high-level structu... | 36.858824 | 80 | 0.736355 |
444be26ed37e910b00ac64fa890d4ba9ee8e3093 | 148 | py | Python | setup.py | ITD27M01/cloudsyaml | 7607aea47e91242ba8b0c69d8df208781eb313e5 | [
"MIT"
] | null | null | null | setup.py | ITD27M01/cloudsyaml | 7607aea47e91242ba8b0c69d8df208781eb313e5 | [
"MIT"
] | 1 | 2021-06-30T09:15:07.000Z | 2021-06-30T12:20:20.000Z | setup.py | ITD27M01/cloudsyaml | 7607aea47e91242ba8b0c69d8df208781eb313e5 | [
"MIT"
] | null | null | null | import setuptools
try:
import multiprocessing
except ImportError:
pass
setuptools.setup(
setup_requires=['pbr>=2.0.0'],
pbr=True
) | 13.454545 | 34 | 0.695946 |
baa266bb34a8176d920784291835d9c13dbafe05 | 26 | py | Python | myven/lib/python3.8/site-packages/ansible/modules/cloud/ovirt/_ovirt_external_providers.py | baltham/dne-dna-code | 4a13309a790a670d2f07e635c9264a0c29976c6a | [
"MIT"
] | 1 | 2022-01-25T22:52:58.000Z | 2022-01-25T22:52:58.000Z | ansible/modules/cloud/ovirt/_ovirt_external_providers.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | ansible/modules/cloud/ovirt/_ovirt_external_providers.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | ovirt_external_provider.py | 26 | 26 | 0.961538 |
2f279fe862930db7c1aab4a78c6dab1ce2a4370b | 1,614 | py | Python | setup.py | cristiandobre-rinf/nwebsocket | 22eed21419df8632766137f70dda2abc230d6684 | [
"MIT"
] | null | null | null | setup.py | cristiandobre-rinf/nwebsocket | 22eed21419df8632766137f70dda2abc230d6684 | [
"MIT"
] | null | null | null | setup.py | cristiandobre-rinf/nwebsocket | 22eed21419df8632766137f70dda2abc230d6684 | [
"MIT"
] | null | null | null | """Setuptools entry point."""
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
dirname = os.path.dirname(__file__)
readme_filename = os.path.join(dirname, 'README.rst')
description = 'WebSocket client without async'
with open(readme_filename, 'r', encoding='ut... | 31.647059 | 59 | 0.610285 |
100566848c4425a7f9e93cf23abc43b840644cfe | 2,427 | py | Python | pybuildkite/artifacts.py | savithakj/pybuildkite | 6aa5a71caadc092dbd9515eae4523ebf2429c054 | [
"BSD-2-Clause"
] | null | null | null | pybuildkite/artifacts.py | savithakj/pybuildkite | 6aa5a71caadc092dbd9515eae4523ebf2429c054 | [
"BSD-2-Clause"
] | null | null | null | pybuildkite/artifacts.py | savithakj/pybuildkite | 6aa5a71caadc092dbd9515eae4523ebf2429c054 | [
"BSD-2-Clause"
] | null | null | null | from pybuildkite.client import Client
class Artifacts(Client):
"""
Artifacts operations for the Buildkite API
"""
def __init__(self, client, base_url):
"""
Construct the class
:param client: API Client
:param base_url: Base Url
"""
self.client = client
... | 34.671429 | 88 | 0.625464 |
e1fcfe1a006dc3ab67a2318c7cdd82291409f047 | 212 | py | Python | vega/algorithms/nas/sr_ea/__init__.py | Lzc06/vega | 852d2f57e21caed11473ddc96397124561eacf8a | [
"MIT"
] | 12 | 2020-12-13T08:34:24.000Z | 2022-03-20T15:17:17.000Z | vega/algorithms/nas/sr_ea/__init__.py | Lzc06/vega | 852d2f57e21caed11473ddc96397124561eacf8a | [
"MIT"
] | 3 | 2021-03-31T20:15:40.000Z | 2022-02-09T23:50:46.000Z | built-in/TensorFlow/Research/cv/image_classification/Darts_for_TensorFlow/automl/vega/algorithms/nas/sr_ea/__init__.py | Huawei-Ascend/modelzoo | df51ed9c1d6dbde1deef63f2a037a369f8554406 | [
"Apache-2.0"
] | 2 | 2021-07-10T12:40:46.000Z | 2021-12-17T07:55:15.000Z | from .sr_random import SRRandom
from .sr_ea_codec import SRCodec
from .sr_mutate import SRMutate
import os
if os.environ['BACKEND_TYPE'] == 'PYTORCH':
from .sr_ea_trainer_callback import SREATrainerCallback
| 26.5 | 59 | 0.806604 |
9d799ad50a90d018bbf730542367429d6a99b774 | 2,747 | py | Python | oauth2client/contrib/django_util/models.py | anleo1000/oauth2client | 64969bbaa53af4b9b4eda089c7d3a95976b6bb13 | [
"Apache-2.0"
] | null | null | null | oauth2client/contrib/django_util/models.py | anleo1000/oauth2client | 64969bbaa53af4b9b4eda089c7d3a95976b6bb13 | [
"Apache-2.0"
] | null | null | null | oauth2client/contrib/django_util/models.py | anleo1000/oauth2client | 64969bbaa53af4b9b4eda089c7d3a95976b6bb13 | [
"Apache-2.0"
] | 1 | 2019-11-13T12:39:17.000Z | 2019-11-13T12:39:17.000Z | # Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 33.096386 | 75 | 0.652348 |
26b89e7f9d8707ce54a0bb1a618ab4d1517dd34d | 6,005 | py | Python | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_elastic_pool_database_activities_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 2 | 2019-08-23T21:14:00.000Z | 2021-09-07T18:32:34.000Z | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_elastic_pool_database_activities_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 4 | 2019-04-17T17:57:49.000Z | 2020-04-24T21:11:22.000Z | sdk/sql/azure-mgmt-sql/azure/mgmt/sql/aio/operations/_elastic_pool_database_activities_operations.py | beltr0n/azure-sdk-for-python | 2f7fb8bee881b0fc0386a0ad5385755ceedd0453 | [
"MIT"
] | 1 | 2019-04-05T18:17:43.000Z | 2019-04-05T18:17:43.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 49.221311 | 233 | 0.671107 |
985ea10036da84b513170c08e0d739f6845b797a | 33,396 | py | Python | src/azure-cli/azure/cli/command_modules/backup/custom_wl.py | rheaparekh/azure-cli | c808ba40b95235a5216fa42e91f4937c085b53cf | [
"MIT"
] | 1 | 2021-04-22T09:20:56.000Z | 2021-04-22T09:20:56.000Z | src/azure-cli/azure/cli/command_modules/backup/custom_wl.py | rheaparekh/azure-cli | c808ba40b95235a5216fa42e91f4937c085b53cf | [
"MIT"
] | null | null | null | src/azure-cli/azure/cli/command_modules/backup/custom_wl.py | rheaparekh/azure-cli | c808ba40b95235a5216fa42e91f4937c085b53cf | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 45.936726 | 119 | 0.695802 |
ace234d7a633c0ba9552121e19b0606c6a3b6aac | 5,873 | py | Python | src/jobwatcher/jobwatcher.py | agobeaux/aws-parallelcluster-node | 69c7cfdc00bcec923e313b7094ccc93cf73043ba | [
"Apache-2.0"
] | null | null | null | src/jobwatcher/jobwatcher.py | agobeaux/aws-parallelcluster-node | 69c7cfdc00bcec923e313b7094ccc93cf73043ba | [
"Apache-2.0"
] | null | null | null | src/jobwatcher/jobwatcher.py | agobeaux/aws-parallelcluster-node | 69c7cfdc00bcec923e313b7094ccc93cf73043ba | [
"Apache-2.0"
] | null | null | null | # Copyright 2013-2019 Amazon.com, Inc. or its affiliates. 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 the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "LICENSE.txt" fil... | 35.593939 | 119 | 0.671037 |
4254f4e486d0a97a59e79ee8432ad7cb2d6675f2 | 1,781 | py | Python | tests/wikistats_tests.py | hperala/kontuwikibot | f409e6fb45adf4e553dc326d9fb3c0d29eda6373 | [
"MIT"
] | null | null | null | tests/wikistats_tests.py | hperala/kontuwikibot | f409e6fb45adf4e553dc326d9fb3c0d29eda6373 | [
"MIT"
] | null | null | null | tests/wikistats_tests.py | hperala/kontuwikibot | f409e6fb45adf4e553dc326d9fb3c0d29eda6373 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Test cases for the WikiStats dataset."""
#
# (C) Pywikibot team, 2014
#
# Distributed under the terms of the MIT license.
#
from __future__ import unicode_literals
__version__ = '$Id: 6a2dca07831010c753ebdfdd58599f3af3ee10bc $'
#
import sys
from pywikibot.data.wikistats import WikiStats, ... | 25.811594 | 69 | 0.608647 |
485ee681209f55afc587bfa30d7aaaa603755a5c | 5,147 | py | Python | homeassistant/components/remote/__init__.py | loraxx753/skynet | 86a1b0a6c6a3f81bc92d4f61de6a9a6b9f964543 | [
"Apache-2.0"
] | 2 | 2017-02-25T00:27:06.000Z | 2017-02-25T03:09:30.000Z | homeassistant/components/remote/__init__.py | bytebility/home-assistant | 6015274ee2486f797fd6ee8f5f2074a601953e03 | [
"MIT"
] | 1 | 2017-03-10T22:17:06.000Z | 2017-03-10T22:17:06.000Z | homeassistant/components/remote/__init__.py | bytebility/home-assistant | 6015274ee2486f797fd6ee8f5f2074a601953e03 | [
"MIT"
] | 2 | 2018-10-22T17:05:47.000Z | 2021-09-22T10:52:31.000Z | """
Component to interface with universal remote control devices.
For more details about this component, please refer to the documentation
at https://home-assistant.io/components/remote/
"""
import asyncio
from datetime import timedelta
import functools as ft
import logging
import os
import voluptuous as vol
from ho... | 32.575949 | 75 | 0.714397 |
0c3e7e7fdaddf1dcf00e9c0b14910988d5bb3b7e | 3,056 | py | Python | tests/ext/daemon_tests.py | ponsonio-aurea/cement | f55b465c6ef549f0136ed52e8f300f0caecf7bbd | [
"BSD-3-Clause"
] | null | null | null | tests/ext/daemon_tests.py | ponsonio-aurea/cement | f55b465c6ef549f0136ed52e8f300f0caecf7bbd | [
"BSD-3-Clause"
] | null | null | null | tests/ext/daemon_tests.py | ponsonio-aurea/cement | f55b465c6ef549f0136ed52e8f300f0caecf7bbd | [
"BSD-3-Clause"
] | null | null | null | """Tests for cement.ext.ext_daemon."""
# NOTE: A large portion of ext_daemon is tested, but not included in
# Coverage report because nose/coverage lose sight of things after the
# sub-process is forked.
import os
#import tempfile
from random import random
from cement.core import handler, backend, log, hook, exc
from... | 28.036697 | 76 | 0.590641 |
e0a47e096bdd84efb8e5cff717b6c9cd935666ff | 758 | py | Python | petycja_norweskie/themes/models.py | watchdogpolska/ankieta-norweskie | fefbabf8182452c01a3fcf8932707e5a539c9dfd | [
"MIT"
] | null | null | null | petycja_norweskie/themes/models.py | watchdogpolska/ankieta-norweskie | fefbabf8182452c01a3fcf8932707e5a539c9dfd | [
"MIT"
] | 29 | 2017-04-17T01:41:44.000Z | 2019-07-01T21:03:51.000Z | petycja_norweskie/themes/models.py | watchdogpolska/ankieta-norweskie | fefbabf8182452c01a3fcf8932707e5a539c9dfd | [
"MIT"
] | 1 | 2017-09-29T23:17:09.000Z | 2017-09-29T23:17:09.000Z | # coding=utf-8
from django.db import models
from django.utils.translation import ugettext_lazy as _
from model_utils.models import TimeStampedModel
class ThemeQuerySet(models.QuerySet):
pass
class Theme(TimeStampedModel):
name = models.CharField(max_length=100, verbose_name=_("Name"))
description = mode... | 30.32 | 104 | 0.718997 |
4355791bab46214bcf4e6ce3a4e5a182199193ce | 26,585 | py | Python | venv/lib/python2.7/site-packages/sklearn/tree/tests/test_tree.py | bopopescu/fbserver | e812dbc4dc0cbf2fda19473015a3d7e253718a19 | [
"Apache-2.0"
] | null | null | null | venv/lib/python2.7/site-packages/sklearn/tree/tests/test_tree.py | bopopescu/fbserver | e812dbc4dc0cbf2fda19473015a3d7e253718a19 | [
"Apache-2.0"
] | null | null | null | venv/lib/python2.7/site-packages/sklearn/tree/tests/test_tree.py | bopopescu/fbserver | e812dbc4dc0cbf2fda19473015a3d7e253718a19 | [
"Apache-2.0"
] | 1 | 2020-07-23T19:26:19.000Z | 2020-07-23T19:26:19.000Z | """
Testing for the tree module (sklearn.tree).
"""
import pickle
import numpy as np
from functools import partial
from itertools import product
from sklearn.metrics import accuracy_score
from sklearn.metrics import mean_squared_error
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing im... | 35.072559 | 79 | 0.613541 |
289bb2720017b343a703824460c57fcba031a7ca | 792 | py | Python | templates/includes/search_form.html.py | amigcamel/taipei.py | 12b24bf50aeeb4c3e0ad1ed1998d6d7e77b845dd | [
"MIT"
] | null | null | null | templates/includes/search_form.html.py | amigcamel/taipei.py | 12b24bf50aeeb4c3e0ad1ed1998d6d7e77b845dd | [
"MIT"
] | null | null | null | templates/includes/search_form.html.py | amigcamel/taipei.py | 12b24bf50aeeb4c3e0ad1ed1998d6d7e77b845dd | [
"MIT"
] | null | null | null | BBBB BBBBBBBBBBBBBB BBBB
XXXXX XXXXXXXXBBB BBBBBBBBX XXXXXXXXXXXXXXXXXX XXXXXXXXXXXXX XXXXXXXXXXXXXX
XXXX XXXXXXXXXXXXXXXXXXX
XXXXXX XXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXX gettext('Search') X XXXXXXXXXXX XXXXXXXX XXXXXXXXX
XXXXXX
BB BBBBBBBBBBBBBBBBBBBB
BB BBBBBBBBBBBBBBBBBBBBBBBBBBB BB B
XXXXXX XXXXXXXXXXXXX... | 27.310345 | 96 | 0.770202 |
68d283b4b3f880a072335673dcd7b5d5881d7814 | 463 | py | Python | cpims/cpims/cpims-monthly.py | sizler20/cpims_update | 23b86e40ca779b751383e268ad4fbf6a321ab211 | [
"MIT"
] | null | null | null | cpims/cpims/cpims-monthly.py | sizler20/cpims_update | 23b86e40ca779b751383e268ad4fbf6a321ab211 | [
"MIT"
] | null | null | null | cpims/cpims/cpims-monthly.py | sizler20/cpims_update | 23b86e40ca779b751383e268ad4fbf6a321ab211 | [
"MIT"
] | 1 | 2022-02-27T13:36:47.000Z | 2022-02-27T13:36:47.000Z | #!/usr/bin/python3.7
# /home/nmugaya/Projects/2019/Staging/Live/cpims/cpims
# Every Month at 6:45 am
# 45 6 1 * * cd lnk && python3.7 cpims-monthly.py >> ~/cpims-monthly.log 2>&1
from notify import notices
def process_notificaction(report_name):
"""Method to process notification."""
try:
notices(re... | 20.130435 | 77 | 0.663067 |
51568b88b34eb4079d921cb16e5ad6a753c08a2b | 15,507 | py | Python | 434-MachineLearning/final_project/linearClassifier/sklearn/cluster/mean_shift_.py | neale/CS-program | 6fef9c39579143bde0ab5d1ec5fedc7210e55814 | [
"Unlicense"
] | 1 | 2016-10-24T13:36:23.000Z | 2016-10-24T13:36:23.000Z | 434-MachineLearning/final_project/linearClassifier/sklearn/cluster/mean_shift_.py | neale/CS-program | 6fef9c39579143bde0ab5d1ec5fedc7210e55814 | [
"Unlicense"
] | null | null | null | 434-MachineLearning/final_project/linearClassifier/sklearn/cluster/mean_shift_.py | neale/CS-program | 6fef9c39579143bde0ab5d1ec5fedc7210e55814 | [
"Unlicense"
] | null | null | null | """Mean shift clustering algorithm.
Mean shift clustering aims to discover *blobs* in a smooth density of
samples. It is a centroid based algorithm, which works by updating candidates
for centroids to be the mean of the points within a given region. These
candidates are then filtered in a post-processing stage to elim... | 37.729927 | 78 | 0.663249 |
80753dd39ade80323e44fc0b3a4858fb49d7a5fd | 1,216 | py | Python | flask/boxwise_flask/exceptions.py | boxwise/boxtribute | b87d3bf52e29cb485d98e669b4b43d1934abf310 | [
"Apache-2.0"
] | 3 | 2020-10-17T06:37:10.000Z | 2021-06-08T16:58:38.000Z | flask/boxwise_flask/exceptions.py | boxwise/boxtribute | b87d3bf52e29cb485d98e669b4b43d1934abf310 | [
"Apache-2.0"
] | 166 | 2020-10-25T20:45:32.000Z | 2022-03-28T08:18:26.000Z | flask/boxwise_flask/exceptions.py | boxwise/boxtribute | b87d3bf52e29cb485d98e669b4b43d1934abf310 | [
"Apache-2.0"
] | 4 | 2021-01-01T18:03:57.000Z | 2022-03-10T08:43:23.000Z | class AuthenticationFailed(Exception):
"""Custom exception for authentication errors on web API level (i.e. when
hitting a Flask server endpoint).
"""
def __init__(self, error, status_code):
self.error = error
self.status_code = status_code
# Custom exceptions to be raised in GraphQL ... | 32 | 80 | 0.65625 |
bb766f07bff6a9c1a8229a4918557448fd8470c5 | 734 | py | Python | make/photon/prepare/g.py | ckd/harbor | 1ceb7a2fb9512c77deac97def51d875d60a7bf55 | [
"Apache-2.0"
] | 2 | 2017-06-07T09:34:22.000Z | 2019-04-17T08:12:57.000Z | make/photon/prepare/g.py | ckd/harbor | 1ceb7a2fb9512c77deac97def51d875d60a7bf55 | [
"Apache-2.0"
] | 2 | 2022-03-02T05:03:32.000Z | 2022-03-17T22:25:26.000Z | make/photon/prepare/g.py | ckd/harbor | 1ceb7a2fb9512c77deac97def51d875d60a7bf55 | [
"Apache-2.0"
] | 1 | 2019-04-22T04:39:14.000Z | 2019-04-22T04:39:14.000Z | import os
from pathlib import Path
## Const
DEFAULT_UID = 10000
DEFAULT_GID = 10000
## Global variable
base_dir = '/harbor_make'
templates_dir = "/usr/src/app/templates"
config_dir = '/config'
secret_dir = '/secret'
secret_key_dir='/secret/keys'
old_private_key_pem_path = Path('/config/core/private_key.pem')
old_cr... | 27.185185 | 64 | 0.760218 |
650491bcb7cdee98b393ce95583ad7bdd5b78365 | 4,451 | py | Python | app/src/main/python/main.py | CompNeurosurg/sezect | 0a01b8ff1c5de1cecaeca120d6c895393692482e | [
"MIT"
] | null | null | null | app/src/main/python/main.py | CompNeurosurg/sezect | 0a01b8ff1c5de1cecaeca120d6c895393692482e | [
"MIT"
] | null | null | null | app/src/main/python/main.py | CompNeurosurg/sezect | 0a01b8ff1c5de1cecaeca120d6c895393692482e | [
"MIT"
] | null | null | null | from six.moves import input
import pandas as pd
import numpy as np
from os.path import dirname, join
from android.os import Environment
import sklearn
# from sklearn.externals import joblib
import _multiprocessing
_multiprocessing.sem_unlink = None
import joblib
import time
# import matplotlib.pyplot as plt
def main()... | 31.34507 | 91 | 0.565042 |
8ab5551b15eec2789257b78b8536f066f2fa3153 | 1,488 | py | Python | data/p2DJ/New/R2/benchmark/startCirq6.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/R2/benchmark/startCirq6.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p2DJ/New/R2/benchmark/startCirq6.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 5/15/20 4:49 PM
# @File : grover.py
# qubit number=2
# total number=4
import cirq
import cirq.google as cg
from typing import Optional
import sys
from math import log2
import numpy as np
#thatsNoCode
from cirq.contrib.svg import SVGCircuit
# Symbols for ... | 25.655172 | 77 | 0.700941 |
ce04fd03fb7f7f27c85504de9df357274f232e95 | 2,377 | py | Python | src/lib/centipede/Dispatcher/Renderfarm/RenderfarmJob/ExpandedJob.py | paulondc/centipede | 6000a6964c2ce4a1f9c5ba0fac1d5ab0fead1fbe | [
"MIT"
] | null | null | null | src/lib/centipede/Dispatcher/Renderfarm/RenderfarmJob/ExpandedJob.py | paulondc/centipede | 6000a6964c2ce4a1f9c5ba0fac1d5ab0fead1fbe | [
"MIT"
] | null | null | null | src/lib/centipede/Dispatcher/Renderfarm/RenderfarmJob/ExpandedJob.py | paulondc/centipede | 6000a6964c2ce4a1f9c5ba0fac1d5ab0fead1fbe | [
"MIT"
] | null | null | null | import os
import uuid
from .RenderfarmJob import RenderfarmJob
class ExpandedJob(RenderfarmJob):
"""
Implements an expanded render farm job.
An expanded job is used to run a task on the farm. The processing
of the task can be devided by chunks or in case a task cannot
be divided then it performs t... | 27.321839 | 90 | 0.595709 |
dd14536f8a54d69fff054ebae286a352d8d19383 | 3,337 | py | Python | src/compas_ghpython/artists/meshartist.py | kathrindoerfler/compas | e876b36b582ee055da673befca1b7ced3834090c | [
"MIT"
] | null | null | null | src/compas_ghpython/artists/meshartist.py | kathrindoerfler/compas | e876b36b582ee055da673befca1b7ced3834090c | [
"MIT"
] | 9 | 2019-09-11T08:53:19.000Z | 2019-09-16T08:35:39.000Z | src/compas_ghpython/artists/meshartist.py | Licini/compas | 34f65adb3d0abc3f403312ffba62aa76f3376292 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import compas_ghpython
from compas_ghpython.artists.mixins import EdgeArtist
from compas_ghpython.artists.mixins import FaceArtist
from compas_ghpython.artists.mixins import VertexArtist
from compas.geometry i... | 30.614679 | 127 | 0.597842 |
255ceacedfbbf5c33e57ee93710311cfd49a499c | 29,383 | py | Python | tests/common.py | niulinlnc/home-assistant | 135e5ea15d482daf444afb96bbb290170c51f56e | [
"Apache-2.0"
] | null | null | null | tests/common.py | niulinlnc/home-assistant | 135e5ea15d482daf444afb96bbb290170c51f56e | [
"Apache-2.0"
] | null | null | null | tests/common.py | niulinlnc/home-assistant | 135e5ea15d482daf444afb96bbb290170c51f56e | [
"Apache-2.0"
] | null | null | null | """Test the helper method for writing tests."""
import asyncio
import functools as ft
import json
import logging
import os
import sys
import threading
from collections import OrderedDict
from contextlib import contextmanager
from datetime import timedelta
from io import StringIO
from unittest.mock import MagicMock, Mo... | 31.526824 | 79 | 0.65041 |
74ed273e6f57af9b584de6d0a4908bd201279c46 | 1,659 | py | Python | app/tests/test_sentiment.py | PsyBorgs/redditanalyser | 8055995c23e3d8fd83f1c8f8a9f9c43004c5ab94 | [
"MIT"
] | 1 | 2016-11-10T04:46:51.000Z | 2016-11-10T04:46:51.000Z | app/tests/test_sentiment.py | PsyBorgs/redditanalyser | 8055995c23e3d8fd83f1c8f8a9f9c43004c5ab94 | [
"MIT"
] | null | null | null | app/tests/test_sentiment.py | PsyBorgs/redditanalyser | 8055995c23e3d8fd83f1c8f8a9f9c43004c5ab94 | [
"MIT"
] | null | null | null | import pytest
from sqlalchemy.orm import joinedload
from app.tests import const
from app.models import (
Submission, Comment, SubmissionSentiment, CommentSentiment)
from app import sentiment
def test_comment_sentiment(session):
s = Submission.create(session, **const.MOCK_SUBMISSION)
c = Comment.create(s... | 31.301887 | 65 | 0.710669 |
b7f0cf7db39ee900ba2285d871076da244cb07ff | 5,063 | py | Python | neighborwatch/tests.py | iyerikuzwe/ikuzweneighborhood | 32a3bd707a761881fed538ca0c702fa2e6c3b522 | [
"Unlicense"
] | null | null | null | neighborwatch/tests.py | iyerikuzwe/ikuzweneighborhood | 32a3bd707a761881fed538ca0c702fa2e6c3b522 | [
"Unlicense"
] | null | null | null | neighborwatch/tests.py | iyerikuzwe/ikuzweneighborhood | 32a3bd707a761881fed538ca0c702fa2e6c3b522 | [
"Unlicense"
] | null | null | null | from django.test import TestCase
# Create your tests here.
from .models import Neighbour, Profile, Business, Posts
from django.contrib.auth.models import User
class HoodTestClass(TestCase):
"""
Test neighbour class and its functions
"""
def setUp(self):
self.user = User.objects.create(id =1, ... | 26.78836 | 99 | 0.607742 |
931ad34dfe08dc95206bcb7c2f343419727123cd | 2,780 | py | Python | plugins/elasticsearch/komand_elasticsearch/triggers/poll_documents/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/elasticsearch/komand_elasticsearch/triggers/poll_documents/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/elasticsearch/komand_elasticsearch/triggers/poll_documents/schema.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | # GENERATED BY KOMAND SDK - DO NOT EDIT
import insightconnect_plugin_runtime
import json
class Component:
DESCRIPTION = "Poll for new documents given a query"
class Input:
FREQUENCY = "frequency"
INDEX = "index"
QUERY = "query"
ROUTING = "routing"
TYPE = "type"
class Output:
... | 20.291971 | 64 | 0.472662 |
36a325e9e5af19faa59c25c4b3c237c6b84fcdfe | 1,052 | py | Python | lnd_grpc/config.py | willcl-ark/lnd_grpc | cf938c51c201f078e8bbe9e19ffc2d038f3abf7f | [
"MIT"
] | 36 | 2019-01-27T19:21:19.000Z | 2022-03-17T00:04:00.000Z | lnd_grpc/config.py | willcl-ark/lnd_grpc | cf938c51c201f078e8bbe9e19ffc2d038f3abf7f | [
"MIT"
] | 65 | 2019-02-01T21:09:53.000Z | 2020-08-26T21:20:26.000Z | lnd_grpc/config.py | willcl-ark/lnd_grpc | cf938c51c201f078e8bbe9e19ffc2d038f3abf7f | [
"MIT"
] | 10 | 2019-01-30T20:57:30.000Z | 2022-01-20T13:20:51.000Z | # LND default params
# source: https://github.com/lightningnetwork/lnd/blob/master/config.go
defaultConfigFilename = "lnd.conf"
defaultDataDirname = "data"
defaultChainSubDirname = "chain"
defaultGraphSubDirname = "graph"
defaultTLSCertFilename = "tls.cert"
defaultTLSKeyFilename = "tls.key"
defaultAdminMacFilename = "... | 30.941176 | 71 | 0.809886 |
18f0d124457ca50d18b37cc0c1c95ea1175f7b05 | 44,611 | py | Python | src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/custom.py | noelbundick/azure-cli | b56636230e3fd3162b9b144f969175641dc230a8 | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/custom.py | noelbundick/azure-cli | b56636230e3fd3162b9b144f969175641dc230a8 | [
"MIT"
] | null | null | null | src/command_modules/azure-cli-iot/azure/cli/command_modules/iot/custom.py | noelbundick/azure-cli | b56636230e3fd3162b9b144f969175641dc230a8 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 54.27129 | 172 | 0.743471 |
155750ed1326772453a0566eacb2c4f88cee3683 | 593,467 | py | Python | login.py | iwan002/apa-ja-yg-penting-jalan | c5edc7d62746abda56f9c8086fcd18166b9a8ff0 | [
"Apache-2.0"
] | null | null | null | login.py | iwan002/apa-ja-yg-penting-jalan | c5edc7d62746abda56f9c8086fcd18166b9a8ff0 | [
"Apache-2.0"
] | null | null | null | login.py | iwan002/apa-ja-yg-penting-jalan | c5edc7d62746abda56f9c8086fcd18166b9a8ff0 | [
"Apache-2.0"
] | null | null | null | from linepy import *
from akad.ttypes import Message
from akad.ttypes import ContentType as Type
from akad.ttypes import ChatRoomAnnouncementContents
from akad.ttypes import ChatRoomAnnouncement
from thrift import transport, protocol, server
from datetime import datetime, timedelta
import pytz, pafy, livejson, t... | 42.003468 | 7,706 | 0.338357 |
c2b29da1b056994d949d2253507d9f09573c9e1e | 1,370 | py | Python | Codigos Python/Plus_One.py | BrunoHarlis/Solucoes_LeetCode | cca9b1331cbfe7d8dc8d844a810ac651a92d8c97 | [
"MIT"
] | null | null | null | Codigos Python/Plus_One.py | BrunoHarlis/Solucoes_LeetCode | cca9b1331cbfe7d8dc8d844a810ac651a92d8c97 | [
"MIT"
] | null | null | null | Codigos Python/Plus_One.py | BrunoHarlis/Solucoes_LeetCode | cca9b1331cbfe7d8dc8d844a810ac651a92d8c97 | [
"MIT"
] | null | null | null | # Fonte: https://leetcode.com/problems/plus-one/
# Autor: Bruno Harlis
# Data: 10/08/2021
"""
Dada uma matriz não vazia de dígitos decimais representando um
inteiro não negativo, incremente um para o inteiro.
Os dígitos são armazenados de forma que o dígito mais significativo
esteja no topo da lista e cada elemento ... | 23.220339 | 75 | 0.627007 |
cf6d947d715f3bdc7e81a44c61639cc911cd006d | 18,512 | py | Python | ietf/utils/management/commands/create_group_wikis.py | unofficial-mirror/ietfdb | ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81 | [
"BSD-3-Clause"
] | null | null | null | ietf/utils/management/commands/create_group_wikis.py | unofficial-mirror/ietfdb | ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81 | [
"BSD-3-Clause"
] | null | null | null | ietf/utils/management/commands/create_group_wikis.py | unofficial-mirror/ietfdb | ce54adb30dc7299c6eb4d42b9aa9d2c2929c1a81 | [
"BSD-3-Clause"
] | null | null | null | # Copyright The IETF Trust 2016-2019, All Rights Reserved
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import os
import copy
import io
import pkg_resources
import six
import syslog
from trac.core import TracError
from trac.env import Environment
from trac.perm imp... | 44.181384 | 156 | 0.571791 |
3c0bac7deda047e72d15e15c3a85de947ea170e3 | 16,663 | py | Python | calico/felix/test/test_dispatch.py | tomdee/felix | 79d9cba3b13ad078b19a9eabb52f1cafc52a1a01 | [
"Apache-2.0"
] | null | null | null | calico/felix/test/test_dispatch.py | tomdee/felix | 79d9cba3b13ad078b19a9eabb52f1cafc52a1a01 | [
"Apache-2.0"
] | null | null | null | calico/felix/test/test_dispatch.py | tomdee/felix | 79d9cba3b13ad078b19a9eabb52f1cafc52a1a01 | [
"Apache-2.0"
] | 1 | 2016-12-02T12:08:32.000Z | 2016-12-02T12:08:32.000Z | # -*- coding: utf-8 -*-
# Copyright 2014, 2015 Metaswitch Networks
#
# 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 ap... | 41.866834 | 95 | 0.601452 |
24cc9c104b85c2fa7bb5dd05fa85c2271b659a73 | 5,556 | py | Python | vnpy/app/stock_screener/template.py | liuying3013/vnpy | e1cc1ea4af5fa6ec9a31e5b954c19cfaa0a3130e | [
"MIT"
] | 323 | 2015-11-21T14:45:29.000Z | 2022-03-16T08:54:37.000Z | vnpy/app/stock_screener/template.py | liuying3013/vnpy | e1cc1ea4af5fa6ec9a31e5b954c19cfaa0a3130e | [
"MIT"
] | 9 | 2017-03-21T08:26:21.000Z | 2021-08-23T06:41:17.000Z | vnpy/app/stock_screener/template.py | liuying3013/vnpy | e1cc1ea4af5fa6ec9a31e5b954c19cfaa0a3130e | [
"MIT"
] | 148 | 2016-09-26T03:25:39.000Z | 2022-02-06T14:43:48.000Z | """"""
import os
import bz2
import pickle
import traceback
import zlib
from abc import ABC
from copy import copy, deepcopy
from typing import Any, Callable
from logging import INFO, ERROR
from datetime import datetime, timedelta
from vnpy.trader.constant import Interval, Direction, Offset, Status, OrderType, Color, Ex... | 32.87574 | 110 | 0.571994 |
c214896a9926cb14f1237c964580b79165b09f6a | 135 | py | Python | contrib/splitSpectrum/__init__.py | vincentschut/isce2 | 1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c | [
"ECL-2.0",
"Apache-2.0"
] | 1,133 | 2022-01-07T21:24:57.000Z | 2022-01-07T21:33:08.000Z | contrib/splitSpectrum/__init__.py | vincentschut/isce2 | 1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c | [
"ECL-2.0",
"Apache-2.0"
] | 276 | 2019-02-10T07:18:28.000Z | 2022-03-31T21:45:55.000Z | contrib/splitSpectrum/__init__.py | vincentschut/isce2 | 1557a05b7b6a3e65abcfc32f89c982ccc9b65e3c | [
"ECL-2.0",
"Apache-2.0"
] | 235 | 2019-02-10T05:00:53.000Z | 2022-03-18T07:37:24.000Z | #!/usr/bin/env python
def SplitRangeSpectrum():
from .splitSpectrum import PySplitRangeSpectrum
return PySplitRangeSpectrum()
| 22.5 | 51 | 0.777778 |
3dc4dc4bfce3f554435f9aa8d99611824a9a329a | 8,013 | py | Python | notebooks/md/data/md_equil/4AT3/md_equil.py | openkinome/study-ntrk-resistance | 3c4ba64538ec55c774d34c9d7cd0a5e4665dc9d5 | [
"MIT"
] | null | null | null | notebooks/md/data/md_equil/4AT3/md_equil.py | openkinome/study-ntrk-resistance | 3c4ba64538ec55c774d34c9d7cd0a5e4665dc9d5 | [
"MIT"
] | 1 | 2021-07-30T15:01:53.000Z | 2021-08-02T09:48:08.000Z | notebooks/md/data/md_equil/4AT3/md_equil.py | openkinome/study-ntrk-resistance | 3c4ba64538ec55c774d34c9d7cd0a5e4665dc9d5 | [
"MIT"
] | null | null | null | import argparse
import os
import sys
from sys import stdout
import mdtraj as md
import numpy as np
import parmed
import simtk.openmm as mm
import simtk.openmm.app as app
import simtk.unit as unit
from openforcefield.topology import Molecule, Topology
from openmmforcefields.generators import SystemGenerator
from perses... | 33.527197 | 92 | 0.762636 |
e9d550acc05f81a33fc09d68140916f102ccbc66 | 836 | py | Python | angrmanagement/data/jobs/flirt_signature_recognition.py | DennyDai/angr-management | 8a4ba5dafbf2f4d2ba558528a0d1ae099a199a04 | [
"BSD-2-Clause"
] | null | null | null | angrmanagement/data/jobs/flirt_signature_recognition.py | DennyDai/angr-management | 8a4ba5dafbf2f4d2ba558528a0d1ae099a199a04 | [
"BSD-2-Clause"
] | null | null | null | angrmanagement/data/jobs/flirt_signature_recognition.py | DennyDai/angr-management | 8a4ba5dafbf2f4d2ba558528a0d1ae099a199a04 | [
"BSD-2-Clause"
] | null | null | null | from typing import TYPE_CHECKING
import logging
import angr.flirt
from .job import Job
if TYPE_CHECKING:
from angrmanagement.data.instance import Instance
_l = logging.getLogger(name=__name__)
class FlirtSignatureRecognitionJob(Job):
"""
Describes a job for using FLIRT signatures to recognize and matc... | 27.866667 | 109 | 0.716507 |
669d6eb68d7566143116862af8ac16c248e8346b | 1,075 | py | Python | examples/docs_snippets/docs_snippets/overview/object_managers/custom_object_manager.py | coderanger/dagster | d3e323f8ed55cd906d6f44f19595348ea1580b2d | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets/overview/object_managers/custom_object_manager.py | coderanger/dagster | d3e323f8ed55cd906d6f44f19595348ea1580b2d | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets/overview/object_managers/custom_object_manager.py | coderanger/dagster | d3e323f8ed55cd906d6f44f19595348ea1580b2d | [
"Apache-2.0"
] | null | null | null | """isort:skip_file"""
from dagster import solid
@solid
def solid1(_):
pass
@solid
def solid2(_, _a):
pass
def write_dataframe_to_table(**_kwargs):
pass
def read_dataframe_from_table(**_kwargs):
pass
# start_marker
from dagster import ObjectManager, ModeDefinition, object_manager, pipeline
cl... | 21.5 | 96 | 0.746047 |
dabd1e61620640776cf966b98fc0526a8f6a7be9 | 460 | py | Python | pandora-ckz/pandora/jade/ext/pyramid/__init__.py | williamlagos/django-coding | 246dc1aba32eae0b035c407de3e8fe954606b776 | [
"MIT"
] | null | null | null | pandora-ckz/pandora/jade/ext/pyramid/__init__.py | williamlagos/django-coding | 246dc1aba32eae0b035c407de3e8fe954606b776 | [
"MIT"
] | 21 | 2020-03-24T18:18:22.000Z | 2021-03-31T20:18:53.000Z | pandora-ckz/pandora/jade/ext/pyramid/__init__.py | efforia/dashboard | 246dc1aba32eae0b035c407de3e8fe954606b776 | [
"MIT"
] | null | null | null | from pyramid import mako_templating
from jade.ext.mako import preprocessor
def includeme(config):
config.add_renderer(".jade", PyjadeRenderer)
class PyjadeRenderer(object):
"""
The jade renderer
"""
def __init__(self, info):
info.settings['mako.preprocessor'] = preprocessor
self.ma... | 27.058824 | 66 | 0.713043 |
49d3f848b6ae8d2453fdd85689d38362edbc9eee | 1,844 | py | Python | qiskit/qasm/_node/_customunitary.py | Phonemetra/TurboQuantum | c168d6dda361258ca1ffce60e7e8ac5d10e69f06 | [
"Apache-2.0"
] | 1 | 2017-07-12T02:04:53.000Z | 2017-07-12T02:04:53.000Z | qiskit/qasm/_node/_customunitary.py | Phonemetra/TurboQuantum | c168d6dda361258ca1ffce60e7e8ac5d10e69f06 | [
"Apache-2.0"
] | null | null | null | qiskit/qasm/_node/_customunitary.py | Phonemetra/TurboQuantum | c168d6dda361258ca1ffce60e7e8ac5d10e69f06 | [
"Apache-2.0"
] | 6 | 2018-05-27T10:52:02.000Z | 2021-04-02T19:20:11.000Z | # -*- coding: utf-8 -*-
# Copyright 2017 IBM RESEARCH. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | 31.254237 | 79 | 0.618221 |
9b6fb5cde0163b59aea599ceadb9398109e9e94a | 4,111 | py | Python | azure/mgmt/network/v2017_09_01/models/metric_specification.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 1 | 2022-01-25T22:52:58.000Z | 2022-01-25T22:52:58.000Z | azure/mgmt/network/v2017_09_01/models/metric_specification.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | azure/mgmt/network/v2017_09_01/models/metric_specification.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"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 ... | 50.134146 | 350 | 0.68791 |
dcaaded9f5453655c24bbb85e0115b8bb2fb7008 | 6,700 | py | Python | modules/image/semantic_segmentation/bisenetv2_cityscapes/layers.py | AK391/PaddleHub | a51ab7447e089776766becb3297e560dfed98573 | [
"Apache-2.0"
] | 8,360 | 2019-01-18T10:46:45.000Z | 2022-03-31T14:50:02.000Z | modules/image/semantic_segmentation/bisenetv2_cityscapes/layers.py | AK391/PaddleHub | a51ab7447e089776766becb3297e560dfed98573 | [
"Apache-2.0"
] | 1,158 | 2019-04-11T09:22:43.000Z | 2022-03-31T12:12:09.000Z | modules/image/semantic_segmentation/bisenetv2_cityscapes/layers.py | AK391/PaddleHub | a51ab7447e089776766becb3297e560dfed98573 | [
"Apache-2.0"
] | 1,677 | 2019-04-09T15:07:40.000Z | 2022-03-31T06:41:10.000Z | # Copyright (c) 2021 PaddlePaddle 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 applic... | 35.828877 | 118 | 0.639851 |
f462ad4be9d46fae7e70812f6e14b3642ef990a2 | 5,304 | py | Python | homeassistant/auth/providers/command_line.py | RavensburgOP/core | 0ea76e848b182ca0ebb0fdb54558f7f733898ad7 | [
"Apache-2.0"
] | 5 | 2019-02-24T11:46:18.000Z | 2019-05-28T17:37:21.000Z | homeassistant/auth/providers/command_line.py | RavensburgOP/core | 0ea76e848b182ca0ebb0fdb54558f7f733898ad7 | [
"Apache-2.0"
] | 77 | 2020-07-16T16:43:09.000Z | 2022-03-31T06:14:37.000Z | homeassistant/auth/providers/command_line.py | Vaarlion/core | f3de8b9f28de01abf72c0f5bb0b457eb1841f201 | [
"Apache-2.0"
] | 6 | 2017-09-01T03:58:05.000Z | 2021-12-20T10:30:58.000Z | """Auth provider that validates credentials via an external command."""
from __future__ import annotations
import asyncio
import collections
from collections.abc import Mapping
import logging
import os
from typing import Any, cast
import voluptuous as vol
from homeassistant.const import CONF_COMMAND
from homeassista... | 34 | 86 | 0.614065 |
8e9c5b08d85b1be52376a38ab0642141f5298672 | 1,792 | py | Python | network_selector/write_job_description.py | earthobservatory/ariamh-pub | f33731e127f38ff33b02e02c07b16793c07651a6 | [
"Apache-2.0"
] | 4 | 2019-11-19T03:35:35.000Z | 2020-12-07T18:43:11.000Z | network_selector/write_job_description.py | earthobservatory/ariamh-pub | f33731e127f38ff33b02e02c07b16793c07651a6 | [
"Apache-2.0"
] | 3 | 2019-06-05T03:35:55.000Z | 2020-04-09T14:16:08.000Z | network_selector/write_job_description.py | earthobservatory/ariamh-pub | f33731e127f38ff33b02e02c07b16793c07651a6 | [
"Apache-2.0"
] | 6 | 2019-08-23T22:53:11.000Z | 2021-11-06T15:15:30.000Z | #!/usr/bin/env python
import os, sys, json, argparse
from jobDescriptorWriter import write_job_descriptor
def write_job_desc(json_file, context_file):
"""Write job descriptor JSON file settings from context."""
# read in existing json
if os.path.exists(json_file):
with open(json_file) as f: j = ... | 34.461538 | 102 | 0.606585 |
e4311c2231765d9751500bec5b95f63da6788f49 | 2,852 | py | Python | ar_app/main.py | osetr/ar-opencv-python | ae62ebeed176ef2e6d8d68fbaaa7d402dadc3eb3 | [
"MIT"
] | 1 | 2020-11-22T13:55:11.000Z | 2020-11-22T13:55:11.000Z | ar_app/main.py | osetr/ar-opencv-python | ae62ebeed176ef2e6d8d68fbaaa7d402dadc3eb3 | [
"MIT"
] | null | null | null | ar_app/main.py | osetr/ar-opencv-python | ae62ebeed176ef2e6d8d68fbaaa7d402dadc3eb3 | [
"MIT"
] | null | null | null | from classifier import Classifier
import cv2
import numpy as np
from datetime import datetime
# available descriptor for Classifier
from descriptors import ORB_Descriptor, SIFT_Descriptor
# available classification models for Classifier
from sklearn.tree import DecisionTreeClassifier
from sklearn.naive_bayes import G... | 30.666667 | 85 | 0.649719 |
21e6dd834ffffe16d0045784007d13c82dc4ca20 | 530 | py | Python | tests/test.py | liuzhengzheng12/hash_LB | 1ec7a2b8169cd890c9d19df10f256907d748be97 | [
"Apache-2.0"
] | null | null | null | tests/test.py | liuzhengzheng12/hash_LB | 1ec7a2b8169cd890c9d19df10f256907d748be97 | [
"Apache-2.0"
] | null | null | null | tests/test.py | liuzhengzheng12/hash_LB | 1ec7a2b8169cd890c9d19df10f256907d748be97 | [
"Apache-2.0"
] | null | null | null | import pd_base_tests
from ptf import config
from res_pd_rpc.ttypes import *
from ptf.testutils import *
from ptf.thriftutils import *
from heavy_hitter.p4_pd_rpc.ttypes import *
INSTANCE_NAME = 'hash_LB'
class Test(pd_base_tests.ThriftInterfaceDataPlane):
def __init__(self):
pd_base_tests.ThriftInterfac... | 23.043478 | 72 | 0.667925 |
13b8c33184f5322aacc7f790cbc65e7947f7be22 | 134 | py | Python | 32_tuple_updating.py | onowdev/python-selflearning | 3d7245de0207a5bfcbce4f7adde60e7316b70a8e | [
"MIT"
] | null | null | null | 32_tuple_updating.py | onowdev/python-selflearning | 3d7245de0207a5bfcbce4f7adde60e7316b70a8e | [
"MIT"
] | null | null | null | 32_tuple_updating.py | onowdev/python-selflearning | 3d7245de0207a5bfcbce4f7adde60e7316b70a8e | [
"MIT"
] | null | null | null | tup1 = (12, 34.56)
tup2 = ('abc', 'xyz')
# Following action is not valid for tuples
# tup1[0] = 100;
tup3 = tup1 + tup2
print(tup3) | 14.888889 | 42 | 0.619403 |
466921f80e527c56f3ce6c4e165b86d11708622c | 4,243 | py | Python | docs/samples/v1beta1/transformer/torchserve_image_transformer/image_transformer/image_transformer.py | titoeb/kfserving | b072a76842b57e904dbdf46a136474a22051500d | [
"Apache-2.0"
] | 6 | 2022-02-15T21:54:19.000Z | 2022-02-16T21:18:54.000Z | docs/samples/v1beta1/transformer/torchserve_image_transformer/image_transformer/image_transformer.py | titoeb/kfserving | b072a76842b57e904dbdf46a136474a22051500d | [
"Apache-2.0"
] | 7 | 2021-08-31T23:55:06.000Z | 2022-03-02T11:34:58.000Z | docs/samples/v1beta1/transformer/torchserve_image_transformer/image_transformer/image_transformer.py | titoeb/kfserving | b072a76842b57e904dbdf46a136474a22051500d | [
"Apache-2.0"
] | 2 | 2021-12-16T10:32:07.000Z | 2022-02-28T17:08:52.000Z | # Copyright 2019 kubeflow.org.
#
# 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,... | 33.148438 | 120 | 0.662267 |
1fb32ccd8ade0d8234a40ab72f239ce1a199094b | 269 | py | Python | apps/calculator/urls.py | martync/zython | e008bbb33e212f0856e85b8594003402e0a635c0 | [
"Beerware"
] | null | null | null | apps/calculator/urls.py | martync/zython | e008bbb33e212f0856e85b8594003402e0a635c0 | [
"Beerware"
] | null | null | null | apps/calculator/urls.py | martync/zython | e008bbb33e212f0856e85b8594003402e0a635c0 | [
"Beerware"
] | null | null | null | from django.urls import re_path
from calculator import views
urlpatterns = [
re_path(r'^$',
views.CalculatorHomeView.as_view(),
name='calculator_home'),
re_path(r'^raw/abv/$',
views.ABVView.as_view(),
name='calculator_abv'),
]
| 20.692308 | 43 | 0.635688 |
86b7ca24c5fd14b1a354aa2e18151149fb240c5d | 6,490 | py | Python | rgd/geodata/urls.py | venkatabhishek/ResonantGeoData | 4e946e25c194874c22f4ba2ab49d6f0cf803e673 | [
"Apache-2.0"
] | null | null | null | rgd/geodata/urls.py | venkatabhishek/ResonantGeoData | 4e946e25c194874c22f4ba2ab49d6f0cf803e673 | [
"Apache-2.0"
] | null | null | null | rgd/geodata/urls.py | venkatabhishek/ResonantGeoData | 4e946e25c194874c22f4ba2ab49d6f0cf803e673 | [
"Apache-2.0"
] | null | null | null | from django.urls import path, register_converter
from . import api, views
class FloatUrlParameterConverter:
regex = r'-?[0-9]+\.?[0-9]+'
def to_python(self, value):
return float(value)
def to_url(self, value):
return str(value)
register_converter(FloatUrlParameterConverter, 'float')
... | 29.234234 | 126 | 0.591217 |
3f56ae56547e567a26d8b61a53f43b56e2364d30 | 23 | py | Python | ytmusicapi/_version.py | BruceZhang1993/ytmusicapi | 909d4d367a4c995a96a56e1d82d7d9a6a4471430 | [
"MIT"
] | 689 | 2020-02-19T02:09:48.000Z | 2022-03-31T18:32:14.000Z | ytmusicapi/_version.py | BruceZhang1993/ytmusicapi | 909d4d367a4c995a96a56e1d82d7d9a6a4471430 | [
"MIT"
] | 240 | 2020-04-03T08:05:43.000Z | 2022-02-22T13:47:42.000Z | ytmusicapi/_version.py | BruceZhang1993/ytmusicapi | 909d4d367a4c995a96a56e1d82d7d9a6a4471430 | [
"MIT"
] | 123 | 2020-04-01T00:16:51.000Z | 2022-03-23T00:54:54.000Z | __version__ = "0.19.5"
| 11.5 | 22 | 0.652174 |
0029cb3bf86c69d9577ffd7f54df5b05888954b6 | 1,420 | py | Python | test/basicpubsub/backend.py | arnoschn/AutobahnJS | 7e4b04f2062eee6eab01bda0b5850f54f948481d | [
"MIT"
] | null | null | null | test/basicpubsub/backend.py | arnoschn/AutobahnJS | 7e4b04f2062eee6eab01bda0b5850f54f948481d | [
"MIT"
] | null | null | null | test/basicpubsub/backend.py | arnoschn/AutobahnJS | 7e4b04f2062eee6eab01bda0b5850f54f948481d | [
"MIT"
] | null | null | null | ###############################################################################
##
## Copyright (C) 2014 Tavendo GmbH
##
## 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:/... | 29.583333 | 79 | 0.628169 |
b2bb1e6093097ea5db2fea73786ede54c23d2f88 | 21,724 | py | Python | 3rdparty/pytorch/test/test_indexing.py | WoodoLee/TorchCraft | 999f68aab9e7d50ed3ae138297226dc95fefc458 | [
"MIT"
] | null | null | null | 3rdparty/pytorch/test/test_indexing.py | WoodoLee/TorchCraft | 999f68aab9e7d50ed3ae138297226dc95fefc458 | [
"MIT"
] | null | null | null | 3rdparty/pytorch/test/test_indexing.py | WoodoLee/TorchCraft | 999f68aab9e7d50ed3ae138297226dc95fefc458 | [
"MIT"
] | null | null | null | from common_utils import TestCase, run_tests
import torch
import warnings
from torch import tensor
import unittest
class TestIndexing(TestCase):
def test_single_int(self):
v = torch.randn(5, 7, 3)
self.assertEqual(v[4].shape, (7, 3))
def test_multiple_int(self):
v = torch.randn(5, 7, ... | 38.381625 | 118 | 0.568358 |
6cba07b99d4ad8fe81745302f6fbd4c3f5a6ece6 | 16,484 | py | Python | dojango/management/commands/dojobuild.py | ofirr/dojango | 9856ca4a0194f59a5fe41cc32739e36eaa1f4bc3 | [
"BSD-3-Clause"
] | 1 | 2016-12-27T09:46:02.000Z | 2016-12-27T09:46:02.000Z | dojango/management/commands/dojobuild.py | ofirr/dojango | 9856ca4a0194f59a5fe41cc32739e36eaa1f4bc3 | [
"BSD-3-Clause"
] | null | null | null | dojango/management/commands/dojobuild.py | ofirr/dojango | 9856ca4a0194f59a5fe41cc32739e36eaa1f4bc3 | [
"BSD-3-Clause"
] | null | null | null | from optparse import make_option
import os
import re
import shutil
import subprocess # since python 2.4
import sys
from dojango.conf import settings
from dojango.version import version_tuple
try:
from django.core.management.base import BaseCommand, CommandError
except ImportError:
# Fake BaseCommand out so i... | 50.564417 | 199 | 0.58487 |
c6de4093e30b0e36784b53aa90cc5ef1bb027051 | 1,131 | py | Python | fluid/text_matching_on_quora/configs/basic_config.py | phlrain/models | 59adc0d6f38cd2351e16608d6c9d4e72dd5e7fea | [
"Apache-2.0"
] | 1 | 2018-11-23T10:29:49.000Z | 2018-11-23T10:29:49.000Z | fluid/PaddleNLP/text_matching_on_quora/configs/basic_config.py | ThinkPeace/models | 5d25e00c94943e50e64780a244136f88f13c0a88 | [
"Apache-2.0"
] | null | null | null | fluid/PaddleNLP/text_matching_on_quora/configs/basic_config.py | ThinkPeace/models | 5d25e00c94943e50e64780a244136f88f13c0a88 | [
"Apache-2.0"
] | 2 | 2018-06-14T13:59:36.000Z | 2018-11-14T12:34:47.000Z | from __future__ import print_function
class config(object):
def __init__(self):
self.batch_size = 128
self.epoch_num = 50
self.optimizer_type = 'adam' # sgd, adagrad
# pretrained word embedding
self.use_pretrained_word_embedding = True
# when employing pr... | 26.302326 | 90 | 0.635721 |
eb146632cb3be5761b0d50bd7f5829b60284d624 | 77,932 | py | Python | helpers/Gui.py | calebtrahan/KujiIn_Python | 0599d36993fa1d5988a4cf3206a12fdbe63781d8 | [
"MIT"
] | null | null | null | helpers/Gui.py | calebtrahan/KujiIn_Python | 0599d36993fa1d5988a4cf3206a12fdbe63781d8 | [
"MIT"
] | null | null | null | helpers/Gui.py | calebtrahan/KujiIn_Python | 0599d36993fa1d5988a4cf3206a12fdbe63781d8 | [
"MIT"
] | null | null | null | from utils import Tools
def _fromUtf8(s): return s
import math
from PyQt4.QtGui import *
from PyQt4.QtCore import *
from PyQt4 import QtCore, QtGui
from PyQt4.phonon import Phonon
from main_const import *
from helpers import Help
from helpers import Database, Reference
from utils import Tools
class KujiDesign(Q... | 64.997498 | 711 | 0.702702 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.