text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
import unittest from jsonschema import SchemaError from minibus import MiniBusClient class SyntaxTest(unittest.TestCase): def setUp(self): self.client = MiniBusClient() def callback(self): pass def callback2(self): pass def test_sub_good(self): self.client.subscribe("...
allohakdan/minibus
test/test_syntax.py
Python
apache-2.0
1,148
0.008711
from model.contact import Contact from random import randrange def test_edit_contact(app, db, check_ui): if len(db.get_contact_list()) == 0: app.contact.create(Contact(first_name ="Sabina", last_name="test", company="Pewex", address="osiedle", phone_home="123456789", e_m...
sabinaczopik/python_training
test/test_edit_contact.py
Python
apache-2.0
949
0.004215
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation # Author: gdestuynder@mozilla.com # Author: ameihm@mozill...
ameihm0912/mozdef_client
mozdef_client.py
Python
mpl-2.0
20,473
0.00254
# Licensed under the GPLv3 - see LICENSE import pytest import numpy as np import astropy.units as u from astropy.time import Time from .. import vdif from .. import mark4 from .. import mark5b from .. import dada from ..base.encoding import EIGHT_BIT_1_SIGMA from ..data import (SAMPLE_MARK4 as SAMPLE_M4, SAMPLE_MARK5B ...
mhvk/baseband
baseband/tests/test_conversion.py
Python
gpl-3.0
19,399
0
# # acrosby 2013 # def __call__(nc): s = {} for attr in nc.ncattrs(): s[attr] = nc.getncattr(attr) return s
acrosby/netcdf4-getncattrs
getncattrs.py
Python
mit
129
0
# -*- coding: UTF-8 -*- """ Name: generic_task.py Porpose: Execute a generic task with FFmpeg Compatibility: Python3 (Unix, Windows) Author: Gianluca Pernigotto <jeanlucperni@gmail.com> Copyright: (c) 2018/2022 Gianluca Pernigotto <jeanlucperni@gmail.com> license: GPL3 Rev: Feb.14.2022 Code checker: flake8: --ignor...
jeanslack/Videomass
videomass/vdms_threads/generic_task.py
Python
gpl-3.0
3,294
0
#!/usr/bin/env python # coding: utf-8 from .interactiveapp import InteractiveApplication, ENCODING class InteractiveLoopApplication(InteractiveApplication): def __init__(self, name, desc, version, padding, margin, suffix, encoding=ENCODING): super(InteractiveLoopApplication, self).__in...
alice1017/coadlib
coadlib/loopapp.py
Python
mit
871
0
# This file is part of the kbremap project. # Copyright (C) 2014 Nicolas Malarmey # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
elmamyra/kbremap
kbremap_app/keyTools/__init__.py
Python
gpl-3.0
12,391
0.011137
from cx_Freeze import setup, Executable # Dependencies are automatically detected, but it might need # fine tuning. buildOptions = dict(packages = ["pyglet", "polytanks", "codecs", "encodings", "selectors"], excludes = ["tkinter", "PyQt5", "PIL", "setuptools"] , include_files="assets") import sys base = 'Win3...
dotoscat/Polytank-ASIR
client_setup.py
Python
agpl-3.0
626
0.033546
import urllib,re,sys,os import xbmc,xbmcgui,xbmcaddon,xbmcplugin from resources.libs import main #Mash Up - by Mash2k3 2012. addon_id = 'plugin.video.movie25' selfAddon = xbmcaddon.Addon(id=addon_id) art = main.art def LISTSP(murl): #urllist=main.OPENURL('http://oneclickwatch.org/category/movies/')+main.OPE...
marduk191/plugin.video.movie25
resources/libs/movies_tv/oneclickwatch.py
Python
gpl-3.0
11,474
0.022486
import sys def addAbilities(core, actor, player): if actor.getLevel() >= 10: actor.addAbility("sp_cloaked_recovery_0") if actor.getLevel() >= 28: actor.addAbility("sp_cloaked_recovery_1") if actor.getLevel() >= 54: actor.addAbility("sp_cloaked_recovery_2") if actor.getLevel() >= 70: actor.addAbility("sp_cl...
agry/NGECore2
scripts/expertise/expertise_sp_cloaked_recovery_1.py
Python
lgpl-3.0
700
0.027143
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-10-01 13:05 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0002_remove_content_type_name'), ('...
igemsoftware2017/USTC-Software-2017
biohub/forum/migrations/0005_auto_20171001_2105.py
Python
gpl-3.0
799
0.001252
# Copyright (c) 2012 Rackspace Hosting # All Rights Reserved. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License");...
afrolov1/nova
nova/cells/messaging.py
Python
apache-2.0
84,342
0.000628
from pyelt.datalayers.database import Column, Columns from pyelt.datalayers.dv import Sat, DvEntity, Link, Hub, HybridSat, LinkReference class Role: pass class Act: pass class Participation: pass class Zorgverlener(DvEntity, Role): class Default(Sat): zorgverlenernummer = Columns.TextCo...
NLHEALTHCARE/PYELT
tests/old/unit_tests_rob/_domain_rob_unittest.py
Python
gpl-3.0
2,194
0.001823
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2012 OpenPlans # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either versio...
mishravikas/geonode-permissions
geonode/layers/models.py
Python
gpl-3.0
15,289
0.001243
import unittest import scipy from SloppyCell.ReactionNetworks import * lorenz = Network('lorenz') lorenz.add_compartment('basic') lorenz.add_species('x', 'basic', 0.5) lorenz.add_species('y', 'basic', 0.5) lorenz.add_species('z', 'basic', 0.5) lorenz.add_parameter('sigma', 1.0) lorenz.add_parameter('r', 2.0) lorenz....
GutenkunstLab/SloppyCell
test/test_FixedPoints.py
Python
bsd-3-clause
3,610
0.006925
#this model represents a request in our system from google.appengine.ext import ndb from datetime import datetime from datetime import timedelta class Request(ndb.Model): city = ndb.StringProperty() phone = ndb.StringProperty() date = ndb.DateTimeProperty() description = ndb.StringProperty() isCarNeeded...
chenbachar/HelpApp
src/versions/Iter2/helpapp-seproject/models/request.py
Python
mit
739
0.051421
from gettext import gettext as _ import traceback from pulp.client.commands.repo.sync_publish import StatusRenderer from pulp.client.extensions.core import COLOR_FAILURE from pulp_puppet.common import constants from pulp_puppet.common.publish_progress import PublishProgressReport from pulp_puppet.common.sync_progres...
dkliban/pulp_puppet
pulp_puppet_extensions_admin/pulp_puppet/extensions/admin/repo/status.py
Python
gpl-2.0
12,614
0.002299
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-08-04 12:17 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('communities', '0013_auto_20160801_1241'), ] operati...
yaniv14/OpenCommunity
src/communities/migrations/0014_auto_20160804_1517.py
Python
bsd-3-clause
603
0.001658
from croplands_api import api from croplands_api.models import User from croplands_api.views.api.processors import api_roles, remove_relations from croplands_api.exceptions import Unauthorized from croplands_api.auth import is_anonymous, current_user, verify_role def can_edit_the_user(data=None, **kwargs): """ ...
justinwp/croplands
croplands_api/views/api/users.py
Python
mit
2,237
0.002235
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
addition-it-solutions/project-all
addons/account_bank_statement_extensions/account_bank_statement.py
Python
agpl-3.0
6,685
0.005984
DEBUG = True SQLALCHEMY_DATABASE_URI = 'sqlite:////tmp/test.db'
xperienced/flask-rest-boilerplate
config/development.py
Python
mit
63
0.015873
from django.template import Library, Node, Variable, VariableDoesNotExist from django.core.urlresolvers import reverse from job_board.views import job_list_by_tag register = Library() def do_populate_tags(parser,token): """ render a list of tags, with it's link. the token is tag. Arguments: - `pa...
jpartogi/django-job-board
job_board/templatetags/tag_list.py
Python
bsd-3-clause
1,058
0.017013
# -*- coding: utf-8 -*- # Copyright 2016 KMEE # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { 'name': 'L10n Br Resource', 'summary': """ This module extend core resource to create important brazilian informations. Define a Brazilian calendar and some tools to compute d...
kmee/odoo-brazil-hr
l10n_br_resource/__openerp__.py
Python
agpl-3.0
854
0
''' Create an unified test_stub to share test operations @author: Youyk ''' import os import subprocess import time import uuid import zstacklib.utils.ssh as ssh import zstacklib.utils.jsonobject as jsonobject import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_util as test_util...
zstackio/zstack-woodpecker
integrationtest/vm/virt_plus/test_stub.py
Python
apache-2.0
33,035
0.007083
""" Copyright (c) 2012-2020 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any la...
rockstor/rockstor-core
src/rockstor/smart_manager/views/cpu_util.py
Python
gpl-3.0
963
0
from django.template import Context, loader from pokemon.models import Pokemon from django.http import HttpResponse from django.http import Http404 def index(request): Pokemons = Pokemon.objects.all().order_by('id_pokemon') t = loader.get_template('pokemon/index.html') c = Context({ 'Pokemons': Pok...
pgrimaud/django-pokedex
pokemon/views.py
Python
mit
616
0.008117
# # Copyright (c) 2011 Red Hat, Inc. # # This software is licensed to you under the GNU Lesser General Public # License as published by the Free Software Foundation; either version # 2 of the License (LGPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or implied, # includin...
splice/gofer
src/gofer/metrics.py
Python
lgpl-2.1
1,728
0.004051
__version_info__ = ('1', '0', '0') __version__ = '.'.join(__version_info__)
bmmalone/pymisc-utils
pyllars/__init__.py
Python
mit
76
0
from copper.cop.cop_node import CopNode import pyopencl as cl import numpy from PIL import Image class COP2_Comp_Add(CopNode): ''' This filter adds foreground over background using OpenCL ''' type_name = "add" category = "comps" def __init__(self, engine, parent): super(CLC_Comp_Add, self).__init__(engine, ...
cinepost/Copperfield_FX
copper/cop/cop_comps.py
Python
unlicense
2,456
0.041938
"""Scikit Flow Estimators.""" # Copyright 2015-present The Scikit Flow 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/L...
shishaochen/TensorFlow-0.8-Win
tensorflow/contrib/learn/python/learn/estimators/__init__.py
Python
apache-2.0
1,777
0.00619
from django import forms from models import edi_address class DocumentForm(forms.ModelForm): docfile = forms.FileField() class Meta: model = edi_address fields = ["docfile",]
codelab-mx/edi-translator
data_mining/forms.py
Python
gpl-3.0
193
0.036269
from matplotlib import rcParams, rc from spuriousRadioProbRangeP1 import probsOfGRP from util import mpfit from util.fitFunctions import gaussian import matplotlib.pyplot as plt import numpy as np import matplotlib import scipy.stats import tables import scipy.special def fitGauss(xdata,ydata,yerr,flatLine=False): ...
bmazin/ARCONS-pipeline
examples/Pal2012-crab/enhancementPhaseP1.py
Python
gpl-2.0
21,133
0.022903
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('main', '0019_auto_20170521_1332'), ] ...
google/mirandum
alerts/main/migrations/0020_recentactivity.py
Python
apache-2.0
895
0.002235
import pytest import cv2 from plantcv.plantcv.visualize import auto_threshold_methods def test_auto_threshold_methods_bad_input(visualize_test_data): """Test for PlantCV.""" img = cv2.imread(visualize_test_data.small_rgb_img) with pytest.raises(RuntimeError): _ = auto_threshold_methods(gray_img=im...
danforthcenter/plantcv
tests/plantcv/visualize/test_auto_threshold_methods.py
Python
mit
558
0
# Copyright (c) 2014 Red Hat, Inc. # # This software is licensed to you under the GNU General Public # License as published by the Free Software Foundation; either version # 2 of the License (GPLv2) or (at your option) any later version. # There is NO WARRANTY for this software, express or implied, # including the impl...
jortel/gofer
test/unit/messaging/adapter/test_url.py
Python
lgpl-2.1
4,053
0.000247
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import datet...
akintolga/superdesk-core
superdesk/activity.py
Python
agpl-3.0
10,291
0.002624
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # ex: set expandtab softtabstop=4 shiftwidth=4: # # Copyright (C) 2008,2009,2010,2011,2012,2013,2014,2015,2016,2017 Contributor # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Y...
guillaume-philippon/aquilon
lib/aquilon/worker/commands/map_service.py
Python
apache-2.0
3,474
0.001727
# Copyright 2021 The OpenTelemetry 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 law or agreed t...
GoogleCloudPlatform/opentelemetry-operations-python
opentelemetry-exporter-gcp-trace/tests/test_cloud_trace_exporter.py
Python
apache-2.0
28,235
0.000106
#!/usr/bin/env python3 from struct import pack, unpack from datetime import date from pathlib import Path import os.path import argparse import sys import re configFilename = 'openmw.cfg' configPaths = { 'linux': '~/.config/openmw', 'freebsd': '~/.config/openmw', 'darwin': '~/Libra...
jmelesky/omwllf
omwllf.py
Python
isc
17,912
0.00709
#!/bin/python import sys def getSumOfAP(n, max): size = (max - 1) // n return (size * (n + size * (n)) / 2) def getSumOfMultiples(n): return (getSumOfAP(3, n) + getSumOfAP(5, n) - getSumOfAP(15, n)) def main(): numInputs = int(raw_input().strip()) for idx in xrange(numInputs): n = int...
pavithranrao/projectEuler
projectEulerPython/problem001.py
Python
mit
429
0
# Copyright (c) 2013-2014 Will Thames <will@thames.id.au> # # 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 without limitation the rights # to use, copy, modify...
schlueter/ansible-lint
lib/ansiblelint/rules/MismatchedBracketRule.py
Python
mit
1,497
0
# -*- encoding: utf-8 -*- ################################################################################ # # # Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol # # ...
odoousers2014/odoo_addons-2
clv_tray/wkf/clv_tray_wkf.py
Python
agpl-3.0
3,291
0.009116
def init_actions_(service, args): """ this needs to returns an array of actions representing the depencies between actions. Looks at ACTION_DEPS in this module for an example of what is expected """ # some default logic for simple actions return { 'test': ['install'] } de...
Jumpscale/ays_jumpscale8
tests/test_services/test_validate_delete_models/actions.py
Python
apache-2.0
2,695
0.005937
#!/bin/python def swap(findex, sindex, ar): ar[findex], ar[sindex] = ar[sindex], ar[findex] def partition(ar, lo, hi): '''3 way djisktra partition method''' start = lo pivotIndex = (lo+hi)//2 # take the elemet @ hi as the pivot and swap it to pivotIndex position swap(pivotIndex, hi, ar) pi...
codecakes/algorithms
algorithms/code30DaysImp/helper/quicksort.py
Python
mit
1,313
0.006855
from __future__ import absolute_import import re import json import copy import os from svtplay_dl.service import Service, OpenGraphThumbMixin from svtplay_dl.utils.urllib import urlparse from svtplay_dl.utils import filenamify from svtplay_dl.fetcher.http import HTTP from svtplay_dl.fetcher.hds import hdsparse from s...
leakim/svtplay-dl
lib/svtplay_dl/service/vg.py
Python
mit
2,200
0.001364
from st2actions.runners.pythonrunner import Action from st2client.client import Client # Keep Compatability with 0.8 and 0.11 until st2build is upgraded try: from st2client.models.datastore import KeyValuePair except ImportError: from st2client.models.keyvalue import KeyValuePair class KVPAction(Action): ...
StackStorm/st2cd
actions/kvstore.py
Python
apache-2.0
1,061
0.000943
from django.shortcuts import render, redirect, get_object_or_404 from django.urls import reverse from mainmodels.models import Course, FeaturedCourse # Create your views here. def index(req): mostPopularCourses = Course.objects.raw('SELECT * FROM mainmodels_course as main_course JOIN (SELECT main_tran.courseID, COU...
PNNutkung/Coursing-Field
index/views.py
Python
apache-2.0
876
0.004566
#!/usr/bin/python import pygame import math import random import sys import PixelPerfect from pygame.locals import * from water import Water from menu import Menu from game import Game from highscores import Highscores from options import Options import util from locals import * import health import cloud impor...
italomaia/turtle-linux
games/FunnyBoat/run_game.py
Python
gpl-3.0
3,190
0.006583
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
dvitme/odoo-addons
portal_partner_fix/__openerp__.py
Python
agpl-3.0
1,565
0.000639
#!/usr/bin/python import os from autotest.client import utils version = 1 def setup(tarball, topdir): srcdir = os.path.join(topdir, 'src') utils.extract_tarball_to_dir(tarball, srcdir) os.chdir(srcdir) utils.make() os.environ['MAKEOPTS'] = 'mandir=/usr/share/man' utils.make('install') os....
nacc/autotest
client/deps/grubby/grubby.py
Python
gpl-2.0
518
0.003861
########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
amcat/amcat
amcat/models/coding/tests/codingruletoolkit.py
Python
agpl-3.0
7,493
0.001735
import json from owlready import * # input parameters file_path = sys.argv[1] onto_path = sys.argv[2] # load ontology onto = get_ontology(onto_path).load() # course found list course_ids = [] # for each course, find the active version (avoid multi instances of one course) with open(file_path + '/modulestore.active_...
lazzyCloud/SLR
db2owl/course_json2owl.py
Python
agpl-3.0
4,862
0.004319
#!usr/bin/env python # # Copyright 2013 Matthew Wall # See the file LICENSE.txt for your full rights. # # Thanks to Kenneth Lavrsen for the Open2300 implementation: # http://www.lavrsen.dk/foswiki/bin/view/Open2300/WebHome # description of the station communication interface: # http://www.lavrsen.dk/foswiki/bin/vie...
garretlh/nimbus-drivers
src/main/python/nimbusdrivers/ws23xx.py
Python
gpl-3.0
72,031
0.004776
import datetime class AuthenticationInfo: def __init__(self, password, email): self.Password = password self.Email = email class ProfileInfo: def __init__(self, display_name): self.DisplayName = display_name class Token: def __init__(self, id_token, valid_until): self.Id =...
Com-Ericmas001/py-userbase
py_userbase/userbase_models.py
Python
mit
2,746
0.00437
# # Copyright (C) 2013 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
flavio-fernandes/networking-odl
networking_odl/fwaas/driver.py
Python
apache-2.0
2,105
0
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
i2c2-caj/CS4990
Homework/crminal/crm/migrations/0001_initial.py
Python
gpl-2.0
6,674
0.004495
#!/usr/bin/python # -*- coding: utf-8 -*- import locale import os import sys from datetime import date from kargoxml import add_column script_dir = os.path.split(os.path.abspath(os.path.dirname(__file__)))[0] project_dir = os.path.split(script_dir)[0] sys.path.append(project_dir) sys.path.append(os.path.split(projec...
MehmetNuri/ozgurlukicin
scripts/kargo/main.py
Python
gpl-3.0
1,129
0.004429
""" Wrapper for safely working with curses subwindows. Based on code from the arm project, developed by Damian Johnson under GPLv3 (www.atagar.com - atagar@torproject.org) """ import os import copy import time import curses import curses.ascii import curses.textpad from threading import RLock from multiprocessing imp...
shadow/shadow-ctl
src/panel.py
Python
gpl-3.0
41,934
0.005032
#!/usr/bin/python3 import numpy as np import cv2 from collections import deque from obstacle_detector.distance_calculator import spline_dist from obstacle_detector.perspective import inv_persp_new from obstacle_detector.perspective import regress_perspecive from obstacle_detector.depth_mapper import calculate_depth...
Sid1057/obstacle_detector
depth_test.py
Python
mit
3,465
0.002886
""" Settings for REST framework are all namespaced in the REST_FRAMEWORK setting. For example your project's `settings.py` file might look like this: REST_FRAMEWORK = { 'DEFAULT_RENDERER_CLASSES': ( 'rest_framework.renderers.JSONRenderer', 'rest_framework.renderers.YAMLRenderer', ) 'DEFAULT...
DeltaEpsilon-HackFMI2/FMICalendar-REST
venv/lib/python2.7/site-packages/rest_framework/settings.py
Python
mit
6,264
0.000319
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-14 17:12 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('volunteers', '0001_initial'), ] operations = [ migrations.RenameField( ...
NewsNerdsAtCoJMC/ProjectTicoTeam6
service/volunteers/migrations/0002_auto_20170314_1712.py
Python
mit
424
0
"""equinox_spring16_api URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='hom...
ivanprjcts/equinox-spring16-API
equinox_spring16_api/equinox_spring16_api/urls.py
Python
lgpl-3.0
1,431
0.000699
# -*- coding: utf-8 -*- from __future__ import unicode_literals from privagal.core.utils import PrivagalTestCase from ...gallery.factories import GalleryFactory, ImageFactory class GalleryFactoryTestCase(PrivagalTestCase): def test_images_given(self): image = ImageFactory() gallery = GalleryFac...
ychab/privagal
privagal/gallery/tests/test_factories.py
Python
bsd-3-clause
584
0
from sqlalchemy import and_ from DBtransfer import * from zlib import * #retrun compressed def generateFromDB(DBSession, InternData, tmp_name) : run_list=[] user_data = DBSession.query(InternData).filter(InternData.timestamp == tmp_name) for data in user_data : if not data.run in run_list : run_list.append(da...
mwalzer/Ligandomat
ligandomat/run_list_handling.py
Python
mit
2,262
0.07206
#!/usr/bin/env python '''====================================================== Created by: D. Spencer Maughan Last updated: May 2015 File name: IRIS_DF_Controller.py Organization: RISC Lab, Utah State University Notes: ======================================================''' import roslib;...
riscmaster/risc_maap
risc_control/src/IRIS_DF_Controller.py
Python
bsd-2-clause
6,110
0.022913
#!/usr/bin/env python # coding=utf-8 # Python Script # # Copyleft © Manoel Vilela # # from functools import reduce """ Digit fifth powers Problem 30 Surprisingly there are only three numbers that can be written as the sum of fourth powers of their digits: 1634 = 1^4 + 6^4 + 3^4 + 4^4 8208 = 8^4 + 2^4 + ...
DestructHub/ProjectEuler
Problem030/Python/solution_1.py
Python
mit
1,884
0.010144
# -*- coding: utf-8 -*- # # Author: Travis Oliphant 2002-2011 with contributions from # SciPy Developers 2004-2011 # from __future__ import division, print_function, absolute_import import warnings import numpy as np from scipy._lib.doccer import (extend_notes_in_docstring, ...
gertingold/scipy
scipy/stats/_continuous_distns.py
Python
bsd-3-clause
220,936
0.000751
# -*- coding: utf-8 -*- # [HARPIA PROJECT] # # # S2i - Intelligent Industrial Systems # DAS - Automation and Systems Department # UFSC - Federal University of Santa Catarina # Copyright: 2006 - 2007 Luis Carlos Dill Junges (lcdjunges@yahoo.com.br), Clovis Peruchi Scotti (scotti@ieee.org), # Guilh...
Exterminus/harpia
harpia/bpGUI/runCmd.py
Python
gpl-2.0
6,533
0.002756
#coding=utf-8 #-*- encoding: utf-8 -*- import tornado.ioloop import tornado.iostream import socket import struct import NotifyTCPServer def readPacketHeader(): stream.read_bytes(NotifyTCPServer.PACKET_HEADER_LEN, parsePacketHeader) def parsePacketHeader(data): sign,cmd,bodySize = struct.unpack('>2sHH', data) p...
xaccc/videoapiserver
testNotifyTCPServer.py
Python
gpl-2.0
1,234
0.024311
#! /usr/bin/env python import sys, os sys.path.append('./include/python') import proteomatic import string import re class TransposeDna(proteomatic.ProteomaticScript): def run(self): # convert all characters to upper case # Attention: parameters are Unicode because of the JSON parser # us...
specht/proteomatic-scripts
transpose-dna.defunct.py
Python
gpl-3.0
911
0.009879
#-*- coding: utf-8 -*- """OAuth 2.0 Django Models""" import time from hashlib import sha512 from uuid import uuid4 from django.db import models from django.contrib.auth.models import User from .consts import CLIENT_KEY_LENGTH, CLIENT_SECRET_LENGTH from .consts import SCOPE_LENGTH from .consts import ACCESS_TOKEN_LE...
xrage/oauth2app-mongoDb
oauth2app/models.py
Python
mit
5,945
0.000168
#!/usr/bin/env python #______________________________________# #Dexacker is an open source tool developed by Abdelmadjd Cherfaoui #Dexacker is designed for Educational Stuff to do a LEGAL DDOS Test and the developers is # not responsible for ILLEGAL USES #Contacting using:@Hexacker | fb.com/Hexacker #http://www.hackerc...
Hexacker/Dexacker
Dexacker.py
Python
gpl-2.0
1,733
0.030006
"""Describe group states.""" from homeassistant.components.group import GroupIntegrationRegistry from homeassistant.const import STATE_OK, STATE_PROBLEM from homeassistant.core import HomeAssistant, callback @callback def async_describe_on_off_states( hass: HomeAssistant, registry: GroupIntegrationRegistry ) ->...
jawilson/home-assistant
homeassistant/components/plant/group.py
Python
apache-2.0
421
0
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
394954369/horizon
openstack_dashboard/dashboards/project/volumes/volumes/tests.py
Python
apache-2.0
49,698
0.001127
#!/usr/bin/env python # encoding: utf-8 """ __init__.py The MIT License (MIT) Copyright (c) 2013 Matt Ryan 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 without ...
mattvryan/audiofile
afmq/__init__.py
Python
mit
3,351
0.021486
import logging from django.core.management.base import BaseCommand from citation.ping_urls import verify_url_status logger = logging.getLogger(__name__) class Command(BaseCommand): help = '''Method that check if the code archived urls are active and working or not ''' def handle(self, *args, **options): ...
dhruvilpatel/citation
citation/management/commands/validate_urls.py
Python
gpl-3.0
389
0.002571
from flask import Blueprint, flash, redirect, render_template, request, url_for from sqlalchemy.orm.exc import NoResultFound from ..sqltypes import HashableLocale as Locale from ..work import Trope, Work from .db import session adv_search_bp = Blueprint('adv_search', __name__) @adv_search_bp.route('/', methods=['P...
clicheio/cliche
cliche/web/adv_search.py
Python
mit
2,111
0
#!/usr/bin/env python from flask import (Flask, request, render_template) from flask.ext import restful from flask.ext.restful import reqparse import pickle SETTINGS_P = 'settings.p' app = Flask(__name__) api = restful.Api(app) def get_settings(): settings = {'state':'off'} try: settings = pickle.l...
ajportier/raspi-gpio-work
light-toggle/server.py
Python
gpl-2.0
1,463
0.005468
__source__ = 'https://leetcode.com/problems/nested-list-weight-sum/' # https://github.com/kamyu104/LeetCode/blob/master/Python/nested-list-weight-sum.py # Time: O(n) # Space: O(h) # # Description: Leetcode # 339. Nested List Weight Sum # # Given a nested list of integers, return the sum of all integers in the list wei...
JulyKikuAkita/PythonPrac
cs15211/NestedListWeightSum.py
Python
apache-2.0
4,780
0.004603
"""Edit the RWhois data on the account.""" # :license: MIT, see LICENSE for more details. import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions import click @click.command() @click.option('--abuse', help='Set the abuse email address') @click.option('--address1', help='Update th...
briancline/softlayer-python
SoftLayer/CLI/rwhois/edit.py
Python
mit
1,891
0
# -*- coding: utf-8 -*- # # RERO ILS # Copyright (C) 2019 RERO # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, version 3 of the License. # # This program is distributed in the hope that...
rero/reroils-app
tests/ui/locations/test_locations_mapping.py
Python
gpl-2.0
1,616
0
#!/usr/bin/env python2 # Terminator by Chris Jones <cmsj@tenshu.net> # GPL v2 only """terminal_popup_menu.py - classes necessary to provide a terminal context menu""" import string from gi.repository import Gtk from version import APP_NAME from translation import _ from encoding import TerminatorEncoding from termi...
wpjunior/terminator
terminatorlib/terminal_popup_menu.py
Python
gpl-2.0
11,983
0.004423
# Game Jolt Trophy for Python # by viniciusepiplon - vncastanheira@gmail.com # version 1.1 # Python 3.x stable # Python 2.7 unstable # This is a general Python module for manipulating user data and # trophies (achievments) on GameJolt. # Website: www.gamejolt.com # This program is free software: you can redistribute ...
yaelatletl/gj_e3d_api
py_gjapi.py
Python
lgpl-3.0
13,032
0.028392
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2009, 2013 Zuza Software Foundation # # This file is part of Pootle. # # Pootle is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software # Foundation; either version 2 of t...
arky/pootle-dev
pootle/apps/pootle_terminology/templatetags/terminology_tags.py
Python
gpl-2.0
1,119
0
# Copyright 2016 by Raytheon BBN Technologies Corp. All Rights Reserved. ''' Test the qgl2/basic_sequences to ensure they replicate the QGL1 functionality. ''' import datetime import unittest import numpy as np from math import pi import random from pyqgl2.main import compile_function from pyqgl2.qreg import QRegiste...
BBN-Q/pyqgl2
test/test_basic_mins.py
Python
apache-2.0
34,859
0.004131
# Copyright 2015-2017 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
scotwk/cloud-custodian
c7n/resources/elb.py
Python
apache-2.0
29,736
0.000303
#! /usr/bin/python # -*- coding: utf-8 -*- """ Created on Fri Jan 27 18:31:59 2017 @author: katsuya.ishiyama """ from numpy import random # Definition of module level constants SUCCESS_CODE = 1 FAILURE_CODE = 0 class Strategy(): def __init__(self, n): _success_probability = _generate_success_proba...
Katsuya-Ishiyama/simulation
strategy/strategy.py
Python
mit
2,013
0.00149
import urllib2 from HTMLParser import HTMLParser from traceback import print_exc from sys import stderr class _DeHTMLParser(HTMLParser): ''' 利用HTMLParse来解析网页元素 ''' def __init__(self): HTMLParser.__init__(self) self.img_links = [] def handle_starttag(self, tag, attrs): if tag == 'img': # print(attrs) ...
luoxufeiyan/python
burness/0013/get_photos.py
Python
mit
1,039
0.043095
#!/usr/bin/env python2 """ This is the main module, used to launch the persistency engine """ #from persio import iohandler import persui.persinterface as ui def main(): """ Launches the user interface, and keeps it on.""" interface = ui.Persinterface() while True: interface.run() if __name__ == ...
jepio/pers_engine
persengine.py
Python
gpl-2.0
733
0.002729
# -*- coding: utf-8 -*- # # test_get_sp_status.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the Lice...
hakonsbm/nest-simulator
pynest/nest/tests/test_sp/test_get_sp_status.py
Python
gpl-2.0
3,006
0
from filer.apps import FilerConfig class MyFilerConfig(FilerConfig): verbose_name = "Dateiverwaltung"
n2o/dpb
dpb/apps.py
Python
mit
108
0
# Copyright (c) 2015 Aaron Kehrer # Licensed under the terms of the MIT License # (see fiddle/__init__.py for details) import os import unicodedata from io import StringIO from PyQt4 import QtCore, QtGui from fiddle.config import EDITOR_FONT, EDITOR_FONT_SIZE class PyConsoleTextBrowser(QtGui.QTextBrowser): def ...
akehrer/fiddle
fiddle/controllers/PyConsole.py
Python
gpl-3.0
5,579
0.001255
# 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. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012 Cloudscaling Group, Inc. # All Rights Reserved. # # Licens...
alex/solum
solum/openstack/common/db/sqlalchemy/models.py
Python
apache-2.0
3,969
0
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2018 David Arroyo Menéndez # Author: David Arroyo Menéndez <davidam@gnu.org> # Maintainer: David Arroyo Menéndez <davidam@gnu.org> # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as p...
davidam/python-examples
bokeh/openstreetmap.py
Python
gpl-3.0
1,245
0
#!/usr/bin/env python # coding=utf-8 from toughlogger.common import pyforms from toughlogger.common.pyforms import rules from toughlogger.common.pyforms.rules import button_style, input_style password_update_form = pyforms.Form( pyforms.Textbox("tra_user", description=u"管理员名", size=32, readonly="readonly", **inp...
talkincode/toughlogger
toughlogger/console/handlers/password_forms.py
Python
agpl-3.0
789
0.006784
# -*- coding: utf-8 -*- """ Certificates are created for a student and an offering of a course. When a certificate is generated, a unique ID is generated so that the certificate can be verified later. The ID is a UUID4, so that it can't be easily guessed and so that it is unique. Certificates are generated in batches...
jazkarta/edx-platform-for-isc
lms/djangoapps/certificates/models.py
Python
agpl-3.0
17,158
0.000816
#!/usr/bin/env python import binascii import hashlib from reversecoin.bitcoin.key import CKey as Key from reversecoin.bitcoin.base58 import encode, decode def myhash(s): return hashlib.sha256(hashlib.sha256(s).digest()).digest() def myhash160(s): h = hashlib.new('ripemd160') h.update(hashlib.sha256(s).di...
obulpathi/reversecoin
reversecoin/bitcoin/utils.py
Python
gpl-2.0
4,697
0.004897
from pseudoregion import * class Edge(PseudoRegion): """EDGE Fringe field and other kicks for hard-edged field models 1) edge type (A4) {SOL, DIP, HDIP, DIP3, QUAD, SQUA, SEX, BSOL, FACE} 2.1) model # (I) {1} 2.2-5) p1, p2, p3,p4 (R) model-dependent parameters Edge type = SOL p1: BS [T] ...
jon2718/ipycool_2.0
edge.py
Python
mit
4,743
0.002321
from kaleidoscope.globals import SecType class OrderLeg(object): def __init__(self, quantity, contract): """ This class is an abstraction of an order leg of an option strategy. It holds the information for a single order leg as part of an entire option strategy. """ self.q...
michaelchu/kaleidoscope
kaleidoscope/options/order_leg.py
Python
mit
884
0.001131