repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
jalilm/ryu
refs/heads/master
ryu/contrib/ncclient/operations/errors.py
93
# Copyright 2009 Shikhar Bhushan # # 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 writin...
Matt-Deacalion/django
refs/heads/master
tests/migrations/deprecated_field_migrations/0002_remove_ipaddressfield_ip.py
371
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('migrations', '0001_initial'), ] operations = [ migrations.RemoveField( model_name='ipaddressfield', name='ip...
Zlash65/erpnext
refs/heads/develop
erpnext/patches/v4_2/discount_amount.py
120
# 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.modules import scrub, get_doctype_module def execute(): for dt in ["Quotation", "Sales Order", "Delivery Note", "Sales Invoi...
bwrsandman/GitPython
refs/heads/master
git/test/test_blob.py
20
# test_blob.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php from git.test.lib import ( TestBase, assert_equal ) from git import Blob class TestBlob(...
siosio/intellij-community
refs/heads/master
python/testData/debug/test_pandas_repeating_column_names.py
13
import pandas as pd a = pd.DataFrame([i for i in range(10)]) b = pd.Series([i for i in range(10)]) c = pd.concat((a, b), axis=1) c.columns = ['A', 'A'] print(c.head())
endlessm/chromium-browser
refs/heads/master
third_party/pdfium/testing/tools/safetynet_image.py
3
# Copyright 2017 The PDFium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Compares pairs of page images and generates an HTML to look at differences. """ import functools import glob import multiprocessing import os import re impo...
johnkit/vtk-dev
refs/heads/master
ThirdParty/Twisted/twisted/protocols/test/test_tls.py
35
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.protocols.tls}. """ from __future__ import division, absolute_import from zope.interface.verify import verifyObject from zope.interface import Interface, directlyProvides from twisted.python.compat import intToBytes, ite...
devops2014/djangosite
refs/heads/master
tests/postgres_tests/test_unaccent.py
14
# -*- coding: utf-8 -*- from __future__ import unicode_literals import unittest from django.db import connection from django.test import TestCase, modify_settings from .models import CharFieldModel, TextFieldModel @unittest.skipUnless(connection.vendor == 'postgresql', 'PostgreSQL required') @modify_settings(INSTA...
zstackorg/zstack-woodpecker
refs/heads/master
integrationtest/vm/simulator/iam2/test_iam2_admin_login.py
1
''' test iam2 login by admin # 1 create role and add/remove policy # 2 create project and add/remove attributes to/from it # 3 create project template from project # 4 create project template and then create project from template # 5 create Company and Department (organization) # 6 organization change parent # ...
ostree/plaso
refs/heads/master
plaso/formatters/mediator.py
3
# -*- coding: utf-8 -*- """The formatter mediator object.""" import os from plaso.formatters import winevt_rc from plaso.winnt import language_ids class FormatterMediator(object): """Class that implements the formatter mediator.""" DEFAULT_LANGUAGE_IDENTIFIER = u'en-US' # TODO: add smarter language ID to LCI...
biji/yowsup
refs/heads/master
yowsup/layers/protocol_chatstate/protocolentities/chatstate_incoming.py
70
from .chatstate import ChatstateProtocolEntity class IncomingChatstateProtocolEntity(ChatstateProtocolEntity): ''' INCOMING <chatstate from="xxxxxxxxxxx@s.whatsapp.net"> <{{composing|paused}}></{{composing|paused}}> </chatstate> OUTGOING <chatstate to="xxxxxxxxxxx@s.whatsapp.net"> <{{...
tomholub/tooth
refs/heads/master
tooth/chance.py
1
__author__ = 'Tom James Holub' import random def percent(n): return random.randrange(100) < n
vedujoshi/os_tempest
refs/heads/master
tempest/manager.py
4
# Copyright 2012 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/licenses/LICENSE-2.0 # # Unless requ...
mvesper/invenio
refs/heads/master
modules/bibclassify/lib/bibclassify_webinterface.py
21
# This file is part of Invenio. # Copyright (C) 2008, 2009, 2010, 2011, 2013 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 v...
harayz/raspberry_pwn
refs/heads/master
src/pentest/fasttrack/bin/exploits/firefox35.py
16
#!/usr/bin/env python ###################################################### # # FireFox 3.5 Heap Spray (WIN, OSX, LINUX) # LINUX = Cause Crash # Smart Detection on Browser + OS # Originally discovered by: Simon Berry-Bryne # Pythonized by: David Kennedy (ReL1K) @ SecureState # #########################################...
js0701/chromium-crosswalk
refs/heads/master
third_party/closure_linter/closure_linter/javascriptlintrules.py
83
#!/usr/bin/env python # Copyright 2011 The Closure Linter 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 # #...
pataquets/namecoin-core
refs/heads/master
test/functional/test_framework/muhash.py
9
# Copyright (c) 2020 Pieter Wuille # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Native Python MuHash3072 implementation.""" import hashlib import unittest from .util import modinv def rot32(v, bits): """Rotate the 32-b...
protatremy/buildbot
refs/heads/master
master/buildbot/steps/source/mtn.py
5
# This file is part of Buildbot. Buildbot 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. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
robertmattmueller/sdac-compiler
refs/heads/master
sympy/physics/quantum/piab.py
124
"""1D quantum particle in a box.""" from __future__ import print_function, division from sympy import Symbol, pi, sqrt, sin, Interval, S from sympy.physics.quantum.operator import HermitianOperator from sympy.physics.quantum.state import Ket, Bra from sympy.physics.quantum.constants import hbar from sympy.functions....
jonathansick/androcmd
refs/heads/master
scripts/starfish_magphys/plot_magphys_phat_patches.py
1
#!/usr/bin/env python # encoding: utf-8 """ Plot MAGPHYS estimates of PHAT fields. 2015-07-16 - Created by Jonathan Sick """ import argparse import os import numpy as np import h5py import matplotlib as mpl from matplotlib.figure import Figure from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanv...
msarahan/bokeh
refs/heads/master
examples/plotting/file/boxplot.py
4
import numpy as np import pandas as pd from bokeh.plotting import figure, show, output_file # generate some synthetic time series for six different categories cats = list("abcdef") yy = np.random.randn(2000) g = np.random.choice(cats, 2000) for i, l in enumerate(cats): yy[g == l] += i // 2 df = pd.DataFrame(dict...
harisibrahimkv/django
refs/heads/master
tests/gis_tests/geoapp/test_regress.py
21
from datetime import datetime from django.contrib.gis.db.models import Extent from django.contrib.gis.shortcuts import render_to_kmz from django.db.models import Count, Min from django.test import TestCase, skipUnlessDBFeature from ..utils import no_oracle from .models import City, PennsylvaniaCity, State, Truth @s...
sdcooke/django
refs/heads/master
tests/urls.py
341
"""This urlconf exists because Django expects ROOT_URLCONF to exist. URLs should be added within the test folders, and use TestCase.urls to set them. This helps the tests remain isolated. """ urlpatterns = []
mtury/scapy
refs/heads/master
scapy/contrib/automotive/obd/iid/iids.py
2
# This file is part of Scapy # See http://www.secdev.org/projects/scapy for more information # Copyright (C) Andreas Korb <andreas.d.korb@gmail.com> # Copyright (C) Nils Weiss <nils@we155.de> # This program is published under a GPLv2 license # scapy.contrib.status = skip from scapy.fields import FieldLenField, FieldL...
UniversityRadioYork/lass-pyramid
refs/heads/master
teams/views.py
1
"""Views for the Teams submodule of the URY website. --- Copyright (c) 2013, University Radio York. 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 abo...
diorcety/intellij-community
refs/heads/master
python/testData/paramInfo/IgnoreNewInOldStyleClass.py
83
# makes sense for python 2.x class A: def __init__(self, one): pass class B(A): def __new__(cls, one, two): pass b = B(<arg1>"only_one")
FRBs/FRB
refs/heads/180301
frb/tests/test_offset.py
1
import os, sys from pkg_resources import resource_filename import pandas import numpy as np from astropy import units from astropy.table import Table from astropy.io import fits from astropy.coordinates import SkyCoord from astropy.cosmology import Planck15 as cosmo from frb.frb import FRB, build_table_of_frbs from ...
ezigman/pjsip-upstream
refs/heads/master
tests/automated/configure.py
93
#!/usr/bin/python import optparse import os import platform import socket import subprocess import sys PROG = "r" + "$Rev: 17 $".strip("$ ").replace("Rev: ", "") PYTHON = os.path.basename(sys.executable) build_type = "" vs_target = "" s60_target = "" no_test = False no_pjsua_test = False # # Get gcc version # def gc...
PXke/invenio
refs/heads/dev-pu
invenio/legacy/bibdocfile/webinterface.py
1
## This file is part of Invenio. ## Copyright (C) 2012, 2013 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. ## ...
bast/gitink
refs/heads/master
gitink/test.py
1
import os from .main import main def test_main(): generate_references = os.getenv('GENERATE_REFERENCES', False) _this_path = os.path.dirname(os.path.realpath(__file__)) for (in_file, time_direction) in [('right', 90), ('up', 0), ...
gdgellatly/OCB1
refs/heads/7.0
addons/account_followup/wizard/account_followup_print.py
17
# -*- 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...
jslhs/androguard
refs/heads/master
androcsign.py
23
#!/usr/bin/env python # This file is part of Androguard. # # Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr> # All rights reserved. # # Androguard 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,...
piotrek-golda/CivilHubCopy
refs/heads/master
activities/models.py
3
# -*- coding: utf-8 -*- import datetime from django.utils import timezone from actstream.models import Action def user_email_stream(user): """ Used in stream email message. """ time_diff = timezone.now() - datetime.timedelta(days=7) return Action.objects.mystream(user).filter(timestamp__gt=time_diff...
camilonova/django
refs/heads/master
tests/view_tests/templatetags/debugtags.py
130
from django import template register = template.Library() @register.simple_tag def go_boom(): raise Exception('boom')
simon-pepin/scikit-learn
refs/heads/master
sklearn/utils/tests/test_extmath.py
130
# Authors: Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Denis Engemann <d.engemann@fz-juelich.de> # # License: BSD 3 clause import numpy as np from scipy import sparse from scipy import linalg from scipy import stats from sklearn.utils.testing import assert_eq...
dslomov/intellij-community
refs/heads/master
python/testData/inspections/AddClass_after.py
83
class Xyzzy(object): pass class XyzzyTest: def testSimple(self): c = Xyzzy()
Alberto-Beralix/Beralix
refs/heads/master
i386-squashfs-root/usr/lib/python2.6/dist-packages/PIL/GimpPaletteFile.py
2
../../../../share/pyshared/PIL/GimpPaletteFile.py
vFense/vFenseAgent-nix
refs/heads/development
agent/deps/rpm/Python-2.7.5/lib/python2.7/test/test_deque.py
61
from collections import deque import unittest from test import test_support, seq_tests import gc import weakref import copy import cPickle as pickle import random import struct BIG = 100000 def fail(): raise SyntaxError yield 1 class BadCmp: def __eq__(self, other): raise RuntimeError class Muta...
cjh1/AutobahnPython
refs/heads/master
examples/wamp/rpc/simple/example2/server.py
27
############################################################################### ## ## Copyright 2011,2012 Tavendo GmbH ## ## 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:...
semonte/intellij-community
refs/heads/master
python/testData/codeInsight/liveTemplates/expanding/IterableVariableFromImplicitImports/a_after.py
31
from m import * { for in }
kageiit/buck
refs/heads/master
python-dsl/buck_parser/buck.py
2
# Copyright (c) Facebook, Inc. and its affiliates. # # 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 ...
maxamillion/openshift-ansible
refs/heads/master
roles/openshift_health_checker/openshift_checks/logging/elasticsearch.py
45
"""Check for an aggregated logging Elasticsearch deployment""" import json import re from openshift_checks import OpenShiftCheckException, OpenShiftCheckExceptionList from openshift_checks.logging.logging import LoggingCheck class Elasticsearch(LoggingCheck): """Check for an aggregated logging Elasticsearch dep...
eugene1g/phantomjs
refs/heads/master
src/breakpad/src/tools/gyp/pylib/gyp/MSVSVersion.py
137
#!/usr/bin/python # Copyright (c) 2009 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Handle version information related to Visual Stuio.""" import os import re import subprocess import sys class VisualStudioVersion: """In...
otherness-space/myProject003
refs/heads/master
my_project_003/lib/python2.7/site-packages/django/core/management/commands/sqlsequencereset.py
242
from __future__ import unicode_literals from optparse import make_option from django.core.management.base import AppCommand from django.db import connections, models, DEFAULT_DB_ALIAS class Command(AppCommand): help = 'Prints the SQL statements for resetting sequences for the given app name(s).' option_list...
linvictor88/vse-lbaas-driver
refs/heads/master
quantum/openstack/common/notifier/rabbit_notifier.py
9
# Copyright 2012 Red Hat, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
cybernet14/scikit-learn
refs/heads/master
examples/svm/plot_separating_hyperplane.py
294
""" ========================================= SVM: Maximum margin separating hyperplane ========================================= Plot the maximum margin separating hyperplane within a two-class separable dataset using a Support Vector Machine classifier with linear kernel. """ print(__doc__) import numpy as np impor...
mdhaber/scipy
refs/heads/master
scipy/special/_basic.py
4
# # Author: Travis Oliphant, 2002 # import operator import numpy as np import math from numpy import (pi, asarray, floor, isscalar, iscomplex, real, imag, sqrt, where, mgrid, sin, place, issubdtype, extract, inexact, nan, zeros, sinc) from . import _ufuncs as ufuncs from ._ufuncs...
ericchaves/faker
refs/heads/master
faker/providers/address/pt_PT/__init__.py
19
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as AddressProvider class Provider(AddressProvider): street_prefixes = ('Av', 'Avenida', 'R.', 'Rua', 'Travessa', 'Largo') city_formats = ('{{city_name}}',) street_name_formats = ( '{{street_prefix}} {{last_name}}', ...
OscarBC/romcollectionbrowser
refs/heads/master
resources/lib/dialogcontextmenu.py
10
import xbmc, xbmcgui, xbmcaddon import util, nfowriter, wizardconfigxml, helper import dialogeditromcollection, dialogeditscraper, dialogdeleteromcollection, config from nfowriter import * from gamedatabase import * from util import * from config import * ACTION_CANCEL_DIALOG = (9,10,51,92,110) CONTROL_BU...
40223119/-2015cd_midterm
refs/heads/master
static/Brython3.1.0-20150301-090019/Lib/formatter.py
751
"""Generic output formatting. Formatter objects transform an abstract flow of formatting events into specific output events on writer objects. Formatters manage several stack structures to allow various properties of a writer object to be changed and restored; writers need not be able to handle relative changes nor an...
shadghost/Auto-Backdoor
refs/heads/master
the-backdoor-factory/intel/LinuxIntelELF64.py
2
''' Copyright (c) 2013-2015, Joshua Pitts 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 t...
systers/mailman
refs/heads/master
src/mailman/handlers/subject_prefix.py
8
# Copyright (C) 2014-2015 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 you...
sauloal/cnidaria
refs/heads/master
scripts/venv/lib/python2.7/site-packages/numpy/ma/tests/test_core.py
23
# pylint: disable-msg=W0401,W0511,W0611,W0612,W0614,R0201,E1102 """Tests suite for MaskedArray & subclassing. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu """ from __future__ import division, absolute_import, print_function __author__ = "Pierre GF Gerard-Marchant" import warnings import sys impo...
LinkageIO/LocusPocus
refs/heads/master
locuspocus/locus/__init__.py
1
#!/usr/bin/python3 import math import hashlib import numpy as np from typing import Any, Optional from ..exceptions import StrandError, ChromosomeError, MissingLocusError from .subloci import SubLoci from .attrs import LocusAttrs __all__ = ["Locus"] class Locus: def __init__( self, chromos...
CuonDeveloper/cuon
refs/heads/master
cuon_client/Client/CUON/cuon/Staff/__init__.py
12133432
CiscoSystems/jujucharm-n1k
refs/heads/master
charms/precise/cinder/hooks/charmhelpers/contrib/__init__.py
12133432
SPKian/Testing2
refs/heads/master
erpnext/hr/report/monthly_attendance_sheet/__init__.py
12133432
zaccoz/odoo
refs/heads/8.0
addons/web_api/__init__.py
12133432
aronsky/home-assistant
refs/heads/dev
homeassistant/components/http/data_validator.py
9
"""Decorator for view methods to help with data validation.""" from functools import wraps import logging import voluptuous as vol _LOGGER = logging.getLogger(__name__) class RequestDataValidator: """Decorator that will validate the incoming data. Takes in a voluptuous schema and adds 'post_data' as k...
roxyboy/bokeh
refs/heads/master
sphinx/source/docs/user_guide/source_examples/styling_plot_outline_line_color.py
46
from bokeh.plotting import figure, output_file, show output_file("outline.html") # create a new plot with a title p = figure(plot_width=400, plot_height=400) p.outline_line_width = 7 p.outline_line_alpha = 0.3 p.outline_line_color = "navy" p.circle([1,2,3,4,5], [2,5,8,2,7], size=10) show(p)
stuart-knock/bokeh
refs/heads/master
versioneer.py
55
#! /usr/bin/python """versioneer.py (like a rocketeer, but for versions) * https://github.com/warner/python-versioneer * Brian Warner * License: Public Domain * Version: 0.7+ This file helps distutils-based projects manage their version number by just creating version-control tags. For developers who work from a V...
yetsky/extra
refs/heads/master
packages/my-application/python-all/files/usr/lib/python2.7/antigravity.py
235
import webbrowser webbrowser.open("http://xkcd.com/353/")
towerjoo/DjangoNotes
refs/heads/master
Django-1.5.1/tests/regressiontests/bash_completion/tests.py
51
""" A series of tests to establish that the command-line bash completion works. """ import os import sys from django.conf import settings from django.core.management import ManagementUtility from django.utils import unittest from django.utils.six import StringIO class BashCompletionTests(unittest.TestCase): """ ...
rec/BiblioPixel
refs/heads/dev
bibliopixel/main/project_flags.py
2
from .. project import data_maker, project from .. util import data_file, deprecated, log, pid_context """Common command line arguments for run and demo.""" COMPONENTS = 'driver', 'layout', 'animation' PRESET_LIBRARY_DEFAULT = '~/.bibliopixel' ENABLE_PRESETS = False NUMBER_TYPES = ('python',) + data_maker.NUMPY_TYPES...
openstack/refstack
refs/heads/master
refstack/api/utils.py
2
# Copyright (c) 2015 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 requir...
jf87/smap
refs/heads/master
python/smap/drivers/alerts.py
6
import smtplib import time from smap.archiver.client import SmapClient from smap.driver import SmapDriver from smap.util import periodicSequentialCall from twisted.internet import reactor class Alert(SmapDriver): def setup(self, opts): url = opts.get('url', 'http://new.openbms.org/backend') self.client =...
kharnt0x/py-flask-signup
refs/heads/master
tests/application-tests.py
112
# Copyright 2013. Amazon Web Services, Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
hynnet/hiwifi-openwrt-HC5661-HC5761
refs/heads/master
staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/encodings/utf_32_be.py
703
""" Python 'utf-32-be' Codec """ import codecs ### Codec APIs encode = codecs.utf_32_be_encode def decode(input, errors='strict'): return codecs.utf_32_be_decode(input, errors, True) class IncrementalEncoder(codecs.IncrementalEncoder): def encode(self, input, final=False): return codecs.utf_32_be_en...
ihsanudin/odoo
refs/heads/8.0
addons/membership/__openerp__.py
197
# -*- 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...
daveg999/automation_class
refs/heads/master
class9/ex3/ex3_test/world.py
3
def func3(): print "you are calling func3 from world module" def main(): print "calling main function from world.main" print "function name __name__ is calling: {}".format(__name__) if __name__ == "__main__": main()
henriknelson/micropython
refs/heads/master
tests/feature_check/async_check.py
39
# check if async/await keywords are supported async def foo(): await 1
patilsangram/erpnext
refs/heads/develop
erpnext/hr/doctype/employee_tax_exemption_sub_category/__init__.py
12133432
zenodo/invenio
refs/heads/zenodo-master
invenio/modules/webhooks/upgrades/__init__.py
12133432
mhbu50/erpnext
refs/heads/develop
erpnext/hr/doctype/leave_block_list_date/__init__.py
12133432
mostaphaRoudsari/Butterfly
refs/heads/master
butterfly/stl/types.py
2
import math class Solid(object): """A solid object; the root element of an STL file.""" #: The name given to the object by the STL file header. name = None #: :py:class:`list` of :py:class:`stl.Facet` objects representing the #: facets (triangles) that make up the exterior surface of this object...
whuwxl/bazel
refs/heads/master
third_party/py/gflags/tests/gflags_helpxml_test.py
139
#!/usr/bin/env python # Copyright (c) 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 l...
faust64/ansible
refs/heads/devel
lib/ansible/modules/web_infrastructure/ansible_tower/tower_job_list.py
3
#!/usr/bin/python #coding: utf-8 -*- # (c) 2017, Wayne Witzel III <wayne@riotousliving.com> # # This module 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 optio...
tensorflow/models
refs/heads/master
official/vision/beta/dataloaders/tf_example_decoder_test.py
1
# Copyright 2021 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
slisson/intellij-community
refs/heads/master
python/testData/refactoring/unwrap/whileInWhileUnwrap_after.py
80
while True: # comment x = 1<caret> y = 2
psychopy/psychopy
refs/heads/release
psychopy/experiment/components/code/__init__.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2021 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). from __future__ import absolute_import, print_function from builtins import str from os i...
Arcanemagus/SickRage
refs/heads/master
lib/hachoir_parser/audio/__init__.py
93
from hachoir_parser.audio.aiff import AiffFile from hachoir_parser.audio.au import AuFile from hachoir_parser.audio.itunesdb import ITunesDBFile from hachoir_parser.audio.midi import MidiFile from hachoir_parser.audio.mpeg_audio import MpegAudioFile from hachoir_parser.audio.real_audio import RealAudioFile from hachoir...
ShassAro/ShassAro
refs/heads/master
Bl_project/blVirtualEnv/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py
31
""" PostgreSQL database backend for Django. Requires psycopg 2: http://initd.org/projects/psycopg2 """ from django.conf import settings from django.db.backends import (BaseDatabaseFeatures, BaseDatabaseWrapper, BaseDatabaseValidation) from django.db.backends.postgresql_psycopg2.operations import DatabaseOperation...
openstack/senlin
refs/heads/master
senlin/objects/receiver.py
2
# 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 # distributed unde...
shadowjohn/UCL_LIU
refs/heads/master
setup.py
1
from distutils.core import setup import py2exe, sys, os sys.argv.append('py2exe') setup( data_files = [ ('',['api-ms-win-core-errorhandling-l1-1-1.dll']), ('',['api-ms-win-core-libraryloader-l1-2-0.dll']), ('',['api-ms-win-core-processthreads-l1-1-2.dll']), ('',['api-ms-win-core-profile-l1-1...
qxsch/QXSConsolas
refs/heads/master
consolas/clint/packages/colorama/ansitowin32.py
26
import re import sys from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style from .winterm import WinTerm, WinColor, WinStyle from .win32 import windll if windll is not None: winterm = WinTerm() def is_a_tty(stream): return hasattr(stream, 'isatty') and stream.isatty() class StreamWrappe...
giltis/scikit-xray
refs/heads/master
skxray/core/calibration.py
7
# ###################################################################### # Copyright (c) 2014, Brookhaven Science Associates, Brookhaven # # National Laboratory. All rights reserved. # # # # Redistribution and use in ...
morenopc/edx-platform
refs/heads/ok-merge-from-master
lms/lib/xblock/test/__init__.py
12133432
vladan-jovicic/ComplexNetworks
refs/heads/master
src/utils.py
12133432
johnner/mercurial-jira-commit-message-hook
refs/heads/master
jirakeycheck.py
1
#coding: utf-8 import re #If the hook returns True - hook fails BAD_COMMIT = True OK = False #List of the available JIRA projects JIRA_PROJECTS = ['PRJ', 'TEST'] def checkCommitMessage(ui, repo, **kwargs): """Checks commit message for matching commit rule: Every commit message must include JIRA issue key ...
sagark123/coala
refs/heads/master
tests/results/LineDiffTest.py
35
import unittest from coalib.results.LineDiff import LineDiff, ConflictError class LineDiffTest(unittest.TestCase): def test_everything(self): self.assertRaises(TypeError, LineDiff, delete=5) self.assertRaises(TypeError, LineDiff, change=5) self.assertRaises(TypeError, LineDiff, add_after...
isnnn/Sick-Beard-TPB
refs/heads/ThePirateBay
lib/unidecode/x0b5.py
253
data = ( 'dyil', # 0x00 'dyilg', # 0x01 'dyilm', # 0x02 'dyilb', # 0x03 'dyils', # 0x04 'dyilt', # 0x05 'dyilp', # 0x06 'dyilh', # 0x07 'dyim', # 0x08 'dyib', # 0x09 'dyibs', # 0x0a 'dyis', # 0x0b 'dyiss', # 0x0c 'dying', # 0x0d 'dyij', # 0x0e 'dyic', # 0x0f 'dyik', # ...
pasqualguerrero/django
refs/heads/master
tests/flatpages_tests/test_templatetags.py
309
from django.contrib.auth.models import AnonymousUser, User from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import Site from django.template import Context, Template, TemplateSyntaxError from django.test import TestCase, modify_settings, override_settings from .settings import FLAT...
dpraul/flask-continuous-env
refs/heads/master
tests/base_test.py
1
from flask_site import app import unittest class BaseTest(unittest.TestCase): def setUp(self): app.config['TESTING'] = True self.app = app.test_client()
mousepawgames/diamondquest
refs/heads/devel
src/diamondquest/common/options.py
1
""" Options [DiamondQuest] Option variables used elsewhere in the code. Author(s): Ajay Ratnam """ # LICENSE (BSD-3-Clause) # Copyright (c) 2020 MousePaw Media. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following con...
I2Cvb/data_balancing
refs/heads/master
pipeline/feature-validation/validation_melanoma_main.py
1
# -*- coding: utf-8 -*- """ Created on Wed Jan 20 15:28:24 2016 @author: mojdeh """ #title :classiciation_imbalanced_study.py #description :This will create a header for a python script. #author :Guillaume Lemaitre, Mojdeh Rastgoo #date :2016/01/19 #version :0.1 #notes ...
arfoll/upm
refs/heads/master
examples/python/pn532.py
15
#!/usr/bin/python # Author: Zion Orent <zorent@ics.com> # Copyright (c) 2015 Intel Corporation. # # 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 limi...
citrix-openstack/build-python-troveclient
refs/heads/ctx-nova-network-smoke-latest
troveclient/cli.py
2
#!/usr/bin/env python # Copyright 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-2.0 # # Unless r...
pixelgremlins/ztruck
refs/heads/master
dj/lib/python2.7/site-packages/django/conf/locale/sl/formats.py
115
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'd. F Y' TIME_FORMAT = 'H:i' DATET...
tdsimao/tt
refs/heads/master
django/contrib/gis/tests/geogapp/tests.py
222
""" Tests for geography support in PostGIS 1.5+ """ import os from django.contrib.gis import gdal from django.contrib.gis.measure import D from django.test import TestCase from models import City, County, Zipcode class GeographyTest(TestCase): def test01_fixture_load(self): "Ensure geography features load...
pypot/scikit-learn
refs/heads/master
sklearn/datasets/olivetti_faces.py
198
"""Modified Olivetti faces dataset. The original database was available from (now defunct) http://www.uk.research.att.com/facedatabase.html The version retrieved here comes in MATLAB format from the personal web page of Sam Roweis: http://www.cs.nyu.edu/~roweis/ There are ten different images of each of 40...