repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
gipi/Streamstudio | refs/heads/master | streamstudio/inputs.py | 1 | from .sslog import logger
# GstVideo and GdkX11 are necessary to avoid these bugs
# <https://bugzilla.gnome.org/show_bug.cgi?id=673396>
from gi.repository import Gtk, GObject, Gdk, Gst, GstVideo, GdkX11
from .pipeline import BasePipeline, StreamStudioSource, StreamStudioOutput
from .gui import GuiMixin
class VideoIn... |
apixandru/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/contrib/gis/gdal/feature.py | 321 | # The GDAL C library, OGR exception, and the Field object
from django.contrib.gis.gdal.base import GDALBase
from django.contrib.gis.gdal.error import OGRException, OGRIndexError
from django.contrib.gis.gdal.field import Field
from django.contrib.gis.gdal.geometries import OGRGeometry, OGRGeomType
from django.contrib.gi... |
smther/vnpy | refs/heads/master | vn.trader/ksotpDataType.py | 56 | # encoding: UTF-8
defineDict = {}
typedefDict = {}
#//////////////////////////////////////////////////////////////////////
#TKSOTPTraderIDType是一个交易所交易员代码类型
#//////////////////////////////////////////////////////////////////////
typedefDict["TKSOTPTraderIDType"] = "string"
#////////////////////////////////////////... |
imsparsh/python-for-android | refs/heads/master | python-build/python-libs/gdata/build/lib/gdata/Crypto/Hash/HMAC.py | 226 | """HMAC (Keyed-Hashing for Message Authentication) Python module.
Implements the HMAC algorithm as described by RFC 2104.
This is just a copy of the Python 2.2 HMAC module, modified to work when
used on versions of Python before 2.2.
"""
__revision__ = "$Id: HMAC.py,v 1.5 2002/07/25 17:19:02 z3p Exp $"
import strin... |
datadesk/django-bigbuild | refs/heads/master | bigbuild/models/__init__.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from .base import BasePage
from .pages import Page
from .archivedpages import ArchivedPage
from .pagelists import PageList
__all__ = (
'Page',
'BasePage',
'PageList',
'ArchivedPage',
)
|
GrandmasterK/XScheduler | refs/heads/master | venv/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/etree.py | 284 | from __future__ import absolute_import, division, unicode_literals
try:
from collections import OrderedDict
except ImportError:
try:
from ordereddict import OrderedDict
except ImportError:
OrderedDict = dict
import re
from pip._vendor.six import text_type
from . import _base
from ..utils... |
windskyer/nova | refs/heads/master | nova/tests/unit/api/openstack/test_common.py | 11 | # Copyright 2010 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... |
vincepandolfo/django | refs/heads/master | tests/middleware_exceptions/views.py | 296 | from django import http
from django.core.exceptions import PermissionDenied
from django.template import engines
from django.template.response import TemplateResponse
def normal_view(request):
return http.HttpResponse('OK')
def template_response(request):
template = engines['django'].from_string('OK')
re... |
mjiang-27/django_learn | refs/heads/master | template_III/app/admin.py | 13848 | from django.contrib import admin
# Register your models here.
|
alex/paramiko | refs/heads/master | paramiko/sftp_server.py | 7 | # 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... |
carlTLR/gyp | refs/heads/master | test/mac/gyptest-framework-dirs.py | 342 | #!/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 it is possible to build an object that depends on a
PrivateFramework.
"""
import os
import sys
import TestGyp
if sys.platf... |
xq262144/hue | refs/heads/master | desktop/core/ext-py/py4j-0.9/src/py4j/java_gateway.py | 12 | # -*- coding: UTF-8 -*-
"""Module to interact with objects in a Java Virtual Machine from a
Python Virtual Machine.
Variables that might clash with the JVM start with an underscore
(Java Naming Convention do not recommend to start with an underscore
so clashes become unlikely).
Created on Dec 3, 2009
:author: Barthe... |
Dangetsu/vnr | refs/heads/master | Frameworks/Sakura/py/apps/browser/main.py | 1 | # coding: utf8
# main.py
# 12/13/2012 jichi
__all__ = 'MainObject',
from PySide.QtCore import QCoreApplication, QObject
from sakurakit import skevents, skos
from sakurakit.skdebug import dprint, dwarn, debugmethod
from sakurakit.skclass import Q_Q, memoizedproperty
from i18n import i18n
import config, settings
#def ... |
nicememory/pie | refs/heads/master | pyglet/contrib/currently-broken/wydget/wydget/loadxml.py | 29 | from xml.etree import ElementTree
class XMLLoadError(Exception):
pass
xml_registry = {}
def fromFile(parent, file):
'''Load a gui frame and any child elements from the XML file.
The elements will be added as children on "parent" which may be any
other widget or a GUI instance.
'''
try:
... |
signed/intellij-community | refs/heads/master | python/testData/inspections/PyUnresolvedReferencesInspection/ConditionalImports/lib2.py | 83 | def f(x):
return repr(x)
def g(x):
return str(x) |
jamescr/osm2gtfs | refs/heads/master | osm2gtfs/creators/gh_accra/stops_creator_gh_accra.py | 4 | # coding=utf-8
from osm2gtfs.core.helper import Helper
from osm2gtfs.creators.stops_creator import StopsCreator
def create_stop_area(stop_data, feed):
stop_id = stop_data.osm_id
gtfs_stop_area = feed.AddStop(
lat=float(stop_data.lat),
lng=float(stop_data.lon),
name=stop_data.name,
... |
m1cr0man/OneLineWonders | refs/heads/master | CA117/Lab_4/beststudent_31_v3.py | 1 | (lambda a:print("Best student: {1} {2}\nBest mark: {0}".format(*max([line.split()for line in open(a,'r')],key=lambda x:int(x[0]) if x[0].isdigit() else [999,print("Invalid mark %s encountered. Skipping" % x[0])][0])))if __import__('os').path.isfile(a)else print("ERROR: File not found! " + a))(__import__('sys').argv[1])... |
ProkopHapala/SimpleSimulationEngine | refs/heads/master | python/pySimE/space/exp/OrbitalTransferOpt/NewtonCotesQuadrature.py | 1 | #!/usr/bin/env python
from pylab import *
#def f1(t): return (1-(1-(1.5*t)**2)**2)**2
def f1(t): return ( (0.138-t)*(0.5454-t)*(0.8354-t) )**2.0
def f1(t): return ( t*(t-1)*(0.138-t)*(0.5454-t)*(0.8354-t) )**2.0
#def f1(t): return ( 1/(0.1+(0.1-t)*(0.8-t)*(0.6-t))-10 )
ts = arange(0,1,0.001);
NCC = [
[ ... |
hurricup/intellij-community | refs/heads/master | python/testData/intentions/PyConvertCollectionLiteralIntentionTest/convertListToTuple_after.py | 312 | xs = (1, 2) |
carlmw/oscar-wager | refs/heads/master | dbindexer/api.py | 9 | from django.db import models
from djangotoolbox.fields import ListField
from copy import deepcopy
import re
regex = type(re.compile(''))
FIELD_INDEXES = {}
COLUMN_TO_NAME = {}
def get_index_name(field_name, lookup_type):
if lookup_type in ('iexact', 'istartswith'):
index_name = 'idxf_%s_l_icase' % (field... |
rtucker-mozilla/inventory | refs/heads/master | vendor-local/src/django-tastypie/tests/basic/models.py | 19 | import datetime
from django.contrib.auth.models import User
from django.db import models
from django import forms
from tastypie.utils import now
class Note(models.Model):
user = models.ForeignKey(User, related_name='notes')
title = models.CharField(max_length=255)
slug = models.SlugField()
content = m... |
cjaymes/pyscap | refs/heads/master | src/scap/model/oval_5/defs/independent/TestType.py | 4 | # Copyright 2016 Casey Jaymes
# This file is part of PySCAP.
#
# PySCAP 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.
#
# PySCAP is ... |
Stratio/cassandra | refs/heads/trunk | pylib/cqlshlib/__init__.py | 118 | # 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... |
rob-smallshire/trailer | refs/heads/master | trailer/model/track.py | 1 | from trailer.model.fieldtools import make, nullable, make_list
class Track:
def __init__(self, name=None, comment=None, description=None, source=None,
links=None, number=None, classification=None,
extensions=None, segments=None):
self._name = nullable(str)(name)
s... |
ponycoin/ponycoin-obsolete | refs/heads/master | contrib/spendfrom/setup.py | 1 | from distutils.core import setup
setup(name='ponyspendfrom',
version='1.0',
description='Command-line utility for ponycoin "coin control"',
author='Gavin Andresen',
author_email='gavin@ponycoinfoundation.org',
requires=['jsonrpc'],
scripts=['spendfrom.py'],
)
|
gangadharkadam/tailorerp | refs/heads/master | erpnext/hr/doctype/expense_claim/__init__.py | 37694 | from __future__ import unicode_literals
|
LaoZhongGu/kbengine | refs/heads/master | kbe/src/lib/python/Lib/test/test_tempfile.py | 6 | # tempfile.py unit tests.
import tempfile
import errno
import io
import os
import signal
import sys
import re
import warnings
import unittest
from test import support
if hasattr(os, 'stat'):
import stat
has_stat = 1
else:
has_stat = 0
has_textmode = (tempfile._text_openflags != tempfile._bin_openflags)
... |
alexthered/kienhoc-platform | refs/heads/master | lms/envs/content.py | 168 | """
These are debug machines used for content creators, so they're kind of a cross
between dev machines and AWS machines.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
from .aws im... |
Vixionar/django | refs/heads/master | tests/backends/models.py | 223 | from __future__ import unicode_literals
from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation,
)
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class S... |
neuroneuro15/ratcave | refs/heads/master | ratcave/wavefront.py | 1 | from .mesh import Mesh
from wavefront_reader import read_wavefront
from . import Texture
class WavefrontReader:
material_property_map = {'Kd': 'diffuse',
'Ka': 'ambient',
'Ke': 'emission',
'Ks': 'specular',
... |
mlavin/django | refs/heads/master | django/db/backends/base/features.py | 6 | from django.db.models.aggregates import StdDev
from django.db.utils import ProgrammingError
from django.utils.functional import cached_property
class BaseDatabaseFeatures:
gis_enabled = False
allows_group_by_pk = False
allows_group_by_selected_pks = False
empty_fetchmany_value = []
update_can_self... |
rodo/django-pgjson | refs/heads/master | runtests.py | 4 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os, sys
sys.path.insert(0, "./tests")
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
if __name__ == "__main__":
from django.core.management import execute_from_command_line
args = sys.argv
args.insert(1, "test")
if len(args) == 2:
... |
zoyoe/ectool | refs/heads/master | zoyoeec/requests/packages/chardet/sbcsgroupprober.py | 2935 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... |
yuanzhao/gpdb | refs/heads/master | concourse/scripts/builds/GpBuild.py | 7 | import subprocess
from GpdbBuildBase import GpdbBuildBase
INSTALL_DIR="/usr/local/gpdb"
class GpBuild(GpdbBuildBase):
def __init__(self, mode="orca"):
GpdbBuildBase.__init__(self)
self.mode = 'on' if mode == 'orca' else 'off'
self.configure_options = [
... |
caorong/livestreamer | refs/heads/develop | src/livestreamer/plugins/disney_de.py | 32 | """Plugin for Disney (Channel) Germany
Supports:
- http://video.disney.de/sehen/*
- http://disneychannel.de/sehen/*
- http://disneychannel.de/livestream
"""
import re
from livestreamer.plugin import Plugin
from livestreamer.plugin.api import http
from livestreamer.plugin.api.utils import parse_json
from ... |
chokribr/invenio | refs/heads/master | invenio/legacy/websubmit/functions/Print_Success_CPLX.py | 13 | # This file is part of Invenio.
# Copyright (C) 2007, 2008, 2010, 2011 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 version... |
Akoten/django-import-export | refs/heads/master | import_export/fields.py | 8 | from __future__ import unicode_literals
from . import widgets
from django.core.exceptions import ObjectDoesNotExist
class Field(object):
"""
Field represent mapping between `object` field and representation of
this field.
``attribute`` string of either an instance attribute or callable
off the ... |
bottompawn/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/xml/dom/minicompat.py | 94 | """Python version compatibility support for minidom.
This module contains internal implementation details and
should not be imported; use xml.dom.minidom instead.
"""
# This module should only be imported using "import *".
#
# The following names are defined:
#
# NodeList -- lightest possible NodeList implemen... |
simonpf/root | refs/heads/master | documentation/primer/macros/macro3.py | 67 | # Builds a polar graph in a square Canvas.
from ROOT import TGraphPolar, TCanvas, TMath
from array import array
c = TCanvas("myCanvas","myCanvas",600,600)
rmin = 0.
rmax = TMath.Pi()*6.
npoints = 300
r = array('d',[0]*npoints)
theta = array('d',[0]*npoints)
for ipt in xrange(0,npoints):
r[ipt] = ipt*(rmax-rmin)/... |
itorres/junk-drawer | refs/heads/master | 2014/pdf-stupidity/second/read2.py | 2 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import codecs
import sys
dst=""
tab = {
167: 243, # o acute
168: 242, # o grave
171: 239, # i diaeresis ï 426
172: 238, # i acute í
173: 237, # i grave ì
177: 233, # e acute è
178: 232, # e grave
179: 231, # ç
185: ... |
MackZxh/OCA-Choice | refs/heads/8.0 | department/project_department/project.py | 7 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014 Camptocamp
# Author Joel Grand-Guillaume
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# ... |
akaariai/django | refs/heads/master | tests/template_tests/filter_tests/test_floatformat.py | 345 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from decimal import Decimal, localcontext
from unittest import expectedFailure
from django.template.defaultfilters import floatformat
from django.test import SimpleTestCase
from django.utils import six
from django.utils.safestring import mark_safe
from ... |
thecarnie/XencoinCommunity | refs/heads/master | contrib/wallettools/walletchangepass.py | 2299 | from jsonrpc import ServiceProxy
access = ServiceProxy("http://127.0.0.1:8332")
pwd = raw_input("Enter old wallet passphrase: ")
pwd2 = raw_input("Enter new wallet passphrase: ")
access.walletpassphrasechange(pwd, pwd2) |
jfjlaros/bin-parser | refs/heads/master | python/cli.py | 1 | """Command line interface for the general binary parser."""
from argparse import ArgumentParser, FileType, RawDescriptionHelpFormatter
from typing import BinaryIO, TextIO
from yaml import safe_dump, safe_load
from . import usage, version, doc_split
from .bin_parser import BinReader, BinWriter
def bin_reader(
... |
osvalr/odoo | refs/heads/8.0 | addons/im_chat/im_chat.py | 268 | # -*- coding: utf-8 -*-
import base64
import datetime
import logging
import time
import uuid
import random
import simplejson
import openerp
from openerp.http import request
from openerp.osv import osv, fields
from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
from openerp.addons.bus.bus import TIMEOUT
_lo... |
SPP1665DataAnalysisCourse/elephant | refs/heads/master | elephant/test/test_pandas_bridge.py | 4 | # -*- coding: utf-8 -*-
"""
docstring goes here.
:copyright: Copyright 2014 by the Elephant team, see AUTHORS.txt.
:license: Modified BSD, see LICENSE.txt for details.
"""
from __future__ import division, print_function
import unittest
from itertools import chain
from neo.test.generate_datasets import fake_neo
impo... |
marctc/django | refs/heads/master | tests/admin_scripts/management/commands/app_command.py | 531 | from django.core.management.base import AppCommand
class Command(AppCommand):
help = 'Test Application-based commands'
requires_system_checks = False
def handle_app_config(self, app_config, **options):
print('EXECUTE:AppCommand name=%s, options=%s' % (app_config.name, sorted(options.items())))
|
rismalrv/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/modulestore/tests/test_xml_importer.py | 100 | """
Tests for XML importer.
"""
import mock
from opaque_keys.edx.locator import BlockUsageLocator, CourseLocator
from xblock.fields import String, Scope, ScopeIds, List
from xblock.runtime import Runtime, KvsFieldData, DictKeyValueStore
from xmodule.x_module import XModuleMixin
from opaque_keys.edx.locations import Loc... |
cmdunkers/DeeperMind | refs/heads/master | PythonEnv/lib/python2.7/site-packages/scipy/optimize/__init__.py | 12 | """
=====================================================
Optimization and root finding (:mod:`scipy.optimize`)
=====================================================
.. currentmodule:: scipy.optimize
Optimization
============
Local Optimization
------------------
.. autosummary::
:toctree: generated/
minimiz... |
phy0/namebench | refs/heads/master | nb_third_party/graphy/common.py | 205 | #!/usr/bin/python2.4
#
# Copyright 2008 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 o... |
OCHA-DAP/hdx-python-api | refs/heads/master | documentation/conf.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# HDX Python API documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 3 14:34:08 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in th... |
viewdy/phantomjs2 | refs/heads/master | src/breakpad/src/tools/gyp/test/subdirectory/gyptest-top-all.py | 240 | #!/usr/bin/env python
# Copyright (c) 2009 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies building a target and a subsidiary dependent target from a
.gyp file in a subdirectory, without specifying an explicit output b... |
tiancj/emesene | refs/heads/master | emesene/e3/papylib/papyon/papyon/gnet/message/__init__.py | 7 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2006 Ali Sabil <ali.sabil@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 2 of the License, or
# (at your option) any later... |
Forevercoin/Forevercoin | refs/heads/master | contrib/pyminer/pyminer.py | 1257 | #!/usr/bin/python
#
# Copyright (c) 2011 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
im... |
piratecb/up1and | refs/heads/master | app/models.py | 1 | import json
import datetime
from flask import current_app
from flask_login import UserMixin, AnonymousUserMixin
from werkzeug.security import generate_password_hash, check_password_hash
from itsdangerous import (TimedJSONWebSignatureSerializer
as Serializer, BadSignature, SignatureExpi... |
SteveXiSong/UW-Madison-ECE757-S15-MulticastSnooping | refs/heads/master | src/arch/x86/isa/insts/simd128/integer/data_reordering/__init__.py | 91 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... |
wmvanvliet/mne-python | refs/heads/master | doc/sphinxext/gh_substitutions.py | 12 | # -*- coding: utf-8 -*-
from docutils.nodes import reference
from docutils.parsers.rst.roles import set_classes
# adapted from
# https://doughellmann.com/blog/2010/05/09/defining-custom-roles-in-sphinx/
def gh_role(name, rawtext, text, lineno, inliner, options={}, content=[]):
"""Link to a GitHub issue."""
... |
dadawangweb/ukl-gsvc-web | refs/heads/master | app/api_1_0/api_functions/getonSysSrc.py | 3 | # -*- coding: utf-8 -*-
import json
from bson import json_util
from SqlPack.SQLModel import qureResultAsJson
import mysql.connector
from SqlPack.SqlLinkInfo import getonSysSrc as Sql
sql_info = Sql
def getJosonData(sysStr, Database, query_str):
"""==========================================
sql查询接口函数
:pa... |
taigaio/taiga-back | refs/heads/master | tests/integration/test_watch_userstories.py | 1 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-present Taiga Agile LLC
#
# 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 3 of the
# License, or (at your option) any later ver... |
GISPPU/GrenadaLandInformation | refs/heads/master | geonode/people/models.py | 4 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# 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 versio... |
fahadadeel/Aspose.Cells-for-Java | refs/heads/master | Plugins/Aspose-Cells-Java-for-Jython/asposecells/WorkingWithWorksheets/AddingWorksheetstoNewExcelFile.py | 3 | from asposecells import Settings
from com.aspose.cells import Workbook
from com.aspose.cells import SaveFormat
class AddingWorksheetstoNewExcelFile:
def __init__(self):
dataDir = Settings.dataDir + 'WorkingWithWorksheets/AddingWorksheetstoNewExcelFile/'
workbook = Workbook(dataDir... |
piotrmaslanka/bellum | refs/heads/master | suite/namegen.py | 1 | # coding=UTF-8
'''Suite is a collection of tools to perform deployment tasks.
Right now, called suite will generate 100 random planets with 6 provinces each'''
from random import random, shuffle
class Resources:
VOWELS = ['a', 'e', 'i', 'o', 'u']
CONSONANTS = ['b', 'c', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'm', ... |
Intel-Corporation/tensorflow | refs/heads/master | tensorflow/contrib/boosted_trees/estimator_batch/estimator_test.py | 7 | # 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... |
blacklin/kbengine | refs/heads/master | kbe/src/lib/python/Lib/test/test_posix.py | 60 | "Test posix functions"
from test import support
# Skip these tests if there is no posix module.
posix = support.import_module('posix')
import errno
import sys
import time
import os
import fcntl
import platform
import pwd
import shutil
import stat
import tempfile
import unittest
import warnings
_DUMMY_SYMLINK = os.p... |
zsoltdudas/lis-tempest | refs/heads/LIS | tempest/tests/lib/common/utils/test_misc.py | 5 | # Copyright 2014 NEC Corporation.
# 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... |
himleyb85/django | refs/heads/master | tests/test_utils/urls.py | 452 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^test_utils/get_person/([0-9]+)/$', views.get_person),
url(r'^test_utils/no_template_used/$', views.no_template_used),
]
|
amiguez/youtube-dl | refs/heads/master | youtube_dl/extractor/streamcloud.py | 127 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
compat_urllib_request,
)
class StreamcloudIE(InfoExtractor):
IE_NAME = 'streamcloud.eu'
_VALID_URL = r'https?://streamcloud\.eu/(?P<id>[a-zA-Z0-9_-]+)(?:/(?... |
perkinslr/pypyjs | refs/heads/master | website/js/pypy.js-0.2.0/lib/modules/lib2to3/pytree.py | 325 | # Copyright 2006 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""
Python parse tree definitions.
This is a very concrete parse tree; we need to keep every token and
even the comments and whitespace between tokens.
There's also a pattern matching implementation here.
"""
__autho... |
gladsonvm/haystackdemo | refs/heads/master | lib/python2.7/site-packages/django/contrib/webdesign/tests.py | 379 | # -*- coding: utf-8 -*-
import unittest
from django.contrib.webdesign.lorem_ipsum import *
from django.template import loader, Context
class WebdesignTest(unittest.TestCase):
def test_words(self):
self.assertEqual(words(7), u'lorem ipsum dolor sit amet consectetur adipisicing')
def test_paragraphs... |
dallaspythondojo/python | refs/heads/master | Francisco_Trujillo/Assignments/ninja_gold/server.py | 2 | from flask import Flask, render_template, redirect, session, request
import random, datetime
app = Flask(__name__)
app.secret_key='98t5unggno56'
@app.route('/')
def index():
if not'gold' in session:
session['gold'] = 0
session['click']= 0
session['message']=[]
return render_template('... |
mtambos/bachelorsthesis | refs/heads/master | src/run_motion-artifact_acc_z.py | 1 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the ho... |
jedie/djangocms-blog | refs/heads/develop | djangocms_blog/south_migrations/0008_auto__add_field_posttranslation_meta_title.py | 14 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'PostTranslation.meta_title'
db.add_column(u'djangocms_blo... |
ljgabc/lfs | refs/heads/master | usr/lib/python2.7/ctypes/test/test_byteswap.py | 60 | import sys, unittest, struct, math, ctypes
from binascii import hexlify
from ctypes import *
def bin(s):
return hexlify(memoryview(s)).upper()
# Each *simple* type that supports different byte orders has an
# __ctype_be__ attribute that specifies the same type in BIG ENDIAN
# byte order, and a __ctype_le__ attri... |
tymofij/adofex | refs/heads/master | transifex/projects/views/__init__.py | 1 | from django.contrib.syndication.views import feed
from transifex.projects.models import Project
from transifex.projects.permissions import pr_project_private_perm
from transifex.txcommon.decorators import one_perm_required_or_403
# Feeds
def slug_feed(request, slug=None, param='', feed_dict=None):
"""
Overrid... |
anhstudios/swganh | refs/heads/develop | data/scripts/templates/object/ship/shared_tiefighter_tier3.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 = Ship()
result.template = "object/ship/shared_tiefighter_tier3.iff"
result.attribute_template_id = -1
result.stfN... |
zaxliu/scipy | refs/heads/master | scipy/optimize/nonlin.py | 28 | r"""
=================
Nonlinear solvers
=================
.. currentmodule:: scipy.optimize
This is a collection of general-purpose nonlinear multidimensional
solvers. These solvers find *x* for which *F(x) = 0*. Both *x*
and *F* can be multidimensional.
Routines
========
Large-scale nonlinear solvers:
.. autos... |
Lordaeron12/padawan | refs/heads/master | padawan/dashboard/admin.py | 13848 | from django.contrib import admin
# Register your models here.
|
Memeo/samba-unovero | refs/heads/master | third_party/dnspython/dns/rdtypes/ANY/MX.py | 101 | # Copyright (C) 2003-2007, 2009-2011 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 "... |
hayashizakitakaaki/Introduction_mysite | refs/heads/master | dailyreport/admin.py | 1 | # -*- coding: utf-8 -*-
from django.contrib import admin
from dailyreport.models import Daily, Comment, Task
class DailyAdmin(admin.ModelAdmin):
list_display = ('title', 'report_w',)
list_display_links = ('title', )
admin.site.register(Daily, DailyAdmin)
class TaskAdmin(admin.ModelAdmin):
list_display ... |
cmouse/buildbot | refs/heads/master | master/buildbot/test/unit/data/test_logs.py | 5 | # 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... |
Endika/odoo | refs/heads/8.0 | addons/l10n_pt/__init__.py | 439 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012 Thinkopen Solutions, Lda. All Rights Reserved
# http://www.thinkopensolutions.com.
# $Id$
#
# This program is free software: you can r... |
sumedh123/debatify | refs/heads/UI | venv/lib/python2.7/site-packages/sqlalchemy/ext/orderinglist.py | 55 | # ext/orderinglist.py
# Copyright (C) 2005-2016 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""A custom list that manages index/position information for contained
elements.... |
postlund/home-assistant | refs/heads/dev | homeassistant/components/huawei_lte/binary_sensor.py | 3 | """Support for Huawei LTE binary sensors."""
import logging
from typing import Optional
import attr
from huawei_lte_api.enums.cradle import ConnectionStatusEnum
from homeassistant.components.binary_sensor import (
DOMAIN as BINARY_SENSOR_DOMAIN,
BinarySensorDevice,
)
from homeassistant.const import CONF_URL
... |
emedinaa/contentbox | refs/heads/master | third_party/django/contrib/gis/tests/test_spatialrefsys.py | 104 | from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.tests.utils import (no_mysql, oracle, postgis,
spatialite, HAS_SPATIALREFSYS, SpatialRefSys)
from django.utils import six
from django.utils import unittest
test_srs = ({'srid' : 4326,
'auth_name' : ('EPSG', True),
'auth... |
wakatime/vim-wakatime | refs/heads/master | packages/wakatime/packages/pygments/lexers/c_like.py | 8 | # -*- coding: utf-8 -*-
"""
pygments.lexers.c_like
~~~~~~~~~~~~~~~~~~~~~~
Lexers for other C-like languages.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, include, bygroups, inherit,... |
Pouf/CodingCompetition | refs/heads/master | Google-Code-Jam/2016-1B/A.py | 1 | import os
import sys
script = __file__
script_path = os.path.dirname(script)
script_file = os.path.basename(script)[0]
files = [f for f in os.listdir(script_path) if script_file in f and '.in' in f]
if '{}-large'.format(script_file) in str(files):
size = 'large'
elif '{}-small'.format(script_file) in st... |
hansek/onedrive-utils | refs/heads/master | dl.py | 1 | #!/usr/bin/env python3
from auth import authenticate_and_get_client
from utils import Util
client = authenticate_and_get_client()
utils = Util(client)
utils.iterate_over_folders_list(
func=utils.download
)
|
phazel/pixelated-user-agent | refs/heads/master | service/test/unit/bitmask_libraries/test_soledad.py | 3 | #
# Copyright (c) 2014 ThoughtWorks, Inc.
#
# Pixelated 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 License, or
# (at your option) any later version.
#
# Pixelated is distrib... |
certeu/do-portal | refs/heads/master | misc/migrations/env.py | 1 | from __future__ import with_statement
from alembic import context
from sqlalchemy import engine_from_config, pool
from logging.config import fileConfig
import logging
# this is the Alembic Config object, which provides
# access to the values within the .ini file in use.
config = context.config
# Interpret the config ... |
synopat/pyload | refs/heads/stable | module/plugins/crypter/SharingmatrixComFolder.py | 7 | # -*- coding: utf-8 -*-
from ..internal.DeadCrypter import DeadCrypter
class SharingmatrixComFolder(DeadCrypter):
__name__ = "SharingmatrixComFolder"
__type__ = "crypter"
__version__ = "0.07"
__status__ = "stable"
__pattern__ = r'http://(?:www\.)?sharingmatrix\.com/folder/\w+'
__config__ = [... |
HexHive/datashield | refs/heads/master | compiler/llvm/tools/clang/tools/scan-view/share/ScanView.py | 65 | import BaseHTTPServer
import SimpleHTTPServer
import os
import sys
import urllib, urlparse
import posixpath
import StringIO
import re
import shutil
import threading
import time
import socket
import itertools
import Reporter
import ConfigParser
###
# Various patterns matched or replaced by server.
kReportFileRE = re.... |
zstackio/zstack-woodpecker | refs/heads/master | integrationtest/vm/ha/test_one_node_shutdown_with_scheduler.py | 2 | '''
Integration Test for scheduler reboot VM in HA mode.
@author: Quarkonics
'''
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_state as test_state
import zstackwoodpecker.test_lib as test_lib
import zstackwoodpecker.operations.resource_operations as res_ops
import zstackwoodp... |
joshua-cogliati-inl/raven | refs/heads/devel | tests/framework/unit_tests/Distributions/TestDistributions.py | 1 | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... |
morrisonwudi/zipline | refs/heads/master | zipline/data/ffc/synthetic.py | 11 | """
Synthetic data loaders for testing.
"""
from bcolz import ctable
from numpy import (
arange,
array,
float64,
full,
iinfo,
uint32,
)
from pandas import (
DataFrame,
Timestamp,
)
from sqlite3 import connect as sqlite3_connect
from six import iteritems
from zipline.data.ffc.base impo... |
doganaltunbay/odoo | refs/heads/8.0 | addons/crm_partner_assign/report/crm_lead_report.py | 309 | # -*- 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... |
GunoH/intellij-community | refs/heads/master | python/testData/editing/enterInIncompleteGluedStringLiteralInParentheses.py | 18 | xs = ('foo'<caret> |
rwboyer/marilyn-project | refs/heads/master | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/lexers/_sourcemodbuiltins.py | 274 | # -*- coding: utf-8 -*-
"""
pygments.lexers._sourcemodbuiltins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file contains the names of SourceMod functions.
It is able to re-generate itself.
Do not edit the FUNCTIONS list by hand.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
... |
uberamd/NGECore2 | refs/heads/master | scripts/object/draft_schematic/space/booster/xwing_booster_mk1.py | 85615 | import sys
def setup(core, object):
return |
uberamd/NGECore2 | refs/heads/master | scripts/object/tangible/component/dna/dna_template_krahbu.py | 85615 | import sys
def setup(core, object):
return |
uberamd/NGECore2 | refs/heads/master | scripts/object/building/military/eow_imperial_endor_base.py | 85615 | import sys
def setup(core, object):
return |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.