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
#!/usr/bin/env python """ @package mi.dataset.parser.test @fid mi-instrument/mi/dataset/parser/test/test_ctdav_nbosi_auv.py @author Rene Gelinas @brief Test code for a ctdav_nbosi_auv data parser """ import os from nose.plugins.attrib import attr from mi.core.log import get_logger from mi.dataset.driver.ctdav_nbosi...
renegelinas/mi-instrument
mi/dataset/parser/test/test_ctdav_nbosi_auv.py
Python
bsd-2-clause
1,901
0.002104
# Copyright 2012 Big Switch Networks, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
uni2u/neutron
neutron/plugins/bigswitch/plugin.py
Python
apache-2.0
39,750
0.000126
from __future__ import print_function, division, absolute_import from fontTools.misc.py23 import * import sys import os import unittest import glob import drawBot import random import AppKit from drawBot.context.tools.gifTools import gifFrameCount from drawBot.misc import DrawBotError from testSupport import StdOutCol...
schriftgestalt/drawbot
tests/testExport.py
Python
bsd-2-clause
12,252
0.002285
import logging import os from datetime import date, datetime from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.contrib.staticfiles.finders import find from django.core.cache import cache from django.c...
vicky2135/lucious
src/oscar/apps/catalogue/abstract_models.py
Python
bsd-3-clause
41,477
0.000072
#!/usr/bin/env python3 # vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab # ######################################################################## # Copyright 2013 KNX-User-Forum e.V. http://knx-user-forum.de/ ######################################################################### # This file ...
martinb07/mysmarthome
plugins/sonos/__init__.py
Python
gpl-3.0
30,168
0.001392
# ------------------------------------------------------------------------------ # Security Central # ------------------------------------------------------------------------------ from .models import User from pyramid.security import Allow, Everyone, Authenticated, ALL_PERMISSIONS from pyramid.authentication import Se...
linuxsoftware/dominoes
davezdominoes/gamecoordinator/security.py
Python
agpl-3.0
5,040
0.002183
from nltk.tokenize import sent_tokenize,word_tokenize from nltk.corpus import stopwords from collections import defaultdict from string import punctuation from heapq import nlargest import re """ Modified from http://glowingpython.blogspot.co.uk/2014/09/text-summarization-with-nltk.html """ class FrequencySummarizer...
rebeccamorgan/easyskim
nat_proc/FrequencySummarizer.py
Python
apache-2.0
2,032
0.015256
# # DEPRECATED: implementation for ffi.verify() # import sys, imp from . import model from .error import VerificationError class VCPythonEngine(object): _class_key = 'x' _gen_python_module = True def __init__(self, verifier): self.verifier = verifier self.ffi = verifier.ffi self._...
xyuanmu/XX-Net
python3.8.2/Lib/site-packages/cffi/vengine_cpy.py
Python
bsd-2-clause
43,314
0.00067
# -*- coding: utf-8 -*- # Generated by Django 1.10a1 on 2016-06-19 04:22 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
Udayraj123/dashboard_IITG
Binder/discussions/migrations/0001_initial.py
Python
mit
904
0.002212
"""Support for monitoring Repetier Server Sensors.""" from datetime import datetime import logging import time from homeassistant.components.sensor import SensorDeviceClass, SensorEntity from homeassistant.core import callback from homeassistant.helpers.dispatcher import async_dispatcher_connect from . import REPETIE...
home-assistant/home-assistant
homeassistant/components/repetier/sensor.py
Python
apache-2.0
5,911
0.000677
# lesson4/exercises.py # Control flow and conditionals # # This file contains exercises about Python conditionals. # Last lesson, we encountered the boolean type. # Python uses booleans to evaluate conditions. # Last time, we directly assigned boolean values True and False, but booleans are # also returned by compari...
vinaymayar/python-game-workshop
lesson4/exercises.py
Python
mit
6,887
0.001307
#! usr/bin/python3 # -*- coding: utf8 -*- import datetime from getpass import getpass from flask_script import Command from scripts.create_json import WriteConfigJson from application import db, app from application.flicket_admin.models.flicket_config import FlicketConfig from application.flicket.models.flicket_mode...
evereux/flicket
setup.py
Python
mit
10,056
0.002088
#!/usr/bin/env python # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------...
QingChenmsft/azure-cli
src/azure-cli/setup.py
Python
mit
3,406
0.000587
""" Base class for any serializable list of things... Copyright 2006, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> This software may be freely redistributed under the terms of the GNU general public license. You should have received a copy of the GNU General Public License along with this program; if not, write ...
brenton/cobbler
cobbler/collection.py
Python
gpl-2.0
13,191
0.010992
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './viewer.ui' # # Created: Sun Aug 23 04:04:27 2009 # by: PyQt4 UI code generator 4.4.2 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui class Ui_MainWindow(object): def setupUi(self, MainWin...
krajj7/spectrogram
viewer/ui_viewer.py
Python
gpl-2.0
6,982
0.007734
# -*- coding: utf-8 -*- """ Utility that imports a function. """ # Future from __future__ import absolute_import, division, print_function, \ unicode_literals, with_statement def import_function(function): """Imports function given by qualified package name""" function = __import__(function, globals(), lo...
cigroup-ol/metaopt
metaopt/concurrent/worker/util/import_function.py
Python
bsd-3-clause
654
0.001529
#!/usr/bin/env python3 """ >>> baralho = Baralho() >>> len(baralho) 52 >>> baralho[0] Carta(valor='2', naipe='paus') >>> baralho[-1] Carta(valor='A', naipe='espadas') >>> from random import choice >>> choice(baralho) #doctest:+SKIP Carta(valor='4', naipe='paus') ...
pythonprobr/notmagic
pt-br/baralho_mut.py
Python
mit
4,149
0.004097
import logging, time, os, sys, re from autotest.client.shared import error from autotest.client import utils from autotest.client.shared.syncdata import SyncData from virttest import data_dir, env_process, utils_test, aexpect @error.context_aware def run_floppy(test, params, env): """ Test virtual floppy of g...
sathnaga/virt-test
qemu/tests/floppy.py
Python
gpl-2.0
18,545
0.001887
# (c) 2012-2014, Chris Meyers <chris.meyers.fsu@gmail.com> # # This file is part of Ansible # # Ansible 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) an...
nrwahl2/ansible
test/units/plugins/callback/test_callback.py
Python
gpl-3.0
11,491
0.000087
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2014 KenV99 # # 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 l...
AmbiBox/kodi.script.ambibox
resources/lib/ambiwincon.py
Python
gpl-2.0
1,568
0.000638
#!/usr/bin/python # -*- coding: utf-8 -*- """ This file is part of XBMC Mega Pack Addon. Copyright (C) 2014 Wolverine (xbmcmegapack@gmail.com) 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 Softwar...
xbmcmegapack/plugin.video.megapack.dev
resources/lib/menus/home_countries_togo.py
Python
gpl-3.0
1,105
0.00272
from joueur.delta_mergeable import DeltaMergeable from joueur.base_game_object import BaseGameObject from joueur.utilities import camel_case_converter from joueur.serializer import is_game_object_reference, is_object # @class GameManager: managed the game and it's game objects including unserializing deltas class Game...
brhoades/megaminer16-anarchy
joueur/game_manager.py
Python
mit
3,572
0.006719
from .entity import Entity class Edge(Entity): """Basic class for all edge objects""" meta = { "ontology": "gch", "typename": "Edge", "hierarchy": "gch/Entity.Edge" } def __init__(self, attributes={}, tags=set([])): super(Edge, self).__init__(attributes, tags)
vurmux/gorynych
gorynych/core/edge.py
Python
apache-2.0
312
0.003205
# -------------------------------------------------------- # Theano @ Dragon # Copyright(c) 2017 SeetaTech # Written by Ting Pan # -------------------------------------------------------- import numpy as np import dragon.core.workspace as ws from dragon.core.tensor import Tensor, GetTensorName def shared(value, name...
neopenx/Dragon
Dragon/python/dragon/vm/theano/compile/sharedvalue.py
Python
bsd-2-clause
890
0.003371
import os def generate_enum(path, localizations): full_path = path + "/" + "Language.swift" if not os.path.isfile(full_path): enum_file = open(full_path, 'w+') enum_file.write("import Foundation\n\n") enum_file.write("enum Language: String {\n") enum_file.write("\tprivate stat...
IljaKosynkin/OnFlyLocalizer
OnFlyLocalizer/OnFlyLocalizer/LanguageEnumGenerator.py
Python
apache-2.0
1,612
0.003102
""" automatic_questioner -------------------- Module which serves as a interactor between the possible database with the described structure and which contains information about functions and variables of other packages. Scheme of the db ---------------- # {'function_name': # {'variables': # {'variabl...
tgquintela/pythonUtils
pythonUtils/TUI_tools/automatic_questioner.py
Python
mit
19,433
0.001029
# -*- coding: utf-8 -*- from __future__ import unicode_literals, print_function, absolute_import import unittest from ..morf import analyze, disambiguate # EINO SANTANEN. Muodon vanhimmat # http://luulet6lgendus.blogspot.com/ sentences = '''KÕIGE VANEM MUDEL Pimedas luusivad robotid, originaalsed tšehhi robotid kahe...
estnltk/estnltk
estnltk/vabamorf/tests/test_disambiguate.py
Python
gpl-2.0
1,255
0.000807
from django.core.management.base import BaseCommand, CommandError from optparse import make_option from django.template.loader import render_to_string from django.conf import settings from preferences.models import UserPreferences from summaries.models import Unseen from django.contrib.sites.models import Site from op...
linkfloyd/linkfloyd
linkfloyd/summaries/management/commands/send_summary_mails.py
Python
bsd-3-clause
2,371
0.003374
# -*- coding: utf-8 -*- # # Modoboa documentation build configuration file, created by # sphinx-quickstart on Mon Jan 3 22:29:25 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
carragom/modoboa
doc/conf.py
Python
isc
7,215
0.006514
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-03 14:00 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('restaurant', '0009_permission'), ] operations = [ migrations.AlterModelOptions( ...
PietPtr/FinalProject
backend/restaurant/migrations/0010_auto_20161103_1400.py
Python
gpl-3.0
526
0.001901
#!/usr/bin/env python from setuptools import setup, find_packages # get requirements.txt with open('requirements.txt') as f: required = f.read().splitlines() setup(name='athos-core', description = 'Athos project core', url = 'https://github.com/AthosOrg/', packages = find_packages(), entry_points...
AthosOrg/athos-core
setup.py
Python
mit
491
0.034623
""" Users ===== """ from pipes import quote import posixpath import random import string from fabric.api import hide, run, settings, sudo, local from fabtools.group import ( exists as _group_exists, create as _group_create, ) from fabtools.files import uncommented_lines from fabtools.utils import run_as_root...
wagigi/fabtools-python
fabtools/user.py
Python
bsd-2-clause
8,682
0
import mutable_attr import unittest class T(unittest.TestCase): def test_foo(self): mutable_attr.y = 3
github/codeql
python/ql/test/query-tests/Imports/general/mutates_in_test.py
Python
mit
117
0.008547
from ctypes import * import unittest import sys class Test(unittest.TestCase): def test_array2pointer(self): array = (c_int * 3)(42, 17, 2) # casting an array to a pointer works. ptr = cast(array, POINTER(c_int)) self.assertEqual([ptr[i] for i in range(3)], [42, 17, 2]) i...
PennartLoettring/Poettrix
rootfs/usr/lib/python3.4/ctypes/test/test_cast.py
Python
gpl-2.0
3,210
0.002492
#!/usr/bin/env python # # Required packages: reqs = """ requests >= 2.0.0 python-bugzilla >= 0.8.0 html2text >= 3.200.3 """ import sys try: import requests assert(requests.__version__ >= "2.0.0") import bugzilla assert(bugzilla.__version__ >= "0.8.0") import html2text assert(html2text.__ver...
wikimedia/pywikibot-sf-export
jira.py
Python
mit
12,518
0.004793
#!/usr/bin/env python # -*- coding: UTF-8 -*- # If this page isn't working, try executing `chmod +x app.py` in terminal. # enable debugging import cgitb, cgi; cgitb.enable() from classes import Factory fieldStorage = cgi.FieldStorage() factory = Factory.Factory() webApp = factory.makeWebApp(fieldStorage) def outpu...
OuachitaHillsMinistries/OHCFS
htbin/app.py
Python
gpl-2.0
447
0.006711
# -*- coding: utf-8 -*- def get_instance_children(obj, depth=0, sig=0): """ Récupèration récursive des relations enfants d'un objet @depth: integer limitant le niveau de recherche des enfants, 0=illimité """ children = [] # Pour toute les relations enfants de l'objet for child in obj._m...
sveetch/sveedocuments
sveedocuments/utils/objects.py
Python
mit
871
0.003476
from django.test import TestCase from bookstore.models import Book, Category class InventoryModelTest(TestCase): def test_string_representation_of_categories(self): category = Category.objects.create(name="health", description="health category") self.assertEqual(category.name, 'health') def ...
andela-ijubril/book-search
booker/bookstore/tests/test_models.py
Python
mit
527
0.003795
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.osv import fields, osv from datetime import datetime from openerp.tools.translate import _ import openerp.addons.decimal_precision as dp from openerp.exceptions import UserError class mrp_repair(osv.osv): ...
angelapper/odoo
addons/mrp_repair/mrp_repair.py
Python
agpl-3.0
35,968
0.004337
""" Test using HAR files in Python tests against the Django ReST framework. """ from django import http from rest_framework import response from test_har import django_rest_har as test_har from test_har import tests class HARDogfoodDRFTests(tests.HARDogfoodTestCase, test_har.HARTestCase): """ Test using HA...
rpatterson/test-har
test_har/tests/test_drf.py
Python
gpl-3.0
563
0
# -*- coding: utf-8 -*- # This code is part of Amoco # Copyright (C) 2006-2011 Axel Tillequin (bdcht3@gmail.com) # published under GPLv2 license """ render.py ========= This module implements amoco's pygments interface to allow pretty printed outputs of tables of tokens built from amoco's expressions and instruction...
bdcht/amoco
amoco/ui/render.py
Python
gpl-2.0
18,256
0.007066
''' Takes file names from the final/ folder and parses the information into readable values and produces statistical measures. Use this module as an executable to process all result information for a single problem, such as: python stats.py final/multiply*.dat Do not mix problems in a single run. NOTE: You CANNOT u...
brianwgoldman/LengthBiasCGP
stats.py
Python
bsd-2-clause
1,633
0
from selenium.webdriver.firefox.webdriver import WebDriver from tests_group.group_lib import GroupBase from tests_contract.contract_lib import ContactBase class SessionHelper: def __init__(self, app): self.app = app def login(self, user_name, password): wd = self.app.wd self.app.open_...
werbk/task-4.11
fixture/TestBase.py
Python
apache-2.0
2,024
0.00247
import asposebarcodecloud from asposebarcodecloud.BarcodeApi import BarcodeApi from asposebarcodecloud.BarcodeApi import ApiException import asposestoragecloud from asposestoragecloud.StorageApi import StorageApi from asposestoragecloud.StorageApi import ResponseMessage import ConfigParser config = Config...
farooqsheikhpk/Aspose.BarCode-for-Cloud
Examples/Python/generating-saving/cloud-storage/set-barcode-image-height-width-quality-settings.py
Python
mit
2,140
0.014953
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from lxml import etree as ElementTree from odoo.http import Controller, route, request class Board(Controller): @route('/board/add_to_dashboard', type='json', auth='user') def add_to_dashboard(self, action_id...
richard-willowit/odoo
addons/board/controllers/main.py
Python
gpl-3.0
1,724
0.00116
from argparse import Action from flexget.options import ArgumentParser def test_subparser_nested_namespace(): p = ArgumentParser() p.add_argument('--outer') p.add_subparsers(nested_namespaces=True) sub = p.add_subparser('sub') sub.add_argument('--inner') sub.add_subparsers() subsub = sub....
Flexget/Flexget
flexget/tests/test_argparse.py
Python
mit
2,272
0.00088
from django.test import TestCase from restclients.myplan import get_plan class MyPlanTestData(TestCase): def test_javerage(self): plan = get_plan(regid="9136CCB8F66711D5BE060004AC494FFE", year=2013, quarter="spring", terms=4) self.assertEquals(len(plan.terms), 4) self.assertEquals(plan.ter...
uw-it-cte/uw-restclients
restclients/test/myplan.py
Python
apache-2.0
3,193
0.002819
# Some useful functions to extract data out of emails # Copyright (C) 2002-2012 John Goerzen & contributors # # 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 2 of the Lic...
styk-tv/offlineimap
offlineimap/emailutil.py
Python
gpl-2.0
1,573
0.001271
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.utils import timezone from django.test import TestCase from django.contrib.auth.models import User from django.test.utils import override_settings import six from happenings.models import Event @override_settings(CALENDAR_...
imposeren/django-happenings
tests/integration_tests/event_factory.py
Python
bsd-2-clause
3,323
0.000602
""" (c) 2013 LinkedIn Corp. 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 writing...
GoUbiq/pyexchange
pyexchange/__init__.py
Python
apache-2.0
853
0.004689
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/crafted/weapon/shared_shield_effectiveness_intensifier_mk4.iff"...
obi-two/Rebelion
data/scripts/templates/object/tangible/ship/crafted/weapon/shared_shield_effectiveness_intensifier_mk4.py
Python
mit
512
0.042969
"""bug 867387 Bixie draft schema Revision ID: 22e4e60e03f Revises: 37004fc6e41e Create Date: 2013-05-10 13:20:35.750954 """ # revision identifiers, used by Alembic. revision = '22e4e60e03f' down_revision = '37004fc6e41e' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql from ...
KaiRo-at/socorro
alembic/versions/22e4e60e03f_bug_867387_bixie_dra.py
Python
mpl-2.0
9,842
0.015241
# # author: Cosmin Basca # # Copyright 2010 University of Zurich # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
cosminbasca/rdftools
rdftools/__version__.py
Python
apache-2.0
707
0.001414
# module pyparsing.py # # Copyright (c) 2003-2011 Paul T. McGuire # # 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, cop...
vsemionov/wordbase
src/wordbase/pyparsing.py
Python
bsd-3-clause
146,612
0.015408
from .models import HourRegistration from orders.models import Product from django.utils import timezone from django.http import JsonResponse from django.contrib.auth.decorators import login_required from datetime import datetime import pytz from django.contrib.auth.decorators import permission_required @login_requir...
jlmdegoede/Invoicegen
hour_registration/views.py
Python
gpl-3.0
5,189
0.000964
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Michael DeHaan <michael@ansible.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1',...
skg-net/ansible
lib/ansible/modules/notification/say.py
Python
gpl-3.0
2,275
0.002198
from flask import request from flask_restful import Resource import json from core.bo.clienteBo import ClienteBo class Cliente(Resource): def __init__(self): self.cliente = ClienteBo() def get(self, parameter=""): if parameter == "": return self.cliente.get_all(), 201 else:...
guigovedovato/python
api/clienteApi.py
Python
gpl-3.0
1,042
0.002879
# -*- coding: utf-8 -*- from dCore import * from dConstants import * from dLog import * from dThread import * from dModules import * class DamnVideoLoader(DamnThread): def __init__(self, parent, uris, thengo=False, feedback=True, allownonmodules=True): DamnThread.__init__(self) self.uris = [] if type(uris) not i...
gordenbrown51/damnvid
dLoader.py
Python
gpl-3.0
3,966
0.037317
#!/usr/bin/env python """Vandermonde matrix example Demonstrates matrix computations using the Vandermonde matrix. * http://en.wikipedia.org/wiki/Vandermonde_matrix """ from sympy import Matrix, pprint, Rational, sqrt, symbols, Symbol, zeros def symbol_gen(sym_str): """Symbol generator Generates sym_str_...
flacjacket/sympy
examples/intermediate/vandermonde.py
Python
bsd-3-clause
4,652
0.006449
# -*- coding: utf-8 -*- import pandas as pd import numpy as np from axiomatic.base import AxiomSystem from axiomatic.elementary_conditions import MinMaxAxiom # l, r, pmin, pmax params = [1, 1, -0.8, 0.8] axiom_list = [MinMaxAxiom(params)] ts = pd.DataFrame(np.random.random((10, 2))) print(ts) print(MinMaxAxiom(param...
victorshch/axiomatic
test_axiom_system.py
Python
gpl-3.0
402
0
""" Support for tracking the proximity of a device. Component to monitor the proximity of devices to a particular zone and the direction of travel. For more details about this component, please refer to the documentation at https://home-assistant.io/components/proximity/ """ import logging from homeassistant.helpers...
mikaelboman/home-assistant
homeassistant/components/proximity.py
Python
mit
8,866
0
from handlers.BaseHandlers import BaseHandler class HomePageHandler(BaseHandler): def get(self, *args, **kwargs): self.render('home.html')
BishopFox/SpoofcheckSelfTest
handlers/HomePageHandler.py
Python
apache-2.0
154
0
# -*- coding: iso-8859-1 -*- """MoinMoin Desktop Edition (MMDE) - Configuration ONLY to be used for MMDE - if you run a personal wiki on your notebook or PC. This is NOT intended for internet or server or multiuser use due to relaxed security settings! """ import sys, os from MoinMoin.config import multiconfig, url...
mgaitan/moin2git
wikiconfig.py
Python
bsd-3-clause
2,368
0.00549
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2011-2013,2015 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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 v...
kartikp1995/gr-bokehgui
python/qa_waterfall_sink_f.py
Python
gpl-3.0
1,883
0.001062
#!/usr/bin/python # -*- coding: utf-8 -*- """ The Art of an Artificial Intelligence http://art-of-ai.com https://github.com/artofai """ __author__ = 'xevaquor' __license__ = 'MIT' import numpy as np import util class LayerBase(object): def __init__(self): self.size = None self.W = np.zeros((0,0))...
artofai/neural-network
layer.py
Python
mit
4,245
0.008009
''' @author: Team Alpha, <aa5186@nyu.edu> Name: Customer Model Purpose: This library is part of the customer REST API for the ecommerce website ''' from customer import Customer
devops-alpha-s17/customers
customers/__init__.py
Python
apache-2.0
184
0.005435
# this app has been deprecated but sticks around for migrations dependencies
concentricsky/badgr-server
apps/composition/__init__.py
Python
agpl-3.0
77
0
""" Flarf: Flask Request Filter ------------- Configurable request filters """ from setuptools import setup setup( name='Flask-Flarf', version='0.0.5', url='https://github.com/thrisp/flarf', license='MIT', author='Thrisp/Hurrata', author_email='blueblank@gmail.com', description='Flask requ...
thrisp/flarf
setup.py
Python
mit
1,046
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 # distribu...
jarrodmcc/OpenFermion
src/openfermion/utils/__init__.py
Python
apache-2.0
5,551
0
""" Feature detection (Szeliski 4.1.1) """ import numpy as np import scipy.signal as sig import scipy.ndimage as ndi from compvis.utils import get_patch def sum_sq_diff(img_0, img_1, u, x, y, x_len, y_len): """ Returns the summed square difference between two image patches, using even weighting across the...
pauljxtan/pystuff
pycompvis/compvis/feature/detectors.py
Python
mit
6,800
0.003676
""" This file implements the lowering for `dict()` """ from numba.targets.imputils import lower_builtin @lower_builtin(dict) def impl_dict(context, builder, sig, args): """ The `dict()` implementation simply forwards the work to `Dict.empty()`. """ from numba.typed import Dict dicttype = sig.retu...
jriehl/numba
numba/targets/dictimpl.py
Python
bsd-2-clause
504
0
""" Copyright 2012, July 31 Written by Pattarapol (Cheer) Iamngamsup E-mail: IAM.PATTARAPOL@GMAIL.COM Sum square difference Problem 6 The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ten natural numbers is, (1 + 2 + ... + ...
pattarapol-iamngamsup/projecteuler_python
problem_006.py
Python
gpl-3.0
1,747
0.034345
# -*- coding: iso-8859-15 -*- # ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # Angelos Tzotsos <tzotsos@gmail.com> # # Copyright (c) 2015 Tom Kralidis # Copyright (c) 2015 Angelos Tzotsos # # Permission is hereby granted, free of charge, to...
kevinpdavies/pycsw
pycsw/plugins/profiles/apiso/apiso.py
Python
mit
50,869
0.00692
import sys from core import loop from util import jsonmanager, debug def make_console_menu(name): menu_data_file_path = '_Resources/Data/MenuData/' path = menu_data_file_path + name + '.json' data = jsonmanager.get_data(path) title = data['Title'] item_data = data['Items'] args = [] for...
monodokimes/pythonmon
core/menu.py
Python
gpl-3.0
1,737
0
#!/usr/bin/env python3 import idmaker import utils from tkinter import * from PIL import Image, ImageTk top = Tk() top.wm_title("Voice Research Laboratory") top.iconbitmap('icons/favicon.ico') top.state('zoomed') class MainWindow: def __init__(self, top): self.top = top self....
drf24/labutils
utils_gui.py
Python
gpl-3.0
7,383
0.006772
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import os import io import six import shutil import atexit import openpyxl import datetime import re from itertools import chain from tempfile imp...
frictionlessdata/tabulator-py
tabulator/parsers/xlsx.py
Python
mit
15,006
0.001066
import torch from deluca.lung.core import Controller, LungEnv class PIDCorrection(Controller): def __init__(self, base_controller: Controller, sim: LungEnv, pid_K=[0.0, 0.0], decay=0.1, **kwargs): self.base_controller = base_controller self.sim = sim self.I = 0.0 self.K = pid_K ...
google/deluca-lung
deluca/lung/experimental/controllers/_pid_correction.py
Python
apache-2.0
874
0.004577
""" Tests for split's copy_from_template method. Currently it is only used for content libraries. However for these tests, we make sure it also works when copying from course to course. """ import ddt from xmodule.modulestore import ModuleStoreEnum from xmodule.modulestore.exceptions import ItemNotFoundError from xmodu...
bmedx/modulestore
xmodule/modulestore/tests/test_split_copy_from_template.py
Python
apache-2.0
7,859
0.002927
#import os import sys import time import xmltodict import pprint pp = pprint.PrettyPrinter(indent=4,stream=sys.stderr) testing = False # def poll_condor(jonbr, bagnr): def poll_condor(filename): # filename = "hist-%d-%d.xml" % ( jobnr, bagnr ) # command = "condor_history -constraint 'HtcJob == %d && HtcBag ...
ema/conpaas
conpaas-services/src/conpaas/services/htc/manager/get_run_time.py
Python
bsd-3-clause
6,391
0.015334
import sys import logging logger = logging.getLogger(__name__) def configure_logging(): root = logging.getLogger() root.setLevel(logging.DEBUG) handler = logging.StreamHandler(sys.stdout) handler.setLevel(logging.DEBUG) formatter = logging.Formatter('%(asctime)s %(name)12s %(levelname)7s - %(mes...
edouard-lopez/parlr
config.py
Python
apache-2.0
394
0.002538
from datetime import datetime import random import string from bson import ObjectId class DuplicateUserException(Exception): def __init__(self, message='User name/email already exits'): Exception.__init__(self, message) pass class UserServiceException(Exception): def __init__(self, message=None...
cackharot/geosnap-server
src/geosnap/service/UserService.py
Python
apache-2.0
2,611
0.000766
class ResizeError(Exception): pass def codelengths_from_frequencies(freqs): freqs = sorted(freqs.items(), key=lambda item: (item[1], -item[0]), reverse=True) nodes = [Node(char=key, weight=value) for (key, value) in freqs] while len(nodes) > 1: right, left = nodes.pop(), nodes.pop() ...
kikocorreoso/brython
www/tests/compression/huffman.py
Python
bsd-3-clause
8,832
0.001472
# -*- coding: utf-8 -*- # Licence: GPL v.3 http://www.gnu.org/licenses/gpl.html # This is an XBMC addon for demonstrating the capabilities # and usage of PyXBMCt framework. import os import xbmc import xbmcaddon import pyxbmct from lib import utils import plugintools from itertools import tee, islice, chain, izip _a...
bigoldboy/repository.bigoldboy
plugin.video.VADER/categorySelectDialog.py
Python
gpl-3.0
3,306
0.005445
# Copyright (C) 2017 Daniel Watkins <daniel@daniel-watkins.co.uk> # # 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 app...
OddBloke/jenkins-job-linter
tests/__init__.py
Python
apache-2.0
612
0
class Image(meta.Entity): data = meta.Bytes()
flowdas/meta
tests/ex/bytes.py
Python
mpl-2.0
50
0
from __future__ import print_function,division # duner. using numbers and sample. """ q +-----+ r +-----+ ---->| C |---->| D |--> s ^ +-----+ +-+---+ | | +-----------------+ C = stock of clean diapers D = stock of dirty diapers q = inflow of clean diapers r = flow of clean diapers...
txt/evil
diapers1.py
Python
unlicense
1,288
0.041149
# -*- coding: utf-8 -*- # Copyright(C) 2013 Julien Veyssier # # This file is part of weboob. # # weboob 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, either version 3 of the License, or # (at your op...
blckshrk/Weboob
weboob/capabilities/recipe.py
Python
agpl-3.0
6,695
0.002091
# -*- coding: utf-8 -*- """ Global tables and re-usable fields """ # ============================================================================= # Import models # from s3.s3model import S3Model import eden as models current.models = models current.s3db = s3db = S3Model() # Explicit import statements to have th...
flavour/ssf
models/00_tables.py
Python
mit
23,677
0.007011
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## Contact: Nokia Corporation (qt-info@nokia.com) ## ## This file is part of the documentation of the Qt Toolkit. ## ## $QT_...
igor-sfdc/qt-wk
doc/src/diagrams/contentspropagation/customwidget.py
Python
lgpl-2.1
6,222
0.007232
""" Application for testing syncing algorithm (c) 2013-2014 by Mega Limited, Wellsford, New Zealand This file is part of the MEGA SDK - Client Access Engine. Applications using the MEGA API must present a valid application key and comply with the the rules set forth in the Terms of Service. The MEGA SDK is di...
wizzard/sdk
tests/sync_test_megacli.py
Python
bsd-2-clause
5,819
0.003781
from utils.functions.models import rows_to_dict_list_lower, GradeQtd def grade_estoque( cursor, ref=None, dep=None, data_ini=None, tipo_grade=None, modelo=None, referencia=None): filtro_modelo = '' filtro_modelo_mask = '' if modelo is not None: filtro_modelo_mask = f'''-- ...
anselmobd/fo2
src/estoque/queries/grade_estoque.py
Python
mit
7,421
0.000404
import pytest import dask.array as da from ..utils import assert_eq xr = pytest.importorskip("xarray") def test_mean(): y = da.mean(xr.DataArray([1, 2, 3.0])) assert isinstance(y, da.Array) assert_eq(y, y) def test_asarray(): y = da.asarray(xr.DataArray([1, 2, 3.0])) assert isinstance(y, da.Ar...
ContinuumIO/dask
dask/array/tests/test_xarray.py
Python
bsd-3-clause
474
0
"""Precompute the polynomials for the asymptotic expansion of the generalized exponential integral. Sources ------- [1] NIST, Digital Library of Mathematical Functions, http://dlmf.nist.gov/8.20#ii """ from __future__ import division, print_function, absolute_import import os import warnings try: # Can remo...
asnorkin/sentiment_analysis
site/lib/python2.7/site-packages/scipy/special/_precompute/expn_asy.py
Python
mit
1,585
0
# coding: utf8 { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyrażeniem postaci "pole1=\'nowawartość\'". Nie możesz uaktualnić lub usunąć wyników z JOIN:', '%Y-%m-%d': '%Y-%m-%d', '%Y-%m-%d %H:%M:%S': '%Y-%m-%d %H:%M:%...
trosa/forca
applications/admin/languages/pl.py
Python
gpl-2.0
15,887
0.020455
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2017, F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
Jorge-Rodriguez/ansible
lib/ansible/modules/network/f5/bigip_gtm_server.py
Python
gpl-3.0
61,691
0.001897
# -*- coding: utf-8 -*- """ *************************************************************************** ExtentFromLayer.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***********************...
slarosa/QGIS
python/plugins/sextante/algs/ftools/ExtentFromLayer.py
Python
gpl-2.0
5,976
0.002677
from __future__ import division import os import sys import glob import shutil import argparse import multiprocessing import subprocess as sb from haystack_common import check_file, HAYSTACK_VERSION import logging logging.basicConfig(level=logging.INFO, format='%(levelname)-5s @ %(asctime)s:\n\t ...
pinellolab/haystack_bio
haystack/run_pipeline.py
Python
agpl-3.0
14,360
0.005292
"""Module for configuring the host environment""" import os import json import sys class HostConfig(): """Sets up the required components on the host environment""" def __init__(self): """Host""" self.path = None self.apps = None def get_path(self): """Gets...
tagn/plex-stack
lib/host.py
Python
gpl-3.0
1,728
0.001157
''' Broken (piecewise continuous) random field generation using rft1d.randn1d Note: When FWHM gets large (2FWHM>nNodes), the data should be padded using the *pad* keyword. ''' import numpy as np from matplotlib import pyplot import rft1d #(0) Set parameters: np.random.seed(12345) nResponses = 5 nNodes = 1...
0todd0000/rft1d
rft1d/examples/random_fields_broken_1.py
Python
gpl-3.0
862
0.018561
"""Uploads apk to rollout track with user fraction.""" import sys import socket from apiclient.discovery import build from oauth2client.service_account import ServiceAccountCredentials import subprocess import xml.etree.ElementTree as ET import os from pathlib import Path TRACK = 'beta' USER_FRACTION = 1 APK_FILE = '...
yunity/foodsaving-frontend
cordova/playstoreHelper/publish_to_beta.py
Python
mit
5,755
0.001911