hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
796fe41e496b869928b94372688d7417d94aaadc | 5,667 | bzl | Python | bazel/curl.bzl | ZonicMe/prometheus-cpp | 342de5e93bd0cbafde77ec801f9dd35a03bceb3f | [
"MIT"
] | 628 | 2016-10-13T12:03:31.000Z | 2022-03-28T17:06:44.000Z | bazel/curl.bzl | ZonicMe/prometheus-cpp | 342de5e93bd0cbafde77ec801f9dd35a03bceb3f | [
"MIT"
] | 347 | 2016-10-13T22:41:44.000Z | 2022-03-31T02:36:02.000Z | bazel/curl.bzl | ZonicMe/prometheus-cpp | 342de5e93bd0cbafde77ec801f9dd35a03bceb3f | [
"MIT"
] | 270 | 2017-01-10T20:50:46.000Z | 2022-03-29T12:21:48.000Z | # Copyright 2018, OpenCensus 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 w... | 28.054455 | 103 | 0.648668 |
796fe5147180ec7d7c72b50a9402a26a7c26c36a | 5,555 | py | Python | Paths/New Tab with Short Segments.py | tiennguyen0910/Glyphs-Scripts | fca80d684fd152dda40093c5c43586545e6518e9 | [
"Apache-2.0"
] | null | null | null | Paths/New Tab with Short Segments.py | tiennguyen0910/Glyphs-Scripts | fca80d684fd152dda40093c5c43586545e6518e9 | [
"Apache-2.0"
] | null | null | null | Paths/New Tab with Short Segments.py | tiennguyen0910/Glyphs-Scripts | fca80d684fd152dda40093c5c43586545e6518e9 | [
"Apache-2.0"
] | null | null | null | #MenuTitle: New Tab with Short Segments
# -*- coding: utf-8 -*-
__doc__="""
Goes through all glyphs in the present font(s), and reports segments shorter than a user-specified distance to the Macro Window, and opens a new tab with affected glyphs. Useful for finding alignment errors in exported OTFs.
"""
import vanilla... | 42.40458 | 224 | 0.709451 |
796fe536634598ffea498464dcf34758b4b40a15 | 8,477 | py | Python | frappe/tests/test_email.py | spa49/frappe | f0e6b01cc6d02f7e100d223309f2bc3167398087 | [
"MIT"
] | 1 | 2016-10-28T10:36:56.000Z | 2016-10-28T10:36:56.000Z | frappe/tests/test_email.py | spa49/frappe | f0e6b01cc6d02f7e100d223309f2bc3167398087 | [
"MIT"
] | 89 | 2017-09-19T15:17:44.000Z | 2022-03-31T00:52:42.000Z | frappe/tests/test_email.py | spa49/frappe | f0e6b01cc6d02f7e100d223309f2bc3167398087 | [
"MIT"
] | 1 | 2018-02-08T01:14:48.000Z | 2018-02-08T01:14:48.000Z | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import unittest, frappe, re, email
from frappe.test_runner import make_test_records
make_test_records("User")
make_test_records("Email Account")
class TestEmail(unittest.TestCa... | 47.623596 | 142 | 0.738705 |
796fe592007f481fa71fc4ce3b17d81314b569a5 | 60,281 | py | Python | awswrangler/redshift.py | timotk/aws-data-wrangler | 303bf89cd71b9a114bf4e9daa5f07812285d9605 | [
"Apache-2.0"
] | null | null | null | awswrangler/redshift.py | timotk/aws-data-wrangler | 303bf89cd71b9a114bf4e9daa5f07812285d9605 | [
"Apache-2.0"
] | 35 | 2021-11-08T09:30:38.000Z | 2022-03-28T08:26:28.000Z | awswrangler/redshift.py | timotk/aws-data-wrangler | 303bf89cd71b9a114bf4e9daa5f07812285d9605 | [
"Apache-2.0"
] | 1 | 2022-02-06T02:04:32.000Z | 2022-02-06T02:04:32.000Z | """Amazon Redshift Module."""
# pylint: disable=too-many-lines
import logging
import uuid
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union
import boto3
import botocore
import pandas as pd
import pyarrow as pa
import redshift_connector
from awswrangler import _data_types
from awswrangler import _d... | 39.450916 | 120 | 0.651847 |
796fe5beac9b0e70c67eb60bfc518b1589733ba8 | 961 | py | Python | tests/gamestonk_terminal/stocks/discovery/test_ark_model.py | Aerex/GamestonkTerminal | 680e0cd278f0d8e45031cdc9d51f247e9aa90ce1 | [
"MIT"
] | 1,835 | 2021-05-09T02:55:06.000Z | 2022-03-29T12:37:05.000Z | tests/gamestonk_terminal/stocks/discovery/test_ark_model.py | Aerex/GamestonkTerminal | 680e0cd278f0d8e45031cdc9d51f247e9aa90ce1 | [
"MIT"
] | 569 | 2021-05-09T15:59:41.000Z | 2022-03-29T12:25:16.000Z | tests/gamestonk_terminal/stocks/discovery/test_ark_model.py | Aerex/GamestonkTerminal | 680e0cd278f0d8e45031cdc9d51f247e9aa90ce1 | [
"MIT"
] | 268 | 2021-05-10T21:46:50.000Z | 2022-03-28T09:18:38.000Z | # IMPORTATION STANDARD
# IMPORTATION THIRDPARTY
import pytest
# IMPORTATION INTERNAL
from gamestonk_terminal.stocks.discovery import ark_model
@pytest.fixture(scope="module")
def vcr_config():
return {
"filter_headers": [("User-Agent", None)],
"filter_query_parameters": [
("period1",... | 24.641026 | 70 | 0.69615 |
796fe61ee46ea060dcf0f8409d7474547f2205ce | 639 | py | Python | rhea/system/stream/avalonst.py | meetps/rhea | f8a9a08fb5e14c5c4488ef68a2dff4d18222c2c0 | [
"MIT"
] | 1 | 2022-03-16T23:56:09.000Z | 2022-03-16T23:56:09.000Z | rhea/system/stream/avalonst.py | meetps/rhea | f8a9a08fb5e14c5c4488ef68a2dff4d18222c2c0 | [
"MIT"
] | null | null | null | rhea/system/stream/avalonst.py | meetps/rhea | f8a9a08fb5e14c5c4488ef68a2dff4d18222c2c0 | [
"MIT"
] | null | null | null |
from math import ceil, log
from myhdl import Signal, intbv
from . import Streamers
class AvalonStream(Streamers):
def __init__(self, width=32):
""" Interface for Avalon streaming protocol """
numwords = int(ceil(log(width//8, 2)))
self.data = Signal(intbv(0)[width:])
self.empty = ... | 26.625 | 55 | 0.604069 |
796fe6295a6577805cb6d31db241d67b370cdad3 | 17,542 | py | Python | etstool.py | enthought/envisage | ca57225c4e9022d1ed5299a60e13dc2290d7d94e | [
"BSD-3-Clause"
] | 51 | 2015-05-12T01:34:15.000Z | 2022-03-20T19:11:22.000Z | etstool.py | enthought/envisage | ca57225c4e9022d1ed5299a60e13dc2290d7d94e | [
"BSD-3-Clause"
] | 347 | 2015-02-27T19:51:09.000Z | 2022-03-21T16:03:01.000Z | etstool.py | enthought/envisage | ca57225c4e9022d1ed5299a60e13dc2290d7d94e | [
"BSD-3-Clause"
] | 11 | 2015-02-11T04:32:54.000Z | 2021-09-13T10:50:05.000Z | # (C) Copyright 2007-2021 Enthought, Inc., Austin, TX
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in LICENSE.txt and may be redistributed only under
# the conditions described in the aforementioned license. The license
# is also available online at... | 30.244828 | 159 | 0.653973 |
796fe6339b1f1d93c7cbb860bc300584e18e566b | 6,004 | py | Python | python/segment_tree.py | shub0/leetcode | 8221d10f201d001abcb15b27c9cf4b8cd5060f1f | [
"BSD-3-Clause"
] | null | null | null | python/segment_tree.py | shub0/leetcode | 8221d10f201d001abcb15b27c9cf4b8cd5060f1f | [
"BSD-3-Clause"
] | null | null | null | python/segment_tree.py | shub0/leetcode | 8221d10f201d001abcb15b27c9cf4b8cd5060f1f | [
"BSD-3-Clause"
] | null | null | null | '''
The following code implmented two use cases using segment tree
1. Range sum, which could be done by Binary Index Tree
2. Range Minimun Query(RMQ)
Time Complexity for tree construction is O(n). There are total 2n-1 nodes, and value of every node is calculated only once in tree construction.
Time complexity to query... | 38.987013 | 162 | 0.603764 |
796fe659733de7b6476bee76e0f6aa4bf2c83d55 | 2,252 | py | Python | grr/server/grr_response_server/bin/api_shell_raw_access_lib_test.py | dekoder/grr | 27ba38dc0f5ad4f3e0cdbfb146a0a789e3b0d27b | [
"Apache-2.0"
] | 3 | 2018-09-30T01:31:29.000Z | 2019-04-22T11:44:54.000Z | grr/server/grr_response_server/bin/api_shell_raw_access_lib_test.py | tomchop/grr | 27ba38dc0f5ad4f3e0cdbfb146a0a789e3b0d27b | [
"Apache-2.0"
] | 1 | 2022-03-02T09:58:05.000Z | 2022-03-02T09:58:05.000Z | grr/server/grr_response_server/bin/api_shell_raw_access_lib_test.py | tomchop/grr | 27ba38dc0f5ad4f3e0cdbfb146a0a789e3b0d27b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from __future__ import unicode_literals
import io
from grr_api_client import errors
from grr_response_core.lib import flags
from grr_response_proto.api import client_pb2
from grr_response_proto.api import vfs_pb2
from grr_response_proto.api.root import user_management_pb2
from grr_response_serv... | 32.637681 | 79 | 0.774867 |
796fe6a3e26e379d04dfddf8f368df942e60f0fd | 6,154 | py | Python | mindspore/nn/metrics/bleu_score.py | peixinhou/mindspore | fcb2ec2779b753e95c762cf292b23bd81d1f561b | [
"Apache-2.0"
] | 2 | 2021-07-08T13:10:42.000Z | 2021-11-08T02:48:57.000Z | mindspore/nn/metrics/bleu_score.py | peixinhou/mindspore | fcb2ec2779b753e95c762cf292b23bd81d1f561b | [
"Apache-2.0"
] | null | null | null | mindspore/nn/metrics/bleu_score.py | peixinhou/mindspore | fcb2ec2779b753e95c762cf292b23bd81d1f561b | [
"Apache-2.0"
] | null | null | null | # 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... | 39.703226 | 116 | 0.605622 |
796fe6d3c54dd3ac42abf1a1a94bb334e581fc70 | 18,634 | py | Python | imcsdk/mometa/storage/StorageLocalDiskProps.py | ecoen66/imcsdk | b10eaa926a5ee57cea7182ae0adc8dd1c818b0ab | [
"Apache-2.0"
] | 31 | 2016-06-14T07:23:59.000Z | 2021-09-12T17:17:26.000Z | imcsdk/mometa/storage/StorageLocalDiskProps.py | sthagen/imcsdk | 1831eaecb5960ca03a8624b1579521749762b932 | [
"Apache-2.0"
] | 109 | 2016-05-25T03:56:56.000Z | 2021-10-18T02:58:12.000Z | imcsdk/mometa/storage/StorageLocalDiskProps.py | sthagen/imcsdk | 1831eaecb5960ca03a8624b1579521749762b932 | [
"Apache-2.0"
] | 67 | 2016-05-17T05:53:56.000Z | 2022-03-24T15:52:53.000Z | """This module contains the general information for StorageLocalDiskProps ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
class StorageLocalDiskPropsConsts:
pass
class StorageLocalDiskProps(ManagedObject):
"""This is ... | 81.017391 | 229 | 0.663411 |
796fe73ccf7c73f300c27f04601fef397c410abe | 424 | py | Python | Exploratory Data Analysis on Titanic Dataset.py | SaiMahimaIyer/Data-Analytics | 2516e7f2de332808dfc9f483db2a0c0dc6f728da | [
"MIT"
] | null | null | null | Exploratory Data Analysis on Titanic Dataset.py | SaiMahimaIyer/Data-Analytics | 2516e7f2de332808dfc9f483db2a0c0dc6f728da | [
"MIT"
] | null | null | null | Exploratory Data Analysis on Titanic Dataset.py | SaiMahimaIyer/Data-Analytics | 2516e7f2de332808dfc9f483db2a0c0dc6f728da | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import numpy as np
import pandas as pd
import pandas_profiling
# In[2]:
df = pd.read_csv(
"https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv"
)
# In[3]:
df.profile_report()
# In[5]:
profile = df.profile_report(title="Tit... | 11.459459 | 86 | 0.688679 |
796fe7c748de91cdb44286ddb05ef4b5a94aecc0 | 2,171 | py | Python | docx_pagebreak/__init__.py | koya-ken/pandoc-docx-pagebreak-py | 7f0236bad37d3c362a5c635360a7bdd70e1c894f | [
"MIT"
] | null | null | null | docx_pagebreak/__init__.py | koya-ken/pandoc-docx-pagebreak-py | 7f0236bad37d3c362a5c635360a7bdd70e1c894f | [
"MIT"
] | null | null | null | docx_pagebreak/__init__.py | koya-ken/pandoc-docx-pagebreak-py | 7f0236bad37d3c362a5c635360a7bdd70e1c894f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" pandoc-docx-pagebreakpy
Pandoc filter to insert pagebreak as openxml RawBlock
Only for docx output
Trying to port pandoc-doc-pagebreak
- https://github.com/alexstoick/pandoc-docx-pagebreak
"""
import panflute as pf
class DocxPagebreak(object):
pagebreak = pf.R... | 28.565789 | 110 | 0.529249 |
796fe856803225d852706c9647535c18e4fdc2ae | 469 | py | Python | Lib/site-packages/plotly/validators/scatterpolargl/_uirevision.py | tytanya/my-first-blog | 2b40adb0816c3546e90ad6ca1e7fb50d924c1536 | [
"bzip2-1.0.6"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/scatterpolargl/_uirevision.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/scatterpolargl/_uirevision.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class UirevisionValidator(_plotly_utils.basevalidators.AnyValidator):
def __init__(
self, plotly_name='uirevision', parent_name='scatterpolargl', **kwargs
):
super(UirevisionValidator, self).__init__(
plotly_name=plotly_name,
parent_... | 29.3125 | 78 | 0.641791 |
796fe85a6b50b7ec83736cc29f634850989fcbf5 | 9,098 | py | Python | py/phl/phlgit_log.py | valhallasw/phabricator-tools | 397406485901ce3bd26e1aee122e652539f99f98 | [
"Apache-2.0"
] | null | null | null | py/phl/phlgit_log.py | valhallasw/phabricator-tools | 397406485901ce3bd26e1aee122e652539f99f98 | [
"Apache-2.0"
] | null | null | null | py/phl/phlgit_log.py | valhallasw/phabricator-tools | 397406485901ce3bd26e1aee122e652539f99f98 | [
"Apache-2.0"
] | null | null | null | """Wrapper around 'git log'."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# phlgit_log
#
# Public Functions:
# get_range_to_here_hashes
# get_last_n_commit_hashes
# get_last_commit_hash... | 35.400778 | 79 | 0.662124 |
796fe8d6d1d6a9495b02df02b4571745520539a0 | 11,601 | py | Python | mayan/apps/folders/views.py | garrans/mayan-edms | e95e90cc47447a1ae72629271652824aa9868572 | [
"Apache-2.0"
] | null | null | null | mayan/apps/folders/views.py | garrans/mayan-edms | e95e90cc47447a1ae72629271652824aa9868572 | [
"Apache-2.0"
] | null | null | null | mayan/apps/folders/views.py | garrans/mayan-edms | e95e90cc47447a1ae72629271652824aa9868572 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, unicode_literals
import logging
from django.conf import settings
from django.contrib import messages
from django.core.exceptions import PermissionDenied
from django.core.urlresolvers import reverse, reverse_lazy
from django.http import HttpResponseRedirect
from django.shortcuts... | 33.432277 | 182 | 0.623308 |
796fe9e98060a6d77a053c7a9205cb2aa18b5458 | 2,597 | py | Python | MACS2/bdgopt_cmd.py | mr-c/MACS | 8ac898614aa1da24d811f315bd0d069f1d4fcd4e | [
"BSD-3-Clause"
] | 6 | 2018-12-18T02:39:55.000Z | 2021-04-13T12:38:33.000Z | MACS2/bdgopt_cmd.py | mr-c/MACS | 8ac898614aa1da24d811f315bd0d069f1d4fcd4e | [
"BSD-3-Clause"
] | 1 | 2019-04-09T01:57:40.000Z | 2019-04-09T02:01:13.000Z | MACS2/bdgopt_cmd.py | mr-c/MACS | 8ac898614aa1da24d811f315bd0d069f1d4fcd4e | [
"BSD-3-Clause"
] | 3 | 2019-11-11T18:49:58.000Z | 2021-10-03T19:16:08.000Z | # Time-stamp: <2016-02-12 00:43:42 Tao Liu>
"""Description: Modify bedGraph file
Copyright (c) 2014 Tao Liu <tliu4@buffalo.edu>
This code is free software; you can redistribute it and/or modify it
under the terms of the BSD License (see the file COPYING included with
the distribution).
@status: experimental
@versi... | 32.4625 | 149 | 0.544859 |
796feadc7676899cd20ee98ee8a5489fedd41510 | 778 | py | Python | tests/pytests/unit/spm/test_pkgfiles.py | tomdoherty/salt | f87d5d7abbf9777773c4d91fdafecb8b1a728e76 | [
"Apache-2.0"
] | 9,425 | 2015-01-01T05:59:24.000Z | 2022-03-31T20:44:05.000Z | tests/pytests/unit/spm/test_pkgfiles.py | tomdoherty/salt | f87d5d7abbf9777773c4d91fdafecb8b1a728e76 | [
"Apache-2.0"
] | 33,507 | 2015-01-01T00:19:56.000Z | 2022-03-31T23:48:20.000Z | tests/pytests/unit/spm/test_pkgfiles.py | tomdoherty/salt | f87d5d7abbf9777773c4d91fdafecb8b1a728e76 | [
"Apache-2.0"
] | 5,810 | 2015-01-01T19:11:45.000Z | 2022-03-31T02:37:20.000Z | import pathlib
import pytest
import salt.spm.pkgfiles.local as spm
import salt.syspaths
from tests.support.mock import MagicMock
@pytest.fixture()
def configure_loader_modules():
return {spm: {"__opts__": {"spm_node_type": "master"}}}
class MockTar:
def __init__(self):
self.name = str(pathlib.Path(... | 22.882353 | 83 | 0.609254 |
796fec5eb08520ff7f90c84f57f0fe4f5682865b | 8,690 | py | Python | corradin_ovp_utils/odds_ratio.py | corradin-lab/corradin_ovp_utils | 8c7f6a0c1423f6a48db142528af7eb0a369bebfe | [
"Apache-2.0"
] | null | null | null | corradin_ovp_utils/odds_ratio.py | corradin-lab/corradin_ovp_utils | 8c7f6a0c1423f6a48db142528af7eb0a369bebfe | [
"Apache-2.0"
] | null | null | null | corradin_ovp_utils/odds_ratio.py | corradin-lab/corradin_ovp_utils | 8c7f6a0c1423f6a48db142528af7eb0a369bebfe | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED! DO NOT EDIT! File to edit: 04_odds_ratio.ipynb (unless otherwise specified).
__all__ = ['RsidComboInfo', 'get_geno_combination_df', 'CaseControlOddsRatio', 'odds_ratio_calculator',
'odds_ratio_df_single_combined', 'reconstruct_genetic_info']
# Cell
import pandas as pd
from typing import An... | 45.260417 | 204 | 0.722555 |
796feca097f1b6cb6fb7c20d0c7829e0612a1df1 | 4,424 | py | Python | sdk/python/pulumi_azure_nextgen/eventhub/v20180101preview/get_namespace_ip_filter_rule.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/eventhub/v20180101preview/get_namespace_ip_filter_rule.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/eventhub/v20180101preview/get_namespace_ip_filter_rule.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
__a... | 33.014925 | 166 | 0.632911 |
796fed385d1a59c98f66b17e0390192d519818f7 | 40 | py | Python | test/integration/targets/module_utils/other_mu_dir/a/b/c/d/e/f/g/h/__init__.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 37 | 2017-08-15T15:02:43.000Z | 2021-07-23T03:44:31.000Z | test/integration/targets/module_utils/other_mu_dir/a/b/c/d/e/f/g/h/__init__.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 12 | 2018-01-10T05:25:25.000Z | 2021-11-28T06:55:48.000Z | test/integration/targets/module_utils/other_mu_dir/a/b/c/d/e/f/g/h/__init__.py | Container-Projects/ansible-provider-docs | 100b695b0b0c4d8d08af362069557ffc735d0d7e | [
"PSF-2.0",
"BSD-2-Clause",
"MIT"
] | 49 | 2017-08-15T09:52:13.000Z | 2022-03-21T17:11:54.000Z | data = 'should not be visible abcdefgh'
| 20 | 39 | 0.75 |
796fed4b6eda1d21b3118b874ce4b24dda5e9c86 | 269 | py | Python | python_modules/libraries/dagster-celery-k8s/dagster_celery_k8s_tests/example_celery_mode_def.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 4,606 | 2018-06-21T17:45:20.000Z | 2022-03-31T23:39:42.000Z | python_modules/libraries/dagster-celery-k8s/dagster_celery_k8s_tests/example_celery_mode_def.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 6,221 | 2018-06-12T04:36:01.000Z | 2022-03-31T21:43:05.000Z | python_modules/libraries/dagster-celery-k8s/dagster_celery_k8s_tests/example_celery_mode_def.py | dbatten5/dagster | d76e50295054ffe5a72f9b292ef57febae499528 | [
"Apache-2.0"
] | 619 | 2018-08-22T22:43:09.000Z | 2022-03-31T22:48:06.000Z | from dagster import ModeDefinition, default_executors, pipeline
from dagster_celery_k8s.executor import celery_k8s_job_executor
@pipeline(mode_defs=[ModeDefinition(executor_defs=default_executors + [celery_k8s_job_executor])])
def celery_enabled_pipeline():
pass
| 33.625 | 98 | 0.851301 |
796fed4f0c69dd607247c928f5709527c853fb57 | 6,318 | py | Python | utilities/data_collection.py | ajayp10/WeatherTrends | 67664c8146be3bd54626bca735d427e384f6935d | [
"MIT"
] | null | null | null | utilities/data_collection.py | ajayp10/WeatherTrends | 67664c8146be3bd54626bca735d427e384f6935d | [
"MIT"
] | null | null | null | utilities/data_collection.py | ajayp10/WeatherTrends | 67664c8146be3bd54626bca735d427e384f6935d | [
"MIT"
] | null | null | null | from weatherbit.api import Api
from datetime import datetime, timedelta
import requests
import psycopg2
import json
import os
import pandas as pd
import re
import pycountry_convert as pc
def store_to_db(lat, lon, start_date, end_date, db_name, db_password, db_user, db_host):
"""
Queries the weatherbit using... | 35.296089 | 198 | 0.583887 |
796fed5d59551e82c664cedb3496efb99a7e4227 | 44,631 | py | Python | test/functional/test_framework/messages.py | zerohourcash/zerohourcash | 2e3be4876e1775e8532b71ecb29c502e6c02616a | [
"MIT"
] | 5 | 2021-04-26T01:15:43.000Z | 2022-02-28T19:48:24.000Z | test/functional/test_framework/messages.py | zerohourcash/zerohourcash | 2e3be4876e1775e8532b71ecb29c502e6c02616a | [
"MIT"
] | null | null | null | test/functional/test_framework/messages.py | zerohourcash/zerohourcash | 2e3be4876e1775e8532b71ecb29c502e6c02616a | [
"MIT"
] | 3 | 2021-04-26T00:57:46.000Z | 2022-01-13T07:37:51.000Z | #!/usr/bin/env python3
# Copyright (c) 2010 ArtForz -- public domain half-a-node
# Copyright (c) 2012 Jeff Garzik
# Copyright (c) 2010-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Bitcoin test... | 29.3625 | 262 | 0.600659 |
796fedd9adc4e2939cb94325c4f5c7779990c235 | 488 | py | Python | Chapter_15_Generating_Data/try_15.1/five_cubic.py | charliealpha094/Project_Data_Visualization | ccd55db58927dbbcfd57ab750fe7b21754c2b2dc | [
"MIT"
] | null | null | null | Chapter_15_Generating_Data/try_15.1/five_cubic.py | charliealpha094/Project_Data_Visualization | ccd55db58927dbbcfd57ab750fe7b21754c2b2dc | [
"MIT"
] | null | null | null | Chapter_15_Generating_Data/try_15.1/five_cubic.py | charliealpha094/Project_Data_Visualization | ccd55db58927dbbcfd57ab750fe7b21754c2b2dc | [
"MIT"
] | null | null | null | #Done by Carlos Amaral (19/07/2020)
#Try 15.1- Cubes
import matplotlib.pyplot as plt
x_values = [1, 2, 3, 4, 5]
y_values = [1, 8, 27, 64, 125]
plt.style.use('seaborn')
fig, ax = plt.subplots()
ax.plot(x_values, y_values, linewidth = 3)
#Set chart title and label axes
ax.set_title("Cubic Numbers", fontsize = 24)
... | 21.217391 | 47 | 0.690574 |
796fee84d3acde3ee8904f0b4c6b79fdb2fbf132 | 1,098 | py | Python | setup.py | inoueakimitsu/milwrap | 3660c6b56a474e4438e9c1c14f99315c96397baa | [
"MIT"
] | 1 | 2021-10-04T04:22:53.000Z | 2021-10-04T04:22:53.000Z | setup.py | inoueakimitsu/milwrap | 3660c6b56a474e4438e9c1c14f99315c96397baa | [
"MIT"
] | 5 | 2021-10-03T10:30:24.000Z | 2021-10-31T23:59:29.000Z | setup.py | inoueakimitsu/milwrap | 3660c6b56a474e4438e9c1c14f99315c96397baa | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
from setuptools import setup
# get key package details from milwrap/__version__.py
about = {} # type: ignore
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'milwrap', '__version__.py')) as f:
exec(f.read(), about)
# load the README file and use it... | 28.894737 | 66 | 0.67122 |
796feed8831f4b1be5f9e17094f74add1c62bde0 | 14,455 | py | Python | sfrmaker/test/test_preprocessing.py | aleaf/SFRmaker | 4b87d29f5486f283fecc024be36cf81d429bdcca | [
"CC0-1.0"
] | 17 | 2015-08-15T02:20:04.000Z | 2020-04-30T17:36:21.000Z | sfrmaker/test/test_preprocessing.py | aleaf/SFRmaker | 4b87d29f5486f283fecc024be36cf81d429bdcca | [
"CC0-1.0"
] | 15 | 2015-03-04T16:57:13.000Z | 2020-01-14T16:29:18.000Z | sfrmaker/test/test_preprocessing.py | aleaf/SFRmaker | 4b87d29f5486f283fecc024be36cf81d429bdcca | [
"CC0-1.0"
] | 9 | 2015-08-18T14:15:07.000Z | 2020-04-28T18:45:21.000Z | """
Test the preprocessing module
"""
import os
from pathlib import Path
import yaml
import numpy as np
import pandas as pd
import geopandas as gpd
from shapely.geometry import box
import pytest
from gisutils import df2shp, shp2df
from sfrmaker.checks import check_monotonicity
from sfrmaker.preprocessing import (get_fl... | 44.204893 | 103 | 0.655483 |
796ff0effa4ff60c66e97ec925c8cfc1a08cb588 | 1,247 | py | Python | tests/rules/test_docker_image_being_used_by_container.py | benmonro/therandy | b7c7c4ffc8f82b27f284ba90621a47baa5dfcb03 | [
"MIT"
] | null | null | null | tests/rules/test_docker_image_being_used_by_container.py | benmonro/therandy | b7c7c4ffc8f82b27f284ba90621a47baa5dfcb03 | [
"MIT"
] | null | null | null | tests/rules/test_docker_image_being_used_by_container.py | benmonro/therandy | b7c7c4ffc8f82b27f284ba90621a47baa5dfcb03 | [
"MIT"
] | null | null | null | from therandy.rules.docker_image_being_used_by_container import match, get_new_command
from therandy.types import Command
def test_match():
err_response = """Error response from daemon: conflict: unable to delete cd809b04b6ff (cannot be forced) - image is being used by running container e5e2591040d1"""
assert... | 44.535714 | 167 | 0.748196 |
796ff113658d26339c204acb3477ace5bda9e4fd | 2,966 | py | Python | tests/integration_tests/tests/agent_tests/test_events.py | Metaswitch/cloudify-manager | 760affb83facbe154c35c6ce20acb9432daa8bbd | [
"Apache-2.0"
] | null | null | null | tests/integration_tests/tests/agent_tests/test_events.py | Metaswitch/cloudify-manager | 760affb83facbe154c35c6ce20acb9432daa8bbd | [
"Apache-2.0"
] | 1 | 2021-03-26T00:32:30.000Z | 2021-03-26T00:32:30.000Z | tests/integration_tests/tests/agent_tests/test_events.py | vbohinc/cloudify-manager | 760affb83facbe154c35c6ce20acb9432daa8bbd | [
"Apache-2.0"
] | 1 | 2019-11-24T12:07:18.000Z | 2019-11-24T12:07:18.000Z | ########
# Copyright (c) 2017 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... | 37.075 | 79 | 0.687458 |
796ff1f876caf9c0c97d586c6d012973c2fe6149 | 1,979 | py | Python | ds_formatter/mctest.py | tbmihailov/qa_datasets_converter | 22c9155ed49ffb02538678c4322ca19c0fa0ba00 | [
"MIT"
] | 43 | 2018-11-10T00:31:23.000Z | 2021-05-30T06:58:15.000Z | ds_formatter/mctest.py | tbmihailov/qa_datasets_converter | 22c9155ed49ffb02538678c4322ca19c0fa0ba00 | [
"MIT"
] | 2 | 2019-05-22T10:23:45.000Z | 2019-05-24T14:57:41.000Z | ds_formatter/mctest.py | tbmihailov/qa_datasets_converter | 22c9155ed49ffb02538678c4322ca19c0fa0ba00 | [
"MIT"
] | 12 | 2019-03-18T11:16:52.000Z | 2021-03-31T23:13:53.000Z | def convert_to_squad(story_question_content):
"""
:param story_question_content:
:param answer_content:
:return: formatted SQUAD data
At initial version, we are just focusing on the context and question, nothing more,
therefore we are ignoring the answer part as of now
"""
# PARSE FILES
... | 39.58 | 163 | 0.65235 |
796ff34795d34cf6c32d75ab91caa8a8127123b2 | 14,560 | py | Python | my_env/lib/python3.8/site-packages/PIL/TiffTags.py | David5627/AWWARD | a22a2b2f7d7d6377435bfd475e82268e4e907141 | [
"MIT"
] | 353 | 2020-12-10T10:47:17.000Z | 2022-03-31T23:08:29.000Z | virtual/lib/python3.6/site-packages/PIL/TiffTags.py | kahenya-anita/Insta-Clone | 4894e959c17170505e73aee6dc497aeb29d55a71 | [
"MIT"
] | 80 | 2020-12-10T09:54:22.000Z | 2022-03-30T22:08:45.000Z | virtual/lib/python3.6/site-packages/PIL/TiffTags.py | kahenya-anita/Insta-Clone | 4894e959c17170505e73aee6dc497aeb29d55a71 | [
"MIT"
] | 63 | 2020-12-10T17:10:34.000Z | 2022-03-28T16:27:07.000Z | #
# The Python Imaging Library.
# $Id$
#
# TIFF tags
#
# This module provides clear-text names for various well-known
# TIFF tags. the TIFF codec works just fine without it.
#
# Copyright (c) Secret Labs AB 1999.
#
# See the README file for information on usage and redistribution.
#
##
# This module provides constant... | 29.12 | 87 | 0.632143 |
796ff356b82e53f10179bd41e50d5ddaf9240aa6 | 25,245 | py | Python | vkontakte_groups_statistic/migrations/0004_auto__add_field_groupstat_traffic_ads__add_field_groupstat_traffic_rec.py | mcfoton/django-vkontakte-groups-statistic | 5c8cc1045c700628b3df7ae8140d85706b1ea483 | [
"BSD-3-Clause"
] | null | null | null | vkontakte_groups_statistic/migrations/0004_auto__add_field_groupstat_traffic_ads__add_field_groupstat_traffic_rec.py | mcfoton/django-vkontakte-groups-statistic | 5c8cc1045c700628b3df7ae8140d85706b1ea483 | [
"BSD-3-Clause"
] | null | null | null | vkontakte_groups_statistic/migrations/0004_auto__add_field_groupstat_traffic_ads__add_field_groupstat_traffic_rec.py | mcfoton/django-vkontakte-groups-statistic | 5c8cc1045c700628b3df7ae8140d85706b1ea483 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'GroupStat.traffic_ads'
db.add_column('vkontakte_groups_groupstat', 'traffic_ads',
... | 85.576271 | 213 | 0.589344 |
796ff38a69f36642c29e6d79f19e46314fd272ac | 2,023 | py | Python | test/test_policy_abstract_config_result_entry.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 21 | 2018-03-29T14:20:35.000Z | 2021-10-13T05:11:41.000Z | test/test_policy_abstract_config_result_entry.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 14 | 2018-01-30T15:45:46.000Z | 2022-02-23T14:23:21.000Z | test/test_policy_abstract_config_result_entry.py | sdnit-se/intersight-python | 551f7685c0f76bb8af60ec83ffb6f9672d49a4ae | [
"Apache-2.0"
] | 18 | 2018-01-03T15:09:56.000Z | 2021-07-16T02:21:54.000Z | # coding: utf-8
"""
Cisco Intersight
Cisco Intersight is a management platform delivered as a service with embedded analytics for your Cisco and 3rd party IT infrastructure. This platform offers an intelligent level of management that enables IT organizations to analyze, simplify, and automate their environmen... | 53.236842 | 1,052 | 0.791893 |
796ff3cc0bc48471dcfdd68104dea3ca2bf8a2f5 | 4,773 | py | Python | src/layoutparser/io/basic.py | frankiert/layout-parser | f89a18f3d0a51a07f9a70598d06ca586dc4dd1c3 | [
"Apache-2.0"
] | 2,931 | 2020-06-22T17:57:57.000Z | 2022-03-31T05:16:10.000Z | src/layoutparser/io/basic.py | frankiert/layout-parser | f89a18f3d0a51a07f9a70598d06ca586dc4dd1c3 | [
"Apache-2.0"
] | 93 | 2020-06-25T17:47:07.000Z | 2022-03-26T11:43:33.000Z | src/layoutparser/io/basic.py | frankiert/layout-parser | f89a18f3d0a51a07f9a70598d06ca586dc4dd1c3 | [
"Apache-2.0"
] | 283 | 2020-07-02T07:52:00.000Z | 2022-03-24T05:06:57.000Z | # Copyright 2021 The Layout Parser team. 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... | 32.469388 | 84 | 0.639011 |
796ff40554baf549bd2448a55405751a12c8db48 | 289 | py | Python | afl_scraper/items.py | racc/afl-scraper | 942bc19e6200c88c4510ba91c82749a4449b57c0 | [
"Apache-2.0"
] | 1 | 2017-03-09T19:45:49.000Z | 2017-03-09T19:45:49.000Z | afl_scraper/items.py | racc/afl-scraper | 942bc19e6200c88c4510ba91c82749a4449b57c0 | [
"Apache-2.0"
] | null | null | null | afl_scraper/items.py | racc/afl-scraper | 942bc19e6200c88c4510ba91c82749a4449b57c0 | [
"Apache-2.0"
] | 1 | 2017-01-23T06:53:53.000Z | 2017-01-23T06:53:53.000Z | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
class AflScraperItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
pass
| 19.266667 | 51 | 0.688581 |
796ff407ede535e92d235966ef1e12e4e006ea98 | 18,219 | py | Python | theano/tensor/nnet/tests/test_neighbours.py | HapeMask/Theano | 89aac420cb6cc64328e23ee5dbe33c280b1eb980 | [
"BSD-3-Clause"
] | null | null | null | theano/tensor/nnet/tests/test_neighbours.py | HapeMask/Theano | 89aac420cb6cc64328e23ee5dbe33c280b1eb980 | [
"BSD-3-Clause"
] | null | null | null | theano/tensor/nnet/tests/test_neighbours.py | HapeMask/Theano | 89aac420cb6cc64328e23ee5dbe33c280b1eb980 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import, print_function, division
import numpy as np
import unittest
import theano
from theano import shared, function
import theano.tensor as T
from theano.tensor.nnet.neighbours import images2neibs, neibs2images, Images2Neibs
from theano.tests import unittest_tools
mode_without_gpu =... | 41.691076 | 97 | 0.447335 |
796ff5788ea697404f5ef0e108fcb3ee74fa1bdc | 727 | py | Python | TouchType/practica/urls.py | Francisco-Galindo/Mecanopractica | cdb6b99bab9ef4e02e7a9705891a25c2426fc290 | [
"MIT"
] | null | null | null | TouchType/practica/urls.py | Francisco-Galindo/Mecanopractica | cdb6b99bab9ef4e02e7a9705891a25c2426fc290 | [
"MIT"
] | null | null | null | TouchType/practica/urls.py | Francisco-Galindo/Mecanopractica | cdb6b99bab9ef4e02e7a9705891a25c2426fc290 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.landing_page, name="landing_page"),
path('home/', views.main_page, name="main_page"),
path('usuario/', views.user_page, name="user_page"),
path('usuario/data/<str:mode>/', views.get_all_user_stats, name="all_user_stats"),
... | 45.4375 | 86 | 0.675378 |
796ff65b73769b832fbe2640385369aed860a1da | 511 | py | Python | Crawler/Install Files/mutagen-1.22/docs/conf.py | hanvo/MusicCloud | b91b9481df087955fcb09f472308c9ad1a94ba94 | [
"BSD-3-Clause"
] | null | null | null | Crawler/Install Files/mutagen-1.22/docs/conf.py | hanvo/MusicCloud | b91b9481df087955fcb09f472308c9ad1a94ba94 | [
"BSD-3-Clause"
] | null | null | null | Crawler/Install Files/mutagen-1.22/docs/conf.py | hanvo/MusicCloud | b91b9481df087955fcb09f472308c9ad1a94ba94 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
sys.path.insert(0, os.path.abspath('../'))
import mutagen
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']
intersphinx_mapping = {'python': ('http://docs.python.org/2.7', None)}
source_suffix = '.rst'
master_doc = 'index'
project = 'mutagen'
copyright = u'20... | 25.55 | 70 | 0.69863 |
796ff86312f490272d93c0128434d330f6d35c31 | 10,013 | py | Python | tests/providers/aws/aws_network_test.py | msidana/PerfKitBenchmarker | 2784642d3e6b20b3f474c4e27edb1ef163804f66 | [
"Apache-2.0"
] | 1 | 2018-08-28T19:33:21.000Z | 2018-08-28T19:33:21.000Z | tests/providers/aws/aws_network_test.py | msidana/PerfKitBenchmarker | 2784642d3e6b20b3f474c4e27edb1ef163804f66 | [
"Apache-2.0"
] | null | null | null | tests/providers/aws/aws_network_test.py | msidana/PerfKitBenchmarker | 2784642d3e6b20b3f474c4e27edb1ef163804f66 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 33.600671 | 80 | 0.737242 |
796ff89173736ced125fae6098f7814ad5f3718c | 1,204 | py | Python | gryphon/lib/analysis/exponential_moving_average.py | qiquanzhijia/gryphon | 7bb2c646e638212bd1352feb1b5d21536a5b918d | [
"Apache-2.0"
] | 1,109 | 2019-06-20T19:23:27.000Z | 2022-03-20T14:03:43.000Z | gryphon/lib/analysis/exponential_moving_average.py | qiquanzhijia/gryphon | 7bb2c646e638212bd1352feb1b5d21536a5b918d | [
"Apache-2.0"
] | 63 | 2019-06-21T05:36:17.000Z | 2021-05-26T21:08:15.000Z | gryphon/lib/analysis/exponential_moving_average.py | qiquanzhijia/gryphon | 7bb2c646e638212bd1352feb1b5d21536a5b918d | [
"Apache-2.0"
] | 181 | 2019-06-20T19:42:05.000Z | 2022-03-21T13:05:13.000Z | import numpy as np
from cdecimal import Decimal
def ExpMovingAverage(values, timestamps, window_time=300):
assert len(values) == len(timestamps)
ema = []
values = list(values)
values.reverse()
timestamps = list(timestamps)
timestamps.reverse()
for i in range(len(timestamps)):
noted... | 31.684211 | 86 | 0.580565 |
796ff8ce2b92649dccfcc4a52683f1928043cd12 | 10,466 | py | Python | util_conv.py | oxquantum/CVAE_for_QE | 86c4817875b470e4533847c19f613b2f3067e0eb | [
"MIT"
] | 10 | 2019-02-05T16:20:53.000Z | 2022-03-02T19:04:10.000Z | util_conv.py | returnddd/CVAE_for_QE | 01f3070b9ddc4b6d54ad5d6573749b7270d95bee | [
"MIT"
] | null | null | null | util_conv.py | returnddd/CVAE_for_QE | 01f3070b9ddc4b6d54ad5d6573749b7270d95bee | [
"MIT"
] | null | null | null | import numpy as np
import tensorflow as tf
from tensorflow.python.framework import tensor_shape
# Convert an input_shape to n, which is the integer satisfying 2^n = height
# Input_shape: (height, width), list or tuple, length 2
# Assume height == width
def convert_shape_to_depth(input_shape):
height, width = input... | 38.336996 | 138 | 0.638639 |
796ff8d173810a789fc9673d73242f525b091702 | 2,403 | py | Python | test/module/override/test_exclude.py | LukasMusebrink/cfn-python-lint | bc3e6e5a9453f8b532a05f87e51d095635dd3b9f | [
"MIT-0"
] | null | null | null | test/module/override/test_exclude.py | LukasMusebrink/cfn-python-lint | bc3e6e5a9453f8b532a05f87e51d095635dd3b9f | [
"MIT-0"
] | null | null | null | test/module/override/test_exclude.py | LukasMusebrink/cfn-python-lint | bc3e6e5a9453f8b532a05f87e51d095635dd3b9f | [
"MIT-0"
] | 1 | 2019-12-17T14:27:07.000Z | 2019-12-17T14:27:07.000Z | """
Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
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 ... | 41.431034 | 88 | 0.71494 |
796ff9beef1f87a04750f1cded99f014eef0f5b1 | 640 | py | Python | problems/remove_nth_node_from_end.py | stachenov/PyLeetCode | cb13700d428854eff46a762542a63d691578d5b6 | [
"Unlicense"
] | null | null | null | problems/remove_nth_node_from_end.py | stachenov/PyLeetCode | cb13700d428854eff46a762542a63d691578d5b6 | [
"Unlicense"
] | null | null | null | problems/remove_nth_node_from_end.py | stachenov/PyLeetCode | cb13700d428854eff46a762542a63d691578d5b6 | [
"Unlicense"
] | null | null | null | from classes import ListNode
# Definition for singly-linked list.
# class ListNode(object):
# def __init__(self, x):
# self.val = x
# self.next = None
class Solution(object):
def removeNthFromEnd(self, head, n):
"""
:type head: ListNode
:type n: int
:rtype: List... | 24.615385 | 47 | 0.54375 |
796ffa1d0eb28eac45a23ed0ac94cec735e8bd20 | 9,785 | py | Python | sdks/python/http_client/v1/polyaxon_sdk/models/v1_hub_model.py | jjasonkal/polyaxon | 8454b29b2b971b965de8a7bf63afdd48f07d6d53 | [
"Apache-2.0"
] | null | null | null | sdks/python/http_client/v1/polyaxon_sdk/models/v1_hub_model.py | jjasonkal/polyaxon | 8454b29b2b971b965de8a7bf63afdd48f07d6d53 | [
"Apache-2.0"
] | null | null | null | sdks/python/http_client/v1/polyaxon_sdk/models/v1_hub_model.py | jjasonkal/polyaxon | 8454b29b2b971b965de8a7bf63afdd48f07d6d53 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, 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 ... | 25.284238 | 85 | 0.565253 |
796ffb2d47ccc1fa134315a51b8b329d6e851989 | 483 | py | Python | CircuitPython_Hardware_SD_Cards/sdmount_lib/code.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | CircuitPython_Hardware_SD_Cards/sdmount_lib/code.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | CircuitPython_Hardware_SD_Cards/sdmount_lib/code.py | albinger/Adafruit_Learning_System_Guides | 4fe2da261fe5d1ca282b86bd3b93ee1466346fa7 | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2018 Jerry Needell for Adafruit Industries
#
# SPDX-License-Identifier: MIT
import sys
import adafruit_sdcard
import board
import busio
import digitalio
import storage
# Connect to the card and mount the filesystem.
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
cs = digitalio.DigitalIn... | 23 | 68 | 0.772257 |
796ffba5ea51d819b1b6de59317f18347008b14a | 93,426 | py | Python | qa/rpc-tests/p2p-segwit.py | unifycoin/unifycoin | 7d0d5245610daab81e8b124c9b4dc03a73020b8f | [
"MIT"
] | null | null | null | qa/rpc-tests/p2p-segwit.py | unifycoin/unifycoin | 7d0d5245610daab81e8b124c9b4dc03a73020b8f | [
"MIT"
] | null | null | null | qa/rpc-tests/p2p-segwit.py | unifycoin/unifycoin | 7d0d5245610daab81e8b124c9b4dc03a73020b8f | [
"MIT"
] | 2 | 2019-06-28T12:47:30.000Z | 2019-12-16T04:56:50.000Z | #!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from test... | 45.640449 | 143 | 0.657986 |
796ffbb4e12f18593b1153f44c2c6e806a828595 | 130 | py | Python | mumble/__init__.py | J4LP/mumble | bb7e89dfc8f5de1e187a75d64c12a4b50bd00529 | [
"MIT",
"Unlicense"
] | null | null | null | mumble/__init__.py | J4LP/mumble | bb7e89dfc8f5de1e187a75d64c12a4b50bd00529 | [
"MIT",
"Unlicense"
] | null | null | null | mumble/__init__.py | J4LP/mumble | bb7e89dfc8f5de1e187a75d64c12a4b50bd00529 | [
"MIT",
"Unlicense"
] | null | null | null | import requests_cache
requests_cache.install_cache('mumble_requests', backend='sqlite', expire_after=29)
__version__ = "0.0.1"
| 18.571429 | 82 | 0.792308 |
796ffc3c459c3f894b6a80436c8489ddfdfb9899 | 3,323 | py | Python | Install/esri2open/utilities.py | fb98/esri2open | b71a83130c29f71d6155a57c68bfbcb603e963f8 | [
"MIT"
] | 116 | 2015-01-27T19:26:40.000Z | 2021-08-31T14:10:31.000Z | Install/esri2open/utilities.py | fb98/esri2open | b71a83130c29f71d6155a57c68bfbcb603e963f8 | [
"MIT"
] | 12 | 2015-03-24T13:04:06.000Z | 2016-12-29T22:41:27.000Z | Install/esri2open/utilities.py | fb98/esri2open | b71a83130c29f71d6155a57c68bfbcb603e963f8 | [
"MIT"
] | 35 | 2015-02-25T16:56:41.000Z | 2021-07-08T01:04:29.000Z | from arcpy import ListFields,Describe,SetProgressorLabel,SetProgressorPosition,GetCount_management, SetProgressor, AddMessage
from os.path import splitext, split
def getName(feature):
name = splitext(split(feature)[1])
if name[1]:
if name[1]==".shp":
return name[0]
else:
... | 34.257732 | 192 | 0.620223 |
796ffc5c2f5c6139628a15f8d41a7c3fb44050aa | 1,399 | py | Python | src/emotion_data_prep.py | rionaldichandraseta/Facifier | 6c1b305b97c02144b5889e79e07a1fad257c5a0c | [
"MIT"
] | 52 | 2017-11-29T22:31:57.000Z | 2021-02-21T20:57:22.000Z | src/emotion_data_prep.py | Sooraj599/facifier | 6c1b305b97c02144b5889e79e07a1fad257c5a0c | [
"MIT"
] | 5 | 2018-04-07T01:37:24.000Z | 2020-12-18T14:14:00.000Z | src/emotion_data_prep.py | Sooraj599/facifier | 6c1b305b97c02144b5889e79e07a1fad257c5a0c | [
"MIT"
] | 26 | 2018-08-16T07:26:11.000Z | 2020-11-14T13:07:30.000Z | import cv2
import glob
import os
from face_detection import find_faces
def remove_face_data(emotions):
print("Removing previous processed faces...")
for emotion in emotions:
filelist = glob.glob("../data/emotion/%s/*" % emotion)
for file in filelist:
os.remove(file)
... | 32.534884 | 98 | 0.581844 |
796ffc85a7a8eddb9e3de9f513e8d9b57a1abfd0 | 3,041 | py | Python | dlex_impl/bert/src/models/bert.py | dvtrung/dl-torch | b49e57d10d32bb223e2d7643f2579ccc32c63a9a | [
"MIT"
] | null | null | null | dlex_impl/bert/src/models/bert.py | dvtrung/dl-torch | b49e57d10d32bb223e2d7643f2579ccc32c63a9a | [
"MIT"
] | null | null | null | dlex_impl/bert/src/models/bert.py | dvtrung/dl-torch | b49e57d10d32bb223e2d7643f2579ccc32c63a9a | [
"MIT"
] | null | null | null | import bert
from dlex import Params
from dlex.datasets.tf import Dataset
from dlex.tf.models import BaseModelV1
import tensorflow_hub as hub
import tensorflow as tf
from dlex.utils import logger
BERT_MODEL_HUB = "https://tfhub.dev/google/bert_uncased_L-12_H-768_A-12/1"
class BERT(BaseModelV1):
def __... | 42.830986 | 105 | 0.659323 |
796ffd3eee84f13fefb8b199f1594614b5ea7133 | 444 | py | Python | pages/filled-area-plots.py | AnnMarieW/dash-app-gallery | 8c9bcf6ec7d5cd6e27a0ae2f1604f8719613ce93 | [
"MIT"
] | 4 | 2022-03-27T23:25:42.000Z | 2022-03-29T16:50:39.000Z | pages/filled-area-plots.py | AnnMarieW/dash-app-gallery | 8c9bcf6ec7d5cd6e27a0ae2f1604f8719613ce93 | [
"MIT"
] | null | null | null | pages/filled-area-plots.py | AnnMarieW/dash-app-gallery | 8c9bcf6ec7d5cd6e27a0ae2f1604f8719613ce93 | [
"MIT"
] | null | null | null | import dash
from utils.code_and_show import example_app
dash.register_page(__name__, description="How to fill the area enclosed by traces.")
filename = __name__.split("pages.")[1]
notes = """
#### Plotly Documentation:
- [Filled area charts](https://plotly.com/python/filled-area-plots/)
#### Contributed by:... | 18.5 | 84 | 0.727477 |
796ffd93c907bbd6b448eb02dcb571398e0b1855 | 669 | py | Python | jp.atcoder/abc204/abc204_c/25869569.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-09T03:06:25.000Z | 2022-02-09T03:06:25.000Z | jp.atcoder/abc204/abc204_c/25869569.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | 1 | 2022-02-05T22:53:18.000Z | 2022-02-09T01:29:30.000Z | jp.atcoder/abc204/abc204_c/25869569.py | kagemeka/atcoder-submissions | 91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e | [
"MIT"
] | null | null | null | import sys
import typing
import numpy as np
import scipy.sparse
def solve(n: int, ab: np.ndarray) -> typing.NoReturn:
a, b = ab.T
c = np.full(len(a), 1, np.int64)
g = scipy.sparse.csr_matrix(
(c, (a, b)),
shape=(n, n),
dtype=np.int64,
)
cnt = 0
for i in range(n):
t = scip... | 18.081081 | 54 | 0.550075 |
796ffe8f95103b22328f8fcba018ba2a683f5a8f | 9,526 | py | Python | Project2/part4/part4controller.py | tyrenyabe/CSE461 | 8a0ae4b4a3f41d659ff784488037583c638d8c43 | [
"MIT"
] | null | null | null | Project2/part4/part4controller.py | tyrenyabe/CSE461 | 8a0ae4b4a3f41d659ff784488037583c638d8c43 | [
"MIT"
] | null | null | null | Project2/part4/part4controller.py | tyrenyabe/CSE461 | 8a0ae4b4a3f41d659ff784488037583c638d8c43 | [
"MIT"
] | null | null | null | # Part 3 of UWCSE's Project 3
#
# based on Lab Final from UCSC's Networking Class
# which is based on of_tutorial by James McCauley
from pox.core import core
import pox.openflow.libopenflow_01 as of
from pox.lib.addresses import IPAddr, IPAddr6, EthAddr
log = core.getLogger()
#statically allocate a routing table for... | 36.638462 | 110 | 0.600252 |
796ffef049e97296405e065764b944acc1001409 | 534 | py | Python | tests/pyre/config/exceptions.py | lijun99/pyre | 004dfd4c06489b4ba5b32877338ca6440f2d523b | [
"BSD-3-Clause"
] | 3 | 2019-08-02T21:02:47.000Z | 2021-09-08T13:59:43.000Z | tests/pyre/config/exceptions.py | lijun99/pyre | 004dfd4c06489b4ba5b32877338ca6440f2d523b | [
"BSD-3-Clause"
] | null | null | null | tests/pyre/config/exceptions.py | lijun99/pyre | 004dfd4c06489b4ba5b32877338ca6440f2d523b | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2019 all rights reserved
#
"""
Tests for all the exceptions raised by this package
"""
def test():
from pyre.config.exceptions import ConfigurationError
try:
raise ConfigurationError()
except Config... | 14.833333 | 67 | 0.64794 |
796fff3acc9316ca7880e62a7c6a3c0fa8490a70 | 10,457 | py | Python | DatabaseScripts/createCassandraTables.py | navijo/FlOYBD | beb4fb32598e955ce3b47ad647452c15a87cfae8 | [
"MIT"
] | null | null | null | DatabaseScripts/createCassandraTables.py | navijo/FlOYBD | beb4fb32598e955ce3b47ad647452c15a87cfae8 | [
"MIT"
] | 7 | 2020-03-24T15:55:32.000Z | 2021-08-23T20:43:13.000Z | DatabaseScripts/createCassandraTables.py | navijo/FlOYBD | beb4fb32598e955ce3b47ad647452c15a87cfae8 | [
"MIT"
] | 3 | 2017-07-26T11:46:05.000Z | 2018-04-29T12:07:59.000Z | import uuid
from cassandra.cqlengine import columns
from cassandra.cqlengine import connection
from datetime import datetime
from cassandra.cqlengine.management import sync_table
from cassandra.cqlengine.models import Model
#Api Key
class Api_key(Model):
creation_date = columns.DateTime(primary_key=True)
... | 53.625641 | 82 | 0.720857 |
796fffa270c1664e7a48726a4548a4343c93f7e1 | 2,385 | py | Python | scanner/util/script/poc_shellshock.py | Shinpachi8/webscanner | 52aa377f0ee903a04ed19ea07433d0718697833d | [
"Apache-2.0"
] | 5 | 2018-04-27T12:34:08.000Z | 2020-11-09T10:47:02.000Z | scanner/util/script/poc_shellshock.py | Shinpachi8/webscanner | 52aa377f0ee903a04ed19ea07433d0718697833d | [
"Apache-2.0"
] | null | null | null | scanner/util/script/poc_shellshock.py | Shinpachi8/webscanner | 52aa377f0ee903a04ed19ea07433d0718697833d | [
"Apache-2.0"
] | 3 | 2019-04-08T19:58:20.000Z | 2020-04-07T15:35:07.000Z | #!/usr/bin/env python
# coding=utf-8
import urlparse
import requests
def verify(ip, port=80, name='', timeout=10, types='ip'):
'''
payload from awvs decode script: Bash_RCE_Server_Audit.script
'''
variants = [
"/",
"/administrator.cgi",
"/admin.cgi",
"/... | 35.597015 | 217 | 0.52914 |
797000ff3c64646225f34448f59b2f0a8ff17b59 | 1,129 | py | Python | 12/12_P4.py | monikuri/2110101_Com_Prog | bed16297685571edd7101b3e911d74ae3c62310c | [
"MIT"
] | null | null | null | 12/12_P4.py | monikuri/2110101_Com_Prog | bed16297685571edd7101b3e911d74ae3c62310c | [
"MIT"
] | null | null | null | 12/12_P4.py | monikuri/2110101_Com_Prog | bed16297685571edd7101b3e911d74ae3c62310c | [
"MIT"
] | null | null | null | class Card:
def __init__(self, value, suit):
self.value = value
self.suit = suit
def __str__(self):
return '(' + self.value + ' ' + self.suit + ')'
def getScore(self):
if self.value == 'A':
return 1
elif self.value in ['J', 'Q', 'K']:
return 10... | 27.536585 | 75 | 0.493357 |
79700285c02ee279706205253624b804285abbb4 | 5,191 | py | Python | onlinecourse/migrations/0001_initial.py | MJDKhalil/final-cloud-app-with-database | 86af0fe765479643547e8dc82f0d43b5dc5212f2 | [
"Apache-2.0"
] | null | null | null | onlinecourse/migrations/0001_initial.py | MJDKhalil/final-cloud-app-with-database | 86af0fe765479643547e8dc82f0d43b5dc5212f2 | [
"Apache-2.0"
] | null | null | null | onlinecourse/migrations/0001_initial.py | MJDKhalil/final-cloud-app-with-database | 86af0fe765479643547e8dc82f0d43b5dc5212f2 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.9 on 2021-11-08 13:45
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUT... | 47.190909 | 210 | 0.58351 |
797004b7f21ffa14d5a8c3c5eea0315c783c137f | 6,537 | py | Python | tests/core/test_results.py | nightlessbaron/pytorch-lightning | 239bea5c29cef0d1a0cfb319de5dbc9227aa2a53 | [
"Apache-2.0"
] | 3 | 2021-01-28T14:04:17.000Z | 2021-09-08T12:00:11.000Z | tests/core/test_results.py | nightlessbaron/pytorch-lightning | 239bea5c29cef0d1a0cfb319de5dbc9227aa2a53 | [
"Apache-2.0"
] | 8 | 2020-10-27T22:39:24.000Z | 2021-01-24T16:41:34.000Z | tests/core/test_results.py | nightlessbaron/pytorch-lightning | 239bea5c29cef0d1a0cfb319de5dbc9227aa2a53 | [
"Apache-2.0"
] | 1 | 2021-02-19T21:47:31.000Z | 2021-02-19T21:47:31.000Z | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 31.73301 | 149 | 0.650298 |
79700511c770bd7032989f92d3873b4ba4ef6269 | 830 | py | Python | diventi/ebooks/migrations/0016_auto_20190505_1854.py | flavoi/diven | 3173ca3ca3fbedc191b8eab3639a6bceb3c442c4 | [
"Apache-2.0"
] | 2 | 2019-06-27T16:00:17.000Z | 2020-08-14T07:46:05.000Z | diventi/ebooks/migrations/0016_auto_20190505_1854.py | flavoi/diven | 3173ca3ca3fbedc191b8eab3639a6bceb3c442c4 | [
"Apache-2.0"
] | 26 | 2020-02-15T22:39:35.000Z | 2022-02-19T21:09:01.000Z | diventi/ebooks/migrations/0016_auto_20190505_1854.py | flavoi/diven | 3173ca3ca3fbedc191b8eab3639a6bceb3c442c4 | [
"Apache-2.0"
] | 1 | 2021-11-12T22:30:15.000Z | 2021-11-12T22:30:15.000Z | # Generated by Django 2.1.7 on 2019-05-05 16:54
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('ebooks', '0015_remove_book_category'),
]
operations = [
migrations.AlterField(
model_name='book... | 33.2 | 177 | 0.654217 |
7970055a95631a76102933a5e148a30fa924a14a | 16 | py | Python | websockets/version.py | RojavaCrypto/websockets | cd8ab6610d11e5210744d02a9a7615868c17de0e | [
"BSD-3-Clause"
] | null | null | null | websockets/version.py | RojavaCrypto/websockets | cd8ab6610d11e5210744d02a9a7615868c17de0e | [
"BSD-3-Clause"
] | 4 | 2020-06-05T21:50:11.000Z | 2021-06-10T21:43:28.000Z | virtual/lib/python3.6/site-packages/websockets/version.py | CollinsMuiruri/IS-PROJECT | 2e59bb95a6dc3483e699140bde6792f6e92e1356 | [
"Unlicense"
] | 1 | 2021-09-06T00:06:01.000Z | 2021-09-06T00:06:01.000Z | version = '3.2'
| 8 | 15 | 0.5625 |
7970058b8547613f42e8e61a42aca457f14af2db | 338 | py | Python | chapter1/recipe2.py | uilian/python-testing | eeda24a77d451a4267b6ff69f878153430fcc06a | [
"MIT"
] | null | null | null | chapter1/recipe2.py | uilian/python-testing | eeda24a77d451a4267b6ff69f878153430fcc06a | [
"MIT"
] | null | null | null | chapter1/recipe2.py | uilian/python-testing | eeda24a77d451a4267b6ff69f878153430fcc06a | [
"MIT"
] | null | null | null | class RomanNumeralConverter(object):
def __init__(self):
self.digit_map = {"M": 1000, "D": 500,
"C": 100, "L": 50, "X": 10, "V": 5, "I": 1}
def convert_to_decimal(self, roman_numeral):
val = 0
for char in roman_numeral:
val += self.digit_map[char]
... | 30.727273 | 69 | 0.52071 |
7970063f0f395772bd767a20a3ab4490e11b8ea8 | 4,563 | py | Python | visframe.py | probinso/visframe | 56cab9b584a5100159fe567e5caae2381b6b5d20 | [
"MIT"
] | null | null | null | visframe.py | probinso/visframe | 56cab9b584a5100159fe567e5caae2381b6b5d20 | [
"MIT"
] | null | null | null | visframe.py | probinso/visframe | 56cab9b584a5100159fe567e5caae2381b6b5d20 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from PIL import Image, ImageDraw, ImageOps
from sys import argv, stderr
from json import load
from itertools import islice
from collections import namedtuple, defaultdict
from functools import wraps
from colour import Color
def coroutine(func):
@wraps(func)
def start(*args,**kwar... | 30.624161 | 84 | 0.628315 |
797006a905937d74957a62d04d84c33570e64686 | 1,186 | py | Python | tests/test_routes.py | meiwanlanjun/knowledge-repo | 285d93fa8dd511d45107ff04acb8d255558ee946 | [
"Apache-2.0"
] | 5,290 | 2016-09-27T04:23:44.000Z | 2022-03-31T16:19:06.000Z | tests/test_routes.py | meiwanlanjun/knowledge-repo | 285d93fa8dd511d45107ff04acb8d255558ee946 | [
"Apache-2.0"
] | 459 | 2016-09-27T14:44:44.000Z | 2022-03-31T05:42:30.000Z | tests/test_routes.py | meiwanlanjun/knowledge-repo | 285d93fa8dd511d45107ff04acb8d255558ee946 | [
"Apache-2.0"
] | 803 | 2016-09-27T06:15:48.000Z | 2022-03-28T19:03:55.000Z | import unittest
from knowledge_repo import KnowledgeRepository
class RouteTest(unittest.TestCase):
def setUp(self):
self.repo = KnowledgeRepository.for_uri('tests/test_repo', auto_create=True)
self.app = self.repo.get_app(config='tests/config_server.py').test_client()
self.headers = {}
... | 25.234043 | 84 | 0.560708 |
797006e56fb41b989628ae27dcb00ef0cbba8cfd | 6,959 | py | Python | annotate/annotate_json_boxes.py | annomator/annomator_package_beta_0.1 | 134d5c3b2818cf196021ed1ce61424259e80d7f6 | [
"Apache-2.0"
] | 14 | 2019-03-28T06:00:28.000Z | 2022-02-28T06:13:28.000Z | annotate/annotate_json_boxes.py | annomator/annomator_package_beta_0.1 | 134d5c3b2818cf196021ed1ce61424259e80d7f6 | [
"Apache-2.0"
] | 16 | 2020-01-28T22:12:17.000Z | 2022-02-10T00:13:24.000Z | annotate/annotate_json_boxes.py | annomator/annomator_package_beta_0.1 | 134d5c3b2818cf196021ed1ce61424259e80d7f6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Annomator Written by Arend Smits
# Copyright 2019 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/LIC... | 38.236264 | 127 | 0.616899 |
797007056c003b6aa89a080a0f2be0dd33e9f8c2 | 904 | py | Python | Interviewbit(Array)/Bribing was never easy (Recursive).py | ayroti-18/Competitive-Programming | d1ea08a91c63e54f0bba2365e56f98db71eb9054 | [
"MIT"
] | 3 | 2020-12-20T10:23:11.000Z | 2021-06-16T10:34:18.000Z | Interviewbit(Array)/Bribing was never easy (Recursive).py | Spring-dot/Competitive-Programming | 98add277a8b029710c749d1082de25c524e12408 | [
"MIT"
] | null | null | null | Interviewbit(Array)/Bribing was never easy (Recursive).py | Spring-dot/Competitive-Programming | 98add277a8b029710c749d1082de25c524e12408 | [
"MIT"
] | null | null | null | def findcount(start,end,old,new,count):
for i in range(start,end):
if i-new.index(old[i])>0:
new_index=new.index(old[i])
index=i
for j in range(i-1,new_index-1,-1):
count[0]+=1
old[j],old[index] = old[index... | 25.111111 | 54 | 0.487832 |
797009ac336ce5ee9d961bab6ebc06604c501b8b | 12,138 | py | Python | app/routes.py | NicolasAbroad/wnscraper | 87d5aa8e3a26aa0846a289d378848e1eb1d13304 | [
"Apache-2.0"
] | null | null | null | app/routes.py | NicolasAbroad/wnscraper | 87d5aa8e3a26aa0846a289d378848e1eb1d13304 | [
"Apache-2.0"
] | null | null | null | app/routes.py | NicolasAbroad/wnscraper | 87d5aa8e3a26aa0846a289d378848e1eb1d13304 | [
"Apache-2.0"
] | null | null | null | from flask import flash, redirect, render_template, request, session, send_file, url_for
from flask import g
from app import app, db
from flask_login import current_user, login_user, logout_user, login_required
from flask_babel import _, get_locale
from werkzeug.urls import url_parse
from app.models import users, reque... | 38.656051 | 162 | 0.702422 |
797009e558007087d298e132b5069cfbdf667dbf | 3,384 | py | Python | tensorflow_asr/optimizers/schedules.py | joaoalvarenga/TensorFlowASR | 3e303b6693bcb7afd5e94858ac8ace89b6426b50 | [
"Apache-2.0"
] | 1 | 2020-10-20T11:42:08.000Z | 2020-10-20T11:42:08.000Z | tensorflow_asr/optimizers/schedules.py | dathudeptrai/TensorFlowASR | 72cd5d2b932d66ddd61e79ab41bb0d64cb8c4919 | [
"Apache-2.0"
] | null | null | null | tensorflow_asr/optimizers/schedules.py | dathudeptrai/TensorFlowASR | 72cd5d2b932d66ddd61e79ab41bb0d64cb8c4919 | [
"Apache-2.0"
] | 1 | 2021-10-16T22:40:42.000Z | 2021-10-16T22:40:42.000Z | # Copyright 2020 Huy Le Nguyen (@usimarit)
#
# 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 ... | 37.6 | 86 | 0.641548 |
797009e68162e66ff608017eb857c0d0b4717dd9 | 3,349 | py | Python | debug/ssd/train_ssd300.py | jjjkkkjjj/pytorch.dl | d82aa1191c14f328c62de85e391ac6fa1b4c7ee3 | [
"MIT"
] | 2 | 2021-02-06T22:40:13.000Z | 2021-03-26T09:15:34.000Z | debug/ssd/train_ssd300.py | jjjkkkjjj/pytorch.dl | d82aa1191c14f328c62de85e391ac6fa1b4c7ee3 | [
"MIT"
] | 8 | 2020-07-11T07:10:51.000Z | 2022-03-12T00:39:03.000Z | debug/ssd/train_ssd300.py | jjjkkkjjj/pytorch.dl | d82aa1191c14f328c62de85e391ac6fa1b4c7ee3 | [
"MIT"
] | 2 | 2021-03-26T09:19:42.000Z | 2021-07-27T02:38:09.000Z | from dl.data.objdetn import datasets, utils, target_transforms, augmentations
from dl.data import transforms
from dl.loss.ssd import SSDLoss
from dl.models.ssd import SSD300
from dl.optim.scheduler import IterStepLR
from dl.log import *
#from torchvision import transforms > not import!!
from torch.utils.data import Da... | 46.513889 | 168 | 0.707674 |
79700a06b62a9bf5a044ddb41e523b700a4bb44c | 8,003 | py | Python | contrib/seeds/makeseeds.py | QRAX-LABS/QRAX | 951ed45d473b7ab8c74bf35ff794e97169736d0c | [
"MIT"
] | 2 | 2021-12-29T14:10:03.000Z | 2022-02-19T09:24:37.000Z | contrib/seeds/makeseeds.py | QRAX-LABS/QRAX | 951ed45d473b7ab8c74bf35ff794e97169736d0c | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | QRAX-LABS/QRAX | 951ed45d473b7ab8c74bf35ff794e97169736d0c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2013-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
import re
import sys
import dns.resolver
import collect... | 35.411504 | 116 | 0.568287 |
79700a2779731af13ab750cc45411cd440a6c96b | 4,714 | py | Python | Scripts/.ipynb_checkpoints/pubtator-checkpoint.py | argearriojas/ModEx | b440fb69870960e2c088d1f9afdfdce0beea1dda | [
"MIT"
] | 6 | 2019-06-16T13:59:57.000Z | 2021-03-24T07:13:31.000Z | Scripts/.ipynb_checkpoints/pubtator-checkpoint.py | argearriojas/ModEx | b440fb69870960e2c088d1f9afdfdce0beea1dda | [
"MIT"
] | null | null | null | Scripts/.ipynb_checkpoints/pubtator-checkpoint.py | argearriojas/ModEx | b440fb69870960e2c088d1f9afdfdce0beea1dda | [
"MIT"
] | 1 | 2019-11-01T21:33:07.000Z | 2019-11-01T21:33:07.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pandas as pd
from Bio import Entrez
from Rules_Class import Rules
import functions as fn
import networkx as nx
directory="/home/saman/Dropbox/UMB/Dr-Koroush/Code/Data/"
Positive=[]
[Positive.append(line.strip().upper()) for line in open(directory+"Positive.txt")... | 35.712121 | 178 | 0.631947 |
79700ae41300f16807ca9e1c856f32dd535f1c1c | 20,874 | py | Python | picking/algorithms/zhong.py | mattianeroni/IndustryAlgorithms | ff76c55a4fa655b8566e63a8a7e6ffeba76d6acd | [
"MIT"
] | 1 | 2020-11-23T23:38:32.000Z | 2020-11-23T23:38:32.000Z | picking/algorithms/zhong.py | mattianeroni/industry-algorithms | ff76c55a4fa655b8566e63a8a7e6ffeba76d6acd | [
"MIT"
] | null | null | null | picking/algorithms/zhong.py | mattianeroni/industry-algorithms | ff76c55a4fa655b8566e63a8a7e6ffeba76d6acd | [
"MIT"
] | null | null | null | from __future__ import annotations
from typing import Dict, List, Tuple, Union, Optional, cast, NewType
import random
import numpy as np # type: ignore
import time
# The type Velocity is defined
Velocity = NewType ("Velocity", List[Tuple[Tuple[int, int], float]])
def _compute_distance (lst : List[int], d... | 29.991379 | 144 | 0.594711 |
79700b1997070f4ba4021b68ae83a1e5e9befd02 | 4,066 | py | Python | alipay/aop/api/request/AlipayFundTransThirdpartyRewardQueryRequest.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipayFundTransThirdpartyRewardQueryRequest.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipayFundTransThirdpartyRewardQueryRequest.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipayFundTransThirdpartyRewardQueryModel import AlipayFundTransThirdpartyRewardQueryModel
class AlipayFundTransThirdp... | 28.041379 | 166 | 0.650762 |
79700c000b3259917875e561c8261dd264a42058 | 4,943 | py | Python | backend/tomato/__init__.py | dswd/ToMaTo | 355fd3a8c7f95dc72c62383b3edfa8f6c0396bf4 | [
"BSD-4-Clause-UC"
] | 2 | 2016-11-10T06:12:05.000Z | 2016-11-10T06:12:10.000Z | backend/tomato/__init__.py | dswd/ToMaTo | 355fd3a8c7f95dc72c62383b3edfa8f6c0396bf4 | [
"BSD-4-Clause-UC"
] | 2 | 2015-01-19T16:00:24.000Z | 2015-01-20T11:33:56.000Z | backend/tomato/__init__.py | dswd/ToMaTo | 355fd3a8c7f95dc72c62383b3edfa8f6c0396bf4 | [
"BSD-4-Clause-UC"
] | 1 | 2016-11-10T06:12:15.000Z | 2016-11-10T06:12:15.000Z | # -*- coding: utf-8 -*-
# ToMaTo (Topology management software)
# Copyright (C) 2010 Dennis Schwerdel, University of Kaiserslautern
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either vers... | 29.248521 | 150 | 0.744689 |
79700c0930f44746cfed629b64fbdfd0d9648d0f | 941 | py | Python | kubernetes/test/test_v1beta1_user_info.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | 2 | 2020-06-21T08:03:18.000Z | 2020-06-21T09:53:29.000Z | kubernetes/test/test_v1beta1_user_info.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1beta1_user_info.py | L3T/python | b6e4ae81a2afb49f668a142eb7d1c6e2571ef478 | [
"Apache-2.0"
] | 1 | 2020-12-10T07:28:08.000Z | 2020-12-10T07:28:08.000Z | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: release-1.16
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import... | 23.525 | 124 | 0.718385 |
79701046e04dd8e3036af8bdfb655f7c33748a1a | 5,562 | py | Python | app/model/thematic.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2019-07-25T21:15:05.000Z | 2019-07-25T21:15:05.000Z | app/model/thematic.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 44 | 2019-08-05T15:24:00.000Z | 2022-01-31T23:11:31.000Z | app/model/thematic.py | smartlab-br/datahub-api | 193e71172bb4891a5bbffc902da07ef57df9ab07 | [
"MIT"
] | 1 | 2021-05-11T07:49:51.000Z | 2021-05-11T07:49:51.000Z | ''' Repository para recuperar informações da CEE '''
from model.base import BaseModel
from repository.thematic import ThematicRepository
#pylint: disable=R0903
class Thematic(BaseModel):
''' Definição do repo '''
METADATA = {
'SMARTLAB': {
'datasets': [
'sstindicadoresnacion... | 35.653846 | 94 | 0.506832 |
7970106f82ddf26e69454a6ff510fae9885b2f53 | 573 | py | Python | handlers/BaseHandler.py | caroltc/lrc2srt | 8b4176ea6a0c225e8c49d7b00f3cdd808871c9d9 | [
"Unlicense"
] | null | null | null | handlers/BaseHandler.py | caroltc/lrc2srt | 8b4176ea6a0c225e8c49d7b00f3cdd808871c9d9 | [
"Unlicense"
] | null | null | null | handlers/BaseHandler.py | caroltc/lrc2srt | 8b4176ea6a0c225e8c49d7b00f3cdd808871c9d9 | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
#-*- coding: utf-8 -*-
import tornado.web
import tornado.escape
class BaseHandler(tornado.web.RequestHandler):
def response_ok(self, data = {}):
return self.response_json('OK', data, '200')
def response_failed(self, error_code = 500, data = {}):
return self.response_json... | 31.833333 | 76 | 0.678883 |
7970113ac51ac8136fe7bd193f4f76fa2ac0576a | 7,282 | bzl | Python | foreign_cc/private/framework/toolchains/macos_commands.bzl | al-tu/rules_foreign_cc | 497d929ec58fcb3e535d05b124a38bce0346b971 | [
"Apache-2.0"
] | null | null | null | foreign_cc/private/framework/toolchains/macos_commands.bzl | al-tu/rules_foreign_cc | 497d929ec58fcb3e535d05b124a38bce0346b971 | [
"Apache-2.0"
] | null | null | null | foreign_cc/private/framework/toolchains/macos_commands.bzl | al-tu/rules_foreign_cc | 497d929ec58fcb3e535d05b124a38bce0346b971 | [
"Apache-2.0"
] | null | null | null | """Define MacOS foreign_cc framework commands. MacOS platforms uses Bash"""
load(":commands.bzl", "FunctionAndCallInfo")
def shebang():
return "#!/usr/bin/env bash"
def script_extension():
return ".sh"
def pwd():
return "$(pwd)"
def echo(text):
return "echo \"{text}\"".format(text = text)
def expo... | 26.97037 | 147 | 0.602856 |
797012da4e1ad003cef23760649a0ce58deae8ea | 8,812 | py | Python | FundamentalFunctions/MiddleShanxiAreaDataVisualization.py | Gaoyifei1011/AmapProgram | d45a27abf9f508d922f37abc34f00da6d0aab4a0 | [
"MIT"
] | 1 | 2021-05-19T02:48:49.000Z | 2021-05-19T02:48:49.000Z | FundamentalFunctions/MiddleShanxiAreaDataVisualization.py | Gaoyifei1011/AmapProgram | d45a27abf9f508d922f37abc34f00da6d0aab4a0 | [
"MIT"
] | 1 | 2021-05-18T16:01:56.000Z | 2021-05-20T02:14:52.000Z | FundamentalFunctions/MiddleShanxiAreaDataVisualization.py | Gaoyifei1011/AmapProgram | d45a27abf9f508d922f37abc34f00da6d0aab4a0 | [
"MIT"
] | 1 | 2021-06-04T06:39:57.000Z | 2021-06-04T06:39:57.000Z | import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
"""
Copy from Jupyter Notebook
"""
# TODO: In the future version will insert into the 山西省道路信息分析系统 page.
# 设置字体,否则中文会显示异常
plt.rcParams['font.sans-serif'] = ['Microsoft YaHei']
plt.rcParams['axes.unicode_minus'] = False
plt.rcParams['fig... | 39.164444 | 121 | 0.688833 |
7970137a79ca135df37fdcefe0f7b2470b1a72f9 | 784 | py | Python | two pointers/python/leetcode345_Reverse_Vowels_of_a_String.py | wenxinjie/leetcode | c459a01040c8fe0783e15a16b8d7cca4baf4612a | [
"Apache-2.0"
] | null | null | null | two pointers/python/leetcode345_Reverse_Vowels_of_a_String.py | wenxinjie/leetcode | c459a01040c8fe0783e15a16b8d7cca4baf4612a | [
"Apache-2.0"
] | null | null | null | two pointers/python/leetcode345_Reverse_Vowels_of_a_String.py | wenxinjie/leetcode | c459a01040c8fe0783e15a16b8d7cca4baf4612a | [
"Apache-2.0"
] | null | null | null | # Write a function that takes a string as input and reverse only the vowels of a string.
# Example 1:
# Input: "hello"
# Output: "holle"
# Example 2:
# Input: "leetcode"
# Output: "leotcede"
class Solution(object):
def reverseVowels(self, s):
"""
:type s: str
:rtype: str
"""
... | 22.4 | 88 | 0.461735 |
797013fc80f292d8cf37e224c0ac6b976ca90570 | 1,444 | py | Python | src/waldur_mastermind/marketplace_remote/models.py | opennode/nodeconductor-assembly-waldur | cad9966389dc9b52b13d2301940c99cf4b243900 | [
"MIT"
] | 2 | 2017-01-20T15:26:25.000Z | 2017-08-03T04:38:08.000Z | src/waldur_mastermind/marketplace_remote/models.py | opennode/nodeconductor-assembly-waldur | cad9966389dc9b52b13d2301940c99cf4b243900 | [
"MIT"
] | null | null | null | src/waldur_mastermind/marketplace_remote/models.py | opennode/nodeconductor-assembly-waldur | cad9966389dc9b52b13d2301940c99cf4b243900 | [
"MIT"
] | null | null | null | from django.db import models
from model_utils import FieldTracker
from waldur_core.core.mixins import ReviewMixin
from waldur_core.core.models import DESCRIPTION_LENGTH, UuidMixin
from waldur_core.structure.models import PROJECT_NAME_LENGTH, Project
from waldur_mastermind.marketplace.models import Offering
class Pro... | 46.580645 | 86 | 0.781856 |
797014552828c24f5326a5602316e7957bb08027 | 2,334 | py | Python | logger.py | plabadille/image_classifier | 1d01b0094b5ee8de0f67b64cc5f21d40b385e5f5 | [
"MIT"
] | 8 | 2017-10-29T16:49:56.000Z | 2018-11-01T06:05:01.000Z | logger.py | plabadille/image_classifier | 1d01b0094b5ee8de0f67b64cc5f21d40b385e5f5 | [
"MIT"
] | 2 | 2018-01-08T08:06:06.000Z | 2018-09-11T17:46:59.000Z | logger.py | plabadille/image_classifier | 1d01b0094b5ee8de0f67b64cc5f21d40b385e5f5 | [
"MIT"
] | 3 | 2017-11-10T20:02:34.000Z | 2020-06-04T14:02:17.000Z | '''
This script will log usefull information
Usage : no direct call, used by train.py, train_with_hdf5.py and dataset.py.
-------
Main features :
---------------
* Handle log level to get clear and readable log
* Have helpers to deal with date and execution time
Environment in... | 28.814815 | 92 | 0.541131 |
797015f3e75c46373e26d2b19aef396740dcc40c | 1,090 | py | Python | tests/test_abi/test_is_encodable.py | lithp/eth-abi | e6fbe0204c070d4cedc5c794445fab41c1a8482a | [
"MIT"
] | 127 | 2017-12-03T17:46:21.000Z | 2022-03-18T14:21:30.000Z | tests/test_abi/test_is_encodable.py | lithp/eth-abi | e6fbe0204c070d4cedc5c794445fab41c1a8482a | [
"MIT"
] | 99 | 2017-12-13T09:02:36.000Z | 2022-03-26T13:44:53.000Z | tests/test_abi/test_is_encodable.py | lithp/eth-abi | e6fbe0204c070d4cedc5c794445fab41c1a8482a | [
"MIT"
] | 72 | 2017-11-23T18:39:16.000Z | 2022-03-24T06:42:05.000Z | from hypothesis import (
given,
settings,
)
import pytest
from eth_abi import (
is_encodable,
)
from tests.common.strategies import (
single_strs_values,
tuple_strs_values,
)
from tests.common.unit import (
CORRECT_SINGLE_ENCODINGS,
NOT_ENCODABLE,
)
@pytest.mark.parametrize(
'type_str... | 22.708333 | 81 | 0.781651 |
7970166f7ac6bab159b294c947fce53ae3dfe633 | 1,524 | py | Python | alipay/aop/api/domain/AlipayOpenSearchBoxactivityOfflineModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayOpenSearchBoxactivityOfflineModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/AlipayOpenSearchBoxactivityOfflineModel.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.constant.ParamConstants import *
class AlipayOpenSearchBoxactivityOfflineModel(object):
def __init__(self):
self._box_activity_id = None
self._merchant_id = None
@property
def box_activity_id(self):
re... | 27.214286 | 81 | 0.625984 |
797016a44cfeccebf0a91fcd6f31c3097aaaddc4 | 2,065 | py | Python | aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/QueryDeviceFileRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/QueryDeviceFileRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-iot/aliyunsdkiot/request/v20180120/QueryDeviceFileRequest.py | liumihust/aliyun-openapi-python-sdk | c7b5dd4befae4b9c59181654289f9272531207ef | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.852459 | 74 | 0.761259 |
797016cd5508f93272efb941b45a1180ecb8ca0c | 398 | py | Python | users/admin.py | yingshaoxo/human-project | 28069dc7b0a29c1967eb935d8bc9deaadab5ed5e | [
"MIT"
] | 3 | 2019-06-01T14:00:10.000Z | 2021-02-24T02:40:39.000Z | users/admin.py | yingshaoxo/human-project | 28069dc7b0a29c1967eb935d8bc9deaadab5ed5e | [
"MIT"
] | null | null | null | users/admin.py | yingshaoxo/human-project | 28069dc7b0a29c1967eb935d8bc9deaadab5ed5e | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from .forms import CustomUserCreationForm, CustomUserChangeForm
from .models import CustomUser
class CustomUserAdmin(UserAdmin):
add_form = CustomUserCreationForm
form = CustomUserChangeForm
list_display = ['email', 'usernam... | 24.875 | 63 | 0.796482 |
797018e705b328ec9e3422e99d400cdf25996147 | 1,702 | py | Python | labdrivers/lakeshore/ls332.py | pbnjeff89/labdrivers | 1091b9f746a5a011d94cd63abf5010fc8cde1556 | [
"MIT"
] | 12 | 2016-10-14T09:50:32.000Z | 2022-03-28T00:36:31.000Z | labdrivers/lakeshore/ls332.py | pbnjeff89/labdrivers | 1091b9f746a5a011d94cd63abf5010fc8cde1556 | [
"MIT"
] | 21 | 2016-04-13T20:03:36.000Z | 2019-09-25T13:00:52.000Z | labdrivers/lakeshore/ls332.py | pbnjeff89/labdrivers | 1091b9f746a5a011d94cd63abf5010fc8cde1556 | [
"MIT"
] | 3 | 2017-08-30T02:01:27.000Z | 2020-03-04T01:50:52.000Z | """Module for controlling the Lake Shore Cryotronics 332.
This module requires a National Instruments VISA driver, which can be found at
https://www.ni.com/visa/.
Attributes:
resource_manager: the pyvisa resource manager which provides the visa
objects used for communicating over the GPIB in... | 29.344828 | 89 | 0.658637 |
7970191dfd514a625607efa2ae4125992ef12e5e | 1,368 | py | Python | jobsapp/api/custom_exception.py | oriolpiera/anem-per-feina | 006d2f105596d17afd1d121cccabe97ce6ff3b55 | [
"MIT"
] | null | null | null | jobsapp/api/custom_exception.py | oriolpiera/anem-per-feina | 006d2f105596d17afd1d121cccabe97ce6ff3b55 | [
"MIT"
] | null | null | null | jobsapp/api/custom_exception.py | oriolpiera/anem-per-feina | 006d2f105596d17afd1d121cccabe97ce6ff3b55 | [
"MIT"
] | null | null | null | from rest_framework.exceptions import ValidationError
from rest_framework.views import exception_handler
def custom_exception_handler(exc, context):
"""
Override drf default validation error message response and sends as a list
:param exc:
:param context:
:return: response obj
"""
respons... | 29.73913 | 102 | 0.627924 |
7970196a1c987d65df986e7fc7942f2bd890d844 | 334 | py | Python | tool/release_update.py | random-python/file_sync_s3 | ddc44659b94cd5a569bae2acdc666cb44ded92dd | [
"Apache-2.0"
] | 1 | 2021-07-25T14:45:34.000Z | 2021-07-25T14:45:34.000Z | tool/release_update.py | random-python/file_sync_s3 | ddc44659b94cd5a569bae2acdc666cb44ded92dd | [
"Apache-2.0"
] | 1 | 2020-07-25T06:15:58.000Z | 2020-07-26T04:24:57.000Z | tool/release_update.py | random-python/file_sync_s3 | ddc44659b94cd5a569bae2acdc666cb44ded92dd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""
PyPi release rotation
"""
import os
from devrepo import base_dir
from pypirepo import perform_update
project_dir = base_dir()
project_name = 'file_sync_s3'
perform_update(project_dir, project_name)
# os.chdir(project_dir)
# os.system(f'rm -rf dist')
# os.system(f'python setup.py sdist --... | 16.7 | 51 | 0.751497 |
7970198a50fe0e4affc1c995d0ae02a0b921b095 | 4,089 | py | Python | color.py | ThangBK2009/android-source-browsing.git-repo | 0826c0749f9597be07171fed63160dcb1718e35c | [
"Apache-2.0"
] | 1 | 2015-11-08T08:45:23.000Z | 2015-11-08T08:45:23.000Z | color.py | ThangBK2009/android-source-browsing.git-repo | 0826c0749f9597be07171fed63160dcb1718e35c | [
"Apache-2.0"
] | null | null | null | color.py | ThangBK2009/android-source-browsing.git-repo | 0826c0749f9597be07171fed63160dcb1718e35c | [
"Apache-2.0"
] | null | null | null | #
# Copyright (C) 2008 The Android Open Source Project
#
# 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... | 22.222826 | 74 | 0.539496 |
7970198fe341588e5d8e382ea3132d0fa6515ac3 | 2,209 | py | Python | var/spack/repos/builtin/packages/r-rcppeigen/package.py | varioustoxins/spack | cab0e4cb240f34891a6d753f3393e512f9a99e9a | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/r-rcppeigen/package.py | varioustoxins/spack | cab0e4cb240f34891a6d753f3393e512f9a99e9a | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 6 | 2022-01-08T08:41:11.000Z | 2022-03-14T19:28:07.000Z | var/spack/repos/builtin/packages/r-rcppeigen/package.py | foeroyingur/spack | 5300cbbb2e569190015c72d0970d25425ea38647 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # 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 import *
class RRcppeigen(RPackage):
"""'Rcpp' Integration for the 'Eigen' Templated Linear Algebra Libra... | 56.641026 | 99 | 0.746492 |
797019f69f20640c29fcd2bdb6e92d6cbe35e67a | 29,590 | py | Python | bot/cogs/help_channels.py | Xynnix/bot | 12c80fb664e612a2319dfde7d341737159934e9c | [
"MIT"
] | null | null | null | bot/cogs/help_channels.py | Xynnix/bot | 12c80fb664e612a2319dfde7d341737159934e9c | [
"MIT"
] | null | null | null | bot/cogs/help_channels.py | Xynnix/bot | 12c80fb664e612a2319dfde7d341737159934e9c | [
"MIT"
] | null | null | null | import asyncio
import inspect
import json
import logging
import random
import typing as t
from collections import deque
from datetime import datetime
from pathlib import Path
import discord
from discord.ext import commands
from bot import constants
from bot.bot import Bot
from bot.decorators import with_role
from bot... | 41.793785 | 112 | 0.666712 |
79701ada39c1d12a08e8a174970799f6abf5a9e9 | 2,169 | py | Python | setup.py | ziotom78/polycomp | 03415c4f04bdc6b98d2b12e1a6957509c15a6e24 | [
"BSD-3-Clause"
] | null | null | null | setup.py | ziotom78/polycomp | 03415c4f04bdc6b98d2b12e1a6957509c15a6e24 | [
"BSD-3-Clause"
] | 2 | 2015-09-20T12:46:09.000Z | 2015-09-21T15:27:13.000Z | setup.py | ziotom78/polycomp | 03415c4f04bdc6b98d2b12e1a6957509c15a6e24 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- mode: python -*-
from setuptools import setup, find_packages
from setuptools.extension import Extension
import os.path as path
from distutils.version import LooseVersion as Version
import numpy as np
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'pypolycomp', 'ver... | 30.549296 | 87 | 0.646842 |
79701d263b26321c61916ba4b3fd9641c199be35 | 10,467 | py | Python | tools/test_files/test_vault/less_than_10/ham7_104.py | Astlaan/OpenQL | 404b3edf4406071992e9ad190303b12e143689a0 | [
"Apache-2.0"
] | null | null | null | tools/test_files/test_vault/less_than_10/ham7_104.py | Astlaan/OpenQL | 404b3edf4406071992e9ad190303b12e143689a0 | [
"Apache-2.0"
] | null | null | null | tools/test_files/test_vault/less_than_10/ham7_104.py | Astlaan/OpenQL | 404b3edf4406071992e9ad190303b12e143689a0 | [
"Apache-2.0"
] | null | null | null | from openql import openql as ql
import os
import argparse
def circuit(config_file, new_scheduler='yes', scheduler='ASAP', uniform_sched= 'no', sched_commute = 'yes', mapper='base', moves='no', maptiebreak='random', initial_placement='no', output_dir_name='test_output', optimize='no', measurement=True, log_level='LOG_W... | 27.912 | 270 | 0.501003 |
79701d2a0348874ae91226ce6b2056ad988ba19c | 1,862 | py | Python | var/spack/repos/builtin/packages/mrbayes/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2018-11-27T03:39:44.000Z | 2021-09-06T15:50:35.000Z | var/spack/repos/builtin/packages/mrbayes/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2019-01-11T20:11:52.000Z | 2019-01-11T20:11:52.000Z | var/spack/repos/builtin/packages/mrbayes/package.py | HaochengLIU/spack | 26e51ff1705a4d6234e2a0cf734f93f7f95df5cb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 1 | 2020-10-14T14:20:17.000Z | 2020-10-14T14:20:17.000Z | # Copyright 2013-2018 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 Mrbayes(AutotoolsPackage):
"""MrBayes is a program for Bayesian inference and model choice... | 35.807692 | 103 | 0.644468 |
79701d44af532d887df5793de9af7160dc80e316 | 8,595 | py | Python | helpers/gnosis_safe.py | mushroomsforest/badger-system | 25f904624b53c79943009e9ae84b6e58994647de | [
"MIT"
] | null | null | null | helpers/gnosis_safe.py | mushroomsforest/badger-system | 25f904624b53c79943009e9ae84b6e58994647de | [
"MIT"
] | null | null | null | helpers/gnosis_safe.py | mushroomsforest/badger-system | 25f904624b53c79943009e9ae84b6e58994647de | [
"MIT"
] | 1 | 2021-04-30T01:33:32.000Z | 2021-04-30T01:33:32.000Z | from enum import Enum
from ape_safe import ApeSafe
from helpers.token_utils import distribute_test_ether
from brownie import *
from rich.console import Console
from tabulate import tabulate
from scripts.systems.gnosis_safe_system import connect_gnosis_safe
from helpers.multicall import func
console = Console()
"""
... | 27.372611 | 123 | 0.603025 |
79701ebd97de57b1783ea72d6e3166066f5af3ad | 9,919 | py | Python | QT_UI/Learning.py | CODEJIN/HNet_on_Tensorflow | aa72b2e065db12d8482a4c670c619bc4f786c055 | [
"Apache-2.0"
] | 7 | 2017-03-08T19:42:41.000Z | 2019-04-25T15:30:04.000Z | HNet_UI/Learning.py | CODEJIN/HNet_on_Tensorflow | aa72b2e065db12d8482a4c670c619bc4f786c055 | [
"Apache-2.0"
] | null | null | null | HNet_UI/Learning.py | CODEJIN/HNet_on_Tensorflow | aa72b2e065db12d8482a4c670c619bc4f786c055 | [
"Apache-2.0"
] | 5 | 2017-03-02T00:58:33.000Z | 2019-06-28T13:07:57.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Learning.ui'
#
# Created by: PyQt5 UI code generator 5.7
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog... | 61.608696 | 96 | 0.72225 |
79701fed4e6d2e39ac3a6949708c3476655ed1ae | 447 | py | Python | tests/test_constructor.py | WEGFan/Edge-PC-Savefile-Editor | 6e48693d7bfb015509da53499914b906a7bfa4b5 | [
"MIT"
] | 1 | 2020-01-24T19:44:20.000Z | 2020-01-24T19:44:20.000Z | tests/test_constructor.py | WEGFan/Edge-PC-Savefile-Editor | 6e48693d7bfb015509da53499914b906a7bfa4b5 | [
"MIT"
] | null | null | null | tests/test_constructor.py | WEGFan/Edge-PC-Savefile-Editor | 6e48693d7bfb015509da53499914b906a7bfa4b5 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
from lib import ttbjson
def test_constructor():
bjson_obj = ttbjson.TwoTribesBinaryJSON()
assert bjson_obj.header == 'BJSON'
assert bjson_obj.version == 1
assert bjson_obj.data is None
with pytest.raises(TypeError, match=r'^header must be str$'):
bj... | 24.833333 | 66 | 0.677852 |
7970200e53c69c2afcf9e109f0b8ed6bee3f1bd5 | 10,051 | py | Python | tests/test_hub.py | ht-albert/apsconnect-cli | 0323cb37f4ac2a6305c1fcca21aa8f8581156f27 | [
"Apache-2.0"
] | 2 | 2020-12-01T15:55:25.000Z | 2022-02-16T10:14:06.000Z | tests/test_hub.py | marcserrat/apsconnect-cli | 36e25935ce3df15bb1d4f8f5296ab86e2a086c3f | [
"Apache-2.0"
] | null | null | null | tests/test_hub.py | marcserrat/apsconnect-cli | 36e25935ce3df15bb1d4f8f5296ab86e2a086c3f | [
"Apache-2.0"
] | null | null | null | import sys
from unittest import TestCase
from mock import MagicMock, patch
from apsconnectcli.apsconnect import APSConnectUtil
from apsconnectcli.hub import APS, Hub, osaapi_raise_for_status
if sys.version_info >= (3,):
_BUILTINS_OPEN = 'builtins.open'
_BUILTINS_PRINT = 'builtins.print'
else:
_BUILTINS_O... | 37.225926 | 96 | 0.600139 |
797020814160a3647df7845ec8e7e327753a3734 | 1,819 | py | Python | app/app.py | matthiaszimmermann/blm | ae70e5845578da9c3b7ff2cdd47829a88004cb5d | [
"MIT"
] | null | null | null | app/app.py | matthiaszimmermann/blm | ae70e5845578da9c3b7ff2cdd47829a88004cb5d | [
"MIT"
] | null | null | null | app/app.py | matthiaszimmermann/blm | ae70e5845578da9c3b7ff2cdd47829a88004cb5d | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request
from model import LSCCNN
from PIL import Image
from io import BytesIO
import logging
import numpy as np
import base64
import cv2
MODEL_FILENAME = './model/scale_4_epoch_46.pth'
MODEL = None
EMOJI_FILENAME = './blm_fist.png'
EMOJI = None
app = Flask(__name__)
@a... | 21.915663 | 77 | 0.671798 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.