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
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c28eadb8681ae7ea7f33b4ad2031c22362888a9
55,934
py
Python
eggs/numpy-1.6.0-py2.7-linux-x86_64-ucs4.egg/numpy/ma/extras.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
343
2015-01-07T05:58:44.000Z
2022-03-15T14:55:21.000Z
eggs/numpy-1.6.0-py2.7-linux-x86_64-ucs4.egg/numpy/ma/extras.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
61
2015-03-19T18:20:21.000Z
2019-10-23T12:58:23.000Z
eggs/numpy-1.6.0-py2.7-linux-x86_64-ucs4.egg/numpy/ma/extras.py
bopopescu/phyG
023f505b705ab953f502cbc55e90612047867583
[ "CC-BY-3.0" ]
66
2015-01-20T15:35:05.000Z
2021-11-25T16:49:41.000Z
""" Masked arrays add-ons. A collection of utilities for `numpy.ma`. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu :version: $Id: extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $ """ __author__ = "Pierre GF Gerard-Marchant ($Author: jarrod.millman $)" __version__ = '1.0' __revision__ = "$Revi...
29.516623
97
0.540208
""" Masked arrays add-ons. A collection of utilities for `numpy.ma`. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu :version: $Id: extras.py 3473 2007-10-29 15:18:13Z jarrod.millman $ """ __author__ = "Pierre GF Gerard-Marchant ($Author: jarrod.millman $)" __version__ = '1.0' __revision__ = "$Revi...
false
true
1c28ee2fc5f6f50b7369f2bf4b21b8351e37c5ee
3,639
py
Python
lib/geomet/util.py
davasqueza/eriskco_conector_CloudSQL
99304b5eed06e9bba3646535a82d7fc98b0838b7
[ "Apache-2.0" ]
null
null
null
lib/geomet/util.py
davasqueza/eriskco_conector_CloudSQL
99304b5eed06e9bba3646535a82d7fc98b0838b7
[ "Apache-2.0" ]
null
null
null
lib/geomet/util.py
davasqueza/eriskco_conector_CloudSQL
99304b5eed06e9bba3646535a82d7fc98b0838b7
[ "Apache-2.0" ]
null
null
null
# Copyright 2013 Lars Butler & individual contributors # # 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...
32.491071
79
0.583402
import itertools import six def block_splitter(data, block_size): buf = [] for i, datum in enumerate(data): buf.append(datum) if len(buf) == block_size: yield buf buf = [] # yield it as well. if buf: yield buf def take(n, iterable): ...
true
true
1c28ee8c02c4f1aa38ae9f9684b8589cc9e3b1c4
2,111
py
Python
taggable/taggable_sequence.py
ville-k/taggable
d37ecdfba5bc09277f19ea51344ad2ea3ae100f2
[ "MIT" ]
null
null
null
taggable/taggable_sequence.py
ville-k/taggable
d37ecdfba5bc09277f19ea51344ad2ea3ae100f2
[ "MIT" ]
null
null
null
taggable/taggable_sequence.py
ville-k/taggable
d37ecdfba5bc09277f19ea51344ad2ea3ae100f2
[ "MIT" ]
null
null
null
class TaggedSegment(object): def __init__(self, start, end, name, tag): self.start_ = start self.end_ = end self.name_ = name self.tag_ = tag @property def start(self): """Starting offset of the segment""" return self.start_ @property def end(self): ...
25.433735
81
0.57603
class TaggedSegment(object): def __init__(self, start, end, name, tag): self.start_ = start self.end_ = end self.name_ = name self.tag_ = tag @property def start(self): return self.start_ @property def end(self): return self.end_ @property d...
true
true
1c28f1f90fb7d591507053a23011b216f8251c87
2,721
py
Python
scripts/BRC_microarray/USA/rank_clusters_without_GCN_and_local_modules.py
omarmaddouri/GCNCC_cross_validated
89576ad2c8459f065604656fd38a786d042f09e0
[ "MIT" ]
1
2022-03-12T13:34:34.000Z
2022-03-12T13:34:34.000Z
scripts/BRC_microarray/USA/rank_clusters_without_GCN_and_local_modules.py
omarmaddouri/GCNCC_cross_validated
89576ad2c8459f065604656fd38a786d042f09e0
[ "MIT" ]
3
2022-02-09T23:28:07.000Z
2022-02-11T19:08:53.000Z
scripts/BRC_microarray/USA/rank_clusters_without_GCN_and_local_modules.py
omarmaddouri/GCNCC_cross_validated
89576ad2c8459f065604656fd38a786d042f09e0
[ "MIT" ]
null
null
null
import sys from os.path import dirname, abspath sys.path.append(dirname(dirname(abspath(__file__)))) from BRC_microarray.USA.utils import * path="../../data/BRC_microarray/output/USA/" dataset="PPI" features = np.genfromtxt("{}{}.GE_Features.txt".format(path, dataset), dtype=np.dtype(np.float32)) labels = get_clinica...
42.515625
129
0.702683
import sys from os.path import dirname, abspath sys.path.append(dirname(dirname(abspath(__file__)))) from BRC_microarray.USA.utils import * path="../../data/BRC_microarray/output/USA/" dataset="PPI" features = np.genfromtxt("{}{}.GE_Features.txt".format(path, dataset), dtype=np.dtype(np.float32)) labels = get_clinica...
true
true
1c28f21017e2b15693be28d6fa6d86f690eacde0
9,107
py
Python
modoboa/core/api/v2/serializers.py
suryatmodulus/modoboa
f8164a9bbe1e5bfa7f1a1f8813a3790ebf3397ee
[ "ISC" ]
null
null
null
modoboa/core/api/v2/serializers.py
suryatmodulus/modoboa
f8164a9bbe1e5bfa7f1a1f8813a3790ebf3397ee
[ "ISC" ]
2
2022-03-02T10:35:51.000Z
2022-03-07T10:32:48.000Z
modoboa/core/api/v2/serializers.py
jammo-nl/modoboa
ccf926c1c5e079420f4bd6fe037f83782f842af5
[ "ISC" ]
null
null
null
"""Core API v2 serializers.""" from django.utils import formats from django.utils.translation import ugettext_lazy, ugettext as _ from django.contrib.auth import password_validation import django_otp from rest_framework import serializers from modoboa.lib import fields as lib_fields from ... import constants from ...
38.753191
80
0.681344
from django.utils import formats from django.utils.translation import ugettext_lazy, ugettext as _ from django.contrib.auth import password_validation import django_otp from rest_framework import serializers from modoboa.lib import fields as lib_fields from ... import constants from ... import models from ... impo...
true
true
1c28f23cd57f67e8bd5a73d261ce5f8aa234a8b4
7,891
py
Python
napari_plot/_qt/layer_controls/qt_region_controls.py
lukasz-migas/napari-1d
b0f081a8711ae941b3e4b5c58c3aea56bd0e3277
[ "BSD-3-Clause" ]
13
2021-08-27T23:01:09.000Z
2022-03-22T13:51:35.000Z
napari_plot/_qt/layer_controls/qt_region_controls.py
lukasz-migas/napari-1d
b0f081a8711ae941b3e4b5c58c3aea56bd0e3277
[ "BSD-3-Clause" ]
71
2021-08-28T13:29:17.000Z
2022-03-28T21:22:12.000Z
napari_plot/_qt/layer_controls/qt_region_controls.py
lukasz-migas/napari-1d
b0f081a8711ae941b3e4b5c58c3aea56bd0e3277
[ "BSD-3-Clause" ]
null
null
null
"""Scatter layer controls""" import typing as ty import numpy as np from napari._qt.utils import disable_with_opacity, qt_signals_blocked from napari._qt.widgets.qt_color_swatch import QColorSwatchEdit from qtpy.QtCore import Slot from qtpy.QtWidgets import QButtonGroup, QHBoxLayout from ...layers.region._region_cons...
38.871921
109
0.659105
import typing as ty import numpy as np from napari._qt.utils import disable_with_opacity, qt_signals_blocked from napari._qt.widgets.qt_color_swatch import QColorSwatchEdit from qtpy.QtCore import Slot from qtpy.QtWidgets import QButtonGroup, QHBoxLayout from ...layers.region._region_constants import Mode from .. imp...
true
true
1c28f2b7a5432dbab583604b0585d43515564b43
5,726
py
Python
selfdrive/controls/lib/longitudinal_planner.py
doudoune144/openpilot
25fbad410d51e48d9189d5b3ef8a05a6e75f037c
[ "MIT" ]
null
null
null
selfdrive/controls/lib/longitudinal_planner.py
doudoune144/openpilot
25fbad410d51e48d9189d5b3ef8a05a6e75f037c
[ "MIT" ]
null
null
null
selfdrive/controls/lib/longitudinal_planner.py
doudoune144/openpilot
25fbad410d51e48d9189d5b3ef8a05a6e75f037c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import math import numpy as np from common.numpy_fast import interp import cereal.messaging as messaging from common.conversions import Conversions as CV from common.filter_simple import FirstOrderFilter from common.realtime import DT_MDL from selfdrive.modeld.constants import T_IDXS from selfdr...
39.763889
108
0.748865
import math import numpy as np from common.numpy_fast import interp import cereal.messaging as messaging from common.conversions import Conversions as CV from common.filter_simple import FirstOrderFilter from common.realtime import DT_MDL from selfdrive.modeld.constants import T_IDXS from selfdrive.controls.lib.longc...
true
true
1c28f2c1718bce4d19f1797cb71c8799354a58c9
984
py
Python
aiotdlib/api/functions/get_chat_available_message_senders.py
mostafa-arshadi/aiotdlib
59f430a65dfb424fc69d471a0d7bcd77ad7acf08
[ "MIT" ]
37
2021-05-04T10:41:41.000Z
2022-03-30T13:48:05.000Z
aiotdlib/api/functions/get_chat_available_message_senders.py
mostafa-arshadi/aiotdlib
59f430a65dfb424fc69d471a0d7bcd77ad7acf08
[ "MIT" ]
13
2021-07-17T19:54:51.000Z
2022-02-26T06:50:00.000Z
aiotdlib/api/functions/get_chat_available_message_senders.py
mostafa-arshadi/aiotdlib
59f430a65dfb424fc69d471a0d7bcd77ad7acf08
[ "MIT" ]
7
2021-09-22T21:27:11.000Z
2022-02-20T02:33:19.000Z
# =============================================================================== # # # # This file has been generated automatically!! Do not change this manually! # # ...
35.142857
92
0.473577
from __future__ import annotations from pydantic import Field from ..base_object import BaseObject class GetChatAvailableMessageSenders(BaseObject): ID: str = Field("getChatAvailableMessageSenders", alias="@type") chat_id: int @staticmethod def read(q: dict) -> GetChatAvailableMessageSenders: ...
true
true
1c28f3271abd22a7178ea74187915a2c5b4ee1d3
1,647
py
Python
lib/plot.py
Hser2bio/ViLight
e8c4179d13178fe61796e8f9ae264e697d599664
[ "MIT" ]
1
2021-06-08T20:06:34.000Z
2021-06-08T20:06:34.000Z
lib/plot.py
Hser2bio/ViLight
e8c4179d13178fe61796e8f9ae264e697d599664
[ "MIT" ]
6
2019-12-01T23:58:20.000Z
2020-07-24T17:30:10.000Z
lib/plot.py
Hser2bio/ViLight
e8c4179d13178fe61796e8f9ae264e697d599664
[ "MIT" ]
3
2020-01-09T08:17:25.000Z
2020-09-15T01:04:41.000Z
from PyQt5.QtGui import * from .i18n import _ import datetime from collections import defaultdict from .bitcoin import COIN import matplotlib matplotlib.use('Qt5Agg') import matplotlib.pyplot as plt import matplotlib.dates as md from matplotlib.patches import Ellipse from matplotlib.offsetbox import AnchoredOffsetbo...
31.075472
82
0.66606
from PyQt5.QtGui import * from .i18n import _ import datetime from collections import defaultdict from .bitcoin import COIN import matplotlib matplotlib.use('Qt5Agg') import matplotlib.pyplot as plt import matplotlib.dates as md from matplotlib.patches import Ellipse from matplotlib.offsetbox import AnchoredOffsetbo...
true
true
1c28f38d3a34816eab8dfd50f1ea367d5494f2ae
54
py
Python
armory/baseline_models/__init__.py
KyleBittner/armory
7e403d6aa9f8f60f34365de06cd990697a1c5b1c
[ "MIT" ]
93
2020-02-11T23:10:15.000Z
2022-03-29T23:28:24.000Z
armory/baseline_models/__init__.py
KyleBittner/armory
7e403d6aa9f8f60f34365de06cd990697a1c5b1c
[ "MIT" ]
834
2020-02-10T15:43:39.000Z
2022-03-31T17:57:41.000Z
armory/baseline_models/__init__.py
KyleBittner/armory
7e403d6aa9f8f60f34365de06cd990697a1c5b1c
[ "MIT" ]
57
2020-02-10T15:20:15.000Z
2022-03-18T04:32:21.000Z
""" Baseline models for use in the ARMORY system. """
13.5
45
0.685185
true
true
1c28f579c8a79bff36a33c83259ab8c21f7a25d8
672
py
Python
orm/__init__.py
theikkila/lopputili
25842e54a272f12ae6bdafeb98c676da396cddf2
[ "MIT" ]
null
null
null
orm/__init__.py
theikkila/lopputili
25842e54a272f12ae6bdafeb98c676da396cddf2
[ "MIT" ]
null
null
null
orm/__init__.py
theikkila/lopputili
25842e54a272f12ae6bdafeb98c676da396cddf2
[ "MIT" ]
null
null
null
import os from . import query from . import sql from sqlite3 import OperationalError from psycopg2 import ProgrammingError Database = sql.Database Query = query.Query class ORM: def __init__(self, dburi="sqlite://local.db"): self.models = [] self.nmodels = {} self.dburi = dburi self.db = Database(self.dbu...
19.764706
47
0.723214
import os from . import query from . import sql from sqlite3 import OperationalError from psycopg2 import ProgrammingError Database = sql.Database Query = query.Query class ORM: def __init__(self, dburi="sqlite://local.db"): self.models = [] self.nmodels = {} self.dburi = dburi self.db = Database(self.dbu...
true
true
1c28f606b3b20c8e8e1e291414b44c3095855346
561
py
Python
kwat/significance/get_p_value_and_q_value.py
KwatME/ccal
d96dfa811482eee067f346386a2181ec514625f4
[ "MIT" ]
5
2017-05-05T17:50:28.000Z
2019-01-30T19:23:02.000Z
kwat/significance/get_p_value_and_q_value.py
KwatME/ccal
d96dfa811482eee067f346386a2181ec514625f4
[ "MIT" ]
5
2017-05-05T01:52:31.000Z
2019-04-20T21:06:05.000Z
kwat/significance/get_p_value_and_q_value.py
KwatME/ccal
d96dfa811482eee067f346386a2181ec514625f4
[ "MIT" ]
5
2017-07-17T18:55:54.000Z
2019-02-02T04:46:19.000Z
from numpy import array, where from .get_p_value import get_p_value from .get_q_value import get_q_value def get_p_value_and_q_value(ve, ra_, di): if "<" in di: pl_ = array([get_p_value(nu, ra_, "<") for nu in ve]) ql_ = get_q_value(pl_) if ">" in di: pr_ = array([get_p_value(nu,...
17.53125
69
0.559715
from numpy import array, where from .get_p_value import get_p_value from .get_q_value import get_q_value def get_p_value_and_q_value(ve, ra_, di): if "<" in di: pl_ = array([get_p_value(nu, ra_, "<") for nu in ve]) ql_ = get_q_value(pl_) if ">" in di: pr_ = array([get_p_value(nu,...
true
true
1c28f6b12f7f6b5d94a6b3d3d64dd6f940a06ceb
614
py
Python
loesungen/chapter06/image_scaler.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
2
2021-09-20T06:16:41.000Z
2022-01-17T14:24:43.000Z
loesungen/chapter06/image_scaler.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
null
null
null
loesungen/chapter06/image_scaler.py
SaschaKersken/Daten-Prozessanalyse
370f07a75b9465329deb3671adbfbef8483f76f6
[ "Apache-2.0" ]
null
null
null
import matplotlib.pyplot as plt from skimage.io import imread, imshow from skimage.transform import resize from sys import argv, exit if len(argv) < 3: print(f"Verwendung: python3 {argv[0]} BILDDATEI PIXEL") exit() image = imread(argv[1], as_gray = True) height, width = image.shape if height > width: star...
27.909091
59
0.687296
import matplotlib.pyplot as plt from skimage.io import imread, imshow from skimage.transform import resize from sys import argv, exit if len(argv) < 3: print(f"Verwendung: python3 {argv[0]} BILDDATEI PIXEL") exit() image = imread(argv[1], as_gray = True) height, width = image.shape if height > width: star...
true
true
1c28f6b71ed7ee5ebae276d9dc9864a0698ab643
9,393
py
Python
sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_schema_registry_client.py
adriananeci/azure-sdk-for-python
b2bdfe659210998d6d479e73b133b6c51eb2c009
[ "MIT" ]
1
2021-09-16T02:33:52.000Z
2021-09-16T02:33:52.000Z
sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_schema_registry_client.py
adriananeci/azure-sdk-for-python
b2bdfe659210998d6d479e73b133b6c51eb2c009
[ "MIT" ]
null
null
null
sdk/schemaregistry/azure-schemaregistry/azure/schemaregistry/_schema_registry_client.py
adriananeci/azure-sdk-for-python
b2bdfe659210998d6d479e73b133b6c51eb2c009
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------- # # Copyright (c) Microsoft Corporation. All rights reserved. # # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the ""Software""), ...
40.141026
111
0.650271
from typing import Any, TYPE_CHECKING, Union from ._common._constants import SerializationType from ._common._schema import Schema, SchemaProperties from ._common._response_handlers import ( _parse_response_schema, _parse_response_schema_properties, ) from ._generated._azure_schema_reg...
true
true
1c28f7120b6e6991f5d52c1a4d628b87c7601372
1,081
py
Python
frontends/pytorch/test/ivalue_import/list.py
raikonenfnu/mlir-npcomp
29e1b2fe89848d58c9bc07e7df7ce651850a5244
[ "Apache-2.0" ]
null
null
null
frontends/pytorch/test/ivalue_import/list.py
raikonenfnu/mlir-npcomp
29e1b2fe89848d58c9bc07e7df7ce651850a5244
[ "Apache-2.0" ]
null
null
null
frontends/pytorch/test/ivalue_import/list.py
raikonenfnu/mlir-npcomp
29e1b2fe89848d58c9bc07e7df7ce651850a5244
[ "Apache-2.0" ]
null
null
null
# -*- Python -*- # This file is licensed under a pytorch-style license # See frontends/pytorch/LICENSE for license information. import typing import torch import torch_mlir # RUN: %PYTHON %s | npcomp-opt | FileCheck %s mb = torch_mlir.ModuleBuilder() class TestModule(torch.nn.Module): def __init__(self): ...
31.794118
119
0.680851
import typing import torch import torch_mlir mb = torch_mlir.ModuleBuilder() class TestModule(torch.nn.Module): def __init__(self): super().__init__() self.l = [1, 2] test_module = TestModule() recursivescriptmodule = torch.jit.script(test_module) mb.import_module(recursivescrip...
true
true
1c28f72ac2d29f808b698a9ec04a65bc825beeb4
19,595
py
Python
vm_manager/vm_manager.py
dupremathieu/vm_manager
7301675e57e376617669d80e6994cf855e5054da
[ "Apache-2.0" ]
null
null
null
vm_manager/vm_manager.py
dupremathieu/vm_manager
7301675e57e376617669d80e6994cf855e5054da
[ "Apache-2.0" ]
null
null
null
vm_manager/vm_manager.py
dupremathieu/vm_manager
7301675e57e376617669d80e6994cf855e5054da
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2021, RTE (http://www.rte-france.com) # SPDX-License-Identifier: Apache-2.0 import os import logging import uuid import re import datetime from errno import ENOENT import xml.etree.ElementTree as ET from vm_manager.helpers.rbd_manager import RbdManager from vm_manager.helpers.pacemaker import Pacemake...
30.521807
78
0.604083
import os import logging import uuid import re import datetime from errno import ENOENT import xml.etree.ElementTree as ET from vm_manager.helpers.rbd_manager import RbdManager from vm_manager.helpers.pacemaker import Pacemaker from vm_manager.helpers.libvirt import LibVirtManager XML_PACEMAKER_PATH = "/etc/pacema...
true
true
1c28f77129fd6a7fe81e559198a0b7b7b48720e7
11,092
py
Python
tensorkit/distributions/categorical.py
lizeyan/tensorkit
2997a5914ec3c3ec72f91eb5906b5ee878fdc020
[ "MIT" ]
null
null
null
tensorkit/distributions/categorical.py
lizeyan/tensorkit
2997a5914ec3c3ec72f91eb5906b5ee878fdc020
[ "MIT" ]
null
null
null
tensorkit/distributions/categorical.py
lizeyan/tensorkit
2997a5914ec3c3ec72f91eb5906b5ee878fdc020
[ "MIT" ]
null
null
null
from typing import * from .. import tensor as T from ..stochastic import StochasticTensor from ..typing_ import * from .base import Distribution from .utils import copy_distribution, check_tensor_arg_types __all__ = ['BaseCategorical', 'Categorical', 'OneHotCategorical'] class BaseCategorical(Distribution): co...
37.6
84
0.577804
from typing import * from .. import tensor as T from ..stochastic import StochasticTensor from ..typing_ import * from .base import Distribution from .utils import copy_distribution, check_tensor_arg_types __all__ = ['BaseCategorical', 'Categorical', 'OneHotCategorical'] class BaseCategorical(Distribution): co...
true
true
1c28f88e50934dd0d15e6e82a50230d807d87ab6
28
py
Python
src/type_conflict.py
sverres/pana
ca78d319e6eef5aabd319bf5f7f6120d6e95ebe4
[ "MIT" ]
null
null
null
src/type_conflict.py
sverres/pana
ca78d319e6eef5aabd319bf5f7f6120d6e95ebe4
[ "MIT" ]
null
null
null
src/type_conflict.py
sverres/pana
ca78d319e6eef5aabd319bf5f7f6120d6e95ebe4
[ "MIT" ]
null
null
null
a = 1 b = 'B' print(a + b)
5.6
12
0.392857
a = 1 b = 'B' print(a + b)
true
true
1c28f8d8ab478d8a76cea7d142018e1718c54829
12,410
py
Python
docs/conf.py
LaudateCorpus1/python-analytics-admin
2ec0a0b648edcfb3b76bf847a4463cbb551e1997
[ "Apache-2.0" ]
10
2020-09-19T18:31:20.000Z
2022-03-07T22:45:53.000Z
docs/conf.py
LaudateCorpus1/python-analytics-admin
2ec0a0b648edcfb3b76bf847a4463cbb551e1997
[ "Apache-2.0" ]
63
2020-07-21T12:17:34.000Z
2022-03-07T17:30:51.000Z
docs/conf.py
LaudateCorpus1/python-analytics-admin
2ec0a0b648edcfb3b76bf847a4463cbb551e1997
[ "Apache-2.0" ]
6
2020-07-20T18:10:41.000Z
2022-03-24T20:23:44.000Z
# -*- coding: utf-8 -*- # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agr...
32.486911
88
0.705157
import sys import os import shlex sys.path.insert(0, os.path.abspath("..")) sys.path.insert(0, os.path.abspath(".")) __version__ = "" needs_sphinx = "1.5.5" extensions = [ "sphinx.ext.autodoc", "sphinx.ext.autosummary", "sphinx.ext.intersphinx", "sphinx.ext.cove...
true
true
1c28f910bcc8fda0dacc431ef45914f6b87443d5
8,501
py
Python
heat/tests/test_dependencies.py
NeCTAR-RC/heat
b152817f192a7b46514793633ddc968c1fe1ebf8
[ "Apache-2.0" ]
1
2015-02-26T03:23:23.000Z
2015-02-26T03:23:23.000Z
heat/tests/test_dependencies.py
NeCTAR-RC/heat
b152817f192a7b46514793633ddc968c1fe1ebf8
[ "Apache-2.0" ]
null
null
null
heat/tests/test_dependencies.py
NeCTAR-RC/heat
b152817f192a7b46514793633ddc968c1fe1ebf8
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
38.292793
79
0.493707
import testtools from heat.engine.dependencies import CircularDependencyException from heat.engine.dependencies import Dependencies class dependenciesTest(testtools.TestCase): def _dep_test(self, func, checkorder, deps): nodes = set.union(*[set(e) for e in deps]) d = Dependencies(...
true
true
1c28f9575d62cfd39da895618df13afe159a2850
1,973
py
Python
appscale/cloud_storage/config.py
AppScale/appscale-cloud-storage
2d19cf5555f8f38a66f8bb6b7ba2532a9f262ec4
[ "Apache-2.0" ]
6
2016-09-23T17:56:53.000Z
2022-02-02T08:33:08.000Z
appscale/cloud_storage/config.py
AppScale/appscale-cloud-storage
2d19cf5555f8f38a66f8bb6b7ba2532a9f262ec4
[ "Apache-2.0" ]
2
2019-08-16T15:43:38.000Z
2019-09-23T16:38:25.000Z
appscale/cloud_storage/config.py
AppScale/appscale-cloud-storage
2d19cf5555f8f38a66f8bb6b7ba2532a9f262ec4
[ "Apache-2.0" ]
6
2016-09-23T17:56:58.000Z
2021-06-08T09:44:12.000Z
import string # The number of characters in an access token. ACCESS_TOKEN_LENGTH = 77 # A reserved Riak KV bucket used for storing bucket metadata. METADATA_BUCKET = 'appscale-cloud-storage-bucket-metadata' # A reserved Riak KV bucket used for storing authentication tokens. TOKEN_BUCKET = 'appscale-cloud-storage-aut...
34.017241
78
0.776989
import string ACCESS_TOKEN_LENGTH = 77 METADATA_BUCKET = 'appscale-cloud-storage-bucket-metadata' TOKEN_BUCKET = 'appscale-cloud-storage-auth-tokens' UPLOAD_SESSION_BUCKET = 'appscale-cloud-storage-upload-ids' OBJECT_METADATA_BUCKET = 'appscale-cloud-storage-object-metadata' RIAK_KV_HOST = 'localhost' RIA...
true
true
1c28f9d2b182e60b509032c0af4c9618f66d15c5
3,262
py
Python
code/mean_var_bt.py
Rockysed/PSC_classification
1815b673ac9374d9d2abd08ba0f1f43597316dee
[ "MIT" ]
null
null
null
code/mean_var_bt.py
Rockysed/PSC_classification
1815b673ac9374d9d2abd08ba0f1f43597316dee
[ "MIT" ]
null
null
null
code/mean_var_bt.py
Rockysed/PSC_classification
1815b673ac9374d9d2abd08ba0f1f43597316dee
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Mon Feb 25 14:52:43 2019 @author: rocco """ import pandas as pd import h5py import numpy as np import os import matplotlib.pyplot as plt #load cdsdb new_file = h5py.File("../data/csdb_bt/csdb_bt.h5", "r") bt_csdb = new_file["bt"][:] new_file.close() #compute mean a...
31.365385
71
0.69252
import pandas as pd import h5py import numpy as np import os import matplotlib.pyplot as plt new_file = h5py.File("../data/csdb_bt/csdb_bt.h5", "r") bt_csdb = new_file["bt"][:] new_file.close() df_bt_csdb = pd.DataFrame(bt_csdb) mean_bt_csdb = df_bt_csdb.mean() var_bt_csdb = df_bt_csdb.var() directory =...
true
true
1c28f9dd3e0b345ab6529d91432a9f227c3fdb58
182
py
Python
sfswitch/__init__.py
dcs-dev/sfswitch
b45c6e34d23cb735327d591363e5f321e2f023da
[ "Unlicense" ]
null
null
null
sfswitch/__init__.py
dcs-dev/sfswitch
b45c6e34d23cb735327d591363e5f321e2f023da
[ "Unlicense" ]
null
null
null
sfswitch/__init__.py
dcs-dev/sfswitch
b45c6e34d23cb735327d591363e5f321e2f023da
[ "Unlicense" ]
null
null
null
# This will make sure the app is always imported when # Django starts so that shared_task will use this app. from celeryapp.celery import app as celery_app __all__ = ('celery_app',)
36.4
54
0.78022
from celeryapp.celery import app as celery_app __all__ = ('celery_app',)
true
true
1c28f9f41b08022e6fe5a03c3fc4cc7ffc287aac
2,388
py
Python
asyncspinner/__init__.py
Hegdahl/asyncspinner
d844494d6d38fdc8be5ed5da2bb007fdf47aa900
[ "MIT" ]
null
null
null
asyncspinner/__init__.py
Hegdahl/asyncspinner
d844494d6d38fdc8be5ed5da2bb007fdf47aa900
[ "MIT" ]
null
null
null
asyncspinner/__init__.py
Hegdahl/asyncspinner
d844494d6d38fdc8be5ed5da2bb007fdf47aa900
[ "MIT" ]
null
null
null
''' Little graphic to show user that something is waited for when a progress bar is overkill, or the progress is unknown. ''' import sys import asyncio import colorama import cursor colorama.init() from . import styles _DOTS = (' ', '. ', '.. ', '...') def _on_line_below(s): return f'\n{colorama.ansi.clear_li...
29.85
101
0.587521
import sys import asyncio import colorama import cursor colorama.init() from . import styles _DOTS = (' ', '. ', '.. ', '...') def _on_line_below(s): return f'\n{colorama.ansi.clear_line()}{s}{colorama.Cursor.UP(1)}\r\033[K' class Spinner: def __init__(self, message='', *, style=styles....
true
true
1c28fa966a0112b973099a4ea56afde9dceedc96
734
py
Python
teacher2.py
PRASAD-DANGARE/PYTHON
36214f7dc3762d327e5a29e40752edeb098249c8
[ "MIT" ]
1
2021-06-07T07:55:28.000Z
2021-06-07T07:55:28.000Z
teacher2.py
PRASAD-DANGARE/PYTHON
36214f7dc3762d327e5a29e40752edeb098249c8
[ "MIT" ]
null
null
null
teacher2.py
PRASAD-DANGARE/PYTHON
36214f7dc3762d327e5a29e40752edeb098249c8
[ "MIT" ]
null
null
null
# Python Program To Use The Teacher Class ''' Function Name : Using Teacher Class teacher.py In This Program teacher2.py Function Date : 18 Sep 2020 Function Author : Prasad Dangare Input : String Output : String ''' # Save This Code As teacher2.py # Using Teacher Class ...
21.588235
81
0.644414
from teacher import Teacher t = Teacher() t.setid(10) t.setname('Prasad') t.setaddress('Sanjuda Complex, 412308, Papadewasti, Pune ') t.setsalary(25000.50) print('\n Id = ', t.getid()) print('Name = ', t.getname()) print('Address = ', t.getaddress()) print('Salary = ', t.getsalary()) ...
true
true
1c28fb8376fed9b3f3efc0bf3824fa3864f6b27f
9,748
py
Python
listener.py
austinmroczek/pauser
4e81808be98d3495ad93c3270a8a43584b62b8cd
[ "MIT" ]
1
2019-06-30T08:33:34.000Z
2019-06-30T08:33:34.000Z
listener.py
austinmroczek/pauser
4e81808be98d3495ad93c3270a8a43584b62b8cd
[ "MIT" ]
null
null
null
listener.py
austinmroczek/pauser
4e81808be98d3495ad93c3270a8a43584b62b8cd
[ "MIT" ]
null
null
null
#import unicodedata class Listener: def __init__(self): import log self.myLog = log.Log('listener.log') # files and paths self.fileName = 'rectest.wav' # default file name import os if not os.path.isfile(self.fileName): file = open(self.fileName,'w') ...
36.784906
181
0.580529
class Listener: def __init__(self): import log self.myLog = log.Log('listener.log') self.fileName = 'rectest.wav' import os if not os.path.isfile(self.fileName): file = open(self.fileName,'w') file.write("") file.close() ...
true
true
1c28fc5e414bdd051ab3641712066443f6c9001c
518
py
Python
woodstock/content/event/models.py
allink/woodstock
afafecb7c4454f96e51c051044ed8ed74853c048
[ "BSD-3-Clause" ]
null
null
null
woodstock/content/event/models.py
allink/woodstock
afafecb7c4454f96e51c051044ed8ed74853c048
[ "BSD-3-Clause" ]
null
null
null
woodstock/content/event/models.py
allink/woodstock
afafecb7c4454f96e51c051044ed8ed74853c048
[ "BSD-3-Clause" ]
null
null
null
from django.db import models from django.template.loader import render_to_string from woodstock.models import Event class NextEventsContent(models.Model): count = models.IntegerField(default=5) class Meta: abstract = True verbose_name = 'Next Events Content' verbose_name_plural = 'Ne...
28.777778
89
0.714286
from django.db import models from django.template.loader import render_to_string from woodstock.models import Event class NextEventsContent(models.Model): count = models.IntegerField(default=5) class Meta: abstract = True verbose_name = 'Next Events Content' verbose_name_plural = 'Ne...
true
true
1c28fd93f5ad7ee5c0adc0decb7bd4d610de54d7
15,866
py
Python
checker.py
jingliu9/uu-checker
62ce0dc88b5e6ace72287ace3f64f80027f7fef1
[ "MIT" ]
null
null
null
checker.py
jingliu9/uu-checker
62ce0dc88b5e6ace72287ace3f64f80027f7fef1
[ "MIT" ]
null
null
null
checker.py
jingliu9/uu-checker
62ce0dc88b5e6ace72287ace3f64f80027f7fef1
[ "MIT" ]
1
2021-11-20T23:30:23.000Z
2021-11-20T23:30:23.000Z
#! /usr/bin/env python3 import logging import os import argparse import sys import subprocess import re import random import json from pathlib import Path import gscholar import time import bibtex_dblp.dblp_api as dblp_api import colorama colorama.init(autoreset=True) YELLOW = "\x1b[1;33;40m" class TexSourecFile(...
39.078818
110
0.511975
import logging import os import argparse import sys import subprocess import re import random import json from pathlib import Path import gscholar import time import bibtex_dblp.dblp_api as dblp_api import colorama colorama.init(autoreset=True) YELLOW = "\x1b[1;33;40m" class TexSourecFile(object): def __ini...
true
true
1c28fda1d1ed12399e7e449a8fff5b6e5e8d9835
22,209
py
Python
StreamPy/StreamPy-UI/src/root/nested/temp/deprecated.py
AnomalyInc/StreamPy
94abca276b2857de48259f4f42ef95efbdf5f6d1
[ "Apache-2.0" ]
2
2017-04-27T11:04:27.000Z
2019-02-07T21:03:32.000Z
StreamPy/StreamPy-UI/src/root/nested/temp/deprecated.py
StreamPy/StreamPy
94abca276b2857de48259f4f42ef95efbdf5f6d1
[ "Apache-2.0" ]
null
null
null
StreamPy/StreamPy-UI/src/root/nested/temp/deprecated.py
StreamPy/StreamPy
94abca276b2857de48259f4f42ef95efbdf5f6d1
[ "Apache-2.0" ]
null
null
null
# from example.py ''' rename_stream() replaces a component name with the random id with an integer (1, 2, 3,...) if there are multiple instances. Parameters ---------- instance_dict : dict Component names with random id's paired with dict of it's 'in' and 'out' ports Returns ------- comp_list : dict Plai...
36.830846
141
0.576298
''' rename_stream() replaces a component name with the random id with an integer (1, 2, 3,...) if there are multiple instances. Parameters ---------- instance_dict : dict Component names with random id's paired with dict of it's 'in' and 'out' ports Returns ------- comp_list : dict Plain component name ...
false
true
1c28fda9bf26d20d2dda4d5cbe9f293271e72b9d
8,000
py
Python
risk_managed/migrations/0001_initial.py
jteppinette/risk-managed
e559575e6104baade42b31cbbfcbe5d4ce64bceb
[ "BSD-2-Clause" ]
2
2019-02-13T07:50:23.000Z
2022-02-08T08:32:26.000Z
risk_managed/migrations/0001_initial.py
jteppinette/risk-managed
e559575e6104baade42b31cbbfcbe5d4ce64bceb
[ "BSD-2-Clause" ]
9
2020-02-11T23:39:02.000Z
2021-06-10T17:43:24.000Z
risk_managed/migrations/0001_initial.py
jteppinette/risk-managed
e559575e6104baade42b31cbbfcbe5d4ce64bceb
[ "BSD-2-Clause" ]
null
null
null
# Generated by Django 2.2.4 on 2019-08-15 00:27 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] ope...
64.516129
580
0.589875
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( ...
true
true
1c28fdaacd58f64d415f69df0dee93838147489f
1,639
py
Python
tests/experiments/test_targeted_perf.py
suifengzhuliu/impala
611f4c6f3b18cfcddff3b2956cbb87c295a87655
[ "Apache-2.0" ]
1,523
2015-01-01T03:42:24.000Z
2022-02-06T22:24:04.000Z
tests/experiments/test_targeted_perf.py
suifengzhuliu/impala
611f4c6f3b18cfcddff3b2956cbb87c295a87655
[ "Apache-2.0" ]
10
2015-01-09T06:46:05.000Z
2022-03-29T21:57:57.000Z
tests/experiments/test_targeted_perf.py
suifengzhuliu/impala
611f4c6f3b18cfcddff3b2956cbb87c295a87655
[ "Apache-2.0" ]
647
2015-01-02T04:01:40.000Z
2022-03-30T15:57:35.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...
37.25
72
0.765101
from tests.common.impala_test_suite import ImpalaTestSuite class TestTargetedPerf(ImpalaTestSuite): @classmethod def get_workload(cls): return 'targeted-perf' @classmethod def add_test_dimensions(cls): super(TestTargetedPerf, cls).add_test_dimensions() cls.ImpalaTestMatrix.ad...
true
true
1c28fdd360633b1e25956178a65d622003ee2382
2,166
py
Python
calls/create_call_feedback_post_dial_delay.py
mickstevens/python3-twilio-sdkv6-examples
aac0403533b35fec4e8483de18d8fde2d783cfb2
[ "MIT" ]
1
2018-11-23T20:11:27.000Z
2018-11-23T20:11:27.000Z
calls/create_call_feedback_post_dial_delay.py
mickstevens/python3-twilio-sdkv6-examples
aac0403533b35fec4e8483de18d8fde2d783cfb2
[ "MIT" ]
null
null
null
calls/create_call_feedback_post_dial_delay.py
mickstevens/python3-twilio-sdkv6-examples
aac0403533b35fec4e8483de18d8fde2d783cfb2
[ "MIT" ]
null
null
null
# *** Create Call Feedback for Post Dial Delay *** # Code based on https://www.twilio.com/docs/voice/api/call-quality-feedback # Download Python 3 from https://www.python.org/downloads/ # Download the Twilio helper library from https://www.twilio.com/docs/python/install import os from twilio.rest import Client # from d...
45.125
109
0.702216
import os from twilio.rest import Client import logging logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(levelname)s %(message)s', filename='/usr/local/twilio/python3/sdkv6x/calls/logs/call_feedback.log', filemode='a') account_sid = os.en...
true
true
1c28fdf66d484992013b24d958cd3a9a32e5086d
10,276
py
Python
code/examples/scripts/21_ML_glacier_wise_weekly_jjas.py
hydrogo/FIT_ML
4c3f4abd707baf9eb83e061f84d183630264c96b
[ "MIT" ]
null
null
null
code/examples/scripts/21_ML_glacier_wise_weekly_jjas.py
hydrogo/FIT_ML
4c3f4abd707baf9eb83e061f84d183630264c96b
[ "MIT" ]
null
null
null
code/examples/scripts/21_ML_glacier_wise_weekly_jjas.py
hydrogo/FIT_ML
4c3f4abd707baf9eb83e061f84d183630264c96b
[ "MIT" ]
1
2020-09-01T14:52:42.000Z
2020-09-01T14:52:42.000Z
import numpy as np import pandas as pd from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import LeaveOneOut from sklearn.metrics import r2_score import pickle glacier_ids = np.load("../results/misc/glacier_ids_valid.npy") tsl_path = "../results/tsl_csv/" meteo_path = "../data/FIT_for...
31.618462
126
0.595854
import numpy as np import pandas as pd from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import LeaveOneOut from sklearn.metrics import r2_score import pickle glacier_ids = np.load("../results/misc/glacier_ids_valid.npy") tsl_path = "../results/tsl_csv/" meteo_path = "../data/FIT_for...
true
true
1c28ff6a7eb1ffc8e336db7b17181bc68ca6378f
742
py
Python
python3/tests/test_valid_number.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
4
2018-03-05T02:27:16.000Z
2021-03-15T14:19:44.000Z
python3/tests/test_valid_number.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
null
null
null
python3/tests/test_valid_number.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
2
2018-07-22T10:32:10.000Z
2018-10-20T03:14:28.000Z
from unittest import TestCase from leetcodepy.valid_number import * solution1 = Solution1() solution2 = Solution2() s1 = "0" s2 = " 0.1 " s3 = "abc" s4 = "1 a" s5 = "2e10" class TestValidNumber(TestCase): def test1(self): self.assertTrue(solution1.isNumber(s1)) self.assertTrue(solution1.is...
21.823529
48
0.67655
from unittest import TestCase from leetcodepy.valid_number import * solution1 = Solution1() solution2 = Solution2() s1 = "0" s2 = " 0.1 " s3 = "abc" s4 = "1 a" s5 = "2e10" class TestValidNumber(TestCase): def test1(self): self.assertTrue(solution1.isNumber(s1)) self.assertTrue(solution1.is...
true
true
1c28ff6f07fec8d29705c20fde8e9ec0f90428ac
560
py
Python
env/Lib/site-packages/plotly/validators/scattersmith/marker/colorbar/_showticksuffix.py
andresgreen-byte/Laboratorio-1--Inversion-de-Capital
8a4707301d19c3826c31026c4077930bcd6a8182
[ "MIT" ]
7
2022-01-16T12:28:16.000Z
2022-03-04T15:31:45.000Z
packages/python/plotly/plotly/validators/scattersmith/marker/colorbar/_showticksuffix.py
jiangrongbo/plotly.py
df19fc702b309586cc24e25373b87e8bdbb3ff60
[ "MIT" ]
14
2021-10-20T23:33:47.000Z
2021-12-21T04:50:37.000Z
packages/python/plotly/plotly/validators/scattersmith/marker/colorbar/_showticksuffix.py
jiangrongbo/plotly.py
df19fc702b309586cc24e25373b87e8bdbb3ff60
[ "MIT" ]
1
2021-11-29T22:55:05.000Z
2021-11-29T22:55:05.000Z
import _plotly_utils.basevalidators class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scattersmith.marker.colorbar", **kwargs ): super(ShowticksuffixValidator, self).__init__( ...
31.111111
80
0.630357
import _plotly_utils.basevalidators class ShowticksuffixValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="showticksuffix", parent_name="scattersmith.marker.colorbar", **kwargs ): super(ShowticksuffixValidator, self).__init__( ...
true
true
1c28ff824b16eb2c0e61e750c7d3c8e305b1d8a4
1,646
py
Python
setup.py
Datsmir/eris-calibration
3af4691b948fb076e2bb49bd1e367bd6315beae6
[ "Apache-2.0" ]
2
2020-09-22T16:41:42.000Z
2020-09-23T03:40:31.000Z
setup.py
Datsmir/eris-calibration
3af4691b948fb076e2bb49bd1e367bd6315beae6
[ "Apache-2.0" ]
null
null
null
setup.py
Datsmir/eris-calibration
3af4691b948fb076e2bb49bd1e367bd6315beae6
[ "Apache-2.0" ]
2
2021-02-04T11:38:18.000Z
2022-01-26T01:50:40.000Z
# Copyright 2020 Norwegian University of Science and 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 appl...
34.291667
81
0.6452
from skbuild import setup def main(): setup( name="eris", version="0.0.0", description="Hand-eye calibration", long_description=open("README.md").read(), long_description_content_type="text/markdown", url="", author="Lars Tingelstad", a...
true
true
1c28ff97ef23b70c936e39e11d13e5a91dac63c7
325
py
Python
EDGAR/Exercicios_Python2/exer5.py
ygorferreira4g/AulasPython
e582caea4468bf2bc5cabbf8bc7e4b9894d10c81
[ "MIT" ]
1
2020-08-23T19:41:38.000Z
2020-08-23T19:41:38.000Z
EDGAR/Exercicios_Python2/exer5.py
ygorferreira4g/AulasPython
e582caea4468bf2bc5cabbf8bc7e4b9894d10c81
[ "MIT" ]
2
2020-08-24T21:28:10.000Z
2020-08-28T01:43:33.000Z
EDGAR/Exercicios_Python2/exer5.py
ygorferreira4g/AulasPython
e582caea4468bf2bc5cabbf8bc7e4b9894d10c81
[ "MIT" ]
2
2020-08-24T21:17:00.000Z
2020-08-28T01:33:25.000Z
sl1 = float(250) sl2 = float(130) sl3 = float(540) tsl = (sl1 + sl2 + sl3) print ("total", tsl) msl = round( tsl/3,2) print("media", msl) psl1 = sl1*100/tsl print("Porcentagem 1: % {:.2f}".format(psl1)) psl2 = sl2*100/tsl print("Porcentagem 2: %.2f" % (psl2)) psl3 = sl3*100/tsl print("Porcentagem 3: %.2f" % (psl...
16.25
45
0.609231
sl1 = float(250) sl2 = float(130) sl3 = float(540) tsl = (sl1 + sl2 + sl3) print ("total", tsl) msl = round( tsl/3,2) print("media", msl) psl1 = sl1*100/tsl print("Porcentagem 1: % {:.2f}".format(psl1)) psl2 = sl2*100/tsl print("Porcentagem 2: %.2f" % (psl2)) psl3 = sl3*100/tsl print("Porcentagem 3: %.2f" % (psl...
true
true
1c2900cd84bf7cc5b098603e45ab6c07f061369b
159
py
Python
SEPT_22_2020/lat3_program_angka_depan_kali_angka_tengah_tambah_belakang.py
refeed/PAlgoritmaTRPLA
e0c79c1d57bee0869e2344651718e8cf053c035f
[ "MIT" ]
null
null
null
SEPT_22_2020/lat3_program_angka_depan_kali_angka_tengah_tambah_belakang.py
refeed/PAlgoritmaTRPLA
e0c79c1d57bee0869e2344651718e8cf053c035f
[ "MIT" ]
null
null
null
SEPT_22_2020/lat3_program_angka_depan_kali_angka_tengah_tambah_belakang.py
refeed/PAlgoritmaTRPLA
e0c79c1d57bee0869e2344651718e8cf053c035f
[ "MIT" ]
null
null
null
nomor = int(input('Masukan angka: ')) ratusan = nomor // 100 puluhan = nomor // 10 % 10 satuan = nomor % 10 hasil = ratusan * puluhan + satuan print(hasil)
15.9
37
0.654088
nomor = int(input('Masukan angka: ')) ratusan = nomor // 100 puluhan = nomor // 10 % 10 satuan = nomor % 10 hasil = ratusan * puluhan + satuan print(hasil)
true
true
1c290187ec258896df4b1e9729197603c3a9d6b8
17,923
py
Python
src/pudl/output/eia860.py
rousik/pudl
7dbaac8af6d3d760a7c918cd9a8488d076d2a150
[ "MIT" ]
3
2019-06-13T05:21:07.000Z
2020-11-15T20:02:13.000Z
src/pudl/output/eia860.py
kyleries/pudl
52db209ff83d1b2c8ef0f93d599a844f12a715ef
[ "MIT" ]
null
null
null
src/pudl/output/eia860.py
kyleries/pudl
52db209ff83d1b2c8ef0f93d599a844f12a715ef
[ "MIT" ]
null
null
null
"""Functions for pulling data primarily from the EIA's Form 860.""" # import datetime import pandas as pd import sqlalchemy as sa import pudl def utilities_eia860(pudl_engine, start_date=None, end_date=None): """Pull all fields from the EIA860 Utilities table. Args: pudl_engine (sqlalchemy.engine....
37.339583
79
0.648385
import pandas as pd import sqlalchemy as sa import pudl def utilities_eia860(pudl_engine, start_date=None, end_date=None): pt = pudl.output.pudltabl.get_table_meta(pudl_engine) utils_eia_tbl = pt['utilities_entity_eia'] utils_eia_select = sa.sql.select([utils_eia_tbl]) utils_eia_df = pd.read_...
true
true
1c29028cb4d3efb128efcf23acca7729705619b0
18,275
py
Python
AppServer/google/appengine/api/logservice/logservice_stub.py
isabella232/scale-safe
8b887726768106b6b67d7be6ea257bee5cd83f9a
[ "Apache-2.0" ]
null
null
null
AppServer/google/appengine/api/logservice/logservice_stub.py
isabella232/scale-safe
8b887726768106b6b67d7be6ea257bee5cd83f9a
[ "Apache-2.0" ]
1
2021-06-08T10:04:35.000Z
2021-06-08T10:04:35.000Z
AppServer/google/appengine/api/logservice/logservice_stub.py
isabella232/scale-safe
8b887726768106b6b67d7be6ea257bee5cd83f9a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2007 Google 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 o...
32.692308
80
0.699371
import os import time from google.appengine.api import apiproxy_stub from google.appengine.api import datastore_errors from google.appengine.api import logservice from google.appengine.api import namespace_manager from google.appengine.api.logservice import log_service_pb from google.appengine....
true
true
1c29038ffba4ce826a2cfe31c6d1bf249f2e8222
524
py
Python
paggcerto/utils/make_enum_json_serializable.py
tassio/paggcerto-python
48c81d518a46bd06162c878179abcdfb6bdefc8b
[ "Apache-2.0" ]
null
null
null
paggcerto/utils/make_enum_json_serializable.py
tassio/paggcerto-python
48c81d518a46bd06162c878179abcdfb6bdefc8b
[ "Apache-2.0" ]
null
null
null
paggcerto/utils/make_enum_json_serializable.py
tassio/paggcerto-python
48c81d518a46bd06162c878179abcdfb6bdefc8b
[ "Apache-2.0" ]
null
null
null
""" Module that monkey-patches the json module when it's imported so JSONEncoder.default() automatically checks to see if the object being encoded is an Enum type and, if so, returns its name. """ from enum import Enum from json import JSONEncoder _saved_default = JSONEncoder().default # Save default method. def _ne...
32.75
77
0.742366
from enum import Enum from json import JSONEncoder _saved_default = JSONEncoder().default def _new_default(self, obj): if isinstance(obj, Enum): return obj.name else: return _saved_default JSONEncoder.default = _new_default
true
true
1c2903b866e8e6c406cb6bc06c8bd466f4b39373
2,534
py
Python
tests-ext/test_mysql.py
cpflat/amulog
b7a8c7478d2e5253158f0bce3a7f7109d23e40cb
[ "BSD-3-Clause" ]
5
2019-07-03T09:57:30.000Z
2021-02-13T13:15:47.000Z
tests-ext/test_mysql.py
cpflat/amulog
b7a8c7478d2e5253158f0bce3a7f7109d23e40cb
[ "BSD-3-Clause" ]
null
null
null
tests-ext/test_mysql.py
cpflat/amulog
b7a8c7478d2e5253158f0bce3a7f7109d23e40cb
[ "BSD-3-Clause" ]
1
2021-09-09T02:21:42.000Z
2021-09-09T02:21:42.000Z
#!/usr/bin/env python # coding: utf-8 import os import unittest import tempfile from amulog import config from amulog import log_db from amulog import manager from amulog import testutil class TestMysql(unittest.TestCase): _path_testlog = None _path_testdb = None _path_ltgendump = None @classmeth...
32.075949
72
0.619179
import os import unittest import tempfile from amulog import config from amulog import log_db from amulog import manager from amulog import testutil class TestMysql(unittest.TestCase): _path_testlog = None _path_testdb = None _path_ltgendump = None @classmethod def setUpClass(cls): ...
true
true
1c2905974779e87d3055a734d22e8a0e09552e71
1,735
py
Python
rrcforest/lagfeatures.py
josteinbf/rrcforest
239eb99f938409a004967624d7253d78f239102e
[ "MIT" ]
null
null
null
rrcforest/lagfeatures.py
josteinbf/rrcforest
239eb99f938409a004967624d7253d78f239102e
[ "MIT" ]
null
null
null
rrcforest/lagfeatures.py
josteinbf/rrcforest
239eb99f938409a004967624d7253d78f239102e
[ "MIT" ]
null
null
null
from typing import ( Sequence, Mapping, Deque, Iterable, Generator, Optional, TypeVar, Generic) import itertools from collections import deque T = TypeVar('T') class LagFeatures(Generic[T]): _buffer: Deque[Mapping[str, Optional[T]]] _columns: Sequence[str] def __init__(self, n_lags: int, columns: S...
28.442623
79
0.604611
from typing import ( Sequence, Mapping, Deque, Iterable, Generator, Optional, TypeVar, Generic) import itertools from collections import deque T = TypeVar('T') class LagFeatures(Generic[T]): _buffer: Deque[Mapping[str, Optional[T]]] _columns: Sequence[str] def __init__(self, n_lags: int, columns: S...
true
true
1c29063b790236837dee7c0be449084e1e19fcfd
331
py
Python
time.py
chirag043043/python-program
b5b568654632ab05596311af83a974add6a9d9a4
[ "bzip2-1.0.6" ]
null
null
null
time.py
chirag043043/python-program
b5b568654632ab05596311af83a974add6a9d9a4
[ "bzip2-1.0.6" ]
null
null
null
time.py
chirag043043/python-program
b5b568654632ab05596311af83a974add6a9d9a4
[ "bzip2-1.0.6" ]
null
null
null
import time import datetime ticks=time.time() print("no of ticks since 1 jan 1970",ticks) print(time.localtime()) localtime = time.localtime(time.time()) print ("Local current time :", localtime) localtime = time.asctime( time.localtime(time.time()) ) print ("Local current time :", localtime) d=datetime.date(2019,8,20)...
25.461538
55
0.73716
import time import datetime ticks=time.time() print("no of ticks since 1 jan 1970",ticks) print(time.localtime()) localtime = time.localtime(time.time()) print ("Local current time :", localtime) localtime = time.asctime( time.localtime(time.time()) ) print ("Local current time :", localtime) d=datetime.date(2019,8,20)...
true
true
1c2906e7a39f2dcd74ddea6230f2a05e1e2c9d81
153,147
py
Python
tests/queries/tests.py
benjaoming/django
6dbe979b4d9396e1b307c7d27388c97c13beb21c
[ "BSD-3-Clause" ]
1
2016-07-30T11:06:37.000Z
2016-07-30T11:06:37.000Z
tests/queries/tests.py
benjaoming/django
6dbe979b4d9396e1b307c7d27388c97c13beb21c
[ "BSD-3-Clause" ]
null
null
null
tests/queries/tests.py
benjaoming/django
6dbe979b4d9396e1b307c7d27388c97c13beb21c
[ "BSD-3-Clause" ]
null
null
null
from __future__ import unicode_literals from collections import OrderedDict import datetime from operator import attrgetter import pickle import unittest import warnings from django.core.exceptions import FieldError from django.db import connection, DEFAULT_DB_ALIAS from django.db.models import Count, F, Q from djang...
41.889223
159
0.616695
from __future__ import unicode_literals from collections import OrderedDict import datetime from operator import attrgetter import pickle import unittest import warnings from django.core.exceptions import FieldError from django.db import connection, DEFAULT_DB_ALIAS from django.db.models import Count, F, Q from djang...
true
true
1c29078746a98d58cbdbc10dabc2e3518bddfb1b
5,375
py
Python
pages/models.py
andywar65/projetc_repo
a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef
[ "BSD-2-Clause" ]
null
null
null
pages/models.py
andywar65/projetc_repo
a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef
[ "BSD-2-Clause" ]
2
2021-03-19T17:12:07.000Z
2021-03-19T17:12:08.000Z
pages/models.py
andywar65/projetc_repo
a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef
[ "BSD-2-Clause" ]
null
null
null
import uuid import json from django.utils.timezone import now from django.utils.html import strip_tags from django.db import models from django.utils.translation import gettext as _ from django.urls import reverse from filebrowser.fields import FileBrowseField from treebeard.mp_tree import MP_Node from project.utils...
37.587413
81
0.628465
import uuid import json from django.utils.timezone import now from django.utils.html import strip_tags from django.db import models from django.utils.translation import gettext as _ from django.urls import reverse from filebrowser.fields import FileBrowseField from treebeard.mp_tree import MP_Node from project.utils...
true
true
1c29079a2d95418451c76718bdf0f2f8c5d5216f
65,605
py
Python
mne/minimum_norm/inverse.py
tangyisheng2/mne-python
740fcb89b9910ef2fa84cffe402a06b4da643374
[ "BSD-3-Clause" ]
3
2021-01-04T08:45:56.000Z
2021-05-19T12:25:59.000Z
mne/minimum_norm/inverse.py
tangyisheng2/mne-python
740fcb89b9910ef2fa84cffe402a06b4da643374
[ "BSD-3-Clause" ]
null
null
null
mne/minimum_norm/inverse.py
tangyisheng2/mne-python
740fcb89b9910ef2fa84cffe402a06b4da643374
[ "BSD-3-Clause" ]
2
2021-04-28T11:52:52.000Z
2021-05-05T02:36:32.000Z
# -*- coding: utf-8 -*- # Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Matti Hämäläinen <msh@nmr.mgh.harvard.edu> # Teon Brooks <teon.brooks@gmail.com> # # License: BSD (3-clause) from copy import deepcopy from math import sqrt import numpy as np from scipy import linalg from ._eloret...
37.639128
100
0.592546
from copy import deepcopy from math import sqrt import numpy as np from scipy import linalg from ._eloreta import _compute_eloreta from ..fixes import _safe_svd from ..io.base import BaseRaw from ..io.constants import FIFF from ..io.open import fiff_open from ..io.tag import find_tag from ..io.matrix import (_r...
true
true
1c290935ff2e8ea9401ec071e84684a33ae5355d
20,185
py
Python
tagging/models.py
gdub/django-tagging
aca1d92a5f5474a4b893ae7d200a20cef060fdc5
[ "BSD-3-Clause" ]
null
null
null
tagging/models.py
gdub/django-tagging
aca1d92a5f5474a4b893ae7d200a20cef060fdc5
[ "BSD-3-Clause" ]
null
null
null
tagging/models.py
gdub/django-tagging
aca1d92a5f5474a4b893ae7d200a20cef060fdc5
[ "BSD-3-Clause" ]
1
2015-07-28T09:28:58.000Z
2015-07-28T09:28:58.000Z
""" Models and managers for generic tagging. """ from __future__ import unicode_literals # Python 2.3 compatibility try: set except NameError: from sets import Set as set from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.db import connection,...
40.450902
119
0.601684
from __future__ import unicode_literals try: set except NameError: from sets import Set as set from django.contrib.contenttypes import generic from django.contrib.contenttypes.models import ContentType from django.db import connection, models from django.db.models.query import QuerySet from django.utils.encod...
true
true
1c2909a7737bfb8ac9aa84e31645cf381234063e
17,748
py
Python
counterblock/lib/blockfeed.py
coinwarp/dogeblock
fc4a3a8315e1e822c1261f0fbcb4e1bbd300dfcd
[ "MIT" ]
null
null
null
counterblock/lib/blockfeed.py
coinwarp/dogeblock
fc4a3a8315e1e822c1261f0fbcb4e1bbd300dfcd
[ "MIT" ]
null
null
null
counterblock/lib/blockfeed.py
coinwarp/dogeblock
fc4a3a8315e1e822c1261f0fbcb4e1bbd300dfcd
[ "MIT" ]
null
null
null
""" blockfeed: sync with and process new blocks from counterparty-server """ import re import os import sys import json import copy import logging import datetime import decimal import ConfigParser import time import itertools import pymongo import gevent from counterblock.lib import config, util, blockchain, cache, d...
53.619335
179
0.629085
""" blockfeed: sync with and process new blocks from counterparty-server """ import re import os import sys import json import copy import logging import datetime import decimal import ConfigParser import time import itertools import pymongo import gevent from counterblock.lib import config, util, blockchain, cache, d...
false
true
1c2909bdac0f4395bf335f1e4bbe0d962410a850
660
py
Python
application/__init__.py
LandRegistry/register-meta-data
941c9440ab948d038ab2d476d4f3d711a675f764
[ "MIT" ]
null
null
null
application/__init__.py
LandRegistry/register-meta-data
941c9440ab948d038ab2d476d4f3d711a675f764
[ "MIT" ]
1
2015-08-17T09:26:15.000Z
2015-08-17T09:26:15.000Z
application/__init__.py
LandRegistry/register-metadata
941c9440ab948d038ab2d476d4f3d711a675f764
[ "MIT" ]
null
null
null
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import os app = Flask(__name__) db = SQLAlchemy(app) app.config.from_object(os.environ.get('SETTINGS')) from application import routes # Set up logging if application has not been started in debug mode if not app.debug: import logging impo...
23.571429
96
0.722727
from flask import Flask from flask.ext.sqlalchemy import SQLAlchemy import os app = Flask(__name__) db = SQLAlchemy(app) app.config.from_object(os.environ.get('SETTINGS')) from application import routes if not app.debug: import logging import sys formatter = logging.Formatter('%(asctime)s [%(lev...
true
true
1c290a6e5f70de245baae6f10d28d7f2c37af08a
1,577
py
Python
mmdet3d/ops/gather_points/gather_points.py
maskjp/mmdetection3d
98f332372b1a4c82bc2d57588a5d764f4176c869
[ "Apache-2.0" ]
1
2022-03-04T19:29:42.000Z
2022-03-04T19:29:42.000Z
mmdet3d/ops/gather_points/gather_points.py
maskjp/mmdetection3d
98f332372b1a4c82bc2d57588a5d764f4176c869
[ "Apache-2.0" ]
null
null
null
mmdet3d/ops/gather_points/gather_points.py
maskjp/mmdetection3d
98f332372b1a4c82bc2d57588a5d764f4176c869
[ "Apache-2.0" ]
null
null
null
# Copyright (c) OpenMMLab. All rights reserved. import torch from torch.autograd import Function from . import gather_points_ext class GatherPoints(Function): """Gather Points. Gather points with given index. """ @staticmethod def forward(ctx, features: torch.Tensor, indices: to...
29.203704
74
0.568167
import torch from torch.autograd import Function from . import gather_points_ext class GatherPoints(Function): @staticmethod def forward(ctx, features: torch.Tensor, indices: torch.Tensor) -> torch.Tensor: assert features.is_contiguous() assert indices.is_contiguous() ...
true
true
1c290a754df8292c3d4ab1fa7db8426ca94fe1da
1,347
py
Python
tests/test_sync.py
nfitzen/python-anilist
8685098c8d53c3c80d1ffd78a1546d2c8eeaa1e0
[ "MIT" ]
9
2021-03-08T21:10:15.000Z
2022-03-28T03:24:46.000Z
tests/test_sync.py
nfitzen/python-anilist
8685098c8d53c3c80d1ffd78a1546d2c8eeaa1e0
[ "MIT" ]
5
2021-08-28T08:29:53.000Z
2022-01-18T19:18:37.000Z
tests/test_sync.py
nfitzen/python-anilist
8685098c8d53c3c80d1ffd78a1546d2c8eeaa1e0
[ "MIT" ]
4
2021-07-07T22:59:53.000Z
2022-01-05T17:41:47.000Z
# SPDX-License-Identifier: MIT # Copyright (C) 2021 Amano Team <https://amanoteam.com/> and the python-anilist contributors import pytest import anilist @pytest.mark.parametrize( "query, content_type", [ ("Bakemonogatari", "anime"), ("Bakemonogatari", "manga"), ("Senjougahara", "chara...
24.053571
92
0.604306
import pytest import anilist @pytest.mark.parametrize( "query, content_type", [ ("Bakemonogatari", "anime"), ("Bakemonogatari", "manga"), ("Senjougahara", "character"), ("Chiwa Saitou", "staff"), ("travis", "user"), ], ) def test_search(query, content_type): ...
true
true
1c290a95300451fd48c12d2b0a0f3d680726a023
52,333
py
Python
pylinac/field_analysis.py
alanphys/pylinac
9b2dabe85d3038a9ec922c77bbb943b4e06dbdda
[ "MIT" ]
null
null
null
pylinac/field_analysis.py
alanphys/pylinac
9b2dabe85d3038a9ec922c77bbb943b4e06dbdda
[ "MIT" ]
null
null
null
pylinac/field_analysis.py
alanphys/pylinac
9b2dabe85d3038a9ec922c77bbb943b4e06dbdda
[ "MIT" ]
null
null
null
"""Module for performing analysis of images or 2D arrays for parameters such as flatness and symmetry.""" import dataclasses import io import os.path as osp import warnings from dataclasses import dataclass from enum import Enum from math import floor, ceil from typing import Union, Optional, Tuple, BinaryIO import ma...
51.508858
170
0.638698
import dataclasses import io import os.path as osp import warnings from dataclasses import dataclass from enum import Enum from math import floor, ceil from typing import Union, Optional, Tuple, BinaryIO import matplotlib.pyplot as plt import numpy as np from pylinac.core.utilities import open_path, ResultBase from ....
true
true
1c290af739e624ed1c1bba05b486099b4b90e047
574
py
Python
product_of_max3.py
erjan/coding_exercises
53ba035be85f1e7a12b4d4dbf546863324740467
[ "Apache-2.0" ]
null
null
null
product_of_max3.py
erjan/coding_exercises
53ba035be85f1e7a12b4d4dbf546863324740467
[ "Apache-2.0" ]
null
null
null
product_of_max3.py
erjan/coding_exercises
53ba035be85f1e7a12b4d4dbf546863324740467
[ "Apache-2.0" ]
null
null
null
#Given an integer array, find three numbers whose product is maximum and output the maximum product. import math import functools class Solution: def maximumProduct(self, nums: List[int]) -> int: nums = sorted(nums) f1 = nums[-1] * nums[-2] * nums[-3] f2 = nums[-1] * nums[...
30.210526
126
0.627178
import math import functools class Solution: def maximumProduct(self, nums: List[int]) -> int: nums = sorted(nums) f1 = nums[-1] * nums[-2] * nums[-3] f2 = nums[-1] * nums[0] * nums[1] return max(f1,f2)
true
true
1c290b37854dae69ca504ef0d539e3feb65d1d2d
7,388
py
Python
utils.py
KoryakovDmitry/DewarpNet
6b5c687548d9db3b5bcfd1503b7a8997c875ea1f
[ "MIT" ]
307
2019-10-26T06:39:02.000Z
2022-03-20T11:18:00.000Z
utils.py
KoryakovDmitry/DewarpNet
6b5c687548d9db3b5bcfd1503b7a8997c875ea1f
[ "MIT" ]
41
2019-10-29T14:48:38.000Z
2022-03-23T15:05:19.000Z
utils.py
KoryakovDmitry/DewarpNet
6b5c687548d9db3b5bcfd1503b7a8997c875ea1f
[ "MIT" ]
85
2019-10-26T06:39:03.000Z
2022-02-28T12:11:37.000Z
''' Misc Utility functions ''' from collections import OrderedDict import os import numpy as np import torch import random import torchvision def recursive_glob(rootdir='.', suffix=''): """Performs recursive glob with given suffix and rootdir :param rootdir is the root directory :param suffix is t...
35.519231
130
0.652003
from collections import OrderedDict import os import numpy as np import torch import random import torchvision def recursive_glob(rootdir='.', suffix=''): return [os.path.join(looproot, filename) for looproot, _, filenames in os.walk(rootdir) for filename in filenames if filename.endswith(suffix)] ...
true
true
1c290d6579ef3ba3ddc70b4fcc3b615427ee515e
89
py
Python
tests/download_test.py
FrancescoCaracciolo/SentenceVectorization
b4fdd70f61aee25f6bd2d4f3c4f157f9d799ff63
[ "Apache-2.0" ]
1
2021-12-20T11:37:50.000Z
2021-12-20T11:37:50.000Z
tests/download_test.py
FrancescoCaracciolo/SentenceVectorization
b4fdd70f61aee25f6bd2d4f3c4f157f9d799ff63
[ "Apache-2.0" ]
null
null
null
tests/download_test.py
FrancescoCaracciolo/SentenceVectorization
b4fdd70f61aee25f6bd2d4f3c4f157f9d799ff63
[ "Apache-2.0" ]
null
null
null
import SentenceVectorization SentenceVectorization.download_model("glove.6B", "models")
22.25
58
0.842697
import SentenceVectorization SentenceVectorization.download_model("glove.6B", "models")
true
true
1c290e9d6fbc317663834233c0f3557bc21fc041
3,778
py
Python
tools/test_net.py
yuanxiangyuee/ins_seg_HRSIs
d716a5d7726bb016a4f6c1032ef3e3ad108d00bb
[ "MIT" ]
null
null
null
tools/test_net.py
yuanxiangyuee/ins_seg_HRSIs
d716a5d7726bb016a4f6c1032ef3e3ad108d00bb
[ "MIT" ]
null
null
null
tools/test_net.py
yuanxiangyuee/ins_seg_HRSIs
d716a5d7726bb016a4f6c1032ef3e3ad108d00bb
[ "MIT" ]
1
2021-11-08T11:04:23.000Z
2021-11-08T11:04:23.000Z
"""Perform inference on one or more datasets.""" import argparse import cv2 import os import pprint import sys import time import torch import _init_paths # pylint: disable=unused-import from core.config import cfg, merge_cfg_from_file, merge_cfg_from_list, assert_and_infer_cfg from core.test_engine import run_infe...
32.568966
91
0.671784
import argparse import cv2 import os import pprint import sys import time import torch import _init_paths from core.config import cfg, merge_cfg_from_file, merge_cfg_from_list, assert_and_infer_cfg from core.test_engine import run_inference import utils.logging # thread safe and causes unwanted GPU memory alloca...
true
true
1c290f082046572d3a3de527fd30bd3dad29b3a4
3,015
py
Python
src/clients/python/library/shm_utils_setup.py
kpedro88/triton-inference-server
37b3441e59bd0da314f428e1dcddf0a2f67d52e1
[ "BSD-3-Clause" ]
1
2021-09-22T13:23:23.000Z
2021-09-22T13:23:23.000Z
src/clients/python/library/shm_utils_setup.py
dhanainme/triton-inference-server
880db08b8a3a54caa51ae76387cdcea303807faf
[ "BSD-3-Clause" ]
null
null
null
src/clients/python/library/shm_utils_setup.py
dhanainme/triton-inference-server
880db08b8a3a54caa51ae76387cdcea303807faf
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2020, NVIDIA CORPORATION. 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 a...
38.653846
130
0.713101
import os from setuptools import find_packages from setuptools import setup if 'VERSION' not in os.environ: raise Exception('envvar VERSION must be specified') VERSION = os.environ['VERSION'] REQUIRED = ['numpy'] try: from wheel.bdist_wheel import bdist_wheel as _bdist_wheel c...
true
true
1c290f960c59965d9045dbb08a07e8f43172f843
29,722
py
Python
cogs/draw.py
WitherredAway/Yeet.
669ef4a81eac1ced4e2361b1834b5ffa153208d3
[ "MIT" ]
4
2021-04-29T21:17:01.000Z
2022-03-06T07:09:16.000Z
cogs/draw.py
WitherredAway/Yeet.
669ef4a81eac1ced4e2361b1834b5ffa153208d3
[ "MIT" ]
2
2021-04-29T21:23:07.000Z
2022-03-17T05:26:20.000Z
cogs/draw.py
WitherredAway/Yeet.
669ef4a81eac1ced4e2361b1834b5ffa153208d3
[ "MIT" ]
1
2022-03-26T11:20:56.000Z
2022-03-26T11:20:56.000Z
import discord from discord.ext import commands, tasks from main import * import re import itertools import emojis import asyncio from typing import Optional, Union import copy row_alpha = [ "🇦", "🇧", "🇨", "🇩", "🇪", "🇫", "🇬", "🇭", "🇮", "🇯", "🇰", "🇱", "🇲"...
41.744382
184
0.535395
import discord from discord.ext import commands, tasks from main import * import re import itertools import emojis import asyncio from typing import Optional, Union import copy row_alpha = [ "🇦", "🇧", "🇨", "🇩", "🇪", "🇫", "🇬", "🇭", "🇮", "🇯", "🇰", "🇱", "🇲"...
true
true
1c290fdccd4a0608a0acbaa92d9f5897a339ab68
10,092
py
Python
tutorial/stats_utils.py
LarryShamalama/scikit-mobility
d58324c20d8a1651c97feb988619ce4405e78278
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
3
2021-01-09T06:50:52.000Z
2021-11-01T00:16:21.000Z
tutorial/stats_utils.py
LarryShamalama/scikit-mobility
d58324c20d8a1651c97feb988619ce4405e78278
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
tutorial/stats_utils.py
LarryShamalama/scikit-mobility
d58324c20d8a1651c97feb988619ce4405e78278
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
1
2021-03-16T13:45:12.000Z
2021-03-16T13:45:12.000Z
#!/usr/bin/env python # ciacia_stats.py # Filippo Simini # Created: 20131021 import sys,os import math import random #import mpmath import operator import csv import numpy as np import matplotlib.pyplot as plt import matplotlib.pylab as pyl import itertools import scipy as sp from scipy import stats from scipy import...
29.857988
128
0.505945
import sys,os import math import random import operator import csv import numpy as np import matplotlib.pyplot as plt import matplotlib.pylab as pyl import itertools import scipy as sp from scipy import stats from scipy import optimize from scipy.integrate import quad def segno(x): if x > 0.0: return 1...
true
true
1c2910b8301ca92a8e816eb180e4e0009b943982
25,270
py
Python
manage_cat.py
coolerking/caterpillar
f8d02d48963759118b6acfcf9b5d73a9f061a24b
[ "MIT" ]
null
null
null
manage_cat.py
coolerking/caterpillar
f8d02d48963759118b6acfcf9b5d73a9f061a24b
[ "MIT" ]
null
null
null
manage_cat.py
coolerking/caterpillar
f8d02d48963759118b6acfcf9b5d73a9f061a24b
[ "MIT" ]
1
2019-12-16T08:22:00.000Z
2019-12-16T08:22:00.000Z
# -*- coding: utf-8 -*- #!/usr/bin/env python3 """ Scripts to drive a donkey 2 car Usage: manage_cat.py (drive) [--model=<model>] [--js] [--type=(linear|categorical|rnn|imu|behavior|3d|localizer|latent)] [--camera=(single|stereo)] [--meta=<key:value> ...] [--debug] manage_cat.py (train) [--tub=<tub1,tub2,..tub...
38.876923
194
0.614563
import os import time from docopt import docopt import numpy as np import donkeycar as dk from donkeycar.parts.transform import Lambda, TriggeredCallback, DelayedTrigger from donkeycar.parts.datastore import TubHandler from donkeycar.parts.controller import LocalWebController, JoystickController from donkeycar.pa...
true
true
1c29120a3bb651498fbec8f9197b371c68880bad
181
py
Python
src/apispec/__init__.py
sripathivenky/apispec
f4cbef36b65d13c3206f25b90734119876a45379
[ "MIT" ]
null
null
null
src/apispec/__init__.py
sripathivenky/apispec
f4cbef36b65d13c3206f25b90734119876a45379
[ "MIT" ]
12
2021-10-12T10:21:26.000Z
2022-03-28T10:26:04.000Z
src/apispec/__init__.py
sripathivenky/apispec
f4cbef36b65d13c3206f25b90734119876a45379
[ "MIT" ]
null
null
null
"""Contains main apispec classes: `APISpec` and `BasePlugin`""" from .core import APISpec from .plugin import BasePlugin __version__ = "5.1.0" __all__ = ["APISpec", "BasePlugin"]
22.625
63
0.723757
from .core import APISpec from .plugin import BasePlugin __version__ = "5.1.0" __all__ = ["APISpec", "BasePlugin"]
true
true
1c291255fedfca00359848d73b100a77825fd0f1
6,517
py
Python
python/websphere/wasadmin_2.1.py
sgmoratilla/utilities
629fd39f7fe120969d0a910f70494e821baf3ef0
[ "Apache-2.0" ]
null
null
null
python/websphere/wasadmin_2.1.py
sgmoratilla/utilities
629fd39f7fe120969d0a910f70494e821baf3ef0
[ "Apache-2.0" ]
null
null
null
python/websphere/wasadmin_2.1.py
sgmoratilla/utilities
629fd39f7fe120969d0a910f70494e821baf3ef0
[ "Apache-2.0" ]
null
null
null
import time import os import sys from supported_apps import SupportedApps class AutoDetectWasApplicationVersion: EXTRACT_VERSION_RE = '^[a-zA-Z-]+-([0-9]+.[0-9]+.[0-9]+.[0-9]+.[0-9]+(-SNAPSHOT)?).ear$' def __init__(self, app_codename, app_directory, abort_if_several=True): self.app_codename = app_code...
36.819209
177
0.635108
import time import os import sys from supported_apps import SupportedApps class AutoDetectWasApplicationVersion: EXTRACT_VERSION_RE = '^[a-zA-Z-]+-([0-9]+.[0-9]+.[0-9]+.[0-9]+.[0-9]+(-SNAPSHOT)?).ear$' def __init__(self, app_codename, app_directory, abort_if_several=True): self.app_codename = app_code...
false
true
1c2913342138167c017d4d18a66e026b0162aae1
7,772
py
Python
core_tools/GUI/virt_gate_matrix_qml/gui_controller.py
opietx/core_tools
d5bd2d4beed74791b80ff5bdabd67774403763ef
[ "BSD-2-Clause" ]
null
null
null
core_tools/GUI/virt_gate_matrix_qml/gui_controller.py
opietx/core_tools
d5bd2d4beed74791b80ff5bdabd67774403763ef
[ "BSD-2-Clause" ]
null
null
null
core_tools/GUI/virt_gate_matrix_qml/gui_controller.py
opietx/core_tools
d5bd2d4beed74791b80ff5bdabd67774403763ef
[ "BSD-2-Clause" ]
null
null
null
from core_tools.GUI.virt_gate_matrix_qml.models import attenuation_model, table_header_model, vg_matrix_model from core_tools.drivers.hardware.hardware import hardware from PyQt5 import QtCore, QtQuick, QtGui, QtWidgets, QtQml import core_tools.GUI.virt_gate_matrix_qml as qml_in import os, sys class virt_gate_matri...
74.019048
285
0.659676
from core_tools.GUI.virt_gate_matrix_qml.models import attenuation_model, table_header_model, vg_matrix_model from core_tools.drivers.hardware.hardware import hardware from PyQt5 import QtCore, QtQuick, QtGui, QtWidgets, QtQml import core_tools.GUI.virt_gate_matrix_qml as qml_in import os, sys class virt_gate_matri...
true
true
1c2913d42fe3bb6efd581f01b4fcc69c308fa15e
10,342
py
Python
userbot/plugins/upload.py
Aliensuniquebot/CatUserbot
93561a620fc1198c6fe6c259412088f4bc81d97b
[ "MIT" ]
1
2020-07-18T07:42:58.000Z
2020-07-18T07:42:58.000Z
userbot/plugins/upload.py
praveen368/CatUserbot
4b0cd970551ffaf86b9fdd5da584c1b3882821ff
[ "MIT" ]
null
null
null
userbot/plugins/upload.py
praveen368/CatUserbot
4b0cd970551ffaf86b9fdd5da584c1b3882821ff
[ "MIT" ]
null
null
null
import aiohttp import asyncio import os import time from datetime import datetime from telethon import events from telethon.tl.types import DocumentAttributeVideo import json import subprocess import math from pySmartDL import SmartDL from hachoir.metadata import extractMetadata from hachoir.parser import createParser ...
36.935714
83
0.512473
import aiohttp import asyncio import os import time from datetime import datetime from telethon import events from telethon.tl.types import DocumentAttributeVideo import json import subprocess import math from pySmartDL import SmartDL from hachoir.metadata import extractMetadata from hachoir.parser import createParser ...
true
true
1c291487f82ce378092da34e0978a4c13567b6ef
27,581
py
Python
record/3548/pre_main_short.py
xieyulai/MSP-STTN-BJ
d691a20e32963330a6024c77284fed6c00b68fed
[ "MIT" ]
null
null
null
record/3548/pre_main_short.py
xieyulai/MSP-STTN-BJ
d691a20e32963330a6024c77284fed6c00b68fed
[ "MIT" ]
null
null
null
record/3548/pre_main_short.py
xieyulai/MSP-STTN-BJ
d691a20e32963330a6024c77284fed6c00b68fed
[ "MIT" ]
null
null
null
import warnings warnings.filterwarnings('ignore') import pickle import numpy as np import time import sys import cv2 import random import torch import torch.optim as optim import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset, DataLoader, TensorDataset import argparse import os impo...
39.401429
207
0.533193
import warnings warnings.filterwarnings('ignore') import pickle import numpy as np import time import sys import cv2 import random import torch import torch.optim as optim import torch.nn as nn import torch.nn.functional as F from torch.utils.data import Dataset, DataLoader, TensorDataset import argparse import os impo...
true
true
1c2914c6aa6ce0769a56ea13bb4ca0b6fc103b6f
90,306
py
Python
tables/tests/test_indexes.py
joshmoore/PyTables
5065497fdc04f07c551c56b8b0280892fcffad03
[ "BSD-3-Clause" ]
3
2016-03-14T07:49:32.000Z
2019-08-26T03:10:21.000Z
tables/tests/test_indexes.py
joshmoore/PyTables
5065497fdc04f07c551c56b8b0280892fcffad03
[ "BSD-3-Clause" ]
null
null
null
tables/tests/test_indexes.py
joshmoore/PyTables
5065497fdc04f07c551c56b8b0280892fcffad03
[ "BSD-3-Clause" ]
4
2020-06-19T00:11:13.000Z
2021-02-23T09:25:35.000Z
import unittest import os import tempfile import copy from tables import * from tables.index import Index, defaultAutoIndex, defaultIndexFilters from tables.idxutils import calcChunksize from tables.tests.common import verbose, allequal, heavy, cleanup, \ PyTablesTestCase, TempFileMixin from tables.exceptions imp...
38.119882
88
0.598089
import unittest import os import tempfile import copy from tables import * from tables.index import Index, defaultAutoIndex, defaultIndexFilters from tables.idxutils import calcChunksize from tables.tests.common import verbose, allequal, heavy, cleanup, \ PyTablesTestCase, TempFileMixin from tables.exceptions imp...
false
true
1c2914ea0ac53da03c71cb2a0defc291e6634469
24,745
py
Python
contrib/libs/protobuf/python/google/protobuf/json_format.py
SitdikovRustam/CatBoost
39fb9dfddb24e977ed87efc71063b03cd4bc8f16
[ "Apache-2.0" ]
1
2017-08-27T20:55:56.000Z
2017-08-27T20:55:56.000Z
contrib/libs/protobuf/python/google/protobuf/json_format.py
dsferz/machinelearning_yandex
8fde8314c5c70299ece8b8f00075ddfcd5e07ddf
[ "Apache-2.0" ]
null
null
null
contrib/libs/protobuf/python/google/protobuf/json_format.py
dsferz/machinelearning_yandex
8fde8314c5c70299ece8b8f00075ddfcd5e07ddf
[ "Apache-2.0" ]
null
null
null
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redi...
37.210526
79
0.679855
# Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # 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 copy...
true
true
1c2914fb84a864947b7e53a8c4d7154344e8d5b4
6,304
py
Python
docs/source/conf.py
awalter-bnl/suitcase
26c665769dde4621ed20ce8306bdcba85ffe9853
[ "BSD-3-Clause" ]
null
null
null
docs/source/conf.py
awalter-bnl/suitcase
26c665769dde4621ed20ce8306bdcba85ffe9853
[ "BSD-3-Clause" ]
null
null
null
docs/source/conf.py
awalter-bnl/suitcase
26c665769dde4621ed20ce8306bdcba85ffe9853
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # suitcase documentation build configuration file, created by # sphinx-quickstart on Thu Jun 28 12:35:56 2018. # # 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 # a...
31.207921
135
0.69448
extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.autosummary', 'sphinx.ext.githubpages', 'sphinx.ext.intersphinx', 'sphinx.ext.mathjax', 'sphinx.ext.viewcode', 'IPython.sphinxext.ipython_directive', 'IPython.sphinxext.ipython_console_highlighting', 'm...
true
true
1c29157b6b0e74b8dfb711574b31c47c02f0964c
1,611
py
Python
var/spack/repos/builtin/packages/r-htmltable/package.py
kehw/spack
4f49b1a9301447a8cf880c99820cad65e5c2d7e3
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2020-09-10T22:50:08.000Z
2021-01-12T22:18:54.000Z
var/spack/repos/builtin/packages/r-htmltable/package.py
kehw/spack
4f49b1a9301447a8cf880c99820cad65e5c2d7e3
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
11
2021-01-08T22:23:53.000Z
2022-03-30T11:08:17.000Z
var/spack/repos/builtin/packages/r-htmltable/package.py
kehw/spack
4f49b1a9301447a8cf880c99820cad65e5c2d7e3
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RHtmltable(RPackage): """Tables with state-of-the-art layout elements such as row span...
48.818182
96
0.717567
from spack import * class RHtmltable(RPackage): homepage = "https://cloud.r-project.org/package=htmlTable" url = "https://cloud.r-project.org/src/contrib/htmlTable_1.11.2.tar.gz" list_url = "https://cloud.r-project.org/src/contrib/Archive/htmlTable" version('1.13.1', sha256='689f32b65da6a5...
true
true
1c2915c7bf5d85d4edf79049b8ca7bce51d2b8ff
1,987
py
Python
huggingface/hybrid/models/hybrid/text_classification.py
yeahhhhhhhhhh/djl-demo
261b30541a966561fba9a91a3c6f7d5dca1f5e69
[ "Apache-2.0" ]
138
2019-11-29T22:03:12.000Z
2021-04-20T04:27:28.000Z
huggingface/hybrid/models/hybrid/text_classification.py
yeahhhhhhhhhh/djl-demo
261b30541a966561fba9a91a3c6f7d5dca1f5e69
[ "Apache-2.0" ]
19
2019-11-30T05:15:34.000Z
2021-04-11T01:59:26.000Z
huggingface/hybrid/models/hybrid/text_classification.py
AlexRogalskiy/djl-demo
261b30541a966561fba9a91a3c6f7d5dca1f5e69
[ "Apache-2.0" ]
57
2019-11-29T22:27:57.000Z
2021-04-18T16:57:43.000Z
#!/usr/bin/env python # # Copyright 2021 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file # except in compliance with the License. A copy of the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the ...
35.482143
94
0.621037
import torch from djl_python import Input from djl_python import Output from transformers_model import BaseNLPModel class TextClassification(BaseNLPModel): def __init__(self): super().__init__("text_classification") def preprocess(self, data: Input): input_text = data.get_as_st...
true
true
1c2916846aa20b5c58015f3e80d0d0582271382c
69
py
Python
abc/abc174/abc174a.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
1
2019-08-21T00:49:34.000Z
2019-08-21T00:49:34.000Z
abc/abc174/abc174a.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
abc/abc174/abc174a.py
c-yan/atcoder
940e49d576e6a2d734288fadaf368e486480a948
[ "MIT" ]
null
null
null
X = int(input()) if X >= 30: print('Yes') else: print('No')
9.857143
16
0.478261
X = int(input()) if X >= 30: print('Yes') else: print('No')
true
true
1c29171ee9eadc9394ce3cdbb926bb792bad8a79
805
py
Python
the_things_I_buy/core/verify_key_word_valid.py
ZYKoleva/MyGroceries
b7ee720c66aa88993519d90617ad0a0e58950fbf
[ "MIT" ]
null
null
null
the_things_I_buy/core/verify_key_word_valid.py
ZYKoleva/MyGroceries
b7ee720c66aa88993519d90617ad0a0e58950fbf
[ "MIT" ]
null
null
null
the_things_I_buy/core/verify_key_word_valid.py
ZYKoleva/MyGroceries
b7ee720c66aa88993519d90617ad0a0e58950fbf
[ "MIT" ]
null
null
null
from django.contrib.auth.models import User from django.core.exceptions import ValidationError from the_things_I_buy_auth.models import UserKeyWord def verify_key_word_valid(current_user, key_word): if current_user: user_key_word = UserKeyWord.objects.get(user=current_user) if not user_key_word.k...
35
80
0.719255
from django.contrib.auth.models import User from django.core.exceptions import ValidationError from the_things_I_buy_auth.models import UserKeyWord def verify_key_word_valid(current_user, key_word): if current_user: user_key_word = UserKeyWord.objects.get(user=current_user) if not user_key_word.k...
true
true
1c29184775ae5ab3b58a9eae3d55f69ecc97200b
828
py
Python
app/models.py
alexomaset/News-Highlights
8f0349f0a455c28c0be863a39a4fa10ef54777e7
[ "MIT" ]
null
null
null
app/models.py
alexomaset/News-Highlights
8f0349f0a455c28c0be863a39a4fa10ef54777e7
[ "MIT" ]
null
null
null
app/models.py
alexomaset/News-Highlights
8f0349f0a455c28c0be863a39a4fa10ef54777e7
[ "MIT" ]
null
null
null
class Sources: ''' Sources class that defines source objects ''' def __init__(self,id,name,author,description,url,category,urlToImage,title): ''' Function that initiates the sources class ''' self.id = id self.name = name self.author = author self....
27.6
80
0.613527
class Sources: def __init__(self,id,name,author,description,url,category,urlToImage,title): self.id = id self.name = name self.author = author self.description = description self.url = url self.category = category self.urlToImage = urlToImage self.titl...
true
true
1c2918edefb762270c0868976eff8fb29af82946
6,572
py
Python
rasa/utils/common.py
dimthe/rasa
90f37c70d982cac0bad38ecd8a082041f813cc25
[ "Apache-2.0" ]
null
null
null
rasa/utils/common.py
dimthe/rasa
90f37c70d982cac0bad38ecd8a082041f813cc25
[ "Apache-2.0" ]
null
null
null
rasa/utils/common.py
dimthe/rasa
90f37c70d982cac0bad38ecd8a082041f813cc25
[ "Apache-2.0" ]
null
null
null
import logging import os from typing import Any, Callable, Dict, List, Text, Optional, Union import rasa.core.utils import rasa.utils.io from rasa.constants import ( GLOBAL_USER_CONFIG_PATH, DEFAULT_LOG_LEVEL, ENV_LOG_LEVEL, DEFAULT_LOG_LEVEL_LIBRARIES, ENV_LOG_LEVEL_LIBRARIES, ) logger = logging....
32.534653
88
0.701461
import logging import os from typing import Any, Callable, Dict, List, Text, Optional, Union import rasa.core.utils import rasa.utils.io from rasa.constants import ( GLOBAL_USER_CONFIG_PATH, DEFAULT_LOG_LEVEL, ENV_LOG_LEVEL, DEFAULT_LOG_LEVEL_LIBRARIES, ENV_LOG_LEVEL_LIBRARIES, ) logger = logging....
true
true
1c29190914e929cd8d50f58b5af67436b3049257
4,578
py
Python
cmsplugin_blog_language_publish/admin.py
bitmazk/cmsplugin-blog-language-publish
7eed9ac606c3e2ef8459b737245ceb215bccbd91
[ "MIT" ]
null
null
null
cmsplugin_blog_language_publish/admin.py
bitmazk/cmsplugin-blog-language-publish
7eed9ac606c3e2ef8459b737245ceb215bccbd91
[ "MIT" ]
3
2020-02-11T23:22:31.000Z
2021-06-10T18:45:51.000Z
cmsplugin_blog_language_publish/admin.py
bitmazk/cmsplugin-blog-language-publish
7eed9ac606c3e2ef8459b737245ceb215bccbd91
[ "MIT" ]
null
null
null
"""Admin classes for the ``cmsplugin_blog_language_publish`` app.""" from django.contrib import admin from django.core.exceptions import ObjectDoesNotExist from django.utils.translation import get_language from django.utils.translation import ugettext_lazy as _ from cmsplugin_blog.models import Entry from cmsplugin_bl...
33.911111
79
0.653997
from django.contrib import admin from django.core.exceptions import ObjectDoesNotExist from django.utils.translation import get_language from django.utils.translation import ugettext_lazy as _ from cmsplugin_blog.models import Entry from cmsplugin_blog.admin import EntryAdmin, EntryForm from simple_translation.transl...
true
true
1c29197203fee22088363125a295770d6402b32f
103
py
Python
main.py
ncgc/SystemProcess
0b027fab9993fb2760969b604984c4e8a680e0d4
[ "MIT" ]
null
null
null
main.py
ncgc/SystemProcess
0b027fab9993fb2760969b604984c4e8a680e0d4
[ "MIT" ]
null
null
null
main.py
ncgc/SystemProcess
0b027fab9993fb2760969b604984c4e8a680e0d4
[ "MIT" ]
null
null
null
from program.menu import Menu def main(): Menu.defineProcess() if __name__ == '__main__': main()
12.875
29
0.68932
from program.menu import Menu def main(): Menu.defineProcess() if __name__ == '__main__': main()
true
true
1c291995875ffdbaf2b004e09b9ab7b1b86cbba5
466
py
Python
Ene-Jun-2020/alvarado-lara-luz-deorela-sabas/SegundoParcial/BreakingBad-App/app/populate.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
41
2017-09-26T09:36:32.000Z
2022-03-19T18:05:25.000Z
Ene-Jun-2020/alvarado-lara-luz-deorela-sabas/SegundoParcial/BreakingBad-App/app/populate.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
67
2017-09-11T05:06:12.000Z
2022-02-14T04:44:04.000Z
Ene-Jun-2020/alvarado-lara-luz-deorela-sabas/SegundoParcial/BreakingBad-App/app/populate.py
Arbupa/DAS_Sistemas
52263ab91436b2e5a24ce6f8493aaa2e2fe92fb1
[ "MIT" ]
210
2017-09-01T00:10:08.000Z
2022-03-19T18:05:12.000Z
from models import * from character import * def main(): char = Personaje() data = char.getCharacter() for x in data: try: raw = x if raw: person, created = Character.get_or_create(**raw) print(f"Character {'Created' if created else 'Existin...
21.181818
92
0.54721
from models import * from character import * def main(): char = Personaje() data = char.getCharacter() for x in data: try: raw = x if raw: person, created = Character.get_or_create(**raw) print(f"Character {'Created' if created else 'Existin...
true
true
1c2919a97017a47de6de687ba45486568e7a1541
733
py
Python
django_messaging/urls.py
PaulcyMboungou/django-messaging
1e326c54150914fa65d427aecfe8052e5efc8475
[ "BSD-3-Clause" ]
null
null
null
django_messaging/urls.py
PaulcyMboungou/django-messaging
1e326c54150914fa65d427aecfe8052e5efc8475
[ "BSD-3-Clause" ]
null
null
null
django_messaging/urls.py
PaulcyMboungou/django-messaging
1e326c54150914fa65d427aecfe8052e5efc8475
[ "BSD-3-Clause" ]
null
null
null
from django.conf.urls.defaults import * urlpatterns = patterns('django_messaging.views', (r'^$', 'index'), (r'^read_first_pm/$', 'messages.read_first_pm'), (r'^read_pm/(?P<message_id>\w+)/$', 'messages.read_pm'), (r'^load_num_msgs/$', 'messages.load_num_msgs'), (r'^load_msgs_list/$', 'messages...
45.8125
76
0.622101
from django.conf.urls.defaults import * urlpatterns = patterns('django_messaging.views', (r'^$', 'index'), (r'^read_first_pm/$', 'messages.read_first_pm'), (r'^read_pm/(?P<message_id>\w+)/$', 'messages.read_pm'), (r'^load_num_msgs/$', 'messages.load_num_msgs'), (r'^load_msgs_list/$', 'messages...
true
true
1c291a0cdf07ba9e83c9e309f838b3681c146936
5,095
py
Python
clumioapi/models/consolidated_alert_parent_entity.py
clumio-code/clumio-python-sdk
63bfaf3afed5c0ab4bae3dd1be52271249d07c51
[ "Apache-2.0" ]
null
null
null
clumioapi/models/consolidated_alert_parent_entity.py
clumio-code/clumio-python-sdk
63bfaf3afed5c0ab4bae3dd1be52271249d07c51
[ "Apache-2.0" ]
1
2021-09-16T05:56:05.000Z
2021-09-16T05:56:05.000Z
clumioapi/models/consolidated_alert_parent_entity.py
clumio-code/clumio-python-sdk
63bfaf3afed5c0ab4bae3dd1be52271249d07c51
[ "Apache-2.0" ]
null
null
null
# # Copyright 2021. Clumio, Inc. # from typing import Any, Dict, Mapping, Optional, Sequence, Type, TypeVar T = TypeVar('T', bound='ConsolidatedAlertParentEntity') class ConsolidatedAlertParentEntity: """Implementation of the 'ConsolidatedAlertParentEntity' model. The entity associated with or affected by ...
54.784946
92
0.344063
from typing import Any, Dict, Mapping, Optional, Sequence, Type, TypeVar T = TypeVar('T', bound='ConsolidatedAlertParentEntity') class ConsolidatedAlertParentEntity: _names = {'id': 'id', 'type': 'type', 'value': 'value'} def __init__(self, id: str = None, type: str = None, value: str = None) -> N...
true
true
1c291a9577c734a2b10602b147ba12bb08318510
905
py
Python
ml2020spring-hw1/simple_test.py
lunaticlab/python_try
f47b588138cf79063d0969eebb64a96a3caaf669
[ "MIT" ]
null
null
null
ml2020spring-hw1/simple_test.py
lunaticlab/python_try
f47b588138cf79063d0969eebb64a96a3caaf669
[ "MIT" ]
null
null
null
ml2020spring-hw1/simple_test.py
lunaticlab/python_try
f47b588138cf79063d0969eebb64a96a3caaf669
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Apr 1 03:34:39 2021 @author: 劉之岳 """ x=-20;xnew=0 r=0.1 #learning_rate count=0 # function=(2x+1)^2 求 minimum while True : count+=1 if count==10: break xnew=x*(1-8*r)-4*r x=xnew # print(xnew) print("ans",xnew) x1=1;x2=1 #feature data w1=10;w2=5;#gu...
17.403846
50
0.59779
x=-20;xnew=0 r=0.1 count=0 while True : count+=1 if count==10: break xnew=x*(1-8*r)-4*r x=xnew print("ans",xnew) x1=1;x2=1 w1=10;w2=5; count=0 function=w1^2*x1+w2^2*x2 while True: count+=1 if count==10: break w1_new=w1*(1-2*r) w2_new=w2*(1-2*r) w1=w1_new ...
true
true
1c291bc9fb90922a60753daafa94fe75d9c36600
2,401
py
Python
xlsxwriter/test/comparison/test_chart_high_low_lines02.py
alecxe/XlsxWriter
b58796258c504c8b343d9b0e77f8571eb994b31a
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_chart_high_low_lines02.py
alecxe/XlsxWriter
b58796258c504c8b343d9b0e77f8571eb994b31a
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
xlsxwriter/test/comparison/test_chart_high_low_lines02.py
alecxe/XlsxWriter
b58796258c504c8b343d9b0e77f8571eb994b31a
[ "BSD-2-Clause-FreeBSD" ]
1
2020-04-12T16:44:58.000Z
2020-04-12T16:44:58.000Z
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013, John McNamara, jmcnamara@cpan.org # import unittest import os from ...workbook import Workbook from ..helperfunctions import _compare_xlsx_files class TestCompareXLSXFiles(unittest.TestC...
25.542553
79
0.493544
true
true
1c291c7f0c3c1f7a9901e69c559bf9ad5d911daa
3,391
py
Python
CK.py
y894577/FocusDiscrimination
b8c44cce0a0a61e5c86bcdbace970e5b7813c2a7
[ "Apache-2.0" ]
3
2020-03-26T01:41:27.000Z
2021-04-29T06:53:29.000Z
CK.py
y894577/FocusDiscrimination
b8c44cce0a0a61e5c86bcdbace970e5b7813c2a7
[ "Apache-2.0" ]
1
2020-09-28T01:35:19.000Z
2020-10-14T12:56:21.000Z
CK.py
y894577/FocusDiscrimination
b8c44cce0a0a61e5c86bcdbace970e5b7813c2a7
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function from PIL import Image import numpy as np import h5py import torch.utils.data as data import pickle class CK(data.Dataset): """`CK+ Dataset. Args: train (bool, optional): If True, creates dataset from training set, otherwise creates from test set. ...
37.263736
91
0.585078
from __future__ import print_function from PIL import Image import numpy as np import h5py import torch.utils.data as data import pickle class CK(data.Dataset): def __init__(self, split='Training', fold=1, transform=None): self.transform = transform self.split = split self.fold = fold ...
true
true
1c291ca7e779dadec3d816caf91068e556c82de3
858
py
Python
osmchadjango/supervise/migrations/0011_auto_20170720_1914.py
juusokor/osmcha-django
5daafa015d5e341aa8ad6f847be2b7cc1a204e2b
[ "BSD-2-Clause" ]
27
2015-09-06T00:39:39.000Z
2021-12-09T10:30:52.000Z
osmchadjango/supervise/migrations/0011_auto_20170720_1914.py
juusokor/osmcha-django
5daafa015d5e341aa8ad6f847be2b7cc1a204e2b
[ "BSD-2-Clause" ]
494
2015-09-10T19:39:38.000Z
2022-03-29T08:07:37.000Z
osmchadjango/supervise/migrations/0011_auto_20170720_1914.py
juusokor/osmcha-django
5daafa015d5e341aa8ad6f847be2b7cc1a204e2b
[ "BSD-2-Clause" ]
17
2015-08-10T22:58:56.000Z
2021-09-24T17:03:16.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2017-07-20 19:14 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('supervise', '0010_areaofinterest_date'), ] operations = [ migrations.AlterM...
28.6
124
0.604895
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('supervise', '0010_areaofinterest_date'), ] operations = [ migrations.AlterModelOptions( name='areaofinterest', options={'o...
true
true
1c291da397df110360edb67fba7fa92f4d608f7c
6,860
py
Python
modules/database.py
LouisBluhm/PyBot
8f84792e2331e7019a454533f476a8045428b680
[ "MIT" ]
3
2016-02-16T23:49:59.000Z
2016-02-24T12:55:41.000Z
modules/database.py
kritzware/kritzbot-legacy
8f84792e2331e7019a454533f476a8045428b680
[ "MIT" ]
72
2016-02-16T23:51:01.000Z
2016-03-01T17:02:15.000Z
modules/database.py
kritzware/PyBot
8f84792e2331e7019a454533f476a8045428b680
[ "MIT" ]
null
null
null
import pymysql import re import string import logging, coloredlogs from modules.config import * class Database: def __init__(self, host, user, password, name, autocommit): self.host = host self.user = user self.password = password self.name = name self.autocommit = autocommit self.db = self.database_conn...
33.300971
168
0.708601
import pymysql import re import string import logging, coloredlogs from modules.config import * class Database: def __init__(self, host, user, password, name, autocommit): self.host = host self.user = user self.password = password self.name = name self.autocommit = autocommit self.db = self.database_conn...
true
true
1c291db01d179a979e4cc06d1ffb2c727a81e920
1,191
py
Python
testing/test_integration.py
chrisjbillington/setuptools_scm
6ad91d0085acc8091f2336faaf4710c1bae4cf18
[ "MIT" ]
null
null
null
testing/test_integration.py
chrisjbillington/setuptools_scm
6ad91d0085acc8091f2336faaf4710c1bae4cf18
[ "MIT" ]
null
null
null
testing/test_integration.py
chrisjbillington/setuptools_scm
6ad91d0085acc8091f2336faaf4710c1bae4cf18
[ "MIT" ]
null
null
null
import sys import pytest from setuptools_scm.utils import do @pytest.fixture def wd(wd): try: wd("git init") except FileNotFoundError: pytest.skip("git executable not found") wd("git config user.email test@example.com") wd('git config user.name "a test"') wd.add_command = "git a...
27.697674
66
0.65827
import sys import pytest from setuptools_scm.utils import do @pytest.fixture def wd(wd): try: wd("git init") except FileNotFoundError: pytest.skip("git executable not found") wd("git config user.email test@example.com") wd('git config user.name "a test"') wd.add_command = "git a...
true
true
1c291e52e7d4c7ce6af02e7e97b0ceb2af221890
969
py
Python
education4less/scholarships/migrations/0006_scholar.py
xarielx/education4less
24de746d859a859a7413917fcbbb2dcdaa440521
[ "MIT" ]
1
2020-02-05T02:21:25.000Z
2020-02-05T02:21:25.000Z
education4less/scholarships/migrations/0006_scholar.py
xarielx/education4less
24de746d859a859a7413917fcbbb2dcdaa440521
[ "MIT" ]
8
2020-02-12T03:03:26.000Z
2022-02-10T09:56:49.000Z
education4less/scholarships/migrations/0006_scholar.py
xarielx/education4less
24de746d859a859a7413917fcbbb2dcdaa440521
[ "MIT" ]
null
null
null
# Generated by Django 2.2.4 on 2019-12-03 06:21 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scholarships', '0005_auto_20191203_0054'), ] operations = [ migrations.CreateModel( name='Scholar', fields=[ ...
35.888889
114
0.589267
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('scholarships', '0005_auto_20191203_0054'), ] operations = [ migrations.CreateModel( name='Scholar', fields=[ ('id', models.AutoField(auto_created=T...
true
true
1c291fb56a01ec74f361fa2020e81268fc4991b0
599
py
Python
recommendations/kujikatsu/243/c.py
takelifetime/competitive-programming
e7cf8ef923ccefad39a1727ca94c610d650fcb76
[ "BSD-2-Clause" ]
null
null
null
recommendations/kujikatsu/243/c.py
takelifetime/competitive-programming
e7cf8ef923ccefad39a1727ca94c610d650fcb76
[ "BSD-2-Clause" ]
1
2021-01-02T06:36:51.000Z
2021-01-02T06:36:51.000Z
recommendations/kujikatsu/243/c.py
takelifetime/competitive-programming
e7cf8ef923ccefad39a1727ca94c610d650fcb76
[ "BSD-2-Clause" ]
null
null
null
from itertools import accumulate n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) s = sum(a) if s < sum(b): print(-1) else: count = 0 need = 0 supp = [] for x, y in zip(a, b): if x < y: count += 1 need += y - x else: ...
23.038462
65
0.45409
from itertools import accumulate n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) s = sum(a) if s < sum(b): print(-1) else: count = 0 need = 0 supp = [] for x, y in zip(a, b): if x < y: count += 1 need += y - x else: ...
true
true
1c291fc07a2eeec9ff6964a9779c54698cdcf1da
3,839
py
Python
align/reID/aligned_reid/dataset/__init__.py
existentmember7/TEMP_monitor
b8116f4c134793c4caa22eda78f90dd24d0cad30
[ "MIT" ]
1
2020-09-29T07:12:01.000Z
2020-09-29T07:12:01.000Z
align/reID/aligned_reid/dataset/__init__.py
existentmember7/TEMP_monitor
b8116f4c134793c4caa22eda78f90dd24d0cad30
[ "MIT" ]
null
null
null
align/reID/aligned_reid/dataset/__init__.py
existentmember7/TEMP_monitor
b8116f4c134793c4caa22eda78f90dd24d0cad30
[ "MIT" ]
null
null
null
from .TestSet import TestSet from .TrainSet import TrainSet from ..utils.dataset_utils import parse_im_name from ..utils.utils import load_pickle import numpy as np import os.path as osp ospj = osp.join ospeu = osp.expanduser def create_dataset( name='market1501', part='trainval', **kwargs): ...
30.468254
82
0.570722
from .TestSet import TestSet from .TrainSet import TrainSet from ..utils.dataset_utils import parse_im_name from ..utils.utils import load_pickle import numpy as np import os.path as osp ospj = osp.join ospeu = osp.expanduser def create_dataset( name='market1501', part='trainval', **kwargs): ...
true
true
1c291fd6c4eccffdabd848b77e32daa734eae0bf
369
py
Python
meal_planner/recipes/migrations/0002_auto_20150104_1942.py
brandonw/meal_planner
63200e6987b2794313492bfd3153d68b762f9b84
[ "BSD-3-Clause" ]
1
2016-06-16T15:03:34.000Z
2016-06-16T15:03:34.000Z
meal_planner/recipes/migrations/0002_auto_20150104_1942.py
brandonw/meal_planner
63200e6987b2794313492bfd3153d68b762f9b84
[ "BSD-3-Clause" ]
null
null
null
meal_planner/recipes/migrations/0002_auto_20150104_1942.py
brandonw/meal_planner
63200e6987b2794313492bfd3153d68b762f9b84
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('recipes', '0001_initial'), ] operations = [ migrations.AlterUniqueTogether( name='recipe', unique_to...
19.421053
52
0.593496
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('recipes', '0001_initial'), ] operations = [ migrations.AlterUniqueTogether( name='recipe', unique_together=set([('user', 'n...
true
true
1c2920477257855bd2d6c98733ba45457d1fd165
151
py
Python
src/link_shortener/models/short_url.py
sirfuzzalot/serverless-link-shortener
2136ba6681f3428e74accd1106b89161429cac34
[ "MIT" ]
null
null
null
src/link_shortener/models/short_url.py
sirfuzzalot/serverless-link-shortener
2136ba6681f3428e74accd1106b89161429cac34
[ "MIT" ]
null
null
null
src/link_shortener/models/short_url.py
sirfuzzalot/serverless-link-shortener
2136ba6681f3428e74accd1106b89161429cac34
[ "MIT" ]
null
null
null
""" Shortened URL containing Id """ from pydantic import BaseModel, HttpUrl class ShortUrl(BaseModel): """The shortened URL""" url: HttpUrl
13.727273
39
0.695364
from pydantic import BaseModel, HttpUrl class ShortUrl(BaseModel): url: HttpUrl
true
true
1c29214ba29ec55c33defe881686a91be454175c
5,864
py
Python
azure-mgmt-resource/azure/mgmt/resource/links/management_link_client.py
azuresdkci1x/azure-sdk-for-python-1722
e08fa6606543ce0f35b93133dbb78490f8e6bcc9
[ "MIT" ]
1
2018-11-09T06:16:34.000Z
2018-11-09T06:16:34.000Z
azure-mgmt-resource/azure/mgmt/resource/links/management_link_client.py
azuresdkci1x/azure-sdk-for-python-1722
e08fa6606543ce0f35b93133dbb78490f8e6bcc9
[ "MIT" ]
null
null
null
azure-mgmt-resource/azure/mgmt/resource/links/management_link_client.py
azuresdkci1x/azure-sdk-for-python-1722
e08fa6606543ce0f35b93133dbb78490f8e6bcc9
[ "MIT" ]
1
2018-11-09T06:17:41.000Z
2018-11-09T06:17:41.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
50.119658
383
0.734482
from msrest.service_client import ServiceClient from msrest import Serializer, Deserializer from msrestazure import AzureConfiguration from .version import VERSION from .operations.resource_links_operations import ResourceLinksOperations from . import models class ManagementLinkClientConfiguration(AzureCon...
true
true
1c2922af77762e93959fcd7569cf5c5b931ee1d4
3,129
py
Python
test/ggui_axis3d_test.py
Rabmelon/taichiCourse01_ZLei_task1
778ac3ce9b576bfdd207e4db7a5227a90c3b154b
[ "MIT" ]
1
2021-10-04T06:41:15.000Z
2021-10-04T06:41:15.000Z
test/ggui_axis3d_test.py
Rabmelon/taichiCourse01_ZLei_task1
778ac3ce9b576bfdd207e4db7a5227a90c3b154b
[ "MIT" ]
null
null
null
test/ggui_axis3d_test.py
Rabmelon/taichiCourse01_ZLei_task1
778ac3ce9b576bfdd207e4db7a5227a90c3b154b
[ "MIT" ]
null
null
null
import taichi as ti ti.init() # use a cube to understand how ggui scene and canvas work # create gui parameters my_ggui = ti.ui.Window("test-3D", (1000, 600)) my_canvas = my_ggui.get_canvas() my_scene = ti.ui.Scene() my_camera = ti.ui.make_camera() flag_RMB = False # cube parameters pos_axis = ti.Vector.field(3, ti....
33.645161
85
0.622244
import taichi as ti ti.init() my_ggui = ti.ui.Window("test-3D", (1000, 600)) my_canvas = my_ggui.get_canvas() my_scene = ti.ui.Scene() my_camera = ti.ui.make_camera() flag_RMB = False pos_axis = ti.Vector.field(3, ti.f32, shape=8) c_axis = ti.Vector.field(3, ti.f32, shape=8) pos_axis[0] = ti.Vector([0.0, 0.0, 0.0...
true
true
1c29232cd5ccbef0f3a2353ae1639da63525ea88
7,256
py
Python
autograd_minimize/base_wrapper.py
brunorigal/autograd_minimize
c405cd150d2d47c48a4b71f90ec312874d8788da
[ "MIT" ]
8
2021-05-24T09:30:34.000Z
2022-02-21T18:12:24.000Z
autograd_minimize/base_wrapper.py
brunorigal/autograd_minimize
c405cd150d2d47c48a4b71f90ec312874d8788da
[ "MIT" ]
1
2021-12-16T14:50:10.000Z
2022-02-04T08:56:34.000Z
autograd_minimize/base_wrapper.py
brunorigal/autograd_minimize
c405cd150d2d47c48a4b71f90ec312874d8788da
[ "MIT" ]
1
2022-02-25T20:47:21.000Z
2022-02-25T20:47:21.000Z
from abc import ABC, abstractmethod import numpy as np import scipy.optimize as sopt class BaseWrapper(ABC): def get_input(self, input_var): self.input_type = type(input_var) assert self.input_type in [ dict, list, np.ndarray], 'The initial input to your optimized function should be o...
35.223301
125
0.544653
from abc import ABC, abstractmethod import numpy as np import scipy.optimize as sopt class BaseWrapper(ABC): def get_input(self, input_var): self.input_type = type(input_var) assert self.input_type in [ dict, list, np.ndarray], 'The initial input to your optimized function should be o...
true
true
1c2923ed268d9607c43bb7b6bf8154bfed270b64
5,066
py
Python
.leetcode/599.minimum-index-sum-of-two-lists.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
.leetcode/599.minimum-index-sum-of-two-lists.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
.leetcode/599.minimum-index-sum-of-two-lists.py
KuiyuanFu/PythonLeetCode
8962df2fa838eb7ae48fa59de272ba55a89756d8
[ "MIT" ]
null
null
null
# @lc app=leetcode id=599 lang=python3 # # [599] Minimum Index Sum of Two Lists # # https://leetcode.com/problems/minimum-index-sum-of-two-lists/description/ # # algorithms # Easy (52.67%) # Likes: 946 # Dislikes: 273 # Total Accepted: 128.1K # Total Submissions: 242.9K # Testcase Example: '["Shogun","Tapioca Ex...
26.52356
149
0.57422
from imports import * class Solution: def findRestaurant(self, list1: List[str], list2: List[str]) -> List[str]: d = {} l = len(list1) + len(list2) res = [] for i, s in enumerate(list1): ...
true
true
1c29241dc272f8c605a71861cf714d605badb238
173
py
Python
tests/hub_test.py
pcarolan/cycles
dbfdf407f045f70c182590b2879a0570117570f0
[ "MIT" ]
null
null
null
tests/hub_test.py
pcarolan/cycles
dbfdf407f045f70c182590b2879a0570117570f0
[ "MIT" ]
null
null
null
tests/hub_test.py
pcarolan/cycles
dbfdf407f045f70c182590b2879a0570117570f0
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Tests for Cycles """ import pytest from cycles import Hub class TestHub: def test_tests(self): assert True
13.307692
25
0.630058
import pytest from cycles import Hub class TestHub: def test_tests(self): assert True
true
true
1c29259d96c411ecb6ba157d0433ad2182e810ad
116
py
Python
oauth/apps.py
enjoy-binbin/Django-blog
0fcf3709fabeee49874343b3a4ab80582698c466
[ "MIT" ]
111
2019-06-01T06:40:36.000Z
2021-11-14T19:57:22.000Z
oauth/apps.py
WyattPQ/Django-blog
eae42c30bd232442b305f8563c17b8b5ab5cf29e
[ "MIT" ]
19
2019-06-11T00:45:54.000Z
2022-03-11T23:47:53.000Z
oauth/apps.py
WyattPQ/Django-blog
eae42c30bd232442b305f8563c17b8b5ab5cf29e
[ "MIT" ]
24
2019-06-01T06:40:39.000Z
2020-10-11T14:03:08.000Z
from django.apps import AppConfig class OauthConfig(AppConfig): name = 'oauth' verbose_name = 'C-OAuth管理'
16.571429
33
0.715517
from django.apps import AppConfig class OauthConfig(AppConfig): name = 'oauth' verbose_name = 'C-OAuth管理'
true
true
1c2927cf1a445c9ca44b216f8f7d15432031eac4
3,208
py
Python
test/test_epifm.py
ecell/scopyon
99436fbfd34bb684966846eba75b206c2806f69c
[ "BSD-3-Clause" ]
6
2018-12-24T16:20:55.000Z
2021-06-12T20:50:04.000Z
test/test_epifm.py
ecell/bioimaging
99436fbfd34bb684966846eba75b206c2806f69c
[ "BSD-3-Clause" ]
9
2019-03-03T15:30:37.000Z
2020-08-27T05:48:33.000Z
test/test_epifm.py
ecell/scopyon
99436fbfd34bb684966846eba75b206c2806f69c
[ "BSD-3-Clause" ]
3
2019-03-05T22:51:38.000Z
2020-02-03T13:58:48.000Z
import unittest class TestEPIFM(unittest.TestCase): def setUp(self): self.radial_cutoff = 1000.0e-9 self.radial_resolution = 1.0e-9 def tearDown(self): pass def test1(self): import scopyon._epifm def test2(self): print('Testing TRITC ...') import num...
42.773333
198
0.679239
import unittest class TestEPIFM(unittest.TestCase): def setUp(self): self.radial_cutoff = 1000.0e-9 self.radial_resolution = 1.0e-9 def tearDown(self): pass def test1(self): import scopyon._epifm def test2(self): print('Testing TRITC ...') import num...
true
true
1c292833bfceca75697374dbe785a3fbb7422580
538
py
Python
cards/shield_up.py
MrCoft/EngiMod
65c90bd9231ac388d8af7849a1835914f1eefc78
[ "MIT" ]
null
null
null
cards/shield_up.py
MrCoft/EngiMod
65c90bd9231ac388d8af7849a1835914f1eefc78
[ "MIT" ]
null
null
null
cards/shield_up.py
MrCoft/EngiMod
65c90bd9231ac388d8af7849a1835914f1eefc78
[ "MIT" ]
null
null
null
from engi_mod import * Card( name = "Shield Up", type = "skill", target = "self", rarity = "uncommon", cost = 0, const = dict( BLOCK = 8, BLOCK_UPGRADE = 4, ), flags = dict( exhaust = "true", isInnate = "true", ), desc = "Gain !B! Block. NL Innate...
20.692308
84
0.520446
from engi_mod import * Card( name = "Shield Up", type = "skill", target = "self", rarity = "uncommon", cost = 0, const = dict( BLOCK = 8, BLOCK_UPGRADE = 4, ), flags = dict( exhaust = "true", isInnate = "true", ), desc = "Gain !B! Block. NL Innate...
true
true
1c2928ccf3deeb6210d4f67b668f122c8058a8dd
4,579
py
Python
tests/test_bs.py
jack17529/go-spacemesh
efa7538ba4fbb4ea90be43c827233a580c736e19
[ "MIT" ]
null
null
null
tests/test_bs.py
jack17529/go-spacemesh
efa7538ba4fbb4ea90be43c827233a580c736e19
[ "MIT" ]
null
null
null
tests/test_bs.py
jack17529/go-spacemesh
efa7538ba4fbb4ea90be43c827233a580c736e19
[ "MIT" ]
null
null
null
from pytest_testconfig import config as testconfig from tests import analyse, queries from tests.convenience import sleep_print_backwards from tests.hare.assert_hare import validate_hare from tests.setup_network import setup_network from tests.tx_generator import config as tx_gen_conf import tests.tx_generator.actions...
42.009174
116
0.74929
from pytest_testconfig import config as testconfig from tests import analyse, queries from tests.convenience import sleep_print_backwards from tests.hare.assert_hare import validate_hare from tests.setup_network import setup_network from tests.tx_generator import config as tx_gen_conf import tests.tx_generator.actions...
true
true