repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
VinnieJohns/ggrc-core
refs/heads/develop
test/selenium/src/tests/__init__.py
301
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
Haynie-Research-and-Development/jarvis
refs/heads/master
deps/lib/python3.4/site-packages/twilio/rest/resources/addresses.py
46
from twilio.exceptions import TwilioException from twilio.rest.resources import InstanceResource, ListResource class DependentPhoneNumber(InstanceResource): """A purchased phone number that depends on a particular :class:`Address`. Attributes are the same as :class:`PhoneNumber`. DependentPhoneNumbe...
tashaharrison/dress
refs/heads/master
sites/all/modules/contrib/proj4js/lib/proj4js/tools/jsmin.py
513
#!/usr/bin/python # This code is original from jsmin by Douglas Crockford, it was translated to # Python by Baruch Even. The original code had the following copyright and # license. # # /* jsmin.c # 2007-01-08 # # Copyright (c) 2002 Douglas Crockford (www.crockford.com) # # Permission is hereby granted, free of ch...
Intel-Corporation/tensorflow
refs/heads/master
tensorflow/contrib/gan/python/estimator/python/gan_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...
fibbo/DIRAC
refs/heads/integration
DataManagementSystem/Agent/RequestOperations/DMSRequestOperationsBase.py
1
""" :mod: DMSRequestOperationsBase ==================== Just a collector of common functions """ __RCSID__ = "$Id $" from DIRAC import S_OK, S_ERROR from DIRAC.RequestManagementSystem.Client.Operation import Operation from DIRAC.ConfigurationSystem.Client.Helpers.Resources import getRegi...
Bjwebb/pytest
refs/heads/master
_pytest/assertion/__init__.py
18
""" support for presenting detailed information in failing assertions. """ import py import sys from _pytest.monkeypatch import monkeypatch from _pytest.assertion import util def pytest_addoption(parser): group = parser.getgroup("debugconfig") group.addoption('--assert', action="store", ...
emon10005/sympy
refs/heads/master
sympy/physics/quantum/qexpr.py
75
from __future__ import print_function, division from sympy import Expr, sympify, Symbol, Matrix from sympy.printing.pretty.stringpict import prettyForm from sympy.core.containers import Tuple from sympy.core.compatibility import is_sequence, string_types, u from sympy.physics.quantum.dagger import Dagger from sympy.p...
idea4bsd/idea4bsd
refs/heads/idea4bsd-master
python/testData/refactoring/rename/renameProperty.py
83
class C(object): def __init__(self): self._x = None @property def fo<caret>o(self): """I'm the 'x' property.""" return self._x @foo.setter def foo(self, value): self._x = value @foo.deleter def foo(self): del self._x
AoiKuiyuyou/AoikHotkey
refs/heads/master
src/aoikhotkey/util/sendkey_winos.py
1
# coding: utf-8 """ This module contains utility for sending key events for Windows platform. """ from __future__ import absolute_import # Standard imports import ctypes import time as _time # ----- Modified from http://stackoverflow.com/a/2004267 ----- PUL = ctypes.POINTER(ctypes.c_ulong) class KeyBdInput(ctypes....
joxeankoret/nightmare
refs/heads/master
lib/interfaces/vstruct/defs/pcap.py
1
import vstruct import vstruct.defs.inet as vs_inet from vstruct.primitives import * PCAP_LINKTYPE_ETHER = 1 PCAP_LINKTYPE_RAW = 101 class PCAP_FILE_HEADER(vstruct.VStruct): def __init__(self): vstruct.VStruct.__init__(self) self.magic = v_uint32() self.vers_maj = v_uint1...
towerjoo/DjangoNotes
refs/heads/master
Django-1.5.1/django/db/backends/sqlite3/client.py
635
import os import sys from django.db.backends import BaseDatabaseClient class DatabaseClient(BaseDatabaseClient): executable_name = 'sqlite3' def runshell(self): args = [self.executable_name, self.connection.settings_dict['NAME']] if os.name == 'nt': sys.exit(os.sys...
pivanof/vitess
refs/heads/master
test/encrypted_transport.py
9
#!/usr/bin/env python # # Copyright 2017 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 la...
CredoReference/edx-platform
refs/heads/integration-hawthorn-qa
openedx/core/djangoapps/oauth_dispatch/admin.py
13
""" Override admin configuration for django-oauth-toolkit """ from django.contrib.admin import ModelAdmin, site from oauth2_provider import models from .models import RestrictedApplication, ApplicationAccess, ApplicationOrganization def reregister(model_class): """ Remove the existing admin, and register it...
waseem18/oh-mainline
refs/heads/master
vendor/packages/zope.interface/src/zope/interface/tests/test_registry.py
17
############################################################################## # # Copyright (c) 2001, 2002, 2009 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution...
diogoaurelio/learning-spark
refs/heads/master
src/python/QueryParquetFile.py
42
# Finds the names of people who like pandas from a parquet file # consisting of name & favouriteAnimal. # For input you can use the result of MakeParquetFile from pyspark import SparkContext from pyspark.sql import SQLContext import json import sys if __name__ == "__main__": if len(sys.argv) != 3: print "E...
vhaupert/mitmproxy
refs/heads/master
test/mitmproxy/proxy/modes/test_reverse_proxy.py
237
# TODO: write tests
plissonf/scikit-learn
refs/heads/master
sklearn/covariance/empirical_covariance_.py
101
""" Maximum likelihood covariance estimator. """ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Gael Varoquaux <gael.varoquaux@normalesup.org> # Virgile Fritsch <virgile.fritsch@inria.fr> # # License: BSD 3 clause # avoid division truncation from __future__ import division import warnin...
hsavit1/deap
refs/heads/master
deap/base.py
10
# This file is part of DEAP. # # DEAP 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. # # DEAP is distributed ...
joneslabND/Dimensions
refs/heads/master
Aim3/TARs/IBMs/WhiteBeltModel_Heat.py
6
from __future__ import division from random import choice, randrange import matplotlib.pyplot as plt import numpy as np import scipy as sc from scipy import stats ######################### COMMUNITY SIMULATION FUNCTION ######################## def simCOM(gens, dorm, disp, env, lgp = 0.92): ...
dparks1134/CommunityM
refs/heads/master
taxonomyUtils.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...
IronLanguages/ironpython2
refs/heads/master
Tests/modules/system_related/test__locale.py
2
# Licensed to the .NET Foundation under one or more agreements. # The .NET Foundation licenses this file to you under the Apache 2.0 License. # See the LICENSE file in the project root for more information. import _locale import random import unittest from iptest import is_cli, is_netcoreapp, is_posix, run_test cla...
numpy/datetime
refs/heads/main
doc/swig/test/testMatrix.py
22
#! /usr/bin/env python # System imports from distutils.util import get_platform import os import sys import unittest # Import NumPy import numpy as np major, minor = [ int(d) for d in np.__version__.split(".")[:2] ] if major == 0: BadListError = TypeError else: BadListError = ValueError import Matrix ###...
scieloorg/citedby
refs/heads/beta
tests/test_utils.py
1
# coding: utf-8 import unittest from citedby import utils class UtilsTest(unittest.TestCase): def test_cleanup_string_1(self): result = utils.cleanup_string(u"Teste ÁÉÍÓÚáéíóú#@$%^ˆ&*()") self.assertEqual('teste aeiouaeiou', result) def test_cleanup_string_2(self): result = util...
heschlie/calico
refs/heads/master
calico_node/tests/st/calicoctl/test_node_checksystem.py
5
# Copyright (c) 2015-2016 Tigera, 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
vianuevm/Webparser
refs/heads/master
ENV/Lib/site-packages/jinja2/runtime.py
606
# -*- coding: utf-8 -*- """ jinja2.runtime ~~~~~~~~~~~~~~ Runtime helpers. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ from itertools import chain from jinja2.nodes import EvalContext, _context_function_types from jinja2.utils import Markup, soft_unicode, escape, missing, concat, \ ...
zenoss/ZenPacks.community.WMIFilesMonitor
refs/heads/master
ZenPacks/community/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
jianghuaw/nova
refs/heads/master
nova/conf/netconf.py
2
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright 2012 Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the ...
ManishBadarkhe/linux-next
refs/heads/touch_test
tools/perf/scripts/python/futex-contention.py
11261
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
Zoldyck07/Znxt_Pokemon
refs/heads/master
tools/perf/scripts/python/futex-contention.py
11261
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
LLNL/spack
refs/heads/develop
var/spack/repos/builtin/packages/xsetpointer/package.py
5
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class Xsetpointer(AutotoolsPackage, XorgPackage): """Set an X Input device as the main pointer."...
saintbird/mezzanine
refs/heads/master
setup.py
15
import os import sys from setuptools import setup, find_packages from shutil import rmtree from mezzanine import __version__ as version exclude = ["mezzanine/project_template/dev.db", "mezzanine/project_template/project_name/local_settings.py"] if sys.argv == ["setup.py", "test"]: exclude = [] exclude...
asanfilippo7/osf.io
refs/heads/develop
scripts/tests/test_dataverse_migrate_demo_host.py
18
from nose.tools import * from scripts.dataverse.migrate_demo_host import ( migrate, get_targets, OLD_HOST, NEW_HOST ) from tests.base import OsfTestCase from website.addons.dataverse.tests.factories import DataverseAccountFactory class TestDemoHostMigration(OsfTestCase): def setUp(self): super(TestDe...
leonardo-modules/leonardo-theme-bootswatch
refs/heads/master
setup.py
23
import setuptools # In python < 2.7.4, a lazy loading of package `pbr` will break # setuptools if some other modules registered functions in `atexit`. # solution from: http://bugs.python.org/issue15881#msg170215 try: import multiprocessing # noqa except ImportError: pass setuptools.setup( setup_requires=...
azluck/Campanella-rapidfork
refs/heads/master
server.py
5
#!/usr/bin/env python3 # coding: utf-8 import tornado.httpserver import tornado.ioloop import tornado.options import os from application import get_application from settings import PORT, PROCESS_NUM from tornado.options import define, options define("port", default=PORT, help="run on the given port", type=int) defin...
gemmaan/moviesenal
refs/heads/master
Hasil/Lib/encodings/cp720.py
417
"""Python Character Mapping Codec cp720 generated on Windows: Vista 6.0.6002 SP2 Multiprocessor Free with the command: python Tools/unicode/genwincodec.py 720 """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,error...
ocaisa/easybuild-easyblocks
refs/heads/master
easybuild/easyblocks/t/tornado.py
2
## # Copyright 2009-2016 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://www.vscentrum.be), # Flemish Research Foundation (F...
2ndQuadrant/ansible
refs/heads/master
lib/ansible/modules/packaging/os/opkg.py
95
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Patrick Pelletier <pp.pelletier@gmail.com> # Based on pacman (Afterburn) and pkgin (Shaun Zinck) modules # # 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...
kutenai/django
refs/heads/master
django/conf/locale/et/formats.py
560
# -*- 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' TIME_FORMAT = 'G:i' # DATE...
uclmr/inferbeddings
refs/heads/master
bin/service/nli-query-cli.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import argparse import os import sys import nltk import requests import logging logging.basicConfig(stream=sys.stdout, level=logging.INFO) logger = logging.getLogger(os.path.basename(sys.argv[0])) def call_service(url, sentence1, sentence2): data = { 'se...
xiangel/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/commands_sql/models.py
135
from django.db import models class Comment(models.Model): pass class Book(models.Model): title = models.CharField(max_length=100, db_index=True) comments = models.ManyToManyField(Comment)
clayjonezie/ferns
refs/heads/master
ipy_pil.py
1
# coding: utf-8 from PIL import Image, ImageDraw im = new Image("RGB", (300, 300)) im = Image("RGB", (300, 300)) im = Image.new("RGB", (300, 300)) draw = ImageDraw.draw(im) draw = ImageDraw.Draw(im) draw draw.line(((0, 0), (95.91684521454673, 95.91684521454673))) im.save("out.png", "PNG") draw.line(((95.91684521454673...
kenshay/ImageScript
refs/heads/master
Script_Runner/PYTHON/Lib/site-packages/cffi/error.py
14
class FFIError(Exception): pass class CDefError(Exception): def __str__(self): try: current_decl = self.args[1] filename = current_decl.coord.file linenum = current_decl.coord.line prefix = '%s:%d: ' % (filename, linenum) except (AttributeError, ...
Nick-Hall/gramps
refs/heads/master
gramps/plugins/mapservices/openstreetmap.py
7
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2009 Benny Malengier # # 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 op...
bblacey/FreeCAD-MacOS-CI
refs/heads/master
src/Mod/Path/PathTests/TestPathGeom.py
2
# -*- coding: utf-8 -*- # *************************************************************************** # * * # * Copyright (c) 2016 sliptonic <shopinthewoods@gmail.com> * # * ...
ThomasSweijen/TPF
refs/heads/master
examples/packs/packs.py
7
#!/usr/bin/python # -*- coding: utf-8 -*- from yade import pack,ymport,export,geom,bodiesHandling """ This script demonstrates how to use 2 components of creating packings: 1. packing generators pack.regularHexa, pack.regularOrtho etc. generate vertices and filter them using predicates. (Note that this will be enhanc...
diofeher/django-nfa
refs/heads/master
django/contrib/auth/management/commands/createsuperuser.py
3
""" Management utility to create superusers. """ import getpass import os import re import sys from optparse import make_option from django.contrib.auth.models import User, UNUSABLE_PASSWORD from django.core import validators from django.core.management.base import BaseCommand, CommandError RE_VALID_USERNAME = re.com...
comphist/cora
refs/heads/master
bin/make_coraxml.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2013-2017 Marcel Bollmann <bollmann@linguistics.rub.de> # # 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, inclu...
rhelmer/socorro
refs/heads/master
alembic/versions/4cacd567770f_bug_958558_add_new_release_changes.py
14
"""bug 958558 add_new_release() changes Revision ID: 4cacd567770f Revises: 48e9a4366530 Create Date: 2014-01-10 13:55:28.858647 """ # revision identifiers, used by Alembic. revision = '4cacd567770f' down_revision = '48e9a4366530' from alembic import op from socorro.lib import citexttype, jsontype, buildtype from so...
atiqueahmedziad/addons-server
refs/heads/master
src/olympia/addons/tests/test_models.py
1
# -*- coding: utf-8 -*- import json import os import time from datetime import datetime, timedelta from django import forms from django.conf import settings from django.contrib.auth.models import AnonymousUser from django.core import mail from django.db import IntegrityError from django.utils import translation imp...
falcon1kr/python-social-auth
refs/heads/master
social/backends/tumblr.py
85
""" Tumblr OAuth1 backend, docs at: http://psa.matiasaguirre.net/docs/backends/tumblr.html """ from social.utils import first from social.backends.oauth import BaseOAuth1 class TumblrOAuth(BaseOAuth1): name = 'tumblr' ID_KEY = 'name' AUTHORIZATION_URL = 'http://www.tumblr.com/oauth/authorize' REQU...
FOSSRIT/lemonade-stand
refs/heads/develop
po/msgfmt.py
1
# -*- coding: iso-8859-1 -*- # Written by Martin v. Lwis <loewis@informatik.hu-berlin.de> # Plural forms support added by alexander smishlajev <alex@tycobka.lv> """ Generate binary message catalog from textual translation description. This program converts a textual Uniforum-style message catalog (.po file) into a bin...
jnewland/home-assistant
refs/heads/ci
tests/components/duckdns/__init__.py
39
"""Tests for the duckdns component."""
jds2001/sos
refs/heads/master
sos/plugins/openstack_manila.py
1
# Copyright (C) 2016 Red Hat, Inc.,Poornima M. Kshirsagar <pkshiras@redhat.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 ...
jonyroda97/redbot-amigosprovaveis
refs/heads/develop
lib/nacl/encoding.py
28
# Copyright 2013 Donald Stufft and individual contributors # # 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...
erkrishna9/odoo
refs/heads/master
addons/l10n_fr_rib/__init__.py
433
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2011 Numérigraphe SARL. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Genera...
landrito/api-client-staging
refs/heads/master
generated/python/proto-google-cloud-spanner-admin-instance-v1/google/cloud/proto/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
madl-ash/UCSpyWeb
refs/heads/master
api.py
1
""" Api File For App.py this file does all background things like getting information from database and process them and make them readable in this way,we can easily use them in main app and HTML rendering. """ """ Imports Libs used in this file Json used for proccessing game objects,userinformation""" im...
gram526/VTK
refs/heads/master
Rendering/Tk/Testing/Python/TestTkRenderWidget.py
9
import os, sys import vtk from vtk.test import Testing if sys.hexversion < 0x03000000: # for Python2 import Tkinter as tkinter else: # for Python3 import tkinter from vtk.tk.vtkTkRenderWidget import vtkTkRenderWidget class TestTkRenderWidget(Testing.vtkTest): # Stick your VTK pipeline here if ...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/building/military/shared_military_rebel_strategic_base.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 = Building() result.template = "object/building/military/shared_military_rebel_strategic_base.iff" result.attribute...
sharad/calibre
refs/heads/master
src/calibre/devices/mime.py
24
from __future__ import with_statement __license__ = 'GPL 3' __copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>' __docformat__ = 'restructuredtext en' from calibre import guess_type def _mt(path): mt = guess_type(path)[0] if not mt: mt = 'application/octet-stream' return mt def mime_type_ex...
adlius/osf.io
refs/heads/develop
addons/owncloud/migrations/0003_auto_20170713_1125.py
22
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-13 16:25 from __future__ import unicode_literals import pytz import datetime from django.db import migrations import django_extensions.db.fields class Migration(migrations.Migration): dependencies = [ ('addons_owncloud', '0002_auto_20170323...
cloudbase/nova
refs/heads/master
nova/tests/unit/virt/libvirt/volume/test_gpfs.py
46
# 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...
batermj/algorithm-challenger
refs/heads/master
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/http/server.py
1
"""HTTP server classes. Note: BaseHTTPRequestHandler doesn't implement any HTTP request; see SimpleHTTPRequestHandler for simple implementations of GET, HEAD and POST, and CGIHTTPRequestHandler for CGI scripts. It does, however, optionally implement HTTP/1.1 persistent connections, as of version 0.3. Notes on CGIHTT...
yocompute/woit-api
refs/heads/master
orders/admin.py
13848
from django.contrib import admin # Register your models here.
marcosmodesto/django-testapp
refs/heads/master
django/django/contrib/gis/geos/__init__.py
518
""" The GeoDjango GEOS module. Please consult the GeoDjango documentation for more details: http://geodjango.org/docs/geos.html """ from django.contrib.gis.geos.geometry import GEOSGeometry, wkt_regex, hex_regex from django.contrib.gis.geos.point import Point from django.contrib.gis.geos.linestring import LineStrin...
elijah513/scikit-learn
refs/heads/master
examples/decomposition/plot_ica_blind_source_separation.py
349
""" ===================================== Blind source separation using FastICA ===================================== An example of estimating sources from noisy data. :ref:`ICA` is used to estimate sources given noisy measurements. Imagine 3 instruments playing simultaneously and 3 microphones recording the mixed si...
gdmen/budget
refs/heads/master
app/wsgi.py
18
""" WSGI config for app project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "app.settings") from django.core.wsgi impo...
ppke-nlpg/AnaGramma-Parser
refs/heads/master
ling_rules/morphconverter/morphologyConverter.py
1
#!/usr/bin/python3 # -*- coding: utf-8, vim: expandtab:ts=4 -*- import re import requests import json humor_tags = re.compile('\[[^[\]]+\]') exceptional_anals = {'#': [['||:NYITO']]} verb = {'[IGE][Te1]': ('FIN', 'V+acc_Def+Dec+Pres+nom_Sg1_Pron+acc_SgPl3'), # mosom '[IGE][Te2]': ('FIN', 'V+acc_Def+Dec+Pre...
smsolivier/VEF
refs/heads/master
tex/pres/perm_dl.py
1
#!/usr/bin/env python3 import numpy as np import matplotlib.pyplot as plt import sys sys.path.append('../../code') import ld as LD from exactDiff import exactDiff from hidespines import * ''' compare the permuations of linear representation in diffusion limit ''' if (len(sys.argv) > 1): outfile = sys.argv[...
m11s/MissionPlanner
refs/heads/master
Lib/site-packages/numpy/polynomial/tests/test_legendre.py
54
"""Tests for legendre module. """ from __future__ import division import numpy as np import numpy.polynomial.legendre as leg import numpy.polynomial.polynomial as poly from numpy.testing import * P0 = np.array([ 1]) P1 = np.array([ 0, 1]) P2 = np.array([-1, 0, 3])/2 P3 = np.array([ 0, -3, 0, 5])/2 P4 = np...
uberamd/NGECore2
refs/heads/master
scripts/object/mobile/vehicle/speeder_ric_920.py
85615
import sys def setup(core, object): return
dpgaspar/Flask-AppBuilder
refs/heads/master
examples/factoryapp/app/models.py
6
import datetime from flask_appbuilder import Model from sqlalchemy import Column, Date, ForeignKey, Integer, String from sqlalchemy.orm import relationship mindate = datetime.date(datetime.MINYEAR, 1, 1) class ContactGroup(Model): id = Column(Integer, primary_key=True) name = Column(String(50), unique=True,...
rancher/validation-tests
refs/heads/master
tests/v3_validation/cattlevalidationtest/core/test_service_selector.py
2
from common_fixtures import * # NOQA shared_services = [] @pytest.fixture(scope='session', autouse=True) def create_services_for_selectors(request, client): labels = [{"c1": "value1"}, {"c1": "value2"}, {"c2": "value1"}, {"c2": "value2"}, {"c2": "value3"}, {"c2": "value4", "c1": "val...
paplorinc/intellij-community
refs/heads/master
python/testData/completion/heavyStarPropagation/lib/_pkg0/_pkg0_0/_pkg0_0_1/_pkg0_0_1_0/_pkg0_0_1_0_1/__init__.py
30
from ._mod0_0_1_0_1_0 import * from ._mod0_0_1_0_1_1 import * from ._mod0_0_1_0_1_2 import * from ._mod0_0_1_0_1_3 import * from ._mod0_0_1_0_1_4 import *
musicrighter/CIS422-P2
refs/heads/master
env/lib/python3.4/site-packages/jinja2/tests.py
336
# -*- coding: utf-8 -*- """ jinja2.tests ~~~~~~~~~~~~ Jinja test functions. Used with the "is" operator. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re from collections import Mapping from jinja2.runtime import Undefined from jinja2._compat impor...
suneeth51/neutron
refs/heads/master
neutron/services/l3_router/brocade/vyatta/vrouter_neutron_plugin.py
33
# Copyright 2015 Brocade Communications System, 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.apache.org/licenses/LICENSE-2.0 # #...
adamar/EnvComparison
refs/heads/master
EnvComparison/site.py
1
import tornado.httpserver import tornado.ioloop import tornado.web import os class MainHandler(tornado.web.RequestHandler): def get(self): results = {'new':'thing', 'other':'thing'} self.render("main.html", results=results) class Application(tornado.web.Application): def __init__(self): ...
developerQuinnZ/this_will_work
refs/heads/master
labeler/migrations/0001_initial.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-03 03:00 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
sharififar/termineter
refs/heads/master
framework/modules/dump_tables.py
6
# framework/modules/dump_tables.py # # Copyright 2011 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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...
h2oai/h2o-3
refs/heads/master
h2o-py/h2o/pipeline/__init__.py
3
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # This file is auto-generated by h2o-3/h2o-bindings/bin/gen_python.py # Copyright 2016 H2O.ai; Apache License Version 2.0 (see LICENSE for details) # from .mojo_pipeline import H2OMojoPipeline __all__ = ( "H2OMojoPipeline" )
ricorx7/donkey
refs/heads/master
donkeycar/parts/sensors/lidar.py
1
""" Lidar """ import time import numpy as np class RPLidar(): def __init__(self, port='/dev/ttyUSB0'): from rplidar import RPLidar self.port = port self.frame = np.zeros(shape=365) self.lidar = RPLidar(self.port) self.lidar.clear_input() time.sleep(1...
allink/allink-apps
refs/heads/master
members/apps.py
1
# -*- coding: utf-8 -*- from django.apps import AppConfig class AllinkMembersConfig(AppConfig): name = 'allink_apps.members' verbose_name = "Allink Members"
sinbazhou/odoo
refs/heads/8.0
addons/sale_journal/__openerp__.py
262
# -*- 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...
codepython/restcommander
refs/heads/master
play-1.2.4/python/Lib/DocXMLRPCServer.py
61
"""Self documenting XML-RPC Server. This module can be used to create XML-RPC servers that serve pydoc-style documentation in response to HTTP GET requests. This documentation is dynamically generated based on the functions and methods registered with the server. This module is built upon the pydoc and SimpleXMLRPCSe...
rahul67/hue
refs/heads/master
desktop/core/ext-py/requests-2.6.0/requests/packages/chardet/charsetprober.py
3126
######################## 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...
rosmo/ansible
refs/heads/devel
lib/ansible/modules/network/nxos/nxos_vtp_version.py
15
#!/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...
josefdolezal/fit-cvut
refs/heads/master
BI-IOS/semester-project/webapp/beecon/campaigns/libs/mhd/test.py
1
# -*- coding: utf-8 -*- from mvConnections import Connections import re dg = Connections( 'http://m.jizdnirady.cz/ConnMHD.aspx' ) a = dg.upcoming_departures( 'Dejvická' ) print( a )
akhmadMizkat/odoo
refs/heads/master
addons/web_editor/__openerp__.py
21
{ 'name': 'Web Editor', 'category': 'Hidden', 'description': """ Odoo Web Editor widget. ========================== """, 'depends': ['web'], 'data': [ 'security/ir.model.access.csv', 'views/editor.xml', 'views/iframe.xml', 'views/snippets.xml', ], 'qweb': [ ...
nguyenkims/satellizer-demo
refs/heads/master
wsgi.py
10
from app import app as application
riannucci/rietveldv2
refs/heads/master
third_party/httplib2/socks.py
811
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. 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 ...
esrever10/doucoin
refs/heads/master
qa/rpc-tests/rpcbind_test.py
1
#!/usr/bin/env python2 # Copyright (c) 2014 The Doucoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Test for -rpcbind, as well as -rpcallowip and -rpcconnect # Add python-doucoinrpc to module search path: im...
abhiQmar/servo
refs/heads/master
components/script/dom/bindings/codegen/parser/runtests.py
146
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import os, sys import glob import optparse import traceback import WebIDL class TestHarness(object): def __init__(s...
SeedScientific/luigi
refs/heads/master
test/s3_test.py
9
# -*- coding: utf-8 -*- # # Copyright (c) 2013 Mortar Data # # 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...
andrew-d/Specter.py
refs/heads/master
specter/tests/test_registry.py
1
from .util import BaseTestCase from specter.specter import FrameRegistry class _DummyClass(object): def __init__(self, *args, **kwargs): self.args = args self.kwargs = kwargs class RefMe(object): pass class TestFrameRegistry(BaseTestCase): def create(self, *args, **kwargs): se...
clumsy/intellij-community
refs/heads/master
python/lib/Lib/encodings/bz2_codec.py
501
""" Python 'bz2_codec' Codec - bz2 compression encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Adapted by Raymond Hettinger from zlib_codec.py which was written by Marc-Andre Lemburg (mal@lemburg.com). """ import ...
ericholscher/django
refs/heads/master
django/views/generic/list.py
3
from __future__ import unicode_literals from django.core.paginator import Paginator, InvalidPage from django.core.exceptions import ImproperlyConfigured from django.db.models.query import QuerySet from django.http import Http404 from django.utils.translation import ugettext as _ from django.views.generic.base import T...
agile-course/news_feed
refs/heads/master
news_feed/post/migrations/0001_initial.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-06-30 03:21 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('subreddit', '0001_initial'), ] ...
Natoto/TeamTalk
refs/heads/master
win-client/3rdParty/src/json/test/cleantests.py
263
# removes all files created during testing import glob import os paths = [] for pattern in [ '*.actual', '*.actual-rewrite', '*.rewrite', '*.process-output' ]: paths += glob.glob( 'data/' + pattern ) for path in paths: os.unlink( path )
imsparsh/python-for-android
refs/heads/master
python3-alpha/python3-src/Tools/demo/beer.py
112
#!/usr/bin/env python3 """ A Python version of the classic "bottles of beer on the wall" programming example. By Guido van Rossum, demystified after a version by Fredrik Lundh. """ import sys n = 100 if sys.argv[1:]: n = int(sys.argv[1]) def bottle(n): if n == 0: return "no more bottles of beer" if n =...
ryfeus/lambda-packs
refs/heads/master
Opencv_pil/source/pip/_vendor/html5lib/treewalkers/genshi.py
508
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT from . import base from ..constants import voidElements, namespaces class T...