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
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 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 # ...
vlegoff/tsunami
src/primaires/scripting/fonctions/remplacer.py
Python
bsd-3-clause
2,818
""" Creates a directory structure parallel to that of the mock. Within this structure, generates the following files: zcat_sweep* : these have the same format as the original mock files, but only contain rows for targets that were observed on at least one epoch. row_obseved_{epoch} : These have the same number of ro...
apcooper/bright_analysis
py/bright_analysis/sweeps/build.py
Python
bsd-3-clause
17,944
# Copyright 2015 Google 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 required by applicable law or ag...
flgiordano/netcash
+/google-cloud-sdk/lib/surface/bigtable/clusters/list.py
Python
bsd-3-clause
2,370
# Copyright 2014 hm authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. import pymongo from hm import config from hm.model import host, load_balancer class MongoDBStorage(object): hosts_collection = "hosts" lb_collection = "load...
tsuru/hm
hm/storage.py
Python
bsd-3-clause
2,498
# # Histogram.py -- Histogram plugin for Ginga fits viewer # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import gtk from ginga.misc.plugins import HistogramBase fr...
Rbeaty88/ginga
ginga/gtkw/plugins/Histogram.py
Python
bsd-3-clause
3,604
# -*- coding: utf-8 -*- # # django-dbbackup documentation build configuration file, created by # sphinx-quickstart on Sun May 18 13:35:53 2014. # # 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....
benjaoming/django-dbbackup
docs/conf.py
Python
bsd-3-clause
8,266
import collections import os try: from urllib.request import urlopen # attemp py3 first except ImportError: from urllib2 import urlopen # fallback to py2 """ General utilities used within saucebrush that may be useful elsewhere. """ def get_django_model(dj_settings, app_label, model_name): "...
sunlightlabs/saucebrush
saucebrush/utils.py
Python
bsd-3-clause
4,880
import os from ..java import ( Class as JavaClass, Field as JavaField, Method as JavaMethod, opcodes as JavaOpcodes, SourceFile, RuntimeVisibleAnnotations, Annotation, ConstantElementValue, ) from .blocks import Block, IgnoreBlock from .methods import InitMethod, InstanceMethod, extrac...
rubacalypse/voc
voc/python/klass.py
Python
bsd-3-clause
7,831
import warnings from django.contrib.localflavor.id.forms import (IDPhoneNumberField, IDPostCodeField, IDNationalIdentityNumberField, IDLicensePlateField, IDProvinceSelect, IDLicensePlatePrefixSelect) from django.test import SimpleTestCase class IDLocalFlavorTests(SimpleTestCase): def setUp(self): ...
mixman/djangodev
tests/regressiontests/localflavor/id/tests.py
Python
bsd-3-clause
7,203
#!/usr/bin/env python # # Copyright (C) 2011 Ryan Galloway (ryan@rsgalloway.com) # # This module is part of Box and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php import os import sys import shutil from datetime import datetime from box.log import log from box.exc import * #...
pombredanne/box
box/cmd/cli.py
Python
bsd-3-clause
2,946
from TASSELpy.java.util.FilterList import FilterList from TASSELpy.java.lang.Integer import metaInteger from TASSELpy.java.lang.Byte import Byte from TASSELpy.net.maizegenetics.dna.map.Position import Position from TASSELpy.net.maizegenetics.dna.map.Chromosome import Chromosome from TASSELpy.utils.Overloading import ja...
er432/TASSELpy
TASSELpy/net/maizegenetics/dna/map/PositionList.py
Python
bsd-3-clause
13,960
#!/usr/bin/env python # -*- coding: utf-8 -*- class JagareError(Exception): def __init__(self, value): self.value = value def __str__(self): return repr(self.value)
douban/ellen
ellen/utils/__init__.py
Python
bsd-3-clause
194
import pandas as pd import shapely.wkb from geopandas import GeoDataFrame def read_postgis(sql, con, geom_col='geom', crs=None, hex_encoded=True, index_col=None, coerce_float=True, params=None): """ Returns a GeoDataFrame corresponding to the result of the query string, which must contai...
ozak/geopandas
geopandas/io/sql.py
Python
bsd-3-clause
2,230
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 128 , FREQ = 'D', seed = 0, trendtype = "ConstantTrend", cycle_length = 5, transform = "Logit", sigma = 0.0, exog_count = 0, ar_order = 12);
antoinecarme/pyaf
tests/artificial/transf_Logit/trend_ConstantTrend/cycle_5/ar_12/test_artificial_128_Logit_ConstantTrend_5_12_0.py
Python
bsd-3-clause
264
""" Utilities to evaluate pairwise distances or affinity of sets of samples. This module contains both distance metrics and kernels. A brief summary is given on the two here. Distance metrics are a function d(a, b) such that d(a, b) < d(a, c) if objects a and b are considered "more similar" to objects a and c. Two ob...
ominux/scikit-learn
sklearn/metrics/pairwise.py
Python
bsd-3-clause
20,713
#!/usr/bin/env python """Setup script.""" # Licensed under a 3-clause BSD style license - see LICENSE.rst import glob import os import sys import ah_bootstrap # NOQA from setuptools import setup # A dirty hack to get around some early import/configurations ambiguities if sys.version_info[0] >= 3: import builtin...
matteobachetti/MaLTPyNT
setup.py
Python
bsd-3-clause
4,271
# ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # --------------------------------------------...
kdmurray91/scikit-bio
skbio/diversity/_driver.py
Python
bsd-3-clause
14,954
# engine/base.py # Copyright (C) 2005, 2006, 2007, 2008 Michael Bayer mike_mp@zzzcomputing.com # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Basic components for SQL execution and interfacing with DB-API. Defines the basic compone...
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/SQLAlchemy-0.4.5-py2.5.egg/sqlalchemy/engine/base.py
Python
bsd-3-clause
65,569
#!/usr/bin/python2 # # Copyright 2019 The ANGLE Project Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # # trigger.py: # Helper script for triggering GPU tests on swarming. import argparse import os import subprocess import sys de...
youtube/cobalt
third_party/angle/scripts/trigger.py
Python
bsd-3-clause
2,333
# -*- coding: utf-8 -*- """Needless variants. --- layout: post source: Garner's Modern American Usage source_url: http://bit.ly/1T4alrY title: needless variants date: 2014-06-10 12:31:19 categories: writing --- Points out use of needless variants. """ from proselint.tools import memoize, preferred...
jstewmon/proselint
proselint/checks/garner/needless_variants.py
Python
bsd-3-clause
17,584
# Python TS3 Library (python-ts3) # # Copyright (c) 2011, Andrew Williams # 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 # ...
nikdoof/python-ts3
ts3/protocol.py
Python
bsd-3-clause
7,814
# # signal - Signal Processing Tools # from info import __doc__ import sigtools from waveforms import * from bsplines import * from filter_design import * from fir_filter_design import * from ltisys import * from windows import * from signaltools import * from spectral import * from wavelets import * from cwt import ...
lesserwhirls/scipy-cwt
scipy/signal/__init__.py
Python
bsd-3-clause
432
import csv import os import xml.etree.cElementTree as ET from xml.dom import minidom FIELDS = ["mediaType", "name", "description", "downloadUrl", "userId", "tags", "categories", "startDate", "endDate" ] def create_item(name, description, downloadUrl, userId, tags, categories, startDate, endDate, mediaType): # Ord...
NORDUnet/kaltura-bulk
kaltura-bulk.py
Python
bsd-3-clause
5,357
import calendar from datetime import ( date, datetime, time, ) import locale import unicodedata import numpy as np import pytest import pytz from pandas._libs.tslibs.timezones import maybe_get_tz from pandas.core.dtypes.common import ( is_integer_dtype, is_list_like, ) import pandas as pd from p...
datapythonista/pandas
pandas/tests/series/accessors/test_dt_accessor.py
Python
bsd-3-clause
26,490
import webview from .util import run_test def test_url_load(): window = webview.create_window('URL change test', 'https://www.example.org') run_test(webview, window, url_load) def url_load(window): window.load_url('https://pywebview.flowrl.com')
r0x0r/pywebview
tests/test_url_load.py
Python
bsd-3-clause
265
from __future__ import print_function import matplotlib import matplotlib.pyplot as plt import numpy as np import compressible import compressible.eos as eos import util.plot_tools as plot_tools class Simulation(compressible.Simulation): def initialize(self): """ For the reacting compressible ...
zingale/pyro2
compressible_react/simulation.py
Python
bsd-3-clause
3,310
""" Feature Previews are built on top of toggle, so if you migrate a toggle to a feature preview, you shouldn't need to migrate the data, as long as the slug is kept intact. """ from django.utils.translation import ugettext_lazy as _ from django_prbac.exceptions import PermissionDenied from django_prbac.utils import en...
SEL-Columbia/commcare-hq
corehq/feature_previews.py
Python
bsd-3-clause
4,274
#!/usr/bin/env python # Copyright (c) 2013 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Tool that checks the LICENSE field of all packages. Currently it preforms the following simple check: - LICENSE field exis...
kuscsik/naclports
build_tools/check_licenses.py
Python
bsd-3-clause
2,037
from django.core.management.base import BaseCommand from education.models import EnrolledDeployedQuestionsAnswered, create_record_enrolled_deployed_questions_answered class Command(BaseCommand): def handle(self, *args, **options): # currently this manage command works on just that one model # TODO...
unicefuganda/edtrac
edtrac_project/rapidsms_edtrac/education/management/commands/enrolled_question_answered.py
Python
bsd-3-clause
484
from setuptools import setup, find_packages setup( name='openchemistry-images', version='0.0.1', description='Keep track of images used in OpenChemistry.', packages=find_packages(), install_requires=[ 'girder>=3.0.0a5' ], entry_points={ 'girder.plugin': [ 'images = ima...
OpenChemistry/mongochemserver
girder/images/setup.py
Python
bsd-3-clause
354
# -*- coding: utf-8 -*- import pytest from datetime import datetime, timedelta from collections import defaultdict import pandas.util.testing as tm from pandas.core.dtypes.common import is_unsigned_integer_dtype from pandas.core.indexes.api import Index, MultiIndex from pandas.tests.indexes.common import Base from...
winklerand/pandas
pandas/tests/indexes/test_base.py
Python
bsd-3-clause
86,143
# Licensed under a 3-clause BSD style license - see LICENSE.rst import logging from .utils import load_yaml, write_yaml from gammapy.catalog.gammacat import GammaCatResource __all__ = [ 'SrcInfo', ] log = logging.getLogger(__name__) class SrcInfo: """Process a basic source info file""" resource_type = '...
gammapy/gamma-cat
gammacat/src_info.py
Python
bsd-3-clause
1,193
from django.conf.urls import url from siteprofile.views import list_modules urlpatterns = [ url( r'^$|^(.*)/$', list_modules, name='siteprofiles-modules-list') ]
fiee/fiee-dorsale
siteprofile/urls.py
Python
bsd-3-clause
191
from unittest import TestCase from flask.ext.webtest import TestApp from ug import app class ViewsTestCase(TestCase): def setUp(self): self.app = app self.w = TestApp(self.app) def test_home(self): r = self.w.get('/') self.assertEquals(r.status_code, 200)
python-glasgow/pythonglasgow
tests/test_views.py
Python
bsd-3-clause
302
import os, sys from pprint import pformat from colourize import colourize, RED, BLACK, YELLOW from properties import parse_properties from ear import Ear, WebModule ### begin logging stuff import logging logging.basicConfig(format="%(message)s") log = logging.getLogger(__name__) def debug(s): log.debug(colouriz...
MnM/tomcat-ear
lib/cli.py
Python
bsd-3-clause
4,286
# -*- coding: utf-8 -*- __title__ = 'phylotoast' __version__ = '1.4.0rc2' __author__ = 'Shareef M Dabdoub' __license__ = 'MIT' __copyright__ = 'Copyright 2014 Shareef M Dabdoub'
smdabdoub/phylotoast
phylotoast/__init__.py
Python
mit
179
# -*- coding: utf-8 -*- from selenium import webdriver from selenium.webdriver.firefox.firefox_binary import FirefoxBinary from selenium.webdriver.firefox.firefox_profile import FirefoxProfile from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.common.exceptions import WebDrive...
kaige201314/knitter-master-qbb
knitter/executer.py
Python
mit
9,412
#### 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/wearables/backpack/shared_backpack_s05.iff" result.attribute_templa...
anhstudios/swganh
data/scripts/templates/object/tangible/wearables/backpack/shared_backpack_s05.py
Python
mit
462
#!/usr/bin/env python3 #Author: Stefan Toman if __name__ == '__main__': n = int(input()) student_marks = {} for _ in range(n): name, *line = input().split() scores = list(map(float, line)) student_marks[name] = scores query_name = input() #begin custom code print('{0:.2...
stoman/CompetitiveProgramming
problems/pythonfindingthepercentage/submissions/accepted/stefan.py
Python
mit
395
# coding: utf-8 """ RefundApi.py Copyright 2015 SmartBear Software 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...
auxodev/tpaga-python
tpaga/apis/refund_api.py
Python
mit
4,403
""" Pythonic wrapper for libusb-1.0. The first thing you must do is to get an "USB context". To do so, create an USBContext instance. Then, you can use it to browse available USB devices and open the one you want to talk to. At this point, you should have a USBDeviceHandle instance (as returned by USBContext or USBDev...
db9052/rtc
python/usb1.py
Python
mit
77,794
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Feature_Type' db.create_table('hippo_feature_type', ( ('id', self.gf('django.db....
UndeadBlow/giraffe
src/hippo/migrations/0001_initial.py
Python
mit
4,697
#!/usr/bin/env python #encoding: utf-8 # Copyright (C) Alibaba Cloud Computing # All rights reserved. from logresponse import LogResponse from histogram import Histogram class GetHistogramsResponse(LogResponse): """ The response of the GetHistograms API from log. :type resp: dict :param res...
amorwilliams/gsoops
server/libs/aliyun-sls-sdk-python-0.6.0/build/lib.linux-x86_64-2.7/aliyun/log/gethistogramsresponse.py
Python
mit
1,890
############################################################################### # # Test cases for xlsxwriter.lua. # # Copyright (c), 2014, John McNamara, jmcnamara@cpan.org # import base_test_class class TestCompareXLSXFiles(base_test_class.XLSXBaseTest): """ Test a file created with xlsxwriter.lua against a...
LuaDist2/xlsxwriter
test/comparison/test_optimize.py
Python
mit
567
#### 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 = Weapon() result.template = "object/weapon/melee/sword/shared_sword_lightsaber_vader.iff" result.attribute_templat...
anhstudios/swganh
data/scripts/templates/object/weapon/melee/sword/shared_sword_lightsaber_vader.py
Python
mit
468
from mako.template import Template import unittest, os from mako.util import function_named, py3k import re from nose import SkipTest template_base = os.path.join(os.path.dirname(__file__), 'templates') module_base = os.path.join(template_base, 'modules') class TemplateTest(unittest.TestCase): def _file_templ...
youngrok/mako
test/__init__.py
Python
mit
3,087
# coding=utf8 import sublime import json import re from ..utils import max_calls, Debug from ..utils.fileutils import fn2k # --------------------------------------- ERRORS -------------------------------------- # class Errors(object): def __init__(self, project): self.project = project self.las...
Phaiax/ArcticTypescript
lib/system/Errors.py
Python
mit
6,560
# Copyright (C) 2011 Lukas Lalinsky # Distributed under the MIT license, see the LICENSE file for details. # Simple WSGI module intended to be used by uWSGI, e.g.: # uwsgi -w acoustid.wsgi --pythonpath ~/acoustid/ --env COVERART_REDIRECT_CONFIG=~/acoustid/acoustid.conf --http :9090 # uwsgi -w acoustid.wsgi --pythonpat...
mwiencek/coverart_redirect
coverart_redirect/wsgi.py
Python
mit
558
#### 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 = Building() result.template = "object/building/tatooine/shared_filler_building_tatt_style01_07.iff" result.attribu...
anhstudios/swganh
data/scripts/templates/object/building/tatooine/shared_filler_building_tatt_style01_07.py
Python
mit
489
# -*- encoding: utf-8 -*- ############################################################################## # # Acrisel LTD # Copyright (C) 2008- Acrisel (acrisel.com) . All Rights Reserved # # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public...
Acrisel/acris
acris/acris/idioms/virtual_resource_pool_db.py
Python
mit
36,868
import unittest from mock import patch from securionpay import subscriptions @patch('securionpay.resource.Resource.request') class TestSubscriptions(unittest.TestCase): def test_create(self, request): subscriptions.create("cusId", {'some_param': 'some_value'}) request.assert_called_once_with('POST...
securionpay/securionpay-python
tests/unit/test_subscriptions.py
Python
mit
1,636
class Allergies: _allergies = [ "eggs", "peanuts", "shellfish", "strawberries", "tomatoes", "chocolate", "pollen", "cats" ] def __init__(self, score): self.score = score def allergic_to(self, allergy): return bool(self.sc...
behrtam/xpython
exercises/allergies/example.py
Python
mit
498
""" Contains utility functions to work with tokens and decorators to work with XML, lists and generators. """ import collections import functools import re from collections import OrderedDict import PyPDF2 import langdetect import langcodes from condor.normalize import PunctuationRemover, CompleteNormalizer from con...
odarbelaeze/condor-ir
condor/util.py
Python
mit
3,877
import os import sys # Add module to the path base = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, (os.path.join(base, '..')))
herberthudson/tesouro-direto
tests/conftest.py
Python
mit
145
# -*- coding: utf-8 -*- # main.py import webapp2 from authomatic import Authomatic from authomatic.adapters import Webapp2Adapter from config import CONFIG # Instantiate Authomatic. authomatic = Authomatic(config=CONFIG, secret='some random secret string') # Create a simple request handler for the login procedure. ...
jasco/authomatic
examples/gae/simple/main.py
Python
mit
6,964
from pythonforandroid.recipe import CythonRecipe, IncludedFilesBehaviour from pythonforandroid.util import current_directory from pythonforandroid.patching import will_build from pythonforandroid import logger from os.path import join class AndroidRecipe(IncludedFilesBehaviour, CythonRecipe): # name = 'android' ...
wexi/python-for-android
pythonforandroid/recipes/android/__init__.py
Python
mit
2,792
"""example_project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/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='home') ...
adamcharnock/swiftwind
swiftwind/urls.py
Python
mit
2,973
# -*- coding: utf-8 -*- doctests = """ Tests for the tokenize module. The tests can be really simple. Given a small fragment of source code, print out a table with tokens. The ENDMARK is omitted for brevity. >>> dump_tokens("1 + 1") ENCODING 'utf-8' (0, 0) (0, 0) NUMBER '1' (1, 0) (...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.0/Lib/test/test_tokenize.py
Python
mit
31,759
""" Python test discovery, setup and run of test functions. """ import enum import fnmatch import inspect import os import sys import warnings from collections import Counter from collections.abc import Sequence from functools import partial from textwrap import dedent import py import _pytest from _pytest import fix...
tomviner/pytest
src/_pytest/python.py
Python
mit
53,460
#### 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/mission/quest_item/shared_oxil_sarban_q1_needed.iff" result.attribu...
anhstudios/swganh
data/scripts/templates/object/tangible/mission/quest_item/shared_oxil_sarban_q1_needed.py
Python
mit
477
# -*- coding: utf-8 -*- from irc3.plugins.cron import cron @cron('30 8 * * *') def wakeup(bot): bot.privmsg('#irc3', "It's time to wake up!") @cron('0 */2 * * *') def take_a_break(bot): bot.privmsg('#irc3', "It's time to take a break!")
gawel/irc3
examples/mycrons.py
Python
mit
249
import os.path from pythoscope.astbuilder import EmptyCode from pythoscope.execution import Execution from pythoscope.store import Project from helper import MemoryCodeTreesManager class TestingProject(Project): """Project subclass useful during testing. It contains handy creation methods, which can all be...
adamhaapala/pythoscope
test/testing_project.py
Python
mit
1,625
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
v-iam/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_06_01/models/route_filter.py
Python
mit
2,745
# Log level VERBOSE = 5 ## Protocol related constants # State SERVER_CALL_DISCONNECTED = 'Server_Call_Disconnected' SERVER_CONNECT_REQUEST_PENDING = 'Server_Connect_Request_Pending' SERVER_CALL_CONNECTED_PENDING = 'Server_Call_Connected_Pending' SERVER_CALL_CONNECTED = 'Server_Call_Connected' CALL_DISCONNECT_IN_PROGR...
yutaoo12300/sstp-server
sstpd/constants.py
Python
mit
2,359
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('Scouting2011', '0001_initial'), ] operations = [ migrations.RenameModel( old_name='Compitition', new...
ArcticWarriors/scouting-app
ScoutingWebsite/Scouting2011/migrations/0002_auto_20170121_0010.py
Python
mit
358
import os from pathlib import Path import pytest def get_dir_path_of_script(): return Path(os.path.dirname(os.path.abspath(__file__))) @pytest.fixture def three_webpages_uri(): return str( get_dir_path_of_script().joinpath("three_webpages/1.html").resolve().as_uri() ) @pytest.fixture def thre...
J-CPelletier/WebComicToCBZ
webcomix/tests/fake_websites/fixture.py
Python
mit
1,027
#!/bin/python3 import time import subprocess # BROWSER = "google-chrome-unstable" def getContent(content): startPos = content.find("<!-- anchor -->") + len("<!-- anchor -->") + 1 return content[startPos:-1] def genReport(): # use ''' may cause invalid format base_content = "---\n" + \ "lay...
weehowe-z/kc3c
webpage/genPDF.py
Python
mit
3,766
import os from os import environ as env from celery.utils.log import get_task_logger logger = get_task_logger(__name__) import logging from voxel_globe.common_tasks import shared_task, VipTask @shared_task(base=VipTask, bind=True) def create_site(self, sattel_site_id): import voxel_globe.meta.models as models fr...
ngageoint/voxel-globe
voxel_globe/create_site/tasks.py
Python
mit
5,483
# This file is part of the Python aiocoap library project. # # Copyright (c) 2012-2014 Maciej Wasilak <http://sixpinetrees.blogspot.com/>, # 2013-2014 Christian Amsüss <c.amsuess@energyharvesting.at> # # aiocoap is free software, this file is published under the MIT license as # described in the accompany...
smartuni/Environ.me
Webserver/development/testEnvironment/aiocoap-master/aiocoap/util/asyncio.py
Python
mit
679
"""Some small helpers for dealing with xml.""" from functools import wraps from typing import Union, IO from xml.etree import cElementTree as ElementTree class AmbiguousElementException(Exception): pass def valid_path(function=None, rettype=dict): def actual_decorator(f): @wraps(f) def wrapp...
jfear/sra2mongo
sramongo/xml_helpers.py
Python
mit
3,055
from ..base import ShopifyResource import base64 import re class Image(ShopifyResource): _prefix_source = "/admin/products/$product_id/" def __getattr__(self, name): if name in ["pico", "icon", "thumb", "small", "compact", "medium", "large", "grande", "original"]: return re.sub(r"/(.*)\.(...
varesa/shopify_python_api
shopify/resources/image.py
Python
mit
619
# -*- coding: utf-8 -*- import logging import ckan.lib.base as base import ckanext.geoview.utils as utils log = logging.getLogger(__name__) class ServiceProxyController(base.BaseController): def proxy_service(self, resource_id): data_dict = {"resource_id": resource_id} context = { ...
kalxas/ckanext-geoview
ckanext/geoview/controllers/service_proxy.py
Python
mit
746
########################################################### # # Copyright (c) 2009, 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...
diegocortassa/TACTIC
src/tactic/ui/tools/dependency_wdg.py
Python
epl-1.0
4,668
""" This module defines all the standard Image drivers within PyFlag """ import pyflag.IO as IO import pyflag.DB as DB from FlagFramework import query_type import pyflag.FlagFramework as FlagFramework import sk,re,os,os.path,posixpath import pyflag.conf config=pyflag.conf.ConfObject() import bisect filename_re = re.c...
arkem/pyflag
src/plugins/Images.py
Python
gpl-2.0
12,180
# -*- coding: utf-8 -*- """ *************************************************************************** Dissolve.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ******************************...
carolinux/QGIS
python/plugins/processing/algs/qgis/Dissolve.py
Python
gpl-2.0
6,046
# -*- coding: utf-8 -*- # # GXP documentation build configuration file, created by # sphinx-quickstart on Mon Jul 20 20:19:58 2009. # # 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 con...
bmmpxf/suite
geoeditor/externals/gxp/src/doc/conf.py
Python
gpl-2.0
6,299
""" Functions for environment preparition and cleanup. """ import behave def host_subscribed_prepare(context): context.execute_steps(u""" When "{hosts}" host is auto-subscribed to "{server}" Then subscription status is ok on "{hosts}" And "1" entitlement is consumed on "{hosts}" ...
jlebon/UATFramework
env_setup.py
Python
gpl-2.0
1,786
#python import k3d import testing document = k3d.new_document() source = k3d.plugin.create("PolyTorus", document) triangles = k3d.plugin.create("TriangulateFaces", document) triangles.mesh_selection = k3d.select_all() k3d.property.connect(document, source.get_property("output_mesh"), triangles.get_property("input_m...
barche/k3d
tests/mesh/mesh.modifier.PGPRemesh.triang.py
Python
gpl-2.0
957
#!/usr/bin/env python # Filename: func_key.py def func(a,b=5,c=10): print 'a is',a,'and b is',b,'and c is',c func(3,7) func(25,c=24) func(c=50,a=100)
weepingdog/byteofpython
src/func_key.py
Python
gpl-2.0
154
import logging import re import os import signal from avocado.utils import path from avocado.utils import process from avocado.utils import linux_modules from .versionable_class import VersionableClass, Manager, factory from . import utils_misc # Register to class manager. man = Manager(__name__) class ServiceMan...
CongLi/avocado-vt
virttest/openvswitch.py
Python
gpl-2.0
16,829
# -*- coding: utf-8 -*- """ *************************************************************************** ModelerDialog.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *************************...
geopython/QGIS
python/plugins/processing/modeler/ModelerDialog.py
Python
gpl-2.0
36,772
from __future__ import print_function import pylab as p import numpy as np import mahotas f = np.ones((256,256), bool) f[200:,240:] = False f[128:144,32:48] = False # f is basically True with the exception of two islands: one in the lower-right # corner, another, middle-left dmap = mahotas.distance(f) p.imshow(dmap)...
fabianvaccaro/pygums
pythonLibs/mahotas-1.1.0/mahotas/demos/distance.py
Python
gpl-2.0
330
# -*- coding: utf-8 -*- ## ## This file is part of INSPIRE. ## Copyright (C) 2015 CERN. ## ## INSPIRE 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) a...
ioannistsanaktsidis/inspire-next
inspire/modules/authors/recordext/functions/sum_emails.py
Python
gpl-2.0
1,641
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
nsnam/ns-3-dev-git
src/aodv/bindings/modulegen__gcc_LP64.py
Python
gpl-2.0
598,926
""" use C++ class in Python code (c++ module + py shadow class) this script runs the same tests as the main.cxx C++ file """ from number import Number # imports .py C++ shadow class module num = Number(1) # make a C++ class object in Python num.add(4) # call it...
simontakite/sysadmin
pythonscripts/programmingpython/Integrate/Extend/Swig/Shadow/main.py
Python
gpl-2.0
957
import serial ser = serial.Serial('COM5', 1000000, timeout=1) # ser.port = port # ser.baudrate = baudrate # ser.parity = options.parity # ser.rtscts = options.rtscts # ser.xonxoff = options.xonxoff # ser.timeout = 1 # required so that the reader thread can exit print ser.name data...
BYU-MarsRover/Basestation
ArmPuppet/dynaTester.py
Python
gpl-2.0
842
from django import template from django.conf import settings from doorstep.sales.models import Cart register = template.Library() @register.inclusion_tag('sales/cart_basket.html', takes_context=True) def cart_basket(context): """ Returns cart summary """ request = context['request'] default_cur...
mysteryjeans/doorsale-demo
doorstep/sales/templatetags/cart.py
Python
gpl-2.0
594
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2003-2009 Zuza Software Foundation # # This file is part of the Translate Toolkit. # # 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; e...
claudep/translate
translate/tools/pocount.py
Python
gpl-2.0
12,923
__author__ = 'Shane' # decodes message from asciiencode.py def decode(original): output = "" char_list = original.split() length = len(char_list) for i in range(length): output += chr(int(char_list[i])) return output def main(): a = input("Enter message to be decoded: ") # a = "7...
eldho5505/OOP
ascii-decoder.py
Python
gpl-2.0
412
# 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/reporters/generators/buildrequest.py
Python
gpl-2.0
3,320
# 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/statistics/storage_backends/influxdb_client.py
Python
gpl-2.0
2,114
# Embedded file name: /usr/lib/enigma2/python/Plugins/SystemPlugins/ItalyCore/plugin.py from Plugins.Plugin import PluginDescriptor from Components.config import config, ConfigBoolean from Components.Harddisk import harddiskmanager from ItalySat.ItalysatBackupManager import BackupManagerautostart from ItalySat.Ita...
kingvuplus/boom
lib/python/Plugins/SystemPlugins/ItalyCore/plugin.py
Python
gpl-2.0
4,184
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
teto/ns-3-dev-git
src/visualizer/bindings/modulegen__gcc_LP64.py
Python
gpl-2.0
433,555
# -*- coding: utf-8 -*- class Charset(object): common_name = 'NotoSerifKhmer-Bold' native_name = '' def glyphs(self): glyphs = [] glyphs.append(0x00D9) #uni1781_17B6 glyphs.append(0x0007) #dollar glyphs.append(0x0017) #four glyphs.append(0x0077) #uni17CD ...
davelab6/pyfontaine
fontaine/charsets/noto_glyphs/notoserifkhmer_bold.py
Python
gpl-3.0
15,126
# Copyright (C) 2009-2015 Contributors as noted in the AUTHORS file # # This file is part of Autopilot. # # Autopilot 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 y...
rogerlindberg/autopilot
src/lib/instructions/userinstructions/selectcombobox.py
Python
gpl-3.0
1,454
# Copyright (c) 2003-2014 LOGILAB S.A. (Paris, FRANCE). # http://www.logilab.fr/ -- mailto:contact@logilab.fr # # 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 License, o...
spirrello/spirrello-pynet-work
applied_python/lib/python2.7/site-packages/pylint/checkers/classes.py
Python
gpl-3.0
47,374
# -*- coding: utf-8 -*- from Api import Poll, Talk, Channel from Gen.ttypes import * def def_callback(str): print(str) class LINE: mid = None authToken = None cert = None channel_access_token = None token = None obs_token = None refresh_token = None def __init__(self): self.Talk = Talk() ...
rachmansenpai/rach-devp
LineApi.py
Python
gpl-3.0
9,342
""" Representation of a quiz """ import jinja2 default_quiz_template = jinja2.Template(""" {{ quiz_name }} (version: {{ quiz_version }}) {{ preamble }} {% for question in questions %} Question #{{ loop.index }}: {{ question.render_question()}} {% endfor %} """) default_marking_sheet_template = jinja2.Templa...
shuttle1987/latex_quiz_generator
quiz_generator/quiz.py
Python
gpl-3.0
2,448
# -*- coding: utf-8 -*- """Copyright (c) 2012 Sergio Gabriel Teves All rights reserved. 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...
dahool/vertaal
rpc/log.py
Python
gpl-3.0
1,498
from ase import * from ase.calculators import TestPotential np.seterr(all='raise') a = Atoms('4N', positions=[(0, 0, 0), (1, 0, 0), (0, 1, 0), (0.1, 0.2, 0.7)], calculator=TestPotential()) print a.get_forces() md = VelocityVerlet(a, dt=...
freephys/python_ase
ase/test/verlet.py
Python
gpl-3.0
571