repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
specter4mjy/you-get
refs/heads/develop
src/you_get/extractors/tudou.py
2
#!/usr/bin/env python __all__ = ['tudou_download', 'tudou_download_playlist', 'tudou_download_by_id', 'tudou_download_by_iid'] from ..common import * from xml.dom.minidom import parseString def tudou_download_by_iid(iid, title, output_dir = '.', merge = True, info_only = False): data = json.loads(get_decoded_htm...
gengue/django
refs/heads/master
django/contrib/admindocs/urls.py
574
from django.conf.urls import url from django.contrib.admindocs import views urlpatterns = [ url('^$', views.BaseAdminDocsView.as_view(template_name='admin_doc/index.html'), name='django-admindocs-docroot'), url('^bookmarklets/$', views.BookmarkletsView.as_view(), name='django-ad...
gsathya/blocker
refs/heads/master
centinel/experiments/__init__.py
1
__all__ = ['tcp_connect', 'http_request', 'turkey']
c0defreak/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/test_urllib2_localnet.py
51
#!/usr/bin/env python3 import os import email import urllib.parse import urllib.request import http.server import unittest import hashlib from test import support threading = support.import_module('threading') here = os.path.dirname(__file__) # Self-signed cert file for 'localhost' CERT_localhost = os.path.join(here...
TNT-Samuel/Coding-Projects
refs/heads/master
DNS Server/Source/Lib/random.py
5
"""Random variable generators. integers -------- uniform within range sequences --------- pick random element pick random sample pick weighted random sample generate random permutation distributions on the real line: ---------------------...
atris/gpdb
refs/heads/master
gpMgmt/bin/gppylib/__init__.py
166
# $Id: $ # Make sure Python loads the modules of this package via absolute paths. from os.path import abspath as _abspath __path__[0] = _abspath(__path__[0])
asedunov/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/db/backends/sqlite3/introspection.py
88
import re from django.db.backends import BaseDatabaseIntrospection # This light wrapper "fakes" a dictionary interface, because some SQLite data # types include variables in them -- e.g. "varchar(30)" -- and can't be matched # as a simple dictionary lookup. class FlexibleFieldLookupDict(object): # Maps SQL types t...
kaidokert/cookiecutter-django
refs/heads/master
{{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/contrib/__init__.py
14224
# -*- coding: utf-8 -*-
dnxbjyj/python-basic
refs/heads/master
gui/wxpython/wxPython-demo-4.0.1/samples/dataview/IndexListModel.py
1
import sys import wx import wx.dataview as dv #---------------------------------------------------------------------- # This model class provides the data to the view when it is asked for. # Since it is a list-only model (no hierachical data) then it is able # to be referenced by row rather than by item object, so in...
gurneyalex/partner-contact
refs/heads/8.0
partner_contact_nationality/models.py
22
# -*- coding: utf-8 -*- # Odoo, Open Source Management Solution # Copyright (C) 2014-2015 Grupo ESOC <www.grupoesoc.es> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version ...
sherjilozair/dqn
refs/heads/master
plot.py
1
import numpy as np import sys import re import subprocess def get_job_name(jobid): cmd = "sacct --format=\"JobName%30\" -j {}".format(jobid) result = subprocess.check_output(cmd, shell=True) return str(result).split("\\n")[2].strip() jobids = sys.argv[2:] exp_name = [get_job_name(jobid) for jobid in jobid...
canadacoin/test2
refs/heads/master
contrib/wallettools/walletunlock.py
2299
from jsonrpc import ServiceProxy access = ServiceProxy("http://127.0.0.1:8332") pwd = raw_input("Enter wallet passphrase: ") access.walletpassphrase(pwd, 60)
vprime/puuuu
refs/heads/master
env/lib/python2.7/site-packages/paramiko/message.py
1
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 (a...
hack4sec/ws-cli
refs/heads/master
classes/threads/ParamsBruterThread.py
1
# -*- coding: utf-8 -*- """ This is part of WebScout software Docs EN: http://hack4sec.pro/wiki/index.php/WebScout_en Docs RU: http://hack4sec.pro/wiki/index.php/WebScout License: MIT Copyright (c) Anton Kuzmin <http://anton-kuzmin.ru> (ru) <http://anton-kuzmin.pro> (en) Thread class for Dafs modules """ import threa...
Benoss/django-cookiecutter
refs/heads/master
tests.py
1
from cookiecutter.main import cookiecutter cookiecutter(".", no_input=True, output_dir="./tmp/")
eXcomm/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/pylib/gyp/easy_xml_test.py
2698
#!/usr/bin/env python # Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Unit tests for the easy_xml.py file. """ import gyp.easy_xml as easy_xml import unittest import StringIO class TestSequenceFunctions(...
feelobot/compose
refs/heads/master
compose/cli/main.py
1
from __future__ import print_function from __future__ import unicode_literals from inspect import getdoc from operator import attrgetter import logging import re import signal import sys from docker.errors import APIError import dockerpty from .. import __version__ from .. import legacy from ..const import DEFAULT_TI...
sunny414/tryton-client
refs/heads/master
tryton/gui/window/view_form/view/form.py
1
#This file is part of Tryton. The COPYRIGHT file at the top level of #this repository contains the full copyright notices and license terms. import operator from functools import reduce import gtk import gettext from interface import ParserView _ = gettext.gettext class ViewForm(ParserView): def __init__(self,...
pescobar/easybuild-easyblocks
refs/heads/master
easybuild/easyblocks/c/chapel.py
1
## # This file is an EasyBuild reciPY as per https://github.com/easybuilders/easybuild # # Copyright:: Copyright 2012-2019 Uni.Lu/LCSB, NTUA # Authors:: Fotis Georgatos <fotis@cern.ch>, Kenneth Hoste # License:: MIT/GPL # $Id$ # # This work implements a part of the HPCBIOS project and is a component of the policy:...
danielquinn/django_polymorphic
refs/heads/master
example/pexp/management/commands/pcmd.py
4
# -*- coding: utf-8 -*- """ This module is a scratchpad for general development, testing & debugging. """ from django.core.management.base import NoArgsCommand from django.db.models import connection from pprint import pprint from pexp.models import * def reset_queries(): connection.queries=[] def show_queries(...
Mistobaan/tensorflow
refs/heads/master
tensorflow/contrib/meta_graph_transform/__init__.py
85
# 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...
nagyistoce/edx-platform
refs/heads/master
common/djangoapps/student/tests/test_long_username_email.py
123
# -*- coding: utf-8 -*- import json from django.test import TestCase from django.core.urlresolvers import reverse class TestLongUsernameEmail(TestCase): def setUp(self): super(TestLongUsernameEmail, self).setUp() self.url = reverse('create_account') self.url_params = { 'usern...
HPPTECH/hpp_IOSTressTest
refs/heads/master
Resources/pyOCD-0.5.1/pyOCD/interface/__init__.py
9
""" mbed CMSIS-DAP debugger Copyright (c) 2006-2013 ARM 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 Unless required by applicable ...
intel-hpdd/intel-manager-for-lustre
refs/heads/master
tests/feature/cli/features/steps/helpers.py
1
from nose.tools import * from behave import * def fail(msg=None): raise AssertionError(msg) @given("the {entity} count should be {count}") @then("the {entity} count should be {count}") def step(context, entity, count): from chroma_core.models import ManagedHost, ManagedFilesystem, ManagedTarget, ManagedOst,...
fabianvaccaro/pygums
refs/heads/master
pythonLibs/mahotas-1.1.0/mahotas/euler.py
2
# Copyright (C) 2008-2010, Luis Pedro Coelho <luis@luispedro.org> # vim: set ts=4 sts=4 sw=4 expandtab smartindent: # License: MIT import numpy as np from .convolve import convolve _euler_lookup4 = np.array([ 0, 1, 1, 0, 1, 0, 2, -1, 1, 2, 0, -1, 0, -1, -1, 0, ...
jmlb23/python
refs/heads/master
python3.*/tiposFunc.py
1
#!/usr/bin/python3 # -*- coding: UTF-8 -*- #funcions con tipado estatico #curioso porque non da un typeerror #moi importante xa que as clases modulos e funcions si que crean un novo #ambito o ambito que estamos acostumados a ver delimitado por chaves en c #php c++ java c# non existe aqui, os if for while else e dema...
revanthkolli/osf.io
refs/heads/develop
website/addons/figshare/views/hgrid.py
3
# -*- coding: utf-8 -*- from website.util import rubeus from ..api import Figshare def figshare_hgrid_data(node_settings, auth, parent=None, **kwargs): node = node_settings.owner if node_settings.figshare_type == 'project': item = Figshare.from_settings(node_settings.user_settings).project(node_setti...
mscuthbert/abjad
refs/heads/master
abjad/tools/rhythmtreetools/test/test_rhythmtreetools_RhythmTreeContainer_insert.py
2
# -*- encoding: utf-8 -*- from abjad import * def test_rhythmtreetools_RhythmTreeContainer_insert_01(): leaf_a = rhythmtreetools.RhythmTreeLeaf(preprolated_duration=3) leaf_b = rhythmtreetools.RhythmTreeLeaf(preprolated_duration=3) leaf_c = rhythmtreetools.RhythmTreeLeaf(preprolated_duration=2) cont...
tomasreimers/tensorflow-emscripten
refs/heads/master
tensorflow/contrib/bayesflow/python/ops/stochastic_tensor.py
9
# 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...
maxvyaznikov/django-params
refs/heads/master
django_params/models.py
1
# -*- coding: utf-8 -*- from datetime import date, datetime from django.db import models from django.conf import settings from django.utils import timezone from gettext import gettext as _ DEFAULT_DATE_FORMAT = getattr(settings, 'DJANGO_PARAMS_DATE_FORMAT', '%d.%m.%Y') DEFAULT_DATETIME_FORMAT = getattr(settings, 'DJAN...
IssamLaradji/scikit-learn
refs/heads/master
examples/cluster/plot_agglomerative_clustering.py
26
""" Agglomerative clustering with and without structure =================================================== This example shows the effect of imposing a connectivity graph to capture local structure in the data. The graph is simply the graph of 20 nearest neighbors. Two consequences of imposing a connectivity can be s...
KellyChan/Python
refs/heads/master
python/gists/comma.py
3
s = "A bird in the hand..." # Add your for loop for word in s: if word == 'A' or word == 'a': print 'X', else: print word, # , for printing in a line, not create a new line
dcroc16/skunk_works
refs/heads/master
google_appengine/lib/jinja2-2.6/jinja2/ext.py
114
# -*- coding: utf-8 -*- """ jinja2.ext ~~~~~~~~~~ Jinja extensions allow to add custom tags similar to the way django custom tags work. By default two example extensions exist: an i18n and a cache extension. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from collections impor...
doganov/edx-platform
refs/heads/master
common/djangoapps/course_modes/tests/factories.py
56
from course_modes.models import CourseMode from factory.django import DjangoModelFactory from opaque_keys.edx.locations import SlashSeparatedCourseKey # Factories are self documenting # pylint: disable=missing-docstring class CourseModeFactory(DjangoModelFactory): class Meta(object): model = CourseMode ...
pearsonlab/nipype
refs/heads/master
nipype/utils/spm_docs.py
8
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """Grab documentation from spm.""" import os from nipype.interfaces import matlab def grab_doc(task_name): """Grab the SPM documentation for the given SPM task named `task_name` Parameters ...
bmanojlovic/ansible
refs/heads/devel
lib/ansible/modules/inventory/add_host.py
50
# -*- mode: python -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distr...
jfpla/odoo
refs/heads/8.0
addons/email_template/tests/test_mail.py
190
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
askaliuk/django-haystack
refs/heads/master
tests/spatial/tests.py
3
import httplib2 import warnings from django.conf import settings from django.contrib.gis.geos import GEOSGeometry from django.test import TestCase from haystack import connections from haystack.exceptions import SpatialError from haystack.query import SearchQuerySet from haystack.utils.geo import Point, D, ensure_geome...
pratikmallya/hue
refs/heads/master
desktop/core/ext-py/boto-2.38.0/boto/swf/exceptions.py
190
""" Exceptions that are specific to the swf module. This module subclasses the base SWF response exception, boto.exceptions.SWFResponseError, for some of the SWF specific faults. """ from boto.exception import SWFResponseError class SWFDomainAlreadyExistsError(SWFResponseError): """ Raised when when the dom...
petteyg/intellij-community
refs/heads/master
python/testData/resolve/QualifiedFunc.py
83
class Foo: def bar(): pass Foo().<ref>bar()
asposeslides/Aspose_Slides_Java
refs/heads/master
Plugins/Aspose-Slides-Java-for-Jython/asposeslides/WorkingWithText/ReplaceText.py
2
from asposeslides import Settings from com.aspose.slides import Presentation from com.aspose.slides import SaveFormat class ReplaceText: def __init__(self): dataDir = Settings.dataDir + 'WorkingWithText/ReplaceText/' # Create an instance of Presentation class ...
AsgerPetersen/QGIS
refs/heads/master
python/ext-libs/future/tkinter/colorchooser.py
118
from __future__ import absolute_import from future.utils import PY3 if PY3: from tkinter.colorchooser import * else: try: from tkColorChooser import * except ImportError: raise ImportError('The tkColorChooser module is missing. Does your Py2 ' 'installation includ...
pegasus-isi/pegasus
refs/heads/master
packages/pegasus-python/src/Pegasus/service/ensembles/__init__.py
1
import os from flask import Flask emapp = Flask(__name__) # Load configuration defaults emapp.config.from_object("Pegasus.service.defaults") # Load user configuration conf = os.path.expanduser("~/.pegasus/service.py") if os.path.isfile(conf): emapp.config.from_pyfile(conf) del conf from Pegasus.service.ensembl...
mikemoraned/geowhatsit-server
refs/heads/master
node_modules/heroku-redis-client/node_modules/publish/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py
260
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Unit tests for the ninja.py file. """ import gyp.generator.ninja as ninja import unittest import StringIO import sys import TestCommon ...
roshantha9/AbstractManycoreSim
refs/heads/master
src/RunSim_Exp_PSBasedRemapping.py
1
import sys, os, csv, pprint, math import argparse import numpy as np import random import shutil import time from util_scripts.psbased_remapping_random_params_generation import generate_random_params ## uncomment when running under CLI only version ## #import matplotlib #matplotlib.use('Agg') import matplotlib.pyplo...
pombreda/pydbgr
refs/heads/master
test/unit/test-bytecode.py
2
#!/usr/bin/env python 'Unit test for trepan.bytecode' import inspect, unittest from import_relative import import_relative Mcode = import_relative('lib.bytecode', '...trepan') class TestByteCode(unittest.TestCase): def test_contains_make_function(self): def sqr(x): return x * x frame ...
broferek/ansible
refs/heads/devel
test/units/module_utils/facts/system/distribution/test_parse_distribution_file_ClearLinux.py
44
# -*- coding: utf-8 -*- # Copyright (c) 2019 Ansible Project # 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 from units.compat.mock import Mock from ansible.module_utils.facts.system.dis...
MortalViews/incubator-airflow
refs/heads/master
airflow/operators/hive_to_druid.py
15
# -*- coding: utf-8 -*- # # 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 ...
harry-7/addons-server
refs/heads/master
src/olympia/accounts/tests/test_helpers.py
6
from django.test import RequestFactory import mock from olympia.accounts.templatetags import jinja_helpers @mock.patch( 'olympia.accounts.templatetags.jinja_helpers.utils.default_fxa_login_url', lambda c: 'http://auth.ca') def test_login_link(): request = RequestFactory().get('/en-US/firefox/addons') ...
smishenk/blink-crosswalk
refs/heads/master
Tools/Scripts/webkitpy/common/system/executive.py
12
# Copyright (c) 2009, Google Inc. All rights reserved. # Copyright (c) 2009 Apple 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 abov...
qewerty/moto.old
refs/heads/master
tools/scons/engine/SCons/compat/_scons_subprocess.py
5
# subprocess - Subprocesses with accessible I/O streams # # For more information about this module, see PEP 324. # # This module should remain compatible with Python 2.2, see PEP 291. # # Copyright (c) 2003-2005 by Peter Astrand <astrand@lysator.liu.se> # # Licensed to PSF under a Contributor Agreement. # See http://ww...
mendax-grip/cfdemUtilities
refs/heads/master
ergun/plotExplicitImplicit.py
1
############################################################################### # # File : analysePressure.py # # Run Instructions : python analysePressure.py directory/with/the/files # # Author : Bruno Blais # # Description : This script takes all the files in a folder and output # a...
florianjacob/pelican-plugins
refs/heads/master
simple_footnotes/simple_footnotes.py
17
#!/usr/bin/env python # -*- coding: utf-8 -*- # from pelican import signals import html5lib import six RAW_FOOTNOTE_CONTAINERS = ["code"] def getText(node, recursive=False): """Get all the text associated with this node. With recursive == True, all text from child nodes is retrieved.""" L = [u''] ...
cloudera/hue
refs/heads/master
desktop/core/ext-py/Django-1.11.29/tests/syndication_tests/feeds.py
144
from __future__ import unicode_literals from django.contrib.syndication import views from django.utils import feedgenerator from django.utils.timezone import get_fixed_timezone from .models import Article, Entry class TestRss2Feed(views.Feed): title = 'My blog' description = 'A more thorough description of ...
nickpack/reportlab
refs/heads/master
src/reportlab/graphics/barcode/eanbc.py
3
__all__=( 'Ean13BarcodeWidget','isEanString', ) from reportlab.graphics.shapes import Group, String, Rect from reportlab.lib import colors from reportlab.pdfbase.pdfmetrics import stringWidth from reportlab.lib.validators import isNumber, isColor, isString, Validator, isBoolean from reportlab.lib...
MichaelCoughlinAN/Odds-N-Ends
refs/heads/master
Python/Python Modules/lxml-4.2.0/src/lxml/html/_setmixin.py
53
from collections import MutableSet class SetMixin(MutableSet): """ Mix-in for sets. You must define __iter__, add, remove """ def __len__(self): length = 0 for item in self: length += 1 return length def __contains__(self, item): for has_item in self:...
guschmue/tensorflow
refs/heads/master
tensorflow/contrib/learn/python/learn/graph_actions.py
76
# 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...
costular/sanic-rest
refs/heads/master
tests/test_permissions.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest from sanic import views __author__ = 'costular' @pytest.fixture def basic_view(): class BasicView(views.APIView): async def get(self, request): return 'Hello' return BasicView class TestAPIView: @pytest.mark.asyncio ...
thehyve/variant
refs/heads/master
eggs/django-1.3.1-py2.7.egg/django/db/backends/mysql/creation.py
311
from django.db.backends.creation import BaseDatabaseCreation class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated MySQL column # types, as strings. Column-type strings can contain format strings; they'll # be interpolated against the values of Field.__dict_...
asvetlov/motor
refs/heads/master
test/asyncio_tests/test_asyncio_tests.py
1
# Copyright 2014 MongoDB, 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, so...
gaddman/ansible
refs/heads/devel
test/units/modules/network/f5/test_bigip_asm_policy_import.py
17
# -*- coding: utf-8 -*- # # Copyright: (c) 2018, 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...
konrado0/vosqa
refs/heads/master
forum/settings/basic.py
1
import os.path from base import Setting, SettingSet from forms import ImageFormWidget from django.utils.translation import ugettext_lazy as _ from django.forms.widgets import Textarea BASIC_SET = SettingSet('basic', _('Basic settings'), _("The basic settings for your application"), 1) APP_LOGO = Setting('APP_LOGO',...
Soya93/Extract-Refactoring
refs/heads/master
python/testData/inspections/ChainedComparison5_after.py
83
mapsize = 35 def test(x, y): if 0 <= x < mapsize and 0 <= y < mapsize: return 1
MorellatoAriel/PyGobstones
refs/heads/develop
interpreter/vgbs/lang/judge/gbs_judge.py
4
# # Copyright (C) 2011, 2012 Pablo Barenbaum <foones@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Th...
lcy-seso/Paddle
refs/heads/develop
python/paddle/fluid/tests/unittests/test_optimizer.py
4
# Copyright (c) 2018 PaddlePaddle 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 app...
willthames/ansible-lint
refs/heads/master
test/custom_rules/example_com/ExampleComRule.py
2
# Copyright (c) 2020, Ansible Project # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, di...
hachreak/invenio-redirector
refs/heads/master
docs/conf.py
4
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015 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 later...
Amechi101/concepteur-market-app
refs/heads/master
venv/lib/python2.7/site-packages/django/contrib/auth/admin.py
29
from django.db import transaction from django.conf import settings from django.contrib import admin from django.contrib.admin.options import IS_POPUP_VAR from django.contrib.auth.forms import (UserCreationForm, UserChangeForm, AdminPasswordChangeForm) from django.contrib.auth.models import User, Group from django.c...
efortuna/AndroidSDKClone
refs/heads/master
ndk/prebuilt/linux-x86_64/lib/python2.7/encodings/hz.py
817
# # hz.py: Python Unicode Codec for HZ # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_cn, codecs import _multibytecodec as mbc codec = _codecs_cn.getcodec('hz') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.MultibyteIncrementalEncoder...
usmanantharikta/workshop_bekup
refs/heads/master
node-v4.6.1-linux-x64/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py
1869
# Copyright 2014 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. """A clone of the default copy.deepcopy that doesn't handle cyclic structures or complex types except for dicts and lists. This is because gyp copies so large structur...
loafbaker/django_ecommerce2
refs/heads/master
django_ecommerce2/wsgi.py
1
""" WSGI config for django_ecommerce2 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault("DJ...
jarshwah/django
refs/heads/master
django/contrib/gis/db/backends/mysql/base.py
58
from django.db.backends.mysql.base import \ DatabaseWrapper as MySQLDatabaseWrapper from .features import DatabaseFeatures from .introspection import MySQLIntrospection from .operations import MySQLOperations from .schema import MySQLGISSchemaEditor class DatabaseWrapper(MySQLDatabaseWrapper): SchemaEditorCl...
yury-s/v8-inspector
refs/heads/master
Source/chrome/tools/telemetry/telemetry/timeline/event_unittest.py
95
# 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 unittest from telemetry.timeline import event class TimelineEventTest(unittest.TestCase): def testHasThreadTimestamps(self): # No thread_star...
Sajid3/orp
refs/heads/master
third-party/qemu-orp/scripts/qapi.py
66
# # QAPI helper library # # Copyright IBM, Corp. 2011 # Copyright (c) 2013 Red Hat Inc. # # Authors: # Anthony Liguori <aliguori@us.ibm.com> # Markus Armbruster <armbru@redhat.com> # # This work is licensed under the terms of the GNU GPL, version 2. # See the COPYING file in the top-level directory. import re from o...
kalxas/OWSLib
refs/heads/master
owslib/map/__init__.py
5
# -*- coding: ISO-8859-15 -*-
vvv1559/intellij-community
refs/heads/master
python/helpers/pycharm/teamcity/diff_tools.py
2
import base64 import pprint import sys import unittest _PY2K = sys.version_info < (3,) _PRIMITIVES = [int, str, bool] if _PY2K: # Not available in py3 # noinspection PyUnresolvedReferences _PRIMITIVES.append(unicode) # noqa # Not available in py3 # noinspection PyUnresolvedReferences _STR_F = ...
MichaLasry/ImageTalke
refs/heads/master
functions/node_modules/firebase-admin/node_modules/grpc/third_party/boringssl/third_party/googletest/scripts/fuse_gtest_files.py
346
#!/usr/bin/env python # # Copyright 2009, 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...
ptesarik/crash-python
refs/heads/master
crash/kdump/__init__.py
9
# -*- coding: utf-8 -*- # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
mangelajo/python-neutronclient
refs/heads/master
neutronclient/neutron/v2_0/securitygroup.py
7
# Copyright 2012 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...
lowitty/server
refs/heads/master
libsLinux/twisted/internet/test/__init__.py
84
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.internet}. """
antoinecarme/pyaf
refs/heads/master
tests/artificial/transf_Logit/trend_MovingMedian/cycle_7/ar_12/test_artificial_1024_Logit_MovingMedian_7_12_0.py
1
import pyaf.Bench.TS_datasets as tsds import tests.artificial.process_artificial_dataset as art art.process_dataset(N = 1024 , FREQ = 'D', seed = 0, trendtype = "MovingMedian", cycle_length = 7, transform = "Logit", sigma = 0.0, exog_count = 0, ar_order = 12);
abhishekgahlot/youtube-dl
refs/heads/master
youtube_dl/extractor/foxgay.py
146
from __future__ import unicode_literals from .common import InfoExtractor class FoxgayIE(InfoExtractor): _VALID_URL = r'http://(?:www\.)?foxgay\.com/videos/(?:\S+-)?(?P<id>\d+)\.shtml' _TEST = { 'url': 'http://foxgay.com/videos/fuck-turkish-style-2582.shtml', 'md5': '80d72beab5d04e1655a56ad37...
longde123/MultiversePlatform
refs/heads/master
server/bin/who.py
1
# # The Multiverse Platform is made available under the MIT License. # # Copyright (c) 2012 The Multiverse 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 the Software without restrict...
openhatch/oh-mainline
refs/heads/master
vendor/packages/Django/tests/regressiontests/file_uploads/uploadhandler.py
151
""" Upload handlers to test the upload API. """ from django.core.files.uploadhandler import FileUploadHandler, StopUpload class QuotaUploadHandler(FileUploadHandler): """ This test upload handler terminates the connection if more than a quota (5MB) is uploaded. """ QUOTA = 5 * 2**20 # 5 MB ...
ghber/My-Django-Nonrel
refs/heads/master
django/contrib/localflavor/cz/cz_regions.py
514
""" Czech regions, translations get from http://www.crwflags.com/fotw/Flags/cz-re.html """ from django.utils.translation import ugettext_lazy as _ REGION_CHOICES = ( ('PR', _('Prague')), ('CE', _('Central Bohemian Region')), ('SO', _('South Bohemian Region')), ('PI', _('Pilsen Region')), ('CA', _(...
litchfield/django
refs/heads/master
tests/utils_tests/test_simplelazyobject.py
434
from __future__ import unicode_literals import pickle from django.contrib.auth.models import User from django.test import TestCase from django.utils import six from django.utils.functional import SimpleLazyObject class TestUtilsSimpleLazyObjectDjangoTestCase(TestCase): def test_pickle_py2_regression(self): ...
rdhyee/modular-file-renderer
refs/heads/develop
mfr/server/app.py
2
import asyncio import tornado.web import tornado.httpserver import tornado.platform.asyncio import logging from raven.contrib.tornado import AsyncSentryClient import mfr from mfr import settings from mfr.server import settings as server_settings from mfr.server.handlers.export import ExportHandler from mfr.server.ha...
40223249-1/-w16b_test
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_loader.py
738
import sys import types import unittest class Test_TestLoader(unittest.TestCase): ### Tests for TestLoader.loadTestsFromTestCase ################################################################ # "Return a suite of all tests cases contained in the TestCase-derived # class testCaseClass" def te...
vFense/vFenseAgent-nix
refs/heads/development
agent/deps/mac/Python-2.7.5/lib/python2.7/test/test_io.py
37
"""Unit tests for the io module.""" # Tests of io are scattered over the test suite: # * test_bufio - tests file buffering # * test_memoryio - tests BytesIO and StringIO # * test_fileio - tests FileIO # * test_file - tests the file interface # * test_io - tests everything else in the io module # * test_univnewlines - ...
glaubitz/fs-uae-debian
refs/heads/master
launcher/OpenGL/raw/GLES2/ARM/shader_framebuffer_fetch_depth_stencil.py
8
'''Autogenerated by xml_generate script, do not edit!''' from OpenGL import platform as _p, arrays # Code generation uses this from OpenGL.raw.GLES2 import _types as _cs # End users want this... from OpenGL.raw.GLES2._types import * from OpenGL.raw.GLES2 import _errors from OpenGL.constant import Constant as _C import...
vivianli32/TravelConnect
refs/heads/master
flask/lib/python3.4/site-packages/jinja2/nodes.py
623
# -*- coding: utf-8 -*- """ jinja2.nodes ~~~~~~~~~~~~ This module implements additional nodes derived from the ast base node. It also provides some node tree helper functions like `in_lineno` and `get_nodes` used by the parser and translator in order to normalize python and jinja nodes. :...
programadorjc/django
refs/heads/master
tests/field_defaults/tests.py
405
from datetime import datetime from django.test import TestCase from django.utils import six from .models import Article class DefaultTests(TestCase): def test_field_defaults(self): a = Article() now = datetime.now() a.save() self.assertIsInstance(a.id, six.integer_types) ...
badge/doll
refs/heads/master
setup.py
1
#!/usr/bin/env python """DoLL project""" from setuptools import find_packages, setup setup(name='doll', version='0.3', description="Database of Latin Lexicon.", long_description="A database of the Latin lexicon, generated from the input files for Whitaker's Words.", author="Matthew Badger", ...
runjmc/maraschino
refs/heads/master
lib/flask/app.py
14
# -*- coding: utf-8 -*- """ flask.app ~~~~~~~~~ This module implements the central WSGI application object. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import os import sys from threading import Lock from datetime...
taedla01/MissionPlanner
refs/heads/master
Lib/site-packages/numpy/core/info.py
103
__doc__ = """Defines a multi-dimensional array and useful procedures for Numerical computation. Functions - array - NumPy Array construction - zeros - Return an array of all zeros - empty - Return an unitialized array - shape ...
maxicecilia/simple_classroom
refs/heads/master
simple_classroom/apps/core/admin.py
1
# -*- coding: utf-8 -*- from django.contrib import admin from site_news.admin import NewsItemSimplifiedAdmin from site_news.models import NewsItem from simple_classroom.apps.core.models import ExtendedSite from contact_us.admin import ContactUsAdmin from contact_us.models import SimpleContact admin.site.register(New...
KlubJagiellonski/pola-backend
refs/heads/master
ai_pics/urls.py
1
from django.urls import path from . import views urlpatterns = [ path('', views.AIPicsPageView.as_view(), name="list"), path('<int:pk>', views.AIPicsDetailView.as_view(), name="detail"), path('api/set-api-pic-state', views.ApiSetAiPicStateView.as_view(), name='set-api-pic-state'), path('api/delete-api...
tentwatch/tentwatch
refs/heads/master
tentwatch/imports/models.py
1
from django.db import models class OtherTent(models.Model): name = models.CharField(max_length=140) url = models.URLField(max_length=1024) lat = models.FloatField(default=0.0, editable=False) lon = models.FloatField(default=0.0, editable=False) def __unicode__(self): return self.name
Altiscale/pig
refs/heads/trunk
bin/pig.py
16
# 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...
aboganas/frappe
refs/heads/develop
frappe/core/page/background_jobs/background_jobs.py
6
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from rq import Queue, Worker from frappe.utils.background_jobs import get_redis_conn from frappe.utils import format_datetime, cint colors = { 'queued': 'orange',...