max_stars_repo_path
string
max_stars_repo_name
string
max_stars_count
int64
id
string
content
string
add_param_types
int64
add_return_types
int64
add_class_field_types
int64
add_instance_field_types
int64
add_total
int64
add_error
int64
scripts/check_split.py
awesome-archive/mixmatch
1,124
3224921
<filename>scripts/check_split.py #!/usr/bin/env python # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unl...
0
0
0
0
0
0
Assignments/assignment5/MakiNaruto/highway.py
stxxllbu/CS224n-winter-together
468
3224958
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ CS224N 2019-20: Homework 5 """ import torch import torch.nn as nn import torch.nn.functional as F class Highway(nn.Module): # Remember to delete the above 'pass' after your implementation ### YOUR CODE HERE for part 1f def __init__(self, e_word): ...
1
1
0
0
2
0
plenum/test/replica/test_catchup_after_replica_addition.py
jandayanan/indy-plenum
148
3224967
import pytest from plenum.common.constants import STEWARD_STRING, VALIDATOR from pytest import fixture from plenum.common.throughput_measurements import RevivalSpikeResistantEMAThroughputMeasurement from plenum.common.util import getMaxFailures from plenum.test.helper import sdk_send_random_and_check, assertExp, sdk_g...
0
0
0
0
0
0
peeringdb/jobs.py
maznu/peering-manager
173
3224968
import logging from django_rq import job from extras.enums import LogLevel from .sync import PeeringDB logger = logging.getLogger("peering.manager.peeringdb.jobs") # One hour timeout as this process can take long depending on the host properties @job("default", timeout=3600) def synchronize(job_result): job_r...
0
0
0
0
0
0
tests/test_fileformats.py
m1ndmaze/xlwings
1,138
3224977
<reponame>m1ndmaze/xlwings<gh_stars>1000+ from pathlib import Path import pytest import xlwings as xw this_dir = Path(__file__).resolve().parent @pytest.fixture(scope="module") def app(): with xw.App(visible=False) as app: yield app for f in Path(".").glob("tempfile*"): f.unlink() for f...
0
0
0
0
0
0
bindings/python/tests-py/test_suite.py
ismailbaskin/jsonschema-rs
212
3225031
<reponame>ismailbaskin/jsonschema-rs<filename>bindings/python/tests-py/test_suite.py import json import os import random import socket import subprocess import sys from time import sleep from urllib.parse import urlparse import pytest import jsonschema_rs TEST_SUITE_PATH = "../../jsonschema/tests/suite" EXPONENTIAL_...
0
0
0
0
0
0
Python/example_controllers/flex_fluid_object.py
felixbinder/tdw
307
3225037
from tdw.controller import Controller from tdw.tdw_utils import TDWUtils from time import sleep from platform import system """ Create a fluid "container" with the NVIDIA Flex physics engine. Run several trials, dropping ball objects of increasing mass into the fluid. """ class FlexFluid(Controller): ...
4
0
0
0
4
0
PyFlow/Packages/PyFlowBase/Tools/AlignLeftTool.py
luzpaz/PyFlow
1,463
3225053
## Copyright 2015-2019 <NAME>, <NAME> ## 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...
0
3
0
0
3
0
misc/easytags/highlight.py
bronzehedwick/vim-easytags
809
3225093
<reponame>bronzehedwick/vim-easytags ''' This Python script is part of the easytags plug-in for the Vim text editor. The Python Interface to Vim is used to load this script which accelerates dynamic syntax highlighting by reimplementing tag file reading and :syntax command generation in Python with a focus on doing the...
0
0
0
0
0
0
lib/galaxy/tool_util/linters/stdio.py
rhpvorderman/galaxy
1,085
3225124
"""This module contains a linting functions for tool error detection.""" from .command import get_command def lint_stdio(tool_source, lint_ctx) -> None: tool_xml = getattr(tool_source, "xml_tree", None) stdios = tool_xml.findall("./stdio") if tool_xml else [] if not stdios: command = get_command(...
0
1
0
0
1
0
quarkchain/p2p/poc/paragon_node.py
tim-yoshi/pyquarkchain
237
3225152
<reponame>tim-yoshi/pyquarkchain """ paragon_node.py - runs a p2p server that discovers through bootnodes and connects to peers Example runs: # run bootnode, this will fire up both UDP(discovery) and TCP(P2P) server # note the default private key is correct key for bootnode python paragon_node.py --logging_level=debug...
0
0
0
0
0
0
docs/source/conf.py
AleBurzio11/webots_ros2
176
3225185
<gh_stars>100-1000 #!/usr/bin/env python # Copyright 1996-2021 Cyberbotics 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 ...
0
0
0
0
0
0
lib/galaxy/files/sources/googledrive.py
gulsumgudukbay/galaxy
1,085
3225200
try: from fs.googledrivefs import GoogleDriveFS from google.oauth2.credentials import Credentials except ImportError: GoogleDriveFS = None from ._pyfilesystem2 import PyFilesystem2FilesSource class GoogleDriveFilesSource(PyFilesystem2FilesSource): plugin_type: str = 'googledrive' required_module ...
0
1
2
0
3
0
private_test_scripts/avmi.py
kapikantzari/MultiBench
148
3225267
from unimodals.common_models import LeNet, MLP, Constant from private_test_scripts.all_in_one import all_in_one_train, all_in_one_test import torch from torch import nn from datasets.avmnist.get_data import get_dataloader from fusions.common_fusions import Concat, MultiplicativeInteractions2Modal from training_structur...
0
0
0
0
0
0
Sorting Algorithms/Merge Sort Algorithm/Python/MergeSort.py
Atulbargotra/theoryofprogramming
114
3225282
# ===== ===== ===== # # Theory of Programming # # Merge Sort Algorithm # http://theoryofprogramming.com/2015/01/29/merge-sort-algorithm/ # GitHub - https://github.com/VamsiSangam/theoryofprogramming # Code Contributor - <NAME> (github.com/ranesr) # # ===== ===== ===== # Merge Sort function using loops def merge_sort(a...
0
4
0
0
4
0
scripts/get_version.py
MSLars/allennlp
11,433
3225305
#!/usr/bin/env python import argparse from typing import Dict import requests def parse_args() -> object: parser = argparse.ArgumentParser() parser.add_argument("version_type", choices=["stable", "latest", "current"]) return parser.parse_args() def get_current_version() -> str: VERSION: Dict[str, ...
0
5
1
0
6
0
tests/test_folder_status.py
d70-t/imapclient
406
3225311
# Copyright (c) 2015, <NAME> # Released subject to the New BSD License # Please see http://en.wikipedia.org/wiki/BSD_licenses from __future__ import unicode_literals from .imapclient_test import IMAPClientTest from .util import Mock class TestFolderStatus(IMAPClientTest): def test_basic(self): self.clie...
0
0
0
0
0
0
compressor/signals.py
cron-ooo/django-compressor
1,480
3225323
import django.dispatch # arguments: type, mode, context post_compress = django.dispatch.Signal()
0
0
0
0
0
0
src/web/member/forms.py
anderson-attilio/runbook
155
3225325
<reponame>anderson-attilio/runbook ###################################################################### # Cloud Routes Web Application # ------------------------------------------------------------------- # Forms Class ###################################################################### from wtforms import Form fr...
0
0
0
0
0
0
database/link.py
bnbwebexpertise/linkr
124
3225370
import models import util.validation from database import db_txn from linkr import db from util.exception import * @db_txn def add_link(alias, outgoing_url, password=<PASSWORD>, user_id=None, require_recaptcha=False): """ Add a new link to the database after performing necessary input validation. :param ...
0
0
0
0
0
0
daisy/model/pair/FMRecommender.py
hyllll/daisyRec
439
3225376
import os from tqdm import tqdm import torch import torch.nn as nn import torch.optim as optim import torch.backends.cudnn as cudnn class PairFM(nn.Module): def __init__(self, user_num, item_num, factors: int=84, epochs: int=20, ...
8
2
0
0
10
0
plugin/AL_USDMayaTestPlugin/test_data/unknowntypetranslator.py
garvitverma/AL_USDMaya
507
3225379
from AL import usdmaya from pxr import Tf class UnknownTypeTranslator(usdmaya.TranslatorBase): def __init__(self): usdmaya.TranslatorBase.__init__(self) def initialize(self) -> bool: return True # return the scheam type this class translates def getTranslatedType(self) -> o...
0
4
0
0
4
0
armi/utils/tests/test_plotting.py
keckler/armi
162
3225383
# Copyright 2020 TerraPower, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
0
0
1
0
1
0
telemetry/telemetry/internal/backends/chrome/crx_id_unittest.py
tingshao/catapult
2,151
3225385
# Copyright 2012 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. import os import shutil import unittest import tempfile from telemetry.core import util from telemetry.internal.backends.chrome import crx_id class CrxIdUn...
0
0
2
0
2
0
pyptex/__main__.py
sloisel/pyptex
119
3225395
import sys from .__init__ import pyptexmain if __name__ == "__main__": # execute only if run as a script pyptexmain(sys.argv)
0
0
0
0
0
0
packages/python/plotly/templategen/definitions.py
sgn/plotly.py
11,750
3225403
<reponame>sgn/plotly.py from plotly.graph_objs.layout import Template from templategen.utils import initialize_template from .utils.colors import colors import colorcet as cc import plotly.express as px # dict of template builder functions # This way we can loop over definitions in __init__.py builders = {} def ggpl...
0
0
0
0
0
0
components/gcp/container/component_sdk/python/kfp_component/google/dataproc/_delete_cluster.py
ConverJens/pipelines
102
3225425
<reponame>ConverJens/pipelines # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
0
0
0
0
0
0
imblearn/utils/_show_versions.py
cdchushig/imbalanced-learn
5,678
3225435
<reponame>cdchushig/imbalanced-learn """ Utility method which prints system info to help with debugging, and filing issues on GitHub. Adapted from :func:`sklearn.show_versions`, which was adapted from :func:`pandas.show_versions` """ # Author: <NAME> <<EMAIL>> # License: MIT import sys import importlib def _get_dep...
0
0
0
0
0
0
Python/04 - Sets/12 - Check Subset.py
srgeyK87/Hacker-Rank-30-days-challlenge
275
3225438
<gh_stars>100-1000 # ======================== # Information # ======================== # Direct Link: https://www.hackerrank.com/challenges/py-check-subset/problem # Difficulty: Easy # Max Score: 10 # Language: Python # ======================== # Solution # ======================== for i in range(int(i...
0
0
0
0
0
0
tests/test_classification_models/test_heads/test_meta_baseline_head.py
BIGWangYuDong/mmfewshot
376
3225443
# Copyright (c) OpenMMLab. All rights reserved. import torch from mmfewshot.classification.models.heads import MetaBaselineHead def test_meta_baseline_head(): head = MetaBaselineHead() support_feat = torch.randn(4, 64) query_feat = torch.randn(4, 64) label = torch.LongTensor([0, 1, 2, 3]) losses...
0
0
0
0
0
0
script/header_guard.py
nilsleiffischer/brigand
591
3225476
<gh_stars>100-1000 #!/usr/bin/env python import sys import os import re pragma_once_pat = re.compile("^(\ |\t)*#pragma(\ |\t)+once") if __name__ == '__main__': if len(sys.argv) < 2: print "expect dir" sys.exit(0) for root, dir, files in os.walk(sys.argv[1]): header_guard_prefix = r...
0
0
0
0
0
0
intro/matplotlib/examples/plot_ugly.py
junghun73/Learning
419
3225480
""" A example of plotting not quite right ====================================== An "ugly" example of plotting. """ import numpy as np import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as plt matplotlib.rc('grid', color='black', linestyle='-', linewidth=1) fig = plt.figure(figsize=(5,4),dpi=72) axes ...
0
0
0
0
0
0
python/test/resource/test_image_dataset_noisy.py
Fosstack/vmaf
2,874
3225503
from vmaf.config import VmafConfig dataset_name = 'test_image' yuv_fmt = 'yuv444p' ref_videos = [ {'content_id': 0, 'content_name': '100007', 'height': 321, 'path': VmafConfig.test_resource_path('test_image_yuv', '100007.yuv'), 'width': 481}, {'content_id': 1, 'content_name': '100039', 'height': 321, ...
0
0
0
0
0
0
src/frontend/min_max_norm.py
G-Thor/merlin
1,305
3225514
################################################################################ # The Neural Network (NN) based Speech Synthesis System # https://svn.ecdf.ed.ac.uk/repo/inf/dnn_tts/ # # Centre for Speech Technology Research # University of Edinburgh, UK # ...
5
2
0
0
7
0
tests/assets/spec-with-functions/my_tasks/clean/util.py
MarcoJHB/ploomber
2,141
3225529
<filename>tests/assets/spec-with-functions/my_tasks/clean/util.py<gh_stars>1000+ from pathlib import Path def util_touch(path): Path(path).touch()
0
0
0
0
0
0
2015-10_Lecture/Lecture2/code/2_MNIST.py
hlin117/deeplearning4nlp-tutorial
593
3225538
# coding: utf-8 # # Handwritten Digit Recognition with Theano # # In this tutorial we will train a feed forward network / multi-layer-perceptron (MLP) to recognize handwritten digits using pure Theano. # For a long version see: http://deeplearning.net/tutorial/mlp.html # # # # ## Layout # The layout of our netw...
0
0
0
0
0
0
tests/unit/lib/sync/test_sync_flow_factory.py
praneetap/aws-sam-cli
2,285
3225580
<reponame>praneetap/aws-sam-cli from unittest import TestCase from unittest.mock import MagicMock, patch, Mock from samcli.lib.sync.sync_flow_factory import SyncFlowFactory from samcli.lib.utils.cloudformation import CloudFormationResourceSummary class TestSyncFlowFactory(TestCase): def create_factory(self, auto...
0
0
0
0
0
0
PhysicsTools/Heppy/python/analyzers/objects/VertexAnalyzer.py
ckamtsikis/cmssw
852
3225583
from __future__ import print_function import itertools from PhysicsTools.Heppy.analyzers.core.VertexHistograms import VertexHistograms from PhysicsTools.Heppy.analyzers.core.Analyzer import Analyzer from PhysicsTools.Heppy.analyzers.core.AutoHandle import AutoHandle from PhysicsTools.HeppyCore.statistics.average impor...
0
3
0
2
5
0
wechat_sdk/lib/crypto/utils.py
upcwangying/wechat-python-sdk
1,150
3225584
# -*- coding: utf-8 -*- import hashlib from wechat_sdk.lib.crypto.exceptions import CryptoComputeSignatureError from wechat_sdk.utils import to_binary def get_sha1_signature(token, timestamp, nonce, encrypt) -> object: """ 用 SHA1 算法生成安全签名 @param token: 票据 @param timestamp: 时间戳 @param encrypt: 密文...
0
1
0
0
1
0
quiz/forms.py
lworkneh/NS
531
3225589
<gh_stars>100-1000 from django import forms from django.forms.widgets import RadioSelect, Textarea class QuestionForm(forms.Form): def __init__(self, question, *args, **kwargs): super(QuestionForm, self).__init__(*args, **kwargs) choice_list = [x for x in question.get_answers_list()] self....
0
0
0
0
0
0
tests/benchmarks/pybench/With.py
RESP3CT88/Nuitka
5,421
3225595
<reponame>RESP3CT88/Nuitka # Copyright 2021, <NAME>, mailto:<EMAIL> # # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # indicate...
0
0
0
0
0
0
classification/training/update/WindowClassificationTrainUpdateLossParam.py
Tessellate-Imaging/Monk_Gui
129
3225599
<gh_stars>100-1000 import os import sys import json from PyQt5 import QtCore, QtWidgets from PyQt5.QtWidgets import * from PyQt5.QtGui import * class WindowClassificationTrainUpdateLossParam(QtWidgets.QWidget): forward_train = QtCore.pyqtSignal(); backward_scheduler_param = QtCore.pyqtSignal(); def __...
0
0
0
0
0
0
lib/split_join_tag.py
Shakil-Shahadat/sublime-text-plugin
207
3225662
import sublime from . import emmet_sublime as emmet from . import syntax def split_join_tag(view: sublime.View, edit: sublime.Edit): for sel in view.sel(): pt = sel.begin() syntax_name = syntax.from_pos(view, pt) xml = syntax.is_xml(syntax_name) tag = emmet.get_tag_context(view, pt,...
2
0
0
0
2
0
src/robot/parsing/lexer/settings.py
rdagum/robotframework
7,073
3225679
<gh_stars>1000+ # Copyright 2008-2015 Nokia Networks # Copyright 2016- Robot Framework Foundation # # 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/licen...
0
0
0
0
0
0
platforms/linux-aws-ssm/src/app.py
radsec/ottr
207
3225680
#!/usr/local/bin/python import os import sys import boto3 import time import acme from botocore.exceptions import ClientError, WaiterError LOGGER = acme.get_logger(__name__) # AWS SSM Client SSM_CLIENT = boto3.client('ssm') def generate_csr(common_name, instance_id, platform, subject_alternative_names, path): ...
0
4
0
0
4
0
polyfile/kaitai/parsers/lzh.py
trailofbits/polyfile
190
3225687
<reponame>trailofbits/polyfile # This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild from pkg_resources import parse_version import kaitaistruct from kaitaistruct import KaitaiStruct, KaitaiStream, BytesIO import collections if parse_version(kaitaistruct.__version__) < pa...
0
0
0
0
0
0
src/bolts/urls.py
fedelemantuano/spamscope
252
3225693
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright 2016 <NAME> (https://www.linkedin.com/in/fmantuano/) 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/...
0
1
1
0
2
0
src/modules/catalog/domain/rules.py
Ermlab/python-ddd
308
3225703
<reponame>Ermlab/python-ddd from seedwork.domain.rules import BusinessRule from seedwork.domain.value_objects import Currency from .value_objects import ListingStatus # import modules.catalog.domain.entities as entities class ListingMustBeInDraftState(BusinessRule): __message = "Listing status must be draft" ...
0
0
0
0
0
0
experimental/args.py
kshithijiyer/qkeras
388
3225706
# Copyright 2020 Google LLC # # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
0
1
0
0
1
0
Python/08 - Date and Time/01 - Calendar Module.py
srgeyK87/Hacker-Rank-30-days-challlenge
275
3225715
# ======================== # Information # ======================== # Direct Link: https://www.hackerrank.com/challenges/calendar-module/problem # Difficulty: Easy # Max Score: 10 # Language: Python # ======================== # Solution # ======================== import calendar MONTH, DAY, YEAR = map...
0
0
0
0
0
0
function/python/brightics/function/statistics/test/kruskal_wallis_test.py
parkjh80/studio
202
3225732
<reponame>parkjh80/studio """ Copyright 2019 Samsung SDS 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 a...
0
0
0
0
0
0
python/shopping/content/workflows.py
akgarchi/googleads-shopping-samples
149
3225739
#!/usr/bin/python # # 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 b...
0
0
0
0
0
0
src/exabgp/configuration/configuration.py
pierky/exabgp
1,560
3225758
<filename>src/exabgp/configuration/configuration.py # encoding: utf-8 """ configuration.py Created by <NAME> on 2009-08-25. Copyright (c) 2009-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ import os import sys from exabgp.logger import log from exabgp.configuration.core...
0
0
0
0
0
0
tests/rc/dataset_readers/record_reader_test.py
shunk031/allennlp-models
402
3225760
from __future__ import annotations import pytest from allennlp.data.tokenizers import WhitespaceTokenizer from allennlp.data.token_indexers import SingleIdTokenIndexer from tests import FIXTURES_ROOT import re from typing import List from allennlp_models.rc.dataset_readers.record_reader import RecordTaskReader """ Te...
0
8
0
0
8
0
test/IECoreMaya/FromMayaInstancerConverterTest.py
bradleyhenke/cortex
386
3225765
########################################################################## # # Copyright (c) 2018, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistribu...
0
0
0
0
0
0
rssant_api/models/__init__.py
zuzhi/rssant
1,176
3225772
from .feed import Feed, RawFeed, UserFeed, FeedStatus from .feed_creation import FeedCreation, FeedUrlMap from .union_feed import FeedUnionId, UnionFeed, FeedImportItem from .story import Story, UserStory from .feed_story_stat import FeedStoryStat from .union_story import UnionStory, StoryUnionId from .registery import...
0
0
0
0
0
0
vmoe/checkpoints/base.py
google-research/vmoe
205
3225789
<reponame>google-research/vmoe # Copyright 2022 Google LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
0
0
0
0
0
0
src/lib/zothero/__init__.py
yarray/zothero
372
3225793
# encoding: utf-8 # # Copyright (c) 2017 <NAME> <<EMAIL>> # # MIT Licence. See http://opensource.org/licenses/MIT # # Created on 2017-12-15 # """Zotero workflow for Alfred.""" from __future__ import print_function, absolute_import from .core import ZotHero # Populated by `zh` when it runs. Not a best practice, but i...
0
0
0
0
0
0
thumbnail-rater/test.py
emobileingenieria/youtube
176
3225797
<gh_stars>100-1000 import cv2 import tensorflow as tf # CATEGORIES = ["bad", "good"] IMG_SIZE_W = 212 IMG_SIZE_H = 120 def prepare(file): img_array = cv2.imread(file, cv2.IMREAD_COLOR) new_array = cv2.resize(img_array, (IMG_SIZE_H, IMG_SIZE_W)) return new_array.reshape(-1, IMG_SIZE_H, IMG_SIZE_W, 3) model ...
0
0
0
0
0
0
webServer/customer.py
r4b3rt/wLogger
397
3225817
# coding=UTF-8 from flask import Response,current_app,request,session from sqlalchemy import text from decimal import Decimal import json,time,datetime # 自定义跨域 接口 返回 class class ApiCorsResponse(): @staticmethod def response(data ,success: bool = True,status_code: int= 200) -> object: if success : ...
2
4
1
0
7
0
api/tests/integration/tests/basic/reaction_saveload.py
tsingdao-Tp/Indigo
204
3225843
<reponame>tsingdao-Tp/Indigo import sys sys.path.append('../../common') from env_indigo import * indigo = Indigo() def testReactionSaveLoad (filename): print("Loading " + relativePath(filename)) rxn = indigo.loadReactionFromFile(filename) print(rxn.smiles()) rxn2 = indigo.loadReaction(rxn.smil...
0
0
0
0
0
0
src/picktrue/gui/entry.py
winkidney/PickTrue
118
3225853
<reponame>winkidney/PickTrue import os from picktrue.engine import Downloader from picktrue.sites.artstation import ArtStation from picktrue.sites.douban import DoubanPersonalAlbum from picktrue.sites.huaban import HuaBan, HuaBanBoard from picktrue.sites.pixiv import Pixiv def _user_home_run(site, path_prefix=None)...
0
0
0
0
0
0
third_party/blink/renderer/bindings/scripts/web_idl/union.py
chromium/chromium
14,668
3225867
<reponame>chromium/chromium # Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from .code_generator_info import CodeGeneratorInfoMutable from .composition_parts import Identifier from .composition_parts impor...
0
0
0
0
0
0
source/test/test_datastore.py
jfathi/document-understanding-solution
138
3225872
<reponame>jfathi/document-understanding-solution import sys sys.path.append("./lambda/helper/python") import boto3 import unittest from moto import mock_s3 from moto import mock_dynamodb2 import datastore DOCUMENTS_TABLE_NAME="DocumentsTestTable" OUTPUT_TABLE_NAME="OutputTestTable" current_session = boto3.session.Ses...
0
0
0
0
0
0
var/spack/repos/builtin/packages/perl-tk/package.py
pbrady/spack
348
3225892
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PerlTk(PerlPackage): """Interface to Tk Graphics Library""" homepage: str = "https://...
0
0
2
0
2
0
configs/example/arm/starter_fs.py
hyu-iot/gem5
765
3225934
<reponame>hyu-iot/gem5 # Copyright (c) 2016-2017, 2020 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware im...
0
0
0
0
0
0
tests/test_using_api.py
JordonPhillips/pygments
940
3225944
""" Pygments tests for using() ~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pytest import raises from pygments.lexer import using, bygroups, this, RegexLexer from pygments.token import String, Text, Keyw...
0
2
1
0
3
0
MarkdownPP/Modules/__init__.py
sixcy/markdown-pp
265
3225949
<reponame>sixcy/markdown-pp # Copyright 2015 <NAME> # Licensed under the MIT license from __future__ import absolute_import from __future__ import print_function from __future__ import unicode_literals import os from os import path modules = {} def load_modules(): dirname = path.dirname(path.abspath(__file__))...
0
0
0
0
0
0
maths/combinations.py
NavpreetDevpuri/Python
145,614
3225954
<filename>maths/combinations.py """ https://en.wikipedia.org/wiki/Combination """ from math import factorial def combinations(n: int, k: int) -> int: """ Returns the number of different combinations of k length which can be made from n values, where n >= k. Examples: >>> combinations(10,5) 25...
0
0
0
0
0
0
sandeepbvv11/0001/0001.py
saurabh896/python-1
3,976
3225970
<reponame>saurabh896/python-1<gh_stars>1000+ import uuid import random st= 'qwertyuiopasdfghjklzxcvbnm!@#$%^&*' for i in range(0,200): x=str(uuid.uuid4().fields[-1])[:10]+st y='' for j in range(0,10): y+=random.choice(x) print (y+"\n")
0
0
0
0
0
0
ceph_deploy/tests/parser/test_pkg.py
weisongf/ceph-deploy
353
3226028
import pytest from ceph_deploy.cli import get_parser from ceph_deploy.tests.util import assert_too_few_arguments class TestParserPkg(object): def setup(self): self.parser = get_parser() def test_pkg_help(self, capsys): with pytest.raises(SystemExit): self.parser.parse_args('pkg ...
0
0
0
0
0
0
tests/selenium/test_api.py
adamlwgriffiths/vue.py
274
3226039
<reponame>adamlwgriffiths/vue.py<filename>tests/selenium/test_api.py from vue import * def test_app_with_props_and_data(selenium): def app_with_props_data(el): class App(VueComponent): text: str template = """ <div id="el">{{ text }}</div> """ retur...
0
0
0
0
0
0
vnpy/api/xtp/__init__.py
funrunskypalace/vnpy
323
3226042
from .vnxtpmd import MdApi from .vnxtptd import TdApi from .xtp_constant import *
0
0
0
0
0
0
LCM/lcm-tester/send_go_autonomous.py
titanomachy/flight
1,040
3226051
<gh_stars>1000+ import lcm import sys lc = lcm.LCM() #sys.path.insert(0, '../') sys.path.insert(0, '/home/abarry/realtime/LCM/') from lcmt import timestamp msg = timestamp(); msg.timestamp = 0; lc.publish("state-machine-go-autonomous", msg.encode())
0
0
0
0
0
0
iterator.py
koreyoshildc/123
250
3226077
<gh_stars>100-1000 import multiprocessing import threading import Queue from uuid import uuid4 import numpy as np import SharedArray import data def load_shared(args): i, array_name, fname, kwargs = args array = SharedArray.attach(array_name) array[i] = data.load_augment(fname, **kwargs) class BatchIt...
0
0
0
0
0
0
tests/large/splunk/clilib/cli_common.py
technimad/eventgen
305
3226080
def get(name) -> dict[object,object]: return {} def getMergedConf(name) -> dict[object,object]: return {}
0
2
0
0
2
0
third_party/gae_ts_mon/gae_ts_mon/protos/acquisition_task_pb2.py
tingshao/catapult
2,151
3226087
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: acquisition_task.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection ...
0
0
0
0
0
0
wyze_sdk/service/api_service.py
RebelTat/wyze-sdk
132
3226094
from __future__ import annotations import logging from datetime import datetime, timedelta from time import gmtime, strftime from typing import Any, Dict, Optional, Sequence, Tuple, Union from wyze_sdk.errors import WyzeRequestError from wyze_sdk.models import datetime_to_epoch from wyze_sdk.models.devices import Dev...
76
27
5
0
108
0
var/spack/repos/builtin/packages/py-geoplot/package.py
kkauder/spack
2,360
3226098
<reponame>kkauder/spack # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyGeoplot(PythonPackage): """geoplot is a high-level Python geospa...
0
0
0
0
0
0
moya/command/sub/extract.py
moyaproject/moya
129
3226136
from __future__ import annotations from __future__ import unicode_literals from __future__ import print_function from ...command import SubCommand from ...wsgi import WSGIApplication from ...console import Cell from ...template.moyatemplates import Template from datetime import datetime from fs.path import join impo...
4
1
1
0
6
0
Website-Blocker/website_blocker.py
elishahyousaf/Awesome-Python-Scripts
1,026
3226148
<reponame>elishahyousaf/Awesome-Python-Scripts import time from datetime import datetime as dt host_temp = "hosts" #host file copied to the directory for ease. host_path = r"/etc/hosts" #original host file address in linux redirect = "127.0.0.1" website_list = ["www.facebook.com", "facebook.com"] #You can add your own...
0
0
0
0
0
0
test/test_intensify/test_hyperband.py
mcx/SMAC3
711
3226151
<gh_stars>100-1000 import unittest from unittest import mock import logging import numpy as np import time from ConfigSpace import Configuration, ConfigurationSpace from ConfigSpace.hyperparameters import UniformIntegerHyperparameter from smac.intensification.abstract_racer import RunInfoIntent from smac.intensifica...
0
0
0
0
0
0
Wrapping/Python/paraview/vtkConstants.py
xj361685640/ParaView
815
3226165
"""This is present for backwards compatibility alone. Scripts are encouraged to use `vtkConstants` from `vtk` package directly as follows: from paraview.vtk.util import vtkConstants """ from vtkmodules.util.vtkConstants import *
0
0
0
0
0
0
HLTriggerOffline/Egamma/test/testEmDQM_cfg.py
ckamtsikis/cmssw
852
3226168
<filename>HLTriggerOffline/Egamma/test/testEmDQM_cfg.py import FWCore.ParameterSet.Config as cms from DQMServices.Core.DQMEDHarvester import DQMEDHarvester process = cms.Process("emdqm") process.load('Configuration/StandardSequences/FrontierConditions_GlobalTag_cff') process.GlobalTag.globaltag = 'START72_V1::All' p...
0
0
0
0
0
0
jni-build/jni/include/tensorflow/python/summary/summary.py
rcelebi/android-elfali
680
3226180
<filename>jni-build/jni/include/tensorflow/python/summary/summary.py # Copyright 2016 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...
0
0
0
0
0
0
configs/textrecog/sar/sar_r31_parallel_decoder_chinese.py
Jessmin/TableMASTER-mmocr
206
3226182
<reponame>Jessmin/TableMASTER-mmocr _base_ = ['../../_base_/default_runtime.py'] dict_file = 'data/chineseocr/labels/dict_printed_chinese_english_digits.txt' label_convertor = dict( type='AttnConvertor', dict_file=dict_file, with_unknown=True) model = dict( type='SARNet', backbone=dict(type='ResNet31OCR')...
0
0
0
0
0
0
collectors/ProjectCrobat.py
gfek/Lepus
218
3226188
<filename>collectors/ProjectCrobat.py<gh_stars>100-1000 import requests from json import loads from termcolor import colored def init(domain, ranges): Crobat = [] print(colored("[*]-Searching Project Crobat...", "yellow")) url = "https://sonar.omnisint.io/subdomains/{0}".format(domain) headers = {"user-agent": ...
0
0
0
0
0
0
misc/benchmark_bls.py
kxxt/taichi
11,699
3226203
import sys import taichi as ti sys.path.append('../tests/python/') from bls_test_template import bls_test_template ti.init(arch=ti.gpu, print_ir=True, kernel_profiler=True, demote_dense_struct_fors=False) stencil = [(0, 0), (0, -1), (0, 1), (-1, 0), (1, 0)] bls_test_template(2, ...
0
0
0
0
0
0
python/pynessie/auth/aws.py
dimas-b/nessie
432
3226204
<reponame>dimas-b/nessie # -*- coding: utf-8 -*- """Use AWS4Auth and botocore to fetch credentials and sign requests.""" from botocore.credentials import get_credentials from botocore.session import Session from requests_aws4auth import AWS4Auth def setup_aws_auth(region: str, profile: str = None) -> AWS4Auth: ""...
0
0
0
0
0
0
cfgov/regulations3k/jinja2tags.py
Colin-Seifer/consumerfinance.gov
156
3226237
from __future__ import annotations import datetime from wagtail.contrib.routable_page.templatetags.wagtailroutablepage_tags import ( # noqa: B950 routablepageurl, ) import jinja2 from dateutil import parser from jinja2.ext import Extension from jinja2.filters import do_mark_safe from regdown import regdown as re...
0
3
0
0
3
0
blogs/migrations/0004_delete_homepage.py
daaawx/bearblog
657
3226241
# Generated by Django 3.0.6 on 2020-05-21 19:47 from django.db import migrations class Migration(migrations.Migration): dependencies: list[tuple[str, str]] = [ ('blogs', '0003_homepage'), ] operations: list[object] = [ migrations.DeleteModel( name='Homepage', ), ...
0
0
2
0
2
0
OmniMarkupLib/Renderers/libs/pygments/lexers/rdf.py
henumohe/OmniMarkupPreviewer
652
3226264
# -*- coding: utf-8 -*- """ pygments.lexers.rdf ~~~~~~~~~~~~~~~~~~~ Lexers for semantic web and RDF query languages and markup. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import RegexLexer, bygroups...
0
0
5
0
5
0
open_seq2seq/encoders/cnn_encoder.py
gioannides/OpenSeq2Seq
1,459
3226266
<filename>open_seq2seq/encoders/cnn_encoder.py # Copyright (c) 2018 NVIDIA Corporation """ This module contains classes and functions to build "general" convolutional neural networks from the description of arbitrary "layers". """ from __future__ import absolute_import, division, print_function from __future__ import u...
0
0
0
0
0
0
tests/importer/caffe_/basic/test_reverse.py
ChanSiYuan/nncase
510
3226292
<gh_stars>100-1000 # Copyright 2019-2021 Canaan Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
0
0
0
0
0
0
codigo/Live08/dml.py
cassiasamp/live-de-python
572
3226306
<gh_stars>100-1000 """ DML - Manipulação de dados C - CREATE R - READ U - UPDATE D - DELETE """ import sqlite3 def commit_close(func): def decorator(*args): con = sqlite3.connect('base.db') cur = con.cursor() sql = func(*args) cur.execute(sql) con.commit() con.close...
0
0
0
0
0
0
src/azure-cli/azure/cli/command_modules/security/tests/latest/test_pricings_scenario.py
staer/azure-cli
3,287
3226307
<gh_stars>1000+ # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ----------------------------------------------------...
0
0
0
0
0
0
packs/qualys/actions/list_reports.py
userlocalhost2000/st2contrib
164
3226324
from lib.base import QualysBaseAction __all__ = [ 'ListReportsAction' ] class ListReportsAction(QualysBaseAction): def run(self) -> object: reports = self.connection.listReports() return self.resultsets.formatter(reports)
0
1
0
0
1
0
exercises/fr/test_02_10_01.py
Jette16/spacy-course
2,085
3226326
def test(): assert ( "doc1.similarity(doc2)" or "doc2.similarity(doc1)" in __solution__ ), "Compares-tu la similarité entre les deux docs ?" assert ( 0 <= float(similarity) <= 1 ), "La valeur de similarité doit être un nombre flottant. L'as-tu calculé correctement ?" __msg__.good("Bi...
0
0
0
0
0
0
desktop/libs/hadoop/src/hadoop/fs/hadoopfs.py
rohankumardubey/hue
5,079
3226332
<gh_stars>1000+ #!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "L...
0
0
0
0
0
0
causalimpact/model.py
glentakahashi/tfcausalimpact
273
3226353
# Copyright WillianFuks # # 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, softw...
28
13
0
0
41
0