repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
EIREXE/SpaceDock
refs/heads/dev
alembic/versions/46d0c3d3104_update_mod_media_schema.py
2
"""Update mod/media schema Revision ID: 46d0c3d3104 Revises: 2ef141f5132 Create Date: 2014-06-06 00:34:39.866314 """ # revision identifiers, used by Alembic. revision = '46d0c3d3104' down_revision = '2ef141f5132' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto ...
Eelviny/nxt-python
refs/heads/master
nxt/ipsock.py
3
# nxt.ipsock module -- Server socket communication with LEGO Minstorms NXT # Copyright (C) 2011 zonedaobne, Marcus Wanner # # 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 t...
nevrenato/HetsAlloy
refs/heads/master
FreeCAD/BrepConversion/src/brep_reader.py
6
from OCC.Display.SimpleGui import * from OCC import BRep from OCC.BRepTools import * from OCC import TopoDS from OCC.Message import Message_PrinterOStream import sys fileName = 'input.brp' if (len(sys.argv) > 1): fileName = sys.argv[1] brep_instance = BRepTools() shape = TopoDS.TopoDS_Shape() builder = BRep.BRe...
apyrgio/synnefo
refs/heads/release-0.16
snf-cyclades-app/synnefo/logic/servers.py
1
# Copyright (C) 2010-2014 GRNET S.A. # # 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 distributed i...
wsgicabal/wiseguy
refs/heads/master
wiseguy/components/notfound.py
1
""" main: component: notfound """ from wiseguy import WSGIComponent class NotFoundFactory(object): def __init__(self, **kwargs): self.kwargs = kwargs def __call__(self, environ, start_response): from webob.exc import HTTPNotFound r = HTTPNotFound() return r(environ, start_...
synweap15/pyload
refs/heads/stable
module/plugins/hoster/NovafileCom.py
15
# -*- coding: utf-8 -*- # # Test links: # http://novafile.com/vfun4z6o2cit # http://novafile.com/s6zrr5wemuz4 from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo class NovafileCom(XFSHoster): __name__ = "NovafileCom" __type__ = "hoster" __version__ = "0.06" __status__ = "te...
mcr/ietfdb
refs/heads/master
ietf/cookies/__init__.py
1
# Copyright The IETF Trust 2010, All Rights Reserved # coding: latin-1 from types import ModuleType import urls, views # These people will be sent a stack trace if there's an uncaught exception in # code any of the modules imported above: DEBUG_EMAILS = [ ('Tero Kivinen', 'kivinen@iki.fi'), ] for k in locals().k...
wolf29/games
refs/heads/master
py-proj-building-blocks/python3-chardet-2.0.1/chardet/langthaimodel.py
25
######################## 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 Ri...
trwired/upath
refs/heads/master
test/test_upath.py
1
import os from upath.upath import translate_path, split_path def test_path_with_drive_letter(): path_in = r'C:\Python27' path_out = 'C:/Python27' assert translate_path(path_in) == path_out def test_path_with_trailing_backslash(): path_in = r'C:\Python27\\' path_out = 'C:/Python27/' assert t...
the-blue-alliance/the-blue-alliance
refs/heads/master
helpers/user_bundle.py
8
from google.appengine.ext import ndb from google.appengine.api import users from models.account import Account from models.mobile_client import MobileClient class UserBundle(object): """ UserBundle encapsulates a bunch of Google AppEngine user management stuff to make it easier for templates. """ ...
guettli/django
refs/heads/master
django/conf/locale/ja/formats.py
619
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'Y年n月j日' TIME_FORMAT = 'G:i' DATET...
mhnatiuk/phd_sociology_of_religion
refs/heads/master
scrapper/build/scrapy/scrapy/xlib/pydispatch/dispatcher.py
15
"""Multiple-producer-multiple-consumer signal-dispatching dispatcher is the core of the PyDispatcher system, providing the primary API and the core logic for the system. Module attributes of note: Any -- Singleton used to signal either "Any Sender" or "Any Signal". See documentation of the _Any class. Anonymous...
vertigo235/Sick-Beard-XEM
refs/heads/master
lib/unidecode/x0bd.py
253
data = ( 'bols', # 0x00 'bolt', # 0x01 'bolp', # 0x02 'bolh', # 0x03 'bom', # 0x04 'bob', # 0x05 'bobs', # 0x06 'bos', # 0x07 'boss', # 0x08 'bong', # 0x09 'boj', # 0x0a 'boc', # 0x0b 'bok', # 0x0c 'bot', # 0x0d 'bop', # 0x0e 'boh', # 0x0f 'bwa', # 0x10 'bwag', # 0x...
kobejean/tensorflow
refs/heads/master
tensorflow/contrib/distributions/python/ops/bijectors/invert.py
35
# 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...
larsmans/scikit-learn
refs/heads/master
examples/model_selection/grid_search_text_feature_extraction.py
253
""" ========================================================== Sample pipeline for text feature extraction and evaluation ========================================================== The dataset used in this example is the 20 newsgroups dataset which will be automatically downloaded and then cached and reused for the do...
devs4v/devs4v-information-retrieval15
refs/heads/master
project/venv/lib/python2.7/site-packages/django/contrib/admin/validation.py
82
from django.contrib.admin.utils import NotRelationField, get_fields_from_path from django.core.exceptions import FieldDoesNotExist, ImproperlyConfigured from django.db import models from django.forms.models import ( BaseModelForm, BaseModelFormSet, _get_foreign_key, ) """ Does basic ModelAdmin option validation. C...
neumerance/deploy
refs/heads/master
.venv/lib/python2.7/site-packages/cinderclient/tests/v1/test_quotas.py
3
# Copyright 2011 OpenStack LLC. # 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 b...
quasiben/doto
refs/heads/master
doto/commands/wait.py
2
''' Info of a droplet eg: doto info droplet_name ip_address ''' from __future__ import print_function from doto import connect_d0 import sys from doto.event import Event def print_callback(wait_status, event): print("Waiting for status to be %s (got %s) at %s%%" % (wait_status, event.status, event.data.get('pe...
altsen/diandiyun-platform
refs/heads/master
lms/djangoapps/course_wiki/course_nav.py
6
import re from urlparse import urlparse from django.http import Http404 from django.shortcuts import redirect from django.conf import settings from django.core.exceptions import PermissionDenied from wiki.models import reverse as wiki_reverse from courseware.access import has_access from courseware.courses import get...
hfp/tensorflow-xsmm
refs/heads/master
tensorflow/contrib/learn/python/learn/learn_io/data_feeder_test.py
25
# 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...
d3sp0s/theharvester
refs/heads/master
lib/markup.py
43
# This code is in the public domain, it comes # with absolutely no warranty and you can do # absolutely whatever you want with it. __date__ = '17 May 2007' __version__ = '1.7' __doc__= """ This is markup.py - a Python module that attempts to make it easier to generate HTML/XML from a Python program in an intuitive, li...
alexandrucoman/vbox-nova-driver
refs/heads/master
nova/virt/vmwareapi/__init__.py
97
# Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
matburt/ansible
refs/heads/devel
lib/ansible/utils/module_docs_fragments/vca.py
21
# (c) 2016, Charles Paul <cpaul@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 # (at your option) any later versio...
jjmiranda/edx-platform
refs/heads/master
lms/djangoapps/student_account/test/test_views.py
1
# -*- coding: utf-8 -*- """ Tests for student account views. """ import logging import re from unittest import skipUnless from urllib import urlencode import mock import ddt from django.conf import settings from django.core import mail from django.core.files.uploadedfile import SimpleUploadedFile from django.core.url...
Abi1ity/uniclust2.0
refs/heads/master
flask/lib/python2.7/site-packages/django/middleware/common.py
52
import hashlib import logging import re import warnings from django.conf import settings from django.core.mail import mail_managers from django.core import urlresolvers from django import http from django.utils.deprecation import RemovedInDjango18Warning from django.utils.encoding import force_text from django.utils.h...
gkotton/neutron
refs/heads/master
neutron/extensions/agent.py
16
# Copyright (c) 2013 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
nuobit/odoo-addons
refs/heads/11.0
connector_sage/models/payroll_sage_payslip_check/binding.py
1
# Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>) # Eric Antones <eantones@nuobit.com> # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) from odoo import models, fields from odoo.addons.component.core import Component from odoo.addons.queue_job.job import job class PayslipCheck(models.Model...
mccdaq/mcculw
refs/heads/master
examples/ui/ULDI03.py
1
""" File: ULDI03.py Library Call Demonstrated: mcculw.ul.d_in_scan() Purpose: Reads digital input port(s) at specified rate and number of samples. Demonstration: Configures the first one or two digital scan...
mehdi149/Learning-projects
refs/heads/master
rest-server/rest_server/rest_server/urls.py
1
"""rest_server URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Clas...
SOKP/external_chromium_org
refs/heads/sokp-l5.1
tools/perf/benchmarks/service_worker.py
32
# Copyright 2014 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. import page_sets from telemetry import benchmark from telemetry.page import page_test from telemetry.value import scalar class _ServiceWorkerMeasurement(pa...
amaozhao/basecms
refs/heads/master
unidecode/x06b.py
252
data = ( 'Xiang ', # 0x00 'Nong ', # 0x01 'Bo ', # 0x02 'Chan ', # 0x03 'Lan ', # 0x04 'Ju ', # 0x05 'Shuang ', # 0x06 'She ', # 0x07 'Wei ', # 0x08 'Cong ', # 0x09 'Quan ', # 0x0a 'Qu ', # 0x0b 'Cang ', # 0x0c '[?] ', # 0x0d 'Yu ', # 0x0e 'Luo ', # 0x0f 'Li ', # 0x10 ...
zangree/ryu
refs/heads/master
ryu/controller/controller.py
3
# Copyright (C) 2011, 2012 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2011, 2012 Isaku Yamahata <yamahata at valinux co jp> # # 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 # ...
flh/odoo
refs/heads/master
addons/decimal_precision/tests/test_qweb_float.py
103
# -*- coding: utf-8 -*- from openerp.tests import common class TestFloatExport(common.TransactionCase): def setUp(self): super(TestFloatExport, self).setUp() self.Model = self.registry('decimal.precision.test') def get_converter(self, name): converter = self.registry('ir.qweb.field.flo...
Icenowy/MissionPlanner
refs/heads/master
Lib/encodings/cp866.py
93
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP866.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_map) def decode(self,input,errors=...
Tiotao/morpherpy
refs/heads/master
env/Lib/site-packages/requests/api.py
637
# -*- coding: utf-8 -*- """ requests.api ~~~~~~~~~~~~ This module implements the Requests API. :copyright: (c) 2012 by Kenneth Reitz. :license: Apache2, see LICENSE for more details. """ from . import sessions def request(method, url, **kwargs): """Constructs and sends a :class:`Request <Request>`. Retur...
Pablo126/SSBW
refs/heads/master
Tarea4/tarea4/lib/python3.5/site-packages/django/contrib/gis/gdal/libgdal.py
64
from __future__ import unicode_literals import logging import os import re from ctypes import CDLL, CFUNCTYPE, c_char_p, c_int from ctypes.util import find_library from django.contrib.gis.gdal.error import GDALException from django.core.exceptions import ImproperlyConfigured logger = logging.getLogger('django.contri...
gdi2290/django
refs/heads/master
django/contrib/auth/tests/test_tokens.py
117
from datetime import date, timedelta import sys import unittest from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.tokens import PasswordResetTokenGenerator from django.contrib.auth.tests.utils import skipIfCustomUser from django.test import TestCase @skipIfCustomUs...
akionakamura/scikit-learn
refs/heads/master
examples/datasets/plot_random_dataset.py
348
""" ============================================== Plot randomly generated classification dataset ============================================== Plot several randomly generated 2D classification datasets. This example illustrates the :func:`datasets.make_classification` :func:`datasets.make_blobs` and :func:`datasets....
miltonruelas/cursotecnico
refs/heads/7.0
branch/stock_serial/__openerp__.py
1
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 Cubic ERP - Teradata SAC (<http://cubicerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the...
sourlows/rating-cruncher
refs/heads/master
test/lib/pbr/packaging.py
9
# Copyright 2011 OpenStack LLC. # Copyright 2012-2013 Hewlett-Packard Development Company, L.P. # 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 # # htt...
veger/ansible
refs/heads/devel
test/units/modules/network/f5/test_bigip_device_group_member.py
21
# -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks Inc. # GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import json import pytest import sys if sys.version_info < (2, ...
bolkedebruin/airflow
refs/heads/master
airflow/migrations/versions/0a2a5b66e19d_add_task_reschedule_table.py
6
# 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...
JarbasAI/JarbasAI
refs/heads/patch-15
mycroft/util/format.py
1
# -*- coding: iso-8859-15 -*- # Copyright 2017 Mycroft AI, Inc. # # This file is part of Mycroft Core. # # Mycroft Core 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 # (a...
jezdez/kuma
refs/heads/master
kuma/core/urlresolvers.py
25
import threading from django.conf import settings from django.test.client import RequestFactory from django.core.urlresolvers import reverse as django_reverse from django.utils.translation.trans_real import parse_accept_lang_header # Thread-local storage for URL prefixes. Access with (get|set)_url_prefix. _locals = ...
chubbymaggie/LSHBOX
refs/heads/master
include/eigen/debug/gdb/printers.py
143
# -*- coding: utf-8 -*- # This file is part of Eigen, a lightweight C++ template library # for linear algebra. # # Copyright (C) 2009 Benjamin Schindler <bschindler@inf.ethz.ch> # # 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 ...
eusoubrasileiro/fatiando
refs/heads/sim-class-improvements
fatiando/gravmag/euler.py
2
""" Euler deconvolution methods for potential fields. **Implementations** * :class:`~fatiando.gravmag.euler.Classic`: The classic 3D solution to Euler's equation for potential fields (Reid et al., 1990). Runs on the whole dataset. **Solution selection procedures** * :class:`~fatiando.gravmag.euler.ExpandingWindow...
thejdeep/CoAPthon
refs/heads/master
coapthon/messages/option.py
4
from coapthon import defines from coapthon.utils import byte_len __author__ = 'Giacomo Tanganelli' class Option(object): """ Class to handle the CoAP Options. """ def __init__(self): """ Data structure to store options. """ self._number = None self._value = Non...
paulmathews/nova
refs/heads/stable/folsom
nova/virt/vmwareapi/vim_util.py
21
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # htt...
mfherbst/spack
refs/heads/develop
var/spack/repos/builtin/packages/perl-graph-readwrite/package.py
5
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
ddiss/ceph-deploy
refs/heads/master
ceph_deploy/hosts/suse/uninstall.py
3
from ceph_deploy.lib import remoto def uninstall(conn, purge=False): packages = [ 'ceph', 'libcephfs1', 'librados2', 'librbd1', 'ceph-radosgw', ] cmd = [ 'zypper', '--non-interactive', '--quiet', 'remove', ] cmd.exten...
jalaziz/django-guardian
refs/heads/master
utils.py
85
def show_settings(settings, action): import guardian from django.utils.termcolors import colorize guardian_path = guardian.__path__[0] msg = "django-guardian module's path: %r" % guardian_path print(colorize(msg, fg='magenta')) db_conf = settings.DATABASES['default'] output = [] msg = ...
lhilt/scipy
refs/heads/master
scipy/linalg/tests/test_solvers.py
4
from __future__ import division, print_function, absolute_import import os import numpy as np from numpy.testing import assert_array_almost_equal import pytest from pytest import raises as assert_raises from scipy.linalg import solve_sylvester from scipy.linalg import solve_continuous_lyapunov, solve_discrete_lyapun...
taichatha/youtube-dl
refs/heads/master
youtube_dl/extractor/libsyn.py
106
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import unified_strdate class LibsynIE(InfoExtractor): _VALID_URL = r'(?P<mainurl>https?://html5-player\.libsyn\.com/embed/episode/id/(?P<id>[0-9]+))' _TESTS = [{ 'url': 'http://html5-pla...
xaviercobain88/framework-python
refs/heads/master
openerp/addons/l10n_fr/wizard/fr_report_bilan.py
45
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr # # WARNING: This program as such is intended to be used by professional # programmers who take the whole responsability of assessing all potential #...
justasabc/python_tutorials
refs/heads/master
tutorial/thread/thread.py
1
import threading import time exitFlag = 0 def print_time(threadName,delay,counter): while counter: if exitFlag: thread.exit() time.sleep(delay) print("{0}: {1}".format(threadName,time.ctime(time.time()))) counter -=1 class MyThread(threading.Thread): """ a simple thread """ def __init__(self,threadID...
mluo613/osf.io
refs/heads/develop
api/citations/views.py
4
from api.base import permissions as base_permissions from api.base.filters import ODMFilterMixin from api.base.pagination import NoMaxPageSizePagination from api.base.utils import get_object_or_error from api.base.views import JSONAPIBaseView from api.citations.serializers import CitationSerializer from framework.auth....
levenlabs/ansible
refs/heads/stable-2.1
test/units/parsing/test_unquote.py
80
# coding: utf-8 # (c) 2015, 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 # (at your o...
cafecivet/django_girls_tutorial
refs/heads/master
Lib/encodings/iso8859_16.py
593
""" Python Character Mapping Codec iso8859_16 generated from 'MAPPINGS/ISO8859/8859-16.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...
lcpt/xc
refs/heads/master
verif/tests/materials/uniaxial/test_concrete02_02.py
1
# -*- coding: utf-8 -*- __author__= "Ana Ortega (AO_O) " __copyright__= "Copyright 2016, AO_O" __license__= "GPL" __version__= "3.0" __email__= "ana.ortega@ciccp.es " ''' Test of material concrete02 constitutive model. In the tensile Branch, the post-cracking range is initially approximated with a exponential deca...
Qinusty/rethinkdb
refs/heads/next
test/rql_test/connections/http_support/werkzeug/wsgi.py
146
# -*- coding: utf-8 -*- """ werkzeug.wsgi ~~~~~~~~~~~~~ This module implements WSGI related helpers. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import os import sys import posixpath import mimetypes from itert...
mldbai/mldb
refs/heads/master
ext/hoedown/test/runner.py
11
#!/usr/bin/env python # -*- coding: utf-8 -*- import difflib import json import os import re import subprocess import unittest TEST_ROOT = os.path.dirname(__file__) PROJECT_ROOT = os.path.dirname(TEST_ROOT) HOEDOWN = [os.path.abspath(os.path.join(PROJECT_ROOT, 'hoedown'))] TIDY = ['tidy', '--show-body-only', '1', '--...
ledusledus/elevator
refs/heads/master
dxf_writer.py
1
from dxfwrite import DXFEngine def WriteDXF(filename, lines, elevations, scaler): drawing = DXFEngine.drawing(filename) for idx in xrange(len( lines )): points = [] for point in lines[idx]: points.append(scaler.inverse((point[0], point[1]))) drawing.add(DXFEngine.polyline(po...
pnorman/mapnik
refs/heads/master
plugins/input/csv/build.py
2
# # This file is part of Mapnik (c++ mapping toolkit) # # Copyright (C) 2015 Artem Pavlenko # # Mapnik 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 op...
Jonekee/chromium.src
refs/heads/nw12
third_party/typ/typ/fakes/host_fake.py
36
# Copyright 2014 Dirk Pranke. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
LiFengPro/trazip
refs/heads/dev
trazip/urls.py
1
"""trazip URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-bas...
suncycheng/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/localflavor/in_/forms.py
309
""" India-specific Form helpers. """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.utils.encoding import smart_unicode from django.utils.translation import gettext import re class INZipCodeField(RegexFiel...
OkBuilds/buck
refs/heads/master
third-party/py/pex/pex/environment.py
52
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, print_function import itertools import os import site import sys import uuid from pkg_resources import ( DistributionNotFound, Environment...
anders94/mitcoin
refs/heads/master
qa/rpc-tests/receivedby.py
1
#!/usr/bin/env python2 # Copyright (c) 2014 The mitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the listreceivedbyaddress API from test_framework.test_framework import mitcoinTestFramework from ...
ddraj/hbase-trunk-mttr
refs/heads/master
hbase-examples/src/main/python/gen-py/hbase/ttypes.py
43
# # Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TProtocol tr...
inspirehep/sqlalchemy
refs/heads/inspire
test/dialect/postgresql/test_reflection.py
5
# coding: utf-8 from sqlalchemy.engine import reflection from sqlalchemy.testing.assertions import eq_, assert_raises, \ AssertsExecutionResults from sqlalchemy.testing import fixtures from sqlalchemy import testing from sqlalchemy import inspect from sqlalchemy import Table, Column, MetaData, Integer, String, \ ...
cancro7/gem5
refs/heads/master
src/mem/slicc/symbols/Action.py
92
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # 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 co...
bolabola/PTVS
refs/heads/master
Python/Tests/TestData/Grammar/FromFuture26.py
18
from __future__ import print_function from __future__ import unicode_literals
kidaa/convergences
refs/heads/master
generate_dataset.py
2
# -*- coding: utf-8 -*- from __future__ import division import os import sys from math import ceil from collections import defaultdict import codecs import json from multiprocessing import Pool as ThreadPool import click from pync import Notifier import wekeypedia from wekeypedia.wikipedia.api import api as api...
ormnv/os_final_project
refs/heads/master
django/contrib/gis/db/backends/oracle/creation.py
620
from django.db.backends.oracle.creation import DatabaseCreation from django.db.backends.util import truncate_name class OracleCreation(DatabaseCreation): def sql_indexes_for_field(self, model, f, style): "Return any spatial index creation SQL for the field." from django.contrib.gis.db.models.field...
yongshengwang/hue
refs/heads/master
desktop/core/ext-py/tablib-0.10.0/tablib/packages/xlrd/xldate.py
73
# -*- coding: cp1252 -*- # No part of the content of this file was derived from the works of David Giffin. ## # <p>Copyright © 2005-2008 Stephen John Machin, Lingfo Pty Ltd</p> # <p>This module is part of the xlrd package, which is released under a BSD-style licence.</p> # # <p>Provides function(s) for dealing with M...
Laimiux/mydeatree
refs/heads/master
django/core/management/commands/cleanup.py
350
import datetime from django.core.management.base import NoArgsCommand class Command(NoArgsCommand): help = "Can be run as a cronjob or directly to clean out old data from the database (only expired sessions at the moment)." def handle_noargs(self, **options): from django.db import transaction ...
trishnaguha/ansible
refs/heads/devel
lib/ansible/modules/network/panos/panos_match_rule.py
26
#!/usr/bin/python # -*- coding: utf-8 -*- # # Ansible module to manage PaloAltoNetworks Firewall # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 publish...
nconlisk/python
refs/heads/master
VTK/abq_rpt.py
1
import os import io import csv from abaqus import * from abaqusConstants import * ######################################################## # # # Author: Noel Conlisk # # Email: noecon@gmail.com # # Scr...
saintdragon2/python-3-lecture-2015
refs/heads/master
civil-final/1st_presentation/11조/pygame/tests/run_tests__tests/print_stdout/__init__.py
6353
# empty
rsteca/python-social-auth
refs/heads/master
social/backends/qiita.py
70
""" Qiita OAuth2 backend, docs at: http://psa.matiasaguirre.net/docs/backends/qiita.html http://qiita.com/api/v2/docs#get-apiv2oauthauthorize """ import json from social.backends.oauth import BaseOAuth2 class QiitaOAuth2(BaseOAuth2): """Qiita OAuth authentication backend""" name = 'qiita' AUTHOR...
IndraVikas/scikit-neuralnetwork
refs/heads/master
examples/bench_cifar10.py
5
# -*- coding: utf-8 -*- from __future__ import (absolute_import, unicode_literals, print_function) import sys import pickle import numpy as np PRETRAIN = False def load(name): # Pickle module isn't backwards compatible. Hack so it works: compat = {'encoding': 'latin1'} if sys.version_info[0] == 3 else {} ...
movmov/cc
refs/heads/master
vendor/Twisted-10.0.0/twisted/pair/test/test_rawudp.py
55
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. # from twisted.trial import unittest from twisted.internet import protocol, reactor, error from twisted.python import failure from twisted.pair import rawudp class MyProtocol(protocol.DatagramProtocol): def __init__(self, expecting...
arizvisa/syringe
refs/heads/master
lib/pecoff/portable/datadirectory.py
1
import sys, ptypes from ptypes import pstruct, parray, ptype, pbinary, pstr, dyn from ..headers import * from . import exports, imports, resources, exceptions, relocations, debug, loader, clr, tls, headers ## directory entry base types class AddressEntry(headers.IMAGE_DATA_DIRECTORY): addressing = staticmethod(virtua...
vorwerkc/pymatgen
refs/heads/master
pymatgen/io/tests/test_lmto.py
5
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. import os import unittest import numpy as np from pymatgen.core.structure import Structure from pymatgen.core.units import Ry_to_eV from pymatgen.electronic_structure.core import Spin from pymatgen.io.lmto im...
tschmorleiz/amcat
refs/heads/master
api/rest/viewsets/coding/coded_article.py
2
########################################################################### # (C) Vrije Universiteit, Amsterdam (the Netherlands) # # # # This file is part of AmCAT - The Amsterdam Content Analysis Toolkit # # ...
tiredtyrant/CloudBot
refs/heads/gonzobot
tests/plugin_tests/test_yelling.py
3
from mock import MagicMock def test_yell_check(): conn = MagicMock() bot = conn.bot plugin_manager = bot.plugin_manager from plugins.yelling import yell_check plugin_manager.find_plugin.return_value = None yell_check(conn, '#yelling', 'aaaaaaaaaaaaaa', bot, 'testuser') conn.cmd.assert_c...
kelvindk/Video-Stabilization
refs/heads/master
boost_1_42_0/tools/build/v2/tools/make.py
4
# Status: being ported by Vladimir Prus # Copyright 2003 Dave Abrahams # Copyright 2003 Douglas Gregor # Copyright 2006 Rene Rivera # Copyright 2002, 2003, 2004, 2005, 2006 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/L...
jamesgk/robofab
refs/heads/master
Docs/Examples/talks/session1_06.py
7
# robothon06 # get a particular glyph from robofab.world import CurrentFont font = CurrentFont() font.info.familyName = "myFamilyName" font.info.styleName = "myStyleName" font.info.autoNaming() print font.info.fullName print font.info.fontName print font.info.fondName
rnestler/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pytest/_pytest/recwarn.py
178
""" recording warnings during test function execution. """ import inspect import _pytest._code import py import sys import warnings import pytest @pytest.yield_fixture def recwarn(request): """Return a WarningsRecorder instance that provides these methods: * ``pop(category=None)``: return last warning matc...
EduPepperPD/pepper2013
refs/heads/master
static/js/vendor/mathjax-MathJax-c9db6ac/docs/source/conf.py
86
# -*- coding: utf-8 -*- # # MathJax documentation build configuration file, created by # sphinx-quickstart on Sun May 16 23:18:19 2010. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All...
dongjoon-hyun/tensorflow
refs/heads/master
tensorflow/compiler/tests/lrn_ops_test.py
9
# 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...
klahnakoski/ActiveData
refs/heads/dev
vendor/jx_base/expressions/is_boolean_op.py
1
# encoding: utf-8 # # # 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/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divis...
geekroot/erpnext
refs/heads/develop
erpnext/setup/setup_wizard/default_website.py
38
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import nowdate class website_maker(object): def __init__(self, args): self.args = args self....
mxcube/lucid
refs/heads/master
setup.py
1
from distutils.core import setup import sys setup(name = "lucid",version = "0.1", description = "Loop and uCrystals Identification", author="E. Francois, J. Kieffer, M. Guijarro (ESRF)", package_dir={"lucid": "lucid"}, packages = ["lucid"])
bzhpwr/MediExports
refs/heads/master
project_env/lib/python2.6/site-packages/pip/_vendor/packaging/_compat.py
901
# Copyright 2014 Donald Stufft # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
henaras/horizon
refs/heads/master
openstack_dashboard/dashboards/project/volumes/utils.py
72
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
tchlux/fmodpy
refs/heads/master
fmodpy/__init__.py
1
# Set up some package-related things. import os DIRECTORY = os.path.dirname(os.path.abspath(__file__)) ABOUT_DIR = os.path.join(DIRECTORY, "about") with open(os.path.join(ABOUT_DIR,"version.txt")) as f: __version__ = f.read().strip() del f # Steal the documentation from .fmodpy, instead of duplicating here. from ....
runfalk/psycospans
refs/heads/master
psycospans/__init__.py
1
from functools import partial, wraps from psycopg2 import connect as _connect from psycopg2.extensions import register_adapter from spans import * from ._utils import adapt_range, register_range_caster, query_range_oids, floatrange_preprocess __all__ = [ "connect", "register_range_type" ] @wraps(_connect) d...
kennethlove/django
refs/heads/master
django/conf/locale/te/formats.py
433
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j F Y' TIME_FORMAT = 'g:i:s A' # DATETIME_FORMAT = # YEAR_MONTH_FORMAT =...
ianmabie/uberpy
refs/heads/master
venv/lib/python2.7/site-packages/wheel/test/test_tool.py
237
from .. import tool def test_keygen(): def get_keyring(): WheelKeys, keyring = tool.get_keyring() class WheelKeysTest(WheelKeys): def save(self): pass class keyringTest: backend = keyring.backend class backends: ...