repo_name stringlengths 5 100 | path stringlengths 4 375 | copies stringclasses 991
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
2014c2g1/c2g1 | exts/exts/sphinxcontrib/bibtex/latex_lexer.py | 38 | 12344 | # -*- coding: utf-8 -*-
"""
Simple incremental latex lexer
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
import codecs
import collections
import re
class Token(collections.namedtuple("Token", "name text")):
"""Stores information about a matched token."""
__slots__ = () # efficiency
def __new__(cls, name=Non... | gpl-2.0 |
jwinzer/OpenSlides | server/openslides/mediafiles/migrations/0004_directories_and_permissions_1.py | 7 | 2062 | # Generated by Django 2.2.2 on 2019-06-28 06:06
from django.db import migrations, models
import openslides.mediafiles.models
import openslides.utils.models
class Migration(migrations.Migration):
dependencies = [("mediafiles", "0003_auto_20190119_1425")]
operations = [
migrations.AlterModelOptions(... | mit |
walkers-mv/luigi | luigi/util.py | 22 | 8150 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... | apache-2.0 |
blaggacao/server-tools | __unported__/fetchmail_attach_from_folder/wizard/attach_mail_manually.py | 6 | 5137 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Therp BV (<http://therp.nl>)
# All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
#... | agpl-3.0 |
Venturi/cms | env/lib/python2.7/site-packages/phonenumbers/shortdata/region_IQ.py | 11 | 1035 | """Auto-generated file, do not edit by hand. IQ metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_IQ = PhoneMetadata(id='IQ', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='[1479]\\d{2,4}', possible_number_patter... | gpl-2.0 |
MaheshBhosale/totem-tosha | distribute-0.6.35/setuptools/command/install_egg_info.py | 357 | 3833 | from setuptools import Command
from setuptools.archive_util import unpack_archive
from distutils import log, dir_util
import os, shutil, pkg_resources
class install_egg_info(Command):
"""Install an .egg-info directory for the package"""
description = "Install an .egg-info directory for the package"
user_... | apache-2.0 |
Reflexe/doc_to_pdf | Windows/program/python-core-3.5.0/lib/mailbox.py | 5 | 78418 | """Read/write support for Maildir, mbox, MH, Babyl, and MMDF mailboxes."""
# Notes for authors of new mailbox subclasses:
#
# Remember to fsync() changes to disk before closing a modified file
# or returning from a flush() method. See functions _sync_flush() and
# _sync_close().
import os
import time
import calendar... | mpl-2.0 |
infobloxopen/infoblox-netmri | infoblox_netmri/api/broker/v3_1_0/collection_schedule_broker.py | 17 | 28107 | from ..broker import Broker
class CollectionScheduleBroker(Broker):
controller = "collection_schedules"
def index(self, **kwargs):
"""Lists the available collection schedules. Any of the inputs listed may be be used to narrow the list; other inputs will be ignored. Of the various ways to query lists,... | apache-2.0 |
pk-sam/crosswalk-test-suite | wrt/tct-rt02-wrt-tests/inst.apk.py | 903 | 3180 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
ADB_CMD = "adb"
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool... | bsd-3-clause |
akosel/servo | tests/wpt/css-tests/tools/pywebsocket/src/example/bench_wsh.py | 495 | 2322 | # Copyright 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 f... | mpl-2.0 |
Radagast-red/golem | golem/interface/client/environments.py | 1 | 1641 | from golem.interface.command import group, CommandHelper, Argument, command, CommandResult
@group(name="envs", help="Manage environments")
class Environments(object):
name = Argument('name', help="Environment name")
table_headers = ['name', 'supported', 'active', 'performance', 'description']
sort = Ar... | gpl-3.0 |
pymedusa/SickRage | ext/tornado/platform/auto.py | 4 | 1877 | #
# Copyright 2011 Facebook
#
# 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, s... | gpl-3.0 |
google/llvm-propeller | llvm/bindings/python/llvm/tests/test_object.py | 36 | 2201 | from numbers import Integral
from .base import TestBase
from ..object import ObjectFile
from ..object import Relocation
from ..object import Section
from ..object import Symbol
class TestObjectFile(TestBase):
def get_object_file(self):
source = self.get_test_binary()
return ObjectFile(filename=sou... | apache-2.0 |
wavewave/madgraph-auto-model | modelrepo/ADMXQLD333/particles.py | 8 | 24125 | # This file was automatically created by FeynRules $Revision: 510 $
# Mathematica version: 7.0 for Linux x86 (64-bit) (February 18, 2009)
# Date: Wed 2 Mar 2011 15:09:55
from __future__ import division
from object_library import all_particles, Particle
import parameters as Param
a = Particle(pdg_code = 22,
... | bsd-2-clause |
mpenning/exscript | tests/Exscript/FileLoggerTest.py | 6 | 3087 | import sys, unittest, re, os.path
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', 'src'))
from tempfile import mkdtemp
from shutil import rmtree
from Exscript import Host
from Exscript.FileLogger import FileLogger
from LoggerTest import LoggerTest, FakeJob
class FakeError(Exception):
pass
... | gpl-2.0 |
Suninus/NewsBlur | apps/profile/migrations/0019_dashboard_date.py | 18 | 6206 | # 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 'Profile.dashboard_date'
db.add_column('profile_profile', 'dashboard_date', self.gf('django... | mit |
gianina-ingenuity/titanium-branch-deep-linking | testbed/x/mobilesdk/osx/5.5.1.GA/common/markdown/preprocessors.py | 112 | 7128 |
"""
PRE-PROCESSORS
=============================================================================
Preprocessors work on source text before we start doing anything too
complicated.
"""
import re
import markdown
HTML_PLACEHOLDER_PREFIX = markdown.STX+"wzxhzdk:"
HTML_PLACEHOLDER = HTML_PLACEHOLDER_PREFIX + "%d" + mark... | mit |
r-mart/scikit-learn | examples/tree/plot_tree_regression.py | 206 | 1476 | """
===================================================================
Decision Tree Regression
===================================================================
A 1D regression with decision tree.
The :ref:`decision trees <tree>` is
used to fit a sine curve with addition noisy observation. As a result, it
learns ... | bsd-3-clause |
arista-eosplus/ansible | test/units/module_utils/basic/test_exit_json.py | 18 | 7252 | # -*- coding: utf-8 -*-
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.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
# (a... | gpl-3.0 |
jendap/tensorflow | tensorflow/python/util/dispatch.py | 22 | 6842 | # 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 |
YongseopKim/crosswalk-test-suite | webapi/tct-alarm-tizen-tests/inst.apk.py | 903 | 3180 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
ADB_CMD = "adb"
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool... | bsd-3-clause |
ClydeSpace-GroundStation/GroundStation | Utilities/Supporting_Libraries/gr-bruninga-master/python/fsk_demod.py | 1 | 5330 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014 <+YOU OR YOUR COMPANY+>.
#
# This is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#... | mit |
ariafan/S5501-3.10 | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | 5411 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... | gpl-2.0 |
ideaworld/BioDesigner | design/views.py | 1 | 13070 | """
@author: Bowen
"""
from django.shortcuts import render
from django.db.models import Q
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render, get_object_or_404, render_to_response
from django.template import RequestContext, loader
from django.core.mail import send_mail
from... | apache-2.0 |
smesdaghi/geonode | geonode/geoserver/context_processors.py | 31 | 1889 | #########################################################################
#
# 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 |
wallnerryan/quantum_migrate | quantum/openstack/common/context.py | 14 | 2619 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apac... | apache-2.0 |
vrenaville/OCB | addons/association/__init__.py | 886 | 1054 | # -*- 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... | agpl-3.0 |
peterb12/nand2tetris | src/JackCompiler/VMWriter.py | 1 | 1417 | from jc_types import Scope
class VMWriter:
arithmeticOperations = ["add", "sub", "and", "or", "not", "neg", "eq", "gt", "lt"]
scopeTable = { Scope.STATIC : "static",
Scope.FIELD : "dunno?",
Scope.ARG : "argument",
Scope.VAR : "local" }
def __init__... | bsd-3-clause |
madgik/exareme | Exareme-Docker/src/exareme/exareme-tools/madis/src/lib/pyreadline/modes/notemacs.py | 1 | 24681 | # -*- coding: utf-8 -*-
# *****************************************************************************
# Copyright (C) 2003-2006 Gary Bishop.
# Copyright (C) 2006 Jorgen Stenarson. <jorgen.stenarson@bostream.nu>
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYI... | mit |
tangyiyong/odoo | addons/document/std_index.py | 430 | 7457 | # -*- 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... | agpl-3.0 |
c0defreak/python-for-android | python3-alpha/extra_modules/gdata/Crypto/Util/RFC1751.py | 43 | 20130 | #!/usr/bin/python
# rfc1751.py : Converts between 128-bit strings and a human-readable
# sequence of words, as defined in RFC1751: "A Convention for
# Human-Readable 128-bit Keys", by Daniel L. McDonald.
__revision__ = "$Id: RFC1751.py,v 1.6 2003/04/04 15:15:10 akuchling Exp $"
import string, binascii
from functools... | apache-2.0 |
tp-openstack-m2dl/TP-MapReduce | python/mapreduce.py | 1 | 1232 | from multiprocessing import Pool
"""
A generator function for chopping up a given list into chunks of
length n.
"""
def chunks(l, n):
for i in xrange(0, len(l), n):
yield l[i:i+n]
def MapReduce(Map, Reduce, text):
l = min(len(text),8)
# Fragment the string data into 8 chunks
partitioned_text = list(chunks... | apache-2.0 |
pitch-sands/i-MPI | flask/Lib/site-packages/openid/message.py | 146 | 21562 | """Extension argument processing code
"""
__all__ = ['Message', 'NamespaceMap', 'no_default', 'registerNamespaceAlias',
'OPENID_NS', 'BARE_NS', 'OPENID1_NS', 'OPENID2_NS', 'SREG_URI',
'IDENTIFIER_SELECT']
import copy
import warnings
import urllib
from openid import oidutil
from openid import kvf... | bsd-3-clause |
edisonlz/fruit | web_project/app/content/views/city.py | 1 | 3136 | # coding=utf-8
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseRedirect
from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse
import json
from app.content.models import City,ShoppingAddress
f... | apache-2.0 |
cbanta/pjproject | tests/pjsua/scripts-recvfrom/208_reg_good_retry_nonce_ok.py | 42 | 1029 | # $Id$
import inc_sip as sip
import inc_sdp as sdp
pjsua = "--null-audio --id=sip:CLIENT --registrar sip:127.0.0.1:$PORT " + \
"--realm=python --user=username --password=password " + \
"--auto-update-nat=0"
req1 = sip.RecvfromTransaction("Initial request", 401,
include=["REGISTER sip"],
exclude=["Authoriza... | gpl-2.0 |
acshan/odoo | addons/sale_layout/models/sale_layout.py | 180 | 5037 | # -*- 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 ... | agpl-3.0 |
blossomica/airmozilla | airmozilla/main/migrations/0002_auto_20150903_1343.py | 9 | 9951 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('auth', '0001_initial'),
('uploads', '0001_initial'),
migrat... | bsd-3-clause |
veltzer/demos-linux | config/project.py | 1 | 4910 | import datetime
import config.general
project_github_username='veltzer'
project_name='demos-linux'
project_website='https://{project_github_username}.github.io/{project_name}'.format(**locals())
project_website_source='https://github.com/{project_github_username}/{project_name}'.format(**locals())
project_website_git=... | gpl-3.0 |
mrquim/repository.mrquim | repo/script.module.covenant/lib/resources/lib/sources/en/mzmovies.py | 7 | 6851 | # -*- coding: utf-8 -*-
'''
Covenant Add-on
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This prog... | gpl-2.0 |
rven/odoo | addons/account_edi_extended/models/account_move.py | 2 | 4061 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, models, fields, _
class AccountMove(models.Model):
_inherit = 'account.move'
edi_show_abandon_cancel_button = fields.Boolean(
compute='_compute_edi_show_abandon_cancel_button')
... | agpl-3.0 |
chemelnucfin/tensorflow | tensorflow/python/autograph/core/converter.py | 5 | 13637 | # 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 |
Bjay1435/capstone | rootfs/usr/lib/python2.7/token.py | 73 | 2922 | """Token constants (from "token.h")."""
# This file is automatically generated; please don't muck it up!
#
# To update the symbols in this file, 'cd' to the top directory of
# the python source tree after building the interpreter and run:
#
# ./python Lib/token.py
#--start constants--
ENDMARKER = 0
NAME = 1
NUM... | mit |
thomasem/nova | nova/api/openstack/compute/plugins/v3/admin_actions.py | 33 | 3773 | # 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 required by applicable law or a... | apache-2.0 |
Korkki/django | tests/inspectdb/models.py | 208 | 2737 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
class People(models.Model):
name = models.CharField(max_length=255)
parent = models.ForeignKey('self', models.CASCADE)
class Message(models.Model):
from_field = models.ForeignKey(People, models.CASCADE, db_co... | bsd-3-clause |
shreks7/crazyflie-android-no-otg | CrazyFliePythonServer/crazyflie/main.py | 1 | 18432 | /**
*
* The MIT License (MIT)
*
* Copyright (c) 2013 Shrey Malhotra
*
* 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 witho... | mit |
thopiekar/Cura | plugins/UM3NetworkPrinting/src/Models/Http/CloudClusterStatus.py | 1 | 1234 | # Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
from datetime import datetime
from typing import List, Dict, Union, Any
from ..BaseModel import BaseModel
from .ClusterPrinterStatus import ClusterPrinterStatus
from .ClusterPrintJobStatus import ClusterPrintJobStatus
# M... | lgpl-3.0 |
yoghadj/or-tools | examples/python/steel.py | 32 | 6171 | # Copyright 2010 Pierre Schaus pschaus@gmail.com, lperron@google.com
#
# 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 ... | apache-2.0 |
Lujeni/ansible | lib/ansible/modules/network/fortios/fortios_system_resource_limits.py | 13 | 12995 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, 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, either version 3 of the Lic... | gpl-3.0 |
stvstnfrd/edx-platform | lms/djangoapps/program_enrollments/management/commands/reset_enrollment_data.py | 5 | 2105 | """
Management command to remove enrollments and any related models created as
a side effect of enrolling students.
Intented for use in integration sandbox environments
"""
import logging
from textwrap import dedent
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
... | agpl-3.0 |
shams169/pythonProject | ContactsDir/env/lib/python3.6/site-packages/setuptools/sandbox.py | 21 | 14543 | import os
import sys
import tempfile
import operator
import functools
import itertools
import re
import contextlib
import pickle
import textwrap
from setuptools.extern import six
from setuptools.extern.six.moves import builtins, map
import pkg_resources
if sys.platform.startswith('java'):
import org.python.modul... | mit |
mbachry/exxo | exxo/venv.py | 1 | 2558 | ACTIVATE_SCRIPT = """# This file must be used with "source bin/activate" *from bash*
# you cannot run it directly
deactivate () {
# reset old environment variables
if [ -n "$_OLD_VIRTUAL_PATH" ] ; then
PATH="$_OLD_VIRTUAL_PATH"
export PATH
unset _OLD_VIRTUAL_PATH
fi
# This shoul... | isc |
TNT-Samuel/Coding-Projects | DNS Server/Source - Copy/Lib/encodings/cp1255.py | 272 | 12466 | """ Python Character Mapping Codec cp1255 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1255.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_table)
def decode(self,in... | gpl-3.0 |
mdworks2016/work_development | Python/20_Third_Certification/venv/lib/python3.7/site-packages/django/utils/translation/__init__.py | 5 | 10790 | """
Internationalization support.
"""
import re
import warnings
from contextlib import ContextDecorator
from decimal import ROUND_UP, Decimal
from django.utils.autoreload import autoreload_started, file_changed
from django.utils.deprecation import RemovedInDjango40Warning
from django.utils.functional import lazy
__al... | apache-2.0 |
trdean/grEME | gr-uhd/apps/hf_radio/ssbdemod.py | 58 | 4082 | # Copyright 2011 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
#
# G... | gpl-3.0 |
miipl-naveen/optibizz | addons/account/project/report/inverted_analytic_balance.py | 358 | 5760 | # -*- 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 |
lucasmachadorj/pypln.web | pypln/web/core/tests/views/test_document.py | 2 | 11044 | # -*- coding:utf-8 -*-
#
# Copyright 2012 NAMD-EMAP-FGV
#
# This file is part of PyPLN. You can get more information at: http://pypln.org/.
#
# PyPLN 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 vers... | gpl-3.0 |
jotes/ansible | v2/ansible/plugins/connections/winrm.py | 29 | 11717 | # (c) 2014, Chris Church <chris@ninemoreminutes.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 |
ahb0327/intellij-community | python/lib/Lib/readline.py | 82 | 5885 | from __future__ import with_statement
import os.path
import sys
from warnings import warn
import java.lang.reflect.Array
__all__ = ['add_history', 'clear_history', 'get_begidx', 'get_completer',
'get_completer_delims', 'get_current_history_length',
'get_endidx', 'get_history_item', 'get_history_... | apache-2.0 |
agrista/odoo-saas | openerp/report/render/rml2pdf/trml2pdf.py | 256 | 46679 | # -*- 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 GNU... | agpl-3.0 |
wangyum/tensorflow | tensorflow/contrib/distributions/python/kernel_tests/gamma_test.py | 1 | 14770 | # 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 |
rikirenz/inspire-next | tests/integration/test_detailed_records.py | 2 | 1956 | # -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2014-2017 CERN.
#
# INSPIRE 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 ... | gpl-3.0 |
gurneyalex/OpenUpgrade | addons/base_import/tests/test_cases.py | 101 | 13059 | # -*- encoding: utf-8 -*-
import unittest2
from openerp.tests.common import TransactionCase
from .. import models
ID_FIELD = {'id': 'id', 'name': 'id', 'string': "External ID", 'required': False, 'fields': []}
def make_field(name='value', string='unknown', required=False, fields=[]):
return [
ID_FIELD,
... | agpl-3.0 |
nvbn/python-social-auth | social/tests/backends/test_github.py | 11 | 4899 | import json
from httpretty import HTTPretty
from social.exceptions import AuthFailed
from social.tests.backends.oauth import OAuth2Test
class GithubOAuth2Test(OAuth2Test):
backend_path = 'social.backends.github.GithubOAuth2'
user_data_url = 'https://api.github.com/user'
expected_username = 'foobar'
... | bsd-3-clause |
lucuma/solution | solution/utils.py | 2 | 2728 | # coding=utf-8
import datetime
import re
from xml.sax.saxutils import quoteattr
from markupsafe import Markup, escape_silent
from ._compat import to_unicode, iteritems
class FakeMultiDict(dict):
"""Adds a fake `getlist` method to a regular dict; or acts as a proxy to
Webob's MultiDict `getall` method.
"... | mit |
tallakahath/pymatgen | pymatgen/util/coord_utils.py | 2 | 15753 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
from six.moves import zip
import itertools
import numpy as np
import math
from . import coord_utils_cython as cuc
"""
Utilities for manipulating coordinates o... | mit |
idooley/AnalogCrossover | calculator/high_pass_with_gain.py | 1 | 3175 | #!/opt/local/bin/python3.4
# Loads some common capacitor and resistor values and then exhaustively searches the space of possible combinations to find a good combination.
import re,sys,math,blist
from blist import sortedset
def convertToValue(x) :
y = x.strip()
if y.endswith("pF") :
return float(y.replace... | bsd-3-clause |
cebrusfs/217gdb | pwndbg/strings.py | 5 | 1331 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Functionality for resolving ASCII printable strings within
the debuggee's address space.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import string
import gdb
... | mit |
crs4/blast-python | BlastPython/blaster.py | 1 | 1869 | # BEGIN_COPYRIGHT
#
# Copyright (C) 2014 CRS4.
#
# This file is part of blast-python.
#
# blast-python 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)
# ... | gpl-3.0 |
40223117cda/w16cdaa | static/Brython3.1.3-20150514-095342/Lib/platform.py | 620 | 51006 | #!/usr/bin/env python3
""" This module tries to retrieve as much platform-identifying data as
possible. It makes this information available via function APIs.
If called from the command line, it prints the platform
information concatenated as single string to stdout. The output
format is useable as pa... | gpl-3.0 |
SuriyaaKudoIsc/olympia | scripts/update/update.py | 1 | 5688 | import os
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from commander.deploy import hostgroups, task
import commander_settings as settings
_src_dir = lambda *p: os.path.join(settings.SRC_DIR, *p)
VIRTUALENV = os.path.join(os.path.dirname(settings.SRC_DIR), 'venv')
@task
def create_virtu... | bsd-3-clause |
windygu/xbmc-addon | plugin.video.xunlei/mechanize/_html.py | 132 | 20888 | """HTML handling.
Copyright 2003-2006 John J. Lee <jjl@pobox.com>
This code is free software; you can redistribute it and/or modify it under
the terms of the BSD or ZPL 2.1 licenses (see the file COPYING.txt
included with the distribution).
"""
import codecs
import copy
import htmlentitydefs
import re
import _sgml... | apache-2.0 |
bitifirefly/edx-platform | common/djangoapps/cache_toolbox/templatetags/cache_toolbox.py | 239 | 2059 | from django import template
from django.core.cache import cache
from django.template import Node, TemplateSyntaxError, Variable
from django.template import resolve_variable
register = template.Library()
class CacheNode(Node):
def __init__(self, nodelist, expire_time, key):
self.nodelist = nodelist
... | agpl-3.0 |
g12mcgov/home-assistant | homeassistant/components/thermostat/demo.py | 19 | 2080 | """
homeassistant.components.thermostat.demo
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Demo platform that offers a fake thermostat.
"""
from homeassistant.components.thermostat import ThermostatDevice
from homeassistant.const import TEMP_CELCIUS, TEMP_FAHRENHEIT
def setup_platform(hass, config, add_devices, discovery... | mit |
drewokane/seaborn | seaborn/tests/test_utils.py | 11 | 11338 | """Tests for plotting utilities."""
import warnings
import tempfile
import shutil
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import nose
import nose.tools as nt
from nose.tools import assert_equal, raises
import numpy.testing as npt
import pandas.util.testing as pdt
from distutils.version ... | bsd-3-clause |
cbclab/MDT | mdt/gui/maps_visualizer/config_tabs/tab_general.py | 1 | 18316 | import copy
import os
from PyQt5.QtCore import pyqtSlot, Qt, QPoint, QUrl
from PyQt5.QtGui import QDesktopServices
from PyQt5.QtWidgets import QWidget, QAbstractItemView, QMenu, QWidgetAction, QLabel
from mdt.gui.maps_visualizer.actions import SetDimension, SetSliceIndex, SetVolumeIndex, SetColormap, SetRotate, \
... | lgpl-3.0 |
kiszk/spark | python/pyspark/mllib/util.py | 18 | 19611 | #
# 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 us... | apache-2.0 |
kostaspl/SpiderMonkey38 | python/mozbuild/mozbuild/test/backend/test_recursivemake.py | 1 | 29117 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import unicode_literals
import json
import os
import unittest
from mozpack.manifests import (
Inst... | mpl-2.0 |
Mazecreator/tensorflow | tensorflow/compiler/tests/xla_device_test.py | 76 | 1639 | # Copyright 2017 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 |
datakortet/django-cms | cms/tests/security.py | 11 | 8935 | from __future__ import with_statement
from cms.api import create_page, add_plugin
from cms.models.pluginmodel import CMSPlugin
from cms.plugins.text.models import Text
from cms.test_utils.testcases import (CMSTestCase, URL_CMS_PLUGIN_ADD,
URL_CMS_PLUGIN_EDIT, URL_CMS_PLUGIN_REMOVE)
from django.conf import settings... | bsd-3-clause |
arkmaxim/grpc | src/python/grpcio_tests/tests/unit/beta/_connectivity_channel_test.py | 15 | 2117 | # Copyright 2015, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause |
mzdaniel/oh-mainline | vendor/packages/Django/django/db/backends/mysql/client.py | 524 | 1380 | import os
import sys
from django.db.backends import BaseDatabaseClient
class DatabaseClient(BaseDatabaseClient):
executable_name = 'mysql'
def runshell(self):
settings_dict = self.connection.settings_dict
args = [self.executable_name]
db = settings_dict['OPTIONS'].get('db', settings_d... | agpl-3.0 |
stefanhahmann/pybossa | test/test_repository/test_user_repository.py | 6 | 8682 | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2014 SF Isle of Man Limited
#
# PyBossa is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | agpl-3.0 |
albertliangcode/DiceRoll | venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sbcsgroupprober.py | 2936 | 3291 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | mit |
rsunder10/PopularityBased-SearchEngine | lib/python3.4/site-packages/django/core/cache/backends/locmem.py | 586 | 4287 | "Thread-safe in-memory cache backend."
import time
from contextlib import contextmanager
from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache
from django.utils.synch import RWLock
try:
from django.utils.six.moves import cPickle as pickle
except ImportError:
import pickle
# Global in-memor... | mit |
dony71/OpenWrt_Backfire | scripts/dl_cleanup.py | 31 | 5878 | #!/usr/bin/env python
"""
# OpenWRT download directory cleanup utility.
# Delete all but the very last version of the program tarballs.
#
# Copyright (c) 2010 Michael Buesch <mb@bu3sch.de>
"""
import sys
import os
import re
import getopt
# Commandline options
opt_dryrun = False
def parseVer_1234(match, filepath):
... | gpl-2.0 |
weimingtom/python-for-android | python3-alpha/python3-src/Lib/plat-linux3/DLFCN.py | 171 | 1625 | # Generated by h2py from /usr/include/dlfcn.h
_DLFCN_H = 1
# Included from features.h
_FEATURES_H = 1
__USE_ANSI = 1
__FAVOR_BSD = 1
_ISOC99_SOURCE = 1
_POSIX_SOURCE = 1
_POSIX_C_SOURCE = 199506
_XOPEN_SOURCE = 600
_XOPEN_SOURCE_EXTENDED = 1
_LARGEFILE64_SOURCE = 1
_BSD_SOURCE = 1
_SVID_SOURCE = 1
_BSD_SOURCE = 1
_SVI... | apache-2.0 |
alexproca/askbot-devel | askbot/management/commands/askbot_rebuild_index.py | 9 | 4020 | import sys
from optparse import make_option
from django.core.management import get_commands, load_command_class
from django.utils.translation import activate as activate_language
from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
try:
from haystack.management.comman... | gpl-3.0 |
oceanobservatories/mi-instrument | mi/dataset/parser/test/test_cg_stc_eng_stc.py | 5 | 16780 | #!/usr/bin/env python
"""
@package mi.dataset.parser.test.test_cg_stc_eng_stc
@file marine-integrations/mi/dataset/parser/test/test_cg_stc_eng_stc.py
@author Mike Nicoletti
@brief Test code for a Cg_stc_eng_stc data parser
"""
import os
import re
import ntplib
from nose.plugins.attrib import attr
from mi.core.except... | bsd-2-clause |
foss-for-synopsys-dwc-arc-processors/RIOT | tests/lwip/tests/01-run.py | 15 | 11444 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2016 Martine Lenders <mail@martine-lenders.eu>
#
# Distributed under terms of the MIT license.
from __future__ import print_function
import argparse
import os, sys
import random
import pexpect
import subprocess
import time
import types
DE... | lgpl-2.1 |
UstadMobile/exelearning-extjs5-mirror | twisted/plugins/twisted_trial.py | 14 | 1880 |
from zope.interface import implements
from twisted.python.components import backwardsCompatImplements
from twisted.trial.itrial import IReporter
from twisted.plugin import IPlugin
class _Reporter(object):
implements(IPlugin, IReporter)
def __init__(self, name, module, description, longOpt, shortOpt, klass):... | gpl-2.0 |
wanderine/nipype | nipype/interfaces/slicer/filtering/histogrammatching.py | 15 | 2978 | # -*- coding: utf8 -*-
"""Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator."""
from nipype.interfaces.base import CommandLine, CommandLineInputSpec, SEMLikeCommandLine, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath
i... | bsd-3-clause |
thomazs/geraldo | site/newsite/site-geraldo/django/db/models/__init__.py | 14 | 1245 | from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist, ImproperlyConfigured
from django.db import connection
from django.db.models.loading import get_apps, get_app, get_models, get_model, register_models
from django.db.models.query import Q
from django.db.models.manager import Manager
f... | lgpl-3.0 |
RackSec/ansible | lib/ansible/compat/tests/unittest.py | 375 | 1147 | # (c) 2014, Toshio Kuratomi <tkuratomi@ansible.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 later... | gpl-3.0 |
ycl2045/nova-master | nova/tests/api/openstack/compute/plugins/v3/test_agents.py | 19 | 13966 | # Copyright 2012 IBM Corp.
#
# 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 t... | apache-2.0 |
FTBZ/librenms | LibreNMS/service.py | 14 | 31186 | import LibreNMS
import json
import logging
import os
import subprocess
import threading
import sys
import time
import timeit
from datetime import timedelta
from logging import debug, info, warning, error, critical, exception
from platform import python_version
from time import sleep
from socket import gethostname
fro... | gpl-3.0 |
mmp2/megaman | doc/sphinxext/numpy_ext/edit_on_github.py | 11 | 5895 | # Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
This extension makes it easy to edit documentation on github.
It adds links associated with each docstring that go to the
corresponding view source page on Github. From there, the user can
push the "Edit" button, edit the docstring, and submit a pull... | bsd-2-clause |
mbareta/edx-platform-ft | common/lib/xmodule/xmodule/modulestore/mixed.py | 10 | 43011 | """
MixedModuleStore allows for aggregation between multiple modulestores.
In this way, courses can be served up via either SplitMongoModuleStore or MongoModuleStore.
"""
import logging
from contextlib import contextmanager
import itertools
import functools
from contracts import contract, new_contract
from opaque_k... | agpl-3.0 |
cezary12/blaze | blaze/catalog/array_provider.py | 13 | 5440 | from __future__ import absolute_import, division, print_function
import os
from os import path
import glob
import shutil
import tempfile
from dynd import nd, ndt
from .. import array
def load_json_file_array(root, array_name):
# Load the datashape
dsfile = root + '.datashape'
if not path.isfile(dsfile)... | bsd-3-clause |
rpgplanet/django-avatar | avatar/settings.py | 37 | 1294 | from django.conf import settings
try:
from PIL import Image
dir(Image) # Placate PyFlakes
except ImportError:
import Image
AVATAR_DEFAULT_SIZE = getattr(settings, 'AVATAR_DEFAULT_SIZE', 80)
AUTO_GENERATE_AVATAR_SIZES = getattr(settings, 'AUTO_GENERATE_AVATAR_SIZES', (AVATAR_DEFAULT_SIZE,))
AVATAR_RESIZE_M... | bsd-3-clause |
cclauss/heroku-buildpack-python | vendor/pip-pop/pip/_vendor/requests/packages/chardet/hebrewprober.py | 2929 | 13359 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Shy Shalom
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved.
#... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.