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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a1ebec65b56e62e91bc61cc5cc4368c35e03e3c | 633 | py | Python | setup.py | Arkh42/GreatPublicationPlanner | d8745c2c1586fda82a4c2d852ee64c3c3417982d | [
"MIT"
] | 1 | 2020-01-22T07:41:25.000Z | 2020-01-22T07:41:25.000Z | setup.py | Arkh42/GreatPublicationPlanner | d8745c2c1586fda82a4c2d852ee64c3c3417982d | [
"MIT"
] | 9 | 2020-01-15T16:22:32.000Z | 2020-02-17T14:15:21.000Z | setup.py | Arkh42/GreatPublicationPlanner | d8745c2c1586fda82a4c2d852ee64c3c3417982d | [
"MIT"
] | null | null | null |
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name="GreatPublicationPlanner",
version="0.1.8",
author="Alexandre Quenon",
author_email="aquenon@hotmail.be",
description="A package to display target publications and allow to choose wisely",... | 28.772727 | 86 | 0.699842 |
4a1ebf08dcf1ec58842efa384d9e895b769490b0 | 265 | py | Python | Lib/test/test_compiler/sbs_code_tests/94_strformat.py | diogommartins/cinder | 79103e9119cbecef3b085ccf2878f00c26e1d175 | [
"CNRI-Python-GPL-Compatible"
] | 1,886 | 2021-05-03T23:58:43.000Z | 2022-03-31T19:15:58.000Z | Lib/test/test_compiler/sbs_code_tests/94_strformat.py | diogommartins/cinder | 79103e9119cbecef3b085ccf2878f00c26e1d175 | [
"CNRI-Python-GPL-Compatible"
] | 70 | 2021-05-04T23:25:35.000Z | 2022-03-31T18:42:08.000Z | Lib/test/test_compiler/sbs_code_tests/94_strformat.py | diogommartins/cinder | 79103e9119cbecef3b085ccf2878f00c26e1d175 | [
"CNRI-Python-GPL-Compatible"
] | 52 | 2021-05-04T21:26:03.000Z | 2022-03-08T18:02:56.000Z | def f(name, args):
return f"foo.{name}({', '.join(args)})"
# EXPECTED:
[
...,
CODE_START('f'),
LOAD_CONST('foo.'),
...,
FORMAT_VALUE(0),
LOAD_CONST('('),
...,
FORMAT_VALUE(0),
LOAD_CONST(')'),
BUILD_STRING(5),
...,
]
| 15.588235 | 43 | 0.471698 |
4a1ebf66c03ec7336dee4697aac71bf88215c3cf | 4,290 | py | Python | sdk/python/feast/core/JobService_pb2_grpc.py | davidheryanto/feast | 72cc8bd2cd0040f7bc44df255f95bad00cacd720 | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/core/JobService_pb2_grpc.py | davidheryanto/feast | 72cc8bd2cd0040f7bc44df255f95bad00cacd720 | [
"Apache-2.0"
] | null | null | null | sdk/python/feast/core/JobService_pb2_grpc.py | davidheryanto/feast | 72cc8bd2cd0040f7bc44df255f95bad00cacd720 | [
"Apache-2.0"
] | 2 | 2020-05-20T22:07:11.000Z | 2021-07-25T17:28:24.000Z | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from feast.core import JobService_pb2 as feast_dot_core_dot_JobService__pb2
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
class JobServiceStub(object):
# missing associated documentation comment in .prot... | 43.333333 | 123 | 0.771562 |
4a1ec03a059a0230a3bb045a4d1a4b0092c2b5ca | 33,730 | py | Python | git_cache.py | superisaac/depot_tools | ea1884b651e69975e897b15cf2063f36317538a4 | [
"BSD-3-Clause"
] | null | null | null | git_cache.py | superisaac/depot_tools | ea1884b651e69975e897b15cf2063f36317538a4 | [
"BSD-3-Clause"
] | null | null | null | git_cache.py | superisaac/depot_tools | ea1884b651e69975e897b15cf2063f36317538a4 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""A git command for managing a local cache of git repositories."""
from __future__ import print_function
import contextlib
import er... | 34.737384 | 80 | 0.637682 |
4a1ec05df32efd93a4f3adaef7ef33ca809e8fb9 | 44,118 | py | Python | virtual/lib/python3.8/site-packages/pip/_vendor/distlib/wheel.py | Barrack-coder/News | 1bfb1b441cb2abb3d5edeebfefafc3b624a01e6c | [
"MIT"
] | 32 | 2021-05-03T09:03:57.000Z | 2022-03-17T09:18:59.000Z | virtual/lib/python3.8/site-packages/pip/_vendor/distlib/wheel.py | Barrack-coder/News | 1bfb1b441cb2abb3d5edeebfefafc3b624a01e6c | [
"MIT"
] | 4 | 2021-05-29T20:42:52.000Z | 2022-03-16T03:01:12.000Z | virtual/lib/python3.8/site-packages/pip/_vendor/distlib/wheel.py | Barrack-coder/News | 1bfb1b441cb2abb3d5edeebfefafc3b624a01e6c | [
"MIT"
] | 27 | 2021-11-10T08:44:10.000Z | 2022-03-30T08:19:46.000Z | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013-2020 Vinay Sajip.
# Licensed to the Python Software Foundation under a contributor agreement.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
from __future__ import unicode_literals
import base64
import codecs
import datetime
from email import message_from_file
impo... | 41.738884 | 102 | 0.486989 |
4a1ec1ae9e998e0e1eee42173c10874cd072fcf5 | 442 | py | Python | zsh/serverlog.py | liuyang1/dotfiles | d43c051c2daff0f21cc1921f267786dcafcc7cca | [
"MIT"
] | 1 | 2021-01-15T03:41:46.000Z | 2021-01-15T03:41:46.000Z | zsh/serverlog.py | liuyang1/dotfiles | d43c051c2daff0f21cc1921f267786dcafcc7cca | [
"MIT"
] | null | null | null | zsh/serverlog.py | liuyang1/dotfiles | d43c051c2daff0f21cc1921f267786dcafcc7cca | [
"MIT"
] | 1 | 2019-05-27T11:39:08.000Z | 2019-05-27T11:39:08.000Z | import logging
log_file = "/tmp/fast-agnoster.log"
log_level = logging.DEBUG
logger = logging.getLogger("logging.NormalLogger")
handler = logging.FileHandler(log_file)
fmt = "[%(asctime)s] [%(filename)s:%(lineno)s] [%(levelname)s] %(message)s"
formatter = logging.Formatter(fmt)
handler.setFormatter(formatter)
logger... | 19.217391 | 75 | 0.737557 |
4a1ec1cd3d9a51faa830ad55bbee26a2f34de02f | 2,719 | py | Python | clumioapi/models/vcenter_links.py | clumio-code/clumio-python-sdk | 63bfaf3afed5c0ab4bae3dd1be52271249d07c51 | [
"Apache-2.0"
] | null | null | null | clumioapi/models/vcenter_links.py | clumio-code/clumio-python-sdk | 63bfaf3afed5c0ab4bae3dd1be52271249d07c51 | [
"Apache-2.0"
] | 1 | 2021-09-16T05:56:05.000Z | 2021-09-16T05:56:05.000Z | clumioapi/models/vcenter_links.py | clumio-code/clumio-python-sdk | 63bfaf3afed5c0ab4bae3dd1be52271249d07c51 | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2021. Clumio, Inc.
#
from typing import Any, Dict, Mapping, Optional, Sequence, Type, TypeVar
from clumioapi.models import hateoas_self_link
from clumioapi.models import read_v_center_object_protection_stats_hateoas_link
T = TypeVar('T', bound='VcenterLinks')
class VcenterLinks:
"""Implementation... | 34.417722 | 149 | 0.679294 |
4a1ec21808ec2dee6f58c985323253a45b4506f1 | 979 | py | Python | mallard/config.py | zomatree/mallard | 0f25577f57213e7bff2d5daf75e39ea8096e365c | [
"MIT"
] | 9 | 2017-08-24T00:20:04.000Z | 2021-09-26T10:28:02.000Z | mallard/config.py | zomatree/mallard | 0f25577f57213e7bff2d5daf75e39ea8096e365c | [
"MIT"
] | 13 | 2017-08-27T19:32:27.000Z | 2020-09-03T02:52:11.000Z | mallard/config.py | zomatree/mallard | 0f25577f57213e7bff2d5daf75e39ea8096e365c | [
"MIT"
] | 10 | 2017-08-28T13:54:13.000Z | 2021-04-28T22:18:58.000Z | #
# config.py
#
# mallard - DDG Instant Answers bot for the Programming Server
# Copyright (c) 2017 Johannes Christ, Ammon Smith et al.
#
# mallard is available free of charge under the terms of the MIT
# License. You are free to redistribute and/or modify it under those
# terms. It is distributed in the hopes that it ... | 27.971429 | 84 | 0.679265 |
4a1ec2b1b63578ef353d155f634afb1698e9ef3d | 4,267 | py | Python | tests/test_corpora_reddit_reader.py | nigeljyng/textacy | 17833f63103850f9ea7e8e22b16378758dae6fce | [
"Apache-2.0"
] | 2 | 2021-04-13T16:00:30.000Z | 2022-03-15T00:36:48.000Z | tests/test_corpora_reddit_reader.py | nigeljyng/textacy | 17833f63103850f9ea7e8e22b16378758dae6fce | [
"Apache-2.0"
] | null | null | null | tests/test_corpora_reddit_reader.py | nigeljyng/textacy | 17833f63103850f9ea7e8e22b16378758dae6fce | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, unicode_literals
import os
import shutil
import tempfile
import unittest
from textacy.compat import PY2, unicode_
from textacy.corpora import RedditReader
from textacy.fileio import write_json_lines
REDDIT_COMMENTS = [
{"author_flair_css_class": None, "created_utc": "1420... | 56.144737 | 631 | 0.660183 |
4a1ec2ebd1bfd9fee761945af9a87c0d3ed2af55 | 1,736 | py | Python | Others/Source/19/19.1/plot_line_legend2.py | silence0201/Learn-Python | 662da7c0e74221cedb445ba17d5cb1cd3af41c86 | [
"MIT"
] | 1 | 2018-05-30T01:38:23.000Z | 2018-05-30T01:38:23.000Z | Others/Source/19/19.1/plot_line_legend2.py | silence0201/Learn-Python | 662da7c0e74221cedb445ba17d5cb1cd3af41c86 | [
"MIT"
] | null | null | null | Others/Source/19/19.1/plot_line_legend2.py | silence0201/Learn-Python | 662da7c0e74221cedb445ba17d5cb1cd3af41c86 | [
"MIT"
] | null | null | null | # coding: utf-8
#########################################################################
# 网站: <a href="http://www.crazyit.org">疯狂Java联盟</a> #
# author yeeku.H.lee kongyeeku@163.com #
# #
# version... | 49.6 | 74 | 0.358871 |
4a1ec30a09f7e8098b00804b1acbb3fbc75685e3 | 9,199 | py | Python | bk_py_torch_libs/pt_core.py | wbkdef/CodeSamples | b7b020dee97230479a741e8d067b473957faa546 | [
"Unlicense"
] | null | null | null | bk_py_torch_libs/pt_core.py | wbkdef/CodeSamples | b7b020dee97230479a741e8d067b473957faa546 | [
"Unlicense"
] | null | null | null | bk_py_torch_libs/pt_core.py | wbkdef/CodeSamples | b7b020dee97230479a741e8d067b473957faa546 | [
"Unlicense"
] | null | null | null | import os
import os.path as osp
import re
import sys
import enum
import typing as tp
import itertools as it
from typing import Union, List, Tuple, Dict, Sequence, Iterable, TypeVar, Any, Callable, Sized, NamedTuple, Optional
from functools import partial
import numpy as np
import pandas as pd
import sklearn as sk
from... | 37.70082 | 209 | 0.693119 |
4a1ec31069b22c78de2a915b5711e5323c9ac806 | 1,506 | py | Python | scripts/extract_ltr.py | stajichlab/localizaTE | 31dd4fa22b2a38703855f7a86595f68547298048 | [
"MIT"
] | 1 | 2017-09-13T14:27:37.000Z | 2017-09-13T14:27:37.000Z | scripts/extract_ltr.py | stajichlab/localizaTE | 31dd4fa22b2a38703855f7a86595f68547298048 | [
"MIT"
] | null | null | null | scripts/extract_ltr.py | stajichlab/localizaTE | 31dd4fa22b2a38703855f7a86595f68547298048 | [
"MIT"
] | null | null | null |
######################################################################################################
# Program for extracting full-lenght LTRs from the ltrharvest output.
# Chanche the name of the assembly file in the "genoma" label. Sequences must be named as scaffold_1
########################################... | 28.415094 | 120 | 0.596946 |
4a1ec33dde09cb301c45805c630b583cc4f33eda | 4,747 | py | Python | purity_fb/purity_fb_1dot4/models/pure_error.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 5 | 2017-09-08T20:47:22.000Z | 2021-06-29T02:11:05.000Z | purity_fb/purity_fb_1dot4/models/pure_error.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 16 | 2017-11-27T20:57:48.000Z | 2021-11-23T18:46:43.000Z | purity_fb/purity_fb_1dot4/models/pure_error.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 22 | 2017-10-13T15:33:05.000Z | 2021-11-08T19:56:21.000Z | # coding: utf-8
"""
Pure Storage FlashBlade REST 1.4 Python SDK
Pure Storage FlashBlade REST 1.4 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/).
OpenAPI spec version: 1.4
Contact: i... | 26.519553 | 204 | 0.557405 |
4a1ec39ed3504230148163c6fdb12d5d3e932e0d | 129 | py | Python | inteirosentra.py | fabianocardosodev/exercicios-Python-cursoIntens | aae9f334007afe5e5210c19f092bb35659db1332 | [
"MIT"
] | null | null | null | inteirosentra.py | fabianocardosodev/exercicios-Python-cursoIntens | aae9f334007afe5e5210c19f092bb35659db1332 | [
"MIT"
] | null | null | null | inteirosentra.py | fabianocardosodev/exercicios-Python-cursoIntens | aae9f334007afe5e5210c19f092bb35659db1332 | [
"MIT"
] | null | null | null | #usar no terminal
age = input("Qual sua idade?")
#entra com a solicitação
age
#armazenou para trabalhar,porem tratado como string | 25.8 | 51 | 0.782946 |
4a1ec4917013ef2dae0f75d60ed6ad0c571b4094 | 13,018 | py | Python | youtubesearchpython/__init__.py | urhprimozic/youtube-search-python | 70046eb5a070a7a8ac7198acddca8c8bd695d8c2 | [
"MIT"
] | null | null | null | youtubesearchpython/__init__.py | urhprimozic/youtube-search-python | 70046eb5a070a7a8ac7198acddca8c8bd695d8c2 | [
"MIT"
] | null | null | null | youtubesearchpython/__init__.py | urhprimozic/youtube-search-python | 70046eb5a070a7a8ac7198acddca8c8bd695d8c2 | [
"MIT"
] | null | null | null | import urllib.parse
import urllib.request
import json
import html
class searchYoutube:
#########https://github.com/alexmercerind/youtube-search-python#########
__networkError = False
__validResponse = False
def __init__(self, keyword, offset = 1, mode = "json", max_results = 20):
... | 40.179012 | 176 | 0.444462 |
4a1ec5871c82f79ac1726f452103d9470dadd43f | 2,741 | py | Python | pychecker/check/experiment/detection_in_the_field.py | PyVCEchecker/PyVCEchecker | 879756927c82a2612c817bdffbae25234ff62558 | [
"MIT"
] | null | null | null | pychecker/check/experiment/detection_in_the_field.py | PyVCEchecker/PyVCEchecker | 879756927c82a2612c817bdffbae25234ff62558 | [
"MIT"
] | null | null | null | pychecker/check/experiment/detection_in_the_field.py | PyVCEchecker/PyVCEchecker | 879756927c82a2612c817bdffbae25234ff62558 | [
"MIT"
] | null | null | null | import os
import logging
from datetime import datetime
from tqdm import tqdm
import pychecker.config as config
from pychecker.utils import read_object_from_file, write_object_to_file
from pychecker.check.no_avl_resource_detection import parse_comp_expr
from pychecker.check.visit_pypi import get_metadata
from pychecker... | 35.597403 | 107 | 0.619847 |
4a1ec5a0ffab785b54b0abc5d06930111343ef6a | 37 | py | Python | controller/__init__.py | NMITTutor/SDV602-2021 | 18f9bdbf6c2785b62e9af3543f989a8b5a22f3b6 | [
"MIT"
] | null | null | null | controller/__init__.py | NMITTutor/SDV602-2021 | 18f9bdbf6c2785b62e9af3543f989a8b5a22f3b6 | [
"MIT"
] | null | null | null | controller/__init__.py | NMITTutor/SDV602-2021 | 18f9bdbf6c2785b62e9af3543f989a8b5a22f3b6 | [
"MIT"
] | 1 | 2021-09-29T09:59:32.000Z | 2021-09-29T09:59:32.000Z | __all__ = ["DES","uploader","User"]
| 18.5 | 36 | 0.594595 |
4a1ec5d5368f3e2b156bb4a5bef54023f0055c6f | 1,439 | py | Python | OnlineDB/SiStripO2O/test/testPopCon/read_UnitTest_ApvGain_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 852 | 2015-01-11T21:03:51.000Z | 2022-03-25T21:14:00.000Z | OnlineDB/SiStripO2O/test/testPopCon/read_UnitTest_ApvGain_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 30,371 | 2015-01-02T00:14:40.000Z | 2022-03-31T23:26:05.000Z | OnlineDB/SiStripO2O/test/testPopCon/read_UnitTest_ApvGain_cfg.py | ckamtsikis/cmssw | ea19fe642bb7537cbf58451dcf73aa5fd1b66250 | [
"Apache-2.0"
] | 3,240 | 2015-01-02T05:53:18.000Z | 2022-03-31T17:24:21.000Z | # The following comments couldn't be translated into the new config version:
# upload to database
#string timetype = "timestamp"
import FWCore.ParameterSet.Config as cms
process = cms.Process("Reader")
process.MessageLogger = cms.Service("MessageLogger",
cerr = cms.untracked.PSet(
enable = cms.unt... | 27.150943 | 79 | 0.663655 |
4a1ec5f10eb75103d7b7edd7934f0816a20f68f7 | 7,466 | py | Python | testscripts/RDKB/component/WIFIHAL/TS_WIFIHAL_5GHzGetRadioResetCount.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/WIFIHAL/TS_WIFIHAL_5GHzGetRadioResetCount.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/WIFIHAL/TS_WIFIHAL_5GHzGetRadioResetCount.py | cablelabs/tools-tdkb | 1fd5af0f6b23ce6614a4cfcbbaec4dde430fad69 | [
"Apache-2.0"
] | null | null | null | ##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2018 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use th... | 43.917647 | 157 | 0.677605 |
4a1ec695d079e0272ffabe87d15f4faea71172b6 | 4,081 | py | Python | test/functional/feature_includeconf.py | KaSt/emircoin | 5d05003dfde81eb6cacc8505f55b2e6b816e698a | [
"MIT"
] | null | null | null | test/functional/feature_includeconf.py | KaSt/emircoin | 5d05003dfde81eb6cacc8505f55b2e6b816e698a | [
"MIT"
] | null | null | null | test/functional/feature_includeconf.py | KaSt/emircoin | 5d05003dfde81eb6cacc8505f55b2e6b816e698a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 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.
"""Tests the includeconf argument
Verify that:
1. adding includeconf to the configuration file causes the inc... | 49.168675 | 224 | 0.694683 |
4a1ec69fb94ee08b0d819dd73ffadf19602b0602 | 6,193 | py | Python | python/level2_simple_inference/1_classification/googlenet_imagenet_multi_batch/src/classify.py | Ascend/samples | 5e060ddf8c502cf0e248ecbe1c8986e95351cbbd | [
"Apache-2.0"
] | 25 | 2020-11-20T09:01:35.000Z | 2022-03-29T10:35:38.000Z | python/level2_simple_inference/1_classification/googlenet_imagenet_multi_batch/src/classify.py | Ascend/samples | 5e060ddf8c502cf0e248ecbe1c8986e95351cbbd | [
"Apache-2.0"
] | 5 | 2021-02-28T20:49:37.000Z | 2022-03-04T21:50:27.000Z | python/level2_simple_inference/1_classification/googlenet_imagenet_multi_batch/src/classify.py | Ascend/samples | 5e060ddf8c502cf0e248ecbe1c8986e95351cbbd | [
"Apache-2.0"
] | 16 | 2020-12-06T07:26:13.000Z | 2022-03-01T07:51:55.000Z | import sys
import os
import numpy
import acl
path = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(path, ".."))
sys.path.append(os.path.join(path, "../../../../common/"))
sys.path.append(os.path.join(path, "../../../../common/acllite"))
from utils import check_ret
from constants import ACL_ME... | 38.70625 | 116 | 0.633619 |
4a1ec6deda221c0cf17ca59165c7f5e673002942 | 1,970 | py | Python | Code/DrumSynth/Samples/float2mozzi_uint8.py | ctag-fh-kiel/troll-8 | 18b872b5b0290dbb0e9f514edea392601a896346 | [
"CC-BY-4.0"
] | 11 | 2017-11-01T14:47:33.000Z | 2022-01-31T09:04:44.000Z | Code/SequenceRecorder/Samples/float2mozzi_uint8.py | ctag-fh-kiel/troll-8 | 18b872b5b0290dbb0e9f514edea392601a896346 | [
"CC-BY-4.0"
] | null | null | null | Code/SequenceRecorder/Samples/float2mozzi_uint8.py | ctag-fh-kiel/troll-8 | 18b872b5b0290dbb0e9f514edea392601a896346 | [
"CC-BY-4.0"
] | 3 | 2017-11-20T17:22:12.000Z | 2021-11-08T23:23:13.000Z | ## for converting 32 bit float raw files from Audacity, with values > 0, to 0-255 uint8 Mozzi table
import sys, array, os, textwrap, math
if len(sys.argv) != 5:
print 'Usage: float2mozzi.py <infile outfile tablename samplerate>'
sys.exit(1)
[infile, outfile, tablename, samplerate] = sys.argv[1:]
def float2mozzi_ui... | 37.884615 | 102 | 0.613198 |
4a1ec72bedc484d284da0b1a09f2e7cac2c23d37 | 190,063 | py | Python | src/sage/combinat/root_system/root_lattice_realizations.py | nikmihale/sage | e2dcdeeabb578c37bcf0361c0be3079315e9252c | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/root_system/root_lattice_realizations.py | nikmihale/sage | e2dcdeeabb578c37bcf0361c0be3079315e9252c | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/root_system/root_lattice_realizations.py | nikmihale/sage | e2dcdeeabb578c37bcf0361c0be3079315e9252c | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Root lattice realizations
"""
# ****************************************************************************
# Copyright (C) 2007-2013 Nicolas M. Thiery <nthiery at users.sf.net>
# 2012 Nicolas Borie <nicolas.borie at univ-mlv.fr>
#
# (with contributions... | 42.161269 | 189 | 0.501307 |
4a1ec84ec011ea3a0f463a55930a1810edfcf081 | 6,810 | py | Python | bindings/python/ensmallen_graph/datasets/string/phascolarctobacteriumspcag266.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/phascolarctobacteriumspcag266.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | bindings/python/ensmallen_graph/datasets/string/phascolarctobacteriumspcag266.py | caufieldjh/ensmallen_graph | 14e98b1cdbc73193a84a913d7d4f2b2b3eb2c43a | [
"MIT"
] | null | null | null | """
This file offers the methods to automatically retrieve the graph Phascolarctobacterium sp. CAG266.
The graph is automatically retrieved from the STRING repository.
Report
---------------------
At the time of rendering these methods (please see datetime below), the graph
had the following characteristics:
Date... | 35.65445 | 223 | 0.707489 |
4a1ec8d3630fb3ffe44f50119be80c6f2cbcd40c | 5,092 | py | Python | luoyangc/settings.example.py | luoyangC/luoyangc | a1e0d84e463d661fbd5e0333a4770d28048172ba | [
"MIT"
] | 1 | 2019-07-07T10:40:27.000Z | 2019-07-07T10:40:27.000Z | luoyangc/settings.example.py | luoyangC/luoyangc_django | a1e0d84e463d661fbd5e0333a4770d28048172ba | [
"MIT"
] | null | null | null | luoyangc/settings.example.py | luoyangC/luoyangc_django | a1e0d84e463d661fbd5e0333a4770d28048172ba | [
"MIT"
] | null | null | null | """
Django settings for luoyangc project.
Generated by 'django-admin startproject' using Django 2.0.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
#... | 24.363636 | 92 | 0.651218 |
4a1eca1cc1987907cfcf8c73840c1a932a9fcdba | 1,085 | py | Python | tests/test_lists.py | wxnacy/wpy | 575def7e0653e92658df1aaeea71e381ac5de533 | [
"MIT"
] | null | null | null | tests/test_lists.py | wxnacy/wpy | 575def7e0653e92658df1aaeea71e381ac5de533 | [
"MIT"
] | null | null | null | tests/test_lists.py | wxnacy/wpy | 575def7e0653e92658df1aaeea71e381ac5de533 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# Author: wxnacy@gmail.com
"""
随机方法
"""
from wpy.lists import sorted_plus
from wpy.lists import search
def test_sortd_plus():
"""排序增强"""
arr = [3, 5, 2, 4, 1]
sorted_plus(arr)
assert arr == [1, 2, 3, 4, 5]
arr = [{"age": 5, "id": 2}, {"age": 5, "id": ... | 24.659091 | 80 | 0.474654 |
4a1ecb514ab2b196e96b6f9b1e39884d869e2944 | 17,983 | py | Python | tests/test_config_reader.py | tarkatronic/sceptre | 520deb27253866100234fd0cb334de38c65c2a89 | [
"Apache-2.0"
] | null | null | null | tests/test_config_reader.py | tarkatronic/sceptre | 520deb27253866100234fd0cb334de38c65c2a89 | [
"Apache-2.0"
] | null | null | null | tests/test_config_reader.py | tarkatronic/sceptre | 520deb27253866100234fd0cb334de38c65c2a89 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from mock import patch, sentinel, MagicMock
import pytest
import yaml
import errno
from sceptre.context import SceptreContext
from sceptre.exceptions import DependencyDoesNotExistError
from sceptre.exceptions import VersionIncompatibleError
from sceptre.exceptions import ConfigFileNo... | 33.301852 | 106 | 0.537063 |
4a1ecb8bb07cc8a6078a29fc7d8ab735447434d9 | 5,059 | py | Python | services/dy-csv-table/server/input-retriever.py | GitHK/osparc-services-forked | a8ab08ff7c32de8f1abde015c1515e8cf61426c0 | [
"MIT"
] | 2 | 2019-08-16T16:54:48.000Z | 2020-06-10T05:50:35.000Z | services/dy-csv-table/server/input-retriever.py | GitHK/osparc-services-forked | a8ab08ff7c32de8f1abde015c1515e8cf61426c0 | [
"MIT"
] | 63 | 2019-07-04T07:03:42.000Z | 2022-02-09T18:03:55.000Z | services/dy-csv-table/server/input-retriever.py | GitHK/osparc-services-forked | a8ab08ff7c32de8f1abde015c1515e8cf61426c0 | [
"MIT"
] | 9 | 2019-04-17T07:11:10.000Z | 2020-06-03T13:42:58.000Z | import asyncio
import logging
import os
import shutil
import sys
import tarfile
import tempfile
import zipfile
from pathlib import Path
from simcore_sdk import node_ports
logger = logging.getLogger(__name__)
_INPUTS_FOLDER = Path(os.environ.get("CSVTABLE_INPUT_PATH"))
_OUTPUTS_FOLDER = Path(os.environ.get("CSVTABLE_... | 32.850649 | 83 | 0.630955 |
4a1ecbab425d827997a92cf348fa63f83a09443a | 1,337 | py | Python | src/utils/graph2.py | nikmedoed/pybinar | 1452fc123ac45d8b712ecd81010f0dc9f63c35fe | [
"Apache-2.0"
] | null | null | null | src/utils/graph2.py | nikmedoed/pybinar | 1452fc123ac45d8b712ecd81010f0dc9f63c35fe | [
"Apache-2.0"
] | null | null | null | src/utils/graph2.py | nikmedoed/pybinar | 1452fc123ac45d8b712ecd81010f0dc9f63c35fe | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Nikita Muromtsev (nikmedoed)
# Licensed under the Apache License, Version 2.0 (the «License»)
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.pyplot as plt
import numpy
import random
def randomColor():
return (random.uniform(0, 1), random.uniform(0, 1), random.uniform(0, 1))
def bulidX... | 29.711111 | 77 | 0.600598 |
4a1ecccf4dd44a86768ab6bdefbeb816ef41ffab | 1,679 | py | Python | examples/get_data_from_tags.py | Arequ/robin_stocks | 66f3d9c8dd38e39546a7ee8e4f6115529314a78c | [
"MIT"
] | 1 | 2021-02-04T13:30:53.000Z | 2021-02-04T13:30:53.000Z | examples/get_data_from_tags.py | Arequ/robin_stocks | 66f3d9c8dd38e39546a7ee8e4f6115529314a78c | [
"MIT"
] | null | null | null | examples/get_data_from_tags.py | Arequ/robin_stocks | 66f3d9c8dd38e39546a7ee8e4f6115529314a78c | [
"MIT"
] | 1 | 2022-03-17T18:45:03.000Z | 2022-03-17T18:45:03.000Z | import os
import pyotp
import robin_stocks as r
from dotenv import load_dotenv
'''
This is an example script that will get all stocks that are part
of the "technology" tag.
NOTE: View the two_factor_log_in.py script to see how automatic
two-factor loggin in works.
'''
# load environment variables.
load_dotenv()
# L... | 39.046512 | 125 | 0.740322 |
4a1ecd5e55e48f0818ea09c58a391c3b2c8376eb | 1,303 | py | Python | downloadGoogle.py | student-t/samples | 1eb47637389f5e38ab764b8a14597233b5071e0b | [
"Apache-2.0"
] | 13 | 2018-05-24T04:31:32.000Z | 2020-04-18T13:34:50.000Z | downloadGoogle.py | student-t/samples | 1eb47637389f5e38ab764b8a14597233b5071e0b | [
"Apache-2.0"
] | 1 | 2018-06-16T01:37:46.000Z | 2018-09-21T14:22:19.000Z | downloadGoogle.py | student-t/samples | 1eb47637389f5e38ab764b8a14597233b5071e0b | [
"Apache-2.0"
] | 5 | 2018-10-23T10:39:22.000Z | 2020-01-08T04:01:10.000Z | import requests
def download_file_from_google_drive(id, destination):
def get_confirm_token(response):
for key, value in response.cookies.items():
if key.startswith('download_warning'):
return value
return None
def save_response_content(response, destination):
... | 30.302326 | 81 | 0.634689 |
4a1ece3e764496ee102cd1771bccf1b70fb3ba69 | 3,754 | py | Python | python/generate_recipes.py | satyamedh/craftassist | d97cbc14bc25149d3ef41737231ab9f3cb7e392a | [
"MIT"
] | 669 | 2020-11-21T01:20:20.000Z | 2021-09-13T13:25:16.000Z | python/generate_recipes.py | satyamedh/craftassist | d97cbc14bc25149d3ef41737231ab9f3cb7e392a | [
"MIT"
] | 324 | 2020-12-07T18:20:34.000Z | 2021-09-14T17:17:18.000Z | python/generate_recipes.py | satyamedh/craftassist | d97cbc14bc25149d3ef41737231ab9f3cb7e392a | [
"MIT"
] | 89 | 2019-07-19T15:07:39.000Z | 2022-02-15T18:44:24.000Z | """
Copyright (c) Facebook, Inc. and its affiliates.
This file generates a craft_recipes.h file that is used by the C++ client.
"""
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("items_ini")
parser.add_argument("crafting_txt")
parser.add_argument(
"-o", "--out-file", required=True, help=... | 25.194631 | 89 | 0.550613 |
4a1ece9163f9aaa176a8d7724e2e0e55f114815d | 2,138 | py | Python | app/notifiers/discord_client.py | x1n5h3n/crypto-signal | 64011a43fcbb58affb2af2a2c62909c881d8140f | [
"MIT"
] | null | null | null | app/notifiers/discord_client.py | x1n5h3n/crypto-signal | 64011a43fcbb58affb2af2a2c62909c881d8140f | [
"MIT"
] | null | null | null | app/notifiers/discord_client.py | x1n5h3n/crypto-signal | 64011a43fcbb58affb2af2a2c62909c881d8140f | [
"MIT"
] | null | null | null | """Notify a user via discord
"""
import structlog
from discord_webhook import DiscordWebhook as Webhook
from notifiers.utils import NotifierUtils
__max_message_size__ = 2000
class DiscordNotifier(NotifierUtils):
"""Class for handling Discord notifications
"""
def __init__(self, webhook, username, avat... | 33.40625 | 90 | 0.61927 |
4a1ecee48dacdd3bdf656617f7cb9bfa304c9d97 | 3,930 | py | Python | engine/data_sources/minio/minio_table.py | delftdata/valentine-system | 07624fed956b89cf6c8be4d982b9b553624e1ade | [
"Apache-2.0"
] | 3 | 2021-08-28T16:06:50.000Z | 2022-03-25T22:33:34.000Z | engine/data_sources/minio/minio_table.py | delftdata/valentine-system | 07624fed956b89cf6c8be4d982b9b553624e1ade | [
"Apache-2.0"
] | 6 | 2021-06-08T09:49:48.000Z | 2021-08-10T17:06:57.000Z | engine/data_sources/minio/minio_table.py | delftdata/valentine-system | 07624fed956b89cf6c8be4d982b9b553624e1ade | [
"Apache-2.0"
] | null | null | null | from typing import List, Dict
import pandas as pd
from minio import Minio
from .minio_column import MinioColumn
from .minio_utils import get_columns_from_minio_csv_file, get_pandas_df_from_minio_csv_file, correct_file_ending
from ..base_column import BaseColumn
from ..base_table import BaseTable
from ...utils.utils im... | 38.910891 | 120 | 0.644275 |
4a1ecefe8bd68477e5ac23e4b68078d342ae40df | 1,188 | py | Python | profiles_api/serializers.py | ishelke8177/profiles-rest-api | 7a56946dec56e44ae552d91c6dcf49bd76d8c46a | [
"MIT"
] | 1 | 2019-10-22T02:57:13.000Z | 2019-10-22T02:57:13.000Z | profiles_api/serializers.py | ishelke8177/profiles-rest-api | 7a56946dec56e44ae552d91c6dcf49bd76d8c46a | [
"MIT"
] | 9 | 2019-12-04T23:10:53.000Z | 2022-02-10T12:55:20.000Z | profiles_api/serializers.py | ishelke8177/profiles-rest-api | 7a56946dec56e44ae552d91c6dcf49bd76d8c46a | [
"MIT"
] | null | null | null | from rest_framework import serializers
from profiles_api import models
class HelloSerializer(serializers.Serializer):
"""Serializes a name field for testing out APIView"""
name = serializers.CharField(max_length=10)
class UserProfileSerializer(serializers.ModelSerializer):
"""Serializes a user profile ... | 28.285714 | 68 | 0.625421 |
4a1ecf1f4f1ac073290607716b40c89cba5cb88e | 7,844 | py | Python | pyrobot/stock_frame.py | farleyrules/python-trading-robot | fefd96edd7b66ad6cf282f892f764c6d60028db7 | [
"MIT"
] | 1 | 2021-01-28T01:52:41.000Z | 2021-01-28T01:52:41.000Z | pyrobot/stock_frame.py | charleswwilson/python-trading-robot | cedc71b8bf5710cbfbdfa4256f1e745203ae2a9b | [
"MIT"
] | null | null | null | pyrobot/stock_frame.py | charleswwilson/python-trading-robot | cedc71b8bf5710cbfbdfa4256f1e745203ae2a9b | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from datetime import time
from datetime import datetime
from datetime import timezone
from typing import List
from typing import Dict
from typing import Union
from pandas.core.groupby import DataFrameGroupBy
from pandas.core.window import RollingGroupby
from pandas.core.window ... | 30.169231 | 119 | 0.583886 |
4a1ecf2bfba6f67af3ad8c3160717c05e6ecaa9f | 12,236 | py | Python | intersight/model/vnic_plogi_settings.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 5 | 2021-12-16T15:13:32.000Z | 2022-03-29T16:09:54.000Z | intersight/model/vnic_plogi_settings.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 4 | 2022-01-25T19:05:51.000Z | 2022-03-29T20:18:37.000Z | intersight/model/vnic_plogi_settings.py | CiscoDevNet/intersight-python | 04b721f37c3044646a91c185c7259edfb991557a | [
"Apache-2.0"
] | 2 | 2020-07-07T15:01:08.000Z | 2022-01-31T04:27:35.000Z | """
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 environments in more advan... | 47.610895 | 1,678 | 0.629618 |
4a1ecfc6e0db60190ed83d2bdfb53f87dd681b51 | 1,733 | py | Python | src/blight/actions/cc_for_cxx.py | trailofbits/blight | d4a148742db007ef3fcdbc5911fb013d67bbc9a1 | [
"Apache-2.0"
] | 51 | 2020-07-30T17:08:21.000Z | 2022-03-23T17:15:21.000Z | src/blight/actions/cc_for_cxx.py | trailofbits/blight | d4a148742db007ef3fcdbc5911fb013d67bbc9a1 | [
"Apache-2.0"
] | 31,392 | 2020-08-18T18:43:30.000Z | 2022-03-29T15:00:00.000Z | src/blight/actions/cc_for_cxx.py | trailofbits/canker | bb5808d143550b98c4e9a6d04ad644a1256bb6d1 | [
"Apache-2.0"
] | 4 | 2020-11-11T15:58:47.000Z | 2022-03-16T22:48:41.000Z | """
The `CCForCXX` action.
"""
from blight.action import CCAction
from blight.tool import CC
class CCForCXX(CCAction):
"""
An action for detecting whether the C compiler is being used as if it's
a C++ compiler, and correcting the build when so.
This action is used to fix a particular kind of misconf... | 31.509091 | 78 | 0.630698 |
4a1ed0139cf06c9521ae8d97f03b65ec3c9e51c8 | 15,040 | py | Python | simple_salesforce/metadata.py | ryanrmcintyre/simple-salesforce | a867721706b6370443bcafcd485e2703f5034d0e | [
"Apache-2.0"
] | null | null | null | simple_salesforce/metadata.py | ryanrmcintyre/simple-salesforce | a867721706b6370443bcafcd485e2703f5034d0e | [
"Apache-2.0"
] | null | null | null | simple_salesforce/metadata.py | ryanrmcintyre/simple-salesforce | a867721706b6370443bcafcd485e2703f5034d0e | [
"Apache-2.0"
] | null | null | null | """ Class to work with Salesforce Metadata API """
from base64 import b64encode, b64decode
from xml.etree import ElementTree as ET
from .util import call_salesforce
from .messages import DEPLOY_MSG,CHECK_DEPLOY_STATUS_MSG,\
CHECK_RETRIEVE_STATUS_MSG,RETRIEVE_MSG
class SfdcMetadataApi:
# pylint: disable=too-ma... | 39.78836 | 80 | 0.564694 |
4a1ed07b8c38150e71e5ec2ecc864980143d42d7 | 331,838 | py | Python | zerver/lib/actions.py | ossd-sp22/zulip | ceb9dd5854186832d55066fa52378aec6160433c | [
"Apache-2.0"
] | null | null | null | zerver/lib/actions.py | ossd-sp22/zulip | ceb9dd5854186832d55066fa52378aec6160433c | [
"Apache-2.0"
] | null | null | null | zerver/lib/actions.py | ossd-sp22/zulip | ceb9dd5854186832d55066fa52378aec6160433c | [
"Apache-2.0"
] | null | null | null | import datetime
import hashlib
import itertools
import logging
import os
import time
from collections import defaultdict
from dataclasses import asdict, dataclass, field
from operator import itemgetter
from typing import (
IO,
AbstractSet,
Any,
Callable,
Collection,
Dict,
Iterable,
List,... | 37.247503 | 153 | 0.679024 |
4a1ed0fa53bd8b89e682d3d4ffc5a6db7fb7e5a6 | 1,988 | py | Python | docs/manual/tuple_functor.py | Risto97/pygears | 19393e85101a16762cb3bbbf3010946ef69217f2 | [
"MIT"
] | 120 | 2018-04-23T08:29:04.000Z | 2022-03-30T14:41:52.000Z | docs/manual/tuple_functor.py | FZP1607152286/pygears | a0b21d445e1d5c89ad66751447b8253536b835ee | [
"MIT"
] | 12 | 2019-07-09T17:12:58.000Z | 2022-03-18T09:05:10.000Z | docs/manual/tuple_functor.py | FZP1607152286/pygears | a0b21d445e1d5c89ad66751447b8253536b835ee | [
"MIT"
] | 12 | 2019-05-10T19:42:08.000Z | 2022-03-28T18:26:44.000Z | from bdp import block, cap, path, text, fig, prev, p
part = block(
text_margin=p(0.5, 0.5),
alignment="nw",
dotted=True,
group='tight',
group_margin=[p(1, 3), p(1, 2)])
comp = block(size=p(6, 4), nodesep=(6, 2))
ps_comp = block(size=p(6, 6), nodesep=(2, 3))
bus_cap = cap(length=0.4, width=0.6, ins... | 31.555556 | 76 | 0.553823 |
4a1ed13d20f2790a0021afdbe5dc288419d537f1 | 3,930 | py | Python | qiime2/core/testing/pipeline.py | turanoo/qiime2 | 2af79e1a81b35b396b1a80e01617dba0f4e10446 | [
"BSD-3-Clause"
] | null | null | null | qiime2/core/testing/pipeline.py | turanoo/qiime2 | 2af79e1a81b35b396b1a80e01617dba0f4e10446 | [
"BSD-3-Clause"
] | null | null | null | qiime2/core/testing/pipeline.py | turanoo/qiime2 | 2af79e1a81b35b396b1a80e01617dba0f4e10446 | [
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2018, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 33.589744 | 78 | 0.670738 |
4a1ed1be74059784d57ab401b83feaa7d93eac15 | 5,384 | py | Python | gr-azure-software-radio/python/qa_blob_source.py | pomeroy3/azure-software-radio | a336e5670483e1085cfa1d754c6917c9e4cc6aec | [
"MIT"
] | null | null | null | gr-azure-software-radio/python/qa_blob_source.py | pomeroy3/azure-software-radio | a336e5670483e1085cfa1d754c6917c9e4cc6aec | [
"MIT"
] | null | null | null | gr-azure-software-radio/python/qa_blob_source.py | pomeroy3/azure-software-radio | a336e5670483e1085cfa1d754c6917c9e4cc6aec | [
"MIT"
] | null | null | null | # pylint: disable=missing-function-docstring, no-self-use, missing-class-docstring, no-member
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) Microsoft Corporation.
# Licensed under the GNU General Public License v3.0 or later.
# See License.txt in the project root for license information.
#
import uu... | 36.378378 | 98 | 0.607912 |
4a1ed36317272dc025f5e863f0a8168d4b466cdb | 1,532 | py | Python | misc/updatePepperVersion.py | korpling/pepper | 3bf595f1a8c95ff0c503a366c0ed612972f45dc9 | [
"Apache-2.0"
] | 18 | 2015-01-16T12:09:51.000Z | 2020-12-14T14:28:34.000Z | misc/updatePepperVersion.py | korpling/pepper | 3bf595f1a8c95ff0c503a366c0ed612972f45dc9 | [
"Apache-2.0"
] | 103 | 2015-01-05T12:42:04.000Z | 2022-01-29T13:22:05.000Z | misc/updatePepperVersion.py | korpling/pepper | 3bf595f1a8c95ff0c503a366c0ed612972f45dc9 | [
"Apache-2.0"
] | 6 | 2015-07-22T13:55:05.000Z | 2018-03-10T13:10:29.000Z | #!/usr/bin/python
# This script replaces the version in a pom.xml file of the parent project. It is used to update the pepper-parent project version.
import sys
import os
from xml.etree.ElementTree import dump
import xml.etree.ElementTree as ET
print "+--------------------------------------------------------+"
print ... | 36.47619 | 131 | 0.622715 |
4a1ed3d3054ebc6d9151b4b1247e3bdc40889e0f | 2,020 | py | Python | server/tasks/accounts.py | anon24816/discovery-artifact-manager | 79eac10fe87949996d36fcef2f3b7282c19bccad | [
"Apache-2.0"
] | 38 | 2017-07-20T17:54:08.000Z | 2022-02-20T02:16:31.000Z | server/tasks/accounts.py | anon24816/discovery-artifact-manager | 79eac10fe87949996d36fcef2f3b7282c19bccad | [
"Apache-2.0"
] | 183 | 2017-03-23T17:17:24.000Z | 2022-02-09T00:07:17.000Z | server/tasks/accounts.py | anon24816/discovery-artifact-manager | 79eac10fe87949996d36fcef2f3b7282c19bccad | [
"Apache-2.0"
] | 42 | 2017-03-23T19:20:20.000Z | 2022-02-20T02:17:09.000Z | # Copyright 2017, Google Inc. 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 law or ... | 29.275362 | 75 | 0.69802 |
4a1ed5445a192ea56824d9b1240931add21ec065 | 57,688 | py | Python | src/sage/modular/pollack_stevens/modsym.py | Blues1998/sage | b5c9cf037cbce672101725f269470135b9b2c5c4 | [
"BSL-1.0"
] | null | null | null | src/sage/modular/pollack_stevens/modsym.py | Blues1998/sage | b5c9cf037cbce672101725f269470135b9b2c5c4 | [
"BSL-1.0"
] | null | null | null | src/sage/modular/pollack_stevens/modsym.py | Blues1998/sage | b5c9cf037cbce672101725f269470135b9b2c5c4 | [
"BSL-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
r"""
Element class for Pollack-Stevens' Modular Symbols
This is the class of elements in the spaces of Pollack-Steven's modular symbols as described in [PS2011]_.
EXAMPLES::
sage: E = EllipticCurve('11a')
sage: phi = E.pollack_stevens_modular_symbol(); phi
Modular symbol of level ... | 36.465234 | 203 | 0.538154 |
4a1ed5881824dbd97fbb19b2f97ab5b32e9b20a7 | 6,238 | py | Python | sputnik/thirdparty/weibopy/streaming.py | errord/sputnik | b83c635a9a160dcd5809265c0d9d231ade33e5ea | [
"BSD-3-Clause"
] | null | null | null | sputnik/thirdparty/weibopy/streaming.py | errord/sputnik | b83c635a9a160dcd5809265c0d9d231ade33e5ea | [
"BSD-3-Clause"
] | null | null | null | sputnik/thirdparty/weibopy/streaming.py | errord/sputnik | b83c635a9a160dcd5809265c0d9d231ade33e5ea | [
"BSD-3-Clause"
] | 1 | 2018-03-04T04:48:44.000Z | 2018-03-04T04:48:44.000Z |
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
import httplib
from socket import timeout
from threading import Thread
from time import sleep
import urllib
from sputnik.thirdparty.weibopy.auth import BasicAuthHandler
from sputnik.thirdparty.weibopy.models import Status
from sputnik.thirdparty.weibo... | 31.664975 | 90 | 0.567329 |
4a1ed609c95b91cf8f7e7fa1bbc35613502849e6 | 4,789 | py | Python | PyPoll/pyPoll.py | ElizaDeBarros/Python-challenge | e1f1efa580c319a66f077cc663e9b8eccf6aa0aa | [
"RSA-MD"
] | null | null | null | PyPoll/pyPoll.py | ElizaDeBarros/Python-challenge | e1f1efa580c319a66f077cc663e9b8eccf6aa0aa | [
"RSA-MD"
] | null | null | null | PyPoll/pyPoll.py | ElizaDeBarros/Python-challenge | e1f1efa580c319a66f077cc663e9b8eccf6aa0aa | [
"RSA-MD"
] | null | null | null | import os
import csv
# Create a path
csv_path = os.path.join('Resources', 'election_data.csv')
total_votes = []
candidates_list = [] # list that will store the name of each candidate on the poll
candidates = []
votes = []
vote_count = {}
winner = "name"
listing_print = []
# Open file
with open(csv_path,'r', newline... | 52.626374 | 223 | 0.630403 |
4a1ed7274a2b3101e96db40b844ad5d030174c09 | 7,291 | py | Python | orange3/Orange/widgets/visualize/utils/tree/rules.py | rgschmitz1/BioDepot-workflow-builder | f74d904eeaf91ec52ec9b703d9fb38e9064e5a66 | [
"MIT"
] | 54 | 2017-01-08T17:21:49.000Z | 2021-11-02T08:46:07.000Z | orange3/Orange/widgets/visualize/utils/tree/rules.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 22 | 2017-03-28T06:03:14.000Z | 2021-07-28T05:43:55.000Z | orange3/Orange/widgets/visualize/utils/tree/rules.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 21 | 2017-01-26T21:12:09.000Z | 2022-01-31T21:34:59.000Z | r"""Rules for classification and regression trees.
Tree visualisations usually need to show the rules of nodes, these classes make
merging these rules simple (otherwise you have repeating rules e.g. `age < 3`
and `age < 2` which can be merged into `age < 2`.
Subclasses of the `Rule` class should provide a nice interf... | 30.004115 | 88 | 0.575641 |
4a1ed7917503793175292c0ccc035fc9b96d96e3 | 2,690 | py | Python | freyr_app/core/crawlers/custom_crawlers/novgorod_ru.py | blanchefort/freyrmonitoring | 5bf10ba86d3f88390f91106426dd964289f5aee6 | [
"MIT"
] | 2 | 2021-06-01T20:27:14.000Z | 2021-10-01T23:24:45.000Z | freyr_app/core/crawlers/custom_crawlers/novgorod_ru.py | blanchefort/freyrmonitoring | 5bf10ba86d3f88390f91106426dd964289f5aee6 | [
"MIT"
] | null | null | null | freyr_app/core/crawlers/custom_crawlers/novgorod_ru.py | blanchefort/freyrmonitoring | 5bf10ba86d3f88390f91106426dd964289f5aee6 | [
"MIT"
] | null | null | null | from ..freyr_crawler import FreyrCrawler
from dateutil import parser
import re
class NovgorodRuCrawler(FreyrCrawler):
def __init__(self):
super(NovgorodRuCrawler, self).__init__()
self.domain = 'novgorod.ru'
def latest_posts(self):
"""Получаем последные статьи
"""
i... | 48.035714 | 138 | 0.545353 |
4a1ed807723d13946d72c8ce37d8732f7917ca53 | 582 | py | Python | run_tests.py | xpdAcq/sidewinder-spec | 810639071083400888f4455f9e4fc90cd7116ef4 | [
"BSD-3-Clause"
] | null | null | null | run_tests.py | xpdAcq/sidewinder-spec | 810639071083400888f4455f9e4fc90cd7116ef4 | [
"BSD-3-Clause"
] | 13 | 2016-03-23T17:37:02.000Z | 2018-03-05T17:18:29.000Z | run_tests.py | xpdAcq/SHEDsidewinder | 810639071083400888f4455f9e4fc90cd7116ef4 | [
"BSD-3-Clause"
] | 1 | 2018-03-05T17:42:17.000Z | 2018-03-05T17:42:17.000Z | #!/usr/bin/env python
import sys
import pytest
import os
if __name__ == '__main__':
# show output results from every test function
args = ['-v']
# show the message output for skipped and expected failure tests
if len(sys.argv) > 1:
args.extend(sys.argv[1:])
print('pytest arguments: {}'.form... | 30.631579 | 68 | 0.666667 |
4a1ed8f969b78acd2834b6ff039b178800268804 | 9,959 | py | Python | tests/test_pipelines_feature_extraction.py | HimashiRathnayake/adapter-transformers | d9c06ecbf4aaa33756e848b8fc5b3ec65f5ff4f4 | [
"Apache-2.0"
] | 50,404 | 2019-09-26T09:55:55.000Z | 2022-03-31T23:07:49.000Z | tests/test_pipelines_feature_extraction.py | HimashiRathnayake/adapter-transformers | d9c06ecbf4aaa33756e848b8fc5b3ec65f5ff4f4 | [
"Apache-2.0"
] | 13,179 | 2019-09-26T10:10:57.000Z | 2022-03-31T23:17:08.000Z | tests/test_pipelines_feature_extraction.py | HimashiRathnayake/adapter-transformers | d9c06ecbf4aaa33756e848b8fc5b3ec65f5ff4f4 | [
"Apache-2.0"
] | 13,337 | 2019-09-26T10:49:38.000Z | 2022-03-31T23:06:17.000Z | # Copyright 2020 The HuggingFace 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 applicabl... | 100.59596 | 3,143 | 0.568631 |
4a1ed9206be6449325c190ad56e38228ed123840 | 2,835 | py | Python | scripts/unstoppable.py | shoorano/damn-vulnerable-defi-python | d5ba2126b2f8307fb888f93bb5068fed331d9aea | [
"MIT"
] | null | null | null | scripts/unstoppable.py | shoorano/damn-vulnerable-defi-python | d5ba2126b2f8307fb888f93bb5068fed331d9aea | [
"MIT"
] | null | null | null | scripts/unstoppable.py | shoorano/damn-vulnerable-defi-python | d5ba2126b2f8307fb888f93bb5068fed331d9aea | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from brownie import DamnValuableToken, UnstoppableLender, ReceiverUnstoppable, accounts
def main():
UnstoppableChecker().main()
class UnstoppableChecker():
"""class to run pass/fail check on challenge exploit: unstoppable"""
def __init__(self):
self.deployer = accounts[0]
... | 41.691176 | 144 | 0.675132 |
4a1ed99b479e4ea45809da463b3ae0321bf335aa | 3,644 | py | Python | pahelix/networks/involution_block.py | agave233/PaddleHelix | e5578f72c2a203a27d9df7da111f1ced826c1429 | [
"Apache-2.0"
] | 454 | 2020-11-21T01:02:45.000Z | 2022-03-29T12:53:40.000Z | pahelix/networks/involution_block.py | chupvl/PaddleHelix | 6e082f89b8090c3c360593d40a08bffc884165dd | [
"Apache-2.0"
] | 161 | 2020-12-12T06:35:54.000Z | 2022-03-27T11:31:13.000Z | pahelix/networks/involution_block.py | chupvl/PaddleHelix | 6e082f89b8090c3c360593d40a08bffc884165dd | [
"Apache-2.0"
] | 108 | 2020-12-07T09:01:10.000Z | 2022-03-31T14:42:29.000Z | # Copyright (c) 2021 PaddlePaddle 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 app... | 40.488889 | 121 | 0.64764 |
4a1eda95307aae492b4a8a43b2d6f395075f373e | 389 | py | Python | Single_Number.py | Ahmed--Mohsen/leetcode | ad8967a5d85ac54f53b3fcce04df1b4bdec5fd9e | [
"MIT"
] | 4 | 2016-01-03T20:57:21.000Z | 2017-07-06T23:22:40.000Z | Single_Number.py | Ahmed--Mohsen/leetcode | ad8967a5d85ac54f53b3fcce04df1b4bdec5fd9e | [
"MIT"
] | null | null | null | Single_Number.py | Ahmed--Mohsen/leetcode | ad8967a5d85ac54f53b3fcce04df1b4bdec5fd9e | [
"MIT"
] | null | null | null | """
Given an array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
"""
class Solution:
# @param A, a list of integer
# @return an integer
def singleNumber(self, A):
m... | 22.882353 | 106 | 0.717224 |
4a1edab5d0ce23ec38fe931a08e40df9e9c9be5b | 686 | py | Python | html_print.py | evandrocoan/SublimePackageDefault | ff47d47b59fc3ff2c1146168605ed85ace1f3b0e | [
"Unlicense",
"MIT"
] | 3 | 2018-12-08T21:44:45.000Z | 2019-03-01T03:22:32.000Z | html_print.py | evandrocoan/SublimePackageDefault | ff47d47b59fc3ff2c1146168605ed85ace1f3b0e | [
"Unlicense",
"MIT"
] | null | null | null | html_print.py | evandrocoan/SublimePackageDefault | ff47d47b59fc3ff2c1146168605ed85ace1f3b0e | [
"Unlicense",
"MIT"
] | null | null | null | import sublime_plugin
import tempfile
import pathlib
import webbrowser
class HtmlPrintCommand(sublime_plugin.TextCommand):
def run(self, edit):
view = self.view
html = view.export_to_html(enclosing_tags=True, font_size=False)
with tempfile.NamedTemporaryFile('w', suffix=".html", encoding... | 32.666667 | 99 | 0.658892 |
4a1edb56c3fb600dba63f2d5c2e4320763b1744f | 4,651 | py | Python | classtides.py | KanahS/CTA200 | 5d426a7e15296aae114f9cbd0770b333004fed07 | [
"MIT"
] | null | null | null | classtides.py | KanahS/CTA200 | 5d426a7e15296aae114f9cbd0770b333004fed07 | [
"MIT"
] | null | null | null | classtides.py | KanahS/CTA200 | 5d426a7e15296aae114f9cbd0770b333004fed07 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import rebound as rb
import reboundx as rx
tup_num = 7
e_b = np.linspace(0, 0.7, tup_num)
a_p = np.linspace(1, 5, tup_num)
Qex = []
for x in range(4,7):
Q = 10**x
Qex.append(Q)
Np = 5
tup_list = []
fo... | 28.187879 | 118 | 0.607396 |
4a1edbfd0a3fee44c30a321122252b23d97c0299 | 8,115 | py | Python | SipMask-mmdetection/configs/cascade_mask_rcnn_x101_32x4d_fpn_1x.py | anirudh-chakravarthy/SipMask | fc82b12c13abb091e271eb4f1b6734da18234443 | [
"MIT"
] | 1,141 | 2020-06-04T01:11:22.000Z | 2022-03-31T07:12:52.000Z | SipMask-mmdetection/configs/cascade_mask_rcnn_x101_32x4d_fpn_1x.py | anirudh-chakravarthy/SipMask | fc82b12c13abb091e271eb4f1b6734da18234443 | [
"MIT"
] | 98 | 2020-01-21T09:41:30.000Z | 2022-03-12T00:53:06.000Z | SipMask-mmdetection/configs/cascade_mask_rcnn_x101_32x4d_fpn_1x.py | anirudh-chakravarthy/SipMask | fc82b12c13abb091e271eb4f1b6734da18234443 | [
"MIT"
] | 233 | 2020-01-18T03:46:27.000Z | 2022-03-19T03:17:47.000Z | # model settings
model = dict(
type='CascadeRCNN',
num_stages=3,
pretrained='open-mmlab://resnext101_32x4d',
backbone=dict(
type='ResNeXt',
depth=101,
groups=32,
base_width=4,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cf... | 31.575875 | 78 | 0.550955 |
4a1edf425497f59254e90884a5f40d72078b973e | 555 | py | Python | setup.py | xsuite/xpart | c67d19df9d5b9b2d41fbb9e4b9562686367c175d | [
"MIT"
] | 1 | 2021-09-07T14:34:10.000Z | 2021-09-07T14:34:10.000Z | setup.py | xsuite/xpart | c67d19df9d5b9b2d41fbb9e4b9562686367c175d | [
"MIT"
] | null | null | null | setup.py | xsuite/xpart | c67d19df9d5b9b2d41fbb9e4b9562686367c175d | [
"MIT"
] | 5 | 2021-11-04T08:23:43.000Z | 2022-03-16T10:34:23.000Z | from setuptools import setup, find_packages, Extension
#######################################
# Prepare list of compiled extensions #
#######################################
extensions = []
#########
# Setup #
#########
setup(
name='xpart',
version='0.5.0',
description='Generation of Particle Ensemble... | 19.821429 | 54 | 0.517117 |
4a1ee027df94b1397a23d16e147c09ccfe571411 | 690 | py | Python | tests/TestUrlParser.py | lukebeer/GambolPutty | d642433bb2a6a54be6b4cfaa12a507994af8445a | [
"Apache-2.0"
] | null | null | null | tests/TestUrlParser.py | lukebeer/GambolPutty | d642433bb2a6a54be6b4cfaa12a507994af8445a | [
"Apache-2.0"
] | null | null | null | tests/TestUrlParser.py | lukebeer/GambolPutty | d642433bb2a6a54be6b4cfaa12a507994af8445a | [
"Apache-2.0"
] | 1 | 2019-12-03T11:36:32.000Z | 2019-12-03T11:36:32.000Z | import extendSysPath
import ModuleBaseTestCase
import unittest
import mock
import Utils
import UrlParser
class TestUrlParser(ModuleBaseTestCase.ModuleBaseTestCase):
def setUp(self):
super(TestUrlParser, self).setUp(UrlParser.UrlParser(gp=mock.Mock()))
def testHandleEvent(self):
self.test_obje... | 32.857143 | 108 | 0.711594 |
4a1ee077cbb2addc82c30811055d274961b81045 | 1,429 | py | Python | test/code/keras/test_keras_fast_net_regressor.py | IooHooI/NEURAL_NETWORKS | 1fff41658f01ebd61dc26745ad377d86f4716d30 | [
"Unlicense"
] | null | null | null | test/code/keras/test_keras_fast_net_regressor.py | IooHooI/NEURAL_NETWORKS | 1fff41658f01ebd61dc26745ad377d86f4716d30 | [
"Unlicense"
] | null | null | null | test/code/keras/test_keras_fast_net_regressor.py | IooHooI/NEURAL_NETWORKS | 1fff41658f01ebd61dc26745ad377d86f4716d30 | [
"Unlicense"
] | null | null | null | import logging
import unittest
from sklearn.model_selection import train_test_split
from sklearn.metrics import r2_score
from source.code.keras.kerasfastnetregressor import KerasFastTextRegressor
from source.code.preprocessing.dataloader import read_and_clean_feedback_data
from source.code.preprocessing.utils import c... | 30.404255 | 94 | 0.776767 |
4a1ee0ae14c74cd343432cbe8ac257fe79680b71 | 193 | py | Python | discord-voice-recorder.py | DMcP89/discord-voice-recorder | 99878e2525b1d54638733e9d8abcd85b24bc69bb | [
"MIT"
] | null | null | null | discord-voice-recorder.py | DMcP89/discord-voice-recorder | 99878e2525b1d54638733e9d8abcd85b24bc69bb | [
"MIT"
] | null | null | null | discord-voice-recorder.py | DMcP89/discord-voice-recorder | 99878e2525b1d54638733e9d8abcd85b24bc69bb | [
"MIT"
] | null | null | null | import discord
import asyncio
import MyClient
from threading import Thread
print("Discord.py Voice Recorder POC")
DISCORD_TOKEN = ""
client = MyClient.MyClient()
client.run(DISCORD_TOKEN)
| 13.785714 | 38 | 0.787565 |
4a1ee27f89f67418d65655412b2fa18cce0f6120 | 547 | py | Python | cli/src/accretion_cli/_commands/raw/add/__init__.py | mattsb42/accretion | 7cce5f4ed6d290bd9314b116be91417ded6b0f64 | [
"Apache-2.0"
] | 1 | 2019-10-19T11:18:17.000Z | 2019-10-19T11:18:17.000Z | cli/src/accretion_cli/_commands/raw/add/__init__.py | mattsb42/accretion | 7cce5f4ed6d290bd9314b116be91417ded6b0f64 | [
"Apache-2.0"
] | 13 | 2019-06-10T07:03:26.000Z | 2019-11-06T01:09:38.000Z | cli/src/accretion_cli/_commands/raw/add/__init__.py | mattsb42/accretion | 7cce5f4ed6d290bd9314b116be91417ded6b0f64 | [
"Apache-2.0"
] | null | null | null | """Commands for ``accretion raw add``."""
import click
from .artifact_builder import add_artifact_builder
from .builders import add_all_builders
from .layer_builder import add_layer_builder
from .regions import add_more_regions
__all__ = ("add_to_deployment",)
@click.group("add")
def add_to_deployment():
"""Add... | 26.047619 | 51 | 0.822669 |
4a1ee38510414d2d0023ecf93657508045ae6bed | 9,420 | py | Python | docs/source/conf.py | caerusrisk/stomp.py | 090832e088693bfb980e838061cd9a23774c5ac3 | [
"Apache-2.0"
] | 408 | 2015-01-06T06:09:45.000Z | 2022-03-09T08:14:59.000Z | docs/source/conf.py | caerusrisk/stomp.py | 090832e088693bfb980e838061cd9a23774c5ac3 | [
"Apache-2.0"
] | 231 | 2015-01-13T08:23:34.000Z | 2022-03-29T02:29:34.000Z | docs/source/conf.py | caerusrisk/stomp.py | 090832e088693bfb980e838061cd9a23774c5ac3 | [
"Apache-2.0"
] | 171 | 2015-02-05T23:40:35.000Z | 2022-01-25T14:17:18.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Stomp documentation build configuration file, created by
# sphinx-quickstart on Sun Sep 20 16:35:36 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# auto... | 31.717172 | 79 | 0.713694 |
4a1ee39dc05c44cef1609fbe38dd4e548af7dedb | 438 | py | Python | ex054.py | gabrielsailvasantos/exercicios-python-CemV | 19dae7472113a7b9f603467c59dc8279dad8f7ad | [
"MIT"
] | null | null | null | ex054.py | gabrielsailvasantos/exercicios-python-CemV | 19dae7472113a7b9f603467c59dc8279dad8f7ad | [
"MIT"
] | null | null | null | ex054.py | gabrielsailvasantos/exercicios-python-CemV | 19dae7472113a7b9f603467c59dc8279dad8f7ad | [
"MIT"
] | null | null | null | from datetime import date
ano = date.today()
maior = 0
menor = 0
cont = 0
anos = 0
for c in range(1, 8):
cont += 1
print('Em que ano a {}'.format(cont), end='')
anos = int(input(' pessoa nasceu? '))
res = ano.year - anos
if res >= 21:
maior += 1
else:
menor += 1
print('Ao todo ti... | 24.333333 | 67 | 0.600457 |
4a1ee4ba16c6289bda5abe8108195f3d13416f03 | 111 | py | Python | testing.py | antiplasti/plastic-detection-model | e5da6e84a07cb709838fb065536da883a6a4d6c0 | [
"MIT"
] | 63 | 2019-04-04T03:42:43.000Z | 2022-03-29T19:52:56.000Z | testing.py | prshnt19/Waste-Detection | 6993efb7ccf55fc84e844c26e3fa59d7c69f8fb5 | [
"MIT"
] | 3 | 2020-01-30T00:16:42.000Z | 2021-12-22T18:30:59.000Z | testing.py | prshnt19/Waste-Detection | 6993efb7ccf55fc84e844c26e3fa59d7c69f8fb5 | [
"MIT"
] | 33 | 2019-02-16T02:42:15.000Z | 2022-03-22T20:14:07.000Z | import classify
import base64
imagePath = "testing.png"
result = classify.analyse(imagePath)
print(result)
| 11.1 | 36 | 0.774775 |
4a1ee66ad51ca4176d30b95d07a9715034be343e | 424 | py | Python | home/migrations/0011_auto_20201130_1258.py | anselmobd/co2 | 69750e8a2e3f6fdebaccf07f48529b4c2920529d | [
"MIT"
] | null | null | null | home/migrations/0011_auto_20201130_1258.py | anselmobd/co2 | 69750e8a2e3f6fdebaccf07f48529b4c2920529d | [
"MIT"
] | null | null | null | home/migrations/0011_auto_20201130_1258.py | anselmobd/co2 | 69750e8a2e3f6fdebaccf07f48529b4c2920529d | [
"MIT"
] | null | null | null | # Generated by Django 3.1.3 on 2020-11-30 12:58
from django.db import migrations
import wagtail.core.fields
class Migration(migrations.Migration):
dependencies = [
('home', '0010_linkspage'),
]
operations = [
migrations.AlterField(
model_name='principalpage',
nam... | 21.2 | 75 | 0.617925 |
4a1ee6cfd2e5f86095f665403651f6903879dcbc | 79,079 | py | Python | zerver/tests/test_decorators.py | DD2480-group7-2020/zulip | 9a1e18bcf383c38c35da168563a7345768c6d784 | [
"Apache-2.0"
] | 1 | 2020-02-28T11:26:19.000Z | 2020-02-28T11:26:19.000Z | zerver/tests/test_decorators.py | DD2480-group7-2020/zulip | 9a1e18bcf383c38c35da168563a7345768c6d784 | [
"Apache-2.0"
] | null | null | null | zerver/tests/test_decorators.py | DD2480-group7-2020/zulip | 9a1e18bcf383c38c35da168563a7345768c6d784 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import base64
import mock
import re
import os
from collections import defaultdict
from typing import Any, Dict, Iterable, List, Optional, Tuple
from django.test import TestCase
from django.http import HttpResponse, HttpRequest
from django.conf import settings
from zerver.forms import OurAuthe... | 41.122725 | 152 | 0.619153 |
4a1ee71cdb186ee6e94dcfad6891570a67644e1e | 1,708 | py | Python | config/wsgi.py | larrykamau/torrent_crawler | 17178f7a72e0fc4d8dc6752fcb76b0094dba40da | [
"MIT"
] | null | null | null | config/wsgi.py | larrykamau/torrent_crawler | 17178f7a72e0fc4d8dc6752fcb76b0094dba40da | [
"MIT"
] | null | null | null | config/wsgi.py | larrykamau/torrent_crawler | 17178f7a72e0fc4d8dc6752fcb76b0094dba40da | [
"MIT"
] | null | null | null | """
WSGI config for Torrent Scraper project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLIC... | 42.7 | 79 | 0.79918 |
4a1ee7a9e5dad195a8d4910cca1be8bc28a09cf7 | 2,884 | py | Python | doc/learning_examples/multi_target/lasso_example_multi_random_gbm.py | TianXie1999/selective-inference | ca02bbd84af5f5597944c75bde8337db9c69066a | [
"BSD-3-Clause"
] | 51 | 2016-03-31T16:34:15.000Z | 2022-01-16T04:32:58.000Z | doc/learning_examples/multi_target/lasso_example_multi_random_gbm.py | TianXie1999/selective-inference | ca02bbd84af5f5597944c75bde8337db9c69066a | [
"BSD-3-Clause"
] | 11 | 2016-04-07T00:19:58.000Z | 2021-10-03T18:31:14.000Z | doc/learning_examples/multi_target/lasso_example_multi_random_gbm.py | TianXie1999/selective-inference | ca02bbd84af5f5597944c75bde8337db9c69066a | [
"BSD-3-Clause"
] | 14 | 2015-10-28T17:29:05.000Z | 2021-08-16T21:04:30.000Z | import functools
import numpy as np
from scipy.stats import norm as ndist
import regreg.api as rr
from selection.tests.instance import gaussian_instance
from selection.learning.utils import full_model_inference, pivot_plot
from selection.learning.core import normal_sampler, gbm_fit
def simulate(n=200, p=100, s=10,... | 31.010753 | 78 | 0.507975 |
4a1ee807204e5ab396ded15710d7ba389e3a72b5 | 2,546 | py | Python | fuzzer/image_queue.py | xiaoningdu/deepstellar | 2624476c5d0b01b7af9373dff4fd6a3f56e495b4 | [
"Apache-2.0"
] | 10 | 2020-08-07T01:15:14.000Z | 2022-01-10T15:49:14.000Z | fuzzer/image_queue.py | xiaoningdu/deepstellar | 2624476c5d0b01b7af9373dff4fd6a3f56e495b4 | [
"Apache-2.0"
] | 1 | 2020-11-01T11:41:00.000Z | 2020-11-01T11:41:00.000Z | fuzzer/image_queue.py | xiaoningdu/deepstellar | 2624476c5d0b01b7af9373dff4fd6a3f56e495b4 | [
"Apache-2.0"
] | 4 | 2020-08-06T06:27:31.000Z | 2022-01-10T15:49:21.000Z | import time
import numpy as np
from fuzzer.lib.queue import FuzzQueue
from fuzzer.lib.queue import Seed
class ImageInputCorpus(FuzzQueue):
"""Class that holds inputs and associated coverage."""
def __init__(self, outdir, israndom, sample_function, cov_num, criteria):
"""Init the class.
Args:... | 36.898551 | 94 | 0.577769 |
4a1ee814225cfcc7d5620eac720d977fdb0ec054 | 751 | py | Python | pymetamap/__init__.py | nwams/Medline-Pubmed-Search-Engine | 4a21ffe3e972cd0675b69ff8cb797aad4c17f088 | [
"Apache-2.0"
] | 15 | 2016-01-30T04:18:21.000Z | 2021-05-20T21:25:39.000Z | build/lib/pymetamap/__init__.py | nwams/Medline-Pubmed-Search-Engine | 4a21ffe3e972cd0675b69ff8cb797aad4c17f088 | [
"Apache-2.0"
] | null | null | null | build/lib/pymetamap/__init__.py | nwams/Medline-Pubmed-Search-Engine | 4a21ffe3e972cd0675b69ff8cb797aad4c17f088 | [
"Apache-2.0"
] | 2 | 2015-11-13T03:28:40.000Z | 2016-05-03T22:38:37.000Z | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | 34.136364 | 74 | 0.76964 |
4a1ee8ee0ec9a8eee6d9a8410f47c37cebf757e7 | 4,469 | py | Python | day52021.py | GeirOwe/adventOfCode | fee1420cb8ecce8b7aaf9d48472364be191ca2a2 | [
"MIT"
] | 1 | 2021-12-20T11:10:59.000Z | 2021-12-20T11:10:59.000Z | day52021.py | GeirOwe/adventOfCode | fee1420cb8ecce8b7aaf9d48472364be191ca2a2 | [
"MIT"
] | null | null | null | day52021.py | GeirOwe/adventOfCode | fee1420cb8ecce8b7aaf9d48472364be191ca2a2 | [
"MIT"
] | 1 | 2021-12-02T14:40:12.000Z | 2021-12-02T14:40:12.000Z | # Day5 - 2021 Advent of code
# source: https://adventofcode.com/2021/day/5
import os
import numpy as np
def clear_console():
os.system('clear')
print('< .... AoC 2021 Day 4, part 1 .... >')
print()
return
def add_signal_to_row(fra, til, row, signalGrid):
if fra < til:
fromX ... | 31.695035 | 101 | 0.578429 |
4a1ee953889988ddd4a0a42709188b18693cbf15 | 2,289 | py | Python | tests/test_Terraform Linting CLI.py | schubergphilis/terraformlintingcli | dae3356ec092c9ff4e9c3da46fa896f694dced4f | [
"MIT"
] | 1 | 2020-02-17T09:13:31.000Z | 2020-02-17T09:13:31.000Z | tests/test_Terraform Linting CLI.py | schubergphilis/terraformlintingcli | dae3356ec092c9ff4e9c3da46fa896f694dced4f | [
"MIT"
] | null | null | null | tests/test_Terraform Linting CLI.py | schubergphilis/terraformlintingcli | dae3356ec092c9ff4e9c3da46fa896f694dced4f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# File: test_terraformlintingcli.py
#
# Copyright 2018 Costas Tyfoxylos
#
# 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, ... | 34.681818 | 118 | 0.711228 |
4a1ee96422b0e94eebbf5bb5fda3c54fc394e6ba | 2,623 | py | Python | irspack/user_cold_start/evaluator.py | kiminh/irspack | 45e448bb741b5f08b1b93d47ca293b981dd5f8af | [
"MIT"
] | 1 | 2021-01-11T18:34:30.000Z | 2021-01-11T18:34:30.000Z | irspack/user_cold_start/evaluator.py | kiminh/irspack | 45e448bb741b5f08b1b93d47ca293b981dd5f8af | [
"MIT"
] | null | null | null | irspack/user_cold_start/evaluator.py | kiminh/irspack | 45e448bb741b5f08b1b93d47ca293b981dd5f8af | [
"MIT"
] | null | null | null | from collections import OrderedDict
from typing import Any, Dict, List
import numpy as np
from irspack.user_cold_start.recommenders import base
from ..evaluator import METRIC_NAMES, EvaluatorCore, Metrics
from ..recommenders.base import InteractionMatrix
class UserColdStartEvaluator:
def __init__(
self... | 35.931507 | 84 | 0.62562 |
4a1eeaced06edca8043705752c41c776414ac77d | 1,417 | py | Python | app/recipe/serializers.py | baguskna/recipe-app-api | ba2a0f036a1688ad26fa58fe5dea3c198559d1a9 | [
"MIT"
] | null | null | null | app/recipe/serializers.py | baguskna/recipe-app-api | ba2a0f036a1688ad26fa58fe5dea3c198559d1a9 | [
"MIT"
] | null | null | null | app/recipe/serializers.py | baguskna/recipe-app-api | ba2a0f036a1688ad26fa58fe5dea3c198559d1a9 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from core.models import Tag, Ingredient, Recipe
class TagSerializer(serializers.ModelSerializer):
"""Serializer for tag objects"""
class Meta:
model = Tag
fields = ('id', 'name')
read_only_fields = ('id',)
class IngredientSerializer(serializer... | 26.735849 | 88 | 0.659139 |
4a1eeb4e9f6088b73220341a8c3fe011772c93c8 | 20,927 | py | Python | pytorch_lightning/core/hooks.py | thepooons/pytorch-lightning | a053d758d03558d2aa5a328b2f6befbc133a0ebc | [
"Apache-2.0"
] | 1 | 2021-01-24T07:30:14.000Z | 2021-01-24T07:30:14.000Z | pytorch_lightning/core/hooks.py | thepooons/pytorch-lightning | a053d758d03558d2aa5a328b2f6befbc133a0ebc | [
"Apache-2.0"
] | null | null | null | pytorch_lightning/core/hooks.py | thepooons/pytorch-lightning | a053d758d03558d2aa5a328b2f6befbc133a0ebc | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 34.8203 | 110 | 0.586228 |
4a1eeb5bfbeb7a04f8e22f871c34cff0a7fc00cf | 1,524 | py | Python | var/spack/repos/builtin/packages/hto4l/package.py | Loewe2/spack | 58192fb5b41a2ea3211d00de717d026738ede4eb | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/hto4l/package.py | Loewe2/spack | 58192fb5b41a2ea3211d00de717d026738ede4eb | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 5 | 2021-11-29T17:23:20.000Z | 2022-03-02T17:29:12.000Z | var/spack/repos/builtin/packages/hto4l/package.py | Loewe2/spack | 58192fb5b41a2ea3211d00de717d026738ede4eb | [
"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 Hto4l(MakefilePackage):
"""Hto4l is an event generator for the SM Higgs decay into 4 charg... | 40.105263 | 94 | 0.60958 |
4a1eebda665b2e5e3c3ed71d441dc44004b650e2 | 2,309 | py | Python | timesketch/lib/graphs/win_services.py | deralexxx/timesketch | 61b83da377b589438a00ab4ca40aaf048e6907c7 | [
"Apache-2.0"
] | null | null | null | timesketch/lib/graphs/win_services.py | deralexxx/timesketch | 61b83da377b589438a00ab4ca40aaf048e6907c7 | [
"Apache-2.0"
] | null | null | null | timesketch/lib/graphs/win_services.py | deralexxx/timesketch | 61b83da377b589438a00ab4ca40aaf048e6907c7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google Inc. 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 law or a... | 34.984848 | 83 | 0.650931 |
4a1eecefb4c9f4b547a623c3113e15dc442c4532 | 186 | py | Python | Dataset/Leetcode/valid/14/242.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/valid/14/242.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | Dataset/Leetcode/valid/14/242.py | kkcookies99/UAST | fff81885aa07901786141a71e5600a08d7cb4868 | [
"MIT"
] | null | null | null | class Solution(object):
def XXX(self, strs):
"""
:type strs: List[str]
:rtype: str
"""
import os
return os.path.commonprefix(strs)
| 16.909091 | 41 | 0.494624 |
4a1eee580df8e84b7d3020555015019db6640260 | 119 | py | Python | tests/__init__.py | ZAurele/alpha-py | b6330f1e714d07a2010ebe500d5ccdf4cc637998 | [
"MIT"
] | null | null | null | tests/__init__.py | ZAurele/alpha-py | b6330f1e714d07a2010ebe500d5ccdf4cc637998 | [
"MIT"
] | null | null | null | tests/__init__.py | ZAurele/alpha-py | b6330f1e714d07a2010ebe500d5ccdf4cc637998 | [
"MIT"
] | null | null | null | from .api import *
from .basic_test import *
from .configurations import *
from .database import *
from .utils import * | 23.8 | 29 | 0.756303 |
4a1eeea34661692ea4556eebb7cbec94fb5d925a | 14,607 | py | Python | retirement/tests/tests_viewset_WaitQueue.py | Jerome-Celle/Blitz-API | 7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0 | [
"MIT"
] | null | null | null | retirement/tests/tests_viewset_WaitQueue.py | Jerome-Celle/Blitz-API | 7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0 | [
"MIT"
] | null | null | null | retirement/tests/tests_viewset_WaitQueue.py | Jerome-Celle/Blitz-API | 7dfb7b837ed47b11afcfaa5f5aee831c1aa4e5e0 | [
"MIT"
] | null | null | null | import json
from datetime import datetime, timedelta
import pytz
from django.conf import settings
from django.contrib.auth import get_user_model
from django.urls import reverse
from django.utils import timezone
from rest_framework import status
from rest_framework.test import APIClient, APITestCase
from blitz_api.fac... | 29.871166 | 79 | 0.556377 |
4a1eeefbd32ca67fc56a7e72e23970f047feba9e | 3,391 | py | Python | corehq/apps/case_importer/tracking/case_upload_tracker.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 1 | 2020-07-14T13:00:23.000Z | 2020-07-14T13:00:23.000Z | corehq/apps/case_importer/tracking/case_upload_tracker.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | 94 | 2020-12-11T06:57:31.000Z | 2022-03-15T10:24:06.000Z | corehq/apps/case_importer/tracking/case_upload_tracker.py | dimagilg/commcare-hq | ea1786238eae556bb7f1cbd8d2460171af1b619c | [
"BSD-3-Clause"
] | null | null | null | import time
from django.db import transaction
from memoized import memoized
from corehq.apps.case_importer.exceptions import ImporterRefError
from corehq.apps.case_importer.tracking.exceptions import TimedOutWaitingForCaseUploadRecord
from corehq.apps.case_importer.tracking.filestorage import (
persistent_file_s... | 32.92233 | 102 | 0.697139 |
4a1eef2a8312b44cf06346fe3a9ef84088e33669 | 1,802 | py | Python | Chapter07/visualize_faces.py | lebull/Neural-Network-Projects-with-Python | 8242bb18f8ae272491b58947938234ac9b80bb36 | [
"MIT"
] | 269 | 2018-09-11T17:44:59.000Z | 2022-03-26T12:12:33.000Z | Chapter07/visualize_faces.py | blueye4k/Neural-Network-Projects-with-Python | 4f521c399389db412d900a1337f9031b4874295b | [
"MIT"
] | 12 | 2019-07-12T20:24:56.000Z | 2021-06-28T20:39:10.000Z | Chapter07/visualize_faces.py | blueye4k/Neural-Network-Projects-with-Python | 4f521c399389db412d900a1337f9031b4874295b | [
"MIT"
] | 156 | 2018-09-16T05:09:50.000Z | 2022-03-26T07:35:22.000Z | import matplotlib
matplotlib.use("TkAgg")
from keras.preprocessing.image import load_img, img_to_array
import os
import numpy as np
from matplotlib import pyplot as plt
faces_dir = 'att_faces/'
X_train, Y_train = [], []
X_test, Y_test = [], []
subfolders = sorted([file.path for file in os.scandir(faces_dir) if file.... | 31.068966 | 84 | 0.657603 |
4a1eef84a6e647688df346244cd155ea73a4008b | 714 | py | Python | check_anagram.py | Praggya17/HacktoberFestContribute | 098cb1012f1f2ed6ca6b3544a7b962b6c49e2643 | [
"MIT"
] | 98 | 2018-10-09T15:42:41.000Z | 2021-10-04T15:25:44.000Z | check_anagram.py | Praggya17/HacktoberFestContribute | 098cb1012f1f2ed6ca6b3544a7b962b6c49e2643 | [
"MIT"
] | 141 | 2018-10-06T16:55:20.000Z | 2021-10-31T18:25:35.000Z | check_anagram.py | Praggya17/HacktoberFestContribute | 098cb1012f1f2ed6ca6b3544a7b962b6c49e2643 | [
"MIT"
] | 885 | 2018-10-06T17:14:44.000Z | 2022-01-29T03:16:21.000Z |
__author__ = "innovative_coder"
from collections import Counter
def check_if_anagram(word1, word2):
counter = Counter()
for c in word1:
counter[c] += 1
for c in word2:
counter[c] -= 1
for values in counter.values():
if values != 0:
return False
... | 18.789474 | 51 | 0.560224 |
4a1ef0d13a2f8719e5fbeb0c9728b2d3dfa366e5 | 3,085 | py | Python | Chapter01/Exercise1.01/bookr/bookr/settings.py | PacktPublishing/Web-Development-Projects-with-Django | 531bc4d58d614888cc81b7fd6f8ec859f5a65217 | [
"MIT"
] | 97 | 2021-03-01T12:54:30.000Z | 2022-03-28T02:57:26.000Z | Chapter01/Exercise1.01/bookr/bookr/settings.py | PacktPublishing/Web-Development-Projects-with-Django | 531bc4d58d614888cc81b7fd6f8ec859f5a65217 | [
"MIT"
] | 81 | 2020-08-27T04:56:04.000Z | 2022-03-12T00:53:40.000Z | Chapter01/Exercise1.01/bookr/bookr/settings.py | PacktPublishing/Web-Development-Projects-with-Django | 531bc4d58d614888cc81b7fd6f8ec859f5a65217 | [
"MIT"
] | 163 | 2020-12-25T14:38:38.000Z | 2022-03-30T10:31:40.000Z | """
Django settings for bookr project.
Generated by 'django-admin startproject' using Django 3.0b1.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
import os
# B... | 25.495868 | 91 | 0.698541 |
4a1ef1f5126bcfac00e415420880f4a8b4ffb0fd | 2,531 | py | Python | model-optimizer/mo/front/caffe/extractors/pooling.py | mypopydev/dldt | 8cd639116b261adbbc8db860c09807c3be2cc2ca | [
"Apache-2.0"
] | 3 | 2019-07-08T09:03:03.000Z | 2020-09-09T10:34:17.000Z | model-optimizer/mo/front/caffe/extractors/pooling.py | openvino-pushbot/dldt | e607ee70212797cf9ca51dac5b7ac79f66a1c73f | [
"Apache-2.0"
] | 3 | 2020-11-13T18:59:18.000Z | 2022-02-10T02:14:53.000Z | model-optimizer/mo/front/caffe/extractors/pooling.py | openvino-pushbot/dldt | e607ee70212797cf9ca51dac5b7ac79f66a1c73f | [
"Apache-2.0"
] | 1 | 2018-12-14T07:56:02.000Z | 2018-12-14T07:56:02.000Z | """
Copyright (c) 2018 Intel 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 wri... | 35.152778 | 110 | 0.672066 |
4a1ef34b246d0b2d5000e435846d79fb666bfdcd | 26,130 | py | Python | filmatyk/filters.py | Noiredd/Filmatyk | a09637d3d2c572bebf5e6ae004c16917c247e9fa | [
"MIT"
] | 2 | 2020-10-09T13:35:57.000Z | 2021-08-22T15:17:25.000Z | filmatyk/filters.py | Noiredd/Filmatyk | a09637d3d2c572bebf5e6ae004c16917c247e9fa | [
"MIT"
] | 34 | 2019-01-31T21:31:31.000Z | 2020-09-01T12:17:51.000Z | filmatyk/filters.py | Noiredd/Filmatyk | a09637d3d2c572bebf5e6ae004c16917c247e9fa | [
"MIT"
] | null | null | null | from calendar import monthrange
import datetime
from PIL import Image, ImageTk
import tkinter as tk
from tkinter import ttk
class FilterMachine(object):
# Holds multiple filters and returns a callable that can be simply passed to a
# "filter" function on the set of Items that the Presenter holds. The machine
# r... | 37.651297 | 106 | 0.678951 |
4a1ef43bea402747df1d0d058f12c31be185ea9f | 1,626 | py | Python | locan/tests/locan_io/test_elyra_io.py | super-resolution/Locan | 94ed7759f7d7ceddee7c7feaabff80010cfedf30 | [
"BSD-3-Clause"
] | 8 | 2021-11-25T20:05:49.000Z | 2022-03-27T17:45:00.000Z | locan/tests/locan_io/test_elyra_io.py | super-resolution/Locan | 94ed7759f7d7ceddee7c7feaabff80010cfedf30 | [
"BSD-3-Clause"
] | 4 | 2021-12-15T22:39:20.000Z | 2022-03-11T17:35:34.000Z | locan/tests/locan_io/test_elyra_io.py | super-resolution/Locan | 94ed7759f7d7ceddee7c7feaabff80010cfedf30 | [
"BSD-3-Clause"
] | 1 | 2022-03-22T19:53:13.000Z | 2022-03-22T19:53:13.000Z | from io import StringIO
import locan.constants
from locan.locan_io import load_Elyra_file
from locan.locan_io.locdata.elyra_io import load_Elyra_header
def test_get_correct_column_names_from_Elyra_header():
columns = load_Elyra_header(
path=locan.ROOT_DIR / "tests/test_data/Elyra_dstorm_data.txt"
)
... | 29.563636 | 104 | 0.646371 |
4a1ef54fb50013881aa832f83674ac66ecccd9bc | 5,568 | py | Python | tensorflow/python/ops/histogram_ops.py | zhangyujing/tensorflow | c7a04561fb8972fb64907acc5f10f3c6d4cef9f2 | [
"Apache-2.0"
] | 13 | 2018-07-23T18:53:35.000Z | 2021-11-18T19:56:45.000Z | tensorflow/python/ops/histogram_ops.py | zhangyujing/tensorflow | c7a04561fb8972fb64907acc5f10f3c6d4cef9f2 | [
"Apache-2.0"
] | 13 | 2020-01-28T22:20:14.000Z | 2022-03-11T23:20:14.000Z | tensorflow/python/ops/histogram_ops.py | zhangyujing/tensorflow | c7a04561fb8972fb64907acc5f10f3c6d4cef9f2 | [
"Apache-2.0"
] | 13 | 2018-09-07T13:28:38.000Z | 2020-07-17T15:06:24.000Z | # Copyright 2015 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... | 37.621622 | 80 | 0.670259 |
4a1ef58d3a2ee542968f254eac485875ff61c7b2 | 1,394 | py | Python | python/sorting/quicksort.py | educauchy/algorithms | 5e69f70595eceb28fe4f115a70e0e6f197e4564b | [
"MIT"
] | null | null | null | python/sorting/quicksort.py | educauchy/algorithms | 5e69f70595eceb28fe4f115a70e0e6f197e4564b | [
"MIT"
] | null | null | null | python/sorting/quicksort.py | educauchy/algorithms | 5e69f70595eceb28fe4f115a70e0e6f197e4564b | [
"MIT"
] | null | null | null | from typing import List, Union
arr_type = List[Union[float, int, str]]
def partition(x: arr_type, min: int = None, max: int = None) -> int:
"""
Return index of the pivot element
:param x: Subarray
:param min: Minimum index of subarray x
:param max: Maximum index of subarray x
:return:
"""... | 32.418605 | 108 | 0.526542 |
4a1ef668e994528ca4017aa8967a7731fbd62535 | 10,462 | py | Python | src/lib/zothero/cache.py | yarray/zothero | d8b2a2160e35ab2a5d503a7bbf5aa39c538174bc | [
"MIT"
] | 372 | 2017-12-20T22:56:25.000Z | 2022-03-30T22:43:52.000Z | src/lib/zothero/cache.py | yarray/zothero | d8b2a2160e35ab2a5d503a7bbf5aa39c538174bc | [
"MIT"
] | 65 | 2017-12-20T23:03:42.000Z | 2022-03-30T13:07:18.000Z | src/lib/zothero/cache.py | yarray/zothero | d8b2a2160e35ab2a5d503a7bbf5aa39c538174bc | [
"MIT"
] | 26 | 2018-05-23T07:59:52.000Z | 2022-03-21T04:37:16.000Z | # encoding: utf-8
#
# Copyright (c) 2016 Dean Jackson <deanishe@deanishe.net>
#
# MIT Licence. See http://opensource.org/licenses/MIT
#
# Created on 2016-11-13
#
"""Simple key-value store based on sqlite3.
Data is stored via `Store` sub-objects assigned to each table.
"""
from __future__ import print_function, absol... | 26.688776 | 77 | 0.543395 |
4a1ef6b03fb9e9470450de023a60d4b0f816b7da | 5,441 | py | Python | train.py | Mindy123456/pytorch-CycleGAN-and-pix2pix | ef54699e2d4a37b95d4c009e80b880e4c908aa59 | [
"BSD-3-Clause"
] | null | null | null | train.py | Mindy123456/pytorch-CycleGAN-and-pix2pix | ef54699e2d4a37b95d4c009e80b880e4c908aa59 | [
"BSD-3-Clause"
] | null | null | null | train.py | Mindy123456/pytorch-CycleGAN-and-pix2pix | ef54699e2d4a37b95d4c009e80b880e4c908aa59 | [
"BSD-3-Clause"
] | null | null | null | """General-purpose training script for image-to-image translation.
This script works for various models (with option '--model': e.g., pix2pix, cyclegan, colorization) and
different datasets (with option '--dataset_mode': e.g., aligned, unaligned, single, colorization).
You need to specify the dataset ('--dataroot'), e... | 66.353659 | 186 | 0.680022 |
4a1ef6dd51a9350821334e2084c1942e6f455987 | 1,582 | py | Python | catkin_ws/src/udemy_opencv/contours_detection.py | hariudkmr/Intro_to_Ros | 05b02117ad3a48c17aaeb6473fec36074090c7b0 | [
"MIT"
] | 1 | 2021-01-22T16:36:03.000Z | 2021-01-22T16:36:03.000Z | catkin_ws/src/udemy_opencv/contours_detection.py | hariudkmr/Intro_to_Ros | 05b02117ad3a48c17aaeb6473fec36074090c7b0 | [
"MIT"
] | null | null | null | catkin_ws/src/udemy_opencv/contours_detection.py | hariudkmr/Intro_to_Ros | 05b02117ad3a48c17aaeb6473fec36074090c7b0 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import numpy as np
import cv2
def read_image(image_name, show):
image = cv2.imread(image_name, cv2.IMREAD_COLOR)
if show:
cv2.imshow("RGB Image", image)
return image
def convert_rgb_to_gray(image, show):
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
if show:
... | 25.934426 | 84 | 0.699747 |
4a1ef86b2dc6fb392ce8e4d4764481cb272277b2 | 3,499 | py | Python | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_crm_entity_dataset_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-06-02T08:01:35.000Z | 2021-06-02T08:01:35.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_crm_entity_dataset_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2020-03-06T05:57:16.000Z | 2020-03-06T05:57:16.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/dynamics_crm_entity_dataset_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"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 ... | 47.931507 | 274 | 0.672192 |
4a1ef8923893c60879227c868e758170458acae3 | 1,046 | py | Python | sonar/line.py | augustin-barillec/sonar | 5d565bbdb924109163ab0cba355350484f545143 | [
"MIT"
] | null | null | null | sonar/line.py | augustin-barillec/sonar | 5d565bbdb924109163ab0cba355350484f545143 | [
"MIT"
] | null | null | null | sonar/line.py | augustin-barillec/sonar | 5d565bbdb924109163ab0cba355350484f545143 | [
"MIT"
] | null | null | null | from .utils import line_shift
from .coordinate import xy_def, ij_to_xy, xy_to_ij, f_to_xy, xy_to_f
def xy_line(m1_xy, m2_xy):
if m1_xy == m2_xy:
raise ValueError('The two points must be distinct')
res = []
for x, y in xy_def:
dl = line_shift(m1_xy, m2_xy, (x, y))
dr = line_shift(m1... | 31.69697 | 104 | 0.587954 |
4a1ef8a8053db3626652dec4a194dda50a513d70 | 2,431 | py | Python | cfg.py | BobiAce/OCR_TEST | 05117db82287c92cf99df573d686f13438f0675f | [
"MIT"
] | null | null | null | cfg.py | BobiAce/OCR_TEST | 05117db82287c92cf99df573d686f13438f0675f | [
"MIT"
] | null | null | null | cfg.py | BobiAce/OCR_TEST | 05117db82287c92cf99df573d686f13438f0675f | [
"MIT"
] | null | null | null | import os
train_task_id = '3T736'
initial_epoch = 8
epoch_num = 50
lr = 1e-3
decay = 5e-4
clipvalue = 0.5 # default 0.5, 0 means no clip
patience = 8
load_weights = True
lambda_inside_score_loss = 4.0
lambda_side_vertex_code_loss = 1.0
lambda_side_vertex_coord_loss = 1.0
total_img = 10048
validation_split_ratio = 0... | 31.571429 | 88 | 0.749074 |
4a1ef8b918e7652610bf30b83a5b63a0c23cee24 | 332 | py | Python | other/dingding/dingtalk/api/rest/OapiEduSchoolInitRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | other/dingding/dingtalk/api/rest/OapiEduSchoolInitRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | other/dingding/dingtalk/api/rest/OapiEduSchoolInitRequest.py | hth945/pytest | 83e2aada82a2c6a0fdd1721320e5bf8b8fd59abc | [
"Apache-2.0"
] | null | null | null | '''
Created by auto_sdk on 2020.10.26
'''
from dingtalk.api.base import RestApi
class OapiEduSchoolInitRequest(RestApi):
def __init__(self,url=None):
RestApi.__init__(self,url)
self.campus = None
self.operator = None
def getHttpMethod(self):
return 'POST'
def getapiname(self):
return 'dingtalk.oapi.edu.s... | 20.75 | 40 | 0.743976 |
4a1ef8b93fa3f551f9eba7671c8188b7b2e0b868 | 5,511 | py | Python | datasetinsights/stats/visualization/keypoints_plot.py | Unity-Technologies/dataset-insights | 62849b1412e3e63a2f4a6f56bd27272cb4c1dfc1 | [
"Apache-2.0"
] | 3 | 2020-07-22T02:35:20.000Z | 2020-07-22T19:45:57.000Z | datasetinsights/stats/visualization/keypoints_plot.py | Unity-Technologies/dataset-insights | 62849b1412e3e63a2f4a6f56bd27272cb4c1dfc1 | [
"Apache-2.0"
] | 8 | 2020-07-24T22:23:51.000Z | 2020-08-03T23:02:13.000Z | datasetinsights/stats/visualization/keypoints_plot.py | Unity-Technologies/dataset-insights | 62849b1412e3e63a2f4a6f56bd27272cb4c1dfc1 | [
"Apache-2.0"
] | 2 | 2020-07-22T19:33:28.000Z | 2020-07-31T17:44:50.000Z | """ Helper keypoints library to plot keypoint joints and skeletons with a
simple Python API.
"""
def _get_color_from_color_node(color):
"""Gets the color from the color node in the template.
Args:
color (tuple): The color's channel values expressed in a range from 0..1
Returns: The color for th... | 31.491429 | 80 | 0.535112 |
4a1ef8fcc6cfb8ff18a119bf774b684151e2c83f | 25,311 | py | Python | custom/icds_reports/sqldata/exports/children.py | tobiasmcnulty/commcare-hq | 234aa1fba98a96de1b625bbd70b2066fc877eed1 | [
"BSD-3-Clause"
] | 1 | 2020-07-14T13:00:23.000Z | 2020-07-14T13:00:23.000Z | custom/icds_reports/sqldata/exports/children.py | tobiasmcnulty/commcare-hq | 234aa1fba98a96de1b625bbd70b2066fc877eed1 | [
"BSD-3-Clause"
] | null | null | null | custom/icds_reports/sqldata/exports/children.py | tobiasmcnulty/commcare-hq | 234aa1fba98a96de1b625bbd70b2066fc877eed1 | [
"BSD-3-Clause"
] | null | null | null | from sqlagg.base import AliasColumn
from sqlagg.columns import SumWhen, SumColumn, SimpleColumn
from corehq.apps.reports.sqlreport import DatabaseColumn, AggregateColumn
from custom.icds_reports.sqldata.base import IcdsSqlData
from custom.icds_reports.utils.mixins import ExportableMixin
from custom.icds_reports.utils ... | 53.17437 | 124 | 0.459721 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.