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 |
|---|---|---|---|---|---|
IQSS/geoconnect | gc_apps/gis_shapefiles/views_02_visualize.py | 1 | 4711 | from __future__ import print_function
import logging
from django.http import HttpResponse
from django.views.generic import View
from django.template.loader import render_to_string
from django.conf import settings
from gc_apps.gis_shapefiles.models import ShapefileInfo
from gc_apps.worldmap_layers.models import World... | apache-2.0 |
xutian/virt-test | virttest/postprocess_iozone.py | 14 | 19852 | #!/usr/bin/python
"""
Postprocessing module for IOzone. It is capable to pick results from an
IOzone run, calculate the geometric mean for all throughput results for
a given file size or record size, and then generate a series of 2D and 3D
graphs. The graph generation functionality depends on gnuplot, and if it
is not ... | gpl-2.0 |
nickmilon/milonpy | milonpy/utils/basic2.py | 1 | 14147 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#######################################################
'''
module: utilities.basic2
Created:Aug 21, 2012
author: nickmilon
Description: Description: Simple utilities (2) and Vars - Very Limited IMPORTS HERE !
'''
###############################... | apache-2.0 |
OptimusGitEtna/RestSymf | Python-3.4.2/Lib/_osx_support.py | 86 | 19101 | """Shared OS X support functions."""
import os
import re
import sys
__all__ = [
'compiler_fixup',
'customize_config_vars',
'customize_compiler',
'get_platform_osx',
]
# configuration variables that may contain universal build flags,
# like "-arch" or "-isdkroot", that may need customization for
# the... | mit |
AnthonyCheetham/naco_ispy | data_handling_scripts/queue_cal_analysis.py | 1 | 1931 | # -*- coding: utf-8 -*-
"""
Created on Fri Nov 11 10:41:32 2016
Program to run through the calibrations folders and queue all data for analysis
It isn't yet smart enough to check which ones are done already
@author: cheetham
"""
import naco_ispy,subprocess,os,argparse,glob
parser = argparse.ArgumentParser(descript... | gpl-3.0 |
mattnenterprise/servo | tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/node.py | 35 | 4104 | class NodeVisitor(object):
def visit(self, node):
# This is ugly as hell, but we don't have multimethods and
# they aren't trivial to fake without access to the class
# object from the class body
func = getattr(self, "visit_%s" % (node.__class__.__name__))
return func(node)
... | mpl-2.0 |
Maronato/SpottedBot | custom_auth/facebook_methods.py | 1 | 4677 | import facebook
from django.conf import settings
from django.shortcuts import reverse
from urllib.parse import urlencode, quote, unquote
from django.contrib.auth import login
from django.contrib import messages
app_id = settings.SOCIAL_FACEBOOK_KEY
app_secret = settings.SOCIAL_FACEBOOK_SECRET
def get_graph():
"... | agpl-3.0 |
agconti/cookiecutter | cookiecutter/replay.py | 6 | 1531 | # -*- coding: utf-8 -*-
"""
cookiecutter.replay
-------------------
"""
from __future__ import unicode_literals
import json
import os
from .compat import is_string
from .config import get_user_config
from .utils import make_sure_path_exists
def get_file_name(replay_dir, template_name):
file_name = '{}.json'.f... | bsd-3-clause |
simonemurzilli/geonode | geonode/groups/views.py | 31 | 8608 | from django.contrib.auth import get_user_model
from django.core.urlresolvers import reverse
from django.http import Http404, HttpResponseForbidden, HttpResponseRedirect, HttpResponseNotAllowed
from django.shortcuts import render_to_response, get_object_or_404, redirect
from django.template import RequestContext
from dj... | gpl-3.0 |
waseem18/oh-mainline | mysite/profile/management/commands/profile_daily_tasks.py | 15 | 2367 | # This file is part of OpenHatch.
# Copyright (C) 2010 OpenHatch, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | agpl-3.0 |
redhat-openstack/horizon | openstack_dashboard/dashboards/admin/images/tests.py | 8 | 8876 | # Copyright 2012 Nebula, 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 agree... | apache-2.0 |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/numpy/conftest.py | 17 | 1719 | """
Pytest configuration and fixtures for the Numpy test suite.
"""
from __future__ import division, absolute_import, print_function
import warnings
import pytest
import numpy
import importlib
from numpy.core._multiarray_tests import get_fpu_mode
_old_fpu_mode = None
_collect_results = {}
#FIXME when yield tests ... | gpl-3.0 |
frugalware/mate | source/gnome-extra/glade/simple-glade-codegen.py | 8 | 13234 | #!/usr/bin/env python
# simple-glade-codegen.py
# A code generator that uses pygtk, glade and SimpleGladeApp.py
# Copyright (C) 2004 Sandino Flores Moreno
# This library 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 Sof... | gpl-2.0 |
Mazecreator/tensorflow | tensorflow/contrib/kernel_methods/python/losses_test.py | 29 | 10136 | # 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 |
sakkka/IESA_Chat_Nodejs | node_modules/utf8/tests/generate-test-data.py | 1788 | 1435 | #!/usr/bin/env python
import re
import json
# https://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
# http://stackoverflow.com/a/13436167/96656
def unisymbol(codePoint):
if codePoint >= 0x0000 and codePoint <= 0xFFFF:
return unichr(codePoint)
elif codePoint >= 0x010000 and codePoint <= 0x10FFFF:
... | gpl-3.0 |
yelizariev/account-financial-tools | __unported__/async_move_line_importer/__openerp__.py | 32 | 2486 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi
# Copyright 2013 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# publi... | agpl-3.0 |
LegoStormtroopr/canard | SQBLWidgets/sqblUI/statementText.py | 1 | 1584 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/statementText.ui'
#
# Created: Sat Jul 25 12:17:11 2015
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
excep... | gpl-3.0 |
qiuzhong/crosswalk-test-suite | embeddingapi/embedding-build-android-tests/comm.py | 4 | 23624 | #!/usr/bin/env python
# coding=utf-8
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of c... | bsd-3-clause |
escapewindow/signingscript | src/signingscript/vendored/mozbuild/mozbuild/action/generate_symbols_file.py | 3 | 3333 | # 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 absolute_import, print_function, unicode_literals
import argparse
import buildconfig
import os
f... | mpl-2.0 |
kurtgeebelen/rawesome | studies/pendulum_sim.py | 2 | 2818 | # Copyright 2012-2013 Greg Horn
#
# This file is part of rawesome.
#
# rawesome is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
... | lgpl-3.0 |
CongSmile/tp-qemu | qemu/tests/rv_video.py | 9 | 3710 | """
rv_video.py - Starts video player
Video is played in a loop, usually kill_app
test should be called later to close totem.
Requires: binaries Xorg, totem, gnome-session
Test starts video player
"""
import logging
import os
import time
import re
from autotest.client.shared import error
from virttest impo... | gpl-2.0 |
40223149/2015cd_midterm | static/Brython3.1.1-20150328-091302/Lib/token.py | 743 | 3034 | """Token constants (from "token.h")."""
__all__ = ['tok_name', 'ISTERMINAL', 'ISNONTERMINAL', 'ISEOF']
# 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:
#
# ./pyth... | gpl-3.0 |
sachinkum/Bal-Aveksha | WebServer/BalAvekshaEnv/lib/python3.5/site-packages/setuptools/sandbox.py | 86 | 14317 | import os
import sys
import tempfile
import operator
import functools
import itertools
import re
import contextlib
import pickle
import six
from six.moves import builtins, map
import pkg_resources
if sys.platform.startswith('java'):
import org.python.modules.posix.PosixModule as _os
else:
_os = sys.modules[o... | gpl-3.0 |
roadmapper/ansible | lib/ansible/modules/cloud/rackspace/rax_network.py | 91 | 3691 | #!/usr/bin/python
# Copyright: 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
fpy171/django | tests/test_utils/tests.py | 97 | 38976 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import unittest
import warnings
from django.conf.urls import url
from django.contrib.staticfiles.finders import get_finder, get_finders
from django.contrib.staticfiles.storage import staticfiles_storage
from django.core.files.storage import default_stora... | bsd-3-clause |
adlius/osf.io | api_tests/nodes/views/test_node_contributors_list.py | 6 | 109793 | # -*- coding: utf-8 -*-
from datetime import datetime
import mock
import pytest
import random
from nose.tools import * # noqa:
from api.base.settings.defaults import API_BASE
from api.nodes.serializers import NodeContributorsCreateSerializer
from framework.auth.core import Auth
from osf_tests.factories import (
f... | apache-2.0 |
samueldeng/crosslan | headquarter/iptman.py | 1 | 2445 | import iptc
import logging
logging.basicConfig(format='[%(levelname)s]\t%(asctime)s\t%(message)s', datefmt='%m/%d/%Y %I:%M:%S %p',
level=logging.DEBUG)
log = logging.getLogger("iptman")
class IptMan():
def __init__(self):
pass
@staticmethod
def insert_rule(port):
try:
... | gpl-2.0 |
Boldie/gourmet | gourmet/defaults/defaults.py | 6 | 3132 | import locale, os
deflang = 'en'
lang = None
if os.name == 'posix':
try:
locale.setlocale(locale.LC_ALL,'')
except:
loc,enc = locale.getdefaultlocale()
else:
loc, enc = locale.getlocale()
# Windows locales are named differently, e.g. German_Austria instead of de_AT
# Fortunately, w... | gpl-2.0 |
google-research/falken | service/generated_flatbuffers/tflite/LessEqualOptions.py | 1 | 2218 | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 |
rnestler/servo | tests/wpt/web-platform-tests/webdriver/tests/cookies/add_cookie.py | 8 | 2734 | from tests.support.fixtures import clear_all_cookies
from tests.support.fixtures import server_config
def test_add_domain_cookie(session, url):
session.url = url("/common/blank.html")
clear_all_cookies(session)
create_cookie_request = {
"cookie": {
"name": "hello",
"value": ... | mpl-2.0 |
rickerc/horizon_audit | openstack_dashboard/dashboards/admin/overview/panel.py | 12 | 1111 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | apache-2.0 |
chongtianfeiyu/kbengine | kbe/src/lib/python/Lib/encodings/cp037.py | 266 | 13121 | """ Python Character Mapping Codec cp037 generated from 'MAPPINGS/VENDORS/MICSFT/EBCDIC/CP037.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,input... | lgpl-3.0 |
ferewuz/libcloud | libcloud/dns/drivers/linode.py | 32 | 10226 | # 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 |
keithmattix/west-tn-quizbowl | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/lexers/_stan_builtins.py | 292 | 6457 | # -*- coding: utf-8 -*-
"""
pygments.lexers._stan_builtins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file contains the names of functions for Stan used by
``pygments.lexers.math.StanLexer.
:copyright: Copyright 2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
KEYWORDS = ['else', 'for', '... | mit |
boomsbloom/dtm-fmri | DTM/for_gensim/lib/python2.7/site-packages/bct/algorithms/similarity.py | 2 | 11325 | from __future__ import division, print_function
import numpy as np
from bct.utils import BCTParamError, binarize
from .degree import degrees_dir, degrees_und
def edge_nei_overlap_bd(CIJ):
'''
This function determines the neighbors of two nodes that are linked by
an edge, and then computes their overlap. ... | mit |
EiSandi/greetingslack | greetingslack/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/langhebrewmodel.py | 2763 | 11318 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Simon Montagu
# Portions created by the Initial Developer are Copyright (C) 2005
# the Initial Developer. All Rights Reserved... | mit |
Fl0rianFischer/sme_odoo | addons/document/models/ir_attachment.py | 25 | 1910 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
import zipfile
import xml.dom.minidom
from StringIO import StringIO
import pyPdf
import openerp
from openerp.osv import fields, osv
_logger = logging.getLogger(__name__)
class IrAttachment(osv.osv):
... | gpl-3.0 |
isrohutamahopetechnik/MissionPlanner | Lib/email/mime/image.py | 73 | 1810 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Barry Warsaw
# Contact: email-sig@python.org
"""Class representing image/* type MIME documents."""
__all__ = ['MIMEImage']
import imghdr
from email import encoders
from email.mime.nonmultipart import MIMENonMultipart
class MIMEImage(M... | gpl-3.0 |
aciddude/Feathercoin | contrib/devtools/fix-copyright-headers.py | 311 | 1474 | #!/usr/bin/env python
'''
Run this script inside of src/ and it will look for all the files
that were changed this year that still have the last year in the
copyright headers, and it will fix the headers on that file using
a perl regex one liner.
For example: if it finds something like this and we're in 2014
// Copyr... | mit |
saurabh6790/medapp | setup/doctype/company/charts/import_from_openerp.py | 30 | 4372 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
"""
Import chart of accounts from OpenERP sources
"""
from __future__ import unicode_literals
import os, json
from xml.etree import ElementTree as ET
from webnotes.utils.datautils import r... | agpl-3.0 |
invisiblek/python-for-android | python3-alpha/python3-src/Tools/scripts/nm2def.py | 97 | 2451 | #! /usr/bin/env python3
"""nm2def.py
Helpers to extract symbols from Unix libs and auto-generate
Windows definition files from them. Depends on nm(1). Tested
on Linux and Solaris only (-p option to nm is for Solaris only).
By Marc-Andre Lemburg, Aug 1998.
Additional notes: the output of nm is supposed to look like t... | apache-2.0 |
otoil/shadowsocks | shadowsocks/local.py | 1015 | 2248 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 clowwindy
#
# 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... | apache-2.0 |
RachitKansal/scikit-learn | sklearn/neighbors/tests/test_approximate.py | 71 | 18815 | """
Testing for the approximate neighbor search using
Locality Sensitive Hashing Forest module
(sklearn.neighbors.LSHForest).
"""
# Author: Maheshakya Wijewardena, Joel Nothman
import numpy as np
import scipy.sparse as sp
from sklearn.utils.testing import assert_array_equal
from sklearn.utils.testing import assert_a... | bsd-3-clause |
d-fan/pysb | pysb/export/matlab.py | 3 | 17407 | """
A class for converting a PySB model to a set of ordinary differential
equations for integration in MATLAB.
Note that for use in MATLAB, the name of the ``.m`` file must match the name of
the exported MATLAB class (e.g., ``robertson.m`` for the example below).
For information on how to use the model exporters, see... | bsd-2-clause |
Southpaw-TACTIC/Team | src/python/Lib/site-packages/PySide/examples/itemviews/addressbook/addresswidget.py | 1 | 10279 | #!/usr/bin/python
"""**************************************************************************
**
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
**
** You may use ... | epl-1.0 |
eXistenZNL/SickRage | sickbeard/clients/transmission_client.py | 2 | 5278 | # Author: Mr_Orange <mr_orange@hotmail.it>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | gpl-3.0 |
gangadhar-kadam/powapp | startup/webutils.py | 30 | 1121 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import webnotes
from webnotes.utils import cint
def get_website_settings(context):
post_login = []
cart_enabled = cint(webnotes.conn.get_default("shopping_cart_enabled"))
if cart_enable... | agpl-3.0 |
theheros/kbengine | kbe/src/lib/python/Lib/plat-unixware7/IN.py | 106 | 16210 | # Generated by h2py from /usr/include/netinet/in.h
# Included from netinet/in_f.h
def IN_CLASSA(i): return (((int)(i) & 0x80000000) == 0)
IN_CLASSA_NET = 0xff000000
IN_CLASSA_NSHIFT = 24
IN_CLASSA_HOST = 0x00ffffff
IN_CLASSA_MAX = 128
def IN_CLASSB(i): return (((int)(i) & 0xc0000000) == 0x80000000)
IN_CLASSB_NET = 0... | lgpl-3.0 |
anryko/ansible | lib/ansible/executor/task_result.py | 34 | 5741 | # Copyright: (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# 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 import constants as C
from ansible.parsing.dataloader... | gpl-3.0 |
Wuguanping/Server_Manage_Plugin | Openstack_Plugin/ironic-plugin-pike/ironic/db/sqlalchemy/alembic/versions/868cb606a74a_add_version_field_in_base_class.py | 4 | 2044 | # 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
# d... | apache-2.0 |
mrquim/mrquimrepo | script.module.html5lib/lib/html5lib/trie/datrie.py | 785 | 1166 | from __future__ import absolute_import, division, unicode_literals
from datrie import Trie as DATrie
from six import text_type
from ._base import Trie as ABCTrie
class Trie(ABCTrie):
def __init__(self, data):
chars = set()
for key in data.keys():
if not isinstance(key, text_type):
... | gpl-2.0 |
wmwwmv/shadowsocks | shadowsocks/encrypt.py | 990 | 5180 | #!/usr/bin/env python
#
# Copyright 2012-2015 clowwindy
#
# 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 la... | apache-2.0 |
googleapis/python-grafeas | grafeas/grafeas_v1/services/grafeas/transports/grpc_asyncio.py | 1 | 26599 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 |
terranum-ch/GraphLink | graphlink/ui/gkui_node_manager.py | 1 | 2716 | #!/urs/bin/python
import os
import wx
from ..core.gk_node import GKNode
from .gkui_node_dlg import GKUINodeEditDialog
class GKUINodeManager(object):
def __init__(self, parentframe, listctrl):
self.m_listctrl = listctrl
assert (self.m_listctrl is not None), "listctrl is None!"
self.m_paren... | apache-2.0 |
duncan-brown/pycbc | tools/timing/match_perf.py | 10 | 3186 | #!/usr/bin/env python
from pycbc.scheme import *
from pycbc.types import *
from pycbc.filter import *
from pycbc.psd import *
import pycbc
from math import log
import numpy
import numpy.random
import sys
from optparse import OptionParser
from math import sin
import gc
parser = OptionParser()
import logging
logging.bas... | gpl-3.0 |
AltruisticControlSystems/controlnode | waflib/Tools/irixcc.py | 5 | 1424 | #! /usr/bin/env python
# imported from samba
"""
compiler definition for irix/MIPSpro cc compiler
based on suncc.py from waf
"""
import os
from waflib import Utils
from waflib.Tools import ccroot, ar
from waflib.Configure import conf
@conf
def find_irixcc(conf):
v = conf.env
cc = None
if v['CC']: cc = v['CC']
el... | gpl-3.0 |
luofei98/qgis | python/ext-libs/pygments/lexers/agile.py | 69 | 78670 | # -*- coding: utf-8 -*-
"""
pygments.lexers.agile
~~~~~~~~~~~~~~~~~~~~~
Lexers for agile languages.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import Lexer, RegexLexer, ExtendedRegexLexer, \
Le... | gpl-2.0 |
luckypoem/shadowsocks | shadowsocks/manager.py | 925 | 9692 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 clowwindy
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 |
ceibal-tatu/software-center | softwarecenter/ui/qml/pkglist.py | 3 | 7221 | #
# Copyright (C) 2011 Canonical
#
# Authors:
# Michael Vogt
#
# 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 3.
#
# This program is distributed in the hope that it will be useful, but... | lgpl-3.0 |
nitin-cherian/Webapps | SimpleIsBetterThanComplex.com/myproject/.env/lib/python3.5/site-packages/django/contrib/staticfiles/management/commands/runserver.py | 28 | 1388 | from django.conf import settings
from django.contrib.staticfiles.handlers import StaticFilesHandler
from django.core.management.commands.runserver import (
Command as RunserverCommand,
)
class Command(RunserverCommand):
help = "Starts a lightweight Web server for development and also serves static files."
... | mit |
gratefulfrog/lib | python/chempy/cex.py | 1 | 17584 | #A* -------------------------------------------------------------------
#B* This file contains source code for the PyMOL computer program
#C* copyright 1998-2000 by Warren Lyford Delano of DeLano Scientific.
#D* -------------------------------------------------------------------
#E* It is unlawful to modify or remove ... | gpl-2.0 |
Dziolas/invenio | modules/bibmatch/lib/bibmatch_unit_tests.py | 16 | 7774 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your opt... | gpl-2.0 |
chrplr/AIP2015 | resources/python-scripts/dualscope.py | 1 | 28502 | #!/usr/bin/env python
"""
Oscilloscope + spectrum analyser in Python.
------------------------------------------------------------
Copyright (C) 2008, Roger Fearick, University of Cape Town
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as pu... | gpl-2.0 |
scottcunningham/ansible | v1/ansible/runner/lookup_plugins/flattened.py | 122 | 2428 | # (c) 2013, Serge van Ginderachter <serge@vanginderachter.be>
#
# 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)... | gpl-3.0 |
nuagenetworks/vspk-python | vspk/v6/fetchers/nugatewaytemplates_fetcher.py | 2 | 2156 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia
# 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 copyrigh... | bsd-3-clause |
guaix-ucm/numina | numina/instrument/components/tests/test_wheel.py | 3 | 3994 |
import pytest
from numina.tests.seffect import record_call
from ..wheel import Wheel, Carrousel
class Disp(object):
def __init__(self, name):
self.name = name
@pytest.fixture
def wheel_dev():
wheel = Wheel(3)
for idx in range(3):
wheel.put_in_pos(Disp(idx), idx)
return wheel
@py... | gpl-3.0 |
cloudera/hue | desktop/core/ext-py/tablib-0.14.0/tests/test_tablib.py | 2 | 36814 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Tests for Tablib."""
from __future__ import unicode_literals
import datetime
import doctest
import json
import sys
import unittest
from uuid import uuid4
from MarkupPy import markup
import tablib
from tablib.compat import unicode, is_py3
from tablib.core import Row, de... | apache-2.0 |
mbareta/edx-platform-ft | lms/djangoapps/courseware/tests/test_access.py | 7 | 32426 | # -*- coding: utf-8 -*-
"""
Test the access control framework
"""
import datetime
import ddt
import itertools
import pytz
from django.contrib.auth.models import User
from ccx_keys.locator import CCXLocator
from django.http import Http404
from django.test.client import RequestFactory
from django.core.urlresolvers impor... | agpl-3.0 |
ryfeus/lambda-packs | Tensorflow/source/tensorflow/contrib/linalg/python/ops/linear_operator.py | 31 | 33633 | # 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... | mit |
faulkner/prospector | prospector/tools/frosted/__init__.py | 3 | 2705 | from __future__ import absolute_import
from frosted.api import check_path
from prospector.message import Location, Message
from prospector.tools.base import ToolBase
__all__ = (
'FrostedTool',
)
class ProspectorReporter(object):
def __init__(self, ignore=None):
self._messages = []
self.ign... | gpl-2.0 |
yosshy/nova | nova/db/sqlalchemy/migrate_repo/versions/269_add_numa_node_column.py | 81 | 1322 | # Copyright 2014 Intel Corporation
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 |
alexgorban/models | official/modeling/tf_utils.py | 1 | 5438 | # Copyright 2019 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 |
houst0nn/external_skia | tools/copyright/main.py | 220 | 3489 | '''
Copyright 2011 Google Inc.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
'''
'''
Updates all copyright headers within our code:
- For files that already have a copyright header, the header is modified
while keeping the year and holder intact.
- For files that ... | bsd-3-clause |
jhawkesworth/ansible | lib/ansible/modules/source_control/github_key.py | 44 | 7544 | #!/usr/bin/python
# Copyright: 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
wubr2000/googleads-python-lib | examples/adwords/adwords_appengine_demo/views/show_campaigns_view.py | 4 | 2403 | #!/usr/bin/python
#
# Copyright 2014 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.0
#
# Unless required b... | apache-2.0 |
PyFilesystem/pyfilesystem | fs/rpcfs.py | 1 | 11326 | """
fs.rpcfs
========
This module provides the class 'RPCFS' to access a remote FS object over
XML-RPC. You probably want to use this in conjunction with the 'RPCFSServer'
class from the :mod:`~fs.expose.xmlrpc` module.
"""
import xmlrpclib
import socket
import base64
from fs.base import *
from fs.errors import *
... | bsd-3-clause |
Chilledheart/chromium | chrome/common/extensions/docs/server2/caching_rietveld_patcher_test.py | 121 | 2325 | #!/usr/bin/env python
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from caching_rietveld_patcher import (CachingRietveldPatcher,
_VERSION_CACHE_MAXA... | bsd-3-clause |
orlenko/bccf | src/pybb/permissions.py | 1 | 6478 | # -*- coding: utf-8 -*-
"""
Extensible permission system for pybbm
"""
from django.utils.importlib import import_module
from django.db.models import Q
from pybb import defaults
def _resolve_class(name):
""" resolves a class function given as string, returning the function """
if not name: return False
mo... | unlicense |
guorendong/iridium-browser-ubuntu | third_party/pyelftools/elftools/common/py3compat.py | 10 | 1487 | #-------------------------------------------------------------------------------
# elftools: common/py3compat.py
#
# Python 3 compatibility code
#
# Eli Bendersky (eliben@gmail.com)
# This code is in the public domain
#-------------------------------------------------------------------------------
import sys
PY3 = sys.... | bsd-3-clause |
amith01994/intellij-community | plugins/hg4idea/testData/bin/mercurial/hgweb/__init__.py | 97 | 1073 | # hgweb/__init__.py - web interface to a mercurial repository
#
# Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net>
# Copyright 2005 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
import o... | apache-2.0 |
conejoninja/plugin.video.pelisalacarta | pelisalacarta/channels/yaske.py | 5 | 12025 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canal para yaske
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os, sys
from core import... | gpl-3.0 |
ktok07b6/polyphony | polyphony/compiler/libs.py | 1 | 3330 | single_port_ram = """module SinglePortRam #
(
parameter DATA_WIDTH = 8,
parameter ADDR_WIDTH = 4,
parameter RAM_DEPTH = 1 << ADDR_WIDTH
)
(
input clk,
input rst,
input [ADDR_WIDTH-1:0] ram_addr,
input [DATA_WIDTH-1:0] ram_d,
input ram_we,
output [DATA_WIDTH-1:0] ram_q
);
reg [DATA_WIDTH-1:0] mem [0... | mit |
sunzuolei/youtube-dl | youtube_dl/extractor/freevideo.py | 147 | 1189 | from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import ExtractorError
class FreeVideoIE(InfoExtractor):
_VALID_URL = r'^http://www.freevideo.cz/vase-videa/(?P<id>[^.]+)\.html(?:$|[?#])'
_TEST = {
'url': 'http://www.freevideo.cz/vase-videa/vysukany-zadecek-22033... | unlicense |
andris210296/andris-projeto | backend/venv/test/lib/python2.7/site-packages/gaeforms/base.py | 7 | 18535 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from decimal import Decimal
import datetime
from google.appengine.ext import ndb
from google.appengine.ext.ndb import Model
from webapp2_extras.i18n import gettext as _
from webapp2_extras.i18n import lazy_gettext as _lazy
from webapp2_e... | mit |
drewandersonnz/openshift-tools | ansible/roles/lib_git/build/src/git_rebase.py | 13 | 2152 | # pylint: skip-file
class GitRebase(GitCLI):
''' Class to wrap the git merge line tools
'''
# pylint: disable=too-many-arguments
def __init__(self,
path,
branch,
rebase_branch,
ssh_key=None):
''' Constructor for GitPush '''
... | apache-2.0 |
tonioo/modoboa | modoboa/core/forms.py | 1 | 4606 | # -*- coding: utf-8 -*-
"""Core forms."""
from __future__ import unicode_literals
from django import forms
from django.contrib.auth import (
forms as auth_forms, get_user_model, password_validation
)
from django.db.models import Q
from django.utils.translation import ugettext as _, ugettext_lazy
from modoboa.co... | isc |
chouseknecht/ansible | lib/ansible/modules/network/aci/aci_tenant.py | 27 | 6322 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
swiftstack/swift | test/unit/common/middleware/crypto/test_encrypter.py | 2 | 46621 | # Copyright (c) 2015-2016 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 agree... | apache-2.0 |
kaiserroll14/301finalproject | main/pandas/sparse/panel.py | 9 | 18717 | """
Data structures for sparse float data. Life is made simpler by dealing only
with float64 data
"""
# pylint: disable=E1101,E1103,W0231
import warnings
from pandas.compat import range, lrange, zip
from pandas import compat
import numpy as np
from pandas.core.index import Index, MultiIndex, _ensure_index
from panda... | gpl-3.0 |
sdteffen/dia | plug-ins/python/dot2dia.py | 5 | 8701 | # PyDia DOT Import
# Copyright (c) 2009 Hans Breuer <hans@breuer.org>
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later v... | gpl-2.0 |
BorisJeremic/Real-ESSI-Examples | analytic_solution/test_cases/Contact/Coupled_Contact/Dynamic_Loading_Single_Foundation_System_Under_Compression/CoupledSoftContact_NonLinHardShear/k_1e-4/compare_txt.py | 637 | 2094 | #!/usr/bin/python
import h5py
import sys
import numpy as np
import os
import re
import random
# find the path to my own python function:
cur_dir=os.getcwd()
sep='test_cases'
test_DIR=cur_dir.split(sep,1)[0]
scriptDIR=test_DIR+'compare_function'
sys.path.append(scriptDIR)
# import my own function for color and comparat... | cc0-1.0 |
redbear/firmware | hal/src/photon/libraries/crypto/micro-ecc/scripts/mult_arm.py | 10 | 6108 | #!/usr/bin/env python
import sys
if len(sys.argv) < 2:
print "Provide the integer size in 32-bit words"
sys.exit(1)
size = int(sys.argv[1])
full_rows = size // 3
init_size = size % 3
if init_size == 0:
full_rows = full_rows - 1
init_size = 3
def emit(line, *args):
s = '"' + line + r' \n\t"'
... | lgpl-3.0 |
mcanthony/airflow | airflow/default_login.py | 22 | 1769 | '''
Override this file to handle your authenticating / login.
Copy and alter this file and put in your PYTHONPATH as airflow_login.py,
the new module will override this one.
'''
import flask_login
from flask_login import login_required, current_user, logout_user
from flask import url_for, redirect
from airflow impo... | apache-2.0 |
macs03/demo-cms | cms/lib/python2.7/site-packages/cms/tests/placeholder.py | 2 | 59018 | # -*- coding: utf-8 -*-
from __future__ import with_statement
import itertools
import warnings
from django.conf import settings
from django.contrib import admin
from django.contrib.auth.models import Permission
from django.contrib.messages.storage import default_storage
from django.core.cache import cache
from django.... | mit |
praekelt/txtalert | txtalert/apps/bookings/views.py | 1 | 7598 | from django.http import HttpResponse, Http404, HttpResponseRedirect
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
fro... | gpl-3.0 |
fighterlyt/bite-project | deps/gdata-python-client/src/atom/mock_http_core.py | 102 | 12008 | #!/usr/bin/env python
#
# Copyright (C) 2009 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 ... | apache-2.0 |
florentchandelier/zipline | zipline/utils/sharedoc.py | 2 | 3145 | """
Shared docstrings for parameters that should be documented identically
across different functions.
"""
import re
from six import iteritems
from textwrap import dedent
PIPELINE_DOWNSAMPLING_FREQUENCY_DOC = dedent(
"""\
frequency : {'year_start', 'quarter_start', 'month_start', 'week_start'}
A string... | apache-2.0 |
paour/weblate | weblate/trans/tests/test_changes.py | 2 | 2792 | # -*- coding: utf-8 -*-
#
# Copyright Β© 2012 - 2014 Michal ΔihaΕ <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# 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, eithe... | gpl-3.0 |
slightlymadphoenix/activityPointsApp | activitypoints/lib/python3.5/site-packages/django/utils/_os.py | 502 | 3581 | from __future__ import unicode_literals
import os
import sys
import tempfile
from os.path import abspath, dirname, isabs, join, normcase, normpath, sep
from django.core.exceptions import SuspiciousFileOperation
from django.utils import six
from django.utils.encoding import force_text
if six.PY2:
fs_encoding = sy... | mit |
sushilks/hydra | src/main/python/hydra/lib/cli.py | 4 | 4059 | """hydra cli.
Usage:
hydra cli ls slaves
hydra cli ls apps
hydra cli ls task <app>
hydra cli [force] stop <app>
hydra cli scale <app> <scale>
hydra cli (-h | --help)
hydra cli --version
Options:
-h --help Show this screen.
--version Show version.
"""
__author__ = 'sushil'
from docopt imp... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.