repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
lshain-android-source/tools-idea
refs/heads/master
plugins/hg4idea/testData/bin/mercurial/hgweb/webutil.py
92
# hgweb/webutil.py - utility library for the web interface. # # Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net> # Copyright 2005-2007 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. impor...
sabi0/intellij-community
refs/heads/master
python/testData/wrap/BackslashOnWrap.py
83
def copy_location(new_node, old_node): for attr in 'lineno', 'col_offset': if attr in old_node._attributes and attr in new_node._attributes <caret>
salivatears/ansible
refs/heads/devel
lib/ansible/utils/vars.py
10
# (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...
dch312/numpy
refs/heads/master
numpy/distutils/pathccompiler.py
264
from __future__ import division, absolute_import, print_function from distutils.unixccompiler import UnixCCompiler class PathScaleCCompiler(UnixCCompiler): """ PathScale compiler compatible with an gcc built Python. """ compiler_type = 'pathcc' cc_exe = 'pathcc' cxx_exe = 'pathCC' def _...
ramusus/django-odnoklassniki-groups
refs/heads/master
odnoklassniki_groups/__init__.py
3
VERSION = (0, 1, 4) __version__ = '.'.join(map(str, VERSION))
dharmasam9/moose-core
refs/heads/master
python/moose/neuroml/utils.py
3
# -*- coding: utf-8 -*- ## Description: utility functions used while loading NeuroML L1,2,3 files. ## Version 1.0 by Aditya Gilra, NCBS, Bangalore, India, 2011 for serial MOOSE ## Version 1.5 by Niraj Dudani, NCBS, Bangalore, India, 2012, modified for parallel MOOSE ## Version 1.6 by Aditya Gilra, NCBS, Bangalore, Indi...
ogenstad/ansible
refs/heads/devel
lib/ansible/modules/windows/win_disk_facts.py
52
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Marc Tschapek <marc.tschapek@itelligence.de> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supp...
boxu0001/practice
refs/heads/master
py3/S29_divideInteger.py
1
# 29. Divide Two Integers # Medium # Given two integers dividend and divisor, divide two integers without using multiplication, division and mod operator. # Return the quotient after dividing dividend by divisor. # The integer division should truncate toward zero. # Example 1: # Input: dividend = 10, divisor = 3 # ...
adamfeuer/surveytool
refs/heads/master
sms/migrations/0003_auto__add_field_project_intake_survey_url__add_field_project_intake_su.py
1
# 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 'Project.intake_survey_url' db.add_column('sms_project', 'intake_survey_url', self.gf('djan...
Raymondfs/plugin.video.SportsTV
refs/heads/master
lib/downloader.py
25
# -*- coding: utf-8 -*- import common import urllib import os.path import xbmc, xbmcgui class Downloader(object): def __init__(self): self.pDialog = None def downloadWithJDownloader(self, url, title): common.runPlugin('plugin://plugin.program.jdownloader/?action=addlink&url=' + url) ...
jstoxrocky/statsmodels
refs/heads/master
statsmodels/examples/t_est_rlm.py
33
# -*- coding: utf-8 -*- """ Example from robust test_rlm, fails on Mac Created on Sun Mar 27 14:36:40 2011 """ from __future__ import print_function import numpy as np import statsmodels.api as sm RLM = sm.RLM DECIMAL_4 = 4 DECIMAL_3 = 3 DECIMAL_2 = 2 DECIMAL_1 = 1 from statsmodels.datasets.stackloss import load d...
laurentb/assnet
refs/heads/master
tests/filters_test.py
1
from assnet.filters import quote_url from paste.url import URL from unittest import TestCase class FiltersTest(TestCase): def test_quote(self): assert quote_url(URL('http://assnet.org/')) \ == 'http://assnet.org/' assert quote_url(URL('http://assnet.org:42/')) \ == ...
dannyperry571/theapprentice
refs/heads/master
script.module.youtube.dl/lib/youtube_dl/extractor/redtube.py
32
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, int_or_none, str_to_int, unified_strdate, ) class RedTubeIE(InfoExtractor): _VALID_URL = r'https?://(?:(?:www\.)?redtube\.com/|embed\.redtube\.com/\?.*?\bid=)(?P<id>[0-9]+)' ...
TheJJ100100/bedrock
refs/heads/master
bedrock/mozorg/urls.py
1
# 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/. from django.conf.urls import url from .util import page from . import views from bedrock.redirects.util import redirect...
Daniel-CA/odoomrp-utils
refs/heads/8.0
sale_order_manual_close/__openerp__.py
7
# -*- coding: 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 L...
dyn888/youtube-dl
refs/heads/master
youtube_dl/extractor/pinkbike.py
136
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, remove_end, remove_start, str_to_int, unified_strdate, ) class PinkbikeIE(InfoExtractor): _VALID_URL = r'https?://(?:(?:www\.)?pinkbike\.com/video/|es\.pinkb...
OptiPop/external_chromium_org
refs/heads/opti-5.1
tools/telemetry/telemetry/core/platform/power_monitor/ippet_power_monitor.py
39
# 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 contextlib import csv import logging import operator import os import platform import re import shutil import tempfile import zipfile from telemetry ...
throwable-one/lettuce
refs/heads/master
tests/integration/lib/Django-1.3/django/contrib/gis/geos/coordseq.py
411
""" This module houses the GEOSCoordSeq object, which is used internally by GEOSGeometry to house the actual coordinates of the Point, LineString, and LinearRing geometries. """ from ctypes import c_double, c_uint, byref from django.contrib.gis.geos.base import GEOSBase, numpy from django.contrib.gis.geos.error impo...
40223110/2015cd_0505
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/_imp.py
625
"""(Extremely) low-level import machinery bits as used by importlib and imp.""" class __loader__(object):pass def _fix_co_filename(*args,**kw): raise NotImplementedError("%s:not implemented" % ('_imp.py:_fix_co_filename')) def acquire_lock(*args,**kw): """acquire_lock() -> None Acquires the interpreter's...
da1z/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/markup/templatetags/markup.py
289
""" Set of "markup" template filters for Django. These filters transform plain text markup syntaxes to HTML; currently there is support for: * Textile, which requires the PyTextile library available at http://loopcore.com/python-textile/ * Markdown, which requires the Python-markdown library from ...
andy-ruan/study
refs/heads/master
python/python_comm/util/file_writer.py
1
#!/usr/bin/env python # -*-: coding: utf-8 -*- ''' file writer. author: andreruan@2013 ''' import os import datetime import threading class FileWriter(object): def __init__(self, prefix, rotate_cnt = 0): # self.turn, self.count, self.fp self.count = 0 self.turn = 0 ...
nricklin/PyGithub
refs/heads/master
github/tests/Authentication.py
39
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
gmacon/mongoengine
refs/heads/master
mongoengine/base/__init__.py
46
from mongoengine.base.common import * from mongoengine.base.datastructures import * from mongoengine.base.document import * from mongoengine.base.fields import * from mongoengine.base.metaclasses import * # Help with backwards compatibility from mongoengine.errors import *
pcn/graphite-web
refs/heads/add_kairosdb_support
webapp/graphite/cli/parser.py
12
"""Copyright 2008 Orbitz WorldWide 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...
ibmsoe/hbase
refs/heads/1.1.1-power
hbase-examples/src/main/python/thrift1/gen-py/hbase/ttypes.py
43
# # Autogenerated by Thrift Compiler (0.9.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # # options string: py # from thrift.Thrift import TType, TMessageType, TException, TApplicationException from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TProtocol tr...
happy5214/manitae
refs/heads/master
manitae/errors/NoScenarioSelectedError.py
1
# Copyright (C) 2012 Alexander Jones # # This file is part of Manitae. # # Manitae 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 v...
thoughtpalette/thoughts.thoughtpalette.com
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/default.py
364
# -*- coding: utf-8 -*- """ pygments.styles.default ~~~~~~~~~~~~~~~~~~~~~~~ The default highlighting style. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Name, Com...
Alwnikrotikz/pychess
refs/heads/master
lib/pychess/widgets/pydock/ArrowButton.py
20
from __future__ import absolute_import import cairo from gi.repository import Gtk from gi.repository import GObject from gi.repository import Gdk from .OverlayWindow import OverlayWindow from .__init__ import NORTH, EAST, SOUTH, WEST class ArrowButton (OverlayWindow): """ Leafs will connect to the drag-drop sig...
stoman/competitive-programming
refs/heads/master
problems/balancedbrackets/submissions/accepted/stefan.py
2
#!/usr/bin/env python2 #Author: Stefan Toman def check(s): match = {"(": ")", "[": "]", "{": "}"} stack = [] for b in s: if b in match.keys(): stack.append(b) elif len(stack) > 0 and match[stack.pop()] == b: pass else: print "NO" retu...
nmoya/fscan
refs/heads/master
src/ui/gui/plotter.py
1
# -*- coding: utf-8 -*- from matplotlib import pyplot as plt from util import formatter class Plotter(object): def __init__(self, title, data): self.title = title self.data = data def scatter_plot(self): plt.figure() plt.title(self.title) #marker='o' plt.ylabel...
Raikul/Fzuroonbot
refs/heads/master
libs/bs4/testing.py
37
"""Helper classes for tests.""" # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. __license__ = "MIT" import pickle import copy import functools import unittest from unittest import TestCase from bs4 import BeautifulSoup from bs4.element import ( CharsetMetaAttr...
jaingaurav/Diamond
refs/heads/master
src/collectors/mysqlstat/mysqlstat.py
21
# coding=utf-8 """ #### Grants * Normal usage ``` GRANT REPLICATION CLIENT on *.* TO 'user'@'hostname' IDENTIFIED BY 'password'; ``` * For innodb engine status ``` GRANT SUPER ON *.* TO 'user'@'hostname' IDENTIFIED BY 'password'; ``` * For innodb engine status on MySQL versions 5.1.24+ ``` GRANT PROCESS ON *.* ...
keenondrums/sovrin-node
refs/heads/master
sovrin_node/test/suspension/test_suspension.py
1
import pytest from plenum.common.signer_did import DidSigner from sovrin_node.test.suspension.helper import sendChangeVerkey, checkIdentityRequestFailed, \ checkIdentityRequestSucceed, sendSuspendRole, changeVerkey, suspendRole from stp_core.loop.eventually import eventually from stp_core.common.log import getlogg...
LaynePeng/flocker
refs/heads/master
flocker/volume/test/test_filesystems_memory.py
15
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Tests for :module:`flocker.filesystems.memory`. """ from __future__ import absolute_import from twisted.internet.defer import succeed, fail from twisted.trial.unittest import SynchronousTestCase from twisted.python.filepath import FilePath from .files...
DinoCow/airflow
refs/heads/master
airflow/providers/imap/hooks/__init__.py
5130
# # 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...
jpzk/hclu
refs/heads/master
hclu/complete_linkage_ehac.py
1
""" This file is part of hclu. hclu 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. hclu is distributed in the hope that it will be useful,...
alexis-roche/nipy
refs/heads/master
nipy/labs/spatial_models/__init__.py
3
from __future__ import absolute_import from nipy.testing import Tester test = Tester().test bench = Tester().bench
modulexcite/PTVS
refs/heads/master
Python/Product/PythonTools/Templates/Projects/StarterFlaskJadeProject/views.py
18
""" Routes and views for the flask application. """ from datetime import datetime from flask import render_template from $safeprojectname$ import app @app.route('/') @app.route('/home') def home(): """Renders the home page.""" return render_template( 'index.jade', title='Home Pag...
thebjorn/doscmd-screen
refs/heads/master
tasks.py
2
# -*- coding: utf-8 -*- """ Base version of package/tasks.py, created by package/root/dir> dk-tasklib install (it should reside in the root directory of your package) This file defines tasks for the Invoke tool: http://www.pyinvoke.org Basic usage:: inv -l # list all available tasks inv b...
XXMrHyde/android_external_chromium_org
refs/heads/darkkat-4.4
tools/checkdeps/cpp_checker.py
57
# 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. """Checks C++ and Objective-C files for illegal includes.""" import codecs import os import re import results from rules import Rule, MessageRule cla...
ferranti/watchdog
refs/heads/master
vendor/rdflib-2.4.0/rdflib/RDF.py
4
from rdflib.Namespace import Namespace RDFNS = Namespace("http://www.w3.org/1999/02/22-rdf-syntax-ns#") # Syntax names RDF = RDFNS["RDF"] Description = RDFNS["Description"] ID = RDFNS["ID"] about = RDFNS["about"] parseType = RDFNS["parseType"] resource = RDFNS["resource"] li = RDFNS["li"] nodeID = RDFNS["nodeID"] dat...
Syntox32/DiscoBot
refs/heads/development
disco/utils.py
1
# -*- coding: utf-8 -*- """ Utillity class with things """ import os, io, logging import asyncio, aiohttp import logging.handlers from discord import Message from discord.ext import commands logger = logging.getLogger("disco") def get_destination(msg: Message): dest = None if msg.channel.is_private: ...
aureooms/sak
refs/heads/main
sak/queue.py
1
import lib.queue def stat(): for key, val in lib.queue.stat(): print(key) def submit(name, cmd, nodes=None, cpu=None, output=None, error=None, walltime=None, memory=None, redirect=False): out, err, p = lib.queue.submit( name, cmd, nodes, cpu, output, error, walltime, memory, redirect) ...
sddn50302/jstorm
refs/heads/master
jstorm-client/src/main/py/storm/DistributedRPCInvocations.py
37
# # Autogenerated by Thrift Compiler (0.7.0) # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # from thrift.Thrift import * from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol, TProtocol try: from thrift.pro...
CamelBackNotation/CarnotKE
refs/heads/master
jyhton/Lib/json/tests/test_tool.py
17
import os import sys import textwrap import unittest import subprocess from test import test_support from test.script_helper import assert_python_ok class TestTool(unittest.TestCase): data = """ [["blorpie"],[ "whoops" ] , [ ],\t"d-shtaeou",\r"d-nthiouh", "i-vhbjkh...
guanxi55nba/key-value-store
refs/heads/key-value-store
pylib/cqlshlib/util.py
60
# 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...
NewburyCS/StudentExamples
refs/heads/master
person2.py
1
#!/usr/bin/env python __author__ = "Arana Fireheart" class Person(object): def __init__(self, birthDateTime): self.birthday = birthDateTime self.name = None self.height = None self.weight = None # Float for weight in pounds self.gender = None self.location = Non...
Evervolv/android_external_chromium_org
refs/heads/kitkat
build/android/gyp/get_device_configuration.py
52
#!/usr/bin/env python # # Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Gets and writes the configurations of the attached devices. This configuration is used by later build steps to determine which de...
nonapod/gzinflatekiller
refs/heads/master
gzinflatekiller.py
1
#!/bin/env python #:############################################ #: GZINFLATEKILLER #: by Les Cordell #: #: Hunt through files containing a base64 #: GZInflate Command #: #: Written on 07/08/2013 #: last modified @ 07/08/2013 #:############################################ import sys, os, re #: Extensions constant, th...
mikemow/youtube-dl
refs/heads/master
youtube_dl/extractor/criterion.py
138
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from .common import InfoExtractor class CriterionIE(InfoExtractor): _VALID_URL = r'https?://www\.criterion\.com/films/(?P<id>[0-9]+)-.+' _TEST = { 'url': 'http://www.criterion.com/films/184-le-samourai', 'md5': 'bc51be...
MarkWh1te/xueqiu_predict
refs/heads/master
p3_env/lib/python3.5/site-packages/pip/status_codes.py
1002
from __future__ import absolute_import SUCCESS = 0 ERROR = 1 UNKNOWN_ERROR = 2 VIRTUALENV_NOT_FOUND = 3 PREVIOUS_BUILD_DIR_ERROR = 4 NO_MATCHES_FOUND = 23
40223123/finaltestone
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/site-packages/editor.py
84
# -*- coding: utf-8 -*- import sys import time import traceback import dis from browser import document as doc, window, alert, ajax # set height of container to 66% of screen _height = doc.documentElement.clientHeight _s = doc['container'] _s.style.height = '%spx' % int(_height * 0.66) has_ace = True try: editor...
apllicationCOM/youtube-dl-api-server
refs/heads/master
youtube_dl_server/youtube_dl/extractor/engadget.py
124
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( url_basename, ) class EngadgetIE(InfoExtractor): _VALID_URL = r'''(?x)https?://www.engadget.com/ (?:video/5min/(?P<id>\d+)| [\d/]+/.*?) ''' _TEST = { 'url': 'htt...
aristk/static-analyser
refs/heads/master
tests/libs/googletest-release-1.8.0/googletest/test/gtest_catch_exceptions_test.py
2139
#!/usr/bin/env python # # Copyright 2010 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 o...
pombredanne/angular-django-rest-resource
refs/heads/master
test/django_project/test_rest/admin.py
2
from django.contrib import admin from test_rest.models import Plant, Animal # Register your models here. admin.site.register(Plant) admin.site.register(Animal)
opoplawski/ansible-modules-extras
refs/heads/devel
packaging/os/pkgng.py
60
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, bleader # Written by bleader <bleader@ratonland.org> # Based on pkgin module written by Shaun Zinck <shaun.zinck at gmail.com> # that was based on pacman module written by Afterburn <http://github.com/afterburn> # that was based on apt module written by Matthew W...
CiscoSystems/avos
refs/heads/master
horizon/models.py
284
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the...
denis-pitul/django
refs/heads/master
django/contrib/gis/db/backends/oracle/models.py
475
""" The GeometryColumns and SpatialRefSys models for the Oracle spatial backend. It should be noted that Oracle Spatial does not have database tables named according to the OGC standard, so the closest analogs are used. For example, the `USER_SDO_GEOM_METADATA` is used for the GeometryColumns model and the `SDO_...
eduNEXT/edunext-platform
refs/heads/master
openedx/core/djangoapps/oauth_dispatch/tests/constants.py
41
""" Constants for testing purposes """ DUMMY_REDIRECT_URL = u'https://example.com/edx/redirect' DUMMY_REDIRECT_URL2 = u'https://example.com/edx/other-redirect'
henrytao-me/openerp.positionq
refs/heads/master
openerp/addons/base_calendar/crm_meeting.py
22
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms ...
varunarya10/boto
refs/heads/develop
boto/mturk/question.py
170
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
bopamo/googletest
refs/heads/master
test/gtest_output_test.py
496
#!/usr/bin/env python # # Copyright 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
saurabh6790/tru_app_back
refs/heads/master
patches/february_2013/remove_account_utils_folder.py
30
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt def execute(): from webnotes.utils import get_base_path import shutil import os utils_path = os.path.join(get_base_path(), "app", "accounts", "utils") if os.path.exists(utils_path): ...
protwis/protwis
refs/heads/master
news/models.py
3
from django.db import models # Create your models here. class News(models.Model): #Basic set # defines the type of data image = models.TextField() date = models.DateField() html = models.TextField() def __str__(self): return self.title class Meta(): db_table = "news"
tvcsantos/Flexget
refs/heads/develop
flexget/plugins/modify/torrent_scrub.py
11
""" Torrent Scrubber Plugin. """ from __future__ import unicode_literals, division, absolute_import import logging from flexget import plugin, validator from flexget.event import event from flexget.plugins.modify.torrent import TorrentFilename from flexget.utils import bittorrent log = logging.getLogger('torrent_scru...
fmyzjs/horizon-hacker
refs/heads/master
openstack_dashboard/dashboards/project/images_and_snapshots/snapshots/tests.py
10
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
dxwu/BinderFilter
refs/heads/master
resources/android-toolchain-16/lib/python2.7/bsddb/test/test_early_close.py
73
"""TestCases for checking that it does not segfault when a DBEnv object is closed before its DB objects. """ import os, sys import unittest from test_all import db, test_support, verbose, get_new_environment_path, get_new_database_path # We're going to get warnings in this module about trying to close the db when # ...
bbuckingham/katello
refs/heads/master
cli/src/katello/client/core/permission.py
2
# # Katello Organization actions # Copyright (c) 2010 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You...
r39132/airflow
refs/heads/master
airflow/contrib/sensors/weekday_sensor.py
4
# -*- coding: utf-8 -*- # # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
LuminateWireless/grpc
refs/heads/master
src/python/grpcio_tests/tests/interop/_insecure_intraop_test.py
9
# Copyright 2015, 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 of conditions and the f...
felipenaselva/felipe.repository
refs/heads/master
script.module.schism.common/lib/requests/packages/chardet/codingstatemachine.py
2930
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
Ruide/angr-dev
refs/heads/master
cle/cle/utils.py
1
import os import contextlib from .errors import CLEError, CLEFileNotFoundError # https://code.woboq.org/userspace/glibc/include/libc-pointer-arith.h.html#43 def ALIGN_DOWN(base, size): return base & -size # https://code.woboq.org/userspace/glibc/include/libc-pointer-arith.h.html#50 def ALIGN_UP(base, size): ...
anomitra/articleScraper
refs/heads/master
PyQt-gpl-5.4.1/examples/painting/basicdrawing/basicdrawing.py
3
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2013 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
mattjmorrison/ReportLab
refs/heads/master
src/reportlab/platypus/para.py
14
"""new experimental paragraph implementation Intended to allow support for paragraphs in paragraphs, hotlinks, embedded flowables, and underlining. The main entry point is the function def Paragraph(text, style, bulletText=None, frags=None) Which is intended to be plug compatible with the "usual" platypus paragraph...
tdtrask/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_serviceenginegroup.py
15
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.1 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
IssamLaradji/scikit-learn
refs/heads/master
examples/feature_stacker.py
246
""" ================================================= Concatenating multiple feature extraction methods ================================================= In many real-world examples, there are many ways to extract features from a dataset. Often it is beneficial to combine several methods to obtain good performance. Th...
NewbyJE/android_kernel_samsung_msm8660-common
refs/heads/tenderloin-cm-11.0-wip-6
tools/perf/scripts/python/check-perf-trace.py
11214
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
bigfootproject/sahara
refs/heads/spark-plugin
sahara/tests/unit/service/edp/oozie/test_oozie.py
6
# Copyright (c) 2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
lambday/shogun
refs/heads/develop
examples/undocumented/python/structure_hierarchical_multilabel_classification.py
2
#!/usr/bin/env python """ This examples shows how to use HierarchicalMultilabelModel for hierarchical multi-label classification. The data used: [1] Image CLEF 2007 competition for annotation of X-Ray images. http://kt.ijs.si/DragiKocev/PhD/resources/doku.php?id=hmc_classification#imageclef07d """ from shogun imp...
uberamd/NGECore2
refs/heads/master
scripts/object/mobile/skeleton/orb.py
85615
import sys def setup(core, object): return
uberamd/NGECore2
refs/heads/master
scripts/object/tangible/food/foraged/edible_jar_berries_generic.py
85615
import sys def setup(core, object): return
partofthething/home-assistant
refs/heads/dev
tests/components/stt/__init__.py
26
"""Speech to text tests."""
sparkslabs/kamaelia
refs/heads/master
Sketches/MPS/BugReports/FixTests/Kamaelia/Test/Internet/test_Selector.py
9
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under the Apache License, Ver...
40423241/2017springcd_hw
refs/heads/gh-pages
plugin/render_math/__init__.py
371
from .math import *
hanjihun/Car
refs/heads/master
asegurarmiauto_com/asegurarmiauto_com/spiders/categories_of_asegurarmiauto_com.py
1
import scrapy from scrapy import Request from collections import OrderedDict from urlparse import urlparse import time, json, csv class CategoriesOfAsegurarmiautoCom(scrapy.Spider): name = "categories_of_asegurarmiauto_com" start_urls = ['http://www.asegurarmiauto.com/'] headers = {} headers['User-Agent'] = "Mo...
Aptitudetech/ERPNext
refs/heads/master
erpnext/tests/utils.py
41
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe def create_test_contact_and_address(): frappe.db.sql('delete from tabContact') frappe.db.sql('delete from tabAddress') frappe.db.sql(...
DOREMUS-ANR/knowledge-base
refs/heads/master
linked-data/ethnies-BnF2RAMEAU/scripts/tache2_prepaFichiers.py
2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import division from nltk import stem from nltk.stem import RegexpStemmer import re, sys, os, math #/////////////////// création de deux nouveaux fichiers en écrtiture nFichierBNF = open('newBNF_utf-8.txt','x+') nFichierRM = open('newRAMEAU_utf-8.txt','x+...
sfluo/Mr.Bot
refs/heads/master
crypto/pycrypto-2.6/lib/Crypto/SelfTest/Util/test_number.py
115
# -*- coding: utf-8 -*- # # SelfTest/Util/test_number.py: Self-test for parts of the Crypto.Util.number module # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # th...
ryfeus/lambda-packs
refs/heads/master
Selenium_PhantomJS/source/pip/_vendor/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...
drbild/boto
refs/heads/develop
tests/unit/cloudtrail/test_layer1.py
23
#!/usr/bin/env python import json from boto.cloudtrail.layer1 import CloudTrailConnection from tests.unit import AWSMockServiceTestCase class TestDescribeTrails(AWSMockServiceTestCase): connection_class = CloudTrailConnection def default_body(self): return b''' {"trailList": ...
Maspear/odoo
refs/heads/8.0
addons/pad_project/__openerp__.py
312
# -*- 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...
ZLLab-Mooc/edx-platform
refs/heads/named-release/dogwood.rc
common/test/acceptance/pages/studio/index.py
1
""" Studio Home page """ from bok_choy.page_object import PageObject from . import BASE_URL class DashboardPage(PageObject): """ Studio Home page """ url = BASE_URL + "/course/" def is_browser_on_page(self): return self.q(css='body.view-dashboard').present @property def course_...
costadorione/purestream
refs/heads/master
lib/requests/packages/urllib3/util/url.py
552
from collections import namedtuple from ..exceptions import LocationParseError url_attrs = ['scheme', 'auth', 'host', 'port', 'path', 'query', 'fragment'] class Url(namedtuple('Url', url_attrs)): """ Datastructure for representing an HTTP URL. Used as a return value for :func:`parse_url`. """ s...
JorisBolsens/PYNQ
refs/heads/master
python/pynq/iop/pmod_led8.py
2
# Copyright (c) 2016, Xilinx, 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of ...
kmoocdev/edx-platform
refs/heads/kmooc.rc0
lms/envs/dev.py
6
""" This config file runs the simplest dev environment using sqlite, and db-based sessions. Assumes structure: /envroot/ /db # This is where it'll write the database file /edx-platform # The location of this repo /log # Where we're going to write log files """ # We intentionally define lot...
trondhindenes/ansible
refs/heads/devel
lib/ansible/modules/source_control/gitlab_hooks.py
27
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Marcus Watkins <marwatk@marcuswatkins.net> # Based on code: # (c) 2013, Phillip Gentry <phillip@cx.com> # 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 __...
wbc2010/django1.2.5
refs/heads/master
tests/modeltests/validation/models.py
67
from datetime import datetime from django.core.exceptions import ValidationError from django.db import models from django.test import TestCase def validate_answer_to_universe(value): if value != 42: raise ValidationError('This is not the answer to life, universe and everything!', code='not42') class Mode...
crccheck/django-object-actions
refs/heads/master
django_object_actions/tests/tests.py
1
try: from django.urls import reverse except ImportError: from django.core.urlresolvers import reverse # < DJANGO1.10 from django.test import TestCase from example_project.polls.factories import UserFactory from example_project.polls.models import Choice class LoggedInTestCase(TestCase): def setUp(self):...
Jgarcia-IAS/SITE
refs/heads/master
addons/account/wizard/account_tax_chart.py
385
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
fredericmohr/mitro
refs/heads/master
mitro-mail/build/venv/lib/python2.7/site-packages/psycopg2/__init__.py
61
"""A Python driver for PostgreSQL psycopg is a PostgreSQL_ database adapter for the Python_ programming language. This is version 2, a complete rewrite of the original code to provide new-style classes for connection and cursor objects and other sweet candies. Like the original, psycopg 2 was written with the aim of b...