hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
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
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
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
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
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
2
1.02M
avg_line_length
float64
1
417k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
1 class
is_sharp_comment_removed
bool
1 class
f71b5b6b59934a264b9a46047b70741641a2db51
10,504
py
Python
tests/test_clone.py
mohammadroghani/django-clone
603037194ae43f5e2eb96bd0aa159c1fbcf8c51c
[ "MIT" ]
null
null
null
tests/test_clone.py
mohammadroghani/django-clone
603037194ae43f5e2eb96bd0aa159c1fbcf8c51c
[ "MIT" ]
null
null
null
tests/test_clone.py
mohammadroghani/django-clone
603037194ae43f5e2eb96bd0aa159c1fbcf8c51c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Django Clone - https://github.com/mohammadroghani/django-clone # Copyright © 2016 Mohammad Roghani <mohammadroghani43@gmail.com> # Copyright © 2016 Amir Keivan Mohtashami <akmohtashami97@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this soft...
47.315315
236
0.680217
from django.test import TestCase from django.utils import timezone from django_clone.clone import Cloner from tests.models import * def get_information_list(object_list): information_list = [] for object in object_list: information_list.append((object.pk, object.__module__ + "...
true
true
f71b5cd7fa3f30ff2ff0a5a2c5acbd05b042c711
497
py
Python
examples/example_proj/dependency_app_o2o/migrations/0001_initial.py
philsupertramp/dj-migration-test
97ec4513b9848d96436907de7940841866895e3c
[ "MIT" ]
4
2019-07-05T19:32:07.000Z
2020-02-07T00:47:15.000Z
examples/example_proj/dependency_app_o2o/migrations/0001_initial.py
philsupertramp/dj-migration-test
97ec4513b9848d96436907de7940841866895e3c
[ "MIT" ]
17
2019-08-23T07:21:23.000Z
2021-09-22T18:44:26.000Z
examples/example_proj/dependency_app_o2o/migrations/0001_initial.py
philsupertramp/dj-migration-test
97ec4513b9848d96436907de7940841866895e3c
[ "MIT" ]
null
null
null
# Generated by Django 2.2.3 on 2019-07-27 12:22 from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='DepModO2O', fields=[ ('id', models.AutoFiel...
22.590909
114
0.583501
from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='DepModO2O', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serializ...
true
true
f71b5d0be6cfd82d1e2beb6b6ec45e9a21282a6a
1,163
py
Python
src/bot.py
Shignum/ShiggyBot
292d99300dea55848d1aa458c8b8893a8dd78fc2
[ "MIT" ]
null
null
null
src/bot.py
Shignum/ShiggyBot
292d99300dea55848d1aa458c8b8893a8dd78fc2
[ "MIT" ]
null
null
null
src/bot.py
Shignum/ShiggyBot
292d99300dea55848d1aa458c8b8893a8dd78fc2
[ "MIT" ]
null
null
null
import os from discord import Embed from discord import Intents from discord.ext import commands from dotenv import load_dotenv load_dotenv() intents = Intents.default() bot = commands.Bot(command_prefix=os.getenv('PREFIX')) TOKEN = os.getenv('BOT_TOKEN') @bot.event async def on_ready(): print(f'{bot.user} has ...
29.075
95
0.715391
import os from discord import Embed from discord import Intents from discord.ext import commands from dotenv import load_dotenv load_dotenv() intents = Intents.default() bot = commands.Bot(command_prefix=os.getenv('PREFIX')) TOKEN = os.getenv('BOT_TOKEN') @bot.event async def on_ready(): print(f'{bot.user} has ...
true
true
f71b5d97598ff53100bfb2598cdb30dd30469fd8
10,221
py
Python
client-py/iotdb/utils/IoTDBRpcDataSet.py
slawr/iotdb
96b5269f0fc6e02927563d4481da3bfb310fc7b1
[ "Apache-2.0" ]
null
null
null
client-py/iotdb/utils/IoTDBRpcDataSet.py
slawr/iotdb
96b5269f0fc6e02927563d4481da3bfb310fc7b1
[ "Apache-2.0" ]
27
2021-10-19T09:41:40.000Z
2022-03-30T16:22:17.000Z
client-py/iotdb/utils/IoTDBRpcDataSet.py
slawr/iotdb
96b5269f0fc6e02927563d4481da3bfb310fc7b1
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
37.577206
103
0.604246
import logging from thrift.transport import TTransport from iotdb.thrift.rpc.TSIService import TSFetchResultsReq, TSCloseOperationReq from iotdb.utils.IoTDBConstants import TSDataType logger = logging.getLogger("IoTDB") class IoTDBRpcDataSet(object): TIMESTAMP_STR = "Time" START_INDE...
true
true
f71b5dbf84e94f967043c63798744db773956c70
2,822
py
Python
awesome-bot.py
ksmirenko/awesome-irc-bot
2d39da7efc3621d737bcec458fc0f50ee7189e05
[ "MIT" ]
null
null
null
awesome-bot.py
ksmirenko/awesome-irc-bot
2d39da7efc3621d737bcec458fc0f50ee7189e05
[ "MIT" ]
null
null
null
awesome-bot.py
ksmirenko/awesome-irc-bot
2d39da7efc3621d737bcec458fc0f50ee7189e05
[ "MIT" ]
null
null
null
import re import socket import sys import threading from random import randint host = 'irc.freenode.org' port = 6667 nick = 'gabe_the_dog' real_name = 'Gabe the dog' channel = '#spbnet' size = 2048 youtube_prefix = 'https://www.youtube.com/watch?v=' gabe_the_dog_sources = [ 'i1H0leZhXcY', 'i11RMG_U3R4', '...
22.576
84
0.592488
import re import socket import sys import threading from random import randint host = 'irc.freenode.org' port = 6667 nick = 'gabe_the_dog' real_name = 'Gabe the dog' channel = '#spbnet' size = 2048 youtube_prefix = 'https://www.youtube.com/watch?v=' gabe_the_dog_sources = [ 'i1H0leZhXcY', 'i11RMG_U3R4', '...
true
true
f71b5dcfe6e6dcab397ded91c0b2aed0f4eaaa39
3,380
py
Python
drawSS.py
banroku/analySS
15ba9e9216f86a1bf74062eae479a3ce1c9c5a11
[ "MIT" ]
null
null
null
drawSS.py
banroku/analySS
15ba9e9216f86a1bf74062eae479a3ce1c9c5a11
[ "MIT" ]
null
null
null
drawSS.py
banroku/analySS
15ba9e9216f86a1bf74062eae479a3ce1c9c5a11
[ "MIT" ]
null
null
null
# coding=utf-8 def thinningSS(file, max_strain=10, interval=0.1): '''a function to conduct data thinning of SS curve at range (0, MAX_STRAIN), with INTERVAL This returns np.series of stress with strain in the index. FILE should be passed as dictionary containing following: 'name': name of sample l...
47.605634
126
0.628107
def thinningSS(file, max_strain=10, interval=0.1): import pandas as pd import numpy as np data = pd.read_csv(file['crv'], sep=',', encoding='shift_jis', skiprows=1, index_col=0) data_rlt = pd.read_csv(file['rlt'], sep=',', encoding='shift_jis') L = 64 b = float(data_rlt.iloc[2, 3]) ...
true
true
f71b5dd3b2f1f6ba21eafc9f59670a50d9efc222
207
py
Python
sciencer/expanders/__init__.py
SciencerIO/sciencer-toolkit
f17c4a5dfb6cc5dbabefe03b13eb1e5345f7b1b9
[ "MIT" ]
2
2022-03-28T17:27:21.000Z
2022-03-29T22:27:15.000Z
sciencer/expanders/__init__.py
SciencerIO/sciencer-toolkit
f17c4a5dfb6cc5dbabefe03b13eb1e5345f7b1b9
[ "MIT" ]
null
null
null
sciencer/expanders/__init__.py
SciencerIO/sciencer-toolkit
f17c4a5dfb6cc5dbabefe03b13eb1e5345f7b1b9
[ "MIT" ]
1
2022-03-28T14:47:53.000Z
2022-03-28T14:47:53.000Z
"""Sciencer Expanders""" from .expander import Expander from .expand_by_authors import ExpandByAuthors from .expand_by_references import ExpandByReferences from .expand_by_citations import ExpandByCitations
34.5
52
0.864734
from .expander import Expander from .expand_by_authors import ExpandByAuthors from .expand_by_references import ExpandByReferences from .expand_by_citations import ExpandByCitations
true
true
f71b5e233cb62b6fa8ba747a25edcddd0d4c142f
1,068
py
Python
get-git-lfs.py
rcmurphy/pre-commit-hooks
17fcaab5769b7628e872601d852d3dcf13c0930e
[ "MIT" ]
null
null
null
get-git-lfs.py
rcmurphy/pre-commit-hooks
17fcaab5769b7628e872601d852d3dcf13c0930e
[ "MIT" ]
null
null
null
get-git-lfs.py
rcmurphy/pre-commit-hooks
17fcaab5769b7628e872601d852d3dcf13c0930e
[ "MIT" ]
1
2016-05-06T15:27:07.000Z
2016-05-06T15:27:07.000Z
#!/usr/bin/env python3.4 """This is a script to install git-lfs to a tempdir for use in tests""" import io import os.path import shutil import tarfile from urllib.request import urlopen DOWNLOAD_PATH = ( 'https://github.com/github/git-lfs/releases/download/' 'v1.1.0/git-lfs-linux-amd64-1.1.0.tar.gz' ) PATH_IN_...
27.384615
71
0.661985
import io import os.path import shutil import tarfile from urllib.request import urlopen DOWNLOAD_PATH = ( 'https://github.com/github/git-lfs/releases/download/' 'v1.1.0/git-lfs-linux-amd64-1.1.0.tar.gz' ) PATH_IN_TAR = 'git-lfs-1.1.0/git-lfs' DEST_PATH = '/tmp/git-lfs/git-lfs' DEST_DIR = os.path.dirname(DEST...
true
true
f71b5e5ba3ad4fa2190d7a089a3fbcdfd842d9d6
4,150
py
Python
ptvs_virtualenv_proxy.py
SpaceTheArcher/test
469ba40a6e3a5719e90f521d851252b1d5499dab
[ "Apache-2.0" ]
null
null
null
ptvs_virtualenv_proxy.py
SpaceTheArcher/test
469ba40a6e3a5719e90f521d851252b1d5499dab
[ "Apache-2.0" ]
2
2020-06-05T18:25:57.000Z
2021-06-01T22:22:13.000Z
ptvs_virtualenv_proxy.py
bruno-zaccariello/test
469ba40a6e3a5719e90f521d851252b1d5499dab
[ "Apache-2.0" ]
null
null
null
# ############################################################################ # # Copyright (c) Microsoft Corporation. # # This source code is subject to terms and conditions of the Apache License, Version 2.0. A # copy of the license can be found in the License.html file at the root of this distribution. I...
34.87395
98
0.608675
true
true
f71b5f38bc0959d120c19af81b07d70402e40457
2,779
py
Python
bifurcation-diagram/run.py
ExplosiveJam/fickettmodel-reproducibility
e47af1d3e2513d35dad65c16d4fd68c23e505f87
[ "MIT" ]
1
2019-06-08T20:06:33.000Z
2019-06-08T20:06:33.000Z
bifurcation-diagram/run.py
ExplosiveJam/fickettmodel-reproducibility
e47af1d3e2513d35dad65c16d4fd68c23e505f87
[ "MIT" ]
null
null
null
bifurcation-diagram/run.py
ExplosiveJam/fickettmodel-reproducibility
e47af1d3e2513d35dad65c16d4fd68c23e505f87
[ "MIT" ]
1
2019-06-24T13:00:02.000Z
2019-06-24T13:00:02.000Z
#!/usr/bin/env python r""" Run many simulations with varying :math:`\theta`. The simulations are run. Separate script should plot bifurcation diagram. """ import argparse import os import sys import shutil import numpy as np from mpi4py import MPI from saf.fm.nonlinear import Config from saf.action import solve fr...
23.956897
78
0.640158
import argparse import os import sys import shutil import numpy as np from mpi4py import MPI from saf.fm.nonlinear import Config from saf.action import solve from saf.util import reset_logging TOTAL_THETAS = 251 FINAL_TIME = 1000 Q = 4 IO_FORMAT = 'numpy' FMT = '.3f' def _worker(tasks, rank): for t in task...
true
true
f71b5f65fde60a4fce5bcdd06e514fa54d419c62
2,762
py
Python
mwparserfromhell/nodes/wikilink.py
hperala/kontuwikibot
f409e6fb45adf4e553dc326d9fb3c0d29eda6373
[ "MIT" ]
null
null
null
mwparserfromhell/nodes/wikilink.py
hperala/kontuwikibot
f409e6fb45adf4e553dc326d9fb3c0d29eda6373
[ "MIT" ]
null
null
null
mwparserfromhell/nodes/wikilink.py
hperala/kontuwikibot
f409e6fb45adf4e553dc326d9fb3c0d29eda6373
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (C) 2012-2016 Ben Kurtovic <ben.kurtovic@gmail.com> # # 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 ...
33.277108
79
0.654598
from __future__ import unicode_literals from . import Node from ..compat import str from ..utils import parse_anything __all__ = ["Wikilink"] class Wikilink(Node): def __init__(self, title, text=None): super(Wikilink, self).__init__() self._title = title self._text ...
true
true
f71b5f8ccdadb4be20d3cb2813522c3537586cb1
2,254
py
Python
bcs-ui/backend/tests/container_service/observability/log_stream/test_log_stream.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
599
2019-06-25T03:20:46.000Z
2022-03-31T12:14:33.000Z
bcs-ui/backend/tests/container_service/observability/log_stream/test_log_stream.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
537
2019-06-27T06:03:44.000Z
2022-03-31T12:10:01.000Z
bcs-ui/backend/tests/container_service/observability/log_stream/test_log_stream.py
laodiu/bk-bcs
2a956a42101ff6487ff521fb3ef429805bfa7e26
[ "Apache-2.0" ]
214
2019-06-25T03:26:05.000Z
2022-03-31T07:52:03.000Z
# -*- coding: utf-8 -*- """ Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available. Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved. Licensed under the MIT License (the "License"); you may not use this file except in co...
35.777778
151
0.733807
import pytest from channels.testing import WebsocketCommunicator from backend.accounts.middlewares import BCSChannelAuthMiddlewareStack from backend.container_service.observability.log_stream.views import LogStreamHandler @pytest.fixture def session_id(api_client, project_id, cluster_id, namespace, pod_name, contai...
true
true
f71b5fa3d07b50277b17d00725bcbd1f7fff771e
6,977
py
Python
tensorflow/contrib/cmake/tools/create_def_file.py
uve/tensorflow
e08079463bf43e5963acc41da1f57e95603f8080
[ "Apache-2.0" ]
6
2022-02-04T18:12:24.000Z
2022-03-21T23:57:12.000Z
Lib/site-packages/tensorflow/contrib/cmake/tools/create_def_file.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/tensorflow/contrib/cmake/tools/create_def_file.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
1
2022-02-08T03:53:23.000Z
2022-02-08T03:53:23.000Z
# Copyright 2017 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...
38.546961
81
0.611151
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import codecs import os import re import subprocess import sys import tempfile UNDNAME = "undname.exe" DUMPBIN = "dumpbin.exe" EXCLUDE_RE = re.compile(r"RTTI|...
true
true
f71b5fa9abf8cdc0cf3fabe615159d23770b9aaa
4,790
py
Python
flanker/mime/message/headers/encodedword.py
skshetry/flanker
63d1cdf927777f49f97e8d7f01e105a3b0d25cd2
[ "Apache-2.0" ]
929
2015-01-01T11:14:21.000Z
2022-03-28T23:47:40.000Z
flanker/mime/message/headers/encodedword.py
skshetry/flanker
63d1cdf927777f49f97e8d7f01e105a3b0d25cd2
[ "Apache-2.0" ]
141
2015-01-10T19:02:03.000Z
2021-07-26T18:04:14.000Z
flanker/mime/message/headers/encodedword.py
skshetry/flanker
63d1cdf927777f49f97e8d7f01e105a3b0d25cd2
[ "Apache-2.0" ]
179
2015-01-01T18:42:46.000Z
2022-02-16T21:57:14.000Z
# coding:utf-8 import logging from base64 import b64encode import regex as re import six from flanker import _email from flanker.mime.message import charsets, errors _log = logging.getLogger(__name__) _RE_FOLDING_WHITE_SPACES = re.compile(r"(?:\n\r?|\r\n?)") # This spec refers to http://tools.ietf.org/html/rfc2047...
30.125786
80
0.56618
import logging from base64 import b64encode import regex as re import six from flanker import _email from flanker.mime.message import charsets, errors _log = logging.getLogger(__name__) _RE_FOLDING_WHITE_SPACES = re.compile(r"(?:\n\r?|\r\n?)") _RE_ENCODED_WORD = re.compile(r'''(?P<encodedWord> =\? ...
true
true
f71b5fdd3e686df0976041498cd2acf2ea0dd77c
352
py
Python
Exercicios/PythonExercicios/ex001 - 010/ex005.py
sggrilo/Curso-em-Video-Python
a0e6f3d80d89eb8709345a38e207d81a77891192
[ "MIT" ]
null
null
null
Exercicios/PythonExercicios/ex001 - 010/ex005.py
sggrilo/Curso-em-Video-Python
a0e6f3d80d89eb8709345a38e207d81a77891192
[ "MIT" ]
null
null
null
Exercicios/PythonExercicios/ex001 - 010/ex005.py
sggrilo/Curso-em-Video-Python
a0e6f3d80d89eb8709345a38e207d81a77891192
[ "MIT" ]
null
null
null
# ANTECESSOR E SUCESSOR — Faça um programa que leia um número # inteiro e mostre na tela o seu antecessor e o seu sucessor. n = int(input('Digite um número inteiro: ')) a = n - 1 s = n + 1 print('O antecessor de \033[4;33m{}\033[m equivale a \033[4;31m{}\033[m. '.format(n, a), end='') print('Seu sucessor equivale a ...
32
96
0.664773
n = int(input('Digite um número inteiro: ')) a = n - 1 s = n + 1 print('O antecessor de \033[4;33m{}\033[m equivale a \033[4;31m{}\033[m. '.format(n, a), end='') print('Seu sucessor equivale a \033[4;32m{}\033[m.'.format(s))
true
true
f71b5fe3a6cd69858a329449b4f2842d872d3cb0
27,953
py
Python
canvasapi/user.py
onomou/canvasapi
94d269e8e771bcf03fd57e235190aced3b5af87a
[ "MIT" ]
null
null
null
canvasapi/user.py
onomou/canvasapi
94d269e8e771bcf03fd57e235190aced3b5af87a
[ "MIT" ]
null
null
null
canvasapi/user.py
onomou/canvasapi
94d269e8e771bcf03fd57e235190aced3b5af87a
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function, unicode_literals from six import python_2_unicode_compatible, string_types import warnings from canvasapi.calendar_event import CalendarEvent from canvasapi.canvas_object import CanvasObject from canvasapi.communication_channel import CommunicationChan...
34.595297
120
0.615676
from __future__ import absolute_import, division, print_function, unicode_literals from six import python_2_unicode_compatible, string_types import warnings from canvasapi.calendar_event import CalendarEvent from canvasapi.canvas_object import CanvasObject from canvasapi.communication_channel import CommunicationChan...
true
true
f71b604290c4284cdb29c7ba708ed37267f359af
3,054
py
Python
copyright_updater/logger_factory.py
swasun/copyright-updater
750ced32ee9738e4d65189bc0e917e0581a59668
[ "MIT" ]
null
null
null
copyright_updater/logger_factory.py
swasun/copyright-updater
750ced32ee9738e4d65189bc0e917e0581a59668
[ "MIT" ]
null
null
null
copyright_updater/logger_factory.py
swasun/copyright-updater
750ced32ee9738e4d65189bc0e917e0581a59668
[ "MIT" ]
null
null
null
##################################################################################### # MIT License # # # # Copyright (C) 2018 Charly Lamothe ...
51.762712
119
0.47053
true
true
f71b60c66400900beffb67846939db70bfb9249f
4,381
py
Python
avax/webdav/tests/benchmarks.py
eavatar/avax.webdav
e4d4915fd5af8878ba88e3641e624e64033ece96
[ "MIT" ]
null
null
null
avax/webdav/tests/benchmarks.py
eavatar/avax.webdav
e4d4915fd5af8878ba88e3641e624e64033ece96
[ "MIT" ]
null
null
null
avax/webdav/tests/benchmarks.py
eavatar/avax.webdav
e4d4915fd5af8878ba88e3641e624e64033ece96
[ "MIT" ]
null
null
null
# -*- coding: iso-8859-1 -*- # (c) 2009-2014 Martin Wendt and contributors; see WsgiDAV https://github.com/mar10/wsgidav # Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php """ Benchmark suite for WsgiDAV. This test suite uses davclient to generate WebDAV requests. ...
31.070922
99
0.625428
import logging _benchmarks = [ "test_scripted", ] def _real_run_bench(bench, opts): if bench == "*": for bench in _benchmarks: run_bench(bench, opts) return assert bench in _benchmarks if bench ==...
true
true
f71b6170ec1ea5471b4314a0e09ef42e3e38daff
1,001
py
Python
project/urls.py
tgavankar/PlaydohSlideSync
5718d661e78d361a0dcda908b63c736bab886bb4
[ "BSD-3-Clause" ]
null
null
null
project/urls.py
tgavankar/PlaydohSlideSync
5718d661e78d361a0dcda908b63c736bab886bb4
[ "BSD-3-Clause" ]
null
null
null
project/urls.py
tgavankar/PlaydohSlideSync
5718d661e78d361a0dcda908b63c736bab886bb4
[ "BSD-3-Clause" ]
null
null
null
from django.conf import settings from django.conf.urls.defaults import patterns, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns from .examples import urls from funfactory.monkeypatches import patch patch() # Uncomment the next two lines to enable the admin: # from django.contrib import a...
27.805556
88
0.685315
from django.conf import settings from django.conf.urls.defaults import patterns, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns from .examples import urls from funfactory.monkeypatches import patch patch() urlpatterns = patterns('', (r'', include(urls)), (r'^ro...
true
true
f71b63178ebdc11ae83bec5b2f2f47ff8b336dd6
1,011
py
Python
src/sellers/migrations/0004_alter_seller_logo_url.py
evis-market/web-interface-backend
f8930ff1c009ad18e522ab29680b4bcd50a6020e
[ "MIT" ]
2
2021-08-30T22:58:32.000Z
2021-12-12T10:47:52.000Z
src/sellers/migrations/0004_alter_seller_logo_url.py
evis-market/web-interface-backend
f8930ff1c009ad18e522ab29680b4bcd50a6020e
[ "MIT" ]
null
null
null
src/sellers/migrations/0004_alter_seller_logo_url.py
evis-market/web-interface-backend
f8930ff1c009ad18e522ab29680b4bcd50a6020e
[ "MIT" ]
1
2021-08-22T19:12:44.000Z
2021-08-22T19:12:44.000Z
# Generated by Django 3.2.7 on 2021-10-27 07:05 import django.core.validators from django.db import migrations, models from django.db.transaction import atomic from sellers.models import Seller """ Note: Migrations includes data migration that set to null logo_url field for currently existing records. Logo_url fi...
26.605263
128
0.68546
import django.core.validators from django.db import migrations, models from django.db.transaction import atomic from sellers.models import Seller def clear_seller_logo_url(apps, schema_editor): with atomic(): for seller in Seller.objects.all(): seller.logo_url = None seller.sa...
true
true
f71b632bb314545ed7732ce47684f88d027b19e7
78
py
Python
xpring/proto/__init__.py
mvadari/xpring-py
b837420127d1c1e5051ed305ed4f19fe9910a4f6
[ "0BSD" ]
6
2019-12-11T00:54:56.000Z
2021-03-11T19:44:44.000Z
xpring/proto/__init__.py
mvadari/xpring-py
b837420127d1c1e5051ed305ed4f19fe9910a4f6
[ "0BSD" ]
null
null
null
xpring/proto/__init__.py
mvadari/xpring-py
b837420127d1c1e5051ed305ed4f19fe9910a4f6
[ "0BSD" ]
9
2020-02-28T18:40:46.000Z
2022-02-28T23:01:09.000Z
# The rest of this package, but not this __init__.py, is generated by protoc.
39
77
0.75641
true
true
f71b6354cd7ddb3ba58cc906feac3f6233ca894c
537
py
Python
ImgVidProcessing/Exercise1/solution1.py
SystemNinja/MyPythonPrograms
6bdebb5017994c3431aea769319f702075fff9b9
[ "MIT" ]
null
null
null
ImgVidProcessing/Exercise1/solution1.py
SystemNinja/MyPythonPrograms
6bdebb5017994c3431aea769319f702075fff9b9
[ "MIT" ]
null
null
null
ImgVidProcessing/Exercise1/solution1.py
SystemNinja/MyPythonPrograms
6bdebb5017994c3431aea769319f702075fff9b9
[ "MIT" ]
null
null
null
""" This solution implements glob library in order to 'automatize' task. Instead of manually processing each image Reference: https://pymotw.com/2/glob/ """ import cv2 import glob2 images=glob2.glob("*.jpg") #images=glob2.glob("Exercise1\*.jpg") for image in images: img=cv2.imread(image, 0) ...
25.571429
69
0.670391
import cv2 import glob2 images=glob2.glob("*.jpg") for image in images: img=cv2.imread(image, 0) re=cv2.resize(img,(100,100)) cv2.imshow("Resized image", re) cv2.waitKey(500) cv2.destroyAllWindows() cv2.imwrite(image+"_resized.jpg", re)
true
true
f71b63892ebbad403e4916b665b53156a244c0fa
87
py
Python
Python/100Excersises/.history/51 to 75/69/69_20201119121845.py
magusikrak/NAMI-TERM-I-GroupWork
f0a9a5f219ccbec024eb5316361db3fca46e171c
[ "MIT" ]
null
null
null
Python/100Excersises/.history/51 to 75/69/69_20201119121845.py
magusikrak/NAMI-TERM-I-GroupWork
f0a9a5f219ccbec024eb5316361db3fca46e171c
[ "MIT" ]
1
2021-07-24T03:18:30.000Z
2021-07-24T12:45:07.000Z
Python/100Excersises/.history/51 to 75/69/69_20201119121845.py
magusikrak/NAMI-TERM-I-GroupWork
f0a9a5f219ccbec024eb5316361db3fca46e171c
[ "MIT" ]
null
null
null
import requests sugam = requests.get("http://www.pythonhow.com") print(rp.text[:100])
17.4
48
0.724138
import requests sugam = requests.get("http://www.pythonhow.com") print(rp.text[:100])
true
true
f71b64529d9237153dd6f12a58b0280dfcb69bfe
454
py
Python
.history/ClassFiles/WorkingWithExternalFiles/FileHandling_20210107190119.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/WorkingWithExternalFiles/FileHandling_20210107190119.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
.history/ClassFiles/WorkingWithExternalFiles/FileHandling_20210107190119.py
minefarmer/Comprehensive-Python
f97b9b83ec328fc4e4815607e6a65de90bb8de66
[ "Unlicense" ]
null
null
null
""" Opening and Reading Files Syntax to open file. f = open("Myfile.txt) # assigned to the variable f. f = open("Myfile.txt","rt") # if in the same directory. f = open("c:\\MyFolders\Myfile.txt") # if hot in the same directory. """ f = open("Quotes.txt") # print(f.readable()) # print(...
15.655172
69
0.594714
f = open("Quotes.txt") print(f.read(11)) print(f.readlines()) for quote in f: print(quote) print("HI")
true
true
f71b64ca7afadced29875edb91d99ac16e7d6ba0
11,148
py
Python
src/main/app-resources/notebook/libexec/helpers.py
ec-better/ewf-ethz-03-01-01
5ca616e5c25bbba29013a7de248af4b69757921b
[ "Apache-2.0" ]
1
2021-09-23T02:20:11.000Z
2021-09-23T02:20:11.000Z
src/main/app-resources/notebook/libexec/helpers.py
ec-better/ewf-ethz-03-01-01
5ca616e5c25bbba29013a7de248af4b69757921b
[ "Apache-2.0" ]
null
null
null
src/main/app-resources/notebook/libexec/helpers.py
ec-better/ewf-ethz-03-01-01
5ca616e5c25bbba29013a7de248af4b69757921b
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import os import numpy as np import cv2 import re from shapely import wkt from shapely.geometry import box, Polygon import pandas as pd import geopandas as gpd from osgeo import gdal, gdalnumeric, osr, ogr def ensure_dir(file_path): directory = os.path.dirname(file_path) if not os.pat...
33.884498
157
0.591137
import os import numpy as np import cv2 import re from shapely import wkt from shapely.geometry import box, Polygon import pandas as pd import geopandas as gpd from osgeo import gdal, gdalnumeric, osr, ogr def ensure_dir(file_path): directory = os.path.dirname(file_path) if not os.path.exists(directory): ...
true
true
f71b651c18866a5ae438540b4c87f225edab7b8a
21,388
py
Python
gym_let_mpc/let_mpc.py
eivindeb/gym-letMPC
7041aa56a25aa9a1c749088f2b370c910d21fe75
[ "MIT" ]
6
2020-12-04T18:15:29.000Z
2022-02-26T11:01:31.000Z
gym_let_mpc/let_mpc.py
eivindeb/gym-letMPC
7041aa56a25aa9a1c749088f2b370c910d21fe75
[ "MIT" ]
null
null
null
gym_let_mpc/let_mpc.py
eivindeb/gym-letMPC
7041aa56a25aa9a1c749088f2b370c910d21fe75
[ "MIT" ]
5
2021-03-08T06:00:27.000Z
2021-11-22T08:14:12.000Z
import gym from gym.utils import seeding import numpy as np import json from gym_let_mpc.simulator import ControlSystem from gym_let_mpc.controllers import ETMPC, AHMPC import collections.abc import matplotlib.pyplot as plt from gym_let_mpc.utils import str_replace_whole_words import copy class LetMPCEnv(gym.Env): ...
47.423503
164
0.565738
import gym from gym.utils import seeding import numpy as np import json from gym_let_mpc.simulator import ControlSystem from gym_let_mpc.controllers import ETMPC, AHMPC import collections.abc import matplotlib.pyplot as plt from gym_let_mpc.utils import str_replace_whole_words import copy class LetMPCEnv(gym.Env): ...
true
true
f71b65b3b003148f57d2ed310d5f76f0d067c474
933
py
Python
violas_client/canoser/bool_t.py
violas-core/violas-client
e8798f7d081ac218b78b81fd7eb2f8da92631a16
[ "MIT" ]
null
null
null
violas_client/canoser/bool_t.py
violas-core/violas-client
e8798f7d081ac218b78b81fd7eb2f8da92631a16
[ "MIT" ]
null
null
null
violas_client/canoser/bool_t.py
violas-core/violas-client
e8798f7d081ac218b78b81fd7eb2f8da92631a16
[ "MIT" ]
1
2022-01-05T06:49:42.000Z
2022-01-05T06:49:42.000Z
from violas_client.canoser.base import Base class BoolT(Base): @classmethod def encode(self, value): if value: return b'\1' else: return b'\0' @classmethod def decode_bytes(self, value): if value == b'\0': return False e...
23.923077
66
0.543408
from violas_client.canoser.base import Base class BoolT(Base): @classmethod def encode(self, value): if value: return b'\1' else: return b'\0' @classmethod def decode_bytes(self, value): if value == b'\0': return False e...
true
true
f71b6618acab7a74ff8f4e811e451717d08dc511
1,097
py
Python
4.conditionals/challenge3_rouillonh.py
rouillonh/ChallengePython
7e7d9b69f60394fd1f00a6a4aa32f97de95b1b92
[ "MIT" ]
null
null
null
4.conditionals/challenge3_rouillonh.py
rouillonh/ChallengePython
7e7d9b69f60394fd1f00a6a4aa32f97de95b1b92
[ "MIT" ]
null
null
null
4.conditionals/challenge3_rouillonh.py
rouillonh/ChallengePython
7e7d9b69f60394fd1f00a6a4aa32f97de95b1b92
[ "MIT" ]
null
null
null
print("\tWelcome to the Voter Registration App") #Pedimos nombre y edad para asi registrar su voto name = input("\nPlease enter your name: ").title() age = int(input("Please enter your age: ")) partidos = ['Republican','Democratic','Independent','Libertarian','Green'] #Si es mayor de edad, podrá votar if age >= 18: ...
43.88
80
0.65907
print("\tWelcome to the Voter Registration App") name = input("\nPlease enter your name: ").title() age = int(input("Please enter your age: ")) partidos = ['Republican','Democratic','Independent','Libertarian','Green'] if age >= 18: print("\nCongratulations ",name,"! You are old enough to register to vote.")...
true
true
f71b6745cb39d3ccd6a45e1c0ecd693cdffb6acf
2,559
py
Python
etc/mtrace/parse_mtrace.py
diamantopoulos/memluv
f3a283d65f07b19d48589e02ac484563e12e22e8
[ "Apache-2.0" ]
9
2015-12-16T08:05:06.000Z
2022-02-25T08:29:30.000Z
etc/mtrace/parse_mtrace.py
diamantopoulos/memluv
f3a283d65f07b19d48589e02ac484563e12e22e8
[ "Apache-2.0" ]
1
2022-02-26T07:40:23.000Z
2022-03-15T03:27:59.000Z
etc/mtrace/parse_mtrace.py
diamantopoulos/memluv
f3a283d65f07b19d48589e02ac484563e12e22e8
[ "Apache-2.0" ]
null
null
null
""" Parsing a mtrace log file and append to timeline-footprint format """ from numpy import * import numpy as np import glob import os import linecache import csv # 1038 bytes is the size of a heap log file with no heap activity (only heap info) def ValidHeapFile(fpath): header_lines=1 with open(fpath) as f: line...
34.581081
126
0.569754
from numpy import * import numpy as np import glob import os import linecache import csv def ValidHeapFile(fpath): header_lines=1 with open(fpath) as f: lines = len(list(f)) return True if os.path.isfile(fpath) and lines > header_lines else False print ("INFO: --------------------- \nINFO: Parsing mtrace logs ...
true
true
f71b675d58f0489d8b6561c581bfe700396f87fb
965
py
Python
python/day12-2.py
Aerdan/adventcode-2020
83120aa8c7fc9d1f2d34780610401e3c6d4f583b
[ "BSD-1-Clause" ]
null
null
null
python/day12-2.py
Aerdan/adventcode-2020
83120aa8c7fc9d1f2d34780610401e3c6d4f583b
[ "BSD-1-Clause" ]
null
null
null
python/day12-2.py
Aerdan/adventcode-2020
83120aa8c7fc9d1f2d34780610401e3c6d4f583b
[ "BSD-1-Clause" ]
null
null
null
#!/usr/bin/env python3 from math import sin, cos, radians data = [] with open('input12.txt') as f: for line in f: data.append(line.strip()) x, y = 10, 1 sx, sy = 0, 0 d = 'E' c = 'NESW' for line in data: insn = line[0] dist = int(line[1:]) if insn == 'F': # move to waypoint dist t...
19.693878
42
0.449741
from math import sin, cos, radians data = [] with open('input12.txt') as f: for line in f: data.append(line.strip()) x, y = 10, 1 sx, sy = 0, 0 d = 'E' c = 'NESW' for line in data: insn = line[0] dist = int(line[1:]) if insn == 'F': for i in range(dist): sx +...
true
true
f71b693c8f73a9ec5102fb39ced2b8f6a4ea8b4b
511
py
Python
tcfcli/cmds/local/libs/local/debug_context.py
tencentyun/scfcli
ef15508ad34a851cf0d2750dfaa5202f6a600887
[ "Apache-2.0" ]
103
2019-06-11T06:09:56.000Z
2021-12-18T22:48:59.000Z
tcfcli/cmds/local/libs/local/debug_context.py
TencentCloud/Serverless-cli
57f98b24cfd10712770a4806212cfb69d981a11a
[ "Apache-2.0" ]
8
2019-07-12T12:08:40.000Z
2020-10-20T07:18:17.000Z
tcfcli/cmds/local/libs/local/debug_context.py
TencentCloud/Serverless-cli
57f98b24cfd10712770a4806212cfb69d981a11a
[ "Apache-2.0" ]
49
2019-06-11T06:26:05.000Z
2020-02-19T08:13:36.000Z
# -*- coding: utf-8 -*- import os class DebugContext(object): def __init__(self, debug_port=None, debugger_path=None, debug_args=None): self.debug_port = debug_port self.debugger_path = debugger_path self.debug_args = debug_args ...
21.291667
48
0.579256
import os class DebugContext(object): def __init__(self, debug_port=None, debugger_path=None, debug_args=None): self.debug_port = debug_port self.debugger_path = debugger_path self.debug_args = debug_args if self.debug_port: ...
true
true
f71b6aed9afed4cf56533fb2127e350f2b0dc11b
289
py
Python
tests/integration/test_notes.py
mhk001/python-alerta-client
6e02f8a2245cef223df3048d445921e1ba90ad1c
[ "Apache-2.0" ]
20
2017-04-14T08:05:48.000Z
2022-01-11T06:26:17.000Z
tests/integration/test_notes.py
mhk001/python-alerta-client
6e02f8a2245cef223df3048d445921e1ba90ad1c
[ "Apache-2.0" ]
99
2016-09-30T20:53:05.000Z
2022-03-14T10:00:59.000Z
tests/integration/test_notes.py
mhk001/python-alerta-client
6e02f8a2245cef223df3048d445921e1ba90ad1c
[ "Apache-2.0" ]
33
2016-10-04T20:44:58.000Z
2022-03-04T21:35:49.000Z
import unittest from alertaclient.api import Client class AlertTestCase(unittest.TestCase): def setUp(self): self.client = Client(endpoint='http://api:8080', key='demo-key') def test_notes(self): # add tests here when /notes endpoints are created pass
20.642857
72
0.681661
import unittest from alertaclient.api import Client class AlertTestCase(unittest.TestCase): def setUp(self): self.client = Client(endpoint='http://api:8080', key='demo-key') def test_notes(self): pass
true
true
f71b6b5b67e80a03f5062113889382389fc8dc72
29,281
py
Python
resource/pypi/cryptography-1.7.1/tests/hazmat/primitives/fixtures_rsa.py
hipnusleo/Laserjet
f53e0b740f48f2feb0c0bb285ec6728b313b4ccc
[ "Apache-2.0" ]
null
null
null
resource/pypi/cryptography-1.7.1/tests/hazmat/primitives/fixtures_rsa.py
hipnusleo/Laserjet
f53e0b740f48f2feb0c0bb285ec6728b313b4ccc
[ "Apache-2.0" ]
null
null
null
resource/pypi/cryptography-1.7.1/tests/hazmat/primitives/fixtures_rsa.py
hipnusleo/Laserjet
f53e0b740f48f2feb0c0bb285ec6728b313b4ccc
[ "Apache-2.0" ]
null
null
null
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function from cryptography.hazmat.primitives.asymmetric.rsa import ( RS...
48.478477
80
0.765787
from __future__ import absolute_import, division, print_function from cryptography.hazmat.primitives.asymmetric.rsa import ( RSAPrivateNumbers, RSAPublicNumbers ) RSA_KEY_512 = RSAPrivateNumbers( p=int( "d57846898d5c0de249c08467586cb458fa9bc417cdf297f73cfc52281b787cd9", 16 ), ...
true
true
f71b6b65aa6aa47c57fda3ac6483ee6b1a2be140
239
py
Python
more-python-for-beginners/03 - Classes/basic_class.py
CloudBreadPaPa/c9-python-getting-started
c49580be5e7e88a480d05596a7a53c89d0be7dd3
[ "MIT" ]
null
null
null
more-python-for-beginners/03 - Classes/basic_class.py
CloudBreadPaPa/c9-python-getting-started
c49580be5e7e88a480d05596a7a53c89d0be7dd3
[ "MIT" ]
null
null
null
more-python-for-beginners/03 - Classes/basic_class.py
CloudBreadPaPa/c9-python-getting-started
c49580be5e7e88a480d05596a7a53c89d0be7dd3
[ "MIT" ]
1
2021-09-12T15:34:13.000Z
2021-09-12T15:34:13.000Z
class Presenter(): def __init__(self, name): # 생성자(Constructor) self.name = name def say_hello(self): # 메서드(method) print('Hello, ' + self.name) presenter = Presenter('Chris') presenter.name = 'Christopher' presenter.say_hello()
21.727273
30
0.698745
class Presenter(): def __init__(self, name): self.name = name def say_hello(self): print('Hello, ' + self.name) presenter = Presenter('Chris') presenter.name = 'Christopher' presenter.say_hello()
true
true
f71b6c3e8f25504c53f9b02239b585cd06f3f509
1,080
py
Python
posts/views.py
hamzabell/hackernews_mvp
54beff25f6d23f42b39a13dfe0c289768faa4c3d
[ "MIT" ]
null
null
null
posts/views.py
hamzabell/hackernews_mvp
54beff25f6d23f42b39a13dfe0c289768faa4c3d
[ "MIT" ]
null
null
null
posts/views.py
hamzabell/hackernews_mvp
54beff25f6d23f42b39a13dfe0c289768faa4c3d
[ "MIT" ]
null
null
null
from django.core.checks import messages from rest_framework import generics from rest_framework.response import Response from posts.models import Post from .serializers import PostSerializer, UpVoteSerializer class PostList(generics.ListCreateAPIView): queryset = Post.objects.all() serializer_class = PostSer...
26.341463
62
0.682407
from django.core.checks import messages from rest_framework import generics from rest_framework.response import Response from posts.models import Post from .serializers import PostSerializer, UpVoteSerializer class PostList(generics.ListCreateAPIView): queryset = Post.objects.all() serializer_class = PostSer...
true
true
f71b6d9c04fe09d52e0af50a82d2a1e90ad0f9f1
8,352
py
Python
estimagic/tests/differentiation/test_derivatives.py
vishalbelsare/estimagic
afae1be3a1566056d11962c495b67e64bc4a0822
[ "BSD-3-Clause" ]
null
null
null
estimagic/tests/differentiation/test_derivatives.py
vishalbelsare/estimagic
afae1be3a1566056d11962c495b67e64bc4a0822
[ "BSD-3-Clause" ]
null
null
null
estimagic/tests/differentiation/test_derivatives.py
vishalbelsare/estimagic
afae1be3a1566056d11962c495b67e64bc4a0822
[ "BSD-3-Clause" ]
null
null
null
from functools import partial from pathlib import Path import numpy as np import pandas as pd import pytest from numpy.testing import assert_array_almost_equal as aaae from pandas.testing import assert_frame_equal from scipy.optimize._numdiff import approx_derivative from estimagic.differentiation.derivatives import ...
32.498054
88
0.639727
from functools import partial from pathlib import Path import numpy as np import pandas as pd import pytest from numpy.testing import assert_array_almost_equal as aaae from pandas.testing import assert_frame_equal from scipy.optimize._numdiff import approx_derivative from estimagic.differentiation.derivatives import ...
true
true
f71b6dab14627d4699e80c6acbce3ef420b0a543
35
py
Python
ciphey/basemods/Searchers/__init__.py
paramint/ciphey
26195dfe1f216c3d43d07b50279b64eb026f0c13
[ "MIT" ]
1
2021-05-30T19:55:00.000Z
2021-05-30T19:55:00.000Z
ciphey/basemods/Searchers/__init__.py
usama7628674/Ciphey
e18801c506e93e7e9377d0bbc6870ecd84ae2f61
[ "MIT" ]
4
2020-11-13T19:01:56.000Z
2022-02-10T02:14:00.000Z
ciphey/basemods/Searchers/__init__.py
usama7628674/Ciphey
e18801c506e93e7e9377d0bbc6870ecd84ae2f61
[ "MIT" ]
null
null
null
from . import ausearch, perfection
17.5
34
0.8
from . import ausearch, perfection
true
true
f71b6e4295ed13a2ac4d43cdf95ee46cabd50a60
18,334
py
Python
python/helpers/pycharm/teamcity/pytest_plugin.py
janchochol/intellij-community
fce543ac6018b411e519fe01ddc71a8c1bbd138b
[ "Apache-2.0" ]
null
null
null
python/helpers/pycharm/teamcity/pytest_plugin.py
janchochol/intellij-community
fce543ac6018b411e519fe01ddc71a8c1bbd138b
[ "Apache-2.0" ]
null
null
null
python/helpers/pycharm/teamcity/pytest_plugin.py
janchochol/intellij-community
fce543ac6018b411e519fe01ddc71a8c1bbd138b
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 """ Aaron Buchanan Nov. 2012 Plug-in for py.test for reporting to TeamCity server Report results to TeamCity during test execution for immediate reporting when using TeamCity. This should be installed as a py.test plugin and will be automatically enabled by running tests under TeamCity build. """ ...
38.761099
128
0.608432
import os import pprint import sys import re import traceback from datetime import timedelta from teamcity.messages import TeamcityServiceMessages from teamcity.common import convert_error_to_string, dump_test_stderr, dump_test_stdout from teamcity import is_running_under_teamcity from teamcity import diff_tools di...
true
true
f71b6ec1ac6a3e138fec3e28c7e2f2eda3b7aa07
2,948
py
Python
mayan/apps/mayan_statistics/views.py
sophiawa/Mayan-EDMS
42f20576d0c690b645a60bf53c5169cda4264231
[ "Apache-2.0" ]
null
null
null
mayan/apps/mayan_statistics/views.py
sophiawa/Mayan-EDMS
42f20576d0c690b645a60bf53c5169cda4264231
[ "Apache-2.0" ]
10
2021-03-19T23:48:12.000Z
2022-03-12T00:41:49.000Z
mayan/apps/mayan_statistics/views.py
sophiawa/Mayan-EDMS
42f20576d0c690b645a60bf53c5169cda4264231
[ "Apache-2.0" ]
1
2020-12-17T02:35:09.000Z
2020-12-17T02:35:09.000Z
from django.contrib import messages from django.http import Http404 from django.utils.translation import ugettext_lazy as _ from mayan.apps.common.generics import ConfirmView, SimpleView, SingleObjectListView from .classes import Statistic, StatisticNamespace from .permissions import permission_statistics_view from ....
31.031579
84
0.636364
from django.contrib import messages from django.http import Http404 from django.utils.translation import ugettext_lazy as _ from mayan.apps.common.generics import ConfirmView, SimpleView, SingleObjectListView from .classes import Statistic, StatisticNamespace from .permissions import permission_statistics_view from ....
true
true
f71b6ef7a59d7d39b2bcee735e05d0bb4fe7d665
2,447
py
Python
display_recognized_faces.py
theTechie/face-recognition
4236405914971fa971eb8dab7f31022f154ac10b
[ "MIT" ]
null
null
null
display_recognized_faces.py
theTechie/face-recognition
4236405914971fa971eb8dab7f31022f154ac10b
[ "MIT" ]
null
null
null
display_recognized_faces.py
theTechie/face-recognition
4236405914971fa971eb8dab7f31022f154ac10b
[ "MIT" ]
null
null
null
import face_recognition from PIL import Image, ImageDraw from pathlib import Path import recognize_face known_path = Path("data/sample-2/jpeg/picked/known") known_images = list(known_path.glob('*.jpeg')) known_face_encodings = [] known_face_names = [] known_faces = [recognize_face.image_to_known_face(str(image_path)...
38.84127
115
0.707805
import face_recognition from PIL import Image, ImageDraw from pathlib import Path import recognize_face known_path = Path("data/sample-2/jpeg/picked/known") known_images = list(known_path.glob('*.jpeg')) known_face_encodings = [] known_face_names = [] known_faces = [recognize_face.image_to_known_face(str(image_path)...
true
true
f71b6fe68084b084c7f741b11c1012ffaf12dd0a
3,230
py
Python
srv/fluffi/data/fluffiweb/app/utils/ftp.py
sears-s/fluffi
5f2f6d019041a6268199b69bf2f34487b18b84fe
[ "MIT" ]
96
2019-09-19T10:28:05.000Z
2022-02-28T11:53:06.000Z
srv/fluffi/data/fluffiweb/app/utils/ftp.py
sears-s/fluffi
5f2f6d019041a6268199b69bf2f34487b18b84fe
[ "MIT" ]
123
2019-11-19T09:47:14.000Z
2021-10-19T03:10:51.000Z
srv/fluffi/data/fluffiweb/app/utils/ftp.py
sears-s/fluffi
5f2f6d019041a6268199b69bf2f34487b18b84fe
[ "MIT" ]
23
2019-11-11T06:04:56.000Z
2022-02-11T15:35:26.000Z
# Copyright 2017-2020 Siemens AG # # 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, merge, publish, distri...
35.108696
107
0.653251
from ftplib import FTP class FTPConnector: def __init__(self, ftpURL): self.ftpURL = ftpURL self.ftpClient = FTP() def getListOfFilesOnFTPServer(self, path): self.ftpClient.connect(self.ftpURL) self.ftpClient.login() self.ftpClient.cwd(path) ...
true
true
f71b701cb0a9f7edf9be18a1b9115d0dbedac0c4
17,383
py
Python
examples/language_model/bert/run_glue.py
weiwei1115/PaddleNLP
dd98f7f8b25b41d39228ba8a958b11a6212709a3
[ "Apache-2.0" ]
1
2021-02-24T14:03:55.000Z
2021-02-24T14:03:55.000Z
examples/language_model/bert/run_glue.py
weiwei1115/PaddleNLP
dd98f7f8b25b41d39228ba8a958b11a6212709a3
[ "Apache-2.0" ]
null
null
null
examples/language_model/bert/run_glue.py
weiwei1115/PaddleNLP
dd98f7f8b25b41d39228ba8a958b11a6212709a3
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2020 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 appli...
38.037199
115
0.611805
import argparse import logging import os import sys import random import time import math import distutils.util from functools import partial import numpy as np import paddle from paddle.io import DataLoader from paddle.metric import Metric, Accuracy, Precision, Recall from paddlenlp.datasets import Glu...
true
true
f71b70742d77f2a612297f4412d6829e00b6cebd
21,406
py
Python
pypureclient/flasharray/FA_2_13/api/file_systems_api.py
ashahid-ps/py-pure-client
2e3565d37b2a41db69308769f6f485d08a7c46c3
[ "BSD-2-Clause" ]
null
null
null
pypureclient/flasharray/FA_2_13/api/file_systems_api.py
ashahid-ps/py-pure-client
2e3565d37b2a41db69308769f6f485d08a7c46c3
[ "BSD-2-Clause" ]
null
null
null
pypureclient/flasharray/FA_2_13/api/file_systems_api.py
ashahid-ps/py-pure-client
2e3565d37b2a41db69308769f6f485d08a7c46c3
[ "BSD-2-Clause" ]
null
null
null
# coding: utf-8 """ FlashArray REST API No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) OpenAPI spec version: 2.13 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import import re # pyt...
47.568889
671
0.640989
from __future__ import absolute_import import re import six from typing import List, Optional from .. import models class FileSystemsApi(object): def __init__(self, api_client): self.api_client = api_client def api213_file_systems_delete_with_http_info( self, authorization=Non...
true
true
f71b714d70924c77c72ecc7b8ec3e29d445e7a15
1,829
py
Python
tests/test_servicer.py
yangtt0509/sea
f62bcdff00ef71e8c5b92bd5fc5f63d41b753ce2
[ "MIT" ]
null
null
null
tests/test_servicer.py
yangtt0509/sea
f62bcdff00ef71e8c5b92bd5fc5f63d41b753ce2
[ "MIT" ]
null
null
null
tests/test_servicer.py
yangtt0509/sea
f62bcdff00ef71e8c5b92bd5fc5f63d41b753ce2
[ "MIT" ]
null
null
null
import grpc from sea.servicer import ServicerMeta, msg2dict, stream2dict from sea import exceptions from sea.pb2 import default_pb2 from tests.wd.protos import helloworld_pb2 def test_meta_servicer(app, logstream): class HelloContext(): def __init__(self): self.code = None self....
25.760563
75
0.645708
import grpc from sea.servicer import ServicerMeta, msg2dict, stream2dict from sea import exceptions from sea.pb2 import default_pb2 from tests.wd.protos import helloworld_pb2 def test_meta_servicer(app, logstream): class HelloContext(): def __init__(self): self.code = None self....
true
true
f71b721716046fe128e3f99bbf0b9f20f56d1f2c
22,880
py
Python
venv/Lib/site-packages/sklearn/linear_model/_base.py
star10919/drf
77c005794087484d72ffc0d76612a6ac9845821e
[ "BSD-3-Clause" ]
7
2021-01-30T17:42:00.000Z
2022-01-09T08:08:48.000Z
venv/Lib/site-packages/sklearn/linear_model/_base.py
star10919/drf
77c005794087484d72ffc0d76612a6ac9845821e
[ "BSD-3-Clause" ]
25
2020-11-16T15:36:41.000Z
2021-06-01T05:15:31.000Z
venv/Lib/site-packages/sklearn/linear_model/_base.py
star10919/drf
77c005794087484d72ffc0d76612a6ac9845821e
[ "BSD-3-Clause" ]
2
2021-09-13T17:20:56.000Z
2021-11-21T16:05:16.000Z
""" Generalized Linear Models. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Fabian Pedregosa <fabian.pedregosa@inria.fr> # Olivier Grisel <olivier.grisel@ensta.org> # Vincent Michel <vincent.michel@inria.fr> # Peter Prettenhofer <peter.prettenhofer@gmail.com> # Mathieu Blond...
35.583204
79
0.612981
from abc import ABCMeta, abstractmethod import numbers import warnings import numpy as np import scipy.sparse as sp from scipy import linalg from scipy import optimize from scipy import sparse from scipy.special import expit from joblib import Parallel from ..base import (BaseEstimator, ClassifierMixin, R...
true
true
f71b728f6b7ee0bb3e520d6e3e1bb4a53edb161c
595
py
Python
website/system.py
timlyo/timlyo.github.io
fb3e3b65822351e49e3ba4ee17ba4ed5151c969a
[ "Apache-2.0" ]
1
2016-01-14T13:52:25.000Z
2016-01-14T13:52:25.000Z
website/system.py
timlyo/personalWebsite
fb3e3b65822351e49e3ba4ee17ba4ed5151c969a
[ "Apache-2.0" ]
null
null
null
website/system.py
timlyo/personalWebsite
fb3e3b65822351e49e3ba4ee17ba4ed5151c969a
[ "Apache-2.0" ]
null
null
null
import os import psutil COEFFICIENT = 2 ** 20 def get_other_ram() -> int: """Ram used by other processes""" return get_ram_used() - get_process_ram() def get_total_ram() -> int: mem = psutil.virtual_memory() return mem[0] / COEFFICIENT def get_process_ram() -> int: process = psutil.Process(os.getpid()) re...
18.030303
46
0.697479
import os import psutil COEFFICIENT = 2 ** 20 def get_other_ram() -> int: return get_ram_used() - get_process_ram() def get_total_ram() -> int: mem = psutil.virtual_memory() return mem[0] / COEFFICIENT def get_process_ram() -> int: process = psutil.Process(os.getpid()) return process.memory_info()[0] / COE...
true
true
f71b72b888e77e3334994d29892f03d292b9f189
1,820
py
Python
libweasyl/libweasyl/configuration.py
hyena/weasyl
a43ad885eb07ae89d6639f289a5b95f3a177439c
[ "Apache-2.0" ]
1
2019-02-15T04:21:48.000Z
2019-02-15T04:21:48.000Z
libweasyl/libweasyl/configuration.py
hyena/weasyl
a43ad885eb07ae89d6639f289a5b95f3a177439c
[ "Apache-2.0" ]
254
2017-12-23T19:36:43.000Z
2020-04-14T21:46:13.000Z
libweasyl/libweasyl/configuration.py
hyena/weasyl
a43ad885eb07ae89d6639f289a5b95f3a177439c
[ "Apache-2.0" ]
1
2017-12-23T18:42:16.000Z
2017-12-23T18:42:16.000Z
""" Configuration of libweasyl. libweasyl depends on some global state to be set up in order for e.g. database access to work correctly. This might be nicer if python had a way of parameterizing modules, but we can't, so this is what we have. It does mean that only one libweasyl configuration can exist in a running py...
44.390244
90
0.752198
from libweasyl.models.media import DiskMediaItem, MediaItem from libweasyl.models.meta import BaseQuery, _configure_dbsession from libweasyl.staff import _init_staff def configure_libweasyl( dbsession, not_found_exception, base_file_path, staff_config_dict, media_link_formatter_callback): _config...
true
true
f71b731df78a211a9b978d951f533de530a3905f
3,840
py
Python
tensorforce/core/memories/latest.py
zysilence/tensorforce
7539e5dde66f3a93b881006f9b7f38c926ced21b
[ "Apache-2.0" ]
2
2021-11-14T12:28:24.000Z
2022-02-14T19:23:51.000Z
tensorforce/core/memories/latest.py
zysilence/tensorforce
7539e5dde66f3a93b881006f9b7f38c926ced21b
[ "Apache-2.0" ]
null
null
null
tensorforce/core/memories/latest.py
zysilence/tensorforce
7539e5dde66f3a93b881006f9b7f38c926ced21b
[ "Apache-2.0" ]
3
2021-03-04T17:26:43.000Z
2021-03-04T17:27:10.000Z
# Copyright 2017 reinforce.io. 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...
45.176471
163
0.663542
from __future__ import absolute_import from __future__ import print_function from __future__ import division import tensorflow as tf from tensorforce.core.memories import Queue class Latest(Queue): def __init__(self, states, internals, actions, include_next_states, capacity, scope='latest', summ...
true
true
f71b73477d2f539f36cc389b2a439621a3f79453
18,562
py
Python
osa/scripts/provprocess.py
gae-ucm/LSTOSA
d44df4dc1daa87f57d95272014f05908d2c9a211
[ "BSD-3-Clause" ]
2
2022-02-21T17:45:38.000Z
2022-03-25T11:48:52.000Z
osa/scripts/provprocess.py
gae-ucm/LSTOSA
d44df4dc1daa87f57d95272014f05908d2c9a211
[ "BSD-3-Clause" ]
79
2021-12-02T10:37:42.000Z
2022-03-29T23:56:44.000Z
osa/scripts/provprocess.py
cta-observatory/lstosa
dd7a3a4967f265217929a1271c3f9be559a122ac
[ "BSD-3-Clause" ]
1
2021-11-25T09:56:12.000Z
2021-11-25T09:56:12.000Z
#!/usr/bin/env python """Provenance post processing script for OSA pipeline.""" import copy import logging import shutil import sys from pathlib import Path, PurePath import yaml from osa.configs import options from osa.configs.config import cfg from osa.provenance.capture import get_activity_id, get_file_hash from...
36.396078
89
0.619815
import copy import logging import shutil import sys from pathlib import Path, PurePath import yaml from osa.configs import options from osa.configs.config import cfg from osa.provenance.capture import get_activity_id, get_file_hash from osa.provenance.io import provdoc2graph, provdoc2json, provlist2provdoc, read_p...
true
true
f71b75660891063679e5531c8f4789ea15fdf36c
17,910
py
Python
skimage/transform/radon_transform.py
jjhelmus/scikit-image
b9b5fde0821fe8bcece2528b30d012c65c64ad6f
[ "BSD-3-Clause" ]
2
2017-03-30T11:22:11.000Z
2019-03-03T05:18:01.000Z
skimage/transform/radon_transform.py
jjhelmus/scikit-image
b9b5fde0821fe8bcece2528b30d012c65c64ad6f
[ "BSD-3-Clause" ]
3
2021-03-19T14:27:58.000Z
2022-03-12T00:42:39.000Z
skimage/transform/radon_transform.py
jjhelmus/scikit-image
b9b5fde0821fe8bcece2528b30d012c65c64ad6f
[ "BSD-3-Clause" ]
1
2019-12-17T14:53:28.000Z
2019-12-17T14:53:28.000Z
# -*- coding: utf-8 -*- """ radon.py - Radon and inverse radon transforms Based on code of Justin K. Romberg (http://www.clear.rice.edu/elec431/projects96/DSP/bpanalysis.html) J. Gillam and Chris Griffin. References: -B.R. Ramesh, N. Srinivasa, K. Rajgopal, "An Algorithm for Computing the Discrete Radon Trans...
42.541568
79
0.629202
from __future__ import division import numpy as np from scipy.fftpack import fft, ifft, fftfreq from scipy.interpolate import interp1d from ._warps_cy import _warp_fast from ._radon_transform import sart_projection_update from .. import util from warnings import warn __all__ = ["radon", "iradon", "iradon_sart"] de...
true
true
f71b763ae51e39e2fc92c256e70e59add5287950
12,944
py
Python
stix2/datastore/memory.py
2xyo/cti-python-stix2
cffee92c7ed18c4cdd54c4370c6a17878dfd36cd
[ "BSD-3-Clause" ]
1
2020-08-17T23:53:48.000Z
2020-08-17T23:53:48.000Z
stix2/datastore/memory.py
2xyo/cti-python-stix2
cffee92c7ed18c4cdd54c4370c6a17878dfd36cd
[ "BSD-3-Clause" ]
null
null
null
stix2/datastore/memory.py
2xyo/cti-python-stix2
cffee92c7ed18c4cdd54c4370c6a17878dfd36cd
[ "BSD-3-Clause" ]
null
null
null
"""Python STIX2 Memory Source/Sink""" import io import itertools import json import os from stix2 import v20, v21 from stix2.base import _STIXBase from stix2.datastore import DataSink, DataSource, DataStoreMixin from stix2.datastore.filters import FilterSet, apply_common_filters from stix2.parsing import parse def ...
35.56044
111
0.627704
import io import itertools import json import os from stix2 import v20, v21 from stix2.base import _STIXBase from stix2.datastore import DataSink, DataSource, DataStoreMixin from stix2.datastore.filters import FilterSet, apply_common_filters from stix2.parsing import parse def _add(store, stix_data, allow_custom=Tr...
true
true
f71b769c9bfe02547922c7632d7e21d4cba88350
6,126
py
Python
aoc/solutions/day08/solution.py
SebastiaanZ/aoc-2020
e5480be10da053a6ad382dc27fcea7890986cd8e
[ "MIT" ]
3
2020-12-08T13:36:32.000Z
2020-12-15T11:37:25.000Z
aoc/solutions/day08/solution.py
SebastiaanZ/aoc-2020
e5480be10da053a6ad382dc27fcea7890986cd8e
[ "MIT" ]
null
null
null
aoc/solutions/day08/solution.py
SebastiaanZ/aoc-2020
e5480be10da053a6ad382dc27fcea7890986cd8e
[ "MIT" ]
null
null
null
from __future__ import annotations import collections import logging import typing from aoc.helpers import Puzzle __all__ = ["part_one", "part_two", "prepare_puzzle"] log = logging.getLogger(__name__) class Instruction(typing.NamedTuple): """A ConsoleApplication instruction.""" operation: str argument...
36.464286
95
0.663728
from __future__ import annotations import collections import logging import typing from aoc.helpers import Puzzle __all__ = ["part_one", "part_two", "prepare_puzzle"] log = logging.getLogger(__name__) class Instruction(typing.NamedTuple): operation: str argument: int @classmethod def from_text(cl...
true
true
f71b78508ce2826de11a533ccf49d10b6b2ff055
25,387
py
Python
pyabc/epsilon/temperature.py
chrhck/pyABC
731cfdec26bef3898bf6e244daa5c8f83f3fe19d
[ "BSD-3-Clause" ]
null
null
null
pyabc/epsilon/temperature.py
chrhck/pyABC
731cfdec26bef3898bf6e244daa5c8f83f3fe19d
[ "BSD-3-Clause" ]
null
null
null
pyabc/epsilon/temperature.py
chrhck/pyABC
731cfdec26bef3898bf6e244daa5c8f83f3fe19d
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import scipy as sp import pandas as pd import numbers from typing import Callable, List, Union import logging from .base import Epsilon from ..distance import SCALE_LIN from ..sampler import Sampler from ..storage import save_dict_to_json logger = logging.getLogger("Epsilon") class TemperatureBas...
34.168237
79
0.612873
import numpy as np import scipy as sp import pandas as pd import numbers from typing import Callable, List, Union import logging from .base import Epsilon from ..distance import SCALE_LIN from ..sampler import Sampler from ..storage import save_dict_to_json logger = logging.getLogger("Epsilon") class TemperatureBas...
true
true
f71b787fa525196b698da70d6376942add8376c6
12,785
py
Python
tests/db_stats.py
chrisjsewell/aiida-performance
160606f07fe092a9e2bacdf62bfecec460fac642
[ "MIT" ]
null
null
null
tests/db_stats.py
chrisjsewell/aiida-performance
160606f07fe092a9e2bacdf62bfecec460fac642
[ "MIT" ]
null
null
null
tests/db_stats.py
chrisjsewell/aiida-performance
160606f07fe092a9e2bacdf62bfecec460fac642
[ "MIT" ]
null
null
null
"""Useful queries for profiling PostgreSQL databases These queries are mainly adapted from https://gist.github.com/anvk/475c22cbca1edc5ce94546c871460fdd """ from functools import wraps from pathlib import Path def execute_raw(raw): from aiida.manage.manager import get_manager backend = get_manager()._load_b...
27.67316
159
0.600078
from functools import wraps from pathlib import Path def execute_raw(raw): from aiida.manage.manager import get_manager backend = get_manager()._load_backend(schema_check=False) return backend.execute_raw(raw) def memory_db_df(): import pandas as pd result = execute_raw( r""" S...
true
true
f71b7bba9bd0bdbe0b8034d90c61427bb3dc3f64
16,878
py
Python
optbinning/binning/piecewise/continuous_binning.py
mnicstruwig/optbinning
6ce991e1ca75b4d41835f3b3bf8e0f294f6ba780
[ "Apache-2.0" ]
1
2021-02-09T02:49:32.000Z
2021-02-09T02:49:32.000Z
optbinning/binning/piecewise/continuous_binning.py
mnicstruwig/optbinning
6ce991e1ca75b4d41835f3b3bf8e0f294f6ba780
[ "Apache-2.0" ]
null
null
null
optbinning/binning/piecewise/continuous_binning.py
mnicstruwig/optbinning
6ce991e1ca75b4d41835f3b3bf8e0f294f6ba780
[ "Apache-2.0" ]
null
null
null
""" Optimal piecewise binning for continuous target. """ # Guillermo Navas-Palencia <g.navas.palencia@gmail.com> # Copyright (C) 2020 import time import numpy as np from .base import _check_parameters from .base import BasePWBinning from .binning_statistics import PWContinuousBinningTable from .metrics import conti...
41.266504
79
0.640656
import time import numpy as np from .base import _check_parameters from .base import BasePWBinning from .binning_statistics import PWContinuousBinningTable from .metrics import continuous_metrics from .transformations import transform_continuous_target class ContinuousOptimalPWBinning(BasePWBinning): def __...
true
true
f71b7bd3333e78e80ac35643dea7e4992006e7c1
5,065
py
Python
a3c_train.py
mmwebster/DeepRL-Grounding
aa7fa63fbc26e8b0fa3fe289a5fe5a00ef3e6278
[ "MIT" ]
null
null
null
a3c_train.py
mmwebster/DeepRL-Grounding
aa7fa63fbc26e8b0fa3fe289a5fe5a00ef3e6278
[ "MIT" ]
null
null
null
a3c_train.py
mmwebster/DeepRL-Grounding
aa7fa63fbc26e8b0fa3fe289a5fe5a00ef3e6278
[ "MIT" ]
null
null
null
import torch.optim as optim import env as grounding_env from models import * from torch.autograd import Variable import logging def ensure_shared_grads(model, shared_model): for param, shared_param in zip(model.parameters(), shared_model.parameters()): if shared_param....
32.261146
78
0.541165
import torch.optim as optim import env as grounding_env from models import * from torch.autograd import Variable import logging def ensure_shared_grads(model, shared_model): for param, shared_param in zip(model.parameters(), shared_model.parameters()): if shared_param....
true
true
f71b7c3e0333f4799644586439f574a601d048f9
942
py
Python
tema1/gym-master/gym/envs/tests/spec_list.py
oscarramos2001/Oscar-Marino-Ramos
c05e497b467aab4572f3578f1b9068d4585106d2
[ "MIT" ]
112
2018-11-19T17:23:40.000Z
2022-03-29T05:36:14.000Z
tema1/gym-master/gym/envs/tests/spec_list.py
BrujitoOz/ia-course
c05e497b467aab4572f3578f1b9068d4585106d2
[ "MIT" ]
2
2020-03-23T01:17:45.000Z
2020-07-02T07:01:06.000Z
tema1/gym-master/gym/envs/tests/spec_list.py
BrujitoOz/ia-course
c05e497b467aab4572f3578f1b9068d4585106d2
[ "MIT" ]
187
2018-11-28T11:38:02.000Z
2022-03-16T11:18:39.000Z
from gym import envs, logger import os def should_skip_env_spec_for_tests(spec): # We skip tests for envs that require dependencies or are otherwise # troublesome to run frequently ep = spec._entry_point # Skip mujoco tests for pull request CI skip_mujoco = not (os.environ.get('MUJOCO_KEY_BUNDLE') ...
44.857143
156
0.691083
from gym import envs, logger import os def should_skip_env_spec_for_tests(spec): ep = spec._entry_point skip_mujoco = not (os.environ.get('MUJOCO_KEY_BUNDLE') or os.path.exists(os.path.expanduser('~/.mujoco/mjkey.txt'))) if skip_mujoco and (ep.startswith('gym.envs.mujoco:') or ep.startswith(...
true
true
f71b7dce623850ef58b71a5f7bfbb56a6401aee0
495
py
Python
python/concurrency/async_hello.py
cbare/Etudes
8a803621f2abd20966843ccec696aec397d3c9f9
[ "Apache-2.0" ]
null
null
null
python/concurrency/async_hello.py
cbare/Etudes
8a803621f2abd20966843ccec696aec397d3c9f9
[ "Apache-2.0" ]
null
null
null
python/concurrency/async_hello.py
cbare/Etudes
8a803621f2abd20966843ccec696aec397d3c9f9
[ "Apache-2.0" ]
null
null
null
import asyncio async def upper_cased(value: str) -> str: await asyncio.sleep(1) return value.upper() coroutines = [ upper_cased("h"), upper_cased("e"), upper_cased("l"), upper_cased("l"), upper_cased("o"), upper_cased(" "), upper_cased("w"), upper_cased("o"), upper_cased("r...
19.038462
53
0.60404
import asyncio async def upper_cased(value: str) -> str: await asyncio.sleep(1) return value.upper() coroutines = [ upper_cased("h"), upper_cased("e"), upper_cased("l"), upper_cased("l"), upper_cased("o"), upper_cased(" "), upper_cased("w"), upper_cased("o"), upper_cased("r...
true
true
f71b7f85ca2d04fe797bbe93b9985f9eedf2ad7c
2,785
py
Python
main.py
mwojcik96/dtw-utterance-recognition
9371393dfe92abb5b85c40828d099ceca599aa89
[ "MIT" ]
null
null
null
main.py
mwojcik96/dtw-utterance-recognition
9371393dfe92abb5b85c40828d099ceca599aa89
[ "MIT" ]
null
null
null
main.py
mwojcik96/dtw-utterance-recognition
9371393dfe92abb5b85c40828d099ceca599aa89
[ "MIT" ]
null
null
null
import glob import struct import wave from collections import Counter from operator import itemgetter import librosa import numpy as np from tslearn.metrics import dtw def compute_mfcc_from_file(file): time_characteristic = create_time_characteristics_of_a_file(file) mfcc = librosa.feature.mfcc(y=time_charac...
35.705128
100
0.656732
import glob import struct import wave from collections import Counter from operator import itemgetter import librosa import numpy as np from tslearn.metrics import dtw def compute_mfcc_from_file(file): time_characteristic = create_time_characteristics_of_a_file(file) mfcc = librosa.feature.mfcc(y=time_charac...
true
true
f71b7feab878e3386680bd41b4a9588ddf08c6c1
308
py
Python
Main.py
MynorSaban1906/vacas
5ca5b483b48088a409cb75cb5d18603a09274498
[ "MIT" ]
null
null
null
Main.py
MynorSaban1906/vacas
5ca5b483b48088a409cb75cb5d18603a09274498
[ "MIT" ]
null
null
null
Main.py
MynorSaban1906/vacas
5ca5b483b48088a409cb75cb5d18603a09274498
[ "MIT" ]
null
null
null
import tkinter as tk from Windows import StorageGui, NavBar class Main: root = tk.Tk() root.geometry("1000x600") root.title(" [EDD] Fase-1" ) app = StorageGui(master=root) app.configure(bg='#2C3E50') app.place(x=200,width=200,height=200) app.mainloop() start = Main()
18.117647
41
0.636364
import tkinter as tk from Windows import StorageGui, NavBar class Main: root = tk.Tk() root.geometry("1000x600") root.title(" [EDD] Fase-1" ) app = StorageGui(master=root) app.configure(bg='#2C3E50') app.place(x=200,width=200,height=200) app.mainloop() start = Main()
true
true
f71b801eb247a574b85aeca0cc7b8ec2789deb6f
37,260
py
Python
src/azure-cli/azure/cli/command_modules/servicefabric/_help.py
zackliu/azure-cli
680f8339ac010a89d4063566fabc5991abc8a4c2
[ "MIT" ]
2
2021-03-24T21:06:25.000Z
2021-03-24T21:07:59.000Z
src/azure-cli/azure/cli/command_modules/servicefabric/_help.py
zackliu/azure-cli
680f8339ac010a89d4063566fabc5991abc8a4c2
[ "MIT" ]
null
null
null
src/azure-cli/azure/cli/command_modules/servicefabric/_help.py
zackliu/azure-cli
680f8339ac010a89d4063566fabc5991abc8a4c2
[ "MIT" ]
9
2020-02-12T22:53:00.000Z
2021-06-09T18:59:41.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. # -----------------------------------------------------...
39.892934
328
0.725819
from knack.help_files import helps helps['sf'] = """ type: group short-summary: Manage and administer Azure Service Fabric clusters. """ helps['sf application'] = """ type: group short-summary: Manage applications running on an Azure Service Fabric cluster. Only support ARM deployed applications. """ helps[...
true
true
f71b8100e2c77204d39461f764e255793c25b730
1,884
py
Python
american_gut_project_pipeline/pipeline/metrics.py
mas-dse-ringhilt/DSE-American-Gut-Project
dadb3be8d40d6fb325d26920b145c04c837a6869
[ "CC-BY-4.0" ]
1
2020-05-02T21:15:21.000Z
2020-05-02T21:15:21.000Z
american_gut_project_pipeline/pipeline/metrics.py
ringhilterra/DSE-American-Gut-Project
dadb3be8d40d6fb325d26920b145c04c837a6869
[ "CC-BY-4.0" ]
null
null
null
american_gut_project_pipeline/pipeline/metrics.py
ringhilterra/DSE-American-Gut-Project
dadb3be8d40d6fb325d26920b145c04c837a6869
[ "CC-BY-4.0" ]
2
2019-06-26T02:07:41.000Z
2019-07-15T16:28:44.000Z
import pandas as pd from sklearn.metrics import confusion_matrix, accuracy_score, precision_score, recall_score, f1_score def evaluate(clf, x_train, x_test, y_train, y_test, name, training_data_name, embedding, params=None): predictions = clf.predict(x_train) # train_tn, train_fp, train_fn, train_tp = confusi...
41.866667
102
0.684183
import pandas as pd from sklearn.metrics import confusion_matrix, accuracy_score, precision_score, recall_score, f1_score def evaluate(clf, x_train, x_test, y_train, y_test, name, training_data_name, embedding, params=None): predictions = clf.predict(x_train) train_accuracy = accuracy_score(y_train, pred...
true
true
f71b824fba4f7bb51835a6ef5657cce8b66fe369
112
py
Python
ABC183/B.py
shimomura314/AtcoderCodes
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
[ "MIT" ]
null
null
null
ABC183/B.py
shimomura314/AtcoderCodes
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
[ "MIT" ]
null
null
null
ABC183/B.py
shimomura314/AtcoderCodes
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
[ "MIT" ]
null
null
null
sx, sy, gx, gy = map(int, input().split()) if sx == gx: print(sx) exit() print(sx + sy*(gx-sx)/(gy+sy))
18.666667
42
0.517857
sx, sy, gx, gy = map(int, input().split()) if sx == gx: print(sx) exit() print(sx + sy*(gx-sx)/(gy+sy))
true
true
f71b826b9f28eb525f8e2cb61594898e1ab461e2
685
py
Python
ted_sws/rml_to_html/resources/query_registry.py
meaningfy-ws/ted-xml-2-rdf
ac26a19f3761b7cf79d79a46be6323b658f067eb
[ "Apache-2.0" ]
1
2022-03-21T12:32:52.000Z
2022-03-21T12:32:52.000Z
ted_sws/rml_to_html/resources/query_registry.py
meaningfy-ws/ted-xml-2-rdf
ac26a19f3761b7cf79d79a46be6323b658f067eb
[ "Apache-2.0" ]
24
2022-02-10T10:43:56.000Z
2022-03-29T12:36:21.000Z
ted_sws/rml_to_html/resources/query_registry.py
meaningfy-ws/ted-sws
d1e351eacb2900f84ec7edc457e49d8202fbaff5
[ "Apache-2.0" ]
null
null
null
from ted_sws.rml_to_html.resources import get_sparql_query class QueryRegistry: @property def TRIPLE_MAP(self): return get_sparql_query(query_file_name="get_triple_maps.rq") @property def LOGICAL_SOURCE(self): return get_sparql_query(query_file_name="get_logical_source.rq") @pro...
27.4
83
0.743066
from ted_sws.rml_to_html.resources import get_sparql_query class QueryRegistry: @property def TRIPLE_MAP(self): return get_sparql_query(query_file_name="get_triple_maps.rq") @property def LOGICAL_SOURCE(self): return get_sparql_query(query_file_name="get_logical_source.rq") @pro...
true
true
f71b8275c618ced19c9930e8361174690cf06e80
10,326
py
Python
benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/18-extending_bound_32.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
3
2021-04-23T23:29:26.000Z
2022-03-23T10:00:30.000Z
benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/18-extending_bound_32.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
null
null
null
benchmarks/f3_wrong_hints/scaling_ltl_infinite_state/18-extending_bound_32.py
EnricoMagnago/F3
c863215c318d7d5f258eb9be38c6962cf6863b52
[ "MIT" ]
1
2021-11-17T22:02:56.000Z
2021-11-17T22:02:56.000Z
from typing import Tuple, FrozenSet from collections import Iterable from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msat_make_not, msat_mak...
35.242321
89
0.62454
from typing import Tuple, FrozenSet from collections import Iterable from mathsat import msat_term, msat_env from mathsat import msat_make_constant, msat_declare_function from mathsat import msat_get_integer_type, msat_get_rational_type, msat_get_bool_type from mathsat import msat_make_and, msat_make_not, msat_mak...
true
true
f71b839ea462d9355fe88e220fc9c5b89f52ab5a
827
py
Python
virtex/serial/__init__.py
chrislarson1/virtex
36eb47d1ace297951cae36edc8a00544b85fed79
[ "Apache-2.0" ]
5
2020-06-17T06:22:32.000Z
2022-03-04T09:25:31.000Z
virtex/serial/__init__.py
virtexlabs/virtex
36eb47d1ace297951cae36edc8a00544b85fed79
[ "Apache-2.0" ]
null
null
null
virtex/serial/__init__.py
virtexlabs/virtex
36eb47d1ace297951cae36edc8a00544b85fed79
[ "Apache-2.0" ]
null
null
null
# ------------------------------------------------------------------- # Copyright 2021 Virtex 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....
39.380952
69
0.629988
from .bytes import * from .pillow import * from .pickle import * from .numpy import *
true
true
f71b83f83a3906286de03127e55e5392ecaea99d
1,613
py
Python
ishuhui/__init__.py
lawnight/flask_ishuhui
be42684a4cf461aaccd691fc61548450869abc17
[ "MIT" ]
null
null
null
ishuhui/__init__.py
lawnight/flask_ishuhui
be42684a4cf461aaccd691fc61548450869abc17
[ "MIT" ]
null
null
null
ishuhui/__init__.py
lawnight/flask_ishuhui
be42684a4cf461aaccd691fc61548450869abc17
[ "MIT" ]
1
2021-05-20T10:19:19.000Z
2021-05-20T10:19:19.000Z
from flask import Flask from . import csrf import ishuhui.data as data import env from flask_assets import Environment, Bundle def create_app(config, should_register_blueprints=True): app = Flask(__name__,static_folder = env.ASSETS,static_url_path='/assets') assets = Environment(app) js = Bundle('ap...
26.016129
78
0.716677
from flask import Flask from . import csrf import ishuhui.data as data import env from flask_assets import Environment, Bundle def create_app(config, should_register_blueprints=True): app = Flask(__name__,static_folder = env.ASSETS,static_url_path='/assets') assets = Environment(app) js = Bundle('ap...
true
true
f71b8422d45790abd3999a3b0b1534cd72a75c0b
19,515
py
Python
prody/chromatin/hic.py
grandevelia/ProDy
7c725640a94c16543423c0756388998cb86a97ae
[ "MIT" ]
210
2015-01-26T08:17:56.000Z
2022-03-30T01:40:34.000Z
prody/chromatin/hic.py
grandevelia/ProDy
7c725640a94c16543423c0756388998cb86a97ae
[ "MIT" ]
555
2015-01-05T21:51:54.000Z
2022-03-31T16:51:41.000Z
prody/chromatin/hic.py
grandevelia/ProDy
7c725640a94c16543423c0756388998cb86a97ae
[ "MIT" ]
99
2015-02-09T18:00:39.000Z
2022-03-07T12:52:51.000Z
from numbers import Integral from numpy import ma import numpy as np from scipy.sparse import coo_matrix from scipy.stats import mode from prody.chromatin.norm import VCnorm, SQRTVCnorm, Filenorm from prody.chromatin.functions import div0, showDomains, _getEigvecs from prody import PY2K from prody.dynamics import GNM...
31.887255
123
0.544146
from numbers import Integral from numpy import ma import numpy as np from scipy.sparse import coo_matrix from scipy.stats import mode from prody.chromatin.norm import VCnorm, SQRTVCnorm, Filenorm from prody.chromatin.functions import div0, showDomains, _getEigvecs from prody import PY2K from prody.dynamics import GNM...
true
true
f71b8454f0e6b786481174f05b105f50d177f810
568
py
Python
tools/leetcode.125.Valid Palindrome/leetcode.125.Valid Palindrome.submission1.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
4
2015-10-10T00:30:55.000Z
2020-07-27T19:45:54.000Z
tools/leetcode.125.Valid Palindrome/leetcode.125.Valid Palindrome.submission1.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
null
null
null
tools/leetcode.125.Valid Palindrome/leetcode.125.Valid Palindrome.submission1.py
tedye/leetcode
975d7e3b8cb9b6be9e80e07febf4bcf6414acd46
[ "MIT" ]
null
null
null
class Solution: # @param {string} s # @return {boolean} def isPalindrome(self, s): if not s: return True start = 0 end = len(s)-1 s = s.lower() while start < end: while start < end and not s[start].isalnum(): start += 1...
568
568
0.399648
class Solution:
true
true
f71b84b71246068431940b564be47b7c900c6b87
3,164
py
Python
gamestonk_terminal/common/quantitative_analysis/rolling_model.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
1
2022-03-15T13:05:40.000Z
2022-03-15T13:05:40.000Z
gamestonk_terminal/common/quantitative_analysis/rolling_model.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
null
null
null
gamestonk_terminal/common/quantitative_analysis/rolling_model.py
minhhoang1023/GamestonkTerminal
195dc19b491052df080178c0cc6a9d535a91a704
[ "MIT" ]
null
null
null
"""Rolling Statistics""" __docformat__ = "numpy" import logging from typing import Tuple import pandas as pd import pandas_ta as ta from gamestonk_terminal.decorators import log_start_end logger = logging.getLogger(__name__) @log_start_end(log=logger) def get_rolling_avg(df: pd.DataFrame, length: int) -> Tuple[pd...
23.094891
88
0.640645
__docformat__ = "numpy" import logging from typing import Tuple import pandas as pd import pandas_ta as ta from gamestonk_terminal.decorators import log_start_end logger = logging.getLogger(__name__) @log_start_end(log=logger) def get_rolling_avg(df: pd.DataFrame, length: int) -> Tuple[pd.DataFrame, pd.DataFrame]...
true
true
f71b8506b37bb0252f9682c2fbba2ee5c82cb403
729
py
Python
utils/see.py
jack09581013/Dual-GDNet
d9d65928208caee781cbe8f8f794241d06b4bf5d
[ "MIT" ]
null
null
null
utils/see.py
jack09581013/Dual-GDNet
d9d65928208caee781cbe8f8f794241d06b4bf5d
[ "MIT" ]
null
null
null
utils/see.py
jack09581013/Dual-GDNet
d9d65928208caee781cbe8f8f794241d06b4bf5d
[ "MIT" ]
null
null
null
import tools import os from dataset import RandomCropper, sub_sampling from utils import plot_flying_things3D height = 240 width = 576 ratio = 1 height = height//ratio width = width//ratio train_files = os.listdir('/media/jack/data/Dataset/pytorch/flyingthings3d/TRAIN') test_files = os.listdir('/media/jack/data/Data...
25.137931
88
0.747599
import tools import os from dataset import RandomCropper, sub_sampling from utils import plot_flying_things3D height = 240 width = 576 ratio = 1 height = height//ratio width = width//ratio train_files = os.listdir('/media/jack/data/Dataset/pytorch/flyingthings3d/TRAIN') test_files = os.listdir('/media/jack/data/Data...
true
true
f71b86630d2154e3ec53d9c2d1bbc45428ac1669
498
py
Python
Lib/site-packages/plotly/validators/sankey/link/concentrationscales/_label.py
tytanya/my-first-blog
2b40adb0816c3546e90ad6ca1e7fb50d924c1536
[ "bzip2-1.0.6" ]
4
2020-02-05T11:26:47.000Z
2021-05-26T07:48:46.000Z
Lib/site-packages/plotly/validators/sankey/link/concentrationscales/_label.py
tytanya/my-first-blog
2b40adb0816c3546e90ad6ca1e7fb50d924c1536
[ "bzip2-1.0.6" ]
6
2021-03-18T22:27:08.000Z
2022-03-11T23:40:50.000Z
venv/lib/python3.7/site-packages/plotly/validators/sankey/link/concentrationscales/_label.py
kylenahas/180LoginV1
8f64be6e6016d47dff8febfcfa3bbd56e9042f89
[ "MIT" ]
1
2020-02-02T21:17:12.000Z
2020-02-02T21:17:12.000Z
import _plotly_utils.basevalidators class LabelValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='label', parent_name='sankey.link.concentrationscales', **kwargs ): super(LabelValidator, self).__init__( plotly_name=plo...
26.210526
67
0.610442
import _plotly_utils.basevalidators class LabelValidator(_plotly_utils.basevalidators.StringValidator): def __init__( self, plotly_name='label', parent_name='sankey.link.concentrationscales', **kwargs ): super(LabelValidator, self).__init__( plotly_name=plo...
true
true
f71b867bee311ba5e70b95ace8a6be7c624ca76a
3,503
py
Python
tensorflow_probability/python/experimental/auto_batching/numpy_backend_test.py
matthieucoquet/probability
2426f4fc4743ceedc1a638a03d19ce6654ebff76
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/experimental/auto_batching/numpy_backend_test.py
matthieucoquet/probability
2426f4fc4743ceedc1a638a03d19ce6654ebff76
[ "Apache-2.0" ]
null
null
null
tensorflow_probability/python/experimental/auto_batching/numpy_backend_test.py
matthieucoquet/probability
2426f4fc4743ceedc1a638a03d19ce6654ebff76
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 The TensorFlow Probability 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 o...
39.806818
101
0.703968
from __future__ import absolute_import from __future__ import division from __future__ import print_function import hypothesis as hp from hypothesis import strategies as hps from hypothesis.extra import numpy as hpnp import numpy as np import tensorflow as tf from tensorflow_probability.python.experim...
true
true
f71b87f9a34ad86788ead5a5a291dfc02bf3cc77
138
py
Python
modules/2.79/bpy/types/GPENCIL_UL_brush.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/GPENCIL_UL_brush.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
modules/2.79/bpy/types/GPENCIL_UL_brush.py
cmbasnett/fake-bpy-module
acb8b0f102751a9563e5b5e5c7cd69a4e8aa2a55
[ "MIT" ]
null
null
null
class GPENCIL_UL_brush: def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): pass
17.25
96
0.702899
class GPENCIL_UL_brush: def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): pass
true
true
f71b891108d478f5ab27a7c4e1616fd4375c19ac
5,222
py
Python
codes/test.py
dvschultz/BasicSR
69f360227f02cc86fa534a82ff969dd9084ac825
[ "Apache-2.0" ]
null
null
null
codes/test.py
dvschultz/BasicSR
69f360227f02cc86fa534a82ff969dd9084ac825
[ "Apache-2.0" ]
null
null
null
codes/test.py
dvschultz/BasicSR
69f360227f02cc86fa534a82ff969dd9084ac825
[ "Apache-2.0" ]
null
null
null
import os.path as osp import logging import time import argparse from collections import OrderedDict import options.options as option import utils.util as util from data.util import bgr2ycbcr from data import create_dataset, create_dataloader from models import create_model #### options parser = argparse.ArgumentPars...
42.803279
99
0.617771
import os.path as osp import logging import time import argparse from collections import OrderedDict import options.options as option import utils.util as util from data.util import bgr2ycbcr from data import create_dataset, create_dataloader from models import create_model ser() parser.add_argument('-opt', type=str,...
true
true
f71b8944d7cb24a8c9e0c2e8ab0e255b732516de
11,057
py
Python
script/gen_requirements_all.py
TheDatNik/home-assistant
12b451adf5e5e894cb0707b61535218260411189
[ "Apache-2.0" ]
2
2019-07-31T16:09:15.000Z
2019-09-05T08:07:12.000Z
script/gen_requirements_all.py
TheDatNik/home-assistant
12b451adf5e5e894cb0707b61535218260411189
[ "Apache-2.0" ]
2
2022-01-13T04:00:03.000Z
2022-03-12T01:02:40.000Z
script/gen_requirements_all.py
TheDatNik/home-assistant
12b451adf5e5e894cb0707b61535218260411189
[ "Apache-2.0" ]
2
2017-10-16T07:55:03.000Z
2019-10-07T21:26:20.000Z
#!/usr/bin/env python3 """Generate an updated requirements_all.txt.""" import fnmatch import importlib import os import pathlib import pkgutil import re import sys from script.hassfest.model import Integration COMMENT_REQUIREMENTS = ( 'Adafruit-DHT', 'Adafruit_BBIO', 'avion', 'beacontools', 'blink...
25.955399
78
0.617889
import fnmatch import importlib import os import pathlib import pkgutil import re import sys from script.hassfest.model import Integration COMMENT_REQUIREMENTS = ( 'Adafruit-DHT', 'Adafruit_BBIO', 'avion', 'beacontools', 'blinkt', 'bluepy', 'bme680', 'credstash', 'decora', 'en...
true
true
f71b8a631ab134a126402e2d0c05bb00449922c8
150,997
py
Python
fastkml/test_main.py
dennereed/paleocore
d6da6c39cde96050ee4b9e7213ec1200530cbeee
[ "MIT" ]
1
2021-02-05T19:50:13.000Z
2021-02-05T19:50:13.000Z
fastkml/test_main.py
dennereed/paleocore
d6da6c39cde96050ee4b9e7213ec1200530cbeee
[ "MIT" ]
59
2020-06-17T22:21:51.000Z
2022-02-10T05:00:01.000Z
fastkml/test_main.py
dennereed/paleocore
d6da6c39cde96050ee4b9e7213ec1200530cbeee
[ "MIT" ]
2
2020-07-01T14:11:09.000Z
2020-08-10T17:27:26.000Z
# -*- coding: utf-8 -*- # Copyright (C) 2012 Christian Ledermann # # This library is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation; either version 2.1 of the License, or (at your option) # any later vers...
58.187669
53,811
0.602939
try: import unittest2 as unittest except: import unittest from fastkml import kml from fastkml import styles from fastkml import base from fastkml import atom from fastkml import config from fastkml import gx import datetime from dateutil.tz import tzutc, tzoffset from fastkml.config imp...
true
true
f71b8c248dafde29a7c3bf37462e5c2f5296a920
461
py
Python
pyapi/utils/db.py
dockerian/py-api
777db7d5dacf3ecf29a991f50d2ac78bb5bef66a
[ "Apache-2.0" ]
null
null
null
pyapi/utils/db.py
dockerian/py-api
777db7d5dacf3ecf29a991f50d2ac78bb5bef66a
[ "Apache-2.0" ]
6
2019-12-26T16:51:55.000Z
2022-03-21T22:16:45.000Z
pyapi/utils/db.py
dockerian/pyapi
777db7d5dacf3ecf29a991f50d2ac78bb5bef66a
[ "Apache-2.0" ]
null
null
null
""" # db module - database adapter functions """ from sqlalchemy import DateTime, TypeDecorator # pylint: disable=abstract-method class DateTimeUtc(TypeDecorator): ''' Results returned as offset-aware datetimes. ''' impl = DateTime # pylint: disable=unused-argument def process_result_value(...
20.954545
51
0.668113
from sqlalchemy import DateTime, TypeDecorator class DateTimeUtc(TypeDecorator): impl = DateTime def process_result_value(self, value, dialect): return value.replace(tzinfo=pytz.utc)
true
true
f71b8c325f2c4b1fda3cadbcc6909025b1010728
2,157
py
Python
flask_rebar/swagger_generation/swagger_words.py
jsonau/flask-rebar
22b82596e60bcb537c69dba03ed7155176a9aca1
[ "MIT" ]
null
null
null
flask_rebar/swagger_generation/swagger_words.py
jsonau/flask-rebar
22b82596e60bcb537c69dba03ed7155176a9aca1
[ "MIT" ]
null
null
null
flask_rebar/swagger_generation/swagger_words.py
jsonau/flask-rebar
22b82596e60bcb537c69dba03ed7155176a9aca1
[ "MIT" ]
null
null
null
""" Swagger Words ~~~~~~~~~~~~~ Python friendly aliases to reserved Swagger words. :copyright: Copyright 2018 PlanGrid, Inc., see AUTHORS. :license: MIT, see LICENSE for details. """ from __future__ import unicode_literals additional_properties = "additionalProperties" all_of = "allOf" allow_empt...
21.147059
59
0.710246
from __future__ import unicode_literals additional_properties = "additionalProperties" all_of = "allOf" allow_empty_value = "allowEmptyValue" any_of = "anyOf" api_key = "apiKey" array = "array" basic = "basic" binary = "binary" body = "body" boolean = "boolean" byte = "byte" collection_format = "collectionFormat" comp...
true
true
f71b8c4522567898a2c8dbed743a740b05b28ad7
1,035
py
Python
oslo_ovsdb_frontend/impl/native/helpers.py
salv-orlando/oslo_ovsdb_frontend
07845187467a9e8ad00f02f597e0e1277f28c637
[ "Apache-2.0" ]
null
null
null
oslo_ovsdb_frontend/impl/native/helpers.py
salv-orlando/oslo_ovsdb_frontend
07845187467a9e8ad00f02f597e0e1277f28c637
[ "Apache-2.0" ]
null
null
null
oslo_ovsdb_frontend/impl/native/helpers.py
salv-orlando/oslo_ovsdb_frontend
07845187467a9e8ad00f02f597e0e1277f28c637
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
36.964286
78
0.686957
def _connection_to_manager_uri(conn_uri): proto, addr = conn_uri.split(':', 1) if ':' in addr: ip, port = addr.split(':', 1) return 'p%s:%s:%s' % (proto, port, ip) else: return 'p%s:%s' % (proto, addr) def enable_connection_uri(conn_uri, execute_func): manager_ur...
true
true
f71b8d9b0f6513f05ab15b6e9fc0dbe880661dcb
940
py
Python
rapidenv/misc/set_activate_alias.py
innoviz-sw-infra/rapid-env
acc5e1e461af42b5fbb7024c0b79d4315c206fe2
[ "MIT" ]
1
2021-02-15T20:55:49.000Z
2021-02-15T20:55:49.000Z
rapidenv/misc/set_activate_alias.py
innoviz-sw-infra/rapid-env
acc5e1e461af42b5fbb7024c0b79d4315c206fe2
[ "MIT" ]
null
null
null
rapidenv/misc/set_activate_alias.py
innoviz-sw-infra/rapid-env
acc5e1e461af42b5fbb7024c0b79d4315c206fe2
[ "MIT" ]
null
null
null
import sys from pathlib import Path def mainwin32(): if len(sys.argv) < 2: print(f'to use run: python set_activate_alias.py $profile') return profile = sys.argv[1] profile = Path(profile) # makr parent directory if not exist if not profile.parent.exists(): profile.pare...
22.926829
71
0.575532
import sys from pathlib import Path def mainwin32(): if len(sys.argv) < 2: print(f'to use run: python set_activate_alias.py $profile') return profile = sys.argv[1] profile = Path(profile) if not profile.parent.exists(): profile.parent.mkdir(parents=True) ...
true
true
f71b8dec12d6719d1ccd4adbb31f7a450c33383c
1,268
py
Python
apps/accounts/forms.py
cloudartisan/dojomaster
9d5efa0345c659636f8d8b556302d0d7bb2055a8
[ "MIT" ]
1
2019-02-21T14:47:31.000Z
2019-02-21T14:47:31.000Z
apps/accounts/forms.py
cloudartisan/dojomaster
9d5efa0345c659636f8d8b556302d0d7bb2055a8
[ "MIT" ]
null
null
null
apps/accounts/forms.py
cloudartisan/dojomaster
9d5efa0345c659636f8d8b556302d0d7bb2055a8
[ "MIT" ]
null
null
null
from django import forms from .models import UserAccount class UserCreationForm(forms.ModelForm): """ A form for creating new users. Includes all the required fields, plus a repeated password. """ password1 = forms.CharField(label='Password', widget=forms.PasswordInput) password2 = forms.Cha...
29.488372
90
0.662461
from django import forms from .models import UserAccount class UserCreationForm(forms.ModelForm): password1 = forms.CharField(label='Password', widget=forms.PasswordInput) password2 = forms.CharField(label='Password confirmation', widget=forms.PasswordInput) class Meta: model = UserAccount ...
true
true
f71b8eacdcd41ec7c42144254a210d3c2c2d6f9a
568
py
Python
ahrs/filters/__init__.py
ethan-jiang-1/ahrs
e1725267b0009a8a573f99dbf8d06e8481407ab6
[ "MIT" ]
184
2019-09-06T07:58:52.000Z
2022-03-31T04:27:09.000Z
ahrs/filters/__init__.py
geoKinga/ahrs
87f9210cfcf6c545d86ae8588a93f012020164ee
[ "MIT" ]
48
2019-11-13T15:42:46.000Z
2022-03-31T23:53:53.000Z
ahrs/filters/__init__.py
geoKinga/ahrs
87f9210cfcf6c545d86ae8588a93f012020164ee
[ "MIT" ]
34
2019-12-19T16:22:00.000Z
2022-03-14T09:51:50.000Z
# -*- coding: utf-8 -*- """ Attitude Estimators =================== These are the most common attitude filters. """ from .angular import AngularRate from .aqua import AQUA from .complementary import Complementary from .davenport import Davenport from .ekf import EKF from .famc import FAMC from .flae import FLAE from...
21.037037
43
0.753521
from .angular import AngularRate from .aqua import AQUA from .complementary import Complementary from .davenport import Davenport from .ekf import EKF from .famc import FAMC from .flae import FLAE from .fourati import Fourati from .fqa import FQA from .tilt import Tilt from .madgwick import Madgwick from .mahony impo...
true
true
f71b8eb018fd43deeb30f1cc3852fc3278cb539b
1,196
py
Python
Exercicios/ex059.py
MateusBarboza99/Python-03-
9c6df88aaa8ba83d385b92722ed1df5873df3a77
[ "MIT" ]
null
null
null
Exercicios/ex059.py
MateusBarboza99/Python-03-
9c6df88aaa8ba83d385b92722ed1df5873df3a77
[ "MIT" ]
null
null
null
Exercicios/ex059.py
MateusBarboza99/Python-03-
9c6df88aaa8ba83d385b92722ed1df5873df3a77
[ "MIT" ]
null
null
null
from time import sleep valor1 = int(input('Digite Primeiro valor: ')) valor2 = int(input('Digite segundo valor: ')) opção = 0 while opção != 5: print(''' [ 1 ] SOMAR [ 2 ] MULTIPLICAR [ 3 ] MAIOR [ 4 ] NOVOS NÚMEROS [ 5 ] SAIR DO PROGRAMA''') opção = int(input('Qual opção você deseja ? ')) ...
32.324324
88
0.553512
from time import sleep valor1 = int(input('Digite Primeiro valor: ')) valor2 = int(input('Digite segundo valor: ')) opção = 0 while opção != 5: print(''' [ 1 ] SOMAR [ 2 ] MULTIPLICAR [ 3 ] MAIOR [ 4 ] NOVOS NÚMEROS [ 5 ] SAIR DO PROGRAMA''') opção = int(input('Qual opção você deseja ? ')) ...
true
true
f71b8f02bb638c288dc1d7f5c04c314106795526
2,828
py
Python
tests/providers/amazon/aws/operators/test_step_function_start_execution.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
15,947
2019-01-05T13:51:02.000Z
2022-03-31T23:33:16.000Z
tests/providers/amazon/aws/operators/test_step_function_start_execution.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
14,603
2019-01-05T09:43:19.000Z
2022-03-31T23:11:59.000Z
tests/providers/amazon/aws/operators/test_step_function_start_execution.py
ChaseKnowlden/airflow
6b71eac1997a7c0db3b8e3aed6b4e65d01871440
[ "Apache-2.0" ]
8,429
2019-01-05T19:45:47.000Z
2022-03-31T22:13:01.000Z
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
33.666667
104
0.703324
import unittest from unittest import mock from unittest.mock import MagicMock from airflow.providers.amazon.aws.operators.step_function_start_execution import ( StepFunctionStartExecutionOperator, ) TASK_ID = 'step_function_start_execution_task' STATE_MACHINE_ARN = 'arn:aws:states:us-east-1:000...
true
true
f71b8fffbe1ae2ccf4e9b4742ebf89d95ffbb7f6
39
py
Python
tfcv/modeling/modules/attention/__init__.py
xingzhaolee/tfcv
27b6a4e8e93cf9b5fecedd6c259118f64b74e263
[ "MIT" ]
null
null
null
tfcv/modeling/modules/attention/__init__.py
xingzhaolee/tfcv
27b6a4e8e93cf9b5fecedd6c259118f64b74e263
[ "MIT" ]
null
null
null
tfcv/modeling/modules/attention/__init__.py
xingzhaolee/tfcv
27b6a4e8e93cf9b5fecedd6c259118f64b74e263
[ "MIT" ]
null
null
null
from .bam import * from .cbam import *
13
19
0.692308
from .bam import * from .cbam import *
true
true
f71b90fd99c79c76b18913c0621289947d10b94f
2,923
py
Python
pkg/distro/packaging_test.py
psigen/rules_pkg
b20c45f292be6c74d2f0d829ba02c83dbe271195
[ "Apache-2.0" ]
null
null
null
pkg/distro/packaging_test.py
psigen/rules_pkg
b20c45f292be6c74d2f0d829ba02c83dbe271195
[ "Apache-2.0" ]
null
null
null
pkg/distro/packaging_test.py
psigen/rules_pkg
b20c45f292be6c74d2f0d829ba02c83dbe271195
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 The Bazel Authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
34.797619
76
0.689702
import os import subprocess import unittest from bazel_tools.tools.python.runfiles import runfiles from releasing import release_tools from distro import release_version _VERBOSE = True class PackagingTest(unittest.TestCase): def setUp(self): self.data_files = runfiles.Create() self.repo =...
true
true
f71b9174bdbad3aa8de9187fea7cf060e68be521
277,501
py
Python
sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models.py
mtin/azure-sdk-for-python
08d7f8f76d1c9eca230cbcecb3c42eb92817bcb8
[ "MIT" ]
null
null
null
sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models.py
mtin/azure-sdk-for-python
08d7f8f76d1c9eca230cbcecb3c42eb92817bcb8
[ "MIT" ]
null
null
null
sdk/eventgrid/azure-eventgrid/azure/eventgrid/_generated/models/_models.py
mtin/azure-sdk-for-python
08d7f8f76d1c9eca230cbcecb3c42eb92817bcb8
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
43.177377
276
0.671298
import msrest.serialization class AcsChatEventBaseProperties(msrest.serialization.Model): _attribute_map = { 'recipient_communication_identifier': {'key': 'recipientCommunicationIdentifier', 'type': 'CommunicationIdentifierModel'}, 'transaction_id': {'key': 'transactionId', 'type': 'str'}...
true
true
f71b922170a32d261f523c660af62772c3182168
5,687
py
Python
mjmpc/control/olgaussian_mpc.py
mohakbhardwaj/mjmpc
097e8d9bdaf0b3a15afa39030b2f53b00dfa25de
[ "Apache-2.0" ]
2
2021-08-15T22:23:50.000Z
2021-12-03T13:09:13.000Z
mjmpc/control/olgaussian_mpc.py
mohakbhardwaj/mjmpc
097e8d9bdaf0b3a15afa39030b2f53b00dfa25de
[ "Apache-2.0" ]
null
null
null
mjmpc/control/olgaussian_mpc.py
mohakbhardwaj/mjmpc
097e8d9bdaf0b3a15afa39030b2f53b00dfa25de
[ "Apache-2.0" ]
1
2022-02-18T10:22:49.000Z
2022-02-18T10:22:49.000Z
""" MPC with open-loop Gaussian policies """ from .controller import Controller from mjmpc.utils.control_utils import generate_noise, scale_ctrl import copy import numpy as np import scipy.special class OLGaussianMPC(Controller): def __init__(self, d_state, d_obs, ...
40.621429
103
0.523475
from .controller import Controller from mjmpc.utils.control_utils import generate_noise, scale_ctrl import copy import numpy as np import scipy.special class OLGaussianMPC(Controller): def __init__(self, d_state, d_obs, d_action, ...
true
true
f71b92878fc1fad9e2f4829b6b8365831bd39735
612
py
Python
combine/indicator/combination_indicator.py
cwwang15/fudan-monte-carlo-pwd
807a4d9f45112ed6520a08d14ea65ca79efe33ea
[ "Apache-2.0" ]
1
2021-08-04T09:51:55.000Z
2021-08-04T09:51:55.000Z
combine/indicator/combination_indicator.py
cwwang15/pwd-monte-carlo
807a4d9f45112ed6520a08d14ea65ca79efe33ea
[ "Apache-2.0" ]
null
null
null
combine/indicator/combination_indicator.py
cwwang15/pwd-monte-carlo
807a4d9f45112ed6520a08d14ea65ca79efe33ea
[ "Apache-2.0" ]
null
null
null
import abc class CombinationIndicator(metaclass=abc.ABCMeta): def __init__(self, threshold: float): self.__threshold: float = threshold @property def threshold(self): return self.__threshold @threshold.setter def threshold(self, new_threshold: float): self.__threshold = n...
25.5
73
0.676471
import abc class CombinationIndicator(metaclass=abc.ABCMeta): def __init__(self, threshold: float): self.__threshold: float = threshold @property def threshold(self): return self.__threshold @threshold.setter def threshold(self, new_threshold: float): self.__threshold = n...
true
true
f71b95dcc7666004de7d0b909f2b67e00806bb40
1,523
py
Python
simulation/src/simulation_evaluation/src/state_machine/state_machines/priority.py
KITcar-Team/kitcar-gazebo-simulation
8a9438b5a24c288721ae0302889fe55e26046310
[ "MIT" ]
13
2020-06-30T17:18:28.000Z
2021-07-20T16:55:35.000Z
simulation/src/simulation_evaluation/src/state_machine/state_machines/priority.py
KITcar-Team/kitcar-gazebo-simulation
8a9438b5a24c288721ae0302889fe55e26046310
[ "MIT" ]
1
2020-11-10T20:15:42.000Z
2020-12-25T18:27:56.000Z
simulation/src/simulation_evaluation/src/state_machine/state_machines/priority.py
KITcar-Team/kitcar-gazebo-simulation
8a9438b5a24c288721ae0302889fe55e26046310
[ "MIT" ]
3
2020-07-20T09:09:08.000Z
2021-07-20T17:00:37.000Z
"""PriorityStateMachine keeps track of stoping or halting in front of stop or halt lines. See :mod:`simulation.src.simulation_evaluation.src.state_machine.states.priority` for implementation details of the states used in this StateMachine. """ from typing import Callable from simulation.src.simulation_evaluation.src...
32.404255
89
0.688116
from typing import Callable from simulation.src.simulation_evaluation.src.state_machine.states.priority import ( FailureInStopZone, InHaltZone, InStopZone, Off, SuccessfullyStopped, ) from .state_machine import StateMachine __copyright__ = "KITcar" class PriorityStateMachine(StateMachine): ...
true
true
f71b9795d1f9e2621b52a1fb8f3fffa662517f05
6,626
py
Python
wizmann-pic/18-11-19/encrypt.py
Wizmann/assets
1a34a18e65bc4c57676f9a04d6eb5c2a3806fcfc
[ "MIT" ]
null
null
null
wizmann-pic/18-11-19/encrypt.py
Wizmann/assets
1a34a18e65bc4c57676f9a04d6eb5c2a3806fcfc
[ "MIT" ]
null
null
null
wizmann-pic/18-11-19/encrypt.py
Wizmann/assets
1a34a18e65bc4c57676f9a04d6eb5c2a3806fcfc
[ "MIT" ]
null
null
null
#!/usr/bin/env python # # Copyright 2012-2015 clowwindy # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
27.957806
81
0.601419
from __future__ import absolute_import, division, print_function, \ with_statement import os import sys import hashlib import logging import random import string import binascii from shadowsocks import common from shadowsocks.crypto import rc4_md5, openssl, sodium, table NONCE_RANGE = (32, 512) N...
true
true
f71b97d646bf147a35345ec60a2da27de1631ea8
968
py
Python
mysite/mysite/urls.py
FullGhettoAlchemist/cepheusProduction
951c244d454fafa817b34dd37aaea28a10afa655
[ "MIT" ]
null
null
null
mysite/mysite/urls.py
FullGhettoAlchemist/cepheusProduction
951c244d454fafa817b34dd37aaea28a10afa655
[ "MIT" ]
null
null
null
mysite/mysite/urls.py
FullGhettoAlchemist/cepheusProduction
951c244d454fafa817b34dd37aaea28a10afa655
[ "MIT" ]
null
null
null
"""mysite URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/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') C...
35.851852
80
0.670455
from django.conf.urls import url from django.contrib import admin from app import views urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'^$', views.index, name='index'), url(r'^position/$', views.position, name='position'), url(r'^details/$', views.details, name='details'), ]
true
true
f71b995b9c4ad66cf9f2feb286b113ed39ca86d1
8,848
py
Python
STS_v2/compute_high_low_limit_v3.py
kite8/quant_learning
d823974cd2b5a6b8e2a20fe42d7334051fa46ea0
[ "MIT" ]
1
2019-02-22T08:12:41.000Z
2019-02-22T08:12:41.000Z
STS_v2/compute_high_low_limit_v3.py
kite8/quant_learning
d823974cd2b5a6b8e2a20fe42d7334051fa46ea0
[ "MIT" ]
null
null
null
STS_v2/compute_high_low_limit_v3.py
kite8/quant_learning
d823974cd2b5a6b8e2a20fe42d7334051fa46ea0
[ "MIT" ]
5
2019-02-22T08:14:09.000Z
2020-06-28T05:54:39.000Z
# -*- coding: utf-8 -*- """ Created on Fri Nov 2 15:19:45 2018 @author: kite """ import datetime, time from pymongo import UpdateOne, ASCENDING, UpdateMany from database import DB_CONN from stock_util import get_trading_dates, get_all_codes import tushare as ts import numpy as np import pandas as pd import requests ...
36.561983
125
0.495592
import datetime, time from pymongo import UpdateOne, ASCENDING, UpdateMany from database import DB_CONN from stock_util import get_trading_dates, get_all_codes import tushare as ts import numpy as np import pandas as pd import requests import json import datetime def fill_issueprice_and_timeToMarket(): df = pd...
true
true
f71b9a749d420870b13e967659e88b311fd71f8e
5,142
py
Python
dsw_mailer/connection/smtp.py
ds-wizard/mailer
f919cf42a413a9fa530607358900255b55fc233a
[ "Apache-2.0" ]
null
null
null
dsw_mailer/connection/smtp.py
ds-wizard/mailer
f919cf42a413a9fa530607358900255b55fc233a
[ "Apache-2.0" ]
null
null
null
dsw_mailer/connection/smtp.py
ds-wizard/mailer
f919cf42a413a9fa530607358900255b55fc233a
[ "Apache-2.0" ]
null
null
null
import logging import pathvalidate import smtplib import ssl import tenacity from email import encoders from email.mime.base import MIMEBase from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.utils import formataddr from ..config import MailConfig from ..context import Cont...
36.211268
82
0.632439
import logging import pathvalidate import smtplib import ssl import tenacity from email import encoders from email.mime.base import MIMEBase from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from email.utils import formataddr from ..config import MailConfig from ..context import Cont...
true
true
f71b9ac9f4d7813d05814baf5ec329e7feb1f6b6
1,576
py
Python
setup.py
JakubBlaha/python-jsonstore
9f79f17e7947fe89aea1e67483d1f8d7313ea4ab
[ "MIT" ]
2
2020-04-30T12:22:15.000Z
2020-05-15T22:40:39.000Z
setup.py
JakubBlaha/python-jsonstore
9f79f17e7947fe89aea1e67483d1f8d7313ea4ab
[ "MIT" ]
6
2018-09-05T17:46:21.000Z
2020-06-01T11:34:26.000Z
setup.py
JakubBlaha/python-jsonstore
9f79f17e7947fe89aea1e67483d1f8d7313ea4ab
[ "MIT" ]
5
2017-11-25T20:31:28.000Z
2020-09-04T00:57:07.000Z
import codecs from os import path from textwrap import dedent from setuptools import setup here = path.abspath(path.dirname(__file__)) with codecs.open(path.join(here, "README.rst"), encoding='utf-8') as f: long_description = f.read() setup( name='python-jsonstore', use_scm_version=True, description...
33.531915
71
0.645939
import codecs from os import path from textwrap import dedent from setuptools import setup here = path.abspath(path.dirname(__file__)) with codecs.open(path.join(here, "README.rst"), encoding='utf-8') as f: long_description = f.read() setup( name='python-jsonstore', use_scm_version=True, description...
true
true
f71b9b08d59205e762bc081291995a3dce88426a
778
py
Python
ws2122-lspm/Lib/site-packages/pm4py/objects/log/exporter/xes/util/__init__.py
Malekhy/ws2122-lspm
e4dc8b801d12f862b8ef536a0f125f346f085a00
[ "MIT" ]
1
2022-01-19T04:02:46.000Z
2022-01-19T04:02:46.000Z
ws2122-lspm/Lib/site-packages/pm4py/objects/log/exporter/xes/util/__init__.py
Malekhy/ws2122-lspm
e4dc8b801d12f862b8ef536a0f125f346f085a00
[ "MIT" ]
1
2021-11-19T07:21:48.000Z
2021-11-19T07:21:48.000Z
ws2122-lspm/Lib/site-packages/pm4py/objects/log/exporter/xes/util/__init__.py
Malekhy/ws2122-lspm
e4dc8b801d12f862b8ef536a0f125f346f085a00
[ "MIT" ]
1
2022-01-14T17:15:38.000Z
2022-01-14T17:15:38.000Z
''' This file is part of PM4Py (More Info: https://pm4py.fit.fraunhofer.de). PM4Py is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any late...
43.222222
76
0.737789
from pm4py.objects.log.exporter.xes.util import compression
true
true
f71b9c6dbdb4556fd1c62de37e6dbb97379d445f
4,113
py
Python
homeassistant/components/sensor/rtorrent.py
XRyu/home-assistant
c9c707e368be159f0138a40d21fdea7a2a650ffe
[ "Apache-2.0" ]
1
2019-07-24T09:26:57.000Z
2019-07-24T09:26:57.000Z
homeassistant/components/sensor/rtorrent.py
XRyu/home-assistant
c9c707e368be159f0138a40d21fdea7a2a650ffe
[ "Apache-2.0" ]
5
2021-02-08T20:32:11.000Z
2022-01-13T01:19:23.000Z
homeassistant/components/sensor/rtorrent.py
XRyu/home-assistant
c9c707e368be159f0138a40d21fdea7a2a650ffe
[ "Apache-2.0" ]
null
null
null
"""Support for monitoring the rtorrent BitTorrent client API.""" import logging import xmlrpc.client import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_URL, CONF_NAME, CONF_MONITORED_VARIABLES, STATE_IDLE) from homeassistant.helpers.enti...
32.132813
70
0.650863
import logging import xmlrpc.client import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_URL, CONF_NAME, CONF_MONITORED_VARIABLES, STATE_IDLE) from homeassistant.helpers.entity import Entity import homeassistant.helpers.config_validation a...
true
true
f71b9da7eaef7e2b15246349f4b4f1045f95882f
799
py
Python
backend/scrape_amazon/update_product_db_amazon.py
jayleenli/the-legend-of-compurator
7fc747ebf6b011acec8733a394861f7fed368d73
[ "MIT" ]
null
null
null
backend/scrape_amazon/update_product_db_amazon.py
jayleenli/the-legend-of-compurator
7fc747ebf6b011acec8733a394861f7fed368d73
[ "MIT" ]
null
null
null
backend/scrape_amazon/update_product_db_amazon.py
jayleenli/the-legend-of-compurator
7fc747ebf6b011acec8733a394861f7fed368d73
[ "MIT" ]
null
null
null
from .scrape_objects_MVP import get_attributes, get_id from pymongo import MongoClient import os DB_URL = os.environ['DB_URL'] CLIENT = MongoClient(DB_URL) DB = CLIENT.compurator PRODUCTS_COLLECTION = DB["products"] def check_product_exists(url): ''' :param url: url of amazon product :return: false if pr...
24.212121
90
0.720901
from .scrape_objects_MVP import get_attributes, get_id from pymongo import MongoClient import os DB_URL = os.environ['DB_URL'] CLIENT = MongoClient(DB_URL) DB = CLIENT.compurator PRODUCTS_COLLECTION = DB["products"] def check_product_exists(url): p_id = get_id(url) if PRODUCTS_COLLECTION.count({'p_id': p_id...
true
true
f71b9e37908dd5da30752301903bfc85504aa496
728
py
Python
Examples/AcceptAllRevisions.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
14
2018-07-15T17:01:52.000Z
2018-11-29T06:15:33.000Z
Examples/AcceptAllRevisions.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
1
2018-09-28T12:59:34.000Z
2019-10-08T08:42:59.000Z
Examples/AcceptAllRevisions.py
aspose-words-cloud/aspose-words-cloud-python
65c7b55fa4aac69b60d41e7f54aed231df285479
[ "MIT" ]
2
2020-12-21T07:59:17.000Z
2022-02-16T21:41:25.000Z
import os import asposewordscloud import asposewordscloud.models.requests from asposewordscloud.rest import ApiException from shutil import copyfile words_api = WordsApi(client_id = '####-####-####-####-####', client_secret = '##################') file_name = 'test_doc.docx' # Upload original document to cloud stora...
38.315789
108
0.787088
import os import asposewordscloud import asposewordscloud.models.requests from asposewordscloud.rest import ApiException from shutil import copyfile words_api = WordsApi(client_id = '####-####-####-####-####', client_secret = '##################') file_name = 'test_doc.docx' my_var1 = open(file_name, 'rb') my_var2 ...
true
true