repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
xiangel/hue
refs/heads/master
desktop/libs/hadoop/src/hadoop/fs/test_webhdfs.py
16
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (...
newsteinking/docker
refs/heads/master
pip/vcs/__init__.py
35
"""Handles all VCS (version control) support""" from __future__ import absolute_import import errno import logging import os import shutil from pip._vendor.six.moves.urllib import parse as urllib_parse from pip.exceptions import BadCommand from pip.utils import (display_path, backup_dir, call_subprocess, ...
AccelAI/accel.ai
refs/heads/master
flask-aws/lib/python2.7/site-packages/boto/ec2/blockdevicemapping.py
12
# Copyright (c) 2009-2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # 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 wit...
roselleebarle04/django
refs/heads/master
django/http/multipartparser.py
332
""" Multi-part parsing for file uploads. Exposes one class, ``MultiPartParser``, which feeds chunks of uploaded data to file upload handlers for processing. """ from __future__ import unicode_literals import base64 import binascii import cgi import sys from django.conf import settings from django.core.exceptions imp...
holmes/intellij-community
refs/heads/master
python/testData/inspections/PyClassHasNoInitInspection/parentClass.py
83
__author__ = 'ktisha' class <weak_warning descr="Class has no __init__ method">A</weak_warning>: def foo(self): self.b = 1 class B(A): def __init__(self): self.b = 2
LingxiaoJIA/gem5
refs/heads/master
tests/configs/simple-timing.py
69
# Copyright (c) 2013 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
sYnfo/samba
refs/heads/master
buildtools/wafsamba/samba_bundled.py
19
# functions to support bundled libraries from Configure import conf import sys, Logs from samba_utils import * def PRIVATE_NAME(bld, name, private_extension, private_library): '''possibly rename a library to include a bundled extension''' if not private_library: return name # we now use the same...
ashwin01/hasjob
refs/heads/master
shell.py
3
#!/usr/bin/env python import os import readline from pprint import pprint from flask import * from hasjob import * os.environ['PYTHONINSPECT'] = 'True'
tokyo-jesus/greyskull
refs/heads/master
greyskull/handlers/tubes.py
2
# -*- coding: utf-8 -*- from tornado.web import RequestHandler class Index(RequestHandler): def get(self): pass class Redirect(RequestHandler): def get(self): pass
gregdek/ansible
refs/heads/devel
test/units/module_utils/aws/test_aws_module.py
68
# -*- coding: utf-8 -*- # (c) 2017, Michael De La Rue # # 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 lat...
whereismyjetpack/ansible
refs/heads/devel
lib/ansible/playbook/attribute.py
46
# (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...
cerebis/i3seqdb
refs/heads/master
load_dna_concentrations.py
1
#!/usr/bin/env python import argparse import pandas import pymongo if __name__ == '__main__': parser = argparse.ArgumentParser(description='Load DNA concentrations from a PicoGreen plate assay') parser.add_argument('table', help='Excel spreadsheet from plate reader') parser.add_argument('plate-id', help='I...
QianBIG/odoo
refs/heads/8.0
openerp/http.py
66
# -*- coding: utf-8 -*- #---------------------------------------------------------- # OpenERP HTTP layer #---------------------------------------------------------- import ast import collections import contextlib import datetime import errno import functools import getpass import inspect import logging import mimetypes...
gbaman/python-sense-hat
refs/heads/master
setup.py
4
import os from setuptools import setup, find_packages def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() setup( name="sense-hat", version="2.1.0", author="Dave Honess", author_email="dave@raspberrypi.org", description="Python module to control the Raspberry Pi...
kencoken/imsearch-tools
refs/heads/master
imsearchtools/postproc_modules/example_textlog_module.py
2
#!/usr/bin/env python import json def callback_func(out_dict, extra_prms=None): with open('test.txt','a') as myfile: myfile.write('\n') myfile.write('OUT_DICT:\n') myfile.write(json.dumps(out_dict)) if extra_prms: myfile.write('\nEXTRA_PRMS:\n') myfile.write...
PSUdaemon/trafficserver
refs/heads/master
tests/gold_tests/h2/h2bigclient.py
10
''' ''' # 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");...
ppiotr/Bibedit-some-refactoring
refs/heads/bibedit-hp-change-to-field-with-many-instances
modules/bibformat/lib/elements/bfe_report_numbers.py
4
# -*- coding: utf-8 -*- ## ## This file is part of CDS Invenio. ## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN. ## ## CDS Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either versio...
popazerty/blackhole-vuplus
refs/heads/master
lib/python/Screens/AudioSelection.py
15
from Screen import Screen from Screens.Setup import getConfigMenuItem, Setup from Screens.InputBox import PinInput from Screens.MessageBox import MessageBox from Components.ServiceEventTracker import ServiceEventTracker from Components.ActionMap import NumberActionMap from Components.ConfigList import ConfigListScreen ...
sodafree/backend
refs/heads/master
build/lib.linux-i686-2.7/django/core/serializers/pyyaml.py
81
""" YAML serializer. Requires PyYaml (http://pyyaml.org/), but that's checked for in __init__. """ from StringIO import StringIO import decimal import yaml from django.db import models from django.core.serializers.base import DeserializationError from django.core.serializers.python import Serializer as PythonSeriali...
moreati/django
refs/heads/master
tests/check_framework/models.py
396
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models class SimpleModel(models.Model): field = models.IntegerField() manager = models.manager.Manager()
petry/kanboard
refs/heads/master
apps/teams/tests/__init__.py
4
__author__ = 'petry'
torufuru/OFPatchPanel
refs/heads/hackathon
ryu/lib/packet/mpls.py
22
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # # 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 appli...
henniggroup/MPInterfaces
refs/heads/master
mpinterfaces/mat2d/electronic_structure/analysis.py
1
from __future__ import print_function, division, unicode_literals import os import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt from matplotlib.font_manager import FontProperties import numpy as np from scipy.spatial.distance import euclidean from pymatgen.core.structure import Structure from p...
armando-migliaccio/tempest
refs/heads/master
tempest/services/compute/xml/fixed_ips_client.py
3
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 IBM Corp # 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/licens...
kartikdhar/djangotest
refs/heads/master
virt1/lib/python2.7/site-packages/django/db/backends/sqlite3/introspection.py
13
import re from django.db.backends.base.introspection import ( BaseDatabaseIntrospection, FieldInfo, TableInfo, ) field_size_re = re.compile(r'^\s*(?:var)?char\s*\(\s*(\d+)\s*\)\s*$') def get_field_size(name): """ Extract the size number from a "varchar(11)" type name """ m = field_size_re.search(name) ...
40123142/2015cd_midterm2
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/unittest/test/_test_warnings.py
858
# helper module for test_runner.Test_TextTestRunner.test_warnings """ This module has a number of tests that raise different kinds of warnings. When the tests are run, the warnings are caught and their messages are printed to stdout. This module also accepts an arg that is then passed to unittest.main to affect the b...
mark-adams/python-social-auth
refs/heads/master
social/tests/test_utils.py
73
import sys import unittest2 as unittest from mock import Mock from social.utils import sanitize_redirect, user_is_authenticated, \ user_is_active, slugify, build_absolute_uri, \ partial_pipeline_data PY3 = sys.version_info[0] == 3 class SanitizeRedirectTest(unitte...
f0rki/cb-multios
refs/heads/master
original-challenges/HighFrequencyTradingAlgo/poller/for-testing/machine.py
1
#!/usr/bin/env python # # Copyright (C) 2014 Narf Industries <info@narfindustries.com> # # 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 # th...
gavinmh/keras
refs/heads/master
tests/auto/test_loss_weighting.py
31
from __future__ import absolute_import from __future__ import print_function import numpy as np np.random.seed(1336) # for reproducibility from keras.datasets import mnist from keras.models import Sequential, Graph from keras.layers.core import Dense, Activation from keras.utils import np_utils import unittest nb_c...
talhaobject90/HUNGRY-OBJECT90
refs/heads/master
dashboard (copy)/reviews/app.py
49
from django.conf.urls import url from oscar.core.application import Application from oscar.core.loading import get_class class ReviewsApplication(Application): name = None default_permissions = ['is_staff', ] list_view = get_class('dashboard.reviews.views', 'ReviewListView') update_view = get_class(...
liquex/gameone.de-on-XBMC
refs/heads/master
default.py
1
#!/usr/bin/python # -*- coding: utf-8 -*- # # 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. # # T...
Mirantis/swift-encrypt
refs/heads/master
swift/account/server.py
2
# Copyright (c) 2010-2012 OpenStack, LLC. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
scottdangelo/RemoveVolumeMangerLocks
refs/heads/RemoveVolumeManagerLocks
cinder/api/v2/types.py
17
# Copyright (c) 2011 Zadara Storage Inc. # Copyright (c) 2011 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-...
Yukarumya/Yukarum-Redfoxes
refs/heads/master
python/mozbuild/mozbuild/action/test_archive.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/. # This action is used to produce test archives. # # Ideally, the data in this file should be defined in moz.build files....
freifeld/cpabDiffeo
refs/heads/master
cpab/cpa2d/utils/HOLD_IT_get_stuff_for_the_local_version.py
1
#!/usr/bin/env python """ Created on Sun Nov 30 11:52:49 2014 Author: Oren Freifeld Email: freifeld@csail.mit.edu """ import numpy as np from scipy.linalg import inv from scipy.sparse import linalg as ssl from scipy.sparse import lil_matrix from of.utils import Bunch from of.utils import ipshell def get_stuff_for_th...
ChrisBird/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" }
xiaoshaozi52/ansible
refs/heads/devel
v1/ansible/runner/action_plugins/add_host.py
107
# Copyright 2012, Seth Vidal <skvidal@fedoraproject.org> # # 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 ...
jswope00/griffinx
refs/heads/master
openedx/core/djangoapps/user_api/tests/test_course_tag_api.py
11
""" Test the user course tag API. """ from django.test import TestCase from student.tests.factories import UserFactory from openedx.core.djangoapps.user_api.api import course_tag as course_tag_api from opaque_keys.edx.locations import SlashSeparatedCourseKey class TestCourseTagAPI(TestCase): """ Test the use...
sorblack-x/prime-jack
refs/heads/master
chatterbotapi.py
6
import re import sys import hashlib if sys.version_info >= (3, 0): from urllib.request import build_opener, HTTPCookieProcessor, urlopen from urllib.parse import urlencode import http.cookiejar as cookielib else: from urllib import urlencode, urlopen from urllib2 import build_opener, HTTPCookiePro...
jbteixeir/Openflow-DC-Framework
refs/heads/master
pox/topology/topology.py
31
# Copyright 2011 James McCauley # # This file is part of POX. # # POX 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. # # POX is distri...
komsas/OpenUpgrade
refs/heads/master
addons/website_mail_group/__init__.py
1350
import controllers
AlexPereverzyev/spidy
refs/heads/master
spidy/document/xpath.py
1
''' XPath expression parser. Please see Spidy documentation for what's supported. ''' __all__ = ['XPath'] from selectors import * from spidy.common import * from spidy.common.sniff import is_int XP_STRING = ['\'', '"'] XP_UNDEFINED = 0 XP_SEEK_NAME = 1 XP_SEEK_INDEX = 2 XP_SEEK_ATTR = 4 ...
tarunkapadia93/gk_a6k
refs/heads/gk-r2
tools/perf/scripts/python/sctop.py
11180
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
lulandco/SickRage
refs/heads/develop
lib/unidecode/x07d.py
253
data = ( 'Ji ', # 0x00 'Cha ', # 0x01 'Zhou ', # 0x02 'Xun ', # 0x03 'Yue ', # 0x04 'Hong ', # 0x05 'Yu ', # 0x06 'He ', # 0x07 'Wan ', # 0x08 'Ren ', # 0x09 'Wen ', # 0x0a 'Wen ', # 0x0b 'Qiu ', # 0x0c 'Na ', # 0x0d 'Zi ', # 0x0e 'Tou ', # 0x0f 'Niu ', # 0x10 'Fou ', ...
Looney4444/Facial-Detection
refs/heads/master
src/main.py
1
# AJ Looney # 9/6/15 # FacialDetection from videoCapture import VideoCapture from detectFace import DetectFace def main(): vid = VideoCapture() face = DetectFace(vid, smile=True, eye=False) face.activate() vid.release() if __name__ == '__main__': main()
BorgERP/borg-erp-6of3
refs/heads/master
addons/account_analytic_plans/report/__init__.py
445
# -*- 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...
supergis/micropython
refs/heads/master
tests/basics/generator_return.py
99
def gen(): yield 1 return 42 g = gen() print(next(g)) try: print(next(g)) except StopIteration as e: print(repr(e))
akretion/odoo
refs/heads/12-patch-paging-100-in-o2m
addons/web_editor/models/ir_http.py
25
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models from odoo.http import request from odoo.osv import expression class IrHttp(models.AbstractModel): _inherit = 'ir.http' @classmethod def _dispatch(cls): context = dict(reques...
mSenyor/kivy
refs/heads/master
kivy/tests/test_issue_1091.py
55
import unittest from kivy.uix.stacklayout import StackLayout from kivy.uix.widget import Widget class PaddingSpacingTestCase(unittest.TestCase): def test_tb_lr_stacklayout(self): stacklayout = StackLayout( orientation='tb-lr', size=(200, 200), padding=20, sp...
BobBall/sm
refs/heads/master
drivers/LVHDSR.py
6
#!/usr/bin/python # # Copyright (C) Citrix Systems Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published # by the Free Software Foundation; version 2.1 only. # # This program is distributed in the hope that it will be u...
SonnyBrooks/ProjectEulerSwift
refs/heads/master
ProjectEulerSwift/Problem13.py
1
myArr = [] myArr.append(37107287533902102798797998220837590246510135740250) myArr.append(46376937677490009712648124896970078050417018260538) myArr.append(74324986199524741059474233309513058123726617309629) myArr.append(91942213363574161572522430563301811072406154908250) myArr.append(230675882075393461711719803104210475...
PlushBeaver/FanFicFare
refs/heads/master
fanficfare/adapters/adapter_ficwadcom.py
1
# -*- coding: utf-8 -*- # Copyright 2011 Fanficdownloader team, 2015 FanFicFare team # # 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 # # Un...
pritamsamadder048/libforensics
refs/heads/master
code/lf/apps/msoffice/word/metadata.py
13
# Copyright 2009 Michael Murr # # This file is part of LibForensics. # # LibForensics 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 ver...
CCI-MOC/python-novaclient
refs/heads/moc-modified
novaclient/shell.py
1
# Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/lice...
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/scipy/sparse/linalg/eigen/lobpcg/tests/benchmark.py
10
from __future__ import division, print_function, absolute_import from scipy import * from scipy.sparse.linalg import lobpcg from symeig import symeig from pylab import plot, show, legend, xlabel, ylabel set_printoptions(precision=3,linewidth=90) import time def test(n): x = arange(1,n+1) B = diag(1./x) y...
grangier/django-11599
refs/heads/master
tests/regressiontests/admin_views/customadmin.py
3
""" A second, custom AdminSite -- see tests.CustomAdminSiteTests. """ from django.conf.urls.defaults import patterns from django.contrib import admin from django.http import HttpResponse import models class Admin2(admin.AdminSite): login_template = 'custom_admin/login.html' index_template = 'custom_admin/inde...
ntonjeta/iidea-Docker
refs/heads/master
examples/sobel/src/boost_1_63_0/tools/build/test/library_property.py
44
#!/usr/bin/python # Copyright 2004 Vladimir Prus # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) # Test that the <library> property has no effect on "obj" targets. Previously, # it affected all targets, so # # project : ...
hsuchie4/TACTIC
refs/heads/master
src/pyasm/application/maya/__init__.py
8
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
upliftaero/MissionPlanner
refs/heads/master
Lib/site-packages/scipy/fftpack/basic.py
56
""" Discrete Fourier Transforms - basic.py """ # Created by Pearu Peterson, August,September 2002 __all__ = ['fft','ifft','fftn','ifftn','rfft','irfft', 'fft2','ifft2'] from numpy import zeros, swapaxes import numpy import _fftpack import atexit atexit.register(_fftpack.destroy_zfft_cache) atexit.register...
zlfben/gem5
refs/heads/develop
src/arch/x86/isa/insts/simd128/floating_point/arithmetic/horizontal_subtraction.py
91
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
n3ocort3x/endeavoru_3.14
refs/heads/master
tools/perf/scripts/python/sctop.py
11180
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
coreos/chromite
refs/heads/master
lib/chrome_util.py
2
#!/usr/bin/python # Copyright (c) 2012 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ Library containing utility functions used for Chrome-specific build tasks. """ import functools import glob import logging im...
ktbyers/pynet-ons-mar17
refs/heads/master
jinja2_example/jinja2_test.py
2
import jinja2 my_dict = {'a': 'whatever'} my_template = ''' some text of something {{ a }} something ''' t = jinja2.Template(my_template) print t.render(my_dict)
ccomb/OpenUpgrade
refs/heads/master
addons/website_blog/tests/test_ui.py
34
import openerp.tests class TestUi(openerp.tests.HttpCase): def test_admin(self): self.phantom_js("/", "openerp.website.Tour.run('blog', 'test')", "openerp.website.Tour.tours.blog")
eeue56/PyGeo2
refs/heads/master
pygeo/tests/complex/test_AniPoints.py
1
from pygeo import * v=display(scale=5,camera_vector=[0,.1,-.1],delay=.5,trace_on=1) # CLASS being called """ pickable points constrained to complex plane at initial given x,y coords """ z1=zFreePoint(1,-3,color=BLACK) #Z_FreePostion z2=zFreeP...
sobercoder/gem5
refs/heads/master
ext/ply/test/yacc_notfunc.py
174
# ----------------------------------------------------------------------------- # yacc_notfunc.py # # p_rule not defined as a function # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc from calclex import...
ActiveState/code
refs/heads/master
recipes/Python/578675_PyQt4_pressed_modifier_keys_names_method/recipe-578675.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- from PyQt4.QtCore import Qt from PyQt4.QtGui import QApplication import functools modies = { 'shift': Qt.ShiftModifier, 'control': Qt.ControlModifier, 'alt': Qt.AltModifier, 'meta': Qt.MetaModifier } def check_modifiers(org_meth): """...
cloudera/ibis
refs/heads/master
ibis/config.py
1
"""Ibis configuration module.""" # This file has been adapted from pandas/core/config.py. pandas 3-clause BSD # license. See LICENSES/pandas # # Further modifications: # # Copyright 2014 Cloudera Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance wi...
swidbsk/freeopcua
refs/heads/master
tests/gtest/test/gtest_env_var_test.py
2408
#!/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...
hiway/micropython
refs/heads/master
tests/extmod/ticks_diff.py
37
from utime import ticks_diff, ticks_add MAX = ticks_add(0, -1) # Should be done like this to avoid small int overflow MODULO_HALF = MAX // 2 + 1 # Invariants: # if ticks_diff(a, b) = c, # then ticks_diff(b, a) = -c assert ticks_diff(1, 0) == 1, ticks_diff(1, 0) assert ticks_diff(0, 1) == -1 assert ticks_diff(0, MAX...
fosdick/weaver
refs/heads/master
filebin.py
1
with open("decimal-strings/sqrt5file.txt", "rb") as binary_file: st = binary_file.read() str = ' '.join(format(ord(x), 'b') for x in st) print(str)
Teino1978-Corp/pre-commit
refs/heads/master
testing/fixtures.py
4
from __future__ import absolute_import from __future__ import unicode_literals import io import os.path from aspy.yaml import ordered_dump import pre_commit.constants as C from pre_commit.clientlib.validate_config import CONFIG_JSON_SCHEMA from pre_commit.clientlib.validate_config import validate_config_extra from p...
soumide1102/pycbc
refs/heads/master
pycbc/io/inference_hdf.py
1
# Copyright (C) 2016 Christopher M. Biwer # 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 # self.option) any later version. # # This program is distr...
dcroc16/skunk_works
refs/heads/master
google_appengine/lib/django-1.5/tests/modeltests/get_or_create/models.py
53
""" 33. get_or_create() ``get_or_create()`` does what it says: it tries to look up an object with the given parameters. If an object isn't found, it creates one with the given parameters. """ from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compa...
blampe/M2M
refs/heads/master
Markdown-2.0/markdown/extensions/toc.py
17
""" Table of Contents Extension for Python-Markdown * * * (c) 2008 [Jack Miller](http://codezen.org) Dependencies: * [Markdown 2.0+](http://www.freewisdom.org/projects/python-markdown/) """ import markdown from markdown import etree import re class TocTreeprocessor(markdown.treeprocessors.Treeprocessor): # Iter...
sgubianpm/pygensa
refs/heads/master
sdaopt/benchmark/go_benchmark_functions/go_funcs_F.py
47
# -*- coding: utf-8 -*- from __future__ import division, print_function, absolute_import from .go_benchmark import Benchmark class FreudensteinRoth(Benchmark): r""" FreudensteinRoth objective function. This class defines the Freudenstein & Roth [1]_ global optimization problem. This is a multimodal...
weidongxu84/info-gatherer
refs/heads/master
django/contrib/comments/forms.py
92
import time from django import forms from django.forms.util import ErrorDict from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.contrib.comments.models import Comment from django.utils.crypto import salted_hmac, constant_time_compare from django.utils.encoding import...
akshayaurora/kivy
refs/heads/master
kivy/core/image/img_pil.py
5
''' PIL: PIL image loader ''' __all__ = ('ImageLoaderPIL', ) try: import Image as PILImage except ImportError: # for python3 from PIL import Image as PILImage from kivy.logger import Logger from kivy.core.image import ImageLoaderBase, ImageData, ImageLoader try: # Pillow PILImage.frombytes P...
ClearCorp-dev/odoo-costa-rica
refs/heads/8.0
TODO-7.0/l10n_cr_account_financial_statements/__init__.py
2
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
Brainiq7/Ananse
refs/heads/master
ananse_dl/extractor/spike.py
40
from __future__ import unicode_literals import re from .mtv import MTVServicesInfoExtractor class SpikeIE(MTVServicesInfoExtractor): _VALID_URL = r'''(?x)https?:// (www\.spike\.com/(video-clips|episodes)/.+| m\.spike\.com/videos/video.rbml\?id=(?P<mobile_id>[^&]+)) ''' _TEST = { ...
shazow/workerpool
refs/heads/master
samples/blockingworker.py
2
from workerpool import WorkerPool """ WARNING: This sample class is obsolete since version 0.9.2. It will be removed or replaced soon. """ class BlockingWorkerPool(WorkerPool): """ Similar to WorkerPool but a result queue is passed in along with each job and the method will block until the queue is fille...
rizar/attention-lvcsr
refs/heads/master
libs/Theano/theano/gof/graph.py
1
""" Node classes (`Apply`, `Variable`) and expression graph algorithms. To read about what theano graphs are from a user perspective, have a look at `graph.html <../doc/graph.html>`__. """ from __future__ import print_function from collections import deque from copy import copy from itertools import count import th...
jfmorcillo/mss
refs/heads/master
modules/davical/__init__.py
3
# -*- coding: UTF-8 -*- # # (c) 2012 Mandriva, http://www.mandriva.com/ # # This file is part of Mandriva Server Setup # # MSS 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, o...
lmazuel/azure-sdk-for-python
refs/heads/master
azure-mgmt-web/azure/mgmt/web/models/deployment.py
2
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
gspilio/nova
refs/heads/master
nova/virt/xenapi/vm_utils.py
2
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2012 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 ...
afandria/sky_engine
refs/heads/master
sky/tools/webkitpy/test/skip.py
174
# Copyright (C) 2010 Apple 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 conditions and the f...
ojii/sandlib
refs/heads/master
lib/lib-python/2.7/curses/ascii.py
396
"""Constants and membership tests for ASCII characters""" NUL = 0x00 # ^@ SOH = 0x01 # ^A STX = 0x02 # ^B ETX = 0x03 # ^C EOT = 0x04 # ^D ENQ = 0x05 # ^E ACK = 0x06 # ^F BEL = 0x07 # ^G BS = 0x08 # ^H TAB = 0x09 # ^I HT = 0x09 # ^I LF = 0x0a # ^J NL =...
yongshengwang/hue
refs/heads/master
build/env/lib/python2.7/site-packages/ipython-0.10-py2.7.egg/IPython/tests/test_magic.py
7
"""Tests for various magic functions. Needs to be run by nose (to make ipython session available). """ import os import sys import tempfile import types import nose.tools as nt from IPython.platutils import find_cmd, get_long_path_name from IPython.testing import decorators as dec from IPython.testing import tools ...
hujiajie/chromium-crosswalk
refs/heads/master
net/data/verify_certificate_chain_unittest/generate-unknown-root.py
16
#!/usr/bin/python # Copyright (c) 2015 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. """Certificate chain with 1 intermediary, but the root is not in trust store. Verification is expected to fail because the final interm...
codeofdusk/ProjectMagenta
refs/heads/master
doc/generator.py
1
# -*- coding: utf-8 -*- import markdown import os from codecs import open as _open import languageHandler languageHandler.setLanguage("en") import strings # the list of supported language codes of TW Blue languages = ["en", "es", "fr", "de", "it"] #"eu", "ar", "ca", "es", "fi", "fr", "gl", "hu", "it", "pl", "pt", "ru"...
sholtebeck/knarflog
refs/heads/master
lib/flask/logging.py
3
# -*- coding: utf-8 -*- """ flask.logging ~~~~~~~~~~~~~ :copyright: 2010 Pallets :license: BSD-3-Clause """ from __future__ import absolute_import import logging import sys import warnings from werkzeug.local import LocalProxy from .globals import request @LocalProxy def wsgi_errors_stream(): """Find the most...
sug4rok/Servus
refs/heads/master
Servus/plugins/system_ip_online/__init__.py
1054
# coding=utf-8
nojhan/weboob-devel
refs/heads/master
modules/kiwibank/module.py
4
# -*- coding: utf-8 -*- # Copyright(C) 2015 Cédric Félizard # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your op...
mmatyas/skia
refs/heads/master
bench/tile_analyze.py
198
#!/usr/bin/env python # Copyright (c) 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. """ Analyze per-tile and viewport bench data, and output visualized results. """ __author__ = 'bensong@google.com (Ben Chen)' imp...
trondeau/gnuradio-old
refs/heads/master
gr-utils/python/utils/plot_fft_base.py
53
#!/usr/bin/env python # # Copyright 2007,2008,2011 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your ...
kontais/EFI-MIPS
refs/heads/master
ToolKit/cmds/python/Lib/xmllib.py
160
"""A parser for XML, using the derived class as static DTD.""" # Author: Sjoerd Mullender. import re import string import warnings warnings.warn("The xmllib module is obsolete. Use xml.sax instead.", DeprecationWarning) del warnings version = '0.3' class Error(RuntimeError): pass # Regular expressions used f...
BEASTLICK-INTERNET-POLICY-COMMISSION/bipcoin
refs/heads/master
external/gtest/test/gtest_shuffle_test.py
3023
#!/usr/bin/env python # # Copyright 2009 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...
shft117/SteckerApp
refs/heads/master
erpnext/accounts/doctype/mode_of_payment/mode_of_payment.py
52
# 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 from frappe.model.document import Document class ModeofPayment(Document): pass
b0ttl3z/SickRage
refs/heads/master
sickbeard/clients/transmission_client.py
7
# coding=utf-8 # Author: Mr_Orange <mr_orange@hotmail.it> # URL: https://sickrage.github.io # # 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 ...
bgris/ODL_bgris
refs/heads/master
lib/python3.5/site-packages/numpy/distutils/fcompiler/none.py
229
from __future__ import division, absolute_import, print_function from numpy.distutils.fcompiler import FCompiler compilers = ['NoneFCompiler'] class NoneFCompiler(FCompiler): compiler_type = 'none' description = 'Fake Fortran compiler' executables = {'compiler_f77': None, 'compiler_f...