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
evaschalde/odoo
odoo.py
257
5618
#!/usr/bin/env python #---------------------------------------------------------- # odoo cli # # To install your odoo development environement type: # # wget -O- https://raw.githubusercontent.com/odoo/odoo/8.0/odoo.py | python # # The setup_* subcommands used to boostrap odoo are defined here inline and may # only depe...
agpl-3.0
internetarchive/warctools
hanzo/warctools/warc.py
1
11905
"""An object to represent warc records, using the abstract record in record.py""" import re import hashlib from hanzo.warctools.record import ArchiveRecord, ArchiveParser from hanzo.warctools.archive_detect import register_record_type import uuid bad_lines = 5 # when to give up looking for the version stamp @Archiv...
mit
an7oine/WinVHS
Cygwin/lib/python2.7/encodings/euc_jis_2004.py
816
1051
# # euc_jis_2004.py: Python Unicode Codec for EUC_JIS_2004 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('euc_jis_2004') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(m...
gpl-3.0
jgmanzanas/CMNT_004_15
project-addons/flask_middleware_connector/__openerp__.py
1
1575
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Comunitea All Rights Reserved # $Omar Castiñeira Saavedra <omar@comunitea.com>$ # # This program is free software: you can redistribute it and/or modify # it under the terms of the G...
agpl-3.0
pwong-mapr/private-hue
desktop/core/ext-py/Django-1.4.5/django/conf/locale/cs/formats.py
86
1313
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y' TIME_FORMAT = 'G:i:s' DATETIME_FORMAT = 'j. E Y G:i:s' YEAR_MONTH...
apache-2.0
MauHernandez/cyclope
cyclope/apps/contacts/urls.py
2
1044
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2010-2015 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...
gpl-3.0
nke001/attention-lvcsr
libs/blocks-extras/blocks/extras/bricks/__init__.py
7
1928
from theano import shared, tensor from blocks.bricks import Feedforward from blocks.bricks.base import application, lazy from blocks.extras.initialization import PermutationMatrix from blocks.extras.utils import check_valid_permutation from blocks.utils import shared_floatx class FixedPermutation(Feedforward): ""...
mit
jn2840/bitcoin
qa/rpc-tests/mempool_packages.py
1
7342
#!/usr/bin/env python2 # Copyright (c) 2014-2015 The Beardcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Test descendant package tracking code from test_framework.test_framework import BitcoinTestFramework...
mit
alex-march/micropython
esp8266/modules/flashbdev.py
7
2025
import esp class FlashBdev: SEC_SIZE = 4096 START_SEC = esp.flash_user_start() // SEC_SIZE NUM_BLK = 0x6b def __init__(self, blocks=NUM_BLK): self.blocks = blocks def readblocks(self, n, buf): #print("readblocks(%s, %x(%d))" % (n, id(buf), len(buf))) esp.flash_read((n + s...
mit
SayCV/tools-OpenOCD
tools/xsvf_tools/svf2xsvf.py
101
26710
#!/usr/bin/python3.0 # Copyright 2008, SoftPLC Corporation http://softplc.com # Dick Hollenbeck dick@softplc.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 version 2 # of the Lic...
gpl-2.0
lexus24/w16b_test
static/Brython3.1.1-20150328-091302/Lib/xml/etree/ElementTree.py
730
61800
# # ElementTree # $Id: ElementTree.py 3440 2008-07-18 14:45:01Z fredrik $ # # light-weight XML support for Python 2.3 and later. # # history (since 1.2.6): # 2005-11-12 fl added tostringlist/fromstringlist helpers # 2006-07-05 fl merged in selected changes from the 1.3 sandbox # 2006-07-05 fl removed support for ...
agpl-3.0
unclev/vk.unclev.ru
library/xmpp/protocol.py
1
54681
## protocol.py ## ## Copyright (C) 2003-2005 Alexey "Snake" Nezhdanov ## ## 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, or (at your option) ## any later ...
mit
Zen-CODE/kivy
kivy/uix/bubble.py
42
12590
''' Bubble ====== .. versionadded:: 1.1.0 .. image:: images/bubble.jpg :align: right The Bubble widget is a form of menu or a small popup where the menu options are stacked either vertically or horizontally. The :class:`Bubble` contains an arrow pointing in the direction you choose. Simple example ------------...
mit
virtualopensystems/neutron
neutron/tests/unit/test_config.py
2
2478
# Copyright (c) 2012 OpenStack Foundation. # # 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...
apache-2.0
janelia-idf/hybridizer
tests/adc_to_volume.py
4
5112
# -*- coding: utf-8 -*- from __future__ import print_function, division import matplotlib.pyplot as plot import numpy from numpy.polynomial.polynomial import polyfit,polyadd,Polynomial import yaml INCHES_PER_ML = 0.078 VOLTS_PER_ADC_UNIT = 0.0049 def load_numpy_data(path): with open(path,'r') as fid: hea...
bsd-3-clause
BootstrapHeroes/django-shopify
django_shopify/shopify_app/services/plan_config_service.py
1
2510
from base import BaseService from shopify_app.models import PlanConfig from django.conf import settings from shopify_app.config import DEFAULTS from datetime import datetime from shopify_api import APIWrapper class PlanConfigService(BaseService): entity = PlanConfig def _get_charge_common_data(self, shop, p...
gpl-3.0
darjus-amzn/boto
boto/mturk/__init__.py
782
1108
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.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 the rights to use, copy, modi...
mit
ChanduERP/odoo
addons/l10n_tr/__openerp__.py
259
2056
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 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
tdtrask/ansible
test/units/modules/network/nxos/test_nxos_command.py
57
4175
# (c) 2016 Red Hat Inc. # # 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. # # Ansible is dis...
gpl-3.0
nickweinberg/werewolf-slackbot
rtmbot.py
1
6723
#!/usr/bin/env python import sys sys.dont_write_bytecode = True import glob import yaml import json import os import sys import time import logging from argparse import ArgumentParser from slackclient import SlackClient def dbg(debug_string): if debug: logging.info(debug_string) USER_DICT = {} class R...
mit
nitramkaroh/OOFEM
tools/unv2oofem/unv2oofem.py
1
12763
#!/usr/bin/python # -*- coding: utf-8 -*- from unv2x import * from abaqus2x import * from oofemctrlreader import * import time from numpy.core.defchararray import splitlines if __name__=='__main__': helpmsg=""" Usage: unv2oofem.py unvfile ctrlfile oofemfile What it does: read unvfile, create an internal FEM obje...
lgpl-2.1
lashwang/pyspider
pyspider/database/sqlalchemy/taskdb.py
4
6205
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<roy@binux.me> # http://binux.me # Created on 2014-12-04 22:33:43 import re import six import time import json import sqlalchemy.exc from sqlalchemy import (create_engine, MetaData, Table, Column, I...
apache-2.0
stuartsierra/password-store
contrib/importers/kedpm2pass.py
42
1568
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2012 Antoine Beaupré <anarcat@orangeseeds.org>. All Rights Reserved. # This file is licensed under the GPLv2+. Please see COPYING for more information. # # To double-check your import worked: # grep Path passwords | sed 's#^Path: ##;s/$/.gpg/' | sort > lis...
gpl-2.0
vyscond/cocos
cocos/batch.py
3
4429
# ---------------------------------------------------------------------------- # cocos2d # Copyright (c) 2008-2012 Daniel Moisset, Ricardo Quesada, Rayentray Tappa, # Lucio Torre # Copyright (c) 2009-2015 Richard Jones, Claudio Canepa # All rights reserved. # # Redistribution and use in source and binary forms, with o...
bsd-3-clause
guludo/ardupilot-1
mk/PX4/Tools/genmsg/src/genmsg/command_line.py
217
1887
# Software License Agreement (BSD License) # # Copyright (c) 2011, Willow Garage, 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 ...
gpl-3.0
delhivery/django
tests/forms_tests/tests/test_forms.py
46
148965
# -*- coding: utf-8 -*- from __future__ import unicode_literals import copy import datetime import json import uuid from django.core.exceptions import NON_FIELD_ERRORS from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import RegexValidator from django.forms import ( Boolean...
bsd-3-clause
gangadharkadam/sher
erpnext/manufacturing/doctype/bom/test_bom.py
38
1471
# 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 unittest import frappe test_records = frappe.get_test_records('Bom') class TestBOM(unittest.TestCase): def test_get_items(self): from er...
agpl-3.0
OpenTTD-Ladder/ladder-web
ladder/design/management/commands/compile_css.py
1
1028
import os from ..base import CompilerCommand, CSS_PROPERTY, CSS_STATIC_DIR class Command(CompilerCommand): static_dir = CSS_STATIC_DIR module_property = CSS_PROPERTY def queue_file(self, fname, module): return self.test_file_age(fname, ''.join([os.path.splitext(fname)[0], '.css'])) def ...
gpl-2.0
google/material-design-icons
update/venv/lib/python3.9/site-packages/setuptools/command/install_lib.py
5
5023
import os import sys from itertools import product, starmap import distutils.command.install_lib as orig class install_lib(orig.install_lib): """Don't add compiled flags to filenames of non-Python files""" def initialize_options(self): orig.install_lib.initialize_options(self) self.multiarch ...
apache-2.0
stwunsch/gnuradio
gr-audio/examples/python/audio_fft.py
68
4596
#!/usr/bin/env python # # Copyright 2004,2005,2007 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your ...
gpl-3.0
FEniCS/dolfin
site-packages/dolfin_utils/documentation/extractdocumentation.py
1
7632
# -*- coding: utf-8 -*- """Script to extract documentation from docstrings in *.h files in the DOLFIN source tree.""" # Copyright (C) 2010 Anders Logg # # This file is part of DOLFIN. # # DOLFIN is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as pub...
lgpl-3.0
opennode/nodeconductor-openstack
src/waldur_openstack/openstack_tenant/tests/unittests/test_handlers.py
1
18087
from __future__ import unicode_literals from django.test import TestCase from django.contrib.contenttypes.models import ContentType from waldur_core.core.models import StateMixin from waldur_core.cost_tracking import models as cost_tracking_models from waldur_core.structure import models as structure_models from wald...
mit
MayankGo/ec2-api
ec2api/config.py
1
2017
# Copyright 2014 # The Cloudscaling Group, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
apache-2.0
kockamester/diliproject
vendor/doctrine/orm/docs/en/conf.py
2448
6497
# -*- coding: utf-8 -*- # # Doctrine 2 ORM documentation build configuration file, created by # sphinx-quickstart on Fri Dec 3 18:10:24 2010. # # 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. ...
mit
jaredkoontz/leetcode
Python/design-snake-game.py
3
2231
# Time: O(1) per move # Space: O(s), s is the current length of the snake. from collections import deque class SnakeGame(object): def __init__(self, width,height,food): """ Initialize your data structure here. @param width - screen width @param height - screen height @pa...
mit
mikebenfield/scipy
scipy/fftpack/tests/test_import.py
49
1352
"""Test possibility of patching fftpack with pyfftw. No module source outside of scipy.fftpack should contain an import of the form `from scipy.fftpack import ...`, so that a simple replacement of scipy.fftpack by the corresponding fftw interface completely swaps the two FFT implementations. Because this simply inspe...
bsd-3-clause
watermelo/libcloud
libcloud/test/dns/test_godaddy.py
14
7283
# 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 "License"); you may not use ...
apache-2.0
Bachaco-ve/odoo
addons/account/company.py
384
2814
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 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
helinwang/Paddle
paddle/api/test/util.py
20
1752
# Copyright (c) 2016 PaddlePaddle 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 applic...
apache-2.0
hmendozap/master-arbeit-projects
autosk_dev_test/component/RegDeepNet.py
1
19049
import numpy as np import scipy.sparse as sp from HPOlibConfigSpace.configuration_space import ConfigurationSpace from HPOlibConfigSpace.conditions import EqualsCondition, InCondition from HPOlibConfigSpace.hyperparameters import UniformFloatHyperparameter, \ UniformIntegerHyperparameter, CategoricalHyperparameter...
mit
RohitDas/cubeproject
lib/django/utils/ipv6.py
26
7971
# This code was mostly based on ipaddr-py # Copyright 2007 Google Inc. https://github.com/google/ipaddr-py # Licensed under the Apache License, Version 2.0 (the "License"). from django.core.exceptions import ValidationError from django.utils.six.moves import range from django.utils.translation import ugettext_lazy as _...
bsd-3-clause
simplyvikram/google-chartwrapper
templating/djangoproj/views.py
9
1670
# -*- coding: utf-8 -*- from django.shortcuts import render_to_response def example(request): greek_elections = [ { 'type': 'Pie3D', 'title': 'Greek Elections 2009', 'data': [43.92, 33.48, 7.54, 5.63, 4.60, 2.53, 2.3], 'labels': 'ΠΑΣΟΚ|ΝΔ|ΚΚΕ|ΛΑΟΣ|ΣΥΡΙΖΑ|Οικολόγοι Πράσι...
bsd-3-clause
tiagocardosos/stoq
stoqlib/domain/parameter.py
2
2126
# -*- coding: utf-8 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Copyright (C) 2006-2007 Async Open Source <http://www.async.com.br> ## All rights reserved ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU Lesser General Public License as published by ## the Free Softw...
gpl-2.0
develru/InformationDevicePy
modules/weatherdata.py
1
4214
""" Copyright (C) 2016 Richard Schwalk 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 version. This program ...
gpl-3.0
tdubourg/downsizing-game
transactions.py
1
10019
from enum import Enum from utils import i, d Resources = Enum("CASH", "VOTE", "TRUST") class AbstractTransaction(object): """Transaction interface""" last_id = -1 player_1 = None player_2 = None @staticmethod def next_id(): # @TODO thread safety? AbstractTransaction.last_id +=...
lgpl-3.0
derekgreene/topic-stability
unsupervised/hungarian.py
5
19460
#!/usr/bin/python """ Implementation of the Hungarian (Munkres) Algorithm using Python and NumPy References: http://www.ams.jhu.edu/~castello/362/Handouts/hungarian.pdf http://weber.ucsd.edu/~vcrawfor/hungar.pdf http://en.wikipedia.org/wiki/Hungarian_algorithm http://www.public.iastate.edu/~ddot...
apache-2.0
openai/baselines
baselines/gail/dataset/mujoco_dset.py
1
4448
''' Data structure of the input .npz: the data is save in python dictionary format with keys: 'acs', 'ep_rets', 'rews', 'obs' the values of each item is a list storing the expert trajectory sequentially a transition can be: (data['obs'][t], data['acs'][t], data['obs'][t+1]) and get reward data['rews'][t] ''' from base...
mit
rhelmer/socorro-lib
socorro/lib/context_tools.py
10
1083
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os from contextlib import contextmanager from socorro.lib.util import FakeLogger #----------------------------...
mpl-2.0
gbbr/superdesk
server/app.py
8
1307
#!/usr/bin/env python # -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014, 2015 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/sup...
agpl-3.0
murali-munna/scikit-learn
sklearn/learning_curve.py
110
13467
"""Utilities to evaluate models with respect to a variable """ # Author: Alexander Fabisch <afabisch@informatik.uni-bremen.de> # # License: BSD 3 clause import warnings import numpy as np from .base import is_classifier, clone from .cross_validation import check_cv from .externals.joblib import Parallel, delayed fro...
bsd-3-clause
saisai/phantomjs
src/qt/qtbase/util/local_database/enumdata.py
102
38654
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies). ## Contact: http://www.qt-project.org/legal ## ## This file is part of the test suite of the Qt Toolkit. ## ## $QT_BEGIN_LICENSE:LGPL$ ## Commercial License...
bsd-3-clause
ryfeus/lambda-packs
Sklearn_scipy_numpy/source/pip/utils/glibc.py
350
2939
from __future__ import absolute_import import re import ctypes import platform import warnings def glibc_version_string(): "Returns glibc version string, or None if not using glibc." # ctypes.CDLL(None) internally calls dlopen(NULL), and as the dlopen # manpage says, "If filename is NULL, then the retur...
mit
shubhangiKishore/pattern
examples/08-server/03-wiki/wiki.py
3
4618
from __future__ import print_function import os, sys; sys.path.insert(0, os.path.join(os.path.dirname(__file__), "..", "..")) from pattern.server import App, template, threadsafe from codecs import open # This example demonstrates a simple wiki served by pattern.server. # A wiki is a web app where each page can be e...
bsd-3-clause
apanju/GMIO_Odoo
odoo.py
257
5618
#!/usr/bin/env python #---------------------------------------------------------- # odoo cli # # To install your odoo development environement type: # # wget -O- https://raw.githubusercontent.com/odoo/odoo/8.0/odoo.py | python # # The setup_* subcommands used to boostrap odoo are defined here inline and may # only depe...
agpl-3.0
Kiiv/CouchPotatoServer
libs/tornado/util.py
102
12256
"""Miscellaneous utility functions and classes. This module is used internally by Tornado. It is not necessarily expected that the functions and classes defined here will be useful to other applications, but they are documented here in case they are. The one public-facing part of this module is the `Configurable` cl...
gpl-3.0
kornicameister/ansible-modules-extras
network/openvswitch_port.py
12
8270
#!/usr/bin/python #coding: utf-8 -*- # pylint: disable=C0111 # (c) 2013, David Stygstra <david.stygstra@gmail.com> # # Portions copyright @ 2015 VMware, Inc. # # This file is part of Ansible # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License ...
gpl-3.0
firebitsbr/infernal-twin
build/pillow/build/lib.linux-i686-2.7/PIL/BufrStubImagePlugin.py
77
1504
# # The Python Imaging Library # $Id$ # # BUFR stub adapter # # Copyright (c) 1996-2003 by Fredrik Lundh # # See the README file for information on usage and redistribution. # from PIL import Image, ImageFile _handler = None ## # Install application-specific BUFR image handler. # # @param handler Handler object. d...
gpl-3.0
wanderer2/pymc3
pymc3/tests/test_glm.py
1
3145
import numpy as np from .helpers import SeededTest from pymc3 import glm, Model, Uniform, Normal, find_MAP, Slice, sample # Generate data def generate_data(intercept, slope, size=700): x = np.linspace(-1, 1, size) y = intercept + x * slope return x, y class TestGLM(SeededTest): @classmethod def...
apache-2.0
bugobliterator/ardupilot-chibios
Tools/ardupilotwaf/px_mkfw.py
18
4864
#!/usr/bin/env python ############################################################################ # # Copyright (C) 2012, 2013 PX4 Development Team. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are m...
gpl-3.0
InakiZabala/odoomrp-wip
purchase_secondary_unit/models/pricelist.py
21
2471
# -*- encoding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the...
agpl-3.0
inspyration/odoo
doc/_themes/odoodoc/sphinx_monkeypatch.py
24
3166
# -*- coding: utf-8 -*- import sphinx.roles import sphinx.environment from sphinx.writers.html import HTMLTranslator from docutils.writers.html4css1 import HTMLTranslator as DocutilsTranslator def patch(): # navify toctree (oh god) @monkey(sphinx.environment.BuildEnvironment) def resolve_toctree(old_resolv...
agpl-3.0
vprime/puuuu
env/lib/python2.7/site-packages/django/core/management/base.py
104
15912
""" Base classes for writing management commands (named commands which can be executed through ``django-admin.py`` or ``manage.py``). """ from __future__ import unicode_literals import os import sys from optparse import make_option, OptionParser import django from django.core.exceptions import ImproperlyConfigured ...
mit
mcgachey/edx-platform
common/djangoapps/track/migrations/0001_initial.py
189
2527
# -*- 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 'TrackingLog' db.create_table('track_trackinglog', ( ('id', self.gf('django.db.mo...
agpl-3.0
datapythonista/pandas
pandas/tests/util/test_validate_args_and_kwargs.py
8
2391
import pytest from pandas.util._validators import validate_args_and_kwargs _fname = "func" def test_invalid_total_length_max_length_one(): compat_args = ("foo",) kwargs = {"foo": "FOO"} args = ("FoO", "BaZ") min_fname_arg_count = 0 max_length = len(compat_args) + min_fname_arg_count actual_...
bsd-3-clause
nanobox-io/git
contrib/hooks/multimail/git_multimail.py
186
110172
#! /usr/bin/env python2 # Copyright (c) 2015 Matthieu Moy and others # Copyright (c) 2012-2014 Michael Haggerty and others # Derived from contrib/hooks/post-receive-email, which is # Copyright (c) 2007 Andy Parkins # and also includes contributions by other authors. # # This file is part of git-multimail. # # git-mult...
gpl-2.0
mancoast/CPythonPyc_test
fail/340_test_fcntl.py
96
5220
"""Test program for the fcntl C module. """ import platform import os import struct import sys import unittest from test.support import (verbose, TESTFN, unlink, run_unittest, import_module, cpython_only) # Skip test if no fcntl module. fcntl = import_module('fcntl') # TODO - Write tests fo...
gpl-3.0
rwaldron/mirovideoconverter3
mvc/widgets/osx/control.py
2
17828
# Miro - an RSS based video player application # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 # Participatory Culture Foundation # # 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; eithe...
gpl-3.0
coldmind/django
django/core/mail/backends/filebased.py
558
2771
"""Email backend that writes messages to a file.""" import datetime import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.mail.backends.console import \ EmailBackend as ConsoleEmailBackend from django.utils import six class EmailBackend(ConsoleEmailB...
bsd-3-clause
embrah/Sash-specialist
node_modules/node-gyp/gyp/buildbot/buildbot_run.py
1467
4228
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Argument-less script to select what to run on the buildbots.""" import os import shutil import subprocess import sys BUILDBOT_DIR = os....
mit
GladeRom/android_external_chromium_org
tools/json_schema_compiler/features_h_generator.py
94
2686
# Copyright 2013 The Chromium 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 os.path from code import Code import cpp_util class HGenerator(object): def Generate(self, features, source_file, namespace): return _Generat...
bsd-3-clause
pettarin/aeneas
aeneas/audiofilemfcc.py
5
23930
#!/usr/bin/env python # coding=utf-8 # aeneas is a Python/C library and a set of tools # to automagically synchronize audio and text (aka forced alignment) # # Copyright (C) 2012-2013, Alberto Pettarin (www.albertopettarin.it) # Copyright (C) 2013-2015, ReadBeyond Srl (www.readbeyond.it) # Copyright (C) 2015-2017, A...
agpl-3.0
michael-ball/sublime-text
sublime-text-3/Packages/Python PEP8 Autoformat/libs/py33/lib2to3/fixes/fix_print.py
164
2854
# Copyright 2006 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer for print. Change: 'print' into 'print()' 'print ...' into 'print(...)' 'print ... ,' into 'print(..., end=" ")' 'print >>x, ...' into 'print(..., file=x)' No changes are appl...
unlicense
x303597316/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/gis/geos/tests/test_geos.py
89
45668
from __future__ import unicode_literals import ctypes import json import random from binascii import a2b_hex, b2a_hex from io import BytesIO from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis import memoryview from django.contrib.gis.geometry.test_data import TestDataMixin from django.utils.encodi...
apache-2.0
hynnet/hiwifi-openwrt-HC5661-HC5761
staging_dir/host/lib/python2.7/test/test_errno.py
91
1184
#! /usr/bin/env python """Test the errno module Roger E. Masse """ import errno from test import test_support import unittest std_c_errors = frozenset(['EDOM', 'ERANGE']) class ErrnoAttributeTests(unittest.TestCase): def test_for_improper_attributes(self): # No unexpected attributes should be on the ...
gpl-2.0
wxgeo/geophar
wxgeometrie/modules/tablatex/tests/test_tabsign.py
1
12983
# -*- coding: utf-8 -*- from wxgeometrie.modules.tablatex.tests.tabtestlib import assert_tableau from wxgeometrie.modules.tablatex.tabsign import tabsign from pytest import XFAIL def assert_tabsign(chaine, code_latex, **options): assert_tableau(tabsign, chaine, code_latex, **options) def test_mode_manuel():...
gpl-2.0
mihail911/nupic
examples/opf/experiments/anomaly/spatial/2field_many_novelAtEnd/description.py
40
15840
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
gpl-3.0
kevmccor/openemr
phpmyadmin/doc/_ext/configext.py
141
6618
from sphinx.domains import Domain, ObjType from sphinx.roles import XRefRole from sphinx.domains.std import GenericObject, StandardDomain from sphinx.directives import ObjectDescription from sphinx.util.nodes import clean_astext, make_refnode from sphinx.util import ws_re from sphinx import addnodes from sphinx.util.do...
gpl-3.0
xuleiboy1234/autoTitle
tensorflow/tensorflow/tools/ci_build/update_version.py
4
12685
#!/usr/bin/python # Copyright 2017 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 r...
mit
vikatory/kbengine
kbe/res/scripts/common/Lib/distutils/command/bdist_msi.py
152
35217
# Copyright (C) 2005, 2006 Martin von Löwis # Licensed to PSF under a Contributor Agreement. # The bdist_wininst command proper # based on bdist_wininst """ Implements the bdist_msi command. """ import sys, os from distutils.core import Command from distutils.dir_util import remove_tree from distutils.sysconfig import...
lgpl-3.0
suyashphadtare/sajil-final-erp
erpnext/startup/report_data_map.py
21
8867
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals # mappings for table dumps # "remember to add indexes!" data_map = { "Company": { "columns": ["name"], "conditions": ["docstatus < 2"] }, "F...
agpl-3.0
tovmeod/anaf
anaf/knowledge/forms.py
1
4996
""" Knowledge base model forms """ from django.forms import ModelForm, Form, ChoiceField from models import KnowledgeFolder, KnowledgeItem, KnowledgeCategory from anaf.core.models import Object from anaf.core.decorators import preprocess_form from django.utils.translation import ugettext as _ from django.core.urlresolv...
bsd-3-clause
newemailjdm/scipy
scipy/weave/examples/object.py
100
1679
""" Attribute and method access on Python objects from C++. Note: std::cout type operations currently crash python... Not sure what is up with this... """ from __future__ import absolute_import, print_function import scipy.weave as weave #----------------------------------------------------------------...
bsd-3-clause
salfab/CouchPotatoServer
libs/elixir/ext/perform_ddl.py
29
3315
''' DDL statements for Elixir. Entities having the perform_ddl statement, will automatically execute the given DDL statement, at the given moment: ether before or after the table creation in SQL. The 'when' argument can be either 'before-create' or 'after-create'. The 'statement' argument can be one of: - a single s...
gpl-3.0
googleapis/python-talent
google/cloud/talent_v4/services/tenant_service/transports/base.py
1
9826
# -*- coding: utf-8 -*- # Copyright 2020 Google 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...
apache-2.0
thedep2/CouchPotatoServer
libs/guessit/transfo/__init__.py
94
4117
#!/usr/bin/env python # -*- coding: utf-8 -*- # # GuessIt - A library for guessing information from filenames # Copyright (c) 2012 Nicolas Wack <wackou@gmail.com> # # GuessIt is free software; you can redistribute it and/or modify it under # the terms of the Lesser GNU General Public License as published by # the Free ...
gpl-3.0
freedesktop-unofficial-mirror/papyon
papyon/service/ContentRoaming/scenario/store_profile.py
6
3579
# -*- coding: utf-8 -*- # # Copyright (C) 2007 Johann Prieur <johann.prieur@gmail.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) an...
gpl-2.0
google/deepvariant
deepvariant/model_train.py
1
11333
# Copyright 2017 Google LLC. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # #...
bsd-3-clause
avlach/univbris-ocf
optin_manager/src/python/openflow/optin_manager/sfa/rspecs/.oldversions/sfav1.py
2
8905
from copy import deepcopy from lxml import etree from openflow.optin_manager.sfa.util.sfalogging import logger from openflow.optin_manager.sfa.util.xrn import hrn_to_urn, urn_to_hrn from openflow.optin_manager.sfa.rspecs.version import RSpecVersion from openflow.optin_manager.sfa.rspecs.elements.element import Element...
bsd-3-clause
popazerty/openblackhole-SH4
lib/python/Screens/ServiceScan.py
6
4074
import Screens.InfoBar from enigma import eServiceReference from Screens.Screen import Screen from Components.ServiceScan import ServiceScan as CScan from Components.ProgressBar import ProgressBar from Components.Label import Label from Components.ActionMap import ActionMap from Components.FIFOList import FIFOList fro...
gpl-2.0
jabesq/home-assistant
tests/components/mobile_app/test_entity.py
2
4044
"""Entity tests for mobile_app.""" # pylint: disable=redefined-outer-name,unused-import import logging _LOGGER = logging.getLogger(__name__) async def test_sensor(hass, create_registrations, webhook_client): # noqa: F401, F811, E501 """Test that sensors can be registered and updated.""" webhook_id = create_...
apache-2.0
yodalee/servo
tests/wpt/web-platform-tests/encrypted-media/polyfill/make-polyfill-tests.py
16
1180
#!/usr/bin/python import os, re, os.path, glob head = re.compile( r"^(\s*</head>)", re.MULTILINE ) runtest = re.compile( r"runTest\(\s*(\S.*?)\s*\)", re.DOTALL ) scripts = ''' <!-- Polyfill files (NOTE: These are added by auto-generation script) --> <script src=/encrypted-media/polyfill/chrome-polyfill.js></s...
mpl-2.0
NixaSoftware/CVis
venv/lib/python2.7/site-packages/pandas/tests/test_sorting.py
4
17560
import pytest from itertools import product from collections import defaultdict import warnings from datetime import datetime import numpy as np from numpy import nan import pandas as pd from pandas.core import common as com from pandas import DataFrame, MultiIndex, merge, concat, Series, compat from pandas.util impor...
apache-2.0
zstyblik/infernal-twin
build/pillow/Tests/test_file_webp_metadata.py
11
3033
from helper import unittest, PillowTestCase from PIL import Image class TestFileWebpMetadata(PillowTestCase): def setUp(self): try: from PIL import _webp except ImportError: self.skipTest('WebP support not installed') return if not _webp.HAVE_WEBPMUX:...
gpl-3.0
KhronosGroup/COLLADA-CTS
StandardDataSets/1_5/collada/library_cameras/camera/_reference/_reference_optics_orthographic_zfar_znear/_reference_optics_orthographic_zfar_znear.py
8
3605
# Copyright (c) 2012 The Khronos Group Inc. # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and /or associated documentation files (the "Materials "), to deal in the Materials without restriction, including without limitation the rights to use, copy, modify, merge, publis...
mit
Adel-Magebinary/odoo
addons/mrp_operations/report/mrp_code_barcode.py
381
1511
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
agpl-3.0
cl4rke/scikit-learn
sklearn/cluster/k_means_.py
128
54694
"""K-means clustering""" # Authors: Gael Varoquaux <gael.varoquaux@normalesup.org> # Thomas Rueckstiess <ruecksti@in.tum.de> # James Bergstra <james.bergstra@umontreal.ca> # Jan Schlueter <scikit-learn@jan-schlueter.de> # Nelle Varoquaux # Peter Prettenhofer <peter.prettenh...
bsd-3-clause
hidat/audio_pipeline
audio_pipeline/test/AudioFileTest.py
1
4157
import os import unittest import mutagen from . import TestUtil from .. import util test_files = "audio_pipeline\\test\\test_files\\audio\\tag_test_files" class TestAudioFileTags(TestUtil.TestUtilMixin): def test_artist_name(self): tag = self.format.album_artist(self.meta) self.check_af_tag(tag,...
mit
liikGit/MissionPlanner
Lib/site-packages/numpy/lib/tests/test_index_tricks.py
53
4333
from numpy.testing import * import numpy as np from numpy import ( array, ones, r_, mgrid, unravel_index, zeros, where, ndenumerate, fill_diagonal, diag_indices, diag_indices_from, s_, index_exp ) class TestUnravelIndex(TestCase): def test_basic(self): assert unravel...
gpl-3.0
awkspace/ansible
lib/ansible/modules/source_control/gitlab_project.py
10
14539
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Guillaume Martinez (lunik@tiwabbit.fr) # Copyright: (c) 2015, Werner Dijkerman (ikben@werner-dijkerman.nl) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, pri...
gpl-3.0
tomaslaz/KLMC_Analysis
thirdparty/JPype-0.5.4.2/src/python/jpype/_refdaemon.py
8
1084
#***************************************************************************** # Copyright 2004-2008 Steve Menard # # 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...
gpl-3.0