repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
MichaelNedzelsky/intellij-community | refs/heads/master | python/testData/editing/unindentTab.before.py | 83 | #// python 3
class C:
def m(self): #// note: TABs instead of spaces
pass
|
nickbenes/GeoSense | refs/heads/master | public-build/lib/openlayers/OpenLayers-2.13.1/tools/BeautifulSoup.py | 307 | """Beautiful Soup
Elixir and Tonic
"The Screen-Scraper's Friend"
http://www.crummy.com/software/BeautifulSoup/
Beautiful Soup parses a (possibly invalid) XML or HTML document into a
tree representation. It provides methods and Pythonic idioms that make
it easy to navigate, search, and modify the tree.
A well-formed X... |
TingPing/hexchat-otr | refs/heads/master | src/makeformats.py | 1 | #!/usr/bin/env python3
#
# Uli Meis <a.sporto+bee@gmail.com>
#
# Just a short script to generate our FORMAT_REC
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License,... |
boompieman/iim_project | refs/heads/master | project_python2/lib/python2.7/site-packages/nltk/test/unit/test_tokenize.py | 4 | # -*- coding: utf-8 -*-
"""
Unit tests for nltk.tokenize.
See also nltk/test/tokenize.doctest
"""
from __future__ import unicode_literals
from nltk.tokenize import TweetTokenizer
import unittest
class TestTokenize(unittest.TestCase):
def test_tweet_tokenizer(self):
"""
Test TweetTok... |
Serag8/Bachelor | refs/heads/master | google_appengine/lib/django-1.2/django/core/serializers/python.py | 223 | """
A Python "serializer". Doesn't do much serializing per se -- just converts to
and from basic Python data types (lists, dicts, strings, etc.). Useful as a basis for
other serializers.
"""
from django.conf import settings
from django.core.serializers import base
from django.db import models, DEFAULT_DB_ALIAS
from dj... |
moneta-project/moneta-2.0.1.0 | refs/heads/master | contrib/devtools/update-translations.py | 5 | #!/usr/bin/python
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
'''
Run this script from the root of the repository to update all translations from
transifex.
It will do the follo... |
AwesomeTurtle/personfinder | refs/heads/master | app/vendors/unidecode/x07b.py | 252 | data = (
'Mang ', # 0x00
'Zhu ', # 0x01
'Utsubo ', # 0x02
'Du ', # 0x03
'Ji ', # 0x04
'Xiao ', # 0x05
'Ba ', # 0x06
'Suan ', # 0x07
'Ji ', # 0x08
'Zhen ', # 0x09
'Zhao ', # 0x0a
'Sun ', # 0x0b
'Ya ', # 0x0c
'Zhui ', # 0x0d
'Yuan ', # 0x0e
'Hu ', # 0x0f
'Gang ', # 0x10
... |
whip112/Whip112 | refs/heads/master | vendor/packages/translate/lang/sv.py | 30 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2009 Zuza Software Foundation
#
# This file is part of the Translate Toolkit.
#
# 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... |
Dino0631/RedRain-Bot | refs/heads/develop | cogs/lib/youtube_dl/extractor/bandcamp.py | 12 | from __future__ import unicode_literals
import json
import random
import re
import time
from .common import InfoExtractor
from ..compat import (
compat_str,
compat_urlparse,
)
from ..utils import (
ExtractorError,
float_or_none,
int_or_none,
KNOWN_EXTENSIONS,
parse_filesize,
unescapeHT... |
latusrepo/propmtime | refs/heads/master | propmtime/gui/preferences.py | 2 |
import os
import datetime
from distutils.util import strtobool
import sqlalchemy
import sqlalchemy.orm
import sqlalchemy.ext.declarative
import sqlalchemy.exc
from balsa import get_logger
from propmtime import __application_name__, __version__, DB_EXTENSION, convert_to_bool
log = get_logger(__application_name__)
... |
Ifiht/GBVideoPlayer | refs/heads/master | itt.py | 3 | import sys
music = open(sys.argv[1]).read().splitlines()
ticks = int(sys.argv[2])
ticks_per_line = float(ticks) / len(music)
MIDDLE_A = 440.0
SEMITONE = 2.0 ** (1/12.0)
MIDDLE_C = MIDDLE_A * SEMITONE ** 3
SLIDE_MAGIC = SEMITONE ** (1/8.0)
DRUMS = {
"C-503": "201F2177228B2380".decode("hex"),
"C-504": "203F218... |
valexandersaulys/prudential_insurance_kaggle | refs/heads/master | venv/lib/python2.7/site-packages/sklearn/neighbors/graph.py | 208 | """Nearest Neighbors graph functions"""
# Author: Jake Vanderplas <vanderplas@astro.washington.edu>
#
# License: BSD 3 clause (C) INRIA, University of Amsterdam
import warnings
from .base import KNeighborsMixin, RadiusNeighborsMixin
from .unsupervised import NearestNeighbors
def _check_params(X, metric, p, metric_... |
t-hey/QGIS-Original | refs/heads/master | tests/src/python/test_console.py | 22 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for the console
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
"""
__auth... |
zhangg/trove | refs/heads/master | trove/guestagent/datastore/experimental/couchbase/manager.py | 1 | # Copyright (c) 2013 eBay Software 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
#
# Unl... |
exinnet/kvproxy | refs/heads/master | test/gprof2dot.py | 3 | #!/usr/bin/env python
#
# Copyright 2008-2009 Jose Fonseca
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ... |
oopy/micropython | refs/heads/master | tests/unicode/file1.py | 115 | f = open("unicode/data/utf-8_1.txt", encoding="utf-8")
l = f.readline()
print(l)
print(len(l))
|
nwjs/chromium.src | refs/heads/nw45-log | chrome/test/ispy/common/ispy_utils.py | 88 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Internal utilities for managing I-Spy test results in Google Cloud Storage.
See the ispy.ispy_api module for the external API.
"""
import collections
im... |
TomasTomecek/atomic-reactor | refs/heads/master | atomic_reactor/source.py | 6 | """
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
Code for getting source code to put inside container.
"""
import logging
import copy
import os
import shutil
import tempfile
from atomic_react... |
nephila/django-google-webmastertools | refs/heads/master | setup.py | 1 | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
CLASSIFIERS = [
'Development Status :: 2 - Pre-Alpha',
'Environment :: Web Environment',
'Framework :: Django',
'License :: OSI Approved :: BSD License',
'Intended Audience :: Developers',
'Operating System :: OS Ind... |
Jannes123/django-oscar | refs/heads/master | src/oscar/apps/dashboard/nav.py | 23 | import re
from django.core.exceptions import ImproperlyConfigured
from django.core.urlresolvers import NoReverseMatch, resolve, reverse
from django.http import Http404
from oscar.core.loading import AppNotFoundError, get_class
from oscar.views.decorators import check_permissions
class Node(object):
"""
A no... |
madan96/sympy | refs/heads/master | sympy/external/tests/test_codegen.py | 73 | # This tests the compilation and execution of the source code generated with
# utilities.codegen. The compilation takes place in a temporary directory that
# is removed after the test. By default the test directory is always removed,
# but this behavior can be changed by setting the environment variable
# SYMPY_TEST_CL... |
Stratoscale/yumcache | refs/heads/master | yumcache/liveresponse.py | 1 | import time
from yumcache import cachedresponse
class LiveResponse:
def __init__(self, connection, downloader, range):
self._connection = connection
self._downloader = downloader
self._range = range
self._chunked = False
def replay(self):
if not self._waitToStart():
... |
farm3r/ardupilot | refs/heads/master | mk/PX4/Tools/genmsg/src/genmsg/__init__.py | 215 | # Software License Agreement (BSD License)
#
# Copyright (c) 2011, Willow Garage, 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 ... |
40223136/w11-2 | refs/heads/master | static/Brython3.1.0-20150301-090019/Lib/site-packages/pygame/rect.py | 603 | #!/usr/bin/env python
'''Pygame object for storing rectangular coordinates.
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id$'
import copy
#import SDL.video
import SDL
class _RectProxy:
'''Proxy for SDL_Rect that can handle negative size.'''
__slots__ = ['x', 'y', 'w', 'h']
def __init__(self... |
roeebar/gr-plc | refs/heads/master | docs/doxygen/swig_doc.py | 220 | #
# Copyright 2010,2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version... |
hdmetor/scikit-learn | refs/heads/master | sklearn/utils/estimator_checks.py | 30 | from __future__ import print_function
import types
import warnings
import sys
import traceback
import inspect
import pickle
from copy import deepcopy
import numpy as np
from scipy import sparse
import struct
from sklearn.externals.six.moves import zip
from sklearn.externals.joblib import hash, Memory
from sklearn.ut... |
jeffmahoney/supybot | refs/heads/urlsnarfer | plugins/Nickometer/__init__.py | 15 | ###
# Copyright (c) 2004, William Robinson.
# Derived from work (c) 1998, Adam Spiers <adam.spiers@new.ox.ac.uk>
# 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 c... |
aerialist/scikit-rf | refs/heads/master | skrf/media/tests/test_media.py | 6 | import unittest
import os
import numpy as npy
from skrf.media import DefinedGammaZ0, Media
from skrf.network import Network
from skrf.frequency import Frequency
import skrf
class DefinedGammaZ0TestCase(unittest.TestCase):
def setUp(self):
self.files_dir = os.path.join(
os.path.dirname(os.pat... |
dezynetechnologies/odoo | refs/heads/8.0 | addons/google_drive/__init__.py | 437 | import google_drive
|
hisie/django-select2 | refs/heads/master | tests/testapp/__init__.py | 12133432 | |
CSC-ORG/Dynamic-Dashboard-2015 | refs/heads/master | engine/api/analytics/valid/__init__.py | 12133432 | |
mstriemer/addons-server | refs/heads/master | src/olympia/addons/tests/test_commands.py | 3 | from django.conf import settings
from django.core.management import call_command
from django.core.management.base import CommandError
import pytest
from olympia import amo
from olympia.addons.management.commands import approve_addons
from olympia.amo.tests import addon_factory
from olympia.devhub.models import AddonL... |
miquelramirez/LAPKT-public | refs/heads/master | 2.0/external/fd/timers.py | 3 | from __future__ import print_function
# -*- coding: utf-8 -*-
import contextlib
import os
import sys
import time
class Timer(object):
def __init__(self):
self.start_time = time.time()
self.start_clock = self._clock()
def _clock(self):
times = os.times()
return times[0] + times[1]
def __str__(self):
r... |
litchfield/django | refs/heads/master | django/core/files/uploadedfile.py | 471 | """
Classes representing uploaded files.
"""
import errno
import os
from io import BytesIO
from django.conf import settings
from django.core.files import temp as tempfile
from django.core.files.base import File
from django.utils.encoding import force_str
__all__ = ('UploadedFile', 'TemporaryUploadedFile', 'InMemoryU... |
danbradham/hotline | refs/heads/master | hotline/utils.py | 1 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from contextlib import contextmanager
from functools import partial
try:
from Queue import Queue
except ImportError:
from queue import Queue
from timeit import default_timer
import subprocess
import sys
from hotline.vendor.Qt import QtCore, QtGui, ... |
Comunitea/CMNT_004_15 | refs/heads/11.0 | project-addons/ubl_edi_to_es/models/sale.py | 1 | from odoo import models, fields
class SaleOrderLine(models.Model):
_inherit = 'sale.order.line'
qty_available_es = fields.Float('Qty Avail. ES', related="product_id.virtual_stock_conservative_es",readonly=1)
|
savoirfairelinux/django | refs/heads/master | tests/migrations/test_migrations_unmigdep/0001_initial.py | 133 | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("auth", "__first__"),
]
operations = [
migrations.CreateModel(
"Book",
[
("id", models.AutoField(primary_key=True)),
("user", models.... |
coblo/isccbench | refs/heads/master | iscc_bench/scripts/title_length.py | 1 | # -*- coding: utf-8 -*-
"""Script to measure basic title length statisics"""
import unicodedata
from itertools import cycle
import numpy as np
from iscc_bench.readers import ALL_READERS
def iter_titles():
"""Iterate over titles"""
readers = [r() for r in ALL_READERS]
for reader in cycle(readers):
... |
xiaozhuchacha/OpenBottle | refs/heads/master | grammar_induction/earley_parser/nltk/classify/naivebayes.py | 7 | # Natural Language Toolkit: Naive Bayes Classifiers
#
# Copyright (C) 2001-2017 NLTK Project
# Author: Edward Loper <edloper@gmail.com>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
A classifier based on the Naive Bayes algorithm. In order to find the
probability for a label, this algorithm... |
cowboysmall/rosalind | refs/heads/master | src/stronghold/rosalind_osym.py | 1 | import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), '../tools'))
import fasta
import strings
def main(argv):
s, t = fasta.read_ordered(argv[0])
m, n = len(s), len(t)
T1 = strings.mismatch_alignment_table(s, t)
T2 = strings.mismatch_alignment_table(s[::-1], t[::-1])
... |
Rav3nPL/p2pool-rav | refs/heads/master | p2pool/bitcoin/networks/joulecoin.py | 7 | import os
import platform
from twisted.internet import defer
from .. import data, helper
from p2pool.util import pack
P2P_PREFIX = 'a5c07955'.decode('hex')
P2P_PORT = 26789
ADDRESS_VERSION = 43
RPC_PORT = 8844
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
'joulecoinaddress' in (y... |
Semi-global/edx-platform | refs/heads/master | cms/djangoapps/contentstore/management/commands/git_export.py | 164 | """
This command exports a course from CMS to a git repository.
It takes as arguments the course id to export (i.e MITx/999/2020 ) and
the repository to commit too. It takes username as an option for identifying
the commit, as well as a directory path to place the git repository.
By default it will use settings.GIT_R... |
EmergingTechnologyAdvisors/blockly | refs/heads/master | i18n/tests.py | 203 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Tests of i18n scripts.
#
# Copyright 2013 Google Inc.
# https://developers.google.com/blockly/
#
# 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
#
#... |
kaushik94/tornado | refs/heads/master | tornado/util.py | 102 | """Miscellaneous utility functions and classes.
This module is used internally by Tornado. It is not necessarily expected
that the functions and classes defined here will be useful to other
applications, but they are documented here in case they are.
The one public-facing part of this module is the `Configurable` cl... |
arhik/nupic | refs/heads/master | src/nupic/research/monitor_mixin/metric.py | 50 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... |
dhimmel/networkx | refs/heads/master | networkx/algorithms/centrality/betweenness_subset.py | 20 | """
Betweenness centrality measures for subsets of nodes.
"""
# Copyright (C) 2004-2015 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
__author__ = """Aric Hagberg (hagberg@lanl.gov)"""
__all__ = ['between... |
memtoko/django | refs/heads/master | tests/i18n/other/locale/de/__init__.py | 12133432 | |
GunnerJnr/_CodeInstitute | refs/heads/master | Stream-3/Full-Stack-Development/2.Hello-Django-Templates/3.Template-Inheritance/hello_django/HelloWorld_prj/HelloWorld_app/__init__.py | 12133432 | |
rahuldhote/scikit-learn | refs/heads/master | examples/svm/plot_svm_nonlinear.py | 268 | """
==============
Non-linear SVM
==============
Perform binary classification using non-linear SVC
with RBF kernel. The target to predict is a XOR of the
inputs.
The color map illustrates the decision function learned by the SVC.
"""
print(__doc__)
import numpy as np
import matplotlib.pyplot as plt
from sklearn imp... |
teemulehtinen/a-plus | refs/heads/master | selenium_test/test/locators.py | 2 | from selenium.webdriver.common.by import By
class LoginPageLocators(object):
BANNER = (By.XPATH, "//*[@class='page-header']/h1[contains(text(), 'Login')]")
USERNAME_INPUT = (By.XPATH, "//input[@id='id_username']")
PASSWORD_INPUT = (By.XPATH, "//input[@id='id_password']")
SUBMIT_BUTTON = (By.XPATH, "//*... |
postlund/home-assistant | refs/heads/dev | homeassistant/components/enigma2/__init__.py | 37 | """Support for Enigma2 devices."""
|
maxhawkins/random_diet_club | refs/heads/master | lib/werkzeug/contrib/fixers.py | 4 | # -*- coding: utf-8 -*-
"""
werkzeug.contrib.fixers
~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 0.5
This module includes various helpers that fix bugs in web servers. They may
be necessary for some versions of a buggy web server but not others. We try
to stay updated with the status o... |
liefdiy/bite-project | refs/heads/master | deps/mrtaskman/server/mapreduce/lib/simplejson/decoder.py | 77 | #!/usr/bin/env python
"""Implementation of JSONDecoder
"""
import re
import sys
import struct
from mapreduce.lib.simplejson.scanner import make_scanner
try:
from mapreduce.lib.simplejson._speedups import scanstring as c_scanstring
except ImportError:
c_scanstring = None
__all__ = ['JSONDecoder']
FLAGS = re.V... |
simonwydooghe/ansible | refs/heads/devel | lib/ansible/modules/packaging/os/apt_rpm.py | 79 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2013, Evgenii Terechkov
# Written by Evgenii Terechkov <evg@altlinux.org>
# Based on urpmi module written by Philippe Makowski <philippem@mageia.org>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__... |
petersn/tausch | refs/heads/master | tausch_server.py | 1 | #! /usr/bin/python
"""
Tausch server.
"""
handshake_string = "tausch\1\0\0\0"
import SocketServer, traceback, socket, threading, os, time, struct, json, Queue, random, logging
rng = random.SystemRandom()
# This lock synchronizes access to the Context.
main_lock = threading.Lock()
class Context:
config = {
# Rou... |
pewpewsecure/cle | refs/heads/master | cle/tls.py | 1 | from collections import namedtuple, defaultdict
import struct
from .backends import Backend
from .memory import Clemory
TLSArchInfo = namedtuple('TLSArchInfo', ('variant', 'tcbhead_size', 'head_offsets', 'dtv_offsets', 'pthread_offsets'))
tls_archinfo = {
'AMD64': TLSArchInfo( 2, 704, ... |
NaohiroTamura/python-ironicclient | refs/heads/master | ironicclient/tests/unit/test_client.py | 1 | # 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
# d... |
srio/BeamlineComponents | refs/heads/master | Source/UndulatorVertical.py | 1 | from BeamlineComponents.Source.Undulator import Undulator
class UndulatorVertical(Undulator):
def __init__(self,K , period_length, period_number):
Undulator.__init__(self,
K_vertical=K,
K_horizontal=0.0,
period_length=period_... |
dylup/cispwn | refs/heads/master | cispwn.py | 1 | #!/usr/bin/python
import serial
import sys
import getopt
import time
import os
import subprocess
version = 'Version 0.2'
tftp = 0
copied = 0
router = 0
switch = 0
asa = 0
passwords = 0
password = []
interface = []
password_list = []
ip_submask = subprocess.check_output("ifconfig")
router = subprocess.check_output(['r... |
PongPi/isl-odoo | refs/heads/8.0 | addons/web_linkedin/__init__.py | 442 |
import web_linkedin |
jeezybrick/django | refs/heads/master | tests/model_meta/__init__.py | 12133432 | |
Gagaro/django | refs/heads/master | tests/gis_tests/geoadmin/__init__.py | 12133432 | |
google/slo-generator | refs/heads/master | samples/custom/__init__.py | 12133432 | |
jbking/demo-appengine-django-golang | refs/heads/master | myproject/django/conf/locale/he/__init__.py | 12133432 | |
AstroFloyd/LearningPython | refs/heads/master | Fitting/scipy.optimize.least_squares_2_loss.py | 1 | #!/bin/env python3
# https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.least_squares.html
"""Solve a curve fitting problem using robust loss function to take care of outliers in the data. Define the
model function as y = a + b * exp(c * t), where t is a predictor variable, y is an observation and a,... |
deandunbar/bitwave | refs/heads/master | hackathon_version/venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/__init__.py | 1730 | """A collection of modules for building different kinds of tree from
HTML documents.
To create a treebuilder for a new type of tree, you need to do
implement several things:
1) A set of classes for various types of elements: Document, Doctype,
Comment, Element. These must implement the interface of
_base.treebuilders... |
denny820909/builder | refs/heads/master | lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/steps/source/svn.py | 4 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... |
lanen/youtube-dl | refs/heads/master | youtube_dl/extractor/screenwavemedia.py | 58 | # encoding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
int_or_none,
unified_strdate,
js_to_json,
)
class ScreenwaveMediaIE(InfoExtractor):
_VALID_URL = r'https?://player\d?\.screenwavemedia\.com/(?:play/)?[a-zA-Z]+\.php\?.*\bid=(?P... |
anhstudios/swganh | refs/heads/develop | data/scripts/templates/object/tangible/hair/bothan/shared_hair_bothan_female_s04.py | 2 | #### NOTICE: THIS FILE IS AUTOGENERATED
#### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY
#### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES
from swgpy.object import *
def create(kernel):
result = Tangible()
result.template = "object/tangible/hair/bothan/shared_hair_bothan_female_s04.iff"
result.attribute_tem... |
margelatu/czl-scrape | refs/heads/master | scrapy/czlscrape/spiders/__init__.py | 2415 | # This package will contain the spiders of your Scrapy project
#
# Please refer to the documentation for information on how to create and manage
# your spiders.
|
drpaneas/linuxed.gr | refs/heads/master | lib/python2.7/site-packages/setuptools/tests/test_test.py | 124 | # -*- coding: UTF-8 -*-
"""develop tests
"""
import os
import shutil
import site
import sys
import tempfile
import unittest
from distutils.errors import DistutilsError
from setuptools.compat import StringIO
from setuptools.command.test import test
from setuptools.command import easy_install as easy_install_pkg
from s... |
poiati/django | refs/heads/master | tests/messages_tests/test_mixins.py | 281 | from django.core.urlresolvers import reverse
from django.test import SimpleTestCase, override_settings
from .urls import ContactFormViewWithMsg
@override_settings(ROOT_URLCONF='messages_tests.urls')
class SuccessMessageMixinTests(SimpleTestCase):
def test_set_messages_success(self):
author = {'name': 'J... |
blueburningcoder/nupic | refs/heads/master | external/linux32/lib/python2.6/site-packages/matplotlib/numerix/linear_algebra/__init__.py | 70 | from matplotlib.numerix import which
if which[0] == "numarray":
from numarray.linear_algebra import *
elif which[0] == "numeric":
from LinearAlgebra import *
elif which[0] == "numpy":
try:
from numpy.oldnumeric.linear_algebra import *
except ImportError:
from numpy.linalg.old import *
e... |
redhat-openstack/django | refs/heads/epel7-patches | django/contrib/gis/db/backends/spatialite/introspection.py | 221 | from django.contrib.gis.gdal import OGRGeomType
from django.db.backends.sqlite3.introspection import DatabaseIntrospection, FlexibleFieldLookupDict
from django.utils import six
class GeoFlexibleFieldLookupDict(FlexibleFieldLookupDict):
"""
Sublcass that includes updates the `base_data_types_reverse` dict
f... |
datacats/ckanext-featuredviews | refs/heads/master | ckanext/featuredviews/db.py | 3 | import ckan.model as model
from sqlalchemy import Table
from sqlalchemy import Column
from sqlalchemy import types
from ckan.model.meta import metadata, mapper, Session
from ckan.model.types import make_uuid
featured_table = Table('featured', metadata,
Column('resource_view_id', types.UnicodeText, primary_key=Tr... |
FedoraScientific/salome-smesh | refs/heads/master | doc/salome/examples/defining_hypotheses_ex11.py | 1 | # Projection 1D2D
# Project triangles from one meshed face to another mesh on the same box
import salome
salome.salome_init()
import GEOM
from salome.geom import geomBuilder
geompy = geomBuilder.New(salome.myStudy)
import SMESH, SALOMEDS
from salome.smesh import smeshBuilder
smesh = smeshBuilder.New(salome.myStudy)... |
tbombach/autorest | refs/heads/master | src/generator/AutoRest.Python.Tests/AcceptanceTests/string_tests.py | 2 | # coding=utf-8
# --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ... |
stefhak/openwebrtc | refs/heads/master | bindings/java/c_generator.py | 31 | # Copyright (c) 2014-2015, Ericsson AB. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and th... |
kirstykitto/CLAtoolkit | refs/heads/master | clatoolkit_project/clatoolkit/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
chriscrosscutler/scikit-image | refs/heads/master | skimage/feature/tests/__init__.py | 672 | from ..._shared.testing import setup_test, teardown_test
def setup():
setup_test()
def teardown():
teardown_test()
|
blackzw/openwrt_sdk_dev1 | refs/heads/master | staging_dir/target-mips_r2_uClibc-0.9.33.2/usr/lib/python2.7/test/test_bsddb3.py | 135 | # Test driver for bsddb package.
"""
Run all test cases.
"""
import os
import sys
import tempfile
import time
import unittest
from test.test_support import requires, run_unittest, import_module
# Skip test if _bsddb module was not built.
import_module('_bsddb')
# Silence Py3k warning
import_module('bsddb', deprecated=... |
kagayakidan/scikit-learn | refs/heads/master | examples/decomposition/plot_kernel_pca.py | 353 | """
==========
Kernel PCA
==========
This example shows that Kernel PCA is able to find a projection of the data
that makes data linearly separable.
"""
print(__doc__)
# Authors: Mathieu Blondel
# Andreas Mueller
# License: BSD 3 clause
import numpy as np
import matplotlib.pyplot as plt
from sklearn.decomp... |
olasitarska/django | refs/heads/master | tests/model_regress/tests.py | 39 | from __future__ import unicode_literals
import datetime
from operator import attrgetter
import sys
import unittest
from django.core.exceptions import ValidationError
from django.test import TestCase, skipUnlessDBFeature
from django.utils import six
from django.utils.timezone import get_fixed_timezone
from django.db i... |
raajitr/django_hangman | refs/heads/master | env/lib/python2.7/site-packages/django/conf/locale/nl/formats.py | 504 | # -*- 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 = 'j F Y' # '20 ja... |
peterwharrison/SWAMP | refs/heads/master | tests.py | 1 | import unittest
import SWAMP
class TestSequenceMasking(unittest.TestCase):
def test_read_branchcodes(self):
infile = 'example_dataset/branchcodes.txt'
branch_codes = SWAMP.read_branchcodes(infile)
# Branch codes come out like '5..7' -> (papio, colobus)
branch_a = branch_codes['5... |
surfnzdotcom/cvsnt-fork | refs/heads/master | libxml/python/tests/validate.py | 87 | #!/usr/bin/python -u
import sys
import libxml2
# Memory debug specific
libxml2.debugMemory(1)
ctxt = libxml2.createFileParserCtxt("valid.xml")
ctxt.validate(1)
ctxt.parseDocument()
doc = ctxt.doc()
valid = ctxt.isValid()
if doc.name != "valid.xml":
print "doc.name failed"
sys.exit(1)
root = doc.children
if r... |
koson/MissionPlannerKMTI | refs/heads/master | Lib/UserDict.py | 358 | """A more or less complete user-defined wrapper around dictionary objects."""
class UserDict:
def __init__(self, dict=None, **kwargs):
self.data = {}
if dict is not None:
self.update(dict)
if len(kwargs):
self.update(kwargs)
def __repr__(self): return repr(self.d... |
cordery/django-countries-plus | refs/heads/master | countries_plus/middleware.py | 1 | import logging
from countries_plus.models import Country
logger = logging.getLogger(__name__)
class AddRequestCountryMiddleware(object):
def __init__(self, get_response=None):
self.get_response = get_response
def __call__(self, request):
country = Country.get_by_request(request)
if... |
mnach/suds-py3k | refs/heads/master | setup.py | 1 | #!/usr/bin/python
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser 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 th... |
cpcloud/PyTables | refs/heads/develop | doc/sphinxext/inheritance_diagram.py | 98 | """
Defines a docutils directive for inserting inheritance diagrams.
Provide the directive with one or more classes or modules (separated
by whitespace). For modules, all of the classes in that module will
be used.
Example::
Given the following classes:
class A: pass
class B(A): pass
class C(A): pass
... |
bob-white/UnityIronPythonConsole | refs/heads/master | Assets/IronPythonConsole/Plugins/Lib/_MozillaCookieJar.py | 191 | """Mozilla / Netscape cookie loading / saving."""
import re, time
from cookielib import (_warn_unhandled_exception, FileCookieJar, LoadError,
Cookie, MISSING_FILENAME_TEXT)
class MozillaCookieJar(FileCookieJar):
"""
WARNING: you may want to backup your browser's cookies file if you us... |
doudz/checkfeedmail | refs/heads/master | setup.py | 1 | # -*- coding: cp1252 -*-
## Copyright (c) 2007, Sébastien Ramage
##
## 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 cop... |
mskcc/iCallSV | refs/heads/master | iCallSV/helper.py | 2 | """
helper
~~~~~~~~~~~~~~~
:Description: helper has many utilities for iCallSV
"""
'''
Created on February 2, 2017
Description: helper has many utilities for iCallSV
@author: Ronak H Shah
A) make_empty_output: Will make an empty output file with header
::Input::
outFile: string containing path to write the output
::O... |
zhoulingjun/django | refs/heads/master | tests/auth_tests/test_remote_user.py | 275 | from datetime import datetime
from django.conf import settings
from django.contrib.auth import authenticate
from django.contrib.auth.backends import RemoteUserBackend
from django.contrib.auth.middleware import RemoteUserMiddleware
from django.contrib.auth.models import User
from django.test import TestCase, modify_set... |
abligh/ocfs2-tools | refs/heads/ubuntu-precise-1.8.2 | ocfs2console/ocfs2interface/bosa.py | 8 | # OCFS2Console - GUI frontend for OCFS2 management and debugging
# Copyright (C) 2002, 2005 Oracle. All rights reserved.
#
# 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 th... |
rageandqq/rmc | refs/heads/master | migrations/delete_non_existing_course_user_courses.py | 8 | import rmc.models as m
import rmc.shared.constants as c
import mongoengine as me
def delete_non_existing_course_user_courses():
"""
NOTE: Do not run this yet, as it seems from dry run that there are
some usercourses that we would be deleting that are legit courses
that we should try getting into our ... |
yoer/hue | refs/heads/master | desktop/core/ext-py/guppy-0.1.10/guppy/heapy/Use.py | 37 | #._cv_part guppy.heapy.Use
import guppy.etc.Glue
class _GLUECLAMP_(guppy.etc.Glue.Interface):
_preload_ = '_hiding_tag_',
_chgable_ = ('reprefix', 'default_reprefix', 'gcobjs',
'relheap', 'relheapg', 'relheapu', '__doc__')
_dir_ = (
'Anything', 'Class', 'Clodo', 'Id', 'Idset',... |
jbernhard/frzout | refs/heads/master | frzout/test/test_species.py | 1 | # -*- coding: utf-8 -*-
from ..species import species_dict, _nth_digit, _normalize_species
def test_species():
num = 9876543210
assert [_nth_digit(num, n) for n in range(10)] == list(range(10)), \
'Incorrect digits extracted from {}'.format(num)
num = 7492
assert [_nth_digit(num, n) for n ... |
eResearchSA/reporting-unified | refs/heads/master | usage/types.py | 1 | import json
import logging
import requests
import concurrent.futures
from urllib.parse import urlencode
from abc import ABCMeta, abstractmethod
from unified.models import nova, hpc
from utils import array_to_dict
logger = logging.getLogger(__name__)
class NotFoundError(Exception):
pass
class Client(object):
... |
40223110/2015cda_0512 | refs/heads/master | static/Brython3.1.0-20150301-090019/Lib/unittest/__init__.py | 900 | """
Python unit testing framework, based on Erich Gamma's JUnit and Kent Beck's
Smalltalk testing framework.
This module contains the core framework classes that form the basis of
specific test cases and suites (TestCase, TestSuite etc.), and also a
text-based utility class for running the tests and reporting the resu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.