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
rmboggs/django
django/contrib/contenttypes/fields.py
21
24531
from __future__ import unicode_literals from collections import defaultdict from django.contrib.contenttypes.models import ContentType from django.core import checks from django.core.exceptions import FieldDoesNotExist, ObjectDoesNotExist from django.db import DEFAULT_DB_ALIAS, models, router, transaction from django...
bsd-3-clause
gameduell/duell
bin/mac/python2.7.9/lib/python2.7/plat-mac/macerrors.py
40
116661
# -coding=latin1- from warnings import warnpy3k warnpy3k("In 3.x, the macerrors module is removed.", stacklevel=2) svTempDisable = -32768 #svTempDisable svDisabled = -32640 #Reserve range -32640 to -32768 for Apple temp disables. fontNotOutlineErr = -32615 #bitmap font passed to routine that does outlin...
bsd-2-clause
yashodhank/frappe
frappe/commands/__init__.py
10
1452
# Copyright (c) 2015, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals, absolute_import import sys import click import cProfile import StringIO import pstats import frappe import frappe.utils from functools import wraps click.disable_unicode_lite...
mit
erwinsanchez/bitcoinwithkeccak
contrib/bitrpc/bitrpc.py
84
9663
from jsonrpc import ServiceProxy import sys import string import getpass # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:8332") e...
mit
titasakgm/brc-stock
openerp/addons/report_geraldo/lib/geraldo/site/newsite/django_1_0/tests/regressiontests/forms/error_messages.py
13
10396
# -*- coding: utf-8 -*- tests = r""" >>> from django.forms import * >>> from django.core.files.uploadedfile import SimpleUploadedFile # CharField ################################################################### >>> e = {'required': 'REQUIRED'} >>> e['min_length'] = 'LENGTH %(length)s, MIN LENGTH %(min)s' >>> e['ma...
agpl-3.0
theyaa/Impala
thirdparty/hive-1.1.0-cdh5.7.0-SNAPSHOT/lib/py/thrift/transport/THttpClient.py
71
2916
# # 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 u...
apache-2.0
eagleamon/home-assistant
tests/components/sensor/test_random.py
17
1067
"""The test for the random number sensor platform.""" import unittest from homeassistant.bootstrap import setup_component from tests.common import get_test_home_assistant class TestRandomSensor(unittest.TestCase): """Test the Random number sensor.""" def setup_method(self, method): """Set up things...
apache-2.0
analyseuc3m/ANALYSE-v1
lms/djangoapps/course_api/blocks/transformers/navigation.py
35
3103
""" TODO """ from openedx.core.lib.block_structure.transformer import BlockStructureTransformer from .block_depth import BlockDepthTransformer class DescendantList(object): """ Contain """ def __init__(self): self.items = [] class BlockNavigationTransformer(BlockStructureTransformer): ""...
agpl-3.0
DVegaCapital/zipline
zipline/data/treasuries_can.py
32
4188
# # Copyright 2013 Quantopian, 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 in wr...
apache-2.0
snyderr/robotframework
src/robot/output/librarylogger.py
3
2191
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
apache-2.0
Edu-Glez/Bank_sentiment_analysis
env/lib/python3.6/site-packages/zmq/eventloop/minitornado/platform/auto.py
50
1424
#!/usr/bin/env python # # Copyright 2011 Facebook # # 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 a...
apache-2.0
candrews/portage
pym/portage/dbapi/_SyncfsProcess.py
8
1169
# Copyright 2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 from portage import os from portage.util._ctypes import find_library, LoadLibrary from portage.util._async.ForkProcess import ForkProcess class SyncfsProcess(ForkProcess): """ Isolate ctypes usage in a subprocess, ...
gpl-2.0
MiLk/youtube-dl
youtube_dl/extractor/wimp.py
13
1787
from __future__ import unicode_literals import re from .common import InfoExtractor from .youtube import YoutubeIE class WimpIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?wimp\.com/([^/]+)/' _TESTS = [{ 'url': 'http://www.wimp.com/maruexhausted/', 'md5': 'f1acced123ecb28d9bb79f2479f2b6a...
unlicense
benoitsteiner/tensorflow
tensorflow/python/ops/math_grad.py
5
33823
# 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
amyvmiwei/kbengine
kbe/src/lib/python/Lib/traceback.py
87
11167
"""Extract, format and print information about Python stack traces.""" import linecache import sys import operator __all__ = ['extract_stack', 'extract_tb', 'format_exception', 'format_exception_only', 'format_list', 'format_stack', 'format_tb', 'print_exc', 'format_exc', 'print_exception', ...
lgpl-3.0
40223249-1/2015cd_midterm2
static/Brython3.1.1-20150328-091302/Lib/_socket.py
742
6431
"""Implementation module for socket operations. See the socket module for documentation.""" AF_APPLETALK = 16 AF_DECnet = 12 AF_INET = 2 AF_INET6 = 23 AF_IPX = 6 AF_IRDA = 26 AF_SNA = 11 AF_UNSPEC = 0 AI_ADDRCONFIG = 1024 AI_ALL = 256 AI_CANONNAME = 2 AI_NUMERICHOST = 4 AI_NUMERICSERV = 8 AI_PASSIVE = 1...
agpl-3.0
AIFDR/inasafe
test_suite.py
3
3260
# coding=utf-8 """ Test Suite for InaSAFE. Contact : etienne at kartoza dot com .. 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 ...
gpl-3.0
Venturi/oldcms
env/lib/python2.7/site-packages/cmsplugin_filer_image/migrations_django/0001_initial.py
8
4643
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings import filer.fields.file import filer.fields.image import cms.models.fields class Migration(migrations.Migration): dependencies = [ ('cms', '0003_auto_20140926_2347')...
apache-2.0
jschueller/numpy
numpy/core/tests/test_records.py
42
11668
from __future__ import division, absolute_import, print_function import sys import collections import pickle from os import path import numpy as np from numpy.compat import asbytes from numpy.testing import ( TestCase, run_module_suite, assert_, assert_equal, assert_array_equal, assert_array_almost_equal, ass...
bsd-3-clause
blarghmatey/pip
pip/_vendor/html5lib/treewalkers/__init__.py
499
5766
"""A collection of modules for iterating through different kinds of tree, generating tokens identical to those produced by the tokenizer module. To create a tree walker for a new type of tree, you need to do implement a tree walker object (called TreeWalker by convention) that implements a 'serialize' method taking a ...
mit
olexiim/edx-platform
lms/djangoapps/instructor/enrollment.py
2
13610
""" Enrollment operations for use by instructor APIs. Does not include any access control, be sure to check access before calling. """ import json from django.contrib.auth.models import User from django.conf import settings from django.core.urlresolvers import reverse from django.core.mail import send_mail from stud...
agpl-3.0
akarol/cfme_tests
cfme/tests/distributed/test_appliance_replication.py
1
12939
# -*- coding: utf-8 -*- import pytest from time import sleep from six.moves.urllib.parse import urlparse from cfme.base.ui import ServerView from cfme.common.vm import VM from cfme.infrastructure.provider import wait_for_a_provider from cfme.utils.appliance import provision_appliance from cfme.utils.appliance.impleme...
gpl-2.0
patrickhartling/protobuf
python/mox.py
603
38237
#!/usr/bin/python2.4 # # Copyright 2008 Google 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 o...
bsd-3-clause
anudr01d/anudr01d.github.io
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/_asybuiltins.py
369
27319
# -*- coding: utf-8 -*- """ pygments.lexers._asybuiltins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This file contains the asy-function names and asy-variable names of Asymptote. Do not edit the ASYFUNCNAME and ASYVARNAME sets by hand. TODO: perl/python script in Asymptote SVN similar to asy-list.pl but onl...
mit
jumpstarter-io/horizon
openstack_dashboard/dashboards/project/data_processing/jobs/tests.py
11
1751
# 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 t...
apache-2.0
Weicong-Lin/pymo-global
android/pgs4a-0.9.6/python-install/lib/python2.7/encodings/cp858.py
416
34271
""" Python Character Mapping Codec for CP858, modified from cp850. """ import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): return codecs.charmap_decod...
mit
rombie/contrail-controller
src/dns/scripts/del_virtual_dns.py
22
2658
#!/usr/bin/python # #Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import sys import argparse import ConfigParser from provision_dns import DnsProvisioner from requests.exceptions import ConnectionError class DelVirtualDns(object): def __init__(self, args_str = None): self._args = None...
apache-2.0
daenamkim/ansible
test/units/module_utils/network/nso/test_nso.py
2
6821
# Copyright (c) 2017 Cisco and/or its affiliates. # # 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
patmcb/odoo
addons/payment_paypal/models/res_company.py
422
1752
# -*- coding: utf-8 -*- from openerp.osv import fields, osv class ResCompany(osv.Model): _inherit = "res.company" def _get_paypal_account(self, cr, uid, ids, name, arg, context=None): Acquirer = self.pool['payment.acquirer'] company_id = self.pool['res.users'].browse(cr, uid, uid, context=co...
agpl-3.0
darkleons/BE
addons/mrp/stock.py
24
18483
# -*- 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
hn8841182/20150623-test02
static/Brython3.1.0-20150301-090019/Lib/_strptime.py
518
21683
"""Strptime-related classes and functions. CLASSES: LocaleTime -- Discovers and stores locale-specific time information TimeRE -- Creates regexes for pattern matching a string of text containing time information FUNCTIONS: _getlang -- Figure out what language is being used for the locale ...
gpl-3.0
BambooHR/rapid
rapid/master/controllers/api/upgrade_controller.py
1
1295
""" Copyright (c) 2015 Michael Bright and Bamboo HR 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...
apache-2.0
leilihh/novaha
nova/keymgr/single_key_mgr.py
10
2555
# Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory # 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/...
apache-2.0
DietPawel/playhistory
app/api.py
1
5417
from flask import Flask, jsonify, make_response, abort,request, send_from_directory, redirect, render_template, Response import db, datetime, csv from time import time from io import StringIO DEBUG = False #path to file to be displayed on index page INDEX = '/opt/index.html' app = Flask(__name__, static_url_path='') ...
gpl-3.0
dannyperry571/theapprentice
plugin.video.youtube/resources/lib/kodion/utils/search_history.py
26
1063
import hashlib from storage import Storage from .methods import to_utf8 class SearchHistory(Storage): def __init__(self, filename, max_items=10): Storage.__init__(self, filename, max_item_count=max_items) pass def is_empty(self): return self._is_empty() def list(self): r...
gpl-2.0
SaturdayNeighborhoodHealthClinic/osler
appointment/migrations/0001_initial.py
2
4147
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2018-08-17 03:20 from __future__ import unicode_literals import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion from django.utils.timezone import utc class Migration(migrations.Migration): in...
gpl-3.0
IntelLabs/numba
numba/cuda/tests/cudapy/test_nondet.py
5
1378
import numpy as np from numba import cuda, float32, void from numba.cuda.testing import unittest, CUDATestCase def generate_input(n): A = np.array(np.arange(n * n).reshape(n, n), dtype=np.float32) B = np.array(np.arange(n) + 0, dtype=A.dtype) return A, B class TestCudaNonDet(CUDATestCase): def test_...
bsd-2-clause
lmtierney/selenium
py/test/unit/selenium/webdriver/edge/edge_options_tests.py
7
1807
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
gmr/helper
helper/setupext.py
2
2299
"""Add a setuptools command that runs a helper-based application.""" try: from setuptools import Command except ImportError: from distutils.core import Command try: from functools import reduce except ImportError: pass # use the builtin for py 2.x from . import parser from . import platform class R...
bsd-3-clause
divya-csekar/flask-microblog-server
flask/Lib/site-packages/flask/config.py
781
6234
# -*- coding: utf-8 -*- """ flask.config ~~~~~~~~~~~~ Implements the configuration related objects. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import imp import os import errno from werkzeug.utils import import_string from ._compat import string_type...
bsd-3-clause
smallyear/linuxLearn
salt/salt/states/keyboard.py
3
2081
# -*- coding: utf-8 -*- ''' Management of keyboard layouts ============================== The keyboard layout can be managed for the system: .. code-block:: yaml us: keyboard.system Or it can be managed for XOrg: .. code-block:: yaml us: keyboard.xorg ''' def __virtual__(): ''' Only ...
apache-2.0
newerthcom/savagerebirth
libs/python-2.72/Lib/plat-mac/Carbon/CarbonEvents.py
81
17904
# Generated from 'CarbonEvents.h' def FOUR_CHAR_CODE(x): return x def FOUR_CHAR_CODE(x): return x false = 0 true = 1 keyAEEventClass = FOUR_CHAR_CODE('evcl') keyAEEventID = FOUR_CHAR_CODE('evti') eventAlreadyPostedErr = -9860 eventTargetBusyErr = -9861 eventClassInvalidErr = -9862 eventClassIncorrectErr = -9864 eventH...
gpl-2.0
angelapper/edx-platform
lms/djangoapps/survey/tests/test_utils.py
8
4057
""" Python tests for the Survey models """ from collections import OrderedDict from django.contrib.auth.models import User from django.test.client import Client from survey.models import SurveyForm from survey.utils import is_survey_required_for_course, is_survey_required_and_unanswered from xmodule.modulestore.test...
agpl-3.0
glovebx/zulip
zilencer/management/commands/populate_db.py
113
34944
from __future__ import absolute_import from django.core.management.base import BaseCommand from django.utils.timezone import now from django.contrib.sites.models import Site from zerver.models import Message, UserProfile, Stream, Recipient, Client, \ Subscription, Huddle, get_huddle, Realm, UserMessage, \ get...
apache-2.0
pratikmallya/hue
desktop/core/ext-py/Django-1.6.10/tests/test_client_regress/views.py
53
4346
import json from django.conf import settings from django.contrib.auth.decorators import login_required from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response from django.core.serializers.json import DjangoJSONEncoder from django.test.client import CONTENT_TYPE_RE fro...
apache-2.0
slozier/ironpython2
Src/StdLib/Lib/site-packages/win32/test/test_pywintypes.py
2
3632
import sys import unittest import pywintypes import time from pywin32_testutil import str2bytes, ob2memory import datetime import operator class TestCase(unittest.TestCase): def testPyTimeFormat(self): struct_current = time.localtime() pytime_current = pywintypes.Time(struct_current) # try ...
apache-2.0
JioCloud/nova
nova/api/openstack/compute/schemas/v3/admin_password.py
111
1078
# Copyright 2013 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
ktnyt/chainer
chainer/distributions/gamma.py
2
2638
import chainer from chainer.backends import cuda from chainer import distribution from chainer.functions.array import broadcast from chainer.functions.array import where from chainer.functions.math import digamma from chainer.functions.math import exponential from chainer.functions.math import lgamma class Gamma(dist...
mit
diegocortassa/TACTIC
src/context/client/tactic-api-python-4.0.api04/Tools/Scripts/ftpmirror.py
10
13254
#! /usr/bin/env python """Mirror a remote ftp subtree into a local directory tree. usage: ftpmirror [-v] [-q] [-i] [-m] [-n] [-r] [-s pat] [-l username [-p passwd [-a account]]] hostname[:port] [remotedir [localdir]] -v: verbose -q: quiet -i: interactive mode -m: macintosh ...
epl-1.0
jupyter/jupyterlab
conftest.py
4
1210
# -*- coding: utf-8 -*- # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import pytest pytest_plugins = [ "jupyter_server.pytest_plugin", "jupyterlab_server.pytest_plugin", "jupyterlab.pytest_plugin" ] def pytest_addoption(parser): """ Adds f...
bsd-3-clause
TEAM-Gummy/platform_external_chromium_org
third_party/closure_linter/closure_linter/common/matcher.py
284
2158
#!/usr/bin/env python # # Copyright 2007 The Closure Linter 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 #...
bsd-3-clause
PrasannaVenkadesh/portia
slyd/tests/test_repoman.py
14
9855
import unittest from tempfile import mkdtemp from os.path import join from shutil import rmtree from json import dumps, loads import copy from .settings import SPEC_DATA_DIR from slyd.gitstorage.repoman import Repoman def j(json): return dumps(json, sort_keys=True, indent=4) class RepomanTest(unittest.TestCas...
bsd-3-clause
0x20c24/linux-psec
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py
12980
5411
# SchedGui.py - Python extension for perf script, basic GUI code for # traces drawing and overview. # # Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com> # # This software is distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. ...
gpl-2.0
StepicOrg/Stepic-API
examples/get_courses_by_params.py
1
2154
import json import requests def get_token(): client_id = "..." client_secret = "..." auth = requests.auth.HTTPBasicAuth(client_id, client_secret) resp = requests.post('https://stepik.org/oauth2/token/', data={'grant_type': 'client_credentials'}, ...
mit
ajaali/django
django/core/handlers/base.py
234
13346
from __future__ import unicode_literals import logging import sys import types import warnings from django import http from django.conf import settings from django.core import signals, urlresolvers from django.core.exceptions import ( MiddlewareNotUsed, PermissionDenied, SuspiciousOperation, ) from django.db impo...
bsd-3-clause
hackendless/heekscnc
roughing_funcs.py
24
13251
import kurve import area from nc.nc import * import math # roughing_funcs.py- intended to be used for lathe roughing # adapted from area_funcs.py and turning.py # and possibly roughing a profile-approaching the part from the side # some globals, to save passing variables as parameters too much area_for_feed_po...
bsd-3-clause
alexforencich/python-ivi
ivi/agilent/agilentMSOX92004A.py
2
1692
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2017 Alex Forencich 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...
mit
DemocracyClub/yournextrepresentative
ynr/apps/cached_counts/views.py
1
3171
import json from django.db.models import Count from django.http import HttpResponse from django.views.generic import TemplateView from candidates.models import Ballot from elections.mixins import ElectionMixin from elections.models import Election from parties.models import Party from popolo.models import Membership ...
agpl-3.0
olt/mapproxy
mapproxy/service/ows.py
13
1357
# This file is part of the MapProxy project. # Copyright (C) 2011 Omniscale <http://omniscale.de> # # 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...
apache-2.0
rfleschenberg/djangocms-cascade
cmsplugin_cascade/migrations/0009_cascadepage.py
1
1447
# -*- coding: utf-8 -*- # Generated by Django 1.9.5 on 2016-04-07 22:03 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ('cms', '0013_urlconfrevision'), ...
mit
softak/webfaction_demo
vendor-local/lib/python/django/core/management/base.py
248
16452
""" Base classes for writing management commands (named commands which can be executed through ``django-admin.py`` or ``manage.py``). """ import os import sys from optparse import make_option, OptionParser import django from django.core.exceptions import ImproperlyConfigured from django.core.management.color import ...
bsd-3-clause
Changaco/oh-mainline
vendor/packages/gdata/src/gdata/tlslite/X509CertChain.py
238
6861
"""Class representing an X.509 certificate chain.""" from utils import cryptomath class X509CertChain: """This class represents a chain of X.509 certificates. @type x509List: list @ivar x509List: A list of L{tlslite.X509.X509} instances, starting with the end-entity certificate and with ever...
agpl-3.0
mszewczy/odoo
addons/account/wizard/account_open_closed_fiscalyear.py
237
2537
# -*- 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
jendap/tensorflow
tensorflow/contrib/distributions/python/ops/moving_stats.py
42
10125
# 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 required by applica...
apache-2.0
apache/incubator-airflow
tests/www/test_security.py
3
19165
# # 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...
apache-2.0
marratj/ansible
lib/ansible/plugins/connection/lxd.py
44
4475
# (c) 2016 Matt Clay <matt@mystile.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = """ author: Matt Clay <matt@mystile.com> conne...
gpl-3.0
golharam/StarCluster
starcluster/sshutils.py
14
32130
# Copyright 2009-2014 Justin Riley # # This file is part of StarCluster. # # StarCluster 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 # Software Foundation, either version 3 of the License, or (at your option) any # later ...
gpl-3.0
DARKPOP/external_chromium_org
build/android/avd.py
46
3735
#!/usr/bin/env python # Copyright (c) 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. """Launches Android Virtual Devices with a set configuration for testing Chrome. The script will launch a specified number of Andr...
bsd-3-clause
jakdept/pythonbook
ch4/picture_grid_test.py
1
1147
#!/usr/bin/env python3.5 ''' Automate the Boring Stuff with Python generic testing for chapter 4 projects Jack Hayhurst ''' from io import StringIO import unittest from unittest.mock import patch import picture_grid class TestPictureGrid(unittest.TestCase): '''tests the picture_grid.py script''' def test_pi...
mit
myerpengine/odoo
addons/calendar/controllers/main.py
36
3503
import simplejson import openerp import openerp.addons.web.http as http from openerp.addons.web.http import request import openerp.addons.web.controllers.main as webmain import json class meeting_invitation(http.Controller): @http.route('/calendar/meeting/accept', type='http', auth="calendar") def accept(sel...
agpl-3.0
s20121035/rk3288_android5.1_repo
external/mesa3d/scons/crossmingw.py
13
8201
"""SCons.Tool.gcc Tool-specific initialization for MinGW (http://www.mingw.org/) There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. See also http://www.scons.org/wiki/CrossCompilingMingw """ # # Copyright (c) 2001,...
gpl-3.0
eleonrk/SickRage
lib/pbr/tests/test_version.py
13
14100
# Copyright 2012 Red Hat, Inc. # Copyright 2012-2013 Hewlett-Packard Development Company, L.P. # # 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/licen...
gpl-3.0
hynnet/hiwifi-openwrt-HC5661-HC5761
staging_dir/host/lib/python2.7/idlelib/WidgetRedirector.py
143
4476
from Tkinter import * class WidgetRedirector: """Support for redirecting arbitrary widget subcommands. Some Tk operations don't normally pass through Tkinter. For example, if a character is inserted into a Text widget by pressing a key, a default Tk binding to the widget's 'insert' operation is acti...
gpl-2.0
eusi/MissionPlanerHM
Lib/site-packages/scipy/constants/__init__.py
55
1121
""" Various useful constants and conversion formulae Modules ------- .. autosummary:: :toctree: generated/ codata - CODATA Recommended Values of Fundamental Physical Const (2006) constants - Collection of physical constants and conversion factors Functions --------- .. autosummary:: :toctree: generated...
gpl-3.0
indico/indico
indico/modules/rb/operations/rooms.py
4
9012
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from datetime import date, datetime, time from dateutil.relativedelta import relativedelta from flask imp...
mit
pschmitt/home-assistant
homeassistant/components/radarr/sensor.py
16
7642
"""Support for Radarr.""" from datetime import datetime, timedelta import logging import time from pytz import timezone import requests import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from homeassistant.const import ( CONF_API_KEY, CONF_HOST, CONF_MONITORED_CONDITIONS,...
apache-2.0
andyrooger/OAT
src/interactive/commandui.py
1
6086
""" Command based UI for the obfuscator. """ # OAT - Obfuscation and Analysis Tool # Copyright (C) 2011 Andy Gurden # # This file is part of OAT. # # OAT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Softwar...
gpl-3.0
jeffrey4l/nova
nova/api/openstack/compute/contrib/used_limits.py
62
3281
# Copyright 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 ...
apache-2.0
jeffery9/mixprint_addons
project_long_term/wizard/project_compute_tasks.py
63
2545
# -*- 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
kleientertainment/ds_mod_tools
pkg/win32/Python27/Lib/htmlentitydefs.py
65
18327
"""HTML character entity references.""" # maps the HTML entity name to the Unicode codepoint name2codepoint = { 'AElig': 0x00c6, # latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1 'Aacute': 0x00c1, # latin capital letter A with acute, U+00C1 ISOlat1 'Acirc': 0x00c2, # latin...
mit
skevy/django
tests/regressiontests/utils/text.py
51
2200
import unittest from django.utils import text class TestUtilsText(unittest.TestCase): def test_truncate_words(self): self.assertEqual(u'The quick brown fox jumped over the lazy dog.', text.truncate_words(u'The quick brown fox jumped over the lazy dog.', 10)) self.assertEqual(u'The qui...
bsd-3-clause
fafaman/django
tests/db_functions/models.py
245
1332
""" Tests for built in Function expressions. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Author(models.Model): name = models.CharField(max_length=50) alias = models.CharField(max_leng...
bsd-3-clause
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Tools/pynche/TypeinViewer.py
116
6102
"""TypeinViewer class. The TypeinViewer is what you see at the lower right of the main Pynche widget. It contains three text entry fields, one each for red, green, blue. Input into these windows is highly constrained; it only allows you to enter values that are legal for a color axis. This usually means 0-255 for de...
apache-2.0
ThePletch/ansible
lib/ansible/modules/network/ipinfoio_facts.py
39
4067
#!/usr/bin/python # # (c) 2016, Aleksei Kostiuk <unitoff@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 o...
gpl-3.0
hiepthai/django-activity-stream
actstream/migrations/0001_initial.py
8
7969
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models from actstream.compat import user_model_label class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Follow' db.create_table('actstream_follow', ( ...
bsd-3-clause
jbaiter/spreads
spreadsplug/intervaltrigger.py
2
2100
# -*- coding: utf-8 -*- # Copyright (C) 2014 Johannes Baiter <johannes.baiter@gmail.com> # # 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 # License, or (at your ...
agpl-3.0
kumar303/rockit
vendor-local/boto/ec2/instance.py
2
17445
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # # 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 # w...
bsd-3-clause
jsquare/hikeplanner
hikes/views.py
1
4162
from django.http import HttpResponse, HttpResponseRedirect, HttpResponseNotFound from hikes.models import Hike from django.shortcuts import render_to_response, render from django.contrib.gis import forms from django.contrib import auth from django.contrib.auth.forms import UserCreationForm from django.core.urlresolvers...
gpl-2.0
da-nrw/DNSCore
3rdParty/fido/fido/argparselocal.py
6
87524
# -*- coding: utf-8 -*- # Copyright © 2006-2009 Steven J. Bethard <steven.bethard@gmail.com>. # # 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...
gpl-3.0
bdyetton/prettychart
website/addons/forward/tests/test_models.py
44
1805
# -*- coding: utf-8 -*- from nose.tools import * # PEP8 asserts from modularodm.exceptions import ValidationError from tests.base import OsfTestCase from website.addons.forward.tests.factories import ForwardSettingsFactory class TestSettingsValidation(OsfTestCase): def setUp(self): super(TestSettings...
apache-2.0
weitengchu/rt-thread
components/external/freetype/src/tools/docmaker/formatter.py
132
6019
# # formatter.py # # Convert parsed content blocks to a structured document (library file). # # Copyright 2002, 2004, 2007, 2008, 2014 by # David Turner. # # This file is part of the FreeType project, and may only be used, # modified, and distributed under the terms of the FreeType project # license, LICENSE.T...
gpl-2.0
nccgroup/typofinder
howoldisdomain/whois.py
2
10182
# # Typofinder for domain typo discovery # # Released as open source by NCC Group Plc - http://www.nccgroup.com/ # # Simple whois query function # # Based on RFC3912 # # Developed by Matt Summers, matt dot summers at nccgroup dot com # and Stephen Tomkinson # # http://www.github.com/nccgroup/typofinder # #...
agpl-3.0
r03ert0/ldsc
test/test_sumstats.py
3
16976
from __future__ import division import ldscore.sumstats as s import ldscore.parse as ps import unittest import numpy as np import pandas as pd from pandas.util.testing import assert_series_equal, assert_frame_equal from nose.tools import * from numpy.testing import assert_array_equal, assert_array_almost_equal, assert_...
gpl-3.0
PaulVanSchayck/irods
tests/pydevtest/test_resource_types.py
2
222736
import commands import getpass import os import re import shutil import subprocess import sys if sys.version_info < (2, 7): import unittest2 as unittest else: import unittest import configuration import lib from resource_suite import ResourceSuite, ResourceBase from test_chunkydevtest import ChunkyDevTest c...
bsd-3-clause
dreal/dreal
benchmarks/network/thermostat/thermostat-double-i-p.py
11
3580
from gen import * ########## # shared # ########## flow_var[0] = """ (declare-fun tau () Real) """ flow_dec[0] = """ (define-ode flow_1 ((= d/dt[tau] 1))) """ state_dec[0] = """ (declare-fun time_{0} () Real) (declare-fun tau_{0}_0 () Real) (declare-fun tau_{0}_t () Real) """ state_val[0] = """ (assert (<= 0 ...
gpl-2.0
fingeronthebutton/robotframework
src/robot/variables/variables.py
20
2701
# Copyright 2008-2015 Nokia Solutions and Networks # # 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 l...
apache-2.0
ashleyh/zoo
callgraph/clang/cindex.py
1
42680
#===- cindex.py - Python Indexing Library Bindings -----------*- python -*--===# # # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # #===--------------------------------------------------------------...
gpl-3.0
blakfeld/ansible
lib/ansible/plugins/action/script.py
15
4083
# (c) 2012, Michael DeHaan <michael.dehaan@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 lat...
gpl-3.0
Y3K/django
tests/prefetch_related/models.py
255
7972
import uuid from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.encoding import python_2_unicode_compatible # Basic tests @python_2_unicode_compatible class Author(models....
bsd-3-clause
BryanCutler/spark
python/pyspark/tests/test_readwrite.py
23
14386
# # 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 us...
apache-2.0