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
elthariel/dff
api/gui/widget/nodetree.py
1
4524
# DFF -- An Open Source Digital Forensics Framework # Copyright (C) 2009-2010 ArxSys # This program is free software, distributed under the terms of # the GNU General Public License Version 2. See the LICENSE file # at the top of the source tree. # # See http://www.digital-forensic.org for more information about this...
gpl-2.0
petruc/selenium
py/test/selenium/common/utils.py
65
2074
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
Danisan/odoo-1
openerp/report/render/odt2odt/odt2odt.py
443
2265
# -*- 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
ptisserand/ansible
lib/ansible/modules/system/hostname.py
34
24853
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2013, Hiroaki Nakamura <hnakamur@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 ANSIBLE_METADATA = {'metadata_versi...
gpl-3.0
afandria/sky_engine
build/android/gyp/write_build_config.py
29
13869
#!/usr/bin/env python # # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Writes a build_config file. The build_config file for a target is a json file containing information about how to build that targ...
bsd-3-clause
addition-it-solutions/project-all
addons/sale/__init__.py
378
1085
# -*- 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
developerworks/horizon
horizon/templatetags/horizon.py
1
4694
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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 # # ...
apache-2.0
Architektor/PySnip
venv/lib/python2.7/site-packages/pip/commands/uninstall.py
798
2884
from __future__ import absolute_import import pip from pip.wheel import WheelCache from pip.req import InstallRequirement, RequirementSet, parse_requirements from pip.basecommand import Command from pip.exceptions import InstallationError class UninstallCommand(Command): """ Uninstall packages. pip is a...
gpl-3.0
xyzz/vcmi-build
project/jni/python/src/Lib/encodings/cp1250.py
593
13942
""" Python Character Mapping Codec cp1250 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1250.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...
lgpl-2.1
vatslav/perfectnote
keepnote/extensions/editor_insert_date/__init__.py
1
6514
""" KeepNote Insert date extension """ # # KeepNote # Copyright (c) 2008-2009 Matt Rasmussen # Author: Matt Rasmussen <rasmus@mit.edu> # # 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 Foundat...
gpl-2.0
wallnerryan/flocker-profiles
flocker/docs/bootstrap/_simple.py
15
4954
# Copyright Hybrid Logic Ltd. See LICENSE file for details. """ Simple directives that just wrap content. """ from textwrap import dedent from docutils import nodes from docutils.parsers.rst import directives from docutils.parsers.rst import Directive class EmptyDiv(Directive): """ Creates a new directiv...
apache-2.0
CristianBB/SickRage
lib/sqlalchemy/sql/expression.py
78
5624
# sql/expression.py # Copyright (C) 2005-2014 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 """Defines the public namespace for SQL expression constructs. Prior to version 0.9...
gpl-3.0
sharvanath/ModNet_Linux
tools/perf/scripts/python/event_analyzing_sample.py
4719
7393
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
gpl-2.0
saurabh6790/med_new_app
patches/august_2013/fix_fiscal_year.py
32
1254
import webnotes def execute(): create_fiscal_years() doctypes = webnotes.conn.sql_list("""select parent from tabDocField where (fieldtype="Link" and options='Fiscal Year') or (fieldtype="Select" and options='link:Fiscal Year')""") for dt in doctypes: date_fields = webnotes.conn.sql_list("""select fieldna...
agpl-3.0
tschneidereit/servo
tests/wpt/web-platform-tests/eventsource/resources/cors-cookie.py
248
1220
from datetime import datetime def main(request, response): last_event_id = request.headers.get("Last-Event-Id", "") ident = request.GET.first('ident', "test") cookie = "COOKIE" if ident in request.cookies else "NO_COOKIE" origin = request.GET.first('origin', request.headers["origin"]) credentials =...
mpl-2.0
q1ang/fuck12306
fuck12306.py
7
4461
#!/usr/bin/python # # FileName : fuck12306.py # # Author : MaoMao Wang <andelf@gmail.com> # # Created : Mon Mar 16 22:08:41 2015 by ShuYu Wang # # Copyright : Feather (c) 2015 # # Description : fuck fuck 12306 # # Time-stamp: <2015-03-17 10:57:44 andelf> from PIL import Image from PIL import Image...
mit
agconti/njode
env/lib/python2.7/site-packages/django/contrib/gis/geos/point.py
105
4400
from ctypes import c_uint from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos import prototypes as capi from django.utils import six from django.utils.six.moves import xrange class Point(GEOSGeometry): _minlength = 2 _m...
bsd-3-clause
deadRaccoons/TestAirlines
tabo/cherrypy/cherrypy/process/win32.py
68
5772
"""Windows service. Requires pywin32.""" import os import win32api import win32con import win32event import win32service import win32serviceutil from cherrypy.process import wspbus, plugins class ConsoleCtrlHandler(plugins.SimplePlugin): """A WSPBus plugin for handling Win32 console events (like Ctrl-C).""" ...
gpl-2.0
selenized/clausius
clausius/tests/test_isothermflash.py
2
2106
# -*- coding: utf-8 -*- """ Unit tests for the dewpoint module """ from numpy.testing import TestCase, run_module_suite, assert_allclose, assert_warns import numpy as np from clausius import Mixture from clausius.eos import PengRobinson from clausius.flash import isothermflash from _ts_data import hydrocarbon_testmix...
unlicense
Just-D/chromium-1
tools/cr/cr/actions/installer.py
113
1642
# 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. """A module for the Installer base class.""" import cr class Installer(cr.Action, cr.Plugin.Type): """Base class for implementing installers. Install...
bsd-3-clause
cloudbase/lis-tempest
tempest/services/compute/json/hypervisor_client.py
4
3451
# Copyright 2013 IBM Corporation. # 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...
apache-2.0
PortSwigger/elastic-burp
ElasticBurp.py
2
15469
# ElasticBurp # Copyright 2016 Thomas Patzke <thomas@patzke.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 3 of the License, or # (at your option) any later version. # # T...
gpl-3.0
detiber/lib_openshift
lib_openshift/models/v1beta1_cpu_target_utilization.py
2
3733
# coding: utf-8 """ OpenAPI spec version: Generated by: https://github.com/swagger-api/swagger-codegen.git 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 ...
apache-2.0
rishubhjain/monitoring-integration
setup.py
1
3872
import re from setuptools import Command from setuptools import find_packages from setuptools import setup import subprocess try: # Python 2 backwards compat from __builtin__ import raw_input as input except ImportError: pass def read_module_contents(): with open('version.py') as app_init: ret...
lgpl-2.1
wangyum/spark
examples/src/main/python/status_api_demo.py
26
2158
# # 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
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/xpu/test_affine_channel_op_xpu.py
2
4559
# Copyright (c) 2018 PaddlePaddle 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 app...
apache-2.0
infobloxopen/infoblox-netmri
infoblox_netmri/api/broker/v3_3_0/background_tasks_subtask_broker.py
14
32525
from ..broker import Broker class BackgroundTasksSubtaskBroker(Broker): controller = "background_tasks_subtasks" def show(self, **kwargs): """Shows the details for the specified background tasks subtask. **Inputs** | ``api version min:`` None | ``api version ma...
apache-2.0
patriciolobos/desa8
openerp/addons/account_bank_statement_extensions/report/bank_statement_balance_report.py
378
2723
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
agpl-3.0
topic2k/EventGhost
lib27/site-packages/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...
gpl-2.0
bohlian/erpnext
erpnext/accounts/report/profitability_analysis/profitability_analysis.py
28
5682
# Copyright (c) 2013, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.utils import flt, getdate, formatdate, cstr from erpnext.accounts.report.financial_statements import filter_accou...
gpl-3.0
barryrobison/arsenalsuite
cpp/lib/PyQt4/examples/itemviews/chart/chart.py
15
21752
#!/usr/bin/env python ############################################################################# ## ## Copyright (C) 2010 Riverbank Computing Limited. ## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ## All rights reserved. ## ## This file is part of the examples of PyQt. ## ## $QT_BEGIN_LICENS...
gpl-2.0
raccoongang/edx-platform
common/djangoapps/edxmako/tests.py
1
7168
import unittest import ddt from django.conf import settings from django.core.urlresolvers import reverse from django.http import HttpResponse from django.test import TestCase from django.test.client import RequestFactory from django.test.utils import override_settings from mock import Mock, patch from edxmako import ...
agpl-3.0
mapr/hue
desktop/core/ext-py/pycrypto-2.6.1/lib/Crypto/Util/winrandom.py
139
1196
# # Util/winrandom.py : Stub for Crypto.Random.OSRNG.winrandom # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is...
apache-2.0
Tranzystorek/servo
tests/wpt/web-platform-tests/css/tools/w3ctestlib/Utils.py
61
5020
#!/usr/bin/python # CSS Test Suite Manipulation Library Utilities # Initial code by fantasai, joint copyright 2010 W3C and Microsoft # Licensed under BSD 3-Clause: <http://www.w3.org/Consortium/Legal/2008/03-bsd-license> ###### XML Parsing ###### import os import w3ctestlib os.environ['XML_CATALOG_FILES'] = os.path.j...
mpl-2.0
w1ll1am23/home-assistant
homeassistant/components/songpal/config_flow.py
3
5300
"""Config flow to configure songpal component.""" from __future__ import annotations import logging from urllib.parse import urlparse from songpal import Device, SongpalException import voluptuous as vol from homeassistant import config_entries from homeassistant.components import ssdp from homeassistant.const impor...
apache-2.0
Vogeltak/pauselan
lib/python3.4/site-packages/werkzeug/wsgi.py
147
37837
# -*- coding: utf-8 -*- """ werkzeug.wsgi ~~~~~~~~~~~~~ This module implements WSGI related helpers. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import re import os import sys import posixpath import mimetypes from itert...
gpl-2.0
t794104/ansible
lib/ansible/modules/network/layer3/net_l3_interface.py
26
2123
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Ansible by Red Hat, inc # 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', ...
gpl-3.0
Designist/sympy
sympy/solvers/tests/test_ode.py
39
136540
from __future__ import division from sympy import (acos, acosh, asinh, atan, cos, Derivative, diff, dsolve, Dummy, Eq, erf, erfi, exp, Function, I, Integral, LambertW, log, O, pi, Rational, RootOf, S, simplify, sin, sqrt, Symbol, tan, asin, sinh, Piecewise, symbols, Poly) from sympy.solvers.ode import (_u...
bsd-3-clause
feigames/Odoo
openerp/cli/server.py
79
5605
# -*- 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
amadeusproject/amadeuslms
log/search.py
1
20242
from elasticsearch_dsl.connections import connections from elasticsearch_dsl import ( Q, DocType, Text, Date, Integer, Long, Object, Search, MultiSearch, A ) from elasticsearch.helpers import bulk from elasticsearch import Elasticsearch from datetime import datetime, timedelta fr...
gpl-2.0
clovett/MissionPlanner
Lib/site-packages/numpy/polynomial/tests/test_legendre.py
54
17744
"""Tests for legendre module. """ from __future__ import division import numpy as np import numpy.polynomial.legendre as leg import numpy.polynomial.polynomial as poly from numpy.testing import * P0 = np.array([ 1]) P1 = np.array([ 0, 1]) P2 = np.array([-1, 0, 3])/2 P3 = np.array([ 0, -3, 0, 5])/2 P4 = np...
gpl-3.0
benthomasson/ansible
lib/ansible/modules/cloud/docker/docker_image_facts.py
9
6502
#!/usr/bin/python # # Copyright 2016 Red Hat | Ansible # 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.0', 'status': ['prev...
gpl-3.0
openiitbombayx/edx-platform
openedx/core/djangoapps/user_api/accounts/tests/test_views.py
39
33313
# -*- coding: utf-8 -*- import datetime from copy import deepcopy import ddt import hashlib import json from mock import patch from pytz import UTC import unittest from django.conf import settings from django.core.urlresolvers import reverse from django.test.testcases import TransactionTestCase from django.test.utils ...
agpl-3.0
thinkopensolutions/l10n-brazil
sped_sale/models/inherited_sale_order.py
2
9185
# -*- coding: utf-8 -*- # Copyright 2017 KMEE # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from __future__ import division, print_function, unicode_literals from odoo import api, fields, models, _ from odoo.addons.sped_imposto.models.sped_calculo_imposto_produto_servico \ import SpedCalculoImp...
agpl-3.0
chrisseto/osf.io
osf_tests/test_private_link.py
2
4156
import pytest from website.project import new_private_link from .factories import PrivateLinkFactory, NodeFactory from osf.models import MetaSchema, DraftRegistration, NodeLog @pytest.mark.django_db def test_factory(): plink = PrivateLinkFactory() assert plink.name assert plink.key assert plink.creat...
apache-2.0
tsvstar/vk_downloader
requests/packages/chardet/langthaimodel.py
2930
11275
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mit
Kaisuke5/chainer
cupy/sorting/search.py
9
1739
from cupy import reduction def argmax(a, axis=None, dtype=None, out=None, keepdims=False): """Returns the indices of the maximum along an axis. Args: a (cupy.ndarray): Array to take argmax. axis (int): Along which axis to find the maximum. ``a`` is flattened by default. dt...
mit
mikewiebe-ansible/ansible
lib/ansible/plugins/inventory/k8s.py
37
16915
# Copyright (c) 2018 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 = ''' name: k8s plugin_type: inventory author: - Chris Houseknecht <...
gpl-3.0
daodaoliang/python-phonenumbers
python/phonenumbers/data/region_CC.py
7
1870
"""Auto-generated file, do not edit by hand. CC metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_CC = PhoneMetadata(id='CC', country_code=61, international_prefix='(?:14(?:1[14]|34|4[17]|[56]6|7[47]|88))?001[14-689]', general_desc=PhoneNumberDesc(national_number_p...
apache-2.0
jythontools/pip
pip/_vendor/requests/packages/chardet/jisfreq.py
3131
47315
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights R...
mit
aabbox/kbengine
kbe/res/scripts/common/Lib/test/test_quopri.py
171
7715
from test import support import unittest import sys, os, io, subprocess import quopri ENCSAMPLE = b"""\ Here's a bunch of special=20 =A1=A2=A3=A4=A5=A6=A7=A8=A9 =AA=AB=AC=AD=AE=AF=B0=B1=B2=B3 =B4=B5=B6=B7=B8=B9=BA=BB=BC=BD=BE =BF=C0=C1=C2=C3=C4=C5=C6 =C7=C8=C9=CA=CB=CC=CD=CE=CF =D0=D1=D2=D3=D4=D5=D6=D7 =D8=D9=DA=D...
lgpl-3.0
goddardl/cortex
python/IECore/CompoundStream.py
17
2208
########################################################################## # # Copyright (c) 2010, Image Engine Design 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: # # * Redistribu...
bsd-3-clause
dzheng256/PittAPI
PittAPI/textbook.py
2
7838
import grequests import requests from bs4 import BeautifulSoup from typing import List, Dict, Any, Callable, Generator, Tuple BASE_URL = 'http://pitt.verbacompare.com/' CODES = [ 'ADMJ', 'ADMPS', 'AFRCNA', 'AFROTC', 'ANTH', 'ARABIC', 'ARTSC', 'ASL', 'ASTRON', 'ATHLTR', 'BACC', 'BCHS', 'BECN', 'BFIN', 'BHRM',...
gpl-2.0
kubeflow/tf-operator
sdk/python/kubeflow/tfjob/models/v1_tf_job_list.py
1
7083
# Copyright 2019 kubeflow.org. # # 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
teriyakichild/python-zcli
zcli/ClsDict.py
1
6115
# Why cls_state... cls_state is a portable attrdict class ClsDict(dict): """This is an attrdict implementation that provides: * property access for dict elements * overrides for properties * * Override getitem, setitem, getattr, and setattr to provide the following behaviors: @property deco...
apache-2.0
tetravision/Test
test/integ/util/conf.py
12
3764
""" Integration tests for the stem.util.conf class and functions. """ import os import unittest import stem.util.conf import test.runner CONF_HEADER = """# Demo configuration for integration tests to run against. Nothing to see here, # move along, move along. """ EXAMPLE_CONF = """ destination.ip 1.2.3.4 destinatio...
lgpl-3.0
vrenaville/stock-logistics-workflow
__unported__/stock_obsolete/report/product_obsolete.py
19
3160
# -*- coding: utf-8 -*- ############################################################################## # # Author: Joël Grand-Guillaume, Matthieu Dietrich # Copyright 2008-2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero Gener...
agpl-3.0
peteboyd/lammps_interface
lammps_interface/lammps_potentials.py
1
45269
#!/usr/bin/env python """ Lammps potentital types. """ class BondPotential(object): """ Class to hold bond styles that are implemented in lammps Purpose is to store info that the user wants to use to overwrite standard UFF output of lammps_interface """ class Class2(object): """Potential ...
mit
techtonik/devassistant
test/dapi/test_dap.py
6
27722
# -*- coding: utf-8 -*- import pytest import sys import os import logging import itertools import glob import subprocess from flexmock import flexmock try: from cStringIO import StringIO except: try: from StringIO import StringIO except: from io import StringIO from devassistant.dapi import ...
gpl-2.0
SPP1665DataAnalysisCourse/python-neo
neo/test/iotest/test_neuroshareio.py
2
3008
# -*- coding: utf-8 -*- """ Tests of neo.io.neuroshareio """ # needed for python 3 compatibility from __future__ import absolute_import, division import sys import os import tarfile import zipfile import tempfile import platform try: import unittest2 as unittest except ImportError: import unittest try: ...
bsd-3-clause
docusign/docusign-python-client
docusign_esign/models/form_data_item.py
1
6485
# coding: utf-8 """ DocuSign REST API The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501 OpenAPI spec version: v2.1 Contact: devcenter@docusign.com Generated by: https://github.com/swagger-api/swagger-codegen.gi...
mit
nkalodimas/invenio
modules/websubmit/lib/functions/Test_Status.py
33
3103
## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at...
gpl-2.0
douggeiger/gnuradio
gr-wxgui/python/wxgui/plotter/gltext.py
37
16891
#!/usr/bin/env python # -*- coding: utf-8 # # Provides some text display functions for wx + ogl # Copyright (C) 2007 Christian Brugger, Stefan Hacker # # 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 ...
gpl-3.0
dragondjf/musicplayer
objbrowser/__init__.py
1
2196
""" objbrowser package """ __all__ = ['browse', 'execute', 'create_object_browser', 'logging_basic_config'] import sys, os, logging, pprint, inspect from PyQt5 import QtCore from PyQt5 import QtGui from PyQt5 import QtWidgets from objbrowser.objectbrowser import ObjectBrowser from objbrowser.version import PROGRAM_NA...
gpl-2.0
c-o-m-m-a-n-d-e-r/CouchPotatoServer
libs/qbittorrent/client.py
15
19603
import requests import json class LoginRequired(Exception): def __str__(self): return 'Please login first.' class QBittorrentClient(object): """class to interact with qBittorrent WEB API""" def __init__(self, url): if not url.endswith('/'): url += '/' self.url = url ...
gpl-3.0
jaredkoontz/leetcode
Python/best-time-to-buy-and-sell-stock-iii.py
3
2546
# Time: O(n) # Space: O(1) # # Say you have an array for which the ith element # is the price of a given stock on day i. # # Design an algorithm to find the maximum profit. # You may complete at most two transactions. # # Note: # You may not engage in multiple transactions at the same time # (ie, you must sell the ...
mit
MarcosCommunity/odoo
addons/purchase/edi/__init__.py
448
1069
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
agpl-3.0
fjbatresv/odoo
addons/board/__init__.py
439
1144
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
agpl-3.0
atpohjal/or-tools
examples/tests/pywraplp_test.py
19
3470
# Copyright 2010-2014 Google # 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, so...
apache-2.0
mith1979/ansible_automation
applied_python/applied_python/lib/python2.7/site-packages/setuptools/dist.py
75
35307
__all__ = ['Distribution'] import re import os import sys import warnings import numbers import distutils.log import distutils.core import distutils.cmd import distutils.dist from distutils.core import Distribution as _Distribution from distutils.errors import (DistutilsOptionError, DistutilsPlatformError, Distuti...
apache-2.0
ttfseiko/openerp-trunk
openerp/addons/hr_timesheet_sheet/report/__init__.py
101
1097
# -*- 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
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/pygments/lexers/_cl_builtins.py
31
14053
# -*- coding: utf-8 -*- """ pygments.lexers._cl_builtins ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ANSI Common Lisp builtins. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ BUILTIN_FUNCTIONS = set(( # 638 functions '<', '<=', '=', '>', '>=',...
gpl-3.0
Venturi/oldcms
env/lib/python2.7/site-packages/django/db/backends/base/features.py
79
9569
from django.db.models.aggregates import StdDev from django.db.utils import ProgrammingError from django.utils.functional import cached_property class BaseDatabaseFeatures(object): gis_enabled = False allows_group_by_pk = False # True if django.db.backends.utils.typecast_timestamp is used on values # r...
apache-2.0
kastnerkyle/pylearn2
pylearn2/cross_validation/tests/test_train_cv_extensions.py
49
1681
""" Tests for TrainCV extensions. """ import os import tempfile from pylearn2.config import yaml_parse from pylearn2.testing.skip import skip_if_no_sklearn def test_monitor_based_save_best_cv(): """Test MonitorBasedSaveBestCV.""" handle, filename = tempfile.mkstemp() skip_if_no_sklearn() trainer = ya...
bsd-3-clause
anna-effeindzourou/trunk
examples/PeriodicBoundaries/periodic-compress.py
8
1186
''' This example shows compression of a packing with a periodic cell. ''' O.periodic=True O.cell.setBox(20,20,10) from yade import pack,timing O.materials.append(FrictMat(young=30e9,density=2400)) p=pack.SpherePack() p.makeCloud(Vector3(0,0,0),Vector3(20,20,10),1,.5,700,True) for sph in p: O.bodies.append(sphere(sp...
gpl-2.0
devfreesg/gpudb
SQL2XML/antlr3/tokens.py
99
12016
"""ANTLR3 runtime package""" # begin[licence] # # [The "BSD licence"] # Copyright (c) 2005-2008 Terence Parr # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code ...
apache-2.0
opendatagroup/cassius
tags/cassius_0_1_0_3/cassius/applications/clustering.py
2
7929
import math import numpy import numpy.linalg import cassius.containers as containers import cassius.mathtools as mathtools import cassius.color as color from cassius.containers import Auto import augustus.core.pmml41 as pmml def _autoAxis(values): originN, xscale, xbasis, yscale, ybasis = mathtools.principleComp...
apache-2.0
dvliman/jaikuengine
.google_appengine/lib/django-1.4/tests/regressiontests/signing/tests.py
34
4197
import time from django.core import signing from django.test import TestCase from django.utils.encoding import force_unicode class TestSigner(TestCase): def test_signature(self): "signature() method should generate a signature" signer = signing.Signer('predictable-secret') signer2 = sign...
apache-2.0
CyanogenMod/android_kernel_toshiba_betelgeuse
tools/perf/util/setup.py
560
1379
#!/usr/bin/python2 from distutils.core import setup, Extension from os import getenv from distutils.command.build_ext import build_ext as _build_ext from distutils.command.install_lib import install_lib as _install_lib class build_ext(_build_ext): def finalize_options(self): _build_ext.finalize_optio...
gpl-2.0
LCAV/MP3Lab
psychoacoustic.py
1
6282
import numpy as np import sys from parameters import * from common import add_db def smr_bit_allocation(params,smr): """Calculate bit allocation in subbands from signal-to-mask ratio.""" bit_allocation = np.zeros(N_SUBBANDS, dtype='uint8') bits_header = 32 bits_alloc = 4 * N_SUBBANDS * params.nch bi...
gpl-3.0
40223103/w16b_test
static/Brython3.1.3-20150514-095342/Lib/xml/sax/xmlreader.py
824
12612
"""An XML Reader is the SAX 2 name for an XML parser. XML Parsers should be based on this code. """ from . import handler from ._exceptions import SAXNotSupportedException, SAXNotRecognizedException # ===== XMLREADER ===== class XMLReader: """Interface for reading an XML document using callbacks. XMLReade...
agpl-3.0
gauntlt/gauntlt-demo
examples/webgoat/vuln-21/attack.py
2
2759
import requests as req ### Request Login Page ### ### Log into WebGoat ### url_base = 'http://127.0.0.1:8080/WebGoat/' login_url = url_base + 'j_spring_security_check' home_url = url_base + 'welcome.mvc' menu_url = url_base + 'lessonmenu.mvc' # login_url = 'http://127.0.0.1:8080/WebGoat/j_spring_security_check' s = r...
mit
kapily/dropcast
tal_scraper.py
1
4679
import urllib2 from bs4 import BeautifulSoup import json episode_page = 'https://www.thisamericanlife.org/radio-archives/episode/%i' DOWNLOAD_URL = 'http://audio.thisamericanlife.org/jomamashouse/ismymamashouse/%i.mp3' import re def get_episode_info(episode_id): req = urllib2.Request(episode_page % episode_id, he...
mit
josjevv/django-cms
cms/admin/views.py
47
2385
# -*- coding: utf-8 -*- from django.http import Http404 from django.shortcuts import get_object_or_404 from cms.models import Page, Title, CMSPlugin, Placeholder def revert_plugins(request, version_id, obj): from reversion.models import Version version = get_object_or_404(Version, pk=version_id) revs = [...
bsd-3-clause
slozier/ironpython2
Src/StdLib/Lib/test/test_decorators.py
194
9849
import unittest from test import test_support def funcattrs(**kwds): def decorate(func): func.__dict__.update(kwds) return func return decorate class MiscDecorators (object): @staticmethod def author(name): def decorate(func): func.__dict__['author'] = name ...
apache-2.0
camptocamp/odoo
addons/hr_timesheet_invoice/wizard/__init__.py
433
1159
# -*- 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
prometheanfire/cloud-init
tests/unittests/test_handler/test_handler_ntp.py
3
9579
from cloudinit.config import cc_ntp from cloudinit.sources import DataSourceNone from cloudinit import templater from cloudinit import (distros, helpers, cloud, util) from ..helpers import FilesystemMockingTestCase, mock import logging import os import shutil import tempfile LOG = logging.getLogger(__name__) NTP_TEM...
gpl-3.0
ds-hwang/chromium-crosswalk
third_party/markdown/extensions/sane_lists.py
109
3084
# markdown is released under the BSD license # Copyright 2007, 2008 The Python Markdown Project (v. 1.7 and later) # Copyright 2004, 2005, 2006 Yuri Takhteyev (v. 0.2-1.6b) # Copyright 2004 Manfred Stienstra (the original version) # # All rights reserved. # # Redistribution and use in source and binary forms, with or...
bsd-3-clause
prpplague/DSI85-Development
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
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.7.2/Lib/plat-mac/lib-scriptpackages/CodeWarrior/Required.py
81
1664
"""Suite Required: Terms that every application should support Level 1, version 1 Generated from /Volumes/Sap/Applications (Mac OS 9)/Metrowerks CodeWarrior 7.0/Metrowerks CodeWarrior/CodeWarrior IDE 4.2.5 AETE/AEUT resource version 1/0, language 0, script 0 """ import aetools import MacOS _code = 'reqd' from StdSu...
mit
varigit/VAR-SOM-AM33-Kernel-3-14
scripts/analyze_suspend.py
445
49020
#!/usr/bin/python # # Tool for analyzing suspend/resume timing # Copyright (c) 2013, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This prog...
gpl-2.0
tjsavage/tmrwmedia
piston/authentication.py
16
10751
import binascii import oauth from django.http import HttpResponse, HttpResponseRedirect from django.contrib.auth.models import User, AnonymousUser from django.contrib.auth.decorators import login_required from django.template import loader from django.contrib.auth import authenticate from django.conf import settings f...
bsd-3-clause
ProfessionalIT/maxigenios-website
sdk/google_appengine/lib/mox/stubout.py
129
4975
#!/usr/bin/python2.4 # # Copyright 2008 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...
mit
kstrauser/ansible
lib/ansible/plugins/action/add_host.py
39
2474
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # Copyright 2012, Seth Vidal <skvidal@fedoraproject.org> # # 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, ...
gpl-3.0
kleisauke/pyvips
pyvips/tests/test_create.py
1
16056
# vim: set fileencoding=utf-8 : import unittest import pyvips from .helpers import PyvipsTester class TestCreate(PyvipsTester): def test_black(self): im = pyvips.Image.black(100, 100) self.assertEqual(im.width, 100) self.assertEqual(im.height, 100) self.assertEqual(im.format, pyv...
mit
noroutine/ansible
lib/ansible/modules/cloud/openstack/os_port.py
25
12185
#!/usr/bin/python # Copyright (c) 2015 Hewlett-Packard Development Company, L.P. # 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', ...
gpl-3.0
psycofdj/xtd
xtd/core/application.py
2
8747
# -*- coding: utf-8 # pylint: disable=unused-import #------------------------------------------------------------------# from __future__ import print_function __author__ = "Xavier MARCELET <xavier@marcelet.com>" #------------------------------------------------------------------# import sys from future.utils im...
gpl-3.0
shaded-enmity/ansible-modules-extras
packaging/os/portage.py
90
12841
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Yap Sok Ann # Written by Yap Sok Ann <sokann@gmail.com> # Based on apt module written by Matthew Williams <matthew@flowroute.com> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
gpl-3.0
vincentltz/ns-3-dev-git
src/applications/bindings/callbacks_list.py
331
1249
callback_classes = [ ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', ...
gpl-2.0
IceCubeDev/hackerschool
WebServer/1.0/JUNK/simple/LogAnalyse.py
1
1674
__author__ = 'Ivan Dortulov' class Client(object): def __init__(self, id): self.history = ["connect"] self.name = id import xml.etree.ElementTree as ET tree = ET.parse('/home/ivan/Documents/Python/SubTasking/log.xml') root = tree.getroot() clients = [] def find_client(id): for client in cl...
gpl-2.0