repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
SerCeMan/intellij-community
refs/heads/master
python/testData/paramInfo/BoundMethodReassigned.py
83
class A(object): def foo(self, a, b): pass moo = foo ff = A().moo f = ff f(<arg1>1, <arg2>2)
GauravSahu/odoo
refs/heads/8.0
openerp/report/render/odt2odt/odt2odt.py
443
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the...
owtf/owtf
refs/heads/develop
owtf/managers/url.py
1
""" owtf.managers.url ~~~~~~~~~~~~~~~~~ The DB stores HTTP transactions, unique URLs and more. """ from owtf.db.session import get_count, get_scoped_session from owtf.lib.exceptions import InvalidParameterType from owtf.managers.target import is_url_in_scope, target_required from owtf.models.url import Url from owtf.ut...
rwl/PyCIM
refs/heads/master
CIM14/ENTSOE/Dynamics/IEC61970/Dynamics/DynamicsMetaBlockInputReference.py
1
# Copyright (C) 2010-2011 Richard Lincoln # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish...
pk-sam/crosswalk-test-suite
refs/heads/master
webapi/webapi-rawsockets-w3c-tests/inst.xpk.py
357
#!/usr/bin/env python import os import shutil import glob import time import sys import subprocess import string from optparse import OptionParser, make_option SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) PKG_NAME = os.path.basename(SCRIPT_DIR) PARAMETERS = None #XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=...
funkypawz/MakerRobot
refs/heads/master
telegram/inlinequeryresultcachedphoto.py
2
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2016 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser Public License as published by #...
blacklin/kbengine
refs/heads/master
kbe/src/lib/python/Lib/antigravity.py
917
import webbrowser import hashlib webbrowser.open("http://xkcd.com/353/") def geohash(latitude, longitude, datedow): '''Compute geohash() using the Munroe algorithm. >>> geohash(37.421542, -122.085589, b'2005-05-26-10458.68') 37.857713 -122.544543 ''' # http://xkcd.com/426/ h = hashlib.md5(d...
smiller171/ansible
refs/heads/devel
test/units/plugins/connections/__init__.py
7690
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
pdufour/sqlalchemy
refs/heads/master
test/sql/test_labels.py
27
from sqlalchemy import exc as exceptions, select, MetaData, Integer, or_, \ bindparam from sqlalchemy.engine import default from sqlalchemy.sql import table, column from sqlalchemy.sql.elements import _truncated_label from sqlalchemy.testing import AssertsCompiledSQL, assert_raises, engines,\ fixtures, eq_ from...
peregrinius/web2py-liscio
refs/heads/master
languages/ro.py
162
# coding: utf8 { '!=': '!=', '!langcode!': 'ro', '!langname!': 'Română', '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" (actualizează) este o expresie opțională precum "câmp1=\'valoare_nouă\'". Nu puteți actualiza sau șterge rezultatele unui...
VanirAOSP/external_chromium_org
refs/heads/kk44
build/android/pylib/base/__init__.py
998
# Copyright (c) 2012 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.
DataDog/gunicorn
refs/heads/master
examples/test.py
4
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. # # Example code from Eventlet sources import os import pprint from wsgiref.validate import validator import sys from gunicorn import __version__ #@validator def app(environ, start_response):...
twitter/pants
refs/heads/master
tests/python/pants_test/backend/jvm/tasks/jvm_binary_task_test_base.py
2
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals import os from pants.backend.jvm.tasks.classpath_products import ClasspathProducts from ...
wfxiang08/django185
refs/heads/master
tests/admin_inlines/tests.py
6
from __future__ import unicode_literals import warnings from django.contrib.admin import ModelAdmin, TabularInline from django.contrib.admin.helpers import InlineAdminForm from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase from django.contrib.auth.models import Permission, User from django.contrib....
TeamEOS/external_chromium_org
refs/heads/lp5.0
tools/telemetry/telemetry/web_perf/timeline_based_measurement_unittest.py
8
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import unittest from telemetry import test from telemetry.core import wpr_modes from telemetry.timeline import model as model_module from telemetr...
madhurrajn/samashthi
refs/heads/master
lib/django/contrib/sites/__init__.py
808
default_app_config = 'django.contrib.sites.apps.SitesConfig'
czlx0701/MasterThesisTest
refs/heads/master
libs/tornado/test/concurrent_test.py
63
#!/usr/bin/env python # # Copyright 2012 Facebook # # 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 a...
jumitche/libstoragemgmt
refs/heads/master
plugin/ontap/na.py
2
# Copyright (C) 2012-2014 Red Hat, Inc. # This library 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 any later version. # # This library is distributed in the h...
clebergnu/autotest
refs/heads/master
client/tests/kvm/tests/ksm_overcommit.py
2
import logging, time, random, math, os from autotest_lib.client.common_lib import error from autotest_lib.client.bin import utils from autotest_lib.client.virt import virt_utils, virt_test_utils, aexpect from autotest_lib.client.virt import virt_env_process def run_ksm_overcommit(test, params, env): """ Test ...
zhanqxun/cv_fish
refs/heads/master
win32comext/directsound/test/ds_record.py
4
import pywintypes import struct import win32event, win32api import os import win32com.directsound.directsound as ds def wav_header_pack(wfx, datasize): return struct.pack('<4sl4s4slhhllhh4sl', 'RIFF', 36 + datasize, 'WAVE', 'fmt ', 16, wfx.wFormatTag, wfx.nCha...
robwarm/gpaw-symm
refs/heads/master
gpaw/kpt_descriptor.py
1
# Copyright (C) 2003 CAMP # Please see the accompanying LICENSE file for further information. """K-point/spin combination-descriptors This module contains classes for defining combinations of two indices: * Index k for irreducible kpoints in the 1st Brillouin zone. * Index s for spin up/down if spin-polarized (othe...
wafaast/afefuc-project
refs/heads/master
src/afefuc.py
2
#!/usr/bin/env python ''' Created on Apr 25, 2013 @author: Bartosz Alchimowicz ''' import sys import signal sys.path.append('../src-ui') from PyQt4 import QtCore, QtGui from gui.MainWindowWrapper import MainWindowWrapper if __name__ == "__main__": signal.signal(signal.SIGINT, signal.SIG_DFL) app = QtGui.QAppli...
firerszd/kbengine
refs/heads/master
kbe/src/lib/python/Lib/xmlrpc/client.py
69
# # XML-RPC CLIENT LIBRARY # $Id$ # # an XML-RPC client interface for Python. # # the marshalling and response parser code can also be used to # implement XML-RPC servers. # # Notes: # this version is designed to work with Python 2.1 or newer. # # History: # 1999-01-14 fl Created # 1999-01-15 fl Changed dateTime to u...
kkdd/arangodb
refs/heads/devel
3rdParty/V8-4.3.61/build/gyp/test/mac/gyptest-objc-gc.py
90
#!/usr/bin/env python # Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Verifies that GC objc settings are handled correctly. """ import TestGyp import sys if sys.platform == 'darwin': # set |match| to i...
danicampora/micropython
refs/heads/master
tests/basics/dict_clear.py
118
d = {1: 2, 3: 4} print(len(d)) d.clear() print(d) d[2] = 42 print(d)
nozuono/calibre-webserver
refs/heads/master
src/calibre/gui2/metadata/diff.py
4
#!/usr/bin/env python # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' import os from collections import OrderedDict, namedtuple from functools impo...
windedge/odoomrp-wip
refs/heads/8.0
mrp_bom_catch_product_code/models/mrp_bom.py
27
# -*- encoding: utf-8 -*- ############################################################################## # # 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...
conan-io/conan
refs/heads/develop
conans/test/functional/workspace/workspace_test.py
1
import os import platform import unittest from textwrap import dedent import pytest import six import time from parameterized.parameterized import parameterized from conans.client import tools from conans.errors import ConanException from conans.model.workspace import Workspace from conans.test.utils.test_files impo...
daviddupont69/CouchPotatoServer
refs/heads/develop
couchpotato/core/plugins/base.py
3
from StringIO import StringIO from couchpotato.core.event import fireEvent, addEvent from couchpotato.core.helpers.encoding import tryUrlencode, ss, toSafeString, \ toUnicode, sp from couchpotato.core.helpers.variable import getExt, md5, isLocalIP from couchpotato.core.logger import CPLog from couchpotato.environme...
sideeffects/pycparser
refs/heads/master
pycparser/ply/yacc.py
465
# ----------------------------------------------------------------------------- # ply: yacc.py # # Copyright (C) 2001-2011, # David M. Beazley (Dabeaz LLC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions a...
drglove/SickRage
refs/heads/master
sickbeard/metadata/ps3.py
13
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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,...
lllucius/climacast
refs/heads/master
aws-lambda-lxml/3.8.0/py27/lxml/usedoctest.py
149
"""Doctest module for XML comparison. Usage:: >>> import lxml.usedoctest >>> # now do your XML doctests ... See `lxml.doctestcompare` """ from lxml import doctestcompare doctestcompare.temp_install(del_module=__name__)
mtrpires/pySpidy
refs/heads/master
search_bot.py
1
# -*- coding: utf-8 # @mtrpires - http://github.com/mtrpires from crawler_functions import changePage from crawler_functions import createCSV from crawler_functions import downloadHTML from crawler_functions import fetchLinks from crawler_functions import findContent from crawler_functions import findResults from crawl...
CodethinkLabs/python-consonant
refs/heads/master
consonant/web/services.py
1
# Copyright (C) 2014 Codethink Limited. # # 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. # # This program is distribute...
salguarnieri/intellij-community
refs/heads/master
python/testData/deprecation/deprecatedModule.py
83
import warnings warnings.warn("the deprecated module is deprecated; use a non-deprecated module instead", DeprecationWarning, 2)
Maximilian-Reuter/SickRage-1
refs/heads/master
lib/hachoir_metadata/metadata_item.py
94
from hachoir_core.tools import makeUnicode, normalizeNewline from hachoir_core.error import HACHOIR_ERRORS from hachoir_metadata import config from hachoir_metadata.setter import normalizeString MIN_PRIORITY = 100 MAX_PRIORITY = 999 QUALITY_FASTEST = 0.0 QUALITY_FAST = 0.25 QUALITY_NORMAL = 0.5 QUALITY_GOOD = 0.75 QU...
jostep/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/softsign_op_test.py
91
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
nagyistoce/euca2ools
refs/heads/master
euca2ools/commands/ec2/deletesubnet.py
5
# Copyright 2013-2014 Eucalyptus Systems, Inc. # # Redistribution and use of this software in source and binary forms, # with or without modification, are permitted provided that the following # conditions are met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions ...
himleyb85/django
refs/heads/master
django/db/migrations/optimizer.py
127
from __future__ import unicode_literals class MigrationOptimizer(object): """ Powers the optimization process, where you provide a list of Operations and you are returned a list of equal or shorter length - operations are merged into one if possible. For example, a CreateModel and an AddField can...
elijh/bitmask_client
refs/heads/master
src/leap/bitmask/services/eip/eipspec.py
8
# -*- coding: utf-8 -*- # eipspec.py # Copyright (C) 2013 LEAP # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Thi...
torwag/micropython
refs/heads/master
tests/bench/loop_count-5.1-while_down_ne_localvar.py
102
import bench def test(num): zero = 0 while num != zero: num -= 1 bench.run(test)
mapr-demos/wifi-sensor-demo
refs/heads/master
python/mpu6050/mpuserver.py
1
import micropython micropython.alloc_emergency_exception_buf(100) from machine import Pin, reset, disable_irq, enable_irq import gc from mpu6050 import MPU import socket import select import time default_port = 8000 default_irq_pin = 4 default_write_interval = 10 default_gc_interval = 1000 def tojson(values): ...
polarise/RP-python
refs/heads/master
intron_scores_by_flank.py
1
#!/home/paulk/software/bin/python from __future__ import division from sys import argv,exit,stderr from subprocess import Popen,PIPE from random import choice from re import search def PrintStatic(line): stderr.write("\r%s" %line.ljust(50)+" "*20) stderr.flush() def intron_length(region1,region2,pos1,pos2): c1,st1...
joshuajharris/dotfiles
refs/heads/master
Alfred.alfredpreferences/workflows/user.workflow.2E020B45-B449-45A0-A753-DD2F58A2AA27/slackfred-snooze.py
1
import sys import argparse from workflow import Workflow, web, PasswordNotFound import json def slack_keys(): wf = Workflow() try: slack_keys = wf.get_password('slack_api_key') except PasswordNotFound: wf.add_item(title='No API key set. Please run slt', valid=False) ...
blueyed/pytest_django
refs/heads/master
tests/urls.py
2
try: from django.conf.urls import patterns # Django >1.4 except ImportError: from django.conf.urls.defaults import patterns # Django 1.3 urlpatterns = patterns( '', (r'admin-required/', 'tests.views.admin_required_view'), )
Xangis/django-ckeditor
refs/heads/master
ckeditor/views.py
1
from datetime import datetime import mimetypes import os import re import StringIO from urlparse import urlparse, urlunparse from django.conf import settings from django.core.files.storage import default_storage from django.core.files.uploadedfile import InMemoryUploadedFile from django.http import HttpResponse from d...
danielquinn/spirithunter
refs/heads/master
src/aspects/arbiters/weather.py
1
from datetime import datetime import requests from django.conf import settings from django.contrib.gis.geos import fromstr from django.core.cache import cache from citytemp.models import City, Temperature from spirithunter.logging import LogMixin from ..models.elements import Element from ..models.weather import W...
vitmod/dvbapp
refs/heads/master
lib/python/Plugins/SystemPlugins/SatelliteEquipmentControl/plugin.py
32
from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Plugins.Plugin import PluginDescriptor from Components.ConfigList import ConfigListScreen from Components.ActionMap import ActionMap from Components.config import config from Components.NimManager import nimmanager as nimmgr class SecPar...
betoesquivel/fil2014
refs/heads/master
build/django/tests/i18n/urls.py
79
from __future__ import unicode_literals from django.conf.urls.i18n import i18n_patterns from django.http import HttpResponse, StreamingHttpResponse from django.utils.translation import ugettext_lazy as _ urlpatterns = i18n_patterns('', (r'^simple/$', lambda r: HttpResponse()), (r'^streaming/$', lambda r: Stre...
pasancario/telegraf
refs/heads/master
scripts/build.py
3
#!/usr/bin/python -u import sys import os import subprocess import time import datetime import shutil import tempfile import hashlib import re debug = False ################ #### Telegraf Variables ################ # Packaging variables PACKAGE_NAME = "telegraf" INSTALL_ROOT_DIR = "/usr/bin" LOG_DIR = "/var/log/tel...
andrew-pa/limbo-android
refs/heads/master
jni/qemu/scripts/tracetool/backend/dtrace.py
71
#!/usr/bin/env python # -*- coding: utf-8 -*- """ DTrace/SystemTAP backend. """ __author__ = "Lluís Vilanova <vilanova@ac.upc.edu>" __copyright__ = "Copyright 2012, Lluís Vilanova <vilanova@ac.upc.edu>" __license__ = "GPL version 2 or (at your option) any later version" __maintainer__ = "Stefan Hajnoczi" __e...
movmov/cc
refs/heads/master
vendor/Twisted-10.0.0/twisted/python/zipstream.py
60
# -*- test-case-name: twisted.python.test.test_zipstream -*- # Copyright (c) 2001-2008 Twisted Matrix Laboratories. # See LICENSE for details. """ An incremental approach to unzipping files. This allows you to unzip a little bit of a file at a time, which means you can report progress as a file unzips. """ import wa...
zqfan/leetcode
refs/heads/master
algorithms/116. Populating Next Right Pointers in Each Node/solution.py
1
# Definition for binary tree with next pointer. # class TreeLinkNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None # self.next = None class Solution: # @param root, a tree link node # @return nothing def connect(self, root): whil...
CaptainCN/QCEditor
refs/heads/master
cocos2d/plugin/tools/toolsForGame/main.py
265
import sys, string, os from Tkinter import * import steps Plugins = sys.argv[1] print Plugins pluginList = Plugins.split(':') maxStep = 2 curStep = 1 stepList = [] # functions # show step on the num index def showStep(num): global stepList stepNum = len(stepList) if num >= stepNum or num <= 0 : ...
opencorato/represent-boundaries
refs/heads/master
boundaries/south_migrations/0004_add_extra_metadata.py
2
# encoding: utf-8 import 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 'BoundarySet.extra' db.add_column('boundaries_boundaryset', 'extra', self.gf('jsonfield.fields.JSO...
bjss/BJSS_liveobs_automation
refs/heads/develop
liveobs_ui/page_object_models/mobile/modal_page.py
2
""" Page Object Model for Modals While Technically Modals are not 'pages' there are common interaction patterns with modals that merit their own Page Object Model. This is that Page Object Model. """ from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.supp...
RO-ny9/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/lib2to3/fixes/fix_throw.py
203
"""Fixer for generator.throw(E, V, T). g.throw(E) -> g.throw(E) g.throw(E, V) -> g.throw(E(V)) g.throw(E, V, T) -> g.throw(E(V).with_traceback(T)) g.throw("foo"[, V[, T]]) will warn about string exceptions.""" # Author: Collin Winter # Local imports from .. import pytree from ..pgen2 import token from .. im...
karansingh1559/coala
refs/heads/master
coalib/bearlib/languages/definitions/CSS.py
30
from coalib.bearlib.languages.Language import Language @Language class CSS: extensions = '.css', multiline_comment_delimiters = {'/*': '*/'} string_delimiters = {'"': '"', "'": "'"} multiline_string_delimiters = {} indent_types = {'{': '}'} encapsulators = {'(': ')', '[': ']'}
mitocw/edx-platform
refs/heads/master
openedx/core/djangoapps/content/block_structure/block_structure.py
4
""" Module with family of classes for block structures. BlockStructure - responsible for block existence and relations. BlockStructureBlockData - responsible for block & transformer data. BlockStructureModulestoreData - responsible for xBlock data. The following internal data structures are implemented: ...
mrquim/repository.mrquim
refs/heads/master
script.module.youtube.dl/lib/youtube_dl/extractor/bloomberg.py
63
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class BloombergIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?bloomberg\.com/(?:[^/]+/)*(?P<id>[^/?#]+)' _TESTS = [{ 'url': 'http://www.bloomberg.com/news/videos/b/aaeae121-5949-481e-a1ce-4562d...
portableant/open-context-py
refs/heads/master
opencontext_py/apps/ocitems/versions/views.py
2
import json from django.http import HttpResponse, Http404 from opencontext_py.libs.rootpath import RootPath from opencontext_py.libs.requestnegotiation import RequestNegotiation from opencontext_py.apps.ocitems.ocitem.models import OCitem from opencontext_py.apps.ocitems.ocitem.templating import TemplateItem from openc...
bradh/samba
refs/heads/master
wintest/wintest.py
36
#!/usr/bin/env python '''automated testing library for testing Samba against windows''' import pexpect, subprocess import optparse import sys, os, time, re class wintest(): '''testing of Samba against windows VMs''' def __init__(self): self.vars = {} self.list_mode = False self.vms =...
ncloudioj/splice
refs/heads/master
splice/commands.py
6
import os import multiprocessing import logging import sys import json import calendar from datetime import datetime from operator import itemgetter from flask.ext.script import Command, Option, Manager from flask.ext.script.commands import InvalidCommand from gunicorn.app.base import Application as GunicornApplication...
tareq89/foodbank
refs/heads/master
foodbank/Insert/functions/distanceCalculate.py
2
from math import sin, cos, sqrt, atan2, radians import decimal import geopy import geopy.distance def DistanceClaculate(lat1,lon1,lat2,lon2): pt1 = geopy.Point(lat1, lon1) pt2 = geopy.Point(lat2, lon2) # distance.distance() is the VincentyDistance by default. dist = geopy.distance.distance(pt1, pt2).km retu...
shrkey/ardupilot
refs/heads/dark
Tools/mavproxy_modules/lib/geodesic_grid.py
108
# Copyright (C) 2016 Intel Corporation. All rights reserved. # # This file is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This fi...
veekun/pokedex
refs/heads/master
scripts/disambiguate-location-identifiers.py
5
# Encoding: UTF-8 """Automatically disambiguate location identifiers This is an unmaintained one-shot script, only included in the repo for reference. Disambiguates identifiers that aren't unique, Routes and Sea Routes, and generic names like 'villa' or 'game corner' that could appear in future generations again. D...
wujuguang/sentry
refs/heads/master
src/sentry/api/exceptions.py
34
from __future__ import absolute_import from rest_framework.exceptions import APIException class ResourceDoesNotExist(APIException): status_code = 404
isht3/zulip
refs/heads/master
zerver/management/commands/turn_off_digests.py
10
from __future__ import absolute_import from __future__ import print_function from typing import Any from optparse import make_option from django.core.management.base import BaseCommand, CommandParser from zerver.lib.actions import do_change_enable_digest_emails from zerver.models import Realm, UserProfile, get_real...
hojel/youtube-dl
refs/heads/master
youtube_dl/extractor/noco.py
5
# encoding: utf-8 from __future__ import unicode_literals import re import time import hashlib from .common import InfoExtractor from ..compat import ( compat_str, compat_urllib_parse, ) from ..utils import ( clean_html, ExtractorError, int_or_none, float_or_none, parse_iso8601, saniti...
DrXyzzy/cocalc
refs/heads/master
src/scripts/test_install.py
4
#!/usr/bin/env python ############################################################################### # # CoCalc: Collaborative Calculation in the Cloud # # Copyright (C) 2016, Sagemath Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Publ...
aviralchandra/Sandhi
refs/heads/master
build/PMC/python/PMC/PMCFloats.py
1
# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.4 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import ...
Shine-/xbmc
refs/heads/Krypton_alwaysontop
lib/libUPnP/Platinum/Build/Tools/Scripts/MakeAllVs.py
262
#! /usr/bin/env python import os import sys import getopt import subprocess configs = ['Debug', 'Release'] solutions = ['../../../Build/Targets/x86-microsoft-win32-vs2008/Platinum.sln'] try: opts, args = getopt.getopt(sys.argv[1:], "b:rc") except getopt.GetoptError, (msg, opt): print 'No build_config, defau...
pkats15/hdt_analyzer
refs/heads/master
django_test/django_venv/Lib/site-packages/wheel/pep425tags.py
220
"""Generate and work with PEP 425 Compatibility Tags.""" import sys try: import sysconfig except ImportError: # pragma nocover # Python < 2.7 import distutils.sysconfig as sysconfig import distutils.util def get_abbr_impl(): """Return abbreviated implementation name.""" if hasattr(sys, 'pypy_ve...
GustavoHennig/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_lc.py
6
#!/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 distributed...
fredRos/pypmc
refs/heads/master
doc/plot_directive.py
2
""" A directive for including a matplotlib plot in a Sphinx document. By default, in HTML output, `plot` will include a .png file with a link to a high-res .png and .pdf. In LaTeX output, it will include a .pdf. The source code for the plot may be included in one of three ways: 1. **A path to a source file** as t...
ryfeus/lambda-packs
refs/heads/master
Pdf_docx_pptx_xlsx_epub_png/source/pip/utils/__init__.py
61
from __future__ import absolute_import import contextlib import locale import logging import re import os import posixpath import shutil import stat import subprocess import sys import tarfile import zipfile from pip.exceptions import InstallationError, BadCommand from pip.compat import console_to_str, stdlib_pkgs fr...
deepakantony/sms-tools
refs/heads/master
lectures/05-Sinusoidal-model/plots-code/spectral-peaks.py
22
import numpy as np import matplotlib.pyplot as plt from scipy.signal import hamming, triang, blackmanharris from scipy.fftpack import fft, ifft import math import sys, os, functools, time sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../../software/models/')) import dftModel as DFT impo...
Soya93/Extract-Refactoring
refs/heads/master
python/testData/refactoring/move/moveNamespacePackage2/before/src/b.py
237
import nspkg.nssubpkg.a print(nspkg.nssubpkg.a.VAR)
haitdai/qtbase5-inprocess-surface-compositor-remote-display
refs/heads/master
myqt/qtbase/src/3rdparty/protobuf/gtest/test/gtest_test_utils.py
1100
#!/usr/bin/env python # # Copyright 2006, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
Softmotions/edx-platform
refs/heads/master
lms/djangoapps/django_comment_client/base/urls.py
102
from django.conf.urls.defaults import url, patterns urlpatterns = patterns( 'django_comment_client.base.views', url(r'upload$', 'upload', name='upload'), url(r'threads/(?P<thread_id>[\w\-]+)/update$', 'update_thread', name='update_thread'), url(r'threads/(?P<thread_id>[\w\-]+)/reply$', 'create_comment...
lsqtongxin/django
refs/heads/master
tests/admin_scripts/custom_templates/project_template/additional_dir/extra.py
701
# this file uses the {{ extra }} variable
zoincoin/zoin
refs/heads/master
contrib/testgen/gen_base58_test_vectors.py
9
#!/usr/bin/env python ''' Generate valid and invalid base58 address and private key test vectors. Usage: gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json ''' # 2012 Wladimir J. van der Laan # R...
Hasimir/pyjs
refs/heads/master
pyjswidgets/pyjamas/ui/PopupPanel.mshtml.py
7
#class PopupPanel: # # # PopupImpl.onShow # def onShowImpl(self, popup): # frame = doc().createElement('iframe') # frame.scrolling = 'no' # frame.frameBorder = 0 # frame.style.position = 'absolute' # # popup.__frame = frame # frame.__popup = popup # frame.style.set...
jrising/open-estimate
refs/heads/master
openest/generate/weathertools.py
1
import os, csv import numpy as np county_dir = "/home/dmr/county_text/access1-3/rcp45/tas" def date_to_datestr(date): return ''.join([date.year, date.month, date.day]) def get_crop_calendar(cropfile): cropcals = {} with open(cropfile, 'rU') as fipsfp: reader = csv.reader(fipsfp, delimiter=',') ...
ChrisGoedhart/Uforia
refs/heads/master
source/django/db/backends/mysql/introspection.py
82
from django.db.backends import BaseDatabaseIntrospection from MySQLdb import ProgrammingError, OperationalError from MySQLdb.constants import FIELD_TYPE import re foreign_key_re = re.compile(r"\sCONSTRAINT `[^`]*` FOREIGN KEY \(`([^`]*)`\) REFERENCES `([^`]*)` \(`([^`]*)`\)") class DatabaseIntrospection(BaseDatabaseI...
ff94315/hiwifi-openwrt-HC5661-HC5761
refs/heads/master
staging_dir/host/lib/python2.7/ctypes/test/test_find.py
82
import unittest import sys from ctypes import * from ctypes.util import find_library from ctypes.test import is_resource_enabled if sys.platform == "win32": lib_gl = find_library("OpenGL32") lib_glu = find_library("Glu32") lib_gle = None elif sys.platform == "darwin": lib_gl = lib_glu = find_library("O...
mtconley/turntable
refs/heads/master
test/lib/python2.7/site-packages/pip/index.py
62
"""Routines related to PyPI, indexes""" from __future__ import absolute_import import logging import cgi import sys import os import re import mimetypes import posixpath import warnings from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor.six.moves.urllib import request as urllib_request f...
mozilla/inventory
refs/heads/master
bulk_action/import_utils.py
2
from django.db.models.fields.related import ForeignKey from systems.models import System from core.registration.static.models import StaticReg from core.hwadapter.models import HWAdapter from mozdns.cname.models import CNAME from mozdns.utils import ensure_label_domain import decimal import datetime import simplejso...
luotao1/Paddle
refs/heads/develop
python/paddle/fluid/framework.py
1
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
Xeleste/namebench
refs/heads/master
libnamebench/version.py
174
VERSION = '1.5-DEVEL'
mateon1/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/wptserve/tests/functional/test_request.py
23
import unittest import pytest wptserve = pytest.importorskip("wptserve") from .base import TestUsingServer class TestInputFile(TestUsingServer): def test_seek(self): @wptserve.handlers.handler def handler(request, response): rv = [] f = request.raw_input f.see...
gauribhoite/personfinder
refs/heads/master
env/google_appengine/lib/django-1.5/django/contrib/localflavor/ar/forms.py
96
# -*- coding: utf-8 -*- """ AR-specific Form helpers. """ from __future__ import absolute_import, unicode_literals from django.contrib.localflavor.ar.ar_provinces import PROVINCE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField...
justinvh/gitpaste
refs/heads/master
saic/paste/management/commands/purge_expired_pastes.py
2
from django.core.management.base import BaseCommand, CommandError from saic.paste.models import Set from datetime import datetime class Command(BaseCommand): def handle(self, *args, **kwargs): expired_sets = Set.objects.filter(expires__lte=datetime.now()) num_purged = expired_sets.count() ...
pophaax/sailingrobot
refs/heads/master
NavigationSystem/Tests/cxxtest/python/cxxtest/cxx_parser.py
55
#------------------------------------------------------------------------- # CxxTest: A lightweight C++ unit testing library. # Copyright (c) 2008 Sandia Corporation. # This software is distributed under the LGPL License v3 # For more information, see the COPYING file in the top CxxTest directory. # Under the terms of ...
odoomrp/odoomrp-wip
refs/heads/8.0
machine_manager_preventive/tests/__init__.py
5
# -*- coding: utf-8 -*- # Copyright 2015 Daniel Campos - Avanzosc S.L. # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from . import test_machine_manager_preventive
RAPD/RAPD
refs/heads/master
src/plugins/subcontractors/xdsme/pycgtypes/vec4.py
12
#################################################################### # vec4 - 4-dimensional vector # # Copyright (C) 2002, Matthias Baas (baas@ira.uka.de) # # You may distribute under the terms of the BSD license, as # specified in the file license.txt. ##################################################################...
stefanv/scipy3
refs/heads/master
scipy/weave/tests/test_c_spec.py
2
import os import sys # Note: test_dir is global to this file. # It is made by setup_location() #globals global test_dir test_dir = '' from numpy.testing import * from scipy.weave import inline_tools,ext_tools,c_spec from scipy.weave.build_tools import msvc_exists, gcc_exists from scipy.weave.catalog import un...
sasukeh/cinder
refs/heads/master
cinder/tests/unit/volume/drivers/test_hgst.py
7
# Copyright (c) 2015 HGST 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 ...
Carmezim/tensorflow
refs/heads/master
tensorflow/contrib/tensor_forest/client/random_forest.py
15
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
billbonney/ardupilot
refs/heads/master
Tools/LogAnalyzer/VehicleType.py
187
class VehicleType(): Plane = 17 Copter = 23 Rover = 37 # these should really be "Plane", "Copter" and "Rover", but many # things use these values as triggers in their code: VehicleTypeString = { 17: "ArduPlane", 23: "ArduCopter", 37: "ArduRover" }