repo_name stringlengths 6 100 | path stringlengths 4 294 | copies stringlengths 1 5 | size stringlengths 4 6 | content stringlengths 606 896k | license stringclasses 15
values |
|---|---|---|---|---|---|
geminy/aidear | oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/pyelftools/elftools/construct/lib/container.py | 23 | 3949 | """
Various containers.
"""
from collections import MutableMapping
from pprint import pformat
def recursion_lock(retval, lock_name = "__recursion_lock__"):
def decorator(func):
def wrapper(self, *args, **kw):
if getattr(self, lock_name, False):
return retval
setattr... | gpl-3.0 |
prospwro/odoo | addons/crm_partner_assign/report/crm_lead_report.py | 309 | 5104 | # -*- 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... | agpl-3.0 |
experiencecoin/experiencecoin | qa/rpc-tests/signmessages.py | 102 | 1439 | #!/usr/bin/env python3
# Copyright (c) 2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
class SignM... | mit |
DavidB-CMU/herbpy | tests/hand_tests.py | 3 | 2701 | #!/usr/bin/env python
PKG = 'herbpy'
import roslib; roslib.load_manifest(PKG)
import numpy, unittest
import herbpy
env, robot = herbpy.initialize(sim=True)
class BarrettHandTest(unittest.TestCase):
def setUp(self):
self._env, self._robot = env, robot
self._wam = robot.right_arm
self._hand ... | bsd-3-clause |
jstoxrocky/statsmodels | statsmodels/examples/try_gof_chisquare.py | 34 | 3302 | # -*- coding: utf-8 -*-
"""
Created on Thu Feb 28 15:37:53 2013
Author: Josef Perktold
"""
from __future__ import print_function
import numpy as np
from scipy import stats
from statsmodels.stats.gof import (chisquare, chisquare_power,
chisquare_effectsize)
from numpy.testing import... | bsd-3-clause |
michaelgugino/web_keyer | jinja2/utils.py | 15 | 16430 | # -*- coding: utf-8 -*-
"""
jinja2.utils
~~~~~~~~~~~~
Utility functions.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import re
import errno
from collections import deque
from threading import Lock
from jinja2._compat import text_type, string_types, impl... | gpl-3.0 |
tempodb/django-guardian | guardian/models.py | 35 | 2633 | from django.db import models
from django.core.exceptions import ValidationError
from django.contrib.auth.models import User, Group, Permission
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django.utils.translation import ugettext_lazy as _
from guardian... | bsd-2-clause |
chirilo/kuma | kuma/wiki/tests/test_feeds.py | 17 | 10589 | # -*- coding: utf-8 -*-
import datetime
import json
import hashlib
import time
from nose.tools import eq_, ok_
from pyquery import PyQuery as pq
from kuma.core.urlresolvers import reverse
from kuma.users.tests import UserTestCase
from . import WikiTestCase, document, revision, make_translation, wait_add_rev
class F... | mpl-2.0 |
arcticfoxnv/slackminion | slackminion/plugin/base.py | 1 | 4847 | from six import string_types
from builtins import object
import logging
import threading
from slackminion.slack import SlackChannel, SlackIM, SlackUser, SlackRoom
class BasePlugin(object):
def __init__(self, bot, **kwargs):
self.log = logging.getLogger(type(self).__name__)
self._bot = bot
... | mit |
kevin-coder/tensorflow-fork | tensorflow/python/client/session_benchmark.py | 41 | 9039 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
linxdcn/iS3 | IS3Py/is3.py | 2 | 7512 | # Copyright (C) 2015 iS3 Software Foundation
# Author: Xiaojun Li
# Contact: xiaojunli@tongji.edu.cn
import sys
import clr
import System
# Load System.Windows.Media in PresentationCore.dll
sys.path.append('C:\\Program Files (x86)\\Reference Assemblies\\Microsoft\\Framework\\.NETFramework\\v4.5')
prcore = clr.LoadAsse... | lgpl-3.0 |
abendig/django-mailchimp | mailchimp/models.py | 1 | 9678 | from django.db import models
import json as simplejson
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404
from django.utils.translation import ugettext_lazy as _
from mailc... | bsd-3-clause |
donspaulding/adspygoogle | tests/adspygoogle/dfp/v201203/company_service_unittest.py | 4 | 2337 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
#
# Copyright 2012 Google 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... | apache-2.0 |
QUASARFREAK/charla-ninja | node_modules/node-gyp/gyp/pylib/gyp/common.py | 1292 | 20063 | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import with_statement
import collections
import errno
import filecmp
import os.path
import re
import tempfile
import sys
# A minimal memoizing d... | mit |
manjunaths/tensorflow | tensorflow/contrib/layers/python/layers/target_column.py | 125 | 18698 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
mszewczy/odoo | addons/payment_sips/models/sips.py | 150 | 9160 | # -*- coding: utf-'8' "-*-"
try:
import simplejson as json
except ImportError:
import json
import logging
from hashlib import sha256
import urlparse
import unicodedata
from openerp import models, fields, api
from openerp.tools.float_utils import float_compare
from openerp.tools.translate import _
from openerp... | agpl-3.0 |
madflojo/cloudroutes-service | src/web/monitorapis/slack-webhook/__init__.py | 6 | 2159 | ######################################################################
# Cloud Routes Web Application
# -------------------------------------------------------------------
# Papertrail Webhook Monitor module
######################################################################
import json
import random
def webCheck(... | apache-2.0 |
int19h/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/win32/lib/win32rcparser.py | 6 | 21179 | # Windows dialog .RC file parser, by Adam Walker.
# This module was adapted from the spambayes project, and is Copyright
# 2003/2004 The Python Software Foundation and is covered by the Python
# Software Foundation license.
"""
This is a parser for Windows .rc files, which are text files which define
dialogs and other... | apache-2.0 |
40223232/w16b_test | static/Brython3.1.1-20150328-091302/Lib/xml/sax/expatreader.py | 870 | 14659 | """
SAX driver for the pyexpat C module. This driver works with
pyexpat.__version__ == '2.22'.
"""
version = "0.20"
from xml.sax._exceptions import *
from xml.sax.handler import feature_validation, feature_namespaces
from xml.sax.handler import feature_namespace_prefixes
from xml.sax.handler import feature_external_... | gpl-3.0 |
DentonGentry/jinja2 | examples/bench.py | 75 | 10922 | """\
This benchmark compares some python templating engines with Jinja 2 so
that we get a picture of how fast Jinja 2 is for a semi real world
template. If a template engine is not installed the test is skipped.\
"""
import sys
import cgi
from timeit import Timer
from jinja2 import Environment as JinjaEnvi... | bsd-3-clause |
mattfeel/PySAL | mako/codegen.py | 13 | 48628 | # mako/codegen.py
# Copyright (C) 2006-2012 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""provides functionality for rendering a parsetree constructing into module
source code."""
impo... | gpl-3.0 |
EmadHelmi/chipsec_gui | chipsec/modules/tools/cpu/sinkhole.py | 7 | 5253 | #CHIPSEC: Platform Security Assessment Framework
#Copyright (c) 2010-2016, Intel Corporation
#
#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.
#
#This program is distributed in the hope... | gpl-2.0 |
donkawechico/arguman.org | web/premises/migrations/0017_auto_20141030_0353.py | 7 | 2023 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('premises', '0016_report_fallacy_type'),
]
operations = [
migrations.AlterField(
model_name='report',
... | mit |
pataquets/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/layout_tests/controllers/layout_test_runner.py | 115 | 25274 | # Copyright (C) 2011 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 ... | bsd-3-clause |
yufish/youtube-dl | youtube_dl/extractor/rai.py | 76 | 6554 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
)
from ..utils import (
parse_duration,
unified_strdate,
)
class RaiIE(InfoExtractor):
_VALID_URL = r'(?P<url>(?P<host>http://(?:.+?\.)?(?:rai\.it|rai\.tv|rainews\.it))/dl/... | unlicense |
bashu/fluentcms-filer | fluentcms_filer/file/south_migrations/0001_initial.py | 1 | 10131 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'FilerFileItem'
db.create_table(u'contentitem_file_filerfi... | apache-2.0 |
NB-Dev/django-shop | shop/views/order.py | 17 | 1105 | from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from shop.views import ShopListView, ShopDetailView
from shop.models import Order
class OrderListView(ShopListView):
"""
Display list or orders for logged in user.
"""
queryset = Order.objec... | bsd-3-clause |
ryfeus/lambda-packs | Pandas_numpy/source/pandas/core/sorting.py | 6 | 15948 | """ miscellaneous sorting / groupby utilities """
import numpy as np
from pandas.compat import long, string_types, PY3
from pandas.core.dtypes.common import (
_ensure_platform_int,
_ensure_int64,
is_list_like,
is_categorical_dtype)
from pandas.core.dtypes.cast import infer_dtype_from_array
from pandas.... | mit |
KnowNo/reviewboard | reviewboard/webapi/tests/test_diff.py | 7 | 11137 | from __future__ import unicode_literals
import os
from django.utils import six
from djblets.webapi.errors import (INVALID_ATTRIBUTE, INVALID_FORM_DATA,
PERMISSION_DENIED)
from reviewboard import scmtools
from reviewboard.diffviewer.models import DiffSet
from reviewboard.webapi.erro... | mit |
varund7726/android_kernel_motorola_titan | tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | gpl-2.0 |
deployed/django | tests/nested_foreign_keys/tests.py | 23 | 9405 | from __future__ import unicode_literals
from django.test import TestCase
from .models import Person, Movie, Event, Screening, ScreeningNullFK, Package, PackageNullFK
# These are tests for #16715. The basic scheme is always the same: 3 models with
# 2 relations. The first relation may be null, while the second is no... | bsd-3-clause |
WilliamDiakite/ExperimentationsACA | processing/lsa.py | 1 | 3364 |
import os
import sys
import itertools
import operator
import nltk
import numpy as np
import matplotlib.pyplot as plt
from nltk.util import ngrams
from collections import Counter
from spell_checker import SpellChecker
from sklearn.decomposition import TruncatedSVD
from sklearn.pipeline import make_pipeline
from skle... | mit |
babble/babble | include/jython/Lib/asyncore.py | 1 | 17033 | # -*- Mode: Python -*-
# Id: asyncore.py,v 2.51 2000/09/07 22:29:26 rushing Exp
# Author: Sam Rushing <rushing@nightmare.com>
# ======================================================================
# Copyright 1996 by Sam Rushing
#
# All Rights Reserved
#
# Permission to use, copy, modify,... | apache-2.0 |
inveniosoftware/invenio-ext | invenio_ext/session/model.py | 6 | 2077 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2011, 2012, 2013, 2014, 2015 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 (a... | gpl-2.0 |
kevinmel2000/sl4a | python/src/Lib/plat-mac/lib-scriptpackages/Explorer/Web_Browser_Suite.py | 73 | 8210 | """Suite Web Browser Suite: Class of events supported by Web Browser applications
Level 1, version 1
Generated from /Applications/Internet Explorer.app
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'WWW!'
class Web_Browser_Suite_Events:
def Activate(self, _object=... | apache-2.0 |
patriciolobos/desa8 | openerp/addons/resource/faces/__init__.py | 448 | 1325 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 |
njuacmicpc/oiutils | oi/fc/fc.py | 2 | 7239 | # -*- coding: utf-8 -*-
import argparse, traceback, json
def verdict(yes, msg):
print msg
if yes:
print "1.0"
exit(0)
else:
print "0.0"
exit(1)
func_dict = {
'e' : lambda a:eval(a),
's' : lambda a:str(a),
'd' : lambda a:int(a),
'u' : lambda a:int(a),
'f'... | gpl-2.0 |
supergentle/migueltutorial | flask/lib/python2.7/site-packages/sqlalchemy/dialects/oracle/base.py | 46 | 55829 | # oracle/base.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: oracle
:name: Oracle
Oracle version 8 through current (11g ... | bsd-3-clause |
pjh/vm-analyze | analyze/ip_to_fn.py | 1 | 21352 | # Virtual memory analysis scripts.
# Developed 2012-2014 by Peter Hornyack, pjh@cs.washington.edu
# Copyright (c) 2012-2014 Peter Hornyack and University of Washington
# This file contains methods that implement a wrapper around the
# binutils "addr2line" utility, which can be used to look up instruction
# pointer val... | bsd-3-clause |
ageron/tensorflow | tensorflow/lite/experimental/microfrontend/python/ops/audio_microfrontend_op.py | 13 | 5066 | # Copyright 2018 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... | apache-2.0 |
aldian/tensorflow | tensorflow/contrib/tensor_forest/hybrid/python/hybrid_model.py | 138 | 4774 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
samyoyo/dnsteal | dnsteal.py | 12 | 3710 | #!/usr/bin/env python
# ~ \x90
######################
import socket
import sys
import binascii
import time
import random
import hashlib
import zlib
c = { "r" : "\033[1;31m", "g": "\033[1;32m", "y" : "\033[1;33m", "e" : "\033[0m" }
VERSION = "1.0"
class DNSQuery:
def __init__(self, data):
self.data = data
self... | gpl-2.0 |
boegel/easybuild-easyblocks | easybuild/easyblocks/b/blacs.py | 1 | 8124 | ##
# Copyright 2009-2020 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | gpl-2.0 |
kenshay/ImageScripter | ProgramData/SystemFiles/Python/Lib/site-packages/rope/refactor/method_object.py | 22 | 3932 | import warnings
from rope.base import libutils
from rope.base import pyobjects, exceptions, change, evaluate, codeanalyze
from rope.refactor import sourceutils, occurrences, rename
class MethodObject(object):
def __init__(self, project, resource, offset):
self.project = project
this_pymodule = s... | gpl-3.0 |
alinbalutoiu/tempest | tempest/api/network/base_routers.py | 31 | 2760 | # Copyright 2013 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... | apache-2.0 |
aaltinisik/OCBAltinkaya | addons/mail/ir_attachment.py | 10 | 5656 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014-TODAY OpenERP SA (http://www.openerp.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... | agpl-3.0 |
lampertb/RPIAFIB | Software/afib_lib.py | 1 | 4157 | import sys
import numpy as np
from scipy import signal
# For testing
import csv
defaultWindowSize=120
defaultMinSNR=2
defaultNoisePercentage=10
defaultSampleRate=250
#The find peaks function takes in an array of data
#It returns an array of the peak locations after running the wavelet transform
def findPeaks(dataAr... | mit |
uranusjr/django | tests/view_tests/tests/test_debug.py | 6 | 50043 | import importlib
import inspect
import os
import re
import sys
import tempfile
from io import StringIO
from pathlib import Path
from django.conf.urls import url
from django.core import mail
from django.core.files.uploadedfile import SimpleUploadedFile
from django.db import DatabaseError, connection
from django.shortcu... | bsd-3-clause |
yohanko88/gem5-DC | src/dev/Terminal.py | 66 | 1972 | # Copyright (c) 2005-2007 The Regents of The University of Michigan
# 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 ... | bsd-3-clause |
CaptFrank/firewalld | src/firewall/core/fw_direct.py | 4 | 19312 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2010-2012 Red Hat, Inc.
#
# Authors:
# Thomas Woerner <twoerner@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 Free Software Foundation; either version 2 of the Li... | gpl-2.0 |
hsnlab/escape | mininet/examples/test/test_sshd.py | 2 | 1858 | #!/usr/bin/env python
"""
Test for sshd.py
"""
import unittest
import pexpect
from mininet.clean import sh
class testSSHD( unittest.TestCase ):
opts = [ '\(yes/no\)\?', 'refused', 'Welcome|\$|#', pexpect.EOF, pexpect.TIMEOUT ]
def connected( self, ip ):
"Log into ssh server, check banner, then exit... | apache-2.0 |
saurabh6790/test-med-app | setup/doctype/sales_person/sales_person.py | 29 | 1109 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.model.bean import getlist
from webnotes.utils import flt
from webnotes.utils.nestedset import DocTypeNestedSet
class... | agpl-3.0 |
cpcloud/numpy | numpy/polynomial/tests/test_legendre.py | 123 | 16522 | """Tests for legendre module.
"""
from __future__ import division, absolute_import, print_function
import numpy as np
import numpy.polynomial.legendre as leg
from numpy.polynomial.polynomial import polyval
from numpy.testing import (
TestCase, assert_almost_equal, assert_raises,
assert_equal, assert_, run_mod... | bsd-3-clause |
Ghalko/osf.io | scripts/find_guids_without_referents.py | 63 | 1593 | """Finds Guids that do not have referents or that point to referents that no longer exist.
E.g. a node was created and given a guid but an error caused the node to
get deleted, leaving behind a guid that points to nothing.
"""
import sys
from modularodm import Q
from framework.guid.model import Guid
from website.app ... | apache-2.0 |
arielm/googletest | test/gtest_shuffle_test.py | 3023 | 12549 | #!/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... | bsd-3-clause |
noisemaster/AdamTestBot | unidecode/x09a.py | 253 | 4623 | data = (
'E ', # 0x00
'Cheng ', # 0x01
'Xin ', # 0x02
'Ai ', # 0x03
'Lu ', # 0x04
'Zhui ', # 0x05
'Zhou ', # 0x06
'She ', # 0x07
'Pian ', # 0x08
'Kun ', # 0x09
'Tao ', # 0x0a
'Lai ', # 0x0b
'Zong ', # 0x0c
'Ke ', # 0x0d
'Qi ', # 0x0e
'Qi ', # 0x0f
'Yan ', # 0x10
'Fei '... | mit |
ampax/edx-platform | lms/djangoapps/instructor/views/instructor_task_helpers.py | 35 | 5245 | """
A collection of helper utility functions for working with instructor
tasks.
"""
import json
import logging
from util.date_utils import get_default_time_display
from bulk_email.models import CourseEmail
from django.utils.translation import ugettext as _
from django.utils.translation import ungettext
from instructor_... | agpl-3.0 |
horica-ionescu/flask | examples/persona/persona.py | 159 | 1442 | from flask import Flask, render_template, session, request, abort, g
import requests
app = Flask(__name__)
app.config.update(
DEBUG=True,
SECRET_KEY='my development key',
PERSONA_JS='https://login.persona.org/include.js',
PERSONA_VERIFIER='https://verifier.login.persona.org/verify',
)
app.config.from... | bsd-3-clause |
pechatny/basic-flask-app | src/app/flask/lib/python2.7/site-packages/pip/_vendor/html5lib/html5parser.py | 169 | 117500 | from __future__ import absolute_import, division, unicode_literals
from pip._vendor.six import with_metaclass
import types
from . import inputstream
from . import tokenizer
from . import treebuilders
from .treebuilders._base import Marker
from . import utils
from . import constants
from .constants import spaceChara... | mit |
TeamCarbonXtremeARMv7/android_kernel_samsung_golden | tools/perf/scripts/python/syscall-counts-by-pid.py | 11180 | 1927 | # system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... | gpl-2.0 |
dirn/ansible | lib/ansible/plugins/connections/accelerate.py | 140 | 15736 | # (c) 2012, 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) any lat... | gpl-3.0 |
Xarthisius/oauthenticator | setup.py | 3 | 2330 | #!/usr/bin/env python
# coding: utf-8
# Copyright (c) Juptyer Development Team.
# Distributed under the terms of the Modified BSD License.
#-----------------------------------------------------------------------------
# Minimal Python version sanity check (from IPython/Jupyterhub)
#-----------------------------------... | bsd-3-clause |
navidshaikh/atomic | Atomic/config.py | 4 | 1724 | import os
try:
import ConfigParser as configparser
except ImportError: # py3 compat
import configparser
class PulpConfig(object):
"""
pulp configuration:
1. look in ~/.pulp/admin.conf
configuration contents:
[server]
host = <pulp-server-hostname.example.com>
verify_ssl = false
... | lgpl-2.1 |
heyavery/lopenr | venv/lib/python2.7/site-packages/django/forms/widgets.py | 106 | 36924 | """
HTML Widget classes
"""
from __future__ import unicode_literals
import copy
import datetime
import re
from itertools import chain
from django.conf import settings
from django.forms.utils import flatatt, to_current_timezone
from django.utils import datetime_safe, formats, six
from django.utils.datastructures impo... | mit |
eubr-bigsea/tahiti | migrations/versions/38745782554d_adding_missing_port_interfaces.py | 1 | 5671 | # -*- coding: utf-8 -*-}
"""Adding missing port interfaces
Revision ID: 38745782554d
Revises: b2b823fe47b1
Create Date: 2017-06-07 15:16:30.224298
"""
from alembic import op
from sqlalchemy import Integer, String
from sqlalchemy.sql import table, column, text
# revision identifiers, used by Alembic.
revision = '387... | apache-2.0 |
Barrog/C4-Datapack | data/jscript/quests/329_CuriosityOfDwarf/__init__.py | 1 | 2487 | # Made by Mr. - Version 0.3 by DrLecter
import sys
from net.sf.l2j.gameserver.model.quest import State
from net.sf.l2j.gameserver.model.quest import QuestState
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
GOLEM_HEARTSTONE = 1346
BROKEN_HEARTSTONE = 1365
ADENA = 57
class Quest (JQuest) :
... | gpl-2.0 |
HousekeepLtd/django | django/contrib/auth/base_user.py | 282 | 4438 | """
This module allows importing AbstractBaseUser even when django.contrib.auth is
not in INSTALLED_APPS.
"""
from __future__ import unicode_literals
from django.contrib.auth import password_validation
from django.contrib.auth.hashers import (
check_password, is_password_usable, make_password,
)
from django.db imp... | bsd-3-clause |
Orochimarufan/PythonQt | examples/NicePyConsole/pygments/lexers/sql.py | 3 | 25940 | # -*- coding: utf-8 -*-
"""
pygments.lexers.sql
~~~~~~~~~~~~~~~~~~~
Lexers for various SQL dialects and related interactive sessions.
Postgres specific lexers:
`PostgresLexer`
A SQL lexer for the PostgreSQL dialect. Differences w.r.t. the SQL
lexer are:
- keywords and dat... | lgpl-2.1 |
skuda/client-python | kubernetes/client/models/v1beta1_role_ref.py | 1 | 4581 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.6.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | apache-2.0 |
indictranstech/trufil-frappe | frappe/core/doctype/docshare/docshare.py | 7 | 1819 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe import _
from frappe.utils import get_fullname
exclude_from_linked_with = True
class DocS... | mit |
edwardzhou1980/bite-project | deps/mrtaskman/server/mapreduce/mapper_pipeline.py | 25 | 3513 | #!/usr/bin/env python
#
# Copyright 2011 Google 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 the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 |
ewitz/PhotoHaus | venv/lib/python2.7/site-packages/werkzeug/_compat.py | 448 | 6184 | import sys
import operator
import functools
try:
import builtins
except ImportError:
import __builtin__ as builtins
PY2 = sys.version_info[0] == 2
_identity = lambda x: x
if PY2:
unichr = unichr
text_type = unicode
string_types = (str, unicode)
integer_types = (int, long)
int_to_byte = c... | mit |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/multiprocessing/queues.py | 1 | 9842 | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: queues.py
__all__ = [
'Queue', 'SimpleQueue', 'JoinableQueue']
import sys
import os
import threading
import collections
import time
import atexit
im... | unlicense |
jtyuan/racetrack | src/arch/x86/isa/insts/simd64/integer/shift/right_arithmetic_shift.py | 91 | 2895 | # 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... | bsd-3-clause |
HackerEarth/django-allauth | allauth/socialaccount/providers/twitter/views.py | 1 | 1820 | from django.utils import simplejson
from allauth.socialaccount.providers.oauth.client import OAuth
from allauth.socialaccount.providers.oauth.views import (OAuthAdapter,
OAuthLoginView,
OAuthCallbackView)
... | mit |
zhaodelong/django | django/contrib/postgres/fields/array.py | 186 | 8424 | import json
from django.contrib.postgres import lookups
from django.contrib.postgres.forms import SimpleArrayField
from django.contrib.postgres.validators import ArrayMaxLengthValidator
from django.core import checks, exceptions
from django.db.models import Field, IntegerField, Transform
from django.utils import six
f... | bsd-3-clause |
wagavulin/arrow | cpp/build-support/asan_symbolize.py | 17 | 12050 | #!/usr/bin/env python
#===- lib/asan/scripts/asan_symbolize.py -----------------------------------===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===----------------------------------------... | apache-2.0 |
skibaa/smart-sweeper | game/dbext.py | 1 | 2811 | import logging
from google.appengine.ext import db
from google.appengine.api import datastore_errors
import cPickle
logger=logging.getLogger("smartSweeper.dbext")
class PickledProperty(db.Property):
data_type = db.Blob
def __init__(self, force_type=None, *args, **kw):
self.force_type=force_type
... | apache-2.0 |
tpo/ansible | test/units/module_utils/facts/system/distribution/test_distribution_version.py | 34 | 5815 | # -*- 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)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import glob
import json
import os
import pytest
from itertools import product... | gpl-3.0 |
chronicwaffle/PokemonGo-DesktopMap | app/pywin/Lib/distutils/command/install.py | 88 | 26260 | """distutils.command.install
Implements the Distutils 'install' command."""
from distutils import log
# This module should be kept compatible with Python 2.1.
__revision__ = "$Id$"
import sys, os, string
from types import *
from distutils.core import Command
from distutils.debug import DEBUG
from distutils.sysconf... | mit |
apache/libcloud | libcloud/test/common/test_base.py | 6 | 4237 | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | apache-2.0 |
amenonsen/ansible | lib/ansible/plugins/callback/log_plays.py | 27 | 3809 | # (C) 2012, Michael DeHaan, <michael.dehaan@gmail.com>
# (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
DOCUMENTATION = '''
callback: log_plays
type: n... | gpl-3.0 |
allynt/tings | T/tings/views/api/views_api_users.py | 1 | 1138 | from rest_framework import generics, permissions
from django.contrib.auth.models import User
# from T.tings.models.models_users import TUserProfile
from T.tings.serializers.serializers_users import TUserSerializer
class TUserPermission(permissions.BasePermission):
"""
Custom permission to only allow owners of... | mit |
cpritam/moose | python/FactorySystem/Parser.py | 3 | 3723 | #!/usr/bin/python
import os, sys, re
import ParseGetPot, Factory
from MooseObject import MooseObject
from Warehouse import Warehouse
"""
Parser object for reading GetPot formatted files
"""
class Parser:
def __init__(self, factory, warehouse):
self.factory = factory
self.warehouse = warehouse
self.para... | lgpl-2.1 |
Axam/nsx-web | fuelmenu/fuelmenu/modules/saveandquit.py | 7 | 2758 | #!/usr/bin/env python
# Copyright 2013 Mirantis, 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 the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 |
RueLaLa/django-haystack | test_haystack/solr_tests/test_solr_query.py | 9 | 9642 | # encoding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
import datetime
from django.test import TestCase
from haystack import connections
from haystack.inputs import AltParser, Exact
from haystack.models import SearchResult
from haystack.query import SearchQuerySet, SQ
... | bsd-3-clause |
ademmers/ansible | lib/ansible/utils/collection_loader/_collection_config.py | 18 | 2945 | # (c) 2019 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.module_utils.common.text.converters import to_text
from ansible.module_utils.six import with_meta... | gpl-3.0 |
AunShiLord/sympy | sympy/simplify/tests/test_function.py | 124 | 2149 | """ Unit tests for Hyper_Function"""
from sympy.core import symbols, Dummy, Tuple, S
from sympy.functions import hyper
from sympy.simplify.hyperexpand import Hyper_Function
def test_attrs():
a, b = symbols('a, b', cls=Dummy)
f = Hyper_Function([2, a], [b])
assert f.ap == Tuple(2, a)
assert f.bq == Tup... | bsd-3-clause |
nikolas/lettuce | tests/integration/lib/Django-1.2.5/tests/regressiontests/model_inheritance_regress/models.py | 40 | 3932 | import datetime
from django.db import models
class Place(models.Model):
name = models.CharField(max_length=50)
address = models.CharField(max_length=80)
class Meta:
ordering = ('name',)
def __unicode__(self):
return u"%s the place" % self.name
class Restaurant(Place):
serves_hot... | gpl-3.0 |
alexm92/sentry | src/sentry/south_migrations/0041_auto__add_field_messagefiltervalue_last_seen__add_field_messagefilterv.py | 36 | 16053 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'MessageFilterValue.last_seen'
db.add_column('sentry_messagefiltervalue', 'last_seen', self.gf('dja... | bsd-3-clause |
libscie/liberator | liberator/lib/python3.6/site-packages/django/utils/http.py | 10 | 16315 | from __future__ import unicode_literals
import base64
import calendar
import datetime
import re
import sys
import unicodedata
import warnings
from binascii import Error as BinasciiError
from email.utils import formatdate
from django.core.exceptions import TooManyFieldsSent
from django.utils import six
from django.uti... | cc0-1.0 |
fast90/youtube-dl | youtube_dl/extractor/people.py | 23 | 1139 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class PeopleIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?people\.com/people/videos/0,,(?P<id>\d+),00\.html'
_TEST = {
'url': 'http://www.people.com/people/videos/0,,20995451,00.html',
'info_dict... | unlicense |
sdiazpier/nest-simulator | extras/ConnPlotter/examples/complex.py | 20 | 4833 | # -*- coding: utf-8 -*-
#
# complex.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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
# (... | gpl-2.0 |
ChromiumWebApps/chromium | third_party/re2/re2/make_unicode_casefold.py | 218 | 3591 | #!/usr/bin/python
# coding=utf-8
#
# Copyright 2008 The RE2 Authors. All Rights Reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# See unicode_casefold.h for description of case folding tables.
"""Generate C++ table for Unicode case folding."""
import u... | bsd-3-clause |
janek-warchol/ansible | lib/ansible/cli/adhoc.py | 39 | 5881 | # (c) 2012, 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) any lat... | gpl-3.0 |
andrius-preimantas/odoo | addons/l10n_ch/__openerp__.py | 160 | 2936 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi. Copyright Camptocamp SA
# Financial contributors: Hasa SA, Open Net SA,
# Prisme Solutions Informatique SA, Quod SA
#
# Translation contributors: brain-te... | agpl-3.0 |
jonathanunderwood/numpy | numpy/dual.py | 174 | 1864 | """
Aliases for functions which may be accelerated by Scipy.
Scipy_ can be built to use accelerated or otherwise improved libraries
for FFTs, linear algebra, and special functions. This module allows
developers to transparently support these accelerated functions when
scipy is available but still support users who hav... | bsd-3-clause |
akx/gentry | gore/api/handlers/store.py | 1 | 1862 | import base64
import json
import logging
import zlib
from datetime import datetime
from django.conf import settings
from django.db import transaction
from django.http import JsonResponse
from django.utils.encoding import force_str
from django.utils.timezone import make_aware
from pytz import UTC
from gore.auth import... | mit |
smesdaghi/geonode | geonode/maps/management/__init__.py | 31 | 2334 | #########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# 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
#... | gpl-3.0 |
Zenfone2-Dev/kernel_4.3.y | arch/ia64/scripts/unwcheck.py | 13143 | 1714 | #!/usr/bin/python
#
# Usage: unwcheck.py FILE
#
# This script checks the unwind info of each function in file FILE
# and verifies that the sum of the region-lengths matches the total
# length of the function.
#
# Based on a shell/awk script originally written by Harish Patil,
# which was converted to Perl by Matthew Ch... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.