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
verteste/ui/ui_about.py
Chum4k3r/Verteste
0
7200
# -*- coding: utf-8 -*- ################################################################################ ## Form generated from reading UI file 'aboutdialog.ui' ## ## Created by: Qt User Interface Compiler version 6.1.1 ## ## WARNING! All changes made in this file will be lost when recompiling UI file! ###############...
2.15625
2
tests/test_base_protocol.py
Qix-/aiohttp
3
7201
import asyncio from contextlib import suppress from unittest import mock import pytest from aiohttp.base_protocol import BaseProtocol async def test_loop() -> None: loop = asyncio.get_event_loop() asyncio.set_event_loop(None) pr = BaseProtocol(loop) assert pr._loop is loop async def test_pause_wri...
2.203125
2
main.py
marcusviniciusteixeira/RPAPython
1
7202
<gh_stars>1-10 import PySimpleGUI as sg import os import time import pyautogui class TelaPython: def __init__(self): layout = [ [sg.Text('Usuário',size=(10,0)), sg.Input(size=(20,0),key='usuario')], [sg.Text('Senha',size=(10,0)), sg.Input(size=(20,0),key='senha')], [sg.T...
2.71875
3
logistic-regression/plot_binary_losses.py
eliben/deep-learning-samples
183
7203
# Helper code to plot binary losses. # # <NAME> (http://eli.thegreenplace.net) # This code is in the public domain from __future__ import print_function import matplotlib.pyplot as plt import numpy as np if __name__ == '__main__': fig, ax = plt.subplots() fig.set_tight_layout(True) xs = np.linspace(-2, 2...
2.984375
3
utils/watch-less.py
K-Fitzpatrick/crop_planner
91
7204
#!/usr/bin/env python3 ################################ # Development tool # Auto-compiles style.less to style.css # # Requires lessc and less clean css to be installed: # npm install -g less # npm install -g less-plugin-clean-css ################################ import os, time from os import path from math import fl...
2.953125
3
testapp/app/app/tests/test_export_action.py
instituciones-abiertas/django-admin-export-action
5
7205
# -- encoding: UTF-8 -- import json import uuid from admin_export_action import report from admin_export_action.admin import export_selected_objects from admin_export_action.config import default_config, get_config from django.contrib.admin.sites import AdminSite from django.contrib.auth.models import User from djang...
2.09375
2
shapeshifter/tests/conftest.py
martinogden/django-shapeshifter
164
7206
<filename>shapeshifter/tests/conftest.py from pytest_djangoapp import configure_djangoapp_plugin pytest_plugins = configure_djangoapp_plugin( extend_INSTALLED_APPS=[ 'django.contrib.sessions', 'django.contrib.messages', ], extend_MIDDLEWARE=[ 'django.contrib.sessions.middleware.Sess...
1.289063
1
face_attribute_verification.py
seymayucer/FacialPhenotypes
2
7207
<filename>face_attribute_verification.py import argparse import numpy as np from sklearn.model_selection import StratifiedKFold import sklearn import cv2 import datetime import mxnet as mx from mxnet import ndarray as nd import pandas as pd from numpy import linalg as line import logging logging.basicConfig( forma...
2.359375
2
pkgs/applications/virtualization/virt-manager/custom_runner.py
mornfall/nixpkgs
1
7208
#!/usr/bin/python -t # this script was written to use /etc/nixos/nixpkgs/pkgs/development/python-modules/generic/wrap.sh # which already automates python executable wrapping by extending the PATH/pythonPath # from http://docs.python.org/library/subprocess.html # Warning Invoking the system shell with shell=True can be...
1.882813
2
jsonform/fields.py
Pix-00/jsonform
0
7209
import base64 import datetime from abc import ABC, abstractmethod from .conditions import AnyValue from .errors import FieldError, FormError __all__ = [ 'Field', 'StringField', 'IntegerField', 'FloatField', 'BooleanField', 'DateTimeField', 'DateField', 'TimeField', 'ListField','SetField', 'EnumField', 'BytesF...
2.828125
3
napari/layers/_source.py
napari/napari-gui
7
7210
<gh_stars>1-10 from __future__ import annotations from contextlib import contextmanager from contextvars import ContextVar from typing import Optional, Tuple from magicgui.widgets import FunctionGui from pydantic import BaseModel class Source(BaseModel): """An object to store the provenance of a layer. Par...
2.484375
2
tests/unit/test_BaseDirection.py
vpalex999/project-mars
0
7211
<filename>tests/unit/test_BaseDirection.py import pytest import src.constants as cnst from src.directions import BaseDirection @pytest.fixture def base_direction(): return BaseDirection() def test_init_BaseDirection(base_direction): assert isinstance(base_direction, BaseDirection) def test_current_direct...
2.9375
3
OpenCV-Computer-Vision-Examples-with-Python-A-Complete-Guide-for-Dummies-master/Source Code/opencv_operations/draw-circles.py
Payal197bhadra/ComputerVision
6
7212
import numpy as np import cv2 #define a canvas of size 300x300 px, with 3 channels (R,G,B) and data type as 8 bit unsigned integer canvas = np.zeros((300,300,3), dtype ="uint8") #define color #draw a circle #arguments are canvas/image, midpoint, radius, color, thickness(optional) #display in cv2 window green = (0,255...
3.46875
3
tmux_cssh/main.py
cscutcher/tmux_cssh
0
7213
<gh_stars>0 # -*- coding: utf-8 -*- """ Main Script """ import logging import argh import sarge import tmuxp DEV_LOGGER = logging.getLogger(__name__) def get_current_session(server=None): ''' Seems to be no easy way to grab current attached session in tmuxp so this provides a simple alternative. '''...
2.84375
3
nautobot_capacity_metrics/management/commands/__init__.py
david-kn/nautobot-plugin-capacity-metrics
6
7214
"""Additional Django management commands added by nautobot_capacity_metrics plugin."""
1.078125
1
nptweak/__init__.py
kmedian/nptweak
0
7215
<reponame>kmedian/nptweak<filename>nptweak/__init__.py<gh_stars>0 from .to_2darray import to_2darray
1.0625
1
resources/models/Image.py
sphildreth/roadie-python
0
7216
import io from PIL import Image as PILImage from sqlalchemy import Column, ForeignKey, LargeBinary, Index, Integer, String from resources.models.ModelBase import Base class Image(Base): # If this is used then the image is stored in the database image = Column(LargeBinary(length=16777215), default=None) #...
2.640625
3
arch2vec/search_methods/reinforce_darts.py
gabrielasuchopar/arch2vec
0
7217
import os import sys import argparse import json import random import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from arch2vec.models.pretraining_nasbench101 import configs from arch2vec.utils import load_json, preprocessing, one_hot_darts from arch2vec.preprocessing.gen_is...
2.34375
2
setup.py
mentaal/r_map
0
7218
<reponame>mentaal/r_map """A setuptools based setup module. See: https://packaging.python.org/en/latest/distributing.html https://github.com/pypa/sampleproject """ # Always prefer setuptools over distutils from setuptools import setup, find_packages # To use a consistent encoding from codecs import open from os import...
1.546875
2
dont_worry.py
karianjahi/fahrer_minijob
0
7219
class Hey: def __init__(jose, name="mours"): jose.name = name def get_name(jose): return jose.name class Person(object): def __init__(self, name, phone): self.name = name self.phone = phone class Teenager(Person): def __init__(self, *args, **kwargs): self.website...
3.5
4
tests/zoo/tree.py
dynalz/odmantic
486
7220
<reponame>dynalz/odmantic import enum from typing import Dict, List from odmantic.field import Field from odmantic.model import Model class TreeKind(str, enum.Enum): BIG = "big" SMALL = "small" class TreeModel(Model): name: str = Field(primary_key=True, default="<NAME> montagnes") average_size: flo...
2.78125
3
adanet/core/estimator_test.py
eustomaqua/adanet
0
7221
"""Test AdaNet estimator single graph implementation. Copyright 2018 The AdaNet 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 https://www.apache.org/licenses/LI...
1.421875
1
ua_roomseeker/uploader.py
nyg1/classroom-finder
1
7222
<gh_stars>1-10 from seeker.models import Building, Classroom, Time import json import os os.chdir('../data') fileList = os.listdir() #loops through each json file for jsonfile in fileList: #opens the jsonfile and loads the data f = open(jsonfile, 'r') data = f.read() jsondata = json.loads(data) #c...
2.828125
3
dash_daq/Slider.py
luiztauffer/dash-daq
0
7223
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class Slider(Component): """A Slider component. A slider component with support for a target value. Keyword arguments: - id (string; optional): The ID used to identify this component in Dash callbac...
2.578125
3
src/util/__init__.py
ooshyun/filterdesign
1
7224
<reponame>ooshyun/filterdesign """Utility function for process to raw data """ from .util import ( cvt_pcm2wav, cvt_float2fixed, cvt_char2num, plot_frequency_response, plot_pole_zero_analysis, ) from .fi import fi __all__ = [ "fi", "cvt_pcm2wav", "cvt_float2fixed", "cvt_char2num", ...
1.101563
1
infra/apps/catalog/tests/views/distribution_upload_tests.py
datosgobar/infra.datos.gob.ar
1
7225
<gh_stars>1-10 import pytest from django.core.files import File from django.urls import reverse from freezegun import freeze_time from infra.apps.catalog.tests.helpers.open_catalog import open_catalog pytestmark = pytest.mark.django_db @pytest.fixture(autouse=True) def give_user_edit_rights(user, node): node.ad...
2.15625
2
examples/model_zoo/build_binaries.py
Embracing/unrealcv
1,617
7226
import subprocess, os ue4_win = r"C:\Program Files\Epic Games\UE_4.16" ue4_linux = "/home/qiuwch/workspace/UE416" ue4_mac = '/Users/Shared/Epic Games/UE_4.16' win_uprojects = [ r'C:\qiuwch\workspace\uprojects\UE4RealisticRendering\RealisticRendering.uproject', r'C:\qiuwch\workspace\uprojects\UE4ArchinteriorsV...
1.476563
1
__init__.py
NeonJarbas/skill-ddg
0
7227
<gh_stars>0 # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distribut...
2.15625
2
openstack_lease_it/openstack_lease_it/settings.py
LAL/openstack-lease-it
0
7228
""" Django settings for openstack_lease_it project. Generated by 'django-admin startproject' using Django 1.8.7. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ #...
1.765625
2
rigl/experimental/jax/pruning/pruning.py
vishalbelsare/rigl
276
7229
<filename>rigl/experimental/jax/pruning/pruning.py # coding=utf-8 # Copyright 2021 RigL 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.25
2
venv/Lib/site-packages/dash_bootstrap_components/_components/CardLink.py
hanzzhu/chadle
0
7230
# AUTO GENERATED FILE - DO NOT EDIT from dash.development.base_component import Component, _explicitize_args class CardLink(Component): """A CardLink component. Use card link to add consistently styled links to your cards. Links can be used like buttons, external links, or internal Dash style links. Keyword arg...
2.84375
3
plugins/hanlp_demo/hanlp_demo/zh/tf/train/train_ctb9_pos_electra.py
antfootAlex/HanLP
3
7231
<reponame>antfootAlex/HanLP<filename>plugins/hanlp_demo/hanlp_demo/zh/tf/train/train_ctb9_pos_electra.py # -*- coding:utf-8 -*- # Author: hankcs # Date: 2019-12-28 23:15 from hanlp.components.taggers.transformers.transformer_tagger_tf import TransformerTaggerTF from tests import cdroot cdroot() tagger = TransformerTag...
1.765625
2
src/app/main.py
Wedding-APIs-System/Backend-APi
0
7232
<filename>src/app/main.py from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware from app.api import landing, login, attendance_confirmation from sql_app.database import orm_connection app = FastAPI(title="Sergio's wedding backend API", description="REST API which serves login, attendance ...
2.4375
2
tests/test_pydora/test_utils.py
NextGenTechBar/twandora
0
7233
from unittest import TestCase from pandora.client import APIClient from pandora.errors import InvalidAuthToken, ParameterMissing from pandora.models.pandora import Station, AdItem, PlaylistItem from pandora.py2compat import Mock, patch from pydora.utils import iterate_forever class TestIterateForever(TestCase): ...
2.375
2
PyDSTool/PyCont/BifPoint.py
mdlama/pydstool
2
7234
""" Bifurcation point classes. Each class locates and processes bifurcation points. * _BranchPointFold is a version based on BranchPoint location algorithms * BranchPoint: Branch process is broken (can't find alternate branch -- see MATCONT notes) <NAME>, March 2006 """ from __future__ import absolute_i...
2.5
2
src/marion/marion/urls/__init__.py
OmenApps/marion
7
7235
<filename>src/marion/marion/urls/__init__.py """Urls for the marion application""" from django.urls import include, path from rest_framework import routers from .. import views router = routers.DefaultRouter() router.register(r"requests", views.DocumentRequestViewSet) urlpatterns = [ path("", include(router.ur...
1.9375
2
setup.py
TanKingsley/pyxll-jupyter
1
7236
""" PyXLL-Jupyter This package integrated Jupyter notebooks into Microsoft Excel. To install it, first install PyXLL (see https://www.pyxll.com). Briefly, to install PyXLL do the following:: pip install pyxll pyxll install Once PyXLL is installed then installing this package will add a button to the PyXLL ...
3.125
3
board/views.py
albi23/Pyra
0
7237
from typing import List from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.http import JsonResponse from django.shortcuts import render from django.urls import reverse_lazy from django.views import generic, View from board.forms import SignUpForm from .co...
2.046875
2
setup.py
lazmond3/pylib-instagram-type
0
7238
<reponame>lazmond3/pylib-instagram-type # -*- coding: utf-8 -*- # Learn more: https://github.com/kennethreitz/setup.py from setuptools import setup, find_packages import os with open('README.md') as f: readme = f.read() with open('LICENSE') as f: license = f.read() def take_package_name(name): if nam...
1.578125
2
tbx/core/migrations/0111_move_sign_up_form_into_new_app.py
arush15june/wagtail-torchbox
0
7239
# -*- coding: utf-8 -*- # Generated by Django 1.11.16 on 2019-01-15 22:49 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('wagtailsearchpromotions', '0002_capitalizeverbose'), ('wagtailcore', '0040_page_draft_title...
1.59375
2
tests/test_webframe.py
zsolt-beringer/osm-gimmisn
0
7240
#!/usr/bin/env python3 # # Copyright (c) 2019 <NAME> and contributors. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """The test_webframe module covers the webframe module.""" from typing import List from typing import TYPE_CHECKING from typing import Tuple from...
2.15625
2
spotify.py
nimatest1234/telegram_spotify_downloader_bot
0
7241
from __future__ import unicode_literals import spotipy from spotipy.oauth2 import SpotifyClientCredentials import requests from youtube_search import YoutubeSearch import youtube_dl import eyed3.id3 import eyed3 import lyricsgenius import telepot spotifyy = spotipy.Spotify( client_credentials_manager=SpotifyClient...
2.625
3
tests/test_atomdict.py
Tillsten/atom
0
7242
#------------------------------------------------------------------------------ # Copyright (c) 2018-2019, Nucleic Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. #------------------------------------------------...
2.453125
2
dippy/core/timestamp.py
eggveloper/dippy.core
4
7243
<gh_stars>1-10 from datetime import datetime class Timestamp(float): def __new__(cls, value=None): return super().__new__( cls, datetime.utcnow().timestamp() if value is None else value ) def to_date(self) -> datetime: return datetime.utcfromtimestamp(self) def __repr...
3.046875
3
bible/admin.py
tushortz/biblelover
0
7244
from django.contrib import admin from bible.models import Bible, VerseOfTheDay @admin.register(Bible) class BibleAdmin(admin.ModelAdmin): list_display = ['__str__', 'text'] readonly_fields = ['book', 'chapter', 'verse', 'text', 'category'] search_fields = ['text', 'book', 'chapter'] list_filter = ['ca...
2.21875
2
typy/nodes.py
Procrat/typy
3
7245
<reponame>Procrat/typy<filename>typy/nodes.py """ Our own implementation of an abstract syntax tree (AST). The convert function recursively converts a Python AST (from the module `ast`) to our own AST (of the class `Node`). """ import ast from logging import debug from typy.builtin import data_types from typy.except...
2.390625
2
anonlink-entity-service/backend/entityservice/integrationtests/objectstoretests/test_objectstore.py
Sam-Gresh/linkage-agent-tools
1
7246
<reponame>Sam-Gresh/linkage-agent-tools """ Testing: - uploading over existing files - using deleted credentials - using expired credentials """ import io import minio from minio import Minio import pytest from minio.credentials import AssumeRoleProvider, Credentials from entityservice.object_store import connect...
1.929688
2
soil/build/lib/soil/db/sqlalchemy/api.py
JackDan9/soil
1
7247
# Copyright 2020 Soil, Inc. # Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); yo...
1.796875
2
tests/test_models.py
kykrueger/redash
1
7248
<reponame>kykrueger/redash import calendar import datetime from unittest import TestCase import pytz from dateutil.parser import parse as date_parse from tests import BaseTestCase from redash import models, redis_connection from redash.models import db, types from redash.utils import gen_query_hash, utcnow class Da...
2.515625
3
.history/List of Capstone Projects/FibonacciSequence_20200516134123.py
EvanthiosPapadopoulos/Python3
1
7249
''' Fibonacci Sequence ''' import HeaderOfFiles def fibonacciSeq(number): ''' Generate Fibonacci Sequence to the given number. ''' a = 1 b = 1 for i in range(number): yield a a,b = b,a+b while True: try: f = int(input("Enter a number for Fibonacci: "...
4.5
4
composer/algorithms/mixup/__init__.py
jacobfulano/composer
2
7250
<reponame>jacobfulano/composer # Copyright 2021 MosaicML. All Rights Reserved. from composer.algorithms.mixup.mixup import MixUp as MixUp from composer.algorithms.mixup.mixup import MixUpHparams as MixUpHparams from composer.algorithms.mixup.mixup import mixup_batch as mixup_batch _name = 'MixUp' _class_name = 'MixUp...
0.890625
1
tests/simple_gan_test.py
alanpeixinho/NiftyNet
0
7251
from __future__ import absolute_import, print_function import unittest import os import tensorflow as tf from tensorflow.keras import regularizers from niftynet.network.simple_gan import SimpleGAN from tests.niftynet_testcase import NiftyNetTestCase class SimpleGANTest(NiftyNetTestCase): def test_3d_reg_shape(s...
2.4375
2
tests/test.py
N4S4/thingspeak_wrapper
0
7252
import time import thingspeak_wrapper as tsw # Initiate the class ThingWrapper with (CHANNEL_ID, WRITE_API__KEY, READ_API_KEY) # if is a public channel just pass the CHANNEL_ID argument, api_key defaults are None my_channel = tsw.wrapper.ThingWrapper(501309, '6TQDNWJQ44FA0GAQ', '10EVD2N6YIHI5O7Z') # all set of func...
2.84375
3
neptunecontrib/monitoring/skopt.py
neptune-ai/neptune-contrib
22
7253
# # Copyright (c) 2019, Neptune Labs Sp. z o.o. # # 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 agr...
2.25
2
snoopy/server/transforms/Maltego.py
aiddenkeli/Snoopy
432
7254
#!/usr/bin/python # # This might be horrible code... # ...but it works # Feel free to re-write in a better way # And if you want to - send it to us, we'll update ;) # <EMAIL> (2010/10/18) # import sys from xml.dom import minidom class MaltegoEntity(object): value = ""; weight = 100; displayInformation = ""; addit...
2.25
2
metadeploy/api/migrations/0050_add_clickthrough_agreement.py
sfdc-qbranch/MetaDeploy
33
7255
# Generated by Django 2.1.5 on 2019-02-12 21:18 import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): dependencies = [("api", "0049_add_all_other_translations")] operations = [ migrations.CreateModel( name="ClickThroughAgreement...
1.648438
2
invenio_iiif/config.py
dfdan/invenio-iiif
3
7256
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """IIIF API for Invenio.""" IIIF_API_PREFIX = '/iiif/' """URL prefix to IIIF API.""" III...
1.34375
1
pub_ingest.py
mconlon17/vivo-pub-ingest
0
7257
#!/user/bin/env/python """ pub_ingest.py -- Read a bibtex file and make VIVO RDF The following objects will be made as needed: -- publisher -- journal -- information resource -- timestamp for the information resource -- people -- authorships -- concepts The result...
2.734375
3
port/platform/common/automation/u_utils.py
u-blox/ubxlib
91
7258
#!/usr/bin/env python '''Generally useful bits and bobs.''' import queue # For PrintThread and exe_run from time import sleep, time, gmtime, strftime # For lock timeout, exe_run timeout and logging from multiprocessing import RLock from copy import copy import threading # For Print...
2.46875
2
faigler_mazeh.py
tcjansen/beer
0
7259
import numpy as np import astropy.modeling.blackbody as bb import astropy.constants as const from astropy.io import fits from scipy.interpolate import interp2d class FaiglerMazehFit(): def __init__(self, P_orb, inc, R_star, M_star, T_star, A_ellip=False, A_beam=False, R_p=False, a=False, u=False, g=0.65, logg=...
2.46875
2
src/vanilla_pytorch/prune_model.py
f2010126/LTH_Master
0
7260
<gh_stars>0 import torch.nn.utils.prune as prune import torch from src.vanilla_pytorch.utils import count_rem_weights from src.vanilla_pytorch.models.linearnets import LeNet, init_weights from src.vanilla_pytorch.models.resnets import Resnets def remove_pruning(model): for i, (name, module) in enumerate(model.nam...
2.359375
2
Grid-neighbor-search/GNS/read_instance_2layer_2LMM_L.py
CitrusAqua/mol-infer
0
7261
<reponame>CitrusAqua/mol-infer<filename>Grid-neighbor-search/GNS/read_instance_2layer_2LMM_L.py """ read_instance_BH-cyclic.py """ ''' [seed graph] V_C : "V_C" E_C : "E_C" [core specification] ell_LB : "\ell_{\rm LB}" ell_UB : "\ell_{\rm UB}" cs_LB : "\textsc{cs}_{\rm LB}" ...
2.171875
2
gamma/system_input.py
ArtBIT/gamma
15
7262
from .system import * from .colours import * class InputSystem(System): def init(self): self.key = 'input' def setRequirements(self): self.requiredComponents = ['input'] def updateEntity(self, entity, scene): # don't allow input during a cutscene if scene.cutscene is...
2.6875
3
tensorflow_federated/python/research/utils/checkpoint_utils_test.py
mcognetta/federated
0
7263
# Lint as: python3 # Copyright 2019, The TensorFlow Federated 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 ...
1.96875
2
website/models/user.py
alexli0707/pyforum
4
7264
#!/usr/bin/env python # -*- coding: utf-8 -*- import peewee from flask import current_app,abort from flask.ext.login import AnonymousUserMixin, UserMixin from itsdangerous import TimedJSONWebSignatureSerializer as Serializer from peewee import Model, IntegerField, CharField,PrimaryKeyField from website.app import db_wr...
2.515625
3
FlaskApp/__init__.py
robertavram/project5
7
7265
# application import application
1.101563
1
sim2net/speed/constant.py
harikuts/dsr_optimization
12
7266
<reponame>harikuts/dsr_optimization #!/usr/bin/env python # -*- coding: utf-8 -*- # (c) 2012 <NAME> <mkalewski at cs.put.poznan.pl> # # This file is a part of the Simple Network Simulator (sim2net) project. # USE, MODIFICATION, COPYING AND DISTRIBUTION OF THIS SOFTWARE IS SUBJECT TO # THE TERMS AND CONDITIONS OF THE...
2.90625
3
nexula/nexula_utility/utility_extract_func.py
haryoa/nexula
3
7267
<reponame>haryoa/nexula from nexula.nexula_utility.utility_import_var import import_class class NexusFunctionModuleExtractor(): """ Used for constructing pipeline data preporcessing and feature representer """ def __init__(self, module_class_list, args_dict, **kwargs): """ Instantiate...
2.40625
2
marbas/preprocessing.py
MJ-Jang/Marbas
0
7268
<filename>marbas/preprocessing.py import os from configparser import ConfigParser cfg = ConfigParser() #PATH_CUR = os.getcwd() + '/pynori' PATH_CUR = os.path.dirname(__file__) cfg.read(PATH_CUR+'/config.ini') # PREPROCESSING ENG_LOWER = cfg.getboolean('PREPROCESSING', 'ENG_LOWER') class Preprocessing(object): """Pr...
2.8125
3
pravash/servicenowplugin/xlr-servicenow-plugin-master/src/main/resources/servicenow/ServiceNowQueryTile.py
amvasudeva/rapidata
0
7269
# # THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS # FOR A PARTICULAR PURPOSE. THIS CODE AND INFORMATION ARE NOT SUPPORTED BY XEBIALABS. # import com.xhaus.jyson.JysonCodec...
2.0625
2
bc/recruitment/migrations/0022_merge_20200331_1633.py
Buckinghamshire-Digital-Service/buckinghamshire-council
1
7270
<reponame>Buckinghamshire-Digital-Service/buckinghamshire-council<filename>bc/recruitment/migrations/0022_merge_20200331_1633.py # Generated by Django 2.2.10 on 2020-03-31 15:33 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("recruitment", "0021_merge_20200331_...
1.304688
1
Stage_3/Task11_Graph/depth_first_search.py
Pyabecedarian/Algorithms-and-Data-Structures-using-Python
0
7271
""" The Depth First Search (DFS) The goal of a dfs is to search as deeply as possible, connecting as many nodes in the graph as possible and branching where necessary. Think of the BFS that builds a search tree one level at a time, whereas the DFS creates a search tree by exploring one branch of the tree a...
4.125
4
salt/_modules/freebsd_common.py
rbtcollins/rusty_rail
16
7272
def sysrc(value): """Call sysrc. CLI Example: .. code-block:: bash salt '*' freebsd_common.sysrc sshd_enable=YES salt '*' freebsd_common.sysrc static_routes """ return __salt__['cmd.run_all']("sysrc %s" % value)
1.789063
2
auth0/v3/management/blacklists.py
jhunken/auth0-python
0
7273
from .rest import RestClient class Blacklists(object): """Auth0 blacklists endpoints Args: domain (str): Your Auth0 domain, e.g: 'username.auth0.com' token (str): Management API v2 Token telemetry (bool, optional): Enable or disable Telemetry (defaults to True) """ ...
2.734375
3
test_backtest/simplebacktest.py
qzm/QUANTAXIS
1
7274
<gh_stars>1-10 # coding=utf-8 # # The MIT License (MIT) # # Copyright (c) 2016-2018 yutiansut/QUANTAXIS # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including withou...
1.554688
2
artview/components/field.py
jjhelmus/artview
0
7275
""" field.py Class instance used for modifying field via Display window. """ # Load the needed packages from functools import partial from ..core import Variable, Component, QtGui, QtCore class FieldButtonWindow(Component): '''Class to display a Window with Field name radio buttons.''' Vradar = None #: s...
2.96875
3
rest_framework_mongoengine/fields.py
Careerleaf/django-rest-framework-mongoengine
0
7276
from bson.errors import InvalidId from django.core.exceptions import ValidationError from django.utils.encoding import smart_str from mongoengine import dereference from mongoengine.base.document import BaseDocument from mongoengine.document import Document from rest_framework import serializers from mongoengine.fields...
2.125
2
tests/conftest.py
bbhunter/fuzz-lightyear
169
7277
import pytest from fuzz_lightyear.datastore import _ALL_POST_FUZZ_HOOKS_BY_OPERATION from fuzz_lightyear.datastore import _ALL_POST_FUZZ_HOOKS_BY_TAG from fuzz_lightyear.datastore import _RERUN_POST_FUZZ_HOOKS_BY_OPERATION from fuzz_lightyear.datastore import _RERUN_POST_FUZZ_HOOKS_BY_TAG from fuzz_lightyear.datastore...
1.796875
2
src/diepvries/field.py
michael-the1/diepvries
67
7278
"""Module for a Data Vault field.""" from typing import Optional from . import ( FIELD_PREFIX, FIELD_SUFFIX, METADATA_FIELDS, TABLE_PREFIXES, UNKNOWN, FieldDataType, FieldRole, TableType, ) class Field: """A field in a Data Vault model.""" def __init__( self, ...
3.0625
3
mmdet/datasets/deepscoresV2.py
tuggeluk/mmdetection
1
7279
<reponame>tuggeluk/mmdetection """DEEPSCORESV2 Provides access to the DEEPSCORESV2 database with a COCO-like interface. The only changes made compared to the coco.py file are the class labels. Author: <NAME> <<EMAIL>> <NAME> <<EMAIL>> Created on: November 23, 2019 """ from .coco import * import os import...
2.296875
2
tests/go_cd_configurator_test.py
agsmorodin/gomatic
0
7280
#!/usr/bin/env python import unittest from xml.dom.minidom import parseString import xml.etree.ElementTree as ET from decimal import Decimal from gomatic import GoCdConfigurator, FetchArtifactDir, RakeTask, ExecTask, ScriptExecutorTask, FetchArtifactTask, \ FetchArtifactFile, Tab, GitMaterial, PipelineMaterial,...
2.03125
2
gui/wellplot/settings/style/wellplotstylehandler.py
adriangrepo/qreservoir
2
7281
import logging from qrutilities.imageutils import ImageUtils from PyQt4.QtGui import QColor logger = logging.getLogger('console') class WellPlotStyleHandler(object): ''' classdocs ''' def saveDataState(self, wellPlotData, wellPlotStyleWidget): if wellPlotStyleWidget.plotTitleOnCheckBox.isC...
2.3125
2
utm_messages/urls.py
geoffreynyaga/ANGA-UTM
7
7282
from django.conf.urls import url from . import views app_name = "messages" urlpatterns = [ url(r'^$', views.InboxListView.as_view(), name='inbox'), url(r'^sent/$', views.SentMessagesListView.as_view(), name='sent'), url(r'^compose/$', views.MessagesCreateView.as_view(), name='compo...
1.828125
2
server/apps/datablock/tests/test_create_worker.py
iotile/iotile_cloud
0
7283
import datetime import json import dateutil.parser from django.contrib.auth import get_user_model from django.test import Client, TestCase from django.utils import timezone from apps.devicelocation.models import DeviceLocation from apps.physicaldevice.models import Device from apps.property.models import GenericProp...
1.914063
2
nova/policies/servers.py
maya2250/nova
0
7284
<reponame>maya2250/nova<gh_stars>0 # 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 ag...
1.585938
2
set-env.py
sajaldebnath/vrops-custom-group-creation
1
7285
<gh_stars>1-10 # !/usr/bin python """ # # set-env - a small python program to setup the configuration environment for data-push.py # data-push.py contains the python program to push attribute values to vROps # Author <NAME> <<EMAIL>> # """ # Importing the required modules import json import base64 impor...
2.578125
3
week02/day08.py
gtadeus/LeetCodeChallenge2009
0
7286
<filename>week02/day08.py import unittest # Definition for a binary tree node. class TreeNode: def __init__(self, val=0, left=None, right=None): self.val = val self.left = left self.right = right class Solution: def sumRootToLeaf(self, root: TreeNode) -> int: m = self.c(root) ...
3.828125
4
config.py
tiuD/cross-prom
0
7287
<filename>config.py TOKEN = "<KEY>" CHAT_ID = [957539786] # e.g. [1234567, 2233445, 3466123...]
1.109375
1
buchschloss/gui2/__init__.py
mik2k2/buchschloss
1
7288
"""entry point""" from . import main start = main.app.launch
1.101563
1
src/tests/test_stop_at_task.py
francesco-p/FACIL
243
7289
<filename>src/tests/test_stop_at_task.py from tests import run_main_and_assert FAST_LOCAL_TEST_ARGS = "--exp-name local_test --datasets mnist" \ " --network LeNet --num-tasks 5 --seed 1 --batch-size 32" \ " --nepochs 2 --num-workers 0 --stop-at-task 3" def test_finetunin...
1.953125
2
Python/contains-duplicate.py
shreyventure/LeetCode-Solutions
388
7290
<gh_stars>100-1000 # Autor: <NAME> (@optider) # Github Profile: https://github.com/Optider/ # Problem Link: https://leetcode.com/problems/contains-duplicate/ class Solution: def containsDuplicate(self, nums: List[int]) -> bool: count = {} for n in nums : if count.get(n) != None : ...
2.796875
3
build/android/gyp/dex.py
google-ar/chromium
2,151
7291
#!/usr/bin/env python # # 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. import json import logging import optparse import os import sys import tempfile import zipfile from util import build_utils def _C...
2.140625
2
apps/views.py
Edwardhgj/meiduo
0
7292
<reponame>Edwardhgj/meiduo from django.shortcuts import render from django.http import HttpResponse from django.contrib.auth.hashers import check_password, make_password from django.views import View from utils.response_code import RET, error_map from rest_framework.views import APIView from rest_framework.response im...
2.1875
2
learnedevolution/targets/covariance/amalgam_covariance.py
realtwister/LearnedEvolution
0
7293
<filename>learnedevolution/targets/covariance/amalgam_covariance.py import numpy as np; from .covariance_target import CovarianceTarget; class AMaLGaMCovariance(CovarianceTarget): _API=2. def __init__(self, theta_SDR = 1., eta_DEC = 0.9, alpha_Sigma = [-1.1,1.2,1.6], NIS_MAX = ...
2.3125
2
binding.gyp
terrorizer1980/fs-admin
25
7294
<reponame>terrorizer1980/fs-admin { 'target_defaults': { 'win_delay_load_hook': 'false', 'conditions': [ ['OS=="win"', { 'msvs_disabled_warnings': [ 4530, # C++ exception handler used, but unwind semantics are not enabled 4506, # no definition for inline function ],...
1.320313
1
src/botwtracker/settings.py
emoritzx/botw-tracker
7
7295
"""Django settings for botwtracker project. Copyright (c) 2017, <NAME>. botw-tracker is an open source software project released under the MIT License. See the accompanying LICENSE file for terms. """ import os from .config_local import * # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_...
1.554688
2
app/domains/users/views.py
Geo-Gabriel/eccomerce_nestle_mongodb
3
7296
<gh_stars>1-10 from flask import Blueprint, request, jsonify from app.domains.users.actions import get_all_users, insert_user, get_user_by_id, update_user, delete_user app_users = Blueprint('app.users', __name__) @app_users.route('/users', methods=['GET']) def get_users(): return jsonify([user.serialize() for u...
2.609375
3
legacy_code/tf_cnn_siamese/model.py
PerryXDeng/project_punyslayer
2
7297
import legacy_code.tf_cnn_siamese.configurations as conf import tensorflow as tf import numpy as np def construct_cnn(x, conv_weights, conv_biases, fc_weights, fc_biases, dropout = False): """ constructs the convolution graph for one image :param x: input node :param conv_weights: convolutio...
3.0625
3
tests/test_utils_log.py
FingerCrunch/scrapy
41,267
7298
import sys import logging import unittest from testfixtures import LogCapture from twisted.python.failure import Failure from scrapy.utils.log import (failure_to_exc_info, TopLevelFormatter, LogCounterHandler, StreamLogger) from scrapy.utils.test import get_crawler from scrapy.extensions...
2.390625
2
astar.py
jeff012345/clue-part-duo
0
7299
<reponame>jeff012345/clue-part-duo import heapq from typing import List from definitions import RoomPosition, Position import random import sys class PriorityQueue: def __init__(self): self.elements: Array = [] def empty(self) -> bool: return len(self.elements) == 0 def put(self, ...
3.5625
4