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
1c3cf4f2e8e52c39faa6724427da91d2ea0606a0
61
py
Python
aoc_2020/inputs/__init__.py
n1ckdm/advent-of-code-2020
913ea4cff29fa76df15c0c22616cc1eebb903490
[ "MIT" ]
1
2020-12-05T09:25:03.000Z
2020-12-05T09:25:03.000Z
aoc_2020/inputs/__init__.py
n1ckdm/advent-of-code-2020
913ea4cff29fa76df15c0c22616cc1eebb903490
[ "MIT" ]
null
null
null
aoc_2020/inputs/__init__.py
n1ckdm/advent-of-code-2020
913ea4cff29fa76df15c0c22616cc1eebb903490
[ "MIT" ]
null
null
null
from . import day1, day2, day3, day4, day5, day6, day7, day8
30.5
60
0.688525
from . import day1, day2, day3, day4, day5, day6, day7, day8
true
true
1c3cf597b1f7c1c09621ac009f4e4888a73adaa7
3,938
py
Python
floof/tests/functional/test_account.py
eevee/floof
431bb9b13bcff2823dd1ef58ffea16ea5858d031
[ "0BSD" ]
2
2016-05-21T23:36:23.000Z
2017-06-21T20:42:43.000Z
floof/tests/functional/test_account.py
silky/floof
431bb9b13bcff2823dd1ef58ffea16ea5858d031
[ "0BSD" ]
null
null
null
floof/tests/functional/test_account.py
silky/floof
431bb9b13bcff2823dd1ef58ffea16ea5858d031
[ "0BSD" ]
null
null
null
import time from itertools import chain from floof import model from floof.tests import FunctionalTests from floof.tests import sim class TestAccount(FunctionalTests): def setUp(self): """Creates a user to be used as a fake login.""" super(TestAccount, self).setUp() self.user = sim.sim...
41.020833
188
0.538852
import time from itertools import chain from floof import model from floof.tests import FunctionalTests from floof.tests import sim class TestAccount(FunctionalTests): def setUp(self): super(TestAccount, self).setUp() self.user = sim.sim_user() model.session.flush() self.defau...
true
true
1c3cf65bca8b32ffdc7f5648703f439cc1fcef05
1,142
py
Python
tests/hooks/test_itl.py
KevinMusgrave/pytorch-adapt
ff1491e1bfcc586afb8ee619712c8816ddf10358
[ "MIT" ]
131
2021-11-19T14:29:59.000Z
2022-03-26T16:33:30.000Z
tests/hooks/test_itl.py
KevinMusgrave/pytorch-adapt
ff1491e1bfcc586afb8ee619712c8816ddf10358
[ "MIT" ]
28
2021-11-19T17:31:56.000Z
2022-03-02T18:42:51.000Z
tests/hooks/test_itl.py
KevinMusgrave/pytorch-adapt
ff1491e1bfcc586afb8ee619712c8816ddf10358
[ "MIT" ]
8
2021-11-22T17:22:45.000Z
2022-03-08T15:49:28.000Z
import unittest import torch from pytorch_adapt.hooks import ISTLossHook from pytorch_adapt.layers import ISTLoss from .utils import assertRequiresGrad, get_models_and_data class TestITL(unittest.TestCase): def test_ist_loss_hook(self): torch.manual_seed(334) h = ISTLossHook() ( ...
24.826087
66
0.56655
import unittest import torch from pytorch_adapt.hooks import ISTLossHook from pytorch_adapt.layers import ISTLoss from .utils import assertRequiresGrad, get_models_and_data class TestITL(unittest.TestCase): def test_ist_loss_hook(self): torch.manual_seed(334) h = ISTLossHook() ( ...
true
true
1c3cf6e8c976e83bf88e7aa845b5902975dca457
12,271
py
Python
pypy3.6/multiprocess/synchronize.py
UniverseFly/multiprocess
97f67493eccfb893ac1bba7285cf452bfc640211
[ "BSD-3-Clause" ]
356
2015-06-21T21:05:10.000Z
2022-03-30T11:57:08.000Z
pypy3.6/multiprocess/synchronize.py
UniverseFly/multiprocess
97f67493eccfb893ac1bba7285cf452bfc640211
[ "BSD-3-Clause" ]
103
2015-06-22T01:44:14.000Z
2022-03-01T03:44:25.000Z
pypy3.6/multiprocess/synchronize.py
UniverseFly/multiprocess
97f67493eccfb893ac1bba7285cf452bfc640211
[ "BSD-3-Clause" ]
72
2015-09-02T14:10:24.000Z
2022-03-25T06:49:43.000Z
# # Module implementing synchronization primitives # # multiprocessing/synchronize.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # __all__ = [ 'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Condition', 'Event' ] import threading import sys import tempfile try: ...
29.783981
82
0.593106
__all__ = [ 'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Condition', 'Event' ] import threading import sys import tempfile try: import _multiprocess as _multiprocessing except ImportError: import _multiprocessing import time from . import context from . import process from . import util...
true
true
1c3cf75ca61656324cb0c4e896f264b63e114061
660
py
Python
bcbio/chipseq/__init__.py
YTLogos/bcbio-nextgen
f964a25ab74a31551273b7e50518f3451c90f473
[ "MIT" ]
1
2019-08-29T07:55:48.000Z
2019-08-29T07:55:48.000Z
bcbio/chipseq/__init__.py
YTLogos/bcbio-nextgen
f964a25ab74a31551273b7e50518f3451c90f473
[ "MIT" ]
null
null
null
bcbio/chipseq/__init__.py
YTLogos/bcbio-nextgen
f964a25ab74a31551273b7e50518f3451c90f473
[ "MIT" ]
null
null
null
from bcbio.ngsalign.bowtie2 import filter_multimappers import bcbio.pipeline.datadict as dd from bcbio.log import logger def clean_chipseq_alignment(data): aligner = dd.get_aligner(data) data["raw_bam"] = dd.get_work_bam(data) if aligner: assert aligner == "bowtie2", "ChIP-seq only supported for bo...
41.25
97
0.7
from bcbio.ngsalign.bowtie2 import filter_multimappers import bcbio.pipeline.datadict as dd from bcbio.log import logger def clean_chipseq_alignment(data): aligner = dd.get_aligner(data) data["raw_bam"] = dd.get_work_bam(data) if aligner: assert aligner == "bowtie2", "ChIP-seq only supported for bo...
true
true
1c3cf765e59820e4e35f7d112297a7888f12c48a
1,029
py
Python
plotting/crs_benchmark.py
AlonFischer/SpatialDatabaseBench
1fe933bd4196ba17c687f04c37cb5a34acc6d824
[ "Apache-2.0" ]
1
2020-11-17T22:56:56.000Z
2020-11-17T22:56:56.000Z
plotting/crs_benchmark.py
AlonFischer/SpatialDatabaseBench
1fe933bd4196ba17c687f04c37cb5a34acc6d824
[ "Apache-2.0" ]
null
null
null
plotting/crs_benchmark.py
AlonFischer/SpatialDatabaseBench
1fe933bd4196ba17c687f04c37cb5a34acc6d824
[ "Apache-2.0" ]
null
null
null
import argparse import json import logging from bar_chart import create_bar_chart logger = logging.getLogger(__name__) if __name__ == "__main__": logging.basicConfig(level=logging.INFO) parser = argparse.ArgumentParser(description='Process some integers.') parser.add_argument('mode', metavar='M', type=str...
35.482759
93
0.662779
import argparse import json import logging from bar_chart import create_bar_chart logger = logging.getLogger(__name__) if __name__ == "__main__": logging.basicConfig(level=logging.INFO) parser = argparse.ArgumentParser(description='Process some integers.') parser.add_argument('mode', metavar='M', type=str...
true
true
1c3cf80c7576baed4214a843ac7bd37860718704
5,831
py
Python
tacker-1.0.0/tacker/tests/functional/vnfm/test_tosca_vnf_alarm.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
null
null
null
tacker-1.0.0/tacker/tests/functional/vnfm/test_tosca_vnf_alarm.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
tacker-1.0.0/tacker/tests/functional/vnfm/test_tosca_vnf_alarm.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# # # 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 # ...
41.65
78
0.595953
import time from oslo_serialization import jsonutils from tacker.plugins.common import constants as evt_constants from tacker.tests import constants from tacker.tests.functional import base from tacker.tests.utils import read_file import yaml class VnfTestAlarmMonitor(base.BaseTackerTest): def _t...
true
true
1c3cf842406fc99a73b9ac61e512db5b70718811
2,563
py
Python
mcarch/views/user.py
Scotsguy/MCArchive
89847bab722c6782fa53c7b11ee83f1f5b2d9f05
[ "MIT" ]
null
null
null
mcarch/views/user.py
Scotsguy/MCArchive
89847bab722c6782fa53c7b11ee83f1f5b2d9f05
[ "MIT" ]
null
null
null
mcarch/views/user.py
Scotsguy/MCArchive
89847bab722c6782fa53c7b11ee83f1f5b2d9f05
[ "MIT" ]
null
null
null
from flask import Blueprint, render_template, url_for, redirect, abort, flash, request from flask_wtf import FlaskForm from wtforms.fields import StringField, PasswordField from wtforms.validators import DataRequired, Length, EqualTo from mcarch.app import db from mcarch.model.user import User, ResetToken from mcarch...
37.144928
90
0.676551
from flask import Blueprint, render_template, url_for, redirect, abort, flash, request from flask_wtf import FlaskForm from wtforms.fields import StringField, PasswordField from wtforms.validators import DataRequired, Length, EqualTo from mcarch.app import db from mcarch.model.user import User, ResetToken from mcarch...
true
true
1c3cfa0acfafe193db5cfa41f10534c110c52129
429
py
Python
app/schemas/stars.py
NewShadesDAO/api
1e66336f0ea526f245918ecdc328c9a66280be91
[ "CC0-1.0" ]
1
2022-03-21T07:37:02.000Z
2022-03-21T07:37:02.000Z
app/schemas/stars.py
NewShadesDAO/api
1e66336f0ea526f245918ecdc328c9a66280be91
[ "CC0-1.0" ]
25
2022-01-16T13:18:21.000Z
2022-03-29T13:08:19.000Z
app/schemas/stars.py
NewShadesDAO/api
1e66336f0ea526f245918ecdc328c9a66280be91
[ "CC0-1.0" ]
1
2022-01-15T21:42:00.000Z
2022-01-15T21:42:00.000Z
from typing import Optional from app.schemas.base import APIBaseCreateSchema, APIBaseSchema, PyObjectId class StarSchema(APIBaseSchema): user: PyObjectId type: str server: Optional[PyObjectId] channel: Optional[PyObjectId] message: Optional[PyObjectId] class StarCreateSchema(APIBaseCreateSchem...
20.428571
75
0.748252
from typing import Optional from app.schemas.base import APIBaseCreateSchema, APIBaseSchema, PyObjectId class StarSchema(APIBaseSchema): user: PyObjectId type: str server: Optional[PyObjectId] channel: Optional[PyObjectId] message: Optional[PyObjectId] class StarCreateSchema(APIBaseCreateSchem...
true
true
1c3cfad0ccfcabea2b8edff798ceb56c8550cd76
1,758
py
Python
tests/integration_tests/framework/constants.py
TS-at-WS/cloudify-manager
3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc
[ "Apache-2.0" ]
null
null
null
tests/integration_tests/framework/constants.py
TS-at-WS/cloudify-manager
3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc
[ "Apache-2.0" ]
null
null
null
tests/integration_tests/framework/constants.py
TS-at-WS/cloudify-manager
3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc
[ "Apache-2.0" ]
null
null
null
######## # Copyright (c) 2016 GigaSpaces Technologies Ltd. All rights reserved # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
42.878049
79
0.685438
true
true
1c3cfc86a4966f13275f8c8826ba69abb15a9450
17,426
py
Python
diagnnose/models/recurrent_lm.py
i-machine-think/diagnnose
4533347d1f2cc2959903ae667f99dccd4dda73ee
[ "MIT" ]
35
2019-06-12T13:50:39.000Z
2020-11-10T22:29:19.000Z
diagnnose/models/recurrent_lm.py
i-machine-think/diagnnose
4533347d1f2cc2959903ae667f99dccd4dda73ee
[ "MIT" ]
50
2019-04-07T20:22:54.000Z
2020-11-14T12:58:27.000Z
diagnnose/models/recurrent_lm.py
i-machine-think/diagnnose
4533347d1f2cc2959903ae667f99dccd4dda73ee
[ "MIT" ]
5
2019-06-06T13:37:29.000Z
2020-09-24T12:04:17.000Z
import os from itertools import product from typing import Dict, List, Optional, Tuple, Union import torch from torch import Tensor from torch.nn.functional import log_softmax from torch.nn.utils.rnn import PackedSequence, pack_padded_sequence from transformers import PreTrainedTokenizer from diagnnose.activations.se...
34.852
88
0.61546
import os from itertools import product from typing import Dict, List, Optional, Tuple, Union import torch from torch import Tensor from torch.nn.functional import log_softmax from torch.nn.utils.rnn import PackedSequence, pack_padded_sequence from transformers import PreTrainedTokenizer from diagnnose.activations.se...
true
true
1c3cfd10960e8cb0fa9737037f55a8dd619bf48c
771
py
Python
var/spack/repos/builtin/packages/py-dbfread/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
null
null
null
var/spack/repos/builtin/packages/py-dbfread/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
8
2021-11-09T20:28:40.000Z
2022-03-15T03:26:33.000Z
var/spack/repos/builtin/packages/py-dbfread/package.py
jeanbez/spack
f4e51ce8f366c85bf5aa0eafe078677b42dae1ba
[ "ECL-2.0", "Apache-2.0", "MIT-0", "MIT" ]
2
2019-02-08T20:37:20.000Z
2019-03-31T15:19:26.000Z
# Copyright 2013-2022 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack.package import * class PyDbfread(PythonPackage): """DBF is a file format used by databases such dBase, Vi...
36.714286
95
0.747082
from spack.package import * class PyDbfread(PythonPackage): homepage = "https://dbfread.readthedocs.io/en/latest/" pypi = "dbfread/dbfread-2.0.7.tar.gz" version('2.0.7', sha256='07c8a9af06ffad3f6f03e8fe91ad7d2733e31a26d2b72c4dd4cfbae07ee3b73d') depends_on('py-setuptools', type='build')
true
true
1c3cfd853bcc925edfd3cc3a2bc972d073ad2778
8,569
py
Python
sphinx/directives/patches.py
KunKaxx/sphinx
e1b9ebf80c1094ce438e24526ce8d0d178426196
[ "BSD-2-Clause" ]
1
2021-03-11T16:45:01.000Z
2021-03-11T16:45:01.000Z
sphinx/directives/patches.py
KunKaxx/sphinx
e1b9ebf80c1094ce438e24526ce8d0d178426196
[ "BSD-2-Clause" ]
2
2022-02-14T03:20:12.000Z
2022-03-02T10:44:31.000Z
sphinx/directives/patches.py
KunKaxx/sphinx
e1b9ebf80c1094ce438e24526ce8d0d178426196
[ "BSD-2-Clause" ]
null
null
null
""" sphinx.directives.patches ~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import warnings from os import path from typing import TYPE_CHECKING, Any, Dict, List, Tuple, cast from docutils import nodes ...
34.552419
95
0.603688
import os import warnings from os import path from typing import TYPE_CHECKING, Any, Dict, List, Tuple, cast from docutils import nodes from docutils.nodes import Node, make_id, system_message from docutils.parsers.rst import directives from docutils.parsers.rst.directives import html, images, tables from sphinx imp...
true
true
1c3cfdec1e0460ac241d2bc240200825dd339bf3
6,034
py
Python
client/tests/coverage_test.py
ekmixon/pyre-check
bd2475cc0cf4bef941f0aea6df10d674e6c907ab
[ "MIT" ]
null
null
null
client/tests/coverage_test.py
ekmixon/pyre-check
bd2475cc0cf4bef941f0aea6df10d674e6c907ab
[ "MIT" ]
null
null
null
client/tests/coverage_test.py
ekmixon/pyre-check
bd2475cc0cf4bef941f0aea6df10d674e6c907ab
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. import textwrap import unittest from typing import List import libcst as cst from ..commands.coverage import _collect_coverage class Cover...
30.321608
87
0.448956
import textwrap import unittest from typing import List import libcst as cst from ..commands.coverage import _collect_coverage class CoverageTest(unittest.TestCase): def assert_coverage_equal( self, file_content: str, expected_covered: List[int], expected_uncovered: List[int...
true
true
1c3cfe3579a1bc1564e265b4ea7718ba150055d8
17,473
py
Python
third_party/blink/renderer/build/scripts/core/css/css_properties.py
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
third_party/blink/renderer/build/scripts/core/css/css_properties.py
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
third_party/blink/renderer/build/scripts/core/css/css_properties.py
sarang-apps/darshan_browser
173649bb8a7c656dc60784d19e7bb73e07c20daa
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from blinkbuild.name_style_converter import NameStyleConverter from core.css.field_alias_expander import FieldAliasExpander import json...
44.917738
85
0.644366
from blinkbuild.name_style_converter import NameStyleConverter from core.css.field_alias_expander import FieldAliasExpander import json5_generator from make_origin_trials import OriginTrialsWriter from name_utilities import enum_key_for_css_property, id_for_css_property from name_utilities import enum_key_for_css_...
true
true
1c3cfe4d91f50f541d857bc7fa981149bea1a637
35,461
py
Python
c7n/resources/account.py
rentacenter/cloud-custodian
8d581193f851be3e9d988f2ace2cb4061a13417a
[ "Apache-2.0" ]
null
null
null
c7n/resources/account.py
rentacenter/cloud-custodian
8d581193f851be3e9d988f2ace2cb4061a13417a
[ "Apache-2.0" ]
null
null
null
c7n/resources/account.py
rentacenter/cloud-custodian
8d581193f851be3e9d988f2ace2cb4061a13417a
[ "Apache-2.0" ]
1
2021-02-16T21:24:09.000Z
2021-02-16T21:24:09.000Z
# Copyright 2016-2017 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
36.671148
99
0.567666
from __future__ import absolute_import, division, print_function, unicode_literals import json from botocore.exceptions import ClientError from datetime import datetime, timedelta from dateutil.parser import parse as parse_date from dateutil.tz import tzutc from c7n.actions import ActionRegistry, BaseAc...
true
true
1c3cfe6ec01ec9abd995a703e40d53328df8d86a
10,503
py
Python
coapthon/client/helperclient.py
8749236/CoAPthon3
995425c8a895408535261e1838824efa06d0adb1
[ "MIT" ]
null
null
null
coapthon/client/helperclient.py
8749236/CoAPthon3
995425c8a895408535261e1838824efa06d0adb1
[ "MIT" ]
null
null
null
coapthon/client/helperclient.py
8749236/CoAPthon3
995425c8a895408535261e1838824efa06d0adb1
[ "MIT" ]
null
null
null
import random from multiprocessing import Queue from queue import Empty import threading from coapthon.messages.message import Message from coapthon import defines from coapthon.client.coap import CoAP from coapthon.messages.request import Request from coapthon.utils import generate_random_token __author__ = 'Giacomo ...
34.100649
132
0.618776
import random from multiprocessing import Queue from queue import Empty import threading from coapthon.messages.message import Message from coapthon import defines from coapthon.client.coap import CoAP from coapthon.messages.request import Request from coapthon.utils import generate_random_token __author__ = 'Giacomo ...
true
true
1c3cfed7abfd74cc40d5ab87af96c1b18c682ab1
4,934
py
Python
research/object_detection/models/embedded_ssd_mobilenet_v2_feature_extractor.py
alexaway/object_detection_tf
b564b0a0b4e2bbfa82daf0b88becbd271296aff4
[ "Apache-2.0" ]
null
null
null
research/object_detection/models/embedded_ssd_mobilenet_v2_feature_extractor.py
alexaway/object_detection_tf
b564b0a0b4e2bbfa82daf0b88becbd271296aff4
[ "Apache-2.0" ]
null
null
null
research/object_detection/models/embedded_ssd_mobilenet_v2_feature_extractor.py
alexaway/object_detection_tf
b564b0a0b4e2bbfa82daf0b88becbd271296aff4
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
39.472
80
0.689704
import tensorflow as tf from object_detection.models import feature_map_generators from object_detection.models import ssd_mobilenet_v1_feature_extractor from object_detection.utils import ops from nets import mobilenet_v1 slim = tf.contrib.slim class EmbeddedSSDMobileNetV2FeatureExtractor( ssd_...
true
true
1c3cfee585e6e9b770943f5d2db88201edc2498c
487
py
Python
0582 Kill Process.py
MdAbedin/leetcode
e835f2e716ea5fe87f30b84801ede9bc023749e7
[ "MIT" ]
4
2020-09-11T02:36:11.000Z
2021-09-29T20:47:11.000Z
0582 Kill Process.py
MdAbedin/leetcode
e835f2e716ea5fe87f30b84801ede9bc023749e7
[ "MIT" ]
3
2020-09-10T03:51:42.000Z
2021-09-25T01:41:57.000Z
0582 Kill Process.py
MdAbedin/leetcode
e835f2e716ea5fe87f30b84801ede9bc023749e7
[ "MIT" ]
6
2020-09-10T03:46:15.000Z
2021-09-25T01:24:48.000Z
class Solution: def killProcess(self, pid: List[int], ppid: List[int], kill: int) -> List[int]: children = defaultdict(set) for i in range(len(ppid)): children[ppid[i]].add(pid[i]) bfs = deque([kill]) ans = [] while bfs: ...
25.631579
83
0.447639
class Solution: def killProcess(self, pid: List[int], ppid: List[int], kill: int) -> List[int]: children = defaultdict(set) for i in range(len(ppid)): children[ppid[i]].add(pid[i]) bfs = deque([kill]) ans = [] while bfs: ...
true
true
1c3cfffd2b5bd2349a0342b066c4b18a649ef76a
632
py
Python
orca/topology/alerts/properties.py
grzechukol/orca
374f0b1a0f43c723aef702d8cc39d318020583a0
[ "Apache-2.0" ]
74
2019-12-01T21:15:37.000Z
2022-03-22T09:33:12.000Z
orca/topology/alerts/properties.py
grzechukol/orca
374f0b1a0f43c723aef702d8cc39d318020583a0
[ "Apache-2.0" ]
80
2020-03-25T08:56:52.000Z
2021-07-11T09:53:27.000Z
orca/topology/alerts/properties.py
grzechukol/orca
374f0b1a0f43c723aef702d8cc39d318020583a0
[ "Apache-2.0" ]
16
2020-02-24T06:13:04.000Z
2021-05-30T03:36:33.000Z
# Copyright 2020 OpenRCA Authors # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
33.263158
74
0.745253
class AlertStatus: UP = 'up' DOWN = 'down'
true
true
1c3d0020a906b798dea8dbc1ac98c15bbe83e11a
3,250
py
Python
geometry/geometry.py
nulano/osm-map-viewer
1a4a4f3473cb83ce714fe3de370c7a0e904a5ea9
[ "Apache-2.0" ]
null
null
null
geometry/geometry.py
nulano/osm-map-viewer
1a4a4f3473cb83ce714fe3de370c7a0e904a5ea9
[ "Apache-2.0" ]
null
null
null
geometry/geometry.py
nulano/osm-map-viewer
1a4a4f3473cb83ce714fe3de370c7a0e904a5ea9
[ "Apache-2.0" ]
null
null
null
from collections import namedtuple from typing import List, Tuple import numpy as np _Point = Tuple[float, float] _Polygon = List[_Point] def _norm_polygon(polygon: _Polygon): if len(polygon) == 0: raise ValueError('Empty polygon') if polygon[0] != polygon[-1]: polygon = polygon + [polygon[...
36.516854
114
0.585538
from collections import namedtuple from typing import List, Tuple import numpy as np _Point = Tuple[float, float] _Polygon = List[_Point] def _norm_polygon(polygon: _Polygon): if len(polygon) == 0: raise ValueError('Empty polygon') if polygon[0] != polygon[-1]: polygon = polygon + [polygon[...
true
true
1c3d00deadda82cbcaac774421c60a2ba9c80f49
2,242
py
Python
py_wake/deflection_models/jimenez.py
aemoser/PyWake
889a2c10882195af21339e9bcf2ede0db9b58319
[ "MIT" ]
30
2019-03-18T14:10:27.000Z
2022-03-13T17:39:04.000Z
py_wake/deflection_models/jimenez.py
aemoser/PyWake
889a2c10882195af21339e9bcf2ede0db9b58319
[ "MIT" ]
1
2020-11-12T06:13:00.000Z
2020-11-12T06:43:26.000Z
py_wake/deflection_models/jimenez.py
aemoser/PyWake
889a2c10882195af21339e9bcf2ede0db9b58319
[ "MIT" ]
20
2019-01-11T14:45:13.000Z
2021-12-13T19:55:29.000Z
from numpy import newaxis as na import numpy as np from py_wake.deflection_models import DeflectionModel class JimenezWakeDeflection(DeflectionModel): """Implemented according to Jiménez, Á., Crespo, A. and Migoya, E. (2010), Application of a LES technique to characterize the wake deflection of a wind tur...
44.84
102
0.641838
from numpy import newaxis as na import numpy as np from py_wake.deflection_models import DeflectionModel class JimenezWakeDeflection(DeflectionModel): args4deflection = ['D_src_il', 'yaw_ilk', 'ct_ilk', 'tilt_ilk'] def __init__(self, N=20, beta=.1): self.beta = beta self.N = N def calc_...
true
true
1c3d014598670507432398bcd06b1750ca4b0e5f
2,337
py
Python
src/encoded/types/antibody.py
4dn-dcic/fourfron
29601961706d2371b982e57ae085e8ebec3b2714
[ "MIT" ]
11
2016-11-23T02:33:13.000Z
2021-06-18T14:21:20.000Z
src/encoded/types/antibody.py
4dn-dcic/fourfron
29601961706d2371b982e57ae085e8ebec3b2714
[ "MIT" ]
1,159
2016-11-21T15:40:24.000Z
2022-03-29T03:18:38.000Z
src/encoded/types/antibody.py
4dn-dcic/fourfron
29601961706d2371b982e57ae085e8ebec3b2714
[ "MIT" ]
5
2017-01-27T16:36:15.000Z
2019-06-14T14:39:54.000Z
"""The type file for the collection Antibody. logic for autopopulating 'antibody_id' unique key upon update or create """ from snovault import ( calculated_property, collection, load_schema, ) from .base import ( Item, get_item_or_none, lab_award_attribution_embed_list ) from .dependencies i...
33.869565
117
0.685066
from snovault import ( calculated_property, collection, load_schema, ) from .base import ( Item, get_item_or_none, lab_award_attribution_embed_list ) from .dependencies import DependencyEmbedder import string import re def _build_antibody_embedded_list(): antibody_target_embeds = Dependenc...
true
true
1c3d02c39b937cff1418c4a345c46b0064bb3a26
10,965
py
Python
models/2-Gleb/train/src/sampler.py
navekshasood/HuBMAP---Hacking-the-Kidney
018100fe4bfa5e8764b9df5a9d188e2c670ac061
[ "MIT" ]
null
null
null
models/2-Gleb/train/src/sampler.py
navekshasood/HuBMAP---Hacking-the-Kidney
018100fe4bfa5e8764b9df5a9d188e2c670ac061
[ "MIT" ]
null
null
null
models/2-Gleb/train/src/sampler.py
navekshasood/HuBMAP---Hacking-the-Kidney
018100fe4bfa5e8764b9df5a9d188e2c670ac061
[ "MIT" ]
null
null
null
import random import numpy as np from PIL import Image from typing import List, Tuple from functools import partial import rasterio from shapely import geometry from rasterio.windows import Window from tf_reader import TFReader from utils import jread, get_basics_rasterio, json_record_to_poly, flatten_2dlist, get_c...
34.158879
118
0.599088
import random import numpy as np from PIL import Image from typing import List, Tuple from functools import partial import rasterio from shapely import geometry from rasterio.windows import Window from tf_reader import TFReader from utils import jread, get_basics_rasterio, json_record_to_poly, flatten_2dlist, get_c...
true
true
1c3d03151846589500c26ac25d22bdf4a186706b
449
py
Python
mayan/apps/views/utils.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
2
2021-09-12T19:41:19.000Z
2021-09-12T19:41:20.000Z
mayan/apps/views/utils.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
37
2021-09-13T01:00:12.000Z
2021-10-02T03:54:30.000Z
mayan/apps/views/utils.py
CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons
0e4e919fd2e1ded6711354a0330135283e87f8c7
[ "Apache-2.0" ]
1
2021-09-22T13:17:30.000Z
2021-09-22T13:17:30.000Z
import logging from django.urls import resolve as django_resolve from django.urls.base import get_script_prefix from django.utils.encoding import force_text logger = logging.getLogger(name=__name__) def convert_to_id_list(items): return ','.join(map(force_text, items)) def resolve(path, urlconf=N...
26.411765
66
0.734967
import logging from django.urls import resolve as django_resolve from django.urls.base import get_script_prefix from django.utils.encoding import force_text logger = logging.getLogger(name=__name__) def convert_to_id_list(items): return ','.join(map(force_text, items)) def resolve(path, urlconf=N...
true
true
1c3d0388362e683a680943e188572f9095ce0cb5
409
py
Python
search.py
defigueredor/biorobotics_codes
11b121edee86906eed2da729424172ac64f14c12
[ "MIT" ]
null
null
null
search.py
defigueredor/biorobotics_codes
11b121edee86906eed2da729424172ac64f14c12
[ "MIT" ]
null
null
null
search.py
defigueredor/biorobotics_codes
11b121edee86906eed2da729424172ac64f14c12
[ "MIT" ]
null
null
null
import pyrosim import matplotlib.pyplot as plt from robot import ROBOT import random for i in range(0,10): sim=pyrosim.Simulator(eval_time=10000) robot=ROBOT(sim,random.random()*2-1) sim.start() #sim.wait_to_fnish() #sensorData = sim.get_sensor_data( sensor_id = P2) #print(sensorData) #f=plt.figur...
21.526316
54
0.718826
import pyrosim import matplotlib.pyplot as plt from robot import ROBOT import random for i in range(0,10): sim=pyrosim.Simulator(eval_time=10000) robot=ROBOT(sim,random.random()*2-1) sim.start()
true
true
1c3d03e6ad3a3d490aac5455ed5ac59ca9bf751a
5,154
py
Python
tests/test_primary_key_retrieval.py
edupo/sqlathanor
a5cfd349d092b25a3ffb3950b996b13878e1db17
[ "MIT" ]
101
2018-07-21T00:20:59.000Z
2022-02-09T21:33:09.000Z
tests/test_primary_key_retrieval.py
edupo/sqlathanor
a5cfd349d092b25a3ffb3950b996b13878e1db17
[ "MIT" ]
85
2018-06-16T02:15:08.000Z
2022-02-24T14:57:24.000Z
tests/test_primary_key_retrieval.py
edupo/sqlathanor
a5cfd349d092b25a3ffb3950b996b13878e1db17
[ "MIT" ]
6
2018-07-25T09:51:02.000Z
2022-02-24T14:04:27.000Z
# -*- coding: utf-8 -*- """ *********************************** tests.test_primary_key_retrieval *********************************** Tests for the :class:`BaseModel` ability to retrieve primary key data. """ import pytest from sqlathanor import Column from tests.fixtures import db_engine, tables, base_model, db_s...
32.415094
84
0.59934
import pytest from sqlathanor import Column from tests.fixtures import db_engine, tables, base_model, db_session, \ model_single_pk, model_composite_pk, instance_single_pk, instance_composite_pk @pytest.mark.parametrize('expected_count', [ (1), (3), ]) @pytest.mark.filterwarnings('ignore:This declara...
true
true
1c3d040f4315201e67a78d0383fc6b4002959c8a
5,843
py
Python
neuralnetwork/prepareData.py
Jpe230/DDatingApp
b515d35e63ac137ed5b3eefecf992d67f3c28eee
[ "MIT" ]
10
2021-08-14T23:16:10.000Z
2021-09-04T13:29:42.000Z
neuralnetwork/prepareData.py
JaimeTR/DDatingApp
b515d35e63ac137ed5b3eefecf992d67f3c28eee
[ "MIT" ]
null
null
null
neuralnetwork/prepareData.py
JaimeTR/DDatingApp
b515d35e63ac137ed5b3eefecf992d67f3c28eee
[ "MIT" ]
1
2021-08-15T00:59:01.000Z
2021-08-15T00:59:01.000Z
# System lib import os # Libraries for manipulating Dataset import cv2 import pickle import numpy as np import numpy from PIL import ImageEnhance # Libraries for downloading Dataset import zipfile import gdown import random from numpy.core.fromnumeric import resize # User-defined const import helpers import const ...
27.176744
107
0.6293
import os import cv2 import pickle import numpy as np import numpy from PIL import ImageEnhance import zipfile import gdown import random from numpy.core.fromnumeric import resize import helpers import const def extract_zipfile(): with zipfile.ZipFile(const.ZFILE) as zip_file: zip_file.extractall(...
true
true
1c3d0517292c37ca593463a29b3878b0db396f4d
810
py
Python
activatable_model/tests/migrations/0002_activatablemodelwrelandcascade.py
ambitioninc/django-activatable-model
e1967e44d97a03b1a6f1723aa3241bc56ab23eb7
[ "MIT" ]
16
2015-02-15T18:41:17.000Z
2021-04-13T15:53:45.000Z
activatable_model/tests/migrations/0002_activatablemodelwrelandcascade.py
ambitioninc/django-activatable-model
e1967e44d97a03b1a6f1723aa3241bc56ab23eb7
[ "MIT" ]
5
2015-03-30T17:40:10.000Z
2021-12-18T12:55:30.000Z
activatable_model/tests/migrations/0002_activatablemodelwrelandcascade.py
ambitioninc/django-activatable-model
e1967e44d97a03b1a6f1723aa3241bc56ab23eb7
[ "MIT" ]
9
2015-03-30T16:21:20.000Z
2018-10-08T14:38:33.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2017-06-28 17:24 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('tests', '0001_initial'), ] operations = [ mig...
28.928571
114
0.595062
from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('tests', '0001_initial'), ] operations = [ migrations.CreateModel( name='ActivatableModelWRelAndCascad...
true
true
1c3d05300ac651d2f2b1fc6dfee427ed62c3c89f
4,160
py
Python
mistune/plugins/footnotes.py
hroncok/mistune
e8fc67cc73bc8afcb0a620d2d4b762efff182516
[ "BSD-3-Clause" ]
1,957
2015-01-01T02:47:09.000Z
2022-03-26T04:09:23.000Z
mistune/plugins/footnotes.py
hroncok/mistune
e8fc67cc73bc8afcb0a620d2d4b762efff182516
[ "BSD-3-Clause" ]
872
2015-01-02T01:43:52.000Z
2019-04-02T20:30:10.000Z
mistune/plugins/footnotes.py
hroncok/mistune
e8fc67cc73bc8afcb0a620d2d4b762efff182516
[ "BSD-3-Clause" ]
278
2015-01-03T12:50:20.000Z
2022-02-14T18:58:37.000Z
import re from ..inline_parser import LINK_LABEL from ..util import unikey __all__ = ['plugin_footnotes'] #: inline footnote syntax looks like:: #: #: [^key] INLINE_FOOTNOTE_PATTERN = r'\[\^(' + LINK_LABEL + r')\]' #: define a footnote item like:: #: #: [^key]: paragraph text to describe the note DEF_FOOTNOTE ...
27.733333
76
0.603606
import re from ..inline_parser import LINK_LABEL from ..util import unikey __all__ = ['plugin_footnotes'] INLINE_FOOTNOTE_PATTERN = r'\[\^(' + LINK_LABEL + r')\]' DEF_FOOTNOTE = re.compile( r'( {0,3})\[\^(' + LINK_LABEL + r')\]:[ \t]*(' r'[^\n]*\n+' r'(?:\1 {1,3}(?! )[^\n]*\n+)*' r')' ) def p...
true
true
1c3d06b67b97624b61f4873867362c81c5177431
3,682
py
Python
aiida/engine/processes/futures.py
csadorf/aiida-core
dffff843e38ff6aa4819e521a1d51bb12e483ada
[ "MIT", "BSD-3-Clause" ]
null
null
null
aiida/engine/processes/futures.py
csadorf/aiida-core
dffff843e38ff6aa4819e521a1d51bb12e483ada
[ "MIT", "BSD-3-Clause" ]
17
2020-03-11T17:04:05.000Z
2020-05-01T09:34:45.000Z
aiida/engine/processes/futures.py
csadorf/aiida-core
dffff843e38ff6aa4819e521a1d51bb12e483ada
[ "MIT", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- ########################################################################### # Copyright (c), The AiiDA team. All rights reserved. # # This file is part of the AiiDA code. # # ...
43.317647
120
0.620043
true
true
1c3d071bb0d2fd667a0aa39a332e66b11b21250f
2,696
py
Python
robo/maximizers/direct.py
lebrice/RoBO
0cb58a1622d3a540f7714b239f0cedf048b6fd9f
[ "BSD-3-Clause" ]
455
2015-04-02T06:12:13.000Z
2022-02-28T10:54:29.000Z
robo/maximizers/direct.py
lebrice/RoBO
0cb58a1622d3a540f7714b239f0cedf048b6fd9f
[ "BSD-3-Clause" ]
66
2015-04-07T15:20:55.000Z
2021-06-04T16:40:46.000Z
robo/maximizers/direct.py
lebrice/RoBO
0cb58a1622d3a540f7714b239f0cedf048b6fd9f
[ "BSD-3-Clause" ]
188
2015-04-14T09:42:34.000Z
2022-03-31T21:04:53.000Z
import os import sys try: import DIRECT except ImportError: raise ImportError(""" In order to use this module, DIRECT need to be installed. Try running pip install direct """) import numpy as np from robo.maximizers.base_maximizer import BaseMaximizer class Direct(BaseMaximizer): d...
32.878049
101
0.528932
import os import sys try: import DIRECT except ImportError: raise ImportError(""" In order to use this module, DIRECT need to be installed. Try running pip install direct """) import numpy as np from robo.maximizers.base_maximizer import BaseMaximizer class Direct(BaseMaximizer): d...
true
true
1c3d077ae6a45bd5e200e15041fb33043040b04e
95
py
Python
ecactivity/apps.py
minlaxz/university-blog
4ff75adbeee3c32ea7bd2b647e06e8c5892c38a6
[ "MIT" ]
null
null
null
ecactivity/apps.py
minlaxz/university-blog
4ff75adbeee3c32ea7bd2b647e06e8c5892c38a6
[ "MIT" ]
null
null
null
ecactivity/apps.py
minlaxz/university-blog
4ff75adbeee3c32ea7bd2b647e06e8c5892c38a6
[ "MIT" ]
null
null
null
from django.apps import AppConfig class EcactivityConfig(AppConfig): name = 'ecactivity'
15.833333
34
0.768421
from django.apps import AppConfig class EcactivityConfig(AppConfig): name = 'ecactivity'
true
true
1c3d09dc17bc58a64b3b41021ca264b66d8e9b31
427
py
Python
tutorials/30-days-of-code/30-operators.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
41
2018-05-11T07:54:34.000Z
2022-03-29T19:02:32.000Z
tutorials/30-days-of-code/30-operators.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
2
2021-09-13T10:03:26.000Z
2021-10-04T10:21:05.000Z
tutorials/30-days-of-code/30-operators.py
PingHuskar/hackerrank
1bfdbc63de5d0f94cd9e6ae250476b4a267662f2
[ "Unlicense" ]
21
2019-01-23T19:06:59.000Z
2021-12-23T16:03:47.000Z
# Day 2: Operators # Start using arithmetic operators. # # https://www.hackerrank.com/challenges/30-operators/problem # #!/bin/python3 import sys if __name__ == "__main__": meal_cost = float(input().strip()) tip_percent = int(input().strip()) tax_percent = int(input().strip()) cost = meal_cost * (1 ...
22.473684
66
0.665105
import sys if __name__ == "__main__": meal_cost = float(input().strip()) tip_percent = int(input().strip()) tax_percent = int(input().strip()) cost = meal_cost * (1 + tip_percent / 100 + tax_percent / 100) print("The total meal cost is {:.0f} dollars.".format(cost))
true
true
1c3d0b27b2b88394656225fd9089618728ac2ef3
10,012
py
Python
conf.py
theTrueMikeBrown/SimpleIdentityServerDoc
10d3286f97124dc2760fb140ebbb1939d930ab71
[ "Apache-2.0" ]
null
null
null
conf.py
theTrueMikeBrown/SimpleIdentityServerDoc
10d3286f97124dc2760fb140ebbb1939d930ab71
[ "Apache-2.0" ]
null
null
null
conf.py
theTrueMikeBrown/SimpleIdentityServerDoc
10d3286f97124dc2760fb140ebbb1939d930ab71
[ "Apache-2.0" ]
null
null
null
import sphinx_rtd_theme # -*- coding: utf-8 -*- # # SimpleIdentityServer documentation build configuration file, created by # sphinx-quickstart on Mon Sep 26 14:24:57 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are prese...
29.274854
83
0.70825
import sphinx_rtd_theme extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = u'SimpleIdentityServer' copyright = u'2016, habart thierry' author = u'habart thierry' # |version| and |release|, also used in various other plac...
true
true
1c3d0bde10ae7f327ea370830c6e7edaa45fd6bb
172
py
Python
datainterface/__init__.py
adam2392/eegdatastorage
fc6fbaaa4d31df83b45e6d420d023fada62cfa8e
[ "Apache-2.0" ]
null
null
null
datainterface/__init__.py
adam2392/eegdatastorage
fc6fbaaa4d31df83b45e6d420d023fada62cfa8e
[ "Apache-2.0" ]
null
null
null
datainterface/__init__.py
adam2392/eegdatastorage
fc6fbaaa4d31df83b45e6d420d023fada62cfa8e
[ "Apache-2.0" ]
null
null
null
import sys if int(sys.version_info[0]) < 3: import dataconversion import savedata import readers import loadpatient import loadregions import utils
19.111111
32
0.715116
import sys if int(sys.version_info[0]) < 3: import dataconversion import savedata import readers import loadpatient import loadregions import utils
true
true
1c3d0bffa57b4581e8473797e651744d5505b184
992
py
Python
app/character.py
ZKemstedt/404notfound
d0634302f505e40347659e22ac6f4b7265c019c8
[ "MIT" ]
null
null
null
app/character.py
ZKemstedt/404notfound
d0634302f505e40347659e22ac6f4b7265c019c8
[ "MIT" ]
null
null
null
app/character.py
ZKemstedt/404notfound
d0634302f505e40347659e22ac6f4b7265c019c8
[ "MIT" ]
1
2021-09-27T15:58:29.000Z
2021-09-27T15:58:29.000Z
class Character(object): def __init__(self, name, initiative, health, power, evasion, treasure=0): self.name = name self.initiative = initiative self.health = health self.power = power self.evasion = evasion self.treasures = treasure def special_power(self): ...
30.060606
113
0.643145
class Character(object): def __init__(self, name, initiative, health, power, evasion, treasure=0): self.name = name self.initiative = initiative self.health = health self.power = power self.evasion = evasion self.treasures = treasure def special_power(self): ...
true
true
1c3d0c36608348ad1b32c901ca514941e4ddcfdf
5,276
py
Python
tools/render-ansible-tasks.py
smolar/tripleo-heat-templates
6b858eb39f96cc2a81a115246fd4a2ef6a0b0097
[ "Apache-2.0" ]
null
null
null
tools/render-ansible-tasks.py
smolar/tripleo-heat-templates
6b858eb39f96cc2a81a115246fd4a2ef6a0b0097
[ "Apache-2.0" ]
null
null
null
tools/render-ansible-tasks.py
smolar/tripleo-heat-templates
6b858eb39f96cc2a81a115246fd4a2ef6a0b0097
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # # Copyright 2019 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
41.21875
100
0.565201
import argparse import errno import json import os import sys import yaml import yaql def parse_opts(argv): parser = argparse.ArgumentParser( description='Render the Ansible tasks based in the role and the tags selected.' 'Those tasks can be used for debugging or linti...
true
true
1c3d0c8da724d8bd9913ca3e131905bf9cda0451
18,385
py
Python
google/cloud/aiplatform/v1/schema/trainingjob/definition_v1/types/automl_tables.py
nachocano/python-aiplatform
1c6b998d9145309d79712f494a2b00b50a9a9bf4
[ "Apache-2.0" ]
null
null
null
google/cloud/aiplatform/v1/schema/trainingjob/definition_v1/types/automl_tables.py
nachocano/python-aiplatform
1c6b998d9145309d79712f494a2b00b50a9a9bf4
[ "Apache-2.0" ]
1
2021-02-12T23:56:38.000Z
2021-02-12T23:56:38.000Z
google/cloud/aiplatform/v1/schema/trainingjob/definition_v1/types/automl_tables.py
nachocano/python-aiplatform
1c6b998d9145309d79712f494a2b00b50a9a9bf4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 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 o...
41.037946
166
0.633016
import proto from google.cloud.aiplatform.v1.schema.trainingjob.definition_v1.types import ( export_evaluated_data_items_config as gcastd_export_evaluated_data_items_config, ) __protobuf__ = proto.module( package="google.cloud.aiplatform.v1.schema.trainingjob.definition", manifest={"A...
true
true
1c3d0ca0828fa3b7b54f47b783abb541b09fb064
606
py
Python
IMS/product/migrations/0004_recipt_customer.py
AyushPaudel/Inventory-Management-System
04e57b0d02b1b7cade992b959569e750ca339c8e
[ "MIT" ]
2
2021-09-01T13:00:24.000Z
2021-11-19T12:16:52.000Z
IMS/product/migrations/0004_recipt_customer.py
aadarshadhakalg/Inventory-Management-System-1
075ec49b9d4abebb7d9a0b150a6cb70f6cbf5144
[ "MIT" ]
null
null
null
IMS/product/migrations/0004_recipt_customer.py
aadarshadhakalg/Inventory-Management-System-1
075ec49b9d4abebb7d9a0b150a6cb70f6cbf5144
[ "MIT" ]
1
2022-01-07T05:50:08.000Z
2022-01-07T05:50:08.000Z
# Generated by Django 3.2 on 2021-08-07 15:05 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('product', '0003_products_o...
27.545455
134
0.683168
from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('product', '0003_products_original_stock'), ] operations = [ ...
true
true
1c3d0d31c74257db4edef6bb746f9ab82098b25a
710
py
Python
nominations/migrations/0048_auto_20170804_1713.py
JoshZero87/site
c8024b805ff5ff0e16f54dce7bf05097fd2f08e0
[ "MIT" ]
4
2017-01-29T00:38:41.000Z
2019-09-04T14:30:24.000Z
nominations/migrations/0048_auto_20170804_1713.py
JoshZero87/site
c8024b805ff5ff0e16f54dce7bf05097fd2f08e0
[ "MIT" ]
74
2017-10-02T04:42:54.000Z
2022-01-13T00:44:16.000Z
nominations/migrations/0048_auto_20170804_1713.py
JoshZero87/site
c8024b805ff5ff0e16f54dce7bf05097fd2f08e0
[ "MIT" ]
3
2017-03-24T23:26:46.000Z
2019-10-21T01:16:03.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2017-08-04 17:13 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nominations', '0047_initiativeapplication_locality'), ] operations = [ migr...
33.809524
278
0.650704
from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('nominations', '0047_initiativeapplication_locality'), ] operations = [ migrations.AlterField( model_name='initiativeapplication', ...
true
true
1c3d0e63d40ffea8848cffbd1846ca02f64a99d4
2,126
py
Python
mai_experiments/run_experiments_mai_version/financial.py
joschout/tilde
1403b50842b83f2edd6b16b1fbe24b9bec2d0048
[ "Apache-2.0" ]
16
2019-03-06T06:11:33.000Z
2022-02-07T21:30:25.000Z
mai_experiments/run_experiments_mai_version/financial.py
joschout/tilde
1403b50842b83f2edd6b16b1fbe24b9bec2d0048
[ "Apache-2.0" ]
4
2019-10-08T14:48:23.000Z
2020-03-26T00:31:57.000Z
mai_experiments/run_experiments_mai_version/financial.py
krishnangovindraj/tilde
5243a02d92f375d56ffc49ab8c3d1a87e31e99b9
[ "Apache-2.0" ]
4
2019-08-14T05:40:47.000Z
2020-08-05T13:21:16.000Z
import os import sys from mai_version.fold.fold_file_parser import main_cross_validation from mai_version.main import kb_suffix, s_suffix, bg_suffix # CHANGE THESE TWO FOR EACH TEST test_name = 'financial' logic_name = 'financial-d-mod' # --- command-line printing settings --- debug_printing_tree_building = False d...
34.290323
118
0.742239
import os import sys from mai_version.fold.fold_file_parser import main_cross_validation from mai_version.main import kb_suffix, s_suffix, bg_suffix test_name = 'financial' logic_name = 'financial-d-mod' debug_printing_tree_building = False debug_printing_program_conversion = False debug_printing_get_classifier =...
true
true
1c3d0f852d0c8a67e4af49ba082a98715be1fef7
1,567
py
Python
tests/asynctest.py
netrack/bayes
15e0c54b795f4ce527cc5e2c46bbb7da434ac036
[ "Apache-2.0" ]
12
2019-07-15T11:15:23.000Z
2019-12-05T12:19:48.000Z
tests/asynctest.py
netrack/bayes
15e0c54b795f4ce527cc5e2c46bbb7da434ac036
[ "Apache-2.0" ]
10
2019-06-25T17:42:44.000Z
2019-07-09T13:28:12.000Z
tests/asynctest.py
netrack/tensorcraft
15e0c54b795f4ce527cc5e2c46bbb7da434ac036
[ "Apache-2.0" ]
1
2019-05-23T13:22:19.000Z
2019-05-23T13:22:19.000Z
import aiohttp.web import asyncio import typing import unittest import unittest.mock class AsyncMagicMock(unittest.mock.MagicMock): async def __call__(self, *args, **kwargs): return super().__call__(*args, **kwargs) class AsyncGeneratorMock(unittest.mock.MagicMock): """Mock async generator type ...
24.873016
76
0.675175
import aiohttp.web import asyncio import typing import unittest import unittest.mock class AsyncMagicMock(unittest.mock.MagicMock): async def __call__(self, *args, **kwargs): return super().__call__(*args, **kwargs) class AsyncGeneratorMock(unittest.mock.MagicMock): def __init__(self, *args, retur...
true
true
1c3d1382931acac4261b02aa85d074dd209e05c9
68
py
Python
Python Basics/For Loop/Lab/Task02.py
DonikaChervenkova/SoftUni
bff579c037ec48f39ed193b34bc3502a32e90732
[ "MIT" ]
1
2022-03-16T10:23:04.000Z
2022-03-16T10:23:04.000Z
Python Basics/For Loop/Lab/Task02.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
null
null
null
Python Basics/For Loop/Lab/Task02.py
IvanTodorovBG/SoftUni
7b667f6905d9f695ab1484efbb02b6715f6d569e
[ "MIT" ]
1
2021-12-04T12:30:57.000Z
2021-12-04T12:30:57.000Z
n = int(input()) for number in range(1, n + 1, 3): print(number)
22.666667
33
0.588235
n = int(input()) for number in range(1, n + 1, 3): print(number)
true
true
1c3d13e491754d362060f5e3585aa9afe9ae2b56
5,059
py
Python
doc/conf.py
eduardo-rodrigues/scikit-hep
ef5d04ac6a8d050b323247c784149d3408f6cf20
[ "BSD-3-Clause" ]
null
null
null
doc/conf.py
eduardo-rodrigues/scikit-hep
ef5d04ac6a8d050b323247c784149d3408f6cf20
[ "BSD-3-Clause" ]
null
null
null
doc/conf.py
eduardo-rodrigues/scikit-hep
ef5d04ac6a8d050b323247c784149d3408f6cf20
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Add the directory above this one, containing the skhep module, to the Python PATH variable. import os import sys sys.path.insert(0, os.path.abspath('..')) # -- General configuration ------------------------------------------------ # If your documentation needs a minimal Sphinx version, state...
29.412791
93
0.659617
import os import sys sys.path.insert(0, os.path.abspath('..')) extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.mathjax', 'sphinx.ext.autosummary', 'sphinx.ext.napoleon', 'nbsphinx', ] templates_path = ['_templates'] source_suffix = '.rst' master_do...
true
true
1c3d147f8e7eb64f16ccdd23267265fea188355e
9,795
py
Python
stubs.min/System/Windows/Media/__init___parts/GradientStop.py
denfromufa/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
1
2017-07-07T11:15:45.000Z
2017-07-07T11:15:45.000Z
stubs.min/System/Windows/Media/__init___parts/GradientStop.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
stubs.min/System/Windows/Media/__init___parts/GradientStop.py
hdm-dt-fb/ironpython-stubs
4d2b405eda3ceed186e8adca55dd97c332c6f49d
[ "MIT" ]
null
null
null
class GradientStop(Animatable,ISealable,IAnimatable,IResource,IFormattable): """ Describes the location and color of a transition point in a gradient. GradientStop() GradientStop(color: Color,offset: float) """ def Clone(self): """ Clone(self: GradientStop) -> GradientStop Creates a mo...
39.023904
215
0.723532
class GradientStop(Animatable,ISealable,IAnimatable,IResource,IFormattable): """ CloneCurrentValue(self: GradientStop) -> GradientStop Makes the instance a modifiable clone (deep copy) of the specified System.Windows.Freezable using current property values. Makes this System.Windows.Med...
true
true
1c3d1615225ed51405817fb1a5a00ca0ce6af73d
41,496
py
Python
tests/kafkatest/services/kafka/kafka.py
changqing98/kafka
2094711a2f0e2e5f38b07867ae221d98c077615a
[ "Apache-2.0" ]
2
2020-03-20T06:19:42.000Z
2020-03-20T06:19:44.000Z
tests/kafkatest/services/kafka/kafka.py
changqing98/kafka
2094711a2f0e2e5f38b07867ae221d98c077615a
[ "Apache-2.0" ]
15
2020-03-05T00:32:48.000Z
2022-02-16T00:55:24.000Z
tests/kafkatest/services/kafka/kafka.py
changqing98/kafka
2094711a2f0e2e5f38b07867ae221d98c077615a
[ "Apache-2.0" ]
1
2021-09-01T08:46:50.000Z
2021-09-01T08:46:50.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 use ...
46.209354
171
0.646351
import collections import json import os.path import re import signal import time from ducktape.services.service import Service from ducktape.utils.util import wait_until from ducktape.cluster.remoteaccount import RemoteCommandError from config import KafkaConfig from kafkatest.directory_layout.kafka_p...
true
true
1c3d167d460705b821782cf48d496c4d9b5c8928
1,575
py
Python
linalg_0424.py
Jianyang-Hu/numpypractice
f4d4a3e28f5dd10f9722f83b1ac66f0f2ccef8b9
[ "Apache-2.0" ]
null
null
null
linalg_0424.py
Jianyang-Hu/numpypractice
f4d4a3e28f5dd10f9722f83b1ac66f0f2ccef8b9
[ "Apache-2.0" ]
null
null
null
linalg_0424.py
Jianyang-Hu/numpypractice
f4d4a3e28f5dd10f9722f83b1ac66f0f2ccef8b9
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # @version : Python3.6 # @Time : 2017/4/24 16:31 # @Author : Jianyang-Hu # @contact : jianyang1993@163.com # @File : linalg_0424.py # @Software: PyCharm import numpy as np from numpy import * import sys import matplotlib.pyplot as plt from matplotlib.pyplot import plot from matplotlib.pyp...
23.507463
83
0.610159
import numpy as np from numpy import * import sys import matplotlib.pyplot as plt from matplotlib.pyplot import plot from matplotlib.pyplot import show ormed=True,lw=1) sigma = 1 mu = 0 plt.plot(bins,1/(sigma*np.sqrt(2*np.pi))*np.exp(-(bins - mu)**2/(2*sigma**2)),lw=2) plt.show()
true
true
1c3d16a76838293bfc8c7be2a4f8b3a9445ffebf
19,563
py
Python
seahub/api2/endpoints/dtable.py
JIMhackKING/seahub-1
c10ef67f2118287e6c0d4d194ef27f93ddff0164
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
seahub/api2/endpoints/dtable.py
JIMhackKING/seahub-1
c10ef67f2118287e6c0d4d194ef27f93ddff0164
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
seahub/api2/endpoints/dtable.py
JIMhackKING/seahub-1
c10ef67f2118287e6c0d4d194ef27f93ddff0164
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- import os import logging import time import jwt from rest_framework.views import APIView from rest_framework.authentication import SessionAuthentication from rest_framework.permissions import IsAuthenticated from rest_framework import status from rest_framework.response import Response from dj...
37.051136
101
0.623882
import os import logging import time import jwt from rest_framework.views import APIView from rest_framework.authentication import SessionAuthentication from rest_framework.permissions import IsAuthenticated from rest_framework import status from rest_framework.response import Response from django.utils.translation ...
true
true
1c3d17c860a284bbd0ff5cd1356a20460ce0be43
5,809
py
Python
JSON2OWL/otb2owl/otb2owl.py
houzw/knowledge-base-data
60771e8bf300227e1a26c9e77f56b09d23acd64a
[ "MIT" ]
null
null
null
JSON2OWL/otb2owl/otb2owl.py
houzw/knowledge-base-data
60771e8bf300227e1a26c9e77f56b09d23acd64a
[ "MIT" ]
null
null
null
JSON2OWL/otb2owl/otb2owl.py
houzw/knowledge-base-data
60771e8bf300227e1a26c9e77f56b09d23acd64a
[ "MIT" ]
1
2018-12-17T06:40:53.000Z
2018-12-17T06:40:53.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # author: houzhiwei # time: 2019/2/20 22:11 # TODO from owlready2 import * import json import re from JSON2OWL.OwlConvert.OwlUtils import OWLUtils from JSON2OWL.OwlConvert.Preprocessor import Preprocessor import datetime module_uri = 'http://www.egc.org/ont/process/otb' o...
33.005682
107
0.731107
from owlready2 import * import json import re from JSON2OWL.OwlConvert.OwlUtils import OWLUtils from JSON2OWL.OwlConvert.Preprocessor import Preprocessor import datetime module_uri = 'http://www.egc.org/ont/process/otb' onto = get_ontology(module_uri) onto, shacl, skos, dcterms, props, foaf = OWLUtils.load_comm...
true
true
1c3d17ee908cb860703746671fb358583533173f
28,660
py
Python
pandas/tools/rplot.py
danielballan/pandas
576818f169c0d494e74f787f7486d090e5e6662f
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
29
2015-01-08T19:20:37.000Z
2021-04-20T08:25:56.000Z
pandas/tools/rplot.py
danielballan/pandas
576818f169c0d494e74f787f7486d090e5e6662f
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
null
null
null
pandas/tools/rplot.py
danielballan/pandas
576818f169c0d494e74f787f7486d090e5e6662f
[ "PSF-2.0", "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause" ]
22
2015-01-02T12:14:20.000Z
2021-10-13T09:22:30.000Z
import random from copy import deepcopy from pandas.core.common import _values_from_object import numpy as np from pandas.compat import range, zip # # TODO: # * Make sure legends work properly # class Scale: """ Base class for mapping between graphical and data attributes. """ pass class ScaleGradien...
32.34763
137
0.554361
import random from copy import deepcopy from pandas.core.common import _values_from_object import numpy as np from pandas.compat import range, zip class Scale: pass class ScaleGradient(Scale): def __init__(self, column, colour1, colour2): self.column = column self.colour1 = colour1 ...
true
true
1c3d18bc1bb33eb2e502018ab53a1332e73e46b0
834
py
Python
h/presenters/user_json.py
jenkins-hypothesis/h
328be7f5fa3abf3f05aba73d2311cf1eaf7b2277
[ "BSD-2-Clause" ]
null
null
null
h/presenters/user_json.py
jenkins-hypothesis/h
328be7f5fa3abf3f05aba73d2311cf1eaf7b2277
[ "BSD-2-Clause" ]
null
null
null
h/presenters/user_json.py
jenkins-hypothesis/h
328be7f5fa3abf3f05aba73d2311cf1eaf7b2277
[ "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals class UserJSONPresenter(object): """ Present a user in the JSON format returned by API requests. Note that this presenter as of now returns some information that should not be publicly available, like the users email address. This i...
28.758621
63
0.640288
from __future__ import unicode_literals class UserJSONPresenter(object): def __init__(self, user): self.user = user def asdict(self): return { "authority": self.user.authority, "email": self.user.email, "userid": self.user.userid, "username":...
true
true
1c3d1982463790d343ae0b1b55926222d7262b7d
122
py
Python
tests/components/hint/test_hint.py
Crown-Commercial-Service/govuk-frontend-jinja
ddbe208a976ffa4ca330881c506c5200dfa69851
[ "MIT" ]
7
2019-09-25T13:59:35.000Z
2021-06-30T11:13:22.000Z
tests/components/hint/test_hint.py
Crown-Commercial-Service/govuk-frontend-jinja
ddbe208a976ffa4ca330881c506c5200dfa69851
[ "MIT" ]
23
2019-08-20T10:52:49.000Z
2021-06-02T14:21:16.000Z
tests/components/hint/test_hint.py
Crown-Commercial-Service/govuk-frontend-jinja
ddbe208a976ffa4ca330881c506c5200dfa69851
[ "MIT" ]
6
2019-08-29T14:02:25.000Z
2021-04-10T20:20:23.000Z
def test_hint(env, template, expected): template = env.from_string(template) assert template.render() == expected
30.5
40
0.729508
def test_hint(env, template, expected): template = env.from_string(template) assert template.render() == expected
true
true
1c3d19aca39c51b03373b7a4807c22d627923035
31
py
Python
custom_components/metlocationforecast/__init__.py
toringer/home-assistant-metlocationforecast
aa336683aa944050d730b719cc691ef643c46bf9
[ "MIT" ]
null
null
null
custom_components/metlocationforecast/__init__.py
toringer/home-assistant-metlocationforecast
aa336683aa944050d730b719cc691ef643c46bf9
[ "MIT" ]
null
null
null
custom_components/metlocationforecast/__init__.py
toringer/home-assistant-metlocationforecast
aa336683aa944050d730b719cc691ef643c46bf9
[ "MIT" ]
null
null
null
"""met.no location forecast."""
31
31
0.677419
true
true
1c3d19dd9cb90eb6fc36527ce8f8ba2b73de07a4
2,234
py
Python
gameplay/Item.py
WilliamDASILVA/TheMysteryOfSchweitzer
f81edc2e202bd5009fc96ccfbbfcc40bc135a17a
[ "MIT" ]
null
null
null
gameplay/Item.py
WilliamDASILVA/TheMysteryOfSchweitzer
f81edc2e202bd5009fc96ccfbbfcc40bc135a17a
[ "MIT" ]
null
null
null
gameplay/Item.py
WilliamDASILVA/TheMysteryOfSchweitzer
f81edc2e202bd5009fc96ccfbbfcc40bc135a17a
[ "MIT" ]
null
null
null
from engine.render.image import Image; class Item(): def __init__(self, name = None, description = None, iconPath = None): self.setName(name); self.setDescription(description); self.functionsToCallWhenAction = []; self.icon = None; # icon if iconPath != None: drawable = Image(iconPath); self.ico...
28.278481
70
0.432408
from engine.render.image import Image; class Item(): def __init__(self, name = None, description = None, iconPath = None): self.setName(name); self.setDescription(description); self.functionsToCallWhenAction = []; self.icon = None; if iconPath != None: drawable = Image(iconPath); self.icon = dr...
true
true
1c3d1a09d9afdee6de9e1e56948a94824812024b
2,358
py
Python
interfaces/python/test/dataset_test.py
Dream-maerD/ELL-master
9554afa876cc9e8e87529df3f3d99220abc711d6
[ "MIT" ]
null
null
null
interfaces/python/test/dataset_test.py
Dream-maerD/ELL-master
9554afa876cc9e8e87529df3f3d99220abc711d6
[ "MIT" ]
null
null
null
interfaces/python/test/dataset_test.py
Dream-maerD/ELL-master
9554afa876cc9e8e87529df3f3d99220abc711d6
[ "MIT" ]
null
null
null
from __future__ import print_function import ELL def GetItems(thing): ''' Create a Python style generator for iteration through an instance of any class that exposes the following methods: GetIterator, IsValid, Get, Next The generator allows you to use Python methods for iterable entities s...
34.676471
101
0.640373
from __future__ import print_function import ELL def GetItems(thing): ''' Create a Python style generator for iteration through an instance of any class that exposes the following methods: GetIterator, IsValid, Get, Next The generator allows you to use Python methods for iterable entities s...
false
true
1c3d1acc3757a398b6d132af41d24dff3cad0fb7
22,803
py
Python
necrobot/match/matchroom.py
saturnin55/necrobot
5f54634050939fbf9a0218260925d17713cd57ba
[ "MIT" ]
null
null
null
necrobot/match/matchroom.py
saturnin55/necrobot
5f54634050939fbf9a0218260925d17713cd57ba
[ "MIT" ]
null
null
null
necrobot/match/matchroom.py
saturnin55/necrobot
5f54634050939fbf9a0218260925d17713cd57ba
[ "MIT" ]
null
null
null
"""Room for scheduling and running a "match", a series of games between a pair of racers.""" import asyncio import datetime import discord import pytz import typing from necrobot.botbase import server from necrobot.util import console from necrobot.util import ordinal from necrobot.util import timestr from necrobot....
42.071956
120
0.627944
import asyncio import datetime import discord import pytz import typing from necrobot.botbase import server from necrobot.util import console from necrobot.util import ordinal from necrobot.util import timestr from necrobot.race import cmd_race from necrobot.match import cmd_match from necrobot.test import cmd_test ...
true
true
1c3d1b6042a8dc94a843134c38cb9f370cffab76
863
py
Python
DQMServices/Diagnostic/scripts/Database/Python/PopulateDB.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
3
2018-08-24T19:10:26.000Z
2019-02-19T11:45:32.000Z
DQMServices/Diagnostic/scripts/Database/Python/PopulateDB.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
7
2016-07-17T02:34:54.000Z
2019-08-13T07:58:37.000Z
DQMServices/Diagnostic/scripts/Database/Python/PopulateDB.py
NTrevisani/cmssw
a212a27526f34eb9507cf8b875c93896e6544781
[ "Apache-2.0" ]
5
2018-08-21T16:37:52.000Z
2020-01-09T13:33:17.000Z
from __future__ import print_function import os class PopulateDB: def run(self): os.system("cat "+self.TemplatesDir+"/template_"+self.DetName+"HistoryDQMService_cfg.py | sed -e \"s@RUNNUMBER@"+self.RunNumber+"@g\" -e \"s@FILENAME@"+self.FileName+"@\" -e \"s@TAGNAME@"+self.TagName+"@g\" -e \"s@DATABASE@"+se...
95.888889
366
0.663963
from __future__ import print_function import os class PopulateDB: def run(self): os.system("cat "+self.TemplatesDir+"/template_"+self.DetName+"HistoryDQMService_cfg.py | sed -e \"s@RUNNUMBER@"+self.RunNumber+"@g\" -e \"s@FILENAME@"+self.FileName+"@\" -e \"s@TAGNAME@"+self.TagName+"@g\" -e \"s@DATABASE@"+se...
true
true
1c3d1c0cd26edabf48602a9f3c44aea4a3e97f8a
7,275
py
Python
AICamera/app/src/main/cpp/caffe2/python/layers/batch_distill_lr_loss.py
blackxer/AICamera
4f0a6a09a2288da2ec7140744b5c2862df114c78
[ "MIT" ]
1
2020-01-10T02:56:03.000Z
2020-01-10T02:56:03.000Z
AICamera/app/src/main/cpp/caffe2/python/layers/batch_distill_lr_loss.py
blackxer/AICamera
4f0a6a09a2288da2ec7140744b5c2862df114c78
[ "MIT" ]
null
null
null
AICamera/app/src/main/cpp/caffe2/python/layers/batch_distill_lr_loss.py
blackxer/AICamera
4f0a6a09a2288da2ec7140744b5c2862df114c78
[ "MIT" ]
null
null
null
## @package batch_distill_lr_loss # Module caffe2.python.layers.batch_distill_lr_loss from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core, schema from caffe2.python.layers.layers impo...
37.890625
86
0.55299
_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from caffe2.python import core, schema from caffe2.python.layers.layers import ( ModelLayer, ) from caffe2.python.layers.tags import ( Tags ) import numpy as np class BatchDist...
true
true
1c3d1c2f9ec0e9adbd1e4c5d5dd86197d544fb49
251
py
Python
SourceModel/SM_IfStmt.py
crossminer/CrossPuppeteer
ab99f67f9c3440752e767ad284de5049f6fd1da9
[ "Apache-2.0" ]
47
2016-02-08T08:46:17.000Z
2021-01-17T23:56:34.000Z
SourceModel/SM_IfStmt.py
crossminer/CrossPuppeteer
ab99f67f9c3440752e767ad284de5049f6fd1da9
[ "Apache-2.0" ]
null
null
null
SourceModel/SM_IfStmt.py
crossminer/CrossPuppeteer
ab99f67f9c3440752e767ad284de5049f6fd1da9
[ "Apache-2.0" ]
15
2016-02-09T13:34:48.000Z
2021-05-12T14:34:26.000Z
import SourceModel.SM_Element class SM_IfStmt(SourceModel.SM_Element.SM_Element): def __init__(self, text): self.resourceText = text super().__init__(text) def getUsedVariables(self): return super().getUsedVariables()
27.888889
51
0.709163
import SourceModel.SM_Element class SM_IfStmt(SourceModel.SM_Element.SM_Element): def __init__(self, text): self.resourceText = text super().__init__(text) def getUsedVariables(self): return super().getUsedVariables()
true
true
1c3d1cf0862dd080899f11bdb8a3ac8422160442
2,492
py
Python
instagram/migrations/0001_initial.py
lilian-2021/Insta-clone
8c9f4aa011fd5c174a1ab3f757a13a7468477cf9
[ "Unlicense" ]
null
null
null
instagram/migrations/0001_initial.py
lilian-2021/Insta-clone
8c9f4aa011fd5c174a1ab3f757a13a7468477cf9
[ "Unlicense" ]
null
null
null
instagram/migrations/0001_initial.py
lilian-2021/Insta-clone
8c9f4aa011fd5c174a1ab3f757a13a7468477cf9
[ "Unlicense" ]
null
null
null
# Generated by Django 4.0.3 on 2022-03-06 13:45 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...
49.84
146
0.624398
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
1c3d1e1475316883ec2671ef1469c5fea39d9574
2,809
py
Python
characters.py
tomviner/dojo-adventure-game
c8f19f6d9fa848b77fa015d2b0920f5f18729f8f
[ "MIT" ]
null
null
null
characters.py
tomviner/dojo-adventure-game
c8f19f6d9fa848b77fa015d2b0920f5f18729f8f
[ "MIT" ]
null
null
null
characters.py
tomviner/dojo-adventure-game
c8f19f6d9fa848b77fa015d2b0920f5f18729f8f
[ "MIT" ]
null
null
null
from adventurelib import Item, Bag, when class Man(Item): subject_pronoun = 'he' object_pronoun = 'him' class Woman(Item): subject_pronoun = 'she' object_pronoun = 'her' dr_black = the_victim = Man('Dr. Black', 'Dr Black', 'the victim') dr_black.def_name = 'the victim' dr_black.description = """\ ...
31.561798
81
0.728373
from adventurelib import Item, Bag, when class Man(Item): subject_pronoun = 'he' object_pronoun = 'him' class Woman(Item): subject_pronoun = 'she' object_pronoun = 'her' dr_black = the_victim = Man('Dr. Black', 'Dr Black', 'the victim') dr_black.def_name = 'the victim' dr_black.description = """\ ...
true
true
1c3d1e3adf335147a41c0f14755cb1e1b82ef576
620
py
Python
portal/_extensions/cookbook_gallery_generator.py
ProjectPythia/portal
57407bfc5c38208f3a85d9a3ef8d80a4657ea4fb
[ "Apache-2.0" ]
1
2020-12-10T09:57:35.000Z
2020-12-10T09:57:35.000Z
portal/_extensions/cookbook_gallery_generator.py
ProjectPythia/portal
57407bfc5c38208f3a85d9a3ef8d80a4657ea4fb
[ "Apache-2.0" ]
2
2020-12-10T19:13:08.000Z
2020-12-10T19:13:19.000Z
portal/_extensions/cookbook_gallery_generator.py
ProjectPythia/portal
57407bfc5c38208f3a85d9a3ef8d80a4657ea4fb
[ "Apache-2.0" ]
2
2020-12-09T22:29:43.000Z
2020-12-10T09:57:49.000Z
import yaml from gallery_generator import build_from_items, generate_menu def main(app): with open('cookbook_gallery.yaml') as fid: all_items = yaml.safe_load(fid) title = 'Cookbooks Gallery' subtext = 'Pythia Cookbooks provide example workflows on more advanced and domain-specific problems deve...
34.444444
205
0.762903
import yaml from gallery_generator import build_from_items, generate_menu def main(app): with open('cookbook_gallery.yaml') as fid: all_items = yaml.safe_load(fid) title = 'Cookbooks Gallery' subtext = 'Pythia Cookbooks provide example workflows on more advanced and domain-specific problems deve...
true
true
1c3d1ee3b003f80ec96564cadfc120daff279bb5
834
py
Python
src/lesson_runtime_features/sys_shelve_importer_module.py
jasonwee/asus-rt-n14uhp-mrtg
4fa96c3406e32ea6631ce447db6d19d70b2cd061
[ "Apache-2.0" ]
3
2018-08-14T09:33:52.000Z
2022-03-21T12:31:58.000Z
src/lesson_runtime_features/sys_shelve_importer_module.py
jasonwee/asus-rt-n14uhp-mrtg
4fa96c3406e32ea6631ce447db6d19d70b2cd061
[ "Apache-2.0" ]
null
null
null
src/lesson_runtime_features/sys_shelve_importer_module.py
jasonwee/asus-rt-n14uhp-mrtg
4fa96c3406e32ea6631ce447db6d19d70b2cd061
[ "Apache-2.0" ]
null
null
null
import sys import sys_shelve_importer def show_module_details(module): print(' message :', module.message) print(' __name__ :', module.__name__) print(' __package__:', module.__package__) print(' __file__ :', module.__file__) print(' __path__ :', module.__path__) print(' __loade...
25.272727
55
0.747002
import sys import sys_shelve_importer def show_module_details(module): print(' message :', module.message) print(' __name__ :', module.__name__) print(' __package__:', module.__package__) print(' __file__ :', module.__file__) print(' __path__ :', module.__path__) print(' __loade...
true
true
1c3d1f86424ef27c1000aa797e7cb8d7760227a4
719
py
Python
fingerprint/CMSeeK/VersionDetect/abda.py
c0dejump/CredzCheckr
cac325b50464cf2eb853540be3efdf993c903691
[ "MIT" ]
null
null
null
fingerprint/CMSeeK/VersionDetect/abda.py
c0dejump/CredzCheckr
cac325b50464cf2eb853540be3efdf993c903691
[ "MIT" ]
null
null
null
fingerprint/CMSeeK/VersionDetect/abda.py
c0dejump/CredzCheckr
cac325b50464cf2eb853540be3efdf993c903691
[ "MIT" ]
1
2021-11-28T18:01:33.000Z
2021-11-28T18:01:33.000Z
#!/usr/bin/python3 # -*- coding: utf-8 -*- # This is a part of CMSeeK, check the LICENSE file for more information # Copyright (c) 2018 - 2020 Tuhinshubhra # Al Mubda version detection # Rev 1 import cmseekdb.basic as cmseek import re def start(source): cmseek.statement("Detecting Al Mubda version using source c...
31.26087
114
0.635605
import cmseekdb.basic as cmseek import re def start(source): cmseek.statement("Detecting Al Mubda version using source code [Method 1 of 1]") regex = re.findall(r'Powered by Al Mubda version (\d.*?)</a>', source) if regex != []: if regex[0] != '' and regex[0] != ' ': version = r...
true
true
1c3d2266e24d867d18539d922e5b57ca45ce667c
162
py
Python
airtest/aircv/__init__.py
zhangzhao4444/Airtest
cb896ac166179f5095bfe889586e9c32d97b082e
[ "Apache-2.0" ]
1
2021-05-02T08:13:00.000Z
2021-05-02T08:13:00.000Z
airtest/aircv/__init__.py
dongxue1012/Airtest
cb896ac166179f5095bfe889586e9c32d97b082e
[ "Apache-2.0" ]
null
null
null
airtest/aircv/__init__.py
dongxue1012/Airtest
cb896ac166179f5095bfe889586e9c32d97b082e
[ "Apache-2.0" ]
5
2018-03-27T09:56:04.000Z
2022-02-06T10:28:51.000Z
from .aircv import * from .error import * from .sift import find_sift from .template import find_template, find_all_template from .template2 import find_template2
32.4
54
0.82716
from .aircv import * from .error import * from .sift import find_sift from .template import find_template, find_all_template from .template2 import find_template2
true
true
1c3d22fcf848845a754d1a723e1d7c7d1ffa3d2b
1,478
py
Python
gh/__init__.py
woosal1337/omeniscient
4b963013f21165d9ccce210588cc3009ba53857b
[ "MIT" ]
3
2021-07-29T14:15:46.000Z
2021-07-30T11:53:15.000Z
gh/__init__.py
woosal1337/omeniscient
4b963013f21165d9ccce210588cc3009ba53857b
[ "MIT" ]
null
null
null
gh/__init__.py
woosal1337/omeniscient
4b963013f21165d9ccce210588cc3009ba53857b
[ "MIT" ]
1
2021-10-10T22:42:33.000Z
2021-10-10T22:42:33.000Z
import requests import json import rich from rich import pretty from rich.console import Console console = Console() class gith(): def __init__(self): pass def get_info(self, username): """ Gets a username on GitHub as an argument, gets the information regarding that person on GitHu...
32.844444
102
0.583897
import requests import json import rich from rich import pretty from rich.console import Console console = Console() class gith(): def __init__(self): pass def get_info(self, username): try: user = requests.get(f"https://api.github.com/users/{username}").json() co...
true
true
1c3d241305124a6414a95fd3d8aa6ddba59be2ec
743
py
Python
spotify-albums-organizer/import_images.py
savoy1211/discogs-spotify-import
7a9687c96fbef1d1d41242de85f7aa0da12c65d8
[ "MIT" ]
9
2019-08-09T19:02:08.000Z
2021-11-19T20:21:33.000Z
spotify-albums-organizer/import_images.py
savoy1211/discogs-spotify-import
7a9687c96fbef1d1d41242de85f7aa0da12c65d8
[ "MIT" ]
8
2020-03-24T17:28:51.000Z
2022-01-13T01:34:07.000Z
spotify-albums-organizer/import_images.py
savoy1211/spotify-albums-organizer
7a9687c96fbef1d1d41242de85f7aa0da12c65d8
[ "MIT" ]
null
null
null
""" Imports album images to the app for easy access for display_albums.py. """ import os.path import os import shutil import urllib.request import pymongo from sys import stdout from time import sleep client = pymongo.MongoClient("localhost", 27017) db = client.discogs_masters all_albums = db.current_albums.find(...
18.575
71
0.683715
import os.path import os import shutil import urllib.request import pymongo from sys import stdout from time import sleep client = pymongo.MongoClient("localhost", 27017) db = client.discogs_masters all_albums = db.current_albums.find() i = 1 for album in all_albums: try: url = album["items"]["album"]["images...
true
true
1c3d24c5e190cd2bbc826d2d7a6a832a29f23871
267
py
Python
slackcat/compat.py
nficano/slackcat
004a0e28dc8ac58cc74c68e48a3542e58009964a
[ "MIT-0" ]
25
2017-08-23T15:41:17.000Z
2019-09-07T16:26:08.000Z
slackcat/compat.py
nficano/slackcat
004a0e28dc8ac58cc74c68e48a3542e58009964a
[ "MIT-0" ]
45
2017-09-01T07:11:42.000Z
2022-01-12T17:51:22.000Z
slackcat/compat.py
nficano/slackcat
004a0e28dc8ac58cc74c68e48a3542e58009964a
[ "MIT-0" ]
4
2017-09-01T22:50:33.000Z
2018-06-14T14:41:07.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- try: # Python 3.x from urllib.parse import urlencode import urllib.request as urlrequest except ImportError: # Python 2.x from urllib import urlencode # noqa import urllib2 as urlrequest # noqa
22.25
40
0.674157
try: from urllib.parse import urlencode import urllib.request as urlrequest except ImportError: from urllib import urlencode import urllib2 as urlrequest
true
true
1c3d2561e8dc9562b8fbb9576367da0c5b1fc15a
28,296
py
Python
success_metrics.py
michaelmworthington/iq-success-metrics
861743926fc4750731d5e1577ef9e0d2b3126221
[ "Apache-2.0" ]
null
null
null
success_metrics.py
michaelmworthington/iq-success-metrics
861743926fc4750731d5e1577ef9e0d2b3126221
[ "Apache-2.0" ]
null
null
null
success_metrics.py
michaelmworthington/iq-success-metrics
861743926fc4750731d5e1577ef9e0d2b3126221
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # Copyright 2019 Sonatype Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
54.731141
197
0.531418
import datetime import json import sys import argparse import requests import os iq_session = requests.Session() config = { "VulDisTime" : 2, "FixManTime" : 2, "FixAutoTime" : 0.3, "WaiManTime" : 7, "WaiAutoTime" : 0.3, "ProductiveHoursDay" : 7, "AvgHourCost" : 100, "risk" : ["LOW", "MODE...
true
true
1c3d27c9bc4be19e0abd13182b9e4310bd52a96c
385
py
Python
dora/structures/migrations/0005_structure_slug.py
francoisromain/dora-back
868491097d12b9a23135db3d91bc6495431e8237
[ "MIT" ]
1
2022-01-03T22:12:45.000Z
2022-01-03T22:12:45.000Z
dora/structures/migrations/0005_structure_slug.py
francoisromain/dora-back
868491097d12b9a23135db3d91bc6495431e8237
[ "MIT" ]
2
2022-03-17T18:04:11.000Z
2022-03-18T14:55:27.000Z
dora/structures/migrations/0005_structure_slug.py
francoisromain/dora-back
868491097d12b9a23135db3d91bc6495431e8237
[ "MIT" ]
1
2022-01-03T09:02:54.000Z
2022-01-03T09:02:54.000Z
# Generated by Django 3.2.5 on 2021-08-12 13:33 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("structures", "0004_auto_20210804_1530"), ] operations = [ migrations.AddField( model_name="structure", name="slug", ...
20.263158
50
0.597403
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ("structures", "0004_auto_20210804_1530"), ] operations = [ migrations.AddField( model_name="structure", name="slug", field=models.SlugField(blank=True),...
true
true
1c3d27d5320a5cd8917c51edaf96e3cbe4469868
45
py
Python
Modulo_1/semana2/Estructura-de-Datos/set/conjunto-iterar.py
rubens233/cocid_python
492ebdf21817e693e5eb330ee006397272f2e0cc
[ "MIT" ]
null
null
null
Modulo_1/semana2/Estructura-de-Datos/set/conjunto-iterar.py
rubens233/cocid_python
492ebdf21817e693e5eb330ee006397272f2e0cc
[ "MIT" ]
null
null
null
Modulo_1/semana2/Estructura-de-Datos/set/conjunto-iterar.py
rubens233/cocid_python
492ebdf21817e693e5eb330ee006397272f2e0cc
[ "MIT" ]
1
2022-03-04T00:57:18.000Z
2022-03-04T00:57:18.000Z
s = {1, 2, 3, 4} while s: print(s.pop())
11.25
18
0.444444
s = {1, 2, 3, 4} while s: print(s.pop())
true
true
1c3d27d82b4baef89b2eb442ebb64f581c0e95d6
10,450
py
Python
src/filemanagement.py
moustachio-belvedere/ScopeControl
2608122fa89d32adf369b9b8fa4c1b5b7962e4df
[ "MIT" ]
1
2020-06-24T04:10:22.000Z
2020-06-24T04:10:22.000Z
src/filemanagement.py
moustachio-belvedere/ScopeControl
2608122fa89d32adf369b9b8fa4c1b5b7962e4df
[ "MIT" ]
null
null
null
src/filemanagement.py
moustachio-belvedere/ScopeControl
2608122fa89d32adf369b9b8fa4c1b5b7962e4df
[ "MIT" ]
1
2018-10-22T17:55:36.000Z
2018-10-22T17:55:36.000Z
from PyQt5.QtWidgets import * from PyQt5.QtGui import QIcon from PyQt5.QtCore import pyqtSignal, pyqtSlot from os.path import isdir from pathlib import Path from src.filemanagementadvanced import AdvancedSettingsWindow class FileDirInput(QLineEdit): # signal to send to apply button apply_state = pyqtSignal(bool, s...
29.027778
94
0.738278
from PyQt5.QtWidgets import * from PyQt5.QtGui import QIcon from PyQt5.QtCore import pyqtSignal, pyqtSlot from os.path import isdir from pathlib import Path from src.filemanagementadvanced import AdvancedSettingsWindow class FileDirInput(QLineEdit): apply_state = pyqtSignal(bool, str) def __init__(self, parent...
true
true
1c3d282e45666b6555b0ff1951bf6c7be0db77d6
1,194
py
Python
tunnel/tunnel.py
zrthxn/tunnel-worker
591f63c02ddd6d503ddf4cab0077cea2611b7a21
[ "MIT" ]
null
null
null
tunnel/tunnel.py
zrthxn/tunnel-worker
591f63c02ddd6d503ddf4cab0077cea2611b7a21
[ "MIT" ]
null
null
null
tunnel/tunnel.py
zrthxn/tunnel-worker
591f63c02ddd6d503ddf4cab0077cea2611b7a21
[ "MIT" ]
null
null
null
from time import time from threading import Thread, Event from os import environ from typing import List from config import build_satellites from satellite import Satellite class setInterval: def __init__(self, interval, action, **kwargs): self.interval = interval self.action = action self.kwargs = kwargs sel...
23.88
61
0.727806
from time import time from threading import Thread, Event from os import environ from typing import List from config import build_satellites from satellite import Satellite class setInterval: def __init__(self, interval, action, **kwargs): self.interval = interval self.action = action self.kwargs = kwargs sel...
true
true
1c3d286c13699acf3e34f81944822817b7af2050
957
py
Python
hmsclient/genthrift/fb303/ttypes.py
itamarla/hmsclient
96e14c93b9cc0e274602d44c5bf9bb054023aecd
[ "Apache-2.0" ]
1
2020-11-23T02:48:23.000Z
2020-11-23T02:48:23.000Z
hmsclient/genthrift/fb303/ttypes.py
itamarla/hmsclient
96e14c93b9cc0e274602d44c5bf9bb054023aecd
[ "Apache-2.0" ]
null
null
null
hmsclient/genthrift/fb303/ttypes.py
itamarla/hmsclient
96e14c93b9cc0e274602d44c5bf9bb054023aecd
[ "Apache-2.0" ]
null
null
null
# # Autogenerated by Thrift Compiler (0.13.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive impo...
19.14
93
0.613375
from thrift.Thrift import TType, TMessageType, TFrozenDict, TException, TApplicationException from thrift.protocol.TProtocol import TProtocolException from thrift.TRecursive import fix_spec import sys from thrift.transport import TTransport all_structs = [] class fb_status(object): DEAD = 0 STARTING...
true
true
1c3d29c7ad2cc7b5a92ad738564c4b14a24a613f
24,918
py
Python
src/oci/database/models/external_database_base.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/database/models/external_database_base.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/database/models/external_database_base.py
LaudateCorpus1/oci-python-sdk
b0d3ce629d5113df4d8b83b7a6502b2c5bfa3015
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
35.546362
245
0.670319
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class ExternalDatabaseBase(object): LIFECYCLE_STATE_PROVISIONING = "PROVISIONING" LIFECYCLE_STATE_NOT_...
true
true
1c3d2a6725b8f8f4bf2562d430c72f187cac0af2
1,914
py
Python
algorithm/oripy/hidden-markov.py
thautwarm/flowlibs
4b70280e05380a6c5acf591095bcc490a9214e53
[ "MIT" ]
2
2017-08-24T16:48:56.000Z
2017-08-24T19:33:10.000Z
algorithm/oripy/hidden-markov.py
thautwarm/flowlibs
4b70280e05380a6c5acf591095bcc490a9214e53
[ "MIT" ]
null
null
null
algorithm/oripy/hidden-markov.py
thautwarm/flowlibs
4b70280e05380a6c5acf591095bcc490a9214e53
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri Sep 1 10:38:50 2017 @author: misakawa """ from collections import defaultdict # Σ :: status -> observation -> probability - # Φ :: status -> status -> probability class HMM: __slots__ = [] def __new__(self, Σ, Φ, F): return (Σ...
24.538462
105
0.482759
from collections import defaultdict class HMM: __slots__ = [] def __new__(self, Σ, Φ, F): return (Σ, Φ, F) def cal_status_transfrom(Seqs, gram, decide_status, gap = 1): Σ = defaultdict(lambda :defaultdict(float)) Φ = defaultdict(lambda :defaultdict(float)) for Seq in Seqs: ...
true
true
1c3d2a737848c70e7b11695521b5c70999b42c5b
2,008
py
Python
django/db/backends/sqlite3/features.py
beniwohli/django
514b2c989a948e3c59bda0da0c9427acf643cf5b
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/db/backends/sqlite3/features.py
beniwohli/django
514b2c989a948e3c59bda0da0c9427acf643cf5b
[ "PSF-2.0", "BSD-3-Clause" ]
null
null
null
django/db/backends/sqlite3/features.py
beniwohli/django
514b2c989a948e3c59bda0da0c9427acf643cf5b
[ "PSF-2.0", "BSD-3-Clause" ]
1
2017-10-23T22:25:45.000Z
2017-10-23T22:25:45.000Z
from django.db import utils from django.db.backends.base.features import BaseDatabaseFeatures from django.utils.functional import cached_property class DatabaseFeatures(BaseDatabaseFeatures): # SQLite cannot handle us only partially reading from a cursor's result set # and then writing the same rows to the da...
38.615385
79
0.726594
from django.db import utils from django.db.backends.base.features import BaseDatabaseFeatures from django.utils.functional import cached_property class DatabaseFeatures(BaseDatabaseFeatures): # and then writing the same rows to the database in another cursor. This # setting ensures we always read result ...
true
true
1c3d2af11592b23293e1b67e8a4a20bc495a69bc
4,695
py
Python
services/web/server/src/simcore_service_webserver/reverse_proxy/handlers/jupyter.py
oetiker/osparc-simcore
00918bf8f000840cc70cc49458780a55858d52ea
[ "MIT" ]
null
null
null
services/web/server/src/simcore_service_webserver/reverse_proxy/handlers/jupyter.py
oetiker/osparc-simcore
00918bf8f000840cc70cc49458780a55858d52ea
[ "MIT" ]
2
2018-05-13T09:10:57.000Z
2019-03-06T08:10:40.000Z
services/web/server/src/simcore_service_webserver/reverse_proxy/handlers/jupyter.py
oetiker/osparc-simcore
00918bf8f000840cc70cc49458780a55858d52ea
[ "MIT" ]
null
null
null
""" Reverse-proxy customized for jupyter notebooks """ import asyncio import logging import pprint import aiohttp from aiohttp import client, web from yarl import URL APP_SOCKETS_KEY = "simcore_service_webserver.reverse_proxy.settings.sockets" #FIXME: Image tag should determine the handler instead of the opposite!...
40.474138
130
0.553781
import asyncio import logging import pprint import aiohttp from aiohttp import client, web from yarl import URL APP_SOCKETS_KEY = "simcore_service_webserver.reverse_proxy.settings.sockets" SUPPORTED_IMAGE_NAME = ["simcore/services/dynamic/jupyter-base-notebook", "simcore/services/dynamic/ju...
true
true
1c3d2b6217b94095a760d431548d3e5c51b33f82
341
py
Python
src/handler.py
caulagi/serverless-python-rds-cron
452e3baff8dfb1b1a078894da6142a3c2372415a
[ "MIT" ]
null
null
null
src/handler.py
caulagi/serverless-python-rds-cron
452e3baff8dfb1b1a078894da6142a3c2372415a
[ "MIT" ]
null
null
null
src/handler.py
caulagi/serverless-python-rds-cron
452e3baff8dfb1b1a078894da6142a3c2372415a
[ "MIT" ]
1
2019-08-05T09:50:19.000Z
2019-08-05T09:50:19.000Z
""" Just a wrapper around the actual script (cleanup) for serverless, but adds sentry support """ import os import sentry_sdk from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration import cleanup sentry_sdk.init(dsn=os.getenv("SENTRY_DSN"), integrations=[AwsLambdaIntegration()]) def run(event, context...
20.058824
83
0.782991
import os import sentry_sdk from sentry_sdk.integrations.aws_lambda import AwsLambdaIntegration import cleanup sentry_sdk.init(dsn=os.getenv("SENTRY_DSN"), integrations=[AwsLambdaIntegration()]) def run(event, context): cleanup.run()
true
true
1c3d2def7bbd1c0a2936a78f94d3508c9b97b156
1,095
py
Python
cases/old cases/case2.py
massovercharge/lorenzattractor
f9b1712d5f38be3a84afee037ac7051efbe1f4c6
[ "MIT" ]
null
null
null
cases/old cases/case2.py
massovercharge/lorenzattractor
f9b1712d5f38be3a84afee037ac7051efbe1f4c6
[ "MIT" ]
null
null
null
cases/old cases/case2.py
massovercharge/lorenzattractor
f9b1712d5f38be3a84afee037ac7051efbe1f4c6
[ "MIT" ]
1
2021-07-07T14:09:23.000Z
2021-07-07T14:09:23.000Z
""" This file could contain the necessary calls to make plots etc for case 2 """ import os import sys os.chdir('C:\\Users\\dwp\\OneDrive - Novozymes A S\\PhD\\Kurser\\scipro\\'+ 'project\\lorenz\\cases') sys.path.append(os.path.abspath('../')) from lorenz import run from lorenz import solv...
26.071429
76
0.605479
import os import sys os.chdir('C:\\Users\\dwp\\OneDrive - Novozymes A S\\PhD\\Kurser\\scipro\\'+ 'project\\lorenz\\cases') sys.path.append(os.path.abspath('../')) from lorenz import run from lorenz import solver def case2(): sigma = 10 beta = 8/3 rho = 16 init = [0.1,0.1,0....
true
true
1c3d2f13ba02324e1993545338734814396d3da4
769
py
Python
helpers/yake_helper.py
thisishardik/forum-posts-clustering
cadc304143f431b3e94ba138dc2c8e0999814c8a
[ "MIT" ]
null
null
null
helpers/yake_helper.py
thisishardik/forum-posts-clustering
cadc304143f431b3e94ba138dc2c8e0999814c8a
[ "MIT" ]
null
null
null
helpers/yake_helper.py
thisishardik/forum-posts-clustering
cadc304143f431b3e94ba138dc2c8e0999814c8a
[ "MIT" ]
null
null
null
import os os.system("pip install git+https://github.com/LIAAD/yake") import pandas as pd from nltk.tokenize import RegexpTokenizer import yake def keywords_yake(sample_posts): simple_kwextractor = yake.KeywordExtractor() sentences = [] for post in sample_posts: post_keywords = simple_kwextr...
26.517241
68
0.695709
import os os.system("pip install git+https://github.com/LIAAD/yake") import pandas as pd from nltk.tokenize import RegexpTokenizer import yake def keywords_yake(sample_posts): simple_kwextractor = yake.KeywordExtractor() sentences = [] for post in sample_posts: post_keywords = simple_kwextr...
true
true
1c3d2ff7435e1846ca3949259991207ef79e55e4
6,600
py
Python
InvenTree/order/migrations/0064_purchaseorderextraline_salesorderextraline.py
rkalman/InvenTree
8ceff063f86394cd1be9f5c57e6302b79782a526
[ "MIT" ]
null
null
null
InvenTree/order/migrations/0064_purchaseorderextraline_salesorderextraline.py
rkalman/InvenTree
8ceff063f86394cd1be9f5c57e6302b79782a526
[ "MIT" ]
null
null
null
InvenTree/order/migrations/0064_purchaseorderextraline_salesorderextraline.py
rkalman/InvenTree
8ceff063f86394cd1be9f5c57e6302b79782a526
[ "MIT" ]
null
null
null
# Generated by Django 3.2.12 on 2022-03-27 01:11 import InvenTree.fields import django.core.validators from django.core import serializers from django.db import migrations, models import django.db.models.deletion import djmoney.models.fields import djmoney.models.validators def _convert_model(apps, line_item_ref, ex...
60
274
0.690455
import InvenTree.fields import django.core.validators from django.core import serializers from django.db import migrations, models import django.db.models.deletion import djmoney.models.fields import djmoney.models.validators def _convert_model(apps, line_item_ref, extra_line_ref, price_ref): OrderLineItem = ap...
true
true
1c3d3062ce19698532e267a7eb8ba2beff97559c
54,252
py
Python
tests/test_scenic_quality.py
davemfish/invest
c97a0ce58c1ecd248326691ca9d36660c744fa90
[ "BSD-3-Clause" ]
null
null
null
tests/test_scenic_quality.py
davemfish/invest
c97a0ce58c1ecd248326691ca9d36660c744fa90
[ "BSD-3-Clause" ]
1
2021-12-08T19:49:56.000Z
2021-12-11T01:59:55.000Z
tests/test_scenic_quality.py
emlys/invest
5b0391fd456df5a6afd2fdfbaed542a090f58f17
[ "BSD-3-Clause" ]
null
null
null
"""Module for Regression Testing the InVEST Scenic Quality module.""" import unittest import tempfile import shutil import os import glob from osgeo import gdal from osgeo import osr import pygeoprocessing.testing from pygeoprocessing.testing import sampledata from shapely.geometry import Polygon, Point im...
42.751773
87
0.562302
import unittest import tempfile import shutil import os import glob from osgeo import gdal from osgeo import osr import pygeoprocessing.testing from pygeoprocessing.testing import sampledata from shapely.geometry import Polygon, Point import numpy _SRS = osr.SpatialReference() _SRS.ImportFromEPSG(3273...
true
true
1c3d3148417bdc3d66da11935ad180531d7ce2ba
19,118
py
Python
cubes/server/blueprint.py
digitalsatori/cubes
140133e8c2e3f2ff60631cc3ebc9966d16c1655e
[ "MIT" ]
1,020
2015-01-02T03:05:26.000Z
2022-02-12T18:48:51.000Z
cubes/server/blueprint.py
digitalsatori/cubes
140133e8c2e3f2ff60631cc3ebc9966d16c1655e
[ "MIT" ]
259
2015-01-02T22:35:14.000Z
2021-09-02T04:20:41.000Z
cubes/server/blueprint.py
digitalsatori/cubes
140133e8c2e3f2ff60631cc3ebc9966d16c1655e
[ "MIT" ]
288
2015-01-08T00:42:26.000Z
2022-03-31T17:25:10.000Z
# -*- coding: utf-8 -*- import json import sys import traceback from collections import OrderedDict from flask import Blueprint, Response, request, g, current_app, safe_join, make_response from flask import render_template, redirect from ..workspace import Workspace, SLICER_INFO_KEYS from ..query import Cell, cut_fro...
30.5888
107
0.61293
import json import sys import traceback from collections import OrderedDict from flask import Blueprint, Response, request, g, current_app, safe_join, make_response from flask import render_template, redirect from ..workspace import Workspace, SLICER_INFO_KEYS from ..query import Cell, cut_from_dict from ..query imp...
true
true
1c3d314ab5aff7ff9f6fbd398f0e05377b19e6da
15,105
py
Python
python/spark_sklearn/tests/test_keyed_models.py
vedantja/spark-sklearn
349f8485382d76417593b178036de2a9f9dbba63
[ "Apache-2.0" ]
null
null
null
python/spark_sklearn/tests/test_keyed_models.py
vedantja/spark-sklearn
349f8485382d76417593b178036de2a9f9dbba63
[ "Apache-2.0" ]
null
null
null
python/spark_sklearn/tests/test_keyed_models.py
vedantja/spark-sklearn
349f8485382d76417593b178036de2a9f9dbba63
[ "Apache-2.0" ]
null
null
null
from itertools import chain, repeat, cycle import numpy as np import pandas as pd from sklearn.cluster import DBSCAN, KMeans from sklearn.decomposition import PCA from sklearn.linear_model import LinearRegression from sklearn.linear_model import LogisticRegression import unittest from pyspark.sql.types import * from ...
45.911854
98
0.652698
from itertools import chain, repeat, cycle import numpy as np import pandas as pd from sklearn.cluster import DBSCAN, KMeans from sklearn.decomposition import PCA from sklearn.linear_model import LinearRegression from sklearn.linear_model import LogisticRegression import unittest from pyspark.sql.types import * from ...
true
true
1c3d3203b79ea93afcb26f6828b432634958b1ba
1,049
py
Python
xair/envs/lvaircraft_random_pitch.py
xikasan/xair
c10f7a5d6a279eb5d2498b2f2df489ccc85ee36c
[ "MIT" ]
null
null
null
xair/envs/lvaircraft_random_pitch.py
xikasan/xair
c10f7a5d6a279eb5d2498b2f2df489ccc85ee36c
[ "MIT" ]
null
null
null
xair/envs/lvaircraft_random_pitch.py
xikasan/xair
c10f7a5d6a279eb5d2498b2f2df489ccc85ee36c
[ "MIT" ]
null
null
null
# coding: utf-8 import gym import xsim import numpy as np import xtools as xt from .base import BaseEnv from ..models.lvaircraft import LVAircraft from .lvaircraft_pitch import LVAircraftPitchV3 class LVAircraftPitchV4(LVAircraftPitchV3): IX_T = 0 IX_q = 1 IX_r = 2 IX_dt = 0 IX_de = 1 def _...
23.311111
72
0.575786
import gym import xsim import numpy as np import xtools as xt from .base import BaseEnv from ..models.lvaircraft import LVAircraft from .lvaircraft_pitch import LVAircraftPitchV3 class LVAircraftPitchV4(LVAircraftPitchV3): IX_T = 0 IX_q = 1 IX_r = 2 IX_dt = 0 IX_de = 1 def __init__( ...
true
true
1c3d322ee39108612c2cd9a3002a5d3cce01f18f
9,895
py
Python
micronet/compression/pruning/main.py
hyterazzb/micronet
4a90918598b9f7601a9051720f8dcb3303c72c96
[ "MIT" ]
1
2021-05-12T15:38:02.000Z
2021-05-12T15:38:02.000Z
micronet/compression/pruning/main.py
jay757425789/micronet
351d184527e9867e0394878cf91b64ffd5c6b109
[ "MIT" ]
null
null
null
micronet/compression/pruning/main.py
jay757425789/micronet
351d184527e9867e0394878cf91b64ffd5c6b109
[ "MIT" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys sys.path.append("../..") import math import os import argparse import numpy as np import torch import torch.nn as nn import torch.optim as optim import torchvision import torchvision.transforms as tr...
36.784387
93
0.57999
from __future__ import absolute_import from __future__ import division from __future__ import print_function import sys sys.path.append("../..") import math import os import argparse import numpy as np import torch import torch.nn as nn import torch.optim as optim import torchvision import torchvision.transforms as tr...
true
true
1c3d324f2425e174e7561a331a6d2849d512e0d5
2,805
py
Python
tests/test_score_board.py
atw1020/sente
ebc6150124ad0bd82b0f5c414cbedb242e3c3a37
[ "MIT" ]
3
2021-07-30T02:17:52.000Z
2021-12-11T15:57:04.000Z
tests/test_score_board.py
atw1020/sente
ebc6150124ad0bd82b0f5c414cbedb242e3c3a37
[ "MIT" ]
null
null
null
tests/test_score_board.py
atw1020/sente
ebc6150124ad0bd82b0f5c414cbedb242e3c3a37
[ "MIT" ]
null
null
null
""" Author: Arthur Wesley """ from unittest import TestCase import sente class TestNoDeadStones(TestCase): def play_simple_game(self, game): """ plays out a simple game in a cordner :return: """ game.play(3, 1) game.play(1, 3) game.play(3, 2) ...
20.035714
83
0.569697
from unittest import TestCase import sente class TestNoDeadStones(TestCase): def play_simple_game(self, game): game.play(3, 1) game.play(1, 3) game.play(3, 2) game.play(2, 3) game.play(4, 3) game.play(3, 4) game.play(5, 3) game.play(3, 5) ...
true
true
1c3d335551dcafaf023a38dadc62bacadb07d10b
2,637
py
Python
sdk/python/pulumi_azure_nextgen/network/v20191201/get_active_sessions.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
31
2020-09-21T09:41:01.000Z
2021-02-26T13:21:59.000Z
sdk/python/pulumi_azure_nextgen/network/v20191201/get_active_sessions.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
231
2020-09-21T09:38:45.000Z
2021-03-01T11:16:03.000Z
sdk/python/pulumi_azure_nextgen/network/v20191201/get_active_sessions.py
pulumi/pulumi-azure-nextgen
452736b0a1cf584c2d4c04666e017af6e9b2c15c
[ "Apache-2.0" ]
4
2020-09-29T14:14:59.000Z
2021-02-10T20:38:16.000Z
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi SDK Generator. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from...
32.9625
144
0.675768
import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables from . import outputs __all__ = [ 'GetActiveSessionsResult', 'AwaitableGetActiveSessionsResult', 'get_active_sessions', ] @pulumi.output_type class GetActi...
true
true
1c3d35000a369e06b58598e025d5b08b703b8893
2,217
py
Python
backend/right_one_33576/urls.py
crowdbotics-apps/right-one-33576
7303fd852ac6ca7db7652e56c67e2dd13a9d931e
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/right_one_33576/urls.py
crowdbotics-apps/right-one-33576
7303fd852ac6ca7db7652e56c67e2dd13a9d931e
[ "FTL", "AML", "RSA-MD" ]
null
null
null
backend/right_one_33576/urls.py
crowdbotics-apps/right-one-33576
7303fd852ac6ca7db7652e56c67e2dd13a9d931e
[ "FTL", "AML", "RSA-MD" ]
null
null
null
"""right_one_33576 URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Cla...
35.190476
87
0.710871
from django.contrib import admin from django.urls import path, include, re_path from django.views.generic.base import TemplateView from allauth.account.views import confirm_email from rest_framework import permissions from drf_yasg.views import get_schema_view from drf_yasg import openapi urlpatterns = [ path("",...
true
true
1c3d353a1df81ab9cd2b5335ad4a5360c1b1542b
1,867
py
Python
2021/day_04/day_04.py
stbisplinghoff/adventofcode
d97270987f890eabd8bc3ae90e11cbf87bc43715
[ "CC0-1.0" ]
null
null
null
2021/day_04/day_04.py
stbisplinghoff/adventofcode
d97270987f890eabd8bc3ae90e11cbf87bc43715
[ "CC0-1.0" ]
null
null
null
2021/day_04/day_04.py
stbisplinghoff/adventofcode
d97270987f890eabd8bc3ae90e11cbf87bc43715
[ "CC0-1.0" ]
null
null
null
# Solution to Advent of Code 2021 day 4 # Read input with open("input.txt") as inFile: data = inFile.read().split("\n\n") numbers = [int(value) for value in data[0].split(",")] fields = [[[int(element) for element in column.replace(" ", " ").split(" ")[-5:]] for column in rows.split("\n")] for rows in d...
28.723077
118
0.587038
with open("input.txt") as inFile: data = inFile.read().split("\n\n") numbers = [int(value) for value in data[0].split(",")] fields = [[[int(element) for element in column.replace(" ", " ").split(" ")[-5:]] for column in rows.split("\n")] for rows in data[1:]] def checkRowBingo(field): result = F...
true
true
1c3d356e4c9f0e37834a40bc83b202f056f4ab76
3,814
py
Python
examples/ApseLock/makeplot.py
alex-w/vplanet
e901ac08208f7fd5edb30677f32f36619eb8ca8c
[ "MIT" ]
null
null
null
examples/ApseLock/makeplot.py
alex-w/vplanet
e901ac08208f7fd5edb30677f32f36619eb8ca8c
[ "MIT" ]
null
null
null
examples/ApseLock/makeplot.py
alex-w/vplanet
e901ac08208f7fd5edb30677f32f36619eb8ca8c
[ "MIT" ]
null
null
null
""" This script produces a reproduction of Figures 2 and 3 from Rodriguez+2011, the dynamics of CoRoT-7b and c, using VPLANET's STELLAR, EQTIDE, and DISTORB modules. David P. Fleming, University of Washington, 2018 """ from __future__ import division, print_function import matplotlib.pyplot as plt import matplotlib ...
30.031496
81
0.674095
from __future__ import division, print_function import matplotlib.pyplot as plt import matplotlib as mpl import numpy as np import vplot as vpl import sys if (len(sys.argv) != 2): print('ERROR: Incorrect number of arguments.') print('Usage: '+sys.argv[0]+' <pdf | png>') exit(1) if (sys.argv[1] != 'pdf' ...
true
true
1c3d36a478576a963a1f769d426cbef47781f685
105
py
Python
test/main.py
maagauiya/Adv_Python_assign1
12b04135b2a5c93d9e1e11c393322cc2e4b4ac7f
[ "Apache-2.0" ]
null
null
null
test/main.py
maagauiya/Adv_Python_assign1
12b04135b2a5c93d9e1e11c393322cc2e4b4ac7f
[ "Apache-2.0" ]
null
null
null
test/main.py
maagauiya/Adv_Python_assign1
12b04135b2a5c93d9e1e11c393322cc2e4b4ac7f
[ "Apache-2.0" ]
null
null
null
import assign1 print("Enter the number up to which you want to filter") n=int(input()) assign1.topN(n)
26.25
57
0.733333
import assign1 print("Enter the number up to which you want to filter") n=int(input()) assign1.topN(n)
true
true
1c3d39aedabb1f844935ea61dc4717df9a03b4e1
2,868
py
Python
classify_tool_data_marks.py
skbly7/usefulness
ed11cd55080d553cf62873999a5e00b154057fbc
[ "MIT" ]
null
null
null
classify_tool_data_marks.py
skbly7/usefulness
ed11cd55080d553cf62873999a5e00b154057fbc
[ "MIT" ]
null
null
null
classify_tool_data_marks.py
skbly7/usefulness
ed11cd55080d553cf62873999a5e00b154057fbc
[ "MIT" ]
null
null
null
import cPickle as pickle import collections import csv import bs4 import re import markdown from textpreprocess import textpreprocess import sys reload(sys) sys.setdefaultencoding("utf-8") with open('trained_model.pickle', 'rb') as handle: vectorizer, clf, svd = pickle.load(handle) android = False file_reader = o...
26.311927
112
0.582985
import cPickle as pickle import collections import csv import bs4 import re import markdown from textpreprocess import textpreprocess import sys reload(sys) sys.setdefaultencoding("utf-8") with open('trained_model.pickle', 'rb') as handle: vectorizer, clf, svd = pickle.load(handle) android = False file_reader = o...
false
true
1c3d3bad83946917e9e5257c062b1be0fd493220
9,765
py
Python
financial_statement/models.py
jiun0507/minestock
b333298575cae1c426cc4450e85e9e576458b74a
[ "Unlicense" ]
null
null
null
financial_statement/models.py
jiun0507/minestock
b333298575cae1c426cc4450e85e9e576458b74a
[ "Unlicense" ]
null
null
null
financial_statement/models.py
jiun0507/minestock
b333298575cae1c426cc4450e85e9e576458b74a
[ "Unlicense" ]
1
2021-10-15T20:10:39.000Z
2021-10-15T20:10:39.000Z
from dataclasses import dataclass from datetime import datetime from django.db import models from django.db.models.fields import DateTimeField from django.urls import reverse @dataclass class FinancialStatementEntity: ticker: str period: str calendar_date: str report_period: str updated: str ...
39.534413
87
0.774296
from dataclasses import dataclass from datetime import datetime from django.db import models from django.db.models.fields import DateTimeField from django.urls import reverse @dataclass class FinancialStatementEntity: ticker: str period: str calendar_date: str report_period: str updated: str ...
true
true
1c3d3c3ea83ac485f66ecd43061b2ffea21ddbae
516
py
Python
src/utils/download_data.py
CBIIT/NCI-DOE-Collab-Pilot1-Center-Loss
ef6a27d8cc971b81ecf8c5a60fad6b24197a7630
[ "MIT" ]
null
null
null
src/utils/download_data.py
CBIIT/NCI-DOE-Collab-Pilot1-Center-Loss
ef6a27d8cc971b81ecf8c5a60fad6b24197a7630
[ "MIT" ]
null
null
null
src/utils/download_data.py
CBIIT/NCI-DOE-Collab-Pilot1-Center-Loss
ef6a27d8cc971b81ecf8c5a60fad6b24197a7630
[ "MIT" ]
1
2021-08-11T16:20:16.000Z
2021-08-11T16:20:16.000Z
import os from file_utils import get_file response_collection_path="https://modac.cancer.gov/api/v2/dataObject/NCI_DOE_Archive/JDACS4C/JDACS4C_Pilot_1/cancer_drug_response_prediction_dataset" combined_cl = "combined_cl_metadata" cl_url = response_collection_path + "/" + combined_cl rnaseq = "combined_rnaseq_data" r...
36.857143
149
0.813953
import os from file_utils import get_file response_collection_path="https://modac.cancer.gov/api/v2/dataObject/NCI_DOE_Archive/JDACS4C/JDACS4C_Pilot_1/cancer_drug_response_prediction_dataset" combined_cl = "combined_cl_metadata" cl_url = response_collection_path + "/" + combined_cl rnaseq = "combined_rnaseq_data" r...
true
true
1c3d3ce20bea319b44b4b69b58013997209dda26
8,639
py
Python
src/niweb/apps/noclook/middleware.py
SUNET/ni
f652e230524346bf0801cdf8bbb6ee63f4985cc2
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
src/niweb/apps/noclook/middleware.py
SUNET/ni
f652e230524346bf0801cdf8bbb6ee63f4985cc2
[ "BSD-2-Clause-FreeBSD" ]
2
2019-07-24T12:41:11.000Z
2020-03-31T10:10:04.000Z
src/niweb/apps/noclook/middleware.py
SUNET/ni
f652e230524346bf0801cdf8bbb6ee63f4985cc2
[ "BSD-2-Clause-FreeBSD" ]
1
2019-02-25T14:58:20.000Z
2019-02-25T14:58:20.000Z
# -*- coding: utf-8 -*- __author__ = 'ffuentes' from datetime import datetime from django.conf import settings from django.contrib.auth.middleware import get_user from django.contrib.auth.models import User from django.contrib.sessions.models import Session from django.contrib.sessions.backends.base import UpdateError...
38.73991
95
0.615581
__author__ = 'ffuentes' from datetime import datetime from django.conf import settings from django.contrib.auth.middleware import get_user from django.contrib.auth.models import User from django.contrib.sessions.models import Session from django.contrib.sessions.backends.base import UpdateError from django.core.excep...
true
true
1c3d3ce73cff55a4d2af4b5dacc1b4ab363aa996
9,948
py
Python
tests/utests/voltha/extensions/omci/test_onu_device_entry.py
sathishms77/test
bf8df6fc16c41720c7d99ed1ff17a64b543e9672
[ "Apache-2.0" ]
72
2017-01-18T02:36:34.000Z
2022-02-12T15:28:30.000Z
tests/utests/voltha/extensions/omci/test_onu_device_entry.py
sathishms77/test
bf8df6fc16c41720c7d99ed1ff17a64b543e9672
[ "Apache-2.0" ]
11
2017-03-03T17:56:09.000Z
2022-02-11T03:38:03.000Z
tests/utests/voltha/extensions/omci/test_onu_device_entry.py
sathishms77/test
bf8df6fc16c41720c7d99ed1ff17a64b543e9672
[ "Apache-2.0" ]
120
2017-02-02T23:26:11.000Z
2022-03-13T05:30:23.000Z
# # Copyright 2018 the original author or authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
38.708171
98
0.668778
from unittest import TestCase, main from nose.tools import assert_raises from nose.twistedtools import deferred from copy import deepcopy from mock.mock_adapter_agent import MockAdapterAgent, MockCore from mock.mock_onu_handler import MockOnuHandler from mock.mock_olt_handler import MockOltHandler from m...
true
true
1c3d3d0cb411845f0bc1f2fc13c35d8cbe8a9463
4,393
py
Python
src/demo_music_critic/plotter.py
fcr/Haifa_Tech_Meetup_Talk
d33a74dac894d2c5cd6aa49e1a60a7df284c0f8f
[ "MIT" ]
4
2020-04-08T03:02:09.000Z
2021-11-05T12:24:34.000Z
src/demo_music_critic/plotter.py
fcr/python_meetup_htm_slides
ef261cd2ec0bb81ecdd829420ae273baff3892cf
[ "MIT" ]
null
null
null
src/demo_music_critic/plotter.py
fcr/python_meetup_htm_slides
ef261cd2ec0bb81ecdd829420ae273baff3892cf
[ "MIT" ]
1
2020-12-04T03:23:11.000Z
2020-12-04T03:23:11.000Z
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
27.628931
95
0.681539
import sys import os import csv import time import subprocess from optparse import OptionParser from plot_output import NuPICPlotOutput WINDOW = 200 HIGHLIGHT_ALPHA = 0.3 ANOMALY_HIGHLIGHT_COLOR = 'red' DEFAULT_ANOMALY_THRESHOLD = 0.9 DEFAULT_ANOMALY_TRIGGER_COUNT = 1 parser = OptionParser( us...
true
true