max_stars_repo_path
stringlengths
3
269
max_stars_repo_name
stringlengths
4
119
max_stars_count
int64
0
191k
id
stringlengths
1
7
content
stringlengths
6
1.05M
score
float64
0.23
5.13
int_score
int64
0
5
configs/efficientnet/retinanet_effb3_fpn_crop896_8x4_1x_coco.py
chenxinfeng4/mmdetection
6
11300
<filename>configs/efficientnet/retinanet_effb3_fpn_crop896_8x4_1x_coco.py _base_ = [ '../_base_/models/retinanet_r50_fpn.py', '../_base_/datasets/coco_detection.py', '../_base_/default_runtime.py' ] cudnn_benchmark = True norm_cfg = dict(type='BN', requires_grad=True) checkpoint = 'https://download.openmmlab.c...
1.382813
1
tests/test_model.py
Sebastiencreoff/mongo_tool
0
11301
<gh_stars>0 #!/usr/bin/env python import datetime import mock import mom class ExampleClass(mom.Model): JSON_SCHEMA = { '$schema': 'http://json-schema.org/schema#', 'title': 'Test class for JSON', 'type': 'object', 'properties': { 'value_datetime': {'type': ['datetim...
2.5
2
src/koeda/utils/stopwords.py
toriving/KoEDA
48
11302
import os import json STOPWORDS_JSON_PATH = os.path.join( os.path.dirname(os.path.abspath(__file__)), os.pardir, "corpora/stopwords.json" ) with open(STOPWORDS_JSON_PATH, "r", encoding="utf-8") as f: STOPWORD = json.load(f)["stopwords"]
2.3125
2
glue/core/tests/test_message.py
ejeschke/glue
3
11303
<reponame>ejeschke/glue from __future__ import absolute_import, division, print_function import pytest from .. import message as msg def test_invalid_subset_msg(): with pytest.raises(TypeError) as exc: msg.SubsetMessage(None) assert exc.value.args[0].startswith('Sender must be a subset') def test_...
2.109375
2
fabfile/config.py
kurochan/config-collector
1
11304
<gh_stars>1-10 # -*- coding: utf-8 -*- import os import util from fabric.api import * from fabric.state import output from fabric.colors import * from base import BaseTask from helper.print_helper import task_puts class CollectConfig(BaseTask): """ collect configuration """ name = "collect" def run_task(sel...
2.203125
2
python/paddle/fluid/tests/unittests/ir/inference/test_trt_transpose_flatten_concat_fuse_pass.py
LWhite027/PaddleBox
10
11305
<filename>python/paddle/fluid/tests/unittests/ir/inference/test_trt_transpose_flatten_concat_fuse_pass.py # Copyright (c) 2020 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 obtai...
2.265625
2
src/stage_02_base_model_creation.py
TUCchkul/Dog-Cat-Classification-with-MLflow
0
11306
import argparse import os import shutil from tqdm import tqdm import logging from src.utils.common import read_yaml, create_directories import random from src.utils.model import log_model_summary import tensorflow as tf STAGE= "Base Model Creation" logging.basicConfig( filename=os.path.join("logs",'running_logs....
2.140625
2
test_calculator.py
Kidatoy/Advanced-Calculator
0
11307
<reponame>Kidatoy/Advanced-Calculator import unittest # https://docs.python.org/3/library/unittest.html from modules.calculator import Calculator as Calc class TestCalculator(unittest.TestCase): """ Test Driven Development Unittest File Module: Calculator Updated: 12/16/2019 Author: <NAME> """...
3.859375
4
pddf_psuutil/main.py
deran1980/sonic-utilities
0
11308
<reponame>deran1980/sonic-utilities #!/usr/bin/env python3 # # main.py # # Command-line utility for interacting with PSU Controller in PDDF mode in SONiC # try: import sys import os import click from tabulate import tabulate from utilities_common.util_base import UtilHelper except ImportError as e:...
2.296875
2
gifbox/core/serializers.py
timmygee/gifbox
0
11309
<gh_stars>0 from rest_framework import serializers from versatileimagefield.serializers import VersatileImageFieldSerializer from .models import Image, AnimatedGif class ImageSerializer(serializers.ModelSerializer): class Meta: model = Image fields = ('image',) image = VersatileImageFieldSe...
2.125
2
ginga/canvas/coordmap.py
saimn/ginga
0
11310
<filename>ginga/canvas/coordmap.py # # coordmap.py -- coordinate mappings. # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # from ginga import trcalc from ginga.util import wcs from ginga.util.six.moves import map __all__ = ['CanvasMapper', 'DataMapper', 'O...
2.671875
3
train.py
zpc-666/Paddle-Stochastic-Depth-ResNet110
0
11311
# coding: utf-8 # 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 # Un...
2
2
dataloader/EDSR/video.py
pidan1231239/SR-Stereo2
1
11312
import os from . import common import cv2 import numpy as np import imageio import torch import torch.utils.data as data class Video(data.Dataset): def __init__(self, args, name='Video', train=False, benchmark=False): self.args = args self.name = name self.scale = args.scale self...
2.46875
2
backend/views/__init__.py
chriamue/flask-unchained-react-spa
5
11313
<filename>backend/views/__init__.py from .contact_submission_resource import ContactSubmissionResource
1.085938
1
blink_handler.py
oyiptong/chromium-dashboard
0
11314
<filename>blink_handler.py # -*- coding: utf-8 -*- # Copyright 2017 Google 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 re...
2.234375
2
OBlog/blueprint/pages/main.py
OhYee/OBlog
23
11315
<gh_stars>10-100 from OBlog import database as db from flask import g, current_app import re def getPages(): if not hasattr(g, "getPages"): res = db.query_db('select * from pages;') res.sort(key=lambda x: int(x["idx"])) g.getPages = res return g.getPages def getPagesDict()...
2.546875
3
lib/rabbitmq-dotnet-client-rabbitmq_v3_4_4/docs/pyle2-fcfcf7e/Cheetah/Compiler.py
CymaticLabs/Unity3d.Amqp
83
11316
#!/usr/bin/env python # $Id: Compiler.py,v 1.148 2006/06/22 00:18:22 tavis_rudd Exp $ """Compiler classes for Cheetah: ModuleCompiler aka 'Compiler' ClassCompiler MethodCompiler If you are trying to grok this code start with ModuleCompiler.__init__, ModuleCompiler.compile, and ModuleCompiler.__getattr__. Meta-Data ==...
2.453125
2
tests/simple_cmd_checks.py
Rhoynar/plmn-regression
11
11317
<filename>tests/simple_cmd_checks.py # -*- coding: utf-8 -*- import compat import unittest import sys from plmn.utils import * from plmn.results import * from plmn.modem_cmds import * from plmn.simple_cmds import * class SimpleCmdChecks(unittest.TestCase): def test_simple_status_cmd(self): SimpleCmds.sim...
2.578125
3
mogan/tests/unit/notifications/test_notification.py
GURUIFENG9139/rocky-mogan
0
11318
# 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 agreed to in...
1.890625
2
plash/macros/packagemanagers.py
0xflotus/plash
0
11319
from plash.eval import eval, register_macro, shell_escape_args @register_macro() def defpm(name, *lines): 'define a new package manager' @register_macro(name, group='package managers') @shell_escape_args def package_manager(*packages): if not packages: return sh_packages =...
1.84375
2
app/schemas/email.py
waynesun09/notify-service
5
11320
<reponame>waynesun09/notify-service from typing import Optional, List from pydantic import BaseModel, EmailStr from . import result class EmailBase(BaseModel): email: Optional[EmailStr] = None class EmailSend(EmailBase): msg: str class EmailResult(BaseModel): pre_header: Optional[str] = None begi...
2.328125
2
example.py
ErikPel/rankedchoicevoting
1
11321
<filename>example.py from rankedchoicevoting import Poll candidatesA = {"Bob": 0, "Sue": 0, "Bill": 0} #votes in array sorted by first choice to last choice votersA = { "a": ['Bob', 'Bill', 'Sue'], "b": ['Sue', 'Bob', 'Bill'], "c": ['Bill', 'Sue', 'Bob'], "d": ['Bob', 'Bill', 'Sue'], "f": ['Sue',...
3.5625
4
DeployScript.py
junoteam/TelegramBot
3
11322
<reponame>junoteam/TelegramBot<gh_stars>1-10 #!/usr/bin/env python # -*- coding: utf-8 -*- # -*- author: Alex -*- from Centos6_Bit64 import * from SystemUtils import * # Checking version of OS should happened before menu appears # Check version of CentOS SystemUtils.check_centos_version() # Clear screen before to sh...
2.28125
2
distributed/register/application.py
ADKosm/concurrency
0
11323
<reponame>ADKosm/concurrency<filename>distributed/register/application.py import asyncio import os import time from dataclasses import dataclass import requests_unixsocket from aiohttp import ClientSession, web @dataclass(frozen=True) class Replica: replica_id: str ip: str is_self: bool def replicas_di...
2.546875
3
setup.py
greenaddress/txjsonrpc
0
11324
<gh_stars>0 from __future__ import absolute_import from setuptools import setup from txjsonrpc import meta from txjsonrpc.util import dist setup( name=meta.display_name, version=meta.version, description=meta.description, author=meta.author, author_email=meta.author_email, url=meta.url, l...
1.265625
1
gsflow/gsflow.py
pygsflow/pygsflow
17
11325
<reponame>pygsflow/pygsflow<gh_stars>10-100 # -*- coding: utf-8 -*- import os from .control import ControlFile from .prms import PrmsModel from .utils import gsflow_io, GsConstant from .prms import Helper from .modflow import Modflow from .modsim import Modsim import flopy import subprocess as sp import platform import...
2.484375
2
tests/integration/storage_memory/test_storage_memory_write.py
Sam-Martin/cloud-wanderer
1
11326
<filename>tests/integration/storage_memory/test_storage_memory_write.py import logging import pytest from moto import mock_ec2, mock_iam, mock_sts from cloudwanderer.cloud_wanderer_resource import CloudWandererResource from cloudwanderer.storage_connectors import MemoryStorageConnector from cloudwanderer.urn import U...
1.875
2
tt/satisfiability/picosat.py
fkromer/tt
233
11327
<reponame>fkromer/tt """Python wrapper around the _clibs PicoSAT extension.""" import os from tt.errors.arguments import ( InvalidArgumentTypeError, InvalidArgumentValueError) if os.environ.get('READTHEDOCS') != 'True': from tt._clibs import picosat as _c_picosat VERSION = _c_picosat.VERSION def sa...
2.6875
3
tests/test_text_visualization.py
dianna-ai/dianna
9
11328
import os import re import shutil import unittest from pathlib import Path from dianna.visualization.text import highlight_text class Example1: original_text = 'Doloremque aliquam totam ut. Aspernatur repellendus autem quia deleniti. Natus accusamus ' \ 'doloribus et in quam officiis veniam et...
2.953125
3
setup.py
guilhermeleobas/rbc
0
11329
import os import sys import builtins import versioneer if sys.version_info[:2] < (3, 7): raise RuntimeError("Python version >= 3.7 required.") builtins.__RBC_SETUP__ = True if os.path.exists('MANIFEST'): os.remove('MANIFEST') CONDA_BUILD = int(os.environ.get('CONDA_BUILD', '0')) CONDA_ENV = os.environ.get('...
1.882813
2
src/prefect/schedules/adjustments.py
concreted/prefect
8,633
11330
""" Schedule adjustments are functions that accept a `datetime` and modify it in some way. Adjustments have the signature `Callable[[datetime], datetime]`. """ from datetime import datetime, timedelta from typing import Callable import pendulum import prefect.schedules.filters def add(interval: timedelta) -> Calla...
3.484375
3
src/pyfmodex/sound.py
Loodoor/UnamedPy
1
11331
from .fmodobject import * from .fmodobject import _dll from .structures import TAG, VECTOR from .globalvars import get_class class ConeSettings(object): def __init__(self, sptr): self._sptr = sptr self._in = c_float() self._out = c_float() self._outvol = c_float() ckresult(...
2.0625
2
src/pynwb/retinotopy.py
weiglszonja/pynwb
132
11332
<reponame>weiglszonja/pynwb from collections.abc import Iterable import warnings from hdmf.utils import docval, popargs, call_docval_func, get_docval from . import register_class, CORE_NAMESPACE from .core import NWBDataInterface, NWBData class RetinotopyImage(NWBData): """Gray-scale anatomical image of cortica...
2.1875
2
GreenMoon/forms.py
ma010/green-moon
0
11333
<reponame>ma010/green-moon """ Implement a class function for user to put in a zip-code and search relevant information about business entities in that zip-code area. """ from flask.ext.wtf import Form from wtforms import StringField, BooleanField from wtforms.validators import DataRequired class inputZipForm...
2.96875
3
Phase-2/Linked List/Day-70.py
CodedLadiesInnovateTech/python-challenges
11
11334
<reponame>CodedLadiesInnovateTech/python-challenges<gh_stars>10-100 ''' 1. Write a Python program to access a specific item in a singly linked list using index value. 2. Write a Python program to set a new value of an item in a singly linked list using index value. 3. Write a Python program to delete the first item f...
3.9375
4
ngboost/version.py
dsharpc/ngboost
0
11335
<reponame>dsharpc/ngboost __version__ = "0.3.4dev"
0.839844
1
premailer/tests/test_utils.py
p12tic/premailer
0
11336
<gh_stars>0 import unittest from premailer.premailer import capitalize_float_margin class UtilsTestCase(unittest.TestCase): def testcapitalize_float_margin(self): self.assertEqual( capitalize_float_margin('margin:1em'), 'Margin:1em') self.assertEqual( capitaliz...
3.0625
3
home/vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython_wrapper.py
qwertzy-antonio-godinho/dots
6
11337
<reponame>qwertzy-antonio-godinho/dots<filename>home/vscode/extensions/ms-python.python-2021.12.1559732655/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_cython_wrapper.py import sys try: try: from _pydevd_bundle_ext import pydevd_cython as mod except ImportError: f...
1.71875
2
tests/test_thumbnails.py
pypeclub/openpype4-tests
0
11338
<reponame>pypeclub/openpype4-tests from tests.fixtures import api, PROJECT_NAME assert api THUMB_DATA1 = b"thisisaveryrandomthumbnailcontent" THUMB_DATA2 = b"thisihbhihjhuuyiooanothbnlcontent" def test_folder_thumbnail(api): response = api.post( f"projects/{PROJECT_NAME}/folders", name="testice...
2.46875
2
POO/Heranca/aula107_classes.py
pinheirogus/Curso-Python-Udemy
1
11339
# Generalizando para não repetir o código! class Pessoa: def __init__(self, nome, idade): self.nome = nome self.idade = idade self.nomeclasse = self.__class__.__name__ def falar(self): print(f'{self.nomeclasse} está falando.') class Cliente(Pessoa): def comprar(self): ...
4.0625
4
nncf/experimental/onnx/algorithms/quantization/default_quantization.py
vuiseng9/nncf_pytorch
136
11340
""" Copyright (c) 2022 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 writin...
1.085938
1
Package/CONFIG.py
YuanYuLin/samba
0
11341
<filename>Package/CONFIG.py import ops import iopc TARBALL_FILE="samba-4.8.4.tar.gz" TARBALL_DIR="samba-4.8.4" INSTALL_DIR="samba-bin" pkg_path = "" output_dir = "" tarball_pkg = "" tarball_dir = "" install_dir = "" install_tmp_dir = "" cc_host = "" tmp_include_dir = "" dst_include_dir = "" dst_lib_dir = "" dst_usr_lo...
2.140625
2
packages/pyre/tracking/Chain.py
lijun99/pyre
3
11342
<reponame>lijun99/pyre # -*- coding: utf-8 -*- # # <NAME>. aïvázis # orthologue # (c) 1998-2019 all rights reserved # # declaration class Chain: """ A locator that ties together two others in order to express that something in {next} caused {this} to be recorded """ # meta methods def __init...
2.859375
3
tests/resources/accepted/res_0_minpyversion_3_0.py
matteogabburo/python-ast-utils
3
11343
import os x = 7 print(x + 1)
1.914063
2
Mod 03/03 Prova.py
SauloCav/CN
0
11344
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import math def f(x): return math.exp(x)/x**3 def int(a,b): h = (b-a)/104 x_par = a+h x_impar = a+2*h soma_par = 0 soma_impar = 0 for i in range(52): soma_par += f(x_par) x_par += 2*h for i in range(51): soma_impar...
3.59375
4
almetro/al.py
arnour/almetro
0
11345
<gh_stars>0 from almetro.instance import growing from almetro.metro import Metro import timeit class ExecutionSettings: def __init__(self, trials=1, runs=1): if not trials or trials < 1: raise TypeError('#trials must be provided') if not runs or runs < 1: raise TypeError('#...
2.4375
2
yt_dlp/extractor/archiveorg.py
mrBliss/yt-dlp
80
11346
<filename>yt_dlp/extractor/archiveorg.py # coding: utf-8 from __future__ import unicode_literals import re import json from .common import InfoExtractor from .youtube import YoutubeIE, YoutubeBaseInfoExtractor from ..compat import ( compat_urllib_parse_unquote, compat_urllib_parse_unquote_plus, compat_HTTP...
2.046875
2
Interfas Grafica XI (GUI)/InterfasGraficaXI.py
BrianMarquez3/Python-Course
20
11347
<filename>Interfas Grafica XI (GUI)/InterfasGraficaXI.py # Interfas Grafica XI # Menu from tkinter import * root=Tk() barraMenu=Menu(root) root.config(menu=barraMenu, width=600, height=400) archivoMenu=Menu(barraMenu, tearoff=0) archivoMenu.add_command(label="Nuevo") archivoMenu.add_command(label="Guardar") archiv...
2.5625
3
virtual/lib/python3.6/site-packages/macaroonbakery/tests/__init__.py
marknesh/pitches
0
11348
# Copyright 2017 Canonical Ltd. # Licensed under the LGPLv3, see LICENCE file for details.
0.703125
1
08/postgresql_demo.py
catcherwong-archive/2019
27
11349
<reponame>catcherwong-archive/2019<gh_stars>10-100 # -*- coding: UTF-8 -*- import psycopg2 #postgresql import time import datetime class PgDemo: def __init__(self, host, port, db, user, pwd): self.host = host self.port = port self.db = db self.user = user se...
2.9375
3
examples/convert/pipe2sparky_2d.py
thegooglecodearchive/nmrglue
1
11350
#! /usr/bin/env python import nmrglue as ng # read in the varian data dic,data = ng.pipe.read("../common_data/2d_pipe/test.ft2") # Set the parameters u = ng.pipe.guess_udic(dic,data) # create the converter object and initilize with varian data C = ng.convert.converter() C.from_pipe(dic,data,u) # create pipe data ...
2.4375
2
jaqs/trade/analyze/analyze.py
WayneWan413/JAQS
0
11351
# encoding: utf-8 from __future__ import print_function import os import json from collections import OrderedDict import numpy as np import pandas as pd import matplotlib as mpl import matplotlib.pyplot as plt from matplotlib.ticker import Formatter from jaqs.trade.analyze.report import Report from jaqs.data import ...
2.171875
2
lightnet/data/transform/__init__.py
eavise-kul/lightnet
6
11352
# # Lightnet data transforms # Copyright EAVISE # from .pre import * from .post import * from .util import *
0.863281
1
ufdl-core-app/src/ufdl/core_app/exceptions/_BadSource.py
waikato-ufdl/ufdl-backend
0
11353
from rest_framework import status from rest_framework.exceptions import APIException class BadSource(APIException): """ Exception for when a lazily-loaded data source can't be accessed for some reason """ status_code = status.HTTP_417_EXPECTATION_FAILED default_code = 'bad_source' def __i...
2.53125
3
build_tools/docker/manage_images.py
BernhardRiemann/iree
1
11354
<filename>build_tools/docker/manage_images.py #!/usr/bin/env python3 # 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 # # https://www.apache.org/licenses/LICE...
1.898438
2
suncasa/pygsfit/gsutils.py
wyq24/suncasa
0
11355
<reponame>wyq24/suncasa<filename>suncasa/pygsfit/gsutils.py import numpy as np # import sys import math import os, sys, platform import astropy.units as u from sunpy import map as smap from astropy.coordinates import SkyCoord from suncasa.io import ndfits import lmfit from astropy.time import Time import matplotlib.pyp...
1.671875
2
msgvis/apps/questions/migrations/0001_initial.py
hds-lab/textvis-drg
10
11356
<gh_stars>1-10 # -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('dimensions', '0001_initial'), ] operations = [ migrations.CreateModel( name='Article', ...
1.820313
2
test/test_check_alert.py
russ-lewis/cs120-queuebot
0
11357
import io import sys import unittest import asyncio import random from contextlib import redirect_stdout from .utils import * from queuebot import QueueBot, QueueConfig, DiscordUser config = { "SECRET_TOKEN": "<PASSWORD>", "TA_ROLES": ["UGTA"], "LISTEN_CHANNELS": ["join-queue"], "CHECK_VOICE_WAITING":...
2.390625
2
iam/__init__.py
dataday/aws-utilities-sdk
0
11358
""" .. module:: aws_utilities_cli.iam :platform: OS X :synopsis: Small collection of utilities that use the Amazon Web Services (AWS) SDK .. moduleauthor:: dataday """ __all__ = ['generate_identity', 'generate_policy']
1.109375
1
tests/common/test_run/triangle_run.py
KnowingNothing/akg-test
0
11359
# Copyright 2019 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
1.75
2
profiles/migrations/0018_auto_20180514_2106.py
brentfraser/geotabloid
2
11360
<reponame>brentfraser/geotabloid<gh_stars>1-10 # Generated by Django 2.0.3 on 2018-05-14 21:06 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('profiles', '0017_otherfiles_location'), ] operations = [ migrations.AlterField( m...
1.523438
2
orio/main/tuner/tuner.py
parsabee/Orio
24
11361
<reponame>parsabee/Orio # # The tuner class to initiate the empirical performance tuning process # import re, sys, os from orio.main.util.globals import * import orio.main.dyn_loader, orio.main.tspec.tspec, orio.main.tuner.ptest_codegen, orio.main.tuner.ptest_driver #------------------------------------------------...
2.671875
3
verify_data.py
goowell/DrAdvice
0
11362
from transformer import * from logger import logger def find_missing(): from db import paients_source, paients_info import re for pi in paients_info.find(): if paients_source.find({'_id': re.compile(pi['住院号'], re.IGNORECASE)}).count()>0: pass else: print(pi['住院号']) ...
2.671875
3
jvm-packages/cudautils.py
NVIDIA/spark-xgboost
15
11363
#!/usr/bin/env python import os import re import subprocess import sys # version -> classifier # '' means default classifier cuda_vers = { '11.2': ['cuda11', ''] } def check_classifier(classifier): ''' Check the mapping from cuda version to jar classifier. Used by maven build. ''' cu_ver = detec...
2.5625
3
hitchhikeproject/hitchhikeapp/migrations/0011_delete_dog.py
AlexW57/HitchHikeProject
0
11364
# Generated by Django 3.0.2 on 2020-03-29 19:11 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('hitchhikeapp', '0010_userdata_userid'), ] operations = [ migrations.DeleteModel( name='Dog', ), ]
1.59375
2
support/models.py
gurupratap-matharu/django-tickets-app
1
11365
<filename>support/models.py import pytz from datetime import date, time, datetime, timedelta from django.core.exceptions import ValidationError from django.db import models START_HOUR = 9 END_HOUR = 18 workingHours = END_HOUR - START_HOUR class Vendor(models.Model): """ This class defines which vendors are...
2.890625
3
tests/port_tests/point_tests/test_bounding_box.py
skrat/martinez
7
11366
<gh_stars>1-10 from hypothesis import given from tests.port_tests.hints import (PortedBoundingBox, PortedPoint) from tests.utils import equivalence from . import strategies @given(strategies.points) def test_basic(point: PortedPoint) -> None: assert isinstance(point.bounding_b...
2.546875
3
test/conftest.py
alexandonian/lightning
0
11367
<reponame>alexandonian/lightning import pytest # import station def pytest_addoption(parser): parser.addoption("--engine", action="store", default="local", help="engine to run tests with") @pytest.fixture(scope='module') def eng(request): engine = request.config.getoption("--engine") ...
2.140625
2
pytorch_translate/dual_learning/dual_learning_models.py
dzhulgakov/translate
1
11368
#!/usr/bin/env python3 import logging import torch.nn as nn from fairseq import checkpoint_utils from fairseq.models import BaseFairseqModel, register_model from pytorch_translate import rnn from pytorch_translate.rnn import ( LSTMSequenceEncoder, RNNDecoder, RNNEncoder, RNNModel, base_architectur...
2.421875
2
thgsp/sampling/__init__.py
qiuyy20/thgsp
0
11369
from ._utils import construct_dia, construct_hth, construct_sampling_matrix from .bsgda import bsgda, computing_sets, recon_bsgda, solving_set_covering from .ess import ess, ess_sampling, recon_ess from .fastgsss import fastgsss, recon_fastssss from .rsbs import cheby_coeff4ideal_band_pass, estimate_lk, recon_rsbs, rsb...
1.140625
1
h2o-py/tests/testdir_generic_model/pyunit_generic_model_mojo_glm.py
vishalbelsare/h2o-3
1
11370
<filename>h2o-py/tests/testdir_generic_model/pyunit_generic_model_mojo_glm.py import tempfile import os import sys sys.path.insert(1,"../../") import h2o from h2o.estimators import H2OGeneralizedLinearEstimator, H2OGenericEstimator from tests import pyunit_utils from tests.testdir_generic_model import compare_output, ...
2.328125
2
test/HPE3ParClient_base.py
jyotsnalothe/python-3parclient
35
11371
<filename>test/HPE3ParClient_base.py # (c) Copyright 2015 Hewlett Packard Enterprise Development LP # # 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.171875
2
test/drivers/second_quantization/hdf5d/test_driver_hdf5.py
jschuhmac/qiskit-nature
0
11372
# This code is part of Qiskit. # # (C) Copyright IBM 2018, 2022. # # 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...
2.21875
2
01_test_pytorch.py
yokaji/dcase2021_task2_baseline_ae
0
11373
<gh_stars>0 ######################################################################## # import default libraries ######################################################################## import os import csv import sys import gc ######################################################################## ########...
1.8125
2
Replace Downloads/replace_downloads.py
crake7/Defensor-Fortis-
0
11374
<gh_stars>0 #!/usr/bin/env python import netfilterqueue import scapy.all as scapy ack_list = [] def set_load(packet, load): packet[scapy.Raw].load = load del packet[scapy.IP].len del packet[scapy.IP].chksum del packet[scapy.TCP].chksum return packet def process_packet(packet): """Modify dow...
2.90625
3
tmpmodels.py
firaan1/iamgrateful
0
11375
<reponame>firaan1/iamgrateful from sqlalchemy.ext.declarative import declarative_base from sqlalchemy import create_engine from sqlalchemy import Column, Integer, String, Text, ForeignKey, DateTime, func, Boolean from sqlalchemy.orm import relation, sessionmaker, relationship, backref from datetime import datetime imp...
2.84375
3
doc/filters.py
CargobaseDev/openpyxl
6
11376
from openpyxl import Workbook wb = Workbook() ws = wb.active data = [ ["Fruit", "Quantity"], ["Kiwi", 3], ["Grape", 15], ["Apple", 3], ["Peach", 3], ["Pomegranate", 3], ["Pear", 3], ["Tangerine", 3], ["Blueberry", 3], ["Mango", 3], ["Watermelon", 3], ["Blackberry", 3], ...
2.78125
3
Bleak/two_devices.py
mbdev2/MIS_FindMyProfessor
0
11377
from bleak import BleakClient import asyncio import functools notify_uuid = "00002a19-0000-1000-8000-00805f9b34fb".format(0x2A19) def callback(sender, data, mac_address): #data = bytearray(data) dataint = int.from_bytes(data, byteorder='little', signed=True) print(mac_address, dataint) def run(addresses...
2.453125
2
binary search tree insertion.py
buhuhaha/python
0
11378
<filename>binary search tree insertion.py<gh_stars>0 class Node: left = right = None def __init__(self, data): self.data = data def inorder(root): if root is None: return inorder(root.left) print(root.data, end=' ') inorder(root.right) def insert(root, key): if root is None...
3.71875
4
tests/test_env_helpers.py
Azraeht/py-ndebug
0
11379
<reponame>Azraeht/py-ndebug from ndebug import env_helpers def test_inspect_ops(mocker): mocker.patch.dict('os.environ', {'DEBUG_COLORS': 'no', 'DEBUG_DEPTH': '10', 'DEBUG_SHOW_HIDDEN': 'enabled', 'DEBUG...
2.09375
2
relay_lib_seeed_test_2.py
johnwargo/seeed-studio-relay-v2
1
11380
#!/usr/bin/python '''***************************************************************************************************************** Seeed Studio Relay Board Library V2 Test Application #2 By <NAME> (https://www.johnwargo.com) *******************************************************************************...
2.859375
3
quasar/sa_database.py
stevencyrway/quasar
12
11381
<reponame>stevencyrway/quasar import os from sqlalchemy import bindparam, create_engine, exc from sqlalchemy.dialects.postgresql.json import JSONB from sqlalchemy.engine.url import URL from sqlalchemy.sql import text from .utils import log, logerr # Setup SQL Alchemy vars. pg_opts = { 'drivername': os.getenv('PG...
2.59375
3
commands/__init__.py
CorneliaXaos/Command-Block-Assembly
1
11382
import abc class CommandBlock: def __init__(self, command, conditional=True, mode='CHAIN', auto=True, opposite=False, single_use=True): self.command = command self.cond = conditional self.mode = mode self.auto = auto self.opposite = opposite self.sin...
2.9375
3
top/clearlight/reptile/bilibili/bj_tech_mooc/example_04_360.py
ClearlightY/Python_learn
1
11383
import requests keyword = "python" try: kv = {'q':keyword} r = requests.get('http://www.so.com/s', params=kv) print(r.request.url) r.raise_for_status() print(len(r.text)) except: print('爬取失败')
2.828125
3
rodnet/models/backbones/cdc_deep.py
zhengzangw/RODNet
0
11384
import torch.nn as nn class RODEncode(nn.Module): def __init__(self, in_channels=2): super(RODEncode, self).__init__() self.conv1a = nn.Conv3d( in_channels=in_channels, out_channels=64, kernel_size=(9, 5, 5), stride=(1, 1, 1), padding=(4,...
2.375
2
File/admin.py
alstn2468/Likelion_DRF_Project
28
11385
from django.contrib import admin from .models import File admin.site.register(File)
1.289063
1
agent/windows/agent.py
fortinet/ips-bph-framework
21
11386
<reponame>fortinet/ips-bph-framework import shutil import socket import subprocess import threading import json import pickle import tempfile import time import box import threading import os import base64 import getpass import urllib import requests import zipfile import sys import pprint import plat...
2.34375
2
python/src/learn/lstmSequence.py
kakaba2009/MachineLearning
0
11387
# LSTM with Variable Length Input Sequences to One Character Output import numpy from keras.models import Sequential from keras.layers import Dense from keras.layers import LSTM from keras.utils import np_utils from keras.preprocessing.sequence import pad_sequences from theano.tensor.shared_randomstreams import ...
2.9375
3
DATA/prediction/direction/pred_script.py
korcsmarosgroup/ARN2DataBase
0
11388
""" Direction prediction based on learning dataset from reactome PPI direction calculated from domain interaction directions """ # Imports import sqlite3, csv, os import pandas as pd import logging import pickle # # Initiating logger # logger = logging.getLogger() # handler = logging.FileHandler('../../workflow/SLK3.l...
2.296875
2
src/main.py
vcodrins/json_to_folder
0
11389
import json import os.path import sys from exceptions import * from create_folder_structure import create_folder_structure def main(): try: if len(sys.argv) != 3: raise InvalidArgumentCount if not os.path.exists(sys.argv[2]): raise InvalidFilePath if not os.path.exi...
3.703125
4
app/conftest.py
hbyyy/newsmailing
0
11390
<gh_stars>0 from datetime import timedelta import pytest from model_bakery import baker @pytest.fixture() def create_expire_user(): def make_user(**kwargs): user = baker.make('members.User') user.created -= timedelta(days=4) return user return make_user
2.078125
2
src/SecurityDecorator.py
JanCwik/SoftwarePraktikum
7
11391
from flask import request from google.auth.transport import requests import google.oauth2.id_token from server.ApplikationsAdministration import ApplikationsAdministration #Benutzer.py, BenutzerMapper + BenutzerMethoden in ApplikationsAdministration def secured(function): """Decorator zur Google Firebase-basiert...
2.9375
3
code/django18/django18/newsletter/forms.py
dvl/celerytalk
0
11392
<reponame>dvl/celerytalk # -*- coding: utf-8 -*- from __future__ import unicode_literals from django import forms class NewsletterForm(forms.Form): assunto = forms.CharField() mensagem = forms.CharField(widget=forms.Textarea)
1.828125
2
RecoEgamma/ElectronIdentification/python/Identification/mvaElectronID_Fall17_noIso_V1_cff.py
ckamtsikis/cmssw
852
11393
import FWCore.ParameterSet.Config as cms from RecoEgamma.ElectronIdentification.Identification.mvaElectronID_tools import * # Documentation of the MVA # https://twiki.cern.ch/twiki/bin/viewauth/CMS/MultivariateElectronIdentificationRun2 # https://rembserj.web.cern.ch/rembserj/notes/Electron_MVA_ID_2017_documentation ...
1.75
2
dqn_plus/notebooks/code/train_ram.py
hadleyhzy34/reinforcement_learning
0
11394
<reponame>hadleyhzy34/reinforcement_learning<gh_stars>0 import numpy as np import gym from utils import * from agent import * from config import * def train(env, agent, num_episode, eps_init, eps_decay, eps_min, max_t): rewards_log = [] average_log = [] eps = eps_init for i in range(1, 1 + num_episode...
2.5625
3
tools/parallel_launcher/parallel_launcher.py
Gitman1989/chromium
2
11395
#!/usr/bin/python # Copyright (c) 2010 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. """ This tool launches several shards of a gtest-based binary in parallel on a local machine. Example usage: parallel_launcher.py pat...
2.46875
2
05_Practice1/Step06/yj.py
StudyForCoding/BEAKJOON
0
11396
a = int(input()) for i in range(a): print('* '*(a-a//2)) print(' *'*(a//2))
3.53125
4
greydot/errors.py
TralahM/greydot-api
0
11397
<gh_stars>0 class NoMessageRecipients(Exception): """ Raised when Message Recipients are not specified. """ pass class InvalidAmount(Exception): """ Raised when an invalid currency amount is specified """ pass
1.757813
2
ginga/util/dp.py
kyraikeda/ginga
76
11398
<gh_stars>10-100 # # dp.py -- Data pipeline and reduction routines # # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import numpy as np from collections import OrderedDict from ginga import AstroImage, colors from ginga.RGBImage import RGBImage from ginga....
2.546875
3
jigsaw/datasets/datasets.py
alexvishnevskiy/jigsaw
0
11399
<gh_stars>0 from torch.utils.data import Dataset from ..utils.optimal_lenght import find_optimal_lenght class PairedDataset(Dataset): def __init__( self, df, cfg, tokenizer, more_toxic_col='more_toxic', less_toxic_col='less_toxic' ): self.df = d...
2.375
2