repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
psibi/pyuClassify
refs/heads/master
uclassify/uclassify.py
1
#!/usr/bin/python # Copyright (C) 2012 Sibi <sibi@psibi.in> # # This file is part of pyuClassify. # # pyuClassify 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 # (...
matrixise/odoo
refs/heads/8.0
addons/survey/wizard/__init__.py
385
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
koobonil/Boss2D
refs/heads/master
Boss2D/addon/opencv-3.1.0_for_boss/3rdparty/jinja2/filters.py
598
# -*- coding: utf-8 -*- """ jinja2.filters ~~~~~~~~~~~~~~ Bundled jinja filters. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import math from random import choice from operator import itemgetter from itertools import groupby from jinja2.utils...
agconti/njode
refs/heads/master
env/lib/python2.7/site-packages/django/core/checks/__init__.py
58
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .messages import (CheckMessage, Debug, Info, Warning, Error, Critical, DEBUG, INFO, WARNING, ERROR, CRITICAL) from .registry import register, run_checks, tag_exists, Tags # Import these to force registration of checks import django.c...
emaeliena/PerfKitBenchmarker
refs/heads/master
perfkitbenchmarker/deployment/shared/ini_constants.py
10
# 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 agr...
peterlauri/django
refs/heads/master
django/contrib/staticfiles/management/commands/collectstatic.py
15
from __future__ import unicode_literals import os from collections import OrderedDict from django.apps import apps from django.contrib.staticfiles.finders import get_finders from django.contrib.staticfiles.storage import staticfiles_storage from django.core.files.storage import FileSystemStorage from django.core.mana...
sszlm/MissionPlanner
refs/heads/master
Lib/site-packages/scipy/ndimage/setupscons.py
64
from numpy.distutils.core import setup from numpy.distutils.misc_util import Configuration from numpy import get_include def configuration(parent_package='', top_path=None): config = Configuration('ndimage', parent_package, top_path) config.add_sconscript("SConstruct") config.add_data_dir('tests') r...
dongjoon-hyun/tensorflow
refs/heads/master
tensorflow/contrib/eager/python/examples/rnn_colorbot/rnn_colorbot.py
16
# 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...
nrz/ylikuutio
refs/heads/master
external/bullet3/examples/pybullet/gym/pybullet_envs/prediction/pybullet_sim_gym_env.py
2
"""This file implements the gym environment of example PyBullet simulation. """ import os, inspect currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) parentdir = os.path.dirname(os.path.dirname(currentdir)) os.sys.path.insert(0, parentdir) import math import time import gym from g...
sergei-maertens/django
refs/heads/master
tests/check_framework/urls/include_with_dollar.py
109
from django.conf.urls import include, url urlpatterns = [ url(r'^include-with-dollar$', include([])), ]
alexschiller/osf.io
refs/heads/develop
scripts/osfstorage/repopulate_sha.py
42
import sys import logging from modularodm import Q from website.app import init_app from website.files.models import FileVersion from scripts import utils as script_utils from framework.transactions.context import TokuTransaction logger = logging.getLogger(__name__) def do_migration(): logger.info('Starting ...
hortonworks/hortonworks-sandbox
refs/heads/master
desktop/core/ext-py/Django-1.2.3/django/conf/locale/pt/formats.py
80
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # DATE_FORMAT = r'j \de F \de Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = r'j \de F \de Y à\s H:i' YEAR_MONTH_FORMAT = r'F \de Y' MONTH_DAY_FORMAT = r'j \de F' SHORT_DATE_FORMAT = 'd/m/Y' SHORT_DATETIME_FORMAT = 'd/m/Y H:...
epssy/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/django/conf/locale/es_MX/formats.py
118
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals DATE_FORMAT = r'j \d\e F \d\e Y' TIME_FORMAT = 'H:i:s' DATETIME_FORMAT = r'j \d\e F \d\e Y \a \l\a\s H:i' YEAR_MONTH_FORMAT = r'F \d\e Y' MONTH_DAY_FORMAT = r'j \d\e F' SHORT_DAT...
josesanch/django-oscar
refs/heads/master
src/oscar/apps/wishlists/admin.py
36
from django.contrib import admin from oscar.core.loading import get_model WishList = get_model('wishlists', 'WishList') Line = get_model('wishlists', 'Line') admin.site.register(WishList) admin.site.register(Line)
xica/hieratic-dynamodb
refs/heads/master
tests/test_flat.py
1
from pytest import fixture, raises from datetime import datetime from hieratic.collection import CollectionResource from hieratic.index import SimpleIndex @fixture def UsersResource(UserResource, ddb_region, ddb_host, ddb_port): @CollectionResource.define( item_class=UserResource, primary_index...
fitermay/intellij-community
refs/heads/master
python/testData/refactoring/extractmethod/MethodContext.after.py
71
class C: def foo(self): self.bar() def bar(self): for x in [1, 2]: print x
aroraenterprise/projecteos
refs/heads/master
backend/pylibs/werkzeug/local.py
159
# -*- coding: utf-8 -*- """ werkzeug.local ~~~~~~~~~~~~~~ This module implements context-local objects. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import copy from functools import update_wrapper from werkzeug.wsgi impo...
jruiperezv/ANALYSE
refs/heads/master
lms/lib/comment_client/__init__.py
259
from .comment_client import * from .utils import ( CommentClientError, CommentClientRequestError, CommentClient500Error, CommentClientMaintenanceError )
Strassengezwitscher/Strassengezwitscher
refs/heads/develop
crowdgezwitscher/facebook/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-24 13:38 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('events', '0001_initial'), ] operations = [ migrations.CreateMode...
Shiroy/servo
refs/heads/master
tests/wpt/css-tests/tools/html5lib/html5lib/treewalkers/pulldom.py
1729
from __future__ import absolute_import, division, unicode_literals from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \ COMMENT, IGNORABLE_WHITESPACE, CHARACTERS from . import _base from ..constants import voidElements class TreeWalker(_base.TreeWalker): def __iter__(self): ignore_until = None...
ZazieTheBeast/oscar
refs/heads/master
oscar/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py
1729
from __future__ import absolute_import, division, unicode_literals from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \ COMMENT, IGNORABLE_WHITESPACE, CHARACTERS from . import _base from ..constants import voidElements class TreeWalker(_base.TreeWalker): def __iter__(self): ignore_until = None...
phildini/petroglyphs
refs/heads/master
petroglyphs/models.py
1
from django.db import models from django.contrib.sites.models import Site class Setting(models.Model): key = models.CharField(max_length=50, unique=True) value = models.TextField() export_to_template = models.BooleanField(default=False) export_to_context = models.BooleanField(default=False) show_...
gogobook/wagtail
refs/heads/master
wagtail/wagtailusers/tests.py
2
from __future__ import unicode_literals from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth import get_user_model from django.contrib.auth.models import Group, Permission from django.utils import six from wagtail.tests.utils import WagtailTestUtils from wagtail.wagta...
adrianmugnoz/Documentacion-Divulgame
refs/heads/master
readthedocs/core/management/commands/reindex_elasticsearch.py
7
import logging from optparse import make_option from django.core.management.base import BaseCommand from django.conf import settings from builds.models import Version from search import parse_json from restapi.utils import index_search_request log = logging.getLogger(__name__) class Command(BaseCommand): opti...
GbalsaC/bitnamiP
refs/heads/master
venv/lib/python2.7/site-packages/flask/ctx.py
776
# -*- 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...
newyork167/volatility
refs/heads/master
volatility/plugins/linux/check_syscall_arm.py
45
# Volatility # # This file is part of Volatility. # # Volatility 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. # # Volatility is dist...
Alberto-Beralix/Beralix
refs/heads/master
i386-squashfs-root/usr/lib/python2.7/dist-packages/ibus/lookuptable.py
2
../../../../share/pyshared/ibus/lookuptable.py
Lawrence-Liu/scikit-learn
refs/heads/master
sklearn/feature_selection/variance_threshold.py
238
# Author: Lars Buitinck <L.J.Buitinck@uva.nl> # License: 3-clause BSD import numpy as np from ..base import BaseEstimator from .base import SelectorMixin from ..utils import check_array from ..utils.sparsefuncs import mean_variance_axis from ..utils.validation import check_is_fitted class VarianceThreshold(BaseEstim...
AlessandroZ/LaZagne
refs/heads/master
Windows/lazagne/softwares/windows/creddump7/addrspace.py
1
# Volatility # Copyright (C) 2007 Volatile Systems # # Original Source: # Copyright (C) 2004,2005,2006 4tphi Research # Author: {npetroni,awalters}@4tphi.net (Nick Petroni and AAron Walters) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
blindFS/powerline
refs/heads/develop
powerline/lib/watcher/stat.py
38
# vim:fileencoding=utf-8:noet from __future__ import (unicode_literals, division, absolute_import, print_function) import os from threading import RLock from powerline.lib.path import realpath class StatFileWatcher(object): def __init__(self): self.watches = {} self.lock = RLock() def watch(self, path): p...
jonathonwalz/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_pool.py
19
#!/usr/bin/python # # Created on Aug 25, 2016 # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the te...
zrhans/pythonanywhere
refs/heads/master
.virtualenvs/django19/lib/python3.4/site-packages/django/contrib/gis/geometry/backend/geos.py
622
from django.contrib.gis.geos import ( GEOSException as GeometryException, GEOSGeometry as Geometry, ) __all__ = ['Geometry', 'GeometryException']
rossburton/yocto-autobuilder
refs/heads/ross
lib/python2.7/site-packages/Twisted-12.2.0-py2.7-linux-x86_64.egg/twisted/test/stdio_test_consumer.py
40
# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTestCase.test_consumer -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Main program for the child process run by L{twisted.test.test_stdio.StandardInputOutputTestCase.test_consumer} to test that process transports implemen...
lostemp/samsung-lt-lsk-v3.10.11
refs/heads/master
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
dpaiton/FeedbackLCA
refs/heads/main
utils/regress_data.py
1
## Copyright 2015 Yahoo Inc. ## Licensed under the terms of the New-BSD license. Please see LICENSE file in the project root for terms. import tensorflow as tf from data.input_data import load_MNIST """ Regress on LCA activity Outputs: Score on test data Inputs: train_data: data to fit train_labels: training gro...
molecular-workflow-repository/molflow
refs/heads/master
molflow/utils.py
1
# Copyright 2017 Autodesk Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
Dandandan/wikiprogramming
refs/heads/master
jsrepl/build/extern/python/closured/lib/python2.7/nturl2path.py
228
"""Convert a NT pathname to a file URL and vice versa.""" def url2pathname(url): """OS-specific conversion from a relative URL of the 'file' scheme to a file system path; not recommended for general use.""" # e.g. # ///C|/foo/bar/spam.foo # becomes # C:\foo\bar\spam.foo import string, urlli...
shane-mason/essentialdb
refs/heads/master
essentialdb/query_filter.py
1
__author__ = 'scmason' from essentialdb import Keys class LogicalOperator: """ Logical)perator rmodels a list of expressions that are bnound by logical operator - inclusing:: { $and: [ { <expression1> }, { <expression2> } , ... , { <expressionN> } ] } { $or: [ { <expression1> }, { <expression2...
supersven/intellij-community
refs/heads/master
python/helpers/pydev/_pydev_imps/_pydev_pkgutil_old.py
234
"""Utilities to support packages.""" # NOTE: This module must remain compatible with Python 2.3, as it is shared # by setuptools for distribution with Python 2.3 and up. import os import sys import imp import os.path from types import ModuleType __all__ = [ 'get_importer', 'iter_importers', 'get_loader', 'find_l...
apple/swift-lldb
refs/heads/stable
packages/Python/lldbsuite/test/commands/help/TestHelp.py
1
""" Test some lldb help commands. See also CommandInterpreter::OutputFormattedHelpText(). """ from __future__ import print_function import os import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class HelpCommandTestCase(TestBase): mydi...
savoirfairelinux/django
refs/heads/master
tests/template_tests/templatetags/testtags.py
145
from django.template import Library, Node register = Library() class EchoNode(Node): def __init__(self, contents): self.contents = contents def render(self, context): return ' '.join(self.contents) @register.tag def echo(parser, token): return EchoNode(token.contents.split()[1:]) reg...
supermihi/pytaglib
refs/heads/master
tests/test_io.py
1
# -*- coding: utf-8 -*- # Copyright 2019 Michael Helmling # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation # from __future__ import unicode_literals import os, stat, sys import taglib...
shubhamgupta123/erpnext
refs/heads/master
erpnext/accounts/doctype/account/chart_of_accounts/verified/standard_chart_of_accounts_with_account_number.py
16
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals from frappe import _ def get(): return { _("Application of Funds (Assets)"): { _("Current Assets"): { _("Accoun...
uwafsl/MissionPlanner
refs/heads/master
Lib/site-packages/numpy/core/tests/test_npy_arraytypes.py
54
import sys import warnings import numpy as np from numpy.testing import * warnings.filterwarnings('ignore', 'Casting complex values to real discards the imaginary part') types = [np.bool_, np.byte, np.ubyte, np.short, np.ushort, np.intc, np.uintc, np.int_, np.uint, np.longlong, np.ulonglong, ...
berinhard/newfies-dialer
refs/heads/master
newfies/custom_admin_tools/menu.py
4
# # Newfies-Dialer License # http://www.newfies-dialer.org # # 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/. # # Copyright (C) 2011-2013 Star2Billing S.L. # # The Initia...
rwatson/chromium-capsicum
refs/heads/chromium-capsicum
third_party/scons/scons-local/SCons/Tool/packaging/src_tarbz2.py
3
"""SCons.Tool.Packaging.tarbz2 The tarbz2 SRC packager. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation # # 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...
fernandog/osmc
refs/heads/master
package/mediacenter-skin-osmc/files/usr/share/kodi/addons/script.module.unidecode/lib/unidecode/x05d.py
252
data = ( 'Lang ', # 0x00 'Kan ', # 0x01 'Lao ', # 0x02 'Lai ', # 0x03 'Xian ', # 0x04 'Que ', # 0x05 'Kong ', # 0x06 'Chong ', # 0x07 'Chong ', # 0x08 'Ta ', # 0x09 'Lin ', # 0x0a 'Hua ', # 0x0b 'Ju ', # 0x0c 'Lai ', # 0x0d 'Qi ', # 0x0e 'Min ', # 0x0f 'Kun ', # 0x10 '...
tgquintela/NetSymulationTools
refs/heads/master
NetTools/NetSimulation/dynamic_operations.py
2
""" Module which groups the different possible dynamics to evolve a system. TODO ---- - More options. """ import numpy as np def next_step_node(method, variables): """This function acts as a switcher between the available methods on this module or apply the one given by method. Parameters -------...
RosiePy/pychess
refs/heads/master
testing/polyglot.py
21
import unittest from pychess.Utils.Board import Board from pychess.Utils.lutils.leval import LBoard # Examples taken from http://alpha.uhasselt.be/Research/Algebra/Toga/book_format.html testcases = [ [ "rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1" , 0x463b96181691fc9c ], [ "rnbqkbnr/pppppppp/...
genti/gnt_questionnaire
refs/heads/master
views.py
1
# -*- coding: utf-8 -*- from urllib import * from django.http import HttpResponseRedirect, Http404,HttpResponse from django.shortcuts import render_to_response,redirect from django.core.context_processors import csrf from django.template import RequestContext from django.shortcuts import get_object_or_404 from gnt_que...
michelts/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/django/http/utils.py
200
""" Functions that modify an HTTP request or response in some way. """ # This group of functions are run as part of the response handling, after # everything else, including all response middleware. Think of them as # "compulsory response middleware". Be careful about what goes here, because # it's a little fiddly to ...
unifycore/ryu
refs/heads/master
ryu/ofproto/nx_match.py
18
# Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2011, 2012 Isaku Yamahata <yamahata at valinux co jp> # Copyright (C) 2012 Simon Horman <horms ad verge net au> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with...
cetic/ansible
refs/heads/devel
hacking/metadata-tool.py
20
#!/usr/bin/env python # (c) 2016-2017, Toshio Kuratomi <tkuratomi@ansible.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 #...
sergeysynergy/graph
refs/heads/master
django/manage.py
152
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
javipalanca/Django-facebook
refs/heads/master
docs/docs_env/Lib/encodings/iso8859_14.py
593
""" Python Character Mapping Codec iso8859_14 generated from 'MAPPINGS/ISO8859/8859-14.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...
anthraxx/arch-security-tracker
refs/heads/master
tracker/model/user.py
3
from tracker import db from .enum import UserRole username_regex = r'^([\w]+)$' class User(db.Model): NAME_LENGTH = 32 EMAIL_LENGTH = 128 SALT_LENGTH = 20 PASSWORD_LENGTH = 80 TOKEN_LENGTH = 120 __tablename__ = 'user' id = db.Column(db.Integer(), index=True, unique=True, primary_key=Tr...
stewartpark/django
refs/heads/master
django/db/backends/postgresql/creation.py
121
import sys from django.db.backends.base.creation import BaseDatabaseCreation class DatabaseCreation(BaseDatabaseCreation): def sql_table_creation_suffix(self): test_settings = self.connection.settings_dict['TEST'] assert test_settings['COLLATION'] is None, ( "PostgreSQL does not supp...
3DP-Unlimited/3DP-Printrun
refs/heads/updated-pengpod1000
printrun/cairosvg/surface/__init__.py
2
# -*- coding: utf-8 -*- # This file is part of CairoSVG # Copyright © 2010-2012 Kozea # # 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 3 of the License, or (at your option...
weiweihuanghuang/Glyphs-Scripts
refs/heads/master
Anchors/Anchor Mover.py
2
#MenuTitle: Anchor Mover 1.1 # -*- coding: utf-8 -*- __doc__=""" Vertically move anchors in selected glyphs (GUI). """ import GlyphsApp import vanilla class AnchorMover(object): def __init__(self): self.w = vanilla.FloatingWindow((340, 40), "Move anchors") self.w.text_anchor = vanilla.TextBox((15, 12+2, 45, 14)...
faroos3/QuoteR
refs/heads/master
client/diff_checker/DiffWord.py
2
''' This is going the be the different word class used to help evaluate which words are different, and which are not. ''' class DiffWord: # all the words should be DiffWords def __init__(self, OWord="", isDiff=True, idex=[-1, -1]): # default constructor for a word for some reason. self.wor...
BorgERP/borg-erp-6of3
refs/heads/master
addons/edi/models/edi.py
3
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011-2012 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of t...
evelinfong/evelinfong.github.io
refs/heads/master
node_modules/utf8/tests/generate-test-data.py
1788
#!/usr/bin/env python import re import json # https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae # http://stackoverflow.com/a/13436167/96656 def unisymbol(codePoint): if codePoint >= 0x0000 and codePoint <= 0xFFFF: return unichr(codePoint) elif codePoint >= 0x010000 and codePoint <= 0x10FFFF: ...
programadorjc/django
refs/heads/master
django/core/mail/backends/smtp.py
477
"""SMTP email backend class.""" import smtplib import ssl import threading from django.conf import settings from django.core.mail.backends.base import BaseEmailBackend from django.core.mail.message import sanitize_address from django.core.mail.utils import DNS_NAME class EmailBackend(BaseEmailBackend): """ A...
jjdmol/LOFAR
refs/heads/master
LCS/Tools/src/makeTest.py
1
#! /usr/bin/env python # Copyright (C) 2005 # ASTRON (Netherlands Institute for Radio Astronomy) # P.O.Box 2, 7990 AA Dwingeloo, The Netherlands # # This file is part of the LOFAR software suite. # The LOFAR software suite is free software: you can redistribute it and/or # modify it under the terms of the GNU General ...
amitjamadagni/sympy
refs/heads/master
examples/advanced/qft.py
2
#!/usr/bin/env python """Quantum field theory example * http://en.wikipedia.org/wiki/Quantum_field_theory This particular example is a work in progress. Currently it calculates the scattering amplitude of the process: electron + positron -> photon -> electron + positron in QED (http://en.wikipedia.org/wiki/Qua...
g19-hs/personfinder
refs/heads/master
app/pytz/zoneinfo/Greenwich.py
9
'''tzinfo timezone information for Greenwich.''' from pytz.tzinfo import StaticTzInfo from pytz.tzinfo import memorized_timedelta as timedelta class Greenwich(StaticTzInfo): '''Greenwich timezone definition. See datetime.tzinfo for details''' zone = 'Greenwich' _utcoffset = timedelta(seconds=0) _tzname...
Patreon/cartographer
refs/heads/master
example/generic_social_network/app/models/tables/post.py
1
from enum import Enum from generic_social_network.app import db from generic_social_network.app.models import EnumType from sqlalchemy import Column, Integer, ForeignKey, String, Text class PostType(Enum): TEXT = 'text' IMAGE = 'image' ALBUM = 'album' VIDEO = 'video' class Post(db.Model): __tab...
mjuric/duplicity
refs/heads/master
testing/unit/__init__.py
6
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright 2012 Canonical Ltd # # This file is part of duplicity. # # Duplicity 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 t...
csuideal/shadowsocks
refs/heads/master
shadowsocks/encrypt.py
990
#!/usr/bin/env python # # Copyright 2012-2015 clowwindy # # 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 la...
JimLiu/shadowsocks
refs/heads/master
shadowsocks/encrypt.py
990
#!/usr/bin/env python # # Copyright 2012-2015 clowwindy # # 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 la...
nilp0inter/django-filter
refs/heads/master
django_filters/views.py
1
from __future__ import unicode_literals from django.shortcuts import render_to_response from django.template import RequestContext from django_filters.filterset import FilterSet def object_filter(request, model=None, queryset=None, template_name=None, extra_context=None, context_processors=None, filter_class=No...
Belxjander/Kirito
refs/heads/master
DarkWallet/Dat.Wallet/ecdsa/der.py
26
from __future__ import division import binascii import base64 from .six import int2byte, b, PY3, integer_types, text_type class UnexpectedDER(Exception): pass def encode_constructed(tag, value): return int2byte(0xa0+tag) + encode_length(len(value)) + value def encode_integer(r): assert r >= 0 # can't sup...
benthomasson/ansible
refs/heads/devel
lib/ansible/plugins/cache/base.py
232
# (c) 2017, ansible by Red Hat # # 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...
SMALLplayer/smallplayer-image-creator
refs/heads/master
storage/.xbmc/addons/net.rieter.xot.smallplayer/resources/libs/helpers/smilhelper.py
1
#=============================================================================== # LICENSE XOT-Framework - CC BY-NC-ND #=============================================================================== # This work is licenced under the Creative Commons # Attribution-Non-Commercial-No Derivative Works 3.0 Unported Li...
dNG-git/mp_core
refs/heads/master
src/dNG/data/upnp/resources/hook_resource.py
1
# -*- coding: utf-8 -*- """ MediaProvider A device centric multimedia solution ---------------------------------------------------------------------------- (C) direct Netware Group - All rights reserved https://www.direct-netware.de/redirect?mp;core The following license agreement remains valid unless any additions o...
carthagecollege/django-djauth
refs/heads/master
djauth/views.py
1
from django.contrib.auth import SESSION_KEY, BACKEND_SESSION_KEY import django def loggedout(request, template_name='accounts/logged_out.html'): """ Remove the authenticated user's ID from the request. """ # django auth try: del request.session[SESSION_KEY] except KeyError: pa...
davidvon/pipa-pay-server
refs/heads/master
site-packages/migrate/changeset/schema.py
2
""" Schema module providing common schema operations. """ import warnings from UserDict import DictMixin import sqlalchemy from sqlalchemy.schema import ForeignKeyConstraint from sqlalchemy.schema import UniqueConstraint from migrate.exceptions import * from migrate.changeset import SQLA_07, SQLA_08 from migrate...
ssanderson/docker-py
refs/heads/master
tests/utils_test.py
2
import os import os.path import unittest from docker.client import Client from docker.errors import DockerException from docker.utils import ( parse_repository_tag, parse_host, convert_filters, kwargs_from_env, create_host_config ) from docker.auth import resolve_authconfig class UtilsTest(unittest.TestCase)...
zhangqifan/findSomething
refs/heads/master
FindSomething/Pods/AVOSCloudCrashReporting/Breakpad/src/tools/gyp/test/no-output/gyptest-no-output.py
349
#!/usr/bin/env python # Copyright (c) 2009 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. """ Verified things don't explode when there are targets without outputs. """ import TestGyp # TODO(evan): in ninja when there are no targ...
sunxfancy/CodeFactory
refs/heads/master
codefactory/click/testing.py
136
import os import sys import shutil import tempfile import contextlib from ._compat import iteritems, PY2 # If someone wants to vendor click, we want to ensure the # correct package is discovered. Ideally we could use a # relative import here but unfortunately Python does not # support that. clickpkg = sys.modules[_...
petrvanblokland/Xierpa3
refs/heads/master
xierpa3/builders/indesignbuilder.py
1
# -*- coding: UTF-8 -*- # ----------------------------------------------------------------------------- # xierpa server # Copyright (c) 2014+ buro@petr.com, www.petr.com, www.xierpa.com # # X I E R P A 3 # Distribution by the MIT License. # # -----------------------------------------------------------...
FrodeSolheim/fs-uae-launcher
refs/heads/master
arcade/glui/gamecenterrunner.py
3
import os import threading from arcade.glui.state import State from fsbc.settings import Settings from fsui.qt import QCursor class GameCenterRunner(object): def __init__( self, controller=None, platform=None, name=None, config=None, **_ ): self.controller = controller self.platform_n...
Cactuslegs/audacity-of-nope
refs/heads/master
lib-src/lv2/sord/waflib/Tools/gnu_dirs.py
329
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os from waflib import Utils,Options,Context _options=[x.split(', ')for x in''' bindir, user executables, ${EXEC_PREFIX}/bin sbindir, system admin executables, ${EXEC_PR...
duyet-website/api.duyet.net
refs/heads/master
lib/faker/providers/internet/de_AT/__init__.py
19
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as InternetProvider class Provider(InternetProvider): free_email_domains = ( 'chello.at', 'gmail.com', 'gmx.at', 'kabsi.at', ) tlds = ('at', 'co.at', 'com', 'net', 'org', ) replacements = ( ('ä', 'ae'), (...
cliqz/socorro
refs/heads/master
socorro/unittest/collector/test_collector_app.py
10
# 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 mock from nose.tools import eq_ from socorro.collector.collector_app import CollectorApp from socorro.collector....
sharifulgeo/networkx
refs/heads/master
networkx/utils/misc.py
14
""" Miscellaneous Helpers for NetworkX. These are not imported into the base networkx namespace but can be accessed, for example, as >>> import networkx >>> networkx.utils.is_string_like('spam') True """ # Copyright (C) 2004-2015 by # Aric Hagberg <hagberg@lanl.gov> # Dan Schult <dschult@colgate.edu> # Pi...
JDShu/SCOPE
refs/heads/master
askbot/conf/sidebar_question.py
4
""" Sidebar settings """ from askbot.conf.settings_wrapper import settings from askbot.deps.livesettings import ConfigurationGroup from askbot.deps.livesettings import values from django.utils.translation import ugettext as _ from askbot.conf.super_groups import CONTENT_AND_UI SIDEBAR_QUESTION = ConfigurationGroup(#shi...
bjorand/django-allauth
refs/heads/master
allauth/socialaccount/providers/fxa/urls.py
73
from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns from .provider import FirefoxAccountsProvider urlpatterns = default_urlpatterns(FirefoxAccountsProvider)
hujiajie/chromium-crosswalk
refs/heads/master
tools/telemetry/third_party/pyfakefs/pyfakefs/fake_filesystem_shutil.py
23
#!/usr/bin/env python # # Copyright 2009 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 requir...
kenshay/ImageScript
refs/heads/master
Script_Runner/PYTHON/Lib/smtplib.py
5
#! /usr/bin/env python3 '''SMTP/ESMTP client class. This should follow RFC 821 (SMTP), RFC 1869 (ESMTP), RFC 2554 (SMTP Authentication) and RFC 2487 (Secure SMTP over TLS). Notes: Please remember, when doing ESMTP, that the names of the SMTP service extensions are NOT the same thing as the option keywords for the R...
shadyueh/pyranking
refs/heads/master
env/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/genshistream.py
1730
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT from . import _base from ..constants import voidElements, namespaces class ...
zhulin2609/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/style/checkers/watchlist_unittest.py
124
# Copyright (C) 2010 Apple Inc. All rights reserved. # Copyright (C) 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 ...
0x1100/glad
refs/heads/master
glad/lang/__init__.py
3
import glad.lang.c import glad.lang.d import glad.lang.volt def get_generator(name, spec): _langs = [glad.lang.c, glad.lang.d, glad.lang.volt] for lang in _langs: gen, loader = lang.get_generator(name, spec) if gen is not None: return gen, loader return None, None
vrenaville/hr
refs/heads/8.0
__unported__/hr_infraction/hr_infraction.py
27
# -*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # 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, eit...
deercoder/0-PhD
refs/heads/master
TensorFlow/ex2/example2.py
3
import numpy as np import tensorflow as tf # Declare list of features, we only have one real-valued feature def model(features, labels, mode): # Build a linear model and predict values W = tf.get_variable("W", [1], dtype=tf.float64) b = tf.get_variable("b", [1], dtype=tf.float64) y = W*features['x'] + b # Los...
muffinresearch/addons-server
refs/heads/master
lib/es/models.py
17
from django.db import models from django.utils import timezone class ReindexingManager(models.Manager): """Used to flag when an elasticsearch reindexing is occuring.""" def _flag_reindexing(self, site, new_index, old_index, alias): """Flag the database for a reindex on the given site.""" if s...
bnzk/django-painless-redirects
refs/heads/develop
painless_redirects/tests/test_middleware.py
2
# coding: utf-8 # dont add this, request.path is non unicode in python 2.7 # or add it, as request.path shoudl be unicode anyway?! # from __future__ import unicode_literals from ..models import Redirect try: reload except NameError: from importlib import reload from django.contrib.sites.models import Site fr...
coreycb/charm-keystone
refs/heads/master
charmhelpers/core/kernel.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2014-2015 Canonical Limited. # # 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 # # Unl...
cjh1/StarCluster
refs/heads/develop
starcluster/tests/test_config.py
19
# Copyright 2009-2014 Justin Riley # # This file is part of StarCluster. # # StarCluster is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later ...
jantuomi/py3status
refs/heads/master
py3status/modules/pingdom.py
10
# -*- coding: utf-8 -*- """ Display the latest response time of the configured Pingdom checks. We also verify the status of the checks and colorize if needed. Pingdom API doc : https://www.pingdom.com/features/api/documentation/ Configuration parameters: - app_key : create an APP KEY on pingdom first ...