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
f7203c15114df58d6fe296e4cab56a7dfde9a7e6
7,137
py
Python
sdk/python/pulumi_azure_nextgen/resources/v20190601preview/template_spec_version.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/resources/v20190601preview/template_spec_version.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/resources/v20190601preview/template_spec_version.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
41.254335
153
0.644529
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs from ._inputs import * __all__ = ['TemplateSpecVersion'] class TemplateSpecVersion(pulumi.CustomResource): def __init__(__self__, ...
true
true
f7203e25547d18f2b19333cb3e9e2cb96aaaadfa
14,178
py
Python
env/lib/python3.6/site-packages/pipenv/vendor/pip9/_vendor/html5lib/serializer.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
2
2021-10-01T17:23:49.000Z
2021-10-01T17:26:19.000Z
env/lib/python3.6/site-packages/pipenv/vendor/pip9/_vendor/html5lib/serializer.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
1
2017-09-15T19:01:09.000Z
2017-09-15T23:42:43.000Z
env/lib/python3.6/site-packages/pipenv/vendor/pip9/_vendor/html5lib/serializer.py
anthowen/duplify
846d01c1b21230937fdf0281b0cf8c0b08a8c24e
[ "MIT" ]
2
2018-04-06T05:36:25.000Z
2018-12-30T22:58:58.000Z
from __future__ import absolute_import, division, unicode_literals from pip9._vendor.six import text_type import re from codecs import register_error, xmlcharrefreplace_errors from .constants import voidElements, booleanAttributes, spaceCharacters from .constants import rcdataElements, entities, xmlEntities from . i...
42.322388
116
0.554662
from __future__ import absolute_import, division, unicode_literals from pip9._vendor.six import text_type import re from codecs import register_error, xmlcharrefreplace_errors from .constants import voidElements, booleanAttributes, spaceCharacters from .constants import rcdataElements, entities, xmlEntities from . i...
true
true
f7203e5539f2d789837ec3db4336641fa5cb95f8
24,459
py
Python
pytorch_transformers/utils_glue.py
nguyenvo09/EACL2021
9d04d8954c1ded2110daac23117de11221f08cc6
[ "MIT" ]
27
2021-01-18T16:03:17.000Z
2022-03-05T22:38:34.000Z
pytorch_transformers/utils_glue.py
Jason98Xu/GET
6860c87425619954cacbf5a14ad20befd18ec818
[ "MIT" ]
null
null
null
pytorch_transformers/utils_glue.py
Jason98Xu/GET
6860c87425619954cacbf5a14ad20befd18ec818
[ "MIT" ]
2
2022-03-16T03:22:16.000Z
2022-03-27T03:12:14.000Z
# coding=utf-8 # Copyright 2018 The Google AI Language Team Authors and The HuggingFace Inc. team. # Copyright (c) 2018, NVIDIA CORPORATION. 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 cop...
36.343239
130
0.58874
from __future__ import absolute_import, division, print_function import csv import logging import os import sys from io import open from scipy.stats import pearsonr, spearmanr from sklearn.metrics import matthews_corrcoef, f1_score from .tokenization_utils import PreTrainedTokenizer logger = logging....
true
true
f7203f7c40d84ae4799af332cef766f88462c378
6,000
py
Python
modules/aim_server/files/handler.py
mshuler/infrastructure-puppet
bb054d08e89f9bf4b804a7a453f02ae722519d0a
[ "Apache-2.0" ]
1
2019-06-09T10:25:04.000Z
2019-06-09T10:25:04.000Z
modules/aim_server/files/handler.py
mshuler/infrastructure-puppet
bb054d08e89f9bf4b804a7a453f02ae722519d0a
[ "Apache-2.0" ]
1
2020-05-08T07:07:43.000Z
2020-05-08T07:07:43.000Z
modules/aim_server/files/handler.py
mshuler/infrastructure-puppet
bb054d08e89f9bf4b804a7a453f02ae722519d0a
[ "Apache-2.0" ]
1
2018-07-09T08:44:40.000Z
2018-07-09T08:44:40.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ This is the main WSGI handler file for AIM. It compiles a list of valid URLs from the 'pages' library folder, and if a URL matches it runs the specific submodule's run() function. It also handles CGI parsing and exceptions in the applications. """ # Main imports imp...
34.090909
97
0.534
import cgi import re import sys import traceback import yaml import json import plugins.session import plugins.database import plugins.openapi urls = [] if __name__ != '__main__': import pages for page in pages.handlers: urls.append((r"^(/api/%s)(/.+)?$" % page, pages.handlers[page].run)) con...
true
true
f72040ff1201f3604a63a0df3a8ef880ea9ea363
5,366
py
Python
paasta_tools/mesos/mesos_file.py
sobolevn/paasta
8b87e0b13816c09b3d063b6d3271e6c7627fd264
[ "Apache-2.0" ]
1,711
2015-11-10T18:04:56.000Z
2022-03-23T08:53:16.000Z
paasta_tools/mesos/mesos_file.py
sobolevn/paasta
8b87e0b13816c09b3d063b6d3271e6c7627fd264
[ "Apache-2.0" ]
1,689
2015-11-10T17:59:04.000Z
2022-03-31T20:46:46.000Z
paasta_tools/mesos/mesos_file.py
sobolevn/paasta
8b87e0b13816c09b3d063b6d3271e6c7627fd264
[ "Apache-2.0" ]
267
2015-11-10T19:17:16.000Z
2022-02-08T20:59:52.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 u...
31.564706
108
0.602124
import os from . import exceptions from paasta_tools.async_utils import async_ttl_cache class File: chunk_size = 1024 def __init__(self, host, task=None, path=None): self.host = host self.task = task self.path = path if self.task is None: self._ho...
true
true
f720411ef892790745b4b66daf03db60907dd920
1,203
py
Python
techk/apps/rest/views.py
felipesantander/fullstack-challenge
d2a6ff1e518199a34eb9d095275adb9cbd8a1cc2
[ "MIT" ]
null
null
null
techk/apps/rest/views.py
felipesantander/fullstack-challenge
d2a6ff1e518199a34eb9d095275adb9cbd8a1cc2
[ "MIT" ]
null
null
null
techk/apps/rest/views.py
felipesantander/fullstack-challenge
d2a6ff1e518199a34eb9d095275adb9cbd8a1cc2
[ "MIT" ]
null
null
null
from django.shortcuts import render from rest_framework import serializers, viewsets, generics from apps.scraper.models import Libros, Categorias from django.http import JsonResponse # Create your views here. class libros_serializer(serializers.HyperlinkedModelSerializer): class Meta: model = Libros ...
32.513514
76
0.736492
from django.shortcuts import render from rest_framework import serializers, viewsets, generics from apps.scraper.models import Libros, Categorias from django.http import JsonResponse class libros_serializer(serializers.HyperlinkedModelSerializer): class Meta: model = Libros fields = ['id', 'categ...
true
true
f7204141db43a3754031bc175c87876a2d7df3e5
34,936
py
Python
mmdet/models/dense_heads/reppoints_head.py
Dopamine0717/mmdetection
40a6fddae20978de98a335cbb45e227db782f72b
[ "Apache-2.0" ]
20,190
2018-09-10T01:11:53.000Z
2022-03-31T22:31:33.000Z
mmdet/models/dense_heads/reppoints_head.py
Joker-co/mmdet_pro
96abfd90cf0e38c5ce398795f949e9328eb85c1b
[ "Apache-2.0" ]
6,736
2018-09-17T09:45:51.000Z
2022-03-31T22:54:10.000Z
mmdet/models/dense_heads/reppoints_head.py
Joker-co/mmdet_pro
96abfd90cf0e38c5ce398795f949e9328eb85c1b
[ "Apache-2.0" ]
7,837
2018-09-11T02:58:23.000Z
2022-03-31T22:31:38.000Z
# Copyright (c) OpenMMLab. All rights reserved. import numpy as np import torch import torch.nn as nn from mmcv.cnn import ConvModule from mmcv.ops import DeformConv2d from mmdet.core import (build_assigner, build_sampler, images_to_levels, multi_apply, unmap) from mmdet.core.anchor.point_gener...
45.667974
101
0.570901
import numpy as np import torch import torch.nn as nn from mmcv.cnn import ConvModule from mmcv.ops import DeformConv2d from mmdet.core import (build_assigner, build_sampler, images_to_levels, multi_apply, unmap) from mmdet.core.anchor.point_generator import MlvlPointGenerator from mmdet.core....
true
true
f72041f40d309616756fd6cdeeec8f6b8869269e
1,839
py
Python
deeppavlov/__init__.py
techthiyanes/DeepPavlov
08555428388fed3c7b036c0a82a70a25efcabcff
[ "Apache-2.0" ]
5,893
2018-02-01T18:13:20.000Z
2022-03-31T19:22:21.000Z
deeppavlov/__init__.py
Aniket27100709/DeepPavlov
d73f45733d6b23347871aa293309730303b64450
[ "Apache-2.0" ]
749
2018-01-31T11:36:02.000Z
2022-03-30T07:24:22.000Z
deeppavlov/__init__.py
Aniket27100709/DeepPavlov
d73f45733d6b23347871aa293309730303b64450
[ "Apache-2.0" ]
1,155
2018-02-01T10:52:15.000Z
2022-03-29T02:12:15.000Z
# Copyright 2017 Neural Networks and Deep Learning lab, MIPT # # 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 applicab...
38.3125
107
0.780859
import sys from pathlib import Path from ._meta import __author__, __description__, __email__, __keywords__, __license__, __version__ from .configs import configs from .core.commands.infer import build_model from .core.commands.train import train_evaluate_model_from_config from .core.common.base import E...
true
true
f720423411e3b69f1160d587bd41dbe72cd1922f
66,041
py
Python
tests/system_tests_two_routers.py
overmeulen/qpid-dispatch
a56b28ccb1b552c5b2dc0872dcde1fa09c725cab
[ "Apache-2.0" ]
null
null
null
tests/system_tests_two_routers.py
overmeulen/qpid-dispatch
a56b28ccb1b552c5b2dc0872dcde1fa09c725cab
[ "Apache-2.0" ]
3
2019-09-30T03:11:04.000Z
2020-03-06T17:15:54.000Z
tests/system_tests_two_routers.py
irinabov/debian-qpid-dispatch
42fb2ffb65f8e8c8d616633c0b4308d6531a281d
[ "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...
37.565984
155
0.601687
from __future__ import unicode_literals from __future__ import division from __future__ import absolute_import from __future__ import print_function from time import sleep import json, os import logging from threading import Timer from subprocess import PIPE, STDOUT from proton import Message, Timeo...
true
true
f720425769262bb20bd711e6f74901a646158501
45,642
py
Python
core/controllers/profile_test.py
mohitkh7/oppia
d322e6ed8f9d018cc95335544c4fac7290b89af0
[ "Apache-2.0" ]
null
null
null
core/controllers/profile_test.py
mohitkh7/oppia
d322e6ed8f9d018cc95335544c4fac7290b89af0
[ "Apache-2.0" ]
null
null
null
core/controllers/profile_test.py
mohitkh7/oppia
d322e6ed8f9d018cc95335544c4fac7290b89af0
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 The Oppia 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 ...
41.796703
80
0.655208
from __future__ import absolute_import from __future__ import unicode_literals import datetime import re from constants import constants from core.domain import exp_domain from core.domain import exp_services from core.domain import rights_manager from core.domain import subscription_services from ...
true
true
f720429c5f9f58e91b08613e41ef82569fb3831b
20,741
py
Python
source/appModules/explorer.py
krzysz00/nvda
d34444242a529098499131165a3e60d5a05ac96f
[ "bzip2-1.0.6" ]
1
2016-07-10T00:23:14.000Z
2016-07-10T00:23:14.000Z
source/appModules/explorer.py
krzysz00/nvda
d34444242a529098499131165a3e60d5a05ac96f
[ "bzip2-1.0.6" ]
null
null
null
source/appModules/explorer.py
krzysz00/nvda
d34444242a529098499131165a3e60d5a05ac96f
[ "bzip2-1.0.6" ]
1
2017-08-04T09:00:01.000Z
2017-08-04T09:00:01.000Z
# -*- coding: UTF-8 -*- # A part of NonVisual Desktop Access (NVDA) # Copyright (C) 2006-2021 NV Access Limited, Joseph Lee, Łukasz Golonka, Julien Cochuyt # This file is covered by the GNU General Public License. # See the file COPYING for more details. """App module for Windows Explorer (aka Windows shell and ...
38.768224
172
0.733282
from comtypes import COMError import time import appModuleHandler import controlTypes import winUser import winVersion import api import speech import eventHandler import mouseHandler from NVDAObjects.window import Window from NVDAObjects.IAccessible import IAccessible, List from NVDAObjects.UIA im...
true
true
f7204379766eb4e6ae9bd5b9297cae2841d80760
8,607
py
Python
gpxo/track.py
liquidpizza/gpxo
4f8eb43a4d6b879f51a7e688dfa80b4aa5558889
[ "BSD-3-Clause" ]
null
null
null
gpxo/track.py
liquidpizza/gpxo
4f8eb43a4d6b879f51a7e688dfa80b4aa5558889
[ "BSD-3-Clause" ]
null
null
null
gpxo/track.py
liquidpizza/gpxo
4f8eb43a4d6b879f51a7e688dfa80b4aa5558889
[ "BSD-3-Clause" ]
null
null
null
"""General tools for gpx data processing based on gpxpy.""" import numpy as np import pandas as pd import matplotlib.pyplot as plt import gpxpy from vincenty import vincenty import mplleaflet from .general import smooth, closest_pt # =============================== Misc. Config =============================== # s...
31.412409
88
0.562449
import numpy as np import pandas as pd import matplotlib.pyplot as plt import gpxpy from vincenty import vincenty import mplleaflet from .general import smooth, closest_pt shortnames = {'t': 'time', 's': 'duration (s)', 'd': 'distance (km)', 'v': 'velocity (km/h)', ...
true
true
f72043e942a5c4831999c099986dd8ca73cf871a
2,428
py
Python
share/qt/extract_strings_qt.py
VaderCoinProject/vadercoin
b513c794b014d40e5aad281dd1f54845c46d216c
[ "MIT" ]
null
null
null
share/qt/extract_strings_qt.py
VaderCoinProject/vadercoin
b513c794b014d40e5aad281dd1f54845c46d216c
[ "MIT" ]
null
null
null
share/qt/extract_strings_qt.py
VaderCoinProject/vadercoin
b513c794b014d40e5aad281dd1f54845c46d216c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2012-2019 The Vadercoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Extract _("...") strings for translation and convert to Qt stringdefs so that they can be picked up ...
28.232558
105
0.629736
from subprocess import Popen, PIPE import operator import os import sys OUT_CPP="qt/vadercoinstrings.cpp" EMPTY=['""'] def parse_po(text): messages = [] msgid = [] msgstr = [] in_msgid = False in_msgstr = False for line in text.split('\n'): line = line.rstrip('\r') if line...
true
true
f7204458a6279f21973b1959938c499ec950b89f
4,309
py
Python
losses.py
JayanthRR/ConCURL_NCE
5471b022a571ae61bd891783084512c3a227829b
[ "MIT" ]
3
2022-01-28T06:49:26.000Z
2022-03-06T09:25:00.000Z
losses.py
JayanthRR/ConCURL_NCE
5471b022a571ae61bd891783084512c3a227829b
[ "MIT" ]
null
null
null
losses.py
JayanthRR/ConCURL_NCE
5471b022a571ae61bd891783084512c3a227829b
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import time import sys softmax = nn.Softmax(dim=1).cuda() def distributed_sinkhorn(Q, nmb_iters): with torch.no_grad(): sum_Q = torch.sum(Q) # dist.all_reduce(sum_Q) Q /= sum_Q u = torch.zeros(Q.shape[0]).cuda(non_blocking=True) r = torc...
37.469565
168
0.647018
import torch import torch.nn as nn import time import sys softmax = nn.Softmax(dim=1).cuda() def distributed_sinkhorn(Q, nmb_iters): with torch.no_grad(): sum_Q = torch.sum(Q) Q /= sum_Q u = torch.zeros(Q.shape[0]).cuda(non_blocking=True) r = torch.ones(Q.shape[0]).cuda(...
true
true
f720449d5522724a0dea3ddf7fbe0086f2f89ea6
2,880
py
Python
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/account/wizard/pos_box.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
1
2019-12-19T01:53:13.000Z
2019-12-19T01:53:13.000Z
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/account/wizard/pos_box.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
null
null
null
apps/odoo/lib/odoo-10.0.post20170615-py2.7.egg/odoo/addons/account/wizard/pos_box.py
gtfarng/Odoo_migrade
9cc28fae4c379e407645248a29d22139925eafe7
[ "Apache-2.0" ]
null
null
null
from odoo import models, fields, api, _ from odoo.exceptions import UserError class CashBox(models.TransientModel): _register = False name = fields.Char(string='Reason', required=True) # Attention, we don't set a domain, because there is a journal_type key # in the context of the action amount = ...
37.402597
121
0.631944
from odoo import models, fields, api, _ from odoo.exceptions import UserError class CashBox(models.TransientModel): _register = False name = fields.Char(string='Reason', required=True) # in the context of the action amount = fields.Float(string='Amount', digits=0, required=True) @api.multi ...
true
true
f720451ca2d68c90374718f176888a952e6989a6
311
py
Python
June21/ClassesandObjects/inheritance_101.py
pythonbykhaja/intesivepython
d3074f35bf36a04d4d1d9b4ff4631733d40b5817
[ "Apache-2.0" ]
2
2021-05-29T18:21:50.000Z
2021-07-24T13:03:30.000Z
June21/ClassesandObjects/inheritance_101.py
pythonbykhaja/intesivepython
d3074f35bf36a04d4d1d9b4ff4631733d40b5817
[ "Apache-2.0" ]
null
null
null
June21/ClassesandObjects/inheritance_101.py
pythonbykhaja/intesivepython
d3074f35bf36a04d4d1d9b4ff4631733d40b5817
[ "Apache-2.0" ]
2
2021-05-25T10:19:54.000Z
2021-09-21T12:20:48.000Z
class Mobile: def dial(self, number): print(f"dialing number {number}") def ring(self): print("ringing using built in tones.....") class SmartMobile(Mobile): def ring(self): """ overriding a Method """ print("ringing using custom ring tones .... ")
22.214286
54
0.562701
class Mobile: def dial(self, number): print(f"dialing number {number}") def ring(self): print("ringing using built in tones.....") class SmartMobile(Mobile): def ring(self): print("ringing using custom ring tones .... ")
true
true
f7204539107b908bdb3d32b7e595df242c5d27e6
3,162
py
Python
eventsourcing/infrastructure/timebucketedlog_reader.py
scbabacus/eventsourcing
8404c5b26719ed9d9d1d257ebba774879c7243c4
[ "BSD-3-Clause" ]
1
2020-02-10T08:12:31.000Z
2020-02-10T08:12:31.000Z
eventsourcing/infrastructure/timebucketedlog_reader.py
scbabacus/eventsourcing
8404c5b26719ed9d9d1d257ebba774879c7243c4
[ "BSD-3-Clause" ]
null
null
null
eventsourcing/infrastructure/timebucketedlog_reader.py
scbabacus/eventsourcing
8404c5b26719ed9d9d1d257ebba774879c7243c4
[ "BSD-3-Clause" ]
null
null
null
from time import time import six from six import with_metaclass from eventsourcing.domain.model.events import QualnameABCMeta from eventsourcing.domain.model.timebucketedlog import MessageLogged, Timebucketedlog, make_timebucket_id, \ next_bucket_starts, previous_bucket_starts from eventsourcing.infrastructure.ev...
37.2
113
0.619861
from time import time import six from six import with_metaclass from eventsourcing.domain.model.events import QualnameABCMeta from eventsourcing.domain.model.timebucketedlog import MessageLogged, Timebucketedlog, make_timebucket_id, \ next_bucket_starts, previous_bucket_starts from eventsourcing.infrastructure.ev...
true
true
f720456245ef9dd1a92e44572316f1220df27b85
18,816
py
Python
testing/python/approx.py
rosemichaele/pytest
1c0ab3c2a32f7932378a1c37106d082784cb4700
[ "MIT" ]
1
2021-08-16T07:45:51.000Z
2021-08-16T07:45:51.000Z
testing/python/approx.py
rosemichaele/pytest
1c0ab3c2a32f7932378a1c37106d082784cb4700
[ "MIT" ]
null
null
null
testing/python/approx.py
rosemichaele/pytest
1c0ab3c2a32f7932378a1c37106d082784cb4700
[ "MIT" ]
null
null
null
import operator from decimal import Decimal from fractions import Fraction from operator import eq from operator import ne import pytest from pytest import approx inf, nan = float("inf"), float("nan") @pytest.fixture def mocked_doctest_runner(monkeypatch): import doctest class MockedPdb: def __init...
36.115163
97
0.526626
import operator from decimal import Decimal from fractions import Fraction from operator import eq from operator import ne import pytest from pytest import approx inf, nan = float("inf"), float("nan") @pytest.fixture def mocked_doctest_runner(monkeypatch): import doctest class MockedPdb: def __init...
true
true
f72045666fb3ba1330df271ba4a9bc225bbc5cf0
458
py
Python
rising_sphinx_theme/__init__.py
PhoenixDL/rising_sphinx_theme
88c213524bdd87e2c4320f047eebbee04322da47
[ "MIT" ]
2
2020-05-03T09:22:06.000Z
2020-05-18T11:32:51.000Z
rising_sphinx_theme/__init__.py
PhoenixDL/rising_sphinx_theme
88c213524bdd87e2c4320f047eebbee04322da47
[ "MIT" ]
1
2021-09-02T10:40:00.000Z
2021-09-02T10:40:00.000Z
rising_sphinx_theme/__init__.py
PhoenixDL/rising_sphinx_theme
88c213524bdd87e2c4320f047eebbee04322da47
[ "MIT" ]
1
2020-06-19T09:26:47.000Z
2020-06-19T09:26:47.000Z
"""rising Sphinx theme. """ from os import path __version__ = '0.0.25' __version_full__ = __version__ def get_html_theme_path(): """Return list of HTML theme paths.""" cur_dir = path.abspath(path.dirname(path.dirname(__file__))) return cur_dir # See http://www.sphinx-doc.org/en/stable/theming.html#dist...
25.444444
96
0.735808
from os import path __version__ = '0.0.25' __version_full__ = __version__ def get_html_theme_path(): cur_dir = path.abspath(path.dirname(path.dirname(__file__))) return cur_dir ising_sphinx_theme', path.abspath(path.dirname(__file__)))
true
true
f72045bb170c2dd47739981943d2b653f09fbe60
54,959
py
Python
codegen/fletcher/columnreader.py
honorpeter/fletcher
9622293443b1ea70b1f3aa592098a64690600dd4
[ "Apache-2.0" ]
1
2021-03-05T08:24:57.000Z
2021-03-05T08:24:57.000Z
codegen/fletcher/columnreader.py
honorpeter/fletcher
9622293443b1ea70b1f3aa592098a64690600dd4
[ "Apache-2.0" ]
null
null
null
codegen/fletcher/columnreader.py
honorpeter/fletcher
9622293443b1ea70b1f3aa592098a64690600dd4
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Delft University of Technology # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
38.785462
119
0.575138
from itertools import zip_longest import random from .configurable import * from .fields import * from .streams import * from .lines import * from .testbench import * __all__ = ["ColumnReader", "BUS_ADDR_WIDTH", "INDEX_WIDTH", "CMD_TAG_WIDTH"] BUS_ADDR_WIDTH = Generic("BUS_ADDR_WIDTH") BUS_LEN_WIDTH ...
true
true
f72045c3f2c81d8d986759ab3a1d7b3e2137875b
2,936
py
Python
Whole Protein Prediction CNN/dataset.py
LucaAngioloni/ProteineSecondaryStructure-CNN
c85571bbcdf17b4a753dce6ed0e4346111ea43a0
[ "MIT" ]
96
2018-02-02T14:11:56.000Z
2021-12-25T21:23:55.000Z
Whole Protein Prediction CNN/dataset.py
LucaAngioloni/ProteineSecondaryStructure-CNN
c85571bbcdf17b4a753dce6ed0e4346111ea43a0
[ "MIT" ]
3
2021-05-11T12:10:04.000Z
2022-02-10T00:05:30.000Z
Whole Protein Prediction CNN/dataset.py
LucaAngioloni/ProteineSecondaryStructure-CNN
c85571bbcdf17b4a753dce6ed0e4346111ea43a0
[ "MIT" ]
33
2018-11-20T16:10:24.000Z
2021-12-25T21:23:59.000Z
# MIT License # # Copyright (c) 2017 Luca Angioloni # # 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, merg...
34.952381
108
0.722071
import numpy as np dataset_path = "../dataset/cullpdb+profile_6133.npy" cb513_path = "../dataset/cb513+profile_split1.npy" sequence_len = 700 total_features = 57 amino_acid_residues = 21 num_classes = 8 def get_dataset(path=dataset_path): ds = np.load(path) ds = np.reshape(ds, (ds.sh...
true
true
f720461520565da530df980a2ea008f3eb571a8d
6,931
py
Python
project/celebrities_births.py
Yoon-D-G/celebrity_scraper
002fa7487408f05b896812d8fe6cde5cbb5d5edd
[ "MIT" ]
null
null
null
project/celebrities_births.py
Yoon-D-G/celebrity_scraper
002fa7487408f05b896812d8fe6cde5cbb5d5edd
[ "MIT" ]
null
null
null
project/celebrities_births.py
Yoon-D-G/celebrity_scraper
002fa7487408f05b896812d8fe6cde5cbb5d5edd
[ "MIT" ]
null
null
null
''' This script contains a class for representing the date. Additionally, the class Scraper get the HTML code of a Wikipedia page and extracts the name of celebrities that were born in a certain date ''' import re import requests from bs4 import BeautifulSoup from datetime import datetime class Date: ''' This...
30.134783
79
0.566873
import re import requests from bs4 import BeautifulSoup from datetime import datetime class Date: _day_of_month = (31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31) _month_str = ('January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', ...
true
true
f7204650310a54c5dad514d4271f2b18cd7ca4c9
43,074
py
Python
pruning/prune_resnet_tools.py
18463105800/ssd.pruning.pytorch
39592ee00e02f28742028a97592beec18d07258c
[ "MIT" ]
13
2019-11-15T16:18:55.000Z
2022-03-23T06:04:49.000Z
pruning/prune_resnet_tools.py
XUHUAKing/ssd.pruning.pytorch
39592ee00e02f28742028a97592beec18d07258c
[ "MIT" ]
null
null
null
pruning/prune_resnet_tools.py
XUHUAKing/ssd.pruning.pytorch
39592ee00e02f28742028a97592beec18d07258c
[ "MIT" ]
3
2019-11-27T07:27:38.000Z
2020-10-21T08:46:21.000Z
''' This file contains functions for pruning resnet-like model in layer level 1. prune_resconv_layer (resnet: conv layers) 2. prune_resnet_lconv_layer (resnet: lconv means identity layer) 3. prune_rbconv_by_indices (resnet: rbconv means right path's bottom layer) 4. prune_rbconv_by_number (resn...
43.953061
151
0.631402
import torch from torch.autograd import Variable from torchvision import models import cv2 cv2.setNumThreads(0) cv2.ocl.setUseOpenCL(False) import sys import numpy as np from models.resnet import BasicBlock, Bottleneck def replace_layers(model, i, indexes, layers): if i in indexes: # layers a...
true
true
f7204660bc2ad2aac0e43e529512a8b9923d1bed
122,038
py
Python
zerver/models.py
osamasarwar38/zulip
58b93c3e830249b1202b8f396b36a2660e1cb8f9
[ "Apache-2.0" ]
1
2020-06-22T18:00:20.000Z
2020-06-22T18:00:20.000Z
zerver/models.py
osamasarwar38/zulip
58b93c3e830249b1202b8f396b36a2660e1cb8f9
[ "Apache-2.0" ]
null
null
null
zerver/models.py
osamasarwar38/zulip
58b93c3e830249b1202b8f396b36a2660e1cb8f9
[ "Apache-2.0" ]
null
null
null
import datetime import re import sre_constants import time from collections import defaultdict from datetime import timedelta from typing import ( AbstractSet, Any, Callable, DefaultDict, Dict, Iterable, List, Optional, Sequence, Set, Tuple, TypeVar, Union, ) import ...
40.952349
119
0.702929
import datetime import re import sre_constants import time from collections import defaultdict from datetime import timedelta from typing import ( AbstractSet, Any, Callable, DefaultDict, Dict, Iterable, List, Optional, Sequence, Set, Tuple, TypeVar, Union, ) import ...
true
true
f72048b0b98e8bc328e6ee0236c9c737d55cd314
19,936
py
Python
syndicate/core/build/deployment_processor.py
Dmytro-Skorniakov/aws-syndicate
81363334886c53969f1f0a0c0ac0168318204990
[ "Apache-2.0" ]
null
null
null
syndicate/core/build/deployment_processor.py
Dmytro-Skorniakov/aws-syndicate
81363334886c53969f1f0a0c0ac0168318204990
[ "Apache-2.0" ]
null
null
null
syndicate/core/build/deployment_processor.py
Dmytro-Skorniakov/aws-syndicate
81363334886c53969f1f0a0c0ac0168318204990
[ "Apache-2.0" ]
null
null
null
""" Copyright 2018 EPAM Systems, Inc. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed...
40.032129
79
0.610353
import concurrent import json from concurrent.futures import ALL_COMPLETED, ThreadPoolExecutor from datetime import date, datetime from functools import cmp_to_key from syndicate.commons.log_helper import get_logger from syndicate.core.build.bundle_processor import (create_deploy_output, ...
true
true
f7204924e00d695725bfe8a63d29154fabac6481
1,226
py
Python
app.py
abdu1aziz/10-Fast-Fingers
fa620cdf1f675b681048335f47686942373a6b57
[ "MIT" ]
null
null
null
app.py
abdu1aziz/10-Fast-Fingers
fa620cdf1f675b681048335f47686942373a6b57
[ "MIT" ]
null
null
null
app.py
abdu1aziz/10-Fast-Fingers
fa620cdf1f675b681048335f47686942373a6b57
[ "MIT" ]
null
null
null
from selenium import webdriver from selenium.webdriver.common.keys import Keys import time # pip install selenium==2.53.6 """ if you wanna run it on your regular browser profile. profile = webdriver.FirefoxProfile('/home/{your_username}/.mozilla/firefox/{your_default_profile}') driver = webdriver.Fire...
24.52
100
0.613377
from selenium import webdriver from selenium.webdriver.common.keys import Keys import time driver = webdriver.Chrome(executable_path=r'chromedriver.exe') def wait(no): time.sleep(no) def open_website(): driver.get('https://10fastfingers.com/typing-test/english') wait(5) def ru...
true
true
f7204d1a3af3765a90077f7c2d942f1a43b61546
29,621
py
Python
src/qt/qtwebkit/Source/WebCore/inspector/CodeGeneratorInspectorStrings.py
viewdy/phantomjs
eddb0db1d253fd0c546060a4555554c8ee08c13c
[ "BSD-3-Clause" ]
1
2015-05-27T13:52:20.000Z
2015-05-27T13:52:20.000Z
src/qt/qtwebkit/Source/WebCore/inspector/CodeGeneratorInspectorStrings.py
mrampersad/phantomjs
dca6f77a36699eb4e1c46f7600cca618f01b0ac3
[ "BSD-3-Clause" ]
null
null
null
src/qt/qtwebkit/Source/WebCore/inspector/CodeGeneratorInspectorStrings.py
mrampersad/phantomjs
dca6f77a36699eb4e1c46f7600cca618f01b0ac3
[ "BSD-3-Clause" ]
1
2017-03-19T13:03:23.000Z
2017-03-19T13:03:23.000Z
# Copyright (c) 2013 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
31.016754
230
0.716181
frontend_domain_class = ( """ class $domainClassName { public: $domainClassName(InspectorFrontendChannel* inspectorFrontendChannel) : m_inspectorFrontendChannel(inspectorFrontendChannel) { } ${frontendDomainMethodDeclarations} void setInspectorFrontendChannel(Inspect...
true
true
f7204dbb790d27090a68c4f58eeffa3c3052f15c
3,609
py
Python
synthesis_wrapper.py
mdsol/Simulants
3c71702c301b2d4668adff1180d162a66172aeaa
[ "MIT" ]
null
null
null
synthesis_wrapper.py
mdsol/Simulants
3c71702c301b2d4668adff1180d162a66172aeaa
[ "MIT" ]
null
null
null
synthesis_wrapper.py
mdsol/Simulants
3c71702c301b2d4668adff1180d162a66172aeaa
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 # Author: Mandis Beigi # Copyright (c) 2022 Medidata Solutions, Inc. # # 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 wi...
44.555556
118
0.748961
import logging import k_anonymity import synthesis_lib import preprocessor_lib import utilities_lib def synthesize(df, config): logging.info('Performing k-anonymity to the data......................') logging.info('The data size before k-anonymity: {}'.format(df.shape)) ignore_c...
true
true
f7204f5abde1644d55dfd088cc146878f778bf9c
5,467
py
Python
btservice.py
shripal17/AUVController
077b47ffc3726aad4c715bee2711935675530cc7
[ "Apache-2.0" ]
null
null
null
btservice.py
shripal17/AUVController
077b47ffc3726aad4c715bee2711935675530cc7
[ "Apache-2.0" ]
null
null
null
btservice.py
shripal17/AUVController
077b47ffc3726aad4c715bee2711935675530cc7
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import logging import logging.handlers import argparse import sys import os import time from bluetooth import * class LoggerHelper(object): def __init__(self, logger, level): self.logger = logger self.level = level def write(self, message): if message.rstrip() != "":...
30.887006
97
0.522773
import logging import logging.handlers import argparse import sys import os import time from bluetooth import * class LoggerHelper(object): def __init__(self, logger, level): self.logger = logger self.level = level def write(self, message): if message.rstrip() != "": self...
true
true
f7204f6d6a1bb0b49c21d7f8d2f69d975e0e8468
584
py
Python
src/sensing/gpsTest/test.py
NikLeberg/quadro2
ec2f37858a32b4bb88f7887fc52b683e067c0e1e
[ "MIT" ]
1
2021-02-13T20:12:57.000Z
2021-02-13T20:12:57.000Z
src/sensing/gpsTest/test.py
NikLeberg/quadro2
ec2f37858a32b4bb88f7887fc52b683e067c0e1e
[ "MIT" ]
null
null
null
src/sensing/gpsTest/test.py
NikLeberg/quadro2
ec2f37858a32b4bb88f7887fc52b683e067c0e1e
[ "MIT" ]
1
2021-03-05T19:04:03.000Z
2021-03-05T19:04:03.000Z
#!/usr/bin/python # -*- coding: utf-8 -* import sys import csv def main(): s = '' l = [] with open(str(sys.argv[1])) as csvfile: readCSV = csv.reader(csvfile, delimiter=',') for row in readCSV: c = row[1] if 'CR' in c: s = ''.join(l...
20.137931
53
0.356164
import sys import csv def main(): s = '' l = [] with open(str(sys.argv[1])) as csvfile: readCSV = csv.reader(csvfile, delimiter=',') for row in readCSV: c = row[1] if 'CR' in c: s = ''.join(l) l = [] el...
true
true
f7204f97b7c820606a1883b076c1563755aa5e97
971
py
Python
tests/test_items.py
JoshMcKinstry/Dork_Game_team_octosquad
56cf823ae2a7357d9c50f238da7c72d61fa2cb53
[ "MIT" ]
null
null
null
tests/test_items.py
JoshMcKinstry/Dork_Game_team_octosquad
56cf823ae2a7357d9c50f238da7c72d61fa2cb53
[ "MIT" ]
12
2019-06-26T16:36:13.000Z
2019-07-29T17:42:05.000Z
tests/test_items.py
JoshMcKinstry/team34
56cf823ae2a7357d9c50f238da7c72d61fa2cb53
[ "MIT" ]
3
2019-07-03T08:08:35.000Z
2019-07-14T16:00:46.000Z
""" A test for items """ from dork.items import Item def test_init_method(): """ Testing the constructor """ name = 'Donut' description = {'This is an old fasion donut'} properties = {'eatable'} item = Item(name, description, properties) assert item.name == name assert item.descrip...
24.275
55
0.654995
from dork.items import Item def test_init_method(): name = 'Donut' description = {'This is an old fasion donut'} properties = {'eatable'} item = Item(name, description, properties) assert item.name == name assert item.description == description assert item.properties == properties def te...
true
true
f72050f9533ad622e35f21606eba12c9e386ae67
3,953
py
Python
NAIP/filter_poly.py
pberezina/earthengine-py-notebooks
4cbe3c52bcc9ed3f1337bf097aa5799442991a5e
[ "MIT" ]
1
2020-03-20T19:39:34.000Z
2020-03-20T19:39:34.000Z
NAIP/filter_poly.py
pberezina/earthengine-py-notebooks
4cbe3c52bcc9ed3f1337bf097aa5799442991a5e
[ "MIT" ]
null
null
null
NAIP/filter_poly.py
pberezina/earthengine-py-notebooks
4cbe3c52bcc9ed3f1337bf097aa5799442991a5e
[ "MIT" ]
null
null
null
''' <table class="ee-notebook-buttons" align="left"> <td><a target="_blank" href="https://github.com/giswqs/earthengine-py-notebooks/tree/master/NAIP/filter_poly.ipynb"><img width=32px src="https://www.tensorflow.org/images/GitHub-Mark-32px.png" /> View source on GitHub</a></td> <td><a target="_blank" href="h...
34.077586
422
0.707058
import subprocess try: import geehydro except ImportError: print('geehydro package not installed. Installing ...') subprocess.check_call(["python", '-m', 'pip', 'install', 'geehydro']) import ee import folium import geehydro try: ee.Initialize() except Exception as e: ee.Authenticate...
true
true
f72051a61c28b0f296ebe1cb03fdacdcdbc270e1
1,664
py
Python
geocamUtil/models/UuidField.py
geocam/geocamUtilWeb
b64fc063c64b4b0baa140db4c126f2ff980756ab
[ "NASA-1.3" ]
4
2017-03-03T16:24:24.000Z
2018-06-24T05:50:40.000Z
geocamUtil/models/UuidField.py
geocam/geocamUtilWeb
b64fc063c64b4b0baa140db4c126f2ff980756ab
[ "NASA-1.3" ]
1
2021-09-29T17:17:30.000Z
2021-09-29T17:17:30.000Z
geocamUtil/models/UuidField.py
geocam/geocamUtilWeb
b64fc063c64b4b0baa140db4c126f2ff980756ab
[ "NASA-1.3" ]
1
2017-12-19T20:45:53.000Z
2017-12-19T20:45:53.000Z
# __BEGIN_LICENSE__ #Copyright (c) 2015, United States Government, as represented by the #Administrator of the National Aeronautics and Space Administration. #All rights reserved. # __END_LICENSE__ try: import uuid except ImportError: uuid = None from django.db import models if uuid: def makeUuid(): ...
28.689655
91
0.646034
try: import uuid except ImportError: uuid = None from django.db import models if uuid: def makeUuid(): return str(uuid.uuid4()) else: import random def makeUuid(): return '%04x-%02x-%02x-%02x-%06x' % (random.getrandbits(32), random.getrandbits(8), ...
true
true
f72051a8faae27e72e9e3e355265d217e689a1b4
82
py
Python
ABC099/B.py
shimomura314/AtcoderCodes
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
[ "MIT" ]
null
null
null
ABC099/B.py
shimomura314/AtcoderCodes
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
[ "MIT" ]
null
null
null
ABC099/B.py
shimomura314/AtcoderCodes
db1d62a7715f5f1b3c40eceff8d34f0f34839f41
[ "MIT" ]
null
null
null
x,y = map(int,input().split()) a = 0 for i in range(y-x-1): a += i+1 print(a-x)
16.4
30
0.536585
x,y = map(int,input().split()) a = 0 for i in range(y-x-1): a += i+1 print(a-x)
true
true
f720522b36dfb68926f25b5e15f47500f2daffa4
342
py
Python
src/france/draft_2.py
ClementRolinat/covidtracker-data
7536b8899bc9bc0a6547288e86838233870dadaf
[ "MIT" ]
314
2020-03-16T20:31:50.000Z
2022-03-11T17:54:07.000Z
src/france/draft_2.py
ClementRolinat/covidtracker-data
7536b8899bc9bc0a6547288e86838233870dadaf
[ "MIT" ]
39
2020-03-30T16:27:03.000Z
2022-02-28T14:33:55.000Z
src/france/draft_2.py
ClementRolinat/covidtracker-data
7536b8899bc9bc0a6547288e86838233870dadaf
[ "MIT" ]
61
2020-04-30T18:27:33.000Z
2022-03-25T09:53:45.000Z
#!/usr/bin/env python # coding: utf-8 # In[29]: import math T = 10 RH = 50 AH_num = 6.112 * math.exp(17.67 * T / (T+243.5)) * RH * 2.1674 AH_den = 273.15 + T AH = AH_num / AH_den contenu_exp = (T-7.5)**2/196 + (RH-75)**2/625 + (AH-6)**2/2.89 IPTCC = 100 * math.exp(-0.5 * contenu_exp) IPTCC # In[9]: math.exp...
12.666667
63
0.570175
import math T = 10 RH = 50 AH_num = 6.112 * math.exp(17.67 * T / (T+243.5)) * RH * 2.1674 AH_den = 273.15 + T AH = AH_num / AH_den contenu_exp = (T-7.5)**2/196 + (RH-75)**2/625 + (AH-6)**2/2.89 IPTCC = 100 * math.exp(-0.5 * contenu_exp) IPTCC math.exp(-0.5 * contenu_exp)
true
true
f7205256fa9a8ca8c439c25f4c8effda40af5e58
1,930
py
Python
montage_pt.py
Yuxuan-PO/eddyshelf
3aad0ca24d0812fdab666a7a753f28096164db26
[ "MIT" ]
1
2021-04-19T01:04:39.000Z
2021-04-19T01:04:39.000Z
montage_pt.py
Yuxuan-PO/eddyshelf
3aad0ca24d0812fdab666a7a753f28096164db26
[ "MIT" ]
null
null
null
montage_pt.py
Yuxuan-PO/eddyshelf
3aad0ca24d0812fdab666a7a753f28096164db26
[ "MIT" ]
2
2017-10-05T03:52:55.000Z
2021-04-19T01:04:36.000Z
#!/usr/bin/python3 def make_montage(basedir, depths): """ makes a montage of passive tracer animation from runs.animate_pt run with different depths Arguments: basedir - basedir to which depths are appended i.e., runew-03-pt-z- depths - depths at which stuff has been outputted Retur...
26.805556
75
0.594819
def make_montage(basedir, depths): import subprocess import glob import os flist = glob.glob(basedir + str(depths[0]) + '/*.png') N = len(flist) print(depths) outdir = 'temp_pt' outfmt_av = './' + outdir + '/output_%06d.png' outfmt_mo = './' + outdir + '/output_{0:06d}.pn...
true
true
f7205265c35def010f24eb062003ac4efb295334
2,347
py
Python
orchestrator-bundle/orc8r-eventd-operator/tests/unit/test_charm.py
canonical/charmed-magma
43ac2782930518ee419ad3e9ab451df5ae3324f6
[ "Apache-2.0" ]
2
2021-12-10T16:32:23.000Z
2021-12-15T21:14:46.000Z
orchestrator-bundle/orc8r-eventd-operator/tests/unit/test_charm.py
canonical/charmed-magma
43ac2782930518ee419ad3e9ab451df5ae3324f6
[ "Apache-2.0" ]
2
2022-02-25T14:21:15.000Z
2022-03-08T23:56:45.000Z
orchestrator-bundle/orc8r-eventd-operator/tests/unit/test_charm.py
canonical/charmed-magma
43ac2782930518ee419ad3e9ab451df5ae3324f6
[ "Apache-2.0" ]
3
2021-12-10T16:23:33.000Z
2021-12-16T10:08:23.000Z
#!/usr/bin/env python3 # Copyright 2021 Canonical Ltd. # See LICENSE file for licensing details. import unittest from unittest.mock import call, patch from ops import testing from ops.model import BlockedStatus from charm import MagmaOrc8rEventdCharm testing.SIMULATE_CAN_CONNECT = True class Test(unittest.TestCas...
33.528571
96
0.691095
import unittest from unittest.mock import call, patch from ops import testing from ops.model import BlockedStatus from charm import MagmaOrc8rEventdCharm testing.SIMULATE_CAN_CONNECT = True class Test(unittest.TestCase): @patch( "charm.KubernetesServicePatch", lambda charm, ports, addition...
true
true
f7205449d69b43bd90ff1d11cf5ac09d1ed82d7f
393,252
py
Python
test/test_linalg.py
Mu-L/pytorch
b0bdf588ea575928a94264c30999385d5ff2bc32
[ "Intel" ]
1
2022-01-01T14:41:11.000Z
2022-01-01T14:41:11.000Z
test/test_linalg.py
Mu-L/pytorch
b0bdf588ea575928a94264c30999385d5ff2bc32
[ "Intel" ]
null
null
null
test/test_linalg.py
Mu-L/pytorch
b0bdf588ea575928a94264c30999385d5ff2bc32
[ "Intel" ]
null
null
null
# -*- coding: utf-8 -*- # Owner(s): ["module: linear algebra"] import torch import numpy as np import unittest import itertools import warnings import math from math import inf, nan, isnan import random from random import randrange from itertools import product from functools import reduce from torch.testing._intern...
47.980966
131
0.581955
import torch import numpy as np import unittest import itertools import warnings import math from math import inf, nan, isnan import random from random import randrange from itertools import product from functools import reduce from torch.testing._internal.common_utils import \ (TestCase, run_tests, TEST_SCIPY...
true
true
f7205474fe31fcf9ee4d542a8f985061f402912b
6,074
py
Python
c7n/actions/autotag.py
chris-angeli-rft/cloud-custodian
5ff331b114a591dbaf6d672e30ceefb7ae64a5dd
[ "Apache-2.0" ]
8
2021-05-18T02:22:03.000Z
2021-09-11T02:49:04.000Z
c7n/actions/autotag.py
chris-angeli-rft/cloud-custodian
5ff331b114a591dbaf6d672e30ceefb7ae64a5dd
[ "Apache-2.0" ]
1
2021-04-26T04:38:35.000Z
2021-04-26T04:38:35.000Z
c7n/actions/autotag.py
chris-angeli-rft/cloud-custodian
5ff331b114a591dbaf6d672e30ceefb7ae64a5dd
[ "Apache-2.0" ]
1
2021-11-10T02:28:47.000Z
2021-11-10T02:28:47.000Z
# Copyright 2017-2018 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
38.687898
109
0.602898
from .core import EventAction from c7n.exceptions import PolicyValidationError from c7n.manager import resources from c7n import utils class AutoTagUser(EventAction): schema_alias = True schema = utils.type_schema( 'auto-tag-user', required=['tag'], **{'user-type': { ...
true
true
f720548ea283334132cb0ded4dadf688758eebc3
2,786
py
Python
tests/integration/long/test_policies.py
clohfink/python-driver
30a0e27cd1b8999267c146f0a93adf962a50790b
[ "Apache-2.0" ]
1
2020-07-11T11:20:34.000Z
2020-07-11T11:20:34.000Z
tests/integration/long/test_policies.py
clohfink/python-driver
30a0e27cd1b8999267c146f0a93adf962a50790b
[ "Apache-2.0" ]
null
null
null
tests/integration/long/test_policies.py
clohfink/python-driver
30a0e27cd1b8999267c146f0a93adf962a50790b
[ "Apache-2.0" ]
1
2021-07-22T07:20:49.000Z
2021-07-22T07:20:49.000Z
# Copyright DataStax, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, softwa...
39.239437
135
0.71285
try: import unittest2 as unittest except ImportError: import unittest from cassandra import ConsistencyLevel, Unavailable from cassandra.cluster import Cluster, ExecutionProfile, EXEC_PROFILE_DEFAULT from tests.integration import use_cluster, get_cluster, get_node def setup_module(): use...
true
true
f72055de22b933a14a11f041fdc68987d8fc5154
337
py
Python
plotarchive/src/unarchive.py
buswinka/plotarchive
5393b0140e11551a7c3bbb5c1094d1b5e0fce6bd
[ "MIT" ]
null
null
null
plotarchive/src/unarchive.py
buswinka/plotarchive
5393b0140e11551a7c3bbb5c1094d1b5e0fce6bd
[ "MIT" ]
null
null
null
plotarchive/src/unarchive.py
buswinka/plotarchive
5393b0140e11551a7c3bbb5c1094d1b5e0fce6bd
[ "MIT" ]
null
null
null
import dill from . import files def expand(filename, folder=None): data = dill.load(open(filename, 'rb')) file_dict = data['files'] plotter = data['func'] if 'args' in data: args = data['args'] plotter(**data['args']) if folder is not None: files.write_files_from_dict(fi...
19.823529
54
0.617211
import dill from . import files def expand(filename, folder=None): data = dill.load(open(filename, 'rb')) file_dict = data['files'] plotter = data['func'] if 'args' in data: args = data['args'] plotter(**data['args']) if folder is not None: files.write_files_from_dict(fi...
true
true
f72056e829f271ea00336ce08152308cdf5bbcfa
1,409
py
Python
setup.py
yuhonghong66/onnx-mxnet
17e8fa4f515e0bb5c2fd01ef733c13bd51f6ff95
[ "Apache-2.0" ]
118
2017-11-03T05:21:55.000Z
2020-03-24T14:57:21.000Z
setup.py
yuhonghong66/onnx-mxnet
17e8fa4f515e0bb5c2fd01ef733c13bd51f6ff95
[ "Apache-2.0" ]
43
2017-11-20T14:24:30.000Z
2019-01-10T06:47:18.000Z
setup.py
yuhonghong66/onnx-mxnet
17e8fa4f515e0bb5c2fd01ef733c13bd51f6ff95
[ "Apache-2.0" ]
32
2017-11-16T22:33:33.000Z
2021-03-15T17:09:09.000Z
# Copyright 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. # A copy of the License is located at # http://www.apache.org/licenses/LICENSE-2.0 # or in the "license" file...
36.128205
98
0.725337
from setuptools import setup, find_packages pkgs = find_packages() setup( name='onnx-mxnet', version='0.4.2', description='ONNX-MXNet Model converter', url='https://github.com/onnx/onnx-mxnet', keywords='ONNX MXNet model converter deep learning', packages=pkgs, install...
true
true
f7205702ffae189a8112330f7eb605fc4ca4cadc
3,047
py
Python
examples/minigrid/eval_maze.py
AIDefender/Tianshou-ReMPER
297ba383fc1e4e19cd52bd89df7d0d3148bd4e68
[ "MIT" ]
null
null
null
examples/minigrid/eval_maze.py
AIDefender/Tianshou-ReMPER
297ba383fc1e4e19cd52bd89df7d0d3148bd4e68
[ "MIT" ]
null
null
null
examples/minigrid/eval_maze.py
AIDefender/Tianshou-ReMPER
297ba383fc1e4e19cd52bd89df7d0d3148bd4e68
[ "MIT" ]
null
null
null
import seaborn as sns import matplotlib.pyplot as plt import pickle import argparse import numpy as np import os sns.set_context('paper', font_scale=1.5) parser = argparse.ArgumentParser() parser.add_argument("-n", type=int) parser.add_argument('--resume-path', type=str, default=None) parser.add_argument('--title', typ...
35.847059
132
0.640958
import seaborn as sns import matplotlib.pyplot as plt import pickle import argparse import numpy as np import os sns.set_context('paper', font_scale=1.5) parser = argparse.ArgumentParser() parser.add_argument("-n", type=int) parser.add_argument('--resume-path', type=str, default=None) parser.add_argument('--title', typ...
true
true
f7205781c0c4df8d2891d89d9d280b3ad59b22ec
699
py
Python
aiovault/v1/auth/backends/__init__.py
johnnoone/aiovault
03e1bfb6f0404dcf97ce87a98c539027c4e78a37
[ "BSD-3-Clause" ]
1
2022-01-31T22:37:57.000Z
2022-01-31T22:37:57.000Z
aiovault/v1/auth/backends/__init__.py
johnnoone/aiovault
03e1bfb6f0404dcf97ce87a98c539027c4e78a37
[ "BSD-3-Clause" ]
null
null
null
aiovault/v1/auth/backends/__init__.py
johnnoone/aiovault
03e1bfb6f0404dcf97ce87a98c539027c4e78a37
[ "BSD-3-Clause" ]
null
null
null
""" auth.backends ~~~~~~~~~~~~~ """ from .app_id import AppIDBackend from .cert import CertBackend from .github import GitHubBackend from .ldap import LDAPBackend from .userpass import UserPassBackend from stevedore import DriverManager __all__ = ['AppIDBackend', 'CertBackend', 'GitHubBackend', 'L...
21.84375
58
0.662375
from .app_id import AppIDBackend from .cert import CertBackend from .github import GitHubBackend from .ldap import LDAPBackend from .userpass import UserPassBackend from stevedore import DriverManager __all__ = ['AppIDBackend', 'CertBackend', 'GitHubBackend', 'LDAPBackend', 'UserPassBackend'] def load_ba...
true
true
f7205a8e46810cda3abbd608dafa0f62fae9673c
8,873
py
Python
doc/conf.py
duwhop/relate
568bf6868fbc980e78e74fa29f84d10be2f8c94d
[ "Unlicense" ]
null
null
null
doc/conf.py
duwhop/relate
568bf6868fbc980e78e74fa29f84d10be2f8c94d
[ "Unlicense" ]
null
null
null
doc/conf.py
duwhop/relate
568bf6868fbc980e78e74fa29f84d10be2f8c94d
[ "Unlicense" ]
null
null
null
# -*- coding: utf-8 -*- # # relate documentation build configuration file, created by # sphinx-quickstart on Thu Jun 26 18:41:17 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # Al...
31.242958
79
0.712949
import sys import os sys.path.insert(0, os.path.abspath('..')) os.environ["DJANGO_SETTINGS_MODULE"] = "relate.settings" import django django.setup() extensions = [ 'sphinx.ext.autodoc', ] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u...
true
true
f7205e2735b7f7103c0de347dfa88005e04f48db
7,513
py
Python
src/pretix/base/models/base.py
tcatm/pretix
a76f74b161e140f4445568b97cb26fc57247e0d2
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/base/models/base.py
tcatm/pretix
a76f74b161e140f4445568b97cb26fc57247e0d2
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
src/pretix/base/models/base.py
tcatm/pretix
a76f74b161e140f4445568b97cb26fc57247e0d2
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
import json import uuid from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models.constants import LOOKUP_SEP from django.db.models.signals import post_delete from django.dispatch import receiver from django.urls import reverse from django.utils.crypto import get_ran...
35.77619
131
0.626381
import json import uuid from django.contrib.contenttypes.models import ContentType from django.db import models from django.db.models.constants import LOOKUP_SEP from django.db.models.signals import post_delete from django.dispatch import receiver from django.urls import reverse from django.utils.crypto import get_ran...
true
true
f7205e512691d1a027eaa2ec064dc6f8fc60327d
690
py
Python
anova.py
Roninkoi/Scicodes
97eb4dc017ad4cd494b545aecaa9fdd7c501a9b7
[ "MIT" ]
null
null
null
anova.py
Roninkoi/Scicodes
97eb4dc017ad4cd494b545aecaa9fdd7c501a9b7
[ "MIT" ]
null
null
null
anova.py
Roninkoi/Scicodes
97eb4dc017ad4cd494b545aecaa9fdd7c501a9b7
[ "MIT" ]
null
null
null
import numpy as np from scipy.stats import f # Does analysis of variance for a number of sets x. # Each set in x is an array containing mean, variance # and number [mean, var, n]. def anova(x): mean = np.mean(x[:, 0]) # overall mean n = np.sum(x[:, 2]) # total N r = len(x) # number of sets ssb = 0. ...
27.6
57
0.550725
import numpy as np from scipy.stats import f def anova(x): mean = np.mean(x[:, 0]) n = np.sum(x[:, 2]) r = len(x) ssb = 0. for i in range(r): ssb += x[i, 2] * (x[i, 0] - mean)**2 ssw = 0. for i in range(r): ssw += (x[i, 2] - 1) * x[i, 1] fs = (ssb / (r - 1)) /...
true
true
f7205fc62dfb7c7257990f72c13066d2d9797429
6,440
py
Python
ir/text.py
goerz/incremental-reading
443cc85d1dac6a8200f63b24bd443fb052d222dc
[ "ISC" ]
1
2019-07-22T03:06:14.000Z
2019-07-22T03:06:14.000Z
ir/text.py
goerz/incremental-reading
443cc85d1dac6a8200f63b24bd443fb052d222dc
[ "ISC" ]
null
null
null
ir/text.py
goerz/incremental-reading
443cc85d1dac6a8200f63b24bd443fb052d222dc
[ "ISC" ]
null
null
null
# Copyright 2013 Tiago Barroso # Copyright 2013 Frank Kmiec # Copyright 2013-2016 Aleksej # Copyright 2017 Christian Weiß # Copyright 2018 Timothée Chauvin # Copyright 2017-2018 Joseph Lorimer <luoliyan@posteo.net> # # Permission to use, copy, modify, and distribute this software for any purpose # with or without fee i...
34.074074
79
0.590373
from collections import defaultdict from anki.notes import Note from aqt import mw from aqt.addcards import AddCards from aqt.editcurrent import EditCurrent from aqt.utils import getText, showInfo, showWarning, tooltip from .util import fixImages, getField, setField SCHEDULE_EXTRACT = 0 class Te...
true
true
f720608eb7164c7da567f088dbf879d1825a9a14
18
py
Python
drivers/__init__.py
lucasmazz/ackermann-line-follower-robot
fe2914abdfe8bfb0867955b2e8a5fe787d30e0a9
[ "BSD-2-Clause" ]
1
2022-02-03T22:10:00.000Z
2022-02-03T22:10:00.000Z
drivers/__init__.py
lucasmazz/ackermann-line-follower-robot
fe2914abdfe8bfb0867955b2e8a5fe787d30e0a9
[ "BSD-2-Clause" ]
null
null
null
drivers/__init__.py
lucasmazz/ackermann-line-follower-robot
fe2914abdfe8bfb0867955b2e8a5fe787d30e0a9
[ "BSD-2-Clause" ]
1
2022-02-17T13:10:56.000Z
2022-02-17T13:10:56.000Z
from .car import *
18
18
0.722222
from .car import *
true
true
f720616eb7e8ff6c025fb8cda31659df286aedc8
1,043
py
Python
vasp/vaspForcesRunningAverage.py
roryvandervalk/computationalChemistryTools
9e718433f82e010d127f576bd2bf48af3953e8b1
[ "MIT" ]
null
null
null
vasp/vaspForcesRunningAverage.py
roryvandervalk/computationalChemistryTools
9e718433f82e010d127f576bd2bf48af3953e8b1
[ "MIT" ]
null
null
null
vasp/vaspForcesRunningAverage.py
roryvandervalk/computationalChemistryTools
9e718433f82e010d127f576bd2bf48af3953e8b1
[ "MIT" ]
null
null
null
#! /bin/python3 if __name__ == "__main__": # Collect data f = open('OUTCAR', 'r') forces = [] for l in f: if "FORCES:" in l: forces.append([float(x) for x in l.split()[-2:]]) f.close() # Early exit check to avoid errors from empty arrays if(len(forces) == 0): print("No 'FORCES:' entries fou...
28.972222
59
0.567593
if __name__ == "__main__": f = open('OUTCAR', 'r') forces = [] for l in f: if "FORCES:" in l: forces.append([float(x) for x in l.split()[-2:]]) f.close() if(len(forces) == 0): print("No 'FORCES:' entries found") else: print(forces[-1]) window = 5 ave = [] ...
true
true
f72062661e10fbf546f7901cb621778d0a733be7
178
py
Python
bg_helper/tools/__init__.py
kenjyco/bg-helper
a0760009864f0e677d29cd522e6c95350c75c2c7
[ "MIT" ]
null
null
null
bg_helper/tools/__init__.py
kenjyco/bg-helper
a0760009864f0e677d29cd522e6c95350c75c2c7
[ "MIT" ]
null
null
null
bg_helper/tools/__init__.py
kenjyco/bg-helper
a0760009864f0e677d29cd522e6c95350c75c2c7
[ "MIT" ]
null
null
null
from bg_helper.tools._docker import * from bg_helper.tools._git import * from bg_helper.tools._grep import * from bg_helper.tools._ps import * from bg_helper.tools._ssh import *
29.666667
37
0.803371
from bg_helper.tools._docker import * from bg_helper.tools._git import * from bg_helper.tools._grep import * from bg_helper.tools._ps import * from bg_helper.tools._ssh import *
true
true
f72062c7ad5e58574682ee8059b838a63b9a0352
5,296
py
Python
flask/app.py
vincentlaucsb/us_commutes_ii
e3f32d7baddbf7fec483b95bd2835d58befc3cad
[ "MIT" ]
1
2020-10-17T18:40:20.000Z
2020-10-17T18:40:20.000Z
flask/app.py
vincentlaucsb/us-commutes-2
e3f32d7baddbf7fec483b95bd2835d58befc3cad
[ "MIT" ]
null
null
null
flask/app.py
vincentlaucsb/us-commutes-2
e3f32d7baddbf7fec483b95bd2835d58befc3cad
[ "MIT" ]
null
null
null
from flask import Flask, jsonify from flask_cors import CORS, cross_origin from os import getenv import psycopg2 import pickle from secret import PG_PASSWORD class Queries(object): @staticmethod def query(sql: str): try: with open('cache-{}'.format(hash(sql)), mode='rb') as infile: ...
35.783784
132
0.565899
from flask import Flask, jsonify from flask_cors import CORS, cross_origin from os import getenv import psycopg2 import pickle from secret import PG_PASSWORD class Queries(object): @staticmethod def query(sql: str): try: with open('cache-{}'.format(hash(sql)), mode='rb') as infile: ...
true
true
f72062e75ab889b21768dc24ee456870d015edac
3,932
py
Python
flash/image/data.py
dudeperf3ct/lightning-flash
a855cd14cf1cd0301b4a2f82c0c95e4d8d986650
[ "Apache-2.0" ]
1
2022-03-09T22:40:05.000Z
2022-03-09T22:40:05.000Z
flash/image/data.py
dudeperf3ct/lightning-flash
a855cd14cf1cd0301b4a2f82c0c95e4d8d986650
[ "Apache-2.0" ]
null
null
null
flash/image/data.py
dudeperf3ct/lightning-flash
a855cd14cf1cd0301b4a2f82c0c95e4d8d986650
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
36.073394
101
0.689471
import base64 from io import BytesIO from pathlib import Path from typing import Any, Dict, List import numpy as np import torch import flash from flash.core.data.io.input import DataKeys, Input, ServeInput from flash.core.data.utilities.paths import filter_valid_files, has_file_allowed_extension, PATH_T...
true
true
f72062f74e3d658e22fe2cb10addd4d8ad13e2b0
399
py
Python
thefuck/rules/brew_uninstall.py
pybenchmark/thefuck
993a661c6048063e84645015cc832602b6ec32df
[ "MIT" ]
1
2021-12-13T18:41:46.000Z
2021-12-13T18:41:46.000Z
thefuck/rules/brew_uninstall.py
pybenchmark/thefuck
993a661c6048063e84645015cc832602b6ec32df
[ "MIT" ]
4
2020-12-23T15:44:08.000Z
2020-12-23T16:48:59.000Z
thefuck/rules/brew_uninstall.py
pybenchmark/thefuck
993a661c6048063e84645015cc832602b6ec32df
[ "MIT" ]
1
2020-12-23T14:46:54.000Z
2020-12-23T14:46:54.000Z
from thefuck.utils import for_app @for_app('brew', at_least=2) def match(command): return (command.script_parts[1] in ['uninstall', 'rm', 'remove'] and "brew uninstall --force" in command.stdout) def get_new_command(command): command_parts = command.script_parts[:] command_parts[1] = 'uninst...
26.6
68
0.684211
from thefuck.utils import for_app @for_app('brew', at_least=2) def match(command): return (command.script_parts[1] in ['uninstall', 'rm', 'remove'] and "brew uninstall --force" in command.stdout) def get_new_command(command): command_parts = command.script_parts[:] command_parts[1] = 'uninst...
true
true
f720630f134225e35a47baee79036aa6afb6bbf5
2,354
py
Python
aliyun-python-sdk-sddp/aliyunsdksddp/request/v20190103/DescribeDataAssetsRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-sddp/aliyunsdksddp/request/v20190103/DescribeDataAssetsRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-sddp/aliyunsdksddp/request/v20190103/DescribeDataAssetsRequest.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.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 u...
31.810811
74
0.752336
from aliyunsdkcore.request import RpcRequest from aliyunsdksddp.endpoint import endpoint_data class DescribeDataAssetsRequest(RpcRequest): def __init__(self): RpcRequest.__init__(self, 'Sddp', '2019-01-03', 'DescribeDataAssets') self.set_method('POST') if hasattr(self, "endpoint_map"): s...
true
true
f720645e9f330d987e8a854268bf2c20aad7c1fa
13,423
py
Python
JChipSetup.py
mbuckaway/CrossMgr
4c64e429eb3215fda1b685c5e684c56f5d0c02cf
[ "MIT" ]
1
2020-02-05T11:22:03.000Z
2020-02-05T11:22:03.000Z
JChipSetup.py
mbuckaway/CrossMgr
4c64e429eb3215fda1b685c5e684c56f5d0c02cf
[ "MIT" ]
null
null
null
JChipSetup.py
mbuckaway/CrossMgr
4c64e429eb3215fda1b685c5e684c56f5d0c02cf
[ "MIT" ]
null
null
null
import wx import wx.lib.intctrl import wx.lib.rcsizer as rcs import socket import sys import re import six import datetime import Model import Utils import JChip import ChipReader from JChip import EVT_CHIP_READER import RaceResult import Ultra import HelpSearch from ReadSignOnSheet import GetTagNums HOST, PORT = JCh...
33.896465
149
0.662147
import wx import wx.lib.intctrl import wx.lib.rcsizer as rcs import socket import sys import re import six import datetime import Model import Utils import JChip import ChipReader from JChip import EVT_CHIP_READER import RaceResult import Ultra import HelpSearch from ReadSignOnSheet import GetTagNums HOST, PORT = JCh...
true
true
f72064b70b67fb3499b7878938b50a98033a491b
845
py
Python
examples/upload_video.py
nullwriter/ig-actor
a089107657ccdf11ba213160c4cc5d3690cecd76
[ "MIT" ]
null
null
null
examples/upload_video.py
nullwriter/ig-actor
a089107657ccdf11ba213160c4cc5d3690cecd76
[ "MIT" ]
null
null
null
examples/upload_video.py
nullwriter/ig-actor
a089107657ccdf11ba213160c4cc5d3690cecd76
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Use text editor to edit the script and type in valid Instagram username/password import urllib from bot.lib.InstagramAPI import InstagramAPI video_url = 'https://instagram.fmad3-2.fna.fbcdn.net/t50.2886-16/17157217_1660580944235536_866261046376005632_n.mp4' #a valid ...
36.73913
141
0.802367
import urllib from bot.lib.InstagramAPI import InstagramAPI video_url = 'https://instagram.fmad3-2.fna.fbcdn.net/t50.2886-16/17157217_1660580944235536_866261046376005632_n.mp4' video_local_path = video_url.split("/")[-1] thumbnail_url = "https://instagram.fmad3-2.fna.fbcdn.net/t51.2885-15/e15/17075853_175941039...
true
true
f72065bfefeeb5caf657c46e57376538c3455609
4,517
py
Python
lib/3rdparty/common/pyqode/core/modes/autocomplete.py
tommo/gii
03624a57cf74a07e38bfdc7f53c50bd926b7b5a7
[ "MIT" ]
7
2016-02-13T18:47:23.000Z
2020-07-03T13:47:49.000Z
lib/3rdparty/common/pyqode/core/modes/autocomplete.py
tommo/gii
03624a57cf74a07e38bfdc7f53c50bd926b7b5a7
[ "MIT" ]
1
2018-06-13T04:55:27.000Z
2021-11-05T05:52:51.000Z
lib/3rdparty/common/pyqode/core/modes/autocomplete.py
tommo/gii
03624a57cf74a07e38bfdc7f53c50bd926b7b5a7
[ "MIT" ]
4
2016-02-15T13:32:46.000Z
2019-12-12T17:22:31.000Z
# -*- coding: utf-8 -*- """ Contains the AutoCompleteMode """ import logging from pyqode.qt import QtCore, QtGui from pyqode.core.api import TextHelper from pyqode.core.api.mode import Mode class AutoCompleteMode(Mode): """ Automatically complete quotes and parentheses Generic auto complete mode that automat...
41.440367
79
0.570511
import logging from pyqode.qt import QtCore, QtGui from pyqode.core.api import TextHelper from pyqode.core.api.mode import Mode class AutoCompleteMode(Mode): MAPPING = {'"': '"', "'": "'", "(": ")", "{": "}", "[": "]"} SELECTED_QUOTES_FORMATS = {key: '%s%s%s' for key in MAPPING.keys()} QUO...
true
true
f720669f2683fff61a73382464913841475adbc5
18,762
py
Python
mslib/mswms/dataaccess.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
mslib/mswms/dataaccess.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
mslib/mswms/dataaccess.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ mslib.mswms.dataaccess ~~~~~~~~~~~~~~~~~~~~~~ This module provides functions to access data This file is part of mss. :copyright: Copyright 2008-2014 Deutsches Zentrum fuer Luft- und Raumfahrt e.V. :copyright: Copyright 2011-2014 Marc Rautenhaus (mr) :copyrigh...
43.531323
114
0.600149
from abc import ABCMeta, abstractmethod import itertools import os import logging import netCDF4 import numpy as np import pint from mslib import netCDF4tools from mslib.utils import UR class NWPDataAccess(metaclass=ABCMeta): def __init__(self, rootpath, uses_init_time=True, uses_valid_time=True): sel...
true
true
f7206716b828e3c1c1ab325cae68cae705a72727
9,010
py
Python
scalability/experiments/run_mainnet.py
Deland-Labs/ic
047172b01e0afc0e61448669d4ec98b2425c6853
[ "Apache-2.0" ]
1
2021-12-01T03:48:42.000Z
2021-12-01T03:48:42.000Z
scalability/experiments/run_mainnet.py
Deland-Labs/ic
047172b01e0afc0e61448669d4ec98b2425c6853
[ "Apache-2.0" ]
null
null
null
scalability/experiments/run_mainnet.py
Deland-Labs/ic
047172b01e0afc0e61448669d4ec98b2425c6853
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import subprocess import sys import time from typing import List import gflags FLAGS = gflags.FLAGS gflags.DEFINE_bool("use_updates", False, "Issue update calls instead of query calls") class Mainnet: """Wrapper to run against subnetworks in mainnet concurrently.""" def __init__(self...
38.836207
111
0.568036
import subprocess import sys import time from typing import List import gflags FLAGS = gflags.FLAGS gflags.DEFINE_bool("use_updates", False, "Issue update calls instead of query calls") class Mainnet: def __init__(self): if FLAGS.testnet == "mercury" and FLAGS.target_subnet_id is None: rai...
true
true
f72067b03fcce0e8fbe2579787be36a9398c361c
627
py
Python
transform_file.py
BXuan694/universalAdversarialPerturbation
ebca90f76b5d45715c98a1ff0b6f11df753b51c6
[ "BSD-2-Clause" ]
38
2019-01-19T09:43:13.000Z
2022-01-05T09:47:02.000Z
transform_file.py
BXuan694/universalAdversarialPerturbation
ebca90f76b5d45715c98a1ff0b6f11df753b51c6
[ "BSD-2-Clause" ]
3
2020-02-24T05:56:35.000Z
2022-01-07T12:08:33.000Z
transform_file.py
BXuan694/universalAdversarialPerturbation
ebca90f76b5d45715c98a1ff0b6f11df753b51c6
[ "BSD-2-Clause" ]
10
2019-02-19T10:05:57.000Z
2021-06-07T08:02:36.000Z
from torchvision import transforms transform1 = transforms.Compose([ transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize(mean = [0.485,0.456,0.406], std = [0.229,0.224,0.225]), ]) cut = transforms.Compose([ transforms.Resize(256), transforms.Cent...
24.115385
80
0.657097
from torchvision import transforms transform1 = transforms.Compose([ transforms.Resize(256), transforms.CenterCrop(224), transforms.ToTensor(), transforms.Normalize(mean = [0.485,0.456,0.406], std = [0.229,0.224,0.225]), ]) cut = transforms.Compose([ transforms.Resize(256), transforms.Cent...
true
true
f7206874eea5462451a2197d6ce51ff97b87f248
7,039
py
Python
pypi_tools/main.py
xnuinside/pypi_tools_bot
2ae408e510dcc30c39475af1f9cba8af866c54ee
[ "MIT" ]
2
2021-03-04T07:37:38.000Z
2021-04-01T16:57:10.000Z
pypi_tools/main.py
xnuinside/pypi_tools_bot
2ae408e510dcc30c39475af1f9cba8af866c54ee
[ "MIT" ]
null
null
null
pypi_tools/main.py
xnuinside/pypi_tools_bot
2ae408e510dcc30c39475af1f9cba8af866c54ee
[ "MIT" ]
null
null
null
import os import logging import sentry_sdk from aiogram import Bot, Dispatcher, executor, types from datetime import datetime, timedelta from pypi_tools.logic import remove_track_for_package import pypi_tools.data as d from pypi_tools.helpers import validate_input import pypi_tools.vizualizer as v import pypi_...
40.687861
107
0.624378
import os import logging import sentry_sdk from aiogram import Bot, Dispatcher, executor, types from datetime import datetime, timedelta from pypi_tools.logic import remove_track_for_package import pypi_tools.data as d from pypi_tools.helpers import validate_input import pypi_tools.vizualizer as v import pypi_...
true
true
f720698516b3281db66e46d699cb433d69aa86c5
473
py
Python
4_factory/simple_factory/veggie_pizza.py
hypersport/Head-First-Design-Patterns-Python
0c8b831ae89ebbbef8b203b96508deb7e3063590
[ "MIT" ]
null
null
null
4_factory/simple_factory/veggie_pizza.py
hypersport/Head-First-Design-Patterns-Python
0c8b831ae89ebbbef8b203b96508deb7e3063590
[ "MIT" ]
null
null
null
4_factory/simple_factory/veggie_pizza.py
hypersport/Head-First-Design-Patterns-Python
0c8b831ae89ebbbef8b203b96508deb7e3063590
[ "MIT" ]
null
null
null
from pizza import Pizza class VeggiePizza(Pizza): def __init__(self): self.name = 'Veggie Pizza' self.dough = 'Crust' self.sauce = 'Marinara sauce' self.toppings.append('Shredded mozzarella') self.toppings.append('Grated parmesan') self.toppings.append('Diced onion'...
31.533333
51
0.651163
from pizza import Pizza class VeggiePizza(Pizza): def __init__(self): self.name = 'Veggie Pizza' self.dough = 'Crust' self.sauce = 'Marinara sauce' self.toppings.append('Shredded mozzarella') self.toppings.append('Grated parmesan') self.toppings.append('Diced onion'...
true
true
f7206acbc129c68b6043e8dd105bdfbbd6738ace
240
py
Python
python/homeflux/utils/timer.py
david2777/homeflux
4f7c4b855bd69b0b132d480cac133582445cacf5
[ "MIT" ]
null
null
null
python/homeflux/utils/timer.py
david2777/homeflux
4f7c4b855bd69b0b132d480cac133582445cacf5
[ "MIT" ]
null
null
null
python/homeflux/utils/timer.py
david2777/homeflux
4f7c4b855bd69b0b132d480cac133582445cacf5
[ "MIT" ]
null
null
null
import time class Timer: """Simple Timer""" def __init__(self): self.start = time.perf_counter() def end(self, precision: int = 3) -> str: return '%.{}f'.format(precision) % (time.perf_counter() - self.start)
21.818182
77
0.6
import time class Timer: def __init__(self): self.start = time.perf_counter() def end(self, precision: int = 3) -> str: return '%.{}f'.format(precision) % (time.perf_counter() - self.start)
true
true
f7206b1325541721ae9f9158f32fc2ad213a5369
16,774
py
Python
pw_tokenizer/py/pw_tokenizer/tokens.py
LuDuda/pigweed
dcd7230895a234156bc7b6e5061e6936627c5fbb
[ "Apache-2.0" ]
null
null
null
pw_tokenizer/py/pw_tokenizer/tokens.py
LuDuda/pigweed
dcd7230895a234156bc7b6e5061e6936627c5fbb
[ "Apache-2.0" ]
null
null
null
pw_tokenizer/py/pw_tokenizer/tokens.py
LuDuda/pigweed
dcd7230895a234156bc7b6e5061e6936627c5fbb
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 The Pigweed 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
35.84188
80
0.63205
import collections import csv from dataclasses import dataclass from datetime import datetime import io import logging from pathlib import Path import re import struct from typing import (BinaryIO, Callable, Dict, Iterable, Iterator, List, NamedTuple, Optional, Pattern, Tuple, Union, V...
true
true
f7206b36e5a22338c09290307a5bbcd5356c269a
366
py
Python
chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py
dieterwarson/ChatterBot
69c674218be274bca1f47c105b09995373e09f47
[ "BSD-3-Clause" ]
null
null
null
chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py
dieterwarson/ChatterBot
69c674218be274bca1f47c105b09995373e09f47
[ "BSD-3-Clause" ]
null
null
null
chatterbot/ext/django_chatterbot/migrations/0016_statement_stemmed_text.py
dieterwarson/ChatterBot
69c674218be274bca1f47c105b09995373e09f47
[ "BSD-3-Clause" ]
null
null
null
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('django_chatterbot', '0015_statement_persona'), ] operations = [ migrations.AddField( model_name='statement', name='stemmed_text', field=models.CharField(...
21.529412
63
0.60929
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('django_chatterbot', '0015_statement_persona'), ] operations = [ migrations.AddField( model_name='statement', name='stemmed_text', field=models.CharField(...
true
true
f7206bcb4173f335d34eb68cdae8a22c3c3c3a67
1,928
py
Python
docs_src/sql_databases/sql_app/alt_main.py
Aryabhata-Rootspring/fastapi
f6237ad05a8468ac19c591181adad38d75372c46
[ "MIT" ]
53,007
2018-12-08T10:05:29.000Z
2022-03-31T23:30:02.000Z
docs_src/sql_databases/sql_app/alt_main.py
Aryabhata-Rootspring/fastapi
f6237ad05a8468ac19c591181adad38d75372c46
[ "MIT" ]
4,155
2019-01-05T05:07:49.000Z
2022-03-31T21:25:38.000Z
docs_src/sql_databases/sql_app/alt_main.py
Aryabhata-Rootspring/fastapi
f6237ad05a8468ac19c591181adad38d75372c46
[ "MIT" ]
4,092
2018-12-09T16:21:00.000Z
2022-03-31T07:59:45.000Z
from typing import List from fastapi import Depends, FastAPI, HTTPException, Request, Response from sqlalchemy.orm import Session from . import crud, models, schemas from .database import SessionLocal, engine models.Base.metadata.create_all(bind=engine) app = FastAPI() @app.middleware("http") async def db_session...
30.603175
79
0.721992
from typing import List from fastapi import Depends, FastAPI, HTTPException, Request, Response from sqlalchemy.orm import Session from . import crud, models, schemas from .database import SessionLocal, engine models.Base.metadata.create_all(bind=engine) app = FastAPI() @app.middleware("http") async def db_session...
true
true
f7206d083d469a643b9a783b3a819077f502c23e
450
py
Python
Lib/fontTools/ttLib/tables/T_S_I__2.py
anntzer/fonttools
726cd67549956b985bbbe83e26fb0af9da59ddf7
[ "MIT", "BSD-3-Clause" ]
2
2021-04-07T16:47:04.000Z
2022-01-15T04:01:01.000Z
Lib/fontTools/ttLib/tables/T_S_I__2.py
anntzer/fonttools
726cd67549956b985bbbe83e26fb0af9da59ddf7
[ "MIT", "BSD-3-Clause" ]
74
2020-01-30T07:27:54.000Z
2021-08-03T05:47:17.000Z
Lib/fontTools/ttLib/tables/T_S_I__2.py
anntzer/fonttools
726cd67549956b985bbbe83e26fb0af9da59ddf7
[ "MIT", "BSD-3-Clause" ]
1
2020-01-22T20:06:09.000Z
2020-01-22T20:06:09.000Z
""" TSI{0,1,2,3,5} are private tables used by Microsoft Visual TrueType (VTT) tool to store its hinting source data. TSI2 is the index table containing the lengths and offsets for the glyph programs that are contained in the TSI3 table. It uses the same format as the TSI0 table. """ from fontTools.misc.py23 import * f...
28.125
77
0.768889
from fontTools.misc.py23 import * from fontTools import ttLib superclass = ttLib.getTableClass("TSI0") class table_T_S_I__2(superclass): dependencies = ["TSI3"]
true
true
f7206d8f4f866ba92ed05ffaf316f027c8f23f04
405
py
Python
psqlflow/printers/graph_printer.py
liuhenry/psqlflow
a4d39794d437a16fbf89582d3f7b8e7425bdfca5
[ "MIT" ]
3
2016-12-11T19:50:44.000Z
2018-05-24T13:52:09.000Z
psqlflow/printers/graph_printer.py
liuhenry/psqlflow
a4d39794d437a16fbf89582d3f7b8e7425bdfca5
[ "MIT" ]
null
null
null
psqlflow/printers/graph_printer.py
liuhenry/psqlflow
a4d39794d437a16fbf89582d3f7b8e7425bdfca5
[ "MIT" ]
null
null
null
import pygraphviz as pgv from .printer import Printer class GraphPrinter(Printer): """ Exports flows to graphviz """ def __init__(self, *args, **kwargs): super(GraphPrinter, self).__init__(*args, **kwargs) def new_obj(self): return pgv.AGraph(strict=False, directed=True, rankdir='...
21.315789
68
0.644444
import pygraphviz as pgv from .printer import Printer class GraphPrinter(Printer): def __init__(self, *args, **kwargs): super(GraphPrinter, self).__init__(*args, **kwargs) def new_obj(self): return pgv.AGraph(strict=False, directed=True, rankdir='LR') @staticmethod def add_edge(graph...
true
true
f7206e62311f2ae8bf498980b4772f3ea02b5efc
6,337
py
Python
apps/alerts/main.py
Cal-CS-61A-Staff/examtool-web
c31b8596fde75c54fe6436400bb6d2889d7b1283
[ "MIT" ]
1
2020-05-06T22:34:44.000Z
2020-05-06T22:34:44.000Z
apps/alerts/main.py
Cal-CS-61A-Staff/examtool-web
c31b8596fde75c54fe6436400bb6d2889d7b1283
[ "MIT" ]
5
2020-07-13T09:29:01.000Z
2020-10-18T06:33:30.000Z
apps/alerts/main.py
Cal-CS-61A-Staff/examtool-web
c31b8596fde75c54fe6436400bb6d2889d7b1283
[ "MIT" ]
5
2020-05-13T16:10:24.000Z
2020-09-23T18:41:06.000Z
import time from os import getenv from flask import jsonify, abort from google.cloud import firestore from google.oauth2 import id_token from google.auth.transport import requests as g_requests from api import ( process_ok_exam_upload, is_admin, clear_collection, get_announcements, get_email_from_...
31.844221
88
0.504024
import time from os import getenv from flask import jsonify, abort from google.cloud import firestore from google.oauth2 import id_token from google.auth.transport import requests as g_requests from api import ( process_ok_exam_upload, is_admin, clear_collection, get_announcements, get_email_from_...
true
true
f7206ebe8fad56aa6688ff5f36b4dc7a3840b16f
413
py
Python
backend/app/models/user.py
Infam852/IoT-project
673d8a96676e046331550b9c16c0610de5733f73
[ "MIT" ]
null
null
null
backend/app/models/user.py
Infam852/IoT-project
673d8a96676e046331550b9c16c0610de5733f73
[ "MIT" ]
null
null
null
backend/app/models/user.py
Infam852/IoT-project
673d8a96676e046331550b9c16c0610de5733f73
[ "MIT" ]
1
2021-12-18T19:33:01.000Z
2021-12-18T19:33:01.000Z
from sqlalchemy import Column, Integer, ForeignKey, DateTime from sqlalchemy.sql.sqltypes import Boolean, String from app.db.database import Base class UserModel(Base): __tablename__ = "users" id = Column(Integer, primary_key=True, index=True) username = Column(String, nullable=False, index=True) di...
29.5
60
0.755448
from sqlalchemy import Column, Integer, ForeignKey, DateTime from sqlalchemy.sql.sqltypes import Boolean, String from app.db.database import Base class UserModel(Base): __tablename__ = "users" id = Column(Integer, primary_key=True, index=True) username = Column(String, nullable=False, index=True) di...
true
true
f7206ec0c3d11ce24235924a1f5bf4631efd543f
1,715
py
Python
tools/generate_taint_models/tests/get_exit_nodes_test.py
rvantonder/pyre-check-1
600ec9656ece5fff21598f4248c55089714bf590
[ "MIT" ]
null
null
null
tools/generate_taint_models/tests/get_exit_nodes_test.py
rvantonder/pyre-check-1
600ec9656ece5fff21598f4248c55089714bf590
[ "MIT" ]
null
null
null
tools/generate_taint_models/tests/get_exit_nodes_test.py
rvantonder/pyre-check-1
600ec9656ece5fff21598f4248c55089714bf590
[ "MIT" ]
null
null
null
# Copyright (c) 2016-present, Facebook, Inc. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import unittest from typing import Callable from ..get_exit_nodes import ExitNodeGenerator from ..model_generator import Configuration from .test_f...
41.829268
81
0.549271
import unittest from typing import Callable from ..get_exit_nodes import ExitNodeGenerator from ..model_generator import Configuration from .test_functions import __name__ as qualifier, all_functions class GetExitNodesTest(unittest.TestCase): def test_compute_models(self): sink = "TaintSink[Returned...
true
true
f7206f20aeb3af06e52189f7a1589c4376b4e9c4
1,677
py
Python
09.py
Michanix/Algorithms-Intro-Course
c81fa38b05199a42eaeb48567447ee3f6b1e535e
[ "MIT" ]
null
null
null
09.py
Michanix/Algorithms-Intro-Course
c81fa38b05199a42eaeb48567447ee3f6b1e535e
[ "MIT" ]
null
null
null
09.py
Michanix/Algorithms-Intro-Course
c81fa38b05199a42eaeb48567447ee3f6b1e535e
[ "MIT" ]
null
null
null
from random import randrange from time import time def bubble_sort(arr): for i in range(len(arr)): for j in range(len(arr)-1, i, -1): if arr[j] < arr[j-1]: # меняем элементы местами arr[j], arr[j-1] = arr[j-1], arr[j] return arr def opt_bubble_sort(arr): ...
26.203125
117
0.603459
from random import randrange from time import time def bubble_sort(arr): for i in range(len(arr)): for j in range(len(arr)-1, i, -1): if arr[j] < arr[j-1]: arr[j], arr[j-1] = arr[j-1], arr[j] return arr def opt_bubble_sort(arr): while True: sw...
true
true
f72071c15f22bdfc2b6d13e6fb45864f32d756e1
5,175
py
Python
nay/scrape_nominate_movie.py
kondounagi/japanese_movies_dataset
349f217cd04e07fd44a401ecb2f2dcaea7bc2e5e
[ "MIT" ]
1
2019-08-05T21:43:09.000Z
2019-08-05T21:43:09.000Z
nay/scrape_nominate_movie.py
kondounagi/japanese_movies_dataset
349f217cd04e07fd44a401ecb2f2dcaea7bc2e5e
[ "MIT" ]
3
2020-03-31T05:53:37.000Z
2021-12-13T20:07:39.000Z
nay/scrape_nominate_movie.py
kondounagi/japanese_movies_dataset
349f217cd04e07fd44a401ecb2f2dcaea7bc2e5e
[ "MIT" ]
null
null
null
import re import sys import json import requests from bs4 import BeautifulSoup def scrape_nominate_movie(year): film_index = "https://eiga.com/movie/" re_time = re.compile(r"/\d*分/") re_production_studio = re.compile(r"配給:[^<]*") re_title = re.compile(r"映画「[^」]*」") re_date = re.compile(r"\d*年\d*月...
32.753165
104
0.465507
import re import sys import json import requests from bs4 import BeautifulSoup def scrape_nominate_movie(year): film_index = "https://eiga.com/movie/" re_time = re.compile(r"/\d*分/") re_production_studio = re.compile(r"配給:[^<]*") re_title = re.compile(r"映画「[^」]*」") re_date = re.compile(r"\d*年\d*月...
true
true
f72073fa7cc1e6f079942989602618bed6ed1f0a
9,216
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/aio/operations/_available_private_endpoint_types_operations.py
praveenkuttappan/azure-sdk-for-python
4b79413667b7539750a6c7dde15737013a3d4bd5
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/aio/operations/_available_private_endpoint_types_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_07_01/aio/operations/_available_private_endpoint_types_operations.py
v-xuto/azure-sdk-for-python
9c6296d22094c5ede410bc83749e8df8694ccacc
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
48.761905
210
0.659397
from typing import Any, AsyncIterable, Callable, Dict, Generic, Optional, TypeVar import warnings from azure.core.async_paging import AsyncItemPaged, AsyncList from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.pi...
true
true
f72076a759856b30a8e2638c441c193c5f2894fe
3,023
py
Python
rally_openstack/scenarios/gnocchi/archive_policy.py
RSE-Cambridge/rally-openstack
32bbc091bbce1db625a2fc22da28b32718befa13
[ "Apache-2.0" ]
null
null
null
rally_openstack/scenarios/gnocchi/archive_policy.py
RSE-Cambridge/rally-openstack
32bbc091bbce1db625a2fc22da28b32718befa13
[ "Apache-2.0" ]
null
null
null
rally_openstack/scenarios/gnocchi/archive_policy.py
RSE-Cambridge/rally-openstack
32bbc091bbce1db625a2fc22da28b32718befa13
[ "Apache-2.0" ]
1
2018-12-10T12:31:27.000Z
2018-12-10T12:31:27.000Z
# Copyright 2017 Red Hat, Inc. <http://www.redhat.com> # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
38.75641
78
0.7261
from rally.task import validation from rally_openstack import consts from rally_openstack import scenario from rally_openstack.scenarios.gnocchi import utils as gnocchiutils @validation.add("required_services", services=[consts.Service.GNOCCHI]) @validation.add("required_platform", platform="openstac...
true
true
f720771fafd95ebfe23bca7f24afc2f571e9f07b
51,158
py
Python
tests/test_dataset.py
jenhaoyang/datumaro
add81ddb59502362fa65fa07e5bc4d8c9f61afde
[ "MIT" ]
null
null
null
tests/test_dataset.py
jenhaoyang/datumaro
add81ddb59502362fa65fa07e5bc4d8c9f61afde
[ "MIT" ]
null
null
null
tests/test_dataset.py
jenhaoyang/datumaro
add81ddb59502362fa65fa07e5bc4d8c9f61afde
[ "MIT" ]
1
2021-12-15T22:15:59.000Z
2021-12-15T22:15:59.000Z
from unittest import TestCase import os import os.path as osp import numpy as np from datumaro.components.annotation import ( AnnotationType, Bbox, Caption, Label, LabelCategories, Mask, Points, Polygon, PolyLine, ) from datumaro.components.converter import Converter from datumaro.components.dataset import ( ...
33.371168
81
0.572403
from unittest import TestCase import os import os.path as osp import numpy as np from datumaro.components.annotation import ( AnnotationType, Bbox, Caption, Label, LabelCategories, Mask, Points, Polygon, PolyLine, ) from datumaro.components.converter import Converter from datumaro.components.dataset import ( ...
true
true
f720773382e2af71b9b530986df7d022a800c635
4,874
py
Python
protoseg/report.py
chriamue/protoseg
4ddc7d613aadcb9d25b5773eff688214349ab23f
[ "MIT" ]
null
null
null
protoseg/report.py
chriamue/protoseg
4ddc7d613aadcb9d25b5773eff688214349ab23f
[ "MIT" ]
null
null
null
protoseg/report.py
chriamue/protoseg
4ddc7d613aadcb9d25b5773eff688214349ab23f
[ "MIT" ]
1
2020-03-30T07:10:54.000Z
2020-03-30T07:10:54.000Z
import os import numpy as np import cv2 import json import pandas as pd import tensorflow as tf from tensorboard.backend.event_processing import event_accumulator as ea from matplotlib import pyplot as plt from matplotlib import colors as colors from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCan...
35.318841
90
0.560936
import os import numpy as np import cv2 import json import pandas as pd import tensorflow as tf from tensorboard.backend.event_processing import event_accumulator as ea from matplotlib import pyplot as plt from matplotlib import colors as colors from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCan...
true
true
f72077cdf636f62c3c764ed25b75858a0cc4d91d
434
py
Python
data/scripts/templates/object/mobile/shared_giant_veermok.py
obi-two/GameServer
7d37024e2291a97d49522610cd8f1dbe5666afc2
[ "MIT" ]
20
2015-02-23T15:11:56.000Z
2022-03-18T20:56:48.000Z
data/scripts/templates/object/mobile/shared_giant_veermok.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
null
null
null
data/scripts/templates/object/mobile/shared_giant_veermok.py
apathyboy/swganh
665128efe9154611dec4cb5efc61d246dd095984
[ "MIT" ]
20
2015-04-04T16:35:59.000Z
2022-03-24T14:54:37.000Z
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Creature() result.template = "object/mobile/shared_giant_veermok.iff" result.attribute_template_id = 9 result.st...
25.529412
59
0.723502
true
true
f72077d78671f48577f3268c91b0668f5686d755
214
py
Python
Linguagens/Python/Exercicios/cursos_em_video/aulas-01_a_21/012.py
rafaelvizu/Estudos
eef5e3e3706ff99959226c51b9907b6af4377bfe
[ "MIT" ]
null
null
null
Linguagens/Python/Exercicios/cursos_em_video/aulas-01_a_21/012.py
rafaelvizu/Estudos
eef5e3e3706ff99959226c51b9907b6af4377bfe
[ "MIT" ]
null
null
null
Linguagens/Python/Exercicios/cursos_em_video/aulas-01_a_21/012.py
rafaelvizu/Estudos
eef5e3e3706ff99959226c51b9907b6af4377bfe
[ "MIT" ]
null
null
null
print('Exercício Python #012 - Calculando Descontos') a6 = float(input('Preço: ')) b6 = int(input('Desconto:')) c6 = a6 * b6 / 100 d6 = a6 - c6 print(' O valor com o desconto de {} % é de {} Reais '.format(b6, d6))
35.666667
70
0.630841
print('Exercício Python #012 - Calculando Descontos') a6 = float(input('Preço: ')) b6 = int(input('Desconto:')) c6 = a6 * b6 / 100 d6 = a6 - c6 print(' O valor com o desconto de {} % é de {} Reais '.format(b6, d6))
true
true
f720787fc556e48c6de48c95c2046dbcd33827a9
26,887
py
Python
dask_kubernetes/classic/kubecluster.py
Matt711/dask-kubernetes
8190529fc140b6ea2c345bde02aa1c647272eb98
[ "BSD-3-Clause" ]
1
2022-01-20T12:38:27.000Z
2022-01-20T12:38:27.000Z
dask_kubernetes/classic/kubecluster.py
Matt711/dask-kubernetes
8190529fc140b6ea2c345bde02aa1c647272eb98
[ "BSD-3-Clause" ]
null
null
null
dask_kubernetes/classic/kubecluster.py
Matt711/dask-kubernetes
8190529fc140b6ea2c345bde02aa1c647272eb98
[ "BSD-3-Clause" ]
null
null
null
import asyncio import copy import getpass import logging import os import time import uuid import warnings import yaml import dask import dask.distributed import distributed.security from distributed.deploy import SpecCluster, ProcessInterface from distributed.utils import Log, Logs import kubernetes_asyncio as kubern...
36.481682
115
0.609886
import asyncio import copy import getpass import logging import os import time import uuid import warnings import yaml import dask import dask.distributed import distributed.security from distributed.deploy import SpecCluster, ProcessInterface from distributed.utils import Log, Logs import kubernetes_asyncio as kubern...
true
true
f720789c8c15c24400e6e5290d6e30a895646242
7,694
py
Python
rfmizer/tests_views.py
JunglistMNSQ/rfm
f42fa1424edbc9c57c9cd27d8183574f72acbf5c
[ "BSD-3-Clause" ]
null
null
null
rfmizer/tests_views.py
JunglistMNSQ/rfm
f42fa1424edbc9c57c9cd27d8183574f72acbf5c
[ "BSD-3-Clause" ]
4
2021-06-04T23:58:19.000Z
2021-09-22T19:38:00.000Z
rfmizer/tests_views.py
JunglistMNSQ/rfm
f42fa1424edbc9c57c9cd27d8183574f72acbf5c
[ "BSD-3-Clause" ]
null
null
null
from django.test import TestCase from django.urls import reverse from unittest import mock from .fixtures import FixturesMixin from .models import Person, Tab, User import hashlib # Create your tests here. class TestRegister(FixturesMixin, TestCase): def test_create_and_login(self): self.client.post('/r...
38.089109
71
0.525214
from django.test import TestCase from django.urls import reverse from unittest import mock from .fixtures import FixturesMixin from .models import Person, Tab, User import hashlib class TestRegister(FixturesMixin, TestCase): def test_create_and_login(self): self.client.post('/register/', ...
true
true
f72078f20b5cc5766f8c851d62a5d4fcbc04c993
13
py
Python
python/testData/inspections/PyUnresolvedReferencesInspection/ImportToContainingFileInPackage/p1/__init__.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2019-04-28T07:48:50.000Z
2020-12-11T14:18:08.000Z
python/testData/inspections/PyUnresolvedReferencesInspection/ImportToContainingFileInPackage/p1/__init__.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
173
2018-07-05T13:59:39.000Z
2018-08-09T01:12:03.000Z
python/testData/inspections/PyUnresolvedReferencesInspection/ImportToContainingFileInPackage/p1/__init__.py
truthiswill/intellij-community
fff88cfb0dc168eea18ecb745d3e5b93f57b0b95
[ "Apache-2.0" ]
2
2020-03-15T08:57:37.000Z
2020-04-07T04:48:14.000Z
import p1.m1
6.5
12
0.769231
import p1.m1
true
true
f72079009d9d6b4d0c1dd53f8c56f7204272da9b
1,527
py
Python
firmware/adafruit-circuitpython-bundle-5.x-mpy-20200915/examples/st7735r_minitft_simpletest.py
freeglow/microcontroller-cpy
5adfda49da6eefaece81be2a2f26122d68736355
[ "MIT" ]
null
null
null
firmware/adafruit-circuitpython-bundle-5.x-mpy-20200915/examples/st7735r_minitft_simpletest.py
freeglow/microcontroller-cpy
5adfda49da6eefaece81be2a2f26122d68736355
[ "MIT" ]
null
null
null
firmware/adafruit-circuitpython-bundle-5.x-mpy-20200915/examples/st7735r_minitft_simpletest.py
freeglow/microcontroller-cpy
5adfda49da6eefaece81be2a2f26122d68736355
[ "MIT" ]
null
null
null
""" This test will initialize the display using displayio and draw a solid green background, a smaller purple rectangle, and some yellow text. """ import board import terminalio import displayio from adafruit_display_text import label from adafruit_st7735r import ST7735R # Release any resources currently i...
28.277778
86
0.749836
import board import terminalio import displayio from adafruit_display_text import label from adafruit_st7735r import ST7735R displayio.release_displays() spi = board.SPI() tft_cs = board.D5 tft_dc = board.D6 display_bus = displayio.FourWire( spi, command=tft_dc, chip_select=tft_cs, reset=board.D9...
true
true
f7207935c2b023e55a08f2a1a9a84c47dc130d71
16,613
py
Python
model/model.py
sahara2001/editsql
d4325ac996d1ed0069def6d349e43e2a1914e761
[ "MIT" ]
null
null
null
model/model.py
sahara2001/editsql
d4325ac996d1ed0069def6d349e43e2a1914e761
[ "MIT" ]
null
null
null
model/model.py
sahara2001/editsql
d4325ac996d1ed0069def6d349e43e2a1914e761
[ "MIT" ]
null
null
null
""" Class for the Sequence to sequence model for ATIS.""" import os import torch import torch.nn.functional as F from . import torch_utils from . import utils_bert from data_util.vocabulary import DEL_TOK, UNK_TOK from .encoder import Encoder, Encoder_Gnn from .embedder import Embedder from .token_predictor import ...
41.325871
226
0.618612
import os import torch import torch.nn.functional as F from . import torch_utils from . import utils_bert from data_util.vocabulary import DEL_TOK, UNK_TOK from .encoder import Encoder, Encoder_Gnn from .embedder import Embedder from .token_predictor import construct_token_predictor import numpy as np from data_u...
true
true
f7207971f79f86b58e5d4a4b9ee3f1c8c602689e
1,890
py
Python
MNISTT.py
ankit9437/MNIST
bf620e7779a5383c2ad87cf89cd11651963bd7c5
[ "MIT" ]
null
null
null
MNISTT.py
ankit9437/MNIST
bf620e7779a5383c2ad87cf89cd11651963bd7c5
[ "MIT" ]
null
null
null
MNISTT.py
ankit9437/MNIST
bf620e7779a5383c2ad87cf89cd11651963bd7c5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Dec 15 10:58:44 2019 @author: DELL """ from __future__ import print_function, division import numpy as np import pandas as pd import matplotlib.pyplot as plt def d(u, v): diff = u - v return diff.dot(diff) def get_data(limit=None): prin...
21.976744
77
0.539153
from __future__ import print_function, division import numpy as np import pandas as pd import matplotlib.pyplot as plt def d(u, v): diff = u - v return diff.dot(diff) def get_data(limit=None): print("Reading in and transforming data...") df = pd.read_csv('train.csv') data = ...
true
true
f72079f7da23aae91f56118b998102076ab9cb85
5,205
py
Python
email-finder.py
shivangraikar/Twitter-Data-Mining-For-Targeted-Marketing
d12fe807187d438041b4497cbb82ad9ef14d4dbf
[ "MIT" ]
5
2021-02-25T12:10:02.000Z
2021-11-13T04:03:42.000Z
email-finder.py
shivangraikar/Twitter-Data-Mining-For-Targeted-Marketing
d12fe807187d438041b4497cbb82ad9ef14d4dbf
[ "MIT" ]
null
null
null
email-finder.py
shivangraikar/Twitter-Data-Mining-For-Targeted-Marketing
d12fe807187d438041b4497cbb82ad9ef14d4dbf
[ "MIT" ]
3
2021-02-25T12:10:06.000Z
2021-03-21T20:26:15.000Z
import string import time import threading import urllib import re import io import sys from time import sleep import pickle import pandas as pd import psycopg2 def formats(first, middle, last, domain): """ Create a list of 30 possible email formats combining: - First name: [empty] | Full | Init...
36.65493
136
0.529491
import string import time import threading import urllib import re import io import sys from time import sleep import pickle import pandas as pd import psycopg2 def formats(first, middle, last, domain): list = [] if len(last)==0: list.append(first + '@' + domain) else: ...
true
true
f7207a2b951aa4caf689bd23c876ef2c79f64116
22,958
py
Python
lib/python3.7/site-packages/django/db/backends/sqlite3/base.py
Boring-Mind/DjangoGirls1
54ac8f01d12785470fd5a4ece759206639997122
[ "Apache-2.0" ]
304
2015-01-06T18:02:49.000Z
2021-12-11T18:08:37.000Z
lib/python3.7/site-packages/django/db/backends/sqlite3/base.py
Boring-Mind/DjangoGirls1
54ac8f01d12785470fd5a4ece759206639997122
[ "Apache-2.0" ]
123
2019-09-10T14:48:01.000Z
2019-11-28T21:24:06.000Z
virtual/lib/python3.6/site-packages/django/db/backends/sqlite3/base.py
Krasivaya/Tracks
c18d1c9222dff39e4678d44495a8a7d9434339ff
[ "MIT" ]
41
2015-04-11T14:58:02.000Z
2021-11-13T20:47:58.000Z
""" SQLite backend for the sqlite3 module in the standard library. """ import datetime import decimal import functools import math import operator import re import statistics import warnings from itertools import chain from sqlite3 import dbapi2 as Database import pytz from django.core.exceptions import ImproperlyCon...
40.923351
115
0.619828
import datetime import decimal import functools import math import operator import re import statistics import warnings from itertools import chain from sqlite3 import dbapi2 as Database import pytz from django.core.exceptions import ImproperlyConfigured from django.db import utils from django.db.backends import util...
true
true
f7207bb8de11f352cd6af90099062c5d0ac72db3
2,345
py
Python
tests/ccapi/test__attr__.py
achillesrasquinha/CCPy
7a5b4fc008a9a0c90caee5d2d6a8c67393dcb822
[ "MIT" ]
9
2020-05-12T08:16:35.000Z
2022-01-06T03:22:18.000Z
tests/ccapi/test__attr__.py
achillesrasquinha/CCPy
7a5b4fc008a9a0c90caee5d2d6a8c67393dcb822
[ "MIT" ]
3
2020-10-14T16:29:24.000Z
2021-10-04T07:24:34.000Z
tests/ccapi/test__attr__.py
achillesrasquinha/CCPy
7a5b4fc008a9a0c90caee5d2d6a8c67393dcb822
[ "MIT" ]
1
2019-12-30T23:13:46.000Z
2019-12-30T23:13:46.000Z
# imports - standard imports import os.path as osp import subprocess # imports - test imports import pytest # imports - module imports from ccapi.__attr__ import ( read, pardir, strip, safe_decode, sequence_filter, get_revision ) def call(*args, **kwargs): subprocess.call(args, **kwargs) ...
26.055556
99
0.620469
import os.path as osp import subprocess import pytest from ccapi.__attr__ import ( read, pardir, strip, safe_decode, sequence_filter, get_revision ) def call(*args, **kwargs): subprocess.call(args, **kwargs) def test_read(tmpdir): directory = tmpdir.mkdir("tmp") tempfile = di...
true
true
f7207db9c00de82d099854acdd08b0a2728247b5
1,679
py
Python
genderPredictScript.py
ganesh2583/Python-Data_Science
233586491d3863176a008b938b0946c472940a6d
[ "MIT" ]
null
null
null
genderPredictScript.py
ganesh2583/Python-Data_Science
233586491d3863176a008b938b0946c472940a6d
[ "MIT" ]
null
null
null
genderPredictScript.py
ganesh2583/Python-Data_Science
233586491d3863176a008b938b0946c472940a6d
[ "MIT" ]
null
null
null
from sklearn import tree from sklearn import neighbors from sklearn import gaussian_process #[height, weight, shoe size] X = [[181,80,10],[161,70,6],[171,66,7],[176,88,7],[189,100,8],[141,80,5],[156,78,6],[161,50,6],[171,60,7],[151,78,7],[171,40,7]] #Gender Y = ['male','male','male','male','male','female','female','fe...
29.45614
128
0.805837
from sklearn import tree from sklearn import neighbors from sklearn import gaussian_process X = [[181,80,10],[161,70,6],[171,66,7],[176,88,7],[189,100,8],[141,80,5],[156,78,6],[161,50,6],[171,60,7],[151,78,7],[171,40,7]] Y = ['male','male','male','male','male','female','female','female','female','female','female'] ...
true
true
f7207ef7a8d650d8bd9ead304e0f30c6f37038f4
366
py
Python
main.py
zruss11/Nike-InboxCheck
5e3be689797a8d861e4894b1df4bd6ed8f1066e8
[ "MIT" ]
11
2017-09-09T03:47:18.000Z
2019-11-15T14:12:51.000Z
main.py
zruss11/Nike-InboxCheck
5e3be689797a8d861e4894b1df4bd6ed8f1066e8
[ "MIT" ]
null
null
null
main.py
zruss11/Nike-InboxCheck
5e3be689797a8d861e4894b1df4bd6ed8f1066e8
[ "MIT" ]
5
2017-09-09T03:48:07.000Z
2020-07-04T00:59:01.000Z
import requests from classes.login import Login from classes.logger import logger log = logger().log with open('config/accounts.txt') as accounts_file: accounts = accounts_file.read().splitlines() def run(x): req = requests.Session() log("{} Attempting Login".format(x.split(':')[0])) l = Login(req)...
19.263158
54
0.674863
import requests from classes.login import Login from classes.logger import logger log = logger().log with open('config/accounts.txt') as accounts_file: accounts = accounts_file.read().splitlines() def run(x): req = requests.Session() log("{} Attempting Login".format(x.split(':')[0])) l = Login(req)...
true
true
f7207f32e150c7bc0ac42fe89ad3f6575a482a24
2,502
py
Python
google/cloud/bigquery/_http.py
msuozzo/python-bigquery
dcb8728c12f5ab0d7809a1b6cf72755dff973772
[ "Apache-2.0" ]
384
2020-02-07T06:39:26.000Z
2022-03-30T18:25:50.000Z
google/cloud/bigquery/_http.py
msuozzo/python-bigquery
dcb8728c12f5ab0d7809a1b6cf72755dff973772
[ "Apache-2.0" ]
770
2020-02-04T10:46:40.000Z
2022-03-31T15:12:19.000Z
google/cloud/bigquery/_http.py
msuozzo/python-bigquery
dcb8728c12f5ab0d7809a1b6cf72755dff973772
[ "Apache-2.0" ]
177
2020-02-06T05:24:31.000Z
2022-03-25T18:51:36.000Z
# Copyright 2015 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
41.7
109
0.742606
import os import pkg_resources from google.cloud import _http port __version__ if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE") == "true": release = pkg_resources.get_distribution("google-cloud-core").parsed_version if release < pkg_resources.parse_version("1.6.0"): raise Import...
true
true
f720804843b0cf052334ea5fd31c198aa77f5bcf
51,935
py
Python
tests/test_catalina_10_15_7.py
RhetTbull/osxphotos
0e9b9d625190b94c1dd68276e3b0e5367002d87c
[ "MIT" ]
656
2019-08-14T14:10:44.000Z
2022-03-28T15:25:42.000Z
tests/test_catalina_10_15_7.py
RhetTbull/osxphotos
0e9b9d625190b94c1dd68276e3b0e5367002d87c
[ "MIT" ]
557
2019-10-14T19:00:02.000Z
2022-03-28T00:48:30.000Z
tests/test_catalina_10_15_7.py
RhetTbull/osxphotos
0e9b9d625190b94c1dd68276e3b0e5367002d87c
[ "MIT" ]
58
2019-12-27T01:39:33.000Z
2022-02-26T22:18:49.000Z
""" Basic tests for Photos 5 on MacOS 10.15.7 """ import datetime import os import os.path import pathlib import sqlite3 import tempfile import time from collections import Counter, namedtuple import pytest import osxphotos from osxphotos._constants import _UNKNOWN_PERSON from osxphotos.utils import _get_os_version ...
35.596299
7,228
0.694772
import datetime import os import os.path import pathlib import sqlite3 import tempfile import time from collections import Counter, namedtuple import pytest import osxphotos from osxphotos._constants import _UNKNOWN_PERSON from osxphotos.utils import _get_os_version OS_VERSION = _get_os_version() SKIP_TEST = "OSXPH...
true
true
f720807430145448da0dda4234ceca5a1f6435e7
255
py
Python
problems/013.py
JoshKarpel/Euler
9c4a89cfe4b0114d84a82e2b2894c7b8af815e93
[ "MIT" ]
1
2017-09-20T22:26:24.000Z
2017-09-20T22:26:24.000Z
problems/013.py
JoshKarpel/euler-python
9c4a89cfe4b0114d84a82e2b2894c7b8af815e93
[ "MIT" ]
null
null
null
problems/013.py
JoshKarpel/euler-python
9c4a89cfe4b0114d84a82e2b2894c7b8af815e93
[ "MIT" ]
null
null
null
import os def solve(): filepath = os.path.join(os.path.dirname(__file__), '013_numbers.txt') with open(filepath) as f: numbers = [int(x) for x in f] return int(str(sum(numbers))[:10]) if __name__ == '__main__': print(solve())
18.214286
73
0.619608
import os def solve(): filepath = os.path.join(os.path.dirname(__file__), '013_numbers.txt') with open(filepath) as f: numbers = [int(x) for x in f] return int(str(sum(numbers))[:10]) if __name__ == '__main__': print(solve())
true
true
f7208121384b71d9a38bf011097a42030c385a61
798
py
Python
app/ngrok.py
nnsnodnb/line-bot-django-handle
27d0e29b674831eac8068124f6445d0698968f40
[ "Apache-2.0" ]
null
null
null
app/ngrok.py
nnsnodnb/line-bot-django-handle
27d0e29b674831eac8068124f6445d0698968f40
[ "Apache-2.0" ]
1
2020-06-05T18:48:36.000Z
2020-06-05T18:48:36.000Z
app/ngrok.py
nnsnodnb/line-bot-django-handle
27d0e29b674831eac8068124f6445d0698968f40
[ "Apache-2.0" ]
null
null
null
from django.conf import settings import requests import socket BASE_HOST = '127.0.0.1' PORT = 4040 class Ngrok(object): def __init__(self, port=PORT, *args, **kwargs): super(Ngrok, self).__init__(*args, **kwargs) self.port = port self._check_launch_ngrok() def _check_launch_ngrok(s...
24.9375
85
0.630326
from django.conf import settings import requests import socket BASE_HOST = '127.0.0.1' PORT = 4040 class Ngrok(object): def __init__(self, port=PORT, *args, **kwargs): super(Ngrok, self).__init__(*args, **kwargs) self.port = port self._check_launch_ngrok() def _check_launch_ngrok(s...
true
true
f720816e82bbc8f3addb15db8bbee82d4cadc5e1
811
py
Python
scipy/sparse/data.py
lorentzenchr/scipy
393a05ee927883ad6316b7092c851afea8f16816
[ "BSD-3-Clause" ]
9,095
2015-01-02T18:24:23.000Z
2022-03-31T20:35:31.000Z
scipy/sparse/data.py
lorentzenchr/scipy
393a05ee927883ad6316b7092c851afea8f16816
[ "BSD-3-Clause" ]
11,500
2015-01-01T01:15:30.000Z
2022-03-31T23:07:35.000Z
scipy/sparse/data.py
lorentzenchr/scipy
393a05ee927883ad6316b7092c851afea8f16816
[ "BSD-3-Clause" ]
5,838
2015-01-05T11:56:42.000Z
2022-03-31T23:21:19.000Z
# This file is not meant for public use and will be removed in SciPy v2.0.0. # Use the `scipy.sparse` namespace for importing the functions # included below. import warnings from . import _data __all__ = [ # noqa: F822 'isscalarlike', 'matrix', 'name', 'npfunc', 'spmatrix', 'validateaxis', ]...
23.852941
76
0.641184
import warnings from . import _data __all__ = [ 'isscalarlike', 'matrix', 'name', 'npfunc', 'spmatrix', 'validateaxis', ] def __dir__(): return __all__ def __getattr__(name): if name not in __all__: raise AttributeError( "scipy.sparse.data is deprecated an...
true
true
f72081ae67b5d48042132e9f4744873649364661
5,831
py
Python
idatasets/datasets/util.py
rahul1990gupta/indic-nlp-datasets
4d0935b194263579b9653cf8c3d4ecdd17af687d
[ "MIT" ]
1
2020-08-16T11:44:37.000Z
2020-08-16T11:44:37.000Z
idatasets/datasets/util.py
rahul1990gupta/indic-nlp-datasets
4d0935b194263579b9653cf8c3d4ecdd17af687d
[ "MIT" ]
2
2020-08-16T05:23:43.000Z
2020-10-21T06:59:15.000Z
idatasets/datasets/util.py
rahul1990gupta/indic-nlp-datasets
4d0935b194263579b9653cf8c3d4ecdd17af687d
[ "MIT" ]
2
2021-06-13T05:40:26.000Z
2022-02-05T15:53:23.000Z
import os from urllib.error import URLError, HTTPError from urllib.request import urlretrieve import tqdm import tarfile import zipfile import shutil import ssl ssl._create_default_https_context = ssl._create_unverified_context def download_file( origin: str, cache_subdir: str = "datasets") -> str: fn...
31.690217
87
0.575373
import os from urllib.error import URLError, HTTPError from urllib.request import urlretrieve import tqdm import tarfile import zipfile import shutil import ssl ssl._create_default_https_context = ssl._create_unverified_context def download_file( origin: str, cache_subdir: str = "datasets") -> str: fn...
true
true
f72082ade0aa616c87208ff39d48373868d15c94
1,030
py
Python
api/client/test/test_api_list_pipelines_response.py
krishnakumar27/mlx
dce67d58dffa24ca7a6a4d6b5fd8d4eb94e35215
[ "Apache-2.0" ]
98
2021-05-03T23:27:53.000Z
2022-03-13T02:29:12.000Z
api/client/test/test_api_list_pipelines_response.py
krishnakumar27/mlx
dce67d58dffa24ca7a6a4d6b5fd8d4eb94e35215
[ "Apache-2.0" ]
296
2021-05-03T22:44:26.000Z
2022-03-31T11:50:16.000Z
api/client/test/test_api_list_pipelines_response.py
krishnakumar27/mlx
dce67d58dffa24ca7a6a4d6b5fd8d4eb94e35215
[ "Apache-2.0" ]
38
2021-05-03T22:52:59.000Z
2022-03-31T03:58:34.000Z
# Copyright 2021 The MLX Contributors # # SPDX-License-Identifier: Apache-2.0 # coding: utf-8 """ MLX API MLX API Extension for Kubeflow Pipelines # noqa: E501 OpenAPI spec version: 0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_impo...
23.409091
108
0.729126
from __future__ import absolute_import import unittest import swagger_client from swagger_client.models.api_list_pipelines_response import ApiListPipelinesResponse from swagger_client.rest import ApiException class TestApiListPipelinesResponse(unittest.TestCase): def setUp(self): pass def...
true
true
f72082bda44b211831ca8f51067e919a7b88a005
29,302
py
Python
stable_baselines/trpo_mpi/trpo_mpi.py
Ow-woo/stable-baselines
ece376f62b0eaa3b58e90593b7db5fb9de3d82c5
[ "MIT" ]
3
2020-04-14T15:28:02.000Z
2020-09-23T00:55:48.000Z
stable_baselines/trpo_mpi/trpo_mpi.py
Ow-woo/stable-baselines
ece376f62b0eaa3b58e90593b7db5fb9de3d82c5
[ "MIT" ]
1
2019-10-30T07:31:52.000Z
2019-10-30T07:31:52.000Z
stable_baselines/trpo_mpi/trpo_mpi.py
Ow-woo/stable-baselines
ece376f62b0eaa3b58e90593b7db5fb9de3d82c5
[ "MIT" ]
7
2019-10-01T05:49:22.000Z
2021-12-24T07:11:55.000Z
import time from contextlib import contextmanager from collections import deque import gym from mpi4py import MPI import tensorflow as tf import numpy as np import stable_baselines.common.tf_util as tf_util from stable_baselines.common.tf_util import total_episode_reward_logger from stable_baselines.common import exp...
54.162662
121
0.524742
import time from contextlib import contextmanager from collections import deque import gym from mpi4py import MPI import tensorflow as tf import numpy as np import stable_baselines.common.tf_util as tf_util from stable_baselines.common.tf_util import total_episode_reward_logger from stable_baselines.common import exp...
true
true
f720830ef2390c7f939ff23286a68aa2ce3b6879
6,591
py
Python
mslib/msui/qt5/ui_topview_window.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
mslib/msui/qt5/ui_topview_window.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
mslib/msui/qt5/ui_topview_window.py
iamansoni/MSS
69bc8fc61ab277697ca691119f911382a63860c0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'mslib/msui/ui/ui_topview_window.ui' # # Created by: PyQt5 UI code generator 5.9.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_TopViewWindow(object): def setupUi(self, Top...
58.327434
122
0.739645
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_TopViewWindow(object): def setupUi(self, TopViewWindow): TopViewWindow.setObjectName("TopViewWindow") TopViewWindow.resize(952, 782) self.centralwidget = QtWidgets.QWidget(TopViewWindow) self.centralwidget.setObjectName("ce...
true
true