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
maljac/odoomrp-wip
product_attribute_value_image/__openerp__.py
25
1514
# -*- 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
GGoussar/scikit-image
skimage/feature/tests/test_canny.py
19
4525
import unittest import numpy as np from numpy.testing import assert_equal from scipy.ndimage import binary_dilation, binary_erosion import skimage.feature as F from skimage import filters, data from skimage import img_as_float class TestCanny(unittest.TestCase): def test_00_00_zeros(self): '''Test that th...
bsd-3-clause
semonte/intellij-community
python/lib/Lib/token.py
108
2926
#! /usr/bin/env python """Token constants (from "token.h").""" # This file is automatically generated; please don't muck it up! # # To update the symbols in this file, 'cd' to the top directory of # the python source tree after building the interpreter and run: # # python Lib/token.py #--start constants-- ENDM...
apache-2.0
zofuthan/zulip
api/integrations/codebase/zulip_codebase_config.py
124
2537
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright © 2014 Zulip, 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 without limitation the rights #...
apache-2.0
Jgarcia-IAS/Fidelizacion_odoo
openerp/addons/purchase_requisition/wizard/bid_line_qty.py
374
1711
# -*- 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
ncoden/NASM
test/gas2nasm.py
9
3289
#!/usr/bin/env python -tt # -*- python -*- # Convert gas testsuite file to NASM test asm file # usage > # python gas2nasm.py -i input_gas_file -o output_nasm_file -b bits # e.g. python gas2nasm.py -i x86-64-avx512f-intel.d -o avx512f.asm -b 64 import sys import os import optparse import re def setup(): parser = o...
bsd-2-clause
madelynfreed/rlundo
venv/lib/python2.7/site-packages/IPython/utils/frame.py
15
3165
# encoding: utf-8 """ Utilities for working with stack frames. """ from __future__ import print_function #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Development Team # # Distributed under the terms of the BSD License. The full license is in #...
gpl-3.0
hradec/gaffer
python/GafferImageTest/ConstantTest.py
7
7463
########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # Copyright (c) 2013, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that ...
bsd-3-clause
ianatpn/nupictest
nupic/support/datafiles.py
17
7952
# ---------------------------------------------------------------------- # 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
markreidvfx/pyaaf
tests/test_diagnostic_output.py
1
2446
from __future__ import print_function import aaf import aaf.mob import aaf.define import aaf.iterator import aaf.dictionary import aaf.storage import aaf.component import aaf.util import traceback import unittest import os from aaf.util import AUID, MobID cur_dir = os.path.dirname(os.path.abspath(__file__)) sandbox...
mit
hale36/SRTV
lib/imdb/parser/http/movieParser.py
40
80839
""" parser.http.movieParser module (imdb package). This module provides the classes (and the instances), used to parse the IMDb pages on the akas.imdb.com server about a movie. E.g., for Brian De Palma's "The Untouchables", the referred pages would be: combined details: http://akas.imdb.com/title/tt0094226/combi...
gpl-3.0
manishpatell/erpcustomizationssaiimpex123qwe
openerp/addons/base/tests/test_api.py
42
17604
from openerp import models from openerp.tools import mute_logger from openerp.osv.orm import except_orm from openerp.tests import common class TestAPI(common.TransactionCase): """ test the new API of the ORM """ def assertIsRecordset(self, value, model): self.assertIsInstance(value, models.BaseModel...
agpl-3.0
EricSchles/regulations-site
regulations/views/redirect.py
4
3521
from datetime import date import re from django.shortcuts import redirect from regulations.generator.api_reader import ApiReader from regulations.generator.versions import fetch_grouped_history from regulations.views.error_handling import handle_generic_404 def redirect_by_date(request, label_id, year, month, day):...
cc0-1.0
jmcarp/django
django/conf/project_template/project_name/settings.py
271
3288
""" Django settings for {{ project_name }} project. Generated by 'django-admin startproject' using Django {{ django_version }}. For more information on this file, see https://docs.djangoproject.com/en/{{ docs_version }}/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.c...
bsd-3-clause
navrasio/mxnet
example/recommenders/movielens_data.py
19
2419
# 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
dhananjay92/servo
components/script/dom/bindings/codegen/parser/tests/test_distinguishability.py
134
5560
def firstArgType(method): return method.signatures()[0][1][0].type def WebIDLTest(parser, harness): parser.parse(""" dictionary Dict { }; callback interface Foo { }; interface Bar { // Bit of a pain to get things that have dictionary types void passDict(optional Di...
mpl-2.0
levinas/assembly
lib/assembly/plugins/idba.py
2
2376
import os import logging import subprocess from plugins import BaseAssembler from yapsy.IPlugin import IPlugin class IdbaAssembler(BaseAssembler, IPlugin): new_version = True def run(self): """ Build the command and run. Return list of contig file(s) """ # Only support...
mit
jameslegg/boto
boto/exception.py
9
15123
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # 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 res...
mit
cobalys/django
django/contrib/localflavor/ro/forms.py
8
6772
# -*- coding: utf-8 -*- """ Romanian specific form helpers. """ from __future__ import absolute_import, unicode_literals from django.contrib.localflavor.ro.ro_counties import COUNTIES_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError, Field, RegexField, Select from django...
bsd-3-clause
blue-shell/veromix
plasma/contents/code/SourceOutputUI.py
3
3780
# -*- coding: utf-8 -*- # Copyright (C) 2009-2012 Nik Lutz <nik.lutz@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 3 of the License, or # (at your option) any later...
gpl-3.0
rajsadho/django
django/core/handlers/wsgi.py
339
9181
from __future__ import unicode_literals import cgi import codecs import logging import sys from io import BytesIO from threading import Lock from django import http from django.conf import settings from django.core import signals from django.core.handlers import base from django.core.urlresolvers import set_script_pr...
bsd-3-clause
eethomas/eucalyptus
clc/eucadmin/eucadmin/registercloudformation.py
6
1541
# Copyright 2011-2014 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions ...
gpl-3.0
Spanarchie/pyRest
pyRest/lib/python2.7/site-packages/setuptools/command/install_lib.py
454
2486
from distutils.command.install_lib import install_lib as _install_lib import os class install_lib(_install_lib): """Don't add compiled flags to filenames of non-Python files""" def _bytecode_filenames (self, py_filenames): bytecode_files = [] for py_file in py_filenames: if not py_...
unlicense
code4futuredotorg/reeborg_tw
src/libraries/brython_old/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
happy56/kivy
kivy/uix/anchorlayout.py
3
3069
''' Anchor Layout ============= .. only:: html .. image:: images/anchorlayout.gif :align: right .. only:: latex .. image:: images/anchorlayout.png :align: right :class:`AnchorLayout` aligns children to a border (top, bottom, left, right) or center. To draw a button in the lower-right corn...
lgpl-3.0
atchariya/django-extensions
tests/test_encrypted_fields.py
24
10268
import tempfile from contextlib import contextmanager import django import pytest from django.conf import settings from django.db import connection, models from django.test import TestCase from .testapp.models import Secret # Only perform encrypted fields tests if keyczar is present. Resolves # http://github.com/dja...
mit
cmpgamer/Sprint3
recommender.py
2
9706
import codecs from math import sqrt class recommender: def __init__(self, k=1, n=5): self.k = k self.n = n self.data = {} self.username2id = {} self.userid2name = {} self.productid2name = {} self.cardinality = {} self.slopeOneDeviations = {} ...
mit
mush42/mezzanine
mezzanine/blog/templatetags/blog_tags.py
39
3206
from __future__ import unicode_literals from datetime import datetime from django.contrib.auth import get_user_model from django.db.models import Count, Q from mezzanine.blog.forms import BlogPostForm from mezzanine.blog.models import BlogPost, BlogCategory from mezzanine.generic.models import Keyword from mezzanine ...
bsd-2-clause
goodwinnk/intellij-community
python/helpers/pydev/tests_pydevd/test_check_pydevconsole.py
23
4608
import threading import unittest import os import pytest import pydevconsole from _pydev_bundle.pydev_imports import xmlrpclib, SimpleXMLRPCServer from _pydev_bundle.pydev_localhost import get_localhost try: raw_input raw_input_name = 'raw_input' except NameError: raw_input_name = 'input' try: fr...
apache-2.0
dbadb/2016-Stronghold
src/python/robot/commands/portcullisCmds.py
1
5529
from wpilib.command import CommandGroup from wpilib.command import Command # portcullis groups ------------------------------------------------- # A command group requires all of the subsystems that each member requires. k_timeOut = 2 class MoveUp(CommandGroup): def __init__(self, robot, name=None): supe...
mit
Johnetordoff/osf.io
scripts/analytics/base.py
14
7997
import time import logging import argparse import importlib from datetime import datetime, timedelta from dateutil.parser import parse from django.utils import timezone from website.app import init_app from website.settings import KEEN as keen_settings from keen.client import KeenClient from scripts import utils as sc...
apache-2.0
martindale/elements
share/rpcuser/rpcuser.py
115
1110
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import hashlib import sys import os from random import SystemRandom import base64 import hmac if len(sys.a...
mit
davidlmorton/spikepy
spikepy/common/errors.py
1
2270
# Copyright (C) 2012 David Morton # # 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 is distribut...
gpl-3.0
jbenden/ansible
lib/ansible/modules/network/nxos/nxos_vrf_interface.py
4
8095
#!/usr/bin/python # # 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 distribut...
gpl-3.0
theopak/glassface
server/glassface/urls.py
1
1575
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', 'glassface.views.splash', name='home'), url(r'^twitteradd/([a-zA-Z0-9]+)$', 'glassface.views.twitt...
mit
nuxeh/keystone
keystone/openstack/common/versionutils.py
6
8989
# Copyright (c) 2013 OpenStack Foundation # 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 ...
apache-2.0
spaceof7/QGIS
tests/src/python/test_authmanager_password_postgres.py
21
8707
# -*- coding: utf-8 -*- """ Tests for auth manager Password access to postgres. This is an integration test for QGIS Desktop Auth Manager postgres provider that checks if QGIS can use a stored auth manager auth configuration to access a Password protected postgres. Configuration from the environment: * QGIS_POST...
gpl-2.0
zobe123/Plex-CS
lib/logutils/queue.py
34
7547
# # Copyright (C) 2010-2013 Vinay Sajip. See LICENSE.txt for details. # """ This module contains classes which help you work with queues. A typical application is when you want to log from performance-critical threads, but where the handlers you want to use are slow (for example, :class:`~logging.handlers.SMTPHandler`)...
gpl-3.0
BT-fgarbely/account-invoicing
account_invoice_rounding/res_config.py
30
3354
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Vaucher # Copyright 2013 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # pub...
agpl-3.0
ruschelp/cortex-vfx
test/IECore/JPEGImageWriter.py
12
11591
########################################################################## # # Copyright (c) 2008-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: # # * Redis...
bsd-3-clause
frreiss/tensorflow-fred
tensorflow/python/keras/layers/preprocessing/normalization_test.py
3
12624
# Copyright 2019 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
bac/horizon
horizon/forms/fields.py
4
15925
# Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
TridevGuha/pywikibot-core
scripts/coordinate_import.py
4
4085
#!/usr/bin/python # -*- coding: utf-8 -*- r""" Coordinate importing script. Usage: python pwb.py coordinate_import -lang:en -family:wikipedia \ -cat:Category:Coordinates_not_on_Wikidata This will work on all pages in the category "coordinates not on Wikidata" and will import the coordinates on these page...
mit
DPaaS-Raksha/raksha
raksha/openstack/common/lockutils.py
1
10139
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 OpenStack Foundation. # 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.apac...
apache-2.0
RayRuizhiLiao/ITK_4D
Modules/ThirdParty/pygccxml/src/pygccxml/declarations/class_declaration.py
1
26207
# Copyright 2014-2016 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt """ defines classes, that describes C++ classes This modules contains definition for next C++ declarations: - c...
apache-2.0
kybriainfotech/iSocioCRM
openerp/tools/sql.py
455
1173
# -*- 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...
agpl-3.0
Saethlin/astrotools
viewfits.py
1
30427
#!/usr/bin/env python """ A lightweight python-based FITS viewer. The controls should be self-explatory. If they are not, press ctrl+h for a stop-gap and submit an issue. Controls ought to be obvious, help me make them. This is a program for looking at images, not for doing analysis. TODO: Doesn't quite display corr...
mit
lagopus/ryu-lagopus-ext
ryu/services/protocols/bgp/api/base.py
4
7231
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # 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 appli...
apache-2.0
montoyjh/pymatgen
pymatgen/io/feff/inputs.py
1
32751
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import re import warnings from operator import itemgetter from tabulate import tabulate import numpy as np from monty.io import zopen from monty.json import MSONable from pymatgen import Structure, Lattice...
mit
clumsy/intellij-community
python/helpers/pydev/pydevd_traceproperty.py
53
3777
'''For debug purpose we are replacing actual builtin property by the debug property ''' from pydevd_comm import GetGlobalDebugger from pydevd_constants import * #@UnusedWildImport import pydevd_tracing #====================================================================================================================...
apache-2.0
wearpants/osf.io
website/search/share_search.py
10
10194
from __future__ import unicode_literals from time import gmtime from calendar import timegm from datetime import datetime import pytz from dateutil.parser import parse from dateutil.relativedelta import relativedelta from framework import sentry from elasticsearch import Elasticsearch from elasticsearch import ( ...
apache-2.0
cc272309126/panda3d
direct/src/distributed/AsyncRequest.py
11
10930
from otp.ai.AIBaseGlobal import * from direct.directnotify import DirectNotifyGlobal from direct.showbase.DirectObject import DirectObject from ConnectionRepository import * ASYNC_REQUEST_DEFAULT_TIMEOUT_IN_SECONDS = 8.0 ASYNC_REQUEST_INFINITE_RETRIES = -1 ASYNC_REQUEST_DEFAULT_NUM_RETRIES = 0 if __debug__: _over...
bsd-3-clause
davipeterlini/routeflow_tcc
pox/pox/lib/graph/minigraph.py
26
4103
# Copyright 2012 James McCauley # # This file is part of POX. # # POX 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. # # POX is distri...
apache-2.0
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/sympy/mpmath/tests/test_calculus.py
40
1825
from sympy.mpmath import * def test_approximation(): mp.dps = 15 f = lambda x: cos(2-2*x)/x p, err = chebyfit(f, [2, 4], 8, error=True) assert err < 1e-5 for i in range(10): x = 2 + i/5. assert abs(polyval(p, x) - f(x)) < err def test_limits(): mp.dps = 15 assert limit(lamb...
agpl-3.0
JPaulMora/Pyrit
cpyrit/config.py
1
2322
# -*- coding: UTF-8 -*- # # Copyright 2015, John Mora, johmora12@engineer.com # Original Work by Lukas Lueg (c) 2008-2011. # # This file is part of Pyrit. # # Pyrit 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...
gpl-3.0
miumok98/weblate
weblate/trans/tests/test_permissions.py
6
2799
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # 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
inactivist/guess-language
guess_language/blocks_test.py
66
1693
''' Copyright (c) 2008, Kent S Johnson This library 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 2.1 of the License, or (at your option) any later version. This libr...
lgpl-2.1
LouisPlisso/pytomo
pytomo/flvlib/primitives.py
100
2046
import struct """ The internal FLV representations of numbers. """ __all__ = ['get_ui32', 'make_ui32', 'get_si32_extended', 'make_si32_extended', 'get_ui24', 'make_ui24', 'get_ui16', 'make_ui16', 'get_si16', 'make_si16', 'get_ui8', 'make_ui8', 'get_double', 'make_double', 'EndOfFile'...
gpl-2.0
v-iam/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/compute/v2017_03_30/models/virtual_machine_scale_set_instance_view.py
2
2014
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
zzzaaa12/PTT_Notify
ptt_notify.py
1
6855
#!/usr/bin/python # -*- coding: utf-8 -*- import os import sys import time import feedparser import requests import json from datetime import datetime from datetime import timedelta from send_notify import send_notify_mail # files in this project from setting import AUTO_UPDATE_SECS from setting import SEND_EMAIL from...
mit
onshape-public/onshape-clients
python/onshape_client/oas/models/bt_image_filter853_all_of.py
1
4736
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
mit
amith01994/intellij-community
python/lib/Lib/site-packages/django/contrib/auth/models.py
71
19172
import datetime import urllib from django.contrib import auth from django.contrib.auth.signals import user_logged_in from django.core.exceptions import ImproperlyConfigured from django.db import models from django.db.models.manager import EmptyManager from django.contrib.contenttypes.models import ContentType from dja...
apache-2.0
gvallarelli/inasafe
safe_qgis/impact_calculator_thread.py
1
6203
""" InaSAFE Disaster risk assessment tool developed by AusAid - **ISImpactCalculatorThread.** The module provides a high level interface for running SAFE scenarios. Contact : ole.moller.nielsen@gmail.com .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU...
gpl-3.0
unaguil/hyperion-ns2
experiments/measures/generic/BroadcastTime.py
1
1941
from GenericMeasure import GenericMeasure from GenericAvgMeasure import GenericAvgMeasure import Units class ReceivedMessages(GenericMeasure): def __init__(self, period, simulationTime, broadcastTable): GenericMeasure.__init__(self, r"DEBUG .*? - Peer .*? received packet .*?(\(.*?\)) .*?([0-9]+\,[0-9]+).*?", peri...
apache-2.0
sajuptpm/manila
contrib/tempest/tempest/config_share.py
2
6876
# Copyright 2014 Mirantis 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...
apache-2.0
frankiecjunle/yunblog
venv/lib/python2.7/site-packages/pygments/formatters/other.py
363
3811
# -*- coding: utf-8 -*- """ pygments.formatters.other ~~~~~~~~~~~~~~~~~~~~~~~~~ Other formatters: NullFormatter, RawTokenFormatter. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.formatter import Formatter from pygments...
mit
peterlauri/django
django/core/management/commands/squashmigrations.py
58
8893
import io from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS, connections, migrations from django.db.migrations.loader import AmbiguityError, MigrationLoader from django.db.migrations.migration import SwappableTuple from django.db.m...
bsd-3-clause
macs03/demo-cms
cms/lib/python2.7/site-packages/django/contrib/gis/geos/prototypes/threadsafe.py
513
2824
import threading from django.contrib.gis.geos.libgeos import lgeos, notice_h, error_h, CONTEXT_PTR class GEOSContextHandle(object): """ Python object representing a GEOS context handle. """ def __init__(self): # Initializing the context handler for this thread with # the notice and erro...
mit
ammaradil/fibonacci
Lib/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py
2931
2318
######################## 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...
mit
dmnfarrell/peat
Ghost/calc_dCS.py
1
4214
#!/usr/bin/env python # # This file is part of the pKaTool package # Copyright (C) Jens Erik Nielsen 2008 # All rights reserved # #comment def Nonefix(value): if value: return '%6.3f' %(value) else: return 'NA' def main(options,args): """Calculate the change in chemical shift due to a full ...
mit
petecummings/django
tests/http_utils/tests.py
304
2247
from __future__ import unicode_literals import gzip import io from django.http import HttpRequest, HttpResponse, StreamingHttpResponse from django.http.utils import conditional_content_removal from django.test import SimpleTestCase # based on Python 3.3's gzip.compress def gzip_compress(data): buf = io.BytesIO(...
bsd-3-clause
kezabelle/django-testguess
autoguessed/tests/test_urls/returns_templateresponse/test_101110011100.py
1
2776
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.test import TestCase class GuessedTestCase(TestCase): """ Generated: 2015-10-18T13:44:15.980585 is_html5: True is_ajax: False is_authenticated: True has_context_data: True has_template_name: True has_get_params:...
bsd-2-clause
EvanK/ansible
lib/ansible/modules/network/vyos/vyos_l3_interface.py
56
8511
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # # This file is part of Ansible by Red Hat # # 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 Li...
gpl-3.0
maljac/odoo-addons
account_invoice_tax_wizard/__openerp__.py
1
1453
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar) # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Pu...
agpl-3.0
bealdav/OCB
openerp/report/pyPdf/generic.py
136
29129
# vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2006, Mathieu Fenniak # 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 copyrig...
agpl-3.0
Innovahn/odoo.old
addons/hr_holidays/report/holidays_summary_report.py
333
10372
# -*- 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
matthew-brett/bibstuff
bibstuff/bibname.py
1
10649
#! /usr/bin/env python #File: bibname.py """ :mod:`bibstuff.bibname` --- Name Parser and Formatter ===================================================== Parses bibtex-formatted author/editor raw names and provides formatting functions (e.g., via bibstyles/shared.NamesFormatter). :author: Dylan W. Schwilk :contact: ht...
mit
MSU-CS-Software-Engineering/habitgame
landing_page.py
1
16402
import os.path from datetime import date, timedelta #For Timestamps from tkinter import * from tkinter.ttk import * from tkinter import messagebox #Must be explicitly imported. Used for placeholders. class Hack_Frame(Frame): def __init__(self, parent, ID, hack_type, empty=0): Frame.__init__(self, paren...
mit
jjmleiro/hue
desktop/core/ext-py/Django-1.6.10/django/utils/translation/trans_real.py
74
25651
"""Translation helper functions.""" from __future__ import unicode_literals import locale import os import re import sys import gettext as gettext_module from threading import local import warnings from django.utils.importlib import import_module from django.utils.datastructures import SortedDict from django.utils.en...
apache-2.0
osbzr/gooderp_org
website_mail/controllers/email_designer.py
243
3151
# -*- coding: utf-8 -*- from urllib import urlencode from openerp.addons.web import http from openerp.addons.web.http import request from openerp.tools.mail import html_sanitize class WebsiteEmailDesigner(http.Controller): @http.route('/website_mail/email_designer', type='http', auth="user", website=True) ...
agpl-3.0
dya2/python-for-android
python-modules/twisted/twisted/trial/test/test_runner.py
49
29815
# Copyright (c) 2005-2010 Twisted Matrix Laboratories. # See LICENSE for details. # # Maintainer: Jonathan Lange # Author: Robert Collins import StringIO, os, sys from zope.interface import implements from zope.interface.verify import verifyObject from twisted.trial.itrial import IReporter, ITestCase from twisted.tr...
apache-2.0
iminrhythm/iirmerl
p2btstmp.py
1
2871
# From http://gbeced.github.io/pyalgotrade/docs/v0.17/html/bitstamp_example.html # Accessed 06/25/16 @ 1046Z from pyalgotrade.bitstamp import barfeed from pyalgotrade.bitstamp import broker from pyalgotrade import strategy from pyalgotrade.technical import ma from pyalgotrade.technical import cross class Strategy(st...
mit
GiedriusM/openthread
tests/scripts/thread-cert/Cert_6_1_07_EDSynchronization.py
5
4724
#!/usr/bin/python # # Copyright (c) 2016, The OpenThread Authors. # All rights reserved. # # 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 # not...
bsd-3-clause
PlutoniumHeart/ITK
Modules/ThirdParty/pygccxml/src/pygccxml/declarations/cpptypes.py
1
25524
# Copyright 2014-2016 Insight Software Consortium. # Copyright 2004-2008 Roman Yakovenko. # Distributed under the Boost Software License, Version 1.0. # See http://www.boost.org/LICENSE_1_0.txt """ defines classes, that describe C++ types """ from . import algorithms_cache class type_t(object): """base class f...
apache-2.0
brainstorm-ai/DIGITS
digits/model/images/classification/test_views.py
1
39432
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import import itertools import json import os import re import shutil import tempfile import time import unittest import urllib # Find the best implementation available try: from cStringIO import StringIO except I...
bsd-3-clause
j00bar/ansible
lib/ansible/modules/network/nxos/nxos_file_copy.py
26
7640
#!/usr/bin/python # # 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 distribut...
gpl-3.0
bright-tools/varints
varints/setup.py
1
2012
#!/usr/bin/python # Copyright 2017 John Bailey # # 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 applicabl...
apache-2.0
catmaid/CATMAID
scripts/graphdb/test_bulbs.py
2
4024
# -*- coding: utf-8 -*- from bulbs.neo4jserver import Graph from bulbs.model import Node, Relationship from bulbs.property import Property, String, Integer, Float, DateTime from bulbs.utils import current_datetime # TODO: check latest gist's # Requirements (installable with pip) # pytz ujson six # You need: sudo apt...
gpl-3.0
Scille/parsec-cloud
parsec/api/data/invite.py
1
6077
# Parsec Cloud (https://parsec.cloud) Copyright (c) AGPLv3 2016-2021 Scille SAS import re from typing import Optional, Tuple, List, Dict, Any from random import randint, shuffle from parsec.crypto import VerifyKey, PublicKey, PrivateKey, SecretKey from parsec.serde import fields, post_load from parsec.api.protocol im...
agpl-3.0
bryx-inc/boto
boto/pyami/__init__.py
396
1107
# 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
ahye/FYS2140-Resources
examples/animation/func_animate_sin.py
1
1284
#!/usr/bin/env python """ Created on Mon 2 Dec 2013 Eksempelscript som viser hvordan en sinusboelge kan animeres med funksjonsanimasjon. @author Benedicte Emilie Braekken """ from numpy import * from matplotlib.pyplot import * from matplotlib import animation def wave( x, t ): ''' Funksjonen beskriver en sin...
mit
aneeshusa/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/_stream_base.py
652
5978
# Copyright 2011, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
mpl-2.0
guyskk/validater
tests/validators/test_union.py
2
4635
import pytest from validr import T, SchemaError, Invalid from . import case, compiler @case({ T.union([T.int, T.list(T.int)]): [ (111, 111), ([111, 222], [111, 222]), ([], []), [None, '', 'xxx'], ], T.union([T.str, T.list(T.str)]).optional: [ ([], []), (None...
mit
liwangmj/omaha
plugins/update/generate_plugin_idls.py
67
3325
#!/usr/bin/python2.4 # # Copyright 2007-2009 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
okumura/gyp
test/defines/gyptest-defines-env-regyp.py
268
1350
#!/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. """ Verifies build of an executable with C++ define specified by a gyp define, and the use of the environment during regeneration when the g...
bsd-3-clause
bioinformatist/Gao-s-SB
src/gaosb/core/app.py
1
17034
import os import re import subprocess import sys from collections import defaultdict from Bio import Entrez from Bio import SeqIO from PyQt5 import QtWidgets, QtCore from PyQt5.QtCore import Qt from PyQt5.QtGui import QDesktopServices from PyQt5.QtWidgets import QMessageBox from gaosb.gui.mainwindow import Ui_MainWin...
mit
keithlee/shakeAppPyDev
django/contrib/messages/tests/base.py
152
17772
import warnings from django import http from django.test import TestCase from django.conf import settings from django.utils.translation import ugettext_lazy from django.utils.unittest import skipIf from django.contrib.messages import constants, utils, get_level, set_level from django.contrib.messages.api import Messag...
bsd-3-clause
maziara/deluge-feed-inoreader
delugeapi.py
1
3737
import config from deluge_client import DelugeRPCClient import werkzeug as wz import base64 ######################################################## ########### Deluge Methods ################ ######################################################## def connect_to_deluge(): client = DelugeRPCClient(c...
mit
LChristakis/chalice-hunter
lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/mbcharsetprober.py
2924
3268
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
mit
mcgill-robotics/Firmware
src/lib/parameters/px4params/markdownout.py
1
5359
from xml.sax.saxutils import escape import codecs class MarkdownTablesOutput(): def __init__(self, groups): result = ("# Parameter Reference\n" "> **Note** **This list is auto-generated from the source code** and contains the most recent parameter documentation.\n" "\n")...
bsd-3-clause