repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
MounirMesselmeni/django
tests/i18n/tests.py
3
86236
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import datetime import decimal import gettext as gettext_module import os import pickle from contextlib import contextmanager from importlib import import_module from threading import local from unittest import skipUnless from django import forms from ...
bsd-3-clause
jn0/fb2utils
unidecode/xd3.py
253
4705
data = ( 'tim', # 0x00 'tib', # 0x01 'tibs', # 0x02 'tis', # 0x03 'tiss', # 0x04 'ting', # 0x05 'tij', # 0x06 'tic', # 0x07 'tik', # 0x08 'tit', # 0x09 'tip', # 0x0a 'tih', # 0x0b 'pa', # 0x0c 'pag', # 0x0d 'pagg', # 0x0e 'pags', # 0x0f 'pan', # 0x10 'panj', # 0x11 ...
gpl-3.0
Stargrazer82301/CAAPR
CAAPR/CAAPR_AstroMagic/PTS/pts/evolve/Network.py
1
13269
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
mit
badbytes/pymeg
pdf2py/el.py
1
2695
try:from scipy.io.numpyio import * except ImportError: from extra.numpyio import * import os from time import strftime import shutil class getpoints: def __init__(self, elfile): datetime = strftime("%Y-%m-%d %H:%M:%S").replace(' ', '_') self.elfile = elfile if os.path.isfile(elfile) == Tru...
gpl-3.0
ssdi-drive/nuxeo-drive
nuxeo-drive-client/tests/test_remote_changes.py
1
8125
# coding: utf-8 from __future__ import unicode_literals from tests.common_unit_test import UnitTestCase class TestRemoteChanges(UnitTestCase): def setUpApp(self): super(TestRemoteChanges, self).setUpApp(register_roots=False) def setUp(self): super(TestRemoteChanges, self).setUp() se...
lgpl-2.1
hopeall/odoo
openerp/osv/fields.py
45
75006
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
mpetyx/pychatbot
AIML/howie-src-0.6.0/howie/aiml/WordSub.py
9
3292
"""This module implements the WordSub class, modelled after a recipe in "Python Cookbook" (Recipe 3.14, "Replacing Multiple Patterns in a Single Pass" by Xavier Defrang). Usage: Use this class like a dictionary to add before/after pairs: > subber = TextSub() > subber["before"] = "after" > subber["begin"] =...
apache-2.0
eSkiSo/kanboard
scripts/kanboard.py
11
36542
#!/usr/bin/env python ''' This module implements Kanboard Json-RPC API in Python. Example: kanboard = Kanboard("kanboard-token") projects = kanboard.getAllProjects() for p in projects: proj = kanboard.getProjectById(p['id']) pprint(proj) categories = kanboard.getAllCategor...
mit
petemounce/ansible
lib/ansible/modules/windows/win_file_version.py
78
2277
#!/usr/bin/env python # -*- coding: utf-8 -*- # Get DLL or EXE build version # Copyright © 2015 Sam Liu <sam.liu@activenetwork.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 Software Foundation, either versi...
gpl-3.0
agoose77/hivesystem
tutorial/layers/layer12/action3.py
3
1700
import bee from bee.segments import * import libcontext from libcontext.socketclasses import * from libcontext.pluginclasses import * class action3worker(bee.worker): def set_animplayfunc(self, animplayfunc): self.animplay = animplayfunc def set_soundplayfunc(self, soundplayfunc): self.soundp...
bsd-2-clause
47lining/ansible-modules-core
cloud/amazon/ec2_scaling_policy.py
20
6192
#!/usr/bin/python DOCUMENTATION = """ module: ec2_scaling_policy short_description: Create or delete AWS scaling policies for Autoscaling groups description: - Can create or delete scaling policies for autoscaling groups - Referenced autoscaling groups must already exist version_added: "1.6" author: Zacharie Eakin...
gpl-3.0
RafaelRMachado/qtwebkit
Tools/Scripts/webkitpy/common/checkout/checkout.py
119
9383
# Copyright (c) 2010 Google Inc. 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 the ...
gpl-2.0
terencehonles/mailman
src/mailman/interfaces/pending.py
3
2959
# Copyright (C) 2007-2012 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 you...
gpl-3.0
P2PHash/p2pool-deletecoin
wstools/XMLname.py
291
2479
"""Translate strings to and from SOAP 1.2 XML name encoding Implements rules for mapping application defined name to XML names specified by the w3 SOAP working group for SOAP version 1.2 in Appendix A of "SOAP Version 1.2 Part 2: Adjuncts", W3C Working Draft 17, December 2001, <http://www.w3.org/TR/soap12-part2/#namem...
gpl-3.0
selboo/starl-mangle
starl/forms.py
1
4627
#!/usr/bin/env python #_*_encoding:utf-8_*_ # encoding:utf-8 from django.forms import ModelForm from django import forms class Reg_Form(forms.Form): username = forms.CharField(label = 'icon-user', widget=forms.TextInput(attrs={'class':'span12'})) password = forms.CharField(label = 'icon-locked', widget=forms.Pass...
apache-2.0
mw46d/ardupilot
Tools/LogAnalyzer/tests/TestIMUMatch.py
68
4106
from __future__ import print_function from LogAnalyzer import Test,TestResult import DataflashLog from math import sqrt class TestIMUMatch(Test): '''test for empty or near-empty logs''' def __init__(self): Test.__init__(self) self.name = "IMU Mismatch" def run(self, logdata, verbose): ...
gpl-3.0
keerts/home-assistant
homeassistant/components/sensor/tellstick.py
19
3900
""" Support for Tellstick sensors. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.tellstick/ """ import logging from collections import namedtuple import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassi...
apache-2.0
pyladieshre/pyladies
pyladies_harare/tests/test_views.py
2
3032
from datetime import timedelta from io import StringIO from django.core.urlresolvers import reverse from django.test import TestCase, RequestFactory from django.test.client import Client from django.utils import timezone from django.contrib.auth.models import User from pyladies_harare.models import Post # Tests for...
mit
duststorm/x-VTOLdrone
PixHawk_PX4/PX4Firmware/mavlink/share/pyshared/pymavlink/examples/flighttime.py
30
1722
#!/usr/bin/env python ''' work out total flight time for a mavlink log ''' import sys, time, os # allow import from the parent directory, where mavlink.py is sys.path.insert(0, os.path.join(os.path.dirname(os.path.realpath(__file__)), '..')) from optparse import OptionParser parser = OptionParser("flighttime.py [op...
gpl-3.0
baydinsoftware/FAT
fatproject/fat/views.py
1
3764
from django.shortcuts import render, get_object_or_404 from django.http import HttpResponse, HttpResponseRedirect, JsonResponse from django.contrib.auth.models import User from models import Position, Stage, Candidate, Feedback, Source, UserProfile, WhiteListItem from django.contrib.auth import authenticate, login, log...
mit
sidartaoliveira/ansible
lib/ansible/module_utils/pycompat24.py
90
4115
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
cpanelli/-git-clone-https-chromium.googlesource.com-chromium-tools-depot_tools
third_party/logilab/common/compat.py
93
2593
# pylint: disable=E0601,W0622,W0611 # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU L...
bsd-3-clause
coxmediagroup/googleads-python-lib
examples/adwords/v201502/basic_operations/add_campaigns.py
3
4119
#!/usr/bin/python # # 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 b...
apache-2.0
mizzao/ggplot
ggplot/scales/scale_colour_brewer.py
12
2114
from .scale import scale from copy import deepcopy import brewer2mpl def _number_to_palette(ctype, n): n -= 1 palettes = sorted(brewer2mpl.COLOR_MAPS[ctype].keys()) if n < len(palettes): return palettes[n] def _handle_shorthand(text): abbrevs = { "seq": "Sequential", "qual": "...
bsd-2-clause
rruebner/odoo
openerp/addons/base/tests/test_mail.py
65
23721
#!/usr/bin/env python # -*- coding: utf-8 -*- # This test can be run stand-alone with something like: # > PYTHONPATH=. python2 openerp/tests/test_misc.py ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP...
agpl-3.0
syphar/django
tests/sitemaps_tests/test_http.py
16
11105
from __future__ import unicode_literals import os from datetime import date from unittest import skipUnless from django.apps import apps from django.conf import settings from django.contrib.sitemaps import GenericSitemap, Sitemap from django.contrib.sites.models import Site from django.core.exceptions import Improper...
bsd-3-clause
saukrIppl/seahub
thirdpart/openpyxl-2.3.0-py2.7.egg/openpyxl/formatting/rule.py
13
8693
from __future__ import absolute_import # copyright openpyxl 2010-2015 from openpyxl.compat import basestring from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( Typed, String, Sequence, Bool, Float, NoneSet, Set, Integer,) from openpyxl.descrip...
apache-2.0
cyrillg/python-playground
first-dive/plant.py
2
2570
''' Kinematic model of a planar differential drive robot. author: Cyrill Guillemot email: cyrill.guillemot@gmail.com website: http://serial-robotics.org license: GNU GPL ''' #!/usr/bin/env python from lib import * from sensor import PerfectSensor class Cart: ''' Cart class Inputs: - p0: initi...
gpl-3.0
r39132/airflow
airflow/operators/docker_operator.py
3
10623
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
apache-2.0
SmartDeveloperHub/sdh-ci-metrics
sdh/__init__.py
4
1280
""" #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# This file is part of the Smart Developer Hub Project: http://www.smartdeveloperhub.org Center for Open Middleware http://www.centeropenmiddleware.com/ #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=...
apache-2.0
rpotpogo/PokemonGo-Map
Tools/Spawnpoint-Clustering/cluster.py
32
6712
import argparse import json import time import random import utils class Spawnpoint(object): def __init__(self, data): # not needed but useful for debugging self.spawnpoint_id = data.get('spawnpoint_id') or data.get('sid') try: self.position = (float(data['latitude']),...
agpl-3.0
swakrish/incubator-zeppelin
dev/merge_zeppelin_pr.py
60
13751
#!/usr/bin/env python # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "Li...
apache-2.0
mementum/backtrader
backtrader/talib.py
1
8950
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015-2020 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
gpl-3.0
surgebiswas/poker
PokerBots_2017/Johnny/keras/objectives.py
2
2135
from __future__ import absolute_import from . import backend as K from .utils.generic_utils import get_from_module def mean_squared_error(y_true, y_pred): return K.mean(K.square(y_pred - y_true), axis=-1) def mean_absolute_error(y_true, y_pred): return K.mean(K.abs(y_pred - y_true), axis=-1) def mean_abs...
mit
BartDeWaal/libsigrokdecode
decoders/ir_rc5/pd.py
13
6813
## ## This file is part of the libsigrokdecode project. ## ## Copyright (C) 2014 Uwe Hermann <uwe@hermann-uwe.de> ## ## 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 Li...
gpl-3.0
manueldelreal/termineter
framework/modules/dump_tables.py
1
3453
# framework/modules/dump_tables.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 Li...
gpl-3.0
alibbaba/plugin.video.live.streamspro
plugin.video.live.streamspro/resources/lib/libraries/pyaes/aes.py
4
60899
# The MIT License (MIT) # # Copyright (c) 2014 Richard Moore # # 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, co...
gpl-2.0
mwiencek/picard
picard/formats/mutagenext/tak.py
4
1278
# Tom's lossless Audio Kompressor (TAK) reader/tagger # # Copyright 2008 Lukas Lalinsky <lalinsky@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # $$ """Tom's lossless...
gpl-2.0
fatadama/estimation
filters/python/sir_particle/sir_test.py
1
5167
import sir import numpy as np import math # for exp() import matplotlib.pyplot as plt import scipy.integrate as sp ## measurement noise sigma_y = 0.01 ## initial value of state X0 = np.array([1.0,0.0]) ## uncertainty in the initial state SIGMA_X0 = np.array([0.1,0.1]) def eqom(x,t): dx = np.zeros(2) dx[0] = x...
gpl-2.0
timsavage/odin
odin/contrib/doc_gen/__init__.py
2
3510
# -*- coding: utf-8 -*- """ Documentation generation from resources. """ import os try: from jinja2 import Environment, FileSystemLoader except ImportError: raise ImportError("Jinja2 is required for documentation generation support.") from odin import registration __all__ = ('FORMAT_TEMPLATE_RST', 'FORMAT_TEMP...
bsd-3-clause
Shiroy/servo
tests/wpt/css-tests/tools/pywebsocket/src/mod_pywebsocket/common.py
489
9947
# Copyright 2012, Google Inc. # 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 the f...
mpl-2.0
tonk/ansible
test/support/integration/plugins/module_utils/database.py
54
5942
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
c0deh4xor/magstripe
magstripe.py
2
4408
#!/usr/bin/python3 ################################################################################ # magstripe.py - serial magstripe card reader/writer utility # A small utility to handle reading and writing magnetic stripe cards over # serial. Available under the ISC license. # # https://github.com/mutantmonkey/magst...
isc
hachreak/invenio-records
invenio_records/tasks/api.py
1
1755
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015, 2016 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any...
gpl-2.0
jefftc/changlab
web2py/gluon/highlight.py
4
13288
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro <mdipierro@cs.depaul.edu> License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) """ import re import cgi __all__ = ['highlight'] class Highlighter(object): """ Do syntax highl...
mit
mims2707/bite-project
deps/gdata-python-client/samples/apps/marketplace_sample/gdata/tlslite/mathtls.py
273
11647
"""Miscellaneous helper functions.""" from utils.compat import * from utils.cryptomath import * import hmac import md5 import sha #1024, 1536, 2048, 3072, 4096, 6144, and 8192 bit groups] goodGroupParameters = [(2,0xEEAF0AB9ADB38DD69C33F80AFA8FC5E86072618775FF3C0B9EA2314C9C256576D674DF7496EA81D3383B4813D692C6E0E0D5D...
apache-2.0
openstack/tempest-lib
tempest_lib/api_schema/response/compute/v2_1/images.py
1
4558
# Copyright 2014 NEC Corporation. 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 ...
apache-2.0
romankagan/DDBWorkbench
python/lib/Lib/pickletools.py
91
73421
'''"Executable documentation" for the pickle module. Extensive comments about the pickle protocols and pickle-machine opcodes can be found here. Some functions meant for external use: genops(pickle) Generate all the opcodes in a pickle, as (opcode, arg, position) triples. dis(pickle, out=None, memo=None, indentl...
apache-2.0
nurv/BicaVM
webserver/web/session.py
16
9465
""" Session Management (from web.py) """ import os, time, datetime, random, base64 try: import cPickle as pickle except ImportError: import pickle try: import hashlib sha1 = hashlib.sha1 except ImportError: import sha sha1 = sha.new import utils import webapi as web __all__ = [ 'Session',...
gpl-3.0
larsmans/scipy
scipy/weave/examples/md5_speed.py
100
2595
""" Storing actual strings instead of their md5 value appears to be about 10 times faster. >>> md5_speed.run(200,50000) md5 build(len,sec): 50000 0.870999932289 md5 retrv(len,sec): 50000 0.680999994278 std build(len,sec): 50000 0.259999990463 std retrv(len,sec): 50000 0.0599999427795 This test actually takes several ...
bsd-3-clause
lolhi/No.5-Kernel
scripts/build-all.py
282
8889
#! /usr/bin/env python # Copyright (c) 2009, Code Aurora Forum. 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...
gpl-2.0
shaunbrady/boto
tests/unit/ec2/test_ec2object.py
112
7770
#!/usr/bin/env python from tests.unit import unittest from tests.unit import AWSMockServiceTestCase from boto.ec2.connection import EC2Connection from boto.ec2.ec2object import TaggedEC2Object CREATE_TAGS_RESPONSE = br"""<?xml version="1.0" encoding="UTF-8"?> <CreateTagsResponse xmlns="http://ec2.amazonaws.com/doc/...
mit
buildbot/buildbot
master/buildbot/test/unit/reporters/test_utils.py
5
9523
# 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...
gpl-2.0
valdecdev/odoo
openerp/tools/pdf_utils.py
72
2702
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. """ Copyright (c) 2003-2007 LOGILAB S.A. (Paris, FRANCE). http://www.logilab.fr/ -- mailto:contact@logilab.fr manipulate pdf and fdf files. pdftk recommended. Notes regarding pdftk, pdf forms and fdf files (form defin...
agpl-3.0
nilouco/dpAutoRigSystem
dpAutoRigSystem/Controls/dpCharacter.py
1
4470
# importing libraries: import maya.cmds as cmds import dpBaseControlClass as BaseControl reload(BaseControl) # global variables to this module: CLASS_NAME = "Character" TITLE = "m125_character" DESCRIPTION = "m099_cvControlDesc" ICON = "/Icons/dp_character.png" dpCharacterVersion = 1.1 class Character(BaseContro...
gpl-2.0
xlqian/navitia
source/jormungandr/jormungandr/street_network/tests/streetnetwork_backend_manager_test.py
1
16397
# Copyright (c) 2001-2016, Canal TP and/or its affiliates. All rights reserved. # # This file is part of Navitia, # the software to build cool stuff with public transport. # # Hope you'll enjoy and contribute to this project, # powered by Canal TP (www.canaltp.fr). # Help us simplify mobility and open public transp...
agpl-3.0
pekingduck/googletest
test/gtest_filter_unittest.py
2826
21261
#!/usr/bin/env python # # Copyright 2005 Google Inc. 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...
bsd-3-clause
Giftingnation/GN-Oscar-Custom
oscar/apps/catalogue/reviews/views.py
5
4261
from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.views.generic import ListView, DetailView, CreateView, View from django.contrib import messages from django.db.models import get_model from django.utils.translation import ugettext_lazy as _ from oscar.core.loading ...
bsd-3-clause
saratang/servo
tests/wpt/web-platform-tests/tools/html5lib/html5lib/tests/test_tokenizer.py
420
6544
from __future__ import absolute_import, division, unicode_literals import json import warnings import re from .support import get_data_files from html5lib.tokenizer import HTMLTokenizer from html5lib import constants class TokenizerTestParser(object): def __init__(self, initialState, lastStartTag=None): ...
mpl-2.0
fbradyirl/home-assistant
homeassistant/components/splunk/__init__.py
4
3228
"""Support to send data to an Splunk instance.""" import json import logging from aiohttp.hdrs import AUTHORIZATION import requests import voluptuous as vol from homeassistant.const import ( CONF_SSL, CONF_VERIFY_SSL, CONF_HOST, CONF_NAME, CONF_PORT, CONF_TOKEN, EVENT_STATE_CHANGED, ) from...
apache-2.0
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/libxml/src/check-relaxng-test-suite2.py
343
10578
#!/usr/bin/python import sys import time import os import string import StringIO sys.path.insert(0, "python") import libxml2 # Memory debug specific libxml2.debugMemory(1) debug = 0 quiet = 1 # # the testsuite description # CONF=os.path.join(os.path.dirname(__file__), "test/relaxng/testsuite.xml") LOG="check-relaxng-...
gpl-3.0
gdimitris/ChessPuzzler
Virtual_Environment/lib/python2.7/site-packages/sqlalchemy/util/topological.py
60
2794
# util/topological.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Topological sorting algorithms.""" from ..exc import CircularDependencyError...
mit
Vvucinic/Wander
venv_2_7/lib/python2.7/site-packages/Django-1.9-py2.7.egg/django/db/models/sql/aggregates.py
77
4846
""" Classes to represent the default SQL aggregate functions """ import copy import warnings from django.db.models.fields import FloatField, IntegerField from django.db.models.query_utils import RegisterLookupMixin from django.utils.deprecation import RemovedInDjango110Warning from django.utils.functional import cache...
artistic-2.0
spaceof7/QGIS
tests/src/python/test_qgstaskmanager.py
11
9152
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsTaskManager. .. note:: 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, or (at your option) any later version. """ __...
gpl-2.0
wathen/PhD
MHD/FEniCS/MHD/CG/common/Forms.py
2
3046
from dolfin import * class Forms(object): """docstring for Forms""" def __init__(self, mesh, W,F_M,F_NS, u_k,b_k,params,options={}): assert type(options) is dict, 'options must be a dictionary object' self.mesh = mesh self.W = W self.F_M= F_M self.F_NS= F_NS se...
mit
akrehl/dotfiles
vim/bundle/YouCompleteMe/third_party/ycmd/check_core_version.py
19
1307
#!/usr/bin/env python # # Copyright (C) 2015 Google Inc. # # This file is part of ycmd. # # ycmd 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 late...
mit
p2pu/learning-circles
studygroups/tests/test_models.py
1
11684
from django.test import TestCase from django.core import mail from django.contrib.auth.models import User from django.utils import timezone from django.utils.translation import get_language from studygroups.models import Course from studygroups.models import StudyGroup from studygroups.models import Meeting from study...
mit
aviaryan/open-event-orga-server
app/models/custom_placeholder.py
7
1185
from app.models import db class CustomPlaceholder(db.Model): """email notifications model class""" __tablename__ = 'custom_placeholder' id = db.Column(db.Integer, primary_key=True) name = db.Column(db.String) url = db.Column(db.String) thumbnail = db.Column(db.String) co...
gpl-3.0
yjxtogo/horizon
openstack_dashboard/dashboards/project/images/urls.py
65
1332
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
apache-2.0
40223136/w11-2
static/Brython3.1.1-20150328-091302/Lib/xml/sax/__init__.py
637
3505
"""Simple API for XML (SAX) implementation for Python. This module provides an implementation of the SAX 2 interface; information about the Java version of the interface can be found at http://www.megginson.com/SAX/. The Python version of the interface is documented at <...>. This package contains the following modu...
gpl-3.0
mkhutornenko/incubator-aurora
src/main/python/apache/aurora/client/commands/core.py
1
28618
# # 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 # distributed under ...
apache-2.0
iLoop2/ResInsight
ThirdParty/Ert/devel/python/python/ert_gui/tools/load_results/load_results_iterations_model.py
1
1670
# Copyright (C) 2011 Statoil ASA, Norway. # # The file 'load_results_iterations_model.py' is part of ERT - Ensemble based Reservoir Tool. # # ERT 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 ve...
gpl-3.0
mvidalgarcia/indico
indico/util/serializer.py
2
1714
# This file is part of Indico. # Copyright (C) 2002 - 2019 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 enum import Enum from indico.core.errors import IndicoError from indico.core.logger import Logger ...
mit
jussimalinen/robotframework-selenium2library
src/ez_setup.py
276
10240
#!python """Bootstrap setuptools installation If you want to use setuptools in your package's setup.py, just include this file in the same directory with it, and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() If you want to require a specific version of setuptools...
apache-2.0
Tejal011089/med2-app
support/doctype/customer_issue/customer_issue.py
30
2037
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import webnotes from webnotes import session, msgprint from webnotes.utils import today from utilities.transaction_base import TransactionBase ...
agpl-3.0
AnimeshSinha1309/WebsiteEdunet
WebsiteEdunet/env/Lib/site-packages/django/db/models/lookups.py
70
19467
from copy import copy from django.conf import settings from django.db.models.expressions import Func, Value from django.db.models.fields import ( DateField, DateTimeField, Field, IntegerField, TimeField, ) from django.db.models.query_utils import RegisterLookupMixin from django.utils import timezone from django.ut...
mit
karllessard/tensorflow
tensorflow/python/data/experimental/kernel_tests/tf_record_writer_test.py
18
5877
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
NetDBNCKU/GAE-Conference-Web-App
django/core/files/uploadhandler.py
136
7193
""" Base file upload handler classes, and the built-in concrete subclasses """ try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.uploadedfile import TemporaryUplo...
bsd-3-clause
jt-xx/e-commerce
__unported__/sale_payment_method_transaction_id/__openerp__.py
16
1905
# -*- coding: utf-8 -*- ############################################################################## # # Author: Guewen Baconnier # Copyright 2014 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pu...
agpl-3.0
Isendir/brython
www/gallery/highcharts/examples/area-stacked/chart.py
16
1572
from browser import window from javascript import JSConstructor b_highchart = JSConstructor(window.Highcharts.Chart) b_highchart({ 'chart':{ 'type': 'area', 'renderTo': 'container' }, 'title': { 'text': 'Historic and Estimated Worldwide Population Growth by Region' }, 'subt...
bsd-3-clause
abhishek-ch/hue
desktop/core/ext-py/tablib-0.10.0/tablib/packages/xlwt3/Cell.py
46
8367
from struct import unpack, pack from . import BIFFRecords class StrCell(object): __slots__ = ["rowx", "colx", "xf_idx", "sst_idx"] def __init__(self, rowx, colx, xf_idx, sst_idx): self.rowx = rowx self.colx = colx self.xf_idx = xf_idx self.sst_idx = sst_idx def...
apache-2.0
PrincetonUniversity/pox
pox/lib/recoco/examples.py
46
2636
# Copyright 2011 Colin Scott # Copyright 2011 James McCauley # # 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 applica...
apache-2.0
idaholab/raven
tests/framework/AnalyticModels/optimizing/plot_functions.py
1
3501
# Copyright 2017 Battelle Energy Alliance, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed t...
apache-2.0
darongE/beets
test/test_mb.py
9
15343
# This file is part of beets. # Copyright 2013, Adrian Sampson. # # 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, ...
mit
kingvuplus/boom2
lib/python/Components/NetworkTime.py
2
1875
# Embedded file name: /usr/lib/enigma2/python/Components/NetworkTime.py from Components.Console import Console from config import config from enigma import eTimer, eDVBLocalTimeHandler, eEPGCache from Tools.StbHardware import setRTCtime from time import time, ctime def AutoNTPSync(session = None, **kwargs): ...
gpl-2.0
jcpowermac/ansible
test/units/plugins/lookup/test_lastpass.py
153
6918
# (c)2016 Andrew Zenk <azenk@umn.edu> # # 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) any later version. # # ...
gpl-3.0
lahwaacz/wiki-scripts
ws/db/grabbers/usermerge.py
1
2816
#!/usr/bin/env python3 import sqlalchemy as sa from .GrabberBase import GrabberBase class GrabberUserMerge(GrabberBase): def __init__(self, api, db): super().__init__(api, db) self.sql = { ("delete", "user"): db.user.delete() .where(db.user.c.user...
gpl-3.0
rfleschenberg/djangocms-cascade
cmsplugin_cascade/segmentation/cms_plugins.py
5
7808
# -*- coding: utf-8 -*- from __future__ import unicode_literals try: from html.parser import HTMLParser # py3 except ImportError: from HTMLParser import HTMLParser # py2 from django.core.exceptions import ValidationError from django.forms import widgets from django.utils.translation import ugettext_lazy as _ ...
mit
CuonDeveloper/cuon
cuon_client/Client/CUON/cuon/Project/project.py
3
43100
# -*- coding: utf-8 -*- ##Copyright (C) [2003] [Jürgen Hamel, D-32584 Löhne] ##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 later versi...
gpl-3.0
realsobek/freeipa
ipatests/test_webui/data_group.py
4
1973
# Authors: # Petr Vobornik <pvoborni@redhat.com> # # Copyright (C) 2013 Red Hat # see file 'COPYING' for use and warranty information # # 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 ...
gpl-3.0
mrknow/filmkodi
plugin.video.mrknow/mylib/_pydevd_bundle/pydevd_dont_trace_files.py
13
4054
# Important: Autogenerated file. # DO NOT edit manually! # DO NOT edit manually! from _pydevd_bundle.pydevd_constants import IS_PY3K LIB_FILE = 1 PYDEV_FILE = 2 DONT_TRACE = { # commonly used things from the stdlib that we don't want to trace 'Queue.py':LIB_FILE, 'queue.py':LIB_FILE, 'socket.py':LIB...
apache-2.0
dvliman/jaikuengine
.google_appengine/lib/django-1.4/tests/regressiontests/staticfiles_tests/tests.py
25
27482
# -*- encoding: utf-8 -*- from __future__ import with_statement import codecs import os import posixpath import shutil import sys import tempfile import warnings from StringIO import StringIO from django.template import loader, Context from django.conf import settings from django.core.cache.backends.base import BaseC...
apache-2.0
rwillmer/django
django/db/migrations/operations/special.py
374
7425
from __future__ import unicode_literals from django.db import router from .base import Operation class SeparateDatabaseAndState(Operation): """ Takes two lists of operations - ones that will be used for the database, and ones that will be used for the state change. This allows operations that don't ...
bsd-3-clause
kapilt/ansible
lib/ansible/plugins/lookup/consul_kv.py
115
4543
# (c) 2015, Steve Gargan <steve.gargan@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) any later v...
gpl-3.0
xzturn/tensorflow
tensorflow/tools/pip_package/simple_console_for_windows.py
605
1028
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
pattisdr/osf.io
api/waffle/views.py
18
2936
from itertools import chain from waffle.models import Flag, Switch, Sample from rest_framework import generics from rest_framework import permissions as drf_permissions from api.base.views import JSONAPIBaseView from api.base.permissions import TokenHasScope from api.base.pagination import MaxSizePagination from api....
apache-2.0
MungoRae/home-assistant
homeassistant/components/weather/demo.py
11
3262
""" Demo platform that offers fake meteorological data. For more details about this platform, please refer to the documentation https://home-assistant.io/components/demo/ """ from datetime import datetime, timedelta from homeassistant.components.weather import ( WeatherEntity, ATTR_FORECAST_TEMP, ATTR_FORECAST_TI...
apache-2.0
hebertmm/ardupilot-hmm
Tools/autotest/arduplane.py
1
10551
# fly ArduPlane in SIL import util, pexpect, sys, time, math, shutil, os from common import * from pymavlink import mavutil import random # get location of scripts testdir=os.path.dirname(os.path.realpath(__file__)) HOME_LOCATION='-35.362938,149.165085,585,354' WIND="0,180,0.2" # speed,direction,variance homeloc =...
gpl-3.0
rvraghav93/scikit-learn
examples/semi_supervised/plot_label_propagation_versus_svm_iris.py
38
2381
""" ===================================================================== Decision boundary of label propagation versus SVM on the Iris dataset ===================================================================== Comparison for decision boundary generated on iris dataset between Label Propagation and SVM. This demon...
bsd-3-clause
Hackplayers/Empire-mod-Hackplayers
lib/modules/python/collection/linux/mimipenguin.py
12
9944
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): # metadata info about the module, not modified during runtime self.info = { # name for the module that will appear in module menus 'Name': 'Linux MimiPenguin', # list of one ...
bsd-3-clause