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
yuikns/cuda-convnet2
initw.py
183
2020
# Copyright 2014 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...
apache-2.0
WillisXChen/django-oscar
src/oscar/apps/voucher/admin.py
30
1031
from django.contrib import admin from oscar.core.loading import get_model Voucher = get_model('voucher', 'Voucher') VoucherApplication = get_model('voucher', 'VoucherApplication') class VoucherAdmin(admin.ModelAdmin): list_display = ('name', 'code', 'usage', 'num_basket_additions', 'num_orde...
bsd-3-clause
idprophecy/android_kernel_oneplus_msm8974-3.10
tools/perf/scripts/python/net_dropmonitor.py
2669
1738
# Monitor the system for dropped packets and proudce a report of drop locations and counts import os import sys sys.path.append(os.environ['PERF_EXEC_PATH'] + \ '/scripts/python/Perf-Trace-Util/lib/Perf/Trace') from perf_trace_context import * from Core import * from Util import * drop_log = {} kallsyms = [] def...
gpl-2.0
balle/chaosmap
chaosmap.py
1
15829
#!/usr/bin/python2 # # Chaosmap # # Chaosmap is an information gathering tool and # dns / whois / web server scanner. # For wider description and example usages see the README # # Coded by Balle # http://www.datenterrorist.de # License GPLv3 version = "1.2" ###[ Import modules import sys import getopt import re imp...
gpl-3.0
okfn/rtei
rtei/settings/production.py
1
2263
import sys import os from .base import * DEBUG = False # Update database configuration with $DATABASE_URL. import dj_database_url db_from_env = dj_database_url.config() DATABASES['default'].update(db_from_env) SECRET_KEY = os.environ.get('SECRET_KEY') # AWS S3 settings DEFAULT_FILE_STORAGE = 'storages.backends.s3b...
agpl-3.0
akretion/odoo
addons/mrp/models/stock_warehouse.py
4
14216
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import ValidationError, UserError class StockWarehouse(models.Model): _inherit = 'stock.warehouse' manufacture_to_resupply = fields.Boolean( ...
agpl-3.0
leighpauls/k2cro4
third_party/pywebsocket/src/mod_pywebsocket/standalone.py
3
38309
#!/usr/bin/env python # # Copyright 2012, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
bsd-3-clause
gnowxilef/youtube-dl
youtube_dl/extractor/rentv.py
37
3177
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_str class RENTVIE(InfoExtractor): _VALID_URL = r'(?:rentv:|https?://(?:www\.)?ren\.tv/(?:player|video/epizod)/)(?P<id>\d+)' _TESTS = [{ 'url': 'http://ren.tv/video/epizod/118577', ...
unlicense
chafique-delli/OpenUpgrade
addons/account_payment/wizard/account_payment_pay.py
382
2448
# -*- 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
rowhit/h2o-2
py/testdir_single_jvm/test_badchars.py
9
1213
import unittest, sys sys.path.extend(['.','..','../..','py']) import h2o, h2o_cmd, h2o_import as h2i # we have this rule for NUL. This test is not really following the rule (afte eol) # so will say it's not a valid test. # Since NUL (0x00) characters may be used for padding, NULs are allowed, # and ignored after any...
apache-2.0
SAM-IT-SA/odoo
openerp/tools/__init__.py
337
1447
# -*- 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
kool79/intellij-community
python/helpers/pydev/pycompletionserver.py
56
13040
#@PydevCodeAnalysisIgnore ''' @author Fabio Zadrozny ''' IS_PYTHON3K = 0 try: import __builtin__ except ImportError: import builtins as __builtin__ # Python 3.0 IS_PYTHON3K = 1 try: True False except NameError: # If it's not defined, let's define it now. setattr(__builtin__, 'True', 1) # ...
apache-2.0
jocke-l/blues
blues/application/project.py
2
1307
import os from contextlib import contextmanager from refabric.context_managers import sudo from .. import git from ..app import blueprint __all__ = [ 'app_root', 'project_home', 'git_root', 'virtualenv_path', 'git_repository', 'git_repository_path', 'python_path', 'sudo_project', 'requirements_txt' ] app_r...
mit
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/pyshared/papyon/media/candidate.py
6
2797
# -*- coding: utf-8 -*- # # papyon - a python client library for Msn # # Copyright (C) 2009 Collabora Ltd. # # 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 #...
gpl-3.0
repotvsupertuga/tvsupertuga.repository
script.module.liveresolver/lib/liveresolver/resolvers/streamlive.py
10
4235
# -*- coding: utf-8 -*- import re,urlparse,json,requests,cookielib from liveresolver.modules import client from liveresolver.modules import control from liveresolver.modules import constants from liveresolver.modules.log_utils import log import urllib,sys,os cookieFile = os.path.join(control.dataPath, 'streamlivecoo...
gpl-2.0
duducosmos/pgs4a
python-install/lib/python2.7/ctypes/test/test_memfunctions.py
79
3251
import sys import unittest from ctypes import * class MemFunctionsTest(unittest.TestCase): ## def test_overflow(self): ## # string_at and wstring_at must use the Python calling ## # convention (which acquires the GIL and checks the Python ## # error flag). Provoke an error and catch it; see al...
lgpl-2.1
BitWriters/Zenith_project
zango/lib/python3.5/site-packages/django/contrib/gis/db/models/query.py
56
36394
import warnings from django.contrib.gis.db.models import aggregates from django.contrib.gis.db.models.fields import ( GeometryField, LineStringField, PointField, get_srid_info, ) from django.contrib.gis.db.models.lookups import GISLookup from django.contrib.gis.db.models.sql import ( AreaField, DistanceField, ...
mit
jbarcia/Empire
lib/common/messages.py
8
14880
""" Common terminal messages used across Empire. Titles, agent displays, listener displays, etc. """ import os, sys, textwrap # Empire imports import helpers ############################################################### # # Messages # ############################################################### def title(v...
bsd-3-clause
simgislab/universiade2013
univer_parse.py
1
7397
# -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # police-uum.py # Author: Maxim Dubinin (sim@gis-lab.info) # About: Grab 112.ru data on участковые, creates two tables linked with unique id, policemen and locations they are responsible for. # Created: 13:26 07.05.201...
bsd-2-clause
machinegun/SALSA
correct.py
1
3402
import sys #reads input assembly, breakpoints given by the method and outputs new contig file with lengths #offsets bed file as well def parse_fasta(fh): fa = {} current_short_name = None # Part 1: compile list of lines per sequence for ln in fh: if ln[0] == '>': # new name line; r...
mit
qian19876025/nixysa
nixysa/js_utils.py
10
20119
#!/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...
apache-2.0
necioerrante/kernel
arch/ia64/scripts/unwcheck.py
13143
1714
#!/usr/bin/python # # Usage: unwcheck.py FILE # # This script checks the unwind info of each function in file FILE # and verifies that the sum of the region-lengths matches the total # length of the function. # # Based on a shell/awk script originally written by Harish Patil, # which was converted to Perl by Matthew Ch...
gpl-2.0
Titosoft/ferry-boat
web2py/gluon/contrib/gae_memcache.py
25
1874
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Developed by Robin Bhattacharyya (memecache for GAE) Released under the web2py license (LGPL) from gluon.contrib.gae_memcache import MemcacheClient cache.ram=cache.disk=MemcacheClient(request) """ import time from google.appengine.api.memcache import Client class M...
mit
PEAT-AI/Crampy
inverse_kinematics/torben_ik.py
1
7206
import serial import math import time import csv import thread import numpy from multiprocessing import Process #globale variablen #serial connection to mini Maestro ser = serial.Serial('/dev/ttyACM1') #leg length in cm lega=3 legb=8 legc=10 def leg1(WinkelA,WinkelB,WinkelC,ser): WinkelA=180-WinkelA WinkelC=170...
gpl-3.0
ircwaves/gips
gips/data/landsat/landsat.py
1
92875
#!/usr/bin/env python ################################################################################ # GIPS: Geospatial Image Processing System # # AUTHOR: Matthew Hanson # EMAIL: matt.a.hanson@gmail.com # # Copyright (C) 2014-2018 Applied Geosolutions # # This program is free software; you can redist...
gpl-2.0
Bulochkin/tensorflow_pack
tensorflow/contrib/batching/python/ops/batch_ops.py
38
5427
# 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
ssgeejr/mitropm
browser-ext/login/test/common/init_webdriver.py
26
2978
# ***************************************************************************** # Copyright (c) 2012, 2013, 2014 Lectorius, Inc. # Authors: # Vijay Pandurangan (vijayp@mitro.co) # Evan Jones (ej@mitro.co) # Adam Hilss (ahilss@mitro.co) # # # This program is free software: you can redistribute it and/or modify # ...
gpl-3.0
gunan/tensorflow
tensorflow/python/keras/engine/data_adapter_test.py
1
43158
# 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
isleei/xhtml2pdf
xhtml2pdf/w3c/cssDOMElementInterface.py
79
4201
#!/usr/bin/env python ##~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ##~ Copyright (C) 2002-2004 TechGame Networks, LLC. ##~ ##~ This library is free software; you can redistribute it and/or ##~ modify it under the terms of the BSD style License as found in the ##~ LICENSE file included with this distribution....
apache-2.0
Pfiver/penview
dev/Danny_example.py
1
9958
from Danny.OOo.OOoLib import * def CalcExample(): # create a new Calc spreadsheet. oDoc = StarDesktop.loadComponentFromURL( "private:factory/scalc", "_blank", 0, Array() ) #----- # Use this instead to open an EXISTING calc document, # and assign it to variable oDoc. # cFile = "C:\Docum...
gpl-3.0
jasonwzhy/django
tests/m2m_multiple/tests.py
227
2370
from __future__ import unicode_literals from datetime import datetime from django.test import TestCase from .models import Article, Category class M2MMultipleTests(TestCase): def test_multiple(self): c1, c2, c3, c4 = [ Category.objects.create(name=name) for name in ["Sports", "N...
bsd-3-clause
was4444/chromium.src
tools/clang/scripts/run_tool.py
10
11374
#!/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. """Wrapper script to help run clang tools across Chromium code. How to use this tool: If you want to run the tool across all Chromi...
bsd-3-clause
lizardsystem/lizard-map
lizard_map/api/handlers.py
2
1655
# (c) Nelen & Schuurmans. GPL licensed, see LICENSE.txt. import pkg_resources from django.core.urlresolvers import reverse from piston.handler import BaseHandler from piston.doc import generate_doc from lizard_map.models import ADAPTER_ENTRY_POINT def documentation(handler): """Return dict with documentation on...
lgpl-3.0
hackerbot/DjangoDev
django/apps/config.py
121
8077
import os from importlib import import_module from django.core.exceptions import AppRegistryNotReady, ImproperlyConfigured from django.utils._os import upath from django.utils.module_loading import module_has_submodule MODELS_MODULE_NAME = 'models' class AppConfig(object): """ Class representing a Django ap...
bsd-3-clause
dataxu/ansible
lib/ansible/modules/network/dellos10/dellos10_command.py
5
7295
#!/usr/bin/python # # (c) 2015 Peter Sprygada, <psprygada@ansible.com> # Copyright (c) 2017 Dell 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_versio...
gpl-3.0
repotvsupertuga/tvsupertuga.repository
script.module.urllib3/lib/urllib3/exceptions.py
223
6603
from __future__ import absolute_import from .packages.six.moves.http_client import ( IncompleteRead as httplib_IncompleteRead ) # Base Exceptions class HTTPError(Exception): "Base exception used by this module." pass class HTTPWarning(Warning): "Base warning used by this module." pass class Po...
gpl-2.0
frishberg/django
django/core/files/base.py
59
5605
from __future__ import unicode_literals import os from io import BytesIO, StringIO, UnsupportedOperation from django.core.files.utils import FileProxyMixin from django.utils import six from django.utils.encoding import ( force_bytes, force_str, force_text, python_2_unicode_compatible, ) @python_2_unicode_compat...
bsd-3-clause
Sweetgrassbuffalo/ReactionSweeGrass-v2
.meteor/local/dev_bundle/python/Lib/bsddb/test/test_associate.py
107
15065
""" TestCases for DB.associate. """ import sys, os, string import time from pprint import pprint import unittest from test_all import db, dbshelve, test_support, verbose, have_threads, \ get_new_environment_path #---------------------------------------------------------------------- musicdata = { 1 : ("Ba...
gpl-3.0
pedropena/iteexe
exe/engine/attachmentidevice.py
11
8118
# =========================================================================== # eXe # Copyright 2004-2006, University of Auckland # Copyright 2006-2009 eXe Project, http://eXeLearning.org/ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
gpl-2.0
samstav/mongoexport
mongoexport.py
1
7599
"""mongoexport implemented as a python module. 'username' and 'password' for accessing target mongodb can be stored as environment variables or in python keyring. Stored as environment variables: export MONGOEXPORT_USERNAME=***** export MONGOEXPORT_PASSWORD=***** or in python keyring: $ keyring set mongoexport use...
apache-2.0
SublimeText/Pywin32
lib/x64/win32comext/shell/demos/servers/folder_view.py
10
28874
# This is a port of the Vista SDK "FolderView" sample, and associated # notes at http://shellrevealed.com/blogs/shellblog/archive/2007/03/15/Shell-Namespace-Extension_3A00_-Creating-and-Using-the-System-Folder-View-Object.aspx # A key difference to shell_view.py is that this version uses the default # IShellView provi...
bsd-3-clause
broesamle/servo
tests/wpt/update_css.py
116
1081
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os import sys here = os.path.split(__file__)[0] def wpt_path(*args): return os.path.join(here, *args) # I...
mpl-2.0
dparnell/rethinkdb
test/rql_test/connections/http_support/jinja2/testsuite/core_tags.py
412
11858
# -*- coding: utf-8 -*- """ jinja2.testsuite.core_tags ~~~~~~~~~~~~~~~~~~~~~~~~~~ Test the core tags like for and if. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import unittest from jinja2.testsuite import JinjaTestCase from jinja2 import Environment...
agpl-3.0
ronaldoussoren/macholib
macholib/mach_o.py
1
46738
""" Other than changing the load commands in such a way that they do not contain the load command itself, this is largely a by-hand conversion of the C headers. Hopefully everything in here should be at least as obvious as the C headers, and you should be using the C headers as a real reference because the documentati...
mit
adam-p/danforth-east
tasks.py
1
12184
# -*- coding: utf-8 -*- # # Copyright Adam Pritchard 2020 # MIT License : https://adampritchard.mit-license.org/ # """ Flask routes used by tasks queues and cron jobs """ import logging import flask from google.cloud import ndb import config import gapps import emailer import main tasks = flask.Blueprint('tasks',...
mit
karan1276/servo
tests/wpt/css-tests/css-text-decor-3_dev/xhtml1/support/generate-text-emphasis-position-property-tests.py
841
3343
#!/usr/bin/env python # - * - coding: UTF-8 - * - """ This script generates tests text-emphasis-position-property-001 ~ 006 which cover all possible values of text-emphasis-position property with all combination of three main writing modes and two orientations. Only test files are generated by this script. It also out...
mpl-2.0
kasbah/slim_looper
src/gui/rdfdict/namespaces.py
1
3494
#!/usr/bin/env python # Copyright 2014 Kaspar Emanuel <kaspar.emanuel@gmail.com> # # Permission to use, copy, modify, and/or distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THIS SOFTWARE IS...
gpl-3.0
stargaser/astropy
astropy/units/format/console.py
4
2742
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst """ Handles the "Console" unit format. """ from . import base, core, utils class Console(base.Base): """ Output-only format for to display pretty formatting at the console. For example:: >>> import astro...
bsd-3-clause
NASA-Tournament-Lab/CoECI-CMS-Healthcare-Fraud-Prevention
partnerclient/hfppnetwork/partner/conversion/test/test_csvreader.py
3
2873
## # Copyright (C) 2013 TopCoder Inc., All Rights Reserved. ## __author__ = 'Easyhard' __version__ = '1.0' from csvreader import CSVReader from schema import entity import unittest from datetime import date from exception import DataReaderException from io import StringIO class TestCSVReader(unittest.TestCase): ...
apache-2.0
3quarterstack/simple_blog
django/contrib/localflavor/it/util.py
101
1791
from django.utils.encoding import smart_text def ssn_check_digit(value): "Calculate Italian social security number check digit." ssn_even_chars = { '0': 0, '1': 1, '2': 2, '3': 3, '4': 4, '5': 5, '6': 6, '7': 7, '8': 8, '9': 9, 'A': 0, 'B': 1, 'C': 2, 'D': 3, 'E': 4, 'F': 5, 'G': 6, 'H': 7, ...
mit
hainn8x/gnuradio
gr-digital/python/digital/qam_constellations.py
7
11524
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # ...
gpl-3.0
lukeiwanski/tensorflow
tensorflow/contrib/learn/python/learn/export_strategy.py
42
4759
# Copyright 2016 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
alexkolar/Gooey
gooey/gui/windows/runtime_display_panel.py
5
1907
''' Created on Dec 23, 2013 @author: Chris ''' import sys import wx from gooey.gui.lang import i18n from gooey.gui.message_event import EVT_MSG class MessagePump(object): def __init__(self): # self.queue = queue self.stdout = sys.stdout # Overrides stdout's write method def wr...
mit
kaplun/invenio
modules/webaccess/lib/collection_restrictions_migration_kit.py
35
4058
## This file is part of Invenio. ## Copyright (C) 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 your option) any ...
gpl-2.0
apark263/tensorflow
tensorflow/python/training/saver_test.py
2
130008
# 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
tjsavage/sfcsdatabase
django/utils/translation/trans_real.py
12
21116
"""Translation helper functions.""" import locale import os import re import sys import warnings import gettext as gettext_module from cStringIO import StringIO from django.utils.importlib import import_module from django.utils.safestring import mark_safe, SafeData from django.utils.thread_support import currentThrea...
bsd-3-clause
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/html/entities.py
48
75315
"""HTML character entity references.""" __all__ = ['html5', 'name2codepoint', 'codepoint2name', 'entitydefs'] # maps the HTML entity name to the Unicode code point name2codepoint = { 'AElig': 0x00c6, # latin capital letter AE = latin capital ligature AE, U+00C6 ISOlat1 'Aacute': 0x00c1, # latin capital ...
apache-2.0
jkonecny12/anaconda
pyanaconda/ui/gui/spokes/keyboard.py
3
25454
# Keyboard selection and configuration spoke class # # Copyright (C) 2011-2012 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. #...
gpl-2.0
sujeet4github/MyLangUtils
LangPython/oreilly-intro-to-flask-video/venv/lib/python3.6/site-packages/pip/_vendor/distlib/metadata.py
335
38833
# -*- coding: utf-8 -*- # # Copyright (C) 2012 The Python Software Foundation. # See LICENSE.txt and CONTRIBUTORS.txt. # """Implementation of the Metadata for Python packages PEPs. Supports all metadata formats (1.0, 1.1, 1.2, and 2.0 experimental). """ from __future__ import unicode_literals import codecs from email...
gpl-3.0
jorik041/scrapy
scrapy/core/spidermw.py
68
3301
""" Spider Middleware manager See documentation in docs/topics/spider-middleware.rst """ from twisted.python.failure import Failure from scrapy.middleware import MiddlewareManager from scrapy.utils.defer import mustbe_deferred from scrapy.utils.conf import build_component_list def _isiterable(possible_iterator): ...
bsd-3-clause
FCP-INDI/nipype
nipype/pipeline/plugins/tests/test_oar.py
10
1568
import os from shutil import rmtree from tempfile import mkdtemp import nipype.interfaces.base as nib from nipype.testing import assert_equal, skipif import nipype.pipeline.engine as pe class InputSpec(nib.TraitedSpec): input1 = nib.traits.Int(desc='a random int') input2 = nib.traits.Int(desc='a random int')...
bsd-3-clause
vlegoff/tsunami
src/primaires/perso/commandes/raedit/__init__.py
1
2488
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 ...
bsd-3-clause
neilpelow/wmap-django
venv/lib/python3.5/site-packages/django/contrib/redirects/migrations/0001_initial.py
308
1561
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ] operations = [ migrations.CreateModel( name='Redirect', fields=[ ...
gpl-3.0
sandeepgupta2k4/tensorflow
tensorflow/examples/learn/iris_val_based_early_stopping.py
62
2827
# Copyright 2016 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 appl...
apache-2.0
dekoza/interference
coherence/extern/simple_config.py
5
7302
# -*- coding: utf-8 -*- # Licensed under the MIT license # http://opensource.org/licenses/mit-license.php # based on: http://code.activestate.com/recipes/573463/ # Modified by Philippe Normand # Copyright 2008, Frank Scholz <coherence@beebits.net> from coherence.extern.et import ET as ElementTree, indent, parse_xml...
mit
shujingke/opencog
tests/python/old/test_tree.py
48
7173
from unittest import TestCase try: from opencog.atomspace import AtomSpace, TruthValue, Atom #, Handle from opencog.atomspace import types, get_type, get_type_name # is_a except ImportError: from atomspace_remote import AtomSpace, TruthValue, Atom #, Handle from atomspace_remote import types, get_type,...
agpl-3.0
atsaki/ansible
lib/ansible/executor/task_executor.py
4
29159
# (c) 2012-2014, 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) an...
gpl-3.0
Alwnikrotikz/open-hea
src/openhea/xlwt/antlr.py
57
84201
## This file is part of PyANTLR. See LICENSE.txt for license ## details..........Copyright (C) Wolfgang Haefelinger, 2004. ## This file was copied for use with xlwt from the 2.7.7 ANTLR distribution. Yes, it ## says 2.7.5 below. The 2.7.5 distribution version didn't have a ## version in it. ## Here is the contents of...
lgpl-2.1
algebrology/ghost
node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/styles/tango.py
363
7096
# -*- coding: utf-8 -*- """ pygments.styles.tango ~~~~~~~~~~~~~~~~~~~~~ The Crunchy default Style inspired from the color palette from the Tango Icon Theme Guidelines. http://tango.freedesktop.org/Tango_Icon_Theme_Guidelines Butter: #fce94f #edd400 #c4a000 Orange: #fcaf3e ...
mit
ohio813/pyflag
src/plugins_old/aff4/aff4fuse.py
5
9111
#!/usr/bin/python2.6 from aff4 import * import stat from errno import * import pdb # pull in some spaghetti to make this stuff work without fuse-py being installed try: import _find_fuse_parts except ImportError: pass import fuse from fuse import Fuse if not hasattr(fuse, '__version__'): raise RuntimeErr...
gpl-2.0
connorimes/servo
tests/wpt/css-tests/tools/html5lib/doc/conf.py
436
9028
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # html5lib documentation build configuration file, created by # sphinx-quickstart on Wed May 8 00:04:49 2013. # # 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 # aut...
mpl-2.0
stackmachine/bearweb
bearweb/urls/site.py
1
1692
from django.conf import settings from django.conf.urls import patterns, include, url from django.views.generic import TemplateView # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() from games.views import download, IdenticonDetail from core.views import ContactV...
mit
LibriCerule/Cerulean_Tracking
env/lib/python3.5/site-packages/jinja2/visitor.py
1401
3316
# -*- coding: utf-8 -*- """ jinja2.visitor ~~~~~~~~~~~~~~ This module implements a visitor for the nodes. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from jinja2.nodes import Node class NodeVisitor(object): """Walks the abstract syntax tree and call visitor functions for every...
mit
zhjunlang/kbengine
kbe/res/scripts/common/Lib/encodings/cp858.py
270
34015
""" 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...
lgpl-3.0
arnavd96/Cinemiezer
myvenv/lib/python3.4/site-packages/django/core/files/utils.py
395
1338
from django.utils import six class FileProxyMixin(object): """ A mixin class used to forward file methods to an underlaying file object. The internal file object has to be called "file":: class FileProxy(FileProxyMixin): def __init__(self, file): self.file = file ...
mit
yegle/v2ex
html5lib/ihatexml.py
129
15309
import re baseChar = """[#x0041-#x005A] | [#x0061-#x007A] | [#x00C0-#x00D6] | [#x00D8-#x00F6] | [#x00F8-#x00FF] | [#x0100-#x0131] | [#x0134-#x013E] | [#x0141-#x0148] | [#x014A-#x017E] | [#x0180-#x01C3] | [#x01CD-#x01F0] | [#x01F4-#x01F5] | [#x01FA-#x0217] | [#x0250-#x02A8] | [#x02BB-#x02C1] | #x0386 | [#x0388-#x038A] ...
bsd-3-clause
dpetzold/django
tests/sites_framework/migrations/0001_initial.py
281
1672
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ] operations = [ migrations.CreateModel( name='CustomArticle', fields=[ ...
bsd-3-clause
sander76/home-assistant
homeassistant/components/vera/binary_sensor.py
3
1657
"""Support for Vera binary sensors.""" from __future__ import annotations from typing import Callable import pyvera as veraApi from homeassistant.components.binary_sensor import ( DOMAIN as PLATFORM_DOMAIN, ENTITY_ID_FORMAT, BinarySensorEntity, ) from homeassistant.config_entries import ConfigEntry from ...
apache-2.0
kybi/django-haystack
haystack/utils/__init__.py
10
2337
from __future__ import unicode_literals import re from django.conf import settings from django.utils import six from haystack.constants import ID, DJANGO_CT, DJANGO_ID from haystack.utils.highlighting import Highlighter try: from django.utils import importlib except ImportError: import importlib IDENTIFIER_...
bsd-3-clause
serensoner/CouchPotatoServer
libs/chardet/sbcsgroupprober.py
2936
3291
######################## 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...
gpl-3.0
sjthespian/ZenPacks.community.FlexLM
ZenPacks/community/FlexLM/modeler/plugins/community/cmd/FlexLM.py
1
4273
# Module-level documentation will automatically be shown as additional # information for the modeler plugin in the web interface. """ FlexLM An flexLM plugin that collects licenses under FlexLM control """ # When configuring modeler plugins for a device or device class, this plugin's # name would be community.cmd.Flex...
gpl-2.0
tengpeng/spark
examples/src/main/python/ml/random_forest_regressor_example.py
123
2692
# # 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
smkr/pyclipse
plugins/org.python.pydev.jython/Lib/poplib.py
8
9421
"""A POP3 client class. Based on the J. Myers POP3 draft, Jan. 96 """ # Author: David Ascher <david_ascher@brown.edu> # [heavily stealing from nntplib.py] # Updated: Piers Lauder <piers@cs.su.oz.au> [Jul '97] # String method conversion and test jig improvements by ESR, February 2001. # Example (see the test ...
epl-1.0
zh3036/graphql_flask_pony_crunchBase
flask_pony_graphne/lib/python3.5/site-packages/setuptools/command/easy_install.py
37
85872
#!/usr/bin/env python """ Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ https://pythonhosted.org/setuptools/easy_install.html """ from...
mit
bonitadecker77/python-for-android
python3-alpha/python3-src/Lib/getopt.py
62
7322
"""Parser for command line options. This module helps scripts to parse the command line arguments in sys.argv. It supports the same conventions as the Unix getopt() function (including the special meanings of arguments of the form `-' and `--'). Long options similar to those supported by GNU software may be used as ...
apache-2.0
0be1/ansible
lib/ansible/inventory/expand_hosts.py
148
4326
# (c) 2012, Zettar Inc. # Written by Chin Fang <fangchin@zettar.com> # # This file is part of Ansible # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at y...
gpl-3.0
dantebarba/docker-media-server
plex/Sub-Zero.bundle/Contents/Libraries/Shared/chardet/langgreekmodel.py
269
12688
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 R...
gpl-3.0
Kast0rTr0y/ansible
lib/ansible/cli/adhoc.py
22
7695
# (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
DBMandrake/osmc
package/mediacenter-skin-osmc/files/usr/share/kodi/addons/script.module.unidecode/lib/unidecode/x071.py
252
4670
data = ( 'Hu ', # 0x00 'Xi ', # 0x01 'Shu ', # 0x02 'He ', # 0x03 'Xun ', # 0x04 'Ku ', # 0x05 'Jue ', # 0x06 'Xiao ', # 0x07 'Xi ', # 0x08 'Yan ', # 0x09 'Han ', # 0x0a 'Zhuang ', # 0x0b 'Jun ', # 0x0c 'Di ', # 0x0d 'Xie ', # 0x0e 'Ji ', # 0x0f 'Wu ', # 0x10 '[?] ', ...
gpl-2.0
Gachette/ProjetImmo
Scraping/scrapybot/scrapybot/proxy.py
2
12230
PROXIES = [ {"ip_port": "218.94.149.114:8080"}, {"ip_port": "202.51.120.58:8080"}, {"ip_port": "180.244.214.180:8080"}, {"ip_port": "186.216.160.147:8080"}, {"ip_port": "61.153.149.205:8080"}, {"ip_port": "221.176.214.246:8080"}, {"ip_port": "59.172.208.186:8080"}, {"ip_port": "61.167.49...
apache-2.0
nstockton/mapperproxy-mume
tests/mapper/test_mudevents.py
1
1842
# 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/. # Future Modules: from __future__ import annotations # Built-in Modules: import socket from unittest import TestCase f...
mpl-2.0
manisandro/QGIS
python/plugins/processing/tests/QgisAlgorithmsTest.py
6
3859
# -*- coding: utf-8 -*- """ *************************************************************************** QgisAlgorithmTests.py --------------------- Date : January 2016 Copyright : (C) 2016 by Matthias Kuhn Email : matthias@opengis.ch ***********************...
gpl-2.0
Emergya/icm-openedx-educamadrid-platform-basic
lms/djangoapps/class_dashboard/urls.py
163
1470
""" Class Dashboard API endpoint urls. """ from django.conf.urls import patterns, url from django.conf import settings COURSE_ID_PATTERN = settings.COURSE_ID_PATTERN urlpatterns = patterns( '', # Json request data for metrics for entire course url(r'^{}/all_sequential_open_distrib$'.format(settings.COURS...
agpl-3.0
JoeyCodinja/INFO3180PROJECT3
lib/werkzeug/testsuite/__init__.py
99
7756
# -*- coding: utf-8 -*- """ werkzeug.testsuite ~~~~~~~~~~~~~~~~~~ Contains all test Werkzeug tests. :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import re import sys import unittest import shutil import tempfile im...
apache-2.0
sky7sea/linux
tools/perf/scripts/python/event_analyzing_sample.py
4719
7393
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
gpl-2.0
jefffohl/nupic
tests/swarming/nupic/swarming/experiments/legacy_cla_multistep/description.py
32
13392
# ---------------------------------------------------------------------- # 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
NunoEdgarGub1/scikit-learn
examples/cross_decomposition/plot_compare_cross_decomposition.py
142
4761
""" =================================== Compare cross decomposition methods =================================== Simple usage of various cross decomposition algorithms: - PLSCanonical - PLSRegression, with multivariate response, a.k.a. PLS2 - PLSRegression, with univariate response, a.k.a. PLS1 - CCA Given 2 multivari...
bsd-3-clause
mdblv2/joatu-django
application/site-packages/django/contrib/gis/geometry/test_data.py
210
3013
""" This module has the mock object definitions used to hold reference geometry for the GEOS and GDAL tests. """ import json import os from django.contrib import gis from django.utils import six from django.utils._os import upath # This global used to store reference geometry data. GEOMETRIES = None # Path where re...
apache-2.0
Cnfc19932/scrapy
scrapy/core/downloader/handlers/ftp.py
130
4134
""" An asynchronous FTP file download handler for scrapy which somehow emulates an http response. FTP connection parameters are passed using the request meta field: - ftp_user (required) - ftp_password (required) - ftp_passive (by default, enabled) sets FTP connection passive mode - ftp_local_filename - If not...
bsd-3-clause
shail2810/nova
nova/tests/unit/api/openstack/compute/test_deferred_delete.py
35
7335
# 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.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0