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
pptx/parts/image.py
StephanEggermont/python-pptx
1,429
1742333
<reponame>StephanEggermont/python-pptx # encoding: utf-8 """ImagePart and related objects.""" from __future__ import division import hashlib import os try: from PIL import Image as PIL_Image except ImportError: import Image as PIL_Image from pptx.compat import BytesIO, is_string from pptx.opc.package impor...
0
0
0
0
0
0
docs/components_page/components/button/size.py
glsdown/dash-bootstrap-components
776
1742406
<reponame>glsdown/dash-bootstrap-components import dash_bootstrap_components as dbc from dash import html buttons = html.Div( [ dbc.Button("Large button", size="lg", className="me-1"), dbc.Button("Regular button", className="me-1"), dbc.Button("Small button", size="sm"), ] )
0
0
0
0
0
0
chainer_compiler/elichika/typing/ext/common.py
shinh/chainer-compiler
116
1742429
<reponame>shinh/chainer-compiler from chainer_compiler.elichika.typing.ext.utils import * from chainer_compiler.elichika.typing.types import * from chainer_compiler.elichika.typing.shape_elem import * __all__ = [ 'ty_MakeTensor' , 'ty_Shape' , 'ty_Size' , 'ty_DType' ...
0
0
0
0
0
0
Python38/Lib/site-packages/future/moves/tkinter/simpledialog.py
AXFS-H/Windows10Debloater
908
1742432
<gh_stars>100-1000 from __future__ import absolute_import from future.utils import PY3 if PY3: from tkinter.simpledialog import * else: try: from SimpleDialog import * except ImportError: raise ImportError('The SimpleDialog module is missing. Does your Py2 ' 'inst...
0
0
0
0
0
0
lsoftmax.py
luoyetx/mx-lsoftmax
194
1742477
import os import math import mxnet as mx import numpy as np # MXNET_CPU_WORKER_NTHREADS must be greater than 1 for custom op to work on CPU os.environ['MXNET_CPU_WORKER_NTHREADS'] = '2' class LSoftmaxOp(mx.operator.CustomOp): '''LSoftmax from <Large-Margin Softmax Loss for Convolutional Neural Networks> '''...
0
0
0
0
0
0
cocos/tests/test_numerics/test_statistics/test_rng/test_wald_rng.py
michaelnowotny/cocos
101
1742505
<filename>cocos/tests/test_numerics/test_statistics/test_rng/test_wald_rng.py import pytest import cocos.numerics as cn from cocos.tests.test_numerics.test_statistics.utilities import perform_ks_test n_kolmogorov_smirnov = 1000000 test_data = [ (1.0, 1.0, n_kolmogorov_smirnov), (1.0, 0.2, n...
0
0
0
0
0
0
homeassistant/components/wallbox/config_flow.py
liangleslie/core
30,023
1742507
"""Config flow for Wallbox integration.""" from __future__ import annotations from collections.abc import Mapping from typing import Any import voluptuous as vol from wallbox import Wallbox from homeassistant import config_entries, core from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from homeassistant....
4
4
0
1
9
0
tf_coder/natural_language/description_handler_factory_test.py
hstrohm/PyTorch-Coder-cheat
245
1742516
<gh_stars>100-1000 # Copyright 2021 The TF-Coder Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
0
0
0
0
0
0
Chapter13/Flask-YouTube/setup.py
jayakumardhananjayan/pythonwebtut
135
1742521
from setuptools import setup, find_packages setup( name='Flask-YouTube', version='0.4', license='MIT', description='Flask extension to allow easy embedding of YouTube videos', author='<NAME>', author_email='<EMAIL>', platforms='any', install_requires=['Flask'], packages=find_package...
0
0
0
0
0
0
tests/forte/data/converter/converter_test.py
jzpang/forte
163
1742525
<gh_stars>100-1000 # Copyright 2020 The Forte 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 req...
0
0
0
0
0
0
envpool/mujoco/dmc/mujoco_dmc_align_test.py
sail-sg/envpool
330
1742529
<reponame>sail-sg/envpool # Copyright 2022 Garena Online Private Limited # # 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 require...
0
0
0
0
0
0
nuitka/plugins/standard/ZmqPlugin.py
byehack/Nuitka
1,228
1742555
# Copyright 2021, <NAME>, mailto:<EMAIL> # # Part of "Nuitka", an optimizing Python compiler that is compatible and # integrates with CPython, but also works on its own. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
0
2
2
1
5
0
src/clusto/drivers/devices/powerstrips/__init__.py
thekad/clusto
216
1742557
from basicpowerstrip import *
0
0
0
0
0
0
Python/endless_loop.py
PushpneetSingh/Hello-world
1,428
1742587
<filename>Python/endless_loop.py<gh_stars>1000+ while(1): print('LOL')
0
0
0
0
0
0
src/einsteinpy/geodesic/__init__.py
epsilonethan/einsteinpy
485
1742602
<filename>src/einsteinpy/geodesic/__init__.py from .geodesic import Geodesic, Nulllike, Timelike __all__ = ["Geodesic", "Nulllike", "Timelike"]
0
0
0
0
0
0
marge/commit.py
vonkad/marge-bot
518
1742633
<reponame>vonkad/marge-bot import re from requests.utils import quote from . import gitlab GET = gitlab.GET class Commit(gitlab.Resource): @classmethod def fetch_by_id(cls, project_id, sha, api): info = api.call(GET( '/projects/{project_id}/repository/commits/{sha}'.format( ...
0
0
0
0
0
0
nes-testsuite/roms/holy_diver_batman/source/tools/make_roms.py
lpil/pinky
719
1742687
#!/usr/bin/env python from __future__ import with_statement, division import array INES_MIRRH = 0 INES_MIRRV = 1 INES_MIRR4 = 8 INES_NTSC = 0 INES_PAL = 1 INES_DUAL_TVSYSTEM = 2 MAPPER_NROM = 0 MAPPER_MMC1 = 1 MAPPER_UNROM = 2 MAPPER_CNROM = 3 MAPPER_MMC3 = 4 MAPPER_MMC5 = 5 MAPPER_AOROM = 7 MAPPER_MMC2 = 9 MAPPER_MMC...
0
0
0
0
0
0
company/models.py
skyydq/GreaterWMS
1,063
1742705
from django.db import models class ListModel(models.Model): company_name = models.CharField(max_length=255, verbose_name="Company Name") company_city = models.CharField(max_length=255, verbose_name="Company City") company_address = models.CharField(max_length=255, verbose_name="Company Address") compan...
0
1
4
0
5
0
env/lib/python3.4/site-packages/bulbs/titan/client.py
mudbungie/NetExplorer
234
1742708
# -*- coding: utf-8 -*- # # Copyright 2012 <NAME> (http://jamesthornton.com) # BSD License (see LICENSE for details) # from __future__ import annotations """ Bulbs supports pluggable clients. This is the Rexster client. """ from bulbs.config import Config, DEBUG from bulbs.registry import Registry from bulbs.utils imp...
60
24
0
0
84
0
models/gcn_dense.py
lavig17/Knowledge-Graph-Image
189
1742726
<gh_stars>100-1000 import numpy as np import scipy.sparse as sp import torch import torch.nn as nn import torch.nn.functional as F from torch.nn.init import xavier_uniform_ from utils import normt_spm, spm_to_tensor class GraphConv(nn.Module): def __init__(self, in_channels, out_channels, dropout=False, relu=T...
0
0
0
0
0
0
apps/dash-spatial-clustering/helpers.py
JeroenvdSande/dash-sample-apps
2,332
1742739
import json import os import shutil import time import pandas as pd import numpy as np import pathlib import geopandas as gpd import pysal as ps from sklearn import cluster from sklearn.preprocessing import scale # Data reading & Processing app_path = pathlib.Path(__file__).parent.resolve() data_path = pathlib.Path(...
0
2
0
0
2
0
Packs/GroupIB_ThreatIntelligenceAttribution/Scripts/GIBIncidentUpdateIncludingClosed/GIBIncidentUpdateIncludingClosed_test.py
diCagri/content
799
1742758
import demistomock as demisto from GIBIncidentUpdateIncludingClosed import prevent_duplication EXISTING_INCIDENT = [ { "Contents": { "total": 1, "data": [ {"id": "1", "gibid": "12v"} ] } } ] INCOMING_INCIDENT = {"gibid": "12v...
0
0
0
0
0
0
ThirdParty/mono/repo/packaging/MacSDK/sqlite.py
Marsel24/fonline
172
1742762
<filename>ThirdParty/mono/repo/packaging/MacSDK/sqlite.py Package('sqlite-autoconf', '3090200', sources=[ 'https://www.sqlite.org/2015/%{name}-%{version}.tar.gz' ])
0
0
0
0
0
0
zopkio/results_collector.py
asifurrouf/Framework_Zopkio
138
1742781
<reponame>asifurrouf/Framework_Zopkio # Copyright 2014 LinkedIn Corp. # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to yo...
0
0
0
0
0
0
dask_sql/physical/rex/base.py
DaceT/dask-sql
154
1742794
<reponame>DaceT/dask-sql from typing import Any, Union import dask.dataframe as dd import dask_sql from dask_sql.datacontainer import DataContainer from dask_sql.java import org class BaseRexPlugin: """ Base class for all plugins to convert between a RexNode to a python expression (dask dataframe column...
0
0
0
0
0
0
watchmen/main.py
Insurance-Metrics-Measure-Advisory/watchman-data-connector
125
1742815
<reponame>Insurance-Metrics-Measure-Advisory/watchman-data-connector import asyncio import logging from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from watchmen_boot.config.config import settings from watchmen.connector.kafka import kafka_connector from watchmen.connector.rabbitmq impor...
0
0
0
0
0
0
tests/steps/matching/test_sparse_matching.py
fchapoton/cars
134
1742839
#!/usr/bin/env python # coding: utf8 # # Copyright (c) 2020 Centre National d'Etudes Spatiales (CNES). # # This file is part of CARS # (see https://github.com/CNES/cars). # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obta...
0
0
0
0
0
0
zamiaai/skills/psychology/negative.py
0zAND1z/zamia-ai
129
1742842
<reponame>0zAND1z/zamia-ai #!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2016, 2017, 2018 <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/l...
0
0
0
0
0
0
tools/Sikuli/TypeHome.sikuli/MoveActiveWindowFullScreen.py
marmyshev/vanessa-automation
296
1742868
type(Key.UP, KeyModifier.WIN) sleep(1) exit(0)
0
0
0
0
0
0
winerama/load_users.py
geomars/winerama-recommender-tutorial
376
1742881
import sys, os import pandas as pd os.environ.setdefault("DJANGO_SETTINGS_MODULE", "winerama.settings") import django django.setup() from django.contrib.auth.models import User def save_user_from_row(user_row): user = User() user.id = user_row[0] user.username = user_row[1] user.save() i...
0
0
0
0
0
0
bin/archive/basenji_sadf.py
egilbertson-ucsf/basenji
232
1742896
#!/usr/bin/env python # Copyright 2017 Calico LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
0
3
0
0
3
0
test/clone_test.py
shouldsee/luigi
14,755
1742909
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
0
6
0
0
6
0
core/trape.py
itsraina/trape
6,296
1742915
<gh_stars>1000+ #!/usr/bin/env python # -*- coding: utf-8 -*- #** # ######### # trape # ######### # # trape depends of this file # For full copyright information this visit: https://github.com/jofpin/trape # # Copyright 2018 by <NAME> (@jofpin) / <<EMAIL>> #** import time import json import urllib from core.dependence ...
0
0
0
0
0
0
017-osdev-06/build.py
gynvael/stream
152
1742928
<reponame>gynvael/stream #!/usr/bin/python import os import subprocess def fix_stage1_size(): stage2_size = os.stat("stage2").st_size kernel_size = os.stat("kernel64").st_size stage2_size = (stage2_size + kernel_size + 511) / 512 if stage2_size >= 255: raise Exception("stage2 & kernel are too ...
0
0
0
0
0
0
kloppy/infra/serializers/event/wyscout/__init__.py
cedrickrause/kloppy
176
1742945
from .serializer import WyscoutSerializer
0
0
0
0
0
0
강의 자료/02-알고리즘/15~17-동적 프로그래밍/문제별 코드/11726-2xN 타일링/solution.py
rhs0266/FastCampus
407
1742946
import heapq import sys si = sys.stdin.readline n = int(si()) dy = [0] * (n + 2) # 초기값 채우기 dy[1], dy[2] = 1, 2 # 점화식을 토대로 dy 배열 채우기 for i in range(3, n + 1): dy[i] = (dy[i - 1] + dy[i - 2]) % 10007 print(dy[n])
0
0
0
0
0
0
astropy/coordinates/tests/test_sky_coord_velocities.py
jayvdb/astropy
445
1742948
<filename>astropy/coordinates/tests/test_sky_coord_velocities.py<gh_stars>100-1000 # -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Tests for putting velocity differentials into SkyCoord objects. Note: the skyoffset velocity tests are in a different file, in test_skyoffset_t...
0
0
0
0
0
0
setup.py
spenly/python-duckling
129
1742950
"""A wrapper for wit.ai's Duckling. See: https://github.com/wit-ai/duckling """ from setuptools import setup setup( name='duckling', version='1.8.0', description='A wrapper for wit.ai\'s Duckling', url='https://github.com/FraBle/python-duckling', author='<NAME>', author_email='<EMAIL>', ...
0
0
0
0
0
0
airmozilla/manage/views/authmigrate.py
mozilla/airmozilla
115
1742957
from __future__ import annotations from django import forms from django.shortcuts import render from django.contrib.auth import get_user_model from .decorators import superuser_required from airmozilla.manage.forms import BaseForm from airmozilla.main.models import ( Event, SuggestedEvent, EventEmail, ...
5
3
0
0
8
0
blender/arm/logicnode/native/LN_write_storage.py
onelsonic/armory
2,583
1742973
<reponame>onelsonic/armory from arm.logicnode.arm_nodes import * class WriteStorageNode(ArmLogicTreeNode): """Writes the given content in the given key. @seeNode Read Storage""" bl_idname = 'LNWriteStorageNode' bl_label = 'Write Storage' arm_section = 'file' arm_version = 1 def arm_init(s...
0
0
0
0
0
0
main.py
domci/doms_goosepaper
178
1742991
import logging from datetime import datetime from goosepaper.goosepaper import Goosepaper from goosepaper.reddit import RedditHeadlineStoryProvider from goosepaper.rss import RSSFeedStoryProvider from goosepaper.twitter import MultiTwitterStoryProvider from goosepaper.weather import WeatherStoryProvider from goosepape...
0
0
0
0
0
0
components/stdproc/orbit/setmocomppath/test/testSetmocomppath.py
vincentschut/isce2
1,133
1743070
<gh_stars>1000+ #!/usr/bin/env python3 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # Copyright 2010 California Institute of Technology. ALL RIGHTS RESERVED. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with th...
0
0
0
0
0
0
colossus/apps/campaigns/tests/test_models.py
CreativeWurks/emailerpro
372
1743077
<reponame>CreativeWurks/emailerpro<gh_stars>100-1000 from django.contrib.sites.shortcuts import get_current_site from django.urls import reverse from colossus.apps.campaigns import models from colossus.apps.campaigns.constants import CampaignStatus from colossus.apps.campaigns.models import Campaign from colossus.apps...
0
0
0
0
0
0
publish.py
michaelpetrov/dataclasses-json
811
1743097
<filename>publish.py import argparse import re import subprocess version_pattern = r'\d\.\d\.\d' parser = argparse.ArgumentParser() parser.add_argument('version', help='a SEMVER string X.Y.Z') args = parser.parse_args() if not re.match(version_pattern, args.version): print('argument must be SEMVER string in format...
0
0
0
0
0
0
modules/vulnerability-analysis/oscanner.py
decidedlygray/ptf
4,391
1743124
#!/usr/bin/env python ##################################### # Installation module for oscanner ##################################### # AUTHOR OF MODULE NAME AUTHOR="<NAME> (xkulio)" # DESCRIPTION OF THE MODULE DESCRIPTION="This module will install/update Oracle Scanner (oscanner)" # INSTALL TYPE GIT, SVN, FILE DOWNL...
0
0
0
0
0
0
tests/test_trainer.py
aniketmaurya/Chitra
158
1743127
from unittest.mock import MagicMock import numpy as np import pytest import tensorflow as tf from tensorflow import keras from chitra.trainer import Dataset, InterpretModel, Trainer, create_cnn dataset = Dataset("./") cnn = create_cnn("mobilenetv2", num_classes=1000, keras_applications=False) trainer = Trainer(datas...
0
0
0
0
0
0
lbry/stream/stream_manager.py
nishp77/lbry-sdk
4,996
1743140
<gh_stars>1000+ import os import asyncio import binascii import logging import random import typing from typing import Optional from aiohttp.web import Request from lbry.error import InvalidStreamDescriptorError from lbry.file.source_manager import SourceManager from lbry.stream.descriptor import StreamDescriptor from ...
0
0
0
0
0
0
pybitcoin/transactions/__init__.py
sea212/pybitcoin
220
1743145
# -*- coding: utf-8 -*- """ pybitcoin ~~~~~ :copyright: (c) 2014-2016 by Halfmoon Labs, Inc. :license: MIT, see LICENSE for more details. """ import opcodes from .network import broadcast_transaction, send_to_address, get_unspents, \ embed_data_in_blockchain, make_send_to_address_tx, make_op_retu...
0
0
0
0
0
0
stp_zmq/test/test_heartbeats.py
jandayanan/indy-plenum
148
1743146
import pytest from stp_zmq.test.helper import create_and_prep_stacks, \ check_stacks_communicating, add_counters_to_ping_pong def sent_ping_counts(*stacks) -> object: return {s.name: s.sent_ping_count for s in stacks} def sent_pong_counts(*stacks) -> object: return {s.name: s.sent_pong_count for s in s...
0
5
0
0
5
0
tests/nnapi/specs/skip/V1_2/roi_pooling.mod.py
bogus-sudo/ONE-1
255
1743166
# # Copyright (C) 2018 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
0
0
0
0
0
0
ClemBot.Bot/bot/services/thread_handling_service.py
Iapetus-11/ClemBot
121
1743174
<filename>ClemBot.Bot/bot/services/thread_handling_service.py import logging import discord from bot.messaging.events import Events from bot.services.base_service import BaseService log = logging.getLogger(__name__) class ThreadHandlingService(BaseService): def __init__(self, *, bot): super().__init__...
0
0
0
0
0
0
alipay/aop/api/response/AlipayAppTokenGetResponse.py
snowxmas/alipay-sdk-python-all
213
1743176
#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.response.AlipayResponse import AlipayResponse class AlipayAppTokenGetResponse(AlipayResponse): def __init__(self): super(AlipayAppTokenGetResponse, self).__init__() self._app_access_token: None = None self._exp...
0
2
0
2
4
0
eli5_retrieval_large_lm/check_flags.py
deepneuralmachine/google-research
23,901
1743181
<filename>eli5_retrieval_large_lm/check_flags.py<gh_stars>1000+ # coding=utf-8 # Copyright 2021 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www...
0
0
0
0
0
0
leonardo/module/media/__init__.py
timgates42/django-leonardo
102
1743190
<filename>leonardo/module/media/__init__.py from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from .widget import * default_app_config = 'leonardo.module.media.MediaConfig' class Default(object): optgroup = 'Media' @property def apps(self): return [ ...
0
0
0
0
0
0
tests/test_input_time_poisson.py
clazaro/sfepy
510
1743217
# c: 06.02.2008, r: 06.02.2008 from __future__ import absolute_import input_name = '../examples/diffusion/time_poisson.py' output_name_trunk = 'test_time_poisson' from tests_basic import TestInputEvolutionary class Test( TestInputEvolutionary ): pass
0
0
0
0
0
0
Self_Descriptive_Number/Python/wasi0013/Self_Descriptive_Number.py
Mynogs/Algorithm-Implementations
1,184
1743248
def selfDescriptiveNumber(num) -> object: """ -- Self-Descriptive Number -- See: http://en.wikipedia.org/wiki/Self-descriptive_number -- Checks if the given number is self-descriptive -- num : a number, in base 10 -- returns : true if the number is self-descriptive, false otherwise """ sdNum=0 #creat...
0
1
0
0
1
0
examples/csr1000v_example.py
doesitblend/ncclient
498
1743250
<filename>examples/csr1000v_example.py # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright 2013 Cisco Systems, 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 L...
0
0
0
0
0
0
app/PIP-COVID19/app_realtime.py
loramf/mlforhealthlabpub
171
1743270
<gh_stars>100-1000 # Import required libraries import os import pickle import copy import datetime as dt import math import requests import pandas as pd from flask import Flask import dash import dash_daq as daq import dash_table from dash.dependencies import Input, Output, State import dash_core_components as dcc im...
0
0
0
0
0
0
credentialdigger/cli/get_discoveries.py
Soontao/credential-digger
189
1743273
<reponame>Soontao/credential-digger """ The 'get_discoveries' module can be used to retrieve the discoveries on the fly from the terminal. It supports both the Sqlite and Postgres clients. NOTE: Postgres is used by default. Please make sure that the environment variables are exported. usage: credentialdigger get_disc...
0
0
0
0
0
0
tester/test_handlers/test_widget_handler.py
bukun/TorCMS
243
1743284
<reponame>bukun/TorCMS # # -*- coding:utf-8 -*- # # from torcms.handlers.widget_handler import WidgetHandler # # # def Test(): # urls = [ # ("/label/(.*)", WidgetHandler, {}), # ] # assert urls
0
0
0
0
0
0
demo_cnn.py
TKHuang/simple-railway-captcha-solver
714
1743326
from keras.models import load_model from keras.models import Model from keras import backend as K from PIL import Image import numpy as np import os import csv LETTERSTR = "0123456789ABCDEFGHJKLMNPQRSTUVWXYZ" def toonehot(text) -> object: labellist = [] for letter in text: onehot = [0 for _ in range(3...
0
1
0
0
1
0
transformations/tag_subsequence_substitution/data.py
raft001/NL-Augmenter
583
1743372
<gh_stars>100-1000 from datasets import load_dataset conll03_dataset = load_dataset("conll2003") id2name = conll03_dataset["train"].features["pos_tags"].feature.names example_dataset = [ (x, [id2name[z] for z in y]) for x, y in zip( conll03_dataset["train"]["tokens"], conll03_dataset["train"]["...
0
0
0
0
0
0
qiskit/providers/aer/jobs/utils.py
garrison/qiskit-aer
313
1743381
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2019. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
4
9
0
0
13
0
Chapters/utils_chapter11.py
ChakirBelhaj/python-for-text-analysis
255
1743389
<filename>Chapters/utils_chapter11.py def happy_birthday(name): """ Print a birthday song with the "name" of the person inserted. """ print("Happy Birthday to you!") print("Happy Birthday to you!") print("Happy Birthday, dear " + name + ".") print("Happy Birthday to you!") def multiply(x, ...
0
0
0
0
0
0
scripts/create_split.py
FooVizDevs/occupancy_networks
801
1743393
<reponame>FooVizDevs/occupancy_networks import argparse import os import random parser = argparse.ArgumentParser( description='Split data into train, test and validation sets.') parser.add_argument('in_folder', type=str, help='Input folder where data is stored.') parser_nval = parser.add_mutua...
0
0
0
0
0
0
tests/cpu/common_methods_invocations.py
CaoE/intel-extension-for-pytorch
322
1743408
<gh_stars>100-1000 ''' From PyTorch: Copyright (c) 2016- Facebook, Inc (<NAME>) Copyright (c) 2014- Facebook, Inc (<NAME>) Copyright (c) 2011-2014 Idiap Research Institute (<NAME>) Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu) Copyright (c) 2011-2012 NEC Laboratorie...
0
0
0
0
0
0
src/genie/libs/parser/iosxr/tests/ShowMfibPlatformEvpnBucketLocation/cli/equal/golden_output_expected.py
balmasea/genieparser
204
1743412
<gh_stars>100-1000 expected_output = { 'bucket_id': {0: {'esi_interface': 'Bundle-Ether1', 'handle': '0x4000660', 'stale': 'F', 'state': 'DF' }, 1: {'esi_interface': 'Bundle-Ether1', 'handle': '0x4000660', ...
0
0
0
0
0
0
mmcls/datasets/voc.py
YuxinZou/mmclassification
1,190
1743439
<gh_stars>1000+ # Copyright (c) OpenMMLab. All rights reserved. import os.path as osp import xml.etree.ElementTree as ET import mmcv import numpy as np from .builder import DATASETS from .multi_label import MultiLabelDataset @DATASETS.register_module() class VOC(MultiLabelDataset): """`Pascal VOC <http://host.r...
0
0
0
0
0
0
django_redis/exceptions.py
DoubleCai/django-redis
727
1743450
from __future__ import annotations class ConnectionInterrupted(Exception): def __init__(self, connection, parent: object | None=None): self.connection = connection def __str__(self) -> str: error_type = type(self.__cause__).__name__ error_msg = str(self.__cause__) return f"Redis...
1
1
0
0
2
0
msticpy/datamodel/entities/process.py
kubajir/msticpy
820
1743457
<gh_stars>100-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
datashader/glyphs/points.py
ianthomas23/datashader
758
1743463
<reponame>ianthomas23/datashader from __future__ import absolute_import, division from packaging.version import Version import numpy as np from toolz import memoize from datashader.glyphs.glyph import Glyph from datashader.utils import isreal, ngjit from numba import cuda try: import cudf from ..transfer_fun...
0
0
0
0
0
0
tests/genicam_tests/nodetest.py
xiaoxstz/pypylon
358
1743493
# ----------------------------------------------------------------------------- # (c) 2005 by Basler Vision Technologies # Section: Vision Components # Project: GenApiTest # Author: # $Header: # ----------------------------------------------------------------------------- from genicam import * import unittest f...
0
2
0
0
2
0
homeassistant/components/broadlink/helpers.py
MrDelik/core
30,023
1743508
"""Helper functions for the Broadlink integration.""" from base64 import b64decode from homeassistant import config_entries from homeassistant.const import CONF_HOST from homeassistant.helpers import config_validation as cv from .const import DOMAIN def data_packet(value) -> object: """Decode a data packet give...
0
3
0
0
3
0
program/image-classification-tf-py/benchmark.nvidia-tx1.py
TITAN-PyCompat/ck-tensorflow
108
1743510
#! /usr/bin/python from __future__ import annotations import ck.kernel as ck import copy import re import argparse # Platform tag. platform_tags='nvidia-tx1' # Batch size. bs={ 'start':1, 'stop':8, 'step':1, 'default':1 } # Number of statistical repetitions e.g. 3. num_repetitions=3 # Number of batches to ...
0
1
0
0
1
0
migrations/versions/0c05d3df71bd_added_reflections_to_article.py
Largo/Lurnby
590
1743520
<gh_stars>100-1000 """added reflections to article Revision ID: 0c05d3df71bd Revises: <PASSWORD> Create Date: 2022-01-04 18:39:55.804465 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = '0c05d3df71bd' down_revision = '<PASSWORD>' branch_labels = None depends_on ...
0
0
0
0
0
0
salesman/checkout/apps.py
icvntechstudio/django-salesman
222
1743543
from django.apps import AppConfig from django.utils.translation import gettext_lazy as _ class SalesmanCheckoutApp(AppConfig): name: str = 'salesman.checkout' label: str = 'salesmancheckout' verbose_name = _("Checkout")
0
0
2
0
2
0
my/time/tz/via_location.py
seanbreckenridge/HPI-to-master
1,026
1743547
from __future__ import annotations ''' Timezone data provider, guesses timezone based on location data (e.g. GPS) ''' REQUIRES = [ # for determining timezone by coordinate 'timezonefinder', ] from collections import Counter from datetime import date, datetime from functools import lru_cache from itertools imp...
6
10
4
0
20
0
mypy/test/testutil.py
anmolrajsoni15/mypy
12,496
1743548
<gh_stars>1000+ import os from unittest import mock, TestCase from mypy.util import get_terminal_width class TestGetTerminalSize(TestCase): def test_get_terminal_size_in_pty_defaults_to_80(self) -> None: # when run using a pty, `os.get_terminal_size()` returns `0, 0` ret = os.terminal_size((0, 0)...
0
0
0
0
0
0
torchbenchmark/models/fastNLP/reproduction/sequence_labelling/chinese_ner/LatticeLSTM/pathes.py
Chillee/benchmark
2,693
1743554
<filename>torchbenchmark/models/fastNLP/reproduction/sequence_labelling/chinese_ner/LatticeLSTM/pathes.py glove_100_path = 'en-glove-6b-100d' glove_50_path = 'en-glove-6b-50d' glove_200_path = '' glove_300_path = 'en-glove-840b-300' fasttext_path = 'en-fasttext' #300 tencent_chinese_word_path = 'cn' # tencent 200 fas...
0
0
0
0
0
0
scirpy/util/_negative_binomial.py
BenTenmann/scirpy
104
1743562
<reponame>BenTenmann/scirpy<filename>scirpy/util/_negative_binomial.py """Function to fit a negative binomial distribution. Adapted from https://github.com/gokceneraslan/fit_nbinom Copyright (C) 2014 <NAME> Permission granted to include it in Scirpy under BSD-License in https://github.com/gokceneraslan/fit_nbinom/is...
0
0
0
0
0
0
contrib/automation_tests/orbit_instance_connection.py
akopich/orbit
1,847
1743566
<gh_stars>1000+ """ Copyright (c) 2021 The Orbit 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 absl import app from core.orbit_e2e import E2ETestSuite from test_cases.connection_window import (ConnectToStadiaInstance, Disconnec...
0
0
0
0
0
0
Algo and DSA/LeetCode-Solutions-master/Python/custom-sort-string.py
Sourav692/FAANG-Interview-Preparation
3,269
1743573
<reponame>Sourav692/FAANG-Interview-Preparation # Time: O(n) # Space: O(1) import collections class Solution(object): def customSortString(self, S, T): """ :type S: str :type T: str :rtype: str """ counter, s = collections.Counter(T), set(S) result = [c*co...
0
0
0
0
0
0
thirdparty/freetype/builds/meson/process_ftoption_h.py
rh101/engine-x
113
1743586
<reponame>rh101/engine-x #!/usr/bin/env python # # Copyright (C) 2020-2021 by # <NAME>, <NAME>, and <NAME>. # # This file is part of the FreeType project, and may only be used, modified, # and distributed under the terms of the FreeType project license, # LICENSE.TXT. By continuing to use, modify, or distribute this f...
0
0
0
0
0
0
surround360_render/scripts/color_calibrate_all.py
DarwinSenior/Surround360
2,326
1743647
<reponame>DarwinSenior/Surround360<filename>surround360_render/scripts/color_calibrate_all.py #!/usr/bin/env python2 # Copyright (c) 2016-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE_render file in the root directory of this subprojec...
0
0
0
0
0
0
tensorboard/tools/inline_file_content.py
Digitaltransform/tensorboard
6,139
1743658
# Copyright 2020 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...
0
2
0
0
2
0
extraPackages/matplotlib-3.0.3/examples/mplot3d/tricontour3d.py
dolboBobo/python3_ios
130
1743674
<filename>extraPackages/matplotlib-3.0.3/examples/mplot3d/tricontour3d.py<gh_stars>100-1000 """ ========================== Triangular 3D contour plot ========================== Contour plots of unstructured triangular grids. The data used is the same as in the second plot of trisurf3d_demo2. tricontourf3d_demo shows ...
0
0
0
0
0
0
Confluence/confluence.py
phiberoptick/My-Shodan-Scripts
845
1743676
#!/usr/bin/env python # # Confluence.py # Search SHODAN for Confluence LFI / RCE # # Author: random_robbie import shodan import sys import re import requests from time import sleep from requests.packages.urllib3.exceptions import InsecureRequestWarning requests.packages.urllib3.disable_warnings(InsecureRequestWarning)...
0
1
0
0
1
0
pyretri/evaluate/registry.py
dongan-beta/PyRetri
1,063
1743681
# -*- coding: utf-8 -*- from ..utils import Registry EVALUATORS = Registry()
0
0
0
0
0
0
tests/start_BugFind.py
maukbe/DeepBugs
129
1743697
<filename>tests/start_BugFind.py ''' Created on July 07, 2020 @author: <NAME> Last Changed on July 25, 2020 @by: <NAME> ''' # Skript for Testing Bug_Find # Tests for all bug patterns # # called by: $python3 ./tests/start_BugFind.py # # Prerequisites: # Data: data/js/programs_50 # data/js/programs_all.txt # Mod...
0
0
0
0
0
0
tools/json_schema_compiler/memoize.py
nagineni/chromium-crosswalk
2,151
1743705
# Copyright 2013 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. def memoize(fn) -> object: '''Decorates |fn| to memoize. ''' memory = {} def impl(*args, **optargs) -> object: full_args = args + tuple(optargs.i...
0
2
0
0
2
0
python/ql/test/query-tests/Expressions/super/test_except.py
vadi2/codeql
4,036
1743710
try: @decorator class S(object): def __init__(self, *args, **kwargs): super(S, self).__init__(*args, **kwargs) except Exception: class S(object): pass
0
0
0
0
0
0
examples/feature_selection/plot_feature_selection_pipeline.py
MaiRajborirug/scikit-learn
50,961
1743729
""" ================== Pipeline ANOVA SVM ================== This example shows how a feature selection can be easily integrated within a machine learning pipeline. We also show that you can easily introspect part of the pipeline. """ from sklearn import set_config set_config(display="diagram") # %% # We will sta...
0
0
0
0
0
0
Beginner/From heaven to earth (ELEVSTRS)/heaven.py
anishsingh42/CodeChef
127
1743764
<reponame>anishsingh42/CodeChef<gh_stars>100-1000 t = int(input()) while t: N, S, E = map(int, input().split()) x = (N*(2**(1/2)))/S y = 2*N/E if y<x: print("Elevator") else: print("Stairs") t = t-1
0
0
0
0
0
0
configs/res2net/htc_r2_101_fpn_20e_coco.py
Brym-Gyimah/mmdetection
20,190
1743783
<gh_stars>1000+ _base_ = '../htc/htc_r50_fpn_1x_coco.py' model = dict( backbone=dict( type='Res2Net', depth=101, scales=4, base_width=26, init_cfg=dict( type='Pretrained', checkpoint='open-mmlab://res2net101_v1d_26w_4s'))) # learning policy lr_config =...
0
0
0
0
0
0
wikidata_linker_utils_src/src/python/wikidata_linker_utils/wikipedia.py
BenHammersley/deeptype
614
1743818
import re import numpy as np from os.path import join from epub_conversion import convert_wiki_to_lines from epub_conversion.wiki_decoder import almost_smart_open from .wikipedia_language_codes import LANGUAGE_CODES from .file import true_exists from .bash import execute_bash from .successor_mask import ( load_re...
0
6
0
0
6
0
spacy/lang/tr/tokenizer_exceptions.py
snosrap/spaCy
22,040
1743839
import re from ..punctuation import ALPHA_LOWER, ALPHA from ...symbols import ORTH, NORM _exc = {} _abbr_period_exc = [ {ORTH: "A.B.D.", NORM: "Amerika"}, {ORTH: "Alb.", NORM: "albay"}, {ORTH: "Ank.", NORM: "Ankara"}, {ORTH: "Ar.Gör."}, {ORTH: "Arş.Gör."}, {ORTH: "Asb.", NORM: "astsubay"}, ...
0
0
0
0
0
0
scripts/apply_def_template.py
d-m-bailey/openlane-openroad
354
1743886
#!/usr/bin/env python3 # Copyright 2020 Efabless 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 applica...
0
1
0
0
1
0
tkinter/__canvas__/canvas-dot-grid/main.py
whitmans-max/python-examples
140
1743898
<gh_stars>100-1000 import tkinter as tk root = tk.Tk() root.title("Test") canvas = tk.Canvas(root, width=100, height=100) canvas.pack() for x in range(4, 100, 10): for y in range(4, 100, 10): canvas.create_oval((x, y, x, y), fill="red") root.update() root.mainloop()
0
0
0
0
0
0
tests/test_bountyxml.py
HearthSim/python-hearthstone
233
1743903
<gh_stars>100-1000 from hearthstone import bountyxml def test_bountyxml_load(): bounty_db, _ = bountyxml.load() assert bounty_db assert bounty_db[47].boss_name == "<NAME>" assert bounty_db[58].region_name == "The Barrens"
0
0
0
0
0
0
openelex/us/oh/datasource.py
Mpopoma/oe-core
156
1743910
<gh_stars>100-1000 """ Standardize names of data files on Ohio Secretary of State. File-name conventions on OH site vary widely according to election, but typically there is a single precinct file, a race-wide (county) file and additional files for absentee and provisional ballots. Earlier election results are in HTML...
0
0
0
0
0
0