hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1c24d8b487e547fe9509f6d8599ce346c100faa6 | 6,960 | py | Python | pySUTtoIO/transformation_model_b.py | CMLPlatform/pysuttoio | 4d0c2de6c7d6d90e9caf4b5b361e5046828bf113 | [
"MIT"
] | null | null | null | pySUTtoIO/transformation_model_b.py | CMLPlatform/pysuttoio | 4d0c2de6c7d6d90e9caf4b5b361e5046828bf113 | [
"MIT"
] | null | null | null | pySUTtoIO/transformation_model_b.py | CMLPlatform/pysuttoio | 4d0c2de6c7d6d90e9caf4b5b361e5046828bf113 | [
"MIT"
] | null | null | null | import math
import numpy as np
import os.path
import pySUTtoIO.tools as tl
import pySUTtoIO.sut as st
from pySUTtoIO.secondary_flows import make_secondary as ms
class TransformationModelB:
"""A supply-use table to input-output table transformation object.
From the supply-use table a product-by-product input-o... | 43.229814 | 118 | 0.642385 |
1c24dc8c55a9e00c109a3ae8e1dea4eb8073c9c0 | 540 | py | Python | var/spack/repos/builtin.mock/packages/b/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2020-10-15T01:08:42.000Z | 2021-10-18T01:28:18.000Z | var/spack/repos/builtin.mock/packages/b/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | var/spack/repos/builtin.mock/packages/b/package.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | # Copyright 2013-2019 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class B(Package):
"""Simple package with no dependencies"""
homepage = "http://www.example.... | 27 | 73 | 0.683333 |
1c24f681539e59d8627fcfcb3740121e429753f6 | 946 | py | Python | bin/latest_release.py | joeysim/redash | 141dbc9e706899df9b82898fc7f355c2d9ce56b1 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2017-06-29T15:02:38.000Z | 2017-06-29T15:02:38.000Z | bin/latest_release.py | joeysim/redash | 141dbc9e706899df9b82898fc7f355c2d9ce56b1 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | bin/latest_release.py | joeysim/redash | 141dbc9e706899df9b82898fc7f355c2d9ce56b1 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | #!/usr/bin/env python
import sys
import requests
if __name__ == '__main__':
response = requests.get('https://api.github.com/repos/EverythingMe/redash/releases')
if response.status_code != 200:
exit("Failed getting releases (status code: %s)." % response.status_code)
sorted_releases = sorted(respo... | 30.516129 | 102 | 0.654334 |
1c250eaff978521e25b269d52db38063c5176840 | 12,766 | py | Python | models/official/amoeba_net/tf_hub.py | tensorflow/tpu-demos | 8aac591077e5781785aa6c22bc400472ba14dada | [
"Apache-2.0"
] | 65 | 2017-07-28T03:47:42.000Z | 2018-02-04T20:54:18.000Z | models/official/amoeba_net/tf_hub.py | tensorflow/tpu-demos | 8aac591077e5781785aa6c22bc400472ba14dada | [
"Apache-2.0"
] | 10 | 2017-08-11T22:55:40.000Z | 2018-02-07T01:11:28.000Z | models/official/amoeba_net/tf_hub.py | tensorflow/tpu-demos | 8aac591077e5781785aa6c22bc400472ba14dada | [
"Apache-2.0"
] | 28 | 2017-07-28T08:20:06.000Z | 2018-01-28T16:28:12.000Z | # Copyright 2018 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... | 38.920732 | 80 | 0.703196 |
1c25a0900008a52dae20f9d8b95cb906fab019a7 | 15,850 | py | Python | jax/lib/xla_bridge.py | akihironitta/jax | c67454d0f85dd786b09ba2944bb629f3c88302f2 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | jax/lib/xla_bridge.py | akihironitta/jax | c67454d0f85dd786b09ba2944bb629f3c88302f2 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | jax/lib/xla_bridge.py | akihironitta/jax | c67454d0f85dd786b09ba2944bb629f3c88302f2 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2020-09-16T11:34:14.000Z | 2020-09-16T11:34:14.000Z | # Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 36.104784 | 98 | 0.730852 |
1c25bd38f5cef5acaa67a6c676341ff9509c80bf | 13,606 | py | Python | src/lib/reportlab/graphics/renderPDF.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | 1 | 2018-06-15T09:42:22.000Z | 2018-06-15T09:42:22.000Z | src/lib/reportlab/graphics/renderPDF.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | null | null | null | src/lib/reportlab/graphics/renderPDF.py | tschalch/pyTray | ab26c7d4618c16f1ef6df45f7c8bae81f08f855b | [
"BSD-3-Clause"
] | null | null | null | #Copyright ReportLab Europe Ltd. 2000-2004
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/renderPDF.py
# renderPDF - draws Drawings onto a canvas
"""Usage:
import renderpdf
renderpdf.draw(drawing, canvas, x, y)
Execut... | 37.585635 | 111 | 0.553285 |
1c262235dbcf371a90f5b8c58a665eac3c3e138e | 33,212 | py | Python | tests/notice_build_tests.py | cfpb/regulations-parser | 9b6e1ab2dbec93a915eb6da9a2d88c723b9ac424 | [
"CC0-1.0"
] | 36 | 2015-01-05T21:17:36.000Z | 2020-04-28T21:02:55.000Z | tests/notice_build_tests.py | DalavanCloud/regulations-parser | 9b6e1ab2dbec93a915eb6da9a2d88c723b9ac424 | [
"CC0-1.0"
] | 49 | 2015-01-28T15:54:25.000Z | 2018-08-20T20:20:08.000Z | tests/notice_build_tests.py | DalavanCloud/regulations-parser | 9b6e1ab2dbec93a915eb6da9a2d88c723b9ac424 | [
"CC0-1.0"
] | 23 | 2015-01-28T15:34:18.000Z | 2021-02-20T10:53:34.000Z | # vim: set encoding=utf-8
import os
import shutil
import tempfile
from unittest import TestCase
from lxml import etree
from regparser.notice import build, changes
from regparser.notice.diff import DesignateAmendment, Amendment
from regparser.tree.struct import Node
import settings
class NoticeBuildTest(TestCase):
... | 37.870011 | 79 | 0.507106 |
1c262798ef0ccd5b4443db834625c2d6f8b2099a | 4,081 | py | Python | savu/plugins/unregistered/i18_loaders/i18_mm_loader.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/unregistered/i18_loaders/i18_mm_loader.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/unregistered/i18_loaders/i18_mm_loader.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | # Copyright 2014 Diamond Light Source Ltd.
#
# 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 t... | 36.765766 | 74 | 0.665523 |
1c2629fd583598cee3584543ca1004a0e9a23497 | 798 | py | Python | qnarre.old/nn/gpt_2.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre.old/nn/gpt_2.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | qnarre.old/nn/gpt_2.py | quantapix/qnarre.com | f51d5945c20ef8182c4aa11f1b407d064c190c70 | [
"MIT"
] | null | null | null | # Copyright 2019 Quantapix Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | 46.941176 | 80 | 0.692982 |
1c262d683da38d8cf287acc4b08c9721b2547e9f | 11,125 | py | Python | tests/regressiontests/forms/tests/error_messages.py | jezdez-archive/django-old | 9e28c4f4e90f8dfcfbb55bb13be437afb4f870e9 | [
"BSD-3-Clause"
] | 1 | 2017-07-08T06:24:07.000Z | 2017-07-08T06:24:07.000Z | tests/regressiontests/forms/tests/error_messages.py | cheshire/django | d9c4eacbd95f6a02e67f669f294da2dc8967a630 | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/forms/tests/error_messages.py | cheshire/django | d9c4eacbd95f6a02e67f669f294da2dc8967a630 | [
"BSD-3-Clause"
] | 1 | 2020-07-15T05:01:00.000Z | 2020-07-15T05:01:00.000Z | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.core.files.uploadedfile import SimpleUploadedFile
from django.forms import *
from django.test import TestCase
from django.utils import unittest
from django.utils.safestring import mark_safe
from .fields import verify_exists_urls
class Asser... | 41.356877 | 119 | 0.589663 |
1c26347d9706ee59dfcc55489e0d96f0fd857c3d | 5,217 | py | Python | open-hackathon-server/src/hackathon/admin/admin_mgr.py | akondasif/open-hackathon-bak_01 | d60ad764edf689a95b6ffcc56815338b380801de | [
"MIT"
] | null | null | null | open-hackathon-server/src/hackathon/admin/admin_mgr.py | akondasif/open-hackathon-bak_01 | d60ad764edf689a95b6ffcc56815338b380801de | [
"MIT"
] | null | null | null | open-hackathon-server/src/hackathon/admin/admin_mgr.py | akondasif/open-hackathon-bak_01 | d60ad764edf689a95b6ffcc56815338b380801de | [
"MIT"
] | 1 | 2019-04-03T23:13:55.000Z | 2019-04-03T23:13:55.000Z | # -*- coding: utf-8 -*-
"""
Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved.
The MIT License (MIT)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without res... | 35.489796 | 111 | 0.650949 |
1c264cae3ba3b355a256b7c10ff77d094e231a49 | 17,309 | py | Python | contrib/.venv/lib/python3.8/site-packages/bitcoinlib/values.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | null | null | null | contrib/.venv/lib/python3.8/site-packages/bitcoinlib/values.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | null | null | null | contrib/.venv/lib/python3.8/site-packages/bitcoinlib/values.py | jtatman/katersltc-client | 7ea88bfa32e9bdce9bf8d434a8909a07b65412f7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# BitcoinLib - Python Cryptocurrency Library
# VALUE class - representing cryptocurrency values
# © 2020 November - 1200 Web Development <http://1200wd.com/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General P... | 40.631455 | 328 | 0.616442 |
1c2658a8ac0cd6f5e936f02c940cbcef773ca17a | 56 | py | Python | datetime/__init__.py | coolmacmaniac/pyutils | f5e4089d05159407d21de6d589c535e581dc94cc | [
"MIT"
] | null | null | null | datetime/__init__.py | coolmacmaniac/pyutils | f5e4089d05159407d21de6d589c535e581dc94cc | [
"MIT"
] | null | null | null | datetime/__init__.py | coolmacmaniac/pyutils | f5e4089d05159407d21de6d589c535e581dc94cc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from .DateTime import DateTime
| 14 | 30 | 0.642857 |
1c268d7087c4114c2680cb2a5728109295d8318b | 555 | py | Python | supriya/ugens/MouseButton.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/MouseButton.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | supriya/ugens/MouseButton.py | deeuu/supriya | 14fcb5316eccb4dafbe498932ceff56e1abb9d27 | [
"MIT"
] | null | null | null | import collections
from supriya import CalculationRate, SignalRange
from supriya.synthdefs import UGen
class MouseButton(UGen):
"""
A mouse-button tracker.
::
>>> supriya.ugens.MouseButton.kr()
MouseButton.kr()
"""
### CLASS VARIABLES ###
__documentation_section__ = "User... | 19.137931 | 57 | 0.661261 |
1c26987ec2cb105cc52e1945895392eb38f5e455 | 219 | py | Python | wikis/files.py | mouradmourafiq/django-wikis | 211438675b9ae63aa15c19f3d0a8c08582028557 | [
"BSD-2-Clause"
] | 1 | 2017-04-27T07:27:12.000Z | 2017-04-27T07:27:12.000Z | wikis/files.py | mouradmourafiq/django-wikis | 211438675b9ae63aa15c19f3d0a8c08582028557 | [
"BSD-2-Clause"
] | null | null | null | wikis/files.py | mouradmourafiq/django-wikis | 211438675b9ae63aa15c19f3d0a8c08582028557 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
def get_attachment_path(instance, filename):
"""Store file, appending new extension for added security"""
dir = "uploads/%s/%s" % (instance.event.get_url()[:32], filename)
return dir
| 36.5 | 69 | 0.6621 |
1c26a1399008ffd03690c070fe2b8edcf6d79992 | 14,398 | py | Python | azurelinuxagent/common/event.py | sundaxi/WALinuxAgent | 416b8b10b27a4cb0d4988834d26af7aae6836d84 | [
"Apache-2.0"
] | null | null | null | azurelinuxagent/common/event.py | sundaxi/WALinuxAgent | 416b8b10b27a4cb0d4988834d26af7aae6836d84 | [
"Apache-2.0"
] | null | null | null | azurelinuxagent/common/event.py | sundaxi/WALinuxAgent | 416b8b10b27a4cb0d4988834d26af7aae6836d84 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 Microsoft Corporation
#
# 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... | 34.946602 | 107 | 0.658078 |
1c26b8432cdb387ec1f6ce1b14ea7d2d0528808a | 384 | py | Python | terrascript/data/ncloud.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/data/ncloud.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/data/ncloud.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/data/ncloud.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:22:04 UTC)
#
# For imports without namespace, e.g.
#
# >>> import terrascript.data.ncloud
#
# instead of
#
# >>> import terrascript.data.NaverCloudPlatform.ncloud
#
# This is only available for 'official' and 'partner' provi... | 25.6 | 73 | 0.747396 |
1c26e81db5b293a98005ce326886ab764b681745 | 12,039 | py | Python | SCRAPE/Lib/site-packages/scrapy/exporters.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1 | 2019-09-16T12:22:36.000Z | 2019-09-16T12:22:36.000Z | SCRAPE/Lib/site-packages/scrapy/exporters.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1 | 2021-09-20T19:54:42.000Z | 2021-09-20T19:54:42.000Z | SCRAPE/Lib/site-packages/scrapy/exporters.py | Chinmoy-Prasad-Dutta/scrapy_scraper | 09f6abfc3bcf10ee28f486d83b450c89a07e066e | [
"MIT"
] | 1 | 2022-03-17T17:21:11.000Z | 2022-03-17T17:21:11.000Z | """
Item Exporters are used to export/serialize items into different formats.
"""
import csv
import io
import marshal
import pickle
import pprint
import warnings
from xml.sax.saxutils import XMLGenerator
from itemadapter import is_item, ItemAdapter
from scrapy.exceptions import ScrapyDeprecationWarning
from scrapy.i... | 35.513274 | 101 | 0.644489 |
1c270ad47f497ba7514f4b1aa5ce6aa86c4c5cdb | 6,756 | py | Python | retic/lib/router/router.py | reticpy/retic | 033c2a67d1895780d7c561988121ec5615d5bf91 | [
"MIT"
] | 3 | 2020-06-02T04:11:11.000Z | 2021-12-29T14:38:17.000Z | retic/lib/router/router.py | reticpy/retic | 033c2a67d1895780d7c561988121ec5615d5bf91 | [
"MIT"
] | null | null | null | retic/lib/router/router.py | reticpy/retic | 033c2a67d1895780d7c561988121ec5615d5bf91 | [
"MIT"
] | 1 | 2020-12-08T22:39:16.000Z | 2020-12-08T22:39:16.000Z | # Werkzeug
from werkzeug.routing import RequestRedirect
# Httpmethods
from httpmethods import get_http_methods
# Inspect
from inspect import getfile
# Traceback
import traceback
# Sys
import sys
# Os
import os
# Retic
from retic.lib.api.routes import Request, Response, Next
from retic.lib.router.httpmethod import... | 33.117647 | 141 | 0.590438 |
1c27671f6e05d4784511e091816bf74d1a32eb44 | 6,169 | py | Python | platon/_utils/module_testing/parity_module.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | platon/_utils/module_testing/parity_module.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | platon/_utils/module_testing/parity_module.py | shinnng/platon.py | 3197fac3839896290210da04dd0d45f0bdc731ce | [
"MIT"
] | null | null | null | import pytest
from typing import (
TYPE_CHECKING,
Dict,
)
from platon_typing import (
Bech32Address,
HexStr,
)
from platon_utils import (
add_0x_prefix,
)
from platon._utils.formatters import (
hex_to_integer,
)
from platon.exceptions import (
InvalidParityMode,
)
from platon.types import ... | 36.720238 | 242 | 0.668342 |
1c2774d604cbac8e2bf36973bf238e796b18cfa6 | 2,261 | py | Python | coffea/lookup_tools/evaluator.py | bfis/coffea | e5e67d410e86faee1172fcc864774d7024d97653 | [
"BSD-3-Clause"
] | 77 | 2019-06-09T14:23:33.000Z | 2022-03-22T21:34:01.000Z | coffea/lookup_tools/evaluator.py | bfis/coffea | e5e67d410e86faee1172fcc864774d7024d97653 | [
"BSD-3-Clause"
] | 353 | 2019-06-05T23:54:39.000Z | 2022-03-31T21:21:47.000Z | coffea/lookup_tools/evaluator.py | bfis/coffea | e5e67d410e86faee1172fcc864774d7024d97653 | [
"BSD-3-Clause"
] | 71 | 2019-06-07T02:04:11.000Z | 2022-03-05T21:03:45.000Z | from .dense_lookup import dense_lookup
from .dense_evaluated_lookup import dense_evaluated_lookup
from .jme_standard_function import jme_standard_function
from .jersf_lookup import jersf_lookup
from .jec_uncertainty_lookup import jec_uncertainty_lookup
from .rochester_lookup import rochester_lookup
lookup_types = {
... | 33.746269 | 87 | 0.693941 |
1c277945601fb806317e9ad971cc94d124c60211 | 18,853 | py | Python | generate_samples/model.py | smaeland/ML-2HDM | 20ca00847c82fcd6a28a6e1c65c43e0aba1a3d65 | [
"BSD-3-Clause"
] | null | null | null | generate_samples/model.py | smaeland/ML-2HDM | 20ca00847c82fcd6a28a6e1c65c43e0aba1a3d65 | [
"BSD-3-Clause"
] | null | null | null | generate_samples/model.py | smaeland/ML-2HDM | 20ca00847c82fcd6a28a6e1c65c43e0aba1a3d65 | [
"BSD-3-Clause"
] | null | null | null | # pylint: disable=C0303, C0103
## Class for a 2HDM model, contains parameters and computes xsec / BR
import os
import subprocess
import argparse
import h5py
import numpy as np
from glob import glob
from lhatool import LHA, Block, Entry
from dispatcher import Dispatcher
class Model(object):
""" All properties of... | 36.750487 | 123 | 0.476635 |
1c2781515954923409de7b79dc5589680e47406d | 8,637 | py | Python | tempest/stress/driver.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/stress/driver.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | tempest/stress/driver.py | midokura/tempest | b0ec1d280f057d5d9c2eda081bcbda7e381ecb3b | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Quanta Research Cambridge, 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 appli... | 35.253061 | 78 | 0.586662 |
1c27843aed06a80b355bb19d2f2952a85decbd13 | 994 | py | Python | py/0905.sort-array-by-parity.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0905.sort-array-by-parity.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | py/0905.sort-array-by-parity.py | ck2w/leetcode | 2d411530b690a2e51b0ae518bf3efaad2edc1083 | [
"MIT"
] | null | null | null | #
# @lc app=leetcode id=905 lang=python3
#
# [905] Sort Array By Parity
#
# https://leetcode.com/problems/sort-array-by-parity/description/
#
# algorithms
# Easy (74.80%)
# Likes: 2446
# Dislikes: 109
# Total Accepted: 412.7K
# Total Submissions: 551.8K
# Testcase Example: '[3,1,2,4]'
#
# Given an integer array ... | 17.75 | 77 | 0.590543 |
1c27a0cd22dbf660b8526f2af26ff99a640e3862 | 5,856 | py | Python | webviz_config/_theme_class.py | dotfloat/webviz-config | 2538035c81075b36d23e74642c5d0454c741c142 | [
"MIT"
] | null | null | null | webviz_config/_theme_class.py | dotfloat/webviz-config | 2538035c81075b36d23e74642c5d0454c741c142 | [
"MIT"
] | null | null | null | webviz_config/_theme_class.py | dotfloat/webviz-config | 2538035c81075b36d23e74642c5d0454c741c142 | [
"MIT"
] | null | null | null | import copy
import json
class WebvizConfigTheme:
"""Webviz config themes are all instances of this class. The only mandatory
property is the theme name set at initialization.
"""
def __init__(self, theme_name: str):
self.theme_name = theme_name
self._csp = {
"default-src"... | 39.302013 | 99 | 0.577527 |
1c27bf2eb8723a54feeb18803850e646a3056f7e | 352 | py | Python | arc/arc008/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | 2 | 2022-01-22T07:56:58.000Z | 2022-01-24T00:29:37.000Z | arc/arc008/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | arc/arc008/a/main.py | tonko2/AtCoder | 5d617072517881d226d7c8af09cb88684d41af7e | [
"Xnet",
"X11",
"CECILL-B"
] | null | null | null | import sys
import math
from collections import defaultdict, deque
sys.setrecursionlimit(10 ** 6)
stdin = sys.stdin
INF = float('inf')
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()
N = ni()
ans = (N // 10) * 100
N %= 10
if N >= 7:
ans += 100
el... | 16.761905 | 53 | 0.627841 |
1c27f0ef99cad37dbc55d60ec83e6ae7afff0829 | 3,484 | py | Python | bridger/serializers/fields/related.py | intellineers/django-bridger | ed097984a99df7da40a4d01bd00c56e3c6083056 | [
"BSD-3-Clause"
] | 2 | 2020-03-17T00:53:23.000Z | 2020-07-16T07:00:33.000Z | bridger/serializers/fields/related.py | intellineers/django-bridger | ed097984a99df7da40a4d01bd00c56e3c6083056 | [
"BSD-3-Clause"
] | 76 | 2019-12-05T01:15:57.000Z | 2021-09-07T16:47:27.000Z | bridger/serializers/fields/related.py | intellineers/django-bridger | ed097984a99df7da40a4d01bd00c56e3c6083056 | [
"BSD-3-Clause"
] | 1 | 2020-02-05T15:09:47.000Z | 2020-02-05T15:09:47.000Z | from typing import Dict
from rest_framework import serializers
from rest_framework.fields import empty
from rest_framework.relations import ManyRelatedField
from rest_framework.request import Request
from .mixins import BridgerSerializerFieldMixin
from .types import BridgerType, ReturnContentType
class BridgerManyR... | 34.156863 | 104 | 0.639208 |
1c27f9b611f98bb212fea2fa0935226a7ff1366b | 406 | py | Python | democracy_club/apps/dc_members/migrations/0006_auto_20150823_1702.py | chris48s/Website | efabd478d617a40d58304b3e9cce9da343cfaa78 | [
"BSD-3-Clause"
] | null | null | null | democracy_club/apps/dc_members/migrations/0006_auto_20150823_1702.py | chris48s/Website | efabd478d617a40d58304b3e9cce9da343cfaa78 | [
"BSD-3-Clause"
] | null | null | null | democracy_club/apps/dc_members/migrations/0006_auto_20150823_1702.py | chris48s/Website | efabd478d617a40d58304b3e9cce9da343cfaa78 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dc_members', '0005_auto_20150430_1903'),
]
operations = [
migrations.AlterField(
model_name='member',
... | 20.3 | 52 | 0.608374 |
1c27fcdd05db513ebf2533fb78d8a688c277b9dc | 593 | py | Python | guided_diffusion/grad_reverse.py | ZGCTroy/guided-diffusion | af987bb2b65db2875148a5466df79736ea5ae6a1 | [
"MIT"
] | null | null | null | guided_diffusion/grad_reverse.py | ZGCTroy/guided-diffusion | af987bb2b65db2875148a5466df79736ea5ae6a1 | [
"MIT"
] | null | null | null | guided_diffusion/grad_reverse.py | ZGCTroy/guided-diffusion | af987bb2b65db2875148a5466df79736ea5ae6a1 | [
"MIT"
] | null | null | null | from torch.autograd import Function
# class GradReverse(Function):
# def __init__(self, lambd):
# self.lambd = lambd
#
# def forward(self, x):
# return x.view_as(x)
#
# def backward(self, grad_output):
# return (grad_output * -self.lambd)
#
#
# def grad_reverse(x, lambd=1.0):
# ... | 20.448276 | 44 | 0.637437 |
1c282345d7c38c142ef902b5a1534e0b7835aa4a | 10,775 | py | Python | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/aio/operations/_management_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-09T08:59:13.000Z | 2022-03-09T08:59:13.000Z | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/aio/operations/_management_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/storage/azure-mgmt-storage/azure/mgmt/storage/v2019_04_01/aio/operations/_management_policies_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 46.847826 | 225 | 0.699582 |
1c2838e1c1cf9c4b8fa39bdf27809ca5427ca502 | 7,116 | py | Python | script/HalfBrainCells.py | lsb-riken/CUBIC-informatics | e7982072bb5d892f55e86cdf671376ab379b9b29 | [
"MIT"
] | 6 | 2019-11-23T18:45:19.000Z | 2021-03-24T16:02:06.000Z | script/HalfBrainCells.py | lsb-riken/CUBIC-informatics | e7982072bb5d892f55e86cdf671376ab379b9b29 | [
"MIT"
] | 5 | 2020-01-30T18:04:29.000Z | 2021-10-22T01:50:24.000Z | script/HalfBrainCells.py | lsb-riken/CUBIC-informatics | e7982072bb5d892f55e86cdf671376ab379b9b29 | [
"MIT"
] | 1 | 2019-09-12T07:57:07.000Z | 2019-09-12T07:57:07.000Z | #!/usr/bin/env python
#-*- coding:utf-8 -*-
import numpy as np
import pandas as pd
import os, os.path
import tifffile
from HalfBrainImages import HalfBrainImages
dt_local = np.dtype([
('local_x', 'f4'), ('local_y', 'f4'), ('local_z', 'f4'),
('structureness', 'f4'), ('blobness', 'f4'),('intensity', 'f4'),
... | 42.610778 | 132 | 0.605818 |
1c285615e3ba59148b4c36eb8a522921f7389c6f | 1,306 | py | Python | conditions/if_condition.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | 2 | 2020-11-02T05:52:33.000Z | 2021-06-09T01:28:22.000Z | conditions/if_condition.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | null | null | null | conditions/if_condition.py | nv-krishna/python-crash-course | d481faeb2196712cd52ca1d34dc1fe967d13712f | [
"Apache-2.0"
] | 2 | 2021-04-08T05:26:04.000Z | 2021-06-09T01:28:23.000Z | cars = ['audi', 'bmw', 'toyota', 'subaru']
for car in cars:
if car == "bmw":
print(car.upper())
else:
print(car.title())
requested_topping = "mushrooms"
if requested_topping != "tomatoes":
print("Wait for tomatoes later!")
lower_limit = 18
upper_limit = 30
age_0 = 35
age_1 = 25
contestants... | 26.12 | 78 | 0.659265 |
1c2866b837763c64b71780243ea635a0768d4d94 | 1,299 | py | Python | src/swarm_rescue/tuto_spg_jupyter/tuto_02_03_rooms.py | filliat/swarm-rescue | ce323c90ccb4a25216c63abccd09d3f31eea1189 | [
"MIT"
] | 5 | 2021-11-11T12:19:00.000Z | 2022-03-09T08:47:37.000Z | src/swarm_rescue/tuto_spg_jupyter/tuto_02_03_rooms.py | filliat/swarm-rescue | ce323c90ccb4a25216c63abccd09d3f31eea1189 | [
"MIT"
] | 4 | 2021-11-06T17:19:11.000Z | 2022-02-16T11:46:54.000Z | src/swarm_rescue/tuto_spg_jupyter/tuto_02_03_rooms.py | filliat/swarm-rescue | ce323c90ccb4a25216c63abccd09d3f31eea1189 | [
"MIT"
] | 3 | 2021-11-10T17:14:55.000Z | 2021-11-22T16:32:17.000Z | from simple_playgrounds.element.elements.basic import Physical
from simple_playgrounds.common.position_utils import CoordinateSampler
from simple_playgrounds.playground import GridRooms
from simple_playgrounds.engine import Engine
# matplotlib inline
import matplotlib.pyplot as plt
def plt_image(img):
plt.axis('... | 34.184211 | 91 | 0.729792 |
1c28ada8c2e5c0298d97d1ba003cdb17146601c9 | 3,899 | py | Python | src/configurator.py | mnuyens/forseti2 | 3c6d76ffac2b64d51f03d3922e3b388a4e35f1a8 | [
"Apache-2.0"
] | 1 | 2015-03-07T04:48:53.000Z | 2015-03-07T04:48:53.000Z | src/configurator.py | mnuyens/forseti2 | 3c6d76ffac2b64d51f03d3922e3b388a4e35f1a8 | [
"Apache-2.0"
] | null | null | null | src/configurator.py | mnuyens/forseti2 | 3c6d76ffac2b64d51f03d3922e3b388a4e35f1a8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
"""
configurator.py
Created on Sat Apr 27 12:00:00 2013
@author: kyle
reads from various resource files stored on disk.
sends configs to PiEMOS controller, via channels PiEMOS{n}/Config
these configs contain RFID mappings and the PiEMOS layout configuration.
example ... | 30.700787 | 143 | 0.638882 |
1c28b7c1c900b457a4b55f062b61022e5ce3d743 | 6,594 | py | Python | packnet-sfm/packnet_sfm/utils/load.py | Fatmangh/VIDEO-ACTION-CLASSIFICATION-USING-PRETAINED-SELF-SUPERVISED-DEPTH-AWARE-DENSE-PREDICTIVE-CODING- | 13fac05601efed16ae8b29989aad487e04cd90a7 | [
"MIT"
] | null | null | null | packnet-sfm/packnet_sfm/utils/load.py | Fatmangh/VIDEO-ACTION-CLASSIFICATION-USING-PRETAINED-SELF-SUPERVISED-DEPTH-AWARE-DENSE-PREDICTIVE-CODING- | 13fac05601efed16ae8b29989aad487e04cd90a7 | [
"MIT"
] | null | null | null | packnet-sfm/packnet_sfm/utils/load.py | Fatmangh/VIDEO-ACTION-CLASSIFICATION-USING-PRETAINED-SELF-SUPERVISED-DEPTH-AWARE-DENSE-PREDICTIVE-CODING- | 13fac05601efed16ae8b29989aad487e04cd90a7 | [
"MIT"
] | null | null | null | # Copyright 2020 Toyota Research Institute. All rights reserved.
import importlib
import logging
import os
import warnings
import torch
from inspect import signature
from collections import OrderedDict
import sys
sys.path.append('../packnet-sfm/packnet_sfm/utils')
sys.path.append('../packnet-sfm/configs')
sys.path.... | 30.527778 | 96 | 0.634213 |
1c28ee2fc5f6f50b7369f2bf4b21b8351e37c5ee | 3,639 | py | Python | lib/geomet/util.py | davasqueza/eriskco_conector_CloudSQL | 99304b5eed06e9bba3646535a82d7fc98b0838b7 | [
"Apache-2.0"
] | null | null | null | lib/geomet/util.py | davasqueza/eriskco_conector_CloudSQL | 99304b5eed06e9bba3646535a82d7fc98b0838b7 | [
"Apache-2.0"
] | null | null | null | lib/geomet/util.py | davasqueza/eriskco_conector_CloudSQL | 99304b5eed06e9bba3646535a82d7fc98b0838b7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Lars Butler & individual contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 32.491071 | 79 | 0.583402 |
1c28fda1d1ed12399e7e449a8fff5b6e5e8d9835 | 22,209 | py | Python | StreamPy/StreamPy-UI/src/root/nested/temp/deprecated.py | AnomalyInc/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | 2 | 2017-04-27T11:04:27.000Z | 2019-02-07T21:03:32.000Z | StreamPy/StreamPy-UI/src/root/nested/temp/deprecated.py | StreamPy/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | null | null | null | StreamPy/StreamPy-UI/src/root/nested/temp/deprecated.py | StreamPy/StreamPy | 94abca276b2857de48259f4f42ef95efbdf5f6d1 | [
"Apache-2.0"
] | null | null | null | # from example.py
'''
rename_stream() replaces a component name
with the random id with an integer (1, 2, 3,...)
if there are multiple instances.
Parameters
----------
instance_dict : dict
Component names with random id's paired with
dict of it's 'in' and 'out' ports
Returns
-------
comp_list : dict
Plai... | 36.830846 | 141 | 0.576298 |
1c29078746a98d58cbdbc10dabc2e3518bddfb1b | 5,375 | py | Python | pages/models.py | andywar65/projetc_repo | a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef | [
"BSD-2-Clause"
] | null | null | null | pages/models.py | andywar65/projetc_repo | a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef | [
"BSD-2-Clause"
] | 2 | 2021-03-19T17:12:07.000Z | 2021-03-19T17:12:08.000Z | pages/models.py | andywar65/projetc_repo | a318b36d601a15a1d5e4a9bbc65d7bcbb5ac02ef | [
"BSD-2-Clause"
] | null | null | null | import uuid
import json
from django.utils.timezone import now
from django.utils.html import strip_tags
from django.db import models
from django.utils.translation import gettext as _
from django.urls import reverse
from filebrowser.fields import FileBrowseField
from treebeard.mp_tree import MP_Node
from project.utils... | 37.587413 | 81 | 0.628465 |
1c29157b6b0e74b8dfb711574b31c47c02f0964c | 1,611 | py | Python | var/spack/repos/builtin/packages/r-htmltable/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-09-10T22:50:08.000Z | 2021-01-12T22:18:54.000Z | var/spack/repos/builtin/packages/r-htmltable/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2021-01-08T22:23:53.000Z | 2022-03-30T11:08:17.000Z | var/spack/repos/builtin/packages/r-htmltable/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RHtmltable(RPackage):
"""Tables with state-of-the-art layout elements such as row
span... | 48.818182 | 96 | 0.717567 |
1c2923ed268d9607c43bb7b6bf8154bfed270b64 | 5,066 | py | Python | .leetcode/599.minimum-index-sum-of-two-lists.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/599.minimum-index-sum-of-two-lists.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/599.minimum-index-sum-of-two-lists.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=599 lang=python3
#
# [599] Minimum Index Sum of Two Lists
#
# https://leetcode.com/problems/minimum-index-sum-of-two-lists/description/
#
# algorithms
# Easy (52.67%)
# Likes: 946
# Dislikes: 273
# Total Accepted: 128.1K
# Total Submissions: 242.9K
# Testcase Example: '["Shogun","Tapioca Ex... | 26.52356 | 149 | 0.57422 |
1c294d6a428fa505f52252d746bf545c89aa7f6c | 1,849 | py | Python | src/olympia/amo/management/commands/create_db.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 3 | 2020-03-05T18:17:14.000Z | 2020-03-09T01:24:38.000Z | src/olympia/amo/management/commands/create_db.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1,398 | 2020-10-08T06:32:26.000Z | 2022-03-31T12:06:24.000Z | src/olympia/amo/management/commands/create_db.py | shashwatsingh/addons-server | 8fce98901104349055a828b5a47865f5e8f4120b | [
"BSD-3-Clause"
] | 1 | 2020-06-04T10:18:59.000Z | 2020-06-04T10:18:59.000Z | # -*- coding: utf-8 -*-
import logging
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
import MySQLdb as mysql
class Command(BaseCommand):
"""Based on django_extension's reset_db command but simplifed and with
support for all character sets defined in setti... | 31.87931 | 74 | 0.593294 |
1c2954aa9043e561fb23a7508ca1d9f30138a7b4 | 2,177 | py | Python | blo/tests/test_blog.py | jamess098/blo | a4ab03b691d9809eb4a1f46669ae51e882640520 | [
"BSD-3-Clause"
] | 12 | 2015-12-21T13:07:30.000Z | 2020-09-20T08:27:17.000Z | blo/tests/test_blog.py | jamess098/blo | a4ab03b691d9809eb4a1f46669ae51e882640520 | [
"BSD-3-Clause"
] | 5 | 2016-08-02T09:34:33.000Z | 2017-10-12T15:02:09.000Z | blo/tests/test_blog.py | jamess098/blo | a4ab03b691d9809eb4a1f46669ae51e882640520 | [
"BSD-3-Clause"
] | 8 | 2015-12-06T00:03:28.000Z | 2021-01-19T02:46:46.000Z | import unittest
import os
import shutil
import sys
import subprocess
from datetime import datetime
import blog
class SandboxTestCase(unittest.TestCase):
def make_sandbox(self):
self.sandbox = '{0}/test-artifacts/'.format(
os.getcwd(),
self.__class__.__name__,
self._tes... | 23.923077 | 79 | 0.567754 |
1c2961e4a068be97f4891cfcc5a4f6fc5a692073 | 2,420 | py | Python | setup.py | matheusmatos/django-rest-models | 18da71bd921064279b03129aac38d3fbb9e29ae2 | [
"BSD-2-Clause"
] | null | null | null | setup.py | matheusmatos/django-rest-models | 18da71bd921064279b03129aac38d3fbb9e29ae2 | [
"BSD-2-Clause"
] | null | null | null | setup.py | matheusmatos/django-rest-models | 18da71bd921064279b03129aac38d3fbb9e29ae2 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import rest_models
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
version = rest_models.__VERSION__
if 'DJANGO_SETTINGS_MODULE' not in os.environ:
os.environ['DJANGO_SETTINGS_MODULE'] = 'testsetti... | 30.25 | 97 | 0.631818 |
1c297c8064f33f328c3b86a48818a0e5c4ce8af9 | 13,712 | py | Python | 4. Evaluate/pascalvoc.py | Zyjacya-In-love/Pedestrian-Detection-on-YOLOv3 | 6503d029b3e3a7da5c373ca500777cc38d49d54b | [
"MIT"
] | 26 | 2020-05-29T16:11:56.000Z | 2022-03-24T19:56:45.000Z | 4. Evaluate/pascalvoc.py | Zyjacya-In-love/Pedestrian-Detection-on-YOLOv3 | 6503d029b3e3a7da5c373ca500777cc38d49d54b | [
"MIT"
] | 10 | 2020-07-18T04:12:04.000Z | 2022-02-10T01:53:42.000Z | 4. Evaluate/pascalvoc.py | Zyjacya-In-love/Pedestrian-Detection-on-YOLOv3 | 6503d029b3e3a7da5c373ca500777cc38d49d54b | [
"MIT"
] | 7 | 2020-06-08T12:20:28.000Z | 2021-01-17T12:57:26.000Z | ###########################################################################################
# #
# This sample shows how to evaluate object detections applying the following metrics: #
# * Precision x Recall curve ----> ... | 36.860215 | 99 | 0.599475 |
1c298940e5d79a599afb471e9ca2d5c970aef700 | 737 | py | Python | app/core/migrations/0014_alter_event_event_date_alter_event_event_time.py | Misiaty-Mat/Event-schedule | 15ab5ec3d49b1f16e43a8d90709df5d143401c7a | [
"MIT"
] | null | null | null | app/core/migrations/0014_alter_event_event_date_alter_event_event_time.py | Misiaty-Mat/Event-schedule | 15ab5ec3d49b1f16e43a8d90709df5d143401c7a | [
"MIT"
] | null | null | null | app/core/migrations/0014_alter_event_event_date_alter_event_event_time.py | Misiaty-Mat/Event-schedule | 15ab5ec3d49b1f16e43a8d90709df5d143401c7a | [
"MIT"
] | null | null | null | # Generated by Django 4.0.1 on 2022-01-30 15:35
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('core', '0013_alter_event_event_date_alter_event_event_time'),
]
operations = [
migrati... | 28.346154 | 107 | 0.628223 |
1c29927f2a163f6afabb855ee2870ef00283ca48 | 22,491 | py | Python | functions/POM_build.py | NavarreCML/National-EAT-Lancet-Diets | d61ffb59829a64d1bfca3f43e593e656d4543f33 | [
"MIT"
] | null | null | null | functions/POM_build.py | NavarreCML/National-EAT-Lancet-Diets | d61ffb59829a64d1bfca3f43e593e656d4543f33 | [
"MIT"
] | null | null | null | functions/POM_build.py | NavarreCML/National-EAT-Lancet-Diets | d61ffb59829a64d1bfca3f43e593e656d4543f33 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from functions import fao_regions as regions
data = 'data/'
def data_build(crop_proxie, diet_div_crop, diet_source_crop, diet_ls_only, diet_ls_only_source, min_waste):
"""*** Import of country data to build national diets ***"""
WPR_height = pd.read_csv(r"data/worldpopu... | 62.301939 | 347 | 0.640834 |
1c299dc88a574f6ab92752535ea4a9c73398245b | 6,289 | py | Python | src/Application/PythonScriptModule/pymodules_old/lib/qp_xml.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 1 | 2018-04-02T15:38:10.000Z | 2018-04-02T15:38:10.000Z | src/Application/PythonScriptModule/pymodules_old/lib/qp_xml.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | null | null | null | src/Application/PythonScriptModule/pymodules_old/lib/qp_xml.py | antont/tundra | 5c9b0a3957071f08ab425dff701cdbb34f9e1868 | [
"Apache-2.0"
] | 1 | 2021-09-04T12:37:34.000Z | 2021-09-04T12:37:34.000Z | # pylint: disable-msg=W0311,E1101,E1103,W0201,C0103,W0622,W0402,W0706,R0911,W0613,W0612,R0912,W0141,C0111,C0121
# qp_xml: Quick Parsing for XML
#
# Written by Greg Stein. Public Domain.
# No Copyright, no Rights Reserved, and no Warranties.
#
# This module is maintained by Greg and is available as part of the XML-SIG
... | 25.77459 | 111 | 0.62506 |
1c29ab958ae870b27f1e34bddcf8cb30bc163edf | 2,664 | py | Python | docs/source/examples/breakdowns.py | appliedopt/gpkit | 647ef0a2a0ff625026943bfd7fb5ca560100898b | [
"MIT"
] | 1 | 2015-01-20T16:02:38.000Z | 2015-01-20T16:02:38.000Z | docs/source/examples/breakdowns.py | appliedopt/gpkit | 647ef0a2a0ff625026943bfd7fb5ca560100898b | [
"MIT"
] | 2 | 2015-01-19T21:29:44.000Z | 2015-01-20T15:26:26.000Z | docs/source/examples/breakdowns.py | appliedopt/gpkit | 647ef0a2a0ff625026943bfd7fb5ca560100898b | [
"MIT"
] | null | null | null | "An example to show off Breakdowns"
import os
import sys
import pickle
import pint
from packaging import version
from gpkit.breakdowns import Breakdowns
dirpath = os.path.dirname(os.path.realpath(__file__)) + os.sep
if version.parse(pint.__version__) >= version.parse("0.13"):
sol = pickle.load(open(dirpath+"solar_... | 40.984615 | 79 | 0.644895 |
1c29ebe96258e9703ea434ab29e480218c91a2d9 | 276,679 | py | Python | python/openlattice/api/edm_api.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | python/openlattice/api/edm_api.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | 1 | 2021-01-20T00:20:01.000Z | 2021-01-20T00:20:01.000Z | python/openlattice/api/edm_api.py | openlattice/api-clients | 1d5be9861785b295089b732f37464e31bf80c8ca | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenLattice API
OpenLattice API # noqa: E501
The version of the OpenAPI document: 0.0.1
Contact: support@openlattice.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility l... | 46.563278 | 205 | 0.602941 |
1c29f860bb7628c88ac43945ae3d49f7748e2f38 | 1,185 | py | Python | rebuild_tool/pkg_source_plugins/koji.py | mcyprian/deps_visualization | 064b36d49ce0b19b244d8853550bca1533ac8bea | [
"MIT"
] | 2 | 2016-01-22T11:08:06.000Z | 2016-06-02T13:11:41.000Z | rebuild_tool/pkg_source_plugins/koji.py | mcyprian/sclbuilder | 064b36d49ce0b19b244d8853550bca1533ac8bea | [
"MIT"
] | null | null | null | rebuild_tool/pkg_source_plugins/koji.py | mcyprian/sclbuilder | 064b36d49ce0b19b244d8853550bca1533ac8bea | [
"MIT"
] | null | null | null | from collections import UserDict
from rebuild_tool.pkg_source import set_class_attrs
from rebuild_tool.pkg_source_plugins.dnf import DnfArchive
from rebuild_tool.utils import ChangeDir, subprocess_popen_call
from rebuild_tool.exceptions import DownloadFailException
class PkgsContainer(UserDict):
@set_class_attrs
... | 34.852941 | 85 | 0.607595 |
1c2a1b6dae4565fde7212aa6d225a50c45b83626 | 7,956 | py | Python | autorest/codegen/models/lro_operation.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | autorest/codegen/models/lro_operation.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | autorest/codegen/models/lro_operation.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import log... | 44.446927 | 117 | 0.663524 |
1c2a45aa61ea99e236668d11ad575c2392a86af9 | 12,380 | py | Python | crusaders/__init__.py | vladiibine/bots | 795e4a67c748b47d8a55cbc31a57f15314de41e5 | [
"MIT"
] | null | null | null | crusaders/__init__.py | vladiibine/bots | 795e4a67c748b47d8a55cbc31a57f15314de41e5 | [
"MIT"
] | null | null | null | crusaders/__init__.py | vladiibine/bots | 795e4a67c748b47d8a55cbc31a57f15314de41e5 | [
"MIT"
] | null | null | null | from __future__ import print_function
from datetime import datetime
import sys
import time
from autopy import mouse
from autopy import screen
from autopy import key
p0_click_monsters = (1352, 407)
p1_level_crusaders = (1440, 747)
p2_confirm_upgrade = (870, 485)
p3_buy_upgrades = (1441, 651)
p4_next_page = (1443, 704... | 37.289157 | 86 | 0.569709 |
1c2a4fb0780d02319190b9bae9f8b719274379f8 | 2,082 | py | Python | tests/test_aws_stacks_iam.py | ibejohn818/stackformation | 7ab5b29b584c64cea31add470c4f6df847d19c1c | [
"MIT"
] | null | null | null | tests/test_aws_stacks_iam.py | ibejohn818/stackformation | 7ab5b29b584c64cea31add470c4f6df847d19c1c | [
"MIT"
] | 1,396 | 2017-12-24T18:25:05.000Z | 2022-03-31T15:05:19.000Z | tests/test_aws_stacks_iam.py | ibejohn818/stackformation | 7ab5b29b584c64cea31add470c4f6df847d19c1c | [
"MIT"
] | null | null | null | import pytest
from stackformation.aws.stacks import iam, s3
from stackformation import (Infra)
@pytest.fixture
def test_infra():
infra = Infra('test')
test_infra = infra.create_sub_infra('test')
return {
'infra': infra,
'test_infra': test_infra
}
def test_iam_base(t... | 24.209302 | 72 | 0.695485 |
1c2a578edcd328360391befacfac4fafbb396262 | 63,079 | py | Python | lib/matplotlib/backends/backend_wx.py | pmarshwx/matplotlib | 12be528dbf2114f7c25abf60de8100cb2d4494af | [
"MIT",
"BSD-3-Clause"
] | null | null | null | lib/matplotlib/backends/backend_wx.py | pmarshwx/matplotlib | 12be528dbf2114f7c25abf60de8100cb2d4494af | [
"MIT",
"BSD-3-Clause"
] | null | null | null | lib/matplotlib/backends/backend_wx.py | pmarshwx/matplotlib | 12be528dbf2114f7c25abf60de8100cb2d4494af | [
"MIT",
"BSD-3-Clause"
] | null | null | null | """
A wxPython backend for matplotlib, based (very heavily) on
backend_template.py and backend_gtk.py
Author: Jeremy O'Donoghue (jeremy@o-donoghue.com)
Derived from original copyright work by John Hunter
(jdhunter@ace.bsd.uchicago.edu)
Copyright (C) Jeremy O'Donoghue & John Hunter, 2003-4
License: This work ... | 33.968228 | 131 | 0.595523 |
1c2a6d5c55d4dabf725164549a87863bd7fc1c4e | 2,767 | py | Python | examples/scripts/tv/tvl2den_clr.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 217 | 2016-06-13T16:41:26.000Z | 2022-03-22T06:31:05.000Z | examples/scripts/tv/tvl2den_clr.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 21 | 2016-06-13T23:28:35.000Z | 2022-02-17T23:20:01.000Z | examples/scripts/tv/tvl2den_clr.py | vishalbelsare/sporco | afc3dae3ab81d84a23e8487812670ecb7457e869 | [
"BSD-3-Clause"
] | 47 | 2016-12-14T13:08:33.000Z | 2021-12-12T01:59:49.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of the SPORCO package. Details of the copyright
# and user license can be found in the 'LICENSE.txt' file distributed
# with the package.
"""
Colour ℓ2-TV Denoising
======================
This example demonstrates the use of class :class:`.tvl2.TVL2Den... | 27.127451 | 209 | 0.68558 |
1c2a6f09feb2fd1c7f05e93361618f687d8c183d | 13,892 | py | Python | ACDC_Diagnosis/stage_2_diagnosis.py | manigalati/Automated-Cardiac-Segmentation-and-Disease-Diagnosis | fa0532b1664bf770a970ac240e42da80088e9abc | [
"MIT"
] | 51 | 2018-03-19T09:13:24.000Z | 2022-03-28T11:38:04.000Z | ACDC_Diagnosis/stage_2_diagnosis.py | nguyenquangduc2000/Automated-Cardiac-Segmentation-and-Disease-Diagnosis | cfa556f9cdd12586783821435fa84e73f20a72c8 | [
"MIT"
] | 4 | 2018-08-20T17:27:06.000Z | 2020-12-02T09:45:55.000Z | ACDC_Diagnosis/stage_2_diagnosis.py | nguyenquangduc2000/Automated-Cardiac-Segmentation-and-Disease-Diagnosis | cfa556f9cdd12586783821435fa84e73f20a72c8 | [
"MIT"
] | 41 | 2018-11-20T12:46:04.000Z | 2022-03-21T13:50:40.000Z | """
This code does training, validation and testing of the model for automated cardiac disease diagnosis.
Basically Implementation of second stage of the disease diagnosis model for discriminating between DCM vs. MINF
"""
from __future__ import print_function
import numpy as np
import os
import subprocess
import matplo... | 41.345238 | 142 | 0.671682 |
1c2a8c39c2e2c17b0b38193d659dd6d7cb2b2e0a | 2,380 | py | Python | src/confidentialledger/azext_confidentialledger/vendored_sdks/confidentialledger/models/_confidential_ledger_enums.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/confidentialledger/azext_confidentialledger/vendored_sdks/confidentialledger/models/_confidential_ledger_enums.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | src/confidentialledger/azext_confidentialledger/vendored_sdks/confidentialledger/models/_confidential_ledger_enums.py | saisankargochhayat/azure-cli-extensions | f89443a766961f984977a2cf1b682973fcb61edd | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 33.055556 | 94 | 0.663445 |
1c2a959273c3f9124f5a44408677c60973bbbfca | 3,152 | py | Python | services/web/server/tests/unit/login/test_login.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | services/web/server/tests/unit/login/test_login.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | 2 | 2018-05-13T09:10:57.000Z | 2019-03-06T08:10:40.000Z | services/web/server/tests/unit/login/test_login.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | # pylint:disable=wildcard-import
# pylint:disable=unused-import
# pylint:disable=unused-variable
# pylint:disable=unused-argument
# pylint:disable=redefined-outer-name
from aiohttp import web
from servicelib.rest_responses import unwrap_envelope
from simcore_service_webserver.db_models import ConfirmationAction, User... | 32.163265 | 81 | 0.672589 |
1c2aa40bbe155d14990a1fca83f3c94e998b7968 | 14,261 | py | Python | tests/test_cython_parsing.py | wltrimbl/khmer | ff95776eabee96420f1ae43d0eff562682cbb17b | [
"CNRI-Python"
] | null | null | null | tests/test_cython_parsing.py | wltrimbl/khmer | ff95776eabee96420f1ae43d0eff562682cbb17b | [
"CNRI-Python"
] | null | null | null | tests/test_cython_parsing.py | wltrimbl/khmer | ff95776eabee96420f1ae43d0eff562682cbb17b | [
"CNRI-Python"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
import gc
import itertools
import random
import khmer
from khmer._oxli.parsing import Sequence, FastxParser, SanitizedFastxParser
from khmer._oxli.parsing import BrokenPairedReader, Alphabets, check_is_pair
from khmer._oxli.parsing import ch... | 32.191874 | 78 | 0.57233 |
1c2aada379dbf076dfd205708d9fd7d20b93c21b | 1,736 | py | Python | setup.py | npelikan/clarify | 2760b416209aa20c879e7ac4861a94cb3df55e30 | [
"MIT"
] | null | null | null | setup.py | npelikan/clarify | 2760b416209aa20c879e7ac4861a94cb3df55e30 | [
"MIT"
] | null | null | null | setup.py | npelikan/clarify | 2760b416209aa20c879e7ac4861a94cb3df55e30 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from setuptools import setup, find_packages
# PyPI only supports nicely-formatted README files in reStructuredText.
# GitHub and @dwillis prefer Markdown. Use a version of the pattern from
# https://coderwall.com/p/qawuyq/use-markdown-readme-s-in-python-modules
# to convert the Markdown README ... | 32.754717 | 76 | 0.651498 |
1c2ac4ae55fa2e80c1a9c465c094082b9c0ebfee | 3,543 | py | Python | scikinC/QuantileTransformerConverter.py | landerlini/scikinC | c408e2b63a32eecefc514193a4483b9d95b8d0fa | [
"MIT"
] | null | null | null | scikinC/QuantileTransformerConverter.py | landerlini/scikinC | c408e2b63a32eecefc514193a4483b9d95b8d0fa | [
"MIT"
] | 2 | 2021-07-30T16:30:23.000Z | 2021-09-15T07:27:38.000Z | scikinC/QuantileTransformerConverter.py | landerlini/scikinC | c408e2b63a32eecefc514193a4483b9d95b8d0fa | [
"MIT"
] | null | null | null | import numpy as np
import sys
from scikinC import BaseConverter
from scipy import stats
from ._tools import array2c, get_interpolation_function
class QuantileTransformerConverter (BaseConverter):
def convert (self, model, name=None):
lines = self.header()
distr = model.output_distribution
if distr n... | 28.572581 | 81 | 0.545865 |
1c2b0d222214b97788dd34af2da3c7c85053506c | 976 | py | Python | certificate_generator/txx_tools/txx_re.py | SleepAqua/certificate_generator | 94605394ac68aa9edbbea548acc4f541bfef8aa2 | [
"MIT"
] | 1 | 2020-10-10T08:55:29.000Z | 2020-10-10T08:55:29.000Z | certificate_generator/txx_tools/txx_re.py | SleepAqua/certificate_generator | 94605394ac68aa9edbbea548acc4f541bfef8aa2 | [
"MIT"
] | null | null | null | certificate_generator/txx_tools/txx_re.py | SleepAqua/certificate_generator | 94605394ac68aa9edbbea548acc4f541bfef8aa2 | [
"MIT"
] | null | null | null | '''
@version: Python 3.7.3
@Author: Louis
@Date: 2020-06-15 15:00:28
@LastEditors: Louis
@LastEditTime: 2020-06-15 17:53:26
'''
import re
from .txx_consts import TODAY
"""
() are important for "|" logic!
"""
# Finance
ASHARE_STK_REGEX = '^60.*SH|^00.*SZ|^30.*SZ'
ASHARE_IDX_REGEX = '^000.*SH|^399.*SZ'
ASHARE_INFUND_R... | 25.684211 | 92 | 0.597336 |
1c2b79dfe93716447fb6e457d9d92a3368f4e808 | 481 | py | Python | Python-code-snippets-101-200/141-List audio devices.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | Python-code-snippets-101-200/141-List audio devices.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | Python-code-snippets-101-200/141-List audio devices.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | '''
141-List audio devices
more Python code snippets
stevepython.wordpress.com
source:
https://pbaumgarten.com/python/audio/
pip3 install pyaudio
Linux:
sudo apt-get install python-pyaudio python3-pyaudio
'''
import pyaudio
def list_devices():
p = pyaudio.PyAudio()
device_count = p.get_device_count()
f... | 19.24 | 67 | 0.704782 |
1c2bcc15f683de53f888261008c1e63ae818dbf9 | 10,555 | py | Python | src/ggrc/migrations/versions/20161220161315_275cd0dcaea_migrate_assessments_issues_data.py | Killswitchz/ggrc-core | 2460df94daf66727af248ad821462692917c97a9 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2018-03-30T11:28:48.000Z | 2018-03-30T11:28:48.000Z | src/ggrc/migrations/versions/20161220161315_275cd0dcaea_migrate_assessments_issues_data.py | trevordonnelly/ggrc-core | 499cf0d3cce70737b080991b12c203ec22015cea | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2018-07-06T00:04:23.000Z | 2021-02-26T21:13:20.000Z | src/ggrc/migrations/versions/20161220161315_275cd0dcaea_migrate_assessments_issues_data.py | zidarsk8/ggrc-core | 2509c989eddf434249d3bef50c21e08dbf56c1a4 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-11-11T22:16:56.000Z | 2017-11-11T22:16:56.000Z | # Copyright (C) 2016 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""
migrate-assessments-issues-data
Create Date: 2016-12-20 16:13:15.208946
"""
# disable Invalid constant name pylint warning for mandatory Alembic variables.
# pylint: disable=invalid-name
from collectio... | 32.179878 | 79 | 0.645381 |
1c2bd15b25f8553f85262487587573b094708e24 | 4,723 | py | Python | lib/molecule/shell.py | santiagoroman/molecule | 4565cce0ea1f9b1e2dc3fb2aa668715ae466d534 | [
"MIT"
] | null | null | null | lib/molecule/shell.py | santiagoroman/molecule | 4565cce0ea1f9b1e2dc3fb2aa668715ae466d534 | [
"MIT"
] | null | null | null | lib/molecule/shell.py | santiagoroman/molecule | 4565cce0ea1f9b1e2dc3fb2aa668715ae466d534 | [
"MIT"
] | null | null | null | # Copyright (c) 2015-2018 Cisco Systems, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge... | 35.780303 | 186 | 0.735973 |
1c2c1d7890efc23e0bdea96dce3259aa992eba31 | 99,719 | py | Python | ai4water/preprocessing/datahandler.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 12 | 2020-10-13T08:23:17.000Z | 2021-01-22T04:36:21.000Z | ai4water/preprocessing/datahandler.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 1 | 2020-10-15T02:42:52.000Z | 2020-10-15T02:51:07.000Z | ai4water/preprocessing/datahandler.py | csiro-hydroinformatics/AI4Water | cdb18bd4bf298f77b381f1829045a1e790146985 | [
"MIT"
] | 2 | 2020-11-23T04:45:38.000Z | 2020-11-26T10:12:34.000Z | import os
import copy
import json
import warnings
from typing import Union, Tuple
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from matplotlib.patches import Patch
from sklearn.model_selection import train_test_split
from sklearn.model_selection import KFold, LeaveOneOut, TimeSeriesSplit
from... | 38.74087 | 153 | 0.556444 |
1c2c2446168078597ab5cdb68e8d9c24293893b6 | 881 | py | Python | atom/nucleus/python/test/test_card_details_vo.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_card_details_vo.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/test/test_card_details_vo.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Nucleus API
The Hydrogen Nucleus API # noqa: E501
OpenAPI spec version: 1.9.5
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import nucleus_api
from nu... | 21.487805 | 82 | 0.701476 |
1c2c4d37d63ffae4463d667f463fb1de61cc518f | 2,692 | py | Python | tests/models/validators/v2_1_2/jsd_6db9292d4f28a26b.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/models/validators/v2_1_2/jsd_6db9292d4f28a26b.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | tests/models/validators/v2_1_2/jsd_6db9292d4f28a26b.py | nonstdout/dnacentersdk | dbbbc4baa5300aa9e5c9193f2ea71438018095f5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""DNA Center Add Fabric data model.
Copyright (c) 2019-2020 Cisco and/or its affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including wi... | 32.047619 | 78 | 0.591382 |
1c2c86dbcc5a343b86f1588a38a45c5d4e0e5f59 | 4,341 | py | Python | amatino/entry.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 2 | 2018-07-20T20:00:33.000Z | 2020-10-08T15:49:06.000Z | amatino/entry.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 1 | 2020-05-21T02:49:29.000Z | 2020-05-21T02:49:29.000Z | amatino/entry.py | Amatino-Code/amatino-python | 6c5f66b2e61bede5bf9d3e6eee8130a16f511a5f | [
"MIT"
] | 3 | 2018-09-03T09:31:31.000Z | 2020-05-21T05:30:00.000Z | """
Amatino API Python Bindings
Entry Module
Author: hugh@amatino.io
"""
from amatino.side import Side
from amatino.account import Account
from amatino.internal.constrained_string import ConstrainedString
from amatino.internal.encodable import Encodable
from amatino.internal.immutable import Immutable
from decimal impo... | 30.356643 | 79 | 0.615066 |
1c2ca5caff5ef0a6f27869b1cd2cf147940affc7 | 3,960 | py | Python | alipay/aop/api/request/AlipayCommerceYuntaskResumeRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipayCommerceYuntaskResumeRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipayCommerceYuntaskResumeRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayCommerceYuntaskResumeModel import AlipayCommerceYuntaskResumeModel
class AlipayCommerceYuntaskResumeRequest(object):
def ... | 27.310345 | 148 | 0.643939 |
1c2ca72ba0a51bfb6047dce162693e6840c202cc | 1,589 | py | Python | stonesoup/simulator/platform.py | SohSalari/Stone-Soup | e073d4145df18facad43e4ab7b0a34e8d65f67ee | [
"MIT"
] | 1 | 2020-07-21T15:20:20.000Z | 2020-07-21T15:20:20.000Z | stonesoup/simulator/platform.py | mgomesborges/Stone-Soup | 39c7f02ce11e10c9b3c612ad359f6d8bca495266 | [
"MIT"
] | null | null | null | stonesoup/simulator/platform.py | mgomesborges/Stone-Soup | 39c7f02ce11e10c9b3c612ad359f6d8bca495266 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from ..base import Property
from ..reader import GroundTruthReader
from .base import DetectionSimulator
from ..buffered_generator import BufferedGenerator
from ..platform import Platform
class PlatformDetectionSimulator(DetectionSimulator):
"""A simple platform detection simulator.
P... | 37.833333 | 79 | 0.582127 |
1c2ce3fd309b26cb12ed1f9e97e75f11dd12f949 | 5,089 | py | Python | neuro-cli/tests/unit/test_click_utils.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 11 | 2020-10-11T15:38:11.000Z | 2021-11-09T11:29:50.000Z | neuro-cli/tests/unit/test_click_utils.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 611 | 2020-09-30T21:27:52.000Z | 2022-01-10T10:44:44.000Z | neuro-cli/tests/unit/test_click_utils.py | neuro-inc/platform-client-python | 012e355249ea900b76f9ce4209fb9d029652f9b2 | [
"Apache-2.0"
] | 1 | 2020-10-05T15:10:24.000Z | 2020-10-05T15:10:24.000Z | from textwrap import dedent
from click.testing import CliRunner
from neuro_cli.main import MainGroup
from neuro_cli.root import Root
from neuro_cli.utils import DeprecatedGroup, command, group
def test_print() -> None:
@group()
def sub_command() -> None:
pass
@command()
async def plain_cmd(... | 20.771429 | 86 | 0.565927 |
1c2ce6145b672cdd2bcd88e082ca1018c3e4ea4d | 4,659 | py | Python | src/FunctionApps/python/IntakePipeline/fhir.py | CDCgov/prime-public-health-data-infrastructure | 7e4849c3a486a84e94765bf0023b80261c510c57 | [
"Apache-2.0"
] | 3 | 2022-02-24T18:16:39.000Z | 2022-03-29T20:21:41.000Z | src/FunctionApps/python/IntakePipeline/fhir.py | CDCgov/prime-public-health-data-infrastructure | 7e4849c3a486a84e94765bf0023b80261c510c57 | [
"Apache-2.0"
] | 17 | 2022-02-08T17:13:55.000Z | 2022-03-28T16:49:00.000Z | src/FunctionApps/python/IntakePipeline/fhir.py | CDCgov/prime-public-health-data-infrastructure | 7e4849c3a486a84e94765bf0023b80261c510c57 | [
"Apache-2.0"
] | 3 | 2022-02-27T23:12:50.000Z | 2022-03-17T04:51:47.000Z | from datetime import datetime, timezone
import json
import logging
import pathlib
import requests
from requests.adapters import HTTPAdapter
from urllib3 import Retry
from azure.core.credentials import AccessToken
from azure.identity import DefaultAzureCredential
from azure.storage.blob import ContainerClient
def get... | 36.398438 | 93 | 0.68255 |
1c2d0f4e0c15a4c07fa29575d460cd7acb1f0253 | 10,709 | py | Python | rllite/common/gym_utils.py | ZJU-RL/zjurl | 6aab83aaba7249bc43d112f21787c45b111d8aa4 | [
"MIT"
] | 3 | 2019-03-07T13:24:21.000Z | 2019-08-08T12:49:51.000Z | rllite/common/gym_utils.py | tyGavinZJU/rllite | 5c85eb11babb69a09604a04f0eb7bdc5a96f08f0 | [
"MIT"
] | null | null | null | rllite/common/gym_utils.py | tyGavinZJU/rllite | 5c85eb11babb69a09604a04f0eb7bdc5a96f08f0 | [
"MIT"
] | null | null | null | import gym
import numpy as np
import torch
from collections import deque
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
class NormalizedActions(gym.ActionWrapper):
def action(self, action):
low = self.action_space.low
high = self.action_space.high
action... | 33.361371 | 117 | 0.609954 |
1c2d4f926783201230f56490a274139aceff1fa9 | 5,294 | py | Python | azure/multiapi/storage/v2016_05_31/blob/_download_chunking.py | xolve/azure-multiapi-storage-python | 47509479427c879f18c554e451e838453d47c2bd | [
"MIT"
] | 3 | 2019-02-21T20:46:26.000Z | 2021-06-22T15:35:52.000Z | azure/storage/blob/_download_chunking.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 11 | 2017-10-05T18:20:40.000Z | 2020-10-10T09:20:19.000Z | azure/storage/blob/_download_chunking.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 15 | 2017-10-02T18:48:20.000Z | 2022-03-03T14:03:49.000Z | #-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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.apa... | 38.362319 | 91 | 0.646959 |
1c2d5c434953c3acf443a11ab1783bd53f70c57f | 8,240 | py | Python | src/api/bkuser_core/tests/profiles/test_utils.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/tests/profiles/test_utils.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | src/api/bkuser_core/tests/profiles/test_utils.py | Canway-shiisa/bk-user | a049e80d12082960828015742cea4b041f4af796 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-用户管理(Bk-User) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with the Lic... | 34.767932 | 115 | 0.589563 |
1c2d8143e4ac5173be0ac5a9ed07de0c0e298b80 | 1,700 | py | Python | experiments/sampleE/complete_inference.py | neptunes5thmoon/simpleference | 96c74187bd3d83f6f1e910e72e56f45d6cc8d5d9 | [
"MIT"
] | 2 | 2019-10-13T12:10:00.000Z | 2021-10-09T11:49:43.000Z | experiments/sampleE/complete_inference.py | neptunes5thmoon/simpleference | 96c74187bd3d83f6f1e910e72e56f45d6cc8d5d9 | [
"MIT"
] | null | null | null | experiments/sampleE/complete_inference.py | neptunes5thmoon/simpleference | 96c74187bd3d83f6f1e910e72e56f45d6cc8d5d9 | [
"MIT"
] | 1 | 2018-05-08T14:10:59.000Z | 2018-05-08T14:10:59.000Z | from __future__ import print_function
import sys
import os
from concurrent.futures import ProcessPoolExecutor
from subprocess import call
from simpleference.inference.util import get_offset_lists
sys.path.append('/groups/saalfeld/home/papec/Work/my_projects/z5/bld/python')
import z5py
def single_inference(gpu, itera... | 32.075472 | 98 | 0.663529 |
1c2d8d5796b88137cbd413287b8438e672ac6586 | 3,444 | py | Python | tests/test_dipdup/test_dipdup.py | spruceid/dipdup-py | adc904196cfd66563938feec0f0afcc5f3df03e3 | [
"MIT"
] | null | null | null | tests/test_dipdup/test_dipdup.py | spruceid/dipdup-py | adc904196cfd66563938feec0f0afcc5f3df03e3 | [
"MIT"
] | null | null | null | tests/test_dipdup/test_dipdup.py | spruceid/dipdup-py | adc904196cfd66563938feec0f0afcc5f3df03e3 | [
"MIT"
] | null | null | null | from contextlib import AsyncExitStack
from datetime import datetime
from os.path import dirname, join
from unittest import IsolatedAsyncioTestCase
from pytz import UTC
from dipdup.config import DipDupConfig
from dipdup.context import pending_indexes
from dipdup.dipdup import IndexDispatcher
from dipdup.enums import I... | 34.787879 | 90 | 0.64547 |
1c2d94414b183f0621b1473a1c8116496d480455 | 3,500 | py | Python | .leetcode/11.container-with-most-water.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/11.container-with-most-water.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | .leetcode/11.container-with-most-water.py | KuiyuanFu/PythonLeetCode | 8962df2fa838eb7ae48fa59de272ba55a89756d8 | [
"MIT"
] | null | null | null | # @lc app=leetcode id=11 lang=python3
#
# [11] Container With Most Water
#
# https://leetcode.com/problems/container-with-most-water/description/
#
# algorithms
# Medium (52.91%)
# Likes: 9053
# Dislikes: 697
# Total Accepted: 914.4K
# Total Submissions: 1.7M
# Testcase Example: '[1,8,6,2,5,4,8,3,7]'
#
# Given n... | 21.604938 | 123 | 0.545429 |
1c2d9ab8b133938e8e0dd83bf95decfa58103b9c | 1,473 | py | Python | mockdown/__init__.py | anandology/mockdown | e37b27c841c8076aad7534fb5e5c480e63645fcf | [
"BSD-3-Clause"
] | 4 | 2015-09-15T21:27:27.000Z | 2021-08-17T09:46:14.000Z | mockdown/__init__.py | anandology/mockdown | e37b27c841c8076aad7534fb5e5c480e63645fcf | [
"BSD-3-Clause"
] | 3 | 2015-09-21T06:38:58.000Z | 2015-09-23T10:25:14.000Z | mockdown/__init__.py | anandology/mockdown | e37b27c841c8076aad7534fb5e5c480e63645fcf | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Mockdown
~~~~~~~~
Tool to simplify creating HTML mockups.
"""
from flask import Blueprint, render_template, abort, redirect, url_for
import yaml
import pathlib
from .mockdown import Mockdown
mockdown_app = Blueprint("mockdown", __name__,
template_folder="t... | 28.326923 | 100 | 0.648337 |
1c2dc38c10e4fa3324ca5f1d9f5ae10cfed1dc0b | 33,710 | py | Python | cartridge/shop/models.py | AlexHill/cartridge | cb8599d43600442a223a484dc75726bfbbec68a0 | [
"BSD-2-Clause"
] | null | null | null | cartridge/shop/models.py | AlexHill/cartridge | cb8599d43600442a223a484dc75726bfbbec68a0 | [
"BSD-2-Clause"
] | null | null | null | cartridge/shop/models.py | AlexHill/cartridge | cb8599d43600442a223a484dc75726bfbbec68a0 | [
"BSD-2-Clause"
] | null | null | null |
from __future__ import division, unicode_literals
from future.builtins import str, super
from future.utils import with_metaclass
from decimal import Decimal
from functools import reduce
from operator import iand, ior
from django.core.urlresolvers import reverse
from django.db import models, connection
from django.db... | 39.061414 | 79 | 0.625037 |
1c2e16a41b14402840f19096fafcac8f8c1402b8 | 6,926 | py | Python | src/sardana/sardanabase.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | src/sardana/sardanabase.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | src/sardana/sardanabase.py | schooft/sardana | 76287b416650f40da79871ee3849340d0ff31f1d | [
"CC-BY-3.0"
] | null | null | null | #!/usr/bin/env python
##############################################################################
##
# This file is part of Sardana
##
# http://www.sardana-controls.org/
##
# Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
# Sardana is free software: you can redistribute it and/or modify
# it under th... | 32.669811 | 85 | 0.618539 |
1c2e3231607b33d5619c4351426be2731fa7fda7 | 1,272 | py | Python | setup.py | aiven/aiven-db-migrate | e3751aadfc8ad9a011d64ba5dec96118e52c68b2 | [
"Apache-2.0"
] | 10 | 2020-08-03T17:45:18.000Z | 2022-02-18T00:12:17.000Z | setup.py | aiven/aiven-db-migrate | e3751aadfc8ad9a011d64ba5dec96118e52c68b2 | [
"Apache-2.0"
] | 12 | 2020-08-27T15:15:54.000Z | 2022-02-24T16:11:18.000Z | setup.py | aiven/aiven-db-migrate | e3751aadfc8ad9a011d64ba5dec96118e52c68b2 | [
"Apache-2.0"
] | 1 | 2022-01-07T12:00:17.000Z | 2022-01-07T12:00:17.000Z | # Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
from importlib.machinery import SourceFileLoader
from setuptools import find_packages, setup
import sys
def get_version():
return SourceFileLoader("version", "aiven_db_migrate/migrate/version.py").load_module().__version__
setup(
author="Aiv... | 29.581395 | 103 | 0.636006 |
1c2e3e29450951f7817fa320c3125f8a88f35010 | 733 | py | Python | codes/MIGraph/Encoders/CompoundEncoder.py | KentaroKutsukake/Integrating-multiple-materials-science-projects | a6f09583718fc00431a3ce67d5fc6f026646f91c | [
"MIT"
] | 5 | 2020-07-31T01:35:49.000Z | 2021-07-30T13:05:48.000Z | codes/MIGraph/Encoders/CompoundEncoder.py | KentaroKutsukake/Integrating-multiple-materials-science-projects | a6f09583718fc00431a3ce67d5fc6f026646f91c | [
"MIT"
] | null | null | null | codes/MIGraph/Encoders/CompoundEncoder.py | KentaroKutsukake/Integrating-multiple-materials-science-projects | a6f09583718fc00431a3ce67d5fc6f026646f91c | [
"MIT"
] | 2 | 2020-10-21T19:17:06.000Z | 2021-05-17T10:38:41.000Z |
"""
Compound encoder
this class returns vector information of a target smiles
"""
import numpy as np
from Config import Config
CF=Config()
categoryEmbed=CF.categoryEmbed
#compound encoder class
class CompEncoder:
def __init__(self,CompDat,num):
"""
CompDat: CompDatabase class
num: =CF.I... | 20.942857 | 56 | 0.608458 |
1c2e40e328bf407c26f76e9787a116626dbf5a00 | 932 | py | Python | docs/build/html/xas/xas_ft-5.py | marcoalsina/araucaria | 78039106ae27d3fdef9265503c33f33992199d8e | [
"BSD-2-Clause"
] | 8 | 2021-07-11T22:54:21.000Z | 2022-02-16T20:22:25.000Z | docs/build/html/xas/xas_ft-5.py | marcoalsina/araucaria | 78039106ae27d3fdef9265503c33f33992199d8e | [
"BSD-2-Clause"
] | null | null | null | docs/build/html/xas/xas_ft-5.py | marcoalsina/araucaria | 78039106ae27d3fdef9265503c33f33992199d8e | [
"BSD-2-Clause"
] | null | null | null | from numpy import arange, sin, pi
from scipy.fftpack import fftfreq
from araucaria.xas import ftwindow, xftf_kwin, xftr_kwin
nfft = 2048 # number of points for FFT
ks = 0.05 # delta k (angstrom^-1)
f1 = 0.5 # freq1 (angstrom)
k = arange(0, 10, ks)
wink = ftwindow(k, x_range=(0,10), dx1=0.5, win='sine')
chi ... | 33.285714 | 63 | 0.680258 |
1c2e425b2fdcf310e1a53834ab48adeaac7c57cc | 388 | py | Python | datamodel_code_generator/model/pydantic/dataclass.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 891 | 2019-07-23T04:23:32.000Z | 2022-03-31T13:36:33.000Z | datamodel_code_generator/model/pydantic/dataclass.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 663 | 2019-07-23T09:50:26.000Z | 2022-03-29T01:56:55.000Z | datamodel_code_generator/model/pydantic/dataclass.py | adaamz/datamodel-code-generator | 3b34573f35f8d420e4668a85047c757fd1da7754 | [
"MIT"
] | 108 | 2019-07-23T08:50:37.000Z | 2022-03-09T10:50:22.000Z | from typing import ClassVar, Tuple
from datamodel_code_generator.imports import Import
from datamodel_code_generator.model import DataModel
from datamodel_code_generator.model.pydantic.imports import IMPORT_DATACLASS
class DataClass(DataModel):
TEMPLATE_FILE_PATH: ClassVar[str] = 'pydantic/dataclass.jinja2'
... | 35.272727 | 76 | 0.822165 |
1c2e603f21f291adba5b57dfc58e8f9764fba114 | 11,169 | py | Python | Sklearn_scipy_numpy/source/sklearn/feature_extraction/tests/test_image.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | 1 | 2019-06-27T12:09:44.000Z | 2019-06-27T12:09:44.000Z | Sklearn_scipy_numpy/source/sklearn/feature_extraction/tests/test_image.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | Sklearn_scipy_numpy/source/sklearn/feature_extraction/tests/test_image.py | Con-Mi/lambda-packs | b23a8464abdd88050b83310e1d0e99c54dac28ab | [
"MIT"
] | null | null | null | # Authors: Emmanuelle Gouillart <emmanuelle.gouillart@normalesup.org>
# Gael Varoquaux <gael.varoquaux@normalesup.org>
# License: BSD 3 clause
import numpy as np
import scipy as sp
from scipy import ndimage
from scipy import misc
from nose.tools import assert_equal, assert_true
from numpy.testing import asse... | 35.683706 | 79 | 0.64491 |
1c2e6a7ca5d9a4aed44dd6bb4ca4cb9a9faf31d0 | 204 | py | Python | Source_Code/Python/testing6.py | fenglwh/instruments | 7886158d1ed97fe6bfe372a55f4fca107e834311 | [
"MIT"
] | null | null | null | Source_Code/Python/testing6.py | fenglwh/instruments | 7886158d1ed97fe6bfe372a55f4fca107e834311 | [
"MIT"
] | 3 | 2018-09-21T00:57:21.000Z | 2018-09-21T01:49:40.000Z | Source_Code/Python/testing6.py | fenglwh/instruments | 7886158d1ed97fe6bfe372a55f4fca107e834311 | [
"MIT"
] | null | null | null | import visa
rs=visa.ResourceManager()
instrument=rs.open_resource("GPIB::20::INSTR")
print('init ok')
instrument.write('CONF:WLAN:SIGN1:CONN:CCODe:CCC?')
print(instrument.read())
instrument.write('*GTL') | 25.5 | 51 | 0.759804 |
1c2e99db2cbdc57411192ee318f4c65aebf235e1 | 6,367 | py | Python | Projects/Automatic Sentiment Analysis/sentiment_analysis/main.py | livanshu/Data_Science_Portfolio | 18a912bab7383f55dece5ffcbfb2cff546ffe55e | [
"MIT"
] | null | null | null | Projects/Automatic Sentiment Analysis/sentiment_analysis/main.py | livanshu/Data_Science_Portfolio | 18a912bab7383f55dece5ffcbfb2cff546ffe55e | [
"MIT"
] | null | null | null | Projects/Automatic Sentiment Analysis/sentiment_analysis/main.py | livanshu/Data_Science_Portfolio | 18a912bab7383f55dece5ffcbfb2cff546ffe55e | [
"MIT"
] | null | null | null | import project1 as p1
import utils
import numpy as np
#-------------------------------------------------------------------------------
# Data loading. There is no need to edit code in this section.
#-------------------------------------------------------------------------------
train_data = utils.load_data('r... | 49.356589 | 115 | 0.621957 |
1c2e9b907048749d4a615844f89a74dedb32a1ae | 2,412 | py | Python | autoimpute/analysis/metrics.py | gjdv/autoimpute | aa418102d3b64fc7e0c0dafa6839746f0b9a6545 | [
"MIT"
] | 191 | 2019-03-16T17:00:33.000Z | 2022-03-11T12:14:17.000Z | autoimpute/analysis/metrics.py | MlataIbrahim/autoimpute | d22cd86db6facd4a68746c8c0fcb3fae70071dac | [
"MIT"
] | 57 | 2019-03-09T23:59:38.000Z | 2022-03-01T08:17:33.000Z | autoimpute/analysis/metrics.py | MlataIbrahim/autoimpute | d22cd86db6facd4a68746c8c0fcb3fae70071dac | [
"MIT"
] | 19 | 2019-04-13T19:01:23.000Z | 2021-05-14T08:59:27.000Z | """This module devises metrics to compare estimates from analysis models."""
import numpy as np
import pandas as pd
def raw_bias(Q_bar, Q):
"""Calculate raw bias between coefficients Q and actual Q.
Q_bar can be one estimate (scalar) or a vector of estimates. This equation
subtracts the expected Q_bar fr... | 30.531646 | 78 | 0.65796 |
1c2ea307dfc71029b6d922a7886d6cfe21a1e7e4 | 5,215 | py | Python | tests/common/test_run/ascend/matmul_addn_transdata_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 286 | 2020-06-23T06:40:44.000Z | 2022-03-30T01:27:49.000Z | tests/common/test_run/ascend/matmul_addn_transdata_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 10 | 2020-07-31T03:26:59.000Z | 2021-12-27T15:00:54.000Z | tests/common/test_run/ascend/matmul_addn_transdata_run.py | tianjiashuo/akg | a9cbf642063fb1086a93e8bc6be6feb145689817 | [
"Apache-2.0"
] | 30 | 2020-07-17T01:04:14.000Z | 2021-12-27T14:05:19.000Z | # Copyright 2021 Huawei Technologies Co., Ltd
#
# 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... | 48.287037 | 185 | 0.671333 |
1c2ea56f126d1754020d9b2394105da6f3ce0700 | 7,580 | py | Python | sleepy/http.py | HitSyr/Sleepy | 70ec9479fb947a624e3c658ea39c886c30bf794d | [
"MIT"
] | 4 | 2021-12-08T21:38:14.000Z | 2022-01-30T04:16:38.000Z | sleepy/http.py | HitSyr/Sleepy | 70ec9479fb947a624e3c658ea39c886c30bf794d | [
"MIT"
] | 2 | 2021-09-29T13:33:26.000Z | 2021-12-12T12:52:16.000Z | sleepy/http.py | HitSyr/Sleepy | 70ec9479fb947a624e3c658ea39c886c30bf794d | [
"MIT"
] | null | null | null | """
Copyright (c) 2018-present HitchedSyringe
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at https://mozilla.org/MPL/2.0/.
"""
from __future__ import annotations
__all__ = (
"HTTPRequester",
... | 29.84252 | 94 | 0.596042 |
1c2eaf20ba4549dae9aed8b51f3a802ab0cf1569 | 2,506 | py | Python | bigml/tests/inspect_model_steps.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | 1 | 2021-08-30T20:18:38.000Z | 2021-08-30T20:18:38.000Z | bigml/tests/inspect_model_steps.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | null | null | null | bigml/tests/inspect_model_steps.py | deven96/python | 46be8622fe58f004bdbd636a08a8904ef4134bcd | [
"Apache-2.0"
] | 1 | 2021-08-30T20:18:40.000Z | 2021-08-30T20:18:40.000Z | # -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2012, 2015-2019 BigML
#
# 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... | 32.545455 | 75 | 0.735834 |
1c2eb7eb9834caf7eb2dfffa95fda486d9a9f4e3 | 35,676 | py | Python | pyrex/generation.py | abigailbishop/pyrex | 10ba2e9f4c8820f4fcf5f00bd866927dacb0b2b5 | [
"MIT"
] | 6 | 2018-06-19T16:01:35.000Z | 2020-05-21T20:02:53.000Z | pyrex/generation.py | bhokansonfasig/pyrex | 8b2abc954f2cf4945424042f33847b783c72dcfa | [
"MIT"
] | 4 | 2018-01-19T14:52:33.000Z | 2021-09-02T17:20:07.000Z | pyrex/generation.py | abigailbishop/pyrex | 10ba2e9f4c8820f4fcf5f00bd866927dacb0b2b5 | [
"MIT"
] | 5 | 2018-01-19T14:49:16.000Z | 2021-01-21T12:34:59.000Z | """
Module for particle (neutrino) generators.
Generators are responsible for the input of events into the simulation.
"""
from collections.abc import Iterable
from enum import Enum
import logging
import numpy as np
from pyrex.internal_functions import get_from_enum
from pyrex.earth_model import earth
from pyrex.par... | 35.927492 | 79 | 0.59746 |
1c2eb97d2acd29ed9d533618df715e94812ce8e5 | 27,136 | py | Python | macOS/Xcode/Maestral/Maestral/app_packages/survey/tools.py | productinfo/maestral-cocoa | d1626c68ace1939bd53cda53c53cbb43c9fb7a8e | [
"MIT"
] | 8 | 2020-11-13T08:48:01.000Z | 2021-12-16T06:30:27.000Z | macOS/Xcode/Maestral/Maestral/app_packages/survey/tools.py | productinfo/maestral-cocoa | d1626c68ace1939bd53cda53c53cbb43c9fb7a8e | [
"MIT"
] | 4 | 2022-01-05T09:16:30.000Z | 2022-03-29T09:32:44.000Z | macOS/Xcode/Maestral/Maestral/app_packages/survey/tools.py | productinfo/maestral-cocoa | d1626c68ace1939bd53cda53c53cbb43c9fb7a8e | [
"MIT"
] | 1 | 2022-01-05T08:56:59.000Z | 2022-01-05T08:56:59.000Z | import enum
import types
import wrapio
import os
import string
import itertools
from . import helpers
__all__ = ('Source', 'Translator', 'LineEditor', 'MultiLineEditor', 'Select',
'MultiSelect')
_blocks = string.whitespace + string.punctuation
class Source(helpers.Handle):
"""
Turns stdin rea... | 20.026568 | 79 | 0.532098 |
1c2efdf299dfd0aeabb652193373d0ccc20decac | 773 | py | Python | django_comments_xtd/urls.py | lyoniionly/django-comments-xtd | bc62a7359b9b460185e0fe4a7a1958bc9ef5599c | [
"BSD-2-Clause"
] | null | null | null | django_comments_xtd/urls.py | lyoniionly/django-comments-xtd | bc62a7359b9b460185e0fe4a7a1958bc9ef5599c | [
"BSD-2-Clause"
] | null | null | null | django_comments_xtd/urls.py | lyoniionly/django-comments-xtd | bc62a7359b9b460185e0fe4a7a1958bc9ef5599c | [
"BSD-2-Clause"
] | null | null | null | #-*- coding: utf-8 -*-
from django import VERSION as DJANGO_VERSION
if DJANGO_VERSION[0:2] < (1, 4):
from django.conf.urls.defaults import include, patterns, url
else:
from django.conf.urls import include, patterns, url
from django.views import generic
from django_comments_xtd import views, models
from djang... | 30.92 | 83 | 0.668823 |
1c2f1f0ab3c906ecf4a0f01346cdecbec21f72d9 | 11,698 | py | Python | fury/shaders/tests/test_base.py | sreekarchigurupati/fury | 07ed10123954d3ce3197c45f8ee54a7d4909656d | [
"BSD-3-Clause"
] | null | null | null | fury/shaders/tests/test_base.py | sreekarchigurupati/fury | 07ed10123954d3ce3197c45f8ee54a7d4909656d | [
"BSD-3-Clause"
] | null | null | null | fury/shaders/tests/test_base.py | sreekarchigurupati/fury | 07ed10123954d3ce3197c45f8ee54a7d4909656d | [
"BSD-3-Clause"
] | null | null | null | import os
import pytest
import numpy as np
import numpy.testing as npt
from fury import actor, window
from fury.shaders import (add_shader_callback, attribute_to_actor,
compose_shader, import_fury_shader, load_shader,
load, shader_to_actor, replace_shader_in_actor)
... | 28.812808 | 79 | 0.614977 |
1c2f33edbb6f8768974ca054915c523175e95c05 | 2,563 | py | Python | quart/utils.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | 1 | 2020-08-09T19:45:14.000Z | 2020-08-09T19:45:14.000Z | quart/utils.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | null | null | null | quart/utils.py | SmartManoj/quart | 317562ea660edb7159efc20fa57b95223d408ea0 | [
"MIT"
] | null | null | null | import asyncio
from datetime import datetime, timedelta, timezone
from http.cookies import SimpleCookie
from os import PathLike
from pathlib import Path
from typing import Callable, List, Optional, TYPE_CHECKING, Union
from wsgiref.handlers import format_date_time
from .globals import current_app
from .typing import F... | 32.0375 | 99 | 0.671479 |
1c2f8e3cd64718a8fb3b5a388f58e845a5c21132 | 1,057 | py | Python | tests/python/pants_test/java/jar/test_manifest.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/java/jar/test_manifest.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/java/jar/test_manifest.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import unittest
from pants.java.jar.manifest import Manifest
class TestManifest(unitte... | 28.567568 | 82 | 0.729423 |
1c2fe86730e711e6fb182397ce9e735878b5b04b | 1,670 | py | Python | alipay/aop/api/domain/CloudbusCommonResult.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/CloudbusCommonResult.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/CloudbusCommonResult.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class CloudbusCommonResult(object):
def __init__(self):
self._code = None
self._data = None
self._message = None
@property
def code(self):
return self._code
... | 23.521127 | 65 | 0.534132 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.