repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
RossBrunton/django
django/core/management/commands/check.py
316
1892
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.apps import apps from django.core import checks from django.core.checks.registry import registry from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = "Checks the entire Django project for p...
bsd-3-clause
wfnex/openbras
src/VPP/test/test_vxlan.py
2
9043
#!/usr/bin/env python import socket from util import ip4n_range import unittest from framework import VppTestCase, VppTestRunner from template_bd import BridgeDomain from scapy.layers.l2 import Ether from scapy.layers.inet import IP, UDP from scapy.layers.vxlan import VXLAN from scapy.utils import atol class TestVx...
bsd-3-clause
ncliam/serverpos
openerp/addons/l10n_be_intrastat/l10n_be_intrastat.py
258
7828
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (C) 2014-2015 Odoo S.A. <http://www.odoo.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
davidbrazdil/nacl
tools/process_oprofile_x86_64.py
12
17097
#!/usr/bin/python # Copyright (c) 2011 The Native Client Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Post-process Oprofile logs for x86-64 nexes running under sel_ldr. Maps event counts in the "anon" region, to the appropriate...
bsd-3-clause
ivanhorvath/openshift-tools
openshift/installer/vendored/openshift-ansible-3.9.14-1/roles/installer_checkpoint/callback_plugins/installer_checkpoint.py
24
6571
"""Ansible callback plugin to print a summary completion status of installation phases. """ from datetime import datetime from ansible.plugins.callback import CallbackBase from ansible import constants as C class CallbackModule(CallbackBase): """This callback summarizes installation phase status.""" CALLBACK...
apache-2.0
philipz/PyCV-time
opencv-official-samples/2.4.9/demo.py
7
5157
#!/usr/bin/env python ''' Sample-launcher application. ''' import Tkinter as tk from ScrolledText import ScrolledText from glob import glob from common import splitfn import webbrowser from subprocess import Popen #from IPython.Shell import IPShellEmbed #ipshell = IPShellEmbed() exclude_list = ['demo', 'common'] c...
mit
biskett/mic
tests/test_archive.py
5
26592
""" It is used to test mic/archive.py """ import os import shutil import unittest from mic import archive class ArchiveTest(unittest.TestCase): """ test pulic methods in archive.py """ def setUp(self): """Create files and directories for later use""" self.relative_file = './sdfb...
gpl-2.0
creeptonik/videojs-live-card
node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py
1284
100329
# Copyright (c) 2013 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. import collections import copy import hashlib import json import multiprocessing import os.path import re import signal import subprocess import sys import gyp imp...
mit
Bashar/django
django/core/cache/backends/memcached.py
11
7035
"Memcached cache backend" import time import pickle from django.core.cache.backends.base import BaseCache, DEFAULT_TIMEOUT from django.utils import six from django.utils.deprecation import RenameMethodsBase, RemovedInDjango19Warning from django.utils.encoding import force_str from django.utils.functional import cache...
bsd-3-clause
abdhaleegit/avocado-misc-tests
io/disk/ioping.py
4
2385
#!/usr/bin/env python # # 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. # # This program is distributed in the hope that...
gpl-2.0
SivagnanamCiena/ciscoconfparse
ciscoconfparse/ccp_util.py
3
26161
from collections import MutableSequence import itertools import sys import re import os from protocol_values import ASA_TCP_PORTS, ASA_UDP_PORTS from dns.exception import DNSException from dns.resolver import Resolver from dns import reversename, query if sys.version_info[0]<3: from ipaddr import IPv4Network, IPv...
gpl-3.0
agentfog/qiime
qiime/filter.py
15
26099
#!/usr/bin/env python # File created on 18 May 2010 from __future__ import division __author__ = "Greg Caporaso" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["Greg Caporaso", "Will Van Treuren", "Daniel McDonald", "Jai Ram Rideout", "Yoshiki Vazquez Baeza"] __license__ = "GPL" __ve...
gpl-2.0
viaregio/cartridge
cartridge/shop/tests.py
2
20578
from datetime import timedelta from decimal import Decimal from operator import mul from django.core.urlresolvers import reverse from django.test import TestCase from django.test.client import RequestFactory from django.utils.timezone import now from django.utils.unittest import skipUnless from mezzanine.conf import ...
bsd-2-clause
venkatant/msproject
flow_statistics.py
1
7329
__author__ = 'venkat' from header import * from json_http_handler import * class FlowWindow: bottom_frame = 0 bottom_row = 0 class FlowTable: def __init__(self): self.dest_ip = None self.dest_mask = None self.dest_mac = None self.dest_port = None self.dest_...
gpl-2.0
ninotoshi/tensorflow
tensorflow/contrib/learn/python/learn/tests/test_custom_decay.py
7
2270
# Copyright 2015-present The Scikit Flow 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 require...
apache-2.0
rosenvladimirov/odoo-fixes
stock_account/wizard/stock_change_standard_price.py
315
3824
# -*- 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
tracyjacks/PyMetWeather
pymetweather/pymetweather.py
1
13941
import curses from datetime import date, timedelta import locale from textwrap import fill from pymetweather.forecasts import WeatherForecast from pymetweather.get_args import get_command_line_args, get_config_args locale.setlocale(locale.LC_ALL, '') class WeatherPrinter(object): def __init__(self, forecast, sc...
gpl-2.0
ktnyt/chainer
chainer/testing/distribution_test.py
2
12804
import functools import unittest import numpy import chainer from chainer.backends import cuda from chainer.testing import array from chainer.testing import attr from chainer import utils def skip_not_in_test_target(test_target): def decorator(f): @functools.wraps(f) def new_f(self, *args, **kwa...
mit
jcarva/digital_image_processing_assignments
spatial_domain/python/task1_6.py
1
1722
# coding=UTF-8 # 1.6. Limiarização aplicada sobre Y, com limiar m e duas opções: a) m # escolhido pelo usuáio; b) m = média de valores da banda Y; import numpy as np import utils import color def main(): image = utils.load_image('lenna.png') yiq_image = color.rgb2yiq(image) grayscale_image = yiq_image[:...
gpl-3.0
PXke/invenio
invenio/legacy/websubmit/functions/Create_Modify_Interface.py
1
12922
## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 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...
gpl-2.0
quonb/atom-generator
atom_generator/video.py
1
2028
import re class YouTube(object): def __init__(self, url=None): self._video_id = self._extract_id(url) def __call__(self, url=False): if url is None or url: self._video_id = self._extract_id(url) return self._video_id def _extract_id(self, url=None): """Extract...
apache-2.0
RockchipOpensourceCommunity/popmetal-kernel-3.14
tools/perf/scripts/python/futex-contention.py
11261
1486
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
gpl-2.0
orlov-vo/mtasa
vendor/google-breakpad/src/tools/gyp/test/ninja/solibs_avoid_relinking/gyptest-solibs-avoid-relinking.py
216
1427
#!/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. """ Verify that relinking a solib doesn't relink a dependent executable if the solib's public API hasn't changed. """ import os import sys ...
gpl-3.0
readevalprint/mezzanine
mezzanine/utils/cache.py
5
3908
from __future__ import unicode_literals from hashlib import md5 from time import time from django.core.cache import cache from django.utils.lru_cache import lru_cache from django.utils.cache import _i18n_cache_key_suffix from mezzanine.conf import settings from mezzanine.utils.sites import current_site_id from mezza...
bsd-2-clause
kc-lab/dms2dfe
dms2dfe/lib/io_data_files.py
2
14758
#!usr/bin/python # Copyright 2016, Rohan Dandage <rraadd_8@hotmail.com,rohan@igib.in> # This program is distributed under General Public License v. 3. """ ================================ ``io_data_files`` ================================ """ import sys import pandas as pd from os.path import exists,basename,abspat...
gpl-3.0
citrix-openstack-build/neutron-vpnaas
tools/install_venv.py
102
2304
#!/usr/bin/env python # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2010 OpenStack Foundation. # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); yo...
apache-2.0
jsjohnst/tornado
tornado/httpserver.py
96
11915
#!/usr/bin/env python # # Copyright 2009 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
helifu/kudu
python/kudu/tests/test_scanner.py
2
14089
# # 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
nikolhm/Pokus
knownpaths.py
1
9583
import ctypes, sys from ctypes import windll, wintypes from uuid import UUID class GUID(ctypes.Structure): # [1] _fields_ = [ ("Data1", wintypes.DWORD), ("Data2", wintypes.WORD), ("Data3", wintypes.WORD), ("Data4", wintypes.BYTE * 8) ] def __init__(self, uuid_): ...
mit
Mustard-Systems-Ltd/pyzmq
perf/perf.py
6
5316
#!/usr/bin/env python # coding: utf-8 # Copyright (C) PyZMQ Developers # Distributed under the terms of the Modified BSD License. # # Some original test code Copyright (c) 2007-2010 iMatix Corporation, # Used under LGPLv3 import argparse import time from multiprocessing import Process import zmq def parse_args(a...
bsd-3-clause
martinbuc/missionplanner
Lib/lib2to3/pgen2/parse.py
68
8254
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Parser engine for the grammar tables generated by pgen. The grammar table must be loaded first. See Parser/parser.c in the Python distribution for additional info on how this parsing engine...
gpl-3.0
AndreaCrotti/offlineimap
docs/dev-doc-src/conf.py
11
6621
# -*- coding: utf-8 -*- # # pyDNS documentation build configuration file, created by # sphinx-quickstart on Tue Feb 2 10:00:47 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. # # All c...
gpl-2.0
rolandmansilla/microblog
flask/lib/python2.7/site-packages/flask/ctx.py
776
14266
# -*- coding: utf-8 -*- """ flask.ctx ~~~~~~~~~ Implements the objects required to keep the context. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import sys from functools import update_wrapper from werkzeug.excep...
bsd-3-clause
jaysonkelly/Marlin
buildroot/share/scripts/createTemperatureLookupMarlin.py
89
6252
#!/usr/bin/python """Thermistor Value Lookup Table Generator Generates lookup to temperature values for use in a microcontroller in C format based on: http://en.wikipedia.org/wiki/Steinhart-Hart_equation The main use is for Arduino programs that read data from the circuit board described here: http://reprap.org/wiki/...
gpl-3.0
tanghaibao/jcvi
jcvi/projects/vanilla.py
1
11915
#!/usr/bin/env python # -*- coding: UTF-8 -*- """ Plotting scripts for the vanilla genome paper. """ import logging import sys from jcvi.apps.base import ActionDispatcher, OptionParser from jcvi.compara.synteny import AnchorFile, check_beds from jcvi.formats.base import get_number from jcvi.formats.bed import Bed fro...
bsd-2-clause
TNosredna/CouchPotatoServer
libs/requests/packages/charade/euckrprober.py
2931
1675
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
gpl-3.0
xuegang/gpdb
src/test/tinc/tincrepo/mpp/gpdb/tests/storage/walrepl/gpstart/test_gpstart.py
9
8432
""" Copyright (C) 2004-2015 Pivotal Software, Inc. All rights reserved. This program and the accompanying materials are made available under the terms of the 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 ...
apache-2.0
floraXiao/gooderp_addons
buy/wizard/buy_order_track_wizard.py
6
4873
# -*- coding: utf-8 -*- from datetime import date from odoo import models, fields, api from odoo.exceptions import UserError class BuyOrderTrackWizard(models.TransientModel): _name = 'buy.order.track.wizard' _description = u'采购订单跟踪表向导' @api.model def _default_date_start(self): return self.en...
agpl-3.0
octavioturra/aritial
google_appengine/google/appengine/tools/dev_appserver_upload.py
5
10654
#!/usr/bin/env python # # Copyright 2007 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...
apache-2.0
ovidiu-beldie/closure-linter-tweaked
closure_linter/scopeutil.py
84
5414
#!/usr/bin/env python # # Copyright 2012 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 # #...
apache-2.0
VasuAgrawal/tartanHacks2015
site/flask/lib/python2.7/site-packages/pbr/tests/test_version.py
41
1137
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 Licen...
mit
dataxu/ansible
lib/ansible/modules/network/f5/bigip_virtual_server.py
25
53942
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
RichIsMyName/PicklingToolsRepo
PythonModule/ptools/xmldumper_defs.py
3
3487
# Options for dictionaries -> XML # If XML attributes are being folded up, then you may # want to prepend a special character to distinguish attributes # from nested tags: an underscore is the usual default. If # you don't want a prepend char, use XML_DUMP_NO_PREPEND option XML_PREPEND_CHAR = '_' # When dumpin...
bsd-3-clause
cwacek/python-jsonschema-objects
python_jsonschema_objects/wrapper_types.py
1
11522
import collections import logging import six from python_jsonschema_objects import util from python_jsonschema_objects.validators import registry, ValidationError from python_jsonschema_objects.util import lazy_format as fmt logger = logging.getLogger(__name__) class ArrayWrapper(collections.abc.MutableSequence): ...
mit
0x0all/scikit-learn
examples/plot_multioutput_face_completion.py
330
3019
""" ============================================== Face completion with a multi-output estimators ============================================== This example shows the use of multi-output estimator to complete images. The goal is to predict the lower half of a face given its upper half. The first column of images sho...
bsd-3-clause
cloud9209/cloud9209_flask
lib/bs4/tests/test_lxml.py
273
2965
"""Tests to ensure that the lxml tree builder generates good trees.""" import re import warnings try: import lxml.etree LXML_PRESENT = True LXML_VERSION = lxml.etree.LXML_VERSION except ImportError, e: LXML_PRESENT = False LXML_VERSION = (0,) if LXML_PRESENT: from bs4.builder import LXMLTreeB...
apache-2.0
franciscogmm/FinancialAnalysisUsingNLPandMachineLearning
SentimentAnalysis - Polarity - Domain Specific Lexicon.py
1
2667
import csv import pandas as pd import nltk from nltk import FreqDist,ngrams from nltk.corpus import stopwords import string from os import listdir from os.path import isfile, join def ngram_list(file,n): f = open(file,'rU') raw = f.read() raw = raw.replace('\n',' ') #raw = raw.decode('utf8') #raw =...
mit
oihane/server-tools
auth_dynamic_groups/model/res_users.py
14
2115
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Therp BV (<http://therp.nl>). # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
DocBO/mubosym
mubosym/simple_tire_model_interface.py
2
8005
# -*- coding: utf-8 -*- """ simple_tire_model_interface =========================== Created on Wed May 27 18:02:53 2015 @author: oliver """ import sys from sympy import lambdify, symbols import numpy as np b = [1.5,0.,1100.,0.,300.,0.,0.,0.,-2.,0.,0.,0.,0.,0.] a = [1.4,0.,1100.,1100.,10.,0.,0.,-2.,0.,0.,0.,...
mit
mdaif/olympia
apps/landfill/tests/test_categories.py
15
1025
# -*- coding: utf-8 -*- from nose.tools import eq_, ok_ import amo import amo.tests from addons.models import Category from constants.applications import APPS from landfill.categories import generate_categories class CategoriesTests(amo.tests.TestCase): def test_categories_themes_generation(self): data ...
bsd-3-clause
alex/raven
raven/handlers/logging.py
3
4470
""" raven.handlers.logging ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import datetime import logging import sys import traceback from raven.base import Client from raven.utils.e...
bsd-3-clause
timokoola/finnkinotxt
botocore/vendored/requests/packages/urllib3/poolmanager.py
678
9406
import logging try: # Python 3 from urllib.parse import urljoin except ImportError: from urlparse import urljoin from ._collections import RecentlyUsedContainer from .connectionpool import HTTPConnectionPool, HTTPSConnectionPool from .connectionpool import port_by_scheme from .exceptions import LocationValue...
apache-2.0
sassoftware/mint
mint/django_rest/rbuilder/querysets/views/v1/views.py
1
8001
#!/usr/bin/python # # Copyright (c) SAS Institute 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...
apache-2.0
dneg/cortex
python/IECoreMaya/TransformationMatrixParameterUI.py
12
5608
########################################################################## # # Copyright (c) 2010, Image Engine Design 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: # # * Redistribu...
bsd-3-clause
simonpatrick/bite-project
deps/gdata-python-client/tests/gdata_tests/client_smoke_test.py
39
1743
#!/usr/bin/env python # # Copyright (C) 2010 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 ...
apache-2.0
msabramo/ansible
lib/ansible/modules/cloud/google/gcdns_record.py
49
28445
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2015 CallFire Inc. # # This file is part of Ansible. # # 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...
gpl-3.0
Anonymike/pasta-bot
plugins/google_broken.py
1
3457
import random from util import hook, http, text, database, web import re def api_get(kind, query): """Use the RESTful Google Search API""" url = 'http://ajax.googleapis.com/ajax/services/search/%s?' \ 'v=1.0&safe=off' return http.get_json(url % kind, q=query) @hook.command('search') @hook.comma...
gpl-3.0
rhurkes/chasegame
venv/lib/python2.7/site-packages/flask/sessions.py
428
13107
# -*- coding: utf-8 -*- """ flask.sessions ~~~~~~~~~~~~~~ Implements cookie based sessions based on itsdangerous. :copyright: (c) 2012 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import uuid import hashlib from base64 import b64encode, b64decode from datetime import dateti...
mit
aequitas/home-assistant
homeassistant/components/homematicip_cloud/sensor.py
2
12041
"""Support for HomematicIP Cloud sensors.""" import logging from homematicip.aio.device import ( AsyncBrandSwitchMeasuring, AsyncFullFlushSwitchMeasuring, AsyncHeatingThermostat, AsyncHeatingThermostatCompact, AsyncLightSensor, AsyncMotionDetectorIndoor, AsyncMotionDetectorOutdoor, AsyncMotionDetectorP...
apache-2.0
boshnivolo/TIY-GitHub
node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py
395
65937
#!/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. """Unit tests for the MSVSSettings.py file.""" import StringIO import unittest import gyp.MSVSSettings as MSVSSettings class TestSequence...
mit
vhaupert/mitmproxy
test/pathod/tservers.py
4
3619
import os import tempfile import re import shutil import requests import io import urllib from mitmproxy.net import tcp from mitmproxy.utils import data from pathod import language from pathod import pathoc from pathod import pathod from pathod import test from pathod.pathod import CA_CERT_NAME cdata = data.Data(_...
mit
doduytrung/odoo-8.0
addons/project_timesheet/__openerp__.py
260
2151
# -*- 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
enthought/traitsgui
enthought/pyface/message_dialog.py
3
1716
#------------------------------------------------------------------------------ # Copyright (c) 2005, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
bsd-3-clause
Asquera/bigcouch
couchjs/scons/scons-local-2.0.1/SCons/Tool/sunf90.py
61
2180
"""SCons.Tool.sunf90 Tool-specific initialization for sunf90, the Sun Studio F90 compiler. 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. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 20...
apache-2.0
rally12/deep-learning
language-translation/problem_unittests.py
98
13080
import numpy as np import tensorflow as tf import itertools import collections import helper def _print_success_message(): print('Tests Passed') def test_text_to_ids(text_to_ids): test_source_text = 'new jersey is sometimes quiet during autumn , and it is snowy in april .\nthe united states is usually chill...
mit
earshel/PokeyPyManager
POGOProtos/Networking/Responses/CollectDailyDefenderBonusResponse_pb2.py
16
5285
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Networking/Responses/CollectDailyDefenderBonusResponse.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as...
mit
LeeKamentsky/CellProfiler
cellprofiler/modules/tests/test_identifyprimaryobjects.py
2
158497
"""test_identifyprimautomatic.py: test the IdentifyPrimAutomatic module CellProfiler is distributed under the GNU General Public License. See the accompanying file LICENSE for details. Copyright (c) 2003-2009 Massachusetts Institute of Technology Copyright (c) 2009-2015 Broad Institute All rights reserved. Please se...
gpl-2.0
catapult-project/catapult-csm
third_party/gsutil/third_party/httplib2/python2/httplib2/__init__.py
29
69586
from __future__ import generators """ httplib2 A caching http interface that supports ETags and gzip to conserve bandwidth. Requires Python 2.3 or later Changelog: 2007-08-18, Rick: Modified so it's able to use a socks proxy if needed. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright...
bsd-3-clause
surgebiswas/poker
PokerBots_2017/Johnny/scipy/weave/ext_tools.py
92
17820
from __future__ import absolute_import, print_function import os import sys import re from . import catalog from . import build_tools from . import converters from . import base_spec class ext_function_from_specs(object): def __init__(self,name,code_block,arg_specs): self.name = name self.arg_sp...
mit
nitin-cherian/Webapps
SimpleIsBetterThanComplex.com/myproject/.env/lib/python3.5/site-packages/django/contrib/messages/api.py
48
3147
from django.contrib.messages import constants from django.contrib.messages.storage import default_storage __all__ = ( 'add_message', 'get_messages', 'get_level', 'set_level', 'debug', 'info', 'success', 'warning', 'error', 'MessageFailure', ) class MessageFailure(Exception): pass def add_messag...
mit
averagehat/scikit-bio
skbio/io/format/fasta.py
3
38087
""" FASTA/QUAL format (:mod:`skbio.io.format.fasta`) ================================================ .. currentmodule:: skbio.io.format.fasta The FASTA file format (``fasta``) stores biological (i.e., nucleotide or protein) sequences in a simple plain text format that is both human-readable and easy to parse. The fi...
bsd-3-clause
gitlabhq/pygments.rb
vendor/pygments-main/pygments/filter.py
365
2071
# -*- coding: utf-8 -*- """ pygments.filter ~~~~~~~~~~~~~~~ Module that implements the default filter. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ def apply_filters(stream, filters, lexer=None): """ Use this method to app...
mit
SPACEDAC7/TrabajoFinalGrado
StaticAnalyzer/tools/enjarify/enjarify/dalvikformats.py
30
4154
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
gpl-3.0
Himon-SYNCRAFT/taskplus
tests/core/actions/test_get_task_status_details.py
1
3408
from unittest import mock from taskplus.core.actions import (GetTaskStatusDetailsAction, GetTaskStatusDetailsRequest) from taskplus.core.domain import TaskStatus from taskplus.core.shared.response import ResponseFailure def test_get_status_details_action(): status = mock.Mock()...
bsd-3-clause
TOCyna/tabelinha
flask/lib/python2.7/site-packages/werkzeug/test.py
32
34230
# -*- coding: utf-8 -*- """ werkzeug.test ~~~~~~~~~~~~~ This module implements a client to WSGI applications for testing. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import sys import mimetypes from time import time from...
gpl-2.0
ppmt/Crust
flask/lib/python2.7/site-packages/setuptools/depends.py
462
6370
import sys import imp import marshal from imp import PKG_DIRECTORY, PY_COMPILED, PY_SOURCE, PY_FROZEN from distutils.version import StrictVersion from setuptools import compat __all__ = [ 'Require', 'find_module', 'get_module_constant', 'extract_constant' ] class Require: """A prerequisite to building or inst...
gpl-2.0
kennydude/django-rest-framework
tests/test_htmlrenderer.py
79
4406
from __future__ import unicode_literals import django.template.loader from django.conf.urls import url from django.core.exceptions import PermissionDenied from django.http import Http404 from django.template import Template, TemplateDoesNotExist from django.test import TestCase from django.utils import six from rest_...
bsd-2-clause
codeforamerica/comport
migrations/versions/0d78d545906f_.py
1
1135
"""Add 'is_public' flags for datasets Revision ID: 0d78d545906f Revises: 6d30846080b2 Create Date: 2016-06-27 15:30:14.415519 """ # revision identifiers, used by Alembic. revision = '0d78d545906f' down_revision = '6d30846080b2' from alembic import op import sqlalchemy as sa def upgrade(): op.add_column('depar...
bsd-3-clause
alihalabyah/flexx
exp/wgui.py
22
5614
# -*- coding: utf-8 -*- # Copyright (c) 2014, Almar Klein """ Little experiment for the purpose for creating a GUI toolkit based on web technologies like HTML/CSS/JS. Applications build with such a GUI can be easily deployed on all platforms and also run in a web browser... Usefull links: * http://www.aclevername.c...
bsd-2-clause
thomaskeck/root
interpreter/llvm/src/examples/Kaleidoscope/MCJIT/cached/genk-timing.py
214
10499
#!/usr/bin/env python import sys import random class TimingScriptGenerator: """Used to generate a bash script which will invoke the toy and time it""" def __init__(self, scriptname, outputname): self.timeFile = outputname self.shfile = open(scriptname, 'w') self.shfile.write("echo \"\"...
lgpl-2.1
forseti-security/forseti-security
google/cloud/forseti/common/gcp_api/admin_directory.py
1
10459
# Copyright 2017 The Forseti Security 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 ap...
apache-2.0
kwlzn/pants
src/python/pants/base/payload_field.py
8
4251
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import json from abc...
apache-2.0
shaistaansari/django
django/views/i18n.py
82
11102
import gettext as gettext_module import importlib import json import os from django import http from django.apps import apps from django.conf import settings from django.core.urlresolvers import translate_url from django.template import Context, Engine from django.utils import six from django.utils._os import upath fr...
bsd-3-clause
qwertyjune/BethSaidaBible
venv/lib/python2.7/site-packages/pip/_vendor/packaging/__about__.py
257
1073
# Copyright 2014 Donald Stufft # # 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, so...
gpl-3.0
leiferikb/bitpop
build/third_party/twisted_10_2/twisted/persisted/sob.py
60
6366
# -*- test-case-name: twisted.test.test_sob -*- # Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. # """ Save and load Small OBjects to and from files, using various formats. Maintainer: Moshe Zadka """ import os, sys try: import cPickle as pickle except ImportError: import pic...
gpl-3.0
linearregression/socorro
socorro/cron/jobs/truncate_partitions.py
9
1248
# 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/. from configman import Namespace from crontabber.base import BaseCronApp from crontabber.mixins import ( with_postgre...
mpl-2.0
mollstam/UnrealPy
UnrealPyEmbed/Source/Python/Lib/python27/test/test_datetime.py
12
134698
"""Test date/time type. See http://www.zope.org/Members/fdrake/DateTimeWiki/TestCases """ from __future__ import division import sys import pickle import cPickle import unittest from test import test_support from datetime import MINYEAR, MAXYEAR from datetime import timedelta from datetime import tzinfo from datetim...
mit
sje397/p2pool
wstools/Utility.py
292
50865
# Copyright (c) 2003, The Regents of the University of California, # through Lawrence Berkeley National Laboratory (subject to receipt of # any required approvals from the U.S. Dept. of Energy). All rights # reserved. # # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved. # # This software is ...
gpl-3.0
madgik/exareme
Exareme-Docker/src/exareme/exareme-tools/madis/src/functionslocal/vtable/dummycoding.py
1
2450
import setpath import functions import json registered=True def convert(data): if isinstance(data, basestring): return str(data) elif isinstance(data, collections.Mapping): return dict(map(convert, data.iteritems())) elif isinstance(data, collections.Iterable): return type(data)(map...
mit
sloria/TextBlob
tests/test_inflect.py
2
1177
from nose.tools import assert_equals, assert_true from unittest import TestCase from textblob.en.inflect import ( plural_categories, singular_ie, singular_irregular, singular_uncountable, singular_uninflected, singularize, pluralize ) class InflectTestCase(TestCase): def s_singular_...
mit
aquajach/sample_teach
node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py
1835
1748
#!/usr/bin/env python # Copyright (c) 2011 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. """These functions are executed via gyp-flock-tool when using the Makefile generator. Used on systems that don't have a built-in flock.""" ...
mit
bjornlevi/5thpower
nefndaralit/env/lib/python3.6/site-packages/requests/cookies.py
133
18430
# -*- coding: utf-8 -*- """ requests.cookies ~~~~~~~~~~~~~~~~ Compatibility code to be able to use `cookielib.CookieJar` with requests. requests.utils imports from here, so be careful with imports. """ import copy import time import calendar from ._internal_utils import to_native_string from .compat import cookiel...
mit
ahaym/eden
modules/s3db/cms.py
4
67968
# -*- coding: utf-8 -*- """ Sahana Eden Content Management System Model @copyright: 2012-2015 (c) Sahana Software Foundation @license: MIT 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 ...
mit
ansible/ansible-modules-extras
windows/win_iis_webapppool.py
11
3662
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Henrik Wallström <henrik@wallstroms.nu> # # 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 t...
gpl-3.0
Tennyson53/SUR
magnum/tests/unit/common/cert_manager/test_cert_manager.py
6
1550
# Copyright 2015 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 by applicable l...
apache-2.0
0x0all/SASM
Windows/MinGW64/opt/lib/python2.7/encodings/cp1140.py
593
13361
""" Python Character Mapping Codec cp1140 generated from 'python-mappings/CP1140.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='stri...
gpl-3.0
mj10777/QGIS
cmake/FindQsci.py
77
2612
# -*- coding: utf-8 -*- # # Copyright (c) 2012, Larry Shaffer <larry@dakotacarto.com> # 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 reta...
gpl-2.0
ludwiktrammer/odoo
addons/account/report/account_balance.py
22
3313
# -*- coding: utf-8 -*- import time from openerp import api, models class ReportTrialBalance(models.AbstractModel): _name = 'report.account.report_trialbalance' def _get_accounts(self, accounts, display_account): """ compute the balance, debit and credit for the provided accounts :Argume...
agpl-3.0
matrix-org/synapse
tests/replication/test_sharded_event_persister.py
1
12377
# Copyright 2020 The Matrix.org Foundation C.I.C. # # 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
zsoltdudas/lis-tempest
tempest/api/compute/admin/test_fixed_ips.py
13
2319
# Copyright 2013 IBM Corp # 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 appl...
apache-2.0