repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
kaiyuanheshang/zulip
refs/heads/master
zilencer/management/commands/print_initial_password.py
116
from __future__ import absolute_import from django.core.management.base import BaseCommand from zerver.lib.initial_password import initial_password from zerver.models import get_user_profile_by_email class Command(BaseCommand): help = "Print the initial password and API key for accounts as created by populate_db"...
darolt/ndnSIMQoS
refs/heads/master
src/create-module.py
17
#! /usr/bin/env python import sys from optparse import OptionParser import os WSCRIPT_TEMPLATE = '''# -*- Mode: python; py-indent-offset: 4; indent-tabs-mode: nil; coding: utf-8; -*- # def options(opt): # pass # def configure(conf): # conf.check_nonfatal(header_name='stdint.h', define_name='HAVE_STDINT_H') ...
40223137/2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/_sysconfigdata.py
731
build_time_vars={'HAVE_SYS_WAIT_H': 1, 'HAVE_UTIL_H': 0, 'HAVE_SYMLINKAT': 1, 'HAVE_LIBSENDFILE': 0, 'SRCDIRS': 'Parser Grammar Objects Python Modules Mac', 'SIZEOF_OFF_T': 8, 'BASECFLAGS': '-Wno-unused-result', 'HAVE_UTIME_H': 1, 'EXTRAMACHDEPPATH': '', 'HAVE_SYS_TIME_H': 1, 'CFLAGSFORSHARED': '-fPIC', 'HAVE_HYPOT': 1...
sclabs/sitestatus-nonrel
refs/heads/master
django/contrib/sitemaps/models.py
914
# This file intentionally left blank
jgcaaprom/android_external_chromium_org
refs/heads/cm-12.1
chrome/browser/PRESUBMIT.py
36
# 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. """Presubmit script for Chromium browser code. This script currently only checks HTML/CSS/JS files in resources/. See http://dev.chromium.org/developers/ho...
yawnosnorous/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/tkinter/_fix.py
51
import sys, os # Delay import _tkinter until we have set TCL_LIBRARY, # so that Tcl_FindExecutable has a chance to locate its # encoding directory. # Unfortunately, we cannot know the TCL_LIBRARY directory # if we don't know the tcl version, which we cannot find out # without import Tcl. Fortunately, Tcl will itself ...
cristiana214/cristianachavez214-cristianachavez
refs/heads/master
python/src/Lib/test/test_strptime.py
55
"""PyUnit testing against strptime""" import unittest import time import locale import re import sys from test import test_support from datetime import date as datetime_date import _strptime class getlang_Tests(unittest.TestCase): """Test _getlang""" def test_basic(self): self.failUnlessEqual(_strpti...
essamjoubori/girder
refs/heads/master
girder/models/setting.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################### # Copyright Kitware Inc. # # Licensed under the Apache License, Version 2.0 ( the "License" ); # you may not use this file except in compliance with the License. # You may obtain a copy of ...
yl565/statsmodels
refs/heads/master
statsmodels/nonparametric/tests/test_kde.py
29
import os import numpy.testing as npt from nose import SkipTest from nose.tools import raises import numpy as np from statsmodels.distributions.mixture_rvs import mixture_rvs from statsmodels.nonparametric.kde import KDEUnivariate as KDE import statsmodels.sandbox.nonparametric.kernels as kernels from scipy import stat...
kiyoto/statsmodels
refs/heads/master
statsmodels/iolib/api.py
33
from .foreign import StataReader, genfromdta, savetxt, StataWriter from .table import SimpleTable, csv2st from .smpickle import save_pickle, load_pickle
wujf/rethinkdb
refs/heads/next
test/rdb_workloads/stress_workloads/x_connect.py
50
#!/usr/bin/env python import sys, os, random sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common'))) import utils r = utils.import_python_driver() class Workload: def __init__(self, options): self.db = options["db"] self.table = options["table"] ...
zenodo/invenio
refs/heads/zenodo-master
invenio/legacy/websubmit/functions/Convert_RecXML_to_RecALEPH_DELETE.py
13
# This file is part of Invenio. # Copyright (C) 2008, 2009, 2010, 2011 CERN. # # Invenio is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later version...
Eveler/libs
refs/heads/splited_document_engine
__Python__/ufms_blanks/appy3/appy/pod/test/contexts/XhtmlComplex7.py
2
xhtmlInput = ''' <div class="document"> <p>Some <strong>bold</strong> and some <em>italic</em> text.</p> <p>A new paragraph.</p> <p>A list with three items:</p> <ul> <li>the first item</li> <li>another item</li> <li>the last item</li> </ul> <p>A last paragraph.</p> </div> '''
seanfisk/buzzword-bingo-server
refs/heads/master
django/contrib/localflavor/cz/cz_regions.py
514
""" Czech regions, translations get from http://www.crwflags.com/fotw/Flags/cz-re.html """ from django.utils.translation import ugettext_lazy as _ REGION_CHOICES = ( ('PR', _('Prague')), ('CE', _('Central Bohemian Region')), ('SO', _('South Bohemian Region')), ('PI', _('Pilsen Region')), ('CA', _(...
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/social/utils.py
47
import re import sys import unicodedata import collections import functools import logging import six import requests import social from requests.adapters import HTTPAdapter from requests.packages.urllib3.poolmanager import PoolManager from social.exceptions import AuthCanceled, AuthUnreachableProvider from social.p...
atsolakid/edx-platform
refs/heads/master
common/lib/xmodule/xmodule/conditional_module.py
97
"""Conditional module is the xmodule, which you can use for disabling some xmodules by conditions. """ import json import logging from lazy import lazy from lxml import etree from pkg_resources import resource_string from xmodule.x_module import XModule, STUDENT_VIEW from xmodule.seq_module import SequenceDescriptor ...
Sorsly/subtle
refs/heads/master
google-cloud-sdk/lib/third_party/google/protobuf/unittest_import_public_pb2.py
43
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: google/protobuf/unittest_import_public.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.proto...
xbmc/xbmc-rbp
refs/heads/master
tools/Linux/FEH.py
43
import os import sys import re AvailableOutputs = [] Output = None try: from qt import * AvailableOutputs.append("--error-output=Qt") except: pass try: import pygtk pygtk.require('2.0') import gtk AvailableOutputs.append("--error-output=GTK") except: pass try: import pygame imp...
zchking/odoo
refs/heads/8.0
addons/portal_sale/__openerp__.py
380
# -*- 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...
bealdav/OCB
refs/heads/patch-1
addons/website_event_sale/models/__init__.py
428
import product import website import sale_order
chienlieu2017/it_management
refs/heads/master
odoo/addons/report/__manifest__.py
20
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. { 'name': 'Report', 'category': 'Base', 'summary': 'Hidden', 'description': """ Report """, 'depends': ['base', 'web', 'base_setup'], 'data': [ 'data/report_paperformat_data.xml', ...
kashyap32/scrapy
refs/heads/master
scrapy/selector/__init__.py
183
""" Selectors """ from scrapy.selector.unified import * from scrapy.selector.lxmlsel import *
frappe/erpnext
refs/heads/develop
erpnext/patches/v13_0/make_non_standard_user_type.py
1
# Copyright (c) 2019, Frappe and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from six import iteritems from erpnext.setup.install import add_non_standard_user_types def execute(): doctype_dict = { 'projects': ['Timesheet'], 'payroll...
CoolCloud/taiga-back
refs/heads/master
tests/factories.py
8
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # Copyright (C) 2014 Anler Hernández <hello@anler.me> # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
donghwicha/playground-python-angular
refs/heads/master
virtualenvs/django-env/mybackend/mypage/models.py
10644
from django.db import models # Create your models here.
bharathelangovan/chipy.org
refs/heads/master
chipy_org/apps/about/models.py
10644
from django.db import models # Create your models here.
richard-willowit/sale-workflow
refs/heads/8.0
sale_product_set/tests/__init__.py
28
# -*- coding: utf-8 -*- from . import test_product_set
gluke77/rally
refs/heads/master
tests/unit/task/test_validation.py
3
# Copyright 2014: Mirantis 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 b...
tumb1er/django-celery-rpc
refs/heads/master
celery_rpc/app.py
3
from __future__ import absolute_import import os from django.conf import settings from .utils import create_celery_app os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'settings') rpc = create_celery_app() rpc.autodiscover_tasks(['celery_rpc']) rpc.autodiscover_tasks(lambda: settings.INSTALLED_APPS, ...
Rogentos/rogentos-anaconda
refs/heads/master
storage/devices.py
2
# devices.py # Device classes for anaconda's storage configuration module. # # Copyright (C) 2009 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) ...
DarrelHsu/cvsClient
refs/heads/master
third_party/logilab/common/fileutils.py
24
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
EDUlib/edx-platform
refs/heads/master
lms/djangoapps/ccx/tests/factories.py
4
""" Dummy factories for tests """ from factory import Sequence, SubFactory from factory.django import DjangoModelFactory from common.djangoapps.student.tests.factories import UserFactory from lms.djangoapps.ccx.models import CustomCourseForEdX # pylint: disable=missing-class-docstring class CcxFactory(DjangoModelF...
gdgellatly/OCB1
refs/heads/7.0
openerp/service/cron.py
57
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of...
larsks/blivet
refs/heads/master
blivet/arch.py
2
# # arch.py # # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2013 # Red Hat, Inc. All rights reserved. # # 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 ...
zeroblade1984/Cancro
refs/heads/master
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
cogmission/nupic
refs/heads/master
examples/prediction/experiments/inspect_test.py
50
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
balister/linux-omap-philip
refs/heads/e100-2.6.38
scripts/rt-tester/rt-tester.py
1094
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
hazmatzo/oppia
refs/heads/develop
core/controllers/admin_test.py
30
# Copyright 2014 The Oppia 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 applicable ...
coolbombom/CouchPotato
refs/heads/master
cherrypy/lib/auth_digest.py
101
# This file is part of CherryPy <http://www.cherrypy.org/> # -*- coding: utf-8 -*- # vim:ts=4:sw=4:expandtab:fileencoding=utf-8 __doc__ = """An implementation of the server-side of HTTP Digest Access Authentication, which is described in :rfc:`2617`. Example usage, using the built-in get_ha1_dict_plain function which...
bradh/openchange
refs/heads/master
script/bug-analysis/buganalysis/mail.py
7
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) Enrique J. Hernández 2014 # 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 l...
timsloan/prometeo-erp
refs/heads/master
sales/signals.py
3
#!/usr/bin/env python # -*- coding: utf-8 -*- """This file is part of the prometeo project. 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, either version 3 of the License, or (at your option...
edx-solutions/edx-platform
refs/heads/master
lms/djangoapps/instructor/tests/test_enrollment_store_provider.py
4
""" Exercises tests on the base_store_provider file """ from django.test import TestCase from lms.djangoapps.instructor.enrollment_report import AbstractEnrollmentReportProvider from lms.djangoapps.instructor.paidcourse_enrollment_report import PaidCourseEnrollmentReportProvider class BadImplementationAbstractEnro...
InakiZabala/odoomrp-wip
refs/heads/8.0
mrp_subcontracting/models/mrp_production.py
1
# -*- 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...
bjwbell/servo
refs/heads/master
tests/wpt/harness/wptrunner/__init__.py
1447
# 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/.
mcltn/ansible-modules-extras
refs/heads/devel
network/f5/bigip_gtm_datacenter.py
23
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2016 F5 Networks Inc. # # 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 # ...
alxgu/ansible
refs/heads/devel
lib/ansible/modules/network/avi/avi_virtualservice.py
29
#!/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...
perovic/root
refs/heads/master
tutorials/pyroot/graph.py
10
# # To see the output of this macro, click begin_html <a href="gif/graph.gif">here</a>. end_html # from ROOT import TCanvas, TGraph from ROOT import gROOT from math import sin from array import array c1 = TCanvas( 'c1', 'A Simple Graph Example', 200, 10, 700, 500 ) c1.SetFillColor( 42 ) c1.SetGrid() n = 20 x, y = ...
evertonstz/py-auto-brightness
refs/heads/master
setup.py
1
from setuptools import setup from pyautobrightness import __version__ setup( name='pyautobrightness', version=__version__, author='Everton Correia', author_email='evertonjcorreia@gmail.com', packages=['pyautobrightness'], keywords=['Brightness', 'Auto', 'Webcam'], url='https://github.com/ev...
gregvonkuster/bioconda-recipes
refs/heads/master
recipes/pymot/setup.py
57
#!/usr/bin/python from setuptools import setup, find_packages from os import listdir pyfiles = [f.replace('.py', '') for f in listdir('.') if f.endswith('.py')] setup(name='PyMOT', version='13.09.2016', description='The Multiple Object Tracking (MOT) metrics "multiple object tracking precision" (MOTP) and "multiple o...
osvt/patron_rest
refs/heads/master
patron_app/views.py
1
# coding=utf-8 from django.shortcuts import render # Create your views here. from django.http import HttpResponse import json import os import shutil import uuid import time # patron_dir = "C:/etc/patron" patron_dir = os.path.dirname(os.path.abspath(__file__)) + "/../etc/patron" command_dir = os.path.dirname(os.pat...
mpillar/codeeval
refs/heads/master
2-hard/grid-walk/main.py
1
import collections def sum_digits(n): s = 0 while n: s += n % 10 n /= 10 return s def can_visit(p): value = sum_digits(abs(p[0])) + sum_digits(abs(p[1])) return value <= 19 def is_visited(p, visited): return p in visited def neighbors(p): x, y = p return [(x+1, y), (x...
campbe13/openhatch
refs/heads/master
vendor/packages/Django/tests/modeltests/m2m_signals/tests.py
150
""" Testing signals emitted on changing m2m relations. """ from .models import Person from django.db import models from django.test import TestCase from .models import Part, Car, SportsCar, Person class ManyToManySignalsTest(TestCase): def m2m_changed_signal_receiver(self, signal, sender, **kwargs): me...
errordeveloper/fe-devel
refs/heads/ver-1.1.0-alpha
Native/Test/Python/all-operator-parameters.py
3
# # Copyright 2010-2012 Fabric Engine Inc. All rights reserved. # import fabric fabricClient = fabric.createClient() for i in range( 1, 32 ): klCode = "operator foo( " for j in range( 0, i ): if j > 0: klCode += ", " klCode += "io Integer v" + str(j) klCode += " ) { " for j in range( 0, i ): klCo...
Idematica/django-oscar
refs/heads/master
oscar/apps/shipping/migrations/0005_auto.py
22
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): depends_on = ( ('address', '0001_initial'), ) def forwards(self, orm): # Adding M2M table for field countries on 'OrderAndIt...
MillerDix/NEChromeX
refs/heads/master
flaskTest/venv/lib/python2.7/site-packages/wheel/test/test_basic.py
472
""" Basic wheel tests. """ import os import pkg_resources import json import sys from pkg_resources import resource_filename import wheel.util import wheel.tool from wheel import egg2wheel from wheel.install import WheelFile from zipfile import ZipFile from shutil import rmtree test_distributions = ("complex-dist"...
cyx1231st/nova
refs/heads/eventually-consistent-host-state-mitaka
nova/db/sqlalchemy/migrate_repo/versions/254_add_request_id_in_pci_devices.py
81
# Copyright (c) 2014 Cisco Systems, 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 r...
aamalev/aioworkers
refs/heads/master
tests/test_http.py
2
import pytest import yarl from aioworkers.http import _URL as URL def test_repr(): url = URL('/api/') assert repr(url) == "URL('/api/')" def test_div_err(): url = URL('/api/') with pytest.raises(TypeError): assert url / 1 @pytest.mark.parametrize('a', [ '/api/', '/api', '/api/...
amith01994/intellij-community
refs/heads/master
python/testData/paramInfo/TupleAndNamedArg1.py
83
def f(a, b, c): pass f(<arg_c>c=1, *(10, <arg_star>20))
benhammadiali/ISETK
refs/heads/master
vendor/doctrine/orm/docs/en/_exts/configurationblock.py
2577
#Copyright (c) 2010 Fabien Potencier # #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, distrib...
npiganeau/odoo
refs/heads/master
addons/auth_openid/utils.py
428
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General P...
AustinRoy7/Pomodoro-timer
refs/heads/master
venv/Lib/site-packages/pip/_vendor/html5lib/filters/optionaltags.py
1727
from __future__ import absolute_import, division, unicode_literals from . import _base class Filter(_base.Filter): def slider(self): previous1 = previous2 = None for token in self.source: if previous1 is not None: yield previous2, previous1, token previous2...
halvertoluke/edx-platform
refs/heads/default_branch
common/djangoapps/util/testing.py
21
""" Utility Mixins for unit tests """ import json import sys from mock import patch from django.conf import settings from django.core.urlresolvers import clear_url_caches, resolve from django.test import TestCase from util.db import OuterAtomic, CommitOnSuccessManager class UrlResetMixin(object): """Mixin to ...
NaturalGIS/QGIS
refs/heads/master
tests/src/python/test_db_manager_spatialite.py
15
# -*- coding: utf-8 -*- """QGIS Unit tests for the DBManager SPATIALITE plugin .. note:: 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...
javiplx/cobbler-devel
refs/heads/cobbler-debian
cobbler/item_distro.py
3
""" A cobbler distribution. A distribution is a kernel, and initrd, and potentially some kernel options. Copyright 2006-2008, Red Hat, Inc Michael DeHaan <mdehaan@redhat.com> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the ...
AMeng/django-single-model-admin
refs/heads/master
test/app/models.py
1
from django.db import models class TestModel(models.Model): field = models.CharField(max_length=25)
mignev/startappsync
refs/heads/master
gitconfig/file.py
1
# -*- coding: utf-8 -*- # file.py -- Safe access to git files # Copyright (C) 2010 Google, Inc. # # 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; version 2 # of the License or (at your option) a...
julien78910/CouchPotatoServer
refs/heads/develop
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/ku6.py
147
from __future__ import unicode_literals from .common import InfoExtractor class Ku6IE(InfoExtractor): _VALID_URL = r'http://v\.ku6\.com/show/(?P<id>[a-zA-Z0-9\-\_]+)(?:\.)*html' _TEST = { 'url': 'http://v.ku6.com/show/JG-8yS14xzBr4bCn1pu0xw...html', 'md5': '01203549b9efbb45f4b87d55bdea1ed1', ...
ahmadRagheb/goldenHR
refs/heads/master
erpnext/selling/doctype/sales_order/test_sales_order.py
6
# 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.utils import flt, add_days import frappe.permissions import unittest from erpnext.stock.doctype.item.test_item import get_total...
shipEZ/flaskApp
refs/heads/master
lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/response.py
515
from __future__ import absolute_import from ..packages.six.moves import http_client as httplib from ..exceptions import HeaderParsingError def is_fp_closed(obj): """ Checks whether a given file-like object is closed. :param obj: The file-like object to check. """ try: # Check vi...
terbolous/SickRage
refs/heads/master
lib/unidecode/x065.py
252
data = ( 'Pan ', # 0x00 'Yang ', # 0x01 'Lei ', # 0x02 'Sa ', # 0x03 'Shu ', # 0x04 'Zan ', # 0x05 'Nian ', # 0x06 'Xian ', # 0x07 'Jun ', # 0x08 'Huo ', # 0x09 'Li ', # 0x0a 'La ', # 0x0b 'Han ', # 0x0c 'Ying ', # 0x0d 'Lu ', # 0x0e 'Long ', # 0x0f 'Qian ', # 0x10 'Qi...
levlaz/circleci.py
refs/heads/master
circleci/version.py
1
""" circleci.version ~~~~~~~~~~~~~~~~ This module provides some helper functions to set version in various places. .. versionadded:: 1.2.0 """ VERSION = "2.0.0" """Current version of circleci.py.""" def get_short_version(): """ Format "short" version in the form of X.Y :returns: short version ...
fxfitz/ansible
refs/heads/devel
lib/ansible/modules/windows/win_stat.py
24
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # this is a windows documentation stub. actual code lives in the .ps1 # file of the same name ANSIBLE_METADATA = {'metadata_version': '1.1', ...
SCgeeker/OpenSesame
refs/heads/master
plugins/joystick/_libjoystick/basejoystick.py
3
#-*- coding:utf-8 -*- """ This file is part of OpenSesame. OpenSesame 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. OpenSesame is distri...
huongttlan/statsmodels
refs/heads/master
statsmodels/examples/ex_arch_canada.py
34
# -*- coding: utf-8 -*- """ Created on Sat Dec 24 07:31:47 2011 Author: Josef Perktold """ from __future__ import print_function import numpy as np import statsmodels.sandbox.stats.diagnostic as dia canada_raw = '''\ 405.36646642737 929.610513893698 7.52999999999884 386.136109062605 404.6398339...
kalxas/geonode
refs/heads/master
geonode/br/tests/__init__.py
6
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2020 OSGeo # # 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 ...
rohitw1991/smartfrappe
refs/heads/develop
frappe/boot.py
31
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals """ bootstrap client session """ import frappe import frappe.defaults import frappe.widgets.page from frappe.utils import get_gravatar def get_bootinfo(): """build and retur...
signed/intellij-community
refs/heads/master
python/testData/inspections/PyProtectedMemberInspection/trueNegative.py
83
__author__ = 'ktisha' class A: def __init__(self): self._a = 1 def foo(self): self.b= 1 class B(A): def __init__(self): A.__init__(self) self.b = self._a
asreimer/lmfit2
refs/heads/master
python/dmap.py
1
import os import struct import time import gc import numpy as np import sys DMAP = 0 CHAR = 1 SHORT = 2 INT = 3 FLOAT = 4 DOUBLE = 8 STRING = 9 LONG = 10 UCHAR = 16 USHORT = 17 UINT = 18 ULONG = 19 DMAP_DATA_KEYS=[0,1,2,3,4,8,9,10,16,17,18,19] LOGGING = False class EmptyFileError(Exception): """Raised if the dm...
Secheron/compassion-modules
refs/heads/master
sponsorship_tracking/model/__init__.py
2
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2015 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: David Coninckx <david@coninckx.com> # # The licence is in the file __ope...
marcel-dancak/QGIS
refs/heads/master
python/plugins/processing/tests/Grass7AlgorithmsImageryTest.py
12
# -*- coding: utf-8 -*- """ *************************************************************************** Grass7AlgorithmsImageryTest.py ------------------------------ Date : May 2016 Copyright : (C) 2016 by Médéric Ribreux Email : mederic dot ribreux at meds...
EmreAtes/spack
refs/heads/develop
var/spack/repos/builtin/packages/argp-standalone/package.py
5
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
johnttaylor/Outcast
refs/heads/master
templates/top/tools/test.py
1
#!/usr/bin/env python3 """ Package specific script that 'tests' the package content as part of the publish process. Usage: test <pkgroot> Returns: If all of the test(s) are succesful, then the script returns '0'; else a non-zero value is returned. """ import sys import os import subprocess #----------...
rizumu/django
refs/heads/master
tests/gis_tests/gis_migrations/test_commands.py
276
from __future__ import unicode_literals from django.core.management import call_command from django.db import connection from django.test import TransactionTestCase, skipUnlessDBFeature @skipUnlessDBFeature("gis_enabled") class MigrateTests(TransactionTestCase): """ Tests running the migrate command in Geodj...
Filechaser/sickbeard_mp4_automator
refs/heads/master
autoprocess/autoProcessTV.py
3
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 Lice...
morreene/tradenews
refs/heads/master
venv/Lib/site-packages/cffi/backend_ctypes.py
14
import ctypes, ctypes.util, operator, sys from . import model if sys.version_info < (3,): bytechr = chr else: unicode = str long = int xrange = range bytechr = lambda num: bytes([num]) class CTypesType(type): pass class CTypesData(object): __metaclass__ = CTypesType __slots__ = ['__we...
Soya93/Extract-Refactoring
refs/heads/master
python/lib/Lib/distutils/command/bdist.py
81
"""distutils.command.bdist Implements the Distutils 'bdist' command (create a built [binary] distribution).""" # This module should be kept compatible with Python 2.1. __revision__ = "$Id: bdist.py 37828 2004-11-10 22:23:15Z loewis $" import os, string from types import * from distutils.core import Command from dis...
jessstrap/servotk
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/src/example/abort_wsh.py
465
# Copyright 2012, 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...
75651/kbengine_cloud
refs/heads/master
kbe/src/lib/python/Lib/test/test_complex.py
72
import unittest from test import support from random import random from math import atan2, isnan, copysign import operator INF = float("inf") NAN = float("nan") # These tests ensure that complex math does the right thing class ComplexTest(unittest.TestCase): def assertAlmostEqual(self, a, b): if isinsta...
ycsoft/FatCat-Server
refs/heads/master
LIBS/boost_1_58_0/libs/python/test/pointer_vector.py
12
# Copyright Joel de Guzman 2004. Distributed under the Boost # Software License, Version 1.0. (See accompanying # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) ''' >>> import pointer_vector_ext >>> d = pointer_vector_ext.DoesSomething() >>> lst = d.returnList() >>> lst[0].f(); 'harru' ...
petrjasek/superdesk-core
refs/heads/master
tests/templates/filters_test.py
2
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014, 2015 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license from f...
KEHANG/RMG-Py
refs/heads/master
rmgpy/display.py
11
#!/usr/bin/env python # encoding: utf-8 ################################################################################ # # RMG - Reaction Mechanism Generator # # Copyright (c) 2012 by the RMG Team (rmg_dev@mit.edu) # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this sof...
Clemson-DPA/dpa-pipe
refs/heads/master
dpa/ui/maya/export.py
1
from PySide import QtGui, QtCore # -----------------------------------------------------------------------------
smalley/cfapi
refs/heads/master
test/harness.py
3
import unittest from app import app, db class IntegrationTest(unittest.TestCase): def setUp(self): # Set up the database settings # app.config['SQLALCHEMY_DATABASE_URI'] = 'postgres://postgres@localhost/civic_json_worker_test' app.config['SQLALCHEMY_DATABASE_URI'] = 'postgres:///civic_json...
michaelhuang/QuantSoftwareToolkit
refs/heads/master
Legacy/Legacy/pseries.py
5
''' Created on Oct 7, 2010 @author: Tucker Balch @contact: tucker@cc.@gatech.edu ''' import os import pandas as pandas from qstkutil import DataAccess as da from qstkutil import timeutil as tu __version__ = "$Revision: 156 $" def getDataMatrixFromData(dataname,partname,symbols,tsstart,tsend): pathpr...
cleverhans-lab/cleverhans
refs/heads/master
cleverhans_v3.1.0/tests_tf/test_utils.py
1
# pylint: disable=missing-docstring from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest import numpy as np from cleverhans import utils from cleverhans.utils_keras import cnn_model from cleverhans.utils_ke...
andreparames/odoo
refs/heads/8.0
addons/point_of_sale/wizard/pos_session_opening.py
337
from openerp.osv import osv, fields from openerp.tools.translate import _ from openerp.addons.point_of_sale.point_of_sale import pos_session class pos_session_opening(osv.osv_memory): _name = 'pos.session.opening' _columns = { 'pos_config_id' : fields.many2one('pos.config', 'Point of Sale', require...
leafclick/intellij-community
refs/heads/master
python/testData/inspections/AddCallSuperSelfNamePreserved.py
77
class A: def __init__(self, x): self.x = x class B(A): def <warning descr="Call to __init__ of super class is missed">__init_<caret>_</warning>(this, y): this.y = y
andreimacavei/coala
refs/heads/master
coalib/tests/bears/GlobalBearTest.py
3
import sys sys.path.insert(0, ".") import unittest from coalib.settings.Section import Section from coalib.bears.GlobalBear import GlobalBear, BEAR_KIND class GlobalBearTest(unittest.TestCase): def test_api(self): test_object = GlobalBear(0, Section("name"), None) self.assertRaises(NotImplemented...
siconos/siconos-deb
refs/heads/ubuntu/xenial
examples/Mechanics/ImpactingBar/tools.py
1
import numpy as np import cmath pi = cmath.pi def computeBigH(H,Nfft): ## x = cmath.exp(2*1j*pi/Nfft)*np.ones((Nfft),dtype='complex64') ## sfft = (np.vander(x,Nfft)).T ## sfft = np.vander(sfft[:,0],Nfft) ## print sfft ## print sfft.shape bigH = np.zeros(np.asarray(H.shape)*Nfft,dtype='c...
lucc/alot
refs/heads/master
tests/db/manager_test.py
1
# Copyright (C) 2018 Patrick Totzke # This file is released under the GNU GPL, version 3 or a later revision. # For further details see the COPYING file """Test suite for alot.db.manager module.""" import tempfile import textwrap import os import shutil from alot.db.manager import DBManager from alot.settings.const ...