repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
devs1991/test_edx_docmode | refs/heads/master | venv/lib/python2.7/site-packages/billiard/common.py | 12 | # -*- coding: utf-8 -*-
"""
This module contains utilities added by billiard, to keep
"non-core" functionality out of ``.util``."""
from __future__ import absolute_import
import os
import signal
import sys
import pickle as pypickle
try:
import cPickle as cpickle
except ImportError: # pragma: no cover
cpickle... |
hackersql/sq1map | refs/heads/master | comm1x/src/core/injections/results_based/techniques/classic/cb_payloads.py | 1 | #!/usr/bin/env python
# encoding: UTF-8
"""
This file is part of Commix Project (http://commixproject.com).
Copyright (c) 2014-2017 Anastasios Stasinopoulos (@ancst).
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 Soft... |
jkstrick/samba | refs/heads/master | ctdb/tests/takeover/simulation/node_group_simple.py | 31 | #!/usr/bin/env python
# This example demonstrates a simple, sensible node group
# configuration. When run with deterministic IPs (use "-d" to show
# the problem) it does many gratuitous IP reassignments.
from ctdb_takeover import Cluster, Node, process_args
process_args()
addresses1 = ['A', 'B', 'C', 'D', 'E', 'F'... |
cryptocoinexplorer/Open-Source-CCE-4.0 | refs/heads/master | dbload.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# dbload.py
#
# Copyright 2015 Hartland PC LLC
#
# This file is part of the of the database loader for CCE 4.0 (open source version).
#
# This package is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publis... |
lichuan261/wuand | refs/heads/master | XX-Net/goagent/3.1.49/local/generate_ip_range.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import ip_utils
__author__ = 'moonshawdo@gamil.com'
# read ip range string
# order it
# merge over lapped
# Then reproduce good format file
# check it.
import re
ip_str_list = '''
1.179.248.0-1.179.248.255
4.3.2.0/24
8.6.48.0-8.6.55.255
8.8.4.0/24
8.8.8.0/24
8.22.56.0-8... |
ConsenSys/eth-testrpc | refs/heads/master | tests/client/test_get_block_by_number.py | 3 | def test_get_block_with_no_transactions(client, hex_accounts):
client.wait_for_block(1)
block = client.get_block_by_number(1)
assert block['number'] == b"0x1"
assert block['miner'] == hex_accounts[0]
assert len(block['transactions']) == 0
assert block['logsBloom'] == b"0x" + b"00" * 256
def ... |
rwl/muntjac | refs/heads/master | muntjac/addon/invient/__init__.py | 12133432 | |
kencung/configuration | refs/heads/master | playbooks/callback_plugins/hipchat_plugin.py | 51 | import os
import time
from ansible import utils
try:
import prettytable
except ImportError:
prettytable = None
try:
import hipchat
except ImportError:
hipchat = None
class CallbackModule(object):
"""Send status updates to a HipChat channel during playbook execution.
This plugin makes use of t... |
JetBrains/intellij-community | refs/heads/master | python/testData/refactoring/makeFunctionTopLevel/methodNotImportableDestinationFile/before/main.py | 31 | class C:
def met<caret>hod(self):
pass
C().method()
|
anryko/ansible | refs/heads/devel | lib/ansible/plugins/doc_fragments/junos.py | 44 | # -*- coding: utf-8 -*-
# Copyright: (c) 2015, Peter Sprygada <psprygada@ansible.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
class ModuleDocFragment(object):
# Standard files documentation fragment
DOCUMENTATION = r'''
options:
provider:
descriptio... |
messagebird/python-rest-api | refs/heads/master | examples/call_delete.py | 1 | #!/usr/bin/env python
import os
import sys
import json
import argparse
import requests
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
import messagebird
parser = argparse.ArgumentParser(usage='call_create.py\
--accessKey="*******" \
--callId=dda20377-72da-4846-9b2c-0fea3ad4bcb6 \
')
parser.add_argum... |
gencer/sentry | refs/heads/master | src/sentry/lang/javascript/cache.py | 3 | from __future__ import absolute_import, print_function
from six import text_type
from symbolic import SourceView
from sentry.utils.strings import codec_lookup
__all__ = ['SourceCache', 'SourceMapCache']
def is_utf8(codec):
name = codec_lookup(codec).name
return name in ('utf-8', 'ascii')
class SourceCache... |
RossBrunton/django | refs/heads/master | django/contrib/redirects/__init__.py | 808 | default_app_config = 'django.contrib.redirects.apps.RedirectsConfig'
|
turbomanage/training-data-analyst | refs/heads/master | courses/machine_learning/deepdive2/structured/solutions/serving/application/appengine_config.py | 25 | # Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... |
rboman/progs | refs/heads/master | sandbox/fortranpython/test1/scripts/calcul1.py | 1 |
import numpy as np
import math
import vect
print(dir(vect))
vect.norme(math.sin(0.5),math.cos(0.5))
print("----fib----")
print(vect.fib.__doc__)
a = np.zeros(8,'d')
vect.fib(a)
print(a)
print("----fib2----")
print(vect.fib2.__doc__)
print(vect.fib2(10))
print("retour a python")
|
IllusionRom-deprecated/android_platform_tools_idea | refs/heads/master | python/testData/inspections/PyClassHasNoInitInspection/unresolvedParent.py | 83 | __author__ = 'ktisha'
class B(ABC):
def foo(self):
self.b = 1 |
pedersen/cache901 | refs/heads/master | cache901/options.py | 1 | """
Cache901 - GeoCaching Software for the Asus EEE PC 901
Copyright (C) 2007, Michael J. Pedersen <m.pedersen@icelus.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the Lice... |
0-wiz-0/audacity | refs/heads/master | lib-src/lv2/suil/waflib/Tools/icpc.py | 330 | #! /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,sys
from waflib.Tools import ccroot,ar,gxx
from waflib.Configure import conf
@conf
def find_icpc(conf):
if sys.platform=='cygwin':
conf.fatal('The Intel compiler ... |
proversity-org/edx-platform | refs/heads/master | openedx/core/djangoapps/credentials/admin.py | 11 | """
Django admin pages for credentials support models.
"""
from config_models.admin import ConfigurationModelAdmin
from django.contrib import admin
from openedx.core.djangoapps.credentials.models import CredentialsApiConfig
class CredentialsApiConfigAdmin(ConfigurationModelAdmin): # pylint: disable=missing-docstri... |
caot/intellij-community | refs/heads/master | python/testData/quickFixes/PyMakeMethodStaticQuickFixTest/noSelf_after.py | 249 | __author__ = 'ktisha'
class Child(Base):
def __init__(self):
super(Child, self).__init__()
@staticmethod
def f():
test = 1 |
ephes/ml_jobcontrol | refs/heads/master | ml_jobcontrol/ml_jobcontrol/models.py | 1 | # -*- encoding: utf-8 -*-
# Standard library imports
import logging
# Imports from core django
from django.db import models
# Imports from third party apps
from model_utils import Choices
from model_utils.models import StatusModel
from model_utils.models import TimeStampedModel
# Local imports
logger = logging.get... |
samokspv/json-schema | refs/heads/master | docs/conf.py | 74 | # -*- coding: utf-8 -*-
#
# JsonSchema documentation build configuration file, created by
# sphinx-quickstart on Sat Dec 10 15:34:44 2011.
#
# 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.
#
# ... |
stannynuytkens/youtube-dl | refs/heads/master | youtube_dl/extractor/tf1.py | 10 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class TF1IE(InfoExtractor):
"""TF1 uses the wat.tv player."""
_VALID_URL = r'https?://(?:(?:videos|www|lci)\.tf1|(?:www\.)?(?:tfou|ushuaiatv|histoire|tvbreizh))\.fr/(?:[^/]+/)*(?P<id>[^/?#.]+)'
_TESTS = [{
'... |
glovebx/odoo | refs/heads/8.0 | addons/product/partner.py | 385 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... |
paulormart/gae-project-skeleton-100 | refs/heads/master | gae/lib/PIL/ImageShow.py | 39 | #
# The Python Imaging Library.
# $Id$
#
# im.show() drivers
#
# History:
# 2008-04-06 fl Created
#
# Copyright (c) Secret Labs AB 2008.
#
# See the README file for information on usage and redistribution.
#
import Image
import os, sys
_viewers = []
def register(viewer, order=1):
try:
if issubclass(vie... |
viggates/nova | refs/heads/master | nova/tests/api/openstack/compute/plugins/v3/test_consoles.py | 27 | # Copyright 2010-2011 OpenStack Foundation
# Copyright 2011 Piston Cloud Computing, 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... |
SummerLW/Perf-Insight-Report | refs/heads/test | third_party/gsutil/third_party/apitools/apitools/base/py/credentials_lib_test.py | 11 | import re
import mock
import six
from six.moves import http_client
import unittest2
from apitools.base.py import credentials_lib
from apitools.base.py import util
def CreateUriValidator(uri_regexp, content=''):
def CheckUri(uri, headers=None):
if 'X-Google-Metadata-Request' not in headers:
r... |
rohitw1991/frappe | refs/heads/develop | frappe/widgets/tags.py | 36 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
"""
Server side functions for tagging.
- Tags can be added to any record (doctype, name) in the system.
- Items are filtered by tags
- Top tags are shown in the sidebar (?)
- ... |
salfter/coinswitch | refs/heads/master | withdraw.py | 2 | #!/usr/bin/env python
# coding=iso-8859-1
# Cryptsy auto-withdraw cronjob
#
# Copyright © 2014 Scott Alfter
#
# 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 w... |
gnuhub/intellij-community | refs/heads/master | python/testData/completion/mro.after.py | 83 | class C(object):
pass
C.__mro__ |
Lujeni/ansible | refs/heads/devel | test/units/modules/network/fortios/test_fortios_switch_controller_global.py | 21 | # Copyright 2019 Fortinet, Inc.
#
# 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 in the... |
google-code-export/oppia | refs/heads/master | core/jobs_test.py | 6 | # coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... |
pambot/SMSBeds | refs/heads/master | lib/flask/testing.py | 783 | # -*- coding: utf-8 -*-
"""
flask.testing
~~~~~~~~~~~~~
Implements test support helpers. This module is lazily imported
and usually not used in production environments.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from contextlib import contextmana... |
matthaywardwebdesign/rethinkdb | refs/heads/next | external/v8_3.30.33.16/build/gyp/test/ninja/solibs_avoid_relinking/gyptest-solibs-avoid-relinking.py | 216 | #!/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.
"""
Verify that relinking a solib doesn't relink a dependent executable if the
solib's public API hasn't changed.
"""
import os
import sys
... |
RudolfCardinal/crate | refs/heads/master | crate_anon/crateweb/core/management/commands/runcpserver.py | 1 | #!/usr/bin/env python
"""
crate_anon/crateweb/core/management/commands/runcpserver.py
===============================================================================
Copyright (C) 2015-2021 Rudolf Cardinal (rudolf@pobox.com).
This file is part of CRATE.
CRATE is free software: you can redistribute it a... |
vvv1559/intellij-community | refs/heads/master | python/testData/refactoring/unwrap/whileUnwrap_after.py | 273 | x = 1
|
joshuahoman/vivisect | refs/heads/master | vstruct/defs/windows/win_6_1_i386/win32k.py | 7 | # Version: 6.1
# Architecture: i386
import vstruct
from vstruct.primitives import *
ETW_THREAD_FLAG = v_enum()
ETW_THREAD_FLAG.ETW_THREAD_FLAG_HAD_INPUT = 0
ETW_THREAD_FLAG.ETW_THREAD_FLAG_HAD_VISIBLE_WINDOWS = 1
ETW_THREAD_FLAG.ETW_THREAD_FLAG_HAS_NEW_INPUT = 2
ETW_THREAD_FLAG.ETW_THREAD_FLAG_MAX = 3
TOUCHSTATE = v... |
tdudz/elements | refs/heads/elements-0.14.1 | qa/rpc-tests/rpc_getblockstats.py | 1 | #!/usr/bin/env python3
# Copyright (c) 2017-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test getblockstats rpc call
#
from test_framework.test_framework import BitcoinTestFramework
from tes... |
fotinakis/sentry | refs/heads/master | src/sentry/rules/base.py | 6 | """
sentry.rules.base
~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
Rules apply either before an event gets stored, or immediately after.
Basic actions:
- I want to get notified when [X]
- I want to group events when [X]
- ... |
lsst-ts/ts_wep | refs/heads/master | python/lsst/ts/wep/ctrlIntf/WEPCalculationFactory.py | 1 | # This file is part of ts_wep.
#
# Developed for the LSST Telescope and Site Systems.
# This product includes software developed by the LSST Project
# (https://www.lsst.org).
# See the COPYRIGHT file at the top-level directory of this distribution
# for details of code ownership.
#
# This program is free software: you ... |
Solinea/horizon | refs/heads/master | openstack_dashboard/policy.py | 55 | #
# 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
# ... |
da1z/intellij-community | refs/heads/master | python/testData/refactoring/move/docstringTypes/before/src/c.py | 83 | def f(x):
'''Returns the argument.
:type x: a.C
:rtype: a.C
'''
return x
|
t-neumann/slamdunk | refs/heads/master | slamdunk/slamdunk.py | 1 | #!/usr/bin/env python
# Copyright (c) 2015 Tobias Neumann, Philipp Rescheneder.
#
# This file is part of Slamdunk.
#
# Slamdunk is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
#... |
QuLogic/burnman | refs/heads/master | tests/test_spin.py | 1 | import unittest
from util import BurnManTest
import os, sys
sys.path.insert(1,os.path.abspath('..'))
import burnman
from burnman import minerals
class spin_transition(BurnManTest):
def test_new(self):
mins = [minerals.Murakami_etal_2012.fe_periclase(), minerals.Murakami_etal_2012.fe_periclase_H... |
haripradhan/MissionPlanner | refs/heads/master | Lib/site-packages/numpy/core/numerictypes.py | 54 | """
numerictypes: Define the numeric type objects
This module is designed so "from numerictypes import \\*" is safe.
Exported symbols include:
Dictionary with all registered number types (including aliases):
typeDict
Type objects (not all will be available, depends on platform):
see variable sctypes fo... |
jxs/servo | refs/heads/master | tests/wpt/web-platform-tests/XMLHttpRequest/resources/chunked.py | 219 | def main(request, response):
chunks = ["First chunk\r\n",
"Second chunk\r\n",
"Yet another (third) chunk\r\n",
"Yet another (fourth) chunk\r\n",
]
response.headers.set("Transfer-Encoding", "chunked");
response.headers.set("Trailer", "X-Test-Me");
r... |
noroutine/ansible | refs/heads/devel | lib/ansible/plugins/action/net_config.py | 137 | #
# Copyright 2015 Peter Sprygada <psprygada@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... |
liamw9534/mopidy | refs/heads/master | mopidy/exceptions.py | 1 | from __future__ import unicode_literals
class MopidyException(Exception):
def __init__(self, message, *args, **kwargs):
super(MopidyException, self).__init__(message, *args, **kwargs)
self._message = message
@property
def message(self):
"""Reimplement message field that was deprec... |
linvictor88/vse-lbaas-driver | refs/heads/master | quantum/db/migration/alembic_migrations/common_ext_ops.py | 20 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 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... |
pombredanne/bitcurator | refs/heads/master | dfxml/python/imicrosoft_redact.py | 4 | #!/usr/bin/python
"""This is a small program written with the python fiwalk framework to
break the microsoft executables from the m57 corpus. It does this by changing
characters in the first 4096 bytes of the executable that are over hex 80 to
hex FF"""
import os.path,sys
from subprocess import Popen,call,PIPE
sys.p... |
shsingh/ansible | refs/heads/devel | lib/ansible/modules/network/fortimanager/fmgr_ha.py | 38 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... |
zerc/django | refs/heads/master | django/contrib/gis/gdal/raster/source.py | 297 | import json
import os
from ctypes import addressof, byref, c_double, c_void_p
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.driver import Driver
from django.contrib.gis.gdal.error import GDALException
from django.contrib.gis.gdal.prototypes import raster as capi
from django.contrib.gis... |
prisae/pelican-plugins | refs/heads/master | better_figures_and_images/better_figures_and_images.py | 12 | """
Better Figures & Images
------------------------
This plugin:
- Adds a style="width: ???px; height: auto;" to each image in the content
- Also adds the width of the contained image to any parent div.figures.
- If RESPONSIVE_IMAGES == True, also adds style="max-width: 100%;"
- Corrects alt text: if alt == imag... |
v17al/Flexget | refs/heads/develop | flexget/plugins/modify/torrent.py | 11 | from __future__ import unicode_literals, division, absolute_import
import logging
import os
from flexget import plugin
from flexget.event import event
from flexget.utils.bittorrent import Torrent, is_torrent_file
log = logging.getLogger('modif_torrent')
class TorrentFilename(object):
"""
Makes sure that... |
s0undt3ch/powerline | refs/heads/develop | powerline/lint/spec.py | 14 | # vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
import itertools
import re
from copy import copy
from powerline.lib.unicode import unicode
from powerline.lint.markedjson.error import echoerr, DelayedEchoErr, NON_PRINTABLE_STR
from powerline.lint.self... |
gertingold/scipy | refs/heads/master | scipy/linalg/tests/test_blas.py | 23 | #
# Created by: Pearu Peterson, April 2002
#
from __future__ import division, print_function, absolute_import
__usage__ = """
Build linalg:
python setup.py build
Run tests if scipy is installed:
python -c 'import scipy;scipy.linalg.test()'
"""
import math
import numpy as np
from numpy.testing import (assert_equ... |
ManoSeimas/mp-design | refs/heads/master | manage.py | 1 | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "mp_design.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
|
JTarball/docker-django-polymer-starter-kit | refs/heads/master | docker/app/app/backend/apps/_archive/stats/utils.py | 4 | from datetime import datetime, timedelta
from redis import Redis
import subprocess
import time
import logging # import the logging library
# Get an instance of a logger
logger = logging.getLogger(__name__)
# Initialise Redis server
r_server = Redis()
def load_redis_db(filename):
"""Loads database"""
# copy
... |
gkarlin/django-jenkins | refs/heads/master | build/Django/django/contrib/gis/geos/polygon.py | 219 | from ctypes import c_uint, byref
from django.contrib.gis.geos.geometry import GEOSGeometry
from django.contrib.gis.geos.libgeos import get_pointer_arr, GEOM_PTR
from django.contrib.gis.geos.linestring import LinearRing
from django.contrib.gis.geos import prototypes as capi
from django.utils import six
from django.utils... |
abenzbiria/clients_odoo | refs/heads/master | addons/website/tests/__init__.py | 396 | # -*- coding: utf-8 -*-
import test_converter
import test_crawl
import test_ui
import test_views
|
sekikn/incubator-airflow | refs/heads/master | tests/test_utils/config.py | 8 | #
# 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... |
axbaretto/beam | refs/heads/master | sdks/python/.eggs/nose-1.3.7-py2.7.egg/nose/result.py | 68 | """
Test Result
-----------
Provides a TextTestResult that extends unittest's _TextTestResult to
provide support for error classes (such as the builtin skip and
deprecated classes), and hooks for plugins to take over or extend
reporting.
"""
import logging
try:
# 2.7+
from unittest.runner import _TextTestResu... |
tonk/ansible | refs/heads/devel | lib/ansible/cli/config.py | 47 | # Copyright: (c) 2017, 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
import os
import shlex
import subprocess
import yaml
from ansible import context
from ansible.cli... |
lefloh/notejam | refs/heads/master | flask/notejam/forms.py | 6 | from flask.ext.wtf import (Form, TextField, PasswordField,
SelectField, TextAreaField)
from flask.ext.wtf import Required, Email, EqualTo, ValidationError
from notejam.models import User, Pad
class SigninForm(Form):
email = TextField('Email', validators=[Required(), Email()])
password = PasswordField('Passwo... |
EiSandi/greetingslack | refs/heads/master | greetingslack/lib/python2.7/site-packages/pip/_vendor/progress/__init__.py | 916 | # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE A... |
erwilan/ansible | refs/heads/devel | lib/ansible/modules/windows/win_iis_virtualdirectory.py | 78 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Henrik Wallström <henrik@wallstroms.nu>
#
# 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 t... |
andybarry/flight | refs/heads/master | externals/gtest/xcode/Scripts/versiongenerate.py | 3088 | #!/usr/bin/env python
#
# Copyright 2008, 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... |
shadyueh/pyranking | refs/heads/master | env/lib/python2.7/site-packages/django/contrib/gis/db/backends/spatialite/features.py | 326 | from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures
from django.contrib.gis.geos import geos_version_info
from django.db.backends.sqlite3.features import \
DatabaseFeatures as SQLiteDatabaseFeatures
from django.utils.functional import cached_property
class DatabaseFeatures(BaseSpatialFeat... |
djangsters/scorched | refs/heads/master | scorched/compat.py | 3 | import sys
_ver = sys.version_info
is_py2 = (_ver[0] == 2)
is_py3 = (_ver[0] == 3)
if is_py2: # pragma: no cover
from urllib import (quote, unquote, quote_plus, unquote_plus, urlencode,
getproxies, proxy_bypass)
from urlparse import urlparse, urlunparse, urljoin, urlsplit, urldefrag
... |
KevinBacas/DjangoRESTHello | refs/heads/master | tutorial/tutorial/__init__.py | 12133432 | |
johnlee175/LogcatFileReader | refs/heads/master | examples/simple_utils.py | 1 | #!/usr/bin/env python
import urllib
import urllib2
import re
import os
import sys
import time
# upload('http://www.mywebsite.com:8080/upload.php', {}, 'file', os.path.join('/home/john/', 'a.txt'))
def upload(http_url, form_params, file_item_name, file_path):
boundary = '-----------------%s' % hex(int(time.time()... |
bdoner/SickRage | refs/heads/master | lib/stevedore/tests/test_test_manager.py | 55 | from mock import Mock, sentinel
from stevedore import (ExtensionManager, NamedExtensionManager, HookManager,
DriverManager, EnabledExtensionManager)
from stevedore.dispatch import (DispatchExtensionManager,
NameDispatchExtensionManager)
from stevedore.extension imp... |
gsb-eng/tahoe-lafs | refs/heads/master | src/allmydata/test/test_base62.py | 9 | import random, unittest
from allmydata.util import base62, mathutil
def insecurerandstr(n):
return ''.join(map(chr, map(random.randrange, [0]*n, [256]*n)))
class T(unittest.TestCase):
def _test_num_octets_that_encode_to_this_many_chars(self, chars, octets):
assert base62.num_octets_that_encode_to_thi... |
jrha/aquilon | refs/heads/master | tests/broker/test_bind_client.py | 2 | #!/usr/bin/env python2.6
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License... |
turbulenz/gyp | refs/heads/master | test/module/gyptest-default.py | 53 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies simple build of a "Hello, world!" program with loadable modules. The
default for all platforms should be to output the loadable... |
station7/xbmc | refs/heads/master | lib/libUPnP/Neptune/Extras/Scripts/GenTrustAnchorsTables.py | 264 | #! /usr/bin/env python
###
### Generate trust anchor tables from a text file
### like, for example, TLS-Trust-Anchors-base.crt
## and TLS-Trust-Anchors-extended.crt located under Extras/Data
###
### imports
import sys
import base64
### generate a C file with bult-in TLS trust anchors
FILE_HEADER = """/**************... |
beekpr/wsgiservice | refs/heads/master | wsgiservice/application.py | 1 | """Components responsible for building the WSGI application."""
import logging
import webob
import wsgiservice
import wsgiservice.resource
logger = logging.getLogger(__name__)
class Application(object):
"""WSGI application wrapping a set of WsgiService resources. This class
can be used as a WSGI application ... |
buffer/thug | refs/heads/master | thug/ActiveX/modules/Spreadsheet.py | 1 | # OWC10/11.Spreadsheet ActiveX
# CVE-2009-1136
import logging
log = logging.getLogger("Thug")
def _Evaluate(self, *args):
log.ThugLogging.log_exploit_event(self._window.url,
"OWC 10/11.Spreadsheet ActiveX",
"Attack in _Evaluate function... |
gabrielfalcao/lettuce | refs/heads/master | tests/integration/lib/Django-1.2.5/tests/regressiontests/middleware_exceptions/__init__.py | 12133432 | |
adlius/osf.io | refs/heads/develop | api_tests/requests/__init__.py | 12133432 | |
leeseulstack/openstack | refs/heads/master | neutron/plugins/ml2/drivers/cisco/nexus/__init__.py | 12133432 | |
Azure/azure-documentdb-python | refs/heads/master | test/query_execution_context_tests.py | 1 | #The MIT License (MIT)
#Copyright (c) 2014 Microsoft Corporation
#Permission is hereby granted, free of charge, to any person obtaining a copy
#of this software and associated documentation files (the "Software"), to deal
#in the Software without restriction, including without limitation the rights
#to use, copy, modi... |
azoft-dev-team/imagrium | refs/heads/win | env/Lib/test/test_inspect_jy.py | 23 | """Misc inspect tests
Made for Jython.
"""
import inspect
import unittest
from java.lang import System
from test import test_support
class InspectTestCase(unittest.TestCase):
def test_java_routine(self):
self.assertTrue(inspect.isroutine(System.arraycopy))
def test_main():
test_support.run_unittest... |
felipsmartins/namebench | refs/heads/master | nb_third_party/dns/rdtypes/ANY/AFSDB.py | 248 | # Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... |
kustodian/ansible | refs/heads/devel | lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py | 8 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... |
gc3-uzh-ch/easybuild-framework | refs/heads/master | easybuild/__init__.py | 3 | ##
# Copyright 2011-2014 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (htt... |
ThiagoGarciaAlves/intellij-community | refs/heads/master | python/testData/inspections/PyCompatibilityInspection/raiseMultipleArgs.py | 2 | try:
a
except :
<warning descr="Python version 3.0, 3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7 do not support this syntax.">raise ImportError, ImportWarning</warning>
|
makermade/arm_android-21_arm-linux-androideabi-4.8 | refs/heads/master | lib/python2.7/encodings/mac_iceland.py | 593 | """ Python Character Mapping Codec mac_iceland generated from 'MAPPINGS/VENDORS/APPLE/ICELAND.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... |
victor-lin/npact | refs/heads/acgt_gamma | pynpact/pynpact/softtimeout.py | 2 | import time
class Timeout(Exception):
"Exception raised by SoftTimer to indicate computation has taken too long."
def __init__(self, **args):
self.__dict__.update(args)
class SoftTimer(object):
"""This class keeps track of how long it has been around and a
timeout. If the timeout has passed ... |
Ophiuchus1312/enigma2-master | refs/heads/master | lib/python/Screens/Menu.py | 1 | from Screens.Screen import Screen
from Components.Sources.List import List
from Components.ActionMap import NumberActionMap
from Components.Sources.StaticText import StaticText
from Components.config import configfile
from Components.PluginComponent import plugins
from Components.config import config
from Components.Sy... |
ghickman/django | refs/heads/master | tests/gis_tests/geoapp/sitemaps.py | 452 | from django.contrib.gis.sitemaps import KMLSitemap, KMZSitemap
from .models import City, Country
sitemaps = {'kml': KMLSitemap([City, Country]),
'kmz': KMZSitemap([City, Country]),
}
|
CamilloBovio/Remote | refs/heads/master | modules/fckeditor/fckeditor/fckeditor.py | 15 | """
FCKeditor - The text editor for Internet - http://www.fckeditor.net
Copyright (C) 2003-2010 Frederico Caldeira Knabben
== BEGIN LICENSE ==
Licensed under the terms of any of the following licenses at your
choice:
- GNU General Public License Version 2 or later (the "GPL")
http://www.gnu.org/licenses/gpl.html... |
timduru/platform-external-chromium_org | refs/heads/katkiss-4.4 | chrome/tools/automated_ui_test_tools/ui_action_generator.py | 52 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""A simple main function to print ui action sequences.
Action sequences are generated using chrome/test/functional/ui_model.py
an... |
finoptimal/fo_bdc | refs/heads/master | setup.py | 1 | from setuptools import setup, find_packages
from glob import glob
setup(name='fo_bdc',
version='1.0',
description='Wrapper around Bill.com API',
# Note that the tests folder can only be 1 level deep!!!
scripts=glob('tests/*'),
py_modules=[],
packages=find_packages())
|
damiansoriano/odoo | refs/heads/master | addons/purchase_double_validation/__openerp__.py | 62 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
mollstam/UnrealPy | refs/heads/master | UnrealPyEmbed/Source/Python/Lib/python27/SocketServer.py | 33 | """Generic socket server classes.
This module tries to capture the various aspects of defining a server:
For socket-based servers:
- address family:
- AF_INET{,6}: IP (Internet Protocol) sockets (default)
- AF_UNIX: Unix domain sockets
- others, e.g. AF_DECNET are conceivable (see <socket.h>
... |
codesouls/ziwuquan | refs/heads/master | web/ziwu/settings.py | 3 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
DEBUG = False
TESTING = False
VERIFY_EMAIL = True
VERIFY_USER = True
ROOT_FOLDER = os.path.dirname(os.path.abspath(__file__))
if os.path.exists('public/static'):
STATIC_FOLDER = os.path.join(os.getcwd(), 'public', 'static')
else:
STATIC_FOLDER = os.path... |
sanjeevtripurari/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/builtin_server/tests.py | 57 | from __future__ import unicode_literals
from io import BytesIO
from django.core.servers.basehttp import ServerHandler, MAX_SOCKET_CHUNK_SIZE
from django.utils.unittest import TestCase
class DummyHandler(object):
def log_request(self, *args, **kwargs):
pass
class FileWrapperHandler(ServerHandler):
... |
FHannes/intellij-community | refs/heads/master | python/testData/inspections/unusedImport/subpackageInInitPy/module_a.py | 83 | #! /usr/bin/env python
from package1 import ClassB
b = ClassB() |
yuxiang-zhou/menpo | refs/heads/master | menpo/feature/predefined.py | 4 | from menpo.base import partial_doc
from .features import igo, hog
double_igo = partial_doc(igo, double_angles=True)
sparse_hog = partial_doc(hog, mode='sparse')
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.