code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
import re from expynent import compiled from expynent import patterns from expynent.shortcuts import is_private def assert_is_compiled(obj): assert isinstance(obj, type(re.compile(''))) def test_patterns_are_compiled(): def walk(dictionary): for value in dictionary.values(): if isinstan...
lk-geimfari/expynent
tests/test_compiled.py
Python
bsd-3-clause
774
# -*- coding: utf-8 -*- ''' Local settings - Run in Debug mode - Use console backend for emails - Add Django Debug Toolbar - Add django-extensions as app ''' from .common import * # noqa # DEBUG # ------------------------------------------------------------------------------ DEBUG = env.bool('DJANGO_DEBUG', default...
drxos/kuiqblog
config/settings/local.py
Python
bsd-3-clause
2,106
#! /usr/bin/env python # -*- coding: utf-8 -*- from django import forms from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from landing.models import LandingRegister class LandingForm(forms.ModelForm): class Meta: model = LandingRegister fields = ( 'nam...
andresfcardenas/marketing-platform
landing/forms.py
Python
bsd-3-clause
803
#!/usr/bin/env python # -*- coding: utf-8 -*- """Windows API functions.""" import ctypes import os import sys from ctypes import WinError, wintypes from colorise.win.winhandle import WinHandle # Create a separate WinDLL instance since the one from ctypes.windll.kernel32 # can be manipulated by other code that also ...
MisanthropicBit/colorise
src/colorise/win/win32_functions.py
Python
bsd-3-clause
10,715
""" file: test_application.py desc: TODO """ import os, unittest, tempfile from birdseye.application import app class FlaskTests(unittest.TestCase): def test_get_static_js(self): tempfile.tempdir = app.root_path + '/static/js/' f = tempfile.NamedTemporaryFile() with app.test_client() as c...
Sigf/outbreak
birdseye/tests/test_application.py
Python
bsd-3-clause
1,282
# -*- coding: utf-8 -*- from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('core', '0026_auto_20160114_1528'), ] operations = [ migrations.AlterField( model_name='assignment', name='grading_system_plugin_id', ...
devilry/devilry-django
devilry/apps/core/migrations/0027_auto_20160116_1843.py
Python
bsd-3-clause
771
# encoding: utf-8 """ check.py Created by Thomas Mangin on 2009-08-25. Copyright (c) 2009-2015 Exa Networks. All rights reserved. """ # common from exabgp.protocol.family import known_families from exabgp.bgp.message.update import Update from exabgp.bgp.message.open import Open from exabgp.bgp.message.open.capabilit...
fugitifduck/exabgp
lib/exabgp/configuration/check.py
Python
bsd-3-clause
7,056
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This is an Astropy affiliated package. """ # Affiliated packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init im...
hlabathems/iccf
iccf/__init__.py
Python
bsd-3-clause
517
# -*- coding: utf-8 -*- from __future__ import absolute_import import os from zeeko._build_helpers import get_utils_extension_args, get_zmq_extension_args, _generate_cython_extensions, pxd, get_package_data from astropy_helpers import setup_helpers utilities = [pxd("..utils.rc"), pxd("..utils.msg"), ...
alexrudy/Zeeko
zeeko/handlers/setup_package.py
Python
bsd-3-clause
1,501
# Copyright (c) 2009-2010, Cloud Matrix Pty. Ltd. # Copyright (c) 2016-2016, Adrien J. <liryna.stark@gmail.com>. # All rights reserved; available under the terms of the MIT License. """ fs.expose.dokan.libdokan: low-level ctypes interface to Dokan """ from ctypes import * try: DokanMain = windll.Dokan1.Do...
PyFilesystem/pyfilesystem
fs/expose/dokan/libdokan.py
Python
bsd-3-clause
8,967
# Copyright (c) 2012 LE GOFF Vincent # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, this # list of conditions and ...
v-legoff/pa-poc3
src/service/default/wiki.py
Python
bsd-3-clause
10,806
# Author: Joseph Lisee <jlisee@gmail.com> __doc__ = """ Functions to return common xpkg paths. """ # Python Imports import os def ld_linux_path(root): """ Returns the path to our major ld-so symlink. (Which allows us to change which ld-so we are actively using without patching a bunch of binaries) "...
jlisee/xpkg
python/xpkg/paths.py
Python
bsd-3-clause
381
from .common import Benchmark import numpy as np avx_ufuncs = ['sin', 'cos', 'exp', 'log', 'sqrt', 'absolute', 'reciprocal', 'square', 'rint', 'floor', 'ceil' , 'tr...
WarrenWeckesser/numpy
benchmarks/benchmarks/bench_avx.py
Python
bsd-3-clause
4,701
""" Copyright (c) 2015, 2019 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ import os import json from datetime import datetime, timedelta from copy import deepcopy from textwrap import dedent from flexmock imp...
DBuildService/atomic-reactor
tests/plugins/test_store_metadata.py
Python
bsd-3-clause
28,357
import os import jinja2 as jinja import util DEFAULT_THEME = 'default' def create_env(): path = os.path.abspath('.') loader = jinja.FileSystemLoader(path) env = jinja.Environment(loader=loader) return env def render(theme, item, context=None): feed = item.feed reldir = 'themes/%s' % theme...
FBergeron/FeedNotifier
templates.py
Python
bsd-3-clause
954
from distutils.core import setup import os from teams import get_version # Compile the list of packages available, because distutils doesn't have # an easy way to do this. packages, data_files = [], [] root_dir = os.path.dirname(__file__) if root_dir: os.chdir(root_dir) for dirpath, dirnames, filenames in os.wa...
cwilhelm/django-teams
setup.py
Python
bsd-3-clause
1,758
import pandas as pd from bokeh.layouts import row, column from bokeh.models import Select from bokeh.palettes import Spectral5 from bokeh.plotting import curdoc, figure from bokeh.sampledata.autompg import autompg_clean as df df = df.copy() SIZES = list(range(6, 22, 3)) COLORS = Spectral5 N_SIZES = len(SIZES) N_COLO...
stonebig/bokeh
examples/app/crossfilter/main.py
Python
bsd-3-clause
2,456
# coding=utf-8 __all__ = ['admin']
CSGreater-Developers/HMC-Grader
app/userViews/admin/__init__.py
Python
mit
36
# -*- coding: utf-8 - # # This file is part of tproxy released under the MIT license. # See the NOTICE for more information. try: import ctypes except MemoryError: # selinux execmem denial # https://bugzilla.redhat.com/show_bug.cgi?id=488396 ctypes = None except ImportError: # Python on Solaris c...
benoitc/tproxy
tproxy/util.py
Python
mit
3,968
import asyncio import json import os import shutil from datetime import timedelta from pathlib import Path import aiohttp import arrow from semver import VersionInfo import virtool.errors import virtool.otus.db import virtool.tasks.pg from virtool.api.json import CustomEncoder from virtool.github import create_update...
virtool/virtool
virtool/references/tasks.py
Python
mit
19,832
from django.test import TestCase from xblock.models import Xblock class XblockTest(TestCase): def test_model(self): Xblock.objects.create( name='test', packages='test', description='An xblock for testing', version='1,0', author='Tester', ...
vkaracic/Xblocks-Directory
xblock/tests/test_model.py
Python
mit
550
from __future__ import absolute_import import decimal import json import logging import flask log = logging.getLogger(__name__) def json_handler(obj): """ Handles non-serializable objects """ if isinstance(obj, decimal.Decimal): return float(obj) try: return str(obj) except TypeErro...
nishworks/Flask-starter
flask_app/api/base.py
Python
mit
995
import io import struct from pycoin.encoding import double_sha256 from pycoin.serialize import b2h_rev, bitcoin_streamer from .InvItem import InvItem from .PeerAddress import PeerAddress # definitions of message structures and types # L: 4 byte long integer # Q: 8 byte long integer # S: unicode string encoded using ...
zsulocal/pycoin
pycoin/message/make_parser_and_packer.py
Python
mit
8,636
# Generated by Django 3.2.5 on 2021-11-09 23:30 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('stock', '0067_alter_stockitem_part'), ] operations = [ migrations.AddField( model_name='stockitem', name='serial_int...
inventree/InvenTree
InvenTree/stock/migrations/0068_stockitem_serial_int.py
Python
mit
390
from datapackage_pipelines.wrapper import ingest, spew def get_votes(resource, data, stats): data['session_voters'] = {} stats['num_votes'] = 0 stats['num_vote_mks'] = 0 for vote in resource: voters = data['session_voters'].setdefault(vote['session_id'], set()) for attr in ['mk_ids_pro...
hasadna/knesset-data-pipelines
people/plenum_session_voters.py
Python
mit
2,135
import numpy as np import pandas as pd import networkx as nx from indra.statements import * from indra.assemblers.indranet.net import default_sign_dict from indra.assemblers.indranet import IndraNetAssembler, IndraNet ev1 = Evidence(pmid='1') ev2 = Evidence(pmid='2') ev3 = Evidence(pmid='3') st1 = Activation(Agent('a...
sorgerlab/belpy
indra/tests/test_indranet_assembler.py
Python
mit
13,200
import asyncio import colorsys import enum import functools import psmove import time import traceback import random SETTINGSFILE = 'joustsettings.yaml' #Human speeds[slow, mid, fast] #SLOW_WARNING = [0.1, 0.15, 0.28] #SLOW_MAX = [0.25, 0.8, 1] #FAST_WARNING = [0.5, 0.6, 0.8] #FAST_MAX = [1, 1.4, 1.8] SLOW_WARNING =...
aangert/PiParty
common.py
Python
mit
5,854
class Proc: def __init__(self, code): self.code = code def call(self, *args): return eval(self.code, dict(zip(self.code.co_varnames, args))) def proc(func): return Proc(func) def puts(*args): for x in args: print x if not args: print class BasicObject: pass
whymirror/unholy
python/Kernel.py
Python
mit
281
""" Copyright EMC Corporation 2015. Distributed under the MIT License. (See accompanying file LICENSE or copy at http://opensource.org/licenses/MIT) """ """ Class to store parsed WADL and XSD data. """ class CLIInputs: wadl_context = dict() xsd_elements_dict = dict() unknown_xsd_elements_dict = dict() ...
santidltp/viprcommand
ViPRCommand/bin/CLIInputs.py
Python
mit
1,681
# $Id: cursor.py,v 1.4 2007/06/10 14:11:59 mggrant Exp $ # # Xlib.xobject.cursor -- cursor object # # Copyright (C) 2000 Peter Liljenberg <petli@ctrl-c.liu.se> # # 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 # th...
nvazquez/Turtlebots
plugins/xevents/Xlib/xobject/cursor.py
Python
mit
1,854
""" file: config.py (syns) author: Jess Robertson description: Config file for running Flask app, lifted and lightly modified from Miguel's 'Flask Web Development' book. """ import os BASEDIR = os.path.abspath(os.path.dirname(__file__)) class Config: """ Base configuration class """ ...
drzax/databot
app/config.py
Python
mit
1,253
""" SoftLayer.testing.xmlrpc ~~~~~~~~~~~~~~~~~~~~~~~~ XMP-RPC server which can use a transport to proxy requests for testing. :license: MIT, see LICENSE for more details. """ import http.server import logging import threading import xmlrpc.client import SoftLayer from SoftLayer import transports from ...
allmightyspiff/softlayer-python
SoftLayer/testing/xmlrpc.py
Python
mit
4,126
""" .. module:: pipeline :platform: Unix, OSX :synopsis: A wrapper module for executing commands and logging their output. .. moduleauthor:: Daniel Gaston <daniel.gaston@dal.ca> """ import sys import subprocess as sub def run_and_log_command(command, logfile): """This function uses the python subprocess...
dgaston/ddbio-ngsflow
ddb_ngsflow/pipeline.py
Python
mit
1,788
"""A Python module for interacting and consuming responses from Slack.""" import logging import slack.errors as e from slack.web.internal_utils import _next_cursor_is_present class AsyncSlackResponse: """An iterable container of response data. Attributes: data (dict): The json-encoded content of th...
slackhq/python-slackclient
slack/web/async_slack_response.py
Python
mit
6,347
import logging from pathlib import Path import time from dstools.pipeline.tasks import PythonCallable from dstools.pipeline.products import File from dstools.pipeline import DAG logging.basicConfig(level=logging.INFO) def wait(product): time.sleep(1) Path(str(product)).touch() def wait2(product, upstream...
edublancas/python-ds-tools
profiling/pipeline.py
Python
mit
833
# -*- coding: utf-8 -*- # $Id$ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated for each language...
Lyleo/OmniMarkupPreviewer
OmniMarkupLib/Renderers/libs/python2/docutils/parsers/rst/languages/zh_tw.py
Python
mit
5,129
# Import the helper gateway class from AfricasTalkingGateway import AfricasTalkingGateway, AfricasTalkingGatewayException from twitment.search import ClassTwitter # Specify your login credentials class SMS(object): def __init__(self): pass def send(self,num): sendtweet_obj = ClassTwitter() ...
crakama/bc_7_twitment
twitment/sendSMS.py
Python
mit
1,600
#!/usr/bin/env python # Copyright (c) 2012, 2013 Paul Tagliamonte <paultag@debian.org> # # 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 # th...
kirbyfan64/hy
setup.py
Python
mit
3,580
from urllib.parse import quote from loguru import logger from requests.exceptions import RequestException from flexget import plugin from flexget.config_schema import one_or_more from flexget.event import event from flexget.utils import json from flexget.utils.template import RenderError logger = logger.bind(name='p...
Flexget/Flexget
flexget/plugins/clients/pyload.py
Python
mit
9,436
from __future__ import unicode_literals from datetime import date, time, datetime import django from django.core.exceptions import ValidationError, ObjectDoesNotExist from django.db.models import Q from django.contrib.contenttypes.models import ContentType from django.test import TestCase, Client from django.test.clien...
pombredanne/django-custard
custard/tests/test.py
Python
mit
17,657
from pythonforandroid.recipe import PythonRecipe class SixRecipe(PythonRecipe): version = '1.15.0' url = 'https://pypi.python.org/packages/source/s/six/six-{version}.tar.gz' depends = ['setuptools'] recipe = SixRecipe()
PKRoma/python-for-android
pythonforandroid/recipes/six/__init__.py
Python
mit
236
import os from django.conf import settings def configure_settings(): """ Configures settings for manage.py and for run_tests.py. """ if not settings.configured: # Determine the database settings depending on if a test_db var is set in CI mode or not test_db = os.environ.get('DB', None...
minervaproject/django-db-mutex
settings.py
Python
mit
1,916
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 def main(): list_data = demisto.executeCommand("getList", {"listName": "XSOAR Health - Error Entries ID"}) list_content = list_data[0].get('Contents', '').split(",") entries_id_errors_count = len(list_content) ...
VirusTotal/content
Packs/IntegrationsAndIncidentsHealthCheck/Scripts/IncidentsCheck_Widget_NumberofErrors/IncidentsCheck_Widget_NumberofErrors.py
Python
mit
497
from apiwrapper.endpoints.endpoint import Endpoint from apiwrapper.endpoints.user import User class CertificatePinned(Endpoint): __endpoint_user_pinned_certificates = "certificate-pinned" @classmethod def _get_base_endpoint(cls, user_id, certificate_id=None): endpoint = User._get_base_endpoint(u...
OGKevin/ComBunqWebApp
apiwrapper/endpoints/certificate_pinned.py
Python
mit
856
# -*- coding:utf8 -*- # Author: shizhenyu96@gamil.com # github: https://github.com/imndszy from openpyxl import Workbook from openpyxl.compat import range import pymysql import time while True: try: conn = pymysql.connect(host='localhost',port=3306,user='szy',passwd='123456',db='voluntary',charset='utf8') ...
imndszy/voluntary
excel.py
Python
mit
1,036
""" Use this cache utility to compute the hash of files server as static resources on your website. As written, it must be in your '/' home folder, but you can adjust the computation of *fullname* to allow you to put it in subfolders. Set recompute_caches_every_request based on use case / deployment: recompute_ca...
nitin-cherian/Webapps
TalkPython/P4E/my_web_app/my_web_app/static_cache.py
Python
mit
1,889
import markovmixing as mkm import numpy def tets_distributions(): # not distributions d = numpy.ones((3,3)) assert(mkm.is_distribution(d) == False) d = mkm.delta_distribution(10) d[1] = 1 assert(mkm.is_distribution(d) == False) assert(mkm.is_distribution(mkm.delta_distribution(10),n=11) == False) assert(m...
sbordt/markovmixing
markovmixing/tests/test_distributions.py
Python
mit
612
import signal # Options GAME_TYPE = "gametype" STORY_DIR = "storydir" STORY_FILE = "storyfile" STORY_MODULE = "storymodule" BANNER_FILE = "bannerfile" LOG_FILE = "logfile" # Subcommands KEYGEN = "keygen" SHELL = "shell" STOP = "stop" # Game types LOCAL = "local" SINGLE = "singleplayer" MULTI = "multiplayer" # Huma...
oubiwann/myriad-worlds
myriad/const.py
Python
mit
3,434
"""Deletes an existing load balancer service.""" # :license: MIT, see LICENSE for more details. import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions from SoftLayer.CLI import formatting from SoftLayer.CLI import loadbal import click @click.command() @click.argument('identifier...
briancline/softlayer-python
SoftLayer/CLI/loadbal/service_delete.py
Python
mit
860
#!/usr/bin/env python # -*- coding: utf-8 -*- class IC_Exception(Exception): """ An exception for the IC imaging control software. It contains a message property which is a string indicating what went wrong. error code -3 has multiple possible interpretations, sometimes from the same function! ...
morefigs/py-ic-imaging-control
pyicic/IC_Exception.py
Python
mit
1,565
"""Test HTML5 notify platform.""" import asyncio import json from unittest.mock import patch, MagicMock, mock_open from aiohttp.hdrs import AUTHORIZATION from homeassistant.components.notify import html5 from tests.common import mock_http_component_app SUBSCRIPTION_1 = { 'browser': 'chrome', 'subscription': ...
stefan-jonasson/home-assistant
tests/components/notify/test_html5.py
Python
mit
15,352
from setuptools import setup, find_packages readme_file = 'README.rst' setup( name='datafilters', version='0.3.3', packages=find_packages('.'), package_data = {'': [ 'locale/*/LC_MESSAGES/django.po', 'locale/*/LC_MESSAGES/django.mo', ]}, # Metadata author='Nikolay Zakharov...
freevoid/django-datafilters
setup.py
Python
mit
1,032
# # Copyright (c) 2015 Red Hat # Licensed under The MIT License (MIT) # http://opensource.org/licenses/MIT # from django.test import TestCase from rest_framework.test import APITestCase from rest_framework import status from django.core.urlresolvers import reverse from django.core.exceptions import ValidationError fro...
tzhaoredhat/automation
pdc/apps/package/tests.py
Python
mit
88,111
#### 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/loot/dungeon/corellian_corvette/shared_imperial_rescue_intel.iff" r...
anhstudios/swganh
data/scripts/templates/object/tangible/loot/dungeon/corellian_corvette/shared_imperial_rescue_intel.py
Python
mit
485
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from flask import request from indico.modules.oauth.controllers import (RHOAuthAdmin, RHOAuthAdminApplica...
pferreir/indico
indico/modules/oauth/blueprint.py
Python
mit
2,547
"""blatter""" setup_info = dict( name="bookmarkdown", description="Write books in Markdown.", version="0.0.1", author='Steve Losh', author_email='steve@stevelosh.com', license='MIT License', url='http://bitbucket.org/sjl/bookmarkdown/', packages=['bookmarkdown'], scripts = ['book...
beni55/bookmarkdown
setup.py
Python
mit
1,280
import copy from datatypes import * class Sound(Struct): def __init__(self, filename=""): Struct.__init__(self, "CDataSound") self.id = Int(0) self.filename = String(filename) class SoundSet(Struct): def __init__(self, name="", files=[]): Struct.__init__(self, "CDataSoundset") self.name = String(name) s...
KartoffelToby/docker-teeworlds-instagib-server
files/datasrc/content.py
Python
mit
21,964
from thinc.api import chain, Relu, reduce_max, Softmax, add good_model = chain(Relu(10), Relu(10), Softmax()) reveal_type(good_model) good_model2 = add(Relu(10), Relu(10), Softmax()) reveal_type(good_model2) bad_model_undetected = chain(Relu(10), Relu(10), reduce_max(), Softmax()) reveal_type(bad_model_undetected) ...
spacy-io/thinc
thinc/tests/mypy/modules/success_no_plugin.py
Python
mit
428
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Author: Daniel E. Cook Handles redirecting the user to the API Documentation. """ from base.application import app from flask import send_from_directory @app.route("/data/api/docs/") @app.route("/data/api/docs/<path:path>") def docs(path="index.html"): return sen...
AndersenLab/cegwas-web
base/views/api/api_docs.py
Python
mit
370
""" Constants for descriptor. This file is automaticaly generated by tools/extract_terminology.py """ from enum import Enum as _Enum class Klass(bytes, _Enum): """ Klass definitions extracted from PITerminology.h. See https://www.adobe.com/devnet/photoshop/sdk.html """ Action = b'Actn' Actio...
kmike/psd-tools
src/psd_tools/terminology.py
Python
mit
52,949
import re from sqlalchemy import Column from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import String from sqlalchemy import Table from sqlalchemy.sql.sqltypes import DateTime from alembic import autogenerate from alembic.migration import MigrationContext from alembic.testing import eq_...
sqlalchemy/alembic
tests/test_autogen_composition.py
Python
mit
16,541
#!/usr/bin/env python # # GrovePi Example for using the Grove Thumb Joystick (http://www.seeedstudio.com/wiki/Grove_-_Thumb_Joystick) # # The GrovePi connects the Raspberry Pi and Grove sensors. You can learn more about GrovePi here: http://www.dexterindustries.com/GrovePi # # Have a question about this example? Ask...
karan259/GrovePi
Software/Python/grove_thumb_joystick.py
Python
mit
3,278
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2016-10-11 09:40 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): dependencies = [ migrations.swappable_dependenc...
DarknessSwitch/django-tutorial
catalog/migrations/0019_bookinstance_borrower.py
Python
cc0-1.0
667
########################################################### # # Copyright (c) 2014, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
Southpaw-TACTIC/TACTIC
src/tactic/ui/widget/gallery_wdg.py
Python
epl-1.0
20,684
#!BPY """ Name: 'MDL (.mdl)' Blender: 244 Group: 'Export' Tooltip: 'Export to Quake file format (.mdl).' """ __author__ = 'Andrew Denner' __version__ = '0.1.3' __url__ = ["Andrew's site, http://www.btinternet.com/~chapterhonour/", "Can also be contacted through http://celephais.net/board", "blender", "elysiun"] ...
atphalix/eviltoys
tools/myscripts/mdl_export.py
Python
gpl-2.0
38,523
# -*- coding: utf-8 -*- from __future__ import with_statement import base64 import datetime import json import os from django import http from django.conf import settings from django.conf.urls import url from django.contrib import admin from django.core import urlresolvers from django.core.cache import cache from djan...
Venturi/cms
env/lib/python2.7/site-packages/cms/tests/test_plugins.py
Python
gpl-2.0
79,253
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
Lekensteyn/buildbot
master/buildbot/www/auth.py
Python
gpl-2.0
6,728
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2013 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 thi...
stbenjam/katello-agent
src/setup.py
Python
gpl-2.0
1,603
# Copyright (c) 2010-2011 Joshua Harlan Lifton. # See LICENSE.txt for details. # TODO: add tests for all machines # TODO: add tests for new status callbacks """Base classes for machine types. Do not use directly.""" import binascii import threading import serial from plover import _, log from plover.machine.keymap...
openstenoproject/plover
plover/machine/base.py
Python
gpl-2.0
8,198
#! /usr/bin/env python # # grid_iaf_irr.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 License, or...
gewaltig/cython-neuron
topology/examples/grid_iaf_irr.py
Python
gpl-2.0
1,646
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2005 All Rights Reserved # # <LicenseText> # # ~~~~~~~~~~~~~~~~...
bmi-forum/bmi-pyre
pythia-0.8/packages/pyre/pyre/units/force.py
Python
gpl-2.0
545
#! /usr/bin/env python ############################################################################### # # simulavr - A simulator for the Atmel AVR family of microcontrollers. # Copyright (C) 2001, 2002 Theodore A. Roth # # This program is free software; you can redistribute it and/or modify # it under the terms of th...
simark/simulavr
regress/test_opcodes/test_RETI.py
Python
gpl-2.0
3,053
# GNU Enterprise Common Library - Base Login Handler # # Copyright 2000-2007 Free Software Foundation # # This file is part of GNU Enterprise. # # GNU Enterprise 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;...
HarmonyEnterpriseSolutions/harmony-platform
src/gnue/common/datasources/GLoginHandler.py
Python
gpl-2.0
9,003
from __future__ import print_function from __future__ import absolute_import from Components.Task import Task, Job, DiskspacePrecondition, Condition, ToolExistsPrecondition from Components.Harddisk import harddiskmanager from Screens.MessageBox import MessageBox from .Project import iso639language import Tools.Notifica...
openatv/enigma2
lib/python/Plugins/Extensions/DVDBurn/Process.py
Python
gpl-2.0
37,027
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
pmisik/buildbot
master/buildbot/test/util/querylog.py
Python
gpl-2.0
3,257
# # Copyright 2000 by Peter McCluskey (pcm@rahul.net). # You may do anything you want with it, provided this notice is kept intact. # # This module is in part a replacement for the MolecularSurface MMTK module # that uses the NSC code. It has a less restrictive license than the NSC code, # and is mostly more flexible,...
fxia22/ASM_xf
PythonD/site_python/MMTK/MolecularSurface.py
Python
gpl-2.0
6,739
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2005 All Rights Reserved # # {LicenseText} # # ~~~~~~~~~~~~~~~~~~~~~~~~...
bmi-forum/bmi-pyre
pythia-0.8/packages/pyre/pyre/inventory/Configurable.py
Python
gpl-2.0
9,858
#!/usr/bin/python2.4 # # Copyright 2007 The Python-Twitter Developers # # 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...
erikdejonge/newsrivr
www_newsrivr_com/twitterpythonapiwrapper.py
Python
gpl-2.0
116,682
import pytest from conftest import is_bash_type @pytest.mark.bashcomp( pre_cmds=("CLASSPATH=$PWD/java/a:$PWD/java/bashcomp.jar",) ) class TestJava: @pytest.fixture(scope="class") def can_list_jar(self, bash): return ( is_bash_type(bash, "zipinfo") or is_bash_type(bash, "un...
algorythmic/bash-completion
test/t/test_java.py
Python
gpl-2.0
1,508
# -*- coding: utf-8 -*- from django.db import migrations class Migration(migrations.Migration): dependencies = [('users', '0002_auto_20150402_1847'), ('users', '0002_auto_20150404_1622')]
tjcsl/ion
intranet/apps/users/migrations/0003_merge.py
Python
gpl-2.0
196
import dns import requests import socket from recursortests import RecursorTest class RootNXTrustRecursorTest(RecursorTest): def getOutgoingQueriesCount(self): headers = {'x-api-key': self._apiKey} url = 'http://127.0.0.1:' + str(self._wsPort) + '/api/v1/servers/localhost/statistics' r = r...
cyclops1982/pdns
regression-tests.recursor-dnssec/test_RootNXTrust.py
Python
gpl-2.0
3,474
from django.db import models from django import forms from django.contrib.auth.models import User from time import time # Create your models here. def getSignaturesPath(instance , filename): return 'images/Sign/%s_%s_%s' % (str(time()).replace('.', '_'), instance.user.username, filename) def getDisplayPicturePath(...
pkyad/libreERP-old
Employee/models.py
Python
gpl-2.0
8,557
# Created By: Virgil Dupras # Created On: 2010-09-09 # Copyright 2015 Hardcoded Software (http://www.hardcoded.net) # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-...
tuxlifan/moneyguru
core/tests/gui/general_ledger_table_test.py
Python
gpl-3.0
4,362
# -*- encoding: utf-8 -*- import math def least_multiple_greater_equal(m, n): r'''Returns the least integer multiple of `m` greater than or equal to `n`. :: >>> mathtools.least_multiple_greater_equal(10, 47) 50 :: >>> for m in range(1, 10): ... print(m, mathtool...
mscuthbert/abjad
abjad/tools/mathtools/least_multiple_greater_equal.py
Python
gpl-3.0
845
import itertools, os import pandas as pd, sys import numpy as np, matplotlib.pylab as plt Q = 1.0 ; T = 1.0 class Game: def __init__(self,df): self.df = df.copy() self.df_orig = self.df.copy() # dictionaries of df variables - used for speedy access self.df_capability = df.Capabili...
burakbayramli/classnotes
algs/algs_105_mesquita/test1.py
Python
gpl-3.0
7,691
import os from shutil import copyfile from setuptools import setup, find_packages import yaml USERHOME = os.environ["HOME"] RESOURCESPATH = './configuration' LIBRESCANPATH = USERHOME + "/LibreScanProjects" LSCONFIGPATH = USERHOME + "/.librescan" def create_folders(): try: os.mkdir(LIBRESCANPATH) exc...
jamescr/LibreScan
src/setup.py
Python
gpl-3.0
1,505
# Copyright 2016 Mycroft AI, Inc. # # This file is part of Mycroft Core. # # Mycroft Core 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 later versio...
jasonehines/mycroft-core
mycroft/skills/container.py
Python
gpl-3.0
3,372
from .load_samples import load_sample_group_dsi, load_sample_group_fmri, load_sample_group_qball import numpy as np import bct def test_nbs_dsi_qbi(): q = load_sample_group_qball() d = load_sample_group_dsi() _nbs_helper(q, d, .5, atol=0.3) def test_nbs_paired_dsi_qbi(): pass def test_nbs_dsi_fmri...
aestrivex/bctpy
test/nbs_test.py
Python
gpl-3.0
779
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010-2013 Código Sur Sociedad Civil. # All rights reserved. # # This file is part of Cyclope. # # Cyclope 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 Foundat...
MauHernandez/cyclope
cyclope/widgets.py
Python
gpl-3.0
7,445
#!/usr/bin/python # -*- coding: utf-8 -*- """ Script de comprobación de entrega de ejercicio Para ejecutarlo, desde la shell: $ python check.py login_github """ import os import random import sys ejercicio = 'X-Serv-14.5-Sumador-Simple' student_files = [ 'servidor-sumador.py' ] repo_files = [ 'check...
begea/X-Serv-14.5-Sumador-Simple
check.py
Python
gpl-3.0
1,680
# -*- coding: utf-8 -*- # # Copyright © 2009-2010 Pierre Raybaut # Licensed under the terms of the MIT License # (see spyderlib/__init__.py for details) """Internal shell widget : PythonShellWidget + Interpreter""" # pylint: disable=C0103 # pylint: disable=R0903 # pylint: disable=R0911 # pylint: disable=R0201 #FIXME...
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/spyderlib/widgets/internalshell.py
Python
gpl-3.0
16,008
#!/usr/bin/python # -*- coding: utf-8 -*- """ ================================================================================ mingus - Music theory Python package, general purpose sequencer Copyright (C) 2008-2009, Bart Spaans This program is free software: you can redistribute it and/or modify ...
artdent/mingus-python3
mingus/midi/Sequencer.py
Python
gpl-3.0
14,289
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
belokop/indico_bare
indico/modules/rb/models/aspects_test.py
Python
gpl-3.0
1,299
from .base_sgd_learner import BaseSGDLearner
hajicj/safire
safire/learning/learners/__init__.py
Python
gpl-3.0
50
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Tests various schema replication scenarios # # Copyright (C) Kamen Mazdrashki <kamenim@samba.org> 2011 # Copyright (C) Andrew Bartlett <abartlet@samba.org> 2016 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Gen...
kernevil/samba
source4/torture/drs/python/getnc_exop.py
Python
gpl-3.0
50,933
# # Kommandos fuer ftduino.comm : # # void led_set <0|1> # # string ftduino_direct_get_version # char[16] ftduino_id_set <string maxlen=16> # char[16] ftduino_id_get # # # void input_set_mode <I1..I8> <switch|resistance|voltage> # uint16_t input_get <I1..I8> # # void output_set <O1..O8> <...
ski7777/ftcommunity-TXT
board/fischertechnik/TXT/rootfs/opt/ftc/ftduino_direct.py
Python
gpl-3.0
4,063
# This file is part of beets. # # 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, merge, publish, # distribu...
rembo10/headphones
lib/beetsplug/export.py
Python
gpl-3.0
7,737
# Copyright Aaron Smith 2009 # # This file is part of Gity. # # Gity 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 later version. # # Gity is dis...
gngrwzrd/gity
python/add.py
Python
gpl-3.0
1,341
# This file is part of Indico. # Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN). # # Indico 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 (a...
nop33/indico
indico/modules/events/features/controllers.py
Python
gpl-3.0
4,902
from __future__ import with_statement from contextlib import closing import simplejson as json import urllib2 from urllib import urlencode import os import re import tempfile import time from _multipartformdataencode import encode_multipart_formdata missing = object() class TypeChecker(object): def __init__(s...
yaelelmatad/EtsyApiTest
etsy/_core.py
Python
gpl-3.0
10,263